@konstructio/ui 0.1.2-alpha.105 → 0.1.2-alpha.107
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/README.md +118 -31
- package/dist/{AdditionalOptions-D0BAS2HG.js → AdditionalOptions-Crcnz0_g.js} +1 -1
- package/dist/{AlertDialogTrigger-BGo_acd5.js → AlertDialogTrigger-ouMGAlJW.js} +39 -39
- package/dist/{Breadcrumb-Cp3abB2w.js → Breadcrumb-MrF1Z6w2.js} +3 -3
- package/dist/{Checkbox-B_ngk9Dj.js → Checkbox-8KnRLpQG.js} +60 -61
- package/dist/{CommandInput-BLq69pOT.js → CommandInput-CGnqfudl.js} +4 -4
- package/dist/{Counter-BV680M5r.js → Counter-CDXdP1Af.js} +3 -3
- package/dist/{DayPicker-kweJz134.js → DayPicker-C22j0Y-u.js} +539 -518
- package/dist/{DropdownButton-DfNojmCW.js → DropdownButton-D4QlKGg7.js} +7 -7
- package/dist/{FlagSelectorList-CkTR3j6O.js → FlagSelectorList-tYZNl-tz.js} +31 -24
- package/dist/{HamburgerTrigger-DRylBL2d.js → HamburgerTrigger-B_NGSZ2r.js} +20 -20
- package/dist/{ImageUpload-DiwymQcU.js → ImageUpload-D7HKSXK8.js} +71 -66
- package/dist/Input-is8n7emP.js +195 -0
- package/dist/{Loading-DUh9PMJN.js → Loading-DO8JOWBV.js} +1 -1
- package/dist/{Modal-Dyn088X7.js → Modal-Dq9BHD_9.js} +4 -4
- package/dist/{Spinner-CUwE2bLm.js → Spinner-BJE79VTl.js} +1 -1
- package/dist/{StepIndicatorContent-CjbjVjS1.js → StepIndicatorContent-BGDvxLzV.js} +1 -1
- package/dist/Switch-C7286Bcu.js +199 -0
- package/dist/{Toast-3NEz7LLa.js → Toast-jSx3Lao8.js} +8 -7
- package/dist/Wrapper-2AUlYAHQ.js +195 -0
- package/dist/{Wrapper-CVJSuYWx.js → Wrapper-CyHxGs4E.js} +4 -4
- package/dist/{Wrapper-DP6Sxngx.js → Wrapper-a7RVCcrn.js} +248 -242
- package/dist/components/Alert/Alert.js +2 -2
- package/dist/components/AlertDialog/AlertDialog.js +2 -2
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.js +1 -1
- package/dist/components/Autocomplete/components/List/List.js +1 -1
- package/dist/components/Autocomplete/hooks/useAutocomplete.js +27 -25
- package/dist/components/Autocomplete/hooks/useNavigationList.js +2 -3
- package/dist/components/Badge/Badge.js +2 -2
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/components/BackButton/BackButton.js +2 -2
- package/dist/components/Breadcrumb/components/Item/Item.js +2 -2
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +65 -60
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +2 -2
- package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.js +10 -9
- package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.js +8 -6
- package/dist/components/Card/Card.js +25 -22
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +2 -2
- package/dist/components/Command/components/CommandInput.js +1 -1
- package/dist/components/Command/components/CommandItem.js +2 -2
- package/dist/components/Command/components/CommandList.js +2 -2
- package/dist/components/Command/components/CommandSeparator.js +2 -2
- package/dist/components/Command/components/CommandShortcut.js +1 -1
- package/dist/components/Command/components/DialogContent.js +3 -3
- package/dist/components/Command/components/DialogOverlay.js +2 -2
- package/dist/components/Command/components/index.js +1 -1
- package/dist/components/Counter/Counter.js +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarDivider/CalendarDivider.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +3 -3
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +3 -3
- package/dist/components/DateRangePicker/components/CalendarPanel/components/NavigationButton/NavigationButton.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +2 -2
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js +30 -28
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +23 -21
- package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +48 -41
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +48 -41
- package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.js +1 -1
- package/dist/components/Datepicker/DatePicker.js +2 -2
- package/dist/components/Divider/Divider.js +7 -7
- package/dist/components/Drawer/Drawer.js +28 -26
- package/dist/components/Drawer/components/Body/Body.js +1 -1
- package/dist/components/Drawer/components/Footer/Footer.js +1 -1
- package/dist/components/Drawer/components/Header/Header.js +1 -1
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/Filter.js +1 -1
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +51 -36
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +40 -38
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +1 -1
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +1 -1
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +1 -1
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.js +1 -1
- package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +2 -2
- package/dist/components/Filter/components/ResetButton/ResetButton.js +1 -1
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +43 -41
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.js +1 -1
- package/dist/components/Filter/utils/index.js +1 -1
- package/dist/components/ImageUpload/ImageUpload.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/LineChart/LineChart.js +2 -2
- package/dist/components/Loading/Loading.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/components/Body/Body.js +1 -1
- package/dist/components/Modal/components/Footer/Footer.js +1 -1
- package/dist/components/Modal/components/Header/Header.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +1 -1
- package/dist/components/MultiSelectDropdown/components/Item/Item.js +1 -1
- package/dist/components/MultiSelectDropdown/components/List/List.js +1 -1
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/MultiSelectDropdown/components/index.js +1 -1
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.context.js +4 -3
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.provider.js +17 -16
- package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.js +11 -11
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +2 -2
- package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +3 -3
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +3 -3
- package/dist/components/PhoneNumberInput/components/Wrapper.js +1 -1
- package/dist/components/PhoneNumberInput/components/index.js +2 -2
- package/dist/components/PhoneNumberInput/contexts/index.js +1 -1
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1 -1
- package/dist/components/PhoneNumberInput/utils/index.js +1 -1
- package/dist/components/PieChart/PieChart.js +31 -28
- package/dist/components/ProgressBar/ProgressBar.js +1 -1
- package/dist/components/Radio/Radio.js +1 -1
- package/dist/components/RadioCard/RadioCard.js +1 -1
- package/dist/components/RadioCardGroup/RadioCardGroup.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/Range/Range.js +2 -2
- package/dist/components/Select/Select.js +43 -36
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.js +1 -1
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.variants.js +1 -1
- package/dist/components/Select/components/List/List.js +78 -67
- package/dist/components/Select/components/ListItem/ListItem.js +1 -1
- package/dist/components/Select/components/Wrapper.js +1 -1
- package/dist/components/Select/components/index.js +2 -2
- package/dist/components/Select/hooks/useNavigationList.js +2 -3
- package/dist/components/Select/hooks/useSelect.js +8 -8
- package/dist/components/Sidebar/components/CollapseTrigger/CollapseTrigger.js +1 -1
- package/dist/components/Sidebar/components/Footer/Footer.js +1 -1
- package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
- package/dist/components/Sidebar/components/Label/Label.js +1 -1
- package/dist/components/Sidebar/components/Logo/Logo.js +1 -1
- package/dist/components/Sidebar/components/Navigation/Navigation.js +1 -1
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +1 -1
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +2 -2
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +1 -1
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +1 -1
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +25 -24
- package/dist/components/Sidebar/components/index.js +1 -1
- package/dist/components/Slider/Slider.js +2 -2
- package/dist/components/Spinner/Spinner.js +1 -1
- package/dist/components/Stepper/Stepper.js +1 -1
- package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.js +2 -2
- package/dist/components/Stepper/components/StepConnector/StepConnector.js +1 -1
- package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.js +1 -1
- package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.js +2 -2
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Switch/Switch.variants.js +15 -7
- package/dist/components/Table/Table.js +1 -1
- package/dist/components/Table/components/Body.js +1 -1
- package/dist/components/Table/components/Filter.js +1 -1
- package/dist/components/Table/components/Head.js +1 -1
- package/dist/components/Table/components/Row.js +1 -1
- package/dist/components/Tabs/Tabs.js +2 -2
- package/dist/components/Tabs/components/Content.js +2 -2
- package/dist/components/Tabs/components/List.js +2 -2
- package/dist/components/Tabs/components/Trigger.js +2 -2
- package/dist/components/Tag/Tag.js +8 -8
- package/dist/components/TagSelect/TagSelect.js +1 -1
- package/dist/components/TagSelect/components/Item/Item.js +1 -1
- package/dist/components/TagSelect/components/List/List.js +1 -1
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/TagSelect/components/index.js +1 -1
- package/dist/components/TagSelect/hooks/useTagSelect.js +11 -11
- package/dist/components/TextArea/TextArea.js +71 -26
- package/dist/components/TextArea/TextArea.variants.js +49 -13
- package/dist/components/TimePicker/components/HoursList/HoursList.js +1 -1
- package/dist/components/TimePicker/components/MeridianList/MeridianList.js +1 -1
- package/dist/components/TimePicker/components/MinutesList/MinutesList.js +1 -1
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +114 -99
- package/dist/components/TimePicker/components/WrapperList/WrapperList.js +19 -18
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +2 -2
- package/dist/components/Typography/Typography.js +19 -16
- package/dist/components/VirtualizedTable/VirtualizedTable.js +2 -2
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +1 -1
- package/dist/components/VirtualizedTable/components/Body/Body.js +2 -2
- package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +2 -2
- package/dist/components/VirtualizedTable/components/ExpandableRow/ExpandableRow.js +1 -1
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +4 -4
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Header/Header.js +2 -2
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +1 -1
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +1 -1
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +3 -3
- package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +1 -1
- package/dist/components/VirtualizedTable/contexts/index.js +1 -1
- package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
- package/dist/components/index.js +12 -12
- package/dist/{components-Cf345jTv.js → components-CaEW5ge4.js} +32 -32
- package/dist/{constants-CxJJRVK3.js → constants-HQIXhj2t.js} +2 -2
- package/dist/contexts/index.js +1 -1
- package/dist/contexts/theme.provider.js +1 -1
- package/dist/{debounce-C5Ycjilj.js → debounce-BdyZeJQk.js} +2 -2
- package/dist/{dist-DFCz63oC2.js → dist-9WbMf_jT.js} +158 -159
- package/dist/{dist-tGUUcv8n.js → dist-AxOGvL82.js} +114 -115
- package/dist/{dist-DDck_2lb.js → dist-BIBFLVt1.js} +117 -116
- package/dist/{dist-BZNE2Tnx.js → dist-BbX4Nrk2.js} +1 -1
- package/dist/{dist-BaPW7qXd2.js → dist-BnCbAI-c.js} +1 -1
- package/dist/{dist-BdobXn93.js → dist-CszFjHAP.js} +2 -2
- package/dist/{dist-C3YVLapk.js → dist-DO3apbIh.js} +24 -24
- package/dist/{dist-CzKqHuqJ2.js → dist-DwxO2RoR.js} +38 -38
- package/dist/{dist-AihTpWdF.js → dist-iUAHw-3y.js} +272 -272
- package/dist/{dist-BlPTJNIm.js → dist-pxvIAJzo.js} +2 -2
- package/dist/es2015-B_07N-UL.js +796 -0
- package/dist/hooks/useMediaQuery.js +1 -1
- package/dist/index.js +14 -14
- package/dist/{isObject-BeFFiVJK.js → isObject-pLoSfdr0.js} +1 -1
- package/dist/lib/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.types.d.ts +1 -1
- package/dist/lib/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.types.d.ts +2 -0
- package/dist/lib/components/Card/Card.types.d.ts +1 -0
- package/dist/lib/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/lib/components/Checkbox/Checkbox.types.d.ts +2 -1
- package/dist/lib/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.types.d.ts +1 -0
- package/dist/lib/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.types.d.ts +1 -0
- package/dist/lib/components/Divider/Divider.d.ts +3 -2
- package/dist/lib/components/Divider/Divider.types.d.ts +4 -0
- package/dist/lib/components/Input/Input.types.d.ts +4 -0
- package/dist/lib/components/MultiSelectDropdown/MultiSelectDropdown.types.d.ts +2 -0
- package/dist/lib/components/MultiSelectDropdown/contexts/MultiSelectDropdown.types.d.ts +2 -0
- package/dist/lib/components/Select/Select.types.d.ts +2 -0
- package/dist/lib/components/Select/components/List/List.types.d.ts +3 -0
- package/dist/lib/components/Select/components/Wrapper.d.ts +2 -0
- package/dist/lib/components/Sidebar/Sidebar.types.d.ts +2 -0
- package/dist/lib/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.types.d.ts +2 -0
- package/dist/lib/components/Switch/Switch.variants.d.ts +3 -1
- package/dist/lib/components/Tag/Tag.types.d.ts +1 -0
- package/dist/lib/components/TextArea/TextArea.d.ts +6 -0
- package/dist/lib/components/TextArea/TextArea.types.d.ts +13 -2
- package/dist/lib/components/TextArea/TextArea.variants.d.ts +4 -1
- package/dist/lib/components/TimePicker/TimePicker.types.d.ts +4 -0
- package/dist/lib/components/TimePicker/components/WrapperList/WrapperList.types.d.ts +1 -0
- package/dist/lib/utils/index.d.ts +1 -0
- package/dist/{libphonenumber-hGupNnJu.js → libphonenumber-BMq3Thej.js} +356 -347
- package/dist/package.json +27 -27
- package/dist/{phone-number.provider-BxQCTxp8.js → phone-number.provider-Dkq_p1Gi.js} +2 -2
- package/dist/{prop-types-CfEYxTbR.js → prop-types-BCUW56rg.js} +1 -1
- package/dist/{react-CvUtBTMg.js → react-7zQ6bvbE.js} +837 -828
- package/dist/{rolldown-runtime-Ck3dxwZt.js → rolldown-runtime-Dw9YIBcH.js} +1 -1
- package/dist/styles.css +1 -1
- package/dist/{table.provider-B0BafHuU.js → table.provider-CWzODR1t.js} +96 -96
- package/dist/{theme.provider-Dw4O3ocC.js → theme.provider-CSL1WCYG.js} +1 -1
- package/dist/{useBreadcrumb-DYfZL_2p.js → useBreadcrumb-Ds_9BeFz.js} +7 -6
- package/dist/utils/index.js +6 -5
- package/dist/{utils-Cx-WzRZF.js → utils-B-6R7kNE.js} +8 -4
- package/dist/{utils-B-BTGYA5.js → utils-DVYdP0CJ.js} +2 -3
- package/dist/{x-BI9jmc7e.js → x-Ierxf0uI.js} +2 -2
- package/package.json +27 -27
- package/dist/Input-Cf44DzfE.js +0 -188
- package/dist/Switch-aPhL5rNG.js +0 -196
- package/dist/Wrapper-R8fik3ah.js +0 -182
- package/dist/es2015-DigR3dar.js +0 -795
- /package/dist/{dist-DGOjiAnB2.js → dist-DGOjiAnB.js} +0 -0
- /package/dist/{dist-pWlMx4Fi2.js → dist-pWlMx4Fi.js} +0 -0
- /package/dist/{x-a_LpoXzG2.js → x-a_LpoXzG.js} +0 -0
|
@@ -761,21 +761,21 @@ function Ro(t, e, i) {
|
|
|
761
761
|
const s = e.length;
|
|
762
762
|
let n = 0, o = s;
|
|
763
763
|
if (t._sorted) {
|
|
764
|
-
const { iScale: r, vScale: a, _parsed: l } = t, c = t.dataset && t.dataset.options ? t.dataset.options.spanGaps : null, h = r.axis, { min: d, max: f, minDefined: u, maxDefined:
|
|
764
|
+
const { iScale: r, vScale: a, _parsed: l } = t, c = t.dataset && t.dataset.options ? t.dataset.options.spanGaps : null, h = r.axis, { min: d, max: f, minDefined: u, maxDefined: m } = r.getUserBounds();
|
|
765
765
|
if (u) {
|
|
766
766
|
if (n = Math.min(kt(l, h, d).lo, i ? s : kt(e, h, r.getPixelForValue(d)).lo), c) {
|
|
767
|
-
const
|
|
768
|
-
n -= Math.max(0,
|
|
767
|
+
const g = l.slice(0, n + 1).reverse().findIndex((p) => !R(p[a.axis]));
|
|
768
|
+
n -= Math.max(0, g);
|
|
769
769
|
}
|
|
770
770
|
n = U(n, 0, s - 1);
|
|
771
771
|
}
|
|
772
|
-
if (
|
|
773
|
-
let
|
|
772
|
+
if (m) {
|
|
773
|
+
let g = Math.max(kt(l, r.axis, f, !0).hi + 1, i ? 0 : kt(e, h, r.getPixelForValue(f), !0).hi + 1);
|
|
774
774
|
if (c) {
|
|
775
|
-
const
|
|
776
|
-
|
|
775
|
+
const p = l.slice(g - 1).findIndex((b) => !R(b[a.axis]));
|
|
776
|
+
g += Math.max(0, p);
|
|
777
777
|
}
|
|
778
|
-
o = U(
|
|
778
|
+
o = U(g, n, s) - n;
|
|
779
779
|
} else o = s - n;
|
|
780
780
|
}
|
|
781
781
|
return {
|
|
@@ -1144,49 +1144,48 @@ function ni(t, e, i, s) {
|
|
|
1144
1144
|
}
|
|
1145
1145
|
function ln(t, e, i, s, n) {
|
|
1146
1146
|
let o, r, a, l, c, h, d, f;
|
|
1147
|
-
const u = e.pointStyle,
|
|
1148
|
-
let
|
|
1147
|
+
const u = e.pointStyle, m = e.rotation, g = e.radius;
|
|
1148
|
+
let p = (m || 0) * vo;
|
|
1149
1149
|
if (u && typeof u == "object" && (o = u.toString(), o === "[object HTMLImageElement]" || o === "[object HTMLCanvasElement]")) {
|
|
1150
|
-
t.save(), t.translate(i, s), t.rotate(
|
|
1150
|
+
t.save(), t.translate(i, s), t.rotate(p), t.drawImage(u, -u.width / 2, -u.height / 2, u.width, u.height), t.restore();
|
|
1151
1151
|
return;
|
|
1152
1152
|
}
|
|
1153
|
-
if (!(isNaN(
|
|
1153
|
+
if (!(isNaN(g) || g <= 0)) {
|
|
1154
1154
|
switch (t.beginPath(), u) {
|
|
1155
1155
|
default:
|
|
1156
|
-
n ? t.ellipse(i, s, n / 2,
|
|
1156
|
+
n ? t.ellipse(i, s, n / 2, g, 0, 0, F) : t.arc(i, s, g, 0, F), t.closePath();
|
|
1157
1157
|
break;
|
|
1158
1158
|
case "triangle":
|
|
1159
|
-
h = n ? n / 2 :
|
|
1159
|
+
h = n ? n / 2 : g, t.moveTo(i + Math.sin(p) * h, s - Math.cos(p) * g), p += Ri, t.lineTo(i + Math.sin(p) * h, s - Math.cos(p) * g), p += Ri, t.lineTo(i + Math.sin(p) * h, s - Math.cos(p) * g), t.closePath();
|
|
1160
1160
|
break;
|
|
1161
1161
|
case "rectRounded":
|
|
1162
|
-
c =
|
|
1162
|
+
c = g * 0.516, l = g - c, r = Math.cos(p + bt) * l, d = Math.cos(p + bt) * (n ? n / 2 - c : l), a = Math.sin(p + bt) * l, f = Math.sin(p + bt) * (n ? n / 2 - c : l), t.arc(i - d, s - a, c, p - L, p - N), t.arc(i + f, s - r, c, p - N, p), t.arc(i + d, s + a, c, p, p + N), t.arc(i - f, s + r, c, p + N, p + L), t.closePath();
|
|
1163
1163
|
break;
|
|
1164
1164
|
case "rect":
|
|
1165
|
-
if (!
|
|
1166
|
-
l = Math.SQRT1_2 *
|
|
1165
|
+
if (!m) {
|
|
1166
|
+
l = Math.SQRT1_2 * g, h = n ? n / 2 : l, t.rect(i - h, s - l, 2 * h, 2 * l);
|
|
1167
1167
|
break;
|
|
1168
1168
|
}
|
|
1169
|
-
|
|
1169
|
+
p += bt;
|
|
1170
1170
|
case "rectRot":
|
|
1171
|
-
d = Math.cos(
|
|
1171
|
+
d = Math.cos(p) * (n ? n / 2 : g), r = Math.cos(p) * g, a = Math.sin(p) * g, f = Math.sin(p) * (n ? n / 2 : g), t.moveTo(i - d, s - a), t.lineTo(i + f, s - r), t.lineTo(i + d, s + a), t.lineTo(i - f, s + r), t.closePath();
|
|
1172
1172
|
break;
|
|
1173
1173
|
case "crossRot":
|
|
1174
|
-
|
|
1174
|
+
p += bt;
|
|
1175
1175
|
case "cross":
|
|
1176
|
-
d = Math.cos(
|
|
1176
|
+
d = Math.cos(p) * (n ? n / 2 : g), r = Math.cos(p) * g, a = Math.sin(p) * g, f = Math.sin(p) * (n ? n / 2 : g), t.moveTo(i - d, s - a), t.lineTo(i + d, s + a), t.moveTo(i + f, s - r), t.lineTo(i - f, s + r);
|
|
1177
1177
|
break;
|
|
1178
1178
|
case "star":
|
|
1179
|
-
d = Math.cos(
|
|
1179
|
+
d = Math.cos(p) * (n ? n / 2 : g), r = Math.cos(p) * g, a = Math.sin(p) * g, f = Math.sin(p) * (n ? n / 2 : g), t.moveTo(i - d, s - a), t.lineTo(i + d, s + a), t.moveTo(i + f, s - r), t.lineTo(i - f, s + r), p += bt, d = Math.cos(p) * (n ? n / 2 : g), r = Math.cos(p) * g, a = Math.sin(p) * g, f = Math.sin(p) * (n ? n / 2 : g), t.moveTo(i - d, s - a), t.lineTo(i + d, s + a), t.moveTo(i + f, s - r), t.lineTo(i - f, s + r);
|
|
1180
1180
|
break;
|
|
1181
1181
|
case "line":
|
|
1182
|
-
r = n ? n / 2 : Math.cos(
|
|
1182
|
+
r = n ? n / 2 : Math.cos(p) * g, a = Math.sin(p) * g, t.moveTo(i - r, s - a), t.lineTo(i + r, s + a);
|
|
1183
1183
|
break;
|
|
1184
1184
|
case "dash":
|
|
1185
|
-
t.moveTo(i, s), t.lineTo(i + Math.cos(
|
|
1185
|
+
t.moveTo(i, s), t.lineTo(i + Math.cos(p) * (n ? n / 2 : g), s + Math.sin(p) * g);
|
|
1186
1186
|
break;
|
|
1187
1187
|
case !1:
|
|
1188
1188
|
t.closePath();
|
|
1189
|
-
break;
|
|
1190
1189
|
}
|
|
1191
1190
|
t.fill(), e.borderWidth > 0 && t.stroke();
|
|
1192
1191
|
}
|
|
@@ -1245,7 +1244,6 @@ function Zo(t, e) {
|
|
|
1245
1244
|
return t;
|
|
1246
1245
|
case "%":
|
|
1247
1246
|
t /= 100;
|
|
1248
|
-
break;
|
|
1249
1247
|
}
|
|
1250
1248
|
return e * t;
|
|
1251
1249
|
}
|
|
@@ -1594,10 +1592,10 @@ function vr(t, e) {
|
|
|
1594
1592
|
function vt(t, e) {
|
|
1595
1593
|
if ("native" in t) return t;
|
|
1596
1594
|
const { canvas: i, currentDevicePixelRatio: s } = e, n = We(i), o = n.boxSizing === "border-box", r = St(n, "padding"), a = St(n, "border", "width"), { x: l, y: c, box: h } = vr(t, i), d = r.left + (h && a.left), f = r.top + (h && a.top);
|
|
1597
|
-
let { width: u, height:
|
|
1598
|
-
return o && (u -= r.width + a.width,
|
|
1595
|
+
let { width: u, height: m } = e;
|
|
1596
|
+
return o && (u -= r.width + a.width, m -= r.height + a.height), {
|
|
1599
1597
|
x: Math.round((l - d) / u * i.width / s),
|
|
1600
|
-
y: Math.round((c - f) /
|
|
1598
|
+
y: Math.round((c - f) / m * i.height / s)
|
|
1601
1599
|
};
|
|
1602
1600
|
}
|
|
1603
1601
|
function Mr(t, e, i) {
|
|
@@ -1756,24 +1754,24 @@ function Or(t, e, i) {
|
|
|
1756
1754
|
}
|
|
1757
1755
|
function bn(t, e, i) {
|
|
1758
1756
|
if (!i) return [t];
|
|
1759
|
-
const { property: s, start: n, end: o } = i, r = e.length, { compare: a, between: l, normalize: c } = mn(s), { start: h, end: d, loop: f, style: u } = Or(t, e, i),
|
|
1760
|
-
let
|
|
1761
|
-
const y = () => l(n, v, b) && a(n, v) !== 0, _ = () => a(o, b) === 0 || l(o, v, b), w = () =>
|
|
1757
|
+
const { property: s, start: n, end: o } = i, r = e.length, { compare: a, between: l, normalize: c } = mn(s), { start: h, end: d, loop: f, style: u } = Or(t, e, i), m = [];
|
|
1758
|
+
let g = !1, p = null, b, x, v;
|
|
1759
|
+
const y = () => l(n, v, b) && a(n, v) !== 0, _ = () => a(o, b) === 0 || l(o, v, b), w = () => g || y(), M = () => !g || _();
|
|
1762
1760
|
for (let k = h, S = h; k <= d; ++k)
|
|
1763
|
-
x = e[k % r], !x.skip && (b = c(x[s]), b !== v && (
|
|
1764
|
-
start:
|
|
1761
|
+
x = e[k % r], !x.skip && (b = c(x[s]), b !== v && (g = l(b, n, o), p === null && w() && (p = a(b, n) === 0 ? k : S), p !== null && M() && (m.push(Ui({
|
|
1762
|
+
start: p,
|
|
1765
1763
|
end: k,
|
|
1766
1764
|
loop: f,
|
|
1767
1765
|
count: r,
|
|
1768
1766
|
style: u
|
|
1769
|
-
})),
|
|
1770
|
-
return
|
|
1771
|
-
start:
|
|
1767
|
+
})), p = null), S = k, v = b));
|
|
1768
|
+
return p !== null && m.push(Ui({
|
|
1769
|
+
start: p,
|
|
1772
1770
|
end: d,
|
|
1773
1771
|
loop: f,
|
|
1774
1772
|
count: r,
|
|
1775
1773
|
style: u
|
|
1776
|
-
})),
|
|
1774
|
+
})), m;
|
|
1777
1775
|
}
|
|
1778
1776
|
function _n(t, e) {
|
|
1779
1777
|
const i = [], s = t.segments;
|
|
@@ -1826,34 +1824,34 @@ function Xi(t, e, i, s) {
|
|
|
1826
1824
|
function Rr(t, e, i, s) {
|
|
1827
1825
|
const n = t._chart.getContext(), o = Ki(t.options), { _datasetIndex: r, options: { spanGaps: a } } = t, l = i.length, c = [];
|
|
1828
1826
|
let h = o, d = e[0].start, f = d;
|
|
1829
|
-
function u(
|
|
1827
|
+
function u(m, g, p, b) {
|
|
1830
1828
|
const x = a ? -1 : 1;
|
|
1831
|
-
if (
|
|
1832
|
-
for (
|
|
1833
|
-
for (; i[
|
|
1834
|
-
|
|
1835
|
-
start:
|
|
1836
|
-
end:
|
|
1837
|
-
loop:
|
|
1829
|
+
if (m !== g) {
|
|
1830
|
+
for (m += l; i[m % l].skip; ) m -= x;
|
|
1831
|
+
for (; i[g % l].skip; ) g += x;
|
|
1832
|
+
m % l !== g % l && (c.push({
|
|
1833
|
+
start: m % l,
|
|
1834
|
+
end: g % l,
|
|
1835
|
+
loop: p,
|
|
1838
1836
|
style: b
|
|
1839
|
-
}), h = b, d =
|
|
1837
|
+
}), h = b, d = g % l);
|
|
1840
1838
|
}
|
|
1841
1839
|
}
|
|
1842
|
-
for (const
|
|
1843
|
-
d = a ? d :
|
|
1844
|
-
let
|
|
1845
|
-
for (f = d + 1; f <=
|
|
1840
|
+
for (const m of e) {
|
|
1841
|
+
d = a ? d : m.start;
|
|
1842
|
+
let g = i[d % l], p;
|
|
1843
|
+
for (f = d + 1; f <= m.end; f++) {
|
|
1846
1844
|
const b = i[f % l];
|
|
1847
|
-
|
|
1845
|
+
p = Ki(s.setContext(pt(n, {
|
|
1848
1846
|
type: "segment",
|
|
1849
|
-
p0:
|
|
1847
|
+
p0: g,
|
|
1850
1848
|
p1: b,
|
|
1851
1849
|
p0DataIndex: (f - 1) % l,
|
|
1852
1850
|
p1DataIndex: f % l,
|
|
1853
1851
|
datasetIndex: r
|
|
1854
|
-
}))), Ir(
|
|
1852
|
+
}))), Ir(p, h) && u(d, f - 1, m.loop, h), g = b, h = p;
|
|
1855
1853
|
}
|
|
1856
|
-
d < f - 1 && u(d, f - 1,
|
|
1854
|
+
d < f - 1 && u(d, f - 1, m.loop, h);
|
|
1857
1855
|
}
|
|
1858
1856
|
return c;
|
|
1859
1857
|
}
|
|
@@ -2083,10 +2081,11 @@ var Fr = class {
|
|
|
2083
2081
|
const c = e[l];
|
|
2084
2082
|
let h = n[l];
|
|
2085
2083
|
const d = i.get(l);
|
|
2086
|
-
if (h)
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2084
|
+
if (h)
|
|
2085
|
+
if (d && h.active()) {
|
|
2086
|
+
h.update(d, c, r);
|
|
2087
|
+
continue;
|
|
2088
|
+
} else h.cancel();
|
|
2090
2089
|
if (!d || !d.duration) {
|
|
2091
2090
|
t[l] = c;
|
|
2092
2091
|
continue;
|
|
@@ -2211,10 +2210,10 @@ function Qi(t, e) {
|
|
|
2211
2210
|
const { chart: i, _cachedMeta: s } = t, n = i._stacks || (i._stacks = {}), { iScale: o, vScale: r, index: a } = s, l = o.axis, c = r.axis, h = $r(o, r, s), d = e.length;
|
|
2212
2211
|
let f;
|
|
2213
2212
|
for (let u = 0; u < d; ++u) {
|
|
2214
|
-
const
|
|
2215
|
-
f = b[c] = Ur(n, h,
|
|
2213
|
+
const m = e[u], { [l]: g, [c]: p } = m, b = m._stacks || (m._stacks = {});
|
|
2214
|
+
f = b[c] = Ur(n, h, g), f[a] = p, f._top = Zi(f, r, !0, s.type), f._bottom = Zi(f, r, !1, s.type);
|
|
2216
2215
|
const x = f._visualValues || (f._visualValues = {});
|
|
2217
|
-
x[a] =
|
|
2216
|
+
x[a] = p;
|
|
2218
2217
|
}
|
|
2219
2218
|
}
|
|
2220
2219
|
function Xe(t, e) {
|
|
@@ -2395,8 +2394,8 @@ var Ke = (t) => t === "reset" || t === "none", ts = (t, e) => e ? t : Object.ass
|
|
|
2395
2394
|
let d, f;
|
|
2396
2395
|
function u() {
|
|
2397
2396
|
f = s[d];
|
|
2398
|
-
const
|
|
2399
|
-
return !W(f[t.axis]) || c >
|
|
2397
|
+
const m = f[r.axis];
|
|
2398
|
+
return !W(f[t.axis]) || c > m || h < m;
|
|
2400
2399
|
}
|
|
2401
2400
|
for (d = 0; d < o && !(!u() && (this.updateRangeFromParsed(l, t, f, a), n)); ++d)
|
|
2402
2401
|
;
|
|
@@ -2469,8 +2468,8 @@ var Ke = (t) => t === "reset" || t === "none", ts = (t, e) => e ? t : Object.ass
|
|
|
2469
2468
|
"hover",
|
|
2470
2469
|
t,
|
|
2471
2470
|
""
|
|
2472
|
-
] : [t, ""], d = l.getOptionScopes(this.getDataset(), c), f = Object.keys(H.elements[t]), u = () => this.getContext(i, s, e),
|
|
2473
|
-
return
|
|
2471
|
+
] : [t, ""], d = l.getOptionScopes(this.getDataset(), c), f = Object.keys(H.elements[t]), u = () => this.getContext(i, s, e), m = l.resolveNamedOptions(d, f, u, h);
|
|
2472
|
+
return m.$shared && (m.$shared = a, n[o] = Object.freeze(ts(m, a))), m;
|
|
2474
2473
|
}
|
|
2475
2474
|
_resolveAnimations(t, e, i) {
|
|
2476
2475
|
const s = this.chart, n = this._cachedDataOpts, o = `animation-${e}`, r = n[o];
|
|
@@ -2602,8 +2601,8 @@ var Ke = (t) => t === "reset" || t === "none", ts = (t, e) => e ? t : Object.ass
|
|
|
2602
2601
|
function Gr(t, e, i) {
|
|
2603
2602
|
let s = 1, n = 1, o = 0, r = 0;
|
|
2604
2603
|
if (e < F) {
|
|
2605
|
-
const a = t, l = a + e, c = Math.cos(a), h = Math.sin(a), d = Math.cos(l), f = Math.sin(l), u = (v, y, _) => se(v, a, l, !0) ? 1 : Math.max(y, y * i, _, _ * i),
|
|
2606
|
-
s = (
|
|
2604
|
+
const a = t, l = a + e, c = Math.cos(a), h = Math.sin(a), d = Math.cos(l), f = Math.sin(l), u = (v, y, _) => se(v, a, l, !0) ? 1 : Math.max(y, y * i, _, _ * i), m = (v, y, _) => se(v, a, l, !0) ? -1 : Math.min(y, y * i, _, _ * i), g = u(0, c, d), p = u(N, h, f), b = m(L, c, d), x = m(L + N, h, f);
|
|
2605
|
+
s = (g - b) / 2, n = (p - x) / 2, o = -(g + b) / 2, r = -(p + x) / 2;
|
|
2607
2606
|
}
|
|
2608
2607
|
return {
|
|
2609
2608
|
ratioX: s,
|
|
@@ -2712,7 +2711,7 @@ var Jr = class extends wi {
|
|
|
2712
2711
|
};
|
|
2713
2712
|
}
|
|
2714
2713
|
update(t) {
|
|
2715
|
-
const { chartArea: e } = this.chart, i = this._cachedMeta, s = i.data, n = this.getMaxBorderWidth() + this.getMaxOffset(s) + this.options.spacing, o = Math.max((Math.min(e.width, e.height) - n) / 2, 0), r = Math.min(go(this.options.cutout, o), 1), a = this._getRingWeight(this.index), { circumference: l, rotation: c } = this._getRotationExtents(), { ratioX: h, ratioY: d, offsetX: f, offsetY: u } = Gr(c, l, r),
|
|
2714
|
+
const { chartArea: e } = this.chart, i = this._cachedMeta, s = i.data, n = this.getMaxBorderWidth() + this.getMaxOffset(s) + this.options.spacing, o = Math.max((Math.min(e.width, e.height) - n) / 2, 0), r = Math.min(go(this.options.cutout, o), 1), a = this._getRingWeight(this.index), { circumference: l, rotation: c } = this._getRotationExtents(), { ratioX: h, ratioY: d, offsetX: f, offsetY: u } = Gr(c, l, r), m = (e.width - n) / h, g = (e.height - n) / d, p = Math.max(Math.min(m, g) / 2, 0), b = Zs(this.options.radius, p), x = (b - Math.max(b * r, 0)) / this._getVisibleDatasetWeightTotal();
|
|
2716
2715
|
this.offsetX = f * b, this.offsetY = u * b, i.total = this.calculateTotal(), this.outerRadius = b - x * this._getRingWeightOffset(this.index), this.innerRadius = Math.max(this.outerRadius - x * a, 0), this.updateElements(s, 0, s.length, t);
|
|
2717
2716
|
}
|
|
2718
2717
|
_circumference(t, e) {
|
|
@@ -2720,20 +2719,20 @@ var Jr = class extends wi {
|
|
|
2720
2719
|
return e && i.animation.animateRotate || !this.chart.getDataVisibility(t) || s._parsed[t] === null || s.data[t].hidden ? 0 : this.calculateCircumference(s._parsed[t] * n / F);
|
|
2721
2720
|
}
|
|
2722
2721
|
updateElements(t, e, i, s) {
|
|
2723
|
-
const n = s === "reset", o = this.chart, r = o.chartArea, a = o.options.animation, l = (r.left + r.right) / 2, c = (r.top + r.bottom) / 2, h = n && a.animateScale, d = h ? 0 : this.innerRadius, f = h ? 0 : this.outerRadius, { sharedOptions: u, includeOptions:
|
|
2724
|
-
let
|
|
2725
|
-
for (
|
|
2726
|
-
for (
|
|
2727
|
-
const b = this._circumference(
|
|
2722
|
+
const n = s === "reset", o = this.chart, r = o.chartArea, a = o.options.animation, l = (r.left + r.right) / 2, c = (r.top + r.bottom) / 2, h = n && a.animateScale, d = h ? 0 : this.innerRadius, f = h ? 0 : this.outerRadius, { sharedOptions: u, includeOptions: m } = this._getSharedOptions(e, s);
|
|
2723
|
+
let g = this._getRotation(), p;
|
|
2724
|
+
for (p = 0; p < e; ++p) g += this._circumference(p, n);
|
|
2725
|
+
for (p = e; p < e + i; ++p) {
|
|
2726
|
+
const b = this._circumference(p, n), x = t[p], v = {
|
|
2728
2727
|
x: l + this.offsetX,
|
|
2729
2728
|
y: c + this.offsetY,
|
|
2730
|
-
startAngle:
|
|
2731
|
-
endAngle:
|
|
2729
|
+
startAngle: g,
|
|
2730
|
+
endAngle: g + b,
|
|
2732
2731
|
circumference: b,
|
|
2733
2732
|
outerRadius: f,
|
|
2734
2733
|
innerRadius: d
|
|
2735
2734
|
};
|
|
2736
|
-
|
|
2735
|
+
m && (v.options = u || this.resolveDataElementOptions(p, x.active ? "active" : s)), g += b, this.updateElement(x, p, v, s);
|
|
2737
2736
|
}
|
|
2738
2737
|
}
|
|
2739
2738
|
calculateTotal() {
|
|
@@ -2816,16 +2815,16 @@ var Jr = class extends wi {
|
|
|
2816
2815
|
}, t), this.updateElements(s, r, a, t);
|
|
2817
2816
|
}
|
|
2818
2817
|
updateElements(t, e, i, s) {
|
|
2819
|
-
const n = s === "reset", { iScale: o, vScale: r, _stacked: a, _dataset: l } = this._cachedMeta, { sharedOptions: c, includeOptions: h } = this._getSharedOptions(e, s), d = o.axis, f = r.axis, { spanGaps: u, segment:
|
|
2818
|
+
const n = s === "reset", { iScale: o, vScale: r, _stacked: a, _dataset: l } = this._cachedMeta, { sharedOptions: c, includeOptions: h } = this._getSharedOptions(e, s), d = o.axis, f = r.axis, { spanGaps: u, segment: m } = this.options, g = ie(u) ? u : Number.POSITIVE_INFINITY, p = this.chart._animationsDisabled || n || s === "none", b = e + i, x = t.length;
|
|
2820
2819
|
let v = e > 0 && this.getParsed(e - 1);
|
|
2821
2820
|
for (let y = 0; y < x; ++y) {
|
|
2822
|
-
const _ = t[y], w =
|
|
2821
|
+
const _ = t[y], w = p ? _ : {};
|
|
2823
2822
|
if (y < e || y >= b) {
|
|
2824
2823
|
w.skip = !0;
|
|
2825
2824
|
continue;
|
|
2826
2825
|
}
|
|
2827
2826
|
const M = this.getParsed(y), k = R(M[f]), S = w[d] = o.getPixelForValue(M[d], y), P = w[f] = n || k ? r.getBasePixel() : r.getPixelForValue(a ? this.applyStack(r, M, a) : M[f], y);
|
|
2828
|
-
w.skip = isNaN(S) || isNaN(P) || k, w.stop = y > 0 && Math.abs(M[d] - v[d]) >
|
|
2827
|
+
w.skip = isNaN(S) || isNaN(P) || k, w.stop = y > 0 && Math.abs(M[d] - v[d]) > g, m && (w.parsed = M, w.raw = l.data[y]), h && (w.options = c || this.resolveDataElementOptions(y, _.active ? "active" : s)), p || this.updateElement(_, y, w, s), v = M;
|
|
2829
2828
|
}
|
|
2830
2829
|
}
|
|
2831
2830
|
getMaxOverflow() {
|
|
@@ -2892,10 +2891,10 @@ function ea(t, e, i, s) {
|
|
|
2892
2891
|
} else {
|
|
2893
2892
|
const h = c(o, e, i);
|
|
2894
2893
|
if (l) {
|
|
2895
|
-
const { vScale: d } = n._cachedMeta, { _parsed: f } = t, u = f.slice(0, h.lo + 1).reverse().findIndex((
|
|
2894
|
+
const { vScale: d } = n._cachedMeta, { _parsed: f } = t, u = f.slice(0, h.lo + 1).reverse().findIndex((g) => !R(g[d.axis]));
|
|
2896
2895
|
h.lo -= Math.max(0, u);
|
|
2897
|
-
const
|
|
2898
|
-
h.hi += Math.max(0,
|
|
2896
|
+
const m = f.slice(h.hi).findIndex((g) => !R(g[d.axis]));
|
|
2897
|
+
h.hi += Math.max(0, m);
|
|
2899
2898
|
}
|
|
2900
2899
|
return h;
|
|
2901
2900
|
}
|
|
@@ -2910,8 +2909,8 @@ function ae(t, e, i, s, n) {
|
|
|
2910
2909
|
for (let a = 0, l = o.length; a < l; ++a) {
|
|
2911
2910
|
const { index: c, data: h } = o[a], { lo: d, hi: f } = ea(o[a], e, r, n);
|
|
2912
2911
|
for (let u = d; u <= f; ++u) {
|
|
2913
|
-
const
|
|
2914
|
-
|
|
2912
|
+
const m = h[u];
|
|
2913
|
+
m.skip || s(m, c, u);
|
|
2915
2914
|
}
|
|
2916
2915
|
}
|
|
2917
2916
|
}
|
|
@@ -2954,14 +2953,14 @@ function na(t, e, i, s, n, o) {
|
|
|
2954
2953
|
function c(h, d, f) {
|
|
2955
2954
|
const u = h.inRange(e.x, e.y, n);
|
|
2956
2955
|
if (s && !u) return;
|
|
2957
|
-
const
|
|
2958
|
-
if (!(o || t.isPointInArea(
|
|
2959
|
-
const
|
|
2960
|
-
|
|
2956
|
+
const m = h.getCenterPoint(n);
|
|
2957
|
+
if (!(o || t.isPointInArea(m)) && !u) return;
|
|
2958
|
+
const g = a(e, m);
|
|
2959
|
+
g < l ? (r = [{
|
|
2961
2960
|
element: h,
|
|
2962
2961
|
datasetIndex: d,
|
|
2963
2962
|
index: f
|
|
2964
|
-
}], l =
|
|
2963
|
+
}], l = g) : g === l && r.push({
|
|
2965
2964
|
element: h,
|
|
2966
2965
|
datasetIndex: d,
|
|
2967
2966
|
index: f
|
|
@@ -3196,10 +3195,10 @@ var ft = {
|
|
|
3196
3195
|
update(t, e, i, s) {
|
|
3197
3196
|
if (!t) return;
|
|
3198
3197
|
const n = X(t.options.layout.padding), o = Math.max(e - n.width, 0), r = Math.max(i - n.height, 0), a = ca(t.boxes), l = a.vertical, c = a.horizontal;
|
|
3199
|
-
A(t.boxes, (
|
|
3200
|
-
typeof
|
|
3198
|
+
A(t.boxes, (g) => {
|
|
3199
|
+
typeof g.beforeLayout == "function" && g.beforeLayout();
|
|
3201
3200
|
});
|
|
3202
|
-
const h = l.reduce((
|
|
3201
|
+
const h = l.reduce((g, p) => p.box.options && p.box.options.display === !1 ? g : g + 1, 0) || 1, d = Object.freeze({
|
|
3203
3202
|
outerWidth: e,
|
|
3204
3203
|
outerHeight: i,
|
|
3205
3204
|
padding: n,
|
|
@@ -3215,17 +3214,17 @@ var ft = {
|
|
|
3215
3214
|
h: r,
|
|
3216
3215
|
x: n.left,
|
|
3217
3216
|
y: n.top
|
|
3218
|
-
}, n),
|
|
3219
|
-
Kt(a.fullSize, u, d,
|
|
3217
|
+
}, n), m = la(l.concat(c), d);
|
|
3218
|
+
Kt(a.fullSize, u, d, m), Kt(l, u, d, m), Kt(c, u, d, m) && Kt(l, u, d, m), da(u), ns(a.leftAndTop, u, d, m), u.x += u.w, u.y += u.h, ns(a.rightAndBottom, u, d, m), t.chartArea = {
|
|
3220
3219
|
left: u.left,
|
|
3221
3220
|
top: u.top,
|
|
3222
3221
|
right: u.left + u.w,
|
|
3223
3222
|
bottom: u.top + u.h,
|
|
3224
3223
|
height: u.h,
|
|
3225
3224
|
width: u.w
|
|
3226
|
-
}, A(a.chartArea, (
|
|
3227
|
-
const
|
|
3228
|
-
Object.assign(
|
|
3225
|
+
}, A(a.chartArea, (g) => {
|
|
3226
|
+
const p = g.box;
|
|
3227
|
+
Object.assign(p, t.chartArea), p.update(u.w, u.h, {
|
|
3229
3228
|
left: 0,
|
|
3230
3229
|
top: 0,
|
|
3231
3230
|
right: 0,
|
|
@@ -3289,11 +3288,12 @@ function pa(t, e) {
|
|
|
3289
3288
|
const o = Yi(t, "width");
|
|
3290
3289
|
o !== void 0 && (t.width = o);
|
|
3291
3290
|
}
|
|
3292
|
-
if (os(s))
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3291
|
+
if (os(s))
|
|
3292
|
+
if (t.style.height === "") t.height = t.width / (e || 2);
|
|
3293
|
+
else {
|
|
3294
|
+
const o = Yi(t, "height");
|
|
3295
|
+
o !== void 0 && (t.height = o);
|
|
3296
|
+
}
|
|
3297
3297
|
return t;
|
|
3298
3298
|
}
|
|
3299
3299
|
var Pn = kr ? { passive: !0 } : !1;
|
|
@@ -3551,24 +3551,24 @@ function Ba(t, e, i) {
|
|
|
3551
3551
|
}
|
|
3552
3552
|
function Wa(t, e, i, s) {
|
|
3553
3553
|
const { top: n, left: o, bottom: r, right: a, chart: l } = t, { chartArea: c, scales: h } = l;
|
|
3554
|
-
let d = 0, f, u,
|
|
3555
|
-
const
|
|
3554
|
+
let d = 0, f, u, m;
|
|
3555
|
+
const g = r - n, p = a - o;
|
|
3556
3556
|
if (t.isHorizontal()) {
|
|
3557
3557
|
if (u = G(s, o, a), O(i)) {
|
|
3558
3558
|
const b = Object.keys(i)[0], x = i[b];
|
|
3559
|
-
|
|
3560
|
-
} else i === "center" ?
|
|
3559
|
+
m = h[b].getPixelForValue(x) + g - e;
|
|
3560
|
+
} else i === "center" ? m = (c.bottom + c.top) / 2 + g - e : m = as(t, i, e);
|
|
3561
3561
|
f = a - o;
|
|
3562
3562
|
} else {
|
|
3563
3563
|
if (O(i)) {
|
|
3564
3564
|
const b = Object.keys(i)[0], x = i[b];
|
|
3565
|
-
u = h[b].getPixelForValue(x) -
|
|
3566
|
-
} else i === "center" ? u = (c.left + c.right) / 2 -
|
|
3567
|
-
|
|
3565
|
+
u = h[b].getPixelForValue(x) - p + e;
|
|
3566
|
+
} else i === "center" ? u = (c.left + c.right) / 2 - p + e : u = as(t, i, e);
|
|
3567
|
+
m = G(s, r, n), d = i === "left" ? -N : N;
|
|
3568
3568
|
}
|
|
3569
3569
|
return {
|
|
3570
3570
|
titleX: u,
|
|
3571
|
-
titleY:
|
|
3571
|
+
titleY: m,
|
|
3572
3572
|
maxWidth: f,
|
|
3573
3573
|
rotation: d
|
|
3574
3574
|
};
|
|
@@ -3727,15 +3727,15 @@ var le = class Dn extends Ct {
|
|
|
3727
3727
|
if (r) {
|
|
3728
3728
|
const l = hs(n, i.options.font);
|
|
3729
3729
|
if (a ? (e.width = this.maxWidth, e.height = Yt(o) + l) : (e.height = this.maxHeight, e.width = Yt(o) + l), s.display && this.ticks.length) {
|
|
3730
|
-
const { first: c, last: h, widest: d, highest: f } = this._getLabelSizes(), u = s.padding * 2,
|
|
3730
|
+
const { first: c, last: h, widest: d, highest: f } = this._getLabelSizes(), u = s.padding * 2, m = it(this.labelRotation), g = Math.cos(m), p = Math.sin(m);
|
|
3731
3731
|
if (a) {
|
|
3732
|
-
const b = s.mirror ? 0 :
|
|
3732
|
+
const b = s.mirror ? 0 : p * d.width + g * f.height;
|
|
3733
3733
|
e.height = Math.min(this.maxHeight, e.height + b + u);
|
|
3734
3734
|
} else {
|
|
3735
|
-
const b = s.mirror ? 0 :
|
|
3735
|
+
const b = s.mirror ? 0 : g * d.width + p * f.height;
|
|
3736
3736
|
e.width = Math.min(this.maxWidth, e.width + b + u);
|
|
3737
3737
|
}
|
|
3738
|
-
this._calculatePadding(c, h,
|
|
3738
|
+
this._calculatePadding(c, h, p, g);
|
|
3739
3739
|
}
|
|
3740
3740
|
}
|
|
3741
3741
|
this._handleMargins(), a ? (this.width = this._length = i.width - this._margins.left - this._margins.right, this.height = e.height) : (this.width = e.width, this.height = this._length = i.height - this._margins.top - this._margins.bottom);
|
|
@@ -3781,15 +3781,15 @@ var le = class Dn extends Ct {
|
|
|
3781
3781
|
}
|
|
3782
3782
|
_computeLabelSizes(e, i, s) {
|
|
3783
3783
|
const { ctx: n, _longestTextCache: o } = this, r = [], a = [], l = Math.floor(i / ls(i, s));
|
|
3784
|
-
let c = 0, h = 0, d, f, u,
|
|
3784
|
+
let c = 0, h = 0, d, f, u, m, g, p, b, x, v, y, _;
|
|
3785
3785
|
for (d = 0; d < i; d += l) {
|
|
3786
|
-
if (
|
|
3786
|
+
if (m = e[d].label, g = this._resolveTickFontOptions(d), n.font = p = g.string, b = o[p] = o[p] || {
|
|
3787
3787
|
data: {},
|
|
3788
3788
|
gc: []
|
|
3789
|
-
}, x =
|
|
3790
|
-
v = Oe(n, b.data, b.gc, v,
|
|
3791
|
-
else if (z(
|
|
3792
|
-
_ =
|
|
3789
|
+
}, x = g.lineHeight, v = y = 0, !R(m) && !z(m))
|
|
3790
|
+
v = Oe(n, b.data, b.gc, v, m), y = x;
|
|
3791
|
+
else if (z(m)) for (f = 0, u = m.length; f < u; ++f)
|
|
3792
|
+
_ = m[f], !R(_) && !z(_) && (v = Oe(n, b.data, b.gc, v, _), y += x);
|
|
3793
3793
|
r.push(v), a.push(y), c = Math.max(v, c), h = Math.max(y, h);
|
|
3794
3794
|
}
|
|
3795
3795
|
Ea(o, i);
|
|
@@ -3851,32 +3851,32 @@ var le = class Dn extends Ct {
|
|
|
3851
3851
|
return e !== "auto" ? !!e : this.getMatchingVisibleMetas().length > 0;
|
|
3852
3852
|
}
|
|
3853
3853
|
_computeGridLineItems(e) {
|
|
3854
|
-
const i = this.axis, s = this.chart, n = this.options, { grid: o, position: r, border: a } = n, l = o.offset, c = this.isHorizontal(), h = this.ticks.length + (l ? 1 : 0), d = Yt(o), f = [], u = a.setContext(this.getContext()),
|
|
3855
|
-
return _t(s, D,
|
|
3854
|
+
const i = this.axis, s = this.chart, n = this.options, { grid: o, position: r, border: a } = n, l = o.offset, c = this.isHorizontal(), h = this.ticks.length + (l ? 1 : 0), d = Yt(o), f = [], u = a.setContext(this.getContext()), m = u.display ? u.width : 0, g = m / 2, p = function(D) {
|
|
3855
|
+
return _t(s, D, m);
|
|
3856
3856
|
};
|
|
3857
3857
|
let b, x, v, y, _, w, M, k, S, P, T, I;
|
|
3858
3858
|
if (r === "top")
|
|
3859
|
-
b =
|
|
3859
|
+
b = p(this.bottom), w = this.bottom - d, k = b - g, P = p(e.top) + g, I = e.bottom;
|
|
3860
3860
|
else if (r === "bottom")
|
|
3861
|
-
b =
|
|
3861
|
+
b = p(this.top), P = e.top, I = p(e.bottom) - g, w = b + g, k = this.top + d;
|
|
3862
3862
|
else if (r === "left")
|
|
3863
|
-
b =
|
|
3863
|
+
b = p(this.right), _ = this.right - d, M = b - g, S = p(e.left) + g, T = e.right;
|
|
3864
3864
|
else if (r === "right")
|
|
3865
|
-
b =
|
|
3865
|
+
b = p(this.left), S = e.left, T = p(e.right) - g, _ = b + g, M = this.left + d;
|
|
3866
3866
|
else if (i === "x") {
|
|
3867
|
-
if (r === "center") b =
|
|
3867
|
+
if (r === "center") b = p((e.top + e.bottom) / 2 + 0.5);
|
|
3868
3868
|
else if (O(r)) {
|
|
3869
3869
|
const D = Object.keys(r)[0], B = r[D];
|
|
3870
|
-
b =
|
|
3870
|
+
b = p(this.chart.scales[D].getPixelForValue(B));
|
|
3871
3871
|
}
|
|
3872
|
-
P = e.top, I = e.bottom, w = b +
|
|
3872
|
+
P = e.top, I = e.bottom, w = b + g, k = w + d;
|
|
3873
3873
|
} else if (i === "y") {
|
|
3874
|
-
if (r === "center") b =
|
|
3874
|
+
if (r === "center") b = p((e.left + e.right) / 2);
|
|
3875
3875
|
else if (O(r)) {
|
|
3876
3876
|
const D = Object.keys(r)[0], B = r[D];
|
|
3877
|
-
b =
|
|
3877
|
+
b = p(this.chart.scales[D].getPixelForValue(B));
|
|
3878
3878
|
}
|
|
3879
|
-
_ = b -
|
|
3879
|
+
_ = b - g, M = _ - d, S = e.left, T = e.right;
|
|
3880
3880
|
}
|
|
3881
3881
|
const Q = C(n.ticks.maxTicksLimit, h), V = Math.max(1, Math.ceil(h / Q));
|
|
3882
3882
|
for (x = 0; x < h; x += V) {
|
|
@@ -3903,12 +3903,12 @@ var le = class Dn extends Ct {
|
|
|
3903
3903
|
return this._ticksLength = h, this._borderValue = b, f;
|
|
3904
3904
|
}
|
|
3905
3905
|
_computeLabelItems(e) {
|
|
3906
|
-
const i = this.axis, s = this.options, { position: n, ticks: o } = s, r = this.isHorizontal(), a = this.ticks, { align: l, crossAlign: c, padding: h, mirror: d } = o, f = Yt(s.grid), u = f + h,
|
|
3906
|
+
const i = this.axis, s = this.options, { position: n, ticks: o } = s, r = this.isHorizontal(), a = this.ticks, { align: l, crossAlign: c, padding: h, mirror: d } = o, f = Yt(s.grid), u = f + h, m = d ? -h : u, g = -it(this.labelRotation), p = [];
|
|
3907
3907
|
let b, x, v, y, _, w, M, k, S, P, T, I, Q = "middle";
|
|
3908
3908
|
if (n === "top")
|
|
3909
|
-
w = this.bottom -
|
|
3909
|
+
w = this.bottom - m, M = this._getXAxisLabelAlignment();
|
|
3910
3910
|
else if (n === "bottom")
|
|
3911
|
-
w = this.top +
|
|
3911
|
+
w = this.top + m, M = this._getXAxisLabelAlignment();
|
|
3912
3912
|
else if (n === "left") {
|
|
3913
3913
|
const D = this._getYAxisLabelAlignment(f);
|
|
3914
3914
|
M = D.textAlign, _ = D.x;
|
|
@@ -3938,7 +3938,7 @@ var le = class Dn extends Ct {
|
|
|
3938
3938
|
k = this.getPixelForTick(b) + o.labelOffset, S = this._resolveTickFontOptions(b), P = S.lineHeight, T = z(y) ? y.length : 1;
|
|
3939
3939
|
const B = T / 2, st = D.color, $ = D.textStrokeColor, Ve = D.textStrokeWidth;
|
|
3940
3940
|
let Dt = M;
|
|
3941
|
-
r ? (_ = k, M === "inner" && (b === x - 1 ? Dt = this.options.reverse ? "left" : "right" : b === 0 ? Dt = this.options.reverse ? "right" : "left" : Dt = "center"), n === "top" ? c === "near" ||
|
|
3941
|
+
r ? (_ = k, M === "inner" && (b === x - 1 ? Dt = this.options.reverse ? "left" : "right" : b === 0 ? Dt = this.options.reverse ? "right" : "left" : Dt = "center"), n === "top" ? c === "near" || g !== 0 ? I = -T * P + P / 2 : c === "center" ? I = -V.highest.height / 2 - B * P + P : I = -V.highest.height + P / 2 : c === "near" || g !== 0 ? I = P / 2 : c === "center" ? I = V.highest.height / 2 - B * P : I = V.highest.height - T * P, d && (I *= -1), g !== 0 && !D.showLabelBackdrop && (_ += P / 2 * Math.sin(g))) : (w = k, I = (1 - T) * P / 2);
|
|
3942
3942
|
let ce;
|
|
3943
3943
|
if (D.showLabelBackdrop) {
|
|
3944
3944
|
const Ot = X(D.backdropPadding), Wt = V.heights[b], mt = V.widths[b];
|
|
@@ -3949,7 +3949,6 @@ var le = class Dn extends Ct {
|
|
|
3949
3949
|
break;
|
|
3950
3950
|
case "bottom":
|
|
3951
3951
|
Ht -= Wt;
|
|
3952
|
-
break;
|
|
3953
3952
|
}
|
|
3954
3953
|
switch (M) {
|
|
3955
3954
|
case "center":
|
|
@@ -3960,7 +3959,6 @@ var le = class Dn extends Ct {
|
|
|
3960
3959
|
break;
|
|
3961
3960
|
case "inner":
|
|
3962
3961
|
b === x - 1 ? Nt -= mt : b > 0 && (Nt -= mt / 2);
|
|
3963
|
-
break;
|
|
3964
3962
|
}
|
|
3965
3963
|
ce = {
|
|
3966
3964
|
left: Nt,
|
|
@@ -3970,12 +3968,12 @@ var le = class Dn extends Ct {
|
|
|
3970
3968
|
color: D.backdropColor
|
|
3971
3969
|
};
|
|
3972
3970
|
}
|
|
3973
|
-
|
|
3971
|
+
p.push({
|
|
3974
3972
|
label: y,
|
|
3975
3973
|
font: S,
|
|
3976
3974
|
textOffset: I,
|
|
3977
3975
|
options: {
|
|
3978
|
-
rotation:
|
|
3976
|
+
rotation: g,
|
|
3979
3977
|
color: st,
|
|
3980
3978
|
strokeColor: $,
|
|
3981
3979
|
strokeWidth: Ve,
|
|
@@ -3986,7 +3984,7 @@ var le = class Dn extends Ct {
|
|
|
3986
3984
|
}
|
|
3987
3985
|
});
|
|
3988
3986
|
}
|
|
3989
|
-
return
|
|
3987
|
+
return p;
|
|
3990
3988
|
}
|
|
3991
3989
|
_getXAxisLabelAlignment() {
|
|
3992
3990
|
const { position: e, ticks: i } = this.options;
|
|
@@ -4131,7 +4129,8 @@ var le = class Dn extends Ct {
|
|
|
4131
4129
|
return n;
|
|
4132
4130
|
}
|
|
4133
4131
|
_resolveTickFontOptions(e) {
|
|
4134
|
-
|
|
4132
|
+
const i = this.options.ticks.setContext(this.getContext(e));
|
|
4133
|
+
return j(i.font);
|
|
4135
4134
|
}
|
|
4136
4135
|
_maxDigits() {
|
|
4137
4136
|
const e = this._resolveTickFontOptions(0).lineHeight;
|
|
@@ -4264,12 +4263,12 @@ var ja = class {
|
|
|
4264
4263
|
_notify(t, e, i, s) {
|
|
4265
4264
|
s = s || {};
|
|
4266
4265
|
for (const n of t) {
|
|
4267
|
-
const o = n.plugin, r = o[i]
|
|
4268
|
-
if (E(r, [
|
|
4266
|
+
const o = n.plugin, r = o[i], a = [
|
|
4269
4267
|
e,
|
|
4270
4268
|
s,
|
|
4271
4269
|
n.options
|
|
4272
|
-
]
|
|
4270
|
+
];
|
|
4271
|
+
if (E(r, a, o) === !1 && s.cancelable) return !1;
|
|
4273
4272
|
}
|
|
4274
4273
|
return !0;
|
|
4275
4274
|
}
|
|
@@ -4631,8 +4630,9 @@ var ki = class {
|
|
|
4631
4630
|
this.width = o.width, this.height = o.height, this._aspectRatio = this.aspectRatio, $i(this, r, !0) && (this.notifyPlugins("resize", { size: o }), E(i.onResize, [this, o], this), this.attached && this._doResize(a) && this.render());
|
|
4632
4631
|
}
|
|
4633
4632
|
ensureScalesHaveIDs() {
|
|
4634
|
-
|
|
4635
|
-
|
|
4633
|
+
const t = this.options.scales || {};
|
|
4634
|
+
A(t, (e, i) => {
|
|
4635
|
+
e.id = i;
|
|
4636
4636
|
});
|
|
4637
4637
|
}
|
|
4638
4638
|
buildOrUpdateScales() {
|
|
@@ -4729,8 +4729,8 @@ var ki = class {
|
|
|
4729
4729
|
}), this.ensureScalesHaveIDs(), this.buildOrUpdateScales();
|
|
4730
4730
|
}
|
|
4731
4731
|
_checkEventBindings() {
|
|
4732
|
-
const t = this.options;
|
|
4733
|
-
(!Li(
|
|
4732
|
+
const t = this.options, e = new Set(Object.keys(this._listeners)), i = new Set(t.events);
|
|
4733
|
+
(!Li(e, i) || !!this._responsiveListeners !== t.responsive) && (this.unbindEvents(), this.bindEvents());
|
|
4734
4734
|
}
|
|
4735
4735
|
_updateHiddenIndices() {
|
|
4736
4736
|
const { _hiddenIndices: t } = this, e = this._getUniformDataChanges() || [];
|
|
@@ -5007,8 +5007,8 @@ function cl(t, e, i) {
|
|
|
5007
5007
|
const f = Math.min(c / 2, r * Y(s - i));
|
|
5008
5008
|
if (h === "round") t.arc(n, o, f, i - L / 2, s + L / 2, !0);
|
|
5009
5009
|
else if (h === "bevel") {
|
|
5010
|
-
const u = 2 * f * f,
|
|
5011
|
-
t.lineTo(
|
|
5010
|
+
const u = 2 * f * f, m = -u * Math.cos(i + L / 2) + n, g = -u * Math.sin(i + L / 2) + o, p = u * Math.cos(s + L / 2) + n, b = u * Math.sin(s + L / 2) + o;
|
|
5011
|
+
t.lineTo(m, g), t.lineTo(p, b);
|
|
5012
5012
|
}
|
|
5013
5013
|
}
|
|
5014
5014
|
t.closePath(), t.moveTo(0, 0), t.rect(0, 0, t.canvas.width, t.canvas.height), t.clip("evenodd");
|
|
@@ -5047,12 +5047,12 @@ function Lt(t, e, i, s) {
|
|
|
5047
5047
|
function Re(t, e, i, s, n, o) {
|
|
5048
5048
|
const { x: r, y: a, startAngle: l, pixelMargin: c, innerRadius: h } = e, d = Math.max(e.outerRadius + s + i - c, 0), f = h > 0 ? h + s + i + c : 0;
|
|
5049
5049
|
let u = 0;
|
|
5050
|
-
const
|
|
5050
|
+
const m = n - l;
|
|
5051
5051
|
if (s) {
|
|
5052
5052
|
const V = ((h > 0 ? h - s : 0) + (d > 0 ? d - s : 0)) / 2;
|
|
5053
|
-
u = (
|
|
5053
|
+
u = (m - (V !== 0 ? m * V / (V + s) : m)) / 2;
|
|
5054
5054
|
}
|
|
5055
|
-
const
|
|
5055
|
+
const g = (m - Math.max(1e-3, m * d - i / L) / d) / 2, p = l + g + u, b = n - g - u, { outerStart: x, outerEnd: v, innerStart: y, innerEnd: _ } = fl(e, f, d, b - p), w = d - x, M = d - v, k = p + x / w, S = b - v / M, P = f + y, T = f + _, I = p + y / P, Q = b - _ / T;
|
|
5056
5056
|
if (t.beginPath(), o) {
|
|
5057
5057
|
const V = (k + S) / 2;
|
|
5058
5058
|
if (t.arc(r, a, d, k, V), t.arc(r, a, d, V, S), v > 0) {
|
|
@@ -5064,15 +5064,15 @@ function Re(t, e, i, s, n, o) {
|
|
|
5064
5064
|
const $ = Lt(T, Q, r, a);
|
|
5065
5065
|
t.arc($.x, $.y, _, b + N, Q + Math.PI);
|
|
5066
5066
|
}
|
|
5067
|
-
const B = (b - _ / f + (
|
|
5068
|
-
if (t.arc(r, a, f, b - _ / f, B, !0), t.arc(r, a, f, B,
|
|
5067
|
+
const B = (b - _ / f + (p + y / f)) / 2;
|
|
5068
|
+
if (t.arc(r, a, f, b - _ / f, B, !0), t.arc(r, a, f, B, p + y / f, !0), y > 0) {
|
|
5069
5069
|
const $ = Lt(P, I, r, a);
|
|
5070
|
-
t.arc($.x, $.y, y, I + Math.PI,
|
|
5070
|
+
t.arc($.x, $.y, y, I + Math.PI, p - N);
|
|
5071
5071
|
}
|
|
5072
|
-
const st = Lt(w,
|
|
5072
|
+
const st = Lt(w, p, r, a);
|
|
5073
5073
|
if (t.lineTo(st.x, st.y), x > 0) {
|
|
5074
5074
|
const $ = Lt(w, k, r, a);
|
|
5075
|
-
t.arc($.x, $.y, x,
|
|
5075
|
+
t.arc($.x, $.y, x, p - N, k);
|
|
5076
5076
|
}
|
|
5077
5077
|
} else {
|
|
5078
5078
|
t.moveTo(r, a);
|
|
@@ -5094,16 +5094,16 @@ function ul(t, e, i, s, n) {
|
|
|
5094
5094
|
return Re(t, e, i, s, l, n), t.fill(), l;
|
|
5095
5095
|
}
|
|
5096
5096
|
function gl(t, e, i, s, n) {
|
|
5097
|
-
const { fullCircles: o, startAngle: r, circumference: a, options: l } = e, { borderWidth: c, borderJoinStyle: h, borderDash: d, borderDashOffset: f, borderRadius: u } = l,
|
|
5097
|
+
const { fullCircles: o, startAngle: r, circumference: a, options: l } = e, { borderWidth: c, borderJoinStyle: h, borderDash: d, borderDashOffset: f, borderRadius: u } = l, m = l.borderAlign === "inner";
|
|
5098
5098
|
if (!c) return;
|
|
5099
|
-
t.setLineDash(d || []), t.lineDashOffset = f,
|
|
5100
|
-
let
|
|
5099
|
+
t.setLineDash(d || []), t.lineDashOffset = f, m ? (t.lineWidth = c * 2, t.lineJoin = h || "round") : (t.lineWidth = c, t.lineJoin = h || "bevel");
|
|
5100
|
+
let g = e.endAngle;
|
|
5101
5101
|
if (o) {
|
|
5102
|
-
Re(t, e, i, s,
|
|
5103
|
-
for (let
|
|
5104
|
-
isNaN(a) || (
|
|
5102
|
+
Re(t, e, i, s, g, n);
|
|
5103
|
+
for (let p = 0; p < o; ++p) t.stroke();
|
|
5104
|
+
isNaN(a) || (g = r + (a % F || F));
|
|
5105
5105
|
}
|
|
5106
|
-
|
|
5106
|
+
m && hl(t, e, g), l.selfJoin && g - r >= L && u === 0 && h !== "miter" && cl(t, e, g), o || (Re(t, e, i, s, g, n), t.stroke());
|
|
5107
5107
|
}
|
|
5108
5108
|
var Oc = class extends Ct {
|
|
5109
5109
|
static id = "arc";
|
|
@@ -5137,17 +5137,17 @@ var Oc = class extends Ct {
|
|
|
5137
5137
|
super(), 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, t && Object.assign(this, t);
|
|
5138
5138
|
}
|
|
5139
5139
|
inRange(t, e, i) {
|
|
5140
|
-
const
|
|
5140
|
+
const s = this.getProps(["x", "y"], i), { angle: n, distance: o } = en(s, {
|
|
5141
5141
|
x: t,
|
|
5142
5142
|
y: e
|
|
5143
|
-
}), { startAngle:
|
|
5143
|
+
}), { startAngle: r, endAngle: a, innerRadius: l, outerRadius: c, circumference: h } = this.getProps([
|
|
5144
5144
|
"startAngle",
|
|
5145
5145
|
"endAngle",
|
|
5146
5146
|
"innerRadius",
|
|
5147
5147
|
"outerRadius",
|
|
5148
5148
|
"circumference"
|
|
5149
|
-
], i),
|
|
5150
|
-
return
|
|
5149
|
+
], i), d = (this.options.spacing + this.options.borderWidth) / 2, f = C(h, a - r), u = se(n, r, a) && r !== a, m = f >= F || u, g = wt(o, l + d, c + d);
|
|
5150
|
+
return m && g;
|
|
5151
5151
|
}
|
|
5152
5152
|
getCenterPoint(t) {
|
|
5153
5153
|
const { x: e, y: i, startAngle: s, endAngle: n, innerRadius: o, outerRadius: r } = this.getProps([
|
|
@@ -5196,21 +5196,21 @@ function In(t, e, i = {}) {
|
|
|
5196
5196
|
}
|
|
5197
5197
|
function bl(t, e, i, s) {
|
|
5198
5198
|
const { points: n, options: o } = e, { count: r, start: a, loop: l, ilen: c } = In(n, i, s), h = ml(o);
|
|
5199
|
-
let { move: d = !0, reverse: f } = s || {}, u,
|
|
5199
|
+
let { move: d = !0, reverse: f } = s || {}, u, m, g;
|
|
5200
5200
|
for (u = 0; u <= c; ++u)
|
|
5201
|
-
|
|
5202
|
-
return l && (
|
|
5201
|
+
m = n[(a + (f ? c - u : u)) % r], !m.skip && (d ? (t.moveTo(m.x, m.y), d = !1) : h(t, g, m, f, o.stepped), g = m);
|
|
5202
|
+
return l && (m = n[(a + (f ? c : 0)) % r], h(t, g, m, f, o.stepped)), !!l;
|
|
5203
5203
|
}
|
|
5204
5204
|
function _l(t, e, i, s) {
|
|
5205
5205
|
const n = e.points, { count: o, start: r, ilen: a } = In(n, i, s), { move: l = !0, reverse: c } = s || {};
|
|
5206
|
-
let h = 0, d = 0, f, u,
|
|
5206
|
+
let h = 0, d = 0, f, u, m, g, p, b;
|
|
5207
5207
|
const x = (y) => (r + (c ? a - y : y)) % o, v = () => {
|
|
5208
|
-
|
|
5208
|
+
g !== p && (t.lineTo(h, p), t.lineTo(h, g), t.lineTo(h, b));
|
|
5209
5209
|
};
|
|
5210
5210
|
for (l && (u = n[x(0)], t.moveTo(u.x, u.y)), f = 0; f <= a; ++f) {
|
|
5211
5211
|
if (u = n[x(f)], u.skip) continue;
|
|
5212
5212
|
const y = u.x, _ = u.y, w = y | 0;
|
|
5213
|
-
w ===
|
|
5213
|
+
w === m ? (_ < g ? g = _ : _ > p && (p = _), h = (d * h + y) / ++d) : (v(), t.lineTo(y, _), m = w, d = 0, g = p = _), b = _;
|
|
5214
5214
|
}
|
|
5215
5215
|
v();
|
|
5216
5216
|
}
|
|
@@ -5302,8 +5302,8 @@ var Si = class extends Ct {
|
|
|
5302
5302
|
r.push(f);
|
|
5303
5303
|
continue;
|
|
5304
5304
|
}
|
|
5305
|
-
const
|
|
5306
|
-
|
|
5305
|
+
const m = a(f, u, Math.abs((s - f[e]) / (u[e] - f[e])), i.stepped);
|
|
5306
|
+
m[e] = t[e], r.push(m);
|
|
5307
5307
|
}
|
|
5308
5308
|
return r.length === 1 ? r[0] : r;
|
|
5309
5309
|
}
|
|
@@ -5400,9 +5400,9 @@ function kl(t, e, i) {
|
|
|
5400
5400
|
}
|
|
5401
5401
|
const d = _n(e, h);
|
|
5402
5402
|
for (const f of d) {
|
|
5403
|
-
const u = li(i, o[f.start], o[f.end], f.loop),
|
|
5404
|
-
for (const
|
|
5405
|
-
source:
|
|
5403
|
+
const u = li(i, o[f.start], o[f.end], f.loop), m = bn(a, n, u);
|
|
5404
|
+
for (const g of m) r.push({
|
|
5405
|
+
source: g,
|
|
5406
5406
|
target: f,
|
|
5407
5407
|
start: { [i]: vs(h, u, "start", Math.max) },
|
|
5408
5408
|
end: { [i]: vs(h, u, "end", Math.min) }
|
|
@@ -5616,7 +5616,7 @@ function Hl(t) {
|
|
|
5616
5616
|
return a;
|
|
5617
5617
|
}
|
|
5618
5618
|
function Ze(t, e, i) {
|
|
5619
|
-
const s = Fl(e), { chart: n, index: o, line: r, scale: a, axis: l } = e, c = r.options, h = c.fill, d = c.backgroundColor, { above: f = d, below: u = d } = h || {},
|
|
5619
|
+
const s = Fl(e), { chart: n, index: o, line: r, scale: a, axis: l } = e, c = r.options, h = c.fill, d = c.backgroundColor, { above: f = d, below: u = d } = h || {}, m = n.getDatasetMeta(o), g = xn(n, m);
|
|
5620
5620
|
s && r.points.length && (ze(t, i), Nl(t, {
|
|
5621
5621
|
line: r,
|
|
5622
5622
|
target: s,
|
|
@@ -5625,7 +5625,7 @@ function Ze(t, e, i) {
|
|
|
5625
5625
|
area: i,
|
|
5626
5626
|
scale: a,
|
|
5627
5627
|
axis: l,
|
|
5628
|
-
clip:
|
|
5628
|
+
clip: g
|
|
5629
5629
|
}), Be(t));
|
|
5630
5630
|
}
|
|
5631
5631
|
function Nl(t, e) {
|
|
@@ -5678,19 +5678,19 @@ function ks(t, e, i) {
|
|
|
5678
5678
|
function Qe(t, e) {
|
|
5679
5679
|
const { line: i, target: s, property: n, color: o, scale: r, clip: a } = e, l = kl(i, s, n);
|
|
5680
5680
|
for (const { source: c, target: h, start: d, end: f } of l) {
|
|
5681
|
-
const { style: { backgroundColor: u = o } = {} } = c,
|
|
5682
|
-
t.save(), t.fillStyle = u, Vl(t, r, a,
|
|
5683
|
-
const
|
|
5684
|
-
let
|
|
5685
|
-
if (
|
|
5686
|
-
|
|
5681
|
+
const { style: { backgroundColor: u = o } = {} } = c, m = s !== !0;
|
|
5682
|
+
t.save(), t.fillStyle = u, Vl(t, r, a, m && li(n, d, f)), t.beginPath();
|
|
5683
|
+
const g = !!i.pathSegment(t, c);
|
|
5684
|
+
let p;
|
|
5685
|
+
if (m) {
|
|
5686
|
+
g ? t.closePath() : Ss(t, s, f, n);
|
|
5687
5687
|
const b = !!s.pathSegment(t, h, {
|
|
5688
|
-
move:
|
|
5688
|
+
move: g,
|
|
5689
5689
|
reverse: !0
|
|
5690
5690
|
});
|
|
5691
|
-
|
|
5691
|
+
p = g && b, p || Ss(t, s, d, n);
|
|
5692
5692
|
}
|
|
5693
|
-
t.closePath(), t.fill(
|
|
5693
|
+
t.closePath(), t.fill(p ? "evenodd" : "nonzero"), t.restore();
|
|
5694
5694
|
}
|
|
5695
5695
|
}
|
|
5696
5696
|
function Vl(t, e, i, s) {
|
|
@@ -5782,29 +5782,29 @@ var Ac = {
|
|
|
5782
5782
|
let h = t;
|
|
5783
5783
|
n.textAlign = "left", n.textBaseline = "middle";
|
|
5784
5784
|
let d = -1, f = -c;
|
|
5785
|
-
return this.legendItems.forEach((u,
|
|
5786
|
-
const
|
|
5787
|
-
(
|
|
5785
|
+
return this.legendItems.forEach((u, m) => {
|
|
5786
|
+
const g = i + e / 2 + n.measureText(u.text).width;
|
|
5787
|
+
(m === 0 || l[l.length - 1] + g + 2 * r > o) && (h += c, l[l.length - (m > 0 ? 0 : 1)] = 0, f += c, d++), a[m] = {
|
|
5788
5788
|
left: 0,
|
|
5789
5789
|
top: f,
|
|
5790
5790
|
row: d,
|
|
5791
|
-
width:
|
|
5791
|
+
width: g,
|
|
5792
5792
|
height: s
|
|
5793
|
-
}, l[l.length - 1] +=
|
|
5793
|
+
}, l[l.length - 1] += g + r;
|
|
5794
5794
|
}), h;
|
|
5795
5795
|
}
|
|
5796
5796
|
_fitCols(t, e, i, s) {
|
|
5797
5797
|
const { ctx: n, maxHeight: o, options: { labels: { padding: r } } } = this, a = this.legendHitBoxes = [], l = this.columnSizes = [], c = o - t;
|
|
5798
|
-
let h = r, d = 0, f = 0, u = 0,
|
|
5799
|
-
return this.legendItems.forEach((
|
|
5800
|
-
const { itemWidth: b, itemHeight: x } = $l(i, e, n,
|
|
5801
|
-
|
|
5798
|
+
let h = r, d = 0, f = 0, u = 0, m = 0;
|
|
5799
|
+
return this.legendItems.forEach((g, p) => {
|
|
5800
|
+
const { itemWidth: b, itemHeight: x } = $l(i, e, n, g, s);
|
|
5801
|
+
p > 0 && f + x + 2 * r > c && (h += d + r, l.push({
|
|
5802
5802
|
width: d,
|
|
5803
5803
|
height: f
|
|
5804
|
-
}), u += d + r,
|
|
5804
|
+
}), u += d + r, m++, d = f = 0), a[p] = {
|
|
5805
5805
|
left: u,
|
|
5806
5806
|
top: f,
|
|
5807
|
-
col:
|
|
5807
|
+
col: m,
|
|
5808
5808
|
width: b,
|
|
5809
5809
|
height: x
|
|
5810
5810
|
}, d = Math.max(d, b), f += x + r;
|
|
@@ -5839,31 +5839,31 @@ var Ac = {
|
|
|
5839
5839
|
const { options: t, columnSizes: e, lineWidths: i, ctx: s } = this, { align: n, labels: o } = t, r = H.color, a = It(t.rtl, this.left, this.width), l = j(o.font), { padding: c } = o, h = l.size, d = h / 2;
|
|
5840
5840
|
let f;
|
|
5841
5841
|
this.drawTitle(), s.textAlign = a.textAlign("left"), s.textBaseline = "middle", s.lineWidth = 0.5, s.font = l.string;
|
|
5842
|
-
const { boxWidth: u, boxHeight:
|
|
5843
|
-
if (isNaN(u) || u <= 0 || isNaN(
|
|
5842
|
+
const { boxWidth: u, boxHeight: m, itemHeight: g } = Ps(o, h), p = function(_, w, M) {
|
|
5843
|
+
if (isNaN(u) || u <= 0 || isNaN(m) || m < 0) return;
|
|
5844
5844
|
s.save();
|
|
5845
5845
|
const k = C(M.lineWidth, 1);
|
|
5846
5846
|
if (s.fillStyle = C(M.fillStyle, r), s.lineCap = C(M.lineCap, "butt"), s.lineDashOffset = C(M.lineDashOffset, 0), s.lineJoin = C(M.lineJoin, "miter"), s.lineWidth = k, s.strokeStyle = C(M.strokeStyle, r), s.setLineDash(C(M.lineDash, [])), o.usePointStyle) {
|
|
5847
5847
|
const S = {
|
|
5848
|
-
radius:
|
|
5848
|
+
radius: m * Math.SQRT2 / 2,
|
|
5849
5849
|
pointStyle: M.pointStyle,
|
|
5850
5850
|
rotation: M.rotation,
|
|
5851
5851
|
borderWidth: k
|
|
5852
5852
|
}, P = a.xPlus(_, u / 2), T = w + d;
|
|
5853
5853
|
ln(s, S, P, T, o.pointStyleWidth && u);
|
|
5854
5854
|
} else {
|
|
5855
|
-
const S = w + Math.max((h -
|
|
5855
|
+
const S = w + Math.max((h - m) / 2, 0), P = a.leftForLtr(_, u), T = Rt(M.borderRadius);
|
|
5856
5856
|
s.beginPath(), Object.values(T).some((I) => I !== 0) ? Te(s, {
|
|
5857
5857
|
x: P,
|
|
5858
5858
|
y: S,
|
|
5859
5859
|
w: u,
|
|
5860
|
-
h:
|
|
5860
|
+
h: m,
|
|
5861
5861
|
radius: T
|
|
5862
|
-
}) : s.rect(P, S, u,
|
|
5862
|
+
}) : s.rect(P, S, u, m), s.fill(), k !== 0 && s.stroke();
|
|
5863
5863
|
}
|
|
5864
5864
|
s.restore();
|
|
5865
5865
|
}, b = function(_, w, M) {
|
|
5866
|
-
Ft(s, M.text, _, w +
|
|
5866
|
+
Ft(s, M.text, _, w + g / 2, l, {
|
|
5867
5867
|
strikethrough: M.hidden,
|
|
5868
5868
|
textAlign: a.textAlign(M.textAlign)
|
|
5869
5869
|
});
|
|
@@ -5877,14 +5877,14 @@ var Ac = {
|
|
|
5877
5877
|
y: G(n, this.top + v + c, this.bottom - e[0].height),
|
|
5878
5878
|
line: 0
|
|
5879
5879
|
}, gn(this.ctx, t.textDirection);
|
|
5880
|
-
const y =
|
|
5880
|
+
const y = g + c;
|
|
5881
5881
|
this.legendItems.forEach((_, w) => {
|
|
5882
5882
|
s.strokeStyle = _.fontColor, s.fillStyle = _.fontColor;
|
|
5883
5883
|
const M = s.measureText(_.text).width, k = a.textAlign(_.textAlign || (_.textAlign = o.textAlign)), S = u + d + M;
|
|
5884
5884
|
let P = f.x, T = f.y;
|
|
5885
5885
|
a.setWidth(this.width), x ? w > 0 && P + S + c > this.right && (T = f.y += y, f.line++, P = f.x = G(n, this.left + c, this.right - i[f.line])) : w > 0 && T + y > this.bottom && (P = f.x = P + e[f.line].width + c, f.line++, T = f.y = G(n, this.top + v + c, this.bottom - e[f.line].height));
|
|
5886
5886
|
const I = a.x(P);
|
|
5887
|
-
if (
|
|
5887
|
+
if (p(I, T, _), P = Lo(k, P + u + d, x ? P + S : this.right, t.rtl), b(a.x(P), T, _), x) f.x += S + c;
|
|
5888
5888
|
else if (typeof _.text != "string") {
|
|
5889
5889
|
const Q = l.lineHeight;
|
|
5890
5890
|
f.y += zn(_, Q) + c;
|
|
@@ -5899,7 +5899,7 @@ var Ac = {
|
|
|
5899
5899
|
if (this.isHorizontal())
|
|
5900
5900
|
d = Math.max(...this.lineWidths), c = this.top + l, h = G(t.align, h, this.right - d);
|
|
5901
5901
|
else {
|
|
5902
|
-
const u = this.columnSizes.reduce((
|
|
5902
|
+
const u = this.columnSizes.reduce((m, g) => Math.max(m, g.height), 0);
|
|
5903
5903
|
c = l + G(t.align, this.top, this.bottom - u - t.labels.padding - this._computeTitleHeight());
|
|
5904
5904
|
}
|
|
5905
5905
|
const f = G(r, h, h + d);
|
|
@@ -6062,8 +6062,8 @@ var Lc = {
|
|
|
6062
6062
|
for (o = 0, r = t.length; o < r; ++o) {
|
|
6063
6063
|
const l = t[o].element;
|
|
6064
6064
|
if (l && l.hasValue()) {
|
|
6065
|
-
const c = ii(e,
|
|
6066
|
-
|
|
6065
|
+
const c = l.getCenterPoint(), h = ii(e, c);
|
|
6066
|
+
h < n && (n = h, a = l);
|
|
6067
6067
|
}
|
|
6068
6068
|
}
|
|
6069
6069
|
if (a) {
|
|
@@ -6099,22 +6099,22 @@ function Kl(t, e) {
|
|
|
6099
6099
|
};
|
|
6100
6100
|
}
|
|
6101
6101
|
function Ds(t, e) {
|
|
6102
|
-
const i = t.chart.ctx, { body: s, footer: n, title: o } = t, { boxWidth: r, boxHeight: a } = e, l = j(e.bodyFont), c = j(e.titleFont), h = j(e.footerFont), d = o.length, f = n.length, u = s.length,
|
|
6103
|
-
let
|
|
6104
|
-
if (b += t.beforeBody.length + t.afterBody.length, d && (
|
|
6102
|
+
const i = t.chart.ctx, { body: s, footer: n, title: o } = t, { boxWidth: r, boxHeight: a } = e, l = j(e.bodyFont), c = j(e.titleFont), h = j(e.footerFont), d = o.length, f = n.length, u = s.length, m = X(e.padding);
|
|
6103
|
+
let g = m.height, p = 0, b = s.reduce((y, _) => y + _.before.length + _.lines.length + _.after.length, 0);
|
|
6104
|
+
if (b += t.beforeBody.length + t.afterBody.length, d && (g += d * c.lineHeight + (d - 1) * e.titleSpacing + e.titleMarginBottom), b) {
|
|
6105
6105
|
const y = e.displayColors ? Math.max(a, l.lineHeight) : l.lineHeight;
|
|
6106
|
-
|
|
6106
|
+
g += u * y + (b - u) * l.lineHeight + (b - 1) * e.bodySpacing;
|
|
6107
6107
|
}
|
|
6108
|
-
f && (
|
|
6108
|
+
f && (g += e.footerMarginTop + f * h.lineHeight + (f - 1) * e.footerSpacing);
|
|
6109
6109
|
let x = 0;
|
|
6110
6110
|
const v = function(y) {
|
|
6111
|
-
|
|
6111
|
+
p = Math.max(p, i.measureText(y).width + x);
|
|
6112
6112
|
};
|
|
6113
6113
|
return i.save(), i.font = c.string, A(t.title, v), i.font = l.string, A(t.beforeBody.concat(t.afterBody), v), x = e.displayColors ? r + 2 + e.boxPadding : 0, A(s, (y) => {
|
|
6114
6114
|
A(y.before, v), A(y.lines, v), A(y.after, v);
|
|
6115
|
-
}), x = 0, i.font = h.string, A(t.footer, v), i.restore(),
|
|
6116
|
-
width:
|
|
6117
|
-
height:
|
|
6115
|
+
}), x = 0, i.font = h.string, A(t.footer, v), i.restore(), p += m.width, {
|
|
6116
|
+
width: p,
|
|
6117
|
+
height: g
|
|
6118
6118
|
};
|
|
6119
6119
|
}
|
|
6120
6120
|
function ql(t, e) {
|
|
@@ -6147,11 +6147,11 @@ function Ql(t, e, i) {
|
|
|
6147
6147
|
}
|
|
6148
6148
|
function Ts(t, e, i, s) {
|
|
6149
6149
|
const { caretSize: n, caretPadding: o, cornerRadius: r } = t, { xAlign: a, yAlign: l } = i, c = n + o, { topLeft: h, topRight: d, bottomLeft: f, bottomRight: u } = Rt(r);
|
|
6150
|
-
let
|
|
6151
|
-
const
|
|
6152
|
-
return l === "center" ? a === "left" ?
|
|
6153
|
-
x: U(
|
|
6154
|
-
y: U(
|
|
6150
|
+
let m = Zl(e, a);
|
|
6151
|
+
const g = Ql(e, l, c);
|
|
6152
|
+
return l === "center" ? a === "left" ? m += c : a === "right" && (m -= c) : a === "left" ? m -= Math.max(h, f) + n : a === "right" && (m += Math.max(d, u) + n), {
|
|
6153
|
+
x: U(m, 0, s.width - e.width),
|
|
6154
|
+
y: U(g, 0, s.height - e.height)
|
|
6155
6155
|
};
|
|
6156
6156
|
}
|
|
6157
6157
|
function ve(t, e, i) {
|
|
@@ -6307,11 +6307,11 @@ var Rs = class extends Ct {
|
|
|
6307
6307
|
e.lineTo(n.x1, n.y1), e.lineTo(n.x2, n.y2), e.lineTo(n.x3, n.y3);
|
|
6308
6308
|
}
|
|
6309
6309
|
getCaretPosition(t, e, i) {
|
|
6310
|
-
const { xAlign: s, yAlign: n } = this, { caretSize: o, cornerRadius: r } = i, { topLeft: a, topRight: l, bottomLeft: c, bottomRight: h } = Rt(r), { x: d, y: f } = t, { width: u, height:
|
|
6311
|
-
let
|
|
6312
|
-
return n === "center" ? (v = f +
|
|
6313
|
-
x1:
|
|
6314
|
-
x2:
|
|
6310
|
+
const { xAlign: s, yAlign: n } = this, { caretSize: o, cornerRadius: r } = i, { topLeft: a, topRight: l, bottomLeft: c, bottomRight: h } = Rt(r), { x: d, y: f } = t, { width: u, height: m } = e;
|
|
6311
|
+
let g, p, b, x, v, y;
|
|
6312
|
+
return n === "center" ? (v = f + m / 2, s === "left" ? (g = d, p = g - o, x = v + o, y = v - o) : (g = d + u, p = g + o, x = v - o, y = v + o), b = g) : (s === "left" ? p = d + Math.max(a, c) + o : s === "right" ? p = d + u - Math.max(l, h) - o : p = this.caretX, n === "top" ? (x = f, v = x - o, g = p - o, b = p + o) : (x = f + m, v = x + o, g = p + o, b = p - o), y = x), {
|
|
6313
|
+
x1: g,
|
|
6314
|
+
x2: p,
|
|
6315
6315
|
x3: b,
|
|
6316
6316
|
y1: x,
|
|
6317
6317
|
y2: v,
|
|
@@ -6330,45 +6330,45 @@ var Rs = class extends Ct {
|
|
|
6330
6330
|
_drawColorBox(t, e, i, s, n) {
|
|
6331
6331
|
const o = this.labelColors[i], r = this.labelPointStyles[i], { boxHeight: a, boxWidth: l } = n, c = j(n.bodyFont), h = ve(this, "left", n), d = s.x(h), f = a < c.lineHeight ? (c.lineHeight - a) / 2 : 0, u = e.y + f;
|
|
6332
6332
|
if (n.usePointStyle) {
|
|
6333
|
-
const
|
|
6333
|
+
const m = {
|
|
6334
6334
|
radius: Math.min(l, a) / 2,
|
|
6335
6335
|
pointStyle: r.pointStyle,
|
|
6336
6336
|
rotation: r.rotation,
|
|
6337
6337
|
borderWidth: 1
|
|
6338
|
-
},
|
|
6339
|
-
t.strokeStyle = n.multiKeyBackground, t.fillStyle = n.multiKeyBackground, ni(t,
|
|
6338
|
+
}, g = s.leftForLtr(d, l) + l / 2, p = u + a / 2;
|
|
6339
|
+
t.strokeStyle = n.multiKeyBackground, t.fillStyle = n.multiKeyBackground, ni(t, m, g, p), t.strokeStyle = o.borderColor, t.fillStyle = o.backgroundColor, ni(t, m, g, p);
|
|
6340
6340
|
} else {
|
|
6341
6341
|
t.lineWidth = O(o.borderWidth) ? Math.max(...Object.values(o.borderWidth)) : o.borderWidth || 1, t.strokeStyle = o.borderColor, t.setLineDash(o.borderDash || []), t.lineDashOffset = o.borderDashOffset || 0;
|
|
6342
|
-
const
|
|
6343
|
-
Object.values(
|
|
6344
|
-
x:
|
|
6342
|
+
const m = s.leftForLtr(d, l), g = s.leftForLtr(s.xPlus(d, 1), l - 2), p = Rt(o.borderRadius);
|
|
6343
|
+
Object.values(p).some((b) => b !== 0) ? (t.beginPath(), t.fillStyle = n.multiKeyBackground, Te(t, {
|
|
6344
|
+
x: m,
|
|
6345
6345
|
y: u,
|
|
6346
6346
|
w: l,
|
|
6347
6347
|
h: a,
|
|
6348
|
-
radius:
|
|
6348
|
+
radius: p
|
|
6349
6349
|
}), t.fill(), t.stroke(), t.fillStyle = o.backgroundColor, t.beginPath(), Te(t, {
|
|
6350
|
-
x:
|
|
6350
|
+
x: g,
|
|
6351
6351
|
y: u + 1,
|
|
6352
6352
|
w: l - 2,
|
|
6353
6353
|
h: a - 2,
|
|
6354
|
-
radius:
|
|
6355
|
-
}), t.fill()) : (t.fillStyle = n.multiKeyBackground, t.fillRect(
|
|
6354
|
+
radius: p
|
|
6355
|
+
}), t.fill()) : (t.fillStyle = n.multiKeyBackground, t.fillRect(m, u, l, a), t.strokeRect(m, u, l, a), t.fillStyle = o.backgroundColor, t.fillRect(g, u + 1, l - 2, a - 2));
|
|
6356
6356
|
}
|
|
6357
6357
|
t.fillStyle = this.labelTextColors[i];
|
|
6358
6358
|
}
|
|
6359
6359
|
drawBody(t, e, i) {
|
|
6360
6360
|
const { body: s } = this, { bodySpacing: n, bodyAlign: o, displayColors: r, boxHeight: a, boxWidth: l, boxPadding: c } = i, h = j(i.bodyFont);
|
|
6361
6361
|
let d = h.lineHeight, f = 0;
|
|
6362
|
-
const u = It(i.rtl, this.x, this.width),
|
|
6362
|
+
const u = It(i.rtl, this.x, this.width), m = function(M) {
|
|
6363
6363
|
e.fillText(M, u.x(t.x + f), t.y + d / 2), t.y += d + n;
|
|
6364
|
-
},
|
|
6365
|
-
let
|
|
6366
|
-
for (e.textAlign = o, e.textBaseline = "middle", e.font = h.string, t.x = ve(this,
|
|
6367
|
-
for (
|
|
6368
|
-
|
|
6369
|
-
A(
|
|
6364
|
+
}, g = u.textAlign(o);
|
|
6365
|
+
let p, b, x, v, y, _, w;
|
|
6366
|
+
for (e.textAlign = o, e.textBaseline = "middle", e.font = h.string, t.x = ve(this, g, i), e.fillStyle = i.bodyColor, A(this.beforeBody, m), f = r && g !== "right" ? o === "center" ? l / 2 + c : l + 2 + c : 0, v = 0, _ = s.length; v < _; ++v) {
|
|
6367
|
+
for (p = s[v], b = this.labelTextColors[v], e.fillStyle = b, A(p.before, m), x = p.lines, r && x.length && (this._drawColorBox(e, t, v, u, i), d = Math.max(h.lineHeight, a)), y = 0, w = x.length; y < w; ++y)
|
|
6368
|
+
m(x[y]), d = h.lineHeight;
|
|
6369
|
+
A(p.after, m);
|
|
6370
6370
|
}
|
|
6371
|
-
f = 0, d = h.lineHeight, A(this.afterBody,
|
|
6371
|
+
f = 0, d = h.lineHeight, A(this.afterBody, m), t.y -= n;
|
|
6372
6372
|
}
|
|
6373
6373
|
drawFooter(t, e, i) {
|
|
6374
6374
|
const s = this.footer, n = s.length;
|
|
@@ -6614,10 +6614,10 @@ var Ic = class extends le {
|
|
|
6614
6614
|
}
|
|
6615
6615
|
};
|
|
6616
6616
|
function nc(t, e) {
|
|
6617
|
-
const i = [], { bounds: n, step: o, min: r, max: a, precision: l, count: c, maxTicks: h, maxDigits: d, includeBounds: f } = t, u = o || 1,
|
|
6618
|
-
let _ = Ii((
|
|
6619
|
-
if (_ < 1e-14 && !b && !x) return [{ value:
|
|
6620
|
-
S = Math.ceil(
|
|
6617
|
+
const i = [], { bounds: n, step: o, min: r, max: a, precision: l, count: c, maxTicks: h, maxDigits: d, includeBounds: f } = t, u = o || 1, m = h - 1, { min: g, max: p } = e, b = !R(r), x = !R(a), v = !R(c), y = (p - g) / (d + 1);
|
|
6618
|
+
let _ = Ii((p - g) / m / u) * u, w, M, k, S;
|
|
6619
|
+
if (_ < 1e-14 && !b && !x) return [{ value: g }, { value: p }];
|
|
6620
|
+
S = Math.ceil(p / _) - Math.floor(g / _), S > m && (_ = Ii(S * _ / m / u) * u), R(l) || (w = Math.pow(10, l), _ = Math.ceil(_ * w) / w), n === "ticks" ? (M = Math.floor(g / _) * _, k = Math.ceil(p / _) * _) : (M = g, k = p), b && x && o && ko((a - r) / o, _ / 1e3) ? (S = Math.round(Math.min((a - r) / _, h)), _ = (a - r) / S, M = r, k = a) : v ? (M = b ? r : M, k = x ? a : k, S = c - 1, _ = (k - M) / S) : (S = (k - M) / _, Jt(S, Math.round(S), _ / 1e3) ? S = Math.round(S) : S = Math.ceil(S));
|
|
6621
6621
|
const P = Math.max(Ei(_), Ei(M));
|
|
6622
6622
|
w = Math.pow(10, R(l) ? P : l), M = Math.round(M * w) / w, k = Math.round(k * w) / w;
|
|
6623
6623
|
let T = 0;
|
|
@@ -6829,8 +6829,8 @@ function lc(t) {
|
|
|
6829
6829
|
n[l] = c.padding;
|
|
6830
6830
|
const h = t.getPointPosition(l, t.drawingArea + n[l], a), d = j(c.font), f = ac(t.ctx, d, t._pointLabels[l]);
|
|
6831
6831
|
s[l] = f;
|
|
6832
|
-
const u = Y(t.getIndexAngle(l) + a),
|
|
6833
|
-
cc(i, e, u, Bs(
|
|
6832
|
+
const u = Y(t.getIndexAngle(l) + a), m = Math.round(gi(u));
|
|
6833
|
+
cc(i, e, u, Bs(m, h.x, f.w, 0, 180), Bs(m, h.y, f.h, 90, 270));
|
|
6834
6834
|
}
|
|
6835
6835
|
t.setCenterPoint(e.l - i.l, i.r - e.r, e.t - i.t, i.b - e.b), t._pointLabelItems = fc(t, s, n);
|
|
6836
6836
|
}
|
|
@@ -6897,7 +6897,7 @@ function mc(t, e, i) {
|
|
|
6897
6897
|
const l = Rt(e.borderRadius), c = X(e.backdropPadding);
|
|
6898
6898
|
t.fillStyle = a;
|
|
6899
6899
|
const h = s - c.left, d = n - c.top, f = o - s + c.width, u = r - n + c.height;
|
|
6900
|
-
Object.values(l).some((
|
|
6900
|
+
Object.values(l).some((m) => m !== 0) ? (t.beginPath(), Te(t, {
|
|
6901
6901
|
x: h,
|
|
6902
6902
|
y: d,
|
|
6903
6903
|
w: f,
|
|
@@ -7279,7 +7279,7 @@ var $s = class extends le {
|
|
|
7279
7279
|
if (l && (h = +t.startOf(h, "isoWeek", a)), h = +t.startOf(h, l ? "day" : o), t.diff(i, e, o) > 1e5 * r) throw new Error(e + " and " + i + " are too far apart with stepSize of " + r + " " + o);
|
|
7280
7280
|
const u = s.ticks.source === "data" && this.getDataTimestamps();
|
|
7281
7281
|
for (d = h, f = 0; d < i; d = +t.add(d, r, o), f++) Vs(c, d, u);
|
|
7282
|
-
return (d === i || s.bounds === "ticks" || f === 1) && Vs(c, d, u), Object.keys(c).sort(Ws).map((
|
|
7282
|
+
return (d === i || s.bounds === "ticks" || f === 1) && Vs(c, d, u), Object.keys(c).sort(Ws).map((m) => +m);
|
|
7283
7283
|
}
|
|
7284
7284
|
getLabelForValue(t) {
|
|
7285
7285
|
const e = this._adapter, i = this.options.time;
|
|
@@ -7425,24 +7425,24 @@ function kc(t, e = Hn) {
|
|
|
7425
7425
|
return Nn(i, t.labels), Vn(i, t.datasets, e), i;
|
|
7426
7426
|
}
|
|
7427
7427
|
function Sc(t, e) {
|
|
7428
|
-
const { height: i = 150, width: s = 300, redraw: n = !1, datasetIdKey: o, type: r, data: a, options: l, plugins: c = [], fallbackContent: h, updateMode: d, ...f } = t, u = Pi(null),
|
|
7429
|
-
u.current && (
|
|
7428
|
+
const { height: i = 150, width: s = 300, redraw: n = !1, datasetIdKey: o, type: r, data: a, options: l, plugins: c = [], fallbackContent: h, updateMode: d, ...f } = t, u = Pi(null), m = Pi(null), g = () => {
|
|
7429
|
+
u.current && (m.current = new ki(u.current, {
|
|
7430
7430
|
type: r,
|
|
7431
7431
|
data: kc(a, o),
|
|
7432
7432
|
options: l && { ...l },
|
|
7433
7433
|
plugins: c
|
|
7434
|
-
}), Ys(e,
|
|
7435
|
-
},
|
|
7436
|
-
Ys(e, null),
|
|
7434
|
+
}), Ys(e, m.current));
|
|
7435
|
+
}, p = () => {
|
|
7436
|
+
Ys(e, null), m.current && (m.current.destroy(), m.current = null);
|
|
7437
7437
|
};
|
|
7438
7438
|
return Tt(() => {
|
|
7439
|
-
!n &&
|
|
7439
|
+
!n && m.current && l && wc(m.current, l);
|
|
7440
7440
|
}, [n, l]), Tt(() => {
|
|
7441
|
-
!n &&
|
|
7441
|
+
!n && m.current && Nn(m.current.config.data, a.labels);
|
|
7442
7442
|
}, [n, a.labels]), Tt(() => {
|
|
7443
|
-
!n &&
|
|
7443
|
+
!n && m.current && a.datasets && Vn(m.current.config.data, a.datasets, o);
|
|
7444
7444
|
}, [n, a.datasets]), Tt(() => {
|
|
7445
|
-
|
|
7445
|
+
m.current && (n ? (p(), setTimeout(g)) : m.current.update(d));
|
|
7446
7446
|
}, [
|
|
7447
7447
|
n,
|
|
7448
7448
|
l,
|
|
@@ -7450,8 +7450,8 @@ function Sc(t, e) {
|
|
|
7450
7450
|
a.datasets,
|
|
7451
7451
|
d
|
|
7452
7452
|
]), Tt(() => {
|
|
7453
|
-
|
|
7454
|
-
}, [r]), Tt(() => (
|
|
7453
|
+
m.current && (p(), setTimeout(g));
|
|
7454
|
+
}, [r]), Tt(() => (g(), () => p()), []), /* @__PURE__ */ Xs("canvas", {
|
|
7455
7455
|
ref: u,
|
|
7456
7456
|
role: "img",
|
|
7457
7457
|
height: i,
|