karsten-design-system 1.1.60 → 1.1.62

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.js CHANGED
@@ -13,10 +13,10 @@ import { Divider as Divider$1 } from 'primereact/divider';
13
13
  import { InputSwitch as InputSwitch$1 } from 'primereact/inputswitch';
14
14
  import { InputTextarea } from 'primereact/inputtextarea';
15
15
  import { Sidebar as Sidebar$1 } from 'primereact/sidebar';
16
- import { format } from 'date-fns';
17
16
  import { Paginator as Paginator$1 } from 'primereact/paginator';
18
17
  import { classNames } from 'primereact/utils';
19
18
  import { Skeleton as Skeleton$1 } from 'primereact/skeleton';
19
+ import ReactDOM from 'react-dom';
20
20
 
21
21
  function styleInject(css, ref) {
22
22
  if ( ref === void 0 ) ref = {};
@@ -45,7 +45,7 @@ function styleInject(css, ref) {
45
45
  }
46
46
  }
47
47
 
48
- var css_248z = "@layer tailwind-base, primereact, tailwind-utilities;@import \"primereact/resources/themes/lara-light-blue/theme.css\";@import \"primeicons/primeicons.css\";@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap\");@layer tailwind-base{*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }\r\n /*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid;box-sizing:border-box}:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}*{font-family:Roboto,sans-serif}}@layer tailwind-utilities{.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.p-calendar.p-invalid input::-moz-placeholder{color:#ec4a54!important}.p-calendar.p-invalid input::placeholder{color:#ec4a54!important}.p-calendar.p-custom input::-moz-placeholder{color:#a0a4b3!important}.p-calendar.p-custom input::placeholder{color:#a0a4b3!important}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-bottom-1{bottom:-.25rem}.-top-3{top:-.75rem}.bottom-0{bottom:0}.left-4{left:1rem}.right-1{right:.25rem}.right-3{right:.75rem}.right-5{right:1.25rem}.top-1{top:.25rem}.top-1\\/2{top:50%}.top-5{top:1.25rem}.top-\\[9px\\]{top:9px}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-\\[999\\]{z-index:999}.z-\\[9\\]{z-index:9}.m-0{margin:0}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.mr-2{margin-right:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.line-clamp-3{-webkit-box-orient:vertical;-webkit-line-clamp:3;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1/1}.\\!h-8{height:2rem!important}.h-2{height:.5rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-\\[160px\\]{height:160px}.h-\\[400px\\]{height:400px}.h-\\[calc\\(100vh_-114\\.8px\\)\\]{height:calc(100vh - 114.8px)}.h-\\[calc\\(100vh_-_125px\\)\\]{height:calc(100vh - 125px)}.h-\\[calc\\(100vh_-_64px\\)\\]{height:calc(100vh - 64px)}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.max-h-48{max-height:12rem}.max-h-60{max-height:15rem}.max-h-\\[70vh\\]{max-height:70vh}.min-h-16{min-height:4rem}.min-h-\\[60px\\]{min-height:60px}.\\!w-8{width:2rem!important}.w-1\\/2{width:50%}.w-1\\/3{width:33.333333%}.w-10\\/12{width:83.333333%}.w-100{width:100%}.w-2{width:.5rem}.w-2\\/3{width:66.666667%}.w-4{width:1rem}.w-40{width:10rem}.w-44{width:11rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-72{width:18rem}.w-8{width:2rem}.w-96{width:24rem}.w-\\[240px\\]{width:240px}.w-\\[276px\\]{width:276px}.w-\\[40rem\\]{width:40rem}.w-\\[40vw\\]{width:40vw}.w-\\[60vw\\]{width:60vw}.w-\\[90\\%\\]{width:90%}.w-\\[900px\\]{width:900px}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-screen{width:100vw}.min-w-0{min-width:0}.min-w-6{min-width:1.5rem}.min-w-7{min-width:1.75rem}.min-w-72{min-width:18rem}.min-w-\\[305px\\]{min-width:305px}.min-w-full{min-width:100%}.max-w-\\[calc\\(100\\%-20px\\)\\]{max-width:calc(100% - 20px)}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.-translate-y-1\\/2{--tw-translate-y:-50%}.-translate-y-1\\/2,.translate-y-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y:100%}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-auto{cursor:auto}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-6{row-gap:1.5rem}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.\\!rounded-full{border-radius:9999px!important}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-l-full{border-bottom-left-radius:9999px;border-top-left-radius:9999px}.rounded-r-full{border-bottom-right-radius:9999px;border-top-right-radius:9999px}.rounded-r-lg{border-bottom-right-radius:.5rem;border-top-right-radius:.5rem}.rounded-se-lg{border-start-end-radius:.5rem}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l-0{border-left-width:0}.border-l-4{border-left-width:4px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-\\[\\#13294B\\]{--tw-border-opacity:1;border-color:rgb(19 41 75/var(--tw-border-opacity,1))}.border-\\[\\#1565C0\\]{--tw-border-opacity:1;border-color:rgb(21 101 192/var(--tw-border-opacity,1))}.border-\\[\\#2E7D32\\]{--tw-border-opacity:1;border-color:rgb(46 125 50/var(--tw-border-opacity,1))}.border-\\[\\#5EEAD4\\]{--tw-border-opacity:1;border-color:rgb(94 234 212/var(--tw-border-opacity,1))}.border-\\[\\#67E8F9\\]{--tw-border-opacity:1;border-color:rgb(103 232 249/var(--tw-border-opacity,1))}.border-\\[\\#6EE7B7\\]{--tw-border-opacity:1;border-color:rgb(110 231 183/var(--tw-border-opacity,1))}.border-\\[\\#7DD3FC\\]{--tw-border-opacity:1;border-color:rgb(125 211 252/var(--tw-border-opacity,1))}.border-\\[\\#A5B4FC\\]{--tw-border-opacity:1;border-color:rgb(165 180 252/var(--tw-border-opacity,1))}.border-\\[\\#BEF264\\]{--tw-border-opacity:1;border-color:rgb(190 242 100/var(--tw-border-opacity,1))}.border-\\[\\#BFDBFE\\]{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.border-\\[\\#C4B5FD\\]{--tw-border-opacity:1;border-color:rgb(196 181 253/var(--tw-border-opacity,1))}.border-\\[\\#C62828\\]{--tw-border-opacity:1;border-color:rgb(198 40 40/var(--tw-border-opacity,1))}.border-\\[\\#CBD5E1\\]{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}.border-\\[\\#D1D5DB\\]{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.border-\\[\\#D4D4D4\\]{--tw-border-opacity:1;border-color:rgb(212 212 212/var(--tw-border-opacity,1))}.border-\\[\\#D4D4D8\\]{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity,1))}.border-\\[\\#D6D3D1\\]{--tw-border-opacity:1;border-color:rgb(214 211 209/var(--tw-border-opacity,1))}.border-\\[\\#F0ABFC\\]{--tw-border-opacity:1;border-color:rgb(240 171 252/var(--tw-border-opacity,1))}.border-\\[\\#F1F1F4\\]{--tw-border-opacity:1;border-color:rgb(241 241 244/var(--tw-border-opacity,1))}.border-\\[\\#F9A8D4\\]{--tw-border-opacity:1;border-color:rgb(249 168 212/var(--tw-border-opacity,1))}.border-\\[\\#FCA5A5\\]{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity,1))}.border-\\[\\#FCD34D\\]{--tw-border-opacity:1;border-color:rgb(252 211 77/var(--tw-border-opacity,1))}.border-\\[\\#FDA4AF\\]{--tw-border-opacity:1;border-color:rgb(253 164 175/var(--tw-border-opacity,1))}.border-\\[\\#FDBA74\\]{--tw-border-opacity:1;border-color:rgb(253 186 116/var(--tw-border-opacity,1))}.border-\\[\\#e6e6e6\\]{--tw-border-opacity:1;border-color:rgb(230 230 230/var(--tw-border-opacity,1))}.border-\\[\\#f3f4f6\\]{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}.border-background{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity,1))}.border-gray{--tw-border-opacity:1;border-color:rgb(160 164 179/var(--tw-border-opacity,1))}.border-gray50{--tw-border-opacity:1;border-color:rgb(224 224 224/var(--tw-border-opacity,1))}.border-grayDark{--tw-border-opacity:1;border-color:rgb(100 105 129/var(--tw-border-opacity,1))}.border-primary{--tw-border-opacity:1;border-color:rgb(19 41 75/var(--tw-border-opacity,1))}.border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.border-redError{--tw-border-opacity:1;border-color:rgb(236 74 84/var(--tw-border-opacity,1))}.border-secondary{--tw-border-opacity:1;border-color:rgb(232 236 249/var(--tw-border-opacity,1))}.border-secondaryActive{--tw-border-opacity:1;border-color:rgb(164 180 232/var(--tw-border-opacity,1))}.border-stone{--tw-border-opacity:1;border-color:rgb(230 230 230/var(--tw-border-opacity,1))}.border-stoneDark{--tw-border-opacity:1;border-color:rgb(194 194 194/var(--tw-border-opacity,1))}.border-stoneLight{--tw-border-opacity:1;border-color:rgb(241 241 244/var(--tw-border-opacity,1))}.border-b-primary{--tw-border-opacity:1;border-bottom-color:rgb(19 41 75/var(--tw-border-opacity,1))}.border-b-stone{--tw-border-opacity:1;border-bottom-color:rgb(230 230 230/var(--tw-border-opacity,1))}.border-t-transparent{border-top-color:transparent}.bg-\\[\\#1d6ee731\\]{background-color:#1d6ee731}.bg-\\[\\#CCFBF1\\]{--tw-bg-opacity:1;background-color:rgb(204 251 241/var(--tw-bg-opacity,1))}.bg-\\[\\#CFFAFE\\]{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}.bg-\\[\\#D1FAE5\\]{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity,1))}.bg-\\[\\#DBEAFE\\]{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.bg-\\[\\#E0E7FF\\]{--tw-bg-opacity:1;background-color:rgb(224 231 255/var(--tw-bg-opacity,1))}.bg-\\[\\#E0F2FE\\]{--tw-bg-opacity:1;background-color:rgb(224 242 254/var(--tw-bg-opacity,1))}.bg-\\[\\#E3F2FD\\]{--tw-bg-opacity:1;background-color:rgb(227 242 253/var(--tw-bg-opacity,1))}.bg-\\[\\#E6F4EA\\]{--tw-bg-opacity:1;background-color:rgb(230 244 234/var(--tw-bg-opacity,1))}.bg-\\[\\#E7E5E4\\]{--tw-bg-opacity:1;background-color:rgb(231 229 228/var(--tw-bg-opacity,1))}.bg-\\[\\#ECFCCB\\]{--tw-bg-opacity:1;background-color:rgb(236 252 203/var(--tw-bg-opacity,1))}.bg-\\[\\#EDE9FE\\]{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity,1))}.bg-\\[\\#F1F5F9\\]{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.bg-\\[\\#F3F4F6\\]{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-\\[\\#F4F4F5\\]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.bg-\\[\\#F5F5F5\\]{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.bg-\\[\\#FAE8FF\\]{--tw-bg-opacity:1;background-color:rgb(250 232 255/var(--tw-bg-opacity,1))}.bg-\\[\\#FCE7F3\\]{--tw-bg-opacity:1;background-color:rgb(252 231 243/var(--tw-bg-opacity,1))}.bg-\\[\\#FEE2E2\\]{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.bg-\\[\\#FEF3C7\\]{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity,1))}.bg-\\[\\#FEF9C3\\]{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.bg-\\[\\#FFE4E6\\]{--tw-bg-opacity:1;background-color:rgb(255 228 230/var(--tw-bg-opacity,1))}.bg-\\[\\#FFEBEE\\]{--tw-bg-opacity:1;background-color:rgb(255 235 238/var(--tw-bg-opacity,1))}.bg-\\[\\#FFEDD5\\]{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.bg-\\[\\#e6e6e6\\]{--tw-bg-opacity:1;background-color:rgb(230 230 230/var(--tw-bg-opacity,1))}.bg-background{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-backgroundDark\\/20{background-color:rgba(66,66,66,.2)}.bg-black{background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-black,.bg-blue{--tw-bg-opacity:1}.bg-blue{background-color:rgb(0 69 186/var(--tw-bg-opacity,1))}.bg-gray{background-color:rgb(160 164 179/var(--tw-bg-opacity,1))}.bg-gray,.bg-green{--tw-bg-opacity:1}.bg-green{background-color:rgb(10 168 54/var(--tw-bg-opacity,1))}.bg-greenBackground{background-color:#0aa83612}.bg-primary{--tw-bg-opacity:1;background-color:rgb(19 41 75/var(--tw-bg-opacity,1))}.bg-primary\\/5{background-color:rgba(19,41,75,.05)}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-redErrorOpacity{background-color:#a80a0a14}.bg-secondary{--tw-bg-opacity:1;background-color:rgb(232 236 249/var(--tw-bg-opacity,1))}.bg-stone{--tw-bg-opacity:1;background-color:rgb(230 230 230/var(--tw-bg-opacity,1))}.bg-stoneBackground{--tw-bg-opacity:1;background-color:rgb(250 250 251/var(--tw-bg-opacity,1))}.bg-stoneLight{--tw-bg-opacity:1;background-color:rgb(241 241 244/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-opacity-50{--tw-bg-opacity:0.5}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-\\[\\#13294B\\]{--tw-gradient-from:#13294b var(--tw-gradient-from-position);--tw-gradient-to:rgba(19,41,75,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-\\[\\#FAFAFB\\]{--tw-gradient-from:#fafafb var(--tw-gradient-from-position);--tw-gradient-to:rgba(250,250,251,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-\\[\\#FFFFFF\\]{--tw-gradient-from:#fff var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-\\[\\#f3f4f6\\]{--tw-gradient-from:#f3f4f6 var(--tw-gradient-from-position);--tw-gradient-to:rgba(243,244,246,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.via-\\[\\#FAFAFB\\]{--tw-gradient-to:rgba(250,250,251,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#fafafb var(--tw-gradient-via-position),var(--tw-gradient-to)}.to-\\[\\#0C1C34\\]{--tw-gradient-to:#0c1c34 var(--tw-gradient-to-position)}.to-\\[\\#FAFAFB\\]{--tw-gradient-to:#fafafb var(--tw-gradient-to-position)}.to-\\[\\#FFFFFF\\],.to-white{--tw-gradient-to:#fff var(--tw-gradient-to-position)}.object-cover{-o-object-fit:cover;object-fit:cover}.\\!p-2{padding:.5rem!important}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\\[2px\\]{padding:2px}.\\!py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-2\\.5{padding-bottom:.625rem;padding-top:.625rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-top:1rem}.pb-4,.py-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pr-4{padding-right:1rem}.pt-1\\.5{padding-top:.375rem}.pt-10{padding-top:2.5rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.pt-8{padding-top:2rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.font-roboto{font-family:Roboto,sans-serif}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-\\[18px\\]{font-size:18px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.\\!font-bold{font-weight:700!important}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.normal-case{text-transform:none}.\\!text-background{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.\\!text-backgroundDark{--tw-text-opacity:1!important;color:rgb(66 66 66/var(--tw-text-opacity,1))!important}.\\!text-gray100{color:rgb(102 102 102/var(--tw-text-opacity,1))!important}.\\!text-gray100,.\\!text-grayDark{--tw-text-opacity:1!important}.\\!text-grayDark{color:rgb(100 105 129/var(--tw-text-opacity,1))!important}.\\!text-green{color:rgb(10 168 54/var(--tw-text-opacity,1))!important}.\\!text-green,.\\!text-primary{--tw-text-opacity:1!important}.\\!text-primary{color:rgb(19 41 75/var(--tw-text-opacity,1))!important}.\\!text-white{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.text-\\[\\#0369A1\\]{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity,1))}.text-\\[\\#065F46\\]{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity,1))}.text-\\[\\#0D47A1\\]{--tw-text-opacity:1;color:rgb(13 71 161/var(--tw-text-opacity,1))}.text-\\[\\#13294B\\]{--tw-text-opacity:1;color:rgb(19 41 75/var(--tw-text-opacity,1))}.text-\\[\\#134E4A\\]{--tw-text-opacity:1;color:rgb(19 78 74/var(--tw-text-opacity,1))}.text-\\[\\#155E75\\]{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity,1))}.text-\\[\\#1B5E20\\]{--tw-text-opacity:1;color:rgb(27 94 32/var(--tw-text-opacity,1))}.text-\\[\\#1E40AF\\]{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.text-\\[\\#334155\\]{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.text-\\[\\#365314\\]{--tw-text-opacity:1;color:rgb(54 83 20/var(--tw-text-opacity,1))}.text-\\[\\#3730A3\\]{--tw-text-opacity:1;color:rgb(55 48 163/var(--tw-text-opacity,1))}.text-\\[\\#374151\\]{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.text-\\[\\#3F3F46\\]{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}.text-\\[\\#404040\\]{--tw-text-opacity:1;color:rgb(64 64 64/var(--tw-text-opacity,1))}.text-\\[\\#44403C\\]{--tw-text-opacity:1;color:rgb(68 64 60/var(--tw-text-opacity,1))}.text-\\[\\#646981\\]{--tw-text-opacity:1;color:rgb(100 105 129/var(--tw-text-opacity,1))}.text-\\[\\#6B21A8\\]{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity,1))}.text-\\[\\#6D28D9\\]{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}.text-\\[\\#878787\\]{--tw-text-opacity:1;color:rgb(135 135 135/var(--tw-text-opacity,1))}.text-\\[\\#92400E\\]{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}.text-\\[\\#991B1B\\]{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.text-\\[\\#9A3412\\]{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.text-\\[\\#9D174D\\]{--tw-text-opacity:1;color:rgb(157 23 77/var(--tw-text-opacity,1))}.text-\\[\\#A21CAF\\]{--tw-text-opacity:1;color:rgb(162 28 175/var(--tw-text-opacity,1))}.text-\\[\\#B71C1C\\]{--tw-text-opacity:1;color:rgb(183 28 28/var(--tw-text-opacity,1))}.text-\\[\\#BE123C\\]{--tw-text-opacity:1;color:rgb(190 18 60/var(--tw-text-opacity,1))}.text-\\[\\#a0a4b3\\]{--tw-text-opacity:1;color:rgb(160 164 179/var(--tw-text-opacity,1))}.text-background{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-backgroundDark{--tw-text-opacity:1;color:rgb(66 66 66/var(--tw-text-opacity,1))}.text-gray{--tw-text-opacity:1;color:rgb(160 164 179/var(--tw-text-opacity,1))}.text-grayDark{--tw-text-opacity:1;color:rgb(100 105 129/var(--tw-text-opacity,1))}.text-green{--tw-text-opacity:1;color:rgb(10 168 54/var(--tw-text-opacity,1))}.text-primary{--tw-text-opacity:1;color:rgb(19 41 75/var(--tw-text-opacity,1))}.text-redError{--tw-text-opacity:1;color:rgb(236 74 84/var(--tw-text-opacity,1))}.text-stone{--tw-text-opacity:1;color:rgb(230 230 230/var(--tw-text-opacity,1))}.text-stoneDark{--tw-text-opacity:1;color:rgb(194 194 194/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.opacity-50{opacity:.5}.\\!shadow-none{--tw-shadow:0 0 #0000!important;--tw-shadow-colored:0 0 #0000!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-\\[0_4px_12px_rgba\\(0\\2c 0\\2c 0\\2c 0\\.50\\)\\]{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\\[0_4px_12px_rgba\\(0\\2c 0\\2c 0\\2c 0\\.50\\)\\]{--tw-shadow:0 4px 12px rgba(0,0,0,.5);--tw-shadow-colored:0 4px 12px var(--tw-shadow-color)}.shadow-container{--tw-shadow:0px 0px 5px 3px rgba(0,0,0,.1);--tw-shadow-colored:0px 0px 5px 3px var(--tw-shadow-color)}.shadow-container,.shadow-header{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-header{--tw-shadow:0px 0px 20px 0px hsla(0,0%,54%,.3);--tw-shadow-colored:0px 0px 20px 0px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-md,.shadow-none{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring,.ring-1{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-gray{--tw-ring-opacity:1;--tw-ring-color:rgb(160 164 179/var(--tw-ring-opacity,1))}.ring-redError{--tw-ring-opacity:1;--tw-ring-color:rgb(236 74 84/var(--tw-ring-opacity,1))}.ring-stone{--tw-ring-opacity:1;--tw-ring-color:rgb(230 230 230/var(--tw-ring-opacity,1))}.ring-offset-2{--tw-ring-offset-width:2px}.ring-offset-background{--tw-ring-offset-color:#fff}.ring-offset-secondary{--tw-ring-offset-color:#e8ecf9}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-shadow{transition-duration:.15s;transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}}.placeholder\\:\\!text-redError::-moz-placeholder{--tw-text-opacity:1!important;color:rgb(236 74 84/var(--tw-text-opacity,1))!important}.placeholder\\:\\!text-redError::placeholder{--tw-text-opacity:1!important;color:rgb(236 74 84/var(--tw-text-opacity,1))!important}.placeholder\\:text-gray::-moz-placeholder{--tw-text-opacity:1;color:rgb(160 164 179/var(--tw-text-opacity,1))}.placeholder\\:text-gray::placeholder{--tw-text-opacity:1;color:rgb(160 164 179/var(--tw-text-opacity,1))}.placeholder\\:text-redError::-moz-placeholder{--tw-text-opacity:1;color:rgb(236 74 84/var(--tw-text-opacity,1))}.placeholder\\:text-redError::placeholder{--tw-text-opacity:1;color:rgb(236 74 84/var(--tw-text-opacity,1))}.first\\:rounded-ss-lg:first-child{border-start-start-radius:.5rem}.checked\\:bg-primary:checked{--tw-bg-opacity:1;background-color:rgb(19 41 75/var(--tw-bg-opacity,1))}.hover\\:border-grayDark:hover{--tw-border-opacity:1;border-color:rgb(100 105 129/var(--tw-border-opacity,1))}.hover\\:border-primary:hover{--tw-border-opacity:1;border-color:rgb(19 41 75/var(--tw-border-opacity,1))}.hover\\:border-primary\\/50:hover{border-color:rgba(19,41,75,.5)}.hover\\:border-red-500:hover{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.hover\\:border-stone:hover{--tw-border-opacity:1;border-color:rgb(230 230 230/var(--tw-border-opacity,1))}.hover\\:bg-grayDark:hover{--tw-bg-opacity:1;background-color:rgb(100 105 129/var(--tw-bg-opacity,1))}.hover\\:bg-greenBackgroundActive:hover{background-color:#0aa83633}.hover\\:bg-primaryActive:hover{--tw-bg-opacity:1;background-color:rgb(12 28 52/var(--tw-bg-opacity,1))}.hover\\:bg-secondary:hover{--tw-bg-opacity:1;background-color:rgb(232 236 249/var(--tw-bg-opacity,1))}.hover\\:bg-secondaryActive:hover{--tw-bg-opacity:1;background-color:rgb(164 180 232/var(--tw-bg-opacity,1))}.hover\\:bg-stone:hover{--tw-bg-opacity:1;background-color:rgb(230 230 230/var(--tw-bg-opacity,1))}.hover\\:bg-stoneBackground:hover{--tw-bg-opacity:1;background-color:rgb(250 250 251/var(--tw-bg-opacity,1))}.hover\\:font-bold:hover{font-weight:700}.hover\\:text-backgroundDark:hover{--tw-text-opacity:1;color:rgb(66 66 66/var(--tw-text-opacity,1))}.hover\\:text-primary:hover{--tw-text-opacity:1;color:rgb(19 41 75/var(--tw-text-opacity,1))}.hover\\:text-slate-200:hover{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\\:border-primary:focus{--tw-border-opacity:1;border-color:rgb(19 41 75/var(--tw-border-opacity,1))}.focus\\:shadow-md:focus{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.focus\\:shadow-md:focus,.focus\\:shadow-none:focus{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\\:shadow-none:focus{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.disabled\\:border-stone:disabled{--tw-border-opacity:1;border-color:rgb(230 230 230/var(--tw-border-opacity,1))}.disabled\\:border-stoneDark:disabled{--tw-border-opacity:1;border-color:rgb(194 194 194/var(--tw-border-opacity,1))}.disabled\\:bg-stone:disabled{--tw-bg-opacity:1;background-color:rgb(230 230 230/var(--tw-bg-opacity,1))}.disabled\\:bg-stoneDark:disabled{--tw-bg-opacity:1;background-color:rgb(194 194 194/var(--tw-bg-opacity,1))}.disabled\\:text-background:disabled{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.disabled\\:text-stoneDark:disabled{--tw-text-opacity:1;color:rgb(194 194 194/var(--tw-text-opacity,1))}.group:hover .group-hover\\:scale-105{--tw-scale-x:1.05;--tw-scale-y:1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width:640px){.sm\\:w-auto{width:auto}.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\\:flex-row{flex-direction:row}.sm\\:justify-end{justify-content:flex-end}}@media (min-width:768px){.md\\:w-1\\/2{width:50%}.md\\:min-w-\\[110px\\]{min-width:110px}.md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:1024px){.lg\\:w-1\\/3{width:33.333333%}.lg\\:min-w-\\[110px\\]{min-width:110px}.lg\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.\\[\\&\\:\\:-webkit-scrollbar-thumb\\]\\:rounded-md::-webkit-scrollbar-thumb{border-radius:.375rem}.\\[\\&\\:\\:-webkit-scrollbar-thumb\\]\\:bg-stoneDark::-webkit-scrollbar-thumb{--tw-bg-opacity:1;background-color:rgb(194 194 194/var(--tw-bg-opacity,1))}.\\[\\&\\:\\:-webkit-scrollbar-track\\]\\:rounded-r-md::-webkit-scrollbar-track{border-bottom-right-radius:.375rem;border-top-right-radius:.375rem}.\\[\\&\\:\\:-webkit-scrollbar-track\\]\\:bg-stone::-webkit-scrollbar-track{--tw-bg-opacity:1;background-color:rgb(230 230 230/var(--tw-bg-opacity,1))}.\\[\\&\\:\\:-webkit-scrollbar\\]\\:w-1::-webkit-scrollbar{width:.25rem}";
48
+ var css_248z = "@layer tailwind-base, primereact, tailwind-utilities;@import \"primereact/resources/themes/lara-light-blue/theme.css\";@import \"primeicons/primeicons.css\";@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap\");@layer tailwind-base{*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }\n /*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid;box-sizing:border-box}:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}*{font-family:Roboto,sans-serif}}@layer tailwind-utilities{.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.p-calendar.p-invalid input::-moz-placeholder{color:#ec4a54!important}.p-calendar.p-invalid input::placeholder{color:#ec4a54!important}.p-calendar.p-custom input::-moz-placeholder{color:#a0a4b3!important}.p-calendar.p-custom input::placeholder{color:#a0a4b3!important}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-bottom-1{bottom:-.25rem}.-top-3{top:-.75rem}.bottom-0{bottom:0}.left-4{left:1rem}.right-1{right:.25rem}.right-3{right:.75rem}.right-5{right:1.25rem}.top-1{top:.25rem}.top-1\\/2{top:50%}.top-5{top:1.25rem}.top-\\[9px\\]{top:9px}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-\\[999\\]{z-index:999}.z-\\[9\\]{z-index:9}.m-0{margin:0}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.mr-2{margin-right:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.line-clamp-3{-webkit-box-orient:vertical;-webkit-line-clamp:3;display:-webkit-box;overflow:hidden}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1/1}.\\!h-8{height:2rem!important}.h-2{height:.5rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-\\[160px\\]{height:160px}.h-\\[400px\\]{height:400px}.h-\\[calc\\(100vh_-114\\.8px\\)\\]{height:calc(100vh - 114.8px)}.h-\\[calc\\(100vh_-_125px\\)\\]{height:calc(100vh - 125px)}.h-\\[calc\\(100vh_-_64px\\)\\]{height:calc(100vh - 64px)}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.max-h-48{max-height:12rem}.max-h-60{max-height:15rem}.max-h-\\[70vh\\]{max-height:70vh}.min-h-16{min-height:4rem}.min-h-\\[60px\\]{min-height:60px}.\\!w-8{width:2rem!important}.w-1\\/2{width:50%}.w-1\\/3{width:33.333333%}.w-10\\/12{width:83.333333%}.w-100{width:100%}.w-2{width:.5rem}.w-2\\/3{width:66.666667%}.w-4{width:1rem}.w-40{width:10rem}.w-44{width:11rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-72{width:18rem}.w-8{width:2rem}.w-96{width:24rem}.w-\\[240px\\]{width:240px}.w-\\[276px\\]{width:276px}.w-\\[40rem\\]{width:40rem}.w-\\[40vw\\]{width:40vw}.w-\\[60vw\\]{width:60vw}.w-\\[90\\%\\]{width:90%}.w-\\[900px\\]{width:900px}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-screen{width:100vw}.min-w-0{min-width:0}.min-w-6{min-width:1.5rem}.min-w-7{min-width:1.75rem}.min-w-72{min-width:18rem}.min-w-\\[305px\\]{min-width:305px}.min-w-full{min-width:100%}.max-w-\\[calc\\(100\\%-20px\\)\\]{max-width:calc(100% - 20px)}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.-translate-y-1\\/2{--tw-translate-y:-50%}.-translate-y-1\\/2,.translate-y-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y:100%}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-auto{cursor:auto}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-6{row-gap:1.5rem}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.\\!rounded-full{border-radius:9999px!important}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-l-full{border-bottom-left-radius:9999px;border-top-left-radius:9999px}.rounded-r-full{border-bottom-right-radius:9999px;border-top-right-radius:9999px}.rounded-r-lg{border-bottom-right-radius:.5rem;border-top-right-radius:.5rem}.rounded-se-lg{border-start-end-radius:.5rem}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l-0{border-left-width:0}.border-l-4{border-left-width:4px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-\\[\\#13294B\\]{--tw-border-opacity:1;border-color:rgb(19 41 75/var(--tw-border-opacity,1))}.border-\\[\\#1565C0\\]{--tw-border-opacity:1;border-color:rgb(21 101 192/var(--tw-border-opacity,1))}.border-\\[\\#2E7D32\\]{--tw-border-opacity:1;border-color:rgb(46 125 50/var(--tw-border-opacity,1))}.border-\\[\\#5EEAD4\\]{--tw-border-opacity:1;border-color:rgb(94 234 212/var(--tw-border-opacity,1))}.border-\\[\\#67E8F9\\]{--tw-border-opacity:1;border-color:rgb(103 232 249/var(--tw-border-opacity,1))}.border-\\[\\#6EE7B7\\]{--tw-border-opacity:1;border-color:rgb(110 231 183/var(--tw-border-opacity,1))}.border-\\[\\#7DD3FC\\]{--tw-border-opacity:1;border-color:rgb(125 211 252/var(--tw-border-opacity,1))}.border-\\[\\#A5B4FC\\]{--tw-border-opacity:1;border-color:rgb(165 180 252/var(--tw-border-opacity,1))}.border-\\[\\#BEF264\\]{--tw-border-opacity:1;border-color:rgb(190 242 100/var(--tw-border-opacity,1))}.border-\\[\\#BFDBFE\\]{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.border-\\[\\#C4B5FD\\]{--tw-border-opacity:1;border-color:rgb(196 181 253/var(--tw-border-opacity,1))}.border-\\[\\#C62828\\]{--tw-border-opacity:1;border-color:rgb(198 40 40/var(--tw-border-opacity,1))}.border-\\[\\#CBD5E1\\]{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}.border-\\[\\#D1D5DB\\]{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.border-\\[\\#D4D4D4\\]{--tw-border-opacity:1;border-color:rgb(212 212 212/var(--tw-border-opacity,1))}.border-\\[\\#D4D4D8\\]{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity,1))}.border-\\[\\#D6D3D1\\]{--tw-border-opacity:1;border-color:rgb(214 211 209/var(--tw-border-opacity,1))}.border-\\[\\#F0ABFC\\]{--tw-border-opacity:1;border-color:rgb(240 171 252/var(--tw-border-opacity,1))}.border-\\[\\#F1F1F4\\]{--tw-border-opacity:1;border-color:rgb(241 241 244/var(--tw-border-opacity,1))}.border-\\[\\#F9A8D4\\]{--tw-border-opacity:1;border-color:rgb(249 168 212/var(--tw-border-opacity,1))}.border-\\[\\#FCA5A5\\]{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity,1))}.border-\\[\\#FCD34D\\]{--tw-border-opacity:1;border-color:rgb(252 211 77/var(--tw-border-opacity,1))}.border-\\[\\#FDA4AF\\]{--tw-border-opacity:1;border-color:rgb(253 164 175/var(--tw-border-opacity,1))}.border-\\[\\#FDBA74\\]{--tw-border-opacity:1;border-color:rgb(253 186 116/var(--tw-border-opacity,1))}.border-\\[\\#e6e6e6\\]{--tw-border-opacity:1;border-color:rgb(230 230 230/var(--tw-border-opacity,1))}.border-\\[\\#f3f4f6\\]{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}.border-background{--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity,1))}.border-gray{--tw-border-opacity:1;border-color:rgb(160 164 179/var(--tw-border-opacity,1))}.border-gray50{--tw-border-opacity:1;border-color:rgb(224 224 224/var(--tw-border-opacity,1))}.border-grayDark{--tw-border-opacity:1;border-color:rgb(100 105 129/var(--tw-border-opacity,1))}.border-primary{--tw-border-opacity:1;border-color:rgb(19 41 75/var(--tw-border-opacity,1))}.border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.border-redError{--tw-border-opacity:1;border-color:rgb(236 74 84/var(--tw-border-opacity,1))}.border-secondary{--tw-border-opacity:1;border-color:rgb(232 236 249/var(--tw-border-opacity,1))}.border-secondaryActive{--tw-border-opacity:1;border-color:rgb(164 180 232/var(--tw-border-opacity,1))}.border-stone{--tw-border-opacity:1;border-color:rgb(230 230 230/var(--tw-border-opacity,1))}.border-stoneDark{--tw-border-opacity:1;border-color:rgb(194 194 194/var(--tw-border-opacity,1))}.border-stoneLight{--tw-border-opacity:1;border-color:rgb(241 241 244/var(--tw-border-opacity,1))}.border-b-primary{--tw-border-opacity:1;border-bottom-color:rgb(19 41 75/var(--tw-border-opacity,1))}.border-b-stone{--tw-border-opacity:1;border-bottom-color:rgb(230 230 230/var(--tw-border-opacity,1))}.border-t-transparent{border-top-color:transparent}.bg-\\[\\#1d6ee731\\]{background-color:#1d6ee731}.bg-\\[\\#646981\\]{--tw-bg-opacity:1;background-color:rgb(100 105 129/var(--tw-bg-opacity,1))}.bg-\\[\\#CCFBF1\\]{--tw-bg-opacity:1;background-color:rgb(204 251 241/var(--tw-bg-opacity,1))}.bg-\\[\\#CFFAFE\\]{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}.bg-\\[\\#D1FAE5\\]{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity,1))}.bg-\\[\\#DBEAFE\\]{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.bg-\\[\\#E0E7FF\\]{--tw-bg-opacity:1;background-color:rgb(224 231 255/var(--tw-bg-opacity,1))}.bg-\\[\\#E0F2FE\\]{--tw-bg-opacity:1;background-color:rgb(224 242 254/var(--tw-bg-opacity,1))}.bg-\\[\\#E3F2FD\\]{--tw-bg-opacity:1;background-color:rgb(227 242 253/var(--tw-bg-opacity,1))}.bg-\\[\\#E6F4EA\\]{--tw-bg-opacity:1;background-color:rgb(230 244 234/var(--tw-bg-opacity,1))}.bg-\\[\\#E7E5E4\\]{--tw-bg-opacity:1;background-color:rgb(231 229 228/var(--tw-bg-opacity,1))}.bg-\\[\\#ECFCCB\\]{--tw-bg-opacity:1;background-color:rgb(236 252 203/var(--tw-bg-opacity,1))}.bg-\\[\\#EDE9FE\\]{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity,1))}.bg-\\[\\#F1F5F9\\]{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.bg-\\[\\#F3F4F6\\]{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-\\[\\#F4F4F5\\]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.bg-\\[\\#F5F5F5\\]{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.bg-\\[\\#FAE8FF\\]{--tw-bg-opacity:1;background-color:rgb(250 232 255/var(--tw-bg-opacity,1))}.bg-\\[\\#FCE7F3\\]{--tw-bg-opacity:1;background-color:rgb(252 231 243/var(--tw-bg-opacity,1))}.bg-\\[\\#FEE2E2\\]{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.bg-\\[\\#FEF3C7\\]{--tw-bg-opacity:1;background-color:rgb(254 243 199/var(--tw-bg-opacity,1))}.bg-\\[\\#FEF9C3\\]{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.bg-\\[\\#FFE4E6\\]{--tw-bg-opacity:1;background-color:rgb(255 228 230/var(--tw-bg-opacity,1))}.bg-\\[\\#FFEBEE\\]{--tw-bg-opacity:1;background-color:rgb(255 235 238/var(--tw-bg-opacity,1))}.bg-\\[\\#FFEDD5\\]{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.bg-\\[\\#e6e6e6\\]{--tw-bg-opacity:1;background-color:rgb(230 230 230/var(--tw-bg-opacity,1))}.bg-background{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-backgroundDark\\/20{background-color:rgba(66,66,66,.2)}.bg-black{background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-black,.bg-blue{--tw-bg-opacity:1}.bg-blue{background-color:rgb(0 69 186/var(--tw-bg-opacity,1))}.bg-gray{background-color:rgb(160 164 179/var(--tw-bg-opacity,1))}.bg-gray,.bg-green{--tw-bg-opacity:1}.bg-green{background-color:rgb(10 168 54/var(--tw-bg-opacity,1))}.bg-greenBackground{background-color:#0aa83612}.bg-primary{--tw-bg-opacity:1;background-color:rgb(19 41 75/var(--tw-bg-opacity,1))}.bg-primary\\/5{background-color:rgba(19,41,75,.05)}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-redErrorOpacity{background-color:#a80a0a14}.bg-secondary{--tw-bg-opacity:1;background-color:rgb(232 236 249/var(--tw-bg-opacity,1))}.bg-stone{--tw-bg-opacity:1;background-color:rgb(230 230 230/var(--tw-bg-opacity,1))}.bg-stoneBackground{--tw-bg-opacity:1;background-color:rgb(250 250 251/var(--tw-bg-opacity,1))}.bg-stoneLight{--tw-bg-opacity:1;background-color:rgb(241 241 244/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-opacity-50{--tw-bg-opacity:0.5}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-\\[\\#13294B\\]{--tw-gradient-from:#13294b var(--tw-gradient-from-position);--tw-gradient-to:rgba(19,41,75,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-\\[\\#FAFAFB\\]{--tw-gradient-from:#fafafb var(--tw-gradient-from-position);--tw-gradient-to:rgba(250,250,251,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-\\[\\#FFFFFF\\]{--tw-gradient-from:#fff var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-\\[\\#f3f4f6\\]{--tw-gradient-from:#f3f4f6 var(--tw-gradient-from-position);--tw-gradient-to:rgba(243,244,246,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.via-\\[\\#FAFAFB\\]{--tw-gradient-to:rgba(250,250,251,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#fafafb var(--tw-gradient-via-position),var(--tw-gradient-to)}.to-\\[\\#0C1C34\\]{--tw-gradient-to:#0c1c34 var(--tw-gradient-to-position)}.to-\\[\\#FAFAFB\\]{--tw-gradient-to:#fafafb var(--tw-gradient-to-position)}.to-\\[\\#FFFFFF\\],.to-white{--tw-gradient-to:#fff var(--tw-gradient-to-position)}.object-cover{-o-object-fit:cover;object-fit:cover}.\\!p-2{padding:.5rem!important}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\\[2px\\]{padding:2px}.\\!py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-2\\.5{padding-bottom:.625rem;padding-top:.625rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-top:1rem}.pb-4,.py-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pr-4{padding-right:1rem}.pt-1\\.5{padding-top:.375rem}.pt-10{padding-top:2.5rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.pt-8{padding-top:2rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.font-roboto{font-family:Roboto,sans-serif}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-\\[18px\\]{font-size:18px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.\\!font-bold{font-weight:700!important}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.normal-case{text-transform:none}.\\!text-background{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.\\!text-backgroundDark{--tw-text-opacity:1!important;color:rgb(66 66 66/var(--tw-text-opacity,1))!important}.\\!text-gray100{color:rgb(102 102 102/var(--tw-text-opacity,1))!important}.\\!text-gray100,.\\!text-grayDark{--tw-text-opacity:1!important}.\\!text-grayDark{color:rgb(100 105 129/var(--tw-text-opacity,1))!important}.\\!text-green{color:rgb(10 168 54/var(--tw-text-opacity,1))!important}.\\!text-green,.\\!text-primary{--tw-text-opacity:1!important}.\\!text-primary{color:rgb(19 41 75/var(--tw-text-opacity,1))!important}.\\!text-white{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.text-\\[\\#0369A1\\]{--tw-text-opacity:1;color:rgb(3 105 161/var(--tw-text-opacity,1))}.text-\\[\\#065F46\\]{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity,1))}.text-\\[\\#0D47A1\\]{--tw-text-opacity:1;color:rgb(13 71 161/var(--tw-text-opacity,1))}.text-\\[\\#13294B\\]{--tw-text-opacity:1;color:rgb(19 41 75/var(--tw-text-opacity,1))}.text-\\[\\#134E4A\\]{--tw-text-opacity:1;color:rgb(19 78 74/var(--tw-text-opacity,1))}.text-\\[\\#155E75\\]{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity,1))}.text-\\[\\#1B5E20\\]{--tw-text-opacity:1;color:rgb(27 94 32/var(--tw-text-opacity,1))}.text-\\[\\#1E40AF\\]{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.text-\\[\\#334155\\]{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.text-\\[\\#365314\\]{--tw-text-opacity:1;color:rgb(54 83 20/var(--tw-text-opacity,1))}.text-\\[\\#3730A3\\]{--tw-text-opacity:1;color:rgb(55 48 163/var(--tw-text-opacity,1))}.text-\\[\\#374151\\]{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.text-\\[\\#3F3F46\\]{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}.text-\\[\\#404040\\]{--tw-text-opacity:1;color:rgb(64 64 64/var(--tw-text-opacity,1))}.text-\\[\\#44403C\\]{--tw-text-opacity:1;color:rgb(68 64 60/var(--tw-text-opacity,1))}.text-\\[\\#646981\\]{--tw-text-opacity:1;color:rgb(100 105 129/var(--tw-text-opacity,1))}.text-\\[\\#6B21A8\\]{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity,1))}.text-\\[\\#6D28D9\\]{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}.text-\\[\\#878787\\]{--tw-text-opacity:1;color:rgb(135 135 135/var(--tw-text-opacity,1))}.text-\\[\\#92400E\\]{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}.text-\\[\\#991B1B\\]{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.text-\\[\\#9A3412\\]{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.text-\\[\\#9D174D\\]{--tw-text-opacity:1;color:rgb(157 23 77/var(--tw-text-opacity,1))}.text-\\[\\#A21CAF\\]{--tw-text-opacity:1;color:rgb(162 28 175/var(--tw-text-opacity,1))}.text-\\[\\#B71C1C\\]{--tw-text-opacity:1;color:rgb(183 28 28/var(--tw-text-opacity,1))}.text-\\[\\#BE123C\\]{--tw-text-opacity:1;color:rgb(190 18 60/var(--tw-text-opacity,1))}.text-\\[\\#a0a4b3\\]{--tw-text-opacity:1;color:rgb(160 164 179/var(--tw-text-opacity,1))}.text-background{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-backgroundDark{--tw-text-opacity:1;color:rgb(66 66 66/var(--tw-text-opacity,1))}.text-gray{--tw-text-opacity:1;color:rgb(160 164 179/var(--tw-text-opacity,1))}.text-grayDark{--tw-text-opacity:1;color:rgb(100 105 129/var(--tw-text-opacity,1))}.text-green{--tw-text-opacity:1;color:rgb(10 168 54/var(--tw-text-opacity,1))}.text-primary{--tw-text-opacity:1;color:rgb(19 41 75/var(--tw-text-opacity,1))}.text-redError{--tw-text-opacity:1;color:rgb(236 74 84/var(--tw-text-opacity,1))}.text-stone{--tw-text-opacity:1;color:rgb(230 230 230/var(--tw-text-opacity,1))}.text-stoneDark{--tw-text-opacity:1;color:rgb(194 194 194/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.opacity-50{opacity:.5}.\\!shadow-none{--tw-shadow:0 0 #0000!important;--tw-shadow-colored:0 0 #0000!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-\\[0_4px_12px_rgba\\(0\\2c 0\\2c 0\\2c 0\\.50\\)\\]{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\\[0_4px_12px_rgba\\(0\\2c 0\\2c 0\\2c 0\\.50\\)\\]{--tw-shadow:0 4px 12px rgba(0,0,0,.5);--tw-shadow-colored:0 4px 12px var(--tw-shadow-color)}.shadow-container{--tw-shadow:0px 0px 5px 3px rgba(0,0,0,.1);--tw-shadow-colored:0px 0px 5px 3px var(--tw-shadow-color)}.shadow-container,.shadow-header{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-header{--tw-shadow:0px 0px 20px 0px hsla(0,0%,54%,.3);--tw-shadow-colored:0px 0px 20px 0px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-md,.shadow-none{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring,.ring-1{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-gray{--tw-ring-opacity:1;--tw-ring-color:rgb(160 164 179/var(--tw-ring-opacity,1))}.ring-redError{--tw-ring-opacity:1;--tw-ring-color:rgb(236 74 84/var(--tw-ring-opacity,1))}.ring-stone{--tw-ring-opacity:1;--tw-ring-color:rgb(230 230 230/var(--tw-ring-opacity,1))}.ring-offset-2{--tw-ring-offset-width:2px}.ring-offset-background{--tw-ring-offset-color:#fff}.ring-offset-secondary{--tw-ring-offset-color:#e8ecf9}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-shadow{transition-duration:.15s;transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}}.placeholder\\:\\!text-redError::-moz-placeholder{--tw-text-opacity:1!important;color:rgb(236 74 84/var(--tw-text-opacity,1))!important}.placeholder\\:\\!text-redError::placeholder{--tw-text-opacity:1!important;color:rgb(236 74 84/var(--tw-text-opacity,1))!important}.placeholder\\:text-gray::-moz-placeholder{--tw-text-opacity:1;color:rgb(160 164 179/var(--tw-text-opacity,1))}.placeholder\\:text-gray::placeholder{--tw-text-opacity:1;color:rgb(160 164 179/var(--tw-text-opacity,1))}.placeholder\\:text-redError::-moz-placeholder{--tw-text-opacity:1;color:rgb(236 74 84/var(--tw-text-opacity,1))}.placeholder\\:text-redError::placeholder{--tw-text-opacity:1;color:rgb(236 74 84/var(--tw-text-opacity,1))}.first\\:rounded-ss-lg:first-child{border-start-start-radius:.5rem}.checked\\:bg-primary:checked{--tw-bg-opacity:1;background-color:rgb(19 41 75/var(--tw-bg-opacity,1))}.hover\\:border-grayDark:hover{--tw-border-opacity:1;border-color:rgb(100 105 129/var(--tw-border-opacity,1))}.hover\\:border-primary:hover{--tw-border-opacity:1;border-color:rgb(19 41 75/var(--tw-border-opacity,1))}.hover\\:border-primary\\/50:hover{border-color:rgba(19,41,75,.5)}.hover\\:border-red-500:hover{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.hover\\:border-stone:hover{--tw-border-opacity:1;border-color:rgb(230 230 230/var(--tw-border-opacity,1))}.hover\\:bg-grayDark:hover{--tw-bg-opacity:1;background-color:rgb(100 105 129/var(--tw-bg-opacity,1))}.hover\\:bg-greenBackgroundActive:hover{background-color:#0aa83633}.hover\\:bg-primaryActive:hover{--tw-bg-opacity:1;background-color:rgb(12 28 52/var(--tw-bg-opacity,1))}.hover\\:bg-secondary:hover{--tw-bg-opacity:1;background-color:rgb(232 236 249/var(--tw-bg-opacity,1))}.hover\\:bg-secondaryActive:hover{--tw-bg-opacity:1;background-color:rgb(164 180 232/var(--tw-bg-opacity,1))}.hover\\:bg-stone:hover{--tw-bg-opacity:1;background-color:rgb(230 230 230/var(--tw-bg-opacity,1))}.hover\\:bg-stoneBackground:hover{--tw-bg-opacity:1;background-color:rgb(250 250 251/var(--tw-bg-opacity,1))}.hover\\:font-bold:hover{font-weight:700}.hover\\:text-backgroundDark:hover{--tw-text-opacity:1;color:rgb(66 66 66/var(--tw-text-opacity,1))}.hover\\:text-primary:hover{--tw-text-opacity:1;color:rgb(19 41 75/var(--tw-text-opacity,1))}.hover\\:text-slate-200:hover{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\\:border-primary:focus{--tw-border-opacity:1;border-color:rgb(19 41 75/var(--tw-border-opacity,1))}.focus\\:shadow-md:focus{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.focus\\:shadow-md:focus,.focus\\:shadow-none:focus{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\\:shadow-none:focus{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.disabled\\:border-stone:disabled{--tw-border-opacity:1;border-color:rgb(230 230 230/var(--tw-border-opacity,1))}.disabled\\:border-stoneDark:disabled{--tw-border-opacity:1;border-color:rgb(194 194 194/var(--tw-border-opacity,1))}.disabled\\:bg-stone:disabled{--tw-bg-opacity:1;background-color:rgb(230 230 230/var(--tw-bg-opacity,1))}.disabled\\:bg-stoneDark:disabled{--tw-bg-opacity:1;background-color:rgb(194 194 194/var(--tw-bg-opacity,1))}.disabled\\:text-background:disabled{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.disabled\\:text-stoneDark:disabled{--tw-text-opacity:1;color:rgb(194 194 194/var(--tw-text-opacity,1))}.group:hover .group-hover\\:scale-105{--tw-scale-x:1.05;--tw-scale-y:1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width:640px){.sm\\:w-auto{width:auto}.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\\:flex-row{flex-direction:row}.sm\\:justify-end{justify-content:flex-end}}@media (min-width:768px){.md\\:w-1\\/2{width:50%}.md\\:min-w-\\[110px\\]{min-width:110px}.md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:1024px){.lg\\:w-1\\/3{width:33.333333%}.lg\\:min-w-\\[110px\\]{min-width:110px}.lg\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.\\[\\&\\:\\:-webkit-scrollbar-thumb\\]\\:rounded-md::-webkit-scrollbar-thumb{border-radius:.375rem}.\\[\\&\\:\\:-webkit-scrollbar-thumb\\]\\:bg-stoneDark::-webkit-scrollbar-thumb{--tw-bg-opacity:1;background-color:rgb(194 194 194/var(--tw-bg-opacity,1))}.\\[\\&\\:\\:-webkit-scrollbar-track\\]\\:rounded-r-md::-webkit-scrollbar-track{border-bottom-right-radius:.375rem;border-top-right-radius:.375rem}.\\[\\&\\:\\:-webkit-scrollbar-track\\]\\:bg-stone::-webkit-scrollbar-track{--tw-bg-opacity:1;background-color:rgb(230 230 230/var(--tw-bg-opacity,1))}.\\[\\&\\:\\:-webkit-scrollbar\\]\\:w-1::-webkit-scrollbar{width:.25rem}";
49
49
  styleInject(css_248z,{"insertAt":"top"});
