@feedmepos/ui-library 0.0.25 → 1.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/dist/components/avatar/FmAvatar.vue.d.ts +53 -0
- package/dist/components/bottom-sheet/FmBottomSheet.vue.d.ts +50 -0
- package/dist/components/button/FmButton.vue.d.ts +2 -2
- package/dist/components/card/FmCard.vue.d.ts +36 -38
- package/dist/components/card/FmCardActions.vue.d.ts +4 -24
- package/dist/components/card/FmCardHeader.vue.d.ts +32 -0
- package/dist/components/card/FmCardMedia.vue.d.ts +29 -0
- package/dist/components/card/FmCardSection.vue.d.ts +1 -13
- package/dist/components/card/FmCardSubtitle.vue.d.ts +9 -0
- package/dist/components/card/FmCardTitle.vue.d.ts +1 -14
- package/dist/components/chart/bar/FmBar.vue.d.ts +87 -0
- package/dist/components/chart/line/FmLine.vue.d.ts +25 -2
- package/dist/components/chart/pie/FmPie.vue.d.ts +105 -0
- package/dist/components/chip/FmChip.vue.d.ts +9 -0
- package/dist/components/dialog/FmDialog.vue.d.ts +1 -1
- package/dist/components/dynamic-dialog/FmDynamicDialog.vue.d.ts +5 -3
- package/dist/components/form/calendar/FmDateRangeYearMonthPicker.vue.d.ts +20 -0
- package/dist/components/form/calendar/date-picker/FmDatePicker.vue.d.ts +50 -0
- package/dist/components/form/{date-picker/FmDatePicker.vue.d.ts → calendar/date-picker/FmDatePickerDesktop.vue.d.ts} +3 -3
- package/dist/components/form/calendar/date-picker/FmDatePickerMobile.vue.d.ts +68 -0
- package/dist/components/form/calendar/date-range-picker/FmDateRangePicker.vue.d.ts +77 -0
- package/dist/components/form/calendar/date-range-picker/FmDateRangePickerDesktop.vue.d.ts +90 -0
- package/dist/components/form/calendar/date-range-picker/FmDateRangePickerField.vue.d.ts +70 -0
- package/dist/components/form/calendar/date-range-picker/FmDateRangePickerMobile.vue.d.ts +88 -0
- package/dist/components/form/calendar/date-range-picker/common.d.ts +37 -0
- package/dist/components/form/calendar/helper.d.ts +15 -0
- package/dist/components/form/checkbox/FmCheckbox.vue.d.ts +4 -1
- package/dist/components/form/field/FmField.vue.d.ts +1 -1
- package/dist/components/form/form-group/FmFormGroup.vue.d.ts +2 -2
- package/dist/components/form/helper-text/FmHelperText.vue.d.ts +1 -1
- package/dist/components/form/label/FmLabel.vue.d.ts +1 -1
- package/dist/components/form/phone-number/FmPhoneNumber.vue.d.ts +75 -0
- package/dist/components/form/pin-field/FmPinField.vue.d.ts +45 -0
- package/dist/components/form/radio/FmRadio.vue.d.ts +1 -1
- package/dist/components/form/radio-group/FmRadioGroup.vue.d.ts +3 -3
- package/dist/components/form/search/FmGlobalSearch.vue.d.ts +121 -0
- package/dist/components/form/search/FmSearch.vue.d.ts +98 -0
- package/dist/components/form/select/FmSelect.vue.d.ts +5 -2
- package/dist/components/form/stepper-field/FmStepperField.vue.d.ts +6 -6
- package/dist/components/form/switch/FmSwitch.vue.d.ts +4 -1
- package/dist/components/form/text-field/FmTextField.vue.d.ts +6 -15
- package/dist/components/form/textarea/FmTextarea.vue.d.ts +4 -4
- package/dist/components/form/time-picker/FmTimeInput.vue.d.ts +1 -1
- package/dist/components/form/time-picker/FmTimePicker.vue.d.ts +2 -2
- package/dist/components/form/{date-range-picker/FmDateRangePicker.vue.d.ts → time-picker/FmTimeRangePicker.vue.d.ts} +12 -23
- package/dist/components/form/time-picker/helper.d.ts +13 -0
- package/dist/components/icon/FmIcon.vue.d.ts +1 -1
- package/dist/components/list/FmListItem.vue.d.ts +10 -4
- package/dist/components/menu/menu-component/FmMenu.vue.d.ts +14 -2
- package/dist/components/menu/menu-item/FmMenuItem.vue.d.ts +1 -1
- package/dist/components/page-head/FmPageHead.vue.d.ts +59 -0
- package/dist/components/popover/FmPopover.vue.d.ts +55 -0
- package/dist/components/progress-indicator/FmCircularProgress.vue.d.ts +50 -0
- package/dist/components/progress-indicator/{FmProgress.vue.d.ts → FmLinearProgress.vue.d.ts} +3 -7
- package/dist/components/side-sheet/FmSideSheet.vue.d.ts +54 -0
- package/dist/components/snackbar/FmSnackbar.vue.d.ts +3 -3
- package/dist/components/tab/FmCollapsibleTab.vue.d.ts +73 -0
- package/dist/components/tab/FmTab.vue.d.ts +5 -5
- package/dist/components/tabs/FmCollapsibleTabs.vue.d.ts +35 -0
- package/dist/components/tabs/FmTabs.vue.d.ts +4 -4
- package/dist/components/thumbnail/FmThumbnail.vue.d.ts +47 -0
- package/dist/components/tooltip/FmTooltip.vue.d.ts +15 -31
- package/dist/components/tooltip/FmTooltipDirective.vue.d.ts +41 -0
- package/dist/components/top-sheet/FmTopSheet.vue.d.ts +54 -0
- package/dist/components.d.ts +4068 -1946
- package/dist/composables/index.d.ts +8 -0
- package/dist/composables/useBreakpoints.d.ts +8 -0
- package/dist/composables/useDialogChild.d.ts +7 -0
- package/dist/composables/useSnackbar.d.ts +2 -0
- package/dist/directives/tooltip.d.ts +8 -0
- package/dist/federation/FmBottomSheet-b037cf39.css +1 -0
- package/dist/federation/FmButton-e5ddd0ef.css +1 -0
- package/dist/federation/FmCard-232430ec.css +1 -0
- package/dist/federation/FmCardSection.vue_vue_type_script_setup_true_lang-a6fdefec.js +1 -0
- package/dist/federation/FmCardSubtitle.vue_vue_type_script_setup_true_lang-ec743f29.js +1 -0
- package/dist/federation/FmCardTitle.vue_vue_type_script_setup_true_lang-de099232.js +1 -0
- package/dist/federation/FmCheckbox.vue_vue_type_style_index_0_lang-be46dbff.js +1 -0
- package/dist/federation/FmChip.vue_vue_type_script_setup_true_lang-5f49d8ed.js +1 -0
- package/dist/federation/{FmChipGroup.vue_vue_type_script_setup_true_lang-871c2a2b.js → FmChipGroup.vue_vue_type_script_setup_true_lang-c0502319.js} +1 -1
- package/dist/federation/FmCircularProgress-765a2205.css +1 -0
- package/dist/federation/FmDatePicker-38a93ae6.css +1 -0
- package/dist/federation/FmDatePickerMobile-3803ddc6.css +1 -0
- package/dist/federation/FmDateRangePicker-e1b3748f.css +1 -0
- package/dist/federation/FmDateRangePickerMobile-12bff066.css +1 -0
- package/dist/federation/FmDateRangeYearMonthPicker.vue_vue_type_script_setup_true_lang-40d277d0.js +1 -0
- package/dist/federation/{FmField-bd90633b.css → FmField-996759d0.css} +1 -1
- package/dist/federation/FmFormGroup.vue_vue_type_script_setup_true_lang-69ceacdc.js +1 -0
- package/dist/federation/{FmHelperText.vue_vue_type_script_setup_true_lang-b9f6c877.js → FmHelperText.vue_vue_type_script_setup_true_lang-f9cc4fda.js} +1 -1
- package/dist/federation/{FmLabel.vue_vue_type_script_setup_true_lang-394da53f.js → FmLabel.vue_vue_type_script_setup_true_lang-c090ecda.js} +1 -1
- package/dist/federation/FmLinearProgress-d0939dbe.css +1 -0
- package/dist/federation/FmListItem-1f25df9c.css +1 -0
- package/dist/federation/FmMenu-7a15934c.css +1 -0
- package/dist/federation/{FmMenuDivider.vue_vue_type_script_setup_true_lang-a16c9e66.js → FmMenuDivider.vue_vue_type_script_setup_true_lang-fc05df0d.js} +1 -1
- package/dist/federation/FmMenuItem-f376e516.css +1 -0
- package/dist/federation/FmPinField-5116c09c.css +1 -0
- package/dist/federation/FmPopover-2805f8b5.css +1 -0
- package/dist/federation/FmPopover-7c5a1f1a.js +1 -0
- package/dist/federation/FmSearch.vue_vue_type_script_setup_true_lang-32670481.js +1 -0
- package/dist/federation/FmSelect.vue_vue_type_script_setup_true_lang-fdb202ee.js +1 -0
- package/dist/federation/FmSideSheet-72dc77de.css +1 -0
- package/dist/federation/FmSnackbar-fbf672a5.css +1 -0
- package/dist/federation/{FmStepHeader.vue_vue_type_script_setup_true_lang-3e652589.js → FmStepHeader.vue_vue_type_script_setup_true_lang-ab0f0d59.js} +1 -1
- package/dist/federation/{FmStepperField-62fdd552.css → FmStepperField-66286c2f.css} +1 -1
- package/dist/federation/{FmSwitch-ea705ff8.css → FmSwitch-30641580.css} +1 -1
- package/dist/federation/FmTab-36e86f03.css +1 -0
- package/dist/federation/FmTextField.vue_vue_type_style_index_0_lang-6aa68ac5.js +1 -0
- package/dist/federation/FmTimeInput.vue_vue_type_style_index_0_lang-cb1bee16.js +1 -0
- package/dist/federation/FmTooltip.vue_vue_type_script_setup_true_lang-92157710.js +1 -0
- package/dist/federation/FmTopSheet-9835b720.css +1 -0
- package/dist/federation/__federation_expose_FmAvatar-a8487776.js +1 -0
- package/dist/federation/{__federation_expose_FmBadge-5fece7d5.js → __federation_expose_FmBadge-5fd3cc75.js} +1 -1
- package/dist/federation/__federation_expose_FmBarChart-e3cc34d0.js +1 -0
- package/dist/federation/__federation_expose_FmBottomSheet-e8855ee4.js +1 -0
- package/dist/federation/__federation_expose_FmBreadcrumb-1ef81399.js +1 -0
- package/dist/federation/__federation_expose_FmButton-564e4537.js +9 -0
- package/dist/federation/__federation_expose_FmButtonGroup-ed1f1c56.js +1 -0
- package/dist/federation/__federation_expose_FmCard-b5ba47ac.js +1 -0
- package/dist/federation/__federation_expose_FmCardActions-e07f5762.js +1 -0
- package/dist/federation/__federation_expose_FmCardHeader-eebcb72e.js +1 -0
- package/dist/federation/__federation_expose_FmCardMedia-153e30ab.js +1 -0
- package/dist/federation/{__federation_expose_FmCardSection-4d3afd54.js → __federation_expose_FmCardSection-c33d5eb4.js} +1 -1
- package/dist/federation/__federation_expose_FmCardSubtitle-85a70525.js +1 -0
- package/dist/federation/{__federation_expose_FmCardTitle-c60d87ca.js → __federation_expose_FmCardTitle-100d10dc.js} +1 -1
- package/dist/federation/{__federation_expose_FmCheckbox-2ff86aa2.js → __federation_expose_FmCheckbox-ce42713f.js} +1 -1
- package/dist/federation/{__federation_expose_FmChip-f9c9853a.js → __federation_expose_FmChip-c129e485.js} +1 -1
- package/dist/federation/{__federation_expose_FmChipGroup-19a130b3.js → __federation_expose_FmChipGroup-c830232a.js} +1 -1
- package/dist/federation/__federation_expose_FmCircularProgress-d3de780f.js +1 -0
- package/dist/federation/__federation_expose_FmCollapsibleTabs-c91186f4.js +1 -0
- package/dist/federation/__federation_expose_FmDatePicker-50e5dde2.js +1 -0
- package/dist/federation/__federation_expose_FmDatePickerMobile-8a886a49.js +1 -0
- package/dist/federation/__federation_expose_FmDateRangePicker-9be0a904.js +1 -0
- package/dist/federation/__federation_expose_FmDateRangePickerMobile-6191c5e5.js +1 -0
- package/dist/federation/{FmDialog.vue_vue_type_style_index_0_lang-86fa0cf9.js → __federation_expose_FmDialog-6b49642b.js} +1 -1
- package/dist/federation/{__federation_expose_FmDropField-7c76401d.js → __federation_expose_FmDropField-94342518.js} +1 -1
- package/dist/federation/{__federation_expose_FmDynamicDialog-02e51f7c.js → __federation_expose_FmDynamicDialog-b5a9e7c8.js} +1 -1
- package/dist/federation/__federation_expose_FmField-37042217.js +1 -0
- package/dist/federation/{FmForm.vue_vue_type_script_setup_true_lang-e713d2fd.js → __federation_expose_FmForm-99da58b0.js} +1 -1
- package/dist/federation/{__federation_expose_FmFormGroup-7f69a13c.js → __federation_expose_FmFormGroup-2e6a6023.js} +1 -1
- package/dist/federation/__federation_expose_FmGlobalSearch-8e677bac.js +1 -0
- package/dist/federation/{__federation_expose_FmHelperText-c2bfc826.js → __federation_expose_FmHelperText-a7b991f3.js} +1 -1
- package/dist/federation/__federation_expose_FmIcon-c21d4c3c.js +1 -0
- package/dist/federation/{__federation_expose_FmLabel-a57534bc.js → __federation_expose_FmLabel-dfdee236.js} +1 -1
- package/dist/federation/__federation_expose_FmLineChart-d25df528.js +1 -0
- package/dist/federation/__federation_expose_FmLinearProgress-a3fa65ed.js +1 -0
- package/dist/federation/{__federation_expose_FmList-6740728f.js → __federation_expose_FmList-201ecd29.js} +1 -1
- package/dist/federation/__federation_expose_FmListItem-c643d8fc.js +1 -0
- package/dist/federation/__federation_expose_FmMenu-16c7062f.js +1 -0
- package/dist/federation/__federation_expose_FmMenuDeprecated-be7594e3.js +1 -0
- package/dist/federation/{__federation_expose_FmMenuDivider-83ce794e.js → __federation_expose_FmMenuDivider-573f3673.js} +1 -1
- package/dist/federation/{FmMenuHeader.vue_vue_type_script_setup_true_lang-7d261f99.js → __federation_expose_FmMenuHeader-1c83a608.js} +1 -1
- package/dist/federation/__federation_expose_FmMenuItem-10ad7e23.js +1 -0
- package/dist/federation/__federation_expose_FmPageHead-4d770277.js +1 -0
- package/dist/federation/__federation_expose_FmPhoneNumber-6771fae0.js +7 -0
- package/dist/federation/__federation_expose_FmPieChart-6b248aff.js +2 -0
- package/dist/federation/__federation_expose_FmPinField-713bdeb5.js +1 -0
- package/dist/federation/{__federation_expose_FmRadio-2d446893.js → __federation_expose_FmRadio-bbc6b501.js} +1 -1
- package/dist/federation/{FmRadioGroup.vue_vue_type_script_setup_true_lang-8bf88b4a.js → __federation_expose_FmRadioGroup-408c72ef.js} +1 -1
- package/dist/federation/__federation_expose_FmSearch-f22edecf.js +1 -0
- package/dist/federation/{__federation_expose_FmSelect-2243c372.js → __federation_expose_FmSelect-cbbea755.js} +1 -1
- package/dist/federation/__federation_expose_FmSideSheet-7c975398.js +1 -0
- package/dist/federation/__federation_expose_FmSnackbar-59728279.js +1 -0
- package/dist/federation/{__federation_expose_FmSpacer-d3f4d403.js → __federation_expose_FmSpacer-bd9a02ba.js} +1 -1
- package/dist/federation/{__federation_expose_FmStep-5c91d371.js → __federation_expose_FmStep-a5c3bc53.js} +1 -1
- package/dist/federation/__federation_expose_FmStepper-07bab4c9.js +1 -0
- package/dist/federation/__federation_expose_FmStepperField-1dfccefe.js +1 -0
- package/dist/federation/__federation_expose_FmSwitch-c0ed4d4e.js +1 -0
- package/dist/federation/__federation_expose_FmTab-d4114c82.js +1 -0
- package/dist/federation/{FmTable.vue_vue_type_script_setup_true_lang-0c3ac7d5.js → __federation_expose_FmTable-66cb6406.js} +2 -2
- package/dist/federation/{FmTabs.vue_vue_type_script_setup_true_lang-ba363af6.js → __federation_expose_FmTabs-f2e64464.js} +1 -1
- package/dist/federation/{__federation_expose_FmTextField-c8d3c680.js → __federation_expose_FmTextField-3139773b.js} +1 -1
- package/dist/federation/{__federation_expose_FmTextarea-3ddf8da1.js → __federation_expose_FmTextarea-801379c9.js} +1 -1
- package/dist/federation/__federation_expose_FmThumbnail-77aa517a.js +1 -0
- package/dist/federation/{__federation_expose_FmTimeInput-c425349d.js → __federation_expose_FmTimeInput-87c277d2.js} +1 -1
- package/dist/federation/__federation_expose_FmTimePicker-be987368.js +1 -0
- package/dist/federation/__federation_expose_FmTimeRangePicker-bb91e106.js +1 -0
- package/dist/federation/{__federation_expose_FmTooltip-fb507214.js → __federation_expose_FmTooltip-9a658343.js} +1 -1
- package/dist/federation/__federation_expose_FmTopSheet-cac486b5.js +1 -0
- package/dist/federation/_commonjsHelpers-725317a4.js +1 -0
- package/dist/federation/auto-f06b4c5b.js +18 -0
- package/dist/federation/dialog-plugin-1b39b5e4.js +1 -0
- package/dist/federation/feedmepos-ui-components.js +1 -1
- package/dist/federation/floating-ui.vue.esm-ccda7678.js +1 -0
- package/dist/federation/helper-52b61be9.js +1 -0
- package/dist/federation/helpers-75f687ff.js +1 -0
- package/dist/federation/index-1e0eb05f.js +2 -0
- package/dist/federation/index-b1df4432.css +1 -0
- package/dist/federation/provider-keys-d5322eae.js +1 -0
- package/dist/federation/useBreakpoints-9de6b2f5.js +1 -0
- package/dist/federation/{useProxiedModel-ab6f6ec7.js → useProxiedModel-045a5758.js} +1 -1
- package/dist/federation/util-color-a71a272e.js +1 -0
- package/dist/federation/vue-router-8d07778e.js +1 -0
- package/dist/feedmepos-ui-library.js +16132 -10081
- package/dist/feedmepos-ui-library.umd.cjs +22 -14
- package/dist/flags/MY.svg +26 -0
- package/dist/flags/SG.svg +13 -0
- package/dist/global-components.d.ts +72 -52
- package/dist/index.d.ts +3 -4
- package/dist/plugin/dialog-plugin.d.ts +6 -6
- package/dist/plugin/snackbar-plugin.d.ts +65 -0
- package/dist/style.css +1 -1
- package/dist/tailwind-plugin.js +3 -0
- package/dist/utils/fuzzy.d.ts +10 -0
- package/dist/utils/number.d.ts +5 -0
- package/dist/utils/provider-keys.d.ts +6 -1
- package/dist/utils/util-color.d.ts +2 -0
- package/package.json +9 -22
- package/README.md +0 -35
- package/dist/components/badge/FmBadge.stories.d.ts +0 -11
- package/dist/components/breadcrumb/FmBreadcrumb.stories.d.ts +0 -6
- package/dist/components/button/FmButton.stories.d.ts +0 -200
- package/dist/components/button-group/FmButtonGroup.stories.d.ts +0 -7
- package/dist/components/card/FmCard.stories.d.ts +0 -6
- package/dist/components/chart/line/FmLine.stories.d.ts +0 -6
- package/dist/components/chip/FmChip.stories.d.ts +0 -7
- package/dist/components/chip-group/FmChipGroup.stories.d.ts +0 -6
- package/dist/components/dialog/FmDialog.stories.d.ts +0 -6
- package/dist/components/drop-field/FmDropField.stories.d.ts +0 -6
- package/dist/components/form/checkbox/FmCheckbox.stories.d.ts +0 -6
- package/dist/components/form/date-picker/FmDatePicker.stories.d.ts +0 -6
- package/dist/components/form/date-range-picker/FmDateRangePicker.stories.d.ts +0 -6
- package/dist/components/form/helper-text/FmHelperText.stories.d.ts +0 -129
- package/dist/components/form/label/FmLabel.stories.d.ts +0 -6
- package/dist/components/form/radio/FmRadio.stories.d.ts +0 -6
- package/dist/components/form/radio-group/FmRadioGroup.stories.d.ts +0 -6
- package/dist/components/form/select/FmSelect.stories.d.ts +0 -6
- package/dist/components/form/stepper-field/FmStepperField.stories.d.ts +0 -6
- package/dist/components/form/switch/FmSwitch.stories.d.ts +0 -6
- package/dist/components/form/text-field/FmTextField.stories.d.ts +0 -6
- package/dist/components/form/textarea/FmTextarea.stories.d.ts +0 -6
- package/dist/components/form/time-picker/FmTimePicker.stories.d.ts +0 -6
- package/dist/components/form/time-picker/timePicker.d.ts +0 -5
- package/dist/components/icon/FmIcon.stories.d.ts +0 -6
- package/dist/components/list/FmList.stories.d.ts +0 -6
- package/dist/components/menu/menu-container-deprecated/FmMenu.stories.d.ts +0 -6
- package/dist/components/progress-indicator/FmProgressIndicator.vue.d.ts +0 -19
- package/dist/components/snackbar/FmSnackbar.stories.d.ts +0 -6
- package/dist/components/spacer/FmSpacer.stories.d.ts +0 -6
- package/dist/components/stepper/FmStepper.stories.d.ts +0 -6
- package/dist/components/table/FmTable.stories.d.ts +0 -6
- package/dist/components/tabs/FmTabs.stories.d.ts +0 -6
- package/dist/components/tooltip/FmTooltip.stories.d.ts +0 -7
- package/dist/demo/Breadcrumb.vue.d.ts +0 -2
- package/dist/demo/Button.vue.d.ts +0 -2
- package/dist/demo/ButtonGroup.vue.d.ts +0 -2
- package/dist/demo/Card.vue.d.ts +0 -2
- package/dist/demo/Chip.vue.d.ts +0 -2
- package/dist/demo/DatePicker.vue.d.ts +0 -2
- package/dist/demo/DateRangePicker.vue.d.ts +0 -2
- package/dist/demo/DemoSection.vue.d.ts +0 -29
- package/dist/demo/Dialog.vue.d.ts +0 -2
- package/dist/demo/DropField.vue.d.ts +0 -2
- package/dist/demo/Icon.vue.d.ts +0 -2
- package/dist/demo/List.vue.d.ts +0 -2
- package/dist/demo/Menu.vue.d.ts +0 -2
- package/dist/demo/ProgressIndicator.vue.d.ts +0 -2
- package/dist/demo/Snackbar.vue.d.ts +0 -2
- package/dist/demo/Stepper.vue.d.ts +0 -2
- package/dist/demo/Table.vue.d.ts +0 -2
- package/dist/demo/Tabs.vue.d.ts +0 -2
- package/dist/demo/TimePicker.vue.d.ts +0 -2
- package/dist/demo/Tooltip.vue.d.ts +0 -2
- package/dist/demo/chart/Line.vue.d.ts +0 -2
- package/dist/demo/demo.d.ts +0 -1
- package/dist/demo/form/Checkbox.vue.d.ts +0 -2
- package/dist/demo/form/Field.vue.d.ts +0 -2
- package/dist/demo/form/Form.vue.d.ts +0 -2
- package/dist/demo/form/FormGroup.vue.d.ts +0 -2
- package/dist/demo/form/Radio.vue.d.ts +0 -2
- package/dist/demo/form/Select.vue.d.ts +0 -2
- package/dist/demo/form/Stepper.vue.d.ts +0 -2
- package/dist/demo/form/Switch.vue.d.ts +0 -2
- package/dist/demo/form/TextField.vue.d.ts +0 -2
- package/dist/federation/FmBreadcrumb.vue_vue_type_style_index_0_lang-dc9b9631.js +0 -1
- package/dist/federation/FmButton-afd1cea0.css +0 -1
- package/dist/federation/FmButtonGroup.vue_vue_type_script_setup_true_lang-de74f366.js +0 -1
- package/dist/federation/FmCard-1d456952.css +0 -1
- package/dist/federation/FmCard.vue_vue_type_style_index_0_lang-95d94c84.js +0 -1
- package/dist/federation/FmCardActions.vue_vue_type_script_setup_true_lang-0037a6a2.js +0 -1
- package/dist/federation/FmCardSection.vue_vue_type_script_setup_true_lang-06e2ee1e.js +0 -1
- package/dist/federation/FmCardTitle.vue_vue_type_script_setup_true_lang-164b05ca.js +0 -1
- package/dist/federation/FmCheckbox.vue_vue_type_style_index_0_lang-b8a5c536.js +0 -1
- package/dist/federation/FmChip.vue_vue_type_script_setup_true_lang-8bcb4f4d.js +0 -1
- package/dist/federation/FmDatePicker-4f691ee2.css +0 -1
- package/dist/federation/FmDateRangePicker-63b44ee5.css +0 -1
- package/dist/federation/FmFormGroup.vue_vue_type_script_setup_true_lang-0e7854d6.js +0 -1
- package/dist/federation/FmLine.vue_vue_type_script_setup_true_lang-c16f5038.js +0 -3
- package/dist/federation/FmListItem-3af8b220.css +0 -1
- package/dist/federation/FmMenu-16edf003.css +0 -1
- package/dist/federation/FmMenuItem-1ff2c242.css +0 -1
- package/dist/federation/FmProgressIndicator-f275f227.css +0 -1
- package/dist/federation/FmProgressIndicator.vue_vue_type_style_index_0_lang-54b663d1.js +0 -1
- package/dist/federation/FmSelect.vue_vue_type_script_setup_true_lang-e44b1c3e.js +0 -1
- package/dist/federation/FmSnackbar-1bbe14e3.css +0 -1
- package/dist/federation/FmStepper.vue_vue_type_script_setup_true_lang-28a3c5d6.js +0 -1
- package/dist/federation/FmTab-547e6312.css +0 -1
- package/dist/federation/FmTextField.vue_vue_type_style_index_0_lang-534a781c.js +0 -1
- package/dist/federation/FmTimeInput.vue_vue_type_style_index_0_lang-f44318f2.js +0 -1
- package/dist/federation/FmTimePicker.vue_vue_type_script_setup_true_lang-b5de36fa.js +0 -1
- package/dist/federation/FmTooltip.vue_vue_type_script_setup_true_lang-ca997db3.js +0 -1
- package/dist/federation/__federation_expose_FmBreadcrumb-633ec8f4.js +0 -1
- package/dist/federation/__federation_expose_FmButton-a5e2a51f.js +0 -9
- package/dist/federation/__federation_expose_FmButtonGroup-2f939b41.js +0 -1
- package/dist/federation/__federation_expose_FmCard-1c7738cd.js +0 -1
- package/dist/federation/__federation_expose_FmCardActions-05e2e004.js +0 -1
- package/dist/federation/__federation_expose_FmDatePicker-402fd49b.js +0 -1
- package/dist/federation/__federation_expose_FmDateRangePicker-67f5732f.js +0 -1
- package/dist/federation/__federation_expose_FmDialog-b9532ef0.js +0 -1
- package/dist/federation/__federation_expose_FmField-abbdd405.js +0 -1
- package/dist/federation/__federation_expose_FmForm-fb68dbb5.js +0 -1
- package/dist/federation/__federation_expose_FmIcon-5f115b01.js +0 -1
- package/dist/federation/__federation_expose_FmLineChart-aeb2b831.js +0 -1
- package/dist/federation/__federation_expose_FmListItem-ce3cb629.js +0 -1
- package/dist/federation/__federation_expose_FmMenu-74c3cd63.js +0 -1
- package/dist/federation/__federation_expose_FmMenuDeprecated-e00c6927.js +0 -1
- package/dist/federation/__federation_expose_FmMenuHeader-2d25e64e.js +0 -1
- package/dist/federation/__federation_expose_FmMenuItem-41a59b64.js +0 -1
- package/dist/federation/__federation_expose_FmProgressIndicator-22e554b8.js +0 -1
- package/dist/federation/__federation_expose_FmRadioGroup-dedd8076.js +0 -1
- package/dist/federation/__federation_expose_FmSnackbar-abeb97b1.js +0 -1
- package/dist/federation/__federation_expose_FmStepper-8f080712.js +0 -1
- package/dist/federation/__federation_expose_FmStepperField-978d9248.js +0 -1
- package/dist/federation/__federation_expose_FmSwitch-b47dde9c.js +0 -1
- package/dist/federation/__federation_expose_FmTab-13f768b6.js +0 -1
- package/dist/federation/__federation_expose_FmTable-12eb38a9.js +0 -1
- package/dist/federation/__federation_expose_FmTabs-d76cc0dc.js +0 -1
- package/dist/federation/__federation_expose_FmTimePicker-766e0af5.js +0 -1
- package/dist/federation/dayjs.min-5433e12a.js +0 -1
- package/dist/federation/dialog-plugin-fa9a753b.js +0 -1
- package/dist/federation/floating-ui.vue.esm-ba6cbcbc.js +0 -1
- package/dist/federation/index-9483053f.css +0 -1
- package/dist/federation/index-9e7ee072.js +0 -12
- package/dist/federation/provider-keys-24913f12.js +0 -1
- /package/dist/{demo/Badge.vue.d.ts → components/snackbar/FmSnackbarToast.vue.d.ts} +0 -0
- /package/dist/federation/{__federation_fn_import-f464e9d7.js → __federation_fn_import-68bd0d37.js} +0 -0
|
@@ -1,29 +1,36 @@
|
|
|
1
|
-
var Hy=Object.defineProperty;var jy=(ie,l,Ue)=>l in ie?Hy(ie,l,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):ie[l]=Ue;var F=(ie,l,Ue)=>(jy(ie,typeof l!="symbol"?l+"":l,Ue),Ue);(function(ie,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router"],l):(ie=typeof globalThis<"u"?globalThis:ie||self,l(ie["feedmepos-ui-library"]={},ie.Vue,ie.VueRouter))})(this,function(ie,l,Ue){var mo;"use strict";const Wy="",Ti={directive:"wave",color:"currentColor",initialOpacity:.2,finalOpacity:.1,duration:.4,dissolveDuration:.15,easing:"ease-out",cancellationPeriod:75,trigger:"auto",tagName:"div"},ma=t=>"config"in t&&"globalProperties"in t.config,ba=t=>{let e;return t==="vue2"?e=!1:t==="vue3"?e=!0:e=ma(t),e?{mounted:"mounted",updated:"updated"}:{mounted:"inserted",updated:"componentUpdated"}},zi=t=>typeof t=="string"&&t!=="auto",Hi=(t,e)=>{t.dataset.vWaveBoundary=zi(e)?e:"true"},ya=({borderTopLeftRadius:t,borderTopRightRadius:e,borderBottomLeftRadius:n,borderBottomRightRadius:o},i)=>{const s=document.createElement(i);return s.style.top="0",s.style.left="0",s.style.width="100%",s.style.height="100%",s.style.display="block",s.style.position="absolute",s.style.borderRadius=`${t} ${e} ${o} ${n}`,s.style.overflow="hidden",s.style.pointerEvents="none",s.style.webkitMaskImage="-webkit-radial-gradient(white, black)",s},_a=(t,e,n,o)=>{const i=document.createElement("div");return i.style.position="absolute",i.style.width=`${n}px`,i.style.height=`${n}px`,i.style.top=`${e}px`,i.style.left=`${t}px`,i.style.background=o.color,i.style.borderRadius="50%",i.style.opacity=`${o.initialOpacity}`,i.style.transform="translate(-50%,-50%) scale(0)",i.style.transition=`transform ${o.duration}s ${o.easing}, opacity ${o.duration}s ${o.easing}`,i};function bn(t,e,n,o){const i=t-n,s=e-o;return Math.sqrt(i*i+s*s)}function xa(t,e,{width:n,height:o}){const i=bn(t,e,0,0),s=bn(t,e,n,0),r=bn(t,e,0,o),a=bn(t,e,n,o);return Math.max(i,s,r,a)}const wa=({x:t,y:e},{top:n,left:o})=>({x:t-o,y:e-n}),yo="vWaveCountInternal";function Ca(t){const e=_o(t);ji(t,e+1)}function ka(t){const e=_o(t);ji(t,e-1)}function ji(t,e){t.dataset[yo]=e.toString()}function _o(t){var e;return parseInt((e=t.dataset[yo])!==null&&e!==void 0?e:"0",10)}function Sa(t){delete t.dataset[yo]}const xo=(t,e,n)=>{const o=e.getBoundingClientRect(),i=window.getComputedStyle(e),{x:s,y:r}=wa(t,o),a=2.05*xa(s,r,o),c=ya(i,n.tagName),d=_a(s,r,a,n);Ca(e);let u="";i.position==="static"&&(e.style.position&&(u=e.style.position),e.style.position="relative"),c.appendChild(d),e.appendChild(c);let f=!1;const p=b=>{typeof b<"u"&&(document.removeEventListener("pointerup",p),document.removeEventListener("pointercancel",p)),f?h():f=!0},h=()=>{d.style.transition=`opacity ${n.dissolveDuration}s linear`,d.style.opacity="0",setTimeout(()=>{c.remove(),ka(e),_o(e)===0&&(Sa(e),e.style.position=u)},n.dissolveDuration*1e3)};document.addEventListener("pointerup",p),document.addEventListener("pointercancel",p);const g=setTimeout(()=>{document.removeEventListener("pointercancel",m),requestAnimationFrame(()=>{d.style.transform="translate(-50%,-50%) scale(1)",d.style.opacity=`${n.finalOpacity}`,setTimeout(()=>p(),n.duration*1e3)})},n.cancellationPeriod),m=()=>{clearTimeout(g),c.remove(),document.removeEventListener("pointerup",p),document.removeEventListener("pointercancel",p),document.removeEventListener("pointercancel",m)};document.addEventListener("pointercancel",m)},At=new WeakMap,Wi=(t={},e="vue3")=>{const n=Object.assign(Object.assign({},Ti),t),o=ba(e),i=a=>{const c=a.currentTarget.dataset.vWaveTrigger;document.querySelectorAll(`[data-v-wave-boundary="${c}"]`).forEach(u=>xo(a,u,Object.assign(Object.assign({},n),At.get(u))))},s={[o.mounted](a,{value:c={}}){var d;At.set(a,c),Hi(a,(d=c&&c.trigger)!==null&&d!==void 0?d:n.trigger),a.addEventListener("pointerdown",u=>{if(At.get(a)===!1)return;const f=Object.assign(Object.assign({},n),At.get(a));if(f.trigger===!1)return xo(u,a,f);if(zi(f.trigger))return;const p=a.querySelector('[data-v-wave-trigger="true"]');!p&&f.trigger===!0||p&&!u.composedPath().includes(p)||xo(u,a,f)})},[o.updated](a,{value:c={}}){var d;At.set(a,c),Hi(a,(d=c&&c.trigger)!==null&&d!==void 0?d:n.trigger)}},r={[o.mounted](a,{arg:c="true"}){a.dataset.vWaveTrigger=c,c!=="true"&&a.addEventListener("pointerdown",i)},[o.updated](a,{arg:c="true"}){a.dataset.vWaveTrigger=c,c==="true"?a.removeEventListener("pointerdown",i):a.addEventListener("pointerdown",i)}};return{wave:s,vWave:s,waveTrigger:r,vWaveTrigger:r}},va={install(t,e={}){if(this.installed)return;this.installed=!0;const n=Object.assign(Object.assign({},Ti),e),{vWave:o,vWaveTrigger:i}=Wi(n,t);t.directive(n.directive,o),t.directive(`${n.directive}-trigger`,i)},installed:!1,createLocalWaveDirective:Wi},Ma={class:"gap-8 inline-flex items-center relative select-none"},Ea={key:0,class:"fm-typo-body-sm-400 justify-center"},Da=l.defineComponent({__name:"FmBadge",props:{inline:{type:Boolean,default:!1},value:{default:null},variant:{default:"neutral"}},setup(t){const e=t,n=l.computed(()=>e.value&&e.value>99?"99+":e.value);return(o,i)=>(l.openBlock(),l.createElementBlock("div",Ma,[l.renderSlot(o.$slots,"default",{},void 0,!0),l.createElementVNode("div",{class:l.normalizeClass(["fm-badge",`fm-badge--${o.variant}`,{absolute:!o.inline,"top-0 right-0 w-[6px] h-[6px]":e.value===null,"top-[-2px] right-[-4px] w-[16px] h-[16px]":e.value&&e.value<10,"top-[-2px] right-[-12px] px-4 h-[20px] min-w-[24px]":e.value&&e.value>10&&e.value<100,"top-[-2px] right-[-20px] px-4 h-[20px] min-w-[24px]":e.value&&e.value>99}])},[e.value!==null?(l.openBlock(),l.createElementBlock("span",Ea,l.toDisplayString(n.value),1)):l.createCommentVNode("",!0)],2)]))}}),Yy="",Q=(t,e)=>{const n=t.__vccOpts||t;for(const[o,i]of e)n[o]=i;return n},yn=Q(Da,[["__scopeId","data-v-02018628"]]),Va={class:"content-start flex flex-wrap gap-0 items-start max-w-full p-0"},Ra=["onMouseenter"],Fa={key:0},Ba=l.defineComponent({__name:"FmBreadcrumb",props:{items:{}},setup(t){const e=Ue.useRoute(),n=Ue.useRouter();l.onMounted(async()=>{await n.isReady();const g=o.items.findIndex(m=>m.route==e.path);g!=-1&&!o.items[g].disabled&&(i.value=g)});const o=t,i=l.ref(-1),s=l.ref(-1),r=l.ref(" / "),a=l.ref("... /"),c=l.ref(!1),d=g=>i.value===g?"selected":s.value===g?"hovered":o.items[g].disabled?"disabled":"default",u=g=>{o.items[g].disabled||(i.value=g)},f=g=>g!=o.items.length-1,p=g=>!c.value&&o.items.length>5&&g>=2&&g<o.items.length-2,h=()=>{c.value=!c.value};return(g,m)=>{const b=l.resolveComponent("RouterLink");return l.openBlock(),l.createElementBlock("nav",null,[l.createElementVNode("ul",Va,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(g.items,(x,y)=>(l.openBlock(),l.createElementBlock("li",{key:y,class:"empty:hidden flex gap-2 items-center justify-center pl-2 pr-0 py-1",onMouseenter:w=>s.value=y,onMouseleave:m[0]||(m[0]=w=>s.value=-1)},[p(y)?y===3&&!c.value?(l.openBlock(),l.createElementBlock("a",{key:1,onClick:h},l.toDisplayString(a.value),1)):l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(b,{key:0,class:l.normalizeClass(d(y)),to:x.disabled?"":x.route,onClick:w=>u(y)},{default:l.withCtx(()=>[l.createElementVNode("span",null,l.toDisplayString(x.label),1),f(y)?(l.openBlock(),l.createElementBlock("span",Fa,l.toDisplayString(r.value),1)):l.createCommentVNode("",!0)]),_:2},1032,["class","to","onClick"]))],40,Ra))),128))])])}}}),Gy="",$a=/^(#)((?:[A-Fa-f0-9]{3}){1,2})$/,Pa=/^rgb[(](?:\s*0*(?:\d\d?(?:\.\d+)?(?:\s*%)?|\.\d+\s*%|100(?:\.0*)?\s*%|(?:1\d\d|2[0-4]\d|25[0-5])(?:\.\d+)?)\s*(?:,(?![)])|(?=[)]))){3}[)]$/,Aa=/^^rgba[(](?:\s*0*(?:\d\d?(?:\.\d+)?(?:\s*%)?|\.\d+\s*%|100(?:\.0*)?\s*%|(?:1\d\d|2[0-4]\d|25[0-5])(?:\.\d+)?)\s*,){3}\s*0*(?:\.\d+|1(?:\.0*)?)\s*[)]$/,Oa=/^hsl[(]\s*0*(?:[12]?\d{1,2}|3(?:[0-5]\d|60))\s*(?:\s*,\s*0*(?:\d\d?(?:\.\d+)?\s*%|\.\d+\s*%|100(?:\.0*)?\s*%)){2}\s*[)]$/,Na=/^hsla[(]\s*0*(?:[12]?\d{1,2}|3(?:[0-5]\d|60))\s*(?:\s*,\s*0*(?:\d\d?(?:\.\d+)?\s*%|\.\d+\s*%|100(?:\.0*)?\s*%)){2}\s*,\s*0*(?:\.\d+|1(?:\.0*)?)\s*[)]$/;function wo(t){return[$a,Pa,Aa,Oa,Na].some(e=>e.test(t))}const Ia=l.defineComponent({__name:"FmIcon",props:{name:{type:String,required:!0},color:{type:String,default:"black"},outline:{type:Boolean,default:!1},size:{type:String,default:"md"}},setup(t){const e=t,n=l.computed(()=>{const s=[],r={};return s.push(o()),s.push(i()),wo(e.color)?r.color=e.color:s.push(`text-fm-color-${e.color}`),{class:s.join(" "),style:r}});function o(){return`fm-icon--${e.outline?"outlined":"rounded"}`}function i(){return`fm-icon--${e.size}`}return(s,r)=>(l.openBlock(),l.createElementBlock("span",l.mergeProps(n.value,{class:"fm-icon"}),l.toDisplayString(e.name),17))}}),Uy="",L=Q(Ia,[["__scopeId","data-v-fd802d37"]]),La={class:"relative"},Ta={class:"absolute h-full left-0 top-0 w-full",viewBox:"0 0 18 18"},za=["stroke-width"];var Yi=(t=>(t[t.md=2.5]="md",t[t.lg=2]="lg",t[t.xl=1.75]="xl",t))(Yi||{});const Ha=l.defineComponent({__name:"FmProgress",props:{size:{default:"md"},color:{default:"primary"}},setup(t){return(e,n)=>(l.openBlock(),l.createElementBlock("div",La,[l.createElementVNode("div",{class:l.normalizeClass(`fm-progress--${e.size} text-fm-color-${e.color}`)},[(l.openBlock(),l.createElementBlock("svg",Ta,[l.createElementVNode("circle",{class:"fm-progress--indetermindate","stroke-width":Yi[e.size],fill:"none",stroke:"currentColor",cx:"50%",cy:"50%",r:7.75,"stroke-linecap":"round","stroke-dasharray":"10 200","stroke-dashoffset":"0"},null,8,za)]))],2)]))}}),qy="",ja=Q(Ha,[["__scopeId","data-v-ef86ac9c"]]),Wa=["disabled","type"],Ya={class:"-translate-x-1/2 -translate-y-1/2 absolute left-1/2 top-1/2 transform"},Ga=l.defineComponent({__name:"FmButton",props:{variant:{default:"primary"},label:{default:""},icon:{default:""},size:{default:"lg"},disabled:{type:Boolean,default:!1},iconColor:{default:""},type:{default:"button"},iconPosition:{default:"prepend"},prependIcon:{default:""},appendIcon:{default:""},loading:{type:Boolean,default:!1}},setup(t){const e=t,n=l.ref(!1),o=l.computed(()=>`${i[e.variant]} ${e.disabled?"cursor-not-allowed":"cursor-pointer"}`),i={primary:"bg-fm-color-primary text-fm-color-typo-white rounded-lg",secondary:"bg-transparent rounded-lg border-1 border-fm-color-neutral-black",destructive:"bg-fm-color-system-error-300 text-fm-color-white text-fm-color-typo-white rounded-lg",tertiary:"bg-transparent text-fm-color-typo-primary rounded-lg",plain:"bg-transparent text-fm-color-primary",fab:"bg-fm-color-primary text-fm-color-white rounded-full text-fm-color-typo-white rounded-xxxl min-h-56 min-w-56 !p-16"};function s(r){n.value=r}return(r,a)=>{const c=l.resolveDirective("wave");return l.withDirectives((l.openBlock(),l.createElementBlock("button",{ref:"buttonEl",class:l.normalizeClass(`
|
|
1
|
+
var uw=Object.defineProperty;var fw=(le,s,at)=>s in le?uw(le,s,{enumerable:!0,configurable:!0,writable:!0,value:at}):le[s]=at;var I=(le,s,at)=>(fw(le,typeof s!="symbol"?s+"":s,at),at);(function(le,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router"],s):(le=typeof globalThis<"u"?globalThis:le||self,s(le["feedmepos-ui-library"]={},le.Vue,le.VueRouter))})(this,function(le,s,at){var ci;"use strict";const hw="",ar={directive:"wave",color:"currentColor",initialOpacity:.2,finalOpacity:.1,duration:.4,dissolveDuration:.15,easing:"ease-out",cancellationPeriod:75,trigger:"auto",tagName:"div"},Tc=t=>"config"in t&&"globalProperties"in t.config,Lc=t=>{let e;return t==="vue2"?e=!1:t==="vue3"?e=!0:e=Tc(t),e?{mounted:"mounted",updated:"updated"}:{mounted:"inserted",updated:"componentUpdated"}},dr=t=>typeof t=="string"&&t!=="auto",cr=(t,e)=>{t.dataset.vWaveBoundary=dr(e)?e:"true"},zc=({borderTopLeftRadius:t,borderTopRightRadius:e,borderBottomLeftRadius:n,borderBottomRightRadius:o},i)=>{const r=document.createElement(i);return r.style.top="0",r.style.left="0",r.style.width="100%",r.style.height="100%",r.style.display="block",r.style.position="absolute",r.style.borderRadius=`${t} ${e} ${o} ${n}`,r.style.overflow="hidden",r.style.pointerEvents="none",r.style.webkitMaskImage="-webkit-radial-gradient(white, black)",r},Hc=(t,e,n,o)=>{const i=document.createElement("div");return i.style.position="absolute",i.style.width=`${n}px`,i.style.height=`${n}px`,i.style.top=`${e}px`,i.style.left=`${t}px`,i.style.background=o.color,i.style.borderRadius="50%",i.style.opacity=`${o.initialOpacity}`,i.style.transform="translate(-50%,-50%) scale(0)",i.style.transition=`transform ${o.duration}s ${o.easing}, opacity ${o.duration}s ${o.easing}`,i};function Yn(t,e,n,o){const i=t-n,r=e-o;return Math.sqrt(i*i+r*r)}function jc(t,e,{width:n,height:o}){const i=Yn(t,e,0,0),r=Yn(t,e,n,0),l=Yn(t,e,0,o),a=Yn(t,e,n,o);return Math.max(i,r,l,a)}const Wc=({x:t,y:e},{top:n,left:o})=>({x:t-o,y:e-n}),ui="vWaveCountInternal";function Yc(t){const e=fi(t);ur(t,e+1)}function Uc(t){const e=fi(t);ur(t,e-1)}function ur(t,e){t.dataset[ui]=e.toString()}function fi(t){var e;return parseInt((e=t.dataset[ui])!==null&&e!==void 0?e:"0",10)}function Gc(t){delete t.dataset[ui]}const hi=(t,e,n)=>{const o=e.getBoundingClientRect(),i=window.getComputedStyle(e),{x:r,y:l}=Wc(t,o),a=2.05*jc(r,l,o),d=zc(i,n.tagName),c=Hc(r,l,a,n);Yc(e);let u="";i.position==="static"&&(e.style.position&&(u=e.style.position),e.style.position="relative"),d.appendChild(c),e.appendChild(d);let f=!1;const h=b=>{typeof b<"u"&&(document.removeEventListener("pointerup",h),document.removeEventListener("pointercancel",h)),f?p():f=!0},p=()=>{c.style.transition=`opacity ${n.dissolveDuration}s linear`,c.style.opacity="0",setTimeout(()=>{d.remove(),Uc(e),fi(e)===0&&(Gc(e),e.style.position=u)},n.dissolveDuration*1e3)};document.addEventListener("pointerup",h),document.addEventListener("pointercancel",h);const m=setTimeout(()=>{document.removeEventListener("pointercancel",g),requestAnimationFrame(()=>{c.style.transform="translate(-50%,-50%) scale(1)",c.style.opacity=`${n.finalOpacity}`,setTimeout(()=>h(),n.duration*1e3)})},n.cancellationPeriod),g=()=>{clearTimeout(m),d.remove(),document.removeEventListener("pointerup",h),document.removeEventListener("pointercancel",h),document.removeEventListener("pointercancel",g)};document.addEventListener("pointercancel",g)},Jt=new WeakMap,fr=(t={},e="vue3")=>{const n=Object.assign(Object.assign({},ar),t),o=Lc(e),i=a=>{const d=a.currentTarget.dataset.vWaveTrigger;document.querySelectorAll(`[data-v-wave-boundary="${d}"]`).forEach(u=>hi(a,u,Object.assign(Object.assign({},n),Jt.get(u))))},r={[o.mounted](a,{value:d={}}){var c;Jt.set(a,d),cr(a,(c=d&&d.trigger)!==null&&c!==void 0?c:n.trigger),a.addEventListener("pointerdown",u=>{if(Jt.get(a)===!1)return;const f=Object.assign(Object.assign({},n),Jt.get(a));if(f.trigger===!1)return hi(u,a,f);if(dr(f.trigger))return;const h=a.querySelector('[data-v-wave-trigger="true"]');!h&&f.trigger===!0||h&&!u.composedPath().includes(h)||hi(u,a,f)})},[o.updated](a,{value:d={}}){var c;Jt.set(a,d),cr(a,(c=d&&d.trigger)!==null&&c!==void 0?c:n.trigger)}},l={[o.mounted](a,{arg:d="true"}){a.dataset.vWaveTrigger=d,d!=="true"&&a.addEventListener("pointerdown",i)},[o.updated](a,{arg:d="true"}){a.dataset.vWaveTrigger=d,d==="true"?a.removeEventListener("pointerdown",i):a.addEventListener("pointerdown",i)}};return{wave:r,vWave:r,waveTrigger:l,vWaveTrigger:l}},qc={install(t,e={}){if(this.installed)return;this.installed=!0;const n=Object.assign(Object.assign({},ar),e),{vWave:o,vWaveTrigger:i}=fr(n,t);t.directive(n.directive,o),t.directive(`${n.directive}-trigger`,i)},installed:!1,createLocalWaveDirective:fr},Xc={class:"gap-8 inline-flex items-center relative select-none"},Kc={key:0,class:"fm-typo-body-sm-400 justify-center"},Zc=s.defineComponent({__name:"FmBadge",props:{inline:{type:Boolean,default:!1},value:{default:null},variant:{default:"neutral"}},setup(t){const e=t,n=s.computed(()=>e.value&&e.value>99?"99+":e.value);return(o,i)=>(s.openBlock(),s.createElementBlock("div",Xc,[s.renderSlot(o.$slots,"default",{},void 0,!0),s.createElementVNode("div",{class:s.normalizeClass(["fm-badge",`fm-badge--${o.variant}`,{absolute:!o.inline,"top-0 right-0 w-[6px] h-[6px]":e.value===null,"top-[-2px] right-[-4px] w-[16px] h-[16px]":e.value&&e.value<10,"top-[-2px] right-[-12px] px-4 h-[20px] min-w-[24px]":e.value&&e.value>10&&e.value<100,"top-[-2px] right-[-20px] px-4 h-[20px] min-w-[24px]":e.value&&e.value>99}])},[e.value!==null?(s.openBlock(),s.createElementBlock("span",Kc,s.toDisplayString(n.value),1)):s.createCommentVNode("",!0)],2)]))}}),pw="",Z=(t,e)=>{const n=t.__vccOpts||t;for(const[o,i]of e)n[o]=i;return n},Qt=Z(Zc,[["__scopeId","data-v-02018628"]]);function Jc(){var t;return(t=s.getCurrentInstance())==null?void 0:t.emit}function X(t,e){const n=Jc(),o=s.ref(t[e]);return s.watch(()=>t[e],()=>{o.value=t[e]}),s.computed({get(){return o.value},set(r){o.value=r,n==null||n(`update:${e}`,r)}})}const Qc={class:"fm-bottom-sheet"},eu={class:"flex fm-typo-title-sm-700 items-center justify-between text-fm-color-typo-primary"},tu={key:0},nu={class:"overflow-y-auto"},ou={class:"flex gap-8 items-center"},iu=s.defineComponent({__name:"FmBottomSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const e=t,n=s.ref(null),o=X(e,"modelValue"),i=r=>{e.dismissAway&&n.value&&r.target===n.value&&(o.value=!1)};return(r,l)=>(s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("div",{onClick:l[0]||(l[0]=a=>o.value=!0)},[s.renderSlot(r.$slots,"bottom-sheet-button",{},void 0,!0)]),(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[s.createVNode(s.Transition,null,{default:s.withCtx(()=>[s.unref(o)?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:n,class:"fm-bottom-sheet--container",onClick:l[1]||(l[1]=a=>i(a))},[s.createVNode(s.Transition,{name:"slide",appear:""},{default:s.withCtx(()=>[s.createElementVNode("div",Qc,[s.createElementVNode("div",eu,[s.renderSlot(r.$slots,"bottom-sheet-header",{},()=>[r.header?(s.openBlock(),s.createElementBlock("div",tu,s.toDisplayString(r.header),1)):s.createCommentVNode("",!0)],!0)]),s.createElementVNode("div",nu,[s.renderSlot(r.$slots,"default",{},void 0,!0)]),s.createElementVNode("div",ou,[s.renderSlot(r.$slots,"bottom-sheet-footer",{},void 0,!0)])])]),_:3})],512)):s.createCommentVNode("",!0)]),_:3})]))]))}}),mw="",hr=Z(iu,[["__scopeId","data-v-1f3a2be1"]]),su={class:"content-start flex flex-wrap gap-0 items-start max-w-full p-0"},ru=["onMouseenter"],lu={key:0},au=s.defineComponent({__name:"FmBreadcrumb",props:{items:{}},setup(t){const e=at.useRoute(),n=at.useRouter();s.onMounted(async()=>{await n.isReady();const m=o.items.findIndex(g=>g.route==e.path);m!=-1&&!o.items[m].disabled&&(i.value=m)});const o=t,i=s.ref(-1),r=s.ref(-1),l=s.ref(" / "),a=s.ref("... /"),d=s.ref(!1),c=m=>i.value===m?"selected":r.value===m?"hovered":o.items[m].disabled?"disabled":"default",u=m=>{o.items[m].disabled||(i.value=m)},f=m=>m!=o.items.length-1,h=m=>!d.value&&o.items.length>5&&m>=2&&m<o.items.length-2,p=()=>{d.value=!d.value};return(m,g)=>{const b=s.resolveComponent("RouterLink");return s.openBlock(),s.createElementBlock("nav",null,[s.createElementVNode("ul",su,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(m.items,(y,$)=>(s.openBlock(),s.createElementBlock("li",{key:$,class:"empty:hidden flex gap-2 items-center justify-center pl-2 pr-0 py-1",onMouseenter:k=>r.value=$,onMouseleave:g[0]||(g[0]=k=>r.value=-1)},[h($)?$===3&&!d.value?(s.openBlock(),s.createElementBlock("a",{key:1,onClick:p},s.toDisplayString(a.value),1)):s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(b,{key:0,class:s.normalizeClass(c($)),to:y.disabled?"":y.route,onClick:k=>u($)},{default:s.withCtx(()=>[s.createElementVNode("span",null,s.toDisplayString(y.label),1),f($)?(s.openBlock(),s.createElementBlock("span",lu,s.toDisplayString(l.value),1)):s.createCommentVNode("",!0)]),_:2},1032,["class","to","onClick"]))],40,ru))),128))])])}}}),gw="",du=/^(#)((?:[A-Fa-f0-9]{3}){1,2})$/,cu=/^rgb[(](?:\s*0*(?:\d\d?(?:\.\d+)?(?:\s*%)?|\.\d+\s*%|100(?:\.0*)?\s*%|(?:1\d\d|2[0-4]\d|25[0-5])(?:\.\d+)?)\s*(?:,(?![)])|(?=[)]))){3}[)]$/,uu=/^^rgba[(](?:\s*0*(?:\d\d?(?:\.\d+)?(?:\s*%)?|\.\d+\s*%|100(?:\.0*)?\s*%|(?:1\d\d|2[0-4]\d|25[0-5])(?:\.\d+)?)\s*,){3}\s*0*(?:\.\d+|1(?:\.0*)?)\s*[)]$/,fu=/^hsl[(]\s*0*(?:[12]?\d{1,2}|3(?:[0-5]\d|60))\s*(?:\s*,\s*0*(?:\d\d?(?:\.\d+)?\s*%|\.\d+\s*%|100(?:\.0*)?\s*%)){2}\s*[)]$/,hu=/^hsla[(]\s*0*(?:[12]?\d{1,2}|3(?:[0-5]\d|60))\s*(?:\s*,\s*0*(?:\d\d?(?:\.\d+)?\s*%|\.\d+\s*%|100(?:\.0*)?\s*%)){2}\s*,\s*0*(?:\.\d+|1(?:\.0*)?)\s*[)]$/;function en(t){return[du,cu,uu,fu,hu].some(e=>e.test(t))}function pi(t,e){const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(n)return`rgba(${parseInt(n[1],16)},${parseInt(n[2],16)},${parseInt(n[3],16)},${e})`;if(t.startsWith("rgb")){const o=t.split(",");if(o.length===3)return[...o.slice(0,2),o[2].replace(")",`,${e})`)].join(",");if(o.length===4)return[...o.slice(0,3),`${e})`].join(",")}return""}function tn(t){const e=getComputedStyle(document.documentElement).getPropertyValue(`--${t}`)||t;return e.startsWith("rgb")||e.startsWith("#")?e:null}const pu=s.defineComponent({__name:"FmIcon",props:{name:{type:String,required:!0},color:{type:String,default:"black"},outline:{type:Boolean,default:!1},size:{type:String,default:"md"}},setup(t){const e=t,n=s.computed(()=>{const r=[],l={};return r.push(o()),r.push(i()),en(e.color)?l.color=e.color:r.push(`text-fm-color-${e.color}`),{class:r.join(" "),style:l}});function o(){return`fm-icon--${e.outline?"outlined":"rounded"}`}function i(){return`fm-icon--${e.size}`}return(r,l)=>(s.openBlock(),s.createElementBlock("span",s.mergeProps(n.value,{class:"fm-icon"}),s.toDisplayString(e.name),17))}}),bw="",z=Z(pu,[["__scopeId","data-v-fd802d37"]]);function Un(t){return typeof t=="number"?t:typeof t=="string"&&isFinite(+t)?+t:null}const mu={class:"relative"},gu=["stroke-width"],bu=["stroke-width","stroke-dashoffset"],yu=["stroke-width","stroke-dashoffset"],$u={key:0};var Gn=(t=>(t[t.md=2.5]="md",t[t.lg=2]="lg",t[t.xl=1.75]="xl",t[t.xxl=1.5]="xxl",t))(Gn||{});const _u=s.defineComponent({__name:"FmCircularProgress",props:{currentStep:{default:void 0},totalSteps:{default:void 0},indeterminate:{type:Boolean,default:void 0},size:{default:"xxl"},color:{default:"primary"}},setup(t){const e=t,n=s.computed(()=>{const r=Un(e.currentStep),l=Un(e.totalSteps),a=e.indeterminate??(r===null||l===null);return{currentStep:a?null:Math.min(r,l),totalSteps:l,indeterminate:a}}),o=s.computed(()=>{const r=Un(e.currentStep),l=Un(e.totalSteps);if(typeof r!="number"||typeof l!="number")return"10 200";const a=48,d=Math.min(1,r/l);return isNaN(d)?"0 200":`${d*a} 200`}),i=s.computed(()=>{const r=new Array,l={};return e.color?(en(e.color)?l.color=e.color:r.push(`text-fm-color-${e.color}`),{class:r.join(" "),style:l}):{class:r.join(" "),style:l}});return(r,l)=>(s.openBlock(),s.createElementBlock("div",mu,[s.createElementVNode("div",{class:s.normalizeClass(["fm-progress fm-typo-body-sm-400 flex items-center justify-center",{"fm-progress--indeterminate":n.value.indeterminate,[`fm-progress--${r.size}`]:!0}])},[(s.openBlock(),s.createElementBlock("svg",{class:s.normalizeClass(["absolute h-full left-0 top-0 w-full",i.value.class]),style:s.normalizeStyle(i.value.style),viewBox:"0 0 18 18"},[n.value.indeterminate?(s.openBlock(),s.createElementBlock("circle",{key:0,class:"spinner","stroke-width":Gn[r.size],fill:"none",stroke:"currentColor",cx:"50%",cy:"50%",r:7.75,"stroke-linecap":"round","stroke-dasharray":"10 200","stroke-dashoffset":"0"},null,8,gu)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createElementVNode("circle",{"stroke-width":Gn[r.size],fill:"none",stroke:"var(--fm-color-neutral-gray-100)",cx:"50%",cy:"50%",r:7.75,"stroke-linecap":"round","stroke-dashoffset":r.currentStep===0?"10px":"0",style:s.normalizeStyle({transform:"rotate(270deg)",strokeDasharray:"100 200",transformOrigin:"center",transition:"stroke-dasharray ease-out 250ms"})},null,12,bu),s.createElementVNode("circle",{"stroke-width":Gn[r.size],fill:"none",stroke:"currentColor",cx:"50%",cy:"50%",r:7.75,"stroke-linecap":"round","stroke-dashoffset":r.currentStep===0?"10px":"0",style:s.normalizeStyle({transform:"rotate(270deg)",strokeDasharray:o.value,transformOrigin:"center",transition:"stroke-dasharray ease-out 250ms"})},null,12,yu)],64))],6)),!n.value.indeterminate&&r.size==="xxl"?(s.openBlock(),s.createElementBlock("div",$u,s.toDisplayString(n.value.currentStep)+" of "+s.toDisplayString(n.value.totalSteps),1)):s.createCommentVNode("",!0)],2)]))}}),yw="",qn=Z(_u,[["__scopeId","data-v-c8665c2d"]]),wu=["disabled","type"],xu={class:"-translate-x-1/2 -translate-y-1/2 absolute left-1/2 top-1/2 transform"},Cu=s.defineComponent({__name:"FmButton",props:{variant:{default:"primary"},label:{default:""},icon:{default:""},size:{default:"lg"},disabled:{type:Boolean,default:!1},iconColor:{default:""},type:{default:"button"},iconPosition:{default:"prepend"},prependIcon:{default:""},appendIcon:{default:""},loading:{type:Boolean,default:!1}},setup(t){const e=t,n=s.ref(!1),o=s.computed(()=>`${i[e.variant]} ${e.disabled?"cursor-not-allowed":"cursor-pointer"}`),i={primary:"bg-fm-color-primary text-fm-color-typo-white rounded-lg",secondary:"bg-transparent rounded-lg border-1 border-fm-color-neutral-black",destructive:"bg-fm-color-system-error-300 text-fm-color-white text-fm-color-typo-white rounded-lg",tertiary:"bg-transparent text-fm-color-typo-primary rounded-lg",plain:"bg-transparent text-fm-color-primary",fab:"bg-fm-color-primary text-fm-color-white rounded-full text-fm-color-typo-white rounded-xxxl min-h-56 min-w-56 !p-16"};function r(l){n.value=l}return(l,a)=>{const d=s.resolveDirective("wave");return s.withDirectives((s.openBlock(),s.createElementBlock("button",{ref:"buttonEl",class:s.normalizeClass(`
|
|
2
2
|
fm-btn
|
|
3
3
|
${o.value}
|
|
4
|
-
fm-btn--${
|
|
5
|
-
${
|
|
6
|
-
fm-btn--${
|
|
7
|
-
${
|
|
8
|
-
${n.value&&
|
|
9
|
-
`),disabled:r.disabled,type:r.type,onMousedown:a[0]||(a[0]=()=>s(!0)),onMouseup:a[1]||(a[1]=()=>s(!1)),onMouseleave:a[2]||(a[2]=()=>s(!1))},[r.icon&&r.iconPosition==="prepend"||r.prependIcon?(l.openBlock(),l.createBlock(L,{key:0,class:l.normalizeClass({invisible:r.loading}),name:r.icon||r.prependIcon,outline:!n.value,color:r.disabled?"neutral-gray-200":r.iconColor??"",size:"md"},null,8,["class","name","outline","color"])):l.createCommentVNode("",!0),r.label?(l.openBlock(),l.createElementBlock("span",{key:1,class:l.normalizeClass(["fm-typo-body-lg-700",{invisible:r.loading}])},l.toDisplayString(r.label),3)):l.createCommentVNode("",!0),r.icon&&r.iconPosition==="append"||r.appendIcon?(l.openBlock(),l.createBlock(L,{key:2,class:l.normalizeClass({invisible:r.loading}),name:r.icon||r.appendIcon,outline:!n.value,color:r.disabled?"neutral-gray-200":r.iconColor??"",size:"md"},null,8,["class","name","outline","color"])):l.createCommentVNode("",!0),l.createElementVNode("div",Ya,[r.loading?(l.openBlock(),l.createBlock(ja,{key:0,size:"md",color:"neutral-gray-300"})):l.createCommentVNode("",!0)])],42,Wa)),[[c,!r.disabled&&!r.loading&&r.variant!=="plain"]])}}}),Xy="",fe=Q(Ga,[["__scopeId","data-v-ac44a4b8"]]),Ua={class:"bg-fm-color-neutral-white border-1 border-fm-color-neutral-gray-200 flex items-center overflow-hidden rounded-lg"},qa=["v-wave","disabled","onClick","onMousedown"],Xa=l.defineComponent({__name:"FmButtonGroup",props:{modelValue:{},disabled:{type:Boolean},items:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=d=>{o("update:modelValue",d)},s=l.ref(null),r=d=>{s.value=d},a=d=>d.disabled||n.disabled,c=d=>JSON.stringify(d)===JSON.stringify(n.modelValue);return(d,u)=>(l.openBlock(),l.createElementBlock("div",Ua,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(d.items,(f,p)=>(l.openBlock(),l.createElementBlock("button",{key:p,"v-wave":a(f),class:l.normalizeClass(["border-r flex gap-8 grow hover:bg-fm-color-neutral-gray-200 items-center justify-center last:border-r-0 px-[11px] py-[7px]",{"bg-fm-color-system-warning-100 hover:bg-fm-color-system-warning-100":c(f),"hover:bg-fm-color-neutral-white cursor-not-allowed":a(f)}]),disabled:a(f),onClick:h=>i(f),onMousedown:h=>r(f),onMouseup:u[0]||(u[0]=h=>r(null)),onMouseleave:u[1]||(u[1]=h=>r(null))},[f.icon?(l.openBlock(),l.createBlock(L,{key:0,name:f.icon,size:"md",color:a(f)?"neutral-gray-200":c(f)?"primary":"",outline:JSON.stringify(s.value)!==JSON.stringify(f)&&!c(f)},null,8,["name","color","outline"])):l.createCommentVNode("",!0),f.label?(l.openBlock(),l.createElementBlock("span",{key:1,class:l.normalizeClass(["fm-typo-body-lg-700",[a(f)?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"]])},l.toDisplayString(f.label),3)):l.createCommentVNode("",!0)],42,qa))),128))]))}}),Ka={class:"grow"},Gi=l.defineComponent({__name:"FmCardTitle",props:{padding:{type:String,default:"p-16"}},setup(t){return(e,n)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["fm-card-title",t.padding])},[l.createElementVNode("div",Ka,[l.renderSlot(e.$slots,"default")]),l.renderSlot(e.$slots,"actions")],2))}}),Za={class:"fm-typo-title-md-700 grow"},Ja=l.defineComponent({__name:"FmCard",props:{title:{type:String,default:void 0},variant:{type:String,default:"elevated"},horizontal:{type:Boolean,default:!1}},setup(t){const e=t,n=l.useSlots();return(o,i)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["flex-nowrap fm-card",`${t.variant==="elevated"?"fm-shadow-light-400":"border-1"} ${t.horizontal?"fm-card--horizontal":""}`])},[l.renderSlot(o.$slots,"header",{title:e.title},()=>[t.title||l.unref(n)["header-title"]||l.unref(n)["header-actions"]?(l.openBlock(),l.createBlock(Gi,{key:0},{actions:l.withCtx(()=>[l.renderSlot(o.$slots,"header-actions")]),default:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(o.$slots,"header-title",{title:e.title},()=>[l.createElementVNode("div",Za,l.toDisplayString(e.title),1)])])]),_:3})):l.createCommentVNode("",!0)]),l.renderSlot(o.$slots,"default"),l.renderSlot(o.$slots,"actions")],2))}}),Ky="",Qa=l.defineComponent({__name:"FmCardActions",props:{alignment:{type:String,default:"right"},padding:{type:String,default:"p-16"}},setup(t){const e=t,n=l.computed(()=>{switch(e.alignment){case"left":return"justify-start";case"right":return"justify-end";case"center":return"justify-center";default:return""}});return(o,i)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["fm-card-actions",`${n.value} ${t.padding}`])},[l.renderSlot(o.$slots,"default")],2))}}),ec=l.defineComponent({__name:"FmCardSection",props:{padding:{type:String,default:"p-16"}},setup(t){return(e,n)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["fm-card-section",t.padding])},[l.renderSlot(e.$slots,"default")],2))}}),Ui=l.defineComponent({__name:"FmChip",props:{label:{default:""},icon:{default:""},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},removable:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},compact:{type:Boolean,default:!1}},emits:["chip-closed"],setup(t,{emit:e}){const n=t,o=e,i=l.ref(!1),s=l.ref(!1);function r(d){n.selectable&&(s.value=d)}const a=()=>{!n.selectable||n.disabled||(i.value=!i.value)},c=()=>{n.disabled||o("chip-closed")};return l.onMounted(()=>{i.value=n.selected}),l.watch(()=>n.selected,()=>{i.value=n.selected}),(d,u)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["inline-flex rounded-md items-center gap-4 justify-center max-w-[200px]",i.value&&!d.disabled?"bg-fm-color-neutral-black":"bg-fm-color-neutral-gray-100",d.compact?"h-[22px] px-8":"h-[30px] px-8 py-4",{"bg-fm-color-neutral-gray-100 cursor-not-allowed":d.disabled,"cursor-pointer":d.selectable&&!d.disabled,"hover:bg-fm-color-opacity-sm":!i.value&&!d.disabled&&d.selectable}]),onClick:a,onMousedown:u[0]||(u[0]=()=>r(!0)),onMouseup:u[1]||(u[1]=()=>r(!1)),onMouseleave:u[2]||(u[2]=()=>r(!1))},[l.renderSlot(d.$slots,"default",{},()=>[d.icon?(l.openBlock(),l.createBlock(L,{key:0,name:d.icon,size:"sm",outline:!s.value&&!i.value,color:d.disabled?"neutral-gray-200":i.value?"neutral-white":"neutral-black"},null,8,["name","outline","color"])):l.createCommentVNode("",!0),d.label?(l.openBlock(),l.createElementBlock("div",{key:1,class:l.normalizeClass(["fm-typo-body-md-700 select-none text-ellipsis overflow-hidden whitespace-nowrap",d.disabled?"text-fm-color-typo-disabled":i.value?"text-fm-color-typo-white":"text-fm-color-typo-primary"])},l.toDisplayString(d.label),3)):l.createCommentVNode("",!0)]),d.removable?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["flex items-center justify-center rounded-xxxl",!i.value&&!d.disabled?"hover:bg-fm-color-opacity-sm":"",{"cursor-not-allowed":d.disabled,"cursor-pointer":d.selectable&&!d.disabled}]),onClick:c},[l.createVNode(L,{name:"close",size:"sm",color:d.disabled?"neutral-gray-200":i.value?"neutral-white":"neutral-black"},null,8,["color"])],2)):l.createCommentVNode("",!0)],34))}}),qi=l.defineComponent({__name:"FmChipGroup",props:{items:{},selectable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},removable:{type:Boolean,default:!1}},emits:["chip-closed"],setup(t,{emit:e}){const n=t,o=e,i=l.ref(null),s=l.ref(0),r=l.ref(null),a=l.ref(),c=()=>{var p,h;if(!i.value)return;const u=i.value.getBoundingClientRect();s.value>0&&r.value&&((p=a.value)==null||p.splice(r.value,1)),s.value=0;let f=0;Array.from(i.value.children).forEach((g,m)=>{const b=g.getBoundingClientRect(),x=b.y-u.y;f=Math.max(b.height*2+4,f),x>f&&(s.value+=1,r.value=r.value===null?m:m-s.value)}),s.value>0&&r.value&&((h=a.value)==null||h.splice(r.value,0,{label:`+${s.value}`,removable:!1,selectable:!1,compact:n.compact}))},d=u=>{o("chip-closed",u)};return l.onMounted(()=>{a.value=n.items,c(),new ResizeObserver(()=>{c()}).observe(i.value)}),l.watch(()=>n.items,()=>{a.value=n.items,c()}),(u,f)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"chipsContainer",ref:i,class:l.normalizeClass(["flex flex-wrap gap-4 items-center overflow-y-hidden",u.compact?"max-h-48":"max-h-64"])},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(a.value,(p,h)=>(l.openBlock(),l.createBlock(Ui,{key:h,label:p.label,icon:p.icon,selected:p.selected,removable:p.removable!==void 0?p.removable:u.removable,selectable:p.selectable!==void 0?p.selectable:u.selectable,disabled:p.disabled!==void 0?p.disabled:u.disabled,compact:u.compact,onChipClosed:g=>d(h)},null,8,["label","icon","selected","removable","selectable","disabled","compact","onChipClosed"]))),128))],2))}}),tc={class:"flex fm-typo-title-sm-700 items-center justify-between text-fm-color-typo-primary"},nc={class:"overflow-y-auto"},oc={class:"flex gap-8 items-center sm:flex-col-reverse xs:flex-col-reverse"},ic=l.defineComponent({__name:"FmDialog",props:{modelValue:{type:Boolean,default:!1},overlay:{type:Boolean,default:!0},minWidth:{default:280},closeButton:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=l.ref(null),s=r=>{n.overlay&&i.value&&r.target===i.value&&o("update:modelValue",!1)};return(r,a)=>(l.openBlock(),l.createBlock(l.Teleport,{to:"body"},[l.createVNode(l.Transition,null,{default:l.withCtx(()=>[r.modelValue?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:i,class:l.normalizeClass({"fm-dialog--container":!0,"fm-dialog--overlay":r.overlay}),onClick:a[1]||(a[1]=c=>s(c))},[l.createElementVNode("div",{class:l.normalizeClass(`fm-dialog min-w-[${r.minWidth}px]`)},[l.createElementVNode("div",tc,[l.renderSlot(r.$slots,"dialog-header"),r.closeButton?(l.openBlock(),l.createBlock(L,{key:0,class:"cursor-pointer",name:"close",size:"md",onClick:a[0]||(a[0]=c=>o("update:modelValue",!1))})):l.createCommentVNode("",!0)]),l.createElementVNode("div",nc,[l.renderSlot(r.$slots,"dialog-content")]),l.createElementVNode("div",oc,[l.renderSlot(r.$slots,"dialog-footer")])],2)],2)):l.createCommentVNode("",!0)]),_:3})]))}}),Zy="",sc={class:"fm-drop-field"},rc=["accept","disabled"],lc=l.defineComponent({__name:"FmDropField",props:{label:{default:""},disabled:{type:Boolean,default:!1},accept:{default:""},maxFileSize:{default:8e6}},emits:["file-upload","file-rejected"],setup(t,{emit:e}){const n=t,o=e,i=l.ref(!1),s=l.ref(),r=l.ref(),a=l.ref(),c=_=>{n.disabled||(_.stopPropagation(),_.preventDefault())},d=_=>{n.disabled||(_.stopPropagation(),_.preventDefault(),i.value=!0)},u=_=>{n.disabled||(_.stopPropagation(),_.preventDefault(),i.value=!1)},f=_=>{n.disabled||(_.stopPropagation(),_.preventDefault(),i.value=!1,p(_))},p=_=>{var v;a.value=((v=_.dataTransfer)==null?void 0:v.files)??_.target.files;const C=a.value;if(s.value=g(C[0]),r.value=m(C[0]),s.value&&r.value)o("file-upload",C[0]);else{const k=h();o("file-rejected",[{file:C[0],reason:k}])}},h=()=>{const _=[];return s.value||_.push("invalid-type"),r.value||_.push("invalid-size"),_},g=_=>{if(!n.accept)return!0;const C=n.accept.split(",").map(v=>v.trim());for(const v of C)if(b(v)){if(y(v)===y(_.type))return!0}else if(x(_)===v||_.type===v)return!0;return!1},m=_=>_.size<=n.maxFileSize,b=_=>_.indexOf("*")!==-1,x=_=>"."+_.name.split(".").pop(),y=_=>_.substring(0,_.indexOf("/")),w=l.computed(()=>{if(i.value)return"Drop file to upload";if(s.value){if(!r.value)return`File size exceeds ${n.maxFileSize*1e-6}mb`}else return"File type is not valid";return""}),S=l.computed(()=>a.value?!s.value||!r.value:!1);return(_,C)=>(l.openBlock(),l.createElementBlock("label",sc,[l.renderSlot(_.$slots,"label",{},()=>[l.createElementVNode("div",{class:l.normalizeClass(["fm-typo-body-lg-400",[_.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"]])},l.toDisplayString(_.label),3)],!0),l.createElementVNode("div",{class:l.normalizeClass(["fm-drop-field__container",{"fm-drop-field__container--dragging":i.value,"fm-drop-field__container--invalid":S.value&&!_.disabled,"fm-drop-field__container--disabled":_.disabled}]),onDragenter:c,onDragover:d,onDragleave:u,onDrop:f},[(i.value||S.value)&&!_.disabled?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass({"fm-typo-body-lg-700":!0,"text-fm-color-primary":i.value,"text-fm-color-typo-error":S.value})},l.toDisplayString(w.value),3)):(l.openBlock(),l.createBlock(fe,{key:1,label:"Add files",size:"md",variant:"secondary",disabled:_.disabled},null,8,["disabled"])),l.renderSlot(_.$slots,"accept-text",{},()=>[n.accept?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["fm-typo-body-md-400",[_.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"]])},l.toDisplayString(`Accepts ${n.accept}`),3)):l.createCommentVNode("",!0)],!0),l.createElementVNode("input",{type:"file",class:"fm-drop-field__input",accept:_.accept,disabled:_.disabled,onChange:p},null,40,rc)],34),l.renderSlot(_.$slots,"helper-text",{},()=>[l.createElementVNode("div",{class:l.normalizeClass(["fm-typo-body-sm-400",[_.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"]])},l.toDisplayString(`Max size ${n.maxFileSize*1e-6}mb`),3)],!0)]))}}),Jy="",ac=Q(lc,[["__scopeId","data-v-c914dc32"]]),cc={},dc={class:"flex-grow"};function uc(t,e){return l.openBlock(),l.createElementBlock("div",dc)}const Xi=Q(cc,[["render",uc]]),Ki=Symbol.for("fm:form"),Zi=Symbol.for("fm:radio-group"),Ji=Symbol.for("fm:stepper"),Qi=Symbol.for("fm:dialog"),es=Symbol.for("fm:menu"),fc={install:t=>{const e={currentDialog:{vNode:null,container:null},open:n=>{const o={primary:[],secondary:[],tertiary:[]},i={onPrimary:d=>(o.primary.push(d),i),onSecondary:d=>(o.secondary.push(d),i),onTertiary:d=>(o.tertiary.push(d),i)};function s(){r&&l.render(null,r),r=null,c=null}let r=document.createElement("div");document.body.appendChild(r);const a=l.markRaw(ts);let c=l.createVNode(a,{...n,unmount:s,storedFunctions:o});return c.appContext=t._context,l.render(c,r),e.currentDialog.vNode=c,e.currentDialog.container=r,i},close:()=>{const{vNode:n,container:o}=e.currentDialog;n===null&&o===null||(o&&l.render(null,o),e.currentDialog={vNode:null,container:null})}};t.config.globalProperties.$dialog=e,t.provide(Qi,e)}},hc={key:0,class:"block relative"},pc={class:"flex fm-typo-title-sm-700 items-center justify-between text-fm-color-typo-primary"},gc={class:"fm-typo-title-md-700 text-fm-color-typo-primary"},mc={key:0,class:"overflow-y-auto"},bc={key:1,class:"fm-typo-body-md-400 overflow-y-auto text-fm-color-neutral-black"},yc={class:"flex gap-8 items-center justify-end sm:flex-col-reverse xs:flex-col-reverse"},ts=l.defineComponent({__name:"FmDynamicDialog",props:{title:{},message:{default:""},primaryActions:{default:null},secondaryActions:{default:null},tertiaryActions:{default:null},overlay:{type:Boolean,default:!0},closeButton:{type:Boolean,default:!0},minWidth:{default:280},dialogComponent:{default:null},contentComponent:{default:null},dialogComponentProps:{default:null},contentComponentProps:{default:null},unmount:{type:Function,default:()=>{}},storedFunctions:{default:null}},emits:["dialog-opened","dialog-closed"],setup(t,{emit:e}){const n=l.ref(!0),o=t,i=e,s=l.ref(null),r=()=>{o.overlay&&o.unmount()},a=d=>{s.value&&d.target===s.value&&r()},c=(d,u)=>{o.storedFunctions[u].forEach(f=>f()),d.close&&r()};return l.onMounted(()=>{i("dialog-opened")}),l.onUnmounted(()=>{i("dialog-closed")}),(d,u)=>(l.openBlock(),l.createBlock(l.Transition,null,{default:l.withCtx(()=>[n.value?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:s,class:l.normalizeClass({"fm-dialog--container":!0,"fm-dialog--overlay":d.overlay}),onClick:a},[d.dialogComponent?(l.openBlock(),l.createElementBlock("div",hc,[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(d.dialogComponent),l.normalizeProps(l.guardReactiveProps(d.dialogComponentProps)),null,16)),d.closeButton?(l.openBlock(),l.createBlock(L,{key:0,class:"absolute cursor-pointer right-[12px] top-[18px]",name:"close",size:"md",onClick:r})):l.createCommentVNode("",!0)])):(l.openBlock(),l.createElementBlock("div",{key:1,class:"fm-dialog",style:l.normalizeStyle({"min-width":`${o.minWidth}px`})},[l.createElementVNode("div",pc,[l.createElementVNode("div",gc,l.toDisplayString(d.title),1),d.closeButton?(l.openBlock(),l.createBlock(L,{key:0,class:"cursor-pointer",name:"close",size:"md",onClick:r})):l.createCommentVNode("",!0)]),d.contentComponent?(l.openBlock(),l.createElementBlock("div",mc,[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(d.contentComponent),l.normalizeProps(l.guardReactiveProps(d.contentComponentProps)),null,16))])):(l.openBlock(),l.createElementBlock("div",bc,l.toDisplayString(d.message),1)),l.createElementVNode("div",yc,[d.tertiaryActions?(l.openBlock(),l.createBlock(fe,{key:0,class:"sm:w-full xs:w-full",variant:"tertiary",label:d.tertiaryActions.text,size:"md",onClick:u[0]||(u[0]=f=>c(d.tertiaryActions,"tertiary"))},null,8,["label"])):l.createCommentVNode("",!0),l.createVNode(Xi,{class:"sm:hidden xs:hidden"}),d.secondaryActions?(l.openBlock(),l.createBlock(fe,{key:1,class:"sm:w-full xs:w-full",variant:"secondary",label:d.secondaryActions.text,size:"md",onClick:u[1]||(u[1]=f=>c(d.secondaryActions,"secondary"))},null,8,["label"])):l.createCommentVNode("",!0),d.primaryActions?(l.openBlock(),l.createBlock(fe,{key:2,class:"sm:w-full xs:w-full",variant:"primary",label:d.primaryActions.text,size:"md",onClick:u[2]||(u[2]=f=>c(d.primaryActions,"primary"))},null,8,["label"])):l.createCommentVNode("",!0)])],4))],2)):l.createCommentVNode("",!0)]),_:1}))}}),Qy="";/*!
|
|
4
|
+
fm-btn--${l.size}
|
|
5
|
+
${l.label?"":`fm-btn--${l.size}--just-icon`}
|
|
6
|
+
fm-btn--${l.variant}
|
|
7
|
+
${l.disabled||l.loading?"fm-btn--disabled":""}
|
|
8
|
+
${n.value&&l.variant==="plain"?"!text-fm-color-system-warning-400":""}
|
|
9
|
+
`),disabled:l.disabled,type:l.type,onMousedown:a[0]||(a[0]=()=>r(!0)),onMouseup:a[1]||(a[1]=()=>r(!1)),onMouseleave:a[2]||(a[2]=()=>r(!1))},[l.icon&&l.iconPosition==="prepend"||l.prependIcon?(s.openBlock(),s.createBlock(z,{key:0,class:s.normalizeClass({invisible:l.loading}),name:l.icon||l.prependIcon,outline:!n.value,color:l.disabled?"neutral-gray-200":l.iconColor??"",size:"md"},null,8,["class","name","outline","color"])):s.createCommentVNode("",!0),l.label?(s.openBlock(),s.createElementBlock("span",{key:1,class:s.normalizeClass(["fm-typo-body-lg-700 line-clamp-1",{invisible:l.loading}])},s.toDisplayString(l.label),3)):s.createCommentVNode("",!0),l.icon&&l.iconPosition==="append"||l.appendIcon?(s.openBlock(),s.createBlock(z,{key:2,class:s.normalizeClass({invisible:l.loading}),name:l.icon||l.appendIcon,outline:!n.value,color:l.disabled?"neutral-gray-200":l.iconColor??"",size:"md"},null,8,["class","name","outline","color"])):s.createCommentVNode("",!0),s.createElementVNode("div",xu,[l.loading?(s.openBlock(),s.createBlock(qn,{key:0,size:"md",color:"neutral-gray-300"})):s.createCommentVNode("",!0)])],42,wu)),[[d,!l.disabled&&!l.loading&&l.variant!=="plain"]])}}}),$w="",K=Z(Cu,[["__scopeId","data-v-30ddf314"]]),ku={class:"bg-fm-color-neutral-white border-1 border-fm-color-neutral-gray-200 flex items-center overflow-hidden rounded-lg"},Su=["v-wave","disabled","onClick","onMousedown"],vu=s.defineComponent({__name:"FmButtonGroup",props:{modelValue:{},disabled:{type:Boolean},items:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=c=>{o("update:modelValue",c)},r=s.ref(null),l=c=>{r.value=c},a=c=>c.disabled||n.disabled,d=c=>JSON.stringify(c)===JSON.stringify(n.modelValue);return(c,u)=>(s.openBlock(),s.createElementBlock("div",ku,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(c.items,(f,h)=>(s.openBlock(),s.createElementBlock("button",{key:h,type:"button","v-wave":a(f),class:s.normalizeClass(["border-r flex gap-8 grow hover:bg-fm-color-neutral-gray-200 items-center justify-center last:border-r-0 px-[11px] py-[7px]",{"bg-fm-color-system-warning-100 hover:bg-fm-color-system-warning-100":d(f),"hover:bg-fm-color-neutral-white cursor-not-allowed":a(f)}]),disabled:a(f),onClick:p=>i(f),onMousedown:p=>l(f),onMouseup:u[0]||(u[0]=p=>l(null)),onMouseleave:u[1]||(u[1]=p=>l(null))},[f.icon?(s.openBlock(),s.createBlock(z,{key:0,name:f.icon,size:"md",color:a(f)?"neutral-gray-200":d(f)?"primary":"",outline:JSON.stringify(r.value)!==JSON.stringify(f)&&!d(f)},null,8,["name","color","outline"])):s.createCommentVNode("",!0),f.label?(s.openBlock(),s.createElementBlock("span",{key:1,class:s.normalizeClass(["fm-typo-body-lg-700",[a(f)?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"]])},s.toDisplayString(f.label),3)):s.createCommentVNode("",!0)],42,Su))),128))]))}}),pr=Symbol.for("fm:form"),mr=Symbol.for("fm:radio-group"),gr=Symbol.for("fm:stepper"),br=Symbol.for("fm:dialog"),yr=Symbol.for("fm:menu"),$r=Symbol.for("fm:menu-to-item"),mi=Symbol.for("fm:snackbar"),Ct=Symbol.for("fm:card"),Du=s.defineComponent({__name:"FmCard",props:{variant:{default:"elevated"},horizontal:{type:Boolean,default:!1},disabled:{type:Boolean}},setup(t){const e=t;return s.provide(Ct,{disabled:e.disabled,horizontal:e.horizontal}),(n,o)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass([`fm-card--${n.variant}`,{"fm-card--horizontal":n.horizontal}])},[s.renderSlot(n.$slots,"default",{disabled:e.disabled})],2))}}),_w="",gi=s.defineComponent({__name:"FmCardSection",setup(t){const e=s.inject(Ct,null);return(n,o)=>{var i;return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["fm-card__section",{"fm-card__subtitle--disabled":(i=s.unref(e))==null?void 0:i.disabled}])},[s.renderSlot(n.$slots,"default")],2)}}}),Eu={class:"fm-card__actions"},Mu=s.defineComponent({__name:"FmCardActions",setup(t){const e=s.inject(Ct,null);return(n,o)=>(s.openBlock(),s.createBlock(gi,null,{default:s.withCtx(()=>{var i;return[s.createElementVNode("div",Eu,[s.renderSlot(n.$slots,"default",{disabled:((i=s.unref(e))==null?void 0:i.disabled)??!1})])]}),_:3}))}}),_r=s.defineComponent({__name:"FmCardTitle",setup(t){const e=s.inject(Ct,null);return(n,o)=>{var i;return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["fm-card__title",{"fm-card__title--disabled":(i=s.unref(e))==null?void 0:i.disabled}])},[s.renderSlot(n.$slots,"default")],2)}}}),wr=s.defineComponent({__name:"FmCardSubtitle",setup(t){const e=s.inject(Ct,null);return(n,o)=>{var i;return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["fm-card__subtitle",{"fm-card__subtitle--disabled":(i=s.unref(e))==null?void 0:i.disabled}])},[s.renderSlot(n.$slots,"default")],2)}}}),Vu={class:"flex flex-col gap-4"},Bu=s.defineComponent({__name:"FmCardHeader",props:{title:{default:""},subtitle:{default:""}},setup(t){const e=s.inject(Ct,null);return(n,o)=>(s.openBlock(),s.createBlock(gi,{class:"fm-card__header"},{default:s.withCtx(()=>{var i,r;return[s.createElementVNode("div",Vu,[n.title?(s.openBlock(),s.createBlock(_r,{key:0,disabled:(i=s.unref(e))==null?void 0:i.disabled},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(n.title),1)]),_:1},8,["disabled"])):s.createCommentVNode("",!0),n.subtitle?(s.openBlock(),s.createBlock(wr,{key:1,disabled:(r=s.unref(e))==null?void 0:r.disabled},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(n.subtitle),1)]),_:1},8,["disabled"])):s.createCommentVNode("",!0)])]}),_:1}))}}),Pu=["src","width"],Nu=s.defineComponent({__name:"FmCardMedia",props:{src:{},width:{default:"100%"}},setup(t){const e=s.inject(Ct,null);return(n,o)=>{var i,r;return s.openBlock(),s.createElementBlock("img",{src:n.src,class:s.normalizeClass(["object-cover",[{"opacity-60":((i=s.unref(e))==null?void 0:i.disabled)??!1},(r=s.unref(e))!=null&&r.horizontal?"aspect-square":"aspect-4/3"]]),width:n.width},null,10,Pu)}}}),xr=s.defineComponent({__name:"FmChip",props:{label:{default:""},icon:{default:""},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},removable:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},variant:{default:"plain"}},emits:["chip-closed"],setup(t,{emit:e}){const n=t,o=e,i=s.ref(!1),r=s.ref(!1);function l(m){n.selectable&&(r.value=m)}const a=()=>{!n.selectable||n.disabled||(i.value=!i.value)},d=()=>{n.disabled||o("chip-closed")};s.onMounted(()=>{i.value=n.selected}),s.watch(()=>n.selected,()=>{i.value=n.selected});function c(m,g,b){if(m)return"text-fm-color-typo-disabled";switch(b){case"plain":return g?"text-fm-color-neutral-white":"";case"neutral":case"info":case"success":case"critical":return"text-fm-color-neutral-white";case"warning":return"text-fm-color-neutral-black"}}function u(m,g,b){if(m)return"bg-fm-color-neutral-gray-100 cursor-not-allowed";switch(b){case"plain":return g?"bg-fm-color-neutral-black":"bg-fm-color-neutral-gray-100";case"neutral":return"bg-fm-color-neutral-black";case"info":return"bg-fm-color-secondary-blueberry";case"success":return"bg-fm-color-secondary-mint";case"critical":return"bg-fm-color-secondary-salmon";case"warning":return"bg-fm-color-secondary-mustard"}}const f=s.ref(),h=s.ref(!1);function p(m=0){if(n.label&&!(!f.value&&m>500)){if(!f.value){s.nextTick(()=>p(m+1));return}h.value=f.value.offsetWidth<f.value.scrollWidth}}return s.onMounted(()=>{p()}),(m,g)=>{const b=s.resolveDirective("tooltip");return s.withDirectives((s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["inline-flex rounded-md items-center gap-4 justify-center max-w-[200px]",m.compact?"h-[22px] px-8":"h-[30px] px-8 py-4",u(m.disabled,i.value,m.variant),{"cursor-pointer":m.selectable&&!m.disabled,"hover:bg-fm-color-opacity-sm":!i.value&&!m.disabled&&m.selectable}]),onClick:a,onMousedown:g[0]||(g[0]=()=>l(!0)),onMouseup:g[1]||(g[1]=()=>l(!1)),onMouseleave:g[2]||(g[2]=()=>l(!1))},[s.renderSlot(m.$slots,"default",{},()=>[m.icon?(s.openBlock(),s.createBlock(z,{key:0,name:m.icon,size:"sm",outline:!r.value&&!i.value,color:m.disabled?"neutral-gray-200":i.value?"neutral-white":"neutral-black"},null,8,["name","outline","color"])):s.createCommentVNode("",!0),m.label?(s.openBlock(),s.createElementBlock("div",{key:1,ref_key:"labelRef",ref:f,class:s.normalizeClass(["fm-typo-body-md-700 select-none text-ellipsis overflow-hidden whitespace-nowrap",c(m.disabled,i.value,m.variant)])},s.toDisplayString(m.label),3)):s.createCommentVNode("",!0)]),m.removable?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["flex items-center justify-center rounded-xxxl",!i.value&&!m.disabled?"hover:bg-fm-color-opacity-sm":"",{"cursor-not-allowed":m.disabled,"cursor-pointer":m.selectable&&!m.disabled}]),onClick:d},[s.createVNode(z,{name:"close",size:"sm",color:m.disabled?"neutral-gray-200":i.value?"neutral-white":"neutral-black"},null,8,["color"])],2)):s.createCommentVNode("",!0)],34)),[[b,h.value?m.label:null]])}}}),Cr=s.defineComponent({__name:"FmChipGroup",props:{items:{},selectable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},removable:{type:Boolean,default:!1}},emits:["chip-closed"],setup(t,{emit:e}){const n=t,o=e,i=s.ref(null),r=s.ref(0),l=s.ref(null),a=s.ref(),d=()=>{var h,p;if(!i.value)return;const u=i.value.getBoundingClientRect();r.value>0&&l.value&&((h=a.value)==null||h.splice(l.value,1)),r.value=0;let f=0;Array.from(i.value.children).forEach((m,g)=>{const b=m.getBoundingClientRect(),y=b.y-u.y;f=Math.max(b.height*2+4,f),y>f&&(r.value+=1,l.value=l.value===null?g:g-r.value)}),r.value>0&&l.value&&((p=a.value)==null||p.splice(l.value,0,{label:`+${r.value}`,removable:!1,selectable:!1,compact:n.compact}))},c=u=>{o("chip-closed",u)};return s.onMounted(()=>{a.value=n.items,d(),new ResizeObserver(()=>{d()}).observe(i.value)}),s.watch(()=>n.items,()=>{a.value=n.items,d()}),(u,f)=>(s.openBlock(),s.createElementBlock("div",{ref_key:"chipsContainer",ref:i,class:s.normalizeClass(["flex flex-wrap gap-4 items-center overflow-y-hidden",u.compact?"max-h-48":"max-h-64"])},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.value,(h,p)=>(s.openBlock(),s.createBlock(xr,{key:p,label:h.label,icon:h.icon,selected:h.selected,removable:h.removable!==void 0?h.removable:u.removable,selectable:h.selectable!==void 0?h.selectable:u.selectable,disabled:h.disabled!==void 0?h.disabled:u.disabled,compact:u.compact,variant:h.variant,onChipClosed:m=>c(p)},null,8,["label","icon","selected","removable","selectable","disabled","compact","variant","onChipClosed"]))),128))],2))}}),Fu={class:"flex fm-typo-title-sm-700 items-center justify-between text-fm-color-typo-primary"},Ru={class:"overflow-y-auto"},Au={class:"flex gap-8 items-center sm:flex-col-reverse xs:flex-col-reverse"},Ou=s.defineComponent({__name:"FmDialog",props:{modelValue:{type:Boolean,default:!1},overlay:{type:Boolean,default:!0},minWidth:{default:280},closeButton:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=s.ref(null),r=l=>{n.overlay&&i.value&&l.target===i.value&&o("update:modelValue",!1)};return(l,a)=>(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[s.createVNode(s.Transition,null,{default:s.withCtx(()=>[l.modelValue?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:i,class:s.normalizeClass({"fm-dialog--container":!0,"fm-dialog--overlay":l.overlay}),onClick:a[1]||(a[1]=d=>r(d))},[s.createElementVNode("div",{class:s.normalizeClass(`fm-dialog min-w-[${l.minWidth}px]`)},[s.createElementVNode("div",Fu,[s.renderSlot(l.$slots,"dialog-header"),l.closeButton?(s.openBlock(),s.createBlock(z,{key:0,class:"cursor-pointer",name:"close",size:"md",onClick:a[0]||(a[0]=d=>o("update:modelValue",!1))})):s.createCommentVNode("",!0)]),s.createElementVNode("div",Ru,[s.renderSlot(l.$slots,"dialog-content")]),s.createElementVNode("div",Au,[s.renderSlot(l.$slots,"dialog-footer")])],2)],2)):s.createCommentVNode("",!0)]),_:3})]))}}),ww="",Iu={class:"fm-drop-field"},Tu=["accept","disabled"],Lu=s.defineComponent({__name:"FmDropField",props:{label:{default:""},disabled:{type:Boolean,default:!1},accept:{default:""},maxFileSize:{default:8e6}},emits:["file-upload","file-rejected"],setup(t,{emit:e}){const n=t,o=e,i=s.ref(!1),r=s.ref(),l=s.ref(),a=s.ref(),d=x=>{n.disabled||(x.stopPropagation(),x.preventDefault())},c=x=>{n.disabled||(x.stopPropagation(),x.preventDefault(),i.value=!0)},u=x=>{n.disabled||(x.stopPropagation(),x.preventDefault(),i.value=!1)},f=x=>{n.disabled||(x.stopPropagation(),x.preventDefault(),i.value=!1,h(x))},h=x=>{var M;a.value=((M=x.dataTransfer)==null?void 0:M.files)??x.target.files;const B=a.value;if(r.value=m(B[0]),l.value=g(B[0]),r.value&&l.value)o("file-upload",B[0]);else{const N=p();o("file-rejected",[{file:B[0],reason:N}])}},p=()=>{const x=[];return r.value||x.push("invalid-type"),l.value||x.push("invalid-size"),x},m=x=>{if(!n.accept)return!0;const B=n.accept.split(",").map(M=>M.trim());for(const M of B)if(b(M)){if($(M)===$(x.type))return!0}else if(y(x)===M||x.type===M)return!0;return!1},g=x=>x.size<=n.maxFileSize,b=x=>x.indexOf("*")!==-1,y=x=>"."+x.name.split(".").pop(),$=x=>x.substring(0,x.indexOf("/")),k=s.computed(()=>{if(i.value)return"Drop file to upload";if(r.value){if(!l.value)return`File size exceeds ${n.maxFileSize*1e-6}mb`}else return"File type is not valid";return""}),v=s.computed(()=>a.value?!r.value||!l.value:!1);return(x,B)=>(s.openBlock(),s.createElementBlock("label",Iu,[s.renderSlot(x.$slots,"label",{},()=>[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[x.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"]])},s.toDisplayString(x.label),3)],!0),s.createElementVNode("div",{class:s.normalizeClass(["fm-drop-field__container",{"fm-drop-field__container--dragging":i.value,"fm-drop-field__container--invalid":v.value&&!x.disabled,"fm-drop-field__container--disabled":x.disabled}]),onDragenter:d,onDragover:c,onDragleave:u,onDrop:f},[(i.value||v.value)&&!x.disabled?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass({"fm-typo-body-lg-700":!0,"text-fm-color-primary":i.value,"text-fm-color-typo-error":v.value})},s.toDisplayString(k.value),3)):(s.openBlock(),s.createBlock(K,{key:1,label:"Add files",size:"md",variant:"secondary",disabled:x.disabled},null,8,["disabled"])),s.renderSlot(x.$slots,"accept-text",{},()=>[n.accept?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["fm-typo-body-md-400",[x.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"]])},s.toDisplayString(`Accepts ${n.accept}`),3)):s.createCommentVNode("",!0)],!0),s.createElementVNode("input",{type:"file",class:"fm-drop-field__input",accept:x.accept,disabled:x.disabled,onChange:h},null,40,Tu)],34),s.renderSlot(x.$slots,"helper-text",{},()=>[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-sm-400",[x.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"]])},s.toDisplayString(`Max size ${n.maxFileSize*1e-6}mb`),3)],!0)]))}}),xw="",zu=Z(Lu,[["__scopeId","data-v-c914dc32"]]),Hu={},ju={class:"flex-grow"};function Wu(t,e){return s.openBlock(),s.createElementBlock("div",ju)}const Xn=Z(Hu,[["render",Wu]]),Yu={install:t=>{const e={currentDialog:{vNode:null,container:null},open:n=>{const o={primary:[],secondary:[],tertiary:[]},i={onPrimary:c=>(o.primary.push(c),i),onSecondary:c=>(o.secondary.push(c),i),onTertiary:c=>(o.tertiary.push(c),i)};function r(){e.close()}const l=document.createElement("div");document.body.appendChild(l);const a=s.markRaw(kr),d=s.createVNode(a,{...n,unmount:r,storedFunctions:o});return d.appContext=t._context,s.render(d,l),e.currentDialog.vNode=d,e.currentDialog.container=l,i},close:()=>{const{vNode:n,container:o}=e.currentDialog;n===null&&o===null||(o&&s.render(null,o),e.currentDialog={vNode:null,container:null})}};t.config.globalProperties.$dialog=e,t.provide(br,e)}},Uu={key:0,class:"block relative"},Gu={class:"flex fm-typo-title-sm-700 items-center justify-between text-fm-color-typo-primary"},qu={class:"fm-typo-title-md-700 text-fm-color-typo-primary"},Xu={key:0,class:"overflow-y-auto"},Ku={key:1,class:"fm-typo-body-md-400 overflow-y-auto text-fm-color-neutral-black"},Zu={class:"flex gap-8 items-center justify-end sm:flex-col-reverse xs:flex-col-reverse"},kr=s.defineComponent({__name:"FmDynamicDialog",props:{title:{},message:{default:""},primaryActions:{default:null},secondaryActions:{default:null},tertiaryActions:{default:null},overlay:{type:Boolean,default:!0},closeButton:{type:Boolean,default:!0},minWidth:{default:280},dialogComponent:{default:null},contentComponent:{default:null},dialogComponentProps:{default:null},contentComponentProps:{default:null},unmount:{type:Function,default:()=>{}},storedFunctions:{default:null}},emits:["dialog-opened","dialog-closed"],setup(t,{emit:e}){const n=s.ref(!0),o=s.ref(),i=t,r=e,l=s.ref(null),a=()=>{i.overlay&&i.unmount()},d=u=>{l.value&&u.target===l.value&&a()},c=(u,f)=>{i.storedFunctions[f].forEach(h=>h(o.value)),u.close&&a()};return s.onMounted(()=>{r("dialog-opened")}),s.onUnmounted(()=>{r("dialog-closed")}),(u,f)=>(s.openBlock(),s.createBlock(s.Transition,null,{default:s.withCtx(()=>[n.value?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:l,class:s.normalizeClass({"fm-dialog--container":!0,"fm-dialog--overlay":u.overlay}),onClick:d},[u.dialogComponent?(s.openBlock(),s.createElementBlock("div",Uu,[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(u.dialogComponent),s.normalizeProps(s.guardReactiveProps(u.dialogComponentProps)),null,16)),u.closeButton?(s.openBlock(),s.createBlock(z,{key:0,class:"absolute cursor-pointer right-[12px] top-[18px]",name:"close",size:"md",onClick:a})):s.createCommentVNode("",!0)])):(s.openBlock(),s.createElementBlock("div",{key:1,class:"fm-dialog",style:s.normalizeStyle({"min-width":`${i.minWidth}px`})},[s.createElementVNode("div",Gu,[s.createElementVNode("div",qu,s.toDisplayString(u.title),1),u.closeButton?(s.openBlock(),s.createBlock(z,{key:0,class:"cursor-pointer",name:"close",size:"md",onClick:a})):s.createCommentVNode("",!0)]),u.contentComponent?(s.openBlock(),s.createElementBlock("div",Xu,[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(u.contentComponent),s.mergeProps(u.contentComponentProps,{"onDialog:emitData":f[0]||(f[0]=h=>o.value=h)}),null,16))])):(s.openBlock(),s.createElementBlock("div",Ku,s.toDisplayString(u.message),1)),s.createElementVNode("div",Zu,[u.tertiaryActions?(s.openBlock(),s.createBlock(K,{key:0,class:"sm:w-full xs:w-full",variant:u.tertiaryActions.variant??"tertiary",label:u.tertiaryActions.text,size:"md",onClick:f[1]||(f[1]=h=>c(u.tertiaryActions,"tertiary"))},null,8,["variant","label"])):s.createCommentVNode("",!0),s.createVNode(Xn,{class:"sm:hidden xs:hidden"}),u.secondaryActions?(s.openBlock(),s.createBlock(K,{key:1,class:"sm:w-full xs:w-full",variant:u.secondaryActions.variant??"secondary",label:u.secondaryActions.text,size:"md",onClick:f[2]||(f[2]=h=>c(u.secondaryActions,"secondary"))},null,8,["variant","label"])):s.createCommentVNode("",!0),u.primaryActions?(s.openBlock(),s.createBlock(K,{key:2,class:"sm:w-full xs:w-full",variant:u.primaryActions.variant??"primary",label:u.primaryActions.text,size:"md",onClick:f[3]||(f[3]=h=>c(u.primaryActions,"primary"))},null,8,["variant","label"])):s.createCommentVNode("",!0)])],4))],2)):s.createCommentVNode("",!0)]),_:1}))}}),Cw="";/*!
|
|
10
10
|
* @kurkle/color v0.3.2
|
|
11
11
|
* https://github.com/kurkle/color#readme
|
|
12
12
|
* (c) 2023 Jukka Kurkela
|
|
13
13
|
* Released under the MIT License
|
|
14
|
-
*/function
|
|
14
|
+
*/function nn(t){return t+.5|0}const dt=(t,e,n)=>Math.max(Math.min(t,n),e);function on(t){return dt(nn(t*2.55),0,255)}function ct(t){return dt(nn(t*255),0,255)}function Xe(t){return dt(nn(t/2.55)/100,0,1)}function Sr(t){return dt(nn(t*100),0,100)}const Ne={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},bi=[..."0123456789ABCDEF"],Ju=t=>bi[t&15],Qu=t=>bi[(t&240)>>4]+bi[t&15],Kn=t=>(t&240)>>4===(t&15),ef=t=>Kn(t.r)&&Kn(t.g)&&Kn(t.b)&&Kn(t.a);function tf(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&Ne[t[1]]*17,g:255&Ne[t[2]]*17,b:255&Ne[t[3]]*17,a:e===5?Ne[t[4]]*17:255}:(e===7||e===9)&&(n={r:Ne[t[1]]<<4|Ne[t[2]],g:Ne[t[3]]<<4|Ne[t[4]],b:Ne[t[5]]<<4|Ne[t[6]],a:e===9?Ne[t[7]]<<4|Ne[t[8]]:255})),n}const nf=(t,e)=>t<255?e(t):"";function of(t){var e=ef(t)?Ju:Qu;return t?"#"+e(t.r)+e(t.g)+e(t.b)+nf(t.a,e):void 0}const sf=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function vr(t,e,n){const o=e*Math.min(n,1-n),i=(r,l=(r+t/30)%12)=>n-o*Math.max(Math.min(l-3,9-l,1),-1);return[i(0),i(8),i(4)]}function rf(t,e,n){const o=(i,r=(i+t/60)%6)=>n-n*e*Math.max(Math.min(r,4-r,1),0);return[o(5),o(3),o(1)]}function lf(t,e,n){const o=vr(t,1,.5);let i;for(e+n>1&&(i=1/(e+n),e*=i,n*=i),i=0;i<3;i++)o[i]*=1-e-n,o[i]+=e;return o}function af(t,e,n,o,i){return t===i?(e-n)/o+(e<n?6:0):e===i?(n-t)/o+2:(t-e)/o+4}function yi(t){const n=t.r/255,o=t.g/255,i=t.b/255,r=Math.max(n,o,i),l=Math.min(n,o,i),a=(r+l)/2;let d,c,u;return r!==l&&(u=r-l,c=a>.5?u/(2-r-l):u/(r+l),d=af(n,o,i,u,r),d=d*60+.5),[d|0,c||0,a]}function $i(t,e,n,o){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,o)).map(ct)}function _i(t,e,n){return $i(vr,t,e,n)}function df(t,e,n){return $i(lf,t,e,n)}function cf(t,e,n){return $i(rf,t,e,n)}function Dr(t){return(t%360+360)%360}function uf(t){const e=sf.exec(t);let n=255,o;if(!e)return;e[5]!==o&&(n=e[6]?on(+e[5]):ct(+e[5]));const i=Dr(+e[2]),r=+e[3]/100,l=+e[4]/100;return e[1]==="hwb"?o=df(i,r,l):e[1]==="hsv"?o=cf(i,r,l):o=_i(i,r,l),{r:o[0],g:o[1],b:o[2],a:n}}function ff(t,e){var n=yi(t);n[0]=Dr(n[0]+e),n=_i(n),t.r=n[0],t.g=n[1],t.b=n[2]}function hf(t){if(!t)return;const e=yi(t),n=e[0],o=Sr(e[1]),i=Sr(e[2]);return t.a<255?`hsla(${n}, ${o}%, ${i}%, ${Xe(t.a)})`:`hsl(${n}, ${o}%, ${i}%)`}const Er={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Mr={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function pf(){const t={},e=Object.keys(Mr),n=Object.keys(Er);let o,i,r,l,a;for(o=0;o<e.length;o++){for(l=a=e[o],i=0;i<n.length;i++)r=n[i],a=a.replace(r,Er[r]);r=parseInt(Mr[l],16),t[a]=[r>>16&255,r>>8&255,r&255]}return t}let Zn;function mf(t){Zn||(Zn=pf(),Zn.transparent=[0,0,0,0]);const e=Zn[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const gf=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function bf(t){const e=gf.exec(t);let n=255,o,i,r;if(e){if(e[7]!==o){const l=+e[7];n=e[8]?on(l):dt(l*255,0,255)}return o=+e[1],i=+e[3],r=+e[5],o=255&(e[2]?on(o):dt(o,0,255)),i=255&(e[4]?on(i):dt(i,0,255)),r=255&(e[6]?on(r):dt(r,0,255)),{r:o,g:i,b:r,a:n}}}function yf(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Xe(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const wi=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Lt=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function $f(t,e,n){const o=Lt(Xe(t.r)),i=Lt(Xe(t.g)),r=Lt(Xe(t.b));return{r:ct(wi(o+n*(Lt(Xe(e.r))-o))),g:ct(wi(i+n*(Lt(Xe(e.g))-i))),b:ct(wi(r+n*(Lt(Xe(e.b))-r))),a:t.a+n*(e.a-t.a)}}function Jn(t,e,n){if(t){let o=yi(t);o[e]=Math.max(0,Math.min(o[e]+o[e]*n,e===0?360:1)),o=_i(o),t.r=o[0],t.g=o[1],t.b=o[2]}}function Vr(t,e){return t&&Object.assign(e||{},t)}function Br(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=ct(t[3]))):(e=Vr(t,{r:0,g:0,b:0,a:1}),e.a=ct(e.a)),e}function _f(t){return t.charAt(0)==="r"?bf(t):uf(t)}class sn{constructor(e){if(e instanceof sn)return e;const n=typeof e;let o;n==="object"?o=Br(e):n==="string"&&(o=tf(e)||mf(e)||_f(e)),this._rgb=o,this._valid=!!o}get valid(){return this._valid}get rgb(){var e=Vr(this._rgb);return e&&(e.a=Xe(e.a)),e}set rgb(e){this._rgb=Br(e)}rgbString(){return this._valid?yf(this._rgb):void 0}hexString(){return this._valid?of(this._rgb):void 0}hslString(){return this._valid?hf(this._rgb):void 0}mix(e,n){if(e){const o=this.rgb,i=e.rgb;let r;const l=n===r?.5:n,a=2*l-1,d=o.a-i.a,c=((a*d===-1?a:(a+d)/(1+a*d))+1)/2;r=1-c,o.r=255&c*o.r+r*i.r+.5,o.g=255&c*o.g+r*i.g+.5,o.b=255&c*o.b+r*i.b+.5,o.a=l*o.a+(1-l)*i.a,this.rgb=o}return this}interpolate(e,n){return e&&(this._rgb=$f(this._rgb,e._rgb,n)),this}clone(){return new sn(this.rgb)}alpha(e){return this._rgb.a=ct(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=nn(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Jn(this._rgb,2,e),this}darken(e){return Jn(this._rgb,2,-e),this}saturate(e){return Jn(this._rgb,1,e),this}desaturate(e){return Jn(this._rgb,1,-e),this}rotate(e){return ff(this._rgb,e),this}}/*!
|
|
15
15
|
* Chart.js v4.4.1
|
|
16
16
|
* https://www.chartjs.org
|
|
17
17
|
* (c) 2023 Chart.js Contributors
|
|
18
18
|
* Released under the MIT License
|
|
19
|
-
*/function Pe(){}const zc=(()=>{let t=0;return()=>t++})();function H(t){return t===null||typeof t>"u"}function q(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function z(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function ee(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function ye(t,e){return ee(t)?t:e}function T(t,e){return typeof t>"u"?e:t}const Hc=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,cs=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function G(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function W(t,e,n,o){let i,s,r;if(q(t))if(s=t.length,o)for(i=s-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i<s;i++)e.call(n,t[i],i);else if(z(t))for(r=Object.keys(t),s=r.length,i=0;i<s;i++)e.call(n,t[r[i]],r[i])}function Cn(t,e){let n,o,i,s;if(!t||!e||t.length!==e.length)return!1;for(n=0,o=t.length;n<o;++n)if(i=t[n],s=e[n],i.datasetIndex!==s.datasetIndex||i.index!==s.index)return!1;return!0}function kn(t){if(q(t))return t.map(kn);if(z(t)){const e=Object.create(null),n=Object.keys(t),o=n.length;let i=0;for(;i<o;++i)e[n[i]]=kn(t[n[i]]);return e}return t}function ds(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function jc(t,e,n,o){if(!ds(t))return;const i=e[t],s=n[t];z(i)&&z(s)?Lt(i,s,o):e[t]=kn(s)}function Lt(t,e,n){const o=q(e)?e:[e],i=o.length;if(!z(t))return t;n=n||{};const s=n.merger||jc;let r;for(let a=0;a<i;++a){if(r=o[a],!z(r))continue;const c=Object.keys(r);for(let d=0,u=c.length;d<u;++d)s(c[d],t,r,n)}return t}function Tt(t,e){return Lt(t,e,{merger:Wc})}function Wc(t,e,n){if(!ds(t))return;const o=e[t],i=n[t];z(o)&&z(i)?Tt(o,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=kn(i))}const us={"":t=>t,x:t=>t.x,y:t=>t.y};function Yc(t){const e=t.split("."),n=[];let o="";for(const i of e)o+=i,o.endsWith("\\")?o=o.slice(0,-1)+".":(n.push(o),o="");return n}function Gc(t){const e=Yc(t);return n=>{for(const o of e){if(o==="")break;n=n&&n[o]}return n}}function Ke(t,e){return(us[e]||(us[e]=Gc(e)))(t)}function Eo(t){return t.charAt(0).toUpperCase()+t.slice(1)}const zt=t=>typeof t<"u",Ze=t=>typeof t=="function",fs=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function Uc(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const X=Math.PI,K=2*X,qc=K+X,Sn=Number.POSITIVE_INFINITY,Xc=X/180,ne=X/2,ct=X/4,hs=X*2/3,Je=Math.log10,Ve=Math.sign;function Ht(t,e,n){return Math.abs(t-e)<n}function ps(t){const e=Math.round(t);t=Ht(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(Je(t))),o=t/n;return(o<=1?1:o<=2?2:o<=5?5:10)*n}function Kc(t){const e=[],n=Math.sqrt(t);let o;for(o=1;o<n;o++)t%o===0&&(e.push(o),e.push(t/o));return n===(n|0)&&e.push(n),e.sort((i,s)=>i-s).pop(),e}function Et(t){return!isNaN(parseFloat(t))&&isFinite(t)}function Zc(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function gs(t,e,n){let o,i,s;for(o=0,i=t.length;o<i;o++)s=t[o][n],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function ve(t){return t*(X/180)}function Do(t){return t*(180/X)}function ms(t){if(!ee(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function bs(t,e){const n=e.x-t.x,o=e.y-t.y,i=Math.sqrt(n*n+o*o);let s=Math.atan2(o,n);return s<-.5*X&&(s+=K),{angle:s,distance:i}}function Vo(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Jc(t,e){return(t-e+qc)%K-X}function _e(t){return(t%K+K)%K}function jt(t,e,n,o){const i=_e(t),s=_e(e),r=_e(n),a=_e(s-i),c=_e(r-i),d=_e(i-s),u=_e(i-r);return i===s||i===r||o&&s===r||a>c&&d<u}function se(t,e,n){return Math.max(e,Math.min(n,t))}function Qc(t){return se(t,-32768,32767)}function Ae(t,e,n,o=1e-6){return t>=Math.min(e,n)-o&&t<=Math.max(e,n)+o}function Ro(t,e,n){n=n||(r=>t[r]<e);let o=t.length-1,i=0,s;for(;o-i>1;)s=i+o>>1,n(s)?i=s:o=s;return{lo:i,hi:o}}const Oe=(t,e,n,o)=>Ro(t,n,o?i=>{const s=t[i][e];return s<n||s===n&&t[i+1][e]===n}:i=>t[i][e]<n),ed=(t,e,n)=>Ro(t,n,o=>t[o][e]>=n);function td(t,e,n){let o=0,i=t.length;for(;o<i&&t[o]<e;)o++;for(;i>o&&t[i-1]>n;)i--;return o>0||i<t.length?t.slice(o,i):t}const ys=["push","pop","shift","splice","unshift"];function nd(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),ys.forEach(n=>{const o="_onData"+Eo(n),i=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...s){const r=i.apply(this,s);return t._chartjs.listeners.forEach(a=>{typeof a[o]=="function"&&a[o](...s)}),r}})})}function _s(t,e){const n=t._chartjs;if(!n)return;const o=n.listeners,i=o.indexOf(e);i!==-1&&o.splice(i,1),!(o.length>0)&&(ys.forEach(s=>{delete t[s]}),delete t._chartjs)}function xs(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const ws=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function Cs(t,e){let n=[],o=!1;return function(...i){n=i,o||(o=!0,ws.call(window,()=>{o=!1,t.apply(e,n)}))}}function od(t,e){let n;return function(...o){return e?(clearTimeout(n),n=setTimeout(t,e,o)):t.apply(this,o),e}}const Fo=t=>t==="start"?"left":t==="end"?"right":"center",le=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,id=(t,e,n,o)=>t===(o?"left":"right")?n:t==="center"?(e+n)/2:e;function ks(t,e,n){const o=e.length;let i=0,s=o;if(t._sorted){const{iScale:r,_parsed:a}=t,c=r.axis,{min:d,max:u,minDefined:f,maxDefined:p}=r.getUserBounds();f&&(i=se(Math.min(Oe(a,c,d).lo,n?o:Oe(e,c,r.getPixelForValue(d)).lo),0,o-1)),p?s=se(Math.max(Oe(a,r.axis,u,!0).hi+1,n?0:Oe(e,c,r.getPixelForValue(u),!0).hi+1),i,o)-i:s=o-i}return{start:i,count:s}}function Ss(t){const{xScale:e,yScale:n,_scaleRanges:o}=t,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!o)return t._scaleRanges=i,!0;const s=o.xmin!==e.min||o.xmax!==e.max||o.ymin!==n.min||o.ymax!==n.max;return Object.assign(o,i),s}const vn=t=>t===0||t===1,vs=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*K/n)),Ms=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*K/n)+1,Wt={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*ne)+1,easeOutSine:t=>Math.sin(t*ne),easeInOutSine:t=>-.5*(Math.cos(X*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>vn(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>vn(t)?t:vs(t,.075,.3),easeOutElastic:t=>vn(t)?t:Ms(t,.075,.3),easeInOutElastic(t){return vn(t)?t:t<.5?.5*vs(t*2,.1125,.45):.5+.5*Ms(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-Wt.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?Wt.easeInBounce(t*2)*.5:Wt.easeOutBounce(t*2-1)*.5+.5};function Bo(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Es(t){return Bo(t)?t:new It(t)}function $o(t){return Bo(t)?t:new It(t).saturate(.5).darken(.1).hexString()}const sd=["x","y","borderWidth","radius","tension"],rd=["color","borderColor","backgroundColor"];function ld(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:rd},numbers:{type:"number",properties:sd}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function ad(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Ds=new Map;function cd(t,e){e=e||{};const n=t+JSON.stringify(e);let o=Ds.get(n);return o||(o=new Intl.NumberFormat(t,e),Ds.set(n,o)),o}function Yt(t,e,n){return cd(e,n).format(t)}const Vs={values(t){return q(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const o=this.chart.options.locale;let i,s=t;if(n.length>1){const d=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(d<1e-4||d>1e15)&&(i="scientific"),s=dd(t,n)}const r=Je(Math.abs(s)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),c={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(c,this.options.ticks.format),Yt(t,o,c)},logarithmic(t,e,n){if(t===0)return"0";const o=n[e].significand||t/Math.pow(10,Math.floor(Je(t)));return[1,2,3,5,10,15].includes(o)||e>.8*n.length?Vs.numeric.call(this,t,e,n):""}};function dd(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var Mn={formatters:Vs};function ud(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Mn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const dt=Object.create(null),Po=Object.create(null);function Gt(t,e){if(!e)return t;const n=e.split(".");for(let o=0,i=n.length;o<i;++o){const s=n[o];t=t[s]||(t[s]=Object.create(null))}return t}function Ao(t,e,n){return typeof e=="string"?Lt(Gt(t,e),n):Lt(Gt(t,""),e)}class fd{constructor(e,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=o=>o.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(o,i)=>$o(i.backgroundColor),this.hoverBorderColor=(o,i)=>$o(i.borderColor),this.hoverColor=(o,i)=>$o(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(n)}set(e,n){return Ao(this,e,n)}get(e){return Gt(this,e)}describe(e,n){return Ao(Po,e,n)}override(e,n){return Ao(dt,e,n)}route(e,n,o,i){const s=Gt(this,e),r=Gt(this,o),a="_"+n;Object.defineProperties(s,{[a]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const c=this[a],d=r[i];return z(c)?Object.assign({},d,c):T(c,d)},set(c){this[a]=c}}})}apply(e){e.forEach(n=>n(this))}}var te=new fd({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[ld,ad,ud]);function hd(t){return!t||H(t.size)||H(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function En(t,e,n,o,i){let s=e[i];return s||(s=e[i]=t.measureText(i).width,n.push(i)),s>o&&(o=s),o}function pd(t,e,n,o){o=o||{};let i=o.data=o.data||{},s=o.garbageCollect=o.garbageCollect||[];o.font!==e&&(i=o.data={},s=o.garbageCollect=[],o.font=e),t.save(),t.font=e;let r=0;const a=n.length;let c,d,u,f,p;for(c=0;c<a;c++)if(f=n[c],f!=null&&!q(f))r=En(t,i,s,r,f);else if(q(f))for(d=0,u=f.length;d<u;d++)p=f[d],p!=null&&!q(p)&&(r=En(t,i,s,r,p));t.restore();const h=s.length/2;if(h>n.length){for(c=0;c<h;c++)delete i[s[c]];s.splice(0,h)}return r}function ut(t,e,n){const o=t.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((e-i)*o)/o+i}function Rs(t,e){e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function Oo(t,e,n,o){Fs(t,e,n,o,null)}function Fs(t,e,n,o,i){let s,r,a,c,d,u,f,p;const h=e.pointStyle,g=e.rotation,m=e.radius;let b=(g||0)*Xc;if(h&&typeof h=="object"&&(s=h.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){t.save(),t.translate(n,o),t.rotate(b),t.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),t.restore();return}if(!(isNaN(m)||m<=0)){switch(t.beginPath(),h){default:i?t.ellipse(n,o,i/2,m,0,0,K):t.arc(n,o,m,0,K),t.closePath();break;case"triangle":u=i?i/2:m,t.moveTo(n+Math.sin(b)*u,o-Math.cos(b)*m),b+=hs,t.lineTo(n+Math.sin(b)*u,o-Math.cos(b)*m),b+=hs,t.lineTo(n+Math.sin(b)*u,o-Math.cos(b)*m),t.closePath();break;case"rectRounded":d=m*.516,c=m-d,r=Math.cos(b+ct)*c,f=Math.cos(b+ct)*(i?i/2-d:c),a=Math.sin(b+ct)*c,p=Math.sin(b+ct)*(i?i/2-d:c),t.arc(n-f,o-a,d,b-X,b-ne),t.arc(n+p,o-r,d,b-ne,b),t.arc(n+f,o+a,d,b,b+ne),t.arc(n-p,o+r,d,b+ne,b+X),t.closePath();break;case"rect":if(!g){c=Math.SQRT1_2*m,u=i?i/2:c,t.rect(n-u,o-c,2*u,2*c);break}b+=ct;case"rectRot":f=Math.cos(b)*(i?i/2:m),r=Math.cos(b)*m,a=Math.sin(b)*m,p=Math.sin(b)*(i?i/2:m),t.moveTo(n-f,o-a),t.lineTo(n+p,o-r),t.lineTo(n+f,o+a),t.lineTo(n-p,o+r),t.closePath();break;case"crossRot":b+=ct;case"cross":f=Math.cos(b)*(i?i/2:m),r=Math.cos(b)*m,a=Math.sin(b)*m,p=Math.sin(b)*(i?i/2:m),t.moveTo(n-f,o-a),t.lineTo(n+f,o+a),t.moveTo(n+p,o-r),t.lineTo(n-p,o+r);break;case"star":f=Math.cos(b)*(i?i/2:m),r=Math.cos(b)*m,a=Math.sin(b)*m,p=Math.sin(b)*(i?i/2:m),t.moveTo(n-f,o-a),t.lineTo(n+f,o+a),t.moveTo(n+p,o-r),t.lineTo(n-p,o+r),b+=ct,f=Math.cos(b)*(i?i/2:m),r=Math.cos(b)*m,a=Math.sin(b)*m,p=Math.sin(b)*(i?i/2:m),t.moveTo(n-f,o-a),t.lineTo(n+f,o+a),t.moveTo(n+p,o-r),t.lineTo(n-p,o+r);break;case"line":r=i?i/2:Math.cos(b)*m,a=Math.sin(b)*m,t.moveTo(n-r,o-a),t.lineTo(n+r,o+a);break;case"dash":t.moveTo(n,o),t.lineTo(n+Math.cos(b)*(i?i/2:m),o+Math.sin(b)*m);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function Ne(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function Dn(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Vn(t){t.restore()}function gd(t,e,n,o,i){if(!e)return t.lineTo(n.x,n.y);if(i==="middle"){const s=(e.x+n.x)/2;t.lineTo(s,e.y),t.lineTo(s,n.y)}else i==="after"!=!!o?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function md(t,e,n,o){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(o?e.cp1x:e.cp2x,o?e.cp1y:e.cp2y,o?n.cp2x:n.cp1x,o?n.cp2y:n.cp1y,n.x,n.y)}function bd(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),H(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function yd(t,e,n,o,i){if(i.strikethrough||i.underline){const s=t.measureText(o),r=e-s.actualBoundingBoxLeft,a=e+s.actualBoundingBoxRight,c=n-s.actualBoundingBoxAscent,d=n+s.actualBoundingBoxDescent,u=i.strikethrough?(c+d)/2:d;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=i.decorationWidth||2,t.moveTo(r,u),t.lineTo(a,u),t.stroke()}}function _d(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function ft(t,e,n,o,i,s={}){const r=q(e)?e:[e],a=s.strokeWidth>0&&s.strokeColor!=="";let c,d;for(t.save(),t.font=i.string,bd(t,s),c=0;c<r.length;++c)d=r[c],s.backdrop&&_d(t,s.backdrop),a&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),H(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(d,n,o,s.maxWidth)),t.fillText(d,n,o,s.maxWidth),yd(t,n,o,d,s),o+=Number(i.lineHeight);t.restore()}function Ut(t,e){const{x:n,y:o,w:i,h:s,radius:r}=e;t.arc(n+r.topLeft,o+r.topLeft,r.topLeft,1.5*X,X,!0),t.lineTo(n,o+s-r.bottomLeft),t.arc(n+r.bottomLeft,o+s-r.bottomLeft,r.bottomLeft,X,ne,!0),t.lineTo(n+i-r.bottomRight,o+s),t.arc(n+i-r.bottomRight,o+s-r.bottomRight,r.bottomRight,ne,0,!0),t.lineTo(n+i,o+r.topRight),t.arc(n+i-r.topRight,o+r.topRight,r.topRight,0,-ne,!0),t.lineTo(n+r.topLeft,o)}const xd=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,wd=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Cd(t,e){const n=(""+t).match(xd);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const kd=t=>+t||0;function No(t,e){const n={},o=z(e),i=o?Object.keys(e):e,s=z(t)?o?r=>T(t[r],t[e[r]]):r=>t[r]:()=>t;for(const r of i)n[r]=kd(s(r));return n}function Bs(t){return No(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ht(t){return No(t,["topLeft","topRight","bottomLeft","bottomRight"])}function ae(t){const e=Bs(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function oe(t,e){t=t||{},e=e||te.font;let n=T(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let o=T(t.style,e.style);o&&!(""+o).match(wd)&&(console.warn('Invalid font style specified: "'+o+'"'),o=void 0);const i={family:T(t.family,e.family),lineHeight:Cd(T(t.lineHeight,e.lineHeight),n),size:n,style:o,weight:T(t.weight,e.weight),string:""};return i.string=hd(i),i}function qt(t,e,n,o){let i=!0,s,r,a;for(s=0,r=t.length;s<r;++s)if(a=t[s],a!==void 0&&(e!==void 0&&typeof a=="function"&&(a=a(e),i=!1),n!==void 0&&q(a)&&(a=a[n%a.length],i=!1),a!==void 0))return o&&!i&&(o.cacheable=!1),a}function Sd(t,e,n){const{min:o,max:i}=t,s=cs(e,(i-o)/2),r=(a,c)=>n&&a===0?0:a+c;return{min:r(o,-Math.abs(s)),max:r(i,s)}}function Qe(t,e){return Object.assign(Object.create(t),e)}function Io(t,e=[""],n,o,i=()=>t[0]){const s=n||t;typeof o>"u"&&(o=Ns("_fallback",t));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:s,_fallback:o,_getTarget:i,override:a=>Io([a,...t],e,s,o)};return new Proxy(r,{deleteProperty(a,c){return delete a[c],delete a._keys,delete t[0][c],!0},get(a,c){return Ps(a,c,()=>Bd(c,e,t,a))},getOwnPropertyDescriptor(a,c){return Reflect.getOwnPropertyDescriptor(a._scopes[0],c)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(a,c){return Is(a).includes(c)},ownKeys(a){return Is(a)},set(a,c,d){const u=a._storage||(a._storage=i());return a[c]=u[c]=d,delete a._keys,!0}})}function Dt(t,e,n,o){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:$s(t,o),setContext:s=>Dt(t,s,n,o),override:s=>Dt(t.override(s),e,n,o)};return new Proxy(i,{deleteProperty(s,r){return delete s[r],delete t[r],!0},get(s,r,a){return Ps(s,r,()=>Md(s,r,a))},getOwnPropertyDescriptor(s,r){return s._descriptors.allKeys?Reflect.has(t,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,r)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(s,r){return Reflect.has(t,r)},ownKeys(){return Reflect.ownKeys(t)},set(s,r,a){return t[r]=a,delete s[r],!0}})}function $s(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:o=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:n,indexable:o,isScriptable:Ze(n)?n:()=>n,isIndexable:Ze(o)?o:()=>o}}const vd=(t,e)=>t?t+Eo(e):e,Lo=(t,e)=>z(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Ps(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const o=n();return t[e]=o,o}function Md(t,e,n){const{_proxy:o,_context:i,_subProxy:s,_descriptors:r}=t;let a=o[e];return Ze(a)&&r.isScriptable(e)&&(a=Ed(e,a,t,n)),q(a)&&a.length&&(a=Dd(e,a,t,r.isIndexable)),Lo(e,a)&&(a=Dt(a,i,s&&s[e],r)),a}function Ed(t,e,n,o){const{_proxy:i,_context:s,_subProxy:r,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let c=e(s,r||o);return a.delete(t),Lo(t,c)&&(c=To(i._scopes,i,t,c)),c}function Dd(t,e,n,o){const{_proxy:i,_context:s,_subProxy:r,_descriptors:a}=n;if(typeof s.index<"u"&&o(t))return e[s.index%e.length];if(z(e[0])){const c=e,d=i._scopes.filter(u=>u!==c);e=[];for(const u of c){const f=To(d,i,t,u);e.push(Dt(f,s,r&&r[t],a))}}return e}function As(t,e,n){return Ze(t)?t(e,n):t}const Vd=(t,e)=>t===!0?e:typeof t=="string"?Ke(e,t):void 0;function Rd(t,e,n,o,i){for(const s of e){const r=Vd(n,s);if(r){t.add(r);const a=As(r._fallback,n,i);if(typeof a<"u"&&a!==n&&a!==o)return a}else if(r===!1&&typeof o<"u"&&n!==o)return null}return!1}function To(t,e,n,o){const i=e._rootScopes,s=As(e._fallback,n,o),r=[...t,...i],a=new Set;a.add(o);let c=Os(a,r,n,s||n,o);return c===null||typeof s<"u"&&s!==n&&(c=Os(a,r,s,c,o),c===null)?!1:Io(Array.from(a),[""],i,s,()=>Fd(e,n,o))}function Os(t,e,n,o,i){for(;n;)n=Rd(t,e,n,o,i);return n}function Fd(t,e,n){const o=t._getTarget();e in o||(o[e]={});const i=o[e];return q(i)&&z(n)?n:i||{}}function Bd(t,e,n,o){let i;for(const s of e)if(i=Ns(vd(s,t),n),typeof i<"u")return Lo(t,i)?To(n,o,t,i):i}function Ns(t,e){for(const n of e){if(!n)continue;const o=n[t];if(typeof o<"u")return o}}function Is(t){let e=t._keys;return e||(e=t._keys=$d(t._scopes)),e}function $d(t){const e=new Set;for(const n of t)for(const o of Object.keys(n).filter(i=>!i.startsWith("_")))e.add(o);return Array.from(e)}function Ls(t,e,n,o){const{iScale:i}=t,{key:s="r"}=this._parsing,r=new Array(o);let a,c,d,u;for(a=0,c=o;a<c;++a)d=a+n,u=e[d],r[a]={r:i.parse(Ke(u,s),d)};return r}const Pd=Number.EPSILON||1e-14,Vt=(t,e)=>e<t.length&&!t[e].skip&&t[e],Ts=t=>t==="x"?"y":"x";function Ad(t,e,n,o){const i=t.skip?e:t,s=e,r=n.skip?e:n,a=Vo(s,i),c=Vo(r,s);let d=a/(a+c),u=c/(a+c);d=isNaN(d)?0:d,u=isNaN(u)?0:u;const f=o*d,p=o*u;return{previous:{x:s.x-f*(r.x-i.x),y:s.y-f*(r.y-i.y)},next:{x:s.x+p*(r.x-i.x),y:s.y+p*(r.y-i.y)}}}function Od(t,e,n){const o=t.length;let i,s,r,a,c,d=Vt(t,0);for(let u=0;u<o-1;++u)if(c=d,d=Vt(t,u+1),!(!c||!d)){if(Ht(e[u],0,Pd)){n[u]=n[u+1]=0;continue}i=n[u]/e[u],s=n[u+1]/e[u],a=Math.pow(i,2)+Math.pow(s,2),!(a<=9)&&(r=3/Math.sqrt(a),n[u]=i*r*e[u],n[u+1]=s*r*e[u])}}function Nd(t,e,n="x"){const o=Ts(n),i=t.length;let s,r,a,c=Vt(t,0);for(let d=0;d<i;++d){if(r=a,a=c,c=Vt(t,d+1),!a)continue;const u=a[n],f=a[o];r&&(s=(u-r[n])/3,a[`cp1${n}`]=u-s,a[`cp1${o}`]=f-s*e[d]),c&&(s=(c[n]-u)/3,a[`cp2${n}`]=u+s,a[`cp2${o}`]=f+s*e[d])}}function Id(t,e="x"){const n=Ts(e),o=t.length,i=Array(o).fill(0),s=Array(o);let r,a,c,d=Vt(t,0);for(r=0;r<o;++r)if(a=c,c=d,d=Vt(t,r+1),!!c){if(d){const u=d[e]-c[e];i[r]=u!==0?(d[n]-c[n])/u:0}s[r]=a?d?Ve(i[r-1])!==Ve(i[r])?0:(i[r-1]+i[r])/2:i[r-1]:i[r]}Od(t,i,s),Nd(t,s,e)}function Rn(t,e,n){return Math.max(Math.min(t,n),e)}function Ld(t,e){let n,o,i,s,r,a=Ne(t[0],e);for(n=0,o=t.length;n<o;++n)r=s,s=a,a=n<o-1&&Ne(t[n+1],e),s&&(i=t[n],r&&(i.cp1x=Rn(i.cp1x,e.left,e.right),i.cp1y=Rn(i.cp1y,e.top,e.bottom)),a&&(i.cp2x=Rn(i.cp2x,e.left,e.right),i.cp2y=Rn(i.cp2y,e.top,e.bottom)))}function Td(t,e,n,o,i){let s,r,a,c;if(e.spanGaps&&(t=t.filter(d=>!d.skip)),e.cubicInterpolationMode==="monotone")Id(t,i);else{let d=o?t[t.length-1]:t[0];for(s=0,r=t.length;s<r;++s)a=t[s],c=Ad(d,a,t[Math.min(s+1,r-(o?0:1))%r],e.tension),a.cp1x=c.previous.x,a.cp1y=c.previous.y,a.cp2x=c.next.x,a.cp2y=c.next.y,d=a}e.capBezierPoints&&Ld(t,n)}function zo(){return typeof window<"u"&&typeof document<"u"}function Ho(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function Fn(t,e,n){let o;return typeof t=="string"?(o=parseInt(t,10),t.indexOf("%")!==-1&&(o=o/100*e.parentNode[n])):o=t,o}const Bn=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function zd(t,e){return Bn(t).getPropertyValue(e)}const Hd=["top","right","bottom","left"];function pt(t,e,n){const o={};n=n?"-"+n:"";for(let i=0;i<4;i++){const s=Hd[i];o[s]=parseFloat(t[e+"-"+s+n])||0}return o.width=o.left+o.right,o.height=o.top+o.bottom,o}const jd=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function Wd(t,e){const n=t.touches,o=n&&n.length?n[0]:t,{offsetX:i,offsetY:s}=o;let r=!1,a,c;if(jd(i,s,t.target))a=i,c=s;else{const d=e.getBoundingClientRect();a=o.clientX-d.left,c=o.clientY-d.top,r=!0}return{x:a,y:c,box:r}}function gt(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:o}=e,i=Bn(n),s=i.boxSizing==="border-box",r=pt(i,"padding"),a=pt(i,"border","width"),{x:c,y:d,box:u}=Wd(t,n),f=r.left+(u&&a.left),p=r.top+(u&&a.top);let{width:h,height:g}=e;return s&&(h-=r.width+a.width,g-=r.height+a.height),{x:Math.round((c-f)/h*n.width/o),y:Math.round((d-p)/g*n.height/o)}}function Yd(t,e,n){let o,i;if(e===void 0||n===void 0){const s=Ho(t);if(!s)e=t.clientWidth,n=t.clientHeight;else{const r=s.getBoundingClientRect(),a=Bn(s),c=pt(a,"border","width"),d=pt(a,"padding");e=r.width-d.width-c.width,n=r.height-d.height-c.height,o=Fn(a.maxWidth,s,"clientWidth"),i=Fn(a.maxHeight,s,"clientHeight")}}return{width:e,height:n,maxWidth:o||Sn,maxHeight:i||Sn}}const $n=t=>Math.round(t*10)/10;function Gd(t,e,n,o){const i=Bn(t),s=pt(i,"margin"),r=Fn(i.maxWidth,t,"clientWidth")||Sn,a=Fn(i.maxHeight,t,"clientHeight")||Sn,c=Yd(t,e,n);let{width:d,height:u}=c;if(i.boxSizing==="content-box"){const p=pt(i,"border","width"),h=pt(i,"padding");d-=h.width+p.width,u-=h.height+p.height}return d=Math.max(0,d-s.width),u=Math.max(0,o?d/o:u-s.height),d=$n(Math.min(d,r,c.maxWidth)),u=$n(Math.min(u,a,c.maxHeight)),d&&!u&&(u=$n(d/2)),(e!==void 0||n!==void 0)&&o&&c.height&&u>c.height&&(u=c.height,d=$n(Math.floor(u*o))),{width:d,height:u}}function zs(t,e,n){const o=e||1,i=Math.floor(t.height*o),s=Math.floor(t.width*o);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const r=t.canvas;return r.style&&(n||!r.style.height&&!r.style.width)&&(r.style.height=`${t.height}px`,r.style.width=`${t.width}px`),t.currentDevicePixelRatio!==o||r.height!==i||r.width!==s?(t.currentDevicePixelRatio=o,r.height=i,r.width=s,t.ctx.setTransform(o,0,0,o,0,0),!0):!1}const Ud=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};zo()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function Hs(t,e){const n=zd(t,e),o=n&&n.match(/^(\d+)(\.\d+)?px$/);return o?+o[1]:void 0}function mt(t,e,n,o){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function qd(t,e,n,o){return{x:t.x+n*(e.x-t.x),y:o==="middle"?n<.5?t.y:e.y:o==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function Xd(t,e,n,o){const i={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},r=mt(t,i,n),a=mt(i,s,n),c=mt(s,e,n),d=mt(r,a,n),u=mt(a,c,n);return mt(d,u,n)}const Kd=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,o){return n-o},leftForLtr(n,o){return n-o}}},Zd=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function Rt(t,e,n){return t?Kd(e,n):Zd()}function js(t,e){let n,o;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,o=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=o)}function Ws(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Ys(t){return t==="angle"?{between:jt,compare:Jc,normalize:_e}:{between:Ae,compare:(e,n)=>e-n,normalize:e=>e}}function Gs({start:t,end:e,count:n,loop:o,style:i}){return{start:t%n,end:e%n,loop:o&&(e-t+1)%n===0,style:i}}function Jd(t,e,n){const{property:o,start:i,end:s}=n,{between:r,normalize:a}=Ys(o),c=e.length;let{start:d,end:u,loop:f}=t,p,h;if(f){for(d+=c,u+=c,p=0,h=c;p<h&&r(a(e[d%c][o]),i,s);++p)d--,u--;d%=c,u%=c}return u<d&&(u+=c),{start:d,end:u,loop:f,style:t.style}}function Us(t,e,n){if(!n)return[t];const{property:o,start:i,end:s}=n,r=e.length,{compare:a,between:c,normalize:d}=Ys(o),{start:u,end:f,loop:p,style:h}=Jd(t,e,n),g=[];let m=!1,b=null,x,y,w;const S=()=>c(i,w,x)&&a(i,w)!==0,_=()=>a(s,x)===0||c(s,w,x),C=()=>m||S(),v=()=>!m||_();for(let k=u,M=u;k<=f;++k)y=e[k%r],!y.skip&&(x=d(y[o]),x!==w&&(m=c(x,i,s),b===null&&C()&&(b=a(x,i)===0?k:M),b!==null&&v()&&(g.push(Gs({start:b,end:k,loop:p,count:r,style:h})),b=null),M=k,w=x));return b!==null&&g.push(Gs({start:b,end:f,loop:p,count:r,style:h})),g}function qs(t,e){const n=[],o=t.segments;for(let i=0;i<o.length;i++){const s=Us(o[i],t.points,e);s.length&&n.push(...s)}return n}function Qd(t,e,n,o){let i=0,s=e-1;if(n&&!o)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,n&&(s+=i);s>i&&t[s%e].skip;)s--;return s%=e,{start:i,end:s}}function eu(t,e,n,o){const i=t.length,s=[];let r=e,a=t[e],c;for(c=e+1;c<=n;++c){const d=t[c%i];d.skip||d.stop?a.skip||(o=!1,s.push({start:e%i,end:(c-1)%i,loop:o}),e=r=d.stop?c:null):(r=c,a.skip&&(e=c)),a=d}return r!==null&&s.push({start:e%i,end:r%i,loop:o}),s}function tu(t,e){const n=t.points,o=t.options.spanGaps,i=n.length;if(!i)return[];const s=!!t._loop,{start:r,end:a}=Qd(n,i,s,o);if(o===!0)return Xs(t,[{start:r,end:a,loop:s}],n,e);const c=a<r?a+i:a,d=!!t._fullLoop&&r===0&&a===i-1;return Xs(t,eu(n,r,c,d),n,e)}function Xs(t,e,n,o){return!o||!o.setContext||!n?e:nu(t,e,n,o)}function nu(t,e,n,o){const i=t._chart.getContext(),s=Ks(t.options),{_datasetIndex:r,options:{spanGaps:a}}=t,c=n.length,d=[];let u=s,f=e[0].start,p=f;function h(g,m,b,x){const y=a?-1:1;if(g!==m){for(g+=c;n[g%c].skip;)g-=y;for(;n[m%c].skip;)m+=y;g%c!==m%c&&(d.push({start:g%c,end:m%c,loop:b,style:x}),u=x,f=m%c)}}for(const g of e){f=a?f:g.start;let m=n[f%c],b;for(p=f+1;p<=g.end;p++){const x=n[p%c];b=Ks(o.setContext(Qe(i,{type:"segment",p0:m,p1:x,p0DataIndex:(p-1)%c,p1DataIndex:p%c,datasetIndex:r}))),ou(b,u)&&h(f,p-1,g.loop,u),m=x,u=b}f<p-1&&h(f,p-1,g.loop,u)}return d}function Ks(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function ou(t,e){if(!e)return!1;const n=[],o=function(i,s){return Bo(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(t,o)!==JSON.stringify(e,o)}/*!
|
|
19
|
+
*/function Ke(){}const wf=(()=>{let t=0;return()=>t++})();function q(t){return t===null||typeof t>"u"}function ne(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function G(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function ae(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function ve(t,e){return ae(t)?t:e}function W(t,e){return typeof t>"u"?e:t}const xf=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,Pr=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function te(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function Q(t,e,n,o){let i,r,l;if(ne(t))if(r=t.length,o)for(i=r-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i<r;i++)e.call(n,t[i],i);else if(G(t))for(l=Object.keys(t),r=l.length,i=0;i<r;i++)e.call(n,t[l[i]],l[i])}function Qn(t,e){let n,o,i,r;if(!t||!e||t.length!==e.length)return!1;for(n=0,o=t.length;n<o;++n)if(i=t[n],r=e[n],i.datasetIndex!==r.datasetIndex||i.index!==r.index)return!1;return!0}function eo(t){if(ne(t))return t.map(eo);if(G(t)){const e=Object.create(null),n=Object.keys(t),o=n.length;let i=0;for(;i<o;++i)e[n[i]]=eo(t[n[i]]);return e}return t}function Nr(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function Cf(t,e,n,o){if(!Nr(t))return;const i=e[t],r=n[t];G(i)&&G(r)?rn(i,r,o):e[t]=eo(r)}function rn(t,e,n){const o=ne(e)?e:[e],i=o.length;if(!G(t))return t;n=n||{};const r=n.merger||Cf;let l;for(let a=0;a<i;++a){if(l=o[a],!G(l))continue;const d=Object.keys(l);for(let c=0,u=d.length;c<u;++c)r(d[c],t,l,n)}return t}function ln(t,e){return rn(t,e,{merger:kf})}function kf(t,e,n){if(!Nr(t))return;const o=e[t],i=n[t];G(o)&&G(i)?ln(o,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=eo(i))}const Fr={"":t=>t,x:t=>t.x,y:t=>t.y};function Sf(t){const e=t.split("."),n=[];let o="";for(const i of e)o+=i,o.endsWith("\\")?o=o.slice(0,-1)+".":(n.push(o),o="");return n}function vf(t){const e=Sf(t);return n=>{for(const o of e){if(o==="")break;n=n&&n[o]}return n}}function ut(t,e){return(Fr[e]||(Fr[e]=vf(e)))(t)}function xi(t){return t.charAt(0).toUpperCase()+t.slice(1)}const an=t=>typeof t<"u",ft=t=>typeof t=="function",Rr=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function Df(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const oe=Math.PI,ie=2*oe,Ef=ie+oe,to=Number.POSITIVE_INFINITY,Mf=oe/180,ce=oe/2,kt=oe/4,Ar=oe*2/3,ht=Math.log10,je=Math.sign;function dn(t,e,n){return Math.abs(t-e)<n}function Or(t){const e=Math.round(t);t=dn(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(ht(t))),o=t/n;return(o<=1?1:o<=2?2:o<=5?5:10)*n}function Vf(t){const e=[],n=Math.sqrt(t);let o;for(o=1;o<n;o++)t%o===0&&(e.push(o),e.push(t/o));return n===(n|0)&&e.push(n),e.sort((i,r)=>i-r).pop(),e}function zt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function Bf(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function Ir(t,e,n){let o,i,r;for(o=0,i=t.length;o<i;o++)r=t[o][n],isNaN(r)||(e.min=Math.min(e.min,r),e.max=Math.max(e.max,r))}function Re(t){return t*(oe/180)}function Ci(t){return t*(180/oe)}function Tr(t){if(!ae(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Lr(t,e){const n=e.x-t.x,o=e.y-t.y,i=Math.sqrt(n*n+o*o);let r=Math.atan2(o,n);return r<-.5*oe&&(r+=ie),{angle:r,distance:i}}function ki(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Pf(t,e){return(t-e+Ef)%ie-oe}function De(t){return(t%ie+ie)%ie}function cn(t,e,n,o){const i=De(t),r=De(e),l=De(n),a=De(r-i),d=De(l-i),c=De(i-r),u=De(i-l);return i===r||i===l||o&&r===l||a>d&&c<u}function pe(t,e,n){return Math.max(e,Math.min(n,t))}function Nf(t){return pe(t,-32768,32767)}function Ze(t,e,n,o=1e-6){return t>=Math.min(e,n)-o&&t<=Math.max(e,n)+o}function Si(t,e,n){n=n||(l=>t[l]<e);let o=t.length-1,i=0,r;for(;o-i>1;)r=i+o>>1,n(r)?i=r:o=r;return{lo:i,hi:o}}const Je=(t,e,n,o)=>Si(t,n,o?i=>{const r=t[i][e];return r<n||r===n&&t[i+1][e]===n}:i=>t[i][e]<n),Ff=(t,e,n)=>Si(t,n,o=>t[o][e]>=n);function Rf(t,e,n){let o=0,i=t.length;for(;o<i&&t[o]<e;)o++;for(;i>o&&t[i-1]>n;)i--;return o>0||i<t.length?t.slice(o,i):t}const zr=["push","pop","shift","splice","unshift"];function Af(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),zr.forEach(n=>{const o="_onData"+xi(n),i=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...r){const l=i.apply(this,r);return t._chartjs.listeners.forEach(a=>{typeof a[o]=="function"&&a[o](...r)}),l}})})}function Hr(t,e){const n=t._chartjs;if(!n)return;const o=n.listeners,i=o.indexOf(e);i!==-1&&o.splice(i,1),!(o.length>0)&&(zr.forEach(r=>{delete t[r]}),delete t._chartjs)}function jr(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const Wr=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function Yr(t,e){let n=[],o=!1;return function(...i){n=i,o||(o=!0,Wr.call(window,()=>{o=!1,t.apply(e,n)}))}}function Of(t,e){let n;return function(...o){return e?(clearTimeout(n),n=setTimeout(t,e,o)):t.apply(this,o),e}}const vi=t=>t==="start"?"left":t==="end"?"right":"center",ge=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,If=(t,e,n,o)=>t===(o?"left":"right")?n:t==="center"?(e+n)/2:e;function Ur(t,e,n){const o=e.length;let i=0,r=o;if(t._sorted){const{iScale:l,_parsed:a}=t,d=l.axis,{min:c,max:u,minDefined:f,maxDefined:h}=l.getUserBounds();f&&(i=pe(Math.min(Je(a,d,c).lo,n?o:Je(e,d,l.getPixelForValue(c)).lo),0,o-1)),h?r=pe(Math.max(Je(a,l.axis,u,!0).hi+1,n?0:Je(e,d,l.getPixelForValue(u),!0).hi+1),i,o)-i:r=o-i}return{start:i,count:r}}function Gr(t){const{xScale:e,yScale:n,_scaleRanges:o}=t,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!o)return t._scaleRanges=i,!0;const r=o.xmin!==e.min||o.xmax!==e.max||o.ymin!==n.min||o.ymax!==n.max;return Object.assign(o,i),r}const no=t=>t===0||t===1,qr=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*ie/n)),Xr=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*ie/n)+1,un={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*ce)+1,easeOutSine:t=>Math.sin(t*ce),easeInOutSine:t=>-.5*(Math.cos(oe*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>no(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>no(t)?t:qr(t,.075,.3),easeOutElastic:t=>no(t)?t:Xr(t,.075,.3),easeInOutElastic(t){return no(t)?t:t<.5?.5*qr(t*2,.1125,.45):.5+.5*Xr(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-un.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?un.easeInBounce(t*2)*.5:un.easeOutBounce(t*2-1)*.5+.5};function Di(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Kr(t){return Di(t)?t:new sn(t)}function Ei(t){return Di(t)?t:new sn(t).saturate(.5).darken(.1).hexString()}const Tf=["x","y","borderWidth","radius","tension"],Lf=["color","borderColor","backgroundColor"];function zf(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:Lf},numbers:{type:"number",properties:Tf}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function Hf(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Zr=new Map;function jf(t,e){e=e||{};const n=t+JSON.stringify(e);let o=Zr.get(n);return o||(o=new Intl.NumberFormat(t,e),Zr.set(n,o)),o}function fn(t,e,n){return jf(e,n).format(t)}const Jr={values(t){return ne(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const o=this.chart.options.locale;let i,r=t;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),r=Wf(t,n)}const l=ht(Math.abs(r)),a=isNaN(l)?1:Math.max(Math.min(-1*Math.floor(l),20),0),d={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(d,this.options.ticks.format),fn(t,o,d)},logarithmic(t,e,n){if(t===0)return"0";const o=n[e].significand||t/Math.pow(10,Math.floor(ht(t)));return[1,2,3,5,10,15].includes(o)||e>.8*n.length?Jr.numeric.call(this,t,e,n):""}};function Wf(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var oo={formatters:Jr};function Yf(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:oo.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const St=Object.create(null),Mi=Object.create(null);function hn(t,e){if(!e)return t;const n=e.split(".");for(let o=0,i=n.length;o<i;++o){const r=n[o];t=t[r]||(t[r]=Object.create(null))}return t}function Vi(t,e,n){return typeof e=="string"?rn(hn(t,e),n):rn(hn(t,""),e)}class Uf{constructor(e,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=o=>o.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(o,i)=>Ei(i.backgroundColor),this.hoverBorderColor=(o,i)=>Ei(i.borderColor),this.hoverColor=(o,i)=>Ei(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(n)}set(e,n){return Vi(this,e,n)}get(e){return hn(this,e)}describe(e,n){return Vi(Mi,e,n)}override(e,n){return Vi(St,e,n)}route(e,n,o,i){const r=hn(this,e),l=hn(this,o),a="_"+n;Object.defineProperties(r,{[a]:{value:r[n],writable:!0},[n]:{enumerable:!0,get(){const d=this[a],c=l[i];return G(d)?Object.assign({},c,d):W(d,c)},set(d){this[a]=d}}})}apply(e){e.forEach(n=>n(this))}}var de=new Uf({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[zf,Hf,Yf]);function Gf(t){return!t||q(t.size)||q(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function io(t,e,n,o,i){let r=e[i];return r||(r=e[i]=t.measureText(i).width,n.push(i)),r>o&&(o=r),o}function qf(t,e,n,o){o=o||{};let i=o.data=o.data||{},r=o.garbageCollect=o.garbageCollect||[];o.font!==e&&(i=o.data={},r=o.garbageCollect=[],o.font=e),t.save(),t.font=e;let l=0;const a=n.length;let d,c,u,f,h;for(d=0;d<a;d++)if(f=n[d],f!=null&&!ne(f))l=io(t,i,r,l,f);else if(ne(f))for(c=0,u=f.length;c<u;c++)h=f[c],h!=null&&!ne(h)&&(l=io(t,i,r,l,h));t.restore();const p=r.length/2;if(p>n.length){for(d=0;d<p;d++)delete i[r[d]];r.splice(0,p)}return l}function vt(t,e,n){const o=t.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((e-i)*o)/o+i}function Qr(t,e){e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function Bi(t,e,n,o){el(t,e,n,o,null)}function el(t,e,n,o,i){let r,l,a,d,c,u,f,h;const p=e.pointStyle,m=e.rotation,g=e.radius;let b=(m||0)*Mf;if(p&&typeof p=="object"&&(r=p.toString(),r==="[object HTMLImageElement]"||r==="[object HTMLCanvasElement]")){t.save(),t.translate(n,o),t.rotate(b),t.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),t.restore();return}if(!(isNaN(g)||g<=0)){switch(t.beginPath(),p){default:i?t.ellipse(n,o,i/2,g,0,0,ie):t.arc(n,o,g,0,ie),t.closePath();break;case"triangle":u=i?i/2:g,t.moveTo(n+Math.sin(b)*u,o-Math.cos(b)*g),b+=Ar,t.lineTo(n+Math.sin(b)*u,o-Math.cos(b)*g),b+=Ar,t.lineTo(n+Math.sin(b)*u,o-Math.cos(b)*g),t.closePath();break;case"rectRounded":c=g*.516,d=g-c,l=Math.cos(b+kt)*d,f=Math.cos(b+kt)*(i?i/2-c:d),a=Math.sin(b+kt)*d,h=Math.sin(b+kt)*(i?i/2-c:d),t.arc(n-f,o-a,c,b-oe,b-ce),t.arc(n+h,o-l,c,b-ce,b),t.arc(n+f,o+a,c,b,b+ce),t.arc(n-h,o+l,c,b+ce,b+oe),t.closePath();break;case"rect":if(!m){d=Math.SQRT1_2*g,u=i?i/2:d,t.rect(n-u,o-d,2*u,2*d);break}b+=kt;case"rectRot":f=Math.cos(b)*(i?i/2:g),l=Math.cos(b)*g,a=Math.sin(b)*g,h=Math.sin(b)*(i?i/2:g),t.moveTo(n-f,o-a),t.lineTo(n+h,o-l),t.lineTo(n+f,o+a),t.lineTo(n-h,o+l),t.closePath();break;case"crossRot":b+=kt;case"cross":f=Math.cos(b)*(i?i/2:g),l=Math.cos(b)*g,a=Math.sin(b)*g,h=Math.sin(b)*(i?i/2:g),t.moveTo(n-f,o-a),t.lineTo(n+f,o+a),t.moveTo(n+h,o-l),t.lineTo(n-h,o+l);break;case"star":f=Math.cos(b)*(i?i/2:g),l=Math.cos(b)*g,a=Math.sin(b)*g,h=Math.sin(b)*(i?i/2:g),t.moveTo(n-f,o-a),t.lineTo(n+f,o+a),t.moveTo(n+h,o-l),t.lineTo(n-h,o+l),b+=kt,f=Math.cos(b)*(i?i/2:g),l=Math.cos(b)*g,a=Math.sin(b)*g,h=Math.sin(b)*(i?i/2:g),t.moveTo(n-f,o-a),t.lineTo(n+f,o+a),t.moveTo(n+h,o-l),t.lineTo(n-h,o+l);break;case"line":l=i?i/2:Math.cos(b)*g,a=Math.sin(b)*g,t.moveTo(n-l,o-a),t.lineTo(n+l,o+a);break;case"dash":t.moveTo(n,o),t.lineTo(n+Math.cos(b)*(i?i/2:g),o+Math.sin(b)*g);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function Qe(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function so(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function ro(t){t.restore()}function Xf(t,e,n,o,i){if(!e)return t.lineTo(n.x,n.y);if(i==="middle"){const r=(e.x+n.x)/2;t.lineTo(r,e.y),t.lineTo(r,n.y)}else i==="after"!=!!o?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function Kf(t,e,n,o){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(o?e.cp1x:e.cp2x,o?e.cp1y:e.cp2y,o?n.cp2x:n.cp1x,o?n.cp2y:n.cp1y,n.x,n.y)}function Zf(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),q(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function Jf(t,e,n,o,i){if(i.strikethrough||i.underline){const r=t.measureText(o),l=e-r.actualBoundingBoxLeft,a=e+r.actualBoundingBoxRight,d=n-r.actualBoundingBoxAscent,c=n+r.actualBoundingBoxDescent,u=i.strikethrough?(d+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=i.decorationWidth||2,t.moveTo(l,u),t.lineTo(a,u),t.stroke()}}function Qf(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Dt(t,e,n,o,i,r={}){const l=ne(e)?e:[e],a=r.strokeWidth>0&&r.strokeColor!=="";let d,c;for(t.save(),t.font=i.string,Zf(t,r),d=0;d<l.length;++d)c=l[d],r.backdrop&&Qf(t,r.backdrop),a&&(r.strokeColor&&(t.strokeStyle=r.strokeColor),q(r.strokeWidth)||(t.lineWidth=r.strokeWidth),t.strokeText(c,n,o,r.maxWidth)),t.fillText(c,n,o,r.maxWidth),Jf(t,n,o,c,r),o+=Number(i.lineHeight);t.restore()}function pn(t,e){const{x:n,y:o,w:i,h:r,radius:l}=e;t.arc(n+l.topLeft,o+l.topLeft,l.topLeft,1.5*oe,oe,!0),t.lineTo(n,o+r-l.bottomLeft),t.arc(n+l.bottomLeft,o+r-l.bottomLeft,l.bottomLeft,oe,ce,!0),t.lineTo(n+i-l.bottomRight,o+r),t.arc(n+i-l.bottomRight,o+r-l.bottomRight,l.bottomRight,ce,0,!0),t.lineTo(n+i,o+l.topRight),t.arc(n+i-l.topRight,o+l.topRight,l.topRight,0,-ce,!0),t.lineTo(n+l.topLeft,o)}const eh=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,th=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function nh(t,e){const n=(""+t).match(eh);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const oh=t=>+t||0;function Pi(t,e){const n={},o=G(e),i=o?Object.keys(e):e,r=G(t)?o?l=>W(t[l],t[e[l]]):l=>t[l]:()=>t;for(const l of i)n[l]=oh(r(l));return n}function tl(t){return Pi(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Et(t){return Pi(t,["topLeft","topRight","bottomLeft","bottomRight"])}function be(t){const e=tl(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function fe(t,e){t=t||{},e=e||de.font;let n=W(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let o=W(t.style,e.style);o&&!(""+o).match(th)&&(console.warn('Invalid font style specified: "'+o+'"'),o=void 0);const i={family:W(t.family,e.family),lineHeight:nh(W(t.lineHeight,e.lineHeight),n),size:n,style:o,weight:W(t.weight,e.weight),string:""};return i.string=Gf(i),i}function mn(t,e,n,o){let i=!0,r,l,a;for(r=0,l=t.length;r<l;++r)if(a=t[r],a!==void 0&&(e!==void 0&&typeof a=="function"&&(a=a(e),i=!1),n!==void 0&&ne(a)&&(a=a[n%a.length],i=!1),a!==void 0))return o&&!i&&(o.cacheable=!1),a}function ih(t,e,n){const{min:o,max:i}=t,r=Pr(e,(i-o)/2),l=(a,d)=>n&&a===0?0:a+d;return{min:l(o,-Math.abs(r)),max:l(i,r)}}function pt(t,e){return Object.assign(Object.create(t),e)}function Ni(t,e=[""],n,o,i=()=>t[0]){const r=n||t;typeof o>"u"&&(o=rl("_fallback",t));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:r,_fallback:o,_getTarget:i,override:a=>Ni([a,...t],e,r,o)};return new Proxy(l,{deleteProperty(a,d){return delete a[d],delete a._keys,delete t[0][d],!0},get(a,d){return ol(a,d,()=>fh(d,e,t,a))},getOwnPropertyDescriptor(a,d){return Reflect.getOwnPropertyDescriptor(a._scopes[0],d)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(a,d){return ll(a).includes(d)},ownKeys(a){return ll(a)},set(a,d,c){const u=a._storage||(a._storage=i());return a[d]=u[d]=c,delete a._keys,!0}})}function Ht(t,e,n,o){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:nl(t,o),setContext:r=>Ht(t,r,n,o),override:r=>Ht(t.override(r),e,n,o)};return new Proxy(i,{deleteProperty(r,l){return delete r[l],delete t[l],!0},get(r,l,a){return ol(r,l,()=>rh(r,l,a))},getOwnPropertyDescriptor(r,l){return r._descriptors.allKeys?Reflect.has(t,l)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,l)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(r,l){return Reflect.has(t,l)},ownKeys(){return Reflect.ownKeys(t)},set(r,l,a){return t[l]=a,delete r[l],!0}})}function nl(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:o=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:n,indexable:o,isScriptable:ft(n)?n:()=>n,isIndexable:ft(o)?o:()=>o}}const sh=(t,e)=>t?t+xi(e):e,Fi=(t,e)=>G(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function ol(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const o=n();return t[e]=o,o}function rh(t,e,n){const{_proxy:o,_context:i,_subProxy:r,_descriptors:l}=t;let a=o[e];return ft(a)&&l.isScriptable(e)&&(a=lh(e,a,t,n)),ne(a)&&a.length&&(a=ah(e,a,t,l.isIndexable)),Fi(e,a)&&(a=Ht(a,i,r&&r[e],l)),a}function lh(t,e,n,o){const{_proxy:i,_context:r,_subProxy:l,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let d=e(r,l||o);return a.delete(t),Fi(t,d)&&(d=Ri(i._scopes,i,t,d)),d}function ah(t,e,n,o){const{_proxy:i,_context:r,_subProxy:l,_descriptors:a}=n;if(typeof r.index<"u"&&o(t))return e[r.index%e.length];if(G(e[0])){const d=e,c=i._scopes.filter(u=>u!==d);e=[];for(const u of d){const f=Ri(c,i,t,u);e.push(Ht(f,r,l&&l[t],a))}}return e}function il(t,e,n){return ft(t)?t(e,n):t}const dh=(t,e)=>t===!0?e:typeof t=="string"?ut(e,t):void 0;function ch(t,e,n,o,i){for(const r of e){const l=dh(n,r);if(l){t.add(l);const a=il(l._fallback,n,i);if(typeof a<"u"&&a!==n&&a!==o)return a}else if(l===!1&&typeof o<"u"&&n!==o)return null}return!1}function Ri(t,e,n,o){const i=e._rootScopes,r=il(e._fallback,n,o),l=[...t,...i],a=new Set;a.add(o);let d=sl(a,l,n,r||n,o);return d===null||typeof r<"u"&&r!==n&&(d=sl(a,l,r,d,o),d===null)?!1:Ni(Array.from(a),[""],i,r,()=>uh(e,n,o))}function sl(t,e,n,o,i){for(;n;)n=ch(t,e,n,o,i);return n}function uh(t,e,n){const o=t._getTarget();e in o||(o[e]={});const i=o[e];return ne(i)&&G(n)?n:i||{}}function fh(t,e,n,o){let i;for(const r of e)if(i=rl(sh(r,t),n),typeof i<"u")return Fi(t,i)?Ri(n,o,t,i):i}function rl(t,e){for(const n of e){if(!n)continue;const o=n[t];if(typeof o<"u")return o}}function ll(t){let e=t._keys;return e||(e=t._keys=hh(t._scopes)),e}function hh(t){const e=new Set;for(const n of t)for(const o of Object.keys(n).filter(i=>!i.startsWith("_")))e.add(o);return Array.from(e)}function al(t,e,n,o){const{iScale:i}=t,{key:r="r"}=this._parsing,l=new Array(o);let a,d,c,u;for(a=0,d=o;a<d;++a)c=a+n,u=e[c],l[a]={r:i.parse(ut(u,r),c)};return l}const ph=Number.EPSILON||1e-14,jt=(t,e)=>e<t.length&&!t[e].skip&&t[e],dl=t=>t==="x"?"y":"x";function mh(t,e,n,o){const i=t.skip?e:t,r=e,l=n.skip?e:n,a=ki(r,i),d=ki(l,r);let c=a/(a+d),u=d/(a+d);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const f=o*c,h=o*u;return{previous:{x:r.x-f*(l.x-i.x),y:r.y-f*(l.y-i.y)},next:{x:r.x+h*(l.x-i.x),y:r.y+h*(l.y-i.y)}}}function gh(t,e,n){const o=t.length;let i,r,l,a,d,c=jt(t,0);for(let u=0;u<o-1;++u)if(d=c,c=jt(t,u+1),!(!d||!c)){if(dn(e[u],0,ph)){n[u]=n[u+1]=0;continue}i=n[u]/e[u],r=n[u+1]/e[u],a=Math.pow(i,2)+Math.pow(r,2),!(a<=9)&&(l=3/Math.sqrt(a),n[u]=i*l*e[u],n[u+1]=r*l*e[u])}}function bh(t,e,n="x"){const o=dl(n),i=t.length;let r,l,a,d=jt(t,0);for(let c=0;c<i;++c){if(l=a,a=d,d=jt(t,c+1),!a)continue;const u=a[n],f=a[o];l&&(r=(u-l[n])/3,a[`cp1${n}`]=u-r,a[`cp1${o}`]=f-r*e[c]),d&&(r=(d[n]-u)/3,a[`cp2${n}`]=u+r,a[`cp2${o}`]=f+r*e[c])}}function yh(t,e="x"){const n=dl(e),o=t.length,i=Array(o).fill(0),r=Array(o);let l,a,d,c=jt(t,0);for(l=0;l<o;++l)if(a=d,d=c,c=jt(t,l+1),!!d){if(c){const u=c[e]-d[e];i[l]=u!==0?(c[n]-d[n])/u:0}r[l]=a?c?je(i[l-1])!==je(i[l])?0:(i[l-1]+i[l])/2:i[l-1]:i[l]}gh(t,i,r),bh(t,r,e)}function lo(t,e,n){return Math.max(Math.min(t,n),e)}function $h(t,e){let n,o,i,r,l,a=Qe(t[0],e);for(n=0,o=t.length;n<o;++n)l=r,r=a,a=n<o-1&&Qe(t[n+1],e),r&&(i=t[n],l&&(i.cp1x=lo(i.cp1x,e.left,e.right),i.cp1y=lo(i.cp1y,e.top,e.bottom)),a&&(i.cp2x=lo(i.cp2x,e.left,e.right),i.cp2y=lo(i.cp2y,e.top,e.bottom)))}function _h(t,e,n,o,i){let r,l,a,d;if(e.spanGaps&&(t=t.filter(c=>!c.skip)),e.cubicInterpolationMode==="monotone")yh(t,i);else{let c=o?t[t.length-1]:t[0];for(r=0,l=t.length;r<l;++r)a=t[r],d=mh(c,a,t[Math.min(r+1,l-(o?0:1))%l],e.tension),a.cp1x=d.previous.x,a.cp1y=d.previous.y,a.cp2x=d.next.x,a.cp2y=d.next.y,c=a}e.capBezierPoints&&$h(t,n)}function Ai(){return typeof window<"u"&&typeof document<"u"}function Oi(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function ao(t,e,n){let o;return typeof t=="string"?(o=parseInt(t,10),t.indexOf("%")!==-1&&(o=o/100*e.parentNode[n])):o=t,o}const co=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function wh(t,e){return co(t).getPropertyValue(e)}const xh=["top","right","bottom","left"];function Mt(t,e,n){const o={};n=n?"-"+n:"";for(let i=0;i<4;i++){const r=xh[i];o[r]=parseFloat(t[e+"-"+r+n])||0}return o.width=o.left+o.right,o.height=o.top+o.bottom,o}const Ch=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function kh(t,e){const n=t.touches,o=n&&n.length?n[0]:t,{offsetX:i,offsetY:r}=o;let l=!1,a,d;if(Ch(i,r,t.target))a=i,d=r;else{const c=e.getBoundingClientRect();a=o.clientX-c.left,d=o.clientY-c.top,l=!0}return{x:a,y:d,box:l}}function Vt(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:o}=e,i=co(n),r=i.boxSizing==="border-box",l=Mt(i,"padding"),a=Mt(i,"border","width"),{x:d,y:c,box:u}=kh(t,n),f=l.left+(u&&a.left),h=l.top+(u&&a.top);let{width:p,height:m}=e;return r&&(p-=l.width+a.width,m-=l.height+a.height),{x:Math.round((d-f)/p*n.width/o),y:Math.round((c-h)/m*n.height/o)}}function Sh(t,e,n){let o,i;if(e===void 0||n===void 0){const r=Oi(t);if(!r)e=t.clientWidth,n=t.clientHeight;else{const l=r.getBoundingClientRect(),a=co(r),d=Mt(a,"border","width"),c=Mt(a,"padding");e=l.width-c.width-d.width,n=l.height-c.height-d.height,o=ao(a.maxWidth,r,"clientWidth"),i=ao(a.maxHeight,r,"clientHeight")}}return{width:e,height:n,maxWidth:o||to,maxHeight:i||to}}const uo=t=>Math.round(t*10)/10;function vh(t,e,n,o){const i=co(t),r=Mt(i,"margin"),l=ao(i.maxWidth,t,"clientWidth")||to,a=ao(i.maxHeight,t,"clientHeight")||to,d=Sh(t,e,n);let{width:c,height:u}=d;if(i.boxSizing==="content-box"){const h=Mt(i,"border","width"),p=Mt(i,"padding");c-=p.width+h.width,u-=p.height+h.height}return c=Math.max(0,c-r.width),u=Math.max(0,o?c/o:u-r.height),c=uo(Math.min(c,l,d.maxWidth)),u=uo(Math.min(u,a,d.maxHeight)),c&&!u&&(u=uo(c/2)),(e!==void 0||n!==void 0)&&o&&d.height&&u>d.height&&(u=d.height,c=uo(Math.floor(u*o))),{width:c,height:u}}function cl(t,e,n){const o=e||1,i=Math.floor(t.height*o),r=Math.floor(t.width*o);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const l=t.canvas;return l.style&&(n||!l.style.height&&!l.style.width)&&(l.style.height=`${t.height}px`,l.style.width=`${t.width}px`),t.currentDevicePixelRatio!==o||l.height!==i||l.width!==r?(t.currentDevicePixelRatio=o,l.height=i,l.width=r,t.ctx.setTransform(o,0,0,o,0,0),!0):!1}const Dh=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Ai()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function ul(t,e){const n=wh(t,e),o=n&&n.match(/^(\d+)(\.\d+)?px$/);return o?+o[1]:void 0}function Bt(t,e,n,o){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function Eh(t,e,n,o){return{x:t.x+n*(e.x-t.x),y:o==="middle"?n<.5?t.y:e.y:o==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function Mh(t,e,n,o){const i={x:t.cp2x,y:t.cp2y},r={x:e.cp1x,y:e.cp1y},l=Bt(t,i,n),a=Bt(i,r,n),d=Bt(r,e,n),c=Bt(l,a,n),u=Bt(a,d,n);return Bt(c,u,n)}const Vh=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,o){return n-o},leftForLtr(n,o){return n-o}}},Bh=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function Wt(t,e,n){return t?Vh(e,n):Bh()}function fl(t,e){let n,o;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,o=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=o)}function hl(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function pl(t){return t==="angle"?{between:cn,compare:Pf,normalize:De}:{between:Ze,compare:(e,n)=>e-n,normalize:e=>e}}function ml({start:t,end:e,count:n,loop:o,style:i}){return{start:t%n,end:e%n,loop:o&&(e-t+1)%n===0,style:i}}function Ph(t,e,n){const{property:o,start:i,end:r}=n,{between:l,normalize:a}=pl(o),d=e.length;let{start:c,end:u,loop:f}=t,h,p;if(f){for(c+=d,u+=d,h=0,p=d;h<p&&l(a(e[c%d][o]),i,r);++h)c--,u--;c%=d,u%=d}return u<c&&(u+=d),{start:c,end:u,loop:f,style:t.style}}function gl(t,e,n){if(!n)return[t];const{property:o,start:i,end:r}=n,l=e.length,{compare:a,between:d,normalize:c}=pl(o),{start:u,end:f,loop:h,style:p}=Ph(t,e,n),m=[];let g=!1,b=null,y,$,k;const v=()=>d(i,k,y)&&a(i,k)!==0,x=()=>a(r,y)===0||d(r,k,y),B=()=>g||v(),M=()=>!g||x();for(let N=u,F=u;N<=f;++N)$=e[N%l],!$.skip&&(y=c($[o]),y!==k&&(g=d(y,i,r),b===null&&B()&&(b=a(y,i)===0?N:F),b!==null&&M()&&(m.push(ml({start:b,end:N,loop:h,count:l,style:p})),b=null),F=N,k=y));return b!==null&&m.push(ml({start:b,end:f,loop:h,count:l,style:p})),m}function bl(t,e){const n=[],o=t.segments;for(let i=0;i<o.length;i++){const r=gl(o[i],t.points,e);r.length&&n.push(...r)}return n}function Nh(t,e,n,o){let i=0,r=e-1;if(n&&!o)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,n&&(r+=i);r>i&&t[r%e].skip;)r--;return r%=e,{start:i,end:r}}function Fh(t,e,n,o){const i=t.length,r=[];let l=e,a=t[e],d;for(d=e+1;d<=n;++d){const c=t[d%i];c.skip||c.stop?a.skip||(o=!1,r.push({start:e%i,end:(d-1)%i,loop:o}),e=l=c.stop?d:null):(l=d,a.skip&&(e=d)),a=c}return l!==null&&r.push({start:e%i,end:l%i,loop:o}),r}function Rh(t,e){const n=t.points,o=t.options.spanGaps,i=n.length;if(!i)return[];const r=!!t._loop,{start:l,end:a}=Nh(n,i,r,o);if(o===!0)return yl(t,[{start:l,end:a,loop:r}],n,e);const d=a<l?a+i:a,c=!!t._fullLoop&&l===0&&a===i-1;return yl(t,Fh(n,l,d,c),n,e)}function yl(t,e,n,o){return!o||!o.setContext||!n?e:Ah(t,e,n,o)}function Ah(t,e,n,o){const i=t._chart.getContext(),r=$l(t.options),{_datasetIndex:l,options:{spanGaps:a}}=t,d=n.length,c=[];let u=r,f=e[0].start,h=f;function p(m,g,b,y){const $=a?-1:1;if(m!==g){for(m+=d;n[m%d].skip;)m-=$;for(;n[g%d].skip;)g+=$;m%d!==g%d&&(c.push({start:m%d,end:g%d,loop:b,style:y}),u=y,f=g%d)}}for(const m of e){f=a?f:m.start;let g=n[f%d],b;for(h=f+1;h<=m.end;h++){const y=n[h%d];b=$l(o.setContext(pt(i,{type:"segment",p0:g,p1:y,p0DataIndex:(h-1)%d,p1DataIndex:h%d,datasetIndex:l}))),Oh(b,u)&&p(f,h-1,m.loop,u),g=y,u=b}f<h-1&&p(f,h-1,m.loop,u)}return c}function $l(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Oh(t,e){if(!e)return!1;const n=[],o=function(i,r){return Di(r)?(n.includes(r)||n.push(r),n.indexOf(r)):r};return JSON.stringify(t,o)!==JSON.stringify(e,o)}/*!
|
|
20
20
|
* Chart.js v4.4.1
|
|
21
21
|
* https://www.chartjs.org
|
|
22
22
|
* (c) 2023 Chart.js Contributors
|
|
23
23
|
* Released under the MIT License
|
|
24
|
-
*/class iu{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,o,i){const s=n.listeners[i],r=n.duration;s.forEach(a=>a({chart:e,initial:n.initial,numSteps:r,currentStep:Math.min(o-n.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=ws.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((o,i)=>{if(!o.running||!o.items.length)return;const s=o.items;let r=s.length-1,a=!1,c;for(;r>=0;--r)c=s[r],c._active?(c._total>o.duration&&(o.duration=c._total),c.tick(e),a=!0):(s[r]=s[s.length-1],s.pop());a&&(i.draw(),this._notify(i,o,e,"progress")),s.length||(o.running=!1,this._notify(i,o,e,"complete"),o.initial=!1),n+=s.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let o=n.get(e);return o||(o={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,o)),o}listen(e,n,o){this._getAnims(e).listeners[n].push(o)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((o,i)=>Math.max(o,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const o=n.items;let i=o.length-1;for(;i>=0;--i)o[i].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Ie=new iu;const Zs="transparent",su={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const o=Es(t||Zs),i=o.valid&&Es(e||Zs);return i&&i.valid?i.mix(o,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class ru{constructor(e,n,o,i){const s=n[o];i=qt([e.to,i,s,e.from]);const r=qt([e.from,s,i]);this._active=!0,this._fn=e.fn||su[e.type||typeof r],this._easing=Wt[e.easing]||Wt.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=o,this._from=r,this._to=i,this._promises=void 0}active(){return this._active}update(e,n,o){if(this._active){this._notify(!1);const i=this._target[this._prop],s=o-this._start,r=this._duration-s;this._start=o,this._duration=Math.floor(Math.max(r,e.duration)),this._total+=s,this._loop=!!e.loop,this._to=qt([e.to,n,i,e.from]),this._from=qt([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,o=this._duration,i=this._prop,s=this._from,r=this._loop,a=this._to;let c;if(this._active=s!==a&&(r||n<o),!this._active){this._target[i]=a,this._notify(!0);return}if(n<0){this._target[i]=s;return}c=n/o%2,c=r&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[i]=this._fn(s,a,c)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,o)=>{e.push({res:n,rej:o})})}_notify(e){const n=e?"res":"rej",o=this._promises||[];for(let i=0;i<o.length;i++)o[i][n]()}}class Js{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!z(e))return;const n=Object.keys(te.animation),o=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!z(s))return;const r={};for(const a of n)r[a]=s[a];(q(s.properties)&&s.properties||[i]).forEach(a=>{(a===i||!o.has(a))&&o.set(a,r)})})}_animateOptions(e,n){const o=n.options,i=au(e,o);if(!i)return[];const s=this._createAnimations(i,o);return o.$shared&&lu(e.options.$animations,o).then(()=>{e.options=o},()=>{}),s}_createAnimations(e,n){const o=this._properties,i=[],s=e.$animations||(e.$animations={}),r=Object.keys(n),a=Date.now();let c;for(c=r.length-1;c>=0;--c){const d=r[c];if(d.charAt(0)==="$")continue;if(d==="options"){i.push(...this._animateOptions(e,n));continue}const u=n[d];let f=s[d];const p=o.get(d);if(f)if(p&&f.active()){f.update(p,u,a);continue}else f.cancel();if(!p||!p.duration){e[d]=u;continue}s[d]=f=new ru(p,e,d,u),i.push(f)}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const o=this._createAnimations(e,n);if(o.length)return Ie.add(this._chart,o),!0}}function lu(t,e){const n=[],o=Object.keys(e);for(let i=0;i<o.length;i++){const s=t[o[i]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function au(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Qs(t,e){const n=t&&t.options||{},o=n.reverse,i=n.min===void 0?e:0,s=n.max===void 0?e:0;return{start:o?s:i,end:o?i:s}}function cu(t,e,n){if(n===!1)return!1;const o=Qs(t,n),i=Qs(e,n);return{top:i.end,right:o.end,bottom:i.start,left:o.start}}function du(t){let e,n,o,i;return z(t)?(e=t.top,n=t.right,o=t.bottom,i=t.left):e=n=o=i=t,{top:e,right:n,bottom:o,left:i,disabled:t===!1}}function er(t,e){const n=[],o=t._getSortedDatasetMetas(e);let i,s;for(i=0,s=o.length;i<s;++i)n.push(o[i].index);return n}function tr(t,e,n,o={}){const i=t.keys,s=o.mode==="single";let r,a,c,d;if(e!==null){for(r=0,a=i.length;r<a;++r){if(c=+i[r],c===n){if(o.all)continue;break}d=t.values[c],ee(d)&&(s||e===0||Ve(e)===Ve(d))&&(e+=d)}return e}}function uu(t){const e=Object.keys(t),n=new Array(e.length);let o,i,s;for(o=0,i=e.length;o<i;++o)s=e[o],n[o]={x:s,y:t[s]};return n}function nr(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function fu(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function hu(t){const{min:e,max:n,minDefined:o,maxDefined:i}=t.getUserBounds();return{min:o?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function pu(t,e,n){const o=t[e]||(t[e]={});return o[n]||(o[n]={})}function or(t,e,n,o){for(const i of e.getMatchingVisibleMetas(o).reverse()){const s=t[i.index];if(n&&s>0||!n&&s<0)return i.index}return null}function ir(t,e){const{chart:n,_cachedMeta:o}=t,i=n._stacks||(n._stacks={}),{iScale:s,vScale:r,index:a}=o,c=s.axis,d=r.axis,u=fu(s,r,o),f=e.length;let p;for(let h=0;h<f;++h){const g=e[h],{[c]:m,[d]:b}=g,x=g._stacks||(g._stacks={});p=x[d]=pu(i,u,m),p[a]=b,p._top=or(p,r,!0,o.type),p._bottom=or(p,r,!1,o.type);const y=p._visualValues||(p._visualValues={});y[a]=b}}function jo(t,e){const n=t.scales;return Object.keys(n).filter(o=>n[o].axis===e).shift()}function gu(t,e){return Qe(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function mu(t,e,n){return Qe(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function Xt(t,e){const n=t.controller.index,o=t.vScale&&t.vScale.axis;if(o){e=e||t._parsed;for(const i of e){const s=i._stacks;if(!s||s[o]===void 0||s[o][n]===void 0)return;delete s[o][n],s[o]._visualValues!==void 0&&s[o]._visualValues[n]!==void 0&&delete s[o]._visualValues[n]}}}const Wo=t=>t==="reset"||t==="none",sr=(t,e)=>e?t:Object.assign({},t),bu=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:er(n,!0),values:null};class Me{constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=nr(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&Xt(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,o=this.getDataset(),i=(f,p,h,g)=>f==="x"?p:f==="r"?g:h,s=n.xAxisID=T(o.xAxisID,jo(e,"x")),r=n.yAxisID=T(o.yAxisID,jo(e,"y")),a=n.rAxisID=T(o.rAxisID,jo(e,"r")),c=n.indexAxis,d=n.iAxisID=i(c,s,r,a),u=n.vAxisID=i(c,r,s,a);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(r),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(d),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&_s(this._data,this),e._stacked&&Xt(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),o=this._data;if(z(n))this._data=uu(n);else if(o!==n){if(o){_s(o,this);const i=this._cachedMeta;Xt(i),i._parsed=[]}n&&Object.isExtensible(n)&&nd(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,o=this.getDataset();let i=!1;this._dataCheck();const s=n._stacked;n._stacked=nr(n.vScale,n),n.stack!==o.stack&&(i=!0,Xt(n),n.stack=o.stack),this._resyncElements(e),(i||s!==n._stacked)&&ir(this,n._parsed)}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),o=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:o,_data:i}=this,{iScale:s,_stacked:r}=o,a=s.axis;let c=e===0&&n===i.length?!0:o._sorted,d=e>0&&o._parsed[e-1],u,f,p;if(this._parsing===!1)o._parsed=i,o._sorted=!0,p=i;else{q(i[e])?p=this.parseArrayData(o,i,e,n):z(i[e])?p=this.parseObjectData(o,i,e,n):p=this.parsePrimitiveData(o,i,e,n);const h=()=>f[a]===null||d&&f[a]<d[a];for(u=0;u<n;++u)o._parsed[u+e]=f=p[u],c&&(h()&&(c=!1),d=f);o._sorted=c}r&&ir(this,p)}parsePrimitiveData(e,n,o,i){const{iScale:s,vScale:r}=e,a=s.axis,c=r.axis,d=s.getLabels(),u=s===r,f=new Array(i);let p,h,g;for(p=0,h=i;p<h;++p)g=p+o,f[p]={[a]:u||s.parse(d[g],g),[c]:r.parse(n[g],g)};return f}parseArrayData(e,n,o,i){const{xScale:s,yScale:r}=e,a=new Array(i);let c,d,u,f;for(c=0,d=i;c<d;++c)u=c+o,f=n[u],a[c]={x:s.parse(f[0],u),y:r.parse(f[1],u)};return a}parseObjectData(e,n,o,i){const{xScale:s,yScale:r}=e,{xAxisKey:a="x",yAxisKey:c="y"}=this._parsing,d=new Array(i);let u,f,p,h;for(u=0,f=i;u<f;++u)p=u+o,h=n[p],d[u]={x:s.parse(Ke(h,a),p),y:r.parse(Ke(h,c),p)};return d}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,o){const i=this.chart,s=this._cachedMeta,r=n[e.axis],a={keys:er(i,!0),values:n._stacks[e.axis]._visualValues};return tr(a,r,s.index,{mode:o})}updateRangeFromParsed(e,n,o,i){const s=o[n.axis];let r=s===null?NaN:s;const a=i&&o._stacks[n.axis];i&&a&&(i.values=a,r=tr(i,s,this._cachedMeta.index)),e.min=Math.min(e.min,r),e.max=Math.max(e.max,r)}getMinMax(e,n){const o=this._cachedMeta,i=o._parsed,s=o._sorted&&e===o.iScale,r=i.length,a=this._getOtherScale(e),c=bu(n,o,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:f}=hu(a);let p,h;function g(){h=i[p];const m=h[a.axis];return!ee(h[e.axis])||u>m||f<m}for(p=0;p<r&&!(!g()&&(this.updateRangeFromParsed(d,e,h,c),s));++p);if(s){for(p=r-1;p>=0;--p)if(!g()){this.updateRangeFromParsed(d,e,h,c);break}}return d}getAllParsedValues(e){const n=this._cachedMeta._parsed,o=[];let i,s,r;for(i=0,s=n.length;i<s;++i)r=n[i][e.axis],ee(r)&&o.push(r);return o}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,o=n.iScale,i=n.vScale,s=this.getParsed(e);return{label:o?""+o.getLabelForValue(s[o.axis]):"",value:i?""+i.getLabelForValue(s[i.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=du(T(this.options.clip,cu(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,o=this._cachedMeta,i=o.data||[],s=n.chartArea,r=[],a=this._drawStart||0,c=this._drawCount||i.length-a,d=this.options.drawActiveElementsOnTop;let u;for(o.dataset&&o.dataset.draw(e,s,a,c),u=a;u<a+c;++u){const f=i[u];f.hidden||(f.active&&d?r.push(f):f.draw(e,s))}for(u=0;u<r.length;++u)r[u].draw(e,s)}getStyle(e,n){const o=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(e||0,o)}getContext(e,n,o){const i=this.getDataset();let s;if(e>=0&&e<this._cachedMeta.data.length){const r=this._cachedMeta.data[e];s=r.$context||(r.$context=mu(this.getContext(),e,r)),s.parsed=this.getParsed(e),s.raw=i.data[e],s.index=s.dataIndex=e}else s=this.$context||(this.$context=gu(this.chart.getContext(),this.index)),s.dataset=i,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=o,s}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",o){const i=n==="active",s=this._cachedDataOpts,r=e+"-"+n,a=s[r],c=this.enableOptionSharing&&zt(o);if(a)return sr(a,c);const d=this.chart.config,u=d.datasetElementScopeKeys(this._type,e),f=i?[`${e}Hover`,"hover",e,""]:[e,""],p=d.getOptionScopes(this.getDataset(),u),h=Object.keys(te.elements[e]),g=()=>this.getContext(o,i,n),m=d.resolveNamedOptions(p,h,g,f);return m.$shared&&(m.$shared=c,s[r]=Object.freeze(sr(m,c))),m}_resolveAnimations(e,n,o){const i=this.chart,s=this._cachedDataOpts,r=`animation-${n}`,a=s[r];if(a)return a;let c;if(i.options.animation!==!1){const u=this.chart.config,f=u.datasetAnimationScopeKeys(this._type,n),p=u.getOptionScopes(this.getDataset(),f);c=u.createResolver(p,this.getContext(e,o,n))}const d=new Js(i,c&&c.animations);return c&&c._cacheable&&(s[r]=Object.freeze(d)),d}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||Wo(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const o=this.resolveDataElementOptions(e,n),i=this._sharedOptions,s=this.getSharedOptions(o),r=this.includeOptions(n,s)||s!==i;return this.updateSharedOptions(s,n,o),{sharedOptions:s,includeOptions:r}}updateElement(e,n,o,i){Wo(i)?Object.assign(e,o):this._resolveAnimations(n,i).update(e,o)}updateSharedOptions(e,n,o){e&&!Wo(n)&&this._resolveAnimations(void 0,n).update(e,o)}_setStyle(e,n,o,i){e.active=i;const s=this.getStyle(n,i);this._resolveAnimations(n,o,i).update(e,{options:!i&&this.getSharedOptions(s)||s})}removeHoverStyle(e,n,o){this._setStyle(e,o,"active",!1)}setHoverStyle(e,n,o){this._setStyle(e,o,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,o=this._cachedMeta.data;for(const[a,c,d]of this._syncList)this[a](c,d);this._syncList=[];const i=o.length,s=n.length,r=Math.min(s,i);r&&this.parse(0,r),s>i?this._insertElements(i,s-i,e):s<i&&this._removeElements(s,i-s)}_insertElements(e,n,o=!0){const i=this._cachedMeta,s=i.data,r=e+n;let a;const c=d=>{for(d.length+=n,a=d.length-1;a>=r;a--)d[a]=d[a-n]};for(c(s),a=e;a<r;++a)s[a]=new this.dataElementType;this._parsing&&c(i._parsed),this.parse(e,n),o&&this.updateElements(s,e,n,"reset")}updateElements(e,n,o,i){}_removeElements(e,n){const o=this._cachedMeta;if(this._parsing){const i=o._parsed.splice(e,n);o._stacked&&Xt(o,i)}o.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,o,i]=e;this[n](o,i)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const o=arguments.length-2;o&&this._sync(["_insertElements",e,o])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}F(Me,"defaults",{}),F(Me,"datasetElementType",null),F(Me,"dataElementType",null);function yu(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let o=[];for(let i=0,s=n.length;i<s;i++)o=o.concat(n[i].controller.getAllParsedValues(t));t._cache.$bar=xs(o.sort((i,s)=>i-s))}return t._cache.$bar}function _u(t){const e=t.iScale,n=yu(e,t.type);let o=e._length,i,s,r,a;const c=()=>{r===32767||r===-32768||(zt(a)&&(o=Math.min(o,Math.abs(r-a)||o)),a=r)};for(i=0,s=n.length;i<s;++i)r=e.getPixelForValue(n[i]),c();for(a=void 0,i=0,s=e.ticks.length;i<s;++i)r=e.getPixelForTick(i),c();return o}function xu(t,e,n,o){const i=n.barThickness;let s,r;return H(i)?(s=e.min*n.categoryPercentage,r=n.barPercentage):(s=i*o,r=1),{chunk:s/o,ratio:r,start:e.pixels[t]-s/2}}function wu(t,e,n,o){const i=e.pixels,s=i[t];let r=t>0?i[t-1]:null,a=t<i.length-1?i[t+1]:null;const c=n.categoryPercentage;r===null&&(r=s-(a===null?e.end-e.start:a-s)),a===null&&(a=s+s-r);const d=s-(s-Math.min(r,a))/2*c;return{chunk:Math.abs(a-r)/2*c/o,ratio:n.barPercentage,start:d}}function Cu(t,e,n,o){const i=n.parse(t[0],o),s=n.parse(t[1],o),r=Math.min(i,s),a=Math.max(i,s);let c=r,d=a;Math.abs(r)>Math.abs(a)&&(c=a,d=r),e[n.axis]=d,e._custom={barStart:c,barEnd:d,start:i,end:s,min:r,max:a}}function rr(t,e,n,o){return q(t)?Cu(t,e,n,o):e[n.axis]=n.parse(t,o),e}function lr(t,e,n,o){const i=t.iScale,s=t.vScale,r=i.getLabels(),a=i===s,c=[];let d,u,f,p;for(d=n,u=n+o;d<u;++d)p=e[d],f={},f[i.axis]=a||i.parse(r[d],d),c.push(rr(p,f,s,d));return c}function Yo(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function ku(t,e,n){return t!==0?Ve(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function Su(t){let e,n,o,i,s;return t.horizontal?(e=t.base>t.x,n="left",o="right"):(e=t.base<t.y,n="bottom",o="top"),e?(i="end",s="start"):(i="start",s="end"),{start:n,end:o,reverse:e,top:i,bottom:s}}function vu(t,e,n,o){let i=e.borderSkipped;const s={};if(!i){t.borderSkipped=s;return}if(i===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:r,end:a,reverse:c,top:d,bottom:u}=Su(t);i==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===o?i=d:(n._bottom||0)===o?i=u:(s[ar(u,r,a,c)]=!0,i=d)),s[ar(i,r,a,c)]=!0,t.borderSkipped=s}function ar(t,e,n,o){return o?(t=Mu(t,e,n),t=cr(t,n,e)):t=cr(t,e,n),t}function Mu(t,e,n){return t===e?n:t===n?e:t}function cr(t,e,n){return t==="start"?e:t==="end"?n:t}function Eu(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class Pn extends Me{parsePrimitiveData(e,n,o,i){return lr(e,n,o,i)}parseArrayData(e,n,o,i){return lr(e,n,o,i)}parseObjectData(e,n,o,i){const{iScale:s,vScale:r}=e,{xAxisKey:a="x",yAxisKey:c="y"}=this._parsing,d=s.axis==="x"?a:c,u=r.axis==="x"?a:c,f=[];let p,h,g,m;for(p=o,h=o+i;p<h;++p)m=n[p],g={},g[s.axis]=s.parse(Ke(m,d),p),f.push(rr(Ke(m,u),g,r,p));return f}updateRangeFromParsed(e,n,o,i){super.updateRangeFromParsed(e,n,o,i);const s=o._custom;s&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,s.min),e.max=Math.max(e.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:o,vScale:i}=n,s=this.getParsed(e),r=s._custom,a=Yo(r)?"["+r.start+", "+r.end+"]":""+i.getLabelForValue(s[i.axis]);return{label:""+o.getLabelForValue(s[o.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,o,i){const s=i==="reset",{index:r,_cachedMeta:{vScale:a}}=this,c=a.getBasePixel(),d=a.isHorizontal(),u=this._getRuler(),{sharedOptions:f,includeOptions:p}=this._getSharedOptions(n,i);for(let h=n;h<n+o;h++){const g=this.getParsed(h),m=s||H(g[a.axis])?{base:c,head:c}:this._calculateBarValuePixels(h),b=this._calculateBarIndexPixels(h,u),x=(g._stacks||{})[a.axis],y={horizontal:d,base:m.base,enableBorderRadius:!x||Yo(g._custom)||r===x._top||r===x._bottom,x:d?m.head:b.center,y:d?b.center:m.head,height:d?b.size:Math.abs(m.size),width:d?Math.abs(m.size):b.size};p&&(y.options=f||this.resolveDataElementOptions(h,e[h].active?"active":i));const w=y.options||e[h].options;vu(y,w,x,r),Eu(y,w,u.ratio),this.updateElement(e[h],h,y,i)}}_getStacks(e,n){const{iScale:o}=this._cachedMeta,i=o.getMatchingVisibleMetas(this._type).filter(c=>c.controller.options.grouped),s=o.options.stacked,r=[],a=c=>{const d=c.controller.getParsed(n),u=d&&d[c.vScale.axis];if(H(u)||isNaN(u))return!0};for(const c of i)if(!(n!==void 0&&a(c))&&((s===!1||r.indexOf(c.stack)===-1||s===void 0&&c.stack===void 0)&&r.push(c.stack),c.index===e))break;return r.length||r.push(void 0),r}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,o){const i=this._getStacks(e,o),s=n!==void 0?i.indexOf(n):-1;return s===-1?i.length-1:s}_getRuler(){const e=this.options,n=this._cachedMeta,o=n.iScale,i=[];let s,r;for(s=0,r=n.data.length;s<r;++s)i.push(o.getPixelForValue(this.getParsed(s)[o.axis],s));const a=e.barThickness;return{min:a||_u(n),pixels:i,start:o._startPixel,end:o._endPixel,stackCount:this._getStackCount(),scale:o,grouped:e.grouped,ratio:a?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:o,index:i},options:{base:s,minBarLength:r}}=this,a=s||0,c=this.getParsed(e),d=c._custom,u=Yo(d);let f=c[n.axis],p=0,h=o?this.applyStack(n,c,o):f,g,m;h!==f&&(p=h-f,h=f),u&&(f=d.barStart,h=d.barEnd-d.barStart,f!==0&&Ve(f)!==Ve(d.barEnd)&&(p=0),p+=f);const b=!H(s)&&!u?s:p;let x=n.getPixelForValue(b);if(this.chart.getDataVisibility(e)?g=n.getPixelForValue(p+h):g=x,m=g-x,Math.abs(m)<r){m=ku(m,n,a)*r,f===a&&(x-=m/2);const y=n.getPixelForDecimal(0),w=n.getPixelForDecimal(1),S=Math.min(y,w),_=Math.max(y,w);x=Math.max(Math.min(x,_),S),g=x+m,o&&!u&&(c._stacks[n.axis]._visualValues[i]=n.getValueForPixel(g)-n.getValueForPixel(x))}if(x===n.getPixelForValue(a)){const y=Ve(m)*n.getLineWidthForValue(a)/2;x+=y,m-=y}return{size:m,base:x,head:g,center:g+m/2}}_calculateBarIndexPixels(e,n){const o=n.scale,i=this.options,s=i.skipNull,r=T(i.maxBarThickness,1/0);let a,c;if(n.grouped){const d=s?this._getStackCount(e):n.stackCount,u=i.barThickness==="flex"?wu(e,n,i,d):xu(e,n,i,d),f=this._getStackIndex(this.index,this._cachedMeta.stack,s?e:void 0);a=u.start+u.chunk*f+u.chunk/2,c=Math.min(r,u.chunk*u.ratio)}else a=o.getPixelForValue(this.getParsed(e)[o.axis],e),c=Math.min(r,n.min*n.ratio);return{base:a-c/2,head:a+c/2,center:a,size:c}}draw(){const e=this._cachedMeta,n=e.vScale,o=e.data,i=o.length;let s=0;for(;s<i;++s)this.getParsed(s)[n.axis]!==null&&o[s].draw(this._ctx)}}F(Pn,"id","bar"),F(Pn,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),F(Pn,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class An extends Me{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,n,o,i){const s=super.parsePrimitiveData(e,n,o,i);for(let r=0;r<s.length;r++)s[r]._custom=this.resolveDataElementOptions(r+o).radius;return s}parseArrayData(e,n,o,i){const s=super.parseArrayData(e,n,o,i);for(let r=0;r<s.length;r++){const a=n[o+r];s[r]._custom=T(a[2],this.resolveDataElementOptions(r+o).radius)}return s}parseObjectData(e,n,o,i){const s=super.parseObjectData(e,n,o,i);for(let r=0;r<s.length;r++){const a=n[o+r];s[r]._custom=T(a&&a.r&&+a.r,this.resolveDataElementOptions(r+o).radius)}return s}getMaxOverflow(){const e=this._cachedMeta.data;let n=0;for(let o=e.length-1;o>=0;--o)n=Math.max(n,e[o].size(this.resolveDataElementOptions(o))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:i,yScale:s}=n,r=this.getParsed(e),a=i.getLabelForValue(r.x),c=s.getLabelForValue(r.y),d=r._custom;return{label:o[e]||"",value:"("+a+", "+c+(d?", "+d:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,o,i){const s=i==="reset",{iScale:r,vScale:a}=this._cachedMeta,{sharedOptions:c,includeOptions:d}=this._getSharedOptions(n,i),u=r.axis,f=a.axis;for(let p=n;p<n+o;p++){const h=e[p],g=!s&&this.getParsed(p),m={},b=m[u]=s?r.getPixelForDecimal(.5):r.getPixelForValue(g[u]),x=m[f]=s?a.getBasePixel():a.getPixelForValue(g[f]);m.skip=isNaN(b)||isNaN(x),d&&(m.options=c||this.resolveDataElementOptions(p,h.active?"active":i),s&&(m.options.radius=0)),this.updateElement(h,p,m,i)}}resolveDataElementOptions(e,n){const o=this.getParsed(e);let i=super.resolveDataElementOptions(e,n);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const s=i.radius;return n!=="active"&&(i.radius=0),i.radius+=T(o&&o._custom,s),i}}F(An,"id","bubble"),F(An,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),F(An,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function Du(t,e,n){let o=1,i=1,s=0,r=0;if(e<K){const a=t,c=a+e,d=Math.cos(a),u=Math.sin(a),f=Math.cos(c),p=Math.sin(c),h=(w,S,_)=>jt(w,a,c,!0)?1:Math.max(S,S*n,_,_*n),g=(w,S,_)=>jt(w,a,c,!0)?-1:Math.min(S,S*n,_,_*n),m=h(0,d,f),b=h(ne,u,p),x=g(X,d,f),y=g(X+ne,u,p);o=(m-x)/2,i=(b-y)/2,s=-(m+x)/2,r=-(b+y)/2}return{ratioX:o,ratioY:i,offsetX:s,offsetY:r}}class bt extends Me{constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const o=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=o;else{let s=c=>+o[c];if(z(o[e])){const{key:c="value"}=this._parsing;s=d=>+Ke(o[d],c)}let r,a;for(r=e,a=e+n;r<a;++r)i._parsed[r]=s(r)}}_getRotation(){return ve(this.options.rotation-90)}_getCircumference(){return ve(this.options.circumference)}_getRotationExtents(){let e=K,n=-K;for(let o=0;o<this.chart.data.datasets.length;++o)if(this.chart.isDatasetVisible(o)&&this.chart.getDatasetMeta(o).type===this._type){const i=this.chart.getDatasetMeta(o).controller,s=i._getRotation(),r=i._getCircumference();e=Math.min(e,s),n=Math.max(n,s+r)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:o}=n,i=this._cachedMeta,s=i.data,r=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,a=Math.max((Math.min(o.width,o.height)-r)/2,0),c=Math.min(Hc(this.options.cutout,a),1),d=this._getRingWeight(this.index),{circumference:u,rotation:f}=this._getRotationExtents(),{ratioX:p,ratioY:h,offsetX:g,offsetY:m}=Du(f,u,c),b=(o.width-r)/p,x=(o.height-r)/h,y=Math.max(Math.min(b,x)/2,0),w=cs(this.options.radius,y),S=Math.max(w*c,0),_=(w-S)/this._getVisibleDatasetWeightTotal();this.offsetX=g*w,this.offsetY=m*w,i.total=this.calculateTotal(),this.outerRadius=w-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*d,0),this.updateElements(s,0,s.length,e)}_circumference(e,n){const o=this.options,i=this._cachedMeta,s=this._getCircumference();return n&&o.animation.animateRotate||!this.chart.getDataVisibility(e)||i._parsed[e]===null||i.data[e].hidden?0:this.calculateCircumference(i._parsed[e]*s/K)}updateElements(e,n,o,i){const s=i==="reset",r=this.chart,a=r.chartArea,d=r.options.animation,u=(a.left+a.right)/2,f=(a.top+a.bottom)/2,p=s&&d.animateScale,h=p?0:this.innerRadius,g=p?0:this.outerRadius,{sharedOptions:m,includeOptions:b}=this._getSharedOptions(n,i);let x=this._getRotation(),y;for(y=0;y<n;++y)x+=this._circumference(y,s);for(y=n;y<n+o;++y){const w=this._circumference(y,s),S=e[y],_={x:u+this.offsetX,y:f+this.offsetY,startAngle:x,endAngle:x+w,circumference:w,outerRadius:g,innerRadius:h};b&&(_.options=m||this.resolveDataElementOptions(y,S.active?"active":i)),x+=w,this.updateElement(S,y,_,i)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let o=0,i;for(i=0;i<n.length;i++){const s=e._parsed[i];s!==null&&!isNaN(s)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(o+=Math.abs(s))}return o}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?K*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,i=o.data.labels||[],s=Yt(n._parsed[e],o.options.locale);return{label:i[e]||"",value:s}}getMaxBorderWidth(e){let n=0;const o=this.chart;let i,s,r,a,c;if(!e){for(i=0,s=o.data.datasets.length;i<s;++i)if(o.isDatasetVisible(i)){r=o.getDatasetMeta(i),e=r.data,a=r.controller;break}}if(!e)return 0;for(i=0,s=e.length;i<s;++i)c=a.resolveDataElementOptions(i),c.borderAlign!=="inner"&&(n=Math.max(n,c.borderWidth||0,c.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let o=0,i=e.length;o<i;++o){const s=this.resolveDataElementOptions(o);n=Math.max(n,s.offset||0,s.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let o=0;o<e;++o)this.chart.isDatasetVisible(o)&&(n+=this._getRingWeight(o));return n}_getRingWeight(e){return Math.max(T(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}F(bt,"id","doughnut"),F(bt,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),F(bt,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),F(bt,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:i}}=e.legend.options;return n.labels.map((s,r)=>{const c=e.getDatasetMeta(0).controller.getStyle(r);return{text:s,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:i,lineWidth:c.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(r),index:r}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}}});class On extends Me{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:o,data:i=[],_dataset:s}=n,r=this.chart._animationsDisabled;let{start:a,count:c}=ks(n,i,r);this._drawStart=a,this._drawCount=c,Ss(n)&&(a=0,c=i.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!s._decimated,o.points=i;const d=this.resolveDatasetElementOptions(e);this.options.showLine||(d.borderWidth=0),d.segment=this.options.segment,this.updateElement(o,void 0,{animated:!r,options:d},e),this.updateElements(i,a,c,e)}updateElements(e,n,o,i){const s=i==="reset",{iScale:r,vScale:a,_stacked:c,_dataset:d}=this._cachedMeta,{sharedOptions:u,includeOptions:f}=this._getSharedOptions(n,i),p=r.axis,h=a.axis,{spanGaps:g,segment:m}=this.options,b=Et(g)?g:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||s||i==="none",y=n+o,w=e.length;let S=n>0&&this.getParsed(n-1);for(let _=0;_<w;++_){const C=e[_],v=x?C:{};if(_<n||_>=y){v.skip=!0;continue}const k=this.getParsed(_),M=H(k[h]),V=v[p]=r.getPixelForValue(k[p],_),$=v[h]=s||M?a.getBasePixel():a.getPixelForValue(c?this.applyStack(a,k,c):k[h],_);v.skip=isNaN(V)||isNaN($)||M,v.stop=_>0&&Math.abs(k[p]-S[p])>b,m&&(v.parsed=k,v.raw=d.data[_]),f&&(v.options=u||this.resolveDataElementOptions(_,C.active?"active":i)),x||this.updateElement(C,_,v,i),S=k}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,o=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return o;const s=i[0].size(this.resolveDataElementOptions(0)),r=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(o,s,r)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}F(On,"id","line"),F(On,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),F(On,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Kt extends Me{constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,i=o.data.labels||[],s=Yt(n._parsed[e].r,o.options.locale);return{label:i[e]||"",value:s}}parseObjectData(e,n,o,i){return Ls.bind(this)(e,n,o,i)}update(e){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){const e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((o,i)=>{const s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(s<n.min&&(n.min=s),s>n.max&&(n.max=s))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,o=e.options,i=Math.min(n.right-n.left,n.bottom-n.top),s=Math.max(i/2,0),r=Math.max(o.cutoutPercentage?s/100*o.cutoutPercentage:1,0),a=(s-r)/e.getVisibleDatasetCount();this.outerRadius=s-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(e,n,o,i){const s=i==="reset",r=this.chart,c=r.options.animation,d=this._cachedMeta.rScale,u=d.xCenter,f=d.yCenter,p=d.getIndexAngle(0)-.5*X;let h=p,g;const m=360/this.countVisibleElements();for(g=0;g<n;++g)h+=this._computeAngle(g,i,m);for(g=n;g<n+o;g++){const b=e[g];let x=h,y=h+this._computeAngle(g,i,m),w=r.getDataVisibility(g)?d.getDistanceFromCenterForValue(this.getParsed(g).r):0;h=y,s&&(c.animateScale&&(w=0),c.animateRotate&&(x=y=p));const S={x:u,y:f,innerRadius:0,outerRadius:w,startAngle:x,endAngle:y,options:this.resolveDataElementOptions(g,b.active?"active":i)};this.updateElement(b,g,S,i)}}countVisibleElements(){const e=this._cachedMeta;let n=0;return e.data.forEach((o,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(e,n,o){return this.chart.getDataVisibility(e)?ve(this.resolveDataElementOptions(e,n).angle||o):0}}F(Kt,"id","polarArea"),F(Kt,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),F(Kt,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:i}}=e.legend.options;return n.labels.map((s,r)=>{const c=e.getDatasetMeta(0).controller.getStyle(r);return{text:s,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:i,lineWidth:c.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(r),index:r}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class Go extends bt{}F(Go,"id","pie"),F(Go,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Nn extends Me{getLabelAndValue(e){const n=this._cachedMeta.vScale,o=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(o[n.axis])}}parseObjectData(e,n,o,i){return Ls.bind(this)(e,n,o,i)}update(e){const n=this._cachedMeta,o=n.dataset,i=n.data||[],s=n.iScale.getLabels();if(o.points=i,e!=="resize"){const r=this.resolveDatasetElementOptions(e);this.options.showLine||(r.borderWidth=0);const a={_loop:!0,_fullLoop:s.length===i.length,options:r};this.updateElement(o,void 0,a,e)}this.updateElements(i,0,i.length,e)}updateElements(e,n,o,i){const s=this._cachedMeta.rScale,r=i==="reset";for(let a=n;a<n+o;a++){const c=e[a],d=this.resolveDataElementOptions(a,c.active?"active":i),u=s.getPointPositionForValue(a,this.getParsed(a).r),f=r?s.xCenter:u.x,p=r?s.yCenter:u.y,h={x:f,y:p,angle:u.angle,skip:isNaN(f)||isNaN(p),options:d};this.updateElement(c,a,h,i)}}}F(Nn,"id","radar"),F(Nn,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),F(Nn,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class In extends Me{getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:i,yScale:s}=n,r=this.getParsed(e),a=i.getLabelForValue(r.x),c=s.getLabelForValue(r.y);return{label:o[e]||"",value:"("+a+", "+c+")"}}update(e){const n=this._cachedMeta,{data:o=[]}=n,i=this.chart._animationsDisabled;let{start:s,count:r}=ks(n,o,i);if(this._drawStart=s,this._drawCount=r,Ss(n)&&(s=0,r=o.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:a,_dataset:c}=n;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!c._decimated,a.points=o;const d=this.resolveDatasetElementOptions(e);d.segment=this.options.segment,this.updateElement(a,void 0,{animated:!i,options:d},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(o,s,r,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,n,o,i){const s=i==="reset",{iScale:r,vScale:a,_stacked:c,_dataset:d}=this._cachedMeta,u=this.resolveDataElementOptions(n,i),f=this.getSharedOptions(u),p=this.includeOptions(i,f),h=r.axis,g=a.axis,{spanGaps:m,segment:b}=this.options,x=Et(m)?m:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||s||i==="none";let w=n>0&&this.getParsed(n-1);for(let S=n;S<n+o;++S){const _=e[S],C=this.getParsed(S),v=y?_:{},k=H(C[g]),M=v[h]=r.getPixelForValue(C[h],S),V=v[g]=s||k?a.getBasePixel():a.getPixelForValue(c?this.applyStack(a,C,c):C[g],S);v.skip=isNaN(M)||isNaN(V)||k,v.stop=S>0&&Math.abs(C[h]-w[h])>x,b&&(v.parsed=C,v.raw=d.data[S]),p&&(v.options=f||this.resolveDataElementOptions(S,_.active?"active":i)),y||this.updateElement(_,S,v,i),w=C}this.updateSharedOptions(f,i,u)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let a=0;for(let c=n.length-1;c>=0;--c)a=Math.max(a,n[c].size(this.resolveDataElementOptions(c))/2);return a>0&&a}const o=e.dataset,i=o.options&&o.options.borderWidth||0;if(!n.length)return i;const s=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,s,r)/2}}F(In,"id","scatter"),F(In,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),F(In,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Vu=Object.freeze({__proto__:null,BarController:Pn,BubbleController:An,DoughnutController:bt,LineController:On,PieController:Go,PolarAreaController:Kt,RadarController:Nn,ScatterController:In});function yt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Uo{constructor(e){F(this,"options");this.options=e||{}}static override(e){Object.assign(Uo.prototype,e)}init(){}formats(){return yt()}parse(){return yt()}format(){return yt()}add(){return yt()}diff(){return yt()}startOf(){return yt()}endOf(){return yt()}}var Ru={_date:Uo};function Fu(t,e,n,o){const{controller:i,data:s,_sorted:r}=t,a=i._cachedMeta.iScale;if(a&&e===a.axis&&e!=="r"&&r&&s.length){const c=a._reversePixels?ed:Oe;if(o){if(i._sharedOptions){const d=s[0],u=typeof d.getRange=="function"&&d.getRange(e);if(u){const f=c(s,e,n-u),p=c(s,e,n+u);return{lo:f.lo,hi:p.hi}}}}else return c(s,e,n)}return{lo:0,hi:s.length-1}}function Zt(t,e,n,o,i){const s=t.getSortedVisibleDatasetMetas(),r=n[e];for(let a=0,c=s.length;a<c;++a){const{index:d,data:u}=s[a],{lo:f,hi:p}=Fu(s[a],e,r,i);for(let h=f;h<=p;++h){const g=u[h];g.skip||o(g,d,h)}}}function Bu(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(o,i){const s=e?Math.abs(o.x-i.x):0,r=n?Math.abs(o.y-i.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(r,2))}}function qo(t,e,n,o,i){const s=[];return!i&&!t.isPointInArea(e)||Zt(t,n,e,function(a,c,d){!i&&!Ne(a,t.chartArea,0)||a.inRange(e.x,e.y,o)&&s.push({element:a,datasetIndex:c,index:d})},!0),s}function $u(t,e,n,o){let i=[];function s(r,a,c){const{startAngle:d,endAngle:u}=r.getProps(["startAngle","endAngle"],o),{angle:f}=bs(r,{x:e.x,y:e.y});jt(f,d,u)&&i.push({element:r,datasetIndex:a,index:c})}return Zt(t,n,e,s),i}function Pu(t,e,n,o,i,s){let r=[];const a=Bu(n);let c=Number.POSITIVE_INFINITY;function d(u,f,p){const h=u.inRange(e.x,e.y,i);if(o&&!h)return;const g=u.getCenterPoint(i);if(!(!!s||t.isPointInArea(g))&&!h)return;const b=a(e,g);b<c?(r=[{element:u,datasetIndex:f,index:p}],c=b):b===c&&r.push({element:u,datasetIndex:f,index:p})}return Zt(t,n,e,d),r}function Xo(t,e,n,o,i,s){return!s&&!t.isPointInArea(e)?[]:n==="r"&&!o?$u(t,e,n,i):Pu(t,e,n,o,i,s)}function dr(t,e,n,o,i){const s=[],r=n==="x"?"inXRange":"inYRange";let a=!1;return Zt(t,n,e,(c,d,u)=>{c[r](e[n],i)&&(s.push({element:c,datasetIndex:d,index:u}),a=a||c.inRange(e.x,e.y,i))}),o&&!a?[]:s}var Au={evaluateInteractionItems:Zt,modes:{index(t,e,n,o){const i=gt(e,t),s=n.axis||"x",r=n.includeInvisible||!1,a=n.intersect?qo(t,i,s,o,r):Xo(t,i,s,!1,o,r),c=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(d=>{const u=a[0].index,f=d.data[u];f&&!f.skip&&c.push({element:f,datasetIndex:d.index,index:u})}),c):[]},dataset(t,e,n,o){const i=gt(e,t),s=n.axis||"xy",r=n.includeInvisible||!1;let a=n.intersect?qo(t,i,s,o,r):Xo(t,i,s,!1,o,r);if(a.length>0){const c=a[0].datasetIndex,d=t.getDatasetMeta(c).data;a=[];for(let u=0;u<d.length;++u)a.push({element:d[u],datasetIndex:c,index:u})}return a},point(t,e,n,o){const i=gt(e,t),s=n.axis||"xy",r=n.includeInvisible||!1;return qo(t,i,s,o,r)},nearest(t,e,n,o){const i=gt(e,t),s=n.axis||"xy",r=n.includeInvisible||!1;return Xo(t,i,s,n.intersect,o,r)},x(t,e,n,o){const i=gt(e,t);return dr(t,i,"x",n.intersect,o)},y(t,e,n,o){const i=gt(e,t);return dr(t,i,"y",n.intersect,o)}}};const ur=["left","top","right","bottom"];function Jt(t,e){return t.filter(n=>n.pos===e)}function fr(t,e){return t.filter(n=>ur.indexOf(n.pos)===-1&&n.box.axis===e)}function Qt(t,e){return t.sort((n,o)=>{const i=e?o:n,s=e?n:o;return i.weight===s.weight?i.index-s.index:i.weight-s.weight})}function Ou(t){const e=[];let n,o,i,s,r,a;for(n=0,o=(t||[]).length;n<o;++n)i=t[n],{position:s,options:{stack:r,stackWeight:a=1}}=i,e.push({index:n,box:i,pos:s,horizontal:i.isHorizontal(),weight:i.weight,stack:r&&s+r,stackWeight:a});return e}function Nu(t){const e={};for(const n of t){const{stack:o,pos:i,stackWeight:s}=n;if(!o||!ur.includes(i))continue;const r=e[o]||(e[o]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=s}return e}function Iu(t,e){const n=Nu(t),{vBoxMaxWidth:o,hBoxMaxHeight:i}=e;let s,r,a;for(s=0,r=t.length;s<r;++s){a=t[s];const{fullSize:c}=a.box,d=n[a.stack],u=d&&a.stackWeight/d.weight;a.horizontal?(a.width=u?u*o:c&&e.availableWidth,a.height=i):(a.width=o,a.height=u?u*i:c&&e.availableHeight)}return n}function Lu(t){const e=Ou(t),n=Qt(e.filter(d=>d.box.fullSize),!0),o=Qt(Jt(e,"left"),!0),i=Qt(Jt(e,"right")),s=Qt(Jt(e,"top"),!0),r=Qt(Jt(e,"bottom")),a=fr(e,"x"),c=fr(e,"y");return{fullSize:n,leftAndTop:o.concat(s),rightAndBottom:i.concat(c).concat(r).concat(a),chartArea:Jt(e,"chartArea"),vertical:o.concat(i).concat(c),horizontal:s.concat(r).concat(a)}}function hr(t,e,n,o){return Math.max(t[n],e[n])+Math.max(t[o],e[o])}function pr(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Tu(t,e,n,o){const{pos:i,box:s}=n,r=t.maxPadding;if(!z(i)){n.size&&(t[i]-=n.size);const f=o[n.stack]||{size:0,count:1};f.size=Math.max(f.size,n.horizontal?s.height:s.width),n.size=f.size/f.count,t[i]+=n.size}s.getPadding&&pr(r,s.getPadding());const a=Math.max(0,e.outerWidth-hr(r,t,"left","right")),c=Math.max(0,e.outerHeight-hr(r,t,"top","bottom")),d=a!==t.w,u=c!==t.h;return t.w=a,t.h=c,n.horizontal?{same:d,other:u}:{same:u,other:d}}function zu(t){const e=t.maxPadding;function n(o){const i=Math.max(e[o]-t[o],0);return t[o]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function Hu(t,e){const n=e.maxPadding;function o(i){const s={left:0,top:0,right:0,bottom:0};return i.forEach(r=>{s[r]=Math.max(e[r],n[r])}),s}return o(t?["left","right"]:["top","bottom"])}function en(t,e,n,o){const i=[];let s,r,a,c,d,u;for(s=0,r=t.length,d=0;s<r;++s){a=t[s],c=a.box,c.update(a.width||e.w,a.height||e.h,Hu(a.horizontal,e));const{same:f,other:p}=Tu(e,n,a,o);d|=f&&i.length,u=u||p,c.fullSize||i.push(a)}return d&&en(i,e,n,o)||u}function Ln(t,e,n,o,i){t.top=n,t.left=e,t.right=e+o,t.bottom=n+i,t.width=o,t.height=i}function gr(t,e,n,o){const i=n.padding;let{x:s,y:r}=e;for(const a of t){const c=a.box,d=o[a.stack]||{count:1,placed:0,weight:1},u=a.stackWeight/d.weight||1;if(a.horizontal){const f=e.w*u,p=d.size||c.height;zt(d.start)&&(r=d.start),c.fullSize?Ln(c,i.left,r,n.outerWidth-i.right-i.left,p):Ln(c,e.left+d.placed,r,f,p),d.start=r,d.placed+=f,r=c.bottom}else{const f=e.h*u,p=d.size||c.width;zt(d.start)&&(s=d.start),c.fullSize?Ln(c,s,i.top,p,n.outerHeight-i.bottom-i.top):Ln(c,s,e.top+d.placed,p,f),d.start=s,d.placed+=f,s=c.right}}e.x=s,e.y=r}var ce={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,o){if(!t)return;const i=ae(t.options.layout.padding),s=Math.max(e-i.width,0),r=Math.max(n-i.height,0),a=Lu(t.boxes),c=a.vertical,d=a.horizontal;W(t.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});const u=c.reduce((m,b)=>b.box.options&&b.box.options.display===!1?m:m+1,0)||1,f=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:s,availableHeight:r,vBoxMaxWidth:s/2/u,hBoxMaxHeight:r/2}),p=Object.assign({},i);pr(p,ae(o));const h=Object.assign({maxPadding:p,w:s,h:r,x:i.left,y:i.top},i),g=Iu(c.concat(d),f);en(a.fullSize,h,f,g),en(c,h,f,g),en(d,h,f,g)&&en(c,h,f,g),zu(h),gr(a.leftAndTop,h,f,g),h.x+=h.w,h.y+=h.h,gr(a.rightAndBottom,h,f,g),t.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},W(a.chartArea,m=>{const b=m.box;Object.assign(b,t.chartArea),b.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class mr{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,o){}removeEventListener(e,n,o){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,o,i){return n=Math.max(0,n||e.width),o=o||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):o)}}isAttached(e){return!0}updateConfig(e){}}class ju extends mr{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Tn="$chartjs",Wu={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},br=t=>t===null||t==="";function Yu(t,e){const n=t.style,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[Tn]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",br(i)){const s=Hs(t,"width");s!==void 0&&(t.width=s)}if(br(o))if(t.style.height==="")t.height=t.width/(e||2);else{const s=Hs(t,"height");s!==void 0&&(t.height=s)}return t}const yr=Ud?{passive:!0}:!1;function Gu(t,e,n){t.addEventListener(e,n,yr)}function Uu(t,e,n){t.canvas.removeEventListener(e,n,yr)}function qu(t,e){const n=Wu[t.type]||t.type,{x:o,y:i}=gt(t,e);return{type:n,chart:e,native:t,x:o!==void 0?o:null,y:i!==void 0?i:null}}function zn(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function Xu(t,e,n){const o=t.canvas,i=new MutationObserver(s=>{let r=!1;for(const a of s)r=r||zn(a.addedNodes,o),r=r&&!zn(a.removedNodes,o);r&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function Ku(t,e,n){const o=t.canvas,i=new MutationObserver(s=>{let r=!1;for(const a of s)r=r||zn(a.removedNodes,o),r=r&&!zn(a.addedNodes,o);r&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const tn=new Map;let _r=0;function xr(){const t=window.devicePixelRatio;t!==_r&&(_r=t,tn.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function Zu(t,e){tn.size||window.addEventListener("resize",xr),tn.set(t,e)}function Ju(t){tn.delete(t),tn.size||window.removeEventListener("resize",xr)}function Qu(t,e,n){const o=t.canvas,i=o&&Ho(o);if(!i)return;const s=Cs((a,c)=>{const d=i.clientWidth;n(a,c),d<i.clientWidth&&n()},window),r=new ResizeObserver(a=>{const c=a[0],d=c.contentRect.width,u=c.contentRect.height;d===0&&u===0||s(d,u)});return r.observe(i),Zu(t,s),r}function Ko(t,e,n){n&&n.disconnect(),e==="resize"&&Ju(t)}function ef(t,e,n){const o=t.canvas,i=Cs(s=>{t.ctx!==null&&n(qu(s,t))},t);return Gu(o,e,i),i}class tf extends mr{acquireContext(e,n){const o=e&&e.getContext&&e.getContext("2d");return o&&o.canvas===e?(Yu(e,n),o):null}releaseContext(e){const n=e.canvas;if(!n[Tn])return!1;const o=n[Tn].initial;["height","width"].forEach(s=>{const r=o[s];H(r)?n.removeAttribute(s):n.setAttribute(s,r)});const i=o.style||{};return Object.keys(i).forEach(s=>{n.style[s]=i[s]}),n.width=n.width,delete n[Tn],!0}addEventListener(e,n,o){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),r={attach:Xu,detach:Ku,resize:Qu}[n]||ef;i[n]=r(e,n,o)}removeEventListener(e,n){const o=e.$proxies||(e.$proxies={}),i=o[n];if(!i)return;({attach:Ko,detach:Ko,resize:Ko}[n]||Uu)(e,n,i),o[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,o,i){return Gd(e,n,o,i)}isAttached(e){const n=Ho(e);return!!(n&&n.isConnected)}}function nf(t){return!zo()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?ju:tf}let Le=(mo=class{constructor(){F(this,"x");F(this,"y");F(this,"active",!1);F(this,"options");F(this,"$animations")}tooltipPosition(e){const{x:n,y:o}=this.getProps(["x","y"],e);return{x:n,y:o}}hasValue(){return Et(this.x)&&Et(this.y)}getProps(e,n){const o=this.$animations;if(!n||!o)return this;const i={};return e.forEach(s=>{i[s]=o[s]&&o[s].active()?o[s]._to:this[s]}),i}},F(mo,"defaults",{}),F(mo,"defaultRoutes"),mo);function of(t,e){const n=t.options.ticks,o=sf(t),i=Math.min(n.maxTicksLimit||o,o),s=n.major.enabled?lf(e):[],r=s.length,a=s[0],c=s[r-1],d=[];if(r>i)return af(e,d,s,r/i),d;const u=rf(s,e,i);if(r>0){let f,p;const h=r>1?Math.round((c-a)/(r-1)):null;for(Hn(e,d,u,H(h)?0:a-h,a),f=0,p=r-1;f<p;f++)Hn(e,d,u,s[f],s[f+1]);return Hn(e,d,u,c,H(h)?e.length:c+h),d}return Hn(e,d,u),d}function sf(t){const e=t.options.offset,n=t._tickSize(),o=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(o,i))}function rf(t,e,n){const o=cf(t),i=e.length/n;if(!o)return Math.max(i,1);const s=Kc(o);for(let r=0,a=s.length-1;r<a;r++){const c=s[r];if(c>i)return c}return Math.max(i,1)}function lf(t){const e=[];let n,o;for(n=0,o=t.length;n<o;n++)t[n].major&&e.push(n);return e}function af(t,e,n,o){let i=0,s=n[0],r;for(o=Math.ceil(o),r=0;r<t.length;r++)r===s&&(e.push(t[r]),i++,s=n[i*o])}function Hn(t,e,n,o,i){const s=T(o,0),r=Math.min(T(i,t.length),t.length);let a=0,c,d,u;for(n=Math.ceil(n),i&&(c=i-o,n=c/Math.floor(c/n)),u=s;u<0;)a++,u=Math.round(s+a*n);for(d=Math.max(s,0);d<r;d++)d===u&&(e.push(t[d]),a++,u=Math.round(s+a*n))}function cf(t){const e=t.length;let n,o;if(e<2)return!1;for(o=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==o)return!1;return o}const df=t=>t==="left"?"right":t==="right"?"left":t,wr=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,Cr=(t,e)=>Math.min(e||t,t);function kr(t,e){const n=[],o=t.length/e,i=t.length;let s=0;for(;s<i;s+=o)n.push(t[Math.floor(s)]);return n}function uf(t,e,n){const o=t.ticks.length,i=Math.min(e,o-1),s=t._startPixel,r=t._endPixel,a=1e-6;let c=t.getPixelForTick(i),d;if(!(n&&(o===1?d=Math.max(c-s,r-c):e===0?d=(t.getPixelForTick(1)-c)/2:d=(c-t.getPixelForTick(i-1))/2,c+=i<e?d:-d,c<s-a||c>r+a)))return c}function ff(t,e){W(t,n=>{const o=n.gc,i=o.length/2;let s;if(i>e){for(s=0;s<i;++s)delete n.data[o[s]];o.splice(0,i)}})}function nn(t){return t.drawTicks?t.tickLength:0}function Sr(t,e){if(!t.display)return 0;const n=oe(t.font,e),o=ae(t.padding);return(q(t.text)?t.text.length:1)*n.lineHeight+o.height}function hf(t,e){return Qe(t,{scale:e,type:"scale"})}function pf(t,e,n){return Qe(t,{tick:n,index:e,type:"tick"})}function gf(t,e,n){let o=Fo(t);return(n&&e!=="right"||!n&&e==="right")&&(o=df(o)),o}function mf(t,e,n,o){const{top:i,left:s,bottom:r,right:a,chart:c}=t,{chartArea:d,scales:u}=c;let f=0,p,h,g;const m=r-i,b=a-s;if(t.isHorizontal()){if(h=le(o,s,a),z(n)){const x=Object.keys(n)[0],y=n[x];g=u[x].getPixelForValue(y)+m-e}else n==="center"?g=(d.bottom+d.top)/2+m-e:g=wr(t,n,e);p=a-s}else{if(z(n)){const x=Object.keys(n)[0],y=n[x];h=u[x].getPixelForValue(y)-b+e}else n==="center"?h=(d.left+d.right)/2-b+e:h=wr(t,n,e);g=le(o,r,i),f=n==="left"?-ne:ne}return{titleX:h,titleY:g,maxWidth:p,rotation:f}}class _t extends Le{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:o,_suggestedMax:i}=this;return e=ye(e,Number.POSITIVE_INFINITY),n=ye(n,Number.NEGATIVE_INFINITY),o=ye(o,Number.POSITIVE_INFINITY),i=ye(i,Number.NEGATIVE_INFINITY),{min:ye(e,o),max:ye(n,i),minDefined:ee(e),maxDefined:ee(n)}}getMinMax(e){let{min:n,max:o,minDefined:i,maxDefined:s}=this.getUserBounds(),r;if(i&&s)return{min:n,max:o};const a=this.getMatchingVisibleMetas();for(let c=0,d=a.length;c<d;++c)r=a[c].controller.getMinMax(this,e),i||(n=Math.min(n,r.min)),s||(o=Math.max(o,r.max));return n=s&&n>o?o:n,o=i&&n>o?n:o,{min:ye(n,ye(o,n)),max:ye(o,ye(n,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){G(this.options.beforeUpdate,[this])}update(e,n,o){const{beginAtZero:i,grace:s,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=o=Object.assign({left:0,right:0,top:0,bottom:0},o),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+o.left+o.right:this.height+o.top+o.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Sd(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=a<this.ticks.length;this._convertTicksToLabels(c?kr(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=of(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,o;this.isHorizontal()?(n=this.left,o=this.right):(n=this.top,o=this.bottom,e=!e),this._startPixel=n,this._endPixel=o,this._reversePixels=e,this._length=o-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){G(this.options.afterUpdate,[this])}beforeSetDimensions(){G(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){G(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),G(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){G(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let o,i,s;for(o=0,i=e.length;o<i;o++)s=e[o],s.label=G(n.callback,[s.value,o,e],this)}afterTickToLabelConversion(){G(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){G(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,o=Cr(this.ticks.length,e.ticks.maxTicksLimit),i=n.minRotation||0,s=n.maxRotation;let r=i,a,c,d;if(!this._isVisible()||!n.display||i>=s||o<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),f=u.widest.width,p=u.highest.height,h=se(this.chart.width-f,0,this.maxWidth);a=e.offset?this.maxWidth/o:h/(o-1),f+6>a&&(a=h/(o-(e.offset?.5:1)),c=this.maxHeight-nn(e.grid)-n.padding-Sr(e.title,this.chart.options.font),d=Math.sqrt(f*f+p*p),r=Do(Math.min(Math.asin(se((u.highest.height+6)/a,-1,1)),Math.asin(se(c/d,-1,1))-Math.asin(se(p/d,-1,1)))),r=Math.max(i,Math.min(s,r))),this.labelRotation=r}afterCalculateLabelRotation(){G(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){G(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:o,title:i,grid:s}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const c=Sr(i,n.options.font);if(a?(e.width=this.maxWidth,e.height=nn(s)+c):(e.height=this.maxHeight,e.width=nn(s)+c),o.display&&this.ticks.length){const{first:d,last:u,widest:f,highest:p}=this._getLabelSizes(),h=o.padding*2,g=ve(this.labelRotation),m=Math.cos(g),b=Math.sin(g);if(a){const x=o.mirror?0:b*f.width+m*p.height;e.height=Math.min(this.maxHeight,e.height+x+h)}else{const x=o.mirror?0:m*f.width+b*p.height;e.width=Math.min(this.maxWidth,e.width+x+h)}this._calculatePadding(d,u,b,m)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,o,i){const{ticks:{align:s,padding:r},position:a}=this.options,c=this.labelRotation!==0,d=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let p=0,h=0;c?d?(p=i*e.width,h=o*n.height):(p=o*e.height,h=i*n.width):s==="start"?h=n.width:s==="end"?p=e.width:s!=="inner"&&(p=e.width/2,h=n.width/2),this.paddingLeft=Math.max((p-u+r)*this.width/(this.width-u),0),this.paddingRight=Math.max((h-f+r)*this.width/(this.width-f),0)}else{let u=n.height/2,f=e.height/2;s==="start"?(u=0,f=e.height):s==="end"&&(u=n.height,f=0),this.paddingTop=u+r,this.paddingBottom=f+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){G(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,o;for(n=0,o=e.length;n<o;n++)H(e[n].label)&&(e.splice(n,1),o--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let o=this.ticks;n<o.length&&(o=kr(o,n)),this._labelSizes=e=this._computeLabelSizes(o,o.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,o){const{ctx:i,_longestTextCache:s}=this,r=[],a=[],c=Math.floor(n/Cr(n,o));let d=0,u=0,f,p,h,g,m,b,x,y,w,S,_;for(f=0;f<n;f+=c){if(g=e[f].label,m=this._resolveTickFontOptions(f),i.font=b=m.string,x=s[b]=s[b]||{data:{},gc:[]},y=m.lineHeight,w=S=0,!H(g)&&!q(g))w=En(i,x.data,x.gc,w,g),S=y;else if(q(g))for(p=0,h=g.length;p<h;++p)_=g[p],!H(_)&&!q(_)&&(w=En(i,x.data,x.gc,w,_),S+=y);r.push(w),a.push(S),d=Math.max(w,d),u=Math.max(S,u)}ff(s,n);const C=r.indexOf(d),v=a.indexOf(u),k=M=>({width:r[M]||0,height:a[M]||0});return{first:k(0),last:k(n-1),widest:k(C),highest:k(v),widths:r,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return Qc(this._alignToPixels?ut(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const o=n[e];return o.$context||(o.$context=pf(this.getContext(),e,o))}return this.$context||(this.$context=hf(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=ve(this.labelRotation),o=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),s=this._getLabelSizes(),r=e.autoSkipPadding||0,a=s?s.widest.width+r:0,c=s?s.highest.height+r:0;return this.isHorizontal()?c*o>a*i?a/o:c/i:c*i<a*o?c/o:a/i}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,o=this.chart,i=this.options,{grid:s,position:r,border:a}=i,c=s.offset,d=this.isHorizontal(),f=this.ticks.length+(c?1:0),p=nn(s),h=[],g=a.setContext(this.getContext()),m=g.display?g.width:0,b=m/2,x=function(E){return ut(o,E,m)};let y,w,S,_,C,v,k,M,V,$,O,U;if(r==="top")y=x(this.bottom),v=this.bottom-p,M=y-b,$=x(e.top)+b,U=e.bottom;else if(r==="bottom")y=x(this.top),$=e.top,U=x(e.bottom)-b,v=y+b,M=this.top+p;else if(r==="left")y=x(this.right),C=this.right-p,k=y-b,V=x(e.left)+b,O=e.right;else if(r==="right")y=x(this.left),V=e.left,O=x(e.right)-b,C=y+b,k=this.left+p;else if(n==="x"){if(r==="center")y=x((e.top+e.bottom)/2+.5);else if(z(r)){const E=Object.keys(r)[0],R=r[E];y=x(this.chart.scales[E].getPixelForValue(R))}$=e.top,U=e.bottom,v=y+b,M=v+p}else if(n==="y"){if(r==="center")y=x((e.left+e.right)/2);else if(z(r)){const E=Object.keys(r)[0],R=r[E];y=x(this.chart.scales[E].getPixelForValue(R))}C=y-b,k=C-p,V=e.left,O=e.right}const P=T(i.ticks.maxTicksLimit,f),D=Math.max(1,Math.ceil(f/P));for(w=0;w<f;w+=D){const E=this.getContext(w),R=s.setContext(E),B=a.setContext(E),A=R.lineWidth,N=R.color,j=B.dash||[],Y=B.dashOffset,Z=R.tickWidth,J=R.tickColor,re=R.tickBorderDash||[],me=R.tickBorderDashOffset;S=uf(this,w,c),S!==void 0&&(_=ut(o,S,A),d?C=k=V=O=_:v=M=$=U=_,h.push({tx1:C,ty1:v,tx2:k,ty2:M,x1:V,y1:$,x2:O,y2:U,width:A,color:N,borderDash:j,borderDashOffset:Y,tickWidth:Z,tickColor:J,tickBorderDash:re,tickBorderDashOffset:me}))}return this._ticksLength=f,this._borderValue=y,h}_computeLabelItems(e){const n=this.axis,o=this.options,{position:i,ticks:s}=o,r=this.isHorizontal(),a=this.ticks,{align:c,crossAlign:d,padding:u,mirror:f}=s,p=nn(o.grid),h=p+u,g=f?-u:h,m=-ve(this.labelRotation),b=[];let x,y,w,S,_,C,v,k,M,V,$,O,U="middle";if(i==="top")C=this.bottom-g,v=this._getXAxisLabelAlignment();else if(i==="bottom")C=this.top+g,v=this._getXAxisLabelAlignment();else if(i==="left"){const D=this._getYAxisLabelAlignment(p);v=D.textAlign,_=D.x}else if(i==="right"){const D=this._getYAxisLabelAlignment(p);v=D.textAlign,_=D.x}else if(n==="x"){if(i==="center")C=(e.top+e.bottom)/2+h;else if(z(i)){const D=Object.keys(i)[0],E=i[D];C=this.chart.scales[D].getPixelForValue(E)+h}v=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")_=(e.left+e.right)/2-h;else if(z(i)){const D=Object.keys(i)[0],E=i[D];_=this.chart.scales[D].getPixelForValue(E)}v=this._getYAxisLabelAlignment(p).textAlign}n==="y"&&(c==="start"?U="top":c==="end"&&(U="bottom"));const P=this._getLabelSizes();for(x=0,y=a.length;x<y;++x){w=a[x],S=w.label;const D=s.setContext(this.getContext(x));k=this.getPixelForTick(x)+s.labelOffset,M=this._resolveTickFontOptions(x),V=M.lineHeight,$=q(S)?S.length:1;const E=$/2,R=D.color,B=D.textStrokeColor,A=D.textStrokeWidth;let N=v;r?(_=k,v==="inner"&&(x===y-1?N=this.options.reverse?"left":"right":x===0?N=this.options.reverse?"right":"left":N="center"),i==="top"?d==="near"||m!==0?O=-$*V+V/2:d==="center"?O=-P.highest.height/2-E*V+V:O=-P.highest.height+V/2:d==="near"||m!==0?O=V/2:d==="center"?O=P.highest.height/2-E*V:O=P.highest.height-$*V,f&&(O*=-1),m!==0&&!D.showLabelBackdrop&&(_+=V/2*Math.sin(m))):(C=k,O=(1-$)*V/2);let j;if(D.showLabelBackdrop){const Y=ae(D.backdropPadding),Z=P.heights[x],J=P.widths[x];let re=O-Y.top,me=0-Y.left;switch(U){case"middle":re-=Z/2;break;case"bottom":re-=Z;break}switch(v){case"center":me-=J/2;break;case"right":me-=J;break;case"inner":x===y-1?me-=J:x>0&&(me-=J/2);break}j={left:me,top:re,width:J+Y.width,height:Z+Y.height,color:D.backdropColor}}b.push({label:S,font:M,textOffset:O,options:{rotation:m,color:R,strokeColor:B,strokeWidth:A,textAlign:N,textBaseline:U,translation:[_,C],backdrop:j}})}return b}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-ve(this.labelRotation))return e==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:o,mirror:i,padding:s}}=this.options,r=this._getLabelSizes(),a=e+s,c=r.widest.width;let d,u;return n==="left"?i?(u=this.right+s,o==="near"?d="left":o==="center"?(d="center",u+=c/2):(d="right",u+=c)):(u=this.right-a,o==="near"?d="right":o==="center"?(d="center",u-=c/2):(d="left",u=this.left)):n==="right"?i?(u=this.left+s,o==="near"?d="right":o==="center"?(d="center",u-=c/2):(d="left",u-=c)):(u=this.left+a,o==="near"?d="left":o==="center"?(d="center",u+=c/2):(d="right",u=this.right)):d="right",{textAlign:d,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:o,top:i,width:s,height:r}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(o,i,s,r),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(s=>s.value===e);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const n=this.options.grid,o=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let s,r;const a=(c,d,u)=>{!u.width||!u.color||(o.save(),o.lineWidth=u.width,o.strokeStyle=u.color,o.setLineDash(u.borderDash||[]),o.lineDashOffset=u.borderDashOffset,o.beginPath(),o.moveTo(c.x,c.y),o.lineTo(d.x,d.y),o.stroke(),o.restore())};if(n.display)for(s=0,r=i.length;s<r;++s){const c=i[s];n.drawOnChartArea&&a({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),n.drawTicks&&a({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:o,grid:i}}=this,s=o.setContext(this.getContext()),r=o.display?s.width:0;if(!r)return;const a=i.setContext(this.getContext(0)).lineWidth,c=this._borderValue;let d,u,f,p;this.isHorizontal()?(d=ut(e,this.left,r)-r/2,u=ut(e,this.right,a)+a/2,f=p=c):(f=ut(e,this.top,r)-r/2,p=ut(e,this.bottom,a)+a/2,d=u=c),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(d,f),n.lineTo(u,p),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const o=this.ctx,i=this._computeLabelArea();i&&Dn(o,i);const s=this.getLabelItems(e);for(const r of s){const a=r.options,c=r.font,d=r.label,u=r.textOffset;ft(o,d,0,u,c,a)}i&&Vn(o)}drawTitle(){const{ctx:e,options:{position:n,title:o,reverse:i}}=this;if(!o.display)return;const s=oe(o.font),r=ae(o.padding),a=o.align;let c=s.lineHeight/2;n==="bottom"||n==="center"||z(n)?(c+=r.bottom,q(o.text)&&(c+=s.lineHeight*(o.text.length-1))):c+=r.top;const{titleX:d,titleY:u,maxWidth:f,rotation:p}=mf(this,c,n,a);ft(e,o.text,0,0,s,{color:o.color,maxWidth:f,rotation:p,textAlign:gf(a,n,i),textBaseline:"middle",translation:[d,u]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,o=T(e.grid&&e.grid.z,-1),i=T(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==_t.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:o,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",i=[];let s,r;for(s=0,r=n.length;s<r;++s){const a=n[s];a[o]===this.id&&(!e||a.type===e)&&i.push(a)}return i}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return oe(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class jn{constructor(e,n,o){this.type=e,this.scope=n,this.override=o,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let o;_f(n)&&(o=this.register(n));const i=this.items,s=e.id,r=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+e);return s in i||(i[s]=e,bf(e,r,o),this.override&&te.override(e.id,e.overrides)),r}get(e){return this.items[e]}unregister(e){const n=this.items,o=e.id,i=this.scope;o in n&&delete n[o],i&&o in te[i]&&(delete te[i][o],this.override&&delete dt[o])}}function bf(t,e,n){const o=Lt(Object.create(null),[n?te.get(n):{},te.get(e),t.defaults]);te.set(e,o),t.defaultRoutes&&yf(e,t.defaultRoutes),t.descriptors&&te.describe(e,t.descriptors)}function yf(t,e){Object.keys(e).forEach(n=>{const o=n.split("."),i=o.pop(),s=[t].concat(o).join("."),r=e[n].split("."),a=r.pop(),c=r.join(".");te.route(s,i,c,a)})}function _f(t){return"id"in t&&"defaults"in t}class xf{constructor(){this.controllers=new jn(Me,"datasets",!0),this.elements=new jn(Le,"elements"),this.plugins=new jn(Object,"plugins"),this.scales=new jn(_t,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,o){[...n].forEach(i=>{const s=o||this._getRegistryForType(i);o||s.isForType(i)||s===this.plugins&&i.id?this._exec(e,s,i):W(i,r=>{const a=o||this._getRegistryForType(r);this._exec(e,a,r)})})}_exec(e,n,o){const i=Eo(e);G(o["before"+i],[],o),n[e](o),G(o["after"+i],[],o)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const o=this._typedRegistries[n];if(o.isForType(e))return o}return this.plugins}_get(e,n,o){const i=n.get(e);if(i===void 0)throw new Error('"'+e+'" is not a registered '+o+".");return i}}var Re=new xf;class wf{constructor(){this._init=[]}notify(e,n,o,i){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const s=i?this._descriptors(e).filter(i):this._descriptors(e),r=this._notify(s,e,n,o);return n==="afterDestroy"&&(this._notify(s,e,"stop"),this._notify(this._init,e,"uninstall")),r}_notify(e,n,o,i){i=i||{};for(const s of e){const r=s.plugin,a=r[o],c=[n,i,s.options];if(G(a,c,r)===!1&&i.cancelable)return!1}return!0}invalidate(){H(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const o=e&&e.config,i=T(o.options&&o.options.plugins,{}),s=Cf(o);return i===!1&&!n?[]:Sf(e,s,i,n)}_notifyStateChanges(e){const n=this._oldCache||[],o=this._cache,i=(s,r)=>s.filter(a=>!r.some(c=>a.plugin.id===c.plugin.id));this._notify(i(n,o),e,"stop"),this._notify(i(o,n),e,"start")}}function Cf(t){const e={},n=[],o=Object.keys(Re.plugins.items);for(let s=0;s<o.length;s++)n.push(Re.getPlugin(o[s]));const i=t.plugins||[];for(let s=0;s<i.length;s++){const r=i[s];n.indexOf(r)===-1&&(n.push(r),e[r.id]=!0)}return{plugins:n,localIds:e}}function kf(t,e){return!e&&t===!1?null:t===!0?{}:t}function Sf(t,{plugins:e,localIds:n},o,i){const s=[],r=t.getContext();for(const a of e){const c=a.id,d=kf(o[c],i);d!==null&&s.push({plugin:a,options:vf(t.config,{plugin:a,local:n[c]},d,r)})}return s}function vf(t,{plugin:e,local:n},o,i){const s=t.pluginScopeKeys(e),r=t.getOptionScopes(o,s);return n&&e.defaults&&r.push(e.defaults),t.createResolver(r,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Zo(t,e){const n=te.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function Mf(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function Ef(t,e){return t===e?"_index_":"_value_"}function vr(t){if(t==="x"||t==="y"||t==="r")return t}function Df(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function Jo(t,...e){if(vr(t))return t;for(const n of e){const o=n.axis||Df(n.position)||t.length>1&&vr(t[0].toLowerCase());if(o)return o}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Mr(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function Vf(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(o=>o.xAxisID===t||o.yAxisID===t);if(n.length)return Mr(t,"x",n[0])||Mr(t,"y",n[0])}return{}}function Rf(t,e){const n=dt[t.type]||{scales:{}},o=e.scales||{},i=Zo(t.type,e),s=Object.create(null);return Object.keys(o).forEach(r=>{const a=o[r];if(!z(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const c=Jo(r,a,Vf(r,t),te.scales[a.type]),d=Ef(c,i),u=n.scales||{};s[r]=Tt(Object.create(null),[{axis:c},a,u[c],u[d]])}),t.data.datasets.forEach(r=>{const a=r.type||t.type,c=r.indexAxis||Zo(a,e),u=(dt[a]||{}).scales||{};Object.keys(u).forEach(f=>{const p=Mf(f,c),h=r[p+"AxisID"]||p;s[h]=s[h]||Object.create(null),Tt(s[h],[{axis:p},o[h],u[f]])})}),Object.keys(s).forEach(r=>{const a=s[r];Tt(a,[te.scales[a.type],te.scale])}),s}function Er(t){const e=t.options||(t.options={});e.plugins=T(e.plugins,{}),e.scales=Rf(t,e)}function Dr(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function Ff(t){return t=t||{},t.data=Dr(t.data),Er(t),t}const Vr=new Map,Rr=new Set;function Wn(t,e){let n=Vr.get(t);return n||(n=e(),Vr.set(t,n),Rr.add(n)),n}const on=(t,e,n)=>{const o=Ke(e,n);o!==void 0&&t.add(o)};class Bf{constructor(e){this._config=Ff(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Dr(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Er(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Wn(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return Wn(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return Wn(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,o=this.type;return Wn(`${o}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const o=this._scopeCache;let i=o.get(e);return(!i||n)&&(i=new Map,o.set(e,i)),i}getOptionScopes(e,n,o){const{options:i,type:s}=this,r=this._cachedScopes(e,o),a=r.get(n);if(a)return a;const c=new Set;n.forEach(u=>{e&&(c.add(e),u.forEach(f=>on(c,e,f))),u.forEach(f=>on(c,i,f)),u.forEach(f=>on(c,dt[s]||{},f)),u.forEach(f=>on(c,te,f)),u.forEach(f=>on(c,Po,f))});const d=Array.from(c);return d.length===0&&d.push(Object.create(null)),Rr.has(n)&&r.set(n,d),d}chartOptionScopes(){const{options:e,type:n}=this;return[e,dt[n]||{},te.datasets[n]||{},{type:n},te,Po]}resolveNamedOptions(e,n,o,i=[""]){const s={$shared:!0},{resolver:r,subPrefixes:a}=Fr(this._resolverCache,e,i);let c=r;if(Pf(r,n)){s.$shared=!1,o=Ze(o)?o():o;const d=this.createResolver(e,o,a);c=Dt(r,o,d)}for(const d of n)s[d]=c[d];return s}createResolver(e,n,o=[""],i){const{resolver:s}=Fr(this._resolverCache,e,o);return z(n)?Dt(s,n,void 0,i):s}}function Fr(t,e,n){let o=t.get(e);o||(o=new Map,t.set(e,o));const i=n.join();let s=o.get(i);return s||(s={resolver:Io(e,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},o.set(i,s)),s}const $f=t=>z(t)&&Object.getOwnPropertyNames(t).some(e=>Ze(t[e]));function Pf(t,e){const{isScriptable:n,isIndexable:o}=$s(t);for(const i of e){const s=n(i),r=o(i),a=(r||s)&&t[i];if(s&&(Ze(a)||$f(a))||r&&q(a))return!0}return!1}var Af="4.4.1";const Of=["top","bottom","left","right","chartArea"];function Br(t,e){return t==="top"||t==="bottom"||Of.indexOf(t)===-1&&e==="x"}function $r(t,e){return function(n,o){return n[t]===o[t]?n[e]-o[e]:n[t]-o[t]}}function Pr(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),G(n&&n.onComplete,[t],e)}function Nf(t){const e=t.chart,n=e.options.animation;G(n&&n.onProgress,[t],e)}function Ar(t){return zo()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Yn={},Or=t=>{const e=Ar(t);return Object.values(Yn).filter(n=>n.canvas===e).pop()};function If(t,e,n){const o=Object.keys(t);for(const i of o){const s=+i;if(s>=e){const r=t[i];delete t[i],(n>0||s>e)&&(t[s+n]=r)}}}function Lf(t,e,n,o){return!n||t.type==="mouseout"?null:o?e:t}function Gn(t,e,n){return t.options.clip?t[n]:e[n]}function Tf(t,e){const{xScale:n,yScale:o}=t;return n&&o?{left:Gn(n,e,"left"),right:Gn(n,e,"right"),top:Gn(o,e,"top"),bottom:Gn(o,e,"bottom")}:e}class Te{static register(...e){Re.add(...e),Nr()}static unregister(...e){Re.remove(...e),Nr()}constructor(e,n){const o=this.config=new Bf(n),i=Ar(e),s=Or(i);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const r=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||nf(i)),this.platform.updateConfig(o);const a=this.platform.acquireContext(i,r.aspectRatio),c=a&&a.canvas,d=c&&c.height,u=c&&c.width;if(this.id=zc(),this.ctx=a,this.canvas=c,this.width=u,this.height=d,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new wf,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=od(f=>this.update(f),r.resizeDelay||0),this._dataChanges=[],Yn[this.id]=this,!a||!c){console.error("Failed to create chart: can't acquire context from the given item");return}Ie.listen(this,"complete",Pr),Ie.listen(this,"progress",Nf),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:o,height:i,_aspectRatio:s}=this;return H(e)?n&&s?s:i?o/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return Re}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():zs(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Rs(this.canvas,this.ctx),this}stop(){return Ie.stop(this),this}resize(e,n){Ie.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const o=this.options,i=this.canvas,s=o.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(i,e,n,s),a=o.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,zs(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),G(o.onResize,[this,r],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};W(n,(o,i)=>{o.id=i})}buildOrUpdateScales(){const e=this.options,n=e.scales,o=this.scales,i=Object.keys(o).reduce((r,a)=>(r[a]=!1,r),{});let s=[];n&&(s=s.concat(Object.keys(n).map(r=>{const a=n[r],c=Jo(r,a),d=c==="r",u=c==="x";return{options:a,dposition:d?"chartArea":u?"bottom":"left",dtype:d?"radialLinear":u?"category":"linear"}}))),W(s,r=>{const a=r.options,c=a.id,d=Jo(c,a),u=T(a.type,r.dtype);(a.position===void 0||Br(a.position,d)!==Br(r.dposition))&&(a.position=r.dposition),i[c]=!0;let f=null;if(c in o&&o[c].type===u)f=o[c];else{const p=Re.getScale(u);f=new p({id:c,type:u,ctx:this.ctx,chart:this}),o[f.id]=f}f.init(a,e)}),W(i,(r,a)=>{r||delete o[a]}),W(o,r=>{ce.configure(this,r,r.options),ce.addBox(this,r)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,o=e.length;if(e.sort((i,s)=>i.index-s.index),o>n){for(let i=n;i<o;++i)this._destroyDatasetMeta(i);e.splice(n,o-n)}this._sortedMetasets=e.slice(0).sort($r("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((o,i)=>{n.filter(s=>s===o._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let o,i;for(this._removeUnreferencedMetasets(),o=0,i=n.length;o<i;o++){const s=n[o];let r=this.getDatasetMeta(o);const a=s.type||this.config.type;if(r.type&&r.type!==a&&(this._destroyDatasetMeta(o),r=this.getDatasetMeta(o)),r.type=a,r.indexAxis=s.indexAxis||Zo(a,this.options),r.order=s.order||0,r.index=o,r.label=""+s.label,r.visible=this.isDatasetVisible(o),r.controller)r.controller.updateIndex(o),r.controller.linkScales();else{const c=Re.getController(a),{datasetElementType:d,dataElementType:u}=te.datasets[a];Object.assign(c,{dataElementType:Re.getElement(u),datasetElementType:d&&Re.getElement(d)}),r.controller=new c(this,o),e.push(r.controller)}}return this._updateMetasets(),e}_resetElements(){W(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const o=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!o.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let d=0,u=this.data.datasets.length;d<u;d++){const{controller:f}=this.getDatasetMeta(d),p=!i&&s.indexOf(f)===-1;f.buildOrUpdateElements(p),r=Math.max(+f.getMaxOverflow(),r)}r=this._minPadding=o.layout.autoPadding?r:0,this._updateLayout(r),i||W(s,d=>{d.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort($r("z","_idx"));const{_active:a,_lastEvent:c}=this;c?this._eventHandler(c,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){W(this.scales,e=>{ce.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),o=new Set(e.events);(!fs(n,o)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:o,start:i,count:s}of n){const r=o==="_removeElements"?-s:s;If(e,i,r)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,o=s=>new Set(e.filter(r=>r[0]===s).map((r,a)=>a+","+r.splice(1).join(","))),i=o(0);for(let s=1;s<n;s++)if(!fs(i,o(s)))return;return Array.from(i).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ce.update(this,this.width,this.height,e);const n=this.chartArea,o=n.width<=0||n.height<=0;this._layers=[],W(this.boxes,i=>{o&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,s)=>{i._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,o=this.data.datasets.length;n<o;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,o=this.data.datasets.length;n<o;++n)this._updateDataset(n,Ze(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const o=this.getDatasetMeta(e),i={meta:o,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(o.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Ie.has(this)?this.attached&&!Ie.running(this)&&Ie.start(this):(this.draw(),Pr({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:o,height:i}=this._resizeBeforeDraw;this._resize(o,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,o=[];let i,s;for(i=0,s=n.length;i<s;++i){const r=n[i];(!e||r.visible)&&o.push(r)}return o}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,o=e._clip,i=!o.disabled,s=Tf(e,this.chartArea),r={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&Dn(n,{left:o.left===!1?0:s.left-o.left,right:o.right===!1?this.width:s.right+o.right,top:o.top===!1?0:s.top-o.top,bottom:o.bottom===!1?this.height:s.bottom+o.bottom}),e.controller.draw(),i&&Vn(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(e){return Ne(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,o,i){const s=Au.modes[n];return typeof s=="function"?s(this,e,o,i):[]}getDatasetMeta(e){const n=this.data.datasets[e],o=this._metasets;let i=o.filter(s=>s&&s._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},o.push(i)),i}getContext(){return this.$context||(this.$context=Qe(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const o=this.getDatasetMeta(e);return typeof o.hidden=="boolean"?!o.hidden:!n.hidden}setDatasetVisibility(e,n){const o=this.getDatasetMeta(e);o.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,o){const i=o?"show":"hide",s=this.getDatasetMeta(e),r=s.controller._resolveAnimations(void 0,i);zt(n)?(s.data[n].hidden=!o,this.update()):(this.setDatasetVisibility(e,o),r.update(s,{visible:o}),this.update(a=>a.datasetIndex===e?i:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Ie.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),Rs(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Yn[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,o=(s,r)=>{n.addEventListener(this,s,r),e[s]=r},i=(s,r,a)=>{s.offsetX=r,s.offsetY=a,this._eventHandler(s)};W(this.options.events,s=>o(s,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,o=(c,d)=>{n.addEventListener(this,c,d),e[c]=d},i=(c,d)=>{e[c]&&(n.removeEventListener(this,c,d),delete e[c])},s=(c,d)=>{this.canvas&&this.resize(c,d)};let r;const a=()=>{i("attach",a),this.attached=!0,this.resize(),o("resize",s),o("detach",r)};r=()=>{this.attached=!1,i("resize",s),this._stop(),this._resize(0,0),o("attach",a)},n.isAttached(this.canvas)?a():r()}unbindEvents(){W(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},W(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,o){const i=o?"set":"remove";let s,r,a,c;for(n==="dataset"&&(s=this.getDatasetMeta(e[0].datasetIndex),s.controller["_"+i+"DatasetHoverStyle"]()),a=0,c=e.length;a<c;++a){r=e[a];const d=r&&this.getDatasetMeta(r.datasetIndex).controller;d&&d[i+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],o=e.map(({datasetIndex:s,index:r})=>{const a=this.getDatasetMeta(s);if(!a)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:a.data[r],index:r}});!Cn(o,n)&&(this._active=o,this._lastEvent=null,this._updateHoverStyles(o,n))}notifyPlugins(e,n,o){return this._plugins.notify(this,e,n,o)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,o){const i=this.options.hover,s=(c,d)=>c.filter(u=>!d.some(f=>u.datasetIndex===f.datasetIndex&&u.index===f.index)),r=s(n,e),a=o?e:s(e,n);r.length&&this.updateHoverStyle(r,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(e,n){const o={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},i=r=>(r.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",o,i)===!1)return;const s=this._handleEvent(e,n,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,i),(s||o.changed)&&this.render(),this}_handleEvent(e,n,o){const{_active:i=[],options:s}=this,r=n,a=this._getActiveElements(e,i,o,r),c=Uc(e),d=Lf(e,this._lastEvent,o,c);o&&(this._lastEvent=null,G(s.onHover,[e,a,this],this),c&&G(s.onClick,[e,a,this],this));const u=!Cn(a,i);return(u||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=d,u}_getActiveElements(e,n,o,i){if(e.type==="mouseout")return[];if(!o)return n;const s=this.options.hover;return this.getElementsAtEventForMode(e,s.mode,s,i)}}F(Te,"defaults",te),F(Te,"instances",Yn),F(Te,"overrides",dt),F(Te,"registry",Re),F(Te,"version",Af),F(Te,"getChart",Or);function Nr(){return W(Te.instances,t=>t._plugins.invalidate())}function zf(t,e,n){const{startAngle:o,pixelMargin:i,x:s,y:r,outerRadius:a,innerRadius:c}=e;let d=i/a;t.beginPath(),t.arc(s,r,a,o-d,n+d),c>i?(d=i/c,t.arc(s,r,c,n+d,o-d,!0)):t.arc(s,r,i,n+ne,o-ne),t.closePath(),t.clip()}function Hf(t){return No(t,["outerStart","outerEnd","innerStart","innerEnd"])}function jf(t,e,n,o){const i=Hf(t.options.borderRadius),s=(n-e)/2,r=Math.min(s,o*e/2),a=c=>{const d=(n-Math.min(s,c))*o/2;return se(c,0,Math.min(s,d))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:se(i.innerStart,0,r),innerEnd:se(i.innerEnd,0,r)}}function Ft(t,e,n,o){return{x:n+t*Math.cos(e),y:o+t*Math.sin(e)}}function Un(t,e,n,o,i,s){const{x:r,y:a,startAngle:c,pixelMargin:d,innerRadius:u}=e,f=Math.max(e.outerRadius+o+n-d,0),p=u>0?u+o+n+d:0;let h=0;const g=i-c;if(o){const D=u>0?u-o:0,E=f>0?f-o:0,R=(D+E)/2,B=R!==0?g*R/(R+o):g;h=(g-B)/2}const m=Math.max(.001,g*f-n/X)/f,b=(g-m)/2,x=c+b+h,y=i-b-h,{outerStart:w,outerEnd:S,innerStart:_,innerEnd:C}=jf(e,p,f,y-x),v=f-w,k=f-S,M=x+w/v,V=y-S/k,$=p+_,O=p+C,U=x+_/$,P=y-C/O;if(t.beginPath(),s){const D=(M+V)/2;if(t.arc(r,a,f,M,D),t.arc(r,a,f,D,V),S>0){const A=Ft(k,V,r,a);t.arc(A.x,A.y,S,V,y+ne)}const E=Ft(O,y,r,a);if(t.lineTo(E.x,E.y),C>0){const A=Ft(O,P,r,a);t.arc(A.x,A.y,C,y+ne,P+Math.PI)}const R=(y-C/p+(x+_/p))/2;if(t.arc(r,a,p,y-C/p,R,!0),t.arc(r,a,p,R,x+_/p,!0),_>0){const A=Ft($,U,r,a);t.arc(A.x,A.y,_,U+Math.PI,x-ne)}const B=Ft(v,x,r,a);if(t.lineTo(B.x,B.y),w>0){const A=Ft(v,M,r,a);t.arc(A.x,A.y,w,x-ne,M)}}else{t.moveTo(r,a);const D=Math.cos(M)*f+r,E=Math.sin(M)*f+a;t.lineTo(D,E);const R=Math.cos(V)*f+r,B=Math.sin(V)*f+a;t.lineTo(R,B)}t.closePath()}function Wf(t,e,n,o,i){const{fullCircles:s,startAngle:r,circumference:a}=e;let c=e.endAngle;if(s){Un(t,e,n,o,c,i);for(let d=0;d<s;++d)t.fill();isNaN(a)||(c=r+(a%K||K))}return Un(t,e,n,o,c,i),t.fill(),c}function Yf(t,e,n,o,i){const{fullCircles:s,startAngle:r,circumference:a,options:c}=e,{borderWidth:d,borderJoinStyle:u,borderDash:f,borderDashOffset:p}=c,h=c.borderAlign==="inner";if(!d)return;t.setLineDash(f||[]),t.lineDashOffset=p,h?(t.lineWidth=d*2,t.lineJoin=u||"round"):(t.lineWidth=d,t.lineJoin=u||"bevel");let g=e.endAngle;if(s){Un(t,e,n,o,g,i);for(let m=0;m<s;++m)t.stroke();isNaN(a)||(g=r+(a%K||K))}h&&zf(t,e,g),s||(Un(t,e,n,o,g,i),t.stroke())}class sn extends Le{constructor(n){super();F(this,"circumference");F(this,"endAngle");F(this,"fullCircles");F(this,"innerRadius");F(this,"outerRadius");F(this,"pixelMargin");F(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,o,i){const s=this.getProps(["x","y"],i),{angle:r,distance:a}=bs(s,{x:n,y:o}),{startAngle:c,endAngle:d,innerRadius:u,outerRadius:f,circumference:p}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),h=(this.options.spacing+this.options.borderWidth)/2,m=T(p,d-c)>=K||jt(r,c,d),b=Ae(a,u+h,f+h);return m&&b}getCenterPoint(n){const{x:o,y:i,startAngle:s,endAngle:r,innerRadius:a,outerRadius:c}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:d,spacing:u}=this.options,f=(s+r)/2,p=(a+c+u+d)/2;return{x:o+Math.cos(f)*p,y:i+Math.sin(f)*p}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:o,circumference:i}=this,s=(o.offset||0)/4,r=(o.spacing||0)/2,a=o.circular;if(this.pixelMargin=o.borderAlign==="inner"?.33:0,this.fullCircles=i>K?Math.floor(i/K):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const c=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(c)*s,Math.sin(c)*s);const d=1-Math.sin(Math.min(X,i||0)),u=s*d;n.fillStyle=o.backgroundColor,n.strokeStyle=o.borderColor,Wf(n,this,u,r,a),Yf(n,this,u,r,a),n.restore()}}F(sn,"id","arc"),F(sn,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),F(sn,"defaultRoutes",{backgroundColor:"backgroundColor"}),F(sn,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function Ir(t,e,n=e){t.lineCap=T(n.borderCapStyle,e.borderCapStyle),t.setLineDash(T(n.borderDash,e.borderDash)),t.lineDashOffset=T(n.borderDashOffset,e.borderDashOffset),t.lineJoin=T(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=T(n.borderWidth,e.borderWidth),t.strokeStyle=T(n.borderColor,e.borderColor)}function Gf(t,e,n){t.lineTo(n.x,n.y)}function Uf(t){return t.stepped?gd:t.tension||t.cubicInterpolationMode==="monotone"?md:Gf}function Lr(t,e,n={}){const o=t.length,{start:i=0,end:s=o-1}=n,{start:r,end:a}=e,c=Math.max(i,r),d=Math.min(s,a),u=i<r&&s<r||i>a&&s>a;return{count:o,start:c,loop:e.loop,ilen:d<c&&!u?o+d-c:d-c}}function qf(t,e,n,o){const{points:i,options:s}=e,{count:r,start:a,loop:c,ilen:d}=Lr(i,n,o),u=Uf(s);let{move:f=!0,reverse:p}=o||{},h,g,m;for(h=0;h<=d;++h)g=i[(a+(p?d-h:h))%r],!g.skip&&(f?(t.moveTo(g.x,g.y),f=!1):u(t,m,g,p,s.stepped),m=g);return c&&(g=i[(a+(p?d:0))%r],u(t,m,g,p,s.stepped)),!!c}function Xf(t,e,n,o){const i=e.points,{count:s,start:r,ilen:a}=Lr(i,n,o),{move:c=!0,reverse:d}=o||{};let u=0,f=0,p,h,g,m,b,x;const y=S=>(r+(d?a-S:S))%s,w=()=>{m!==b&&(t.lineTo(u,b),t.lineTo(u,m),t.lineTo(u,x))};for(c&&(h=i[y(0)],t.moveTo(h.x,h.y)),p=0;p<=a;++p){if(h=i[y(p)],h.skip)continue;const S=h.x,_=h.y,C=S|0;C===g?(_<m?m=_:_>b&&(b=_),u=(f*u+S)/++f):(w(),t.lineTo(S,_),g=C,f=0,m=b=_),x=_}w()}function Qo(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?Xf:qf}function Kf(t){return t.stepped?qd:t.tension||t.cubicInterpolationMode==="monotone"?Xd:mt}function Zf(t,e,n,o){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,o)&&i.closePath()),Ir(t,e.options),t.stroke(i)}function Jf(t,e,n,o){const{segments:i,options:s}=e,r=Qo(e);for(const a of i)Ir(t,s,a.style),t.beginPath(),r(t,e,a,{start:n,end:n+o-1})&&t.closePath(),t.stroke()}const Qf=typeof Path2D=="function";function eh(t,e,n,o){Qf&&!e.options.segment?Zf(t,e,n,o):Jf(t,e,n,o)}class et extends Le{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,n){const o=this.options;if((o.tension||o.cubicInterpolationMode==="monotone")&&!o.stepped&&!this._pointsUpdated){const i=o.spanGaps?this._loop:this._fullLoop;Td(this._points,o,e,i,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=tu(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,o=e.length;return o&&n[e[o-1].end]}interpolate(e,n){const o=this.options,i=e[n],s=this.points,r=qs(this,{property:n,start:i,end:i});if(!r.length)return;const a=[],c=Kf(o);let d,u;for(d=0,u=r.length;d<u;++d){const{start:f,end:p}=r[d],h=s[f],g=s[p];if(h===g){a.push(h);continue}const m=Math.abs((i-h[n])/(g[n]-h[n])),b=c(h,g,m,o.stepped);b[n]=e[n],a.push(b)}return a.length===1?a[0]:a}pathSegment(e,n,o){return Qo(this)(e,this,n,o)}path(e,n,o){const i=this.segments,s=Qo(this);let r=this._loop;n=n||0,o=o||this.points.length-n;for(const a of i)r&=s(e,this,a,{start:n,end:n+o-1});return!!r}draw(e,n,o,i){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(e.save(),eh(e,this,o,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}F(et,"id","line"),F(et,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),F(et,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),F(et,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function Tr(t,e,n,o){const i=t.options,{[n]:s}=t.getProps([n],o);return Math.abs(e-s)<i.radius+i.hitRadius}class qn extends Le{constructor(n){super();F(this,"parsed");F(this,"skip");F(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,o,i){const s=this.options,{x:r,y:a}=this.getProps(["x","y"],i);return Math.pow(n-r,2)+Math.pow(o-a,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(n,o){return Tr(this,n,"x",o)}inYRange(n,o){return Tr(this,n,"y",o)}getCenterPoint(n){const{x:o,y:i}=this.getProps(["x","y"],n);return{x:o,y:i}}size(n){n=n||this.options||{};let o=n.radius||0;o=Math.max(o,o&&n.hoverRadius||0);const i=o&&n.borderWidth||0;return(o+i)*2}draw(n,o){const i=this.options;this.skip||i.radius<.1||!Ne(this,o,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,Oo(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}F(qn,"id","point"),F(qn,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),F(qn,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function zr(t,e){const{x:n,y:o,base:i,width:s,height:r}=t.getProps(["x","y","base","width","height"],e);let a,c,d,u,f;return t.horizontal?(f=r/2,a=Math.min(n,i),c=Math.max(n,i),d=o-f,u=o+f):(f=s/2,a=n-f,c=n+f,d=Math.min(o,i),u=Math.max(o,i)),{left:a,top:d,right:c,bottom:u}}function tt(t,e,n,o){return t?0:se(e,n,o)}function th(t,e,n){const o=t.options.borderWidth,i=t.borderSkipped,s=Bs(o);return{t:tt(i.top,s.top,0,n),r:tt(i.right,s.right,0,e),b:tt(i.bottom,s.bottom,0,n),l:tt(i.left,s.left,0,e)}}function nh(t,e,n){const{enableBorderRadius:o}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,s=ht(i),r=Math.min(e,n),a=t.borderSkipped,c=o||z(i);return{topLeft:tt(!c||a.top||a.left,s.topLeft,0,r),topRight:tt(!c||a.top||a.right,s.topRight,0,r),bottomLeft:tt(!c||a.bottom||a.left,s.bottomLeft,0,r),bottomRight:tt(!c||a.bottom||a.right,s.bottomRight,0,r)}}function oh(t){const e=zr(t),n=e.right-e.left,o=e.bottom-e.top,i=th(t,n/2,o/2),s=nh(t,n/2,o/2);return{outer:{x:e.left,y:e.top,w:n,h:o,radius:s},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:o-i.t-i.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,s.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(i.b,i.r))}}}}function ei(t,e,n,o){const i=e===null,s=n===null,a=t&&!(i&&s)&&zr(t,o);return a&&(i||Ae(e,a.left,a.right))&&(s||Ae(n,a.top,a.bottom))}function ih(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function sh(t,e){t.rect(e.x,e.y,e.w,e.h)}function ti(t,e,n={}){const o=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,s=(t.x+t.w!==n.x+n.w?e:0)-o,r=(t.y+t.h!==n.y+n.h?e:0)-i;return{x:t.x+o,y:t.y+i,w:t.w+s,h:t.h+r,radius:t.radius}}class Xn extends Le{constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:o,backgroundColor:i}}=this,{inner:s,outer:r}=oh(this),a=ih(r.radius)?Ut:sh;e.save(),(r.w!==s.w||r.h!==s.h)&&(e.beginPath(),a(e,ti(r,n,s)),e.clip(),a(e,ti(s,-n,r)),e.fillStyle=o,e.fill("evenodd")),e.beginPath(),a(e,ti(s,n)),e.fillStyle=i,e.fill(),e.restore()}inRange(e,n,o){return ei(this,e,n,o)}inXRange(e,n){return ei(this,e,null,n)}inYRange(e,n){return ei(this,null,e,n)}getCenterPoint(e){const{x:n,y:o,base:i,horizontal:s}=this.getProps(["x","y","base","horizontal"],e);return{x:s?(n+i)/2:n,y:s?o:(o+i)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}F(Xn,"id","bar"),F(Xn,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),F(Xn,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var rh=Object.freeze({__proto__:null,ArcElement:sn,BarElement:Xn,LineElement:et,PointElement:qn});const ni=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Hr=ni.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function jr(t){return ni[t%ni.length]}function Wr(t){return Hr[t%Hr.length]}function lh(t,e){return t.borderColor=jr(e),t.backgroundColor=Wr(e),++e}function ah(t,e){return t.backgroundColor=t.data.map(()=>jr(e++)),e}function ch(t,e){return t.backgroundColor=t.data.map(()=>Wr(e++)),e}function dh(t){let e=0;return(n,o)=>{const i=t.getDatasetMeta(o).controller;i instanceof bt?e=ah(n,e):i instanceof Kt?e=ch(n,e):i&&(e=lh(n,e))}}function Yr(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function uh(t){return t&&(t.borderColor||t.backgroundColor)}var fh={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:o},options:i}=t.config,{elements:s}=i;if(!n.forceOverride&&(Yr(o)||uh(i)||s&&Yr(s)))return;const r=dh(t);o.forEach(r)}};function hh(t,e,n,o,i){const s=i.samples||o;if(s>=n)return t.slice(e,e+n);const r=[],a=(n-2)/(s-2);let c=0;const d=e+n-1;let u=e,f,p,h,g,m;for(r[c++]=t[u],f=0;f<s-2;f++){let b=0,x=0,y;const w=Math.floor((f+1)*a)+1+e,S=Math.min(Math.floor((f+2)*a)+1,n)+e,_=S-w;for(y=w;y<S;y++)b+=t[y].x,x+=t[y].y;b/=_,x/=_;const C=Math.floor(f*a)+1+e,v=Math.min(Math.floor((f+1)*a)+1,n)+e,{x:k,y:M}=t[u];for(h=g=-1,y=C;y<v;y++)g=.5*Math.abs((k-b)*(t[y].y-M)-(k-t[y].x)*(x-M)),g>h&&(h=g,p=t[y],m=y);r[c++]=p,u=m}return r[c++]=t[d],r}function ph(t,e,n,o){let i=0,s=0,r,a,c,d,u,f,p,h,g,m;const b=[],x=e+n-1,y=t[e].x,S=t[x].x-y;for(r=e;r<e+n;++r){a=t[r],c=(a.x-y)/S*o,d=a.y;const _=c|0;if(_===u)d<g?(g=d,f=r):d>m&&(m=d,p=r),i=(s*i+a.x)/++s;else{const C=r-1;if(!H(f)&&!H(p)){const v=Math.min(f,p),k=Math.max(f,p);v!==h&&v!==C&&b.push({...t[v],x:i}),k!==h&&k!==C&&b.push({...t[k],x:i})}r>0&&C!==h&&b.push(t[C]),b.push(a),u=_,s=0,g=m=d,f=p=h=r}}return b}function Gr(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function Ur(t){t.data.datasets.forEach(e=>{Gr(e)})}function gh(t,e){const n=e.length;let o=0,i;const{iScale:s}=t,{min:r,max:a,minDefined:c,maxDefined:d}=s.getUserBounds();return c&&(o=se(Oe(e,s.axis,r).lo,0,n-1)),d?i=se(Oe(e,s.axis,a).hi+1,o,n)-o:i=n-o,{start:o,count:i}}var mh={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled){Ur(t);return}const o=t.width;t.data.datasets.forEach((i,s)=>{const{_data:r,indexAxis:a}=i,c=t.getDatasetMeta(s),d=r||i.data;if(qt([a,t.options.indexAxis])==="y"||!c.controller.supportsDecimation)return;const u=t.scales[c.xAxisID];if(u.type!=="linear"&&u.type!=="time"||t.options.parsing)return;let{start:f,count:p}=gh(c,d);const h=n.threshold||4*o;if(p<=h){Gr(i);return}H(r)&&(i._data=d,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(m){this._data=m}}));let g;switch(n.algorithm){case"lttb":g=hh(d,f,p,o,n);break;case"min-max":g=ph(d,f,p,o);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=g})},destroy(t){Ur(t)}};function bh(t,e,n){const o=t.segments,i=t.points,s=e.points,r=[];for(const a of o){let{start:c,end:d}=a;d=ii(c,d,i);const u=oi(n,i[c],i[d],a.loop);if(!e.segments){r.push({source:a,target:u,start:i[c],end:i[d]});continue}const f=qs(e,u);for(const p of f){const h=oi(n,s[p.start],s[p.end],p.loop),g=Us(a,i,h);for(const m of g)r.push({source:m,target:p,start:{[n]:qr(u,h,"start",Math.max)},end:{[n]:qr(u,h,"end",Math.min)}})}}return r}function oi(t,e,n,o){if(o)return;let i=e[t],s=n[t];return t==="angle"&&(i=_e(i),s=_e(s)),{property:t,start:i,end:s}}function yh(t,e){const{x:n=null,y:o=null}=t||{},i=e.points,s=[];return e.segments.forEach(({start:r,end:a})=>{a=ii(r,a,i);const c=i[r],d=i[a];o!==null?(s.push({x:c.x,y:o}),s.push({x:d.x,y:o})):n!==null&&(s.push({x:n,y:c.y}),s.push({x:n,y:d.y}))}),s}function ii(t,e,n){for(;e>t;e--){const o=n[e];if(!isNaN(o.x)&&!isNaN(o.y))break}return e}function qr(t,e,n,o){return t&&e?o(t[n],e[n]):t?t[n]:e?e[n]:0}function Xr(t,e){let n=[],o=!1;return q(t)?(o=!0,n=t):n=yh(t,e),n.length?new et({points:n,options:{tension:0},_loop:o,_fullLoop:o}):null}function Kr(t){return t&&t.fill!==!1}function _h(t,e,n){let i=t[e].fill;const s=[e];let r;if(!n)return i;for(;i!==!1&&s.indexOf(i)===-1;){if(!ee(i))return i;if(r=t[i],!r)return!1;if(r.visible)return i;s.push(i),i=r.fill}return!1}function xh(t,e,n){const o=Sh(t);if(z(o))return isNaN(o.value)?!1:o;let i=parseFloat(o);return ee(i)&&Math.floor(i)===i?wh(o[0],e,i,n):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}function wh(t,e,n,o){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=o?!1:n}function Ch(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:z(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function kh(t,e,n){let o;return t==="start"?o=n:t==="end"?o=e.options.reverse?e.min:e.max:z(t)?o=t.value:o=e.getBaseValue(),o}function Sh(t){const e=t.options,n=e.fill;let o=T(n&&n.target,n);return o===void 0&&(o=!!e.backgroundColor),o===!1||o===null?!1:o===!0?"origin":o}function vh(t){const{scale:e,index:n,line:o}=t,i=[],s=o.segments,r=o.points,a=Mh(e,n);a.push(Xr({x:null,y:e.bottom},o));for(let c=0;c<s.length;c++){const d=s[c];for(let u=d.start;u<=d.end;u++)Eh(i,r[u],a)}return new et({points:i,options:{}})}function Mh(t,e){const n=[],o=t.getMatchingVisibleMetas("line");for(let i=0;i<o.length;i++){const s=o[i];if(s.index===e)break;s.hidden||n.unshift(s.dataset)}return n}function Eh(t,e,n){const o=[];for(let i=0;i<n.length;i++){const s=n[i],{first:r,last:a,point:c}=Dh(s,e,"x");if(!(!c||r&&a)){if(r)o.unshift(c);else if(t.push(c),!a)break}}t.push(...o)}function Dh(t,e,n){const o=t.interpolate(e,n);if(!o)return{};const i=o[n],s=t.segments,r=t.points;let a=!1,c=!1;for(let d=0;d<s.length;d++){const u=s[d],f=r[u.start][n],p=r[u.end][n];if(Ae(i,f,p)){a=i===f,c=i===p;break}}return{first:a,last:c,point:o}}class Zr{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,o){const{x:i,y:s,radius:r}=this;return n=n||{start:0,end:K},e.arc(i,s,r,n.end,n.start,!0),!o.bounds}interpolate(e){const{x:n,y:o,radius:i}=this,s=e.angle;return{x:n+Math.cos(s)*i,y:o+Math.sin(s)*i,angle:s}}}function Vh(t){const{chart:e,fill:n,line:o}=t;if(ee(n))return Rh(e,n);if(n==="stack")return vh(t);if(n==="shape")return!0;const i=Fh(t);return i instanceof Zr?i:Xr(i,o)}function Rh(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function Fh(t){return(t.scale||{}).getPointPositionForValue?$h(t):Bh(t)}function Bh(t){const{scale:e={},fill:n}=t,o=Ch(n,e);if(ee(o)){const i=e.isHorizontal();return{x:i?o:null,y:i?null:o}}return null}function $h(t){const{scale:e,fill:n}=t,o=e.options,i=e.getLabels().length,s=o.reverse?e.max:e.min,r=kh(n,e,s),a=[];if(o.grid.circular){const c=e.getPointPositionForValue(0,s);return new Zr({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(r)})}for(let c=0;c<i;++c)a.push(e.getPointPositionForValue(c,r));return a}function si(t,e,n){const o=Vh(e),{line:i,scale:s,axis:r}=e,a=i.options,c=a.fill,d=a.backgroundColor,{above:u=d,below:f=d}=c||{};o&&i.points.length&&(Dn(t,n),Ph(t,{line:i,target:o,above:u,below:f,area:n,scale:s,axis:r}),Vn(t))}function Ph(t,e){const{line:n,target:o,above:i,below:s,area:r,scale:a}=e,c=n._loop?"angle":e.axis;t.save(),c==="x"&&s!==i&&(Jr(t,o,r.top),Qr(t,{line:n,target:o,color:i,scale:a,property:c}),t.restore(),t.save(),Jr(t,o,r.bottom)),Qr(t,{line:n,target:o,color:s,scale:a,property:c}),t.restore()}function Jr(t,e,n){const{segments:o,points:i}=e;let s=!0,r=!1;t.beginPath();for(const a of o){const{start:c,end:d}=a,u=i[c],f=i[ii(c,d,i)];s?(t.moveTo(u.x,u.y),s=!1):(t.lineTo(u.x,n),t.lineTo(u.x,u.y)),r=!!e.pathSegment(t,a,{move:r}),r?t.closePath():t.lineTo(f.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function Qr(t,e){const{line:n,target:o,property:i,color:s,scale:r}=e,a=bh(n,o,i);for(const{source:c,target:d,start:u,end:f}of a){const{style:{backgroundColor:p=s}={}}=c,h=o!==!0;t.save(),t.fillStyle=p,Ah(t,r,h&&oi(i,u,f)),t.beginPath();const g=!!n.pathSegment(t,c);let m;if(h){g?t.closePath():el(t,o,f,i);const b=!!o.pathSegment(t,d,{move:g,reverse:!0});m=g&&b,m||el(t,o,u,i)}t.closePath(),t.fill(m?"evenodd":"nonzero"),t.restore()}}function Ah(t,e,n){const{top:o,bottom:i}=e.chart.chartArea,{property:s,start:r,end:a}=n||{};s==="x"&&(t.beginPath(),t.rect(r,o,a-r,i-o),t.clip())}function el(t,e,n,o){const i=e.interpolate(n,o);i&&t.lineTo(i.x,i.y)}var Oh={id:"filler",afterDatasetsUpdate(t,e,n){const o=(t.data.datasets||[]).length,i=[];let s,r,a,c;for(r=0;r<o;++r)s=t.getDatasetMeta(r),a=s.dataset,c=null,a&&a.options&&a instanceof et&&(c={visible:t.isDatasetVisible(r),index:r,fill:xh(a,r,o),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:a}),s.$filler=c,i.push(c);for(r=0;r<o;++r)c=i[r],!(!c||c.fill===!1)&&(c.fill=_h(i,r,n.propagate))},beforeDraw(t,e,n){const o=n.drawTime==="beforeDraw",i=t.getSortedVisibleDatasetMetas(),s=t.chartArea;for(let r=i.length-1;r>=0;--r){const a=i[r].$filler;a&&(a.line.updateControlPoints(s,a.axis),o&&a.fill&&si(t.ctx,a,s))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const o=t.getSortedVisibleDatasetMetas();for(let i=o.length-1;i>=0;--i){const s=o[i].$filler;Kr(s)&&si(t.ctx,s,t.chartArea)}},beforeDatasetDraw(t,e,n){const o=e.meta.$filler;!Kr(o)||n.drawTime!=="beforeDatasetDraw"||si(t.ctx,o,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const tl=(t,e)=>{let{boxHeight:n=e,boxWidth:o=e}=t;return t.usePointStyle&&(n=Math.min(n,e),o=t.pointStyleWidth||Math.min(o,e)),{boxWidth:o,boxHeight:n,itemHeight:Math.max(e,n)}},Nh=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class nl extends Le{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n,o){this.maxWidth=e,this.maxHeight=n,this._margins=o,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let n=G(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(o=>e.filter(o,this.chart.data))),e.sort&&(n=n.sort((o,i)=>e.sort(o,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const o=e.labels,i=oe(o.font),s=i.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:c}=tl(o,s);let d,u;n.font=i.string,this.isHorizontal()?(d=this.maxWidth,u=this._fitRows(r,s,a,c)+10):(u=this.maxHeight,d=this._fitCols(r,i,a,c)+10),this.width=Math.min(d,e.maxWidth||this.maxWidth),this.height=Math.min(u,e.maxHeight||this.maxHeight)}_fitRows(e,n,o,i){const{ctx:s,maxWidth:r,options:{labels:{padding:a}}}=this,c=this.legendHitBoxes=[],d=this.lineWidths=[0],u=i+a;let f=e;s.textAlign="left",s.textBaseline="middle";let p=-1,h=-u;return this.legendItems.forEach((g,m)=>{const b=o+n/2+s.measureText(g.text).width;(m===0||d[d.length-1]+b+2*a>r)&&(f+=u,d[d.length-(m>0?0:1)]=0,h+=u,p++),c[m]={left:0,top:h,row:p,width:b,height:i},d[d.length-1]+=b+a}),f}_fitCols(e,n,o,i){const{ctx:s,maxHeight:r,options:{labels:{padding:a}}}=this,c=this.legendHitBoxes=[],d=this.columnSizes=[],u=r-e;let f=a,p=0,h=0,g=0,m=0;return this.legendItems.forEach((b,x)=>{const{itemWidth:y,itemHeight:w}=Ih(o,n,s,b,i);x>0&&h+w+2*a>u&&(f+=p+a,d.push({width:p,height:h}),g+=p+a,m++,p=h=0),c[x]={left:g,top:h,col:m,width:y,height:w},p=Math.max(p,y),h+=w+a}),f+=p,d.push({width:p,height:h}),f}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:o,labels:{padding:i},rtl:s}}=this,r=Rt(s,this.left,this.width);if(this.isHorizontal()){let a=0,c=le(o,this.left+i,this.right-this.lineWidths[a]);for(const d of n)a!==d.row&&(a=d.row,c=le(o,this.left+i,this.right-this.lineWidths[a])),d.top+=this.top+e+i,d.left=r.leftForLtr(r.x(c),d.width),c+=d.width+i}else{let a=0,c=le(o,this.top+e+i,this.bottom-this.columnSizes[a].height);for(const d of n)d.col!==a&&(a=d.col,c=le(o,this.top+e+i,this.bottom-this.columnSizes[a].height)),d.top=c,d.left+=this.left+i,d.left=r.leftForLtr(r.x(d.left),d.width),c+=d.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Dn(e,this),this._draw(),Vn(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:o,ctx:i}=this,{align:s,labels:r}=e,a=te.color,c=Rt(e.rtl,this.left,this.width),d=oe(r.font),{padding:u}=r,f=d.size,p=f/2;let h;this.drawTitle(),i.textAlign=c.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=d.string;const{boxWidth:g,boxHeight:m,itemHeight:b}=tl(r,f),x=function(C,v,k){if(isNaN(g)||g<=0||isNaN(m)||m<0)return;i.save();const M=T(k.lineWidth,1);if(i.fillStyle=T(k.fillStyle,a),i.lineCap=T(k.lineCap,"butt"),i.lineDashOffset=T(k.lineDashOffset,0),i.lineJoin=T(k.lineJoin,"miter"),i.lineWidth=M,i.strokeStyle=T(k.strokeStyle,a),i.setLineDash(T(k.lineDash,[])),r.usePointStyle){const V={radius:m*Math.SQRT2/2,pointStyle:k.pointStyle,rotation:k.rotation,borderWidth:M},$=c.xPlus(C,g/2),O=v+p;Fs(i,V,$,O,r.pointStyleWidth&&g)}else{const V=v+Math.max((f-m)/2,0),$=c.leftForLtr(C,g),O=ht(k.borderRadius);i.beginPath(),Object.values(O).some(U=>U!==0)?Ut(i,{x:$,y:V,w:g,h:m,radius:O}):i.rect($,V,g,m),i.fill(),M!==0&&i.stroke()}i.restore()},y=function(C,v,k){ft(i,k.text,C,v+b/2,d,{strikethrough:k.hidden,textAlign:c.textAlign(k.textAlign)})},w=this.isHorizontal(),S=this._computeTitleHeight();w?h={x:le(s,this.left+u,this.right-o[0]),y:this.top+u+S,line:0}:h={x:this.left+u,y:le(s,this.top+S+u,this.bottom-n[0].height),line:0},js(this.ctx,e.textDirection);const _=b+u;this.legendItems.forEach((C,v)=>{i.strokeStyle=C.fontColor,i.fillStyle=C.fontColor;const k=i.measureText(C.text).width,M=c.textAlign(C.textAlign||(C.textAlign=r.textAlign)),V=g+p+k;let $=h.x,O=h.y;c.setWidth(this.width),w?v>0&&$+V+u>this.right&&(O=h.y+=_,h.line++,$=h.x=le(s,this.left+u,this.right-o[h.line])):v>0&&O+_>this.bottom&&($=h.x=$+n[h.line].width+u,h.line++,O=h.y=le(s,this.top+S+u,this.bottom-n[h.line].height));const U=c.x($);if(x(U,O,C),$=id(M,$+g+p,w?$+V:this.right,e.rtl),y(c.x($),O,C),w)h.x+=V+u;else if(typeof C.text!="string"){const P=d.lineHeight;h.y+=ol(C,P)+u}else h.y+=_}),Ws(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,o=oe(n.font),i=ae(n.padding);if(!n.display)return;const s=Rt(e.rtl,this.left,this.width),r=this.ctx,a=n.position,c=o.size/2,d=i.top+c;let u,f=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),u=this.top+d,f=le(e.align,f,this.right-p);else{const g=this.columnSizes.reduce((m,b)=>Math.max(m,b.height),0);u=d+le(e.align,this.top,this.bottom-g-e.labels.padding-this._computeTitleHeight())}const h=le(a,f,f+p);r.textAlign=s.textAlign(Fo(a)),r.textBaseline="middle",r.strokeStyle=n.color,r.fillStyle=n.color,r.font=o.string,ft(r,n.text,h,u,o)}_computeTitleHeight(){const e=this.options.title,n=oe(e.font),o=ae(e.padding);return e.display?n.lineHeight+o.height:0}_getLegendItemAt(e,n){let o,i,s;if(Ae(e,this.left,this.right)&&Ae(n,this.top,this.bottom)){for(s=this.legendHitBoxes,o=0;o<s.length;++o)if(i=s[o],Ae(e,i.left,i.left+i.width)&&Ae(n,i.top,i.top+i.height))return this.legendItems[o]}return null}handleEvent(e){const n=this.options;if(!zh(e.type,n))return;const o=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const i=this._hoveredItem,s=Nh(i,o);i&&!s&&G(n.onLeave,[e,i,this],this),this._hoveredItem=o,o&&!s&&G(n.onHover,[e,o,this],this)}else o&&G(n.onClick,[e,o,this],this)}}function Ih(t,e,n,o,i){const s=Lh(o,t,e,n),r=Th(i,o,e.lineHeight);return{itemWidth:s,itemHeight:r}}function Lh(t,e,n,o){let i=t.text;return i&&typeof i!="string"&&(i=i.reduce((s,r)=>s.length>r.length?s:r)),e+n.size/2+o.measureText(i).width}function Th(t,e,n){let o=t;return typeof e.text!="string"&&(o=ol(e,n)),o}function ol(t,e){const n=t.text?t.text.length:0;return e*n}function zh(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var Hh={id:"legend",_element:nl,start(t,e,n){const o=t.legend=new nl({ctx:t.ctx,options:n,chart:t});ce.configure(t,o,n),ce.addBox(t,o)},stop(t){ce.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const o=t.legend;ce.configure(t,o,n),o.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const o=e.datasetIndex,i=n.chart;i.isDatasetVisible(o)?(i.hide(o),e.hidden=!0):(i.show(o),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:o,textAlign:i,color:s,useBorderRadius:r,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map(c=>{const d=c.controller.getStyle(n?0:void 0),u=ae(d.borderWidth);return{text:e[c.index].label,fillStyle:d.backgroundColor,fontColor:s,hidden:!c.visible,lineCap:d.borderCapStyle,lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:d.borderColor,pointStyle:o||d.pointStyle,rotation:d.rotation,textAlign:i||d.textAlign,borderRadius:r&&(a||d.borderRadius),datasetIndex:c.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class ri extends Le{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n){const o=this.options;if(this.left=0,this.top=0,!o.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const i=q(o.text)?o.text.length:1;this._padding=ae(o.padding);const s=i*oe(o.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:o,bottom:i,right:s,options:r}=this,a=r.align;let c=0,d,u,f;return this.isHorizontal()?(u=le(a,o,s),f=n+e,d=s-o):(r.position==="left"?(u=o+e,f=le(a,i,n),c=X*-.5):(u=s-e,f=le(a,n,i),c=X*.5),d=i-n),{titleX:u,titleY:f,maxWidth:d,rotation:c}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const o=oe(n.font),s=o.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:c,rotation:d}=this._drawArgs(s);ft(e,n.text,0,0,o,{color:n.color,maxWidth:c,rotation:d,textAlign:Fo(n.align),textBaseline:"middle",translation:[r,a]})}}function jh(t,e){const n=new ri({ctx:t.ctx,options:e,chart:t});ce.configure(t,n,e),ce.addBox(t,n),t.titleBlock=n}var Wh={id:"title",_element:ri,start(t,e,n){jh(t,n)},stop(t){const e=t.titleBlock;ce.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const o=t.titleBlock;ce.configure(t,o,n),o.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Kn=new WeakMap;var Yh={id:"subtitle",start(t,e,n){const o=new ri({ctx:t.ctx,options:n,chart:t});ce.configure(t,o,n),ce.addBox(t,o),Kn.set(t,o)},stop(t){ce.removeBox(t,Kn.get(t)),Kn.delete(t)},beforeUpdate(t,e,n){const o=Kn.get(t);ce.configure(t,o,n),o.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const rn={average(t){if(!t.length)return!1;let e,n,o=0,i=0,s=0;for(e=0,n=t.length;e<n;++e){const r=t[e].element;if(r&&r.hasValue()){const a=r.tooltipPosition();o+=a.x,i+=a.y,++s}}return{x:o/s,y:i/s}},nearest(t,e){if(!t.length)return!1;let n=e.x,o=e.y,i=Number.POSITIVE_INFINITY,s,r,a;for(s=0,r=t.length;s<r;++s){const c=t[s].element;if(c&&c.hasValue()){const d=c.getCenterPoint(),u=Vo(e,d);u<i&&(i=u,a=c)}}if(a){const c=a.tooltipPosition();n=c.x,o=c.y}return{x:n,y:o}}};function Fe(t,e){return e&&(q(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function ze(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
|
|
24
|
+
*/class Ih{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,o,i){const r=n.listeners[i],l=n.duration;r.forEach(a=>a({chart:e,initial:n.initial,numSteps:l,currentStep:Math.min(o-n.start,l)}))}_refresh(){this._request||(this._running=!0,this._request=Wr.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((o,i)=>{if(!o.running||!o.items.length)return;const r=o.items;let l=r.length-1,a=!1,d;for(;l>=0;--l)d=r[l],d._active?(d._total>o.duration&&(o.duration=d._total),d.tick(e),a=!0):(r[l]=r[r.length-1],r.pop());a&&(i.draw(),this._notify(i,o,e,"progress")),r.length||(o.running=!1,this._notify(i,o,e,"complete"),o.initial=!1),n+=r.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let o=n.get(e);return o||(o={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,o)),o}listen(e,n,o){this._getAnims(e).listeners[n].push(o)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((o,i)=>Math.max(o,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const o=n.items;let i=o.length-1;for(;i>=0;--i)o[i].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var et=new Ih;const _l="transparent",Th={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const o=Kr(t||_l),i=o.valid&&Kr(e||_l);return i&&i.valid?i.mix(o,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class Lh{constructor(e,n,o,i){const r=n[o];i=mn([e.to,i,r,e.from]);const l=mn([e.from,r,i]);this._active=!0,this._fn=e.fn||Th[e.type||typeof l],this._easing=un[e.easing]||un.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=o,this._from=l,this._to=i,this._promises=void 0}active(){return this._active}update(e,n,o){if(this._active){this._notify(!1);const i=this._target[this._prop],r=o-this._start,l=this._duration-r;this._start=o,this._duration=Math.floor(Math.max(l,e.duration)),this._total+=r,this._loop=!!e.loop,this._to=mn([e.to,n,i,e.from]),this._from=mn([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,o=this._duration,i=this._prop,r=this._from,l=this._loop,a=this._to;let d;if(this._active=r!==a&&(l||n<o),!this._active){this._target[i]=a,this._notify(!0);return}if(n<0){this._target[i]=r;return}d=n/o%2,d=l&&d>1?2-d:d,d=this._easing(Math.min(1,Math.max(0,d))),this._target[i]=this._fn(r,a,d)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,o)=>{e.push({res:n,rej:o})})}_notify(e){const n=e?"res":"rej",o=this._promises||[];for(let i=0;i<o.length;i++)o[i][n]()}}class wl{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!G(e))return;const n=Object.keys(de.animation),o=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const r=e[i];if(!G(r))return;const l={};for(const a of n)l[a]=r[a];(ne(r.properties)&&r.properties||[i]).forEach(a=>{(a===i||!o.has(a))&&o.set(a,l)})})}_animateOptions(e,n){const o=n.options,i=Hh(e,o);if(!i)return[];const r=this._createAnimations(i,o);return o.$shared&&zh(e.options.$animations,o).then(()=>{e.options=o},()=>{}),r}_createAnimations(e,n){const o=this._properties,i=[],r=e.$animations||(e.$animations={}),l=Object.keys(n),a=Date.now();let d;for(d=l.length-1;d>=0;--d){const c=l[d];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(e,n));continue}const u=n[c];let f=r[c];const h=o.get(c);if(f)if(h&&f.active()){f.update(h,u,a);continue}else f.cancel();if(!h||!h.duration){e[c]=u;continue}r[c]=f=new Lh(h,e,c,u),i.push(f)}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const o=this._createAnimations(e,n);if(o.length)return et.add(this._chart,o),!0}}function zh(t,e){const n=[],o=Object.keys(e);for(let i=0;i<o.length;i++){const r=t[o[i]];r&&r.active()&&n.push(r.wait())}return Promise.all(n)}function Hh(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function xl(t,e){const n=t&&t.options||{},o=n.reverse,i=n.min===void 0?e:0,r=n.max===void 0?e:0;return{start:o?r:i,end:o?i:r}}function jh(t,e,n){if(n===!1)return!1;const o=xl(t,n),i=xl(e,n);return{top:i.end,right:o.end,bottom:i.start,left:o.start}}function Wh(t){let e,n,o,i;return G(t)?(e=t.top,n=t.right,o=t.bottom,i=t.left):e=n=o=i=t,{top:e,right:n,bottom:o,left:i,disabled:t===!1}}function Cl(t,e){const n=[],o=t._getSortedDatasetMetas(e);let i,r;for(i=0,r=o.length;i<r;++i)n.push(o[i].index);return n}function kl(t,e,n,o={}){const i=t.keys,r=o.mode==="single";let l,a,d,c;if(e!==null){for(l=0,a=i.length;l<a;++l){if(d=+i[l],d===n){if(o.all)continue;break}c=t.values[d],ae(c)&&(r||e===0||je(e)===je(c))&&(e+=c)}return e}}function Yh(t){const e=Object.keys(t),n=new Array(e.length);let o,i,r;for(o=0,i=e.length;o<i;++o)r=e[o],n[o]={x:r,y:t[r]};return n}function Sl(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function Uh(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function Gh(t){const{min:e,max:n,minDefined:o,maxDefined:i}=t.getUserBounds();return{min:o?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function qh(t,e,n){const o=t[e]||(t[e]={});return o[n]||(o[n]={})}function vl(t,e,n,o){for(const i of e.getMatchingVisibleMetas(o).reverse()){const r=t[i.index];if(n&&r>0||!n&&r<0)return i.index}return null}function Dl(t,e){const{chart:n,_cachedMeta:o}=t,i=n._stacks||(n._stacks={}),{iScale:r,vScale:l,index:a}=o,d=r.axis,c=l.axis,u=Uh(r,l,o),f=e.length;let h;for(let p=0;p<f;++p){const m=e[p],{[d]:g,[c]:b}=m,y=m._stacks||(m._stacks={});h=y[c]=qh(i,u,g),h[a]=b,h._top=vl(h,l,!0,o.type),h._bottom=vl(h,l,!1,o.type);const $=h._visualValues||(h._visualValues={});$[a]=b}}function Ii(t,e){const n=t.scales;return Object.keys(n).filter(o=>n[o].axis===e).shift()}function Xh(t,e){return pt(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Kh(t,e,n){return pt(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function gn(t,e){const n=t.controller.index,o=t.vScale&&t.vScale.axis;if(o){e=e||t._parsed;for(const i of e){const r=i._stacks;if(!r||r[o]===void 0||r[o][n]===void 0)return;delete r[o][n],r[o]._visualValues!==void 0&&r[o]._visualValues[n]!==void 0&&delete r[o]._visualValues[n]}}}const Ti=t=>t==="reset"||t==="none",El=(t,e)=>e?t:Object.assign({},t),Zh=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:Cl(n,!0),values:null};class Ae{constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Sl(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&gn(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,o=this.getDataset(),i=(f,h,p,m)=>f==="x"?h:f==="r"?m:p,r=n.xAxisID=W(o.xAxisID,Ii(e,"x")),l=n.yAxisID=W(o.yAxisID,Ii(e,"y")),a=n.rAxisID=W(o.rAxisID,Ii(e,"r")),d=n.indexAxis,c=n.iAxisID=i(d,r,l,a),u=n.vAxisID=i(d,l,r,a);n.xScale=this.getScaleForId(r),n.yScale=this.getScaleForId(l),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Hr(this._data,this),e._stacked&&gn(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),o=this._data;if(G(n))this._data=Yh(n);else if(o!==n){if(o){Hr(o,this);const i=this._cachedMeta;gn(i),i._parsed=[]}n&&Object.isExtensible(n)&&Af(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,o=this.getDataset();let i=!1;this._dataCheck();const r=n._stacked;n._stacked=Sl(n.vScale,n),n.stack!==o.stack&&(i=!0,gn(n),n.stack=o.stack),this._resyncElements(e),(i||r!==n._stacked)&&Dl(this,n._parsed)}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),o=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:o,_data:i}=this,{iScale:r,_stacked:l}=o,a=r.axis;let d=e===0&&n===i.length?!0:o._sorted,c=e>0&&o._parsed[e-1],u,f,h;if(this._parsing===!1)o._parsed=i,o._sorted=!0,h=i;else{ne(i[e])?h=this.parseArrayData(o,i,e,n):G(i[e])?h=this.parseObjectData(o,i,e,n):h=this.parsePrimitiveData(o,i,e,n);const p=()=>f[a]===null||c&&f[a]<c[a];for(u=0;u<n;++u)o._parsed[u+e]=f=h[u],d&&(p()&&(d=!1),c=f);o._sorted=d}l&&Dl(this,h)}parsePrimitiveData(e,n,o,i){const{iScale:r,vScale:l}=e,a=r.axis,d=l.axis,c=r.getLabels(),u=r===l,f=new Array(i);let h,p,m;for(h=0,p=i;h<p;++h)m=h+o,f[h]={[a]:u||r.parse(c[m],m),[d]:l.parse(n[m],m)};return f}parseArrayData(e,n,o,i){const{xScale:r,yScale:l}=e,a=new Array(i);let d,c,u,f;for(d=0,c=i;d<c;++d)u=d+o,f=n[u],a[d]={x:r.parse(f[0],u),y:l.parse(f[1],u)};return a}parseObjectData(e,n,o,i){const{xScale:r,yScale:l}=e,{xAxisKey:a="x",yAxisKey:d="y"}=this._parsing,c=new Array(i);let u,f,h,p;for(u=0,f=i;u<f;++u)h=u+o,p=n[h],c[u]={x:r.parse(ut(p,a),h),y:l.parse(ut(p,d),h)};return c}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,o){const i=this.chart,r=this._cachedMeta,l=n[e.axis],a={keys:Cl(i,!0),values:n._stacks[e.axis]._visualValues};return kl(a,l,r.index,{mode:o})}updateRangeFromParsed(e,n,o,i){const r=o[n.axis];let l=r===null?NaN:r;const a=i&&o._stacks[n.axis];i&&a&&(i.values=a,l=kl(i,r,this._cachedMeta.index)),e.min=Math.min(e.min,l),e.max=Math.max(e.max,l)}getMinMax(e,n){const o=this._cachedMeta,i=o._parsed,r=o._sorted&&e===o.iScale,l=i.length,a=this._getOtherScale(e),d=Zh(n,o,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:f}=Gh(a);let h,p;function m(){p=i[h];const g=p[a.axis];return!ae(p[e.axis])||u>g||f<g}for(h=0;h<l&&!(!m()&&(this.updateRangeFromParsed(c,e,p,d),r));++h);if(r){for(h=l-1;h>=0;--h)if(!m()){this.updateRangeFromParsed(c,e,p,d);break}}return c}getAllParsedValues(e){const n=this._cachedMeta._parsed,o=[];let i,r,l;for(i=0,r=n.length;i<r;++i)l=n[i][e.axis],ae(l)&&o.push(l);return o}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,o=n.iScale,i=n.vScale,r=this.getParsed(e);return{label:o?""+o.getLabelForValue(r[o.axis]):"",value:i?""+i.getLabelForValue(r[i.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=Wh(W(this.options.clip,jh(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,o=this._cachedMeta,i=o.data||[],r=n.chartArea,l=[],a=this._drawStart||0,d=this._drawCount||i.length-a,c=this.options.drawActiveElementsOnTop;let u;for(o.dataset&&o.dataset.draw(e,r,a,d),u=a;u<a+d;++u){const f=i[u];f.hidden||(f.active&&c?l.push(f):f.draw(e,r))}for(u=0;u<l.length;++u)l[u].draw(e,r)}getStyle(e,n){const o=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(e||0,o)}getContext(e,n,o){const i=this.getDataset();let r;if(e>=0&&e<this._cachedMeta.data.length){const l=this._cachedMeta.data[e];r=l.$context||(l.$context=Kh(this.getContext(),e,l)),r.parsed=this.getParsed(e),r.raw=i.data[e],r.index=r.dataIndex=e}else r=this.$context||(this.$context=Xh(this.chart.getContext(),this.index)),r.dataset=i,r.index=r.datasetIndex=this.index;return r.active=!!n,r.mode=o,r}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",o){const i=n==="active",r=this._cachedDataOpts,l=e+"-"+n,a=r[l],d=this.enableOptionSharing&&an(o);if(a)return El(a,d);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,e),f=i?[`${e}Hover`,"hover",e,""]:[e,""],h=c.getOptionScopes(this.getDataset(),u),p=Object.keys(de.elements[e]),m=()=>this.getContext(o,i,n),g=c.resolveNamedOptions(h,p,m,f);return g.$shared&&(g.$shared=d,r[l]=Object.freeze(El(g,d))),g}_resolveAnimations(e,n,o){const i=this.chart,r=this._cachedDataOpts,l=`animation-${n}`,a=r[l];if(a)return a;let d;if(i.options.animation!==!1){const u=this.chart.config,f=u.datasetAnimationScopeKeys(this._type,n),h=u.getOptionScopes(this.getDataset(),f);d=u.createResolver(h,this.getContext(e,o,n))}const c=new wl(i,d&&d.animations);return d&&d._cacheable&&(r[l]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||Ti(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const o=this.resolveDataElementOptions(e,n),i=this._sharedOptions,r=this.getSharedOptions(o),l=this.includeOptions(n,r)||r!==i;return this.updateSharedOptions(r,n,o),{sharedOptions:r,includeOptions:l}}updateElement(e,n,o,i){Ti(i)?Object.assign(e,o):this._resolveAnimations(n,i).update(e,o)}updateSharedOptions(e,n,o){e&&!Ti(n)&&this._resolveAnimations(void 0,n).update(e,o)}_setStyle(e,n,o,i){e.active=i;const r=this.getStyle(n,i);this._resolveAnimations(n,o,i).update(e,{options:!i&&this.getSharedOptions(r)||r})}removeHoverStyle(e,n,o){this._setStyle(e,o,"active",!1)}setHoverStyle(e,n,o){this._setStyle(e,o,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,o=this._cachedMeta.data;for(const[a,d,c]of this._syncList)this[a](d,c);this._syncList=[];const i=o.length,r=n.length,l=Math.min(r,i);l&&this.parse(0,l),r>i?this._insertElements(i,r-i,e):r<i&&this._removeElements(r,i-r)}_insertElements(e,n,o=!0){const i=this._cachedMeta,r=i.data,l=e+n;let a;const d=c=>{for(c.length+=n,a=c.length-1;a>=l;a--)c[a]=c[a-n]};for(d(r),a=e;a<l;++a)r[a]=new this.dataElementType;this._parsing&&d(i._parsed),this.parse(e,n),o&&this.updateElements(r,e,n,"reset")}updateElements(e,n,o,i){}_removeElements(e,n){const o=this._cachedMeta;if(this._parsing){const i=o._parsed.splice(e,n);o._stacked&&gn(o,i)}o.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,o,i]=e;this[n](o,i)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const o=arguments.length-2;o&&this._sync(["_insertElements",e,o])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}I(Ae,"defaults",{}),I(Ae,"datasetElementType",null),I(Ae,"dataElementType",null);function Jh(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let o=[];for(let i=0,r=n.length;i<r;i++)o=o.concat(n[i].controller.getAllParsedValues(t));t._cache.$bar=jr(o.sort((i,r)=>i-r))}return t._cache.$bar}function Qh(t){const e=t.iScale,n=Jh(e,t.type);let o=e._length,i,r,l,a;const d=()=>{l===32767||l===-32768||(an(a)&&(o=Math.min(o,Math.abs(l-a)||o)),a=l)};for(i=0,r=n.length;i<r;++i)l=e.getPixelForValue(n[i]),d();for(a=void 0,i=0,r=e.ticks.length;i<r;++i)l=e.getPixelForTick(i),d();return o}function ep(t,e,n,o){const i=n.barThickness;let r,l;return q(i)?(r=e.min*n.categoryPercentage,l=n.barPercentage):(r=i*o,l=1),{chunk:r/o,ratio:l,start:e.pixels[t]-r/2}}function tp(t,e,n,o){const i=e.pixels,r=i[t];let l=t>0?i[t-1]:null,a=t<i.length-1?i[t+1]:null;const d=n.categoryPercentage;l===null&&(l=r-(a===null?e.end-e.start:a-r)),a===null&&(a=r+r-l);const c=r-(r-Math.min(l,a))/2*d;return{chunk:Math.abs(a-l)/2*d/o,ratio:n.barPercentage,start:c}}function np(t,e,n,o){const i=n.parse(t[0],o),r=n.parse(t[1],o),l=Math.min(i,r),a=Math.max(i,r);let d=l,c=a;Math.abs(l)>Math.abs(a)&&(d=a,c=l),e[n.axis]=c,e._custom={barStart:d,barEnd:c,start:i,end:r,min:l,max:a}}function Ml(t,e,n,o){return ne(t)?np(t,e,n,o):e[n.axis]=n.parse(t,o),e}function Vl(t,e,n,o){const i=t.iScale,r=t.vScale,l=i.getLabels(),a=i===r,d=[];let c,u,f,h;for(c=n,u=n+o;c<u;++c)h=e[c],f={},f[i.axis]=a||i.parse(l[c],c),d.push(Ml(h,f,r,c));return d}function Li(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function op(t,e,n){return t!==0?je(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function ip(t){let e,n,o,i,r;return t.horizontal?(e=t.base>t.x,n="left",o="right"):(e=t.base<t.y,n="bottom",o="top"),e?(i="end",r="start"):(i="start",r="end"),{start:n,end:o,reverse:e,top:i,bottom:r}}function sp(t,e,n,o){let i=e.borderSkipped;const r={};if(!i){t.borderSkipped=r;return}if(i===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:l,end:a,reverse:d,top:c,bottom:u}=ip(t);i==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===o?i=c:(n._bottom||0)===o?i=u:(r[Bl(u,l,a,d)]=!0,i=c)),r[Bl(i,l,a,d)]=!0,t.borderSkipped=r}function Bl(t,e,n,o){return o?(t=rp(t,e,n),t=Pl(t,n,e)):t=Pl(t,e,n),t}function rp(t,e,n){return t===e?n:t===n?e:t}function Pl(t,e,n){return t==="start"?e:t==="end"?n:t}function lp(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class fo extends Ae{parsePrimitiveData(e,n,o,i){return Vl(e,n,o,i)}parseArrayData(e,n,o,i){return Vl(e,n,o,i)}parseObjectData(e,n,o,i){const{iScale:r,vScale:l}=e,{xAxisKey:a="x",yAxisKey:d="y"}=this._parsing,c=r.axis==="x"?a:d,u=l.axis==="x"?a:d,f=[];let h,p,m,g;for(h=o,p=o+i;h<p;++h)g=n[h],m={},m[r.axis]=r.parse(ut(g,c),h),f.push(Ml(ut(g,u),m,l,h));return f}updateRangeFromParsed(e,n,o,i){super.updateRangeFromParsed(e,n,o,i);const r=o._custom;r&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,r.min),e.max=Math.max(e.max,r.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:o,vScale:i}=n,r=this.getParsed(e),l=r._custom,a=Li(l)?"["+l.start+", "+l.end+"]":""+i.getLabelForValue(r[i.axis]);return{label:""+o.getLabelForValue(r[o.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,o,i){const r=i==="reset",{index:l,_cachedMeta:{vScale:a}}=this,d=a.getBasePixel(),c=a.isHorizontal(),u=this._getRuler(),{sharedOptions:f,includeOptions:h}=this._getSharedOptions(n,i);for(let p=n;p<n+o;p++){const m=this.getParsed(p),g=r||q(m[a.axis])?{base:d,head:d}:this._calculateBarValuePixels(p),b=this._calculateBarIndexPixels(p,u),y=(m._stacks||{})[a.axis],$={horizontal:c,base:g.base,enableBorderRadius:!y||Li(m._custom)||l===y._top||l===y._bottom,x:c?g.head:b.center,y:c?b.center:g.head,height:c?b.size:Math.abs(g.size),width:c?Math.abs(g.size):b.size};h&&($.options=f||this.resolveDataElementOptions(p,e[p].active?"active":i));const k=$.options||e[p].options;sp($,k,y,l),lp($,k,u.ratio),this.updateElement(e[p],p,$,i)}}_getStacks(e,n){const{iScale:o}=this._cachedMeta,i=o.getMatchingVisibleMetas(this._type).filter(d=>d.controller.options.grouped),r=o.options.stacked,l=[],a=d=>{const c=d.controller.getParsed(n),u=c&&c[d.vScale.axis];if(q(u)||isNaN(u))return!0};for(const d of i)if(!(n!==void 0&&a(d))&&((r===!1||l.indexOf(d.stack)===-1||r===void 0&&d.stack===void 0)&&l.push(d.stack),d.index===e))break;return l.length||l.push(void 0),l}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,o){const i=this._getStacks(e,o),r=n!==void 0?i.indexOf(n):-1;return r===-1?i.length-1:r}_getRuler(){const e=this.options,n=this._cachedMeta,o=n.iScale,i=[];let r,l;for(r=0,l=n.data.length;r<l;++r)i.push(o.getPixelForValue(this.getParsed(r)[o.axis],r));const a=e.barThickness;return{min:a||Qh(n),pixels:i,start:o._startPixel,end:o._endPixel,stackCount:this._getStackCount(),scale:o,grouped:e.grouped,ratio:a?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:o,index:i},options:{base:r,minBarLength:l}}=this,a=r||0,d=this.getParsed(e),c=d._custom,u=Li(c);let f=d[n.axis],h=0,p=o?this.applyStack(n,d,o):f,m,g;p!==f&&(h=p-f,p=f),u&&(f=c.barStart,p=c.barEnd-c.barStart,f!==0&&je(f)!==je(c.barEnd)&&(h=0),h+=f);const b=!q(r)&&!u?r:h;let y=n.getPixelForValue(b);if(this.chart.getDataVisibility(e)?m=n.getPixelForValue(h+p):m=y,g=m-y,Math.abs(g)<l){g=op(g,n,a)*l,f===a&&(y-=g/2);const $=n.getPixelForDecimal(0),k=n.getPixelForDecimal(1),v=Math.min($,k),x=Math.max($,k);y=Math.max(Math.min(y,x),v),m=y+g,o&&!u&&(d._stacks[n.axis]._visualValues[i]=n.getValueForPixel(m)-n.getValueForPixel(y))}if(y===n.getPixelForValue(a)){const $=je(g)*n.getLineWidthForValue(a)/2;y+=$,g-=$}return{size:g,base:y,head:m,center:m+g/2}}_calculateBarIndexPixels(e,n){const o=n.scale,i=this.options,r=i.skipNull,l=W(i.maxBarThickness,1/0);let a,d;if(n.grouped){const c=r?this._getStackCount(e):n.stackCount,u=i.barThickness==="flex"?tp(e,n,i,c):ep(e,n,i,c),f=this._getStackIndex(this.index,this._cachedMeta.stack,r?e:void 0);a=u.start+u.chunk*f+u.chunk/2,d=Math.min(l,u.chunk*u.ratio)}else a=o.getPixelForValue(this.getParsed(e)[o.axis],e),d=Math.min(l,n.min*n.ratio);return{base:a-d/2,head:a+d/2,center:a,size:d}}draw(){const e=this._cachedMeta,n=e.vScale,o=e.data,i=o.length;let r=0;for(;r<i;++r)this.getParsed(r)[n.axis]!==null&&o[r].draw(this._ctx)}}I(fo,"id","bar"),I(fo,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),I(fo,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class ho extends Ae{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,n,o,i){const r=super.parsePrimitiveData(e,n,o,i);for(let l=0;l<r.length;l++)r[l]._custom=this.resolveDataElementOptions(l+o).radius;return r}parseArrayData(e,n,o,i){const r=super.parseArrayData(e,n,o,i);for(let l=0;l<r.length;l++){const a=n[o+l];r[l]._custom=W(a[2],this.resolveDataElementOptions(l+o).radius)}return r}parseObjectData(e,n,o,i){const r=super.parseObjectData(e,n,o,i);for(let l=0;l<r.length;l++){const a=n[o+l];r[l]._custom=W(a&&a.r&&+a.r,this.resolveDataElementOptions(l+o).radius)}return r}getMaxOverflow(){const e=this._cachedMeta.data;let n=0;for(let o=e.length-1;o>=0;--o)n=Math.max(n,e[o].size(this.resolveDataElementOptions(o))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:i,yScale:r}=n,l=this.getParsed(e),a=i.getLabelForValue(l.x),d=r.getLabelForValue(l.y),c=l._custom;return{label:o[e]||"",value:"("+a+", "+d+(c?", "+c:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,o,i){const r=i==="reset",{iScale:l,vScale:a}=this._cachedMeta,{sharedOptions:d,includeOptions:c}=this._getSharedOptions(n,i),u=l.axis,f=a.axis;for(let h=n;h<n+o;h++){const p=e[h],m=!r&&this.getParsed(h),g={},b=g[u]=r?l.getPixelForDecimal(.5):l.getPixelForValue(m[u]),y=g[f]=r?a.getBasePixel():a.getPixelForValue(m[f]);g.skip=isNaN(b)||isNaN(y),c&&(g.options=d||this.resolveDataElementOptions(h,p.active?"active":i),r&&(g.options.radius=0)),this.updateElement(p,h,g,i)}}resolveDataElementOptions(e,n){const o=this.getParsed(e);let i=super.resolveDataElementOptions(e,n);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const r=i.radius;return n!=="active"&&(i.radius=0),i.radius+=W(o&&o._custom,r),i}}I(ho,"id","bubble"),I(ho,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),I(ho,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function ap(t,e,n){let o=1,i=1,r=0,l=0;if(e<ie){const a=t,d=a+e,c=Math.cos(a),u=Math.sin(a),f=Math.cos(d),h=Math.sin(d),p=(k,v,x)=>cn(k,a,d,!0)?1:Math.max(v,v*n,x,x*n),m=(k,v,x)=>cn(k,a,d,!0)?-1:Math.min(v,v*n,x,x*n),g=p(0,c,f),b=p(ce,u,h),y=m(oe,c,f),$=m(oe+ce,u,h);o=(g-y)/2,i=(b-$)/2,r=-(g+y)/2,l=-(b+$)/2}return{ratioX:o,ratioY:i,offsetX:r,offsetY:l}}class Pt extends Ae{constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const o=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=o;else{let r=d=>+o[d];if(G(o[e])){const{key:d="value"}=this._parsing;r=c=>+ut(o[c],d)}let l,a;for(l=e,a=e+n;l<a;++l)i._parsed[l]=r(l)}}_getRotation(){return Re(this.options.rotation-90)}_getCircumference(){return Re(this.options.circumference)}_getRotationExtents(){let e=ie,n=-ie;for(let o=0;o<this.chart.data.datasets.length;++o)if(this.chart.isDatasetVisible(o)&&this.chart.getDatasetMeta(o).type===this._type){const i=this.chart.getDatasetMeta(o).controller,r=i._getRotation(),l=i._getCircumference();e=Math.min(e,r),n=Math.max(n,r+l)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:o}=n,i=this._cachedMeta,r=i.data,l=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,a=Math.max((Math.min(o.width,o.height)-l)/2,0),d=Math.min(xf(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:u,rotation:f}=this._getRotationExtents(),{ratioX:h,ratioY:p,offsetX:m,offsetY:g}=ap(f,u,d),b=(o.width-l)/h,y=(o.height-l)/p,$=Math.max(Math.min(b,y)/2,0),k=Pr(this.options.radius,$),v=Math.max(k*d,0),x=(k-v)/this._getVisibleDatasetWeightTotal();this.offsetX=m*k,this.offsetY=g*k,i.total=this.calculateTotal(),this.outerRadius=k-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*c,0),this.updateElements(r,0,r.length,e)}_circumference(e,n){const o=this.options,i=this._cachedMeta,r=this._getCircumference();return n&&o.animation.animateRotate||!this.chart.getDataVisibility(e)||i._parsed[e]===null||i.data[e].hidden?0:this.calculateCircumference(i._parsed[e]*r/ie)}updateElements(e,n,o,i){const r=i==="reset",l=this.chart,a=l.chartArea,c=l.options.animation,u=(a.left+a.right)/2,f=(a.top+a.bottom)/2,h=r&&c.animateScale,p=h?0:this.innerRadius,m=h?0:this.outerRadius,{sharedOptions:g,includeOptions:b}=this._getSharedOptions(n,i);let y=this._getRotation(),$;for($=0;$<n;++$)y+=this._circumference($,r);for($=n;$<n+o;++$){const k=this._circumference($,r),v=e[$],x={x:u+this.offsetX,y:f+this.offsetY,startAngle:y,endAngle:y+k,circumference:k,outerRadius:m,innerRadius:p};b&&(x.options=g||this.resolveDataElementOptions($,v.active?"active":i)),y+=k,this.updateElement(v,$,x,i)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let o=0,i;for(i=0;i<n.length;i++){const r=e._parsed[i];r!==null&&!isNaN(r)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(o+=Math.abs(r))}return o}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?ie*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,i=o.data.labels||[],r=fn(n._parsed[e],o.options.locale);return{label:i[e]||"",value:r}}getMaxBorderWidth(e){let n=0;const o=this.chart;let i,r,l,a,d;if(!e){for(i=0,r=o.data.datasets.length;i<r;++i)if(o.isDatasetVisible(i)){l=o.getDatasetMeta(i),e=l.data,a=l.controller;break}}if(!e)return 0;for(i=0,r=e.length;i<r;++i)d=a.resolveDataElementOptions(i),d.borderAlign!=="inner"&&(n=Math.max(n,d.borderWidth||0,d.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let o=0,i=e.length;o<i;++o){const r=this.resolveDataElementOptions(o);n=Math.max(n,r.offset||0,r.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let o=0;o<e;++o)this.chart.isDatasetVisible(o)&&(n+=this._getRingWeight(o));return n}_getRingWeight(e){return Math.max(W(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}I(Pt,"id","doughnut"),I(Pt,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),I(Pt,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),I(Pt,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:i}}=e.legend.options;return n.labels.map((r,l)=>{const d=e.getDatasetMeta(0).controller.getStyle(l);return{text:r,fillStyle:d.backgroundColor,strokeStyle:d.borderColor,fontColor:i,lineWidth:d.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(l),index:l}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}}});class po extends Ae{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:o,data:i=[],_dataset:r}=n,l=this.chart._animationsDisabled;let{start:a,count:d}=Ur(n,i,l);this._drawStart=a,this._drawCount=d,Gr(n)&&(a=0,d=i.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!r._decimated,o.points=i;const c=this.resolveDatasetElementOptions(e);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(o,void 0,{animated:!l,options:c},e),this.updateElements(i,a,d,e)}updateElements(e,n,o,i){const r=i==="reset",{iScale:l,vScale:a,_stacked:d,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:f}=this._getSharedOptions(n,i),h=l.axis,p=a.axis,{spanGaps:m,segment:g}=this.options,b=zt(m)?m:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||r||i==="none",$=n+o,k=e.length;let v=n>0&&this.getParsed(n-1);for(let x=0;x<k;++x){const B=e[x],M=y?B:{};if(x<n||x>=$){M.skip=!0;continue}const N=this.getParsed(x),F=q(N[p]),P=M[h]=l.getPixelForValue(N[h],x),w=M[p]=r||F?a.getBasePixel():a.getPixelForValue(d?this.applyStack(a,N,d):N[p],x);M.skip=isNaN(P)||isNaN(w)||F,M.stop=x>0&&Math.abs(N[h]-v[h])>b,g&&(M.parsed=N,M.raw=c.data[x]),f&&(M.options=u||this.resolveDataElementOptions(x,B.active?"active":i)),y||this.updateElement(B,x,M,i),v=N}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,o=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return o;const r=i[0].size(this.resolveDataElementOptions(0)),l=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(o,r,l)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}I(po,"id","line"),I(po,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),I(po,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class bn extends Ae{constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,i=o.data.labels||[],r=fn(n._parsed[e].r,o.options.locale);return{label:i[e]||"",value:r}}parseObjectData(e,n,o,i){return al.bind(this)(e,n,o,i)}update(e){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){const e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((o,i)=>{const r=this.getParsed(i).r;!isNaN(r)&&this.chart.getDataVisibility(i)&&(r<n.min&&(n.min=r),r>n.max&&(n.max=r))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,o=e.options,i=Math.min(n.right-n.left,n.bottom-n.top),r=Math.max(i/2,0),l=Math.max(o.cutoutPercentage?r/100*o.cutoutPercentage:1,0),a=(r-l)/e.getVisibleDatasetCount();this.outerRadius=r-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(e,n,o,i){const r=i==="reset",l=this.chart,d=l.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,f=c.yCenter,h=c.getIndexAngle(0)-.5*oe;let p=h,m;const g=360/this.countVisibleElements();for(m=0;m<n;++m)p+=this._computeAngle(m,i,g);for(m=n;m<n+o;m++){const b=e[m];let y=p,$=p+this._computeAngle(m,i,g),k=l.getDataVisibility(m)?c.getDistanceFromCenterForValue(this.getParsed(m).r):0;p=$,r&&(d.animateScale&&(k=0),d.animateRotate&&(y=$=h));const v={x:u,y:f,innerRadius:0,outerRadius:k,startAngle:y,endAngle:$,options:this.resolveDataElementOptions(m,b.active?"active":i)};this.updateElement(b,m,v,i)}}countVisibleElements(){const e=this._cachedMeta;let n=0;return e.data.forEach((o,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(e,n,o){return this.chart.getDataVisibility(e)?Re(this.resolveDataElementOptions(e,n).angle||o):0}}I(bn,"id","polarArea"),I(bn,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),I(bn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:i}}=e.legend.options;return n.labels.map((r,l)=>{const d=e.getDatasetMeta(0).controller.getStyle(l);return{text:r,fillStyle:d.backgroundColor,strokeStyle:d.borderColor,fontColor:i,lineWidth:d.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(l),index:l}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class zi extends Pt{}I(zi,"id","pie"),I(zi,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class mo extends Ae{getLabelAndValue(e){const n=this._cachedMeta.vScale,o=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(o[n.axis])}}parseObjectData(e,n,o,i){return al.bind(this)(e,n,o,i)}update(e){const n=this._cachedMeta,o=n.dataset,i=n.data||[],r=n.iScale.getLabels();if(o.points=i,e!=="resize"){const l=this.resolveDatasetElementOptions(e);this.options.showLine||(l.borderWidth=0);const a={_loop:!0,_fullLoop:r.length===i.length,options:l};this.updateElement(o,void 0,a,e)}this.updateElements(i,0,i.length,e)}updateElements(e,n,o,i){const r=this._cachedMeta.rScale,l=i==="reset";for(let a=n;a<n+o;a++){const d=e[a],c=this.resolveDataElementOptions(a,d.active?"active":i),u=r.getPointPositionForValue(a,this.getParsed(a).r),f=l?r.xCenter:u.x,h=l?r.yCenter:u.y,p={x:f,y:h,angle:u.angle,skip:isNaN(f)||isNaN(h),options:c};this.updateElement(d,a,p,i)}}}I(mo,"id","radar"),I(mo,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),I(mo,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class go extends Ae{getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:i,yScale:r}=n,l=this.getParsed(e),a=i.getLabelForValue(l.x),d=r.getLabelForValue(l.y);return{label:o[e]||"",value:"("+a+", "+d+")"}}update(e){const n=this._cachedMeta,{data:o=[]}=n,i=this.chart._animationsDisabled;let{start:r,count:l}=Ur(n,o,i);if(this._drawStart=r,this._drawCount=l,Gr(n)&&(r=0,l=o.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:a,_dataset:d}=n;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!d._decimated,a.points=o;const c=this.resolveDatasetElementOptions(e);c.segment=this.options.segment,this.updateElement(a,void 0,{animated:!i,options:c},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(o,r,l,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,n,o,i){const r=i==="reset",{iScale:l,vScale:a,_stacked:d,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(n,i),f=this.getSharedOptions(u),h=this.includeOptions(i,f),p=l.axis,m=a.axis,{spanGaps:g,segment:b}=this.options,y=zt(g)?g:Number.POSITIVE_INFINITY,$=this.chart._animationsDisabled||r||i==="none";let k=n>0&&this.getParsed(n-1);for(let v=n;v<n+o;++v){const x=e[v],B=this.getParsed(v),M=$?x:{},N=q(B[m]),F=M[p]=l.getPixelForValue(B[p],v),P=M[m]=r||N?a.getBasePixel():a.getPixelForValue(d?this.applyStack(a,B,d):B[m],v);M.skip=isNaN(F)||isNaN(P)||N,M.stop=v>0&&Math.abs(B[p]-k[p])>y,b&&(M.parsed=B,M.raw=c.data[v]),h&&(M.options=f||this.resolveDataElementOptions(v,x.active?"active":i)),$||this.updateElement(x,v,M,i),k=B}this.updateSharedOptions(f,i,u)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let a=0;for(let d=n.length-1;d>=0;--d)a=Math.max(a,n[d].size(this.resolveDataElementOptions(d))/2);return a>0&&a}const o=e.dataset,i=o.options&&o.options.borderWidth||0;if(!n.length)return i;const r=n[0].size(this.resolveDataElementOptions(0)),l=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,l)/2}}I(go,"id","scatter"),I(go,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),I(go,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var dp=Object.freeze({__proto__:null,BarController:fo,BubbleController:ho,DoughnutController:Pt,LineController:po,PieController:zi,PolarAreaController:bn,RadarController:mo,ScatterController:go});function Nt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Hi{constructor(e){I(this,"options");this.options=e||{}}static override(e){Object.assign(Hi.prototype,e)}init(){}formats(){return Nt()}parse(){return Nt()}format(){return Nt()}add(){return Nt()}diff(){return Nt()}startOf(){return Nt()}endOf(){return Nt()}}var cp={_date:Hi};function up(t,e,n,o){const{controller:i,data:r,_sorted:l}=t,a=i._cachedMeta.iScale;if(a&&e===a.axis&&e!=="r"&&l&&r.length){const d=a._reversePixels?Ff:Je;if(o){if(i._sharedOptions){const c=r[0],u=typeof c.getRange=="function"&&c.getRange(e);if(u){const f=d(r,e,n-u),h=d(r,e,n+u);return{lo:f.lo,hi:h.hi}}}}else return d(r,e,n)}return{lo:0,hi:r.length-1}}function yn(t,e,n,o,i){const r=t.getSortedVisibleDatasetMetas(),l=n[e];for(let a=0,d=r.length;a<d;++a){const{index:c,data:u}=r[a],{lo:f,hi:h}=up(r[a],e,l,i);for(let p=f;p<=h;++p){const m=u[p];m.skip||o(m,c,p)}}}function fp(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(o,i){const r=e?Math.abs(o.x-i.x):0,l=n?Math.abs(o.y-i.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(l,2))}}function ji(t,e,n,o,i){const r=[];return!i&&!t.isPointInArea(e)||yn(t,n,e,function(a,d,c){!i&&!Qe(a,t.chartArea,0)||a.inRange(e.x,e.y,o)&&r.push({element:a,datasetIndex:d,index:c})},!0),r}function hp(t,e,n,o){let i=[];function r(l,a,d){const{startAngle:c,endAngle:u}=l.getProps(["startAngle","endAngle"],o),{angle:f}=Lr(l,{x:e.x,y:e.y});cn(f,c,u)&&i.push({element:l,datasetIndex:a,index:d})}return yn(t,n,e,r),i}function pp(t,e,n,o,i,r){let l=[];const a=fp(n);let d=Number.POSITIVE_INFINITY;function c(u,f,h){const p=u.inRange(e.x,e.y,i);if(o&&!p)return;const m=u.getCenterPoint(i);if(!(!!r||t.isPointInArea(m))&&!p)return;const b=a(e,m);b<d?(l=[{element:u,datasetIndex:f,index:h}],d=b):b===d&&l.push({element:u,datasetIndex:f,index:h})}return yn(t,n,e,c),l}function Wi(t,e,n,o,i,r){return!r&&!t.isPointInArea(e)?[]:n==="r"&&!o?hp(t,e,n,i):pp(t,e,n,o,i,r)}function Nl(t,e,n,o,i){const r=[],l=n==="x"?"inXRange":"inYRange";let a=!1;return yn(t,n,e,(d,c,u)=>{d[l](e[n],i)&&(r.push({element:d,datasetIndex:c,index:u}),a=a||d.inRange(e.x,e.y,i))}),o&&!a?[]:r}var mp={evaluateInteractionItems:yn,modes:{index(t,e,n,o){const i=Vt(e,t),r=n.axis||"x",l=n.includeInvisible||!1,a=n.intersect?ji(t,i,r,o,l):Wi(t,i,r,!1,o,l),d=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,f=c.data[u];f&&!f.skip&&d.push({element:f,datasetIndex:c.index,index:u})}),d):[]},dataset(t,e,n,o){const i=Vt(e,t),r=n.axis||"xy",l=n.includeInvisible||!1;let a=n.intersect?ji(t,i,r,o,l):Wi(t,i,r,!1,o,l);if(a.length>0){const d=a[0].datasetIndex,c=t.getDatasetMeta(d).data;a=[];for(let u=0;u<c.length;++u)a.push({element:c[u],datasetIndex:d,index:u})}return a},point(t,e,n,o){const i=Vt(e,t),r=n.axis||"xy",l=n.includeInvisible||!1;return ji(t,i,r,o,l)},nearest(t,e,n,o){const i=Vt(e,t),r=n.axis||"xy",l=n.includeInvisible||!1;return Wi(t,i,r,n.intersect,o,l)},x(t,e,n,o){const i=Vt(e,t);return Nl(t,i,"x",n.intersect,o)},y(t,e,n,o){const i=Vt(e,t);return Nl(t,i,"y",n.intersect,o)}}};const Fl=["left","top","right","bottom"];function $n(t,e){return t.filter(n=>n.pos===e)}function Rl(t,e){return t.filter(n=>Fl.indexOf(n.pos)===-1&&n.box.axis===e)}function _n(t,e){return t.sort((n,o)=>{const i=e?o:n,r=e?n:o;return i.weight===r.weight?i.index-r.index:i.weight-r.weight})}function gp(t){const e=[];let n,o,i,r,l,a;for(n=0,o=(t||[]).length;n<o;++n)i=t[n],{position:r,options:{stack:l,stackWeight:a=1}}=i,e.push({index:n,box:i,pos:r,horizontal:i.isHorizontal(),weight:i.weight,stack:l&&r+l,stackWeight:a});return e}function bp(t){const e={};for(const n of t){const{stack:o,pos:i,stackWeight:r}=n;if(!o||!Fl.includes(i))continue;const l=e[o]||(e[o]={count:0,placed:0,weight:0,size:0});l.count++,l.weight+=r}return e}function yp(t,e){const n=bp(t),{vBoxMaxWidth:o,hBoxMaxHeight:i}=e;let r,l,a;for(r=0,l=t.length;r<l;++r){a=t[r];const{fullSize:d}=a.box,c=n[a.stack],u=c&&a.stackWeight/c.weight;a.horizontal?(a.width=u?u*o:d&&e.availableWidth,a.height=i):(a.width=o,a.height=u?u*i:d&&e.availableHeight)}return n}function $p(t){const e=gp(t),n=_n(e.filter(c=>c.box.fullSize),!0),o=_n($n(e,"left"),!0),i=_n($n(e,"right")),r=_n($n(e,"top"),!0),l=_n($n(e,"bottom")),a=Rl(e,"x"),d=Rl(e,"y");return{fullSize:n,leftAndTop:o.concat(r),rightAndBottom:i.concat(d).concat(l).concat(a),chartArea:$n(e,"chartArea"),vertical:o.concat(i).concat(d),horizontal:r.concat(l).concat(a)}}function Al(t,e,n,o){return Math.max(t[n],e[n])+Math.max(t[o],e[o])}function Ol(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function _p(t,e,n,o){const{pos:i,box:r}=n,l=t.maxPadding;if(!G(i)){n.size&&(t[i]-=n.size);const f=o[n.stack]||{size:0,count:1};f.size=Math.max(f.size,n.horizontal?r.height:r.width),n.size=f.size/f.count,t[i]+=n.size}r.getPadding&&Ol(l,r.getPadding());const a=Math.max(0,e.outerWidth-Al(l,t,"left","right")),d=Math.max(0,e.outerHeight-Al(l,t,"top","bottom")),c=a!==t.w,u=d!==t.h;return t.w=a,t.h=d,n.horizontal?{same:c,other:u}:{same:u,other:c}}function wp(t){const e=t.maxPadding;function n(o){const i=Math.max(e[o]-t[o],0);return t[o]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function xp(t,e){const n=e.maxPadding;function o(i){const r={left:0,top:0,right:0,bottom:0};return i.forEach(l=>{r[l]=Math.max(e[l],n[l])}),r}return o(t?["left","right"]:["top","bottom"])}function wn(t,e,n,o){const i=[];let r,l,a,d,c,u;for(r=0,l=t.length,c=0;r<l;++r){a=t[r],d=a.box,d.update(a.width||e.w,a.height||e.h,xp(a.horizontal,e));const{same:f,other:h}=_p(e,n,a,o);c|=f&&i.length,u=u||h,d.fullSize||i.push(a)}return c&&wn(i,e,n,o)||u}function bo(t,e,n,o,i){t.top=n,t.left=e,t.right=e+o,t.bottom=n+i,t.width=o,t.height=i}function Il(t,e,n,o){const i=n.padding;let{x:r,y:l}=e;for(const a of t){const d=a.box,c=o[a.stack]||{count:1,placed:0,weight:1},u=a.stackWeight/c.weight||1;if(a.horizontal){const f=e.w*u,h=c.size||d.height;an(c.start)&&(l=c.start),d.fullSize?bo(d,i.left,l,n.outerWidth-i.right-i.left,h):bo(d,e.left+c.placed,l,f,h),c.start=l,c.placed+=f,l=d.bottom}else{const f=e.h*u,h=c.size||d.width;an(c.start)&&(r=c.start),d.fullSize?bo(d,r,i.top,h,n.outerHeight-i.bottom-i.top):bo(d,r,e.top+c.placed,h,f),c.start=r,c.placed+=f,r=d.right}}e.x=r,e.y=l}var ye={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,o){if(!t)return;const i=be(t.options.layout.padding),r=Math.max(e-i.width,0),l=Math.max(n-i.height,0),a=$p(t.boxes),d=a.vertical,c=a.horizontal;Q(t.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const u=d.reduce((g,b)=>b.box.options&&b.box.options.display===!1?g:g+1,0)||1,f=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:r,availableHeight:l,vBoxMaxWidth:r/2/u,hBoxMaxHeight:l/2}),h=Object.assign({},i);Ol(h,be(o));const p=Object.assign({maxPadding:h,w:r,h:l,x:i.left,y:i.top},i),m=yp(d.concat(c),f);wn(a.fullSize,p,f,m),wn(d,p,f,m),wn(c,p,f,m)&&wn(d,p,f,m),wp(p),Il(a.leftAndTop,p,f,m),p.x+=p.w,p.y+=p.h,Il(a.rightAndBottom,p,f,m),t.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},Q(a.chartArea,g=>{const b=g.box;Object.assign(b,t.chartArea),b.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class Tl{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,o){}removeEventListener(e,n,o){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,o,i){return n=Math.max(0,n||e.width),o=o||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):o)}}isAttached(e){return!0}updateConfig(e){}}class Cp extends Tl{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const yo="$chartjs",kp={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ll=t=>t===null||t==="";function Sp(t,e){const n=t.style,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[yo]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Ll(i)){const r=ul(t,"width");r!==void 0&&(t.width=r)}if(Ll(o))if(t.style.height==="")t.height=t.width/(e||2);else{const r=ul(t,"height");r!==void 0&&(t.height=r)}return t}const zl=Dh?{passive:!0}:!1;function vp(t,e,n){t.addEventListener(e,n,zl)}function Dp(t,e,n){t.canvas.removeEventListener(e,n,zl)}function Ep(t,e){const n=kp[t.type]||t.type,{x:o,y:i}=Vt(t,e);return{type:n,chart:e,native:t,x:o!==void 0?o:null,y:i!==void 0?i:null}}function $o(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function Mp(t,e,n){const o=t.canvas,i=new MutationObserver(r=>{let l=!1;for(const a of r)l=l||$o(a.addedNodes,o),l=l&&!$o(a.removedNodes,o);l&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function Vp(t,e,n){const o=t.canvas,i=new MutationObserver(r=>{let l=!1;for(const a of r)l=l||$o(a.removedNodes,o),l=l&&!$o(a.addedNodes,o);l&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const xn=new Map;let Hl=0;function jl(){const t=window.devicePixelRatio;t!==Hl&&(Hl=t,xn.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function Bp(t,e){xn.size||window.addEventListener("resize",jl),xn.set(t,e)}function Pp(t){xn.delete(t),xn.size||window.removeEventListener("resize",jl)}function Np(t,e,n){const o=t.canvas,i=o&&Oi(o);if(!i)return;const r=Yr((a,d)=>{const c=i.clientWidth;n(a,d),c<i.clientWidth&&n()},window),l=new ResizeObserver(a=>{const d=a[0],c=d.contentRect.width,u=d.contentRect.height;c===0&&u===0||r(c,u)});return l.observe(i),Bp(t,r),l}function Yi(t,e,n){n&&n.disconnect(),e==="resize"&&Pp(t)}function Fp(t,e,n){const o=t.canvas,i=Yr(r=>{t.ctx!==null&&n(Ep(r,t))},t);return vp(o,e,i),i}class Rp extends Tl{acquireContext(e,n){const o=e&&e.getContext&&e.getContext("2d");return o&&o.canvas===e?(Sp(e,n),o):null}releaseContext(e){const n=e.canvas;if(!n[yo])return!1;const o=n[yo].initial;["height","width"].forEach(r=>{const l=o[r];q(l)?n.removeAttribute(r):n.setAttribute(r,l)});const i=o.style||{};return Object.keys(i).forEach(r=>{n.style[r]=i[r]}),n.width=n.width,delete n[yo],!0}addEventListener(e,n,o){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),l={attach:Mp,detach:Vp,resize:Np}[n]||Fp;i[n]=l(e,n,o)}removeEventListener(e,n){const o=e.$proxies||(e.$proxies={}),i=o[n];if(!i)return;({attach:Yi,detach:Yi,resize:Yi}[n]||Dp)(e,n,i),o[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,o,i){return vh(e,n,o,i)}isAttached(e){const n=Oi(e);return!!(n&&n.isConnected)}}function Ap(t){return!Ai()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?Cp:Rp}let tt=(ci=class{constructor(){I(this,"x");I(this,"y");I(this,"active",!1);I(this,"options");I(this,"$animations")}tooltipPosition(e){const{x:n,y:o}=this.getProps(["x","y"],e);return{x:n,y:o}}hasValue(){return zt(this.x)&&zt(this.y)}getProps(e,n){const o=this.$animations;if(!n||!o)return this;const i={};return e.forEach(r=>{i[r]=o[r]&&o[r].active()?o[r]._to:this[r]}),i}},I(ci,"defaults",{}),I(ci,"defaultRoutes"),ci);function Op(t,e){const n=t.options.ticks,o=Ip(t),i=Math.min(n.maxTicksLimit||o,o),r=n.major.enabled?Lp(e):[],l=r.length,a=r[0],d=r[l-1],c=[];if(l>i)return zp(e,c,r,l/i),c;const u=Tp(r,e,i);if(l>0){let f,h;const p=l>1?Math.round((d-a)/(l-1)):null;for(_o(e,c,u,q(p)?0:a-p,a),f=0,h=l-1;f<h;f++)_o(e,c,u,r[f],r[f+1]);return _o(e,c,u,d,q(p)?e.length:d+p),c}return _o(e,c,u),c}function Ip(t){const e=t.options.offset,n=t._tickSize(),o=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(o,i))}function Tp(t,e,n){const o=Hp(t),i=e.length/n;if(!o)return Math.max(i,1);const r=Vf(o);for(let l=0,a=r.length-1;l<a;l++){const d=r[l];if(d>i)return d}return Math.max(i,1)}function Lp(t){const e=[];let n,o;for(n=0,o=t.length;n<o;n++)t[n].major&&e.push(n);return e}function zp(t,e,n,o){let i=0,r=n[0],l;for(o=Math.ceil(o),l=0;l<t.length;l++)l===r&&(e.push(t[l]),i++,r=n[i*o])}function _o(t,e,n,o,i){const r=W(o,0),l=Math.min(W(i,t.length),t.length);let a=0,d,c,u;for(n=Math.ceil(n),i&&(d=i-o,n=d/Math.floor(d/n)),u=r;u<0;)a++,u=Math.round(r+a*n);for(c=Math.max(r,0);c<l;c++)c===u&&(e.push(t[c]),a++,u=Math.round(r+a*n))}function Hp(t){const e=t.length;let n,o;if(e<2)return!1;for(o=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==o)return!1;return o}const jp=t=>t==="left"?"right":t==="right"?"left":t,Wl=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,Yl=(t,e)=>Math.min(e||t,t);function Ul(t,e){const n=[],o=t.length/e,i=t.length;let r=0;for(;r<i;r+=o)n.push(t[Math.floor(r)]);return n}function Wp(t,e,n){const o=t.ticks.length,i=Math.min(e,o-1),r=t._startPixel,l=t._endPixel,a=1e-6;let d=t.getPixelForTick(i),c;if(!(n&&(o===1?c=Math.max(d-r,l-d):e===0?c=(t.getPixelForTick(1)-d)/2:c=(d-t.getPixelForTick(i-1))/2,d+=i<e?c:-c,d<r-a||d>l+a)))return d}function Yp(t,e){Q(t,n=>{const o=n.gc,i=o.length/2;let r;if(i>e){for(r=0;r<i;++r)delete n.data[o[r]];o.splice(0,i)}})}function Cn(t){return t.drawTicks?t.tickLength:0}function Gl(t,e){if(!t.display)return 0;const n=fe(t.font,e),o=be(t.padding);return(ne(t.text)?t.text.length:1)*n.lineHeight+o.height}function Up(t,e){return pt(t,{scale:e,type:"scale"})}function Gp(t,e,n){return pt(t,{tick:n,index:e,type:"tick"})}function qp(t,e,n){let o=vi(t);return(n&&e!=="right"||!n&&e==="right")&&(o=jp(o)),o}function Xp(t,e,n,o){const{top:i,left:r,bottom:l,right:a,chart:d}=t,{chartArea:c,scales:u}=d;let f=0,h,p,m;const g=l-i,b=a-r;if(t.isHorizontal()){if(p=ge(o,r,a),G(n)){const y=Object.keys(n)[0],$=n[y];m=u[y].getPixelForValue($)+g-e}else n==="center"?m=(c.bottom+c.top)/2+g-e:m=Wl(t,n,e);h=a-r}else{if(G(n)){const y=Object.keys(n)[0],$=n[y];p=u[y].getPixelForValue($)-b+e}else n==="center"?p=(c.left+c.right)/2-b+e:p=Wl(t,n,e);m=ge(o,l,i),f=n==="left"?-ce:ce}return{titleX:p,titleY:m,maxWidth:h,rotation:f}}class Ft extends tt{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:o,_suggestedMax:i}=this;return e=ve(e,Number.POSITIVE_INFINITY),n=ve(n,Number.NEGATIVE_INFINITY),o=ve(o,Number.POSITIVE_INFINITY),i=ve(i,Number.NEGATIVE_INFINITY),{min:ve(e,o),max:ve(n,i),minDefined:ae(e),maxDefined:ae(n)}}getMinMax(e){let{min:n,max:o,minDefined:i,maxDefined:r}=this.getUserBounds(),l;if(i&&r)return{min:n,max:o};const a=this.getMatchingVisibleMetas();for(let d=0,c=a.length;d<c;++d)l=a[d].controller.getMinMax(this,e),i||(n=Math.min(n,l.min)),r||(o=Math.max(o,l.max));return n=r&&n>o?o:n,o=i&&n>o?n:o,{min:ve(n,ve(o,n)),max:ve(o,ve(n,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){te(this.options.beforeUpdate,[this])}update(e,n,o){const{beginAtZero:i,grace:r,ticks:l}=this.options,a=l.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=o=Object.assign({left:0,right:0,top:0,bottom:0},o),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+o.left+o.right:this.height+o.top+o.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=ih(this,r,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const d=a<this.ticks.length;this._convertTicksToLabels(d?Ul(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),l.display&&(l.autoSkip||l.source==="auto")&&(this.ticks=Op(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),d&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,o;this.isHorizontal()?(n=this.left,o=this.right):(n=this.top,o=this.bottom,e=!e),this._startPixel=n,this._endPixel=o,this._reversePixels=e,this._length=o-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){te(this.options.afterUpdate,[this])}beforeSetDimensions(){te(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){te(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),te(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){te(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let o,i,r;for(o=0,i=e.length;o<i;o++)r=e[o],r.label=te(n.callback,[r.value,o,e],this)}afterTickToLabelConversion(){te(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){te(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,o=Yl(this.ticks.length,e.ticks.maxTicksLimit),i=n.minRotation||0,r=n.maxRotation;let l=i,a,d,c;if(!this._isVisible()||!n.display||i>=r||o<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),f=u.widest.width,h=u.highest.height,p=pe(this.chart.width-f,0,this.maxWidth);a=e.offset?this.maxWidth/o:p/(o-1),f+6>a&&(a=p/(o-(e.offset?.5:1)),d=this.maxHeight-Cn(e.grid)-n.padding-Gl(e.title,this.chart.options.font),c=Math.sqrt(f*f+h*h),l=Ci(Math.min(Math.asin(pe((u.highest.height+6)/a,-1,1)),Math.asin(pe(d/c,-1,1))-Math.asin(pe(h/c,-1,1)))),l=Math.max(i,Math.min(r,l))),this.labelRotation=l}afterCalculateLabelRotation(){te(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){te(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:o,title:i,grid:r}}=this,l=this._isVisible(),a=this.isHorizontal();if(l){const d=Gl(i,n.options.font);if(a?(e.width=this.maxWidth,e.height=Cn(r)+d):(e.height=this.maxHeight,e.width=Cn(r)+d),o.display&&this.ticks.length){const{first:c,last:u,widest:f,highest:h}=this._getLabelSizes(),p=o.padding*2,m=Re(this.labelRotation),g=Math.cos(m),b=Math.sin(m);if(a){const y=o.mirror?0:b*f.width+g*h.height;e.height=Math.min(this.maxHeight,e.height+y+p)}else{const y=o.mirror?0:g*f.width+b*h.height;e.width=Math.min(this.maxWidth,e.width+y+p)}this._calculatePadding(c,u,b,g)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,o,i){const{ticks:{align:r,padding:l},position:a}=this.options,d=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,p=0;d?c?(h=i*e.width,p=o*n.height):(h=o*e.height,p=i*n.width):r==="start"?p=n.width:r==="end"?h=e.width:r!=="inner"&&(h=e.width/2,p=n.width/2),this.paddingLeft=Math.max((h-u+l)*this.width/(this.width-u),0),this.paddingRight=Math.max((p-f+l)*this.width/(this.width-f),0)}else{let u=n.height/2,f=e.height/2;r==="start"?(u=0,f=e.height):r==="end"&&(u=n.height,f=0),this.paddingTop=u+l,this.paddingBottom=f+l}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){te(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,o;for(n=0,o=e.length;n<o;n++)q(e[n].label)&&(e.splice(n,1),o--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let o=this.ticks;n<o.length&&(o=Ul(o,n)),this._labelSizes=e=this._computeLabelSizes(o,o.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,o){const{ctx:i,_longestTextCache:r}=this,l=[],a=[],d=Math.floor(n/Yl(n,o));let c=0,u=0,f,h,p,m,g,b,y,$,k,v,x;for(f=0;f<n;f+=d){if(m=e[f].label,g=this._resolveTickFontOptions(f),i.font=b=g.string,y=r[b]=r[b]||{data:{},gc:[]},$=g.lineHeight,k=v=0,!q(m)&&!ne(m))k=io(i,y.data,y.gc,k,m),v=$;else if(ne(m))for(h=0,p=m.length;h<p;++h)x=m[h],!q(x)&&!ne(x)&&(k=io(i,y.data,y.gc,k,x),v+=$);l.push(k),a.push(v),c=Math.max(k,c),u=Math.max(v,u)}Yp(r,n);const B=l.indexOf(c),M=a.indexOf(u),N=F=>({width:l[F]||0,height:a[F]||0});return{first:N(0),last:N(n-1),widest:N(B),highest:N(M),widths:l,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return Nf(this._alignToPixels?vt(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const o=n[e];return o.$context||(o.$context=Gp(this.getContext(),e,o))}return this.$context||(this.$context=Up(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=Re(this.labelRotation),o=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),r=this._getLabelSizes(),l=e.autoSkipPadding||0,a=r?r.widest.width+l:0,d=r?r.highest.height+l:0;return this.isHorizontal()?d*o>a*i?a/o:d/i:d*i<a*o?d/o:a/i}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,o=this.chart,i=this.options,{grid:r,position:l,border:a}=i,d=r.offset,c=this.isHorizontal(),f=this.ticks.length+(d?1:0),h=Cn(r),p=[],m=a.setContext(this.getContext()),g=m.display?m.width:0,b=g/2,y=function(C){return vt(o,C,g)};let $,k,v,x,B,M,N,F,P,w,_,E;if(l==="top")$=y(this.bottom),M=this.bottom-h,F=$-b,w=y(e.top)+b,E=e.bottom;else if(l==="bottom")$=y(this.top),w=e.top,E=y(e.bottom)-b,M=$+b,F=this.top+h;else if(l==="left")$=y(this.right),B=this.right-h,N=$-b,P=y(e.left)+b,_=e.right;else if(l==="right")$=y(this.left),P=e.left,_=y(e.right)-b,B=$+b,N=this.left+h;else if(n==="x"){if(l==="center")$=y((e.top+e.bottom)/2+.5);else if(G(l)){const C=Object.keys(l)[0],V=l[C];$=y(this.chart.scales[C].getPixelForValue(V))}w=e.top,E=e.bottom,M=$+b,F=M+h}else if(n==="y"){if(l==="center")$=y((e.left+e.right)/2);else if(G(l)){const C=Object.keys(l)[0],V=l[C];$=y(this.chart.scales[C].getPixelForValue(V))}B=$-b,N=B-h,P=e.left,_=e.right}const S=W(i.ticks.maxTicksLimit,f),D=Math.max(1,Math.ceil(f/S));for(k=0;k<f;k+=D){const C=this.getContext(k),V=r.setContext(C),A=a.setContext(C),L=V.lineWidth,T=V.color,j=A.dash||[],Y=A.dashOffset,U=V.tickWidth,J=V.tickColor,re=V.tickBorderDash||[],ue=V.tickBorderDashOffset;v=Wp(this,k,d),v!==void 0&&(x=vt(o,v,L),c?B=N=P=_=x:M=F=w=E=x,p.push({tx1:B,ty1:M,tx2:N,ty2:F,x1:P,y1:w,x2:_,y2:E,width:L,color:T,borderDash:j,borderDashOffset:Y,tickWidth:U,tickColor:J,tickBorderDash:re,tickBorderDashOffset:ue}))}return this._ticksLength=f,this._borderValue=$,p}_computeLabelItems(e){const n=this.axis,o=this.options,{position:i,ticks:r}=o,l=this.isHorizontal(),a=this.ticks,{align:d,crossAlign:c,padding:u,mirror:f}=r,h=Cn(o.grid),p=h+u,m=f?-u:p,g=-Re(this.labelRotation),b=[];let y,$,k,v,x,B,M,N,F,P,w,_,E="middle";if(i==="top")B=this.bottom-m,M=this._getXAxisLabelAlignment();else if(i==="bottom")B=this.top+m,M=this._getXAxisLabelAlignment();else if(i==="left"){const D=this._getYAxisLabelAlignment(h);M=D.textAlign,x=D.x}else if(i==="right"){const D=this._getYAxisLabelAlignment(h);M=D.textAlign,x=D.x}else if(n==="x"){if(i==="center")B=(e.top+e.bottom)/2+p;else if(G(i)){const D=Object.keys(i)[0],C=i[D];B=this.chart.scales[D].getPixelForValue(C)+p}M=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")x=(e.left+e.right)/2-p;else if(G(i)){const D=Object.keys(i)[0],C=i[D];x=this.chart.scales[D].getPixelForValue(C)}M=this._getYAxisLabelAlignment(h).textAlign}n==="y"&&(d==="start"?E="top":d==="end"&&(E="bottom"));const S=this._getLabelSizes();for(y=0,$=a.length;y<$;++y){k=a[y],v=k.label;const D=r.setContext(this.getContext(y));N=this.getPixelForTick(y)+r.labelOffset,F=this._resolveTickFontOptions(y),P=F.lineHeight,w=ne(v)?v.length:1;const C=w/2,V=D.color,A=D.textStrokeColor,L=D.textStrokeWidth;let T=M;l?(x=N,M==="inner"&&(y===$-1?T=this.options.reverse?"left":"right":y===0?T=this.options.reverse?"right":"left":T="center"),i==="top"?c==="near"||g!==0?_=-w*P+P/2:c==="center"?_=-S.highest.height/2-C*P+P:_=-S.highest.height+P/2:c==="near"||g!==0?_=P/2:c==="center"?_=S.highest.height/2-C*P:_=S.highest.height-w*P,f&&(_*=-1),g!==0&&!D.showLabelBackdrop&&(x+=P/2*Math.sin(g))):(B=N,_=(1-w)*P/2);let j;if(D.showLabelBackdrop){const Y=be(D.backdropPadding),U=S.heights[y],J=S.widths[y];let re=_-Y.top,ue=0-Y.left;switch(E){case"middle":re-=U/2;break;case"bottom":re-=U;break}switch(M){case"center":ue-=J/2;break;case"right":ue-=J;break;case"inner":y===$-1?ue-=J:y>0&&(ue-=J/2);break}j={left:ue,top:re,width:J+Y.width,height:U+Y.height,color:D.backdropColor}}b.push({label:v,font:F,textOffset:_,options:{rotation:g,color:V,strokeColor:A,strokeWidth:L,textAlign:T,textBaseline:E,translation:[x,B],backdrop:j}})}return b}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-Re(this.labelRotation))return e==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:o,mirror:i,padding:r}}=this.options,l=this._getLabelSizes(),a=e+r,d=l.widest.width;let c,u;return n==="left"?i?(u=this.right+r,o==="near"?c="left":o==="center"?(c="center",u+=d/2):(c="right",u+=d)):(u=this.right-a,o==="near"?c="right":o==="center"?(c="center",u-=d/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+r,o==="near"?c="right":o==="center"?(c="center",u-=d/2):(c="left",u-=d)):(u=this.left+a,o==="near"?c="left":o==="center"?(c="center",u+=d/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:o,top:i,width:r,height:l}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(o,i,r,l),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(r=>r.value===e);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const n=this.options.grid,o=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let r,l;const a=(d,c,u)=>{!u.width||!u.color||(o.save(),o.lineWidth=u.width,o.strokeStyle=u.color,o.setLineDash(u.borderDash||[]),o.lineDashOffset=u.borderDashOffset,o.beginPath(),o.moveTo(d.x,d.y),o.lineTo(c.x,c.y),o.stroke(),o.restore())};if(n.display)for(r=0,l=i.length;r<l;++r){const d=i[r];n.drawOnChartArea&&a({x:d.x1,y:d.y1},{x:d.x2,y:d.y2},d),n.drawTicks&&a({x:d.tx1,y:d.ty1},{x:d.tx2,y:d.ty2},{color:d.tickColor,width:d.tickWidth,borderDash:d.tickBorderDash,borderDashOffset:d.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:o,grid:i}}=this,r=o.setContext(this.getContext()),l=o.display?r.width:0;if(!l)return;const a=i.setContext(this.getContext(0)).lineWidth,d=this._borderValue;let c,u,f,h;this.isHorizontal()?(c=vt(e,this.left,l)-l/2,u=vt(e,this.right,a)+a/2,f=h=d):(f=vt(e,this.top,l)-l/2,h=vt(e,this.bottom,a)+a/2,c=u=d),n.save(),n.lineWidth=r.width,n.strokeStyle=r.color,n.beginPath(),n.moveTo(c,f),n.lineTo(u,h),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const o=this.ctx,i=this._computeLabelArea();i&&so(o,i);const r=this.getLabelItems(e);for(const l of r){const a=l.options,d=l.font,c=l.label,u=l.textOffset;Dt(o,c,0,u,d,a)}i&&ro(o)}drawTitle(){const{ctx:e,options:{position:n,title:o,reverse:i}}=this;if(!o.display)return;const r=fe(o.font),l=be(o.padding),a=o.align;let d=r.lineHeight/2;n==="bottom"||n==="center"||G(n)?(d+=l.bottom,ne(o.text)&&(d+=r.lineHeight*(o.text.length-1))):d+=l.top;const{titleX:c,titleY:u,maxWidth:f,rotation:h}=Xp(this,d,n,a);Dt(e,o.text,0,0,r,{color:o.color,maxWidth:f,rotation:h,textAlign:qp(a,n,i),textBaseline:"middle",translation:[c,u]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,o=W(e.grid&&e.grid.z,-1),i=W(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Ft.prototype.draw?[{z:n,draw:r=>{this.draw(r)}}]:[{z:o,draw:r=>{this.drawBackground(),this.drawGrid(r),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:r=>{this.drawLabels(r)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",i=[];let r,l;for(r=0,l=n.length;r<l;++r){const a=n[r];a[o]===this.id&&(!e||a.type===e)&&i.push(a)}return i}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return fe(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class wo{constructor(e,n,o){this.type=e,this.scope=n,this.override=o,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let o;Jp(n)&&(o=this.register(n));const i=this.items,r=e.id,l=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+e);return r in i||(i[r]=e,Kp(e,l,o),this.override&&de.override(e.id,e.overrides)),l}get(e){return this.items[e]}unregister(e){const n=this.items,o=e.id,i=this.scope;o in n&&delete n[o],i&&o in de[i]&&(delete de[i][o],this.override&&delete St[o])}}function Kp(t,e,n){const o=rn(Object.create(null),[n?de.get(n):{},de.get(e),t.defaults]);de.set(e,o),t.defaultRoutes&&Zp(e,t.defaultRoutes),t.descriptors&&de.describe(e,t.descriptors)}function Zp(t,e){Object.keys(e).forEach(n=>{const o=n.split("."),i=o.pop(),r=[t].concat(o).join("."),l=e[n].split("."),a=l.pop(),d=l.join(".");de.route(r,i,d,a)})}function Jp(t){return"id"in t&&"defaults"in t}class Qp{constructor(){this.controllers=new wo(Ae,"datasets",!0),this.elements=new wo(tt,"elements"),this.plugins=new wo(Object,"plugins"),this.scales=new wo(Ft,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,o){[...n].forEach(i=>{const r=o||this._getRegistryForType(i);o||r.isForType(i)||r===this.plugins&&i.id?this._exec(e,r,i):Q(i,l=>{const a=o||this._getRegistryForType(l);this._exec(e,a,l)})})}_exec(e,n,o){const i=xi(e);te(o["before"+i],[],o),n[e](o),te(o["after"+i],[],o)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const o=this._typedRegistries[n];if(o.isForType(e))return o}return this.plugins}_get(e,n,o){const i=n.get(e);if(i===void 0)throw new Error('"'+e+'" is not a registered '+o+".");return i}}var We=new Qp;class em{constructor(){this._init=[]}notify(e,n,o,i){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const r=i?this._descriptors(e).filter(i):this._descriptors(e),l=this._notify(r,e,n,o);return n==="afterDestroy"&&(this._notify(r,e,"stop"),this._notify(this._init,e,"uninstall")),l}_notify(e,n,o,i){i=i||{};for(const r of e){const l=r.plugin,a=l[o],d=[n,i,r.options];if(te(a,d,l)===!1&&i.cancelable)return!1}return!0}invalidate(){q(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const o=e&&e.config,i=W(o.options&&o.options.plugins,{}),r=tm(o);return i===!1&&!n?[]:om(e,r,i,n)}_notifyStateChanges(e){const n=this._oldCache||[],o=this._cache,i=(r,l)=>r.filter(a=>!l.some(d=>a.plugin.id===d.plugin.id));this._notify(i(n,o),e,"stop"),this._notify(i(o,n),e,"start")}}function tm(t){const e={},n=[],o=Object.keys(We.plugins.items);for(let r=0;r<o.length;r++)n.push(We.getPlugin(o[r]));const i=t.plugins||[];for(let r=0;r<i.length;r++){const l=i[r];n.indexOf(l)===-1&&(n.push(l),e[l.id]=!0)}return{plugins:n,localIds:e}}function nm(t,e){return!e&&t===!1?null:t===!0?{}:t}function om(t,{plugins:e,localIds:n},o,i){const r=[],l=t.getContext();for(const a of e){const d=a.id,c=nm(o[d],i);c!==null&&r.push({plugin:a,options:im(t.config,{plugin:a,local:n[d]},c,l)})}return r}function im(t,{plugin:e,local:n},o,i){const r=t.pluginScopeKeys(e),l=t.getOptionScopes(o,r);return n&&e.defaults&&l.push(e.defaults),t.createResolver(l,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Ui(t,e){const n=de.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function sm(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function rm(t,e){return t===e?"_index_":"_value_"}function ql(t){if(t==="x"||t==="y"||t==="r")return t}function lm(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function Gi(t,...e){if(ql(t))return t;for(const n of e){const o=n.axis||lm(n.position)||t.length>1&&ql(t[0].toLowerCase());if(o)return o}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Xl(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function am(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(o=>o.xAxisID===t||o.yAxisID===t);if(n.length)return Xl(t,"x",n[0])||Xl(t,"y",n[0])}return{}}function dm(t,e){const n=St[t.type]||{scales:{}},o=e.scales||{},i=Ui(t.type,e),r=Object.create(null);return Object.keys(o).forEach(l=>{const a=o[l];if(!G(a))return console.error(`Invalid scale configuration for scale: ${l}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${l}`);const d=Gi(l,a,am(l,t),de.scales[a.type]),c=rm(d,i),u=n.scales||{};r[l]=ln(Object.create(null),[{axis:d},a,u[d],u[c]])}),t.data.datasets.forEach(l=>{const a=l.type||t.type,d=l.indexAxis||Ui(a,e),u=(St[a]||{}).scales||{};Object.keys(u).forEach(f=>{const h=sm(f,d),p=l[h+"AxisID"]||h;r[p]=r[p]||Object.create(null),ln(r[p],[{axis:h},o[p],u[f]])})}),Object.keys(r).forEach(l=>{const a=r[l];ln(a,[de.scales[a.type],de.scale])}),r}function Kl(t){const e=t.options||(t.options={});e.plugins=W(e.plugins,{}),e.scales=dm(t,e)}function Zl(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function cm(t){return t=t||{},t.data=Zl(t.data),Kl(t),t}const Jl=new Map,Ql=new Set;function xo(t,e){let n=Jl.get(t);return n||(n=e(),Jl.set(t,n),Ql.add(n)),n}const kn=(t,e,n)=>{const o=ut(e,n);o!==void 0&&t.add(o)};class um{constructor(e){this._config=cm(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Zl(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Kl(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return xo(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return xo(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return xo(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,o=this.type;return xo(`${o}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const o=this._scopeCache;let i=o.get(e);return(!i||n)&&(i=new Map,o.set(e,i)),i}getOptionScopes(e,n,o){const{options:i,type:r}=this,l=this._cachedScopes(e,o),a=l.get(n);if(a)return a;const d=new Set;n.forEach(u=>{e&&(d.add(e),u.forEach(f=>kn(d,e,f))),u.forEach(f=>kn(d,i,f)),u.forEach(f=>kn(d,St[r]||{},f)),u.forEach(f=>kn(d,de,f)),u.forEach(f=>kn(d,Mi,f))});const c=Array.from(d);return c.length===0&&c.push(Object.create(null)),Ql.has(n)&&l.set(n,c),c}chartOptionScopes(){const{options:e,type:n}=this;return[e,St[n]||{},de.datasets[n]||{},{type:n},de,Mi]}resolveNamedOptions(e,n,o,i=[""]){const r={$shared:!0},{resolver:l,subPrefixes:a}=ea(this._resolverCache,e,i);let d=l;if(hm(l,n)){r.$shared=!1,o=ft(o)?o():o;const c=this.createResolver(e,o,a);d=Ht(l,o,c)}for(const c of n)r[c]=d[c];return r}createResolver(e,n,o=[""],i){const{resolver:r}=ea(this._resolverCache,e,o);return G(n)?Ht(r,n,void 0,i):r}}function ea(t,e,n){let o=t.get(e);o||(o=new Map,t.set(e,o));const i=n.join();let r=o.get(i);return r||(r={resolver:Ni(e,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},o.set(i,r)),r}const fm=t=>G(t)&&Object.getOwnPropertyNames(t).some(e=>ft(t[e]));function hm(t,e){const{isScriptable:n,isIndexable:o}=nl(t);for(const i of e){const r=n(i),l=o(i),a=(l||r)&&t[i];if(r&&(ft(a)||fm(a))||l&&ne(a))return!0}return!1}var pm="4.4.1";const mm=["top","bottom","left","right","chartArea"];function ta(t,e){return t==="top"||t==="bottom"||mm.indexOf(t)===-1&&e==="x"}function na(t,e){return function(n,o){return n[t]===o[t]?n[e]-o[e]:n[t]-o[t]}}function oa(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),te(n&&n.onComplete,[t],e)}function gm(t){const e=t.chart,n=e.options.animation;te(n&&n.onProgress,[t],e)}function ia(t){return Ai()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Co={},sa=t=>{const e=ia(t);return Object.values(Co).filter(n=>n.canvas===e).pop()};function bm(t,e,n){const o=Object.keys(t);for(const i of o){const r=+i;if(r>=e){const l=t[i];delete t[i],(n>0||r>e)&&(t[r+n]=l)}}}function ym(t,e,n,o){return!n||t.type==="mouseout"?null:o?e:t}function ko(t,e,n){return t.options.clip?t[n]:e[n]}function $m(t,e){const{xScale:n,yScale:o}=t;return n&&o?{left:ko(n,e,"left"),right:ko(n,e,"right"),top:ko(o,e,"top"),bottom:ko(o,e,"bottom")}:e}class Oe{static register(...e){We.add(...e),ra()}static unregister(...e){We.remove(...e),ra()}constructor(e,n){const o=this.config=new um(n),i=ia(e),r=sa(i);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const l=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||Ap(i)),this.platform.updateConfig(o);const a=this.platform.acquireContext(i,l.aspectRatio),d=a&&a.canvas,c=d&&d.height,u=d&&d.width;if(this.id=wf(),this.ctx=a,this.canvas=d,this.width=u,this.height=c,this._options=l,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new em,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Of(f=>this.update(f),l.resizeDelay||0),this._dataChanges=[],Co[this.id]=this,!a||!d){console.error("Failed to create chart: can't acquire context from the given item");return}et.listen(this,"complete",oa),et.listen(this,"progress",gm),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:o,height:i,_aspectRatio:r}=this;return q(e)?n&&r?r:i?o/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return We}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():cl(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Qr(this.canvas,this.ctx),this}stop(){return et.stop(this),this}resize(e,n){et.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const o=this.options,i=this.canvas,r=o.maintainAspectRatio&&this.aspectRatio,l=this.platform.getMaximumSize(i,e,n,r),a=o.devicePixelRatio||this.platform.getDevicePixelRatio(),d=this.width?"resize":"attach";this.width=l.width,this.height=l.height,this._aspectRatio=this.aspectRatio,cl(this,a,!0)&&(this.notifyPlugins("resize",{size:l}),te(o.onResize,[this,l],this),this.attached&&this._doResize(d)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Q(n,(o,i)=>{o.id=i})}buildOrUpdateScales(){const e=this.options,n=e.scales,o=this.scales,i=Object.keys(o).reduce((l,a)=>(l[a]=!1,l),{});let r=[];n&&(r=r.concat(Object.keys(n).map(l=>{const a=n[l],d=Gi(l,a),c=d==="r",u=d==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Q(r,l=>{const a=l.options,d=a.id,c=Gi(d,a),u=W(a.type,l.dtype);(a.position===void 0||ta(a.position,c)!==ta(l.dposition))&&(a.position=l.dposition),i[d]=!0;let f=null;if(d in o&&o[d].type===u)f=o[d];else{const h=We.getScale(u);f=new h({id:d,type:u,ctx:this.ctx,chart:this}),o[f.id]=f}f.init(a,e)}),Q(i,(l,a)=>{l||delete o[a]}),Q(o,l=>{ye.configure(this,l,l.options),ye.addBox(this,l)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,o=e.length;if(e.sort((i,r)=>i.index-r.index),o>n){for(let i=n;i<o;++i)this._destroyDatasetMeta(i);e.splice(n,o-n)}this._sortedMetasets=e.slice(0).sort(na("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((o,i)=>{n.filter(r=>r===o._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let o,i;for(this._removeUnreferencedMetasets(),o=0,i=n.length;o<i;o++){const r=n[o];let l=this.getDatasetMeta(o);const a=r.type||this.config.type;if(l.type&&l.type!==a&&(this._destroyDatasetMeta(o),l=this.getDatasetMeta(o)),l.type=a,l.indexAxis=r.indexAxis||Ui(a,this.options),l.order=r.order||0,l.index=o,l.label=""+r.label,l.visible=this.isDatasetVisible(o),l.controller)l.controller.updateIndex(o),l.controller.linkScales();else{const d=We.getController(a),{datasetElementType:c,dataElementType:u}=de.datasets[a];Object.assign(d,{dataElementType:We.getElement(u),datasetElementType:c&&We.getElement(c)}),l.controller=new d(this,o),e.push(l.controller)}}return this._updateMetasets(),e}_resetElements(){Q(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const o=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!o.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let l=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:f}=this.getDatasetMeta(c),h=!i&&r.indexOf(f)===-1;f.buildOrUpdateElements(h),l=Math.max(+f.getMaxOverflow(),l)}l=this._minPadding=o.layout.autoPadding?l:0,this._updateLayout(l),i||Q(r,c=>{c.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(na("z","_idx"));const{_active:a,_lastEvent:d}=this;d?this._eventHandler(d,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Q(this.scales,e=>{ye.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),o=new Set(e.events);(!Rr(n,o)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:o,start:i,count:r}of n){const l=o==="_removeElements"?-r:r;bm(e,i,l)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,o=r=>new Set(e.filter(l=>l[0]===r).map((l,a)=>a+","+l.splice(1).join(","))),i=o(0);for(let r=1;r<n;r++)if(!Rr(i,o(r)))return;return Array.from(i).map(r=>r.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ye.update(this,this.width,this.height,e);const n=this.chartArea,o=n.width<=0||n.height<=0;this._layers=[],Q(this.boxes,i=>{o&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,r)=>{i._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,o=this.data.datasets.length;n<o;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,o=this.data.datasets.length;n<o;++n)this._updateDataset(n,ft(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const o=this.getDatasetMeta(e),i={meta:o,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(o.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(et.has(this)?this.attached&&!et.running(this)&&et.start(this):(this.draw(),oa({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:o,height:i}=this._resizeBeforeDraw;this._resize(o,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,o=[];let i,r;for(i=0,r=n.length;i<r;++i){const l=n[i];(!e||l.visible)&&o.push(l)}return o}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,o=e._clip,i=!o.disabled,r=$m(e,this.chartArea),l={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",l)!==!1&&(i&&so(n,{left:o.left===!1?0:r.left-o.left,right:o.right===!1?this.width:r.right+o.right,top:o.top===!1?0:r.top-o.top,bottom:o.bottom===!1?this.height:r.bottom+o.bottom}),e.controller.draw(),i&&ro(n),l.cancelable=!1,this.notifyPlugins("afterDatasetDraw",l))}isPointInArea(e){return Qe(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,o,i){const r=mp.modes[n];return typeof r=="function"?r(this,e,o,i):[]}getDatasetMeta(e){const n=this.data.datasets[e],o=this._metasets;let i=o.filter(r=>r&&r._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},o.push(i)),i}getContext(){return this.$context||(this.$context=pt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const o=this.getDatasetMeta(e);return typeof o.hidden=="boolean"?!o.hidden:!n.hidden}setDatasetVisibility(e,n){const o=this.getDatasetMeta(e);o.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,o){const i=o?"show":"hide",r=this.getDatasetMeta(e),l=r.controller._resolveAnimations(void 0,i);an(n)?(r.data[n].hidden=!o,this.update()):(this.setDatasetVisibility(e,o),l.update(r,{visible:o}),this.update(a=>a.datasetIndex===e?i:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),et.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),Qr(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Co[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,o=(r,l)=>{n.addEventListener(this,r,l),e[r]=l},i=(r,l,a)=>{r.offsetX=l,r.offsetY=a,this._eventHandler(r)};Q(this.options.events,r=>o(r,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,o=(d,c)=>{n.addEventListener(this,d,c),e[d]=c},i=(d,c)=>{e[d]&&(n.removeEventListener(this,d,c),delete e[d])},r=(d,c)=>{this.canvas&&this.resize(d,c)};let l;const a=()=>{i("attach",a),this.attached=!0,this.resize(),o("resize",r),o("detach",l)};l=()=>{this.attached=!1,i("resize",r),this._stop(),this._resize(0,0),o("attach",a)},n.isAttached(this.canvas)?a():l()}unbindEvents(){Q(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},Q(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,o){const i=o?"set":"remove";let r,l,a,d;for(n==="dataset"&&(r=this.getDatasetMeta(e[0].datasetIndex),r.controller["_"+i+"DatasetHoverStyle"]()),a=0,d=e.length;a<d;++a){l=e[a];const c=l&&this.getDatasetMeta(l.datasetIndex).controller;c&&c[i+"HoverStyle"](l.element,l.datasetIndex,l.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],o=e.map(({datasetIndex:r,index:l})=>{const a=this.getDatasetMeta(r);if(!a)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:a.data[l],index:l}});!Qn(o,n)&&(this._active=o,this._lastEvent=null,this._updateHoverStyles(o,n))}notifyPlugins(e,n,o){return this._plugins.notify(this,e,n,o)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,o){const i=this.options.hover,r=(d,c)=>d.filter(u=>!c.some(f=>u.datasetIndex===f.datasetIndex&&u.index===f.index)),l=r(n,e),a=o?e:r(e,n);l.length&&this.updateHoverStyle(l,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(e,n){const o={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},i=l=>(l.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",o,i)===!1)return;const r=this._handleEvent(e,n,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,i),(r||o.changed)&&this.render(),this}_handleEvent(e,n,o){const{_active:i=[],options:r}=this,l=n,a=this._getActiveElements(e,i,o,l),d=Df(e),c=ym(e,this._lastEvent,o,d);o&&(this._lastEvent=null,te(r.onHover,[e,a,this],this),d&&te(r.onClick,[e,a,this],this));const u=!Qn(a,i);return(u||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=c,u}_getActiveElements(e,n,o,i){if(e.type==="mouseout")return[];if(!o)return n;const r=this.options.hover;return this.getElementsAtEventForMode(e,r.mode,r,i)}}I(Oe,"defaults",de),I(Oe,"instances",Co),I(Oe,"overrides",St),I(Oe,"registry",We),I(Oe,"version",pm),I(Oe,"getChart",sa);function ra(){return Q(Oe.instances,t=>t._plugins.invalidate())}function _m(t,e,n){const{startAngle:o,pixelMargin:i,x:r,y:l,outerRadius:a,innerRadius:d}=e;let c=i/a;t.beginPath(),t.arc(r,l,a,o-c,n+c),d>i?(c=i/d,t.arc(r,l,d,n+c,o-c,!0)):t.arc(r,l,i,n+ce,o-ce),t.closePath(),t.clip()}function wm(t){return Pi(t,["outerStart","outerEnd","innerStart","innerEnd"])}function xm(t,e,n,o){const i=wm(t.options.borderRadius),r=(n-e)/2,l=Math.min(r,o*e/2),a=d=>{const c=(n-Math.min(r,d))*o/2;return pe(d,0,Math.min(r,c))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:pe(i.innerStart,0,l),innerEnd:pe(i.innerEnd,0,l)}}function Yt(t,e,n,o){return{x:n+t*Math.cos(e),y:o+t*Math.sin(e)}}function So(t,e,n,o,i,r){const{x:l,y:a,startAngle:d,pixelMargin:c,innerRadius:u}=e,f=Math.max(e.outerRadius+o+n-c,0),h=u>0?u+o+n+c:0;let p=0;const m=i-d;if(o){const D=u>0?u-o:0,C=f>0?f-o:0,V=(D+C)/2,A=V!==0?m*V/(V+o):m;p=(m-A)/2}const g=Math.max(.001,m*f-n/oe)/f,b=(m-g)/2,y=d+b+p,$=i-b-p,{outerStart:k,outerEnd:v,innerStart:x,innerEnd:B}=xm(e,h,f,$-y),M=f-k,N=f-v,F=y+k/M,P=$-v/N,w=h+x,_=h+B,E=y+x/w,S=$-B/_;if(t.beginPath(),r){const D=(F+P)/2;if(t.arc(l,a,f,F,D),t.arc(l,a,f,D,P),v>0){const L=Yt(N,P,l,a);t.arc(L.x,L.y,v,P,$+ce)}const C=Yt(_,$,l,a);if(t.lineTo(C.x,C.y),B>0){const L=Yt(_,S,l,a);t.arc(L.x,L.y,B,$+ce,S+Math.PI)}const V=($-B/h+(y+x/h))/2;if(t.arc(l,a,h,$-B/h,V,!0),t.arc(l,a,h,V,y+x/h,!0),x>0){const L=Yt(w,E,l,a);t.arc(L.x,L.y,x,E+Math.PI,y-ce)}const A=Yt(M,y,l,a);if(t.lineTo(A.x,A.y),k>0){const L=Yt(M,F,l,a);t.arc(L.x,L.y,k,y-ce,F)}}else{t.moveTo(l,a);const D=Math.cos(F)*f+l,C=Math.sin(F)*f+a;t.lineTo(D,C);const V=Math.cos(P)*f+l,A=Math.sin(P)*f+a;t.lineTo(V,A)}t.closePath()}function Cm(t,e,n,o,i){const{fullCircles:r,startAngle:l,circumference:a}=e;let d=e.endAngle;if(r){So(t,e,n,o,d,i);for(let c=0;c<r;++c)t.fill();isNaN(a)||(d=l+(a%ie||ie))}return So(t,e,n,o,d,i),t.fill(),d}function km(t,e,n,o,i){const{fullCircles:r,startAngle:l,circumference:a,options:d}=e,{borderWidth:c,borderJoinStyle:u,borderDash:f,borderDashOffset:h}=d,p=d.borderAlign==="inner";if(!c)return;t.setLineDash(f||[]),t.lineDashOffset=h,p?(t.lineWidth=c*2,t.lineJoin=u||"round"):(t.lineWidth=c,t.lineJoin=u||"bevel");let m=e.endAngle;if(r){So(t,e,n,o,m,i);for(let g=0;g<r;++g)t.stroke();isNaN(a)||(m=l+(a%ie||ie))}p&&_m(t,e,m),r||(So(t,e,n,o,m,i),t.stroke())}class Sn extends tt{constructor(n){super();I(this,"circumference");I(this,"endAngle");I(this,"fullCircles");I(this,"innerRadius");I(this,"outerRadius");I(this,"pixelMargin");I(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,o,i){const r=this.getProps(["x","y"],i),{angle:l,distance:a}=Lr(r,{x:n,y:o}),{startAngle:d,endAngle:c,innerRadius:u,outerRadius:f,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),p=(this.options.spacing+this.options.borderWidth)/2,g=W(h,c-d)>=ie||cn(l,d,c),b=Ze(a,u+p,f+p);return g&&b}getCenterPoint(n){const{x:o,y:i,startAngle:r,endAngle:l,innerRadius:a,outerRadius:d}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:u}=this.options,f=(r+l)/2,h=(a+d+u+c)/2;return{x:o+Math.cos(f)*h,y:i+Math.sin(f)*h}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:o,circumference:i}=this,r=(o.offset||0)/4,l=(o.spacing||0)/2,a=o.circular;if(this.pixelMargin=o.borderAlign==="inner"?.33:0,this.fullCircles=i>ie?Math.floor(i/ie):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const d=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(d)*r,Math.sin(d)*r);const c=1-Math.sin(Math.min(oe,i||0)),u=r*c;n.fillStyle=o.backgroundColor,n.strokeStyle=o.borderColor,Cm(n,this,u,l,a),km(n,this,u,l,a),n.restore()}}I(Sn,"id","arc"),I(Sn,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),I(Sn,"defaultRoutes",{backgroundColor:"backgroundColor"}),I(Sn,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function la(t,e,n=e){t.lineCap=W(n.borderCapStyle,e.borderCapStyle),t.setLineDash(W(n.borderDash,e.borderDash)),t.lineDashOffset=W(n.borderDashOffset,e.borderDashOffset),t.lineJoin=W(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=W(n.borderWidth,e.borderWidth),t.strokeStyle=W(n.borderColor,e.borderColor)}function Sm(t,e,n){t.lineTo(n.x,n.y)}function vm(t){return t.stepped?Xf:t.tension||t.cubicInterpolationMode==="monotone"?Kf:Sm}function aa(t,e,n={}){const o=t.length,{start:i=0,end:r=o-1}=n,{start:l,end:a}=e,d=Math.max(i,l),c=Math.min(r,a),u=i<l&&r<l||i>a&&r>a;return{count:o,start:d,loop:e.loop,ilen:c<d&&!u?o+c-d:c-d}}function Dm(t,e,n,o){const{points:i,options:r}=e,{count:l,start:a,loop:d,ilen:c}=aa(i,n,o),u=vm(r);let{move:f=!0,reverse:h}=o||{},p,m,g;for(p=0;p<=c;++p)m=i[(a+(h?c-p:p))%l],!m.skip&&(f?(t.moveTo(m.x,m.y),f=!1):u(t,g,m,h,r.stepped),g=m);return d&&(m=i[(a+(h?c:0))%l],u(t,g,m,h,r.stepped)),!!d}function Em(t,e,n,o){const i=e.points,{count:r,start:l,ilen:a}=aa(i,n,o),{move:d=!0,reverse:c}=o||{};let u=0,f=0,h,p,m,g,b,y;const $=v=>(l+(c?a-v:v))%r,k=()=>{g!==b&&(t.lineTo(u,b),t.lineTo(u,g),t.lineTo(u,y))};for(d&&(p=i[$(0)],t.moveTo(p.x,p.y)),h=0;h<=a;++h){if(p=i[$(h)],p.skip)continue;const v=p.x,x=p.y,B=v|0;B===m?(x<g?g=x:x>b&&(b=x),u=(f*u+v)/++f):(k(),t.lineTo(v,x),m=B,f=0,g=b=x),y=x}k()}function qi(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?Em:Dm}function Mm(t){return t.stepped?Eh:t.tension||t.cubicInterpolationMode==="monotone"?Mh:Bt}function Vm(t,e,n,o){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,o)&&i.closePath()),la(t,e.options),t.stroke(i)}function Bm(t,e,n,o){const{segments:i,options:r}=e,l=qi(e);for(const a of i)la(t,r,a.style),t.beginPath(),l(t,e,a,{start:n,end:n+o-1})&&t.closePath(),t.stroke()}const Pm=typeof Path2D=="function";function Nm(t,e,n,o){Pm&&!e.options.segment?Vm(t,e,n,o):Bm(t,e,n,o)}class mt extends tt{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,n){const o=this.options;if((o.tension||o.cubicInterpolationMode==="monotone")&&!o.stepped&&!this._pointsUpdated){const i=o.spanGaps?this._loop:this._fullLoop;_h(this._points,o,e,i,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Rh(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,o=e.length;return o&&n[e[o-1].end]}interpolate(e,n){const o=this.options,i=e[n],r=this.points,l=bl(this,{property:n,start:i,end:i});if(!l.length)return;const a=[],d=Mm(o);let c,u;for(c=0,u=l.length;c<u;++c){const{start:f,end:h}=l[c],p=r[f],m=r[h];if(p===m){a.push(p);continue}const g=Math.abs((i-p[n])/(m[n]-p[n])),b=d(p,m,g,o.stepped);b[n]=e[n],a.push(b)}return a.length===1?a[0]:a}pathSegment(e,n,o){return qi(this)(e,this,n,o)}path(e,n,o){const i=this.segments,r=qi(this);let l=this._loop;n=n||0,o=o||this.points.length-n;for(const a of i)l&=r(e,this,a,{start:n,end:n+o-1});return!!l}draw(e,n,o,i){const r=this.options||{};(this.points||[]).length&&r.borderWidth&&(e.save(),Nm(e,this,o,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}I(mt,"id","line"),I(mt,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),I(mt,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),I(mt,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function da(t,e,n,o){const i=t.options,{[n]:r}=t.getProps([n],o);return Math.abs(e-r)<i.radius+i.hitRadius}class vo extends tt{constructor(n){super();I(this,"parsed");I(this,"skip");I(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,o,i){const r=this.options,{x:l,y:a}=this.getProps(["x","y"],i);return Math.pow(n-l,2)+Math.pow(o-a,2)<Math.pow(r.hitRadius+r.radius,2)}inXRange(n,o){return da(this,n,"x",o)}inYRange(n,o){return da(this,n,"y",o)}getCenterPoint(n){const{x:o,y:i}=this.getProps(["x","y"],n);return{x:o,y:i}}size(n){n=n||this.options||{};let o=n.radius||0;o=Math.max(o,o&&n.hoverRadius||0);const i=o&&n.borderWidth||0;return(o+i)*2}draw(n,o){const i=this.options;this.skip||i.radius<.1||!Qe(this,o,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,Bi(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}I(vo,"id","point"),I(vo,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),I(vo,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function ca(t,e){const{x:n,y:o,base:i,width:r,height:l}=t.getProps(["x","y","base","width","height"],e);let a,d,c,u,f;return t.horizontal?(f=l/2,a=Math.min(n,i),d=Math.max(n,i),c=o-f,u=o+f):(f=r/2,a=n-f,d=n+f,c=Math.min(o,i),u=Math.max(o,i)),{left:a,top:c,right:d,bottom:u}}function gt(t,e,n,o){return t?0:pe(e,n,o)}function Fm(t,e,n){const o=t.options.borderWidth,i=t.borderSkipped,r=tl(o);return{t:gt(i.top,r.top,0,n),r:gt(i.right,r.right,0,e),b:gt(i.bottom,r.bottom,0,n),l:gt(i.left,r.left,0,e)}}function Rm(t,e,n){const{enableBorderRadius:o}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,r=Et(i),l=Math.min(e,n),a=t.borderSkipped,d=o||G(i);return{topLeft:gt(!d||a.top||a.left,r.topLeft,0,l),topRight:gt(!d||a.top||a.right,r.topRight,0,l),bottomLeft:gt(!d||a.bottom||a.left,r.bottomLeft,0,l),bottomRight:gt(!d||a.bottom||a.right,r.bottomRight,0,l)}}function Am(t){const e=ca(t),n=e.right-e.left,o=e.bottom-e.top,i=Fm(t,n/2,o/2),r=Rm(t,n/2,o/2);return{outer:{x:e.left,y:e.top,w:n,h:o,radius:r},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:o-i.t-i.b,radius:{topLeft:Math.max(0,r.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,r.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,r.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,r.bottomRight-Math.max(i.b,i.r))}}}}function Xi(t,e,n,o){const i=e===null,r=n===null,a=t&&!(i&&r)&&ca(t,o);return a&&(i||Ze(e,a.left,a.right))&&(r||Ze(n,a.top,a.bottom))}function Om(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function Im(t,e){t.rect(e.x,e.y,e.w,e.h)}function Ki(t,e,n={}){const o=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,r=(t.x+t.w!==n.x+n.w?e:0)-o,l=(t.y+t.h!==n.y+n.h?e:0)-i;return{x:t.x+o,y:t.y+i,w:t.w+r,h:t.h+l,radius:t.radius}}class Do extends tt{constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:o,backgroundColor:i}}=this,{inner:r,outer:l}=Am(this),a=Om(l.radius)?pn:Im;e.save(),(l.w!==r.w||l.h!==r.h)&&(e.beginPath(),a(e,Ki(l,n,r)),e.clip(),a(e,Ki(r,-n,l)),e.fillStyle=o,e.fill("evenodd")),e.beginPath(),a(e,Ki(r,n)),e.fillStyle=i,e.fill(),e.restore()}inRange(e,n,o){return Xi(this,e,n,o)}inXRange(e,n){return Xi(this,e,null,n)}inYRange(e,n){return Xi(this,null,e,n)}getCenterPoint(e){const{x:n,y:o,base:i,horizontal:r}=this.getProps(["x","y","base","horizontal"],e);return{x:r?(n+i)/2:n,y:r?o:(o+i)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}I(Do,"id","bar"),I(Do,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),I(Do,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var Tm=Object.freeze({__proto__:null,ArcElement:Sn,BarElement:Do,LineElement:mt,PointElement:vo});const Zi=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],ua=Zi.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function fa(t){return Zi[t%Zi.length]}function ha(t){return ua[t%ua.length]}function Lm(t,e){return t.borderColor=fa(e),t.backgroundColor=ha(e),++e}function zm(t,e){return t.backgroundColor=t.data.map(()=>fa(e++)),e}function Hm(t,e){return t.backgroundColor=t.data.map(()=>ha(e++)),e}function jm(t){let e=0;return(n,o)=>{const i=t.getDatasetMeta(o).controller;i instanceof Pt?e=zm(n,e):i instanceof bn?e=Hm(n,e):i&&(e=Lm(n,e))}}function pa(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function Wm(t){return t&&(t.borderColor||t.backgroundColor)}var Ym={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:o},options:i}=t.config,{elements:r}=i;if(!n.forceOverride&&(pa(o)||Wm(i)||r&&pa(r)))return;const l=jm(t);o.forEach(l)}};function Um(t,e,n,o,i){const r=i.samples||o;if(r>=n)return t.slice(e,e+n);const l=[],a=(n-2)/(r-2);let d=0;const c=e+n-1;let u=e,f,h,p,m,g;for(l[d++]=t[u],f=0;f<r-2;f++){let b=0,y=0,$;const k=Math.floor((f+1)*a)+1+e,v=Math.min(Math.floor((f+2)*a)+1,n)+e,x=v-k;for($=k;$<v;$++)b+=t[$].x,y+=t[$].y;b/=x,y/=x;const B=Math.floor(f*a)+1+e,M=Math.min(Math.floor((f+1)*a)+1,n)+e,{x:N,y:F}=t[u];for(p=m=-1,$=B;$<M;$++)m=.5*Math.abs((N-b)*(t[$].y-F)-(N-t[$].x)*(y-F)),m>p&&(p=m,h=t[$],g=$);l[d++]=h,u=g}return l[d++]=t[c],l}function Gm(t,e,n,o){let i=0,r=0,l,a,d,c,u,f,h,p,m,g;const b=[],y=e+n-1,$=t[e].x,v=t[y].x-$;for(l=e;l<e+n;++l){a=t[l],d=(a.x-$)/v*o,c=a.y;const x=d|0;if(x===u)c<m?(m=c,f=l):c>g&&(g=c,h=l),i=(r*i+a.x)/++r;else{const B=l-1;if(!q(f)&&!q(h)){const M=Math.min(f,h),N=Math.max(f,h);M!==p&&M!==B&&b.push({...t[M],x:i}),N!==p&&N!==B&&b.push({...t[N],x:i})}l>0&&B!==p&&b.push(t[B]),b.push(a),u=x,r=0,m=g=c,f=h=p=l}}return b}function ma(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function ga(t){t.data.datasets.forEach(e=>{ma(e)})}function qm(t,e){const n=e.length;let o=0,i;const{iScale:r}=t,{min:l,max:a,minDefined:d,maxDefined:c}=r.getUserBounds();return d&&(o=pe(Je(e,r.axis,l).lo,0,n-1)),c?i=pe(Je(e,r.axis,a).hi+1,o,n)-o:i=n-o,{start:o,count:i}}var Xm={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled){ga(t);return}const o=t.width;t.data.datasets.forEach((i,r)=>{const{_data:l,indexAxis:a}=i,d=t.getDatasetMeta(r),c=l||i.data;if(mn([a,t.options.indexAxis])==="y"||!d.controller.supportsDecimation)return;const u=t.scales[d.xAxisID];if(u.type!=="linear"&&u.type!=="time"||t.options.parsing)return;let{start:f,count:h}=qm(d,c);const p=n.threshold||4*o;if(h<=p){ma(i);return}q(l)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}}));let m;switch(n.algorithm){case"lttb":m=Um(c,f,h,o,n);break;case"min-max":m=Gm(c,f,h,o);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=m})},destroy(t){ga(t)}};function Km(t,e,n){const o=t.segments,i=t.points,r=e.points,l=[];for(const a of o){let{start:d,end:c}=a;c=Qi(d,c,i);const u=Ji(n,i[d],i[c],a.loop);if(!e.segments){l.push({source:a,target:u,start:i[d],end:i[c]});continue}const f=bl(e,u);for(const h of f){const p=Ji(n,r[h.start],r[h.end],h.loop),m=gl(a,i,p);for(const g of m)l.push({source:g,target:h,start:{[n]:ba(u,p,"start",Math.max)},end:{[n]:ba(u,p,"end",Math.min)}})}}return l}function Ji(t,e,n,o){if(o)return;let i=e[t],r=n[t];return t==="angle"&&(i=De(i),r=De(r)),{property:t,start:i,end:r}}function Zm(t,e){const{x:n=null,y:o=null}=t||{},i=e.points,r=[];return e.segments.forEach(({start:l,end:a})=>{a=Qi(l,a,i);const d=i[l],c=i[a];o!==null?(r.push({x:d.x,y:o}),r.push({x:c.x,y:o})):n!==null&&(r.push({x:n,y:d.y}),r.push({x:n,y:c.y}))}),r}function Qi(t,e,n){for(;e>t;e--){const o=n[e];if(!isNaN(o.x)&&!isNaN(o.y))break}return e}function ba(t,e,n,o){return t&&e?o(t[n],e[n]):t?t[n]:e?e[n]:0}function ya(t,e){let n=[],o=!1;return ne(t)?(o=!0,n=t):n=Zm(t,e),n.length?new mt({points:n,options:{tension:0},_loop:o,_fullLoop:o}):null}function $a(t){return t&&t.fill!==!1}function Jm(t,e,n){let i=t[e].fill;const r=[e];let l;if(!n)return i;for(;i!==!1&&r.indexOf(i)===-1;){if(!ae(i))return i;if(l=t[i],!l)return!1;if(l.visible)return i;r.push(i),i=l.fill}return!1}function Qm(t,e,n){const o=og(t);if(G(o))return isNaN(o.value)?!1:o;let i=parseFloat(o);return ae(i)&&Math.floor(i)===i?eg(o[0],e,i,n):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}function eg(t,e,n,o){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=o?!1:n}function tg(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:G(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function ng(t,e,n){let o;return t==="start"?o=n:t==="end"?o=e.options.reverse?e.min:e.max:G(t)?o=t.value:o=e.getBaseValue(),o}function og(t){const e=t.options,n=e.fill;let o=W(n&&n.target,n);return o===void 0&&(o=!!e.backgroundColor),o===!1||o===null?!1:o===!0?"origin":o}function ig(t){const{scale:e,index:n,line:o}=t,i=[],r=o.segments,l=o.points,a=sg(e,n);a.push(ya({x:null,y:e.bottom},o));for(let d=0;d<r.length;d++){const c=r[d];for(let u=c.start;u<=c.end;u++)rg(i,l[u],a)}return new mt({points:i,options:{}})}function sg(t,e){const n=[],o=t.getMatchingVisibleMetas("line");for(let i=0;i<o.length;i++){const r=o[i];if(r.index===e)break;r.hidden||n.unshift(r.dataset)}return n}function rg(t,e,n){const o=[];for(let i=0;i<n.length;i++){const r=n[i],{first:l,last:a,point:d}=lg(r,e,"x");if(!(!d||l&&a)){if(l)o.unshift(d);else if(t.push(d),!a)break}}t.push(...o)}function lg(t,e,n){const o=t.interpolate(e,n);if(!o)return{};const i=o[n],r=t.segments,l=t.points;let a=!1,d=!1;for(let c=0;c<r.length;c++){const u=r[c],f=l[u.start][n],h=l[u.end][n];if(Ze(i,f,h)){a=i===f,d=i===h;break}}return{first:a,last:d,point:o}}class _a{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,o){const{x:i,y:r,radius:l}=this;return n=n||{start:0,end:ie},e.arc(i,r,l,n.end,n.start,!0),!o.bounds}interpolate(e){const{x:n,y:o,radius:i}=this,r=e.angle;return{x:n+Math.cos(r)*i,y:o+Math.sin(r)*i,angle:r}}}function ag(t){const{chart:e,fill:n,line:o}=t;if(ae(n))return dg(e,n);if(n==="stack")return ig(t);if(n==="shape")return!0;const i=cg(t);return i instanceof _a?i:ya(i,o)}function dg(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function cg(t){return(t.scale||{}).getPointPositionForValue?fg(t):ug(t)}function ug(t){const{scale:e={},fill:n}=t,o=tg(n,e);if(ae(o)){const i=e.isHorizontal();return{x:i?o:null,y:i?null:o}}return null}function fg(t){const{scale:e,fill:n}=t,o=e.options,i=e.getLabels().length,r=o.reverse?e.max:e.min,l=ng(n,e,r),a=[];if(o.grid.circular){const d=e.getPointPositionForValue(0,r);return new _a({x:d.x,y:d.y,radius:e.getDistanceFromCenterForValue(l)})}for(let d=0;d<i;++d)a.push(e.getPointPositionForValue(d,l));return a}function es(t,e,n){const o=ag(e),{line:i,scale:r,axis:l}=e,a=i.options,d=a.fill,c=a.backgroundColor,{above:u=c,below:f=c}=d||{};o&&i.points.length&&(so(t,n),hg(t,{line:i,target:o,above:u,below:f,area:n,scale:r,axis:l}),ro(t))}function hg(t,e){const{line:n,target:o,above:i,below:r,area:l,scale:a}=e,d=n._loop?"angle":e.axis;t.save(),d==="x"&&r!==i&&(wa(t,o,l.top),xa(t,{line:n,target:o,color:i,scale:a,property:d}),t.restore(),t.save(),wa(t,o,l.bottom)),xa(t,{line:n,target:o,color:r,scale:a,property:d}),t.restore()}function wa(t,e,n){const{segments:o,points:i}=e;let r=!0,l=!1;t.beginPath();for(const a of o){const{start:d,end:c}=a,u=i[d],f=i[Qi(d,c,i)];r?(t.moveTo(u.x,u.y),r=!1):(t.lineTo(u.x,n),t.lineTo(u.x,u.y)),l=!!e.pathSegment(t,a,{move:l}),l?t.closePath():t.lineTo(f.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function xa(t,e){const{line:n,target:o,property:i,color:r,scale:l}=e,a=Km(n,o,i);for(const{source:d,target:c,start:u,end:f}of a){const{style:{backgroundColor:h=r}={}}=d,p=o!==!0;t.save(),t.fillStyle=h,pg(t,l,p&&Ji(i,u,f)),t.beginPath();const m=!!n.pathSegment(t,d);let g;if(p){m?t.closePath():Ca(t,o,f,i);const b=!!o.pathSegment(t,c,{move:m,reverse:!0});g=m&&b,g||Ca(t,o,u,i)}t.closePath(),t.fill(g?"evenodd":"nonzero"),t.restore()}}function pg(t,e,n){const{top:o,bottom:i}=e.chart.chartArea,{property:r,start:l,end:a}=n||{};r==="x"&&(t.beginPath(),t.rect(l,o,a-l,i-o),t.clip())}function Ca(t,e,n,o){const i=e.interpolate(n,o);i&&t.lineTo(i.x,i.y)}var mg={id:"filler",afterDatasetsUpdate(t,e,n){const o=(t.data.datasets||[]).length,i=[];let r,l,a,d;for(l=0;l<o;++l)r=t.getDatasetMeta(l),a=r.dataset,d=null,a&&a.options&&a instanceof mt&&(d={visible:t.isDatasetVisible(l),index:l,fill:Qm(a,l,o),chart:t,axis:r.controller.options.indexAxis,scale:r.vScale,line:a}),r.$filler=d,i.push(d);for(l=0;l<o;++l)d=i[l],!(!d||d.fill===!1)&&(d.fill=Jm(i,l,n.propagate))},beforeDraw(t,e,n){const o=n.drawTime==="beforeDraw",i=t.getSortedVisibleDatasetMetas(),r=t.chartArea;for(let l=i.length-1;l>=0;--l){const a=i[l].$filler;a&&(a.line.updateControlPoints(r,a.axis),o&&a.fill&&es(t.ctx,a,r))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const o=t.getSortedVisibleDatasetMetas();for(let i=o.length-1;i>=0;--i){const r=o[i].$filler;$a(r)&&es(t.ctx,r,t.chartArea)}},beforeDatasetDraw(t,e,n){const o=e.meta.$filler;!$a(o)||n.drawTime!=="beforeDatasetDraw"||es(t.ctx,o,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const ka=(t,e)=>{let{boxHeight:n=e,boxWidth:o=e}=t;return t.usePointStyle&&(n=Math.min(n,e),o=t.pointStyleWidth||Math.min(o,e)),{boxWidth:o,boxHeight:n,itemHeight:Math.max(e,n)}},gg=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class Sa extends tt{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n,o){this.maxWidth=e,this.maxHeight=n,this._margins=o,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let n=te(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(o=>e.filter(o,this.chart.data))),e.sort&&(n=n.sort((o,i)=>e.sort(o,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const o=e.labels,i=fe(o.font),r=i.size,l=this._computeTitleHeight(),{boxWidth:a,itemHeight:d}=ka(o,r);let c,u;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(l,r,a,d)+10):(u=this.maxHeight,c=this._fitCols(l,i,a,d)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(u,e.maxHeight||this.maxHeight)}_fitRows(e,n,o,i){const{ctx:r,maxWidth:l,options:{labels:{padding:a}}}=this,d=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+a;let f=e;r.textAlign="left",r.textBaseline="middle";let h=-1,p=-u;return this.legendItems.forEach((m,g)=>{const b=o+n/2+r.measureText(m.text).width;(g===0||c[c.length-1]+b+2*a>l)&&(f+=u,c[c.length-(g>0?0:1)]=0,p+=u,h++),d[g]={left:0,top:p,row:h,width:b,height:i},c[c.length-1]+=b+a}),f}_fitCols(e,n,o,i){const{ctx:r,maxHeight:l,options:{labels:{padding:a}}}=this,d=this.legendHitBoxes=[],c=this.columnSizes=[],u=l-e;let f=a,h=0,p=0,m=0,g=0;return this.legendItems.forEach((b,y)=>{const{itemWidth:$,itemHeight:k}=bg(o,n,r,b,i);y>0&&p+k+2*a>u&&(f+=h+a,c.push({width:h,height:p}),m+=h+a,g++,h=p=0),d[y]={left:m,top:p,col:g,width:$,height:k},h=Math.max(h,$),p+=k+a}),f+=h,c.push({width:h,height:p}),f}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:o,labels:{padding:i},rtl:r}}=this,l=Wt(r,this.left,this.width);if(this.isHorizontal()){let a=0,d=ge(o,this.left+i,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,d=ge(o,this.left+i,this.right-this.lineWidths[a])),c.top+=this.top+e+i,c.left=l.leftForLtr(l.x(d),c.width),d+=c.width+i}else{let a=0,d=ge(o,this.top+e+i,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,d=ge(o,this.top+e+i,this.bottom-this.columnSizes[a].height)),c.top=d,c.left+=this.left+i,c.left=l.leftForLtr(l.x(c.left),c.width),d+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;so(e,this),this._draw(),ro(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:o,ctx:i}=this,{align:r,labels:l}=e,a=de.color,d=Wt(e.rtl,this.left,this.width),c=fe(l.font),{padding:u}=l,f=c.size,h=f/2;let p;this.drawTitle(),i.textAlign=d.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:m,boxHeight:g,itemHeight:b}=ka(l,f),y=function(B,M,N){if(isNaN(m)||m<=0||isNaN(g)||g<0)return;i.save();const F=W(N.lineWidth,1);if(i.fillStyle=W(N.fillStyle,a),i.lineCap=W(N.lineCap,"butt"),i.lineDashOffset=W(N.lineDashOffset,0),i.lineJoin=W(N.lineJoin,"miter"),i.lineWidth=F,i.strokeStyle=W(N.strokeStyle,a),i.setLineDash(W(N.lineDash,[])),l.usePointStyle){const P={radius:g*Math.SQRT2/2,pointStyle:N.pointStyle,rotation:N.rotation,borderWidth:F},w=d.xPlus(B,m/2),_=M+h;el(i,P,w,_,l.pointStyleWidth&&m)}else{const P=M+Math.max((f-g)/2,0),w=d.leftForLtr(B,m),_=Et(N.borderRadius);i.beginPath(),Object.values(_).some(E=>E!==0)?pn(i,{x:w,y:P,w:m,h:g,radius:_}):i.rect(w,P,m,g),i.fill(),F!==0&&i.stroke()}i.restore()},$=function(B,M,N){Dt(i,N.text,B,M+b/2,c,{strikethrough:N.hidden,textAlign:d.textAlign(N.textAlign)})},k=this.isHorizontal(),v=this._computeTitleHeight();k?p={x:ge(r,this.left+u,this.right-o[0]),y:this.top+u+v,line:0}:p={x:this.left+u,y:ge(r,this.top+v+u,this.bottom-n[0].height),line:0},fl(this.ctx,e.textDirection);const x=b+u;this.legendItems.forEach((B,M)=>{i.strokeStyle=B.fontColor,i.fillStyle=B.fontColor;const N=i.measureText(B.text).width,F=d.textAlign(B.textAlign||(B.textAlign=l.textAlign)),P=m+h+N;let w=p.x,_=p.y;d.setWidth(this.width),k?M>0&&w+P+u>this.right&&(_=p.y+=x,p.line++,w=p.x=ge(r,this.left+u,this.right-o[p.line])):M>0&&_+x>this.bottom&&(w=p.x=w+n[p.line].width+u,p.line++,_=p.y=ge(r,this.top+v+u,this.bottom-n[p.line].height));const E=d.x(w);if(y(E,_,B),w=If(F,w+m+h,k?w+P:this.right,e.rtl),$(d.x(w),_,B),k)p.x+=P+u;else if(typeof B.text!="string"){const S=c.lineHeight;p.y+=va(B,S)+u}else p.y+=x}),hl(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,o=fe(n.font),i=be(n.padding);if(!n.display)return;const r=Wt(e.rtl,this.left,this.width),l=this.ctx,a=n.position,d=o.size/2,c=i.top+d;let u,f=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),u=this.top+c,f=ge(e.align,f,this.right-h);else{const m=this.columnSizes.reduce((g,b)=>Math.max(g,b.height),0);u=c+ge(e.align,this.top,this.bottom-m-e.labels.padding-this._computeTitleHeight())}const p=ge(a,f,f+h);l.textAlign=r.textAlign(vi(a)),l.textBaseline="middle",l.strokeStyle=n.color,l.fillStyle=n.color,l.font=o.string,Dt(l,n.text,p,u,o)}_computeTitleHeight(){const e=this.options.title,n=fe(e.font),o=be(e.padding);return e.display?n.lineHeight+o.height:0}_getLegendItemAt(e,n){let o,i,r;if(Ze(e,this.left,this.right)&&Ze(n,this.top,this.bottom)){for(r=this.legendHitBoxes,o=0;o<r.length;++o)if(i=r[o],Ze(e,i.left,i.left+i.width)&&Ze(n,i.top,i.top+i.height))return this.legendItems[o]}return null}handleEvent(e){const n=this.options;if(!_g(e.type,n))return;const o=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const i=this._hoveredItem,r=gg(i,o);i&&!r&&te(n.onLeave,[e,i,this],this),this._hoveredItem=o,o&&!r&&te(n.onHover,[e,o,this],this)}else o&&te(n.onClick,[e,o,this],this)}}function bg(t,e,n,o,i){const r=yg(o,t,e,n),l=$g(i,o,e.lineHeight);return{itemWidth:r,itemHeight:l}}function yg(t,e,n,o){let i=t.text;return i&&typeof i!="string"&&(i=i.reduce((r,l)=>r.length>l.length?r:l)),e+n.size/2+o.measureText(i).width}function $g(t,e,n){let o=t;return typeof e.text!="string"&&(o=va(e,n)),o}function va(t,e){const n=t.text?t.text.length:0;return e*n}function _g(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var wg={id:"legend",_element:Sa,start(t,e,n){const o=t.legend=new Sa({ctx:t.ctx,options:n,chart:t});ye.configure(t,o,n),ye.addBox(t,o)},stop(t){ye.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const o=t.legend;ye.configure(t,o,n),o.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const o=e.datasetIndex,i=n.chart;i.isDatasetVisible(o)?(i.hide(o),e.hidden=!0):(i.show(o),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:o,textAlign:i,color:r,useBorderRadius:l,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map(d=>{const c=d.controller.getStyle(n?0:void 0),u=be(c.borderWidth);return{text:e[d.index].label,fillStyle:c.backgroundColor,fontColor:r,hidden:!d.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:o||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:l&&(a||c.borderRadius),datasetIndex:d.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class ts extends tt{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n){const o=this.options;if(this.left=0,this.top=0,!o.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const i=ne(o.text)?o.text.length:1;this._padding=be(o.padding);const r=i*fe(o.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:o,bottom:i,right:r,options:l}=this,a=l.align;let d=0,c,u,f;return this.isHorizontal()?(u=ge(a,o,r),f=n+e,c=r-o):(l.position==="left"?(u=o+e,f=ge(a,i,n),d=oe*-.5):(u=r-e,f=ge(a,n,i),d=oe*.5),c=i-n),{titleX:u,titleY:f,maxWidth:c,rotation:d}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const o=fe(n.font),r=o.lineHeight/2+this._padding.top,{titleX:l,titleY:a,maxWidth:d,rotation:c}=this._drawArgs(r);Dt(e,n.text,0,0,o,{color:n.color,maxWidth:d,rotation:c,textAlign:vi(n.align),textBaseline:"middle",translation:[l,a]})}}function xg(t,e){const n=new ts({ctx:t.ctx,options:e,chart:t});ye.configure(t,n,e),ye.addBox(t,n),t.titleBlock=n}var Cg={id:"title",_element:ts,start(t,e,n){xg(t,n)},stop(t){const e=t.titleBlock;ye.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const o=t.titleBlock;ye.configure(t,o,n),o.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Eo=new WeakMap;var kg={id:"subtitle",start(t,e,n){const o=new ts({ctx:t.ctx,options:n,chart:t});ye.configure(t,o,n),ye.addBox(t,o),Eo.set(t,o)},stop(t){ye.removeBox(t,Eo.get(t)),Eo.delete(t)},beforeUpdate(t,e,n){const o=Eo.get(t);ye.configure(t,o,n),o.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const vn={average(t){if(!t.length)return!1;let e,n,o=0,i=0,r=0;for(e=0,n=t.length;e<n;++e){const l=t[e].element;if(l&&l.hasValue()){const a=l.tooltipPosition();o+=a.x,i+=a.y,++r}}return{x:o/r,y:i/r}},nearest(t,e){if(!t.length)return!1;let n=e.x,o=e.y,i=Number.POSITIVE_INFINITY,r,l,a;for(r=0,l=t.length;r<l;++r){const d=t[r].element;if(d&&d.hasValue()){const c=d.getCenterPoint(),u=ki(e,c);u<i&&(i=u,a=d)}}if(a){const d=a.tooltipPosition();n=d.x,o=d.y}return{x:n,y:o}}};function Ye(t,e){return e&&(ne(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function nt(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
|
|
25
25
|
`)>-1?t.split(`
|
|
26
|
-
`):t}function Gh(t,e){const{element:n,datasetIndex:o,index:i}=e,s=t.getDatasetMeta(o).controller,{label:r,value:a}=s.getLabelAndValue(i);return{chart:t,label:r,parsed:s.getParsed(i),raw:t.data.datasets[o].data[i],formattedValue:a,dataset:s.getDataset(),dataIndex:i,datasetIndex:o,element:n}}function il(t,e){const n=t.chart.ctx,{body:o,footer:i,title:s}=t,{boxWidth:r,boxHeight:a}=e,c=oe(e.bodyFont),d=oe(e.titleFont),u=oe(e.footerFont),f=s.length,p=i.length,h=o.length,g=ae(e.padding);let m=g.height,b=0,x=o.reduce((S,_)=>S+_.before.length+_.lines.length+_.after.length,0);if(x+=t.beforeBody.length+t.afterBody.length,f&&(m+=f*d.lineHeight+(f-1)*e.titleSpacing+e.titleMarginBottom),x){const S=e.displayColors?Math.max(a,c.lineHeight):c.lineHeight;m+=h*S+(x-h)*c.lineHeight+(x-1)*e.bodySpacing}p&&(m+=e.footerMarginTop+p*u.lineHeight+(p-1)*e.footerSpacing);let y=0;const w=function(S){b=Math.max(b,n.measureText(S).width+y)};return n.save(),n.font=d.string,W(t.title,w),n.font=c.string,W(t.beforeBody.concat(t.afterBody),w),y=e.displayColors?r+2+e.boxPadding:0,W(o,S=>{W(S.before,w),W(S.lines,w),W(S.after,w)}),y=0,n.font=u.string,W(t.footer,w),n.restore(),b+=g.width,{width:b,height:m}}function Uh(t,e){const{y:n,height:o}=e;return n<o/2?"top":n>t.height-o/2?"bottom":"center"}function qh(t,e,n,o){const{x:i,width:s}=o,r=n.caretSize+n.caretPadding;if(t==="left"&&i+s+r>e.width||t==="right"&&i-s-r<0)return!0}function Xh(t,e,n,o){const{x:i,width:s}=n,{width:r,chartArea:{left:a,right:c}}=t;let d="center";return o==="center"?d=i<=(a+c)/2?"left":"right":i<=s/2?d="left":i>=r-s/2&&(d="right"),qh(d,t,e,n)&&(d="center"),d}function sl(t,e,n){const o=n.yAlign||e.yAlign||Uh(t,n);return{xAlign:n.xAlign||e.xAlign||Xh(t,e,n,o),yAlign:o}}function Kh(t,e){let{x:n,width:o}=t;return e==="right"?n-=o:e==="center"&&(n-=o/2),n}function Zh(t,e,n){let{y:o,height:i}=t;return e==="top"?o+=n:e==="bottom"?o-=i+n:o-=i/2,o}function rl(t,e,n,o){const{caretSize:i,caretPadding:s,cornerRadius:r}=t,{xAlign:a,yAlign:c}=n,d=i+s,{topLeft:u,topRight:f,bottomLeft:p,bottomRight:h}=ht(r);let g=Kh(e,a);const m=Zh(e,c,d);return c==="center"?a==="left"?g+=d:a==="right"&&(g-=d):a==="left"?g-=Math.max(u,p)+i:a==="right"&&(g+=Math.max(f,h)+i),{x:se(g,0,o.width-e.width),y:se(m,0,o.height-e.height)}}function Zn(t,e,n){const o=ae(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-o.right:t.x+o.left}function ll(t){return Fe([],ze(t))}function Jh(t,e,n){return Qe(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function al(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const cl={beforeTitle:Pe,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,o=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(o>0&&e.dataIndex<o)return n[e.dataIndex]}return""},afterTitle:Pe,beforeBody:Pe,beforeLabel:Pe,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return H(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Pe,afterBody:Pe,beforeFooter:Pe,footer:Pe,afterFooter:Pe};function he(t,e,n,o){const i=t[e].call(n,o);return typeof i>"u"?cl[e].call(n,o):i}class li extends Le{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,o=this.options.setContext(this.getContext()),i=o.enabled&&n.options.animation&&o.animations,s=new Js(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=Jh(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:o}=n,i=he(o,"beforeTitle",this,e),s=he(o,"title",this,e),r=he(o,"afterTitle",this,e);let a=[];return a=Fe(a,ze(i)),a=Fe(a,ze(s)),a=Fe(a,ze(r)),a}getBeforeBody(e,n){return ll(he(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:o}=n,i=[];return W(e,s=>{const r={before:[],lines:[],after:[]},a=al(o,s);Fe(r.before,ze(he(a,"beforeLabel",this,s))),Fe(r.lines,he(a,"label",this,s)),Fe(r.after,ze(he(a,"afterLabel",this,s))),i.push(r)}),i}getAfterBody(e,n){return ll(he(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:o}=n,i=he(o,"beforeFooter",this,e),s=he(o,"footer",this,e),r=he(o,"afterFooter",this,e);let a=[];return a=Fe(a,ze(i)),a=Fe(a,ze(s)),a=Fe(a,ze(r)),a}_createItems(e){const n=this._active,o=this.chart.data,i=[],s=[],r=[];let a=[],c,d;for(c=0,d=n.length;c<d;++c)a.push(Gh(this.chart,n[c]));return e.filter&&(a=a.filter((u,f,p)=>e.filter(u,f,p,o))),e.itemSort&&(a=a.sort((u,f)=>e.itemSort(u,f,o))),W(a,u=>{const f=al(e.callbacks,u);i.push(he(f,"labelColor",this,u)),s.push(he(f,"labelPointStyle",this,u)),r.push(he(f,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=s,this.labelTextColors=r,this.dataPoints=a,a}update(e,n){const o=this.options.setContext(this.getContext()),i=this._active;let s,r=[];if(!i.length)this.opacity!==0&&(s={opacity:0});else{const a=rn[o.position].call(this,i,this._eventPosition);r=this._createItems(o),this.title=this.getTitle(r,o),this.beforeBody=this.getBeforeBody(r,o),this.body=this.getBody(r,o),this.afterBody=this.getAfterBody(r,o),this.footer=this.getFooter(r,o);const c=this._size=il(this,o),d=Object.assign({},a,c),u=sl(this.chart,o,d),f=rl(o,d,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,s={opacity:1,x:f.x,y:f.y,width:c.width,height:c.height,caretX:a.x,caretY:a.y}}this._tooltipItems=r,this.$context=void 0,s&&this._resolveAnimations().update(this,s),e&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,o,i){const s=this.getCaretPosition(e,o,i);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(e,n,o){const{xAlign:i,yAlign:s}=this,{caretSize:r,cornerRadius:a}=o,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:f}=ht(a),{x:p,y:h}=e,{width:g,height:m}=n;let b,x,y,w,S,_;return s==="center"?(S=h+m/2,i==="left"?(b=p,x=b-r,w=S+r,_=S-r):(b=p+g,x=b+r,w=S-r,_=S+r),y=b):(i==="left"?x=p+Math.max(c,u)+r:i==="right"?x=p+g-Math.max(d,f)-r:x=this.caretX,s==="top"?(w=h,S=w-r,b=x-r,y=x+r):(w=h+m,S=w+r,b=x+r,y=x-r),_=w),{x1:b,x2:x,x3:y,y1:w,y2:S,y3:_}}drawTitle(e,n,o){const i=this.title,s=i.length;let r,a,c;if(s){const d=Rt(o.rtl,this.x,this.width);for(e.x=Zn(this,o.titleAlign,o),n.textAlign=d.textAlign(o.titleAlign),n.textBaseline="middle",r=oe(o.titleFont),a=o.titleSpacing,n.fillStyle=o.titleColor,n.font=r.string,c=0;c<s;++c)n.fillText(i[c],d.x(e.x),e.y+r.lineHeight/2),e.y+=r.lineHeight+a,c+1===s&&(e.y+=o.titleMarginBottom-a)}}_drawColorBox(e,n,o,i,s){const r=this.labelColors[o],a=this.labelPointStyles[o],{boxHeight:c,boxWidth:d}=s,u=oe(s.bodyFont),f=Zn(this,"left",s),p=i.x(f),h=c<u.lineHeight?(u.lineHeight-c)/2:0,g=n.y+h;if(s.usePointStyle){const m={radius:Math.min(d,c)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},b=i.leftForLtr(p,d)+d/2,x=g+c/2;e.strokeStyle=s.multiKeyBackground,e.fillStyle=s.multiKeyBackground,Oo(e,m,b,x),e.strokeStyle=r.borderColor,e.fillStyle=r.backgroundColor,Oo(e,m,b,x)}else{e.lineWidth=z(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,e.strokeStyle=r.borderColor,e.setLineDash(r.borderDash||[]),e.lineDashOffset=r.borderDashOffset||0;const m=i.leftForLtr(p,d),b=i.leftForLtr(i.xPlus(p,1),d-2),x=ht(r.borderRadius);Object.values(x).some(y=>y!==0)?(e.beginPath(),e.fillStyle=s.multiKeyBackground,Ut(e,{x:m,y:g,w:d,h:c,radius:x}),e.fill(),e.stroke(),e.fillStyle=r.backgroundColor,e.beginPath(),Ut(e,{x:b,y:g+1,w:d-2,h:c-2,radius:x}),e.fill()):(e.fillStyle=s.multiKeyBackground,e.fillRect(m,g,d,c),e.strokeRect(m,g,d,c),e.fillStyle=r.backgroundColor,e.fillRect(b,g+1,d-2,c-2))}e.fillStyle=this.labelTextColors[o]}drawBody(e,n,o){const{body:i}=this,{bodySpacing:s,bodyAlign:r,displayColors:a,boxHeight:c,boxWidth:d,boxPadding:u}=o,f=oe(o.bodyFont);let p=f.lineHeight,h=0;const g=Rt(o.rtl,this.x,this.width),m=function(k){n.fillText(k,g.x(e.x+h),e.y+p/2),e.y+=p+s},b=g.textAlign(r);let x,y,w,S,_,C,v;for(n.textAlign=r,n.textBaseline="middle",n.font=f.string,e.x=Zn(this,b,o),n.fillStyle=o.bodyColor,W(this.beforeBody,m),h=a&&b!=="right"?r==="center"?d/2+u:d+2+u:0,S=0,C=i.length;S<C;++S){for(x=i[S],y=this.labelTextColors[S],n.fillStyle=y,W(x.before,m),w=x.lines,a&&w.length&&(this._drawColorBox(n,e,S,g,o),p=Math.max(f.lineHeight,c)),_=0,v=w.length;_<v;++_)m(w[_]),p=f.lineHeight;W(x.after,m)}h=0,p=f.lineHeight,W(this.afterBody,m),e.y-=s}drawFooter(e,n,o){const i=this.footer,s=i.length;let r,a;if(s){const c=Rt(o.rtl,this.x,this.width);for(e.x=Zn(this,o.footerAlign,o),e.y+=o.footerMarginTop,n.textAlign=c.textAlign(o.footerAlign),n.textBaseline="middle",r=oe(o.footerFont),n.fillStyle=o.footerColor,n.font=r.string,a=0;a<s;++a)n.fillText(i[a],c.x(e.x),e.y+r.lineHeight/2),e.y+=r.lineHeight+o.footerSpacing}}drawBackground(e,n,o,i){const{xAlign:s,yAlign:r}=this,{x:a,y:c}=e,{width:d,height:u}=o,{topLeft:f,topRight:p,bottomLeft:h,bottomRight:g}=ht(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(a+f,c),r==="top"&&this.drawCaret(e,n,o,i),n.lineTo(a+d-p,c),n.quadraticCurveTo(a+d,c,a+d,c+p),r==="center"&&s==="right"&&this.drawCaret(e,n,o,i),n.lineTo(a+d,c+u-g),n.quadraticCurveTo(a+d,c+u,a+d-g,c+u),r==="bottom"&&this.drawCaret(e,n,o,i),n.lineTo(a+h,c+u),n.quadraticCurveTo(a,c+u,a,c+u-h),r==="center"&&s==="left"&&this.drawCaret(e,n,o,i),n.lineTo(a,c+f),n.quadraticCurveTo(a,c,a+f,c),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,o=this.$animations,i=o&&o.x,s=o&&o.y;if(i||s){const r=rn[e.position].call(this,this._active,this._eventPosition);if(!r)return;const a=this._size=il(this,e),c=Object.assign({},r,this._size),d=sl(n,e,c),u=rl(e,c,d,n);(i._to!==u.x||s._to!==u.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=a.width,this.height=a.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},s={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const r=ae(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(e.save(),e.globalAlpha=o,this.drawBackground(s,e,i,n),js(e,n.textDirection),s.y+=r.top,this.drawTitle(s,e,n),this.drawBody(s,e,n),this.drawFooter(s,e,n),Ws(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const o=this._active,i=e.map(({datasetIndex:a,index:c})=>{const d=this.chart.getDatasetMeta(a);if(!d)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:d.data[c],index:c}}),s=!Cn(o,i),r=this._positionChanged(i,n);(s||r)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,o=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,s=this._active||[],r=this._getActiveElements(e,s,n,o),a=this._positionChanged(r,e),c=n||!Cn(r,s)||a;return c&&(this._active=r,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),c}_getActiveElements(e,n,o,i){const s=this.options;if(e.type==="mouseout")return[];if(!i)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const r=this.chart.getElementsAtEventForMode(e,s.mode,s,o);return s.reverse&&r.reverse(),r}_positionChanged(e,n){const{caretX:o,caretY:i,options:s}=this,r=rn[s.position].call(this,e,n);return r!==!1&&(o!==r.x||i!==r.y)}}F(li,"positioners",rn);var Qh={id:"tooltip",_element:li,positioners:rn,afterInit(t,e,n){n&&(t.tooltip=new li({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:cl},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},ep=Object.freeze({__proto__:null,Colors:fh,Decimation:mh,Filler:Oh,Legend:Hh,SubTitle:Yh,Title:Wh,Tooltip:Qh});const tp=(t,e,n,o)=>(typeof e=="string"?(n=t.push(e)-1,o.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function np(t,e,n,o){const i=t.indexOf(e);if(i===-1)return tp(t,e,n,o);const s=t.lastIndexOf(e);return i!==s?n:i}const op=(t,e)=>t===null?null:se(Math.round(t),0,e);function dl(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class ai extends _t{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const o=this.getLabels();for(const{index:i,label:s}of n)o[i]===s&&o.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(H(e))return null;const o=this.getLabels();return n=isFinite(n)&&o[n]===e?n:np(o,e,T(n,e),this._addedLabels),op(n,o.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:o,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(o=0),n||(i=this.getLabels().length-1)),this.min=o,this.max=i}buildTicks(){const e=this.min,n=this.max,o=this.options.offset,i=[];let s=this.getLabels();s=e===0&&n===s.length-1?s:s.slice(e,n+1),this._valueRange=Math.max(s.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let r=e;r<=n;r++)i.push({value:r});return i}getLabelForValue(e){return dl.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}F(ai,"id","category"),F(ai,"defaults",{ticks:{callback:dl}});function ip(t,e){const n=[],{bounds:i,step:s,min:r,max:a,precision:c,count:d,maxTicks:u,maxDigits:f,includeBounds:p}=t,h=s||1,g=u-1,{min:m,max:b}=e,x=!H(r),y=!H(a),w=!H(d),S=(b-m)/(f+1);let _=ps((b-m)/g/h)*h,C,v,k,M;if(_<1e-14&&!x&&!y)return[{value:m},{value:b}];M=Math.ceil(b/_)-Math.floor(m/_),M>g&&(_=ps(M*_/g/h)*h),H(c)||(C=Math.pow(10,c),_=Math.ceil(_*C)/C),i==="ticks"?(v=Math.floor(m/_)*_,k=Math.ceil(b/_)*_):(v=m,k=b),x&&y&&s&&Zc((a-r)/s,_/1e3)?(M=Math.round(Math.min((a-r)/_,u)),_=(a-r)/M,v=r,k=a):w?(v=x?r:v,k=y?a:k,M=d-1,_=(k-v)/M):(M=(k-v)/_,Ht(M,Math.round(M),_/1e3)?M=Math.round(M):M=Math.ceil(M));const V=Math.max(ms(_),ms(v));C=Math.pow(10,H(c)?V:c),v=Math.round(v*C)/C,k=Math.round(k*C)/C;let $=0;for(x&&(p&&v!==r?(n.push({value:r}),v<r&&$++,Ht(Math.round((v+$*_)*C)/C,r,ul(r,S,t))&&$++):v<r&&$++);$<M;++$){const O=Math.round((v+$*_)*C)/C;if(y&&O>a)break;n.push({value:O})}return y&&p&&k!==a?n.length&&Ht(n[n.length-1].value,a,ul(a,S,t))?n[n.length-1].value=a:n.push({value:a}):(!y||k===a)&&n.push({value:k}),n}function ul(t,e,{horizontal:n,minRotation:o}){const i=ve(o),s=(n?Math.sin(i):Math.cos(i))||.001,r=.75*e*(""+t).length;return Math.min(e/s,r)}class Jn extends _t{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return H(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:o}=this.getUserBounds();let{min:i,max:s}=this;const r=c=>i=n?i:c,a=c=>s=o?s:c;if(e){const c=Ve(i),d=Ve(s);c<0&&d<0?a(0):c>0&&d>0&&r(0)}if(i===s){let c=s===0?1:Math.abs(s*.05);a(s+c),e||r(i-c)}this.min=i,this.max=s}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:o}=e,i;return o?(i=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let o=this.getTickLimit();o=Math.max(2,o);const i={maxTicks:o,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},s=this._range||this,r=ip(i,s);return e.bounds==="ticks"&&gs(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const e=this.ticks;let n=this.min,o=this.max;if(super.configure(),this.options.offset&&e.length){const i=(o-n)/Math.max(e.length-1,1)/2;n-=i,o+=i}this._startValue=n,this._endValue=o,this._valueRange=o-n}getLabelForValue(e){return Yt(e,this.chart.options.locale,this.options.ticks.format)}}class ci extends Jn{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=ee(e)?e:0,this.max=ee(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,o=ve(this.options.ticks.minRotation),i=(e?Math.sin(o):Math.cos(o))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}F(ci,"id","linear"),F(ci,"defaults",{ticks:{callback:Mn.formatters.numeric}});const ln=t=>Math.floor(Je(t)),xt=(t,e)=>Math.pow(10,ln(t)+e);function fl(t){return t/Math.pow(10,ln(t))===1}function hl(t,e,n){const o=Math.pow(10,n),i=Math.floor(t/o);return Math.ceil(e/o)-i}function sp(t,e){const n=e-t;let o=ln(n);for(;hl(t,e,o)>10;)o++;for(;hl(t,e,o)<10;)o--;return Math.min(o,ln(t))}function rp(t,{min:e,max:n}){e=ye(t.min,e);const o=[],i=ln(e);let s=sp(e,n),r=s<0?Math.pow(10,Math.abs(s)):1;const a=Math.pow(10,s),c=i>s?Math.pow(10,i):0,d=Math.round((e-c)*r)/r,u=Math.floor((e-c)/a/10)*a*10;let f=Math.floor((d-u)/Math.pow(10,s)),p=ye(t.min,Math.round((c+u+f*Math.pow(10,s))*r)/r);for(;p<n;)o.push({value:p,major:fl(p),significand:f}),f>=10?f=f<15?15:20:f++,f>=20&&(s++,f=2,r=s>=0?1:r),p=Math.round((c+u+f*Math.pow(10,s))*r)/r;const h=ye(t.max,p);return o.push({value:h,major:fl(h),significand:f}),o}class di extends _t{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const o=Jn.prototype.parse.apply(this,[e,n]);if(o===0){this._zero=!0;return}return ee(o)&&o>0?o:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=ee(e)?Math.max(0,e):null,this.max=ee(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ee(this._userMin)&&(this.min=e===xt(this.min,0)?xt(this.min,-1):xt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let o=this.min,i=this.max;const s=a=>o=e?o:a,r=a=>i=n?i:a;o===i&&(o<=0?(s(1),r(10)):(s(xt(o,-1)),r(xt(i,1)))),o<=0&&s(xt(i,-1)),i<=0&&r(xt(o,1)),this.min=o,this.max=i}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},o=rp(n,this);return e.bounds==="ticks"&&gs(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}getLabelForValue(e){return e===void 0?"0":Yt(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Je(e),this._valueRange=Je(this.max)-Je(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Je(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}F(di,"id","logarithmic"),F(di,"defaults",{ticks:{callback:Mn.formatters.logarithmic,major:{enabled:!0}}});function ui(t){const e=t.ticks;if(e.display&&t.display){const n=ae(e.backdropPadding);return T(e.font&&e.font.size,te.font.size)+n.height}return 0}function lp(t,e,n){return n=q(n)?n:[n],{w:pd(t,e.string,n),h:n.length*e.lineHeight}}function pl(t,e,n,o,i){return t===o||t===i?{start:e-n/2,end:e+n/2}:t<o||t>i?{start:e-n,end:e}:{start:e,end:e+n}}function ap(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),o=[],i=[],s=t._pointLabels.length,r=t.options.pointLabels,a=r.centerPointLabels?X/s:0;for(let c=0;c<s;c++){const d=r.setContext(t.getPointLabelContext(c));i[c]=d.padding;const u=t.getPointPosition(c,t.drawingArea+i[c],a),f=oe(d.font),p=lp(t.ctx,f,t._pointLabels[c]);o[c]=p;const h=_e(t.getIndexAngle(c)+a),g=Math.round(Do(h)),m=pl(g,u.x,p.w,0,180),b=pl(g,u.y,p.h,90,270);cp(n,e,h,m,b)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=fp(t,o,i)}function cp(t,e,n,o,i){const s=Math.abs(Math.sin(n)),r=Math.abs(Math.cos(n));let a=0,c=0;o.start<e.l?(a=(e.l-o.start)/s,t.l=Math.min(t.l,e.l-a)):o.end>e.r&&(a=(o.end-e.r)/s,t.r=Math.max(t.r,e.r+a)),i.start<e.t?(c=(e.t-i.start)/r,t.t=Math.min(t.t,e.t-c)):i.end>e.b&&(c=(i.end-e.b)/r,t.b=Math.max(t.b,e.b+c))}function dp(t,e,n){const o=t.drawingArea,{extra:i,additionalAngle:s,padding:r,size:a}=n,c=t.getPointPosition(e,o+i+r,s),d=Math.round(Do(_e(c.angle+ne))),u=gp(c.y,a.h,d),f=hp(d),p=pp(c.x,a.w,f);return{visible:!0,x:c.x,y:u,textAlign:f,left:p,top:u,right:p+a.w,bottom:u+a.h}}function up(t,e){if(!e)return!0;const{left:n,top:o,right:i,bottom:s}=t;return!(Ne({x:n,y:o},e)||Ne({x:n,y:s},e)||Ne({x:i,y:o},e)||Ne({x:i,y:s},e))}function fp(t,e,n){const o=[],i=t._pointLabels.length,s=t.options,{centerPointLabels:r,display:a}=s.pointLabels,c={extra:ui(s)/2,additionalAngle:r?X/i:0};let d;for(let u=0;u<i;u++){c.padding=n[u],c.size=e[u];const f=dp(t,u,c);o.push(f),a==="auto"&&(f.visible=up(f,d),f.visible&&(d=f))}return o}function hp(t){return t===0||t===180?"center":t<180?"left":"right"}function pp(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function gp(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function mp(t,e,n){const{left:o,top:i,right:s,bottom:r}=n,{backdropColor:a}=e;if(!H(a)){const c=ht(e.borderRadius),d=ae(e.backdropPadding);t.fillStyle=a;const u=o-d.left,f=i-d.top,p=s-o+d.width,h=r-i+d.height;Object.values(c).some(g=>g!==0)?(t.beginPath(),Ut(t,{x:u,y:f,w:p,h,radius:c}),t.fill()):t.fillRect(u,f,p,h)}}function bp(t,e){const{ctx:n,options:{pointLabels:o}}=t;for(let i=e-1;i>=0;i--){const s=t._pointLabelItems[i];if(!s.visible)continue;const r=o.setContext(t.getPointLabelContext(i));mp(n,r,s);const a=oe(r.font),{x:c,y:d,textAlign:u}=s;ft(n,t._pointLabels[i],c,d+a.lineHeight/2,a,{color:r.color,textAlign:u,textBaseline:"middle"})}}function gl(t,e,n,o){const{ctx:i}=t;if(n)i.arc(t.xCenter,t.yCenter,e,0,K);else{let s=t.getPointPosition(0,e);i.moveTo(s.x,s.y);for(let r=1;r<o;r++)s=t.getPointPosition(r,e),i.lineTo(s.x,s.y)}}function yp(t,e,n,o,i){const s=t.ctx,r=e.circular,{color:a,lineWidth:c}=e;!r&&!o||!a||!c||n<0||(s.save(),s.strokeStyle=a,s.lineWidth=c,s.setLineDash(i.dash),s.lineDashOffset=i.dashOffset,s.beginPath(),gl(t,n,r,o),s.closePath(),s.stroke(),s.restore())}function _p(t,e,n){return Qe(t,{label:n,index:e,type:"pointLabel"})}class an extends Jn{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=ae(ui(this.options)/2),n=this.width=this.maxWidth-e.width,o=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+o/2+e.top),this.drawingArea=Math.floor(Math.min(n,o)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=ee(e)&&!isNaN(e)?e:0,this.max=ee(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/ui(this.options))}generateTickLabels(e){Jn.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,o)=>{const i=G(this.options.pointLabels.callback,[n,o],this);return i||i===0?i:""}).filter((n,o)=>this.chart.getDataVisibility(o))}fit(){const e=this.options;e.display&&e.pointLabels.display?ap(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,o,i){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((o-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,o,i))}getIndexAngle(e){const n=K/(this._pointLabels.length||1),o=this.options.startAngle||0;return _e(e*n+ve(o))}getDistanceFromCenterForValue(e){if(H(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(H(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const o=n[e];return _p(this.getContext(),e,o)}}getPointPosition(e,n,o=0){const i=this.getIndexAngle(e)-ne+o;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:o,right:i,bottom:s}=this._pointLabelItems[e];return{left:n,top:o,right:i,bottom:s}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const o=this.ctx;o.save(),o.beginPath(),gl(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),o.closePath(),o.fillStyle=e,o.fill(),o.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:o,grid:i,border:s}=n,r=this._pointLabels.length;let a,c,d;if(n.pointLabels.display&&bp(this,r),i.display&&this.ticks.forEach((u,f)=>{if(f!==0){c=this.getDistanceFromCenterForValue(u.value);const p=this.getContext(f),h=i.setContext(p),g=s.setContext(p);yp(this,h,c,r,g)}}),o.display){for(e.save(),a=r-1;a>=0;a--){const u=o.setContext(this.getPointLabelContext(a)),{color:f,lineWidth:p}=u;!p||!f||(e.lineWidth=p,e.strokeStyle=f,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,c=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),d=this.getPointPosition(a,c),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(d.x,d.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,o=n.ticks;if(!o.display)return;const i=this.getIndexAngle(0);let s,r;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((a,c)=>{if(c===0&&!n.reverse)return;const d=o.setContext(this.getContext(c)),u=oe(d.font);if(s=this.getDistanceFromCenterForValue(this.ticks[c].value),d.showLabelBackdrop){e.font=u.string,r=e.measureText(a.label).width,e.fillStyle=d.backdropColor;const f=ae(d.backdropPadding);e.fillRect(-r/2-f.left,-s-u.size/2-f.top,r+f.width,u.size+f.height)}ft(e,a.label,0,-s,u,{color:d.color,strokeColor:d.textStrokeColor,strokeWidth:d.textStrokeWidth})}),e.restore()}drawTitle(){}}F(an,"id","radialLinear"),F(an,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Mn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),F(an,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),F(an,"descriptors",{angleLines:{_fallback:"grid"}});const Qn={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},pe=Object.keys(Qn);function ml(t,e){return t-e}function bl(t,e){if(H(e))return null;const n=t._adapter,{parser:o,round:i,isoWeekday:s}=t._parseOpts;let r=e;return typeof o=="function"&&(r=o(r)),ee(r)||(r=typeof o=="string"?n.parse(r,o):n.parse(r)),r===null?null:(i&&(r=i==="week"&&(Et(s)||s===!0)?n.startOf(r,"isoWeek",s):n.startOf(r,i)),+r)}function yl(t,e,n,o){const i=pe.length;for(let s=pe.indexOf(t);s<i-1;++s){const r=Qn[pe[s]],a=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((n-e)/(a*r.size))<=o)return pe[s]}return pe[i-1]}function xp(t,e,n,o,i){for(let s=pe.length-1;s>=pe.indexOf(n);s--){const r=pe[s];if(Qn[r].common&&t._adapter.diff(i,o,r)>=e-1)return r}return pe[n?pe.indexOf(n):0]}function wp(t){for(let e=pe.indexOf(t)+1,n=pe.length;e<n;++e)if(Qn[pe[e]].common)return pe[e]}function _l(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:o,hi:i}=Ro(n,e),s=n[o]>=e?n[o]:n[i];t[s]=!0}}function Cp(t,e,n,o){const i=t._adapter,s=+i.startOf(e[0].value,o),r=e[e.length-1].value;let a,c;for(a=s;a<=r;a=+i.add(a,1,o))c=n[a],c>=0&&(e[c].major=!0);return e}function xl(t,e,n){const o=[],i={},s=e.length;let r,a;for(r=0;r<s;++r)a=e[r],i[a]=r,o.push({value:a,major:!1});return s===0||!n?o:Cp(t,o,i,n)}class cn extends _t{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const o=e.time||(e.time={}),i=this._adapter=new Ru._date(e.adapters.date);i.init(n),Tt(o.displayFormats,i.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:bl(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,o=e.time.unit||"day";let{min:i,max:s,minDefined:r,maxDefined:a}=this.getUserBounds();function c(d){!r&&!isNaN(d.min)&&(i=Math.min(i,d.min)),!a&&!isNaN(d.max)&&(s=Math.max(s,d.max))}(!r||!a)&&(c(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&c(this.getMinMax(!1))),i=ee(i)&&!isNaN(i)?i:+n.startOf(Date.now(),o),s=ee(s)&&!isNaN(s)?s:+n.endOf(Date.now(),o)+1,this.min=Math.min(i,s-1),this.max=Math.max(i+1,s)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],o=e[e.length-1]),{min:n,max:o}}buildTicks(){const e=this.options,n=e.time,o=e.ticks,i=o.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const s=this.min,r=this.max,a=td(i,s,r);return this._unit=n.unit||(o.autoSkip?yl(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):xp(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:wp(this._unit),this.initOffsets(i),e.reverse&&a.reverse(),xl(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,o=0,i,s;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,s=this.getDecimalForValue(e[e.length-1]),e.length===1?o=s:o=(s-this.getDecimalForValue(e[e.length-2]))/2);const r=e.length<3?.5:.25;n=se(n,0,r),o=se(o,0,r),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const e=this._adapter,n=this.min,o=this.max,i=this.options,s=i.time,r=s.unit||yl(s.minUnit,n,o,this._getLabelCapacity(n)),a=T(i.ticks.stepSize,1),c=r==="week"?s.isoWeekday:!1,d=Et(c)||c===!0,u={};let f=n,p,h;if(d&&(f=+e.startOf(f,"isoWeek",c)),f=+e.startOf(f,d?"day":r),e.diff(o,n,r)>1e5*a)throw new Error(n+" and "+o+" are too far apart with stepSize of "+a+" "+r);const g=i.ticks.source==="data"&&this.getDataTimestamps();for(p=f,h=0;p<o;p=+e.add(p,a,r),h++)_l(u,p,g);return(p===o||i.bounds==="ticks"||h===1)&&_l(u,p,g),Object.keys(u).sort(ml).map(m=>+m)}getLabelForValue(e){const n=this._adapter,o=this.options.time;return o.tooltipFormat?n.format(e,o.tooltipFormat):n.format(e,o.displayFormats.datetime)}format(e,n){const i=this.options.time.displayFormats,s=this._unit,r=n||i[s];return this._adapter.format(e,r)}_tickFormatFunction(e,n,o,i){const s=this.options,r=s.ticks.callback;if(r)return G(r,[e,n,o],this);const a=s.time.displayFormats,c=this._unit,d=this._majorUnit,u=c&&a[c],f=d&&a[d],p=o[n],h=d&&f&&p&&p.major;return this._adapter.format(e,i||(h?f:u))}generateTickLabels(e){let n,o,i;for(n=0,o=e.length;n<o;++n)i=e[n],i.label=this._tickFormatFunction(i.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,o=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+o)*n.factor)}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+o*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,o=this.ctx.measureText(e).width,i=ve(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(i),r=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:o*s+a*r,h:o*r+a*s}}_getLabelCapacity(e){const n=this.options.time,o=n.displayFormats,i=o[n.unit]||o.millisecond,s=this._tickFormatFunction(e,0,xl(this,[e],this._majorUnit),i),r=this._getLabelSize(s),a=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return a>0?a:1}getDataTimestamps(){let e=this._cache.data||[],n,o;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,o=i.length;n<o;++n)e=e.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,o;if(e.length)return e;const i=this.getLabels();for(n=0,o=i.length;n<o;++n)e.push(bl(this,i[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return xs(e.sort(ml))}}F(cn,"id","time"),F(cn,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function eo(t,e,n){let o=0,i=t.length-1,s,r,a,c;n?(e>=t[o].pos&&e<=t[i].pos&&({lo:o,hi:i}=Oe(t,"pos",e)),{pos:s,time:a}=t[o],{pos:r,time:c}=t[i]):(e>=t[o].time&&e<=t[i].time&&({lo:o,hi:i}=Oe(t,"time",e)),{time:s,pos:a}=t[o],{time:r,pos:c}=t[i]);const d=r-s;return d?a+(c-a)*(e-s)/d:a}class fi extends cn{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=eo(n,this.min),this._tableRange=eo(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:o}=this,i=[],s=[];let r,a,c,d,u;for(r=0,a=e.length;r<a;++r)d=e[r],d>=n&&d<=o&&i.push(d);if(i.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(r=0,a=i.length;r<a;++r)u=i[r+1],c=i[r-1],d=i[r],Math.round((u+c)/2)!==d&&s.push({time:d,pos:r/(a-1)});return s}_generate(){const e=this.min,n=this.max;let o=super.getDataTimestamps();return(!o.includes(e)||!o.length)&&o.splice(0,0,e),(!o.includes(n)||o.length===1)&&o.push(n),o.sort((i,s)=>i-s)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),o=this.getLabelTimestamps();return n.length&&o.length?e=this.normalize(n.concat(o)):e=n.length?n:o,e=this._cache.all=e,e}getDecimalForValue(e){return(eo(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return eo(this._table,o*this._tableRange+this._minPos,!0)}}F(fi,"id","timeseries"),F(fi,"defaults",cn.defaults);var kp=Object.freeze({__proto__:null,CategoryScale:ai,LinearScale:ci,LogarithmicScale:di,RadialLinearScale:an,TimeScale:cn,TimeSeriesScale:fi});const Sp=[Vu,rh,ep,kp];Te.register(...Sp);const vp={class:"px-24 py-16"},Mp={class:"flex flex-col gap-8"},Ep={class:"fm-color-typo-primary fm-typo-body-lg-400"},Dp={class:"fm-color-typo-secondary fm-typo-body-md-400"},Vp=l.defineComponent({__name:"FmLine",props:{name:{default:void 0},paragraph:{default:void 0},datasets:{},xAxis:{}},setup(t){const e=t,n=l.ref(null);let o=null;l.watch([()=>e.xAxis,()=>e.datasets],()=>{o&&(o.data.datasets=e.datasets,o.data.labels=e.xAxis.categories,o.update())});function i(d,u){const f=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(d);if(f)return`rgba(${parseInt(f[1],16)},${parseInt(f[2],16)},${parseInt(f[3],16)},${u})`;if(d.startsWith("rgb")){const p=d.split(",");if(p.length===3)return[...p.slice(0,2),p[2].replace(")",`,${u})`)].join(",");if(p.length===4)return[...p.slice(0,3),`${u})`].join(",")}return""}function s(d){const u=getComputedStyle(document.documentElement).getPropertyValue(`--${d}`)||d;return u.startsWith("rgb")||u.startsWith("#")?u:null}function r({context:d,color:u}){const{ctx:f,chartArea:p}=d.chart;if(!p)return;const h=f==null?void 0:f.createLinearGradient(0,0,0,p.height);return h.addColorStop(0,i(u,.5)),h.addColorStop(1,i(u,0)),h}const a=l.computed(()=>({labels:e.xAxis.categories,datasets:e.datasets.map(d=>{const u=s(d.color)??"";return{...d,backgroundColor:u?f=>r({context:f,color:u}):"",borderColor:u,borderDash:d.dash?[5,5]:void 0,tension:.1}})}));function c(){n.value&&(o=new Te(n.value,{type:"line",data:a.value,options:{plugins:{legend:{display:!1}},scales:{x:{grid:{display:!1},beginAtZero:!0},y:{grid:{display:!0},beginAtZero:!0}},elements:{line:{borderWidth:1.5},point:{radius:0,hitRadius:30,hoverRadius:6,hoverBackgroundColor:"#FFFFFF",hoverBorderWidth:3}}}}))}return l.onMounted(()=>{c()}),(d,u)=>(l.openBlock(),l.createElementBlock("div",vp,[l.createElementVNode("div",Mp,[l.createElementVNode("div",Ep,l.toDisplayString(d.name),1),l.createElementVNode("div",Dp,l.toDisplayString(d.paragraph),1)]),l.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)]))}});function Rp(){var t;return(t=l.getCurrentInstance())==null?void 0:t.emit}function de(t,e){const n=Rp(),o=l.ref(t[e]);return l.watch(()=>t[e],()=>{o.value=t[e]}),l.computed({get(){return o.value},set(s){o.value=s,n==null||n(`update:${e}`,s)}})}function ge(t,e){return t===null||e===null||typeof t!="object"&&typeof e!="object"?t===e:Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>ge(t[n],e[n]))}const Fp={class:"fm-checkbox"},Bp={class:"fm-checkbox--wrapper"},$p={class:"fm-checkbox__input--container"},Pp=["checked","disabled","indeterminate"],Ap={key:0,class:"fm-checkbox__label-container"},Op={class:"fm-typo-body-lg-400"},Np={key:0,class:"fm-color-typo-secondary fm-typo-body-md-400"},wl=l.defineComponent({__name:"FmCheckbox",props:{modelValue:{type:[Boolean,Array]},label:{},sublabel:{default:""},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},value:{}},emits:["update:modelValue","update:indeterminate"],setup(t){const e=t,n=de(e,"modelValue"),o=de(e,"indeterminate"),i=Array.isArray(n.value),s=l.ref(i?n.value.some(c=>ge(c,e.value)):n.value),r=l.computed(()=>{const c=i?n.value.some(d=>ge(d,e.value)):n.value;return o.value&&!c?"remove":n.value?"check_small":""});function a(){if(e.disabled)return;o.value=!1,s.value=!s.value;let c=n.value;i?c=s.value?c.concat(e.value):c.filter(d=>!ge(d,e.value)):c=s.value,n.value=c}return l.watch(()=>n.value,()=>{s.value=i?n.value.some(c=>ge(c,e.value)):n.value}),(c,d)=>(l.openBlock(),l.createElementBlock("div",Fp,[l.createElementVNode("label",Bp,[l.createElementVNode("div",$p,[l.createElementVNode("input",{class:l.normalizeClass({"fm-checkbox__input--btn":!0,"fm-checkbox__input--btn--checked":s.value}),type:"checkbox",checked:s.value,disabled:e.disabled,indeterminate:l.unref(o),onClick:a},null,10,Pp),l.unref(o)||s.value?(l.openBlock(),l.createBlock(L,{key:0,class:"fm-checkbox__input--checkmark",name:r.value,size:"md",color:"#FFFFFF"},null,8,["name"])):l.createCommentVNode("",!0)]),e.label?(l.openBlock(),l.createElementBlock("div",Ap,[l.renderSlot(c.$slots,"label"),l.createElementVNode("div",Op,l.toDisplayString(e.label),1),e.sublabel?(l.openBlock(),l.createElementBlock("div",Np,l.toDisplayString(e.sublabel),1)):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0)])]))}}),e_="";var Ip=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Lp(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Cl={exports:{}};(function(t,e){(function(n,o){t.exports=o()})(Ip,function(){var n=1e3,o=6e4,i=36e5,s="millisecond",r="second",a="minute",c="hour",d="day",u="week",f="month",p="quarter",h="year",g="date",m="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(P){var D=["th","st","nd","rd"],E=P%100;return"["+P+(D[(E-20)%10]||D[E]||D[0])+"]"}},w=function(P,D,E){var R=String(P);return!R||R.length>=D?P:""+Array(D+1-R.length).join(E)+P},S={s:w,z:function(P){var D=-P.utcOffset(),E=Math.abs(D),R=Math.floor(E/60),B=E%60;return(D<=0?"+":"-")+w(R,2,"0")+":"+w(B,2,"0")},m:function P(D,E){if(D.date()<E.date())return-P(E,D);var R=12*(E.year()-D.year())+(E.month()-D.month()),B=D.clone().add(R,f),A=E-B<0,N=D.clone().add(R+(A?-1:1),f);return+(-(R+(E-B)/(A?B-N:N-B))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M:f,y:h,w:u,d,D:g,h:c,m:a,s:r,ms:s,Q:p}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},_="en",C={};C[_]=y;var v="$isDayjsObject",k=function(P){return P instanceof O||!(!P||!P[v])},M=function P(D,E,R){var B;if(!D)return _;if(typeof D=="string"){var A=D.toLowerCase();C[A]&&(B=A),E&&(C[A]=E,B=A);var N=D.split("-");if(!B&&N.length>1)return P(N[0])}else{var j=D.name;C[j]=D,B=j}return!R&&B&&(_=B),B||!R&&_},V=function(P,D){if(k(P))return P.clone();var E=typeof D=="object"?D:{};return E.date=P,E.args=arguments,new O(E)},$=S;$.l=M,$.i=k,$.w=function(P,D){return V(P,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var O=function(){function P(E){this.$L=M(E.locale,null,!0),this.parse(E),this.$x=this.$x||E.x||{},this[v]=!0}var D=P.prototype;return D.parse=function(E){this.$d=function(R){var B=R.date,A=R.utc;if(B===null)return new Date(NaN);if($.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var N=B.match(b);if(N){var j=N[2]-1||0,Y=(N[7]||"0").substring(0,3);return A?new Date(Date.UTC(N[1],j,N[3]||1,N[4]||0,N[5]||0,N[6]||0,Y)):new Date(N[1],j,N[3]||1,N[4]||0,N[5]||0,N[6]||0,Y)}}return new Date(B)}(E),this.init()},D.init=function(){var E=this.$d;this.$y=E.getFullYear(),this.$M=E.getMonth(),this.$D=E.getDate(),this.$W=E.getDay(),this.$H=E.getHours(),this.$m=E.getMinutes(),this.$s=E.getSeconds(),this.$ms=E.getMilliseconds()},D.$utils=function(){return $},D.isValid=function(){return this.$d.toString()!==m},D.isSame=function(E,R){var B=V(E);return this.startOf(R)<=B&&B<=this.endOf(R)},D.isAfter=function(E,R){return V(E)<this.startOf(R)},D.isBefore=function(E,R){return this.endOf(R)<V(E)},D.$g=function(E,R,B){return $.u(E)?this[R]:this.set(B,E)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(E,R){var B=this,A=!!$.u(R)||R,N=$.p(E),j=function(vt,be){var at=$.w(B.$u?Date.UTC(B.$y,be,vt):new Date(B.$y,be,vt),B);return A?at:at.endOf(d)},Y=function(vt,be){return $.w(B.toDate()[vt].apply(B.toDate("s"),(A?[0,0,0,0]:[23,59,59,999]).slice(be)),B)},Z=this.$W,J=this.$M,re=this.$D,me="set"+(this.$u?"UTC":"");switch(N){case h:return A?j(1,0):j(31,11);case f:return A?j(1,J):j(0,J+1);case u:var St=this.$locale().weekStart||0,gn=(Z<St?Z+7:Z)-St;return j(A?re-gn:re+(6-gn),J);case d:case g:return Y(me+"Hours",0);case c:return Y(me+"Minutes",1);case a:return Y(me+"Seconds",2);case r:return Y(me+"Milliseconds",3);default:return this.clone()}},D.endOf=function(E){return this.startOf(E,!1)},D.$set=function(E,R){var B,A=$.p(E),N="set"+(this.$u?"UTC":""),j=(B={},B[d]=N+"Date",B[g]=N+"Date",B[f]=N+"Month",B[h]=N+"FullYear",B[c]=N+"Hours",B[a]=N+"Minutes",B[r]=N+"Seconds",B[s]=N+"Milliseconds",B)[A],Y=A===d?this.$D+(R-this.$W):R;if(A===f||A===h){var Z=this.clone().set(g,1);Z.$d[j](Y),Z.init(),this.$d=Z.set(g,Math.min(this.$D,Z.daysInMonth())).$d}else j&&this.$d[j](Y);return this.init(),this},D.set=function(E,R){return this.clone().$set(E,R)},D.get=function(E){return this[$.p(E)]()},D.add=function(E,R){var B,A=this;E=Number(E);var N=$.p(R),j=function(J){var re=V(A);return $.w(re.date(re.date()+Math.round(J*E)),A)};if(N===f)return this.set(f,this.$M+E);if(N===h)return this.set(h,this.$y+E);if(N===d)return j(1);if(N===u)return j(7);var Y=(B={},B[a]=o,B[c]=i,B[r]=n,B)[N]||1,Z=this.$d.getTime()+E*Y;return $.w(Z,this)},D.subtract=function(E,R){return this.add(-1*E,R)},D.format=function(E){var R=this,B=this.$locale();if(!this.isValid())return B.invalidDate||m;var A=E||"YYYY-MM-DDTHH:mm:ssZ",N=$.z(this),j=this.$H,Y=this.$m,Z=this.$M,J=B.weekdays,re=B.months,me=B.meridiem,St=function(be,at,mn,bo){return be&&(be[at]||be(R,A))||mn[at].slice(0,bo)},gn=function(be){return $.s(j%12||12,be,"0")},vt=me||function(be,at,mn){var bo=be<12?"AM":"PM";return mn?bo.toLowerCase():bo};return A.replace(x,function(be,at){return at||function(mn){switch(mn){case"YY":return String(R.$y).slice(-2);case"YYYY":return $.s(R.$y,4,"0");case"M":return Z+1;case"MM":return $.s(Z+1,2,"0");case"MMM":return St(B.monthsShort,Z,re,3);case"MMMM":return St(re,Z);case"D":return R.$D;case"DD":return $.s(R.$D,2,"0");case"d":return String(R.$W);case"dd":return St(B.weekdaysMin,R.$W,J,2);case"ddd":return St(B.weekdaysShort,R.$W,J,3);case"dddd":return J[R.$W];case"H":return String(j);case"HH":return $.s(j,2,"0");case"h":return gn(1);case"hh":return gn(2);case"a":return vt(j,Y,!0);case"A":return vt(j,Y,!1);case"m":return String(Y);case"mm":return $.s(Y,2,"0");case"s":return String(R.$s);case"ss":return $.s(R.$s,2,"0");case"SSS":return $.s(R.$ms,3,"0");case"Z":return N}return null}(be)||N.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(E,R,B){var A,N=this,j=$.p(R),Y=V(E),Z=(Y.utcOffset()-this.utcOffset())*o,J=this-Y,re=function(){return $.m(N,Y)};switch(j){case h:A=re()/12;break;case f:A=re();break;case p:A=re()/3;break;case u:A=(J-Z)/6048e5;break;case d:A=(J-Z)/864e5;break;case c:A=J/i;break;case a:A=J/o;break;case r:A=J/n;break;default:A=J}return B?A:$.a(A)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return C[this.$L]},D.locale=function(E,R){if(!E)return this.$L;var B=this.clone(),A=M(E,R,!0);return A&&(B.$L=A),B},D.clone=function(){return $.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},P}(),U=O.prototype;return V.prototype=U,[["$ms",s],["$s",r],["$m",a],["$H",c],["$W",d],["$M",f],["$y",h],["$D",g]].forEach(function(P){U[P[1]]=function(D){return this.$g(D,P[0],P[1])}}),V.extend=function(P,D){return P.$i||(P(D,O,V),P.$i=!0),V},V.locale=M,V.isDayjs=k,V.unix=function(P){return V(1e3*P)},V.en=C[_],V.Ls=C,V.p={},V})})(Cl);var Tp=Cl.exports;const ue=Lp(Tp),Bt=Math.min,wt=Math.max,to=Math.round,no=Math.floor,nt=t=>({x:t,y:t}),zp={left:"right",right:"left",bottom:"top",top:"bottom"},Hp={start:"end",end:"start"};function hi(t,e,n){return wt(t,Bt(e,n))}function dn(t,e){return typeof t=="function"?t(e):t}function Ct(t){return t.split("-")[0]}function un(t){return t.split("-")[1]}function kl(t){return t==="x"?"y":"x"}function pi(t){return t==="y"?"height":"width"}function oo(t){return["top","bottom"].includes(Ct(t))?"y":"x"}function gi(t){return kl(oo(t))}function jp(t,e,n){n===void 0&&(n=!1);const o=un(t),i=gi(t),s=pi(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=io(r)),[r,io(r)]}function Wp(t){const e=io(t);return[mi(t),e,mi(e)]}function mi(t){return t.replace(/start|end/g,e=>Hp[e])}function Yp(t,e,n){const o=["left","right"],i=["right","left"],s=["top","bottom"],r=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?s:r;default:return[]}}function Gp(t,e,n,o){const i=un(t);let s=Yp(Ct(t),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(mi)))),s}function io(t){return t.replace(/left|right|bottom|top/g,e=>zp[e])}function Up(t){return{top:0,right:0,bottom:0,left:0,...t}}function Sl(t){return typeof t!="number"?Up(t):{top:t,right:t,bottom:t,left:t}}function so(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function vl(t,e,n){let{reference:o,floating:i}=t;const s=oo(e),r=gi(e),a=pi(r),c=Ct(e),d=s==="y",u=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,p=o[a]/2-i[a]/2;let h;switch(c){case"top":h={x:u,y:o.y-i.height};break;case"bottom":h={x:u,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-i.width,y:f};break;default:h={x:o.x,y:o.y}}switch(un(e)){case"start":h[r]-=p*(n&&d?-1:1);break;case"end":h[r]+=p*(n&&d?-1:1);break}return h}const qp=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,a=s.filter(Boolean),c=await(r.isRTL==null?void 0:r.isRTL(e));let d=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=vl(d,o,c),p=o,h={},g=0;for(let m=0;m<a.length;m++){const{name:b,fn:x}=a[m],{x:y,y:w,data:S,reset:_}=await x({x:u,y:f,initialPlacement:o,placement:p,strategy:i,middlewareData:h,rects:d,platform:r,elements:{reference:t,floating:e}});if(u=y??u,f=w??f,h={...h,[b]:{...h[b],...S}},_&&g<=50){g++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(d=_.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):_.rects),{x:u,y:f}=vl(d,p,c)),m=-1;continue}}return{x:u,y:f,placement:p,strategy:i,middlewareData:h}};async function Ml(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:s,rects:r,elements:a,strategy:c}=t,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:h=0}=dn(e,t),g=Sl(h),b=a[p?f==="floating"?"reference":"floating":f],x=so(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:d,rootBoundary:u,strategy:c})),y=f==="floating"?{...r.floating,x:o,y:i}:r.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},_=so(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({rect:y,offsetParent:w,strategy:c}):y);return{top:(x.top-_.top+g.top)/S.y,bottom:(_.bottom-x.bottom+g.bottom)/S.y,left:(x.left-_.left+g.left)/S.x,right:(_.right-x.right+g.right)/S.x}}const Xp=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:s,platform:r,elements:a,middlewareData:c}=e,{element:d,padding:u=0}=dn(t,e)||{};if(d==null)return{};const f=Sl(u),p={x:n,y:o},h=gi(i),g=pi(h),m=await r.getDimensions(d),b=h==="y",x=b?"top":"left",y=b?"bottom":"right",w=b?"clientHeight":"clientWidth",S=s.reference[g]+s.reference[h]-p[h]-s.floating[g],_=p[h]-s.reference[h],C=await(r.getOffsetParent==null?void 0:r.getOffsetParent(d));let v=C?C[w]:0;(!v||!await(r.isElement==null?void 0:r.isElement(C)))&&(v=a.floating[w]||s.floating[g]);const k=S/2-_/2,M=v/2-m[g]/2-1,V=Bt(f[x],M),$=Bt(f[y],M),O=V,U=v-m[g]-$,P=v/2-m[g]/2+k,D=hi(O,P,U),E=!c.arrow&&un(i)!=null&&P!=D&&s.reference[g]/2-(P<O?V:$)-m[g]/2<0,R=E?P<O?P-O:P-U:0;return{[h]:p[h]+R,data:{[h]:D,centerOffset:P-D-R,...E&&{alignmentOffset:R}},reset:E}}}),bi=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:s,rects:r,initialPlacement:a,platform:c,elements:d}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...b}=dn(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=Ct(i),y=Ct(a)===a,w=await(c.isRTL==null?void 0:c.isRTL(d.floating)),S=p||(y||!m?[io(a)]:Wp(a));!p&&g!=="none"&&S.push(...Gp(a,m,g,w));const _=[a,...S],C=await Ml(e,b),v=[];let k=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&v.push(C[x]),f){const O=jp(i,r,w);v.push(C[O[0]],C[O[1]])}if(k=[...k,{placement:i,overflows:v}],!v.every(O=>O<=0)){var M,V;const O=(((M=s.flip)==null?void 0:M.index)||0)+1,U=_[O];if(U)return{data:{index:O,overflows:k},reset:{placement:U}};let P=(V=k.filter(D=>D.overflows[0]<=0).sort((D,E)=>D.overflows[1]-E.overflows[1])[0])==null?void 0:V.placement;if(!P)switch(h){case"bestFit":{var $;const D=($=k.map(E=>[E.placement,E.overflows.filter(R=>R>0).reduce((R,B)=>R+B,0)]).sort((E,R)=>E[1]-R[1])[0])==null?void 0:$[0];D&&(P=D);break}case"initialPlacement":P=a;break}if(i!==P)return{reset:{placement:P}}}return{}}}};async function Kp(t,e){const{placement:n,platform:o,elements:i}=t,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=Ct(n),a=un(n),c=oo(n)==="y",d=["left","top"].includes(r)?-1:1,u=s&&c?-1:1,f=dn(e,t);let{mainAxis:p,crossAxis:h,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof g=="number"&&(h=a==="end"?g*-1:g),c?{x:h*u,y:p*d}:{x:p*d,y:h*u}}const yi=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:s,placement:r,middlewareData:a}=e,c=await Kp(e,t);return r===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:{...c,placement:r}}}}},El=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:s=!0,crossAxis:r=!1,limiter:a={fn:b=>{let{x,y}=b;return{x,y}}},...c}=dn(t,e),d={x:n,y:o},u=await Ml(e,c),f=oo(Ct(i)),p=kl(f);let h=d[p],g=d[f];if(s){const b=p==="y"?"top":"left",x=p==="y"?"bottom":"right",y=h+u[b],w=h-u[x];h=hi(y,h,w)}if(r){const b=f==="y"?"top":"left",x=f==="y"?"bottom":"right",y=g+u[b],w=g-u[x];g=hi(y,g,w)}const m=a.fn({...e,[p]:h,[f]:g});return{...m,data:{x:m.x-n,y:m.y-o}}}}};function ot(t){return Dl(t)?(t.nodeName||"").toLowerCase():"#document"}function xe(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function He(t){var e;return(e=(Dl(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Dl(t){return t instanceof Node||t instanceof xe(t).Node}function je(t){return t instanceof Element||t instanceof xe(t).Element}function Be(t){return t instanceof HTMLElement||t instanceof xe(t).HTMLElement}function Vl(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof xe(t).ShadowRoot}function fn(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=Se(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function Zp(t){return["table","td","th"].includes(ot(t))}function _i(t){const e=xi(),n=Se(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Jp(t){let e=$t(t);for(;Be(e)&&!ro(e);){if(_i(e))return e;e=$t(e)}return null}function xi(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ro(t){return["html","body","#document"].includes(ot(t))}function Se(t){return xe(t).getComputedStyle(t)}function lo(t){return je(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function $t(t){if(ot(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Vl(t)&&t.host||He(t);return Vl(e)?e.host:e}function Rl(t){const e=$t(t);return ro(e)?t.ownerDocument?t.ownerDocument.body:t.body:Be(e)&&fn(e)?e:Rl(e)}function hn(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Rl(t),s=i===((o=t.ownerDocument)==null?void 0:o.body),r=xe(i);return s?e.concat(r,r.visualViewport||[],fn(i)?i:[],r.frameElement&&n?hn(r.frameElement):[]):e.concat(i,hn(i,[],n))}function Fl(t){const e=Se(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=Be(t),s=i?t.offsetWidth:n,r=i?t.offsetHeight:o,a=to(n)!==s||to(o)!==r;return a&&(n=s,o=r),{width:n,height:o,$:a}}function wi(t){return je(t)?t:t.contextElement}function Pt(t){const e=wi(t);if(!Be(e))return nt(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:s}=Fl(e);let r=(s?to(n.width):n.width)/o,a=(s?to(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const Qp=nt(0);function Bl(t){const e=xe(t);return!xi()||!e.visualViewport?Qp:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function eg(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==xe(t)?!1:e}function kt(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=wi(t);let r=nt(1);e&&(o?je(o)&&(r=Pt(o)):r=Pt(t));const a=eg(s,n,o)?Bl(s):nt(0);let c=(i.left+a.x)/r.x,d=(i.top+a.y)/r.y,u=i.width/r.x,f=i.height/r.y;if(s){const p=xe(s),h=o&&je(o)?xe(o):o;let g=p.frameElement;for(;g&&o&&h!==p;){const m=Pt(g),b=g.getBoundingClientRect(),x=Se(g),y=b.left+(g.clientLeft+parseFloat(x.paddingLeft))*m.x,w=b.top+(g.clientTop+parseFloat(x.paddingTop))*m.y;c*=m.x,d*=m.y,u*=m.x,f*=m.y,c+=y,d+=w,g=xe(g).frameElement}}return so({width:u,height:f,x:c,y:d})}function tg(t){let{rect:e,offsetParent:n,strategy:o}=t;const i=Be(n),s=He(n);if(n===s)return e;let r={scrollLeft:0,scrollTop:0},a=nt(1);const c=nt(0);if((i||!i&&o!=="fixed")&&((ot(n)!=="body"||fn(s))&&(r=lo(n)),Be(n))){const d=kt(n);a=Pt(n),c.x=d.x+n.clientLeft,c.y=d.y+n.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-r.scrollLeft*a.x+c.x,y:e.y*a.y-r.scrollTop*a.y+c.y}}function ng(t){return Array.from(t.getClientRects())}function $l(t){return kt(He(t)).left+lo(t).scrollLeft}function og(t){const e=He(t),n=lo(t),o=t.ownerDocument.body,i=wt(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),s=wt(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+$l(t);const a=-n.scrollTop;return Se(o).direction==="rtl"&&(r+=wt(e.clientWidth,o.clientWidth)-i),{width:i,height:s,x:r,y:a}}function ig(t,e){const n=xe(t),o=He(t),i=n.visualViewport;let s=o.clientWidth,r=o.clientHeight,a=0,c=0;if(i){s=i.width,r=i.height;const d=xi();(!d||d&&e==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:s,height:r,x:a,y:c}}function sg(t,e){const n=kt(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=Be(t)?Pt(t):nt(1),r=t.clientWidth*s.x,a=t.clientHeight*s.y,c=i*s.x,d=o*s.y;return{width:r,height:a,x:c,y:d}}function Pl(t,e,n){let o;if(e==="viewport")o=ig(t,n);else if(e==="document")o=og(He(t));else if(je(e))o=sg(e,n);else{const i=Bl(t);o={...e,x:e.x-i.x,y:e.y-i.y}}return so(o)}function Al(t,e){const n=$t(t);return n===e||!je(n)||ro(n)?!1:Se(n).position==="fixed"||Al(n,e)}function rg(t,e){const n=e.get(t);if(n)return n;let o=hn(t,[],!1).filter(a=>je(a)&&ot(a)!=="body"),i=null;const s=Se(t).position==="fixed";let r=s?$t(t):t;for(;je(r)&&!ro(r);){const a=Se(r),c=_i(r);!c&&a.position==="fixed"&&(i=null),(s?!c&&!i:!c&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||fn(r)&&!c&&Al(t,r))?o=o.filter(u=>u!==r):i=a,r=$t(r)}return e.set(t,o),o}function lg(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[...n==="clippingAncestors"?rg(e,this._c):[].concat(n),o],a=r[0],c=r.reduce((d,u)=>{const f=Pl(e,u,i);return d.top=wt(f.top,d.top),d.right=Bt(f.right,d.right),d.bottom=Bt(f.bottom,d.bottom),d.left=wt(f.left,d.left),d},Pl(e,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function ag(t){return Fl(t)}function cg(t,e,n){const o=Be(e),i=He(e),s=n==="fixed",r=kt(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const c=nt(0);if(o||!o&&!s)if((ot(e)!=="body"||fn(i))&&(a=lo(e)),o){const d=kt(e,!0,s,e);c.x=d.x+e.clientLeft,c.y=d.y+e.clientTop}else i&&(c.x=$l(i));return{x:r.left+a.scrollLeft-c.x,y:r.top+a.scrollTop-c.y,width:r.width,height:r.height}}function Ol(t,e){return!Be(t)||Se(t).position==="fixed"?null:e?e(t):t.offsetParent}function Nl(t,e){const n=xe(t);if(!Be(t))return n;let o=Ol(t,e);for(;o&&Zp(o)&&Se(o).position==="static";)o=Ol(o,e);return o&&(ot(o)==="html"||ot(o)==="body"&&Se(o).position==="static"&&!_i(o))?n:o||Jp(t)||n}const dg=async function(t){let{reference:e,floating:n,strategy:o}=t;const i=this.getOffsetParent||Nl,s=this.getDimensions;return{reference:cg(e,await i(n),o),floating:{x:0,y:0,...await s(n)}}};function ug(t){return Se(t).direction==="rtl"}const fg={convertOffsetParentRelativeRectToViewportRelativeRect:tg,getDocumentElement:He,getClippingRect:lg,getOffsetParent:Nl,getElementRects:dg,getClientRects:ng,getDimensions:ag,getScale:Pt,isElement:je,isRTL:ug};function hg(t,e){let n=null,o;const i=He(t);function s(){clearTimeout(o),n&&n.disconnect(),n=null}function r(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const{left:d,top:u,width:f,height:p}=t.getBoundingClientRect();if(a||e(),!f||!p)return;const h=no(u),g=no(i.clientWidth-(d+f)),m=no(i.clientHeight-(u+p)),b=no(d),y={rootMargin:-h+"px "+-g+"px "+-m+"px "+-b+"px",threshold:wt(0,Bt(1,c))||1};let w=!0;function S(_){const C=_[0].intersectionRatio;if(C!==c){if(!w)return r();C?r(!1,C):o=setTimeout(()=>{r(!1,1e-7)},100)}w=!1}try{n=new IntersectionObserver(S,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,y)}n.observe(t)}return r(!0),s}function Il(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,d=wi(t),u=i||s?[...d?hn(d):[],...hn(e)]:[];u.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const f=d&&a?hg(d,n):null;let p=-1,h=null;r&&(h=new ResizeObserver(x=>{let[y]=x;y&&y.target===d&&h&&(h.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{h&&h.observe(e)})),n()}),d&&!c&&h.observe(d),h.observe(e));let g,m=c?kt(t):null;c&&b();function b(){const x=kt(t);m&&(x.x!==m.x||x.y!==m.y||x.width!==m.width||x.height!==m.height)&&n(),m=x,g=requestAnimationFrame(b)}return n(),()=>{u.forEach(x=>{i&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),f&&f(),h&&h.disconnect(),h=null,c&&cancelAnimationFrame(g)}}const Ll=(t,e,n)=>{const o=new Map,i={platform:fg,...n},s={...i.platform,_c:o};return qp(t,e,{...i,platform:s})};function Ci(t){var e;return(e=t==null?void 0:t.$el)!=null?e:t}function pg(t){return{name:"arrow",options:t,fn(e){const n=Ci(l.unref(t.element));return n==null?{}:Xp({element:n,padding:t.padding}).fn(e)}}}function Tl(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function zl(t,e){const n=Tl(t);return Math.round(e*n)/n}function Hl(t,e,n){n===void 0&&(n={});const o=n.whileElementsMounted,i=l.computed(()=>{var v;return(v=l.unref(n.open))!=null?v:!0}),s=l.computed(()=>l.unref(n.middleware)),r=l.computed(()=>{var v;return(v=l.unref(n.placement))!=null?v:"bottom"}),a=l.computed(()=>{var v;return(v=l.unref(n.strategy))!=null?v:"absolute"}),c=l.computed(()=>{var v;return(v=l.unref(n.transform))!=null?v:!0}),d=l.computed(()=>Ci(t.value)),u=l.computed(()=>Ci(e.value)),f=l.ref(0),p=l.ref(0),h=l.ref(a.value),g=l.ref(r.value),m=l.shallowRef({}),b=l.ref(!1),x=l.computed(()=>{const v={position:h.value,left:"0",top:"0"};if(!u.value)return v;const k=zl(u.value,f.value),M=zl(u.value,p.value);return c.value?{...v,transform:"translate("+k+"px, "+M+"px)",...Tl(u.value)>=1.5&&{willChange:"transform"}}:{position:h.value,left:k+"px",top:M+"px"}});let y;function w(){d.value==null||u.value==null||Ll(d.value,u.value,{middleware:s.value,placement:r.value,strategy:a.value}).then(v=>{f.value=v.x,p.value=v.y,h.value=v.strategy,g.value=v.placement,m.value=v.middlewareData,b.value=!0})}function S(){typeof y=="function"&&(y(),y=void 0)}function _(){if(S(),o===void 0){w();return}if(d.value!=null&&u.value!=null){y=o(d.value,u.value,w);return}}function C(){i.value||(b.value=!1)}return l.watch([s,r,a],w,{flush:"sync"}),l.watch([d,u],_,{flush:"sync"}),l.watch(i,C,{flush:"sync"}),l.getCurrentScope()&&l.onScopeDispose(S),{x:l.shallowReadonly(f),y:l.shallowReadonly(p),strategy:l.shallowReadonly(h),placement:l.shallowReadonly(g),middlewareData:l.shallowReadonly(m),isPositioned:l.shallowReadonly(b),floatingStyles:x,update:w}}function gg(t){for(;t;){if(mg(t))return t;t=t.parentElement}return document.scrollingElement}function mg(t){if(!t||t.nodeType!==Node.ELEMENT_NODE)return!1;const e=window.getComputedStyle(t);return e.overflowY==="scroll"||e.overflowY==="auto"&&t.scrollHeight>t.clientHeight}class bg{constructor(e,n){F(this,"onScroll");F(this,"scrollParent");this.onScroll=n,this.scrollParent=gg(e)}bindScroll(){this.scrollParent.addEventListener("scroll",this.onScroll)}unbindScroll(){this.scrollParent.removeEventListener("scroll",this.onScroll)}}const yg={class:"fm-menu__wrapper"},_g=l.defineComponent({__name:"FmMenuDeprecated",props:{showMenu:{type:Boolean,default:!1},placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1}},emits:["dropdown-changed"],setup(t,{expose:e,emit:n}){const o=t,i=l.ref(!1),s=l.ref(null),r=l.ref(null),{floatingStyles:a}=Hl(s,r,{middleware:[yi(4),bi()],placement:o.placement,whileElementsMounted:Il});let c;const d=n;e({show:()=>{i.value||(i.value=!0,d("dropdown-changed",i.value))},hide:()=>{i.value&&(i.value=!1,d("dropdown-changed",i.value))}});const u=h=>{h.preventDefault(),h.stopPropagation(),!o.disabled&&(i.value=!i.value,d("dropdown-changed",i.value))},f=h=>{if(!i.value)return;const g=h.path||h.composedPath();for(const m of g)if(m==s.value||m==r.value)return;i.value=!1,d("dropdown-changed",i.value)},p=()=>{d("dropdown-changed",!1)};return l.watch(()=>o.showMenu,h=>i.value=h),l.onMounted(()=>{i.value=o.showMenu,window.addEventListener("click",f),c=new bg(s.value,p),c.bindScroll()}),l.onUnmounted(()=>{window.removeEventListener("click",f),c.unbindScroll()}),(h,g)=>(l.openBlock(),l.createElementBlock("div",null,[l.createElementVNode("div",{ref_key:"anchorEl",ref:s,class:"fm-menu",onClick:u},[l.renderSlot(h.$slots,"menu-button",{},void 0,!0)],512),i.value?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"menuEl",ref:r,class:l.normalizeClass({"fm-menu__content":!0,"fm-menu__content--opened":i.value}),style:l.normalizeStyle(l.unref(a))},[l.renderSlot(h.$slots,"menu-wrapper",{},()=>[l.createElementVNode("div",yg,[l.renderSlot(h.$slots,"menu-content",{},void 0,!0)])],!0)],6)):l.createCommentVNode("",!0)]))}}),t_="",we=Q(_g,[["__scopeId","data-v-5b19ece2"]]),xg={class:"fm-menu-item--left"},wg={key:0,class:"fm-menu-item--right"},Cg=l.defineComponent({__name:"FmMenuItem",props:{modelValue:{type:Boolean,default:!1},selectable:{type:Boolean,default:!0},label:{default:""},sublabel:{default:""},icon:{default:""},expandable:{type:Boolean,default:!1},hasCheckbox:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=l.ref(!1),i=e,s=c=>{c.preventDefault(),!(n.disabled||!n.selectable)&&i("update:modelValue",!n.modelValue)},r=()=>{i("update:modelValue",n.modelValue)};function a(c){o.value=c}return(c,d)=>(l.openBlock(),l.createElementBlock("div",null,[l.createElementVNode("div",{class:l.normalizeClass({"fm-menu-item":!0,"fm-menu-item--selected":c.modelValue&&!c.hasCheckbox,"fm-menu-item--disabled":c.disabled,"hover:bg-fm-color-opacity-sm cursor-pointer":!c.disabled&&!c.modelValue&&c.selectable}),onClick:s,onMousedown:d[1]||(d[1]=()=>a(!0)),onMouseup:d[2]||(d[2]=()=>a(!1)),onMouseleave:d[3]||(d[3]=()=>a(!1))},[l.createElementVNode("div",xg,[l.renderSlot(c.$slots,"prepend",{},()=>[!c.hasCheckbox&&c.icon?(l.openBlock(),l.createBlock(L,{key:0,name:c.icon,size:"md",outline:!o.value&&!c.modelValue,color:c.disabled?"#C7C7CC":c.modelValue?"#FF7823":"#1C1C1E"},null,8,["name","outline","color"])):l.createCommentVNode("",!0),c.hasCheckbox?(l.openBlock(),l.createBlock(wl,{key:1,"model-value":c.modelValue,name:"something",label:"",sublabel:"",value:"",indeterminate:!1,disabled:c.disabled,"onUpdate:modelValue":r,onClick:d[0]||(d[0]=u=>u.preventDefault())},null,8,["model-value","disabled"])):l.createCommentVNode("",!0)],!0),l.renderSlot(c.$slots,"label",{},()=>[l.createElementVNode("div",null,[l.createElementVNode("div",{class:l.normalizeClass(`fm-typo-body-lg-400 ${c.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"}`)},l.toDisplayString(c.label),3),c.sublabel?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(`fm-typo-body-md-400 ${c.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"}`)},l.toDisplayString(c.sublabel),3)):l.createCommentVNode("",!0)])],!0)]),l.renderSlot(c.$slots,"append",{},void 0,!0),c.expandable?(l.openBlock(),l.createElementBlock("div",wg,[l.createVNode(L,{name:"chevron_right",size:"md",color:c.disabled?"#C7C7CC":"#AEAEB2"},null,8,["color"])])):l.createCommentVNode("",!0)],34)]))}}),n_="",Ee=Q(Cg,[["__scopeId","data-v-257a1b7d"]]),kg={class:"w-full"},Sg=l.defineComponent({__name:"FmField",props:{tag:{default:"div"},prependIcon:{default:""},appendIcon:{default:""},invalid:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1}},setup(t){const e=t;return(n,o)=>(l.openBlock(),l.createBlock(e.tag,{class:l.normalizeClass({"fm-field":!0,"fm-field--focused":n.focused,"fm-field--invalid":n.invalid,"fm-field--valid":n.showValidBorder&&!n.invalid,"fm-field--disabled":n.disabled}),tabindex:"0"},{default:l.withCtx(()=>[l.renderSlot(n.$slots,"prepend",{},()=>[n.prependIcon?(l.openBlock(),l.createBlock(L,{key:0,name:n.prependIcon,size:"md",color:n.disabled?"disabled":"neutral-black"},null,8,["name","color"])):l.createCommentVNode("",!0)],!0),l.createElementVNode("div",kg,[l.renderSlot(n.$slots,"default",{},void 0,!0)]),l.renderSlot(n.$slots,"append",{},()=>[n.appendIcon?(l.openBlock(),l.createBlock(L,{key:0,name:n.appendIcon,size:"md",color:n.disabled?"disabled":"neutral-black"},null,8,["name","color"])):l.createCommentVNode("",!0)],!0)]),_:3},8,["class"]))}}),o_="",it=Q(Sg,[["__scopeId","data-v-177cd78a"]]),vg={class:"flex gap-4"},jl=l.defineComponent({__name:"FmHelperText",props:{text:{default:""},disabled:{type:Boolean,default:!1},state:{default:"none"},errorMessages:{default:()=>[]}},setup(t){const e=t,n=l.computed(()=>e.state==="success"?"check_circle":e.state==="warning"?"warning":e.state==="error"?"error":""),o=l.computed(()=>e.state==="success"?"text-fm-color-system-success-300":e.state==="warning"?"text-fm-color-system-warning-300":e.state==="error"?"text-fm-color-system-error-300":"");return(i,s)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["fm-typo-body-sm-400",{"text-fm-color-typo-disabled":i.disabled,"text-fm-color-typo-secondary":i.state==="none"&&!i.disabled,"text-fm-color-typo-success":i.state==="success"&&!i.disabled,"text-fm-color-typo-warning":i.state==="warning"&&!i.disabled,"text-fm-color-typo-error":i.state==="error"&&!i.disabled}])},[i.errorMessages.length===0?l.renderSlot(i.$slots,"default",{key:0},()=>[l.createElementVNode("div",vg,[n.value?(l.openBlock(),l.createBlock(L,{key:0,size:"sm",name:n.value,class:l.normalizeClass(["mt-[2px]",o.value])},null,8,["name","class"])):l.createCommentVNode("",!0),l.createElementVNode("span",null,l.toDisplayString(i.text),1)])]):l.renderSlot(i.$slots,"default",{key:1},()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.errorMessages,r=>(l.openBlock(),l.createElementBlock("div",{key:r,class:"flex gap-4 text-fm-color-typo-error"},[l.createVNode(L,{size:"sm",name:"error",class:"mt-[2px] text-fm-color-system-error-300"}),l.createElementVNode("span",null,l.toDisplayString(r),1)]))),128))])],2))}}),Mg={class:"px-2 py-0"},Eg={key:0,class:"fm-typo-body-xl-700"},Dg={key:0,class:"content-start flex gap-0 px-2 py-0 self-stretch"},Wl=l.defineComponent({__name:"FmTooltip",props:{variant:{default:"plain"},beak:{default:"top"},hasArrow:{type:Boolean,default:!0},titleText:{default:"Title"},contentText:{},actionButtons:{default:null},disabled:{type:Boolean,default:!1}},setup(t){const e=t,n=l.ref(null),o=l.ref(null),i=l.ref(null),s=async()=>{var x,y,w,S;const{x:h,y:g,placement:m,middlewareData:b}=await Ll(n.value,o.value,{placement:e.beak,middleware:[yi(10),bi(),El({padding:5}),e.hasArrow?pg({element:i.value,padding:10}):null]});if(Object.assign(o.value.style,{left:`${h}px`,top:`${g}px`}),e.hasArrow){const _={top:"bottom",right:"left",bottom:"top",left:"right"}[m.split("-")[0]];Object.assign(i.value.style,{left:((x=b.arrow)==null?void 0:x.x)!=null?`${(y=b.arrow)==null?void 0:y.x}px`:"",top:((w=b.arrow)==null?void 0:w.y)!=null?`${(S=b.arrow)==null?void 0:S.y}px`:"",right:"",bottom:"",background:e.variant==="rich"?"#FFF":"#1C1C1E",[_]:"-4px"})}},r=l.ref(!1),a=l.ref(0),c=l.ref(0),d=l.computed(()=>({...{plain:{color:"#FFF",background:"#1C1C1E",boxShadow:"0 2px 4px rgba(0, 0, 0, 0)"},rich:{background:"#FFF",boxShadow:"0px 8px 16px 0px rgba(199, 199, 204, 0.24)"}}[e.variant],display:r.value?"block":"none"})),u=()=>{clearTimeout(c.value),a.value=window.setTimeout(()=>{r.value=!0},500)},f=()=>{clearTimeout(a.value),c.value=window.setTimeout(()=>r.value=!1,1500)},p=()=>{clearTimeout(c.value),r.value=!0};return l.watchEffect(()=>{r.value?(s(),window.addEventListener("resize",s)):window.removeEventListener("resize",s)}),(h,g)=>(l.openBlock(),l.createElementBlock("div",null,[l.createElementVNode("div",{ref_key:"tooltipContainer",ref:n,class:l.normalizeClass(["cursor-pointer flex items-center justify-center relative w-max",{"cursor-not-allowed pointer-events-none":h.disabled}]),onMouseenter:u,onMouseleave:f},[l.renderSlot(h.$slots,"default")],34),l.createElementVNode("div",{ref_key:"tooltip",ref:o,class:"absolute box-border break-words left-0 max-w-xs px-4 py-3 rounded-2xl top-0 w-max whitespace-normal z-50",style:l.normalizeStyle(d.value),onMouseenter:p,onMouseleave:f},[l.createElementVNode("div",null,[l.createElementVNode("div",Mg,[h.variant=="rich"?(l.openBlock(),l.createElementBlock("div",Eg,l.toDisplayString(h.titleText),1)):l.createCommentVNode("",!0),l.createElementVNode("div",{class:l.normalizeClass(h.variant=="plain"?"fm-typo-body-sm-400":"fm-typo-body-md-400")},l.toDisplayString(h.contentText),3)]),h.variant=="rich"?(l.openBlock(),l.createElementBlock("div",Dg,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(h.actionButtons,(m,b)=>(l.openBlock(),l.createElementBlock("div",{key:b},[l.createVNode(fe,{variant:"tertiary",label:m.label,onClick:m.handler},null,8,["label","onClick"])]))),128))])):l.createCommentVNode("",!0)]),l.createElementVNode("div",{ref_key:"arrowEl",ref:i,class:"-rotate-45 absolute h-3 w-3"},null,512)],36)]))}}),Yl=l.defineComponent({__name:"FmLabel",props:{label:{default:""},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},optional:{type:Boolean,default:!1},info:{default:""}},setup(t){return(e,n)=>e.label?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["fm-typo-body-lg-400 flex gap-4",e.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary",{"items-center":e.info}])},[l.renderSlot(e.$slots,"default",{},()=>[l.createElementVNode("span",null,l.toDisplayString(e.label),1),e.required?(l.openBlock(),l.createElementBlock("span",{key:0,class:l.normalizeClass(["fm-typo-body-lg-700",e.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-error"])}," * ",2)):l.createCommentVNode("",!0),e.optional?(l.openBlock(),l.createElementBlock("span",{key:1,class:l.normalizeClass(["fm-typo-body-md-400",e.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-tertiary"])}," (optional) ",2)):l.createCommentVNode("",!0),e.info?(l.openBlock(),l.createBlock(Wl,{key:2,beak:"top","content-text":e.info,disabled:e.disabled},{default:l.withCtx(()=>[l.createVNode(L,{name:"info",size:"sm",class:l.normalizeClass(["fm-typo-body-md-400",e.disabled?"text-fm-color-typo-disabled":"text-fm-color-neutral-gray-300"])},null,8,["class"])]),_:1},8,["content-text","disabled"])):l.createCommentVNode("",!0)])],2)):l.createCommentVNode("",!0)}});function Gl(t,e){const n=l.ref([]);function o(){const s=[];if(e.value&&e.value.length>0)for(const r of e.value){const c=(typeof r=="function"?r:()=>r)(t.value);c!==!0&&s.push(c)}return n.value=s,n.value}function i(){n.value=[]}return{validate:o,resetValidation:i,errorMessages:n}}function Ul(t,e=null,n=null){let o=null;const i=de(t,"modelValue"),s=l.ref(!0),r=l.inject(Ki,null),{validate:a,resetValidation:c,errorMessages:d}=Gl(i,l.toRef(()=>t.rules)),u=(f=n)=>{s.value=!0,c(),f&&typeof f=="function"&&f(),i.value=e};return l.onMounted(()=>{r&&(o=r.register({validate:a,resetValidation:c,resetValue:u})),e=e??i.value}),l.onUnmounted(()=>{r&&r.unregister(o)}),l.watch(()=>i.value,()=>{s.value=!1,i.value!==e&&a()}),l.watch(()=>t.focused,f=>{s.value=!1,f||a()}),{validate:a,resetValidation:c,errorMessages:d,resetValue:u,isPristine:s}}function ao(){const t=l.ref(!1);function e(){t.value=!0}function n(){t.value=!1}return{focus:e,blur:n,isFocused:t}}const Vg={key:1,class:"flex items-center justify-between"},We=l.defineComponent({__name:"FmFormGroup",props:{modelValue:{},rules:{default:()=>[]},focused:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},label:{default:""},required:{type:Boolean,default:!1},optional:{type:Boolean,default:!1},info:{default:""},helperText:{default:""},helperState:{default:"none"},tag:{default:"label"}},setup(t){const e=t,{errorMessages:n,isPristine:o}=Ul(e),{focus:i,blur:s}=ao(),r=l.computed(()=>({label:e.label,disabled:e.disabled,required:e.required,optional:e.optional,info:e.info})),a=l.computed(()=>({text:e.helperText,disabled:e.disabled,state:e.helperState,errorMessages:n.value})),c=l.computed(()=>({isPristine:o,invalid:n.value.length>0}));return(d,u)=>(l.openBlock(),l.createBlock(e.tag,{class:"flex flex-col gap-4",onClick:l.unref(i),onBlur:l.unref(s)},{default:l.withCtx(()=>[d.label?(l.openBlock(),l.createBlock(Yl,l.normalizeProps(l.mergeProps({key:0},r.value)),{default:l.withCtx(()=>[l.renderSlot(d.$slots,"label")]),_:3},16)):l.createCommentVNode("",!0),l.renderSlot(d.$slots,"default",l.normalizeProps(l.guardReactiveProps(c.value))),a.value.text||a.value.errorMessages.length>0||d.$slots["helper-append"]?(l.openBlock(),l.createElementBlock("div",Vg,[l.createVNode(jl,l.normalizeProps(l.guardReactiveProps(a.value)),{default:l.withCtx(()=>[l.renderSlot(d.$slots,"helper-text")]),_:3},16),l.renderSlot(d.$slots,"helper-append")])):l.createCommentVNode("",!0)]),_:3},8,["onClick","onBlur"]))}}),Rg={class:"fm-calendar p-12 rounded-lg shadow-light-300 w-[360px]"},Fg={class:"w-max"},Bg={class:"flex h-40 justify-between px-4 py-8"},$g={class:"flex gap-4 items-center"},Pg={class:"fm-typo-body-lg-700"},Ag={class:"h-[264px] w-[160px]"},Og={class:"fm-typo-body-lg-700"},Ng={class:"h-[264px] w-[160px]"},Ig={class:"flex gap-4 items-center justify-center"},Lg={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},Tg=["onClick"],zg={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},Hg=l.defineComponent({__name:"FmDatePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=de(e,"modelValue"),o=l.ref(ue(n.value,"YYYY-MM-DD")),i=l.ref(!1),s=l.ref(ue().startOf("month")),r=l.ref(!1),a=l.ref(!1),c=m=>{o.value=m},d=()=>{n.value=o.value.format("YYYY-MM-DD"),setTimeout(()=>{i.value=!1},0)},u=()=>{o.value=n.value?ue(n.value):null,i.value=!1},f=m=>{const b=[],x=m.endOf("month"),y=m.month();let w=m.startOf("week"),S=[];for(;w.isBefore(x.endOf("week"));)w.day()===0&&S.length>0&&(b.push(S),S=[]),S.push({date:w,isCurrentMonth:w.month()===y}),w=w.add(1,"day");return S.length>0&&b.push(S),b},p=m=>{r.value=!1,a.value=!1,s.value=m},h=l.computed(()=>Array.from(Array(7),(m,b)=>ue().day(b).format("ddd"))),g=l.computed(()=>{let m=-5;const b=[];for(;m!=5;)b.push(s.value.add(m,"year")),m++;return b});return(m,b)=>(l.openBlock(),l.createBlock(We,{modelValue:l.unref(n),"onUpdate:modelValue":b[5]||(b[5]=x=>l.isRef(n)?n.value=x:null),label:m.label,disabled:m.disabled,required:m.labelMark==="required",optional:m.labelMark==="optional",info:m.labelInfo,rules:m.rules,focused:i.value,"helper-text":m.helperText,"helper-state":m.helperState,tag:"div"},{label:l.withCtx(()=>[l.renderSlot(m.$slots,"label",{},void 0,!0)]),default:l.withCtx(({invalid:x})=>[l.createVNode(we,{"show-menu":i.value,disabled:m.disabled,onDropdownChanged:b[4]||(b[4]=y=>i.value=y)},{"menu-button":l.withCtx(()=>[l.createVNode(it,{class:"cursor-text",focused:i.value,invalid:x,"show-valid-border":m.showValidBorder},{prepend:l.withCtx(()=>[l.renderSlot(m.$slots,"prepend",{},void 0,!0)]),append:l.withCtx(()=>[l.renderSlot(m.$slots,"append",{},void 0,!0)]),default:l.withCtx(()=>[l.createElementVNode("div",{class:l.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled":l.unref(n)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},l.toDisplayString(l.unref(n)?l.unref(ue)(l.unref(n)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["focused","invalid","show-valid-border"])]),"menu-wrapper":l.withCtx(()=>[l.createElementVNode("div",Rg,[l.createElementVNode("div",Fg,[l.createElementVNode("div",Bg,[l.createElementVNode("div",$g,[l.createVNode(we,{"show-menu":r.value,onDropdownChanged:b[0]||(b[0]=y=>r.value=y)},{"menu-button":l.withCtx(()=>[l.createElementVNode("div",{class:l.normalizeClass(["fm-calendar__month-year__button",r.value?"fm-calendar__month-year__button--opened":""])},[l.createElementVNode("div",Pg,l.toDisplayString(s.value.format("MMMM")),1),l.createVNode(L,{name:r.value?"expand_less":"expand_more",size:"md",color:"black"},null,8,["name"])],2)]),"menu-content":l.withCtx(()=>[l.createElementVNode("ul",Ag,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Array.from(Array(12),(y,w)=>s.value.month(w)),y=>(l.openBlock(),l.createElementBlock("li",{key:y.format("MMMM")},[l.createVNode(Ee,{"model-value":s.value.format("MMMM")===y.format("MMMM"),label:y.format("MMMM"),"onUpdate:modelValue":w=>p(y)},null,8,["model-value","label","onUpdate:modelValue"])]))),128))])]),_:1},8,["show-menu"]),l.createVNode(we,{"show-menu":a.value,onDropdownChanged:b[1]||(b[1]=y=>a.value=y)},{"menu-button":l.withCtx(()=>[l.createElementVNode("div",{class:l.normalizeClass(["fm-calendar__month-year__button",a.value?"fm-calendar__month-year__button--opened":""])},[l.createElementVNode("div",Og,l.toDisplayString(s.value.format("YYYY")),1),l.createVNode(L,{name:a.value?"expand_less":"expand_more",size:"md",color:"black"},null,8,["name"])],2)]),"menu-content":l.withCtx(()=>[l.createElementVNode("ul",Ng,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(g.value,y=>(l.openBlock(),l.createElementBlock("li",{key:y.format("YYYY")},[l.createVNode(Ee,{"model-value":s.value.format("YYYY")===y.format("YYYY"),label:y.format("YYYY"),"onUpdate:modelValue":w=>p(y)},null,8,["model-value","label","onUpdate:modelValue"])]))),128))])]),_:1},8,["show-menu"])]),l.createElementVNode("div",Ig,[l.createVNode(L,{class:"cursor-pointer",name:"chevron_left",outline:!1,color:"#1C1C1E",onClick:b[2]||(b[2]=()=>p(s.value.subtract(1,"month")))}),l.createVNode(L,{class:"cursor-pointer",name:"chevron_right",outline:!1,color:"#1C1C1E",onClick:b[3]||(b[3]=()=>p(s.value.add(1,"month")))})])]),l.createElementVNode("div",null,[l.createElementVNode("div",Lg,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(h.value,y=>(l.openBlock(),l.createElementBlock("div",{key:y,class:"fm-calendar__cell"},l.toDisplayString(y),1))),128))]),l.createElementVNode("div",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(f(s.value),(y,w)=>(l.openBlock(),l.createElementBlock("div",{key:w,class:"fm-calendar__row fm-typo-body-lg-400"},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(y,S=>(l.openBlock(),l.createElementBlock("div",{key:S.date.date(),class:"fm-calendar__cell"},[S.isCurrentMonth?(l.openBlock(),l.createElementBlock("button",{key:0,class:l.normalizeClass(["fm-calendar__cell__button",{"fm-calendar__cell__button--selected":S.date.isSame(o.value)}]),type:"button",onClick:()=>c(S.date)},l.toDisplayString(S.date.date()),11,Tg)):l.createCommentVNode("",!0)]))),128))]))),128))])])]),l.createElementVNode("div",zg,[l.createVNode(fe,{label:"Cancel",size:"md",variant:"tertiary",onClick:u}),l.createVNode(fe,{label:"Apply",size:"md",variant:"primary",disabled:!o.value,onClick:d},null,8,["disabled"])])])]),_:2},1032,["show-menu","disabled"])]),"helper-text":l.withCtx(()=>[l.renderSlot(m.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),i_="",jg=Q(Hg,[["__scopeId","data-v-baaf0541"]]),Wg=t=>(l.pushScopeId("data-v-d5c577b5"),t=t(),l.popScopeId(),t),Yg={class:"flex gap-1 items-center relative w-full"},Gg={class:"flex flex-col gap-4 w-full"},Ug=Wg(()=>l.createElementVNode("div",{class:"fm-typo-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1)),qg={class:"flex flex-col gap-4 w-full"},Xg={class:"fm-calendar p-12 rounded-lg shadow-light-300 w-[720px]"},Kg={class:"flex gap-24"},Zg={class:"w-max"},Jg={class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},Qg={class:"flex gap-4 items-center"},em={class:"fm-typo-body-lg-700"},tm={class:"h-[264px] w-[160px]"},nm={class:"fm-typo-body-lg-700"},om={class:"h-[264px] w-[160px]"},im={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},sm=["onClick","onMouseover"],rm={class:"w-max"},lm={class:"flex gap-16 h-10 items-center justify-end px-4 py-8"},am={class:"flex gap-4 items-center"},cm={class:"fm-typo-body-lg-700"},dm={class:"h-[264px] w-[160px]"},um={class:"fm-typo-body-lg-700"},fm={class:"h-[264px] w-[160px]"},hm={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},pm=["onClick","onMouseover"],gm={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},mm=l.defineComponent({__name:"FmDateRangePicker",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=de(e,"modelValue"),o=l.ref({startDate:ue(n.value.startDate,"YYYY-MM-DD"),endDate:ue(n.value.endDate,"YYYY-MM-DD")}),i=l.ref(!1),s=l.ref(ue().startOf("month")),r=l.ref(ue().startOf("month").add(1,"month")),a=l.ref(null),c=l.ref(!1),d=l.ref(!1),u=l.ref(!1),f=l.ref(!1),p=_=>{if(o.value.startDate&&o.value.endDate){o.value={startDate:_,endDate:null};return}if(!o.value.startDate&&!o.value.endDate)o.value.startDate=_;else if(_.isBefore(o.value.startDate)){const C=o.value.startDate;o.value={startDate:_,endDate:C}}else o.value.endDate=_},h=()=>{n.value={startDate:o.value.startDate.format("YYYY-MM-DD"),endDate:o.value.endDate.format("YYYY-MM-DD")},setTimeout(()=>{i.value=!1})},g=()=>{var _,C;o.value={startDate:(_=n.value)!=null&&_.startDate?ue(n.value.startDate,"YYYY-MM-DD"):null,endDate:(C=n.value)!=null&&C.endDate?ue(n.value.endDate,"YYYY-MM-DD"):null},i.value=!1},m=_=>{const C=[],v=_.endOf("month"),k=_.month();let M=_.startOf("week"),V=[];for(;M.isBefore(v.endOf("week"));)M.day()===0&&V.length>0&&(C.push(V),V=[]),V.push({date:M,isCurrentMonth:M.month()===k}),M=M.add(1,"day");return V.length>0&&C.push(V),C},b=(_,C)=>{c.value=!1,u.value=!1,d.value=!1,f.value=!1,_==="left"?(s.value=C,r.value=C.add(1,"month")):_==="right"&&(r.value=C,s.value=C.subtract(1,"month"))},x=l.computed(()=>Array.from(Array(7),(_,C)=>ue().day(C).format("ddd"))),y=_=>{const C=o.value.startDate,v=o.value.endDate;a.value=C&&v?null:a.value;const k=a.value,M=C==null?void 0:C.isSame(_),V=v==null?void 0:v.isSame(_),$=k==null?void 0:k.isSame(_);return{"fm-calendar__cell__button--selected":M&&V||M&&!v,"fm-calendar__cell__button--selected-start":M&&v&&!(M&&V)||C&&!v&&M&&(k==null?void 0:k.isAfter(C))||C&&!v&&$&&(k==null?void 0:k.isBefore(C)),"fm-calendar__cell__button--selected-end":V&&C&&!(M&&V)||C&&!v&&M&&(k==null?void 0:k.isBefore(C))||C&&!v&&$&&(k==null?void 0:k.isAfter(C)),"fm-calendar__cell__button--selected-between":C&&(v||k)&&v?_.isAfter(C)&&_.isBefore(v):_.isAfter(k)&&_.isBefore(C)||_.isBefore(k)&&_.isAfter(C)}},w=_=>{a.value=_},S=l.computed(()=>{let _=-5;const C=[];for(;_!=5;)C.push(s.value.add(_,"year")),_++;return C});return l.watch(()=>n.value,()=>{var _,C;return o.value={startDate:(_=n.value)!=null&&_.startDate?ue(n.value.startDate,"YYYY-MM-DD"):null,endDate:(C=n.value)!=null&&C.endDate?ue(n.value.endDate,"YYYY-MM-DD"):null}}),(_,C)=>(l.openBlock(),l.createBlock(We,{modelValue:l.unref(n),"onUpdate:modelValue":C[7]||(C[7]=v=>l.isRef(n)?n.value=v:null),disabled:_.disabled,rules:_.rules,focused:i.value,"helper-text":_.helperText,"helper-state":_.helperState,tag:"div"},{default:l.withCtx(({invalid:v})=>[l.createVNode(we,{"show-menu":i.value,disabled:_.disabled,onDropdownChanged:C[6]||(C[6]=k=>i.value=k)},{"menu-button":l.withCtx(()=>[l.createElementVNode("div",Yg,[l.createElementVNode("label",Gg,[l.createElementVNode("div",{class:l.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},l.toDisplayString(e.startLabel),3),l.createVNode(it,{class:l.normalizeClass(_.disabled?"cursor-not-allowed":"cursor-pointer"),focused:i.value,invalid:v,"show-valid-border":_.showValidBorder},{prepend:l.withCtx(()=>[l.renderSlot(_.$slots,"prepend",{},void 0,!0)]),append:l.withCtx(()=>[l.renderSlot(_.$slots,"append",{},void 0,!0)]),default:l.withCtx(()=>{var k,M;return[l.createElementVNode("div",{class:l.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled":(k=l.unref(n))!=null&&k.startDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},l.toDisplayString((M=l.unref(n))!=null&&M.startDate?l.unref(ue)(l.unref(n).startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","focused","invalid","show-valid-border"])]),Ug,l.createElementVNode("label",qg,[l.createElementVNode("div",{class:l.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},l.toDisplayString(e.endLabel),3),l.createVNode(it,{class:l.normalizeClass(_.disabled?"cursor-not-allowed":"cursor-pointer"),focused:i.value,invalid:v,"show-valid-border":_.showValidBorder},{prepend:l.withCtx(()=>[l.renderSlot(_.$slots,"prepend",{},void 0,!0)]),append:l.withCtx(()=>[l.renderSlot(_.$slots,"append",{},void 0,!0)]),default:l.withCtx(()=>{var k,M;return[l.createElementVNode("div",{class:l.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled":(k=l.unref(n))!=null&&k.endDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},l.toDisplayString((M=l.unref(n))!=null&&M.endDate?l.unref(ue)(l.unref(n).endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","focused","invalid","show-valid-border"])])])]),"menu-wrapper":l.withCtx(()=>[l.createElementVNode("div",Xg,[l.createElementVNode("div",Kg,[l.createElementVNode("div",Zg,[l.createElementVNode("div",Jg,[l.createElementVNode("div",Qg,[l.createVNode(L,{class:"cursor-pointer select-none",name:"chevron_left",outline:!1,color:"#1C1C1E",onClick:C[0]||(C[0]=()=>b("left",s.value.subtract(1,"month")))}),l.createVNode(we,{"show-menu":c.value,onDropdownChanged:C[1]||(C[1]=k=>c.value=k)},{"menu-button":l.withCtx(()=>[l.createElementVNode("div",{class:l.normalizeClass(["fm-calendar__month-year__button",c.value?"fm-calendar__month-year__button--opened":""])},[l.createElementVNode("div",em,l.toDisplayString(s.value.format("MMMM")),1),l.createVNode(L,{name:c.value?"expand_less":"expand_more",size:"md",color:"black"},null,8,["name"])],2)]),"menu-content":l.withCtx(()=>[l.createElementVNode("ul",tm,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Array.from(Array(12),(k,M)=>s.value.month(M)),k=>(l.openBlock(),l.createElementBlock("li",{key:k.format("MMMM")},[l.createVNode(Ee,{"model-value":s.value.format("MMMM")===k.format("MMMM"),label:k.format("MMMM"),"onUpdate:modelValue":M=>b("left",k)},null,8,["model-value","label","onUpdate:modelValue"])]))),128))])]),_:1},8,["show-menu"]),l.createVNode(we,{"show-menu":u.value,onDropdownChanged:C[2]||(C[2]=k=>u.value=k)},{"menu-button":l.withCtx(()=>[l.createElementVNode("div",{class:l.normalizeClass(["fm-calendar__month-year__button",u.value?"fm-calendar__month-year__button--opened":""])},[l.createElementVNode("div",nm,l.toDisplayString(s.value.format("YYYY")),1),l.createVNode(L,{name:u.value?"expand_less":"expand_more",size:"md",color:"black"},null,8,["name"])],2)]),"menu-content":l.withCtx(()=>[l.createElementVNode("ul",om,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(S.value,k=>(l.openBlock(),l.createElementBlock("li",{key:k.format("YYYY")},[l.createVNode(Ee,{"model-value":s.value.format("YYYY")===k.format("YYYY"),label:k.format("YYYY"),"onUpdate:modelValue":M=>b("left",k)},null,8,["model-value","label","onUpdate:modelValue"])]))),128))])]),_:1},8,["show-menu"])])]),l.createElementVNode("div",null,[l.createElementVNode("div",im,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(x.value,k=>(l.openBlock(),l.createElementBlock("div",{key:k,class:"fm-calendar__cell"},l.toDisplayString(k),1))),128))]),l.createElementVNode("div",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(m(s.value),(k,M)=>(l.openBlock(),l.createElementBlock("div",{key:M,class:"fm-calendar__row fm-typo-body-lg-400"},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(k,V=>(l.openBlock(),l.createElementBlock("div",{key:V.date.date(),class:"fm-calendar__cell"},[V.isCurrentMonth?(l.openBlock(),l.createElementBlock("button",{key:0,class:l.normalizeClass(["fm-calendar__cell__button",y(V.date)]),type:"button",onClick:()=>p(V.date),onMouseover:$=>w(V.date)},l.toDisplayString(V.date.date()),43,sm)):l.createCommentVNode("",!0)]))),128))]))),128))])])]),l.createElementVNode("div",rm,[l.createElementVNode("div",lm,[l.createElementVNode("div",am,[l.createVNode(we,{"show-menu":d.value,onDropdownChanged:C[3]||(C[3]=k=>d.value=k)},{"menu-button":l.withCtx(()=>[l.createElementVNode("div",{class:l.normalizeClass(["fm-calendar__month-year__button",d.value?"fm-calendar__month-year__button--opened":""])},[l.createElementVNode("div",cm,l.toDisplayString(r.value.format("MMMM")),1),l.createVNode(L,{name:d.value?"expand_less":"expand_more",size:"md",color:"black"},null,8,["name"])],2)]),"menu-content":l.withCtx(()=>[l.createElementVNode("ul",dm,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Array.from(Array(12),(k,M)=>r.value.month(M)),k=>(l.openBlock(),l.createElementBlock("li",{key:k.format("MMMM")},[l.createVNode(Ee,{"model-value":r.value.format("MMMM")===k.format("MMMM"),label:k.format("MMMM"),"onUpdate:modelValue":M=>b("right",k)},null,8,["model-value","label","onUpdate:modelValue"])]))),128))])]),_:1},8,["show-menu"]),l.createVNode(we,{"show-menu":f.value,onDropdownChanged:C[4]||(C[4]=k=>f.value=k)},{"menu-button":l.withCtx(()=>[l.createElementVNode("div",{class:l.normalizeClass(["fm-calendar__month-year__button",f.value?"fm-calendar__month-year__button--opened":""])},[l.createElementVNode("div",um,l.toDisplayString(r.value.format("YYYY")),1),l.createVNode(L,{name:f.value?"expand_less":"expand_more",size:"md",color:"black"},null,8,["name"])],2)]),"menu-content":l.withCtx(()=>[l.createElementVNode("ul",fm,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(S.value,k=>(l.openBlock(),l.createElementBlock("li",{key:k.format("YYYY")},[l.createVNode(Ee,{"model-value":r.value.format("YYYY")===k.format("YYYY"),label:k.format("YYYY"),"onUpdate:modelValue":M=>b("right",k)},null,8,["model-value","label","onUpdate:modelValue"])]))),128))])]),_:1},8,["show-menu"])]),l.createVNode(L,{class:"cursor-pointer select-none",name:"chevron_right",outline:!1,color:"#1C1C1E",onClick:C[5]||(C[5]=()=>b("left",s.value.add(1,"month")))})]),l.createElementVNode("div",null,[l.createElementVNode("div",hm,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(x.value,k=>(l.openBlock(),l.createElementBlock("div",{key:k,class:"fm-calendar__cell"},l.toDisplayString(k),1))),128))]),l.createElementVNode("div",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(m(r.value),(k,M)=>(l.openBlock(),l.createElementBlock("div",{key:M,class:"fm-calendar__row fm-typo-body-lg-400"},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(k,V=>(l.openBlock(),l.createElementBlock("div",{key:V.date.date(),class:"fm-calendar__cell"},[V.isCurrentMonth?(l.openBlock(),l.createElementBlock("button",{key:0,class:l.normalizeClass(["fm-calendar__cell__button",y(V.date)]),type:"button",onClick:()=>p(V.date),onMouseover:$=>w(V.date)},l.toDisplayString(V.date.date()),43,pm)):l.createCommentVNode("",!0)]))),128))]))),128))])])])]),l.createElementVNode("div",gm,[l.createVNode(fe,{label:"Cancel",size:"md",variant:"tertiary",onClick:g}),l.createVNode(fe,{label:"OK",size:"md",variant:"primary",disabled:!o.value.startDate||!o.value.endDate,onClick:h},null,8,["disabled"])])])]),_:2},1032,["show-menu","disabled"])]),"helper-text":l.withCtx(()=>[l.renderSlot(_.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","rules","focused","helper-text","helper-state"]))}}),s_="",bm=Q(mm,[["__scopeId","data-v-d5c577b5"]]),ym=l.defineComponent({__name:"FmForm",emits:["validation-reset","validation-success","validation-failed","reset"],setup(t,{expose:e,emit:n}){const o=l.ref([]),i=l.ref(0),s=n,r=()=>{let d=[];for(let u=0;u<o.value.length;u++){const f=o.value[u];d=[...d,...f.validate()]}d.length?s("validation-failed",d):s("validation-success")},a=()=>{for(let d=0;d<o.value.length;d++)o.value[d].resetValue();s("reset")};return e({validateInputs:r,resetInputsValidation:()=>{for(let d=0;d<o.value.length;d++)o.value[d].resetValidation();s("validation-reset")},resetInputs:a}),l.provide(Ki,{register({validate:d,resetValidation:u,resetValue:f}){return o.value.push({componentId:i.value,validate:d,resetValidation:u,resetValue:f}),i.value++},unregister(d){o.value.filter(u=>u.componentId!==d)}}),(d,u)=>(l.openBlock(),l.createElementBlock("form",{onSubmit:l.withModifiers(r,["prevent"]),onReset:l.withModifiers(a,["prevent"])},[l.renderSlot(d.$slots,"default")],32))}}),_m={class:"fm-radio-btn"},xm={class:"fm-radio-btn__input--container"},wm=["value","disabled","checked"],Cm={class:"py-8"},km={class:"fm-typo-body-lg-400"},Sm={key:0,class:"fm-typo-body-md-400 text-fm-color-typo-secondary"},vm=l.defineComponent({__name:"FmRadio",props:{modelValue:{default:null},value:{},label:{default:""},sublabel:{default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const e=t,n=de(e,"modelValue"),o=l.ref(),i=l.inject(Zi,null),s=()=>{r.value||(i?i.updateValue(e.value):n.value=e.value)},r=l.computed(()=>i?i.getDisabled():e.disabled),a=l.computed(()=>i?e.value===i.groupValue.value:n.value===e.value);return(c,d)=>{const u=l.resolveDirective("wave");return l.openBlock(),l.createElementBlock("div",_m,[l.createElementVNode("label",{class:l.normalizeClass({"fm-radio-btn--wrapper":!0,"cursor-not-allowed text-fm-color-typo-disabled":r.value,"cursor-pointer":!r.value}),onClick:s},[l.withDirectives((l.openBlock(),l.createElementBlock("div",xm,[l.createElementVNode("input",{ref_key:"inputEl",ref:o,class:"fm-radio-btn__input--btn",type:"radio",value:c.value,disabled:r.value,checked:a.value},null,8,wm)])),[[u,!r.value]]),l.createElementVNode("div",Cm,[l.renderSlot(c.$slots,"label",{},()=>[l.createElementVNode("div",km,l.toDisplayString(c.label),1),c.sublabel?(l.openBlock(),l.createElementBlock("div",Sm,l.toDisplayString(c.sublabel),1)):l.createCommentVNode("",!0)],!0)])],2)])}}}),r_="",Mm=Q(vm,[["__scopeId","data-v-24fa5bf9"]]),Em=l.defineComponent({__name:"FmRadioGroup",props:{modelValue:{},inline:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[t=>!!t||"This field is required"]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=de(e,"modelValue");return l.provide(Zi,{groupValue:n,getDisabled:()=>e.disabled,updateValue(o){n.value=o}}),(o,i)=>(l.openBlock(),l.createBlock(We,{modelValue:l.unref(n),"onUpdate:modelValue":i[0]||(i[0]=s=>l.isRef(n)?n.value=s:null),label:o.label,disabled:o.disabled,required:o.labelMark==="required",optional:o.labelMark==="optional",info:o.labelInfo,rules:o.rules,"helper-text":o.helperText,"helper-state":o.helperState},{label:l.withCtx(()=>[l.renderSlot(o.$slots,"label")]),default:l.withCtx(()=>[l.createElementVNode("div",{class:l.normalizeClass({"flex items-center gap-16 justify-start":o.inline})},[l.renderSlot(o.$slots,"default")],2)]),"helper-text":l.withCtx(()=>[l.renderSlot(o.$slots,"helper-text")]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","helper-text","helper-state"]))}}),Dm={class:"flex flex-col gap-4"},Vm={class:"w-[280px]"},Rm={class:"flex flex-col gap-4 justify-center"},Fm=l.defineComponent({__name:"FmSelect",props:{modelValue:{},items:{},multiselect:{type:Boolean,default:!1},placement:{default:"bottom-start"},placeholder:{default:"Select item"},showValidBorder:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=de(e,"modelValue"),o=l.ref(!1),i=(d,u)=>{if(e.multiselect){let f=[];d?f=n.value.length===0?[u]:e.items.filter(p=>n.value.some(h=>ge(p.value,h)||ge(p.value,u.value))):f=e.items.filter(p=>n.value.some(h=>ge(p.value,h)&&!ge(p.value,u.value))),n.value=f.map(p=>p.value)}else n.value=u.value,setTimeout(()=>{o.value=!1},0)},s=d=>{const u=[...n.value].filter((f,p)=>p!==d);n.value=u},r=l.computed(()=>e.multiselect?e.items.filter(d=>l.toRaw(n.value).some(u=>ge(u,d.value))):e.items.filter(d=>ge(n.value,d.value))),a=l.computed(()=>e.items.filter(d=>n.value.some(u=>ge(d.value,u))).map(d=>({label:d.label}))),c=l.computed(()=>{var d;return e.multiselect?e.placeholder:((d=e.items.find(u=>ge(u.value,n.value)))==null?void 0:d.label)??e.placeholder});return(d,u)=>(l.openBlock(),l.createElementBlock("div",Dm,[l.createVNode(We,{modelValue:l.unref(n),"onUpdate:modelValue":u[1]||(u[1]=f=>l.isRef(n)?n.value=f:null),label:d.label,disabled:d.disabled,required:d.labelMark==="required",optional:d.labelMark==="optional",info:d.labelInfo,rules:d.rules,focused:o.value,"helper-text":d.helperText,"helper-state":d.helperState},{label:l.withCtx(()=>[l.renderSlot(d.$slots,"label")]),default:l.withCtx(({invalid:f})=>[l.createVNode(we,{"show-menu":o.value,disabled:d.disabled,placement:d.placement,onDropdownChanged:u[0]||(u[0]=p=>o.value=p)},{"menu-button":l.withCtx(()=>[l.createVNode(it,{class:l.normalizeClass(d.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.value,invalid:f,"show-valid-border":d.showValidBorder},{prepend:l.withCtx(()=>[l.renderSlot(d.$slots,"prepend")]),append:l.withCtx(()=>[l.createVNode(L,{name:o.value?"expand_less":"expand_more",size:"md",color:d.disabled?"#C7C7CC":"black"},null,8,["name","color"])]),default:l.withCtx(()=>[l.createElementVNode("div",{class:l.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled":l.unref(n)!==void 0?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},l.toDisplayString(c.value),3)]),_:2},1032,["class","focused","invalid","show-valid-border"])]),"menu-content":l.withCtx(()=>[l.createElementVNode("div",Vm,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(d.items,p=>(l.openBlock(),l.createBlock(Ee,{key:p.value,"has-checkbox":d.multiselect,label:p.label,value:p.value,"model-value":r.value.some(h=>l.unref(ge)(h.value,p.value)),"onUpdate:modelValue":h=>i(h,p)},null,8,["has-checkbox","label","value","model-value","onUpdate:modelValue"]))),128))])]),_:2},1032,["show-menu","disabled","placement"])]),"helper-text":l.withCtx(()=>[l.renderSlot(d.$slots,"helper-text")]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]),l.createElementVNode("div",Rm,[d.multiselect&&r.value.length>0?(l.openBlock(),l.createBlock(qi,{key:0,items:a.value,removable:"",disabled:d.disabled,onChipClosed:s},null,8,["items","disabled"])):l.createCommentVNode("",!0)])]))}}),Bm=["inputMode","value","placeholder","readOnly"],$m={key:0},Pm=l.defineComponent({__name:"FmStepperField",props:{modelValue:{},placeholder:{default:""},inputmode:{default:"numeric"},readonly:{type:Boolean},labelMark:{default:"none"},step:{default:1},min:{default:void 0},max:{default:void 0},prependIcon:{default:""},appendIcon:{default:""},useGrouping:{type:Boolean,default:!0},isCurrency:{type:Boolean,default:!1},showSteppers:{type:Boolean,default:!0},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},labelInfo:{default:""},label:{default:""},disabled:{type:Boolean},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=de(e,"modelValue"),{isFocused:o,blur:i,focus:s}=ao(),r=l.ref(null);let a;const c=y=>{if(y!==""){const w=+y.replace(/,/g,"");return isNaN(w)?null:w}return null},d=y=>a.format(y),u=y=>{if(typeof n.value!="number"){n.value=+n.value;return}if(y>0&&m.value||y<0&&b.value)return;let w=x(n.value)?n.value+y:0;w=f(w),n.value=w},f=y=>e.max!==void 0&&y>e.max?e.max:e.min!==void 0&&y<e.min?e.min:y,p=()=>{var y;n.value=c(((y=r.value)==null?void 0:y.value)??"")},h=y=>{if(![...Array(10).keys()].map(w=>w.toString()).includes(y.key)&&!["Backspace","Tab","Enter",".","-","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(y.key)){y.preventDefault();return}},g=l.computed(()=>n.value!=null?d(n.value):""),m=l.computed(()=>{let y=!1;return e.max!==void 0&&(y=n.value>=e.max),e.min!==void 0&&(y=n.value<e.min),y}),b=l.computed(()=>{let y=!1;return e.max!==void 0&&(y=n.value>e.max),e.min!==void 0&&(y=n.value<=e.min),y});l.onBeforeMount(()=>{a=new Intl.NumberFormat("en-MY",{useGrouping:e.useGrouping})});function x(y){return typeof y=="number"&&isFinite(y)}return(y,w)=>(l.openBlock(),l.createBlock(We,{modelValue:l.unref(n),"onUpdate:modelValue":w[8]||(w[8]=S=>l.isRef(n)?n.value=S:null),label:y.label,disabled:y.disabled,required:y.labelMark==="required",optional:y.labelMark==="optional",info:y.labelInfo,rules:y.rules,focused:l.unref(o),"helper-text":y.helperText,"helper-state":y.helperState},{label:l.withCtx(()=>[l.renderSlot(y.$slots,"label",{},void 0,!0)]),default:l.withCtx(({invalid:S})=>[l.createVNode(it,{class:"cursor-text","append-icon":y.appendIcon,"prepend-icon":y.prependIcon,focused:l.unref(o),invalid:S,"show-valid-border":y.showValidBorder},{prepend:l.withCtx(()=>[l.renderSlot(y.$slots,"prepend",{},void 0,!0)]),append:l.withCtx(()=>[l.renderSlot(y.$slots,"append",{},()=>[l.createElementVNode("div",{class:l.normalizeClass(["flex items-center justify-center",{"mr-32":y.showSteppers}])},[y.appendText?(l.openBlock(),l.createElementBlock("div",$m,l.toDisplayString(y.appendText),1)):l.createCommentVNode("",!0),y.appendIcon?(l.openBlock(),l.createBlock(L,{key:1,name:y.appendIcon,size:"md",color:y.disabled?"#C7C7CC":"#1C1C1E"},null,8,["name","color"])):l.createCommentVNode("",!0)],2)],!0),y.showSteppers?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["fm-stepper-field__stepper__container",l.unref(o)?"right-[6px]":"right-[7px]"])},[l.createElementVNode("button",{class:"fm-stepper-field__stepper__item",tabindex:"0",onMousedown:w[2]||(w[2]=()=>u(y.step)),onFocus:w[3]||(w[3]=(..._)=>l.unref(s)&&l.unref(s)(..._)),onBlur:w[4]||(w[4]=(..._)=>l.unref(i)&&l.unref(i)(..._))},[l.createVNode(L,{name:"expand_less",size:"md",color:y.disabled||m.value?"#C7C7CC":"#1C1C1E"},null,8,["color"])],32),l.createElementVNode("button",{class:"fm-stepper-field__stepper__item",tabindex:"1",onMousedown:w[5]||(w[5]=()=>u(-y.step)),onFocus:w[6]||(w[6]=(..._)=>l.unref(s)&&l.unref(s)(..._)),onBlur:w[7]||(w[7]=(..._)=>l.unref(i)&&l.unref(i)(..._))},[l.createVNode(L,{name:"expand_more",size:"md",color:y.disabled||b.value?"#C7C7CC":"#1C1C1E"},null,8,["color"])],32)],2)):l.createCommentVNode("",!0)]),default:l.withCtx(()=>[l.createElementVNode("input",{ref_key:"inputEl",ref:r,class:"fm-stepper-field--input",type:"text",inputMode:y.inputmode,value:g.value,placeholder:y.placeholder,readOnly:y.readonly,onInput:p,onFocus:w[0]||(w[0]=(..._)=>l.unref(s)&&l.unref(s)(..._)),onBlur:w[1]||(w[1]=(..._)=>l.unref(i)&&l.unref(i)(..._)),onKeydown:h},null,40,Bm)]),_:2},1032,["append-icon","prepend-icon","focused","invalid","show-valid-border"])]),"helper-text":l.withCtx(()=>[l.renderSlot(y.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),l_="",Am=Q(Pm,[["__scopeId","data-v-90140ecd"]]),Om={class:"cursor-pointer fm-switch__container"},Nm={key:0},Im={class:"fm-typo-body-lg-400"},Lm={key:0,class:"fm-color-typo-secondary fm-typo-body-md-400"},Tm={class:"fm-switch__input--container"},zm=["checked","value","disabled"],Hm={key:1},jm={class:"fm-typo-body-lg-400"},Wm={key:0,class:"fm-color-typo-secondary fm-typo-body-md-400"},Ym=l.defineComponent({__name:"FmSwitch",props:{modelValue:{type:Boolean},label:{default:""},sublabel:{default:""},labelPlacement:{default:"left"},value:{},disabled:{type:Boolean,default:!1},showIcon:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const e=t,n=de(e,"modelValue"),o=()=>{e.disabled||(n.value=!n.value)};return(i,s)=>(l.openBlock(),l.createElementBlock("label",Om,[i.labelPlacement==="left"?(l.openBlock(),l.createElementBlock("div",Nm,[l.renderSlot(i.$slots,"label",{},void 0,!0),l.createElementVNode("div",Im,l.toDisplayString(i.label),1),i.sublabel?(l.openBlock(),l.createElementBlock("div",Lm,l.toDisplayString(i.sublabel),1)):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0),l.createElementVNode("div",Tm,[l.createElementVNode("input",{checked:l.unref(n),class:"fm-switch__input--btn",type:"checkbox",value:i.value,disabled:i.disabled,onClick:o},null,8,zm),l.createElementVNode("div",{class:l.normalizeClass({"fm-switch__input--knob":!0,"fm-switch__input--knob--show-icon":i.showIcon})},[i.showIcon?(l.openBlock(),l.createBlock(L,{key:0,name:l.unref(n)?"check":"close",size:"sm",color:i.disabled?"#C7C7CC":l.unref(n)?"#1C1C1E":"#FFFFFF"},null,8,["name","color"])):l.createCommentVNode("",!0)],2)]),i.labelPlacement==="right"?(l.openBlock(),l.createElementBlock("div",Hm,[l.createElementVNode("div",jm,l.toDisplayString(i.label),1),i.sublabel?(l.openBlock(),l.createElementBlock("div",Wm,l.toDisplayString(i.sublabel),1)):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0)]))}}),a_="",Gm=Q(Ym,[["__scopeId","data-v-c967bf28"]]),Um=["value","inputMode","type","placeholder","minlength","maxlength","disabled","readOnly"],qm=l.defineComponent({__name:"FmTextField",props:{placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},inputmode:{default:"text"},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},prependIcon:{default:""},appendIcon:{default:""},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},labelInfo:{default:""},showWordCount:{type:Boolean,default:!1},modelValue:{},label:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=l.ref(null),o=de(e,"modelValue"),{isFocused:i,focus:s,blur:r}=ao(),a=c=>{o.value=c.target.value};return(c,d)=>(l.openBlock(),l.createBlock(We,{modelValue:l.unref(o),"onUpdate:modelValue":d[2]||(d[2]=u=>l.isRef(o)?o.value=u:null),label:c.label,disabled:c.disabled,required:c.labelMark==="required",optional:c.labelMark==="optional",info:c.labelInfo,rules:c.rules,focused:l.unref(i),"helper-text":c.helperText,"helper-state":c.helperState},l.createSlots({label:l.withCtx(()=>[l.renderSlot(c.$slots,"label")]),default:l.withCtx(({invalid:u})=>[l.createVNode(it,{class:"cursor-text","append-icon":c.appendIcon,"prepend-icon":c.prependIcon,focused:l.unref(i),invalid:u,"show-valid-border":c.showValidBorder},{prepend:l.withCtx(()=>[l.renderSlot(c.$slots,"prepend")]),append:l.withCtx(()=>[l.renderSlot(c.$slots,"append")]),default:l.withCtx(()=>[l.createElementVNode("input",{ref_key:"inputEl",ref:n,class:l.normalizeClass({"fm-text-field--input fm-typo-body-lg-400":!0,"fm-color-typo-primary":!c.disabled,"fm-color-typo-disabled":c.disabled}),value:l.unref(o),inputMode:c.inputmode,type:c.inputmode,placeholder:c.placeholder,minlength:c.minLength,maxlength:c.maxLength,disabled:c.disabled,readOnly:c.readonly,onInput:a,onFocus:d[0]||(d[0]=(...f)=>l.unref(s)&&l.unref(s)(...f)),onBlur:d[1]||(d[1]=(...f)=>l.unref(r)&&l.unref(r)(...f))},null,42,Um)]),_:2},1032,["append-icon","prepend-icon","focused","invalid","show-valid-border"])]),"helper-text":l.withCtx(()=>[l.renderSlot(c.$slots,"helper-text")]),_:2},[c.showWordCount?{name:"helper-append",fn:l.withCtx(()=>[l.createElementVNode("div",{class:l.normalizeClass([c.disabled?"fm-color-typo-disabled":"text-fm-color-typo-secondary","fm-typo-body-sm-400"])},l.toDisplayString(c.maxLength?`${l.unref(o).length} / ${c.maxLength}`:""),3)]),key:"0"}:void 0]),1032,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),c_="",Xm=["value","placeholder","minlength","maxlength","readOnly","disabled"],Km=l.defineComponent({__name:"FmTextarea",props:{modelValue:{default:""},placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},labelInfo:{default:""},helperText:{default:""},helperState:{default:"none"},showWordCount:{type:Boolean,default:!1},label:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]}},emits:["update:modelValue"],setup(t){const n=de(t,"modelValue"),{isFocused:o,focus:i,blur:s}=ao(),r=a=>{n.value=a.target.value};return(a,c)=>(l.openBlock(),l.createBlock(We,{modelValue:l.unref(n),"onUpdate:modelValue":c[2]||(c[2]=d=>l.isRef(n)?n.value=d:null),label:a.label,disabled:a.disabled,required:a.labelMark==="required",optional:a.labelMark==="optional",info:a.labelInfo,rules:a.rules,focused:l.unref(o),"helper-text":a.helperText,"helper-state":a.helperState},l.createSlots({label:l.withCtx(()=>[l.renderSlot(a.$slots,"label",{},void 0,!0)]),default:l.withCtx(({invalid:d})=>[l.createElementVNode("div",{class:l.normalizeClass({"fm-textarea__container":!0,"fm-textarea__container--focused":l.unref(o),"fm-textarea__container--invalid":!!l.unref(n)&&d,"fm-textarea__container--valid":a.showValidBorder&&a.showSuccess&&!!l.unref(n)&&!d,"fm-textarea__container--disabled":a.disabled})},[l.createElementVNode("textarea",{class:l.normalizeClass({"fm-textarea--input fm-typo-body-lg-400":!0,"fm-color-typo-primary":!a.disabled,"fm-color-typo-disabled":a.disabled}),value:l.unref(n),placeholder:a.placeholder,minlength:a.minLength,maxlength:a.maxLength,readOnly:a.readonly,disabled:a.disabled,onInput:r,onFocus:c[0]||(c[0]=(...u)=>l.unref(i)&&l.unref(i)(...u)),onBlur:c[1]||(c[1]=(...u)=>l.unref(s)&&l.unref(s)(...u))},null,42,Xm)],2)]),"helper-text":l.withCtx(()=>[l.renderSlot(a.$slots,"helper-text",{},void 0,!0)]),_:2},[a.showWordCount?{name:"helper-append",fn:l.withCtx(()=>[l.createElementVNode("div",{class:l.normalizeClass([a.disabled?"fm-color-typo-disabled":"text-fm-color-typo-secondary","fm-typo-body-sm-400"])},l.toDisplayString(a.maxLength?`${l.unref(n).length} / ${a.maxLength}`:""),3)]),key:"0"}:void 0]),1032,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),d_="",Zm=Q(Km,[["__scopeId","data-v-280a005d"]]),Jm={class:"flex flex-col fm-time-input items-center"},Qm=["value"],eb=l.defineComponent({__name:"TimeInput",props:{modelValue:{type:String,required:!0},min:{type:Number,required:!0},max:{type:Number,required:!0}},emits:["update:model-value","update:cycle"],setup(t,{emit:e}){const n=t,o=e,i=l.ref();function s(u){i.value&&(i.value.value=u)}l.watch(()=>n.modelValue,s);function r(){if(!i.value)return;const u=a(i.value.value);if(u==null||u>n.max||u<n.min){s(n.modelValue);return}o("update:model-value",u)}function a(u){return u&&/^\d+$/.test(u)?Number(u):null}function c(){o("update:model-value",a(n.modelValue)+1)}function d(){o("update:model-value",a(n.modelValue)-1)}return(u,f)=>(l.openBlock(),l.createElementBlock("div",Jm,[l.createElementVNode("div",{class:"fm-time-input__scroller",onClick:c},[l.createVNode(L,{name:"expand_less",size:"lg"})]),l.createElementVNode("input",{ref_key:"inputRef",ref:i,value:n.modelValue,onInput:r},null,40,Qm),l.createElementVNode("div",{class:"fm-time-input__scroller",onClick:d},[l.createVNode(L,{name:"expand_more",size:"lg"})])]))}}),u_="",ql=Q(eb,[["__scopeId","data-v-e8ddb125"]]);var Ye=(t=>(t.AM="AM",t.PM="PM",t))(Ye||{});function st(t){return t.toString().padStart(2,"0")}const tb={class:"flex fm-time-input gap-16 items-center"},nb=l.createElementVNode("div",{class:"fm-typo-title-sm-700"}," : ",-1),ob={class:"fm-time-input-periods"},ib=["onClick"],Xl=l.defineComponent({__name:"FmTimeInput",props:{modelValue:{type:Object,required:!0}},emits:["update:model-value"],setup(t,{emit:e}){const n=t,o=e;function i(s){const r={hours:s.hours??n.modelValue.hours,minutes:s.minutes??n.modelValue.minutes,period:s.period??n.modelValue.period},a=n.modelValue.hours;(a===12&&r.hours===11||a===11&&r.hours===12)&&(r.period=n.modelValue.period===Ye.AM?Ye.PM:Ye.AM),r.hours>12?r.hours=1:r.hours<1&&(r.hours=12),r.minutes>59?r.minutes=0:r.minutes<0&&(r.minutes=59),o("update:model-value",r)}return(s,r)=>(l.openBlock(),l.createElementBlock("div",tb,[l.createVNode(ql,{"model-value":l.unref(st)(t.modelValue.hours),min:1,max:12,"onUpdate:modelValue":r[0]||(r[0]=a=>i({hours:a}))},null,8,["model-value"]),nb,l.createVNode(ql,{"model-value":l.unref(st)(t.modelValue.minutes),min:0,max:59,"onUpdate:modelValue":r[1]||(r[1]=a=>i({minutes:a}))},null,8,["model-value"]),l.createElementVNode("div",ob,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(Ye),a=>(l.openBlock(),l.createElementBlock("div",{key:a,class:l.normalizeClass([{"fm-time-input-period__selected":a===t.modelValue.period},"bg-fm-color-neutral-gray-100 fm-time-input-period"]),onClick:()=>i({period:a})},l.toDisplayString(a),11,ib))),128))])]))}}),f_="",sb={class:"flex gap-8"},rb={class:"bg-fm-color-neutral-white flex flex-col p-12 rounded-lg shadow-light-300 w-[343px]"},lb=l.createElementVNode("div",{class:"fm-typo-body-xl-700"}," Enter time ",-1),ab={class:"flex justify-center w-full"},cb={class:"flex justify-end"},db=l.defineComponent({__name:"FmTimePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const n=de(t,"modelValue"),o=l.ref(null),i=l.computed(()=>{if(!n.value)return null;const{hours:h,minutes:g,period:m}=a(n.value);return`${st(h)}:${st(g)} ${m}`});function s(){if(!o.value){n.value=null;return}const{hours:h,minutes:g,period:m}=o.value,b=r(h,g,m);n.value=b,u()}function r(h,g,m){let b=h;return m===Ye.PM?b=h===12?h:h+12:h===12&&(b=0),`${st(b)}:${st(g)}`}l.onMounted(()=>{n.value&&(o.value=a(n.value))}),l.watch(()=>n.value,h=>{h&&(o.value=a(h))});function a(h){const[g,m,b]=c(h).split(":");return{hours:Number(g),minutes:Number(m),period:b}}function c(h){const[g,m]=h.split(":"),b=Number(g),x=Number(m),y=b>11?Ye.PM:Ye.AM;let w=b;return w===0?w=12:w>12&&(w-=12),`${st(w)}:${st(x)}:${y}`}const d=l.ref();function u(){var h;(h=d.value)==null||h.hide()}const f=l.ref(!1);function p(h){h?o.value=a(n.value??"00:00"):o.value=n.value?a(n.value):null,f.value=h}return(h,g)=>(l.openBlock(),l.createBlock(We,{modelValue:l.unref(n),"onUpdate:modelValue":g[1]||(g[1]=m=>l.isRef(n)?n.value=m:null),label:h.label,disabled:h.disabled,required:h.labelMark==="required",optional:h.labelMark==="optional",info:h.labelInfo,rules:h.rules,focused:f.value,"helper-text":h.helperText,"helper-state":h.helperState},{label:l.withCtx(()=>[l.renderSlot(h.$slots,"label")]),default:l.withCtx(({invalid:m})=>[l.createVNode(we,{ref_key:"dropdownRef",ref:d,onDropdownChanged:p},{"menu-button":l.withCtx(()=>[l.createVNode(it,{class:l.normalizeClass(h.disabled?"cursor-not-allowed":"cursor-pointer"),focused:f.value,invalid:m,"show-valid-border":h.showValidBorder},{default:l.withCtx(()=>[l.createElementVNode("div",sb,[l.createVNode(L,{name:"schedule",outline:!f.value},null,8,["outline"]),l.createElementVNode("div",{class:l.normalizeClass(["grow",{"text-fm-color-typo-disabled":!i.value}])},l.toDisplayString(i.value??"HH:MM"),3)])]),_:2},1032,["class","focused","invalid","show-valid-border"])]),"menu-wrapper":l.withCtx(()=>[l.createElementVNode("div",rb,[lb,l.createElementVNode("div",ab,[l.createVNode(Xl,{"model-value":o.value??{hours:0,minutes:0,period:l.unref(Ye).AM},class:"py-16","onUpdate:modelValue":g[0]||(g[0]=b=>o.value=b)},null,8,["model-value"])]),l.createElementVNode("div",cb,[l.createVNode(fe,{label:"Cancel",variant:"tertiary",onClick:u}),l.createVNode(fe,{label:"Confirm",variant:"tertiary",onClick:s})])])]),_:2},1536)]),"helper-text":l.withCtx(()=>[l.renderSlot(h.$slots,"helper-text")]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),ub=l.defineComponent({__name:"FmList",props:{separator:{type:Boolean,default:!1},disabled:{type:Boolean},activeClass:{default:""}},setup(t){return(e,n)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass({"fm-list--separator":e.separator,activeClass:e.activeClass})},[l.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),h_="",fb=Q(ub,[["__scopeId","data-v-884ba127"]]),hb=l.defineComponent({__name:"FmListItem",props:{tag:{default:"div"},clickable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},activeClass:{default:""}},setup(t){const e=t;return(n,o)=>{const i=l.resolveDirective("wave");return l.withDirectives((l.openBlock(),l.createBlock(e.tag,{class:l.normalizeClass({"fm-list-item":!0,"fm-list-item--disabled":n.disabled,"cursor-pointer":n.clickable&&!n.disabled,"cursor-not-allowed":n.clickable&&n.disabled,activeClass:n.activeClass})},{default:l.withCtx(()=>[l.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3},8,["class"])),[[i,n.clickable&&!n.disabled]])}}}),p_="",pb=Q(hb,[["__scopeId","data-v-f565b558"]]),gb={mounted:(t,e)=>{t.clickOutsideEvent=n=>{const o=e.arg?document.querySelectorAll(`#${e.arg}`):[];!(t==n.target||t.contains(n.target))&&!Array.from(o).some(i=>i&&(n.target==i||i.contains(n.target)))&&e.value(n,t)},document.addEventListener("click",t.clickOutsideEvent)},unmounted:t=>{document.removeEventListener("click",t.clickOutsideEvent)}},mb=l.defineComponent({__name:"FmMenu",props:{placement:{default:"bottom-start"},trigger:{default:"click"},closeOnClick:{type:Boolean,default:!0},width:{default:void 0},maxHeight:{default:408}},emits:["menu-changed"],setup(t,{emit:e}){const n=t,o=e,i=l.ref([]);let s;const r=l.ref(),a=l.ref(!1),c=l.ref(!1),d=l.inject(es,null),u=l.ref(null),f=l.ref(null),{floatingStyles:p}=Hl(u,f,{middleware:[yi({mainAxis:d?8:4,crossAxis:d?-12:0}),bi(),El()],placement:n.placement,whileElementsMounted:Il}),h=()=>{x&&clearTimeout(x)},g=()=>{k.value==="hover"&&b()},m=()=>{k.value==="click"&&b()},b=()=>{h(),c.value=!0,a.value=!0,d==null||d.setChildId(s)};let x;const y=()=>{k.value==="hover"&&(c.value=!1,h(),x=setTimeout(()=>{a.value=!1},1e3))},w=()=>{h(),c.value=!0},S=()=>{c.value=!1,x&&clearTimeout(x),x=setTimeout(()=>{c.value||(i.value.length>0&&d?a.value=i.value.some(({injectProps:M})=>M.mouseInMenu.value):(d&&d.closeParent(),k.value!=="click"&&(a.value=!1)))},1e3)},_=()=>{a.value=!1},C=()=>{n.closeOnClick&&(a.value=!1)},v=l.computed(()=>({mouseInMenu:c}));l.provide(es,{register({injectProps:M}){return i.value=[...i.value,{injectProps:M}],i.value.length},closeParent(){d?(a.value=!1,d==null||d.closeParent()):a.value=k.value!=="click"},setChildId(M){r.value=M},mouseInChildId:r,trigger:n.trigger}),l.onMounted(()=>{d&&(s=d.register({injectProps:v}))}),l.watch(()=>d==null?void 0:d.mouseInChildId.value,M=>{M!==s&&(h(),a.value=!1)});const k=l.computed(()=>d===null?n.trigger:"hover");return l.watch(()=>a.value,()=>o("menu-changed",a.value)),(M,V)=>l.withDirectives((l.openBlock(),l.createElementBlock("div",null,[l.createElementVNode("div",{ref_key:"anchorEl",ref:u,class:"fm-menu",onMouseenter:g,onMouseleave:y,onClick:m},[l.renderSlot(M.$slots,"menu-button",{},void 0,!0)],544),(l.openBlock(),l.createBlock(l.Teleport,{to:"body"},[a.value?(l.openBlock(),l.createElementBlock("div",{key:0,id:"fm-menu",ref_key:"menuEl",ref:f,style:l.normalizeStyle(l.unref(p)),onMouseenter:w,onMouseleave:S,onClick:C},[l.renderSlot(M.$slots,"menu-wrapper",{},()=>[l.createElementVNode("div",{class:"fm-menu__wrapper",style:l.normalizeStyle({"max-height":`${M.maxHeight}px`,width:`${M.width}px`})},[l.renderSlot(M.$slots,"default",{},void 0,!0)],4)],!0)],36)):l.createCommentVNode("",!0)]))])),[[l.unref(gb),_,"fm-menu"]])}}),g_="",Kl=Q(mb,[["__scopeId","data-v-163bd513"]]),bb=l.defineComponent({__name:"FmMenuDivider",props:{vertical:{type:Boolean,default:!1},inset:{type:Boolean,default:!1}},setup(t){return(e,n)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["border-fm-color-neutral-gray-100 rounded-sm",[e.vertical?"border-l -my-4 mx-4":"border-t -mx-4 my-4",{"my-0":e.inset&&e.vertical,"mx-0":e.inset&&!e.vertical}]])},null,2))}}),yb={class:"fm-typo-body-lg-700 mx-8 p-12 text-fm-color-typo-primary"},_b=l.defineComponent({__name:"FmMenuHeader",props:{label:{}},setup(t){return(e,n)=>(l.openBlock(),l.createElementBlock("div",yb,l.toDisplayString(e.label),1))}}),xb={class:"fm-progress-indicator relative"},wb=["data-progress"],Cb={class:"absolute flex fm-typo-body-sm-400 h-full inset-0 items-center justify-center w-full"},Zl=l.defineComponent({__name:"FmProgressIndicator",props:{modelValue:{type:Number,required:!0}},setup(t){const e=t,n=l.ref(null),o=l.computed(()=>`${e.modelValue/100*360}deg`),i=s=>{n.value&&n.value.style.setProperty("--progress",s)};return l.onMounted(()=>{i(o.value)}),l.onUpdated(()=>{i(o.value)}),l.watch(o,async s=>{i(s)}),(s,r)=>(l.openBlock(),l.createElementBlock("div",xb,[l.createElementVNode("div",{ref_key:"progress",ref:n,class:"fm-progress-circular w-full","data-progress":o.value},null,8,wb),l.createElementVNode("div",Cb,[l.renderSlot(s.$slots,"default")])]))}}),m_="",kb={class:"flex"},Sb={key:0,class:"mt-8"},vb=l.defineComponent({__name:"FmSnackbar",props:{title:{type:String,default:void 0},description:{type:String,default:void 0},variant:{type:String,default:"info"},dismissable:{type:Boolean,default:!1},action:{type:String,default:void 0},color:{type:String,default:void 0},bgColor:{type:String,default:void 0}},emits:["onDismiss","onAction"],setup(t,{emit:e}){const n=t,o=e,i=l.computed(()=>{switch(n.variant){case"info":return{icon:{name:"info",color:"system-info-300"},actionColor:"typo-info",bgColor:"system-info-100"};case"success":return{icon:{name:"check_circle",color:"system-success-300"},actionColor:"typo-success",bgColor:"system-success-100"};case"warning":return{icon:{name:"warning",color:"system-warning-300"},actionColor:"typo-warning",bgColor:"system-warning-100"};case"error":return{icon:{name:"error",color:"system-error-300"},actionColor:"typo-error",bgColor:"system-error-100"};case"neutral":return{actionColor:"primary",bgColor:"neutral-gray-100"};default:throw Error(`Unimplement snackbar variant ${n.variant}`)}}),s=l.computed(()=>n.title?{text:n.title,classes:"fm-typo-body-lg-700"}:{text:n.description,classes:""}),r=l.computed(()=>n.bgColor?wo(n.bgColor)?{style:{backgroundColor:n.bgColor}}:{class:`bg-fm-color-${n.bgColor}`}:{class:`bg-fm-color-${i.value.bgColor}`}),a=l.computed(()=>n.color?wo(n.color)?{style:{color:n.color}}:{class:`text-fm-color-${n.color}`}:{class:`text-fm-color-${i.value.actionColor}`});return(c,d)=>(l.openBlock(),l.createElementBlock("div",l.mergeProps(r.value,{class:"fm-corner-radius-lg fm-snackbar px-24 py-16"}),[l.createElementVNode("div",kb,[i.value.icon?(l.openBlock(),l.createBlock(L,{key:0,name:i.value.icon.name,color:n.color??i.value.icon.color,class:"mr-12"},null,8,["name","color"])):l.createCommentVNode("",!0),l.createElementVNode("div",{class:l.normalizeClass(`${s.value.classes} grow ellipsis`)},l.toDisplayString(s.value.text),3),n.dismissable?(l.openBlock(),l.createBlock(L,{key:1,style:{"{ flex":"none}"},name:"close",class:"cursor-pointer",onClick:d[0]||(d[0]=()=>o("onDismiss"))})):l.createCommentVNode("",!0)]),n.title&&n.description?(l.openBlock(),l.createElementBlock("div",Sb,l.toDisplayString(n.description),1)):l.createCommentVNode("",!0),l.renderSlot(c.$slots,"actions",{},()=>[n.action?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0},a.value,{class:"mt-16 fm-typo-body-lg-700"}),[l.createElementVNode("span",{class:"cursor-pointer",onClick:d[1]||(d[1]=()=>o("onAction"))},l.toDisplayString(n.action),1)],16)):l.createCommentVNode("",!0)],!0)],16))}}),b_="",Mb=Q(vb,[["__scopeId","data-v-b6db34bb"]]),Eb={key:0,class:"fm-step-description fm-typo-body-sm-400 line-clamp-1 mt-4"},Jl=l.defineComponent({__name:"FmStepHeader",props:{title:{type:String,required:!0},description:{type:String,default:void 0},disabled:{type:Boolean,default:!1},titleBold:{type:Boolean,default:!1}},setup(t){return(e,n)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["flex flex-col",t.disabled?"text-fm-color-typo-disabled":""])},[l.createElementVNode("div",{class:l.normalizeClass(["fm-step-title line-clamp-2",t.titleBold?"fm-typo-body-xl-700":"fm-typo-body-md-400"])},l.toDisplayString(t.title),3),t.description?(l.openBlock(),l.createElementBlock("div",Eb,l.toDisplayString(t.description),1)):l.createCommentVNode("",!0)],2))}}),Db=["data-title","data-description","data-disabled"],Vb={class:"flex fm-step-container gap-12 grow"},Rb=l.defineComponent({__name:"FmStep",props:{title:{type:String,required:!0},description:{type:String,default:void 0},value:{type:Number,required:!0},complete:{type:Function,required:!0},error:{type:Function,default:void 0},disabled:{type:Function,default:void 0}},setup(t){const e=t,{currentStep:n,goToStep:o}=l.inject(Ji);function i(){s.value||o(e.value)}const s=l.computed(()=>e.disabled?e.disabled():!1),r=l.computed(()=>e.error?e.error():!1),a=l.computed(()=>n()===e.value),c=l.computed(()=>e.complete()),d=l.computed(()=>a.value||c.value||n()>e.value?"bg-fm-color-primary":"bg-fm-color-neutral-gray-300"),u=l.computed(()=>a.value?{className:"bg-fm-color-primary"}:r.value?{config:{name:"warning",color:"system-error-300"}}:s.value?{className:"border-2 border-fm-color-neutral-gray-200"}:c.value?{config:{name:"check_small",color:"primary"},className:"border-2 border-fm-color-primary"}:{className:"border-2 border-fm-color-neutral-gray-300"});return(f,p)=>{const h=l.resolveDirective("wave");return l.withDirectives((l.openBlock(),l.createElementBlock("div",{"data-title":t.title,"data-description":t.description,"data-disabled":s.value,class:l.normalizeClass(`fm-step gap-4 grow ${s.value?"cursor-not-allowed":"cursor-pointer"}`),onClick:l.withModifiers(i,["stop"])},[l.createElementVNode("div",null,[l.createElementVNode("div",{class:l.normalizeClass(`fm-step-indicator ${d.value}`)},null,2)]),l.createElementVNode("div",Vb,[l.createElementVNode("div",{class:l.normalizeClass(["flex fm-step-container-icon h-[24px] items-center justify-center min-h-[24px] min-w-[24px] relative rounded-full w-[24px]",u.value.className])},[u.value.config?(l.openBlock(),l.createBlock(L,{key:0,name:u.value.config.name,color:u.value.config.color,outline:"",class:"absolute"},null,8,["name","color"])):l.createCommentVNode("",!0)],2),l.createVNode(Jl,{title:t.title,description:t.description,disabled:s.value,class:"grow"},null,8,["title","description","disabled"])])],10,Db)),[[h,!s.value]])}}}),y_="",Fb=Q(Rb,[["__scopeId","data-v-ee172cad"]]),Bb={class:"hidden items-center xs:flex"},$b={class:"flex gap-2 items-start justify-end mb-24 mt-40 p-0 self-stretch"},Pb=l.defineComponent({__name:"FmStepper",props:{modelValue:{type:Number,required:!0},orientation:{type:String,default:"horizontal"}},emits:["update:model-value"],setup(t,{emit:e}){const n=t,o=e,i=f=>{o("update:model-value",f)};l.provide(Ji,{currentStep:()=>n.modelValue,goToStep:i});const s=l.ref(),r=l.ref([]),a=l.computed(()=>r.value[n.modelValue-1]),c=l.computed(()=>n.modelValue/r.value.length*100),d=l.computed(()=>`${n.modelValue} of ${r.value.length}`),u=()=>{var p;const f=Array.from(((p=s.value)==null?void 0:p.querySelectorAll(":scope > .fm-step"))??[]);r.value=f.map(h=>({title:h.dataset.title??"",description:h.dataset.description,disabled:h.dataset.disabled=="true"}))};return l.onMounted(()=>{u()}),(f,p)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(`fm-stepper fm-stepper__${t.orientation}`)},[l.createElementVNode("div",{ref_key:"stepperRef",ref:s,class:l.normalizeClass(`flex mx-24 mt-12 mb-24 xs:hidden ${t.orientation==="vertical"?"flex-col":""}`)},[l.renderSlot(f.$slots,"default")],2),l.createElementVNode("div",Bb,[l.createVNode(Zl,{"model-value":c.value,class:"mr-12",style:{"min-width":"60px"}},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(d.value),1)]),_:1},8,["model-value"]),a.value?(l.openBlock(),l.createBlock(Jl,{key:0,class:"grow","title-bold":"",title:a.value.title,description:a.value.description,disabled:a.value.disabled},null,8,["title","description","disabled"])):l.createCommentVNode("",!0)]),f.$slots.contents?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(`flex-col mx-24 mt-12 mb-24 ${t.orientation==="vertical"?"w-2/3":""}`)},[l.renderSlot(f.$slots,"contents"),l.createElementVNode("div",$b,[l.renderSlot(f.$slots,"actions")])],2)):l.createCommentVNode("",!0)],2))}});let Ab=0;function Ob(){return Ab++}const Nb=t=>(l.pushScopeId("data-v-431e2921"),t=t(),l.popScopeId(),t),Ib=["disabled"],Lb=[Nb(()=>l.createElementVNode("div",{class:"fm-tab__indicator"},null,-1))],Tb={class:"max-w-[360px] min-w-[186px]"},zb=l.defineComponent({__name:"FmTab",props:{modelValue:{default:null},label:{default:""},vertical:{type:Boolean,default:!1},icon:{default:""},disabled:{type:Boolean,default:!1},badge:{default:0},value:{default:()=>Ob()},children:{default:()=>[]}},emits:["update:modelValue"],setup(t,{emit:e}){const n=l.ref(!1),o=t,i=e,s=l.ref(!1);function r(f){n.value=f}const a=()=>{o.disabled||o.children.length>0||i("update:modelValue",o.value)},c=f=>{o.children.length!==0&&(s.value=f)},d=l.computed(()=>o.children.length>0?o.children.some(f=>f.value===o.modelValue):o.modelValue===o.value),u=f=>{s.value=!1,i("update:modelValue",f)};return(f,p)=>(l.openBlock(),l.createBlock(we,{"show-menu":s.value,disabled:f.children.length===0,class:l.normalizeClass(["max-w-[360px] min-w-[90px] rounded-sm",{"w-full":f.vertical}]),placement:f.vertical?"right-start":"bottom-start",onDropdownChanged:c},{"menu-button":l.withCtx(()=>[l.createElementVNode("button",{class:l.normalizeClass(["fm-tab",`fm-tab--${f.vertical?"vertical":"horizontal"}`,f.disabled?"cursor-not-allowed":"cursor-pointer",{"fm-tab--selected":d.value}]),disabled:f.disabled,onMousedown:p[0]||(p[0]=()=>r(!0)),onMouseup:p[1]||(p[1]=()=>r(!1)),onMouseleave:p[2]||(p[2]=()=>r(!1)),onClick:a},[l.renderSlot(f.$slots,"prepend",{},void 0,!0),f.icon?(l.openBlock(),l.createBlock(L,{key:0,name:f.icon,outline:!n.value&&!d.value,color:f.disabled?"neutral-gray-200":d.value?"primary":"neutral-black",size:"md"},null,8,["name","outline","color"])):l.createCommentVNode("",!0),f.label?(l.openBlock(),l.createElementBlock("span",{key:1,class:l.normalizeClass(["fm-typo-body-lg-700 text-fm-color-typo-primary col-start-2 row-start-1",d.value?"visible":"invisible"])},l.toDisplayString(f.label),3)):l.createCommentVNode("",!0),f.label?(l.openBlock(),l.createElementBlock("span",{key:2,class:l.normalizeClass(["fm-typo-body-lg-400 col-start-2 row-start-1",f.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary",!d.value||f.disabled?"visible":"invisible"])},l.toDisplayString(f.label),3)):l.createCommentVNode("",!0),f.badge?(l.openBlock(),l.createBlock(yn,{key:3,value:f.badge,inline:"",variant:"numeric"},null,8,["value"])):l.createCommentVNode("",!0),f.children.length>0?(l.openBlock(),l.createBlock(L,{key:4,size:"md",name:s.value?"expand_less":"expand_more"},null,8,["name"])):l.createCommentVNode("",!0),l.renderSlot(f.$slots,"append",{},void 0,!0),d.value?(l.openBlock(),l.createElementBlock("div",{key:5,class:l.normalizeClass([`fm-tab__indicator__wrapper--${f.vertical?"vertical":"horizontal"}`])},Lb,2)):l.createCommentVNode("",!0)],42,Ib)]),"menu-content":l.withCtx(()=>[l.createElementVNode("div",Tb,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(f.children,h=>l.renderSlot(f.$slots,"list-item",l.normalizeProps(l.guardReactiveProps(h)),()=>[l.createVNode(Ee,{"model-value":o.modelValue===h.value,label:h.label,icon:h.icon,disabled:h.disabled,onClick:g=>u(h.value)},{append:l.withCtx(()=>[h.badge?(l.openBlock(),l.createBlock(yn,{key:0,value:h.badge,inline:"",variant:"numeric"},null,8,["value"])):l.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"])],!0)),256))])]),_:3},8,["show-menu","disabled","class","placement"]))}}),x_="",Ql=Q(zb,[["__scopeId","data-v-431e2921"]]);/**
|
|
26
|
+
`):t}function Sg(t,e){const{element:n,datasetIndex:o,index:i}=e,r=t.getDatasetMeta(o).controller,{label:l,value:a}=r.getLabelAndValue(i);return{chart:t,label:l,parsed:r.getParsed(i),raw:t.data.datasets[o].data[i],formattedValue:a,dataset:r.getDataset(),dataIndex:i,datasetIndex:o,element:n}}function Da(t,e){const n=t.chart.ctx,{body:o,footer:i,title:r}=t,{boxWidth:l,boxHeight:a}=e,d=fe(e.bodyFont),c=fe(e.titleFont),u=fe(e.footerFont),f=r.length,h=i.length,p=o.length,m=be(e.padding);let g=m.height,b=0,y=o.reduce((v,x)=>v+x.before.length+x.lines.length+x.after.length,0);if(y+=t.beforeBody.length+t.afterBody.length,f&&(g+=f*c.lineHeight+(f-1)*e.titleSpacing+e.titleMarginBottom),y){const v=e.displayColors?Math.max(a,d.lineHeight):d.lineHeight;g+=p*v+(y-p)*d.lineHeight+(y-1)*e.bodySpacing}h&&(g+=e.footerMarginTop+h*u.lineHeight+(h-1)*e.footerSpacing);let $=0;const k=function(v){b=Math.max(b,n.measureText(v).width+$)};return n.save(),n.font=c.string,Q(t.title,k),n.font=d.string,Q(t.beforeBody.concat(t.afterBody),k),$=e.displayColors?l+2+e.boxPadding:0,Q(o,v=>{Q(v.before,k),Q(v.lines,k),Q(v.after,k)}),$=0,n.font=u.string,Q(t.footer,k),n.restore(),b+=m.width,{width:b,height:g}}function vg(t,e){const{y:n,height:o}=e;return n<o/2?"top":n>t.height-o/2?"bottom":"center"}function Dg(t,e,n,o){const{x:i,width:r}=o,l=n.caretSize+n.caretPadding;if(t==="left"&&i+r+l>e.width||t==="right"&&i-r-l<0)return!0}function Eg(t,e,n,o){const{x:i,width:r}=n,{width:l,chartArea:{left:a,right:d}}=t;let c="center";return o==="center"?c=i<=(a+d)/2?"left":"right":i<=r/2?c="left":i>=l-r/2&&(c="right"),Dg(c,t,e,n)&&(c="center"),c}function Ea(t,e,n){const o=n.yAlign||e.yAlign||vg(t,n);return{xAlign:n.xAlign||e.xAlign||Eg(t,e,n,o),yAlign:o}}function Mg(t,e){let{x:n,width:o}=t;return e==="right"?n-=o:e==="center"&&(n-=o/2),n}function Vg(t,e,n){let{y:o,height:i}=t;return e==="top"?o+=n:e==="bottom"?o-=i+n:o-=i/2,o}function Ma(t,e,n,o){const{caretSize:i,caretPadding:r,cornerRadius:l}=t,{xAlign:a,yAlign:d}=n,c=i+r,{topLeft:u,topRight:f,bottomLeft:h,bottomRight:p}=Et(l);let m=Mg(e,a);const g=Vg(e,d,c);return d==="center"?a==="left"?m+=c:a==="right"&&(m-=c):a==="left"?m-=Math.max(u,h)+i:a==="right"&&(m+=Math.max(f,p)+i),{x:pe(m,0,o.width-e.width),y:pe(g,0,o.height-e.height)}}function Mo(t,e,n){const o=be(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-o.right:t.x+o.left}function Va(t){return Ye([],nt(t))}function Bg(t,e,n){return pt(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function Ba(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const Pa={beforeTitle:Ke,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,o=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(o>0&&e.dataIndex<o)return n[e.dataIndex]}return""},afterTitle:Ke,beforeBody:Ke,beforeLabel:Ke,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return q(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Ke,afterBody:Ke,beforeFooter:Ke,footer:Ke,afterFooter:Ke};function Ce(t,e,n,o){const i=t[e].call(n,o);return typeof i>"u"?Pa[e].call(n,o):i}class ns extends tt{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,o=this.options.setContext(this.getContext()),i=o.enabled&&n.options.animation&&o.animations,r=new wl(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=Bg(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:o}=n,i=Ce(o,"beforeTitle",this,e),r=Ce(o,"title",this,e),l=Ce(o,"afterTitle",this,e);let a=[];return a=Ye(a,nt(i)),a=Ye(a,nt(r)),a=Ye(a,nt(l)),a}getBeforeBody(e,n){return Va(Ce(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:o}=n,i=[];return Q(e,r=>{const l={before:[],lines:[],after:[]},a=Ba(o,r);Ye(l.before,nt(Ce(a,"beforeLabel",this,r))),Ye(l.lines,Ce(a,"label",this,r)),Ye(l.after,nt(Ce(a,"afterLabel",this,r))),i.push(l)}),i}getAfterBody(e,n){return Va(Ce(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:o}=n,i=Ce(o,"beforeFooter",this,e),r=Ce(o,"footer",this,e),l=Ce(o,"afterFooter",this,e);let a=[];return a=Ye(a,nt(i)),a=Ye(a,nt(r)),a=Ye(a,nt(l)),a}_createItems(e){const n=this._active,o=this.chart.data,i=[],r=[],l=[];let a=[],d,c;for(d=0,c=n.length;d<c;++d)a.push(Sg(this.chart,n[d]));return e.filter&&(a=a.filter((u,f,h)=>e.filter(u,f,h,o))),e.itemSort&&(a=a.sort((u,f)=>e.itemSort(u,f,o))),Q(a,u=>{const f=Ba(e.callbacks,u);i.push(Ce(f,"labelColor",this,u)),r.push(Ce(f,"labelPointStyle",this,u)),l.push(Ce(f,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=r,this.labelTextColors=l,this.dataPoints=a,a}update(e,n){const o=this.options.setContext(this.getContext()),i=this._active;let r,l=[];if(!i.length)this.opacity!==0&&(r={opacity:0});else{const a=vn[o.position].call(this,i,this._eventPosition);l=this._createItems(o),this.title=this.getTitle(l,o),this.beforeBody=this.getBeforeBody(l,o),this.body=this.getBody(l,o),this.afterBody=this.getAfterBody(l,o),this.footer=this.getFooter(l,o);const d=this._size=Da(this,o),c=Object.assign({},a,d),u=Ea(this.chart,o,c),f=Ma(o,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,r={opacity:1,x:f.x,y:f.y,width:d.width,height:d.height,caretX:a.x,caretY:a.y}}this._tooltipItems=l,this.$context=void 0,r&&this._resolveAnimations().update(this,r),e&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,o,i){const r=this.getCaretPosition(e,o,i);n.lineTo(r.x1,r.y1),n.lineTo(r.x2,r.y2),n.lineTo(r.x3,r.y3)}getCaretPosition(e,n,o){const{xAlign:i,yAlign:r}=this,{caretSize:l,cornerRadius:a}=o,{topLeft:d,topRight:c,bottomLeft:u,bottomRight:f}=Et(a),{x:h,y:p}=e,{width:m,height:g}=n;let b,y,$,k,v,x;return r==="center"?(v=p+g/2,i==="left"?(b=h,y=b-l,k=v+l,x=v-l):(b=h+m,y=b+l,k=v-l,x=v+l),$=b):(i==="left"?y=h+Math.max(d,u)+l:i==="right"?y=h+m-Math.max(c,f)-l:y=this.caretX,r==="top"?(k=p,v=k-l,b=y-l,$=y+l):(k=p+g,v=k+l,b=y+l,$=y-l),x=k),{x1:b,x2:y,x3:$,y1:k,y2:v,y3:x}}drawTitle(e,n,o){const i=this.title,r=i.length;let l,a,d;if(r){const c=Wt(o.rtl,this.x,this.width);for(e.x=Mo(this,o.titleAlign,o),n.textAlign=c.textAlign(o.titleAlign),n.textBaseline="middle",l=fe(o.titleFont),a=o.titleSpacing,n.fillStyle=o.titleColor,n.font=l.string,d=0;d<r;++d)n.fillText(i[d],c.x(e.x),e.y+l.lineHeight/2),e.y+=l.lineHeight+a,d+1===r&&(e.y+=o.titleMarginBottom-a)}}_drawColorBox(e,n,o,i,r){const l=this.labelColors[o],a=this.labelPointStyles[o],{boxHeight:d,boxWidth:c}=r,u=fe(r.bodyFont),f=Mo(this,"left",r),h=i.x(f),p=d<u.lineHeight?(u.lineHeight-d)/2:0,m=n.y+p;if(r.usePointStyle){const g={radius:Math.min(c,d)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},b=i.leftForLtr(h,c)+c/2,y=m+d/2;e.strokeStyle=r.multiKeyBackground,e.fillStyle=r.multiKeyBackground,Bi(e,g,b,y),e.strokeStyle=l.borderColor,e.fillStyle=l.backgroundColor,Bi(e,g,b,y)}else{e.lineWidth=G(l.borderWidth)?Math.max(...Object.values(l.borderWidth)):l.borderWidth||1,e.strokeStyle=l.borderColor,e.setLineDash(l.borderDash||[]),e.lineDashOffset=l.borderDashOffset||0;const g=i.leftForLtr(h,c),b=i.leftForLtr(i.xPlus(h,1),c-2),y=Et(l.borderRadius);Object.values(y).some($=>$!==0)?(e.beginPath(),e.fillStyle=r.multiKeyBackground,pn(e,{x:g,y:m,w:c,h:d,radius:y}),e.fill(),e.stroke(),e.fillStyle=l.backgroundColor,e.beginPath(),pn(e,{x:b,y:m+1,w:c-2,h:d-2,radius:y}),e.fill()):(e.fillStyle=r.multiKeyBackground,e.fillRect(g,m,c,d),e.strokeRect(g,m,c,d),e.fillStyle=l.backgroundColor,e.fillRect(b,m+1,c-2,d-2))}e.fillStyle=this.labelTextColors[o]}drawBody(e,n,o){const{body:i}=this,{bodySpacing:r,bodyAlign:l,displayColors:a,boxHeight:d,boxWidth:c,boxPadding:u}=o,f=fe(o.bodyFont);let h=f.lineHeight,p=0;const m=Wt(o.rtl,this.x,this.width),g=function(N){n.fillText(N,m.x(e.x+p),e.y+h/2),e.y+=h+r},b=m.textAlign(l);let y,$,k,v,x,B,M;for(n.textAlign=l,n.textBaseline="middle",n.font=f.string,e.x=Mo(this,b,o),n.fillStyle=o.bodyColor,Q(this.beforeBody,g),p=a&&b!=="right"?l==="center"?c/2+u:c+2+u:0,v=0,B=i.length;v<B;++v){for(y=i[v],$=this.labelTextColors[v],n.fillStyle=$,Q(y.before,g),k=y.lines,a&&k.length&&(this._drawColorBox(n,e,v,m,o),h=Math.max(f.lineHeight,d)),x=0,M=k.length;x<M;++x)g(k[x]),h=f.lineHeight;Q(y.after,g)}p=0,h=f.lineHeight,Q(this.afterBody,g),e.y-=r}drawFooter(e,n,o){const i=this.footer,r=i.length;let l,a;if(r){const d=Wt(o.rtl,this.x,this.width);for(e.x=Mo(this,o.footerAlign,o),e.y+=o.footerMarginTop,n.textAlign=d.textAlign(o.footerAlign),n.textBaseline="middle",l=fe(o.footerFont),n.fillStyle=o.footerColor,n.font=l.string,a=0;a<r;++a)n.fillText(i[a],d.x(e.x),e.y+l.lineHeight/2),e.y+=l.lineHeight+o.footerSpacing}}drawBackground(e,n,o,i){const{xAlign:r,yAlign:l}=this,{x:a,y:d}=e,{width:c,height:u}=o,{topLeft:f,topRight:h,bottomLeft:p,bottomRight:m}=Et(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(a+f,d),l==="top"&&this.drawCaret(e,n,o,i),n.lineTo(a+c-h,d),n.quadraticCurveTo(a+c,d,a+c,d+h),l==="center"&&r==="right"&&this.drawCaret(e,n,o,i),n.lineTo(a+c,d+u-m),n.quadraticCurveTo(a+c,d+u,a+c-m,d+u),l==="bottom"&&this.drawCaret(e,n,o,i),n.lineTo(a+p,d+u),n.quadraticCurveTo(a,d+u,a,d+u-p),l==="center"&&r==="left"&&this.drawCaret(e,n,o,i),n.lineTo(a,d+f),n.quadraticCurveTo(a,d,a+f,d),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,o=this.$animations,i=o&&o.x,r=o&&o.y;if(i||r){const l=vn[e.position].call(this,this._active,this._eventPosition);if(!l)return;const a=this._size=Da(this,e),d=Object.assign({},l,this._size),c=Ea(n,e,d),u=Ma(e,d,c,n);(i._to!==u.x||r._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=l.x,this.caretY=l.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},r={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const l=be(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(e.save(),e.globalAlpha=o,this.drawBackground(r,e,i,n),fl(e,n.textDirection),r.y+=l.top,this.drawTitle(r,e,n),this.drawBody(r,e,n),this.drawFooter(r,e,n),hl(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const o=this._active,i=e.map(({datasetIndex:a,index:d})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[d],index:d}}),r=!Qn(o,i),l=this._positionChanged(i,n);(r||l)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,o=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,r=this._active||[],l=this._getActiveElements(e,r,n,o),a=this._positionChanged(l,e),d=n||!Qn(l,r)||a;return d&&(this._active=l,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),d}_getActiveElements(e,n,o,i){const r=this.options;if(e.type==="mouseout")return[];if(!i)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const l=this.chart.getElementsAtEventForMode(e,r.mode,r,o);return r.reverse&&l.reverse(),l}_positionChanged(e,n){const{caretX:o,caretY:i,options:r}=this,l=vn[r.position].call(this,e,n);return l!==!1&&(o!==l.x||i!==l.y)}}I(ns,"positioners",vn);var Pg={id:"tooltip",_element:ns,positioners:vn,afterInit(t,e,n){n&&(t.tooltip=new ns({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Pa},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Ng=Object.freeze({__proto__:null,Colors:Ym,Decimation:Xm,Filler:mg,Legend:wg,SubTitle:kg,Title:Cg,Tooltip:Pg});const Fg=(t,e,n,o)=>(typeof e=="string"?(n=t.push(e)-1,o.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function Rg(t,e,n,o){const i=t.indexOf(e);if(i===-1)return Fg(t,e,n,o);const r=t.lastIndexOf(e);return i!==r?n:i}const Ag=(t,e)=>t===null?null:pe(Math.round(t),0,e);function Na(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class os extends Ft{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const o=this.getLabels();for(const{index:i,label:r}of n)o[i]===r&&o.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(q(e))return null;const o=this.getLabels();return n=isFinite(n)&&o[n]===e?n:Rg(o,e,W(n,e),this._addedLabels),Ag(n,o.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:o,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(o=0),n||(i=this.getLabels().length-1)),this.min=o,this.max=i}buildTicks(){const e=this.min,n=this.max,o=this.options.offset,i=[];let r=this.getLabels();r=e===0&&n===r.length-1?r:r.slice(e,n+1),this._valueRange=Math.max(r.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let l=e;l<=n;l++)i.push({value:l});return i}getLabelForValue(e){return Na.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}I(os,"id","category"),I(os,"defaults",{ticks:{callback:Na}});function Og(t,e){const n=[],{bounds:i,step:r,min:l,max:a,precision:d,count:c,maxTicks:u,maxDigits:f,includeBounds:h}=t,p=r||1,m=u-1,{min:g,max:b}=e,y=!q(l),$=!q(a),k=!q(c),v=(b-g)/(f+1);let x=Or((b-g)/m/p)*p,B,M,N,F;if(x<1e-14&&!y&&!$)return[{value:g},{value:b}];F=Math.ceil(b/x)-Math.floor(g/x),F>m&&(x=Or(F*x/m/p)*p),q(d)||(B=Math.pow(10,d),x=Math.ceil(x*B)/B),i==="ticks"?(M=Math.floor(g/x)*x,N=Math.ceil(b/x)*x):(M=g,N=b),y&&$&&r&&Bf((a-l)/r,x/1e3)?(F=Math.round(Math.min((a-l)/x,u)),x=(a-l)/F,M=l,N=a):k?(M=y?l:M,N=$?a:N,F=c-1,x=(N-M)/F):(F=(N-M)/x,dn(F,Math.round(F),x/1e3)?F=Math.round(F):F=Math.ceil(F));const P=Math.max(Tr(x),Tr(M));B=Math.pow(10,q(d)?P:d),M=Math.round(M*B)/B,N=Math.round(N*B)/B;let w=0;for(y&&(h&&M!==l?(n.push({value:l}),M<l&&w++,dn(Math.round((M+w*x)*B)/B,l,Fa(l,v,t))&&w++):M<l&&w++);w<F;++w){const _=Math.round((M+w*x)*B)/B;if($&&_>a)break;n.push({value:_})}return $&&h&&N!==a?n.length&&dn(n[n.length-1].value,a,Fa(a,v,t))?n[n.length-1].value=a:n.push({value:a}):(!$||N===a)&&n.push({value:N}),n}function Fa(t,e,{horizontal:n,minRotation:o}){const i=Re(o),r=(n?Math.sin(i):Math.cos(i))||.001,l=.75*e*(""+t).length;return Math.min(e/r,l)}class Vo extends Ft{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return q(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:o}=this.getUserBounds();let{min:i,max:r}=this;const l=d=>i=n?i:d,a=d=>r=o?r:d;if(e){const d=je(i),c=je(r);d<0&&c<0?a(0):d>0&&c>0&&l(0)}if(i===r){let d=r===0?1:Math.abs(r*.05);a(r+d),e||l(i-d)}this.min=i,this.max=r}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:o}=e,i;return o?(i=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let o=this.getTickLimit();o=Math.max(2,o);const i={maxTicks:o,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},r=this._range||this,l=Og(i,r);return e.bounds==="ticks"&&Ir(l,this,"value"),e.reverse?(l.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),l}configure(){const e=this.ticks;let n=this.min,o=this.max;if(super.configure(),this.options.offset&&e.length){const i=(o-n)/Math.max(e.length-1,1)/2;n-=i,o+=i}this._startValue=n,this._endValue=o,this._valueRange=o-n}getLabelForValue(e){return fn(e,this.chart.options.locale,this.options.ticks.format)}}class is extends Vo{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=ae(e)?e:0,this.max=ae(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,o=Re(this.options.ticks.minRotation),i=(e?Math.sin(o):Math.cos(o))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,r.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}I(is,"id","linear"),I(is,"defaults",{ticks:{callback:oo.formatters.numeric}});const Dn=t=>Math.floor(ht(t)),Rt=(t,e)=>Math.pow(10,Dn(t)+e);function Ra(t){return t/Math.pow(10,Dn(t))===1}function Aa(t,e,n){const o=Math.pow(10,n),i=Math.floor(t/o);return Math.ceil(e/o)-i}function Ig(t,e){const n=e-t;let o=Dn(n);for(;Aa(t,e,o)>10;)o++;for(;Aa(t,e,o)<10;)o--;return Math.min(o,Dn(t))}function Tg(t,{min:e,max:n}){e=ve(t.min,e);const o=[],i=Dn(e);let r=Ig(e,n),l=r<0?Math.pow(10,Math.abs(r)):1;const a=Math.pow(10,r),d=i>r?Math.pow(10,i):0,c=Math.round((e-d)*l)/l,u=Math.floor((e-d)/a/10)*a*10;let f=Math.floor((c-u)/Math.pow(10,r)),h=ve(t.min,Math.round((d+u+f*Math.pow(10,r))*l)/l);for(;h<n;)o.push({value:h,major:Ra(h),significand:f}),f>=10?f=f<15?15:20:f++,f>=20&&(r++,f=2,l=r>=0?1:l),h=Math.round((d+u+f*Math.pow(10,r))*l)/l;const p=ve(t.max,h);return o.push({value:p,major:Ra(p),significand:f}),o}class ss extends Ft{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const o=Vo.prototype.parse.apply(this,[e,n]);if(o===0){this._zero=!0;return}return ae(o)&&o>0?o:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=ae(e)?Math.max(0,e):null,this.max=ae(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ae(this._userMin)&&(this.min=e===Rt(this.min,0)?Rt(this.min,-1):Rt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let o=this.min,i=this.max;const r=a=>o=e?o:a,l=a=>i=n?i:a;o===i&&(o<=0?(r(1),l(10)):(r(Rt(o,-1)),l(Rt(i,1)))),o<=0&&r(Rt(i,-1)),i<=0&&l(Rt(o,1)),this.min=o,this.max=i}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},o=Tg(n,this);return e.bounds==="ticks"&&Ir(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}getLabelForValue(e){return e===void 0?"0":fn(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=ht(e),this._valueRange=ht(this.max)-ht(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(ht(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}I(ss,"id","logarithmic"),I(ss,"defaults",{ticks:{callback:oo.formatters.logarithmic,major:{enabled:!0}}});function rs(t){const e=t.ticks;if(e.display&&t.display){const n=be(e.backdropPadding);return W(e.font&&e.font.size,de.font.size)+n.height}return 0}function Lg(t,e,n){return n=ne(n)?n:[n],{w:qf(t,e.string,n),h:n.length*e.lineHeight}}function Oa(t,e,n,o,i){return t===o||t===i?{start:e-n/2,end:e+n/2}:t<o||t>i?{start:e-n,end:e}:{start:e,end:e+n}}function zg(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),o=[],i=[],r=t._pointLabels.length,l=t.options.pointLabels,a=l.centerPointLabels?oe/r:0;for(let d=0;d<r;d++){const c=l.setContext(t.getPointLabelContext(d));i[d]=c.padding;const u=t.getPointPosition(d,t.drawingArea+i[d],a),f=fe(c.font),h=Lg(t.ctx,f,t._pointLabels[d]);o[d]=h;const p=De(t.getIndexAngle(d)+a),m=Math.round(Ci(p)),g=Oa(m,u.x,h.w,0,180),b=Oa(m,u.y,h.h,90,270);Hg(n,e,p,g,b)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=Yg(t,o,i)}function Hg(t,e,n,o,i){const r=Math.abs(Math.sin(n)),l=Math.abs(Math.cos(n));let a=0,d=0;o.start<e.l?(a=(e.l-o.start)/r,t.l=Math.min(t.l,e.l-a)):o.end>e.r&&(a=(o.end-e.r)/r,t.r=Math.max(t.r,e.r+a)),i.start<e.t?(d=(e.t-i.start)/l,t.t=Math.min(t.t,e.t-d)):i.end>e.b&&(d=(i.end-e.b)/l,t.b=Math.max(t.b,e.b+d))}function jg(t,e,n){const o=t.drawingArea,{extra:i,additionalAngle:r,padding:l,size:a}=n,d=t.getPointPosition(e,o+i+l,r),c=Math.round(Ci(De(d.angle+ce))),u=qg(d.y,a.h,c),f=Ug(c),h=Gg(d.x,a.w,f);return{visible:!0,x:d.x,y:u,textAlign:f,left:h,top:u,right:h+a.w,bottom:u+a.h}}function Wg(t,e){if(!e)return!0;const{left:n,top:o,right:i,bottom:r}=t;return!(Qe({x:n,y:o},e)||Qe({x:n,y:r},e)||Qe({x:i,y:o},e)||Qe({x:i,y:r},e))}function Yg(t,e,n){const o=[],i=t._pointLabels.length,r=t.options,{centerPointLabels:l,display:a}=r.pointLabels,d={extra:rs(r)/2,additionalAngle:l?oe/i:0};let c;for(let u=0;u<i;u++){d.padding=n[u],d.size=e[u];const f=jg(t,u,d);o.push(f),a==="auto"&&(f.visible=Wg(f,c),f.visible&&(c=f))}return o}function Ug(t){return t===0||t===180?"center":t<180?"left":"right"}function Gg(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function qg(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function Xg(t,e,n){const{left:o,top:i,right:r,bottom:l}=n,{backdropColor:a}=e;if(!q(a)){const d=Et(e.borderRadius),c=be(e.backdropPadding);t.fillStyle=a;const u=o-c.left,f=i-c.top,h=r-o+c.width,p=l-i+c.height;Object.values(d).some(m=>m!==0)?(t.beginPath(),pn(t,{x:u,y:f,w:h,h:p,radius:d}),t.fill()):t.fillRect(u,f,h,p)}}function Kg(t,e){const{ctx:n,options:{pointLabels:o}}=t;for(let i=e-1;i>=0;i--){const r=t._pointLabelItems[i];if(!r.visible)continue;const l=o.setContext(t.getPointLabelContext(i));Xg(n,l,r);const a=fe(l.font),{x:d,y:c,textAlign:u}=r;Dt(n,t._pointLabels[i],d,c+a.lineHeight/2,a,{color:l.color,textAlign:u,textBaseline:"middle"})}}function Ia(t,e,n,o){const{ctx:i}=t;if(n)i.arc(t.xCenter,t.yCenter,e,0,ie);else{let r=t.getPointPosition(0,e);i.moveTo(r.x,r.y);for(let l=1;l<o;l++)r=t.getPointPosition(l,e),i.lineTo(r.x,r.y)}}function Zg(t,e,n,o,i){const r=t.ctx,l=e.circular,{color:a,lineWidth:d}=e;!l&&!o||!a||!d||n<0||(r.save(),r.strokeStyle=a,r.lineWidth=d,r.setLineDash(i.dash),r.lineDashOffset=i.dashOffset,r.beginPath(),Ia(t,n,l,o),r.closePath(),r.stroke(),r.restore())}function Jg(t,e,n){return pt(t,{label:n,index:e,type:"pointLabel"})}class En extends Vo{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=be(rs(this.options)/2),n=this.width=this.maxWidth-e.width,o=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+o/2+e.top),this.drawingArea=Math.floor(Math.min(n,o)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=ae(e)&&!isNaN(e)?e:0,this.max=ae(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/rs(this.options))}generateTickLabels(e){Vo.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,o)=>{const i=te(this.options.pointLabels.callback,[n,o],this);return i||i===0?i:""}).filter((n,o)=>this.chart.getDataVisibility(o))}fit(){const e=this.options;e.display&&e.pointLabels.display?zg(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,o,i){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((o-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,o,i))}getIndexAngle(e){const n=ie/(this._pointLabels.length||1),o=this.options.startAngle||0;return De(e*n+Re(o))}getDistanceFromCenterForValue(e){if(q(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(q(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const o=n[e];return Jg(this.getContext(),e,o)}}getPointPosition(e,n,o=0){const i=this.getIndexAngle(e)-ce+o;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:o,right:i,bottom:r}=this._pointLabelItems[e];return{left:n,top:o,right:i,bottom:r}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const o=this.ctx;o.save(),o.beginPath(),Ia(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),o.closePath(),o.fillStyle=e,o.fill(),o.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:o,grid:i,border:r}=n,l=this._pointLabels.length;let a,d,c;if(n.pointLabels.display&&Kg(this,l),i.display&&this.ticks.forEach((u,f)=>{if(f!==0){d=this.getDistanceFromCenterForValue(u.value);const h=this.getContext(f),p=i.setContext(h),m=r.setContext(h);Zg(this,p,d,l,m)}}),o.display){for(e.save(),a=l-1;a>=0;a--){const u=o.setContext(this.getPointLabelContext(a)),{color:f,lineWidth:h}=u;!h||!f||(e.lineWidth=h,e.strokeStyle=f,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,d=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,d),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(c.x,c.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,o=n.ticks;if(!o.display)return;const i=this.getIndexAngle(0);let r,l;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((a,d)=>{if(d===0&&!n.reverse)return;const c=o.setContext(this.getContext(d)),u=fe(c.font);if(r=this.getDistanceFromCenterForValue(this.ticks[d].value),c.showLabelBackdrop){e.font=u.string,l=e.measureText(a.label).width,e.fillStyle=c.backdropColor;const f=be(c.backdropPadding);e.fillRect(-l/2-f.left,-r-u.size/2-f.top,l+f.width,u.size+f.height)}Dt(e,a.label,0,-r,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),e.restore()}drawTitle(){}}I(En,"id","radialLinear"),I(En,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:oo.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),I(En,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),I(En,"descriptors",{angleLines:{_fallback:"grid"}});const Bo={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ke=Object.keys(Bo);function Ta(t,e){return t-e}function La(t,e){if(q(e))return null;const n=t._adapter,{parser:o,round:i,isoWeekday:r}=t._parseOpts;let l=e;return typeof o=="function"&&(l=o(l)),ae(l)||(l=typeof o=="string"?n.parse(l,o):n.parse(l)),l===null?null:(i&&(l=i==="week"&&(zt(r)||r===!0)?n.startOf(l,"isoWeek",r):n.startOf(l,i)),+l)}function za(t,e,n,o){const i=ke.length;for(let r=ke.indexOf(t);r<i-1;++r){const l=Bo[ke[r]],a=l.steps?l.steps:Number.MAX_SAFE_INTEGER;if(l.common&&Math.ceil((n-e)/(a*l.size))<=o)return ke[r]}return ke[i-1]}function Qg(t,e,n,o,i){for(let r=ke.length-1;r>=ke.indexOf(n);r--){const l=ke[r];if(Bo[l].common&&t._adapter.diff(i,o,l)>=e-1)return l}return ke[n?ke.indexOf(n):0]}function e0(t){for(let e=ke.indexOf(t)+1,n=ke.length;e<n;++e)if(Bo[ke[e]].common)return ke[e]}function Ha(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:o,hi:i}=Si(n,e),r=n[o]>=e?n[o]:n[i];t[r]=!0}}function t0(t,e,n,o){const i=t._adapter,r=+i.startOf(e[0].value,o),l=e[e.length-1].value;let a,d;for(a=r;a<=l;a=+i.add(a,1,o))d=n[a],d>=0&&(e[d].major=!0);return e}function ja(t,e,n){const o=[],i={},r=e.length;let l,a;for(l=0;l<r;++l)a=e[l],i[a]=l,o.push({value:a,major:!1});return r===0||!n?o:t0(t,o,i,n)}class Mn extends Ft{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const o=e.time||(e.time={}),i=this._adapter=new cp._date(e.adapters.date);i.init(n),ln(o.displayFormats,i.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:La(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,o=e.time.unit||"day";let{min:i,max:r,minDefined:l,maxDefined:a}=this.getUserBounds();function d(c){!l&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!a&&!isNaN(c.max)&&(r=Math.max(r,c.max))}(!l||!a)&&(d(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&d(this.getMinMax(!1))),i=ae(i)&&!isNaN(i)?i:+n.startOf(Date.now(),o),r=ae(r)&&!isNaN(r)?r:+n.endOf(Date.now(),o)+1,this.min=Math.min(i,r-1),this.max=Math.max(i+1,r)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],o=e[e.length-1]),{min:n,max:o}}buildTicks(){const e=this.options,n=e.time,o=e.ticks,i=o.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const r=this.min,l=this.max,a=Rf(i,r,l);return this._unit=n.unit||(o.autoSkip?za(n.minUnit,this.min,this.max,this._getLabelCapacity(r)):Qg(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:e0(this._unit),this.initOffsets(i),e.reverse&&a.reverse(),ja(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,o=0,i,r;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,r=this.getDecimalForValue(e[e.length-1]),e.length===1?o=r:o=(r-this.getDecimalForValue(e[e.length-2]))/2);const l=e.length<3?.5:.25;n=pe(n,0,l),o=pe(o,0,l),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const e=this._adapter,n=this.min,o=this.max,i=this.options,r=i.time,l=r.unit||za(r.minUnit,n,o,this._getLabelCapacity(n)),a=W(i.ticks.stepSize,1),d=l==="week"?r.isoWeekday:!1,c=zt(d)||d===!0,u={};let f=n,h,p;if(c&&(f=+e.startOf(f,"isoWeek",d)),f=+e.startOf(f,c?"day":l),e.diff(o,n,l)>1e5*a)throw new Error(n+" and "+o+" are too far apart with stepSize of "+a+" "+l);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(h=f,p=0;h<o;h=+e.add(h,a,l),p++)Ha(u,h,m);return(h===o||i.bounds==="ticks"||p===1)&&Ha(u,h,m),Object.keys(u).sort(Ta).map(g=>+g)}getLabelForValue(e){const n=this._adapter,o=this.options.time;return o.tooltipFormat?n.format(e,o.tooltipFormat):n.format(e,o.displayFormats.datetime)}format(e,n){const i=this.options.time.displayFormats,r=this._unit,l=n||i[r];return this._adapter.format(e,l)}_tickFormatFunction(e,n,o,i){const r=this.options,l=r.ticks.callback;if(l)return te(l,[e,n,o],this);const a=r.time.displayFormats,d=this._unit,c=this._majorUnit,u=d&&a[d],f=c&&a[c],h=o[n],p=c&&f&&h&&h.major;return this._adapter.format(e,i||(p?f:u))}generateTickLabels(e){let n,o,i;for(n=0,o=e.length;n<o;++n)i=e[n],i.label=this._tickFormatFunction(i.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,o=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+o)*n.factor)}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+o*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,o=this.ctx.measureText(e).width,i=Re(this.isHorizontal()?n.maxRotation:n.minRotation),r=Math.cos(i),l=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:o*r+a*l,h:o*l+a*r}}_getLabelCapacity(e){const n=this.options.time,o=n.displayFormats,i=o[n.unit]||o.millisecond,r=this._tickFormatFunction(e,0,ja(this,[e],this._majorUnit),i),l=this._getLabelSize(r),a=Math.floor(this.isHorizontal()?this.width/l.w:this.height/l.h)-1;return a>0?a:1}getDataTimestamps(){let e=this._cache.data||[],n,o;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,o=i.length;n<o;++n)e=e.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,o;if(e.length)return e;const i=this.getLabels();for(n=0,o=i.length;n<o;++n)e.push(La(this,i[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return jr(e.sort(Ta))}}I(Mn,"id","time"),I(Mn,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Po(t,e,n){let o=0,i=t.length-1,r,l,a,d;n?(e>=t[o].pos&&e<=t[i].pos&&({lo:o,hi:i}=Je(t,"pos",e)),{pos:r,time:a}=t[o],{pos:l,time:d}=t[i]):(e>=t[o].time&&e<=t[i].time&&({lo:o,hi:i}=Je(t,"time",e)),{time:r,pos:a}=t[o],{time:l,pos:d}=t[i]);const c=l-r;return c?a+(d-a)*(e-r)/c:a}class ls extends Mn{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=Po(n,this.min),this._tableRange=Po(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:o}=this,i=[],r=[];let l,a,d,c,u;for(l=0,a=e.length;l<a;++l)c=e[l],c>=n&&c<=o&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(l=0,a=i.length;l<a;++l)u=i[l+1],d=i[l-1],c=i[l],Math.round((u+d)/2)!==c&&r.push({time:c,pos:l/(a-1)});return r}_generate(){const e=this.min,n=this.max;let o=super.getDataTimestamps();return(!o.includes(e)||!o.length)&&o.splice(0,0,e),(!o.includes(n)||o.length===1)&&o.push(n),o.sort((i,r)=>i-r)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),o=this.getLabelTimestamps();return n.length&&o.length?e=this.normalize(n.concat(o)):e=n.length?n:o,e=this._cache.all=e,e}getDecimalForValue(e){return(Po(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return Po(this._table,o*this._tableRange+this._minPos,!0)}}I(ls,"id","timeseries"),I(ls,"defaults",Mn.defaults);var n0=Object.freeze({__proto__:null,CategoryScale:os,LinearScale:is,LogarithmicScale:ss,RadialLinearScale:En,TimeScale:Mn,TimeSeriesScale:ls});const o0=[dp,Tm,Ng,n0];Oe.register(...o0);const i0={class:"flex flex-col h-full m-24 overflow-hidden p-24"},s0={class:"flex flex-col gap-8"},r0={class:"fm-color-typo-primary fm-typo-body-lg-400"},l0={class:"fm-color-typo-secondary fm-typo-body-md-400"},a0={class:"grow"},d0=s.defineComponent({__name:"FmLine",props:{name:{default:void 0},paragraph:{default:void 0},datasets:{},xAxis:{},transpose:{type:Boolean,default:!1},stacked:{type:Boolean},maintainAspectRatio:{type:Boolean}},setup(t){const e=t,n=s.ref(null);let o=null;s.watch([()=>e.transpose,()=>e.maintainAspectRatio],()=>{o&&o.config.options&&(o.destroy(),a())});const i=s.computed(()=>e.transpose?"y":"x");function r({context:d,color:c}){const{ctx:u,chartArea:f}=d.chart;if(!f)return;const h=u==null?void 0:u.createLinearGradient(0,0,0,f.height);return h.addColorStop(0,pi(c,.5)),h.addColorStop(1,pi(c,0)),h}const l=s.computed(()=>({labels:e.xAxis.categories,datasets:e.datasets.map(d=>{const c=tn(d.color)??"";return{...d,backgroundColor:c?u=>r({context:u,color:c}):"",borderColor:c,borderDash:d.dash?[5,5]:void 0,tension:.1}})}));s.watch(l,()=>{o&&(o.data=l.value,o.update())},{deep:!0});function a(){n.value&&(o=new Oe(n.value,{type:"line",data:l.value,options:{plugins:{legend:{display:e.datasets.length>1,position:"bottom",labels:{usePointStyle:!0,pointStyle:"line"}}},maintainAspectRatio:e.maintainAspectRatio,responsive:!0,indexAxis:i.value,scales:{x:{stacked:e.stacked,grid:{display:!1},beginAtZero:!0},y:{stacked:e.stacked,grid:{display:!0},position:"right",beginAtZero:!0}},elements:{line:{borderWidth:1.5},point:{radius:0,hitRadius:30,hoverRadius:6,hoverBackgroundColor:"#FFFFFF",hoverBorderWidth:3}}}}))}return s.onMounted(()=>{a()}),(d,c)=>(s.openBlock(),s.createElementBlock("div",i0,[s.createElementVNode("div",s0,[s.renderSlot(d.$slots,"title"),s.createElementVNode("div",r0,s.toDisplayString(d.name),1),s.createElementVNode("div",l0,s.toDisplayString(d.paragraph),1)]),s.createElementVNode("div",a0,[s.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)])]))}}),c0={class:"flex flex-col h-full overflow-hidden px-24 py-16"},u0={class:"flex flex-col gap-8"},f0={class:"fm-color-typo-primary fm-typo-body-lg-400"},h0={class:"fm-color-typo-secondary fm-typo-body-md-400"},p0={class:"grow"},m0=s.defineComponent({__name:"FmPie",props:{name:{default:void 0},variant:{},paragraph:{default:void 0},datasets:{},metrics:{},legend:{type:Boolean,default:!0},text:{default:void 0},textColor:{default:"#0E1715"},textStyle:{default:"bold 30px sans-serif"},maintainAspectRatio:{type:Boolean,default:!0}},setup(t){const e=t,n=s.ref(null);let o=null;const i=s.computed(()=>e.variant==="doughnut"?"90%":"0"),r=s.computed(()=>e.text);s.watch([()=>e.metrics,()=>e.datasets,()=>e.variant,()=>e.legend,()=>e.textColor,()=>e.textStyle,()=>e.text,()=>e.maintainAspectRatio],()=>{o&&(o.destroy(),a())});const l=s.computed(()=>({labels:e.metrics,datasets:e.datasets.map(d=>{var u;const c=(u=d.backgroundColor)==null?void 0:u.map(f=>tn(f)??"");return{...d,backgroundColor:c??void 0,hoverOffset:d.hoverOffset??0}})}));function a(){n.value&&(o=new Oe(n.value,{type:"doughnut",data:l.value,options:{maintainAspectRatio:e.maintainAspectRatio,responsive:!0,cutout:i.value,plugins:{legend:{display:e.legend,position:"bottom",labels:{usePointStyle:!0}}}},plugins:[{id:"doughnutlabel",beforeDatasetsDraw:d=>{if(e.variant==="doughnut"){const{ctx:c}=d;c.save();const u=d.getDatasetMeta(0).data[0].x,f=d.getDatasetMeta(0).data[0].y;if(c.font=e.textStyle,c.textAlign="center",c.textBaseline="middle",r.value&&r.value!==""){const h=r.value.split(`
|
|
27
|
+
`);for(let p=0;p<h.length;p++){const m=p===0?1:.7;c.fillStyle=pi(tn(e.textColor)??"",m),c.fillText(h[p],u,f+p*40)}}}}}]}))}return s.onMounted(()=>{a()}),(d,c)=>(s.openBlock(),s.createElementBlock("div",c0,[s.createElementVNode("div",u0,[s.renderSlot(d.$slots,"title"),s.createElementVNode("div",f0,s.toDisplayString(d.name),1),s.createElementVNode("div",h0,s.toDisplayString(d.paragraph),1)]),s.createElementVNode("div",p0,[s.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)])]))}}),g0={class:"flex flex-col h-full overflow-hidden px-24 py-16"},b0={class:"flex flex-col gap-8"},y0={class:"fm-color-typo-primary fm-typo-body-lg-400"},$0={class:"fm-color-typo-secondary fm-typo-body-md-400"},_0={class:"grow"},w0=s.defineComponent({__name:"FmBar",props:{name:{default:void 0},paragraph:{default:void 0},datasets:{},xAxis:{},transpose:{type:Boolean,default:!1},stacked:{type:Boolean,default:!1},maintainAspectRatio:{type:Boolean,default:!0}},setup(t){const e=t,n=s.ref(null);let o=null;s.watch([()=>e.transpose,()=>e.maintainAspectRatio],()=>{o&&(o.destroy(),l())});const i=s.computed(()=>e.transpose?"y":"x"),r=s.computed(()=>({labels:e.xAxis.categories,datasets:e.datasets.map(a=>{var u;let d,c;return typeof a.backgroundColor=="string"?d=a.backgroundColor:typeof a.backgroundColor=="object"&&(d=a.backgroundColor.map(f=>tn(f)??"")),typeof a.borderColor=="string"?c=a.borderColor:typeof a.borderColor=="object"&&(c=(u=a.borderColor)==null?void 0:u.map(f=>tn(f)??"")),{...a,backgroundColor:d,borderColor:c,borderRadius:10,borderWidth:c?1:0}})}));s.watch(r,()=>{o&&(o.data=r.value,o.update())},{deep:!0});function l(){n.value&&(o=new Oe(n.value,{type:"bar",data:r.value,options:{plugins:{legend:{display:e.datasets.length>1,position:"bottom"}},maintainAspectRatio:e.maintainAspectRatio,responsive:!0,indexAxis:i.value,scales:{x:{stacked:e.stacked,grid:{display:!1},beginAtZero:!0},y:{stacked:e.stacked,grid:{display:!1},position:"right",beginAtZero:!0}},elements:{point:{radius:0,hitRadius:30,hoverRadius:6,hoverBackgroundColor:"#FFFFFF",hoverBorderWidth:3}}}}))}return s.onMounted(()=>{l()}),(a,d)=>(s.openBlock(),s.createElementBlock("div",g0,[s.createElementVNode("div",b0,[s.renderSlot(a.$slots,"title"),s.createElementVNode("div",y0,s.toDisplayString(a.name),1),s.createElementVNode("div",$0,s.toDisplayString(a.paragraph),1)]),s.createElementVNode("div",_0,[s.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)])]))}});function $e(t,e){return t===null||e===null||typeof t!="object"&&typeof e!="object"?t===e:Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>$e(t[n],e[n]))}const x0={class:"fm-checkbox"},C0={class:"fm-checkbox--wrapper"},k0={class:"fm-checkbox__input--container"},S0=["checked","disabled","indeterminate"],v0={key:0,class:"fm-checkbox__label-container"},D0={class:"fm-typo-body-lg-400"},E0={key:0,class:"fm-color-typo-secondary fm-typo-body-md-400"},Wa=s.defineComponent({__name:"FmCheckbox",props:{modelValue:{type:[Boolean,Array]},label:{default:""},sublabel:{default:""},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},value:{}},emits:["update:modelValue","update:indeterminate"],setup(t){const e=t,n=X(e,"modelValue"),o=X(e,"indeterminate"),i=Array.isArray(n.value),r=s.ref(i?n.value.some(d=>$e(d,e.value)):n.value),l=s.computed(()=>{const d=i?n.value.some(c=>$e(c,e.value)):n.value;return o.value&&!d?"remove":n.value?"check_small":""});function a(){if(e.disabled)return;o.value=!1,r.value=!r.value;let d=n.value;i?d=r.value?d.concat(e.value):d.filter(c=>!$e(c,e.value)):d=r.value,n.value=d}return s.watch(()=>n.value,()=>{r.value=i?n.value.some(d=>$e(d,e.value)):n.value}),(d,c)=>(s.openBlock(),s.createElementBlock("div",x0,[s.createElementVNode("label",C0,[s.createElementVNode("div",k0,[s.createElementVNode("input",{class:s.normalizeClass({"fm-checkbox__input--btn":!0,"fm-checkbox__input--btn--checked":r.value}),type:"checkbox",checked:r.value,disabled:e.disabled,indeterminate:s.unref(o),onInput:a},null,42,S0),s.unref(o)||r.value?(s.openBlock(),s.createBlock(z,{key:0,class:"fm-checkbox__input--checkmark",name:l.value,size:"md",color:"#FFFFFF"},null,8,["name"])):s.createCommentVNode("",!0)]),e.label?(s.openBlock(),s.createElementBlock("div",v0,[s.renderSlot(d.$slots,"label"),s.createElementVNode("div",D0,s.toDisplayString(e.label),1),e.sublabel?(s.openBlock(),s.createElementBlock("div",E0,s.toDisplayString(e.sublabel),1)):s.createCommentVNode("",!0)])):s.createCommentVNode("",!0)])]))}}),kw="";function No(){const t=s.ref(window.innerWidth),e=()=>{t.value=window.innerWidth};return s.onMounted(()=>{window.addEventListener("resize",e)}),s.onUnmounted(()=>{window.removeEventListener("resize",e)}),{breakpoints:s.computed(()=>({xs:t.value>=0&&t.value<=647,sm:t.value>=648&&t.value<=959,md:t.value>=960&&t.value<=1247,lg:t.value>=1248}))}}var M0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function as(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ya={exports:{}};(function(t,e){(function(n,o){t.exports=o()})(M0,function(){var n=1e3,o=6e4,i=36e5,r="millisecond",l="second",a="minute",d="hour",c="day",u="week",f="month",h="quarter",p="year",m="date",g="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,$={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(S){var D=["th","st","nd","rd"],C=S%100;return"["+S+(D[(C-20)%10]||D[C]||D[0])+"]"}},k=function(S,D,C){var V=String(S);return!V||V.length>=D?S:""+Array(D+1-V.length).join(C)+S},v={s:k,z:function(S){var D=-S.utcOffset(),C=Math.abs(D),V=Math.floor(C/60),A=C%60;return(D<=0?"+":"-")+k(V,2,"0")+":"+k(A,2,"0")},m:function S(D,C){if(D.date()<C.date())return-S(C,D);var V=12*(C.year()-D.year())+(C.month()-D.month()),A=D.clone().add(V,f),L=C-A<0,T=D.clone().add(V+(L?-1:1),f);return+(-(V+(C-A)/(L?A-T:T-A))||0)},a:function(S){return S<0?Math.ceil(S)||0:Math.floor(S)},p:function(S){return{M:f,y:p,w:u,d:c,D:m,h:d,m:a,s:l,ms:r,Q:h}[S]||String(S||"").toLowerCase().replace(/s$/,"")},u:function(S){return S===void 0}},x="en",B={};B[x]=$;var M="$isDayjsObject",N=function(S){return S instanceof _||!(!S||!S[M])},F=function S(D,C,V){var A;if(!D)return x;if(typeof D=="string"){var L=D.toLowerCase();B[L]&&(A=L),C&&(B[L]=C,A=L);var T=D.split("-");if(!A&&T.length>1)return S(T[0])}else{var j=D.name;B[j]=D,A=j}return!V&&A&&(x=A),A||!V&&x},P=function(S,D){if(N(S))return S.clone();var C=typeof D=="object"?D:{};return C.date=S,C.args=arguments,new _(C)},w=v;w.l=F,w.i=N,w.w=function(S,D){return P(S,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var _=function(){function S(C){this.$L=F(C.locale,null,!0),this.parse(C),this.$x=this.$x||C.x||{},this[M]=!0}var D=S.prototype;return D.parse=function(C){this.$d=function(V){var A=V.date,L=V.utc;if(A===null)return new Date(NaN);if(w.u(A))return new Date;if(A instanceof Date)return new Date(A);if(typeof A=="string"&&!/Z$/i.test(A)){var T=A.match(b);if(T){var j=T[2]-1||0,Y=(T[7]||"0").substring(0,3);return L?new Date(Date.UTC(T[1],j,T[3]||1,T[4]||0,T[5]||0,T[6]||0,Y)):new Date(T[1],j,T[3]||1,T[4]||0,T[5]||0,T[6]||0,Y)}}return new Date(A)}(C),this.init()},D.init=function(){var C=this.$d;this.$y=C.getFullYear(),this.$M=C.getMonth(),this.$D=C.getDate(),this.$W=C.getDay(),this.$H=C.getHours(),this.$m=C.getMinutes(),this.$s=C.getSeconds(),this.$ms=C.getMilliseconds()},D.$utils=function(){return w},D.isValid=function(){return this.$d.toString()!==g},D.isSame=function(C,V){var A=P(C);return this.startOf(V)<=A&&A<=this.endOf(V)},D.isAfter=function(C,V){return P(C)<this.startOf(V)},D.isBefore=function(C,V){return this.endOf(V)<P(C)},D.$g=function(C,V,A){return w.u(C)?this[V]:this.set(A,C)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(C,V){var A=this,L=!!w.u(V)||V,T=w.p(C),j=function(Pe,ee){var se=w.w(A.$u?Date.UTC(A.$y,ee,Pe):new Date(A.$y,ee,Pe),A);return L?se:se.endOf(c)},Y=function(Pe,ee){return w.w(A.toDate()[Pe].apply(A.toDate("s"),(L?[0,0,0,0]:[23,59,59,999]).slice(ee)),A)},U=this.$W,J=this.$M,re=this.$D,ue="set"+(this.$u?"UTC":"");switch(T){case p:return L?j(1,0):j(31,11);case f:return L?j(1,J):j(0,J+1);case u:var Be=this.$locale().weekStart||0,ze=(U<Be?U+7:U)-Be;return j(L?re-ze:re+(6-ze),J);case c:case m:return Y(ue+"Hours",0);case d:return Y(ue+"Minutes",1);case a:return Y(ue+"Seconds",2);case l:return Y(ue+"Milliseconds",3);default:return this.clone()}},D.endOf=function(C){return this.startOf(C,!1)},D.$set=function(C,V){var A,L=w.p(C),T="set"+(this.$u?"UTC":""),j=(A={},A[c]=T+"Date",A[m]=T+"Date",A[f]=T+"Month",A[p]=T+"FullYear",A[d]=T+"Hours",A[a]=T+"Minutes",A[l]=T+"Seconds",A[r]=T+"Milliseconds",A)[L],Y=L===c?this.$D+(V-this.$W):V;if(L===f||L===p){var U=this.clone().set(m,1);U.$d[j](Y),U.init(),this.$d=U.set(m,Math.min(this.$D,U.daysInMonth())).$d}else j&&this.$d[j](Y);return this.init(),this},D.set=function(C,V){return this.clone().$set(C,V)},D.get=function(C){return this[w.p(C)]()},D.add=function(C,V){var A,L=this;C=Number(C);var T=w.p(V),j=function(J){var re=P(L);return w.w(re.date(re.date()+Math.round(J*C)),L)};if(T===f)return this.set(f,this.$M+C);if(T===p)return this.set(p,this.$y+C);if(T===c)return j(1);if(T===u)return j(7);var Y=(A={},A[a]=o,A[d]=i,A[l]=n,A)[T]||1,U=this.$d.getTime()+C*Y;return w.w(U,this)},D.subtract=function(C,V){return this.add(-1*C,V)},D.format=function(C){var V=this,A=this.$locale();if(!this.isValid())return A.invalidDate||g;var L=C||"YYYY-MM-DDTHH:mm:ssZ",T=w.z(this),j=this.$H,Y=this.$m,U=this.$M,J=A.weekdays,re=A.months,ue=A.meridiem,Be=function(ee,se,we,xe){return ee&&(ee[se]||ee(V,L))||we[se].slice(0,xe)},ze=function(ee){return w.s(j%12||12,ee,"0")},Pe=ue||function(ee,se,we){var xe=ee<12?"AM":"PM";return we?xe.toLowerCase():xe};return L.replace(y,function(ee,se){return se||function(we){switch(we){case"YY":return String(V.$y).slice(-2);case"YYYY":return w.s(V.$y,4,"0");case"M":return U+1;case"MM":return w.s(U+1,2,"0");case"MMM":return Be(A.monthsShort,U,re,3);case"MMMM":return Be(re,U);case"D":return V.$D;case"DD":return w.s(V.$D,2,"0");case"d":return String(V.$W);case"dd":return Be(A.weekdaysMin,V.$W,J,2);case"ddd":return Be(A.weekdaysShort,V.$W,J,3);case"dddd":return J[V.$W];case"H":return String(j);case"HH":return w.s(j,2,"0");case"h":return ze(1);case"hh":return ze(2);case"a":return Pe(j,Y,!0);case"A":return Pe(j,Y,!1);case"m":return String(Y);case"mm":return w.s(Y,2,"0");case"s":return String(V.$s);case"ss":return w.s(V.$s,2,"0");case"SSS":return w.s(V.$ms,3,"0");case"Z":return T}return null}(ee)||T.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(C,V,A){var L,T=this,j=w.p(V),Y=P(C),U=(Y.utcOffset()-this.utcOffset())*o,J=this-Y,re=function(){return w.m(T,Y)};switch(j){case p:L=re()/12;break;case f:L=re();break;case h:L=re()/3;break;case u:L=(J-U)/6048e5;break;case c:L=(J-U)/864e5;break;case d:L=J/i;break;case a:L=J/o;break;case l:L=J/n;break;default:L=J}return A?L:w.a(L)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return B[this.$L]},D.locale=function(C,V){if(!C)return this.$L;var A=this.clone(),L=F(C,V,!0);return L&&(A.$L=L),A},D.clone=function(){return w.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},S}(),E=_.prototype;return P.prototype=E,[["$ms",r],["$s",l],["$m",a],["$H",d],["$W",c],["$M",f],["$y",p],["$D",m]].forEach(function(S){E[S[1]]=function(D){return this.$g(D,S[0],S[1])}}),P.extend=function(S,D){return S.$i||(S(D,_,P),S.$i=!0),P},P.locale=F,P.isDayjs=N,P.unix=function(S){return P(1e3*S)},P.en=B[x],P.Ls=B,P.p={},P})})(Ya);var V0=Ya.exports;const R=as(V0),B0={class:"w-full"},P0=s.defineComponent({__name:"FmField",props:{tag:{default:"div"},prependIcon:{default:""},appendIcon:{default:""},invalid:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1}},setup(t){const e=t;return(n,o)=>(s.openBlock(),s.createBlock(e.tag,{class:s.normalizeClass({"fm-field":!0,"fm-field--focused":n.focused,"fm-field--invalid":n.invalid,"fm-field--valid":n.showValidBorder&&!n.invalid,"fm-field--disabled":n.disabled})},{default:s.withCtx(()=>[s.renderSlot(n.$slots,"prepend",{},()=>[n.prependIcon?(s.openBlock(),s.createBlock(z,{key:0,name:n.prependIcon,size:"md",color:n.disabled?"disabled":"neutral-black"},null,8,["name","color"])):s.createCommentVNode("",!0)],!0),s.createElementVNode("div",B0,[s.renderSlot(n.$slots,"default",{},void 0,!0)]),s.renderSlot(n.$slots,"append",{},()=>[n.appendIcon?(s.openBlock(),s.createBlock(z,{key:0,name:n.appendIcon,size:"md",color:n.disabled?"disabled":"neutral-black"},null,8,["name","color"])):s.createCommentVNode("",!0)],!0)]),_:3},8,["class"]))}}),Sw="",me=Z(P0,[["__scopeId","data-v-2c5cb6d8"]]),N0={class:"flex gap-4"},Ua=s.defineComponent({__name:"FmHelperText",props:{text:{default:""},disabled:{type:Boolean,default:!1},state:{default:"none"},errorMessages:{default:()=>[]}},setup(t){const e=t,n=s.computed(()=>e.state==="success"?"check_circle":e.state==="warning"?"warning":e.state==="error"?"error":""),o=s.computed(()=>e.state==="success"?"text-fm-color-system-success-300":e.state==="warning"?"text-fm-color-system-warning-300":e.state==="error"?"text-fm-color-system-error-300":"");return(i,r)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["fm-typo-body-sm-400",{"text-fm-color-typo-disabled":i.disabled,"text-fm-color-typo-secondary":i.state==="none"&&!i.disabled,"text-fm-color-typo-success":i.state==="success"&&!i.disabled,"text-fm-color-typo-warning":i.state==="warning"&&!i.disabled,"text-fm-color-typo-error":i.state==="error"&&!i.disabled}])},[i.errorMessages.length===0?s.renderSlot(i.$slots,"default",{key:0},()=>[s.createElementVNode("div",N0,[n.value?(s.openBlock(),s.createBlock(z,{key:0,size:"sm",name:n.value,class:s.normalizeClass(["mt-[2px]",o.value])},null,8,["name","class"])):s.createCommentVNode("",!0),s.createElementVNode("span",null,s.toDisplayString(i.text),1)])]):s.renderSlot(i.$slots,"default",{key:1},()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.errorMessages,l=>(s.openBlock(),s.createElementBlock("div",{key:l,class:"flex gap-4 text-fm-color-typo-error"},[s.createVNode(z,{size:"sm",name:"error",class:"mt-[2px] text-fm-color-system-error-300"}),s.createElementVNode("span",null,s.toDisplayString(l),1)]))),128))])],2))}}),Ut=Math.min,At=Math.max,Fo=Math.round,Ro=Math.floor,bt=t=>({x:t,y:t}),F0={left:"right",right:"left",bottom:"top",top:"bottom"},R0={start:"end",end:"start"};function ds(t,e,n){return At(t,Ut(e,n))}function Vn(t,e){return typeof t=="function"?t(e):t}function Ot(t){return t.split("-")[0]}function Bn(t){return t.split("-")[1]}function Ga(t){return t==="x"?"y":"x"}function cs(t){return t==="y"?"height":"width"}function Ao(t){return["top","bottom"].includes(Ot(t))?"y":"x"}function us(t){return Ga(Ao(t))}function A0(t,e,n){n===void 0&&(n=!1);const o=Bn(t),i=us(t),r=cs(i);let l=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(l=Oo(l)),[l,Oo(l)]}function O0(t){const e=Oo(t);return[fs(t),e,fs(e)]}function fs(t){return t.replace(/start|end/g,e=>R0[e])}function I0(t,e,n){const o=["left","right"],i=["right","left"],r=["top","bottom"],l=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?r:l;default:return[]}}function T0(t,e,n,o){const i=Bn(t);let r=I0(Ot(t),n==="start",o);return i&&(r=r.map(l=>l+"-"+i),e&&(r=r.concat(r.map(fs)))),r}function Oo(t){return t.replace(/left|right|bottom|top/g,e=>F0[e])}function L0(t){return{top:0,right:0,bottom:0,left:0,...t}}function qa(t){return typeof t!="number"?L0(t):{top:t,right:t,bottom:t,left:t}}function Io(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Xa(t,e,n){let{reference:o,floating:i}=t;const r=Ao(e),l=us(e),a=cs(l),d=Ot(e),c=r==="y",u=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,h=o[a]/2-i[a]/2;let p;switch(d){case"top":p={x:u,y:o.y-i.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:f};break;case"left":p={x:o.x-i.width,y:f};break;default:p={x:o.x,y:o.y}}switch(Bn(e)){case"start":p[l]-=h*(n&&c?-1:1);break;case"end":p[l]+=h*(n&&c?-1:1);break}return p}const z0=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:l}=n,a=r.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(e));let c=await l.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=Xa(c,o,d),h=o,p={},m=0;for(let g=0;g<a.length;g++){const{name:b,fn:y}=a[g],{x:$,y:k,data:v,reset:x}=await y({x:u,y:f,initialPlacement:o,placement:h,strategy:i,middlewareData:p,rects:c,platform:l,elements:{reference:t,floating:e}});if(u=$??u,f=k??f,p={...p,[b]:{...p[b],...v}},x&&m<=50){m++,typeof x=="object"&&(x.placement&&(h=x.placement),x.rects&&(c=x.rects===!0?await l.getElementRects({reference:t,floating:e,strategy:i}):x.rects),{x:u,y:f}=Xa(c,h,d)),g=-1;continue}}return{x:u,y:f,placement:h,strategy:i,middlewareData:p}};async function Ka(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:r,rects:l,elements:a,strategy:d}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=Vn(e,t),m=qa(p),b=a[h?f==="floating"?"reference":"floating":f],y=Io(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(b)))==null||n?b:b.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:d})),$=f==="floating"?{...l.floating,x:o,y:i}:l.reference,k=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a.floating)),v=await(r.isElement==null?void 0:r.isElement(k))?await(r.getScale==null?void 0:r.getScale(k))||{x:1,y:1}:{x:1,y:1},x=Io(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({rect:$,offsetParent:k,strategy:d}):$);return{top:(y.top-x.top+m.top)/v.y,bottom:(x.bottom-y.bottom+m.bottom)/v.y,left:(y.left-x.left+m.left)/v.x,right:(x.right-y.right+m.right)/v.x}}const H0=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:r,platform:l,elements:a,middlewareData:d}=e,{element:c,padding:u=0}=Vn(t,e)||{};if(c==null)return{};const f=qa(u),h={x:n,y:o},p=us(i),m=cs(p),g=await l.getDimensions(c),b=p==="y",y=b?"top":"left",$=b?"bottom":"right",k=b?"clientHeight":"clientWidth",v=r.reference[m]+r.reference[p]-h[p]-r.floating[m],x=h[p]-r.reference[p],B=await(l.getOffsetParent==null?void 0:l.getOffsetParent(c));let M=B?B[k]:0;(!M||!await(l.isElement==null?void 0:l.isElement(B)))&&(M=a.floating[k]||r.floating[m]);const N=v/2-x/2,F=M/2-g[m]/2-1,P=Ut(f[y],F),w=Ut(f[$],F),_=P,E=M-g[m]-w,S=M/2-g[m]/2+N,D=ds(_,S,E),C=!d.arrow&&Bn(i)!=null&&S!=D&&r.reference[m]/2-(S<_?P:w)-g[m]/2<0,V=C?S<_?S-_:S-E:0;return{[p]:h[p]+V,data:{[p]:D,centerOffset:S-D-V,...C&&{alignmentOffset:V}},reset:C}}}),Pn=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:l,initialPlacement:a,platform:d,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...b}=Vn(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const y=Ot(i),$=Ot(a)===a,k=await(d.isRTL==null?void 0:d.isRTL(c.floating)),v=h||($||!g?[Oo(a)]:O0(a));!h&&m!=="none"&&v.push(...T0(a,g,m,k));const x=[a,...v],B=await Ka(e,b),M=[];let N=((o=r.flip)==null?void 0:o.overflows)||[];if(u&&M.push(B[y]),f){const _=A0(i,l,k);M.push(B[_[0]],B[_[1]])}if(N=[...N,{placement:i,overflows:M}],!M.every(_=>_<=0)){var F,P;const _=(((F=r.flip)==null?void 0:F.index)||0)+1,E=x[_];if(E)return{data:{index:_,overflows:N},reset:{placement:E}};let S=(P=N.filter(D=>D.overflows[0]<=0).sort((D,C)=>D.overflows[1]-C.overflows[1])[0])==null?void 0:P.placement;if(!S)switch(p){case"bestFit":{var w;const D=(w=N.map(C=>[C.placement,C.overflows.filter(V=>V>0).reduce((V,A)=>V+A,0)]).sort((C,V)=>C[1]-V[1])[0])==null?void 0:w[0];D&&(S=D);break}case"initialPlacement":S=a;break}if(i!==S)return{reset:{placement:S}}}return{}}}};async function j0(t,e){const{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),l=Ot(n),a=Bn(n),d=Ao(n)==="y",c=["left","top"].includes(l)?-1:1,u=r&&d?-1:1,f=Vn(e,t);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof m=="number"&&(p=a==="end"?m*-1:m),d?{x:p*u,y:h*c}:{x:h*c,y:p*u}}const Nn=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:l,middlewareData:a}=e,d=await j0(e,t);return l===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:i+d.x,y:r+d.y,data:{...d,placement:l}}}}},W0=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:l=!1,limiter:a={fn:b=>{let{x:y,y:$}=b;return{x:y,y:$}}},...d}=Vn(t,e),c={x:n,y:o},u=await Ka(e,d),f=Ao(Ot(i)),h=Ga(f);let p=c[h],m=c[f];if(r){const b=h==="y"?"top":"left",y=h==="y"?"bottom":"right",$=p+u[b],k=p-u[y];p=ds($,p,k)}if(l){const b=f==="y"?"top":"left",y=f==="y"?"bottom":"right",$=m+u[b],k=m-u[y];m=ds($,m,k)}const g=a.fn({...e,[h]:p,[f]:m});return{...g,data:{x:g.x-n,y:g.y-o}}}}};function yt(t){return Za(t)?(t.nodeName||"").toLowerCase():"#document"}function Ee(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ot(t){var e;return(e=(Za(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Za(t){return t instanceof Node||t instanceof Ee(t).Node}function it(t){return t instanceof Element||t instanceof Ee(t).Element}function Ue(t){return t instanceof HTMLElement||t instanceof Ee(t).HTMLElement}function Ja(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ee(t).ShadowRoot}function Fn(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=Fe(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function Y0(t){return["table","td","th"].includes(yt(t))}function hs(t){const e=ps(),n=Fe(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function U0(t){let e=Gt(t);for(;Ue(e)&&!To(e);){if(hs(e))return e;e=Gt(e)}return null}function ps(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function To(t){return["html","body","#document"].includes(yt(t))}function Fe(t){return Ee(t).getComputedStyle(t)}function Lo(t){return it(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Gt(t){if(yt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Ja(t)&&t.host||ot(t);return Ja(e)?e.host:e}function Qa(t){const e=Gt(t);return To(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ue(e)&&Fn(e)?e:Qa(e)}function Rn(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Qa(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),l=Ee(i);return r?e.concat(l,l.visualViewport||[],Fn(i)?i:[],l.frameElement&&n?Rn(l.frameElement):[]):e.concat(i,Rn(i,[],n))}function ed(t){const e=Fe(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=Ue(t),r=i?t.offsetWidth:n,l=i?t.offsetHeight:o,a=Fo(n)!==r||Fo(o)!==l;return a&&(n=r,o=l),{width:n,height:o,$:a}}function ms(t){return it(t)?t:t.contextElement}function qt(t){const e=ms(t);if(!Ue(e))return bt(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=ed(e);let l=(r?Fo(n.width):n.width)/o,a=(r?Fo(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}const G0=bt(0);function td(t){const e=Ee(t);return!ps()||!e.visualViewport?G0:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function q0(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Ee(t)?!1:e}function It(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=ms(t);let l=bt(1);e&&(o?it(o)&&(l=qt(o)):l=qt(t));const a=q0(r,n,o)?td(r):bt(0);let d=(i.left+a.x)/l.x,c=(i.top+a.y)/l.y,u=i.width/l.x,f=i.height/l.y;if(r){const h=Ee(r),p=o&&it(o)?Ee(o):o;let m=h.frameElement;for(;m&&o&&p!==h;){const g=qt(m),b=m.getBoundingClientRect(),y=Fe(m),$=b.left+(m.clientLeft+parseFloat(y.paddingLeft))*g.x,k=b.top+(m.clientTop+parseFloat(y.paddingTop))*g.y;d*=g.x,c*=g.y,u*=g.x,f*=g.y,d+=$,c+=k,m=Ee(m).frameElement}}return Io({width:u,height:f,x:d,y:c})}function X0(t){let{rect:e,offsetParent:n,strategy:o}=t;const i=Ue(n),r=ot(n);if(n===r)return e;let l={scrollLeft:0,scrollTop:0},a=bt(1);const d=bt(0);if((i||!i&&o!=="fixed")&&((yt(n)!=="body"||Fn(r))&&(l=Lo(n)),Ue(n))){const c=It(n);a=qt(n),d.x=c.x+n.clientLeft,d.y=c.y+n.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-l.scrollLeft*a.x+d.x,y:e.y*a.y-l.scrollTop*a.y+d.y}}function K0(t){return Array.from(t.getClientRects())}function nd(t){return It(ot(t)).left+Lo(t).scrollLeft}function Z0(t){const e=ot(t),n=Lo(t),o=t.ownerDocument.body,i=At(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=At(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+nd(t);const a=-n.scrollTop;return Fe(o).direction==="rtl"&&(l+=At(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:l,y:a}}function J0(t,e){const n=Ee(t),o=ot(t),i=n.visualViewport;let r=o.clientWidth,l=o.clientHeight,a=0,d=0;if(i){r=i.width,l=i.height;const c=ps();(!c||c&&e==="fixed")&&(a=i.offsetLeft,d=i.offsetTop)}return{width:r,height:l,x:a,y:d}}function Q0(t,e){const n=It(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=Ue(t)?qt(t):bt(1),l=t.clientWidth*r.x,a=t.clientHeight*r.y,d=i*r.x,c=o*r.y;return{width:l,height:a,x:d,y:c}}function od(t,e,n){let o;if(e==="viewport")o=J0(t,n);else if(e==="document")o=Z0(ot(t));else if(it(e))o=Q0(e,n);else{const i=td(t);o={...e,x:e.x-i.x,y:e.y-i.y}}return Io(o)}function id(t,e){const n=Gt(t);return n===e||!it(n)||To(n)?!1:Fe(n).position==="fixed"||id(n,e)}function e1(t,e){const n=e.get(t);if(n)return n;let o=Rn(t,[],!1).filter(a=>it(a)&&yt(a)!=="body"),i=null;const r=Fe(t).position==="fixed";let l=r?Gt(t):t;for(;it(l)&&!To(l);){const a=Fe(l),d=hs(l);!d&&a.position==="fixed"&&(i=null),(r?!d&&!i:!d&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Fn(l)&&!d&&id(t,l))?o=o.filter(u=>u!==l):i=a,l=Gt(l)}return e.set(t,o),o}function t1(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const l=[...n==="clippingAncestors"?e1(e,this._c):[].concat(n),o],a=l[0],d=l.reduce((c,u)=>{const f=od(e,u,i);return c.top=At(f.top,c.top),c.right=Ut(f.right,c.right),c.bottom=Ut(f.bottom,c.bottom),c.left=At(f.left,c.left),c},od(e,a,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function n1(t){return ed(t)}function o1(t,e,n){const o=Ue(e),i=ot(e),r=n==="fixed",l=It(t,!0,r,e);let a={scrollLeft:0,scrollTop:0};const d=bt(0);if(o||!o&&!r)if((yt(e)!=="body"||Fn(i))&&(a=Lo(e)),o){const c=It(e,!0,r,e);d.x=c.x+e.clientLeft,d.y=c.y+e.clientTop}else i&&(d.x=nd(i));return{x:l.left+a.scrollLeft-d.x,y:l.top+a.scrollTop-d.y,width:l.width,height:l.height}}function sd(t,e){return!Ue(t)||Fe(t).position==="fixed"?null:e?e(t):t.offsetParent}function rd(t,e){const n=Ee(t);if(!Ue(t))return n;let o=sd(t,e);for(;o&&Y0(o)&&Fe(o).position==="static";)o=sd(o,e);return o&&(yt(o)==="html"||yt(o)==="body"&&Fe(o).position==="static"&&!hs(o))?n:o||U0(t)||n}const i1=async function(t){let{reference:e,floating:n,strategy:o}=t;const i=this.getOffsetParent||rd,r=this.getDimensions;return{reference:o1(e,await i(n),o),floating:{x:0,y:0,...await r(n)}}};function s1(t){return Fe(t).direction==="rtl"}const r1={convertOffsetParentRelativeRectToViewportRelativeRect:X0,getDocumentElement:ot,getClippingRect:t1,getOffsetParent:rd,getElementRects:i1,getClientRects:K0,getDimensions:n1,getScale:qt,isElement:it,isRTL:s1};function l1(t,e){let n=null,o;const i=ot(t);function r(){clearTimeout(o),n&&n.disconnect(),n=null}function l(a,d){a===void 0&&(a=!1),d===void 0&&(d=1),r();const{left:c,top:u,width:f,height:h}=t.getBoundingClientRect();if(a||e(),!f||!h)return;const p=Ro(u),m=Ro(i.clientWidth-(c+f)),g=Ro(i.clientHeight-(u+h)),b=Ro(c),$={rootMargin:-p+"px "+-m+"px "+-g+"px "+-b+"px",threshold:At(0,Ut(1,d))||1};let k=!0;function v(x){const B=x[0].intersectionRatio;if(B!==d){if(!k)return l();B?l(!1,B):o=setTimeout(()=>{l(!1,1e-7)},100)}k=!1}try{n=new IntersectionObserver(v,{...$,root:i.ownerDocument})}catch{n=new IntersectionObserver(v,$)}n.observe(t)}return l(!0),r}function An(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,c=ms(t),u=i||r?[...c?Rn(c):[],...Rn(e)]:[];u.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),r&&y.addEventListener("resize",n)});const f=c&&a?l1(c,n):null;let h=-1,p=null;l&&(p=new ResizeObserver(y=>{let[$]=y;$&&$.target===c&&p&&(p.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{p&&p.observe(e)})),n()}),c&&!d&&p.observe(c),p.observe(e));let m,g=d?It(t):null;d&&b();function b(){const y=It(t);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&n(),g=y,m=requestAnimationFrame(b)}return n(),()=>{u.forEach(y=>{i&&y.removeEventListener("scroll",n),r&&y.removeEventListener("resize",n)}),f&&f(),p&&p.disconnect(),p=null,d&&cancelAnimationFrame(m)}}const a1=(t,e,n)=>{const o=new Map,i={platform:r1,...n},r={...i.platform,_c:o};return z0(t,e,{...i,platform:r})};function gs(t){var e;return(e=t==null?void 0:t.$el)!=null?e:t}function ld(t){return{name:"arrow",options:t,fn(e){const n=gs(s.unref(t.element));return n==null?{}:H0({element:n,padding:t.padding}).fn(e)}}}function ad(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function dd(t,e){const n=ad(t);return Math.round(e*n)/n}function On(t,e,n){n===void 0&&(n={});const o=n.whileElementsMounted,i=s.computed(()=>{var M;return(M=s.unref(n.open))!=null?M:!0}),r=s.computed(()=>s.unref(n.middleware)),l=s.computed(()=>{var M;return(M=s.unref(n.placement))!=null?M:"bottom"}),a=s.computed(()=>{var M;return(M=s.unref(n.strategy))!=null?M:"absolute"}),d=s.computed(()=>{var M;return(M=s.unref(n.transform))!=null?M:!0}),c=s.computed(()=>gs(t.value)),u=s.computed(()=>gs(e.value)),f=s.ref(0),h=s.ref(0),p=s.ref(a.value),m=s.ref(l.value),g=s.shallowRef({}),b=s.ref(!1),y=s.computed(()=>{const M={position:p.value,left:"0",top:"0"};if(!u.value)return M;const N=dd(u.value,f.value),F=dd(u.value,h.value);return d.value?{...M,transform:"translate("+N+"px, "+F+"px)",...ad(u.value)>=1.5&&{willChange:"transform"}}:{position:p.value,left:N+"px",top:F+"px"}});let $;function k(){c.value==null||u.value==null||a1(c.value,u.value,{middleware:r.value,placement:l.value,strategy:a.value}).then(M=>{f.value=M.x,h.value=M.y,p.value=M.strategy,m.value=M.placement,g.value=M.middlewareData,b.value=!0})}function v(){typeof $=="function"&&($(),$=void 0)}function x(){if(v(),o===void 0){k();return}if(c.value!=null&&u.value!=null){$=o(c.value,u.value,k);return}}function B(){i.value||(b.value=!1)}return s.watch([r,l,a],k,{flush:"sync"}),s.watch([c,u],x,{flush:"sync"}),s.watch(i,B,{flush:"sync"}),s.getCurrentScope()&&s.onScopeDispose(v),{x:s.shallowReadonly(f),y:s.shallowReadonly(h),strategy:s.shallowReadonly(p),placement:s.shallowReadonly(m),middlewareData:s.shallowReadonly(g),isPositioned:s.shallowReadonly(b),floatingStyles:y,update:k}}const cd=s.defineComponent({__name:"FmTooltip",props:{variant:{default:"plain"},placement:{default:"top"},hideArrow:{type:Boolean,default:!1},content:{default:""},disabled:{type:Boolean,default:!1}},setup(t){const e=t,n=s.ref(null),o=s.ref(null),i=s.ref(null),{floatingStyles:r,middlewareData:l,placement:a}=On(n,o,{whileElementsMounted:An,placement:e.placement,middleware:[Pn(),Nn({mainAxis:6}),ld({element:i})]}),d=s.ref(!1),c=s.ref(0),u=s.ref(0),f=()=>{e.disabled||(clearTimeout(u.value),c.value=window.setTimeout(()=>{d.value=!0},250))},h=()=>{e.disabled||(clearTimeout(c.value),u.value=window.setTimeout(()=>d.value=!1,250))},p=()=>{clearTimeout(u.value),d.value=!0},m=s.computed(()=>{var b,y,$,k;const g={top:"bottom",right:"left",bottom:"top",left:"right"}[a.value];return{left:((b=l.value.arrow)==null?void 0:b.x)!=null?`${(y=l.value.arrow)==null?void 0:y.x}px`:"",top:(($=l.value.arrow)==null?void 0:$.y)!=null?`${(k=l.value.arrow)==null?void 0:k.y}px`:"",[g]:"-3px"}});return(g,b)=>(s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("div",{ref_key:"referenceEl",ref:n,class:s.normalizeClass(["cursor-pointer flex items-center justify-center relative w-max",{"cursor-not-allowed pointer-events-none":g.disabled}]),onPointermove:b[0]||(b[0]=y=>{y.pointerType!=="touch"&&f()}),onPointerleave:h,onPointerdown:h,onPointerup:h},[s.renderSlot(g.$slots,"default")],34),d.value&&!g.disabled?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"tooltipContent",ref:o,class:s.normalizeClass(["fm-shadow-light-300 max-w-[240px] px-16 py-12 rounded-lg",{"bg-fm-color-neutral-black text-fm-color-typo-white fm-typo-body-sm-400":g.variant==="plain","bg-fm-color-neutral-white text-fm-color-typo-secondary fm-typo-body-md-400":g.variant==="rich"}]),style:s.normalizeStyle(s.unref(r)),onMouseenter:p,onMouseleave:h},[s.renderSlot(g.$slots,"content",{},()=>[s.createTextVNode(s.toDisplayString(g.content),1)]),s.withDirectives(s.createElementVNode("div",{ref_key:"arrowEl",ref:i,class:s.normalizeClass(["absolute h-8 rotate-45 rounded-[2px] w-8",{"bg-fm-color-neutral-black":g.variant==="plain","bg-fm-color-neutral-white":g.variant==="rich"}]),style:s.normalizeStyle(m.value)},null,6),[[s.vShow,!g.hideArrow]])],38)):s.createCommentVNode("",!0)]))}}),Xt=s.defineComponent({__name:"FmLabel",props:{label:{default:""},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},optional:{type:Boolean,default:!1},info:{default:""}},setup(t){return(e,n)=>e.label?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["fm-typo-body-lg-400 flex gap-4",e.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary",{"items-center":e.info}])},[s.renderSlot(e.$slots,"default",{},()=>[s.createElementVNode("span",null,s.toDisplayString(e.label),1),e.required?(s.openBlock(),s.createElementBlock("span",{key:0,class:s.normalizeClass(["fm-typo-body-lg-700",e.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-error"])}," * ",2)):s.createCommentVNode("",!0),e.optional?(s.openBlock(),s.createElementBlock("span",{key:1,class:s.normalizeClass(["fm-typo-body-md-400",e.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-tertiary"])}," (optional) ",2)):s.createCommentVNode("",!0),e.info?(s.openBlock(),s.createBlock(cd,{key:2,beak:"top","content-text":e.info,disabled:e.disabled},{default:s.withCtx(()=>[s.createVNode(z,{name:"info",size:"sm",class:s.normalizeClass(["fm-typo-body-md-400",e.disabled?"text-fm-color-typo-disabled":"text-fm-color-neutral-gray-300"])},null,8,["class"])]),_:1},8,["content-text","disabled"])):s.createCommentVNode("",!0)])],2)):s.createCommentVNode("",!0)}});function ud(t,e){const n=s.ref([]);function o(){const r=[];if(e.value&&e.value.length>0)for(const l of e.value){const d=(typeof l=="function"?l:()=>l)(t.value);d!==!0&&r.push(d)}return n.value=r,n.value}function i(){n.value=[]}return{validate:o,resetValidation:i,errorMessages:n}}function fd(t,e=null,n=null){let o=null;const i=X(t,"modelValue"),r=s.ref(!0),l=s.inject(pr,null),{validate:a,resetValidation:d,errorMessages:c}=ud(i,s.toRef(()=>t.rules)),u=(f=n)=>{r.value=!0,d(),f&&typeof f=="function"&&f(),i.value=e};return s.onMounted(()=>{l&&(o=l.register({validate:a,resetValidation:d,resetValue:u}))}),s.onUnmounted(()=>{l&&l.unregister(o)}),s.watch(()=>i.value,()=>{r.value=!1,i.value!==e&&a()}),s.watch(()=>t.focused,f=>{r.value=!1,f||a()}),{validate:a,resetValidation:d,errorMessages:c,resetValue:u,isPristine:r}}function In(){const t=s.ref(!1);function e(){t.value=!0}function n(){t.value=!1}return{focus:e,blur:n,isFocused:t}}const d1={key:1,class:"flex items-center justify-between"},Me=s.defineComponent({__name:"FmFormGroup",props:{modelValue:{},rules:{default:()=>[]},focused:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},label:{default:""},required:{type:Boolean,default:!1},optional:{type:Boolean,default:!1},info:{default:""},helperText:{default:""},helperState:{default:"none"},tag:{default:"label"}},setup(t){const e=t,{errorMessages:n,isPristine:o}=fd(e),{focus:i,blur:r}=In(),l=s.computed(()=>({label:e.label,disabled:e.disabled,required:e.required,optional:e.optional,info:e.info})),a=s.computed(()=>({text:e.helperText,disabled:e.disabled,state:e.helperState,errorMessages:n.value})),d=s.computed(()=>({isPristine:o,invalid:n.value.length>0}));return(c,u)=>(s.openBlock(),s.createBlock(e.tag,{class:"flex flex-col gap-4",onClick:s.unref(i),onBlur:s.unref(r)},{default:s.withCtx(()=>[c.label?(s.openBlock(),s.createBlock(Xt,s.normalizeProps(s.mergeProps({key:0},l.value)),{default:s.withCtx(()=>[s.renderSlot(c.$slots,"label")]),_:3},16)):s.createCommentVNode("",!0),s.renderSlot(c.$slots,"default",s.normalizeProps(s.guardReactiveProps(d.value))),a.value.text||a.value.errorMessages.length>0||c.$slots["helper-append"]?(s.openBlock(),s.createElementBlock("div",d1,[s.createVNode(Ua,s.normalizeProps(s.guardReactiveProps(a.value)),{default:s.withCtx(()=>[s.renderSlot(c.$slots,"helper-text")]),_:3},16),s.renderSlot(c.$slots,"helper-append")])):s.createCommentVNode("",!0)]),_:3},8,["onClick","onBlur"]))}}),c1=s.defineComponent({__name:"FmMenu",props:{placement:{default:"bottom-start"},trigger:{default:"click"},closeOnClick:{type:Boolean,default:!0},width:{default:void 0},maxHeight:{default:408},inPopover:{type:Boolean,default:!1}},emits:["menu-changed"],setup(t,{emit:e}){const n=t,o=e,i=s.ref([]);let r;const l=s.ref(),a=s.ref(!1),d=s.ref(!1),c=s.inject(yr,null),u=s.ref(null),f=s.ref(null),{floatingStyles:h}=On(u,f,{middleware:[Nn({mainAxis:c?8:4,crossAxis:c?-12:0}),Pn(),W0()],placement:n.placement,whileElementsMounted:An}),p=()=>{x.value==="hover"&&g()},m=()=>{if(a.value){a.value=!1;return}x.value==="click"&&g()},g=()=>{d.value=!0,a.value=!0,c==null||c.setChildId(r)},b=()=>{x.value==="hover"&&(d.value=!1)},y=()=>{d.value=!0},$=()=>{d.value=!1},k=()=>{n.closeOnClick&&setTimeout(()=>{a.value=!1,c==null||c.closeParent()},10)},v=s.computed(()=>({mouseInMenu:d}));s.provide(yr,{register({injectProps:M}){return i.value=[...i.value,{injectProps:M}],i.value.length},closeParent(){c?(a.value=!1,c==null||c.closeParent()):a.value=x.value!=="click"},setChildId(M){l.value=M},mouseInChildId:l,trigger:n.trigger}),s.provide($r,{handleContentClick:k}),s.onMounted(()=>{window.addEventListener("click",B),c&&(r=c.register({injectProps:v}))}),s.onUnmounted(()=>{window.removeEventListener("click",B)}),s.watch(()=>c==null?void 0:c.mouseInChildId.value,M=>{M!==r&&(a.value=!1)});const x=s.computed(()=>c===null?n.trigger:"hover");s.watch(()=>a.value,()=>o("menu-changed",a.value));const B=M=>{if(!a.value)return;const N=M.path||M.composedPath();for(const F of N)if(F==u.value||F==f.value)return;a.value=!1};return(M,N)=>(s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("div",{ref_key:"anchorEl",ref:u,class:"fm-menu",onMouseenter:p,onMouseleave:b,onClick:m},[s.renderSlot(M.$slots,"menu-button",{},void 0,!0)],544),(s.openBlock(),s.createBlock(s.Teleport,{to:"body",disabled:!!s.unref(c)||M.inPopover},[a.value?(s.openBlock(),s.createElementBlock("div",{key:0,id:"fm-menu",ref_key:"menuEl",ref:f,class:"block z-[99]",style:s.normalizeStyle(s.unref(h)),onMouseenter:y,onMouseleave:$},[s.renderSlot(M.$slots,"menu-wrapper",{},()=>[s.createElementVNode("div",{class:"fm-menu__wrapper",style:s.normalizeStyle({"max-height":`${M.maxHeight}px`,width:`${M.width}px`})},[s.renderSlot(M.$slots,"default",{},void 0,!0)],4)],!0)],36)):s.createCommentVNode("",!0)],8,["disabled"]))]))}}),vw="",Tn=Z(c1,[["__scopeId","data-v-ebae6292"]]),u1={class:"fm-menu-item--left"},f1={key:0,class:"fm-menu-item--right"},h1=s.defineComponent({__name:"FmMenuItem",props:{modelValue:{type:Boolean,default:!1},selectable:{type:Boolean,default:!0},label:{default:""},sublabel:{default:""},icon:{default:""},expandable:{type:Boolean,default:!1},hasCheckbox:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=s.ref(!1),i=s.inject($r,null),r=e,l=c=>{c.preventDefault(),i==null||i.handleContentClick(),!(n.disabled||!n.selectable)&&r("update:modelValue",!n.modelValue)},a=()=>{r("update:modelValue",n.modelValue)};function d(c){o.value=c}return(c,u)=>(s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("div",{class:s.normalizeClass({"fm-menu-item":!0,"fm-menu-item--selected":c.modelValue&&!c.hasCheckbox,"fm-menu-item--disabled":c.disabled,"hover:bg-fm-color-opacity-sm":!c.disabled&&!c.modelValue&&c.selectable}),onClick:l,onMousedown:u[1]||(u[1]=()=>d(!0)),onMouseup:u[2]||(u[2]=()=>d(!1)),onMouseleave:u[3]||(u[3]=()=>d(!1))},[s.createElementVNode("div",u1,[s.renderSlot(c.$slots,"prepend",{},()=>[!c.hasCheckbox&&c.icon?(s.openBlock(),s.createBlock(z,{key:0,name:c.icon,size:"md",outline:!o.value&&!c.modelValue,color:c.disabled?"#C7C7CC":c.modelValue?"#FF7823":"#1C1C1E"},null,8,["name","outline","color"])):s.createCommentVNode("",!0),c.hasCheckbox?(s.openBlock(),s.createBlock(Wa,{key:1,"model-value":c.modelValue,name:"something",label:"",sublabel:"",value:"",indeterminate:!1,disabled:c.disabled,"onUpdate:modelValue":a,onClick:u[0]||(u[0]=f=>f.preventDefault())},null,8,["model-value","disabled"])):s.createCommentVNode("",!0)],!0),s.renderSlot(c.$slots,"label",{},()=>[s.createElementVNode("div",null,[s.createElementVNode("div",{class:s.normalizeClass(`fm-typo-body-lg-400 ${c.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"}`)},s.toDisplayString(c.label),3),c.sublabel?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(`fm-typo-body-md-400 ${c.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"}`)},s.toDisplayString(c.sublabel),3)):s.createCommentVNode("",!0)])],!0)]),s.renderSlot(c.$slots,"append",{},void 0,!0),c.expandable?(s.openBlock(),s.createElementBlock("div",f1,[s.createVNode(z,{name:"chevron_right",size:"md",color:c.disabled?"#C7C7CC":"#AEAEB2"},null,8,["color"])])):s.createCommentVNode("",!0)],34)]))}}),Dw="",Ie=Z(h1,[["__scopeId","data-v-cb553369"]]),p1={class:"fm-typo-body-lg-700"},m1={class:"h-[264px] overflow-y-auto w-[160px]"},Kt=s.defineComponent({__name:"FmDateRangeYearMonthPicker",props:{modelValue:{},picker:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=s.ref(!1),r=s.computed(()=>{let l=-5;const a=[];for(;l!=5;)a.push(n.modelValue.add(l,"year")),l++;return a});return(l,a)=>(s.openBlock(),s.createBlock(Tn,{trigger:"click","in-popover":"",onMenuChanged:a[0]||(a[0]=d=>i.value=d)},{"menu-button":s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["flex gap-4 h-24 items-center px-8 rounded-sm",i.value?"text-fm-color-primary":"hover:bg-fm-color-neutral-gray-100"])},[s.createElementVNode("div",p1,[l.picker==="month"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createTextVNode(s.toDisplayString(l.modelValue.format("MMMM")),1)],64)):s.createCommentVNode("",!0),l.picker==="year"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createTextVNode(s.toDisplayString(l.modelValue.format("YYYY")),1)],64)):s.createCommentVNode("",!0)]),s.createVNode(z,{name:i.value?"expand_less":"expand_more",size:"md",color:"black"},null,8,["name"])],2)]),default:s.withCtx(()=>[s.createElementVNode("ul",m1,[l.picker==="month"?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:0},s.renderList(Array.from(Array(12),(d,c)=>l.modelValue.month(c)),d=>(s.openBlock(),s.createElementBlock("li",{key:d.format("MMMM")},[s.createVNode(Ie,{"model-value":l.modelValue.format("MMMM")===d.format("MMMM"),label:d.format("MMMM"),"onUpdate:modelValue":c=>o("update:modelValue",d)},null,8,["model-value","label","onUpdate:modelValue"])]))),128)):s.createCommentVNode("",!0),l.picker==="year"?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:1},s.renderList(r.value,d=>(s.openBlock(),s.createElementBlock("li",{key:d.format("YYYY")},[s.createVNode(Ie,{"model-value":l.modelValue.format("YYYY")===d.format("YYYY"),label:d.format("YYYY"),"onUpdate:modelValue":c=>o("update:modelValue",d)},null,8,["model-value","label","onUpdate:modelValue"])]))),128)):s.createCommentVNode("",!0)])]),_:1}))}}),g1={mounted:(t,e)=>{t.clickOutsideEvent=n=>{const o=e.arg?document.querySelectorAll(`#${e.arg}`):[];!(t==n.target||t.contains(n.target))&&!Array.from(o).some(i=>i&&(n.target==i||i.contains(n.target)))&&e.value(n,t)},document.addEventListener("click",t.clickOutsideEvent)},unmounted:t=>{document.removeEventListener("click",t.clickOutsideEvent)}},b1=s.defineComponent({__name:"FmPopover",props:{showPopover:{type:Boolean,default:!1},placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1}},emits:["popover-changed"],setup(t,{expose:e,emit:n}){const o=t,i=s.ref(o.showPopover),r=s.ref(null),l=s.ref(null),{floatingStyles:a}=On(r,l,{middleware:[Nn(4),Pn()],placement:o.placement,whileElementsMounted:An}),d=n,c=()=>{i.value||(i.value=!0,d("popover-changed",i.value))},u=()=>{i.value&&(i.value=!1,d("popover-changed",i.value))};e({show:c,hide:u});const f=p=>{p.preventDefault(),p.stopPropagation(),!o.disabled&&(i.value=!i.value,d("popover-changed",i.value))};s.watch(()=>o.showPopover,p=>i.value=p);const h=()=>{i.value&&(i.value=!1,d("popover-changed",i.value))};return(p,m)=>s.withDirectives((s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("div",{ref_key:"anchorEl",ref:r,class:"fm-popover",onClick:f},[s.renderSlot(p.$slots,"popover-button",{},void 0,!0)],512),i.value?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"popoverEl",ref:l,class:"fm-popover__content",style:s.normalizeStyle(s.unref(a))},[s.renderSlot(p.$slots,"default",{show:c,hide:u},void 0,!0)],4)):s.createCommentVNode("",!0)])),[[s.unref(g1),h]])}}),Ew="",bs=Z(b1,[["__scopeId","data-v-c6603598"]]),O="YYYY-MM-DD",ys=t=>{const e=[],n=t.endOf("month"),o=t.month();let i=t.startOf("week"),r=[];for(;i.isBefore(n.endOf("week"));)i.day()===0&&r.length>0&&(e.push(r),r=[]),r.push({date:i,isCurrentMonth:i.month()===o}),i=i.add(1,"day");return r.length>0&&e.push(r),e},hd=()=>{const t=R().startOf("month"),e=[];for(let n=-1188;n<=312;n++){const o=[],i=t.add(n,"month").startOf("month"),r=i.endOf("month"),l=i.month();let a=i.startOf("week"),d=[];for(;a.isBefore(r.endOf("week"));)a.day()===0&&d.length>0&&(o.push(d),d=[]),d.push({id:i.format("MM-YYYY"),date:a,isCurrentMonth:a.month()===l}),a=a.add(1,"day");d.length>0&&o.push(d),e.push({id:i.format("YYYY-MM-DD"),matrix:o,height:40+24+48*(r.endOf("week").diff(i.startOf("week"),"week")+1)})}return e},Ln=Array.from(Array(7),(t,e)=>R().day(e).format("ddd")),y1={class:"p-12 w-[360px]"},$1={class:"w-max"},_1={class:"flex h-40 justify-between px-4 py-8"},w1={class:"flex gap-4 items-center"},x1={class:"flex gap-4 items-center justify-center"},C1={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},k1=["onClick"],S1={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},v1=s.defineComponent({__name:"FmDatePickerDesktop",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=X(e,"modelValue"),o=s.ref(R(n.value,O)),i=s.ref(!1),r=s.ref(R().startOf("month")),l=s.ref(!1),a=s.ref(!1),d=h=>{o.value=h},c=()=>{n.value=o.value.format(O),setTimeout(()=>{i.value=!1},0)},u=()=>{o.value=n.value?R(n.value):null,i.value=!1},f=h=>{l.value=!1,a.value=!1,r.value=h};return(h,p)=>(s.openBlock(),s.createBlock(Me,{modelValue:s.unref(n),"onUpdate:modelValue":p[5]||(p[5]=m=>s.isRef(n)?n.value=m:null),label:h.label,disabled:h.disabled,required:h.labelMark==="required",optional:h.labelMark==="optional",info:h.labelInfo,rules:h.rules,focused:i.value,"helper-text":h.helperText,"helper-state":h.helperState,tag:"div"},{label:s.withCtx(()=>[s.renderSlot(h.$slots,"label",{},void 0,!0)]),default:s.withCtx(({invalid:m})=>[s.createVNode(bs,{"show-popover":i.value,disabled:h.disabled,onPopoverChanged:p[4]||(p[4]=g=>i.value=g)},{"popover-button":s.withCtx(()=>[s.createVNode(me,{class:"cursor-text",focused:i.value,invalid:m,"show-valid-border":h.showValidBorder},{prepend:s.withCtx(()=>[s.renderSlot(h.$slots,"prepend",{},void 0,!0)]),append:s.withCtx(()=>[s.renderSlot(h.$slots,"append",{},void 0,!0)]),default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled":s.unref(n)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString(s.unref(n)?s.unref(R)(s.unref(n)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["focused","invalid","show-valid-border"])]),default:s.withCtx(()=>[s.createElementVNode("div",y1,[s.createElementVNode("div",$1,[s.createElementVNode("div",_1,[s.createElementVNode("div",w1,[s.createVNode(Kt,{picker:"month","model-value":r.value,"onUpdate:modelValue":p[0]||(p[0]=g=>f(g))},null,8,["model-value"]),s.createVNode(Kt,{picker:"year","model-value":r.value,"onUpdate:modelValue":p[1]||(p[1]=g=>f(g))},null,8,["model-value"])]),s.createElementVNode("div",x1,[s.createVNode(z,{class:"cursor-pointer",name:"chevron_left",outline:!1,color:"#1C1C1E",onClick:p[2]||(p[2]=()=>f(r.value.subtract(1,"month")))}),s.createVNode(z,{class:"cursor-pointer",name:"chevron_right",outline:!1,color:"#1C1C1E",onClick:p[3]||(p[3]=()=>f(r.value.add(1,"month")))})])]),s.createElementVNode("div",null,[s.createElementVNode("div",C1,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(Ln),g=>(s.openBlock(),s.createElementBlock("div",{key:g,class:"fm-calendar__cell"},s.toDisplayString(g),1))),128))]),s.createElementVNode("div",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(ys)(r.value),(g,b)=>(s.openBlock(),s.createElementBlock("div",{key:b,class:"fm-calendar__row fm-typo-body-lg-400"},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(g,y=>(s.openBlock(),s.createElementBlock("div",{key:y.date.date(),class:"fm-calendar__cell"},[y.isCurrentMonth?(s.openBlock(),s.createElementBlock("button",{key:0,class:s.normalizeClass(["fm-calendar__cell__button",{"fm-calendar__cell__button--selected":y.date.isSame(o.value)}]),type:"button",onClick:()=>d(y.date)},s.toDisplayString(y.date.date()),11,k1)):s.createCommentVNode("",!0)]))),128))]))),128))])])]),s.createElementVNode("div",S1,[s.createVNode(K,{label:"Cancel",size:"md",variant:"tertiary",onClick:u}),s.createVNode(K,{label:"Apply",size:"md",variant:"primary",disabled:!o.value,onClick:c},null,8,["disabled"])])])]),_:2},1032,["show-popover","disabled"])]),"helper-text":s.withCtx(()=>[s.renderSlot(h.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),Mw="",D1=Z(v1,[["__scopeId","data-v-82867adf"]]),pd=t=>(s.pushScopeId("data-v-43dea287"),t=t(),s.popScopeId(),t),E1={class:"bg-fm-color-neutral-white fixed flex flex-col h-screen left-0 top-0 w-screen"},M1={class:"flex flex-col gap-8 pb-8 pt-24 px-16"},V1={class:"flex items-center justify-center"},B1={class:"flex fm-typo-body-lg-400 h-48 justify-center text-fm-color-typo-tertiary w-[336px]"},P1={class:"flex h-[calc(100%-208px)] justify-center relative w-full"},N1=pd(()=>s.createElementVNode("div",{class:"absolute bg-gradient-to-b from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),F1={id:"wrapper",class:"h-full relative w-[336px]"},R1=["id"],A1={class:"flex gap-4 items-center"},O1={class:"fm-typo-body-lg-700"},I1={class:"fm-typo-body-lg-700"},T1=["onClick"],L1={class:"absolute bg-fm-color-neutral-white bottom-0 left-0 p-16 w-full"},z1=pd(()=>s.createElementVNode("div",{class:"-top-32 absolute bg-gradient-to-t from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),H1={class:"flex gap-8 items-center justify-end w-full"},j1=s.defineComponent({__name:"FmDatePickerMobile",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=hd(),o=X(e,"modelValue"),i=R(),r=s.ref(R(o.value,O)),l=s.ref(!1),a=s.ref(),d=p=>{r.value=p},c=()=>{o.value=r.value.format(O),setTimeout(()=>{l.value=!1},0)},u=()=>{r.value=o.value?R(o.value):null,l.value=!1},f=()=>{l.value=!0,setTimeout(()=>{a.value.scrollToItem(h(i.startOf("month")))},0)},h=p=>n.findIndex(m=>m.id===p.startOf("month").format(O));return(p,m)=>{const g=s.resolveComponent("RecycleScroller");return s.openBlock(),s.createBlock(Me,{modelValue:s.unref(o),"onUpdate:modelValue":m[0]||(m[0]=b=>s.isRef(o)?o.value=b:null),label:p.label,disabled:p.disabled,required:p.labelMark==="required",optional:p.labelMark==="optional",info:p.labelInfo,rules:p.rules,focused:l.value,"helper-text":p.helperText,"helper-state":p.helperState,tag:"div"},{label:s.withCtx(()=>[s.renderSlot(p.$slots,"label",{},void 0,!0)]),default:s.withCtx(({invalid:b})=>[s.createVNode(me,{class:"cursor-text",focused:l.value,invalid:b,"show-valid-border":p.showValidBorder,onClick:f},{prepend:s.withCtx(()=>[s.renderSlot(p.$slots,"prepend",{},void 0,!0)]),append:s.withCtx(()=>[s.renderSlot(p.$slots,"append",{},void 0,!0)]),default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled":s.unref(o)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString(s.unref(o)?s.unref(R)(s.unref(o)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["focused","invalid","show-valid-border"]),l.value?(s.openBlock(),s.createBlock(s.Teleport,{key:0,to:"body"},[s.createElementVNode("div",E1,[s.createElementVNode("div",M1,[s.createVNode(me,{class:"cursor-text",focused:l.value,invalid:b,"show-valid-border":p.showValidBorder},{prepend:s.withCtx(()=>[s.renderSlot(p.$slots,"prepend",{},void 0,!0)]),append:s.withCtx(()=>[s.renderSlot(p.$slots,"append",{},void 0,!0)]),default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled":r.value?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString(r.value?s.unref(R)(r.value).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["focused","invalid","show-valid-border"]),s.createElementVNode("div",V1,[s.createElementVNode("div",B1,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(Ln),y=>(s.openBlock(),s.createElementBlock("div",{key:y,class:"fm-calendar__cell"},s.toDisplayString(y),1))),128))])])]),s.createElementVNode("div",P1,[N1,s.createElementVNode("div",F1,[s.createVNode(g,{ref_key:"scroller",ref:a,class:"h-full no-scrollbar overflow-y-auto w-full",items:s.unref(n),"item-size":null,buffer:200,"key-field":"id","size-field":"height"},{default:s.withCtx(({item:y})=>[s.createElementVNode("div",{id:y.id,class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},[s.createElementVNode("div",A1,[s.createElementVNode("div",O1,s.toDisplayString(s.unref(R)(y.id).format("MMMM")),1),s.createElementVNode("div",I1,s.toDisplayString(s.unref(R)(y.id).format("YYYY")),1)])],8,R1),s.createElementVNode("div",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(y.matrix,($,k)=>(s.openBlock(),s.createElementBlock("div",{key:k,class:"fm-calendar__row fm-typo-body-lg-400"},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList($,v=>(s.openBlock(),s.createElementBlock("div",{key:v.date.date(),class:"fm-calendar__cell"},[v.isCurrentMonth?(s.openBlock(),s.createElementBlock("button",{key:0,class:s.normalizeClass(["fm-calendar__cell__button",{"fm-calendar__cell__button--selected":v.date.isSame(r.value),"fm-typo-body-lg-700":v.date.isSame(s.unref(i),"day")}]),type:"button",onClick:()=>d(v.date)},s.toDisplayString(v.date.date()),11,T1)):s.createCommentVNode("",!0)]))),128))]))),128))])]),_:1},8,["items"])])]),s.createElementVNode("div",L1,[z1,s.createElementVNode("div",H1,[s.createVNode(K,{label:"Cancel",size:"md",variant:"tertiary",onClick:u}),s.createVNode(K,{label:"Apply",size:"md",variant:"primary",disabled:!r.value,onClick:c},null,8,["disabled"])])])])])):s.createCommentVNode("",!0)]),"helper-text":s.withCtx(()=>[s.renderSlot(p.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"])}}}),Vw="",md=Z(j1,[["__scopeId","data-v-43dea287"]]),W1=s.defineComponent({__name:"FmDatePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},setup(t){const{breakpoints:e}=No(),n=t,o=X(n,"modelValue");return(i,r)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.unref(e).md||s.unref(e).lg?(s.openBlock(),s.createBlock(D1,s.mergeProps({key:0},n,{modelValue:s.unref(o),"onUpdate:modelValue":r[0]||(r[0]=l=>s.isRef(o)?o.value=l:null)}),null,16,["modelValue"])):s.createCommentVNode("",!0),s.unref(e).xs||s.unref(e).sm?(s.openBlock(),s.createBlock(md,s.mergeProps({key:1},n,{modelValue:s.unref(o),"onUpdate:modelValue":r[1]||(r[1]=l=>s.isRef(o)?o.value=l:null)}),null,16,["modelValue"])):s.createCommentVNode("",!0)],64))}}),gd=s.defineComponent({__name:"FmMenuDivider",props:{vertical:{type:Boolean,default:!1},inset:{type:Boolean,default:!1}},setup(t){return(e,n)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["border-fm-color-neutral-gray-100 rounded-sm",[e.vertical?"border-l -my-4 mx-4":"border-t -mx-4 my-4",{"my-0":e.inset&&e.vertical,"mx-0":e.inset&&!e.vertical}]])},null,2))}}),Y1={class:"cursor-pointer fm-switch__container"},U1={key:0},G1={class:"fm-typo-body-lg-400"},q1={key:0,class:"fm-color-typo-secondary fm-typo-body-md-400"},X1={class:"fm-switch__input--container"},K1=["checked","value","disabled"],Z1={key:1},J1={class:"fm-typo-body-lg-400"},Q1={key:0,class:"fm-color-typo-secondary fm-typo-body-md-400"},e2=s.defineComponent({__name:"FmSwitch",props:{modelValue:{type:Boolean},label:{default:""},sublabel:{default:""},labelPlacement:{default:"left"},value:{default:null},disabled:{type:Boolean,default:!1},showIcon:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const e=t,n=X(e,"modelValue"),o=()=>{e.disabled||(n.value=!n.value)};return(i,r)=>(s.openBlock(),s.createElementBlock("label",Y1,[i.labelPlacement==="left"?(s.openBlock(),s.createElementBlock("div",U1,[s.renderSlot(i.$slots,"label",{},void 0,!0),s.createElementVNode("div",G1,s.toDisplayString(i.label),1),i.sublabel?(s.openBlock(),s.createElementBlock("div",q1,s.toDisplayString(i.sublabel),1)):s.createCommentVNode("",!0)])):s.createCommentVNode("",!0),s.createElementVNode("div",X1,[s.createElementVNode("input",{checked:s.unref(n),class:"fm-switch__input--btn",type:"checkbox",value:i.value,disabled:i.disabled,onClick:o},null,8,K1),s.createElementVNode("div",{class:s.normalizeClass({"fm-switch__input--knob":!0,"fm-switch__input--knob--show-icon":i.showIcon})},[i.showIcon?(s.openBlock(),s.createBlock(z,{key:0,name:s.unref(n)?"check":"close",size:"sm",color:i.disabled?"#C7C7CC":s.unref(n)?"#1C1C1E":"#FFFFFF"},null,8,["name","color"])):s.createCommentVNode("",!0)],2)]),i.labelPlacement==="right"?(s.openBlock(),s.createElementBlock("div",Z1,[s.createElementVNode("div",J1,s.toDisplayString(i.label),1),i.sublabel?(s.openBlock(),s.createElementBlock("div",Q1,s.toDisplayString(i.sublabel),1)):s.createCommentVNode("",!0)])):s.createCommentVNode("",!0)]))}}),Bw="",$s=Z(e2,[["__scopeId","data-v-0fcef85e"]]);var he=(t=>(t.PrecedingPeriod="preceding_period",t.PrecedingWeek="preceding_week",t.PrecedingMonth="preceding_month",t.Custom="custom",t))(he||{});const bd=t=>(s.pushScopeId("data-v-bd1452b8"),t=t(),s.popScopeId(),t),t2={key:0,class:"flex gap-4 items-center relative w-full"},n2={class:"flex flex-col gap-4 w-full"},o2=bd(()=>s.createElementVNode("div",{class:"fm-typo-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1)),i2={class:"flex flex-col gap-4 w-full"},s2={key:1,class:"flex flex-col gap-4 w-full"},r2={class:"flex gap-4 p-12"},l2={key:0,class:"max-h-[549px] overflow-y-auto w-[171px]"},a2={key:0,class:"px-8"},d2={key:1,class:"-my-12 border-fm-color-neutral-gray-100 border-l shrink-0"},c2={class:"flex flex-col gap-24"},u2={key:0,class:"flex gap-4 items-center px-12 w-full"},f2={class:"flex flex-col gap-4 w-full"},h2=bd(()=>s.createElementVNode("div",{class:"fm-typo-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," - ",-1)),p2={class:"flex flex-col gap-4 w-full"},m2={class:"flex gap-24"},g2={class:"w-max"},b2={class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},y2={class:"flex gap-4 items-center"},$2={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},_2={class:"h-[288px]"},w2={key:0,class:"fm-calendar__cell__button--today"},x2=["onClick","onMouseover"],C2={class:"w-max"},k2={class:"flex gap-16 h-10 items-center justify-end px-4 py-8"},S2={class:"flex gap-4 items-center"},v2={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},D2={key:0,class:"fm-calendar__cell__button--today"},E2=["onClick","onMouseover"],M2={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},V2=s.defineComponent({__name:"FmDateRangePickerDesktop",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:R().format(O),endDate:R().format(O)}},{label:"Yesterday",value:{startDate:R().subtract(1,"day").format(O),endDate:R().subtract(1,"day").format(O)}},{label:"This week",value:{startDate:R().startOf("week").format(O),endDate:R().endOf("week").format(O)}},{label:"Last week",value:{startDate:R().subtract(1,"week").startOf("week").format(O),endDate:R().subtract(1,"week").endOf("week").format(O)}},{label:"Last 7 days",value:{startDate:R().subtract(7,"day").format(O),endDate:R().subtract(1,"day").format(O)}},{label:"This month",value:{startDate:R().startOf("month").format(O),endDate:R().endOf("month").format(O)}},{label:"Last month",value:{startDate:R().subtract(1,"month").startOf("month").format(O),endDate:R().subtract(1,"month").endOf("month").format(O)}},{label:"This year",value:{startDate:R().startOf("year").format(O),endDate:R().endOf("year").format(O)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){var F,P;const e=[{id:he.PrecedingPeriod,label:"Preceding period",sublabel:"",action:()=>{d.value=he.PrecedingPeriod;const w=r.value;if(w[0].startDate&&w[0].endDate){const _=w[0].startDate.diff(w[0].endDate,"day");w[1]={startDate:w[0].startDate.subtract(+(1-_),"day"),endDate:w[0].startDate.subtract(1,"day")}}}},{id:he.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:()=>{d.value=he.PrecedingWeek;const w=r.value;if(w[0].startDate&&w[0].endDate){let _=w[0].endDate.diff(w[0].startDate,"week");_===0&&(_+=1),w[1]={startDate:w[0].startDate.subtract(_,"week"),endDate:w[0].endDate.subtract(_,"week")}}}},{id:he.PrecedingMonth,label:"Preceding period",sublabel:"Match day of month",action:()=>{d.value=he.PrecedingMonth;const w=r.value;if(w[0].startDate&&w[0].endDate){let _=w[0].endDate.diff(w[0].startDate,"month");_===0&&(_+=1),w[1]={startDate:w[0].startDate.subtract(_,"month"),endDate:w[0].endDate.subtract(_,"month")}}}},{id:he.Custom,label:"Custom",sublabel:"",action:()=>{d.value=he.Custom}}],n=t,o=R(),i=X(n,"modelValue"),r=s.ref([{startDate:(F=i.value)!=null&&F.startDate?R(i.value.startDate,O):null,endDate:(P=i.value)!=null&&P.endDate?R(i.value.endDate,O):null},{startDate:null,endDate:null}]),l=s.ref(!1),a=s.ref(!1),d=s.ref(""),c=s.ref(R().startOf("month")),u=s.ref(R().startOf("month").add(1,"month")),f=s.ref(""),h=s.ref(null);let p=0;const m=w=>{var _;if(f.value="",r.value[p].startDate&&r.value[p].endDate){p===1&&(r.value=r.value.map(()=>({startDate:null,endDate:null})),p=0),r.value[0]={startDate:w,endDate:null};return}else if(!r.value[p].startDate&&!r.value[p].endDate)r.value[p].startDate=w;else{if(w.isBefore(r.value[p].startDate)){const E=r.value[p].startDate;r.value[p]={startDate:w,endDate:E}}else r.value[p].endDate=w;a.value&&(p=1),e.find(E=>E.id===d.value)||(d.value=he.Custom)}(_=e.find(E=>E.id===d.value))==null||_.action()},g=()=>{a.value?i.value=r.value.map(w=>({startDate:w.startDate.format(O),endDate:w.endDate.format(O)})):i.value={startDate:r.value[0].startDate.format(O),endDate:r.value[0].endDate.format(O)},setTimeout(()=>{l.value=!1})},b=()=>{var w,_;Array.isArray(i.value)?r.value=i.value:r.value[0]={startDate:(w=i.value)!=null&&w.startDate?R(i.value.startDate,O):null,endDate:(_=i.value)!=null&&_.endDate?R(i.value.endDate,O):null},l.value=!1},y=(w,_)=>{w==="left"?(c.value=_,u.value=_.add(1,"month")):w==="right"&&(u.value=_,c.value=_.subtract(1,"month"))},$=w=>{const _=r.value[0].startDate,E=r.value[0].endDate,S=r.value[1].startDate,D=r.value[1].endDate,C=h.value,V=_==null?void 0:_.isSame(w),A=E==null?void 0:E.isSame(w),L=S==null?void 0:S.isSame(w),T=D==null?void 0:D.isSame(w),j=C==null?void 0:C.isSame(w),Y=V&&E&&!(V&&A)||_&&!E&&V&&(C==null?void 0:C.isAfter(_))||_&&!E&&j&&(C==null?void 0:C.isBefore(_)),U=L&&D&&!(L&&T)||S&&!D&&L&&(C==null?void 0:C.isAfter(S))||S&&!D&&j&&(C==null?void 0:C.isBefore(S)),J=A&&_&&!(V&&A)||_&&!E&&V&&(C==null?void 0:C.isBefore(_))||_&&!E&&j&&(C==null?void 0:C.isAfter(_)),re=T&&S&&!(L&&T)||S&&!D&&L&&(C==null?void 0:C.isBefore(S))||S&&!D&&j&&(C==null?void 0:C.isAfter(S)),ue=V&&A||V&&!E,Be=L&&T||L&&!D,ze=_&&(E||C)&&E?w.isAfter(_)&&w.isBefore(E):w.isAfter(C)&&w.isBefore(_)||w.isBefore(C)&&w.isAfter(_),Pe=S&&(D||C)&&D?w.isAfter(S)&&w.isBefore(D):w.isAfter(C)&&w.isBefore(S)||w.isBefore(C)&&w.isAfter(S),ee=(we,xe,He)=>we&&xe&&He?we.isAfter(xe,"day")&&we.isBefore(He,"day"):!1,se=()=>{if(r.value.filter(xe=>{var He;for(const Tt in xe)if((He=xe[Tt])!=null&&He.isSame(w,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(V&&A&&(ee(w,S,D)||ee(w,S,C)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if(L&&T&&(ee(w,_,E)||ee(w,_,C)))return"bg-fm-color-system-info-300 before:bg-fm-color-system-warning-100 after:bg-fm-color-system-warning-100";if(Y||J)return ee(w,S,D)||ee(w,S,C)?"bg-fm-color-primary before:bg-fm-color-system-success-100 after:bg-fm-color-system-info-100":"bg-fm-color-primary before:bg-fm-color-system-warning-100";if(U||re)return ee(w,_,E)||ee(w,_,C)?"bg-fm-color-system-info-300 before:bg-fm-color-system-success-100 after:bg-fm-color-system-warning-100":"bg-fm-color-system-info-300 before:bg-fm-color-system-info-100";if(ue)return"bg-fm-color-primary";if(Be)return"bg-fm-color-system-info-300";if(ee(w,_,E)&&(ee(w,S,D)||ee(w,S,C)))return"bg-fm-color-system-success-100";if(ze)return"bg-fm-color-system-warning-100";if(Pe)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${se()}`]:Y||U,[`fm-calendar__cell__button--selected-end ${se()}`]:J||re,[`fm-calendar__cell__button--selected-between ${se()}`]:ze||Pe,[`fm-calendar__cell__button--selected ${se()}`]:ue||Be}},k=w=>{const _=r.value;if(_[0].startDate&&!_[0].endDate||_[1].startDate&&!_[1].endDate){h.value=w;return}h.value=null},v=w=>{f.value=w.label,r.value[0]={startDate:R(w.value.startDate,O),endDate:R(w.value.endDate,O)}},x=s.computed(()=>a.value?!r.value.every(w=>w.startDate&&w.endDate):!(r.value[0].startDate&&r.value[0].endDate)),B=w=>{d.value="",a.value=w,r.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),p=0},M=s.computed(()=>{if(!i.value)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};const w=a.value&&Array.isArray(i.value)?i.value[0].startDate:i.value.startDate,_=a.value&&Array.isArray(i.value)?i.value[0].endDate:i.value.endDate;return{startDate:w?R(w).format("D MMM YYYY"):"DD MM YYYY",endDate:_?R(_).format("D MMM YYYY"):"DD MM YYYY"}}),N=s.computed(()=>{const w=a.value&&Array.isArray(i.value)?i.value[1].startDate:null,_=a.value&&Array.isArray(i.value)?i.value[1].endDate:null;return w&&_?`Compared: ${R(w).format("D MMM YYYY")} - ${R(_).format("D MMM YYYY")}`:""});return s.watch(()=>i.value,()=>{var w,_;a.value?r.value=i.value.map(E=>({startDate:E!=null&&E.startDate?R(E.startDate,O):null,endDate:E!=null&&E.endDate?R(E.endDate,O):null})):r.value[0]={startDate:(w=i.value)!=null&&w.startDate?R(i.value.startDate,O):null,endDate:(_=i.value)!=null&&_.endDate?R(i.value.endDate,O):null}}),(w,_)=>(s.openBlock(),s.createBlock(Me,{modelValue:s.unref(i),"onUpdate:modelValue":_[8]||(_[8]=E=>s.isRef(i)?i.value=E:null),disabled:w.disabled,rules:w.rules,focused:l.value,"helper-text":a.value?N.value:w.helperText,"helper-state":w.helperState,tag:"div"},{default:s.withCtx(({invalid:E})=>[s.createVNode(bs,{"show-popover":l.value,disabled:w.disabled,onPopoverChanged:_[7]||(_[7]=S=>l.value=S)},{"popover-button":s.withCtx(()=>[w.compare?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("div",t2,[s.createElementVNode("label",n2,[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},s.toDisplayString(n.startLabel),3),s.createVNode(me,{class:s.normalizeClass(w.disabled?"cursor-not-allowed":"cursor-pointer"),focused:l.value,invalid:E,"show-valid-border":w.showValidBorder},{prepend:s.withCtx(()=>[s.renderSlot(w.$slots,"prepend",{},void 0,!0)]),append:s.withCtx(()=>[s.renderSlot(w.$slots,"append",{},void 0,!0)]),default:s.withCtx(()=>{var S,D;return[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled":(S=s.unref(i))!=null&&S.startDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString((D=s.unref(i))!=null&&D.startDate?s.unref(R)(s.unref(i).startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","focused","invalid","show-valid-border"])]),o2,s.createElementVNode("label",i2,[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},s.toDisplayString(n.endLabel),3),s.createVNode(me,{class:s.normalizeClass(w.disabled?"cursor-not-allowed":"cursor-pointer"),focused:l.value,invalid:E,"show-valid-border":w.showValidBorder},{prepend:s.withCtx(()=>[s.renderSlot(w.$slots,"prepend",{},void 0,!0)]),append:s.withCtx(()=>[s.renderSlot(w.$slots,"append",{},void 0,!0)]),default:s.withCtx(()=>{var S,D;return[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled":(S=s.unref(i))!=null&&S.endDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString((D=s.unref(i))!=null&&D.endDate?s.unref(R)(s.unref(i).endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","focused","invalid","show-valid-border"])])])),w.compare?(s.openBlock(),s.createElementBlock("label",s2,[s.createVNode(Xt,{label:w.compareLabel},null,8,["label"]),s.createVNode(me,{class:s.normalizeClass(w.disabled?"cursor-not-allowed":"cursor-pointer"),focused:l.value,invalid:E,"show-valid-border":w.showValidBorder},{prepend:s.withCtx(()=>[s.renderSlot(w.$slots,"prepend",{},void 0,!0)]),append:s.withCtx(()=>[s.renderSlot(w.$slots,"append",{},void 0,!0)]),default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled":M.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString(M.value.startDate)+" - "+s.toDisplayString(M.value.endDate),3)]),_:2},1032,["class","focused","invalid","show-valid-border"])])):s.createCommentVNode("",!0)]),default:s.withCtx(()=>[s.createElementVNode("div",r2,[w.showPredefinedRange?(s.openBlock(),s.createElementBlock("div",l2,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(w.predefinedRange,(S,D)=>(s.openBlock(),s.createBlock(Ie,{key:D,label:S.label,"model-value":f.value===S.label,selectable:"",onClick:C=>v(S)},null,8,["label","model-value","onClick"]))),128)),w.compare&&w.predefinedRange?(s.openBlock(),s.createElementBlock("div",a2,[s.createVNode(gd,{inset:""})])):s.createCommentVNode("",!0),w.compare?(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createVNode($s,{"model-value":a.value,class:"justify-between px-12",label:"Compare","onUpdate:modelValue":_[0]||(_[0]=S=>B(S))},null,8,["model-value"]),a.value?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},s.renderList(e,(S,D)=>s.createVNode(Ie,{key:D,label:S.label,sublabel:S.sublabel,"model-value":d.value===S.id,selectable:"",onClick:C=>S.action()},null,8,["label","sublabel","model-value","onClick"])),64)):s.createCommentVNode("",!0)],64)):s.createCommentVNode("",!0)])):s.createCommentVNode("",!0),w.showPredefinedRange?(s.openBlock(),s.createElementBlock("div",d2)):s.createCommentVNode("",!0),s.createElementVNode("div",{class:s.normalizeClass({"pl-4":w.showPredefinedRange})},[s.createElementVNode("div",c2,[a.value?(s.openBlock(),s.createElementBlock("div",u2,[s.createElementVNode("label",f2,[s.createVNode(Xt,{label:"Custom"}),s.createVNode(me,{focused:!1},{default:s.withCtx(()=>{var S,D;return[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[(S=r.value[0])!=null&&S.startDate&&((D=r.value[0])!=null&&D.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString(r.value[0].startDate!==null?r.value[0].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+s.toDisplayString(r.value[0].endDate!==null?r.value[0].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})]),h2,s.createElementVNode("label",p2,[s.createVNode(Xt,{label:"Compare"}),s.createVNode(me,{focused:!1},{default:s.withCtx(()=>{var S,D;return[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[(S=r.value[1])!=null&&S.startDate&&((D=r.value[1])!=null&&D.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString(r.value[1].startDate!==null?r.value[1].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+s.toDisplayString(r.value[1].endDate!==null?r.value[1].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})])])):s.createCommentVNode("",!0),s.createElementVNode("div",m2,[s.createElementVNode("div",g2,[s.createElementVNode("div",b2,[s.createElementVNode("div",y2,[s.createVNode(z,{class:"cursor-pointer select-none",name:"chevron_left",outline:!1,color:"#1C1C1E",onClick:_[1]||(_[1]=()=>y("left",c.value.subtract(1,"month")))}),s.createVNode(Kt,{picker:"month","model-value":c.value,"onUpdate:modelValue":_[2]||(_[2]=S=>y("left",S))},null,8,["model-value"]),s.createVNode(Kt,{picker:"year","model-value":c.value,"onUpdate:modelValue":_[3]||(_[3]=S=>y("left",S))},null,8,["model-value"])])]),s.createElementVNode("div",null,[s.createElementVNode("div",$2,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(Ln),S=>(s.openBlock(),s.createElementBlock("div",{key:S,class:"fm-calendar__cell"},s.toDisplayString(S),1))),128))]),s.createElementVNode("div",_2,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(ys)(c.value),(S,D)=>(s.openBlock(),s.createElementBlock("div",{key:D,class:"fm-calendar__row fm-typo-body-lg-400"},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(S,C=>(s.openBlock(),s.createElementBlock("div",{key:C.date.date(),class:"fm-calendar__cell"},[C.date.isSame(s.unref(o),"day")&&C.isCurrentMonth?(s.openBlock(),s.createElementBlock("div",w2)):s.createCommentVNode("",!0),C.isCurrentMonth?(s.openBlock(),s.createElementBlock("button",{key:1,class:s.normalizeClass(["fm-calendar__cell__button",[$(C.date),{"fm-typo-body-lg-700":C.date.isSame(s.unref(o),"day")}]]),type:"button",onClick:()=>m(C.date),onMouseover:V=>k(C.date)},s.toDisplayString(C.date.date()),43,x2)):s.createCommentVNode("",!0)]))),128))]))),128))])])]),s.createElementVNode("div",C2,[s.createElementVNode("div",k2,[s.createElementVNode("div",S2,[s.createVNode(Kt,{picker:"month","model-value":u.value,"onUpdate:modelValue":_[4]||(_[4]=S=>y("right",S))},null,8,["model-value"]),s.createVNode(Kt,{picker:"year","model-value":u.value,"onUpdate:modelValue":_[5]||(_[5]=S=>y("right",S))},null,8,["model-value"])]),s.createVNode(z,{class:"cursor-pointer select-none",name:"chevron_right",outline:!1,color:"#1C1C1E",onClick:_[6]||(_[6]=()=>y("left",c.value.add(1,"month")))})]),s.createElementVNode("div",null,[s.createElementVNode("div",v2,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(Ln),S=>(s.openBlock(),s.createElementBlock("div",{key:S,class:"fm-calendar__cell"},s.toDisplayString(S),1))),128))]),s.createElementVNode("div",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(ys)(u.value),(S,D)=>(s.openBlock(),s.createElementBlock("div",{key:D,class:"fm-calendar__row fm-typo-body-lg-400"},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(S,C=>(s.openBlock(),s.createElementBlock("div",{key:C.date.date(),class:"fm-calendar__cell"},[C.date.isSame(s.unref(o),"day")&&C.isCurrentMonth?(s.openBlock(),s.createElementBlock("div",D2)):s.createCommentVNode("",!0),C.isCurrentMonth?(s.openBlock(),s.createElementBlock("button",{key:1,class:s.normalizeClass(["fm-calendar__cell__button",[$(C.date),{"fm-typo-body-lg-700":C.date.isSame(s.unref(o),"day")}]]),type:"button",onClick:()=>m(C.date),onMouseover:V=>k(C.date)},s.toDisplayString(C.date.date()),43,E2)):s.createCommentVNode("",!0)]))),128))]))),128))])])])])]),s.createElementVNode("div",M2,[s.createVNode(K,{label:"Cancel",size:"md",variant:"tertiary",onClick:b}),s.createVNode(K,{label:"Apply",size:"md",variant:"primary",disabled:x.value,onClick:g},null,8,["disabled"])])],2)])]),_:2},1032,["show-popover","disabled"])]),"helper-text":s.withCtx(()=>[s.renderSlot(w.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","rules","focused","helper-text","helper-state"]))}}),Pw="",B2=Z(V2,[["__scopeId","data-v-bd1452b8"]]),P2={class:"flex flex-col gap-4"},N2={class:"flex flex-col gap-4 justify-center"},zo=s.defineComponent({__name:"FmSelect",props:{modelValue:{},items:{},multiselect:{type:Boolean,default:!1},placement:{default:"bottom-start"},placeholder:{default:"Select item"},showValidBorder:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","dropdown-changed"],setup(t,{emit:e}){const n=t,o=e,i=X(n,"modelValue"),r=s.ref(!1),l=(h,p)=>{if(n.multiselect){let m=[];h?m=i.value.length===0?[p]:n.items.filter(g=>i.value.some(b=>$e(g.value,b)||$e(g.value,p.value))):m=n.items.filter(g=>i.value.some(b=>$e(g.value,b)&&!$e(g.value,p.value))),i.value=m.map(g=>g.value)}else i.value=p.value,setTimeout(()=>{r.value=!1},0)},a=h=>{const p=[...i.value].filter((m,g)=>g!==h);i.value=p},d=s.computed(()=>n.multiselect?n.items.filter(h=>s.toRaw(i.value).some(p=>$e(p,h.value))):n.items.filter(h=>$e(i.value,h.value))),c=s.computed(()=>n.items.filter(h=>i.value.some(p=>$e(h.value,p))).map(h=>({label:h.label}))),u=s.computed(()=>{var h;return n.multiselect?n.placeholder:((h=n.items.find(p=>$e(p.value,i.value)))==null?void 0:h.label)??n.placeholder}),f=s.computed(()=>n.multiselect?i.value.length!==0:n.items.some(h=>$e(h.value,i.value)));return(h,p)=>(s.openBlock(),s.createElementBlock("div",P2,[s.createVNode(Me,{modelValue:s.unref(i),"onUpdate:modelValue":p[1]||(p[1]=m=>s.isRef(i)?i.value=m:null),label:h.label,disabled:h.disabled,required:h.labelMark==="required",optional:h.labelMark==="optional",info:h.labelInfo,rules:h.rules,focused:r.value,"helper-text":h.helperText,"helper-state":h.helperState},{label:s.withCtx(()=>[s.renderSlot(h.$slots,"label")]),default:s.withCtx(({invalid:m})=>[s.createVNode(Tn,{"show-menu":r.value,disabled:h.disabled,placement:h.placement,"close-on-click":!h.multiselect,onMenuChanged:p[0]||(p[0]=g=>{r.value=g,o("dropdown-changed",r.value)})},{"menu-button":s.withCtx(()=>[s.createVNode(me,{class:s.normalizeClass(h.disabled?"cursor-not-allowed":"cursor-pointer"),focused:r.value,invalid:m,"show-valid-border":h.showValidBorder},{prepend:s.withCtx(()=>[s.renderSlot(h.$slots,"prepend")]),append:s.withCtx(()=>[s.createVNode(z,{name:r.value?"expand_less":"expand_more",size:"md",color:h.disabled?"#C7C7CC":"black"},null,8,["name","color"])]),default:s.withCtx(()=>[s.renderSlot(h.$slots,"default",{},()=>[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled":f.value?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString(u.value),3)])]),_:2},1032,["class","focused","invalid","show-valid-border"])]),default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(h.items,g=>(s.openBlock(),s.createBlock(Ie,{key:g.value,"has-checkbox":h.multiselect,label:g.label,value:g.value,"model-value":d.value.some(b=>s.unref($e)(b.value,g.value)),"onUpdate:modelValue":b=>l(b,g)},null,8,["has-checkbox","label","value","model-value","onUpdate:modelValue"]))),128))]),_:2},1032,["show-menu","disabled","placement","close-on-click"])]),"helper-text":s.withCtx(()=>[s.renderSlot(h.$slots,"helper-text")]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]),s.createElementVNode("div",N2,[h.multiselect&&d.value.length>0?(s.openBlock(),s.createBlock(Cr,{key:0,items:c.value,removable:"",disabled:h.disabled,onChipClosed:a},null,8,["items","disabled"])):s.createCommentVNode("",!0)])]))}}),F2={key:0,class:"flex gap-4 items-center relative w-full"},R2={class:"flex flex-col gap-4 w-full"},A2=s.createElementVNode("div",{class:"fm-typo-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1),O2={class:"flex flex-col gap-4 w-full"},I2={key:1,class:"flex flex-col gap-4 w-full"},_s=s.defineComponent({__name:"FmDateRangePickerField",props:{modelValue:{},analytic:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},isComparing:{type:Boolean,default:!1},startLabel:{default:"Start date"},endLabel:{default:"End date"},compareLabel:{default:"Date"}},setup(t){const e=t,n=s.computed(()=>{if(!e.modelValue)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};const o=e.isComparing&&Array.isArray(e.modelValue)?e.modelValue[0].startDate:e.modelValue.startDate,i=e.isComparing&&Array.isArray(e.modelValue)?e.modelValue[0].endDate:e.modelValue.endDate;return{startDate:o?R(o).format("D MMM YYYY"):"DD MM YYYY",endDate:i?R(i).format("D MMM YYYY"):"DD MM YYYY"}});return(o,i)=>(s.openBlock(),s.createElementBlock("div",null,[o.analytic?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("div",F2,[s.createElementVNode("label",R2,[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[o.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},s.toDisplayString(o.startLabel),3),s.createVNode(me,{class:s.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder},{prepend:s.withCtx(()=>[s.renderSlot(o.$slots,"prepend")]),append:s.withCtx(()=>[s.renderSlot(o.$slots,"append")]),default:s.withCtx(()=>{var r,l;return[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":(r=o.modelValue)!=null&&r.startDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString((l=o.modelValue)!=null&&l.startDate?s.unref(R)(o.modelValue.startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:3},8,["class","focused","invalid","show-valid-border"])]),A2,s.createElementVNode("label",O2,[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[o.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},s.toDisplayString(o.endLabel),3),s.createVNode(me,{class:s.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder},{prepend:s.withCtx(()=>[s.renderSlot(o.$slots,"prepend")]),append:s.withCtx(()=>[s.renderSlot(o.$slots,"append")]),default:s.withCtx(()=>{var r,l;return[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":(r=o.modelValue)!=null&&r.endDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString((l=o.modelValue)!=null&&l.endDate?s.unref(R)(o.modelValue.endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:3},8,["class","focused","invalid","show-valid-border"])])])),o.analytic?(s.openBlock(),s.createElementBlock("label",I2,[s.createVNode(Xt,{label:o.compareLabel},null,8,["label"]),s.createVNode(me,{class:s.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder},{prepend:s.withCtx(()=>[s.renderSlot(o.$slots,"prepend")]),append:s.withCtx(()=>[s.renderSlot(o.$slots,"append")]),default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":n.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString(n.value.startDate)+" - "+s.toDisplayString(n.value.endDate),3)]),_:3},8,["class","focused","invalid","show-valid-border"])])):s.createCommentVNode("",!0)]))}}),yd=t=>(s.pushScopeId("data-v-72924186"),t=t(),s.popScopeId(),t),T2={class:"bg-fm-color-neutral-white fixed flex flex-col h-screen left-0 top-0 w-screen"},L2={class:"flex flex-col gap-8 pb-8 pt-24 px-16"},z2={class:"flex items-center justify-center"},H2={class:"flex fm-typo-body-lg-400 h-48 justify-center text-fm-color-typo-tertiary w-[336px]"},j2={class:"flex h-[calc(100%-172px)] justify-center relative w-full"},W2=yd(()=>s.createElementVNode("div",{class:"absolute bg-gradient-to-b from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),Y2={id:"wrapper",class:"h-full relative w-[336px]"},U2=["id"],G2={class:"flex gap-4 items-center"},q2={class:"fm-typo-body-lg-700"},X2={class:"fm-typo-body-lg-700"},K2=["onClick","onMouseover"],Z2={class:"absolute bg-fm-color-neutral-white bottom-0 left-0 p-16 w-full"},J2=yd(()=>s.createElementVNode("div",{class:"-top-32 absolute bg-gradient-to-t from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),Q2={class:"flex gap-8 items-center justify-end w-full"},eb=s.defineComponent({__name:"FmDateRangePickerMobile",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:R().format(O),endDate:R().format(O)}},{label:"Yesterday",value:{startDate:R().subtract(1,"day").format(O),endDate:R().subtract(1,"day").format(O)}},{label:"This week",value:{startDate:R().startOf("week").format(O),endDate:R().endOf("week").format(O)}},{label:"Last week",value:{startDate:R().subtract(1,"week").startOf("week").format(O),endDate:R().subtract(1,"week").endOf("week").format(O)}},{label:"Last 7 days",value:{startDate:R().subtract(7,"day").format(O),endDate:R().subtract(1,"day").format(O)}},{label:"This month",value:{startDate:R().startOf("month").format(O),endDate:R().endOf("month").format(O)}},{label:"Last month",value:{startDate:R().subtract(1,"month").startOf("month").format(O),endDate:R().subtract(1,"month").endOf("month").format(O)}},{label:"This year",value:{startDate:R().startOf("year").format(O),endDate:R().endOf("year").format(O)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){var P,w;const e=hd(),n=s.ref(),o=[{id:he.PrecedingPeriod,label:"Preceding period",sublabel:"",action:()=>{u.value=he.PrecedingPeriod;const _=a.value;if(_[0].startDate&&_[0].endDate){const E=_[0].startDate.diff(_[0].endDate,"day");_[1]={startDate:_[0].startDate.subtract(+(1-E),"day"),endDate:_[0].startDate.subtract(1,"day")}}}},{id:he.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:()=>{u.value=he.PrecedingWeek;const _=a.value;if(_[0].startDate&&_[0].endDate){let E=_[0].endDate.diff(_[0].startDate,"week");E===0&&(E+=1),_[1]={startDate:_[0].startDate.subtract(E,"week"),endDate:_[0].endDate.subtract(E,"week")}}}},{id:he.PrecedingMonth,label:"Preceding period",sublabel:"Match day of month",action:()=>{u.value=he.PrecedingMonth;const _=a.value;if(_[0].startDate&&_[0].endDate){let E=_[0].endDate.diff(_[0].startDate,"month");E===0&&(E+=1),_[1]={startDate:_[0].startDate.subtract(E,"month"),endDate:_[0].endDate.subtract(E,"month")}}}},{id:he.Custom,label:"Custom",sublabel:"",action:()=>{u.value=he.Custom}}],i=t,r=R(),l=X(i,"modelValue"),a=s.ref([{startDate:(P=l.value)!=null&&P.startDate?R(l.value.startDate,O):null,endDate:(w=l.value)!=null&&w.endDate?R(l.value.endDate,O):null},{startDate:null,endDate:null}]),d=s.ref(!1),c=s.ref(!1),u=s.ref(""),f=s.ref(""),h=s.ref(null);let p=0;const m=_=>{var E;if(f.value="",a.value[p].startDate&&a.value[p].endDate){p===1&&(a.value=a.value.map(()=>({startDate:null,endDate:null})),p=0),a.value[0]={startDate:_,endDate:null};return}else if(!a.value[p].startDate&&!a.value[p].endDate)a.value[p].startDate=_;else{if(_.isBefore(a.value[p].startDate)){const S=a.value[p].startDate;a.value[p]={startDate:_,endDate:S}}else a.value[p].endDate=_;c.value&&(p=1),o.find(S=>S.id===u.value)||(u.value=he.Custom)}(E=o.find(S=>S.id===u.value))==null||E.action()},g=()=>{c.value?l.value=a.value.map(_=>({startDate:_.startDate.format(O),endDate:_.endDate.format(O)})):l.value={startDate:a.value[0].startDate.format(O),endDate:a.value[0].endDate.format(O)},setTimeout(()=>{d.value=!1})},b=()=>{var _,E;Array.isArray(l.value)?a.value=l.value:a.value[0]={startDate:(_=l.value)!=null&&_.startDate?R(l.value.startDate,O):null,endDate:(E=l.value)!=null&&E.endDate?R(l.value.endDate,O):null},d.value=!1},y=_=>{const E=a.value[0].startDate,S=a.value[0].endDate,D=a.value[1].startDate,C=a.value[1].endDate,V=h.value,A=E==null?void 0:E.isSame(_),L=S==null?void 0:S.isSame(_),T=D==null?void 0:D.isSame(_),j=C==null?void 0:C.isSame(_),Y=V==null?void 0:V.isSame(_),U=A&&S&&!(A&&L)||E&&!S&&A&&(V==null?void 0:V.isAfter(E))||E&&!S&&Y&&(V==null?void 0:V.isBefore(E)),J=T&&C&&!(T&&j)||D&&!C&&T&&(V==null?void 0:V.isAfter(D))||D&&!C&&Y&&(V==null?void 0:V.isBefore(D)),re=L&&E&&!(A&&L)||E&&!S&&A&&(V==null?void 0:V.isBefore(E))||E&&!S&&Y&&(V==null?void 0:V.isAfter(E)),ue=j&&D&&!(T&&j)||D&&!C&&T&&(V==null?void 0:V.isBefore(D))||D&&!C&&Y&&(V==null?void 0:V.isAfter(D)),Be=A&&L||A&&!S,ze=T&&j||T&&!C,Pe=E&&(S||V)&&S?_.isAfter(E)&&_.isBefore(S):_.isAfter(V)&&_.isBefore(E)||_.isBefore(V)&&_.isAfter(E),ee=D&&(C||V)&&C?_.isAfter(D)&&_.isBefore(C):_.isAfter(V)&&_.isBefore(D)||_.isBefore(V)&&_.isAfter(D),se=(xe,He,Tt)=>xe&&He&&Tt?xe.isAfter(He,"day")&&xe.isBefore(Tt,"day"):!1,we=()=>{if(a.value.filter(He=>{var Tt;for(const cw in He)if((Tt=He[cw])!=null&&Tt.isSame(_,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(A&&L&&(se(_,D,C)||se(_,D,V)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if(T&&j&&(se(_,E,S)||se(_,E,V)))return"bg-fm-color-system-info-300 before:bg-fm-color-system-warning-100 after:bg-fm-color-system-warning-100";if(U||re)return se(_,D,C)||se(_,D,V)?"bg-fm-color-primary before:bg-fm-color-system-success-100 after:bg-fm-color-system-info-100":"bg-fm-color-primary before:bg-fm-color-system-warning-100";if(J||ue)return se(_,E,S)||se(_,E,V)?"bg-fm-color-system-info-300 before:bg-fm-color-system-success-100 after:bg-fm-color-system-warning-100":"bg-fm-color-system-info-300 before:bg-fm-color-system-info-100";if(Be)return"bg-fm-color-primary";if(ze)return"bg-fm-color-system-info-300";if(se(_,E,S)&&(se(_,D,C)||se(_,D,V)))return"bg-fm-color-system-success-100";if(Pe)return"bg-fm-color-system-warning-100";if(ee)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${we()}`]:U||J,[`fm-calendar__cell__button--selected-end ${we()}`]:re||ue,[`fm-calendar__cell__button--selected-between ${we()}`]:Pe||ee,[`fm-calendar__cell__button--selected ${we()}`]:Be||ze}},$=_=>{const E=a.value;if(E[0].startDate&&!E[0].endDate||E[1].startDate&&!E[1].endDate){h.value=_;return}h.value=null},k=_=>{a.value[0]={startDate:R(_.startDate,O),endDate:R(_.endDate,O)}},v=_=>{const E=o.find(S=>S.id===_);E==null||E.action()},x=s.computed(()=>c.value?!a.value.every(_=>_.startDate&&_.endDate):!(a.value[0].startDate&&a.value[0].endDate)),B=_=>{u.value="",c.value=_,a.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),p=0},M=s.computed(()=>{const _=c.value&&Array.isArray(l.value)?l.value[1].startDate:null,E=c.value&&Array.isArray(l.value)?l.value[1].endDate:null;return _&&E?`Compared: ${R(_).format("D MMM YYYY")} - ${R(E).format("D MMM YYYY")}`:""}),N=()=>{d.value=!0,setTimeout(()=>{n.value.scrollToItem(F(r.startOf("month")))},0)},F=_=>e.findIndex(E=>E.id===_.startOf("month").format(O));return s.watch(()=>l.value,()=>{var _,E;c.value?a.value=l.value.map(S=>({startDate:S!=null&&S.startDate?R(S.startDate,O):null,endDate:S!=null&&S.endDate?R(S.endDate,O):null})):a.value[0]={startDate:(_=l.value)!=null&&_.startDate?R(l.value.startDate,O):null,endDate:(E=l.value)!=null&&E.endDate?R(l.value.endDate,O):null}}),(_,E)=>{const S=s.resolveComponent("RecycleScroller");return s.openBlock(),s.createBlock(Me,{modelValue:s.unref(l),"onUpdate:modelValue":E[3]||(E[3]=D=>s.isRef(l)?l.value=D:null),disabled:_.disabled,rules:_.rules,focused:d.value,"helper-text":c.value?M.value:_.helperText,"helper-state":_.helperState,tag:"div"},{default:s.withCtx(({invalid:D})=>{var C,V,A,L;return[s.createVNode(_s,{"model-value":s.unref(l),analytic:_.compare,disabled:_.disabled,invalid:D,focused:d.value,"show-valid-border":_.showValidBorder,"is-comparing":c.value,"start-label":_.startLabel,"end-label":_.endLabel,"compare-label":_.compareLabel,onClick:N},null,8,["model-value","analytic","disabled","invalid","focused","show-valid-border","is-comparing","start-label","end-label","compare-label"]),d.value?(s.openBlock(),s.createBlock(s.Teleport,{key:0,to:"body"},[s.createElementVNode("div",T2,[s.createElementVNode("div",L2,[_.showPredefinedRange?(s.openBlock(),s.createBlock(zo,{key:0,items:_.predefinedRange,"model-value":f.value,"onUpdate:modelValue":E[0]||(E[0]=T=>k(T))},null,8,["items","model-value"])):s.createCommentVNode("",!0),s.createVNode(_s,{"model-value":{startDate:((C=a.value[0].startDate)==null?void 0:C.format(s.unref(O)))??null,endDate:((V=a.value[0].endDate)==null?void 0:V.format(s.unref(O)))??null},analytic:_.compare,"is-comparing":c.value,"start-label":_.startLabel,"end-label":_.endLabel,"compare-label":_.compareLabel},null,8,["model-value","analytic","is-comparing","start-label","end-label","compare-label"]),_.compare?(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createVNode($s,{"model-value":c.value,"label-placement":"right",label:"Compare","onUpdate:modelValue":E[1]||(E[1]=T=>B(T))},null,8,["model-value"]),c.value&&_.compare?(s.openBlock(),s.createBlock(zo,{key:0,items:o.map(T=>({label:T.label,sublabel:T.sublabel,value:T.id})),"model-value":u.value,"onUpdate:modelValue":E[2]||(E[2]=T=>v(T))},null,8,["items","model-value"])):s.createCommentVNode("",!0),c.value&&_.compare?(s.openBlock(),s.createBlock(_s,{key:1,"model-value":{startDate:((A=a.value[1].startDate)==null?void 0:A.format(s.unref(O)))??null,endDate:((L=a.value[1].endDate)==null?void 0:L.format(s.unref(O)))??null},analytic:_.compare,"is-comparing":c.value,"start-label":_.startLabel,"end-label":_.endLabel,"compare-label":"Compare: Custom"},null,8,["model-value","analytic","is-comparing","start-label","end-label"])):s.createCommentVNode("",!0)],64)):s.createCommentVNode("",!0),s.createElementVNode("div",z2,[s.createElementVNode("div",H2,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(Ln),T=>(s.openBlock(),s.createElementBlock("div",{key:T,class:"fm-calendar__cell"},s.toDisplayString(T),1))),128))])])]),s.createElementVNode("div",j2,[W2,s.createElementVNode("div",Y2,[s.createVNode(S,{ref_key:"scroller",ref:n,class:"h-full no-scrollbar overflow-y-auto w-full",items:s.unref(e),"item-size":null,buffer:200,"key-field":"id","size-field":"height"},{default:s.withCtx(({item:T})=>[s.createElementVNode("div",{id:T.id,class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},[s.createElementVNode("div",G2,[s.createElementVNode("div",q2,s.toDisplayString(s.unref(R)(T.id).format("MMMM")),1),s.createElementVNode("div",X2,s.toDisplayString(s.unref(R)(T.id).format("YYYY")),1)])],8,U2),s.createElementVNode("div",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(T.matrix,(j,Y)=>(s.openBlock(),s.createElementBlock("div",{key:Y,class:"fm-calendar__row fm-typo-body-lg-400"},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(j,U=>(s.openBlock(),s.createElementBlock("div",{key:U.date.date(),class:"fm-calendar__cell"},[U.isCurrentMonth?(s.openBlock(),s.createElementBlock("button",{key:0,class:s.normalizeClass(["fm-calendar__cell__button",[y(U.date),{"fm-typo-body-lg-700":U.date.isSame(s.unref(r),"day")}]]),type:"button",onClick:()=>m(U.date),onMouseover:J=>$(U.date)},s.toDisplayString(U.date.date()),43,K2)):s.createCommentVNode("",!0)]))),128))]))),128))])]),_:1},8,["items"])])]),s.createElementVNode("div",Z2,[J2,s.createElementVNode("div",Q2,[s.createVNode(K,{label:"Cancel",size:"md",variant:"tertiary",onClick:b}),s.createVNode(K,{label:"Apply",size:"md",variant:"primary",disabled:x.value,onClick:g},null,8,["disabled"])])])])])):s.createCommentVNode("",!0)]}),"helper-text":s.withCtx(()=>[s.renderSlot(_.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","rules","focused","helper-text","helper-state"])}}}),Nw="",$d=Z(eb,[["__scopeId","data-v-72924186"]]),tb=s.defineComponent({__name:"FmDateRangePicker",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:R().format(O),endDate:R().format(O)}},{label:"Yesterday",value:{startDate:R().subtract(1,"day").format(O),endDate:R().subtract(1,"day").format(O)}},{label:"This week",value:{startDate:R().startOf("week").format(O),endDate:R().endOf("week").format(O)}},{label:"Last week",value:{startDate:R().subtract(1,"week").startOf("week").format(O),endDate:R().subtract(1,"week").endOf("week").format(O)}},{label:"Last 7 days",value:{startDate:R().subtract(7,"day").format(O),endDate:R().subtract(1,"day").format(O)}},{label:"This month",value:{startDate:R().startOf("month").format(O),endDate:R().endOf("month").format(O)}},{label:"Last month",value:{startDate:R().subtract(1,"month").startOf("month").format(O),endDate:R().subtract(1,"month").endOf("month").format(O)}},{label:"This year",value:{startDate:R().startOf("year").format(O),endDate:R().endOf("year").format(O)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},setup(t){const e=t,{breakpoints:n}=No(),o=X(e,"modelValue");return(i,r)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.unref(n).md||s.unref(n).lg?(s.openBlock(),s.createBlock(B2,s.mergeProps({key:0},e,{modelValue:s.unref(o),"onUpdate:modelValue":r[0]||(r[0]=l=>s.isRef(o)?o.value=l:null)}),null,16,["modelValue"])):s.createCommentVNode("",!0),s.unref(n).xs||s.unref(n).sm?(s.openBlock(),s.createBlock($d,s.mergeProps({key:1},e,{modelValue:s.unref(o),"onUpdate:modelValue":r[1]||(r[1]=l=>s.isRef(o)?o.value=l:null)}),null,16,["modelValue"])):s.createCommentVNode("",!0)],64))}}),nb=s.defineComponent({__name:"FmForm",emits:["validation-reset","validation-success","validation-failed","reset"],setup(t,{expose:e,emit:n}){const o=s.ref([]),i=s.ref(0),r=n,l=()=>{let c=[];for(let u=0;u<o.value.length;u++){const f=o.value[u];c=[...c,...f.validate()]}c.length?r("validation-failed",c):r("validation-success")},a=()=>{for(let c=0;c<o.value.length;c++)o.value[c].resetValue();r("reset")};return e({validateInputs:l,resetInputsValidation:()=>{for(let c=0;c<o.value.length;c++)o.value[c].resetValidation();r("validation-reset")},resetInputs:a}),s.provide(pr,{register({validate:c,resetValidation:u,resetValue:f}){return o.value.push({componentId:i.value,validate:c,resetValidation:u,resetValue:f}),i.value++},unregister(c){o.value.filter(u=>u.componentId!==c)}}),(c,u)=>(s.openBlock(),s.createElementBlock("form",{onSubmit:s.withModifiers(l,["prevent"]),onReset:s.withModifiers(a,["prevent"])},[s.renderSlot(c.$slots,"default")],32))}}),ob={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|7(?:[013-57-9]\\d|2[0-8]))\\d|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90)))\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|3\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|22"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[025-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[025-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","[24-689]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]]]],BL:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","(?:[2-467]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[17]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","(?:[2-8]\\d|90)\\d{8}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|73)|90[25])[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:00|2[125-9]|33|44|66|77|88)|622)[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","[189]\\d{8}|[1-68]\\d{6}",[7,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"]],"0"],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","1[127]\\d{8,9}|2\\d{9}(?:\\d{2})?|[12]\\d{6,7}|86\\d{6}|(?:1[03-689]\\d|6)\\d{7,9}|(?:[3-579]\\d|8[0-57-9])\\d{6,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]","(?:10|2[0-57-9])(?:10|9[56])","10(?:10|9[56])|2[0-57-9](?:100|9[56])"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:60\\d\\d|9101)\\d{6}|(?:1\\d|3)\\d{9}",[10,11],[["(\\d{3})(\\d{7})","$1 $2",["6"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|91"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","[27]\\d{6,7}|[34]\\d{5,7}|63\\d{6}|(?:5|8\\d\\d)\\d{7}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|31)"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:1[3-79]|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0235])|4(?:[0-5]\\d\\d|69[7-9]|70[0-79])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-2]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","[56]94\\d{6}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[56]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}",[6,7,8,9],[["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","(?:[2-489]\\d|55)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","(?:(?:00[1-9]|8\\d)\\d{4}|[1-36])\\d{6}|00\\d{10}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]]],0,0,0,0,0,0,[["0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],0,0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[257-9]"],"0$1"]],"0",0,"(000[259]\\d{6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["30[013-9]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[245]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(8-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"8 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(8-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(8-$1)",1]],"8",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],MC:["377","00","(?:[3489]|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","596\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","1(?:(?:22|44|7[27]|87|99)[1-9]|65[0-689])\\d{7}|(?:1(?:[01]\\d|2[13-9]|[35][1-9]|4[0-35-9]|6[0-46-9]|7[013-689]|8[1-69]|9[1-8])|[2-9]\\d)\\d{8}",[10,11],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"],0,1],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 $3 $4",["1(?:33|5[56]|81)"],0,1],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 $3 $4",["1"],0,1]],"01",0,"0(?:[12]|4[45])|1",0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[047]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","2[0-24-9]\\d{8}|[78]\\d{10,13}|[7-9]\\d{9}|[1-9]\\d{7}|[124-7]\\d{6}",[7,8,10,11,12,13,14],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["78"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|9(?:0[3-9]|[1-9])"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[3-6]|7(?:0[0-689]|[1-79])|8[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:444|(?:55|8\\d)\\d|666)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[4-68]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|80\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[16]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2689]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["69(?:2\\d\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-5]|76(?:2[27]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"3[04-689]|[489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","92\\d{7}|(?:[15]|8\\d)\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["81"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","(?:[1-6]|[7-9]\\d\\d)\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","800\\d{4}|(?:[249]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|77|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|68|[78]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-8]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-39]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[69]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2679]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","[0-57-9]\\d{8}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3[1-5]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","[1-6]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["6"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:5056(?:[0-35-9]\\d|4[468])|7302[0-3]\\d)\\d{4}|(?:472[24]|505[2-57-9]|7306|983[237-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}",[6,7,8,9,10,11,12,13],[["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","810","(?:20|33|[5-79]\\d|88)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72)\\d{4}|8\\d{5}(?:\\d{3})?",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[478]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","[23]\\d{7,8}|(?:4\\d\\d|[89]00)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[23]"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|63|[79]\\d)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[79]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[35-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[35-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,0,0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function _d(t,e){var n=Array.prototype.slice.call(e);return n.push(ob),t.apply(this,n)}function ws(t){"@babel/helpers - typeof";return ws=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ws(t)}function wd(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function ib(t,e,n){return e&&wd(t.prototype,e),n&&wd(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function sb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rb(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zn(t,e)}function lb(t){var e=Cd();return function(){var o=Hn(t),i;if(e){var r=Hn(this).constructor;i=Reflect.construct(o,arguments,r)}else i=o.apply(this,arguments);return ab(this,i)}}function ab(t,e){if(e&&(ws(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xd(t)}function xd(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function xs(t){var e=typeof Map=="function"?new Map:void 0;return xs=function(o){if(o===null||!db(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(o))return e.get(o);e.set(o,i)}function i(){return Ho(o,arguments,Hn(this).constructor)}return i.prototype=Object.create(o.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),zn(i,o)},xs(t)}function Ho(t,e,n){return Cd()?Ho=Reflect.construct:Ho=function(i,r,l){var a=[null];a.push.apply(a,r);var d=Function.bind.apply(i,a),c=new d;return l&&zn(c,l.prototype),c},Ho.apply(null,arguments)}function Cd(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function db(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function zn(t,e){return zn=Object.setPrototypeOf||function(o,i){return o.__proto__=i,o},zn(t,e)}function Hn(t){return Hn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Hn(t)}var st=function(t){rb(n,t);var e=lb(n);function n(o){var i;return sb(this,n),i=e.call(this,o),Object.setPrototypeOf(xd(i),n.prototype),i.name=i.constructor.name,i}return ib(n)}(xs(Error)),Cs=2,cb=17,ub=3,Te="0-90-9٠-٩۰-۹",fb="-‐-―−ー-",hb="//",pb="..",mb=" ",gb="()()[]\\[\\]",bb="~⁓∼~",jo="".concat(fb).concat(hb).concat(pb).concat(mb).concat(gb).concat(bb),ks="++";function kd(t,e){t=t.split("-"),e=e.split("-");for(var n=t[0].split("."),o=e[0].split("."),i=0;i<3;i++){var r=Number(n[i]),l=Number(o[i]);if(r>l)return 1;if(l>r)return-1;if(!isNaN(r)&&isNaN(l))return 1;if(isNaN(r)&&!isNaN(l))return-1}return t[1]&&e[1]?t[1]>e[1]?1:t[1]<e[1]?-1:0:!t[1]&&e[1]?1:t[1]&&!e[1]?-1:0}var yb={}.constructor;function Wo(t){return t!=null&&t.constructor===yb}function Ss(t){"@babel/helpers - typeof";return Ss=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ss(t)}function Yo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Sd(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function Uo(t,e,n){return e&&Sd(t.prototype,e),n&&Sd(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var $b="1.2.0",_b="1.7.35",vd=" ext. ",wb=/^\d+$/,_e=function(){function t(e){Yo(this,t),Sb(e),this.metadata=e,Md.call(this,e)}return Uo(t,[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(n){return n!=="001"})}},{key:"getCountryMetadata",value:function(n){return this.metadata.countries[n]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(n){return this.getCountryMetadata(n)!==void 0}},{key:"hasCallingCode",value:function(n){if(this.getCountryCodesForCallingCode(n))return!0;if(this.nonGeographic()){if(this.nonGeographic()[n])return!0}else{var o=this.countryCallingCodes()[n];if(o&&o.length===1&&o[0]==="001")return!0}}},{key:"isNonGeographicCallingCode",value:function(n){return this.nonGeographic()?!!this.nonGeographic()[n]:!this.getCountryCodesForCallingCode(n)}},{key:"country",value:function(n){return this.selectNumberingPlan(n)}},{key:"selectNumberingPlan",value:function(n,o){if(n&&wb.test(n)&&(o=n,n=null),n&&n!=="001"){if(!this.hasCountry(n))throw new Error("Unknown country: ".concat(n));this.numberingPlan=new Dd(this.getCountryMetadata(n),this)}else if(o){if(!this.hasCallingCode(o))throw new Error("Unknown calling code: ".concat(o));this.numberingPlan=new Dd(this.getNumberingPlanMetadata(o),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(n){var o=this.countryCallingCodes()[n];if(o)return o.length===1&&o[0].length===3?void 0:o}},{key:"getCountryCodeForCallingCode",value:function(n){var o=this.getCountryCodesForCallingCode(n);if(o)return o[0]}},{key:"getNumberingPlanMetadata",value:function(n){var o=this.getCountryCodeForCallingCode(n);if(o)return this.getCountryMetadata(o);if(this.nonGeographic()){var i=this.nonGeographic()[n];if(i)return i}else{var r=this.countryCallingCodes()[n];if(r&&r.length===1&&r[0]==="001")return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(n){return this.numberingPlan.type(n)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(n){return this.selectNumberingPlan(n)}},{key:"hasSelectedNumberingPlan",value:function(){return this.numberingPlan!==void 0}}]),t}(),Dd=function(){function t(e,n){Yo(this,t),this.globalMetadataObject=n,this.metadata=e,Md.call(this,n.metadata)}return Uo(t,[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(n){return n[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var n=this,o=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return o.map(function(i){return new xb(i,n)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(n){return n[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return this.types()&&this.types().length===0?!1:!!this.types()}},{key:"type",value:function(n){if(this.hasTypes()&&Ed(this.types(),n))return new kb(Ed(this.types(),n),this)}},{key:"ext",value:function(){return this.v1||this.v2?vd:this.metadata[13]||vd}}]),t}(),xb=function(){function t(e,n){Yo(this,t),this._format=e,this.metadata=n}return Uo(t,[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!!(this.nationalPrefixFormattingRule()&&!Cb.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),t}(),Cb=/^\(?\$1\)?$/,kb=function(){function t(e,n){Yo(this,t),this.type=e,this.metadata=n}return Uo(t,[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]),t}();function Ed(t,e){switch(e){case"FIXED_LINE":return t[0];case"MOBILE":return t[1];case"TOLL_FREE":return t[2];case"PREMIUM_RATE":return t[3];case"PERSONAL_NUMBER":return t[4];case"VOICEMAIL":return t[5];case"UAN":return t[6];case"PAGER":return t[7];case"VOIP":return t[8];case"SHARED_COST":return t[9]}}function Sb(t){if(!t)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!Wo(t)||!Wo(t.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(Wo(t)?"an object of shape: { "+Object.keys(t).join(", ")+" }":"a "+vb(t)+": "+t,"."))}var vb=function(e){return Ss(e)};function Go(t,e){if(e=new _e(e),e.hasCountry(t))return e.country(t).countryCallingCode();throw new Error("Unknown country: ".concat(t))}function Db(t,e){return e.countries.hasOwnProperty(t)}function Md(t){var e=t.version;typeof e=="number"?(this.v1=e===1,this.v2=e===2,this.v3=e===3,this.v4=e===4):e?kd(e,$b)===-1?this.v2=!0:kd(e,_b)===-1?this.v3=!0:this.v4=!0:this.v1=!0}var Eb=";ext=",Zt=function(e){return"([".concat(Te,"]{1,").concat(e,"})")};function Vd(t){var e="20",n="15",o="9",i="6",r="[ \\t,]*",l="[:\\..]?[ \\t,-]*",a="#?",d="(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)",c="(?:[xx##~~]|int|int)",u="[- ]+",f="[ \\t]*",h="(?:,{2}|;)",p=Eb+Zt(e),m=r+d+l+Zt(e)+a,g=r+c+l+Zt(o)+a,b=u+Zt(i)+"#",y=f+h+l+Zt(n)+a,$=f+"(?:,)+"+l+Zt(o)+a;return p+"|"+m+"|"+g+"|"+b+"|"+y+"|"+$}var Mb="["+Te+"]{"+Cs+"}",Vb="["+ks+"]{0,1}(?:["+jo+"]*["+Te+"]){3,}["+jo+Te+"]*",Bb=new RegExp("^["+ks+"]{0,1}(?:["+jo+"]*["+Te+"]){1,2}$","i"),Pb=Vb+"(?:"+Vd()+")?",Nb=new RegExp("^"+Mb+"$|^"+Pb+"$","i");function Fb(t){return t.length>=Cs&&Nb.test(t)}function Rb(t){return Bb.test(t)}var Bd=new RegExp("(?:"+Vd()+")$","i");function Ab(t){var e=t.search(Bd);if(e<0)return{};for(var n=t.slice(0,e),o=t.match(Bd),i=1;i<o.length;){if(o[i])return{number:n,ext:o[i]};i++}}var Ob={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function Ib(t){return Ob[t]}function Tb(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=Lb(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
28
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Lb(t,e){if(t){if(typeof t=="string")return Pd(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pd(t,e)}}function Pd(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function Nd(t){for(var e="",n=Tb(t.split("")),o;!(o=n()).done;){var i=o.value;e+=zb(i,e)||""}return e}function zb(t,e,n){if(t==="+"){if(e){typeof n=="function"&&n("end");return}return"+"}return Ib(t)}function Hb(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=jb(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
29
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jb(t,e){if(t){if(typeof t=="string")return Fd(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fd(t,e)}}function Fd(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function Wb(t,e){for(var n=t.slice(),o=Hb(e),i;!(i=o()).done;){var r=i.value;t.indexOf(r)<0&&n.push(r)}return n.sort(function(l,a){return l-a})}function vs(t,e){return Rd(t,void 0,e)}function Rd(t,e,n){var o=n.type(e),i=o&&o.possibleLengths()||n.possibleLengths();if(!i)return"IS_POSSIBLE";if(e==="FIXED_LINE_OR_MOBILE"){if(!n.type("FIXED_LINE"))return Rd(t,"MOBILE",n);var r=n.type("MOBILE");r&&(i=Wb(i,r.possibleLengths()))}else if(e&&!o)return"INVALID_LENGTH";var l=t.length,a=i[0];return a===l?"IS_POSSIBLE":a>l?"TOO_SHORT":i[i.length-1]<l?"TOO_LONG":i.indexOf(l,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function Yb(t,e,n){if(e===void 0&&(e={}),n=new _e(n),e.v2){if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(t.countryCallingCode)}else{if(!t.phone)return!1;if(t.country){if(!n.hasCountry(t.country))throw new Error("Unknown country: ".concat(t.country));n.country(t.country)}else{if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(t.countryCallingCode)}}if(n.possibleLengths())return Ad(t.phone||t.nationalNumber,n);if(t.countryCallingCode&&n.isNonGeographicCallingCode(t.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}function Ad(t,e){switch(vs(t,e)){case"IS_POSSIBLE":return!0;default:return!1}}function rt(t,e){return t=t||"",new RegExp("^(?:"+e+")$").test(t)}function Ub(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=Gb(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
30
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gb(t,e){if(t){if(typeof t=="string")return Od(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Od(t,e)}}function Od(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}var qb=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function Ds(t,e,n){if(e=e||{},!(!t.country&&!t.countryCallingCode)){n=new _e(n),n.selectNumberingPlan(t.country,t.countryCallingCode);var o=e.v2?t.nationalNumber:t.phone;if(rt(o,n.nationalNumberPattern())){if(Es(o,"FIXED_LINE",n))return n.type("MOBILE")&&n.type("MOBILE").pattern()===""||!n.type("MOBILE")||Es(o,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(var i=Ub(qb),r;!(r=i()).done;){var l=r.value;if(Es(o,l,n))return l}}}}function Es(t,e,n){return e=n.type(e),!e||!e.pattern()||e.possibleLengths()&&e.possibleLengths().indexOf(t.length)<0?!1:rt(t,e.pattern())}function Xb(t,e,n){if(e=e||{},n=new _e(n),n.selectNumberingPlan(t.country,t.countryCallingCode),n.hasTypes())return Ds(t,e,n.metadata)!==void 0;var o=e.v2?t.nationalNumber:t.phone;return rt(o,n.nationalNumberPattern())}function Kb(t,e,n){var o=new _e(n),i=o.getCountryCodesForCallingCode(t);return i?i.filter(function(r){return Zb(e,r,n)}):[]}function Zb(t,e,n){var o=new _e(n);return o.selectNumberingPlan(e),o.numberingPlan.possibleLengths().indexOf(t.length)>=0}function Jb(t){return t.replace(new RegExp("[".concat(jo,"]+"),"g")," ").trim()}var Qb=/(\$\d)/;function ey(t,e,n){var o=n.useInternationalFormat,i=n.withNationalPrefix;n.carrierCode,n.metadata;var r=t.replace(new RegExp(e.pattern()),o?e.internationalFormat():i&&e.nationalPrefixFormattingRule()?e.format().replace(Qb,e.nationalPrefixFormattingRule()):e.format());return o?Jb(r):r}var ty=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function ny(t,e,n){var o=new _e(n);if(o.selectNumberingPlan(t,e),o.defaultIDDPrefix())return o.defaultIDDPrefix();if(ty.test(o.IDDPrefix()))return o.IDDPrefix()}function oy(t){var e=t.number,n=t.ext;if(!e)return"";if(e[0]!=="+")throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(e).concat(n?";ext="+n:"")}function iy(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=sy(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
31
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sy(t,e){if(t){if(typeof t=="string")return Id(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Id(t,e)}}function Id(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function Td(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function Ld(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Td(Object(n),!0).forEach(function(o){ry(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Td(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function ry(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var zd={formatExtension:function(e,n,o){return"".concat(e).concat(o.ext()).concat(n)}};function ly(t,e,n,o){if(n?n=Ld(Ld({},zd),n):n=zd,o=new _e(o),t.country&&t.country!=="001"){if(!o.hasCountry(t.country))throw new Error("Unknown country: ".concat(t.country));o.country(t.country)}else if(t.countryCallingCode)o.selectNumberingPlan(t.countryCallingCode);else return t.phone||"";var i=o.countryCallingCode(),r=n.v2?t.nationalNumber:t.phone,l;switch(e){case"NATIONAL":return r?(l=qo(r,t.carrierCode,"NATIONAL",o,n),Ms(l,t.ext,o,n.formatExtension)):"";case"INTERNATIONAL":return r?(l=qo(r,null,"INTERNATIONAL",o,n),l="+".concat(i," ").concat(l),Ms(l,t.ext,o,n.formatExtension)):"+".concat(i);case"E.164":return"+".concat(i).concat(r);case"RFC3966":return oy({number:"+".concat(i).concat(r),ext:t.ext});case"IDD":if(!n.fromCountry)return;var a=dy(r,t.carrierCode,i,n.fromCountry,o);return Ms(a,t.ext,o,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(e,'"'))}}function qo(t,e,n,o,i){var r=ay(o.formats(),t);return r?ey(t,r,{useInternationalFormat:n==="INTERNATIONAL",withNationalPrefix:!(r.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&i&&i.nationalPrefix===!1),carrierCode:e,metadata:o}):t}function ay(t,e){for(var n=iy(t),o;!(o=n()).done;){var i=o.value;if(i.leadingDigitsPatterns().length>0){var r=i.leadingDigitsPatterns()[i.leadingDigitsPatterns().length-1];if(e.search(r)!==0)continue}if(rt(e,i.pattern()))return i}}function Ms(t,e,n,o){return e?o(t,e,n):t}function dy(t,e,n,o,i){var r=Go(o,i.metadata);if(r===n){var l=qo(t,e,"NATIONAL",i);return n==="1"?n+" "+l:l}var a=ny(o,void 0,i.metadata);if(a)return"".concat(a," ").concat(n," ").concat(qo(t,null,"INTERNATIONAL",i))}function Hd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function jd(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Hd(Object(n),!0).forEach(function(o){cy(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Hd(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function cy(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function uy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wd(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function fy(t,e,n){return e&&Wd(t.prototype,e),n&&Wd(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var hy=function(){function t(e,n,o){if(uy(this,t),!e)throw new TypeError("`country` or `countryCallingCode` not passed");if(!n)throw new TypeError("`nationalNumber` not passed");if(!o)throw new TypeError("`metadata` not passed");var i=my(e,o),r=i.country,l=i.countryCallingCode;this.country=r,this.countryCallingCode=l,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return o}}return fy(t,[{key:"setExt",value:function(n){this.ext=n}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:Kb(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return Yb(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return Xb(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){var n=new _e(this.getMetadata());return n.isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(n){return this.number===n.number&&this.ext===n.ext}},{key:"getType",value:function(){return Ds(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(n,o){return ly(this,n,o?jd(jd({},o),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(n){return this.format("NATIONAL",n)}},{key:"formatInternational",value:function(n){return this.format("INTERNATIONAL",n)}},{key:"getURI",value:function(n){return this.format("RFC3966",n)}}]),t}(),py=function(e){return/^[A-Z]{2}$/.test(e)};function my(t,e){var n,o,i=new _e(e);return py(t)?(n=t,i.selectNumberingPlan(n),o=i.countryCallingCode()):o=t,{country:n,countryCallingCode:o}}var gy=new RegExp("(["+Te+"])");function by(t,e,n,o){if(e){var i=new _e(o);i.selectNumberingPlan(e,n);var r=new RegExp(i.IDDPrefix());if(t.search(r)===0){t=t.slice(t.match(r)[0].length);var l=t.match(gy);if(!(l&&l[1]!=null&&l[1].length>0&&l[1]==="0"))return t}}}function yy(t,e){if(t&&e.numberingPlan.nationalPrefixForParsing()){var n=new RegExp("^(?:"+e.numberingPlan.nationalPrefixForParsing()+")"),o=n.exec(t);if(o){var i,r,l=o.length-1,a=l>0&&o[l];if(e.nationalPrefixTransformRule()&&a)i=t.replace(n,e.nationalPrefixTransformRule()),l>1&&(r=o[1]);else{var d=o[0];i=t.slice(d.length),a&&(r=o[1])}var c;if(a){var u=t.indexOf(o[1]),f=t.slice(0,u);f===e.numberingPlan.nationalPrefix()&&(c=e.numberingPlan.nationalPrefix())}else c=o[0];return{nationalNumber:i,nationalPrefix:c,carrierCode:r}}}return{nationalNumber:t}}function Vs(t,e){var n=yy(t,e),o=n.carrierCode,i=n.nationalNumber;if(i!==t){if(!$y(t,i,e))return{nationalNumber:t};if(e.possibleLengths()&&!_y(i,e))return{nationalNumber:t}}return{nationalNumber:i,carrierCode:o}}function $y(t,e,n){return!(rt(t,n.nationalNumberPattern())&&!rt(e,n.nationalNumberPattern()))}function _y(t,e){switch(vs(t,e)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}function wy(t,e,n,o){var i=e?Go(e,o):n;if(t.indexOf(i)===0){o=new _e(o),o.selectNumberingPlan(e,n);var r=t.slice(i.length),l=Vs(r,o),a=l.nationalNumber,d=Vs(t,o),c=d.nationalNumber;if(!rt(c,o.nationalNumberPattern())&&rt(a,o.nationalNumberPattern())||vs(c,o)==="TOO_LONG")return{countryCallingCode:i,number:r}}return{number:t}}function xy(t,e,n,o){if(!t)return{};var i;if(t[0]!=="+"){var r=by(t,e,n,o);if(r&&r!==t)i=!0,t="+"+r;else{if(e||n){var l=wy(t,e,n,o),a=l.countryCallingCode,d=l.number;if(a)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:a,number:d}}return{number:t}}}if(t[1]==="0")return{};o=new _e(o);for(var c=2;c-1<=ub&&c<=t.length;){var u=t.slice(1,c);if(o.hasCallingCode(u))return o.selectNumberingPlan(u),{countryCallingCodeSource:i?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:u,number:t.slice(c)};c++}return{}}function Cy(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=ky(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
32
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ky(t,e){if(t){if(typeof t=="string")return Yd(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Yd(t,e)}}function Yd(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function Sy(t,e){var n=e.countries,o=e.defaultCountry,i=e.metadata;i=new _e(i);for(var r=[],l=Cy(n),a;!(a=l()).done;){var d=a.value;if(i.country(d),i.leadingDigits()){if(t&&t.search(i.leadingDigits())===0)return d}else if(Ds({phone:t,country:d},void 0,i.metadata))if(o){if(d===o)return d;r.push(d)}else return d}if(r.length>0)return r[0]}var vy=!1;function Dy(t,e){var n=e.nationalNumber,o=e.defaultCountry,i=e.metadata;if(vy&&i.isNonGeographicCallingCode(t))return"001";var r=i.getCountryCodesForCallingCode(t);if(r)return r.length===1?r[0]:Sy(n,{countries:r,defaultCountry:o,metadata:i.metadata})}var Ud="+",Ey="[\\-\\.\\(\\)]?",Gd="(["+Te+"]|"+Ey+")",My="^\\"+Ud+Gd+"*["+Te+"]"+Gd+"*$",Vy=new RegExp(My,"g"),Bs=Te,By="["+Bs+"]+((\\-)*["+Bs+"])*",Py="a-zA-Z",Ny="["+Py+"]+((\\-)*["+Bs+"])*",Fy="^("+By+"\\.)*"+Ny+"\\.?$",Ry=new RegExp(Fy,"g"),qd="tel:",Ps=";phone-context=",Ay=";isub=";function Oy(t){var e=t.indexOf(Ps);if(e<0)return null;var n=e+Ps.length;if(n>=t.length)return"";var o=t.indexOf(";",n);return o>=0?t.substring(n,o):t.substring(n)}function Iy(t){return t===null?!0:t.length===0?!1:Vy.test(t)||Ry.test(t)}function Ty(t,e){var n=e.extractFormattedPhoneNumber,o=Oy(t);if(!Iy(o))throw new st("NOT_A_NUMBER");var i;if(o===null)i=n(t)||"";else{i="",o.charAt(0)===Ud&&(i+=o);var r=t.indexOf(qd),l;r>=0?l=r+qd.length:l=0;var a=t.indexOf(Ps);i+=t.substring(l,a)}var d=i.indexOf(Ay);if(d>0&&(i=i.substring(0,d)),i!=="")return i}var Ly=250,zy=new RegExp("["+ks+Te+"]"),Hy=new RegExp("[^"+Te+"#]+$");function jy(t,e,n){if(e=e||{},n=new _e(n),e.defaultCountry&&!n.hasCountry(e.defaultCountry))throw e.v2?new st("INVALID_COUNTRY"):new Error("Unknown country: ".concat(e.defaultCountry));var o=Yy(t,e.v2,e.extract),i=o.number,r=o.ext,l=o.error;if(!i){if(e.v2)throw l==="TOO_SHORT"?new st("TOO_SHORT"):new st("NOT_A_NUMBER");return{}}var a=Gy(i,e.defaultCountry,e.defaultCallingCode,n),d=a.country,c=a.nationalNumber,u=a.countryCallingCode,f=a.countryCallingCodeSource,h=a.carrierCode;if(!n.hasSelectedNumberingPlan()){if(e.v2)throw new st("INVALID_COUNTRY");return{}}if(!c||c.length<Cs){if(e.v2)throw new st("TOO_SHORT");return{}}if(c.length>cb){if(e.v2)throw new st("TOO_LONG");return{}}if(e.v2){var p=new hy(u,c,n.metadata);return d&&(p.country=d),h&&(p.carrierCode=h),r&&(p.ext=r),p.__countryCallingCodeSource=f,p}var m=(e.extended?n.hasSelectedNumberingPlan():d)?rt(c,n.nationalNumberPattern()):!1;return e.extended?{country:d,countryCallingCode:u,carrierCode:h,valid:m,possible:m?!0:!!(e.extended===!0&&n.possibleLengths()&&Ad(c,n)),phone:c,ext:r}:m?Uy(d,c,r):{}}function Wy(t,e,n){if(t){if(t.length>Ly){if(n)throw new st("TOO_LONG");return}if(e===!1)return t;var o=t.search(zy);if(!(o<0))return t.slice(o).replace(Hy,"")}}function Yy(t,e,n){var o=Ty(t,{extractFormattedPhoneNumber:function(l){return Wy(l,n,e)}});if(!o)return{};if(!Fb(o))return Rb(o)?{error:"TOO_SHORT"}:{};var i=Ab(o);return i.ext?i:{number:o}}function Uy(t,e,n){var o={country:t,phone:e};return n&&(o.ext=n),o}function Gy(t,e,n,o){var i=xy(Nd(t),e,n,o.metadata),r=i.countryCallingCodeSource,l=i.countryCallingCode,a=i.number,d;if(l)o.selectNumberingPlan(l);else if(a&&(e||n))o.selectNumberingPlan(e,n),e&&(d=e),l=n||Go(e,o.metadata);else return{};if(!a)return{countryCallingCodeSource:r,countryCallingCode:l};var c=Vs(Nd(a),o),u=c.nationalNumber,f=c.carrierCode,h=Dy(l,{nationalNumber:u,defaultCountry:e,metadata:o});return h&&(d=h,h==="001"||o.country(d)),{country:d,countryCallingCode:l,countryCallingCodeSource:r,nationalNumber:u,carrierCode:f}}function Xd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function Kd(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Xd(Object(n),!0).forEach(function(o){qy(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xd(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function qy(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Xy(t,e,n){return jy(t,Kd(Kd({},e),{},{v2:!0}),n)}function Zd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function Ky(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Zd(Object(n),!0).forEach(function(o){Zy(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zd(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function Zy(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Jy(t,e){return n$(t)||t$(t,e)||e$(t,e)||Qy()}function Qy(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
33
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e$(t,e){if(t){if(typeof t=="string")return Jd(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jd(t,e)}}function Jd(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function t$(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var o=[],i=!0,r=!1,l,a;try{for(n=n.call(t);!(i=(l=n.next()).done)&&(o.push(l.value),!(e&&o.length===e));i=!0);}catch(d){r=!0,a=d}finally{try{!i&&n.return!=null&&n.return()}finally{if(r)throw a}}return o}}function n$(t){if(Array.isArray(t))return t}function o$(t){var e=Array.prototype.slice.call(t),n=Jy(e,4),o=n[0],i=n[1],r=n[2],l=n[3],a,d,c;if(typeof o=="string")a=o;else throw new TypeError("A text for parsing must be a string.");if(!i||typeof i=="string")l?(d=r,c=l):(d=void 0,c=r),i&&(d=Ky({defaultCountry:i},d));else if(Wo(i))r?(d=i,c=r):c=i;else throw new Error("Invalid second argument: ".concat(i));return{text:a,options:d,metadata:c}}function Qd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function ec(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Qd(Object(n),!0).forEach(function(o){i$(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qd(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function i$(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s$(t,e,n){e&&e.defaultCountry&&!Db(e.defaultCountry,n)&&(e=ec(ec({},e),{},{defaultCountry:void 0}));try{return Xy(t,e,n)}catch(o){if(!(o instanceof st))throw o}}function r$(){var t=o$(arguments),e=t.text,n=t.options,o=t.metadata;return s$(e,n,o)}function Ns(){return _d(r$,arguments)}function l$(){return _d(Go,arguments)}const a$=["value","inputMode","type","placeholder","minlength","maxlength","disabled","readOnly"],Fs=s.defineComponent({__name:"FmTextField",props:{placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},inputmode:{default:"text"},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},prependIcon:{default:""},appendIcon:{default:""},showValidBorder:{type:Boolean,default:!1},labelInfo:{default:""},showWordCount:{type:Boolean,default:!1},invalid:{type:Boolean},modelValue:{},label:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","focus-changed"],setup(t,{emit:e}){const n=t,o=e,i=s.ref(null),r=X(n,"modelValue"),{isFocused:l,focus:a,blur:d}=In(),c=u=>{r.value=u.target.value};return(u,f)=>(s.openBlock(),s.createBlock(Me,{modelValue:s.unref(r),"onUpdate:modelValue":f[2]||(f[2]=h=>s.isRef(r)?r.value=h:null),label:u.label,disabled:u.disabled,required:u.labelMark==="required",optional:u.labelMark==="optional",info:u.labelInfo,rules:u.rules,focused:s.unref(l),"helper-text":u.helperText,"helper-state":u.helperState},s.createSlots({label:s.withCtx(()=>[s.renderSlot(u.$slots,"label")]),default:s.withCtx(({invalid:h})=>[s.createVNode(me,{class:"cursor-text","append-icon":u.appendIcon,"prepend-icon":u.prependIcon,focused:s.unref(l),invalid:u.invalid||h,"show-valid-border":u.showValidBorder},{prepend:s.withCtx(()=>[s.renderSlot(u.$slots,"prepend")]),append:s.withCtx(()=>[s.renderSlot(u.$slots,"append")]),default:s.withCtx(()=>[s.createElementVNode("input",{ref_key:"inputEl",ref:i,class:s.normalizeClass({"fm-text-field--input fm-typo-body-lg-400":!0,"fm-color-typo-primary":!u.disabled,"fm-color-typo-disabled":u.disabled}),value:s.unref(r),inputMode:u.inputmode,type:u.inputmode,placeholder:u.placeholder,minlength:u.minLength,maxlength:u.maxLength,disabled:u.disabled,readOnly:u.readonly,onInput:c,onFocus:f[0]||(f[0]=()=>{s.unref(a)(),o("focus-changed",!0)}),onBlur:f[1]||(f[1]=()=>{s.unref(d)(),o("focus-changed",!1)})},null,42,a$)]),_:2},1032,["append-icon","prepend-icon","focused","invalid","show-valid-border"])]),"helper-text":s.withCtx(()=>[s.renderSlot(u.$slots,"helper-text")]),_:2},[u.showWordCount?{name:"helper-append",fn:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass([u.disabled?"fm-color-typo-disabled":"text-fm-color-typo-secondary","fm-typo-body-sm-400"])},s.toDisplayString(u.maxLength?`${s.unref(r).length} / ${u.maxLength}`:""),3)]),key:"0"}:void 0]),1032,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),Fw="",d$={class:"flex gap-4"},c$=["src","alt"],u$=["src","alt"],f$={class:""},h$=s.defineComponent({__name:"FmPhoneNumber",props:{modelValue:{},defaultCountry:{default:"MY"},placeholder:{default:""},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=X(n,"modelValue"),r=["MY","SG"],l=r.reduce((g,b)=>(g[b]=`+${l$(b)}`,g),{}),a=r.map(g=>({label:"",value:g}));function d(g){var b;return g?((b=Object.entries(l).find(([,y])=>g.startsWith(y)))==null?void 0:b[0])??null:n.defaultCountry}const c=s.computed(()=>d(n.modelValue)),u=s.computed(()=>!c.value||!n.modelValue?l[n.defaultCountry]:n.modelValue),f=s.computed({get(){const g=Ns(u.value);return g?g.formatInternational().replace(l[c.value],"").trim():u.value.replace(l[c.value],"").trim()},set(g){const b=`${l[c.value]}${g}`,y=Ns(b);if(!y){i.value=b;return}i.value=y.formatInternational()}}),h=s.computed({get(){return c.value??n.defaultCountry},set(g){if(!c.value){o("update:modelValue",l[n.defaultCountry]);return}const y=l[c.value],$=l[g];i.value=u.value.replace(y,$)}}),p=s.ref({dropdown:!1,textField:!1});function m(g){const b=c.value;if(!g.replace(l[b],"").trim().length)return!0;const $=Ns(i.value,b);return!$||!$.isValid()?"Invalid phone number":!0}return(g,b)=>(s.openBlock(),s.createBlock(Me,{modelValue:s.unref(i),"onUpdate:modelValue":b[4]||(b[4]=y=>s.isRef(i)?i.value=y:null),class:"flex gap-4",label:g.label,disabled:g.disabled,required:g.labelMark==="required",optional:g.labelMark==="optional",info:g.labelInfo,rules:[...g.rules,m],focused:p.value.dropdown||p.value.textField,"helper-text":g.helperText,"helper-state":g.helperState},{label:s.withCtx(()=>[s.renderSlot(g.$slots,"label")]),default:s.withCtx(({invalid:y})=>[s.createElementVNode("div",d$,[s.createVNode(zo,{"model-value":h.value,"onUpdate:modelValue":b[0]||(b[0]=$=>h.value=$),items:s.unref(a),onDropdownChanged:b[1]||(b[1]=$=>p.value.dropdown=$)},{default:s.withCtx(()=>[s.createElementVNode("img",{class:"h-auto w-[20px]",src:`/flags/${h.value}.svg`,alt:h.value},null,8,c$)]),"menu-content":s.withCtx(({handleItemChange:$})=>[(s.openBlock(),s.createElementBlock(s.Fragment,null,s.renderList(r,k=>s.createVNode(Ie,{key:k,"model-value":h.value===k,"onUpdate:modelValue":v=>$(v,s.unref(a).find(x=>x.value===k))},{label:s.withCtx(()=>[s.createElementVNode("img",{class:"h-auto w-[20px]",src:`/flags/${k}.svg`,alt:k},null,8,u$)]),_:2},1032,["model-value","onUpdate:modelValue"])),64))]),_:1},8,["model-value","items"]),s.createVNode(Fs,{"model-value":f.value,"onUpdate:modelValue":b[2]||(b[2]=$=>f.value=$),inputmode:"tel",class:"flex-1",invalid:y,onFocusChanged:b[3]||(b[3]=$=>p.value.textField=$)},{prepend:s.withCtx(()=>[s.createElementVNode("span",f$,"("+s.toDisplayString(s.unref(l)[c.value])+")",1)]),_:2},1032,["model-value","invalid"])])]),"helper-text":s.withCtx(()=>[s.renderSlot(g.$slots,"helper-text")]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),p$={class:"flex gap-8 items-center"},m$=["onInput","onKeydown"],g$=s.defineComponent({__name:"FmPinField",props:{modelValue:{default:()=>[]},length:{default:6},type:{default:"number"}},emits:["update:modelValue","complete"],setup(t,{emit:e}){const n=e,o=t,i=X(o,"modelValue"),r=s.ref([]),l=(f,h)=>{const p=f.target;if(o.type==="number"&&!/^[0-9]$/g.test(p.value)){p.value="";return}p.value=p.value.slice(-1),c(p.value,h),r.value[h+1]?r.value[h+1].focus():r.value[h].blur()},a=(f,h)=>{f.preventDefault();const p=f.target;p.value="",c(null,h),r.value[h-1]?r.value[h-1].focus():r.value[h].focus()},d=(f,h)=>{f.preventDefault(),f.key==="ArrowLeft"&&(r.value[h-1]?r.value[h-1].focus():r.value[h].focus()),f.key==="ArrowRight"&&(r.value[h+1]?r.value[h+1].focus():r.value[h].focus())},c=(f,h)=>{i.value=i.value.toSpliced(h,1,f)},u=(f,h)=>{r.value[h]=f};return s.onMounted(()=>{i.value=Array.from(Array(o.length).fill(null))}),s.watch(()=>i.value,()=>{i.value.every(f=>f!==null)&&n("complete",i.value.join(""))}),(f,h)=>(s.openBlock(),s.createElementBlock("div",p$,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(f.length,(p,m)=>(s.openBlock(),s.createElementBlock("input",{key:p,ref_for:!0,ref:g=>u(g,m),class:s.normalizeClass(["fm-pin-field",{"fm-pin-field--populated":s.unref(i)[m]!==null}]),type:"text",onInput:g=>l(g,m),onKeydown:[s.withKeys(g=>a(g,m),["backspace"]),s.withKeys(g=>d(g,m),["arrow-left","arrow-right"])]},null,42,m$))),128))]))}}),Rw="",b$=Z(g$,[["__scopeId","data-v-45a53bf7"]]),y$={class:"fm-radio-btn"},$$={class:"fm-radio-btn__input--container"},_$=["value","disabled","checked"],w$={class:"py-8"},x$={class:"fm-typo-body-lg-400"},C$={key:0,class:"fm-typo-body-md-400 text-fm-color-typo-secondary"},k$=s.defineComponent({__name:"FmRadio",props:{modelValue:{default:null},value:{},label:{default:""},sublabel:{default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const e=t,n=X(e,"modelValue"),o=s.ref(),i=s.inject(mr,null),r=()=>{l.value||(i?i.updateValue(e.value):n.value=e.value)},l=s.computed(()=>i?i.getDisabled():e.disabled),a=s.computed(()=>i?e.value===i.groupValue.value:n.value===e.value);return(d,c)=>{const u=s.resolveDirective("wave");return s.openBlock(),s.createElementBlock("div",y$,[s.createElementVNode("label",{class:s.normalizeClass({"fm-radio-btn--wrapper":!0,"cursor-not-allowed text-fm-color-typo-disabled":l.value,"cursor-pointer":!l.value}),onClick:r},[s.withDirectives((s.openBlock(),s.createElementBlock("div",$$,[s.createElementVNode("input",{ref_key:"inputEl",ref:o,class:"fm-radio-btn__input--btn",type:"radio",value:d.value,disabled:l.value,checked:a.value},null,8,_$)])),[[u,!l.value]]),s.createElementVNode("div",w$,[s.renderSlot(d.$slots,"label",{},()=>[s.createElementVNode("div",x$,s.toDisplayString(d.label),1),d.sublabel?(s.openBlock(),s.createElementBlock("div",C$,s.toDisplayString(d.sublabel),1)):s.createCommentVNode("",!0)],!0)])],2)])}}}),Aw="",S$=Z(k$,[["__scopeId","data-v-24fa5bf9"]]),v$=s.defineComponent({__name:"FmRadioGroup",props:{modelValue:{},inline:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[t=>!!t||"This field is required"]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=X(e,"modelValue");return s.provide(mr,{groupValue:n,getDisabled:()=>e.disabled,updateValue(o){n.value=o}}),(o,i)=>(s.openBlock(),s.createBlock(Me,{modelValue:s.unref(n),"onUpdate:modelValue":i[0]||(i[0]=r=>s.isRef(n)?n.value=r:null),label:o.label,disabled:o.disabled,required:o.labelMark==="required",optional:o.labelMark==="optional",info:o.labelInfo,rules:o.rules,"helper-text":o.helperText,"helper-state":o.helperState},{label:s.withCtx(()=>[s.renderSlot(o.$slots,"label")]),default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass({"flex items-center gap-16 justify-start":o.inline})},[s.renderSlot(o.$slots,"default")],2)]),"helper-text":s.withCtx(()=>[s.renderSlot(o.$slots,"helper-text")]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","helper-text","helper-state"]))}}),tc=s.defineComponent({__name:"FmSearch",props:{placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},inputmode:{default:"text"},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},labelInfo:{default:""},showWordCount:{type:Boolean,default:!1},collapsible:{type:Boolean,default:!1},modelValue:{},label:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},setup(t){const e=t,n=s.computed(()=>{const{modelValue:h,...p}=e;return p}),o=X(e,"modelValue"),i=s.ref(!1),r=s.ref(),l=s.ref(e.collapsible),a=s.ref(e.collapsible);function d(){var p;l.value=!1;const h=(p=r.value)==null?void 0:p.querySelector("input");h&&h.focus()}function c(h){if(i.value=h,!!e.collapsible){if(h){a.value=!1;return}l.value=o.value.length===0,l.value&&setTimeout(()=>{a.value=!0},250)}}const u=s.ref(!0);function f(h){if(u.value){u.value=!1;return}const p=h.el;p&&(p.style.opacity="0",setTimeout(()=>{p.style.opacity="1"},250))}return(h,p)=>(s.openBlock(),s.createElementBlock("div",{ref_key:"componentRoot",ref:r,class:"relative"},[h.collapsible&&l.value?(s.openBlock(),s.createBlock(K,{key:0,variant:"tertiary",icon:"search",style:{transition:"opacity ease-out 250ms"},onClick:p[0]||(p[0]=m=>d()),onVnodeMounted:f},null,512)):s.createCommentVNode("",!0),s.createVNode(Fs,s.mergeProps(n.value,{modelValue:s.unref(o),"onUpdate:modelValue":p[2]||(p[2]=m=>s.isRef(o)?o.value=m:null),disabled:e.disabled||h.collapsible&&l.value,class:[h.collapsible&&l.value?"w-0 absolute opacity-0 top-0":"w-full opacity-100",a.value?"z-[-1]":""],style:{transition:"width ease-out 250ms, opacity ease-out 250ms"},onFocusChanged:c}),s.createSlots({_:2},[i.value?void 0:{name:"prepend",fn:s.withCtx(()=>[s.createVNode(z,{name:"search"})]),key:"0"},s.unref(o).length?{name:"append",fn:s.withCtx(()=>[s.createVNode(z,{name:"close",class:"cursor-pointer text-fm-color-neutral-gray-300",onClick:p[1]||(p[1]=m=>o.value="")})]),key:"1"}:void 0]),1040,["modelValue","disabled","class"])],512))}}),D$={key:0,class:"flex fm-typo-title-sm-700 items-center justify-between text-fm-color-typo-primary"},E$={key:0},M$={class:"overflow-y-auto"},V$={key:1,class:"flex gap-8 items-center"},B$=s.defineComponent({__name:"FmTopSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1},fullscreenSize:{default:void 0}},emits:["update:modelValue"],setup(t){const e=t,n=s.ref(null),o=X(e,"modelValue"),i=r=>{e.dismissAway&&n.value&&r.target===n.value&&(o.value=!1)};return(r,l)=>(s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("div",{onClick:l[0]||(l[0]=a=>o.value=!0)},[s.renderSlot(r.$slots,"top-sheet-button",{},void 0,!0)]),(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[s.createVNode(s.Transition,null,{default:s.withCtx(()=>[s.unref(o)?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:n,class:"fm-top-sheet--container",onClick:l[1]||(l[1]=a=>i(a))},[s.createVNode(s.Transition,{name:r.fullscreenSize?`slide-${r.fullscreenSize}`:"slide",appear:""},{default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["fm-top-sheet",`fm-top-sheet--fullscreen-${r.fullscreenSize}`])},[r.header||r.$slots["top-sheet-header"]?(s.openBlock(),s.createElementBlock("div",D$,[s.renderSlot(r.$slots,"top-sheet-header",{},()=>[r.header?(s.openBlock(),s.createElementBlock("div",E$,s.toDisplayString(r.header),1)):s.createCommentVNode("",!0)],!0)])):s.createCommentVNode("",!0),s.createElementVNode("div",M$,[s.renderSlot(r.$slots,"default",{},void 0,!0)]),r.$slots["top-sheet-footer"]?(s.openBlock(),s.createElementBlock("div",V$,[s.renderSlot(r.$slots,"top-sheet-footer",{},void 0,!0)])):s.createCommentVNode("",!0)],2)]),_:3},8,["name"])],512)):s.createCommentVNode("",!0)]),_:3})]))]))}}),Ow="",nc=Z(B$,[["__scopeId","data-v-4e982d6e"]]);var Rs={exports:{}};function oc(t,e=100,n={}){if(typeof t!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof t}\`.`);if(e<0)throw new RangeError("`wait` must not be negative.");const{immediate:o}=typeof n=="boolean"?{immediate:n}:n;let i,r,l,a,d;function c(){const f=Date.now()-a;if(f<e&&f>=0)l=setTimeout(c,e-f);else if(l=void 0,!o){const h=i,p=r;i=void 0,r=void 0,d=t.apply(h,p)}}const u=function(...f){if(i&&this!==i)throw new Error("Debounced method called with different contexts.");i=this,r=f,a=Date.now();const h=o&&!l;if(l||(l=setTimeout(c,e)),h){const p=i,m=r;i=void 0,r=void 0,d=t.apply(p,m)}return d};return u.clear=()=>{l&&(clearTimeout(l),l=void 0)},u.flush=()=>{if(!l)return;const f=i,h=r;i=void 0,r=void 0,d=t.apply(f,h),clearTimeout(l),l=void 0},u}Rs.exports.debounce=oc,Rs.exports=oc;var P$=Rs.exports;const ic=as(P$);var sc={exports:{}};(function(t,e){(function(){var n={};t.exports=n,n.simpleFilter=function(o,i){return i.filter(function(r){return n.test(o,r)})},n.test=function(o,i){return n.match(o,i)!==null},n.match=function(o,i,r){r=r||{};var l=0,a=[],d=i.length,c=0,u=0,f=r.pre||"",h=r.post||"",p=r.caseSensitive&&i||i.toLowerCase(),m;o=r.caseSensitive&&o||o.toLowerCase();for(var g=0;g<d;g++)m=i[g],p[g]===o[l]?(m=f+m+h,l+=1,u+=1+u):u=0,c+=u,a[a.length]=m;return l===o.length?(c=p===o?1/0:c,{rendered:a.join(""),score:c}):null},n.filter=function(o,i,r){return!i||i.length===0?[]:typeof o!="string"?i:(r=r||{},i.reduce(function(l,a,d,c){var u=a;r.extract&&(u=r.extract(a));var f=n.match(o,u,r);return f!=null&&(l[l.length]={string:f.rendered,score:f.score,index:d,original:a}),l},[]).sort(function(l,a){var d=a.score-l.score;return d||l.index-a.index}))}})()})(sc);var N$=sc.exports;const F$=as(N$);function Xo(t,e){const[n]=F$.filter(t.toLocaleLowerCase(),[e],{pre:"|",post:"|",extract(i){return i.toLocaleLowerCase()}});if(!n)return{label:e,segments:[{segment:e,isMatch:!1}],matched:!1};const o=n.string.toString().replace(/\|\|/g,"").split("|").reduce((i,r,l)=>(i.push({segment:r,isMatch:l%2!==0}),i),new Array);return{label:e,segments:o,matched:!0}}const R$={class:"flex flex-col gap-4"},A$={class:"bg-white flex gap-4 px-24 py-8 sticky top-0"},O$={class:"hidden sm:inline xs:inline"},I$={key:0},T$={key:0,class:"flex flex-col"},L$={class:"flex flex-col"},z$={class:"flex items-center px-24 py-12"},H$=s.createElementVNode("div",{class:"fm-typo-body-md-400 text-fm-color-typo-secondary"}," Recent search ",-1),j$=s.createElementVNode("div",{class:"py-4"},[s.createElementVNode("hr",{class:"border-fm-color-neutral-gray-100"})],-1),W$=["onClick"],Y$={class:"fm-typo-body-lg-400 text-fm-color-typo-primary"},U$={class:"fm-typo-body-lg-400 px-24 py-12 text-center text-fm-color-primary"},G$={class:"fm-typo-body-lg-400 px-24 py-12 text-center text-fm-color-typo-secondary"},q$={key:3,class:"flex flex-col"},X$=["onClick"],K$={class:"flex flex-col gap-4"},Z$={key:0,class:"text-fm-color-typo-secondary"},J$={class:"px-16 py-4"},Q$=5,e3=s.defineComponent({__name:"FmGlobalSearch",props:{show:{type:Boolean,default:!1},modelValue:{default:""},suggestions:{default:void 0},onSearch:{type:Function,default:void 0},placeholder:{default:""},hintPlaceholder:{default:""},notFoundPlaceholder:{default:""},recentSearchKey:{default:""}},emits:["dismiss","submit","update:show","update:modelValue"],setup(t,{emit:e}){const n=t,o=e;function i(){if(!n.recentSearchKey)return;const F=n.recentSearchKey;localStorage.removeItem(F),a.value=[]}function r(){if(!n.recentSearchKey)return;const F=n.recentSearchKey,P=localStorage.getItem(F);if(!P)return[];try{return JSON.parse(P)}catch{return new Array}}const l=ic(function(P){if(!n.recentSearchKey)return;const w=n.recentSearchKey,_=P().trim();if(!w||!_)return;const E=r()??[],S=[...new Set([_,...E])].slice(0,Q$),D=JSON.stringify(S);return localStorage.setItem(w,D),a.value=S,S},800),a=s.ref(r()),d=X(n,"show");s.watch([()=>n.show],()=>{n.show?(f.value=null,n.suggestions&&$()):o("dismiss")});const c=X(n,"modelValue"),u=s.ref(n.modelValue);s.watch([()=>u.value],()=>{v()});const f=s.ref(null),h=s.ref(!0),p=s.computed(()=>{var F;return h.value?(F=f.value)==null?void 0:F.slice(0,5):f.value});s.watch([()=>f.value],([])=>{h.value=!0});const m=s.computed(()=>f.value===null),g=s.ref(!1),b=s.ref(""),y=()=>u.value;async function $(){if(!d.value)return;const F=y();if(!F)return;const P=Math.random().toString();if(b.value=P,n.suggestions){f.value=n.suggestions.map(w=>({label:Xo(F,w.label),sublabel:w.sublabel?Xo(F,w.sublabel):null})).filter(w=>{var _;return w.label.matched||((_=w.sublabel)==null?void 0:_.matched)}),l(y);return}if(n.onSearch)try{g.value=!0;const w=await n.onSearch(F);P===b.value&&(f.value=w.map(_=>({label:Xo(F,_.label),sublabel:_.sublabel?Xo(F,_.sublabel):null})))}catch{P===b.value&&(f.value=[])}finally{P===b.value&&(g.value=!1,l(y))}}function k(F){d.value=!1,o("dismiss"),c.value=F}const v=ic($),x=s.computed(()=>a.value&&a.value.length===0),B=s.computed(()=>(!u.value||m.value)&&!x.value),M=s.computed(()=>(!u.value||m.value)&&x.value),N=s.computed(()=>u.value&&f.value&&f.value.length===0);return(F,P)=>(s.openBlock(),s.createBlock(nc,{"model-value":s.unref(d),"onUpdate:modelValue":P[4]||(P[4]=w=>s.isRef(d)?d.value=w:null),"fullscreen-size":"sm","dismiss-away":""},{default:s.withCtx(()=>{var w,_;return[s.createElementVNode("div",R$,[s.createElementVNode("div",A$,[s.createElementVNode("div",O$,[s.createVNode(K,{"prepend-icon":"arrow_back",variant:"tertiary",onClick:P[0]||(P[0]=E=>d.value=!1)})]),s.createVNode(tc,{"model-value":u.value,"onUpdate:modelValue":P[1]||(P[1]=E=>u.value=E),class:"flex-1",placeholder:F.placeholder},null,8,["model-value","placeholder"])]),g.value?(s.openBlock(),s.createElementBlock("div",I$,[s.createVNode(qn,{size:"xl"})])):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[B.value?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[F.recentSearchKey&&((w=a.value)!=null&&w.length)?(s.openBlock(),s.createElementBlock("div",T$,[s.createElementVNode("div",L$,[s.createElementVNode("div",z$,[H$,s.createVNode(Xn),s.createVNode(K,{label:"Clear history",variant:"plain",size:"md",onClick:P[2]||(P[2]=E=>i())})]),j$]),s.createElementVNode("div",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.value,(E,S)=>(s.openBlock(),s.createElementBlock("div",{key:S,class:"cursor-pointer flex gap-8 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12",onClick:D=>u.value=E},[s.createVNode(z,{size:"lg",name:"history"}),s.createElementVNode("div",Y$,s.toDisplayString(E),1)],8,W$))),128))])])):s.createCommentVNode("",!0)],64)):M.value?s.renderSlot(F.$slots,"hint-placeholder",{key:1},()=>[s.createElementVNode("div",U$,s.toDisplayString(F.hintPlaceholder),1)]):N.value?s.renderSlot(F.$slots,"not-found-placeholder",{key:2},()=>[s.createElementVNode("div",G$,s.toDisplayString(F.notFoundPlaceholder||`No result found for “${u.value}”`),1)]):(s.openBlock(),s.createElementBlock("div",q$,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(p.value,(E,S)=>s.renderSlot(F.$slots,"search-result-item",s.mergeProps({key:S},{result:E}),()=>[s.createElementVNode("div",{class:"cursor-pointer flex gap-16 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12 w-full",onClick:D=>k(E.label.label)},[s.createVNode(z,{size:"lg",name:"arrow_forward"}),s.createElementVNode("div",K$,[s.createElementVNode("div",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(E.label.segments,(D,C)=>(s.openBlock(),s.createElementBlock("span",{key:C,class:s.normalizeClass({"fm-typo-body-lg-400":!D.isMatch,"fm-typo-body-lg-700":D.isMatch})},s.toDisplayString(D.segment),3))),128))]),E.sublabel?(s.openBlock(),s.createElementBlock("div",Z$,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(E.sublabel.segments,(D,C)=>(s.openBlock(),s.createElementBlock("span",{key:C,class:s.normalizeClass({"fm-typo-body-md-400":!D.isMatch,"fm-typo-body-md-700":D.isMatch})},s.toDisplayString(D.segment),3))),128))])):s.createCommentVNode("",!0)])],8,X$)])),128)),s.createElementVNode("div",J$,[h.value&&(((_=f.value)==null?void 0:_.length)??0)>5?(s.openBlock(),s.createBlock(K,{key:0,label:`show ${f.value.length-5} more results`,variant:"plain",onClick:P[3]||(P[3]=E=>h.value=!1)},null,8,["label"])):s.createCommentVNode("",!0)])]))],64))])]}),_:3},8,["model-value"]))}}),t3=["inputMode","value","placeholder","readOnly"],n3={key:0},o3=s.defineComponent({__name:"FmStepperField",props:{modelValue:{},placeholder:{default:""},inputmode:{default:"numeric"},readonly:{type:Boolean},labelMark:{default:"none"},step:{default:1},min:{default:void 0},max:{default:void 0},prependIcon:{default:""},appendIcon:{default:""},useGrouping:{type:Boolean,default:!0},isCurrency:{type:Boolean,default:!1},showSteppers:{type:Boolean,default:!0},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},labelInfo:{default:""},label:{default:""},disabled:{type:Boolean},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=X(e,"modelValue"),{isFocused:o,blur:i,focus:r}=In(),l=s.ref(null);let a;const d=$=>{if($!==""){const k=+$.replace(/,/g,"");return isNaN(k)?null:k}return null},c=$=>a.format($),u=$=>{if(typeof n.value!="number"){n.value=+n.value;return}if($>0&&g.value||$<0&&b.value)return;let k=y(n.value)?n.value+$:0;k=f(k),n.value=k},f=$=>e.max!==void 0&&$>e.max?e.max:e.min!==void 0&&$<e.min?e.min:$,h=()=>{var $;n.value=d((($=l.value)==null?void 0:$.value)??"")},p=$=>{if(![...Array(10).keys()].map(k=>k.toString()).includes($.key)&&!["Backspace","Tab","Enter",".","-","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes($.key)){$.preventDefault();return}},m=s.computed(()=>n.value!=null?c(n.value):""),g=s.computed(()=>{let $=!1;return e.max!==void 0&&($=n.value>=e.max),e.min!==void 0&&($=n.value<e.min),$}),b=s.computed(()=>{let $=!1;return e.max!==void 0&&($=n.value>e.max),e.min!==void 0&&($=n.value<=e.min),$});s.onBeforeMount(()=>{a=new Intl.NumberFormat("en-MY",{useGrouping:e.useGrouping})});function y($){return typeof $=="number"&&isFinite($)}return($,k)=>(s.openBlock(),s.createBlock(Me,{modelValue:s.unref(n),"onUpdate:modelValue":k[8]||(k[8]=v=>s.isRef(n)?n.value=v:null),label:$.label,disabled:$.disabled,required:$.labelMark==="required",optional:$.labelMark==="optional",info:$.labelInfo,rules:$.rules,focused:s.unref(o),"helper-text":$.helperText,"helper-state":$.helperState},{label:s.withCtx(()=>[s.renderSlot($.$slots,"label",{},void 0,!0)]),default:s.withCtx(({invalid:v})=>[s.createVNode(me,{class:"cursor-text","append-icon":$.appendIcon,"prepend-icon":$.prependIcon,focused:s.unref(o),invalid:v,"show-valid-border":$.showValidBorder},{prepend:s.withCtx(()=>[s.renderSlot($.$slots,"prepend",{},void 0,!0)]),append:s.withCtx(()=>[s.renderSlot($.$slots,"append",{},()=>[s.createElementVNode("div",{class:s.normalizeClass(["flex items-center justify-center",{"mr-32":$.showSteppers}])},[$.appendText?(s.openBlock(),s.createElementBlock("div",n3,s.toDisplayString($.appendText),1)):s.createCommentVNode("",!0),$.appendIcon?(s.openBlock(),s.createBlock(z,{key:1,name:$.appendIcon,size:"md",color:$.disabled?"#C7C7CC":"#1C1C1E"},null,8,["name","color"])):s.createCommentVNode("",!0)],2)],!0),$.showSteppers?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["fm-stepper-field__stepper__container",s.unref(o)?"right-[6px]":"right-[7px]"])},[s.createElementVNode("button",{class:"fm-stepper-field__stepper__item",tabindex:"0",type:"button",onMousedown:k[2]||(k[2]=()=>u($.step)),onFocus:k[3]||(k[3]=(...x)=>s.unref(r)&&s.unref(r)(...x)),onBlur:k[4]||(k[4]=(...x)=>s.unref(i)&&s.unref(i)(...x))},[s.createVNode(z,{name:"expand_less",size:"md",color:$.disabled||g.value?"#C7C7CC":"#1C1C1E"},null,8,["color"])],32),s.createElementVNode("button",{class:"fm-stepper-field__stepper__item",tabindex:"1",type:"button",onMousedown:k[5]||(k[5]=()=>u(-$.step)),onFocus:k[6]||(k[6]=(...x)=>s.unref(r)&&s.unref(r)(...x)),onBlur:k[7]||(k[7]=(...x)=>s.unref(i)&&s.unref(i)(...x))},[s.createVNode(z,{name:"expand_more",size:"md",color:$.disabled||b.value?"#C7C7CC":"#1C1C1E"},null,8,["color"])],32)],2)):s.createCommentVNode("",!0)]),default:s.withCtx(()=>[s.createElementVNode("input",{ref_key:"inputEl",ref:l,class:"fm-stepper-field--input",type:"text",inputMode:$.inputmode,value:m.value,placeholder:$.placeholder,readOnly:$.readonly,onInput:h,onFocus:k[0]||(k[0]=(...x)=>s.unref(r)&&s.unref(r)(...x)),onBlur:k[1]||(k[1]=(...x)=>s.unref(i)&&s.unref(i)(...x)),onKeydown:p},null,40,t3)]),_:2},1032,["append-icon","prepend-icon","focused","invalid","show-valid-border"])]),"helper-text":s.withCtx(()=>[s.renderSlot($.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),Iw="",i3=Z(o3,[["__scopeId","data-v-a97dc705"]]),s3=["value","placeholder","minlength","maxlength","readOnly","disabled"],r3=s.defineComponent({__name:"FmTextarea",props:{modelValue:{default:""},placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},labelInfo:{default:""},helperText:{default:""},helperState:{default:"none"},showWordCount:{type:Boolean,default:!1},label:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]}},emits:["update:modelValue"],setup(t){const n=X(t,"modelValue"),{isFocused:o,focus:i,blur:r}=In(),l=a=>{n.value=a.target.value};return(a,d)=>(s.openBlock(),s.createBlock(Me,{modelValue:s.unref(n),"onUpdate:modelValue":d[2]||(d[2]=c=>s.isRef(n)?n.value=c:null),label:a.label,disabled:a.disabled,required:a.labelMark==="required",optional:a.labelMark==="optional",info:a.labelInfo,rules:a.rules,focused:s.unref(o),"helper-text":a.helperText,"helper-state":a.helperState},s.createSlots({label:s.withCtx(()=>[s.renderSlot(a.$slots,"label",{},void 0,!0)]),default:s.withCtx(({invalid:c})=>[s.createElementVNode("div",{class:s.normalizeClass({"fm-textarea__container":!0,"fm-textarea__container--focused":s.unref(o),"fm-textarea__container--invalid":!!s.unref(n)&&c,"fm-textarea__container--valid":a.showValidBorder&&a.showSuccess&&!!s.unref(n)&&!c,"fm-textarea__container--disabled":a.disabled})},[s.createElementVNode("textarea",{class:s.normalizeClass({"fm-textarea--input fm-typo-body-lg-400":!0,"fm-color-typo-primary":!a.disabled,"fm-color-typo-disabled":a.disabled}),value:s.unref(n),placeholder:a.placeholder,minlength:a.minLength,maxlength:a.maxLength,readOnly:a.readonly,disabled:a.disabled,onInput:l,onFocus:d[0]||(d[0]=(...u)=>s.unref(i)&&s.unref(i)(...u)),onBlur:d[1]||(d[1]=(...u)=>s.unref(r)&&s.unref(r)(...u))},null,42,s3)],2)]),"helper-text":s.withCtx(()=>[s.renderSlot(a.$slots,"helper-text",{},void 0,!0)]),_:2},[a.showWordCount?{name:"helper-append",fn:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass([a.disabled?"fm-color-typo-disabled":"text-fm-color-typo-secondary","fm-typo-body-sm-400"])},s.toDisplayString(a.maxLength?`${s.unref(n).length} / ${a.maxLength}`:""),3)]),key:"0"}:void 0]),1032,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),Tw="",l3=Z(r3,[["__scopeId","data-v-280a005d"]]),a3={class:"flex flex-col fm-time-input items-center"},d3=["value"],c3=s.defineComponent({__name:"TimeInput",props:{modelValue:{type:String,required:!0},min:{type:Number,required:!0},max:{type:Number,required:!0}},emits:["update:model-value","update:cycle"],setup(t,{emit:e}){const n=t,o=e,i=s.ref();function r(u){i.value&&(i.value.value=u)}s.watch(()=>n.modelValue,r);function l(){if(!i.value)return;const u=a(i.value.value);if(u==null||u>n.max||u<n.min){r(n.modelValue);return}o("update:model-value",u)}function a(u){return u&&/^\d+$/.test(u)?Number(u):null}function d(){o("update:model-value",a(n.modelValue)+1)}function c(){o("update:model-value",a(n.modelValue)-1)}return(u,f)=>(s.openBlock(),s.createElementBlock("div",a3,[s.createElementVNode("div",{class:"fm-time-input__scroller",onClick:d},[s.createVNode(z,{name:"expand_less",size:"lg"})]),s.createElementVNode("input",{ref_key:"inputRef",ref:i,value:n.modelValue,onInput:l},null,40,d3),s.createElementVNode("div",{class:"fm-time-input__scroller",onClick:c},[s.createVNode(z,{name:"expand_more",size:"lg"})])]))}}),Lw="",rc=Z(c3,[["__scopeId","data-v-e8ddb125"]]);var Ge=(t=>(t.AM="AM",t.PM="PM",t))(Ge||{});function qe(t){return t.toString().padStart(2,"0")}function u3(t){const[e,n]=t.split(":"),o=Number(e),i=Number(n),r=o>11?"PM":"AM";let l=o;return l===0?l=12:l>12&&(l-=12),`${qe(l)}:${qe(i)}:${r}`}function Se(t){const[e,n,o]=u3(t).split(":");return{hours:Number(e),minutes:Number(n),period:o}}function As({hours:t,minutes:e,period:n}){let o=t;return n==="PM"?o=t===12?t:t+12:t===12&&(o=0),`${qe(o)}:${qe(e)}`}const f3={class:"flex fm-time-input gap-16 items-center"},h3=s.createElementVNode("div",{class:"fm-typo-title-sm-700"}," : ",-1),p3={class:"fm-time-input-periods"},m3=["onClick"],Ko=s.defineComponent({__name:"FmTimeInput",props:{modelValue:{type:Object,required:!0}},emits:["update:model-value"],setup(t,{emit:e}){const n=t,o=e;function i(r){const l={hours:r.hours??n.modelValue.hours,minutes:r.minutes??n.modelValue.minutes,period:r.period??n.modelValue.period},a=n.modelValue.hours;(a===12&&l.hours===11||a===11&&l.hours===12)&&(l.period=n.modelValue.period===Ge.AM?Ge.PM:Ge.AM),l.hours>12?l.hours=1:l.hours<1&&(l.hours=12),l.minutes>59?l.minutes=0:l.minutes<0&&(l.minutes=59),o("update:model-value",l)}return(r,l)=>(s.openBlock(),s.createElementBlock("div",f3,[s.createVNode(rc,{"model-value":s.unref(qe)(t.modelValue.hours),min:1,max:12,"onUpdate:modelValue":l[0]||(l[0]=a=>i({hours:a}))},null,8,["model-value"]),h3,s.createVNode(rc,{"model-value":s.unref(qe)(t.modelValue.minutes),min:0,max:59,"onUpdate:modelValue":l[1]||(l[1]=a=>i({minutes:a}))},null,8,["model-value"]),s.createElementVNode("div",p3,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(Ge),a=>(s.openBlock(),s.createElementBlock("div",{key:a,class:s.normalizeClass([{"fm-time-input-period__selected":a===t.modelValue.period},"bg-fm-color-neutral-gray-100 fm-time-input-period"]),onClick:()=>i({period:a})},s.toDisplayString(a),11,m3))),128))])]))}}),zw="";function g3(t){for(;t;){if(b3(t))return t;t=t.parentElement}return document.scrollingElement}function b3(t){if(!t||t.nodeType!==Node.ELEMENT_NODE)return!1;const e=window.getComputedStyle(t);return e.overflowY==="scroll"||e.overflowY==="auto"&&t.scrollHeight>t.clientHeight}class y3{constructor(e,n){I(this,"onScroll");I(this,"scrollParent");this.onScroll=n,this.scrollParent=g3(e)}bindScroll(){this.scrollParent.addEventListener("scroll",this.onScroll)}unbindScroll(){this.scrollParent.removeEventListener("scroll",this.onScroll)}}const $3={class:"fm-menu__wrapper"},_3=s.defineComponent({__name:"FmMenuDeprecated",props:{showMenu:{type:Boolean,default:!1},placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1}},emits:["dropdown-changed"],setup(t,{expose:e,emit:n}){const o=t,i=s.ref(!1),r=s.ref(null),l=s.ref(null),{floatingStyles:a}=On(r,l,{middleware:[Nn(4),Pn()],placement:o.placement,whileElementsMounted:An});let d;const c=n;e({show:()=>{i.value||(i.value=!0,c("dropdown-changed",i.value))},hide:()=>{i.value&&(i.value=!1,c("dropdown-changed",i.value))}});const u=p=>{p.preventDefault(),p.stopPropagation(),!o.disabled&&(i.value=!i.value,c("dropdown-changed",i.value))},f=p=>{if(!i.value)return;const m=p.path||p.composedPath();for(const g of m)if(g==r.value||g==l.value)return;i.value=!1,c("dropdown-changed",i.value)},h=()=>{c("dropdown-changed",!1)};return s.watch(()=>o.showMenu,p=>i.value=p),s.onMounted(()=>{i.value=o.showMenu,window.addEventListener("click",f),d=new y3(r.value,h),d.bindScroll()}),s.onUnmounted(()=>{window.removeEventListener("click",f),d.unbindScroll()}),(p,m)=>(s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("div",{ref_key:"anchorEl",ref:r,class:"fm-menu",onClick:u},[s.renderSlot(p.$slots,"menu-button",{},void 0,!0)],512),i.value?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"menuEl",ref:l,class:s.normalizeClass({"fm-menu__content":!0,"fm-menu__content--opened":i.value}),style:s.normalizeStyle(s.unref(a))},[s.renderSlot(p.$slots,"menu-wrapper",{},()=>[s.createElementVNode("div",$3,[s.renderSlot(p.$slots,"menu-content",{},void 0,!0)])],!0)],6)):s.createCommentVNode("",!0)]))}}),Hw="",Zo=Z(_3,[["__scopeId","data-v-5b19ece2"]]),w3={class:"flex gap-8"},x3={class:"bg-fm-color-neutral-white flex flex-col px-24 py-16 rounded-lg shadow-light-300 w-[343px]"},C3=s.createElementVNode("div",{class:"fm-typo-title-sm-700 mb-8"},"Enter time",-1),k3={class:"flex items-center justify-center py-16 w-full"},S3={class:"flex justify-end"},v3=s.defineComponent({__name:"FmTimePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const n=X(t,"modelValue"),o=s.ref(null),i=s.computed(()=>{if(!n.value)return null;const{hours:u,minutes:f,period:h}=Se(n.value);return`${qe(u)}:${qe(f)} ${h}`});function r(){if(!o.value){n.value=null;return}const u=As(o.value);n.value=u,a()}s.onMounted(()=>{n.value&&(o.value=Se(n.value))}),s.watch(()=>n.value,u=>{u&&(o.value=Se(u))});const l=s.ref();function a(){var u;(u=l.value)==null||u.hide()}const d=s.ref(!1);function c(u){u?o.value=Se(n.value??"00:00"):o.value=n.value?Se(n.value):null,d.value=u}return(u,f)=>(s.openBlock(),s.createBlock(Me,{modelValue:s.unref(n),"onUpdate:modelValue":f[1]||(f[1]=h=>s.isRef(n)?n.value=h:null),label:u.label,disabled:u.disabled,required:u.labelMark==="required",optional:u.labelMark==="optional",info:u.labelInfo,rules:u.rules,focused:d.value,"helper-text":u.helperText,"helper-state":u.helperState},{label:s.withCtx(()=>[s.renderSlot(u.$slots,"label")]),default:s.withCtx(({invalid:h})=>[s.createVNode(Zo,{ref_key:"dropdownRef",ref:l,onDropdownChanged:c},{"menu-button":s.withCtx(()=>[s.createVNode(me,{class:s.normalizeClass(u.disabled?"cursor-not-allowed":"cursor-pointer"),focused:d.value,invalid:h,"show-valid-border":u.showValidBorder},{default:s.withCtx(()=>[s.createElementVNode("div",w3,[s.createVNode(z,{name:"schedule",outline:!d.value},null,8,["outline"]),s.createElementVNode("div",{class:s.normalizeClass(["grow",{"text-fm-color-typo-disabled":!i.value}])},s.toDisplayString(i.value??"HH:MM"),3)])]),_:2},1032,["class","focused","invalid","show-valid-border"])]),"menu-wrapper":s.withCtx(()=>[s.createElementVNode("div",x3,[C3,s.createElementVNode("div",k3,[s.createVNode(Ko,{"model-value":o.value??{hours:0,minutes:0,period:s.unref(Ge).AM},"onUpdate:modelValue":f[0]||(f[0]=p=>o.value=p)},null,8,["model-value"])]),s.createElementVNode("div",S3,[s.createVNode(K,{label:"Cancel",size:"md",variant:"tertiary",onClick:a}),s.createVNode(K,{label:"Apply",size:"md",variant:"primary",onClick:r})])])]),_:2},1536)]),"helper-text":s.withCtx(()=>[s.renderSlot(u.$slots,"helper-text")]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),D3={class:"flex gap-8"},E3={class:"bg-fm-color-neutral-white flex flex-col px-24 py-16 rounded-lg shadow-light-300"},M3=s.createElementVNode("div",{class:"fm-typo-title-sm-700 mb-8"},"Enter time",-1),V3={class:"flex flex-col gap-16 items-center justify-center py-16 w-full"},B3=s.createElementVNode("div",{class:"fm-typo-body-lg-700 text-left w-full"}," Starting Time ",-1),P3=s.createElementVNode("div",{class:"fm-typo-body-lg-700 text-left w-full"}," Ending Time ",-1),N3={class:"flex gap-8 items-center justify-end"},F3=s.defineComponent({__name:"FmTimeRangePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const n=X(t,"modelValue"),o=s.ref(null),i=s.ref(null),r=s.computed(()=>{const p=Array.isArray(n.value);return!n.value||!p||p&&n.value.every(m=>!f(m))?null:n.value.map(m=>{const{hours:g,minutes:b,period:y}=Se(m);return`${qe(g)}:${qe(b)} ${y}`}).join(" - ")});function l(){if(!o.value||!i.value){n.value=null;return}let p=!1;const m=o.value,g=i.value;(m.period===Ge.PM&&g.period===Ge.AM||m.period===g.period&&(m.hours<g.hours||m.minutes<g.minutes))&&(p=!0);const b=As(o.value),y=As(i.value);n.value=p?[y,b]:[b,y],d()}s.onMounted(()=>{Array.isArray(n.value)&&n.value.every(p=>!!p)&&(o.value=Se(n.value[0]),i.value=Se(n.value[1]))}),s.watch(()=>n.value,p=>{const m=Array.isArray(p);p&&m&&p.every(g=>f(g))&&(o.value=Se(p[0]),i.value=Se(p[1]))});const a=s.ref();function d(){var p;(p=a.value)==null||p.hide()}const c=s.ref(!1);function u(p){var m,g,b,y;p?(o.value=Se(((b=n.value)==null?void 0:b[0])??"00:00"),i.value=Se(((y=n.value)==null?void 0:y[1])??"23:59")):(o.value=(m=n.value)!=null&&m[0]?Se(n.value[0]):null,i.value=(g=n.value)!=null&&g[1]?Se(n.value[1]):null),c.value=p}const f=p=>/^(?:[01]\d|2[0-3]):[0-5]\d$/.test(p),h=s.computed(()=>$e(o.value,i.value));return(p,m)=>(s.openBlock(),s.createBlock(Me,{modelValue:s.unref(n),"onUpdate:modelValue":m[2]||(m[2]=g=>s.isRef(n)?n.value=g:null),label:p.label,disabled:p.disabled,required:p.labelMark==="required",optional:p.labelMark==="optional",info:p.labelInfo,rules:p.rules,focused:c.value,"helper-text":p.helperText,"helper-state":p.helperState},{label:s.withCtx(()=>[s.renderSlot(p.$slots,"label")]),default:s.withCtx(({invalid:g})=>[s.createVNode(bs,{ref_key:"dropdownRef",ref:a,width:343,onPopoverChanged:u},{"popover-button":s.withCtx(()=>[s.createVNode(me,{class:s.normalizeClass(p.disabled?"cursor-not-allowed":"cursor-pointer"),focused:c.value,invalid:g,"show-valid-border":p.showValidBorder},{default:s.withCtx(()=>[s.createElementVNode("div",D3,[s.createVNode(z,{name:"schedule",outline:!c.value},null,8,["outline"]),s.createElementVNode("div",{class:s.normalizeClass(["grow",{"text-fm-color-typo-disabled":!r.value}])},s.toDisplayString(r.value??"HH:MM"),3)])]),_:2},1032,["class","focused","invalid","show-valid-border"])]),default:s.withCtx(()=>[s.createElementVNode("div",E3,[M3,s.createElementVNode("div",V3,[s.createElementVNode("div",null,[B3,s.createVNode(Ko,{"model-value":o.value??{hours:0,minutes:0,period:s.unref(Ge).AM},"onUpdate:modelValue":m[0]||(m[0]=b=>o.value=b)},null,8,["model-value"])]),s.createElementVNode("div",null,[P3,s.createVNode(Ko,{"model-value":i.value??{hours:0,minutes:0,period:s.unref(Ge).AM},"onUpdate:modelValue":m[1]||(m[1]=b=>i.value=b)},null,8,["model-value"])])]),s.createElementVNode("div",N3,[s.createVNode(K,{label:"Cancel",variant:"tertiary",size:"md",onClick:d}),s.createVNode(K,{label:"Apply",variant:"primary",size:"md",disabled:h.value,onClick:l},null,8,["disabled"])])])]),_:2},1536)]),"helper-text":s.withCtx(()=>[s.renderSlot(p.$slots,"helper-text")]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),R3=s.defineComponent({__name:"FmList",props:{separator:{type:Boolean,default:!1},disabled:{type:Boolean},activeClass:{default:""}},setup(t){return(e,n)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass({"fm-list--separator":e.separator,activeClass:e.activeClass})},[s.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),jw="",lc=Z(R3,[["__scopeId","data-v-884ba127"]]),A3=s.defineComponent({__name:"FmListItem",props:{tag:{default:"div"},clickable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},label:{default:""},sublabel:{default:""}},setup(t){const e=t;return(n,o)=>{const i=s.resolveDirective("wave");return s.withDirectives((s.openBlock(),s.createBlock(e.tag,{class:s.normalizeClass({"fm-list-item":!0,"fm-list-item--disabled":n.disabled,"cursor-pointer hover:bg-fm-color-opacity-sm":n.clickable&&!n.disabled,"cursor-not-allowed":n.clickable&&n.disabled}),onClick:o[0]||(o[0]=s.withModifiers(()=>{},["prevent"]))},{default:s.withCtx(()=>[s.renderSlot(n.$slots,"prepend",{},void 0,!0),s.renderSlot(n.$slots,"default",{},()=>[s.createElementVNode("div",null,[s.createElementVNode("div",{class:s.normalizeClass(`fm-typo-body-lg-400 line-clamp-1 break-all ${n.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"}`)},s.toDisplayString(n.label),3),n.sublabel?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(`fm-typo-body-md-400 line-clamp-2 break-all ${n.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"}`)},s.toDisplayString(n.sublabel),3)):s.createCommentVNode("",!0)])],!0),n.$slots.append?(s.openBlock(),s.createBlock(Xn,{key:0})):s.createCommentVNode("",!0),s.renderSlot(n.$slots,"append",{},void 0,!0)]),_:3},8,["class"])),[[i,n.clickable&&!n.disabled]])}}}),Ww="",ac=Z(A3,[["__scopeId","data-v-90312222"]]),O3={class:"fm-typo-body-lg-700 mx-8 p-12 text-fm-color-typo-primary"},I3=s.defineComponent({__name:"FmMenuHeader",props:{label:{}},setup(t){return(e,n)=>(s.openBlock(),s.createElementBlock("div",O3,s.toDisplayString(e.label),1))}}),T3=t=>(s.pushScopeId("data-v-c5236366"),t=t(),s.popScopeId(),t),L3={class:"relative"},z3={class:"fm-progress-linear fm-typo-body-sm-400 h-4 overflow-hidden relative rounded-lg w-auto"},H3=T3(()=>s.createElementVNode("span",{class:"bg-fm-color-neutral-gray-100",style:{width:"100%"}},null,-1)),j3=s.defineComponent({__name:"FmLinearProgress",props:{color:{default:"primary"}},setup(t){const e=t,n=s.computed(()=>{const o=new Array,i={};return e.color?(en(e.color)?i["background-color"]=e.color:o.push(`bg-fm-color-${e.color}`),{class:o.join(" "),style:i}):{class:o.join(" "),style:i}});return(o,i)=>(s.openBlock(),s.createElementBlock("div",L3,[s.createElementVNode("div",z3,[H3,s.createElementVNode("span",{class:s.normalizeClass(["dash-1",n.value.class]),style:s.normalizeStyle(n.value.style)},null,6),s.createElementVNode("span",{class:s.normalizeClass(["dash-2",n.value.class]),style:s.normalizeStyle(n.value.style)},null,6)])]))}}),Yw="",W3=Z(j3,[["__scopeId","data-v-c5236366"]]),Y3={class:"fm-side-sheet"},U3={class:"flex fm-typo-title-sm-700 items-center justify-between text-fm-color-typo-primary"},G3={key:0},q3={class:"h-full overflow-y-auto"},X3={class:"pt-24"},K3=s.defineComponent({__name:"FmSideSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1},closeButton:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t){const e=t,n=s.ref(null),o=X(e,"modelValue"),i=r=>{e.dismissAway&&n.value&&r.target===n.value&&(o.value=!1)};return(r,l)=>(s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("div",{onClick:l[0]||(l[0]=a=>o.value=!0)},[s.renderSlot(r.$slots,"side-sheet-button",{},void 0,!0)]),(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[s.createVNode(s.Transition,null,{default:s.withCtx(()=>[s.unref(o)?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:n,class:"fm-side-sheet--container",onClick:l[2]||(l[2]=a=>i(a))},[s.createVNode(s.Transition,{name:"slide",appear:""},{default:s.withCtx(()=>[s.createElementVNode("div",Y3,[s.createElementVNode("div",U3,[s.renderSlot(r.$slots,"side-sheet-header",{},()=>[r.header?(s.openBlock(),s.createElementBlock("div",G3,s.toDisplayString(r.header),1)):s.createCommentVNode("",!0)],!0),r.closeButton?(s.openBlock(),s.createBlock(z,{key:0,class:"cursor-pointer",name:"close",size:"md",onClick:l[1]||(l[1]=a=>o.value=!1)})):s.createCommentVNode("",!0)]),s.createElementVNode("div",q3,[s.renderSlot(r.$slots,"default",{},void 0,!0)]),s.createElementVNode("div",X3,[s.renderSlot(r.$slots,"side-sheet-footer",{},void 0,!0)])])]),_:3})],512)):s.createCommentVNode("",!0)]),_:3})]))]))}}),Uw="",Z3=Z(K3,[["__scopeId","data-v-947fe222"]]),J3={class:"flex"},Q3={key:0,class:"mt-8"},e_=s.defineComponent({__name:"FmSnackbar",props:{title:{type:String,default:void 0},description:{type:String,default:void 0},variant:{type:String,default:"info"},dismissable:{type:Boolean,default:!1},action:{type:String,default:void 0},color:{type:String,default:void 0},bgColor:{type:String,default:void 0}},emits:["onDismiss","onAction"],setup(t,{emit:e}){const n=t,o=e,i=s.computed(()=>{switch(n.variant){case"info":return{icon:{name:"info",color:"system-info-300"},actionColor:"typo-info",bgColor:"system-info-100"};case"success":return{icon:{name:"check_circle",color:"system-success-300"},actionColor:"typo-success",bgColor:"system-success-100"};case"warning":return{icon:{name:"warning",color:"system-warning-300"},actionColor:"typo-warning",bgColor:"system-warning-100"};case"error":return{icon:{name:"error",color:"system-error-300"},actionColor:"typo-error",bgColor:"system-error-100"};case"neutral":return{actionColor:"primary",bgColor:"neutral-gray-100"};default:throw Error(`Unimplement snackbar variant ${n.variant}`)}}),r=s.computed(()=>n.title?{text:n.title,classes:"fm-typo-body-lg-700"}:{text:n.description,classes:""}),l=s.computed(()=>n.bgColor?en(n.bgColor)?{style:{backgroundColor:n.bgColor}}:{class:`bg-fm-color-${n.bgColor}`}:{class:`bg-fm-color-${i.value.bgColor}`}),a=s.computed(()=>n.color?en(n.color)?{style:{color:n.color}}:{class:`text-fm-color-${n.color}`}:{class:`text-fm-color-${i.value.actionColor}`});return(d,c)=>(s.openBlock(),s.createElementBlock("div",s.mergeProps(l.value,{class:"fm-corner-radius-lg fm-shadow-light-400 fm-snackbar px-24 py-16"}),[s.createElementVNode("div",J3,[i.value.icon?(s.openBlock(),s.createBlock(z,{key:0,name:i.value.icon.name,color:n.color??i.value.icon.color,class:"mr-12"},null,8,["name","color"])):s.createCommentVNode("",!0),s.createElementVNode("div",{class:s.normalizeClass(`${r.value.classes} grow ellipsis`)},s.toDisplayString(r.value.text),3),n.dismissable?(s.openBlock(),s.createBlock(z,{key:1,style:{"{ flex":"none}"},name:"close",class:"cursor-pointer",onClick:c[0]||(c[0]=()=>o("onDismiss"))})):s.createCommentVNode("",!0)]),n.title&&n.description?(s.openBlock(),s.createElementBlock("div",Q3,s.toDisplayString(n.description),1)):s.createCommentVNode("",!0),s.renderSlot(d.$slots,"actions",{},()=>[n.action?(s.openBlock(),s.createElementBlock("div",s.mergeProps({key:0},a.value,{class:"mt-16 fm-typo-body-lg-700"}),[s.createElementVNode("span",{class:"cursor-pointer",onClick:c[1]||(c[1]=()=>o("onAction"))},s.toDisplayString(n.action),1)],16)):s.createCommentVNode("",!0)],!0)],16))}}),Gw="",dc=Z(e_,[["__scopeId","data-v-e2ff7141"]]),t_={key:0,class:"fm-step-description fm-typo-body-sm-400 line-clamp-1 mt-4"},Os=s.defineComponent({__name:"FmStepHeader",props:{title:{type:String,required:!0},description:{type:String,default:void 0},disabled:{type:Boolean,default:!1},titleBold:{type:Boolean,default:!1}},setup(t){return(e,n)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["flex flex-col",t.disabled?"text-fm-color-typo-disabled":""])},[s.createElementVNode("div",{class:s.normalizeClass(["fm-step-title line-clamp-2",t.titleBold?"fm-typo-body-xl-700":"fm-typo-body-md-400"])},s.toDisplayString(t.title),3),t.description?(s.openBlock(),s.createElementBlock("div",t_,s.toDisplayString(t.description),1)):s.createCommentVNode("",!0)],2))}}),n_=["data-title","data-description","data-disabled"],o_={class:"flex fm-step-container gap-12 grow"},i_=s.defineComponent({__name:"FmStep",props:{title:{type:String,required:!0},description:{type:String,default:void 0},value:{type:Number,required:!0},complete:{type:Function,required:!0},error:{type:Function,default:void 0},disabled:{type:Function,default:void 0}},setup(t){const e=t,{currentStep:n,goToStep:o}=s.inject(gr);function i(){r.value||o(e.value)}const r=s.computed(()=>e.disabled?e.disabled():!1),l=s.computed(()=>e.error?e.error():!1),a=s.computed(()=>n()===e.value),d=s.computed(()=>e.complete()),c=s.computed(()=>a.value||d.value||n()>e.value?"bg-fm-color-primary":"bg-fm-color-neutral-gray-300"),u=s.computed(()=>a.value?{className:"bg-fm-color-primary"}:l.value?{config:{name:"warning",color:"system-error-300"}}:r.value?{className:"border-2 border-fm-color-neutral-gray-200"}:d.value?{config:{name:"check_small",color:"primary"},className:"border-2 border-fm-color-primary"}:{className:"border-2 border-fm-color-neutral-gray-300"});return(f,h)=>{const p=s.resolveDirective("wave");return s.withDirectives((s.openBlock(),s.createElementBlock("div",{"data-title":t.title,"data-description":t.description,"data-disabled":r.value,class:s.normalizeClass(`fm-step gap-4 grow ${r.value?"cursor-not-allowed":"cursor-pointer"}`),onClick:s.withModifiers(i,["stop"])},[s.createElementVNode("div",null,[s.createElementVNode("div",{class:s.normalizeClass(`fm-step-indicator ${c.value}`)},null,2)]),s.createElementVNode("div",o_,[s.createElementVNode("div",{class:s.normalizeClass(["flex fm-step-container-icon h-[24px] items-center justify-center min-h-[24px] min-w-[24px] relative rounded-full w-[24px]",u.value.className])},[u.value.config?(s.openBlock(),s.createBlock(z,{key:0,name:u.value.config.name,color:u.value.config.color,outline:"",class:"absolute"},null,8,["name","color"])):s.createCommentVNode("",!0)],2),s.createVNode(Os,{title:t.title,description:t.description,disabled:r.value,class:"grow"},null,8,["title","description","disabled"])])],10,n_)),[[p,!r.value]])}}}),qw="",s_=Z(i_,[["__scopeId","data-v-ee172cad"]]),r_={class:"hidden items-center xs:flex"},l_={class:"flex gap-2 items-start justify-end mb-24 mt-40 p-0 self-stretch"},a_=s.defineComponent({__name:"FmStepper",props:{modelValue:{type:Number,required:!0},orientation:{type:String,default:"horizontal"}},emits:["update:model-value"],setup(t,{emit:e}){const n=t,o=e,i=u=>{o("update:model-value",u)};s.provide(gr,{currentStep:()=>n.modelValue,goToStep:i});const r=s.ref(),l=s.ref([]),a=s.computed(()=>l.value[n.modelValue-1]),d=s.computed(()=>`${n.modelValue} of ${l.value.length}`),c=()=>{var f;const u=Array.from(((f=r.value)==null?void 0:f.querySelectorAll(":scope > .fm-step"))??[]);l.value=u.map(h=>({title:h.dataset.title??"",description:h.dataset.description,disabled:h.dataset.disabled=="true"}))};return s.onMounted(()=>{c()}),(u,f)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(`fm-stepper fm-stepper__${t.orientation}`)},[s.createElementVNode("div",{ref_key:"stepperRef",ref:r,class:s.normalizeClass(`flex mx-24 mt-12 mb-24 xs:hidden ${t.orientation==="vertical"?"flex-col":""}`)},[s.renderSlot(u.$slots,"default")],2),s.createElementVNode("div",r_,[s.createVNode(qn,{"current-step":t.modelValue,"total-steps":l.value.length,class:"mr-12"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(d.value),1)]),_:1},8,["current-step","total-steps"]),a.value?(s.openBlock(),s.createBlock(Os,{key:0,class:"grow","title-bold":"",title:a.value.title,description:a.value.description,disabled:a.value.disabled},null,8,["title","description","disabled"])):s.createCommentVNode("",!0)]),u.$slots.contents?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(`flex-col mx-24 mt-12 mb-24 ${t.orientation==="vertical"?"w-2/3":""}`)},[s.renderSlot(u.$slots,"contents"),s.createElementVNode("div",l_,[s.renderSlot(u.$slots,"actions")])],2)):s.createCommentVNode("",!0)],2))}});let d_=0;function c_(){return d_++}const u_=t=>(s.pushScopeId("data-v-a7638f83"),t=t(),s.popScopeId(),t),f_=["disabled"],h_=[u_(()=>s.createElementVNode("div",{class:"fm-tab__indicator"},null,-1))],p_={class:"max-w-[360px] min-w-[186px]"},m_=s.defineComponent({__name:"FmTab",props:{modelValue:{default:null},label:{default:""},vertical:{type:Boolean,default:!1},icon:{default:""},disabled:{type:Boolean,default:!1},badge:{default:0},value:{default:()=>c_()},children:{default:()=>[]}},emits:["update:modelValue"],setup(t,{emit:e}){const n=s.ref(!1),o=t,i=e,r=s.ref(!1);function l(f){n.value=f}const a=()=>{o.disabled||o.children.length>0||i("update:modelValue",o.value)},d=f=>{o.children.length!==0&&(r.value=f)},c=s.computed(()=>o.children.length>0?o.children.some(f=>f.value===o.modelValue):o.modelValue===o.value),u=f=>{r.value=!1,i("update:modelValue",f)};return(f,h)=>(s.openBlock(),s.createBlock(Zo,{"show-menu":r.value,disabled:f.children.length===0,class:s.normalizeClass(["max-w-[360px] min-w-[90px] rounded-sm",{"w-full":f.vertical}]),placement:f.vertical?"right-start":"bottom-start",onDropdownChanged:d},{"menu-button":s.withCtx(()=>[s.createElementVNode("button",{class:s.normalizeClass(["fm-tab",`fm-tab--${f.vertical?"vertical":"horizontal"}`,f.disabled?"cursor-not-allowed":"cursor-pointer",{"fm-tab--selected":c.value}]),disabled:f.disabled,type:"button",onMousedown:h[0]||(h[0]=()=>l(!0)),onMouseup:h[1]||(h[1]=()=>l(!1)),onMouseleave:h[2]||(h[2]=()=>l(!1)),onClick:a},[s.renderSlot(f.$slots,"prepend",{},void 0,!0),f.icon?(s.openBlock(),s.createBlock(z,{key:0,name:f.icon,outline:!n.value&&!c.value,color:f.disabled?"neutral-gray-200":c.value?"primary":"neutral-black",size:"md"},null,8,["name","outline","color"])):s.createCommentVNode("",!0),f.label?(s.openBlock(),s.createElementBlock("span",{key:1,class:s.normalizeClass(["fm-typo-body-lg-700 text-fm-color-typo-primary row-start-1 text-left",c.value?"visible":"invisible",f.icon||f.$slots.append?"col-start-2":"col-start-1"])},s.toDisplayString(f.label),3)):s.createCommentVNode("",!0),f.label?(s.openBlock(),s.createElementBlock("span",{key:2,class:s.normalizeClass(["fm-typo-body-lg-400 row-start-1 text-left",f.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary",!c.value||f.disabled?"visible":"invisible",f.icon||f.$slots.append?"col-start-2":"col-start-1"])},s.toDisplayString(f.label),3)):s.createCommentVNode("",!0),f.badge?(s.openBlock(),s.createBlock(Qt,{key:3,value:f.badge,inline:"",variant:"numeric"},null,8,["value"])):s.createCommentVNode("",!0),f.children.length>0?(s.openBlock(),s.createBlock(z,{key:4,size:"md",name:r.value?"expand_less":"expand_more"},null,8,["name"])):s.createCommentVNode("",!0),s.renderSlot(f.$slots,"append",{},void 0,!0),c.value?(s.openBlock(),s.createElementBlock("div",{key:5,class:s.normalizeClass([`fm-tab__indicator__wrapper--${f.vertical?"vertical":"horizontal"}`])},h_,2)):s.createCommentVNode("",!0)],42,f_)]),"menu-content":s.withCtx(()=>[s.createElementVNode("div",p_,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(f.children,p=>s.renderSlot(f.$slots,"list-item",s.normalizeProps(s.guardReactiveProps(p)),()=>[s.createVNode(Ie,{"model-value":o.modelValue===p.value,label:p.label,icon:p.icon,disabled:p.disabled,onClick:m=>u(p.value)},{append:s.withCtx(()=>[p.badge?(s.openBlock(),s.createBlock(Qt,{key:0,value:p.badge,inline:"",variant:"numeric"},null,8,["value"])):s.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"])],!0)),256))])]),_:3},8,["show-menu","disabled","class","placement"]))}}),Kw="",cc=Z(m_,[["__scopeId","data-v-a7638f83"]]);/**
|
|
27
34
|
* table-core
|
|
28
35
|
*
|
|
29
36
|
* Copyright (c) TanStack
|
|
@@ -32,10 +39,10 @@ var Hy=Object.defineProperty;var jy=(ie,l,Ue)=>l in ie?Hy(ie,l,{enumerable:!0,co
|
|
|
32
39
|
* LICENSE.md file in the root directory of this source tree.
|
|
33
40
|
*
|
|
34
41
|
* @license MIT
|
|
35
|
-
*/function
|
|
42
|
+
*/function $t(t,e){return typeof t=="function"?t(e):t}function Ve(t,e){return n=>{e.setState(o=>({...o,[t]:$t(n,o[t])}))}}function Jo(t){return t instanceof Function}function g_(t){return Array.isArray(t)&&t.every(e=>typeof e=="number")}function b_(t,e){const n=[],o=i=>{i.forEach(r=>{n.push(r);const l=e(r);l!=null&&l.length&&o(l)})};return o(t),n}function H(t,e,n){let o=[],i;return()=>{let r;n.key&&n.debug&&(r=Date.now());const l=t();if(!(l.length!==o.length||l.some((c,u)=>o[u]!==c)))return i;o=l;let d;if(n.key&&n.debug&&(d=Date.now()),i=e(...l),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const c=Math.round((Date.now()-r)*100)/100,u=Math.round((Date.now()-d)*100)/100,f=u/16,h=(p,m)=>{for(p=String(p);p.length<m;)p=" "+p;return p};console.info(`%c⏱ ${h(u,5)} /${h(c,5)} ms`,`
|
|
36
43
|
font-size: .6rem;
|
|
37
44
|
font-weight: bold;
|
|
38
|
-
color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,n==null?void 0:n.key)}return i}}function Wb(t,e,n,o){var i,s;const a={...t._getDefaultColumnDef(),...e},c=a.accessorKey;let d=(i=(s=a.id)!=null?s:c?c.replace(".","_"):void 0)!=null?i:typeof a.header=="string"?a.header:void 0,u;if(a.accessorFn?u=a.accessorFn:c&&(c.includes(".")?u=p=>{let h=p;for(const m of c.split(".")){var g;h=(g=h)==null?void 0:g[m],process.env.NODE_ENV!=="production"&&h===void 0&&console.warn(`"${m}" in deeply nested key "${c}" returned undefined.`)}return h}:u=p=>p[a.accessorKey]),!d)throw process.env.NODE_ENV!=="production"?new Error(a.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let f={id:`${String(d)}`,accessorFn:u,parent:o,depth:n,columnDef:a,columns:[],getFlatColumns:I(()=>[!0],()=>{var p;return[f,...(p=f.columns)==null?void 0:p.flatMap(h=>h.getFlatColumns())]},{key:process.env.NODE_ENV==="production"&&"column.getFlatColumns",debug:()=>{var p;return(p=t.options.debugAll)!=null?p:t.options.debugColumns}}),getLeafColumns:I(()=>[t._getOrderColumnsFn()],p=>{var h;if((h=f.columns)!=null&&h.length){let g=f.columns.flatMap(m=>m.getLeafColumns());return p(g)}return[f]},{key:process.env.NODE_ENV==="production"&&"column.getLeafColumns",debug:()=>{var p;return(p=t.options.debugAll)!=null?p:t.options.debugColumns}})};for(const p of t._features)p.createColumn==null||p.createColumn(f,t);return f}function ea(t,e,n){var o;let s={id:(o=n.id)!=null?o:e.id,column:e,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const r=[],a=c=>{c.subHeaders&&c.subHeaders.length&&c.subHeaders.map(a),r.push(c)};return a(s),r},getContext:()=>({table:t,header:s,column:e})};return t._features.forEach(r=>{r.createHeader==null||r.createHeader(s,t)}),s}const Yb={createTable:t=>{t.getHeaderGroups=I(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o,i)=>{var s,r;const a=(s=o==null?void 0:o.map(f=>n.find(p=>p.id===f)).filter(Boolean))!=null?s:[],c=(r=i==null?void 0:i.map(f=>n.find(p=>p.id===f)).filter(Boolean))!=null?r:[],d=n.filter(f=>!(o!=null&&o.includes(f.id))&&!(i!=null&&i.includes(f.id)));return uo(e,[...a,...d,...c],t)},{key:process.env.NODE_ENV==="development"&&"getHeaderGroups",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getCenterHeaderGroups=I(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o,i)=>(n=n.filter(s=>!(o!=null&&o.includes(s.id))&&!(i!=null&&i.includes(s.id))),uo(e,n,t,"center")),{key:process.env.NODE_ENV==="development"&&"getCenterHeaderGroups",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getLeftHeaderGroups=I(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left],(e,n,o)=>{var i;const s=(i=o==null?void 0:o.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?i:[];return uo(e,s,t,"left")},{key:process.env.NODE_ENV==="development"&&"getLeftHeaderGroups",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getRightHeaderGroups=I(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.right],(e,n,o)=>{var i;const s=(i=o==null?void 0:o.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?i:[];return uo(e,s,t,"right")},{key:process.env.NODE_ENV==="development"&&"getRightHeaderGroups",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getFooterGroups=I(()=>[t.getHeaderGroups()],e=>[...e].reverse(),{key:process.env.NODE_ENV==="development"&&"getFooterGroups",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getLeftFooterGroups=I(()=>[t.getLeftHeaderGroups()],e=>[...e].reverse(),{key:process.env.NODE_ENV==="development"&&"getLeftFooterGroups",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getCenterFooterGroups=I(()=>[t.getCenterHeaderGroups()],e=>[...e].reverse(),{key:process.env.NODE_ENV==="development"&&"getCenterFooterGroups",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getRightFooterGroups=I(()=>[t.getRightHeaderGroups()],e=>[...e].reverse(),{key:process.env.NODE_ENV==="development"&&"getRightFooterGroups",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getFlatHeaders=I(()=>[t.getHeaderGroups()],e=>e.map(n=>n.headers).flat(),{key:process.env.NODE_ENV==="development"&&"getFlatHeaders",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getLeftFlatHeaders=I(()=>[t.getLeftHeaderGroups()],e=>e.map(n=>n.headers).flat(),{key:process.env.NODE_ENV==="development"&&"getLeftFlatHeaders",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getCenterFlatHeaders=I(()=>[t.getCenterHeaderGroups()],e=>e.map(n=>n.headers).flat(),{key:process.env.NODE_ENV==="development"&&"getCenterFlatHeaders",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getRightFlatHeaders=I(()=>[t.getRightHeaderGroups()],e=>e.map(n=>n.headers).flat(),{key:process.env.NODE_ENV==="development"&&"getRightFlatHeaders",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getCenterLeafHeaders=I(()=>[t.getCenterFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),{key:process.env.NODE_ENV==="development"&&"getCenterLeafHeaders",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getLeftLeafHeaders=I(()=>[t.getLeftFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),{key:process.env.NODE_ENV==="development"&&"getLeftLeafHeaders",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getRightLeafHeaders=I(()=>[t.getRightFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),{key:process.env.NODE_ENV==="development"&&"getRightLeafHeaders",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getLeafHeaders=I(()=>[t.getLeftHeaderGroups(),t.getCenterHeaderGroups(),t.getRightHeaderGroups()],(e,n,o)=>{var i,s,r,a,c,d;return[...(i=(s=e[0])==null?void 0:s.headers)!=null?i:[],...(r=(a=n[0])==null?void 0:a.headers)!=null?r:[],...(c=(d=o[0])==null?void 0:d.headers)!=null?c:[]].map(u=>u.getLeafHeaders()).flat()},{key:process.env.NODE_ENV==="development"&&"getLeafHeaders",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}})}};function uo(t,e,n,o){var i,s;let r=0;const a=function(p,h){h===void 0&&(h=1),r=Math.max(r,h),p.filter(g=>g.getIsVisible()).forEach(g=>{var m;(m=g.columns)!=null&&m.length&&a(g.columns,h+1)},0)};a(t);let c=[];const d=(p,h)=>{const g={depth:h,id:[o,`${h}`].filter(Boolean).join("_"),headers:[]},m=[];p.forEach(b=>{const x=[...m].reverse()[0],y=b.column.depth===g.depth;let w,S=!1;if(y&&b.column.parent?w=b.column.parent:(w=b.column,S=!0),x&&(x==null?void 0:x.column)===w)x.subHeaders.push(b);else{const _=ea(n,w,{id:[o,h,w.id,b==null?void 0:b.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${m.filter(C=>C.column===w).length}`:void 0,depth:h,index:m.length});_.subHeaders.push(b),m.push(_)}g.headers.push(b),b.headerGroup=g}),c.push(g),h>0&&d(m,h-1)},u=e.map((p,h)=>ea(n,p,{depth:r,index:h}));d(u,r-1),c.reverse();const f=p=>p.filter(g=>g.column.getIsVisible()).map(g=>{let m=0,b=0,x=[0];g.subHeaders&&g.subHeaders.length?(x=[],f(g.subHeaders).forEach(w=>{let{colSpan:S,rowSpan:_}=w;m+=S,x.push(_)})):m=1;const y=Math.min(...x);return b=b+y,g.colSpan=m,g.rowSpan=b,{colSpan:m,rowSpan:b}});return f((i=(s=c[0])==null?void 0:s.headers)!=null?i:[]),c}const fo={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},ki=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Gb={getDefaultColumnDef:()=>fo,getInitialState:t=>({columnSizing:{},columnSizingInfo:ki(),...t}),getDefaultOptions:t=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Ce("columnSizing",t),onColumnSizingInfoChange:Ce("columnSizingInfo",t)}),createColumn:(t,e)=>{t.getSize=()=>{var n,o,i;const s=e.getState().columnSizing[t.id];return Math.min(Math.max((n=t.columnDef.minSize)!=null?n:fo.minSize,(o=s??t.columnDef.size)!=null?o:fo.size),(i=t.columnDef.maxSize)!=null?i:fo.maxSize)},t.getStart=n=>{const o=n?n==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns(),i=o.findIndex(s=>s.id===t.id);if(i>0){const s=o[i-1];return s.getStart(n)+s.getSize()}return 0},t.resetSize=()=>{e.setColumnSizing(n=>{let{[t.id]:o,...i}=n;return i})},t.getCanResize=()=>{var n,o;return((n=t.columnDef.enableResizing)!=null?n:!0)&&((o=e.options.enableColumnResizing)!=null?o:!0)},t.getIsResizing=()=>e.getState().columnSizingInfo.isResizingColumn===t.id},createHeader:(t,e)=>{t.getSize=()=>{let n=0;const o=i=>{if(i.subHeaders.length)i.subHeaders.forEach(o);else{var s;n+=(s=i.column.getSize())!=null?s:0}};return o(t),n},t.getStart=()=>{if(t.index>0){const n=t.headerGroup.headers[t.index-1];return n.getStart()+n.getSize()}return 0},t.getResizeHandler=()=>{const n=e.getColumn(t.column.id),o=n==null?void 0:n.getCanResize();return i=>{if(!n||!o||(i.persist==null||i.persist(),Si(i)&&i.touches&&i.touches.length>1))return;const s=t.getSize(),r=t?t.getLeafHeaders().map(m=>[m.column.id,m.column.getSize()]):[[n.id,n.getSize()]],a=Si(i)?Math.round(i.touches[0].clientX):i.clientX,c={},d=(m,b)=>{typeof b=="number"&&(e.setColumnSizingInfo(x=>{var y,w;const S=e.options.columnResizeDirection==="rtl"?-1:1,_=(b-((y=x==null?void 0:x.startOffset)!=null?y:0))*S,C=Math.max(_/((w=x==null?void 0:x.startSize)!=null?w:0),-.999999);return x.columnSizingStart.forEach(v=>{let[k,M]=v;c[k]=Math.round(Math.max(M+M*C,0)*100)/100}),{...x,deltaOffset:_,deltaPercentage:C}}),(e.options.columnResizeMode==="onChange"||m==="end")&&e.setColumnSizing(x=>({...x,...c})))},u=m=>d("move",m),f=m=>{d("end",m),e.setColumnSizingInfo(b=>({...b,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p={moveHandler:m=>u(m.clientX),upHandler:m=>{document.removeEventListener("mousemove",p.moveHandler),document.removeEventListener("mouseup",p.upHandler),f(m.clientX)}},h={moveHandler:m=>(m.cancelable&&(m.preventDefault(),m.stopPropagation()),u(m.touches[0].clientX),!1),upHandler:m=>{var b;document.removeEventListener("touchmove",h.moveHandler),document.removeEventListener("touchend",h.upHandler),m.cancelable&&(m.preventDefault(),m.stopPropagation()),f((b=m.touches[0])==null?void 0:b.clientX)}},g=Ub()?{passive:!1}:!1;Si(i)?(document.addEventListener("touchmove",h.moveHandler,g),document.addEventListener("touchend",h.upHandler,g)):(document.addEventListener("mousemove",p.moveHandler,g),document.addEventListener("mouseup",p.upHandler,g)),e.setColumnSizingInfo(m=>({...m,startOffset:a,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:r,isResizingColumn:n.id}))}}},createTable:t=>{t.setColumnSizing=e=>t.options.onColumnSizingChange==null?void 0:t.options.onColumnSizingChange(e),t.setColumnSizingInfo=e=>t.options.onColumnSizingInfoChange==null?void 0:t.options.onColumnSizingInfoChange(e),t.resetColumnSizing=e=>{var n;t.setColumnSizing(e?{}:(n=t.initialState.columnSizing)!=null?n:{})},t.resetHeaderSizeInfo=e=>{var n;t.setColumnSizingInfo(e?ki():(n=t.initialState.columnSizingInfo)!=null?n:ki())},t.getTotalSize=()=>{var e,n;return(e=(n=t.getHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getLeftTotalSize=()=>{var e,n;return(e=(n=t.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getCenterTotalSize=()=>{var e,n;return(e=(n=t.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getRightTotalSize=()=>{var e,n;return(e=(n=t.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0}}};let ho=null;function Ub(){if(typeof ho=="boolean")return ho;let t=!1;try{const e={get passive(){return t=!0,!1}},n=()=>{};window.addEventListener("test",n,e),window.removeEventListener("test",n)}catch{t=!1}return ho=t,ho}function Si(t){return t.type==="touchstart"}const qb={getInitialState:t=>({expanded:{},...t}),getDefaultOptions:t=>({onExpandedChange:Ce("expanded",t),paginateExpandedRows:!0}),createTable:t=>{let e=!1,n=!1;t._autoResetExpanded=()=>{var o,i;if(!e){t._queue(()=>{e=!0});return}if((o=(i=t.options.autoResetAll)!=null?i:t.options.autoResetExpanded)!=null?o:!t.options.manualExpanding){if(n)return;n=!0,t._queue(()=>{t.resetExpanded(),n=!1})}},t.setExpanded=o=>t.options.onExpandedChange==null?void 0:t.options.onExpandedChange(o),t.toggleAllRowsExpanded=o=>{o??!t.getIsAllRowsExpanded()?t.setExpanded(!0):t.setExpanded({})},t.resetExpanded=o=>{var i,s;t.setExpanded(o?{}:(i=(s=t.initialState)==null?void 0:s.expanded)!=null?i:{})},t.getCanSomeRowsExpand=()=>t.getPrePaginationRowModel().flatRows.some(o=>o.getCanExpand()),t.getToggleAllRowsExpandedHandler=()=>o=>{o.persist==null||o.persist(),t.toggleAllRowsExpanded()},t.getIsSomeRowsExpanded=()=>{const o=t.getState().expanded;return o===!0||Object.values(o).some(Boolean)},t.getIsAllRowsExpanded=()=>{const o=t.getState().expanded;return typeof o=="boolean"?o===!0:!(!Object.keys(o).length||t.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},t.getExpandedDepth=()=>{let o=0;return(t.getState().expanded===!0?Object.keys(t.getRowModel().rowsById):Object.keys(t.getState().expanded)).forEach(s=>{const r=s.split(".");o=Math.max(o,r.length)}),o},t.getPreExpandedRowModel=()=>t.getSortedRowModel(),t.getExpandedRowModel=()=>(!t._getExpandedRowModel&&t.options.getExpandedRowModel&&(t._getExpandedRowModel=t.options.getExpandedRowModel(t)),t.options.manualExpanding||!t._getExpandedRowModel?t.getPreExpandedRowModel():t._getExpandedRowModel())},createRow:(t,e)=>{t.toggleExpanded=n=>{e.setExpanded(o=>{var i;const s=o===!0?!0:!!(o!=null&&o[t.id]);let r={};if(o===!0?Object.keys(e.getRowModel().rowsById).forEach(a=>{r[a]=!0}):r=o,n=(i=n)!=null?i:!s,!s&&n)return{...r,[t.id]:!0};if(s&&!n){const{[t.id]:a,...c}=r;return c}return o})},t.getIsExpanded=()=>{var n;const o=e.getState().expanded;return!!((n=e.options.getIsRowExpanded==null?void 0:e.options.getIsRowExpanded(t))!=null?n:o===!0||o!=null&&o[t.id])},t.getCanExpand=()=>{var n,o,i;return(n=e.options.getRowCanExpand==null?void 0:e.options.getRowCanExpand(t))!=null?n:((o=e.options.enableExpanding)!=null?o:!0)&&!!((i=t.subRows)!=null&&i.length)},t.getIsAllParentsExpanded=()=>{let n=!0,o=t;for(;n&&o.parentId;)o=e.getRow(o.parentId,!0),n=o.getIsExpanded();return n},t.getToggleExpandedHandler=()=>{const n=t.getCanExpand();return()=>{n&&t.toggleExpanded()}}}},ta=(t,e,n)=>{var o;const i=n.toLowerCase();return!!(!((o=t.getValue(e))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(i))};ta.autoRemove=t=>De(t);const na=(t,e,n)=>{var o;return!!(!((o=t.getValue(e))==null||(o=o.toString())==null)&&o.includes(n))};na.autoRemove=t=>De(t);const oa=(t,e,n)=>{var o;return((o=t.getValue(e))==null||(o=o.toString())==null?void 0:o.toLowerCase())===(n==null?void 0:n.toLowerCase())};oa.autoRemove=t=>De(t);const ia=(t,e,n)=>{var o;return(o=t.getValue(e))==null?void 0:o.includes(n)};ia.autoRemove=t=>De(t)||!(t!=null&&t.length);const sa=(t,e,n)=>!n.some(o=>{var i;return!((i=t.getValue(e))!=null&&i.includes(o))});sa.autoRemove=t=>De(t)||!(t!=null&&t.length);const ra=(t,e,n)=>n.some(o=>{var i;return(i=t.getValue(e))==null?void 0:i.includes(o)});ra.autoRemove=t=>De(t)||!(t!=null&&t.length);const la=(t,e,n)=>t.getValue(e)===n;la.autoRemove=t=>De(t);const aa=(t,e,n)=>t.getValue(e)==n;aa.autoRemove=t=>De(t);const vi=(t,e,n)=>{let[o,i]=n;const s=t.getValue(e);return s>=o&&s<=i};vi.resolveFilterValue=t=>{let[e,n]=t,o=typeof e!="number"?parseFloat(e):e,i=typeof n!="number"?parseFloat(n):n,s=e===null||Number.isNaN(o)?-1/0:o,r=n===null||Number.isNaN(i)?1/0:i;if(s>r){const a=s;s=r,r=a}return[s,r]},vi.autoRemove=t=>De(t)||De(t[0])&&De(t[1]);const Ge={includesString:ta,includesStringSensitive:na,equalsString:oa,arrIncludes:ia,arrIncludesAll:sa,arrIncludesSome:ra,equals:la,weakEquals:aa,inNumberRange:vi};function De(t){return t==null||t===""}const Xb={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:t=>({columnFilters:[],globalFilter:void 0,...t}),getDefaultOptions:t=>({onColumnFiltersChange:Ce("columnFilters",t),onGlobalFilterChange:Ce("globalFilter",t),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:e=>{var n;const o=(n=t.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[e.id])==null?void 0:n.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(t,e)=>{t.getAutoFilterFn=()=>{const n=e.getCoreRowModel().flatRows[0],o=n==null?void 0:n.getValue(t.id);return typeof o=="string"?Ge.includesString:typeof o=="number"?Ge.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?Ge.equals:Array.isArray(o)?Ge.arrIncludes:Ge.weakEquals},t.getFilterFn=()=>{var n,o;return co(t.columnDef.filterFn)?t.columnDef.filterFn:t.columnDef.filterFn==="auto"?t.getAutoFilterFn():(n=(o=e.options.filterFns)==null?void 0:o[t.columnDef.filterFn])!=null?n:Ge[t.columnDef.filterFn]},t.getCanFilter=()=>{var n,o,i;return((n=t.columnDef.enableColumnFilter)!=null?n:!0)&&((o=e.options.enableColumnFilters)!=null?o:!0)&&((i=e.options.enableFilters)!=null?i:!0)&&!!t.accessorFn},t.getCanGlobalFilter=()=>{var n,o,i,s;return((n=t.columnDef.enableGlobalFilter)!=null?n:!0)&&((o=e.options.enableGlobalFilter)!=null?o:!0)&&((i=e.options.enableFilters)!=null?i:!0)&&((s=e.options.getColumnCanGlobalFilter==null?void 0:e.options.getColumnCanGlobalFilter(t))!=null?s:!0)&&!!t.accessorFn},t.getIsFiltered=()=>t.getFilterIndex()>-1,t.getFilterValue=()=>{var n;return(n=e.getState().columnFilters)==null||(n=n.find(o=>o.id===t.id))==null?void 0:n.value},t.getFilterIndex=()=>{var n,o;return(n=(o=e.getState().columnFilters)==null?void 0:o.findIndex(i=>i.id===t.id))!=null?n:-1},t.setFilterValue=n=>{e.setColumnFilters(o=>{const i=t.getFilterFn(),s=o==null?void 0:o.find(u=>u.id===t.id),r=rt(n,s?s.value:void 0);if(ca(i,r,t)){var a;return(a=o==null?void 0:o.filter(u=>u.id!==t.id))!=null?a:[]}const c={id:t.id,value:r};if(s){var d;return(d=o==null?void 0:o.map(u=>u.id===t.id?c:u))!=null?d:[]}return o!=null&&o.length?[...o,c]:[c]})},t._getFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,t.id),t.getFacetedRowModel=()=>t._getFacetedRowModel?t._getFacetedRowModel():e.getPreFilteredRowModel(),t._getFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,t.id),t.getFacetedUniqueValues=()=>t._getFacetedUniqueValues?t._getFacetedUniqueValues():new Map,t._getFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,t.id),t.getFacetedMinMaxValues=()=>{if(t._getFacetedMinMaxValues)return t._getFacetedMinMaxValues()}},createRow:(t,e)=>{t.columnFilters={},t.columnFiltersMeta={}},createTable:t=>{t.getGlobalAutoFilterFn=()=>Ge.includesString,t.getGlobalFilterFn=()=>{var e,n;const{globalFilterFn:o}=t.options;return co(o)?o:o==="auto"?t.getGlobalAutoFilterFn():(e=(n=t.options.filterFns)==null?void 0:n[o])!=null?e:Ge[o]},t.setColumnFilters=e=>{const n=t.getAllLeafColumns(),o=i=>{var s;return(s=rt(e,i))==null?void 0:s.filter(r=>{const a=n.find(c=>c.id===r.id);if(a){const c=a.getFilterFn();if(ca(c,r.value,a))return!1}return!0})};t.options.onColumnFiltersChange==null||t.options.onColumnFiltersChange(o)},t.setGlobalFilter=e=>{t.options.onGlobalFilterChange==null||t.options.onGlobalFilterChange(e)},t.resetGlobalFilter=e=>{t.setGlobalFilter(e?void 0:t.initialState.globalFilter)},t.resetColumnFilters=e=>{var n,o;t.setColumnFilters(e?[]:(n=(o=t.initialState)==null?void 0:o.columnFilters)!=null?n:[])},t.getPreFilteredRowModel=()=>t.getCoreRowModel(),t.getFilteredRowModel=()=>(!t._getFilteredRowModel&&t.options.getFilteredRowModel&&(t._getFilteredRowModel=t.options.getFilteredRowModel(t)),t.options.manualFiltering||!t._getFilteredRowModel?t.getPreFilteredRowModel():t._getFilteredRowModel()),t._getGlobalFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,"__global__"),t.getGlobalFacetedRowModel=()=>t.options.manualFiltering||!t._getGlobalFacetedRowModel?t.getPreFilteredRowModel():t._getGlobalFacetedRowModel(),t._getGlobalFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,"__global__"),t.getGlobalFacetedUniqueValues=()=>t._getGlobalFacetedUniqueValues?t._getGlobalFacetedUniqueValues():new Map,t._getGlobalFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,"__global__"),t.getGlobalFacetedMinMaxValues=()=>{if(t._getGlobalFacetedMinMaxValues)return t._getGlobalFacetedMinMaxValues()}}};function ca(t,e,n){return(t&&t.autoRemove?t.autoRemove(e,n):!1)||typeof e>"u"||typeof e=="string"&&!e}const Mi={sum:(t,e,n)=>n.reduce((o,i)=>{const s=i.getValue(t);return o+(typeof s=="number"?s:0)},0),min:(t,e,n)=>{let o;return n.forEach(i=>{const s=i.getValue(t);s!=null&&(o>s||o===void 0&&s>=s)&&(o=s)}),o},max:(t,e,n)=>{let o;return n.forEach(i=>{const s=i.getValue(t);s!=null&&(o<s||o===void 0&&s>=s)&&(o=s)}),o},extent:(t,e,n)=>{let o,i;return n.forEach(s=>{const r=s.getValue(t);r!=null&&(o===void 0?r>=r&&(o=i=r):(o>r&&(o=r),i<r&&(i=r)))}),[o,i]},mean:(t,e)=>{let n=0,o=0;if(e.forEach(i=>{let s=i.getValue(t);s!=null&&(s=+s)>=s&&(++n,o+=s)}),n)return o/n},median:(t,e)=>{if(!e.length)return;const n=e.map(s=>s.getValue(t));if(!Hb(n))return;if(n.length===1)return n[0];const o=Math.floor(n.length/2),i=n.sort((s,r)=>s-r);return n.length%2!==0?i[o]:(i[o-1]+i[o])/2},unique:(t,e)=>Array.from(new Set(e.map(n=>n.getValue(t))).values()),uniqueCount:(t,e)=>new Set(e.map(n=>n.getValue(t))).size,count:(t,e)=>e.length},Kb={getDefaultColumnDef:()=>({aggregatedCell:t=>{var e,n;return(e=(n=t.getValue())==null||n.toString==null?void 0:n.toString())!=null?e:null},aggregationFn:"auto"}),getInitialState:t=>({grouping:[],...t}),getDefaultOptions:t=>({onGroupingChange:Ce("grouping",t),groupedColumnMode:"reorder"}),createColumn:(t,e)=>{t.toggleGrouping=()=>{e.setGrouping(n=>n!=null&&n.includes(t.id)?n.filter(o=>o!==t.id):[...n??[],t.id])},t.getCanGroup=()=>{var n,o,i,s;return(n=(o=(i=(s=t.columnDef.enableGrouping)!=null?s:!0)!=null?i:e.options.enableGrouping)!=null?o:!0)!=null?n:!!t.accessorFn},t.getIsGrouped=()=>{var n;return(n=e.getState().grouping)==null?void 0:n.includes(t.id)},t.getGroupedIndex=()=>{var n;return(n=e.getState().grouping)==null?void 0:n.indexOf(t.id)},t.getToggleGroupingHandler=()=>{const n=t.getCanGroup();return()=>{n&&t.toggleGrouping()}},t.getAutoAggregationFn=()=>{const n=e.getCoreRowModel().flatRows[0],o=n==null?void 0:n.getValue(t.id);if(typeof o=="number")return Mi.sum;if(Object.prototype.toString.call(o)==="[object Date]")return Mi.extent},t.getAggregationFn=()=>{var n,o;if(!t)throw new Error;return co(t.columnDef.aggregationFn)?t.columnDef.aggregationFn:t.columnDef.aggregationFn==="auto"?t.getAutoAggregationFn():(n=(o=e.options.aggregationFns)==null?void 0:o[t.columnDef.aggregationFn])!=null?n:Mi[t.columnDef.aggregationFn]}},createTable:t=>{t.setGrouping=e=>t.options.onGroupingChange==null?void 0:t.options.onGroupingChange(e),t.resetGrouping=e=>{var n,o;t.setGrouping(e?[]:(n=(o=t.initialState)==null?void 0:o.grouping)!=null?n:[])},t.getPreGroupedRowModel=()=>t.getFilteredRowModel(),t.getGroupedRowModel=()=>(!t._getGroupedRowModel&&t.options.getGroupedRowModel&&(t._getGroupedRowModel=t.options.getGroupedRowModel(t)),t.options.manualGrouping||!t._getGroupedRowModel?t.getPreGroupedRowModel():t._getGroupedRowModel())},createRow:(t,e)=>{t.getIsGrouped=()=>!!t.groupingColumnId,t.getGroupingValue=n=>{if(t._groupingValuesCache.hasOwnProperty(n))return t._groupingValuesCache[n];const o=e.getColumn(n);return o!=null&&o.columnDef.getGroupingValue?(t._groupingValuesCache[n]=o.columnDef.getGroupingValue(t.original),t._groupingValuesCache[n]):t.getValue(n)},t._groupingValuesCache={}},createCell:(t,e,n,o)=>{t.getIsGrouped=()=>e.getIsGrouped()&&e.id===n.groupingColumnId,t.getIsPlaceholder=()=>!t.getIsGrouped()&&e.getIsGrouped(),t.getIsAggregated=()=>{var i;return!t.getIsGrouped()&&!t.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function Zb(t,e,n){if(!(e!=null&&e.length)||!n)return t;const o=t.filter(s=>!e.includes(s.id));return n==="remove"?o:[...e.map(s=>t.find(r=>r.id===s)).filter(Boolean),...o]}const Jb={getInitialState:t=>({columnOrder:[],...t}),getDefaultOptions:t=>({onColumnOrderChange:Ce("columnOrder",t)}),createTable:t=>{t.setColumnOrder=e=>t.options.onColumnOrderChange==null?void 0:t.options.onColumnOrderChange(e),t.resetColumnOrder=e=>{var n;t.setColumnOrder(e?[]:(n=t.initialState.columnOrder)!=null?n:[])},t._getOrderColumnsFn=I(()=>[t.getState().columnOrder,t.getState().grouping,t.options.groupedColumnMode],(e,n,o)=>i=>{let s=[];if(!(e!=null&&e.length))s=i;else{const r=[...e],a=[...i];for(;a.length&&r.length;){const c=r.shift(),d=a.findIndex(u=>u.id===c);d>-1&&s.push(a.splice(d,1)[0])}s=[...s,...a]}return Zb(s,n,o)},{key:process.env.NODE_ENV==="development"&&"getOrderColumnsFn"})}},Ei=0,Di=10,Vi=()=>({pageIndex:Ei,pageSize:Di}),Qb={getInitialState:t=>({...t,pagination:{...Vi(),...t==null?void 0:t.pagination}}),getDefaultOptions:t=>({onPaginationChange:Ce("pagination",t)}),createTable:t=>{let e=!1,n=!1;t._autoResetPageIndex=()=>{var o,i;if(!e){t._queue(()=>{e=!0});return}if((o=(i=t.options.autoResetAll)!=null?i:t.options.autoResetPageIndex)!=null?o:!t.options.manualPagination){if(n)return;n=!0,t._queue(()=>{t.resetPageIndex(),n=!1})}},t.setPagination=o=>{const i=s=>rt(o,s);return t.options.onPaginationChange==null?void 0:t.options.onPaginationChange(i)},t.resetPagination=o=>{var i;t.setPagination(o?Vi():(i=t.initialState.pagination)!=null?i:Vi())},t.setPageIndex=o=>{t.setPagination(i=>{let s=rt(o,i.pageIndex);const r=typeof t.options.pageCount>"u"||t.options.pageCount===-1?Number.MAX_SAFE_INTEGER:t.options.pageCount-1;return s=Math.max(0,Math.min(s,r)),{...i,pageIndex:s}})},t.resetPageIndex=o=>{var i,s;t.setPageIndex(o?Ei:(i=(s=t.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?i:Ei)},t.resetPageSize=o=>{var i,s;t.setPageSize(o?Di:(i=(s=t.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?i:Di)},t.setPageSize=o=>{t.setPagination(i=>{const s=Math.max(1,rt(o,i.pageSize)),r=i.pageSize*i.pageIndex,a=Math.floor(r/s);return{...i,pageIndex:a,pageSize:s}})},t.setPageCount=o=>t.setPagination(i=>{var s;let r=rt(o,(s=t.options.pageCount)!=null?s:-1);return typeof r=="number"&&(r=Math.max(-1,r)),{...i,pageCount:r}}),t.getPageOptions=I(()=>[t.getPageCount()],o=>{let i=[];return o&&o>0&&(i=[...new Array(o)].fill(null).map((s,r)=>r)),i},{key:process.env.NODE_ENV==="development"&&"getPageOptions",debug:()=>{var o;return(o=t.options.debugAll)!=null?o:t.options.debugTable}}),t.getCanPreviousPage=()=>t.getState().pagination.pageIndex>0,t.getCanNextPage=()=>{const{pageIndex:o}=t.getState().pagination,i=t.getPageCount();return i===-1?!0:i===0?!1:o<i-1},t.previousPage=()=>t.setPageIndex(o=>o-1),t.nextPage=()=>t.setPageIndex(o=>o+1),t.getPrePaginationRowModel=()=>t.getExpandedRowModel(),t.getPaginationRowModel=()=>(!t._getPaginationRowModel&&t.options.getPaginationRowModel&&(t._getPaginationRowModel=t.options.getPaginationRowModel(t)),t.options.manualPagination||!t._getPaginationRowModel?t.getPrePaginationRowModel():t._getPaginationRowModel()),t.getPageCount=()=>{var o;return(o=t.options.pageCount)!=null?o:Math.ceil(t.getPrePaginationRowModel().rows.length/t.getState().pagination.pageSize)}}},Ri=()=>({left:[],right:[]}),Fi=()=>({top:[],bottom:[]}),ey={getInitialState:t=>({columnPinning:Ri(),rowPinning:Fi(),...t}),getDefaultOptions:t=>({onColumnPinningChange:Ce("columnPinning",t),onRowPinningChange:Ce("rowPinning",t)}),createColumn:(t,e)=>{t.pin=n=>{const o=t.getLeafColumns().map(i=>i.id).filter(Boolean);e.setColumnPinning(i=>{var s,r;if(n==="right"){var a,c;return{left:((a=i==null?void 0:i.left)!=null?a:[]).filter(f=>!(o!=null&&o.includes(f))),right:[...((c=i==null?void 0:i.right)!=null?c:[]).filter(f=>!(o!=null&&o.includes(f))),...o]}}if(n==="left"){var d,u;return{left:[...((d=i==null?void 0:i.left)!=null?d:[]).filter(f=>!(o!=null&&o.includes(f))),...o],right:((u=i==null?void 0:i.right)!=null?u:[]).filter(f=>!(o!=null&&o.includes(f)))}}return{left:((s=i==null?void 0:i.left)!=null?s:[]).filter(f=>!(o!=null&&o.includes(f))),right:((r=i==null?void 0:i.right)!=null?r:[]).filter(f=>!(o!=null&&o.includes(f)))}})},t.getCanPin=()=>t.getLeafColumns().some(o=>{var i,s,r;return((i=o.columnDef.enablePinning)!=null?i:!0)&&((s=(r=e.options.enableColumnPinning)!=null?r:e.options.enablePinning)!=null?s:!0)}),t.getIsPinned=()=>{const n=t.getLeafColumns().map(a=>a.id),{left:o,right:i}=e.getState().columnPinning,s=n.some(a=>o==null?void 0:o.includes(a)),r=n.some(a=>i==null?void 0:i.includes(a));return s?"left":r?"right":!1},t.getPinnedIndex=()=>{var n,o;const i=t.getIsPinned();return i?(n=(o=e.getState().columnPinning)==null||(o=o[i])==null?void 0:o.indexOf(t.id))!=null?n:-1:0}},createRow:(t,e)=>{t.pin=(n,o,i)=>{const s=o?t.getLeafRows().map(c=>{let{id:d}=c;return d}):[],r=i?t.getParentRows().map(c=>{let{id:d}=c;return d}):[],a=new Set([...r,t.id,...s]);e.setRowPinning(c=>{var d,u;if(n==="bottom"){var f,p;return{top:((f=c==null?void 0:c.top)!=null?f:[]).filter(m=>!(a!=null&&a.has(m))),bottom:[...((p=c==null?void 0:c.bottom)!=null?p:[]).filter(m=>!(a!=null&&a.has(m))),...Array.from(a)]}}if(n==="top"){var h,g;return{top:[...((h=c==null?void 0:c.top)!=null?h:[]).filter(m=>!(a!=null&&a.has(m))),...Array.from(a)],bottom:((g=c==null?void 0:c.bottom)!=null?g:[]).filter(m=>!(a!=null&&a.has(m)))}}return{top:((d=c==null?void 0:c.top)!=null?d:[]).filter(m=>!(a!=null&&a.has(m))),bottom:((u=c==null?void 0:c.bottom)!=null?u:[]).filter(m=>!(a!=null&&a.has(m)))}})},t.getCanPin=()=>{var n;const{enableRowPinning:o,enablePinning:i}=e.options;return typeof o=="function"?o(t):(n=o??i)!=null?n:!0},t.getIsPinned=()=>{const n=[t.id],{top:o,bottom:i}=e.getState().rowPinning,s=n.some(a=>o==null?void 0:o.includes(a)),r=n.some(a=>i==null?void 0:i.includes(a));return s?"top":r?"bottom":!1},t.getPinnedIndex=()=>{var n,o;const i=t.getIsPinned();if(!i)return-1;const s=(n=e._getPinnedRows(i))==null?void 0:n.map(r=>{let{id:a}=r;return a});return(o=s==null?void 0:s.indexOf(t.id))!=null?o:-1},t.getCenterVisibleCells=I(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,o,i)=>{const s=[...o??[],...i??[]];return n.filter(r=>!s.includes(r.column.id))},{key:process.env.NODE_ENV==="development"&&"row.getCenterVisibleCells",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugRows}}),t.getLeftVisibleCells=I(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left,,],(n,o)=>(o??[]).map(s=>n.find(r=>r.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),{key:process.env.NODE_ENV==="development"&&"row.getLeftVisibleCells",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugRows}}),t.getRightVisibleCells=I(()=>[t._getAllVisibleCells(),e.getState().columnPinning.right],(n,o)=>(o??[]).map(s=>n.find(r=>r.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),{key:process.env.NODE_ENV==="development"&&"row.getRightVisibleCells",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugRows}})},createTable:t=>{t.setColumnPinning=e=>t.options.onColumnPinningChange==null?void 0:t.options.onColumnPinningChange(e),t.resetColumnPinning=e=>{var n,o;return t.setColumnPinning(e?Ri():(n=(o=t.initialState)==null?void 0:o.columnPinning)!=null?n:Ri())},t.getIsSomeColumnsPinned=e=>{var n;const o=t.getState().columnPinning;if(!e){var i,s;return!!((i=o.left)!=null&&i.length||(s=o.right)!=null&&s.length)}return!!((n=o[e])!=null&&n.length)},t.getLeftLeafColumns=I(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left],(e,n)=>(n??[]).map(o=>e.find(i=>i.id===o)).filter(Boolean),{key:process.env.NODE_ENV==="development"&&"getLeftLeafColumns",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugColumns}}),t.getRightLeafColumns=I(()=>[t.getAllLeafColumns(),t.getState().columnPinning.right],(e,n)=>(n??[]).map(o=>e.find(i=>i.id===o)).filter(Boolean),{key:process.env.NODE_ENV==="development"&&"getRightLeafColumns",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugColumns}}),t.getCenterLeafColumns=I(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o)=>{const i=[...n??[],...o??[]];return e.filter(s=>!i.includes(s.id))},{key:process.env.NODE_ENV==="development"&&"getCenterLeafColumns",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugColumns}}),t.setRowPinning=e=>t.options.onRowPinningChange==null?void 0:t.options.onRowPinningChange(e),t.resetRowPinning=e=>{var n,o;return t.setRowPinning(e?Fi():(n=(o=t.initialState)==null?void 0:o.rowPinning)!=null?n:Fi())},t.getIsSomeRowsPinned=e=>{var n;const o=t.getState().rowPinning;if(!e){var i,s;return!!((i=o.top)!=null&&i.length||(s=o.bottom)!=null&&s.length)}return!!((n=o[e])!=null&&n.length)},t._getPinnedRows=e=>I(()=>[t.getRowModel().rows,t.getState().rowPinning[e]],(n,o)=>{var i;return((i=t.options.keepPinnedRows)==null||i?(o??[]).map(r=>{const a=t.getRow(r,!0);return a.getIsAllParentsExpanded()?a:null}):(o??[]).map(r=>n.find(a=>a.id===r))).filter(Boolean).map(r=>({...r,position:e}))},{key:process.env.NODE_ENV==="development"&&`row.get${e==="top"?"Top":"Bottom"}Rows`,debug:()=>{var n;return(n=t.options.debugAll)!=null?n:t.options.debugRows}})(),t.getTopRows=()=>t._getPinnedRows("top"),t.getBottomRows=()=>t._getPinnedRows("bottom"),t.getCenterRows=I(()=>[t.getRowModel().rows,t.getState().rowPinning.top,t.getState().rowPinning.bottom],(e,n,o)=>{const i=new Set([...n??[],...o??[]]);return e.filter(s=>!i.has(s.id))},{key:process.env.NODE_ENV==="development"&&"row.getCenterRows",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugRows}})}},ty={getInitialState:t=>({rowSelection:{},...t}),getDefaultOptions:t=>({onRowSelectionChange:Ce("rowSelection",t),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:t=>{t.setRowSelection=e=>t.options.onRowSelectionChange==null?void 0:t.options.onRowSelectionChange(e),t.resetRowSelection=e=>{var n;return t.setRowSelection(e?{}:(n=t.initialState.rowSelection)!=null?n:{})},t.toggleAllRowsSelected=e=>{t.setRowSelection(n=>{e=typeof e<"u"?e:!t.getIsAllRowsSelected();const o={...n},i=t.getPreGroupedRowModel().flatRows;return e?i.forEach(s=>{s.getCanSelect()&&(o[s.id]=!0)}):i.forEach(s=>{delete o[s.id]}),o})},t.toggleAllPageRowsSelected=e=>t.setRowSelection(n=>{const o=typeof e<"u"?e:!t.getIsAllPageRowsSelected(),i={...n};return t.getRowModel().rows.forEach(s=>{Bi(i,s.id,o,!0,t)}),i}),t.getPreSelectedRowModel=()=>t.getCoreRowModel(),t.getSelectedRowModel=I(()=>[t.getState().rowSelection,t.getCoreRowModel()],(e,n)=>Object.keys(e).length?$i(t,n):{rows:[],flatRows:[],rowsById:{}},{key:process.env.NODE_ENV==="development"&&"getSelectedRowModel",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable}}),t.getFilteredSelectedRowModel=I(()=>[t.getState().rowSelection,t.getFilteredRowModel()],(e,n)=>Object.keys(e).length?$i(t,n):{rows:[],flatRows:[],rowsById:{}},{key:process.env.NODE_ENV==="production"&&"getFilteredSelectedRowModel",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable}}),t.getGroupedSelectedRowModel=I(()=>[t.getState().rowSelection,t.getSortedRowModel()],(e,n)=>Object.keys(e).length?$i(t,n):{rows:[],flatRows:[],rowsById:{}},{key:process.env.NODE_ENV==="production"&&"getGroupedSelectedRowModel",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable}}),t.getIsAllRowsSelected=()=>{const e=t.getFilteredRowModel().flatRows,{rowSelection:n}=t.getState();let o=!!(e.length&&Object.keys(n).length);return o&&e.some(i=>i.getCanSelect()&&!n[i.id])&&(o=!1),o},t.getIsAllPageRowsSelected=()=>{const e=t.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=t.getState();let o=!!e.length;return o&&e.some(i=>!n[i.id])&&(o=!1),o},t.getIsSomeRowsSelected=()=>{var e;const n=Object.keys((e=t.getState().rowSelection)!=null?e:{}).length;return n>0&&n<t.getFilteredRowModel().flatRows.length},t.getIsSomePageRowsSelected=()=>{const e=t.getPaginationRowModel().flatRows;return t.getIsAllPageRowsSelected()?!1:e.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},t.getToggleAllRowsSelectedHandler=()=>e=>{t.toggleAllRowsSelected(e.target.checked)},t.getToggleAllPageRowsSelectedHandler=()=>e=>{t.toggleAllPageRowsSelected(e.target.checked)}},createRow:(t,e)=>{t.toggleSelected=(n,o)=>{const i=t.getIsSelected();e.setRowSelection(s=>{var r;if(n=typeof n<"u"?n:!i,t.getCanSelect()&&i===n)return s;const a={...s};return Bi(a,t.id,n,(r=o==null?void 0:o.selectChildren)!=null?r:!0,e),a})},t.getIsSelected=()=>{const{rowSelection:n}=e.getState();return Pi(t,n)},t.getIsSomeSelected=()=>{const{rowSelection:n}=e.getState();return Ai(t,n)==="some"},t.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=e.getState();return Ai(t,n)==="all"},t.getCanSelect=()=>{var n;return typeof e.options.enableRowSelection=="function"?e.options.enableRowSelection(t):(n=e.options.enableRowSelection)!=null?n:!0},t.getCanSelectSubRows=()=>{var n;return typeof e.options.enableSubRowSelection=="function"?e.options.enableSubRowSelection(t):(n=e.options.enableSubRowSelection)!=null?n:!0},t.getCanMultiSelect=()=>{var n;return typeof e.options.enableMultiRowSelection=="function"?e.options.enableMultiRowSelection(t):(n=e.options.enableMultiRowSelection)!=null?n:!0},t.getToggleSelectedHandler=()=>{const n=t.getCanSelect();return o=>{var i;n&&t.toggleSelected((i=o.target)==null?void 0:i.checked)}}}},Bi=(t,e,n,o,i)=>{var s;const r=i.getRow(e,!0);n?(r.getCanMultiSelect()||Object.keys(t).forEach(a=>delete t[a]),r.getCanSelect()&&(t[e]=!0)):delete t[e],o&&(s=r.subRows)!=null&&s.length&&r.getCanSelectSubRows()&&r.subRows.forEach(a=>Bi(t,a.id,n,o,i))};function $i(t,e){const n=t.getState().rowSelection,o=[],i={},s=function(r,a){return r.map(c=>{var d;const u=Pi(c,n);if(u&&(o.push(c),i[c.id]=c),(d=c.subRows)!=null&&d.length&&(c={...c,subRows:s(c.subRows)}),u)return c}).filter(Boolean)};return{rows:s(e.rows),flatRows:o,rowsById:i}}function Pi(t,e){var n;return(n=e[t.id])!=null?n:!1}function Ai(t,e,n){var o;if(!((o=t.subRows)!=null&&o.length))return!1;let i=!0,s=!1;return t.subRows.forEach(r=>{if(!(s&&!i)&&(r.getCanSelect()&&(Pi(r,e)?s=!0:i=!1),r.subRows&&r.subRows.length)){const a=Ai(r,e);a==="all"?s=!0:(a==="some"&&(s=!0),i=!1)}}),i?"all":s?"some":!1}const Oi=/([0-9]+)/gm,ny=(t,e,n)=>da(lt(t.getValue(n)).toLowerCase(),lt(e.getValue(n)).toLowerCase()),oy=(t,e,n)=>da(lt(t.getValue(n)),lt(e.getValue(n))),iy=(t,e,n)=>Ni(lt(t.getValue(n)).toLowerCase(),lt(e.getValue(n)).toLowerCase()),sy=(t,e,n)=>Ni(lt(t.getValue(n)),lt(e.getValue(n))),ry=(t,e,n)=>{const o=t.getValue(n),i=e.getValue(n);return o>i?1:o<i?-1:0},ly=(t,e,n)=>Ni(t.getValue(n),e.getValue(n));function Ni(t,e){return t===e?0:t>e?1:-1}function lt(t){return typeof t=="number"?isNaN(t)||t===1/0||t===-1/0?"":String(t):typeof t=="string"?t:""}function da(t,e){const n=t.split(Oi).filter(Boolean),o=e.split(Oi).filter(Boolean);for(;n.length&&o.length;){const i=n.shift(),s=o.shift(),r=parseInt(i,10),a=parseInt(s,10),c=[r,a].sort();if(isNaN(c[0])){if(i>s)return 1;if(s>i)return-1;continue}if(isNaN(c[1]))return isNaN(r)?-1:1;if(r>a)return 1;if(a>r)return-1}return n.length-o.length}const pn={alphanumeric:ny,alphanumericCaseSensitive:oy,text:iy,textCaseSensitive:sy,datetime:ry,basic:ly},ua=[Yb,{getInitialState:t=>({columnVisibility:{},...t}),getDefaultOptions:t=>({onColumnVisibilityChange:Ce("columnVisibility",t)}),createColumn:(t,e)=>{t.toggleVisibility=n=>{t.getCanHide()&&e.setColumnVisibility(o=>({...o,[t.id]:n??!t.getIsVisible()}))},t.getIsVisible=()=>{var n,o;return(n=(o=e.getState().columnVisibility)==null?void 0:o[t.id])!=null?n:!0},t.getCanHide=()=>{var n,o;return((n=t.columnDef.enableHiding)!=null?n:!0)&&((o=e.options.enableHiding)!=null?o:!0)},t.getToggleVisibilityHandler=()=>n=>{t.toggleVisibility==null||t.toggleVisibility(n.target.checked)}},createRow:(t,e)=>{t._getAllVisibleCells=I(()=>[t.getAllCells(),e.getState().columnVisibility],n=>n.filter(o=>o.column.getIsVisible()),{key:process.env.NODE_ENV==="production"&&"row._getAllVisibleCells",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugRows}}),t.getVisibleCells=I(()=>[t.getLeftVisibleCells(),t.getCenterVisibleCells(),t.getRightVisibleCells()],(n,o,i)=>[...n,...o,...i],{key:process.env.NODE_ENV==="development"&&"row.getVisibleCells",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugRows}})},createTable:t=>{const e=(n,o)=>I(()=>[o(),o().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),{key:n,debug:()=>{var i;return(i=t.options.debugAll)!=null?i:t.options.debugColumns}});t.getVisibleFlatColumns=e("getVisibleFlatColumns",()=>t.getAllFlatColumns()),t.getVisibleLeafColumns=e("getVisibleLeafColumns",()=>t.getAllLeafColumns()),t.getLeftVisibleLeafColumns=e("getLeftVisibleLeafColumns",()=>t.getLeftLeafColumns()),t.getRightVisibleLeafColumns=e("getRightVisibleLeafColumns",()=>t.getRightLeafColumns()),t.getCenterVisibleLeafColumns=e("getCenterVisibleLeafColumns",()=>t.getCenterLeafColumns()),t.setColumnVisibility=n=>t.options.onColumnVisibilityChange==null?void 0:t.options.onColumnVisibilityChange(n),t.resetColumnVisibility=n=>{var o;t.setColumnVisibility(n?{}:(o=t.initialState.columnVisibility)!=null?o:{})},t.toggleAllColumnsVisible=n=>{var o;n=(o=n)!=null?o:!t.getIsAllColumnsVisible(),t.setColumnVisibility(t.getAllLeafColumns().reduce((i,s)=>({...i,[s.id]:n||!(s.getCanHide!=null&&s.getCanHide())}),{}))},t.getIsAllColumnsVisible=()=>!t.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),t.getIsSomeColumnsVisible=()=>t.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),t.getToggleAllColumnsVisibilityHandler=()=>n=>{var o;t.toggleAllColumnsVisible((o=n.target)==null?void 0:o.checked)}}},Jb,ey,Xb,{getInitialState:t=>({sorting:[],...t}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:t=>({onSortingChange:Ce("sorting",t),isMultiSortEvent:e=>e.shiftKey}),createColumn:(t,e)=>{t.getAutoSortingFn=()=>{const n=e.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const i of n){const s=i==null?void 0:i.getValue(t.id);if(Object.prototype.toString.call(s)==="[object Date]")return pn.datetime;if(typeof s=="string"&&(o=!0,s.split(Oi).length>1))return pn.alphanumeric}return o?pn.text:pn.basic},t.getAutoSortDir=()=>{const n=e.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(t.id))=="string"?"asc":"desc"},t.getSortingFn=()=>{var n,o;if(!t)throw new Error;return co(t.columnDef.sortingFn)?t.columnDef.sortingFn:t.columnDef.sortingFn==="auto"?t.getAutoSortingFn():(n=(o=e.options.sortingFns)==null?void 0:o[t.columnDef.sortingFn])!=null?n:pn[t.columnDef.sortingFn]},t.toggleSorting=(n,o)=>{const i=t.getNextSortingOrder(),s=typeof n<"u"&&n!==null;e.setSorting(r=>{const a=r==null?void 0:r.find(h=>h.id===t.id),c=r==null?void 0:r.findIndex(h=>h.id===t.id);let d=[],u,f=s?n:i==="desc";if(r!=null&&r.length&&t.getCanMultiSort()&&o?a?u="toggle":u="add":r!=null&&r.length&&c!==r.length-1?u="replace":a?u="toggle":u="replace",u==="toggle"&&(s||i||(u="remove")),u==="add"){var p;d=[...r,{id:t.id,desc:f}],d.splice(0,d.length-((p=e.options.maxMultiSortColCount)!=null?p:Number.MAX_SAFE_INTEGER))}else u==="toggle"?d=r.map(h=>h.id===t.id?{...h,desc:f}:h):u==="remove"?d=r.filter(h=>h.id!==t.id):d=[{id:t.id,desc:f}];return d})},t.getFirstSortDir=()=>{var n,o;return((n=(o=t.columnDef.sortDescFirst)!=null?o:e.options.sortDescFirst)!=null?n:t.getAutoSortDir()==="desc")?"desc":"asc"},t.getNextSortingOrder=n=>{var o,i;const s=t.getFirstSortDir(),r=t.getIsSorted();return r?r!==s&&((o=e.options.enableSortingRemoval)==null||o)&&(!(n&&(i=e.options.enableMultiRemove)!=null)||i)?!1:r==="desc"?"asc":"desc":s},t.getCanSort=()=>{var n,o;return((n=t.columnDef.enableSorting)!=null?n:!0)&&((o=e.options.enableSorting)!=null?o:!0)&&!!t.accessorFn},t.getCanMultiSort=()=>{var n,o;return(n=(o=t.columnDef.enableMultiSort)!=null?o:e.options.enableMultiSort)!=null?n:!!t.accessorFn},t.getIsSorted=()=>{var n;const o=(n=e.getState().sorting)==null?void 0:n.find(i=>i.id===t.id);return o?o.desc?"desc":"asc":!1},t.getSortIndex=()=>{var n,o;return(n=(o=e.getState().sorting)==null?void 0:o.findIndex(i=>i.id===t.id))!=null?n:-1},t.clearSorting=()=>{e.setSorting(n=>n!=null&&n.length?n.filter(o=>o.id!==t.id):[])},t.getToggleSortingHandler=()=>{const n=t.getCanSort();return o=>{n&&(o.persist==null||o.persist(),t.toggleSorting==null||t.toggleSorting(void 0,t.getCanMultiSort()?e.options.isMultiSortEvent==null?void 0:e.options.isMultiSortEvent(o):!1))}}},createTable:t=>{t.setSorting=e=>t.options.onSortingChange==null?void 0:t.options.onSortingChange(e),t.resetSorting=e=>{var n,o;t.setSorting(e?[]:(n=(o=t.initialState)==null?void 0:o.sorting)!=null?n:[])},t.getPreSortedRowModel=()=>t.getGroupedRowModel(),t.getSortedRowModel=()=>(!t._getSortedRowModel&&t.options.getSortedRowModel&&(t._getSortedRowModel=t.options.getSortedRowModel(t)),t.options.manualSorting||!t._getSortedRowModel?t.getPreSortedRowModel():t._getSortedRowModel())}},Kb,qb,Qb,ty,Gb];function ay(t){var e;(t.debugAll||t.debugTable)&&console.info("Creating Table Instance...");let n={_features:ua};const o=n._features.reduce((u,f)=>Object.assign(u,f.getDefaultOptions==null?void 0:f.getDefaultOptions(n)),{}),i=u=>n.options.mergeOptions?n.options.mergeOptions(o,u):{...o,...u};let r={...{},...(e=t.initialState)!=null?e:{}};n._features.forEach(u=>{var f;r=(f=u.getInitialState==null?void 0:u.getInitialState(r))!=null?f:r});const a=[];let c=!1;const d={_features:ua,options:{...o,...t},initialState:r,_queue:u=>{a.push(u),c||(c=!0,Promise.resolve().then(()=>{for(;a.length;)a.shift()();c=!1}).catch(f=>setTimeout(()=>{throw f})))},reset:()=>{n.setState(n.initialState)},setOptions:u=>{const f=rt(u,n.options);n.options=i(f)},getState:()=>n.options.state,setState:u=>{n.options.onStateChange==null||n.options.onStateChange(u)},_getRowId:(u,f,p)=>{var h;return(h=n.options.getRowId==null?void 0:n.options.getRowId(u,f,p))!=null?h:`${p?[p.id,f].join("."):f}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(u,f)=>{const p=(f?n.getCoreRowModel():n.getRowModel()).rowsById[u];if(!p)throw process.env.NODE_ENV!=="production"?new Error(`getRow expected an ID, but got ${u}`):new Error;return p},_getDefaultColumnDef:I(()=>[n.options.defaultColumn],u=>{var f;return u=(f=u)!=null?f:{},{header:p=>{const h=p.header.column.columnDef;return h.accessorKey?h.accessorKey:h.accessorFn?h.id:null},cell:p=>{var h,g;return(h=(g=p.renderValue())==null||g.toString==null?void 0:g.toString())!=null?h:null},...n._features.reduce((p,h)=>Object.assign(p,h.getDefaultColumnDef==null?void 0:h.getDefaultColumnDef()),{}),...u}},{debug:()=>{var u;return(u=n.options.debugAll)!=null?u:n.options.debugColumns},key:process.env.NODE_ENV==="development"&&"getDefaultColumnDef"}),_getColumnDefs:()=>n.options.columns,getAllColumns:I(()=>[n._getColumnDefs()],u=>{const f=function(p,h,g){return g===void 0&&(g=0),p.map(m=>{const b=Wb(n,m,g,h),x=m;return b.columns=x.columns?f(x.columns,b,g+1):[],b})};return f(u)},{key:process.env.NODE_ENV==="development"&&"getAllColumns",debug:()=>{var u;return(u=n.options.debugAll)!=null?u:n.options.debugColumns}}),getAllFlatColumns:I(()=>[n.getAllColumns()],u=>u.flatMap(f=>f.getFlatColumns()),{key:process.env.NODE_ENV==="development"&&"getAllFlatColumns",debug:()=>{var u;return(u=n.options.debugAll)!=null?u:n.options.debugColumns}}),_getAllFlatColumnsById:I(()=>[n.getAllFlatColumns()],u=>u.reduce((f,p)=>(f[p.id]=p,f),{}),{key:process.env.NODE_ENV==="development"&&"getAllFlatColumnsById",debug:()=>{var u;return(u=n.options.debugAll)!=null?u:n.options.debugColumns}}),getAllLeafColumns:I(()=>[n.getAllColumns(),n._getOrderColumnsFn()],(u,f)=>{let p=u.flatMap(h=>h.getLeafColumns());return f(p)},{key:process.env.NODE_ENV==="development"&&"getAllLeafColumns",debug:()=>{var u;return(u=n.options.debugAll)!=null?u:n.options.debugColumns}}),getColumn:u=>{const f=n._getAllFlatColumnsById()[u];return process.env.NODE_ENV!=="production"&&!f&&console.error(`[Table] Column with id '${u}' does not exist.`),f}};Object.assign(n,d);for(let u=0;u<n._features.length;u++){const f=n._features[u];f==null||f.createTable==null||f.createTable(n)}return n}function cy(t,e,n,o){const i=()=>{var r;return(r=s.getValue())!=null?r:t.options.renderFallbackValue},s={id:`${e.id}_${n.id}`,row:e,column:n,getValue:()=>e.getValue(o),renderValue:i,getContext:I(()=>[t,n,e,s],(r,a,c,d)=>({table:r,column:a,row:c,cell:d,getValue:d.getValue,renderValue:d.renderValue}),{key:process.env.NODE_ENV==="development"&&"cell.getContext",debug:()=>t.options.debugAll})};return t._features.forEach(r=>{r.createCell==null||r.createCell(s,n,e,t)},{}),s}const Ii=(t,e,n,o,i,s,r)=>{let a={id:e,index:o,original:n,depth:i,parentId:r,_valuesCache:{},_uniqueValuesCache:{},getValue:c=>{if(a._valuesCache.hasOwnProperty(c))return a._valuesCache[c];const d=t.getColumn(c);if(d!=null&&d.accessorFn)return a._valuesCache[c]=d.accessorFn(a.original,o),a._valuesCache[c]},getUniqueValues:c=>{if(a._uniqueValuesCache.hasOwnProperty(c))return a._uniqueValuesCache[c];const d=t.getColumn(c);if(d!=null&&d.accessorFn)return d.columnDef.getUniqueValues?(a._uniqueValuesCache[c]=d.columnDef.getUniqueValues(a.original,o),a._uniqueValuesCache[c]):(a._uniqueValuesCache[c]=[a.getValue(c)],a._uniqueValuesCache[c])},renderValue:c=>{var d;return(d=a.getValue(c))!=null?d:t.options.renderFallbackValue},subRows:s??[],getLeafRows:()=>jb(a.subRows,c=>c.subRows),getParentRow:()=>a.parentId?t.getRow(a.parentId,!0):void 0,getParentRows:()=>{let c=[],d=a;for(;;){const u=d.getParentRow();if(!u)break;c.push(u),d=u}return c.reverse()},getAllCells:I(()=>[t.getAllLeafColumns()],c=>c.map(d=>cy(t,a,d,d.id)),{key:process.env.NODE_ENV==="development"&&"row.getAllCells",debug:()=>{var c;return(c=t.options.debugAll)!=null?c:t.options.debugRows}}),_getAllCellsByColumnId:I(()=>[a.getAllCells()],c=>c.reduce((d,u)=>(d[u.column.id]=u,d),{}),{key:process.env.NODE_ENV==="production"&&"row.getAllCellsByColumnId",debug:()=>{var c;return(c=t.options.debugAll)!=null?c:t.options.debugRows}})};for(let c=0;c<t._features.length;c++){const d=t._features[c];d==null||d.createRow==null||d.createRow(a,t)}return a};function dy(){return t=>I(()=>[t.options.data],e=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(i,s,r){s===void 0&&(s=0);const a=[];for(let d=0;d<i.length;d++){const u=Ii(t,t._getRowId(i[d],d,r),i[d],d,s,void 0,r==null?void 0:r.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,a.push(u),t.options.getSubRows){var c;u.originalSubRows=t.options.getSubRows(i[d],d),(c=u.originalSubRows)!=null&&c.length&&(u.subRows=o(u.originalSubRows,s+1,u))}}return a};return n.rows=o(e),n},{key:process.env.NODE_ENV==="development"&&"getRowModel",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable},onChange:()=>{t._autoResetPageIndex()}})}function uy(t,e,n){return n.options.filterFromLeafRows?fy(t,e,n):hy(t,e,n)}function fy(t,e,n){var o;const i=[],s={},r=(o=n.options.maxLeafRowFilterDepth)!=null?o:100,a=function(c,d){d===void 0&&(d=0);const u=[];for(let p=0;p<c.length;p++){var f;let h=c[p];const g=Ii(n,h.id,h.original,h.index,h.depth,void 0,h.parentId);if(g.columnFilters=h.columnFilters,(f=h.subRows)!=null&&f.length&&d<r){if(g.subRows=a(h.subRows,d+1),h=g,e(h)&&!g.subRows.length){u.push(h),s[h.id]=h,i.push(h);continue}if(e(h)||g.subRows.length){u.push(h),s[h.id]=h,i.push(h);continue}}else h=g,e(h)&&(u.push(h),s[h.id]=h,i.push(h))}return u};return{rows:a(t),flatRows:i,rowsById:s}}function hy(t,e,n){var o;const i=[],s={},r=(o=n.options.maxLeafRowFilterDepth)!=null?o:100,a=function(c,d){d===void 0&&(d=0);const u=[];for(let p=0;p<c.length;p++){let h=c[p];if(e(h)){var f;if((f=h.subRows)!=null&&f.length&&d<r){const m=Ii(n,h.id,h.original,h.index,h.depth,void 0,h.parentId);m.subRows=a(h.subRows,d+1),h=m}u.push(h),i.push(h),s[h.id]=h}}return u};return{rows:a(t),flatRows:i,rowsById:s}}function py(){return t=>I(()=>[t.getPreFilteredRowModel(),t.getState().columnFilters,t.getState().globalFilter],(e,n,o)=>{if(!e.rows.length||!(n!=null&&n.length)&&!o){for(let p=0;p<e.flatRows.length;p++)e.flatRows[p].columnFilters={},e.flatRows[p].columnFiltersMeta={};return e}const i=[],s=[];(n??[]).forEach(p=>{var h;const g=t.getColumn(p.id);if(!g)return;const m=g.getFilterFn();if(!m){process.env.NODE_ENV!=="production"&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${g.id}.`);return}i.push({id:p.id,filterFn:m,resolvedValue:(h=m.resolveFilterValue==null?void 0:m.resolveFilterValue(p.value))!=null?h:p.value})});const r=n.map(p=>p.id),a=t.getGlobalFilterFn(),c=t.getAllLeafColumns().filter(p=>p.getCanGlobalFilter());o&&a&&c.length&&(r.push("__global__"),c.forEach(p=>{var h;s.push({id:p.id,filterFn:a,resolvedValue:(h=a.resolveFilterValue==null?void 0:a.resolveFilterValue(o))!=null?h:o})}));let d,u;for(let p=0;p<e.flatRows.length;p++){const h=e.flatRows[p];if(h.columnFilters={},i.length)for(let g=0;g<i.length;g++){d=i[g];const m=d.id;h.columnFilters[m]=d.filterFn(h,m,d.resolvedValue,b=>{h.columnFiltersMeta[m]=b})}if(s.length){for(let g=0;g<s.length;g++){u=s[g];const m=u.id;if(u.filterFn(h,m,u.resolvedValue,b=>{h.columnFiltersMeta[m]=b})){h.columnFilters.__global__=!0;break}}h.columnFilters.__global__!==!0&&(h.columnFilters.__global__=!1)}}const f=p=>{for(let h=0;h<r.length;h++)if(p.columnFilters[r[h]]===!1)return!1;return!0};return uy(e.rows,f,t)},{key:process.env.NODE_ENV==="development"&&"getFilteredRowModel",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable},onChange:()=>{t._autoResetPageIndex()}})}function gy(){return t=>I(()=>[t.getState().sorting,t.getPreSortedRowModel()],(e,n)=>{if(!n.rows.length||!(e!=null&&e.length))return n;const o=t.getState().sorting,i=[],s=o.filter(c=>{var d;return(d=t.getColumn(c.id))==null?void 0:d.getCanSort()}),r={};s.forEach(c=>{const d=t.getColumn(c.id);d&&(r[c.id]={sortUndefined:d.columnDef.sortUndefined,invertSorting:d.columnDef.invertSorting,sortingFn:d.getSortingFn()})});const a=c=>{const d=c.map(u=>({...u}));return d.sort((u,f)=>{for(let h=0;h<s.length;h+=1){var p;const g=s[h],m=r[g.id],b=(p=g==null?void 0:g.desc)!=null?p:!1;let x=0;if(m.sortUndefined){const y=u.getValue(g.id),w=f.getValue(g.id),S=y===void 0,_=w===void 0;(S||_)&&(x=S&&_?0:S?m.sortUndefined:-m.sortUndefined)}if(x===0&&(x=m.sortingFn(u,f,g.id)),x!==0)return b&&(x*=-1),m.invertSorting&&(x*=-1),x}return u.index-f.index}),d.forEach(u=>{var f;i.push(u),(f=u.subRows)!=null&&f.length&&(u.subRows=a(u.subRows))}),d};return{rows:a(n.rows),flatRows:i,rowsById:n.rowsById}},{key:process.env.NODE_ENV==="development"&&"getSortedRowModel",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable},onChange:()=>{t._autoResetPageIndex()}})}function my(t){const e=[],n=o=>{var i;e.push(o),(i=o.subRows)!=null&&i.length&&o.getIsExpanded()&&o.subRows.forEach(n)};return t.rows.forEach(n),{rows:e,flatRows:t.flatRows,rowsById:t.rowsById}}function by(t){return e=>I(()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded],(n,o)=>{if(!o.rows.length)return o;const{pageSize:i,pageIndex:s}=n;let{rows:r,flatRows:a,rowsById:c}=o;const d=i*s,u=d+i;r=r.slice(d,u);let f;e.options.paginateExpandedRows?f={rows:r,flatRows:a,rowsById:c}:f=my({rows:r,flatRows:a,rowsById:c}),f.flatRows=[];const p=h=>{f.flatRows.push(h),h.subRows.length&&h.subRows.forEach(p)};return f.rows.forEach(p),f},{key:process.env.NODE_ENV==="development"&&"getPaginationRowModel",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugTable}})}/**
|
|
45
|
+
color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,n==null?void 0:n.key)}return i}}function y_(t,e,n,o){var i,r;const a={...t._getDefaultColumnDef(),...e},d=a.accessorKey;let c=(i=(r=a.id)!=null?r:d?d.replace(".","_"):void 0)!=null?i:typeof a.header=="string"?a.header:void 0,u;if(a.accessorFn?u=a.accessorFn:d&&(d.includes(".")?u=h=>{let p=h;for(const g of d.split(".")){var m;p=(m=p)==null?void 0:m[g],process.env.NODE_ENV!=="production"&&p===void 0&&console.warn(`"${g}" in deeply nested key "${d}" returned undefined.`)}return p}:u=h=>h[a.accessorKey]),!c)throw process.env.NODE_ENV!=="production"?new Error(a.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let f={id:`${String(c)}`,accessorFn:u,parent:o,depth:n,columnDef:a,columns:[],getFlatColumns:H(()=>[!0],()=>{var h;return[f,...(h=f.columns)==null?void 0:h.flatMap(p=>p.getFlatColumns())]},{key:process.env.NODE_ENV==="production"&&"column.getFlatColumns",debug:()=>{var h;return(h=t.options.debugAll)!=null?h:t.options.debugColumns}}),getLeafColumns:H(()=>[t._getOrderColumnsFn()],h=>{var p;if((p=f.columns)!=null&&p.length){let m=f.columns.flatMap(g=>g.getLeafColumns());return h(m)}return[f]},{key:process.env.NODE_ENV==="production"&&"column.getLeafColumns",debug:()=>{var h;return(h=t.options.debugAll)!=null?h:t.options.debugColumns}})};for(const h of t._features)h.createColumn==null||h.createColumn(f,t);return f}function uc(t,e,n){var o;let r={id:(o=n.id)!=null?o:e.id,column:e,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const l=[],a=d=>{d.subHeaders&&d.subHeaders.length&&d.subHeaders.map(a),l.push(d)};return a(r),l},getContext:()=>({table:t,header:r,column:e})};return t._features.forEach(l=>{l.createHeader==null||l.createHeader(r,t)}),r}const $_={createTable:t=>{t.getHeaderGroups=H(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o,i)=>{var r,l;const a=(r=o==null?void 0:o.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?r:[],d=(l=i==null?void 0:i.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?l:[],c=n.filter(f=>!(o!=null&&o.includes(f.id))&&!(i!=null&&i.includes(f.id)));return Qo(e,[...a,...c,...d],t)},{key:process.env.NODE_ENV==="development"&&"getHeaderGroups",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getCenterHeaderGroups=H(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o,i)=>(n=n.filter(r=>!(o!=null&&o.includes(r.id))&&!(i!=null&&i.includes(r.id))),Qo(e,n,t,"center")),{key:process.env.NODE_ENV==="development"&&"getCenterHeaderGroups",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getLeftHeaderGroups=H(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left],(e,n,o)=>{var i;const r=(i=o==null?void 0:o.map(l=>n.find(a=>a.id===l)).filter(Boolean))!=null?i:[];return Qo(e,r,t,"left")},{key:process.env.NODE_ENV==="development"&&"getLeftHeaderGroups",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getRightHeaderGroups=H(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.right],(e,n,o)=>{var i;const r=(i=o==null?void 0:o.map(l=>n.find(a=>a.id===l)).filter(Boolean))!=null?i:[];return Qo(e,r,t,"right")},{key:process.env.NODE_ENV==="development"&&"getRightHeaderGroups",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getFooterGroups=H(()=>[t.getHeaderGroups()],e=>[...e].reverse(),{key:process.env.NODE_ENV==="development"&&"getFooterGroups",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getLeftFooterGroups=H(()=>[t.getLeftHeaderGroups()],e=>[...e].reverse(),{key:process.env.NODE_ENV==="development"&&"getLeftFooterGroups",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getCenterFooterGroups=H(()=>[t.getCenterHeaderGroups()],e=>[...e].reverse(),{key:process.env.NODE_ENV==="development"&&"getCenterFooterGroups",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getRightFooterGroups=H(()=>[t.getRightHeaderGroups()],e=>[...e].reverse(),{key:process.env.NODE_ENV==="development"&&"getRightFooterGroups",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getFlatHeaders=H(()=>[t.getHeaderGroups()],e=>e.map(n=>n.headers).flat(),{key:process.env.NODE_ENV==="development"&&"getFlatHeaders",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getLeftFlatHeaders=H(()=>[t.getLeftHeaderGroups()],e=>e.map(n=>n.headers).flat(),{key:process.env.NODE_ENV==="development"&&"getLeftFlatHeaders",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getCenterFlatHeaders=H(()=>[t.getCenterHeaderGroups()],e=>e.map(n=>n.headers).flat(),{key:process.env.NODE_ENV==="development"&&"getCenterFlatHeaders",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getRightFlatHeaders=H(()=>[t.getRightHeaderGroups()],e=>e.map(n=>n.headers).flat(),{key:process.env.NODE_ENV==="development"&&"getRightFlatHeaders",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getCenterLeafHeaders=H(()=>[t.getCenterFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),{key:process.env.NODE_ENV==="development"&&"getCenterLeafHeaders",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getLeftLeafHeaders=H(()=>[t.getLeftFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),{key:process.env.NODE_ENV==="development"&&"getLeftLeafHeaders",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getRightLeafHeaders=H(()=>[t.getRightFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),{key:process.env.NODE_ENV==="development"&&"getRightLeafHeaders",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),t.getLeafHeaders=H(()=>[t.getLeftHeaderGroups(),t.getCenterHeaderGroups(),t.getRightHeaderGroups()],(e,n,o)=>{var i,r,l,a,d,c;return[...(i=(r=e[0])==null?void 0:r.headers)!=null?i:[],...(l=(a=n[0])==null?void 0:a.headers)!=null?l:[],...(d=(c=o[0])==null?void 0:c.headers)!=null?d:[]].map(u=>u.getLeafHeaders()).flat()},{key:process.env.NODE_ENV==="development"&&"getLeafHeaders",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}})}};function Qo(t,e,n,o){var i,r;let l=0;const a=function(h,p){p===void 0&&(p=1),l=Math.max(l,p),h.filter(m=>m.getIsVisible()).forEach(m=>{var g;(g=m.columns)!=null&&g.length&&a(m.columns,p+1)},0)};a(t);let d=[];const c=(h,p)=>{const m={depth:p,id:[o,`${p}`].filter(Boolean).join("_"),headers:[]},g=[];h.forEach(b=>{const y=[...g].reverse()[0],$=b.column.depth===m.depth;let k,v=!1;if($&&b.column.parent?k=b.column.parent:(k=b.column,v=!0),y&&(y==null?void 0:y.column)===k)y.subHeaders.push(b);else{const x=uc(n,k,{id:[o,p,k.id,b==null?void 0:b.id].filter(Boolean).join("_"),isPlaceholder:v,placeholderId:v?`${g.filter(B=>B.column===k).length}`:void 0,depth:p,index:g.length});x.subHeaders.push(b),g.push(x)}m.headers.push(b),b.headerGroup=m}),d.push(m),p>0&&c(g,p-1)},u=e.map((h,p)=>uc(n,h,{depth:l,index:p}));c(u,l-1),d.reverse();const f=h=>h.filter(m=>m.column.getIsVisible()).map(m=>{let g=0,b=0,y=[0];m.subHeaders&&m.subHeaders.length?(y=[],f(m.subHeaders).forEach(k=>{let{colSpan:v,rowSpan:x}=k;g+=v,y.push(x)})):g=1;const $=Math.min(...y);return b=b+$,m.colSpan=g,m.rowSpan=b,{colSpan:g,rowSpan:b}});return f((i=(r=d[0])==null?void 0:r.headers)!=null?i:[]),d}const ei={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Is=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),__={getDefaultColumnDef:()=>ei,getInitialState:t=>({columnSizing:{},columnSizingInfo:Is(),...t}),getDefaultOptions:t=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Ve("columnSizing",t),onColumnSizingInfoChange:Ve("columnSizingInfo",t)}),createColumn:(t,e)=>{t.getSize=()=>{var n,o,i;const r=e.getState().columnSizing[t.id];return Math.min(Math.max((n=t.columnDef.minSize)!=null?n:ei.minSize,(o=r??t.columnDef.size)!=null?o:ei.size),(i=t.columnDef.maxSize)!=null?i:ei.maxSize)},t.getStart=n=>{const o=n?n==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns(),i=o.findIndex(r=>r.id===t.id);if(i>0){const r=o[i-1];return r.getStart(n)+r.getSize()}return 0},t.resetSize=()=>{e.setColumnSizing(n=>{let{[t.id]:o,...i}=n;return i})},t.getCanResize=()=>{var n,o;return((n=t.columnDef.enableResizing)!=null?n:!0)&&((o=e.options.enableColumnResizing)!=null?o:!0)},t.getIsResizing=()=>e.getState().columnSizingInfo.isResizingColumn===t.id},createHeader:(t,e)=>{t.getSize=()=>{let n=0;const o=i=>{if(i.subHeaders.length)i.subHeaders.forEach(o);else{var r;n+=(r=i.column.getSize())!=null?r:0}};return o(t),n},t.getStart=()=>{if(t.index>0){const n=t.headerGroup.headers[t.index-1];return n.getStart()+n.getSize()}return 0},t.getResizeHandler=()=>{const n=e.getColumn(t.column.id),o=n==null?void 0:n.getCanResize();return i=>{if(!n||!o||(i.persist==null||i.persist(),Ts(i)&&i.touches&&i.touches.length>1))return;const r=t.getSize(),l=t?t.getLeafHeaders().map(g=>[g.column.id,g.column.getSize()]):[[n.id,n.getSize()]],a=Ts(i)?Math.round(i.touches[0].clientX):i.clientX,d={},c=(g,b)=>{typeof b=="number"&&(e.setColumnSizingInfo(y=>{var $,k;const v=e.options.columnResizeDirection==="rtl"?-1:1,x=(b-(($=y==null?void 0:y.startOffset)!=null?$:0))*v,B=Math.max(x/((k=y==null?void 0:y.startSize)!=null?k:0),-.999999);return y.columnSizingStart.forEach(M=>{let[N,F]=M;d[N]=Math.round(Math.max(F+F*B,0)*100)/100}),{...y,deltaOffset:x,deltaPercentage:B}}),(e.options.columnResizeMode==="onChange"||g==="end")&&e.setColumnSizing(y=>({...y,...d})))},u=g=>c("move",g),f=g=>{c("end",g),e.setColumnSizingInfo(b=>({...b,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h={moveHandler:g=>u(g.clientX),upHandler:g=>{document.removeEventListener("mousemove",h.moveHandler),document.removeEventListener("mouseup",h.upHandler),f(g.clientX)}},p={moveHandler:g=>(g.cancelable&&(g.preventDefault(),g.stopPropagation()),u(g.touches[0].clientX),!1),upHandler:g=>{var b;document.removeEventListener("touchmove",p.moveHandler),document.removeEventListener("touchend",p.upHandler),g.cancelable&&(g.preventDefault(),g.stopPropagation()),f((b=g.touches[0])==null?void 0:b.clientX)}},m=w_()?{passive:!1}:!1;Ts(i)?(document.addEventListener("touchmove",p.moveHandler,m),document.addEventListener("touchend",p.upHandler,m)):(document.addEventListener("mousemove",h.moveHandler,m),document.addEventListener("mouseup",h.upHandler,m)),e.setColumnSizingInfo(g=>({...g,startOffset:a,startSize:r,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:n.id}))}}},createTable:t=>{t.setColumnSizing=e=>t.options.onColumnSizingChange==null?void 0:t.options.onColumnSizingChange(e),t.setColumnSizingInfo=e=>t.options.onColumnSizingInfoChange==null?void 0:t.options.onColumnSizingInfoChange(e),t.resetColumnSizing=e=>{var n;t.setColumnSizing(e?{}:(n=t.initialState.columnSizing)!=null?n:{})},t.resetHeaderSizeInfo=e=>{var n;t.setColumnSizingInfo(e?Is():(n=t.initialState.columnSizingInfo)!=null?n:Is())},t.getTotalSize=()=>{var e,n;return(e=(n=t.getHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getLeftTotalSize=()=>{var e,n;return(e=(n=t.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getCenterTotalSize=()=>{var e,n;return(e=(n=t.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getRightTotalSize=()=>{var e,n;return(e=(n=t.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0}}};let ti=null;function w_(){if(typeof ti=="boolean")return ti;let t=!1;try{const e={get passive(){return t=!0,!1}},n=()=>{};window.addEventListener("test",n,e),window.removeEventListener("test",n)}catch{t=!1}return ti=t,ti}function Ts(t){return t.type==="touchstart"}const x_={getInitialState:t=>({expanded:{},...t}),getDefaultOptions:t=>({onExpandedChange:Ve("expanded",t),paginateExpandedRows:!0}),createTable:t=>{let e=!1,n=!1;t._autoResetExpanded=()=>{var o,i;if(!e){t._queue(()=>{e=!0});return}if((o=(i=t.options.autoResetAll)!=null?i:t.options.autoResetExpanded)!=null?o:!t.options.manualExpanding){if(n)return;n=!0,t._queue(()=>{t.resetExpanded(),n=!1})}},t.setExpanded=o=>t.options.onExpandedChange==null?void 0:t.options.onExpandedChange(o),t.toggleAllRowsExpanded=o=>{o??!t.getIsAllRowsExpanded()?t.setExpanded(!0):t.setExpanded({})},t.resetExpanded=o=>{var i,r;t.setExpanded(o?{}:(i=(r=t.initialState)==null?void 0:r.expanded)!=null?i:{})},t.getCanSomeRowsExpand=()=>t.getPrePaginationRowModel().flatRows.some(o=>o.getCanExpand()),t.getToggleAllRowsExpandedHandler=()=>o=>{o.persist==null||o.persist(),t.toggleAllRowsExpanded()},t.getIsSomeRowsExpanded=()=>{const o=t.getState().expanded;return o===!0||Object.values(o).some(Boolean)},t.getIsAllRowsExpanded=()=>{const o=t.getState().expanded;return typeof o=="boolean"?o===!0:!(!Object.keys(o).length||t.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},t.getExpandedDepth=()=>{let o=0;return(t.getState().expanded===!0?Object.keys(t.getRowModel().rowsById):Object.keys(t.getState().expanded)).forEach(r=>{const l=r.split(".");o=Math.max(o,l.length)}),o},t.getPreExpandedRowModel=()=>t.getSortedRowModel(),t.getExpandedRowModel=()=>(!t._getExpandedRowModel&&t.options.getExpandedRowModel&&(t._getExpandedRowModel=t.options.getExpandedRowModel(t)),t.options.manualExpanding||!t._getExpandedRowModel?t.getPreExpandedRowModel():t._getExpandedRowModel())},createRow:(t,e)=>{t.toggleExpanded=n=>{e.setExpanded(o=>{var i;const r=o===!0?!0:!!(o!=null&&o[t.id]);let l={};if(o===!0?Object.keys(e.getRowModel().rowsById).forEach(a=>{l[a]=!0}):l=o,n=(i=n)!=null?i:!r,!r&&n)return{...l,[t.id]:!0};if(r&&!n){const{[t.id]:a,...d}=l;return d}return o})},t.getIsExpanded=()=>{var n;const o=e.getState().expanded;return!!((n=e.options.getIsRowExpanded==null?void 0:e.options.getIsRowExpanded(t))!=null?n:o===!0||o!=null&&o[t.id])},t.getCanExpand=()=>{var n,o,i;return(n=e.options.getRowCanExpand==null?void 0:e.options.getRowCanExpand(t))!=null?n:((o=e.options.enableExpanding)!=null?o:!0)&&!!((i=t.subRows)!=null&&i.length)},t.getIsAllParentsExpanded=()=>{let n=!0,o=t;for(;n&&o.parentId;)o=e.getRow(o.parentId,!0),n=o.getIsExpanded();return n},t.getToggleExpandedHandler=()=>{const n=t.getCanExpand();return()=>{n&&t.toggleExpanded()}}}},fc=(t,e,n)=>{var o;const i=n.toLowerCase();return!!(!((o=t.getValue(e))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(i))};fc.autoRemove=t=>Le(t);const hc=(t,e,n)=>{var o;return!!(!((o=t.getValue(e))==null||(o=o.toString())==null)&&o.includes(n))};hc.autoRemove=t=>Le(t);const pc=(t,e,n)=>{var o;return((o=t.getValue(e))==null||(o=o.toString())==null?void 0:o.toLowerCase())===(n==null?void 0:n.toLowerCase())};pc.autoRemove=t=>Le(t);const mc=(t,e,n)=>{var o;return(o=t.getValue(e))==null?void 0:o.includes(n)};mc.autoRemove=t=>Le(t)||!(t!=null&&t.length);const gc=(t,e,n)=>!n.some(o=>{var i;return!((i=t.getValue(e))!=null&&i.includes(o))});gc.autoRemove=t=>Le(t)||!(t!=null&&t.length);const bc=(t,e,n)=>n.some(o=>{var i;return(i=t.getValue(e))==null?void 0:i.includes(o)});bc.autoRemove=t=>Le(t)||!(t!=null&&t.length);const yc=(t,e,n)=>t.getValue(e)===n;yc.autoRemove=t=>Le(t);const $c=(t,e,n)=>t.getValue(e)==n;$c.autoRemove=t=>Le(t);const Ls=(t,e,n)=>{let[o,i]=n;const r=t.getValue(e);return r>=o&&r<=i};Ls.resolveFilterValue=t=>{let[e,n]=t,o=typeof e!="number"?parseFloat(e):e,i=typeof n!="number"?parseFloat(n):n,r=e===null||Number.isNaN(o)?-1/0:o,l=n===null||Number.isNaN(i)?1/0:i;if(r>l){const a=r;r=l,l=a}return[r,l]},Ls.autoRemove=t=>Le(t)||Le(t[0])&&Le(t[1]);const lt={includesString:fc,includesStringSensitive:hc,equalsString:pc,arrIncludes:mc,arrIncludesAll:gc,arrIncludesSome:bc,equals:yc,weakEquals:$c,inNumberRange:Ls};function Le(t){return t==null||t===""}const C_={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:t=>({columnFilters:[],globalFilter:void 0,...t}),getDefaultOptions:t=>({onColumnFiltersChange:Ve("columnFilters",t),onGlobalFilterChange:Ve("globalFilter",t),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:e=>{var n;const o=(n=t.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[e.id])==null?void 0:n.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(t,e)=>{t.getAutoFilterFn=()=>{const n=e.getCoreRowModel().flatRows[0],o=n==null?void 0:n.getValue(t.id);return typeof o=="string"?lt.includesString:typeof o=="number"?lt.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?lt.equals:Array.isArray(o)?lt.arrIncludes:lt.weakEquals},t.getFilterFn=()=>{var n,o;return Jo(t.columnDef.filterFn)?t.columnDef.filterFn:t.columnDef.filterFn==="auto"?t.getAutoFilterFn():(n=(o=e.options.filterFns)==null?void 0:o[t.columnDef.filterFn])!=null?n:lt[t.columnDef.filterFn]},t.getCanFilter=()=>{var n,o,i;return((n=t.columnDef.enableColumnFilter)!=null?n:!0)&&((o=e.options.enableColumnFilters)!=null?o:!0)&&((i=e.options.enableFilters)!=null?i:!0)&&!!t.accessorFn},t.getCanGlobalFilter=()=>{var n,o,i,r;return((n=t.columnDef.enableGlobalFilter)!=null?n:!0)&&((o=e.options.enableGlobalFilter)!=null?o:!0)&&((i=e.options.enableFilters)!=null?i:!0)&&((r=e.options.getColumnCanGlobalFilter==null?void 0:e.options.getColumnCanGlobalFilter(t))!=null?r:!0)&&!!t.accessorFn},t.getIsFiltered=()=>t.getFilterIndex()>-1,t.getFilterValue=()=>{var n;return(n=e.getState().columnFilters)==null||(n=n.find(o=>o.id===t.id))==null?void 0:n.value},t.getFilterIndex=()=>{var n,o;return(n=(o=e.getState().columnFilters)==null?void 0:o.findIndex(i=>i.id===t.id))!=null?n:-1},t.setFilterValue=n=>{e.setColumnFilters(o=>{const i=t.getFilterFn(),r=o==null?void 0:o.find(u=>u.id===t.id),l=$t(n,r?r.value:void 0);if(_c(i,l,t)){var a;return(a=o==null?void 0:o.filter(u=>u.id!==t.id))!=null?a:[]}const d={id:t.id,value:l};if(r){var c;return(c=o==null?void 0:o.map(u=>u.id===t.id?d:u))!=null?c:[]}return o!=null&&o.length?[...o,d]:[d]})},t._getFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,t.id),t.getFacetedRowModel=()=>t._getFacetedRowModel?t._getFacetedRowModel():e.getPreFilteredRowModel(),t._getFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,t.id),t.getFacetedUniqueValues=()=>t._getFacetedUniqueValues?t._getFacetedUniqueValues():new Map,t._getFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,t.id),t.getFacetedMinMaxValues=()=>{if(t._getFacetedMinMaxValues)return t._getFacetedMinMaxValues()}},createRow:(t,e)=>{t.columnFilters={},t.columnFiltersMeta={}},createTable:t=>{t.getGlobalAutoFilterFn=()=>lt.includesString,t.getGlobalFilterFn=()=>{var e,n;const{globalFilterFn:o}=t.options;return Jo(o)?o:o==="auto"?t.getGlobalAutoFilterFn():(e=(n=t.options.filterFns)==null?void 0:n[o])!=null?e:lt[o]},t.setColumnFilters=e=>{const n=t.getAllLeafColumns(),o=i=>{var r;return(r=$t(e,i))==null?void 0:r.filter(l=>{const a=n.find(d=>d.id===l.id);if(a){const d=a.getFilterFn();if(_c(d,l.value,a))return!1}return!0})};t.options.onColumnFiltersChange==null||t.options.onColumnFiltersChange(o)},t.setGlobalFilter=e=>{t.options.onGlobalFilterChange==null||t.options.onGlobalFilterChange(e)},t.resetGlobalFilter=e=>{t.setGlobalFilter(e?void 0:t.initialState.globalFilter)},t.resetColumnFilters=e=>{var n,o;t.setColumnFilters(e?[]:(n=(o=t.initialState)==null?void 0:o.columnFilters)!=null?n:[])},t.getPreFilteredRowModel=()=>t.getCoreRowModel(),t.getFilteredRowModel=()=>(!t._getFilteredRowModel&&t.options.getFilteredRowModel&&(t._getFilteredRowModel=t.options.getFilteredRowModel(t)),t.options.manualFiltering||!t._getFilteredRowModel?t.getPreFilteredRowModel():t._getFilteredRowModel()),t._getGlobalFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,"__global__"),t.getGlobalFacetedRowModel=()=>t.options.manualFiltering||!t._getGlobalFacetedRowModel?t.getPreFilteredRowModel():t._getGlobalFacetedRowModel(),t._getGlobalFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,"__global__"),t.getGlobalFacetedUniqueValues=()=>t._getGlobalFacetedUniqueValues?t._getGlobalFacetedUniqueValues():new Map,t._getGlobalFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,"__global__"),t.getGlobalFacetedMinMaxValues=()=>{if(t._getGlobalFacetedMinMaxValues)return t._getGlobalFacetedMinMaxValues()}}};function _c(t,e,n){return(t&&t.autoRemove?t.autoRemove(e,n):!1)||typeof e>"u"||typeof e=="string"&&!e}const zs={sum:(t,e,n)=>n.reduce((o,i)=>{const r=i.getValue(t);return o+(typeof r=="number"?r:0)},0),min:(t,e,n)=>{let o;return n.forEach(i=>{const r=i.getValue(t);r!=null&&(o>r||o===void 0&&r>=r)&&(o=r)}),o},max:(t,e,n)=>{let o;return n.forEach(i=>{const r=i.getValue(t);r!=null&&(o<r||o===void 0&&r>=r)&&(o=r)}),o},extent:(t,e,n)=>{let o,i;return n.forEach(r=>{const l=r.getValue(t);l!=null&&(o===void 0?l>=l&&(o=i=l):(o>l&&(o=l),i<l&&(i=l)))}),[o,i]},mean:(t,e)=>{let n=0,o=0;if(e.forEach(i=>{let r=i.getValue(t);r!=null&&(r=+r)>=r&&(++n,o+=r)}),n)return o/n},median:(t,e)=>{if(!e.length)return;const n=e.map(r=>r.getValue(t));if(!g_(n))return;if(n.length===1)return n[0];const o=Math.floor(n.length/2),i=n.sort((r,l)=>r-l);return n.length%2!==0?i[o]:(i[o-1]+i[o])/2},unique:(t,e)=>Array.from(new Set(e.map(n=>n.getValue(t))).values()),uniqueCount:(t,e)=>new Set(e.map(n=>n.getValue(t))).size,count:(t,e)=>e.length},k_={getDefaultColumnDef:()=>({aggregatedCell:t=>{var e,n;return(e=(n=t.getValue())==null||n.toString==null?void 0:n.toString())!=null?e:null},aggregationFn:"auto"}),getInitialState:t=>({grouping:[],...t}),getDefaultOptions:t=>({onGroupingChange:Ve("grouping",t),groupedColumnMode:"reorder"}),createColumn:(t,e)=>{t.toggleGrouping=()=>{e.setGrouping(n=>n!=null&&n.includes(t.id)?n.filter(o=>o!==t.id):[...n??[],t.id])},t.getCanGroup=()=>{var n,o,i,r;return(n=(o=(i=(r=t.columnDef.enableGrouping)!=null?r:!0)!=null?i:e.options.enableGrouping)!=null?o:!0)!=null?n:!!t.accessorFn},t.getIsGrouped=()=>{var n;return(n=e.getState().grouping)==null?void 0:n.includes(t.id)},t.getGroupedIndex=()=>{var n;return(n=e.getState().grouping)==null?void 0:n.indexOf(t.id)},t.getToggleGroupingHandler=()=>{const n=t.getCanGroup();return()=>{n&&t.toggleGrouping()}},t.getAutoAggregationFn=()=>{const n=e.getCoreRowModel().flatRows[0],o=n==null?void 0:n.getValue(t.id);if(typeof o=="number")return zs.sum;if(Object.prototype.toString.call(o)==="[object Date]")return zs.extent},t.getAggregationFn=()=>{var n,o;if(!t)throw new Error;return Jo(t.columnDef.aggregationFn)?t.columnDef.aggregationFn:t.columnDef.aggregationFn==="auto"?t.getAutoAggregationFn():(n=(o=e.options.aggregationFns)==null?void 0:o[t.columnDef.aggregationFn])!=null?n:zs[t.columnDef.aggregationFn]}},createTable:t=>{t.setGrouping=e=>t.options.onGroupingChange==null?void 0:t.options.onGroupingChange(e),t.resetGrouping=e=>{var n,o;t.setGrouping(e?[]:(n=(o=t.initialState)==null?void 0:o.grouping)!=null?n:[])},t.getPreGroupedRowModel=()=>t.getFilteredRowModel(),t.getGroupedRowModel=()=>(!t._getGroupedRowModel&&t.options.getGroupedRowModel&&(t._getGroupedRowModel=t.options.getGroupedRowModel(t)),t.options.manualGrouping||!t._getGroupedRowModel?t.getPreGroupedRowModel():t._getGroupedRowModel())},createRow:(t,e)=>{t.getIsGrouped=()=>!!t.groupingColumnId,t.getGroupingValue=n=>{if(t._groupingValuesCache.hasOwnProperty(n))return t._groupingValuesCache[n];const o=e.getColumn(n);return o!=null&&o.columnDef.getGroupingValue?(t._groupingValuesCache[n]=o.columnDef.getGroupingValue(t.original),t._groupingValuesCache[n]):t.getValue(n)},t._groupingValuesCache={}},createCell:(t,e,n,o)=>{t.getIsGrouped=()=>e.getIsGrouped()&&e.id===n.groupingColumnId,t.getIsPlaceholder=()=>!t.getIsGrouped()&&e.getIsGrouped(),t.getIsAggregated=()=>{var i;return!t.getIsGrouped()&&!t.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function S_(t,e,n){if(!(e!=null&&e.length)||!n)return t;const o=t.filter(r=>!e.includes(r.id));return n==="remove"?o:[...e.map(r=>t.find(l=>l.id===r)).filter(Boolean),...o]}const v_={getInitialState:t=>({columnOrder:[],...t}),getDefaultOptions:t=>({onColumnOrderChange:Ve("columnOrder",t)}),createTable:t=>{t.setColumnOrder=e=>t.options.onColumnOrderChange==null?void 0:t.options.onColumnOrderChange(e),t.resetColumnOrder=e=>{var n;t.setColumnOrder(e?[]:(n=t.initialState.columnOrder)!=null?n:[])},t._getOrderColumnsFn=H(()=>[t.getState().columnOrder,t.getState().grouping,t.options.groupedColumnMode],(e,n,o)=>i=>{let r=[];if(!(e!=null&&e.length))r=i;else{const l=[...e],a=[...i];for(;a.length&&l.length;){const d=l.shift(),c=a.findIndex(u=>u.id===d);c>-1&&r.push(a.splice(c,1)[0])}r=[...r,...a]}return S_(r,n,o)},{key:process.env.NODE_ENV==="development"&&"getOrderColumnsFn"})}},Hs=0,js=10,Ws=()=>({pageIndex:Hs,pageSize:js}),D_={getInitialState:t=>({...t,pagination:{...Ws(),...t==null?void 0:t.pagination}}),getDefaultOptions:t=>({onPaginationChange:Ve("pagination",t)}),createTable:t=>{let e=!1,n=!1;t._autoResetPageIndex=()=>{var o,i;if(!e){t._queue(()=>{e=!0});return}if((o=(i=t.options.autoResetAll)!=null?i:t.options.autoResetPageIndex)!=null?o:!t.options.manualPagination){if(n)return;n=!0,t._queue(()=>{t.resetPageIndex(),n=!1})}},t.setPagination=o=>{const i=r=>$t(o,r);return t.options.onPaginationChange==null?void 0:t.options.onPaginationChange(i)},t.resetPagination=o=>{var i;t.setPagination(o?Ws():(i=t.initialState.pagination)!=null?i:Ws())},t.setPageIndex=o=>{t.setPagination(i=>{let r=$t(o,i.pageIndex);const l=typeof t.options.pageCount>"u"||t.options.pageCount===-1?Number.MAX_SAFE_INTEGER:t.options.pageCount-1;return r=Math.max(0,Math.min(r,l)),{...i,pageIndex:r}})},t.resetPageIndex=o=>{var i,r;t.setPageIndex(o?Hs:(i=(r=t.initialState)==null||(r=r.pagination)==null?void 0:r.pageIndex)!=null?i:Hs)},t.resetPageSize=o=>{var i,r;t.setPageSize(o?js:(i=(r=t.initialState)==null||(r=r.pagination)==null?void 0:r.pageSize)!=null?i:js)},t.setPageSize=o=>{t.setPagination(i=>{const r=Math.max(1,$t(o,i.pageSize)),l=i.pageSize*i.pageIndex,a=Math.floor(l/r);return{...i,pageIndex:a,pageSize:r}})},t.setPageCount=o=>t.setPagination(i=>{var r;let l=$t(o,(r=t.options.pageCount)!=null?r:-1);return typeof l=="number"&&(l=Math.max(-1,l)),{...i,pageCount:l}}),t.getPageOptions=H(()=>[t.getPageCount()],o=>{let i=[];return o&&o>0&&(i=[...new Array(o)].fill(null).map((r,l)=>l)),i},{key:process.env.NODE_ENV==="development"&&"getPageOptions",debug:()=>{var o;return(o=t.options.debugAll)!=null?o:t.options.debugTable}}),t.getCanPreviousPage=()=>t.getState().pagination.pageIndex>0,t.getCanNextPage=()=>{const{pageIndex:o}=t.getState().pagination,i=t.getPageCount();return i===-1?!0:i===0?!1:o<i-1},t.previousPage=()=>t.setPageIndex(o=>o-1),t.nextPage=()=>t.setPageIndex(o=>o+1),t.getPrePaginationRowModel=()=>t.getExpandedRowModel(),t.getPaginationRowModel=()=>(!t._getPaginationRowModel&&t.options.getPaginationRowModel&&(t._getPaginationRowModel=t.options.getPaginationRowModel(t)),t.options.manualPagination||!t._getPaginationRowModel?t.getPrePaginationRowModel():t._getPaginationRowModel()),t.getPageCount=()=>{var o;return(o=t.options.pageCount)!=null?o:Math.ceil(t.getPrePaginationRowModel().rows.length/t.getState().pagination.pageSize)}}},Ys=()=>({left:[],right:[]}),Us=()=>({top:[],bottom:[]}),E_={getInitialState:t=>({columnPinning:Ys(),rowPinning:Us(),...t}),getDefaultOptions:t=>({onColumnPinningChange:Ve("columnPinning",t),onRowPinningChange:Ve("rowPinning",t)}),createColumn:(t,e)=>{t.pin=n=>{const o=t.getLeafColumns().map(i=>i.id).filter(Boolean);e.setColumnPinning(i=>{var r,l;if(n==="right"){var a,d;return{left:((a=i==null?void 0:i.left)!=null?a:[]).filter(f=>!(o!=null&&o.includes(f))),right:[...((d=i==null?void 0:i.right)!=null?d:[]).filter(f=>!(o!=null&&o.includes(f))),...o]}}if(n==="left"){var c,u;return{left:[...((c=i==null?void 0:i.left)!=null?c:[]).filter(f=>!(o!=null&&o.includes(f))),...o],right:((u=i==null?void 0:i.right)!=null?u:[]).filter(f=>!(o!=null&&o.includes(f)))}}return{left:((r=i==null?void 0:i.left)!=null?r:[]).filter(f=>!(o!=null&&o.includes(f))),right:((l=i==null?void 0:i.right)!=null?l:[]).filter(f=>!(o!=null&&o.includes(f)))}})},t.getCanPin=()=>t.getLeafColumns().some(o=>{var i,r,l;return((i=o.columnDef.enablePinning)!=null?i:!0)&&((r=(l=e.options.enableColumnPinning)!=null?l:e.options.enablePinning)!=null?r:!0)}),t.getIsPinned=()=>{const n=t.getLeafColumns().map(a=>a.id),{left:o,right:i}=e.getState().columnPinning,r=n.some(a=>o==null?void 0:o.includes(a)),l=n.some(a=>i==null?void 0:i.includes(a));return r?"left":l?"right":!1},t.getPinnedIndex=()=>{var n,o;const i=t.getIsPinned();return i?(n=(o=e.getState().columnPinning)==null||(o=o[i])==null?void 0:o.indexOf(t.id))!=null?n:-1:0}},createRow:(t,e)=>{t.pin=(n,o,i)=>{const r=o?t.getLeafRows().map(d=>{let{id:c}=d;return c}):[],l=i?t.getParentRows().map(d=>{let{id:c}=d;return c}):[],a=new Set([...l,t.id,...r]);e.setRowPinning(d=>{var c,u;if(n==="bottom"){var f,h;return{top:((f=d==null?void 0:d.top)!=null?f:[]).filter(g=>!(a!=null&&a.has(g))),bottom:[...((h=d==null?void 0:d.bottom)!=null?h:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)]}}if(n==="top"){var p,m;return{top:[...((p=d==null?void 0:d.top)!=null?p:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)],bottom:((m=d==null?void 0:d.bottom)!=null?m:[]).filter(g=>!(a!=null&&a.has(g)))}}return{top:((c=d==null?void 0:d.top)!=null?c:[]).filter(g=>!(a!=null&&a.has(g))),bottom:((u=d==null?void 0:d.bottom)!=null?u:[]).filter(g=>!(a!=null&&a.has(g)))}})},t.getCanPin=()=>{var n;const{enableRowPinning:o,enablePinning:i}=e.options;return typeof o=="function"?o(t):(n=o??i)!=null?n:!0},t.getIsPinned=()=>{const n=[t.id],{top:o,bottom:i}=e.getState().rowPinning,r=n.some(a=>o==null?void 0:o.includes(a)),l=n.some(a=>i==null?void 0:i.includes(a));return r?"top":l?"bottom":!1},t.getPinnedIndex=()=>{var n,o;const i=t.getIsPinned();if(!i)return-1;const r=(n=e._getPinnedRows(i))==null?void 0:n.map(l=>{let{id:a}=l;return a});return(o=r==null?void 0:r.indexOf(t.id))!=null?o:-1},t.getCenterVisibleCells=H(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,o,i)=>{const r=[...o??[],...i??[]];return n.filter(l=>!r.includes(l.column.id))},{key:process.env.NODE_ENV==="development"&&"row.getCenterVisibleCells",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugRows}}),t.getLeftVisibleCells=H(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left,,],(n,o)=>(o??[]).map(r=>n.find(l=>l.column.id===r)).filter(Boolean).map(r=>({...r,position:"left"})),{key:process.env.NODE_ENV==="development"&&"row.getLeftVisibleCells",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugRows}}),t.getRightVisibleCells=H(()=>[t._getAllVisibleCells(),e.getState().columnPinning.right],(n,o)=>(o??[]).map(r=>n.find(l=>l.column.id===r)).filter(Boolean).map(r=>({...r,position:"right"})),{key:process.env.NODE_ENV==="development"&&"row.getRightVisibleCells",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugRows}})},createTable:t=>{t.setColumnPinning=e=>t.options.onColumnPinningChange==null?void 0:t.options.onColumnPinningChange(e),t.resetColumnPinning=e=>{var n,o;return t.setColumnPinning(e?Ys():(n=(o=t.initialState)==null?void 0:o.columnPinning)!=null?n:Ys())},t.getIsSomeColumnsPinned=e=>{var n;const o=t.getState().columnPinning;if(!e){var i,r;return!!((i=o.left)!=null&&i.length||(r=o.right)!=null&&r.length)}return!!((n=o[e])!=null&&n.length)},t.getLeftLeafColumns=H(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left],(e,n)=>(n??[]).map(o=>e.find(i=>i.id===o)).filter(Boolean),{key:process.env.NODE_ENV==="development"&&"getLeftLeafColumns",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugColumns}}),t.getRightLeafColumns=H(()=>[t.getAllLeafColumns(),t.getState().columnPinning.right],(e,n)=>(n??[]).map(o=>e.find(i=>i.id===o)).filter(Boolean),{key:process.env.NODE_ENV==="development"&&"getRightLeafColumns",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugColumns}}),t.getCenterLeafColumns=H(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o)=>{const i=[...n??[],...o??[]];return e.filter(r=>!i.includes(r.id))},{key:process.env.NODE_ENV==="development"&&"getCenterLeafColumns",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugColumns}}),t.setRowPinning=e=>t.options.onRowPinningChange==null?void 0:t.options.onRowPinningChange(e),t.resetRowPinning=e=>{var n,o;return t.setRowPinning(e?Us():(n=(o=t.initialState)==null?void 0:o.rowPinning)!=null?n:Us())},t.getIsSomeRowsPinned=e=>{var n;const o=t.getState().rowPinning;if(!e){var i,r;return!!((i=o.top)!=null&&i.length||(r=o.bottom)!=null&&r.length)}return!!((n=o[e])!=null&&n.length)},t._getPinnedRows=e=>H(()=>[t.getRowModel().rows,t.getState().rowPinning[e]],(n,o)=>{var i;return((i=t.options.keepPinnedRows)==null||i?(o??[]).map(l=>{const a=t.getRow(l,!0);return a.getIsAllParentsExpanded()?a:null}):(o??[]).map(l=>n.find(a=>a.id===l))).filter(Boolean).map(l=>({...l,position:e}))},{key:process.env.NODE_ENV==="development"&&`row.get${e==="top"?"Top":"Bottom"}Rows`,debug:()=>{var n;return(n=t.options.debugAll)!=null?n:t.options.debugRows}})(),t.getTopRows=()=>t._getPinnedRows("top"),t.getBottomRows=()=>t._getPinnedRows("bottom"),t.getCenterRows=H(()=>[t.getRowModel().rows,t.getState().rowPinning.top,t.getState().rowPinning.bottom],(e,n,o)=>{const i=new Set([...n??[],...o??[]]);return e.filter(r=>!i.has(r.id))},{key:process.env.NODE_ENV==="development"&&"row.getCenterRows",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugRows}})}},M_={getInitialState:t=>({rowSelection:{},...t}),getDefaultOptions:t=>({onRowSelectionChange:Ve("rowSelection",t),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:t=>{t.setRowSelection=e=>t.options.onRowSelectionChange==null?void 0:t.options.onRowSelectionChange(e),t.resetRowSelection=e=>{var n;return t.setRowSelection(e?{}:(n=t.initialState.rowSelection)!=null?n:{})},t.toggleAllRowsSelected=e=>{t.setRowSelection(n=>{e=typeof e<"u"?e:!t.getIsAllRowsSelected();const o={...n},i=t.getPreGroupedRowModel().flatRows;return e?i.forEach(r=>{r.getCanSelect()&&(o[r.id]=!0)}):i.forEach(r=>{delete o[r.id]}),o})},t.toggleAllPageRowsSelected=e=>t.setRowSelection(n=>{const o=typeof e<"u"?e:!t.getIsAllPageRowsSelected(),i={...n};return t.getRowModel().rows.forEach(r=>{Gs(i,r.id,o,!0,t)}),i}),t.getPreSelectedRowModel=()=>t.getCoreRowModel(),t.getSelectedRowModel=H(()=>[t.getState().rowSelection,t.getCoreRowModel()],(e,n)=>Object.keys(e).length?qs(t,n):{rows:[],flatRows:[],rowsById:{}},{key:process.env.NODE_ENV==="development"&&"getSelectedRowModel",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable}}),t.getFilteredSelectedRowModel=H(()=>[t.getState().rowSelection,t.getFilteredRowModel()],(e,n)=>Object.keys(e).length?qs(t,n):{rows:[],flatRows:[],rowsById:{}},{key:process.env.NODE_ENV==="production"&&"getFilteredSelectedRowModel",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable}}),t.getGroupedSelectedRowModel=H(()=>[t.getState().rowSelection,t.getSortedRowModel()],(e,n)=>Object.keys(e).length?qs(t,n):{rows:[],flatRows:[],rowsById:{}},{key:process.env.NODE_ENV==="production"&&"getGroupedSelectedRowModel",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable}}),t.getIsAllRowsSelected=()=>{const e=t.getFilteredRowModel().flatRows,{rowSelection:n}=t.getState();let o=!!(e.length&&Object.keys(n).length);return o&&e.some(i=>i.getCanSelect()&&!n[i.id])&&(o=!1),o},t.getIsAllPageRowsSelected=()=>{const e=t.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=t.getState();let o=!!e.length;return o&&e.some(i=>!n[i.id])&&(o=!1),o},t.getIsSomeRowsSelected=()=>{var e;const n=Object.keys((e=t.getState().rowSelection)!=null?e:{}).length;return n>0&&n<t.getFilteredRowModel().flatRows.length},t.getIsSomePageRowsSelected=()=>{const e=t.getPaginationRowModel().flatRows;return t.getIsAllPageRowsSelected()?!1:e.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},t.getToggleAllRowsSelectedHandler=()=>e=>{t.toggleAllRowsSelected(e.target.checked)},t.getToggleAllPageRowsSelectedHandler=()=>e=>{t.toggleAllPageRowsSelected(e.target.checked)}},createRow:(t,e)=>{t.toggleSelected=(n,o)=>{const i=t.getIsSelected();e.setRowSelection(r=>{var l;if(n=typeof n<"u"?n:!i,t.getCanSelect()&&i===n)return r;const a={...r};return Gs(a,t.id,n,(l=o==null?void 0:o.selectChildren)!=null?l:!0,e),a})},t.getIsSelected=()=>{const{rowSelection:n}=e.getState();return Xs(t,n)},t.getIsSomeSelected=()=>{const{rowSelection:n}=e.getState();return Ks(t,n)==="some"},t.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=e.getState();return Ks(t,n)==="all"},t.getCanSelect=()=>{var n;return typeof e.options.enableRowSelection=="function"?e.options.enableRowSelection(t):(n=e.options.enableRowSelection)!=null?n:!0},t.getCanSelectSubRows=()=>{var n;return typeof e.options.enableSubRowSelection=="function"?e.options.enableSubRowSelection(t):(n=e.options.enableSubRowSelection)!=null?n:!0},t.getCanMultiSelect=()=>{var n;return typeof e.options.enableMultiRowSelection=="function"?e.options.enableMultiRowSelection(t):(n=e.options.enableMultiRowSelection)!=null?n:!0},t.getToggleSelectedHandler=()=>{const n=t.getCanSelect();return o=>{var i;n&&t.toggleSelected((i=o.target)==null?void 0:i.checked)}}}},Gs=(t,e,n,o,i)=>{var r;const l=i.getRow(e,!0);n?(l.getCanMultiSelect()||Object.keys(t).forEach(a=>delete t[a]),l.getCanSelect()&&(t[e]=!0)):delete t[e],o&&(r=l.subRows)!=null&&r.length&&l.getCanSelectSubRows()&&l.subRows.forEach(a=>Gs(t,a.id,n,o,i))};function qs(t,e){const n=t.getState().rowSelection,o=[],i={},r=function(l,a){return l.map(d=>{var c;const u=Xs(d,n);if(u&&(o.push(d),i[d.id]=d),(c=d.subRows)!=null&&c.length&&(d={...d,subRows:r(d.subRows)}),u)return d}).filter(Boolean)};return{rows:r(e.rows),flatRows:o,rowsById:i}}function Xs(t,e){var n;return(n=e[t.id])!=null?n:!1}function Ks(t,e,n){var o;if(!((o=t.subRows)!=null&&o.length))return!1;let i=!0,r=!1;return t.subRows.forEach(l=>{if(!(r&&!i)&&(l.getCanSelect()&&(Xs(l,e)?r=!0:i=!1),l.subRows&&l.subRows.length)){const a=Ks(l,e);a==="all"?r=!0:(a==="some"&&(r=!0),i=!1)}}),i?"all":r?"some":!1}const Zs=/([0-9]+)/gm,V_=(t,e,n)=>wc(_t(t.getValue(n)).toLowerCase(),_t(e.getValue(n)).toLowerCase()),B_=(t,e,n)=>wc(_t(t.getValue(n)),_t(e.getValue(n))),P_=(t,e,n)=>Js(_t(t.getValue(n)).toLowerCase(),_t(e.getValue(n)).toLowerCase()),N_=(t,e,n)=>Js(_t(t.getValue(n)),_t(e.getValue(n))),F_=(t,e,n)=>{const o=t.getValue(n),i=e.getValue(n);return o>i?1:o<i?-1:0},R_=(t,e,n)=>Js(t.getValue(n),e.getValue(n));function Js(t,e){return t===e?0:t>e?1:-1}function _t(t){return typeof t=="number"?isNaN(t)||t===1/0||t===-1/0?"":String(t):typeof t=="string"?t:""}function wc(t,e){const n=t.split(Zs).filter(Boolean),o=e.split(Zs).filter(Boolean);for(;n.length&&o.length;){const i=n.shift(),r=o.shift(),l=parseInt(i,10),a=parseInt(r,10),d=[l,a].sort();if(isNaN(d[0])){if(i>r)return 1;if(r>i)return-1;continue}if(isNaN(d[1]))return isNaN(l)?-1:1;if(l>a)return 1;if(a>l)return-1}return n.length-o.length}const jn={alphanumeric:V_,alphanumericCaseSensitive:B_,text:P_,textCaseSensitive:N_,datetime:F_,basic:R_},xc=[$_,{getInitialState:t=>({columnVisibility:{},...t}),getDefaultOptions:t=>({onColumnVisibilityChange:Ve("columnVisibility",t)}),createColumn:(t,e)=>{t.toggleVisibility=n=>{t.getCanHide()&&e.setColumnVisibility(o=>({...o,[t.id]:n??!t.getIsVisible()}))},t.getIsVisible=()=>{var n,o;return(n=(o=e.getState().columnVisibility)==null?void 0:o[t.id])!=null?n:!0},t.getCanHide=()=>{var n,o;return((n=t.columnDef.enableHiding)!=null?n:!0)&&((o=e.options.enableHiding)!=null?o:!0)},t.getToggleVisibilityHandler=()=>n=>{t.toggleVisibility==null||t.toggleVisibility(n.target.checked)}},createRow:(t,e)=>{t._getAllVisibleCells=H(()=>[t.getAllCells(),e.getState().columnVisibility],n=>n.filter(o=>o.column.getIsVisible()),{key:process.env.NODE_ENV==="production"&&"row._getAllVisibleCells",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugRows}}),t.getVisibleCells=H(()=>[t.getLeftVisibleCells(),t.getCenterVisibleCells(),t.getRightVisibleCells()],(n,o,i)=>[...n,...o,...i],{key:process.env.NODE_ENV==="development"&&"row.getVisibleCells",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugRows}})},createTable:t=>{const e=(n,o)=>H(()=>[o(),o().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(r=>r.getIsVisible==null?void 0:r.getIsVisible()),{key:n,debug:()=>{var i;return(i=t.options.debugAll)!=null?i:t.options.debugColumns}});t.getVisibleFlatColumns=e("getVisibleFlatColumns",()=>t.getAllFlatColumns()),t.getVisibleLeafColumns=e("getVisibleLeafColumns",()=>t.getAllLeafColumns()),t.getLeftVisibleLeafColumns=e("getLeftVisibleLeafColumns",()=>t.getLeftLeafColumns()),t.getRightVisibleLeafColumns=e("getRightVisibleLeafColumns",()=>t.getRightLeafColumns()),t.getCenterVisibleLeafColumns=e("getCenterVisibleLeafColumns",()=>t.getCenterLeafColumns()),t.setColumnVisibility=n=>t.options.onColumnVisibilityChange==null?void 0:t.options.onColumnVisibilityChange(n),t.resetColumnVisibility=n=>{var o;t.setColumnVisibility(n?{}:(o=t.initialState.columnVisibility)!=null?o:{})},t.toggleAllColumnsVisible=n=>{var o;n=(o=n)!=null?o:!t.getIsAllColumnsVisible(),t.setColumnVisibility(t.getAllLeafColumns().reduce((i,r)=>({...i,[r.id]:n||!(r.getCanHide!=null&&r.getCanHide())}),{}))},t.getIsAllColumnsVisible=()=>!t.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),t.getIsSomeColumnsVisible=()=>t.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),t.getToggleAllColumnsVisibilityHandler=()=>n=>{var o;t.toggleAllColumnsVisible((o=n.target)==null?void 0:o.checked)}}},v_,E_,C_,{getInitialState:t=>({sorting:[],...t}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:t=>({onSortingChange:Ve("sorting",t),isMultiSortEvent:e=>e.shiftKey}),createColumn:(t,e)=>{t.getAutoSortingFn=()=>{const n=e.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const i of n){const r=i==null?void 0:i.getValue(t.id);if(Object.prototype.toString.call(r)==="[object Date]")return jn.datetime;if(typeof r=="string"&&(o=!0,r.split(Zs).length>1))return jn.alphanumeric}return o?jn.text:jn.basic},t.getAutoSortDir=()=>{const n=e.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(t.id))=="string"?"asc":"desc"},t.getSortingFn=()=>{var n,o;if(!t)throw new Error;return Jo(t.columnDef.sortingFn)?t.columnDef.sortingFn:t.columnDef.sortingFn==="auto"?t.getAutoSortingFn():(n=(o=e.options.sortingFns)==null?void 0:o[t.columnDef.sortingFn])!=null?n:jn[t.columnDef.sortingFn]},t.toggleSorting=(n,o)=>{const i=t.getNextSortingOrder(),r=typeof n<"u"&&n!==null;e.setSorting(l=>{const a=l==null?void 0:l.find(p=>p.id===t.id),d=l==null?void 0:l.findIndex(p=>p.id===t.id);let c=[],u,f=r?n:i==="desc";if(l!=null&&l.length&&t.getCanMultiSort()&&o?a?u="toggle":u="add":l!=null&&l.length&&d!==l.length-1?u="replace":a?u="toggle":u="replace",u==="toggle"&&(r||i||(u="remove")),u==="add"){var h;c=[...l,{id:t.id,desc:f}],c.splice(0,c.length-((h=e.options.maxMultiSortColCount)!=null?h:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=l.map(p=>p.id===t.id?{...p,desc:f}:p):u==="remove"?c=l.filter(p=>p.id!==t.id):c=[{id:t.id,desc:f}];return c})},t.getFirstSortDir=()=>{var n,o;return((n=(o=t.columnDef.sortDescFirst)!=null?o:e.options.sortDescFirst)!=null?n:t.getAutoSortDir()==="desc")?"desc":"asc"},t.getNextSortingOrder=n=>{var o,i;const r=t.getFirstSortDir(),l=t.getIsSorted();return l?l!==r&&((o=e.options.enableSortingRemoval)==null||o)&&(!(n&&(i=e.options.enableMultiRemove)!=null)||i)?!1:l==="desc"?"asc":"desc":r},t.getCanSort=()=>{var n,o;return((n=t.columnDef.enableSorting)!=null?n:!0)&&((o=e.options.enableSorting)!=null?o:!0)&&!!t.accessorFn},t.getCanMultiSort=()=>{var n,o;return(n=(o=t.columnDef.enableMultiSort)!=null?o:e.options.enableMultiSort)!=null?n:!!t.accessorFn},t.getIsSorted=()=>{var n;const o=(n=e.getState().sorting)==null?void 0:n.find(i=>i.id===t.id);return o?o.desc?"desc":"asc":!1},t.getSortIndex=()=>{var n,o;return(n=(o=e.getState().sorting)==null?void 0:o.findIndex(i=>i.id===t.id))!=null?n:-1},t.clearSorting=()=>{e.setSorting(n=>n!=null&&n.length?n.filter(o=>o.id!==t.id):[])},t.getToggleSortingHandler=()=>{const n=t.getCanSort();return o=>{n&&(o.persist==null||o.persist(),t.toggleSorting==null||t.toggleSorting(void 0,t.getCanMultiSort()?e.options.isMultiSortEvent==null?void 0:e.options.isMultiSortEvent(o):!1))}}},createTable:t=>{t.setSorting=e=>t.options.onSortingChange==null?void 0:t.options.onSortingChange(e),t.resetSorting=e=>{var n,o;t.setSorting(e?[]:(n=(o=t.initialState)==null?void 0:o.sorting)!=null?n:[])},t.getPreSortedRowModel=()=>t.getGroupedRowModel(),t.getSortedRowModel=()=>(!t._getSortedRowModel&&t.options.getSortedRowModel&&(t._getSortedRowModel=t.options.getSortedRowModel(t)),t.options.manualSorting||!t._getSortedRowModel?t.getPreSortedRowModel():t._getSortedRowModel())}},k_,x_,D_,M_,__];function A_(t){var e;(t.debugAll||t.debugTable)&&console.info("Creating Table Instance...");let n={_features:xc};const o=n._features.reduce((u,f)=>Object.assign(u,f.getDefaultOptions==null?void 0:f.getDefaultOptions(n)),{}),i=u=>n.options.mergeOptions?n.options.mergeOptions(o,u):{...o,...u};let l={...{},...(e=t.initialState)!=null?e:{}};n._features.forEach(u=>{var f;l=(f=u.getInitialState==null?void 0:u.getInitialState(l))!=null?f:l});const a=[];let d=!1;const c={_features:xc,options:{...o,...t},initialState:l,_queue:u=>{a.push(u),d||(d=!0,Promise.resolve().then(()=>{for(;a.length;)a.shift()();d=!1}).catch(f=>setTimeout(()=>{throw f})))},reset:()=>{n.setState(n.initialState)},setOptions:u=>{const f=$t(u,n.options);n.options=i(f)},getState:()=>n.options.state,setState:u=>{n.options.onStateChange==null||n.options.onStateChange(u)},_getRowId:(u,f,h)=>{var p;return(p=n.options.getRowId==null?void 0:n.options.getRowId(u,f,h))!=null?p:`${h?[h.id,f].join("."):f}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(u,f)=>{const h=(f?n.getCoreRowModel():n.getRowModel()).rowsById[u];if(!h)throw process.env.NODE_ENV!=="production"?new Error(`getRow expected an ID, but got ${u}`):new Error;return h},_getDefaultColumnDef:H(()=>[n.options.defaultColumn],u=>{var f;return u=(f=u)!=null?f:{},{header:h=>{const p=h.header.column.columnDef;return p.accessorKey?p.accessorKey:p.accessorFn?p.id:null},cell:h=>{var p,m;return(p=(m=h.renderValue())==null||m.toString==null?void 0:m.toString())!=null?p:null},...n._features.reduce((h,p)=>Object.assign(h,p.getDefaultColumnDef==null?void 0:p.getDefaultColumnDef()),{}),...u}},{debug:()=>{var u;return(u=n.options.debugAll)!=null?u:n.options.debugColumns},key:process.env.NODE_ENV==="development"&&"getDefaultColumnDef"}),_getColumnDefs:()=>n.options.columns,getAllColumns:H(()=>[n._getColumnDefs()],u=>{const f=function(h,p,m){return m===void 0&&(m=0),h.map(g=>{const b=y_(n,g,m,p),y=g;return b.columns=y.columns?f(y.columns,b,m+1):[],b})};return f(u)},{key:process.env.NODE_ENV==="development"&&"getAllColumns",debug:()=>{var u;return(u=n.options.debugAll)!=null?u:n.options.debugColumns}}),getAllFlatColumns:H(()=>[n.getAllColumns()],u=>u.flatMap(f=>f.getFlatColumns()),{key:process.env.NODE_ENV==="development"&&"getAllFlatColumns",debug:()=>{var u;return(u=n.options.debugAll)!=null?u:n.options.debugColumns}}),_getAllFlatColumnsById:H(()=>[n.getAllFlatColumns()],u=>u.reduce((f,h)=>(f[h.id]=h,f),{}),{key:process.env.NODE_ENV==="development"&&"getAllFlatColumnsById",debug:()=>{var u;return(u=n.options.debugAll)!=null?u:n.options.debugColumns}}),getAllLeafColumns:H(()=>[n.getAllColumns(),n._getOrderColumnsFn()],(u,f)=>{let h=u.flatMap(p=>p.getLeafColumns());return f(h)},{key:process.env.NODE_ENV==="development"&&"getAllLeafColumns",debug:()=>{var u;return(u=n.options.debugAll)!=null?u:n.options.debugColumns}}),getColumn:u=>{const f=n._getAllFlatColumnsById()[u];return process.env.NODE_ENV!=="production"&&!f&&console.error(`[Table] Column with id '${u}' does not exist.`),f}};Object.assign(n,c);for(let u=0;u<n._features.length;u++){const f=n._features[u];f==null||f.createTable==null||f.createTable(n)}return n}function O_(t,e,n,o){const i=()=>{var l;return(l=r.getValue())!=null?l:t.options.renderFallbackValue},r={id:`${e.id}_${n.id}`,row:e,column:n,getValue:()=>e.getValue(o),renderValue:i,getContext:H(()=>[t,n,e,r],(l,a,d,c)=>({table:l,column:a,row:d,cell:c,getValue:c.getValue,renderValue:c.renderValue}),{key:process.env.NODE_ENV==="development"&&"cell.getContext",debug:()=>t.options.debugAll})};return t._features.forEach(l=>{l.createCell==null||l.createCell(r,n,e,t)},{}),r}const Qs=(t,e,n,o,i,r,l)=>{let a={id:e,index:o,original:n,depth:i,parentId:l,_valuesCache:{},_uniqueValuesCache:{},getValue:d=>{if(a._valuesCache.hasOwnProperty(d))return a._valuesCache[d];const c=t.getColumn(d);if(c!=null&&c.accessorFn)return a._valuesCache[d]=c.accessorFn(a.original,o),a._valuesCache[d]},getUniqueValues:d=>{if(a._uniqueValuesCache.hasOwnProperty(d))return a._uniqueValuesCache[d];const c=t.getColumn(d);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(a._uniqueValuesCache[d]=c.columnDef.getUniqueValues(a.original,o),a._uniqueValuesCache[d]):(a._uniqueValuesCache[d]=[a.getValue(d)],a._uniqueValuesCache[d])},renderValue:d=>{var c;return(c=a.getValue(d))!=null?c:t.options.renderFallbackValue},subRows:r??[],getLeafRows:()=>b_(a.subRows,d=>d.subRows),getParentRow:()=>a.parentId?t.getRow(a.parentId,!0):void 0,getParentRows:()=>{let d=[],c=a;for(;;){const u=c.getParentRow();if(!u)break;d.push(u),c=u}return d.reverse()},getAllCells:H(()=>[t.getAllLeafColumns()],d=>d.map(c=>O_(t,a,c,c.id)),{key:process.env.NODE_ENV==="development"&&"row.getAllCells",debug:()=>{var d;return(d=t.options.debugAll)!=null?d:t.options.debugRows}}),_getAllCellsByColumnId:H(()=>[a.getAllCells()],d=>d.reduce((c,u)=>(c[u.column.id]=u,c),{}),{key:process.env.NODE_ENV==="production"&&"row.getAllCellsByColumnId",debug:()=>{var d;return(d=t.options.debugAll)!=null?d:t.options.debugRows}})};for(let d=0;d<t._features.length;d++){const c=t._features[d];c==null||c.createRow==null||c.createRow(a,t)}return a};function I_(){return t=>H(()=>[t.options.data],e=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(i,r,l){r===void 0&&(r=0);const a=[];for(let c=0;c<i.length;c++){const u=Qs(t,t._getRowId(i[c],c,l),i[c],c,r,void 0,l==null?void 0:l.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,a.push(u),t.options.getSubRows){var d;u.originalSubRows=t.options.getSubRows(i[c],c),(d=u.originalSubRows)!=null&&d.length&&(u.subRows=o(u.originalSubRows,r+1,u))}}return a};return n.rows=o(e),n},{key:process.env.NODE_ENV==="development"&&"getRowModel",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable},onChange:()=>{t._autoResetPageIndex()}})}function T_(t,e,n){return n.options.filterFromLeafRows?L_(t,e,n):z_(t,e,n)}function L_(t,e,n){var o;const i=[],r={},l=(o=n.options.maxLeafRowFilterDepth)!=null?o:100,a=function(d,c){c===void 0&&(c=0);const u=[];for(let h=0;h<d.length;h++){var f;let p=d[h];const m=Qs(n,p.id,p.original,p.index,p.depth,void 0,p.parentId);if(m.columnFilters=p.columnFilters,(f=p.subRows)!=null&&f.length&&c<l){if(m.subRows=a(p.subRows,c+1),p=m,e(p)&&!m.subRows.length){u.push(p),r[p.id]=p,i.push(p);continue}if(e(p)||m.subRows.length){u.push(p),r[p.id]=p,i.push(p);continue}}else p=m,e(p)&&(u.push(p),r[p.id]=p,i.push(p))}return u};return{rows:a(t),flatRows:i,rowsById:r}}function z_(t,e,n){var o;const i=[],r={},l=(o=n.options.maxLeafRowFilterDepth)!=null?o:100,a=function(d,c){c===void 0&&(c=0);const u=[];for(let h=0;h<d.length;h++){let p=d[h];if(e(p)){var f;if((f=p.subRows)!=null&&f.length&&c<l){const g=Qs(n,p.id,p.original,p.index,p.depth,void 0,p.parentId);g.subRows=a(p.subRows,c+1),p=g}u.push(p),i.push(p),r[p.id]=p}}return u};return{rows:a(t),flatRows:i,rowsById:r}}function H_(){return t=>H(()=>[t.getPreFilteredRowModel(),t.getState().columnFilters,t.getState().globalFilter],(e,n,o)=>{if(!e.rows.length||!(n!=null&&n.length)&&!o){for(let h=0;h<e.flatRows.length;h++)e.flatRows[h].columnFilters={},e.flatRows[h].columnFiltersMeta={};return e}const i=[],r=[];(n??[]).forEach(h=>{var p;const m=t.getColumn(h.id);if(!m)return;const g=m.getFilterFn();if(!g){process.env.NODE_ENV!=="production"&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${m.id}.`);return}i.push({id:h.id,filterFn:g,resolvedValue:(p=g.resolveFilterValue==null?void 0:g.resolveFilterValue(h.value))!=null?p:h.value})});const l=n.map(h=>h.id),a=t.getGlobalFilterFn(),d=t.getAllLeafColumns().filter(h=>h.getCanGlobalFilter());o&&a&&d.length&&(l.push("__global__"),d.forEach(h=>{var p;r.push({id:h.id,filterFn:a,resolvedValue:(p=a.resolveFilterValue==null?void 0:a.resolveFilterValue(o))!=null?p:o})}));let c,u;for(let h=0;h<e.flatRows.length;h++){const p=e.flatRows[h];if(p.columnFilters={},i.length)for(let m=0;m<i.length;m++){c=i[m];const g=c.id;p.columnFilters[g]=c.filterFn(p,g,c.resolvedValue,b=>{p.columnFiltersMeta[g]=b})}if(r.length){for(let m=0;m<r.length;m++){u=r[m];const g=u.id;if(u.filterFn(p,g,u.resolvedValue,b=>{p.columnFiltersMeta[g]=b})){p.columnFilters.__global__=!0;break}}p.columnFilters.__global__!==!0&&(p.columnFilters.__global__=!1)}}const f=h=>{for(let p=0;p<l.length;p++)if(h.columnFilters[l[p]]===!1)return!1;return!0};return T_(e.rows,f,t)},{key:process.env.NODE_ENV==="development"&&"getFilteredRowModel",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable},onChange:()=>{t._autoResetPageIndex()}})}function j_(){return t=>H(()=>[t.getState().sorting,t.getPreSortedRowModel()],(e,n)=>{if(!n.rows.length||!(e!=null&&e.length))return n;const o=t.getState().sorting,i=[],r=o.filter(d=>{var c;return(c=t.getColumn(d.id))==null?void 0:c.getCanSort()}),l={};r.forEach(d=>{const c=t.getColumn(d.id);c&&(l[d.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const a=d=>{const c=d.map(u=>({...u}));return c.sort((u,f)=>{for(let p=0;p<r.length;p+=1){var h;const m=r[p],g=l[m.id],b=(h=m==null?void 0:m.desc)!=null?h:!1;let y=0;if(g.sortUndefined){const $=u.getValue(m.id),k=f.getValue(m.id),v=$===void 0,x=k===void 0;(v||x)&&(y=v&&x?0:v?g.sortUndefined:-g.sortUndefined)}if(y===0&&(y=g.sortingFn(u,f,m.id)),y!==0)return b&&(y*=-1),g.invertSorting&&(y*=-1),y}return u.index-f.index}),c.forEach(u=>{var f;i.push(u),(f=u.subRows)!=null&&f.length&&(u.subRows=a(u.subRows))}),c};return{rows:a(n.rows),flatRows:i,rowsById:n.rowsById}},{key:process.env.NODE_ENV==="development"&&"getSortedRowModel",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable},onChange:()=>{t._autoResetPageIndex()}})}function W_(t){const e=[],n=o=>{var i;e.push(o),(i=o.subRows)!=null&&i.length&&o.getIsExpanded()&&o.subRows.forEach(n)};return t.rows.forEach(n),{rows:e,flatRows:t.flatRows,rowsById:t.rowsById}}function Y_(t){return e=>H(()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded],(n,o)=>{if(!o.rows.length)return o;const{pageSize:i,pageIndex:r}=n;let{rows:l,flatRows:a,rowsById:d}=o;const c=i*r,u=c+i;l=l.slice(c,u);let f;e.options.paginateExpandedRows?f={rows:l,flatRows:a,rowsById:d}:f=W_({rows:l,flatRows:a,rowsById:d}),f.flatRows=[];const h=p=>{f.flatRows.push(p),p.subRows.length&&p.subRows.forEach(h)};return f.rows.forEach(h),f},{key:process.env.NODE_ENV==="development"&&"getPaginationRowModel",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugTable}})}/**
|
|
39
46
|
* vue-table
|
|
40
47
|
*
|
|
41
48
|
* Copyright (c) TanStack
|
|
@@ -44,4 +51,5 @@ var Hy=Object.defineProperty;var jy=(ie,l,Ue)=>l in ie?Hy(ie,l,{enumerable:!0,co
|
|
|
44
51
|
* LICENSE.md file in the root directory of this source tree.
|
|
45
52
|
*
|
|
46
53
|
* @license MIT
|
|
47
|
-
*/function po(){return!0}const yy=Symbol("merge-proxy"),_y={get(t,e,n){return e===yy?n:t.get(e)},has(t,e){return t.has(e)},set:po,deleteProperty:po,getOwnPropertyDescriptor(t,e){return{configurable:!0,enumerable:!0,get(){return t.get(e)},set:po,deleteProperty:po}},ownKeys(t){return t.keys()}};function Li(t){return"value"in t?t.value:t}function go(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new Proxy({get(o){for(let i=e.length-1;i>=0;i--){const s=Li(e[i])[o];if(s!==void 0)return s}},has(o){for(let i=e.length-1;i>=0;i--)if(o in Li(e[i]))return!0;return!1},keys(){const o=[];for(let i=0;i<e.length;i++)o.push(...Object.keys(Li(e[i])));return[...Array.from(new Set(o))]}},_y)}const fa=l.defineComponent({props:["render","props"],setup:t=>()=>typeof t.render=="function"||typeof t.render=="object"?l.h(t.render,t.props):t.render});function xy(t){const e=go({state:{},onStateChange:()=>{},renderFallbackValue:null,mergeOptions(i,s){return go(i,s)}},t),n=ay(e),o=l.ref(n.initialState);return l.watchEffect(()=>{n.setOptions(i=>{var s;const r=new Proxy({},{get:(a,c)=>o.value[c]});return go(i,t,{state:go(r,(s=t.state)!=null?s:{}),onStateChange:a=>{a instanceof Function?o.value=a(o.value):o.value=a,t.onStateChange==null||t.onStateChange(a)}})})}),n}const wy=["checked","disabled","indeterminate"],Cy=l.defineComponent({__name:"FmTableCheckbox",props:{checked:{type:Boolean},disabled:{type:Boolean},indeterminate:{type:Boolean},onChange:{type:Function}},setup(t){const e=t,n=l.computed(()=>e.indeterminate&&!e.checked?"remove":e.checked?"check_small":"");return(o,i)=>(l.openBlock(),l.createElementBlock("div",{class:"fm-checkbox__input--container",onClick:i[0]||(i[0]=(...s)=>o.onChange&&o.onChange(...s))},[l.createElementVNode("input",{class:l.normalizeClass({"fm-checkbox__input--btn":!0,"fm-checkbox__input--btn--checked":o.checked}),type:"checkbox",checked:o.checked,disabled:o.disabled,indeterminate:o.indeterminate},null,10,wy),o.indeterminate||o.checked?(l.openBlock(),l.createBlock(L,{key:0,class:"fm-checkbox__input--checkmark",name:n.value,size:"md",color:"#FFFFFF"},null,8,["name"])):l.createCommentVNode("",!0)]))}}),B_="",ha=Q(Cy,[["__scopeId","data-v-2508b8c4"]]),ky={class:"bg-fm-color-neutral-white flex flex-col max-h-[264px] overflow-y-auto px-4 py-12 rounded-md shadow-light-300 w-[75px]"},pa=l.defineComponent({__name:"FmTableSelection",props:{modelValue:{},items:{}},emits:["update:modelValue"],setup(t){const n=de(t,"modelValue"),o=l.ref(!1);return(i,s)=>(l.openBlock(),l.createBlock(Kl,{onMenuChanged:s[0]||(s[0]=r=>o.value=r)},{"menu-button":l.withCtx(()=>{var r;return[l.createVNode(fe,{variant:"secondary",label:(r=i.items.find(a=>a.value===i.modelValue))==null?void 0:r.label,size:"md",icon:o.value?"expand_less":"expand_more","icon-position":"append"},null,8,["label","icon"])]}),"menu-wrapper":l.withCtx(()=>[l.createElementVNode("div",ky,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.items,r=>(l.openBlock(),l.createBlock(Ee,{key:r.value,"model-value":r.value===l.unref(n),label:r.label,value:r.value,"onUpdate:modelValue":a=>n.value=r.value},null,8,["model-value","label","value","onUpdate:modelValue"]))),128))])]),_:1}))}}),Sy={class:"flex flex-col"},vy={class:"h-full overflow-auto"},My={class:"w-full"},Ey=["colSpan","onClick"],Dy={class:"flex gap-8 items-center justify-between"},Vy={class:"fm-typo-body-lg-400 line-clamp-2 w-full"},Ry={className:"h-72 flex items-center justify-between px-24 shrink-0"},Fy={class:"flex gap-24 items-center justify-between"},By={class:"flex gap-8 items-center"},$y=l.createElementVNode("span",{class:"fm-typo-body-lg-400 text-fm-color-typo-primary"}," Items per page: ",-1),Py={class:"fm-typo-body-lg-400 text-fm-color-typo-secondary"},Ay={class:"flex gap-8 items-center"},Oy={class:"fm-typo-body-lg-400 text-fm-color-typo-primary"},Ny=l.defineComponent({__name:"FmTable",props:{modelValue:{default:{}},selection:{default:void 0},rowData:{default:()=>[]},columnDefs:{default:()=>[]},searchValue:{default:""},pageCount:{default:0},fetchFn:{type:Function,default:void 0},pageSize:{default:10},pinHeaderRow:{type:Boolean,default:!0}},setup(t){const e=t,n=de(e,"modelValue"),o=de(e,"searchValue"),i=l.computed(()=>{const c=[...e.columnDefs];return e.selection&&c.unshift({id:"row-selection",header:({table:d})=>l.createVNode(ha,{checked:d.getIsAllPageRowsSelected(),indeterminate:d.getIsSomePageRowsSelected(),onChange:d.getToggleAllPageRowsSelectedHandler()},null),cell:({row:d})=>l.createVNode(ha,{checked:d.getIsSelected(),disabled:!d.getCanSelect(),onChange:d.getToggleSelectedHandler()},null),enableResizing:!1,meta:{headerClass:"py-4 pl-4 pr-16",cellClass:"py-16 pl-4 pr-16",width:"60px"}}),c}),s=l.ref([]),r=l.ref({pageIndex:0,pageSize:e.pageSize}),a=xy({enableRowSelection:!!e.selection,enableMultiRowSelection:e.selection==="multiple",columns:i.value,get data(){return e.rowData},state:{get pagination(){return typeof e.fetchFn=="function"?r.value:void 0},get globalFilter(){return o.value},get rowSelection(){return n.value},get sorting(){return s.value}},getCoreRowModel:dy(),getSortedRowModel:gy(),getFilteredRowModel:py(),getPaginationRowModel:by(),onRowSelectionChange:c=>n.value=typeof c=="function"?c(n.value):c,onSortingChange:c=>{s.value=typeof c=="function"?c(s.value):c},onGlobalFilterChange:c=>{o.value=typeof c=="function"?c(o.value):c},manualPagination:typeof e.fetchFn=="function",...typeof e.fetchFn=="function"&&{onPaginationChange:c=>r.value=typeof c=="function"?c(r.value):c},pageCount:typeof e.fetchFn=="function"?e.pageCount:void 0});return l.watch(()=>r.value,c=>{e.fetchFn&&e.fetchFn(c)}),l.watch(()=>e.rowData,()=>{a.setOptions(c=>({...c,data:e.rowData}))}),l.watch(()=>e.pageCount,()=>{a.setOptions(c=>({...c,pageCount:e.pageCount}))}),l.watch(()=>e.pageSize,()=>{a.setPageSize(e.pageSize)}),l.onMounted(()=>{e.fetchFn&&e.fetchFn(a.getState().pagination),a.setPageSize(e.pageSize)}),(c,d)=>(l.openBlock(),l.createElementBlock("div",Sy,[l.createElementVNode("div",vy,[l.createElementVNode("table",My,[l.createElementVNode("thead",{class:l.normalizeClass({"bg-fm-color-neutral-white sticky top-0 z-[1]":c.pinHeaderRow})},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(a).getHeaderGroups(),u=>(l.openBlock(),l.createElementBlock("tr",{key:u.id},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(u.headers,f=>{var p,h,g,m;return l.openBlock(),l.createElementBlock("th",{key:f.id,colSpan:f.colSpan,class:l.normalizeClass(["fm-typo-body-lg-700 text-fm-color-typo-secondary border-b border-fm-color-neutral-gray-100 h-24 hover:bg-fm-color-opacity-sm",f.column.getCanSort()?"cursor-pointer select-none":"",((p=f.column.columnDef.meta)==null?void 0:p.headerClass)??"px-16 py-12"]),style:l.normalizeStyle({width:`${(h=f.column.columnDef.meta)==null?void 0:h.width}`,maxWidth:(g=f.column.columnDef.meta)==null?void 0:g.maxWidth,textAlign:((m=f.column.columnDef.meta)==null?void 0:m.textAlign)??"left"}),onClick:b=>{var x;return(x=f.column.getToggleSortingHandler())==null?void 0:x(b)}},[l.createElementVNode("div",Dy,[f.isPlaceholder?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(l.unref(fa),{key:0,render:f.column.columnDef.header,props:f.getContext()},null,8,["render","props"])),f.column.getCanSort()?(l.openBlock(),l.createBlock(L,{key:1,color:"neutral-gray-400",name:{asc:"arrow_upward",desc:"arrow_downward"}[f.column.getIsSorted()]??"unfold_more"},null,8,["name"])):l.createCommentVNode("",!0)])],14,Ey)}),128))]))),128))],2),l.createElementVNode("tbody",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(a).getRowModel().rows,u=>(l.openBlock(),l.createElementBlock("tr",{key:u.id,class:l.normalizeClass(["border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm",{"bg-fm-color-neutral-gray-100":u.getIsSelected()}])},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(u.getVisibleCells(),f=>{var p,h,g,m;return l.openBlock(),l.createElementBlock("td",{key:f.id,class:l.normalizeClass(["h-48 px-16 py-12 text-fm-color-typo-primary",((p=f.column.columnDef.meta)==null?void 0:p.cellClass)??"px-16 py-12"]),style:l.normalizeStyle({width:(h=f.column.columnDef.meta)==null?void 0:h.width,maxWidth:(g=f.column.columnDef.meta)==null?void 0:g.maxWidth,textAlign:((m=f.column.columnDef.meta)==null?void 0:m.textAlign)??"left"})},[l.createElementVNode("span",Vy,[l.createVNode(l.unref(fa),{render:f.column.columnDef.cell,props:f.getContext()},null,8,["render","props"])])],6)}),128))],2))),128))])])]),l.createElementVNode("div",Ry,[l.createElementVNode("div",Fy,[l.createElementVNode("div",By,[$y,l.createVNode(pa,{"model-value":l.unref(a).getState().pagination.pageSize,items:[...Array.from(Array(5),(u,f)=>(f+1)*10).map(u=>({label:u.toString(),value:u})),{label:"All",value:e.rowData.length}],"onUpdate:modelValue":d[0]||(d[0]=u=>l.unref(a).setPageSize(u))},null,8,["model-value","items"])]),l.createElementVNode("span",Py,l.toDisplayString(e.rowData.length<l.unref(a).getState().pagination.pageSize?e.rowData.length:l.unref(a).getState().pagination.pageIndex*l.unref(a).getState().pagination.pageSize+1)+" - "+l.toDisplayString((l.unref(a).getState().pagination.pageIndex+1)*l.unref(a).getState().pagination.pageSize)+" of "+l.toDisplayString(e.rowData.length)+" items ",1)]),l.createElementVNode("div",Ay,[l.createVNode(pa,{"model-value":l.unref(a).getState().pagination.pageIndex+1,items:Array.from(Array(l.unref(a).getPageCount()),(u,f)=>f+1).map(u=>({label:u.toString(),value:u})),"onUpdate:modelValue":d[1]||(d[1]=u=>l.unref(a).setPageIndex(u?u-1:0))},null,8,["model-value","items"]),l.createElementVNode("span",Oy," of "+l.toDisplayString(l.unref(a).getPageCount())+" pages ",1),l.createVNode(fe,{disabled:!l.unref(a).getCanPreviousPage(),icon:"chevron_left",variant:"tertiary","icon-color":"neutral-black",onClick:d[2]||(d[2]=()=>l.unref(a).previousPage())},null,8,["disabled"]),l.createVNode(fe,{disabled:!l.unref(a).getCanNextPage(),icon:"chevron_right",variant:"tertiary","icon-color":"neutral-black",onClick:d[3]||(d[3]=()=>l.unref(a).nextPage())},null,8,["disabled"])])])]))}}),Iy=l.createElementVNode("span",{class:"fm-typo-body-lg-400 text-fm-color-typo-secondary"}," More ",-1),Ly={class:"max-w-[360px] min-w-[186px]"},ga={FmBadge:yn,FmBreadcrumb:Ba,FmButton:fe,FmButtonGroup:Xa,FmCard:Ja,FmCardActions:Qa,FmCardSection:ec,FmCardTitle:Gi,FmChip:Ui,FmChipGroup:qi,FmDialog:ic,FmDropField:ac,FmDynamicDialog:ts,FmLineChart:Vp,FmCheckbox:wl,FmDatePicker:jg,FmDateRangePicker:bm,FmField:it,FmForm:ym,FmFormGroup:We,FmHelperText:jl,FmLabel:Yl,FmRadio:Mm,FmRadioGroup:Em,FmSelect:Fm,FmStepperField:Am,FmSwitch:Gm,FmTextField:qm,FmTextarea:Zm,FmTimeInput:Xl,FmTimePicker:db,FmIcon:L,FmList:fb,FmListItem:pb,FmMenu:Kl,FmMenuDeprecated:we,FmMenuDivider:bb,FmMenuHeader:_b,FmMenuItem:Ee,FmProgressIndicator:Zl,FmSnackbar:Mb,FmSpacer:Xi,FmStep:Fb,FmStepper:Pb,FmTab:Ql,FmTable:Ny,FmTabs:l.defineComponent({__name:"FmTabs",props:{modelValue:{default:null},items:{},vertical:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},showMoreAt:{default:6}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=l.ref(!1),s=l.computed(()=>({vertical:n.vertical,disabled:n.disabled})),r=l.computed(()=>n.items.slice(0,n.showMoreAt)),a=l.computed(()=>n.items.slice(n.showMoreAt)),c=d=>{i.value=!1,o("update:modelValue",d)};return(d,u)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["flex",d.vertical?"flex-col":"flex-row items-center"])},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.value,f=>l.renderSlot(d.$slots,"default",l.normalizeProps(l.guardReactiveProps({...f,tabsProps:s.value})),()=>[l.createVNode(Ql,l.mergeProps({"model-value":n.modelValue},{children:f.children,label:f.label,icon:f.icon,disabled:f.disabled,badge:f.badge,value:f.value,tabsProps:s.value},{disabled:f.disabled===void 0?d.disabled:f.disabled,vertical:d.vertical,"onUpdate:modelValue":u[0]||(u[0]=p=>o("update:modelValue",p))}),null,16,["model-value","disabled","vertical"])])),256)),a.value.length>0?(l.openBlock(),l.createBlock(we,{key:0,"show-menu":i.value,class:l.normalizeClass(["max-w-[360px] min-w-[90px] rounded-sm",{"w-full":d.vertical}]),placement:d.vertical?"right-start":"bottom-start",onDropdownChanged:u[1]||(u[1]=f=>i.value=f)},{"menu-button":l.withCtx(()=>[l.createElementVNode("div",{class:l.normalizeClass(["flex gap-8 hover:bg-fm-color-opacity-sm items-center px-16 rounded-sm",[d.vertical?"h-40":"h-[46px]"]])},[l.createVNode(L,{name:"more_vert"}),Iy],2)]),"menu-content":l.withCtx(()=>[l.createElementVNode("div",Ly,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(a.value,f=>l.renderSlot(d.$slots,"list-item",l.normalizeProps(l.guardReactiveProps(f)),()=>[l.createVNode(Ee,{"model-value":n.modelValue===f.value,label:f.label,icon:f.icon,disabled:f.disabled,onClick:p=>c(f.value)},{append:l.withCtx(()=>[f.badge?(l.openBlock(),l.createBlock(yn,{key:0,value:f.badge,inline:"",variant:"numeric"},null,8,["value"])):l.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"])])),256))])]),_:3},8,["show-menu","class","placement"])):l.createCommentVNode("",!0)],2))}}),FmTooltip:Wl};function Ty(){const t=l.inject(Qi);if(!t)throw new Error("No provider");return t}const zy=t=>{t.use(va,{duration:.3,color:"var(--fm-color-opacity-sm)",initialOpacity:1,finalOpacity:.1,dissolveDuration:.6}),t.use(fc),Object.entries(ga).forEach(([e,n])=>{t.component(e,n)})};ie.components=ga,ie.uiPlugin=zy,ie.useDialog=Ty,ie.useFormChild=Ul,ie.useValidation=Gl,Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"})});
|
|
54
|
+
*/function ni(){return!0}const U_=Symbol("merge-proxy"),G_={get(t,e,n){return e===U_?n:t.get(e)},has(t,e){return t.has(e)},set:ni,deleteProperty:ni,getOwnPropertyDescriptor(t,e){return{configurable:!0,enumerable:!0,get(){return t.get(e)},set:ni,deleteProperty:ni}},ownKeys(t){return t.keys()}};function er(t){return"value"in t?t.value:t}function oi(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new Proxy({get(o){for(let i=e.length-1;i>=0;i--){const r=er(e[i])[o];if(r!==void 0)return r}},has(o){for(let i=e.length-1;i>=0;i--)if(o in er(e[i]))return!0;return!1},keys(){const o=[];for(let i=0;i<e.length;i++)o.push(...Object.keys(er(e[i])));return[...Array.from(new Set(o))]}},G_)}const Cc=s.defineComponent({props:["render","props"],setup:t=>()=>typeof t.render=="function"||typeof t.render=="object"?s.h(t.render,t.props):t.render});function q_(t){const e=oi({state:{},onStateChange:()=>{},renderFallbackValue:null,mergeOptions(i,r){return oi(i,r)}},t),n=A_(e),o=s.ref(n.initialState);return s.watchEffect(()=>{n.setOptions(i=>{var r;const l=new Proxy({},{get:(a,d)=>o.value[d]});return oi(i,t,{state:oi(l,(r=t.state)!=null?r:{}),onStateChange:a=>{a instanceof Function?o.value=a(o.value):o.value=a,t.onStateChange==null||t.onStateChange(a)}})})}),n}const X_=["checked","disabled","indeterminate"],K_=s.defineComponent({__name:"FmTableCheckbox",props:{checked:{type:Boolean},disabled:{type:Boolean},indeterminate:{type:Boolean},onChange:{type:Function}},setup(t){const e=t,n=s.computed(()=>e.indeterminate&&!e.checked?"remove":e.checked?"check_small":"");return(o,i)=>(s.openBlock(),s.createElementBlock("div",{class:"fm-checkbox__input--container",onClick:i[0]||(i[0]=(...r)=>o.onChange&&o.onChange(...r))},[s.createElementVNode("input",{class:s.normalizeClass({"fm-checkbox__input--btn":!0,"fm-checkbox__input--btn--checked":o.checked}),type:"checkbox",checked:o.checked,disabled:o.disabled,indeterminate:o.indeterminate},null,10,X_),o.indeterminate||o.checked?(s.openBlock(),s.createBlock(z,{key:0,class:"fm-checkbox__input--checkmark",name:n.value,size:"md",color:"#FFFFFF"},null,8,["name"])):s.createCommentVNode("",!0)]))}}),a8="",kc=Z(K_,[["__scopeId","data-v-2508b8c4"]]),Z_={class:"bg-fm-color-neutral-white flex flex-col max-h-[264px] overflow-y-auto px-4 py-12 rounded-md shadow-light-300 w-[75px]"},Sc=s.defineComponent({__name:"FmTableSelection",props:{modelValue:{},items:{}},emits:["update:modelValue"],setup(t){const n=X(t,"modelValue"),o=s.ref(!1);return(i,r)=>(s.openBlock(),s.createBlock(Tn,{onMenuChanged:r[0]||(r[0]=l=>o.value=l)},{"menu-button":s.withCtx(()=>{var l;return[s.createVNode(K,{variant:"secondary",label:(l=i.items.find(a=>a.value===i.modelValue))==null?void 0:l.label,size:"md",icon:o.value?"expand_less":"expand_more","icon-position":"append"},null,8,["label","icon"])]}),"menu-wrapper":s.withCtx(()=>[s.createElementVNode("div",Z_,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.items,l=>(s.openBlock(),s.createBlock(Ie,{key:l.value,"model-value":l.value===s.unref(n),label:l.label,value:l.value,"onUpdate:modelValue":a=>n.value=l.value},null,8,["model-value","label","value","onUpdate:modelValue"]))),128))])]),_:1}))}}),J_={class:"flex flex-col"},Q_={class:"h-full overflow-auto"},e4={class:"w-full"},t4=["colSpan","onClick"],n4={class:"flex gap-8 items-center justify-between"},o4={class:"fm-typo-body-lg-400 line-clamp-2 w-full"},i4={className:"h-72 flex items-center justify-between px-24 shrink-0"},s4={class:"flex gap-24 items-center justify-between"},r4={class:"flex gap-8 items-center"},l4=s.createElementVNode("span",{class:"fm-typo-body-lg-400 text-fm-color-typo-primary"}," Items per page: ",-1),a4={class:"fm-typo-body-lg-400 text-fm-color-typo-secondary"},d4={class:"flex gap-8 items-center"},c4={class:"fm-typo-body-lg-400 text-fm-color-typo-primary"},u4=s.defineComponent({__name:"FmTable",props:{modelValue:{default:{}},selection:{default:void 0},rowData:{default:()=>[]},columnDefs:{default:()=>[]},searchValue:{default:""},pageCount:{default:0},fetchFn:{type:Function,default:void 0},pageSize:{default:10},pinHeaderRow:{type:Boolean,default:!0}},setup(t){const e=t,n=X(e,"modelValue"),o=X(e,"searchValue"),i=s.computed(()=>{const d=[...e.columnDefs];return e.selection&&d.unshift({id:"row-selection",header:({table:c})=>s.createVNode(kc,{checked:c.getIsAllPageRowsSelected(),indeterminate:c.getIsSomePageRowsSelected(),onChange:c.getToggleAllPageRowsSelectedHandler()},null),cell:({row:c})=>s.createVNode(kc,{checked:c.getIsSelected(),disabled:!c.getCanSelect(),onChange:c.getToggleSelectedHandler()},null),enableResizing:!1,meta:{headerClass:"py-4 pl-4 pr-16",cellClass:"py-16 pl-4 pr-16",width:"60px"}}),d}),r=s.ref([]),l=s.ref({pageIndex:0,pageSize:e.pageSize}),a=q_({enableRowSelection:!!e.selection,enableMultiRowSelection:e.selection==="multiple",columns:i.value,get data(){return e.rowData},state:{get pagination(){return typeof e.fetchFn=="function"?l.value:void 0},get globalFilter(){return o.value},get rowSelection(){return n.value},get sorting(){return r.value}},getCoreRowModel:I_(),getSortedRowModel:j_(),getFilteredRowModel:H_(),getPaginationRowModel:Y_(),onRowSelectionChange:d=>n.value=typeof d=="function"?d(n.value):d,onSortingChange:d=>{r.value=typeof d=="function"?d(r.value):d},onGlobalFilterChange:d=>{o.value=typeof d=="function"?d(o.value):d},manualPagination:typeof e.fetchFn=="function",...typeof e.fetchFn=="function"&&{onPaginationChange:d=>l.value=typeof d=="function"?d(l.value):d},pageCount:typeof e.fetchFn=="function"?e.pageCount:void 0});return s.watch(()=>l.value,d=>{e.fetchFn&&e.fetchFn(d)}),s.watch(()=>e.rowData,()=>{a.setOptions(d=>({...d,data:e.rowData}))}),s.watch(()=>e.pageCount,()=>{a.setOptions(d=>({...d,pageCount:e.pageCount}))}),s.watch(()=>e.pageSize,()=>{a.setPageSize(e.pageSize)}),s.onMounted(()=>{e.fetchFn&&e.fetchFn(a.getState().pagination),a.setPageSize(e.pageSize)}),(d,c)=>(s.openBlock(),s.createElementBlock("div",J_,[s.createElementVNode("div",Q_,[s.createElementVNode("table",e4,[s.createElementVNode("thead",{class:s.normalizeClass({"bg-fm-color-neutral-white sticky top-0 z-[1]":d.pinHeaderRow})},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(a).getHeaderGroups(),u=>(s.openBlock(),s.createElementBlock("tr",{key:u.id},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(u.headers,f=>{var h,p,m,g;return s.openBlock(),s.createElementBlock("th",{key:f.id,colSpan:f.colSpan,class:s.normalizeClass(["fm-typo-body-lg-700 text-fm-color-typo-secondary border-b border-fm-color-neutral-gray-100 h-24 hover:bg-fm-color-opacity-sm",f.column.getCanSort()?"cursor-pointer select-none":"",((h=f.column.columnDef.meta)==null?void 0:h.headerClass)??"px-16 py-12"]),style:s.normalizeStyle({width:`${(p=f.column.columnDef.meta)==null?void 0:p.width}`,maxWidth:(m=f.column.columnDef.meta)==null?void 0:m.maxWidth,textAlign:((g=f.column.columnDef.meta)==null?void 0:g.textAlign)??"left"}),onClick:b=>{var y;return(y=f.column.getToggleSortingHandler())==null?void 0:y(b)}},[s.createElementVNode("div",n4,[f.isPlaceholder?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(s.unref(Cc),{key:0,render:f.column.columnDef.header,props:f.getContext()},null,8,["render","props"])),f.column.getCanSort()?(s.openBlock(),s.createBlock(z,{key:1,color:"neutral-gray-400",name:{asc:"arrow_upward",desc:"arrow_downward"}[f.column.getIsSorted()]??"unfold_more"},null,8,["name"])):s.createCommentVNode("",!0)])],14,t4)}),128))]))),128))],2),s.createElementVNode("tbody",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(a).getRowModel().rows,u=>(s.openBlock(),s.createElementBlock("tr",{key:u.id,class:s.normalizeClass(["border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm",{"bg-fm-color-neutral-gray-100":u.getIsSelected()}])},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(u.getVisibleCells(),f=>{var h,p,m,g;return s.openBlock(),s.createElementBlock("td",{key:f.id,class:s.normalizeClass(["h-48 px-16 py-12 text-fm-color-typo-primary",((h=f.column.columnDef.meta)==null?void 0:h.cellClass)??"px-16 py-12"]),style:s.normalizeStyle({width:(p=f.column.columnDef.meta)==null?void 0:p.width,maxWidth:(m=f.column.columnDef.meta)==null?void 0:m.maxWidth,textAlign:((g=f.column.columnDef.meta)==null?void 0:g.textAlign)??"left"})},[s.createElementVNode("span",o4,[s.createVNode(s.unref(Cc),{render:f.column.columnDef.cell,props:f.getContext()},null,8,["render","props"])])],6)}),128))],2))),128))])])]),s.createElementVNode("div",i4,[s.createElementVNode("div",s4,[s.createElementVNode("div",r4,[l4,s.createVNode(Sc,{"model-value":s.unref(a).getState().pagination.pageSize,items:[...Array.from(Array(5),(u,f)=>(f+1)*10).map(u=>({label:u.toString(),value:u})),{label:"All",value:e.rowData.length}],"onUpdate:modelValue":c[0]||(c[0]=u=>s.unref(a).setPageSize(u))},null,8,["model-value","items"])]),s.createElementVNode("span",a4,s.toDisplayString(e.rowData.length<s.unref(a).getState().pagination.pageSize?e.rowData.length:s.unref(a).getState().pagination.pageIndex*s.unref(a).getState().pagination.pageSize+1)+" - "+s.toDisplayString((s.unref(a).getState().pagination.pageIndex+1)*s.unref(a).getState().pagination.pageSize)+" of "+s.toDisplayString(e.rowData.length)+" items ",1)]),s.createElementVNode("div",d4,[s.createVNode(Sc,{"model-value":s.unref(a).getState().pagination.pageIndex+1,items:Array.from(Array(s.unref(a).getPageCount()),(u,f)=>f+1).map(u=>({label:u.toString(),value:u})),"onUpdate:modelValue":c[1]||(c[1]=u=>s.unref(a).setPageIndex(u?u-1:0))},null,8,["model-value","items"]),s.createElementVNode("span",c4," of "+s.toDisplayString(s.unref(a).getPageCount())+" pages ",1),s.createVNode(K,{disabled:!s.unref(a).getCanPreviousPage(),icon:"chevron_left",variant:"tertiary","icon-color":"neutral-black",onClick:c[2]||(c[2]=()=>s.unref(a).previousPage())},null,8,["disabled"]),s.createVNode(K,{disabled:!s.unref(a).getCanNextPage(),icon:"chevron_right",variant:"tertiary","icon-color":"neutral-black",onClick:c[3]||(c[3]=()=>s.unref(a).nextPage())},null,8,["disabled"])])])]))}}),f4=s.createElementVNode("span",{class:"fm-typo-body-lg-400 text-fm-color-typo-secondary"}," More ",-1),h4={class:"max-w-[360px] min-w-[186px]"},p4=s.defineComponent({__name:"FmTabs",props:{modelValue:{default:null},items:{},vertical:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},showMoreAt:{default:6}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=s.ref(!1),r=s.computed(()=>({vertical:n.vertical,disabled:n.disabled})),l=s.computed(()=>n.items.slice(0,n.showMoreAt)),a=s.computed(()=>n.items.slice(n.showMoreAt)),d=c=>{i.value=!1,o("update:modelValue",c)};return(c,u)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["flex",c.vertical?"flex-col":"flex-row items-center"])},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(l.value,f=>s.renderSlot(c.$slots,"default",s.normalizeProps(s.guardReactiveProps({...f,tabsProps:r.value})),()=>[s.createVNode(cc,s.mergeProps({"model-value":n.modelValue},{children:f.children,label:f.label,icon:f.icon,disabled:f.disabled,badge:f.badge,value:f.value,tabsProps:r.value},{disabled:f.disabled===void 0?c.disabled:f.disabled,vertical:c.vertical,"onUpdate:modelValue":u[0]||(u[0]=h=>o("update:modelValue",h))}),null,16,["model-value","disabled","vertical"])])),256)),a.value.length>0?(s.openBlock(),s.createBlock(Zo,{key:0,"show-menu":i.value,class:s.normalizeClass(["max-w-[360px] min-w-[90px] rounded-sm",{"w-full":c.vertical}]),placement:c.vertical?"right-start":"bottom-start",onDropdownChanged:u[1]||(u[1]=f=>i.value=f)},{"menu-button":s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["flex gap-8 hover:bg-fm-color-opacity-sm items-center px-16 rounded-sm",[c.vertical?"h-40":"h-[46px]"]])},[s.createVNode(z,{name:"more_vert"}),f4],2)]),"menu-content":s.withCtx(()=>[s.createElementVNode("div",h4,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.value,f=>s.renderSlot(c.$slots,"list-item",s.normalizeProps(s.guardReactiveProps(f)),()=>[s.createVNode(Ie,{"model-value":n.modelValue===f.value,label:f.label,icon:f.icon,disabled:f.disabled,onClick:h=>d(f.value)},{append:s.withCtx(()=>[f.badge?(s.openBlock(),s.createBlock(Qt,{key:0,value:f.badge,inline:"",variant:"numeric"},null,8,["value"])):s.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"])])),256))])]),_:3},8,["show-menu","class","placement"])):s.createCommentVNode("",!0)],2))}}),m4={class:"flex flex-col"},g4=["tabindex"],b4=s.defineComponent({__name:"FmCollapsibleTab",props:{modelValue:{default:void 0},label:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1},badge:{default:0},value:{default:void 0},children:{default:()=>[]},indentation:{default:1},active:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},focusable:{type:Boolean,default:void 0}},setup(t){const e=t,n=X(e,"modelValue"),o=s.computed(()=>e.children.length>0),i=s.ref(!e.expand||e.disabled),r=s.computed(()=>{if(!o.value)return 0;function h(m){return m.children?[m,...m.children.flatMap(h)]:[m]}return 56*(e.children?e.children.flatMap(h):[]).length});function l(){if(!e.disabled){if(o.value){i.value=!i.value;return}n.value=e.value}}const a=s.computed(()=>typeof e.focusable=="boolean"?e.focusable:!e.disabled&&(!i.value||!o.value));function d(h){return h.children&&h.children.length?h.children.some(d):e.modelValue===h.value}const c=s.computed(()=>{const h=d(e);return o.value?h&&i.value:h}),u=s.computed(()=>e.children?e.children.map(({modelValue:h,indentation:p,active:m,focusable:g,...b})=>{const y=d(b);return{...b,expand:y,focusable:!b.disabled&&!i.value}}):[]),f=s.computed(()=>{switch(e.indentation){case 1:return 16;case 2:return 56;case 3:return 72;default:return 80}});return(h,p)=>{const m=s.resolveComponent("FmCollapsibleTab",!0),g=s.resolveDirective("wave");return s.openBlock(),s.createElementBlock("div",m4,[s.withDirectives((s.openBlock(),s.createElementBlock("button",{class:s.normalizeClass(["flex fm-corner-radius-lg gap-12 items-center px-24 py-16 focus-visible:outline-none",{"cursor-pointer focus-visible:bg-fm-color-opacity-md hover:bg-fm-color-opacity-sm ":!h.disabled,"cursor-not-allowed":h.disabled,"bg-fm-color-system-warning-100":c.value}]),style:s.normalizeStyle({paddingLeft:`${f.value}px`}),tabindex:a.value?"0":"-1",type:"button",onClick:l},[h.icon?(s.openBlock(),s.createBlock(z,{key:0,name:h.icon,class:s.normalizeClass({"text-fm-color-typo-disabled":h.disabled,"text-fm-color-typo-primary":!h.disabled&&!c.value,"text-fm-color-primary":!h.disabled&&c.value})},null,8,["name","class"])):s.createCommentVNode("",!0),s.createElementVNode("div",{class:s.normalizeClass(["flex-1 fm-typo-body-lg-700 text-left",{"text-fm-color-typo-primary":!h.disabled,"text-fm-color-typo-disabled":h.disabled}])},s.toDisplayString(h.label),3),h.badge?(s.openBlock(),s.createBlock(Qt,{key:1,value:h.badge,inline:"",variant:"numeric"},null,8,["value"])):s.createCommentVNode("",!0),o.value?(s.openBlock(),s.createElementBlock("div",{key:2,class:"flex h-24 items-center w-24",style:s.normalizeStyle({transformOrigin:"center",transform:`rotate(${i.value?"0":"180"}deg)`,transition:"transform ease-out 250ms"})},[s.createVNode(z,{class:s.normalizeClass({"text-fm-color-neutral-gray-300":!h.disabled,"text-fm-color-typo-disabled":h.disabled}),size:"md",name:"expand_more"},null,8,["class"])],4)):s.createCommentVNode("",!0)],14,g4)),[[g,!h.disabled]]),o.value?(s.openBlock(),s.createElementBlock("div",{key:0,class:"flex flex-col overflow-hidden",style:s.normalizeStyle({maxHeight:i.value?0:`${r.value}px`,transition:"max-height 250ms",transitionTimingFunction:i.value?"ease-out":"ease-in"})},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(u.value,(b,y)=>(s.openBlock(),s.createBlock(m,s.mergeProps({key:y},b,{"model-value":s.unref(n),"onUpdate:modelValue":p[0]||(p[0]=$=>s.isRef(n)?n.value=$:null),indentation:h.indentation+1}),null,16,["model-value","indentation"]))),128))],4)):s.createCommentVNode("",!0)])}}}),y4={class:"flex flex-col"},$4=s.defineComponent({__name:"FmCollapsibleTabs",props:{modelValue:{default:void 0},items:{default:()=>[]}},setup(t){const e=t,n=X(e,"modelValue"),o=s.computed(()=>e.items?e.items.map(({modelValue:r,...l})=>l):[]);function i(r){function l(d){return d.children?d.children.flatMap(l):[d.value]}return(r.children?r.children.flatMap(l):[r.value]).includes(e.modelValue)}return(r,l)=>(s.openBlock(),s.createElementBlock("div",y4,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.value,(a,d)=>(s.openBlock(),s.createBlock(b4,s.mergeProps({key:d},a,{"model-value":s.unref(n),"onUpdate:modelValue":l[0]||(l[0]=c=>s.isRef(n)?n.value=c:null),active:i(a),expand:i(a)}),null,16,["model-value","active","expand"]))),128))]))}}),_4=s.defineComponent({__name:"FmAvatar",props:{initials:{default:()=>""},name:{default:()=>""},src:{default:void 0},size:{default:()=>"md"}},setup(t){const e=t,n=s.computed(()=>{if(e.initials)return e.initials.slice(0,2);if(e.name){const[o,i]=e.name.split(" ");return i?`${o[0]}${i[0]}`:o.slice(0,2)}return e.src?"":"?"});return(o,i)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["inline-flex items-center justify-center rounded-xxxl uppercase",{"w-24 h-24 fm-typo-body-sm-700":o.size==="sm","w-40 h-40 fm-typo-body-md-700":o.size==="md","w-48 h-48 fm-typo-body-lg-700":o.size==="lg","w-56 h-56 fm-typo-body-lg-700":o.size==="xl","bg-fm-color-neutral-gray-100":!e.src}]),style:s.normalizeStyle({background:e.src?`url(${e.src})`:void 0,backgroundSize:e.src?"cover":void 0,backgroundPosition:e.src?"center":void 0,backgroundRepeat:e.src?"no-repeat":void 0})},s.toDisplayString(n.value),7))}}),w4=s.defineComponent({__name:"FmThumbnail",props:{src:{default:void 0},icon:{default:t=>t.src?"":"image"},size:{default:()=>"md"}},setup(t){const e=t;return(n,o)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["inline-flex items-center justify-center fm-corner-radius-md border-1 border-fm-color-neutral-gray-300",{"w-24 h-24 fm-typo-body-sm-700":n.size==="sm","w-40 h-40 fm-typo-body-md-700":n.size==="md","w-56 h-56 fm-typo-body-lg-700":n.size==="lg","w-72 h-72 fm-typo-body-lg-700":n.size==="xl","text-fm-color-neutral-gray-300 bg-fm-color-neutral-gray-100":!e.src}]),style:s.normalizeStyle({background:e.src?`url(${e.src})`:void 0,backgroundSize:e.src?"cover":void 0,backgroundPosition:e.src?"center":void 0,backgroundRepeat:e.src?"no-repeat":void 0})},[n.icon?(s.openBlock(),s.createBlock(z,{key:0,name:n.icon},null,8,["name"])):s.createCommentVNode("",!0)],6))}}),x4={class:"bg-white flex gap-4 items-center"},C4={class:"flex gap-4 items-center xs:hidden"},k4={class:"hidden xs:flex"},S4={class:"absolute bottom-16 hidden right-16 xs:inline"},vc={FmBadge:Qt,FmBottomSheet:hr,FmBreadcrumb:au,FmButton:K,FmButtonGroup:vu,FmCard:Du,FmCardActions:Mu,FmCardHeader:Bu,FmCardMedia:Nu,FmCardSection:gi,FmCardSubtitle:wr,FmCardTitle:_r,FmChip:xr,FmChipGroup:Cr,FmDialog:Ou,FmDropField:zu,FmDynamicDialog:kr,FmLineChart:d0,FmPieChart:m0,FmBarChart:w0,FmCheckbox:Wa,FmDatePicker:W1,FmDatePickerMobile:md,FmDateRangePicker:tb,FmDateRangePickerMobile:$d,FmField:me,FmForm:nb,FmFormGroup:Me,FmHelperText:Ua,FmLabel:Xt,FmPhoneNumber:h$,FmPinField:b$,FmRadio:S$,FmRadioGroup:v$,FmSearch:tc,FmGlobalSearch:e3,FmSelect:zo,FmStepperField:i3,FmSwitch:$s,FmTextField:Fs,FmTextarea:l3,FmTimeInput:Ko,FmTimePicker:v3,FmTimeRangePicker:F3,FmIcon:z,FmList:lc,FmListItem:ac,FmMenu:Tn,FmMenuDeprecated:Zo,FmMenuDivider:gd,FmMenuHeader:I3,FmMenuItem:Ie,FmCircularProgress:qn,FmLinearProgress:W3,FmSideSheet:Z3,FmSnackbar:dc,FmSpacer:Xn,FmStep:s_,FmStepper:a_,FmTab:cc,FmTable:u4,FmTabs:p4,FmCollapsibleTabs:$4,FmTooltip:cd,FmAvatar:_4,FmThumbnail:w4,FmPageHead:s.defineComponent({__name:"FmPageHead",props:{title:{default:()=>""},description:{default:()=>""},backButton:{type:Boolean,default:()=>!1},actions:{default:()=>[]}},emits:["click:back","click:action"],setup(t,{emit:e}){const n=t,o=e,i=s.computed(()=>{const l=[...n.actions],a=l.findIndex(h=>h.isPrimary),d=l[a],[c,u,...f]=l.filter((h,p)=>p!==a);return{primaryAction:d,firstSecondaryAction:c,secondSecondaryAction:u,showMoreSecondary:f,bottomSheetActions:l.filter(h=>!h.isPrimary),fabActions:l.filter(h=>h.isPrimary)}}),r=s.ref(!1);return(l,a)=>(s.openBlock(),s.createElementBlock("div",x4,[l.backButton?(s.openBlock(),s.createBlock(K,{key:0,type:"button",size:"md",variant:"tertiary",icon:"arrow_back","icon-color":"black",onClick:a[0]||(a[0]=d=>o("click:back"))})):s.createCommentVNode("",!0),s.createVNode(Os,{class:"flex-grow",title:l.title,description:l.description,"title-bold":""},null,8,["title","description"]),s.createElementVNode("div",C4,[i.value.firstSecondaryAction?(s.openBlock(),s.createBlock(K,{key:0,label:i.value.firstSecondaryAction.label,"prepend-icon":i.value.firstSecondaryAction.prependIcon,"append-icon":i.value.firstSecondaryAction.appendIcon,type:"button",variant:"tertiary",size:"md",onClick:a[1]||(a[1]=d=>o("click:action",i.value.firstSecondaryAction.value))},null,8,["label","prepend-icon","append-icon"])):s.createCommentVNode("",!0),i.value.secondSecondaryAction?(s.openBlock(),s.createBlock(K,{key:1,label:i.value.secondSecondaryAction.label,"prepend-icon":i.value.secondSecondaryAction.prependIcon,"append-icon":i.value.secondSecondaryAction.appendIcon,type:"button",variant:"tertiary",size:"md",onClick:a[2]||(a[2]=d=>o("click:action",i.value.secondSecondaryAction.value))},null,8,["label","prepend-icon","append-icon"])):s.createCommentVNode("",!0),i.value.showMoreSecondary.length>1?(s.openBlock(),s.createBlock(Tn,{key:2},{"menu-button":s.withCtx(()=>[s.createVNode(K,{label:"More","append-icon":"expand_more","icon-color":"black",type:"button",variant:"tertiary",size:"md"})]),default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.value.showMoreSecondary,d=>(s.openBlock(),s.createBlock(Ie,{key:d.value,label:d.label,icon:d.prependIcon,onClick:c=>o("click:action",d.value)},null,8,["label","icon","onClick"]))),128))]),_:1})):i.value.showMoreSecondary.length===1?(s.openBlock(),s.createBlock(K,{key:3,label:i.value.showMoreSecondary[0].label,"prepend-icon":i.value.showMoreSecondary[0].prependIcon,"append-icon":i.value.showMoreSecondary[0].appendIcon,type:"button",variant:"tertiary",size:"md",onClick:a[3]||(a[3]=d=>o("click:action",i.value.showMoreSecondary[0].value))},null,8,["label","prepend-icon","append-icon"])):s.createCommentVNode("",!0),i.value.primaryAction?(s.openBlock(),s.createBlock(K,{key:4,label:i.value.primaryAction.label,"prepend-icon":i.value.primaryAction.prependIcon,"append-icon":i.value.primaryAction.appendIcon,type:"button",variant:"primary",size:"md",onClick:a[4]||(a[4]=d=>o("click:action",i.value.primaryAction.value))},null,8,["label","prepend-icon","append-icon"])):s.createCommentVNode("",!0)]),s.createElementVNode("div",k4,[s.createVNode(K,{type:"button",size:"md",variant:"tertiary",icon:"more_vert","icon-color":"black",onClick:a[5]||(a[5]=d=>r.value=!0)})]),s.createVNode(hr,{"model-value":r.value,"onUpdate:modelValue":a[6]||(a[6]=d=>r.value=d),"dismiss-away":""},{default:s.withCtx(()=>[s.createVNode(lc,null,{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.value.bottomSheetActions,d=>(s.openBlock(),s.createBlock(ac,{key:d.value,class:"hover:bg-fm-color-neutral-gray-100",label:d.label,onClick:c=>{o("click:action",d.value),r.value=!1}},null,8,["label","onClick"]))),128))]),_:1})]),_:1},8,["model-value"]),(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[s.createElementVNode("div",S4,[i.value.primaryAction?(s.openBlock(),s.createBlock(K,{key:0,class:"fm-shadow-light-100",label:i.value.primaryAction.label,"prepend-icon":i.value.primaryAction.prependIcon,"append-icon":i.value.primaryAction.appendIcon,type:"button",variant:"fab",size:"md",onClick:a[7]||(a[7]=d=>o("click:action",i.value.primaryAction.value))},null,8,["label","prepend-icon","append-icon"])):s.createCommentVNode("",!0)])]))]))}}),FmTopSheet:nc},v4=s.defineComponent({__name:"FmTooltipDirective",props:{reference:{},placement:{default:"top"},content:{default:""},disabled:{type:Boolean,default:!1},hideArrow:{type:Boolean,default:!1}},setup(t){const e=t,n=s.ref(!1),o=s.ref(null),i=s.ref(null),r=s.computed(()=>e.reference());let l;const{floatingStyles:a,middlewareData:d,placement:c}=On(r,o,{whileElementsMounted:An,placement:e.placement,middleware:[Pn(),Nn({mainAxis:6}),ld({element:i})]}),u=s.computed(()=>{var m,g,b,y;const p={top:"bottom",right:"left",bottom:"top",left:"right"}[c.value];return{left:((m=d.value.arrow)==null?void 0:m.x)!=null?`${(g=d.value.arrow)==null?void 0:g.x}px`:"",top:((b=d.value.arrow)==null?void 0:b.y)!=null?`${(y=d.value.arrow)==null?void 0:y.y}px`:"",[p]:"-3px"}}),f=()=>{e.disabled||(l&&clearTimeout(l),l=setTimeout(()=>{n.value=!0},250))},h=()=>{e.disabled||(l&&clearTimeout(l),l=setTimeout(()=>{n.value=!1},250))};return s.onMounted(()=>{r.value.addEventListener("pointerdown",f),r.value.addEventListener("pointermove",p=>{p.pointerType!=="touch"&&f()}),r.value.addEventListener("pointerleave",h),r.value.addEventListener("pointerup",h)}),s.onBeforeUnmount(()=>{r.value.removeEventListener("pointerdown",f),r.value.removeEventListener("pointermove",p=>{p.pointerType!=="touch"&&f()}),r.value.removeEventListener("pointerleave",h),r.value.removeEventListener("pointerup",h)}),(p,m)=>n.value&&!p.disabled?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"tooltipContent",ref:o,class:"bg-fm-color-neutral-black fm-shadow-light-300 fm-typo-body-sm-400 max-w-[240px] px-16 py-12 rounded-lg text-fm-color-typo-white",style:s.normalizeStyle(s.unref(a))},[s.withDirectives(s.createElementVNode("div",{ref_key:"arrowEl",ref:i,class:"absolute bg-fm-color-neutral-black h-8 rotate-45 rounded-[2px] w-8",style:s.normalizeStyle(u.value)},null,4),[[s.vShow,!p.hideArrow]]),s.createTextVNode(" "+s.toDisplayString(p.content),1)],4)):s.createCommentVNode("",!0)}});let tr;const wt=s.ref([]);let Dc=0;const D4=()=>{if(tr)return;const t=document.createElement("div");document.body.appendChild(t),tr=s.createApp({render:()=>wt.value.map(e=>s.h(v4,e))}),tr.mount(t)},ii=t=>{if(t){for(const e of["top","right","bottom","left"])if(t[e])return e}return"top"},Ec=(t,e)=>{const{value:n,modifiers:o}=e;D4(),t.$_fmTooltipId=Dc,Dc+=1,typeof n=="string"?wt.value.push({id:t.$_fmTooltipId,reference:()=>t,content:n.toString(),placement:ii(o),hideArrow:!1}):n&&typeof n=="object"&&wt.value.push({id:t.$_fmTooltipId,reference:()=>t,content:n.content.toString(),placement:ii(o),disabled:n.disabled??!1,hideArrow:n.hideArrow??!1})},E4={mounted:Ec,updated:(t,e)=>{const{value:n,modifiers:o}=e,i=wt.value.findIndex(r=>r.id===t.$_fmTooltipId);if(i===-1){Ec(t,e);return}typeof n=="string"?wt.value[i]={id:t.$_fmTooltipId,reference:()=>t,content:n.toString(),placement:ii(o),hideArrow:!1}:n&&typeof n=="object"&&(wt.value[i]={id:t.$_fmTooltipId,reference:()=>t,content:n.content.toString(),disabled:n.disabled??!1,placement:ii(o),hideArrow:n.hideArrow??!1})},beforeUnmount:t=>{const e=wt.value.findIndex(n=>n.id===t.$_fmTooltipId);e!==-1&&wt.value.splice(e,1)}},si=16,M4=s.defineComponent({__name:"FmSnackbarToast",setup(t){const{breakpoints:e}=No(),n=s.inject(mi),o=s.computed(()=>{var l;return[...((l=n==null?void 0:n.store)==null?void 0:l.snackbars)??[]].reduce(({currentSum:a,tops:d},c)=>{d.push({id:c.id,accumulatedHeight:a});const u=c.mountStage===xt.EXPIRED?0:si+c.renderedHeight;return{currentSum:a+u,tops:d}},{currentSum:si,tops:new Array}).tops}),i=s.computed(()=>{var r,l;return(l=(r=n==null?void 0:n.store)==null?void 0:r.snackbars)==null?void 0:l.map(a=>{var c,u,f,h,p,m;let d=0;switch(a.mountStage){case xt.PREMOUNT:{d=e.value.xs?0:si;break}case xt.MOUNTED:{d=((f=(u=(c=o.value)==null?void 0:c.find)==null?void 0:u.call(c,g=>g.id===a.id))==null?void 0:f.accumulatedHeight)||si;break}case xt.EXPIRED:{d=((m=(p=(h=o.value)==null?void 0:h.find)==null?void 0:p.call(h,g=>g.id===a.id))==null?void 0:m.accumulatedHeight)||0,d=Math.max(0,d-a.renderedHeight);break}}return{...a,top:d}})});return(r,l)=>(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.value,a=>(s.openBlock(),s.createBlock(s.Teleport,{key:a.id,to:"body"},[s.createVNode(dc,{class:"fixed transition-all",variant:a.type,title:a.title,description:a.message,action:a.action,dismissable:a.dismissable,style:s.normalizeStyle(s.unref(e).xs?{bottom:`${a.top}px`,width:"calc(100vw - 32px)",right:"16px",opacity:a.mountStage===s.unref(xt).EXPIRED?0:1}:{top:`${a.top}px`,right:a.mountStage===s.unref(xt).PREMOUNT?"-20px":"16px",opacity:a.mountStage===s.unref(xt).EXPIRED?0:1}),onVnodeMounted:d=>{var c;return(c=s.unref(n))==null?void 0:c.onSnackbarMounted(a.id,d.el.scrollHeight)},onOnAction:()=>{var d,c;(d=a==null?void 0:a.onAction)==null||d.call(a),(c=s.unref(n))==null||c.close(a.id)},onOnDismiss:()=>{var d;return(d=s.unref(n))==null?void 0:d.close(a.id)}},null,8,["variant","title","description","action","dismissable","style","onVnodeMounted","onOnAction","onOnDismiss"])]))),128))}});var xt=(t=>(t.PREMOUNT="PREMOUNT",t.MOUNTED="MOUNTED",t.EXPIRED="EXPIRED",t))(xt||{});class V4{constructor(){I(this,"store",s.reactive({snackbars:new Array}))}open(e,n){const o=Math.random().toString(16).slice(2),i=[{...e,id:o,mountStage:"PREMOUNT",duration:n===null?null:n??5e3,renderedHeight:0,type:(e==null?void 0:e.type)??"info",dismissable:typeof(e==null?void 0:e.dismissable)=="boolean"?e.dismissable:!0},...this.store.snackbars];return this.store.snackbars=i,o}onSnackbarMounted(e,n){const o=this.store.snackbars.findIndex(r=>r.id===e);if(o===-1)return;const i=this.store.snackbars[o];this.store.snackbars[o]={...i,renderedHeight:n},setTimeout(()=>{const r=this.store.snackbars[o];this.store.snackbars[o]={...r,mountStage:"MOUNTED"}}),typeof i.duration=="number"&&setTimeout(()=>{this.close(e)},i.duration)}close(e){const n=this.store.snackbars.findIndex(i=>i.id===e);if(n===-1)return;const o=this.store.snackbars[n];this.store.snackbars[n]={...o,mountStage:"EXPIRED"},setTimeout(()=>{this.removeSnackbar(e)},500)}removeSnackbar(e){const n=this.store.snackbars.findIndex(o=>o.id===e);n!==-1&&this.store.snackbars.splice(n,1)}}const B4={install(t){t.provide(mi,new V4);const e=document.body,n=s.createVNode(M4);n.appContext=t._context,s.render(n,e)}},f8="";function P4(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);var n=t.indexOf("Trident/");if(n>0){var o=t.indexOf("rv:");return parseInt(t.substring(o+3,t.indexOf(".",o)),10)}var i=t.indexOf("Edge/");return i>0?parseInt(t.substring(i+5,t.indexOf(".",i)),10):-1}let ri;function nr(){nr.init||(nr.init=!0,ri=P4()!==-1)}var li={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){nr(),s.nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const t=document.createElement("object");this._resizeObject=t,t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex",-1),t.onload=this.addResizeHandlers,t.type="text/html",ri&&this.$el.appendChild(t),t.data="about:blank",ri||this.$el.appendChild(t)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!ri&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const N4=s.withScopeId("data-v-b329ee4c");s.pushScopeId("data-v-b329ee4c");const F4={class:"resize-observer",tabindex:"-1"};s.popScopeId();const R4=N4((t,e,n,o,i,r)=>(s.openBlock(),s.createBlock("div",F4)));li.render=R4,li.__scopeId="data-v-b329ee4c",li.__file="src/components/ResizeObserver.vue";function ai(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ai=function(e){return typeof e}:ai=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ai(t)}function A4(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Mc(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function O4(t,e,n){return e&&Mc(t.prototype,e),n&&Mc(t,n),t}function Vc(t){return I4(t)||T4(t)||L4(t)||z4()}function I4(t){if(Array.isArray(t))return or(t)}function T4(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function L4(t,e){if(t){if(typeof t=="string")return or(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return or(t,e)}}function or(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function z4(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
55
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H4(t){var e;return typeof t=="function"?e={callback:t}:e=t,e}function j4(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,r,l=function(d){for(var c=arguments.length,u=new Array(c>1?c-1:0),f=1;f<c;f++)u[f-1]=arguments[f];if(r=u,!(o&&d===i)){var h=n.leading;typeof h=="function"&&(h=h(d,i)),(!o||d!==i)&&h&&t.apply(void 0,[d].concat(Vc(r))),i=d,clearTimeout(o),o=setTimeout(function(){t.apply(void 0,[d].concat(Vc(r))),o=0},e)}};return l._clear=function(){clearTimeout(o),o=null},l}function Bc(t,e){if(t===e)return!0;if(ai(t)==="object"){for(var n in t)if(!Bc(t[n],e[n]))return!1;return!0}return!1}var W4=function(){function t(e,n,o){A4(this,t),this.el=e,this.observer=null,this.frozen=!1,this.createObserver(n,o)}return O4(t,[{key:"createObserver",value:function(n,o){var i=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=H4(n),this.callback=function(a,d){i.options.callback(a,d),a&&i.options.once&&(i.frozen=!0,i.destroyObserver())},this.callback&&this.options.throttle){var r=this.options.throttleOptions||{},l=r.leading;this.callback=j4(this.callback,this.options.throttle,{leading:function(d){return l==="both"||l==="visible"&&d||l==="hidden"&&!d}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(a){var d=a[0];if(a.length>1){var c=a.find(function(f){return f.isIntersecting});c&&(d=c)}if(i.callback){var u=d.isIntersecting&&d.intersectionRatio>=i.threshold;if(u===i.oldResult)return;i.oldResult=u,i.callback(u,d)}},this.options.intersection),s.nextTick(function(){i.observer&&i.observer.observe(i.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),t}();function Pc(t,e,n){var o=e.value;if(o)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var i=new W4(t,o,n);t._vue_visibilityState=i}}function Y4(t,e,n){var o=e.value,i=e.oldValue;if(!Bc(o,i)){var r=t._vue_visibilityState;if(!o){Nc(t);return}r?r.createObserver(o,n):Pc(t,{value:o},n)}}function Nc(t){var e=t._vue_visibilityState;e&&(e.destroyObserver(),delete t._vue_visibilityState)}var U4={beforeMount:Pc,updated:Y4,unmounted:Nc};function G4(t){return{all:t=t||new Map,on:function(e,n){var o=t.get(e);o&&o.push(n)||t.set(e,[n])},off:function(e,n){var o=t.get(e);o&&o.splice(o.indexOf(n)>>>0,1)},emit:function(e,n){(t.get(e)||[]).slice().map(function(o){o(n)}),(t.get("*")||[]).slice().map(function(o){o(e,n)})}}}var Fc={itemsLimit:1e3},q4=/(auto|scroll)/;function Rc(t,e){return t.parentNode===null?e:Rc(t.parentNode,e.concat([t]))}var ir=function(e,n){return getComputedStyle(e,null).getPropertyValue(n)},X4=function(e){return ir(e,"overflow")+ir(e,"overflow-y")+ir(e,"overflow-x")},K4=function(e){return q4.test(X4(e))};function Ac(t){if(t instanceof HTMLElement||t instanceof SVGElement){for(var e=Rc(t.parentNode,[]),n=0;n<e.length;n+=1)if(K4(e[n]))return e[n];return document.scrollingElement||document.documentElement}}function sr(t){"@babel/helpers - typeof";return sr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sr(t)}var Oc={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(e){return["vertical","horizontal"].includes(e)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function Ic(){return this.items.length&&sr(this.items[0])!=="object"}var rr=!1;if(typeof window<"u"){rr=!1;try{var Z4=Object.defineProperty({},"passive",{get:function(){rr=!0}});window.addEventListener("test",null,Z4)}catch{}}let J4=0;var Wn={name:"RecycleScroller",components:{ResizeObserver:li},directives:{ObserveVisibility:U4},props:{...Oc,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const t={"-1":{accumulator:0}},e=this.items,n=this.sizeField,o=this.minItemSize;let i=1e4,r=0,l;for(let a=0,d=e.length;a<d;a++)l=e[a][n]||o,l<i&&(i=l),r+=l,t[a]={accumulator:r,size:l};return this.$_computedMinItemSize=i,t}return[]},simpleArray:Ic,itemIndexByKey(){const{keyField:t,items:e}=this,n={};for(let o=0,i=e.length;o<i;o++)n[e[o][t]]=o;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const t=this.$_lastUpdateScrollPosition;typeof t=="number"&&this.$nextTick(()=>{this.scrollToPosition(t)})},beforeUnmount(){this.removeListeners()},methods:{addView(t,e,n,o,i){const r=s.markRaw({id:J4++,index:e,used:!0,key:o,type:i}),l=s.shallowReactive({item:n,position:0,nr:r});return t.push(l),l},unuseView(t,e=!1){const n=this.$_unusedViews,o=t.nr.type;let i=n.get(o);i||(i=[],n.set(o,i)),i.push(t),e||(t.nr.used=!1,t.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(t){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const e=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});e(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&e()},this.updateInterval))}},handleVisibilityChange(t,e){this.ready&&(t||e.boundingClientRect.width!==0||e.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(t,e=!1){const n=this.itemSize,o=this.gridItems||1,i=this.itemSecondarySize||n,r=this.$_computedMinItemSize,l=this.typeField,a=this.simpleArray?null:this.keyField,d=this.items,c=d.length,u=this.sizes,f=this.$_views,h=this.$_unusedViews,p=this.pool,m=this.itemIndexByKey;let g,b,y,$,k;if(!c)g=b=$=k=y=0;else if(this.$_prerender)g=$=0,b=k=Math.min(this.prerender,d.length),y=null;else{const P=this.getScroll();if(e){let E=P.start-this.$_lastUpdateScrollPosition;if(E<0&&(E=-E),n===null&&E<r||E<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=P.start;const w=this.buffer;P.start-=w,P.end+=w;let _=0;if(this.$refs.before&&(_=this.$refs.before.scrollHeight,P.start-=_),this.$refs.after){const E=this.$refs.after.scrollHeight;P.end+=E}if(n===null){let E,S=0,D=c-1,C=~~(c/2),V;do V=C,E=u[C].accumulator,E<P.start?S=C:C<c-1&&u[C+1].accumulator>P.start&&(D=C),C=~~((S+D)/2);while(C!==V);for(C<0&&(C=0),g=C,y=u[c-1].accumulator,b=C;b<c&&u[b].accumulator<P.end;b++);for(b===-1?b=d.length-1:(b++,b>c&&(b=c)),$=g;$<c&&_+u[$].accumulator<P.start;$++);for(k=$;k<c&&_+u[k].accumulator<P.end;k++);}else{g=~~(P.start/n*o);const E=g%o;g-=E,b=Math.ceil(P.end/n*o),$=Math.max(0,Math.floor((P.start-_)/n*o)),k=Math.floor((P.end-_)/n*o),g<0&&(g=0),b>c&&(b=c),$<0&&($=0),k>c&&(k=c),y=Math.ceil(c/o)*n}}b-g>Fc.itemsLimit&&this.itemsLimitError(),this.totalSize=y;let v;const x=g<=this.$_endIndex&&b>=this.$_startIndex;if(x)for(let P=0,w=p.length;P<w;P++)v=p[P],v.nr.used&&(t&&(v.nr.index=m[v.item[a]]),(v.nr.index==null||v.nr.index<g||v.nr.index>=b)&&this.unuseView(v));const B=x?null:new Map;let M,N,F;for(let P=g;P<b;P++){M=d[P];const w=a?M[a]:M;if(w==null)throw new Error(`Key is ${w} on item (keyField is '${a}')`);if(v=f.get(w),!n&&!u[P].size){v&&this.unuseView(v);continue}N=M[l];let _=h.get(N),E=!1;if(!v)x?_&&_.length?v=_.pop():v=this.addView(p,P,M,w,N):(F=B.get(N)||0,(!_||F>=_.length)&&(v=this.addView(p,P,M,w,N),this.unuseView(v,!0),_=h.get(N)),v=_[F],B.set(N,F+1)),f.delete(v.nr.key),v.nr.used=!0,v.nr.index=P,v.nr.key=w,v.nr.type=N,f.set(w,v),E=!0;else if(!v.nr.used&&(v.nr.used=!0,E=!0,_)){const S=_.indexOf(v);S!==-1&&_.splice(S,1)}v.item=M,E&&(P===d.length-1&&this.$emit("scroll-end"),P===0&&this.$emit("scroll-start")),n===null?(v.position=u[P-1].accumulator,v.offset=0):(v.position=Math.floor(P/o)*n,v.offset=P%o*i)}return this.$_startIndex=g,this.$_endIndex=b,this.emitUpdate&&this.$emit("update",g,b,$,k),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:x}},getListenerTarget(){let t=Ac(this.$el);return window.document&&(t===window.document.documentElement||t===window.document.body)&&(t=window),t},getScroll(){const{$el:t,direction:e}=this,n=e==="vertical";let o;if(this.pageMode){const i=t.getBoundingClientRect(),r=n?i.height:i.width;let l=-(n?i.top:i.left),a=n?window.innerHeight:window.innerWidth;l<0&&(a+=l,l=0),l+a>r&&(a=r-l),o={start:l,end:l+a}}else n?o={start:t.scrollTop,end:t.scrollTop+t.clientHeight}:o={start:t.scrollLeft,end:t.scrollLeft+t.clientWidth};return o},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,rr?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(t){let e;const n=this.gridItems||1;this.itemSize===null?e=t>0?this.sizes[t-1].accumulator:0:e=Math.floor(t/n)*this.itemSize,this.scrollToPosition(e)},scrollToPosition(t){const e=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,o,i;if(this.pageMode){const r=Ac(this.$el),l=r.tagName==="HTML"?0:r[e.scroll],a=r.getBoundingClientRect(),c=this.$el.getBoundingClientRect()[e.start]-a[e.start];n=r,o=e.scroll,i=t+l+c}else n=this.$el,o=e.scroll,i=t;n[o]=i},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((t,e)=>t.nr.index-e.nr.index)}}};const Q4={key:0,ref:"before",class:"vue-recycle-scroller__slot"},ew={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function tw(t,e,n,o,i,r){const l=s.resolveComponent("ResizeObserver"),a=s.resolveDirective("observe-visibility");return s.withDirectives((s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["vue-recycle-scroller",{ready:i.ready,"page-mode":n.pageMode,[`direction-${t.direction}`]:!0}]),onScrollPassive:e[0]||(e[0]=(...d)=>r.handleScroll&&r.handleScroll(...d))},[t.$slots.before?(s.openBlock(),s.createElementBlock("div",Q4,[s.renderSlot(t.$slots,"before")],512)):s.createCommentVNode("v-if",!0),(s.openBlock(),s.createBlock(s.resolveDynamicComponent(n.listTag),{ref:"wrapper",style:s.normalizeStyle({[t.direction==="vertical"?"minHeight":"minWidth"]:i.totalSize+"px"}),class:s.normalizeClass(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.pool,d=>(s.openBlock(),s.createBlock(s.resolveDynamicComponent(n.itemTag),s.mergeProps({key:d.nr.id,style:i.ready?{transform:`translate${t.direction==="vertical"?"Y":"X"}(${d.position}px) translate${t.direction==="vertical"?"X":"Y"}(${d.offset}px)`,width:n.gridItems?`${t.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${t.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&i.hoverKey===d.nr.key}]]},s.toHandlers(n.skipHover?{}:{mouseenter:()=>{i.hoverKey=d.nr.key},mouseleave:()=>{i.hoverKey=null}})),{default:s.withCtx(()=>[s.renderSlot(t.$slots,"default",{item:d.item,index:d.nr.index,active:d.nr.used})]),_:2},1040,["style","class"]))),128)),s.renderSlot(t.$slots,"empty")]),_:3},8,["style","class"])),t.$slots.after?(s.openBlock(),s.createElementBlock("div",ew,[s.renderSlot(t.$slots,"after")],512)):s.createCommentVNode("v-if",!0),s.createVNode(l,{onNotify:r.handleResize},null,8,["onNotify"])],34)),[[a,r.handleVisibilityChange]])}Wn.render=tw,Wn.__file="src/components/RecycleScroller.vue";var di={name:"DynamicScroller",components:{RecycleScroller:Wn},provide(){return typeof ResizeObserver<"u"&&(this.$_resizeObserver=new ResizeObserver(t=>{requestAnimationFrame(()=>{if(Array.isArray(t)){for(const e of t)if(e.target&&e.target.$_vs_onResize){let n,o;if(e.borderBoxSize){const i=e.borderBoxSize[0];n=i.inlineSize,o=i.blockSize}else n=e.contentRect.width,o=e.contentRect.height;e.target.$_vs_onResize(e.target.$_vs_id,n,o)}}})})),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},inheritAttrs:!1,props:{...Oc,minItemSize:{type:[Number,String],required:!0}},emits:["resize","visible"],data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:Ic,itemsWithSize(){const t=[],{items:e,keyField:n,simpleArray:o}=this,i=this.vscrollData.sizes,r=e.length;for(let l=0;l<r;l++){const a=e[l],d=o?l:a[n];let c=i[d];typeof c>"u"&&!this.$_undefinedMap[d]&&(c=0),t.push({item:a,id:d,size:c})}return t}},watch:{items(){this.forceUpdate()},simpleArray:{handler(t){this.vscrollData.simpleArray=t},immediate:!0},direction(t){this.forceUpdate(!0)},itemsWithSize(t,e){const n=this.$el.scrollTop;let o=0,i=0;const r=Math.min(t.length,e.length);for(let a=0;a<r&&!(o>=n);a++)o+=e[a].size||this.minItemSize,i+=t[a].size||this.minItemSize;const l=i-o;l!==0&&(this.$el.scrollTop+=l)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={},this.$_events=G4()},activated(){this.vscrollData.active=!0},deactivated(){this.vscrollData.active=!1},unmounted(){this.$_events.all.clear()},methods:{onScrollerResize(){this.$refs.scroller&&this.forceUpdate(),this.$emit("resize")},onScrollerVisible(){this.$_events.emit("vscroll:update",{force:!1}),this.$emit("visible")},forceUpdate(t=!1){(t||this.simpleArray)&&(this.vscrollData.sizes={}),this.$_events.emit("vscroll:update",{force:!0})},scrollToItem(t){const e=this.$refs.scroller;e&&e.scrollToItem(t)},getItemSize(t,e=void 0){const n=this.simpleArray?e??this.items.indexOf(t):t[this.keyField];return this.vscrollData.sizes[n]||0},scrollToBottom(){if(this.$_scrollingToBottom)return;this.$_scrollingToBottom=!0;const t=this.$el;this.$nextTick(()=>{t.scrollTop=t.scrollHeight+5e3;const e=()=>{t.scrollTop=t.scrollHeight+5e3,requestAnimationFrame(()=>{t.scrollTop=t.scrollHeight+5e3,this.$_undefinedSizes===0?this.$_scrollingToBottom=!1:requestAnimationFrame(e)})};requestAnimationFrame(e)})}}};function nw(t,e,n,o,i,r){const l=s.resolveComponent("RecycleScroller");return s.openBlock(),s.createBlock(l,s.mergeProps({ref:"scroller",items:r.itemsWithSize,"min-item-size":n.minItemSize,direction:t.direction,"key-field":"id","list-tag":t.listTag,"item-tag":t.itemTag},t.$attrs,{onResize:r.onScrollerResize,onVisible:r.onScrollerVisible}),{default:s.withCtx(({item:a,index:d,active:c})=>[s.renderSlot(t.$slots,"default",s.normalizeProps(s.guardReactiveProps({item:a.item,index:d,active:c,itemWithSize:a})))]),before:s.withCtx(()=>[s.renderSlot(t.$slots,"before")]),after:s.withCtx(()=>[s.renderSlot(t.$slots,"after")]),empty:s.withCtx(()=>[s.renderSlot(t.$slots,"empty")]),_:3},16,["items","min-item-size","direction","list-tag","item-tag","onResize","onVisible"])}di.render=nw,di.__file="src/components/DynamicScroller.vue";var lr={name:"DynamicScrollerItem",inject:["vscrollData","vscrollParent","vscrollResizeObserver"],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},emitResize:{type:Boolean,default:!1},tag:{type:String,default:"div"}},emits:["resize"],computed:{id(){if(this.vscrollData.simpleArray)return this.index;if(this.vscrollData.keyField in this.item)return this.item[this.vscrollData.keyField];throw new Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)},size(){return this.vscrollData.sizes[this.id]||0},finalActive(){return this.active&&this.vscrollData.active}},watch:{watchData:"updateWatchData",id(t,e){if(this.$el.$_vs_id=this.id,this.size||this.onDataUpdate(),this.$_sizeObserved){const n=this.vscrollData.sizes[e],o=this.vscrollData.sizes[t];n!=null&&n!==o&&this.applySize(n)}},finalActive(t){this.size||(t?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?t?this.observeSize():this.unobserveSize():t&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created(){if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver)){for(const t in this.sizeDependencies)this.$watch(()=>this.sizeDependencies[t],this.onDataUpdate);this.vscrollParent.$_events.on("vscroll:update",this.onVscrollUpdate)}},mounted(){this.finalActive&&(this.updateSize(),this.observeSize())},beforeUnmount(){this.vscrollParent.$_events.off("vscroll:update",this.onVscrollUpdate),this.unobserveSize()},methods:{updateSize(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData(){this.watchData&&!this.vscrollResizeObserver?this.$_watchData=this.$watch("item",()=>{this.onDataUpdate()},{deep:!0}):this.$_watchData&&(this.$_watchData(),this.$_watchData=null)},onVscrollUpdate({force:t}){!this.finalActive&&t&&(this.$_pendingVScrollUpdate=this.id),(this.$_forceNextVScrollUpdate===this.id||t||!this.size)&&this.updateSize()},onDataUpdate(){this.updateSize()},computeSize(t){this.$nextTick(()=>{if(this.id===t){const e=this.$el.offsetWidth,n=this.$el.offsetHeight;this.applyWidthHeight(e,n)}this.$_pendingSizeUpdate=null})},applyWidthHeight(t,e){const n=~~(this.vscrollParent.direction==="vertical"?e:t);n&&this.size!==n&&this.applySize(n)},applySize(t){this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.vscrollData.sizes[this.id]=t,this.emitResize&&this.$emit("resize",this.id)},observeSize(){this.vscrollResizeObserver&&(this.$_sizeObserved||(this.vscrollResizeObserver.observe(this.$el),this.$el.$_vs_id=this.id,this.$el.$_vs_onResize=this.onResize,this.$_sizeObserved=!0))},unobserveSize(){this.vscrollResizeObserver&&this.$_sizeObserved&&(this.vscrollResizeObserver.unobserve(this.$el),this.$el.$_vs_onResize=void 0,this.$_sizeObserved=!1)},onResize(t,e,n){this.id===t&&this.applyWidthHeight(e,n)}},render(){return s.h(this.tag,this.$slots.default())}};lr.__file="src/components/DynamicScrollerItem.vue";function ow(t,e){t.component("".concat(e,"recycle-scroller"),Wn),t.component("".concat(e,"RecycleScroller"),Wn),t.component("".concat(e,"dynamic-scroller"),di),t.component("".concat(e,"DynamicScroller"),di),t.component("".concat(e,"dynamic-scroller-item"),lr),t.component("".concat(e,"DynamicScrollerItem"),lr)}var iw={version:"2.0.0-beta.8",install:function(e,n){var o=Object.assign({},{installComponents:!0,componentsPrefix:""},n);for(var i in o)typeof o[i]<"u"&&(Fc[i]=o[i]);o.installComponents&&ow(e,o.componentsPrefix)}};function sw(){const t=s.inject(br);if(!t)throw new Error("No provider");return t}function rw(){var t;return(t=s.getCurrentInstance())==null?void 0:t.emit}function lw(){const t=rw();return{emitData(e){t==null||t("dialog:emit-data",e)}}}function aw(){return s.inject(mi)}const dw=t=>{t.use(qc,{duration:.3,color:"var(--fm-color-opacity-sm)",initialOpacity:1,finalOpacity:.1,dissolveDuration:.6}),t.directive("tooltip",E4),t.use(Yu),t.use(B4),t.use(iw),Object.entries(vc).forEach(([e,n])=>{t.component(e,n)})};le.FeedMeUI=dw,le.components=vc,le.useBreakpoints=No,le.useDialog=sw,le.useDialogChild=lw,le.useFocus=In,le.useFormChild=fd,le.useProxiedModel=X,le.useSnackbar=aw,le.useValidation=ud,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});
|