@esri/calcite-components 1.0.0-next.606 → 1.0.0-next.607
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-8faadeb1.js → p-0194be0b.js} +1 -1
- package/dist/calcite/{p-dbb8e6a4.js → p-04cd97f0.js} +2 -2
- package/dist/calcite/{p-404c6db8.entry.js → p-05d91128.entry.js} +2 -2
- package/dist/calcite/{p-ac96d103.entry.js → p-0a89a06d.entry.js} +2 -2
- package/dist/calcite/{p-791e76fc.entry.js → p-0c941429.entry.js} +2 -2
- package/dist/calcite/{p-967401e4.entry.js → p-10ed6464.entry.js} +2 -2
- package/dist/calcite/{p-1e3fdded.entry.js → p-1142d6c8.entry.js} +2 -2
- package/dist/calcite/p-1305ee55.entry.js +6 -0
- package/dist/calcite/p-15fac2ab.js +6 -0
- package/dist/calcite/{p-0020d7d5.entry.js → p-215f9b3e.entry.js} +2 -2
- package/dist/calcite/{p-ccd21f8c.js → p-228742f9.js} +2 -2
- package/dist/calcite/{p-06c6854a.entry.js → p-233e9c82.entry.js} +2 -2
- package/dist/calcite/{p-1e8d2fd7.entry.js → p-2577a91d.entry.js} +2 -2
- package/dist/calcite/{p-39ebfe9e.entry.js → p-27480e42.entry.js} +2 -2
- package/dist/calcite/{p-441037a9.entry.js → p-2824d942.entry.js} +2 -2
- package/dist/calcite/{p-96f53f90.entry.js → p-29e7d607.entry.js} +2 -2
- package/dist/calcite/{p-1eb05bb2.entry.js → p-2a2d9854.entry.js} +2 -2
- package/dist/calcite/{p-e5b5b117.entry.js → p-2ac4da68.entry.js} +2 -2
- package/dist/calcite/{p-33732b8f.entry.js → p-2b623d7a.entry.js} +2 -2
- package/dist/calcite/{p-54c6ec8e.js → p-2e91306b.js} +1 -1
- package/dist/calcite/{p-d973937d.entry.js → p-3191298d.entry.js} +2 -2
- package/dist/calcite/{p-98a6c8a4.js → p-331f03ef.js} +2 -2
- package/dist/calcite/{p-da82a06e.entry.js → p-35a4696c.entry.js} +2 -2
- package/dist/calcite/{p-1b06322f.entry.js → p-35f864c5.entry.js} +2 -2
- package/dist/calcite/{p-c8ffd3f8.entry.js → p-36207d38.entry.js} +2 -2
- package/dist/calcite/{p-36522d79.entry.js → p-389235c5.entry.js} +2 -2
- package/dist/calcite/p-3ad75dbc.entry.js +6 -0
- package/dist/calcite/{p-1de1447f.entry.js → p-3c0e6bf9.entry.js} +2 -2
- package/dist/calcite/{p-4d4bc233.entry.js → p-3f71cb54.entry.js} +2 -2
- package/dist/calcite/{p-8cf35eb8.entry.js → p-4053f375.entry.js} +2 -2
- package/dist/calcite/{p-c416a37b.entry.js → p-4054de19.entry.js} +2 -2
- package/dist/calcite/{p-cafb01e6.entry.js → p-4b6ab904.entry.js} +2 -2
- package/dist/calcite/{p-9df2c651.js → p-4bba5de5.js} +2 -2
- package/dist/calcite/{p-d5b3c1bb.entry.js → p-4d118fe7.entry.js} +2 -2
- package/dist/calcite/{p-9c59c88e.js → p-534d76ec.js} +1 -1
- package/dist/calcite/{p-9f88a197.entry.js → p-56e13c26.entry.js} +2 -2
- package/dist/calcite/{p-bf16098b.entry.js → p-57cd8bf6.entry.js} +2 -2
- package/dist/calcite/{p-74cc2ffc.js → p-5a7d6abb.js} +1 -1
- package/dist/calcite/{p-58a34298.js → p-68be1a57.js} +1 -1
- package/dist/calcite/{p-2eeff261.js → p-724ffb2b.js} +1 -1
- package/dist/calcite/{p-59bddc1f.js → p-792a67ad.js} +1 -1
- package/dist/calcite/{p-af04fadb.entry.js → p-7f645e69.entry.js} +2 -2
- package/dist/calcite/{p-37141771.js → p-8027c4fc.js} +2 -2
- package/dist/calcite/{p-718e40b5.entry.js → p-860f95db.entry.js} +2 -2
- package/dist/calcite/{p-7be2ad3b.entry.js → p-8bbc5021.entry.js} +2 -2
- package/dist/calcite/{p-c8f9eae5.entry.js → p-8ce99d30.entry.js} +2 -2
- package/dist/calcite/p-8d64e950.js +6 -0
- package/dist/calcite/{p-f8706ae9.entry.js → p-963f91e7.entry.js} +2 -2
- package/dist/calcite/{p-72c5d8e9.entry.js → p-976bd33d.entry.js} +2 -2
- package/dist/calcite/{p-452356bd.js → p-9cc66598.js} +2 -2
- package/dist/calcite/{p-b5284c7c.entry.js → p-9ef24687.entry.js} +2 -2
- package/dist/calcite/{p-a88b4c26.js → p-a19ba1b8.js} +1 -1
- package/dist/calcite/{p-32ef135d.entry.js → p-a214e596.entry.js} +2 -2
- package/dist/calcite/p-a4f2a140.js +6 -0
- package/dist/calcite/{p-edbb9009.js → p-a9c93bf7.js} +1 -1
- package/dist/calcite/{p-1e272a5d.js → p-ab2f0124.js} +1 -1
- package/dist/calcite/{p-72b59949.entry.js → p-ae537940.entry.js} +2 -2
- package/dist/calcite/{p-eb47be9d.js → p-aec0e90c.js} +1 -1
- package/dist/calcite/{p-a6373ef6.js → p-b068d057.js} +2 -2
- package/dist/calcite/{p-c7447ff5.entry.js → p-b2c6b06b.entry.js} +2 -2
- package/dist/calcite/{p-d2f79079.entry.js → p-b96cd9fe.entry.js} +2 -2
- package/dist/calcite/p-ba8d8dbd.entry.js +6 -0
- package/dist/calcite/{p-ba03e197.entry.js → p-bd7bf633.entry.js} +2 -2
- package/dist/calcite/{p-c564ee3d.js → p-befa72be.js} +1 -1
- package/dist/calcite/{p-a322bb86.entry.js → p-c1f41172.entry.js} +2 -2
- package/dist/calcite/{p-c5b28b2a.entry.js → p-c3f0ca58.entry.js} +2 -2
- package/dist/calcite/{p-8599b693.entry.js → p-c7a40044.entry.js} +2 -2
- package/dist/calcite/{p-20ab02b7.entry.js → p-c943664b.entry.js} +2 -2
- package/dist/calcite/{p-4b1cc441.js → p-c9c594e4.js} +2 -2
- package/dist/calcite/{p-5ef97e90.entry.js → p-cfd04b12.entry.js} +2 -2
- package/dist/calcite/{p-8d075e37.js → p-d5d91d87.js} +1 -1
- package/dist/calcite/p-db5ed768.entry.js +6 -0
- package/dist/calcite/{p-5a979e32.entry.js → p-dbd28f14.entry.js} +2 -2
- package/dist/calcite/{p-40e1d497.js → p-de41e5a9.js} +1 -1
- package/dist/calcite/{p-538fd2ae.entry.js → p-de5ad6d3.entry.js} +2 -2
- package/dist/calcite/p-dfda39cf.entry.js +6 -0
- package/dist/calcite/{p-1dd5f101.entry.js → p-dfe47ce7.entry.js} +2 -2
- package/dist/calcite/{p-52d3de61.entry.js → p-e0cb72b7.entry.js} +2 -2
- package/dist/calcite/{p-187c562d.entry.js → p-e423377f.entry.js} +2 -2
- package/dist/calcite/{p-a3f7f3c6.entry.js → p-e85ec259.entry.js} +2 -2
- package/dist/calcite/{p-f532a20d.entry.js → p-eb088883.entry.js} +2 -2
- package/dist/calcite/p-ecd9436e.js +6 -0
- package/dist/calcite/{p-aed4b6fc.entry.js → p-ef74f7df.entry.js} +2 -2
- package/dist/calcite/{p-1ed53169.js → p-f0513696.js} +1 -1
- package/dist/calcite/{p-7b0c6ea0.js → p-f478e34c.js} +2 -2
- package/dist/calcite/p-f9398f20.entry.js +6 -0
- package/dist/calcite/p-fad91c38.entry.js +6 -0
- package/dist/calcite/{p-f69de408.js → p-ff2616f4.js} +1 -1
- package/dist/calcite/{p-d90a2e81.entry.js → p-ffb58fa7.entry.js} +2 -2
- package/dist/cjs/{ExpandToggle-4c94697a.js → ExpandToggle-e018f211.js} +5 -5
- package/dist/cjs/{Heading-3af0e212.js → Heading-c23ab3be.js} +2 -2
- package/dist/cjs/{app-globals-3186acc4.js → app-globals-882315c5.js} +2 -2
- package/dist/cjs/{array-4f023a91.js → array-46b159ae.js} +1 -1
- package/dist/cjs/calcite-accordion_2.cjs.entry.js +7 -7
- package/dist/cjs/calcite-action-bar.cjs.entry.js +11 -11
- package/dist/cjs/calcite-action-group.cjs.entry.js +9 -9
- package/dist/cjs/calcite-action-menu.cjs.entry.js +8 -8
- package/dist/cjs/calcite-action-pad.cjs.entry.js +10 -10
- package/dist/cjs/calcite-action.cjs.entry.js +7 -7
- package/dist/cjs/calcite-alert.cjs.entry.js +10 -10
- package/dist/cjs/calcite-avatar.cjs.entry.js +6 -6
- package/dist/cjs/calcite-block_2.cjs.entry.js +10 -10
- package/dist/cjs/calcite-button.cjs.entry.js +9 -9
- package/dist/cjs/calcite-card.cjs.entry.js +7 -7
- package/dist/cjs/calcite-checkbox.cjs.entry.js +9 -9
- package/dist/cjs/calcite-chip.cjs.entry.js +7 -7
- package/dist/cjs/calcite-color-picker_3.cjs.entry.js +10 -10
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +33 -27
- package/dist/cjs/calcite-date-picker_4.cjs.entry.js +11 -11
- package/dist/cjs/calcite-dropdown_3.cjs.entry.js +38 -27
- package/dist/cjs/calcite-fab.cjs.entry.js +6 -6
- package/dist/cjs/calcite-filter.cjs.entry.js +8 -8
- package/dist/cjs/calcite-flow-item.cjs.entry.js +7 -7
- package/dist/cjs/calcite-flow.cjs.entry.js +3 -3
- package/dist/cjs/calcite-graph_2.cjs.entry.js +12 -12
- package/dist/cjs/calcite-handle.cjs.entry.js +5 -5
- package/dist/cjs/calcite-icon.cjs.entry.js +6 -6
- package/dist/cjs/calcite-inline-editable.cjs.entry.js +8 -8
- package/dist/cjs/calcite-input-date-picker.cjs.entry.js +37 -26
- package/dist/cjs/calcite-input-message.cjs.entry.js +5 -5
- package/dist/cjs/calcite-input-number.cjs.entry.js +12 -12
- package/dist/cjs/calcite-input-text.cjs.entry.js +9 -9
- package/dist/cjs/calcite-input-time-picker_2.cjs.entry.js +21 -15
- package/dist/cjs/calcite-input.cjs.entry.js +12 -12
- package/dist/cjs/calcite-label.cjs.entry.js +6 -6
- package/dist/cjs/calcite-link.cjs.entry.js +6 -6
- 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 +8 -8
- package/dist/cjs/calcite-notice.cjs.entry.js +8 -8
- package/dist/cjs/calcite-option_3.cjs.entry.js +9 -9
- package/dist/cjs/calcite-pagination.cjs.entry.js +8 -8
- package/dist/cjs/calcite-panel.cjs.entry.js +10 -10
- package/dist/cjs/calcite-pick-list_3.cjs.entry.js +12 -12
- package/dist/cjs/calcite-popover_2.cjs.entry.js +36 -27
- 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 +9 -9
- package/dist/cjs/calcite-radio-group_2.cjs.entry.js +8 -8
- package/dist/cjs/calcite-rating.cjs.entry.js +9 -9
- package/dist/cjs/calcite-scrim.cjs.entry.js +2 -2
- package/dist/cjs/calcite-shell_3.cjs.entry.js +8 -8
- 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 +9 -9
- package/dist/cjs/calcite-switch.cjs.entry.js +9 -9
- package/dist/cjs/calcite-tab_4.cjs.entry.js +7 -7
- package/dist/cjs/calcite-tile-select_2.cjs.entry.js +4 -4
- package/dist/cjs/calcite-tile.cjs.entry.js +8 -8
- package/dist/cjs/calcite-tip_3.cjs.entry.js +8 -8
- package/dist/cjs/calcite-tooltip_2.cjs.entry.js +29 -20
- package/dist/cjs/calcite-tree_2.cjs.entry.js +8 -8
- package/dist/cjs/calcite-value-list_2.cjs.entry.js +12 -12
- package/dist/cjs/calcite.cjs.js +4 -4
- package/dist/cjs/{conditionalSlot-cb35bd49.js → conditionalSlot-4f4eea6a.js} +3 -3
- package/dist/cjs/{debounce-7c328f60.js → debounce-62882659.js} +1 -1
- package/dist/cjs/{dom-c8d2699b.js → dom-4d157abb.js} +3 -3
- package/dist/cjs/{filter-9a46e30b.js → filter-da2797e5.js} +2 -2
- package/dist/cjs/{floating-ui-1eb7dfe6.js → floating-ui-e4e82078.js} +175 -23
- package/dist/cjs/{form-131e64b8.js → form-2f418822.js} +3 -3
- package/dist/cjs/{guid-ad9b119b.js → guid-1d60d25f.js} +1 -1
- package/dist/cjs/{index-b1ba5282.js → index-9624081e.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{interactive-baf36661.js → interactive-f3855fe3.js} +1 -1
- package/dist/cjs/{interfaces-084c0793.js → interfaces-78ca36e7.js} +1 -1
- package/dist/cjs/{key-59a119b9.js → key-dbb23e1d.js} +1 -1
- package/dist/cjs/{label-415bc940.js → label-cf0a7e54.js} +2 -2
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{locale-02d3d5ef.js → locale-9261eb8c.js} +4 -4
- package/dist/cjs/{math-45a2d4c0.js → math-70844c29.js} +1 -1
- package/dist/cjs/nonChromiumPlatformUtils-e6d5cb22.js +506 -0
- package/dist/cjs/{observers-bf725ee8.js → observers-53e1a6d6.js} +1 -1
- package/dist/cjs/{openCloseComponent-f4966a6b.js → openCloseComponent-af87dcf3.js} +1 -1
- package/dist/cjs/{resources-55a2a593.js → resources-020cc6d5.js} +1 -1
- package/dist/cjs/{resources-79bc4e72.js → resources-2f6b4dae.js} +1 -1
- package/dist/cjs/{resources-ef23c4c9.js → resources-375914cd.js} +1 -1
- package/dist/cjs/{resources-12c592bb.js → resources-83f09a7b.js} +5 -5
- package/dist/cjs/{resources-f51e581d.js → resources-8477fc7e.js} +1 -1
- package/dist/cjs/{resources-0da64a64.js → resources-d07d3444.js} +3 -3
- package/dist/cjs/{sortable.esm-f5415dc8.js → sortable.esm-7dbec412.js} +1 -1
- package/dist/cjs/{utils-332df7b7.js → utils-a61e740b.js} +1 -1
- 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/interfaces.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.css +0 -1
- package/dist/collection/components/combobox/combobox.js +32 -17
- 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.css +0 -1
- package/dist/collection/components/dropdown/dropdown.js +40 -21
- 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.css +0 -1
- package/dist/collection/components/input-date-picker/input-date-picker.js +35 -16
- 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 +23 -8
- 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-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.css +0 -1
- package/dist/collection/components/popover/popover.js +38 -21
- package/dist/collection/components/popover/resources.js +1 -1
- package/dist/collection/components/popover-manager/popover-manager.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/radio-group/radio-group.js +1 -1
- package/dist/collection/components/radio-group-item/radio-group-item.js +1 -1
- package/dist/collection/components/radio-group-item/resources.js +1 -1
- package/dist/collection/components/rating/rating.js +1 -1
- package/dist/collection/components/rating/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/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.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/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.css +0 -1
- package/dist/collection/components/tooltip/tooltip.js +35 -18
- package/dist/collection/components/tooltip-manager/tooltip-manager.js +1 -1
- package/dist/collection/components/tree/interfaces.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 +22 -0
- 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 +496 -0
- package/dist/collection/utils/floating-ui.js +123 -12
- 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/locale.js +1 -1
- package/dist/collection/utils/math.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/theme.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 +3 -3
- 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 +22 -16
- 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 +24 -14
- 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 +11 -5
- 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-manager.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-radio-group-item.js +1 -1
- package/dist/components/calcite-radio-group.js +1 -1
- package/dist/components/calcite-rating.js +1 -1
- package/dist/components/calcite-scrim.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 +1 -1
- 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-manager.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 +29 -19
- package/dist/components/filter.js +1 -1
- package/dist/components/filter2.js +1 -1
- package/dist/components/floating-ui.js +181 -22
- 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/interfaces.js +1 -1
- package/dist/components/interfaces2.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/loader.js +1 -1
- package/dist/components/locale.js +1 -1
- package/dist/components/math.js +1 -1
- package/dist/components/nonChromiumPlatformUtils.js +498 -0
- 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 +27 -19
- 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/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 +24 -16
- package/dist/components/utils.js +1 -1
- package/dist/components/utils2.js +2 -2
- package/dist/esm/{ExpandToggle-246dd7c6.js → ExpandToggle-c19c7ae6.js} +5 -5
- package/dist/esm/{Heading-11c2a834.js → Heading-55c4005d.js} +2 -2
- package/dist/esm/{app-globals-1b919870.js → app-globals-a52284f2.js} +2 -2
- package/dist/esm/{array-16ebf5c6.js → array-740ce6b6.js} +1 -1
- package/dist/esm/calcite-accordion_2.entry.js +7 -7
- package/dist/esm/calcite-action-bar.entry.js +11 -11
- package/dist/esm/calcite-action-group.entry.js +9 -9
- package/dist/esm/calcite-action-menu.entry.js +8 -8
- package/dist/esm/calcite-action-pad.entry.js +10 -10
- package/dist/esm/calcite-action.entry.js +7 -7
- package/dist/esm/calcite-alert.entry.js +10 -10
- package/dist/esm/calcite-avatar.entry.js +6 -6
- package/dist/esm/calcite-block_2.entry.js +10 -10
- package/dist/esm/calcite-button.entry.js +9 -9
- package/dist/esm/calcite-card.entry.js +7 -7
- package/dist/esm/calcite-checkbox.entry.js +9 -9
- package/dist/esm/calcite-chip.entry.js +7 -7
- package/dist/esm/calcite-color-picker_3.entry.js +10 -10
- package/dist/esm/calcite-combobox_3.entry.js +33 -27
- package/dist/esm/calcite-date-picker_4.entry.js +11 -11
- package/dist/esm/calcite-dropdown_3.entry.js +38 -27
- package/dist/esm/calcite-fab.entry.js +6 -6
- package/dist/esm/calcite-filter.entry.js +8 -8
- package/dist/esm/calcite-flow-item.entry.js +7 -7
- package/dist/esm/calcite-flow.entry.js +3 -3
- package/dist/esm/calcite-graph_2.entry.js +12 -12
- package/dist/esm/calcite-handle.entry.js +5 -5
- package/dist/esm/calcite-icon.entry.js +6 -6
- package/dist/esm/calcite-inline-editable.entry.js +8 -8
- package/dist/esm/calcite-input-date-picker.entry.js +37 -26
- package/dist/esm/calcite-input-message.entry.js +5 -5
- package/dist/esm/calcite-input-number.entry.js +12 -12
- package/dist/esm/calcite-input-text.entry.js +9 -9
- package/dist/esm/calcite-input-time-picker_2.entry.js +21 -15
- package/dist/esm/calcite-input.entry.js +12 -12
- package/dist/esm/calcite-label.entry.js +6 -6
- package/dist/esm/calcite-link.entry.js +6 -6
- 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 +8 -8
- package/dist/esm/calcite-notice.entry.js +8 -8
- package/dist/esm/calcite-option_3.entry.js +9 -9
- package/dist/esm/calcite-pagination.entry.js +8 -8
- package/dist/esm/calcite-panel.entry.js +10 -10
- package/dist/esm/calcite-pick-list_3.entry.js +12 -12
- package/dist/esm/calcite-popover_2.entry.js +36 -27
- 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 +9 -9
- package/dist/esm/calcite-radio-group_2.entry.js +8 -8
- package/dist/esm/calcite-rating.entry.js +9 -9
- package/dist/esm/calcite-scrim.entry.js +2 -2
- package/dist/esm/calcite-shell_3.entry.js +8 -8
- 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 +9 -9
- package/dist/esm/calcite-switch.entry.js +9 -9
- package/dist/esm/calcite-tab_4.entry.js +7 -7
- package/dist/esm/calcite-tile-select_2.entry.js +4 -4
- package/dist/esm/calcite-tile.entry.js +8 -8
- package/dist/esm/calcite-tip_3.entry.js +8 -8
- package/dist/esm/calcite-tooltip_2.entry.js +29 -20
- package/dist/esm/calcite-tree_2.entry.js +8 -8
- package/dist/esm/calcite-value-list_2.entry.js +12 -12
- package/dist/esm/calcite.js +4 -4
- package/dist/esm/{conditionalSlot-833c523f.js → conditionalSlot-3441e8f2.js} +3 -3
- package/dist/esm/{debounce-98d20a38.js → debounce-97857fea.js} +1 -1
- package/dist/esm/{dom-640caf51.js → dom-fbef4a17.js} +3 -3
- package/dist/esm/{filter-38e63edc.js → filter-5c7687ab.js} +2 -2
- package/dist/esm/{floating-ui-b2f9718e.js → floating-ui-d7d7ebf5.js} +173 -22
- package/dist/esm/{form-493b70e6.js → form-6c6f44c9.js} +3 -3
- package/dist/esm/{guid-11f68c50.js → guid-46425949.js} +1 -1
- package/dist/esm/{index-06118eda.js → index-dd350c9e.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/{interactive-fccdf326.js → interactive-7bb63697.js} +1 -1
- package/dist/esm/{interfaces-d9428b54.js → interfaces-1e4b4247.js} +1 -1
- package/dist/esm/{key-754bbff1.js → key-9fd0ee2d.js} +1 -1
- package/dist/esm/{label-57dd65d4.js → label-4476feb8.js} +2 -2
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{locale-4e463ebf.js → locale-59ce851a.js} +4 -4
- package/dist/esm/{math-99ba6bfb.js → math-f58b6249.js} +1 -1
- package/dist/esm/nonChromiumPlatformUtils-9a77a585.js +502 -0
- package/dist/esm/{observers-74e54f0e.js → observers-4a45256c.js} +1 -1
- package/dist/esm/{openCloseComponent-ccf3f367.js → openCloseComponent-16ae97af.js} +1 -1
- package/dist/esm/{resources-f7ec4e42.js → resources-06042c92.js} +1 -1
- package/dist/esm/{resources-9331d9fa.js → resources-172c2a25.js} +1 -1
- package/dist/esm/{resources-bad5148f.js → resources-51ebf03b.js} +5 -5
- package/dist/esm/{resources-d9cf35ab.js → resources-57d6fea9.js} +3 -3
- package/dist/esm/{resources-f3f5aa83.js → resources-c905d6cb.js} +1 -1
- package/dist/esm/{resources-64b0963b.js → resources-f25e2a24.js} +1 -1
- package/dist/esm/{sortable.esm-76542737.js → sortable.esm-6094be14.js} +1 -1
- package/dist/esm/{utils-703b7ab8.js → utils-94170855.js} +1 -1
- package/dist/extras/docs-json.json +43 -13
- 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/dist/types/components/combobox/combobox.d.ts +6 -3
- package/dist/types/components/dropdown/dropdown.d.ts +6 -3
- package/dist/types/components/input-date-picker/input-date-picker.d.ts +6 -3
- package/dist/types/components/input-time-picker/input-time-picker.d.ts +6 -2
- package/dist/types/components/popover/popover.d.ts +7 -4
- package/dist/types/components/tooltip/tooltip.d.ts +7 -4
- package/dist/types/components.d.ts +12 -6
- package/dist/types/utils/config.d.ts +7 -0
- package/dist/types/utils/floating-ui/nonChromiumPlatformUtils.d.ts +16 -0
- package/dist/types/utils/floating-ui.d.ts +45 -2
- package/hydrate/index.js +266 -165
- package/package.json +2 -2
- package/dist/calcite/p-03afda80.entry.js +0 -6
- package/dist/calcite/p-0ae7c12f.js +0 -6
- package/dist/calcite/p-22cfa796.entry.js +0 -6
- package/dist/calcite/p-2a78a458.entry.js +0 -6
- package/dist/calcite/p-2d12183c.entry.js +0 -6
- package/dist/calcite/p-91036706.js +0 -6
- package/dist/calcite/p-c3e7ad35.entry.js +0 -6
- package/dist/calcite/p-cff1af31.entry.js +0 -6
- package/dist/calcite/p-da13cffd.entry.js +0 -6
- package/dist/calcite/p-fe3f8e2f.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.0-next.
|
|
4
|
+
* v1.0.0-next.607
|
|
5
5
|
*/
|
|
6
|
-
import{r as i,h as t,H as a,g as n}from"./p-
|
|
6
|
+
import{r as i,h as t,H as a,g as n}from"./p-724ffb2b.js";import{a as e,f as o}from"./p-331f03ef.js";import{C as s}from"./p-2e91306b.js";import{u as c}from"./p-ff2616f4.js";import"./p-534d76ec.js";const r=class{constructor(t){i(this,t),this.disabled=!1,this.download=!1,this.childElClickHandler=i=>{i.isTrusted||i.stopPropagation()},this.storeTagRef=i=>{this.childEl=i}}componentDidRender(){c(this)}render(){const{download:i,el:n}=this,o=e(n),c=this.href?"a":"span",r=t("calcite-icon",{class:"calcite-link--icon icon-start",flipRtl:"start"===this.iconFlipRtl||"both"===this.iconFlipRtl,icon:this.iconStart,scale:"s"}),l=t("calcite-icon",{class:"calcite-link--icon icon-end",flipRtl:"end"===this.iconFlipRtl||"both"===this.iconFlipRtl,icon:this.iconEnd,scale:"s"});return t(a,{role:"presentation"},t(c,{class:{[s.rtl]:"rtl"===o},download:"a"!==c||""!==i&&!i?null:i,href:"a"===c&&this.href,onClick:this.childElClickHandler,ref:this.storeTagRef,rel:"a"===c&&this.rel,role:"span"===c?"link":null,tabIndex:"span"===c?0:null,target:"a"===c&&this.target},this.iconStart?r:null,t("slot",null),this.iconEnd?l:null))}clickHandler(i){i.isTrusted||this.childEl.click()}async setFocus(){o(this.childEl)}get el(){return n(this)}};r.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.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}: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}:host a,:host span{position:relative;display:flex;cursor:pointer;align-items:center;justify-content:center;border-radius:0px;border-style:none;font-family:inherit;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;text-decoration:none;line-height:inherit;font-size:inherit;-webkit-appearance:none}:host a:hover,:host span:hover{text-decoration:none}:host a,:host span{outline-color:transparent}:host a:focus,:host span:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}calcite-icon{inline-size:1em;block-size:1em;min-inline-size:unset;min-block-size:unset}.calcite-link--icon{vertical-align:text-top;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;margin-block-start:0.125rem}:host .calcite-link--icon.icon-start{margin-inline-end:0.5rem}:host .calcite-link--icon.icon-end{margin-inline-start:0.5rem}:host span,:host a{position:relative;display:inline;border-style:none;background-color:transparent;padding:0px;color:var(--calcite-ui-text-link);transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;line-height:inherit;white-space:initial;background-image:linear-gradient(currentColor, currentColor), linear-gradient(var(--calcite-link-blue-underline), var(--calcite-link-blue-underline));background-position:0% 100%, 100% 100%;background-repeat:no-repeat, no-repeat;background-size:0% 1px, 100% 1px}:host span:hover,:host span:focus,:host a:hover,:host a:focus{background-size:100% 1px, 100% 1px}:host span:active,:host a:active{background-size:100% 2px, 100% 2px}:host span.calcite--rtl,:host a.calcite--rtl{background-position:100% 100%, 100% 100%}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}";export{r as calcite_link}
|
|
@@ -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.0-next.
|
|
4
|
+
* v1.0.0-next.607
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as i,h as a,H as e,g as o}from"./p-
|
|
6
|
+
import{r as t,c as i,h as a,H as e,g as o}from"./p-724ffb2b.js";import{g as n}from"./p-534d76ec.js";import{c as s,d as c,H as r}from"./p-f478e34c.js";import{c as l,d as h,g as d}from"./p-b068d057.js";import{u as m}from"./p-ff2616f4.js";import{t as p}from"./p-331f03ef.js";import{i as u}from"./p-5a7d6abb.js";import"./p-2e91306b.js";const f=class{constructor(a){t(this,a),this.calciteInternalCheckboxBlur=i(this,"calciteInternalCheckboxBlur",6),this.calciteCheckboxChange=i(this,"calciteCheckboxChange",6),this.calciteInternalCheckboxFocus=i(this,"calciteInternalCheckboxFocus",6),this.checked=!1,this.disabled=!1,this.hovered=!1,this.indeterminate=!1,this.required=!1,this.scale="m",this.checkedPath="M5.5 12L2 8.689l.637-.636L5.5 10.727l8.022-7.87.637.637z",this.indeterminatePath="M13 8v1H3V8z",this.getPath=()=>this.indeterminate?this.indeterminatePath:this.checked?this.checkedPath:"",this.toggle=()=>{this.disabled||(this.checked=!this.checked,this.setFocus(),this.indeterminate=!1,this.calciteCheckboxChange.emit())},this.keyDownHandler=t=>{u(t.key)&&(this.toggle(),t.preventDefault())},this.clickHandler=()=>{this.toggle()},this.onToggleBlur=()=>{this.calciteInternalCheckboxBlur.emit(!1)},this.onToggleFocus=()=>{this.calciteInternalCheckboxFocus.emit(!0)},this.onLabelClick=()=>{this.toggle()}}async setFocus(){var t;null===(t=this.toggleEl)||void 0===t||t.focus()}connectedCallback(){this.guid=this.el.id||`calcite-checkbox-${n()}`,l(this),s(this)}disconnectedCallback(){h(this),c(this)}componentDidRender(){m(this)}render(){return a(e,{onClick:this.clickHandler,onKeyDown:this.keyDownHandler},a("div",{"aria-checked":p(this.checked),"aria-label":d(this),class:"toggle",onBlur:this.onToggleBlur,onFocus:this.onToggleFocus,ref:t=>this.toggleEl=t,role:"checkbox",tabIndex:this.disabled?void 0:0},a("svg",{"aria-hidden":"true",class:"check-svg",viewBox:"0 0 16 16"},a("path",{d:this.getPath()})),a("slot",null)),a(r,{component:this}))}get el(){return o(this)}};f.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.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}: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([scale=s]){--calcite-checkbox-size:0.75rem}:host([scale=m]){--calcite-checkbox-size:var(--calcite-font-size--1)}:host([scale=l]){--calcite-checkbox-size:1rem}:host{position:relative;display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}:host .check-svg,:host .toggle{inline-size:var(--calcite-checkbox-size);block-size:var(--calcite-checkbox-size)}:host .check-svg{pointer-events:none;box-sizing:border-box;display:block;overflow:hidden;background-color:var(--calcite-ui-foreground-1);fill:currentColor;stroke:currentColor;stroke-width:1;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input);color:var(--calcite-ui-background)}:host([checked]) .check-svg,:host([indeterminate]) .check-svg{background-color:var(--calcite-ui-brand);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand)}:host([hovered]) .toggle .check-svg,:host .toggle:hover .check-svg{box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}.toggle{outline-color:transparent}.toggle:active,.toggle:focus,.toggle:focus-visible{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";export{f as calcite_checkbox}
|
|
@@ -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.0-next.
|
|
4
|
+
* v1.0.0-next.607
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as i,h as a,g as e}from"./p-
|
|
6
|
+
import{r as t,c as i,h as a,g as e}from"./p-724ffb2b.js";import{u as o}from"./p-ff2616f4.js";const n=class{constructor(a){t(this,a),this.calciteSplitButtonPrimaryClick=i(this,"calciteSplitButtonPrimaryClick",6),this.calciteSplitButtonSecondaryClick=i(this,"calciteSplitButtonSecondaryClick",6),this.appearance="solid",this.color="blue",this.disabled=!1,this.active=!1,this.dropdownIconType="chevron",this.loading=!1,this.overlayPositioning="absolute",this.scale="m",this.width="auto",this.calciteSplitButtonPrimaryClickHandler=t=>this.calciteSplitButtonPrimaryClick.emit(t),this.calciteSplitButtonSecondaryClickHandler=t=>this.calciteSplitButtonSecondaryClick.emit(t)}handleDisabledChange(t){t||(this.active=!1)}activeHandler(){this.disabled&&(this.active=!1)}componentDidRender(){o(this)}render(){return a("div",{class:{"split-button__container":!0,"width-auto":"auto"===this.width,"width-half":"half"===this.width,"width-full":"full"===this.width}},a("calcite-button",{appearance:this.appearance,color:this.color,disabled:this.disabled,"icon-end":this.primaryIconEnd?this.primaryIconEnd:null,"icon-start":this.primaryIconStart?this.primaryIconStart:null,iconFlipRtl:this.primaryIconFlipRtl?this.primaryIconFlipRtl:null,label:this.primaryLabel,loading:this.loading,onClick:this.calciteSplitButtonPrimaryClickHandler,scale:this.scale,splitChild:"primary",type:"button",width:"auto"===this.width?"auto":"full"},this.primaryText),a("div",{class:"split-button__divider-container"},a("div",{class:"split-button__divider"})),a("calcite-dropdown",{active:this.active,disabled:this.disabled,onClick:this.calciteSplitButtonSecondaryClickHandler,overlayPositioning:this.overlayPositioning,placement:"bottom-end",scale:this.scale,width:this.scale},a("calcite-button",{appearance:this.appearance,color:this.color,disabled:this.disabled,"icon-start":this.dropdownIcon,label:this.dropdownLabel,scale:this.scale,slot:"dropdown-trigger",splitChild:"secondary",type:"button"}),a("slot",null)))}get dropdownIcon(){return"chevron"===this.dropdownIconType?"chevronDown":"caret"===this.dropdownIconType?"caretDown":"ellipsis"===this.dropdownIconType?"ellipsis":"handle-vertical"}get el(){return e(this)}static get watchers(){return{disabled:["handleDisabledChange"],active:["activeHandler"]}}};n.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.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}: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}:host .split-button__container{display:flex;align-items:stretch}:host .split-button__container>calcite-dropdown>calcite-button{block-size:100%;vertical-align:top}:host:host([color=blue]){--calcite-split-button-background:var(--calcite-ui-brand);--calcite-split-button-divider:var(--calcite-ui-foreground-1)}:host:host([color=red]){--calcite-split-button-background:var(--calcite-ui-danger);--calcite-split-button-divider:var(--calcite-ui-foreground-1)}:host:host([color=neutral]){--calcite-split-button-background:var(--calcite-ui-foreground-3);--calcite-split-button-divider:var(--calcite-ui-text-1)}:host:host([color=inverse]){--calcite-split-button-background:var(--calcite-ui-inverse);--calcite-split-button-divider:var(--calcite-ui-foreground-1)}:host([appearance=transparent]):host([color=blue]){--calcite-split-button-divider:var(--calcite-ui-brand)}:host([appearance=transparent]):host([color=red]){--calcite-split-button-divider:var(--calcite-ui-danger)}:host([appearance=transparent]):host([color=neutral]){--calcite-split-button-divider:var(--calcite-ui-text-1)}:host([appearance=transparent]):host([color=inverse]){--calcite-split-button-divider:var(--calcite-ui-foreground-1)}:host([appearance=clear]),:host([appearance=transparent]){--calcite-split-button-background:transparent}:host([appearance=outline]){--calcite-split-button-background:var(--calcite-ui-foreground-1)}:host([appearance=clear]):host([color=blue]),:host([appearance=outline]):host([color=blue]){--calcite-split-button-divider:var(--calcite-ui-brand)}:host([appearance=clear]):host([color=red]),:host([appearance=outline]):host([color=red]){--calcite-split-button-divider:var(--calcite-ui-danger)}:host([appearance=clear]):host([color=neutral]),:host([appearance=outline]):host([color=neutral]){--calcite-split-button-divider:var(--calcite-ui-foreground-3)}:host([appearance=clear]):host([color=inverse]),:host([appearance=outline]):host([color=inverse]){--calcite-split-button-divider:var(--calcite-ui-inverse)}.width-auto{inline-size:auto}.width-half{inline-size:50%}.width-full{inline-size:100%}.split-button__divider-container{display:flex;inline-size:1px;align-items:stretch;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;background-color:var(--calcite-split-button-background)}.split-button__divider{margin-block:0.25rem;display:inline-block;inline-size:1px;background-color:var(--calcite-split-button-divider)}:host([appearance=outline]) .split-button__divider-container,:host([appearance=clear]) .split-button__divider-container,:host([appearance=minimal]) .split-button__divider-container{border-block:1px solid var(--calcite-split-button-divider)}:host([appearance=outline]):hover .split-button__divider-container,:host([appearance=clear]):hover .split-button__divider-container,:host([appearance=minimal]):hover .split-button__divider-container{background-color:var(--calcite-split-button-divider)}:host([appearance=outline]:hover) .split-button__divider-container,:host([appearance=clear]:hover) .split-button__divider-container,:host([appearance=minimal]):hover .split-button__divider-container{background-color:var(--calcite-split-button-divider)}:host([appearance=outline]:focus-within):host([color=blue]),:host([appearance=clear]:focus-within):host([color=blue]),:host([appearance=minimal]:focus-within):host([color=blue]){--calcite-split-button-divider:var(--calcite-ui-brand-press)}:host([appearance=outline]:focus-within):host([color=red]),:host([appearance=clear]:focus-within):host([color=red]),:host([appearance=minimal]:focus-within):host([color=red]){--calcite-split-button-divider:var(--calcite-ui-danger-press)}:host([appearance=outline]:focus-within) .split-button__divider-container,:host([appearance=clear]:focus-within) .split-button__divider-container,:host([appearance=minimal]:focus-within) .split-button__divider-container{background-color:var(--calcite-split-button-divider)}:host([disabled]) .split-button__divider-container{opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) calcite-dropdown>calcite-button{pointer-events:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}";export{n as calcite_split_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.0-next.
|
|
4
|
+
* v1.0.0-next.607
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as i,h as e,H as a,g as n,f as o}from"./p-
|
|
6
|
+
import{r as t,c as i,h as e,H as a,g as n,f as o}from"./p-724ffb2b.js";import{c as r}from"./p-befa72be.js";import{u as c}from"./p-ff2616f4.js";import{t as l}from"./p-331f03ef.js";import"./p-2e91306b.js";import"./p-534d76ec.js";const s=class{constructor(e){t(this,e),this.calciteActionClick=i(this,"calciteActionClick",6),this.active=!1,this.appearance="solid",this.compact=!1,this.disabled=!1,this.indicator=!1,this.intlLoading="Loading",this.loading=!1,this.scale="m",this.textEnabled=!1,this.mutationObserver=r("mutation",(()=>o(this))),this.handleTooltipSlotChange=t=>{const i=t.target.assignedElements({flatten:!0}).filter((t=>null==t?void 0:t.matches("calcite-tooltip")))[0];i&&(i.referenceElement=this.buttonEl)},this.calciteActionClickHandler=()=>{this.disabled||this.calciteActionClick.emit()}}connectedCallback(){var t;null===(t=this.mutationObserver)||void 0===t||t.observe(this.el,{childList:!0,subtree:!0})}disconnectedCallback(){var t;null===(t=this.mutationObserver)||void 0===t||t.disconnect()}componentDidRender(){c(this)}async setFocus(){var t;null===(t=this.buttonEl)||void 0===t||t.focus()}renderTextContainer(){const{text:t,textEnabled:i}=this;return t?e("div",{class:{"text-container":!0,"text-container--visible":i},key:"text-container"},t):null}renderIconContainer(){var t;const{loading:i,icon:a,scale:n,el:o,intlLoading:r}=this,c="l"===n?"m":"s",l=i?e("calcite-loader",{active:!0,inline:!0,label:r,scale:"l"===n?"l":"m"}):null,s=a?e("calcite-icon",{icon:a,scale:c}):null,u=l||s,d=u||(null===(t=o.children)||void 0===t?void 0:t.length),b=e("div",{class:{"slot-container":!0,"slot-container--hidden":i}},e("slot",null));return d?e("div",{"aria-hidden":"true",class:"icon-container",key:"icon-container"},u,b):null}render(){const{compact:t,disabled:i,loading:n,textEnabled:o,label:r,text:c}=this,s=r||c,u={button:!0,"button--text-visible":o,"button--compact":t};return e(a,{onClick:this.calciteActionClickHandler},e("button",{"aria-busy":l(n),"aria-disabled":l(i),"aria-label":s,class:u,disabled:i,ref:t=>this.buttonEl=t},this.renderIconContainer(),this.renderTextContainer()),e("slot",{name:"tooltip",onSlotchange:this.handleTooltipSlotChange}))}get el(){return n(this)}};s.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.01}}:host{box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}: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:flex;background-color:transparent;--calcite-action-indicator-color:var(--calcite-ui-brand)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.button{position:relative;margin:0px;display:flex;inline-size:auto;cursor:pointer;align-items:center;justify-content:flex-start;border-style:none;background-color:var(--calcite-ui-foreground-1);fill:var(--calcite-ui-text-3);font-family:var(--calcite-sans-family);font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-3);outline-color:transparent;text-align:unset;flex:1 0 auto}.button:hover{background-color:var(--calcite-ui-foreground-2);fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1)}.button:focus{background-color:var(--calcite-ui-foreground-2);fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1);outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.button:active{background-color:var(--calcite-ui-foreground-3)}.button .icon-container{pointer-events:none;margin:0px;display:flex;align-items:center;justify-content:center;min-inline-size:1rem;min-block-size:1rem}.button .text-container{margin:0px;inline-size:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.5rem;opacity:0;transition-property:opacity;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-property:margin;transition-property:inline-size}.button .text-container--visible{inline-size:auto;flex:1 1 auto;opacity:1}:host([scale=s]) .button{padding-inline:0.5rem;padding-block:0.25rem;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-normal)}:host([scale=s]) .button--text-visible .icon-container{margin-inline-end:0.5rem}:host([scale=m]) .button{padding-inline:1rem;padding-block:0.75rem;font-size:var(--calcite-font-size--1);line-height:1rem;font-weight:var(--calcite-font-weight-normal)}:host([scale=m]) .button--text-visible .icon-container{margin-inline-end:0.75rem}:host([scale=l]) .button{padding:1.25rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;font-weight:var(--calcite-font-weight-normal)}:host([scale=l]) .button--text-visible .icon-container{margin-inline-end:1rem}:host([alignment=center]) .button{justify-content:center}:host([alignment=end]) .button{justify-content:flex-end}:host([alignment=center]) .button .text-container--visible,:host([alignment=end]) .button .text-container--visible{flex:0 1 auto}:host([scale=s][compact]) .button,:host([scale=m][compact]) .button,:host([scale=l][compact]) .button{padding-inline:0px}.slot-container{display:flex}.slot-container--hidden{display:none}.button--text-visible{inline-size:100%}:host([active]) .button,:host([active]) .button:hover,:host([active]) .button:focus,:host([active][loading]) .button{background-color:var(--calcite-ui-foreground-3);fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1)}:host([active]) .button:active{background-color:var(--calcite-ui-foreground-1)}:host([appearance=clear]) .button,:host([appearance=transparent]) .button{background-color:transparent;transition-property:box-shadow;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host([appearance=clear]) .button:hover,:host([appearance=clear]) .button:focus,:host([appearance=transparent]) .button:hover,:host([appearance=transparent]) .button:focus{background-color:transparent;box-shadow:0 0 0 2px var(--calcite-ui-border-1) inset}:host([active][appearance=clear]) .button,:host([active][appearance=clear]) .button:hover,:host([active][appearance=clear]) .button:focus,:host([active][appearance=transparent]) .button,:host([active][appearance=transparent]) .button:hover,:host([active][appearance=transparent]) .button:focus{background-color:var(--calcite-ui-foreground-3);fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1)}:host([appearance=clear][loading]) .button,:host([appearance=clear][disabled]) .button,:host([appearance=transparent][loading]) .button,:host([appearance=transparent][disabled]) .button{background-color:transparent}:host([loading]) .button,:host([loading]) .button:hover,:host([loading]) .button:focus{background-color:var(--calcite-ui-foreground-1)}:host([loading]) .button .text-container,:host([loading]) .button:hover .text-container,:host([loading]) .button:focus .text-container{opacity:var(--calcite-ui-opacity-disabled)}:host([loading]) calcite-loader[inline]{color:var(--calcite-ui-text-3);margin-inline-end:0px}:host([disabled]) .button,:host([disabled]) .button:hover,:host([disabled]) .button:focus{cursor:default;background-color:var(--calcite-ui-foreground-1);opacity:var(--calcite-ui-opacity-disabled)}:host([disabled][active]) .button,:host([disabled][active]) .button:hover,:host([disabled][active]) .button:focus{background-color:var(--calcite-ui-foreground-3);opacity:var(--calcite-ui-opacity-disabled)}:host([indicator]) .button::after{content:"";position:absolute;block-size:0.5rem;inline-size:0.5rem;border-radius:9999px;border-width:2px;background-color:var(--calcite-action-indicator-color);border-color:var(--calcite-ui-foreground-1);inset-block-end:0.75rem;inset-inline-end:0.75rem}:host([indicator]) .button--text-visible::after{inset-block-end:auto}:host([indicator]) .button--text-visible .text-container--visible{margin-inline-end:1rem}:host([indicator]) .button:hover::after,:host([indicator]) .button:focus::after{border-color:var(--calcite-ui-foreground-1)}:host([indicator][scale=s]) .button::after{inset-block-end:0.25rem;inset-inline-end:0.25rem}:host([indicator][scale=s]) .button--text-visible::after{inset-block-end:auto;inset-inline-end:0.5rem}:host([indicator][active]) .button::after{border-color:var(--calcite-ui-foreground-3)}';export{s as calcite_action}
|
|
@@ -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.0-next.
|
|
4
|
+
* v1.0.0-next.607
|
|
5
5
|
*/
|
|
6
|
-
import{a as r,S as t,i as n,b as e,c as o,r as u,f}from"./p-
|
|
6
|
+
import{a as r,S as t,i as n,b as e,c as o,r as u,f}from"./p-a9c93bf7.js";var c=Array.isArray,a=t?t.prototype:void 0,i=a?a.toString:void 0;function l(t){if("string"==typeof t)return t;if(c(t))return function(r,t){for(var n=-1,e=null==r?0:r.length,o=Array(e);++n<e;)o[n]=t(r[n],n,r);return o}(t,l)+"";if(r(t))return i?i.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}function s(r){return r}var v=/^(?:0|[1-9]\d*)$/;function b(r,t){var n=typeof r;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&v.test(r))&&r>-1&&r%1==0&&r<t}function p(r){return"number"==typeof r&&r>-1&&r%1==0&&r<=9007199254740991}var y=Object.prototype;function d(r){return o(r)&&"[object Arguments]"==e(r)}var j=Object.prototype,m=j.hasOwnProperty,x=j.propertyIsEnumerable,g=d(function(){return arguments}())?d:function(r){return o(r)&&m.call(r,"callee")&&!x.call(r,"callee")},O="object"==typeof exports&&exports&&!exports.nodeType&&exports,h=O&&"object"==typeof module&&module&&!module.nodeType&&module,A=h&&h.exports===O?u.Buffer:void 0,F=(A?A.isBuffer:void 0)||function(){return!1},$={};$["[object Float32Array]"]=$["[object Float64Array]"]=$["[object Int8Array]"]=$["[object Int16Array]"]=$["[object Int32Array]"]=$["[object Uint8Array]"]=$["[object Uint8ClampedArray]"]=$["[object Uint16Array]"]=$["[object Uint32Array]"]=!0,$["[object Arguments]"]=$["[object Array]"]=$["[object ArrayBuffer]"]=$["[object Boolean]"]=$["[object DataView]"]=$["[object Date]"]=$["[object Error]"]=$["[object Function]"]=$["[object Map]"]=$["[object Number]"]=$["[object Object]"]=$["[object RegExp]"]=$["[object Set]"]=$["[object String]"]=$["[object WeakMap]"]=!1;var w,E="object"==typeof exports&&exports&&!exports.nodeType&&exports,R=E&&"object"==typeof module&&module&&!module.nodeType&&module,S=R&&R.exports===E&&f.process,k=function(){try{return R&&R.require&&R.require("util").types||S&&S.binding&&S.binding("util")}catch(r){}}(),G=k&&k.isTypedArray,L=G?(w=G,function(r){return w(r)}):function(r){return o(r)&&p(r.length)&&!!$[e(r)]},N=Object.prototype.hasOwnProperty;var P=Object.prototype.hasOwnProperty;function T(r){return null!=(t=r)&&p(t.length)&&!function(r){if(!n(r))return!1;var t=e(r);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}(t)?function(r,t){var n=c(r),e=!n&&g(r),o=!n&&!e&&F(r),u=!n&&!e&&!o&&L(r),f=n||e||o||u,a=f?function(r,t){for(var n=-1,e=Array(r);++n<r;)e[n]=t(n);return e}(r.length,String):[],i=a.length;for(var l in r)!t&&!N.call(r,l)||f&&("length"==l||o&&("offset"==l||"parent"==l)||u&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||b(l,i))||a.push(l);return a}(r,!0):function(r){if(!n(r))return function(r){var t=[];if(null!=r)for(var n in Object(r))t.push(n);return t}(r);var t,e,o=(t=r)===("function"==typeof(e=t&&t.constructor)&&e.prototype||y),u=[];for(var f in r)("constructor"!=f||!o&&P.call(r,f))&&u.push(f);return u}(r);var t}var q=/[\\^$.*+?()[\]{}|]/g,z=RegExp(q.source);function B(r,t){return null==r?r:function(r,t,n){for(var e=-1,o=Object(r),u=n(r),f=u.length;f--;){var c=u[++e];if(!1===t(o[c],c,o))break}return r}(r,"function"==typeof(n=t)?n:s,T);var n}const C=(r,t)=>{const n=function(r){var t;return(r=null==(t=r)?"":l(t))&&z.test(r)?r.replace(q,"\\$&"):r}(t),e=new RegExp(n,"i");0===r.length&&console.warn("No data was passed to the filter function.\n The data argument should be an array of objects");const o=(r,t)=>{if((null==r?void 0:r.constant)||(null==r?void 0:r.filterDisabled))return!0;let n=!1;return B(r,(r=>{"function"!=typeof r&&null!=r&&(Array.isArray(r)||"object"==typeof r&&null!==r?o(r,t)&&(n=!0):t.test(r)&&(n=!0))})),n};return r.filter((r=>o(r,e)))};export{C as f}
|
|
@@ -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.0-next.
|
|
4
|
+
* v1.0.0-next.607
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,h as i,F as e,g as n}from"./p-
|
|
6
|
+
import{r as t,h as i,F as e,g as n}from"./p-724ffb2b.js";import{g as a}from"./p-331f03ef.js";import{c as o,d as c}from"./p-15fac2ab.js";import{u as r}from"./p-ff2616f4.js";import"./p-2e91306b.js";import"./p-534d76ec.js";import"./p-befa72be.js";const s=class{constructor(i){t(this,i),this.active=!1,this.disabled=!1,this.embed=!1,this.focused=!1,this.hidden=!1}connectedCallback(){o(this)}disconnectedCallback(){c(this)}componentDidRender(){r(this)}renderTile(){const{icon:t,el:e,heading:n,description:o}=this,c=n&&t&&!o;return i("div",{class:{container:!0,"large-visual":c}},t&&i("div",{class:"icon"},i("calcite-icon",{icon:t,scale:"l",style:c?{height:"64px",width:"64px"}:void 0})),i("div",{class:"content-container"},a(e,"content-start")?i("div",{class:"content-slot-container"},i("slot",{name:"content-start"})):null,i("div",{class:"content"},n&&i("div",{class:"heading"},n),o&&i("div",{class:"description"},o)),a(e,"content-end")?i("div",{class:"content-slot-container"},i("slot",{name:"content-end"})):null))}render(){return i(e,null,this.href?i("calcite-link",{disabled:this.disabled,href:this.href},this.renderTile()):this.renderTile())}get el(){return n(this)}};s.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.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}: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{box-sizing:border-box;display:inline-block;-webkit-user-select:none;user-select:none;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-3);transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host .container{pointer-events:none;display:grid;grid-template-columns:repeat(1, minmax(0, 1fr));gap:0.5rem}:host .content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;gap:0.5rem;inline-size:10%}:host .content-container{display:flex;inline-size:100%;flex:1 1 auto;align-items:stretch;padding:0px;color:var(--calcite-ui-text-2);outline-color:transparent}:host .content-slot-container{display:flex;align-items:center;background-color:var(--calcite-ui-foreground-1)}:host .content-slot-container:first-child{padding-inline:0 0.75rem}:host .content-slot-container:last-child{padding-inline:0.75rem 0}:host .heading{pointer-events:none;overflow-wrap:break-word;font-size:var(--calcite-font-size--1);line-height:1.375;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-2);transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host .large-visual{align-items:center;text-align:center;min-block-size:12rem}:host .large-visual .icon{display:flex;justify-content:center;align-self:flex-end}:host .large-visual .content-container{align-self:center}:host .description{pointer-events:none;overflow-wrap:break-word;font-size:var(--calcite-font-size--2);line-height:1.375;color:var(--calcite-ui-text-3);transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host(:not([embed])){padding:0.75rem;box-shadow:0 0 0 1px var(--calcite-ui-border-2)}:host(:not([embed])[href]:hover){cursor:pointer;box-shadow:0 0 0 2px var(--calcite-ui-brand)}:host(:not([embed])[href]:active){box-shadow:0 0 0 3px var(--calcite-ui-brand)}:host([icon][heading]:not([description]):not([embed])){padding:0px}:host([icon][heading]:not([description])) .icon{display:flex;justify-content:center}:host([icon][heading]:not([description])) .large-visual{text-align:center}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host(:hover) .heading,:host([active]) .heading{color:var(--calcite-ui-text-1)}:host(:hover) .description,:host([active]) .description{color:var(--calcite-ui-text-2)}";export{s as calcite_tile}
|
|
@@ -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.0-next.
|
|
4
|
+
* v1.0.0-next.607
|
|
5
5
|
*/
|
|
6
6
|
const t=()=>[2,1,1,1,3].map((t=>{let e="";for(let r=0;r<t;r++)e+=(65536*(1+Math.random())|0).toString(16).substring(1);return e})).join("-");export{t as g}
|
|
@@ -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.0-next.
|
|
4
|
+
* v1.0.0-next.607
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as e,h as i,g as n}from"./p-2eeff261.js";import{i as a,a as r,f as s,d as o}from"./p-98a6c8a4.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-eb47be9d.js";import{c as g}from"./p-1ed53169.js";import{u as b}from"./p-f69de408.js";import{i as y}from"./p-74cc2ffc.js";import{d as v,i as w}from"./p-edbb9009.js";import"./p-54c6ec8e.js";import"./p-9c59c88e.js";function k(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 x={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]},M=k((function(t){var e=Array.prototype.concat,i=Array.prototype.slice,n=t.exports=function(t){for(var n,a=[],r=0,s=t.length;r<s;r++){var o=t[r];(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))}}})),C=k((function(t){var e=Object.hasOwnProperty,i={};for(var n in x)e.call(x,n)&&(i[x[n]]=n);var a=t.exports={to:{},get:{}};function r(t,e,i){return Math.min(Math.max(e,t),i)}function s(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,s=[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;s[n]=parseInt(i.slice(o,o+2),16)}a&&(s[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++)s[n]=parseInt(i[n]+i[n],16);a&&(s[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++)s[n]=parseInt(i[n+1],0);i[4]&&(s[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(x,i[1])?((s=x[i[1]])[3]=1,s):null:null;for(n=0;n<3;n++)s[n]=Math.round(2.55*parseFloat(i[n+1]));i[4]&&(s[3]=i[5]?.01*parseFloat(i[4]):parseFloat(i[4]))}for(n=0;n<3;n++)s[n]=r(s[n],0,255);return s[3]=r(s[3],0,1),s},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,r(parseFloat(e[2]),0,100),r(parseFloat(e[3]),0,100),r(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,r(parseFloat(e[2]),0,100),r(parseFloat(e[3]),0,100),r(isNaN(i)?1:i,0,1)]}return null},a.to.hex=function(){var t=M(arguments);return"#"+s(t[0])+s(t[1])+s(t[2])+(t[3]<1?s(Math.round(255*t[3])):"")},a.to.rgb=function(){var t=M(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=M(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=M(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=M(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)]}})),S={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 j={};for(const t of Object.keys(S))j[S[t]]=t;const D={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 F=D;for(const t of Object.keys(D)){if(!("channels"in D[t]))throw new Error("missing channels property: "+t);if(!("labels"in D[t]))throw new Error("missing channel labels property: "+t);if(D[t].labels.length!==D[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:i}=D[t];delete D[t].channels,delete D[t].labels,Object.defineProperty(D[t],"channels",{value:e}),Object.defineProperty(D[t],"labels",{value:i})}function z(t,e){return function(i){return e(t(i))}}function A(t,e){const i=[e[t].parent,t];let n=F[e[t].parent][t],a=e[t].parent;for(;e[a].parent;)i.unshift(e[a].parent),n=z(F[e[a].parent][a],n),a=e[a].parent;return n.conversion=i,n}D.rgb.hsl=function(t){const e=t[0]/255,i=t[1]/255,n=t[2]/255,a=Math.min(e,i,n),r=Math.max(e,i,n),s=r-a;let o,l;r===a?o=0:e===r?o=(i-n)/s:i===r?o=2+(n-e)/s:n===r&&(o=4+(e-i)/s),o=Math.min(60*o,360),o<0&&(o+=360);const c=(a+r)/2;return l=r===a?0:c<=.5?s/(r+a):s/(2-r-a),[o,100*l,100*c]},D.rgb.hsv=function(t){let e,i,n,a,r;const s=t[0]/255,o=t[1]/255,l=t[2]/255,c=Math.max(s,o,l),h=c-Math.min(s,o,l),u=function(t){return(c-t)/6/h+.5};return 0===h?(a=0,r=0):(r=h/c,e=u(s),i=u(o),n=u(l),s===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*r,100*c]},D.rgb.hwb=function(t){const e=t[0],i=t[1];let n=t[2];const a=D.rgb.hsl(t)[0],r=1/255*Math.min(e,Math.min(i,n));return n=1-1/255*Math.max(e,Math.max(i,n)),[a,100*r,100*n]},D.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]},D.rgb.keyword=function(t){const e=j[t];if(e)return e;let i,n=1/0;for(const e of Object.keys(S)){const s=((a=t)[0]-(r=S[e])[0])**2+(a[1]-r[1])**2+(a[2]-r[2])**2;s<n&&(n=s,i=e)}var a,r;return i},D.keyword.rgb=function(t){return S[t]},D.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)]},D.rgb.lab=function(t){const e=D.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)]},D.hsl.rgb=function(t){const e=t[0]/360,i=t[1]/100,n=t[2]/100;let a,r,s;if(0===i)return s=255*n,[s,s,s];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++)r=e+1/3*-(t-1),r<0&&r++,r>1&&r--,s=6*r<1?o+6*(a-o)*r:2*r<1?a:3*r<2?o+(a-o)*(2/3-r)*6:o,l[t]=255*s;return l},D.hsl.hsv=function(t){const e=t[0];let i=t[1]/100,n=t[2]/100,a=i;const r=Math.max(n,.01);return n*=2,i*=n<=1?n:2-n,a*=r<=1?r:2-r,[e,100*(0===n?2*a/(r+a):2*i/(n+i)),(n+i)/2*100]},D.hsv.rgb=function(t){const e=t[0]/60,i=t[1]/100;let n=t[2]/100;const a=Math.floor(e)%6,r=e-Math.floor(e),s=255*n*(1-i),o=255*n*(1-i*r),l=255*n*(1-i*(1-r));switch(n*=255,a){case 0:return[n,l,s];case 1:return[o,n,s];case 2:return[s,n,l];case 3:return[s,o,n];case 4:return[l,s,n];case 5:return[n,s,o]}},D.hsv.hsl=function(t){const e=t[0],i=t[1]/100,n=t[2]/100,a=Math.max(n,.01);let r,s;s=(2-i)*n;const o=(2-i)*a;return r=i*a,r/=o<=1?o:2-o,r=r||0,s/=2,[e,100*r,100*s]},D.hwb.rgb=function(t){const e=t[0]/360;let i=t[1]/100,n=t[2]/100;const a=i+n;let r;a>1&&(i/=a,n/=a);const s=Math.floor(6*e),o=1-n;r=6*e-s,0!=(1&s)&&(r=1-r);const l=i+r*(o-i);let c,h,u;switch(s){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]},D.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))]},D.xyz.rgb=function(t){const e=t[0]/100,i=t[1]/100,n=t[2]/100;let a,r,s;return a=3.2406*e+-1.5372*i+-.4986*n,r=-.9689*e+1.8758*i+.0415*n,s=.0557*e+-.204*i+1.057*n,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,a=Math.min(Math.max(0,a),1),r=Math.min(Math.max(0,r),1),s=Math.min(Math.max(0,s),1),[255*a,255*r,255*s]},D.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)]},D.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,r=e**3,s=n**3;return i=a>.008856?a:(i-16/116)/7.787,e=r>.008856?r:(e-16/116)/7.787,n=s>.008856?s:(n-16/116)/7.787,e*=95.047,i*=100,n*=108.883,[e,i,n]},D.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]},D.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)]},D.rgb.ansi16=function(t,e=null){const[i,n,a]=t;let r=null===e?D.rgb.hsv(t)[2]:e;if(r=Math.round(r/50),0===r)return 30;let s=30+(Math.round(a/255)<<2|Math.round(n/255)<<1|Math.round(i/255));return 2===r&&(s+=60),s},D.hsv.ansi16=function(t){return D.rgb.ansi16(D.hsv.rgb(t),t[2])},D.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)},D.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]},D.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]},D.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},D.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]},D.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),r=Math.min(Math.min(e,i),n),s=a-r;let o,l;return o=s<1?r/(1-s):0,l=s<=0?0:a===e?(i-n)/s%6:a===i?2+(n-e)/s:4+(e-i)/s,l/=6,l%=1,[360*l,100*s,100*o]},D.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]},D.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]},D.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,r=a%1,s=1-r;let o=0;switch(Math.floor(a)){case 0:n[0]=1,n[1]=r,n[2]=0;break;case 1:n[0]=s,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=r;break;case 3:n[0]=0,n[1]=s,n[2]=1;break;case 4:n[0]=r,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=s}return o=(1-e)*i,[255*(e*n[0]+o),255*(e*n[1]+o),255*(e*n[2]+o)]},D.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]},D.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]},D.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)]},D.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]},D.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},D.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},D.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},D.gray.hsl=function(t){return[0,0,t[0]]},D.gray.hsv=D.gray.hsl,D.gray.hwb=function(t){return[0,100,t[0]]},D.gray.cmyk=function(t){return[0,0,0,t[0]]},D.gray.lab=function(t){return[t[0],0,0]},D.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},D.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};const _={};Object.keys(F).forEach((t=>{_[t]={},Object.defineProperty(_[t],"channels",{value:F[t].channels}),Object.defineProperty(_[t],"labels",{value:F[t].labels});const e=function(t){const e=function(t){const e=function(){const t={},e=Object.keys(F);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(F[t]);for(let a=n.length,r=0;r<a;r++){const a=n[r],s=e[a];-1===s.distance&&(s.distance=e[t].distance+1,s.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]=A(t,e))}return i}(t);Object.keys(e).forEach((i=>{const n=e[i];_[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),_[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 O=_;const q=["keyword","gray","hex"],$={};for(const t of Object.keys(O))$[[...O[t].labels].sort().join("")]=t;const I={};function E(t,e){if(!(this instanceof E))return new E(t,e);if(e&&e in q&&(e=null),e&&!(e in O))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 E)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=C.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,n=O[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=O[this.model].channels;const i=Array.prototype.slice.call(t,0,n);this.color=P(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 $))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=$[n];const{labels:a}=O[this.model],r=[];for(i=0;i<a.length;i++)r.push(t[a[i]]);this.color=P(r)}if(I[this.model])for(n=O[this.model].channels,i=0;i<n;i++){const t=I[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)}E.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in C.to?this:this.rgb();e=e.round("number"==typeof t?t:1);const i=1===e.valpha?e.color:[...e.color,this.valpha];return C.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 C.to.rgb.percent(i)},array(){return 1===this.valpha?[...this.color]:[...this.color,this.valpha]},object(){const t={},{channels:e}=O[this.model],{labels:i}=O[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 E([...this.color.map(N(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new E([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:H("rgb",0,K(255)),green:H("rgb",1,K(255)),blue:H("rgb",2,K(255)),hue:H(["hsl","hsv","hsl","hwb","hcg"],0,(t=>(t%360+360)%360)),saturationl:H("hsl",1,K(100)),lightness:H("hsl",2,K(100)),saturationv:H("hsv",1,K(100)),value:H("hsv",2,K(100)),chroma:H("hcg",1,K(100)),gray:H("hcg",2,K(100)),white:H("hwb",1,K(100)),wblack:H("hwb",2,K(100)),cyan:H("cmyk",0,K(100)),magenta:H("cmyk",1,K(100)),yellow:H("cmyk",2,K(100)),black:H("cmyk",3,K(100)),x:H("xyz",0,K(95.047)),y:H("xyz",1,K(100)),z:H("xyz",2,K(108.833)),l:H("lab",0,K(100)),a:H("lab",1),b:H("lab",2),keyword(t){return void 0!==t?new E(t):O[this.model].keyword(this.color)},hex(t){return void 0!==t?new E(t):C.to.hex(this.rgb().round().color)},hexa(t){if(void 0!==t)return new E(t);const e=this.rgb().round().color;let i=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===i.length&&(i="0"+i),C.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 E.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,r=2*a-1,s=i.alpha()-n.alpha(),o=((r*s==-1?r:(r+s)/(1+r*s))+1)/2,l=1-o;return E.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(O)){if(q.includes(t))continue;const{channels:e}=O[t];E.prototype[t]=function(...e){return this.model===t?new E(this):new E(e.length>0?e:[...(i=O[this.model][t].raw(this.color),Array.isArray(i)?i:[i]),this.valpha],t);var i},E[t]=function(...i){let n=i[0];return"number"==typeof n&&(n=P(i,e)),new E(n,t)}}function N(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function H(t,e,i){t=Array.isArray(t)?t:[t];for(const n of t)(I[n]||(I[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 K(t){return function(e){return Math.max(0,Math.min(t,e))}}function P(t,e){for(let i=0;i<e;i++)"number"!=typeof t[i]&&(t[i]=0);return t}var R=E;const U=R("#007AC2"),V={r:255,g:255,b:255},L={h:360,s:100,v:100},B={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}}},T=l(U.hex()),G=class{constructor(n){var s,o,h,u;t(this,n),this.calciteColorPickerChange=e(this,"calciteColorPickerChange",6),this.calciteColorPickerInput=e(this,"calciteColorPickerInput",6),this.allowEmpty=!1,this.appearance="solid",this.color=U,this.disabled=!1,this.format="auto",this.hideHex=!1,this.hideChannels=!1,this.hideSaved=!1,this.intlB="B",this.intlBlue="Blue",this.intlDeleteColor="Delete color",this.intlG="G",this.intlGreen="Green",this.intlH="H",this.intlHsv="HSV",this.intlHex="Hex",this.intlHue="Hue",this.intlNoColor="No color",this.intlR="R",this.intlRed="Red",this.intlRgb="RGB",this.intlS="S",this.intlSaturation="Saturation",this.intlSaveColor="Save color",this.intlSaved="Saved",this.intlV="V",this.intlValue="Value",this.scale="m",this.value=T,this.colorFieldAndSliderHovered=!1,this.hueThumbState="idle",this.internalColorUpdateContext=null,this.mode=c.HEX,this.shiftKeyChannelAdjustment=0,this.sliderThumbState="idle",this.colorFieldAndSliderInteractive=!1,this.channelMode="rgb",this.channels=this.toChannels(U),this.dimensions=B.m,this.savedColors=[],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,r=this.baseColorFieldColor.hue(),s=this.baseColorFieldColor.hue(r+a);this.internalColorSet(s,!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(R(n)):this.internalColorSet(null)},this.handleSavedColorSelect=t=>{this.internalColorSet(R(t.currentTarget.color))},this.handleChannelInput=t=>{const e=t.currentTarget,i=t.detail.nativeEvent.target,n=Number(e.getAttribute("data-channel-index")),a="rgb"===this.channelMode?V[Object.keys(V)[n]]:L[Object.keys(L)[n]];let r;if(this.allowEmpty&&!e.value)r="";else{const t=Number(e.value)+this.shiftKeyChannelAdjustment;r=g(t,0,a).toString()}e.value=r,i.value=r},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=>{y(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=>{var e,i;if(!a(t))return;const{offsetX:n,offsetY:r}=t,s=this.getCanvasRegion(r);"color-field"===s?(this.hueThumbState="drag",this.captureColorFieldColor(n,r),null===(e=this.colorFieldScopeNode)||void 0===e||e.focus()):"slider"===s&&(this.sliderThumbState="drag",this.captureHueSliderColor(n),null===(i=this.hueScopeNode)||void 0===i||i.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,r;const s=this.activeColorFieldAndSliderRect,{clientX:o,clientY:l}=t;if(this.colorFieldAndSliderHovered)a=o-s.x,r=l-s.y;else{const t=i.colorField.width,e=i.colorField.height,n=i.slider.height;a=o<s.x+t&&o>s.x?o-s.x:o<s.x?0:t-1,r=l<s.y+e+n&&l>s.y?l-s.y:l<s.y?0:e+n}n?this.captureColorFieldColor(a,r,!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 r=this.getCanvasRegion(e);if("color-field"===r){const n=this.hueThumbState,r=this.baseColorFieldColor.hsv(),s=Math.round(r.saturationv()/(L.s/i.width)),o=Math.round(i.height-r.value()/(L.v/i.height)),l=this.containsPoint(t,e,s,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"===r){const r=this.baseColorFieldColor.hsv().saturationv(100).value(100),s=this.sliderThumbState,o=Math.round(r.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"===s&&c?(this.sliderThumbState="hover",h=!0):"hover"!==s||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,intlRgb:n,intlHsv:a}=this;return i("calcite-tab-title",{active:t===e,class:"color-mode","data-color-mode":t,key:t,onCalciteTabsActivate:this.handleTabActivate},"rgb"===t?n:a)},this.renderChannelsTab=t=>{const{channelMode:e,channels:n,intlB:a,intlBlue:s,intlG:o,intlGreen:l,intlH:c,intlHue:h,intlR:u,intlRed:d,intlS:m,intlSaturation:f,intlV:p,intlValue:g}=this,b=t===e,y="rgb"===t,v=y?[u,o,a]:[c,m,p],w=y?[d,l,s]:[h,f,g],k=r(this.el);return i("calcite-tab",{active:b,class:"control",key:t},i("div",{class:"channels",dir:"ltr"},n.map(((t,e)=>this.renderChannel(t,e,v[e],w[e],k)))))},this.renderChannel=(t,e,n,a,r)=>i("calcite-input",{class:"channel","data-channel-index":e,dir:r,label:a,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:null==t?void 0: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=(s=()=>{this.fieldAndSliderRenderingContext&&(this.drawColorField(),this.drawHueSlider())},h=!0,u=!0,w(o)&&(h="leading"in o?!!o.leading:h,u="trailing"in o?!!o.trailing:u),v(s,16,{leading:h,maxWait:16,trailing:u})),this.captureColorFieldColor=(t,e,i=!0)=>{const{dimensions:{colorField:{height:n,width:a}}}=this,r=Math.round(L.s/a*t),s=Math.round(L.v/n*(n-e));this.internalColorSet(this.baseColorFieldColor.hsv().saturationv(r).value(s),i)},this.initColorFieldAndSlider=t=>{this.fieldAndSliderRenderingContext=t.getContext("2d"),this.updateCanvasSize(t)}}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"){var e;this.updateDimensions(t),this.updateCanvasSize(null===(e=this.fieldAndSliderRenderingContext)||void 0===e?void 0:e.canvas)}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 r="drag"===this.sliderThumbState||"drag"===this.hueThumbState;if("initial"===this.internalColorUpdateContext)return;if("user-interaction"===this.internalColorUpdateContext)return this.calciteColorPickerInput.emit(),void(r||this.calciteColorPickerChange.emit());const s=i&&!t?null:R(t),o=!u(s,this.color);(a||o)&&this.internalColorSet(s,!0,"internal")}get baseColorFieldColor(){return this.color||this.previousColor||U}handleChannelKeyUpOrDown(t){this.shiftKeyChannelAdjustment=0;const{key:e}=t;if("ArrowUp"!==e&&"ArrowDown"!==e||!t.composedPath().some((t=>{var e;return null===(e=t.classList)||void 0===e?void 0:e.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(){return s(this.colorFieldScopeNode)}componentWillLoad(){const{allowEmpty:t,color:e,format:i,value:n}=this,a=t&&!n,r=h(n),s=a||"auto"===i&&r||i===r,o=a?null:s?R(n):e;s||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)))}disconnectedCallback(){document.removeEventListener("pointermove",this.globalPointerMoveHandler),document.removeEventListener("pointerup",this.globalPointerUpHandler)}componentDidRender(){b(this)}render(){const{allowEmpty:t,color:e,intlDeleteColor:n,hideHex:a,hideChannels:r,hideSaved:s,intlHex:o,intlSaved:l,intlSaveColor:c,savedColors:h,scale:u}=this,d=e?e.hex():null,m="l"===u?"m":"s",{colorFieldAndSliderInteractive:f,colorFieldScopeTop:p,colorFieldScopeLeft:g,hueScopeLeft:b,hueScopeTop:y,scopeOrientation:v,dimensions:{colorField:{height:w,width:k},slider:{height:x}}}=this,M=null!=y?y:x/2+w,C=null!=b?b:k*U.hue()/L.h,S=null===e,j="vertical"===v;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":f},onPointerDown:this.handleColorFieldAndSliderPointerDown,onPointerEnter:this.handleColorFieldAndSliderPointerEnterOrMove,onPointerLeave:this.handleColorFieldAndSliderPointerLeave,onPointerMove:this.handleColorFieldAndSliderPointerEnterOrMove,ref:this.initColorFieldAndSlider}),i("div",{"aria-label":j?this.intlValue:this.intlSaturation,"aria-valuemax":j?L.v:L.s,"aria-valuemin":"0","aria-valuenow":(j?null==e?void 0:e.saturationv():null==e?void 0:e.value())||"0",class:{scope:!0,"scope--color-field":!0},onKeyDown:this.handleColorFieldScopeKeyDown,ref:this.storeColorFieldScope,role:"slider",style:{top:`${p||0}px`,left:`${g||0}px`},tabindex:"0"}),i("div",{"aria-label":this.intlHue,"aria-valuemax":L.h,"aria-valuemin":"0","aria-valuenow":(null==e?void 0:e.round().hue())||U.round().hue(),class:{scope:!0,"scope--hue":!0},onKeyDown:this.handleHueScopeKeyDown,ref:this.storeHueScope,role:"slider",style:{top:`${M}px`,left:`${C}px`},tabindex:"0"})),a&&r?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}},o),i("calcite-color-picker-hex-input",{allowEmpty:t,class:"control",numberingSystem:this.numberingSystem,onCalciteColorPickerHexInputChange:this.handleHexInputChange,scale:m,value:d})),r?null:i("calcite-tabs",{class:{"color-mode-container":!0,"section--split":!0},scale:m},i("calcite-tab-nav",{slot:"tab-nav"},this.renderChannelsTabTitle("rgb"),this.renderChannelsTabTitle("hsv")),this.renderChannelsTab("rgb"),this.renderChannelsTab("hsv"))),s?null:i("div",{class:{"saved-colors-section":!0,section:!0}},i("div",{class:"header"},i("label",null,l),i("div",{class:"saved-colors-buttons"},i("calcite-button",{appearance:"transparent",class:"delete-color",color:"neutral",disabled:S,iconStart:"minus",label:n,onClick:this.deleteColor,scale:m,type:"button"}),i("calcite-button",{appearance:"transparent",class:"save-color",color:"neutral",disabled:S,iconStart:"plus",label:c,onClick:this.saveColor,scale:m,type:"button"}))),h.length>0?i("div",{class:"saved-colors"},[...h.map((t=>i("calcite-color-picker-swatch",{active:d===t,class:"saved-color",color:t,key:t,onClick:this.handleSavedColorSelect,onKeyDown:this.handleSavedColorKeyDown,scale:u,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=B[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,r=e.saturationv()/(L.s/n),s=i-e.value()/(L.v/i);requestAnimationFrame((()=>{this.colorFieldScopeLeft=r,this.colorFieldScopeTop=s})),this.drawThumb(this.fieldAndSliderRenderingContext,a,r,s,e,this.hueThumbState)}drawThumb(t,e,i,n,a,r){const s=2*Math.PI;t.beginPath(),t.arc(i,n,e,0,s),t.shadowBlur="hover"===r?32:16,t.shadowColor=`rgba(0, 0, 0, ${"drag"===r?.32:.16})`,t.fillStyle="#fff",t.fill(),t.beginPath(),t.arc(i,n,e-3,0,s),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:r}}}=this,s=e.hue()/(360/a),o=n/2+i;requestAnimationFrame((()=>{this.hueScopeLeft=s,this.hueScopeTop=o})),this.drawThumb(this.fieldAndSliderRenderingContext,r,s,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),r=["red","yellow","lime","cyan","blue","magenta","red"],s=1/(r.length-1);let o=0;r.forEach((t=>{a.addColorStop(o,R(t).string()),o+=s})),t.fillStyle=a,t.clearRect(0,e,n,i+2*this.getSliderCapSpacing()),t.fillRect(0,e,n,i),this.drawActiveHueSliderColor()}updateColorFromChannels(t){this.internalColorSet(R(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)))}get el(){return n(this)}static get watchers(){return{color:["handleColorChange"],format:["handleFormatChange"],scale:["handleScaleChange"],value:["handleValueChange"]}}};G.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.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}: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}:host([appearance=minimal]) .container{border:none}.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 J=R(),W=class{constructor(i){t(this,i),this.calciteColorPickerHexInputChange=e(this,"calciteColorPickerHexInputChange",6),this.allowEmpty=!1,this.intlHex="Hex",this.intlNoColor="No color",this.scale="m",this.value=l(J.hex()),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.internalColor=J,this.previousNonNullValue=this.value,this.storeInputRef=t=>{this.inputNode=t}}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)}handleValueChange(t,e){this.internalSetValue(t,e,!1)}onInputKeyDown(t){const{altKey:e,ctrlKey:i,metaKey:n,shiftKey:a}=t,{internalColor:r,value:s}=this,{key:o}=t;if("Tab"===o||"Enter"===o)return void this.onInputChange();const c=this.value;if("ArrowDown"===o||"ArrowUp"===o)return s?(this.internalSetValue(l(this.nudgeRGBChannels(r,(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{intlHex:t,value:e}=this,n=this.formatForInternalInput(e);return i("div",{class:"container"},i("calcite-input",{class:"input",label:t,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:n}),n?i("calcite-color-picker-swatch",{active:!0,class:"preview",color:`#${n}`,scale:this.scale}):null)}async setFocus(){s(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=R(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 R.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"]}}};W.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.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}: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 X=class{constructor(e){t(this,e),this.active=!1,this.scale="m"}handleColorChange(t){this.internalColor=R(t)}componentWillLoad(){this.handleColorChange(this.color)}render(){const{active:t,el:e,internalColor:n}=this,a=t?"100%":"0",r=n.hex(),s="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,r),i("rect",{fill:r,height:"100%",id:"swatch",rx:a,stroke:s,"stroke-width":"2",style:{"clip-path":`inset(0 round ${a})`},width:"100%"}))}get el(){return n(this)}static get watchers(){return{color:["handleColorChange"]}}};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.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}: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{G as calcite_color_picker,W as calcite_color_picker_hex_input,X as calcite_color_picker_swatch}
|
|
6
|
+
import{r as t,c as e,h as i,g as n}from"./p-724ffb2b.js";import{i as a,a as r,f as s,d as o}from"./p-331f03ef.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-aec0e90c.js";import{c as g}from"./p-f0513696.js";import{u as b}from"./p-ff2616f4.js";import{i as y}from"./p-5a7d6abb.js";import{d as v,i as w}from"./p-a9c93bf7.js";import"./p-2e91306b.js";import"./p-534d76ec.js";function k(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 x={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]},M=k((function(t){var e=Array.prototype.concat,i=Array.prototype.slice,n=t.exports=function(t){for(var n,a=[],r=0,s=t.length;r<s;r++){var o=t[r];(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))}}})),C=k((function(t){var e=Object.hasOwnProperty,i={};for(var n in x)e.call(x,n)&&(i[x[n]]=n);var a=t.exports={to:{},get:{}};function r(t,e,i){return Math.min(Math.max(e,t),i)}function s(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,s=[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;s[n]=parseInt(i.slice(o,o+2),16)}a&&(s[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++)s[n]=parseInt(i[n]+i[n],16);a&&(s[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++)s[n]=parseInt(i[n+1],0);i[4]&&(s[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(x,i[1])?((s=x[i[1]])[3]=1,s):null:null;for(n=0;n<3;n++)s[n]=Math.round(2.55*parseFloat(i[n+1]));i[4]&&(s[3]=i[5]?.01*parseFloat(i[4]):parseFloat(i[4]))}for(n=0;n<3;n++)s[n]=r(s[n],0,255);return s[3]=r(s[3],0,1),s},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,r(parseFloat(e[2]),0,100),r(parseFloat(e[3]),0,100),r(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,r(parseFloat(e[2]),0,100),r(parseFloat(e[3]),0,100),r(isNaN(i)?1:i,0,1)]}return null},a.to.hex=function(){var t=M(arguments);return"#"+s(t[0])+s(t[1])+s(t[2])+(t[3]<1?s(Math.round(255*t[3])):"")},a.to.rgb=function(){var t=M(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=M(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=M(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=M(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)]}})),S={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 j={};for(const t of Object.keys(S))j[S[t]]=t;const D={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 F=D;for(const t of Object.keys(D)){if(!("channels"in D[t]))throw new Error("missing channels property: "+t);if(!("labels"in D[t]))throw new Error("missing channel labels property: "+t);if(D[t].labels.length!==D[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:i}=D[t];delete D[t].channels,delete D[t].labels,Object.defineProperty(D[t],"channels",{value:e}),Object.defineProperty(D[t],"labels",{value:i})}function z(t,e){return function(i){return e(t(i))}}function A(t,e){const i=[e[t].parent,t];let n=F[e[t].parent][t],a=e[t].parent;for(;e[a].parent;)i.unshift(e[a].parent),n=z(F[e[a].parent][a],n),a=e[a].parent;return n.conversion=i,n}D.rgb.hsl=function(t){const e=t[0]/255,i=t[1]/255,n=t[2]/255,a=Math.min(e,i,n),r=Math.max(e,i,n),s=r-a;let o,l;r===a?o=0:e===r?o=(i-n)/s:i===r?o=2+(n-e)/s:n===r&&(o=4+(e-i)/s),o=Math.min(60*o,360),o<0&&(o+=360);const c=(a+r)/2;return l=r===a?0:c<=.5?s/(r+a):s/(2-r-a),[o,100*l,100*c]},D.rgb.hsv=function(t){let e,i,n,a,r;const s=t[0]/255,o=t[1]/255,l=t[2]/255,c=Math.max(s,o,l),h=c-Math.min(s,o,l),u=function(t){return(c-t)/6/h+.5};return 0===h?(a=0,r=0):(r=h/c,e=u(s),i=u(o),n=u(l),s===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*r,100*c]},D.rgb.hwb=function(t){const e=t[0],i=t[1];let n=t[2];const a=D.rgb.hsl(t)[0],r=1/255*Math.min(e,Math.min(i,n));return n=1-1/255*Math.max(e,Math.max(i,n)),[a,100*r,100*n]},D.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]},D.rgb.keyword=function(t){const e=j[t];if(e)return e;let i,n=1/0;for(const e of Object.keys(S)){const s=((a=t)[0]-(r=S[e])[0])**2+(a[1]-r[1])**2+(a[2]-r[2])**2;s<n&&(n=s,i=e)}var a,r;return i},D.keyword.rgb=function(t){return S[t]},D.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)]},D.rgb.lab=function(t){const e=D.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)]},D.hsl.rgb=function(t){const e=t[0]/360,i=t[1]/100,n=t[2]/100;let a,r,s;if(0===i)return s=255*n,[s,s,s];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++)r=e+1/3*-(t-1),r<0&&r++,r>1&&r--,s=6*r<1?o+6*(a-o)*r:2*r<1?a:3*r<2?o+(a-o)*(2/3-r)*6:o,l[t]=255*s;return l},D.hsl.hsv=function(t){const e=t[0];let i=t[1]/100,n=t[2]/100,a=i;const r=Math.max(n,.01);return n*=2,i*=n<=1?n:2-n,a*=r<=1?r:2-r,[e,100*(0===n?2*a/(r+a):2*i/(n+i)),(n+i)/2*100]},D.hsv.rgb=function(t){const e=t[0]/60,i=t[1]/100;let n=t[2]/100;const a=Math.floor(e)%6,r=e-Math.floor(e),s=255*n*(1-i),o=255*n*(1-i*r),l=255*n*(1-i*(1-r));switch(n*=255,a){case 0:return[n,l,s];case 1:return[o,n,s];case 2:return[s,n,l];case 3:return[s,o,n];case 4:return[l,s,n];case 5:return[n,s,o]}},D.hsv.hsl=function(t){const e=t[0],i=t[1]/100,n=t[2]/100,a=Math.max(n,.01);let r,s;s=(2-i)*n;const o=(2-i)*a;return r=i*a,r/=o<=1?o:2-o,r=r||0,s/=2,[e,100*r,100*s]},D.hwb.rgb=function(t){const e=t[0]/360;let i=t[1]/100,n=t[2]/100;const a=i+n;let r;a>1&&(i/=a,n/=a);const s=Math.floor(6*e),o=1-n;r=6*e-s,0!=(1&s)&&(r=1-r);const l=i+r*(o-i);let c,h,u;switch(s){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]},D.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))]},D.xyz.rgb=function(t){const e=t[0]/100,i=t[1]/100,n=t[2]/100;let a,r,s;return a=3.2406*e+-1.5372*i+-.4986*n,r=-.9689*e+1.8758*i+.0415*n,s=.0557*e+-.204*i+1.057*n,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,a=Math.min(Math.max(0,a),1),r=Math.min(Math.max(0,r),1),s=Math.min(Math.max(0,s),1),[255*a,255*r,255*s]},D.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)]},D.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,r=e**3,s=n**3;return i=a>.008856?a:(i-16/116)/7.787,e=r>.008856?r:(e-16/116)/7.787,n=s>.008856?s:(n-16/116)/7.787,e*=95.047,i*=100,n*=108.883,[e,i,n]},D.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]},D.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)]},D.rgb.ansi16=function(t,e=null){const[i,n,a]=t;let r=null===e?D.rgb.hsv(t)[2]:e;if(r=Math.round(r/50),0===r)return 30;let s=30+(Math.round(a/255)<<2|Math.round(n/255)<<1|Math.round(i/255));return 2===r&&(s+=60),s},D.hsv.ansi16=function(t){return D.rgb.ansi16(D.hsv.rgb(t),t[2])},D.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)},D.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]},D.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]},D.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},D.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]},D.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),r=Math.min(Math.min(e,i),n),s=a-r;let o,l;return o=s<1?r/(1-s):0,l=s<=0?0:a===e?(i-n)/s%6:a===i?2+(n-e)/s:4+(e-i)/s,l/=6,l%=1,[360*l,100*s,100*o]},D.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]},D.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]},D.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,r=a%1,s=1-r;let o=0;switch(Math.floor(a)){case 0:n[0]=1,n[1]=r,n[2]=0;break;case 1:n[0]=s,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=r;break;case 3:n[0]=0,n[1]=s,n[2]=1;break;case 4:n[0]=r,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=s}return o=(1-e)*i,[255*(e*n[0]+o),255*(e*n[1]+o),255*(e*n[2]+o)]},D.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]},D.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]},D.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)]},D.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]},D.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},D.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},D.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},D.gray.hsl=function(t){return[0,0,t[0]]},D.gray.hsv=D.gray.hsl,D.gray.hwb=function(t){return[0,100,t[0]]},D.gray.cmyk=function(t){return[0,0,0,t[0]]},D.gray.lab=function(t){return[t[0],0,0]},D.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},D.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};const _={};Object.keys(F).forEach((t=>{_[t]={},Object.defineProperty(_[t],"channels",{value:F[t].channels}),Object.defineProperty(_[t],"labels",{value:F[t].labels});const e=function(t){const e=function(t){const e=function(){const t={},e=Object.keys(F);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(F[t]);for(let a=n.length,r=0;r<a;r++){const a=n[r],s=e[a];-1===s.distance&&(s.distance=e[t].distance+1,s.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]=A(t,e))}return i}(t);Object.keys(e).forEach((i=>{const n=e[i];_[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),_[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 O=_;const q=["keyword","gray","hex"],$={};for(const t of Object.keys(O))$[[...O[t].labels].sort().join("")]=t;const I={};function E(t,e){if(!(this instanceof E))return new E(t,e);if(e&&e in q&&(e=null),e&&!(e in O))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 E)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=C.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,n=O[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=O[this.model].channels;const i=Array.prototype.slice.call(t,0,n);this.color=P(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 $))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=$[n];const{labels:a}=O[this.model],r=[];for(i=0;i<a.length;i++)r.push(t[a[i]]);this.color=P(r)}if(I[this.model])for(n=O[this.model].channels,i=0;i<n;i++){const t=I[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)}E.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in C.to?this:this.rgb();e=e.round("number"==typeof t?t:1);const i=1===e.valpha?e.color:[...e.color,this.valpha];return C.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 C.to.rgb.percent(i)},array(){return 1===this.valpha?[...this.color]:[...this.color,this.valpha]},object(){const t={},{channels:e}=O[this.model],{labels:i}=O[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 E([...this.color.map(N(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new E([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:H("rgb",0,K(255)),green:H("rgb",1,K(255)),blue:H("rgb",2,K(255)),hue:H(["hsl","hsv","hsl","hwb","hcg"],0,(t=>(t%360+360)%360)),saturationl:H("hsl",1,K(100)),lightness:H("hsl",2,K(100)),saturationv:H("hsv",1,K(100)),value:H("hsv",2,K(100)),chroma:H("hcg",1,K(100)),gray:H("hcg",2,K(100)),white:H("hwb",1,K(100)),wblack:H("hwb",2,K(100)),cyan:H("cmyk",0,K(100)),magenta:H("cmyk",1,K(100)),yellow:H("cmyk",2,K(100)),black:H("cmyk",3,K(100)),x:H("xyz",0,K(95.047)),y:H("xyz",1,K(100)),z:H("xyz",2,K(108.833)),l:H("lab",0,K(100)),a:H("lab",1),b:H("lab",2),keyword(t){return void 0!==t?new E(t):O[this.model].keyword(this.color)},hex(t){return void 0!==t?new E(t):C.to.hex(this.rgb().round().color)},hexa(t){if(void 0!==t)return new E(t);const e=this.rgb().round().color;let i=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===i.length&&(i="0"+i),C.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 E.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,r=2*a-1,s=i.alpha()-n.alpha(),o=((r*s==-1?r:(r+s)/(1+r*s))+1)/2,l=1-o;return E.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(O)){if(q.includes(t))continue;const{channels:e}=O[t];E.prototype[t]=function(...e){return this.model===t?new E(this):new E(e.length>0?e:[...(i=O[this.model][t].raw(this.color),Array.isArray(i)?i:[i]),this.valpha],t);var i},E[t]=function(...i){let n=i[0];return"number"==typeof n&&(n=P(i,e)),new E(n,t)}}function N(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function H(t,e,i){t=Array.isArray(t)?t:[t];for(const n of t)(I[n]||(I[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 K(t){return function(e){return Math.max(0,Math.min(t,e))}}function P(t,e){for(let i=0;i<e;i++)"number"!=typeof t[i]&&(t[i]=0);return t}var R=E;const U=R("#007AC2"),V={r:255,g:255,b:255},L={h:360,s:100,v:100},B={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}}},T=l(U.hex()),G=class{constructor(n){var s,o,h,u;t(this,n),this.calciteColorPickerChange=e(this,"calciteColorPickerChange",6),this.calciteColorPickerInput=e(this,"calciteColorPickerInput",6),this.allowEmpty=!1,this.appearance="solid",this.color=U,this.disabled=!1,this.format="auto",this.hideHex=!1,this.hideChannels=!1,this.hideSaved=!1,this.intlB="B",this.intlBlue="Blue",this.intlDeleteColor="Delete color",this.intlG="G",this.intlGreen="Green",this.intlH="H",this.intlHsv="HSV",this.intlHex="Hex",this.intlHue="Hue",this.intlNoColor="No color",this.intlR="R",this.intlRed="Red",this.intlRgb="RGB",this.intlS="S",this.intlSaturation="Saturation",this.intlSaveColor="Save color",this.intlSaved="Saved",this.intlV="V",this.intlValue="Value",this.scale="m",this.value=T,this.colorFieldAndSliderHovered=!1,this.hueThumbState="idle",this.internalColorUpdateContext=null,this.mode=c.HEX,this.shiftKeyChannelAdjustment=0,this.sliderThumbState="idle",this.colorFieldAndSliderInteractive=!1,this.channelMode="rgb",this.channels=this.toChannels(U),this.dimensions=B.m,this.savedColors=[],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,r=this.baseColorFieldColor.hue(),s=this.baseColorFieldColor.hue(r+a);this.internalColorSet(s,!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(R(n)):this.internalColorSet(null)},this.handleSavedColorSelect=t=>{this.internalColorSet(R(t.currentTarget.color))},this.handleChannelInput=t=>{const e=t.currentTarget,i=t.detail.nativeEvent.target,n=Number(e.getAttribute("data-channel-index")),a="rgb"===this.channelMode?V[Object.keys(V)[n]]:L[Object.keys(L)[n]];let r;if(this.allowEmpty&&!e.value)r="";else{const t=Number(e.value)+this.shiftKeyChannelAdjustment;r=g(t,0,a).toString()}e.value=r,i.value=r},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=>{y(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=>{var e,i;if(!a(t))return;const{offsetX:n,offsetY:r}=t,s=this.getCanvasRegion(r);"color-field"===s?(this.hueThumbState="drag",this.captureColorFieldColor(n,r),null===(e=this.colorFieldScopeNode)||void 0===e||e.focus()):"slider"===s&&(this.sliderThumbState="drag",this.captureHueSliderColor(n),null===(i=this.hueScopeNode)||void 0===i||i.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,r;const s=this.activeColorFieldAndSliderRect,{clientX:o,clientY:l}=t;if(this.colorFieldAndSliderHovered)a=o-s.x,r=l-s.y;else{const t=i.colorField.width,e=i.colorField.height,n=i.slider.height;a=o<s.x+t&&o>s.x?o-s.x:o<s.x?0:t-1,r=l<s.y+e+n&&l>s.y?l-s.y:l<s.y?0:e+n}n?this.captureColorFieldColor(a,r,!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 r=this.getCanvasRegion(e);if("color-field"===r){const n=this.hueThumbState,r=this.baseColorFieldColor.hsv(),s=Math.round(r.saturationv()/(L.s/i.width)),o=Math.round(i.height-r.value()/(L.v/i.height)),l=this.containsPoint(t,e,s,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"===r){const r=this.baseColorFieldColor.hsv().saturationv(100).value(100),s=this.sliderThumbState,o=Math.round(r.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"===s&&c?(this.sliderThumbState="hover",h=!0):"hover"!==s||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,intlRgb:n,intlHsv:a}=this;return i("calcite-tab-title",{active:t===e,class:"color-mode","data-color-mode":t,key:t,onCalciteTabsActivate:this.handleTabActivate},"rgb"===t?n:a)},this.renderChannelsTab=t=>{const{channelMode:e,channels:n,intlB:a,intlBlue:s,intlG:o,intlGreen:l,intlH:c,intlHue:h,intlR:u,intlRed:d,intlS:m,intlSaturation:f,intlV:p,intlValue:g}=this,b=t===e,y="rgb"===t,v=y?[u,o,a]:[c,m,p],w=y?[d,l,s]:[h,f,g],k=r(this.el);return i("calcite-tab",{active:b,class:"control",key:t},i("div",{class:"channels",dir:"ltr"},n.map(((t,e)=>this.renderChannel(t,e,v[e],w[e],k)))))},this.renderChannel=(t,e,n,a,r)=>i("calcite-input",{class:"channel","data-channel-index":e,dir:r,label:a,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:null==t?void 0: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=(s=()=>{this.fieldAndSliderRenderingContext&&(this.drawColorField(),this.drawHueSlider())},h=!0,u=!0,w(o)&&(h="leading"in o?!!o.leading:h,u="trailing"in o?!!o.trailing:u),v(s,16,{leading:h,maxWait:16,trailing:u})),this.captureColorFieldColor=(t,e,i=!0)=>{const{dimensions:{colorField:{height:n,width:a}}}=this,r=Math.round(L.s/a*t),s=Math.round(L.v/n*(n-e));this.internalColorSet(this.baseColorFieldColor.hsv().saturationv(r).value(s),i)},this.initColorFieldAndSlider=t=>{this.fieldAndSliderRenderingContext=t.getContext("2d"),this.updateCanvasSize(t)}}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"){var e;this.updateDimensions(t),this.updateCanvasSize(null===(e=this.fieldAndSliderRenderingContext)||void 0===e?void 0:e.canvas)}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 r="drag"===this.sliderThumbState||"drag"===this.hueThumbState;if("initial"===this.internalColorUpdateContext)return;if("user-interaction"===this.internalColorUpdateContext)return this.calciteColorPickerInput.emit(),void(r||this.calciteColorPickerChange.emit());const s=i&&!t?null:R(t),o=!u(s,this.color);(a||o)&&this.internalColorSet(s,!0,"internal")}get baseColorFieldColor(){return this.color||this.previousColor||U}handleChannelKeyUpOrDown(t){this.shiftKeyChannelAdjustment=0;const{key:e}=t;if("ArrowUp"!==e&&"ArrowDown"!==e||!t.composedPath().some((t=>{var e;return null===(e=t.classList)||void 0===e?void 0:e.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(){return s(this.colorFieldScopeNode)}componentWillLoad(){const{allowEmpty:t,color:e,format:i,value:n}=this,a=t&&!n,r=h(n),s=a||"auto"===i&&r||i===r,o=a?null:s?R(n):e;s||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)))}disconnectedCallback(){document.removeEventListener("pointermove",this.globalPointerMoveHandler),document.removeEventListener("pointerup",this.globalPointerUpHandler)}componentDidRender(){b(this)}render(){const{allowEmpty:t,color:e,intlDeleteColor:n,hideHex:a,hideChannels:r,hideSaved:s,intlHex:o,intlSaved:l,intlSaveColor:c,savedColors:h,scale:u}=this,d=e?e.hex():null,m="l"===u?"m":"s",{colorFieldAndSliderInteractive:f,colorFieldScopeTop:p,colorFieldScopeLeft:g,hueScopeLeft:b,hueScopeTop:y,scopeOrientation:v,dimensions:{colorField:{height:w,width:k},slider:{height:x}}}=this,M=null!=y?y:x/2+w,C=null!=b?b:k*U.hue()/L.h,S=null===e,j="vertical"===v;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":f},onPointerDown:this.handleColorFieldAndSliderPointerDown,onPointerEnter:this.handleColorFieldAndSliderPointerEnterOrMove,onPointerLeave:this.handleColorFieldAndSliderPointerLeave,onPointerMove:this.handleColorFieldAndSliderPointerEnterOrMove,ref:this.initColorFieldAndSlider}),i("div",{"aria-label":j?this.intlValue:this.intlSaturation,"aria-valuemax":j?L.v:L.s,"aria-valuemin":"0","aria-valuenow":(j?null==e?void 0:e.saturationv():null==e?void 0:e.value())||"0",class:{scope:!0,"scope--color-field":!0},onKeyDown:this.handleColorFieldScopeKeyDown,ref:this.storeColorFieldScope,role:"slider",style:{top:`${p||0}px`,left:`${g||0}px`},tabindex:"0"}),i("div",{"aria-label":this.intlHue,"aria-valuemax":L.h,"aria-valuemin":"0","aria-valuenow":(null==e?void 0:e.round().hue())||U.round().hue(),class:{scope:!0,"scope--hue":!0},onKeyDown:this.handleHueScopeKeyDown,ref:this.storeHueScope,role:"slider",style:{top:`${M}px`,left:`${C}px`},tabindex:"0"})),a&&r?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}},o),i("calcite-color-picker-hex-input",{allowEmpty:t,class:"control",numberingSystem:this.numberingSystem,onCalciteColorPickerHexInputChange:this.handleHexInputChange,scale:m,value:d})),r?null:i("calcite-tabs",{class:{"color-mode-container":!0,"section--split":!0},scale:m},i("calcite-tab-nav",{slot:"tab-nav"},this.renderChannelsTabTitle("rgb"),this.renderChannelsTabTitle("hsv")),this.renderChannelsTab("rgb"),this.renderChannelsTab("hsv"))),s?null:i("div",{class:{"saved-colors-section":!0,section:!0}},i("div",{class:"header"},i("label",null,l),i("div",{class:"saved-colors-buttons"},i("calcite-button",{appearance:"transparent",class:"delete-color",color:"neutral",disabled:S,iconStart:"minus",label:n,onClick:this.deleteColor,scale:m,type:"button"}),i("calcite-button",{appearance:"transparent",class:"save-color",color:"neutral",disabled:S,iconStart:"plus",label:c,onClick:this.saveColor,scale:m,type:"button"}))),h.length>0?i("div",{class:"saved-colors"},[...h.map((t=>i("calcite-color-picker-swatch",{active:d===t,class:"saved-color",color:t,key:t,onClick:this.handleSavedColorSelect,onKeyDown:this.handleSavedColorKeyDown,scale:u,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=B[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,r=e.saturationv()/(L.s/n),s=i-e.value()/(L.v/i);requestAnimationFrame((()=>{this.colorFieldScopeLeft=r,this.colorFieldScopeTop=s})),this.drawThumb(this.fieldAndSliderRenderingContext,a,r,s,e,this.hueThumbState)}drawThumb(t,e,i,n,a,r){const s=2*Math.PI;t.beginPath(),t.arc(i,n,e,0,s),t.shadowBlur="hover"===r?32:16,t.shadowColor=`rgba(0, 0, 0, ${"drag"===r?.32:.16})`,t.fillStyle="#fff",t.fill(),t.beginPath(),t.arc(i,n,e-3,0,s),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:r}}}=this,s=e.hue()/(360/a),o=n/2+i;requestAnimationFrame((()=>{this.hueScopeLeft=s,this.hueScopeTop=o})),this.drawThumb(this.fieldAndSliderRenderingContext,r,s,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),r=["red","yellow","lime","cyan","blue","magenta","red"],s=1/(r.length-1);let o=0;r.forEach((t=>{a.addColorStop(o,R(t).string()),o+=s})),t.fillStyle=a,t.clearRect(0,e,n,i+2*this.getSliderCapSpacing()),t.fillRect(0,e,n,i),this.drawActiveHueSliderColor()}updateColorFromChannels(t){this.internalColorSet(R(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)))}get el(){return n(this)}static get watchers(){return{color:["handleColorChange"],format:["handleFormatChange"],scale:["handleScaleChange"],value:["handleValueChange"]}}};G.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.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}: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}:host([appearance=minimal]) .container{border:none}.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 J=R(),W=class{constructor(i){t(this,i),this.calciteColorPickerHexInputChange=e(this,"calciteColorPickerHexInputChange",6),this.allowEmpty=!1,this.intlHex="Hex",this.intlNoColor="No color",this.scale="m",this.value=l(J.hex()),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.internalColor=J,this.previousNonNullValue=this.value,this.storeInputRef=t=>{this.inputNode=t}}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)}handleValueChange(t,e){this.internalSetValue(t,e,!1)}onInputKeyDown(t){const{altKey:e,ctrlKey:i,metaKey:n,shiftKey:a}=t,{internalColor:r,value:s}=this,{key:o}=t;if("Tab"===o||"Enter"===o)return void this.onInputChange();const c=this.value;if("ArrowDown"===o||"ArrowUp"===o)return s?(this.internalSetValue(l(this.nudgeRGBChannels(r,(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{intlHex:t,value:e}=this,n=this.formatForInternalInput(e);return i("div",{class:"container"},i("calcite-input",{class:"input",label:t,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:n}),n?i("calcite-color-picker-swatch",{active:!0,class:"preview",color:`#${n}`,scale:this.scale}):null)}async setFocus(){s(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=R(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 R.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"]}}};W.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.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}: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 X=class{constructor(e){t(this,e),this.active=!1,this.scale="m"}handleColorChange(t){this.internalColor=R(t)}componentWillLoad(){this.handleColorChange(this.color)}render(){const{active:t,el:e,internalColor:n}=this,a=t?"100%":"0",r=n.hex(),s="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,r),i("rect",{fill:r,height:"100%",id:"swatch",rx:a,stroke:s,"stroke-width":"2",style:{"clip-path":`inset(0 round ${a})`},width:"100%"}))}get el(){return n(this)}static get watchers(){return{color:["handleColorChange"]}}};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.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}: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{G as calcite_color_picker,W as calcite_color_picker_hex_input,X as calcite_color_picker_swatch}
|