50
50
 
51
51
  function Accordion({ tabsChildren, headers, multiple = false, activeIndex, className, onClickFavorite, showFavorite = false, }) {
@@ -262,7 +262,7 @@ const variants$3 = {
262
262
  tab: 'bg-background !text-primary border-background hover:bg-secondaryActive hover:border-grayDark disabled:bg-stoneDark disabled:text-background disabled:border-stoneDark',
263
263
  };
264
264
  function Button({ variant = 'primary', selected = false, rightIcon, className, width = 'w-100', ...props }) {
265
- return (jsx(Button$1, { ...props, className: clsx('!py-2 !shadow-none font-roboto', variants$3[variant], selected && variant === 'tab' && 'bg-secondary border-grayDark ', width, className), "aria-label": "componente de bot\u00E3o", children: rightIcon && jsx("span", { className: `pi pl-2 ${rightIcon}`, children: " " }) }));
265
+ return (jsx(Button$1, { ...props, className: clsx('!py-2 !shadow-none font-roboto', variants$3[variant], selected && variant === 'tab' && 'bg-secondary border-grayDark ', width, className), "aria-label": "Componente Bot\u00E3o Padr\u00E3o", children: rightIcon && jsx("span", { className: `pi pl-2 ${rightIcon}`, children: " " }) }));
266
266
  }
267
267
 
268
268
  addLocale('pt-BR', {
@@ -770,6 +770,645 @@ function FilterIcon({ color }) {
770
770
  return (jsx("svg", { width: "16", height: "15", viewBox: "0 0 16 15", fill: "none", children: jsx("path", { d: "M14.3164 0.75C14.918 0.75 15.2188 1.46094 14.7812 1.87109L9.75 6.92969V14.0938C9.75 14.6406 9.14844 14.9414 8.71094 14.6406L6.52344 13.1094C6.33203 13 6.25 12.7812 6.25 12.5625V6.92969L1.19141 1.87109C0.753906 1.46094 1.05469 0.75 1.65625 0.75H14.3164Z", fill: color }) }));
771
771
  }
772
772
 
773
+ /**
774
+ * @module constants
775
+ * @summary Useful constants
776
+ * @description
777
+ * Collection of useful date constants.
778
+ *
779
+ * The constants could be imported from `date-fns/constants`:
780
+ *
781
+ * ```ts
782
+ * import { maxTime, minTime } from "./constants/date-fns/constants";
783
+ *
784
+ * function isAllowedTime(time) {
785
+ * return time <= maxTime && time >= minTime;
786
+ * }
787
+ * ```
788
+ */
789
+
790
+
791
+ /**
792
+ * @constant
793
+ * @name millisecondsInWeek
794
+ * @summary Milliseconds in 1 week.
795
+ */
796
+ const millisecondsInWeek = 604800000;
797
+
798
+ /**
799
+ * @constant
800
+ * @name millisecondsInDay
801
+ * @summary Milliseconds in 1 day.
802
+ */
803
+ const millisecondsInDay = 86400000;
804
+
805
+ /**
806
+ * @constant
807
+ * @name constructFromSymbol
808
+ * @summary Symbol enabling Date extensions to inherit properties from the reference date.
809
+ *
810
+ * The symbol is used to enable the `constructFrom` function to construct a date
811
+ * using a reference date and a value. It allows to transfer extra properties
812
+ * from the reference date to the new date. It's useful for extensions like
813
+ * [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as
814
+ * a constructor argument.
815
+ */
816
+ const constructFromSymbol = Symbol.for("constructDateFrom");
817
+
818
+ /**
819
+ * @name constructFrom
820
+ * @category Generic Helpers
821
+ * @summary Constructs a date using the reference date and the value
822
+ *
823
+ * @description
824
+ * The function constructs a new date using the constructor from the reference
825
+ * date and the given value. It helps to build generic functions that accept
826
+ * date extensions.
827
+ *
828
+ * It defaults to `Date` if the passed reference date is a number or a string.
829
+ *
830
+ * Starting from v3.7.0, it allows to construct a date using `[Symbol.for("constructDateFrom")]`
831
+ * enabling to transfer extra properties from the reference date to the new date.
832
+ * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)
833
+ * that accept a time zone as a constructor argument.
834
+ *
835
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
836
+ *
837
+ * @param date - The reference date to take constructor from
838
+ * @param value - The value to create the date
839
+ *
840
+ * @returns Date initialized using the given date and value
841
+ *
842
+ * @example
843
+ * import { constructFrom } from "./constructFrom/date-fns";
844
+ *
845
+ * // A function that clones a date preserving the original type
846
+ * function cloneDate<DateType extends Date>(date: DateType): DateType {
847
+ * return constructFrom(
848
+ * date, // Use constructor from the given date
849
+ * date.getTime() // Use the date value to create a new date
850
+ * );
851
+ * }
852
+ */
853
+ function constructFrom(date, value) {
854
+ if (typeof date === "function") return date(value);
855
+
856
+ if (date && typeof date === "object" && constructFromSymbol in date)
857
+ return date[constructFromSymbol](value);
858
+
859
+ if (date instanceof Date) return new date.constructor(value);
860
+
861
+ return new Date(value);
862
+ }
863
+
864
+ /**
865
+ * @name toDate
866
+ * @category Common Helpers
867
+ * @summary Convert the given argument to an instance of Date.
868
+ *
869
+ * @description
870
+ * Convert the given argument to an instance of Date.
871
+ *
872
+ * If the argument is an instance of Date, the function returns its clone.
873
+ *
874
+ * If the argument is a number, it is treated as a timestamp.
875
+ *
876
+ * If the argument is none of the above, the function returns Invalid Date.
877
+ *
878
+ * Starting from v3.7.0, it clones a date using `[Symbol.for("constructDateFrom")]`
879
+ * enabling to transfer extra properties from the reference date to the new date.
880
+ * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)
881
+ * that accept a time zone as a constructor argument.
882
+ *
883
+ * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
884
+ *
885
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
886
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
887
+ *
888
+ * @param argument - The value to convert
889
+ *
890
+ * @returns The parsed date in the local time zone
891
+ *
892
+ * @example
893
+ * // Clone the date:
894
+ * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
895
+ * //=> Tue Feb 11 2014 11:30:30
896
+ *
897
+ * @example
898
+ * // Convert the timestamp to date:
899
+ * const result = toDate(1392098430000)
900
+ * //=> Tue Feb 11 2014 11:30:30
901
+ */
902
+ function toDate(argument, context) {
903
+ // [TODO] Get rid of `toDate` or `constructFrom`?
904
+ return constructFrom(context || argument, argument);
905
+ }
906
+
907
+ let defaultOptions = {};
908
+
909
+ function getDefaultOptions() {
910
+ return defaultOptions;
911
+ }
912
+
913
+ /**
914
+ * The {@link startOfWeek} function options.
915
+ */
916
+
917
+ /**
918
+ * @name startOfWeek
919
+ * @category Week Helpers
920
+ * @summary Return the start of a week for the given date.
921
+ *
922
+ * @description
923
+ * Return the start of a week for the given date.
924
+ * The result will be in the local timezone.
925
+ *
926
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
927
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
928
+ *
929
+ * @param date - The original date
930
+ * @param options - An object with options
931
+ *
932
+ * @returns The start of a week
933
+ *
934
+ * @example
935
+ * // The start of a week for 2 September 2014 11:55:00:
936
+ * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))
937
+ * //=> Sun Aug 31 2014 00:00:00
938
+ *
939
+ * @example
940
+ * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:
941
+ * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })
942
+ * //=> Mon Sep 01 2014 00:00:00
943
+ */
944
+ function startOfWeek(date, options) {
945
+ const defaultOptions = getDefaultOptions();
946
+ const weekStartsOn =
947
+ options?.weekStartsOn ??
948
+ options?.locale?.options?.weekStartsOn ??
949
+ defaultOptions.weekStartsOn ??
950
+ defaultOptions.locale?.options?.weekStartsOn ??
951
+ 0;
952
+
953
+ const _date = toDate(date, options?.in);
954
+ const day = _date.getDay();
955
+ const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
956
+
957
+ _date.setDate(_date.getDate() - diff);
958
+ _date.setHours(0, 0, 0, 0);
959
+ return _date;
960
+ }
961
+
962
+ /**
963
+ * The {@link startOfISOWeek} function options.
964
+ */
965
+
966
+ /**
967
+ * @name startOfISOWeek
968
+ * @category ISO Week Helpers
969
+ * @summary Return the start of an ISO week for the given date.
970
+ *
971
+ * @description
972
+ * Return the start of an ISO week for the given date.
973
+ * The result will be in the local timezone.
974
+ *
975
+ * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
976
+ *
977
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
978
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
979
+ *
980
+ * @param date - The original date
981
+ * @param options - An object with options
982
+ *
983
+ * @returns The start of an ISO week
984
+ *
985
+ * @example
986
+ * // The start of an ISO week for 2 September 2014 11:55:00:
987
+ * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))
988
+ * //=> Mon Sep 01 2014 00:00:00
989
+ */
990
+ function startOfISOWeek(date, options) {
991
+ return startOfWeek(date, { ...options, weekStartsOn: 1 });
992
+ }
993
+
994
+ /**
995
+ * The {@link getISOWeekYear} function options.
996
+ */
997
+
998
+ /**
999
+ * @name getISOWeekYear
1000
+ * @category ISO Week-Numbering Year Helpers
1001
+ * @summary Get the ISO week-numbering year of the given date.
1002
+ *
1003
+ * @description
1004
+ * Get the ISO week-numbering year of the given date,
1005
+ * which always starts 3 days before the year's first Thursday.
1006
+ *
1007
+ * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
1008
+ *
1009
+ * @param date - The given date
1010
+ *
1011
+ * @returns The ISO week-numbering year
1012
+ *
1013
+ * @example
1014
+ * // Which ISO-week numbering year is 2 January 2005?
1015
+ * const result = getISOWeekYear(new Date(2005, 0, 2))
1016
+ * //=> 2004
1017
+ */
1018
+ function getISOWeekYear(date, options) {
1019
+ const _date = toDate(date, options?.in);
1020
+ const year = _date.getFullYear();
1021
+
1022
+ const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);
1023
+ fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
1024
+ fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
1025
+ const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);
1026
+
1027
+ const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);
1028
+ fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);
1029
+ fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);
1030
+ const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);
1031
+
1032
+ if (_date.getTime() >= startOfNextYear.getTime()) {
1033
+ return year + 1;
1034
+ } else if (_date.getTime() >= startOfThisYear.getTime()) {
1035
+ return year;
1036
+ } else {
1037
+ return year - 1;
1038
+ }
1039
+ }
1040
+
1041
+ /**
1042
+ * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
1043
+ * They usually appear for dates that denote time before the timezones were introduced
1044
+ * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891
1045
+ * and GMT+01:00:00 after that date)
1046
+ *
1047
+ * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,
1048
+ * which would lead to incorrect calculations.
1049
+ *
1050
+ * This function returns the timezone offset in milliseconds that takes seconds in account.
1051
+ */
1052
+ function getTimezoneOffsetInMilliseconds(date) {
1053
+ const _date = toDate(date);
1054
+ const utcDate = new Date(
1055
+ Date.UTC(
1056
+ _date.getFullYear(),
1057
+ _date.getMonth(),
1058
+ _date.getDate(),
1059
+ _date.getHours(),
1060
+ _date.getMinutes(),
1061
+ _date.getSeconds(),
1062
+ _date.getMilliseconds(),
1063
+ ),
1064
+ );
1065
+ utcDate.setUTCFullYear(_date.getFullYear());
1066
+ return +date - +utcDate;
1067
+ }
1068
+
1069
+ function normalizeDates(context, ...dates) {
1070
+ const normalize = constructFrom.bind(
1071
+ null,
1072
+ dates.find((date) => typeof date === "object"),
1073
+ );
1074
+ return dates.map(normalize);
1075
+ }
1076
+
1077
+ /**
1078
+ * The {@link startOfDay} function options.
1079
+ */
1080
+
1081
+ /**
1082
+ * @name startOfDay
1083
+ * @category Day Helpers
1084
+ * @summary Return the start of a day for the given date.
1085
+ *
1086
+ * @description
1087
+ * Return the start of a day for the given date.
1088
+ * The result will be in the local timezone.
1089
+ *
1090
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
1091
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
1092
+ *
1093
+ * @param date - The original date
1094
+ * @param options - The options
1095
+ *
1096
+ * @returns The start of a day
1097
+ *
1098
+ * @example
1099
+ * // The start of a day for 2 September 2014 11:55:00:
1100
+ * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
1101
+ * //=> Tue Sep 02 2014 00:00:00
1102
+ */
1103
+ function startOfDay(date, options) {
1104
+ const _date = toDate(date, options?.in);
1105
+ _date.setHours(0, 0, 0, 0);
1106
+ return _date;
1107
+ }
1108
+
1109
+ /**
1110
+ * The {@link differenceInCalendarDays} function options.
1111
+ */
1112
+
1113
+ /**
1114
+ * @name differenceInCalendarDays
1115
+ * @category Day Helpers
1116
+ * @summary Get the number of calendar days between the given dates.
1117
+ *
1118
+ * @description
1119
+ * Get the number of calendar days between the given dates. This means that the times are removed
1120
+ * from the dates and then the difference in days is calculated.
1121
+ *
1122
+ * @param laterDate - The later date
1123
+ * @param earlierDate - The earlier date
1124
+ * @param options - The options object
1125
+ *
1126
+ * @returns The number of calendar days
1127
+ *
1128
+ * @example
1129
+ * // How many calendar days are between
1130
+ * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?
1131
+ * const result = differenceInCalendarDays(
1132
+ * new Date(2012, 6, 2, 0, 0),
1133
+ * new Date(2011, 6, 2, 23, 0)
1134
+ * )
1135
+ * //=> 366
1136
+ * // How many calendar days are between
1137
+ * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?
1138
+ * const result = differenceInCalendarDays(
1139
+ * new Date(2011, 6, 3, 0, 1),
1140
+ * new Date(2011, 6, 2, 23, 59)
1141
+ * )
1142
+ * //=> 1
1143
+ */
1144
+ function differenceInCalendarDays(laterDate, earlierDate, options) {
1145
+ const [laterDate_, earlierDate_] = normalizeDates(
1146
+ options?.in,
1147
+ laterDate,
1148
+ earlierDate,
1149
+ );
1150
+
1151
+ const laterStartOfDay = startOfDay(laterDate_);
1152
+ const earlierStartOfDay = startOfDay(earlierDate_);
1153
+
1154
+ const laterTimestamp =
1155
+ +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);
1156
+ const earlierTimestamp =
1157
+ +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);
1158
+
1159
+ // Round the number of days to the nearest integer because the number of
1160
+ // milliseconds in a day is not constant (e.g. it's different in the week of
1161
+ // the daylight saving time clock shift).
1162
+ return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);
1163
+ }
1164
+
1165
+ /**
1166
+ * The {@link startOfISOWeekYear} function options.
1167
+ */
1168
+
1169
+ /**
1170
+ * @name startOfISOWeekYear
1171
+ * @category ISO Week-Numbering Year Helpers
1172
+ * @summary Return the start of an ISO week-numbering year for the given date.
1173
+ *
1174
+ * @description
1175
+ * Return the start of an ISO week-numbering year,
1176
+ * which always starts 3 days before the year's first Thursday.
1177
+ * The result will be in the local timezone.
1178
+ *
1179
+ * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
1180
+ *
1181
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
1182
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
1183
+ *
1184
+ * @param date - The original date
1185
+ * @param options - An object with options
1186
+ *
1187
+ * @returns The start of an ISO week-numbering year
1188
+ *
1189
+ * @example
1190
+ * // The start of an ISO week-numbering year for 2 July 2005:
1191
+ * const result = startOfISOWeekYear(new Date(2005, 6, 2))
1192
+ * //=> Mon Jan 03 2005 00:00:00
1193
+ */
1194
+ function startOfISOWeekYear(date, options) {
1195
+ const year = getISOWeekYear(date, options);
1196
+ const fourthOfJanuary = constructFrom(date, 0);
1197
+ fourthOfJanuary.setFullYear(year, 0, 4);
1198
+ fourthOfJanuary.setHours(0, 0, 0, 0);
1199
+ return startOfISOWeek(fourthOfJanuary);
1200
+ }
1201
+
1202
+ /**
1203
+ * @name isDate
1204
+ * @category Common Helpers
1205
+ * @summary Is the given value a date?
1206
+ *
1207
+ * @description
1208
+ * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
1209
+ *
1210
+ * @param value - The value to check
1211
+ *
1212
+ * @returns True if the given value is a date
1213
+ *
1214
+ * @example
1215
+ * // For a valid date:
1216
+ * const result = isDate(new Date())
1217
+ * //=> true
1218
+ *
1219
+ * @example
1220
+ * // For an invalid date:
1221
+ * const result = isDate(new Date(NaN))
1222
+ * //=> true
1223
+ *
1224
+ * @example
1225
+ * // For some value:
1226
+ * const result = isDate('2014-02-31')
1227
+ * //=> false
1228
+ *
1229
+ * @example
1230
+ * // For an object:
1231
+ * const result = isDate({})
1232
+ * //=> false
1233
+ */
1234
+ function isDate(value) {
1235
+ return (
1236
+ value instanceof Date ||
1237
+ (typeof value === "object" &&
1238
+ Object.prototype.toString.call(value) === "[object Date]")
1239
+ );
1240
+ }
1241
+
1242
+ /**
1243
+ * @name isValid
1244
+ * @category Common Helpers
1245
+ * @summary Is the given date valid?
1246
+ *
1247
+ * @description
1248
+ * Returns false if argument is Invalid Date and true otherwise.
1249
+ * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)
1250
+ * Invalid Date is a Date, whose time value is NaN.
1251
+ *
1252
+ * Time value of Date: http://es5.github.io/#x15.9.1.1
1253
+ *
1254
+ * @param date - The date to check
1255
+ *
1256
+ * @returns The date is valid
1257
+ *
1258
+ * @example
1259
+ * // For the valid date:
1260
+ * const result = isValid(new Date(2014, 1, 31))
1261
+ * //=> true
1262
+ *
1263
+ * @example
1264
+ * // For the value, convertible into a date:
1265
+ * const result = isValid(1393804800000)
1266
+ * //=> true
1267
+ *
1268
+ * @example
1269
+ * // For the invalid date:
1270
+ * const result = isValid(new Date(''))
1271
+ * //=> false
1272
+ */
1273
+ function isValid(date) {
1274
+ return !((!isDate(date) && typeof date !== "number") || isNaN(+toDate(date)));
1275
+ }
1276
+
1277
+ /**
1278
+ * The {@link startOfYear} function options.
1279
+ */
1280
+
1281
+ /**
1282
+ * @name startOfYear
1283
+ * @category Year Helpers
1284
+ * @summary Return the start of a year for the given date.
1285
+ *
1286
+ * @description
1287
+ * Return the start of a year for the given date.
1288
+ * The result will be in the local timezone.
1289
+ *
1290
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
1291
+ * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
1292
+ *
1293
+ * @param date - The original date
1294
+ * @param options - The options
1295
+ *
1296
+ * @returns The start of a year
1297
+ *
1298
+ * @example
1299
+ * // The start of a year for 2 September 2014 11:55:00:
1300
+ * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))
1301
+ * //=> Wed Jan 01 2014 00:00:00
1302
+ */
1303
+ function startOfYear(date, options) {
1304
+ const date_ = toDate(date, options?.in);
1305
+ date_.setFullYear(date_.getFullYear(), 0, 1);
1306
+ date_.setHours(0, 0, 0, 0);
1307
+ return date_;
1308
+ }
1309
+
1310
+ const formatDistanceLocale$1 = {
1311
+ lessThanXSeconds: {
1312
+ one: "less than a second",
1313
+ other: "less than {{count}} seconds",
1314
+ },
1315
+
1316
+ xSeconds: {
1317
+ one: "1 second",
1318
+ other: "{{count}} seconds",
1319
+ },
1320
+
1321
+ halfAMinute: "half a minute",
1322
+
1323
+ lessThanXMinutes: {
1324
+ one: "less than a minute",
1325
+ other: "less than {{count}} minutes",
1326
+ },
1327
+
1328
+ xMinutes: {
1329
+ one: "1 minute",
1330
+ other: "{{count}} minutes",
1331
+ },
1332
+
1333
+ aboutXHours: {
1334
+ one: "about 1 hour",
1335
+ other: "about {{count}} hours",
1336
+ },
1337
+
1338
+ xHours: {
1339
+ one: "1 hour",
1340
+ other: "{{count}} hours",
1341
+ },
1342
+
1343
+ xDays: {
1344
+ one: "1 day",
1345
+ other: "{{count}} days",
1346
+ },
1347
+
1348
+ aboutXWeeks: {
1349
+ one: "about 1 week",
1350
+ other: "about {{count}} weeks",
1351
+ },
1352
+
1353
+ xWeeks: {
1354
+ one: "1 week",
1355
+ other: "{{count}} weeks",
1356
+ },
1357
+
1358
+ aboutXMonths: {
1359
+ one: "about 1 month",
1360
+ other: "about {{count}} months",
1361
+ },
1362
+
1363
+ xMonths: {
1364
+ one: "1 month",
1365
+ other: "{{count}} months",
1366
+ },
1367
+
1368
+ aboutXYears: {
1369
+ one: "about 1 year",
1370
+ other: "about {{count}} years",
1371
+ },
1372
+
1373
+ xYears: {
1374
+ one: "1 year",
1375
+ other: "{{count}} years",
1376
+ },
1377
+
1378
+ overXYears: {
1379
+ one: "over 1 year",
1380
+ other: "over {{count}} years",
1381
+ },
1382
+
1383
+ almostXYears: {
1384
+ one: "almost 1 year",
1385
+ other: "almost {{count}} years",
1386
+ },
1387
+ };
1388
+
1389
+ const formatDistance$1 = (token, count, options) => {
1390
+ let result;
1391
+
1392
+ const tokenValue = formatDistanceLocale$1[token];
1393
+ if (typeof tokenValue === "string") {
1394
+ result = tokenValue;
1395
+ } else if (count === 1) {
1396
+ result = tokenValue.one;
1397
+ } else {
1398
+ result = tokenValue.other.replace("{{count}}", count.toString());
1399
+ }
1400
+
1401
+ if (options?.addSuffix) {
1402
+ if (options.comparison && options.comparison > 0) {
1403
+ return "in " + result;
1404
+ } else {
1405
+ return result + " ago";
1406
+ }
1407
+ }
1408
+
1409
+ return result;
1410
+ };
1411
+
773
1412
  function buildFormatLongFn(args) {
774
1413
  return (options = {}) => {
775
1414
  // TODO: Remove String()
@@ -779,146 +1418,2137 @@ function buildFormatLongFn(args) {
779
1418
  };
780
1419
  }
781
1420
 
782
- /**
783
- * The localize function argument callback which allows to convert raw value to
784
- * the actual type.
785
- *
786
- * @param value - The value to convert
787
- *
788
- * @returns The converted value
789
- */
1421
+ const dateFormats$1 = {
1422
+ full: "EEEE, MMMM do, y",
1423
+ long: "MMMM do, y",
1424
+ medium: "MMM d, y",
1425
+ short: "MM/dd/yyyy",
1426
+ };
1427
+
1428
+ const timeFormats$1 = {
1429
+ full: "h:mm:ss a zzzz",
1430
+ long: "h:mm:ss a z",
1431
+ medium: "h:mm:ss a",
1432
+ short: "h:mm a",
1433
+ };
1434
+
1435
+ const dateTimeFormats$1 = {
1436
+ full: "{{date}} 'at' {{time}}",
1437
+ long: "{{date}} 'at' {{time}}",
1438
+ medium: "{{date}}, {{time}}",
1439
+ short: "{{date}}, {{time}}",
1440
+ };
1441
+
1442
+ const formatLong$1 = {
1443
+ date: buildFormatLongFn({
1444
+ formats: dateFormats$1,
1445
+ defaultWidth: "full",
1446
+ }),
1447
+
1448
+ time: buildFormatLongFn({
1449
+ formats: timeFormats$1,
1450
+ defaultWidth: "full",
1451
+ }),
1452
+
1453
+ dateTime: buildFormatLongFn({
1454
+ formats: dateTimeFormats$1,
1455
+ defaultWidth: "full",
1456
+ }),
1457
+ };
1458
+
1459
+ const formatRelativeLocale$1 = {
1460
+ lastWeek: "'last' eeee 'at' p",
1461
+ yesterday: "'yesterday at' p",
1462
+ today: "'today at' p",
1463
+ tomorrow: "'tomorrow at' p",
1464
+ nextWeek: "eeee 'at' p",
1465
+ other: "P",
1466
+ };
1467
+
1468
+ const formatRelative$1 = (token, _date, _baseDate, _options) =>
1469
+ formatRelativeLocale$1[token];
1470
+
1471
+ /**
1472
+ * The localize function argument callback which allows to convert raw value to
1473
+ * the actual type.
1474
+ *
1475
+ * @param value - The value to convert
1476
+ *
1477
+ * @returns The converted value
1478
+ */
1479
+
1480
+ /**
1481
+ * The map of localized values for each width.
1482
+ */
1483
+
1484
+ /**
1485
+ * The index type of the locale unit value. It types conversion of units of
1486
+ * values that don't start at 0 (i.e. quarters).
1487
+ */
1488
+
1489
+ /**
1490
+ * Converts the unit value to the tuple of values.
1491
+ */
1492
+
1493
+ /**
1494
+ * The tuple of localized era values. The first element represents BC,
1495
+ * the second element represents AD.
1496
+ */
1497
+
1498
+ /**
1499
+ * The tuple of localized quarter values. The first element represents Q1.
1500
+ */
1501
+
1502
+ /**
1503
+ * The tuple of localized day values. The first element represents Sunday.
1504
+ */
1505
+
1506
+ /**
1507
+ * The tuple of localized month values. The first element represents January.
1508
+ */
1509
+
1510
+ function buildLocalizeFn(args) {
1511
+ return (value, options) => {
1512
+ const context = options?.context ? String(options.context) : "standalone";
1513
+
1514
+ let valuesArray;
1515
+ if (context === "formatting" && args.formattingValues) {
1516
+ const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
1517
+ const width = options?.width ? String(options.width) : defaultWidth;
1518
+
1519
+ valuesArray =
1520
+ args.formattingValues[width] || args.formattingValues[defaultWidth];
1521
+ } else {
1522
+ const defaultWidth = args.defaultWidth;
1523
+ const width = options?.width ? String(options.width) : args.defaultWidth;
1524
+
1525
+ valuesArray = args.values[width] || args.values[defaultWidth];
1526
+ }
1527
+ const index = args.argumentCallback ? args.argumentCallback(value) : value;
1528
+
1529
+ // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
1530
+ return valuesArray[index];
1531
+ };
1532
+ }
1533
+
1534
+ const eraValues$1 = {
1535
+ narrow: ["B", "A"],
1536
+ abbreviated: ["BC", "AD"],
1537
+ wide: ["Before Christ", "Anno Domini"],
1538
+ };
1539
+
1540
+ const quarterValues$1 = {
1541
+ narrow: ["1", "2", "3", "4"],
1542
+ abbreviated: ["Q1", "Q2", "Q3", "Q4"],
1543
+ wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"],
1544
+ };
1545
+
1546
+ // Note: in English, the names of days of the week and months are capitalized.
1547
+ // If you are making a new locale based on this one, check if the same is true for the language you're working on.
1548
+ // Generally, formatted dates should look like they are in the middle of a sentence,
1549
+ // e.g. in Spanish language the weekdays and months should be in the lowercase.
1550
+ const monthValues$1 = {
1551
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
1552
+ abbreviated: [
1553
+ "Jan",
1554
+ "Feb",
1555
+ "Mar",
1556
+ "Apr",
1557
+ "May",
1558
+ "Jun",
1559
+ "Jul",
1560
+ "Aug",
1561
+ "Sep",
1562
+ "Oct",
1563
+ "Nov",
1564
+ "Dec",
1565
+ ],
1566
+
1567
+ wide: [
1568
+ "January",
1569
+ "February",
1570
+ "March",
1571
+ "April",
1572
+ "May",
1573
+ "June",
1574
+ "July",
1575
+ "August",
1576
+ "September",
1577
+ "October",
1578
+ "November",
1579
+ "December",
1580
+ ],
1581
+ };
1582
+
1583
+ const dayValues$1 = {
1584
+ narrow: ["S", "M", "T", "W", "T", "F", "S"],
1585
+ short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
1586
+ abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
1587
+ wide: [
1588
+ "Sunday",
1589
+ "Monday",
1590
+ "Tuesday",
1591
+ "Wednesday",
1592
+ "Thursday",
1593
+ "Friday",
1594
+ "Saturday",
1595
+ ],
1596
+ };
1597
+
1598
+ const dayPeriodValues$1 = {
1599
+ narrow: {
1600
+ am: "a",
1601
+ pm: "p",
1602
+ midnight: "mi",
1603
+ noon: "n",
1604
+ morning: "morning",
1605
+ afternoon: "afternoon",
1606
+ evening: "evening",
1607
+ night: "night",
1608
+ },
1609
+ abbreviated: {
1610
+ am: "AM",
1611
+ pm: "PM",
1612
+ midnight: "midnight",
1613
+ noon: "noon",
1614
+ morning: "morning",
1615
+ afternoon: "afternoon",
1616
+ evening: "evening",
1617
+ night: "night",
1618
+ },
1619
+ wide: {
1620
+ am: "a.m.",
1621
+ pm: "p.m.",
1622
+ midnight: "midnight",
1623
+ noon: "noon",
1624
+ morning: "morning",
1625
+ afternoon: "afternoon",
1626
+ evening: "evening",
1627
+ night: "night",
1628
+ },
1629
+ };
1630
+
1631
+ const formattingDayPeriodValues$1 = {
1632
+ narrow: {
1633
+ am: "a",
1634
+ pm: "p",
1635
+ midnight: "mi",
1636
+ noon: "n",
1637
+ morning: "in the morning",
1638
+ afternoon: "in the afternoon",
1639
+ evening: "in the evening",
1640
+ night: "at night",
1641
+ },
1642
+ abbreviated: {
1643
+ am: "AM",
1644
+ pm: "PM",
1645
+ midnight: "midnight",
1646
+ noon: "noon",
1647
+ morning: "in the morning",
1648
+ afternoon: "in the afternoon",
1649
+ evening: "in the evening",
1650
+ night: "at night",
1651
+ },
1652
+ wide: {
1653
+ am: "a.m.",
1654
+ pm: "p.m.",
1655
+ midnight: "midnight",
1656
+ noon: "noon",
1657
+ morning: "in the morning",
1658
+ afternoon: "in the afternoon",
1659
+ evening: "in the evening",
1660
+ night: "at night",
1661
+ },
1662
+ };
1663
+
1664
+ const ordinalNumber$1 = (dirtyNumber, _options) => {
1665
+ const number = Number(dirtyNumber);
1666
+
1667
+ // If ordinal numbers depend on context, for example,
1668
+ // if they are different for different grammatical genders,
1669
+ // use `options.unit`.
1670
+ //
1671
+ // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
1672
+ // 'day', 'hour', 'minute', 'second'.
1673
+
1674
+ const rem100 = number % 100;
1675
+ if (rem100 > 20 || rem100 < 10) {
1676
+ switch (rem100 % 10) {
1677
+ case 1:
1678
+ return number + "st";
1679
+ case 2:
1680
+ return number + "nd";
1681
+ case 3:
1682
+ return number + "rd";
1683
+ }
1684
+ }
1685
+ return number + "th";
1686
+ };
1687
+
1688
+ const localize$1 = {
1689
+ ordinalNumber: ordinalNumber$1,
1690
+
1691
+ era: buildLocalizeFn({
1692
+ values: eraValues$1,
1693
+ defaultWidth: "wide",
1694
+ }),
1695
+
1696
+ quarter: buildLocalizeFn({
1697
+ values: quarterValues$1,
1698
+ defaultWidth: "wide",
1699
+ argumentCallback: (quarter) => quarter - 1,
1700
+ }),
1701
+
1702
+ month: buildLocalizeFn({
1703
+ values: monthValues$1,
1704
+ defaultWidth: "wide",
1705
+ }),
1706
+
1707
+ day: buildLocalizeFn({
1708
+ values: dayValues$1,
1709
+ defaultWidth: "wide",
1710
+ }),
1711
+
1712
+ dayPeriod: buildLocalizeFn({
1713
+ values: dayPeriodValues$1,
1714
+ defaultWidth: "wide",
1715
+ formattingValues: formattingDayPeriodValues$1,
1716
+ defaultFormattingWidth: "wide",
1717
+ }),
1718
+ };
1719
+
1720
+ function buildMatchFn(args) {
1721
+ return (string, options = {}) => {
1722
+ const width = options.width;
1723
+
1724
+ const matchPattern =
1725
+ (width && args.matchPatterns[width]) ||
1726
+ args.matchPatterns[args.defaultMatchWidth];
1727
+ const matchResult = string.match(matchPattern);
1728
+
1729
+ if (!matchResult) {
1730
+ return null;
1731
+ }
1732
+ const matchedString = matchResult[0];
1733
+
1734
+ const parsePatterns =
1735
+ (width && args.parsePatterns[width]) ||
1736
+ args.parsePatterns[args.defaultParseWidth];
1737
+
1738
+ const key = Array.isArray(parsePatterns)
1739
+ ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))
1740
+ : // [TODO] -- I challenge you to fix the type
1741
+ findKey(parsePatterns, (pattern) => pattern.test(matchedString));
1742
+
1743
+ let value;
1744
+
1745
+ value = args.valueCallback ? args.valueCallback(key) : key;
1746
+ value = options.valueCallback
1747
+ ? // [TODO] -- I challenge you to fix the type
1748
+ options.valueCallback(value)
1749
+ : value;
1750
+
1751
+ const rest = string.slice(matchedString.length);
1752
+
1753
+ return { value, rest };
1754
+ };
1755
+ }
1756
+
1757
+ function findKey(object, predicate) {
1758
+ for (const key in object) {
1759
+ if (
1760
+ Object.prototype.hasOwnProperty.call(object, key) &&
1761
+ predicate(object[key])
1762
+ ) {
1763
+ return key;
1764
+ }
1765
+ }
1766
+ return undefined;
1767
+ }
1768
+
1769
+ function findIndex(array, predicate) {
1770
+ for (let key = 0; key < array.length; key++) {
1771
+ if (predicate(array[key])) {
1772
+ return key;
1773
+ }
1774
+ }
1775
+ return undefined;
1776
+ }
1777
+
1778
+ function buildMatchPatternFn(args) {
1779
+ return (string, options = {}) => {
1780
+ const matchResult = string.match(args.matchPattern);
1781
+ if (!matchResult) return null;
1782
+ const matchedString = matchResult[0];
1783
+
1784
+ const parseResult = string.match(args.parsePattern);
1785
+ if (!parseResult) return null;
1786
+ let value = args.valueCallback
1787
+ ? args.valueCallback(parseResult[0])
1788
+ : parseResult[0];
1789
+
1790
+ // [TODO] I challenge you to fix the type
1791
+ value = options.valueCallback ? options.valueCallback(value) : value;
1792
+
1793
+ const rest = string.slice(matchedString.length);
1794
+
1795
+ return { value, rest };
1796
+ };
1797
+ }
1798
+
1799
+ const matchOrdinalNumberPattern$1 = /^(\d+)(th|st|nd|rd)?/i;
1800
+ const parseOrdinalNumberPattern$1 = /\d+/i;
1801
+
1802
+ const matchEraPatterns$1 = {
1803
+ narrow: /^(b|a)/i,
1804
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
1805
+ wide: /^(before christ|before common era|anno domini|common era)/i,
1806
+ };
1807
+ const parseEraPatterns$1 = {
1808
+ any: [/^b/i, /^(a|c)/i],
1809
+ };
1810
+
1811
+ const matchQuarterPatterns$1 = {
1812
+ narrow: /^[1234]/i,
1813
+ abbreviated: /^q[1234]/i,
1814
+ wide: /^[1234](th|st|nd|rd)? quarter/i,
1815
+ };
1816
+ const parseQuarterPatterns$1 = {
1817
+ any: [/1/i, /2/i, /3/i, /4/i],
1818
+ };
1819
+
1820
+ const matchMonthPatterns$1 = {
1821
+ narrow: /^[jfmasond]/i,
1822
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
1823
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,
1824
+ };
1825
+ const parseMonthPatterns$1 = {
1826
+ narrow: [
1827
+ /^j/i,
1828
+ /^f/i,
1829
+ /^m/i,
1830
+ /^a/i,
1831
+ /^m/i,
1832
+ /^j/i,
1833
+ /^j/i,
1834
+ /^a/i,
1835
+ /^s/i,
1836
+ /^o/i,
1837
+ /^n/i,
1838
+ /^d/i,
1839
+ ],
1840
+
1841
+ any: [
1842
+ /^ja/i,
1843
+ /^f/i,
1844
+ /^mar/i,
1845
+ /^ap/i,
1846
+ /^may/i,
1847
+ /^jun/i,
1848
+ /^jul/i,
1849
+ /^au/i,
1850
+ /^s/i,
1851
+ /^o/i,
1852
+ /^n/i,
1853
+ /^d/i,
1854
+ ],
1855
+ };
1856
+
1857
+ const matchDayPatterns$1 = {
1858
+ narrow: /^[smtwf]/i,
1859
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
1860
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
1861
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,
1862
+ };
1863
+ const parseDayPatterns$1 = {
1864
+ narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
1865
+ any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],
1866
+ };
1867
+
1868
+ const matchDayPeriodPatterns$1 = {
1869
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
1870
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,
1871
+ };
1872
+ const parseDayPeriodPatterns$1 = {
1873
+ any: {
1874
+ am: /^a/i,
1875
+ pm: /^p/i,
1876
+ midnight: /^mi/i,
1877
+ noon: /^no/i,
1878
+ morning: /morning/i,
1879
+ afternoon: /afternoon/i,
1880
+ evening: /evening/i,
1881
+ night: /night/i,
1882
+ },
1883
+ };
1884
+
1885
+ const match$1 = {
1886
+ ordinalNumber: buildMatchPatternFn({
1887
+ matchPattern: matchOrdinalNumberPattern$1,
1888
+ parsePattern: parseOrdinalNumberPattern$1,
1889
+ valueCallback: (value) => parseInt(value, 10),
1890
+ }),
1891
+
1892
+ era: buildMatchFn({
1893
+ matchPatterns: matchEraPatterns$1,
1894
+ defaultMatchWidth: "wide",
1895
+ parsePatterns: parseEraPatterns$1,
1896
+ defaultParseWidth: "any",
1897
+ }),
1898
+
1899
+ quarter: buildMatchFn({
1900
+ matchPatterns: matchQuarterPatterns$1,
1901
+ defaultMatchWidth: "wide",
1902
+ parsePatterns: parseQuarterPatterns$1,
1903
+ defaultParseWidth: "any",
1904
+ valueCallback: (index) => index + 1,
1905
+ }),
1906
+
1907
+ month: buildMatchFn({
1908
+ matchPatterns: matchMonthPatterns$1,
1909
+ defaultMatchWidth: "wide",
1910
+ parsePatterns: parseMonthPatterns$1,
1911
+ defaultParseWidth: "any",
1912
+ }),
1913
+
1914
+ day: buildMatchFn({
1915
+ matchPatterns: matchDayPatterns$1,
1916
+ defaultMatchWidth: "wide",
1917
+ parsePatterns: parseDayPatterns$1,
1918
+ defaultParseWidth: "any",
1919
+ }),
1920
+
1921
+ dayPeriod: buildMatchFn({
1922
+ matchPatterns: matchDayPeriodPatterns$1,
1923
+ defaultMatchWidth: "any",
1924
+ parsePatterns: parseDayPeriodPatterns$1,
1925
+ defaultParseWidth: "any",
1926
+ }),
1927
+ };
1928
+
1929
+ /**
1930
+ * @category Locales
1931
+ * @summary English locale (United States).
1932
+ * @language English
1933
+ * @iso-639-2 eng
1934
+ * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)
1935
+ * @author Lesha Koss [@leshakoss](https://github.com/leshakoss)
1936
+ */
1937
+ const enUS = {
1938
+ code: "en-US",
1939
+ formatDistance: formatDistance$1,
1940
+ formatLong: formatLong$1,
1941
+ formatRelative: formatRelative$1,
1942
+ localize: localize$1,
1943
+ match: match$1,
1944
+ options: {
1945
+ weekStartsOn: 0 /* Sunday */,
1946
+ firstWeekContainsDate: 1,
1947
+ },
1948
+ };
1949
+
1950
+ /**
1951
+ * The {@link getDayOfYear} function options.
1952
+ */
1953
+
1954
+ /**
1955
+ * @name getDayOfYear
1956
+ * @category Day Helpers
1957
+ * @summary Get the day of the year of the given date.
1958
+ *
1959
+ * @description
1960
+ * Get the day of the year of the given date.
1961
+ *
1962
+ * @param date - The given date
1963
+ * @param options - The options
1964
+ *
1965
+ * @returns The day of year
1966
+ *
1967
+ * @example
1968
+ * // Which day of the year is 2 July 2014?
1969
+ * const result = getDayOfYear(new Date(2014, 6, 2))
1970
+ * //=> 183
1971
+ */
1972
+ function getDayOfYear(date, options) {
1973
+ const _date = toDate(date, options?.in);
1974
+ const diff = differenceInCalendarDays(_date, startOfYear(_date));
1975
+ const dayOfYear = diff + 1;
1976
+ return dayOfYear;
1977
+ }
1978
+
1979
+ /**
1980
+ * The {@link getISOWeek} function options.
1981
+ */
1982
+
1983
+ /**
1984
+ * @name getISOWeek
1985
+ * @category ISO Week Helpers
1986
+ * @summary Get the ISO week of the given date.
1987
+ *
1988
+ * @description
1989
+ * Get the ISO week of the given date.
1990
+ *
1991
+ * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
1992
+ *
1993
+ * @param date - The given date
1994
+ * @param options - The options
1995
+ *
1996
+ * @returns The ISO week
1997
+ *
1998
+ * @example
1999
+ * // Which week of the ISO-week numbering year is 2 January 2005?
2000
+ * const result = getISOWeek(new Date(2005, 0, 2))
2001
+ * //=> 53
2002
+ */
2003
+ function getISOWeek(date, options) {
2004
+ const _date = toDate(date, options?.in);
2005
+ const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);
2006
+
2007
+ // Round the number of weeks to the nearest integer because the number of
2008
+ // milliseconds in a week is not constant (e.g. it's different in the week of
2009
+ // the daylight saving time clock shift).
2010
+ return Math.round(diff / millisecondsInWeek) + 1;
2011
+ }
2012
+
2013
+ /**
2014
+ * The {@link getWeekYear} function options.
2015
+ */
2016
+
2017
+ /**
2018
+ * @name getWeekYear
2019
+ * @category Week-Numbering Year Helpers
2020
+ * @summary Get the local week-numbering year of the given date.
2021
+ *
2022
+ * @description
2023
+ * Get the local week-numbering year of the given date.
2024
+ * The exact calculation depends on the values of
2025
+ * `options.weekStartsOn` (which is the index of the first day of the week)
2026
+ * and `options.firstWeekContainsDate` (which is the day of January, which is always in
2027
+ * the first week of the week-numbering year)
2028
+ *
2029
+ * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
2030
+ *
2031
+ * @param date - The given date
2032
+ * @param options - An object with options.
2033
+ *
2034
+ * @returns The local week-numbering year
2035
+ *
2036
+ * @example
2037
+ * // Which week numbering year is 26 December 2004 with the default settings?
2038
+ * const result = getWeekYear(new Date(2004, 11, 26))
2039
+ * //=> 2005
2040
+ *
2041
+ * @example
2042
+ * // Which week numbering year is 26 December 2004 if week starts on Saturday?
2043
+ * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })
2044
+ * //=> 2004
2045
+ *
2046
+ * @example
2047
+ * // Which week numbering year is 26 December 2004 if the first week contains 4 January?
2048
+ * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })
2049
+ * //=> 2004
2050
+ */
2051
+ function getWeekYear(date, options) {
2052
+ const _date = toDate(date, options?.in);
2053
+ const year = _date.getFullYear();
2054
+
2055
+ const defaultOptions = getDefaultOptions();
2056
+ const firstWeekContainsDate =
2057
+ options?.firstWeekContainsDate ??
2058
+ options?.locale?.options?.firstWeekContainsDate ??
2059
+ defaultOptions.firstWeekContainsDate ??
2060
+ defaultOptions.locale?.options?.firstWeekContainsDate ??
2061
+ 1;
2062
+
2063
+ const firstWeekOfNextYear = constructFrom(options?.in || date, 0);
2064
+ firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);
2065
+ firstWeekOfNextYear.setHours(0, 0, 0, 0);
2066
+ const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);
2067
+
2068
+ const firstWeekOfThisYear = constructFrom(options?.in || date, 0);
2069
+ firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);
2070
+ firstWeekOfThisYear.setHours(0, 0, 0, 0);
2071
+ const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);
2072
+
2073
+ if (+_date >= +startOfNextYear) {
2074
+ return year + 1;
2075
+ } else if (+_date >= +startOfThisYear) {
2076
+ return year;
2077
+ } else {
2078
+ return year - 1;
2079
+ }
2080
+ }
2081
+
2082
+ /**
2083
+ * The {@link startOfWeekYear} function options.
2084
+ */
2085
+
2086
+ /**
2087
+ * @name startOfWeekYear
2088
+ * @category Week-Numbering Year Helpers
2089
+ * @summary Return the start of a local week-numbering year for the given date.
2090
+ *
2091
+ * @description
2092
+ * Return the start of a local week-numbering year.
2093
+ * The exact calculation depends on the values of
2094
+ * `options.weekStartsOn` (which is the index of the first day of the week)
2095
+ * and `options.firstWeekContainsDate` (which is the day of January, which is always in
2096
+ * the first week of the week-numbering year)
2097
+ *
2098
+ * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
2099
+ *
2100
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
2101
+ * @typeParam ResultDate - The result `Date` type.
2102
+ *
2103
+ * @param date - The original date
2104
+ * @param options - An object with options
2105
+ *
2106
+ * @returns The start of a week-numbering year
2107
+ *
2108
+ * @example
2109
+ * // The start of an a week-numbering year for 2 July 2005 with default settings:
2110
+ * const result = startOfWeekYear(new Date(2005, 6, 2))
2111
+ * //=> Sun Dec 26 2004 00:00:00
2112
+ *
2113
+ * @example
2114
+ * // The start of a week-numbering year for 2 July 2005
2115
+ * // if Monday is the first day of week
2116
+ * // and 4 January is always in the first week of the year:
2117
+ * const result = startOfWeekYear(new Date(2005, 6, 2), {
2118
+ * weekStartsOn: 1,
2119
+ * firstWeekContainsDate: 4
2120
+ * })
2121
+ * //=> Mon Jan 03 2005 00:00:00
2122
+ */
2123
+ function startOfWeekYear(date, options) {
2124
+ const defaultOptions = getDefaultOptions();
2125
+ const firstWeekContainsDate =
2126
+ options?.firstWeekContainsDate ??
2127
+ options?.locale?.options?.firstWeekContainsDate ??
2128
+ defaultOptions.firstWeekContainsDate ??
2129
+ defaultOptions.locale?.options?.firstWeekContainsDate ??
2130
+ 1;
2131
+
2132
+ const year = getWeekYear(date, options);
2133
+ const firstWeek = constructFrom(options?.in || date, 0);
2134
+ firstWeek.setFullYear(year, 0, firstWeekContainsDate);
2135
+ firstWeek.setHours(0, 0, 0, 0);
2136
+ const _date = startOfWeek(firstWeek, options);
2137
+ return _date;
2138
+ }
2139
+
2140
+ /**
2141
+ * The {@link getWeek} function options.
2142
+ */
2143
+
2144
+ /**
2145
+ * @name getWeek
2146
+ * @category Week Helpers
2147
+ * @summary Get the local week index of the given date.
2148
+ *
2149
+ * @description
2150
+ * Get the local week index of the given date.
2151
+ * The exact calculation depends on the values of
2152
+ * `options.weekStartsOn` (which is the index of the first day of the week)
2153
+ * and `options.firstWeekContainsDate` (which is the day of January, which is always in
2154
+ * the first week of the week-numbering year)
2155
+ *
2156
+ * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
2157
+ *
2158
+ * @param date - The given date
2159
+ * @param options - An object with options
2160
+ *
2161
+ * @returns The week
2162
+ *
2163
+ * @example
2164
+ * // Which week of the local week numbering year is 2 January 2005 with default options?
2165
+ * const result = getWeek(new Date(2005, 0, 2))
2166
+ * //=> 2
2167
+ *
2168
+ * @example
2169
+ * // Which week of the local week numbering year is 2 January 2005,
2170
+ * // if Monday is the first day of the week,
2171
+ * // and the first week of the year always contains 4 January?
2172
+ * const result = getWeek(new Date(2005, 0, 2), {
2173
+ * weekStartsOn: 1,
2174
+ * firstWeekContainsDate: 4
2175
+ * })
2176
+ * //=> 53
2177
+ */
2178
+ function getWeek(date, options) {
2179
+ const _date = toDate(date, options?.in);
2180
+ const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);
2181
+
2182
+ // Round the number of weeks to the nearest integer because the number of
2183
+ // milliseconds in a week is not constant (e.g. it's different in the week of
2184
+ // the daylight saving time clock shift).
2185
+ return Math.round(diff / millisecondsInWeek) + 1;
2186
+ }
2187
+
2188
+ function addLeadingZeros(number, targetLength) {
2189
+ const sign = number < 0 ? "-" : "";
2190
+ const output = Math.abs(number).toString().padStart(targetLength, "0");
2191
+ return sign + output;
2192
+ }
2193
+
2194
+ /*
2195
+ * | | Unit | | Unit |
2196
+ * |-----|--------------------------------|-----|--------------------------------|
2197
+ * | a | AM, PM | A* | |
2198
+ * | d | Day of month | D | |
2199
+ * | h | Hour [1-12] | H | Hour [0-23] |
2200
+ * | m | Minute | M | Month |
2201
+ * | s | Second | S | Fraction of second |
2202
+ * | y | Year (abs) | Y | |
2203
+ *
2204
+ * Letters marked by * are not implemented but reserved by Unicode standard.
2205
+ */
2206
+
2207
+ const lightFormatters = {
2208
+ // Year
2209
+ y(date, token) {
2210
+ // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
2211
+ // | Year | y | yy | yyy | yyyy | yyyyy |
2212
+ // |----------|-------|----|-------|-------|-------|
2213
+ // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |
2214
+ // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |
2215
+ // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |
2216
+ // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |
2217
+ // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
2218
+
2219
+ const signedYear = date.getFullYear();
2220
+ // Returns 1 for 1 BC (which is year 0 in JavaScript)
2221
+ const year = signedYear > 0 ? signedYear : 1 - signedYear;
2222
+ return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
2223
+ },
2224
+
2225
+ // Month
2226
+ M(date, token) {
2227
+ const month = date.getMonth();
2228
+ return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
2229
+ },
2230
+
2231
+ // Day of the month
2232
+ d(date, token) {
2233
+ return addLeadingZeros(date.getDate(), token.length);
2234
+ },
2235
+
2236
+ // AM or PM
2237
+ a(date, token) {
2238
+ const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? "pm" : "am";
2239
+
2240
+ switch (token) {
2241
+ case "a":
2242
+ case "aa":
2243
+ return dayPeriodEnumValue.toUpperCase();
2244
+ case "aaa":
2245
+ return dayPeriodEnumValue;
2246
+ case "aaaaa":
2247
+ return dayPeriodEnumValue[0];
2248
+ case "aaaa":
2249
+ default:
2250
+ return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
2251
+ }
2252
+ },
2253
+
2254
+ // Hour [1-12]
2255
+ h(date, token) {
2256
+ return addLeadingZeros(date.getHours() % 12 || 12, token.length);
2257
+ },
2258
+
2259
+ // Hour [0-23]
2260
+ H(date, token) {
2261
+ return addLeadingZeros(date.getHours(), token.length);
2262
+ },
2263
+
2264
+ // Minute
2265
+ m(date, token) {
2266
+ return addLeadingZeros(date.getMinutes(), token.length);
2267
+ },
2268
+
2269
+ // Second
2270
+ s(date, token) {
2271
+ return addLeadingZeros(date.getSeconds(), token.length);
2272
+ },
2273
+
2274
+ // Fraction of second
2275
+ S(date, token) {
2276
+ const numberOfDigits = token.length;
2277
+ const milliseconds = date.getMilliseconds();
2278
+ const fractionalSeconds = Math.trunc(
2279
+ milliseconds * Math.pow(10, numberOfDigits - 3),
2280
+ );
2281
+ return addLeadingZeros(fractionalSeconds, token.length);
2282
+ },
2283
+ };
2284
+
2285
+ const dayPeriodEnum = {
2286
+ midnight: "midnight",
2287
+ noon: "noon",
2288
+ morning: "morning",
2289
+ afternoon: "afternoon",
2290
+ evening: "evening",
2291
+ night: "night",
2292
+ };
2293
+
2294
+ /*
2295
+ * | | Unit | | Unit |
2296
+ * |-----|--------------------------------|-----|--------------------------------|
2297
+ * | a | AM, PM | A* | Milliseconds in day |
2298
+ * | b | AM, PM, noon, midnight | B | Flexible day period |
2299
+ * | c | Stand-alone local day of week | C* | Localized hour w/ day period |
2300
+ * | d | Day of month | D | Day of year |
2301
+ * | e | Local day of week | E | Day of week |
2302
+ * | f | | F* | Day of week in month |
2303
+ * | g* | Modified Julian day | G | Era |
2304
+ * | h | Hour [1-12] | H | Hour [0-23] |
2305
+ * | i! | ISO day of week | I! | ISO week of year |
2306
+ * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |
2307
+ * | k | Hour [1-24] | K | Hour [0-11] |
2308
+ * | l* | (deprecated) | L | Stand-alone month |
2309
+ * | m | Minute | M | Month |
2310
+ * | n | | N | |
2311
+ * | o! | Ordinal number modifier | O | Timezone (GMT) |
2312
+ * | p! | Long localized time | P! | Long localized date |
2313
+ * | q | Stand-alone quarter | Q | Quarter |
2314
+ * | r* | Related Gregorian year | R! | ISO week-numbering year |
2315
+ * | s | Second | S | Fraction of second |
2316
+ * | t! | Seconds timestamp | T! | Milliseconds timestamp |
2317
+ * | u | Extended year | U* | Cyclic year |
2318
+ * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |
2319
+ * | w | Local week of year | W* | Week of month |
2320
+ * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |
2321
+ * | y | Year (abs) | Y | Local week-numbering year |
2322
+ * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |
2323
+ *
2324
+ * Letters marked by * are not implemented but reserved by Unicode standard.
2325
+ *
2326
+ * Letters marked by ! are non-standard, but implemented by date-fns:
2327
+ * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)
2328
+ * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,
2329
+ * i.e. 7 for Sunday, 1 for Monday, etc.
2330
+ * - `I` is ISO week of year, as opposed to `w` which is local week of year.
2331
+ * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.
2332
+ * `R` is supposed to be used in conjunction with `I` and `i`
2333
+ * for universal ISO week-numbering date, whereas
2334
+ * `Y` is supposed to be used in conjunction with `w` and `e`
2335
+ * for week-numbering date specific to the locale.
2336
+ * - `P` is long localized date format
2337
+ * - `p` is long localized time format
2338
+ */
2339
+
2340
+ const formatters = {
2341
+ // Era
2342
+ G: function (date, token, localize) {
2343
+ const era = date.getFullYear() > 0 ? 1 : 0;
2344
+ switch (token) {
2345
+ // AD, BC
2346
+ case "G":
2347
+ case "GG":
2348
+ case "GGG":
2349
+ return localize.era(era, { width: "abbreviated" });
2350
+ // A, B
2351
+ case "GGGGG":
2352
+ return localize.era(era, { width: "narrow" });
2353
+ // Anno Domini, Before Christ
2354
+ case "GGGG":
2355
+ default:
2356
+ return localize.era(era, { width: "wide" });
2357
+ }
2358
+ },
2359
+
2360
+ // Year
2361
+ y: function (date, token, localize) {
2362
+ // Ordinal number
2363
+ if (token === "yo") {
2364
+ const signedYear = date.getFullYear();
2365
+ // Returns 1 for 1 BC (which is year 0 in JavaScript)
2366
+ const year = signedYear > 0 ? signedYear : 1 - signedYear;
2367
+ return localize.ordinalNumber(year, { unit: "year" });
2368
+ }
2369
+
2370
+ return lightFormatters.y(date, token);
2371
+ },
2372
+
2373
+ // Local week-numbering year
2374
+ Y: function (date, token, localize, options) {
2375
+ const signedWeekYear = getWeekYear(date, options);
2376
+ // Returns 1 for 1 BC (which is year 0 in JavaScript)
2377
+ const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
2378
+
2379
+ // Two digit year
2380
+ if (token === "YY") {
2381
+ const twoDigitYear = weekYear % 100;
2382
+ return addLeadingZeros(twoDigitYear, 2);
2383
+ }
2384
+
2385
+ // Ordinal number
2386
+ if (token === "Yo") {
2387
+ return localize.ordinalNumber(weekYear, { unit: "year" });
2388
+ }
2389
+
2390
+ // Padding
2391
+ return addLeadingZeros(weekYear, token.length);
2392
+ },
2393
+
2394
+ // ISO week-numbering year
2395
+ R: function (date, token) {
2396
+ const isoWeekYear = getISOWeekYear(date);
2397
+
2398
+ // Padding
2399
+ return addLeadingZeros(isoWeekYear, token.length);
2400
+ },
2401
+
2402
+ // Extended year. This is a single number designating the year of this calendar system.
2403
+ // The main difference between `y` and `u` localizers are B.C. years:
2404
+ // | Year | `y` | `u` |
2405
+ // |------|-----|-----|
2406
+ // | AC 1 | 1 | 1 |
2407
+ // | BC 1 | 1 | 0 |
2408
+ // | BC 2 | 2 | -1 |
2409
+ // Also `yy` always returns the last two digits of a year,
2410
+ // while `uu` pads single digit years to 2 characters and returns other years unchanged.
2411
+ u: function (date, token) {
2412
+ const year = date.getFullYear();
2413
+ return addLeadingZeros(year, token.length);
2414
+ },
2415
+
2416
+ // Quarter
2417
+ Q: function (date, token, localize) {
2418
+ const quarter = Math.ceil((date.getMonth() + 1) / 3);
2419
+ switch (token) {
2420
+ // 1, 2, 3, 4
2421
+ case "Q":
2422
+ return String(quarter);
2423
+ // 01, 02, 03, 04
2424
+ case "QQ":
2425
+ return addLeadingZeros(quarter, 2);
2426
+ // 1st, 2nd, 3rd, 4th
2427
+ case "Qo":
2428
+ return localize.ordinalNumber(quarter, { unit: "quarter" });
2429
+ // Q1, Q2, Q3, Q4
2430
+ case "QQQ":
2431
+ return localize.quarter(quarter, {
2432
+ width: "abbreviated",
2433
+ context: "formatting",
2434
+ });
2435
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
2436
+ case "QQQQQ":
2437
+ return localize.quarter(quarter, {
2438
+ width: "narrow",
2439
+ context: "formatting",
2440
+ });
2441
+ // 1st quarter, 2nd quarter, ...
2442
+ case "QQQQ":
2443
+ default:
2444
+ return localize.quarter(quarter, {
2445
+ width: "wide",
2446
+ context: "formatting",
2447
+ });
2448
+ }
2449
+ },
2450
+
2451
+ // Stand-alone quarter
2452
+ q: function (date, token, localize) {
2453
+ const quarter = Math.ceil((date.getMonth() + 1) / 3);
2454
+ switch (token) {
2455
+ // 1, 2, 3, 4
2456
+ case "q":
2457
+ return String(quarter);
2458
+ // 01, 02, 03, 04
2459
+ case "qq":
2460
+ return addLeadingZeros(quarter, 2);
2461
+ // 1st, 2nd, 3rd, 4th
2462
+ case "qo":
2463
+ return localize.ordinalNumber(quarter, { unit: "quarter" });
2464
+ // Q1, Q2, Q3, Q4
2465
+ case "qqq":
2466
+ return localize.quarter(quarter, {
2467
+ width: "abbreviated",
2468
+ context: "standalone",
2469
+ });
2470
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
2471
+ case "qqqqq":
2472
+ return localize.quarter(quarter, {
2473
+ width: "narrow",
2474
+ context: "standalone",
2475
+ });
2476
+ // 1st quarter, 2nd quarter, ...
2477
+ case "qqqq":
2478
+ default:
2479
+ return localize.quarter(quarter, {
2480
+ width: "wide",
2481
+ context: "standalone",
2482
+ });
2483
+ }
2484
+ },
2485
+
2486
+ // Month
2487
+ M: function (date, token, localize) {
2488
+ const month = date.getMonth();
2489
+ switch (token) {
2490
+ case "M":
2491
+ case "MM":
2492
+ return lightFormatters.M(date, token);
2493
+ // 1st, 2nd, ..., 12th
2494
+ case "Mo":
2495
+ return localize.ordinalNumber(month + 1, { unit: "month" });
2496
+ // Jan, Feb, ..., Dec
2497
+ case "MMM":
2498
+ return localize.month(month, {
2499
+ width: "abbreviated",
2500
+ context: "formatting",
2501
+ });
2502
+ // J, F, ..., D
2503
+ case "MMMMM":
2504
+ return localize.month(month, {
2505
+ width: "narrow",
2506
+ context: "formatting",
2507
+ });
2508
+ // January, February, ..., December
2509
+ case "MMMM":
2510
+ default:
2511
+ return localize.month(month, { width: "wide", context: "formatting" });
2512
+ }
2513
+ },
2514
+
2515
+ // Stand-alone month
2516
+ L: function (date, token, localize) {
2517
+ const month = date.getMonth();
2518
+ switch (token) {
2519
+ // 1, 2, ..., 12
2520
+ case "L":
2521
+ return String(month + 1);
2522
+ // 01, 02, ..., 12
2523
+ case "LL":
2524
+ return addLeadingZeros(month + 1, 2);
2525
+ // 1st, 2nd, ..., 12th
2526
+ case "Lo":
2527
+ return localize.ordinalNumber(month + 1, { unit: "month" });
2528
+ // Jan, Feb, ..., Dec
2529
+ case "LLL":
2530
+ return localize.month(month, {
2531
+ width: "abbreviated",
2532
+ context: "standalone",
2533
+ });
2534
+ // J, F, ..., D
2535
+ case "LLLLL":
2536
+ return localize.month(month, {
2537
+ width: "narrow",
2538
+ context: "standalone",
2539
+ });
2540
+ // January, February, ..., December
2541
+ case "LLLL":
2542
+ default:
2543
+ return localize.month(month, { width: "wide", context: "standalone" });
2544
+ }
2545
+ },
2546
+
2547
+ // Local week of year
2548
+ w: function (date, token, localize, options) {
2549
+ const week = getWeek(date, options);
2550
+
2551
+ if (token === "wo") {
2552
+ return localize.ordinalNumber(week, { unit: "week" });
2553
+ }
2554
+
2555
+ return addLeadingZeros(week, token.length);
2556
+ },
2557
+
2558
+ // ISO week of year
2559
+ I: function (date, token, localize) {
2560
+ const isoWeek = getISOWeek(date);
2561
+
2562
+ if (token === "Io") {
2563
+ return localize.ordinalNumber(isoWeek, { unit: "week" });
2564
+ }
2565
+
2566
+ return addLeadingZeros(isoWeek, token.length);
2567
+ },
2568
+
2569
+ // Day of the month
2570
+ d: function (date, token, localize) {
2571
+ if (token === "do") {
2572
+ return localize.ordinalNumber(date.getDate(), { unit: "date" });
2573
+ }
2574
+
2575
+ return lightFormatters.d(date, token);
2576
+ },
2577
+
2578
+ // Day of year
2579
+ D: function (date, token, localize) {
2580
+ const dayOfYear = getDayOfYear(date);
2581
+
2582
+ if (token === "Do") {
2583
+ return localize.ordinalNumber(dayOfYear, { unit: "dayOfYear" });
2584
+ }
2585
+
2586
+ return addLeadingZeros(dayOfYear, token.length);
2587
+ },
2588
+
2589
+ // Day of week
2590
+ E: function (date, token, localize) {
2591
+ const dayOfWeek = date.getDay();
2592
+ switch (token) {
2593
+ // Tue
2594
+ case "E":
2595
+ case "EE":
2596
+ case "EEE":
2597
+ return localize.day(dayOfWeek, {
2598
+ width: "abbreviated",
2599
+ context: "formatting",
2600
+ });
2601
+ // T
2602
+ case "EEEEE":
2603
+ return localize.day(dayOfWeek, {
2604
+ width: "narrow",
2605
+ context: "formatting",
2606
+ });
2607
+ // Tu
2608
+ case "EEEEEE":
2609
+ return localize.day(dayOfWeek, {
2610
+ width: "short",
2611
+ context: "formatting",
2612
+ });
2613
+ // Tuesday
2614
+ case "EEEE":
2615
+ default:
2616
+ return localize.day(dayOfWeek, {
2617
+ width: "wide",
2618
+ context: "formatting",
2619
+ });
2620
+ }
2621
+ },
2622
+
2623
+ // Local day of week
2624
+ e: function (date, token, localize, options) {
2625
+ const dayOfWeek = date.getDay();
2626
+ const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
2627
+ switch (token) {
2628
+ // Numerical value (Nth day of week with current locale or weekStartsOn)
2629
+ case "e":
2630
+ return String(localDayOfWeek);
2631
+ // Padded numerical value
2632
+ case "ee":
2633
+ return addLeadingZeros(localDayOfWeek, 2);
2634
+ // 1st, 2nd, ..., 7th
2635
+ case "eo":
2636
+ return localize.ordinalNumber(localDayOfWeek, { unit: "day" });
2637
+ case "eee":
2638
+ return localize.day(dayOfWeek, {
2639
+ width: "abbreviated",
2640
+ context: "formatting",
2641
+ });
2642
+ // T
2643
+ case "eeeee":
2644
+ return localize.day(dayOfWeek, {
2645
+ width: "narrow",
2646
+ context: "formatting",
2647
+ });
2648
+ // Tu
2649
+ case "eeeeee":
2650
+ return localize.day(dayOfWeek, {
2651
+ width: "short",
2652
+ context: "formatting",
2653
+ });
2654
+ // Tuesday
2655
+ case "eeee":
2656
+ default:
2657
+ return localize.day(dayOfWeek, {
2658
+ width: "wide",
2659
+ context: "formatting",
2660
+ });
2661
+ }
2662
+ },
790
2663
 
791
- /**
792
- * The map of localized values for each width.
793
- */
2664
+ // Stand-alone local day of week
2665
+ c: function (date, token, localize, options) {
2666
+ const dayOfWeek = date.getDay();
2667
+ const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
2668
+ switch (token) {
2669
+ // Numerical value (same as in `e`)
2670
+ case "c":
2671
+ return String(localDayOfWeek);
2672
+ // Padded numerical value
2673
+ case "cc":
2674
+ return addLeadingZeros(localDayOfWeek, token.length);
2675
+ // 1st, 2nd, ..., 7th
2676
+ case "co":
2677
+ return localize.ordinalNumber(localDayOfWeek, { unit: "day" });
2678
+ case "ccc":
2679
+ return localize.day(dayOfWeek, {
2680
+ width: "abbreviated",
2681
+ context: "standalone",
2682
+ });
2683
+ // T
2684
+ case "ccccc":
2685
+ return localize.day(dayOfWeek, {
2686
+ width: "narrow",
2687
+ context: "standalone",
2688
+ });
2689
+ // Tu
2690
+ case "cccccc":
2691
+ return localize.day(dayOfWeek, {
2692
+ width: "short",
2693
+ context: "standalone",
2694
+ });
2695
+ // Tuesday
2696
+ case "cccc":
2697
+ default:
2698
+ return localize.day(dayOfWeek, {
2699
+ width: "wide",
2700
+ context: "standalone",
2701
+ });
2702
+ }
2703
+ },
794
2704
 
795
- /**
796
- * The index type of the locale unit value. It types conversion of units of
797
- * values that don't start at 0 (i.e. quarters).
798
- */
2705
+ // ISO day of week
2706
+ i: function (date, token, localize) {
2707
+ const dayOfWeek = date.getDay();
2708
+ const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
2709
+ switch (token) {
2710
+ // 2
2711
+ case "i":
2712
+ return String(isoDayOfWeek);
2713
+ // 02
2714
+ case "ii":
2715
+ return addLeadingZeros(isoDayOfWeek, token.length);
2716
+ // 2nd
2717
+ case "io":
2718
+ return localize.ordinalNumber(isoDayOfWeek, { unit: "day" });
2719
+ // Tue
2720
+ case "iii":
2721
+ return localize.day(dayOfWeek, {
2722
+ width: "abbreviated",
2723
+ context: "formatting",
2724
+ });
2725
+ // T
2726
+ case "iiiii":
2727
+ return localize.day(dayOfWeek, {
2728
+ width: "narrow",
2729
+ context: "formatting",
2730
+ });
2731
+ // Tu
2732
+ case "iiiiii":
2733
+ return localize.day(dayOfWeek, {
2734
+ width: "short",
2735
+ context: "formatting",
2736
+ });
2737
+ // Tuesday
2738
+ case "iiii":
2739
+ default:
2740
+ return localize.day(dayOfWeek, {
2741
+ width: "wide",
2742
+ context: "formatting",
2743
+ });
2744
+ }
2745
+ },
799
2746
 
800
- /**
801
- * Converts the unit value to the tuple of values.
802
- */
2747
+ // AM or PM
2748
+ a: function (date, token, localize) {
2749
+ const hours = date.getHours();
2750
+ const dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
2751
+
2752
+ switch (token) {
2753
+ case "a":
2754
+ case "aa":
2755
+ return localize.dayPeriod(dayPeriodEnumValue, {
2756
+ width: "abbreviated",
2757
+ context: "formatting",
2758
+ });
2759
+ case "aaa":
2760
+ return localize
2761
+ .dayPeriod(dayPeriodEnumValue, {
2762
+ width: "abbreviated",
2763
+ context: "formatting",
2764
+ })
2765
+ .toLowerCase();
2766
+ case "aaaaa":
2767
+ return localize.dayPeriod(dayPeriodEnumValue, {
2768
+ width: "narrow",
2769
+ context: "formatting",
2770
+ });
2771
+ case "aaaa":
2772
+ default:
2773
+ return localize.dayPeriod(dayPeriodEnumValue, {
2774
+ width: "wide",
2775
+ context: "formatting",
2776
+ });
2777
+ }
2778
+ },
803
2779
 
804
- /**
805
- * The tuple of localized era values. The first element represents BC,
806
- * the second element represents AD.
807
- */
2780
+ // AM, PM, midnight, noon
2781
+ b: function (date, token, localize) {
2782
+ const hours = date.getHours();
2783
+ let dayPeriodEnumValue;
2784
+ if (hours === 12) {
2785
+ dayPeriodEnumValue = dayPeriodEnum.noon;
2786
+ } else if (hours === 0) {
2787
+ dayPeriodEnumValue = dayPeriodEnum.midnight;
2788
+ } else {
2789
+ dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
2790
+ }
808
2791
 
809
- /**
810
- * The tuple of localized quarter values. The first element represents Q1.
811
- */
2792
+ switch (token) {
2793
+ case "b":
2794
+ case "bb":
2795
+ return localize.dayPeriod(dayPeriodEnumValue, {
2796
+ width: "abbreviated",
2797
+ context: "formatting",
2798
+ });
2799
+ case "bbb":
2800
+ return localize
2801
+ .dayPeriod(dayPeriodEnumValue, {
2802
+ width: "abbreviated",
2803
+ context: "formatting",
2804
+ })
2805
+ .toLowerCase();
2806
+ case "bbbbb":
2807
+ return localize.dayPeriod(dayPeriodEnumValue, {
2808
+ width: "narrow",
2809
+ context: "formatting",
2810
+ });
2811
+ case "bbbb":
2812
+ default:
2813
+ return localize.dayPeriod(dayPeriodEnumValue, {
2814
+ width: "wide",
2815
+ context: "formatting",
2816
+ });
2817
+ }
2818
+ },
812
2819
 
813
- /**
814
- * The tuple of localized day values. The first element represents Sunday.
815
- */
2820
+ // in the morning, in the afternoon, in the evening, at night
2821
+ B: function (date, token, localize) {
2822
+ const hours = date.getHours();
2823
+ let dayPeriodEnumValue;
2824
+ if (hours >= 17) {
2825
+ dayPeriodEnumValue = dayPeriodEnum.evening;
2826
+ } else if (hours >= 12) {
2827
+ dayPeriodEnumValue = dayPeriodEnum.afternoon;
2828
+ } else if (hours >= 4) {
2829
+ dayPeriodEnumValue = dayPeriodEnum.morning;
2830
+ } else {
2831
+ dayPeriodEnumValue = dayPeriodEnum.night;
2832
+ }
816
2833
 
817
- /**
818
- * The tuple of localized month values. The first element represents January.
819
- */
2834
+ switch (token) {
2835
+ case "B":
2836
+ case "BB":
2837
+ case "BBB":
2838
+ return localize.dayPeriod(dayPeriodEnumValue, {
2839
+ width: "abbreviated",
2840
+ context: "formatting",
2841
+ });
2842
+ case "BBBBB":
2843
+ return localize.dayPeriod(dayPeriodEnumValue, {
2844
+ width: "narrow",
2845
+ context: "formatting",
2846
+ });
2847
+ case "BBBB":
2848
+ default:
2849
+ return localize.dayPeriod(dayPeriodEnumValue, {
2850
+ width: "wide",
2851
+ context: "formatting",
2852
+ });
2853
+ }
2854
+ },
820
2855
 
821
- function buildLocalizeFn(args) {
822
- return (value, options) => {
823
- const context = options?.context ? String(options.context) : "standalone";
2856
+ // Hour [1-12]
2857
+ h: function (date, token, localize) {
2858
+ if (token === "ho") {
2859
+ let hours = date.getHours() % 12;
2860
+ if (hours === 0) hours = 12;
2861
+ return localize.ordinalNumber(hours, { unit: "hour" });
2862
+ }
824
2863
 
825
- let valuesArray;
826
- if (context === "formatting" && args.formattingValues) {
827
- const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
828
- const width = options?.width ? String(options.width) : defaultWidth;
2864
+ return lightFormatters.h(date, token);
2865
+ },
829
2866
 
830
- valuesArray =
831
- args.formattingValues[width] || args.formattingValues[defaultWidth];
832
- } else {
833
- const defaultWidth = args.defaultWidth;
834
- const width = options?.width ? String(options.width) : args.defaultWidth;
2867
+ // Hour [0-23]
2868
+ H: function (date, token, localize) {
2869
+ if (token === "Ho") {
2870
+ return localize.ordinalNumber(date.getHours(), { unit: "hour" });
2871
+ }
835
2872
 
836
- valuesArray = args.values[width] || args.values[defaultWidth];
2873
+ return lightFormatters.H(date, token);
2874
+ },
2875
+
2876
+ // Hour [0-11]
2877
+ K: function (date, token, localize) {
2878
+ const hours = date.getHours() % 12;
2879
+
2880
+ if (token === "Ko") {
2881
+ return localize.ordinalNumber(hours, { unit: "hour" });
837
2882
  }
838
- const index = args.argumentCallback ? args.argumentCallback(value) : value;
839
2883
 
840
- // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
841
- return valuesArray[index];
842
- };
843
- }
2884
+ return addLeadingZeros(hours, token.length);
2885
+ },
844
2886
 
845
- function buildMatchFn(args) {
846
- return (string, options = {}) => {
847
- const width = options.width;
2887
+ // Hour [1-24]
2888
+ k: function (date, token, localize) {
2889
+ let hours = date.getHours();
2890
+ if (hours === 0) hours = 24;
848
2891
 
849
- const matchPattern =
850
- (width && args.matchPatterns[width]) ||
851
- args.matchPatterns[args.defaultMatchWidth];
852
- const matchResult = string.match(matchPattern);
2892
+ if (token === "ko") {
2893
+ return localize.ordinalNumber(hours, { unit: "hour" });
2894
+ }
853
2895
 
854
- if (!matchResult) {
855
- return null;
2896
+ return addLeadingZeros(hours, token.length);
2897
+ },
2898
+
2899
+ // Minute
2900
+ m: function (date, token, localize) {
2901
+ if (token === "mo") {
2902
+ return localize.ordinalNumber(date.getMinutes(), { unit: "minute" });
856
2903
  }
857
- const matchedString = matchResult[0];
858
2904
 
859
- const parsePatterns =
860
- (width && args.parsePatterns[width]) ||
861
- args.parsePatterns[args.defaultParseWidth];
2905
+ return lightFormatters.m(date, token);
2906
+ },
862
2907
 
863
- const key = Array.isArray(parsePatterns)
864
- ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))
865
- : // [TODO] -- I challenge you to fix the type
866
- findKey(parsePatterns, (pattern) => pattern.test(matchedString));
2908
+ // Second
2909
+ s: function (date, token, localize) {
2910
+ if (token === "so") {
2911
+ return localize.ordinalNumber(date.getSeconds(), { unit: "second" });
2912
+ }
867
2913
 
868
- let value;
2914
+ return lightFormatters.s(date, token);
2915
+ },
869
2916
 
870
- value = args.valueCallback ? args.valueCallback(key) : key;
871
- value = options.valueCallback
872
- ? // [TODO] -- I challenge you to fix the type
873
- options.valueCallback(value)
874
- : value;
2917
+ // Fraction of second
2918
+ S: function (date, token) {
2919
+ return lightFormatters.S(date, token);
2920
+ },
875
2921
 
876
- const rest = string.slice(matchedString.length);
2922
+ // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
2923
+ X: function (date, token, _localize) {
2924
+ const timezoneOffset = date.getTimezoneOffset();
877
2925
 
878
- return { value, rest };
879
- };
880
- }
2926
+ if (timezoneOffset === 0) {
2927
+ return "Z";
2928
+ }
881
2929
 
882
- function findKey(object, predicate) {
883
- for (const key in object) {
884
- if (
885
- Object.prototype.hasOwnProperty.call(object, key) &&
886
- predicate(object[key])
887
- ) {
888
- return key;
2930
+ switch (token) {
2931
+ // Hours and optional minutes
2932
+ case "X":
2933
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
2934
+
2935
+ // Hours, minutes and optional seconds without `:` delimiter
2936
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
2937
+ // so this token always has the same output as `XX`
2938
+ case "XXXX":
2939
+ case "XX": // Hours and minutes without `:` delimiter
2940
+ return formatTimezone(timezoneOffset);
2941
+
2942
+ // Hours, minutes and optional seconds with `:` delimiter
2943
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
2944
+ // so this token always has the same output as `XXX`
2945
+ case "XXXXX":
2946
+ case "XXX": // Hours and minutes with `:` delimiter
2947
+ default:
2948
+ return formatTimezone(timezoneOffset, ":");
2949
+ }
2950
+ },
2951
+
2952
+ // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
2953
+ x: function (date, token, _localize) {
2954
+ const timezoneOffset = date.getTimezoneOffset();
2955
+
2956
+ switch (token) {
2957
+ // Hours and optional minutes
2958
+ case "x":
2959
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
2960
+
2961
+ // Hours, minutes and optional seconds without `:` delimiter
2962
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
2963
+ // so this token always has the same output as `xx`
2964
+ case "xxxx":
2965
+ case "xx": // Hours and minutes without `:` delimiter
2966
+ return formatTimezone(timezoneOffset);
2967
+
2968
+ // Hours, minutes and optional seconds with `:` delimiter
2969
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
2970
+ // so this token always has the same output as `xxx`
2971
+ case "xxxxx":
2972
+ case "xxx": // Hours and minutes with `:` delimiter
2973
+ default:
2974
+ return formatTimezone(timezoneOffset, ":");
2975
+ }
2976
+ },
2977
+
2978
+ // Timezone (GMT)
2979
+ O: function (date, token, _localize) {
2980
+ const timezoneOffset = date.getTimezoneOffset();
2981
+
2982
+ switch (token) {
2983
+ // Short
2984
+ case "O":
2985
+ case "OO":
2986
+ case "OOO":
2987
+ return "GMT" + formatTimezoneShort(timezoneOffset, ":");
2988
+ // Long
2989
+ case "OOOO":
2990
+ default:
2991
+ return "GMT" + formatTimezone(timezoneOffset, ":");
2992
+ }
2993
+ },
2994
+
2995
+ // Timezone (specific non-location)
2996
+ z: function (date, token, _localize) {
2997
+ const timezoneOffset = date.getTimezoneOffset();
2998
+
2999
+ switch (token) {
3000
+ // Short
3001
+ case "z":
3002
+ case "zz":
3003
+ case "zzz":
3004
+ return "GMT" + formatTimezoneShort(timezoneOffset, ":");
3005
+ // Long
3006
+ case "zzzz":
3007
+ default:
3008
+ return "GMT" + formatTimezone(timezoneOffset, ":");
889
3009
  }
3010
+ },
3011
+
3012
+ // Seconds timestamp
3013
+ t: function (date, token, _localize) {
3014
+ const timestamp = Math.trunc(+date / 1000);
3015
+ return addLeadingZeros(timestamp, token.length);
3016
+ },
3017
+
3018
+ // Milliseconds timestamp
3019
+ T: function (date, token, _localize) {
3020
+ return addLeadingZeros(+date, token.length);
3021
+ },
3022
+ };
3023
+
3024
+ function formatTimezoneShort(offset, delimiter = "") {
3025
+ const sign = offset > 0 ? "-" : "+";
3026
+ const absOffset = Math.abs(offset);
3027
+ const hours = Math.trunc(absOffset / 60);
3028
+ const minutes = absOffset % 60;
3029
+ if (minutes === 0) {
3030
+ return sign + String(hours);
890
3031
  }
891
- return undefined;
3032
+ return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
892
3033
  }
893
3034
 
894
- function findIndex(array, predicate) {
895
- for (let key = 0; key < array.length; key++) {
896
- if (predicate(array[key])) {
897
- return key;
898
- }
3035
+ function formatTimezoneWithOptionalMinutes(offset, delimiter) {
3036
+ if (offset % 60 === 0) {
3037
+ const sign = offset > 0 ? "-" : "+";
3038
+ return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
899
3039
  }
900
- return undefined;
3040
+ return formatTimezone(offset, delimiter);
901
3041
  }
902
3042
 
903
- function buildMatchPatternFn(args) {
904
- return (string, options = {}) => {
905
- const matchResult = string.match(args.matchPattern);
906
- if (!matchResult) return null;
907
- const matchedString = matchResult[0];
3043
+ function formatTimezone(offset, delimiter = "") {
3044
+ const sign = offset > 0 ? "-" : "+";
3045
+ const absOffset = Math.abs(offset);
3046
+ const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);
3047
+ const minutes = addLeadingZeros(absOffset % 60, 2);
3048
+ return sign + hours + delimiter + minutes;
3049
+ }
908
3050
 
909
- const parseResult = string.match(args.parsePattern);
910
- if (!parseResult) return null;
911
- let value = args.valueCallback
912
- ? args.valueCallback(parseResult[0])
913
- : parseResult[0];
3051
+ const dateLongFormatter = (pattern, formatLong) => {
3052
+ switch (pattern) {
3053
+ case "P":
3054
+ return formatLong.date({ width: "short" });
3055
+ case "PP":
3056
+ return formatLong.date({ width: "medium" });
3057
+ case "PPP":
3058
+ return formatLong.date({ width: "long" });
3059
+ case "PPPP":
3060
+ default:
3061
+ return formatLong.date({ width: "full" });
3062
+ }
3063
+ };
914
3064
 
915
- // [TODO] I challenge you to fix the type
916
- value = options.valueCallback ? options.valueCallback(value) : value;
3065
+ const timeLongFormatter = (pattern, formatLong) => {
3066
+ switch (pattern) {
3067
+ case "p":
3068
+ return formatLong.time({ width: "short" });
3069
+ case "pp":
3070
+ return formatLong.time({ width: "medium" });
3071
+ case "ppp":
3072
+ return formatLong.time({ width: "long" });
3073
+ case "pppp":
3074
+ default:
3075
+ return formatLong.time({ width: "full" });
3076
+ }
3077
+ };
917
3078
 
918
- const rest = string.slice(matchedString.length);
3079
+ const dateTimeLongFormatter = (pattern, formatLong) => {
3080
+ const matchResult = pattern.match(/(P+)(p+)?/) || [];
3081
+ const datePattern = matchResult[1];
3082
+ const timePattern = matchResult[2];
919
3083
 
920
- return { value, rest };
3084
+ if (!timePattern) {
3085
+ return dateLongFormatter(pattern, formatLong);
3086
+ }
3087
+
3088
+ let dateTimeFormat;
3089
+
3090
+ switch (datePattern) {
3091
+ case "P":
3092
+ dateTimeFormat = formatLong.dateTime({ width: "short" });
3093
+ break;
3094
+ case "PP":
3095
+ dateTimeFormat = formatLong.dateTime({ width: "medium" });
3096
+ break;
3097
+ case "PPP":
3098
+ dateTimeFormat = formatLong.dateTime({ width: "long" });
3099
+ break;
3100
+ case "PPPP":
3101
+ default:
3102
+ dateTimeFormat = formatLong.dateTime({ width: "full" });
3103
+ break;
3104
+ }
3105
+
3106
+ return dateTimeFormat
3107
+ .replace("{{date}}", dateLongFormatter(datePattern, formatLong))
3108
+ .replace("{{time}}", timeLongFormatter(timePattern, formatLong));
3109
+ };
3110
+
3111
+ const longFormatters = {
3112
+ p: timeLongFormatter,
3113
+ P: dateTimeLongFormatter,
3114
+ };
3115
+
3116
+ const dayOfYearTokenRE = /^D+$/;
3117
+ const weekYearTokenRE = /^Y+$/;
3118
+
3119
+ const throwTokens = ["D", "DD", "YY", "YYYY"];
3120
+
3121
+ function isProtectedDayOfYearToken(token) {
3122
+ return dayOfYearTokenRE.test(token);
3123
+ }
3124
+
3125
+ function isProtectedWeekYearToken(token) {
3126
+ return weekYearTokenRE.test(token);
3127
+ }
3128
+
3129
+ function warnOrThrowProtectedError(token, format, input) {
3130
+ const _message = message(token, format, input);
3131
+ console.warn(_message);
3132
+ if (throwTokens.includes(token)) throw new RangeError(_message);
3133
+ }
3134
+
3135
+ function message(token, format, input) {
3136
+ const subject = token[0] === "Y" ? "years" : "days of the month";
3137
+ return `Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
3138
+ }
3139
+
3140
+ // This RegExp consists of three parts separated by `|`:
3141
+ // - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
3142
+ // (one of the certain letters followed by `o`)
3143
+ // - (\w)\1* matches any sequences of the same letter
3144
+ // - '' matches two quote characters in a row
3145
+ // - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),
3146
+ // except a single quote symbol, which ends the sequence.
3147
+ // Two quote characters do not end the sequence.
3148
+ // If there is no matching single quote
3149
+ // then the sequence will continue until the end of the string.
3150
+ // - . matches any single character unmatched by previous parts of the RegExps
3151
+ const formattingTokensRegExp =
3152
+ /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
3153
+
3154
+ // This RegExp catches symbols escaped by quotes, and also
3155
+ // sequences of symbols P, p, and the combinations like `PPPPPPPppppp`
3156
+ const longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
3157
+
3158
+ const escapedStringRegExp = /^'([^]*?)'?$/;
3159
+ const doubleQuoteRegExp = /''/g;
3160
+ const unescapedLatinCharacterRegExp = /[a-zA-Z]/;
3161
+
3162
+ /**
3163
+ * The {@link format} function options.
3164
+ */
3165
+
3166
+ /**
3167
+ * @name format
3168
+ * @alias formatDate
3169
+ * @category Common Helpers
3170
+ * @summary Format the date.
3171
+ *
3172
+ * @description
3173
+ * Return the formatted date string in the given format. The result may vary by locale.
3174
+ *
3175
+ * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.
3176
+ * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
3177
+ *
3178
+ * The characters wrapped between two single quotes characters (') are escaped.
3179
+ * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.
3180
+ * (see the last example)
3181
+ *
3182
+ * Format of the string is based on Unicode Technical Standard #35:
3183
+ * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
3184
+ * with a few additions (see note 7 below the table).
3185
+ *
3186
+ * Accepted patterns:
3187
+ * | Unit | Pattern | Result examples | Notes |
3188
+ * |---------------------------------|---------|-----------------------------------|-------|
3189
+ * | Era | G..GGG | AD, BC | |
3190
+ * | | GGGG | Anno Domini, Before Christ | 2 |
3191
+ * | | GGGGG | A, B | |
3192
+ * | Calendar year | y | 44, 1, 1900, 2017 | 5 |
3193
+ * | | yo | 44th, 1st, 0th, 17th | 5,7 |
3194
+ * | | yy | 44, 01, 00, 17 | 5 |
3195
+ * | | yyy | 044, 001, 1900, 2017 | 5 |
3196
+ * | | yyyy | 0044, 0001, 1900, 2017 | 5 |
3197
+ * | | yyyyy | ... | 3,5 |
3198
+ * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |
3199
+ * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |
3200
+ * | | YY | 44, 01, 00, 17 | 5,8 |
3201
+ * | | YYY | 044, 001, 1900, 2017 | 5 |
3202
+ * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |
3203
+ * | | YYYYY | ... | 3,5 |
3204
+ * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |
3205
+ * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |
3206
+ * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |
3207
+ * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |
3208
+ * | | RRRRR | ... | 3,5,7 |
3209
+ * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |
3210
+ * | | uu | -43, 01, 1900, 2017 | 5 |
3211
+ * | | uuu | -043, 001, 1900, 2017 | 5 |
3212
+ * | | uuuu | -0043, 0001, 1900, 2017 | 5 |
3213
+ * | | uuuuu | ... | 3,5 |
3214
+ * | Quarter (formatting) | Q | 1, 2, 3, 4 | |
3215
+ * | | Qo | 1st, 2nd, 3rd, 4th | 7 |
3216
+ * | | QQ | 01, 02, 03, 04 | |
3217
+ * | | QQQ | Q1, Q2, Q3, Q4 | |
3218
+ * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |
3219
+ * | | QQQQQ | 1, 2, 3, 4 | 4 |
3220
+ * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |
3221
+ * | | qo | 1st, 2nd, 3rd, 4th | 7 |
3222
+ * | | qq | 01, 02, 03, 04 | |
3223
+ * | | qqq | Q1, Q2, Q3, Q4 | |
3224
+ * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |
3225
+ * | | qqqqq | 1, 2, 3, 4 | 4 |
3226
+ * | Month (formatting) | M | 1, 2, ..., 12 | |
3227
+ * | | Mo | 1st, 2nd, ..., 12th | 7 |
3228
+ * | | MM | 01, 02, ..., 12 | |
3229
+ * | | MMM | Jan, Feb, ..., Dec | |
3230
+ * | | MMMM | January, February, ..., December | 2 |
3231
+ * | | MMMMM | J, F, ..., D | |
3232
+ * | Month (stand-alone) | L | 1, 2, ..., 12 | |
3233
+ * | | Lo | 1st, 2nd, ..., 12th | 7 |
3234
+ * | | LL | 01, 02, ..., 12 | |
3235
+ * | | LLL | Jan, Feb, ..., Dec | |
3236
+ * | | LLLL | January, February, ..., December | 2 |
3237
+ * | | LLLLL | J, F, ..., D | |
3238
+ * | Local week of year | w | 1, 2, ..., 53 | |
3239
+ * | | wo | 1st, 2nd, ..., 53th | 7 |
3240
+ * | | ww | 01, 02, ..., 53 | |
3241
+ * | ISO week of year | I | 1, 2, ..., 53 | 7 |
3242
+ * | | Io | 1st, 2nd, ..., 53th | 7 |
3243
+ * | | II | 01, 02, ..., 53 | 7 |
3244
+ * | Day of month | d | 1, 2, ..., 31 | |
3245
+ * | | do | 1st, 2nd, ..., 31st | 7 |
3246
+ * | | dd | 01, 02, ..., 31 | |
3247
+ * | Day of year | D | 1, 2, ..., 365, 366 | 9 |
3248
+ * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |
3249
+ * | | DD | 01, 02, ..., 365, 366 | 9 |
3250
+ * | | DDD | 001, 002, ..., 365, 366 | |
3251
+ * | | DDDD | ... | 3 |
3252
+ * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |
3253
+ * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |
3254
+ * | | EEEEE | M, T, W, T, F, S, S | |
3255
+ * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |
3256
+ * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |
3257
+ * | | io | 1st, 2nd, ..., 7th | 7 |
3258
+ * | | ii | 01, 02, ..., 07 | 7 |
3259
+ * | | iii | Mon, Tue, Wed, ..., Sun | 7 |
3260
+ * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |
3261
+ * | | iiiii | M, T, W, T, F, S, S | 7 |
3262
+ * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |
3263
+ * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |
3264
+ * | | eo | 2nd, 3rd, ..., 1st | 7 |
3265
+ * | | ee | 02, 03, ..., 01 | |
3266
+ * | | eee | Mon, Tue, Wed, ..., Sun | |
3267
+ * | | eeee | Monday, Tuesday, ..., Sunday | 2 |
3268
+ * | | eeeee | M, T, W, T, F, S, S | |
3269
+ * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |
3270
+ * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |
3271
+ * | | co | 2nd, 3rd, ..., 1st | 7 |
3272
+ * | | cc | 02, 03, ..., 01 | |
3273
+ * | | ccc | Mon, Tue, Wed, ..., Sun | |
3274
+ * | | cccc | Monday, Tuesday, ..., Sunday | 2 |
3275
+ * | | ccccc | M, T, W, T, F, S, S | |
3276
+ * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |
3277
+ * | AM, PM | a..aa | AM, PM | |
3278
+ * | | aaa | am, pm | |
3279
+ * | | aaaa | a.m., p.m. | 2 |
3280
+ * | | aaaaa | a, p | |
3281
+ * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |
3282
+ * | | bbb | am, pm, noon, midnight | |
3283
+ * | | bbbb | a.m., p.m., noon, midnight | 2 |
3284
+ * | | bbbbb | a, p, n, mi | |
3285
+ * | Flexible day period | B..BBB | at night, in the morning, ... | |
3286
+ * | | BBBB | at night, in the morning, ... | 2 |
3287
+ * | | BBBBB | at night, in the morning, ... | |
3288
+ * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |
3289
+ * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |
3290
+ * | | hh | 01, 02, ..., 11, 12 | |
3291
+ * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |
3292
+ * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |
3293
+ * | | HH | 00, 01, 02, ..., 23 | |
3294
+ * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |
3295
+ * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |
3296
+ * | | KK | 01, 02, ..., 11, 00 | |
3297
+ * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |
3298
+ * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |
3299
+ * | | kk | 24, 01, 02, ..., 23 | |
3300
+ * | Minute | m | 0, 1, ..., 59 | |
3301
+ * | | mo | 0th, 1st, ..., 59th | 7 |
3302
+ * | | mm | 00, 01, ..., 59 | |
3303
+ * | Second | s | 0, 1, ..., 59 | |
3304
+ * | | so | 0th, 1st, ..., 59th | 7 |
3305
+ * | | ss | 00, 01, ..., 59 | |
3306
+ * | Fraction of second | S | 0, 1, ..., 9 | |
3307
+ * | | SS | 00, 01, ..., 99 | |
3308
+ * | | SSS | 000, 001, ..., 999 | |
3309
+ * | | SSSS | ... | 3 |
3310
+ * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |
3311
+ * | | XX | -0800, +0530, Z | |
3312
+ * | | XXX | -08:00, +05:30, Z | |
3313
+ * | | XXXX | -0800, +0530, Z, +123456 | 2 |
3314
+ * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |
3315
+ * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |
3316
+ * | | xx | -0800, +0530, +0000 | |
3317
+ * | | xxx | -08:00, +05:30, +00:00 | 2 |
3318
+ * | | xxxx | -0800, +0530, +0000, +123456 | |
3319
+ * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |
3320
+ * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |
3321
+ * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |
3322
+ * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |
3323
+ * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |
3324
+ * | Seconds timestamp | t | 512969520 | 7 |
3325
+ * | | tt | ... | 3,7 |
3326
+ * | Milliseconds timestamp | T | 512969520900 | 7 |
3327
+ * | | TT | ... | 3,7 |
3328
+ * | Long localized date | P | 04/29/1453 | 7 |
3329
+ * | | PP | Apr 29, 1453 | 7 |
3330
+ * | | PPP | April 29th, 1453 | 7 |
3331
+ * | | PPPP | Friday, April 29th, 1453 | 2,7 |
3332
+ * | Long localized time | p | 12:00 AM | 7 |
3333
+ * | | pp | 12:00:00 AM | 7 |
3334
+ * | | ppp | 12:00:00 AM GMT+2 | 7 |
3335
+ * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |
3336
+ * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |
3337
+ * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |
3338
+ * | | PPPppp | April 29th, 1453 at ... | 7 |
3339
+ * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |
3340
+ * Notes:
3341
+ * 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale
3342
+ * are the same as "stand-alone" units, but are different in some languages.
3343
+ * "Formatting" units are declined according to the rules of the language
3344
+ * in the context of a date. "Stand-alone" units are always nominative singular:
3345
+ *
3346
+ * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`
3347
+ *
3348
+ * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`
3349
+ *
3350
+ * 2. Any sequence of the identical letters is a pattern, unless it is escaped by
3351
+ * the single quote characters (see below).
3352
+ * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)
3353
+ * the output will be the same as default pattern for this unit, usually
3354
+ * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units
3355
+ * are marked with "2" in the last column of the table.
3356
+ *
3357
+ * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`
3358
+ *
3359
+ * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`
3360
+ *
3361
+ * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`
3362
+ *
3363
+ * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`
3364
+ *
3365
+ * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`
3366
+ *
3367
+ * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).
3368
+ * The output will be padded with zeros to match the length of the pattern.
3369
+ *
3370
+ * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`
3371
+ *
3372
+ * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.
3373
+ * These tokens represent the shortest form of the quarter.
3374
+ *
3375
+ * 5. The main difference between `y` and `u` patterns are B.C. years:
3376
+ *
3377
+ * | Year | `y` | `u` |
3378
+ * |------|-----|-----|
3379
+ * | AC 1 | 1 | 1 |
3380
+ * | BC 1 | 1 | 0 |
3381
+ * | BC 2 | 2 | -1 |
3382
+ *
3383
+ * Also `yy` always returns the last two digits of a year,
3384
+ * while `uu` pads single digit years to 2 characters and returns other years unchanged:
3385
+ *
3386
+ * | Year | `yy` | `uu` |
3387
+ * |------|------|------|
3388
+ * | 1 | 01 | 01 |
3389
+ * | 14 | 14 | 14 |
3390
+ * | 376 | 76 | 376 |
3391
+ * | 1453 | 53 | 1453 |
3392
+ *
3393
+ * The same difference is true for local and ISO week-numbering years (`Y` and `R`),
3394
+ * except local week-numbering years are dependent on `options.weekStartsOn`
3395
+ * and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)
3396
+ * and [getWeekYear](https://date-fns.org/docs/getWeekYear)).
3397
+ *
3398
+ * 6. Specific non-location timezones are currently unavailable in `date-fns`,
3399
+ * so right now these tokens fall back to GMT timezones.
3400
+ *
3401
+ * 7. These patterns are not in the Unicode Technical Standard #35:
3402
+ * - `i`: ISO day of week
3403
+ * - `I`: ISO week of year
3404
+ * - `R`: ISO week-numbering year
3405
+ * - `t`: seconds timestamp
3406
+ * - `T`: milliseconds timestamp
3407
+ * - `o`: ordinal number modifier
3408
+ * - `P`: long localized date
3409
+ * - `p`: long localized time
3410
+ *
3411
+ * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
3412
+ * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
3413
+ *
3414
+ * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
3415
+ * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
3416
+ *
3417
+ * @param date - The original date
3418
+ * @param format - The string of tokens
3419
+ * @param options - An object with options
3420
+ *
3421
+ * @returns The formatted date string
3422
+ *
3423
+ * @throws `date` must not be Invalid Date
3424
+ * @throws `options.locale` must contain `localize` property
3425
+ * @throws `options.locale` must contain `formatLong` property
3426
+ * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
3427
+ * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
3428
+ * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
3429
+ * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
3430
+ * @throws format string contains an unescaped latin alphabet character
3431
+ *
3432
+ * @example
3433
+ * // Represent 11 February 2014 in middle-endian format:
3434
+ * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')
3435
+ * //=> '02/11/2014'
3436
+ *
3437
+ * @example
3438
+ * // Represent 2 July 2014 in Esperanto:
3439
+ * import { eoLocale } from 'date-fns/locale/eo'
3440
+ * const result = format(new Date(2014, 6, 2), "do 'de' MMMM yyyy", {
3441
+ * locale: eoLocale
3442
+ * })
3443
+ * //=> '2-a de julio 2014'
3444
+ *
3445
+ * @example
3446
+ * // Escape string by single quote characters:
3447
+ * const result = format(new Date(2014, 6, 2, 15), "h 'o''clock'")
3448
+ * //=> "3 o'clock"
3449
+ */
3450
+ function format(date, formatStr, options) {
3451
+ const defaultOptions = getDefaultOptions();
3452
+ const locale = options?.locale ?? defaultOptions.locale ?? enUS;
3453
+
3454
+ const firstWeekContainsDate =
3455
+ options?.firstWeekContainsDate ??
3456
+ options?.locale?.options?.firstWeekContainsDate ??
3457
+ defaultOptions.firstWeekContainsDate ??
3458
+ defaultOptions.locale?.options?.firstWeekContainsDate ??
3459
+ 1;
3460
+
3461
+ const weekStartsOn =
3462
+ options?.weekStartsOn ??
3463
+ options?.locale?.options?.weekStartsOn ??
3464
+ defaultOptions.weekStartsOn ??
3465
+ defaultOptions.locale?.options?.weekStartsOn ??
3466
+ 0;
3467
+
3468
+ const originalDate = toDate(date, options?.in);
3469
+
3470
+ if (!isValid(originalDate)) {
3471
+ throw new RangeError("Invalid time value");
3472
+ }
3473
+
3474
+ let parts = formatStr
3475
+ .match(longFormattingTokensRegExp)
3476
+ .map((substring) => {
3477
+ const firstCharacter = substring[0];
3478
+ if (firstCharacter === "p" || firstCharacter === "P") {
3479
+ const longFormatter = longFormatters[firstCharacter];
3480
+ return longFormatter(substring, locale.formatLong);
3481
+ }
3482
+ return substring;
3483
+ })
3484
+ .join("")
3485
+ .match(formattingTokensRegExp)
3486
+ .map((substring) => {
3487
+ // Replace two single quote characters with one single quote character
3488
+ if (substring === "''") {
3489
+ return { isToken: false, value: "'" };
3490
+ }
3491
+
3492
+ const firstCharacter = substring[0];
3493
+ if (firstCharacter === "'") {
3494
+ return { isToken: false, value: cleanEscapedString(substring) };
3495
+ }
3496
+
3497
+ if (formatters[firstCharacter]) {
3498
+ return { isToken: true, value: substring };
3499
+ }
3500
+
3501
+ if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
3502
+ throw new RangeError(
3503
+ "Format string contains an unescaped latin alphabet character `" +
3504
+ firstCharacter +
3505
+ "`",
3506
+ );
3507
+ }
3508
+
3509
+ return { isToken: false, value: substring };
3510
+ });
3511
+
3512
+ // invoke localize preprocessor (only for french locales at the moment)
3513
+ if (locale.localize.preprocessor) {
3514
+ parts = locale.localize.preprocessor(originalDate, parts);
3515
+ }
3516
+
3517
+ const formatterOptions = {
3518
+ firstWeekContainsDate,
3519
+ weekStartsOn,
3520
+ locale,
921
3521
  };
3522
+
3523
+ return parts
3524
+ .map((part) => {
3525
+ if (!part.isToken) return part.value;
3526
+
3527
+ const token = part.value;
3528
+
3529
+ if (
3530
+ (!options?.useAdditionalWeekYearTokens &&
3531
+ isProtectedWeekYearToken(token)) ||
3532
+ (!options?.useAdditionalDayOfYearTokens &&
3533
+ isProtectedDayOfYearToken(token))
3534
+ ) {
3535
+ warnOrThrowProtectedError(token, formatStr, String(date));
3536
+ }
3537
+
3538
+ const formatter = formatters[token[0]];
3539
+ return formatter(originalDate, token, locale.localize, formatterOptions);
3540
+ })
3541
+ .join("");
3542
+ }
3543
+
3544
+ function cleanEscapedString(input) {
3545
+ const matched = input.match(escapedStringRegExp);
3546
+
3547
+ if (!matched) {
3548
+ return input;
3549
+ }
3550
+
3551
+ return matched[1].replace(doubleQuoteRegExp, "'");
922
3552
  }
923
3553
 
924
3554
  const formatDistanceLocale = {
@@ -1819,5 +4449,56 @@ function Toast({ messages }) {
1819
4449
  : ''), "aria-label": "toast", children: [severity === 'success' && jsx(SuccessIcon, {}), severity === 'info' && jsx(InfoIcon, {}), severity === 'error' && jsx(ErrorIcon, {}), jsxs("div", { children: [jsx("strong", { children: summary }), jsx("p", { children: detail })] })] }, id))) }));
