ivt 0.0.4 → 0.0.6
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/accordion/index.d.ts +13 -0
- package/dist/accordion/index.mjs +2 -0
- package/dist/accordion/index.mjs.map +1 -0
- package/dist/badge/index.d.ts +13 -0
- package/dist/badge/index.mjs +2 -0
- package/dist/badge/index.mjs.map +1 -0
- package/dist/base/index.d.ts +27 -0
- package/dist/base/index.mjs +2 -0
- package/dist/base/index.mjs.map +1 -0
- package/dist/button/index.d.ts +14 -0
- package/dist/button/index.mjs +2 -0
- package/dist/button/index.mjs.map +1 -0
- package/dist/calendar/index.d.ts +11 -0
- package/dist/calendar/index.mjs +2 -0
- package/dist/calendar/index.mjs.map +1 -0
- package/dist/card/index.d.ts +12 -0
- package/dist/card/index.mjs +2 -0
- package/dist/card/index.mjs.map +1 -0
- package/dist/checkbox/index.d.ts +7 -0
- package/dist/checkbox/index.mjs +2 -0
- package/dist/checkbox/index.mjs.map +1 -0
- package/dist/chunks/Combination-w1gWj54H.mjs +2 -0
- package/dist/chunks/Combination-w1gWj54H.mjs.map +1 -0
- package/dist/chunks/TextWrap-CjH4DiRJ.mjs +2 -0
- package/dist/chunks/TextWrap-CjH4DiRJ.mjs.map +1 -0
- package/dist/chunks/accordion-B9KfEWUD.mjs +2 -0
- package/dist/chunks/accordion-B9KfEWUD.mjs.map +1 -0
- package/dist/chunks/bundle-mjs-WLX8GCHw.mjs +2 -0
- package/dist/chunks/bundle-mjs-WLX8GCHw.mjs.map +1 -0
- package/dist/chunks/button-C25JgpF1.mjs +2 -0
- package/dist/chunks/button-C25JgpF1.mjs.map +1 -0
- package/dist/chunks/calendar-Bg8q2q0f.mjs +2 -0
- package/dist/chunks/calendar-Bg8q2q0f.mjs.map +1 -0
- package/dist/chunks/check-B7qxEGdi.mjs +2 -0
- package/dist/chunks/check-B7qxEGdi.mjs.map +1 -0
- package/dist/chunks/chevron-down-C5QWUB1b.mjs +2 -0
- package/dist/chunks/chevron-down-C5QWUB1b.mjs.map +1 -0
- package/dist/chunks/chevron-left-yZO8_iYx.mjs +2 -0
- package/dist/chunks/chevron-left-yZO8_iYx.mjs.map +1 -0
- package/dist/chunks/chevron-right-DX1OAykB.mjs +2 -0
- package/dist/chunks/chevron-right-DX1OAykB.mjs.map +1 -0
- package/dist/chunks/command-BdZ-rcJh.mjs +2 -0
- package/dist/chunks/command-BdZ-rcJh.mjs.map +1 -0
- package/dist/chunks/createLucideIcon-CRElQpLA.mjs +14 -0
- package/dist/chunks/createLucideIcon-CRElQpLA.mjs.map +1 -0
- package/dist/chunks/dialog-BEfPREgp.mjs +2 -0
- package/dist/chunks/dialog-BEfPREgp.mjs.map +1 -0
- package/dist/chunks/index-46Dn4Q--.mjs +2 -0
- package/dist/chunks/index-46Dn4Q--.mjs.map +1 -0
- package/dist/chunks/index-BFX-PqV0.mjs +2 -0
- package/dist/chunks/index-BFX-PqV0.mjs.map +1 -0
- package/dist/chunks/index-CIU1Xq1J.mjs +2 -0
- package/dist/chunks/index-CIU1Xq1J.mjs.map +1 -0
- package/dist/chunks/index-CN1SA0_I.mjs +2 -0
- package/dist/chunks/index-CN1SA0_I.mjs.map +1 -0
- package/dist/chunks/index-COE6uEyP.mjs +2 -0
- package/dist/chunks/index-COE6uEyP.mjs.map +1 -0
- package/dist/chunks/index-CYJu5yO5.mjs +2 -0
- package/dist/chunks/index-CYJu5yO5.mjs.map +1 -0
- package/dist/chunks/index-ClSqYyO3.mjs +2 -0
- package/dist/chunks/index-ClSqYyO3.mjs.map +1 -0
- package/dist/chunks/index-D1rtromL.mjs +2 -0
- package/dist/chunks/index-D1rtromL.mjs.map +1 -0
- package/dist/chunks/index-DM6C2fpF.mjs +2 -0
- package/dist/chunks/index-DM6C2fpF.mjs.map +1 -0
- package/dist/chunks/index-DP22y5yX.mjs +2 -0
- package/dist/chunks/index-DP22y5yX.mjs.map +1 -0
- package/dist/chunks/index-DyAmMjEH.mjs +2 -0
- package/dist/chunks/index-DyAmMjEH.mjs.map +1 -0
- package/dist/chunks/index-oT2uIdb1.mjs +2 -0
- package/dist/chunks/index-oT2uIdb1.mjs.map +1 -0
- package/dist/chunks/input-D7H1CxUv.mjs +2 -0
- package/dist/chunks/input-D7H1CxUv.mjs.map +1 -0
- package/dist/chunks/label-Cue4yhAm.mjs +2 -0
- package/dist/chunks/label-Cue4yhAm.mjs.map +1 -0
- package/dist/chunks/pagination-BYLwRYiM.mjs +2 -0
- package/dist/chunks/pagination-BYLwRYiM.mjs.map +1 -0
- package/dist/chunks/popover-fxWu9ghI.mjs +2 -0
- package/dist/chunks/popover-fxWu9ghI.mjs.map +1 -0
- package/dist/chunks/progress-CKxTxjba.mjs +2 -0
- package/dist/chunks/progress-CKxTxjba.mjs.map +1 -0
- package/dist/chunks/scroll-area-DSDAk121.mjs +2 -0
- package/dist/chunks/scroll-area-DSDAk121.mjs.map +1 -0
- package/dist/chunks/select-BtEQWkQs.mjs +2 -0
- package/dist/chunks/select-BtEQWkQs.mjs.map +1 -0
- package/dist/chunks/skeleton-DsvXPbHg.mjs +2 -0
- package/dist/chunks/skeleton-DsvXPbHg.mjs.map +1 -0
- package/dist/chunks/sortable-D4tl3H9D.mjs +2 -0
- package/dist/chunks/sortable-D4tl3H9D.mjs.map +1 -0
- package/dist/chunks/table-Cql47amq.mjs +2 -0
- package/dist/chunks/table-Cql47amq.mjs.map +1 -0
- package/dist/chunks/tslib.es6-C59-pKsO.mjs +2 -0
- package/dist/chunks/tslib.es6-C59-pKsO.mjs.map +1 -0
- package/dist/chunks/utils-Dd3mX7Lt.mjs +2 -0
- package/dist/chunks/utils-Dd3mX7Lt.mjs.map +1 -0
- package/dist/chunks/x-CYyikW5M.mjs +2 -0
- package/dist/chunks/x-CYyikW5M.mjs.map +1 -0
- package/dist/command/index.d.ts +20 -0
- package/dist/command/index.mjs +2 -0
- package/dist/command/index.mjs.map +1 -0
- package/dist/data-table/index.d.ts +126 -0
- package/dist/data-table/index.mjs +2 -0
- package/dist/data-table/index.mjs.map +1 -0
- package/dist/dialog/index.d.ts +16 -0
- package/dist/dialog/index.mjs +2 -0
- package/dist/dialog/index.mjs.map +1 -0
- package/dist/dropdown-menu/index.d.ts +28 -0
- package/dist/dropdown-menu/index.mjs +2 -0
- package/dist/dropdown-menu/index.mjs.map +1 -0
- package/dist/dropzone/index.d.ts +85 -0
- package/dist/dropzone/index.mjs +7 -0
- package/dist/dropzone/index.mjs.map +1 -0
- package/dist/form/index.d.ts +28 -0
- package/dist/form/index.mjs +2 -0
- package/dist/form/index.mjs.map +1 -0
- package/dist/icon/index.d.ts +16 -0
- package/dist/icon/index.mjs +2 -0
- package/dist/icon/index.mjs.map +1 -0
- package/dist/index/index.d.ts +2 -0
- package/dist/index/index.mjs +2 -0
- package/dist/index/index.mjs.map +1 -0
- package/dist/index.css +7 -0
- package/dist/input/index.d.ts +6 -0
- package/dist/input/index.mjs +2 -0
- package/dist/input/index.mjs.map +1 -0
- package/dist/label/index.d.ts +7 -0
- package/dist/label/index.mjs +2 -0
- package/dist/label/index.mjs.map +1 -0
- package/dist/pagination/index.d.ts +18 -0
- package/dist/pagination/index.mjs +2 -0
- package/dist/pagination/index.mjs.map +1 -0
- package/dist/popover/index.d.ts +10 -0
- package/dist/popover/index.mjs +2 -0
- package/dist/popover/index.mjs.map +1 -0
- package/dist/progress/index.d.ts +7 -0
- package/dist/progress/index.mjs +2 -0
- package/dist/progress/index.mjs.map +1 -0
- package/dist/scroll-area/index.d.ts +8 -0
- package/dist/scroll-area/index.mjs +2 -0
- package/dist/scroll-area/index.mjs.map +1 -0
- package/dist/select/index.d.ts +16 -0
- package/dist/select/index.mjs +2 -0
- package/dist/select/index.mjs.map +1 -0
- package/dist/separator/index.d.ts +7 -0
- package/dist/separator/index.mjs +2 -0
- package/dist/separator/index.mjs.map +1 -0
- package/dist/sheet/index.d.ts +16 -0
- package/dist/sheet/index.mjs +2 -0
- package/dist/sheet/index.mjs.map +1 -0
- package/dist/skeleton/index.d.ts +6 -0
- package/dist/skeleton/index.mjs +2 -0
- package/dist/skeleton/index.mjs.map +1 -0
- package/dist/sortable/index.d.ts +109 -0
- package/dist/sortable/index.mjs +2 -0
- package/dist/sortable/index.mjs.map +1 -0
- package/dist/table/index.d.ts +13 -0
- package/dist/table/index.mjs +2 -0
- package/dist/table/index.mjs.map +1 -0
- package/dist/tabs/index.d.ts +10 -0
- package/dist/tabs/index.mjs +2 -0
- package/dist/tabs/index.mjs.map +1 -0
- package/dist/toast/index.d.ts +20 -0
- package/dist/toast/index.mjs +2 -0
- package/dist/toast/index.mjs.map +1 -0
- package/dist/tooltip/index.d.ts +10 -0
- package/dist/tooltip/index.mjs +2 -0
- package/dist/tooltip/index.mjs.map +1 -0
- package/package.json +3 -3
@@ -0,0 +1,2 @@
|
|
1
|
+
import*as e from"react";import t,{createContext as n,useContext as r,useCallback as o,useRef as a,useLayoutEffect as i,useState as s,useEffect as d,useMemo as c}from"react";import{c as u}from"./utils-Dd3mX7Lt.mjs";import{C as l}from"./chevron-left-yZO8_iYx.mjs";import{C as f}from"./chevron-right-DX1OAykB.mjs";import{b as h}from"./button-C25JgpF1.mjs";var m,y,p,g;!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"}(m||(m={})),function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"}(y||(y={})),function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"}(p||(p={})),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"}(g||(g={}));const b={},w={};function v(e,t){try{var n,r;const o=((n=b)[r=e]||(n[r]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return o in w?w[o]:k(o,o.split(":"))}catch{if(e in w)return w[e];const t=e?.match(M);return t?k(e,t.slice(1)):NaN}}const M=/([+-]\d\d):?(\d\d)?/;function k(e,t){const n=+t[0],r=+(t[1]||0);return w[e]=n>0?60*n+r:60*n-r}class D extends Date{static tz(e,...t){return t.length?new D(...t,e):new D(Date.now(),e)}withTimeZone(e){return new D(+this,e)}getTimezoneOffset(){return-v(this.timeZone,this)}setTime(e){return Date.prototype.setTime.apply(this,arguments),N(this),+this}[Symbol.for("constructDateFrom")](e){return new D(+new Date(e),this.timeZone)}constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(v(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),W(this),N(this)):this.setTime(Date.now())}}const O=/^(get|set)(?!UTC)/;function N(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function W(e){const t=v(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),o=r- -new Date(+n).getTimezoneOffset(),a=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();o&&a&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+o);const i=r-t;i&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+i);const s=v(e.timeZone,e),d=-new Date(+e).getTimezoneOffset()-s-i;if(s!==t&&d){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+d);const t=s-v(e.timeZone,e);t&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+t),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+t))}}Object.getOwnPropertyNames(Date.prototype).forEach((e=>{if(!O.test(e))return;const t=e.replace(O,"$1UTC");D.prototype[t]&&(e.startsWith("get")?D.prototype[e]=function(){return this.internal[t]()}:(D.prototype[e]=function(){var e;return Date.prototype[t].apply(this.internal,arguments),e=this,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()),W(e),+this},D.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),N(this),+this}))}));class S extends D{static tz(e,...t){return t.length?new S(...t,e):new S(Date.now(),e)}toISOString(){const[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[e,t,n,r]=this.internal.toUTCString().split(" ");return`${e?.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){const e=this.internal.toUTCString().split(" ")[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${o=this.timeZone,a=this,new Intl.DateTimeFormat("en-GB",{timeZone:o,timeZoneName:"long"}).format(a).slice(12)})`;var o,a}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){const e=this.getTimezoneOffset();return[e>0?"-":"+",String(Math.floor(Math.abs(e)/60)).padStart(2,"0"),String(Math.abs(e)%60).padStart(2,"0")]}withTimeZone(e){return new S(+this,e)}[Symbol.for("constructDateFrom")](e){return new S(+new Date(e),this.timeZone)}}const C=6048e5,x=Symbol.for("constructDateFrom");function E(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&x in e?e[x](t):e instanceof Date?new e.constructor(t):new Date(t)}function T(e,t){return E(t||e,e)}function Y(e,t,n){const r=T(e,n?.in);return isNaN(t)?E(e,NaN):t?(r.setDate(r.getDate()+t),r):r}function _(e,t,n){const r=T(e,n?.in);if(isNaN(t))return E(e,NaN);if(!t)return r;const o=r.getDate(),a=E(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);return o>=a.getDate()?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let P={};function L(){return P}function B(e,t){const n=L(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=T(e,t?.in),a=o.getDay(),i=(a<r?7:0)+a-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function F(e,t){return B(e,{...t,weekStartsOn:1})}function H(e,t){const n=T(e,t?.in),r=n.getFullYear(),o=E(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=F(o),i=E(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const s=F(i);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function I(e){const t=T(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 q(e,...t){const n=E.bind(null,t.find((e=>"object"==typeof e)));return t.map(n)}function A(e,t){const n=T(e,t?.in);return n.setHours(0,0,0,0),n}function j(e,t,n){const[r,o]=q(0,e,t),a=A(r),i=A(o),s=+a-I(a),d=+i-I(i);return Math.round((s-d)/864e5)}function z(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function $(e,t){const{start:n,end:r}=function(e,t){const[n,r]=q(0,t.start,t.end);return{start:n,end:r}}(0,e);let o=+n>+r;const a=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setDate(1);const s=[];for(;+i<=a;)s.push(E(n,i)),i.setMonth(i.getMonth()+1);return o?s.reverse():s}function U(e,t){const n=T(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Z(e,t){const n=L(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=T(e,t?.in),a=o.getDay(),i=6+(a<r?-7:0)-(a-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}const G={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"}};function Q(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const R={date:Q({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Q({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Q({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},X={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function J(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function K(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const i=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(s)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(s,(e=>e.test(i))):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(s,(e=>e.test(i)));let c;c=e.valueCallback?e.valueCallback(d):d,c=n.valueCallback?n.valueCallback(c):c;return{value:c,rest:t.slice(i.length)}}}function V(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=n.valueCallback?n.valueCallback(i):i;return{value:i,rest:t.slice(o.length)}}}const ee={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=G[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:R,formatRelative:(e,t,n,r)=>X[e],localize:{ordinalNumber:(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"},era:J({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:J({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:J({values:{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"]},defaultWidth:"wide"}),day:J({values:{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"]},defaultWidth:"wide"}),dayPeriod:J({values:{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"}},defaultWidth:"wide",formattingValues:{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"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:V({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:K({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:K({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:K({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{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]},defaultParseWidth:"any"}),day:K({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{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]},defaultParseWidth:"any"}),dayPeriod:K({matchPatterns:{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},defaultMatchWidth:"any",parsePatterns:{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}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function te(e,t){const n=T(e,t?.in),r=+F(n)-+function(e,t){const n=H(e,t),r=E(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),F(r)}(n);return Math.round(r/C)+1}function ne(e,t){const n=T(e,t?.in),r=n.getFullYear(),o=L(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=E(t?.in||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const s=B(i,t),d=E(t?.in||e,0);d.setFullYear(r,0,a),d.setHours(0,0,0,0);const c=B(d,t);return+n>=+s?r+1:+n>=+c?r:r-1}function re(e,t){const n=T(e,t?.in),r=+B(n,t)-+function(e,t){const n=L(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=ne(e,t),a=E(t?.in||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),B(a,t)}(n,t);return Math.round(r/C)+1}function oe(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const ae={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return oe("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):oe(n+1,2)},d:(e,t)=>oe(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];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>oe(e.getHours()%12||12,t.length),H:(e,t)=>oe(e.getHours(),t.length),m:(e,t)=>oe(e.getMinutes(),t.length),s:(e,t)=>oe(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return oe(Math.trunc(r*Math.pow(10,n-3)),t.length)}},ie="midnight",se="noon",de="morning",ce="afternoon",ue="evening",le="night",fe={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"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return ae.y(e,t)},Y:function(e,t,n,r){const o=ne(e,r),a=o>0?o:1-o;if("YY"===t){return oe(a%100,2)}return"Yo"===t?n.ordinalNumber(a,{unit:"year"}):oe(a,t.length)},R:function(e,t){return oe(H(e),t.length)},u:function(e,t){return oe(e.getFullYear(),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 oe(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"});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 oe(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"});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 ae.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"});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 oe(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"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=re(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):oe(o,t.length)},I:function(e,t,n){const r=te(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):oe(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):ae.d(e,t)},D:function(e,t,n){const r=function(e,t){const n=T(e,t?.in);return j(n,U(n))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):oe(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"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return oe(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return oe(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return oe(o,t.length);case"io":return n.ordinalNumber(o,{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"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?se:0===r?ie:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?ue:r>=12?ce:r>=4?de:le,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return ae.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):ae.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):oe(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):oe(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ae.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ae.s(e,t)},S:function(e,t){return ae.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return me(r);case"XXXX":case"XX":return ye(r);default:return ye(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return me(r);case"xxxx":case"xx":return ye(r);default:return ye(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+he(r,":");default:return"GMT"+ye(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+he(r,":");default:return"GMT"+ye(r,":")}},t:function(e,t,n){return oe(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return oe(+e,t.length)}};function he(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return 0===a?n+String(o):n+String(o)+t+oe(a,2)}function me(e,t){if(e%60==0){return(e>0?"-":"+")+oe(Math.abs(e)/60,2)}return ye(e,t)}function ye(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+oe(Math.trunc(r/60),2)+t+oe(r%60,2)}const pe=(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"});default:return t.date({width:"full"})}},ge=(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"});default:return t.time({width:"full"})}},be={p:ge,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return pe(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"})}return a.replace("{{date}}",pe(r,t)).replace("{{time}}",ge(o,t))}},we=/^D+$/,ve=/^Y+$/,Me=["D","DD","YY","YYYY"];const ke=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,De=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Oe=/^'([^]*?)'?$/,Ne=/''/g,We=/[a-zA-Z]/;function Se(e,t,n){const r=L(),o=n?.locale??r.locale??ee,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=T(e,n?.in);if(!function(e){return!(!z(e)&&"number"!=typeof e||isNaN(+T(e)))}(s))throw new RangeError("Invalid time value");let d=t.match(De).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,be[t])(e,o.formatLong)}return e})).join("").match(ke).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Ce(e)};if(fe[t])return{isToken:!0,value:e};if(t.match(We))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));o.localize.preprocessor&&(d=o.localize.preprocessor(s,d));const c={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return d.map((r=>{if(!r.isToken)return r.value;const a=r.value;(!n?.useAdditionalWeekYearTokens&&function(e){return ve.test(e)}(a)||!n?.useAdditionalDayOfYearTokens&&function(e){return we.test(e)}(a))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"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`}(e,t,n);if(console.warn(r),Me.includes(e))throw new RangeError(r)}(a,t,String(e));return(0,fe[a[0]])(s,a,o.localize,c)})).join("")}function Ce(e){const t=e.match(Oe);return t?t[1].replace(Ne,"'"):e}function xe(e,t,n){const r=T(e,n?.in),o=r.getFullYear(),a=r.getDate(),i=E(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const s=function(e,t){const n=T(e,t?.in),r=n.getFullYear(),o=n.getMonth(),a=E(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}(i);return r.setMonth(t,Math.min(a,s)),r}function Ee(e,t){const n=t.startOfMonth(e),r=n.getDay();return 1===r?n:0===r?t.addDays(n,-6):t.addDays(n,-1*(r-1))}class Te{getDigitMap(){const{numerals:e="latn"}=this.options,t=new Intl.NumberFormat("en-US",{numberingSystem:e}),n={};for(let e=0;e<10;e++)n[e.toString()]=t.format(e);return n}replaceDigits(e){const t=this.getDigitMap();return e.replace(/\d/g,(e=>t[e]||e))}formatNumber(e){return this.replaceDigits(e.toString())}constructor(e,t){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?S.tz(this.options.timeZone):new this.Date,this.newDate=(e,t,n)=>this.overrides?.newDate?this.overrides.newDate(e,t,n):this.options.timeZone?new S(e,t,n,this.options.timeZone):new Date(e,t,n),this.addDays=(e,t)=>this.overrides?.addDays?.(e,t)??Y(e,t),this.addMonths=(e,t)=>this.overrides?.addMonths?.(e,t)??_(e,t),this.addWeeks=(e,t)=>this.overrides?.addWeeks?.(e,t)??function(e,t,n){return Y(e,7*t,n)}(e,t),this.addYears=(e,t)=>this.overrides?.addYears?.(e,t)??function(e,t,n){return _(e,12*t,n)}(e,t),this.differenceInCalendarDays=(e,t)=>this.overrides?.differenceInCalendarDays?.(e,t)??j(e,t),this.differenceInCalendarMonths=(e,t)=>this.overrides?.differenceInCalendarMonths?.(e,t)??function(e,t){const[n,r]=q(0,e,t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(e,t),this.eachMonthOfInterval=e=>this.overrides?.eachMonthOfInterval?.(e)??$(e),this.endOfBroadcastWeek=(e,t)=>this.overrides?.endOfBroadcastWeek?.(e,t)??function(e,t){const n=Ee(e,t),r=function(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,1-r),a=t.addDays(o,34);return t.getMonth(e)===t.getMonth(a)?5:4}(e,t);return t.addDays(n,7*r-1)}(e,this),this.endOfISOWeek=e=>this.overrides?.endOfISOWeek?.(e)??function(e,t){return Z(e,{...t,weekStartsOn:1})}(e),this.endOfMonth=e=>this.overrides?.endOfMonth?.(e)??function(e,t){const n=T(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}(e),this.endOfWeek=(e,t)=>this.overrides?.endOfWeek?.(e,t??this.options)??Z(e,t??this.options),this.endOfYear=e=>this.overrides?.endOfYear?.(e)??function(e,t){const n=T(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}(e),this.format=(e,t,n)=>{const r=this.overrides?.format?.(e,t,n??this.options)??Se(e,t,n??this.options);return this.options.numerals&&"latn"!==this.options.numerals?this.replaceDigits(r):r},this.getISOWeek=e=>this.overrides?.getISOWeek?.(e)??te(e),this.getMonth=e=>this.overrides?.getMonth?.(e)??function(e,t){return T(e,t?.in).getMonth()}(e),this.getYear=e=>this.overrides?.getYear?.(e)??function(e,t){return T(e,t?.in).getFullYear()}(e),this.getWeek=(e,t)=>this.overrides?.getWeek?.(e,t??this.options)??re(e,t??this.options),this.isAfter=(e,t)=>this.overrides?.isAfter?.(e,t)??function(e,t){return+T(e)>+T(t)}(e,t),this.isBefore=(e,t)=>this.overrides?.isBefore?.(e,t)??function(e,t){return+T(e)<+T(t)}(e,t),this.isDate=e=>this.overrides?.isDate?.(e)??z(e),this.isSameDay=(e,t)=>this.overrides?.isSameDay?.(e,t)??function(e,t){const[n,r]=q(0,e,t);return+A(n)==+A(r)}(e,t),this.isSameMonth=(e,t)=>this.overrides?.isSameMonth?.(e,t)??function(e,t){const[n,r]=q(0,e,t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}(e,t),this.isSameYear=(e,t)=>this.overrides?.isSameYear?.(e,t)??function(e,t){const[n,r]=q(0,e,t);return n.getFullYear()===r.getFullYear()}(e,t),this.max=e=>this.overrides?.max?.(e)??function(e,t){let n,r=t?.in;return e.forEach((e=>{r||"object"!=typeof e||(r=E.bind(null,e));const t=T(e,r);(!n||n<t||isNaN(+t))&&(n=t)})),E(r,n||NaN)}(e),this.min=e=>this.overrides?.min?.(e)??function(e,t){let n,r=t?.in;return e.forEach((e=>{r||"object"!=typeof e||(r=E.bind(null,e));const t=T(e,r);(!n||n>t||isNaN(+t))&&(n=t)})),E(r,n||NaN)}(e),this.setMonth=(e,t)=>this.overrides?.setMonth?.(e,t)??xe(e,t),this.setYear=(e,t)=>this.overrides?.setYear?.(e,t)??function(e,t,n){const r=T(e,n?.in);return isNaN(+r)?E(e,NaN):(r.setFullYear(t),r)}(e,t),this.startOfBroadcastWeek=(e,t)=>this.overrides?.startOfBroadcastWeek?.(e,t??this)??Ee(e,t??this),this.startOfDay=e=>this.overrides?.startOfDay?.(e)??A(e),this.startOfISOWeek=e=>this.overrides?.startOfISOWeek?.(e)??F(e),this.startOfMonth=e=>this.overrides?.startOfMonth?.(e)??function(e,t){const n=T(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}(e),this.startOfWeek=e=>this.overrides?.startOfWeek?.(e)??B(e,this.options),this.startOfYear=e=>this.overrides?.startOfYear?.(e)??U(e),this.options={locale:ee,...e},this.overrides=t}}const Ye=new Te;const _e=n(void 0);function Pe(){const e=r(_e);if(void 0===e)throw new Error("useDayPicker() must be used within a custom component.");return e}var Le=Object.freeze({__proto__:null,Button:function(e){return t.createElement("button",{...e})},CaptionLabel:function(e){return t.createElement("span",{...e})},Chevron:function(e){const{size:n=24,orientation:r="left",className:o}=e;return t.createElement("svg",{className:o,width:n,height:n,viewBox:"0 0 24 24"},"up"===r&&t.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),"down"===r&&t.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),"left"===r&&t.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),"right"===r&&t.createElement("polygon",{points:"8 18.612 14.1888889 12.5 8 6.37733333 9.91111111 4.5 18 12.5 9.91111111 20.5"}))},Day:function(e){const{day:n,modifiers:r,...o}=e;return t.createElement("td",{...o})},DayButton:function(e){const{day:n,modifiers:r,...o}=e,a=t.useRef(null);return t.useEffect((()=>{r.focused&&a.current?.focus()}),[r.focused]),t.createElement("button",{ref:a,...o})},Dropdown:function(e){const{options:n,className:r,components:o,classNames:a,...i}=e,s=[a[m.Dropdown],r].join(" "),d=n?.find((({value:e})=>e===i.value));return t.createElement("span",{"data-disabled":i.disabled,className:a[m.DropdownRoot]},t.createElement(o.Select,{className:s,...i},n?.map((({value:e,label:n,disabled:r})=>t.createElement(o.Option,{key:e,value:e,disabled:r},n)))),t.createElement("span",{className:a[m.CaptionLabel],"aria-hidden":!0},d?.label,t.createElement(o.Chevron,{orientation:"down",size:18,className:a[m.Chevron]})))},DropdownNav:function(e){return t.createElement("div",{...e})},Footer:function(e){return t.createElement("div",{...e})},Month:function(e){const{calendarMonth:n,displayIndex:r,...o}=e;return t.createElement("div",{...o},e.children)},MonthCaption:function(e){const{calendarMonth:n,displayIndex:r,...o}=e;return t.createElement("div",{...o})},MonthGrid:function(e){return t.createElement("table",{...e})},Months:function(e){return t.createElement("div",{...e})},MonthsDropdown:function(e){const{components:n}=Pe();return t.createElement(n.Dropdown,{...e})},Nav:function(e){const{onPreviousClick:n,onNextClick:r,previousMonth:a,nextMonth:i,...s}=e,{components:d,classNames:c,labels:{labelPrevious:u,labelNext:l}}=Pe(),f=o((e=>{i&&r?.(e)}),[i,r]),h=o((e=>{a&&n?.(e)}),[a,n]);return t.createElement("nav",{...s},t.createElement(d.PreviousMonthButton,{type:"button",className:c[m.PreviousMonthButton],tabIndex:a?void 0:-1,"aria-disabled":!a||void 0,"aria-label":u(a),onClick:h},t.createElement(d.Chevron,{disabled:!a||void 0,className:c[m.Chevron],orientation:"left"})),t.createElement(d.NextMonthButton,{type:"button",className:c[m.NextMonthButton],tabIndex:i?void 0:-1,"aria-disabled":!i||void 0,"aria-label":l(i),onClick:f},t.createElement(d.Chevron,{disabled:!i||void 0,orientation:"right",className:c[m.Chevron]})))},NextMonthButton:function(e){const{components:n}=Pe();return t.createElement(n.Button,{...e})},Option:function(e){return t.createElement("option",{...e})},PreviousMonthButton:function(e){const{components:n}=Pe();return t.createElement(n.Button,{...e})},Root:function(e){const{rootRef:n,...r}=e;return t.createElement("div",{...r,ref:n})},Select:function(e){return t.createElement("select",{...e})},Week:function(e){const{week:n,...r}=e;return t.createElement("tr",{...r})},WeekNumber:function(e){const{week:n,...r}=e;return t.createElement("th",{...r})},WeekNumberHeader:function(e){return t.createElement("th",{...e})},Weekday:function(e){return t.createElement("th",{...e})},Weekdays:function(e){return t.createElement("thead",{"aria-hidden":!0},t.createElement("tr",{...e}))},Weeks:function(e){return t.createElement("tbody",{...e})},YearsDropdown:function(e){const{components:n}=Pe();return t.createElement(n.Dropdown,{...e})}});function Be(e){return{...Le,...e}}function Fe(){const e={};for(const t in m)e[m[t]]=`rdp-${m[t]}`;for(const t in y)e[y[t]]=`rdp-${y[t]}`;for(const t in p)e[p[t]]=`rdp-${p[t]}`;for(const t in g)e[g[t]]=`rdp-${g[t]}`;return e}function He(e,t,n){return(n??new Te(t)).format(e,"LLLL y")}const Ie=He;function qe(e,t=Ye){return t.format(e,"yyyy")}const Ae=qe;var je=Object.freeze({__proto__:null,formatCaption:He,formatDay:function(e,t,n){return(n??new Te(t)).format(e,"d")},formatMonthCaption:Ie,formatMonthDropdown:function(e,t=Ye){return t.format(e,"LLLL")},formatWeekNumber:function(e){return e<10?`0${e.toLocaleString()}`:`${e.toLocaleString()}`},formatWeekNumberHeader:function(){return""},formatWeekdayName:function(e,t,n){return(n??new Te(t)).format(e,"cccccc")},formatYearCaption:Ae,formatYearDropdown:qe});function ze(e,t,n){return(n??new Te(t)).format(e,"LLLL y")}const $e=ze;function Ue(e,t,n,r){let o=(r??new Te(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const Ze=Ue;var Ge=Object.freeze({__proto__:null,labelCaption:$e,labelDay:Ze,labelDayButton:Ue,labelGrid:ze,labelGridcell:function(e,t,n,r){let o=(r??new Te(n)).format(e,"PPPP");return t?.today&&(o=`Today, ${o}`),o},labelMonthDropdown:function(e){return"Choose the Month"},labelNav:function(){return""},labelNext:function(e){return"Go to the Next Month"},labelPrevious:function(e){return"Go to the Previous Month"},labelWeekNumber:function(e,t){return`Week ${e}`},labelWeekNumberHeader:function(e){return"Week Number"},labelWeekday:function(e,t,n){return(n??new Te(t)).format(e,"cccc")},labelYearDropdown:function(e){return"Choose the Year"}});function Qe(e,t){const{month:n,defaultMonth:r,today:o=t.today(),numberOfMonths:a=1,endMonth:i,startMonth:s}=e;let d=n||r||o;const{differenceInCalendarMonths:c,addMonths:u,startOfMonth:l}=t;if(i&&c(i,d)<0){d=u(i,-1*(a-1))}return s&&c(d,s)<0&&(d=s),l(d)}class Re{isEqualTo(e){return this.dateLib.isSameDay(e.date,this.date)&&this.dateLib.isSameMonth(e.displayMonth,this.displayMonth)}constructor(e,t,n=Ye){this.date=e,this.displayMonth=t,this.outside=Boolean(t&&!n.isSameMonth(e,t)),this.dateLib=n}}class Xe{constructor(e,t){this.date=e,this.weeks=t}}class Je{constructor(e,t){this.days=t,this.weekNumber=e}}function Ke(e,t){const[n,r]=s(e);return[void 0===t?n:t,r]}function Ve(e,t){const[n,r]=function(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:i,endOfMonth:s,addYears:d,endOfYear:c,newDate:u,today:l}=t,{fromYear:f,toYear:h,fromMonth:m,toMonth:y}=e;!n&&m&&(n=m),!n&&f&&(n=t.newDate(f,0,1)),!r&&y&&(r=y),!r&&h&&(r=u(h,11,31));const p="dropdown"===e.captionLayout||"dropdown-years"===e.captionLayout;return n?n=i(n):f?n=u(f,0,1):!n&&p&&(n=o(d(e.today??l(),-100))),r?r=s(r):h?r=u(h,11,31):!r&&p&&(r=c(e.today??l())),[n?a(n):n,r?a(r):r]}(e,t),{startOfMonth:o,endOfMonth:a}=t,i=Qe(e,t),[s,c]=Ke(i,e.month?i:void 0);d((()=>{const n=Qe(e,t);c(n)}),[e.timeZone]);const u=function(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let n=0;n<o;n++){const o=r.addMonths(e,n);if(t&&o>t)break;a.push(o)}return a}(s,r,e,t),l=function(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:i,fixedWeeks:s,broadcastCalendar:d}=n??{},{addDays:c,differenceInCalendarDays:u,differenceInCalendarMonths:l,endOfBroadcastWeek:f,endOfISOWeek:h,endOfMonth:m,endOfWeek:y,isAfter:p,startOfBroadcastWeek:g,startOfISOWeek:b,startOfWeek:w}=r,v=d?g(o,r):i?b(o):w(o),M=u(d?f(a,r):i?h(m(a)):y(m(a)),v),k=l(a,o)+1,D=[];for(let e=0;e<=M;e++){const n=c(v,e);if(t&&p(n,t))break;D.push(n)}const O=(d?35:42)*k;if(s&&D.length<O){const e=O-D.length;for(let t=0;t<e;t++){const e=c(D[D.length-1],1);D.push(e)}}return D}(u,e.endMonth?a(e.endMonth):void 0,e,t),f=function(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:i,endOfMonth:s,endOfWeek:d,getISOWeek:c,getWeek:u,startOfBroadcastWeek:l,startOfISOWeek:f,startOfWeek:h}=r,m=e.reduce(((e,m)=>{const y=n.broadcastCalendar?l(m,r):n.ISOWeek?f(m):h(m),p=n.broadcastCalendar?a(m,r):n.ISOWeek?i(s(m)):d(s(m)),g=t.filter((e=>e>=y&&e<=p)),b=n.broadcastCalendar?35:42;if(n.fixedWeeks&&g.length<b){const e=t.filter((e=>{const t=b-g.length;return e>p&&e<=o(p,t)}));g.push(...e)}const w=g.reduce(((e,t)=>{const o=n.ISOWeek?c(t):u(t),a=e.find((e=>e.weekNumber===o)),i=new Re(t,m,r);return a?a.days.push(i):e.push(new Je(o,[i])),e}),[]),v=new Xe(m,w);return e.push(v),e}),[]);return n.reverseMonths?m.reverse():m}(u,l,e,t),h=function(e){return e.reduce(((e,t)=>[...e,...t.weeks]),[])}(f),m=f.reduce(((e,t)=>[...e,...t.weeks.reduce(((e,t)=>[...e,...t.days]),[])]),[]);const y=function(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:d}=r,c=o?a??1:1,u=i(e);return t&&d(u,t)<=0?void 0:s(u,-c)}(s,n,e,t),p=function(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:d}=r,c=o?a:1,u=i(e);return t&&d(t,e)<a?void 0:s(u,c)}(s,r,e,t),{disableNavigation:g,onMonthChange:b}=e,w=e=>{if(g)return;let t=o(e);n&&t<o(n)&&(t=o(n)),r&&t>o(r)&&(t=o(r)),c(t),b?.(t)};return{months:f,weeks:h,days:m,navStart:n,navEnd:r,previousMonth:y,nextMonth:p,goToMonth:w,goToDay:e=>{(e=>h.some((t=>t.days.some((t=>t.isEqualTo(e))))))(e)||w(e.date)}}}function et(e,t,n=!1,r=Ye){let{from:o,to:a}=e;const{differenceInCalendarDays:i,isSameDay:s}=r;if(o&&a){i(a,o)<0&&([o,a]=[a,o]);return i(t,o)>=(n?1:0)&&i(a,t)>=(n?1:0)}return!n&&a?s(a,t):!(n||!o)&&s(o,t)}function tt(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}function nt(e){return Boolean(e&&"object"==typeof e&&"from"in e)}function rt(e){return Boolean(e&&"object"==typeof e&&"after"in e)}function ot(e){return Boolean(e&&"object"==typeof e&&"before"in e)}function at(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}function it(e,t){return Array.isArray(e)&&e.every(t.isDate)}function st(e,t,n=Ye){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:i}=n;return r.some((t=>{if("boolean"==typeof t)return t;if(n.isDate(t))return o(e,t);if(it(t,n))return t.includes(e);if(nt(t))return et(t,e,!1,n);if(at(t))return Array.isArray(t.dayOfWeek)?t.dayOfWeek.includes(e.getDay()):t.dayOfWeek===e.getDay();if(tt(t)){const n=a(t.before,e)>0,r=a(t.after,e)<0;return i(t.before,t.after)?r&&n:n||r}return rt(t)?a(e,t.after)>0:ot(t)?a(t.before,e)>0:"function"==typeof t&&t(e)}))}function dt(e,t,n,r,o,a,i,s=0){if(s>365)return;const d=function(e,t,n,r,o,a,i){const{ISOWeek:s,broadcastCalendar:d}=a,{addDays:c,addMonths:u,addWeeks:l,addYears:f,endOfBroadcastWeek:h,endOfISOWeek:m,endOfWeek:y,max:p,min:g,startOfBroadcastWeek:b,startOfISOWeek:w,startOfWeek:v}=i;let M={day:c,week:l,month:u,year:f,startOfWeek:e=>d?b(e,i):s?w(e):v(e),endOfWeek:e=>d?h(e,i):s?m(e):y(e)}[e](n,"after"===t?1:-1);return"before"===t&&r?M=p([r,M]):"after"===t&&o&&(M=g([o,M])),M}(e,t,n.date,r,o,a,i),c=Boolean(a.disabled&&st(d,a.disabled,i)),u=Boolean(a.hidden&&st(d,a.hidden,i)),l=new Re(d,d,i);return c||u?dt(e,t,l,r,o,a,i,s+1):l}function ct(e,t,n,r,o){const{autoFocus:a}=e,[i,d]=s(),c=function(e,t,n,r){let o,a=0,i=!1;for(;a<e.length&&!i;){const s=e[a],d=t(s);d[y.disabled]||d[y.hidden]||d[y.outside]||(d[y.focused]||r?.isEqualTo(s)||n(s.date)||d[y.today])&&(o=s,i=!0),a++}return o||(o=e.find((e=>{const n=t(e);return!n[y.disabled]&&!n[y.hidden]&&!n[y.outside]}))),o}(t.days,n,r||(()=>!1),i),[u,l]=s(a?c:void 0);return{isFocusTarget:e=>Boolean(c?.isEqualTo(e)),setFocused:l,focused:u,blur:()=>{d(u),l(void 0)},moveFocus:(n,r)=>{if(!u)return;const a=dt(n,r,u,t.navStart,t.navEnd,e,o);a&&(t.goToDay(a),l(a))}}}function ut(e,t,n=Ye){return et(e,t.from,!1,n)||et(e,t.to,!1,n)||et(t,e.from,!1,n)||et(t,e.to,!1,n)}function lt(e,t,n=Ye){const r=Array.isArray(t)?t:[t];if(r.filter((e=>"function"!=typeof e)).some((t=>{if("boolean"==typeof t)return t;if(n.isDate(t))return et(e,t,!1,n);if(it(t,n))return t.some((t=>et(e,t,!1,n)));if(nt(t))return!(!t.from||!t.to)&&ut(e,{from:t.from,to:t.to},n);if(at(t))return function(e,t,n=Ye){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),i=Math.min(a,6);for(let e=0;e<=i;e++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}(e,t.dayOfWeek,n);if(tt(t)){return n.isAfter(t.before,t.after)?ut(e,{from:n.addDays(t.after,1),to:n.addDays(t.before,-1)},n):st(e.from,t,n)||st(e.to,t,n)}return!(!rt(t)&&!ot(t))&&(st(e.from,t,n)||st(e.to,t,n))})))return!0;const o=r.filter((e=>"function"==typeof e));if(o.length){let t=e.from;const r=n.differenceInCalendarDays(e.to,e.from);for(let e=0;e<=r;e++){if(o.some((e=>e(t))))return!0;t=n.addDays(t,1)}}return!1}function ft(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:i}=e,[s,d]=Ke(o,i?o:void 0),c=i?o:s;return{selected:c,select:(o,s,u)=>{const{min:l,max:f}=e,h=o?function(e,t,n=0,r=0,o=!1,a=Ye){const{from:i,to:s}=t||{},{isSameDay:d,isAfter:c,isBefore:u}=a;let l;if(i||s){if(i&&!s)l=d(i,e)?o?{from:i,to:void 0}:void 0:u(e,i)?{from:e,to:i}:{from:i,to:e};else if(i&&s)if(d(i,e)&&d(s,e))l=o?{from:i,to:s}:void 0;else if(d(i,e))l={from:i,to:n>0?void 0:e};else if(d(s,e))l={from:e,to:n>0?void 0:e};else if(u(e,i))l={from:e,to:s};else if(c(e,i))l={from:i,to:e};else{if(!c(e,s))throw new Error("Invalid range");l={from:i,to:e}}}else l={from:e,to:n>0?void 0:e};if(l?.from&&l?.to){const t=a.differenceInCalendarDays(l.to,l.from);(r>0&&t>r||n>1&&t<n)&&(l={from:e,to:void 0})}return l}(o,c,l,f,a,t):void 0;return r&&n&&h?.from&&h.to&<({from:h.from,to:h.to},n,t)&&(h.from=o,h.to=void 0),i||d(h),i?.(h,o,s,u),h},isSelected:e=>c&&et(c,e,!1,t)}}function ht(e,t){const n=function(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=Ke(n,o?n:void 0),s=o?n:a,{isSameDay:d}=t;return{selected:s,select:(e,t,n)=>{let a=e;return!r&&s&&s&&d(e,s)&&(a=void 0),o||i(a),o?.(a,e,t,n),a},isSelected:e=>!!s&&d(s,e)}}(e,t),r=function(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=Ke(n,o?n:void 0),s=o?n:a,{isSameDay:d}=t,c=e=>s?.some((t=>d(t,e)))??!1,{min:u,max:l}=e;return{selected:s,select:(e,t,n)=>{let a=[...s??[]];if(c(e)){if(s?.length===u)return;if(r&&1===s?.length)return;a=s?.filter((t=>!d(t,e)))}else a=s?.length===l?[e]:[...a,e];return o||i(a),o?.(a,e,t,n),a},isSelected:c}}(e,t),o=ft(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function mt(e){const{components:n,formatters:r,labels:s,dateLib:d,locale:u,classNames:l}=c((()=>{const t={...ee,...e.locale};return{dateLib:new Te({locale:t,weekStartsOn:e.broadcastCalendar?1:e.weekStartsOn,firstWeekContainsDate:e.firstWeekContainsDate,useAdditionalWeekYearTokens:e.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:e.useAdditionalDayOfYearTokens,timeZone:e.timeZone,numerals:e.numerals},e.dateLib),components:Be(e.components),formatters:(n=e.formatters,n?.formatMonthCaption&&!n.formatCaption&&(n.formatCaption=n.formatMonthCaption),n?.formatYearCaption&&!n.formatYearDropdown&&(n.formatYearDropdown=n.formatYearCaption),{...je,...n}),labels:{...Ge,...e.labels},locale:t,classNames:{...Fe(),...e.classNames}};var n}),[e.locale,e.broadcastCalendar,e.weekStartsOn,e.firstWeekContainsDate,e.useAdditionalWeekYearTokens,e.useAdditionalDayOfYearTokens,e.timeZone,e.numerals,e.dateLib,e.components,e.formatters,e.labels,e.classNames]),{captionLayout:f,mode:h,onDayBlur:b,onDayClick:w,onDayFocus:v,onDayKeyDown:M,onDayMouseEnter:k,onDayMouseLeave:D,onNextClick:O,onPrevClick:N,showWeekNumber:W,styles:S}=e,{formatCaption:C,formatDay:x,formatMonthDropdown:E,formatWeekNumber:T,formatWeekNumberHeader:Y,formatWeekdayName:_,formatYearDropdown:P}=r,L=Ve(e,d),{days:B,months:F,navStart:H,navEnd:I,previousMonth:q,nextMonth:A,goToMonth:j}=L,z=function(e,t,n){const{disabled:r,hidden:o,modifiers:a,showOutsideDays:i,broadcastCalendar:s,today:d}=t,{isSameDay:c,isSameMonth:u,startOfMonth:l,isBefore:f,endOfMonth:h,isAfter:m}=n,p=t.startMonth&&l(t.startMonth),g=t.endMonth&&h(t.endMonth),b={[y.focused]:[],[y.outside]:[],[y.disabled]:[],[y.hidden]:[],[y.today]:[]},w={};for(const t of e){const{date:e,displayMonth:l}=t,h=Boolean(l&&!u(e,l)),y=Boolean(p&&f(e,p)),v=Boolean(g&&m(e,g)),M=Boolean(r&&st(e,r,n)),k=Boolean(o&&st(e,o,n))||y||v||!s&&!i&&h||s&&!1===i&&h,D=c(e,d??n.today());h&&b.outside.push(t),M&&b.disabled.push(t),k&&b.hidden.push(t),D&&b.today.push(t),a&&Object.keys(a).forEach((r=>{const o=a?.[r];o&&st(e,o,n)&&(w[r]?w[r].push(t):w[r]=[t])}))}return e=>{const t={[y.focused]:!1,[y.disabled]:!1,[y.hidden]:!1,[y.outside]:!1,[y.today]:!1},n={};for(const n in b){const r=b[n];t[n]=r.some((t=>t===e))}for(const t in w)n[t]=w[t].some((t=>t===e));return{...t,...n}}}(B,e,d),{isSelected:$,select:U,selected:Z}=ht(e,d)??{},{blur:G,focused:Q,isFocusTarget:R,moveFocus:X,setFocused:J}=ct(e,L,z,$??(()=>!1),d),{labelDayButton:K,labelGridcell:V,labelGrid:te,labelMonthDropdown:ne,labelNav:re,labelWeekday:oe,labelWeekNumber:ae,labelWeekNumberHeader:ie,labelYearDropdown:se}=s,de=c((()=>function(e,t){const n=e.today(),r=t?e.startOfISOWeek(n):e.startOfWeek(n),o=[];for(let t=0;t<7;t++){const n=e.addDays(r,t);o.push(n)}return o}(d,e.ISOWeek)),[d,e.ISOWeek]),ce=void 0!==h||void 0!==w,ue=o((()=>{q&&(j(q),N?.(q))}),[q,j,N]),le=o((()=>{A&&(j(A),O?.(A))}),[j,A,O]),fe=o(((e,t)=>n=>{n.preventDefault(),n.stopPropagation(),J(e),U?.(e.date,t,n),w?.(e.date,t,n)}),[U,w,J]),he=o(((e,t)=>n=>{J(e),v?.(e.date,t,n)}),[v,J]),me=o(((e,t)=>n=>{G(),b?.(e.date,t,n)}),[G,b]),ye=o(((t,n)=>r=>{const o={ArrowLeft:["day","rtl"===e.dir?"after":"before"],ArrowRight:["day","rtl"===e.dir?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[r.shiftKey?"year":"month","before"],PageDown:[r.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(o[r.key]){r.preventDefault(),r.stopPropagation();const[e,t]=o[r.key];X(e,t)}M?.(t.date,n,r)}),[X,M,e.dir]),pe=o(((e,t)=>n=>{k?.(e.date,t,n)}),[k]),ge=o(((e,t)=>n=>{D?.(e.date,t,n)}),[D]),be=o((e=>t=>{const n=Number(t.target.value),r=d.setMonth(d.startOfMonth(e),n);j(r)}),[d,j]),we=o((e=>t=>{const n=Number(t.target.value),r=d.setYear(d.startOfMonth(e),n);j(r)}),[d,j]),{className:ve,style:Me}=c((()=>({className:[l[m.Root],e.className].filter(Boolean).join(" "),style:{...S?.[m.Root],...e.style}})),[l,e.className,e.style,S]),ke=function(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};return Object.entries(e).forEach((([e,n])=>{e.startsWith("data-")&&(t[e]=n)})),t}(e),De=a(null);!function(e,t,{classNames:n,months:r,focused:o,dateLib:s}){const d=a(null),c=a(r),u=a(!1);i((()=>{const a=c.current;if(c.current=r,!(t&&e.current&&e.current instanceof HTMLElement))return;const i=d.current,l=e.current.cloneNode(!0);if(l instanceof HTMLElement?([...l.querySelectorAll("[data-animated-month]")??[]].forEach((e=>{const t=e.querySelector("[data-animated-month]");t&&e.contains(t)&&e.removeChild(t)})),d.current=l):d.current=null,0===r.length||0===a.length||r.length!==a.length||o||u.current)return;if(s.isSameMonth(r[0].date,a[0].date))return;const f=[...i?.querySelectorAll("[data-animated-month]")??[]],h=[...e.current.querySelectorAll("[data-animated-month]")??[]];if(h&&h.every((e=>e instanceof HTMLElement))&&f&&f.every((e=>e instanceof HTMLElement))){u.current=!0;const e=s.isAfter(r[0].date,a[0].date);h.forEach(((t,r)=>{const o=f[r];if(!o)return;const a=e?n[g.caption_after_enter]:n[g.caption_before_enter],i=e?n[g.weeks_after_enter]:n[g.weeks_before_enter];t.style.position="relative",t.style.overflow="hidden";const s=t.querySelector("[data-animated-caption]");s&&s instanceof HTMLElement&&s.classList.add(a);const d=t.querySelector("[data-animated-weeks]");d&&d instanceof HTMLElement&&d.classList.add(i);const c=()=>{u.current=!1,s&&s instanceof HTMLElement&&s.classList.remove(a),d&&d instanceof HTMLElement&&d.classList.remove(i),t.style.position="",t.style.overflow="",t.contains(o)&&t.removeChild(o)};o.style.pointerEvents="none",o.style.position="absolute",o.style.overflow="hidden",o.setAttribute("aria-hidden","true");const l=o.querySelector("[data-animated-weekdays]");l&&l instanceof HTMLElement&&(l.style.opacity="0");const h=o.querySelector("[data-animated-caption]");h&&h instanceof HTMLElement&&(h.classList.add(e?n[g.caption_before_exit]:n[g.caption_after_exit]),h.addEventListener("animationend",c));const m=o.querySelector("[data-animated-weeks]");m&&m instanceof HTMLElement&&m.classList.add(e?n[g.weeks_before_exit]:n[g.weeks_after_exit]),t.insertBefore(o,t.firstChild)}))}}))}(De,Boolean(e.animate),{classNames:l,months:F,focused:Q,dateLib:d});const Oe={dayPickerProps:e,selected:Z,select:U,isSelected:$,months:F,nextMonth:A,previousMonth:q,goToMonth:j,getModifiers:z,components:n,classNames:l,styles:S,labels:s,formatters:r};return t.createElement(_e.Provider,{value:Oe},t.createElement(n.Root,{rootRef:e.animate?De:void 0,className:ve,style:Me,dir:e.dir,id:e.id,lang:e.lang,nonce:e.nonce,title:e.title,role:e.role,"aria-label":e["aria-label"],...ke},t.createElement(n.Months,{className:l[m.Months],style:S?.[m.Months]},!e.hideNavigation&&t.createElement(n.Nav,{className:l[m.Nav],style:S?.[m.Nav],"aria-label":re(),onPreviousClick:ue,onNextClick:le,previousMonth:q,nextMonth:A}),F.map(((o,a)=>{const i=function(e,t,n,r,o){const{startOfMonth:a,startOfYear:i,endOfYear:s,eachMonthOfInterval:d,getMonth:c}=o;return d({start:i(e),end:s(e)}).map((e=>{const i=r.formatMonthDropdown(e,o);return{value:c(e),label:i,disabled:t&&e<a(t)||n&&e>a(n)||!1}}))}(o.date,H,I,r,d),s=function(e,t,n,r){if(!e)return;if(!t)return;const{startOfYear:o,endOfYear:a,addYears:i,getYear:s,isBefore:d,isSameYear:c}=r,u=o(e),l=a(t),f=[];let h=u;for(;d(h,l)||c(h,l);)f.push(h),h=i(h,1);return f.map((e=>{const t=n.formatYearDropdown(e,r);return{value:s(e),label:t,disabled:!1}}))}(H,I,r,d);return t.createElement(n.Month,{"data-animated-month":e.animate?"true":void 0,className:l[m.Month],style:S?.[m.Month],key:a,displayIndex:a,calendarMonth:o},t.createElement(n.MonthCaption,{"data-animated-caption":e.animate?"true":void 0,className:l[m.MonthCaption],style:S?.[m.MonthCaption],calendarMonth:o,displayIndex:a},f?.startsWith("dropdown")?t.createElement(n.DropdownNav,{className:l[m.Dropdowns],style:S?.[m.Dropdowns]},"dropdown"===f||"dropdown-months"===f?t.createElement(n.MonthsDropdown,{className:l[m.MonthsDropdown],"aria-label":ne(),classNames:l,components:n,disabled:Boolean(e.disableNavigation),onChange:be(o.date),options:i,style:S?.[m.Dropdown],value:d.getMonth(o.date)}):t.createElement("span",{role:"status","aria-live":"polite"},E(o.date,d)),"dropdown"===f||"dropdown-years"===f?t.createElement(n.YearsDropdown,{className:l[m.YearsDropdown],"aria-label":se(d.options),classNames:l,components:n,disabled:Boolean(e.disableNavigation),onChange:we(o.date),options:s,style:S?.[m.Dropdown],value:d.getYear(o.date)}):t.createElement("span",{role:"status","aria-live":"polite"},P(o.date,d))):t.createElement(n.CaptionLabel,{className:l[m.CaptionLabel],role:"status","aria-live":"polite"},C(o.date,d.options,d))),t.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":"multiple"===h||"range"===h,"aria-label":te(o.date,d.options,d)||void 0,className:l[m.MonthGrid],style:S?.[m.MonthGrid]},!e.hideWeekdays&&t.createElement(n.Weekdays,{"data-animated-weekdays":e.animate?"true":void 0,className:l[m.Weekdays],style:S?.[m.Weekdays]},W&&t.createElement(n.WeekNumberHeader,{"aria-label":ie(d.options),className:l[m.WeekNumberHeader],style:S?.[m.WeekNumberHeader],scope:"col"},Y()),de.map(((e,r)=>t.createElement(n.Weekday,{"aria-label":oe(e,d.options,d),className:l[m.Weekday],key:r,style:S?.[m.Weekday],scope:"col"},_(e,d.options,d))))),t.createElement(n.Weeks,{"data-animated-weeks":e.animate?"true":void 0,className:l[m.Weeks],style:S?.[m.Weeks]},o.weeks.map(((r,o)=>t.createElement(n.Week,{className:l[m.Week],key:r.weekNumber,style:S?.[m.Week],week:r},W&&t.createElement(n.WeekNumber,{week:r,style:S?.[m.WeekNumber],"aria-label":ae(r.weekNumber,{locale:u}),className:l[m.WeekNumber],scope:"row",role:"rowheader"},T(r.weekNumber)),r.days.map((r=>{const{date:o}=r,a=z(r);if(a[y.focused]=!a.hidden&&Boolean(Q?.isEqualTo(r)),a[p.selected]=$?.(o)||a.selected,nt(Z)){const{from:e,to:t}=Z;a[p.range_start]=Boolean(e&&t&&d.isSameDay(o,e)),a[p.range_end]=Boolean(e&&t&&d.isSameDay(o,t)),a[p.range_middle]=et(Z,o,!0,d)}const i=function(e,t={},n={}){let r={...t?.[m.Day]};return Object.entries(e).filter((([,e])=>!0===e)).forEach((([e])=>{r={...r,...n?.[e]}})),r}(a,S,e.modifiersStyles),s=function(e,t,n={}){return Object.entries(e).filter((([,e])=>!0===e)).reduce(((e,[r])=>(n[r]?e.push(n[r]):t[y[r]]?e.push(t[y[r]]):t[p[r]]&&e.push(t[p[r]]),e)),[t[m.Day]])}(a,l,e.modifiersClassNames),c=ce||a.hidden?void 0:V(o,a,d.options,d);return t.createElement(n.Day,{key:`${d.format(o,"yyyy-MM-dd")}_${d.format(r.displayMonth,"yyyy-MM")}`,day:r,modifiers:a,className:s.join(" "),style:i,role:"gridcell","aria-selected":a.selected||void 0,"aria-label":c,"data-day":d.format(o,"yyyy-MM-dd"),"data-month":r.outside?d.format(o,"yyyy-MM"):void 0,"data-selected":a.selected||void 0,"data-disabled":a.disabled||void 0,"data-hidden":a.hidden||void 0,"data-outside":r.outside||void 0,"data-focused":a.focused||void 0,"data-today":a.today||void 0},!a.hidden&&ce?t.createElement(n.DayButton,{className:l[m.DayButton],style:S?.[m.DayButton],type:"button",day:r,modifiers:a,disabled:a.disabled||void 0,tabIndex:R(r)?0:-1,"aria-label":K(o,a,d.options,d),onClick:fe(r,a),onBlur:me(r,a),onFocus:he(r,a),onKeyDown:ye(r,a),onMouseEnter:pe(r,a),onMouseLeave:ge(r,a)},x(o,d.options,d)):!a.hidden&&x(r.date,d.options,d))}))))))))}))),e.footer&&t.createElement(n.Footer,{className:l[m.Footer],style:S?.[m.Footer],role:"status","aria-live":"polite"},e.footer)))}function yt({className:t,classNames:n,showOutsideDays:r=!0,...o}){return e.createElement(mt,{showOutsideDays:r,className:u("p-3",t),classNames:{month:"space-y-4",months:"flex flex-col sm:flex-row space-y-4 sm:space-y-0 relative",month_caption:"flex justify-center pt-1 relative items-center",month_grid:"w-full border-collapse space-y-1",caption_label:"text-sm font-medium capitalize",nav:"flex items-center justify-between absolute inset-x-0",button_previous:u(h({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100 z-10"),button_next:u(h({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100 z-10"),weeks:"w-full border-collapse space-y-",weekdays:"flex",weekday:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem] capitalize",week:"flex w-full mt-2",day_button:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20 cursor-pointer disabled:cursor-default",day:u(h({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),range_end:"day-range-end",selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",today:"bg-accent text-accent-foreground",outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",disabled:"text-muted-foreground opacity-50",range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",hidden:"invisible",...n},components:{Chevron:({...t})=>"left"===t.orientation?e.createElement(l,{...t,className:"h-4 w-4"}):e.createElement(f,{...t,className:"h-4 w-4"})},...o})}yt.displayName="Calendar";export{yt as C,J as a,Q as b,K as c,V as d,Se as f,T as t};
|
2
|
+
//# sourceMappingURL=calendar-Bg8q2q0f.mjs.map
|