@midas-ds/components 14.0.0 → 15.0.0
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/AccordionItem-DTbu3lqx.js +343 -0
- package/AccordionItem-tWS22wDv.cjs +1 -0
- package/{Breadcrumbs-DpUPChG9.cjs → Breadcrumbs-BBDGxc68.cjs} +1 -1
- package/{Breadcrumbs-CV3rVTjR.js → Breadcrumbs-BenPNv8Z.js} +4 -4
- package/Button-1sEX8jKn.cjs +1 -0
- package/{Button-xc8A29pm.cjs → Button-BEWKXjlP.cjs} +1 -1
- package/{Button-B6lxIKPk.js → Button-BbfVT9Yl.js} +122 -116
- package/{Button-CRIYvCRM.js → Button-DdXFHfXw.js} +1 -1
- package/CHANGELOG.md +49 -0
- package/{Card-CfosvMF5.js → Card-CdqGFff2.js} +3 -3
- package/{Card-D2E3gviQ.cjs → Card-Db9xdzJ0.cjs} +1 -1
- package/{CharacterCounter-C-PFKoGg.cjs → CharacterCounter-CTpQ12f7.cjs} +1 -1
- package/{CharacterCounter-DpFONstE.js → CharacterCounter-gbDGfize.js} +2 -2
- package/Checkbox-BgrLxY6P.cjs +1 -0
- package/{Checkbox-Cr3MmHPE.js → Checkbox-CdN1D5pD.js} +94 -90
- package/{CheckboxGroup-DEY3JDEL.js → CheckboxGroup-CtJJqk_q.js} +7 -7
- package/{CheckboxGroup-f9Oa1MhQ.cjs → CheckboxGroup-thvsvOqD.cjs} +1 -1
- package/{Collection-j_iWeuZo.js → Collection-BkxwF21i.js} +205 -213
- package/Collection-vGO6v3_U.cjs +1 -0
- package/{ColorSchemeSwitch-Cur7zN5_.cjs → ColorSchemeSwitch-Ckna0otR.cjs} +1 -1
- package/{ColorSchemeSwitch-ChFSNntp.js → ColorSchemeSwitch-aF2UxI20.js} +2 -2
- package/{ComboBox-D7eKe-M5.js → ComboBox-BDX4BYWJ.js} +244 -229
- package/ComboBox-DFPrJUoV.cjs +1 -0
- package/{DateField-BszKZodr.cjs → DateField-B92Cqf9K.cjs} +1 -1
- package/{DateField-xyhyDy7u.js → DateField-BPRWrVcu.js} +4 -4
- package/DateInputDivider-CCrXjsUB.cjs +1 -0
- package/{DateInputDivider-2Wf2hlXA.js → DateInputDivider-DOHpVaNE.js} +191 -188
- package/DateRangePicker-COSTCOt8.cjs +6 -0
- package/{DateRangePicker-YwKi0ukr.js → DateRangePicker-Cmt9NC35.js} +119 -115
- package/Dialog-CPuJA2fm.js +256 -0
- package/{Dialog-DOyFzvUa.js → Dialog-D4Py85wi.js} +712 -694
- package/Dialog-DtOf0vWx.cjs +1 -0
- package/Dialog-DycTLpdr.cjs +6 -0
- package/{DragAndDrop-DQ_6tl6K.cjs → DragAndDrop-Cs-V-9ak.cjs} +1 -1
- package/{DragAndDrop-DPRU3Y0Y.js → DragAndDrop-DF0VoPJw.js} +1 -1
- package/{Dropdown-uC9wc8vd.js → Dropdown-B4lwe0Hn.js} +2 -2
- package/{Dropdown-5rmvcHD_.cjs → Dropdown-_g9l5k07.cjs} +1 -1
- package/{FieldError-C4kD4yJZ.js → FieldError-CIxlNQCM.js} +13 -13
- package/{FieldError-C4WBoCRc.cjs → FieldError-JWxR_EqN.cjs} +1 -1
- package/{FileUpload-CTbh7Gic.cjs → FileUpload-C0TjNkuh.cjs} +2 -2
- package/{FileUpload-01wGpykv.js → FileUpload-DLBP3VPp.js} +260 -534
- package/Group-B0Wj9pI8.cjs +1 -0
- package/Group-BAd7alBM.js +46 -0
- package/{Heading-CEx2LJyM.js → Heading-CCoGfKQ8.js} +9 -9
- package/{Heading-CUShN98j.cjs → Heading-x7y3xadc.cjs} +1 -1
- package/{InfoBanner-CRSz8DK2.js → InfoBanner-D7Ta-7PI.js} +1 -1
- package/{InfoBanner-D_pNj1J2.cjs → InfoBanner-_M_rGQiu.cjs} +1 -1
- package/{Input-CCuE9Sc5.cjs → Input-Bda0PCu5.cjs} +1 -1
- package/{Input-CkTOajNJ.js → Input-CQzv-D9g.js} +3 -3
- package/{Label-CkIRTC0_.cjs → Label-DpY2SZdQ.cjs} +1 -1
- package/{Label-CV9p0K2n.js → Label-FfEnd4ai.js} +4 -4
- package/Layout-BrEuHajQ.cjs +16 -0
- package/{Layout-IeVrHpT0.js → Layout-Hd1e_MEA.js} +62 -63
- package/{Link-BFvUN5Sq.js → Link-BudFjYrw.js} +1 -1
- package/{Link-D2K7bDd3.cjs → Link-BvUSTIip.cjs} +1 -1
- package/{Link-a3Ymcnoa.cjs → Link-DRU6Qzia.cjs} +1 -1
- package/{Link-B9CQXWzE.js → Link-l-nMP-Zd.js} +5 -5
- package/{LinkButton-BCn5gR10.cjs → LinkButton-DGdnbTgR.cjs} +1 -1
- package/{LinkButton-DN3J1Agu.js → LinkButton-DP9W-E32.js} +1 -1
- package/{ListBox-2eEa1l0M.js → ListBox-5GK4ZRj1.js} +189 -178
- package/ListBox-FD30iELk.cjs +1 -0
- package/{ListBoxSection-dksiACMZ.js → ListBox-LJ3VgZMr.js} +230 -266
- package/ListBox-u6ZXp5Yi.cjs +1 -0
- package/{ListBoxLoadMoreItem-IcGb_XwN.js → ListBoxLoadMoreItem-B4GFbdYf.js} +3 -3
- package/ListBoxLoadMoreItem-DMUOzVtt.cjs +1 -0
- package/ListBoxSection-CBlpg0AG.cjs +1 -0
- package/ListBoxSection-DjGs1ndn.js +51 -0
- package/ListKeyboardDelegate-8zuIfwQ7.cjs +1 -0
- package/{ListKeyboardDelegate-Dyu4eFtP.js → ListKeyboardDelegate-BBmpJ-2O.js} +36 -40
- package/{OverlayArrow-Bh_G2tJ3.js → OverlayArrow-CjGslX2c.js} +2 -2
- package/{OverlayArrow-DJ4nNscD.cjs → OverlayArrow-bcrb_syE.cjs} +1 -1
- package/Popover-CS8Yyfrq.js +39 -0
- package/Popover-DpB0XDBp.cjs +1 -0
- package/{PressResponder-DUhG97jJ.js → PressResponder-BMj6Zvbn.js} +3 -3
- package/{PressResponder-AXK2I_yx.cjs → PressResponder-ChvCuOue.cjs} +1 -1
- package/{ProgressBar-B-TOuoAC.cjs → ProgressBar-BZqAQTV3.cjs} +1 -1
- package/{ProgressBar-B0WEQkyq.js → ProgressBar-BpsvPCKk.js} +12 -12
- package/{RSPContexts-BW2SEIqe.js → RSPContexts-B0lEq7qq.js} +5 -3
- package/RSPContexts-XUvspq3j.cjs +1 -0
- package/Radio-B3FBTn4F.cjs +1 -0
- package/Radio-LevFYAg4.js +340 -0
- package/{RangeCalendar-B6zKSDju.cjs → RangeCalendar-CH0CyBui.cjs} +2 -2
- package/{RangeCalendar-D5TMu8GI.js → RangeCalendar-DT_KVd80.js} +58 -58
- package/{SearchField-DnBBlPT7.cjs → SearchField-BX7P7BgV.cjs} +1 -1
- package/{SearchField-wojUSY2S.js → SearchField-C-TFzcJF.js} +3 -3
- package/Select-C-ykeY_T.js +773 -0
- package/Select-CiCng7ZP.js +678 -0
- package/Select-D4wi-0Jw.cjs +1 -0
- package/Select-JIDW2mN8.cjs +1 -0
- package/{FocusScope-8ILtcq9W.js → SelectionIndicator-C2E23-zO.js} +270 -174
- package/SelectionIndicator-ClG0GpJu.cjs +1 -0
- package/SelectionManager-CNJmHeCF.cjs +1 -0
- package/SelectionManager-DoNLJm8c.js +1063 -0
- package/{Separator-COlhRmJF.js → Separator-CQfDz_zr.js} +10 -10
- package/{Separator-DcbM84B8.cjs → Separator-CSyYDGNE.cjs} +1 -1
- package/{Separator-BQkxEZC9.cjs → Separator-DCi4bnBr.cjs} +1 -1
- package/{Separator--4b7vckr.js → Separator-DLr4kUJD.js} +2 -2
- package/Spinner-D6Fcu_Dp.js +54 -0
- package/Spinner-DIapnvIz.cjs +6 -0
- package/TabList-BBmBumm6.js +394 -0
- package/TabList-DVzXuGXA.cjs +1 -0
- package/Table-B1nxmW14.cjs +16 -0
- package/{Table-cCSOrPkK.js → Table-DxqKDp7N.js} +707 -703
- package/Tag-BL-_PONN.cjs +1 -0
- package/Tag-DX1X_NZE.js +774 -0
- package/{Text-CkhG15SU.cjs → Text-0wXj3J8E.cjs} +1 -1
- package/{Text-BQe1I4-r.js → Text-BBFWBNAH.js} +1 -1
- package/{Text-CkhZTTV5.cjs → Text-D5OSv6Uv.cjs} +1 -1
- package/{Text-BpERRete.js → Text-bqP9NeVg.js} +1 -1
- package/{TextArea-B5TsyJxa.cjs → TextArea-Bjf8CBp0.cjs} +1 -1
- package/{TextArea-Cado2arG.js → TextArea-CJPBvogq.js} +8 -8
- package/TextField-DtD9-arA.cjs +1 -0
- package/{TextField-5AI6T1ol.js → TextField-DyR61bjZ.js} +10 -10
- package/{Toast-CgXRE33Y.js → Toast-B99bLWnh.js} +12 -12
- package/{Toast-Cs-Uvf1p.cjs → Toast-DUZ5jfG1.cjs} +1 -1
- package/{ToggleButtonGroup-SKGgfFs4.js → ToggleButtonGroup-CFRutAZ4.js} +82 -78
- package/ToggleButtonGroup-dnvnzkaD.cjs +1 -0
- package/{Tooltip-txk48Qof.js → Tooltip-CUdmOznK.js} +4 -4
- package/{Tooltip-BrupFzaI.cjs → Tooltip-D-ATlbIM.cjs} +1 -1
- package/{VisuallyHidden-Awup6QxT.cjs → VisuallyHidden-BMelU6B0.cjs} +1 -1
- package/{VisuallyHidden-D2ZXHTJs.js → VisuallyHidden-DuW70K-5.js} +1 -1
- package/accordion/index.cjs +1 -1
- package/accordion/index.js +1 -1
- package/assets/AccordionItem.css +1 -1
- package/assets/FieldError.css +1 -1
- package/assets/ListBox.css +1 -0
- package/assets/Popover.css +1 -1
- package/assets/RangeCalendar.css +1 -1
- package/assets/Select.css +1 -1
- package/assets/Select2.css +1 -0
- package/assets/Spinner.css +1 -1
- package/assets/TabList.css +1 -1
- package/assets/Tag.css +1 -1
- package/assets/default.css +1 -1
- package/breadcrumbs/index.cjs +1 -1
- package/breadcrumbs/index.js +1 -1
- package/button/index.cjs +1 -1
- package/button/index.js +1 -1
- package/calendar/index.cjs +1 -1
- package/calendar/index.js +1 -1
- package/card/index.cjs +1 -1
- package/card/index.js +1 -1
- package/character-counter/index.cjs +1 -1
- package/character-counter/index.js +1 -1
- package/checkbox/index.cjs +1 -1
- package/checkbox/index.js +2 -2
- package/color-scheme-switch/index.cjs +1 -1
- package/color-scheme-switch/index.js +1 -1
- package/combobox/index.cjs +1 -1
- package/combobox/index.js +1 -1
- package/date-field/index.cjs +1 -1
- package/date-field/index.js +2 -2
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +1 -1
- package/dropdown/index.cjs +1 -1
- package/dropdown/index.js +1 -1
- package/field-error/index.cjs +1 -1
- package/field-error/index.js +1 -1
- package/file-upload/index.cjs +1 -1
- package/file-upload/index.js +1 -1
- package/{getScrollParent-Ru2U2LlM.js → getScrollParent-DFCzfqHG.js} +1 -1
- package/{getScrollParent-DuKmPmUa.cjs → getScrollParent-DjULaF_q.cjs} +1 -1
- package/heading/index.cjs +1 -1
- package/heading/index.js +1 -1
- package/index.cjs +1 -1
- package/index.d.ts +1 -0
- package/index.js +99 -95
- package/info-banner/index.cjs +1 -1
- package/info-banner/index.js +1 -1
- package/intlStrings-Cd44R5hT.js +278 -0
- package/intlStrings-ClBuC6xN.cjs +1 -0
- package/label/index.cjs +1 -1
- package/label/index.js +1 -1
- package/layout/index.cjs +1 -1
- package/layout/index.js +1 -1
- package/legacy-select/Select.d.ts +8 -0
- package/legacy-select/SelectTrigger.d.ts +10 -0
- package/legacy-select/index.cjs +1 -0
- package/legacy-select/index.d.ts +2 -0
- package/legacy-select/index.js +4 -0
- package/legacy-select/intl/translations.json.d.ts +17 -0
- package/{select → legacy-select}/types.d.ts +2 -2
- package/legacy-select/useMultiSelect.d.ts +5 -0
- package/link/index.cjs +1 -1
- package/link/index.js +2 -2
- package/link-button/index.cjs +1 -1
- package/link-button/index.js +2 -2
- package/list-box/ListBox.d.ts +1 -2
- package/list-box/ListBoxHeader.d.ts +3 -0
- package/list-box/ListBoxItem.d.ts +9 -3
- package/list-box/ListBoxSection.d.ts +1 -1
- package/list-box/index.cjs +1 -1
- package/list-box/index.d.ts +1 -0
- package/list-box/index.js +9 -7
- package/menu/index.cjs +1 -1
- package/menu/index.js +2 -2
- package/modal/index.cjs +1 -1
- package/modal/index.js +2 -2
- package/package.json +4 -4
- package/popover/Popover.d.ts +2 -1
- package/popover/index.cjs +1 -1
- package/popover/index.js +1 -1
- package/progress-bar/index.cjs +1 -1
- package/progress-bar/index.js +1 -1
- package/radio/index.cjs +1 -1
- package/radio/index.js +1 -1
- package/scrollIntoView-BVI21Y4-.js +65 -0
- package/scrollIntoView-BueMOyGp.cjs +1 -0
- package/search-field/index.cjs +1 -1
- package/search-field/index.js +1 -1
- package/select/Select.d.ts +33 -4
- package/select/SelectAll.d.ts +1 -0
- package/select/SelectTags.d.ts +4 -0
- package/select/SelectTrigger.d.ts +4 -8
- package/select/SelectValueTag.d.ts +5 -0
- package/select/index.cjs +1 -1
- package/select/index.d.ts +1 -2
- package/select/index.js +1 -1
- package/select/intl/translations.json.d.ts +2 -2
- package/spinner/Spinner.d.ts +5 -1
- package/spinner/index.cjs +1 -1
- package/spinner/index.js +1 -1
- package/table/index.cjs +1 -1
- package/table/index.js +1 -1
- package/tabs/Tabs.d.ts +2 -9
- package/tabs/index.cjs +1 -1
- package/tabs/index.d.ts +0 -1
- package/tabs/index.js +1 -1
- package/tag/index.cjs +1 -1
- package/tag/index.js +1 -1
- package/text/index.cjs +1 -1
- package/text/index.js +1 -1
- package/textfield/TextArea.d.ts +3 -2
- package/textfield/TextField.d.ts +3 -2
- package/textfield/index.cjs +1 -1
- package/textfield/index.js +1 -1
- package/toast/index.cjs +1 -1
- package/toast/index.js +1 -1
- package/toggle-button/index.cjs +1 -1
- package/toggle-button/index.js +1 -1
- package/tooltip/index.cjs +1 -1
- package/tooltip/index.js +1 -1
- package/{useButton-Bh3duhYL.cjs → useButton-C0r5nrqs.cjs} +1 -1
- package/{useButton-A-VOfwuT.js → useButton-CRgN6aZf.js} +2 -2
- package/useDateFormatter-BrrFo4nY.cjs +1 -0
- package/{useDateFormatter-CxlJTAki.js → useDateFormatter-Bs5A6Xtu.js} +353 -322
- package/{useField-sSWPm-He.js → useField-Bx76iuoW.js} +1 -1
- package/{useField-CY4OYE5a.cjs → useField-DvszkIMx.cjs} +1 -1
- package/{useFilter-DHcouDzv.js → useFilter-Dn4vTT3G.js} +1 -1
- package/{useFilter-DlZLqsJD.cjs → useFilter-eOgdlVLd.cjs} +1 -1
- package/{useFocusRing-Cig5Y0l-.cjs → useFocusRing-C-XVcAE5.cjs} +1 -1
- package/{useFocusRing-Copf_tx8.js → useFocusRing-CcxI7nbg.js} +2 -2
- package/{useFocusWithin-BKopz9sr.js → useFocusWithin-DhXBuB2O.js} +1 -1
- package/{useFocusWithin-TryC2Kkw.cjs → useFocusWithin-GBjoTL5o.cjs} +1 -1
- package/{useFocusable-CCh54GIw.js → useFocusable-BJj-Bkig.js} +3 -3
- package/{useFocusable-DhdAtEw8.cjs → useFocusable-M4se1KJt.cjs} +1 -1
- package/{useFormValidation-DdIIVZ5j.js → useFormValidation-By7G-T7y.js} +1 -1
- package/{useFormValidation-BJNizNDf.cjs → useFormValidation-DV2Ioblb.cjs} +1 -1
- package/useHasTabbableChild-BJ_VejL5.cjs +1 -0
- package/{useHasTabbableChild-BbgOpdGQ.js → useHasTabbableChild-DpISgPsS.js} +1 -1
- package/{useHighlightSelectionDescription-D6F-YO6b.cjs → useHighlightSelectionDescription-CBZfyrhy.cjs} +1 -1
- package/{useHighlightSelectionDescription-BL_02EKv.js → useHighlightSelectionDescription-Zvo5KTxM.js} +2 -2
- package/{useHover-eU40luVI.cjs → useHover-DULSfLuK.cjs} +1 -1
- package/{useHover-zCCNtF6g.js → useHover-DkC5FyNd.js} +4 -4
- package/{useListState-D2yPZrFZ.js → useListState-CP7AKhOX.js} +1 -1
- package/{useListState-BdC308Sq.cjs → useListState-DZFWpD-x.cjs} +1 -1
- package/{usePress-4yZ5a87p.js → usePress-BqQIhkNY.js} +43 -43
- package/usePress-DmU79HEg.cjs +7 -0
- package/{useSingleSelectListState-lyai-bC_.js → useSingleSelectListState-GSY0f4qW.js} +1 -1
- package/{useSingleSelectListState-b_SPhYG4.cjs → useSingleSelectListState-JCvbhUVI.cjs} +1 -1
- package/{useTextField-DUEQl6sr.cjs → useTextField-CiWV3eeD.cjs} +1 -1
- package/{useTextField-DjxrmW7d.js → useTextField-I3QVGvyX.js} +4 -4
- package/utils/types.d.ts +5 -0
- package/utils-CtICjCYt.cjs +1 -0
- package/{utils-BMBoiyL7.js → utils-D2iKpxcZ.js} +43 -39
- package/utils-DRIRjPUS.cjs +1 -0
- package/{utils-CrT5PVBA.js → utils-Dxh86KaB.js} +19 -17
- package/AccordionItem-BJw5IKe0.js +0 -334
- package/AccordionItem-DhMimhYo.cjs +0 -1
- package/Button-BTX5G3le.cjs +0 -1
- package/Checkbox-D-CFY6QF.cjs +0 -1
- package/Collection-DaZzboRu.cjs +0 -1
- package/ComboBox-C4NybZ32.cjs +0 -1
- package/DateInputDivider-BgXKFwB0.cjs +0 -1
- package/DateRangePicker-DTPkr3hX.cjs +0 -6
- package/Dialog-DLnopN3Z.js +0 -237
- package/Dialog-DNu42oLH.cjs +0 -1
- package/Dialog-w6EBWT__.cjs +0 -1
- package/FocusScope-Dv0F-mG2.cjs +0 -1
- package/Group-C2hEIsGV.js +0 -45
- package/Group-cuyk9Hsy.cjs +0 -1
- package/Layout-CVnlO10z.cjs +0 -16
- package/ListBox-Bx9M5vqb.cjs +0 -1
- package/ListBoxLoadMoreItem-BBE3OF4J.cjs +0 -1
- package/ListBoxSection-kujY2gUl.cjs +0 -1
- package/ListKeyboardDelegate-DJDPir-w.cjs +0 -1
- package/Popover-BI2Koco0.cjs +0 -1
- package/Popover-D7_IfJ3o.js +0 -38
- package/RSPContexts-D8hmBfGm.cjs +0 -1
- package/Radio-D6KNkSA2.js +0 -333
- package/Radio-DsVsutMH.cjs +0 -1
- package/Select-D9h_RQ2k.cjs +0 -1
- package/Select-Dc6y8gPR.js +0 -654
- package/SelectionManager-D-4ThfPZ.js +0 -1043
- package/SelectionManager-FYrDfe5v.cjs +0 -1
- package/Spinner-CTha503N.js +0 -47
- package/Spinner-DKQ9_SQB.cjs +0 -6
- package/TabList-BhC96APe.cjs +0 -1
- package/TabList-P5HnizZt.js +0 -393
- package/Table-BB8Ag5_3.cjs +0 -16
- package/Tag-D2vh0KRD.js +0 -765
- package/Tag-D32MGLjS.cjs +0 -1
- package/TextField-4xfAzdBI.cjs +0 -1
- package/ToggleButtonGroup-CiX2eXB8.cjs +0 -1
- package/assets/ListBoxSection.css +0 -1
- package/scrollIntoView-ClEACHUk.js +0 -57
- package/scrollIntoView-DRSoJp89.cjs +0 -1
- package/select/useMultiSelect.d.ts +0 -4
- package/useDateFormatter-D0bVjgIb.cjs +0 -1
- package/useHasTabbableChild-wH3RCjTd.cjs +0 -1
- package/useObserveElement-BdI4zgd7.js +0 -27
- package/useObserveElement-BzEr5D32.cjs +0 -1
- package/usePress-Dj3t18Pf.cjs +0 -7
- package/utils-I-LGXGYH.cjs +0 -1
- package/utils-cBvgilDa.cjs +0 -1
- package/variables-B3KEYyhW.cjs +0 -1
- package/variables-DzXcMW2k.js +0 -5
- /package/{select → legacy-select}/HiddenMultiSelect.d.ts +0 -0
- /package/{select → legacy-select}/MultiSelectValueTag.d.ts +0 -0
- /package/{select → legacy-select}/SelectFieldError.d.ts +0 -0
- /package/{select → legacy-select}/SelectListBox.d.ts +0 -0
- /package/{select → legacy-select}/useMultiSelectListState.d.ts +0 -0
- /package/{select → legacy-select}/useMultiSelectState.d.ts +0 -0
- /package/{select → legacy-select}/utils.d.ts +0 -0
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { _ as j } from "./usePress-
|
|
2
|
-
import { $ as
|
|
3
|
-
import { useRef as
|
|
4
|
-
function
|
|
5
|
-
let t =
|
|
1
|
+
import { _ as j } from "./usePress-BqQIhkNY.js";
|
|
2
|
+
import { $ as br } from "./context-Dl_saGB6.js";
|
|
3
|
+
import { useRef as gr, useMemo as Mr } from "react";
|
|
4
|
+
function Dr(r, e) {
|
|
5
|
+
let t = gr(null);
|
|
6
6
|
return r && t.current && e(r, t.current) && (r = t.current), t.current = r, r;
|
|
7
7
|
}
|
|
8
8
|
function S(r, e) {
|
|
9
9
|
return r - e * Math.floor(r / e);
|
|
10
10
|
}
|
|
11
|
-
const
|
|
11
|
+
const Fe = 1721426;
|
|
12
12
|
function v(r, e, t, n) {
|
|
13
13
|
e = _(r, e);
|
|
14
14
|
let a = e - 1, o = -2;
|
|
15
|
-
return t <= 2 ? o = 0 : D(e) && (o = -1),
|
|
15
|
+
return t <= 2 ? o = 0 : D(e) && (o = -1), Fe - 1 + 365 * a + Math.floor(a / 4) - Math.floor(a / 100) + Math.floor(a / 400) + Math.floor((367 * t - 362) / 12 + o + n);
|
|
16
16
|
}
|
|
17
17
|
function D(r) {
|
|
18
18
|
return r % 4 === 0 && (r % 100 !== 0 || r % 400 === 0);
|
|
@@ -27,7 +27,7 @@ function X(r) {
|
|
|
27
27
|
r
|
|
28
28
|
];
|
|
29
29
|
}
|
|
30
|
-
const
|
|
30
|
+
const pr = {
|
|
31
31
|
standard: [
|
|
32
32
|
31,
|
|
33
33
|
28,
|
|
@@ -59,16 +59,16 @@ const Dr = {
|
|
|
59
59
|
};
|
|
60
60
|
class $ {
|
|
61
61
|
fromJulianDay(e) {
|
|
62
|
-
let t = e, n = t -
|
|
62
|
+
let t = e, n = t - Fe, a = Math.floor(n / 146097), o = S(n, 146097), i = Math.floor(o / 36524), f = S(o, 36524), c = Math.floor(f / 1461), l = S(f, 1461), A = Math.floor(l / 365), E = a * 400 + i * 100 + c * 4 + A + (i !== 4 && A !== 4 ? 1 : 0), [x, p] = X(E), g = t - v(x, p, 1, 1), ee = 2;
|
|
63
63
|
t < v(x, p, 3, 1) ? ee = 0 : D(p) && (ee = 1);
|
|
64
|
-
let
|
|
65
|
-
return new s(x, p,
|
|
64
|
+
let we = Math.floor(((g + ee) * 12 + 373) / 367), mr = t - v(x, p, we, 1) + 1;
|
|
65
|
+
return new s(x, p, we, mr);
|
|
66
66
|
}
|
|
67
67
|
toJulianDay(e) {
|
|
68
68
|
return v(e.era, e.year, e.month, e.day);
|
|
69
69
|
}
|
|
70
70
|
getDaysInMonth(e) {
|
|
71
|
-
return
|
|
71
|
+
return pr[D(e.year) ? "leapyear" : "standard"][e.month - 1];
|
|
72
72
|
}
|
|
73
73
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
74
74
|
getMonthsInYear(e) {
|
|
@@ -97,7 +97,7 @@ class $ {
|
|
|
97
97
|
this.identifier = "gregory";
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
const
|
|
100
|
+
const wr = {
|
|
101
101
|
"001": 1,
|
|
102
102
|
AD: 1,
|
|
103
103
|
AE: 6,
|
|
@@ -194,23 +194,23 @@ const pr = {
|
|
|
194
194
|
VN: 1,
|
|
195
195
|
XK: 1
|
|
196
196
|
};
|
|
197
|
-
function
|
|
197
|
+
function Ne(r, e) {
|
|
198
198
|
return e = h(e, r.calendar), r.era === e.era && r.year === e.year && r.month === e.month && r.day === e.day;
|
|
199
199
|
}
|
|
200
|
-
function
|
|
200
|
+
function wt(r, e) {
|
|
201
201
|
return e = h(e, r.calendar), r = Z(r), e = Z(e), r.era === e.era && r.year === e.year && r.month === e.month;
|
|
202
202
|
}
|
|
203
|
-
function
|
|
204
|
-
return
|
|
203
|
+
function vt(r, e) {
|
|
204
|
+
return qe(r.calendar, e.calendar) && Ne(r, e);
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function qe(r, e) {
|
|
207
207
|
var t, n, a, o;
|
|
208
208
|
return (o = (a = (t = r.isEqual) === null || t === void 0 ? void 0 : t.call(r, e)) !== null && a !== void 0 ? a : (n = e.isEqual) === null || n === void 0 ? void 0 : n.call(e, r)) !== null && o !== void 0 ? o : r.identifier === e.identifier;
|
|
209
209
|
}
|
|
210
|
-
function
|
|
211
|
-
return
|
|
210
|
+
function It(r, e) {
|
|
211
|
+
return Ne(r, Ar(e));
|
|
212
212
|
}
|
|
213
|
-
const
|
|
213
|
+
const vr = {
|
|
214
214
|
sun: 0,
|
|
215
215
|
mon: 1,
|
|
216
216
|
tue: 2,
|
|
@@ -219,27 +219,27 @@ const wr = {
|
|
|
219
219
|
fri: 5,
|
|
220
220
|
sat: 6
|
|
221
221
|
};
|
|
222
|
-
function
|
|
223
|
-
let n = r.calendar.toJulianDay(r), a = t ?
|
|
222
|
+
function He(r, e, t) {
|
|
223
|
+
let n = r.calendar.toJulianDay(r), a = t ? vr[t] : Cr(e), o = Math.ceil(n + 1 - a) % 7;
|
|
224
224
|
return o < 0 && (o += 7), o;
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function Ir(r) {
|
|
227
227
|
return m(Date.now(), r);
|
|
228
228
|
}
|
|
229
229
|
function Ar(r) {
|
|
230
|
-
return
|
|
230
|
+
return Br(Ir(r));
|
|
231
231
|
}
|
|
232
|
-
function
|
|
232
|
+
function Pe(r, e) {
|
|
233
233
|
return r.calendar.toJulianDay(r) - e.calendar.toJulianDay(e);
|
|
234
234
|
}
|
|
235
|
-
function
|
|
236
|
-
return
|
|
235
|
+
function Ze(r, e) {
|
|
236
|
+
return ve(r) - ve(e);
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function ve(r) {
|
|
239
239
|
return r.hour * 36e5 + r.minute * 6e4 + r.second * 1e3 + r.millisecond;
|
|
240
240
|
}
|
|
241
241
|
let re = null;
|
|
242
|
-
function
|
|
242
|
+
function We() {
|
|
243
243
|
return re == null && (re = new Intl.DateTimeFormat().resolvedOptions().timeZone), re;
|
|
244
244
|
}
|
|
245
245
|
function Z(r) {
|
|
@@ -257,44 +257,75 @@ function Et(r) {
|
|
|
257
257
|
months: r.month - 1
|
|
258
258
|
}));
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function xt(r) {
|
|
261
261
|
return r.calendar.getMinimumMonthInYear ? r.calendar.getMinimumMonthInYear(r) : 1;
|
|
262
262
|
}
|
|
263
|
-
function
|
|
263
|
+
function Ct(r) {
|
|
264
264
|
return r.calendar.getMinimumDayInMonth ? r.calendar.getMinimumDayInMonth(r) : 1;
|
|
265
265
|
}
|
|
266
266
|
function Er(r, e, t) {
|
|
267
|
-
let n =
|
|
267
|
+
let n = He(r, e, t);
|
|
268
268
|
return r.subtract({
|
|
269
269
|
days: n
|
|
270
270
|
});
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function St(r, e, t) {
|
|
273
273
|
return Er(r, e, t).add({
|
|
274
274
|
days: 6
|
|
275
275
|
});
|
|
276
276
|
}
|
|
277
|
-
const
|
|
278
|
-
function
|
|
277
|
+
const Ie = /* @__PURE__ */ new Map(), te = /* @__PURE__ */ new Map();
|
|
278
|
+
function xr(r) {
|
|
279
279
|
if (Intl.Locale) {
|
|
280
|
-
let t =
|
|
281
|
-
return t || (t = new Intl.Locale(r).maximize().region, t &&
|
|
280
|
+
let t = Ie.get(r);
|
|
281
|
+
return t || (t = new Intl.Locale(r).maximize().region, t && Ie.set(r, t)), t;
|
|
282
282
|
}
|
|
283
283
|
let e = r.split("-")[1];
|
|
284
284
|
return e === "u" ? void 0 : e;
|
|
285
285
|
}
|
|
286
|
-
function
|
|
287
|
-
let e =
|
|
288
|
-
|
|
286
|
+
function Cr(r) {
|
|
287
|
+
let e = te.get(r);
|
|
288
|
+
if (!e) {
|
|
289
|
+
if (Intl.Locale) {
|
|
290
|
+
let n = new Intl.Locale(r);
|
|
291
|
+
if ("getWeekInfo" in n && (e = n.getWeekInfo(), e))
|
|
292
|
+
return te.set(r, e), e.firstDay;
|
|
293
|
+
}
|
|
294
|
+
let t = xr(r);
|
|
295
|
+
if (r.includes("-fw-")) {
|
|
296
|
+
let n = r.split("-fw-")[1].split("-")[0];
|
|
297
|
+
n === "mon" ? e = {
|
|
298
|
+
firstDay: 1
|
|
299
|
+
} : n === "tue" ? e = {
|
|
300
|
+
firstDay: 2
|
|
301
|
+
} : n === "wed" ? e = {
|
|
302
|
+
firstDay: 3
|
|
303
|
+
} : n === "thu" ? e = {
|
|
304
|
+
firstDay: 4
|
|
305
|
+
} : n === "fri" ? e = {
|
|
306
|
+
firstDay: 5
|
|
307
|
+
} : n === "sat" ? e = {
|
|
308
|
+
firstDay: 6
|
|
309
|
+
} : e = {
|
|
310
|
+
firstDay: 0
|
|
311
|
+
};
|
|
312
|
+
} else r.includes("-ca-iso8601") ? e = {
|
|
313
|
+
firstDay: 1
|
|
314
|
+
} : e = {
|
|
315
|
+
firstDay: t && wr[t] || 0
|
|
316
|
+
};
|
|
317
|
+
te.set(r, e);
|
|
318
|
+
}
|
|
319
|
+
return e.firstDay;
|
|
289
320
|
}
|
|
290
|
-
function
|
|
321
|
+
function Yt(r, e, t) {
|
|
291
322
|
let n = r.calendar.getDaysInMonth(r);
|
|
292
|
-
return Math.ceil((
|
|
323
|
+
return Math.ceil((He(Z(r), e, t) + n) / 7);
|
|
293
324
|
}
|
|
294
|
-
function
|
|
325
|
+
function Bt(r, e) {
|
|
295
326
|
return r && e ? r.compare(e) <= 0 ? r : e : r || e;
|
|
296
327
|
}
|
|
297
|
-
function
|
|
328
|
+
function Tt(r, e) {
|
|
298
329
|
return r && e ? r.compare(e) >= 0 ? r : e : r || e;
|
|
299
330
|
}
|
|
300
331
|
function T(r) {
|
|
@@ -306,14 +337,14 @@ function Ve(r, e, t, n, a, o, i) {
|
|
|
306
337
|
let f = /* @__PURE__ */ new Date();
|
|
307
338
|
return f.setUTCHours(n, a, o, i), f.setUTCFullYear(r, e - 1, t), f.getTime();
|
|
308
339
|
}
|
|
309
|
-
function
|
|
340
|
+
function ce(r, e) {
|
|
310
341
|
if (e === "UTC") return 0;
|
|
311
|
-
if (r > 0 && e ===
|
|
312
|
-
let { year: t, month: n, day: a, hour: o, minute: i, second: f } =
|
|
342
|
+
if (r > 0 && e === We()) return new Date(r).getTimezoneOffset() * -6e4;
|
|
343
|
+
let { year: t, month: n, day: a, hour: o, minute: i, second: f } = Ke(r, e);
|
|
313
344
|
return Ve(t, n, a, o, i, f, 0) - Math.floor(r / 1e3) * 1e3;
|
|
314
345
|
}
|
|
315
346
|
const Ae = /* @__PURE__ */ new Map();
|
|
316
|
-
function
|
|
347
|
+
function Ke(r, e) {
|
|
317
348
|
let t = Ae.get(e);
|
|
318
349
|
t || (t = new Intl.DateTimeFormat("en-US", {
|
|
319
350
|
timeZone: e,
|
|
@@ -339,27 +370,27 @@ function We(r, e) {
|
|
|
339
370
|
};
|
|
340
371
|
}
|
|
341
372
|
const Ee = 864e5;
|
|
342
|
-
function
|
|
373
|
+
function Sr(r, e, t, n) {
|
|
343
374
|
return (t === n ? [
|
|
344
375
|
t
|
|
345
376
|
] : [
|
|
346
377
|
t,
|
|
347
378
|
n
|
|
348
|
-
]).filter((o) =>
|
|
379
|
+
]).filter((o) => Yr(r, e, o));
|
|
349
380
|
}
|
|
350
|
-
function
|
|
351
|
-
let n =
|
|
381
|
+
function Yr(r, e, t) {
|
|
382
|
+
let n = Ke(t, e);
|
|
352
383
|
return r.year === n.year && r.month === n.month && r.day === n.day && r.hour === n.hour && r.minute === n.minute && r.second === n.second;
|
|
353
384
|
}
|
|
354
385
|
function y(r, e, t = "compatible") {
|
|
355
386
|
let n = R(r);
|
|
356
387
|
if (e === "UTC") return T(n);
|
|
357
|
-
if (e ===
|
|
388
|
+
if (e === We() && t === "compatible") {
|
|
358
389
|
n = h(n, new $());
|
|
359
390
|
let c = /* @__PURE__ */ new Date(), l = _(n.era, n.year);
|
|
360
391
|
return c.setFullYear(l, n.month - 1, n.day), c.setHours(n.hour, n.minute, n.second, n.millisecond), c.getTime();
|
|
361
392
|
}
|
|
362
|
-
let a = T(n), o =
|
|
393
|
+
let a = T(n), o = ce(a - Ee, e), i = ce(a + Ee, e), f = Sr(n, e, a - o, a - i);
|
|
363
394
|
if (f.length === 1) return f[0];
|
|
364
395
|
if (f.length > 1) switch (t) {
|
|
365
396
|
// 'compatible' means 'earlier' for "fall back" transitions
|
|
@@ -382,14 +413,14 @@ function y(r, e, t = "compatible") {
|
|
|
382
413
|
throw new RangeError("No such absolute time found");
|
|
383
414
|
}
|
|
384
415
|
}
|
|
385
|
-
function
|
|
416
|
+
function Ge(r, e, t = "compatible") {
|
|
386
417
|
return new Date(y(r, e, t));
|
|
387
418
|
}
|
|
388
419
|
function m(r, e) {
|
|
389
|
-
let t =
|
|
390
|
-
return new Q(a < 1 ? "BC" : "AD", a < 1 ? -a + 1 : a, o, i, e, t, f, c, l,
|
|
420
|
+
let t = ce(r, e), n = new Date(r + t), a = n.getUTCFullYear(), o = n.getUTCMonth() + 1, i = n.getUTCDate(), f = n.getUTCHours(), c = n.getUTCMinutes(), l = n.getUTCSeconds(), A = n.getUTCMilliseconds();
|
|
421
|
+
return new Q(a < 1 ? "BC" : "AD", a < 1 ? -a + 1 : a, o, i, e, t, f, c, l, A);
|
|
391
422
|
}
|
|
392
|
-
function
|
|
423
|
+
function Br(r) {
|
|
393
424
|
return new s(r.calendar, r.era, r.year, r.month, r.day);
|
|
394
425
|
}
|
|
395
426
|
function R(r, e) {
|
|
@@ -399,28 +430,28 @@ function R(r, e) {
|
|
|
399
430
|
return e && ({ hour: t, minute: n, second: a, millisecond: o } = e), new O(r.calendar, r.era, r.year, r.month, r.day, t, n, a, o);
|
|
400
431
|
}
|
|
401
432
|
function h(r, e) {
|
|
402
|
-
if (
|
|
433
|
+
if (qe(r.calendar, e)) return r;
|
|
403
434
|
let t = e.fromJulianDay(r.calendar.toJulianDay(r)), n = r.copy();
|
|
404
|
-
return n.calendar = e, n.era = t.era, n.year = t.year, n.month = t.month, n.day = t.day,
|
|
435
|
+
return n.calendar = e, n.era = t.era, n.year = t.year, n.month = t.month, n.day = t.day, I(n), n;
|
|
405
436
|
}
|
|
406
|
-
function
|
|
437
|
+
function Tr(r, e, t) {
|
|
407
438
|
if (r instanceof Q)
|
|
408
|
-
return r.timeZone === e ? r :
|
|
439
|
+
return r.timeZone === e ? r : Ur(r, e);
|
|
409
440
|
let n = y(r, e, t);
|
|
410
441
|
return m(n, e);
|
|
411
442
|
}
|
|
412
|
-
function
|
|
443
|
+
function Rr(r) {
|
|
413
444
|
let e = T(r) - r.offset;
|
|
414
445
|
return new Date(e);
|
|
415
446
|
}
|
|
416
|
-
function
|
|
447
|
+
function Ur(r, e) {
|
|
417
448
|
let t = T(r) - r.offset;
|
|
418
449
|
return h(m(t, e), r.calendar);
|
|
419
450
|
}
|
|
420
451
|
const U = 36e5;
|
|
421
452
|
function z(r, e) {
|
|
422
|
-
let t = r.copy(), n = "hour" in t ?
|
|
423
|
-
|
|
453
|
+
let t = r.copy(), n = "hour" in t ? er(t, e) : 0;
|
|
454
|
+
se(t, e.years || 0), t.calendar.balanceYearMonth && t.calendar.balanceYearMonth(t, r), t.month += e.months || 0, le(t), je(t), t.day += (e.weeks || 0) * 7, t.day += e.days || 0, t.day += n, Jr(t), t.calendar.balanceDate && t.calendar.balanceDate(t), t.year < 1 && (t.year = 1, t.month = 1, t.day = 1);
|
|
424
455
|
let a = t.calendar.getYearsInEra(t);
|
|
425
456
|
if (t.year > a) {
|
|
426
457
|
var o, i;
|
|
@@ -431,74 +462,74 @@ function z(r, e) {
|
|
|
431
462
|
let f = t.calendar.getMonthsInYear(t);
|
|
432
463
|
return t.month > f && (t.month = f, t.day = t.calendar.getDaysInMonth(t)), t.day = Math.max(1, Math.min(t.calendar.getDaysInMonth(t), t.day)), t;
|
|
433
464
|
}
|
|
434
|
-
function
|
|
465
|
+
function se(r, e) {
|
|
435
466
|
var t, n;
|
|
436
467
|
!((t = (n = r.calendar).isInverseEra) === null || t === void 0) && t.call(n, r) && (e = -e), r.year += e;
|
|
437
468
|
}
|
|
438
|
-
function
|
|
469
|
+
function le(r) {
|
|
439
470
|
for (; r.month < 1; )
|
|
440
|
-
|
|
471
|
+
se(r, -1), r.month += r.calendar.getMonthsInYear(r);
|
|
441
472
|
let e = 0;
|
|
442
473
|
for (; r.month > (e = r.calendar.getMonthsInYear(r)); )
|
|
443
|
-
r.month -= e,
|
|
474
|
+
r.month -= e, se(r, 1);
|
|
444
475
|
}
|
|
445
|
-
function
|
|
476
|
+
function Jr(r) {
|
|
446
477
|
for (; r.day < 1; )
|
|
447
|
-
r.month--,
|
|
478
|
+
r.month--, le(r), r.day += r.calendar.getDaysInMonth(r);
|
|
448
479
|
for (; r.day > r.calendar.getDaysInMonth(r); )
|
|
449
|
-
r.day -= r.calendar.getDaysInMonth(r), r.month++,
|
|
480
|
+
r.day -= r.calendar.getDaysInMonth(r), r.month++, le(r);
|
|
450
481
|
}
|
|
451
|
-
function
|
|
482
|
+
function je(r) {
|
|
452
483
|
r.month = Math.max(1, Math.min(r.calendar.getMonthsInYear(r), r.month)), r.day = Math.max(1, Math.min(r.calendar.getDaysInMonth(r), r.day));
|
|
453
484
|
}
|
|
454
|
-
function
|
|
455
|
-
r.calendar.constrainDate && r.calendar.constrainDate(r), r.year = Math.max(1, Math.min(r.calendar.getYearsInEra(r), r.year)),
|
|
485
|
+
function I(r) {
|
|
486
|
+
r.calendar.constrainDate && r.calendar.constrainDate(r), r.year = Math.max(1, Math.min(r.calendar.getYearsInEra(r), r.year)), je(r);
|
|
456
487
|
}
|
|
457
|
-
function
|
|
488
|
+
function de(r) {
|
|
458
489
|
let e = {};
|
|
459
490
|
for (let t in r) typeof r[t] == "number" && (e[t] = -r[t]);
|
|
460
491
|
return e;
|
|
461
492
|
}
|
|
462
|
-
function
|
|
463
|
-
return z(r,
|
|
493
|
+
function Xe(r, e) {
|
|
494
|
+
return z(r, de(e));
|
|
464
495
|
}
|
|
465
|
-
function
|
|
496
|
+
function ye(r, e) {
|
|
466
497
|
let t = r.copy();
|
|
467
|
-
return e.era != null && (t.era = e.era), e.year != null && (t.year = e.year), e.month != null && (t.month = e.month), e.day != null && (t.day = e.day),
|
|
498
|
+
return e.era != null && (t.era = e.era), e.year != null && (t.year = e.year), e.month != null && (t.month = e.month), e.day != null && (t.day = e.day), I(t), t;
|
|
468
499
|
}
|
|
469
|
-
function
|
|
500
|
+
function L(r, e) {
|
|
470
501
|
let t = r.copy();
|
|
471
|
-
return e.hour != null && (t.hour = e.hour), e.minute != null && (t.minute = e.minute), e.second != null && (t.second = e.second), e.millisecond != null && (t.millisecond = e.millisecond),
|
|
502
|
+
return e.hour != null && (t.hour = e.hour), e.minute != null && (t.minute = e.minute), e.second != null && (t.second = e.second), e.millisecond != null && (t.millisecond = e.millisecond), ze(t), t;
|
|
472
503
|
}
|
|
473
|
-
function
|
|
504
|
+
function kr(r) {
|
|
474
505
|
r.second += Math.floor(r.millisecond / 1e3), r.millisecond = F(r.millisecond, 1e3), r.minute += Math.floor(r.second / 60), r.second = F(r.second, 60), r.hour += Math.floor(r.minute / 60), r.minute = F(r.minute, 60);
|
|
475
506
|
let e = Math.floor(r.hour / 24);
|
|
476
507
|
return r.hour = F(r.hour, 24), e;
|
|
477
508
|
}
|
|
478
|
-
function
|
|
509
|
+
function ze(r) {
|
|
479
510
|
r.millisecond = Math.max(0, Math.min(r.millisecond, 1e3)), r.second = Math.max(0, Math.min(r.second, 59)), r.minute = Math.max(0, Math.min(r.minute, 59)), r.hour = Math.max(0, Math.min(r.hour, 23));
|
|
480
511
|
}
|
|
481
512
|
function F(r, e) {
|
|
482
513
|
let t = r % e;
|
|
483
514
|
return t < 0 && (t += e), t;
|
|
484
515
|
}
|
|
485
|
-
function ze(r, e) {
|
|
486
|
-
return r.hour += e.hours || 0, r.minute += e.minutes || 0, r.second += e.seconds || 0, r.millisecond += e.milliseconds || 0, Jr(r);
|
|
487
|
-
}
|
|
488
516
|
function er(r, e) {
|
|
517
|
+
return r.hour += e.hours || 0, r.minute += e.minutes || 0, r.second += e.seconds || 0, r.millisecond += e.milliseconds || 0, kr(r);
|
|
518
|
+
}
|
|
519
|
+
function rr(r, e) {
|
|
489
520
|
let t = r.copy();
|
|
490
|
-
return
|
|
521
|
+
return er(t, e), t;
|
|
491
522
|
}
|
|
492
523
|
function Lr(r, e) {
|
|
493
|
-
return
|
|
524
|
+
return rr(r, de(e));
|
|
494
525
|
}
|
|
495
|
-
function
|
|
526
|
+
function me(r, e, t, n) {
|
|
496
527
|
let a = r.copy();
|
|
497
528
|
switch (e) {
|
|
498
529
|
case "era": {
|
|
499
530
|
let f = r.calendar.getEras(), c = f.indexOf(r.era);
|
|
500
531
|
if (c < 0) throw new Error("Invalid era: " + r.era);
|
|
501
|
-
c = b(c, t, 0, f.length - 1, n == null ? void 0 : n.round), a.era = f[c],
|
|
532
|
+
c = b(c, t, 0, f.length - 1, n == null ? void 0 : n.round), a.era = f[c], I(a);
|
|
502
533
|
break;
|
|
503
534
|
}
|
|
504
535
|
case "year":
|
|
@@ -514,9 +545,9 @@ function ye(r, e, t, n) {
|
|
|
514
545
|
default:
|
|
515
546
|
throw new Error("Unsupported field " + e);
|
|
516
547
|
}
|
|
517
|
-
return r.calendar.balanceDate && r.calendar.balanceDate(a),
|
|
548
|
+
return r.calendar.balanceDate && r.calendar.balanceDate(a), I(a), a;
|
|
518
549
|
}
|
|
519
|
-
function
|
|
550
|
+
function be(r, e, t, n) {
|
|
520
551
|
let a = r.copy();
|
|
521
552
|
switch (e) {
|
|
522
553
|
case "hour": {
|
|
@@ -551,7 +582,7 @@ function b(r, e, t, n, a = !1) {
|
|
|
551
582
|
r += e, r < t ? r = n - (t - r - 1) : r > n && (r = t + (r - n - 1));
|
|
552
583
|
return r;
|
|
553
584
|
}
|
|
554
|
-
function
|
|
585
|
+
function tr(r, e) {
|
|
555
586
|
let t;
|
|
556
587
|
if (e.years != null && e.years !== 0 || e.months != null && e.months !== 0 || e.weeks != null && e.weeks !== 0 || e.days != null && e.days !== 0) {
|
|
557
588
|
let a = z(R(r), {
|
|
@@ -567,10 +598,10 @@ function rr(r, e) {
|
|
|
567
598
|
let n = m(t, r.timeZone);
|
|
568
599
|
return h(n, r.calendar);
|
|
569
600
|
}
|
|
570
|
-
function
|
|
571
|
-
return
|
|
601
|
+
function Or(r, e) {
|
|
602
|
+
return tr(r, de(e));
|
|
572
603
|
}
|
|
573
|
-
function
|
|
604
|
+
function Qr(r, e, t, n) {
|
|
574
605
|
switch (e) {
|
|
575
606
|
case "hour": {
|
|
576
607
|
let a = 0, o = 23;
|
|
@@ -578,49 +609,49 @@ function Or(r, e, t, n) {
|
|
|
578
609
|
let g = r.hour >= 12;
|
|
579
610
|
a = g ? 12 : 0, o = g ? 23 : 11;
|
|
580
611
|
}
|
|
581
|
-
let i = R(r), f = h(
|
|
612
|
+
let i = R(r), f = h(L(i, {
|
|
582
613
|
hour: a
|
|
583
614
|
}), new $()), c = [
|
|
584
615
|
y(f, r.timeZone, "earlier"),
|
|
585
616
|
y(f, r.timeZone, "later")
|
|
586
|
-
].filter((g) => m(g, r.timeZone).day === f.day)[0], l = h(
|
|
617
|
+
].filter((g) => m(g, r.timeZone).day === f.day)[0], l = h(L(i, {
|
|
587
618
|
hour: o
|
|
588
|
-
}), new $()),
|
|
619
|
+
}), new $()), A = [
|
|
589
620
|
y(l, r.timeZone, "earlier"),
|
|
590
621
|
y(l, r.timeZone, "later")
|
|
591
|
-
].filter((g) => m(g, r.timeZone).day === l.day).pop(),
|
|
592
|
-
return
|
|
622
|
+
].filter((g) => m(g, r.timeZone).day === l.day).pop(), E = T(r) - r.offset, x = Math.floor(E / U), p = E % U;
|
|
623
|
+
return E = b(x, t, Math.floor(c / U), Math.floor(A / U), n == null ? void 0 : n.round) * U + p, h(m(E, r.timeZone), r.calendar);
|
|
593
624
|
}
|
|
594
625
|
case "minute":
|
|
595
626
|
case "second":
|
|
596
627
|
case "millisecond":
|
|
597
|
-
return
|
|
628
|
+
return be(r, e, t, n);
|
|
598
629
|
case "era":
|
|
599
630
|
case "year":
|
|
600
631
|
case "month":
|
|
601
632
|
case "day": {
|
|
602
|
-
let a =
|
|
633
|
+
let a = me(R(r), e, t, n), o = y(a, r.timeZone);
|
|
603
634
|
return h(m(o, r.timeZone), r.calendar);
|
|
604
635
|
}
|
|
605
636
|
default:
|
|
606
637
|
throw new Error("Unsupported field " + e);
|
|
607
638
|
}
|
|
608
639
|
}
|
|
609
|
-
function
|
|
610
|
-
let n = R(r), a =
|
|
640
|
+
function _r(r, e, t) {
|
|
641
|
+
let n = R(r), a = L(ye(n, e), e);
|
|
611
642
|
if (a.compare(n) === 0) return r;
|
|
612
643
|
let o = y(a, r.timeZone, t);
|
|
613
644
|
return h(m(o, r.timeZone), r.calendar);
|
|
614
645
|
}
|
|
615
|
-
const
|
|
616
|
-
function
|
|
617
|
-
let e = r.match(
|
|
646
|
+
const Fr = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/, Nr = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/;
|
|
647
|
+
function Rt(r) {
|
|
648
|
+
let e = r.match(Fr);
|
|
618
649
|
if (!e) throw new Error("Invalid ISO 8601 date string: " + r);
|
|
619
650
|
let t = new s(d(e[1], 0, 9999), d(e[2], 1, 12), 1);
|
|
620
651
|
return t.day = d(e[3], 1, t.calendar.getDaysInMonth(t)), t;
|
|
621
652
|
}
|
|
622
|
-
function
|
|
623
|
-
let e = r.match(
|
|
653
|
+
function Ut(r) {
|
|
654
|
+
let e = r.match(Nr);
|
|
624
655
|
if (!e) throw new Error("Invalid ISO 8601 date time string: " + r);
|
|
625
656
|
let t = d(e[1], -9999, 9999), n = t < 1 ? "BC" : "AD", a = new O(n, t < 1 ? -t + 1 : t, d(e[2], 1, 12), 1, e[4] ? d(e[4], 0, 23) : 0, e[5] ? d(e[5], 0, 59) : 0, e[6] ? d(e[6], 0, 59) : 0, e[7] ? d(e[7], 0, 1 / 0) * 1e3 : 0);
|
|
626
657
|
return a.day = d(e[3], 0, a.calendar.getDaysInMonth(a)), a;
|
|
@@ -630,26 +661,26 @@ function d(r, e, t) {
|
|
|
630
661
|
if (n < e || n > t) throw new RangeError(`Value out of range: ${e} <= ${n} <= ${t}`);
|
|
631
662
|
return n;
|
|
632
663
|
}
|
|
633
|
-
function
|
|
664
|
+
function nr(r) {
|
|
634
665
|
return `${String(r.hour).padStart(2, "0")}:${String(r.minute).padStart(2, "0")}:${String(r.second).padStart(2, "0")}${r.millisecond ? String(r.millisecond / 1e3).slice(1) : ""}`;
|
|
635
666
|
}
|
|
636
|
-
function
|
|
667
|
+
function ar(r) {
|
|
637
668
|
let e = h(r, new $()), t;
|
|
638
669
|
return e.era === "BC" ? t = e.year === 1 ? "0000" : "-" + String(Math.abs(1 - e.year)).padStart(6, "00") : t = String(e.year).padStart(4, "0"), `${t}-${String(e.month).padStart(2, "0")}-${String(e.day).padStart(2, "0")}`;
|
|
639
670
|
}
|
|
640
|
-
function
|
|
641
|
-
return `${
|
|
671
|
+
function or(r) {
|
|
672
|
+
return `${ar(r)}T${nr(r)}`;
|
|
642
673
|
}
|
|
643
|
-
function
|
|
674
|
+
function qr(r) {
|
|
644
675
|
let e = Math.sign(r) < 0 ? "-" : "+";
|
|
645
676
|
r = Math.abs(r);
|
|
646
|
-
let t = Math.floor(r / 36e5), n = r % 36e5 / 6e4
|
|
647
|
-
return
|
|
677
|
+
let t = Math.floor(r / 36e5), n = Math.floor(r % 36e5 / 6e4), a = Math.floor(r % 36e5 % 6e4 / 1e3), o = `${e}${String(t).padStart(2, "0")}:${String(n).padStart(2, "0")}`;
|
|
678
|
+
return a !== 0 && (o += `:${String(a).padStart(2, "0")}`), o;
|
|
648
679
|
}
|
|
649
|
-
function
|
|
650
|
-
return `${
|
|
680
|
+
function Hr(r) {
|
|
681
|
+
return `${or(r)}${qr(r.offset)}[${r.timeZone}]`;
|
|
651
682
|
}
|
|
652
|
-
function
|
|
683
|
+
function ge(r) {
|
|
653
684
|
let e = typeof r[0] == "object" ? r.shift() : new $(), t;
|
|
654
685
|
if (typeof r[0] == "string") t = r.shift();
|
|
655
686
|
else {
|
|
@@ -665,7 +696,7 @@ function be(r) {
|
|
|
665
696
|
o
|
|
666
697
|
];
|
|
667
698
|
}
|
|
668
|
-
var
|
|
699
|
+
var Pr = /* @__PURE__ */ new WeakMap();
|
|
669
700
|
class s {
|
|
670
701
|
/** Returns a copy of this date. */
|
|
671
702
|
copy() {
|
|
@@ -677,49 +708,49 @@ class s {
|
|
|
677
708
|
}
|
|
678
709
|
/** Returns a new `CalendarDate` with the given duration subtracted from it. */
|
|
679
710
|
subtract(e) {
|
|
680
|
-
return
|
|
711
|
+
return Xe(this, e);
|
|
681
712
|
}
|
|
682
713
|
/** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */
|
|
683
714
|
set(e) {
|
|
684
|
-
return
|
|
715
|
+
return ye(this, e);
|
|
685
716
|
}
|
|
686
717
|
/**
|
|
687
718
|
* Returns a new `CalendarDate` with the given field adjusted by a specified amount.
|
|
688
719
|
* When the resulting value reaches the limits of the field, it wraps around.
|
|
689
720
|
*/
|
|
690
721
|
cycle(e, t, n) {
|
|
691
|
-
return
|
|
722
|
+
return me(this, e, t, n);
|
|
692
723
|
}
|
|
693
724
|
/** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */
|
|
694
725
|
toDate(e) {
|
|
695
|
-
return
|
|
726
|
+
return Ge(this, e);
|
|
696
727
|
}
|
|
697
728
|
/** Converts the date to an ISO 8601 formatted string. */
|
|
698
729
|
toString() {
|
|
699
|
-
return
|
|
730
|
+
return ar(this);
|
|
700
731
|
}
|
|
701
732
|
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
|
|
702
733
|
compare(e) {
|
|
703
|
-
return
|
|
734
|
+
return Pe(this, e);
|
|
704
735
|
}
|
|
705
736
|
constructor(...e) {
|
|
706
|
-
j(this,
|
|
737
|
+
j(this, Pr, {
|
|
707
738
|
writable: !0,
|
|
708
739
|
value: void 0
|
|
709
740
|
});
|
|
710
|
-
let [t, n, a, o, i] =
|
|
711
|
-
this.calendar = t, this.era = n, this.year = a, this.month = o, this.day = i,
|
|
741
|
+
let [t, n, a, o, i] = ge(e);
|
|
742
|
+
this.calendar = t, this.era = n, this.year = a, this.month = o, this.day = i, I(this);
|
|
712
743
|
}
|
|
713
744
|
}
|
|
714
|
-
var
|
|
715
|
-
class
|
|
745
|
+
var Zr = /* @__PURE__ */ new WeakMap();
|
|
746
|
+
class ir {
|
|
716
747
|
/** Returns a copy of this time. */
|
|
717
748
|
copy() {
|
|
718
|
-
return new
|
|
749
|
+
return new ir(this.hour, this.minute, this.second, this.millisecond);
|
|
719
750
|
}
|
|
720
751
|
/** Returns a new `Time` with the given duration added to it. */
|
|
721
752
|
add(e) {
|
|
722
|
-
return
|
|
753
|
+
return rr(this, e);
|
|
723
754
|
}
|
|
724
755
|
/** Returns a new `Time` with the given duration subtracted from it. */
|
|
725
756
|
subtract(e) {
|
|
@@ -727,31 +758,31 @@ class or {
|
|
|
727
758
|
}
|
|
728
759
|
/** Returns a new `Time` with the given fields set to the provided values. Other fields will be constrained accordingly. */
|
|
729
760
|
set(e) {
|
|
730
|
-
return
|
|
761
|
+
return L(this, e);
|
|
731
762
|
}
|
|
732
763
|
/**
|
|
733
764
|
* Returns a new `Time` with the given field adjusted by a specified amount.
|
|
734
765
|
* When the resulting value reaches the limits of the field, it wraps around.
|
|
735
766
|
*/
|
|
736
767
|
cycle(e, t, n) {
|
|
737
|
-
return
|
|
768
|
+
return be(this, e, t, n);
|
|
738
769
|
}
|
|
739
770
|
/** Converts the time to an ISO 8601 formatted string. */
|
|
740
771
|
toString() {
|
|
741
|
-
return
|
|
772
|
+
return nr(this);
|
|
742
773
|
}
|
|
743
774
|
/** Compares this time with another. A negative result indicates that this time is before the given one, and a positive time indicates that it is after. */
|
|
744
775
|
compare(e) {
|
|
745
|
-
return
|
|
776
|
+
return Ze(this, e);
|
|
746
777
|
}
|
|
747
778
|
constructor(e = 0, t = 0, n = 0, a = 0) {
|
|
748
|
-
j(this,
|
|
779
|
+
j(this, Zr, {
|
|
749
780
|
writable: !0,
|
|
750
781
|
value: void 0
|
|
751
|
-
}), this.hour = e, this.minute = t, this.second = n, this.millisecond = a,
|
|
782
|
+
}), this.hour = e, this.minute = t, this.second = n, this.millisecond = a, ze(this);
|
|
752
783
|
}
|
|
753
784
|
}
|
|
754
|
-
var
|
|
785
|
+
var Wr = /* @__PURE__ */ new WeakMap();
|
|
755
786
|
class O {
|
|
756
787
|
/** Returns a copy of this date. */
|
|
757
788
|
copy() {
|
|
@@ -763,11 +794,11 @@ class O {
|
|
|
763
794
|
}
|
|
764
795
|
/** Returns a new `CalendarDateTime` with the given duration subtracted from it. */
|
|
765
796
|
subtract(e) {
|
|
766
|
-
return
|
|
797
|
+
return Xe(this, e);
|
|
767
798
|
}
|
|
768
799
|
/** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
|
|
769
800
|
set(e) {
|
|
770
|
-
return
|
|
801
|
+
return ye(L(this, e), e);
|
|
771
802
|
}
|
|
772
803
|
/**
|
|
773
804
|
* Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
|
|
@@ -779,31 +810,31 @@ class O {
|
|
|
779
810
|
case "year":
|
|
780
811
|
case "month":
|
|
781
812
|
case "day":
|
|
782
|
-
return ye(this, e, t, n);
|
|
783
|
-
default:
|
|
784
813
|
return me(this, e, t, n);
|
|
814
|
+
default:
|
|
815
|
+
return be(this, e, t, n);
|
|
785
816
|
}
|
|
786
817
|
}
|
|
787
818
|
/** Converts the date to a native JavaScript Date object in the given time zone. */
|
|
788
819
|
toDate(e, t) {
|
|
789
|
-
return
|
|
820
|
+
return Ge(this, e, t);
|
|
790
821
|
}
|
|
791
822
|
/** Converts the date to an ISO 8601 formatted string. */
|
|
792
823
|
toString() {
|
|
793
|
-
return
|
|
824
|
+
return or(this);
|
|
794
825
|
}
|
|
795
826
|
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
|
|
796
827
|
compare(e) {
|
|
797
|
-
let t =
|
|
798
|
-
return t === 0 ?
|
|
828
|
+
let t = Pe(this, e);
|
|
829
|
+
return t === 0 ? Ze(this, R(e)) : t;
|
|
799
830
|
}
|
|
800
831
|
constructor(...e) {
|
|
801
|
-
j(this,
|
|
832
|
+
j(this, Wr, {
|
|
802
833
|
writable: !0,
|
|
803
834
|
value: void 0
|
|
804
835
|
});
|
|
805
|
-
let [t, n, a, o, i] =
|
|
806
|
-
this.calendar = t, this.era = n, this.year = a, this.month = o, this.day = i, this.hour = e.shift() || 0, this.minute = e.shift() || 0, this.second = e.shift() || 0, this.millisecond = e.shift() || 0,
|
|
836
|
+
let [t, n, a, o, i] = ge(e);
|
|
837
|
+
this.calendar = t, this.era = n, this.year = a, this.month = o, this.day = i, this.hour = e.shift() || 0, this.minute = e.shift() || 0, this.second = e.shift() || 0, this.millisecond = e.shift() || 0, I(this);
|
|
807
838
|
}
|
|
808
839
|
}
|
|
809
840
|
var Vr = /* @__PURE__ */ new WeakMap();
|
|
@@ -814,30 +845,30 @@ class Q {
|
|
|
814
845
|
}
|
|
815
846
|
/** Returns a new `ZonedDateTime` with the given duration added to it. */
|
|
816
847
|
add(e) {
|
|
817
|
-
return
|
|
848
|
+
return tr(this, e);
|
|
818
849
|
}
|
|
819
850
|
/** Returns a new `ZonedDateTime` with the given duration subtracted from it. */
|
|
820
851
|
subtract(e) {
|
|
821
|
-
return
|
|
852
|
+
return Or(this, e);
|
|
822
853
|
}
|
|
823
854
|
/** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
|
|
824
855
|
set(e, t) {
|
|
825
|
-
return
|
|
856
|
+
return _r(this, e, t);
|
|
826
857
|
}
|
|
827
858
|
/**
|
|
828
859
|
* Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.
|
|
829
860
|
* When the resulting value reaches the limits of the field, it wraps around.
|
|
830
861
|
*/
|
|
831
862
|
cycle(e, t, n) {
|
|
832
|
-
return
|
|
863
|
+
return Qr(this, e, t, n);
|
|
833
864
|
}
|
|
834
865
|
/** Converts the date to a native JavaScript Date object. */
|
|
835
866
|
toDate() {
|
|
836
|
-
return
|
|
867
|
+
return Rr(this);
|
|
837
868
|
}
|
|
838
869
|
/** Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone identifier. */
|
|
839
870
|
toString() {
|
|
840
|
-
return
|
|
871
|
+
return Hr(this);
|
|
841
872
|
}
|
|
842
873
|
/** Converts the date to an ISO 8601 formatted string in UTC. */
|
|
843
874
|
toAbsoluteString() {
|
|
@@ -845,15 +876,15 @@ class Q {
|
|
|
845
876
|
}
|
|
846
877
|
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
|
|
847
878
|
compare(e) {
|
|
848
|
-
return this.toDate().getTime() -
|
|
879
|
+
return this.toDate().getTime() - Tr(e, this.timeZone).toDate().getTime();
|
|
849
880
|
}
|
|
850
881
|
constructor(...e) {
|
|
851
882
|
j(this, Vr, {
|
|
852
883
|
writable: !0,
|
|
853
884
|
value: void 0
|
|
854
885
|
});
|
|
855
|
-
let [t, n, a, o, i] =
|
|
856
|
-
this.calendar = t, this.era = n, this.year = a, this.month = o, this.day = i, this.timeZone = f, this.offset = c, this.hour = e.shift() || 0, this.minute = e.shift() || 0, this.second = e.shift() || 0, this.millisecond = e.shift() || 0,
|
|
886
|
+
let [t, n, a, o, i] = ge(e), f = e.shift(), c = e.shift();
|
|
887
|
+
this.calendar = t, this.era = n, this.year = a, this.month = o, this.day = i, this.timeZone = f, this.offset = c, this.hour = e.shift() || 0, this.minute = e.shift() || 0, this.second = e.shift() || 0, this.millisecond = e.shift() || 0, I(this);
|
|
857
888
|
}
|
|
858
889
|
}
|
|
859
890
|
const Y = [
|
|
@@ -882,7 +913,7 @@ const Y = [
|
|
|
882
913
|
5,
|
|
883
914
|
1
|
|
884
915
|
]
|
|
885
|
-
],
|
|
916
|
+
], Kr = [
|
|
886
917
|
[
|
|
887
918
|
1912,
|
|
888
919
|
7,
|
|
@@ -916,29 +947,29 @@ const Y = [
|
|
|
916
947
|
"heisei",
|
|
917
948
|
"reiwa"
|
|
918
949
|
];
|
|
919
|
-
function
|
|
950
|
+
function xe(r) {
|
|
920
951
|
const e = Y.findIndex(([t, n, a]) => r.year < t || r.year === t && r.month < n || r.year === t && r.month === n && r.day < a);
|
|
921
952
|
return e === -1 ? Y.length - 1 : e === 0 ? 0 : e - 1;
|
|
922
953
|
}
|
|
923
|
-
function
|
|
954
|
+
function ne(r) {
|
|
924
955
|
let e = q[M.indexOf(r.era)];
|
|
925
956
|
if (!e) throw new Error("Unknown era: " + r.era);
|
|
926
957
|
return new s(r.year + e, r.month, r.day);
|
|
927
958
|
}
|
|
928
|
-
class
|
|
959
|
+
class Gr extends $ {
|
|
929
960
|
fromJulianDay(e) {
|
|
930
|
-
let t = super.fromJulianDay(e), n =
|
|
961
|
+
let t = super.fromJulianDay(e), n = xe(t);
|
|
931
962
|
return new s(this, M[n], t.year - q[n], t.month, t.day);
|
|
932
963
|
}
|
|
933
964
|
toJulianDay(e) {
|
|
934
|
-
return super.toJulianDay(
|
|
965
|
+
return super.toJulianDay(ne(e));
|
|
935
966
|
}
|
|
936
967
|
balanceDate(e) {
|
|
937
|
-
let t =
|
|
968
|
+
let t = ne(e), n = xe(t);
|
|
938
969
|
M[n] !== e.era && (e.era = M[n], e.year = t.year - q[n]), this.constrainDate(e);
|
|
939
970
|
}
|
|
940
971
|
constrainDate(e) {
|
|
941
|
-
let t = M.indexOf(e.era), n =
|
|
972
|
+
let t = M.indexOf(e.era), n = Kr[t];
|
|
942
973
|
if (n != null) {
|
|
943
974
|
let [a, o, i] = n, f = a - q[t];
|
|
944
975
|
e.year = Math.max(1, Math.min(f, e.year)), e.year === f && (e.month = Math.min(o, e.month), e.month === o && (e.day = Math.min(i, e.day)));
|
|
@@ -959,34 +990,34 @@ class Kr extends $ {
|
|
|
959
990
|
return (e.month < a[1] || e.month === a[1] && e.day < a[2]) && o++, o;
|
|
960
991
|
}
|
|
961
992
|
getDaysInMonth(e) {
|
|
962
|
-
return super.getDaysInMonth(
|
|
993
|
+
return super.getDaysInMonth(ne(e));
|
|
963
994
|
}
|
|
964
995
|
getMinimumMonthInYear(e) {
|
|
965
|
-
let t =
|
|
996
|
+
let t = Ce(e);
|
|
966
997
|
return t ? t[1] : 1;
|
|
967
998
|
}
|
|
968
999
|
getMinimumDayInMonth(e) {
|
|
969
|
-
let t =
|
|
1000
|
+
let t = Ce(e);
|
|
970
1001
|
return t && e.month === t[1] ? t[2] : 1;
|
|
971
1002
|
}
|
|
972
1003
|
constructor(...e) {
|
|
973
1004
|
super(...e), this.identifier = "japanese";
|
|
974
1005
|
}
|
|
975
1006
|
}
|
|
976
|
-
function
|
|
1007
|
+
function Ce(r) {
|
|
977
1008
|
if (r.year === 1) {
|
|
978
1009
|
let e = M.indexOf(r.era);
|
|
979
1010
|
return Y[e];
|
|
980
1011
|
}
|
|
981
1012
|
}
|
|
982
|
-
const
|
|
983
|
-
class
|
|
1013
|
+
const fr = -543;
|
|
1014
|
+
class jr extends $ {
|
|
984
1015
|
fromJulianDay(e) {
|
|
985
1016
|
let t = super.fromJulianDay(e), n = _(t.era, t.year);
|
|
986
|
-
return new s(this, n -
|
|
1017
|
+
return new s(this, n - fr, t.month, t.day);
|
|
987
1018
|
}
|
|
988
1019
|
toJulianDay(e) {
|
|
989
|
-
return super.toJulianDay(
|
|
1020
|
+
return super.toJulianDay(Se(e));
|
|
990
1021
|
}
|
|
991
1022
|
getEras() {
|
|
992
1023
|
return [
|
|
@@ -994,7 +1025,7 @@ class Gr extends $ {
|
|
|
994
1025
|
];
|
|
995
1026
|
}
|
|
996
1027
|
getDaysInMonth(e) {
|
|
997
|
-
return super.getDaysInMonth(
|
|
1028
|
+
return super.getDaysInMonth(Se(e));
|
|
998
1029
|
}
|
|
999
1030
|
balanceDate() {
|
|
1000
1031
|
}
|
|
@@ -1002,16 +1033,16 @@ class Gr extends $ {
|
|
|
1002
1033
|
super(...e), this.identifier = "buddhist";
|
|
1003
1034
|
}
|
|
1004
1035
|
}
|
|
1005
|
-
function
|
|
1006
|
-
let [e, t] = X(r.year +
|
|
1036
|
+
function Se(r) {
|
|
1037
|
+
let [e, t] = X(r.year + fr);
|
|
1007
1038
|
return new s(e, t, r.month, r.day);
|
|
1008
1039
|
}
|
|
1009
|
-
const
|
|
1010
|
-
function
|
|
1011
|
-
return r.era === "minguo" ? r.year +
|
|
1040
|
+
const W = 1911;
|
|
1041
|
+
function cr(r) {
|
|
1042
|
+
return r.era === "minguo" ? r.year + W : 1 - r.year + W;
|
|
1012
1043
|
}
|
|
1013
|
-
function
|
|
1014
|
-
let e = r -
|
|
1044
|
+
function Ye(r) {
|
|
1045
|
+
let e = r - W;
|
|
1015
1046
|
return e > 0 ? [
|
|
1016
1047
|
"minguo",
|
|
1017
1048
|
e
|
|
@@ -1020,13 +1051,13 @@ function Se(r) {
|
|
|
1020
1051
|
1 - e
|
|
1021
1052
|
];
|
|
1022
1053
|
}
|
|
1023
|
-
class
|
|
1054
|
+
class Xr extends $ {
|
|
1024
1055
|
fromJulianDay(e) {
|
|
1025
|
-
let t = super.fromJulianDay(e), n = _(t.era, t.year), [a, o] =
|
|
1056
|
+
let t = super.fromJulianDay(e), n = _(t.era, t.year), [a, o] = Ye(n);
|
|
1026
1057
|
return new s(this, a, o, t.month, t.day);
|
|
1027
1058
|
}
|
|
1028
1059
|
toJulianDay(e) {
|
|
1029
|
-
return super.toJulianDay(
|
|
1060
|
+
return super.toJulianDay(Be(e));
|
|
1030
1061
|
}
|
|
1031
1062
|
getEras() {
|
|
1032
1063
|
return [
|
|
@@ -1035,27 +1066,27 @@ class jr extends $ {
|
|
|
1035
1066
|
];
|
|
1036
1067
|
}
|
|
1037
1068
|
balanceDate(e) {
|
|
1038
|
-
let [t, n] =
|
|
1069
|
+
let [t, n] = Ye(cr(e));
|
|
1039
1070
|
e.era = t, e.year = n;
|
|
1040
1071
|
}
|
|
1041
1072
|
isInverseEra(e) {
|
|
1042
1073
|
return e.era === "before_minguo";
|
|
1043
1074
|
}
|
|
1044
1075
|
getDaysInMonth(e) {
|
|
1045
|
-
return super.getDaysInMonth(
|
|
1076
|
+
return super.getDaysInMonth(Be(e));
|
|
1046
1077
|
}
|
|
1047
1078
|
getYearsInEra(e) {
|
|
1048
|
-
return e.era === "before_minguo" ? 9999 : 9999 -
|
|
1079
|
+
return e.era === "before_minguo" ? 9999 : 9999 - W;
|
|
1049
1080
|
}
|
|
1050
1081
|
constructor(...e) {
|
|
1051
1082
|
super(...e), this.identifier = "roc";
|
|
1052
1083
|
}
|
|
1053
1084
|
}
|
|
1054
|
-
function
|
|
1055
|
-
let [e, t] = X(
|
|
1085
|
+
function Be(r) {
|
|
1086
|
+
let [e, t] = X(cr(r));
|
|
1056
1087
|
return new s(e, t, r.month, r.day);
|
|
1057
1088
|
}
|
|
1058
|
-
const
|
|
1089
|
+
const Te = 1948320, Re = [
|
|
1059
1090
|
0,
|
|
1060
1091
|
31,
|
|
1061
1092
|
62,
|
|
@@ -1070,14 +1101,14 @@ const Be = 1948320, Te = [
|
|
|
1070
1101
|
336
|
|
1071
1102
|
// Esfand
|
|
1072
1103
|
];
|
|
1073
|
-
class
|
|
1104
|
+
class zr {
|
|
1074
1105
|
fromJulianDay(e) {
|
|
1075
|
-
let t = e -
|
|
1106
|
+
let t = e - Te, n = 1 + Math.floor((33 * t + 3) / 12053), a = 365 * (n - 1) + Math.floor((8 * n + 21) / 33), o = t - a, i = o < 216 ? Math.floor(o / 31) : Math.floor((o - 6) / 30), f = o - Re[i] + 1;
|
|
1076
1107
|
return new s(this, n, i + 1, f);
|
|
1077
1108
|
}
|
|
1078
1109
|
toJulianDay(e) {
|
|
1079
|
-
let t =
|
|
1080
|
-
return t +=
|
|
1110
|
+
let t = Te - 1 + 365 * (e.year - 1) + Math.floor((8 * e.year + 21) / 33);
|
|
1111
|
+
return t += Re[e.month - 1], t += e.day, t;
|
|
1081
1112
|
}
|
|
1082
1113
|
getMonthsInYear() {
|
|
1083
1114
|
return 12;
|
|
@@ -1097,11 +1128,11 @@ class Xr {
|
|
|
1097
1128
|
this.identifier = "persian";
|
|
1098
1129
|
}
|
|
1099
1130
|
}
|
|
1100
|
-
const
|
|
1101
|
-
class
|
|
1131
|
+
const ae = 78, Ue = 80;
|
|
1132
|
+
class et extends $ {
|
|
1102
1133
|
fromJulianDay(e) {
|
|
1103
|
-
let t = super.fromJulianDay(e), n = t.year -
|
|
1104
|
-
a <
|
|
1134
|
+
let t = super.fromJulianDay(e), n = t.year - ae, a = e - v(t.era, t.year, 1, 1), o;
|
|
1135
|
+
a < Ue ? (n--, o = D(t.year - 1) ? 31 : 30, a += o + 155 + 90 + 10) : (o = D(t.year) ? 31 : 30, a -= Ue);
|
|
1105
1136
|
let i, f;
|
|
1106
1137
|
if (a < o)
|
|
1107
1138
|
i = 1, f = a + 1;
|
|
@@ -1112,11 +1143,11 @@ class zr extends $ {
|
|
|
1112
1143
|
return new s(this, n, i, f);
|
|
1113
1144
|
}
|
|
1114
1145
|
toJulianDay(e) {
|
|
1115
|
-
let t = e.year +
|
|
1146
|
+
let t = e.year + ae, [n, a] = X(t), o, i;
|
|
1116
1147
|
return D(a) ? (o = 31, i = v(n, a, 3, 21)) : (o = 30, i = v(n, a, 3, 22)), e.month === 1 ? i + e.day - 1 : (i += o + Math.min(e.month - 2, 5) * 31, e.month >= 8 && (i += (e.month - 7) * 30), i += e.day - 1, i);
|
|
1117
1148
|
}
|
|
1118
1149
|
getDaysInMonth(e) {
|
|
1119
|
-
return e.month === 1 && D(e.year +
|
|
1150
|
+
return e.month === 1 && D(e.year + ae) || e.month >= 2 && e.month <= 6 ? 31 : 30;
|
|
1120
1151
|
}
|
|
1121
1152
|
getYearsInEra() {
|
|
1122
1153
|
return 9919;
|
|
@@ -1132,33 +1163,33 @@ class zr extends $ {
|
|
|
1132
1163
|
super(...e), this.identifier = "indian";
|
|
1133
1164
|
}
|
|
1134
1165
|
}
|
|
1135
|
-
const
|
|
1166
|
+
const V = 1948440, Je = 1948439, u = 1300, C = 1600, rt = 460322;
|
|
1136
1167
|
function K(r, e, t, n) {
|
|
1137
1168
|
return n + Math.ceil(29.5 * (t - 1)) + (e - 1) * 354 + Math.floor((3 + 11 * e) / 30) + r - 1;
|
|
1138
1169
|
}
|
|
1139
|
-
function
|
|
1170
|
+
function sr(r, e, t) {
|
|
1140
1171
|
let n = Math.floor((30 * (t - e) + 10646) / 10631), a = Math.min(12, Math.ceil((t - (29 + K(e, n, 1, 1))) / 29.5) + 1), o = t - K(e, n, a, 1) + 1;
|
|
1141
1172
|
return new s(r, n, a, o);
|
|
1142
1173
|
}
|
|
1143
|
-
function
|
|
1174
|
+
function ke(r) {
|
|
1144
1175
|
return (14 + 11 * r) % 30 < 11;
|
|
1145
1176
|
}
|
|
1146
|
-
class
|
|
1177
|
+
class Me {
|
|
1147
1178
|
fromJulianDay(e) {
|
|
1148
|
-
return
|
|
1179
|
+
return sr(this, V, e);
|
|
1149
1180
|
}
|
|
1150
1181
|
toJulianDay(e) {
|
|
1151
|
-
return K(
|
|
1182
|
+
return K(V, e.year, e.month, e.day);
|
|
1152
1183
|
}
|
|
1153
1184
|
getDaysInMonth(e) {
|
|
1154
1185
|
let t = 29 + e.month % 2;
|
|
1155
|
-
return e.month === 12 &&
|
|
1186
|
+
return e.month === 12 && ke(e.year) && t++, t;
|
|
1156
1187
|
}
|
|
1157
1188
|
getMonthsInYear() {
|
|
1158
1189
|
return 12;
|
|
1159
1190
|
}
|
|
1160
1191
|
getDaysInYear(e) {
|
|
1161
|
-
return
|
|
1192
|
+
return ke(e.year) ? 355 : 354;
|
|
1162
1193
|
}
|
|
1163
1194
|
getYearsInEra() {
|
|
1164
1195
|
return 9665;
|
|
@@ -1172,43 +1203,43 @@ class ge {
|
|
|
1172
1203
|
this.identifier = "islamic-civil";
|
|
1173
1204
|
}
|
|
1174
1205
|
}
|
|
1175
|
-
class
|
|
1206
|
+
class tt extends Me {
|
|
1176
1207
|
fromJulianDay(e) {
|
|
1177
|
-
return
|
|
1208
|
+
return sr(this, Je, e);
|
|
1178
1209
|
}
|
|
1179
1210
|
toJulianDay(e) {
|
|
1180
|
-
return K(
|
|
1211
|
+
return K(Je, e.year, e.month, e.day);
|
|
1181
1212
|
}
|
|
1182
1213
|
constructor(...e) {
|
|
1183
1214
|
super(...e), this.identifier = "islamic-tbla";
|
|
1184
1215
|
}
|
|
1185
1216
|
}
|
|
1186
|
-
const
|
|
1187
|
-
let
|
|
1217
|
+
const nt = "qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=";
|
|
1218
|
+
let ue, B;
|
|
1188
1219
|
function H(r) {
|
|
1189
|
-
return
|
|
1220
|
+
return rt + B[r - u];
|
|
1190
1221
|
}
|
|
1191
1222
|
function J(r, e) {
|
|
1192
1223
|
let t = r - u, n = 1 << 11 - (e - 1);
|
|
1193
|
-
return (
|
|
1224
|
+
return (ue[t] & n) === 0 ? 29 : 30;
|
|
1194
1225
|
}
|
|
1195
1226
|
function Le(r, e) {
|
|
1196
1227
|
let t = H(r);
|
|
1197
1228
|
for (let n = 1; n < e; n++) t += J(r, n);
|
|
1198
1229
|
return t;
|
|
1199
1230
|
}
|
|
1200
|
-
function
|
|
1231
|
+
function Oe(r) {
|
|
1201
1232
|
return B[r + 1 - u] - B[r - u];
|
|
1202
1233
|
}
|
|
1203
|
-
class
|
|
1234
|
+
class at extends Me {
|
|
1204
1235
|
fromJulianDay(e) {
|
|
1205
|
-
let t = e -
|
|
1236
|
+
let t = e - V, n = H(u), a = H(C);
|
|
1206
1237
|
if (t < n || t > a) return super.fromJulianDay(e);
|
|
1207
1238
|
{
|
|
1208
1239
|
let o = u - 1, i = 1, f = 1;
|
|
1209
1240
|
for (; f > 0; ) {
|
|
1210
1241
|
o++, f = t - H(o) + 1;
|
|
1211
|
-
let c =
|
|
1242
|
+
let c = Oe(o);
|
|
1212
1243
|
if (f === c) {
|
|
1213
1244
|
i = 12;
|
|
1214
1245
|
break;
|
|
@@ -1223,16 +1254,16 @@ class nt extends ge {
|
|
|
1223
1254
|
}
|
|
1224
1255
|
}
|
|
1225
1256
|
toJulianDay(e) {
|
|
1226
|
-
return e.year < u || e.year > C ? super.toJulianDay(e) :
|
|
1257
|
+
return e.year < u || e.year > C ? super.toJulianDay(e) : V + Le(e.year, e.month) + (e.day - 1);
|
|
1227
1258
|
}
|
|
1228
1259
|
getDaysInMonth(e) {
|
|
1229
1260
|
return e.year < u || e.year > C ? super.getDaysInMonth(e) : J(e.year, e.month);
|
|
1230
1261
|
}
|
|
1231
1262
|
getDaysInYear(e) {
|
|
1232
|
-
return e.year < u || e.year > C ? super.getDaysInYear(e) :
|
|
1263
|
+
return e.year < u || e.year > C ? super.getDaysInYear(e) : Oe(e.year);
|
|
1233
1264
|
}
|
|
1234
1265
|
constructor() {
|
|
1235
|
-
if (super(), this.identifier = "islamic-umalqura",
|
|
1266
|
+
if (super(), this.identifier = "islamic-umalqura", ue || (ue = new Uint16Array(Uint8Array.from(atob(nt), (e) => e.charCodeAt(0)).buffer)), !B) {
|
|
1236
1267
|
B = new Uint32Array(C - u + 1);
|
|
1237
1268
|
let e = 0;
|
|
1238
1269
|
for (let t = u; t <= C; t++) {
|
|
@@ -1242,7 +1273,7 @@ class nt extends ge {
|
|
|
1242
1273
|
}
|
|
1243
1274
|
}
|
|
1244
1275
|
}
|
|
1245
|
-
const
|
|
1276
|
+
const Qe = 347997, lr = 1080, ur = 24 * lr, ot = 29, it = 12 * lr + 793, ft = ot * ur + it;
|
|
1246
1277
|
function w(r) {
|
|
1247
1278
|
return S(r * 7 + 1, 19) < 7;
|
|
1248
1279
|
}
|
|
@@ -1250,18 +1281,18 @@ function P(r) {
|
|
|
1250
1281
|
let e = Math.floor((235 * r - 234) / 19), t = 12084 + 13753 * e, n = e * 29 + Math.floor(t / 25920);
|
|
1251
1282
|
return S(3 * (n + 1), 7) < 3 && (n += 1), n;
|
|
1252
1283
|
}
|
|
1253
|
-
function
|
|
1284
|
+
function ct(r) {
|
|
1254
1285
|
let e = P(r - 1), t = P(r);
|
|
1255
1286
|
return P(r + 1) - t === 356 ? 2 : t - e === 382 ? 1 : 0;
|
|
1256
1287
|
}
|
|
1257
|
-
function
|
|
1258
|
-
return P(r) +
|
|
1288
|
+
function k(r) {
|
|
1289
|
+
return P(r) + ct(r);
|
|
1259
1290
|
}
|
|
1260
|
-
function
|
|
1261
|
-
return
|
|
1291
|
+
function hr(r) {
|
|
1292
|
+
return k(r + 1) - k(r);
|
|
1262
1293
|
}
|
|
1263
|
-
function
|
|
1264
|
-
let e =
|
|
1294
|
+
function st(r) {
|
|
1295
|
+
let e = hr(r);
|
|
1265
1296
|
switch (e > 380 && (e -= 30), e) {
|
|
1266
1297
|
case 353:
|
|
1267
1298
|
return 0;
|
|
@@ -1275,14 +1306,14 @@ function ct(r) {
|
|
|
1275
1306
|
}
|
|
1276
1307
|
function N(r, e) {
|
|
1277
1308
|
if (e >= 6 && !w(r) && e++, e === 4 || e === 7 || e === 9 || e === 11 || e === 13) return 29;
|
|
1278
|
-
let t =
|
|
1309
|
+
let t = st(r);
|
|
1279
1310
|
return e === 2 ? t === 2 ? 30 : 29 : e === 3 ? t === 0 ? 29 : 30 : e === 6 ? w(r) ? 30 : 0 : 30;
|
|
1280
1311
|
}
|
|
1281
|
-
class
|
|
1312
|
+
class lt {
|
|
1282
1313
|
fromJulianDay(e) {
|
|
1283
|
-
let t = e -
|
|
1314
|
+
let t = e - Qe, n = t * ur / ft, a = Math.floor((19 * n + 234) / 235) + 1, o = k(a), i = Math.floor(t - o);
|
|
1284
1315
|
for (; i < 1; )
|
|
1285
|
-
a--, o =
|
|
1316
|
+
a--, o = k(a), i = Math.floor(t - o);
|
|
1286
1317
|
let f = 1, c = 0;
|
|
1287
1318
|
for (; c < i; )
|
|
1288
1319
|
c += N(a, f), f++;
|
|
@@ -1291,9 +1322,9 @@ class st {
|
|
|
1291
1322
|
return new s(this, a, f, l);
|
|
1292
1323
|
}
|
|
1293
1324
|
toJulianDay(e) {
|
|
1294
|
-
let t =
|
|
1325
|
+
let t = k(e.year);
|
|
1295
1326
|
for (let n = 1; n < e.month; n++) t += N(e.year, n);
|
|
1296
|
-
return t + e.day +
|
|
1327
|
+
return t + e.day + Qe;
|
|
1297
1328
|
}
|
|
1298
1329
|
getDaysInMonth(e) {
|
|
1299
1330
|
return N(e.year, e.month);
|
|
@@ -1302,7 +1333,7 @@ class st {
|
|
|
1302
1333
|
return w(e.year) ? 13 : 12;
|
|
1303
1334
|
}
|
|
1304
1335
|
getDaysInYear(e) {
|
|
1305
|
-
return
|
|
1336
|
+
return hr(e.year);
|
|
1306
1337
|
}
|
|
1307
1338
|
getYearsInEra() {
|
|
1308
1339
|
return 9999;
|
|
@@ -1319,11 +1350,11 @@ class st {
|
|
|
1319
1350
|
this.identifier = "hebrew";
|
|
1320
1351
|
}
|
|
1321
1352
|
}
|
|
1322
|
-
const
|
|
1353
|
+
const he = 1723856, _e = 1824665, $e = 5500;
|
|
1323
1354
|
function G(r, e, t, n) {
|
|
1324
1355
|
return r + 365 * e + Math.floor(e / 4) + 30 * (t - 1) + n - 1;
|
|
1325
1356
|
}
|
|
1326
|
-
function
|
|
1357
|
+
function De(r, e) {
|
|
1327
1358
|
let t = Math.floor(4 * (e - r) / 1461), n = 1 + Math.floor((e - G(r, t, 1, 1)) / 30), a = e + 1 - G(r, t, n, 1);
|
|
1328
1359
|
return [
|
|
1329
1360
|
t,
|
|
@@ -1331,29 +1362,29 @@ function Me(r, e) {
|
|
|
1331
1362
|
a
|
|
1332
1363
|
];
|
|
1333
1364
|
}
|
|
1334
|
-
function
|
|
1365
|
+
function $r(r) {
|
|
1335
1366
|
return Math.floor(r % 4 / 3);
|
|
1336
1367
|
}
|
|
1337
|
-
function
|
|
1338
|
-
return e % 13 !== 0 ? 30 :
|
|
1368
|
+
function dr(r, e) {
|
|
1369
|
+
return e % 13 !== 0 ? 30 : $r(r) + 5;
|
|
1339
1370
|
}
|
|
1340
|
-
class
|
|
1371
|
+
class pe {
|
|
1341
1372
|
fromJulianDay(e) {
|
|
1342
|
-
let [t, n, a] =
|
|
1343
|
-
return t <= 0 && (o = "AA", t +=
|
|
1373
|
+
let [t, n, a] = De(he, e), o = "AM";
|
|
1374
|
+
return t <= 0 && (o = "AA", t += $e), new s(this, o, t, n, a);
|
|
1344
1375
|
}
|
|
1345
1376
|
toJulianDay(e) {
|
|
1346
1377
|
let t = e.year;
|
|
1347
|
-
return e.era === "AA" && (t -=
|
|
1378
|
+
return e.era === "AA" && (t -= $e), G(he, t, e.month, e.day);
|
|
1348
1379
|
}
|
|
1349
1380
|
getDaysInMonth(e) {
|
|
1350
|
-
return
|
|
1381
|
+
return dr(e.year, e.month);
|
|
1351
1382
|
}
|
|
1352
1383
|
getMonthsInYear() {
|
|
1353
1384
|
return 13;
|
|
1354
1385
|
}
|
|
1355
1386
|
getDaysInYear(e) {
|
|
1356
|
-
return 365 +
|
|
1387
|
+
return 365 + $r(e.year);
|
|
1357
1388
|
}
|
|
1358
1389
|
getYearsInEra(e) {
|
|
1359
1390
|
return e.era === "AA" ? 9999 : 9991;
|
|
@@ -1368,10 +1399,10 @@ class De {
|
|
|
1368
1399
|
this.identifier = "ethiopic";
|
|
1369
1400
|
}
|
|
1370
1401
|
}
|
|
1371
|
-
class
|
|
1402
|
+
class ut extends pe {
|
|
1372
1403
|
fromJulianDay(e) {
|
|
1373
|
-
let [t, n, a] =
|
|
1374
|
-
return t +=
|
|
1404
|
+
let [t, n, a] = De(he, e);
|
|
1405
|
+
return t += $e, new s(this, "AA", t, n, a);
|
|
1375
1406
|
}
|
|
1376
1407
|
getEras() {
|
|
1377
1408
|
return [
|
|
@@ -1385,18 +1416,18 @@ class lt extends De {
|
|
|
1385
1416
|
super(...e), this.identifier = "ethioaa";
|
|
1386
1417
|
}
|
|
1387
1418
|
}
|
|
1388
|
-
class
|
|
1419
|
+
class ht extends pe {
|
|
1389
1420
|
fromJulianDay(e) {
|
|
1390
|
-
let [t, n, a] =
|
|
1421
|
+
let [t, n, a] = De(_e, e), o = "CE";
|
|
1391
1422
|
return t <= 0 && (o = "BCE", t = 1 - t), new s(this, o, t, n, a);
|
|
1392
1423
|
}
|
|
1393
1424
|
toJulianDay(e) {
|
|
1394
1425
|
let t = e.year;
|
|
1395
|
-
return e.era === "BCE" && (t = 1 - t), G(
|
|
1426
|
+
return e.era === "BCE" && (t = 1 - t), G(_e, t, e.month, e.day);
|
|
1396
1427
|
}
|
|
1397
1428
|
getDaysInMonth(e) {
|
|
1398
1429
|
let t = e.year;
|
|
1399
|
-
return e.era === "BCE" && (t = 1 - t),
|
|
1430
|
+
return e.era === "BCE" && (t = 1 - t), dr(t, e.month);
|
|
1400
1431
|
}
|
|
1401
1432
|
isInverseEra(e) {
|
|
1402
1433
|
return e.era === "BCE";
|
|
@@ -1417,39 +1448,39 @@ class ut extends De {
|
|
|
1417
1448
|
super(...e), this.identifier = "coptic";
|
|
1418
1449
|
}
|
|
1419
1450
|
}
|
|
1420
|
-
function
|
|
1451
|
+
function Jt(r) {
|
|
1421
1452
|
switch (r) {
|
|
1422
1453
|
case "buddhist":
|
|
1423
|
-
return new
|
|
1454
|
+
return new jr();
|
|
1424
1455
|
case "ethiopic":
|
|
1425
|
-
return new
|
|
1456
|
+
return new pe();
|
|
1426
1457
|
case "ethioaa":
|
|
1427
|
-
return new lt();
|
|
1428
|
-
case "coptic":
|
|
1429
1458
|
return new ut();
|
|
1459
|
+
case "coptic":
|
|
1460
|
+
return new ht();
|
|
1430
1461
|
case "hebrew":
|
|
1431
|
-
return new
|
|
1462
|
+
return new lt();
|
|
1432
1463
|
case "indian":
|
|
1433
|
-
return new
|
|
1464
|
+
return new et();
|
|
1434
1465
|
case "islamic-civil":
|
|
1435
|
-
return new
|
|
1466
|
+
return new Me();
|
|
1436
1467
|
case "islamic-tbla":
|
|
1437
|
-
return new
|
|
1468
|
+
return new tt();
|
|
1438
1469
|
case "islamic-umalqura":
|
|
1439
|
-
return new
|
|
1470
|
+
return new at();
|
|
1440
1471
|
case "japanese":
|
|
1441
|
-
return new
|
|
1472
|
+
return new Gr();
|
|
1442
1473
|
case "persian":
|
|
1443
|
-
return new
|
|
1474
|
+
return new zr();
|
|
1444
1475
|
case "roc":
|
|
1445
|
-
return new
|
|
1476
|
+
return new Xr();
|
|
1446
1477
|
case "gregory":
|
|
1447
1478
|
default:
|
|
1448
1479
|
return new $();
|
|
1449
1480
|
}
|
|
1450
1481
|
}
|
|
1451
|
-
let
|
|
1452
|
-
class
|
|
1482
|
+
let oe = /* @__PURE__ */ new Map();
|
|
1483
|
+
class $t {
|
|
1453
1484
|
/** Formats a date as a string according to the locale and format options passed to the constructor. */
|
|
1454
1485
|
format(e) {
|
|
1455
1486
|
return this.formatter.format(e);
|
|
@@ -1490,50 +1521,50 @@ class ht {
|
|
|
1490
1521
|
/** Returns the resolved formatting options based on the values passed to the constructor. */
|
|
1491
1522
|
resolvedOptions() {
|
|
1492
1523
|
let e = this.formatter.resolvedOptions();
|
|
1493
|
-
return
|
|
1524
|
+
return mt() && (this.resolvedHourCycle || (this.resolvedHourCycle = bt(e.locale, this.options)), e.hourCycle = this.resolvedHourCycle, e.hour12 = this.resolvedHourCycle === "h11" || this.resolvedHourCycle === "h12"), e.calendar === "ethiopic-amete-alem" && (e.calendar = "ethioaa"), e;
|
|
1494
1525
|
}
|
|
1495
1526
|
constructor(e, t = {}) {
|
|
1496
|
-
this.formatter =
|
|
1527
|
+
this.formatter = yr(e, t), this.options = t;
|
|
1497
1528
|
}
|
|
1498
1529
|
}
|
|
1499
|
-
const
|
|
1530
|
+
const dt = {
|
|
1500
1531
|
true: {
|
|
1501
1532
|
// Only Japanese uses the h11 style for 12 hour time. All others use h12.
|
|
1502
1533
|
ja: "h11"
|
|
1503
1534
|
},
|
|
1504
1535
|
false: {}
|
|
1505
1536
|
};
|
|
1506
|
-
function
|
|
1507
|
-
if (typeof e.hour12 == "boolean" &&
|
|
1537
|
+
function yr(r, e = {}) {
|
|
1538
|
+
if (typeof e.hour12 == "boolean" && yt()) {
|
|
1508
1539
|
e = {
|
|
1509
1540
|
...e
|
|
1510
1541
|
};
|
|
1511
|
-
let a =
|
|
1542
|
+
let a = dt[String(e.hour12)][r.split("-")[0]], o = e.hour12 ? "h12" : "h23";
|
|
1512
1543
|
e.hourCycle = a ?? o, delete e.hour12;
|
|
1513
1544
|
}
|
|
1514
1545
|
let t = r + (e ? Object.entries(e).sort((a, o) => a[0] < o[0] ? -1 : 1).join() : "");
|
|
1515
|
-
if (
|
|
1546
|
+
if (oe.has(t)) return oe.get(t);
|
|
1516
1547
|
let n = new Intl.DateTimeFormat(r, e);
|
|
1517
|
-
return
|
|
1548
|
+
return oe.set(t, n), n;
|
|
1518
1549
|
}
|
|
1519
|
-
let
|
|
1520
|
-
function
|
|
1521
|
-
return
|
|
1550
|
+
let ie = null;
|
|
1551
|
+
function yt() {
|
|
1552
|
+
return ie == null && (ie = new Intl.DateTimeFormat("en-US", {
|
|
1522
1553
|
hour: "numeric",
|
|
1523
1554
|
hour12: !1
|
|
1524
|
-
}).format(new Date(2020, 2, 3, 0)) === "24"),
|
|
1555
|
+
}).format(new Date(2020, 2, 3, 0)) === "24"), ie;
|
|
1525
1556
|
}
|
|
1526
|
-
let
|
|
1527
|
-
function
|
|
1528
|
-
return
|
|
1557
|
+
let fe = null;
|
|
1558
|
+
function mt() {
|
|
1559
|
+
return fe == null && (fe = new Intl.DateTimeFormat("fr", {
|
|
1529
1560
|
hour: "numeric",
|
|
1530
1561
|
hour12: !1
|
|
1531
|
-
}).resolvedOptions().hourCycle === "h12"),
|
|
1562
|
+
}).resolvedOptions().hourCycle === "h12"), fe;
|
|
1532
1563
|
}
|
|
1533
|
-
function
|
|
1564
|
+
function bt(r, e) {
|
|
1534
1565
|
if (!e.timeStyle && !e.hour) return;
|
|
1535
1566
|
r = r.replace(/(-u-)?-nu-[a-zA-Z0-9]+/, ""), r += (r.includes("-u-") ? "" : "-u") + "-nu-latn";
|
|
1536
|
-
let t =
|
|
1567
|
+
let t = yr(r, {
|
|
1537
1568
|
...e,
|
|
1538
1569
|
timeZone: void 0
|
|
1539
1570
|
// use local timezone
|
|
@@ -1544,15 +1575,15 @@ function mt(r, e) {
|
|
|
1544
1575
|
if (n === 12 && a === 11) return "h12";
|
|
1545
1576
|
throw new Error("Unexpected hour cycle result");
|
|
1546
1577
|
}
|
|
1547
|
-
function
|
|
1548
|
-
r =
|
|
1549
|
-
let { locale: e } =
|
|
1550
|
-
return
|
|
1578
|
+
function kt(r) {
|
|
1579
|
+
r = Dr(r ?? {}, gt);
|
|
1580
|
+
let { locale: e } = br();
|
|
1581
|
+
return Mr(() => new $t(e, r), [
|
|
1551
1582
|
e,
|
|
1552
1583
|
r
|
|
1553
1584
|
]);
|
|
1554
1585
|
}
|
|
1555
|
-
function
|
|
1586
|
+
function gt(r, e) {
|
|
1556
1587
|
if (r === e) return !0;
|
|
1557
1588
|
let t = Object.keys(r), n = Object.keys(e);
|
|
1558
1589
|
if (t.length !== n.length) return !1;
|
|
@@ -1561,35 +1592,35 @@ function bt(r, e) {
|
|
|
1561
1592
|
return !0;
|
|
1562
1593
|
}
|
|
1563
1594
|
export {
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1595
|
+
$t as $,
|
|
1596
|
+
Ct as A,
|
|
1597
|
+
xt as B,
|
|
1598
|
+
Ut as C,
|
|
1599
|
+
Rt as D,
|
|
1569
1600
|
R as a,
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1601
|
+
Br as b,
|
|
1602
|
+
kt as c,
|
|
1603
|
+
Ne as d,
|
|
1573
1604
|
Z as e,
|
|
1574
1605
|
At as f,
|
|
1575
1606
|
Er as g,
|
|
1576
1607
|
Ar as h,
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1608
|
+
Yt as i,
|
|
1609
|
+
Dr as j,
|
|
1610
|
+
vt as k,
|
|
1611
|
+
It as l,
|
|
1612
|
+
Tt as m,
|
|
1613
|
+
Bt as n,
|
|
1583
1614
|
Et as o,
|
|
1584
1615
|
h as p,
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1616
|
+
qe as q,
|
|
1617
|
+
He as r,
|
|
1618
|
+
St as s,
|
|
1588
1619
|
$ as t,
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1620
|
+
Jt as u,
|
|
1621
|
+
wt as v,
|
|
1622
|
+
We as w,
|
|
1592
1623
|
s as x,
|
|
1593
|
-
|
|
1594
|
-
|
|
1624
|
+
Ir as y,
|
|
1625
|
+
ir as z
|
|
1595
1626
|
};
|