1820
4450
  }
1821
4451
 
1822
- export { Accordion, AutoComplete, BasicHeader, Breadcrumb, Button, CalendarInput, Card, CardButton, CardIconsButton, Chart, Dialog, Divider, EmptyContent, ExpandablePanel, FileUpload, FilterButton, Header, IconButton, InfoCard, Input, InputSwitch, InputTextArea, InternalMenu, Link, MegaMenu, Modal, MultiSelect, Notification, Paginator, RadioButton, Select, Sidebar, Skeleton, Spinner, Table, TagStatus, Toast };
4452
+ function Tooltip({ text, children }) {
4453
+ const [isVisible, setIsVisible] = useState(false);
4454
+ const [coords, setCoords] = useState({ top: 0, left: 0 });
4455
+ const [adjustedLeft, setAdjustedLeft] = useState(null);
4456
+ const [isClient, setIsClient] = useState(false);
4457
+ const ref = useRef(null);
4458
+ const tooltipRef = useRef(null);
4459
+ useEffect(() => {
4460
+ setIsClient(true);
4461
+ }, []);
4462
+ const showTooltip = () => {
4463
+ if (!text)
4464
+ return;
4465
+ setIsVisible(true);
4466
+ if (ref?.current) {
4467
+ const rect = ref.current.getBoundingClientRect();
4468
+ setCoords({
4469
+ top: rect.top,
4470
+ left: rect.left + rect.width / 2,
4471
+ });
4472
+ }
4473
+ };
4474
+ useEffect(() => {
4475
+ if (isClient && isVisible && tooltipRef.current) {
4476
+ const tooltipRect = tooltipRef.current.getBoundingClientRect();
4477
+ const overflowRight = tooltipRect.right > window.innerWidth;
4478
+ const overflowLeft = tooltipRect.left < 0;
4479
+ let newLeft = coords.left;
4480
+ if (overflowLeft) {
4481
+ newLeft = 120;
4482
+ }
4483
+ if (overflowRight && !overflowLeft) {
4484
+ newLeft += -28;
4485
+ }
4486
+ setAdjustedLeft(newLeft);
4487
+ }
4488
+ }, [isClient, isVisible, coords]);
4489
+ return (jsxs("div", { ref: ref, className: "inline-block", onMouseEnter: showTooltip, onMouseLeave: () => {
4490
+ setIsVisible(false);
4491
+ setAdjustedLeft(null);
4492
+ }, children: [children, isClient &&
4493
+ isVisible &&
4494
+ typeof document !== 'undefined' &&
4495
+ ReactDOM.createPortal(jsx("div", { ref: tooltipRef, className: "fixed z-50 bg-[#646981] text-white text-sm py-1 px-2 rounded-md whitespace-nowrap", style: {
4496
+ top: coords.top - 10,
4497
+ left: adjustedLeft ?? coords.left,
4498
+ transform: 'translate(-50%, -100%)',
4499
+ pointerEvents: 'none',
4500
+ }, children: text }), document.body)] }));
4501
+ }
4502
+
4503
+ export { Accordion, AutoComplete, BasicHeader, Breadcrumb, Button, CalendarInput, Card, CardButton, CardIconsButton, Chart, Dialog, Divider, EmptyContent, ExpandablePanel, FileUpload, FilterButton, Header, IconButton, InfoCard, Input, InputSwitch, InputTextArea, InternalMenu, Link, MegaMenu, Modal, MultiSelect, Notification, Paginator, RadioButton, Select, Sidebar, Skeleton, Spinner, Table, TagStatus, Toast, Tooltip };
1823
4504
  //# sourceMappingURL=index.js.map