@televet/kibble-ui 4.0.0-beta.65 → 4.0.0-beta.66
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/chunks/{alert.types-Dth5h5qO.js → alert.types-DYf5xFEG.js} +3 -3
- package/dist/chunks/{alert.types-Dth5h5qO.js.map → alert.types-DYf5xFEG.js.map} +1 -1
- package/dist/chunks/{alert.types-BvnpOwve.js → alert.types-DbqCOYr5.js} +2 -2
- package/dist/chunks/{alert.types-BvnpOwve.js.map → alert.types-DbqCOYr5.js.map} +1 -1
- package/dist/chunks/{avatar.component-BPCJZRyT.js → avatar.component-Bk8VVA0l.js} +14 -14
- package/dist/chunks/{avatar.component-BPCJZRyT.js.map → avatar.component-Bk8VVA0l.js.map} +1 -1
- package/dist/chunks/avatar.component-TAfT1LM1.js +2 -0
- package/dist/chunks/{avatar.component-y7gTa1dV.js.map → avatar.component-TAfT1LM1.js.map} +1 -1
- package/dist/chunks/{avatarGroup.component-Mfl8jvgp.js → avatarGroup.component-BGF4gl5d.js} +2 -2
- package/dist/chunks/{avatarGroup.component-Mfl8jvgp.js.map → avatarGroup.component-BGF4gl5d.js.map} +1 -1
- package/dist/chunks/{avatarGroup.component-BnRXVOIV.js → avatarGroup.component-CZnhQOWy.js} +2 -2
- package/dist/chunks/{avatarGroup.component-BnRXVOIV.js.map → avatarGroup.component-CZnhQOWy.js.map} +1 -1
- package/dist/chunks/{buttonGroup.component-6ZBOJbfR.js → buttonGroup.component-CGxtwaQg.js} +2 -2
- package/dist/chunks/{buttonGroup.component-6ZBOJbfR.js.map → buttonGroup.component-CGxtwaQg.js.map} +1 -1
- package/dist/chunks/{buttonGroup.component-DQfB4Nj3.js → buttonGroup.component-IGM-yn-V.js} +2 -2
- package/dist/chunks/{buttonGroup.component-DQfB4Nj3.js.map → buttonGroup.component-IGM-yn-V.js.map} +1 -1
- package/dist/chunks/{characterCounter.component-Cs0y0DOj.js → characterCounter.component-CWDjnYNU.js} +3 -3
- package/dist/chunks/{characterCounter.component-Cs0y0DOj.js.map → characterCounter.component-CWDjnYNU.js.map} +1 -1
- package/dist/chunks/{characterCounter.component-4T8NHb11.js → characterCounter.component-WOgGxKRq.js} +2 -2
- package/dist/chunks/{characterCounter.component-4T8NHb11.js.map → characterCounter.component-WOgGxKRq.js.map} +1 -1
- package/dist/chunks/{checkbox.component-DqlWmIyY.js → checkbox.component-B6-MOy86.js} +10 -10
- package/dist/chunks/{checkbox.component-DqlWmIyY.js.map → checkbox.component-B6-MOy86.js.map} +1 -1
- package/dist/chunks/checkbox.component-nkydue0g.js +2 -0
- package/dist/chunks/{checkbox.component-CFuJaYmY.js.map → checkbox.component-nkydue0g.js.map} +1 -1
- package/dist/chunks/{checkbox.records-08YIiUZO.js → checkbox.records-BtLBaHBy.js} +12 -12
- package/dist/chunks/{checkbox.records-08YIiUZO.js.map → checkbox.records-BtLBaHBy.js.map} +1 -1
- package/dist/chunks/checkbox.records-wbkLltak.js +2 -0
- package/dist/chunks/{checkbox.records-B7refmmT.js.map → checkbox.records-wbkLltak.js.map} +1 -1
- package/dist/chunks/{checkboxGroup.component-DaxmsqdZ.js → checkboxGroup.component-B1HL2vbn.js} +2 -2
- package/dist/chunks/{checkboxGroup.component-DaxmsqdZ.js.map → checkboxGroup.component-B1HL2vbn.js.map} +1 -1
- package/dist/chunks/{checkboxGroup.component-DBqDJvPC.js → checkboxGroup.component-DCg4fRL0.js} +3 -3
- package/dist/chunks/{checkboxGroup.component-DBqDJvPC.js.map → checkboxGroup.component-DCg4fRL0.js.map} +1 -1
- package/dist/chunks/{config-DlTdf-Yt.js → config-B1FINd7s.js} +3 -3
- package/dist/chunks/{config-DlTdf-Yt.js.map → config-B1FINd7s.js.map} +1 -1
- package/dist/chunks/conversationCard.component-2jO70XtY.js +2 -0
- package/dist/chunks/{conversationCard.component-CBrw3VnT.js.map → conversationCard.component-2jO70XtY.js.map} +1 -1
- package/dist/chunks/{conversationCard.component-Bg1Q9FdN.js → conversationCard.component-Uv0-JSnX.js} +17 -18
- package/dist/chunks/{conversationCard.component-Bg1Q9FdN.js.map → conversationCard.component-Uv0-JSnX.js.map} +1 -1
- package/dist/chunks/datePicker.component-CM8TIMiW.js +15 -0
- package/dist/chunks/{datePicker.component-u52NQcza.js.map → datePicker.component-CM8TIMiW.js.map} +1 -1
- package/dist/chunks/{datePicker.component-DfQNebKg.js → datePicker.component-DeOquWMk.js} +8 -8
- package/dist/chunks/{datePicker.component-DfQNebKg.js.map → datePicker.component-DeOquWMk.js.map} +1 -1
- package/dist/chunks/dialog-trigger-BCeZGpGO.js +2 -0
- package/dist/chunks/{dialog-trigger-B5NK0lr-.js.map → dialog-trigger-BCeZGpGO.js.map} +1 -1
- package/dist/chunks/{dialog-trigger-BPlPzPU-.js → dialog-trigger-D2uDgMJr.js} +9 -9
- package/dist/chunks/{dialog-trigger-BPlPzPU-.js.map → dialog-trigger-D2uDgMJr.js.map} +1 -1
- package/dist/chunks/{heading.component-BXcyhAEU.js → heading.component-Bu1JbEVn.js} +2 -2
- package/dist/chunks/{heading.component-BXcyhAEU.js.map → heading.component-Bu1JbEVn.js.map} +1 -1
- package/dist/chunks/{heading.component-ZD_UVarx.js → heading.component-wD7BkQLG.js} +2 -2
- package/dist/chunks/{heading.component-ZD_UVarx.js.map → heading.component-wD7BkQLG.js.map} +1 -1
- package/dist/chunks/index-5cRW642o.js +2 -0
- package/dist/chunks/{index-Dyxhds_1.js.map → index-5cRW642o.js.map} +1 -1
- package/dist/chunks/index-B4fjIWcA.js +2 -0
- package/dist/chunks/{index-CZz7hHWb.js.map → index-B4fjIWcA.js.map} +1 -1
- package/dist/chunks/index-BfD9Ne2e.js +2 -0
- package/dist/chunks/{index-BYf7SZUC.js.map → index-BfD9Ne2e.js.map} +1 -1
- package/dist/chunks/index-BlGAWSIX.js +3 -0
- package/dist/chunks/index-BlGAWSIX.js.map +1 -0
- package/dist/chunks/index-BmcSWiFh.js +2 -0
- package/dist/chunks/{index-ZaGEDS_0.js.map → index-BmcSWiFh.js.map} +1 -1
- package/dist/chunks/index-C323eOJV.js +1328 -0
- package/dist/chunks/index-C323eOJV.js.map +1 -0
- package/dist/chunks/{index-BNYygzo-.js → index-CBh9RZVL.js} +17 -18
- package/dist/chunks/{index-BNYygzo-.js.map → index-CBh9RZVL.js.map} +1 -1
- package/dist/chunks/index-CEYJbpt4.js +2 -0
- package/dist/chunks/{index-BDnnTdaJ.js.map → index-CEYJbpt4.js.map} +1 -1
- package/dist/chunks/index-CFnNmQf0.js +2 -0
- package/dist/chunks/{index-MlhL0PDC.js.map → index-CFnNmQf0.js.map} +1 -1
- package/dist/chunks/{index-Co91SHhW.js → index-CZPHIn6T.js} +3 -3
- package/dist/chunks/{index-Co91SHhW.js.map → index-CZPHIn6T.js.map} +1 -1
- package/dist/chunks/index-CedYIQt5.js +8 -0
- package/dist/chunks/{index-UWtj4ULm.js.map → index-CedYIQt5.js.map} +1 -1
- package/dist/chunks/{index-CjNAJEk5.js → index-Cqwkg1hU.js} +105 -106
- package/dist/chunks/{index-CjNAJEk5.js.map → index-Cqwkg1hU.js.map} +1 -1
- package/dist/chunks/{index-C2kxTsiE.js → index-Cuu1x05z.js} +16 -17
- package/dist/chunks/{index-C2kxTsiE.js.map → index-Cuu1x05z.js.map} +1 -1
- package/dist/chunks/{index-D9DU-5GF.js → index-D5Dscg8T.js} +48 -49
- package/dist/chunks/{index-D9DU-5GF.js.map → index-D5Dscg8T.js.map} +1 -1
- package/dist/chunks/{index-MDMqrELk.js → index-DMSZTX7A.js} +9 -9
- package/dist/chunks/{index-MDMqrELk.js.map → index-DMSZTX7A.js.map} +1 -1
- package/dist/chunks/{index-BBZxmcrY.js → index-DZGYG5M4.js} +2 -2
- package/dist/chunks/{index-BBZxmcrY.js.map → index-DZGYG5M4.js.map} +1 -1
- package/dist/chunks/{index-S1uNQPZj.js → index-Dq91nN6-.js} +3 -3
- package/dist/chunks/{index-S1uNQPZj.js.map → index-Dq91nN6-.js.map} +1 -1
- package/dist/chunks/{index-DcJZ8q0f.js → index-Dx94WMw1.js} +43 -44
- package/dist/chunks/{index-DcJZ8q0f.js.map → index-Dx94WMw1.js.map} +1 -1
- package/dist/chunks/index-Fztcdoo_.js +2 -0
- package/dist/chunks/index-Fztcdoo_.js.map +1 -0
- package/dist/chunks/index-WyVSig7F.js +70 -0
- package/dist/chunks/index-WyVSig7F.js.map +1 -0
- package/dist/chunks/{index-DUHFrLMI.js → index-f4Ba8Pq7.js} +15 -15
- package/dist/chunks/{index-DUHFrLMI.js.map → index-f4Ba8Pq7.js.map} +1 -1
- package/dist/chunks/index-hGlTuPbK.js +2 -0
- package/dist/chunks/{index-COoMV9Mh.js.map → index-hGlTuPbK.js.map} +1 -1
- package/dist/chunks/{logo.types-By8TqyNf.js → logo.types-CXQsathd.js} +2 -2
- package/dist/chunks/{logo.types-By8TqyNf.js.map → logo.types-CXQsathd.js.map} +1 -1
- package/dist/chunks/{menu.component-D4gknsq1.js → menu.component-BKY1dybr.js} +26 -26
- package/dist/chunks/{menu.component-D4gknsq1.js.map → menu.component-BKY1dybr.js.map} +1 -1
- package/dist/chunks/menu.component-DllVICUa.js +2 -0
- package/dist/chunks/{menu.component-CiZzHc2D.js.map → menu.component-DllVICUa.js.map} +1 -1
- package/dist/chunks/modal.context-DSKLfsJK.js +12 -0
- package/dist/chunks/modal.context-DSKLfsJK.js.map +1 -0
- package/dist/chunks/modal.context-EJ67QNzq.js +2 -0
- package/dist/chunks/modal.context-EJ67QNzq.js.map +1 -0
- package/dist/chunks/modal.types-Bsq-uLZ0.js +2 -0
- package/dist/chunks/{modal.types-9-Bz6ybC.js.map → modal.types-Bsq-uLZ0.js.map} +1 -1
- package/dist/chunks/{modal.types-BV8Eand2.js → modal.types-CRH5aJ0U.js} +5 -5
- package/dist/chunks/{modal.types-BV8Eand2.js.map → modal.types-CRH5aJ0U.js.map} +1 -1
- package/dist/chunks/{notificationCounter.component-Bei8mHSZ.js → notificationCounter.component-DMr4Mlm9.js} +2 -2
- package/dist/chunks/{notificationCounter.component-Bei8mHSZ.js.map → notificationCounter.component-DMr4Mlm9.js.map} +1 -1
- package/dist/chunks/{pinInput.types-U7Tfj5It.js → pinInput.types-B-BknmcG.js} +8 -8
- package/dist/chunks/{pinInput.types-U7Tfj5It.js.map → pinInput.types-B-BknmcG.js.map} +1 -1
- package/dist/chunks/pinInput.types-tJTQQJxe.js +2 -0
- package/dist/chunks/{pinInput.types-B-RchRm_.js.map → pinInput.types-tJTQQJxe.js.map} +1 -1
- package/dist/chunks/{popover-B9rNOU0g.js → popover-D0QoPsrG.js} +26 -26
- package/dist/chunks/{popover-B9rNOU0g.js.map → popover-D0QoPsrG.js.map} +1 -1
- package/dist/chunks/popover-DPEovmxh.js +2 -0
- package/dist/chunks/{popover-80QH8HEJ.js.map → popover-DPEovmxh.js.map} +1 -1
- package/dist/chunks/popover-root-provider-BYJE5I-P.js +2 -0
- package/dist/chunks/{popover-root-provider-DAMDDAHQ.js.map → popover-root-provider-BYJE5I-P.js.map} +1 -1
- package/dist/chunks/{popover-root-provider-CeLLpesI.js → popover-root-provider-Dt02njg5.js} +8 -8
- package/dist/chunks/{popover-root-provider-CeLLpesI.js.map → popover-root-provider-Dt02njg5.js.map} +1 -1
- package/dist/chunks/popover.component-CLMQkEDo.js +2 -0
- package/dist/chunks/popover.component-CLMQkEDo.js.map +1 -0
- package/dist/chunks/popover.component-MbM0Ajnr.js +264 -0
- package/dist/chunks/popover.component-MbM0Ajnr.js.map +1 -0
- package/dist/chunks/popover.recipe-BLsWPsAa.js +124 -0
- package/dist/chunks/popover.recipe-BLsWPsAa.js.map +1 -0
- package/dist/chunks/popover.recipe-av5Jdn1r.js +2 -0
- package/dist/chunks/popover.recipe-av5Jdn1r.js.map +1 -0
- package/dist/chunks/{use-locale-context-D-agiW5E.js → portal-D2KZrSzZ.js} +242 -242
- package/dist/chunks/portal-D2KZrSzZ.js.map +1 -0
- package/dist/chunks/portal-TWtD47zg.js +22 -0
- package/dist/chunks/portal-TWtD47zg.js.map +1 -0
- package/dist/chunks/radio.records-CEgwvLIL.js +2 -0
- package/dist/chunks/{radio.records-DLffZyeq.js.map → radio.records-CEgwvLIL.js.map} +1 -1
- package/dist/chunks/{radio.records-D7VFHW-s.js → radio.records-CzNYznSb.js} +16 -16
- package/dist/chunks/{radio.records-D7VFHW-s.js.map → radio.records-CzNYznSb.js.map} +1 -1
- package/dist/chunks/radioGroup.component-DAGmgDZ2.js +2 -0
- package/dist/chunks/{radioGroup.component-CZwrCppd.js.map → radioGroup.component-DAGmgDZ2.js.map} +1 -1
- package/dist/chunks/{radioGroup.component-DVsMiHFI.js → radioGroup.component-DEPDXEhQ.js} +11 -11
- package/dist/chunks/{radioGroup.component-DVsMiHFI.js.map → radioGroup.component-DEPDXEhQ.js.map} +1 -1
- package/dist/chunks/{ratingDots.component-qbroWQhZ.js → ratingDots.component-BB7vPYdN.js} +2 -2
- package/dist/chunks/{ratingDots.component-qbroWQhZ.js.map → ratingDots.component-BB7vPYdN.js.map} +1 -1
- package/dist/chunks/{ratingDots.component-1U-hoEpC.js → ratingDots.component-C32gNAmO.js} +4 -4
- package/dist/chunks/{ratingDots.component-1U-hoEpC.js.map → ratingDots.component-C32gNAmO.js.map} +1 -1
- package/dist/chunks/render-strategy-CdSSbgPU.js +2 -0
- package/dist/chunks/{render-strategy-BmWbSgqh.js.map → render-strategy-CdSSbgPU.js.map} +1 -1
- package/dist/chunks/{render-strategy-C8hwN3bm.js → render-strategy-ql9Qx5Cz.js} +2 -2
- package/dist/chunks/{render-strategy-C8hwN3bm.js.map → render-strategy-ql9Qx5Cz.js.map} +1 -1
- package/dist/chunks/select.component-BtBJUTF2.js +2 -0
- package/dist/chunks/{select.component-C_Fs6Xeq.js.map → select.component-BtBJUTF2.js.map} +1 -1
- package/dist/chunks/{select.component-5vAzdrZa.js → select.component-DfkLDyYt.js} +44 -44
- package/dist/chunks/{select.component-5vAzdrZa.js.map → select.component-DfkLDyYt.js.map} +1 -1
- package/dist/chunks/{sortableList.component-B_O-YB3I.js → sortableList.component-B0lnVMXW.js} +3 -3
- package/dist/chunks/{sortableList.component-B_O-YB3I.js.map → sortableList.component-B0lnVMXW.js.map} +1 -1
- package/dist/chunks/{sortableList.component-BX3EvpRM.js → sortableList.component-B88NRcwx.js} +3 -3
- package/dist/chunks/{sortableList.component-BX3EvpRM.js.map → sortableList.component-B88NRcwx.js.map} +1 -1
- package/dist/chunks/{spinner.component-CzhcJOwX.js → spinner.component-DVjwuOVs.js} +2 -2
- package/dist/chunks/{spinner.component-CzhcJOwX.js.map → spinner.component-DVjwuOVs.js.map} +1 -1
- package/dist/chunks/{spinner.component-lHj69hIF.js → spinner.component-DWh3YuBJ.js} +3 -3
- package/dist/chunks/{spinner.component-lHj69hIF.js.map → spinner.component-DWh3YuBJ.js.map} +1 -1
- package/dist/chunks/{styledAvatar.types-BvHm6hKS.js → styledAvatar.types-ClVT0QDd.js} +2 -2
- package/dist/chunks/{styledAvatar.types-BvHm6hKS.js.map → styledAvatar.types-ClVT0QDd.js.map} +1 -1
- package/dist/chunks/{styledAvatar.types-B9SHiNfg.js → styledAvatar.types-DamSY23W.js} +2 -2
- package/dist/chunks/{styledAvatar.types-B9SHiNfg.js.map → styledAvatar.types-DamSY23W.js.map} +1 -1
- package/dist/chunks/{swatch.types-DbgA3RWc.js → swatch.types-B8OSJZ-a.js} +2 -2
- package/dist/chunks/{swatch.types-DbgA3RWc.js.map → swatch.types-B8OSJZ-a.js.map} +1 -1
- package/dist/chunks/{switch.component-DjOGsCIQ.js → switch.component-BEkYEUKY.js} +11 -11
- package/dist/chunks/{switch.component-DjOGsCIQ.js.map → switch.component-BEkYEUKY.js.map} +1 -1
- package/dist/chunks/switch.component-DjbXfvMa.js +2 -0
- package/dist/chunks/{switch.component-B3Gfgft9.js.map → switch.component-DjbXfvMa.js.map} +1 -1
- package/dist/chunks/{tabs.component-Ca9jVGv0.js → tabs.component-Bmg0kB-p.js} +48 -48
- package/dist/chunks/{tabs.component-Ca9jVGv0.js.map → tabs.component-Bmg0kB-p.js.map} +1 -1
- package/dist/chunks/tabs.component-Bn_7bf0X.js +2 -0
- package/dist/chunks/{tabs.component-pl0kO5_M.js.map → tabs.component-Bn_7bf0X.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-CnPbyaGH.js → tagBlock.component-3ypfB6tz.js} +5 -5
- package/dist/chunks/{tagBlock.component-CnPbyaGH.js.map → tagBlock.component-3ypfB6tz.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-C2DAQrQE.js → tagBlock.component-x3oh7uht.js} +2 -2
- package/dist/chunks/{tagBlock.component-C2DAQrQE.js.map → tagBlock.component-x3oh7uht.js.map} +1 -1
- package/dist/chunks/textInput.component-B1--78Mp.js +2 -0
- package/dist/chunks/{textInput.component-D-galjwy.js.map → textInput.component-B1--78Mp.js.map} +1 -1
- package/dist/chunks/{textInput.component-DXtEgbkr.js → textInput.component-D9Dl8cP3.js} +12 -12
- package/dist/chunks/{textInput.component-DXtEgbkr.js.map → textInput.component-D9Dl8cP3.js.map} +1 -1
- package/dist/chunks/textarea.component-BxC5lB4t.js +2 -0
- package/dist/chunks/{textarea.component-DmxMuMCU.js.map → textarea.component-BxC5lB4t.js.map} +1 -1
- package/dist/chunks/{textarea.component-Do0zHf-1.js → textarea.component-DZXDIbZg.js} +7 -7
- package/dist/chunks/{textarea.component-Do0zHf-1.js.map → textarea.component-DZXDIbZg.js.map} +1 -1
- package/dist/chunks/theme.provider-CpxxMiXd.js +26 -0
- package/dist/chunks/theme.provider-CpxxMiXd.js.map +1 -0
- package/dist/chunks/{theme.provider-Dj4pZ815.js → theme.provider-DmGvaymX.js} +1830 -1699
- package/dist/chunks/theme.provider-DmGvaymX.js.map +1 -0
- package/dist/chunks/{timePicker.component-DTs3MjOx.js → timePicker.component-DnFPWIcy.js} +4 -4
- package/dist/chunks/{timePicker.component-DTs3MjOx.js.map → timePicker.component-DnFPWIcy.js.map} +1 -1
- package/dist/chunks/{timePicker.component-CophNE3d.js → timePicker.component-F9o8MNWu.js} +2 -2
- package/dist/chunks/{timePicker.component-CophNE3d.js.map → timePicker.component-F9o8MNWu.js.map} +1 -1
- package/dist/chunks/{timeRange.component-C5dt8sZn.js → timeRange.component-Bh2FiRi8.js} +2 -2
- package/dist/chunks/{timeRange.component-C5dt8sZn.js.map → timeRange.component-Bh2FiRi8.js.map} +1 -1
- package/dist/chunks/{timeRange.component-C5wSyUiZ.js → timeRange.component-Bj-9ynHS.js} +2 -2
- package/dist/chunks/{timeRange.component-C5wSyUiZ.js.map → timeRange.component-Bj-9ynHS.js.map} +1 -1
- package/dist/chunks/timestamp.component-BKr4dkxB.js +53 -0
- package/dist/chunks/{timestamp.component-BPU8bf7p.js.map → timestamp.component-BKr4dkxB.js.map} +1 -1
- package/dist/chunks/timestamp.component-CfjeVkJs.js +2 -0
- package/dist/chunks/{timestamp.component-rTLrzBPA.js.map → timestamp.component-CfjeVkJs.js.map} +1 -1
- package/dist/chunks/toaster.records-CGym-iT-.js +2 -0
- package/dist/chunks/{toaster.records-BJo0j1IZ.js.map → toaster.records-CGym-iT-.js.map} +1 -1
- package/dist/chunks/{toaster.records-BGfpUOVt.js → toaster.records-Cf8bpHo8.js} +21 -22
- package/dist/chunks/{toaster.records-BGfpUOVt.js.map → toaster.records-Cf8bpHo8.js.map} +1 -1
- package/dist/chunks/{typography.records-C6G_65b4.js → typography.records-BeoK0Uyj.js} +2 -2
- package/dist/chunks/{typography.records-C6G_65b4.js.map → typography.records-BeoK0Uyj.js.map} +1 -1
- package/dist/chunks/{typography.records-jnjWfTLS.js → typography.records-Xg59taw9.js} +2 -2
- package/dist/chunks/{typography.records-jnjWfTLS.js.map → typography.records-Xg59taw9.js.map} +1 -1
- package/dist/chunks/{use-field-context-B_G7Yziz.js → use-field-context-C4IwmN39.js} +2 -2
- package/dist/chunks/{use-field-context-B_G7Yziz.js.map → use-field-context-C4IwmN39.js.map} +1 -1
- package/dist/chunks/use-field-context-xBX4EpFz.js +2 -0
- package/dist/chunks/{use-field-context--wBJQY1R.js.map → use-field-context-xBX4EpFz.js.map} +1 -1
- package/dist/chunks/withFormControl-BHjeRAfg.js +2 -0
- package/dist/chunks/{withFormControl-DpytztWF.js.map → withFormControl-BHjeRAfg.js.map} +1 -1
- package/dist/chunks/{withFormControl-BDuV97Vb.js → withFormControl-KA9fAHrR.js} +49 -49
- package/dist/chunks/{withFormControl-BDuV97Vb.js.map → withFormControl-KA9fAHrR.js.map} +1 -1
- package/dist/chunks/withTruncation-CQUQzrTa.js +561 -0
- package/dist/chunks/withTruncation-CQUQzrTa.js.map +1 -0
- package/dist/chunks/withTruncation-DguVvIAI.js +2 -0
- package/dist/chunks/withTruncation-DguVvIAI.js.map +1 -0
- package/dist/chunks/{wrap-B8tBNeBY.js → wrap-CYgSj8wY.js} +2 -2
- package/dist/chunks/{wrap-B8tBNeBY.js.map → wrap-CYgSj8wY.js.map} +1 -1
- package/dist/cjs/chakra/index.cjs +1 -1
- package/dist/cjs/chakra/index.cjs.map +1 -1
- package/dist/cjs/components/Alert/index.cjs +1 -1
- package/dist/cjs/components/Avatar/index.cjs +1 -1
- package/dist/cjs/components/AvatarGroup/index.cjs +1 -1
- package/dist/cjs/components/ButtonGroup/index.cjs +1 -1
- package/dist/cjs/components/CharacterCounter/index.cjs +1 -1
- package/dist/cjs/components/Checkbox/index.cjs +1 -1
- package/dist/cjs/components/CheckboxGroup/index.cjs +1 -1
- package/dist/cjs/components/ConversationCard/index.cjs +1 -1
- package/dist/cjs/components/DatePicker/index.cjs +1 -1
- package/dist/cjs/components/Heading/index.cjs +1 -1
- package/dist/cjs/components/Menu/index.cjs +1 -1
- package/dist/cjs/components/Modal/index.cjs +1 -1
- package/dist/cjs/components/PinInput/index.cjs +1 -1
- package/dist/cjs/components/Popover/index.cjs +1 -1
- package/dist/cjs/components/RadioGroup/index.cjs +1 -1
- package/dist/cjs/components/RatingDots/index.cjs +1 -1
- package/dist/cjs/components/Select/index.cjs +1 -1
- package/dist/cjs/components/SortableList/index.cjs +1 -1
- package/dist/cjs/components/Spinner/index.cjs +1 -1
- package/dist/cjs/components/StyledAvatar/index.cjs +1 -1
- package/dist/cjs/components/Switch/index.cjs +1 -1
- package/dist/cjs/components/Tabs/index.cjs +1 -1
- package/dist/cjs/components/TagBlock/index.cjs +1 -1
- package/dist/cjs/components/Text/index.cjs +1 -1
- package/dist/cjs/components/TextInput/index.cjs +1 -1
- package/dist/cjs/components/Textarea/index.cjs +1 -1
- package/dist/cjs/components/TimePicker/index.cjs +1 -1
- package/dist/cjs/components/TimeRange/index.cjs +1 -1
- package/dist/cjs/components/Timestamp/index.cjs +1 -1
- package/dist/cjs/components/Toast/index.cjs +1 -1
- package/dist/cjs/components/Tooltip/index.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/theme/index.cjs +1 -1
- package/dist/esm/chakra/index.js +69 -69
- package/dist/esm/components/Alert/index.js +1 -1
- package/dist/esm/components/Avatar/index.js +1 -1
- package/dist/esm/components/AvatarGroup/index.js +1 -1
- package/dist/esm/components/ButtonGroup/index.js +1 -1
- package/dist/esm/components/CharacterCounter/index.js +1 -1
- package/dist/esm/components/Checkbox/index.js +1 -1
- package/dist/esm/components/CheckboxGroup/index.js +1 -1
- package/dist/esm/components/ConversationCard/index.js +1 -1
- package/dist/esm/components/DatePicker/index.js +1 -1
- package/dist/esm/components/Heading/index.js +1 -1
- package/dist/esm/components/Logo/index.js +1 -1
- package/dist/esm/components/Menu/index.js +1 -1
- package/dist/esm/components/Modal/index.js +1 -1
- package/dist/esm/components/NotificationCounter/index.js +1 -1
- package/dist/esm/components/PinInput/index.js +1 -1
- package/dist/esm/components/Popover/index.js +1 -1
- package/dist/esm/components/RadioGroup/index.js +1 -1
- package/dist/esm/components/RatingDots/index.js +1 -1
- package/dist/esm/components/Select/index.js +1 -1
- package/dist/esm/components/SortableList/index.js +1 -1
- package/dist/esm/components/Spinner/index.js +1 -1
- package/dist/esm/components/StyledAvatar/index.js +1 -1
- package/dist/esm/components/Swatch/index.js +1 -1
- package/dist/esm/components/Switch/index.js +1 -1
- package/dist/esm/components/Tabs/index.js +1 -1
- package/dist/esm/components/TagBlock/index.js +1 -1
- package/dist/esm/components/Text/index.js +1 -1
- package/dist/esm/components/TextInput/index.js +1 -1
- package/dist/esm/components/Textarea/index.js +1 -1
- package/dist/esm/components/TimePicker/index.js +1 -1
- package/dist/esm/components/TimeRange/index.js +1 -1
- package/dist/esm/components/Timestamp/index.js +1 -1
- package/dist/esm/components/Toast/index.js +1 -1
- package/dist/esm/components/Tooltip/index.js +1 -1
- package/dist/esm/components/index.js +41 -42
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/index.js +60 -61
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/theme/index.js +1 -1
- package/dist/types/components/Menu/menu.recipe.d.ts +1 -1
- package/dist/types/components/Modal/modal.recipe.d.ts +1 -1
- package/dist/types/components/TimePicker/timePicker.recipe.d.ts +1 -1
- package/dist/types/components/Tooltip/tooltip.component.d.ts +5 -6
- package/dist/types/theme/tokens/shadows/shadows.config.d.ts +3 -3
- package/dist/types/theme/tokens/sizes/sizes.config.d.ts +3 -3
- package/dist/types/theme/tokens/zIndices/zIndices.config.d.ts +10 -10
- package/package.json +1 -1
- package/dist/chunks/avatar.component-y7gTa1dV.js +0 -2
- package/dist/chunks/checkbox.component-CFuJaYmY.js +0 -2
- package/dist/chunks/checkbox.records-B7refmmT.js +0 -2
- package/dist/chunks/conversationCard.component-CBrw3VnT.js +0 -2
- package/dist/chunks/datePicker.component-u52NQcza.js +0 -15
- package/dist/chunks/dialog-trigger-B5NK0lr-.js +0 -2
- package/dist/chunks/index-BDnnTdaJ.js +0 -2
- package/dist/chunks/index-BGwwyukg.js +0 -2
- package/dist/chunks/index-BGwwyukg.js.map +0 -1
- package/dist/chunks/index-BYf7SZUC.js +0 -2
- package/dist/chunks/index-COoMV9Mh.js +0 -2
- package/dist/chunks/index-CYk-7wwG.js +0 -1018
- package/dist/chunks/index-CYk-7wwG.js.map +0 -1
- package/dist/chunks/index-CZ42b9rT.js +0 -3
- package/dist/chunks/index-CZ42b9rT.js.map +0 -1
- package/dist/chunks/index-CZz7hHWb.js +0 -2
- package/dist/chunks/index-Dyxhds_1.js +0 -2
- package/dist/chunks/index-MlhL0PDC.js +0 -2
- package/dist/chunks/index-UWtj4ULm.js +0 -8
- package/dist/chunks/index-ZaGEDS_0.js +0 -2
- package/dist/chunks/index-j7W9Hyzx.js +0 -322
- package/dist/chunks/index-j7W9Hyzx.js.map +0 -1
- package/dist/chunks/menu.component-CiZzHc2D.js +0 -2
- package/dist/chunks/modal.types-9-Bz6ybC.js +0 -2
- package/dist/chunks/pinInput.types-B-RchRm_.js +0 -2
- package/dist/chunks/popover-80QH8HEJ.js +0 -2
- package/dist/chunks/popover-root-provider-DAMDDAHQ.js +0 -2
- package/dist/chunks/popover.component-A8In7d2B.js +0 -2
- package/dist/chunks/popover.component-A8In7d2B.js.map +0 -1
- package/dist/chunks/popover.component-BR8W3Jb8.js +0 -322
- package/dist/chunks/popover.component-BR8W3Jb8.js.map +0 -1
- package/dist/chunks/popover.recipe--gMRcQTS.js +0 -479
- package/dist/chunks/popover.recipe--gMRcQTS.js.map +0 -1
- package/dist/chunks/popover.recipe-DLeyokHo.js +0 -2
- package/dist/chunks/popover.recipe-DLeyokHo.js.map +0 -1
- package/dist/chunks/radio.records-DLffZyeq.js +0 -2
- package/dist/chunks/radioGroup.component-CZwrCppd.js +0 -2
- package/dist/chunks/render-strategy-BmWbSgqh.js +0 -2
- package/dist/chunks/select.component-C_Fs6Xeq.js +0 -2
- package/dist/chunks/switch.component-B3Gfgft9.js +0 -2
- package/dist/chunks/tabs.component-pl0kO5_M.js +0 -2
- package/dist/chunks/text.component-CnnBhB3c.js +0 -2
- package/dist/chunks/text.component-CnnBhB3c.js.map +0 -1
- package/dist/chunks/text.component-Cpruo7MB.js +0 -12
- package/dist/chunks/text.component-Cpruo7MB.js.map +0 -1
- package/dist/chunks/textInput.component-D-galjwy.js +0 -2
- package/dist/chunks/textarea.component-DmxMuMCU.js +0 -2
- package/dist/chunks/theme.provider-CIJGn9Kh.js +0 -26
- package/dist/chunks/theme.provider-CIJGn9Kh.js.map +0 -1
- package/dist/chunks/theme.provider-Dj4pZ815.js.map +0 -1
- package/dist/chunks/timestamp.component-BPU8bf7p.js +0 -54
- package/dist/chunks/timestamp.component-rTLrzBPA.js +0 -2
- package/dist/chunks/toaster.records-BJo0j1IZ.js +0 -2
- package/dist/chunks/tooltip.component-CwrXAVEq.js +0 -2
- package/dist/chunks/tooltip.component-CwrXAVEq.js.map +0 -1
- package/dist/chunks/tooltip.component-DgOzrNG3.js +0 -758
- package/dist/chunks/tooltip.component-DgOzrNG3.js.map +0 -1
- package/dist/chunks/use-field-context--wBJQY1R.js +0 -2
- package/dist/chunks/use-locale-context-BdqHZ8L8.js +0 -22
- package/dist/chunks/use-locale-context-BdqHZ8L8.js.map +0 -1
- package/dist/chunks/use-locale-context-D-agiW5E.js.map +0 -1
- package/dist/chunks/withFormControl-DpytztWF.js +0 -2
- package/dist/chunks/withTruncation-DPbMF-jg.js +0 -2
- package/dist/chunks/withTruncation-DPbMF-jg.js.map +0 -1
- package/dist/chunks/withTruncation-DoQriKuH.js +0 -67
- package/dist/chunks/withTruncation-DoQriKuH.js.map +0 -1
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";const g=require("./jsx-runtime-BjDatQAs.js"),D=require("react"),S=require("./format-BRt-TIiQ.js"),le=require("./popover-80QH8HEJ.js"),Ge=require("./textInput.component-D-galjwy.js"),_e=require("./icon.component-C0e0UGBw.js"),wt=require("./text.component-CnnBhB3c.js"),Ie=require("./popover-root-provider-DAMDDAHQ.js"),Le=require("./h-stack-Bjx9hlJo.js"),Xe=require("./flex-D14H6HbP.js"),Ce=require("./button.component-Dd9AfGox.js"),ze=require("./menu.component-CiZzHc2D.js"),fe=require("./grid-item-CR-sXrjU.js"),Ht=require("./config-BFcXpdZo.js"),It=require("./use-slot-recipe-8liupslO.js"),bt=require("./box-Baq7UBls.js"),Lt=require("./use-locale-context-BdqHZ8L8.js");var Se={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Ne(e){return function(t){var n=t||{},r=n.width?String(n.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var Wt={date:Ne({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Ne({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Ne({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},At={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function ye(e){return function(t,n){var r,a=n||{};if((a.context?String(a.context):"standalone")==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,i=a.width?String(a.width):o;r=e.formattingValues[i]||e.formattingValues[o]}else{var s=e.defaultWidth,u=a.width?String(a.width):e.defaultWidth;r=e.values[u]||e.values[s]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function De(e){return function(t,n){var r=String(t),a=n||{},o=a.width,i=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],s=r.match(i);if(!s)return null;var u,d=s[0],w=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth];return u=Object.prototype.toString.call(w)==="[object Array]"?function(l,m){for(var c=0;c<l.length;c++)if(m(l[c]))return c}(w,function(l){return l.test(d)}):function(l,m){for(var c in l)if(l.hasOwnProperty(c)&&m(l[c]))return c}(w,function(l){return l.test(d)}),u=e.valueCallback?e.valueCallback(u):u,{value:u=a.valueCallback?a.valueCallback(u):u,rest:r.slice(d.length)}}}var pe,yt={code:"en-US",formatDistance:function(e,t,n){var r;return n=n||{},r=typeof Se[e]=="string"?Se[e]:t===1?Se[e].one:Se[e].other.replace("{{count}}",t),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:Wt,formatRelative:function(e,t,n,r){return At[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:ye({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:ye({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:ye({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:ye({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:ye({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(pe={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e,t){var n=String(e),r=t||{},a=n.match(pe.matchPattern);if(!a)return null;var o=a[0],i=n.match(pe.parsePattern);if(!i)return null;var s=pe.valueCallback?pe.valueCallback(i[0]):i[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(o.length)}}),era:De({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:De({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:De({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:De({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:De({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function M(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function p(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function b(e){p(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):(typeof e!="string"&&t!=="[object String]"||typeof console>"u"||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn(new Error().stack)),new Date(NaN))}function Qt(e,t){p(2,arguments);var n=b(e).getTime(),r=M(t);return new Date(n+r)}function Dt(e,t){p(2,arguments);var n=M(t);return Qt(e,-n)}function Gt(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t=t||{})t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function $e(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}}function Ke(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}}var pt={p:Ke,P:function(e,t){var n,r=e.match(/(P+)(p+)?/),a=r[1],o=r[2];if(!o)return $e(e,t);switch(a){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;case"PPPP":default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",$e(a,t)).replace("{{time}}",Ke(o,t))}};function Je(e){return e.getTime()%6e4}function vt(e){var t=new Date(e.getTime()),n=Math.ceil(t.getTimezoneOffset());return t.setSeconds(0,0),6e4*n+(n>0?(6e4+Je(t))%6e4:Je(t))}var _t=["D","DD"],Xt=["YY","YYYY"];function xt(e){return _t.indexOf(e)!==-1}function Tt(e){return Xt.indexOf(e)!==-1}function Ee(e){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` for formatting years; see: https://git.io/fxCyr");if(e==="YY")throw new RangeError("Use `yy` instead of `YY` for formatting years; see: https://git.io/fxCyr");if(e==="D")throw new RangeError("Use `d` instead of `D` for formatting days of the month; see: https://git.io/fxCyr");if(e==="DD")throw new RangeError("Use `dd` instead of `DD` for formatting days of the month; see: https://git.io/fxCyr")}function ae(e,t){p(1,arguments);var n=t||{},r=n.locale,a=r&&r.options&&r.options.weekStartsOn,o=a==null?0:M(a),i=n.weekStartsOn==null?o:M(n.weekStartsOn);if(!(i>=0&&i<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=b(e),u=s.getUTCDay(),d=(u<i?7:0)+u-i;return s.setUTCDate(s.getUTCDate()-d),s.setUTCHours(0,0,0,0),s}function We(e,t){p(1,arguments);var n=b(e,t),r=n.getUTCFullYear(),a=t||{},o=a.locale,i=o&&o.options&&o.options.firstWeekContainsDate,s=i==null?1:M(i),u=a.firstWeekContainsDate==null?s:M(a.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var d=new Date(0);d.setUTCFullYear(r+1,0,u),d.setUTCHours(0,0,0,0);var w=ae(d,t),l=new Date(0);l.setUTCFullYear(r,0,u),l.setUTCHours(0,0,0,0);var m=ae(l,t);return n.getTime()>=w.getTime()?r+1:n.getTime()>=m.getTime()?r:r-1}function Oe(e,t,n){p(2,arguments);var r=n||{},a=r.locale,o=a&&a.options&&a.options.weekStartsOn,i=o==null?0:M(o),s=r.weekStartsOn==null?i:M(r.weekStartsOn);if(!(s>=0&&s<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=b(e),d=M(t),w=u.getUTCDay(),l=d%7,m=(l+7)%7,c=(m<s?7:0)+d-w;return u.setUTCDate(u.getUTCDate()+c),u}function he(e){p(1,arguments);var t=1,n=b(e),r=n.getUTCDay(),a=(r<t?7:0)+r-t;return n.setUTCDate(n.getUTCDate()-a),n.setUTCHours(0,0,0,0),n}function kt(e){p(1,arguments);var t=b(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var a=he(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var i=he(o);return t.getTime()>=a.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function zt(e){p(1,arguments);var t=kt(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=he(n);return r}function Ct(e){p(1,arguments);var t=b(e),n=he(t).getTime()-zt(t).getTime();return Math.round(n/6048e5)+1}function $t(e,t){p(1,arguments);var n=t||{},r=n.locale,a=r&&r.options&&r.options.firstWeekContainsDate,o=a==null?1:M(a),i=n.firstWeekContainsDate==null?o:M(n.firstWeekContainsDate),s=We(e,t),u=new Date(0);u.setUTCFullYear(s,0,i),u.setUTCHours(0,0,0,0);var d=ae(u,t);return d}function Mt(e,t){p(1,arguments);var n=b(e),r=ae(n,t).getTime()-$t(n,t).getTime();return Math.round(r/6048e5)+1}var Ve=/^(1[0-2]|0?\d)/,Kt=/^(3[0-1]|[0-2]?\d)/,Jt=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Ze=/^(5[0-3]|[0-4]?\d)/,Vt=/^(2[0-3]|[0-1]?\d)/,Zt=/^(2[0-4]|[0-1]?\d)/,en=/^(1[0-1]|0?\d)/,tn=/^(1[0-2]|0?\d)/,nn=/^[0-5]?\d/,rn=/^[0-5]?\d/,an=/^\d/,on=/^\d{1,2}/,sn=/^\d{1,3}/,un=/^\d{1,4}/,cn=/^-?\d+/,dn=/^-?\d/,ln=/^-?\d{1,2}/,fn=/^-?\d{1,3}/,mn=/^-?\d{1,4}/,et=/^([+-])(\d{2})(\d{2})?|Z/,tt=/^([+-])(\d{2})(\d{2})|Z/,nt=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,rt=/^([+-])(\d{2}):(\d{2})|Z/,at=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function P(e,t,n){var r=t.match(e);if(!r)return null;var a=parseInt(r[0],10);return{value:n?n(a):a,rest:t.slice(r[0].length)}}function J(e,t){var n=t.match(e);return n?n[0]==="Z"?{value:0,rest:t.slice(1)}:{value:(n[1]==="+"?1:-1)*(36e5*(n[2]?parseInt(n[2],10):0)+6e4*(n[3]?parseInt(n[3],10):0)+1e3*(n[5]?parseInt(n[5],10):0)),rest:t.slice(n[0].length)}:null}function ot(e,t){return P(cn,e,t)}function R(e,t,n){switch(e){case 1:return P(an,t,n);case 2:return P(on,t,n);case 3:return P(sn,t,n);case 4:return P(un,t,n);default:return P(new RegExp("^\\d{1,"+e+"}"),t,n)}}function it(e,t,n){switch(e){case 1:return P(dn,t,n);case 2:return P(ln,t,n);case 3:return P(fn,t,n);case 4:return P(mn,t,n);default:return P(new RegExp("^-?\\d{1,"+e+"}"),t,n)}}function Fe(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function st(e,t){var n,r=t>0,a=r?t:1-t;if(a<=50)n=e||100;else{var o=a+50;n=e+100*Math.floor(o/100)-(e>=o%100?100:0)}return r?n:1-n}var hn=[31,28,31,30,31,30,31,31,30,31,30,31],gn=[31,29,31,30,31,30,31,31,30,31,30,31];function ut(e){return e%400==0||e%4==0&&e%100!=0}var wn={G:{priority:140,parse:function(e,t,n,r){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});case"GGGG":default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}},set:function(e,t,n,r){return t.era=n,e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["R","u","t","T"]},y:{priority:130,parse:function(e,t,n,r){var a=function(o){return{year:o,isTwoDigitYear:t==="yy"}};switch(t){case"y":return R(4,e,a);case"yo":return n.ordinalNumber(e,{unit:"year",valueCallback:a});default:return R(t.length,e,a)}},validate:function(e,t,n){return t.isTwoDigitYear||t.year>0},set:function(e,t,n,r){var a=e.getUTCFullYear();if(n.isTwoDigitYear){var o=st(n.year,a);return e.setUTCFullYear(o,0,1),e.setUTCHours(0,0,0,0),e}var i="era"in t&&t.era!==1?1-n.year:n.year;return e.setUTCFullYear(i,0,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","u","w","I","i","e","c","t","T"]},Y:{priority:130,parse:function(e,t,n,r){var a=function(o){return{year:o,isTwoDigitYear:t==="YY"}};switch(t){case"Y":return R(4,e,a);case"Yo":return n.ordinalNumber(e,{unit:"year",valueCallback:a});default:return R(t.length,e,a)}},validate:function(e,t,n){return t.isTwoDigitYear||t.year>0},set:function(e,t,n,r){var a=We(e,r);if(n.isTwoDigitYear){var o=st(n.year,a);return e.setUTCFullYear(o,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),ae(e,r)}var i="era"in t&&t.era!==1?1-n.year:n.year;return e.setUTCFullYear(i,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),ae(e,r)},incompatibleTokens:["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:{priority:130,parse:function(e,t,n,r){return it(t==="R"?4:t.length,e)},set:function(e,t,n,r){var a=new Date(0);return a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0),he(a)},incompatibleTokens:["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:{priority:130,parse:function(e,t,n,r){return it(t==="u"?4:t.length,e)},set:function(e,t,n,r){return e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["G","y","Y","R","w","I","i","e","c","t","T"]},Q:{priority:120,parse:function(e,t,n,r){switch(t){case"Q":case"QQ":return R(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=1&&t<=4},set:function(e,t,n,r){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:{priority:120,parse:function(e,t,n,r){switch(t){case"q":case"qq":return R(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,n){return t>=1&&t<=4},set:function(e,t,n,r){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:{priority:110,parse:function(e,t,n,r){var a=function(o){return o-1};switch(t){case"M":return P(Ve,e,a);case"MM":return R(2,e,a);case"Mo":return n.ordinalNumber(e,{unit:"month",valueCallback:a});case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=0&&t<=11},set:function(e,t,n,r){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]},L:{priority:110,parse:function(e,t,n,r){var a=function(o){return o-1};switch(t){case"L":return P(Ve,e,a);case"LL":return R(2,e,a);case"Lo":return n.ordinalNumber(e,{unit:"month",valueCallback:a});case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,n){return t>=0&&t<=11},set:function(e,t,n,r){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:{priority:100,parse:function(e,t,n,r){switch(t){case"w":return P(Ze,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return R(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=53},set:function(e,t,n,r){return ae(function(a,o,i){p(2,arguments);var s=b(a),u=M(o),d=Mt(s,i)-u;return s.setUTCDate(s.getUTCDate()-7*d),s}(e,n,r),r)},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:{priority:100,parse:function(e,t,n,r){switch(t){case"I":return P(Ze,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return R(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=53},set:function(e,t,n,r){return he(function(a,o){p(2,arguments);var i=b(a),s=M(o),u=Ct(i)-s;return i.setUTCDate(i.getUTCDate()-7*u),i}(e,n,r),r)},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:{priority:90,parse:function(e,t,n,r){switch(t){case"d":return P(Kt,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return R(t.length,e)}},validate:function(e,t,n){var r=ut(e.getUTCFullYear()),a=e.getUTCMonth();return r?t>=1&&t<=gn[a]:t>=1&&t<=hn[a]},set:function(e,t,n,r){return e.setUTCDate(n),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:{priority:90,parse:function(e,t,n,r){switch(t){case"D":case"DD":return P(Jt,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return R(t.length,e)}},validate:function(e,t,n){return ut(e.getUTCFullYear())?t>=1&&t<=366:t>=1&&t<=365},set:function(e,t,n,r){return e.setUTCMonth(0,n),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:{priority:90,parse:function(e,t,n,r){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=0&&t<=6},set:function(e,t,n,r){return(e=Oe(e,n,r)).setUTCHours(0,0,0,0),e},incompatibleTokens:["D","i","e","c","t","T"]},e:{priority:90,parse:function(e,t,n,r){var a=function(o){var i=7*Math.floor((o-1)/7);return(o+r.weekStartsOn+6)%7+i};switch(t){case"e":case"ee":return R(t.length,e,a);case"eo":return n.ordinalNumber(e,{unit:"day",valueCallback:a});case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=0&&t<=6},set:function(e,t,n,r){return(e=Oe(e,n,r)).setUTCHours(0,0,0,0),e},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:{priority:90,parse:function(e,t,n,r){var a=function(o){var i=7*Math.floor((o-1)/7);return(o+r.weekStartsOn+6)%7+i};switch(t){case"c":case"cc":return R(t.length,e,a);case"co":return n.ordinalNumber(e,{unit:"day",valueCallback:a});case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,n){return t>=0&&t<=6},set:function(e,t,n,r){return(e=Oe(e,n,r)).setUTCHours(0,0,0,0),e},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:{priority:90,parse:function(e,t,n,r){var a=function(o){return o===0?7:o};switch(t){case"i":case"ii":return R(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return n.day(e,{width:"abbreviated",context:"formatting",valueCallback:a})||n.day(e,{width:"short",context:"formatting",valueCallback:a})||n.day(e,{width:"narrow",context:"formatting",valueCallback:a});case"iiiii":return n.day(e,{width:"narrow",context:"formatting",valueCallback:a});case"iiiiii":return n.day(e,{width:"short",context:"formatting",valueCallback:a})||n.day(e,{width:"narrow",context:"formatting",valueCallback:a});case"iiii":default:return n.day(e,{width:"wide",context:"formatting",valueCallback:a})||n.day(e,{width:"abbreviated",context:"formatting",valueCallback:a})||n.day(e,{width:"short",context:"formatting",valueCallback:a})||n.day(e,{width:"narrow",context:"formatting",valueCallback:a})}},validate:function(e,t,n){return t>=1&&t<=7},set:function(e,t,n,r){return(e=function(a,o){p(2,arguments);var i=M(o);i%7==0&&(i-=7);var s=1,u=b(a),d=u.getUTCDay(),w=i%7,l=(w+7)%7,m=(l<s?7:0)+i-d;return u.setUTCDate(u.getUTCDate()+m),u}(e,n,r)).setUTCHours(0,0,0,0),e},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:{priority:80,parse:function(e,t,n,r){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,n,r){return e.setUTCHours(Fe(n),0,0,0),e},incompatibleTokens:["b","B","H","K","k","t","T"]},b:{priority:80,parse:function(e,t,n,r){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,n,r){return e.setUTCHours(Fe(n),0,0,0),e},incompatibleTokens:["a","B","H","K","k","t","T"]},B:{priority:80,parse:function(e,t,n,r){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,n,r){return e.setUTCHours(Fe(n),0,0,0),e},incompatibleTokens:["a","b","t","T"]},h:{priority:70,parse:function(e,t,n,r){switch(t){case"h":return P(tn,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return R(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=12},set:function(e,t,n,r){var a=e.getUTCHours()>=12;return a&&n<12?e.setUTCHours(n+12,0,0,0):a||n!==12?e.setUTCHours(n,0,0,0):e.setUTCHours(0,0,0,0),e},incompatibleTokens:["H","K","k","t","T"]},H:{priority:70,parse:function(e,t,n,r){switch(t){case"H":return P(Vt,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return R(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=23},set:function(e,t,n,r){return e.setUTCHours(n,0,0,0),e},incompatibleTokens:["a","b","h","K","k","t","T"]},K:{priority:70,parse:function(e,t,n,r){switch(t){case"K":return P(en,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return R(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=11},set:function(e,t,n,r){return e.getUTCHours()>=12&&n<12?e.setUTCHours(n+12,0,0,0):e.setUTCHours(n,0,0,0),e},incompatibleTokens:["a","b","h","H","k","t","T"]},k:{priority:70,parse:function(e,t,n,r){switch(t){case"k":return P(Zt,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return R(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=24},set:function(e,t,n,r){var a=n<=24?n%24:n;return e.setUTCHours(a,0,0,0),e},incompatibleTokens:["a","b","h","H","K","t","T"]},m:{priority:60,parse:function(e,t,n,r){switch(t){case"m":return P(nn,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return R(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=59},set:function(e,t,n,r){return e.setUTCMinutes(n,0,0),e},incompatibleTokens:["t","T"]},s:{priority:50,parse:function(e,t,n,r){switch(t){case"s":return P(rn,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return R(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=59},set:function(e,t,n,r){return e.setUTCSeconds(n,0),e},incompatibleTokens:["t","T"]},S:{priority:30,parse:function(e,t,n,r){return R(t.length,e,function(a){return Math.floor(a*Math.pow(10,3-t.length))})},set:function(e,t,n,r){return e.setUTCMilliseconds(n),e},incompatibleTokens:["t","T"]},X:{priority:10,parse:function(e,t,n,r){switch(t){case"X":return J(et,e);case"XX":return J(tt,e);case"XXXX":return J(nt,e);case"XXXXX":return J(at,e);case"XXX":default:return J(rt,e)}},set:function(e,t,n,r){return t.timestampIsSet?e:new Date(e.getTime()-n)},incompatibleTokens:["t","T","x"]},x:{priority:10,parse:function(e,t,n,r){switch(t){case"x":return J(et,e);case"xx":return J(tt,e);case"xxxx":return J(nt,e);case"xxxxx":return J(at,e);case"xxx":default:return J(rt,e)}},set:function(e,t,n,r){return t.timestampIsSet?e:new Date(e.getTime()-n)},incompatibleTokens:["t","T","X"]},t:{priority:40,parse:function(e,t,n,r){return ot(e)},set:function(e,t,n,r){return[new Date(1e3*n),{timestampIsSet:!0}]},incompatibleTokens:"*"},T:{priority:20,parse:function(e,t,n,r){return ot(e)},set:function(e,t,n,r){return[new Date(n),{timestampIsSet:!0}]},incompatibleTokens:"*"}},bn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,yn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Dn=/^'([^]*?)'?$/,pn=/''/g,vn=/\S/,xn=/[a-zA-Z]/;function Tn(e,t,n,r){p(3,arguments);var a=String(e),o=String(t),i={},s=i.locale||yt;if(!s.match)throw new RangeError("locale must contain match property");var u=s.options&&s.options.firstWeekContainsDate,d=u==null?1:M(u),w=i.firstWeekContainsDate==null?d:M(i.firstWeekContainsDate);if(!(w>=1&&w<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var l=s.options&&s.options.weekStartsOn,m=l==null?0:M(l),c=i.weekStartsOn==null?m:M(i.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(o==="")return a===""?b(n):new Date(NaN);var h,x={firstWeekContainsDate:w,weekStartsOn:c,locale:s},j=[{priority:10,set:kn,index:0}],v=o.match(yn).map(function(U){var H=U[0];return H==="p"||H==="P"?(0,pt[H])(U,s.formatLong,x):U}).join("").match(bn),T=[];for(h=0;h<v.length;h++){var k=v[h];!i.useAdditionalWeekYearTokens&&Tt(k)&&Ee(k),!i.useAdditionalDayOfYearTokens&&xt(k)&&Ee(k);var I=k[0],B=wn[I];if(B){var z=B.incompatibleTokens;if(Array.isArray(z)){for(var E=void 0,N=0;N<T.length;N++){var Z=T[N].token;if(z.indexOf(Z)!==-1||Z===I){E=T[N];break}}if(E)throw new RangeError("The format string mustn't contain `".concat(E.fullToken,"` and `").concat(k,"` at the same time"))}else if(B.incompatibleTokens==="*"&&T.length)throw new RangeError("The format string mustn't contain `".concat(k,"` and any other token at the same time"));T.push({token:I,fullToken:k});var G=B.parse(a,k,s.match,x);if(!G)return new Date(NaN);j.push({priority:B.priority,set:B.set,validate:B.validate,value:G.value,index:j.length}),a=G.rest}else{if(I.match(xn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+I+"`");if(k==="''"?k="'":I==="'"&&(k=Cn(k)),a.indexOf(k)!==0)return new Date(NaN);a=a.slice(k.length)}}if(a.length>0&&vn.test(a))return new Date(NaN);var $=j.map(function(U){return U.priority}).sort(function(U,H){return H-U}).filter(function(U,H,se){return se.indexOf(U)===H}).map(function(U){return j.filter(function(H){return H.priority===U}).reverse()}).map(function(U){return U[0]}),_=b(n);if(isNaN(_))return new Date(NaN);var O=Dt(_,vt(_)),q={};for(h=0;h<$.length;h++){var Y=$[h];if(Y.validate&&!Y.validate(O,Y.value,x))return new Date(NaN);var K=Y.set(O,q,Y.value,x);K[0]?(O=K[0],Gt(q,K[1])):O=K}return O}function kn(e,t){if(t.timestampIsSet)return e;var n=new Date(0);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}function Cn(e){return e.match(Dn)[1].replace(pn,"'")}function Mn(e){p(1,arguments);var t=b(e);return!isNaN(t)}function C(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var Sn=function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return C(t==="yy"?r%100:r,t.length)},En=function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):C(n+1,2)},Pn=function(e,t){return C(e.getUTCDate(),t.length)},jn=function(e,t){return C(e.getUTCHours()%12||12,t.length)},Un=function(e,t){return C(e.getUTCHours(),t.length)},Rn=function(e,t){return C(e.getUTCMinutes(),t.length)},Nn=function(e,t){return C(e.getUTCSeconds(),t.length)},On=function(e,t){var n=t.length,r=e.getUTCMilliseconds();return C(Math.floor(r*Math.pow(10,n-3)),t.length)},Fn="midnight",Yn="noon",Bn="morning",qn="afternoon",Hn="evening",In="night",Ln={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){var r=e.getUTCFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return Sn(e,t)},Y:function(e,t,n,r){var a=We(e,r),o=a>0?a:1-a;return t==="YY"?C(o%100,2):t==="Yo"?n.ordinalNumber(o,{unit:"year"}):C(o,t.length)},R:function(e,t){return C(kt(e),t.length)},u:function(e,t){return C(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return C(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return C(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return En(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return C(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var a=Mt(e,r);return t==="wo"?n.ordinalNumber(a,{unit:"week"}):C(a,t.length)},I:function(e,t,n){var r=Ct(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):C(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):Pn(e,t)},D:function(e,t,n){var r=function(a){p(1,arguments);var o=b(a),i=o.getTime();o.setUTCMonth(0,1),o.setUTCHours(0,0,0,0);var s=o.getTime(),u=i-s;return Math.floor(u/864e5)+1}(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):C(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var a=e.getUTCDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return C(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var a=e.getUTCDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return C(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return C(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,a=e.getUTCHours();switch(r=a===12?Yn:a===0?Fn:a/12>=1?"pm":"am",t){case"b":case"bb":case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,a=e.getUTCHours();switch(r=a>=17?Hn:a>=12?qn:a>=4?Bn:In,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){var r=e.getUTCHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return jn(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):Un(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):C(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):C(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Rn(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Nn(e,t)},S:function(e,t){return On(e,t)},X:function(e,t,n,r){var a=(r._originalDate||e).getTimezoneOffset();if(a===0)return"Z";switch(t){case"X":return dt(a);case"XXXX":case"XX":return re(a);case"XXXXX":case"XXX":default:return re(a,":")}},x:function(e,t,n,r){var a=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return dt(a);case"xxxx":case"xx":return re(a);case"xxxxx":case"xxx":default:return re(a,":")}},O:function(e,t,n,r){var a=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ct(a,":");case"OOOO":default:return"GMT"+re(a,":")}},z:function(e,t,n,r){var a=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ct(a,":");case"zzzz":default:return"GMT"+re(a,":")}},t:function(e,t,n,r){var a=r._originalDate||e;return C(Math.floor(a.getTime()/1e3),t.length)},T:function(e,t,n,r){return C((r._originalDate||e).getTime(),t.length)}};function ct(e,t){var n=e>0?"-":"+",r=Math.abs(e),a=Math.floor(r/60),o=r%60;if(o===0)return n+String(a);var i=t;return n+String(a)+i+C(o,2)}function dt(e,t){return e%60==0?(e>0?"-":"+")+C(Math.abs(e)/60,2):re(e,t)}function re(e,t){var n=t||"",r=e>0?"-":"+",a=Math.abs(e);return r+C(Math.floor(a/60),2)+n+C(a%60,2)}var Wn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,An=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Qn=/^'([^]*?)'?$/,Gn=/''/g,_n=/[a-zA-Z]/;function ge(e,t,n){p(2,arguments);var r=String(t),a={},o=a.locale||yt,i=o.options&&o.options.firstWeekContainsDate,s=i==null?1:M(i),u=a.firstWeekContainsDate==null?s:M(a.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var d=o.options&&o.options.weekStartsOn,w=d==null?0:M(d),l=a.weekStartsOn==null?w:M(a.weekStartsOn);if(!(l>=0&&l<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!o.localize)throw new RangeError("locale must contain localize property");if(!o.formatLong)throw new RangeError("locale must contain formatLong property");var m=b(e);if(!Mn(m))throw new RangeError("Invalid time value");var c=vt(m),h=Dt(m,c),x={firstWeekContainsDate:u,weekStartsOn:l,locale:o,_originalDate:m},j=r.match(An).map(function(v){var T=v[0];return T==="p"||T==="P"?(0,pt[T])(v,o.formatLong,x):v}).join("").match(Wn).map(function(v){if(v==="''")return"'";var T=v[0];if(T==="'")return Xn(v);var k=Ln[T];if(k)return!a.useAdditionalWeekYearTokens&&Tt(v)&&Ee(v),!a.useAdditionalDayOfYearTokens&&xt(v)&&Ee(v),k(h,v,o.localize,x);if(T.match(_n))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");return v}).join("");return j}function Xn(e){return e.match(Qn)[1].replace(Gn,"'")}/*! *****************************************************************************
|
|
2
|
-
Copyright (c) Microsoft Corporation.
|
|
3
|
-
|
|
4
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
-
purpose with or without fee is hereby granted.
|
|
6
|
-
|
|
7
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
-
***************************************************************************** */function F(e,t){p(2,arguments);var n=b(e),r=M(t);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function oe(e,t){p(1,arguments);var n=e||{},r=b(n.start),a=b(n.end),o=a.getTime();if(!(r.getTime()<=o))throw new RangeError("Invalid interval");var i=[],s=r;s.setHours(0,0,0,0);var u=1;if(isNaN(u))throw new RangeError("`options.step` must be a number greater than 1");for(;s.getTime()<=o;)i.push(b(s)),s.setDate(s.getDate()+u),s.setHours(0,0,0,0);return i}function zn(e,t){p(1,arguments);var n={},r=n.locale,a=r&&r.options&&r.options.weekStartsOn,o=a==null?0:M(a),i=n.weekStartsOn==null?o:M(n.weekStartsOn);if(!(i>=0&&i<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=b(e),u=s.getDay(),d=6+(u<i?-7:0)-(u-i);return s.setDate(s.getDate()+d),s.setHours(23,59,59,999),s}function St(e){p(1,arguments);var t=b(e);return t.setDate(1),t.setHours(0,0,0,0),t}function $n(e,t){p(1,arguments);var n={},r=n.locale,a=r&&r.options&&r.options.weekStartsOn,o=a==null?0:M(a),i=n.weekStartsOn==null?o:M(n.weekStartsOn);if(!(i>=0&&i<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=b(e),u=s.getDay(),d=(u<i?7:0)+u-i;return s.setDate(s.getDate()-d),s.setHours(0,0,0,0),s}function Kn(e){var t=e===void 0?{}:e,n=t.firstDayOfWeek,r=n===void 0?1:n,a=t.weekdayLabelFormat,o=a===void 0?function(s){return ge(s,"iiiiii")}:a,i=new Date;return oe({start:F($n(i),r),end:F(zn(i),r)}).reduce(function(s,u){return s.push(o(u)),s},[])}function Jn(e){var t=e.year,n=e.month,r=e.firstDayOfWeek,a=r===void 0?1:r,o=e.dayLabelFormat,i=o===void 0?function(l){return ge(l,"dd")}:o,s=new Date(t,n),u=St(s),d=function(l){p(1,arguments);var m=b(l),c=m.getDay();return c}(u),w=function(l){p(1,arguments);var m=b(l),c=m.getMonth();return m.setFullYear(m.getFullYear(),c+1,0),m.setHours(23,59,59,999),m}(s);return function(){for(var l=0,m=0,c=arguments.length;m<c;m++)l+=arguments[m].length;var h=Array(l),x=0;for(m=0;m<c;m++)for(var j=arguments[m],v=0,T=j.length;v<T;v++,x++)h[x]=j[v];return h}(Array.from(Array(d>=a?d-a:6-a+d+1).keys()).fill(0),oe({start:u,end:w}).map(function(l){return{date:l,dayLabel:i(l)}}))}var Vn=function(e){return ge(e,"dd")},Zn=function(e){return ge(e,"eeeeee")},er=function(e){return ge(e,"MMMM yyyy")};function tr(e){var t=e.year,n=e.month,r=e.firstDayOfWeek,a=r===void 0?1:r,o=e.dayLabelFormat,i=o===void 0?Vn:o,s=e.weekdayLabelFormat,u=s===void 0?Zn:s,d=e.monthLabelFormat,w=d===void 0?er:d;return{days:D.useMemo(function(){return Jn({year:t,month:n,firstDayOfWeek:a,dayLabelFormat:i})},[t,n,a,i]),weekdayLabels:D.useMemo(function(){return Kn({firstDayOfWeek:a,weekdayLabelFormat:u})},[a,u]),monthLabel:w(new Date(t,n))}}function te(e,t){p(2,arguments);var n=b(e),r=b(t);return n.getTime()<r.getTime()}function ke(e,t){p(2,arguments);var n=b(e),r=b(t);return n.getTime()>r.getTime()}function me(e,t){p(2,arguments);var n=t||{},r=b(e).getTime(),a=b(n.start).getTime(),o=b(n.end).getTime();if(!(a<=o))throw new RangeError("Invalid interval");return r>=a&&r<=o}function Be(e){p(1,arguments);var t=b(e);return t.setHours(0,0,0,0),t}function X(e,t){p(2,arguments);var n=Be(e),r=Be(t);return n.getTime()===r.getTime()}function qe(e,t){p(2,arguments);var n=b(e),r=M(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var a=n.getDate(),o=new Date(n.getTime());o.setMonth(n.getMonth()+r+1,0);var i=o.getDate();return a>=i?o:(n.setFullYear(o.getFullYear(),o.getMonth(),a),n)}var Et=function(e,t){return e===void 0&&(e=[]),e.some(function(n){return X(t,n)})};function nr(e,t,n){return!(!t||!n)&&me(e,{start:t,end:n})}function rr(e,t,n){return!!(t&&X(e,t)||n&&X(e,n))}function ar(e,t){return!(!t||!X(e,t))}function or(e,t){return!(!t||!X(e,t))}function ir(e){var t=e.date,n=e.minBookingDate,r=e.maxBookingDate,a=e.isDateBlockedFn,o=e.startDate,i=e.endDate,s=e.minBookingDays,u=s===void 0?1:s,d=e.unavailableDates,w=d===void 0?[]:d,l=n&&new Date(n.getFullYear(),n.getMonth(),n.getDate(),0,0,0),m=r&&new Date(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0);return!!(Et(w,t)||l&&te(t,l)||m&&ke(t,m)||o&&!i&&u>1&&me(t,{start:o,end:F(o,u-2)})||a&&a(t))}function Me(e){var t=St(e);return{year:function(n){p(1,arguments);var r=b(n),a=r.getFullYear();return a}(t),month:function(n){p(1,arguments);var r=b(n),a=r.getMonth();return a}(t),date:t}}function sr(){return Me(Be(Date.now()))}function ve(e,t){var n=t?Me(t):sr(),r=n.date,a=[n];return e>1&&(a=Array.from(Array(e-1).keys()).reduce(function(o){return r=qe(o[o.length-1].date,1),o.concat([Me(r)])},a)),a}function de(e,t,n,r){var a=e[r?n>0?0:e.length-r:n>0?e.length-1:0].date;return Array.from(Array(t).keys()).reduce(function(o){return a=o.length===0?qe(a,n):qe(a,n>=0?1:-1),n>0?o.concat([Me(a)]):[Me(a)].concat(o)},[])}function lt(e,t,n){return e&&typeof t=="string"?ge(e,t):e&&typeof t=="function"?t(e):n}function xe(e){var t=e.startDate,n=e.endDate,r=e.isDateBlocked,a=e.minBookingDays,o=e.exactMinBookingDays,i=e.minBookingDate,s=e.maxBookingDate,u=!i||!te(t,F(i,-1)),d=!s||!ke(F(t,a-1),s);return!(!t||a!==1||n||r(t))||(t&&a>1&&!n&&!o||t&&a>0&&o&&u&&d||t&&a>0&&o&&!i&&!s?!oe({start:t,end:F(t,a-1)}).some(function(w){return r(w)}):!(!t||!n||o)&&!te(n,F(t,a-1))&&!oe({start:t,end:n}).some(function(w){return r(w)}))}function ur(e){var t=e.startDate,n=e.endDate,r=e.focusedInput,a=e.minBookingDate,o=e.maxBookingDate,i=e.onDatesChange,s=e.initialVisibleMonth,u=e.exactMinBookingDays,d=u!==void 0&&u,w=e.minBookingDays,l=w===void 0?1:w,m=e.numberOfMonths,c=m===void 0?2:m,h=e.firstDayOfWeek,x=h===void 0?1:h,j=e.isDateBlocked,v=j===void 0?function(){return!1}:j,T=e.unavailableDates,k=T===void 0?[]:T,I=e.changeActiveMonthOnSelect,B=I===void 0||I,z=D.useState(function(){return ve(c,t||s||null)}),E=z[0],N=z[1],Z=D.useState(null),G=Z[0],$=Z[1],_=D.useState(t),O=_[0],q=_[1];D.useEffect(function(){return typeof window<"u"&&window.addEventListener&&window.addEventListener("keydown",H),function(){window.removeEventListener&&window.removeEventListener("keydown",H)}});var Y=function(f){return Et(k,f)||v(f)},K=function(f){q(f),(!O||O&&!X(f,O))&&N(ve(c,f))},U=function(f){return ir({date:f,minBookingDate:a,maxBookingDate:o,startDate:t,endDate:n,minBookingDays:l,isDateBlockedFn:Y})};function H(f){if((f.key==="ArrowRight"||f.key==="ArrowLeft"||f.key==="ArrowDown"||f.key==="ArrowUp")&&!O){var A=E[0];K(A.date),N(ve(c,A.date))}}var se=D.useCallback(function(){N(de(E,c,-1)),q(null)},[E,c]),Ue=D.useCallback(function(){N(de(E,c,-1,1)),q(null)},[E,c]),y=D.useCallback(function(){N(de(E,c,1)),q(null)},[E,c]),ue=D.useCallback(function(){N(de(E,c,1,1)),q(null)},[E,c]),Ft=D.useCallback(function(f){N(ve(c,f)),q(null)},[c]),Yt=D.useCallback(function(f){f===void 0&&(f=1),N(de(E,c,-(12*f-c+1))),q(null)},[E,c]),Bt=D.useCallback(function(f){f===void 0&&(f=1),N(de(E,c,12*f-c+1)),q(null)},[E,c]);return{firstDayOfWeek:x,activeMonths:E,isDateSelected:function(f){return nr(f,t,n)},isDateHovered:function(f){return function(A){var ce=A.date,L=A.startDate,we=A.endDate,be=A.isDateBlocked,W=A.hoveredDate,ee=A.minBookingDays,Re=A.exactMinBookingDays;return W&&ee>1&&Re&&me(ce,{start:W,end:F(W,ee-1)})?!oe({start:W,end:F(W,ee-1)}).some(function(ne){return be(ne)}):L&&!we&&W&&me(ce,{start:L,end:F(L,ee-1)})&&X(L,W)&&ee>1?!oe({start:L,end:F(L,ee-1)}).some(function(ne){return be(ne)}):!(!L||we||!W||te(W,L)||!me(ce,{start:L,end:W}))&&!oe({start:L,end:W}).some(function(ne){return be(ne)})}({date:f,hoveredDate:G,startDate:t,endDate:n,minBookingDays:l,exactMinBookingDays:d,isDateBlocked:Y})},isFirstOrLastSelectedDate:function(f){return rr(f,t,n)},isStartDate:function(f){return ar(f,t)},isEndDate:function(f){return or(f,n)},isDateBlocked:U,numberOfMonths:c,isDateFocused:function(f){return!!O&&X(f,O)},focusedDate:O,hoveredDate:G,onResetDates:function(){i({startDate:null,endDate:null,focusedInput:"startDate"})},onDateHover:function(f){if(f){if(f){var A=!U(f)||t&&X(f,t),ce=!a||!te(f,F(a,-1)),L=!o||!ke(f,o),we=F(f,l-1),be=!a||!te(we,a),W=!o||!ke(we,o),ee=d&&l>1&&ce&&L&&be&&W,Re=t&&!n&&!d&&ce&&L,ne=!(l>1&&t)||me(f,{start:t,end:F(t,l-2)}),qt=t&&X(f,t)&≠A&&(ee||Re||qt)?$(f):G!==null&&$(null)}}else $(null)},onDateSelect:function(f){(r==="endDate"||r==="startDate")&&l>0&&d&&xe({minBookingDays:l,exactMinBookingDays:d,minBookingDate:a,maxBookingDate:o,isDateBlocked:Y,startDate:f,endDate:null})?i({startDate:f,endDate:F(f,l-1),focusedInput:null}):(r==="endDate"&&t&&te(f,t)||r==="startDate"&&n&&ke(f,n))&&!d&&xe({minBookingDays:l,isDateBlocked:Y,startDate:f,endDate:null})?i({endDate:null,startDate:f,focusedInput:"endDate"}):r==="startDate"&&!d&&xe({minBookingDays:l,isDateBlocked:Y,endDate:n,startDate:f})?i({endDate:n,startDate:f,focusedInput:"endDate"}):r==="startDate"&&!d&&xe({minBookingDays:l,isDateBlocked:Y,endDate:null,startDate:f})?i({endDate:null,startDate:f,focusedInput:"endDate"}):r==="endDate"&&t&&!te(f,t)&&!d&&xe({minBookingDays:l,isDateBlocked:Y,startDate:t,endDate:f})&&i({startDate:t,endDate:f,focusedInput:null}),r!=="endDate"&&(!O||O&&!X(f,O))&&B&&N(ve(c,f))},onDateFocus:K,goToPreviousMonths:se,goToPreviousMonthsByOneMonth:Ue,goToNextMonths:y,goToNextMonthsByOneMonth:ue,goToDate:Ft,goToPreviousYear:Yt,goToNextYear:Bt}}function cr(e){var t=e.date,n=e.focusedDate,r=e.isDateSelected,a=e.isDateFocused,o=e.isFirstOrLastSelectedDate,i=e.isDateHovered,s=e.isDateBlocked,u=e.onDateSelect,d=e.onDateFocus,w=e.onDateHover,l=D.useCallback(function(){return u(t)},[t,u]),m=D.useCallback(function(){return w(t)},[t,w]),c=s(t)&&!i(t);return{tabIndex:n===null||a(t)?0:-1,isSelected:r(t),isSelectedStartOrEnd:o(t),isWithinHoverRange:i(t),disabledDate:c,onKeyDown:function(h){h.key==="ArrowRight"?d(F(t,1)):h.key==="ArrowLeft"?d(F(t,-1)):h.key==="ArrowUp"?d(F(t,-7)):h.key==="ArrowDown"&&d(F(t,7))},onClick:c?function(){}:l,onMouseEnter:m}}var Ae=(e=>(e.ShortDate="MM/dd/yyyy",e.LongDate="MMM dd yyyy",e.DayOfWeekDayOfMonth="eeee, MMMM do",e))(Ae||{}),Q=(e=>(e.StartDate="startDate",e.EndDate="endDate",e))(Q||{});const V=new Date,Qe=V.getFullYear(),dr=V.getMonth(),lr=V,Pt=Qe-100,jt=Qe+5,He=Ae.ShortDate,fr={dateFormat:He,endDate:null,focusedInput:null,withDateRange:!1,maxYear:jt,minYear:Pt,startDate:null,onClose:()=>{throw new Error("onClose(): boolean not implemented")},setFocusedInput:()=>{throw new Error("setFocusedInput(): boolean not implemented")},focusedDate:V,firstDayOfWeek:void 0,activeMonths:[],isDateFocused:()=>{throw new Error("isDateFocused(): boolean not implemented")},isDateSelected:()=>{throw new Error("isDateSelected(): boolean not implemented")},isDateHovered:()=>{throw new Error("isDateHovered(): boolean not implemented")},isDateBlocked:()=>{throw new Error("isDateBlocked(): boolean not implemented")},isFirstOrLastSelectedDate:()=>{throw new Error("isFirstOrLastSelectedDate(): boolean not implemented")},onDateFocus:()=>{throw new Error("onDateFocus(): boolean not implemented")},onDateHover:()=>{throw new Error("onDateHover(): boolean not implemented")},onDateSelect:()=>{throw new Error("onDateSelect(): boolean not implemented")},goToPreviousMonths:()=>{throw new Error("goToPreviousMonths(): boolean not implemented")},goToNextMonths:()=>{throw new Error("goToNextMonths(): boolean not implemented")},goToDate:()=>{throw new Error("goToDate(): boolean not implemented")},clearDates:()=>{throw new Error("clearDates(): boolean not implemented")}},Ut=D.createContext(fr),ie=()=>D.useContext(Ut);function mr(e,t){const n=S.toDate(e,t?.in);return n.setHours(23,59,59,999),n}function hr(e,t,n){const r=S.toDate(e,n?.in);return isNaN(t)?S.constructFrom(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function gr(e,t,n){const r=S.toDate(e,n?.in);if(isNaN(t))return S.constructFrom(e,NaN);if(!t)return r;const a=r.getDate(),o=S.constructFrom(e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const i=o.getDate();return a>=i?o:(r.setFullYear(o.getFullYear(),o.getMonth(),a),r)}function wr(e,t,n){const{years:r=0,months:a=0,weeks:o=0,days:i=0,hours:s=0,minutes:u=0,seconds:d=0}=t,w=S.toDate(e,n?.in),l=a||r?gr(w,a+r*12):w,m=i||o?hr(l,i+o*7):l,c=u+s*60,x=(d+c*60)*1e3;return S.constructFrom(e,+m+x)}function Rt(e,t){return+S.toDate(e)>+S.toDate(t)}const br=({children:e,dateFormat:t=He,endDate:n,inputProps:r,maxDate:a,maxDaysInRange:o,maxYear:i,minDate:s,minYear:u,onDateChange:d,placement:w="bottom",startDate:l,withDateRange:m})=>{const[c,h]=D.useState({startDate:l,endDate:n||l,focusedInput:null}),x=D.useCallback(y=>{if(o&&y)return wr(y,{days:o});if(a)return a},[a,o]),j=y=>{if(!y)return;y.endDate||(y.endDate=y.startDate);const ue=x(y.startDate);y.endDate&&ue&&Rt(y.endDate,ue)&&(y.endDate=null),y.startDate=y.startDate?S.startOfDay(y.startDate):y.startDate,y.endDate=y.endDate?mr(y.endDate):y.endDate,h({...y,focusedInput:y.focusedInput||Q.StartDate}),!m&&d&&d(y)},v=D.useCallback(({open:y})=>{h({startDate:null,endDate:null,focusedInput:y?Q.StartDate:null})},[]),{activeMonths:T,firstDayOfWeek:k,focusedDate:I,goToDate:B,goToNextMonths:z,goToPreviousMonths:E,isDateBlocked:N,isDateFocused:Z,isDateHovered:G,isDateSelected:$,isFirstOrLastSelectedDate:_,onDateFocus:O,onDateHover:q,onDateSelect:Y}=ur({endDate:c.endDate,focusedInput:c.focusedInput,initialVisibleMonth:c.startDate||V,maxBookingDate:m&&c.focusedInput===Q.StartDate?void 0:x(c.startDate),minBookingDate:s,minBookingDays:1,numberOfMonths:1,onDatesChange:j,startDate:c.startDate,...!m&&{exactMinBookingDays:!0}}),K=D.useCallback(y=>{y===Q.EndDate&&c.endDate?B(c.endDate):c.startDate&&B(c.startDate)},[B,c.endDate,c.startDate]),U=D.useCallback(y=>{h(ue=>({...ue,focusedInput:y})),K(y)},[K]),H=()=>{r?.disabled||(!c.startDate||!m)&&U(Q.StartDate)},se=D.useCallback(()=>{U(null),m&&d&&(console.log("onDateChange called on close"),setTimeout(()=>{console.log("onDateChange called after timeout"),d({startDate:c.startDate,endDate:c.endDate})},200))},[m,d,U,c.endDate,c.startDate]),Ue=D.useMemo(()=>T[0],[T]);return D.useEffect(()=>{h(y=>({...y,startDate:l,endDate:n||l}))},[l,n]),g.jsxRuntimeExports.jsx(Ut.Provider,{value:{activeMonth:Ue,activeMonths:T,dateFormat:t||He,endDate:c.endDate||null,firstDayOfWeek:k,focusedDate:I||lr,focusedInput:c.focusedInput,goToDate:B,goToNextMonths:z,goToPreviousMonths:E,setFocusedInput:U,isDateBlocked:N,isDateFocused:Z,isDateHovered:G,withDateRange:m||!1,isDateSelected:$,isFirstOrLastSelectedDate:_,maxDate:a,maxYear:i||jt,minDate:s,minYear:u||Pt,onDateChange:d,onDateFocus:O,onDateHover:q,onDateSelect:Y,startDate:c.startDate,onClose:se,clearDates:v},children:g.jsxRuntimeExports.jsx(le.PopoverRoot,{onOpenChange:({open:y})=>{y?H():U(null)},positioning:{placement:w},variant:"default",onExitComplete:()=>{se()},children:e})})};function yr(e,t){return+S.toDate(e)<+S.toDate(t)}const Dr=(e,t)=>t?Rt(e,t):!0,pr=(e,t)=>t?yr(e,t):!0;function vr({inputProps:e}){const{setFocusedInput:t,startDate:n,endDate:r,focusedInput:a,dateFormat:o,withDateRange:i,minDate:s,maxDate:u,onDateChange:d,onDateSelect:w,onClose:l}=ie(),{open:m,setOpen:c}=Ie.usePopoverContext(),h=e?.size||"md",x=v=>{v.key==="Enter"&&m&&(c(!1),l(),v.preventDefault(),v.stopPropagation())},j=v=>{const T=v.target.value,k=Tn(T,o,V);T.length===o.length&&S.isDate(k)&&Dr(k,s)&&pr(k,u)&&w(k),!T.length&&d&&d({startDate:null,endDate:null})};return g.jsxRuntimeExports.jsxs(Le.HStack,{w:"100%",className:"DatePicker__Trigger","data-testid":"kibble-datepicker-trigger",children:[g.jsxRuntimeExports.jsx(Ge.WrappedTextInput,{className:"DatePicker__Input--Start","data-testid":"kibble-datepicker-input-start",autoComplete:"off",rightElement:g.jsxRuntimeExports.jsx(Xe.Flex,{...!e?.disabled&&{onClick:()=>t(Q.StartDate)},h:"100%",align:"center",children:g.jsxRuntimeExports.jsx(_e.Icon,{name:"calendarDate",size:h})}),value:lt(n,o,""),onChange:j,onKeyDown:x,...!e?.disabled&&{onFocus:()=>{t(Q.StartDate)}},placeholder:S.format(V,o).toString(),...a===Q.StartDate&&{"data-focus":!0},...e}),i&&g.jsxRuntimeExports.jsxs(g.jsxRuntimeExports.Fragment,{children:[g.jsxRuntimeExports.jsx(wt.WrappedText,{children:" - "}),g.jsxRuntimeExports.jsx(Ge.WrappedTextInput,{className:"DatePicker__Input--End","data-testid":"kibble-datepicker-input-end",rightElement:g.jsxRuntimeExports.jsx(Xe.Flex,{...!e?.disabled&&{onClick:()=>t(Q.StartDate)},h:"100%",align:"center",children:g.jsxRuntimeExports.jsx(_e.Icon,{name:"calendarDate",size:h})}),value:lt(r,o,""),onChange:j,...!e?.disabled&&{onFocus:()=>t(Q.EndDate)},onKeyDown:x,placeholder:S.format(V,o).toString(),...a===Q.EndDate&&{"data-focus":!0},...e})]})]})}function xr({buttonText:e="Apply",onSubmit:t,hideResetButton:n}){const{startDate:r,endDate:a,onClose:o,clearDates:i}=ie(),{open:s,setOpen:u}=Ie.usePopoverContext(),d=D.useCallback(()=>{u(!1),o(),t&&t({startDate:r,endDate:a})},[u,o,t,r,a]);return g.jsxRuntimeExports.jsxs(Le.HStack,{w:"100%",justify:n?"end":"space-between",align:"center",borderTop:"1px",borderColor:"border.default",px:3,py:2,children:[!n&&g.jsxRuntimeExports.jsx(Ce.Button,{size:"sm",variant:"ghostNeutral",onClick:()=>i({open:s}),children:"Clear Dates"}),g.jsxRuntimeExports.jsx(Ce.Button,{size:"sm",onClick:d,children:e})]})}var Tr=Math.ceil,kr=Math.max;function Cr(e,t,n,r){for(var a=-1,o=kr(Tr((t-e)/(n||1)),0),i=Array(o);o--;)i[++a]=e,e+=n;return i}function Mr(e,t){return e===t||e!==e&&t!==t}var Sr=typeof global=="object"&&global&&global.Object===Object&&global,Er=typeof self=="object"&&self&&self.Object===Object&&self,Pr=Sr||Er||Function("return this")(),Pe=Pr.Symbol,Nt=Object.prototype,jr=Nt.hasOwnProperty,Ur=Nt.toString,Te=Pe?Pe.toStringTag:void 0;function Rr(e){var t=jr.call(e,Te),n=e[Te];try{e[Te]=void 0;var r=!0}catch{}var a=Ur.call(e);return r&&(t?e[Te]=n:delete e[Te]),a}var Nr=Object.prototype,Or=Nr.toString;function Fr(e){return Or.call(e)}var Yr="[object Null]",Br="[object Undefined]",ft=Pe?Pe.toStringTag:void 0;function Ot(e){return e==null?e===void 0?Br:Yr:ft&&ft in Object(e)?Rr(e):Fr(e)}function je(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var qr="[object AsyncFunction]",Hr="[object Function]",Ir="[object GeneratorFunction]",Lr="[object Proxy]";function Wr(e){if(!je(e))return!1;var t=Ot(e);return t==Hr||t==Ir||t==qr||t==Lr}var Ar=9007199254740991;function Qr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ar}function Gr(e){return e!=null&&Qr(e.length)&&!Wr(e)}var _r=9007199254740991,Xr=/^(?:0|[1-9]\d*)$/;function zr(e,t){var n=typeof e;return t=t??_r,!!t&&(n=="number"||n!="symbol"&&Xr.test(e))&&e>-1&&e%1==0&&e<t}function $r(e,t,n){if(!je(n))return!1;var r=typeof t;return(r=="number"?Gr(n)&&zr(t,n.length):r=="string"&&t in n)?Mr(n[t],e):!1}var Kr=/\s/;function Jr(e){for(var t=e.length;t--&&Kr.test(e.charAt(t)););return t}var Vr=/^\s+/;function Zr(e){return e&&e.slice(0,Jr(e)+1).replace(Vr,"")}function ea(e){return e!=null&&typeof e=="object"}var ta="[object Symbol]";function na(e){return typeof e=="symbol"||ea(e)&&Ot(e)==ta}var mt=NaN,ra=/^[-+]0x[0-9a-f]+$/i,aa=/^0b[01]+$/i,oa=/^0o[0-7]+$/i,ia=parseInt;function sa(e){if(typeof e=="number")return e;if(na(e))return mt;if(je(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=je(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Zr(e);var n=aa.test(e);return n||oa.test(e)?ia(e.slice(2),n?2:8):ra.test(e)?mt:+e}var ua=1/0,ca=17976931348623157e292;function Ye(e){if(!e)return e===0?e:0;if(e=sa(e),e===ua||e===-1/0){var t=e<0?-1:1;return t*ca}return e===e?e:0}function da(e){return function(t,n,r){return r&&typeof r!="number"&&$r(t,n,r)&&(n=r=void 0),t=Ye(t),n===void 0?(n=t,t=0):n=Ye(n),r=r===void 0?t<n?1:-1:Ye(r),Cr(t,n,r)}}var la=da();function fa(e,t){const n=S.toDate(e,t?.in),r=n.getFullYear(),a=n.getMonth(),o=S.constructFrom(n,0);return o.setFullYear(r,a+1,0),o.setHours(0,0,0,0),o.getDate()}function ma(e,t,n){const r=S.toDate(e,n?.in),a=r.getFullYear(),o=r.getDate(),i=S.constructFrom(e,0);i.setFullYear(a,t,15),i.setHours(0,0,0,0);const s=fa(i);return r.setMonth(t,Math.min(o,s)),r}function ht(e,t,n){let r=S.toDate(e,n?.in);return isNaN(+r)?S.constructFrom(e,NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=ma(r,t.month)),t.date!=null&&r.setDate(t.date),t.hours!=null&&r.setHours(t.hours),t.minutes!=null&&r.setMinutes(t.minutes),t.seconds!=null&&r.setSeconds(t.seconds),t.milliseconds!=null&&r.setMilliseconds(t.milliseconds),r)}const gt=["January","February","March","April","May","June","July","August","September","October","November","December"];function ha(){const e=D.useRef(null),t=D.useRef(null),{focusedDate:n,activeMonth:r,minYear:a,maxYear:o,goToDate:i,goToNextMonths:s,goToPreviousMonths:u}=ie(),d=D.useMemo(()=>gt.map((h,x)=>({label:h,value:String(x),selected:x===r?.month})),[r?.month]),w=D.useMemo(()=>la(a,o+1).map(h=>{const x=String(h),j=h===r?.year;return{label:x,value:x,selected:j,...j&&{ref:t}}}),[r?.year,o,a]),l=h=>i(ht(n||V,{month:Number(h),year:r?.year})),m=h=>i(ht(n||V,{month:r?.month,year:Number(h)})),c=({type:h})=>{setTimeout(()=>{const x=h==="year"?t?.current:e?.current;x&&x.scrollIntoView({block:"center"})})};return g.jsxRuntimeExports.jsxs(Le.HStack,{className:"DatePicker__Header","data-testid":"kibble-datepicker-header",w:"100%",justify:"space-between",borderBottom:"1px",borderColor:"border.default",py:2,px:3,children:[g.jsxRuntimeExports.jsx(Ce.Button,{iconName:"chevronLeft",onClick:u,variant:"ghostNeutral",size:"sm"}),g.jsxRuntimeExports.jsxs(fe.Center,{gap:2,h:"100%",children:[g.jsxRuntimeExports.jsx(ze.Menu,{"data-testid":"kibble-datepicker-month-menu",buttonProps:{variant:"tertiary",text:gt[r?.month||0],size:"sm"},listProps:{menuItems:d,onSelect:l,maxH:250},onOpenChange:({open:h})=>{h&&c({type:"month"})}}),g.jsxRuntimeExports.jsx(ze.Menu,{"data-testid":"kibble-datepicker-year-menu",buttonProps:{variant:"tertiary",text:String(r?.year),size:"sm"},listProps:{menuItems:w,onSelect:m,maxH:250},onOpenChange:({open:h})=>{h&&c({type:"year"})}})]}),g.jsxRuntimeExports.jsx(Ce.Button,{iconName:"chevronRight",onClick:s,variant:"ghostNeutral",size:"sm"})]})}const ga=["root","indicator"],wa={default:{root:{borderColor:"transparent",_hover:{bg:"background.secondaryAlpha.hover"}}},disabled:{root:{bg:"background.subtle",borderColor:"transparent",cursor:"not-allowed",opacity:.4}},inRange:{root:{bg:"background.secondaryAlpha.hover",borderColor:"transparent",borderRadius:"none",color:"text.info"}},selectedEnd:{root:{borderColor:"border.focus",color:"text.info"}},selectedStart:{root:{bg:"background.secondary",borderColor:"border.focus",color:"text.contrast",_hover:{bg:"background.secondary"}}}},ba=Ht.defineSlotRecipe({slots:ga,base:{indicator:{position:"absolute",h:6,right:-4,top:-4,transform:"rotate(45deg)",w:6},root:{border:"2px",borderRadius:"4px",color:"text.subtle",cursor:"pointer",fontSize:"sm",fontWeight:"normal !important",position:"relative",px:3,py:1,overflow:"hidden"}},variants:{variant:wa,isToday:{true:{indicator:{bg:"background.secondary"}},false:{}},withDateRange:{true:{},false:{}}},compoundVariants:[{variant:"selectedStart",isToday:!0,css:{indicator:{bg:"background"}}},{withDateRange:!0,variant:"selectedStart",css:{root:{borderRightRadius:0}}},{withDateRange:!0,variant:"selectedEnd",css:{root:{borderLeftRadius:0}}}],defaultVariants:{}}),ya=({dayLabel:e,date:t,onDaySelected:n})=>{const r=new Date,a=D.useRef(null),{startDate:o,endDate:i,dateFormat:s,withDateRange:u}=ie(),d=D.useMemo(()=>({currentDay:S.format(t,s),startDate:o&&S.format(o,s),endDate:i&&S.format(i,s)}),[t,s,i,o]),w=d.currentDay===d.startDate,l=d.currentDay===d.endDate,m=d.currentDay===S.format(r,s),{focusedDate:c,isDateFocused:h,isDateSelected:x,isDateHovered:j,isDateBlocked:v,isFirstOrLastSelectedDate:T,onDateSelect:k,onDateFocus:I,onDateHover:B}=ie(),{disabledDate:z,isSelected:E,onClick:N,onKeyDown:Z,onMouseEnter:G,tabIndex:$}=cr({date:t,focusedDate:c,isDateFocused:h,isDateSelected:x,isDateHovered:j,isDateBlocked:v,isFirstOrLastSelectedDate:T,onDateFocus:I,onDateSelect:k,onDateHover:B}),_=D.useMemo(()=>{switch(!0){case z:return"disabled";case w:return"selectedStart";case l:return"selectedEnd";case(E&&!w&&!l):return"inRange";default:return"default"}},[z,l,w,E]),q=It.useSlotRecipe({recipe:ba})({variant:_,isToday:m,withDateRange:u});if(!e)return g.jsxRuntimeExports.jsx(g.jsxRuntimeExports.Fragment,{});const Y=()=>{_!=="disabled"&&(N(),n())};return g.jsxRuntimeExports.jsxs(Ce.Button,{className:"DatePicker__Day","data-testid":`kibble-datepicker-day--${d.currentDay}`,onClick:Y,onKeyDown:Z,onMouseEnter:G,tabIndex:$,ref:a,unstyled:!0,css:q.root,children:[m&&g.jsxRuntimeExports.jsx(bt.Box,{css:q.indicator}),e]})},Da=({onDaySelected:e})=>{const t=D.useRef(null),{firstDayOfWeek:n,activeMonth:r}=ie(),{days:a,weekdayLabels:o}=tr({year:r?.year||Qe,month:r?.month!==void 0?r.month:dr,firstDayOfWeek:n});return g.jsxRuntimeExports.jsxs(bt.Box,{ref:t,className:"DatePicker__Month","data-testid":"kibble-datepicker-month",children:[g.jsxRuntimeExports.jsx(fe.Grid,{templateColumns:"repeat(7, 1fr)",my:2,children:o.map(i=>g.jsxRuntimeExports.jsx(fe.GridItem,{children:g.jsxRuntimeExports.jsx(fe.Center,{children:g.jsxRuntimeExports.jsx(wt.WrappedText,{size:"xs",variant:"subtle",children:i})})},i))}),g.jsxRuntimeExports.jsx(fe.Grid,{templateColumns:"repeat(7, 1fr)",children:a.map((i,s)=>typeof i=="object"?g.jsxRuntimeExports.jsx(ya,{date:i.date,dayLabel:i.dayLabel,onDaySelected:e},i.date.toString()):g.jsxRuntimeExports.jsx("div",{},s))})]})};function pa(){const{withDateRange:e,activeMonths:t,onClose:n}=ie(),{setOpen:r}=Ie.usePopoverContext(),a=()=>{e||(r(!1),n())};return g.jsxRuntimeExports.jsx(fe.Grid,{className:"DatePicker__Calendar","data-testid":"kibble-datepicker-calendar",gap:"0 64px",px:3,py:2,children:t.map(o=>g.jsxRuntimeExports.jsx(Da,{onDaySelected:a},`${o.year}-${o.month}`))})}const va=e=>{const{footerProps:t,hideFooter:n=!1,inputProps:r,withDateRange:a=!1}=e;return g.jsxRuntimeExports.jsxs(br,{...e,children:[g.jsxRuntimeExports.jsx(le.PopoverTrigger,{children:g.jsxRuntimeExports.jsx(vr,{inputProps:r})}),g.jsxRuntimeExports.jsx(Lt.Portal,{children:g.jsxRuntimeExports.jsx(le.PopoverPositioner,{className:"DatePicker","data-testid":"kibble-datepicker",children:g.jsxRuntimeExports.jsxs(le.PopoverContent,{className:"DatePicker__Content","data-testid":"kibble-datepicker-content",minW:"340px",children:[g.jsxRuntimeExports.jsx(le.PopoverArrow,{}),g.jsxRuntimeExports.jsxs(le.PopoverBody,{p:"0 !important",children:[g.jsxRuntimeExports.jsx(ha,{}),g.jsxRuntimeExports.jsx(pa,{}),a&&!n&&g.jsxRuntimeExports.jsx(xr,{...t})]})]})})})]})};exports.DateFormats=Ae;exports.DatePicker=va;
|
|
15
|
-
//# sourceMappingURL=datePicker.component-u52NQcza.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const i=require("./jsx-runtime-BjDatQAs.js"),g=require("react"),e=require("./use-locale-context-BdqHZ8L8.js"),l=require("./render-strategy-BmWbSgqh.js"),a=require("./index-CZ42b9rT.js"),d=require("./index-MlhL0PDC.js"),[u,p]=e.createContext({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),P=g.forwardRef((t,o)=>{const r=p(),s=l.useRenderStrategyPropsContext(),n=e.usePresence({...s,present:r.open}),c=a.mergeProps(r.getBackdropProps(),n.getPresenceProps(),t);return n.unmounted?null:i.jsxRuntimeExports.jsx(e.ark.div,{...c,ref:e.composeRefs(n.ref,o)})});P.displayName="DialogBackdrop";const x=g.forwardRef((t,o)=>{const r=p(),s=a.mergeProps(r.getCloseTriggerProps(),t);return i.jsxRuntimeExports.jsx(e.ark.button,{...s,ref:o})});x.displayName="DialogCloseTrigger";const m=g.forwardRef((t,o)=>{const r=p(),s=e.usePresenceContext(),n=a.mergeProps(r.getContentProps(),s.getPresenceProps(),t);return s.unmounted?null:i.jsxRuntimeExports.jsx(e.ark.div,{...n,ref:e.composeRefs(s.ref,o)})});m.displayName="DialogContent";const D=g.forwardRef((t,o)=>{const r=p(),s=a.mergeProps(r.getDescriptionProps(),t);return i.jsxRuntimeExports.jsx(e.ark.div,{...s,ref:o})});D.displayName="DialogDescription";const R=g.forwardRef((t,o)=>{const r=p(),s=a.mergeProps(r.getPositionerProps(),t);return e.usePresenceContext().unmounted?null:i.jsxRuntimeExports.jsx(e.ark.div,{...s,ref:o})});R.displayName="DialogPositioner";const C=t=>{const o=g.useId(),{getRootNode:r}=e.useEnvironmentContext(),{dir:s}=e.useLocaleContext(),n={id:o,getRootNode:r,dir:s,...t},c=e.useMachine(d.machine,n);return d.connect(c,e.normalizeProps)},y=t=>{const[o,{children:r,...s}]=e.splitPresenceProps(t),[n]=l.splitRenderStrategyProps(o),c=C(s),v=e.usePresence(a.mergeProps({present:c.open},o));return i.jsxRuntimeExports.jsx(u,{value:c,children:i.jsxRuntimeExports.jsx(l.RenderStrategyPropsProvider,{value:n,children:i.jsxRuntimeExports.jsx(e.PresenceProvider,{value:v,children:r})})})},E=t=>{const[o,{value:r,children:s}]=e.splitPresenceProps(t),[n]=l.splitRenderStrategyProps(o),c=e.usePresence(a.mergeProps({present:r.open},o));return i.jsxRuntimeExports.jsx(u,{value:r,children:i.jsxRuntimeExports.jsx(l.RenderStrategyPropsProvider,{value:n,children:i.jsxRuntimeExports.jsx(e.PresenceProvider,{value:c,children:s})})})},j=g.forwardRef((t,o)=>{const r=p(),s=a.mergeProps(r.getTitleProps(),t);return i.jsxRuntimeExports.jsx(e.ark.h2,{...s,ref:o})});j.displayName="DialogTitle";const f=g.forwardRef((t,o)=>{const r=p(),s=e.usePresenceContext(),n=a.mergeProps({...r.getTriggerProps(),"aria-controls":s.unmounted?void 0:r.getTriggerProps()["aria-controls"]},t);return i.jsxRuntimeExports.jsx(e.ark.button,{...n,ref:o})});f.displayName="DialogTrigger";exports.DialogBackdrop=P;exports.DialogCloseTrigger=x;exports.DialogContent=m;exports.DialogDescription=D;exports.DialogPositioner=R;exports.DialogRoot=y;exports.DialogRootProvider=E;exports.DialogTitle=j;exports.DialogTrigger=f;exports.useDialogContext=p;
|
|
2
|
-
//# sourceMappingURL=dialog-trigger-B5NK0lr-.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const o=require("./index-CZ42b9rT.js"),R=require("./use-locale-context-BdqHZ8L8.js"),te=require("./index-BGwwyukg.js");var ie=Object.defineProperty,le=(e,l,t)=>l in e?ie(e,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[l]=t,d=(e,l,t)=>le(e,typeof l!="symbol"?l+"":l,t),L={itemToValue(e){return typeof e=="string"?e:o.isObject(e)&&o.hasProp(e,"value")?e.value:""},itemToString(e){return typeof e=="string"?e:o.isObject(e)&&o.hasProp(e,"label")?e.label:L.itemToValue(e)},isItemDisabled(e){return o.isObject(e)&&o.hasProp(e,"disabled")?!!e.disabled:!1}},W=class Y{constructor(l){this.options=l,d(this,"items"),d(this,"copy",t=>new Y({...this.options,items:t??[...this.items]})),d(this,"isEqual",t=>o.isEqual(this.items,t.items)),d(this,"setItems",t=>this.copy(t)),d(this,"getValues",(t=this.items)=>Array.from(t).map(i=>this.getItemValue(i)).filter(Boolean)),d(this,"find",t=>{if(t==null)return null;const i=this.indexOf(t);return i!=null?this.at(i):null}),d(this,"findMany",t=>Array.from(t).map(i=>this.find(i)).filter(i=>i!=null)),d(this,"at",t=>{if(!this.options.groupBy&&!this.options.groupSort)return this.items[t]??null;let i=0;const s=this.group();for(const[,n]of s)for(const u of n){if(i===t)return u;i++}return null}),d(this,"sortFn",(t,i)=>{const s=this.indexOf(t),n=this.indexOf(i);return(s??0)-(n??0)}),d(this,"sort",t=>[...t].sort(this.sortFn.bind(this))),d(this,"getItemValue",t=>t==null?null:this.options.itemToValue?.(t)??L.itemToValue(t)),d(this,"getItemDisabled",t=>t==null?!1:this.options.isItemDisabled?.(t)??L.isItemDisabled(t)),d(this,"stringifyItem",t=>t==null?null:this.options.itemToString?.(t)??L.itemToString(t)),d(this,"stringify",t=>t==null?null:this.stringifyItem(this.find(t))),d(this,"stringifyItems",(t,i=", ")=>Array.from(t).map(s=>this.stringifyItem(s)).filter(Boolean).join(i)),d(this,"stringifyMany",(t,i)=>this.stringifyItems(this.findMany(t),i)),d(this,"has",t=>this.indexOf(t)!==-1),d(this,"hasItem",t=>t==null?!1:this.has(this.getItemValue(t))),d(this,"group",()=>{const{groupBy:t,groupSort:i}=this.options;if(!t)return[["",[...this.items]]];const s=new Map;this.items.forEach((u,r)=>{const h=t(u,r);s.has(h)||s.set(h,[]),s.get(h).push(u)});let n=Array.from(s.entries());return i&&n.sort(([u],[r])=>{if(typeof i=="function")return i(u,r);if(Array.isArray(i)){const h=i.indexOf(u),m=i.indexOf(r);return h===-1?1:m===-1?-1:h-m}return i==="asc"?u.localeCompare(r):i==="desc"?r.localeCompare(u):0}),n}),d(this,"getNextValue",(t,i=1,s=!1)=>{let n=this.indexOf(t);if(n===-1)return null;for(n=s?Math.min(n+i,this.size-1):n+i;n<=this.size&&this.getItemDisabled(this.at(n));)n++;return this.getItemValue(this.at(n))}),d(this,"getPreviousValue",(t,i=1,s=!1)=>{let n=this.indexOf(t);if(n===-1)return null;for(n=s?Math.max(n-i,0):n-i;n>=0&&this.getItemDisabled(this.at(n));)n--;return this.getItemValue(this.at(n))}),d(this,"indexOf",t=>{if(t==null)return-1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex(n=>this.getItemValue(n)===t);let i=0;const s=this.group();for(const[,n]of s)for(const u of n){if(this.getItemValue(u)===t)return i;i++}return-1}),d(this,"getByText",(t,i)=>{let s=i!=null?ne(this.items,this.indexOf(i)):this.items;return t.length===1&&(s=s.filter(u=>this.getItemValue(u)!==i)),s.find(u=>se(this.stringifyItem(u),t))}),d(this,"search",(t,i)=>{const{state:s,currentValue:n,timeout:u=350}=i,r=s.keysSoFar+t,m=r.length>1&&Array.from(r).every(E=>E===r[0])?r[0]:r,v=this.getByText(m,n),f=this.getItemValue(v);function y(){clearTimeout(s.timer),s.timer=-1}function I(E){s.keysSoFar=E,y(),E!==""&&(s.timer=+setTimeout(()=>{I(""),y()},u))}return I(r),f}),d(this,"update",(t,i)=>{let s=this.items.findIndex(n=>this.getItemValue(n)===t);return s===-1?this:this.copy([...this.items.slice(0,s),i,...this.items.slice(s+1)])}),d(this,"insert",(t,...i)=>this.copy(b(this.items,t,...i))),d(this,"insertBefore",(t,...i)=>{let s=this.indexOf(t);if(s===-1)if(this.items.length===0)s=0;else return this;return this.copy(b(this.items,s,...i))}),d(this,"insertAfter",(t,...i)=>{let s=this.indexOf(t);if(s===-1)if(this.items.length===0)s=0;else return this;return this.copy(b(this.items,s+1,...i))}),d(this,"prepend",(...t)=>this.copy(b(this.items,0,...t))),d(this,"append",(...t)=>this.copy(b(this.items,this.items.length,...t))),d(this,"filter",t=>{const i=this.items.filter((s,n)=>t(this.stringifyItem(s),n));return this.copy(i)}),d(this,"remove",(...t)=>{const i=t.map(s=>typeof s=="string"?s:this.getItemValue(s));return this.copy(this.items.filter(s=>{const n=this.getItemValue(s);return n==null?!1:!i.includes(n)}))}),d(this,"move",(t,i)=>{const s=this.indexOf(t);return s===-1?this:this.copy(G(this.items,[s],i))}),d(this,"moveBefore",(t,...i)=>{let s=this.items.findIndex(u=>this.getItemValue(u)===t);if(s===-1)return this;let n=i.map(u=>this.items.findIndex(r=>this.getItemValue(r)===u)).sort((u,r)=>u-r);return this.copy(G(this.items,n,s))}),d(this,"moveAfter",(t,...i)=>{let s=this.items.findIndex(u=>this.getItemValue(u)===t);if(s===-1)return this;let n=i.map(u=>this.items.findIndex(r=>this.getItemValue(r)===u)).sort((u,r)=>u-r);return this.copy(G(this.items,n,s+1))}),d(this,"reorder",(t,i)=>this.copy(G(this.items,[t],i))),d(this,"compareValue",(t,i)=>{const s=this.indexOf(t),n=this.indexOf(i);return s<n?-1:s>n?1:0}),d(this,"range",(t,i)=>{let s=[],n=t;for(;n!=null;){if(this.find(n)&&s.push(n),n===i)return s;n=this.getNextValue(n)}return[]}),d(this,"getValueRange",(t,i)=>t&&i?this.compareValue(t,i)<=0?this.range(t,i):this.range(i,t):[]),d(this,"toString",()=>{let t="";for(const i of this.items){const s=this.getItemValue(i),n=this.stringifyItem(i),u=this.getItemDisabled(i),r=[s,n,u].filter(Boolean).join(":");t+=r+","}return t}),d(this,"toJSON",()=>({size:this.size,first:this.firstValue,last:this.lastValue})),this.items=[...l.items]}get size(){return this.items.length}get firstValue(){let l=0;for(;this.getItemDisabled(this.at(l));)l++;return this.getItemValue(this.at(l))}get lastValue(){let l=this.size-1;for(;this.getItemDisabled(this.at(l));)l--;return this.getItemValue(this.at(l))}*[Symbol.iterator](){yield*this.items}},se=(e,l)=>!!e?.toLowerCase().startsWith(l.toLowerCase()),ne=(e,l)=>e.map((t,i)=>e[(Math.max(l,0)+i)%e.length]);function b(e,l,...t){return[...e.slice(0,l),...t,...e.slice(l)]}function G(e,l,t){l=[...l].sort((s,n)=>s-n);const i=l.map(s=>e[s]);for(let s=l.length-1;s>=0;s--)e=[...e.slice(0,l[s]),...e.slice(l[s]+1)];return t=Math.max(0,t-l.filter(s=>s<t).length),[...e.slice(0,t),...i,...e.slice(t)]}var j=o.createAnatomy("select").parts("label","positioner","trigger","indicator","clearTrigger","item","itemText","itemIndicator","itemGroup","itemGroupLabel","list","content","root","control","valueText"),p=j.build(),J=e=>new W(e);J.empty=()=>new W({items:[]});var re=e=>e.ids?.root??`select:${e.id}`,x=e=>e.ids?.content??`select:${e.id}:content`,w=e=>e.ids?.trigger??`select:${e.id}:trigger`,Q=e=>e.ids?.clearTrigger??`select:${e.id}:clear-trigger`,F=e=>e.ids?.label??`select:${e.id}:label`,ae=e=>e.ids?.control??`select:${e.id}:control`,_=(e,l)=>e.ids?.item?.(l)??`select:${e.id}:option:${l}`,B=e=>e.ids?.hiddenSelect??`select:${e.id}:select`,X=e=>e.ids?.positioner??`select:${e.id}:positioner`,oe=(e,l)=>e.ids?.itemGroup?.(l)??`select:${e.id}:optgroup:${l}`,K=(e,l)=>e.ids?.itemGroupLabel?.(l)??`select:${e.id}:optgroup-label:${l}`,M=e=>e.getById(B(e)),A=e=>e.getById(x(e)),T=e=>e.getById(w(e)),ue=e=>e.getById(Q(e)),$=e=>e.getById(X(e)),de=(e,l)=>e.getById(_(e,l));function ce(e,l){const{context:t,prop:i,scope:s,state:n,computed:u,send:r}=e,h=i("disabled")||t.get("fieldsetDisabled"),m=i("invalid"),v=i("readOnly"),f=i("composite"),y=i("collection"),I=n.hasTag("open"),E=n.matches("focused"),V=t.get("highlightedValue"),Z=t.get("highlightedItem"),z=t.get("selectedItems"),N=t.get("currentPlacement"),U=u("isTypingAhead"),k=u("isInteractive"),D=V?_(s,V):void 0;function P(a){const c=y.getItemDisabled(a.item),g=y.getItemValue(a.item);return o.ensure(g,()=>`[zag-js] No value found for item ${JSON.stringify(a.item)}`),{value:g,disabled:!!(h||c),highlighted:V===g,selected:t.get("value").includes(g)}}const ee=R.getPlacementStyles({...i("positioning"),placement:N});return{open:I,focused:E,empty:t.get("value").length===0,highlightedItem:Z,highlightedValue:V,selectedItems:z,hasSelectedItems:u("hasSelectedItems"),value:t.get("value"),valueAsString:t.get("valueAsString"),collection:y,multiple:!!i("multiple"),disabled:!!h,reposition(a={}){r({type:"POSITIONING.SET",options:a})},focus(){T(s)?.focus({preventScroll:!0})},setOpen(a){n.hasTag("open")!==a&&r({type:a?"OPEN":"CLOSE"})},selectValue(a){r({type:"ITEM.SELECT",value:a})},setValue(a){r({type:"VALUE.SET",value:a})},selectAll(){r({type:"VALUE.SET",value:y.getValues()})},highlightValue(a){r({type:"HIGHLIGHTED_VALUE.SET",value:a})},clearValue(a){r(a?{type:"ITEM.CLEAR",value:a}:{type:"VALUE.CLEAR"})},getItemState:P,getRootProps(){return l.element({...p.root.attrs,dir:i("dir"),id:re(s),"data-invalid":o.dataAttr(m),"data-readonly":o.dataAttr(v)})},getLabelProps(){return l.label({dir:i("dir"),id:F(s),...p.label.attrs,"data-disabled":o.dataAttr(h),"data-invalid":o.dataAttr(m),"data-readonly":o.dataAttr(v),htmlFor:B(s),onClick(a){a.defaultPrevented||h||T(s)?.focus({preventScroll:!0})}})},getControlProps(){return l.element({...p.control.attrs,dir:i("dir"),id:ae(s),"data-state":I?"open":"closed","data-focus":o.dataAttr(E),"data-disabled":o.dataAttr(h),"data-invalid":o.dataAttr(m)})},getValueTextProps(){return l.element({...p.valueText.attrs,dir:i("dir"),"data-disabled":o.dataAttr(h),"data-invalid":o.dataAttr(m),"data-focus":o.dataAttr(E)})},getTriggerProps(){return l.button({id:w(s),disabled:h,dir:i("dir"),type:"button",role:"combobox","aria-controls":x(s),"aria-expanded":I,"aria-haspopup":"listbox","data-state":I?"open":"closed","aria-invalid":m,"aria-labelledby":F(s),...p.trigger.attrs,"data-disabled":o.dataAttr(h),"data-invalid":o.dataAttr(m),"data-readonly":o.dataAttr(v),"data-placement":N,"data-placeholder-shown":o.dataAttr(!u("hasSelectedItems")),onClick(a){k&&(a.defaultPrevented||r({type:"TRIGGER.CLICK"}))},onFocus(){r({type:"TRIGGER.FOCUS"})},onBlur(){r({type:"TRIGGER.BLUR"})},onKeyDown(a){if(a.defaultPrevented||!k)return;const g={ArrowUp(){r({type:"TRIGGER.ARROW_UP"})},ArrowDown(C){r({type:C.altKey?"OPEN":"TRIGGER.ARROW_DOWN"})},ArrowLeft(){r({type:"TRIGGER.ARROW_LEFT"})},ArrowRight(){r({type:"TRIGGER.ARROW_RIGHT"})},Home(){r({type:"TRIGGER.HOME"})},End(){r({type:"TRIGGER.END"})},Enter(){r({type:"TRIGGER.ENTER"})},Space(C){r(U?{type:"TRIGGER.TYPEAHEAD",key:C.key}:{type:"TRIGGER.ENTER"})}}[o.getEventKey(a,{dir:i("dir"),orientation:"vertical"})];if(g){g(a),a.preventDefault();return}o.getByTypeahead.isValidEvent(a)&&(r({type:"TRIGGER.TYPEAHEAD",key:a.key}),a.preventDefault())}})},getIndicatorProps(){return l.element({...p.indicator.attrs,dir:i("dir"),"aria-hidden":!0,"data-state":I?"open":"closed","data-disabled":o.dataAttr(h),"data-invalid":o.dataAttr(m),"data-readonly":o.dataAttr(v)})},getItemProps(a){const c=P(a);return l.element({id:_(s,c.value),role:"option",...p.item.attrs,dir:i("dir"),"data-value":c.value,"aria-selected":c.selected,"data-state":c.selected?"checked":"unchecked","data-highlighted":o.dataAttr(c.highlighted),"data-disabled":o.dataAttr(c.disabled),"aria-disabled":o.ariaAttr(c.disabled),onPointerMove(g){c.disabled||g.pointerType!=="mouse"||c.value!==V&&r({type:"ITEM.POINTER_MOVE",value:c.value})},onClick(g){g.defaultPrevented||c.disabled||r({type:"ITEM.CLICK",src:"pointerup",value:c.value})},onPointerLeave(g){c.disabled||a.persistFocus||g.pointerType!=="mouse"||!e.event.previous()?.type.includes("POINTER")||r({type:"ITEM.POINTER_LEAVE"})}})},getItemTextProps(a){const c=P(a);return l.element({...p.itemText.attrs,"data-state":c.selected?"checked":"unchecked","data-disabled":o.dataAttr(c.disabled),"data-highlighted":o.dataAttr(c.highlighted)})},getItemIndicatorProps(a){const c=P(a);return l.element({"aria-hidden":!0,...p.itemIndicator.attrs,"data-state":c.selected?"checked":"unchecked",hidden:!c.selected})},getItemGroupLabelProps(a){const{htmlFor:c}=a;return l.element({...p.itemGroupLabel.attrs,id:K(s,c),dir:i("dir"),role:"presentation"})},getItemGroupProps(a){const{id:c}=a;return l.element({...p.itemGroup.attrs,"data-disabled":o.dataAttr(h),id:oe(s,c),"aria-labelledby":K(s,c),role:"group",dir:i("dir")})},getClearTriggerProps(){return l.button({...p.clearTrigger.attrs,id:Q(s),type:"button","aria-label":"Clear value","data-invalid":o.dataAttr(m),disabled:h,hidden:!u("hasSelectedItems"),dir:i("dir"),onClick(a){a.defaultPrevented||r({type:"CLEAR.CLICK"})}})},getHiddenSelectProps(){const a=t.get("value"),c=i("multiple")?a:a?.[0];return l.select({name:i("name"),form:i("form"),disabled:h,multiple:i("multiple"),required:i("required"),"aria-hidden":!0,id:B(s),defaultValue:c,style:o.visuallyHiddenStyle,tabIndex:-1,onFocus(){T(s)?.focus({preventScroll:!0})},"aria-labelledby":F(s)})},getPositionerProps(){return l.element({...p.positioner.attrs,dir:i("dir"),id:X(s),style:ee.floating})},getContentProps(){return l.element({hidden:!I,dir:i("dir"),id:x(s),role:f?"listbox":"dialog",...p.content.attrs,"data-state":I?"open":"closed","data-placement":N,"data-activedescendant":D,"aria-activedescendant":f?D:void 0,"aria-multiselectable":i("multiple")&&f?!0:void 0,"aria-labelledby":F(s),tabIndex:0,onKeyDown(a){if(!k||!o.isSelfTarget(a))return;if(a.key==="Tab"&&!o.isValidTabEvent(a)){a.preventDefault();return}const c={ArrowUp(){r({type:"CONTENT.ARROW_UP"})},ArrowDown(){r({type:"CONTENT.ARROW_DOWN"})},Home(){r({type:"CONTENT.HOME"})},End(){r({type:"CONTENT.END"})},Enter(){r({type:"ITEM.CLICK",src:"keydown.enter"})},Space(H){U?r({type:"CONTENT.TYPEAHEAD",key:H.key}):c.Enter?.(H)}},g=c[o.getEventKey(a)];if(g){g(a),a.preventDefault();return}const C=o.getEventTarget(a);o.isEditableElement(C)||o.getByTypeahead.isValidEvent(a)&&(r({type:"CONTENT.TYPEAHEAD",key:a.key}),a.preventDefault())}})},getListProps(){return l.element({...p.list.attrs,tabIndex:0,role:f?void 0:"listbox","aria-labelledby":w(s),"aria-activedescendant":f?void 0:D,"aria-multiselectable":!f&&i("multiple")?!0:void 0})}}}var{and:S,not:O,or:he}=o.createGuards(),ge=o.createMachine({props({props:e}){return{loopFocus:!1,closeOnSelect:!e.multiple,composite:!0,defaultValue:[],...e,collection:e.collection??J.empty(),positioning:{placement:"bottom-start",gutter:8,...e.positioning}}},context({prop:e,bindable:l}){return{value:l(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:o.isEqual,onChange(t){const i=e("collection").findMany(t);return e("onValueChange")?.({value:t,items:i})}})),highlightedValue:l(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),onChange(t){e("onHighlightChange")?.({highlightedValue:t,highlightedItem:e("collection").find(t),highlightedIndex:e("collection").indexOf(t)})}})),currentPlacement:l(()=>({defaultValue:void 0})),fieldsetDisabled:l(()=>({defaultValue:!1})),highlightedItem:l(()=>({defaultValue:null})),selectedItems:l(()=>{const t=e("value")??e("defaultValue")??[];return{defaultValue:e("collection").findMany(t)}}),valueAsString:l(()=>{const t=e("value")??e("defaultValue")??[];return{defaultValue:e("collection").stringifyMany(t)}})}},refs(){return{typeahead:{...o.getByTypeahead.defaultOptions}}},computed:{hasSelectedItems:({context:e})=>e.get("value").length>0,isTypingAhead:({refs:e})=>e.get("typeahead").keysSoFar!=="",isDisabled:({prop:e,context:l})=>!!e("disabled")||!!l.get("fieldsetDisabled"),isInteractive:({prop:e})=>!(e("disabled")||e("readOnly"))},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"idle"},entry:["syncSelectElement"],watch({context:e,prop:l,track:t,action:i}){t([()=>e.get("value").toString()],()=>{i(["syncSelectedItems","syncSelectElement","dispatchChangeEvent"])}),t([()=>l("open")],()=>{i(["toggleVisibility"])}),t([()=>e.get("highlightedValue")],()=>{i(["syncHighlightedItem"])}),t([()=>l("collection").toString()],()=>{i(["syncCollection"])})},on:{"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedItem"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setSelectedItems"]},"VALUE.CLEAR":{actions:["clearSelectedItems"]},"CLEAR.CLICK":{actions:["clearSelectedItems","focusTriggerEl"]}},effects:["trackFormControlState"],states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":[{guard:"isTriggerClickEvent",target:"open",actions:["setInitialFocus","highlightFirstSelectedItem"]},{target:"open",actions:["setInitialFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus","highlightFirstSelectedItem"]}],"TRIGGER.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen"]}]}},focused:{tags:["closed"],on:{"CONTROLLED.OPEN":[{guard:"isTriggerClickEvent",target:"open",actions:["setInitialFocus","highlightFirstSelectedItem"]},{guard:"isTriggerArrowUpEvent",target:"open",actions:["setInitialFocus","highlightComputedLastItem"]},{guard:he("isTriggerArrowDownEvent","isTriggerEnterEvent"),target:"open",actions:["setInitialFocus","highlightComputedFirstItem"]},{target:"open",actions:["setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen"]}],"TRIGGER.BLUR":{target:"idle"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightFirstSelectedItem"]}],"TRIGGER.ENTER":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedFirstItem"]}],"TRIGGER.ARROW_UP":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedLastItem"]}],"TRIGGER.ARROW_DOWN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedFirstItem"]}],"TRIGGER.ARROW_LEFT":[{guard:S(O("multiple"),"hasSelectedItems"),actions:["selectPreviousItem"]},{guard:O("multiple"),actions:["selectLastItem"]}],"TRIGGER.ARROW_RIGHT":[{guard:S(O("multiple"),"hasSelectedItems"),actions:["selectNextItem"]},{guard:O("multiple"),actions:["selectFirstItem"]}],"TRIGGER.HOME":{guard:O("multiple"),actions:["selectFirstItem"]},"TRIGGER.END":{guard:O("multiple"),actions:["selectLastItem"]},"TRIGGER.TYPEAHEAD":{guard:O("multiple"),actions:["selectMatchingItem"]}}},open:{tags:["open"],exit:["scrollContentToTop"],effects:["trackDismissableElement","computePlacement","scrollToHighlightedItem"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["focusTriggerEl","clearHighlightedItem"]},{target:"idle",actions:["clearHighlightedItem"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{guard:"restoreFocus",target:"focused",actions:["invokeOnClose","focusTriggerEl","clearHighlightedItem"]},{target:"idle",actions:["invokeOnClose","clearHighlightedItem"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","clearHighlightedItem"]}],"ITEM.CLICK":[{guard:S("closeOnSelect","isOpenControlled"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","focusTriggerEl","clearHighlightedItem"]},{actions:["selectHighlightedItem"]}],"CONTENT.HOME":{actions:["highlightFirstItem"]},"CONTENT.END":{actions:["highlightLastItem"]},"CONTENT.ARROW_DOWN":[{guard:S("hasHighlightedItem","loop","isLastItemHighlighted"),actions:["highlightFirstItem"]},{guard:"hasHighlightedItem",actions:["highlightNextItem"]},{actions:["highlightFirstItem"]}],"CONTENT.ARROW_UP":[{guard:S("hasHighlightedItem","loop","isFirstItemHighlighted"),actions:["highlightLastItem"]},{guard:"hasHighlightedItem",actions:["highlightPreviousItem"]},{actions:["highlightLastItem"]}],"CONTENT.TYPEAHEAD":{actions:["highlightMatchingItem"]},"ITEM.POINTER_MOVE":{actions:["highlightItem"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedItem"]},"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{loop:({prop:e})=>!!e("loopFocus"),multiple:({prop:e})=>!!e("multiple"),hasSelectedItems:({computed:e})=>!!e("hasSelectedItems"),hasHighlightedItem:({context:e})=>e.get("highlightedValue")!=null,isFirstItemHighlighted:({context:e,prop:l})=>e.get("highlightedValue")===l("collection").firstValue,isLastItemHighlighted:({context:e,prop:l})=>e.get("highlightedValue")===l("collection").lastValue,closeOnSelect:({prop:e,event:l})=>!!(l.closeOnSelect??e("closeOnSelect")),restoreFocus:({event:e})=>q(e),isOpenControlled:({prop:e})=>e("open")!==void 0,isTriggerClickEvent:({event:e})=>e.previousEvent?.type==="TRIGGER.CLICK",isTriggerEnterEvent:({event:e})=>e.previousEvent?.type==="TRIGGER.ENTER",isTriggerArrowUpEvent:({event:e})=>e.previousEvent?.type==="TRIGGER.ARROW_UP",isTriggerArrowDownEvent:({event:e})=>e.previousEvent?.type==="TRIGGER.ARROW_DOWN"},effects:{trackFormControlState({context:e,scope:l}){return o.trackFormControl(M(l),{onFieldsetDisabledChange(t){e.set("fieldsetDisabled",t)},onFormReset(){const t=e.initial("value");e.set("value",t)}})},trackDismissableElement({scope:e,send:l,prop:t}){const i=()=>A(e);let s=!0;return te.trackDismissableElement(i,{defer:!0,exclude:[T(e),ue(e)],onFocusOutside:t("onFocusOutside"),onPointerDownOutside:t("onPointerDownOutside"),onInteractOutside(n){t("onInteractOutside")?.(n),s=!(n.detail.focusable||n.detail.contextmenu)},onDismiss(){l({type:"CLOSE",src:"interact-outside",restoreFocus:s})}})},computePlacement({context:e,prop:l,scope:t}){const i=l("positioning");e.set("currentPlacement",i.placement);const s=()=>T(t),n=()=>$(t);return R.getPlacement(s,n,{defer:!0,...i,onComplete(u){e.set("currentPlacement",u.placement)}})},scrollToHighlightedItem({context:e,prop:l,scope:t,event:i}){const s=u=>{const r=e.get("highlightedValue");if(r==null||i.current().type.includes("POINTER"))return;const h=de(t,r),m=A(t),v=l("scrollToIndexFn");if(v){const f=l("collection").indexOf(r);v?.({index:f,immediate:u});return}o.scrollIntoView(h,{rootEl:m,block:"nearest"})};o.raf(()=>s(!0));const n=()=>A(t);return o.observeAttributes(n,{defer:!0,attributes:["data-activedescendant"],callback(){s(!1)}})}},actions:{reposition({context:e,prop:l,scope:t,event:i}){const s=()=>$(t);R.getPlacement(T(t),s,{...l("positioning"),...i.options,defer:!0,listeners:!1,onComplete(n){e.set("currentPlacement",n.placement)}})},toggleVisibility({send:e,prop:l,event:t}){e({type:l("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:t})},highlightPreviousItem({context:e,prop:l}){const t=e.get("highlightedValue");if(t==null)return;const i=l("collection").getPreviousValue(t,1,l("loopFocus"));e.set("highlightedValue",i)},highlightNextItem({context:e,prop:l}){const t=e.get("highlightedValue");if(t==null)return;const i=l("collection").getNextValue(t,1,l("loopFocus"));e.set("highlightedValue",i)},highlightFirstItem({context:e,prop:l}){const t=l("collection").firstValue;e.set("highlightedValue",t)},highlightLastItem({context:e,prop:l}){const t=l("collection").lastValue;e.set("highlightedValue",t)},setInitialFocus({scope:e}){o.raf(()=>{o.getInitialFocus({root:A(e)})?.focus({preventScroll:!0})})},focusTriggerEl({event:e,scope:l}){q(e)&&o.raf(()=>{T(l)?.focus({preventScroll:!0})})},selectHighlightedItem({context:e,prop:l,event:t}){let i=t.value??e.get("highlightedValue");if(i==null)return;i=l("deselectable")&&!l("multiple")&&e.get("value").includes(i)?null:i,e.set("value",n=>i==null?[]:l("multiple")?o.addOrRemove(n,i):[i])},highlightComputedFirstItem({context:e,prop:l,computed:t}){const i=l("collection"),s=t("hasSelectedItems")?i.sort(e.get("value"))[0]:i.firstValue;e.set("highlightedValue",s)},highlightComputedLastItem({context:e,prop:l,computed:t}){const i=l("collection"),s=t("hasSelectedItems")?i.sort(e.get("value"))[0]:i.lastValue;e.set("highlightedValue",s)},highlightFirstSelectedItem({context:e,prop:l,computed:t}){if(!t("hasSelectedItems"))return;const i=l("collection").sort(e.get("value"))[0];e.set("highlightedValue",i)},highlightItem({context:e,event:l}){e.set("highlightedValue",l.value)},highlightMatchingItem({context:e,prop:l,event:t,refs:i}){const s=l("collection").search(t.key,{state:i.get("typeahead"),currentValue:e.get("highlightedValue")});s!=null&&e.set("highlightedValue",s)},setHighlightedItem({context:e,event:l}){e.set("highlightedValue",l.value)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},selectItem({context:e,prop:l,event:t}){const s=l("deselectable")&&!l("multiple")&&e.get("value").includes(t.value)?null:t.value;e.set("value",n=>s==null?[]:l("multiple")?o.addOrRemove(n,s):[s])},clearItem({context:e,event:l}){e.set("value",t=>t.filter(i=>i!==l.value))},setSelectedItems({context:e,event:l}){e.set("value",l.value)},clearSelectedItems({context:e}){e.set("value",[])},selectPreviousItem({context:e,prop:l}){const[t]=e.get("value"),i=l("collection").getPreviousValue(t);i&&e.set("value",[i])},selectNextItem({context:e,prop:l}){const[t]=e.get("value"),i=l("collection").getNextValue(t);i&&e.set("value",[i])},selectFirstItem({context:e,prop:l}){const t=l("collection").firstValue;t&&e.set("value",[t])},selectLastItem({context:e,prop:l}){const t=l("collection").lastValue;t&&e.set("value",[t])},selectMatchingItem({context:e,prop:l,event:t,refs:i}){const s=l("collection").search(t.key,{state:i.get("typeahead"),currentValue:e.get("value")[0]});s!=null&&e.set("value",[s])},scrollContentToTop({prop:e,scope:l}){e("scrollToIndexFn")?e("scrollToIndexFn")?.({index:0,immediate:!0}):A(l)?.scrollTo(0,0)},invokeOnOpen({prop:e}){e("onOpenChange")?.({open:!0})},invokeOnClose({prop:e}){e("onOpenChange")?.({open:!1})},syncSelectElement({context:e,prop:l,scope:t}){const i=M(t);if(i){if(e.get("value").length===0&&!l("multiple")){i.selectedIndex=-1;return}for(const s of i.options)s.selected=e.get("value").includes(s.value)}},syncCollection({context:e,prop:l}){const t=l("collection"),i=t.find(e.get("highlightedValue"));i&&e.set("highlightedItem",i);const s=t.findMany(e.get("value"));e.set("selectedItems",s);const n=t.stringifyItems(s);e.set("valueAsString",n)},syncSelectedItems({context:e,prop:l}){const t=l("collection"),i=e.get("selectedItems"),n=e.get("value").map(u=>i.find(h=>t.getItemValue(h)===u)||t.find(u));e.set("selectedItems",n),e.set("valueAsString",t.stringifyItems(n))},syncHighlightedItem({context:e,prop:l}){const t=l("collection"),i=e.get("highlightedValue"),s=i?t.find(i):null;e.set("highlightedItem",s)},dispatchChangeEvent({scope:e}){queueMicrotask(()=>{const l=M(e);if(!l)return;const t=e.getWin(),i=new t.Event("change",{bubbles:!0,composed:!0});l.dispatchEvent(i)})}}}});function q(e){const l=e.restoreFocus??e.previousEvent?.restoreFocus;return l==null||!!l}R.createProps()(["closeOnSelect","collection","dir","disabled","deselectable","form","getRootNode","highlightedValue","id","ids","invalid","loopFocus","multiple","name","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onValueChange","defaultOpen","open","composite","positioning","required","readOnly","scrollToIndexFn","value","defaultValue","defaultHighlightedValue"]);R.createProps()(["item","persistFocus"]);R.createProps()(["id"]);R.createProps()(["htmlFor"]);exports.ListCollection=W;exports.anatomy=j;exports.connect=ce;exports.machine=ge;
|
|
2
|
-
//# sourceMappingURL=index-BDnnTdaJ.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const i=require("./index-CZ42b9rT.js");function W(e){const t={each(n){for(let r=0;r<e.frames?.length;r+=1){const s=e.frames[r];s&&n(s)}},addEventListener(n,r,s){return t.each(o=>{try{o.document.addEventListener(n,r,s)}catch{}}),()=>{try{t.removeEventListener(n,r,s)}catch{}}},removeEventListener(n,r,s){t.each(o=>{try{o.document.removeEventListener(n,r,s)}catch{}})}};return t}function F(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,s)=>{try{t?.addEventListener(n,r,s)}catch{}return()=>{try{t?.removeEventListener(n,r,s)}catch{}}},removeEventListener:(n,r,s)=>{try{t?.removeEventListener(n,r,s)}catch{}}}}var D="pointerdown.outside",O="focus.outside";function H(e){for(const t of e)if(i.isHTMLElement(t)&&i.isFocusable(t))return!0;return!1}var M=e=>"clientY"in e;function Y(e,t){if(!M(t)||!e)return!1;const n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function _(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function T(e,t){if(!t||!M(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,s=t.scrollWidth>t.clientWidth,o=s&&e.clientY>t.offsetTop+t.clientHeight,E={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(s?16:0)},y={x:e.clientX,y:e.clientY};return _(E,y)?r||o:!1}function R(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:o,defer:E}=t;if(!e)return;const y=i.getDocument(e),w=i.getWindow(e),v=W(w),b=F(w);function k(a,h){if(!i.isHTMLElement(h)||!h.isConnected||i.contains(e,h)||Y(e,a))return!1;const l=y.querySelector(`[aria-controls="${e.id}"]`);if(l){const p=i.getNearestOverflowAncestor(l);if(T(a,p))return!1}const L=i.getNearestOverflowAncestor(e);return T(a,L)?!1:!n?.(h)}const m=new Set,c=i.isShadowRoot(e?.getRootNode());function d(a){function h(l){const L=E&&!i.isTouchDevice()?i.raf:B=>B(),p=l??a,x=p?.composedPath?.()??[p?.target];L(()=>{const B=c?x[0]:i.getEventTarget(a);if(!(!e||!k(a,B))){if(s||o){const C=i.callAll(s,o);e.addEventListener(D,C,{once:!0})}I(e,D,{bubbles:!1,cancelable:!0,detail:{originalEvent:p,contextmenu:i.isContextMenuEvent(p),focusable:H(x),target:B}})}})}a.pointerType==="touch"?(m.forEach(l=>l()),m.add(i.addDomEvent(y,"click",h,{once:!0})),m.add(b.addEventListener("click",h,{once:!0})),m.add(v.addEventListener("click",h,{once:!0}))):h()}const f=new Set,P=setTimeout(()=>{f.add(i.addDomEvent(y,"pointerdown",d,!0)),f.add(b.addEventListener("pointerdown",d,!0)),f.add(v.addEventListener("pointerdown",d,!0))},0);function g(a){(E?i.raf:l=>l())(()=>{const l=i.getEventTarget(a);if(!(!e||!k(a,l))){if(r||o){const L=i.callAll(r,o);e.addEventListener(O,L,{once:!0})}I(e,O,{bubbles:!1,cancelable:!0,detail:{originalEvent:a,contextmenu:!1,focusable:i.isFocusable(l),target:l}})}})}return i.isTouchDevice()||(f.add(i.addDomEvent(y,"focusin",g,!0)),f.add(b.addEventListener("focusin",g,!0)),f.add(v.addEventListener("focusin",g,!0))),()=>{clearTimeout(P),m.forEach(a=>a()),f.forEach(a=>a())}}function N(e,t){const{defer:n}=t,r=n?i.raf:o=>o(),s=[];return s.push(r(()=>{const o=typeof e=="function"?e():e;s.push(R(o,t))})),()=>{s.forEach(o=>o?.())}}function I(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function X(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t?.(r))};return i.addDomEvent(i.getDocument(e),"keydown",n,{capture:!0})}var u={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){const t=this.indexOf(e),n=this.topMostPointerBlockingLayer()?this.indexOf(this.topMostPointerBlockingLayer()?.node):-1;return t<n},isTopMost(e){return this.layers[this.count()-1]?.node===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},isInNestedLayer(e,t){return this.getNestedLayers(e).some(n=>i.contains(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>i.contains(t,e))},add(e){const t=this.layers.push(e);e.node.style.setProperty("--layer-index",`${t}`)},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);t<0||(t<this.count()-1&&this.getNestedLayers(e).forEach(r=>r.dismiss()),this.layers.splice(t,1),e.style.removeProperty("--layer-index"))},removeBranch(e){const t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e){this.layers[this.indexOf(e)]?.dismiss()},clear(){this.remove(this.layers[0].node)}},S;function A(){u.layers.forEach(({node:e})=>{e.style.pointerEvents=u.isBelowPointerBlockingLayer(e)?"none":"auto"})}function q(e){e.style.pointerEvents=""}function K(e,t){const n=i.getDocument(e),r=[];if(u.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(S=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t){const s=i.waitForElements(t,o=>{r.push(i.setStyle(o,{pointerEvents:"auto"}))});r.push(s)}return()=>{u.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=S,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function U(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){i.warn("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,pointerBlocking:s,exclude:o,debug:E}=t,y={dismiss:r,node:e,pointerBlocking:s};u.add(y),A();function w(c){const d=i.getEventTarget(c.detail.originalEvent);u.isBelowPointerBlockingLayer(e)||u.isInBranch(d)||(t.onPointerDownOutside?.(c),t.onInteractOutside?.(c),!c.defaultPrevented&&(E&&console.log("onPointerDownOutside:",c.detail.originalEvent),r?.()))}function v(c){const d=i.getEventTarget(c.detail.originalEvent);u.isInBranch(d)||(t.onFocusOutside?.(c),t.onInteractOutside?.(c),!c.defaultPrevented&&(E&&console.log("onFocusOutside:",c.detail.originalEvent),r?.()))}function b(c){u.isTopMost(e)&&(t.onEscapeKeyDown?.(c),!c.defaultPrevented&&r&&(c.preventDefault(),r()))}function k(c){if(!e)return!1;const d=typeof o=="function"?o():o,f=Array.isArray(d)?d:[d],P=t.persistentElements?.map(g=>g()).filter(i.isHTMLElement);return P&&f.push(...P),f.some(g=>i.contains(g,c))||u.isInNestedLayer(e,c)}const m=[s?K(e,t.persistentElements):void 0,X(e,b),N(e,{exclude:k,onFocusOutside:v,onPointerDownOutside:w,defer:t.defer})];return()=>{u.remove(e),A(),q(e),m.forEach(c=>c?.())}}function V(e,t){const{defer:n}=t,r=n?i.raf:o=>o(),s=[];return s.push(r(()=>{const o=i.isFunction(e)?e():e;s.push(U(o,t))})),()=>{s.forEach(o=>o?.())}}function j(e,t={}){const{defer:n}=t,r=n?i.raf:o=>o(),s=[];return s.push(r(()=>{const o=i.isFunction(e)?e():e;if(!o){i.warn("[@zag-js/dismissable] branch node is `null` or `undefined`");return}u.addBranch(o),s.push(()=>{u.removeBranch(o)})})),()=>{s.forEach(o=>o?.())}}exports.trackDismissableBranch=j;exports.trackDismissableElement=V;exports.trackInteractOutside=N;
|
|
2
|
-
//# sourceMappingURL=index-BGwwyukg.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-BGwwyukg.js","sources":["../../node_modules/@zag-js/interact-outside/dist/index.mjs","../../node_modules/@zag-js/dismissable/dist/index.mjs"],"sourcesContent":["import { raf, getDocument, getWindow, isShadowRoot, addDomEvent, isTouchDevice, getEventTarget, isFocusable, isContextMenuEvent, isHTMLElement, contains, getNearestOverflowAncestor } from '@zag-js/dom-query';\nimport { callAll } from '@zag-js/utils';\n\n// src/index.ts\n\n// src/frame-utils.ts\nfunction getWindowFrames(win) {\n const frames = {\n each(cb) {\n for (let i = 0; i < win.frames?.length; i += 1) {\n const frame = win.frames[i];\n if (frame) cb(frame);\n }\n },\n addEventListener(event, listener, options) {\n frames.each((frame) => {\n try {\n frame.document.addEventListener(event, listener, options);\n } catch {\n }\n });\n return () => {\n try {\n frames.removeEventListener(event, listener, options);\n } catch {\n }\n };\n },\n removeEventListener(event, listener, options) {\n frames.each((frame) => {\n try {\n frame.document.removeEventListener(event, listener, options);\n } catch {\n }\n });\n }\n };\n return frames;\n}\nfunction getParentWindow(win) {\n const parent = win.frameElement != null ? win.parent : null;\n return {\n addEventListener: (event, listener, options) => {\n try {\n parent?.addEventListener(event, listener, options);\n } catch {\n }\n return () => {\n try {\n parent?.removeEventListener(event, listener, options);\n } catch {\n }\n };\n },\n removeEventListener: (event, listener, options) => {\n try {\n parent?.removeEventListener(event, listener, options);\n } catch {\n }\n }\n };\n}\n\n// src/index.ts\nvar POINTER_OUTSIDE_EVENT = \"pointerdown.outside\";\nvar FOCUS_OUTSIDE_EVENT = \"focus.outside\";\nfunction isComposedPathFocusable(composedPath) {\n for (const node of composedPath) {\n if (isHTMLElement(node) && isFocusable(node)) return true;\n }\n return false;\n}\nvar isPointerEvent = (event) => \"clientY\" in event;\nfunction isEventPointWithin(node, event) {\n if (!isPointerEvent(event) || !node) return false;\n const rect = node.getBoundingClientRect();\n if (rect.width === 0 || rect.height === 0) return false;\n return rect.top <= event.clientY && event.clientY <= rect.top + rect.height && rect.left <= event.clientX && event.clientX <= rect.left + rect.width;\n}\nfunction isPointInRect(rect, point) {\n return rect.y <= point.y && point.y <= rect.y + rect.height && rect.x <= point.x && point.x <= rect.x + rect.width;\n}\nfunction isEventWithinScrollbar(event, ancestor) {\n if (!ancestor || !isPointerEvent(event)) return false;\n const isScrollableY = ancestor.scrollHeight > ancestor.clientHeight;\n const onScrollbarY = isScrollableY && event.clientX > ancestor.offsetLeft + ancestor.clientWidth;\n const isScrollableX = ancestor.scrollWidth > ancestor.clientWidth;\n const onScrollbarX = isScrollableX && event.clientY > ancestor.offsetTop + ancestor.clientHeight;\n const rect = {\n x: ancestor.offsetLeft,\n y: ancestor.offsetTop,\n width: ancestor.clientWidth + (isScrollableY ? 16 : 0),\n height: ancestor.clientHeight + (isScrollableX ? 16 : 0)\n };\n const point = {\n x: event.clientX,\n y: event.clientY\n };\n if (!isPointInRect(rect, point)) return false;\n return onScrollbarY || onScrollbarX;\n}\nfunction trackInteractOutsideImpl(node, options) {\n const { exclude, onFocusOutside, onPointerDownOutside, onInteractOutside, defer } = options;\n if (!node) return;\n const doc = getDocument(node);\n const win = getWindow(node);\n const frames = getWindowFrames(win);\n const parentWin = getParentWindow(win);\n function isEventOutside(event, target) {\n if (!isHTMLElement(target)) return false;\n if (!target.isConnected) return false;\n if (contains(node, target)) return false;\n if (isEventPointWithin(node, event)) return false;\n const triggerEl = doc.querySelector(`[aria-controls=\"${node.id}\"]`);\n if (triggerEl) {\n const triggerAncestor = getNearestOverflowAncestor(triggerEl);\n if (isEventWithinScrollbar(event, triggerAncestor)) return false;\n }\n const nodeAncestor = getNearestOverflowAncestor(node);\n if (isEventWithinScrollbar(event, nodeAncestor)) return false;\n return !exclude?.(target);\n }\n const pointerdownCleanups = /* @__PURE__ */ new Set();\n const isInShadowRoot = isShadowRoot(node?.getRootNode());\n function onPointerDown(event) {\n function handler(clickEvent) {\n const func = defer && !isTouchDevice() ? raf : (v) => v();\n const evt = clickEvent ?? event;\n const composedPath = evt?.composedPath?.() ?? [evt?.target];\n func(() => {\n const target = isInShadowRoot ? composedPath[0] : getEventTarget(event);\n if (!node || !isEventOutside(event, target)) return;\n if (onPointerDownOutside || onInteractOutside) {\n const handler2 = callAll(onPointerDownOutside, onInteractOutside);\n node.addEventListener(POINTER_OUTSIDE_EVENT, handler2, { once: true });\n }\n fireCustomEvent(node, POINTER_OUTSIDE_EVENT, {\n bubbles: false,\n cancelable: true,\n detail: {\n originalEvent: evt,\n contextmenu: isContextMenuEvent(evt),\n focusable: isComposedPathFocusable(composedPath),\n target\n }\n });\n });\n }\n if (event.pointerType === \"touch\") {\n pointerdownCleanups.forEach((fn) => fn());\n pointerdownCleanups.add(addDomEvent(doc, \"click\", handler, { once: true }));\n pointerdownCleanups.add(parentWin.addEventListener(\"click\", handler, { once: true }));\n pointerdownCleanups.add(frames.addEventListener(\"click\", handler, { once: true }));\n } else {\n handler();\n }\n }\n const cleanups = /* @__PURE__ */ new Set();\n const timer = setTimeout(() => {\n cleanups.add(addDomEvent(doc, \"pointerdown\", onPointerDown, true));\n cleanups.add(parentWin.addEventListener(\"pointerdown\", onPointerDown, true));\n cleanups.add(frames.addEventListener(\"pointerdown\", onPointerDown, true));\n }, 0);\n function onFocusin(event) {\n const func = defer ? raf : (v) => v();\n func(() => {\n const target = getEventTarget(event);\n if (!node || !isEventOutside(event, target)) return;\n if (onFocusOutside || onInteractOutside) {\n const handler = callAll(onFocusOutside, onInteractOutside);\n node.addEventListener(FOCUS_OUTSIDE_EVENT, handler, { once: true });\n }\n fireCustomEvent(node, FOCUS_OUTSIDE_EVENT, {\n bubbles: false,\n cancelable: true,\n detail: {\n originalEvent: event,\n contextmenu: false,\n focusable: isFocusable(target),\n target\n }\n });\n });\n }\n if (!isTouchDevice()) {\n cleanups.add(addDomEvent(doc, \"focusin\", onFocusin, true));\n cleanups.add(parentWin.addEventListener(\"focusin\", onFocusin, true));\n cleanups.add(frames.addEventListener(\"focusin\", onFocusin, true));\n }\n return () => {\n clearTimeout(timer);\n pointerdownCleanups.forEach((fn) => fn());\n cleanups.forEach((fn) => fn());\n };\n}\nfunction trackInteractOutside(nodeOrFn, options) {\n const { defer } = options;\n const func = defer ? raf : (v) => v();\n const cleanups = [];\n cleanups.push(\n func(() => {\n const node = typeof nodeOrFn === \"function\" ? nodeOrFn() : nodeOrFn;\n cleanups.push(trackInteractOutsideImpl(node, options));\n })\n );\n return () => {\n cleanups.forEach((fn) => fn?.());\n };\n}\nfunction fireCustomEvent(el, type, init) {\n const win = el.ownerDocument.defaultView || window;\n const event = new win.CustomEvent(type, init);\n return el.dispatchEvent(event);\n}\n\nexport { trackInteractOutside };\n","import { raf, contains, getDocument, waitForElements, setStyle, addDomEvent, getEventTarget, isHTMLElement } from '@zag-js/dom-query';\nimport { trackInteractOutside } from '@zag-js/interact-outside';\nimport { isFunction, warn } from '@zag-js/utils';\n\n// src/dismissable-layer.ts\nfunction trackEscapeKeydown(node, fn) {\n const handleKeyDown = (event) => {\n if (event.key !== \"Escape\") return;\n if (event.isComposing) return;\n fn?.(event);\n };\n return addDomEvent(getDocument(node), \"keydown\", handleKeyDown, { capture: true });\n}\nvar layerStack = {\n layers: [],\n branches: [],\n count() {\n return this.layers.length;\n },\n pointerBlockingLayers() {\n return this.layers.filter((layer) => layer.pointerBlocking);\n },\n topMostPointerBlockingLayer() {\n return [...this.pointerBlockingLayers()].slice(-1)[0];\n },\n hasPointerBlockingLayer() {\n return this.pointerBlockingLayers().length > 0;\n },\n isBelowPointerBlockingLayer(node) {\n const index = this.indexOf(node);\n const highestBlockingIndex = this.topMostPointerBlockingLayer() ? this.indexOf(this.topMostPointerBlockingLayer()?.node) : -1;\n return index < highestBlockingIndex;\n },\n isTopMost(node) {\n const layer = this.layers[this.count() - 1];\n return layer?.node === node;\n },\n getNestedLayers(node) {\n return Array.from(this.layers).slice(this.indexOf(node) + 1);\n },\n isInNestedLayer(node, target) {\n return this.getNestedLayers(node).some((layer) => contains(layer.node, target));\n },\n isInBranch(target) {\n return Array.from(this.branches).some((branch) => contains(branch, target));\n },\n add(layer) {\n const num = this.layers.push(layer);\n layer.node.style.setProperty(\"--layer-index\", `${num}`);\n },\n addBranch(node) {\n this.branches.push(node);\n },\n remove(node) {\n const index = this.indexOf(node);\n if (index < 0) return;\n if (index < this.count() - 1) {\n const _layers = this.getNestedLayers(node);\n _layers.forEach((layer) => layer.dismiss());\n }\n this.layers.splice(index, 1);\n node.style.removeProperty(\"--layer-index\");\n },\n removeBranch(node) {\n const index = this.branches.indexOf(node);\n if (index >= 0) this.branches.splice(index, 1);\n },\n indexOf(node) {\n return this.layers.findIndex((layer) => layer.node === node);\n },\n dismiss(node) {\n this.layers[this.indexOf(node)]?.dismiss();\n },\n clear() {\n this.remove(this.layers[0].node);\n }\n};\nvar originalBodyPointerEvents;\nfunction assignPointerEventToLayers() {\n layerStack.layers.forEach(({ node }) => {\n node.style.pointerEvents = layerStack.isBelowPointerBlockingLayer(node) ? \"none\" : \"auto\";\n });\n}\nfunction clearPointerEvent(node) {\n node.style.pointerEvents = \"\";\n}\nfunction disablePointerEventsOutside(node, persistentElements) {\n const doc = getDocument(node);\n const cleanups = [];\n if (layerStack.hasPointerBlockingLayer() && !doc.body.hasAttribute(\"data-inert\")) {\n originalBodyPointerEvents = document.body.style.pointerEvents;\n queueMicrotask(() => {\n doc.body.style.pointerEvents = \"none\";\n doc.body.setAttribute(\"data-inert\", \"\");\n });\n }\n if (persistentElements) {\n const persistedCleanup = waitForElements(persistentElements, (el) => {\n cleanups.push(setStyle(el, { pointerEvents: \"auto\" }));\n });\n cleanups.push(persistedCleanup);\n }\n return () => {\n if (layerStack.hasPointerBlockingLayer()) return;\n queueMicrotask(() => {\n doc.body.style.pointerEvents = originalBodyPointerEvents;\n doc.body.removeAttribute(\"data-inert\");\n if (doc.body.style.length === 0) doc.body.removeAttribute(\"style\");\n });\n cleanups.forEach((fn) => fn());\n };\n}\n\n// src/dismissable-layer.ts\nfunction trackDismissableElementImpl(node, options) {\n const { warnOnMissingNode = true } = options;\n if (warnOnMissingNode && !node) {\n warn(\"[@zag-js/dismissable] node is `null` or `undefined`\");\n return;\n }\n if (!node) {\n return;\n }\n const { onDismiss, pointerBlocking, exclude: excludeContainers, debug } = options;\n const layer = { dismiss: onDismiss, node, pointerBlocking };\n layerStack.add(layer);\n assignPointerEventToLayers();\n function onPointerDownOutside(event) {\n const target = getEventTarget(event.detail.originalEvent);\n if (layerStack.isBelowPointerBlockingLayer(node) || layerStack.isInBranch(target)) return;\n options.onPointerDownOutside?.(event);\n options.onInteractOutside?.(event);\n if (event.defaultPrevented) return;\n if (debug) {\n console.log(\"onPointerDownOutside:\", event.detail.originalEvent);\n }\n onDismiss?.();\n }\n function onFocusOutside(event) {\n const target = getEventTarget(event.detail.originalEvent);\n if (layerStack.isInBranch(target)) return;\n options.onFocusOutside?.(event);\n options.onInteractOutside?.(event);\n if (event.defaultPrevented) return;\n if (debug) {\n console.log(\"onFocusOutside:\", event.detail.originalEvent);\n }\n onDismiss?.();\n }\n function onEscapeKeyDown(event) {\n if (!layerStack.isTopMost(node)) return;\n options.onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }\n function exclude(target) {\n if (!node) return false;\n const containers = typeof excludeContainers === \"function\" ? excludeContainers() : excludeContainers;\n const _containers = Array.isArray(containers) ? containers : [containers];\n const persistentElements = options.persistentElements?.map((fn) => fn()).filter(isHTMLElement);\n if (persistentElements) _containers.push(...persistentElements);\n return _containers.some((node2) => contains(node2, target)) || layerStack.isInNestedLayer(node, target);\n }\n const cleanups = [\n pointerBlocking ? disablePointerEventsOutside(node, options.persistentElements) : void 0,\n trackEscapeKeydown(node, onEscapeKeyDown),\n trackInteractOutside(node, { exclude, onFocusOutside, onPointerDownOutside, defer: options.defer })\n ];\n return () => {\n layerStack.remove(node);\n assignPointerEventToLayers();\n clearPointerEvent(node);\n cleanups.forEach((fn) => fn?.());\n };\n}\nfunction trackDismissableElement(nodeOrFn, options) {\n const { defer } = options;\n const func = defer ? raf : (v) => v();\n const cleanups = [];\n cleanups.push(\n func(() => {\n const node = isFunction(nodeOrFn) ? nodeOrFn() : nodeOrFn;\n cleanups.push(trackDismissableElementImpl(node, options));\n })\n );\n return () => {\n cleanups.forEach((fn) => fn?.());\n };\n}\nfunction trackDismissableBranch(nodeOrFn, options = {}) {\n const { defer } = options;\n const func = defer ? raf : (v) => v();\n const cleanups = [];\n cleanups.push(\n func(() => {\n const node = isFunction(nodeOrFn) ? nodeOrFn() : nodeOrFn;\n if (!node) {\n warn(\"[@zag-js/dismissable] branch node is `null` or `undefined`\");\n return;\n }\n layerStack.addBranch(node);\n cleanups.push(() => {\n layerStack.removeBranch(node);\n });\n })\n );\n return () => {\n cleanups.forEach((fn) => fn?.());\n };\n}\n\nexport { trackDismissableBranch, trackDismissableElement };\n"],"names":["getWindowFrames","win","frames","cb","i","frame","event","listener","options","getParentWindow","parent","POINTER_OUTSIDE_EVENT","FOCUS_OUTSIDE_EVENT","isComposedPathFocusable","composedPath","node","isHTMLElement","isFocusable","isPointerEvent","isEventPointWithin","rect","isPointInRect","point","isEventWithinScrollbar","ancestor","isScrollableY","onScrollbarY","isScrollableX","onScrollbarX","trackInteractOutsideImpl","exclude","onFocusOutside","onPointerDownOutside","onInteractOutside","defer","doc","getDocument","getWindow","parentWin","isEventOutside","target","contains","triggerEl","triggerAncestor","getNearestOverflowAncestor","nodeAncestor","pointerdownCleanups","isInShadowRoot","isShadowRoot","onPointerDown","handler","clickEvent","func","isTouchDevice","raf","v","evt","getEventTarget","handler2","callAll","fireCustomEvent","isContextMenuEvent","fn","addDomEvent","cleanups","timer","onFocusin","trackInteractOutside","nodeOrFn","el","type","init","trackEscapeKeydown","handleKeyDown","layerStack","layer","index","highestBlockingIndex","branch","num","originalBodyPointerEvents","assignPointerEventToLayers","clearPointerEvent","disablePointerEventsOutside","persistentElements","persistedCleanup","waitForElements","setStyle","trackDismissableElementImpl","warnOnMissingNode","warn","onDismiss","pointerBlocking","excludeContainers","debug","onEscapeKeyDown","containers","_containers","node2","trackDismissableElement","isFunction","trackDismissableBranch"],"mappings":"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","x_google_ignoreList":[0,1]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const i=require("./index-CZ42b9rT.js"),v=require("./use-locale-context-BdqHZ8L8.js");var g=i.createAnatomy("avatar").parts("root","image","fallback"),s=g.build(),l=e=>e.ids?.root??`avatar:${e.id}`,m=e=>e.ids?.image??`avatar:${e.id}:image`,p=e=>e.ids?.fallback??`avatar:${e.id}:fallback`,h=e=>e.getById(l(e)),c=e=>e.getById(m(e));function k(e,t){const{state:r,send:a,prop:d,scope:n}=e,o=r.matches("loaded");return{loaded:o,setSrc(u){c(n)?.setAttribute("src",u)},setLoaded(){a({type:"img.loaded",src:"api"})},setError(){a({type:"img.error",src:"api"})},getRootProps(){return t.element({...s.root.attrs,dir:d("dir"),id:l(n)})},getImageProps(){return t.img({...s.image.attrs,hidden:!o,dir:d("dir"),id:m(n),"data-state":o?"visible":"hidden",onLoad(){a({type:"img.loaded",src:"element"})},onError(){a({type:"img.error",src:"element"})}})},getFallbackProps(){return t.element({...s.fallback.attrs,dir:d("dir"),id:p(n),hidden:o,"data-state":o?"hidden":"visible"})}}}var b=i.createMachine({initialState(){return"loading"},effects:["trackImageRemoval","trackSrcChange"],on:{"src.change":{target:"loading"},"img.unmount":{target:"error"}},states:{loading:{entry:["checkImageStatus"],on:{"img.loaded":{target:"loaded",actions:["invokeOnLoad"]},"img.error":{target:"error",actions:["invokeOnError"]}}},error:{on:{"img.loaded":{target:"loaded",actions:["invokeOnLoad"]}}},loaded:{on:{"img.error":{target:"error",actions:["invokeOnError"]}}}},implementations:{actions:{invokeOnLoad({prop:e}){e("onStatusChange")?.({status:"loaded"})},invokeOnError({prop:e}){e("onStatusChange")?.({status:"error"})},checkImageStatus({send:e,scope:t}){const r=c(t);if(!r?.complete)return;const a=y(r)?"img.loaded":"img.error";e({type:a,src:"ssr"})}},effects:{trackImageRemoval({send:e,scope:t}){const r=h(t);return i.observeChildren(r,{callback(a){Array.from(a[0].removedNodes).find(o=>o.nodeType===Node.ELEMENT_NODE&&o.matches("[data-scope=avatar][data-part=image]"))&&e({type:"img.unmount"})}})},trackSrcChange({send:e,scope:t}){const r=c(t);return i.observeAttributes(r,{attributes:["src","srcset"],callback(){e({type:"src.change"})}})}}}});function y(e){return e.complete&&e.naturalWidth!==0&&e.naturalHeight!==0}v.createProps()(["dir","id","ids","onStatusChange","getRootNode"]);exports.anatomy=g;exports.connect=k;exports.machine=b;
|
|
2
|
-
//# sourceMappingURL=index-BYf7SZUC.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const u=require("./index-CZ42b9rT.js"),N=require("./use-locale-context-BdqHZ8L8.js");var L=u.createAnatomy("pinInput").parts("root","label","input","control"),A=L.build(),v=e=>e.ids?.root??`pin-input:${e.id}`,b=(e,t)=>e.ids?.input?.(t)??`pin-input:${e.id}:${t}`,T=e=>e.ids?.hiddenInput??`pin-input:${e.id}:hidden`,U=e=>e.ids?.label??`pin-input:${e.id}:label`,S=e=>e.ids?.control??`pin-input:${e.id}:control`,R=e=>e.getById(v(e)),y=e=>{const a=`input[data-ownedby=${CSS.escape(v(e))}]`;return u.queryAll(R(e),a)},g=(e,t)=>y(e)[t],O=e=>y(e)[0],C=e=>e.getById(T(e)),E=(e,t)=>{e.value=t,e.setAttribute("value",t)},$={numeric:/^[0-9]+$/,alphabetic:/^[A-Za-z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/i};function _(e,t){return e?!!$[e]?.test(t):!0}function w(e,t,a){return a?new RegExp(a,"g").test(e):_(t,e)}function B(e,t){const{send:a,context:l,computed:o,prop:n,scope:d}=e,f=o("isValueComplete"),I=n("invalid"),h=n("translations"),m=l.get("focusedIndex");function V(){O(d)?.focus()}return{focus:V,count:l.get("count"),items:Array.from({length:l.get("count")}).map((c,r)=>r),value:l.get("value"),valueAsString:o("valueAsString"),complete:f,setValue(c){Array.isArray(c)||u.invariant("[pin-input/setValue] value must be an array"),a({type:"VALUE.SET",value:c})},clearValue(){a({type:"VALUE.CLEAR"})},setValueAtIndex(c,r){a({type:"VALUE.SET",value:r,index:c})},getRootProps(){return t.element({dir:n("dir"),...A.root.attrs,id:v(d),"data-invalid":u.dataAttr(I),"data-disabled":u.dataAttr(n("disabled")),"data-complete":u.dataAttr(f),"data-readonly":u.dataAttr(n("readOnly"))})},getLabelProps(){return t.label({...A.label.attrs,dir:n("dir"),htmlFor:T(d),id:U(d),"data-invalid":u.dataAttr(I),"data-disabled":u.dataAttr(n("disabled")),"data-complete":u.dataAttr(f),"data-readonly":u.dataAttr(n("readOnly")),onClick(c){c.preventDefault(),V()}})},getHiddenInputProps(){return t.input({"aria-hidden":!0,type:"text",tabIndex:-1,id:T(d),readOnly:n("readOnly"),disabled:n("disabled"),required:n("required"),name:n("name"),form:n("form"),style:u.visuallyHiddenStyle,maxLength:o("valueLength"),defaultValue:o("valueAsString")})},getControlProps(){return t.element({...A.control.attrs,dir:n("dir"),id:S(d)})},getInputProps(c){const{index:r}=c,P=n("type")==="numeric"?"tel":"text";return t.input({...A.input.attrs,dir:n("dir"),disabled:n("disabled"),"data-disabled":u.dataAttr(n("disabled")),"data-complete":u.dataAttr(f),id:b(d,r.toString()),"data-index":r,"data-ownedby":v(d),"aria-label":h?.inputLabel?.(r,o("valueLength")),inputMode:n("otp")||n("type")==="numeric"?"numeric":"text","aria-invalid":u.ariaAttr(I),"data-invalid":u.dataAttr(I),type:n("mask")?"password":P,defaultValue:l.get("value")[r]||"",readOnly:n("readOnly"),autoCapitalize:"none",autoComplete:n("otp")?"one-time-code":"off",placeholder:m===r?"":n("placeholder"),onBeforeInput(s){try{const i=u.getBeforeInputValue(s);w(i,n("type"),n("pattern"))||(a({type:"VALUE.INVALID",value:i}),s.preventDefault()),i.length>2&&s.currentTarget.setSelectionRange(0,1,"forward")}catch{}},onChange(s){const i=u.getNativeEvent(s),{value:p}=s.currentTarget;if(i.inputType==="insertFromPaste"||p.length>2){a({type:"INPUT.PASTE",value:p}),s.currentTarget.value=p[0],s.preventDefault();return}if(i.inputType==="deleteContentBackward"){a({type:"INPUT.BACKSPACE"});return}a({type:"INPUT.CHANGE",value:p,index:r})},onKeyDown(s){if(s.defaultPrevented||u.isComposingEvent(s)||u.isModifierKey(s))return;const p={Backspace(){a({type:"INPUT.BACKSPACE"})},Delete(){a({type:"INPUT.DELETE"})},ArrowLeft(){a({type:"INPUT.ARROW_LEFT"})},ArrowRight(){a({type:"INPUT.ARROW_RIGHT"})},Enter(){a({type:"INPUT.ENTER"})}}[u.getEventKey(s,{dir:n("dir"),orientation:"horizontal"})];p&&(p(s),s.preventDefault())},onFocus(){a({type:"INPUT.FOCUS",index:r})},onBlur(s){const i=s.relatedTarget;u.isHTMLElement(i)&&i.dataset.ownedby===v(d)||a({type:"INPUT.BLUR",index:r})}})}}}var{choose:q,createMachine:D}=u.setup(),M=D({props({props:e}){return{placeholder:"○",otp:!1,type:"numeric",defaultValue:e.count?x([],e.count):[],...e,translations:{inputLabel:(t,a)=>`pin code ${t+1} of ${a}`,...e.translations}}},initialState(){return"idle"},context({prop:e,bindable:t}){return{value:t(()=>({value:e("value"),defaultValue:e("defaultValue"),isEqual:u.isEqual,onChange(a){e("onValueChange")?.({value:a,valueAsString:a.join("")})}})),focusedIndex:t(()=>({sync:!0,defaultValue:-1})),count:t(()=>({defaultValue:e("count")}))}},computed:{_value:({context:e})=>x(e.get("value"),e.get("count")),valueLength:({computed:e})=>e("_value").length,filledValueLength:({computed:e})=>e("_value").filter(t=>t?.trim()!=="").length,isValueComplete:({computed:e})=>e("valueLength")===e("filledValueLength"),valueAsString:({computed:e})=>e("_value").join(""),focusedValue:({computed:e,context:t})=>e("_value")[t.get("focusedIndex")]||""},entry:q([{guard:"autoFocus",actions:["setInputCount","setFocusIndexToFirst"]},{actions:["setInputCount"]}]),watch({action:e,track:t,context:a,computed:l}){t([()=>a.get("focusedIndex")],()=>{e(["focusInput","selectInputIfNeeded"])}),t([()=>a.get("value").join(",")],()=>{e(["syncInputElements","dispatchInputEvent"])}),t([()=>l("isValueComplete")],()=>{e(["invokeOnComplete","blurFocusedInputIfNeeded"])})},on:{"VALUE.SET":[{guard:"hasIndex",actions:["setValueAtIndex"]},{actions:["setValue"]}],"VALUE.CLEAR":{actions:["clearValue","setFocusIndexToFirst"]}},states:{idle:{on:{"INPUT.FOCUS":{target:"focused",actions:["setFocusedIndex"]}}},focused:{on:{"INPUT.CHANGE":{actions:["setFocusedValue","syncInputValue","setNextFocusedIndex"]},"INPUT.PASTE":{actions:["setPastedValue","setLastValueFocusIndex"]},"INPUT.FOCUS":{actions:["setFocusedIndex"]},"INPUT.BLUR":{target:"idle",actions:["clearFocusedIndex"]},"INPUT.DELETE":{guard:"hasValue",actions:["clearFocusedValue"]},"INPUT.ARROW_LEFT":{actions:["setPrevFocusedIndex"]},"INPUT.ARROW_RIGHT":{actions:["setNextFocusedIndex"]},"INPUT.BACKSPACE":[{guard:"hasValue",actions:["clearFocusedValue"]},{actions:["setPrevFocusedIndex","clearFocusedValue"]}],"INPUT.ENTER":{guard:"isValueComplete",actions:["requestFormSubmit"]},"VALUE.INVALID":{actions:["invokeOnInvalid"]}}}},implementations:{guards:{autoFocus:({prop:e})=>!!e("autoFocus"),hasValue:({context:e})=>e.get("value")[e.get("focusedIndex")]!=="",isValueComplete:({computed:e})=>e("isValueComplete"),hasIndex:({event:e})=>e.index!==void 0},actions:{dispatchInputEvent({computed:e,scope:t}){const a=C(t);u.dispatchInputValueEvent(a,{value:e("valueAsString")})},setInputCount({scope:e,context:t,prop:a}){if(a("count"))return;const l=y(e);t.set("count",l.length)},focusInput({context:e,scope:t}){const a=e.get("focusedIndex");a!==-1&&g(t,a)?.focus({preventScroll:!0})},selectInputIfNeeded({context:e,prop:t,scope:a}){const l=e.get("focusedIndex");!t("selectOnFocus")||l===-1||u.raf(()=>{g(a,l)?.select()})},invokeOnComplete({computed:e,prop:t}){e("isValueComplete")&&t("onValueComplete")?.({value:e("_value"),valueAsString:e("valueAsString")})},invokeOnInvalid({context:e,event:t,prop:a}){a("onValueInvalid")?.({value:t.value,index:e.get("focusedIndex")})},clearFocusedIndex({context:e}){e.set("focusedIndex",-1)},setFocusedIndex({context:e,event:t}){e.set("focusedIndex",t.index)},setValue({context:e,event:t}){const a=x(t.value,e.get("count"));e.set("value",a)},setFocusedValue({context:e,event:t,computed:a,flush:l}){const o=a("focusedValue"),n=e.get("focusedIndex"),d=F(o,t.value);l(()=>{e.set("value",u.setValueAtIndex(a("_value"),n,d))})},revertInputValue({context:e,computed:t,scope:a}){const l=g(a,e.get("focusedIndex"));E(l,t("focusedValue"))},syncInputValue({context:e,event:t,scope:a}){const l=e.get("value"),o=g(a,t.index);E(o,l[t.index])},syncInputElements({context:e,scope:t}){const a=y(t),l=e.get("value");a.forEach((o,n)=>{E(o,l[n])})},setPastedValue({context:e,event:t,computed:a,flush:l}){u.raf(()=>{const o=a("valueAsString"),n=e.get("focusedIndex"),d=a("valueLength"),f=a("filledValueLength"),I=Math.min(n,f),h=I>0?o.substring(0,n):"",m=t.value.substring(0,d-I),V=x(`${h}${m}`.split(""),d);l(()=>{e.set("value",V)})})},setValueAtIndex({context:e,event:t,computed:a}){const l=F(a("focusedValue"),t.value);e.set("value",u.setValueAtIndex(a("_value"),t.index,l))},clearValue({context:e}){const t=Array.from({length:e.get("count")}).fill("");e.set("value",t)},clearFocusedValue({context:e,computed:t}){const a=e.get("focusedIndex");a!==-1&&e.set("value",u.setValueAtIndex(t("_value"),a,""))},setFocusIndexToFirst({context:e}){e.set("focusedIndex",0)},setNextFocusedIndex({context:e,computed:t}){e.set("focusedIndex",Math.min(e.get("focusedIndex")+1,t("valueLength")-1))},setPrevFocusedIndex({context:e}){e.set("focusedIndex",Math.max(e.get("focusedIndex")-1,0))},setLastValueFocusIndex({context:e,computed:t}){u.raf(()=>{e.set("focusedIndex",Math.min(t("filledValueLength"),t("valueLength")-1))})},blurFocusedInputIfNeeded({context:e,prop:t,scope:a}){t("blurOnComplete")&&u.raf(()=>{g(a,e.get("focusedIndex"))?.blur()})},requestFormSubmit({computed:e,prop:t,scope:a}){if(!t("name")||!e("isValueComplete"))return;C(a)?.form?.requestSubmit()}}}});function F(e,t){let a=t;return e[0]===t[0]?a=t[1]:e[0]===t[1]&&(a=t[0]),a.split("")[a.length-1]}function x(e,t){return Array.from({length:t}).fill("").map((a,l)=>e[l]||a)}N.createProps()(["autoFocus","blurOnComplete","count","defaultValue","dir","disabled","form","getRootNode","id","ids","invalid","mask","name","onValueChange","onValueComplete","onValueInvalid","otp","pattern","placeholder","readOnly","required","selectOnFocus","translations","type","value"]);exports.anatomy=L;exports.connect=B;exports.machine=M;
|
|
2
|
-
//# sourceMappingURL=index-COoMV9Mh.js.map
|