@esri/solutions-components 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/ExpandToggle-3ab7dfd7.js +118 -0
- package/dist/cjs/FloatingArrow-89e0e55a.js +50 -0
- package/dist/cjs/Heading-9112a4c5.js +25 -0
- package/dist/cjs/InitiativeUiSchemaEdit-108652db.js +28 -0
- package/dist/cjs/ProjectUiSchemaCreate-81217580.js +126 -0
- package/dist/cjs/ProjectUiSchemaEdit-d5f11c17.js +178 -0
- package/dist/cjs/Validation-20182093.js +20 -0
- package/dist/cjs/_commonjsHelpers-ed90c4ad.js +55 -0
- package/dist/cjs/app-globals-379d737f.js +69 -0
- package/dist/cjs/ar-a694ca24.js +105 -0
- package/dist/cjs/arcgis-login.cjs.entry.js +1 -1
- package/dist/cjs/basemap-gallery.cjs.entry.js +121 -0
- package/dist/cjs/bg-62b6b3ba.js +83 -0
- package/dist/cjs/browser-fe25aefa.js +28 -0
- package/dist/cjs/bs-e673542b.js +52 -0
- package/dist/cjs/buffer-tools.cjs.entry.js +257 -0
- package/dist/cjs/ca-e4d2f562.js +72 -0
- package/dist/cjs/calcite-accordion-item.cjs.entry.js +5 -5
- package/dist/cjs/calcite-accordion.cjs.entry.js +2 -2
- package/dist/cjs/calcite-action-bar.cjs.entry.js +12 -12
- package/dist/cjs/calcite-action-group.cjs.entry.js +9 -9
- package/dist/cjs/calcite-action-menu.cjs.entry.js +295 -0
- package/dist/cjs/calcite-action-pad.cjs.entry.js +169 -0
- package/dist/cjs/calcite-action-pad_2.cjs.entry.js +1 -1
- package/dist/cjs/calcite-action.cjs.entry.js +188 -0
- package/dist/cjs/calcite-alert.cjs.entry.js +322 -0
- package/dist/cjs/calcite-avatar.cjs.entry.js +4 -4
- package/dist/cjs/calcite-block-section.cjs.entry.js +8 -8
- package/dist/cjs/calcite-block.cjs.entry.js +214 -0
- package/dist/cjs/calcite-button.cjs.entry.js +13 -13
- package/dist/cjs/calcite-card.cjs.entry.js +8 -8
- package/dist/cjs/calcite-checkbox.cjs.entry.js +9 -9
- package/dist/cjs/calcite-chip-group.cjs.entry.js +7 -7
- package/dist/cjs/calcite-chip.cjs.entry.js +262 -0
- package/dist/cjs/calcite-color-picker-hex-input.cjs.entry.js +274 -0
- package/dist/cjs/calcite-color-picker-swatch.cjs.entry.js +99 -0
- package/dist/cjs/calcite-color-picker.cjs.entry.js +22 -22
- package/dist/cjs/calcite-combobox-item-group.cjs.entry.js +4 -4
- package/dist/cjs/calcite-combobox-item.cjs.entry.js +145 -0
- package/dist/cjs/calcite-combobox.cjs.entry.js +1431 -0
- package/dist/cjs/calcite-date-picker-day.cjs.entry.js +97 -0
- package/dist/cjs/calcite-date-picker-month-header.cjs.entry.js +207 -0
- package/dist/cjs/calcite-date-picker-month.cjs.entry.js +362 -0
- package/dist/cjs/calcite-date-picker.cjs.entry.js +460 -0
- package/dist/cjs/calcite-dropdown-group.cjs.entry.js +85 -0
- package/dist/cjs/calcite-dropdown-item.cjs.entry.js +188 -0
- package/dist/cjs/calcite-dropdown.cjs.entry.js +430 -0
- package/dist/cjs/calcite-fab.cjs.entry.js +6 -6
- package/dist/cjs/calcite-filter.cjs.entry.js +179 -0
- package/dist/cjs/calcite-flow-item.cjs.entry.js +198 -0
- package/dist/cjs/calcite-flow.cjs.entry.js +153 -0
- package/dist/cjs/calcite-graph.cjs.entry.js +226 -0
- package/dist/cjs/calcite-handle.cjs.entry.js +204 -0
- package/dist/cjs/calcite-icon.cjs.entry.js +5 -5
- package/dist/cjs/calcite-inline-editable.cjs.entry.js +11 -11
- package/dist/cjs/calcite-input-date-picker.cjs.entry.js +744 -0
- package/dist/cjs/calcite-input-date-picker_3.cjs.entry.js +16 -10
- package/dist/cjs/calcite-input-message.cjs.entry.js +70 -0
- package/dist/cjs/calcite-input-number.cjs.entry.js +13 -13
- package/dist/cjs/calcite-input-text.cjs.entry.js +13 -13
- package/dist/cjs/calcite-input-time-picker-9e93f694.js +1854 -0
- package/dist/cjs/calcite-input-time-picker.cjs.entry.js +17 -17
- package/dist/cjs/calcite-input-time-zone.cjs.entry.js +12 -12
- package/dist/cjs/calcite-input.cjs.entry.js +695 -0
- package/dist/cjs/calcite-label.cjs.entry.js +4 -4
- package/dist/cjs/calcite-link.cjs.entry.js +6 -6
- package/dist/cjs/calcite-list-item-group.cjs.entry.js +4 -4
- package/dist/cjs/calcite-list-item.cjs.entry.js +454 -0
- package/dist/cjs/calcite-list.cjs.entry.js +567 -0
- package/dist/cjs/calcite-loader.cjs.entry.js +80 -0
- package/dist/cjs/calcite-menu-item.cjs.entry.js +8 -8
- package/dist/cjs/calcite-menu.cjs.entry.js +8 -8
- package/dist/cjs/calcite-meter.cjs.entry.js +8 -8
- package/dist/cjs/calcite-modal.cjs.entry.js +17 -11
- package/dist/cjs/calcite-navigation-logo.cjs.entry.js +2 -2
- package/dist/cjs/calcite-navigation-user.cjs.entry.js +2 -2
- package/dist/cjs/calcite-navigation.cjs.entry.js +4 -4
- package/dist/cjs/calcite-notice.cjs.entry.js +10 -10
- package/dist/cjs/calcite-option-group.cjs.entry.js +1 -1
- package/dist/cjs/calcite-option.cjs.entry.js +88 -0
- package/dist/cjs/calcite-pagination.cjs.entry.js +201 -8
- package/dist/cjs/calcite-panel.cjs.entry.js +270 -0
- package/dist/cjs/calcite-pick-list-group.cjs.entry.js +6 -6
- package/dist/cjs/calcite-pick-list-item.cjs.entry.js +23 -23
- package/dist/cjs/calcite-pick-list.cjs.entry.js +10 -10
- package/dist/cjs/calcite-popover.cjs.entry.js +418 -0
- package/dist/cjs/calcite-progress.cjs.entry.js +41 -0
- package/dist/cjs/calcite-radio-button-group.cjs.entry.js +4 -4
- package/dist/cjs/calcite-radio-button.cjs.entry.js +8 -8
- package/dist/cjs/calcite-rating.cjs.entry.js +14 -12
- package/dist/cjs/calcite-scrim.cjs.entry.js +7 -7
- package/dist/cjs/calcite-segmented-control-item.cjs.entry.js +70 -0
- package/dist/cjs/calcite-segmented-control.cjs.entry.js +245 -0
- package/dist/cjs/calcite-select.cjs.entry.js +235 -0
- package/dist/cjs/calcite-sheet.cjs.entry.js +7 -7
- package/dist/cjs/calcite-shell-center-row.cjs.entry.js +5 -5
- package/dist/cjs/calcite-shell-panel.cjs.entry.js +414 -0
- package/dist/cjs/calcite-shell.cjs.entry.js +174 -0
- package/dist/cjs/calcite-slider.cjs.entry.js +844 -0
- package/dist/cjs/calcite-sortable-list.cjs.entry.js +7 -7
- package/dist/cjs/calcite-split-button.cjs.entry.js +4 -4
- package/dist/cjs/calcite-stack.cjs.entry.js +74 -0
- package/dist/cjs/calcite-stepper-item.cjs.entry.js +10 -10
- package/dist/cjs/calcite-stepper.cjs.entry.js +7 -7
- package/dist/cjs/calcite-switch.cjs.entry.js +9 -9
- package/dist/cjs/calcite-tab-nav.cjs.entry.js +263 -0
- package/dist/cjs/calcite-tab-title.cjs.entry.js +291 -0
- package/dist/cjs/calcite-tab.cjs.entry.js +112 -0
- package/dist/cjs/calcite-table-cell.cjs.entry.js +156 -0
- package/dist/cjs/calcite-table-header.cjs.entry.js +169 -0
- package/dist/cjs/calcite-table-row.cjs.entry.js +6 -6
- package/dist/cjs/calcite-table.cjs.entry.js +9 -9
- package/dist/cjs/calcite-tabs.cjs.entry.js +178 -0
- package/dist/cjs/calcite-text-area.cjs.entry.js +15 -16
- package/dist/cjs/calcite-tile-select-group.cjs.entry.js +3 -3
- package/dist/cjs/calcite-tile-select.cjs.entry.js +4 -4
- package/dist/cjs/calcite-tile.cjs.entry.js +7 -7
- package/dist/cjs/calcite-time-picker.cjs.entry.js +9 -9
- package/dist/cjs/calcite-tip-group.cjs.entry.js +1 -1
- package/dist/cjs/calcite-tip-manager.cjs.entry.js +15 -8
- package/dist/cjs/calcite-tip.cjs.entry.js +9 -9
- package/dist/cjs/calcite-tooltip.cjs.entry.js +7 -7
- package/dist/cjs/calcite-tree-item.cjs.entry.js +296 -0
- package/dist/cjs/calcite-tree.cjs.entry.js +315 -0
- package/dist/cjs/calcite-value-list-item.cjs.entry.js +157 -0
- package/dist/cjs/calcite-value-list.cjs.entry.js +326 -0
- package/dist/cjs/card-manager.cjs.entry.js +107 -0
- package/dist/cjs/card-manager_3.cjs.entry.js +1 -1
- package/dist/cjs/common-1b4bd8de.js +297 -0
- package/dist/cjs/conditionalSlot-73e71a05.js +63 -0
- package/dist/cjs/consent-manager.cjs.entry.js +379 -15
- package/dist/cjs/create-feature.cjs.entry.js +263 -0
- package/dist/cjs/crowdsource-manager.cjs.entry.js +7 -5
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +9 -7
- package/dist/cjs/cs-1ea34123.js +148 -0
- package/dist/cjs/da-199f5488.js +67 -0
- package/dist/cjs/date-3d094f58.js +261 -0
- package/dist/cjs/de-222afa04.js +92 -0
- package/dist/cjs/de-at-a62870ea.js +91 -0
- package/dist/cjs/de-ch-b0b46c1b.js +91 -0
- package/dist/cjs/deduct-calculator.cjs.entry.js +1 -1
- package/dist/cjs/delete-button.cjs.entry.js +150 -0
- package/dist/cjs/dom-cf1e2e9f.js +1114 -0
- package/dist/cjs/{downloadUtils-c2bd7c80.js → downloadUtils-1f283d95.js} +37 -6
- package/dist/cjs/downloadUtils-de0c0682.js +4246 -0
- package/dist/cjs/edit-card.cjs.entry.js +228 -0
- package/dist/cjs/el-934951a0.js +67 -0
- package/dist/cjs/en-au-6872d248.js +67 -0
- package/dist/cjs/en-ca-7133c4f2.js +66 -0
- package/dist/cjs/en-gb-2c66b954.js +70 -0
- package/dist/cjs/es-48e65aa5.js +67 -0
- package/dist/cjs/es-mx-46d70897.js +66 -0
- package/dist/cjs/esri-loader-5b8fbfa4.js +308 -0
- package/dist/cjs/et-63c5628d.js +93 -0
- package/dist/cjs/feature-comments.cjs.entry.js +1 -1
- package/dist/cjs/feature-form-flow-item.cjs.entry.js +1 -1
- package/dist/cjs/feature-list.cjs.entry.js +199 -0
- package/dist/cjs/features-flow-item.cjs.entry.js +1 -1
- package/dist/cjs/fi-dc20f9ac.js +116 -0
- package/dist/cjs/filter-cc2705b7.js +48 -0
- package/dist/cjs/floating-ui-90bd00af.js +2350 -0
- package/dist/cjs/floor-filter.cjs.entry.js +111 -0
- package/dist/cjs/focusTrapComponent-946b0666.js +1028 -0
- package/dist/cjs/form-da52e819.js +316 -0
- package/dist/cjs/fr-7067996a.js +69 -0
- package/dist/cjs/fr-ch-dbd7ba02.js +67 -0
- package/dist/cjs/he-4eb6a5a9.js +106 -0
- package/dist/cjs/helpers-7415d67a.js +830 -0
- package/dist/cjs/{helpers-81779c18.js → helpers-b014d9a9.js} +1 -1
- package/dist/cjs/hi-5563acd4.js +66 -0
- package/dist/cjs/hr-7a0a4191.js +81 -0
- package/dist/cjs/html2canvas-57f1616d.js +7847 -0
- package/dist/cjs/hu-0b69b8fb.js +89 -0
- package/dist/cjs/id-345dd5a9.js +67 -0
- package/dist/cjs/index-5799a29c.js +41521 -0
- package/dist/cjs/index-8c75d784.js +1958 -0
- package/dist/cjs/index-af047760.js +201 -0
- package/dist/cjs/index-b53bfd7c.js +4185 -0
- package/dist/cjs/index.cjs.js +15 -0
- package/dist/cjs/index.es-152bb462.js +11342 -0
- package/dist/cjs/{index.es-22b3d1a2.js → index.es-4af23ecc.js} +1 -1
- package/dist/cjs/info-card.cjs.entry.js +320 -0
- package/dist/cjs/instant-apps-ckeditor-wrapper.cjs.entry.js +125 -0
- package/dist/cjs/instant-apps-ckeditor-wrapper_3.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-control-panel.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-export.cjs.entry.js +20 -14
- package/dist/cjs/instant-apps-filter-list.cjs.entry.js +1059 -0
- package/dist/cjs/instant-apps-header.cjs.entry.js +5 -4
- package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +25 -21
- package/dist/cjs/instant-apps-interactive-legend-count.cjs.entry.js +104 -0
- package/dist/cjs/instant-apps-interactive-legend-count_2.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +7 -6
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element.cjs.entry.js +56 -0
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element_5.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-interactive-legend-layer-element-caption.cjs.entry.js +55 -0
- package/dist/cjs/instant-apps-interactive-legend-layer-element.cjs.entry.js +57 -0
- package/dist/cjs/instant-apps-interactive-legend-legend-element-caption.cjs.entry.js +104 -0
- package/dist/cjs/instant-apps-interactive-legend-legend-element.cjs.entry.js +65 -0
- package/dist/cjs/instant-apps-interactive-legend-relationship.cjs.entry.js +552 -0
- package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +9 -8
- package/dist/cjs/instant-apps-keyboard-shortcuts.cjs.entry.js +6 -6
- package/dist/cjs/instant-apps-landing-page.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +9 -9
- package/dist/cjs/instant-apps-language-translator-item.cjs.entry.js +384 -0
- package/dist/cjs/instant-apps-language-translator-search.cjs.entry.js +105 -0
- package/dist/cjs/instant-apps-language-translator.cjs.entry.js +9 -9
- package/dist/cjs/instant-apps-measurement-tool.cjs.entry.js +139 -0
- package/dist/cjs/instant-apps-measurement.cjs.entry.js +7 -7
- package/dist/cjs/instant-apps-popover.cjs.entry.js +6 -6
- package/dist/cjs/instant-apps-popovers.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-scoreboard.cjs.entry.js +6 -6
- package/dist/cjs/instant-apps-social-share.cjs.entry.js +515 -0
- package/dist/cjs/instant-apps-splash.cjs.entry.js +17 -8
- package/dist/cjs/interactive-08e5bc95.js +144 -0
- package/dist/cjs/it-ac7cf3e5.js +67 -0
- package/dist/cjs/it-ch-6f7209eb.js +67 -0
- package/dist/cjs/ja-29e7b0a2.js +73 -0
- package/dist/cjs/json-editor.cjs.entry.js +406 -0
- package/dist/cjs/key-86f4a0b0.js +47 -0
- package/dist/cjs/ko-aeebde8b.js +73 -0
- package/dist/cjs/label-24b05042.js +186 -0
- package/dist/cjs/{languageSwitcher-4822684b.js → languageSwitcher-3870c772.js} +1 -1
- package/dist/cjs/languageSwitcher-aafa5b47.js +58 -0
- package/dist/cjs/{languageUtil-9bd00bad.js → languageUtil-0df39c0c.js} +1 -1
- package/dist/cjs/languageUtil-43c3acdc.js +90 -0
- package/dist/cjs/layer-list.cjs.entry.js +207 -0
- package/dist/cjs/layer-table.cjs.entry.js +1487 -0
- package/dist/cjs/layout-manager.cjs.entry.js +5 -4
- package/dist/cjs/list-flow-item.cjs.entry.js +1 -1
- package/dist/cjs/{loadModules-69fc5b98.js → loadModules-01306709.js} +1 -1
- package/dist/cjs/loadModules-a67b6702.js +23 -0
- package/dist/cjs/loadModules-b5f244cd.js +30 -0
- package/dist/cjs/loadable-41446b78.js +97 -0
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{locale-3e33f44c.js → locale-28c7c569.js} +2 -2
- package/dist/cjs/locale-42a9e623.js +152 -0
- package/dist/cjs/locale-4cef466e.js +91 -0
- package/dist/cjs/locale-a615b02f.js +585 -0
- package/dist/cjs/location-flow-item.cjs.entry.js +1 -1
- package/dist/cjs/lodash-7587da9f.js +18030 -0
- package/dist/cjs/lt-6816d14c.js +98 -0
- package/dist/cjs/lv-2c998515.js +67 -0
- package/dist/cjs/map-card.cjs.entry.js +192 -0
- package/dist/cjs/map-draw-tools.cjs.entry.js +358 -0
- package/dist/cjs/map-fullscreen.cjs.entry.js +116 -0
- package/dist/cjs/map-layer-picker.cjs.entry.js +346 -0
- package/dist/cjs/map-legend.cjs.entry.js +109 -0
- package/dist/cjs/map-picker.cjs.entry.js +174 -0
- package/dist/cjs/map-search.cjs.entry.js +184 -0
- package/dist/cjs/map-select-tools.cjs.entry.js +798 -0
- package/dist/cjs/map-select-tools_3.cjs.entry.js +1 -1
- package/dist/cjs/map-tools.cjs.entry.js +375 -0
- package/dist/cjs/mapViewUtils-6fa5bab1.js +271 -0
- package/dist/cjs/mk-147994ea.js +67 -0
- package/dist/cjs/mode-a0417ce5.js +27 -0
- package/dist/cjs/nb-f3d75f05.js +68 -0
- package/dist/cjs/nl-cb0a22c8.js +68 -0
- package/dist/cjs/observers-5923a7cc.js +58 -0
- package/dist/cjs/openCloseComponent-8d9cb545.js +140 -0
- package/dist/cjs/parser-e80279bf.js +1656 -0
- package/dist/cjs/pci-calculator.cjs.entry.js +1 -1
- package/dist/cjs/pdf-download.cjs.entry.js +359 -0
- package/dist/cjs/pl-ade28edd.js +115 -0
- package/dist/cjs/popupUtils-4de17e65.js +96 -0
- package/dist/cjs/pt-5543b782.js +68 -0
- package/dist/cjs/pt-br-bdce1868.js +66 -0
- package/dist/cjs/public-notification.cjs.entry.js +12 -11
- package/dist/cjs/publicNotificationStore-f690e171.js +47 -0
- package/dist/cjs/purify-557ad134.js +1715 -0
- package/dist/cjs/queryUtils-aba29fcf.js +253 -0
- package/dist/cjs/refine-results-flow-item.cjs.entry.js +1 -1
- package/dist/cjs/refine-selection.cjs.entry.js +411 -0
- package/dist/cjs/resources-2ccf85d3.js +53 -0
- package/dist/cjs/resources-37006465.js +29 -0
- package/dist/cjs/resources-63b3a6b8.js +116 -0
- package/dist/cjs/resources-a2b1b149.js +49 -0
- package/dist/cjs/resources-ac626172.js +26 -0
- package/dist/cjs/resources-b0cc39b4.js +30 -0
- package/dist/cjs/ro-f4bb9704.js +67 -0
- package/dist/cjs/ru-ba86b627.js +127 -0
- package/dist/cjs/shadow-css-bbaea014.js +483 -0
- package/dist/cjs/share-item.cjs.entry.js +1 -1
- package/dist/cjs/shared-list-render-c8555864.js +370 -0
- package/dist/cjs/sk-ac03aca5.js +149 -0
- package/dist/cjs/sl-c68e3fd0.js +169 -0
- package/dist/cjs/solution-configuration.cjs.entry.js +21 -1105
- package/dist/cjs/solution-contents.cjs.entry.js +84 -0
- package/dist/cjs/solution-item-details.cjs.entry.js +199 -0
- package/dist/cjs/solution-item-icon.cjs.entry.js +1 -1
- package/dist/cjs/solution-item-sharing.cjs.entry.js +139 -0
- package/dist/cjs/solution-item.cjs.entry.js +106 -0
- package/dist/cjs/solution-organization-variables.cjs.entry.js +95 -0
- package/dist/cjs/solution-resource-item.cjs.entry.js +284 -0
- package/dist/cjs/solution-spatial-ref.cjs.entry.js +158 -0
- package/dist/cjs/solution-store-6194ba89.js +589 -0
- package/dist/cjs/solution-template-data.cjs.entry.js +119 -0
- package/dist/cjs/solution-variables.cjs.entry.js +107 -0
- package/dist/cjs/solutions-components.cjs.js +36 -5
- package/dist/cjs/sortableComponent-5e3419af.js +3443 -0
- package/dist/cjs/spatial-ref.cjs.entry.js +7 -6
- package/dist/cjs/sr-80f65cf0.js +102 -0
- package/dist/cjs/store-1f422ad4.js +91 -0
- package/dist/cjs/store-manager.cjs.entry.js +1 -1
- package/dist/cjs/sv-eee15401.js +72 -0
- package/dist/cjs/t9n-463dcbff.js +103 -0
- package/dist/cjs/th-f90768db.js +66 -0
- package/dist/cjs/time-4a9bf7e2.js +289 -0
- package/dist/cjs/tr-37fec0b5.js +67 -0
- package/dist/cjs/uk-3041a292.js +105 -0
- package/dist/cjs/utils-3a633152.js +64 -0
- package/dist/cjs/utils-7281bf72.js +110 -0
- package/dist/cjs/utils-72a66b3c.js +66 -0
- package/dist/cjs/utils-934ee777.js +142 -0
- package/dist/cjs/{utils-ea7a5a63.js → utils-ac836e7a.js} +1 -1
- package/dist/cjs/utils-b276a49d.js +226 -0
- package/dist/cjs/vi-57a02ad1.js +71 -0
- package/dist/cjs/zh-cn-165c486d.js +95 -0
- package/dist/cjs/zh-hk-0aa560a6.js +72 -0
- package/dist/cjs/zh-tw-42d975f0.js +93 -0
- package/dist/collection/utils/downloadUtils.js +36 -5
- package/dist/collection/utils/downloadUtils.ts +44 -5
- package/dist/collection/utils/test/downloadUtils.spec.js +33 -1
- package/dist/collection/utils/test/downloadUtils.spec.tsx +40 -1
- package/dist/components/ExpandToggle.js +8 -8
- package/dist/components/InitiativeUiSchemaEdit.js +26 -0
- package/dist/components/ProjectUiSchemaCreate.js +122 -0
- package/dist/components/ProjectUiSchemaEdit.js +176 -0
- package/dist/components/_commonjsHelpers.js +10 -2
- package/dist/components/action-bar.js +3 -3
- package/dist/components/action-group.js +1 -1
- package/dist/components/action-menu.js +1 -1
- package/dist/components/action-pad.js +1 -1
- package/dist/components/action.js +1 -1
- package/dist/components/alert.js +2 -2
- package/dist/components/arcgis-login.js +1 -1
- package/dist/components/avatar.js +1 -1
- package/dist/components/basemap-gallery2.js +1 -1
- package/dist/components/block.js +1 -1
- package/dist/components/buffer-tools2.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-block-section.js +1 -1
- package/dist/components/calcite-card.js +1 -1
- package/dist/components/calcite-chip-group.js +1 -1
- package/dist/components/calcite-color-picker.js +5 -5
- package/dist/components/calcite-combobox-item-group.js +1 -1
- package/dist/components/calcite-fab.js +1 -1
- package/dist/components/calcite-inline-editable.js +1 -1
- package/dist/components/calcite-input-time-picker.js +5 -1
- package/dist/components/calcite-input-time-zone.js +2 -2
- package/dist/components/calcite-list-item-group.js +1 -1
- package/dist/components/calcite-menu-item.js +1 -1
- package/dist/components/calcite-meter.js +1 -1
- package/dist/components/calcite-navigation-logo.js +1 -1
- package/dist/components/calcite-navigation-user.js +1 -1
- package/dist/components/calcite-navigation.js +1 -1
- package/dist/components/calcite-option-group.js +1 -1
- package/dist/components/calcite-pick-list-group.js +3 -3
- package/dist/components/calcite-pick-list.js +1 -1
- package/dist/components/calcite-radio-button-group.js +1 -1
- package/dist/components/calcite-rating.js +3 -1
- package/dist/components/calcite-sheet.js +1 -1
- package/dist/components/calcite-shell-center-row.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-table-row.js +1 -1
- package/dist/components/calcite-table.js +1 -1
- package/dist/components/calcite-text-area.js +2 -2
- 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-tip-group.js +1 -1
- package/dist/components/calcite-tip-manager.js +8 -1
- package/dist/components/calcite-tip.js +2 -2
- package/dist/components/card-manager2.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 +2 -2
- package/dist/components/color-picker-swatch.js +1 -1
- package/dist/components/combobox-item.js +1 -1
- package/dist/components/combobox.js +314 -3
- package/dist/components/consent-manager.js +376 -13
- package/dist/components/create-feature2.js +1 -1
- package/dist/components/crowdsource-manager.js +1 -1
- package/dist/components/crowdsource-reporter.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/deduct-calculator2.js +1 -1
- package/dist/components/delete-button2.js +1 -1
- package/dist/components/dom.js +28 -1
- package/dist/components/downloadUtils.js +1213 -102
- package/dist/components/dropdown-group.js +1 -1
- package/dist/components/dropdown-item.js +1 -1
- package/dist/components/dropdown.js +1 -1
- package/dist/components/edit-card2.js +1 -1
- package/dist/components/esri-loader.js +8 -3
- package/dist/components/feature-comments.js +1 -1
- package/dist/components/feature-form-flow-item.js +1 -1
- package/dist/components/feature-list2.js +1 -1
- package/dist/components/features-flow-item.js +1 -1
- package/dist/components/filter.js +1 -718
- package/dist/components/filter2.js +2 -2
- package/dist/components/floating-ui.js +384 -7
- package/dist/components/floor-filter2.js +1 -1
- package/dist/components/flow-item.js +1 -1
- package/dist/components/flow.js +1 -1
- package/dist/components/focusTrapComponent.js +1 -1
- package/dist/components/form.js +1 -1
- package/dist/components/graph.js +1 -1
- package/dist/components/handle.js +1 -1
- package/dist/components/helpers.js +6 -2
- package/dist/components/html2canvas.js +8 -3
- package/dist/components/icon.js +1 -1
- package/dist/components/index.es.js +555 -22
- package/dist/components/index.js +16 -0
- package/dist/components/index2.js +3 -0
- package/dist/components/index3.js +41270 -1873
- package/dist/components/index5.js +2086 -185
- package/dist/components/index6.js +188 -55
- package/dist/components/index7.js +71 -0
- package/dist/components/info-card2.js +1 -1
- package/dist/components/input-date-picker.js +1 -1
- package/dist/components/input-message.js +1 -1
- package/dist/components/input-number.js +1 -1
- package/dist/components/input-text.js +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/instant-apps-ckeditor-wrapper2.js +1 -1
- package/dist/components/instant-apps-control-panel.js +1 -1
- package/dist/components/instant-apps-export.js +14 -8
- package/dist/components/instant-apps-filter-list2.js +2 -1
- package/dist/components/instant-apps-header2.js +2 -2
- package/dist/components/instant-apps-interactive-legend-classic2.js +10 -7
- package/dist/components/instant-apps-interactive-legend-count2.js +2 -2
- package/dist/components/instant-apps-interactive-legend-group-legend-element-caption.js +1 -1
- package/dist/components/instant-apps-interactive-legend-group-legend-element2.js +1 -1
- package/dist/components/instant-apps-interactive-legend-layer-element-caption2.js +1 -1
- package/dist/components/instant-apps-interactive-legend-layer-element2.js +1 -1
- package/dist/components/instant-apps-interactive-legend-legend-element-caption2.js +2 -2
- package/dist/components/instant-apps-interactive-legend-legend-element2.js +1 -1
- package/dist/components/instant-apps-interactive-legend-relationship2.js +1 -1
- package/dist/components/instant-apps-interactive-legend.js +1 -1
- package/dist/components/instant-apps-keyboard-shortcuts.js +1 -1
- package/dist/components/instant-apps-landing-page.js +2 -2
- package/dist/components/instant-apps-language-switcher.js +1 -1
- package/dist/components/instant-apps-language-translator-item2.js +1 -1
- package/dist/components/instant-apps-language-translator-search2.js +1 -1
- package/dist/components/instant-apps-language-translator2.js +1 -1
- package/dist/components/instant-apps-measurement-tool2.js +1 -1
- package/dist/components/instant-apps-measurement.js +2 -2
- package/dist/components/instant-apps-popover.js +1 -1
- package/dist/components/instant-apps-popovers.js +1 -1
- package/dist/components/instant-apps-scoreboard.js +1 -1
- package/dist/components/instant-apps-social-share2.js +14 -8
- package/dist/components/instant-apps-splash.js +18 -4
- package/dist/components/json-editor2.js +1 -1
- package/dist/components/key.js +28 -0
- package/dist/components/label.js +1 -1
- package/dist/components/label2.js +1 -1
- package/dist/components/languageUtil.js +23 -2
- package/dist/components/layer-list2.js +1 -1
- package/dist/components/layer-table2.js +1 -1
- package/dist/components/layout-manager.js +1 -1
- package/dist/components/link.js +1 -1
- package/dist/components/list-flow-item.js +1 -1
- package/dist/components/list-item.js +1 -1
- package/dist/components/list.js +2 -2
- package/dist/components/loadModules2.js +1 -1
- package/dist/components/loader.js +1 -1
- package/dist/components/locale.js +12 -0
- package/dist/components/locale2.js +2 -1
- package/dist/components/location-flow-item.js +1 -1
- package/dist/components/lodash.js +18025 -0
- package/dist/components/map-card2.js +1 -1
- package/dist/components/map-draw-tools2.js +1 -1
- package/dist/components/map-fullscreen2.js +1 -1
- package/dist/components/map-layer-picker2.js +1 -1
- package/dist/components/map-legend2.js +1 -1
- package/dist/components/map-picker2.js +1 -1
- package/dist/components/map-search2.js +1 -1
- package/dist/components/map-select-tools2.js +1 -1
- package/dist/components/map-tools2.js +3 -1
- package/dist/components/menu.js +1 -1
- package/dist/components/modal.js +7 -1
- package/dist/components/mode.js +8 -0
- package/dist/components/notice.js +1 -1
- package/dist/components/openCloseComponent.js +48 -0
- package/dist/components/option.js +1 -1
- package/dist/components/pagination.js +194 -1
- package/dist/components/panel.js +2 -1
- package/dist/components/parser.js +1654 -0
- package/dist/components/pci-calculator.js +1 -1
- package/dist/components/pdf-download2.js +1 -1
- package/dist/components/pick-list-item.js +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/public-notification.js +1 -1
- package/dist/components/purify.js +5 -2
- package/dist/components/queryUtils.js +43 -0
- package/dist/components/radio-button.js +1 -1
- package/dist/components/refine-results-flow-item.js +1 -1
- package/dist/components/refine-selection2.js +1 -1
- package/dist/components/resources.js +17 -0
- package/dist/components/resources4.js +3 -0
- package/dist/components/scrim.js +1 -1
- package/dist/components/segmented-control-item.js +1 -1
- package/dist/components/segmented-control.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/share-item.js +1 -1
- package/dist/components/shared-list-render.js +6 -1
- package/dist/components/shell-panel.js +1 -1
- package/dist/components/shell.js +1 -1
- package/dist/components/slider.js +3 -1
- package/dist/components/solution-configuration.js +2 -1088
- package/dist/components/solution-contents2.js +1 -1
- package/dist/components/solution-item-details2.js +1 -1
- package/dist/components/solution-item-icon2.js +1 -1
- package/dist/components/solution-item-sharing2.js +1 -1
- package/dist/components/solution-item2.js +1 -1
- package/dist/components/solution-organization-variables2.js +1 -1
- package/dist/components/solution-resource-item2.js +2 -3
- package/dist/components/solution-spatial-ref2.js +1 -1
- package/dist/components/solution-store.js +1 -756
- package/dist/components/solution-template-data2.js +1 -1
- package/dist/components/solution-variables2.js +1 -1
- package/dist/components/sortableComponent.js +701 -0
- package/dist/components/spatial-ref2.js +263 -4
- package/dist/components/stack.js +1 -1
- package/dist/components/store-manager.js +1 -1
- package/dist/components/store.js +1 -0
- package/dist/components/switch.js +1 -1
- package/dist/components/t9n.js +1 -1
- package/dist/components/tab-nav.js +1 -1
- package/dist/components/tab-title.js +1 -1
- package/dist/components/tab.js +1 -1
- package/dist/components/table-cell.js +1 -1
- package/dist/components/table-header.js +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/time-picker.js +2 -2
- package/dist/components/tooltip.js +1 -1
- package/dist/components/tree-item.js +1 -1
- package/dist/components/tree.js +1 -1
- package/dist/components/utils.js +6 -1
- package/dist/components/utils2.js +1 -1
- package/dist/components/utils4.js +12 -0
- package/dist/components/value-list-item.js +1 -1
- package/dist/components/value-list.js +4 -1
- package/dist/esm/ExpandToggle-22fd2faa.js +110 -0
- package/dist/esm/FloatingArrow-de6fd1c7.js +48 -0
- package/dist/esm/Heading-f003a141.js +22 -0
- package/dist/esm/InitiativeUiSchemaEdit-8ddacfe8.js +26 -0
- package/dist/esm/ProjectUiSchemaCreate-dd179c0f.js +124 -0
- package/dist/esm/ProjectUiSchemaEdit-fbfdf6e4.js +176 -0
- package/dist/esm/Validation-59a77488.js +18 -0
- package/dist/esm/_commonjsHelpers-3cd6d4ee.js +49 -0
- package/dist/esm/app-globals-928553ab.js +67 -0
- package/dist/esm/ar-75ffdabb.js +103 -0
- package/dist/esm/arcgis-login.entry.js +1 -1
- package/dist/esm/basemap-gallery.entry.js +117 -0
- package/dist/esm/bg-fac0bf10.js +81 -0
- package/dist/esm/browser-b8d08bed.js +26 -0
- package/dist/esm/bs-c03c8ef2.js +50 -0
- package/dist/esm/buffer-tools.entry.js +253 -0
- package/dist/esm/ca-29e49f82.js +70 -0
- package/dist/esm/calcite-accordion-item.entry.js +5 -5
- package/dist/esm/calcite-accordion.entry.js +2 -2
- package/dist/esm/calcite-action-bar.entry.js +11 -11
- package/dist/esm/calcite-action-group.entry.js +12 -12
- package/dist/esm/calcite-action-menu.entry.js +291 -0
- package/dist/esm/calcite-action-pad.entry.js +165 -0
- package/dist/esm/calcite-action-pad_2.entry.js +1 -1
- package/dist/esm/calcite-action.entry.js +184 -0
- package/dist/esm/calcite-alert.entry.js +318 -0
- package/dist/esm/calcite-avatar.entry.js +4 -4
- package/dist/esm/calcite-block-section.entry.js +8 -8
- package/dist/esm/calcite-block.entry.js +210 -0
- package/dist/esm/calcite-button.entry.js +13 -13
- package/dist/esm/calcite-card.entry.js +8 -8
- package/dist/esm/calcite-checkbox.entry.js +9 -9
- package/dist/esm/calcite-chip-group.entry.js +7 -7
- package/dist/esm/calcite-chip.entry.js +258 -0
- package/dist/esm/calcite-color-picker-hex-input.entry.js +270 -0
- package/dist/esm/calcite-color-picker-swatch.entry.js +95 -0
- package/dist/esm/calcite-color-picker.entry.js +16 -16
- package/dist/esm/calcite-combobox-item-group.entry.js +4 -4
- package/dist/esm/calcite-combobox-item.entry.js +141 -0
- package/dist/esm/calcite-combobox.entry.js +1427 -0
- package/dist/esm/calcite-date-picker-day.entry.js +93 -0
- package/dist/esm/calcite-date-picker-month-header.entry.js +203 -0
- package/dist/esm/calcite-date-picker-month.entry.js +358 -0
- package/dist/esm/calcite-date-picker.entry.js +456 -0
- package/dist/esm/calcite-dropdown-group.entry.js +81 -0
- package/dist/esm/calcite-dropdown-item.entry.js +184 -0
- package/dist/esm/calcite-dropdown.entry.js +426 -0
- package/dist/esm/calcite-fab.entry.js +6 -6
- package/dist/esm/calcite-filter.entry.js +175 -0
- package/dist/esm/calcite-flow-item.entry.js +194 -0
- package/dist/esm/calcite-flow.entry.js +149 -0
- package/dist/esm/calcite-graph.entry.js +222 -0
- package/dist/esm/calcite-handle.entry.js +200 -0
- package/dist/esm/calcite-icon.entry.js +5 -5
- package/dist/esm/calcite-inline-editable.entry.js +11 -11
- package/dist/esm/calcite-input-date-picker.entry.js +740 -0
- package/dist/esm/calcite-input-date-picker_3.entry.js +16 -10
- package/dist/esm/calcite-input-message.entry.js +66 -0
- package/dist/esm/calcite-input-number.entry.js +13 -13
- package/dist/esm/calcite-input-text.entry.js +13 -13
- package/dist/esm/calcite-input-time-picker-e5cd4d26.js +1851 -0
- package/dist/esm/calcite-input-time-picker.entry.js +17 -17
- package/dist/esm/calcite-input-time-zone.entry.js +12 -12
- package/dist/esm/calcite-input.entry.js +691 -0
- package/dist/esm/calcite-label.entry.js +4 -4
- package/dist/esm/calcite-link.entry.js +6 -6
- package/dist/esm/calcite-list-item-group.entry.js +4 -4
- package/dist/esm/calcite-list-item.entry.js +450 -0
- package/dist/esm/calcite-list.entry.js +563 -0
- package/dist/esm/calcite-loader.entry.js +76 -0
- package/dist/esm/calcite-menu-item.entry.js +8 -8
- package/dist/esm/calcite-menu.entry.js +8 -8
- package/dist/esm/calcite-meter.entry.js +8 -8
- package/dist/esm/calcite-modal.entry.js +17 -11
- package/dist/esm/calcite-navigation-logo.entry.js +2 -2
- package/dist/esm/calcite-navigation-user.entry.js +2 -2
- package/dist/esm/calcite-navigation.entry.js +4 -4
- package/dist/esm/calcite-notice.entry.js +10 -10
- package/dist/esm/calcite-option-group.entry.js +1 -1
- package/dist/esm/calcite-option.entry.js +84 -0
- package/dist/esm/calcite-pagination.entry.js +201 -8
- package/dist/esm/calcite-panel.entry.js +266 -0
- package/dist/esm/calcite-pick-list-group.entry.js +6 -6
- package/dist/esm/calcite-pick-list-item.entry.js +13 -13
- package/dist/esm/calcite-pick-list.entry.js +10 -10
- package/dist/esm/calcite-popover.entry.js +414 -0
- package/dist/esm/calcite-progress.entry.js +37 -0
- package/dist/esm/calcite-radio-button-group.entry.js +4 -4
- package/dist/esm/calcite-radio-button.entry.js +8 -8
- package/dist/esm/calcite-rating.entry.js +14 -12
- package/dist/esm/calcite-scrim.entry.js +7 -7
- package/dist/esm/calcite-segmented-control-item.entry.js +66 -0
- package/dist/esm/calcite-segmented-control.entry.js +241 -0
- package/dist/esm/calcite-select.entry.js +231 -0
- package/dist/esm/calcite-sheet.entry.js +7 -7
- package/dist/esm/calcite-shell-center-row.entry.js +5 -5
- package/dist/esm/calcite-shell-panel.entry.js +410 -0
- package/dist/esm/calcite-shell.entry.js +170 -0
- package/dist/esm/calcite-slider.entry.js +840 -0
- package/dist/esm/calcite-sortable-list.entry.js +7 -7
- package/dist/esm/calcite-split-button.entry.js +4 -4
- package/dist/esm/calcite-stack.entry.js +70 -0
- package/dist/esm/calcite-stepper-item.entry.js +10 -10
- package/dist/esm/calcite-stepper.entry.js +7 -7
- package/dist/esm/calcite-switch.entry.js +9 -9
- package/dist/esm/calcite-tab-nav.entry.js +259 -0
- package/dist/esm/calcite-tab-title.entry.js +287 -0
- package/dist/esm/calcite-tab.entry.js +108 -0
- package/dist/esm/calcite-table-cell.entry.js +152 -0
- package/dist/esm/calcite-table-header.entry.js +165 -0
- package/dist/esm/calcite-table-row.entry.js +6 -6
- package/dist/esm/calcite-table.entry.js +9 -9
- package/dist/esm/calcite-tabs.entry.js +174 -0
- package/dist/esm/calcite-text-area.entry.js +14 -15
- package/dist/esm/calcite-tile-select-group.entry.js +3 -3
- package/dist/esm/calcite-tile-select.entry.js +4 -4
- package/dist/esm/calcite-tile.entry.js +7 -7
- package/dist/esm/calcite-time-picker.entry.js +9 -9
- package/dist/esm/calcite-tip-group.entry.js +1 -1
- package/dist/esm/calcite-tip-manager.entry.js +15 -8
- package/dist/esm/calcite-tip.entry.js +9 -9
- package/dist/esm/calcite-tooltip.entry.js +7 -7
- package/dist/esm/calcite-tree-item.entry.js +292 -0
- package/dist/esm/calcite-tree.entry.js +311 -0
- package/dist/esm/calcite-value-list-item.entry.js +153 -0
- package/dist/esm/calcite-value-list.entry.js +322 -0
- package/dist/esm/card-manager.entry.js +103 -0
- package/dist/esm/card-manager_3.entry.js +1 -1
- package/dist/esm/common-7e0dcaa2.js +295 -0
- package/dist/esm/conditionalSlot-a395417e.js +60 -0
- package/dist/esm/consent-manager.entry.js +379 -15
- package/dist/esm/create-feature.entry.js +259 -0
- package/dist/esm/crowdsource-manager.entry.js +7 -5
- package/dist/esm/crowdsource-reporter.entry.js +7 -5
- package/dist/esm/cs-04f36d01.js +146 -0
- package/dist/esm/da-5a3b8600.js +65 -0
- package/dist/esm/date-74c7f03b.js +245 -0
- package/dist/esm/de-579cda2e.js +90 -0
- package/dist/esm/de-at-52bf1c4c.js +89 -0
- package/dist/esm/de-ch-12d03480.js +89 -0
- package/dist/esm/deduct-calculator.entry.js +1 -1
- package/dist/esm/delete-button.entry.js +146 -0
- package/dist/esm/dom-b91aa537.js +1083 -0
- package/dist/esm/{downloadUtils-a6c0e25f.js → downloadUtils-01e2cb56.js} +37 -6
- package/dist/esm/downloadUtils-b3220f86.js +4240 -0
- package/dist/esm/edit-card.entry.js +224 -0
- package/dist/esm/el-c18d3ea4.js +65 -0
- package/dist/esm/en-au-2599e6da.js +65 -0
- package/dist/esm/en-ca-8cfbe6bc.js +64 -0
- package/dist/esm/en-gb-5e4e8a1e.js +68 -0
- package/dist/esm/es-d86f9957.js +65 -0
- package/dist/esm/es-mx-f99d9fd1.js +64 -0
- package/dist/esm/esri-loader-af2bbfd5.js +306 -0
- package/dist/esm/et-8bf52e57.js +91 -0
- package/dist/esm/feature-comments.entry.js +1 -1
- package/dist/esm/feature-form-flow-item.entry.js +1 -1
- package/dist/esm/feature-list.entry.js +195 -0
- package/dist/esm/features-flow-item.entry.js +1 -1
- package/dist/esm/fi-aeb49e52.js +114 -0
- package/dist/esm/filter-0d00d2e2.js +46 -0
- package/dist/esm/floating-ui-b3256614.js +2342 -0
- package/dist/esm/floor-filter.entry.js +107 -0
- package/dist/esm/focusTrapComponent-2fe6623b.js +1023 -0
- package/dist/esm/form-f2181470.js +307 -0
- package/dist/esm/fr-6200cc01.js +67 -0
- package/dist/esm/fr-ch-df62bb30.js +65 -0
- package/dist/esm/he-07ace6cb.js +104 -0
- package/dist/esm/helpers-85ca7251.js +807 -0
- package/dist/esm/{helpers-aeddac74.js → helpers-f9256189.js} +1 -1
- package/dist/esm/hi-5aa9519e.js +64 -0
- package/dist/esm/hr-e0614bed.js +79 -0
- package/dist/esm/html2canvas-d52e7c8d.js +7845 -0
- package/dist/esm/hu-732fe37c.js +87 -0
- package/dist/esm/id-0832fc24.js +65 -0
- package/dist/esm/index-7fc1cba9.js +41502 -0
- package/dist/esm/index-91eeaf01.js +199 -0
- package/dist/esm/index-b1fb529b.js +1956 -0
- package/dist/esm/index-bdfaac50.js +4145 -0
- package/dist/esm/index.es-3db60115.js +11256 -0
- package/dist/esm/{index.es-b0a676ae.js → index.es-ac6f5e76.js} +1 -1
- package/dist/esm/index.js +15 -0
- package/dist/esm/info-card.entry.js +316 -0
- package/dist/esm/instant-apps-ckeditor-wrapper.entry.js +121 -0
- package/dist/esm/instant-apps-ckeditor-wrapper_3.entry.js +4 -4
- package/dist/esm/instant-apps-control-panel.entry.js +4 -4
- package/dist/esm/instant-apps-export.entry.js +20 -14
- package/dist/esm/instant-apps-filter-list.entry.js +1055 -0
- package/dist/esm/instant-apps-header.entry.js +5 -4
- package/dist/esm/instant-apps-interactive-legend-classic.entry.js +15 -11
- package/dist/esm/instant-apps-interactive-legend-count.entry.js +100 -0
- package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +2 -2
- package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +7 -6
- package/dist/esm/instant-apps-interactive-legend-group-legend-element.entry.js +52 -0
- package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +2 -2
- package/dist/esm/instant-apps-interactive-legend-layer-element-caption.entry.js +51 -0
- package/dist/esm/instant-apps-interactive-legend-layer-element.entry.js +53 -0
- package/dist/esm/instant-apps-interactive-legend-legend-element-caption.entry.js +100 -0
- package/dist/esm/instant-apps-interactive-legend-legend-element.entry.js +61 -0
- package/dist/esm/instant-apps-interactive-legend-relationship.entry.js +548 -0
- package/dist/esm/instant-apps-interactive-legend.entry.js +9 -8
- package/dist/esm/instant-apps-keyboard-shortcuts.entry.js +6 -6
- package/dist/esm/instant-apps-landing-page.entry.js +2 -2
- package/dist/esm/instant-apps-language-switcher.entry.js +9 -9
- package/dist/esm/instant-apps-language-translator-item.entry.js +380 -0
- package/dist/esm/instant-apps-language-translator-search.entry.js +101 -0
- package/dist/esm/instant-apps-language-translator.entry.js +9 -9
- package/dist/esm/instant-apps-measurement-tool.entry.js +135 -0
- package/dist/esm/instant-apps-measurement.entry.js +7 -7
- package/dist/esm/instant-apps-popover.entry.js +6 -6
- package/dist/esm/instant-apps-popovers.entry.js +1 -1
- package/dist/esm/instant-apps-scoreboard.entry.js +6 -6
- package/dist/esm/instant-apps-social-share.entry.js +511 -0
- package/dist/esm/instant-apps-splash.entry.js +17 -8
- package/dist/esm/interactive-71585ecc.js +139 -0
- package/dist/esm/it-142bc820.js +65 -0
- package/dist/esm/it-ch-1ad1f0ac.js +65 -0
- package/dist/esm/ja-6a33e9d4.js +71 -0
- package/dist/esm/json-editor.entry.js +402 -0
- package/dist/esm/key-9a10d862.js +44 -0
- package/dist/esm/ko-d61df01d.js +71 -0
- package/dist/esm/label-16184ce7.js +179 -0
- package/dist/esm/{languageSwitcher-4faa659f.js → languageSwitcher-068998b1.js} +1 -1
- package/dist/esm/languageSwitcher-2a9037e5.js +55 -0
- package/dist/esm/{languageUtil-dc3111c1.js → languageUtil-035e7728.js} +1 -1
- package/dist/esm/languageUtil-71a7a914.js +87 -0
- package/dist/esm/layer-list.entry.js +203 -0
- package/dist/esm/layer-table.entry.js +1483 -0
- package/dist/esm/layout-manager.entry.js +5 -4
- package/dist/esm/list-flow-item.entry.js +1 -1
- package/dist/esm/{loadModules-877bbb89.js → loadModules-7a5f1022.js} +1 -1
- package/dist/esm/loadModules-827c5581.js +28 -0
- package/dist/esm/loadModules-acccbc1c.js +21 -0
- package/dist/esm/loadable-aea90723.js +92 -0
- package/dist/esm/loader.js +5 -5
- package/dist/esm/{locale-bd9034e1.js → locale-4cab280d.js} +2 -2
- package/dist/esm/locale-4cfbae3e.js +86 -0
- package/dist/esm/locale-857f39cf.js +572 -0
- package/dist/esm/locale-d9463a95.js +148 -0
- package/dist/esm/location-flow-item.entry.js +1 -1
- package/dist/esm/lodash-98e4b7d0.js +18025 -0
- package/dist/esm/lt-652c530a.js +96 -0
- package/dist/esm/lv-84e48ed0.js +65 -0
- package/dist/esm/map-card.entry.js +188 -0
- package/dist/esm/map-draw-tools.entry.js +354 -0
- package/dist/esm/map-fullscreen.entry.js +112 -0
- package/dist/esm/map-layer-picker.entry.js +342 -0
- package/dist/esm/map-legend.entry.js +105 -0
- package/dist/esm/map-picker.entry.js +170 -0
- package/dist/esm/map-search.entry.js +180 -0
- package/dist/esm/map-select-tools.entry.js +794 -0
- package/dist/esm/map-select-tools_3.entry.js +1 -1
- package/dist/esm/map-tools.entry.js +371 -0
- package/dist/esm/mapViewUtils-436a516e.js +261 -0
- package/dist/esm/mk-bbf2ee01.js +65 -0
- package/dist/esm/mode-f9bfc4e9.js +25 -0
- package/dist/esm/nb-ccfaa0f7.js +66 -0
- package/dist/esm/nl-4bc56289.js +66 -0
- package/dist/esm/observers-5ba39eee.js +56 -0
- package/dist/esm/openCloseComponent-b4b3788b.js +138 -0
- package/dist/esm/parser-87982ce2.js +1654 -0
- package/dist/esm/pci-calculator.entry.js +1 -1
- package/dist/esm/pdf-download.entry.js +355 -0
- package/dist/esm/pl-1f435988.js +113 -0
- package/dist/esm/popupUtils-b61d7ffd.js +94 -0
- package/dist/esm/pt-4a05a00d.js +66 -0
- package/dist/esm/pt-br-9720547b.js +64 -0
- package/dist/esm/public-notification.entry.js +11 -10
- package/dist/esm/publicNotificationStore-208e26f0.js +45 -0
- package/dist/esm/purify-909c20fa.js +1713 -0
- package/dist/esm/queryUtils-2529c537.js +244 -0
- package/dist/esm/refine-results-flow-item.entry.js +1 -1
- package/dist/esm/refine-selection.entry.js +407 -0
- package/dist/esm/resources-0f8db821.js +45 -0
- package/dist/esm/resources-3c6947d3.js +26 -0
- package/dist/esm/resources-47b3ca40.js +106 -0
- package/dist/esm/resources-667afb5d.js +27 -0
- package/dist/esm/resources-9b2084c6.js +24 -0
- package/dist/esm/resources-bb6c11c3.js +49 -0
- package/dist/esm/ro-f87076a1.js +65 -0
- package/dist/esm/ru-e69ca895.js +125 -0
- package/dist/esm/shadow-css-f5236d52.js +481 -0
- package/dist/esm/share-item.entry.js +1 -1
- package/dist/esm/shared-list-render-a572ef93.js +348 -0
- package/dist/esm/sk-d632e850.js +147 -0
- package/dist/esm/sl-5099fa6f.js +167 -0
- package/dist/esm/solution-configuration.entry.js +9 -1093
- package/dist/esm/solution-contents.entry.js +80 -0
- package/dist/esm/solution-item-details.entry.js +195 -0
- package/dist/esm/solution-item-icon.entry.js +1 -1
- package/dist/esm/solution-item-sharing.entry.js +135 -0
- package/dist/esm/solution-item.entry.js +102 -0
- package/dist/esm/solution-organization-variables.entry.js +91 -0
- package/dist/esm/solution-resource-item.entry.js +280 -0
- package/dist/esm/solution-spatial-ref.entry.js +154 -0
- package/dist/esm/solution-store-31cccb90.js +587 -0
- package/dist/esm/solution-template-data.entry.js +115 -0
- package/dist/esm/solution-variables.entry.js +103 -0
- package/dist/esm/solutions-components.js +37 -6
- package/dist/esm/sortableComponent-e715a3dd.js +3439 -0
- package/dist/esm/spatial-ref.entry.js +7 -6
- package/dist/esm/sr-944b7fd7.js +100 -0
- package/dist/esm/store-194c1a01.js +87 -0
- package/dist/esm/store-manager.entry.js +1 -1
- package/dist/esm/sv-e481fa6a.js +70 -0
- package/dist/esm/t9n-b39c5433.js +98 -0
- package/dist/esm/th-60961669.js +64 -0
- package/dist/esm/time-4a90614b.js +274 -0
- package/dist/esm/tr-eba8dd86.js +65 -0
- package/dist/esm/uk-ec375ce0.js +103 -0
- package/dist/esm/utils-32df4a1e.js +133 -0
- package/dist/esm/utils-57e2ccde.js +61 -0
- package/dist/esm/{utils-28d0a086.js → utils-78fe6e5b.js} +1 -1
- package/dist/esm/utils-7db4ecdc.js +100 -0
- package/dist/esm/utils-95e9dd51.js +55 -0
- package/dist/esm/utils-cfbe589a.js +208 -0
- package/dist/esm/vi-29345f79.js +69 -0
- package/dist/esm/zh-cn-32c7c714.js +93 -0
- package/dist/esm/zh-hk-7c770845.js +70 -0
- package/dist/esm/zh-tw-c318be5c.js +91 -0
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-header/instant-apps-header.css +1 -1
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-scoreboard/instant-apps-scoreboard.css +1 -1
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-social-share/instant-apps-social-share.css +8 -1
- package/dist/solutions-components/ExpandToggle-22fd2faa.js +110 -0
- package/dist/solutions-components/FloatingArrow-de6fd1c7.js +48 -0
- package/dist/solutions-components/Heading-f003a141.js +22 -0
- package/dist/solutions-components/InitiativeUiSchemaEdit-8ddacfe8.js +26 -0
- package/dist/solutions-components/ProjectUiSchemaCreate-dd179c0f.js +124 -0
- package/dist/solutions-components/ProjectUiSchemaEdit-fbfdf6e4.js +176 -0
- package/dist/solutions-components/Validation-59a77488.js +18 -0
- package/dist/solutions-components/_commonjsHelpers-3cd6d4ee.js +49 -0
- package/dist/solutions-components/app-globals-928553ab.js +67 -0
- package/dist/solutions-components/ar-75ffdabb.js +103 -0
- package/dist/solutions-components/arcgis-login.entry.js +56 -0
- package/dist/solutions-components/array-396bdf3c.js +15 -0
- package/dist/solutions-components/basemap-gallery.entry.js +117 -0
- package/dist/solutions-components/bg-fac0bf10.js +81 -0
- package/dist/solutions-components/breakpoints-f0f1417d.js +15 -0
- package/dist/solutions-components/browser-b8d08bed.js +26 -0
- package/dist/solutions-components/bs-c03c8ef2.js +50 -0
- package/dist/solutions-components/buffer-tools.entry.js +253 -0
- package/dist/solutions-components/ca-29e49f82.js +70 -0
- package/dist/solutions-components/calcite-accordion-item.entry.js +176 -0
- package/dist/solutions-components/calcite-accordion.entry.js +81 -0
- package/dist/solutions-components/calcite-action-bar.entry.js +252 -0
- package/dist/solutions-components/calcite-action-group.entry.js +112 -0
- package/dist/solutions-components/calcite-action-menu.entry.js +291 -0
- package/dist/solutions-components/calcite-action-pad.entry.js +165 -0
- package/dist/solutions-components/calcite-action.entry.js +184 -0
- package/dist/solutions-components/calcite-alert.entry.js +318 -0
- package/dist/solutions-components/calcite-avatar.entry.js +146 -0
- package/dist/solutions-components/calcite-block-section.entry.js +162 -0
- package/dist/solutions-components/calcite-block.entry.js +210 -0
- package/dist/solutions-components/calcite-button.entry.js +227 -0
- package/dist/solutions-components/calcite-card.entry.js +132 -0
- package/dist/solutions-components/calcite-checkbox.entry.js +134 -0
- package/dist/solutions-components/calcite-chip-group.entry.js +175 -0
- package/dist/solutions-components/calcite-chip.entry.js +258 -0
- package/dist/solutions-components/calcite-color-picker-hex-input.entry.js +270 -0
- package/dist/solutions-components/calcite-color-picker-swatch.entry.js +95 -0
- package/dist/solutions-components/calcite-color-picker.entry.js +906 -0
- package/dist/solutions-components/calcite-combobox-item-group.entry.js +56 -0
- package/dist/solutions-components/calcite-combobox-item.entry.js +141 -0
- package/dist/solutions-components/calcite-combobox.entry.js +1427 -0
- package/dist/solutions-components/calcite-date-picker-day.entry.js +93 -0
- package/dist/solutions-components/calcite-date-picker-month-header.entry.js +203 -0
- package/dist/solutions-components/calcite-date-picker-month.entry.js +358 -0
- package/dist/solutions-components/calcite-date-picker.entry.js +456 -0
- package/dist/solutions-components/calcite-dropdown-group.entry.js +81 -0
- package/dist/solutions-components/calcite-dropdown-item.entry.js +184 -0
- package/dist/solutions-components/calcite-dropdown.entry.js +426 -0
- package/dist/solutions-components/calcite-fab.entry.js +90 -0
- package/dist/solutions-components/calcite-filter.entry.js +175 -0
- package/dist/solutions-components/calcite-flow-item.entry.js +194 -0
- package/dist/solutions-components/calcite-flow.entry.js +149 -0
- package/dist/solutions-components/calcite-graph.entry.js +222 -0
- package/dist/solutions-components/calcite-handle.entry.js +200 -0
- package/dist/solutions-components/calcite-icon.entry.js +179 -0
- package/dist/solutions-components/calcite-inline-editable.entry.js +253 -0
- package/dist/solutions-components/calcite-input-date-picker.entry.js +740 -0
- package/dist/solutions-components/calcite-input-message.entry.js +66 -0
- package/dist/solutions-components/calcite-input-number.entry.js +610 -0
- package/dist/solutions-components/calcite-input-text.entry.js +349 -0
- package/dist/solutions-components/calcite-input-time-picker-e5cd4d26.js +1851 -0
- package/dist/solutions-components/calcite-input-time-picker.entry.js +25 -0
- package/dist/solutions-components/calcite-input-time-zone.entry.js +332 -0
- package/dist/solutions-components/calcite-input.entry.js +691 -0
- package/dist/solutions-components/calcite-label.entry.js +67 -0
- package/dist/solutions-components/calcite-link.entry.js +108 -0
- package/dist/solutions-components/calcite-list-item-group.entry.js +69 -0
- package/dist/solutions-components/calcite-list-item.entry.js +450 -0
- package/dist/solutions-components/calcite-list.entry.js +563 -0
- package/dist/solutions-components/calcite-loader.entry.js +76 -0
- package/dist/solutions-components/calcite-menu-item.entry.js +281 -0
- package/dist/solutions-components/calcite-menu.entry.js +180 -0
- package/dist/solutions-components/calcite-meter.entry.js +332 -0
- package/dist/solutions-components/calcite-modal.entry.js +394 -0
- package/dist/solutions-components/calcite-navigation-logo.entry.js +84 -0
- package/dist/solutions-components/calcite-navigation-user.entry.js +68 -0
- package/dist/solutions-components/calcite-navigation.entry.js +166 -0
- package/dist/solutions-components/calcite-notice.entry.js +163 -0
- package/dist/solutions-components/calcite-option-group.entry.js +35 -0
- package/dist/solutions-components/calcite-option.entry.js +84 -0
- package/dist/solutions-components/calcite-pagination.entry.js +554 -0
- package/dist/solutions-components/calcite-panel.entry.js +266 -0
- package/dist/solutions-components/calcite-pick-list-group.entry.js +57 -0
- package/dist/solutions-components/calcite-pick-list-item.entry.js +193 -0
- package/dist/solutions-components/calcite-pick-list.entry.js +142 -0
- package/dist/solutions-components/calcite-popover.entry.js +414 -0
- package/dist/solutions-components/calcite-progress.entry.js +37 -0
- package/dist/solutions-components/calcite-radio-button-group.entry.js +141 -0
- package/dist/solutions-components/calcite-radio-button.entry.js +318 -0
- package/dist/solutions-components/calcite-rating.entry.js +261 -0
- package/dist/solutions-components/calcite-scrim.entry.js +121 -0
- package/dist/solutions-components/calcite-segmented-control-item.entry.js +66 -0
- package/dist/solutions-components/calcite-segmented-control.entry.js +241 -0
- package/dist/solutions-components/calcite-select.entry.js +231 -0
- package/dist/solutions-components/calcite-sheet.entry.js +223 -0
- package/dist/solutions-components/calcite-shell-center-row.entry.js +66 -0
- package/dist/solutions-components/calcite-shell-panel.entry.js +410 -0
- package/dist/solutions-components/calcite-shell.entry.js +170 -0
- package/dist/solutions-components/calcite-slider.entry.js +840 -0
- package/dist/solutions-components/calcite-sortable-list.entry.js +166 -0
- package/dist/solutions-components/calcite-split-button.entry.js +112 -0
- package/dist/solutions-components/calcite-stack.entry.js +70 -0
- package/dist/solutions-components/calcite-stepper-item.entry.js +238 -0
- package/dist/solutions-components/calcite-stepper.entry.js +377 -0
- package/dist/solutions-components/calcite-switch.entry.js +113 -0
- package/dist/solutions-components/calcite-tab-nav.entry.js +259 -0
- package/dist/solutions-components/calcite-tab-title.entry.js +287 -0
- package/dist/solutions-components/calcite-tab.entry.js +108 -0
- package/dist/solutions-components/calcite-table-cell.entry.js +152 -0
- package/dist/solutions-components/calcite-table-header.entry.js +165 -0
- package/dist/solutions-components/calcite-table-row.entry.js +244 -0
- package/dist/solutions-components/calcite-table.entry.js +314 -0
- package/dist/solutions-components/calcite-tabs.entry.js +174 -0
- package/dist/solutions-components/calcite-text-area.entry.js +276 -0
- package/dist/solutions-components/calcite-tile-select-group.entry.js +39 -0
- package/dist/solutions-components/calcite-tile-select.entry.js +225 -0
- package/dist/solutions-components/calcite-tile.entry.js +75 -0
- package/dist/solutions-components/calcite-time-picker.entry.js +839 -0
- package/dist/solutions-components/calcite-tip-group.entry.js +21 -0
- package/dist/solutions-components/calcite-tip-manager.entry.js +227 -0
- package/dist/solutions-components/calcite-tip.entry.js +126 -0
- package/dist/solutions-components/calcite-tooltip.entry.js +434 -0
- package/dist/solutions-components/calcite-tree-item.entry.js +292 -0
- package/dist/solutions-components/calcite-tree.entry.js +311 -0
- package/dist/solutions-components/calcite-value-list-item.entry.js +153 -0
- package/dist/solutions-components/calcite-value-list.entry.js +322 -0
- package/dist/solutions-components/card-manager.entry.js +103 -0
- package/dist/solutions-components/common-7e0dcaa2.js +295 -0
- package/dist/solutions-components/component-edd2c3cd.js +30 -0
- package/dist/solutions-components/conditionalSlot-a395417e.js +60 -0
- package/dist/solutions-components/consent-manager.entry.js +2139 -0
- package/dist/solutions-components/create-feature.entry.js +259 -0
- package/dist/solutions-components/crowdsource-manager.entry.js +494 -0
- package/dist/solutions-components/crowdsource-reporter.entry.js +557 -0
- package/dist/solutions-components/cs-04f36d01.js +146 -0
- package/dist/solutions-components/da-5a3b8600.js +65 -0
- package/dist/solutions-components/date-74c7f03b.js +245 -0
- package/dist/solutions-components/de-579cda2e.js +90 -0
- package/dist/solutions-components/de-at-52bf1c4c.js +89 -0
- package/dist/solutions-components/de-ch-12d03480.js +89 -0
- package/dist/solutions-components/deduct-calculator.entry.js +101 -0
- package/dist/solutions-components/delete-button.entry.js +146 -0
- package/dist/solutions-components/dom-b91aa537.js +1083 -0
- package/dist/solutions-components/downloadUtils-b3220f86.js +4240 -0
- package/dist/solutions-components/edit-card.entry.js +224 -0
- package/dist/solutions-components/el-c18d3ea4.js +65 -0
- package/dist/solutions-components/en-au-2599e6da.js +65 -0
- package/dist/solutions-components/en-ca-8cfbe6bc.js +64 -0
- package/dist/solutions-components/en-gb-5e4e8a1e.js +68 -0
- package/dist/solutions-components/es-d86f9957.js +65 -0
- package/dist/solutions-components/es-mx-f99d9fd1.js +64 -0
- package/dist/solutions-components/esri-loader-af2bbfd5.js +306 -0
- package/dist/solutions-components/et-8bf52e57.js +91 -0
- package/dist/solutions-components/feature-comments.entry.js +56 -0
- package/dist/solutions-components/feature-form-flow-item.entry.js +56 -0
- package/dist/solutions-components/feature-list.entry.js +195 -0
- package/dist/solutions-components/features-flow-item.entry.js +56 -0
- package/dist/solutions-components/fi-aeb49e52.js +114 -0
- package/dist/solutions-components/filter-0d00d2e2.js +46 -0
- package/dist/solutions-components/floating-ui-b3256614.js +2342 -0
- package/dist/solutions-components/floor-filter.entry.js +107 -0
- package/dist/solutions-components/focusTrapComponent-2fe6623b.js +1023 -0
- package/dist/solutions-components/form-f2181470.js +307 -0
- package/dist/solutions-components/fr-6200cc01.js +67 -0
- package/dist/solutions-components/fr-ch-df62bb30.js +65 -0
- package/dist/solutions-components/guid-b75a5f7b.js +24 -0
- package/dist/solutions-components/he-07ace6cb.js +104 -0
- package/dist/solutions-components/helpers-85ca7251.js +807 -0
- package/dist/solutions-components/hi-5aa9519e.js +64 -0
- package/dist/solutions-components/hr-e0614bed.js +79 -0
- package/dist/solutions-components/html2canvas-d52e7c8d.js +7845 -0
- package/dist/solutions-components/hu-732fe37c.js +87 -0
- package/dist/solutions-components/id-0832fc24.js +65 -0
- package/dist/solutions-components/index-5110a27a.js +71 -0
- package/dist/solutions-components/index-7fc1cba9.js +41502 -0
- package/dist/solutions-components/index-91eeaf01.js +199 -0
- package/dist/solutions-components/index-a1e91462.js +2105 -0
- package/dist/solutions-components/index-b1fb529b.js +1956 -0
- package/dist/solutions-components/index-bdfaac50.js +4145 -0
- package/dist/solutions-components/index-d8ff08ed.js +204 -0
- package/dist/solutions-components/index.es-3db60115.js +11256 -0
- package/dist/solutions-components/index.esm.js +15 -0
- package/dist/solutions-components/info-card.entry.js +316 -0
- package/dist/solutions-components/instant-apps-ckeditor-wrapper.entry.js +121 -0
- package/dist/solutions-components/instant-apps-control-panel.entry.js +94 -0
- package/dist/solutions-components/instant-apps-export.entry.js +888 -0
- package/dist/solutions-components/instant-apps-filter-list.entry.js +1055 -0
- package/dist/solutions-components/instant-apps-header.entry.js +124 -0
- package/dist/solutions-components/instant-apps-interactive-legend-classic.entry.js +1604 -0
- package/dist/solutions-components/instant-apps-interactive-legend-count.entry.js +100 -0
- package/dist/solutions-components/instant-apps-interactive-legend-group-legend-element-caption.entry.js +53 -0
- package/dist/solutions-components/instant-apps-interactive-legend-group-legend-element.entry.js +52 -0
- package/dist/solutions-components/instant-apps-interactive-legend-layer-element-caption.entry.js +51 -0
- package/dist/solutions-components/instant-apps-interactive-legend-layer-element.entry.js +53 -0
- package/dist/solutions-components/instant-apps-interactive-legend-legend-element-caption.entry.js +100 -0
- package/dist/solutions-components/instant-apps-interactive-legend-legend-element.entry.js +61 -0
- package/dist/solutions-components/instant-apps-interactive-legend-relationship.entry.js +548 -0
- package/dist/solutions-components/instant-apps-interactive-legend.entry.js +112 -0
- package/dist/solutions-components/instant-apps-keyboard-shortcuts.entry.js +139 -0
- package/dist/solutions-components/instant-apps-landing-page.entry.js +114 -0
- package/dist/solutions-components/instant-apps-language-switcher.entry.js +173 -0
- package/dist/solutions-components/instant-apps-language-translator-item.entry.js +380 -0
- package/dist/solutions-components/instant-apps-language-translator-search.entry.js +101 -0
- package/dist/solutions-components/instant-apps-language-translator.entry.js +286 -0
- package/dist/solutions-components/instant-apps-measurement-tool.entry.js +135 -0
- package/dist/solutions-components/instant-apps-measurement.entry.js +66 -0
- package/dist/solutions-components/instant-apps-popover.entry.js +74 -0
- package/dist/solutions-components/instant-apps-popovers.entry.js +88 -0
- package/dist/solutions-components/instant-apps-scoreboard.entry.js +463 -0
- package/dist/solutions-components/instant-apps-social-share.entry.js +511 -0
- package/dist/solutions-components/instant-apps-splash.entry.js +144 -0
- package/dist/solutions-components/interactive-71585ecc.js +139 -0
- package/dist/solutions-components/interfaces-586e863c.js +80 -0
- package/dist/solutions-components/it-142bc820.js +65 -0
- package/dist/solutions-components/it-ch-1ad1f0ac.js +65 -0
- package/dist/solutions-components/ja-6a33e9d4.js +71 -0
- package/dist/solutions-components/json-editor.entry.js +402 -0
- package/dist/solutions-components/key-9a10d862.js +44 -0
- package/dist/solutions-components/ko-d61df01d.js +71 -0
- package/dist/solutions-components/label-16184ce7.js +179 -0
- package/dist/solutions-components/languageSwitcher-2a9037e5.js +55 -0
- package/dist/solutions-components/languageUtil-71a7a914.js +87 -0
- package/dist/solutions-components/layer-list.entry.js +203 -0
- package/dist/solutions-components/layer-table.entry.js +1483 -0
- package/dist/solutions-components/layout-manager.entry.js +91 -0
- package/dist/solutions-components/list-flow-item.entry.js +56 -0
- package/dist/solutions-components/loadModules-827c5581.js +28 -0
- package/dist/solutions-components/loadModules-acccbc1c.js +21 -0
- package/dist/solutions-components/loadable-aea90723.js +92 -0
- package/dist/solutions-components/locale-4cfbae3e.js +86 -0
- package/dist/solutions-components/locale-857f39cf.js +572 -0
- package/dist/solutions-components/locale-d9463a95.js +148 -0
- package/dist/solutions-components/location-flow-item.entry.js +56 -0
- package/dist/solutions-components/lodash-98e4b7d0.js +18025 -0
- package/dist/solutions-components/lt-652c530a.js +96 -0
- package/dist/solutions-components/lv-84e48ed0.js +65 -0
- package/dist/solutions-components/map-card.entry.js +188 -0
- package/dist/solutions-components/map-draw-tools.entry.js +354 -0
- package/dist/solutions-components/map-fullscreen.entry.js +112 -0
- package/dist/solutions-components/map-layer-picker.entry.js +342 -0
- package/dist/solutions-components/map-legend.entry.js +105 -0
- package/dist/solutions-components/map-picker.entry.js +170 -0
- package/dist/solutions-components/map-search.entry.js +180 -0
- package/dist/solutions-components/map-select-tools.entry.js +794 -0
- package/dist/solutions-components/map-tools.entry.js +371 -0
- package/dist/solutions-components/mapViewUtils-436a516e.js +261 -0
- package/dist/solutions-components/math-efada7a9.js +54 -0
- package/dist/solutions-components/mk-bbf2ee01.js +65 -0
- package/dist/solutions-components/mode-f9bfc4e9.js +25 -0
- package/dist/solutions-components/nb-ccfaa0f7.js +66 -0
- package/dist/solutions-components/nl-4bc56289.js +66 -0
- package/dist/solutions-components/observers-5ba39eee.js +56 -0
- package/dist/solutions-components/openCloseComponent-b4b3788b.js +138 -0
- package/dist/solutions-components/{p-a455c3f0.entry.js → p-00524417.entry.js} +1 -1
- package/dist/solutions-components/{p-52b37bad.entry.js → p-04dbc667.entry.js} +1 -1
- package/dist/solutions-components/{p-8e9f96db.js → p-12a7d0d1.js} +1 -1
- package/dist/solutions-components/{p-a7b7f8d1.js → p-15a0e7fb.js} +1 -1
- package/dist/solutions-components/p-2d72eac3.entry.js +6 -0
- package/dist/solutions-components/{p-a2544cba.entry.js → p-30edeb79.entry.js} +1 -1
- package/dist/solutions-components/{p-220c46c2.entry.js → p-3a6a1ce9.entry.js} +1 -1
- package/dist/solutions-components/{p-a59078ee.entry.js → p-3b9e4882.entry.js} +1 -1
- package/dist/solutions-components/{p-8ad937b4.entry.js → p-465aa7d9.entry.js} +1 -1
- package/dist/solutions-components/p-4dcc150d.entry.js +6 -0
- package/dist/solutions-components/{p-1bca71bf.entry.js → p-4efd2af6.entry.js} +1 -1
- package/dist/solutions-components/{p-5a28d60c.entry.js → p-5320dc25.entry.js} +1 -1
- package/dist/solutions-components/{p-015a45e2.entry.js → p-53ef8adf.entry.js} +1 -1
- package/dist/solutions-components/{p-0d72a9ca.entry.js → p-5f6e7429.entry.js} +1 -1
- package/dist/solutions-components/{p-0f427774.entry.js → p-607773a3.entry.js} +1 -1
- package/dist/solutions-components/{p-2e7a9b9b.entry.js → p-88932d2f.entry.js} +2 -2
- package/dist/solutions-components/{p-b41e2c4c.js → p-8910dc99.js} +10 -10
- package/dist/solutions-components/{p-104f07e3.entry.js → p-954dc86f.entry.js} +1 -1
- package/dist/solutions-components/{p-c302bbea.entry.js → p-a3132356.entry.js} +1 -1
- package/dist/solutions-components/{p-c10b44ee.entry.js → p-a886ab7f.entry.js} +1 -1
- package/dist/solutions-components/{p-03037cf9.js → p-ad98c346.js} +1 -1
- package/dist/solutions-components/{p-734d1dc5.js → p-b4913a01.js} +1 -1
- package/dist/solutions-components/{p-03a65871.entry.js → p-bf6b4eb7.entry.js} +1 -1
- package/dist/solutions-components/{p-09801ba6.entry.js → p-c4ff3b52.entry.js} +3 -3
- package/dist/solutions-components/p-d599cfa8.entry.js +6 -0
- package/dist/solutions-components/{p-cfe890f6.entry.js → p-f313b45b.entry.js} +1 -1
- package/dist/solutions-components/{p-aec4441b.entry.js → p-fc1367d9.entry.js} +1 -1
- package/dist/solutions-components/{p-07626c45.js → p-fc2fb61b.js} +1 -1
- package/dist/solutions-components/parser-87982ce2.js +1654 -0
- package/dist/solutions-components/pci-calculator.entry.js +113 -0
- package/dist/solutions-components/pciUtils-73d4b6b4.js +844 -0
- package/dist/solutions-components/pdf-download.entry.js +355 -0
- package/dist/solutions-components/pl-1f435988.js +113 -0
- package/dist/solutions-components/popupUtils-b61d7ffd.js +94 -0
- package/dist/solutions-components/pt-4a05a00d.js +66 -0
- package/dist/solutions-components/pt-br-9720547b.js +64 -0
- package/dist/solutions-components/public-notification.entry.js +886 -0
- package/dist/solutions-components/publicNotificationStore-208e26f0.js +45 -0
- package/dist/solutions-components/purify-909c20fa.js +1713 -0
- package/dist/solutions-components/queryUtils-2529c537.js +244 -0
- package/dist/solutions-components/refine-results-flow-item.entry.js +56 -0
- package/dist/solutions-components/refine-selection.entry.js +407 -0
- package/dist/solutions-components/resources-0f8db821.js +45 -0
- package/dist/solutions-components/resources-20074cb1.js +24 -0
- package/dist/solutions-components/resources-3709252d.js +35 -0
- package/dist/solutions-components/resources-3c6947d3.js +26 -0
- package/dist/solutions-components/resources-47b3ca40.js +106 -0
- package/dist/solutions-components/resources-667afb5d.js +27 -0
- package/dist/solutions-components/resources-88a48c5c.js +20 -0
- package/dist/solutions-components/resources-9b2084c6.js +24 -0
- package/dist/solutions-components/resources-9b7e72d5.js +20 -0
- package/dist/solutions-components/resources-b0e2b809.js +22 -0
- package/dist/solutions-components/resources-bb6c11c3.js +49 -0
- package/dist/solutions-components/ro-f87076a1.js +65 -0
- package/dist/solutions-components/ru-e69ca895.js +125 -0
- package/dist/solutions-components/shadow-css-f5236d52.js +481 -0
- package/dist/solutions-components/share-item.entry.js +56 -0
- package/dist/solutions-components/shared-list-render-a572ef93.js +348 -0
- package/dist/solutions-components/sk-d632e850.js +147 -0
- package/dist/solutions-components/sl-5099fa6f.js +167 -0
- package/dist/solutions-components/solution-configuration.entry.js +906 -0
- package/dist/solutions-components/solution-contents.entry.js +80 -0
- package/dist/solutions-components/solution-item-details.entry.js +195 -0
- package/dist/solutions-components/solution-item-icon.entry.js +323 -0
- package/dist/solutions-components/solution-item-sharing.entry.js +135 -0
- package/dist/solutions-components/solution-item.entry.js +102 -0
- package/dist/solutions-components/solution-organization-variables.entry.js +91 -0
- package/dist/solutions-components/solution-resource-item.entry.js +280 -0
- package/dist/solutions-components/solution-spatial-ref.entry.js +154 -0
- package/dist/solutions-components/solution-store-31cccb90.js +587 -0
- package/dist/solutions-components/solution-template-data.entry.js +115 -0
- package/dist/solutions-components/solution-variables.entry.js +103 -0
- package/dist/solutions-components/solutions-components.css +84 -1
- package/dist/solutions-components/solutions-components.esm.js +52 -1
- package/dist/solutions-components/sortableComponent-e715a3dd.js +3439 -0
- package/dist/solutions-components/spatial-ref.entry.js +21296 -0
- package/dist/solutions-components/sr-944b7fd7.js +100 -0
- package/dist/solutions-components/store-194c1a01.js +87 -0
- package/dist/solutions-components/store-manager.entry.js +61 -0
- package/dist/solutions-components/styles-367380b5.js +11 -0
- package/dist/solutions-components/sv-e481fa6a.js +70 -0
- package/dist/solutions-components/t9n-b39c5433.js +98 -0
- package/dist/solutions-components/th-60961669.js +64 -0
- package/dist/solutions-components/time-4a90614b.js +274 -0
- package/dist/solutions-components/tr-eba8dd86.js +65 -0
- package/dist/solutions-components/uk-ec375ce0.js +103 -0
- package/dist/solutions-components/utils/downloadUtils.ts +44 -5
- package/dist/solutions-components/utils/test/downloadUtils.spec.tsx +40 -1
- package/dist/solutions-components/utils-32df4a1e.js +133 -0
- package/dist/solutions-components/utils-57e2ccde.js +61 -0
- package/dist/solutions-components/utils-7db4ecdc.js +100 -0
- package/dist/solutions-components/utils-95e9dd51.js +55 -0
- package/dist/solutions-components/utils-cfbe589a.js +208 -0
- package/dist/solutions-components/vi-29345f79.js +69 -0
- package/dist/solutions-components/zh-cn-32c7c714.js +93 -0
- package/dist/solutions-components/zh-hk-7c770845.js +70 -0
- package/dist/solutions-components/zh-tw-c318be5c.js +91 -0
- package/dist/types/utils/downloadUtils.d.ts +18 -4
- package/package.json +6 -6
- package/dist/solutions-components/p-7d6ee026.entry.js +0 -6
- package/dist/solutions-components/p-b80bc5b9.entry.js +0 -6
- package/dist/solutions-components/p-dd45738e.entry.js +0 -6
- /package/dist/solutions-components/{p-70359c2b.js → p-89218b6e.js} +0 -0
- /package/dist/solutions-components/{p-090e0241.js → p-e85ba21c.js} +0 -0
@@ -0,0 +1,1958 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2022 Esri
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
4
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
+
*/
|
6
|
+
'use strict';
|
7
|
+
|
8
|
+
const _commonjsHelpers = require('./_commonjsHelpers-ed90c4ad.js');
|
9
|
+
|
10
|
+
'use strict';
|
11
|
+
|
12
|
+
var colorName = {
|
13
|
+
"aliceblue": [240, 248, 255],
|
14
|
+
"antiquewhite": [250, 235, 215],
|
15
|
+
"aqua": [0, 255, 255],
|
16
|
+
"aquamarine": [127, 255, 212],
|
17
|
+
"azure": [240, 255, 255],
|
18
|
+
"beige": [245, 245, 220],
|
19
|
+
"bisque": [255, 228, 196],
|
20
|
+
"black": [0, 0, 0],
|
21
|
+
"blanchedalmond": [255, 235, 205],
|
22
|
+
"blue": [0, 0, 255],
|
23
|
+
"blueviolet": [138, 43, 226],
|
24
|
+
"brown": [165, 42, 42],
|
25
|
+
"burlywood": [222, 184, 135],
|
26
|
+
"cadetblue": [95, 158, 160],
|
27
|
+
"chartreuse": [127, 255, 0],
|
28
|
+
"chocolate": [210, 105, 30],
|
29
|
+
"coral": [255, 127, 80],
|
30
|
+
"cornflowerblue": [100, 149, 237],
|
31
|
+
"cornsilk": [255, 248, 220],
|
32
|
+
"crimson": [220, 20, 60],
|
33
|
+
"cyan": [0, 255, 255],
|
34
|
+
"darkblue": [0, 0, 139],
|
35
|
+
"darkcyan": [0, 139, 139],
|
36
|
+
"darkgoldenrod": [184, 134, 11],
|
37
|
+
"darkgray": [169, 169, 169],
|
38
|
+
"darkgreen": [0, 100, 0],
|
39
|
+
"darkgrey": [169, 169, 169],
|
40
|
+
"darkkhaki": [189, 183, 107],
|
41
|
+
"darkmagenta": [139, 0, 139],
|
42
|
+
"darkolivegreen": [85, 107, 47],
|
43
|
+
"darkorange": [255, 140, 0],
|
44
|
+
"darkorchid": [153, 50, 204],
|
45
|
+
"darkred": [139, 0, 0],
|
46
|
+
"darksalmon": [233, 150, 122],
|
47
|
+
"darkseagreen": [143, 188, 143],
|
48
|
+
"darkslateblue": [72, 61, 139],
|
49
|
+
"darkslategray": [47, 79, 79],
|
50
|
+
"darkslategrey": [47, 79, 79],
|
51
|
+
"darkturquoise": [0, 206, 209],
|
52
|
+
"darkviolet": [148, 0, 211],
|
53
|
+
"deeppink": [255, 20, 147],
|
54
|
+
"deepskyblue": [0, 191, 255],
|
55
|
+
"dimgray": [105, 105, 105],
|
56
|
+
"dimgrey": [105, 105, 105],
|
57
|
+
"dodgerblue": [30, 144, 255],
|
58
|
+
"firebrick": [178, 34, 34],
|
59
|
+
"floralwhite": [255, 250, 240],
|
60
|
+
"forestgreen": [34, 139, 34],
|
61
|
+
"fuchsia": [255, 0, 255],
|
62
|
+
"gainsboro": [220, 220, 220],
|
63
|
+
"ghostwhite": [248, 248, 255],
|
64
|
+
"gold": [255, 215, 0],
|
65
|
+
"goldenrod": [218, 165, 32],
|
66
|
+
"gray": [128, 128, 128],
|
67
|
+
"green": [0, 128, 0],
|
68
|
+
"greenyellow": [173, 255, 47],
|
69
|
+
"grey": [128, 128, 128],
|
70
|
+
"honeydew": [240, 255, 240],
|
71
|
+
"hotpink": [255, 105, 180],
|
72
|
+
"indianred": [205, 92, 92],
|
73
|
+
"indigo": [75, 0, 130],
|
74
|
+
"ivory": [255, 255, 240],
|
75
|
+
"khaki": [240, 230, 140],
|
76
|
+
"lavender": [230, 230, 250],
|
77
|
+
"lavenderblush": [255, 240, 245],
|
78
|
+
"lawngreen": [124, 252, 0],
|
79
|
+
"lemonchiffon": [255, 250, 205],
|
80
|
+
"lightblue": [173, 216, 230],
|
81
|
+
"lightcoral": [240, 128, 128],
|
82
|
+
"lightcyan": [224, 255, 255],
|
83
|
+
"lightgoldenrodyellow": [250, 250, 210],
|
84
|
+
"lightgray": [211, 211, 211],
|
85
|
+
"lightgreen": [144, 238, 144],
|
86
|
+
"lightgrey": [211, 211, 211],
|
87
|
+
"lightpink": [255, 182, 193],
|
88
|
+
"lightsalmon": [255, 160, 122],
|
89
|
+
"lightseagreen": [32, 178, 170],
|
90
|
+
"lightskyblue": [135, 206, 250],
|
91
|
+
"lightslategray": [119, 136, 153],
|
92
|
+
"lightslategrey": [119, 136, 153],
|
93
|
+
"lightsteelblue": [176, 196, 222],
|
94
|
+
"lightyellow": [255, 255, 224],
|
95
|
+
"lime": [0, 255, 0],
|
96
|
+
"limegreen": [50, 205, 50],
|
97
|
+
"linen": [250, 240, 230],
|
98
|
+
"magenta": [255, 0, 255],
|
99
|
+
"maroon": [128, 0, 0],
|
100
|
+
"mediumaquamarine": [102, 205, 170],
|
101
|
+
"mediumblue": [0, 0, 205],
|
102
|
+
"mediumorchid": [186, 85, 211],
|
103
|
+
"mediumpurple": [147, 112, 219],
|
104
|
+
"mediumseagreen": [60, 179, 113],
|
105
|
+
"mediumslateblue": [123, 104, 238],
|
106
|
+
"mediumspringgreen": [0, 250, 154],
|
107
|
+
"mediumturquoise": [72, 209, 204],
|
108
|
+
"mediumvioletred": [199, 21, 133],
|
109
|
+
"midnightblue": [25, 25, 112],
|
110
|
+
"mintcream": [245, 255, 250],
|
111
|
+
"mistyrose": [255, 228, 225],
|
112
|
+
"moccasin": [255, 228, 181],
|
113
|
+
"navajowhite": [255, 222, 173],
|
114
|
+
"navy": [0, 0, 128],
|
115
|
+
"oldlace": [253, 245, 230],
|
116
|
+
"olive": [128, 128, 0],
|
117
|
+
"olivedrab": [107, 142, 35],
|
118
|
+
"orange": [255, 165, 0],
|
119
|
+
"orangered": [255, 69, 0],
|
120
|
+
"orchid": [218, 112, 214],
|
121
|
+
"palegoldenrod": [238, 232, 170],
|
122
|
+
"palegreen": [152, 251, 152],
|
123
|
+
"paleturquoise": [175, 238, 238],
|
124
|
+
"palevioletred": [219, 112, 147],
|
125
|
+
"papayawhip": [255, 239, 213],
|
126
|
+
"peachpuff": [255, 218, 185],
|
127
|
+
"peru": [205, 133, 63],
|
128
|
+
"pink": [255, 192, 203],
|
129
|
+
"plum": [221, 160, 221],
|
130
|
+
"powderblue": [176, 224, 230],
|
131
|
+
"purple": [128, 0, 128],
|
132
|
+
"rebeccapurple": [102, 51, 153],
|
133
|
+
"red": [255, 0, 0],
|
134
|
+
"rosybrown": [188, 143, 143],
|
135
|
+
"royalblue": [65, 105, 225],
|
136
|
+
"saddlebrown": [139, 69, 19],
|
137
|
+
"salmon": [250, 128, 114],
|
138
|
+
"sandybrown": [244, 164, 96],
|
139
|
+
"seagreen": [46, 139, 87],
|
140
|
+
"seashell": [255, 245, 238],
|
141
|
+
"sienna": [160, 82, 45],
|
142
|
+
"silver": [192, 192, 192],
|
143
|
+
"skyblue": [135, 206, 235],
|
144
|
+
"slateblue": [106, 90, 205],
|
145
|
+
"slategray": [112, 128, 144],
|
146
|
+
"slategrey": [112, 128, 144],
|
147
|
+
"snow": [255, 250, 250],
|
148
|
+
"springgreen": [0, 255, 127],
|
149
|
+
"steelblue": [70, 130, 180],
|
150
|
+
"tan": [210, 180, 140],
|
151
|
+
"teal": [0, 128, 128],
|
152
|
+
"thistle": [216, 191, 216],
|
153
|
+
"tomato": [255, 99, 71],
|
154
|
+
"turquoise": [64, 224, 208],
|
155
|
+
"violet": [238, 130, 238],
|
156
|
+
"wheat": [245, 222, 179],
|
157
|
+
"white": [255, 255, 255],
|
158
|
+
"whitesmoke": [245, 245, 245],
|
159
|
+
"yellow": [255, 255, 0],
|
160
|
+
"yellowgreen": [154, 205, 50]
|
161
|
+
};
|
162
|
+
|
163
|
+
var isArrayish = function isArrayish(obj) {
|
164
|
+
if (!obj || typeof obj === 'string') {
|
165
|
+
return false;
|
166
|
+
}
|
167
|
+
|
168
|
+
return obj instanceof Array || Array.isArray(obj) ||
|
169
|
+
(obj.length >= 0 && (obj.splice instanceof Function ||
|
170
|
+
(Object.getOwnPropertyDescriptor(obj, (obj.length - 1)) && obj.constructor.name !== 'String')));
|
171
|
+
};
|
172
|
+
|
173
|
+
var simpleSwizzle = _commonjsHelpers.createCommonjsModule(function (module) {
|
174
|
+
'use strict';
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
var concat = Array.prototype.concat;
|
179
|
+
var slice = Array.prototype.slice;
|
180
|
+
|
181
|
+
var swizzle = module.exports = function swizzle(args) {
|
182
|
+
var results = [];
|
183
|
+
|
184
|
+
for (var i = 0, len = args.length; i < len; i++) {
|
185
|
+
var arg = args[i];
|
186
|
+
|
187
|
+
if (isArrayish(arg)) {
|
188
|
+
// http://jsperf.com/javascript-array-concat-vs-push/98
|
189
|
+
results = concat.call(results, slice.call(arg));
|
190
|
+
} else {
|
191
|
+
results.push(arg);
|
192
|
+
}
|
193
|
+
}
|
194
|
+
|
195
|
+
return results;
|
196
|
+
};
|
197
|
+
|
198
|
+
swizzle.wrap = function (fn) {
|
199
|
+
return function () {
|
200
|
+
return fn(swizzle(arguments));
|
201
|
+
};
|
202
|
+
};
|
203
|
+
});
|
204
|
+
|
205
|
+
var colorString = _commonjsHelpers.createCommonjsModule(function (module) {
|
206
|
+
/* MIT license */
|
207
|
+
|
208
|
+
|
209
|
+
var hasOwnProperty = Object.hasOwnProperty;
|
210
|
+
|
211
|
+
var reverseNames = Object.create(null);
|
212
|
+
|
213
|
+
// create a list of reverse color names
|
214
|
+
for (var name in colorName) {
|
215
|
+
if (hasOwnProperty.call(colorName, name)) {
|
216
|
+
reverseNames[colorName[name]] = name;
|
217
|
+
}
|
218
|
+
}
|
219
|
+
|
220
|
+
var cs = module.exports = {
|
221
|
+
to: {},
|
222
|
+
get: {}
|
223
|
+
};
|
224
|
+
|
225
|
+
cs.get = function (string) {
|
226
|
+
var prefix = string.substring(0, 3).toLowerCase();
|
227
|
+
var val;
|
228
|
+
var model;
|
229
|
+
switch (prefix) {
|
230
|
+
case 'hsl':
|
231
|
+
val = cs.get.hsl(string);
|
232
|
+
model = 'hsl';
|
233
|
+
break;
|
234
|
+
case 'hwb':
|
235
|
+
val = cs.get.hwb(string);
|
236
|
+
model = 'hwb';
|
237
|
+
break;
|
238
|
+
default:
|
239
|
+
val = cs.get.rgb(string);
|
240
|
+
model = 'rgb';
|
241
|
+
break;
|
242
|
+
}
|
243
|
+
|
244
|
+
if (!val) {
|
245
|
+
return null;
|
246
|
+
}
|
247
|
+
|
248
|
+
return {model: model, value: val};
|
249
|
+
};
|
250
|
+
|
251
|
+
cs.get.rgb = function (string) {
|
252
|
+
if (!string) {
|
253
|
+
return null;
|
254
|
+
}
|
255
|
+
|
256
|
+
var abbr = /^#([a-f0-9]{3,4})$/i;
|
257
|
+
var hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i;
|
258
|
+
var rgba = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/;
|
259
|
+
var per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/;
|
260
|
+
var keyword = /^(\w+)$/;
|
261
|
+
|
262
|
+
var rgb = [0, 0, 0, 1];
|
263
|
+
var match;
|
264
|
+
var i;
|
265
|
+
var hexAlpha;
|
266
|
+
|
267
|
+
if (match = string.match(hex)) {
|
268
|
+
hexAlpha = match[2];
|
269
|
+
match = match[1];
|
270
|
+
|
271
|
+
for (i = 0; i < 3; i++) {
|
272
|
+
// https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19
|
273
|
+
var i2 = i * 2;
|
274
|
+
rgb[i] = parseInt(match.slice(i2, i2 + 2), 16);
|
275
|
+
}
|
276
|
+
|
277
|
+
if (hexAlpha) {
|
278
|
+
rgb[3] = parseInt(hexAlpha, 16) / 255;
|
279
|
+
}
|
280
|
+
} else if (match = string.match(abbr)) {
|
281
|
+
match = match[1];
|
282
|
+
hexAlpha = match[3];
|
283
|
+
|
284
|
+
for (i = 0; i < 3; i++) {
|
285
|
+
rgb[i] = parseInt(match[i] + match[i], 16);
|
286
|
+
}
|
287
|
+
|
288
|
+
if (hexAlpha) {
|
289
|
+
rgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255;
|
290
|
+
}
|
291
|
+
} else if (match = string.match(rgba)) {
|
292
|
+
for (i = 0; i < 3; i++) {
|
293
|
+
rgb[i] = parseInt(match[i + 1], 0);
|
294
|
+
}
|
295
|
+
|
296
|
+
if (match[4]) {
|
297
|
+
if (match[5]) {
|
298
|
+
rgb[3] = parseFloat(match[4]) * 0.01;
|
299
|
+
} else {
|
300
|
+
rgb[3] = parseFloat(match[4]);
|
301
|
+
}
|
302
|
+
}
|
303
|
+
} else if (match = string.match(per)) {
|
304
|
+
for (i = 0; i < 3; i++) {
|
305
|
+
rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);
|
306
|
+
}
|
307
|
+
|
308
|
+
if (match[4]) {
|
309
|
+
if (match[5]) {
|
310
|
+
rgb[3] = parseFloat(match[4]) * 0.01;
|
311
|
+
} else {
|
312
|
+
rgb[3] = parseFloat(match[4]);
|
313
|
+
}
|
314
|
+
}
|
315
|
+
} else if (match = string.match(keyword)) {
|
316
|
+
if (match[1] === 'transparent') {
|
317
|
+
return [0, 0, 0, 0];
|
318
|
+
}
|
319
|
+
|
320
|
+
if (!hasOwnProperty.call(colorName, match[1])) {
|
321
|
+
return null;
|
322
|
+
}
|
323
|
+
|
324
|
+
rgb = colorName[match[1]];
|
325
|
+
rgb[3] = 1;
|
326
|
+
|
327
|
+
return rgb;
|
328
|
+
} else {
|
329
|
+
return null;
|
330
|
+
}
|
331
|
+
|
332
|
+
for (i = 0; i < 3; i++) {
|
333
|
+
rgb[i] = clamp(rgb[i], 0, 255);
|
334
|
+
}
|
335
|
+
rgb[3] = clamp(rgb[3], 0, 1);
|
336
|
+
|
337
|
+
return rgb;
|
338
|
+
};
|
339
|
+
|
340
|
+
cs.get.hsl = function (string) {
|
341
|
+
if (!string) {
|
342
|
+
return null;
|
343
|
+
}
|
344
|
+
|
345
|
+
var hsl = /^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*)?\)$/;
|
346
|
+
var match = string.match(hsl);
|
347
|
+
|
348
|
+
if (match) {
|
349
|
+
var alpha = parseFloat(match[4]);
|
350
|
+
var h = ((parseFloat(match[1]) % 360) + 360) % 360;
|
351
|
+
var s = clamp(parseFloat(match[2]), 0, 100);
|
352
|
+
var l = clamp(parseFloat(match[3]), 0, 100);
|
353
|
+
var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);
|
354
|
+
|
355
|
+
return [h, s, l, a];
|
356
|
+
}
|
357
|
+
|
358
|
+
return null;
|
359
|
+
};
|
360
|
+
|
361
|
+
cs.get.hwb = function (string) {
|
362
|
+
if (!string) {
|
363
|
+
return null;
|
364
|
+
}
|
365
|
+
|
366
|
+
var hwb = /^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*)?\)$/;
|
367
|
+
var match = string.match(hwb);
|
368
|
+
|
369
|
+
if (match) {
|
370
|
+
var alpha = parseFloat(match[4]);
|
371
|
+
var h = ((parseFloat(match[1]) % 360) + 360) % 360;
|
372
|
+
var w = clamp(parseFloat(match[2]), 0, 100);
|
373
|
+
var b = clamp(parseFloat(match[3]), 0, 100);
|
374
|
+
var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);
|
375
|
+
return [h, w, b, a];
|
376
|
+
}
|
377
|
+
|
378
|
+
return null;
|
379
|
+
};
|
380
|
+
|
381
|
+
cs.to.hex = function () {
|
382
|
+
var rgba = simpleSwizzle(arguments);
|
383
|
+
|
384
|
+
return (
|
385
|
+
'#' +
|
386
|
+
hexDouble(rgba[0]) +
|
387
|
+
hexDouble(rgba[1]) +
|
388
|
+
hexDouble(rgba[2]) +
|
389
|
+
(rgba[3] < 1
|
390
|
+
? (hexDouble(Math.round(rgba[3] * 255)))
|
391
|
+
: '')
|
392
|
+
);
|
393
|
+
};
|
394
|
+
|
395
|
+
cs.to.rgb = function () {
|
396
|
+
var rgba = simpleSwizzle(arguments);
|
397
|
+
|
398
|
+
return rgba.length < 4 || rgba[3] === 1
|
399
|
+
? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')'
|
400
|
+
: 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')';
|
401
|
+
};
|
402
|
+
|
403
|
+
cs.to.rgb.percent = function () {
|
404
|
+
var rgba = simpleSwizzle(arguments);
|
405
|
+
|
406
|
+
var r = Math.round(rgba[0] / 255 * 100);
|
407
|
+
var g = Math.round(rgba[1] / 255 * 100);
|
408
|
+
var b = Math.round(rgba[2] / 255 * 100);
|
409
|
+
|
410
|
+
return rgba.length < 4 || rgba[3] === 1
|
411
|
+
? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)'
|
412
|
+
: 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')';
|
413
|
+
};
|
414
|
+
|
415
|
+
cs.to.hsl = function () {
|
416
|
+
var hsla = simpleSwizzle(arguments);
|
417
|
+
return hsla.length < 4 || hsla[3] === 1
|
418
|
+
? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)'
|
419
|
+
: 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')';
|
420
|
+
};
|
421
|
+
|
422
|
+
// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax
|
423
|
+
// (hwb have alpha optional & 1 is default value)
|
424
|
+
cs.to.hwb = function () {
|
425
|
+
var hwba = simpleSwizzle(arguments);
|
426
|
+
|
427
|
+
var a = '';
|
428
|
+
if (hwba.length >= 4 && hwba[3] !== 1) {
|
429
|
+
a = ', ' + hwba[3];
|
430
|
+
}
|
431
|
+
|
432
|
+
return 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')';
|
433
|
+
};
|
434
|
+
|
435
|
+
cs.to.keyword = function (rgb) {
|
436
|
+
return reverseNames[rgb.slice(0, 3)];
|
437
|
+
};
|
438
|
+
|
439
|
+
// helpers
|
440
|
+
function clamp(num, min, max) {
|
441
|
+
return Math.min(Math.max(min, num), max);
|
442
|
+
}
|
443
|
+
|
444
|
+
function hexDouble(num) {
|
445
|
+
var str = Math.round(num).toString(16).toUpperCase();
|
446
|
+
return (str.length < 2) ? '0' + str : str;
|
447
|
+
}
|
448
|
+
});
|
449
|
+
|
450
|
+
/* MIT license */
|
451
|
+
/* eslint-disable no-mixed-operators */
|
452
|
+
|
453
|
+
|
454
|
+
// NOTE: conversions should only return primitive values (i.e. arrays, or
|
455
|
+
// values that give correct `typeof` results).
|
456
|
+
// do not use box values types (i.e. Number(), String(), etc.)
|
457
|
+
|
458
|
+
const reverseKeywords = {};
|
459
|
+
for (const key of Object.keys(colorName)) {
|
460
|
+
reverseKeywords[colorName[key]] = key;
|
461
|
+
}
|
462
|
+
|
463
|
+
const convert$1 = {
|
464
|
+
rgb: {channels: 3, labels: 'rgb'},
|
465
|
+
hsl: {channels: 3, labels: 'hsl'},
|
466
|
+
hsv: {channels: 3, labels: 'hsv'},
|
467
|
+
hwb: {channels: 3, labels: 'hwb'},
|
468
|
+
cmyk: {channels: 4, labels: 'cmyk'},
|
469
|
+
xyz: {channels: 3, labels: 'xyz'},
|
470
|
+
lab: {channels: 3, labels: 'lab'},
|
471
|
+
lch: {channels: 3, labels: 'lch'},
|
472
|
+
hex: {channels: 1, labels: ['hex']},
|
473
|
+
keyword: {channels: 1, labels: ['keyword']},
|
474
|
+
ansi16: {channels: 1, labels: ['ansi16']},
|
475
|
+
ansi256: {channels: 1, labels: ['ansi256']},
|
476
|
+
hcg: {channels: 3, labels: ['h', 'c', 'g']},
|
477
|
+
apple: {channels: 3, labels: ['r16', 'g16', 'b16']},
|
478
|
+
gray: {channels: 1, labels: ['gray']}
|
479
|
+
};
|
480
|
+
|
481
|
+
var conversions = convert$1;
|
482
|
+
|
483
|
+
// Hide .channels and .labels properties
|
484
|
+
for (const model of Object.keys(convert$1)) {
|
485
|
+
if (!('channels' in convert$1[model])) {
|
486
|
+
throw new Error('missing channels property: ' + model);
|
487
|
+
}
|
488
|
+
|
489
|
+
if (!('labels' in convert$1[model])) {
|
490
|
+
throw new Error('missing channel labels property: ' + model);
|
491
|
+
}
|
492
|
+
|
493
|
+
if (convert$1[model].labels.length !== convert$1[model].channels) {
|
494
|
+
throw new Error('channel and label counts mismatch: ' + model);
|
495
|
+
}
|
496
|
+
|
497
|
+
const {channels, labels} = convert$1[model];
|
498
|
+
delete convert$1[model].channels;
|
499
|
+
delete convert$1[model].labels;
|
500
|
+
Object.defineProperty(convert$1[model], 'channels', {value: channels});
|
501
|
+
Object.defineProperty(convert$1[model], 'labels', {value: labels});
|
502
|
+
}
|
503
|
+
|
504
|
+
convert$1.rgb.hsl = function (rgb) {
|
505
|
+
const r = rgb[0] / 255;
|
506
|
+
const g = rgb[1] / 255;
|
507
|
+
const b = rgb[2] / 255;
|
508
|
+
const min = Math.min(r, g, b);
|
509
|
+
const max = Math.max(r, g, b);
|
510
|
+
const delta = max - min;
|
511
|
+
let h;
|
512
|
+
let s;
|
513
|
+
|
514
|
+
if (max === min) {
|
515
|
+
h = 0;
|
516
|
+
} else if (r === max) {
|
517
|
+
h = (g - b) / delta;
|
518
|
+
} else if (g === max) {
|
519
|
+
h = 2 + (b - r) / delta;
|
520
|
+
} else if (b === max) {
|
521
|
+
h = 4 + (r - g) / delta;
|
522
|
+
}
|
523
|
+
|
524
|
+
h = Math.min(h * 60, 360);
|
525
|
+
|
526
|
+
if (h < 0) {
|
527
|
+
h += 360;
|
528
|
+
}
|
529
|
+
|
530
|
+
const l = (min + max) / 2;
|
531
|
+
|
532
|
+
if (max === min) {
|
533
|
+
s = 0;
|
534
|
+
} else if (l <= 0.5) {
|
535
|
+
s = delta / (max + min);
|
536
|
+
} else {
|
537
|
+
s = delta / (2 - max - min);
|
538
|
+
}
|
539
|
+
|
540
|
+
return [h, s * 100, l * 100];
|
541
|
+
};
|
542
|
+
|
543
|
+
convert$1.rgb.hsv = function (rgb) {
|
544
|
+
let rdif;
|
545
|
+
let gdif;
|
546
|
+
let bdif;
|
547
|
+
let h;
|
548
|
+
let s;
|
549
|
+
|
550
|
+
const r = rgb[0] / 255;
|
551
|
+
const g = rgb[1] / 255;
|
552
|
+
const b = rgb[2] / 255;
|
553
|
+
const v = Math.max(r, g, b);
|
554
|
+
const diff = v - Math.min(r, g, b);
|
555
|
+
const diffc = function (c) {
|
556
|
+
return (v - c) / 6 / diff + 1 / 2;
|
557
|
+
};
|
558
|
+
|
559
|
+
if (diff === 0) {
|
560
|
+
h = 0;
|
561
|
+
s = 0;
|
562
|
+
} else {
|
563
|
+
s = diff / v;
|
564
|
+
rdif = diffc(r);
|
565
|
+
gdif = diffc(g);
|
566
|
+
bdif = diffc(b);
|
567
|
+
|
568
|
+
if (r === v) {
|
569
|
+
h = bdif - gdif;
|
570
|
+
} else if (g === v) {
|
571
|
+
h = (1 / 3) + rdif - bdif;
|
572
|
+
} else if (b === v) {
|
573
|
+
h = (2 / 3) + gdif - rdif;
|
574
|
+
}
|
575
|
+
|
576
|
+
if (h < 0) {
|
577
|
+
h += 1;
|
578
|
+
} else if (h > 1) {
|
579
|
+
h -= 1;
|
580
|
+
}
|
581
|
+
}
|
582
|
+
|
583
|
+
return [
|
584
|
+
h * 360,
|
585
|
+
s * 100,
|
586
|
+
v * 100
|
587
|
+
];
|
588
|
+
};
|
589
|
+
|
590
|
+
convert$1.rgb.hwb = function (rgb) {
|
591
|
+
const r = rgb[0];
|
592
|
+
const g = rgb[1];
|
593
|
+
let b = rgb[2];
|
594
|
+
const h = convert$1.rgb.hsl(rgb)[0];
|
595
|
+
const w = 1 / 255 * Math.min(r, Math.min(g, b));
|
596
|
+
|
597
|
+
b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
|
598
|
+
|
599
|
+
return [h, w * 100, b * 100];
|
600
|
+
};
|
601
|
+
|
602
|
+
convert$1.rgb.cmyk = function (rgb) {
|
603
|
+
const r = rgb[0] / 255;
|
604
|
+
const g = rgb[1] / 255;
|
605
|
+
const b = rgb[2] / 255;
|
606
|
+
|
607
|
+
const k = Math.min(1 - r, 1 - g, 1 - b);
|
608
|
+
const c = (1 - r - k) / (1 - k) || 0;
|
609
|
+
const m = (1 - g - k) / (1 - k) || 0;
|
610
|
+
const y = (1 - b - k) / (1 - k) || 0;
|
611
|
+
|
612
|
+
return [c * 100, m * 100, y * 100, k * 100];
|
613
|
+
};
|
614
|
+
|
615
|
+
function comparativeDistance(x, y) {
|
616
|
+
/*
|
617
|
+
See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
|
618
|
+
*/
|
619
|
+
return (
|
620
|
+
((x[0] - y[0]) ** 2) +
|
621
|
+
((x[1] - y[1]) ** 2) +
|
622
|
+
((x[2] - y[2]) ** 2)
|
623
|
+
);
|
624
|
+
}
|
625
|
+
|
626
|
+
convert$1.rgb.keyword = function (rgb) {
|
627
|
+
const reversed = reverseKeywords[rgb];
|
628
|
+
if (reversed) {
|
629
|
+
return reversed;
|
630
|
+
}
|
631
|
+
|
632
|
+
let currentClosestDistance = Infinity;
|
633
|
+
let currentClosestKeyword;
|
634
|
+
|
635
|
+
for (const keyword of Object.keys(colorName)) {
|
636
|
+
const value = colorName[keyword];
|
637
|
+
|
638
|
+
// Compute comparative distance
|
639
|
+
const distance = comparativeDistance(rgb, value);
|
640
|
+
|
641
|
+
// Check if its less, if so set as closest
|
642
|
+
if (distance < currentClosestDistance) {
|
643
|
+
currentClosestDistance = distance;
|
644
|
+
currentClosestKeyword = keyword;
|
645
|
+
}
|
646
|
+
}
|
647
|
+
|
648
|
+
return currentClosestKeyword;
|
649
|
+
};
|
650
|
+
|
651
|
+
convert$1.keyword.rgb = function (keyword) {
|
652
|
+
return colorName[keyword];
|
653
|
+
};
|
654
|
+
|
655
|
+
convert$1.rgb.xyz = function (rgb) {
|
656
|
+
let r = rgb[0] / 255;
|
657
|
+
let g = rgb[1] / 255;
|
658
|
+
let b = rgb[2] / 255;
|
659
|
+
|
660
|
+
// Assume sRGB
|
661
|
+
r = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92);
|
662
|
+
g = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92);
|
663
|
+
b = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92);
|
664
|
+
|
665
|
+
const x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);
|
666
|
+
const y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);
|
667
|
+
const z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);
|
668
|
+
|
669
|
+
return [x * 100, y * 100, z * 100];
|
670
|
+
};
|
671
|
+
|
672
|
+
convert$1.rgb.lab = function (rgb) {
|
673
|
+
const xyz = convert$1.rgb.xyz(rgb);
|
674
|
+
let x = xyz[0];
|
675
|
+
let y = xyz[1];
|
676
|
+
let z = xyz[2];
|
677
|
+
|
678
|
+
x /= 95.047;
|
679
|
+
y /= 100;
|
680
|
+
z /= 108.883;
|
681
|
+
|
682
|
+
x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);
|
683
|
+
y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);
|
684
|
+
z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);
|
685
|
+
|
686
|
+
const l = (116 * y) - 16;
|
687
|
+
const a = 500 * (x - y);
|
688
|
+
const b = 200 * (y - z);
|
689
|
+
|
690
|
+
return [l, a, b];
|
691
|
+
};
|
692
|
+
|
693
|
+
convert$1.hsl.rgb = function (hsl) {
|
694
|
+
const h = hsl[0] / 360;
|
695
|
+
const s = hsl[1] / 100;
|
696
|
+
const l = hsl[2] / 100;
|
697
|
+
let t2;
|
698
|
+
let t3;
|
699
|
+
let val;
|
700
|
+
|
701
|
+
if (s === 0) {
|
702
|
+
val = l * 255;
|
703
|
+
return [val, val, val];
|
704
|
+
}
|
705
|
+
|
706
|
+
if (l < 0.5) {
|
707
|
+
t2 = l * (1 + s);
|
708
|
+
} else {
|
709
|
+
t2 = l + s - l * s;
|
710
|
+
}
|
711
|
+
|
712
|
+
const t1 = 2 * l - t2;
|
713
|
+
|
714
|
+
const rgb = [0, 0, 0];
|
715
|
+
for (let i = 0; i < 3; i++) {
|
716
|
+
t3 = h + 1 / 3 * -(i - 1);
|
717
|
+
if (t3 < 0) {
|
718
|
+
t3++;
|
719
|
+
}
|
720
|
+
|
721
|
+
if (t3 > 1) {
|
722
|
+
t3--;
|
723
|
+
}
|
724
|
+
|
725
|
+
if (6 * t3 < 1) {
|
726
|
+
val = t1 + (t2 - t1) * 6 * t3;
|
727
|
+
} else if (2 * t3 < 1) {
|
728
|
+
val = t2;
|
729
|
+
} else if (3 * t3 < 2) {
|
730
|
+
val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
|
731
|
+
} else {
|
732
|
+
val = t1;
|
733
|
+
}
|
734
|
+
|
735
|
+
rgb[i] = val * 255;
|
736
|
+
}
|
737
|
+
|
738
|
+
return rgb;
|
739
|
+
};
|
740
|
+
|
741
|
+
convert$1.hsl.hsv = function (hsl) {
|
742
|
+
const h = hsl[0];
|
743
|
+
let s = hsl[1] / 100;
|
744
|
+
let l = hsl[2] / 100;
|
745
|
+
let smin = s;
|
746
|
+
const lmin = Math.max(l, 0.01);
|
747
|
+
|
748
|
+
l *= 2;
|
749
|
+
s *= (l <= 1) ? l : 2 - l;
|
750
|
+
smin *= lmin <= 1 ? lmin : 2 - lmin;
|
751
|
+
const v = (l + s) / 2;
|
752
|
+
const sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);
|
753
|
+
|
754
|
+
return [h, sv * 100, v * 100];
|
755
|
+
};
|
756
|
+
|
757
|
+
convert$1.hsv.rgb = function (hsv) {
|
758
|
+
const h = hsv[0] / 60;
|
759
|
+
const s = hsv[1] / 100;
|
760
|
+
let v = hsv[2] / 100;
|
761
|
+
const hi = Math.floor(h) % 6;
|
762
|
+
|
763
|
+
const f = h - Math.floor(h);
|
764
|
+
const p = 255 * v * (1 - s);
|
765
|
+
const q = 255 * v * (1 - (s * f));
|
766
|
+
const t = 255 * v * (1 - (s * (1 - f)));
|
767
|
+
v *= 255;
|
768
|
+
|
769
|
+
switch (hi) {
|
770
|
+
case 0:
|
771
|
+
return [v, t, p];
|
772
|
+
case 1:
|
773
|
+
return [q, v, p];
|
774
|
+
case 2:
|
775
|
+
return [p, v, t];
|
776
|
+
case 3:
|
777
|
+
return [p, q, v];
|
778
|
+
case 4:
|
779
|
+
return [t, p, v];
|
780
|
+
case 5:
|
781
|
+
return [v, p, q];
|
782
|
+
}
|
783
|
+
};
|
784
|
+
|
785
|
+
convert$1.hsv.hsl = function (hsv) {
|
786
|
+
const h = hsv[0];
|
787
|
+
const s = hsv[1] / 100;
|
788
|
+
const v = hsv[2] / 100;
|
789
|
+
const vmin = Math.max(v, 0.01);
|
790
|
+
let sl;
|
791
|
+
let l;
|
792
|
+
|
793
|
+
l = (2 - s) * v;
|
794
|
+
const lmin = (2 - s) * vmin;
|
795
|
+
sl = s * vmin;
|
796
|
+
sl /= (lmin <= 1) ? lmin : 2 - lmin;
|
797
|
+
sl = sl || 0;
|
798
|
+
l /= 2;
|
799
|
+
|
800
|
+
return [h, sl * 100, l * 100];
|
801
|
+
};
|
802
|
+
|
803
|
+
// http://dev.w3.org/csswg/css-color/#hwb-to-rgb
|
804
|
+
convert$1.hwb.rgb = function (hwb) {
|
805
|
+
const h = hwb[0] / 360;
|
806
|
+
let wh = hwb[1] / 100;
|
807
|
+
let bl = hwb[2] / 100;
|
808
|
+
const ratio = wh + bl;
|
809
|
+
let f;
|
810
|
+
|
811
|
+
// Wh + bl cant be > 1
|
812
|
+
if (ratio > 1) {
|
813
|
+
wh /= ratio;
|
814
|
+
bl /= ratio;
|
815
|
+
}
|
816
|
+
|
817
|
+
const i = Math.floor(6 * h);
|
818
|
+
const v = 1 - bl;
|
819
|
+
f = 6 * h - i;
|
820
|
+
|
821
|
+
if ((i & 0x01) !== 0) {
|
822
|
+
f = 1 - f;
|
823
|
+
}
|
824
|
+
|
825
|
+
const n = wh + f * (v - wh); // Linear interpolation
|
826
|
+
|
827
|
+
let r;
|
828
|
+
let g;
|
829
|
+
let b;
|
830
|
+
/* eslint-disable max-statements-per-line,no-multi-spaces */
|
831
|
+
switch (i) {
|
832
|
+
default:
|
833
|
+
case 6:
|
834
|
+
case 0: r = v; g = n; b = wh; break;
|
835
|
+
case 1: r = n; g = v; b = wh; break;
|
836
|
+
case 2: r = wh; g = v; b = n; break;
|
837
|
+
case 3: r = wh; g = n; b = v; break;
|
838
|
+
case 4: r = n; g = wh; b = v; break;
|
839
|
+
case 5: r = v; g = wh; b = n; break;
|
840
|
+
}
|
841
|
+
/* eslint-enable max-statements-per-line,no-multi-spaces */
|
842
|
+
|
843
|
+
return [r * 255, g * 255, b * 255];
|
844
|
+
};
|
845
|
+
|
846
|
+
convert$1.cmyk.rgb = function (cmyk) {
|
847
|
+
const c = cmyk[0] / 100;
|
848
|
+
const m = cmyk[1] / 100;
|
849
|
+
const y = cmyk[2] / 100;
|
850
|
+
const k = cmyk[3] / 100;
|
851
|
+
|
852
|
+
const r = 1 - Math.min(1, c * (1 - k) + k);
|
853
|
+
const g = 1 - Math.min(1, m * (1 - k) + k);
|
854
|
+
const b = 1 - Math.min(1, y * (1 - k) + k);
|
855
|
+
|
856
|
+
return [r * 255, g * 255, b * 255];
|
857
|
+
};
|
858
|
+
|
859
|
+
convert$1.xyz.rgb = function (xyz) {
|
860
|
+
const x = xyz[0] / 100;
|
861
|
+
const y = xyz[1] / 100;
|
862
|
+
const z = xyz[2] / 100;
|
863
|
+
let r;
|
864
|
+
let g;
|
865
|
+
let b;
|
866
|
+
|
867
|
+
r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);
|
868
|
+
g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);
|
869
|
+
b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);
|
870
|
+
|
871
|
+
// Assume sRGB
|
872
|
+
r = r > 0.0031308
|
873
|
+
? ((1.055 * (r ** (1.0 / 2.4))) - 0.055)
|
874
|
+
: r * 12.92;
|
875
|
+
|
876
|
+
g = g > 0.0031308
|
877
|
+
? ((1.055 * (g ** (1.0 / 2.4))) - 0.055)
|
878
|
+
: g * 12.92;
|
879
|
+
|
880
|
+
b = b > 0.0031308
|
881
|
+
? ((1.055 * (b ** (1.0 / 2.4))) - 0.055)
|
882
|
+
: b * 12.92;
|
883
|
+
|
884
|
+
r = Math.min(Math.max(0, r), 1);
|
885
|
+
g = Math.min(Math.max(0, g), 1);
|
886
|
+
b = Math.min(Math.max(0, b), 1);
|
887
|
+
|
888
|
+
return [r * 255, g * 255, b * 255];
|
889
|
+
};
|
890
|
+
|
891
|
+
convert$1.xyz.lab = function (xyz) {
|
892
|
+
let x = xyz[0];
|
893
|
+
let y = xyz[1];
|
894
|
+
let z = xyz[2];
|
895
|
+
|
896
|
+
x /= 95.047;
|
897
|
+
y /= 100;
|
898
|
+
z /= 108.883;
|
899
|
+
|
900
|
+
x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);
|
901
|
+
y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);
|
902
|
+
z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);
|
903
|
+
|
904
|
+
const l = (116 * y) - 16;
|
905
|
+
const a = 500 * (x - y);
|
906
|
+
const b = 200 * (y - z);
|
907
|
+
|
908
|
+
return [l, a, b];
|
909
|
+
};
|
910
|
+
|
911
|
+
convert$1.lab.xyz = function (lab) {
|
912
|
+
const l = lab[0];
|
913
|
+
const a = lab[1];
|
914
|
+
const b = lab[2];
|
915
|
+
let x;
|
916
|
+
let y;
|
917
|
+
let z;
|
918
|
+
|
919
|
+
y = (l + 16) / 116;
|
920
|
+
x = a / 500 + y;
|
921
|
+
z = y - b / 200;
|
922
|
+
|
923
|
+
const y2 = y ** 3;
|
924
|
+
const x2 = x ** 3;
|
925
|
+
const z2 = z ** 3;
|
926
|
+
y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
|
927
|
+
x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
|
928
|
+
z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
|
929
|
+
|
930
|
+
x *= 95.047;
|
931
|
+
y *= 100;
|
932
|
+
z *= 108.883;
|
933
|
+
|
934
|
+
return [x, y, z];
|
935
|
+
};
|
936
|
+
|
937
|
+
convert$1.lab.lch = function (lab) {
|
938
|
+
const l = lab[0];
|
939
|
+
const a = lab[1];
|
940
|
+
const b = lab[2];
|
941
|
+
let h;
|
942
|
+
|
943
|
+
const hr = Math.atan2(b, a);
|
944
|
+
h = hr * 360 / 2 / Math.PI;
|
945
|
+
|
946
|
+
if (h < 0) {
|
947
|
+
h += 360;
|
948
|
+
}
|
949
|
+
|
950
|
+
const c = Math.sqrt(a * a + b * b);
|
951
|
+
|
952
|
+
return [l, c, h];
|
953
|
+
};
|
954
|
+
|
955
|
+
convert$1.lch.lab = function (lch) {
|
956
|
+
const l = lch[0];
|
957
|
+
const c = lch[1];
|
958
|
+
const h = lch[2];
|
959
|
+
|
960
|
+
const hr = h / 360 * 2 * Math.PI;
|
961
|
+
const a = c * Math.cos(hr);
|
962
|
+
const b = c * Math.sin(hr);
|
963
|
+
|
964
|
+
return [l, a, b];
|
965
|
+
};
|
966
|
+
|
967
|
+
convert$1.rgb.ansi16 = function (args, saturation = null) {
|
968
|
+
const [r, g, b] = args;
|
969
|
+
let value = saturation === null ? convert$1.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization
|
970
|
+
|
971
|
+
value = Math.round(value / 50);
|
972
|
+
|
973
|
+
if (value === 0) {
|
974
|
+
return 30;
|
975
|
+
}
|
976
|
+
|
977
|
+
let ansi = 30
|
978
|
+
+ ((Math.round(b / 255) << 2)
|
979
|
+
| (Math.round(g / 255) << 1)
|
980
|
+
| Math.round(r / 255));
|
981
|
+
|
982
|
+
if (value === 2) {
|
983
|
+
ansi += 60;
|
984
|
+
}
|
985
|
+
|
986
|
+
return ansi;
|
987
|
+
};
|
988
|
+
|
989
|
+
convert$1.hsv.ansi16 = function (args) {
|
990
|
+
// Optimization here; we already know the value and don't need to get
|
991
|
+
// it converted for us.
|
992
|
+
return convert$1.rgb.ansi16(convert$1.hsv.rgb(args), args[2]);
|
993
|
+
};
|
994
|
+
|
995
|
+
convert$1.rgb.ansi256 = function (args) {
|
996
|
+
const r = args[0];
|
997
|
+
const g = args[1];
|
998
|
+
const b = args[2];
|
999
|
+
|
1000
|
+
// We use the extended greyscale palette here, with the exception of
|
1001
|
+
// black and white. normal palette only has 4 greyscale shades.
|
1002
|
+
if (r === g && g === b) {
|
1003
|
+
if (r < 8) {
|
1004
|
+
return 16;
|
1005
|
+
}
|
1006
|
+
|
1007
|
+
if (r > 248) {
|
1008
|
+
return 231;
|
1009
|
+
}
|
1010
|
+
|
1011
|
+
return Math.round(((r - 8) / 247) * 24) + 232;
|
1012
|
+
}
|
1013
|
+
|
1014
|
+
const ansi = 16
|
1015
|
+
+ (36 * Math.round(r / 255 * 5))
|
1016
|
+
+ (6 * Math.round(g / 255 * 5))
|
1017
|
+
+ Math.round(b / 255 * 5);
|
1018
|
+
|
1019
|
+
return ansi;
|
1020
|
+
};
|
1021
|
+
|
1022
|
+
convert$1.ansi16.rgb = function (args) {
|
1023
|
+
let color = args % 10;
|
1024
|
+
|
1025
|
+
// Handle greyscale
|
1026
|
+
if (color === 0 || color === 7) {
|
1027
|
+
if (args > 50) {
|
1028
|
+
color += 3.5;
|
1029
|
+
}
|
1030
|
+
|
1031
|
+
color = color / 10.5 * 255;
|
1032
|
+
|
1033
|
+
return [color, color, color];
|
1034
|
+
}
|
1035
|
+
|
1036
|
+
const mult = (~~(args > 50) + 1) * 0.5;
|
1037
|
+
const r = ((color & 1) * mult) * 255;
|
1038
|
+
const g = (((color >> 1) & 1) * mult) * 255;
|
1039
|
+
const b = (((color >> 2) & 1) * mult) * 255;
|
1040
|
+
|
1041
|
+
return [r, g, b];
|
1042
|
+
};
|
1043
|
+
|
1044
|
+
convert$1.ansi256.rgb = function (args) {
|
1045
|
+
// Handle greyscale
|
1046
|
+
if (args >= 232) {
|
1047
|
+
const c = (args - 232) * 10 + 8;
|
1048
|
+
return [c, c, c];
|
1049
|
+
}
|
1050
|
+
|
1051
|
+
args -= 16;
|
1052
|
+
|
1053
|
+
let rem;
|
1054
|
+
const r = Math.floor(args / 36) / 5 * 255;
|
1055
|
+
const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
|
1056
|
+
const b = (rem % 6) / 5 * 255;
|
1057
|
+
|
1058
|
+
return [r, g, b];
|
1059
|
+
};
|
1060
|
+
|
1061
|
+
convert$1.rgb.hex = function (args) {
|
1062
|
+
const integer = ((Math.round(args[0]) & 0xFF) << 16)
|
1063
|
+
+ ((Math.round(args[1]) & 0xFF) << 8)
|
1064
|
+
+ (Math.round(args[2]) & 0xFF);
|
1065
|
+
|
1066
|
+
const string = integer.toString(16).toUpperCase();
|
1067
|
+
return '000000'.substring(string.length) + string;
|
1068
|
+
};
|
1069
|
+
|
1070
|
+
convert$1.hex.rgb = function (args) {
|
1071
|
+
const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
|
1072
|
+
if (!match) {
|
1073
|
+
return [0, 0, 0];
|
1074
|
+
}
|
1075
|
+
|
1076
|
+
let colorString = match[0];
|
1077
|
+
|
1078
|
+
if (match[0].length === 3) {
|
1079
|
+
colorString = colorString.split('').map(char => {
|
1080
|
+
return char + char;
|
1081
|
+
}).join('');
|
1082
|
+
}
|
1083
|
+
|
1084
|
+
const integer = parseInt(colorString, 16);
|
1085
|
+
const r = (integer >> 16) & 0xFF;
|
1086
|
+
const g = (integer >> 8) & 0xFF;
|
1087
|
+
const b = integer & 0xFF;
|
1088
|
+
|
1089
|
+
return [r, g, b];
|
1090
|
+
};
|
1091
|
+
|
1092
|
+
convert$1.rgb.hcg = function (rgb) {
|
1093
|
+
const r = rgb[0] / 255;
|
1094
|
+
const g = rgb[1] / 255;
|
1095
|
+
const b = rgb[2] / 255;
|
1096
|
+
const max = Math.max(Math.max(r, g), b);
|
1097
|
+
const min = Math.min(Math.min(r, g), b);
|
1098
|
+
const chroma = (max - min);
|
1099
|
+
let grayscale;
|
1100
|
+
let hue;
|
1101
|
+
|
1102
|
+
if (chroma < 1) {
|
1103
|
+
grayscale = min / (1 - chroma);
|
1104
|
+
} else {
|
1105
|
+
grayscale = 0;
|
1106
|
+
}
|
1107
|
+
|
1108
|
+
if (chroma <= 0) {
|
1109
|
+
hue = 0;
|
1110
|
+
} else
|
1111
|
+
if (max === r) {
|
1112
|
+
hue = ((g - b) / chroma) % 6;
|
1113
|
+
} else
|
1114
|
+
if (max === g) {
|
1115
|
+
hue = 2 + (b - r) / chroma;
|
1116
|
+
} else {
|
1117
|
+
hue = 4 + (r - g) / chroma;
|
1118
|
+
}
|
1119
|
+
|
1120
|
+
hue /= 6;
|
1121
|
+
hue %= 1;
|
1122
|
+
|
1123
|
+
return [hue * 360, chroma * 100, grayscale * 100];
|
1124
|
+
};
|
1125
|
+
|
1126
|
+
convert$1.hsl.hcg = function (hsl) {
|
1127
|
+
const s = hsl[1] / 100;
|
1128
|
+
const l = hsl[2] / 100;
|
1129
|
+
|
1130
|
+
const c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l));
|
1131
|
+
|
1132
|
+
let f = 0;
|
1133
|
+
if (c < 1.0) {
|
1134
|
+
f = (l - 0.5 * c) / (1.0 - c);
|
1135
|
+
}
|
1136
|
+
|
1137
|
+
return [hsl[0], c * 100, f * 100];
|
1138
|
+
};
|
1139
|
+
|
1140
|
+
convert$1.hsv.hcg = function (hsv) {
|
1141
|
+
const s = hsv[1] / 100;
|
1142
|
+
const v = hsv[2] / 100;
|
1143
|
+
|
1144
|
+
const c = s * v;
|
1145
|
+
let f = 0;
|
1146
|
+
|
1147
|
+
if (c < 1.0) {
|
1148
|
+
f = (v - c) / (1 - c);
|
1149
|
+
}
|
1150
|
+
|
1151
|
+
return [hsv[0], c * 100, f * 100];
|
1152
|
+
};
|
1153
|
+
|
1154
|
+
convert$1.hcg.rgb = function (hcg) {
|
1155
|
+
const h = hcg[0] / 360;
|
1156
|
+
const c = hcg[1] / 100;
|
1157
|
+
const g = hcg[2] / 100;
|
1158
|
+
|
1159
|
+
if (c === 0.0) {
|
1160
|
+
return [g * 255, g * 255, g * 255];
|
1161
|
+
}
|
1162
|
+
|
1163
|
+
const pure = [0, 0, 0];
|
1164
|
+
const hi = (h % 1) * 6;
|
1165
|
+
const v = hi % 1;
|
1166
|
+
const w = 1 - v;
|
1167
|
+
let mg = 0;
|
1168
|
+
|
1169
|
+
/* eslint-disable max-statements-per-line */
|
1170
|
+
switch (Math.floor(hi)) {
|
1171
|
+
case 0:
|
1172
|
+
pure[0] = 1; pure[1] = v; pure[2] = 0; break;
|
1173
|
+
case 1:
|
1174
|
+
pure[0] = w; pure[1] = 1; pure[2] = 0; break;
|
1175
|
+
case 2:
|
1176
|
+
pure[0] = 0; pure[1] = 1; pure[2] = v; break;
|
1177
|
+
case 3:
|
1178
|
+
pure[0] = 0; pure[1] = w; pure[2] = 1; break;
|
1179
|
+
case 4:
|
1180
|
+
pure[0] = v; pure[1] = 0; pure[2] = 1; break;
|
1181
|
+
default:
|
1182
|
+
pure[0] = 1; pure[1] = 0; pure[2] = w;
|
1183
|
+
}
|
1184
|
+
/* eslint-enable max-statements-per-line */
|
1185
|
+
|
1186
|
+
mg = (1.0 - c) * g;
|
1187
|
+
|
1188
|
+
return [
|
1189
|
+
(c * pure[0] + mg) * 255,
|
1190
|
+
(c * pure[1] + mg) * 255,
|
1191
|
+
(c * pure[2] + mg) * 255
|
1192
|
+
];
|
1193
|
+
};
|
1194
|
+
|
1195
|
+
convert$1.hcg.hsv = function (hcg) {
|
1196
|
+
const c = hcg[1] / 100;
|
1197
|
+
const g = hcg[2] / 100;
|
1198
|
+
|
1199
|
+
const v = c + g * (1.0 - c);
|
1200
|
+
let f = 0;
|
1201
|
+
|
1202
|
+
if (v > 0.0) {
|
1203
|
+
f = c / v;
|
1204
|
+
}
|
1205
|
+
|
1206
|
+
return [hcg[0], f * 100, v * 100];
|
1207
|
+
};
|
1208
|
+
|
1209
|
+
convert$1.hcg.hsl = function (hcg) {
|
1210
|
+
const c = hcg[1] / 100;
|
1211
|
+
const g = hcg[2] / 100;
|
1212
|
+
|
1213
|
+
const l = g * (1.0 - c) + 0.5 * c;
|
1214
|
+
let s = 0;
|
1215
|
+
|
1216
|
+
if (l > 0.0 && l < 0.5) {
|
1217
|
+
s = c / (2 * l);
|
1218
|
+
} else
|
1219
|
+
if (l >= 0.5 && l < 1.0) {
|
1220
|
+
s = c / (2 * (1 - l));
|
1221
|
+
}
|
1222
|
+
|
1223
|
+
return [hcg[0], s * 100, l * 100];
|
1224
|
+
};
|
1225
|
+
|
1226
|
+
convert$1.hcg.hwb = function (hcg) {
|
1227
|
+
const c = hcg[1] / 100;
|
1228
|
+
const g = hcg[2] / 100;
|
1229
|
+
const v = c + g * (1.0 - c);
|
1230
|
+
return [hcg[0], (v - c) * 100, (1 - v) * 100];
|
1231
|
+
};
|
1232
|
+
|
1233
|
+
convert$1.hwb.hcg = function (hwb) {
|
1234
|
+
const w = hwb[1] / 100;
|
1235
|
+
const b = hwb[2] / 100;
|
1236
|
+
const v = 1 - b;
|
1237
|
+
const c = v - w;
|
1238
|
+
let g = 0;
|
1239
|
+
|
1240
|
+
if (c < 1) {
|
1241
|
+
g = (v - c) / (1 - c);
|
1242
|
+
}
|
1243
|
+
|
1244
|
+
return [hwb[0], c * 100, g * 100];
|
1245
|
+
};
|
1246
|
+
|
1247
|
+
convert$1.apple.rgb = function (apple) {
|
1248
|
+
return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];
|
1249
|
+
};
|
1250
|
+
|
1251
|
+
convert$1.rgb.apple = function (rgb) {
|
1252
|
+
return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];
|
1253
|
+
};
|
1254
|
+
|
1255
|
+
convert$1.gray.rgb = function (args) {
|
1256
|
+
return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
|
1257
|
+
};
|
1258
|
+
|
1259
|
+
convert$1.gray.hsl = function (args) {
|
1260
|
+
return [0, 0, args[0]];
|
1261
|
+
};
|
1262
|
+
|
1263
|
+
convert$1.gray.hsv = convert$1.gray.hsl;
|
1264
|
+
|
1265
|
+
convert$1.gray.hwb = function (gray) {
|
1266
|
+
return [0, 100, gray[0]];
|
1267
|
+
};
|
1268
|
+
|
1269
|
+
convert$1.gray.cmyk = function (gray) {
|
1270
|
+
return [0, 0, 0, gray[0]];
|
1271
|
+
};
|
1272
|
+
|
1273
|
+
convert$1.gray.lab = function (gray) {
|
1274
|
+
return [gray[0], 0, 0];
|
1275
|
+
};
|
1276
|
+
|
1277
|
+
convert$1.gray.hex = function (gray) {
|
1278
|
+
const val = Math.round(gray[0] / 100 * 255) & 0xFF;
|
1279
|
+
const integer = (val << 16) + (val << 8) + val;
|
1280
|
+
|
1281
|
+
const string = integer.toString(16).toUpperCase();
|
1282
|
+
return '000000'.substring(string.length) + string;
|
1283
|
+
};
|
1284
|
+
|
1285
|
+
convert$1.rgb.gray = function (rgb) {
|
1286
|
+
const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
|
1287
|
+
return [val / 255 * 100];
|
1288
|
+
};
|
1289
|
+
|
1290
|
+
/*
|
1291
|
+
This function routes a model to all other models.
|
1292
|
+
|
1293
|
+
all functions that are routed have a property `.conversion` attached
|
1294
|
+
to the returned synthetic function. This property is an array
|
1295
|
+
of strings, each with the steps in between the 'from' and 'to'
|
1296
|
+
color models (inclusive).
|
1297
|
+
|
1298
|
+
conversions that are not possible simply are not included.
|
1299
|
+
*/
|
1300
|
+
|
1301
|
+
function buildGraph() {
|
1302
|
+
const graph = {};
|
1303
|
+
// https://jsperf.com/object-keys-vs-for-in-with-closure/3
|
1304
|
+
const models = Object.keys(conversions);
|
1305
|
+
|
1306
|
+
for (let len = models.length, i = 0; i < len; i++) {
|
1307
|
+
graph[models[i]] = {
|
1308
|
+
// http://jsperf.com/1-vs-infinity
|
1309
|
+
// micro-opt, but this is simple.
|
1310
|
+
distance: -1,
|
1311
|
+
parent: null
|
1312
|
+
};
|
1313
|
+
}
|
1314
|
+
|
1315
|
+
return graph;
|
1316
|
+
}
|
1317
|
+
|
1318
|
+
// https://en.wikipedia.org/wiki/Breadth-first_search
|
1319
|
+
function deriveBFS(fromModel) {
|
1320
|
+
const graph = buildGraph();
|
1321
|
+
const queue = [fromModel]; // Unshift -> queue -> pop
|
1322
|
+
|
1323
|
+
graph[fromModel].distance = 0;
|
1324
|
+
|
1325
|
+
while (queue.length) {
|
1326
|
+
const current = queue.pop();
|
1327
|
+
const adjacents = Object.keys(conversions[current]);
|
1328
|
+
|
1329
|
+
for (let len = adjacents.length, i = 0; i < len; i++) {
|
1330
|
+
const adjacent = adjacents[i];
|
1331
|
+
const node = graph[adjacent];
|
1332
|
+
|
1333
|
+
if (node.distance === -1) {
|
1334
|
+
node.distance = graph[current].distance + 1;
|
1335
|
+
node.parent = current;
|
1336
|
+
queue.unshift(adjacent);
|
1337
|
+
}
|
1338
|
+
}
|
1339
|
+
}
|
1340
|
+
|
1341
|
+
return graph;
|
1342
|
+
}
|
1343
|
+
|
1344
|
+
function link(from, to) {
|
1345
|
+
return function (args) {
|
1346
|
+
return to(from(args));
|
1347
|
+
};
|
1348
|
+
}
|
1349
|
+
|
1350
|
+
function wrapConversion(toModel, graph) {
|
1351
|
+
const path = [graph[toModel].parent, toModel];
|
1352
|
+
let fn = conversions[graph[toModel].parent][toModel];
|
1353
|
+
|
1354
|
+
let cur = graph[toModel].parent;
|
1355
|
+
while (graph[cur].parent) {
|
1356
|
+
path.unshift(graph[cur].parent);
|
1357
|
+
fn = link(conversions[graph[cur].parent][cur], fn);
|
1358
|
+
cur = graph[cur].parent;
|
1359
|
+
}
|
1360
|
+
|
1361
|
+
fn.conversion = path;
|
1362
|
+
return fn;
|
1363
|
+
}
|
1364
|
+
|
1365
|
+
var route = function (fromModel) {
|
1366
|
+
const graph = deriveBFS(fromModel);
|
1367
|
+
const conversion = {};
|
1368
|
+
|
1369
|
+
const models = Object.keys(graph);
|
1370
|
+
for (let len = models.length, i = 0; i < len; i++) {
|
1371
|
+
const toModel = models[i];
|
1372
|
+
const node = graph[toModel];
|
1373
|
+
|
1374
|
+
if (node.parent === null) {
|
1375
|
+
// No possible conversion, or this node is the source model.
|
1376
|
+
continue;
|
1377
|
+
}
|
1378
|
+
|
1379
|
+
conversion[toModel] = wrapConversion(toModel, graph);
|
1380
|
+
}
|
1381
|
+
|
1382
|
+
return conversion;
|
1383
|
+
};
|
1384
|
+
|
1385
|
+
const convert = {};
|
1386
|
+
|
1387
|
+
const models = Object.keys(conversions);
|
1388
|
+
|
1389
|
+
function wrapRaw(fn) {
|
1390
|
+
const wrappedFn = function (...args) {
|
1391
|
+
const arg0 = args[0];
|
1392
|
+
if (arg0 === undefined || arg0 === null) {
|
1393
|
+
return arg0;
|
1394
|
+
}
|
1395
|
+
|
1396
|
+
if (arg0.length > 1) {
|
1397
|
+
args = arg0;
|
1398
|
+
}
|
1399
|
+
|
1400
|
+
return fn(args);
|
1401
|
+
};
|
1402
|
+
|
1403
|
+
// Preserve .conversion property if there is one
|
1404
|
+
if ('conversion' in fn) {
|
1405
|
+
wrappedFn.conversion = fn.conversion;
|
1406
|
+
}
|
1407
|
+
|
1408
|
+
return wrappedFn;
|
1409
|
+
}
|
1410
|
+
|
1411
|
+
function wrapRounded(fn) {
|
1412
|
+
const wrappedFn = function (...args) {
|
1413
|
+
const arg0 = args[0];
|
1414
|
+
|
1415
|
+
if (arg0 === undefined || arg0 === null) {
|
1416
|
+
return arg0;
|
1417
|
+
}
|
1418
|
+
|
1419
|
+
if (arg0.length > 1) {
|
1420
|
+
args = arg0;
|
1421
|
+
}
|
1422
|
+
|
1423
|
+
const result = fn(args);
|
1424
|
+
|
1425
|
+
// We're assuming the result is an array here.
|
1426
|
+
// see notice in conversions.js; don't use box types
|
1427
|
+
// in conversion functions.
|
1428
|
+
if (typeof result === 'object') {
|
1429
|
+
for (let len = result.length, i = 0; i < len; i++) {
|
1430
|
+
result[i] = Math.round(result[i]);
|
1431
|
+
}
|
1432
|
+
}
|
1433
|
+
|
1434
|
+
return result;
|
1435
|
+
};
|
1436
|
+
|
1437
|
+
// Preserve .conversion property if there is one
|
1438
|
+
if ('conversion' in fn) {
|
1439
|
+
wrappedFn.conversion = fn.conversion;
|
1440
|
+
}
|
1441
|
+
|
1442
|
+
return wrappedFn;
|
1443
|
+
}
|
1444
|
+
|
1445
|
+
models.forEach(fromModel => {
|
1446
|
+
convert[fromModel] = {};
|
1447
|
+
|
1448
|
+
Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});
|
1449
|
+
Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});
|
1450
|
+
|
1451
|
+
const routes = route(fromModel);
|
1452
|
+
const routeModels = Object.keys(routes);
|
1453
|
+
|
1454
|
+
routeModels.forEach(toModel => {
|
1455
|
+
const fn = routes[toModel];
|
1456
|
+
|
1457
|
+
convert[fromModel][toModel] = wrapRounded(fn);
|
1458
|
+
convert[fromModel][toModel].raw = wrapRaw(fn);
|
1459
|
+
});
|
1460
|
+
});
|
1461
|
+
|
1462
|
+
var colorConvert = convert;
|
1463
|
+
|
1464
|
+
const skippedModels = [
|
1465
|
+
// To be honest, I don't really feel like keyword belongs in color convert, but eh.
|
1466
|
+
'keyword',
|
1467
|
+
|
1468
|
+
// Gray conflicts with some method names, and has its own method defined.
|
1469
|
+
'gray',
|
1470
|
+
|
1471
|
+
// Shouldn't really be in color-convert either...
|
1472
|
+
'hex',
|
1473
|
+
];
|
1474
|
+
|
1475
|
+
const hashedModelKeys = {};
|
1476
|
+
for (const model of Object.keys(colorConvert)) {
|
1477
|
+
hashedModelKeys[[...colorConvert[model].labels].sort().join('')] = model;
|
1478
|
+
}
|
1479
|
+
|
1480
|
+
const limiters = {};
|
1481
|
+
|
1482
|
+
function Color(object, model) {
|
1483
|
+
if (!(this instanceof Color)) {
|
1484
|
+
return new Color(object, model);
|
1485
|
+
}
|
1486
|
+
|
1487
|
+
if (model && model in skippedModels) {
|
1488
|
+
model = null;
|
1489
|
+
}
|
1490
|
+
|
1491
|
+
if (model && !(model in colorConvert)) {
|
1492
|
+
throw new Error('Unknown model: ' + model);
|
1493
|
+
}
|
1494
|
+
|
1495
|
+
let i;
|
1496
|
+
let channels;
|
1497
|
+
|
1498
|
+
if (object == null) { // eslint-disable-line no-eq-null,eqeqeq
|
1499
|
+
this.model = 'rgb';
|
1500
|
+
this.color = [0, 0, 0];
|
1501
|
+
this.valpha = 1;
|
1502
|
+
} else if (object instanceof Color) {
|
1503
|
+
this.model = object.model;
|
1504
|
+
this.color = [...object.color];
|
1505
|
+
this.valpha = object.valpha;
|
1506
|
+
} else if (typeof object === 'string') {
|
1507
|
+
const result = colorString.get(object);
|
1508
|
+
if (result === null) {
|
1509
|
+
throw new Error('Unable to parse color from string: ' + object);
|
1510
|
+
}
|
1511
|
+
|
1512
|
+
this.model = result.model;
|
1513
|
+
channels = colorConvert[this.model].channels;
|
1514
|
+
this.color = result.value.slice(0, channels);
|
1515
|
+
this.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1;
|
1516
|
+
} else if (object.length > 0) {
|
1517
|
+
this.model = model || 'rgb';
|
1518
|
+
channels = colorConvert[this.model].channels;
|
1519
|
+
const newArray = Array.prototype.slice.call(object, 0, channels);
|
1520
|
+
this.color = zeroArray(newArray, channels);
|
1521
|
+
this.valpha = typeof object[channels] === 'number' ? object[channels] : 1;
|
1522
|
+
} else if (typeof object === 'number') {
|
1523
|
+
// This is always RGB - can be converted later on.
|
1524
|
+
this.model = 'rgb';
|
1525
|
+
this.color = [
|
1526
|
+
(object >> 16) & 0xFF,
|
1527
|
+
(object >> 8) & 0xFF,
|
1528
|
+
object & 0xFF,
|
1529
|
+
];
|
1530
|
+
this.valpha = 1;
|
1531
|
+
} else {
|
1532
|
+
this.valpha = 1;
|
1533
|
+
|
1534
|
+
const keys = Object.keys(object);
|
1535
|
+
if ('alpha' in object) {
|
1536
|
+
keys.splice(keys.indexOf('alpha'), 1);
|
1537
|
+
this.valpha = typeof object.alpha === 'number' ? object.alpha : 0;
|
1538
|
+
}
|
1539
|
+
|
1540
|
+
const hashedKeys = keys.sort().join('');
|
1541
|
+
if (!(hashedKeys in hashedModelKeys)) {
|
1542
|
+
throw new Error('Unable to parse color from object: ' + JSON.stringify(object));
|
1543
|
+
}
|
1544
|
+
|
1545
|
+
this.model = hashedModelKeys[hashedKeys];
|
1546
|
+
|
1547
|
+
const {labels} = colorConvert[this.model];
|
1548
|
+
const color = [];
|
1549
|
+
for (i = 0; i < labels.length; i++) {
|
1550
|
+
color.push(object[labels[i]]);
|
1551
|
+
}
|
1552
|
+
|
1553
|
+
this.color = zeroArray(color);
|
1554
|
+
}
|
1555
|
+
|
1556
|
+
// Perform limitations (clamping, etc.)
|
1557
|
+
if (limiters[this.model]) {
|
1558
|
+
channels = colorConvert[this.model].channels;
|
1559
|
+
for (i = 0; i < channels; i++) {
|
1560
|
+
const limit = limiters[this.model][i];
|
1561
|
+
if (limit) {
|
1562
|
+
this.color[i] = limit(this.color[i]);
|
1563
|
+
}
|
1564
|
+
}
|
1565
|
+
}
|
1566
|
+
|
1567
|
+
this.valpha = Math.max(0, Math.min(1, this.valpha));
|
1568
|
+
|
1569
|
+
if (Object.freeze) {
|
1570
|
+
Object.freeze(this);
|
1571
|
+
}
|
1572
|
+
}
|
1573
|
+
|
1574
|
+
Color.prototype = {
|
1575
|
+
toString() {
|
1576
|
+
return this.string();
|
1577
|
+
},
|
1578
|
+
|
1579
|
+
toJSON() {
|
1580
|
+
return this[this.model]();
|
1581
|
+
},
|
1582
|
+
|
1583
|
+
string(places) {
|
1584
|
+
let self = this.model in colorString.to ? this : this.rgb();
|
1585
|
+
self = self.round(typeof places === 'number' ? places : 1);
|
1586
|
+
const args = self.valpha === 1 ? self.color : [...self.color, this.valpha];
|
1587
|
+
return colorString.to[self.model](args);
|
1588
|
+
},
|
1589
|
+
|
1590
|
+
percentString(places) {
|
1591
|
+
const self = this.rgb().round(typeof places === 'number' ? places : 1);
|
1592
|
+
const args = self.valpha === 1 ? self.color : [...self.color, this.valpha];
|
1593
|
+
return colorString.to.rgb.percent(args);
|
1594
|
+
},
|
1595
|
+
|
1596
|
+
array() {
|
1597
|
+
return this.valpha === 1 ? [...this.color] : [...this.color, this.valpha];
|
1598
|
+
},
|
1599
|
+
|
1600
|
+
object() {
|
1601
|
+
const result = {};
|
1602
|
+
const {channels} = colorConvert[this.model];
|
1603
|
+
const {labels} = colorConvert[this.model];
|
1604
|
+
|
1605
|
+
for (let i = 0; i < channels; i++) {
|
1606
|
+
result[labels[i]] = this.color[i];
|
1607
|
+
}
|
1608
|
+
|
1609
|
+
if (this.valpha !== 1) {
|
1610
|
+
result.alpha = this.valpha;
|
1611
|
+
}
|
1612
|
+
|
1613
|
+
return result;
|
1614
|
+
},
|
1615
|
+
|
1616
|
+
unitArray() {
|
1617
|
+
const rgb = this.rgb().color;
|
1618
|
+
rgb[0] /= 255;
|
1619
|
+
rgb[1] /= 255;
|
1620
|
+
rgb[2] /= 255;
|
1621
|
+
|
1622
|
+
if (this.valpha !== 1) {
|
1623
|
+
rgb.push(this.valpha);
|
1624
|
+
}
|
1625
|
+
|
1626
|
+
return rgb;
|
1627
|
+
},
|
1628
|
+
|
1629
|
+
unitObject() {
|
1630
|
+
const rgb = this.rgb().object();
|
1631
|
+
rgb.r /= 255;
|
1632
|
+
rgb.g /= 255;
|
1633
|
+
rgb.b /= 255;
|
1634
|
+
|
1635
|
+
if (this.valpha !== 1) {
|
1636
|
+
rgb.alpha = this.valpha;
|
1637
|
+
}
|
1638
|
+
|
1639
|
+
return rgb;
|
1640
|
+
},
|
1641
|
+
|
1642
|
+
round(places) {
|
1643
|
+
places = Math.max(places || 0, 0);
|
1644
|
+
return new Color([...this.color.map(roundToPlace(places)), this.valpha], this.model);
|
1645
|
+
},
|
1646
|
+
|
1647
|
+
alpha(value) {
|
1648
|
+
if (value !== undefined) {
|
1649
|
+
return new Color([...this.color, Math.max(0, Math.min(1, value))], this.model);
|
1650
|
+
}
|
1651
|
+
|
1652
|
+
return this.valpha;
|
1653
|
+
},
|
1654
|
+
|
1655
|
+
// Rgb
|
1656
|
+
red: getset('rgb', 0, maxfn(255)),
|
1657
|
+
green: getset('rgb', 1, maxfn(255)),
|
1658
|
+
blue: getset('rgb', 2, maxfn(255)),
|
1659
|
+
|
1660
|
+
hue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, value => ((value % 360) + 360) % 360),
|
1661
|
+
|
1662
|
+
saturationl: getset('hsl', 1, maxfn(100)),
|
1663
|
+
lightness: getset('hsl', 2, maxfn(100)),
|
1664
|
+
|
1665
|
+
saturationv: getset('hsv', 1, maxfn(100)),
|
1666
|
+
value: getset('hsv', 2, maxfn(100)),
|
1667
|
+
|
1668
|
+
chroma: getset('hcg', 1, maxfn(100)),
|
1669
|
+
gray: getset('hcg', 2, maxfn(100)),
|
1670
|
+
|
1671
|
+
white: getset('hwb', 1, maxfn(100)),
|
1672
|
+
wblack: getset('hwb', 2, maxfn(100)),
|
1673
|
+
|
1674
|
+
cyan: getset('cmyk', 0, maxfn(100)),
|
1675
|
+
magenta: getset('cmyk', 1, maxfn(100)),
|
1676
|
+
yellow: getset('cmyk', 2, maxfn(100)),
|
1677
|
+
black: getset('cmyk', 3, maxfn(100)),
|
1678
|
+
|
1679
|
+
x: getset('xyz', 0, maxfn(95.047)),
|
1680
|
+
y: getset('xyz', 1, maxfn(100)),
|
1681
|
+
z: getset('xyz', 2, maxfn(108.833)),
|
1682
|
+
|
1683
|
+
l: getset('lab', 0, maxfn(100)),
|
1684
|
+
a: getset('lab', 1),
|
1685
|
+
b: getset('lab', 2),
|
1686
|
+
|
1687
|
+
keyword(value) {
|
1688
|
+
if (value !== undefined) {
|
1689
|
+
return new Color(value);
|
1690
|
+
}
|
1691
|
+
|
1692
|
+
return colorConvert[this.model].keyword(this.color);
|
1693
|
+
},
|
1694
|
+
|
1695
|
+
hex(value) {
|
1696
|
+
if (value !== undefined) {
|
1697
|
+
return new Color(value);
|
1698
|
+
}
|
1699
|
+
|
1700
|
+
return colorString.to.hex(this.rgb().round().color);
|
1701
|
+
},
|
1702
|
+
|
1703
|
+
hexa(value) {
|
1704
|
+
if (value !== undefined) {
|
1705
|
+
return new Color(value);
|
1706
|
+
}
|
1707
|
+
|
1708
|
+
const rgbArray = this.rgb().round().color;
|
1709
|
+
|
1710
|
+
let alphaHex = Math.round(this.valpha * 255).toString(16).toUpperCase();
|
1711
|
+
if (alphaHex.length === 1) {
|
1712
|
+
alphaHex = '0' + alphaHex;
|
1713
|
+
}
|
1714
|
+
|
1715
|
+
return colorString.to.hex(rgbArray) + alphaHex;
|
1716
|
+
},
|
1717
|
+
|
1718
|
+
rgbNumber() {
|
1719
|
+
const rgb = this.rgb().color;
|
1720
|
+
return ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF);
|
1721
|
+
},
|
1722
|
+
|
1723
|
+
luminosity() {
|
1724
|
+
// http://www.w3.org/TR/WCAG20/#relativeluminancedef
|
1725
|
+
const rgb = this.rgb().color;
|
1726
|
+
|
1727
|
+
const lum = [];
|
1728
|
+
for (const [i, element] of rgb.entries()) {
|
1729
|
+
const chan = element / 255;
|
1730
|
+
lum[i] = (chan <= 0.04045) ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;
|
1731
|
+
}
|
1732
|
+
|
1733
|
+
return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];
|
1734
|
+
},
|
1735
|
+
|
1736
|
+
contrast(color2) {
|
1737
|
+
// http://www.w3.org/TR/WCAG20/#contrast-ratiodef
|
1738
|
+
const lum1 = this.luminosity();
|
1739
|
+
const lum2 = color2.luminosity();
|
1740
|
+
|
1741
|
+
if (lum1 > lum2) {
|
1742
|
+
return (lum1 + 0.05) / (lum2 + 0.05);
|
1743
|
+
}
|
1744
|
+
|
1745
|
+
return (lum2 + 0.05) / (lum1 + 0.05);
|
1746
|
+
},
|
1747
|
+
|
1748
|
+
level(color2) {
|
1749
|
+
// https://www.w3.org/TR/WCAG/#contrast-enhanced
|
1750
|
+
const contrastRatio = this.contrast(color2);
|
1751
|
+
if (contrastRatio >= 7) {
|
1752
|
+
return 'AAA';
|
1753
|
+
}
|
1754
|
+
|
1755
|
+
return (contrastRatio >= 4.5) ? 'AA' : '';
|
1756
|
+
},
|
1757
|
+
|
1758
|
+
isDark() {
|
1759
|
+
// YIQ equation from http://24ways.org/2010/calculating-color-contrast
|
1760
|
+
const rgb = this.rgb().color;
|
1761
|
+
const yiq = (rgb[0] * 2126 + rgb[1] * 7152 + rgb[2] * 722) / 10000;
|
1762
|
+
return yiq < 128;
|
1763
|
+
},
|
1764
|
+
|
1765
|
+
isLight() {
|
1766
|
+
return !this.isDark();
|
1767
|
+
},
|
1768
|
+
|
1769
|
+
negate() {
|
1770
|
+
const rgb = this.rgb();
|
1771
|
+
for (let i = 0; i < 3; i++) {
|
1772
|
+
rgb.color[i] = 255 - rgb.color[i];
|
1773
|
+
}
|
1774
|
+
|
1775
|
+
return rgb;
|
1776
|
+
},
|
1777
|
+
|
1778
|
+
lighten(ratio) {
|
1779
|
+
const hsl = this.hsl();
|
1780
|
+
hsl.color[2] += hsl.color[2] * ratio;
|
1781
|
+
return hsl;
|
1782
|
+
},
|
1783
|
+
|
1784
|
+
darken(ratio) {
|
1785
|
+
const hsl = this.hsl();
|
1786
|
+
hsl.color[2] -= hsl.color[2] * ratio;
|
1787
|
+
return hsl;
|
1788
|
+
},
|
1789
|
+
|
1790
|
+
saturate(ratio) {
|
1791
|
+
const hsl = this.hsl();
|
1792
|
+
hsl.color[1] += hsl.color[1] * ratio;
|
1793
|
+
return hsl;
|
1794
|
+
},
|
1795
|
+
|
1796
|
+
desaturate(ratio) {
|
1797
|
+
const hsl = this.hsl();
|
1798
|
+
hsl.color[1] -= hsl.color[1] * ratio;
|
1799
|
+
return hsl;
|
1800
|
+
},
|
1801
|
+
|
1802
|
+
whiten(ratio) {
|
1803
|
+
const hwb = this.hwb();
|
1804
|
+
hwb.color[1] += hwb.color[1] * ratio;
|
1805
|
+
return hwb;
|
1806
|
+
},
|
1807
|
+
|
1808
|
+
blacken(ratio) {
|
1809
|
+
const hwb = this.hwb();
|
1810
|
+
hwb.color[2] += hwb.color[2] * ratio;
|
1811
|
+
return hwb;
|
1812
|
+
},
|
1813
|
+
|
1814
|
+
grayscale() {
|
1815
|
+
// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale
|
1816
|
+
const rgb = this.rgb().color;
|
1817
|
+
const value = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;
|
1818
|
+
return Color.rgb(value, value, value);
|
1819
|
+
},
|
1820
|
+
|
1821
|
+
fade(ratio) {
|
1822
|
+
return this.alpha(this.valpha - (this.valpha * ratio));
|
1823
|
+
},
|
1824
|
+
|
1825
|
+
opaquer(ratio) {
|
1826
|
+
return this.alpha(this.valpha + (this.valpha * ratio));
|
1827
|
+
},
|
1828
|
+
|
1829
|
+
rotate(degrees) {
|
1830
|
+
const hsl = this.hsl();
|
1831
|
+
let hue = hsl.color[0];
|
1832
|
+
hue = (hue + degrees) % 360;
|
1833
|
+
hue = hue < 0 ? 360 + hue : hue;
|
1834
|
+
hsl.color[0] = hue;
|
1835
|
+
return hsl;
|
1836
|
+
},
|
1837
|
+
|
1838
|
+
mix(mixinColor, weight) {
|
1839
|
+
// Ported from sass implementation in C
|
1840
|
+
// https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209
|
1841
|
+
if (!mixinColor || !mixinColor.rgb) {
|
1842
|
+
throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof mixinColor);
|
1843
|
+
}
|
1844
|
+
|
1845
|
+
const color1 = mixinColor.rgb();
|
1846
|
+
const color2 = this.rgb();
|
1847
|
+
const p = weight === undefined ? 0.5 : weight;
|
1848
|
+
|
1849
|
+
const w = 2 * p - 1;
|
1850
|
+
const a = color1.alpha() - color2.alpha();
|
1851
|
+
|
1852
|
+
const w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2;
|
1853
|
+
const w2 = 1 - w1;
|
1854
|
+
|
1855
|
+
return Color.rgb(
|
1856
|
+
w1 * color1.red() + w2 * color2.red(),
|
1857
|
+
w1 * color1.green() + w2 * color2.green(),
|
1858
|
+
w1 * color1.blue() + w2 * color2.blue(),
|
1859
|
+
color1.alpha() * p + color2.alpha() * (1 - p));
|
1860
|
+
},
|
1861
|
+
};
|
1862
|
+
|
1863
|
+
// Model conversion methods and static constructors
|
1864
|
+
for (const model of Object.keys(colorConvert)) {
|
1865
|
+
if (skippedModels.includes(model)) {
|
1866
|
+
continue;
|
1867
|
+
}
|
1868
|
+
|
1869
|
+
const {channels} = colorConvert[model];
|
1870
|
+
|
1871
|
+
// Conversion methods
|
1872
|
+
Color.prototype[model] = function (...args) {
|
1873
|
+
if (this.model === model) {
|
1874
|
+
return new Color(this);
|
1875
|
+
}
|
1876
|
+
|
1877
|
+
if (args.length > 0) {
|
1878
|
+
return new Color(args, model);
|
1879
|
+
}
|
1880
|
+
|
1881
|
+
return new Color([...assertArray(colorConvert[this.model][model].raw(this.color)), this.valpha], model);
|
1882
|
+
};
|
1883
|
+
|
1884
|
+
// 'static' construction methods
|
1885
|
+
Color[model] = function (...args) {
|
1886
|
+
let color = args[0];
|
1887
|
+
if (typeof color === 'number') {
|
1888
|
+
color = zeroArray(args, channels);
|
1889
|
+
}
|
1890
|
+
|
1891
|
+
return new Color(color, model);
|
1892
|
+
};
|
1893
|
+
}
|
1894
|
+
|
1895
|
+
function roundTo(number, places) {
|
1896
|
+
return Number(number.toFixed(places));
|
1897
|
+
}
|
1898
|
+
|
1899
|
+
function roundToPlace(places) {
|
1900
|
+
return function (number) {
|
1901
|
+
return roundTo(number, places);
|
1902
|
+
};
|
1903
|
+
}
|
1904
|
+
|
1905
|
+
function getset(model, channel, modifier) {
|
1906
|
+
model = Array.isArray(model) ? model : [model];
|
1907
|
+
|
1908
|
+
for (const m of model) {
|
1909
|
+
(limiters[m] || (limiters[m] = []))[channel] = modifier;
|
1910
|
+
}
|
1911
|
+
|
1912
|
+
model = model[0];
|
1913
|
+
|
1914
|
+
return function (value) {
|
1915
|
+
let result;
|
1916
|
+
|
1917
|
+
if (value !== undefined) {
|
1918
|
+
if (modifier) {
|
1919
|
+
value = modifier(value);
|
1920
|
+
}
|
1921
|
+
|
1922
|
+
result = this[model]();
|
1923
|
+
result.color[channel] = value;
|
1924
|
+
return result;
|
1925
|
+
}
|
1926
|
+
|
1927
|
+
result = this[model]().color[channel];
|
1928
|
+
if (modifier) {
|
1929
|
+
result = modifier(result);
|
1930
|
+
}
|
1931
|
+
|
1932
|
+
return result;
|
1933
|
+
};
|
1934
|
+
}
|
1935
|
+
|
1936
|
+
function maxfn(max) {
|
1937
|
+
return function (v) {
|
1938
|
+
return Math.max(0, Math.min(max, v));
|
1939
|
+
};
|
1940
|
+
}
|
1941
|
+
|
1942
|
+
function assertArray(value) {
|
1943
|
+
return Array.isArray(value) ? value : [value];
|
1944
|
+
}
|
1945
|
+
|
1946
|
+
function zeroArray(array, length) {
|
1947
|
+
for (let i = 0; i < length; i++) {
|
1948
|
+
if (typeof array[i] !== 'number') {
|
1949
|
+
array[i] = 0;
|
1950
|
+
}
|
1951
|
+
}
|
1952
|
+
|
1953
|
+
return array;
|
1954
|
+
}
|
1955
|
+
|
1956
|
+
var color = Color;
|
1957
|
+
|
1958
|
+
exports.color = color;
|