@esri/calcite-components 1.0.7 → 1.0.8-next.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/calcite/calcite.esm.js +2 -2
- package/dist/calcite/index.esm.js +1 -1
- package/dist/calcite/p-040ac4f3.js +6 -0
- package/dist/calcite/{p-243b7920.js → p-05f99eb2.js} +1 -1
- package/dist/calcite/p-064ce29f.js +6 -0
- package/dist/calcite/{p-22563d9a.js → p-07905dfc.js} +2 -2
- package/dist/calcite/{p-d3a5b453.js → p-09e32d01.js} +2 -2
- package/dist/calcite/{p-28402e89.entry.js → p-0c981262.entry.js} +2 -2
- package/dist/calcite/{p-2621ab6f.entry.js → p-0e406264.entry.js} +2 -2
- package/dist/calcite/{p-c43812da.entry.js → p-130b7ddc.entry.js} +2 -2
- package/dist/calcite/{p-53865a5c.js → p-145d4ac0.js} +1 -1
- package/dist/calcite/{p-4185fbaf.js → p-15827315.js} +1 -1
- package/dist/calcite/{p-8f85ae03.entry.js → p-1642b5ec.entry.js} +2 -2
- package/dist/calcite/{p-11210e59.entry.js → p-199ff998.entry.js} +2 -2
- package/dist/calcite/{p-66564300.entry.js → p-19d159cc.entry.js} +2 -2
- package/dist/calcite/{p-0407ecac.entry.js → p-1c9a992d.entry.js} +2 -2
- package/dist/calcite/{p-7d63e3b1.entry.js → p-1d7859ad.entry.js} +2 -2
- package/dist/calcite/{p-3582f4c9.entry.js → p-1db6b474.entry.js} +2 -2
- package/dist/calcite/{p-ca0779db.entry.js → p-1e094bc5.entry.js} +2 -2
- package/dist/calcite/{p-3d497b7d.js → p-1e8ee073.js} +2 -2
- package/dist/calcite/{p-129976f3.js → p-293edc82.js} +1 -1
- package/dist/calcite/{p-dd3c94cf.entry.js → p-2fa8c806.entry.js} +2 -2
- package/dist/calcite/p-3135c713.js +6 -0
- package/dist/calcite/{p-9937e5b5.entry.js → p-31587ba4.entry.js} +2 -2
- package/dist/calcite/{p-8cd4c7e9.entry.js → p-33069ef4.entry.js} +2 -2
- package/dist/calcite/{p-7e479ab3.entry.js → p-33b41586.entry.js} +2 -2
- package/dist/calcite/{p-edf85948.js → p-342f4891.js} +3 -3
- package/dist/calcite/{p-9e413c06.js → p-384fd5b6.js} +1 -1
- package/dist/calcite/{p-1812439f.entry.js → p-3cda0a24.entry.js} +2 -2
- package/dist/calcite/{p-ab81b4ed.entry.js → p-41e77748.entry.js} +2 -2
- package/dist/calcite/{p-644998ab.js → p-4aadf0a9.js} +1 -1
- package/dist/calcite/{p-0954cf31.entry.js → p-4b3c5b82.entry.js} +2 -2
- package/dist/calcite/{p-93565bec.js → p-4c32ef56.js} +1 -1
- package/dist/calcite/{p-83b472ec.entry.js → p-4fcafb74.entry.js} +2 -2
- package/dist/calcite/{p-e923223c.entry.js → p-51f7a3a7.entry.js} +2 -2
- package/dist/calcite/{p-178a264a.entry.js → p-580bda49.entry.js} +2 -2
- package/dist/calcite/{p-1a0f4b4a.js → p-5b1afa72.js} +1 -1
- package/dist/calcite/{p-4dba9ad1.js → p-617c3f24.js} +1 -1
- package/dist/calcite/{p-eef10fff.entry.js → p-6cbf0b8c.entry.js} +2 -2
- package/dist/calcite/{p-3806fbcf.entry.js → p-74be61ff.entry.js} +2 -2
- package/dist/calcite/{p-b7a514ed.entry.js → p-76006e94.entry.js} +2 -2
- package/dist/calcite/{p-f68b2bdb.js → p-7946a710.js} +2 -2
- package/dist/calcite/{p-c4f0cdb1.entry.js → p-7cbfb124.entry.js} +2 -2
- package/dist/calcite/{p-0f60fc32.entry.js → p-7cfa1b3a.entry.js} +2 -2
- package/dist/calcite/{p-c2bb946b.entry.js → p-7e701c02.entry.js} +2 -2
- package/dist/calcite/{p-12b357e4.entry.js → p-7f6b2efd.entry.js} +2 -2
- package/dist/calcite/{p-638175c2.entry.js → p-85299649.entry.js} +2 -2
- package/dist/calcite/{p-e273b39f.js → p-882812be.js} +2 -2
- package/dist/calcite/{p-c772be2b.entry.js → p-88c229e3.entry.js} +2 -2
- package/dist/calcite/{p-83402ec4.entry.js → p-899509a8.entry.js} +2 -2
- package/dist/calcite/{p-b4155a81.entry.js → p-944dd6ef.entry.js} +2 -2
- package/dist/calcite/{p-ddf76e54.js → p-9562fa75.js} +2 -2
- package/dist/calcite/p-96eb6a59.entry.js +6 -0
- package/dist/calcite/{p-06442038.entry.js → p-9c2bdce0.entry.js} +2 -2
- package/dist/calcite/{p-299701fe.entry.js → p-9cacc5fe.entry.js} +2 -2
- package/dist/calcite/{p-019e9c79.entry.js → p-a2111e23.entry.js} +2 -2
- package/dist/calcite/{p-bbaa4997.entry.js → p-a256c4e3.entry.js} +2 -2
- package/dist/calcite/{p-40e18e9a.entry.js → p-a4866130.entry.js} +2 -2
- package/dist/calcite/{p-5f0fe068.js → p-a50b2d9f.js} +1 -1
- package/dist/calcite/{p-bd942975.js → p-a93df2f8.js} +1 -1
- package/dist/calcite/{p-f141f293.entry.js → p-aaf42e5c.entry.js} +2 -2
- package/dist/calcite/{p-13e07c1c.entry.js → p-ab7cd764.entry.js} +2 -2
- package/dist/calcite/{p-9c23e59a.entry.js → p-abbe4907.entry.js} +2 -2
- package/dist/calcite/{p-2d3b1298.js → p-ac7220ea.js} +1 -1
- package/dist/calcite/{p-f2f9a865.js → p-ae927ce0.js} +2 -2
- package/dist/calcite/{p-8f8558aa.entry.js → p-b2547b38.entry.js} +2 -2
- package/dist/calcite/{p-f57deccc.entry.js → p-b87f53c0.entry.js} +2 -2
- package/dist/calcite/{p-d6fd431c.entry.js → p-ba4d96b0.entry.js} +2 -2
- package/dist/calcite/{p-c9e949ec.js → p-ba6476a0.js} +1 -1
- package/dist/calcite/p-bd12310e.js +6 -0
- package/dist/calcite/{p-d3b96c5c.entry.js → p-bebc05e9.entry.js} +2 -2
- package/dist/calcite/{p-593ccc43.entry.js → p-c1c0b6ba.entry.js} +2 -2
- package/dist/calcite/{p-e5806b93.entry.js → p-c5b2cc82.entry.js} +2 -2
- package/dist/calcite/{p-4acb3ea1.js → p-cba4801c.js} +2 -2
- package/dist/calcite/{p-b81bbd53.entry.js → p-cd74fb48.entry.js} +2 -2
- package/dist/calcite/p-ced4417b.entry.js +6 -0
- package/dist/calcite/{p-5d2a5f83.js → p-d164a8c9.js} +2 -2
- package/dist/calcite/{p-10601231.entry.js → p-d33a5de7.entry.js} +2 -2
- package/dist/calcite/{p-b44a8d52.js → p-dd2f35f0.js} +1 -1
- package/dist/calcite/{p-561c37d6.entry.js → p-e05107c3.entry.js} +2 -2
- package/dist/calcite/{p-66eae393.entry.js → p-e81cc173.entry.js} +2 -2
- package/dist/calcite/{p-c334f9b6.js → p-ea0addbb.js} +2 -2
- package/dist/calcite/{p-29a4195b.entry.js → p-eaa61f82.entry.js} +2 -2
- package/dist/calcite/{p-25c5f90a.entry.js → p-eac1c4ff.entry.js} +2 -2
- package/dist/calcite/{p-072f8761.entry.js → p-ed506a15.entry.js} +2 -2
- package/dist/calcite/{p-9651b147.entry.js → p-edaf941d.entry.js} +2 -2
- package/dist/calcite/{p-3d466810.entry.js → p-ef5f162e.entry.js} +2 -2
- package/dist/calcite/{p-f9b34f67.entry.js → p-f3653d62.entry.js} +2 -2
- package/dist/calcite/{p-251f2a5e.js → p-f4f52a53.js} +2 -2
- package/dist/calcite/{p-6c1801ab.entry.js → p-f6fb18dc.entry.js} +2 -2
- package/dist/calcite/{p-d238c881.entry.js → p-fa0f4f7a.entry.js} +2 -2
- package/dist/calcite/{p-dc200732.js → p-fa9c60a4.js} +1 -1
- package/dist/calcite/{p-62b376b0.entry.js → p-fe261c74.entry.js} +2 -2
- package/dist/calcite/{p-901b24a6.js → p-fe582c37.js} +1 -1
- package/dist/cjs/{ExpandToggle-1469f47a.js → ExpandToggle-80c02c0d.js} +5 -5
- package/dist/cjs/{Heading-dbdd4fe3.js → Heading-c186e8f1.js} +2 -2
- package/dist/cjs/{app-globals-69065772.js → app-globals-995f3d27.js} +2 -2
- package/dist/cjs/{array-60fe47ac.js → array-afbe4767.js} +1 -1
- package/dist/cjs/calcite-accordion_2.cjs.entry.js +7 -7
- package/dist/cjs/calcite-action-bar.cjs.entry.js +15 -15
- package/dist/cjs/calcite-action-group.cjs.entry.js +12 -12
- package/dist/cjs/calcite-action-menu.cjs.entry.js +9 -9
- package/dist/cjs/calcite-action-pad.cjs.entry.js +14 -14
- package/dist/cjs/calcite-action.cjs.entry.js +11 -11
- package/dist/cjs/calcite-alert.cjs.entry.js +12 -12
- package/dist/cjs/calcite-avatar.cjs.entry.js +6 -6
- package/dist/cjs/calcite-block_2.cjs.entry.js +12 -12
- package/dist/cjs/calcite-button.cjs.entry.js +13 -13
- package/dist/cjs/calcite-card.cjs.entry.js +10 -10
- package/dist/cjs/calcite-checkbox.cjs.entry.js +10 -10
- package/dist/cjs/calcite-chip.cjs.entry.js +11 -11
- package/dist/cjs/calcite-color-picker_3.cjs.entry.js +14 -14
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +18 -18
- package/dist/cjs/calcite-date-picker_4.cjs.entry.js +12 -12
- package/dist/cjs/calcite-dropdown_3.cjs.entry.js +12 -12
- package/dist/cjs/calcite-fab.cjs.entry.js +7 -7
- package/dist/cjs/calcite-filter.cjs.entry.js +13 -13
- package/dist/cjs/calcite-flow-item.cjs.entry.js +12 -12
- package/dist/cjs/calcite-flow.cjs.entry.js +3 -3
- package/dist/cjs/calcite-graph_2.cjs.entry.js +14 -14
- package/dist/cjs/calcite-handle.cjs.entry.js +6 -6
- package/dist/cjs/calcite-icon.cjs.entry.js +6 -6
- package/dist/cjs/calcite-inline-editable.cjs.entry.js +12 -12
- package/dist/cjs/calcite-input-date-picker.cjs.entry.js +16 -16
- package/dist/cjs/calcite-input-message.cjs.entry.js +5 -5
- package/dist/cjs/calcite-input-number.cjs.entry.js +14 -14
- package/dist/cjs/calcite-input-text.cjs.entry.js +13 -13
- package/dist/cjs/calcite-input-time-picker_2.cjs.entry.js +13 -13
- package/dist/cjs/calcite-input.cjs.entry.js +14 -14
- package/dist/cjs/calcite-label.cjs.entry.js +6 -6
- package/dist/cjs/calcite-link.cjs.entry.js +7 -7
- package/dist/cjs/calcite-list_3.cjs.entry.js +9 -9
- package/dist/cjs/calcite-loader.cjs.entry.js +3 -3
- package/dist/cjs/calcite-modal.cjs.entry.js +13 -13
- package/dist/cjs/calcite-notice.cjs.entry.js +12 -12
- package/dist/cjs/calcite-option_3.cjs.entry.js +10 -10
- package/dist/cjs/calcite-pagination.cjs.entry.js +9 -9
- package/dist/cjs/calcite-panel.cjs.entry.js +14 -14
- package/dist/cjs/calcite-pick-list_3.cjs.entry.js +16 -16
- package/dist/cjs/calcite-popover.cjs.entry.js +15 -15
- package/dist/cjs/calcite-progress.cjs.entry.js +2 -2
- package/dist/cjs/calcite-radio-button-group.cjs.entry.js +3 -3
- package/dist/cjs/calcite-radio-button.cjs.entry.js +10 -10
- package/dist/cjs/calcite-rating.cjs.entry.js +13 -13
- package/dist/cjs/calcite-scrim.cjs.entry.js +9 -9
- package/dist/cjs/calcite-segmented-control_2.cjs.entry.js +9 -9
- package/dist/cjs/calcite-shell_3.cjs.entry.js +11 -11
- package/dist/cjs/calcite-sortable-list.cjs.entry.js +5 -5
- package/dist/cjs/calcite-split-button.cjs.entry.js +3 -3
- package/dist/cjs/calcite-stepper_2.cjs.entry.js +10 -10
- package/dist/cjs/calcite-switch.cjs.entry.js +10 -10
- package/dist/cjs/calcite-tab_4.cjs.entry.js +7 -7
- package/dist/cjs/calcite-tile-select_2.cjs.entry.js +5 -5
- package/dist/cjs/calcite-tile.cjs.entry.js +8 -8
- package/dist/cjs/calcite-tip_3.cjs.entry.js +11 -11
- package/dist/cjs/calcite-tooltip.cjs.entry.js +8 -8
- package/dist/cjs/calcite-tree_2.cjs.entry.js +9 -9
- package/dist/cjs/calcite-value-list_2.cjs.entry.js +16 -16
- package/dist/cjs/calcite.cjs.js +4 -4
- package/dist/cjs/{conditionalSlot-9cfea627.js → conditionalSlot-3dd8ed81.js} +3 -3
- package/dist/cjs/{debounce-af5882c5.js → debounce-f8e65104.js} +1 -1
- package/dist/cjs/{dom-1f61b001.js → dom-731aea51.js} +3 -3
- package/dist/cjs/{filter-40ef5fb6.js → filter-aaf45939.js} +2 -2
- package/dist/cjs/{floating-ui-cf8b7c7e.js → floating-ui-f19dcc58.js} +4 -4
- package/dist/cjs/{focusTrapComponent-2d67f179.js → focusTrapComponent-71450831.js} +2 -2
- package/dist/cjs/{form-3dfa2e33.js → form-e776cec9.js} +3 -3
- package/dist/cjs/{guid-624d4437.js → guid-4799eb78.js} +1 -1
- package/dist/cjs/{index-89bc16ff.js → index-beacd14a.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{interactive-864c5140.js → interactive-09e0f353.js} +1 -1
- package/dist/cjs/{key-b8c79df1.js → key-91556340.js} +1 -1
- package/dist/cjs/{label-655d2d81.js → label-dd913df5.js} +2 -2
- package/dist/cjs/{loadable-ba12e859.js → loadable-af4b8f13.js} +1 -1
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{locale-7e1fa938.js → locale-d42bf71f.js} +4 -4
- package/dist/cjs/{math-ad3373ec.js → math-667768b5.js} +1 -1
- package/dist/cjs/{nonChromiumPlatformUtils-9eb39d0e.js → nonChromiumPlatformUtils-ad5a607f.js} +6 -6
- package/dist/cjs/{observers-915048e0.js → observers-26b5e112.js} +1 -1
- package/dist/cjs/{openCloseComponent-b566840a.js → openCloseComponent-f9c3f65f.js} +2 -2
- package/dist/cjs/{resources-1c6040ad.js → resources-375c9e11.js} +1 -1
- package/dist/cjs/{resources-66c20f85.js → resources-49b5da68.js} +1 -1
- package/dist/cjs/{resources-50130a88.js → resources-8ce244e0.js} +5 -5
- package/dist/cjs/{resources-16650b54.js → resources-a618815c.js} +1 -1
- package/dist/cjs/{resources-371525ef.js → resources-e5ea000e.js} +1 -1
- package/dist/cjs/{resources-c9182c3c.js → resources-f6301057.js} +1 -1
- package/dist/cjs/{sortable.esm-911336b9.js → sortable.esm-f68a7491.js} +1 -1
- package/dist/cjs/{t9n-e2509f8c.js → t9n-5708e6e7.js} +3 -3
- package/dist/cjs/{utils-556df4f4.js → utils-33e10a37.js} +1 -1
- package/dist/cjs/{utils-9c8a64c5.js → utils-e452bf0f.js} +3 -3
- package/dist/collection/components/accordion/accordion.js +1 -1
- package/dist/collection/components/accordion-item/accordion-item.js +1 -1
- package/dist/collection/components/accordion-item/resources.js +1 -1
- package/dist/collection/components/action/action.js +1 -1
- package/dist/collection/components/action/resources.js +1 -1
- package/dist/collection/components/action-bar/action-bar.js +1 -1
- package/dist/collection/components/action-bar/resources.js +1 -1
- package/dist/collection/components/action-bar/utils.js +1 -1
- package/dist/collection/components/action-group/action-group.js +1 -1
- package/dist/collection/components/action-group/resources.js +1 -1
- package/dist/collection/components/action-menu/action-menu.js +1 -1
- package/dist/collection/components/action-menu/resources.js +1 -1
- package/dist/collection/components/action-pad/action-pad.js +1 -1
- package/dist/collection/components/action-pad/resources.js +1 -1
- package/dist/collection/components/alert/alert.js +1 -1
- package/dist/collection/components/alert/resources.js +1 -1
- package/dist/collection/components/avatar/avatar.js +1 -1
- package/dist/collection/components/avatar/utils.js +1 -1
- package/dist/collection/components/block/block.js +1 -1
- package/dist/collection/components/block/resources.js +1 -1
- package/dist/collection/components/block-section/block-section.js +1 -1
- package/dist/collection/components/block-section/resources.js +1 -1
- package/dist/collection/components/button/button.js +1 -1
- package/dist/collection/components/button/resources.js +1 -1
- package/dist/collection/components/card/card.js +1 -1
- package/dist/collection/components/card/resources.js +1 -1
- package/dist/collection/components/checkbox/checkbox.js +1 -1
- package/dist/collection/components/chip/chip.js +1 -1
- package/dist/collection/components/chip/resources.js +1 -1
- package/dist/collection/components/color-picker/color-picker.js +1 -1
- package/dist/collection/components/color-picker/resources.js +1 -1
- package/dist/collection/components/color-picker/utils.js +1 -1
- package/dist/collection/components/color-picker-hex-input/color-picker-hex-input.js +1 -1
- package/dist/collection/components/color-picker-hex-input/resources.js +1 -1
- package/dist/collection/components/color-picker-swatch/color-picker-swatch.js +1 -1
- package/dist/collection/components/color-picker-swatch/resources.js +1 -1
- package/dist/collection/components/combobox/combobox.js +1 -1
- package/dist/collection/components/combobox/resources.js +1 -1
- package/dist/collection/components/combobox/utils.js +1 -1
- package/dist/collection/components/combobox-item/combobox-item.js +1 -1
- package/dist/collection/components/combobox-item/resources.js +1 -1
- package/dist/collection/components/combobox-item-group/combobox-item-group.js +1 -1
- package/dist/collection/components/combobox-item-group/resources.js +1 -1
- package/dist/collection/components/date-picker/date-picker.js +1 -1
- package/dist/collection/components/date-picker/resources.js +1 -1
- package/dist/collection/components/date-picker/utils.js +1 -1
- package/dist/collection/components/date-picker-day/date-picker-day.js +1 -1
- package/dist/collection/components/date-picker-month/date-picker-month.js +1 -1
- package/dist/collection/components/date-picker-month-header/date-picker-month-header.js +1 -1
- package/dist/collection/components/date-picker-month-header/resources.js +1 -1
- package/dist/collection/components/dropdown/dropdown.js +1 -1
- package/dist/collection/components/dropdown/resources.js +1 -1
- package/dist/collection/components/dropdown-group/dropdown-group.js +1 -1
- package/dist/collection/components/dropdown-group/resources.js +1 -1
- package/dist/collection/components/dropdown-item/dropdown-item.js +1 -1
- package/dist/collection/components/dropdown-item/resources.js +1 -1
- package/dist/collection/components/fab/fab.js +1 -1
- package/dist/collection/components/fab/resources.js +1 -1
- package/dist/collection/components/filter/filter.js +1 -1
- package/dist/collection/components/filter/resources.js +1 -1
- package/dist/collection/components/flow/flow.js +1 -1
- package/dist/collection/components/flow/resources.js +1 -1
- package/dist/collection/components/flow-item/flow-item.js +1 -1
- package/dist/collection/components/flow-item/resources.js +1 -1
- package/dist/collection/components/functional/ExpandToggle.js +1 -1
- package/dist/collection/components/functional/Heading.js +1 -1
- package/dist/collection/components/graph/graph.js +1 -1
- package/dist/collection/components/graph/util.js +1 -1
- package/dist/collection/components/handle/handle.js +1 -1
- package/dist/collection/components/handle/resources.js +1 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon/resources.js +1 -1
- package/dist/collection/components/icon/utils.js +1 -1
- package/dist/collection/components/inline-editable/inline-editable.js +1 -1
- package/dist/collection/components/inline-editable/resources.js +1 -1
- package/dist/collection/components/input/input.js +1 -1
- package/dist/collection/components/input/resources.js +1 -1
- package/dist/collection/components/input-date-picker/input-date-picker.js +1 -1
- package/dist/collection/components/input-date-picker/resources.js +1 -1
- package/dist/collection/components/input-message/input-message.js +1 -1
- package/dist/collection/components/input-message/interfaces.js +1 -1
- package/dist/collection/components/input-number/input-number.js +1 -1
- package/dist/collection/components/input-number/resources.js +1 -1
- package/dist/collection/components/input-text/input-text.js +1 -1
- package/dist/collection/components/input-text/resources.js +1 -1
- package/dist/collection/components/input-time-picker/input-time-picker.js +1 -1
- package/dist/collection/components/label/label.js +1 -1
- package/dist/collection/components/label/resources.js +1 -1
- package/dist/collection/components/link/link.js +1 -1
- package/dist/collection/components/list/list.js +1 -1
- package/dist/collection/components/list/resources.js +1 -1
- package/dist/collection/components/list-item/list-item.js +1 -1
- package/dist/collection/components/list-item/resources.js +1 -1
- package/dist/collection/components/list-item/utils.js +1 -1
- package/dist/collection/components/list-item-group/list-item-group.js +1 -1
- package/dist/collection/components/list-item-group/resources.js +1 -1
- package/dist/collection/components/loader/loader.js +1 -1
- package/dist/collection/components/modal/modal.js +1 -1
- package/dist/collection/components/modal/resources.js +1 -1
- package/dist/collection/components/notice/notice.js +1 -1
- package/dist/collection/components/notice/resources.js +1 -1
- package/dist/collection/components/option/option.js +1 -1
- package/dist/collection/components/option-group/option-group.js +1 -1
- package/dist/collection/components/pagination/pagination.js +1 -1
- package/dist/collection/components/pagination/resources.js +1 -1
- package/dist/collection/components/panel/panel.js +1 -1
- package/dist/collection/components/panel/resources.js +1 -1
- package/dist/collection/components/pick-list/pick-list.js +1 -1
- package/dist/collection/components/pick-list/resources.js +1 -1
- package/dist/collection/components/pick-list/shared-list-logic.js +1 -1
- package/dist/collection/components/pick-list/shared-list-render.js +1 -1
- package/dist/collection/components/pick-list-group/pick-list-group.js +1 -1
- package/dist/collection/components/pick-list-group/resources.js +1 -1
- package/dist/collection/components/pick-list-item/pick-list-item.js +1 -1
- package/dist/collection/components/pick-list-item/resources.js +1 -1
- package/dist/collection/components/popover/PopoverManager.js +1 -1
- package/dist/collection/components/popover/popover.js +1 -1
- package/dist/collection/components/popover/resources.js +1 -1
- package/dist/collection/components/progress/progress.js +1 -1
- package/dist/collection/components/radio-button/radio-button.js +1 -1
- package/dist/collection/components/radio-button/resources.js +1 -1
- package/dist/collection/components/radio-button-group/radio-button-group.js +1 -1
- package/dist/collection/components/rating/function/star.js +1 -1
- package/dist/collection/components/rating/rating.js +1 -1
- package/dist/collection/components/resources.js +1 -1
- package/dist/collection/components/scrim/resources.js +1 -1
- package/dist/collection/components/scrim/scrim.js +1 -1
- package/dist/collection/components/segmented-control/segmented-control.js +1 -1
- package/dist/collection/components/segmented-control-item/resources.js +1 -1
- package/dist/collection/components/segmented-control-item/segmented-control-item.js +1 -1
- package/dist/collection/components/select/resources.js +1 -1
- package/dist/collection/components/select/select.js +1 -1
- package/dist/collection/components/shell/resources.js +1 -1
- package/dist/collection/components/shell/shell.js +1 -1
- package/dist/collection/components/shell-center-row/resources.js +1 -1
- package/dist/collection/components/shell-center-row/shell-center-row.js +1 -1
- package/dist/collection/components/shell-panel/resources.js +1 -1
- package/dist/collection/components/shell-panel/shell-panel.js +1 -1
- package/dist/collection/components/slider/resources.js +1 -1
- package/dist/collection/components/slider/slider.css +16 -16
- package/dist/collection/components/slider/slider.js +1 -1
- package/dist/collection/components/sortable-list/resources.js +1 -1
- package/dist/collection/components/sortable-list/sortable-list.js +1 -1
- package/dist/collection/components/split-button/resources.js +1 -1
- package/dist/collection/components/split-button/split-button.js +1 -1
- package/dist/collection/components/stepper/stepper.js +1 -1
- package/dist/collection/components/stepper-item/stepper-item.js +1 -1
- package/dist/collection/components/switch/switch.js +1 -1
- package/dist/collection/components/tab/tab.js +1 -1
- package/dist/collection/components/tab-nav/tab-nav.js +1 -1
- package/dist/collection/components/tab-title/resources.js +1 -1
- package/dist/collection/components/tab-title/tab-title.js +1 -1
- package/dist/collection/components/tabs/resources.js +1 -1
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/tile/resources.js +1 -1
- package/dist/collection/components/tile/tile.js +1 -1
- package/dist/collection/components/tile-select/resources.js +1 -1
- package/dist/collection/components/tile-select/tile-select.js +1 -1
- package/dist/collection/components/tile-select-group/tile-select-group.js +1 -1
- package/dist/collection/components/time-picker/resources.js +1 -1
- package/dist/collection/components/time-picker/time-picker.js +1 -1
- package/dist/collection/components/tip/resources.js +1 -1
- package/dist/collection/components/tip/tip.js +1 -1
- package/dist/collection/components/tip-group/tip-group.js +1 -1
- package/dist/collection/components/tip-manager/resources.js +1 -1
- package/dist/collection/components/tip-manager/tip-manager.js +1 -1
- package/dist/collection/components/tooltip/TooltipManager.js +1 -1
- package/dist/collection/components/tooltip/resources.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +1 -1
- package/dist/collection/components/tooltip/utils.js +1 -1
- package/dist/collection/components/tree/tree.js +1 -1
- package/dist/collection/components/tree/utils.js +1 -1
- package/dist/collection/components/tree-item/resources.js +1 -1
- package/dist/collection/components/tree-item/tree-item.js +1 -1
- package/dist/collection/components/value-list/resources.js +1 -1
- package/dist/collection/components/value-list/utils.js +1 -1
- package/dist/collection/components/value-list/value-list.js +1 -1
- package/dist/collection/components/value-list-item/resources.js +1 -1
- package/dist/collection/components/value-list-item/value-list-item.js +1 -1
- package/dist/collection/utils/array.js +1 -1
- package/dist/collection/utils/conditionalSlot.js +1 -1
- package/dist/collection/utils/config.js +1 -1
- package/dist/collection/utils/date.js +1 -1
- package/dist/collection/utils/dom.js +1 -1
- package/dist/collection/utils/filter.js +1 -1
- package/dist/collection/utils/floating-ui/nonChromiumPlatformUtils.js +1 -1
- package/dist/collection/utils/floating-ui.js +1 -1
- package/dist/collection/utils/focusTrapComponent.js +1 -1
- package/dist/collection/utils/form.js +1 -1
- package/dist/collection/utils/globalAttributes.js +1 -1
- package/dist/collection/utils/globalScript.js +1 -1
- package/dist/collection/utils/guid.js +1 -1
- package/dist/collection/utils/interactive.js +1 -1
- package/dist/collection/utils/key.js +1 -1
- package/dist/collection/utils/label.js +1 -1
- package/dist/collection/utils/loadable.js +1 -1
- package/dist/collection/utils/locale.js +1 -1
- package/dist/collection/utils/math.js +1 -1
- package/dist/collection/utils/mode.js +1 -1
- package/dist/collection/utils/number.js +1 -1
- package/dist/collection/utils/observers.js +1 -1
- package/dist/collection/utils/openCloseComponent.js +1 -1
- package/dist/collection/utils/resources.js +1 -1
- package/dist/collection/utils/t9n.js +1 -1
- package/dist/collection/utils/time.js +1 -1
- package/dist/components/ExpandToggle.js +1 -1
- package/dist/components/Heading.js +1 -1
- package/dist/components/action-group.js +1 -1
- package/dist/components/action-menu.js +1 -1
- package/dist/components/action.js +1 -1
- package/dist/components/array.js +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/calcite-accordion-item.js +1 -1
- package/dist/components/calcite-accordion.js +1 -1
- package/dist/components/calcite-action-bar.js +1 -1
- package/dist/components/calcite-action-group.js +1 -1
- package/dist/components/calcite-action-menu.js +1 -1
- package/dist/components/calcite-action-pad.js +1 -1
- package/dist/components/calcite-action.js +1 -1
- package/dist/components/calcite-alert.js +1 -1
- package/dist/components/calcite-avatar.js +1 -1
- package/dist/components/calcite-block-section.js +1 -1
- package/dist/components/calcite-block.js +1 -1
- package/dist/components/calcite-button.js +1 -1
- package/dist/components/calcite-card.js +1 -1
- package/dist/components/calcite-checkbox.js +1 -1
- package/dist/components/calcite-chip.js +1 -1
- package/dist/components/calcite-color-picker-hex-input.js +1 -1
- package/dist/components/calcite-color-picker-swatch.js +1 -1
- package/dist/components/calcite-color-picker.js +1 -1
- package/dist/components/calcite-combobox-item-group.js +1 -1
- package/dist/components/calcite-combobox-item.js +1 -1
- package/dist/components/calcite-combobox.js +1 -1
- package/dist/components/calcite-date-picker-day.js +1 -1
- package/dist/components/calcite-date-picker-month-header.js +1 -1
- package/dist/components/calcite-date-picker-month.js +1 -1
- package/dist/components/calcite-date-picker.js +1 -1
- package/dist/components/calcite-dropdown-group.js +1 -1
- package/dist/components/calcite-dropdown-item.js +1 -1
- package/dist/components/calcite-dropdown.js +1 -1
- package/dist/components/calcite-fab.js +1 -1
- package/dist/components/calcite-filter.js +1 -1
- package/dist/components/calcite-flow-item.js +1 -1
- package/dist/components/calcite-flow.js +1 -1
- package/dist/components/calcite-graph.js +1 -1
- package/dist/components/calcite-handle.js +1 -1
- package/dist/components/calcite-icon.js +1 -1
- package/dist/components/calcite-inline-editable.js +1 -1
- package/dist/components/calcite-input-date-picker.js +1 -1
- package/dist/components/calcite-input-message.js +1 -1
- package/dist/components/calcite-input-number.js +1 -1
- package/dist/components/calcite-input-text.js +1 -1
- package/dist/components/calcite-input-time-picker.js +1 -1
- package/dist/components/calcite-input.js +1 -1
- package/dist/components/calcite-label.js +1 -1
- package/dist/components/calcite-link.js +1 -1
- package/dist/components/calcite-list-item-group.js +1 -1
- package/dist/components/calcite-list-item.js +1 -1
- package/dist/components/calcite-list.js +1 -1
- package/dist/components/calcite-loader.js +1 -1
- package/dist/components/calcite-modal.js +1 -1
- package/dist/components/calcite-notice.js +1 -1
- package/dist/components/calcite-option-group.js +1 -1
- package/dist/components/calcite-option.js +1 -1
- package/dist/components/calcite-pagination.js +1 -1
- package/dist/components/calcite-panel.js +1 -1
- package/dist/components/calcite-pick-list-group.js +1 -1
- package/dist/components/calcite-pick-list-item.js +1 -1
- package/dist/components/calcite-pick-list.js +1 -1
- package/dist/components/calcite-popover.js +1 -1
- package/dist/components/calcite-progress.js +1 -1
- package/dist/components/calcite-radio-button-group.js +1 -1
- package/dist/components/calcite-radio-button.js +1 -1
- package/dist/components/calcite-rating.js +1 -1
- package/dist/components/calcite-scrim.js +1 -1
- package/dist/components/calcite-segmented-control-item.js +1 -1
- package/dist/components/calcite-segmented-control.js +1 -1
- package/dist/components/calcite-select.js +1 -1
- package/dist/components/calcite-shell-center-row.js +1 -1
- package/dist/components/calcite-shell-panel.js +1 -1
- package/dist/components/calcite-shell.js +1 -1
- package/dist/components/calcite-slider.js +2 -2
- package/dist/components/calcite-sortable-list.js +1 -1
- package/dist/components/calcite-split-button.js +1 -1
- package/dist/components/calcite-stepper-item.js +1 -1
- package/dist/components/calcite-stepper.js +1 -1
- package/dist/components/calcite-switch.js +1 -1
- package/dist/components/calcite-tab-nav.js +1 -1
- package/dist/components/calcite-tab-title.js +1 -1
- package/dist/components/calcite-tab.js +1 -1
- package/dist/components/calcite-tabs.js +1 -1
- package/dist/components/calcite-tile-select-group.js +1 -1
- package/dist/components/calcite-tile-select.js +1 -1
- package/dist/components/calcite-tile.js +1 -1
- package/dist/components/calcite-time-picker.js +1 -1
- package/dist/components/calcite-tip-group.js +1 -1
- package/dist/components/calcite-tip-manager.js +1 -1
- package/dist/components/calcite-tip.js +1 -1
- package/dist/components/calcite-tooltip.js +1 -1
- package/dist/components/calcite-tree-item.js +1 -1
- package/dist/components/calcite-tree.js +1 -1
- package/dist/components/calcite-value-list-item.js +1 -1
- package/dist/components/calcite-value-list.js +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/chip.js +1 -1
- package/dist/components/color-picker-hex-input.js +1 -1
- package/dist/components/color-picker-swatch.js +1 -1
- package/dist/components/conditionalSlot.js +1 -1
- package/dist/components/date-picker-day.js +1 -1
- package/dist/components/date-picker-month-header.js +1 -1
- package/dist/components/date-picker-month.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date.js +1 -1
- package/dist/components/debounce.js +1 -1
- package/dist/components/dom.js +1 -1
- package/dist/components/dropdown.js +1 -1
- package/dist/components/filter.js +1 -1
- package/dist/components/filter2.js +1 -1
- package/dist/components/floating-ui.js +1 -1
- package/dist/components/focusTrapComponent.js +1 -1
- package/dist/components/form.js +1 -1
- package/dist/components/graph.js +1 -1
- package/dist/components/guid.js +1 -1
- package/dist/components/handle.js +1 -1
- package/dist/components/icon.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/interactive.js +1 -1
- package/dist/components/key.js +1 -1
- package/dist/components/label.js +1 -1
- package/dist/components/label2.js +1 -1
- package/dist/components/link.js +1 -1
- package/dist/components/loadable.js +1 -1
- package/dist/components/loader.js +1 -1
- package/dist/components/locale.js +1 -1
- package/dist/components/math.js +1 -1
- package/dist/components/nonChromiumPlatformUtils.js +1 -1
- package/dist/components/observers.js +1 -1
- package/dist/components/openCloseComponent.js +1 -1
- package/dist/components/panel.js +1 -1
- package/dist/components/pick-list-item.js +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/resources.js +1 -1
- package/dist/components/resources2.js +1 -1
- package/dist/components/resources3.js +1 -1
- package/dist/components/scrim.js +1 -1
- package/dist/components/shared-list-render.js +1 -1
- package/dist/components/sortable.esm.js +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/t9n.js +1 -1
- package/dist/components/tab-nav.js +1 -1
- package/dist/components/tab-title.js +1 -1
- package/dist/components/tab.js +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/tile.js +1 -1
- package/dist/components/time-picker.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/utils.js +1 -1
- package/dist/components/utils2.js +1 -1
- package/dist/components/utils3.js +1 -1
- package/dist/esm/{ExpandToggle-1dc348e4.js → ExpandToggle-f5a7b399.js} +5 -5
- package/dist/esm/{Heading-c9cca1ea.js → Heading-a9646900.js} +2 -2
- package/dist/esm/{app-globals-523f5c6b.js → app-globals-1976caa8.js} +2 -2
- package/dist/esm/{array-a3f6bbc3.js → array-7cf60d23.js} +1 -1
- package/dist/esm/calcite-accordion_2.entry.js +7 -7
- package/dist/esm/calcite-action-bar.entry.js +15 -15
- package/dist/esm/calcite-action-group.entry.js +12 -12
- package/dist/esm/calcite-action-menu.entry.js +9 -9
- package/dist/esm/calcite-action-pad.entry.js +14 -14
- package/dist/esm/calcite-action.entry.js +11 -11
- package/dist/esm/calcite-alert.entry.js +12 -12
- package/dist/esm/calcite-avatar.entry.js +6 -6
- package/dist/esm/calcite-block_2.entry.js +12 -12
- package/dist/esm/calcite-button.entry.js +13 -13
- package/dist/esm/calcite-card.entry.js +10 -10
- package/dist/esm/calcite-checkbox.entry.js +10 -10
- package/dist/esm/calcite-chip.entry.js +11 -11
- package/dist/esm/calcite-color-picker_3.entry.js +14 -14
- package/dist/esm/calcite-combobox_3.entry.js +18 -18
- package/dist/esm/calcite-date-picker_4.entry.js +12 -12
- package/dist/esm/calcite-dropdown_3.entry.js +12 -12
- package/dist/esm/calcite-fab.entry.js +7 -7
- package/dist/esm/calcite-filter.entry.js +13 -13
- package/dist/esm/calcite-flow-item.entry.js +12 -12
- package/dist/esm/calcite-flow.entry.js +3 -3
- package/dist/esm/calcite-graph_2.entry.js +14 -14
- package/dist/esm/calcite-handle.entry.js +6 -6
- package/dist/esm/calcite-icon.entry.js +6 -6
- package/dist/esm/calcite-inline-editable.entry.js +12 -12
- package/dist/esm/calcite-input-date-picker.entry.js +16 -16
- package/dist/esm/calcite-input-message.entry.js +5 -5
- package/dist/esm/calcite-input-number.entry.js +14 -14
- package/dist/esm/calcite-input-text.entry.js +13 -13
- package/dist/esm/calcite-input-time-picker_2.entry.js +13 -13
- package/dist/esm/calcite-input.entry.js +14 -14
- package/dist/esm/calcite-label.entry.js +6 -6
- package/dist/esm/calcite-link.entry.js +7 -7
- package/dist/esm/calcite-list_3.entry.js +9 -9
- package/dist/esm/calcite-loader.entry.js +3 -3
- package/dist/esm/calcite-modal.entry.js +13 -13
- package/dist/esm/calcite-notice.entry.js +12 -12
- package/dist/esm/calcite-option_3.entry.js +10 -10
- package/dist/esm/calcite-pagination.entry.js +9 -9
- package/dist/esm/calcite-panel.entry.js +14 -14
- package/dist/esm/calcite-pick-list_3.entry.js +16 -16
- package/dist/esm/calcite-popover.entry.js +15 -15
- package/dist/esm/calcite-progress.entry.js +2 -2
- package/dist/esm/calcite-radio-button-group.entry.js +3 -3
- package/dist/esm/calcite-radio-button.entry.js +10 -10
- package/dist/esm/calcite-rating.entry.js +13 -13
- package/dist/esm/calcite-scrim.entry.js +9 -9
- package/dist/esm/calcite-segmented-control_2.entry.js +9 -9
- package/dist/esm/calcite-shell_3.entry.js +11 -11
- package/dist/esm/calcite-sortable-list.entry.js +5 -5
- package/dist/esm/calcite-split-button.entry.js +3 -3
- package/dist/esm/calcite-stepper_2.entry.js +10 -10
- package/dist/esm/calcite-switch.entry.js +10 -10
- package/dist/esm/calcite-tab_4.entry.js +7 -7
- package/dist/esm/calcite-tile-select_2.entry.js +5 -5
- package/dist/esm/calcite-tile.entry.js +8 -8
- package/dist/esm/calcite-tip_3.entry.js +11 -11
- package/dist/esm/calcite-tooltip.entry.js +8 -8
- package/dist/esm/calcite-tree_2.entry.js +9 -9
- package/dist/esm/calcite-value-list_2.entry.js +16 -16
- package/dist/esm/calcite.js +4 -4
- package/dist/esm/{conditionalSlot-0feaf92e.js → conditionalSlot-b6c3ecc8.js} +3 -3
- package/dist/esm/{debounce-7eda7983.js → debounce-99a24776.js} +1 -1
- package/dist/esm/{dom-8bd9a2e4.js → dom-bd65a3df.js} +3 -3
- package/dist/esm/{filter-617a0a20.js → filter-cc726355.js} +2 -2
- package/dist/esm/{floating-ui-b1d5fc62.js → floating-ui-5a1af751.js} +4 -4
- package/dist/esm/{focusTrapComponent-509b8026.js → focusTrapComponent-b36346a9.js} +2 -2
- package/dist/esm/{form-9666b7af.js → form-7e66fe98.js} +3 -3
- package/dist/esm/{guid-be5a0c2d.js → guid-e12eba7b.js} +1 -1
- package/dist/esm/{index-6167ae21.js → index-b2142c38.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/{interactive-85bb17cd.js → interactive-7dedef57.js} +1 -1
- package/dist/esm/{key-c706eea1.js → key-17faa045.js} +1 -1
- package/dist/esm/{label-664a12e5.js → label-0abd76a6.js} +2 -2
- package/dist/esm/{loadable-53a96a9a.js → loadable-816bf286.js} +1 -1
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{locale-88b820ed.js → locale-167c32c8.js} +4 -4
- package/dist/esm/{math-87f6a301.js → math-502b5b6a.js} +1 -1
- package/dist/esm/{nonChromiumPlatformUtils-253dee10.js → nonChromiumPlatformUtils-d234fb51.js} +6 -6
- package/dist/esm/{observers-aab95813.js → observers-3185f4b8.js} +1 -1
- package/dist/esm/{openCloseComponent-dca8c4ff.js → openCloseComponent-432da9f2.js} +2 -2
- package/dist/esm/{resources-03cd2a66.js → resources-0a343000.js} +1 -1
- package/dist/esm/{resources-006e59bb.js → resources-0ac5873c.js} +5 -5
- package/dist/esm/{resources-44bb8b11.js → resources-5747eceb.js} +1 -1
- package/dist/esm/{resources-d674096d.js → resources-938e5051.js} +1 -1
- package/dist/esm/{resources-28d67c1d.js → resources-f83e6c79.js} +1 -1
- package/dist/esm/{resources-186e0ad8.js → resources-fa2e779c.js} +1 -1
- package/dist/esm/{sortable.esm-59b0e396.js → sortable.esm-3f7b4f4d.js} +1 -1
- package/dist/esm/{t9n-9d290ff1.js → t9n-e9aac2da.js} +3 -3
- package/dist/esm/{utils-20d9124f.js → utils-74180a66.js} +3 -3
- package/dist/esm/{utils-ce2bf7ba.js → utils-78866cd4.js} +1 -1
- package/dist/extras/docs-json.json +1 -1
- package/dist/extras/vscode-data.json +6138 -0
- package/dist/loader/cdn.js +1 -1
- package/dist/loader/index.cjs.js +1 -1
- package/dist/loader/index.es2017.js +1 -1
- package/dist/loader/index.js +1 -1
- package/hydrate/index.js +2 -2
- package/package.json +1 -1
- package/dist/calcite/p-2516afdb.js +0 -6
- package/dist/calcite/p-327823f3.js +0 -6
- package/dist/calcite/p-4c7630f9.entry.js +0 -6
- package/dist/calcite/p-5d59d6b8.js +0 -6
- package/dist/calcite/p-6edaec38.js +0 -6
- package/dist/calcite/p-88d410be.entry.js +0 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.
|
|
4
|
+
* v1.0.8-next.0
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as e,h as i,g as n}from"./p-9e413c06.js";import{i as a,b as s,f as r,e as o}from"./p-3d497b7d.js";import{n as l,C as c,p as h,c as u,i as d,a as m,r as f,b as p}from"./p-53865a5c.js";import{u as g}from"./p-644998ab.js";import{i as b}from"./p-243b7920.js";import{c as y,s as v,a as w}from"./p-dc200732.js";import{c as k,d as x}from"./p-5d59d6b8.js";import{c as M}from"./p-4dba9ad1.js";import{u as C,s as j,c as z,d as D}from"./p-251f2a5e.js";import{d as F,i as A}from"./p-5f0fe068.js";import"./p-1a0f4b4a.js";import"./p-129976f3.js";import"./p-2d3b1298.js";function S(t,e,i){return t(i={path:e,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},i.exports),i.exports}var _={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},O=S((function(t){var e=Array.prototype.concat,i=Array.prototype.slice,n=t.exports=function(t){for(var n,a=[],s=0,r=t.length;s<r;s++){var o=t[s];(n=o)&&"string"!=typeof n&&(n instanceof Array||Array.isArray(n)||n.length>=0&&(n.splice instanceof Function||Object.getOwnPropertyDescriptor(n,n.length-1)&&"String"!==n.constructor.name))?a=e.call(a,i.call(o)):a.push(o)}return a};n.wrap=function(t){return function(){return t(n(arguments))}}})),q=S((function(t){var e=Object.hasOwnProperty,i={};for(var n in _)e.call(_,n)&&(i[_[n]]=n);var a=t.exports={to:{},get:{}};function s(t,e,i){return Math.min(Math.max(e,t),i)}function r(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}a.get=function(t){var e,i;switch(t.substring(0,3).toLowerCase()){case"hsl":e=a.get.hsl(t),i="hsl";break;case"hwb":e=a.get.hwb(t),i="hwb";break;default:e=a.get.rgb(t),i="rgb"}return e?{model:i,value:e}:null},a.get.rgb=function(t){if(!t)return null;var i,n,a,r=[0,0,0,1];if(i=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(a=i[2],i=i[1],n=0;n<3;n++){var o=2*n;r[n]=parseInt(i.slice(o,o+2),16)}a&&(r[3]=parseInt(a,16)/255)}else if(i=t.match(/^#([a-f0-9]{3,4})$/i)){for(a=(i=i[1])[3],n=0;n<3;n++)r[n]=parseInt(i[n]+i[n],16);a&&(r[3]=parseInt(a+a,16)/255)}else if(i=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)r[n]=parseInt(i[n+1],0);i[4]&&(r[3]=i[5]?.01*parseFloat(i[4]):parseFloat(i[4]))}else{if(!(i=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(i=t.match(/^(\w+)$/))?"transparent"===i[1]?[0,0,0,0]:e.call(_,i[1])?((r=_[i[1]])[3]=1,r):null:null;for(n=0;n<3;n++)r[n]=Math.round(2.55*parseFloat(i[n+1]));i[4]&&(r[3]=i[5]?.01*parseFloat(i[4]):parseFloat(i[4]))}for(n=0;n<3;n++)r[n]=s(r[n],0,255);return r[3]=s(r[3],0,1),r},a.get.hsl=function(t){if(!t)return null;var e=t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var i=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,s(parseFloat(e[2]),0,100),s(parseFloat(e[3]),0,100),s(isNaN(i)?1:i,0,1)]}return null},a.get.hwb=function(t){if(!t)return null;var e=t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var i=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,s(parseFloat(e[2]),0,100),s(parseFloat(e[3]),0,100),s(isNaN(i)?1:i,0,1)]}return null},a.to.hex=function(){var t=O(arguments);return"#"+r(t[0])+r(t[1])+r(t[2])+(t[3]<1?r(Math.round(255*t[3])):"")},a.to.rgb=function(){var t=O(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},a.to.rgb.percent=function(){var t=O(arguments),e=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),n=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+i+"%, "+n+"%)":"rgba("+e+"%, "+i+"%, "+n+"%, "+t[3]+")"},a.to.hsl=function(){var t=O(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},a.to.hwb=function(){var t=O(arguments),e="";return t.length>=4&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},a.to.keyword=function(t){return i[t.slice(0,3)]}})),$={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const I={};for(const t of Object.keys($))I[$[t]]=t;const E={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var L=E;for(const t of Object.keys(E)){if(!("channels"in E[t]))throw new Error("missing channels property: "+t);if(!("labels"in E[t]))throw new Error("missing channel labels property: "+t);if(E[t].labels.length!==E[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:i}=E[t];delete E[t].channels,delete E[t].labels,Object.defineProperty(E[t],"channels",{value:e}),Object.defineProperty(E[t],"labels",{value:i})}function N(t,e){return function(i){return e(t(i))}}function K(t,e){const i=[e[t].parent,t];let n=L[e[t].parent][t],a=e[t].parent;for(;e[a].parent;)i.unshift(e[a].parent),n=N(L[e[a].parent][a],n),a=e[a].parent;return n.conversion=i,n}E.rgb.hsl=function(t){const e=t[0]/255,i=t[1]/255,n=t[2]/255,a=Math.min(e,i,n),s=Math.max(e,i,n),r=s-a;let o,l;s===a?o=0:e===s?o=(i-n)/r:i===s?o=2+(n-e)/r:n===s&&(o=4+(e-i)/r),o=Math.min(60*o,360),o<0&&(o+=360);const c=(a+s)/2;return l=s===a?0:c<=.5?r/(s+a):r/(2-s-a),[o,100*l,100*c]},E.rgb.hsv=function(t){let e,i,n,a,s;const r=t[0]/255,o=t[1]/255,l=t[2]/255,c=Math.max(r,o,l),h=c-Math.min(r,o,l),u=function(t){return(c-t)/6/h+.5};return 0===h?(a=0,s=0):(s=h/c,e=u(r),i=u(o),n=u(l),r===c?a=n-i:o===c?a=1/3+e-n:l===c&&(a=2/3+i-e),a<0?a+=1:a>1&&(a-=1)),[360*a,100*s,100*c]},E.rgb.hwb=function(t){const e=t[0],i=t[1];let n=t[2];const a=E.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(i,n));return n=1-1/255*Math.max(e,Math.max(i,n)),[a,100*s,100*n]},E.rgb.cmyk=function(t){const e=t[0]/255,i=t[1]/255,n=t[2]/255,a=Math.min(1-e,1-i,1-n);return[100*((1-e-a)/(1-a)||0),100*((1-i-a)/(1-a)||0),100*((1-n-a)/(1-a)||0),100*a]},E.rgb.keyword=function(t){const e=I[t];if(e)return e;let i,n=1/0;for(const e of Object.keys($)){const r=((a=t)[0]-(s=$[e])[0])**2+(a[1]-s[1])**2+(a[2]-s[2])**2;r<n&&(n=r,i=e)}var a,s;return i},E.keyword.rgb=function(t){return $[t]},E.rgb.xyz=function(t){let e=t[0]/255,i=t[1]/255,n=t[2]/255;return e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,[100*(.4124*e+.3576*i+.1805*n),100*(.2126*e+.7152*i+.0722*n),100*(.0193*e+.1192*i+.9505*n)]},E.rgb.lab=function(t){const e=E.rgb.xyz(t);let i=e[0],n=e[1],a=e[2];return i/=95.047,n/=100,a/=108.883,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,[116*n-16,500*(i-n),200*(n-a)]},E.hsl.rgb=function(t){const e=t[0]/360,i=t[1]/100,n=t[2]/100;let a,s,r;if(0===i)return r=255*n,[r,r,r];a=n<.5?n*(1+i):n+i-n*i;const o=2*n-a,l=[0,0,0];for(let t=0;t<3;t++)s=e+1/3*-(t-1),s<0&&s++,s>1&&s--,r=6*s<1?o+6*(a-o)*s:2*s<1?a:3*s<2?o+(a-o)*(2/3-s)*6:o,l[t]=255*r;return l},E.hsl.hsv=function(t){const e=t[0];let i=t[1]/100,n=t[2]/100,a=i;const s=Math.max(n,.01);return n*=2,i*=n<=1?n:2-n,a*=s<=1?s:2-s,[e,100*(0===n?2*a/(s+a):2*i/(n+i)),(n+i)/2*100]},E.hsv.rgb=function(t){const e=t[0]/60,i=t[1]/100;let n=t[2]/100;const a=Math.floor(e)%6,s=e-Math.floor(e),r=255*n*(1-i),o=255*n*(1-i*s),l=255*n*(1-i*(1-s));switch(n*=255,a){case 0:return[n,l,r];case 1:return[o,n,r];case 2:return[r,n,l];case 3:return[r,o,n];case 4:return[l,r,n];case 5:return[n,r,o]}},E.hsv.hsl=function(t){const e=t[0],i=t[1]/100,n=t[2]/100,a=Math.max(n,.01);let s,r;r=(2-i)*n;const o=(2-i)*a;return s=i*a,s/=o<=1?o:2-o,s=s||0,r/=2,[e,100*s,100*r]},E.hwb.rgb=function(t){const e=t[0]/360;let i=t[1]/100,n=t[2]/100;const a=i+n;let s;a>1&&(i/=a,n/=a);const r=Math.floor(6*e),o=1-n;s=6*e-r,0!=(1&r)&&(s=1-s);const l=i+s*(o-i);let c,h,u;switch(r){default:case 6:case 0:c=o,h=l,u=i;break;case 1:c=l,h=o,u=i;break;case 2:c=i,h=o,u=l;break;case 3:c=i,h=l,u=o;break;case 4:c=l,h=i,u=o;break;case 5:c=o,h=i,u=l}return[255*c,255*h,255*u]},E.cmyk.rgb=function(t){const e=t[1]/100,i=t[2]/100,n=t[3]/100;return[255*(1-Math.min(1,t[0]/100*(1-n)+n)),255*(1-Math.min(1,e*(1-n)+n)),255*(1-Math.min(1,i*(1-n)+n))]},E.xyz.rgb=function(t){const e=t[0]/100,i=t[1]/100,n=t[2]/100;let a,s,r;return a=3.2406*e+-1.5372*i+-.4986*n,s=-.9689*e+1.8758*i+.0415*n,r=.0557*e+-.204*i+1.057*n,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),r=Math.min(Math.max(0,r),1),[255*a,255*s,255*r]},E.xyz.lab=function(t){let e=t[0],i=t[1],n=t[2];return e/=95.047,i/=100,n/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,[116*i-16,500*(e-i),200*(i-n)]},E.lab.xyz=function(t){let e,i,n;i=(t[0]+16)/116,e=t[1]/500+i,n=i-t[2]/200;const a=i**3,s=e**3,r=n**3;return i=a>.008856?a:(i-16/116)/7.787,e=s>.008856?s:(e-16/116)/7.787,n=r>.008856?r:(n-16/116)/7.787,e*=95.047,i*=100,n*=108.883,[e,i,n]},E.lab.lch=function(t){const e=t[0],i=t[1],n=t[2];let a;return a=360*Math.atan2(n,i)/2/Math.PI,a<0&&(a+=360),[e,Math.sqrt(i*i+n*n),a]},E.lch.lab=function(t){const e=t[1],i=t[2]/360*2*Math.PI;return[t[0],e*Math.cos(i),e*Math.sin(i)]},E.rgb.ansi16=function(t,e=null){const[i,n,a]=t;let s=null===e?E.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),0===s)return 30;let r=30+(Math.round(a/255)<<2|Math.round(n/255)<<1|Math.round(i/255));return 2===s&&(r+=60),r},E.hsv.ansi16=function(t){return E.rgb.ansi16(E.hsv.rgb(t),t[2])},E.rgb.ansi256=function(t){const e=t[0],i=t[1],n=t[2];return e===i&&i===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(i/255*5)+Math.round(n/255*5)},E.ansi16.rgb=function(t){let e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];const i=.5*(1+~~(t>50));return[(1&e)*i*255,(e>>1&1)*i*255,(e>>2&1)*i*255]},E.ansi256.rgb=function(t){if(t>=232){const e=10*(t-232)+8;return[e,e,e]}let e;return t-=16,[Math.floor(t/36)/5*255,Math.floor((e=t%36)/6)/5*255,e%6/5*255]},E.rgb.hex=function(t){const e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},E.hex.rgb=function(t){const e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let i=e[0];3===e[0].length&&(i=i.split("").map((t=>t+t)).join(""));const n=parseInt(i,16);return[n>>16&255,n>>8&255,255&n]},E.rgb.hcg=function(t){const e=t[0]/255,i=t[1]/255,n=t[2]/255,a=Math.max(Math.max(e,i),n),s=Math.min(Math.min(e,i),n),r=a-s;let o,l;return o=r<1?s/(1-r):0,l=r<=0?0:a===e?(i-n)/r%6:a===i?2+(n-e)/r:4+(e-i)/r,l/=6,l%=1,[360*l,100*r,100*o]},E.hsl.hcg=function(t){const e=t[1]/100,i=t[2]/100,n=i<.5?2*e*i:2*e*(1-i);let a=0;return n<1&&(a=(i-.5*n)/(1-n)),[t[0],100*n,100*a]},E.hsv.hcg=function(t){const e=t[2]/100,i=t[1]/100*e;let n=0;return i<1&&(n=(e-i)/(1-i)),[t[0],100*i,100*n]},E.hcg.rgb=function(t){const e=t[1]/100,i=t[2]/100;if(0===e)return[255*i,255*i,255*i];const n=[0,0,0],a=t[0]/360%1*6,s=a%1,r=1-s;let o=0;switch(Math.floor(a)){case 0:n[0]=1,n[1]=s,n[2]=0;break;case 1:n[0]=r,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=s;break;case 3:n[0]=0,n[1]=r,n[2]=1;break;case 4:n[0]=s,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=r}return o=(1-e)*i,[255*(e*n[0]+o),255*(e*n[1]+o),255*(e*n[2]+o)]},E.hcg.hsv=function(t){const e=t[1]/100,i=e+t[2]/100*(1-e);let n=0;return i>0&&(n=e/i),[t[0],100*n,100*i]},E.hcg.hsl=function(t){const e=t[1]/100,i=t[2]/100*(1-e)+.5*e;let n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[t[0],100*n,100*i]},E.hcg.hwb=function(t){const e=t[1]/100,i=e+t[2]/100*(1-e);return[t[0],100*(i-e),100*(1-i)]},E.hwb.hcg=function(t){const e=1-t[2]/100,i=e-t[1]/100;let n=0;return i<1&&(n=(e-i)/(1-i)),[t[0],100*i,100*n]},E.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},E.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},E.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},E.gray.hsl=function(t){return[0,0,t[0]]},E.gray.hsv=E.gray.hsl,E.gray.hwb=function(t){return[0,100,t[0]]},E.gray.cmyk=function(t){return[0,0,0,t[0]]},E.gray.lab=function(t){return[t[0],0,0]},E.gray.hex=function(t){const e=255&Math.round(t[0]/100*255),i=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(i.length)+i},E.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};const P={};Object.keys(L).forEach((t=>{P[t]={},Object.defineProperty(P[t],"channels",{value:L[t].channels}),Object.defineProperty(P[t],"labels",{value:L[t].labels});const e=function(t){const e=function(t){const e=function(){const t={},e=Object.keys(L);for(let i=e.length,n=0;n<i;n++)t[e[n]]={distance:-1,parent:null};return t}(),i=[t];for(e[t].distance=0;i.length;){const t=i.pop(),n=Object.keys(L[t]);for(let a=n.length,s=0;s<a;s++){const a=n[s],r=e[a];-1===r.distance&&(r.distance=e[t].distance+1,r.parent=t,i.unshift(a))}}return e}(t),i={},n=Object.keys(e);for(let t=n.length,a=0;a<t;a++){const t=n[a];null!==e[t].parent&&(i[t]=K(t,e))}return i}(t);Object.keys(e).forEach((i=>{const n=e[i];P[t][i]=function(t){const e=function(...e){const i=e[0];if(null==i)return i;i.length>1&&(e=i);const n=t(e);if("object"==typeof n)for(let t=n.length,e=0;e<t;e++)n[e]=Math.round(n[e]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}(n),P[t][i].raw=function(t){const e=function(...e){const i=e[0];return null==i?i:(i.length>1&&(e=i),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(n)}))}));var U=P;const T=["keyword","gray","hex"],H={};for(const t of Object.keys(U))H[[...U[t].labels].sort().join("")]=t;const V={};function J(t,e){if(!(this instanceof J))return new J(t,e);if(e&&e in T&&(e=null),e&&!(e in U))throw new Error("Unknown model: "+e);let i,n;if(null==t)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof J)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=q.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,n=U[this.model].channels,this.color=e.value.slice(0,n),this.valpha="number"==typeof e.value[n]?e.value[n]:1}else if(t.length>0){this.model=e||"rgb",n=U[this.model].channels;const i=Array.prototype.slice.call(t,0,n);this.color=X(i,n),this.valpha="number"==typeof t[n]?t[n]:1}else if("number"==typeof t)this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;const e=Object.keys(t);"alpha"in t&&(e.splice(e.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);const n=e.sort().join("");if(!(n in H))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=H[n];const{labels:a}=U[this.model],s=[];for(i=0;i<a.length;i++)s.push(t[a[i]]);this.color=X(s)}if(V[this.model])for(n=U[this.model].channels,i=0;i<n;i++){const t=V[this.model][i];t&&(this.color[i]=t(this.color[i]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}J.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in q.to?this:this.rgb();e=e.round("number"==typeof t?t:1);const i=1===e.valpha?e.color:[...e.color,this.valpha];return q.to[e.model](i)},percentString(t){const e=this.rgb().round("number"==typeof t?t:1),i=1===e.valpha?e.color:[...e.color,this.valpha];return q.to.rgb.percent(i)},array(){return 1===this.valpha?[...this.color]:[...this.color,this.valpha]},object(){const t={},{channels:e}=U[this.model],{labels:i}=U[this.model];for(let n=0;n<e;n++)t[i[n]]=this.color[n];return 1!==this.valpha&&(t.alpha=this.valpha),t},unitArray(){const t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,1!==this.valpha&&t.push(this.valpha),t},unitObject(){const t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,1!==this.valpha&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new J([...this.color.map(R(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new J([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:W("rgb",0,B(255)),green:W("rgb",1,B(255)),blue:W("rgb",2,B(255)),hue:W(["hsl","hsv","hsl","hwb","hcg"],0,(t=>(t%360+360)%360)),saturationl:W("hsl",1,B(100)),lightness:W("hsl",2,B(100)),saturationv:W("hsv",1,B(100)),value:W("hsv",2,B(100)),chroma:W("hcg",1,B(100)),gray:W("hcg",2,B(100)),white:W("hwb",1,B(100)),wblack:W("hwb",2,B(100)),cyan:W("cmyk",0,B(100)),magenta:W("cmyk",1,B(100)),yellow:W("cmyk",2,B(100)),black:W("cmyk",3,B(100)),x:W("xyz",0,B(95.047)),y:W("xyz",1,B(100)),z:W("xyz",2,B(108.833)),l:W("lab",0,B(100)),a:W("lab",1),b:W("lab",2),keyword(t){return void 0!==t?new J(t):U[this.model].keyword(this.color)},hex(t){return void 0!==t?new J(t):q.to.hex(this.rgb().round().color)},hexa(t){if(void 0!==t)return new J(t);const e=this.rgb().round().color;let i=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===i.length&&(i="0"+i),q.to.hex(e)+i},rgbNumber(){const t=this.rgb().color;return(255&t[0])<<16|(255&t[1])<<8|255&t[2]},luminosity(){const t=this.rgb().color,e=[];for(const[i,n]of t.entries()){const t=n/255;e[i]=t<=.04045?t/12.92:((t+.055)/1.055)**2.4}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){const e=this.luminosity(),i=t.luminosity();return e>i?(e+.05)/(i+.05):(i+.05)/(e+.05)},level(t){const e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){const t=this.rgb().color;return(2126*t[0]+7152*t[1]+722*t[2])/1e4<128},isLight(){return!this.isDark()},negate(){const t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){const e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){const e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){const e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){const e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){const e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){const e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){const t=this.rgb().color,e=.3*t[0]+.59*t[1]+.11*t[2];return J.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){const e=this.hsl();let i=e.color[0];return i=(i+t)%360,i=i<0?360+i:i,e.color[0]=i,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);const i=t.rgb(),n=this.rgb(),a=void 0===e?.5:e,s=2*a-1,r=i.alpha()-n.alpha(),o=((s*r==-1?s:(s+r)/(1+s*r))+1)/2,l=1-o;return J.rgb(o*i.red()+l*n.red(),o*i.green()+l*n.green(),o*i.blue()+l*n.blue(),i.alpha()*a+n.alpha()*(1-a))}};for(const t of Object.keys(U)){if(T.includes(t))continue;const{channels:e}=U[t];J.prototype[t]=function(...e){return this.model===t?new J(this):new J(e.length>0?e:[...(i=U[this.model][t].raw(this.color),Array.isArray(i)?i:[i]),this.valpha],t);var i},J[t]=function(...i){let n=i[0];return"number"==typeof n&&(n=X(i,e)),new J(n,t)}}function R(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function W(t,e,i){t=Array.isArray(t)?t:[t];for(const n of t)(V[n]||(V[n]=[]))[e]=i;return t=t[0],function(n){let a;return void 0!==n?(i&&(n=i(n)),a=this[t](),a.color[e]=n,a):(a=this[t]().color[e],i&&(a=i(a)),a)}}function B(t){return function(e){return Math.max(0,Math.min(t,e))}}function X(t,e){for(let i=0;i<e;i++)"number"!=typeof t[i]&&(t[i]=0);return t}var Y=J;const G=Y("#007AC2"),Q={r:255,g:255,b:255},Z={h:360,s:100,v:100},tt={s:{slider:{height:10,width:160},colorField:{height:80,width:160},thumb:{radius:8}},m:{slider:{height:14,width:272},colorField:{height:150,width:272},thumb:{radius:10}},l:{slider:{height:16,width:464},colorField:{height:200,width:464},thumb:{radius:12}}},et=l(G.hex()),it=class{constructor(n){var r,o,h,u;t(this,n),this.calciteColorPickerChange=e(this,"calciteColorPickerChange",6),this.calciteColorPickerInput=e(this,"calciteColorPickerInput",6),this.colorFieldAndSliderHovered=!1,this.hueThumbState="idle",this.internalColorUpdateContext=null,this.mode=c.HEX,this.shiftKeyChannelAdjustment=0,this.sliderThumbState="idle",this.handleTabActivate=t=>{this.channelMode=t.currentTarget.getAttribute("data-color-mode"),this.updateChannelsFromColor(this.color)},this.handleColorFieldScopeKeyDown=t=>{const{key:e}=t,i={ArrowUp:{x:0,y:-10},ArrowRight:{x:10,y:0},ArrowDown:{x:0,y:10},ArrowLeft:{x:-10,y:0}};i[e]&&(t.preventDefault(),this.scopeOrientation="ArrowDown"===e||"ArrowUp"===e?"vertical":"horizontal",this.captureColorFieldColor(this.colorFieldScopeLeft+i[e].x||0,this.colorFieldScopeTop+i[e].y||0,!1))},this.handleHueScopeKeyDown=t=>{const e=t.shiftKey?10:1,{key:i}=t,n={ArrowUp:1,ArrowRight:1,ArrowDown:-1,ArrowLeft:-1};if(n[i]){t.preventDefault();const a=n[i]*e,s=this.baseColorFieldColor.hue(),r=this.baseColorFieldColor.hue(s+a);this.internalColorSet(r,!1)}},this.handleHexInputChange=t=>{t.stopPropagation();const{allowEmpty:e,color:i}=this,n=t.target.value;!e||n?n!==(i&&l(i.hex()))&&this.internalColorSet(Y(n)):this.internalColorSet(null)},this.handleSavedColorSelect=t=>{this.internalColorSet(Y(t.currentTarget.color))},this.handleChannelInput=t=>{const e=t.currentTarget,i=Number(e.getAttribute("data-channel-index")),n="rgb"===this.channelMode?Q[Object.keys(Q)[i]]:Z[Object.keys(Z)[i]];let a;if(this.allowEmpty&&!e.value)a="";else{const t=Number(e.value)+this.shiftKeyChannelAdjustment;a=M(t,0,n).toString()}e.value=a,e.internalSyncChildElValue()},this.handleChannelChange=t=>{const e=t.currentTarget,i=Number(e.getAttribute("data-channel-index")),n=[...this.channels];if(this.allowEmpty&&!e.value)return this.channels=[null,null,null],void this.internalColorSet(null);n[i]=Number(e.value),this.updateColorFromChannels(n)},this.handleSavedColorKeyDown=t=>{b(t.key)&&(t.preventDefault(),this.handleSavedColorSelect(t))},this.handleColorFieldAndSliderPointerLeave=()=>{this.colorFieldAndSliderInteractive=!1,this.colorFieldAndSliderHovered=!1,"drag"!==this.sliderThumbState&&"drag"!==this.hueThumbState&&(this.hueThumbState="idle",this.sliderThumbState="idle",this.drawColorFieldAndSlider())},this.handleColorFieldAndSliderPointerDown=t=>{if(!a(t))return;const{offsetX:e,offsetY:i}=t,n=this.getCanvasRegion(i);"color-field"===n?(this.hueThumbState="drag",this.captureColorFieldColor(e,i),this.colorFieldScopeNode?.focus()):"slider"===n&&(this.sliderThumbState="drag",this.captureHueSliderColor(e),this.hueScopeNode?.focus()),t.preventDefault(),document.addEventListener("pointermove",this.globalPointerMoveHandler),document.addEventListener("pointerup",this.globalPointerUpHandler,{once:!0}),this.activeColorFieldAndSliderRect=this.fieldAndSliderRenderingContext.canvas.getBoundingClientRect()},this.globalPointerUpHandler=t=>{if(!a(t))return;const e="drag"===this.sliderThumbState||"drag"===this.hueThumbState;this.hueThumbState="idle",this.sliderThumbState="idle",this.activeColorFieldAndSliderRect=null,this.drawColorFieldAndSlider(),e&&this.calciteColorPickerChange.emit()},this.globalPointerMoveHandler=t=>{const{el:e,dimensions:i}=this,n="drag"===this.hueThumbState;if(!e.isConnected||"drag"!==this.sliderThumbState&&!n)return;let a,s;const r=this.activeColorFieldAndSliderRect,{clientX:o,clientY:l}=t;if(this.colorFieldAndSliderHovered)a=o-r.x,s=l-r.y;else{const t=i.colorField.width,e=i.colorField.height,n=i.slider.height;a=o<r.x+t&&o>r.x?o-r.x:o<r.x?0:t-1,s=l<r.y+e+n&&l>r.y?l-r.y:l<r.y?0:e+n}n?this.captureColorFieldColor(a,s,!1):this.captureHueSliderColor(a)},this.handleColorFieldAndSliderPointerEnterOrMove=({offsetX:t,offsetY:e})=>{const{dimensions:{colorField:i,slider:n,thumb:a}}=this;this.colorFieldAndSliderInteractive=e<=i.height+n.height,this.colorFieldAndSliderHovered=!0;const s=this.getCanvasRegion(e);if("color-field"===s){const n=this.hueThumbState,s=this.baseColorFieldColor.hsv(),r=Math.round(s.saturationv()/(Z.s/i.width)),o=Math.round(i.height-s.value()/(Z.v/i.height)),l=this.containsPoint(t,e,r,o,a.radius);let c=!1;"idle"===n&&l?(this.hueThumbState="hover",c=!0):"hover"!==n||l||(this.hueThumbState="idle",c=!0),"drag"!==this.hueThumbState&&c&&this.drawColorFieldAndSlider()}else if("slider"===s){const s=this.baseColorFieldColor.hsv().saturationv(100).value(100),r=this.sliderThumbState,o=Math.round(s.hue()/(360/n.width)),l=Math.round((n.height+this.getSliderCapSpacing())/2)+i.height,c=this.containsPoint(t,e,o,l,a.radius);let h=!1;"idle"===r&&c?(this.sliderThumbState="hover",h=!0):"hover"!==r||c||(this.sliderThumbState="idle",h=!0),"drag"!==this.sliderThumbState&&h&&this.drawColorFieldAndSlider()}},this.storeColorFieldScope=t=>{this.colorFieldScopeNode=t},this.storeHueScope=t=>{this.hueScopeNode=t},this.renderChannelsTabTitle=t=>{const{channelMode:e,messages:n}=this;return i("calcite-tab-title",{class:"color-mode","data-color-mode":t,key:t,onCalciteTabsActivate:this.handleTabActivate,selected:t===e},"rgb"===t?n.rgb:n.hsv)},this.renderChannelsTab=t=>{const{channelMode:e,channels:n,messages:a}=this,r=t===e,o="rgb"===t,l=o?[a.r,a.g,a.b]:[a.h,a.s,a.v],c=o?[a.red,a.green,a.blue]:[a.hue,a.saturation,a.value],h=s(this.el);return i("calcite-tab",{class:"control",key:t,selected:r},i("div",{class:"channels",dir:"ltr"},n.map(((t,e)=>this.renderChannel(t,e,l[e],c[e],h)))))},this.renderChannel=(t,e,n,a,s)=>i("calcite-input",{class:"channel","data-channel-index":e,dir:s,label:a,lang:this.effectiveLocale,numberButtonType:"none",numberingSystem:this.numberingSystem,onCalciteInputChange:this.handleChannelChange,onCalciteInputInput:this.handleChannelInput,onKeyDown:this.handleKeyDown,prefixText:n,scale:"l"===this.scale?"m":"s",type:"number",value:t?.toString()}),this.deleteColor=()=>{const t=this.color.hex();if(!(this.savedColors.indexOf(t)>-1))return;const e=this.savedColors.filter((e=>e!==t));this.savedColors=e,this.storageId&&localStorage.setItem(`calcite-color-${this.storageId}`,JSON.stringify(e))},this.saveColor=()=>{const t=this.color.hex();if(this.savedColors.indexOf(t)>-1)return;const e=[...this.savedColors,t];this.savedColors=e,this.storageId&&localStorage.setItem(`calcite-color-${this.storageId}`,JSON.stringify(e))},this.drawColorFieldAndSlider=(r=()=>{this.fieldAndSliderRenderingContext&&(this.drawColorField(),this.drawHueSlider())},h=!0,u=!0,A(o)&&(h="leading"in o?!!o.leading:h,u="trailing"in o?!!o.trailing:u),F(r,16,{leading:h,maxWait:16,trailing:u})),this.captureColorFieldColor=(t,e,i=!0)=>{const{dimensions:{colorField:{height:n,width:a}}}=this,s=Math.round(Z.s/a*t),r=Math.round(Z.v/n*(n-e));this.internalColorSet(this.baseColorFieldColor.hsv().saturationv(s).value(r),i)},this.initColorFieldAndSlider=t=>{this.fieldAndSliderRenderingContext=t.getContext("2d"),this.updateCanvasSize(t)},this.allowEmpty=!1,this.color=G,this.disabled=!1,this.format="auto",this.hideHex=!1,this.hideChannels=!1,this.hideSaved=!1,this.scale="m",this.storageId=void 0,this.messageOverrides=void 0,this.numberingSystem=void 0,this.value=et,this.defaultMessages=void 0,this.colorFieldAndSliderInteractive=!1,this.channelMode="rgb",this.channels=this.toChannels(G),this.dimensions=tt.m,this.effectiveLocale="",this.messages=void 0,this.savedColors=[],this.colorFieldScopeTop=void 0,this.colorFieldScopeLeft=void 0,this.scopeOrientation=void 0,this.hueScopeLeft=void 0,this.hueScopeTop=void 0}handleColorChange(t,e){this.drawColorFieldAndSlider(),this.updateChannelsFromColor(t),this.previousColor=e}handleFormatChange(t){this.setMode(t),this.internalColorSet(this.color,!1,"internal")}handleScaleChange(t="m"){this.updateDimensions(t),this.updateCanvasSize(this.fieldAndSliderRenderingContext?.canvas)}onMessagesChange(){}handleValueChange(t,e){const{allowEmpty:i,format:n}=this;let a=!1;if(!i||t){const i=h(t);if(!i||"auto"!==n&&i!==n)return this.showIncompatibleColorWarning(t,n),void(this.value=e);a=this.mode!==i,this.setMode(i)}const s="drag"===this.sliderThumbState||"drag"===this.hueThumbState;if("initial"===this.internalColorUpdateContext)return;if("user-interaction"===this.internalColorUpdateContext)return this.calciteColorPickerInput.emit(),void(s||this.calciteColorPickerChange.emit());const r=i&&!t?null:Y(t),o=!u(r,this.color);(a||o)&&this.internalColorSet(r,!0,"internal")}get baseColorFieldColor(){return this.color||this.previousColor||G}effectiveLocaleChange(){C(this,this.effectiveLocale)}handleChannelKeyUpOrDown(t){this.shiftKeyChannelAdjustment=0;const{key:e}=t;if("ArrowUp"!==e&&"ArrowDown"!==e||!t.composedPath().some((t=>t.classList?.contains("channel"))))return;const{shiftKey:i}=t;if(t.preventDefault(),!this.color)return this.internalColorSet(this.previousColor),void t.stopPropagation();this.shiftKeyChannelAdjustment="ArrowUp"===e&&i?9:"ArrowDown"===e&&i?-9:0}async setFocus(){await y(this),this.el.focus()}async componentWillLoad(){v(this);const{allowEmpty:t,color:e,format:i,value:n}=this,a=t&&!n,s=h(n),r=a||"auto"===i&&s||i===s,o=a?null:r?Y(n):e;r||this.showIncompatibleColorWarning(n,i),this.setMode(i),this.internalColorSet(o,!1,"initial"),this.updateDimensions(this.scale);const l=`calcite-color-${this.storageId}`;this.storageId&&localStorage.getItem(l)&&(this.savedColors=JSON.parse(localStorage.getItem(l))),await j(this)}connectedCallback(){k(this),z(this)}componentDidLoad(){w(this)}disconnectedCallback(){document.removeEventListener("pointermove",this.globalPointerMoveHandler),document.removeEventListener("pointerup",this.globalPointerUpHandler),x(this),D(this)}componentDidRender(){g(this)}render(){const{allowEmpty:t,color:e,messages:n,hideHex:a,hideChannels:s,hideSaved:r,savedColors:o,scale:l}=this,c=e?e.hex():null,h="l"===l?"m":"s",{colorFieldAndSliderInteractive:u,colorFieldScopeTop:d,colorFieldScopeLeft:m,hueScopeLeft:f,hueScopeTop:p,scopeOrientation:g,dimensions:{colorField:{height:b,width:y},slider:{height:v}}}=this,w=p??v/2+b,k=f??y*G.hue()/Z.h,x=null===e,M="vertical"===g;return i("div",{class:"container"},i("div",{class:"color-field-and-slider-wrap"},i("canvas",{class:{"color-field-and-slider":!0,"color-field-and-slider--interactive":u},onPointerDown:this.handleColorFieldAndSliderPointerDown,onPointerEnter:this.handleColorFieldAndSliderPointerEnterOrMove,onPointerLeave:this.handleColorFieldAndSliderPointerLeave,onPointerMove:this.handleColorFieldAndSliderPointerEnterOrMove,ref:this.initColorFieldAndSlider}),i("div",{"aria-label":M?n.value:n.saturation,"aria-valuemax":M?Z.v:Z.s,"aria-valuemin":"0","aria-valuenow":(M?e?.saturationv():e?.value())||"0",class:{scope:!0,"scope--color-field":!0},onKeyDown:this.handleColorFieldScopeKeyDown,ref:this.storeColorFieldScope,role:"slider",style:{top:`${d||0}px`,left:`${m||0}px`},tabindex:"0"}),i("div",{"aria-label":n.hue,"aria-valuemax":Z.h,"aria-valuemin":"0","aria-valuenow":e?.round().hue()||G.round().hue(),class:{scope:!0,"scope--hue":!0},onKeyDown:this.handleHueScopeKeyDown,ref:this.storeHueScope,role:"slider",style:{top:`${w}px`,left:`${k}px`},tabindex:"0"})),a&&s?null:i("div",{class:{"control-section":!0,section:!0}},a?null:i("div",{class:"color-hex-options"},i("span",{class:{header:!0,"header--hex":!0}},n.hex),i("calcite-color-picker-hex-input",{allowEmpty:t,class:"control",hexLabel:n.hex,numberingSystem:this.numberingSystem,onCalciteColorPickerHexInputChange:this.handleHexInputChange,scale:h,value:c})),s?null:i("calcite-tabs",{class:{"color-mode-container":!0,"section--split":!0},scale:h},i("calcite-tab-nav",{slot:"title-group"},this.renderChannelsTabTitle("rgb"),this.renderChannelsTabTitle("hsv")),this.renderChannelsTab("rgb"),this.renderChannelsTab("hsv"))),r?null:i("div",{class:{"saved-colors-section":!0,section:!0}},i("div",{class:"header"},i("label",null,n.saved),i("div",{class:"saved-colors-buttons"},i("calcite-button",{appearance:"transparent",class:"delete-color",disabled:x,iconStart:"minus",kind:"neutral",label:n.deleteColor,onClick:this.deleteColor,scale:h,type:"button"}),i("calcite-button",{appearance:"transparent",class:"save-color",disabled:x,iconStart:"plus",kind:"neutral",label:n.saveColor,onClick:this.saveColor,scale:h,type:"button"}))),o.length>0?i("div",{class:"saved-colors"},[...o.map((t=>i("calcite-color-picker-swatch",{active:c===t,class:"saved-color",color:t,key:t,onClick:this.handleSavedColorSelect,onKeyDown:this.handleSavedColorKeyDown,scale:l,tabIndex:0})))]):null))}handleKeyDown(t){"Enter"===t.key&&t.preventDefault()}showIncompatibleColorWarning(t,e){console.warn(`ignoring color value (${t}) as it is not compatible with the current format (${e})`)}setMode(t){this.mode="auto"===t?this.mode:t}captureHueSliderColor(t){const{dimensions:{slider:{width:e}}}=this;this.internalColorSet(this.baseColorFieldColor.hue(360/e*t),!1)}getCanvasRegion(t){const{dimensions:{colorField:{height:e},slider:{height:i}}}=this;return t<=e?"color-field":t<=e+i?"slider":"none"}internalColorSet(t,e=!0,i="user-interaction"){e&&u(t,this.color)||(this.internalColorUpdateContext=i,this.color=t,this.value=this.toValue(t),this.internalColorUpdateContext=null)}toValue(t,e=this.mode){if(!t)return null;if(e.includes("hex"))return l(t.round().hex());if(e.includes("-css"))return t[e.replace("-css","").replace("a","")]().round().string();const i=t[e]().round().object();return e.endsWith("a")&&(i.a=i.alpha,delete i.alpha),i}getSliderCapSpacing(){const{dimensions:{slider:{height:t},thumb:{radius:e}}}=this;return 2*e-t}updateDimensions(t="m"){this.dimensions=tt[t]}drawColorField(){const t=this.fieldAndSliderRenderingContext,{dimensions:{colorField:{height:e,width:i}}}=this;t.fillStyle=this.baseColorFieldColor.hsv().saturationv(100).value(100).string(),t.fillRect(0,0,i,e);const n=t.createLinearGradient(0,0,i,0);n.addColorStop(0,"rgba(255,255,255,1)"),n.addColorStop(1,"rgba(255,255,255,0)"),t.fillStyle=n,t.fillRect(0,0,i,e);const a=t.createLinearGradient(0,0,0,e);a.addColorStop(0,"rgba(0,0,0,0)"),a.addColorStop(1,"rgba(0,0,0,1)"),t.fillStyle=a,t.fillRect(0,0,i,e),this.drawActiveColorFieldColor()}setCanvasContextSize(t,{height:e,width:i}){const n=window.devicePixelRatio||1;t.width=i*n,t.height=e*n,t.style.height=`${e}px`,t.style.width=`${i}px`,t.getContext("2d").scale(n,n)}updateCanvasSize(t){t&&(this.setCanvasContextSize(t,{width:this.dimensions.colorField.width,height:this.dimensions.colorField.height+this.dimensions.slider.height+2*this.getSliderCapSpacing()}),this.drawColorFieldAndSlider())}containsPoint(t,e,i,n,a){return Math.pow(t-i,2)+Math.pow(e-n,2)<=Math.pow(a,2)}drawActiveColorFieldColor(){const{color:t}=this;if(!t)return;const e=t.hsv(),{dimensions:{colorField:{height:i,width:n},thumb:{radius:a}}}=this,s=e.saturationv()/(Z.s/n),r=i-e.value()/(Z.v/i);requestAnimationFrame((()=>{this.colorFieldScopeLeft=s,this.colorFieldScopeTop=r})),this.drawThumb(this.fieldAndSliderRenderingContext,a,s,r,e,this.hueThumbState)}drawThumb(t,e,i,n,a,s){const r=2*Math.PI;t.beginPath(),t.arc(i,n,e,0,r),t.shadowBlur="hover"===s?32:16,t.shadowColor=`rgba(0, 0, 0, ${"drag"===s?.32:.16})`,t.fillStyle="#fff",t.fill(),t.beginPath(),t.arc(i,n,e-3,0,r),t.shadowBlur=0,t.shadowColor="transparent",t.fillStyle=a.rgb().string(),t.fill()}drawActiveHueSliderColor(){const{color:t}=this;if(!t)return;const e=t.hsv().saturationv(100).value(100),{dimensions:{colorField:{height:i},slider:{height:n,width:a},thumb:{radius:s}}}=this,r=e.hue()/(360/a),o=n/2+i;requestAnimationFrame((()=>{this.hueScopeLeft=r,this.hueScopeTop=o})),this.drawThumb(this.fieldAndSliderRenderingContext,s,r,o,e,this.sliderThumbState)}drawHueSlider(){const t=this.fieldAndSliderRenderingContext,{dimensions:{colorField:{height:e},slider:{height:i,width:n}}}=this,a=t.createLinearGradient(0,0,n,0),s=["red","yellow","lime","cyan","blue","magenta","red"],r=1/(s.length-1);let o=0;s.forEach((t=>{a.addColorStop(o,Y(t).string()),o+=r})),t.fillStyle=a,t.clearRect(0,e,n,i+2*this.getSliderCapSpacing()),t.fillRect(0,e,n,i),this.drawActiveHueSliderColor()}updateColorFromChannels(t){this.internalColorSet(Y(t,this.channelMode))}updateChannelsFromColor(t){this.channels=t?this.toChannels(t):[null,null,null]}toChannels(t){const{channelMode:e}=this;return t[e]().array().map((t=>Math.floor(t)))}static get delegatesFocus(){return!0}static get assetsDirs(){return["assets"]}get el(){return n(this)}static get watchers(){return{color:["handleColorChange"],format:["handleFormatChange"],scale:["handleScaleChange"],messageOverrides:["onMessagesChange"],value:["handleValueChange"],effectiveLocale:["effectiveLocaleChange"]}}};it.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:inline-block;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-normal)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([scale=s]) .container{inline-size:160px}:host([scale=s]) .saved-colors{grid-template-columns:repeat(auto-fill, minmax(20px, 1fr))}:host([scale=s]) .channels{flex-direction:column}:host([scale=s]) .channel{inline-size:100%;margin-block-end:4px}:host([scale=s]) .channel:last-child{margin-block-end:0}:host([scale=m]) .container{inline-size:272px}:host([scale=l]) .header{padding-block-end:0px}:host([scale=l]){font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]) .container{inline-size:464px}:host([scale=l]) .color-field-and-slider{margin-block-end:-20px}:host([scale=l]) .section{padding-block:0 16px;padding-inline:16px}:host([scale=l]) .section:first-of-type{padding-block-start:16px}:host([scale=l]) .saved-colors{grid-template-columns:repeat(auto-fill, minmax(28px, 1fr));grid-gap:12px;padding-block-start:16px}:host([scale=l]) .control-section{flex-wrap:nowrap;align-items:baseline}:host([scale=l]) .control-section>:nth-child(2){margin-inline-start:12px}:host([scale=l]) .color-hex-options{display:flex;flex-shrink:1;flex-direction:column;justify-content:space-around;min-block-size:98px;inline-size:160px}:host([scale=l]) .color-mode-container{flex-shrink:3}.container{background-color:var(--calcite-ui-foreground-1);display:inline-block;border:1px solid var(--calcite-ui-border-1)}.color-field-and-slider-wrap{position:relative}.scope{pointer-events:none;position:absolute;font-size:var(--calcite-font-size--1);outline-color:transparent;outline-offset:14px}.scope:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:16px}.color-field-and-slider{margin-block-end:-16px;touch-action:none}.color-field-and-slider--interactive{cursor:pointer}.control-section{display:flex;flex-direction:row;flex-wrap:wrap}.section{padding-block:0 12px;padding-inline:12px}.section:first-of-type{padding-block-start:12px}.color-hex-options,.section--split{flex-grow:1}.header{display:flex;align-items:center;justify-content:space-between;padding-block-end:0.25rem;color:var(--calcite-ui-text-1)}.header--hex,.color-mode-container{padding-block-start:12px}.channels{display:flex;justify-content:space-between}.channel{inline-size:31%}.saved-colors{padding-block-start:12px;display:grid;grid-template-columns:repeat(auto-fill, minmax(24px, 1fr));grid-gap:8px;inline-size:100%}.saved-colors-buttons{display:flex}.saved-color{outline-offset:0;outline-color:transparent;cursor:pointer}.saved-color:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.saved-color:hover{transition:outline-color var(--calcite-internal-animation-timing-fast) ease-in-out;outline:2px solid var(--calcite-ui-border-2);outline-offset:2px}";const nt=Y(),at=class{constructor(i){t(this,i),this.calciteColorPickerHexInputChange=e(this,"calciteColorPickerHexInputChange",6),this.onCalciteInternalInputBlur=()=>{const t=this.inputNode,e=t.value,i=`#${e}`;this.allowEmpty&&!e||d(i)&&m(i)||(t.value=this.allowEmpty&&!this.internalColor?"":this.formatForInternalInput(f(this.internalColor.object())))},this.onInputChange=()=>{this.internalSetValue(this.inputNode.value,this.value)},this.previousNonNullValue=this.value,this.storeInputRef=t=>{this.inputNode=t},this.hexLabel="Hex",this.allowEmpty=!1,this.scale="m",this.value=l(nt.hex()),this.numberingSystem=void 0,this.internalColor=nt}connectedCallback(){const{allowEmpty:t,value:e}=this;if(e){const t=l(e);d(t)&&this.internalSetValue(t,t,!1)}else t&&this.internalSetValue(null,null,!1)}componentWillLoad(){v(this)}componentDidLoad(){w(this)}handleValueChange(t,e){this.internalSetValue(t,e,!1)}onInputKeyDown(t){const{altKey:e,ctrlKey:i,metaKey:n,shiftKey:a}=t,{internalColor:s,value:r}=this,{key:o}=t;if("Tab"===o||"Enter"===o)return void this.onInputChange();const c=this.value;if("ArrowDown"===o||"ArrowUp"===o)return r?(this.internalSetValue(l(this.nudgeRGBChannels(s,(a?10:1)*("ArrowUp"===o?1:-1)).hex()),c),void t.preventDefault()):(this.internalSetValue(this.previousNonNullValue,c),void t.preventDefault());const h=e||i||n,u=1===o.length,d=p.test(o);!u||h||d||t.preventDefault()}onPaste(t){const e=t.clipboardData.getData("text");d(e)&&(t.preventDefault(),this.inputNode.value=e.slice(1))}render(){const{value:t}=this,e=this.formatForInternalInput(t);return i("div",{class:"container"},i("calcite-input",{class:"input",label:this.hexLabel,maxLength:6,numberingSystem:this.numberingSystem,onCalciteInputChange:this.onInputChange,onCalciteInternalInputBlur:this.onCalciteInternalInputBlur,onKeyDown:this.handleKeyDown,onPaste:this.onPaste,prefixText:"#",ref:this.storeInputRef,scale:this.scale,value:e}),e?i("calcite-color-picker-swatch",{active:!0,class:"preview",color:`#${e}`,scale:this.scale}):null)}async setFocus(){await y(this),r(this.inputNode)}internalSetValue(t,e,i=!0){if(t){const e=l(t);if(d(e)){const{internalColor:t}=this,n=!t||e!==l(t.hex());return this.internalColor=Y(e),this.previousNonNullValue=e,this.value=e,void(n&&i&&this.calciteColorPickerHexInputChange.emit())}}else if(this.allowEmpty)return this.internalColor=null,this.value=null,void(i&&this.calciteColorPickerHexInputChange.emit());this.value=e}formatForInternalInput(t){return t?t.replace("#",""):""}nudgeRGBChannels(t,e){return Y.rgb(t.array().map((t=>t+e)))}handleKeyDown(t){"Enter"===t.key&&t.preventDefault()}get el(){return n(this)}static get watchers(){return{value:["handleValueChange"]}}};at.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{display:block}.container{display:inline-grid;inline-size:100%;align-items:center;grid-template-columns:1fr auto}.preview{grid-column:2/3;pointer-events:none;margin-block:0px;margin-inline:0.25rem;display:flex;align-items:center}.preview,.input{grid-row:1}.input{grid-column:1/3;inline-size:100%;text-transform:uppercase}";const st=class{constructor(e){t(this,e),this.active=!1,this.color=void 0,this.scale="m"}handleColorChange(t){this.internalColor=Y(t)}componentWillLoad(){this.handleColorChange(this.color)}render(){const{active:t,el:e,internalColor:n}=this,a=t?"100%":"0",s=n.hex(),r="light"===o(e)?"rgba(0, 0, 0, 0.3)":"rgba(255, 255, 255, 0.15)";return i("svg",{class:"swatch",xmlns:"http://www.w3.org/2000/svg"},i("title",null,s),i("rect",{fill:s,height:"100%",id:"swatch",rx:a,stroke:r,"stroke-width":"2",style:{"clip-path":`inset(0 round ${a})`},width:"100%"}))}get el(){return n(this)}static get watchers(){return{color:["handleColorChange"]}}};st.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{position:relative;display:inline-flex}:host([scale=s]){block-size:1.25rem;inline-size:1.25rem}:host([scale=m]){block-size:1.5rem;inline-size:1.5rem}:host([scale=l]){block-size:2rem;inline-size:2rem}.swatch{overflow:visible;block-size:inherit;inline-size:inherit}.swatch rect{transition-property:all;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.no-color-icon{position:absolute;inset:0px;block-size:100%;inline-size:100%}";export{it as calcite_color_picker,at as calcite_color_picker_hex_input,st as calcite_color_picker_swatch}
|
|
6
|
+
import{r as t,c as e,h as i,g as n}from"./p-384fd5b6.js";import{i as a,b as s,f as r,e as o}from"./p-1e8ee073.js";import{n as l,C as c,p as h,c as u,i as d,a as m,r as f,b as p}from"./p-145d4ac0.js";import{u as g}from"./p-4aadf0a9.js";import{i as b}from"./p-05f99eb2.js";import{c as y,s as v,a as w}from"./p-fa9c60a4.js";import{c as k,d as x}from"./p-064ce29f.js";import{c as M}from"./p-617c3f24.js";import{u as C,s as j,c as z,d as D}from"./p-f4f52a53.js";import{d as F,i as A}from"./p-a50b2d9f.js";import"./p-5b1afa72.js";import"./p-293edc82.js";import"./p-ac7220ea.js";function S(t,e,i){return t(i={path:e,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},i.exports),i.exports}var _={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},O=S((function(t){var e=Array.prototype.concat,i=Array.prototype.slice,n=t.exports=function(t){for(var n,a=[],s=0,r=t.length;s<r;s++){var o=t[s];(n=o)&&"string"!=typeof n&&(n instanceof Array||Array.isArray(n)||n.length>=0&&(n.splice instanceof Function||Object.getOwnPropertyDescriptor(n,n.length-1)&&"String"!==n.constructor.name))?a=e.call(a,i.call(o)):a.push(o)}return a};n.wrap=function(t){return function(){return t(n(arguments))}}})),q=S((function(t){var e=Object.hasOwnProperty,i={};for(var n in _)e.call(_,n)&&(i[_[n]]=n);var a=t.exports={to:{},get:{}};function s(t,e,i){return Math.min(Math.max(e,t),i)}function r(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}a.get=function(t){var e,i;switch(t.substring(0,3).toLowerCase()){case"hsl":e=a.get.hsl(t),i="hsl";break;case"hwb":e=a.get.hwb(t),i="hwb";break;default:e=a.get.rgb(t),i="rgb"}return e?{model:i,value:e}:null},a.get.rgb=function(t){if(!t)return null;var i,n,a,r=[0,0,0,1];if(i=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(a=i[2],i=i[1],n=0;n<3;n++){var o=2*n;r[n]=parseInt(i.slice(o,o+2),16)}a&&(r[3]=parseInt(a,16)/255)}else if(i=t.match(/^#([a-f0-9]{3,4})$/i)){for(a=(i=i[1])[3],n=0;n<3;n++)r[n]=parseInt(i[n]+i[n],16);a&&(r[3]=parseInt(a+a,16)/255)}else if(i=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)r[n]=parseInt(i[n+1],0);i[4]&&(r[3]=i[5]?.01*parseFloat(i[4]):parseFloat(i[4]))}else{if(!(i=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(i=t.match(/^(\w+)$/))?"transparent"===i[1]?[0,0,0,0]:e.call(_,i[1])?((r=_[i[1]])[3]=1,r):null:null;for(n=0;n<3;n++)r[n]=Math.round(2.55*parseFloat(i[n+1]));i[4]&&(r[3]=i[5]?.01*parseFloat(i[4]):parseFloat(i[4]))}for(n=0;n<3;n++)r[n]=s(r[n],0,255);return r[3]=s(r[3],0,1),r},a.get.hsl=function(t){if(!t)return null;var e=t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var i=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,s(parseFloat(e[2]),0,100),s(parseFloat(e[3]),0,100),s(isNaN(i)?1:i,0,1)]}return null},a.get.hwb=function(t){if(!t)return null;var e=t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var i=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,s(parseFloat(e[2]),0,100),s(parseFloat(e[3]),0,100),s(isNaN(i)?1:i,0,1)]}return null},a.to.hex=function(){var t=O(arguments);return"#"+r(t[0])+r(t[1])+r(t[2])+(t[3]<1?r(Math.round(255*t[3])):"")},a.to.rgb=function(){var t=O(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},a.to.rgb.percent=function(){var t=O(arguments),e=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),n=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+i+"%, "+n+"%)":"rgba("+e+"%, "+i+"%, "+n+"%, "+t[3]+")"},a.to.hsl=function(){var t=O(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},a.to.hwb=function(){var t=O(arguments),e="";return t.length>=4&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},a.to.keyword=function(t){return i[t.slice(0,3)]}})),$={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const I={};for(const t of Object.keys($))I[$[t]]=t;const E={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var L=E;for(const t of Object.keys(E)){if(!("channels"in E[t]))throw new Error("missing channels property: "+t);if(!("labels"in E[t]))throw new Error("missing channel labels property: "+t);if(E[t].labels.length!==E[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:i}=E[t];delete E[t].channels,delete E[t].labels,Object.defineProperty(E[t],"channels",{value:e}),Object.defineProperty(E[t],"labels",{value:i})}function N(t,e){return function(i){return e(t(i))}}function K(t,e){const i=[e[t].parent,t];let n=L[e[t].parent][t],a=e[t].parent;for(;e[a].parent;)i.unshift(e[a].parent),n=N(L[e[a].parent][a],n),a=e[a].parent;return n.conversion=i,n}E.rgb.hsl=function(t){const e=t[0]/255,i=t[1]/255,n=t[2]/255,a=Math.min(e,i,n),s=Math.max(e,i,n),r=s-a;let o,l;s===a?o=0:e===s?o=(i-n)/r:i===s?o=2+(n-e)/r:n===s&&(o=4+(e-i)/r),o=Math.min(60*o,360),o<0&&(o+=360);const c=(a+s)/2;return l=s===a?0:c<=.5?r/(s+a):r/(2-s-a),[o,100*l,100*c]},E.rgb.hsv=function(t){let e,i,n,a,s;const r=t[0]/255,o=t[1]/255,l=t[2]/255,c=Math.max(r,o,l),h=c-Math.min(r,o,l),u=function(t){return(c-t)/6/h+.5};return 0===h?(a=0,s=0):(s=h/c,e=u(r),i=u(o),n=u(l),r===c?a=n-i:o===c?a=1/3+e-n:l===c&&(a=2/3+i-e),a<0?a+=1:a>1&&(a-=1)),[360*a,100*s,100*c]},E.rgb.hwb=function(t){const e=t[0],i=t[1];let n=t[2];const a=E.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(i,n));return n=1-1/255*Math.max(e,Math.max(i,n)),[a,100*s,100*n]},E.rgb.cmyk=function(t){const e=t[0]/255,i=t[1]/255,n=t[2]/255,a=Math.min(1-e,1-i,1-n);return[100*((1-e-a)/(1-a)||0),100*((1-i-a)/(1-a)||0),100*((1-n-a)/(1-a)||0),100*a]},E.rgb.keyword=function(t){const e=I[t];if(e)return e;let i,n=1/0;for(const e of Object.keys($)){const r=((a=t)[0]-(s=$[e])[0])**2+(a[1]-s[1])**2+(a[2]-s[2])**2;r<n&&(n=r,i=e)}var a,s;return i},E.keyword.rgb=function(t){return $[t]},E.rgb.xyz=function(t){let e=t[0]/255,i=t[1]/255,n=t[2]/255;return e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,[100*(.4124*e+.3576*i+.1805*n),100*(.2126*e+.7152*i+.0722*n),100*(.0193*e+.1192*i+.9505*n)]},E.rgb.lab=function(t){const e=E.rgb.xyz(t);let i=e[0],n=e[1],a=e[2];return i/=95.047,n/=100,a/=108.883,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,[116*n-16,500*(i-n),200*(n-a)]},E.hsl.rgb=function(t){const e=t[0]/360,i=t[1]/100,n=t[2]/100;let a,s,r;if(0===i)return r=255*n,[r,r,r];a=n<.5?n*(1+i):n+i-n*i;const o=2*n-a,l=[0,0,0];for(let t=0;t<3;t++)s=e+1/3*-(t-1),s<0&&s++,s>1&&s--,r=6*s<1?o+6*(a-o)*s:2*s<1?a:3*s<2?o+(a-o)*(2/3-s)*6:o,l[t]=255*r;return l},E.hsl.hsv=function(t){const e=t[0];let i=t[1]/100,n=t[2]/100,a=i;const s=Math.max(n,.01);return n*=2,i*=n<=1?n:2-n,a*=s<=1?s:2-s,[e,100*(0===n?2*a/(s+a):2*i/(n+i)),(n+i)/2*100]},E.hsv.rgb=function(t){const e=t[0]/60,i=t[1]/100;let n=t[2]/100;const a=Math.floor(e)%6,s=e-Math.floor(e),r=255*n*(1-i),o=255*n*(1-i*s),l=255*n*(1-i*(1-s));switch(n*=255,a){case 0:return[n,l,r];case 1:return[o,n,r];case 2:return[r,n,l];case 3:return[r,o,n];case 4:return[l,r,n];case 5:return[n,r,o]}},E.hsv.hsl=function(t){const e=t[0],i=t[1]/100,n=t[2]/100,a=Math.max(n,.01);let s,r;r=(2-i)*n;const o=(2-i)*a;return s=i*a,s/=o<=1?o:2-o,s=s||0,r/=2,[e,100*s,100*r]},E.hwb.rgb=function(t){const e=t[0]/360;let i=t[1]/100,n=t[2]/100;const a=i+n;let s;a>1&&(i/=a,n/=a);const r=Math.floor(6*e),o=1-n;s=6*e-r,0!=(1&r)&&(s=1-s);const l=i+s*(o-i);let c,h,u;switch(r){default:case 6:case 0:c=o,h=l,u=i;break;case 1:c=l,h=o,u=i;break;case 2:c=i,h=o,u=l;break;case 3:c=i,h=l,u=o;break;case 4:c=l,h=i,u=o;break;case 5:c=o,h=i,u=l}return[255*c,255*h,255*u]},E.cmyk.rgb=function(t){const e=t[1]/100,i=t[2]/100,n=t[3]/100;return[255*(1-Math.min(1,t[0]/100*(1-n)+n)),255*(1-Math.min(1,e*(1-n)+n)),255*(1-Math.min(1,i*(1-n)+n))]},E.xyz.rgb=function(t){const e=t[0]/100,i=t[1]/100,n=t[2]/100;let a,s,r;return a=3.2406*e+-1.5372*i+-.4986*n,s=-.9689*e+1.8758*i+.0415*n,r=.0557*e+-.204*i+1.057*n,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),r=Math.min(Math.max(0,r),1),[255*a,255*s,255*r]},E.xyz.lab=function(t){let e=t[0],i=t[1],n=t[2];return e/=95.047,i/=100,n/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,[116*i-16,500*(e-i),200*(i-n)]},E.lab.xyz=function(t){let e,i,n;i=(t[0]+16)/116,e=t[1]/500+i,n=i-t[2]/200;const a=i**3,s=e**3,r=n**3;return i=a>.008856?a:(i-16/116)/7.787,e=s>.008856?s:(e-16/116)/7.787,n=r>.008856?r:(n-16/116)/7.787,e*=95.047,i*=100,n*=108.883,[e,i,n]},E.lab.lch=function(t){const e=t[0],i=t[1],n=t[2];let a;return a=360*Math.atan2(n,i)/2/Math.PI,a<0&&(a+=360),[e,Math.sqrt(i*i+n*n),a]},E.lch.lab=function(t){const e=t[1],i=t[2]/360*2*Math.PI;return[t[0],e*Math.cos(i),e*Math.sin(i)]},E.rgb.ansi16=function(t,e=null){const[i,n,a]=t;let s=null===e?E.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),0===s)return 30;let r=30+(Math.round(a/255)<<2|Math.round(n/255)<<1|Math.round(i/255));return 2===s&&(r+=60),r},E.hsv.ansi16=function(t){return E.rgb.ansi16(E.hsv.rgb(t),t[2])},E.rgb.ansi256=function(t){const e=t[0],i=t[1],n=t[2];return e===i&&i===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(i/255*5)+Math.round(n/255*5)},E.ansi16.rgb=function(t){let e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];const i=.5*(1+~~(t>50));return[(1&e)*i*255,(e>>1&1)*i*255,(e>>2&1)*i*255]},E.ansi256.rgb=function(t){if(t>=232){const e=10*(t-232)+8;return[e,e,e]}let e;return t-=16,[Math.floor(t/36)/5*255,Math.floor((e=t%36)/6)/5*255,e%6/5*255]},E.rgb.hex=function(t){const e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},E.hex.rgb=function(t){const e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let i=e[0];3===e[0].length&&(i=i.split("").map((t=>t+t)).join(""));const n=parseInt(i,16);return[n>>16&255,n>>8&255,255&n]},E.rgb.hcg=function(t){const e=t[0]/255,i=t[1]/255,n=t[2]/255,a=Math.max(Math.max(e,i),n),s=Math.min(Math.min(e,i),n),r=a-s;let o,l;return o=r<1?s/(1-r):0,l=r<=0?0:a===e?(i-n)/r%6:a===i?2+(n-e)/r:4+(e-i)/r,l/=6,l%=1,[360*l,100*r,100*o]},E.hsl.hcg=function(t){const e=t[1]/100,i=t[2]/100,n=i<.5?2*e*i:2*e*(1-i);let a=0;return n<1&&(a=(i-.5*n)/(1-n)),[t[0],100*n,100*a]},E.hsv.hcg=function(t){const e=t[2]/100,i=t[1]/100*e;let n=0;return i<1&&(n=(e-i)/(1-i)),[t[0],100*i,100*n]},E.hcg.rgb=function(t){const e=t[1]/100,i=t[2]/100;if(0===e)return[255*i,255*i,255*i];const n=[0,0,0],a=t[0]/360%1*6,s=a%1,r=1-s;let o=0;switch(Math.floor(a)){case 0:n[0]=1,n[1]=s,n[2]=0;break;case 1:n[0]=r,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=s;break;case 3:n[0]=0,n[1]=r,n[2]=1;break;case 4:n[0]=s,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=r}return o=(1-e)*i,[255*(e*n[0]+o),255*(e*n[1]+o),255*(e*n[2]+o)]},E.hcg.hsv=function(t){const e=t[1]/100,i=e+t[2]/100*(1-e);let n=0;return i>0&&(n=e/i),[t[0],100*n,100*i]},E.hcg.hsl=function(t){const e=t[1]/100,i=t[2]/100*(1-e)+.5*e;let n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[t[0],100*n,100*i]},E.hcg.hwb=function(t){const e=t[1]/100,i=e+t[2]/100*(1-e);return[t[0],100*(i-e),100*(1-i)]},E.hwb.hcg=function(t){const e=1-t[2]/100,i=e-t[1]/100;let n=0;return i<1&&(n=(e-i)/(1-i)),[t[0],100*i,100*n]},E.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},E.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},E.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},E.gray.hsl=function(t){return[0,0,t[0]]},E.gray.hsv=E.gray.hsl,E.gray.hwb=function(t){return[0,100,t[0]]},E.gray.cmyk=function(t){return[0,0,0,t[0]]},E.gray.lab=function(t){return[t[0],0,0]},E.gray.hex=function(t){const e=255&Math.round(t[0]/100*255),i=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(i.length)+i},E.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};const P={};Object.keys(L).forEach((t=>{P[t]={},Object.defineProperty(P[t],"channels",{value:L[t].channels}),Object.defineProperty(P[t],"labels",{value:L[t].labels});const e=function(t){const e=function(t){const e=function(){const t={},e=Object.keys(L);for(let i=e.length,n=0;n<i;n++)t[e[n]]={distance:-1,parent:null};return t}(),i=[t];for(e[t].distance=0;i.length;){const t=i.pop(),n=Object.keys(L[t]);for(let a=n.length,s=0;s<a;s++){const a=n[s],r=e[a];-1===r.distance&&(r.distance=e[t].distance+1,r.parent=t,i.unshift(a))}}return e}(t),i={},n=Object.keys(e);for(let t=n.length,a=0;a<t;a++){const t=n[a];null!==e[t].parent&&(i[t]=K(t,e))}return i}(t);Object.keys(e).forEach((i=>{const n=e[i];P[t][i]=function(t){const e=function(...e){const i=e[0];if(null==i)return i;i.length>1&&(e=i);const n=t(e);if("object"==typeof n)for(let t=n.length,e=0;e<t;e++)n[e]=Math.round(n[e]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}(n),P[t][i].raw=function(t){const e=function(...e){const i=e[0];return null==i?i:(i.length>1&&(e=i),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(n)}))}));var U=P;const T=["keyword","gray","hex"],H={};for(const t of Object.keys(U))H[[...U[t].labels].sort().join("")]=t;const V={};function J(t,e){if(!(this instanceof J))return new J(t,e);if(e&&e in T&&(e=null),e&&!(e in U))throw new Error("Unknown model: "+e);let i,n;if(null==t)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof J)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=q.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,n=U[this.model].channels,this.color=e.value.slice(0,n),this.valpha="number"==typeof e.value[n]?e.value[n]:1}else if(t.length>0){this.model=e||"rgb",n=U[this.model].channels;const i=Array.prototype.slice.call(t,0,n);this.color=X(i,n),this.valpha="number"==typeof t[n]?t[n]:1}else if("number"==typeof t)this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;const e=Object.keys(t);"alpha"in t&&(e.splice(e.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);const n=e.sort().join("");if(!(n in H))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=H[n];const{labels:a}=U[this.model],s=[];for(i=0;i<a.length;i++)s.push(t[a[i]]);this.color=X(s)}if(V[this.model])for(n=U[this.model].channels,i=0;i<n;i++){const t=V[this.model][i];t&&(this.color[i]=t(this.color[i]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}J.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in q.to?this:this.rgb();e=e.round("number"==typeof t?t:1);const i=1===e.valpha?e.color:[...e.color,this.valpha];return q.to[e.model](i)},percentString(t){const e=this.rgb().round("number"==typeof t?t:1),i=1===e.valpha?e.color:[...e.color,this.valpha];return q.to.rgb.percent(i)},array(){return 1===this.valpha?[...this.color]:[...this.color,this.valpha]},object(){const t={},{channels:e}=U[this.model],{labels:i}=U[this.model];for(let n=0;n<e;n++)t[i[n]]=this.color[n];return 1!==this.valpha&&(t.alpha=this.valpha),t},unitArray(){const t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,1!==this.valpha&&t.push(this.valpha),t},unitObject(){const t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,1!==this.valpha&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new J([...this.color.map(R(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new J([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:W("rgb",0,B(255)),green:W("rgb",1,B(255)),blue:W("rgb",2,B(255)),hue:W(["hsl","hsv","hsl","hwb","hcg"],0,(t=>(t%360+360)%360)),saturationl:W("hsl",1,B(100)),lightness:W("hsl",2,B(100)),saturationv:W("hsv",1,B(100)),value:W("hsv",2,B(100)),chroma:W("hcg",1,B(100)),gray:W("hcg",2,B(100)),white:W("hwb",1,B(100)),wblack:W("hwb",2,B(100)),cyan:W("cmyk",0,B(100)),magenta:W("cmyk",1,B(100)),yellow:W("cmyk",2,B(100)),black:W("cmyk",3,B(100)),x:W("xyz",0,B(95.047)),y:W("xyz",1,B(100)),z:W("xyz",2,B(108.833)),l:W("lab",0,B(100)),a:W("lab",1),b:W("lab",2),keyword(t){return void 0!==t?new J(t):U[this.model].keyword(this.color)},hex(t){return void 0!==t?new J(t):q.to.hex(this.rgb().round().color)},hexa(t){if(void 0!==t)return new J(t);const e=this.rgb().round().color;let i=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===i.length&&(i="0"+i),q.to.hex(e)+i},rgbNumber(){const t=this.rgb().color;return(255&t[0])<<16|(255&t[1])<<8|255&t[2]},luminosity(){const t=this.rgb().color,e=[];for(const[i,n]of t.entries()){const t=n/255;e[i]=t<=.04045?t/12.92:((t+.055)/1.055)**2.4}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){const e=this.luminosity(),i=t.luminosity();return e>i?(e+.05)/(i+.05):(i+.05)/(e+.05)},level(t){const e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){const t=this.rgb().color;return(2126*t[0]+7152*t[1]+722*t[2])/1e4<128},isLight(){return!this.isDark()},negate(){const t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){const e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){const e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){const e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){const e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){const e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){const e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){const t=this.rgb().color,e=.3*t[0]+.59*t[1]+.11*t[2];return J.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){const e=this.hsl();let i=e.color[0];return i=(i+t)%360,i=i<0?360+i:i,e.color[0]=i,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);const i=t.rgb(),n=this.rgb(),a=void 0===e?.5:e,s=2*a-1,r=i.alpha()-n.alpha(),o=((s*r==-1?s:(s+r)/(1+s*r))+1)/2,l=1-o;return J.rgb(o*i.red()+l*n.red(),o*i.green()+l*n.green(),o*i.blue()+l*n.blue(),i.alpha()*a+n.alpha()*(1-a))}};for(const t of Object.keys(U)){if(T.includes(t))continue;const{channels:e}=U[t];J.prototype[t]=function(...e){return this.model===t?new J(this):new J(e.length>0?e:[...(i=U[this.model][t].raw(this.color),Array.isArray(i)?i:[i]),this.valpha],t);var i},J[t]=function(...i){let n=i[0];return"number"==typeof n&&(n=X(i,e)),new J(n,t)}}function R(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function W(t,e,i){t=Array.isArray(t)?t:[t];for(const n of t)(V[n]||(V[n]=[]))[e]=i;return t=t[0],function(n){let a;return void 0!==n?(i&&(n=i(n)),a=this[t](),a.color[e]=n,a):(a=this[t]().color[e],i&&(a=i(a)),a)}}function B(t){return function(e){return Math.max(0,Math.min(t,e))}}function X(t,e){for(let i=0;i<e;i++)"number"!=typeof t[i]&&(t[i]=0);return t}var Y=J;const G=Y("#007AC2"),Q={r:255,g:255,b:255},Z={h:360,s:100,v:100},tt={s:{slider:{height:10,width:160},colorField:{height:80,width:160},thumb:{radius:8}},m:{slider:{height:14,width:272},colorField:{height:150,width:272},thumb:{radius:10}},l:{slider:{height:16,width:464},colorField:{height:200,width:464},thumb:{radius:12}}},et=l(G.hex()),it=class{constructor(n){var r,o,h,u;t(this,n),this.calciteColorPickerChange=e(this,"calciteColorPickerChange",6),this.calciteColorPickerInput=e(this,"calciteColorPickerInput",6),this.colorFieldAndSliderHovered=!1,this.hueThumbState="idle",this.internalColorUpdateContext=null,this.mode=c.HEX,this.shiftKeyChannelAdjustment=0,this.sliderThumbState="idle",this.handleTabActivate=t=>{this.channelMode=t.currentTarget.getAttribute("data-color-mode"),this.updateChannelsFromColor(this.color)},this.handleColorFieldScopeKeyDown=t=>{const{key:e}=t,i={ArrowUp:{x:0,y:-10},ArrowRight:{x:10,y:0},ArrowDown:{x:0,y:10},ArrowLeft:{x:-10,y:0}};i[e]&&(t.preventDefault(),this.scopeOrientation="ArrowDown"===e||"ArrowUp"===e?"vertical":"horizontal",this.captureColorFieldColor(this.colorFieldScopeLeft+i[e].x||0,this.colorFieldScopeTop+i[e].y||0,!1))},this.handleHueScopeKeyDown=t=>{const e=t.shiftKey?10:1,{key:i}=t,n={ArrowUp:1,ArrowRight:1,ArrowDown:-1,ArrowLeft:-1};if(n[i]){t.preventDefault();const a=n[i]*e,s=this.baseColorFieldColor.hue(),r=this.baseColorFieldColor.hue(s+a);this.internalColorSet(r,!1)}},this.handleHexInputChange=t=>{t.stopPropagation();const{allowEmpty:e,color:i}=this,n=t.target.value;!e||n?n!==(i&&l(i.hex()))&&this.internalColorSet(Y(n)):this.internalColorSet(null)},this.handleSavedColorSelect=t=>{this.internalColorSet(Y(t.currentTarget.color))},this.handleChannelInput=t=>{const e=t.currentTarget,i=Number(e.getAttribute("data-channel-index")),n="rgb"===this.channelMode?Q[Object.keys(Q)[i]]:Z[Object.keys(Z)[i]];let a;if(this.allowEmpty&&!e.value)a="";else{const t=Number(e.value)+this.shiftKeyChannelAdjustment;a=M(t,0,n).toString()}e.value=a,e.internalSyncChildElValue()},this.handleChannelChange=t=>{const e=t.currentTarget,i=Number(e.getAttribute("data-channel-index")),n=[...this.channels];if(this.allowEmpty&&!e.value)return this.channels=[null,null,null],void this.internalColorSet(null);n[i]=Number(e.value),this.updateColorFromChannels(n)},this.handleSavedColorKeyDown=t=>{b(t.key)&&(t.preventDefault(),this.handleSavedColorSelect(t))},this.handleColorFieldAndSliderPointerLeave=()=>{this.colorFieldAndSliderInteractive=!1,this.colorFieldAndSliderHovered=!1,"drag"!==this.sliderThumbState&&"drag"!==this.hueThumbState&&(this.hueThumbState="idle",this.sliderThumbState="idle",this.drawColorFieldAndSlider())},this.handleColorFieldAndSliderPointerDown=t=>{if(!a(t))return;const{offsetX:e,offsetY:i}=t,n=this.getCanvasRegion(i);"color-field"===n?(this.hueThumbState="drag",this.captureColorFieldColor(e,i),this.colorFieldScopeNode?.focus()):"slider"===n&&(this.sliderThumbState="drag",this.captureHueSliderColor(e),this.hueScopeNode?.focus()),t.preventDefault(),document.addEventListener("pointermove",this.globalPointerMoveHandler),document.addEventListener("pointerup",this.globalPointerUpHandler,{once:!0}),this.activeColorFieldAndSliderRect=this.fieldAndSliderRenderingContext.canvas.getBoundingClientRect()},this.globalPointerUpHandler=t=>{if(!a(t))return;const e="drag"===this.sliderThumbState||"drag"===this.hueThumbState;this.hueThumbState="idle",this.sliderThumbState="idle",this.activeColorFieldAndSliderRect=null,this.drawColorFieldAndSlider(),e&&this.calciteColorPickerChange.emit()},this.globalPointerMoveHandler=t=>{const{el:e,dimensions:i}=this,n="drag"===this.hueThumbState;if(!e.isConnected||"drag"!==this.sliderThumbState&&!n)return;let a,s;const r=this.activeColorFieldAndSliderRect,{clientX:o,clientY:l}=t;if(this.colorFieldAndSliderHovered)a=o-r.x,s=l-r.y;else{const t=i.colorField.width,e=i.colorField.height,n=i.slider.height;a=o<r.x+t&&o>r.x?o-r.x:o<r.x?0:t-1,s=l<r.y+e+n&&l>r.y?l-r.y:l<r.y?0:e+n}n?this.captureColorFieldColor(a,s,!1):this.captureHueSliderColor(a)},this.handleColorFieldAndSliderPointerEnterOrMove=({offsetX:t,offsetY:e})=>{const{dimensions:{colorField:i,slider:n,thumb:a}}=this;this.colorFieldAndSliderInteractive=e<=i.height+n.height,this.colorFieldAndSliderHovered=!0;const s=this.getCanvasRegion(e);if("color-field"===s){const n=this.hueThumbState,s=this.baseColorFieldColor.hsv(),r=Math.round(s.saturationv()/(Z.s/i.width)),o=Math.round(i.height-s.value()/(Z.v/i.height)),l=this.containsPoint(t,e,r,o,a.radius);let c=!1;"idle"===n&&l?(this.hueThumbState="hover",c=!0):"hover"!==n||l||(this.hueThumbState="idle",c=!0),"drag"!==this.hueThumbState&&c&&this.drawColorFieldAndSlider()}else if("slider"===s){const s=this.baseColorFieldColor.hsv().saturationv(100).value(100),r=this.sliderThumbState,o=Math.round(s.hue()/(360/n.width)),l=Math.round((n.height+this.getSliderCapSpacing())/2)+i.height,c=this.containsPoint(t,e,o,l,a.radius);let h=!1;"idle"===r&&c?(this.sliderThumbState="hover",h=!0):"hover"!==r||c||(this.sliderThumbState="idle",h=!0),"drag"!==this.sliderThumbState&&h&&this.drawColorFieldAndSlider()}},this.storeColorFieldScope=t=>{this.colorFieldScopeNode=t},this.storeHueScope=t=>{this.hueScopeNode=t},this.renderChannelsTabTitle=t=>{const{channelMode:e,messages:n}=this;return i("calcite-tab-title",{class:"color-mode","data-color-mode":t,key:t,onCalciteTabsActivate:this.handleTabActivate,selected:t===e},"rgb"===t?n.rgb:n.hsv)},this.renderChannelsTab=t=>{const{channelMode:e,channels:n,messages:a}=this,r=t===e,o="rgb"===t,l=o?[a.r,a.g,a.b]:[a.h,a.s,a.v],c=o?[a.red,a.green,a.blue]:[a.hue,a.saturation,a.value],h=s(this.el);return i("calcite-tab",{class:"control",key:t,selected:r},i("div",{class:"channels",dir:"ltr"},n.map(((t,e)=>this.renderChannel(t,e,l[e],c[e],h)))))},this.renderChannel=(t,e,n,a,s)=>i("calcite-input",{class:"channel","data-channel-index":e,dir:s,label:a,lang:this.effectiveLocale,numberButtonType:"none",numberingSystem:this.numberingSystem,onCalciteInputChange:this.handleChannelChange,onCalciteInputInput:this.handleChannelInput,onKeyDown:this.handleKeyDown,prefixText:n,scale:"l"===this.scale?"m":"s",type:"number",value:t?.toString()}),this.deleteColor=()=>{const t=this.color.hex();if(!(this.savedColors.indexOf(t)>-1))return;const e=this.savedColors.filter((e=>e!==t));this.savedColors=e,this.storageId&&localStorage.setItem(`calcite-color-${this.storageId}`,JSON.stringify(e))},this.saveColor=()=>{const t=this.color.hex();if(this.savedColors.indexOf(t)>-1)return;const e=[...this.savedColors,t];this.savedColors=e,this.storageId&&localStorage.setItem(`calcite-color-${this.storageId}`,JSON.stringify(e))},this.drawColorFieldAndSlider=(r=()=>{this.fieldAndSliderRenderingContext&&(this.drawColorField(),this.drawHueSlider())},h=!0,u=!0,A(o)&&(h="leading"in o?!!o.leading:h,u="trailing"in o?!!o.trailing:u),F(r,16,{leading:h,maxWait:16,trailing:u})),this.captureColorFieldColor=(t,e,i=!0)=>{const{dimensions:{colorField:{height:n,width:a}}}=this,s=Math.round(Z.s/a*t),r=Math.round(Z.v/n*(n-e));this.internalColorSet(this.baseColorFieldColor.hsv().saturationv(s).value(r),i)},this.initColorFieldAndSlider=t=>{this.fieldAndSliderRenderingContext=t.getContext("2d"),this.updateCanvasSize(t)},this.allowEmpty=!1,this.color=G,this.disabled=!1,this.format="auto",this.hideHex=!1,this.hideChannels=!1,this.hideSaved=!1,this.scale="m",this.storageId=void 0,this.messageOverrides=void 0,this.numberingSystem=void 0,this.value=et,this.defaultMessages=void 0,this.colorFieldAndSliderInteractive=!1,this.channelMode="rgb",this.channels=this.toChannels(G),this.dimensions=tt.m,this.effectiveLocale="",this.messages=void 0,this.savedColors=[],this.colorFieldScopeTop=void 0,this.colorFieldScopeLeft=void 0,this.scopeOrientation=void 0,this.hueScopeLeft=void 0,this.hueScopeTop=void 0}handleColorChange(t,e){this.drawColorFieldAndSlider(),this.updateChannelsFromColor(t),this.previousColor=e}handleFormatChange(t){this.setMode(t),this.internalColorSet(this.color,!1,"internal")}handleScaleChange(t="m"){this.updateDimensions(t),this.updateCanvasSize(this.fieldAndSliderRenderingContext?.canvas)}onMessagesChange(){}handleValueChange(t,e){const{allowEmpty:i,format:n}=this;let a=!1;if(!i||t){const i=h(t);if(!i||"auto"!==n&&i!==n)return this.showIncompatibleColorWarning(t,n),void(this.value=e);a=this.mode!==i,this.setMode(i)}const s="drag"===this.sliderThumbState||"drag"===this.hueThumbState;if("initial"===this.internalColorUpdateContext)return;if("user-interaction"===this.internalColorUpdateContext)return this.calciteColorPickerInput.emit(),void(s||this.calciteColorPickerChange.emit());const r=i&&!t?null:Y(t),o=!u(r,this.color);(a||o)&&this.internalColorSet(r,!0,"internal")}get baseColorFieldColor(){return this.color||this.previousColor||G}effectiveLocaleChange(){C(this,this.effectiveLocale)}handleChannelKeyUpOrDown(t){this.shiftKeyChannelAdjustment=0;const{key:e}=t;if("ArrowUp"!==e&&"ArrowDown"!==e||!t.composedPath().some((t=>t.classList?.contains("channel"))))return;const{shiftKey:i}=t;if(t.preventDefault(),!this.color)return this.internalColorSet(this.previousColor),void t.stopPropagation();this.shiftKeyChannelAdjustment="ArrowUp"===e&&i?9:"ArrowDown"===e&&i?-9:0}async setFocus(){await y(this),this.el.focus()}async componentWillLoad(){v(this);const{allowEmpty:t,color:e,format:i,value:n}=this,a=t&&!n,s=h(n),r=a||"auto"===i&&s||i===s,o=a?null:r?Y(n):e;r||this.showIncompatibleColorWarning(n,i),this.setMode(i),this.internalColorSet(o,!1,"initial"),this.updateDimensions(this.scale);const l=`calcite-color-${this.storageId}`;this.storageId&&localStorage.getItem(l)&&(this.savedColors=JSON.parse(localStorage.getItem(l))),await j(this)}connectedCallback(){k(this),z(this)}componentDidLoad(){w(this)}disconnectedCallback(){document.removeEventListener("pointermove",this.globalPointerMoveHandler),document.removeEventListener("pointerup",this.globalPointerUpHandler),x(this),D(this)}componentDidRender(){g(this)}render(){const{allowEmpty:t,color:e,messages:n,hideHex:a,hideChannels:s,hideSaved:r,savedColors:o,scale:l}=this,c=e?e.hex():null,h="l"===l?"m":"s",{colorFieldAndSliderInteractive:u,colorFieldScopeTop:d,colorFieldScopeLeft:m,hueScopeLeft:f,hueScopeTop:p,scopeOrientation:g,dimensions:{colorField:{height:b,width:y},slider:{height:v}}}=this,w=p??v/2+b,k=f??y*G.hue()/Z.h,x=null===e,M="vertical"===g;return i("div",{class:"container"},i("div",{class:"color-field-and-slider-wrap"},i("canvas",{class:{"color-field-and-slider":!0,"color-field-and-slider--interactive":u},onPointerDown:this.handleColorFieldAndSliderPointerDown,onPointerEnter:this.handleColorFieldAndSliderPointerEnterOrMove,onPointerLeave:this.handleColorFieldAndSliderPointerLeave,onPointerMove:this.handleColorFieldAndSliderPointerEnterOrMove,ref:this.initColorFieldAndSlider}),i("div",{"aria-label":M?n.value:n.saturation,"aria-valuemax":M?Z.v:Z.s,"aria-valuemin":"0","aria-valuenow":(M?e?.saturationv():e?.value())||"0",class:{scope:!0,"scope--color-field":!0},onKeyDown:this.handleColorFieldScopeKeyDown,ref:this.storeColorFieldScope,role:"slider",style:{top:`${d||0}px`,left:`${m||0}px`},tabindex:"0"}),i("div",{"aria-label":n.hue,"aria-valuemax":Z.h,"aria-valuemin":"0","aria-valuenow":e?.round().hue()||G.round().hue(),class:{scope:!0,"scope--hue":!0},onKeyDown:this.handleHueScopeKeyDown,ref:this.storeHueScope,role:"slider",style:{top:`${w}px`,left:`${k}px`},tabindex:"0"})),a&&s?null:i("div",{class:{"control-section":!0,section:!0}},a?null:i("div",{class:"color-hex-options"},i("span",{class:{header:!0,"header--hex":!0}},n.hex),i("calcite-color-picker-hex-input",{allowEmpty:t,class:"control",hexLabel:n.hex,numberingSystem:this.numberingSystem,onCalciteColorPickerHexInputChange:this.handleHexInputChange,scale:h,value:c})),s?null:i("calcite-tabs",{class:{"color-mode-container":!0,"section--split":!0},scale:h},i("calcite-tab-nav",{slot:"title-group"},this.renderChannelsTabTitle("rgb"),this.renderChannelsTabTitle("hsv")),this.renderChannelsTab("rgb"),this.renderChannelsTab("hsv"))),r?null:i("div",{class:{"saved-colors-section":!0,section:!0}},i("div",{class:"header"},i("label",null,n.saved),i("div",{class:"saved-colors-buttons"},i("calcite-button",{appearance:"transparent",class:"delete-color",disabled:x,iconStart:"minus",kind:"neutral",label:n.deleteColor,onClick:this.deleteColor,scale:h,type:"button"}),i("calcite-button",{appearance:"transparent",class:"save-color",disabled:x,iconStart:"plus",kind:"neutral",label:n.saveColor,onClick:this.saveColor,scale:h,type:"button"}))),o.length>0?i("div",{class:"saved-colors"},[...o.map((t=>i("calcite-color-picker-swatch",{active:c===t,class:"saved-color",color:t,key:t,onClick:this.handleSavedColorSelect,onKeyDown:this.handleSavedColorKeyDown,scale:l,tabIndex:0})))]):null))}handleKeyDown(t){"Enter"===t.key&&t.preventDefault()}showIncompatibleColorWarning(t,e){console.warn(`ignoring color value (${t}) as it is not compatible with the current format (${e})`)}setMode(t){this.mode="auto"===t?this.mode:t}captureHueSliderColor(t){const{dimensions:{slider:{width:e}}}=this;this.internalColorSet(this.baseColorFieldColor.hue(360/e*t),!1)}getCanvasRegion(t){const{dimensions:{colorField:{height:e},slider:{height:i}}}=this;return t<=e?"color-field":t<=e+i?"slider":"none"}internalColorSet(t,e=!0,i="user-interaction"){e&&u(t,this.color)||(this.internalColorUpdateContext=i,this.color=t,this.value=this.toValue(t),this.internalColorUpdateContext=null)}toValue(t,e=this.mode){if(!t)return null;if(e.includes("hex"))return l(t.round().hex());if(e.includes("-css"))return t[e.replace("-css","").replace("a","")]().round().string();const i=t[e]().round().object();return e.endsWith("a")&&(i.a=i.alpha,delete i.alpha),i}getSliderCapSpacing(){const{dimensions:{slider:{height:t},thumb:{radius:e}}}=this;return 2*e-t}updateDimensions(t="m"){this.dimensions=tt[t]}drawColorField(){const t=this.fieldAndSliderRenderingContext,{dimensions:{colorField:{height:e,width:i}}}=this;t.fillStyle=this.baseColorFieldColor.hsv().saturationv(100).value(100).string(),t.fillRect(0,0,i,e);const n=t.createLinearGradient(0,0,i,0);n.addColorStop(0,"rgba(255,255,255,1)"),n.addColorStop(1,"rgba(255,255,255,0)"),t.fillStyle=n,t.fillRect(0,0,i,e);const a=t.createLinearGradient(0,0,0,e);a.addColorStop(0,"rgba(0,0,0,0)"),a.addColorStop(1,"rgba(0,0,0,1)"),t.fillStyle=a,t.fillRect(0,0,i,e),this.drawActiveColorFieldColor()}setCanvasContextSize(t,{height:e,width:i}){const n=window.devicePixelRatio||1;t.width=i*n,t.height=e*n,t.style.height=`${e}px`,t.style.width=`${i}px`,t.getContext("2d").scale(n,n)}updateCanvasSize(t){t&&(this.setCanvasContextSize(t,{width:this.dimensions.colorField.width,height:this.dimensions.colorField.height+this.dimensions.slider.height+2*this.getSliderCapSpacing()}),this.drawColorFieldAndSlider())}containsPoint(t,e,i,n,a){return Math.pow(t-i,2)+Math.pow(e-n,2)<=Math.pow(a,2)}drawActiveColorFieldColor(){const{color:t}=this;if(!t)return;const e=t.hsv(),{dimensions:{colorField:{height:i,width:n},thumb:{radius:a}}}=this,s=e.saturationv()/(Z.s/n),r=i-e.value()/(Z.v/i);requestAnimationFrame((()=>{this.colorFieldScopeLeft=s,this.colorFieldScopeTop=r})),this.drawThumb(this.fieldAndSliderRenderingContext,a,s,r,e,this.hueThumbState)}drawThumb(t,e,i,n,a,s){const r=2*Math.PI;t.beginPath(),t.arc(i,n,e,0,r),t.shadowBlur="hover"===s?32:16,t.shadowColor=`rgba(0, 0, 0, ${"drag"===s?.32:.16})`,t.fillStyle="#fff",t.fill(),t.beginPath(),t.arc(i,n,e-3,0,r),t.shadowBlur=0,t.shadowColor="transparent",t.fillStyle=a.rgb().string(),t.fill()}drawActiveHueSliderColor(){const{color:t}=this;if(!t)return;const e=t.hsv().saturationv(100).value(100),{dimensions:{colorField:{height:i},slider:{height:n,width:a},thumb:{radius:s}}}=this,r=e.hue()/(360/a),o=n/2+i;requestAnimationFrame((()=>{this.hueScopeLeft=r,this.hueScopeTop=o})),this.drawThumb(this.fieldAndSliderRenderingContext,s,r,o,e,this.sliderThumbState)}drawHueSlider(){const t=this.fieldAndSliderRenderingContext,{dimensions:{colorField:{height:e},slider:{height:i,width:n}}}=this,a=t.createLinearGradient(0,0,n,0),s=["red","yellow","lime","cyan","blue","magenta","red"],r=1/(s.length-1);let o=0;s.forEach((t=>{a.addColorStop(o,Y(t).string()),o+=r})),t.fillStyle=a,t.clearRect(0,e,n,i+2*this.getSliderCapSpacing()),t.fillRect(0,e,n,i),this.drawActiveHueSliderColor()}updateColorFromChannels(t){this.internalColorSet(Y(t,this.channelMode))}updateChannelsFromColor(t){this.channels=t?this.toChannels(t):[null,null,null]}toChannels(t){const{channelMode:e}=this;return t[e]().array().map((t=>Math.floor(t)))}static get delegatesFocus(){return!0}static get assetsDirs(){return["assets"]}get el(){return n(this)}static get watchers(){return{color:["handleColorChange"],format:["handleFormatChange"],scale:["handleScaleChange"],messageOverrides:["onMessagesChange"],value:["handleValueChange"],effectiveLocale:["effectiveLocaleChange"]}}};it.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:inline-block;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-normal)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([scale=s]) .container{inline-size:160px}:host([scale=s]) .saved-colors{grid-template-columns:repeat(auto-fill, minmax(20px, 1fr))}:host([scale=s]) .channels{flex-direction:column}:host([scale=s]) .channel{inline-size:100%;margin-block-end:4px}:host([scale=s]) .channel:last-child{margin-block-end:0}:host([scale=m]) .container{inline-size:272px}:host([scale=l]) .header{padding-block-end:0px}:host([scale=l]){font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]) .container{inline-size:464px}:host([scale=l]) .color-field-and-slider{margin-block-end:-20px}:host([scale=l]) .section{padding-block:0 16px;padding-inline:16px}:host([scale=l]) .section:first-of-type{padding-block-start:16px}:host([scale=l]) .saved-colors{grid-template-columns:repeat(auto-fill, minmax(28px, 1fr));grid-gap:12px;padding-block-start:16px}:host([scale=l]) .control-section{flex-wrap:nowrap;align-items:baseline}:host([scale=l]) .control-section>:nth-child(2){margin-inline-start:12px}:host([scale=l]) .color-hex-options{display:flex;flex-shrink:1;flex-direction:column;justify-content:space-around;min-block-size:98px;inline-size:160px}:host([scale=l]) .color-mode-container{flex-shrink:3}.container{background-color:var(--calcite-ui-foreground-1);display:inline-block;border:1px solid var(--calcite-ui-border-1)}.color-field-and-slider-wrap{position:relative}.scope{pointer-events:none;position:absolute;font-size:var(--calcite-font-size--1);outline-color:transparent;outline-offset:14px}.scope:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:16px}.color-field-and-slider{margin-block-end:-16px;touch-action:none}.color-field-and-slider--interactive{cursor:pointer}.control-section{display:flex;flex-direction:row;flex-wrap:wrap}.section{padding-block:0 12px;padding-inline:12px}.section:first-of-type{padding-block-start:12px}.color-hex-options,.section--split{flex-grow:1}.header{display:flex;align-items:center;justify-content:space-between;padding-block-end:0.25rem;color:var(--calcite-ui-text-1)}.header--hex,.color-mode-container{padding-block-start:12px}.channels{display:flex;justify-content:space-between}.channel{inline-size:31%}.saved-colors{padding-block-start:12px;display:grid;grid-template-columns:repeat(auto-fill, minmax(24px, 1fr));grid-gap:8px;inline-size:100%}.saved-colors-buttons{display:flex}.saved-color{outline-offset:0;outline-color:transparent;cursor:pointer}.saved-color:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.saved-color:hover{transition:outline-color var(--calcite-internal-animation-timing-fast) ease-in-out;outline:2px solid var(--calcite-ui-border-2);outline-offset:2px}";const nt=Y(),at=class{constructor(i){t(this,i),this.calciteColorPickerHexInputChange=e(this,"calciteColorPickerHexInputChange",6),this.onCalciteInternalInputBlur=()=>{const t=this.inputNode,e=t.value,i=`#${e}`;this.allowEmpty&&!e||d(i)&&m(i)||(t.value=this.allowEmpty&&!this.internalColor?"":this.formatForInternalInput(f(this.internalColor.object())))},this.onInputChange=()=>{this.internalSetValue(this.inputNode.value,this.value)},this.previousNonNullValue=this.value,this.storeInputRef=t=>{this.inputNode=t},this.hexLabel="Hex",this.allowEmpty=!1,this.scale="m",this.value=l(nt.hex()),this.numberingSystem=void 0,this.internalColor=nt}connectedCallback(){const{allowEmpty:t,value:e}=this;if(e){const t=l(e);d(t)&&this.internalSetValue(t,t,!1)}else t&&this.internalSetValue(null,null,!1)}componentWillLoad(){v(this)}componentDidLoad(){w(this)}handleValueChange(t,e){this.internalSetValue(t,e,!1)}onInputKeyDown(t){const{altKey:e,ctrlKey:i,metaKey:n,shiftKey:a}=t,{internalColor:s,value:r}=this,{key:o}=t;if("Tab"===o||"Enter"===o)return void this.onInputChange();const c=this.value;if("ArrowDown"===o||"ArrowUp"===o)return r?(this.internalSetValue(l(this.nudgeRGBChannels(s,(a?10:1)*("ArrowUp"===o?1:-1)).hex()),c),void t.preventDefault()):(this.internalSetValue(this.previousNonNullValue,c),void t.preventDefault());const h=e||i||n,u=1===o.length,d=p.test(o);!u||h||d||t.preventDefault()}onPaste(t){const e=t.clipboardData.getData("text");d(e)&&(t.preventDefault(),this.inputNode.value=e.slice(1))}render(){const{value:t}=this,e=this.formatForInternalInput(t);return i("div",{class:"container"},i("calcite-input",{class:"input",label:this.hexLabel,maxLength:6,numberingSystem:this.numberingSystem,onCalciteInputChange:this.onInputChange,onCalciteInternalInputBlur:this.onCalciteInternalInputBlur,onKeyDown:this.handleKeyDown,onPaste:this.onPaste,prefixText:"#",ref:this.storeInputRef,scale:this.scale,value:e}),e?i("calcite-color-picker-swatch",{active:!0,class:"preview",color:`#${e}`,scale:this.scale}):null)}async setFocus(){await y(this),r(this.inputNode)}internalSetValue(t,e,i=!0){if(t){const e=l(t);if(d(e)){const{internalColor:t}=this,n=!t||e!==l(t.hex());return this.internalColor=Y(e),this.previousNonNullValue=e,this.value=e,void(n&&i&&this.calciteColorPickerHexInputChange.emit())}}else if(this.allowEmpty)return this.internalColor=null,this.value=null,void(i&&this.calciteColorPickerHexInputChange.emit());this.value=e}formatForInternalInput(t){return t?t.replace("#",""):""}nudgeRGBChannels(t,e){return Y.rgb(t.array().map((t=>t+e)))}handleKeyDown(t){"Enter"===t.key&&t.preventDefault()}get el(){return n(this)}static get watchers(){return{value:["handleValueChange"]}}};at.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{display:block}.container{display:inline-grid;inline-size:100%;align-items:center;grid-template-columns:1fr auto}.preview{grid-column:2/3;pointer-events:none;margin-block:0px;margin-inline:0.25rem;display:flex;align-items:center}.preview,.input{grid-row:1}.input{grid-column:1/3;inline-size:100%;text-transform:uppercase}";const st=class{constructor(e){t(this,e),this.active=!1,this.color=void 0,this.scale="m"}handleColorChange(t){this.internalColor=Y(t)}componentWillLoad(){this.handleColorChange(this.color)}render(){const{active:t,el:e,internalColor:n}=this,a=t?"100%":"0",s=n.hex(),r="light"===o(e)?"rgba(0, 0, 0, 0.3)":"rgba(255, 255, 255, 0.15)";return i("svg",{class:"swatch",xmlns:"http://www.w3.org/2000/svg"},i("title",null,s),i("rect",{fill:s,height:"100%",id:"swatch",rx:a,stroke:r,"stroke-width":"2",style:{"clip-path":`inset(0 round ${a})`},width:"100%"}))}get el(){return n(this)}static get watchers(){return{color:["handleColorChange"]}}};st.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{position:relative;display:inline-flex}:host([scale=s]){block-size:1.25rem;inline-size:1.25rem}:host([scale=m]){block-size:1.5rem;inline-size:1.5rem}:host([scale=l]){block-size:2rem;inline-size:2rem}.swatch{overflow:visible;block-size:inherit;inline-size:inherit}.swatch rect{transition-property:all;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.no-color-icon{position:absolute;inset:0px;block-size:100%;inline-size:100%}";export{it as calcite_color_picker,at as calcite_color_picker_hex_input,st as calcite_color_picker_swatch}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.
|
|
4
|
+
* v1.0.8-next.0
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,h as a,g as e}from"./p-9e413c06.js";import{c as n}from"./p-3d497b7d.js";import{s as o,r as i}from"./p-ddf76e54.js";import{u as r}from"./p-644998ab.js";import{c,d as s,g as l}from"./p-d3a5b453.js";import{s as d,a as u,c as p}from"./p-dc200732.js";import{c as h,d as b}from"./p-5d59d6b8.js";import{c as v}from"./p-2d3b1298.js";import{c as g,d as m,s as k,u as f}from"./p-251f2a5e.js";import"./p-1a0f4b4a.js";import"./p-129976f3.js";import"./p-243b7920.js";!function(t){function a(t,a,e){throw new t("Failed to execute 'requestSubmit' on 'HTMLFormElement': "+a+".",e)}"function"!=typeof t.requestSubmit&&(t.requestSubmit=function(t){t?(function(t,e){t instanceof HTMLElement||a(TypeError,"parameter 1 is not of type 'HTMLElement'"),"submit"==t.type||a(TypeError,"The specified element is not a submit button"),t.form==e||a(DOMException,"The specified element is not owned by this form element","NotFoundError")}(t,this),t.click()):((t=document.createElement("input")).type="submit",t.hidden=!0,this.appendChild(t),t.click(),this.removeChild(t))})}(HTMLFormElement.prototype);const x=class{constructor(a){t(this,a),this.mutationObserver=v("mutation",(()=>this.updateHasContent())),this.handleClick=()=>{const{type:t}=this;this.href||("submit"===t?o(this):"reset"===t&&i(this))},this.alignment="center",this.appearance="solid",this.label=void 0,this.kind="brand",this.disabled=!1,this.href=void 0,this.iconEnd=void 0,this.iconFlipRtl=void 0,this.iconStart=void 0,this.loading=!1,this.name=void 0,this.rel=void 0,this.round=!1,this.scale="m",this.splitChild=!1,this.target=void 0,this.type="button",this.width="auto",this.messages=void 0,this.messageOverrides=void 0,this.hasContent=!1,this.hasLoader=!1,this.effectiveLocale="",this.defaultMessages=void 0}loadingChanged(t,a){t&&!a&&(this.hasLoader=!0),!t&&a&&window.setTimeout((()=>{this.hasLoader=!1}),300)}onMessagesChange(){}async connectedCallback(){h(this),g(this),this.hasLoader=this.loading,this.setupTextContentObserver(),c(this),this.formEl=n(this.el,"form")}disconnectedCallback(){this.mutationObserver?.disconnect(),s(this),b(this),m(this),this.formEl=null}async componentWillLoad(){d(this),this.updateHasContent(),await k(this)}componentDidLoad(){u(this)}componentDidRender(){r(this)}render(){const t=this.href?"a":"button",e=t,n=this.hasLoader?a("div",{class:"calcite-button--loader"},a("calcite-loader",{class:this.loading?"loading-in":"loading-out",inline:!0,label:this.messages.loading,scale:"l"===this.scale?"m":"s"})):null,o=!this.iconStart&&!this.iconEnd,i=a("calcite-icon",{class:{icon:!0,"icon--start":!0},flipRtl:"start"===this.iconFlipRtl||"both"===this.iconFlipRtl,icon:this.iconStart,scale:"l"===this.scale?"m":"s"}),r=a("calcite-icon",{class:{icon:!0,"icon--end":!0},flipRtl:"end"===this.iconFlipRtl||"both"===this.iconFlipRtl,icon:this.iconEnd,scale:"l"===this.scale?"m":"s"}),c=a("span",{class:"content"},a("slot",null));return a(e,{"aria-label":l(this),class:{"button-padding":o,"button-padding--shrunk":!o,"content--slotted":this.hasContent,"icon-start-empty":!this.iconStart,"icon-end-empty":!this.iconEnd},disabled:this.disabled||this.loading,href:"a"===t&&this.href,name:"button"===t&&this.name,onClick:this.handleClick,ref:t=>this.childEl=t,rel:"a"===t&&this.rel,tabIndex:this.disabled||this.loading?-1:null,target:"a"===t&&this.target,type:"button"===t&&this.type},n,this.iconStart?i:null,this.hasContent?c:null,this.iconEnd?r:null)}async setFocus(){await p(this),this.childEl?.focus()}effectiveLocaleChange(){f(this,this.effectiveLocale)}updateHasContent(){const t=this.el.textContent.trim().length>0||this.el.childNodes.length>0;this.hasContent=1===this.el.childNodes.length&&"#text"===this.el.childNodes[0]?.nodeName?this.el.textContent?.trim().length>0:t}setupTextContentObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}onLabelClick(){this.handleClick(),this.setFocus()}static get assetsDirs(){return["assets"]}get el(){return e(this)}static get watchers(){return{loading:["loadingChanged"],messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}};x.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:inline-block;inline-size:auto;vertical-align:middle}:host([round]){border-radius:50px}:host([round]) a,:host([round]) button{border-radius:50px}:host button,:host a{outline-color:transparent}:host button:focus,:host a:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}:host button,:host a{--calcite-button-content-margin-internal:0.5rem;--calcite-button-padding-x-internal:7px;--calcite-button-padding-y-internal:3px;padding-block:var(--calcite-button-padding-y-internal);padding-inline:var(--calcite-button-padding-x-internal);position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-appearance:none;appearance:none;align-items:center;justify-content:center;border-radius:0px;border-style:none;text-align:center;font-family:inherit;font-weight:var(--calcite-font-weight-normal);text-decoration-line:none;transition:color var(--calcite-animation-timing) ease-in-out, background-color var(--calcite-animation-timing) ease-in-out, box-shadow var(--calcite-animation-timing) ease-in-out, outline-color var(--calcite-internal-animation-timing-fast) ease-in-out}:host button:hover,:host a:hover{text-decoration-line:none}.content{display:flex;flex-basis:auto;margin-inline:var(--calcite-button-content-margin-internal)}.icon-start-empty .content{margin-inline-start:unset}.icon-end-empty .content{margin-inline-end:unset}:host([scale=m]) button,:host([scale=m]) a{--calcite-button-content-margin-internal:0.75rem}:host([scale=l]) button,:host([scale=l]) a{--calcite-button-content-margin-internal:1rem}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}:host([alignment=center]:not([width=auto])) a,:host([alignment=center]:not([width=auto])) button{justify-content:center}:host([alignment=start]:not([width=auto])) a,:host([alignment=start]:not([width=auto])) button{justify-content:flex-start}:host([alignment=end]:not([width=auto])) a,:host([alignment=end]:not([width=auto])) button{justify-content:flex-end}:host([alignment*=space-between]:not([width=auto])) a,:host([alignment*=space-between]:not([width=auto])) button{justify-content:space-between}:host([alignment=icon-start-space-between]:not([width=auto])) .icon--start{margin-inline-end:auto}:host([alignment=icon-start-space-between]:not([width=auto])) a,:host([alignment=icon-start-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=icon-end-space-between]:not([width=auto])) .icon--end{margin-inline-start:auto}:host([alignment=icon-end-space-between]:not([width=auto])) a,:host([alignment=icon-end-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=center]) a:not(.content--slotted) .icon--start+.icon--end,:host([alignment=center]) button:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:var(--calcite-button-content-margin-internal)}.icon{position:relative;margin:0px;display:inline-flex;font-weight:var(--calcite-font-weight-normal);line-height:inherit}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([loading]){pointer-events:none}:host([loading]) button,:host([loading]) a{pointer-events:none;opacity:var(--calcite-ui-opacity-disabled)}@keyframes loader-in{0%{inline-size:0;opacity:0;transform:scale(0.5)}100%{inline-size:1em;opacity:1;transform:scale(1)}}@keyframes loader-out{0%{inline-size:1em;opacity:1;transform:scale(1)}100%{inline-size:0;opacity:0;transform:scale(0.5)}}.calcite-button--loader{display:flex}.calcite-button--loader calcite-loader{margin:0px;transition:inline-size var(--calcite-internal-animation-timing-slow) ease-in-out, opacity var(--calcite-internal-animation-timing-slow) ease-in-out, transform var(--calcite-internal-animation-timing-slow) ease-in-out}.calcite-button--loader calcite-loader.loading-in{animation-name:loader-in;animation-duration:var(--calcite-internal-animation-timing-slow)}.calcite-button--loader calcite-loader.loading-out{animation-name:loader-out;animation-duration:var(--calcite-internal-animation-timing-slow)}:host([loading]) button.content--slotted .calcite-button--loader calcite-loader,:host([loading]) a.content--slotted .calcite-button--loader calcite-loader{margin-inline-end:var(--calcite-button-content-margin-internal)}:host([loading]) button:not(.content--slotted) .icon--start,:host([loading]) button:not(.content--slotted) .icon--end,:host([loading]) a:not(.content--slotted) .icon--start,:host([loading]) a:not(.content--slotted) .icon--end{display:none}:host([appearance]) button,:host([appearance]) a{border-width:1px;border-style:solid;border-color:transparent}:host([kind=brand]) button,:host([kind=brand]) a{background-color:var(--calcite-ui-brand);color:var(--calcite-ui-text-inverse)}:host([kind=brand]) button:hover,:host([kind=brand]) button:focus,:host([kind=brand]) a:hover,:host([kind=brand]) a:focus{background-color:var(--calcite-ui-brand-hover)}:host([kind=brand]) button:active,:host([kind=brand]) a:active{background-color:var(--calcite-ui-brand-press)}:host([kind=brand]) button calcite-loader,:host([kind=brand]) a calcite-loader{color:var(--calcite-ui-text-inverse)}:host([kind=danger]) button,:host([kind=danger]) a{background-color:var(--calcite-ui-danger);color:var(--calcite-ui-text-inverse)}:host([kind=danger]) button:hover,:host([kind=danger]) button:focus,:host([kind=danger]) a:hover,:host([kind=danger]) a:focus{background-color:var(--calcite-ui-danger-hover)}:host([kind=danger]) button:active,:host([kind=danger]) a:active{background-color:var(--calcite-ui-danger-press)}:host([kind=danger]) button calcite-loader,:host([kind=danger]) a calcite-loader{color:var(--calcite-ui-text-inverse)}:host([kind=neutral]) button,:host([kind=neutral]) a{background-color:var(--calcite-ui-foreground-3);color:var(--calcite-ui-text-1)}:host([kind=neutral]) button:hover,:host([kind=neutral]) button:focus,:host([kind=neutral]) a:hover,:host([kind=neutral]) a:focus{background-color:var(--calcite-ui-foreground-2)}:host([kind=neutral]) button:active,:host([kind=neutral]) a:active{background-color:var(--calcite-ui-foreground-1)}:host([kind=neutral]) button calcite-loader,:host([kind=neutral]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([kind=inverse]) button,:host([kind=inverse]) a{color:var(--calcite-ui-text-inverse);background-color:var(--calcite-ui-inverse)}:host([kind=inverse]) button:hover,:host([kind=inverse]) button:focus,:host([kind=inverse]) a:hover,:host([kind=inverse]) a:focus{background-color:var(--calcite-ui-inverse-hover)}:host([kind=inverse]) button:active,:host([kind=inverse]) a:active{background-color:var(--calcite-ui-inverse-press)}:host([kind=inverse]) button calcite-loader,:host([kind=inverse]) a calcite-loader{color:var(--calcite-ui-text-inverse)}:host([appearance=outline-fill]) button,:host([appearance=outline-fill]) a{border-width:1px;border-style:solid;background-color:var(--calcite-ui-foreground-1);box-shadow:inset 0 0 0 1px transparent}:host([appearance=outline-fill][kind=brand]) button,:host([appearance=outline-fill][kind=brand]) a{border-color:var(--calcite-ui-brand);background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-brand)}:host([appearance=outline-fill][kind=brand]) button:hover,:host([appearance=outline-fill][kind=brand]) a:hover{border-color:var(--calcite-ui-brand-hover);color:var(--calcite-ui-brand-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand-hover)}:host([appearance=outline-fill][kind=brand]) button:focus,:host([appearance=outline-fill][kind=brand]) a:focus{border-color:var(--calcite-ui-brand);color:var(--calcite-ui-brand);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}:host([appearance=outline-fill][kind=brand]) button:active,:host([appearance=outline-fill][kind=brand]) a:active{border-color:var(--calcite-ui-brand-press);color:var(--calcite-ui-brand-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand-press)}:host([appearance=outline-fill][kind=brand]) button calcite-loader,:host([appearance=outline-fill][kind=brand]) a calcite-loader{color:var(--calcite-ui-brand)}:host([appearance=outline-fill][kind=danger]) button,:host([appearance=outline-fill][kind=danger]) a{border-color:var(--calcite-ui-danger);background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-danger)}:host([appearance=outline-fill][kind=danger]) button:hover,:host([appearance=outline-fill][kind=danger]) a:hover{border-color:var(--calcite-ui-danger-hover);color:var(--calcite-ui-danger-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-danger-hover)}:host([appearance=outline-fill][kind=danger]) button:focus,:host([appearance=outline-fill][kind=danger]) a:focus{border-color:var(--calcite-ui-danger);color:var(--calcite-ui-danger);box-shadow:inset 0 0 0 2px var(--calcite-ui-danger)}:host([appearance=outline-fill][kind=danger]) button:active,:host([appearance=outline-fill][kind=danger]) a:active{border-color:var(--calcite-ui-danger-press);color:var(--calcite-ui-danger-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-danger-press)}:host([appearance=outline-fill][kind=danger]) button calcite-loader,:host([appearance=outline-fill][kind=danger]) a calcite-loader{color:var(--calcite-ui-danger)}:host([appearance=outline-fill][kind=neutral]) button,:host([appearance=outline-fill][kind=neutral]) a{background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-foreground-3)}:host([appearance=outline-fill][kind=neutral]) button:hover,:host([appearance=outline-fill][kind=neutral]) a:hover{box-shadow:inset 0 0 0 1px var(--calcite-ui-foreground-3)}:host([appearance=outline-fill][kind=neutral]) button:focus,:host([appearance=outline-fill][kind=neutral]) a:focus{box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-3)}:host([appearance=outline-fill][kind=neutral]) button:active,:host([appearance=outline-fill][kind=neutral]) a:active{box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-3)}:host([appearance=outline-fill][kind=neutral]) button calcite-loader,:host([appearance=outline-fill][kind=neutral]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=outline-fill][kind=inverse]) button,:host([appearance=outline-fill][kind=inverse]) a{background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-inverse)}:host([appearance=outline-fill][kind=inverse]) button:hover,:host([appearance=outline-fill][kind=inverse]) a:hover{border-color:var(--calcite-ui-inverse-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-inverse-hover)}:host([appearance=outline-fill][kind=inverse]) button:focus,:host([appearance=outline-fill][kind=inverse]) a:focus{border-color:var(--calcite-ui-inverse);box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse)}:host([appearance=outline-fill][kind=inverse]) button:active,:host([appearance=outline-fill][kind=inverse]) a:active{border-color:var(--calcite-ui-inverse-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse-press)}:host([appearance=outline-fill][kind=inverse]) button calcite-loader,:host([appearance=outline-fill][kind=inverse]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=outline]) button,:host([appearance=outline]) a{border-width:1px;border-style:solid;background-color:transparent;box-shadow:inset 0 0 0 1px transparent}:host([appearance=outline][kind=brand]) button,:host([appearance=outline][kind=brand]) a{border-color:var(--calcite-ui-brand);background-color:transparent;color:var(--calcite-ui-brand)}:host([appearance=outline][kind=brand]) button:hover,:host([appearance=outline][kind=brand]) a:hover{border-color:var(--calcite-ui-brand-hover);color:var(--calcite-ui-brand-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand-hover)}:host([appearance=outline][kind=brand]) button:focus,:host([appearance=outline][kind=brand]) a:focus{border-color:var(--calcite-ui-brand);color:var(--calcite-ui-brand);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}:host([appearance=outline][kind=brand]) button:active,:host([appearance=outline][kind=brand]) a:active{border-color:var(--calcite-ui-brand-press);color:var(--calcite-ui-brand-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand-press)}:host([appearance=outline][kind=brand]) button calcite-loader,:host([appearance=outline][kind=brand]) a calcite-loader{color:var(--calcite-ui-brand)}:host([appearance=outline][kind=danger]) button,:host([appearance=outline][kind=danger]) a{border-color:var(--calcite-ui-danger);background-color:transparent;color:var(--calcite-ui-danger)}:host([appearance=outline][kind=danger]) button:hover,:host([appearance=outline][kind=danger]) a:hover{border-color:var(--calcite-ui-danger-hover);color:var(--calcite-ui-danger-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-danger-hover)}:host([appearance=outline][kind=danger]) button:focus,:host([appearance=outline][kind=danger]) a:focus{border-color:var(--calcite-ui-danger);color:var(--calcite-ui-danger);box-shadow:inset 0 0 0 2px var(--calcite-ui-danger)}:host([appearance=outline][kind=danger]) button:active,:host([appearance=outline][kind=danger]) a:active{border-color:var(--calcite-ui-danger-press);color:var(--calcite-ui-danger-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-danger-press)}:host([appearance=outline][kind=danger]) button calcite-loader,:host([appearance=outline][kind=danger]) a calcite-loader{color:var(--calcite-ui-danger)}:host([appearance=outline][kind=neutral]) button,:host([appearance=outline][kind=neutral]) a{background-color:transparent;color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-border-1)}:host([appearance=outline][kind=neutral]) button:hover,:host([appearance=outline][kind=neutral]) a:hover{box-shadow:inset 0 0 0 1px var(--calcite-ui-foreground-3)}:host([appearance=outline][kind=neutral]) button:focus,:host([appearance=outline][kind=neutral]) a:focus{box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-3)}:host([appearance=outline][kind=neutral]) button:active,:host([appearance=outline][kind=neutral]) a:active{box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-3)}:host([appearance=outline][kind=neutral]) button calcite-loader,:host([appearance=outline][kind=neutral]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=outline][kind=inverse]) button,:host([appearance=outline][kind=inverse]) a{background-color:transparent;color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-inverse)}:host([appearance=outline][kind=inverse]) button:hover,:host([appearance=outline][kind=inverse]) a:hover{border-color:var(--calcite-ui-inverse-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-inverse-hover)}:host([appearance=outline][kind=inverse]) button:focus,:host([appearance=outline][kind=inverse]) a:focus{border-color:var(--calcite-ui-inverse);box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse)}:host([appearance=outline][kind=inverse]) button:active,:host([appearance=outline][kind=inverse]) a:active{border-color:var(--calcite-ui-inverse-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse-press)}:host([appearance=outline][kind=inverse]) button calcite-loader,:host([appearance=outline][kind=inverse]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=outline-fill][split-child=primary]) button,:host([appearance=outline][split-child=primary]) button{border-inline-end-width:0;border-inline-start-width:1px}:host([appearance=outline-fill][split-child=secondary]) button,:host([appearance=outline][split-child=secondary]) button{border-inline-start-width:0;border-inline-end-width:1px}:host([appearance=transparent]:not(.enable-editing-button)) button,:host([appearance=transparent]:not(.enable-editing-button)) a{background-color:transparent}:host([appearance=transparent]:not(.enable-editing-button)) button:hover,:host([appearance=transparent]:not(.enable-editing-button)) button:focus,:host([appearance=transparent]:not(.enable-editing-button)) a:hover,:host([appearance=transparent]:not(.enable-editing-button)) a:focus{background-color:var(--calcite-button-transparent-hover)}:host([appearance=transparent]:not(.enable-editing-button)) button:active,:host([appearance=transparent]:not(.enable-editing-button)) a:active{background-color:var(--calcite-button-transparent-press)}:host([appearance=transparent][kind=brand]) button,:host([appearance=transparent][kind=brand]) a{color:var(--calcite-ui-brand)}:host([appearance=transparent][kind=brand]) button:hover,:host([appearance=transparent][kind=brand]) a:hover{color:var(--calcite-ui-brand-hover)}:host([appearance=transparent][kind=brand]) button:focus,:host([appearance=transparent][kind=brand]) a:focus{color:var(--calcite-ui-brand)}:host([appearance=transparent][kind=brand]) button:active,:host([appearance=transparent][kind=brand]) a:active{color:var(--calcite-ui-brand-press)}:host([appearance=transparent][kind=brand]) button calcite-loader,:host([appearance=transparent][kind=brand]) a calcite-loader{color:var(--calcite-ui-brand)}:host([appearance=transparent][kind=danger]) button,:host([appearance=transparent][kind=danger]) a{color:var(--calcite-ui-danger)}:host([appearance=transparent][kind=danger]) button:hover,:host([appearance=transparent][kind=danger]) a:hover{color:var(--calcite-ui-danger-hover)}:host([appearance=transparent][kind=danger]) button:focus,:host([appearance=transparent][kind=danger]) a:focus{color:var(--calcite-ui-danger)}:host([appearance=transparent][kind=danger]) button:active,:host([appearance=transparent][kind=danger]) a:active{color:var(--calcite-ui-danger-press)}:host([appearance=transparent][kind=danger]) button calcite-loader,:host([appearance=transparent][kind=danger]) a calcite-loader{color:var(--calcite-ui-danger)}:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) button,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) a,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=transparent][kind=neutral].cancel-editing-button) button{border-block-start-width:1px;border-block-end-width:1px;color:var(--calcite-ui-text-3);border-block-start-color:var(--calcite-ui-border-input);border-block-end-color:var(--calcite-ui-border-input);border-block-style:solid}:host([appearance=transparent][kind=neutral].cancel-editing-button) button:not(.content--slotted){--calcite-button-padding-y-internal:0}:host([appearance=transparent][kind=neutral].cancel-editing-button) button:hover{color:var(--calcite-ui-text-1)}:host([appearance=transparent][kind=neutral].enable-editing-button) button{background-color:transparent}:host(.confirm-changes-button) button:focus,:host(.cancel-editing-button) button:focus,:host(.enable-editing-button) button:focus{outline-offset:-2px}:host([appearance=transparent][kind=inverse]) button,:host([appearance=transparent][kind=inverse]) a,:host([appearance=transparent][kind=inverse]) calcite-loader{color:var(--calcite-ui-text-inverse)}:host([scale=s]) button.content--slotted,:host([scale=s]) a.content--slotted{font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s][appearance=transparent]) button.content--slotted,:host([scale=s][appearance=transparent]) a.content--slotted{--calcite-button-padding-x-internal:0.5rem}:host([scale=s]) button,:host([scale=s]) a{--calcite-button-padding-y-internal:3px}:host([scale=m]) button.content--slotted,:host([scale=m]) a.content--slotted{--calcite-button-padding-x-internal:11px;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) button,:host([scale=m]) a{--calcite-button-padding-y-internal:7px}:host([scale=m][appearance=transparent]) button.content--slotted,:host([scale=m][appearance=transparent]) a.content--slotted{--calcite-button-padding-x-internal:0.75rem}:host([scale=l]) button.content--slotted,:host([scale=l]) a.content--slotted{--calcite-button-padding-x-internal:15px;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .button-padding{--calcite-button-padding-x-internal:1rem;--calcite-button-padding-y-internal:11px}:host([scale=l]) .button-padding--shrunk{--calcite-button-padding-y-internal:9px}:host([scale=s]) button:not(.content--slotted),:host([scale=s]) a:not(.content--slotted){--calcite-button-padding-x-internal:0.125rem;--calcite-button-padding-y-internal:3px;inline-size:1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:1.5rem}:host([scale=m]) button:not(.content--slotted),:host([scale=m]) a:not(.content--slotted){--calcite-button-padding-x-internal:0.125rem;--calcite-button-padding-y-internal:7px;inline-size:2rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:2rem}:host([scale=l]) button:not(.content--slotted),:host([scale=l]) a:not(.content--slotted){--calcite-button-padding-x-internal:0.125rem;--calcite-button-padding-y-internal:9px;inline-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:2.75rem}:host([scale=l][appearance=transparent]) button:not(.content--slotted),:host([scale=l][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-y-internal:0.625rem}:host([scale=s][icon-start][icon-end]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end]) a:not(.content--slotted){--calcite-button-padding-x-internal:23px;block-size:1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=s][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-x-internal:1.5rem}:host([scale=m][icon-start][icon-end]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end]) a:not(.content--slotted){--calcite-button-padding-x-internal:2rem;block-size:2rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=m][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-x-internal:33px}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end]) a:not(.content--slotted){--calcite-button-padding-x-internal:43px;block-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted) .icon--start+.icon--end,:host([scale=l][icon-start][icon-end]) a:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:1rem}:host([scale=l][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-x-internal:2.75rem}";export{x as calcite_button}
|
|
6
|
+
import{r as t,h as a,g as e}from"./p-384fd5b6.js";import{c as n}from"./p-1e8ee073.js";import{s as o,r as i}from"./p-9562fa75.js";import{u as r}from"./p-4aadf0a9.js";import{c,d as s,g as l}from"./p-09e32d01.js";import{s as d,a as u,c as p}from"./p-fa9c60a4.js";import{c as h,d as b}from"./p-064ce29f.js";import{c as v}from"./p-ac7220ea.js";import{c as g,d as m,s as f,u as k}from"./p-f4f52a53.js";import"./p-5b1afa72.js";import"./p-293edc82.js";import"./p-05f99eb2.js";!function(t){function a(t,a,e){throw new t("Failed to execute 'requestSubmit' on 'HTMLFormElement': "+a+".",e)}"function"!=typeof t.requestSubmit&&(t.requestSubmit=function(t){t?(function(t,e){t instanceof HTMLElement||a(TypeError,"parameter 1 is not of type 'HTMLElement'"),"submit"==t.type||a(TypeError,"The specified element is not a submit button"),t.form==e||a(DOMException,"The specified element is not owned by this form element","NotFoundError")}(t,this),t.click()):((t=document.createElement("input")).type="submit",t.hidden=!0,this.appendChild(t),t.click(),this.removeChild(t))})}(HTMLFormElement.prototype);const x=class{constructor(a){t(this,a),this.mutationObserver=v("mutation",(()=>this.updateHasContent())),this.handleClick=()=>{const{type:t}=this;this.href||("submit"===t?o(this):"reset"===t&&i(this))},this.alignment="center",this.appearance="solid",this.label=void 0,this.kind="brand",this.disabled=!1,this.href=void 0,this.iconEnd=void 0,this.iconFlipRtl=void 0,this.iconStart=void 0,this.loading=!1,this.name=void 0,this.rel=void 0,this.round=!1,this.scale="m",this.splitChild=!1,this.target=void 0,this.type="button",this.width="auto",this.messages=void 0,this.messageOverrides=void 0,this.hasContent=!1,this.hasLoader=!1,this.effectiveLocale="",this.defaultMessages=void 0}loadingChanged(t,a){t&&!a&&(this.hasLoader=!0),!t&&a&&window.setTimeout((()=>{this.hasLoader=!1}),300)}onMessagesChange(){}async connectedCallback(){h(this),g(this),this.hasLoader=this.loading,this.setupTextContentObserver(),c(this),this.formEl=n(this.el,"form")}disconnectedCallback(){this.mutationObserver?.disconnect(),s(this),b(this),m(this),this.formEl=null}async componentWillLoad(){d(this),this.updateHasContent(),await f(this)}componentDidLoad(){u(this)}componentDidRender(){r(this)}render(){const t=this.href?"a":"button",e=t,n=this.hasLoader?a("div",{class:"calcite-button--loader"},a("calcite-loader",{class:this.loading?"loading-in":"loading-out",inline:!0,label:this.messages.loading,scale:"l"===this.scale?"m":"s"})):null,o=!this.iconStart&&!this.iconEnd,i=a("calcite-icon",{class:{icon:!0,"icon--start":!0},flipRtl:"start"===this.iconFlipRtl||"both"===this.iconFlipRtl,icon:this.iconStart,scale:"l"===this.scale?"m":"s"}),r=a("calcite-icon",{class:{icon:!0,"icon--end":!0},flipRtl:"end"===this.iconFlipRtl||"both"===this.iconFlipRtl,icon:this.iconEnd,scale:"l"===this.scale?"m":"s"}),c=a("span",{class:"content"},a("slot",null));return a(e,{"aria-label":l(this),class:{"button-padding":o,"button-padding--shrunk":!o,"content--slotted":this.hasContent,"icon-start-empty":!this.iconStart,"icon-end-empty":!this.iconEnd},disabled:this.disabled||this.loading,href:"a"===t&&this.href,name:"button"===t&&this.name,onClick:this.handleClick,ref:t=>this.childEl=t,rel:"a"===t&&this.rel,tabIndex:this.disabled||this.loading?-1:null,target:"a"===t&&this.target,type:"button"===t&&this.type},n,this.iconStart?i:null,this.hasContent?c:null,this.iconEnd?r:null)}async setFocus(){await p(this),this.childEl?.focus()}effectiveLocaleChange(){k(this,this.effectiveLocale)}updateHasContent(){const t=this.el.textContent.trim().length>0||this.el.childNodes.length>0;this.hasContent=1===this.el.childNodes.length&&"#text"===this.el.childNodes[0]?.nodeName?this.el.textContent?.trim().length>0:t}setupTextContentObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}onLabelClick(){this.handleClick(),this.setFocus()}static get assetsDirs(){return["assets"]}get el(){return e(this)}static get watchers(){return{loading:["loadingChanged"],messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}};x.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:inline-block;inline-size:auto;vertical-align:middle}:host([round]){border-radius:50px}:host([round]) a,:host([round]) button{border-radius:50px}:host button,:host a{outline-color:transparent}:host button:focus,:host a:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}:host button,:host a{--calcite-button-content-margin-internal:0.5rem;--calcite-button-padding-x-internal:7px;--calcite-button-padding-y-internal:3px;padding-block:var(--calcite-button-padding-y-internal);padding-inline:var(--calcite-button-padding-x-internal);position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-appearance:none;appearance:none;align-items:center;justify-content:center;border-radius:0px;border-style:none;text-align:center;font-family:inherit;font-weight:var(--calcite-font-weight-normal);text-decoration-line:none;transition:color var(--calcite-animation-timing) ease-in-out, background-color var(--calcite-animation-timing) ease-in-out, box-shadow var(--calcite-animation-timing) ease-in-out, outline-color var(--calcite-internal-animation-timing-fast) ease-in-out}:host button:hover,:host a:hover{text-decoration-line:none}.content{display:flex;flex-basis:auto;margin-inline:var(--calcite-button-content-margin-internal)}.icon-start-empty .content{margin-inline-start:unset}.icon-end-empty .content{margin-inline-end:unset}:host([scale=m]) button,:host([scale=m]) a{--calcite-button-content-margin-internal:0.75rem}:host([scale=l]) button,:host([scale=l]) a{--calcite-button-content-margin-internal:1rem}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}:host([alignment=center]:not([width=auto])) a,:host([alignment=center]:not([width=auto])) button{justify-content:center}:host([alignment=start]:not([width=auto])) a,:host([alignment=start]:not([width=auto])) button{justify-content:flex-start}:host([alignment=end]:not([width=auto])) a,:host([alignment=end]:not([width=auto])) button{justify-content:flex-end}:host([alignment*=space-between]:not([width=auto])) a,:host([alignment*=space-between]:not([width=auto])) button{justify-content:space-between}:host([alignment=icon-start-space-between]:not([width=auto])) .icon--start{margin-inline-end:auto}:host([alignment=icon-start-space-between]:not([width=auto])) a,:host([alignment=icon-start-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=icon-end-space-between]:not([width=auto])) .icon--end{margin-inline-start:auto}:host([alignment=icon-end-space-between]:not([width=auto])) a,:host([alignment=icon-end-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=center]) a:not(.content--slotted) .icon--start+.icon--end,:host([alignment=center]) button:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:var(--calcite-button-content-margin-internal)}.icon{position:relative;margin:0px;display:inline-flex;font-weight:var(--calcite-font-weight-normal);line-height:inherit}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([loading]){pointer-events:none}:host([loading]) button,:host([loading]) a{pointer-events:none;opacity:var(--calcite-ui-opacity-disabled)}@keyframes loader-in{0%{inline-size:0;opacity:0;transform:scale(0.5)}100%{inline-size:1em;opacity:1;transform:scale(1)}}@keyframes loader-out{0%{inline-size:1em;opacity:1;transform:scale(1)}100%{inline-size:0;opacity:0;transform:scale(0.5)}}.calcite-button--loader{display:flex}.calcite-button--loader calcite-loader{margin:0px;transition:inline-size var(--calcite-internal-animation-timing-slow) ease-in-out, opacity var(--calcite-internal-animation-timing-slow) ease-in-out, transform var(--calcite-internal-animation-timing-slow) ease-in-out}.calcite-button--loader calcite-loader.loading-in{animation-name:loader-in;animation-duration:var(--calcite-internal-animation-timing-slow)}.calcite-button--loader calcite-loader.loading-out{animation-name:loader-out;animation-duration:var(--calcite-internal-animation-timing-slow)}:host([loading]) button.content--slotted .calcite-button--loader calcite-loader,:host([loading]) a.content--slotted .calcite-button--loader calcite-loader{margin-inline-end:var(--calcite-button-content-margin-internal)}:host([loading]) button:not(.content--slotted) .icon--start,:host([loading]) button:not(.content--slotted) .icon--end,:host([loading]) a:not(.content--slotted) .icon--start,:host([loading]) a:not(.content--slotted) .icon--end{display:none}:host([appearance]) button,:host([appearance]) a{border-width:1px;border-style:solid;border-color:transparent}:host([kind=brand]) button,:host([kind=brand]) a{background-color:var(--calcite-ui-brand);color:var(--calcite-ui-text-inverse)}:host([kind=brand]) button:hover,:host([kind=brand]) button:focus,:host([kind=brand]) a:hover,:host([kind=brand]) a:focus{background-color:var(--calcite-ui-brand-hover)}:host([kind=brand]) button:active,:host([kind=brand]) a:active{background-color:var(--calcite-ui-brand-press)}:host([kind=brand]) button calcite-loader,:host([kind=brand]) a calcite-loader{color:var(--calcite-ui-text-inverse)}:host([kind=danger]) button,:host([kind=danger]) a{background-color:var(--calcite-ui-danger);color:var(--calcite-ui-text-inverse)}:host([kind=danger]) button:hover,:host([kind=danger]) button:focus,:host([kind=danger]) a:hover,:host([kind=danger]) a:focus{background-color:var(--calcite-ui-danger-hover)}:host([kind=danger]) button:active,:host([kind=danger]) a:active{background-color:var(--calcite-ui-danger-press)}:host([kind=danger]) button calcite-loader,:host([kind=danger]) a calcite-loader{color:var(--calcite-ui-text-inverse)}:host([kind=neutral]) button,:host([kind=neutral]) a{background-color:var(--calcite-ui-foreground-3);color:var(--calcite-ui-text-1)}:host([kind=neutral]) button:hover,:host([kind=neutral]) button:focus,:host([kind=neutral]) a:hover,:host([kind=neutral]) a:focus{background-color:var(--calcite-ui-foreground-2)}:host([kind=neutral]) button:active,:host([kind=neutral]) a:active{background-color:var(--calcite-ui-foreground-1)}:host([kind=neutral]) button calcite-loader,:host([kind=neutral]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([kind=inverse]) button,:host([kind=inverse]) a{color:var(--calcite-ui-text-inverse);background-color:var(--calcite-ui-inverse)}:host([kind=inverse]) button:hover,:host([kind=inverse]) button:focus,:host([kind=inverse]) a:hover,:host([kind=inverse]) a:focus{background-color:var(--calcite-ui-inverse-hover)}:host([kind=inverse]) button:active,:host([kind=inverse]) a:active{background-color:var(--calcite-ui-inverse-press)}:host([kind=inverse]) button calcite-loader,:host([kind=inverse]) a calcite-loader{color:var(--calcite-ui-text-inverse)}:host([appearance=outline-fill]) button,:host([appearance=outline-fill]) a{border-width:1px;border-style:solid;background-color:var(--calcite-ui-foreground-1);box-shadow:inset 0 0 0 1px transparent}:host([appearance=outline-fill][kind=brand]) button,:host([appearance=outline-fill][kind=brand]) a{border-color:var(--calcite-ui-brand);background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-brand)}:host([appearance=outline-fill][kind=brand]) button:hover,:host([appearance=outline-fill][kind=brand]) a:hover{border-color:var(--calcite-ui-brand-hover);color:var(--calcite-ui-brand-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand-hover)}:host([appearance=outline-fill][kind=brand]) button:focus,:host([appearance=outline-fill][kind=brand]) a:focus{border-color:var(--calcite-ui-brand);color:var(--calcite-ui-brand);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}:host([appearance=outline-fill][kind=brand]) button:active,:host([appearance=outline-fill][kind=brand]) a:active{border-color:var(--calcite-ui-brand-press);color:var(--calcite-ui-brand-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand-press)}:host([appearance=outline-fill][kind=brand]) button calcite-loader,:host([appearance=outline-fill][kind=brand]) a calcite-loader{color:var(--calcite-ui-brand)}:host([appearance=outline-fill][kind=danger]) button,:host([appearance=outline-fill][kind=danger]) a{border-color:var(--calcite-ui-danger);background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-danger)}:host([appearance=outline-fill][kind=danger]) button:hover,:host([appearance=outline-fill][kind=danger]) a:hover{border-color:var(--calcite-ui-danger-hover);color:var(--calcite-ui-danger-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-danger-hover)}:host([appearance=outline-fill][kind=danger]) button:focus,:host([appearance=outline-fill][kind=danger]) a:focus{border-color:var(--calcite-ui-danger);color:var(--calcite-ui-danger);box-shadow:inset 0 0 0 2px var(--calcite-ui-danger)}:host([appearance=outline-fill][kind=danger]) button:active,:host([appearance=outline-fill][kind=danger]) a:active{border-color:var(--calcite-ui-danger-press);color:var(--calcite-ui-danger-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-danger-press)}:host([appearance=outline-fill][kind=danger]) button calcite-loader,:host([appearance=outline-fill][kind=danger]) a calcite-loader{color:var(--calcite-ui-danger)}:host([appearance=outline-fill][kind=neutral]) button,:host([appearance=outline-fill][kind=neutral]) a{background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-foreground-3)}:host([appearance=outline-fill][kind=neutral]) button:hover,:host([appearance=outline-fill][kind=neutral]) a:hover{box-shadow:inset 0 0 0 1px var(--calcite-ui-foreground-3)}:host([appearance=outline-fill][kind=neutral]) button:focus,:host([appearance=outline-fill][kind=neutral]) a:focus{box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-3)}:host([appearance=outline-fill][kind=neutral]) button:active,:host([appearance=outline-fill][kind=neutral]) a:active{box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-3)}:host([appearance=outline-fill][kind=neutral]) button calcite-loader,:host([appearance=outline-fill][kind=neutral]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=outline-fill][kind=inverse]) button,:host([appearance=outline-fill][kind=inverse]) a{background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-inverse)}:host([appearance=outline-fill][kind=inverse]) button:hover,:host([appearance=outline-fill][kind=inverse]) a:hover{border-color:var(--calcite-ui-inverse-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-inverse-hover)}:host([appearance=outline-fill][kind=inverse]) button:focus,:host([appearance=outline-fill][kind=inverse]) a:focus{border-color:var(--calcite-ui-inverse);box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse)}:host([appearance=outline-fill][kind=inverse]) button:active,:host([appearance=outline-fill][kind=inverse]) a:active{border-color:var(--calcite-ui-inverse-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse-press)}:host([appearance=outline-fill][kind=inverse]) button calcite-loader,:host([appearance=outline-fill][kind=inverse]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=outline]) button,:host([appearance=outline]) a{border-width:1px;border-style:solid;background-color:transparent;box-shadow:inset 0 0 0 1px transparent}:host([appearance=outline][kind=brand]) button,:host([appearance=outline][kind=brand]) a{border-color:var(--calcite-ui-brand);background-color:transparent;color:var(--calcite-ui-brand)}:host([appearance=outline][kind=brand]) button:hover,:host([appearance=outline][kind=brand]) a:hover{border-color:var(--calcite-ui-brand-hover);color:var(--calcite-ui-brand-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand-hover)}:host([appearance=outline][kind=brand]) button:focus,:host([appearance=outline][kind=brand]) a:focus{border-color:var(--calcite-ui-brand);color:var(--calcite-ui-brand);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}:host([appearance=outline][kind=brand]) button:active,:host([appearance=outline][kind=brand]) a:active{border-color:var(--calcite-ui-brand-press);color:var(--calcite-ui-brand-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand-press)}:host([appearance=outline][kind=brand]) button calcite-loader,:host([appearance=outline][kind=brand]) a calcite-loader{color:var(--calcite-ui-brand)}:host([appearance=outline][kind=danger]) button,:host([appearance=outline][kind=danger]) a{border-color:var(--calcite-ui-danger);background-color:transparent;color:var(--calcite-ui-danger)}:host([appearance=outline][kind=danger]) button:hover,:host([appearance=outline][kind=danger]) a:hover{border-color:var(--calcite-ui-danger-hover);color:var(--calcite-ui-danger-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-danger-hover)}:host([appearance=outline][kind=danger]) button:focus,:host([appearance=outline][kind=danger]) a:focus{border-color:var(--calcite-ui-danger);color:var(--calcite-ui-danger);box-shadow:inset 0 0 0 2px var(--calcite-ui-danger)}:host([appearance=outline][kind=danger]) button:active,:host([appearance=outline][kind=danger]) a:active{border-color:var(--calcite-ui-danger-press);color:var(--calcite-ui-danger-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-danger-press)}:host([appearance=outline][kind=danger]) button calcite-loader,:host([appearance=outline][kind=danger]) a calcite-loader{color:var(--calcite-ui-danger)}:host([appearance=outline][kind=neutral]) button,:host([appearance=outline][kind=neutral]) a{background-color:transparent;color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-border-1)}:host([appearance=outline][kind=neutral]) button:hover,:host([appearance=outline][kind=neutral]) a:hover{box-shadow:inset 0 0 0 1px var(--calcite-ui-foreground-3)}:host([appearance=outline][kind=neutral]) button:focus,:host([appearance=outline][kind=neutral]) a:focus{box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-3)}:host([appearance=outline][kind=neutral]) button:active,:host([appearance=outline][kind=neutral]) a:active{box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-3)}:host([appearance=outline][kind=neutral]) button calcite-loader,:host([appearance=outline][kind=neutral]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=outline][kind=inverse]) button,:host([appearance=outline][kind=inverse]) a{background-color:transparent;color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-inverse)}:host([appearance=outline][kind=inverse]) button:hover,:host([appearance=outline][kind=inverse]) a:hover{border-color:var(--calcite-ui-inverse-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-inverse-hover)}:host([appearance=outline][kind=inverse]) button:focus,:host([appearance=outline][kind=inverse]) a:focus{border-color:var(--calcite-ui-inverse);box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse)}:host([appearance=outline][kind=inverse]) button:active,:host([appearance=outline][kind=inverse]) a:active{border-color:var(--calcite-ui-inverse-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse-press)}:host([appearance=outline][kind=inverse]) button calcite-loader,:host([appearance=outline][kind=inverse]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=outline-fill][split-child=primary]) button,:host([appearance=outline][split-child=primary]) button{border-inline-end-width:0;border-inline-start-width:1px}:host([appearance=outline-fill][split-child=secondary]) button,:host([appearance=outline][split-child=secondary]) button{border-inline-start-width:0;border-inline-end-width:1px}:host([appearance=transparent]:not(.enable-editing-button)) button,:host([appearance=transparent]:not(.enable-editing-button)) a{background-color:transparent}:host([appearance=transparent]:not(.enable-editing-button)) button:hover,:host([appearance=transparent]:not(.enable-editing-button)) button:focus,:host([appearance=transparent]:not(.enable-editing-button)) a:hover,:host([appearance=transparent]:not(.enable-editing-button)) a:focus{background-color:var(--calcite-button-transparent-hover)}:host([appearance=transparent]:not(.enable-editing-button)) button:active,:host([appearance=transparent]:not(.enable-editing-button)) a:active{background-color:var(--calcite-button-transparent-press)}:host([appearance=transparent][kind=brand]) button,:host([appearance=transparent][kind=brand]) a{color:var(--calcite-ui-brand)}:host([appearance=transparent][kind=brand]) button:hover,:host([appearance=transparent][kind=brand]) a:hover{color:var(--calcite-ui-brand-hover)}:host([appearance=transparent][kind=brand]) button:focus,:host([appearance=transparent][kind=brand]) a:focus{color:var(--calcite-ui-brand)}:host([appearance=transparent][kind=brand]) button:active,:host([appearance=transparent][kind=brand]) a:active{color:var(--calcite-ui-brand-press)}:host([appearance=transparent][kind=brand]) button calcite-loader,:host([appearance=transparent][kind=brand]) a calcite-loader{color:var(--calcite-ui-brand)}:host([appearance=transparent][kind=danger]) button,:host([appearance=transparent][kind=danger]) a{color:var(--calcite-ui-danger)}:host([appearance=transparent][kind=danger]) button:hover,:host([appearance=transparent][kind=danger]) a:hover{color:var(--calcite-ui-danger-hover)}:host([appearance=transparent][kind=danger]) button:focus,:host([appearance=transparent][kind=danger]) a:focus{color:var(--calcite-ui-danger)}:host([appearance=transparent][kind=danger]) button:active,:host([appearance=transparent][kind=danger]) a:active{color:var(--calcite-ui-danger-press)}:host([appearance=transparent][kind=danger]) button calcite-loader,:host([appearance=transparent][kind=danger]) a calcite-loader{color:var(--calcite-ui-danger)}:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) button,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) a,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=transparent][kind=neutral].cancel-editing-button) button{border-block-start-width:1px;border-block-end-width:1px;color:var(--calcite-ui-text-3);border-block-start-color:var(--calcite-ui-border-input);border-block-end-color:var(--calcite-ui-border-input);border-block-style:solid}:host([appearance=transparent][kind=neutral].cancel-editing-button) button:not(.content--slotted){--calcite-button-padding-y-internal:0}:host([appearance=transparent][kind=neutral].cancel-editing-button) button:hover{color:var(--calcite-ui-text-1)}:host([appearance=transparent][kind=neutral].enable-editing-button) button{background-color:transparent}:host(.confirm-changes-button) button:focus,:host(.cancel-editing-button) button:focus,:host(.enable-editing-button) button:focus{outline-offset:-2px}:host([appearance=transparent][kind=inverse]) button,:host([appearance=transparent][kind=inverse]) a,:host([appearance=transparent][kind=inverse]) calcite-loader{color:var(--calcite-ui-text-inverse)}:host([scale=s]) button.content--slotted,:host([scale=s]) a.content--slotted{font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s][appearance=transparent]) button.content--slotted,:host([scale=s][appearance=transparent]) a.content--slotted{--calcite-button-padding-x-internal:0.5rem}:host([scale=s]) button,:host([scale=s]) a{--calcite-button-padding-y-internal:3px}:host([scale=m]) button.content--slotted,:host([scale=m]) a.content--slotted{--calcite-button-padding-x-internal:11px;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) button,:host([scale=m]) a{--calcite-button-padding-y-internal:7px}:host([scale=m][appearance=transparent]) button.content--slotted,:host([scale=m][appearance=transparent]) a.content--slotted{--calcite-button-padding-x-internal:0.75rem}:host([scale=l]) button.content--slotted,:host([scale=l]) a.content--slotted{--calcite-button-padding-x-internal:15px;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .button-padding{--calcite-button-padding-x-internal:1rem;--calcite-button-padding-y-internal:11px}:host([scale=l]) .button-padding--shrunk{--calcite-button-padding-y-internal:9px}:host([scale=s]) button:not(.content--slotted),:host([scale=s]) a:not(.content--slotted){--calcite-button-padding-x-internal:0.125rem;--calcite-button-padding-y-internal:3px;inline-size:1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:1.5rem}:host([scale=m]) button:not(.content--slotted),:host([scale=m]) a:not(.content--slotted){--calcite-button-padding-x-internal:0.125rem;--calcite-button-padding-y-internal:7px;inline-size:2rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:2rem}:host([scale=l]) button:not(.content--slotted),:host([scale=l]) a:not(.content--slotted){--calcite-button-padding-x-internal:0.125rem;--calcite-button-padding-y-internal:9px;inline-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:2.75rem}:host([scale=l][appearance=transparent]) button:not(.content--slotted),:host([scale=l][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-y-internal:0.625rem}:host([scale=s][icon-start][icon-end]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end]) a:not(.content--slotted){--calcite-button-padding-x-internal:23px;block-size:1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=s][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-x-internal:1.5rem}:host([scale=m][icon-start][icon-end]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end]) a:not(.content--slotted){--calcite-button-padding-x-internal:2rem;block-size:2rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=m][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-x-internal:33px}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end]) a:not(.content--slotted){--calcite-button-padding-x-internal:43px;block-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted) .icon--start+.icon--end,:host([scale=l][icon-start][icon-end]) a:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:1rem}:host([scale=l][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-x-internal:2.75rem}";export{x as calcite_button}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.
|
|
4
|
+
* v1.0.8-next.0
|
|
5
5
|
*/
|
|
6
|
-
import{r as a,c as t,h as i,H as n,g as e}from"./p-
|
|
6
|
+
import{r as a,c as t,h as i,H as n,g as e}from"./p-384fd5b6.js";import{c as o}from"./p-ac7220ea.js";const c=class{constructor(i){a(this,i),this.calciteRadioButtonGroupChange=t(this,"calciteRadioButtonGroupChange",6),this.mutationObserver=o("mutation",(()=>this.passPropsToRadioButtons())),this.passPropsToRadioButtons=()=>{const a=this.el.querySelectorAll("calcite-radio-button");this.selectedItem=Array.from(a).find((a=>a.checked))||null,a.length>0&&a.forEach((a=>{a.disabled=this.disabled||a.disabled,a.hidden=this.hidden,a.name=this.name,a.required=this.required,a.scale=this.scale}))},this.disabled=!1,this.hidden=!1,this.layout="horizontal",this.name=void 0,this.required=!1,this.selectedItem=null,this.scale="m"}onDisabledChange(){this.passPropsToRadioButtons()}onHiddenChange(){this.passPropsToRadioButtons()}onLayoutChange(){this.passPropsToRadioButtons()}onScaleChange(){this.passPropsToRadioButtons()}connectedCallback(){this.passPropsToRadioButtons(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}disconnectedCallback(){this.mutationObserver?.disconnect()}radioButtonChangeHandler(a){this.selectedItem=a.target,this.calciteRadioButtonGroupChange.emit()}render(){return i(n,{role:"radiogroup"},i("slot",null))}static get delegatesFocus(){return!0}get el(){return e(this)}static get watchers(){return{disabled:["onDisabledChange"],hidden:["onHiddenChange"],layout:["onLayoutChange"],scale:["onScaleChange"]}}};c.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{display:flex;max-inline-size:100vw}:host([layout=horizontal]){flex-direction:row;flex-wrap:wrap}:host([layout=horizontal][scale=s]){gap:1rem}:host([layout=horizontal][scale=m]){gap:1.25rem}:host([layout=horizontal][scale=l]){gap:1.5rem}:host([layout=vertical]){flex-direction:column}";export{c as calcite_radio_button_group}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.
|
|
4
|
+
* v1.0.8-next.0
|
|
5
5
|
*/
|
|
6
|
-
import{c as t,b as n}from"./p-3d497b7d.js";import{d as e}from"./p-5f0fe068.js";function o(t){return t.split("-")[0]}function r(t){return t.split("-")[1]}function i(t){return["top","bottom"].includes(o(t))?"x":"y"}function a(t){return"y"===t?"height":"width"}function l(t,n,e){let{reference:l,floating:s}=t;const c=l.x+l.width/2-s.width/2,f=l.y+l.height/2-s.height/2,u=i(n),d=a(u),m=l[d]/2-s[d]/2,p="x"===u;let y;switch(o(n)){case"top":y={x:c,y:l.y-s.height};break;case"bottom":y={x:c,y:l.y+l.height};break;case"right":y={x:l.x+l.width,y:f};break;case"left":y={x:l.x-s.width,y:f};break;default:y={x:l.x,y:l.y}}switch(r(n)){case"start":y[u]-=m*(e&&p?-1:1);break;case"end":y[u]+=m*(e&&p?-1:1)}return y}function s(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function c(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function f(t,n){var e;void 0===n&&(n={});const{x:o,y:r,platform:i,rects:a,elements:l,strategy:f}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:m="floating",altBoundary:p=!1,padding:y=0}=n,g=s(y),x=l[p?"floating"===m?"reference":"floating":m],h=c(await i.getClippingRect({element:null==(e=await(null==i.isElement?void 0:i.isElement(x)))||e?x:x.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:f})),v="floating"===m?{...a.floating,x:o,y:r}:a.reference,w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await(null==i.isElement?void 0:i.isElement(w))&&await(null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},A=c(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:w,strategy:f}):v);return{top:(h.top-A.top+g.top)/b.y,bottom:(A.bottom-h.bottom+g.bottom)/b.y,left:(h.left-A.left+g.left)/b.x,right:(A.right-h.right+g.right)/b.x}}const u=Math.min,d=Math.max;function m(t,n,e){return d(t,u(n,e))}const p={left:"right",right:"left",bottom:"top",top:"bottom"};function y(t){return t.replace(/left|right|bottom|top/g,(t=>p[t]))}function g(t,n,e){void 0===e&&(e=!1);const o=r(t),l=i(t),s=a(l);let c="x"===l?o===(e?"end":"start")?"right":"left":"start"===o?"bottom":"top";return n.reference[s]>n.floating[s]&&(c=y(c)),{main:c,cross:y(c)}}const x={start:"end",end:"start"};function h(t){return t.replace(/start|end/g,(t=>x[t]))}const v=["top","right","bottom","left"],w=v.reduce(((t,n)=>t.concat(n,n+"-start",n+"-end")),[]),b=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(n){var e;const{placement:r,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:c}=n,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",flipAlignment:x=!0,...v}=t,w=o(r),b=[l,...m||(w!==l&&x?function(t){const n=y(t);return[h(t),n,h(n)]}(l):[y(l)])],A=await f(n,v),P=[];let k=(null==(e=i.flip)?void 0:e.overflows)||[];if(u&&P.push(A[w]),d){const{main:t,cross:n}=g(r,a,await(null==s.isRTL?void 0:s.isRTL(c.floating)));P.push(A[t],A[n])}if(k=[...k,{placement:r,overflows:P}],!P.every((t=>t<=0))){var R,D;const t=(null!=(R=null==(D=i.flip)?void 0:D.index)?R:0)+1,n=b[t];if(n)return{data:{index:t,overflows:k},reset:{placement:n}};let e="bottom";switch(p){case"bestFit":{var E;const t=null==(E=k.map((t=>[t,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])?void 0:E[0].placement;t&&(e=t);break}case"initialPlacement":e=l}if(r!==e)return{reset:{placement:e}}}return{}}}};function A(t,n){return{top:t.top-n.height,right:t.right-n.width,bottom:t.bottom-n.height,left:t.left-n.width}}function P(t){return v.some((n=>t[n]>=0))}const k=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(n){const{strategy:e="referenceHidden",...o}=t,{rects:r}=n;switch(e){case"referenceHidden":{const t=A(await f(n,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:P(t)}}}case"escaped":{const t=A(await f(n,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:P(t)}}}default:return{}}}}};function R(t){var n;return(null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function D(t){return R(t).getComputedStyle(t)}function E(t){return $(t)?(t.nodeName||"").toLowerCase():""}let F;function M(){if(F)return F;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(F=t.brands.map((t=>t.brand+"/"+t.version)).join(" "),F):navigator.userAgent}function O(t){return t instanceof R(t).HTMLElement}function S(t){return t instanceof R(t).Element}function $(t){return t instanceof R(t).Node}function T(t){return"undefined"!=typeof ShadowRoot&&(t instanceof R(t).ShadowRoot||t instanceof ShadowRoot)}function j(t){const{overflow:n,overflowX:e,overflowY:o,display:r}=D(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&!["inline","contents"].includes(r)}function C(t){return["table","td","th"].includes(E(t))}function B(t){const n=/firefox/i.test(M()),e=D(t),o=e.backdropFilter||e.WebkitBackdropFilter;return"none"!==e.transform||"none"!==e.perspective||!!o&&"none"!==o||n&&"filter"===e.willChange||n&&!!e.filter&&"none"!==e.filter||["transform","perspective"].some((t=>e.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const n=e.contain;return null!=n&&n.includes(t)}))}function z(){return!/^((?!chrome|android).)*safari/i.test(M())}function L(t){return["html","body","#document"].includes(E(t))}const H=Math.min,N=Math.max,I=Math.round;function W(t){const n=D(t);let e=parseFloat(n.width),o=parseFloat(n.height);const r=t.offsetWidth,i=t.offsetHeight,a=I(e)!==r||I(o)!==i;return a&&(e=r,o=i),{width:e,height:o,fallback:a}}function q(t){return S(t)?t:t.contextElement}const U={x:1,y:1};function V(t){const n=q(t);if(!O(n))return U;const e=n.getBoundingClientRect(),{width:o,height:r,fallback:i}=W(n);let a=(i?I(e.width):e.width)/o,l=(i?I(e.height):e.height)/r;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}function X(t,n,e,o){var r,i;void 0===n&&(n=!1),void 0===e&&(e=!1);const a=t.getBoundingClientRect(),l=q(t);let s=U;n&&(o?S(o)&&(s=V(o)):s=V(t));const c=l?R(l):window,f=!z()&&e;let u=(a.left+(f&&(null==(r=c.visualViewport)?void 0:r.offsetLeft)||0))/s.x,d=(a.top+(f&&(null==(i=c.visualViewport)?void 0:i.offsetTop)||0))/s.y,m=a.width/s.x,p=a.height/s.y;if(l){const t=R(l),n=o&&S(o)?R(o):o;let e=t.frameElement;for(;e&&o&&n!==t;){const t=V(e),n=e.getBoundingClientRect(),o=getComputedStyle(e);n.x+=(e.clientLeft+parseFloat(o.paddingLeft))*t.x,n.y+=(e.clientTop+parseFloat(o.paddingTop))*t.y,u*=t.x,d*=t.y,m*=t.x,p*=t.y,u+=n.x,d+=n.y,e=R(e).frameElement}}return{width:m,height:p,top:d,right:u+m,bottom:d+p,left:u,x:u,y:d}}function Y(t){return(($(t)?t.ownerDocument:t.document)||window.document).documentElement}function _(t){return S(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function G(t){return X(Y(t)).left+_(t).scrollLeft}function J(t,n,e){const o=O(n),r=Y(n),i=X(t,!0,"fixed"===e,n);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(o||!o&&"fixed"!==e)if(("body"!==E(n)||j(r))&&(a=_(n)),O(n)){const t=X(n,!0);l.x=t.x+n.clientLeft,l.y=t.y+n.clientTop}else r&&(l.x=G(r));return{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}function K(t){if("html"===E(t))return t;const n=t.assignedSlot||t.parentNode||(T(t)?t.host:null)||Y(t);return T(n)?n.host:n}function Q(t){return O(t)&&"fixed"!==D(t).position?t.offsetParent:null}function Z(t){const n=R(t);let e=Q(t);for(;e&&C(e)&&"static"===D(e).position;)e=Q(e);return e&&("html"===E(e)||"body"===E(e)&&"static"===D(e).position&&!B(e))?n:e||function(t){let n=K(t);for(;O(n)&&!L(n);){if(B(n))return n;n=K(n)}return null}(t)||n}function tt(t){const n=K(t);return L(n)?t.ownerDocument.body:O(n)&&j(n)?n:tt(n)}function nt(t,n){var e;void 0===n&&(n=[]);const o=tt(t),r=o===(null==(e=t.ownerDocument)?void 0:e.body),i=R(o);return r?n.concat(i,i.visualViewport||[],j(o)?o:[]):n.concat(o,nt(o))}function et(t,n,e){return"viewport"===n?c(function(t,n){const e=R(t),o=Y(t),r=e.visualViewport;let i=o.clientWidth,a=o.clientHeight,l=0,s=0;if(r){i=r.width,a=r.height;const t=z();(t||!t&&"fixed"===n)&&(l=r.offsetLeft,s=r.offsetTop)}return{width:i,height:a,x:l,y:s}}(t,e)):S(n)?function(t,n){const e=X(t,!0,"fixed"===n),o=e.top+t.clientTop,r=e.left+t.clientLeft,i=O(t)?V(t):{x:1,y:1},a=t.clientWidth*i.x,l=t.clientHeight*i.y,s=r*i.x,c=o*i.y;return{top:c,left:s,right:s+a,bottom:c+l,x:s,y:c,width:a,height:l}}(n,e):c(function(t){var n;const e=Y(t),o=_(t),r=null==(n=t.ownerDocument)?void 0:n.body,i=N(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=N(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let l=-o.scrollLeft+G(t);const s=-o.scrollTop;return"rtl"===D(r||e).direction&&(l+=N(e.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:l,y:s}}(Y(t)))}const ot={getClippingRect:function(t){let{element:n,boundary:e,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===e?function(t,n){const e=n.get(t);if(e)return e;let o=nt(t).filter((t=>S(t)&&"body"!==E(t))),r=null;const i="fixed"===D(t).position;let a=i?K(t):t;for(;S(a)&&!L(a);){const t=D(a),n=B(a);(i?n||r:n||"static"!==t.position||!r||!["absolute","fixed"].includes(r.position))?r=t:o=o.filter((t=>t!==a)),a=K(a)}return n.set(t,o),o}(n,this._c):[].concat(e),o],a=i.reduce(((t,e)=>{const o=et(n,e,r);return t.top=N(o.top,t.top),t.right=H(o.right,t.right),t.bottom=H(o.bottom,t.bottom),t.left=N(o.left,t.left),t}),et(n,i[0],r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:n,offsetParent:e,strategy:o}=t;const r=O(e),i=Y(e);if(e===i)return n;let a={scrollLeft:0,scrollTop:0},l={x:1,y:1};const s={x:0,y:0};if((r||!r&&"fixed"!==o)&&(("body"!==E(e)||j(i))&&(a=_(e)),O(e))){const t=X(e);l=V(e),s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+s.x,y:n.y*l.y-a.scrollTop*l.y+s.y}},isElement:S,getDimensions:function(t){return W(t)},getOffsetParent:Z,getDocumentElement:Y,getScale:V,async getElementRects(t){let{reference:n,floating:e,strategy:o}=t;const r=this.getOffsetParent||Z,i=this.getDimensions;return{reference:J(n,await r(e),o),floating:{x:0,y:0,...await i(e)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===D(t).direction};const rt={floatingUINonChromiumPositioningFix:!0,...globalThis.calciteComponentsConfig},it=async function(){if(rt.floatingUINonChromiumPositioningFix&&/firefox|safari/i.test(function(){const t=navigator.userAgentData;return t?.brands?t.brands.map((t=>`${t.brand}/${t.version}`)).join(" "):navigator.userAgent}())){const{getClippingRect:t,getElementRects:n,getOffsetParent:e}=await import("./p-4acb3ea1.js");ot.getClippingRect=t,ot.getOffsetParent=e,ot.getElementRects=n}}(),at=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end"],lt="bottom-start",st={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function ct({placement:t,flipDisabled:n,flipPlacements:e,offsetDistance:l,offsetSkidding:c,arrowEl:u,type:d}){const p=[(void 0===y&&(y={}),{name:"shift",options:y,async fn(t){const{x:n,y:e,placement:r}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:s={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...c}=y,u={x:n,y:e},d=await f(t,c),p=i(o(r)),g="x"===p?"y":"x";let x=u[p],h=u[g];a&&(x=m(x+d["y"===p?"top":"left"],x,x-d["y"===p?"bottom":"right"])),l&&(h=m(h+d["y"===g?"top":"left"],h,h-d["y"===g?"bottom":"right"]));const v=s.fn({...t,[p]:x,[g]:h});return{...v,data:{x:v.x-n,y:v.y-e}}}}),k()];var y,x;if("menu"===d)return[...p,b({fallbackPlacements:e||["top-start","top","top-end","bottom-start","bottom","bottom-end"]})];if("popover"===d||"tooltip"===d){const d=[...p,(x={mainAxis:"number"==typeof l?l:0,crossAxis:"number"==typeof c?c:0},void 0===x&&(x=0),{name:"offset",options:x,async fn(t){const{x:n,y:e}=t,a=await async function(t,n){const{placement:e,platform:a,elements:l}=t,s=await(null==a.isRTL?void 0:a.isRTL(l.floating)),c=o(e),f=r(e),u="x"===i(e),d=["left","top"].includes(c)?-1:1,m=s&&u?-1:1,p="function"==typeof n?n(t):n;let{mainAxis:y,crossAxis:g,alignmentAxis:x}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return f&&"number"==typeof x&&(g="end"===f?-1*x:x),u?{x:g*m,y:y*d}:{x:y*d,y:g*m}}(t,x);return{x:n+a.x,y:e+a.y,data:a}}})];return"auto"===t||"auto-start"===t||"auto-end"===t?d.push(function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(n){var e,i,a,l,s;const{x:c,y:u,rects:d,middlewareData:m,placement:p,platform:y,elements:x}=n,{alignment:v,allowedPlacements:b=w,autoAlignment:A=!0,...P}=t,k=void 0!==v||b===w?function(t,n,e){return(t?[...e.filter((n=>r(n)===t)),...e.filter((n=>r(n)!==t))]:e.filter((t=>o(t)===t))).filter((e=>!t||r(e)===t||!!n&&h(e)!==e))}(v||null,A,b):b,R=await f(n,P),D=null!=(e=null==(i=m.autoPlacement)?void 0:i.index)?e:0,E=k[D];if(null==E)return{};const{main:F,cross:M}=g(E,d,await(null==y.isRTL?void 0:y.isRTL(x.floating)));if(p!==E)return{x:c,y:u,reset:{placement:k[0]}};const O=[R[o(E)],R[F],R[M]],S=[...null!=(a=null==(l=m.autoPlacement)?void 0:l.overflows)?a:[],{placement:E,overflows:O}],$=k[D+1];if($)return{data:{index:D+1,overflows:S},reset:{placement:$}};const T=S.slice().sort(((t,n)=>t.overflows[0]-n.overflows[0])),j=null==(s=T.find((t=>{let{overflows:n}=t;return n.every((t=>t<=0))})))?void 0:s.placement,C=null!=j?j:T[0].placement;return C!==p?{data:{index:D+1,overflows:S},reset:{placement:C}}:{}}}}({alignment:"auto-start"===t?"start":"auto-end"===t?"end":null})):n||d.push(b(e?{fallbackPlacements:e}:{})),u&&d.push((t=>({name:"arrow",options:t,async fn(n){const{element:e,padding:o=0}=null!=t?t:{},{x:l,y:c,placement:f,rects:u,platform:d}=n;if(null==e)return{};const p=s(o),y={x:l,y:c},g=i(f),x=a(g),h=await d.getDimensions(e),v="y"===g?"top":"left",w="y"===g?"bottom":"right",b=u.reference[x]+u.reference[g]-y[g]-u.floating[x],A=y[g]-u.reference[g],P=await(null==d.getOffsetParent?void 0:d.getOffsetParent(e));let k=P?"y"===g?P.clientHeight||0:P.clientWidth||0:0;0===k&&(k=u.floating[x]);const R=p[v],D=k-h[x]-p[w],E=k/2-h[x]/2+(b/2-A/2),F=m(R,E,D),M=null!=r(f)&&E!=F&&u.reference[x]/2-(E<R?p[v]:p[w])-h[x]/2<0;return{[g]:y[g]-(M?E<R?R-E:D-E:0),data:{[g]:F,centerOffset:E-F}}}}))({element:u})),d}return[]}function ft(t,n){const e=t.filter((t=>at.includes(t)));return e.length!==t.length&&console.warn(`${n.tagName}: Invalid value found in: flipPlacements. Try any of these: ${at.map((t=>`"${t}"`)).join(", ").trim()}`,{el:n}),e}function ut(t,e){const o=["left","right"];return"rtl"===n(t)&&o.reverse(),e.replace(/leading/gi,o[0]).replace(/trailing/gi,o[1])}async function dt(t,n,e=!1){if(t.open)return e?mt(n):pt(n)}const mt=e(pt,100,{leading:!0,maxWait:100});async function pt({referenceEl:t,floatingEl:n,overlayPositioning:e="absolute",placement:o,flipDisabled:r,flipPlacements:i,offsetDistance:a,offsetSkidding:s,includeArrow:c=!1,arrowEl:f,type:u}){if(!t||!n||c&&!f)return null;await it;const{x:d,y:m,placement:p,strategy:y,middlewareData:g}=await((t,n,e)=>{const o=new Map,r={platform:ot,...e},i={...r.platform,_c:o};return(async(t,n,e)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=e,s=i.filter(Boolean),c=await(null==a.isRTL?void 0:a.isRTL(n));let f=await a.getElementRects({reference:t,floating:n,strategy:r}),{x:u,y:d}=l(f,o,c),m=o,p={},y=0;for(let e=0;e<s.length;e++){const{name:i,fn:g}=s[e],{x,y:h,data:v,reset:w}=await g({x:u,y:d,initialPlacement:o,placement:m,strategy:r,middlewareData:p,rects:f,platform:a,elements:{reference:t,floating:n}});u=null!=x?x:u,d=null!=h?h:d,p={...p,[i]:{...p[i],...v}},w&&y<=50&&(y++,"object"==typeof w&&(w.placement&&(m=w.placement),w.rects&&(f=!0===w.rects?await a.getElementRects({reference:t,floating:n,strategy:r}):w.rects),({x:u,y:d}=l(f,m,c))),e=-1)}return{x:u,y:d,placement:m,strategy:r,middlewareData:p}})(t,n,{...r,platform:i})})(t,n,{strategy:e,placement:"auto"===o||"auto-start"===o||"auto-end"===o?void 0:ut(n,o),middleware:ct({placement:o,flipDisabled:r,flipPlacements:i,offsetDistance:a,offsetSkidding:s,arrowEl:f,type:u})});if(g?.arrow){const{x:t,y:n}=g.arrow;Object.assign(f.style,{left:null!=t?`${t}px`:"",top:null!=n?`${n}px`:""})}const x=g?.hide?.referenceHidden?"hidden":null,h=x?"none":null;n.setAttribute("data-placement",p);const v=`translate(${Math.round(d)}px,${Math.round(m)}px)`;Object.assign(n.style,{visibility:x,pointerEvents:h,position:y,top:"0",left:"0",transform:v})}const yt=new WeakMap;function gt(t,n,e){if(!e||!n)return;xt(t,n,e);const o=t.overlayPositioning;Object.assign(e.style,{visibility:"hidden",pointerEvents:"none",position:o}),"absolute"===o&&At(e),yt.set(t,function(t,n,e,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:l=!1}=o,s=r&&!l,c=s||i?[...S(t)?nt(t):t.contextElement?nt(t.contextElement):[],...nt(n)]:[];c.forEach((t=>{s&&t.addEventListener("scroll",e,{passive:!0}),i&&t.addEventListener("resize",e)}));let f,u=null;if(a){let o=!0;u=new ResizeObserver((()=>{o||e(),o=!1})),S(t)&&!l&&u.observe(t),S(t)||!t.contextElement||l||u.observe(t.contextElement),u.observe(n)}let d=l?X(t):null;return l&&function n(){const o=X(t);!d||o.x===d.x&&o.y===d.y&&o.width===d.width&&o.height===d.height||e(),d=o,f=requestAnimationFrame(n)}(),e(),()=>{var t;c.forEach((t=>{s&&t.removeEventListener("scroll",e),i&&t.removeEventListener("resize",e)})),null==(t=u)||t.disconnect(),u=null,l&&cancelAnimationFrame(f)}}(n,e,(()=>t.reposition())))}function xt(t,n,e){if(!e||!n)return;wt(e).removeEventListener("transitionend",bt);const o=yt.get(t);o&&o(),yt.delete(t)}const ht=Math.ceil(Math.hypot(4,4));function vt(t){t&&"absolute"===t.style.position&&wt(t).addEventListener("transitionend",bt)}function wt(t){return t.shadowRoot||t}function bt(n){const e=n.target;if("opacity"===n.propertyName&&e.classList.contains(st.animation)){const n=function(n){return t(n,"[data-placement]")}(e);At(n),wt(n).removeEventListener("transitionend",bt)}}function At(t){t.style.transform="",t.style.top="0",t.style.left="0"}export{st as F,xt as a,ht as b,gt as c,lt as d,c as e,ft as f,dt as r,vt as u}
|
|
6
|
+
import{c as t,b as n}from"./p-1e8ee073.js";import{d as e}from"./p-a50b2d9f.js";function o(t){return t.split("-")[0]}function r(t){return t.split("-")[1]}function i(t){return["top","bottom"].includes(o(t))?"x":"y"}function a(t){return"y"===t?"height":"width"}function l(t,n,e){let{reference:l,floating:s}=t;const c=l.x+l.width/2-s.width/2,f=l.y+l.height/2-s.height/2,u=i(n),d=a(u),m=l[d]/2-s[d]/2,p="x"===u;let y;switch(o(n)){case"top":y={x:c,y:l.y-s.height};break;case"bottom":y={x:c,y:l.y+l.height};break;case"right":y={x:l.x+l.width,y:f};break;case"left":y={x:l.x-s.width,y:f};break;default:y={x:l.x,y:l.y}}switch(r(n)){case"start":y[u]-=m*(e&&p?-1:1);break;case"end":y[u]+=m*(e&&p?-1:1)}return y}function s(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function c(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function f(t,n){var e;void 0===n&&(n={});const{x:o,y:r,platform:i,rects:a,elements:l,strategy:f}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:m="floating",altBoundary:p=!1,padding:y=0}=n,g=s(y),x=l[p?"floating"===m?"reference":"floating":m],h=c(await i.getClippingRect({element:null==(e=await(null==i.isElement?void 0:i.isElement(x)))||e?x:x.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:f})),v="floating"===m?{...a.floating,x:o,y:r}:a.reference,w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await(null==i.isElement?void 0:i.isElement(w))&&await(null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},A=c(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:w,strategy:f}):v);return{top:(h.top-A.top+g.top)/b.y,bottom:(A.bottom-h.bottom+g.bottom)/b.y,left:(h.left-A.left+g.left)/b.x,right:(A.right-h.right+g.right)/b.x}}const u=Math.min,d=Math.max;function m(t,n,e){return d(t,u(n,e))}const p={left:"right",right:"left",bottom:"top",top:"bottom"};function y(t){return t.replace(/left|right|bottom|top/g,(t=>p[t]))}function g(t,n,e){void 0===e&&(e=!1);const o=r(t),l=i(t),s=a(l);let c="x"===l?o===(e?"end":"start")?"right":"left":"start"===o?"bottom":"top";return n.reference[s]>n.floating[s]&&(c=y(c)),{main:c,cross:y(c)}}const x={start:"end",end:"start"};function h(t){return t.replace(/start|end/g,(t=>x[t]))}const v=["top","right","bottom","left"],w=v.reduce(((t,n)=>t.concat(n,n+"-start",n+"-end")),[]),b=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(n){var e;const{placement:r,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:c}=n,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",flipAlignment:x=!0,...v}=t,w=o(r),b=[l,...m||(w!==l&&x?function(t){const n=y(t);return[h(t),n,h(n)]}(l):[y(l)])],A=await f(n,v),P=[];let k=(null==(e=i.flip)?void 0:e.overflows)||[];if(u&&P.push(A[w]),d){const{main:t,cross:n}=g(r,a,await(null==s.isRTL?void 0:s.isRTL(c.floating)));P.push(A[t],A[n])}if(k=[...k,{placement:r,overflows:P}],!P.every((t=>t<=0))){var R,D;const t=(null!=(R=null==(D=i.flip)?void 0:D.index)?R:0)+1,n=b[t];if(n)return{data:{index:t,overflows:k},reset:{placement:n}};let e="bottom";switch(p){case"bestFit":{var E;const t=null==(E=k.map((t=>[t,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])?void 0:E[0].placement;t&&(e=t);break}case"initialPlacement":e=l}if(r!==e)return{reset:{placement:e}}}return{}}}};function A(t,n){return{top:t.top-n.height,right:t.right-n.width,bottom:t.bottom-n.height,left:t.left-n.width}}function P(t){return v.some((n=>t[n]>=0))}const k=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(n){const{strategy:e="referenceHidden",...o}=t,{rects:r}=n;switch(e){case"referenceHidden":{const t=A(await f(n,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:P(t)}}}case"escaped":{const t=A(await f(n,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:P(t)}}}default:return{}}}}};function R(t){var n;return(null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function D(t){return R(t).getComputedStyle(t)}function E(t){return $(t)?(t.nodeName||"").toLowerCase():""}let F;function M(){if(F)return F;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(F=t.brands.map((t=>t.brand+"/"+t.version)).join(" "),F):navigator.userAgent}function O(t){return t instanceof R(t).HTMLElement}function S(t){return t instanceof R(t).Element}function $(t){return t instanceof R(t).Node}function T(t){return"undefined"!=typeof ShadowRoot&&(t instanceof R(t).ShadowRoot||t instanceof ShadowRoot)}function j(t){const{overflow:n,overflowX:e,overflowY:o,display:r}=D(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&!["inline","contents"].includes(r)}function C(t){return["table","td","th"].includes(E(t))}function B(t){const n=/firefox/i.test(M()),e=D(t),o=e.backdropFilter||e.WebkitBackdropFilter;return"none"!==e.transform||"none"!==e.perspective||!!o&&"none"!==o||n&&"filter"===e.willChange||n&&!!e.filter&&"none"!==e.filter||["transform","perspective"].some((t=>e.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const n=e.contain;return null!=n&&n.includes(t)}))}function z(){return!/^((?!chrome|android).)*safari/i.test(M())}function L(t){return["html","body","#document"].includes(E(t))}const H=Math.min,N=Math.max,I=Math.round;function W(t){const n=D(t);let e=parseFloat(n.width),o=parseFloat(n.height);const r=t.offsetWidth,i=t.offsetHeight,a=I(e)!==r||I(o)!==i;return a&&(e=r,o=i),{width:e,height:o,fallback:a}}function q(t){return S(t)?t:t.contextElement}const U={x:1,y:1};function V(t){const n=q(t);if(!O(n))return U;const e=n.getBoundingClientRect(),{width:o,height:r,fallback:i}=W(n);let a=(i?I(e.width):e.width)/o,l=(i?I(e.height):e.height)/r;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}function X(t,n,e,o){var r,i;void 0===n&&(n=!1),void 0===e&&(e=!1);const a=t.getBoundingClientRect(),l=q(t);let s=U;n&&(o?S(o)&&(s=V(o)):s=V(t));const c=l?R(l):window,f=!z()&&e;let u=(a.left+(f&&(null==(r=c.visualViewport)?void 0:r.offsetLeft)||0))/s.x,d=(a.top+(f&&(null==(i=c.visualViewport)?void 0:i.offsetTop)||0))/s.y,m=a.width/s.x,p=a.height/s.y;if(l){const t=R(l),n=o&&S(o)?R(o):o;let e=t.frameElement;for(;e&&o&&n!==t;){const t=V(e),n=e.getBoundingClientRect(),o=getComputedStyle(e);n.x+=(e.clientLeft+parseFloat(o.paddingLeft))*t.x,n.y+=(e.clientTop+parseFloat(o.paddingTop))*t.y,u*=t.x,d*=t.y,m*=t.x,p*=t.y,u+=n.x,d+=n.y,e=R(e).frameElement}}return{width:m,height:p,top:d,right:u+m,bottom:d+p,left:u,x:u,y:d}}function Y(t){return(($(t)?t.ownerDocument:t.document)||window.document).documentElement}function _(t){return S(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function G(t){return X(Y(t)).left+_(t).scrollLeft}function J(t,n,e){const o=O(n),r=Y(n),i=X(t,!0,"fixed"===e,n);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(o||!o&&"fixed"!==e)if(("body"!==E(n)||j(r))&&(a=_(n)),O(n)){const t=X(n,!0);l.x=t.x+n.clientLeft,l.y=t.y+n.clientTop}else r&&(l.x=G(r));return{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}function K(t){if("html"===E(t))return t;const n=t.assignedSlot||t.parentNode||(T(t)?t.host:null)||Y(t);return T(n)?n.host:n}function Q(t){return O(t)&&"fixed"!==D(t).position?t.offsetParent:null}function Z(t){const n=R(t);let e=Q(t);for(;e&&C(e)&&"static"===D(e).position;)e=Q(e);return e&&("html"===E(e)||"body"===E(e)&&"static"===D(e).position&&!B(e))?n:e||function(t){let n=K(t);for(;O(n)&&!L(n);){if(B(n))return n;n=K(n)}return null}(t)||n}function tt(t){const n=K(t);return L(n)?t.ownerDocument.body:O(n)&&j(n)?n:tt(n)}function nt(t,n){var e;void 0===n&&(n=[]);const o=tt(t),r=o===(null==(e=t.ownerDocument)?void 0:e.body),i=R(o);return r?n.concat(i,i.visualViewport||[],j(o)?o:[]):n.concat(o,nt(o))}function et(t,n,e){return"viewport"===n?c(function(t,n){const e=R(t),o=Y(t),r=e.visualViewport;let i=o.clientWidth,a=o.clientHeight,l=0,s=0;if(r){i=r.width,a=r.height;const t=z();(t||!t&&"fixed"===n)&&(l=r.offsetLeft,s=r.offsetTop)}return{width:i,height:a,x:l,y:s}}(t,e)):S(n)?function(t,n){const e=X(t,!0,"fixed"===n),o=e.top+t.clientTop,r=e.left+t.clientLeft,i=O(t)?V(t):{x:1,y:1},a=t.clientWidth*i.x,l=t.clientHeight*i.y,s=r*i.x,c=o*i.y;return{top:c,left:s,right:s+a,bottom:c+l,x:s,y:c,width:a,height:l}}(n,e):c(function(t){var n;const e=Y(t),o=_(t),r=null==(n=t.ownerDocument)?void 0:n.body,i=N(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=N(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let l=-o.scrollLeft+G(t);const s=-o.scrollTop;return"rtl"===D(r||e).direction&&(l+=N(e.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:l,y:s}}(Y(t)))}const ot={getClippingRect:function(t){let{element:n,boundary:e,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===e?function(t,n){const e=n.get(t);if(e)return e;let o=nt(t).filter((t=>S(t)&&"body"!==E(t))),r=null;const i="fixed"===D(t).position;let a=i?K(t):t;for(;S(a)&&!L(a);){const t=D(a),n=B(a);(i?n||r:n||"static"!==t.position||!r||!["absolute","fixed"].includes(r.position))?r=t:o=o.filter((t=>t!==a)),a=K(a)}return n.set(t,o),o}(n,this._c):[].concat(e),o],a=i.reduce(((t,e)=>{const o=et(n,e,r);return t.top=N(o.top,t.top),t.right=H(o.right,t.right),t.bottom=H(o.bottom,t.bottom),t.left=N(o.left,t.left),t}),et(n,i[0],r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:n,offsetParent:e,strategy:o}=t;const r=O(e),i=Y(e);if(e===i)return n;let a={scrollLeft:0,scrollTop:0},l={x:1,y:1};const s={x:0,y:0};if((r||!r&&"fixed"!==o)&&(("body"!==E(e)||j(i))&&(a=_(e)),O(e))){const t=X(e);l=V(e),s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+s.x,y:n.y*l.y-a.scrollTop*l.y+s.y}},isElement:S,getDimensions:function(t){return W(t)},getOffsetParent:Z,getDocumentElement:Y,getScale:V,async getElementRects(t){let{reference:n,floating:e,strategy:o}=t;const r=this.getOffsetParent||Z,i=this.getDimensions;return{reference:J(n,await r(e),o),floating:{x:0,y:0,...await i(e)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===D(t).direction};const rt={floatingUINonChromiumPositioningFix:!0,...globalThis.calciteComponentsConfig},it=async function(){if(rt.floatingUINonChromiumPositioningFix&&/firefox|safari/i.test(function(){const t=navigator.userAgentData;return t?.brands?t.brands.map((t=>`${t.brand}/${t.version}`)).join(" "):navigator.userAgent}())){const{getClippingRect:t,getElementRects:n,getOffsetParent:e}=await import("./p-cba4801c.js");ot.getClippingRect=t,ot.getOffsetParent=e,ot.getElementRects=n}}(),at=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end"],lt="bottom-start",st={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function ct({placement:t,flipDisabled:n,flipPlacements:e,offsetDistance:l,offsetSkidding:c,arrowEl:u,type:d}){const p=[(void 0===y&&(y={}),{name:"shift",options:y,async fn(t){const{x:n,y:e,placement:r}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:s={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...c}=y,u={x:n,y:e},d=await f(t,c),p=i(o(r)),g="x"===p?"y":"x";let x=u[p],h=u[g];a&&(x=m(x+d["y"===p?"top":"left"],x,x-d["y"===p?"bottom":"right"])),l&&(h=m(h+d["y"===g?"top":"left"],h,h-d["y"===g?"bottom":"right"]));const v=s.fn({...t,[p]:x,[g]:h});return{...v,data:{x:v.x-n,y:v.y-e}}}}),k()];var y,x;if("menu"===d)return[...p,b({fallbackPlacements:e||["top-start","top","top-end","bottom-start","bottom","bottom-end"]})];if("popover"===d||"tooltip"===d){const d=[...p,(x={mainAxis:"number"==typeof l?l:0,crossAxis:"number"==typeof c?c:0},void 0===x&&(x=0),{name:"offset",options:x,async fn(t){const{x:n,y:e}=t,a=await async function(t,n){const{placement:e,platform:a,elements:l}=t,s=await(null==a.isRTL?void 0:a.isRTL(l.floating)),c=o(e),f=r(e),u="x"===i(e),d=["left","top"].includes(c)?-1:1,m=s&&u?-1:1,p="function"==typeof n?n(t):n;let{mainAxis:y,crossAxis:g,alignmentAxis:x}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return f&&"number"==typeof x&&(g="end"===f?-1*x:x),u?{x:g*m,y:y*d}:{x:y*d,y:g*m}}(t,x);return{x:n+a.x,y:e+a.y,data:a}}})];return"auto"===t||"auto-start"===t||"auto-end"===t?d.push(function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(n){var e,i,a,l,s;const{x:c,y:u,rects:d,middlewareData:m,placement:p,platform:y,elements:x}=n,{alignment:v,allowedPlacements:b=w,autoAlignment:A=!0,...P}=t,k=void 0!==v||b===w?function(t,n,e){return(t?[...e.filter((n=>r(n)===t)),...e.filter((n=>r(n)!==t))]:e.filter((t=>o(t)===t))).filter((e=>!t||r(e)===t||!!n&&h(e)!==e))}(v||null,A,b):b,R=await f(n,P),D=null!=(e=null==(i=m.autoPlacement)?void 0:i.index)?e:0,E=k[D];if(null==E)return{};const{main:F,cross:M}=g(E,d,await(null==y.isRTL?void 0:y.isRTL(x.floating)));if(p!==E)return{x:c,y:u,reset:{placement:k[0]}};const O=[R[o(E)],R[F],R[M]],S=[...null!=(a=null==(l=m.autoPlacement)?void 0:l.overflows)?a:[],{placement:E,overflows:O}],$=k[D+1];if($)return{data:{index:D+1,overflows:S},reset:{placement:$}};const T=S.slice().sort(((t,n)=>t.overflows[0]-n.overflows[0])),j=null==(s=T.find((t=>{let{overflows:n}=t;return n.every((t=>t<=0))})))?void 0:s.placement,C=null!=j?j:T[0].placement;return C!==p?{data:{index:D+1,overflows:S},reset:{placement:C}}:{}}}}({alignment:"auto-start"===t?"start":"auto-end"===t?"end":null})):n||d.push(b(e?{fallbackPlacements:e}:{})),u&&d.push((t=>({name:"arrow",options:t,async fn(n){const{element:e,padding:o=0}=null!=t?t:{},{x:l,y:c,placement:f,rects:u,platform:d}=n;if(null==e)return{};const p=s(o),y={x:l,y:c},g=i(f),x=a(g),h=await d.getDimensions(e),v="y"===g?"top":"left",w="y"===g?"bottom":"right",b=u.reference[x]+u.reference[g]-y[g]-u.floating[x],A=y[g]-u.reference[g],P=await(null==d.getOffsetParent?void 0:d.getOffsetParent(e));let k=P?"y"===g?P.clientHeight||0:P.clientWidth||0:0;0===k&&(k=u.floating[x]);const R=p[v],D=k-h[x]-p[w],E=k/2-h[x]/2+(b/2-A/2),F=m(R,E,D),M=null!=r(f)&&E!=F&&u.reference[x]/2-(E<R?p[v]:p[w])-h[x]/2<0;return{[g]:y[g]-(M?E<R?R-E:D-E:0),data:{[g]:F,centerOffset:E-F}}}}))({element:u})),d}return[]}function ft(t,n){const e=t.filter((t=>at.includes(t)));return e.length!==t.length&&console.warn(`${n.tagName}: Invalid value found in: flipPlacements. Try any of these: ${at.map((t=>`"${t}"`)).join(", ").trim()}`,{el:n}),e}function ut(t,e){const o=["left","right"];return"rtl"===n(t)&&o.reverse(),e.replace(/leading/gi,o[0]).replace(/trailing/gi,o[1])}async function dt(t,n,e=!1){if(t.open)return e?mt(n):pt(n)}const mt=e(pt,100,{leading:!0,maxWait:100});async function pt({referenceEl:t,floatingEl:n,overlayPositioning:e="absolute",placement:o,flipDisabled:r,flipPlacements:i,offsetDistance:a,offsetSkidding:s,includeArrow:c=!1,arrowEl:f,type:u}){if(!t||!n||c&&!f)return null;await it;const{x:d,y:m,placement:p,strategy:y,middlewareData:g}=await((t,n,e)=>{const o=new Map,r={platform:ot,...e},i={...r.platform,_c:o};return(async(t,n,e)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=e,s=i.filter(Boolean),c=await(null==a.isRTL?void 0:a.isRTL(n));let f=await a.getElementRects({reference:t,floating:n,strategy:r}),{x:u,y:d}=l(f,o,c),m=o,p={},y=0;for(let e=0;e<s.length;e++){const{name:i,fn:g}=s[e],{x,y:h,data:v,reset:w}=await g({x:u,y:d,initialPlacement:o,placement:m,strategy:r,middlewareData:p,rects:f,platform:a,elements:{reference:t,floating:n}});u=null!=x?x:u,d=null!=h?h:d,p={...p,[i]:{...p[i],...v}},w&&y<=50&&(y++,"object"==typeof w&&(w.placement&&(m=w.placement),w.rects&&(f=!0===w.rects?await a.getElementRects({reference:t,floating:n,strategy:r}):w.rects),({x:u,y:d}=l(f,m,c))),e=-1)}return{x:u,y:d,placement:m,strategy:r,middlewareData:p}})(t,n,{...r,platform:i})})(t,n,{strategy:e,placement:"auto"===o||"auto-start"===o||"auto-end"===o?void 0:ut(n,o),middleware:ct({placement:o,flipDisabled:r,flipPlacements:i,offsetDistance:a,offsetSkidding:s,arrowEl:f,type:u})});if(g?.arrow){const{x:t,y:n}=g.arrow;Object.assign(f.style,{left:null!=t?`${t}px`:"",top:null!=n?`${n}px`:""})}const x=g?.hide?.referenceHidden?"hidden":null,h=x?"none":null;n.setAttribute("data-placement",p);const v=`translate(${Math.round(d)}px,${Math.round(m)}px)`;Object.assign(n.style,{visibility:x,pointerEvents:h,position:y,top:"0",left:"0",transform:v})}const yt=new WeakMap;function gt(t,n,e){if(!e||!n)return;xt(t,n,e);const o=t.overlayPositioning;Object.assign(e.style,{visibility:"hidden",pointerEvents:"none",position:o}),"absolute"===o&&At(e),yt.set(t,function(t,n,e,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:l=!1}=o,s=r&&!l,c=s||i?[...S(t)?nt(t):t.contextElement?nt(t.contextElement):[],...nt(n)]:[];c.forEach((t=>{s&&t.addEventListener("scroll",e,{passive:!0}),i&&t.addEventListener("resize",e)}));let f,u=null;if(a){let o=!0;u=new ResizeObserver((()=>{o||e(),o=!1})),S(t)&&!l&&u.observe(t),S(t)||!t.contextElement||l||u.observe(t.contextElement),u.observe(n)}let d=l?X(t):null;return l&&function n(){const o=X(t);!d||o.x===d.x&&o.y===d.y&&o.width===d.width&&o.height===d.height||e(),d=o,f=requestAnimationFrame(n)}(),e(),()=>{var t;c.forEach((t=>{s&&t.removeEventListener("scroll",e),i&&t.removeEventListener("resize",e)})),null==(t=u)||t.disconnect(),u=null,l&&cancelAnimationFrame(f)}}(n,e,(()=>t.reposition())))}function xt(t,n,e){if(!e||!n)return;wt(e).removeEventListener("transitionend",bt);const o=yt.get(t);o&&o(),yt.delete(t)}const ht=Math.ceil(Math.hypot(4,4));function vt(t){t&&"absolute"===t.style.position&&wt(t).addEventListener("transitionend",bt)}function wt(t){return t.shadowRoot||t}function bt(n){const e=n.target;if("opacity"===n.propertyName&&e.classList.contains(st.animation)){const n=function(n){return t(n,"[data-placement]")}(e);At(n),wt(n).removeEventListener("transitionend",bt)}}function At(t){t.style.transform="",t.style.top="0",t.style.left="0"}export{st as F,xt as a,ht as b,gt as c,lt as d,c as e,ft as f,dt as r,vt as u}
|