@luzmo/analytics-components-kit 1.0.1-alpha.48 → 1.0.1-alpha.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/{bar-chart-options.config-BdbbHUJZ.js → bar-chart-options.config-D1mb5TDl.js} +1 -0
- package/components/{bar-chart-options.config-C9XGEujs.cjs → bar-chart-options.config-DcxEkOT5.cjs} +1 -1
- package/components/{bar-chart-options.de-DwTn_qfu.js → bar-chart-options.de-BQ4qGaQc.js} +1 -0
- package/components/{bar-chart-options.de-BGzu5Zgd.cjs → bar-chart-options.de-Dr5zKz8Q.cjs} +1 -1
- package/components/{column-chart-options.en-D1UfGsS3.cjs → bar-chart-options.en-DdQ2PYrw.cjs} +1 -1
- package/components/{bar-chart-options.en-Crc8tYUJ.js → bar-chart-options.en-LjG6f4hw.js} +1 -0
- package/components/{bar-chart-options.es-ByT_D06p.js → bar-chart-options.es-BfIKCPf-.js} +1 -0
- package/components/{bar-chart-options.es-B2UWafXc.cjs → bar-chart-options.es-DgYVxn9U.cjs} +1 -1
- package/components/{bar-chart-options.fr-BwiGRlQf.js → bar-chart-options.fr-Cg1lQV2y.js} +1 -0
- package/components/{bar-chart-options.fr-CP7DTrlk.cjs → bar-chart-options.fr-rteFm93C.cjs} +1 -1
- package/components/{column-chart-options.nl-3wAj9uWY.cjs → bar-chart-options.nl--gwlkpc0.cjs} +1 -1
- package/components/{bar-chart-options.nl-DzXnHdwX.js → bar-chart-options.nl-CB2W4rzf.js} +1 -0
- package/components/{calculate-data-item-icon-DlfbBvFN.cjs → calculate-data-item-icon-Dn-9Kd0U.cjs} +1 -1
- package/components/{calculate-data-item-icon-BiIL_s4Z.js → calculate-data-item-icon-Dpvf1aLI.js} +51 -51
- package/components/{column-chart-options.config-BqSQ1Sl9.js → column-chart-options.config-B5SjBVdy.js} +10 -9
- package/components/{column-chart-options.config-Bi0RAzK-.cjs → column-chart-options.config-BjDvA7i9.cjs} +1 -1
- package/components/{column-chart-options.de-pgdcIHqk.cjs → column-chart-options.de-BU__cJy3.cjs} +1 -1
- package/components/{column-chart-options.de-VQVdi8aP.js → column-chart-options.de-BkkWD9rB.js} +1 -0
- package/components/{bar-chart-options.en-D1UfGsS3.cjs → column-chart-options.en-DdQ2PYrw.cjs} +1 -1
- package/components/{column-chart-options.en-Crc8tYUJ.js → column-chart-options.en-LjG6f4hw.js} +1 -0
- package/components/{column-chart-options.es-CT9ZtjV_.js → column-chart-options.es-BgOc-gTh.js} +1 -0
- package/components/{column-chart-options.es-CAAXJv_2.cjs → column-chart-options.es-CkaTU6qn.cjs} +1 -1
- package/components/{column-chart-options.fr-BwiGRlQf.js → column-chart-options.fr-Cg1lQV2y.js} +1 -0
- package/components/{column-chart-options.fr-CP7DTrlk.cjs → column-chart-options.fr-rteFm93C.cjs} +1 -1
- package/components/{bar-chart-options.nl-DZe2pKRa.cjs → column-chart-options.nl-Bhe6rcUo.cjs} +1 -1
- package/components/{column-chart-options.nl-DB2dcotu.js → column-chart-options.nl-CAeBYwQC.js} +1 -0
- package/components/{de-eIqMhTVC.cjs → de-Cxe7xkT4.cjs} +1 -1
- package/components/{de-BbcctJsI.js → de-ZPzjN2kc.js} +0 -1
- package/components/directive-BOOaQO_r.cjs +24 -0
- package/components/directive-CF_9GVrT.js +46 -0
- package/components/display-settings/display-settings.d.ts +2 -2
- package/components/display-settings/index.cjs +1 -1
- package/components/display-settings/index.js +2 -2
- package/components/display-settings-binning/index.cjs +1 -1
- package/components/display-settings-binning/index.js +11 -11
- package/components/display-settings-datetime/index.cjs +1 -1
- package/components/display-settings-datetime/index.js +13 -13
- package/components/display-settings-grand-totals/index.cjs +1 -1
- package/components/display-settings-grand-totals/index.js +11 -11
- package/components/display-settings-numeric/display-settings-numeric.d.ts +3 -1
- package/components/display-settings-numeric/index.cjs +61 -40
- package/components/display-settings-numeric/index.js +223 -182
- package/components/display-settings-period-over-period/index.cjs +6 -6
- package/components/display-settings-period-over-period/index.js +11 -11
- package/components/draggable-data-item/draggable-data-item.d.ts +1 -0
- package/components/draggable-data-item/index.cjs +8 -5
- package/components/draggable-data-item/index.js +44 -38
- package/components/draggable-data-item-level/draggable-data-item-level.d.ts +4 -0
- package/components/draggable-data-item-level/index.cjs +10 -10
- package/components/draggable-data-item-level/index.js +102 -77
- package/components/droppable-slot/droppable-slot.d.ts +29 -9
- package/components/droppable-slot/index.cjs +25 -71
- package/components/droppable-slot/index.js +274 -623
- package/components/edit-item/index.cjs +2 -2
- package/components/edit-item/index.js +18 -18
- package/components/edit-option/index.cjs +1 -1
- package/components/edit-option/index.js +2 -2
- package/components/edit-option-action-button-group/index.cjs +1 -1
- package/components/edit-option-action-button-group/index.js +6 -6
- package/components/{edit-option-base-D25zHZVl.js → edit-option-base-CG0JcbX9.js} +3 -3
- package/components/{edit-option-base-h5ndfVK4.cjs → edit-option-base-a2yoNqdf.cjs} +1 -1
- package/components/edit-option-color-palette-picker/index.cjs +1 -1
- package/components/edit-option-color-palette-picker/index.js +3 -3
- package/components/edit-option-color-picker/index.cjs +1 -1
- package/components/edit-option-color-picker/index.js +5 -5
- package/components/edit-option-color-range/index.cjs +1 -1
- package/components/edit-option-color-range/index.js +12 -12
- package/components/edit-option-multi-language-field/index.cjs +1 -1
- package/components/edit-option-multi-language-field/index.js +4 -4
- package/components/edit-option-number-field/index.cjs +1 -1
- package/components/edit-option-number-field/index.js +5 -5
- package/components/edit-option-picker/index.cjs +1 -1
- package/components/edit-option-picker/index.js +5 -5
- package/components/edit-option-position-picker/index.cjs +1 -1
- package/components/edit-option-position-picker/index.js +4 -4
- package/components/edit-option-positions-number-field/index.cjs +1 -1
- package/components/edit-option-positions-number-field/index.js +6 -6
- package/components/edit-option-radio-button-group/index.cjs +1 -1
- package/components/edit-option-radio-button-group/index.js +4 -4
- package/components/edit-option-slider/index.cjs +1 -1
- package/components/edit-option-slider/index.js +3 -3
- package/components/edit-option-switch/index.cjs +1 -1
- package/components/edit-option-switch/index.js +3 -3
- package/components/edit-option-text-field/index.cjs +1 -1
- package/components/edit-option-text-field/index.js +7 -7
- package/components/{es-tWaYVbsQ.cjs → es-4dEouIgb.cjs} +1 -1
- package/components/{es-ByWFTJ0s.js → es-C0JGlz18.js} +0 -1
- package/components/filter-data-item-picker/index.cjs +1 -1
- package/components/filter-data-item-picker/index.js +8 -8
- package/components/filter-expression-picker/index.cjs +1 -1
- package/components/filter-expression-picker/index.js +2 -2
- package/components/filter-item/index.cjs +1 -1
- package/components/filter-item/index.js +24 -24
- package/components/filter-value-picker/index.cjs +1 -1
- package/components/filter-value-picker/index.js +4 -4
- package/components/filter-value-picker-datetime/index.cjs +1 -1
- package/components/filter-value-picker-datetime/index.js +302 -302
- package/components/filter-value-picker-hierarchy/index.cjs +1 -1
- package/components/filter-value-picker-hierarchy/index.js +8 -8
- package/components/filter-value-picker-numeric/index.cjs +1 -1
- package/components/filter-value-picker-numeric/index.js +8 -8
- package/components/{focusable-Bhf_beoW.js → focusable-BbymtxWI.js} +1 -1
- package/components/{focusable-B8t8a-WJ.cjs → focusable-DAGGGYyz.cjs} +1 -1
- package/components/{fr-C5b2Wgoz.js → fr-B_-_f-VN.js} +0 -1
- package/components/{fr-2igiTsHU.cjs → fr-Dwulhlbi.cjs} +1 -1
- package/components/grid/index.cjs +18 -22
- package/components/grid/index.js +28 -49
- package/components/{if-defined-Dg09naf2.js → if-defined-Barg9gGQ.js} +1 -1
- package/components/{if-defined-DjdbEoAa.cjs → if-defined-wiCAR_aA.cjs} +1 -1
- package/components/{index-cbfU96gS.cjs → index-1oIrlkAr.cjs} +8 -8
- package/components/{index-BqSQoHjg.js → index-5Z9GD60H.js} +6 -6
- package/components/{index-9LxnqLJa.js → index-B2ngKWOI.js} +2 -2
- package/components/{index-COU9XhBt.js → index-BC1LV3vH.js} +1 -1
- package/components/{index-Cf_a7VrO.js → index-BEtf1WaQ.js} +2 -2
- package/components/{index-DMhm0FM8.cjs → index-BbpsZYZF.cjs} +25 -26
- package/components/{index-DRLFjkH0.cjs → index-BfzppmHn.cjs} +2 -2
- package/components/{index-BobhBKA2.js → index-BssHAgUU.js} +1 -1
- package/components/index-Bt3JTHTC.js +787 -0
- package/components/index-CY_cyFdI.cjs +174 -0
- package/components/{index-DeIay7ZE.js → index-CbuHBIDB.js} +2 -2
- package/components/{index-BukPAqqU.cjs → index-Ck5VRoXN.cjs} +1 -1
- package/components/{index-DYmi-X87.js → index-DE3d0E0P.js} +2 -2
- package/components/{index-fwJBhawL.cjs → index-DSQyBS9Z.cjs} +1 -1
- package/components/{index-BY1yDIAI.js → index-DTI4dIyd.js} +586 -634
- package/components/index-D_jFGBMs.js +174 -0
- package/components/{index-D9yzIoGv.js → index-Delpl7qa.js} +368 -306
- package/components/{index-B7AFYrfv.cjs → index-Df-_TbOD.cjs} +1 -1
- package/components/{index-C6NpWavw.js → index-DsP81c4M.js} +2 -2
- package/components/index-Dy_5M3M5.cjs +42 -0
- package/components/{index-Bpdwb9Js.cjs → index-MPM_B4re.cjs} +3 -3
- package/components/{index-ydBgjAru.js → index-N845QLku.js} +16 -16
- package/components/{index--3gSNupB.cjs → index-Tx5oQjbt.cjs} +1 -1
- package/components/{index-BSgp4MWQ.cjs → index-cHKqEi5-.cjs} +1 -1
- package/components/index-eBsINoH9.cjs +20 -0
- package/components/{index-BKx2WhDB.cjs → index-tXl_aMnZ.cjs} +1 -1
- package/components/index.cjs +1 -1
- package/components/index.js +4 -4
- package/components/{localized-decorator-DNr1P1m0.js → localized-decorator-Bl5gcI6n.js} +1 -1
- package/components/{localized-decorator-SOrjcPab.cjs → localized-decorator-DIXYZ3RL.cjs} +1 -1
- package/components/{luzmo-icons-4Tmb3sKr.js → luzmo-icons-CVeTZ59u.js} +9 -9
- package/components/{luzmo-icons-4nDFv1Lq-D6-m-VWM.cjs → luzmo-icons-DbwDQtuO-DSQ-uVxy.cjs} +2 -2
- package/components/{luzmo-icons-4nDFv1Lq-DffGNBpO.js → luzmo-icons-DbwDQtuO-QG0fLECn.js} +7 -7
- package/components/{luzmo-icons-Bvm-_ECi.cjs → luzmo-icons-DonyjSXg.cjs} +1 -1
- package/components/{nl-B50x7wMn.cjs → nl-DxdBIXDd.cjs} +1 -1
- package/components/{nl-76jn_zMH.js → nl-gdQCG4WV.js} +0 -1
- package/components/{periods.const-CfXsouLz.cjs → periods.const-7sXlqgEo.cjs} +1 -1
- package/components/{periods.const-C89NNRX-.js → periods.const-B7FKokcH.js} +1 -1
- package/components/property-Cu4Q1hS4.cjs +42 -0
- package/components/{property-BFMfZY1k.js → property-DCzt3DR1.js} +277 -277
- package/components/{set-locale-Cam8nRIW.cjs → set-locale-DCPlazsZ.cjs} +1 -1
- package/components/{set-locale-DbEAMqUs.js → set-locale-GI34z_M7.js} +1 -1
- package/components/{sized-mixin-CkdMApAU.js → sized-mixin-BGzkX2g1.js} +1 -1
- package/components/{sized-mixin-C48t6K7U.cjs → sized-mixin-j_7aJM4b.cjs} +1 -1
- package/components/slot-contents-picker/index.cjs +1 -1
- package/components/slot-contents-picker/index.js +16 -16
- package/components/slot-menu/index.cjs +27 -22
- package/components/slot-menu/index.js +237 -148
- package/components/slot-menu/slot-menu.d.ts +34 -12
- package/components/slot-menu-list/index.cjs +1 -1
- package/components/slot-menu-list/index.js +5 -5
- package/components/{state-CuE7TJCY.cjs → state-fyl3IYMu.cjs} +1 -1
- package/components/{state-BSTa7W6f.js → state-nDsQPund.js} +1 -1
- package/components/{task-CDsB8Kbr.js → task-Bh_X-xIU.js} +1 -1
- package/components/{task-0B-FC3rj.cjs → task-CwmAXlv0.cjs} +1 -1
- package/components/{text-field-ol9Ed5lQ-cRqtIf_0.cjs → text-field-BIADXoLC-B8w9TVmS.cjs} +1 -1
- package/components/{text-field-ol9Ed5lQ-DbpeM4EP.js → text-field-BIADXoLC-B9oE05VF.js} +1 -1
- package/custom-elements.json +226 -41
- package/item-definitions/bar-chart/i18n/bar-chart-options.de.d.ts +1 -0
- package/item-definitions/bar-chart/i18n/bar-chart-options.en.d.ts +1 -0
- package/item-definitions/bar-chart/i18n/bar-chart-options.es.d.ts +1 -0
- package/item-definitions/bar-chart/i18n/bar-chart-options.fr.d.ts +1 -0
- package/item-definitions/bar-chart/i18n/bar-chart-options.nl.d.ts +1 -0
- package/item-definitions/box-plot/box-plot-options.config.d.ts +1 -1
- package/item-definitions/choropleth-map/choropleth-map-options.config.d.ts +1 -1
- package/item-definitions/column-chart/i18n/column-chart-options.de.d.ts +1 -0
- package/item-definitions/column-chart/i18n/column-chart-options.en.d.ts +1 -0
- package/item-definitions/column-chart/i18n/column-chart-options.es.d.ts +1 -0
- package/item-definitions/column-chart/i18n/column-chart-options.fr.d.ts +1 -0
- package/item-definitions/column-chart/i18n/column-chart-options.nl.d.ts +1 -0
- package/item-definitions/hexbin-map/hexbin-map-options.config.d.ts +1 -1
- package/item-definitions/route-map/route-map-options.config.d.ts +1 -1
- package/item-definitions/spike-map/spike-map-options.config.d.ts +1 -1
- package/package.json +1 -1
- package/utils/data-broker/index.d.ts +9 -0
- package/utils/store/slot-store.d.ts +9 -3
- package/components/index-Be-pSgzQ.js +0 -174
- package/components/index-DCdx3dxQ.cjs +0 -42
- package/components/index-PGX2p9Ns.js +0 -304
- package/components/index-TQG9Xdxu.cjs +0 -20
- package/components/index-VHrmgynd.cjs +0 -121
- package/components/property-BV1QaY8E.cjs +0 -42
@@ -18,19 +18,19 @@
|
|
18
18
|
* SOFTWARE.
|
19
19
|
* */
|
20
20
|
import { a as io, z as m, I as jo, R as N, m as ie } from "./base-D76d76ww-BGkuhs54.js";
|
21
|
-
import { n as
|
22
|
-
import { m as wo, d as
|
23
|
-
import { D as Se, g as
|
21
|
+
import { n as ut } from "./directive-helpers-Cm6gitnu-CeYtlPO9.js";
|
22
|
+
import { m as wo, d as V } from "./if-defined-DOaE2coe-CNT45Xcl.js";
|
23
|
+
import { D as Se, g as ua, v as ha, s as da } from "./luzmo-icons-DbwDQtuO-QG0fLECn.js";
|
24
24
|
import { r as Fe } from "./focusable-BxtpnzWp-DJQkL8Zv.js";
|
25
|
-
import { w as
|
26
|
-
import { l as
|
27
|
-
import { i as
|
28
|
-
import { p as
|
25
|
+
import { w as ma, a as pa } from "./async-directive-BfcqVjDp-BCT-lA4F.js";
|
26
|
+
import { l as ht, u as dt } from "./streaming-listener-CP-JE6Fa-9MH0gENR.js";
|
27
|
+
import { i as ga } from "./text-field-BIADXoLC-B9oE05VF.js";
|
28
|
+
import { p as fa, d as ba, a as za } from "./index-DUF6bALI.js";
|
29
29
|
import "./index-CskV_bXp.js";
|
30
30
|
import "./index-CTVNGPeT.js";
|
31
|
-
import { o as
|
32
|
-
import { a as
|
33
|
-
import { m as
|
31
|
+
import { o as Qe } from "./when-CDK1Tt5Y-C6ViXC43.js";
|
32
|
+
import { a as va } from "./mutation-controller-DH7YOCyj-E7gpCmwh.js";
|
33
|
+
import { m as wa } from "./roving-tabindex-DOg4z6ZU-dufnVmvL.js";
|
34
34
|
/*! * Lucero - The design system for Luzmo.
|
35
35
|
*
|
36
36
|
* Copyright © 2025 Luzmo
|
@@ -48,13 +48,13 @@ import { m as ya } from "./roving-tabindex-DOg4z6ZU-dufnVmvL.js";
|
|
48
48
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
49
49
|
* SOFTWARE.
|
50
50
|
* */
|
51
|
-
const
|
52
|
-
var
|
51
|
+
const ya = ':host{inline-size:var(--luzmo-color-loupe-width, 48px);block-size:var(--luzmo-color-loupe-height, 64px);transform:translateY(var(--luzmo-color-loupe-animation-distance, 8px));opacity:0;transform-origin:bottom;pointer-events:none;filter:drop-shadow(var(--luzmo-color-loupe-drop-shadow-x, 0) var(--luzmo-color-loupe-drop-shadow-y, 2px) var(--luzmo-color-loupe-drop-shadow-blur, 8px) var(--luzmo-color-loupe-drop-shadow-color, rgba(0, 0, 0, .25)));transition:transform .1s ease-in-out,opacity .125s ease-in-out;position:absolute;inset-block-end:calc(var(--luzmo-color-handle-size, 16px) - var(--luzmo-color-handle-outer-border-width, 1px) + var(--luzmo-color-loupe-offset, 12px));inset-inline-end:calc(50% - var(--luzmo-color-loupe-width, 48px) / 2)}:host:dir(rtl),:host([dir=rtl]){inset-inline-end:calc(50% - var(--luzmo-color-loupe-width, 48px) / 2 - 1px)}:host([open]){opacity:1;transform:translate(0)}.luzmo-color-loupe-inner-border{fill:var(--luzmo-picked-color);stroke:var(--luzmo-color-loupe-inner-border-color, rgba(0, 0, 0, .1));stroke-width:var(--luzmo-color-loupe-inner-border-width, 1px)}.luzmo-color-loupe-outer-border{fill:none;stroke:var(--luzmo-color-loupe-outer-border-color, white);stroke-width:calc(var(--luzmo-color-loupe-outer-border-width, 2px) + 2px);transform:translate(calc((var(--luzmo-color-loupe-outer-border-width, 2px) + 2px) / 2))}.luzmo-color-loupe-checkerboard-pattern{fill:var(--luzmo-color-loupe-checkerboard-dark-color, rgb(230, 230, 230))}.luzmo-color-loupe-checkerboard-background{fill:var(--luzmo-color-loupe-checkerboard-light-color, rgb(255, 255, 255))}.luzmo-color-loupe-checkerboard-fill{fill:var(--luzmo-color-loupe-checkerboard-fill, url(#checkerboard-primary))}@media (forced-colors: active){:host{--highcontrast-colorloupe-outer-border-color: CanvasText}}svg{width:inherit;height:inherit}.loupe-clipped{clip-path:path("M23 61.575C19.0044 57.435 15.2591 53.0606 11.784 48.475C8.68949 44.4532 5.96348 40.1608 3.639 35.65C1.224 30.8 0 26.549 0 23C0.00319993 17.6937 1.84059 12.5516 5.20091 8.44488C8.56122 4.33815 13.2378 1.51928 18.4385 0.465803C23.6392 -0.587678 29.0442 0.189006 33.7378 2.66428C38.4314 5.13955 42.125 9.16122 44.193 14.048C45.3915 16.88 46.0061 19.9248 46 23C46 26.551 44.774 30.811 42.355 35.661C40.0274 40.1747 37.298 44.4698 34.2 48.494C30.7297 53.0728 26.9898 57.4409 23 61.575ZZ")}.opacity-checkerboard{position:absolute;top:2px;left:2px;block-size:100%;inline-size:100%}.opacity-checkerboard{background:repeating-conic-gradient(var(--luzmo-color-loupe-checkerboard-light, rgb(255, 255, 255)) 0 25%,var(--luzmo-color-loupe-checkerboard-dark, rgb(230, 230, 230)) 0 50%) var(--luzmo-color-loupe-checkerboard-position, left top)/calc(var(--luzmo-color-loupe-checkerboard-size, 8px) * 2) calc(var(--luzmo-color-loupe-checkerboard-size, 8px) * 2)}';
|
52
|
+
var xa = Object.defineProperty, mt = (r, o, e, t) => {
|
53
53
|
for (var a = void 0, l = r.length - 1, s; l >= 0; l--)
|
54
54
|
(s = r[l]) && (a = s(o, e, a) || a);
|
55
|
-
return a &&
|
55
|
+
return a && xa(o, e, a), a;
|
56
56
|
};
|
57
|
-
const
|
57
|
+
const pt = class extends jo {
|
58
58
|
constructor() {
|
59
59
|
super(...arguments), this.open = !1, this.color = "rgba(255, 0, 0, 0.5)";
|
60
60
|
}
|
@@ -100,14 +100,14 @@ const gt = class extends jo {
|
|
100
100
|
`;
|
101
101
|
}
|
102
102
|
};
|
103
|
-
|
104
|
-
let
|
105
|
-
|
103
|
+
pt.styles = io(ya);
|
104
|
+
let gt = pt;
|
105
|
+
mt([
|
106
106
|
m({ type: Boolean, reflect: !0 })
|
107
|
-
],
|
108
|
-
|
107
|
+
], gt.prototype, "open");
|
108
|
+
mt([
|
109
109
|
m({ type: String })
|
110
|
-
],
|
110
|
+
], gt.prototype, "color");
|
111
111
|
/*! * Lucero - The design system for Luzmo.
|
112
112
|
*
|
113
113
|
* Copyright © 2025 Luzmo
|
@@ -125,20 +125,20 @@ pt([
|
|
125
125
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
126
126
|
* SOFTWARE.
|
127
127
|
* */
|
128
|
-
const
|
128
|
+
const Ca = () => {
|
129
129
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
130
130
|
const r = document.createElement("style");
|
131
131
|
r.setAttribute("data-luzmo-vars", ""), r.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-informative-color: #1a77e9;--luzmo-informative-color-rgb: 26, 119, 233;--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}', document.head.appendChild(r);
|
132
132
|
}
|
133
133
|
};
|
134
|
-
|
135
|
-
const
|
136
|
-
var
|
134
|
+
Ca();
|
135
|
+
const ka = ':host{touch-action:none;transition:inline-size var(--luzmo-color-handle-animation-duration, .13s) var(--luzmo-color-handle-animation-easing, ease-in-out),block-size var(--luzmo-color-handle-animation-duration, .13s) var(--luzmo-color-handle-animation-easing, ease-in-out),border-width var(--luzmo-color-handle-animation-duration, .13s) var(--luzmo-color-handle-animation-easing, ease-in-out),margin-inline var(--luzmo-color-handle-animation-duration, .13s) var(--luzmo-color-handle-animation-easing, ease-in-out),margin-block var(--luzmo-color-handle-animation-duration, .13s) var(--luzmo-color-handle-animation-easing, ease-in-out)}:host{background:repeating-conic-gradient(var(--luzmo-color-loupe-checkerboard-light, rgb(255, 255, 255)) 0 25%,var(--luzmo-color-loupe-checkerboard-dark, rgb(230, 230, 230)) 0 50%) var(--luzmo-color-loupe-checkerboard-position, left top)/calc(var(--luzmo-color-loupe-checkerboard-size, 8px) * 2) calc(var(--luzmo-color-loupe-checkerboard-size, 8px) * 2);background-position:50%}:host(:focus){outline:none}:host{z-index:1;box-sizing:border-box;inline-size:var(--luzmo-color-handle-size, 16px);block-size:var(--luzmo-color-handle-size, 16px);margin-inline:calc(var(--luzmo-color-handle-size, 16px) / 2 * -1);margin-block:calc(var(--luzmo-color-handle-size, 16px) / 2 * -1);border-width:var(--luzmo-color-handle-border-width, 2px);border-color:var(--luzmo-color-handle-border-color, rgb(255, 255, 255));box-shadow:0 0 0 var(--luzmo-color-handle-outer-border-width, 1px) var(--luzmo-color-handle-outer-border-color, rgba(0, 0, 0, .42));transition:all var(--luzmo-color-handle-animation-duration, 0) var(--luzmo-color-handle-animation-easing, ease-in-out);border-style:solid}:host,:host:after{border-radius:100%;display:block;position:absolute}:host:after{content:"";inset-inline:calc(50% - var(--luzmo-color-handle-hitarea-size, 24px) / 2);inset-block:calc(50% - var(--luzmo-color-handle-hitarea-size, 24px) / 2);inline-size:var(--luzmo-color-handle-hitarea-size, 24px);block-size:var(--luzmo-color-handle-hitarea-size, 24px);border-radius:var(--luzmo-color-handle-hitarea-border-radius, 100%)}:host([focused]),:host(:focus-visible){inline-size:var(--luzmo-color-handle-focused-size, 32px);block-size:var(--luzmo-color-handle-focused-size, 32px);margin-inline:calc(var(--luzmo-color-handle-size, 16px) * -1);margin-block:calc(var(--luzmo-color-handle-size, 16px) * -1);outline:none}:host([disabled]){pointer-events:none;border-color:var(--highcontrast-color-handle-border-color-disabled, var(--luzmo-color-handle-border-color-disabled, var(--luzmo-font-color-disabled)));background:var(--highcontrast-color-handle-fill-color-disabled, var(--luzmo-color-handle-fill-color-disabled, var(--luzmo-font-color-disabled)));box-shadow:none}:host([disabled]) .inner{display:none}.inner{inline-size:100%;block-size:100%;box-shadow:inset 0 0 0 var(--luzmo-color-handle-inner-border-width, var(--luzmo-border-width)) var(--luzmo-color-handle-inner-border-color, rgba(0, 0, 0, .42));background-color:var(--luzmo-picked-color);border-radius:100%}@media (forced-colors: active){:host{forced-color-adjust:none}:host([disabled]){--highcontrast-color-handle-border-color-disabled: GrayText;--highcontrast-color-handle-fill-color-disabled: Canvas}}';
|
136
|
+
var Ma = Object.defineProperty, ce = (r, o, e, t) => {
|
137
137
|
for (var a = void 0, l = r.length - 1, s; l >= 0; l--)
|
138
138
|
(s = r[l]) && (a = s(o, e, a) || a);
|
139
|
-
return a &&
|
139
|
+
return a && Ma(o, e, a), a;
|
140
140
|
};
|
141
|
-
const
|
141
|
+
const ft = class extends jo {
|
142
142
|
constructor() {
|
143
143
|
super(...arguments), this.disabled = !1, this.focused = !1, this.open = !1, this.color = "rgba(255, 0, 0, 0.5)";
|
144
144
|
}
|
@@ -161,8 +161,8 @@ const bt = class extends jo {
|
|
161
161
|
super.firstUpdated(o), this.addEventListener("pointerdown", this.handlePointerdown), this.addEventListener("pointerup", this.handlePointerup), this.addEventListener("pointercancel", this.handlePointerup);
|
162
162
|
}
|
163
163
|
};
|
164
|
-
|
165
|
-
let Ro =
|
164
|
+
ft.styles = io(ka);
|
165
|
+
let Ro = ft;
|
166
166
|
ce([
|
167
167
|
m({ type: Boolean, reflect: !0 })
|
168
168
|
], Ro.prototype, "disabled");
|
@@ -176,7 +176,7 @@ ce([
|
|
176
176
|
m({ type: String })
|
177
177
|
], Ro.prototype, "color");
|
178
178
|
customElements.get("luzmo-color-handle") || customElements.define("luzmo-color-handle", Ro);
|
179
|
-
const
|
179
|
+
const $a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
180
180
|
__proto__: null,
|
181
181
|
LuzmoColorHandle: Ro
|
182
182
|
}, Symbol.toStringTag, { value: "Module" }));
|
@@ -197,7 +197,7 @@ const Sa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
197
197
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
198
198
|
* SOFTWARE.
|
199
199
|
* */
|
200
|
-
var
|
200
|
+
var Sa = Object.defineProperty, _a = (r, o, e) => o in r ? Sa(r, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[o] = e, or = (r, o, e) => _a(r, typeof o != "symbol" ? o + "" : o, e);
|
201
201
|
function $(r, o) {
|
202
202
|
let e = r.length;
|
203
203
|
Array.isArray(r[0]) || (r = [r]), Array.isArray(o[0]) || (o = o.map((s) => [s]));
|
@@ -221,7 +221,7 @@ function ho(r) {
|
|
221
221
|
return (Object.prototype.toString.call(r).match(/^\[object\s+(.*?)\]$/)[1] || "").toLowerCase();
|
222
222
|
}
|
223
223
|
function ae(r, { precision: o, unit: e }) {
|
224
|
-
return mo(r) ? "none" :
|
224
|
+
return mo(r) ? "none" : bt(r, o) + (e ?? "");
|
225
225
|
}
|
226
226
|
function mo(r) {
|
227
227
|
return Number.isNaN(r) || r instanceof Number && (r == null ? void 0 : r.none);
|
@@ -229,7 +229,7 @@ function mo(r) {
|
|
229
229
|
function R(r) {
|
230
230
|
return mo(r) ? 0 : r;
|
231
231
|
}
|
232
|
-
function
|
232
|
+
function bt(r, o) {
|
233
233
|
if (r === 0)
|
234
234
|
return 0;
|
235
235
|
let e = ~~r, t = 0;
|
@@ -237,13 +237,13 @@ function zt(r, o) {
|
|
237
237
|
const a = 10 ** (o - t);
|
238
238
|
return Math.floor(r * a + 0.5) / a;
|
239
239
|
}
|
240
|
-
const
|
240
|
+
const Ea = {
|
241
241
|
deg: 1,
|
242
242
|
grad: 0.9,
|
243
243
|
rad: 180 / Math.PI,
|
244
244
|
turn: 360
|
245
245
|
};
|
246
|
-
function
|
246
|
+
function zt(r) {
|
247
247
|
if (!r)
|
248
248
|
return;
|
249
249
|
r = r.trim();
|
@@ -255,7 +255,7 @@ function vt(r) {
|
|
255
255
|
let c = i.match(t), u = i;
|
256
256
|
if (c) {
|
257
257
|
let h = c[0], d = u.slice(0, -h.length);
|
258
|
-
h === "%" ? (u = new Number(d / 100), u.type = "<percentage>") : (u = new Number(d *
|
258
|
+
h === "%" ? (u = new Number(d / 100), u.type = "<percentage>") : (u = new Number(d * Ea[h]), u.type = "<angle>", u.unit = h);
|
259
259
|
} else e.test(u) ? (u = new Number(u), u.type = "<number>") : u === "none" && (u = new Number(NaN), u.none = !0);
|
260
260
|
n.startsWith("/") && (u = u instanceof Number ? u : new Number(u), u.alpha = !0), typeof u == "object" && u instanceof Number && (u.raw = i), s.push(u);
|
261
261
|
}), {
|
@@ -268,19 +268,19 @@ function vt(r) {
|
|
268
268
|
};
|
269
269
|
}
|
270
270
|
}
|
271
|
-
function
|
271
|
+
function vt(r) {
|
272
272
|
return r[r.length - 1];
|
273
273
|
}
|
274
|
-
function
|
274
|
+
function Oo(r, o, e) {
|
275
275
|
return isNaN(r) ? o : isNaN(o) ? r : r + (o - r) * e;
|
276
276
|
}
|
277
|
-
function
|
277
|
+
function wt(r, o, e) {
|
278
278
|
return (e - r) / (o - r);
|
279
279
|
}
|
280
280
|
function Le(r, o, e) {
|
281
|
-
return
|
281
|
+
return Oo(o[0], o[1], wt(r[0], r[1], e));
|
282
282
|
}
|
283
|
-
function
|
283
|
+
function yt(r) {
|
284
284
|
return r.map((o) => o.split("|").map((e) => {
|
285
285
|
e = e.trim();
|
286
286
|
let t = e.match(/^(<[a-z]+>)\[(-?[.\d]+),\s*(-?[.\d]+)\]?$/);
|
@@ -291,7 +291,7 @@ function xt(r) {
|
|
291
291
|
return e;
|
292
292
|
}));
|
293
293
|
}
|
294
|
-
function
|
294
|
+
function xt(r, o, e) {
|
295
295
|
return Math.max(Math.min(e, o), r);
|
296
296
|
}
|
297
297
|
function ue(r, o) {
|
@@ -303,35 +303,35 @@ function to(r, o) {
|
|
303
303
|
function je(r, o) {
|
304
304
|
return o === 0 ? 0 : r / o;
|
305
305
|
}
|
306
|
-
function
|
306
|
+
function Ct(r, o, e = 0, t = r.length) {
|
307
307
|
for (; e < t; ) {
|
308
308
|
const a = e + t >> 1;
|
309
309
|
r[a] < o ? e = a + 1 : t = a;
|
310
310
|
}
|
311
311
|
return e;
|
312
312
|
}
|
313
|
-
var
|
313
|
+
var Aa = /* @__PURE__ */ Object.freeze({
|
314
314
|
__proto__: null,
|
315
|
-
bisectLeft:
|
316
|
-
clamp:
|
315
|
+
bisectLeft: Ct,
|
316
|
+
clamp: xt,
|
317
317
|
copySign: ue,
|
318
|
-
interpolate:
|
319
|
-
interpolateInv:
|
318
|
+
interpolate: Oo,
|
319
|
+
interpolateInv: wt,
|
320
320
|
isNone: mo,
|
321
321
|
isString: Do,
|
322
|
-
last:
|
322
|
+
last: vt,
|
323
323
|
mapRange: Le,
|
324
324
|
multiplyMatrices: $,
|
325
|
-
parseCoordGrammar:
|
326
|
-
parseFunction:
|
325
|
+
parseCoordGrammar: yt,
|
326
|
+
parseFunction: zt,
|
327
327
|
serializeNumber: ae,
|
328
328
|
skipNone: R,
|
329
329
|
spow: to,
|
330
|
-
toPrecision:
|
330
|
+
toPrecision: bt,
|
331
331
|
type: ho,
|
332
332
|
zdiv: je
|
333
333
|
});
|
334
|
-
class
|
334
|
+
class Ra {
|
335
335
|
add(o, e, t) {
|
336
336
|
if (typeof arguments[0] != "string") {
|
337
337
|
for (var o in arguments[0])
|
@@ -348,13 +348,13 @@ class Pa {
|
|
348
348
|
});
|
349
349
|
}
|
350
350
|
}
|
351
|
-
const po = new
|
352
|
-
var rr, tr,
|
351
|
+
const po = new Ra();
|
352
|
+
var er, rr, tr, G = {
|
353
353
|
gamut_mapping: "css",
|
354
354
|
precision: 5,
|
355
355
|
deltaE: "76",
|
356
356
|
// Default deltaE method
|
357
|
-
verbose: ((
|
357
|
+
verbose: ((tr = (rr = (er = globalThis == null ? void 0 : globalThis.process) == null ? void 0 : er.env) == null ? void 0 : rr.NODE_ENV) == null ? void 0 : tr.toLowerCase()) !== "test",
|
358
358
|
warn: function(r) {
|
359
359
|
var o, e;
|
360
360
|
this.verbose && ((e = (o = globalThis == null ? void 0 : globalThis.console) == null ? void 0 : o.warn) == null || e.call(o, r));
|
@@ -386,11 +386,11 @@ function le(r, o, e, t = {}) {
|
|
386
386
|
return $(a.M, a.XYZ);
|
387
387
|
throw new TypeError("Only Bradford CAT with white points D50 and D65 supported for now.");
|
388
388
|
}
|
389
|
-
const
|
390
|
-
function
|
389
|
+
const Pa = /* @__PURE__ */ new Set(["<number>", "<percentage>", "<angle>"]);
|
390
|
+
function ar(r, o, e, t) {
|
391
391
|
return Object.entries(r.coords).map(([a, l], s) => {
|
392
392
|
let n = o.coordGrammar[s], i = t[s], c = i == null ? void 0 : i.type, u;
|
393
|
-
if (i.none ? u = n.find((f) =>
|
393
|
+
if (i.none ? u = n.find((f) => Pa.has(f)) : u = n.find((f) => f == c), !u) {
|
394
394
|
let f = l.name || a;
|
395
395
|
throw new TypeError(`${c ?? i.raw} not allowed for ${f} in ${e}()`);
|
396
396
|
}
|
@@ -400,12 +400,12 @@ function lr(r, o, e, t) {
|
|
400
400
|
return h && d && (t[s] = Le(h, d, t[s])), u;
|
401
401
|
});
|
402
402
|
}
|
403
|
-
function
|
403
|
+
function kt(r, { meta: o } = {}) {
|
404
404
|
var e, t, a, l;
|
405
405
|
let s = { str: (e = String(r)) == null ? void 0 : e.trim() };
|
406
406
|
if (po.run("parse-start", s), s.color)
|
407
407
|
return s.color;
|
408
|
-
if (s.parsed =
|
408
|
+
if (s.parsed = zt(s.str), s.parsed) {
|
409
409
|
let n = s.parsed.name;
|
410
410
|
if (n === "color") {
|
411
411
|
let i = s.parsed.args.shift(), c = i.startsWith("--") ? i.substring(2) : `--${i}`, u = [i, c], h = s.parsed.rawArgs.indexOf("/") > 0 ? s.parsed.args.pop() : 1;
|
@@ -414,7 +414,7 @@ function Mt(r, { meta: o } = {}) {
|
|
414
414
|
if (p && (u.includes(p.id) || (t = p.ids) != null && t.filter((z) => u.includes(z)).length)) {
|
415
415
|
const z = Object.keys(b.coords).map((y, C) => s.parsed.args[C] || 0);
|
416
416
|
let w;
|
417
|
-
return p.coordGrammar && (w =
|
417
|
+
return p.coordGrammar && (w = ar(b, p, "color", z)), o && Object.assign(o, { formatId: "color", types: w }), p.id.startsWith("--") && !i.startsWith("--") && G.warn(`${b.name} is a non-standard space and not currently supported in the CSS spec. Use prefixed color(${p.id}) instead of color(${i}).`), i.startsWith("--") && !p.id.startsWith("--") && G.warn(`${b.name} is a standard space and supported in the CSS spec. Use color(${p.id}) instead of prefixed color(${i}).`), { spaceId: b.id, coords: z, alpha: h };
|
418
418
|
}
|
419
419
|
}
|
420
420
|
let d = "", f = i in g.registry ? i : c;
|
@@ -428,9 +428,9 @@ function Mt(r, { meta: o } = {}) {
|
|
428
428
|
let c = i.getFormat(n);
|
429
429
|
if (c && c.type === "function") {
|
430
430
|
let u = 1;
|
431
|
-
(c.lastAlpha ||
|
431
|
+
(c.lastAlpha || vt(s.parsed.args).alpha) && (u = s.parsed.args.pop());
|
432
432
|
let h = s.parsed.args, d;
|
433
|
-
return c.coordGrammar && (d =
|
433
|
+
return c.coordGrammar && (d = ar(i, c, n, h)), o && Object.assign(o, { formatId: c.name, types: d }), {
|
434
434
|
spaceId: i.id,
|
435
435
|
coords: h,
|
436
436
|
alpha: u
|
@@ -454,14 +454,14 @@ function v(r) {
|
|
454
454
|
return r.map(v);
|
455
455
|
if (!r)
|
456
456
|
throw new TypeError("Empty color reference");
|
457
|
-
Do(r) && (r =
|
457
|
+
Do(r) && (r = kt(r));
|
458
458
|
let o = r.space || r.spaceId;
|
459
459
|
return o instanceof g || (r.space = g.get(o)), r.alpha === void 0 && (r.alpha = 1), r;
|
460
460
|
}
|
461
|
-
const
|
461
|
+
const Ha = 75e-6, Ee = class oo {
|
462
462
|
constructor(o) {
|
463
463
|
var e;
|
464
|
-
this.id = o.id, this.name = o.name, this.base = o.base ?
|
464
|
+
this.id = o.id, this.name = o.name, this.base = o.base ? oo.get(o.base) : null, this.aliases = o.aliases, this.base && (this.fromBase = o.fromBase, this.toBase = o.toBase);
|
465
465
|
let t = o.coords ?? this.base.coords;
|
466
466
|
for (let l in t)
|
467
467
|
"name" in t[l] || (t[l].name = l);
|
@@ -475,14 +475,14 @@ const Na = 75e-6, Ee = class eo {
|
|
475
475
|
(e = this.formats.color) != null && e.id || (this.formats.color = {
|
476
476
|
...this.formats.color ?? {},
|
477
477
|
id: o.cssId || this.id
|
478
|
-
}), o.gamutSpace ? this.gamutSpace = o.gamutSpace === "self" ? this :
|
479
|
-
value:
|
478
|
+
}), o.gamutSpace ? this.gamutSpace = o.gamutSpace === "self" ? this : oo.get(o.gamutSpace) : this.isPolar ? this.gamutSpace = this.base : this.gamutSpace = this, this.gamutSpace.isUnbounded && (this.inGamut = (l, s) => !0), this.referred = o.referred, Object.defineProperty(this, "path", {
|
479
|
+
value: Na(this).reverse(),
|
480
480
|
writable: !1,
|
481
481
|
enumerable: !0,
|
482
482
|
configurable: !0
|
483
483
|
}), po.run("colorspace-init-end", this);
|
484
484
|
}
|
485
|
-
inGamut(o, { epsilon: e =
|
485
|
+
inGamut(o, { epsilon: e = Ha } = {}) {
|
486
486
|
if (!this.equals(this.gamutSpace))
|
487
487
|
return o = this.to(this.gamutSpace, o), this.gamutSpace.inGamut(o, { epsilon: e });
|
488
488
|
let t = Object.values(this.coords);
|
@@ -512,9 +512,9 @@ const Na = 75e-6, Ee = class eo {
|
|
512
512
|
}
|
513
513
|
getFormat(o) {
|
514
514
|
if (typeof o == "object")
|
515
|
-
return o =
|
515
|
+
return o = lr(o, this), o;
|
516
516
|
let e;
|
517
|
-
return o === "default" ? e = Object.values(this.formats)[0] : e = this.formats[o], e ? (e =
|
517
|
+
return o === "default" ? e = Object.values(this.formats)[0] : e = this.formats[o], e ? (e = lr(e, this), e) : null;
|
518
518
|
}
|
519
519
|
/**
|
520
520
|
* Check if this color space is the same as another color space reference.
|
@@ -530,7 +530,7 @@ const Na = 75e-6, Ee = class eo {
|
|
530
530
|
const n = v(o);
|
531
531
|
[o, e] = [n.space, n.coords];
|
532
532
|
}
|
533
|
-
if (o =
|
533
|
+
if (o = oo.get(o), this.equals(o))
|
534
534
|
return e;
|
535
535
|
e = e.map((n) => Number.isNaN(n) ? 0 : n);
|
536
536
|
let t = this.path, a = o.path, l, s;
|
@@ -549,7 +549,7 @@ const Na = 75e-6, Ee = class eo {
|
|
549
549
|
const t = v(o);
|
550
550
|
[o, e] = [t.space, t.coords];
|
551
551
|
}
|
552
|
-
return o =
|
552
|
+
return o = oo.get(o), o.to(this, e);
|
553
553
|
}
|
554
554
|
toString() {
|
555
555
|
return `${this.name} (${this.id})`;
|
@@ -564,7 +564,7 @@ const Na = 75e-6, Ee = class eo {
|
|
564
564
|
}
|
565
565
|
// Returns array of unique color spaces
|
566
566
|
static get all() {
|
567
|
-
return [...new Set(Object.values(
|
567
|
+
return [...new Set(Object.values(oo.registry))];
|
568
568
|
}
|
569
569
|
static register(o, e) {
|
570
570
|
if (arguments.length === 1 && (e = arguments[0], o = e.id), e = this.get(e), this.registry[o] && this.registry[o] !== e)
|
@@ -579,16 +579,16 @@ const Na = 75e-6, Ee = class eo {
|
|
579
579
|
* @param {ColorSpace | string} name
|
580
580
|
*/
|
581
581
|
static get(o, ...e) {
|
582
|
-
if (!o || o instanceof
|
582
|
+
if (!o || o instanceof oo)
|
583
583
|
return o;
|
584
584
|
if (ho(o) === "string") {
|
585
|
-
let t =
|
585
|
+
let t = oo.registry[o.toLowerCase()];
|
586
586
|
if (!t)
|
587
587
|
throw new TypeError(`No color space found with id = "${o}"`);
|
588
588
|
return t;
|
589
589
|
}
|
590
590
|
if (e.length)
|
591
|
-
return
|
591
|
+
return oo.get(...e);
|
592
592
|
throw new TypeError(`${o} is not a valid color space`);
|
593
593
|
}
|
594
594
|
/**
|
@@ -602,14 +602,14 @@ const Na = 75e-6, Ee = class eo {
|
|
602
602
|
static resolveCoord(o, e) {
|
603
603
|
var t;
|
604
604
|
let a = ho(o), l, s;
|
605
|
-
if (a === "string" ? o.includes(".") ? [l, s] = o.split(".") : [l, s] = [, o] : Array.isArray(o) ? [l, s] = o : (l = o.space, s = o.coordId), l =
|
605
|
+
if (a === "string" ? o.includes(".") ? [l, s] = o.split(".") : [l, s] = [, o] : Array.isArray(o) ? [l, s] = o : (l = o.space, s = o.coordId), l = oo.get(l), l || (l = e), !l)
|
606
606
|
throw new TypeError(`Cannot resolve coordinate reference ${o}: No color space specified and relative references are not allowed here`);
|
607
607
|
if (a = ho(s), a === "number" || a === "string" && s >= 0) {
|
608
608
|
let c = Object.entries(l.coords)[s];
|
609
609
|
if (c)
|
610
610
|
return { space: l, id: c[0], index: s, ...c[1] };
|
611
611
|
}
|
612
|
-
l =
|
612
|
+
l = oo.get(l);
|
613
613
|
let n = s.toLowerCase(), i = 0;
|
614
614
|
for (let c in l.coords) {
|
615
615
|
let u = l.coords[c];
|
@@ -620,20 +620,20 @@ const Na = 75e-6, Ee = class eo {
|
|
620
620
|
throw new TypeError(`No "${s}" coordinate found in ${l.name}. Its coordinates are: ${Object.keys(l.coords).join(", ")}`);
|
621
621
|
}
|
622
622
|
};
|
623
|
-
|
623
|
+
or(Ee, "registry", {}), or(Ee, "DEFAULT_FORMAT", {
|
624
624
|
type: "functions",
|
625
625
|
name: "color"
|
626
626
|
});
|
627
627
|
let g = Ee;
|
628
|
-
function
|
628
|
+
function Na(r) {
|
629
629
|
let o = [r];
|
630
630
|
for (let e = r; e = e.base; )
|
631
631
|
o.push(e);
|
632
632
|
return o;
|
633
633
|
}
|
634
|
-
function
|
634
|
+
function lr(r, { coords: o } = {}) {
|
635
635
|
if (r.coords && !r.coordGrammar) {
|
636
|
-
r.type || (r.type = "function"), r.name || (r.name = "color"), r.coordGrammar =
|
636
|
+
r.type || (r.type = "function"), r.name || (r.name = "color"), r.coordGrammar = yt(r.coords);
|
637
637
|
let e = Object.entries(o).map(([t, a], l) => {
|
638
638
|
let s = r.coordGrammar[l][0], n = a.range || a.refRange, i = s.range, c = "";
|
639
639
|
return s == "<percentage>" ? (i = [0, 100], c = "%") : s == "<angle>" && (c = "deg"), { fromRange: n, toRange: i, suffix: c };
|
@@ -724,7 +724,7 @@ var Te = new g({
|
|
724
724
|
fromBase: (r) => le(B.white, "D50", r),
|
725
725
|
toBase: (r) => le("D50", B.white, r)
|
726
726
|
});
|
727
|
-
const
|
727
|
+
const Ba = 216 / 24389, sr = 24 / 116, Uo = 24389 / 27;
|
728
728
|
let ge = j.D50;
|
729
729
|
var Y = new g({
|
730
730
|
id: "lab",
|
@@ -748,7 +748,7 @@ var Y = new g({
|
|
748
748
|
// Convert D50-adapted XYX to Lab
|
749
749
|
// CIE 15.3:2004 section 8.2.1.1
|
750
750
|
fromBase(r) {
|
751
|
-
let o = r.map((e, t) => e / ge[t]).map((e) => e >
|
751
|
+
let o = r.map((e, t) => e / ge[t]).map((e) => e > Ba ? Math.cbrt(e) : (Uo * e + 16) / 116);
|
752
752
|
return [
|
753
753
|
116 * o[1] - 16,
|
754
754
|
// L
|
@@ -764,9 +764,9 @@ var Y = new g({
|
|
764
764
|
toBase(r) {
|
765
765
|
let o = [];
|
766
766
|
return o[1] = (r[0] + 16) / 116, o[0] = r[1] / 500 + o[1], o[2] = o[1] - r[2] / 200, [
|
767
|
-
o[0] >
|
767
|
+
o[0] > sr ? Math.pow(o[0], 3) : (116 * o[0] - 16) / Uo,
|
768
768
|
r[0] > 8 ? Math.pow((r[0] + 16) / 116, 3) : r[0] / Uo,
|
769
|
-
o[2] >
|
769
|
+
o[2] > sr ? Math.pow(o[2], 3) : (116 * o[2] - 16) / Uo
|
770
770
|
].map((e, t) => e * ge[t]);
|
771
771
|
},
|
772
772
|
formats: {
|
@@ -832,39 +832,39 @@ var Fo = new g({
|
|
832
832
|
}
|
833
833
|
}
|
834
834
|
});
|
835
|
-
const
|
836
|
-
function
|
835
|
+
const nr = 25 ** 7, se = Math.PI, ir = 180 / se, Co = se / 180;
|
836
|
+
function cr(r) {
|
837
837
|
const o = r * r;
|
838
838
|
return o * o * o * r;
|
839
839
|
}
|
840
|
-
function
|
840
|
+
function Mt(r, o, { kL: e = 1, kC: t = 1, kH: a = 1 } = {}) {
|
841
841
|
[r, o] = v([r, o]);
|
842
842
|
let [l, s, n] = Y.from(r), i = Fo.from(Y, [l, s, n])[1], [c, u, h] = Y.from(o), d = Fo.from(Y, [c, u, h])[1];
|
843
843
|
i < 0 && (i = 0), d < 0 && (d = 0);
|
844
|
-
let f = (i + d) / 2, b =
|
845
|
-
x < 0 && (x += 2 * se), k < 0 && (k += 2 * se), x *=
|
846
|
-
let S = c - l, F = C - y, E = k - x, Po = x + k,
|
847
|
-
y * C === 0 ? Ho = 0 :
|
848
|
-
let
|
849
|
-
y * C === 0 ? so = Po :
|
850
|
-
let
|
844
|
+
let f = (i + d) / 2, b = cr(f), p = 0.5 * (1 - Math.sqrt(b / (b + nr))), z = (1 + p) * s, w = (1 + p) * u, y = Math.sqrt(z ** 2 + n ** 2), C = Math.sqrt(w ** 2 + h ** 2), x = z === 0 && n === 0 ? 0 : Math.atan2(n, z), k = w === 0 && h === 0 ? 0 : Math.atan2(h, w);
|
845
|
+
x < 0 && (x += 2 * se), k < 0 && (k += 2 * se), x *= ir, k *= ir;
|
846
|
+
let S = c - l, F = C - y, E = k - x, Po = x + k, Ye = Math.abs(E), Ho;
|
847
|
+
y * C === 0 ? Ho = 0 : Ye <= 180 ? Ho = E : E > 180 ? Ho = E - 360 : E < -180 ? Ho = E + 360 : G.warn("the unthinkable has happened");
|
848
|
+
let Ge = 2 * Math.sqrt(C * y) * Math.sin(Ho * Co / 2), la = (l + c) / 2, pe = (y + C) / 2, Ze = cr(pe), so;
|
849
|
+
y * C === 0 ? so = Po : Ye <= 180 ? so = Po / 2 : Po < 360 ? so = (Po + 360) / 2 : so = (Po - 360) / 2;
|
850
|
+
let Ke = (la - 50) ** 2, sa = 1 + 0.015 * Ke / Math.sqrt(20 + Ke), Ve = 1 + 0.045 * pe, No = 1;
|
851
851
|
No -= 0.17 * Math.cos((so - 30) * Co), No += 0.24 * Math.cos(2 * so * Co), No += 0.32 * Math.cos((3 * so + 6) * Co), No -= 0.2 * Math.cos((4 * so - 63) * Co);
|
852
|
-
let
|
853
|
-
return Wo += (F / (t *
|
852
|
+
let Je = 1 + 0.015 * pe * No, na = 30 * Math.exp(-1 * ((so - 275) / 25) ** 2), ia = 2 * Math.sqrt(Ze / (Ze + nr)), ca = -1 * Math.sin(2 * na * Co) * ia, Wo = (S / (e * sa)) ** 2;
|
853
|
+
return Wo += (F / (t * Ve)) ** 2, Wo += (Ge / (a * Je)) ** 2, Wo += ca * (F / (t * Ve)) * (Ge / (a * Je)), Math.sqrt(Wo);
|
854
854
|
}
|
855
|
-
const
|
855
|
+
const Oa = [
|
856
856
|
[0.819022437996703, 0.3619062600528904, -0.1288737815209879],
|
857
857
|
[0.0329836539323885, 0.9292868615863434, 0.0361446663506424],
|
858
858
|
[0.0481771893596242, 0.2642395317527308, 0.6335478284694309]
|
859
|
-
],
|
859
|
+
], Fa = [
|
860
860
|
[1.2268798758459243, -0.5578149944602171, 0.2813910456659647],
|
861
861
|
[-0.0405757452148008, 1.112286803280317, -0.0717110580655164],
|
862
862
|
[-0.0763729366746601, -0.4214933324022432, 1.5869240198367816]
|
863
|
-
],
|
863
|
+
], La = [
|
864
864
|
[0.210454268309314, 0.7936177747023054, -0.0040720430116193],
|
865
865
|
[1.9779985324311684, -2.42859224204858, 0.450593709617411],
|
866
866
|
[0.0259040424655478, 0.7827717124575296, -0.8086757549230774]
|
867
|
-
],
|
867
|
+
], ja = [
|
868
868
|
[1, 0.3963377773761749, 0.2158037573099136],
|
869
869
|
[1, -0.1055613458156586, -0.0638541728258133],
|
870
870
|
[1, -0.0894841775298119, -1.2914855480194092]
|
@@ -888,12 +888,12 @@ var So = new g({
|
|
888
888
|
white: "D65",
|
889
889
|
base: B,
|
890
890
|
fromBase(r) {
|
891
|
-
let o = $(
|
892
|
-
return $(
|
891
|
+
let o = $(Oa, r).map((e) => Math.cbrt(e));
|
892
|
+
return $(La, o);
|
893
893
|
},
|
894
894
|
toBase(r) {
|
895
|
-
let o = $(
|
896
|
-
return $(
|
895
|
+
let o = $(ja, r).map((e) => e ** 3);
|
896
|
+
return $(Fa, o);
|
897
897
|
},
|
898
898
|
formats: {
|
899
899
|
oklab: {
|
@@ -906,8 +906,8 @@ function Ae(r, o) {
|
|
906
906
|
let [e, t, a] = So.from(r), [l, s, n] = So.from(o), i = e - l, c = t - s, u = a - n;
|
907
907
|
return Math.sqrt(i ** 2 + c ** 2 + u ** 2);
|
908
908
|
}
|
909
|
-
const
|
910
|
-
function yo(r, o, { epsilon: e =
|
909
|
+
const Da = 75e-6;
|
910
|
+
function yo(r, o, { epsilon: e = Da } = {}) {
|
911
911
|
r = v(r), o || (o = r.space), o = g.get(o);
|
912
912
|
let t = r.coords;
|
913
913
|
return o !== r.space && (t = o.from(r)), o.inGamut(t, { epsilon: e });
|
@@ -919,7 +919,7 @@ function _o(r) {
|
|
919
919
|
alpha: r.alpha
|
920
920
|
};
|
921
921
|
}
|
922
|
-
function
|
922
|
+
function $t(r, o, e = "lab") {
|
923
923
|
e = g.get(e);
|
924
924
|
let t = e.from(r), a = e.from(o);
|
925
925
|
return Math.sqrt(t.reduce((l, s, n) => {
|
@@ -927,22 +927,22 @@ function St(r, o, e = "lab") {
|
|
927
927
|
return isNaN(s) || isNaN(i) ? l : l + (i - s) ** 2;
|
928
928
|
}, 0));
|
929
929
|
}
|
930
|
-
function
|
931
|
-
return
|
930
|
+
function Ta(r, o) {
|
931
|
+
return $t(r, o, "lab");
|
932
932
|
}
|
933
|
-
const
|
934
|
-
function
|
933
|
+
const qa = Math.PI, ur = qa / 180;
|
934
|
+
function Wa(r, o, { l: e = 2, c: t = 1 } = {}) {
|
935
935
|
[r, o] = v([r, o]);
|
936
936
|
let [a, l, s] = Y.from(r), [, n, i] = Fo.from(Y, [a, l, s]), [c, u, h] = Y.from(o), d = Fo.from(Y, [c, u, h])[1];
|
937
937
|
n < 0 && (n = 0), d < 0 && (d = 0);
|
938
938
|
let f = a - c, b = n - d, p = l - u, z = s - h, w = p ** 2 + z ** 2 - b ** 2, y = 0.511;
|
939
939
|
a >= 16 && (y = 0.040975 * a / (1 + 0.01765 * a));
|
940
940
|
let C = 0.0638 * n / (1 + 0.0131 * n) + 0.638, x;
|
941
|
-
Number.isNaN(i) && (i = 0), i >= 164 && i <= 345 ? x = 0.56 + Math.abs(0.2 * Math.cos((i + 168) *
|
941
|
+
Number.isNaN(i) && (i = 0), i >= 164 && i <= 345 ? x = 0.56 + Math.abs(0.2 * Math.cos((i + 168) * ur)) : x = 0.36 + Math.abs(0.4 * Math.cos((i + 35) * ur));
|
942
942
|
let k = Math.pow(n, 4), S = Math.sqrt(k / (k + 1900)), F = C * (S * x + 1 - S), E = (f / (e * y)) ** 2;
|
943
943
|
return E += (b / (t * C)) ** 2, E += w / F ** 2, Math.sqrt(E);
|
944
944
|
}
|
945
|
-
const
|
945
|
+
const hr = 203;
|
946
946
|
var qe = new g({
|
947
947
|
// Absolute CIE XYZ, with a D65 whitepoint,
|
948
948
|
// as used in most HDR colorspaces as a starting point.
|
@@ -967,30 +967,30 @@ var qe = new g({
|
|
967
967
|
},
|
968
968
|
base: B,
|
969
969
|
fromBase(r) {
|
970
|
-
return r.map((o) => Math.max(o *
|
970
|
+
return r.map((o) => Math.max(o * hr, 0));
|
971
971
|
},
|
972
972
|
toBase(r) {
|
973
|
-
return r.map((o) => Math.max(o /
|
973
|
+
return r.map((o) => Math.max(o / hr, 0));
|
974
974
|
}
|
975
975
|
});
|
976
|
-
const Xo = 1.15, Yo = 0.66,
|
976
|
+
const Xo = 1.15, Yo = 0.66, dr = 2610 / 2 ** 14, Ua = 2 ** 14 / 2610, mr = 3424 / 2 ** 12, pr = 2413 / 2 ** 7, gr = 2392 / 2 ** 7, Xa = 1.7 * 2523 / 2 ** 5, fr = 2 ** 5 / (1.7 * 2523), Go = -0.56, fe = 16295499532821565e-27, Ya = [
|
977
977
|
[0.41478972, 0.579999, 0.014648],
|
978
978
|
[-0.20151, 1.120649, 0.0531008],
|
979
979
|
[-0.0166008, 0.2648, 0.6684799]
|
980
|
-
],
|
980
|
+
], Ga = [
|
981
981
|
[1.9242264357876067, -1.0047923125953657, 0.037651404030618],
|
982
982
|
[0.35031676209499907, 0.7264811939316552, -0.06538442294808501],
|
983
983
|
[-0.09098281098284752, -0.3127282905230739, 1.5227665613052603]
|
984
|
-
],
|
984
|
+
], Za = [
|
985
985
|
[0.5, 0.5, 0],
|
986
986
|
[3.524, -4.066708, 0.542708],
|
987
987
|
[0.199076, 1.096799, -1.295875]
|
988
|
-
],
|
988
|
+
], Ka = [
|
989
989
|
[1, 0.1386050432715393, 0.05804731615611886],
|
990
990
|
[0.9999999999999999, -0.1386050432715393, -0.05804731615611886],
|
991
991
|
[0.9999999999999998, -0.09601924202631895, -0.8118918960560388]
|
992
992
|
];
|
993
|
-
var
|
993
|
+
var St = new g({
|
994
994
|
id: "jzazbz",
|
995
995
|
name: "Jzazbz",
|
996
996
|
coords: {
|
@@ -1007,17 +1007,17 @@ var _t = new g({
|
|
1007
1007
|
},
|
1008
1008
|
base: qe,
|
1009
1009
|
fromBase(r) {
|
1010
|
-
let [o, e, t] = r, a = Xo * o - (Xo - 1) * t, l = Yo * e - (Yo - 1) * o, s = $(
|
1011
|
-
let h =
|
1012
|
-
return (h / d) **
|
1013
|
-
}), [n, i, c] = $(
|
1010
|
+
let [o, e, t] = r, a = Xo * o - (Xo - 1) * t, l = Yo * e - (Yo - 1) * o, s = $(Ya, [a, l, t]).map(function(u) {
|
1011
|
+
let h = mr + pr * (u / 1e4) ** dr, d = 1 + gr * (u / 1e4) ** dr;
|
1012
|
+
return (h / d) ** Xa;
|
1013
|
+
}), [n, i, c] = $(Za, s);
|
1014
1014
|
return [(1 + Go) * n / (1 + Go * n) - fe, i, c];
|
1015
1015
|
},
|
1016
1016
|
toBase(r) {
|
1017
|
-
let [o, e, t] = r, a = (o + fe) / (1 + Go - Go * (o + fe)), l = $(
|
1018
|
-
let d =
|
1019
|
-
return 1e4 * (d / f) **
|
1020
|
-
}), [s, n, i] = $(
|
1017
|
+
let [o, e, t] = r, a = (o + fe) / (1 + Go - Go * (o + fe)), l = $(Ka, [a, e, t]).map(function(h) {
|
1018
|
+
let d = mr - h ** fr, f = gr * h ** fr - pr;
|
1019
|
+
return 1e4 * (d / f) ** Ua;
|
1020
|
+
}), [s, n, i] = $(Ga, l), c = (s + (Xo - 1) * i) / Xo, u = (n + (Yo - 1) * c) / Yo;
|
1021
1021
|
return [c, u, i];
|
1022
1022
|
},
|
1023
1023
|
formats: {
|
@@ -1044,7 +1044,7 @@ var _t = new g({
|
|
1044
1044
|
name: "Hue"
|
1045
1045
|
}
|
1046
1046
|
},
|
1047
|
-
base:
|
1047
|
+
base: St,
|
1048
1048
|
fromBase(r) {
|
1049
1049
|
let [o, e, t] = r, a;
|
1050
1050
|
const l = 2e-4;
|
@@ -1068,26 +1068,26 @@ var _t = new g({
|
|
1068
1068
|
];
|
1069
1069
|
}
|
1070
1070
|
});
|
1071
|
-
function
|
1071
|
+
function Va(r, o) {
|
1072
1072
|
[r, o] = v([r, o]);
|
1073
1073
|
let [e, t, a] = Re.from(r), [l, s, n] = Re.from(o), i = e - l, c = t - s;
|
1074
1074
|
Number.isNaN(a) && Number.isNaN(n) ? (a = 0, n = 0) : Number.isNaN(a) ? a = n : Number.isNaN(n) && (n = a);
|
1075
1075
|
let u = a - n, h = 2 * Math.sqrt(t * s) * Math.sin(u / 2 * (Math.PI / 180));
|
1076
1076
|
return Math.sqrt(i ** 2 + c ** 2 + h ** 2);
|
1077
1077
|
}
|
1078
|
-
const
|
1078
|
+
const _t = 3424 / 4096, Et = 2413 / 128, At = 2392 / 128, br = 2610 / 16384, Ja = 2523 / 32, Qa = 16384 / 2610, zr = 32 / 2523, ol = [
|
1079
1079
|
[0.3592832590121217, 0.6976051147779502, -0.035891593232029],
|
1080
1080
|
[-0.1920808463704993, 1.100476797037432, 0.0753748658519118],
|
1081
1081
|
[0.0070797844607479, 0.0748396662186362, 0.8433265453898765]
|
1082
|
-
],
|
1082
|
+
], el = [
|
1083
1083
|
[2048 / 4096, 2048 / 4096, 0],
|
1084
1084
|
[6610 / 4096, -13613 / 4096, 7003 / 4096],
|
1085
1085
|
[17933 / 4096, -17390 / 4096, -543 / 4096]
|
1086
|
-
],
|
1086
|
+
], rl = [
|
1087
1087
|
[0.9999999999999998, 0.0086090370379328, 0.111029625003026],
|
1088
1088
|
[0.9999999999999998, -0.0086090370379328, -0.1110296250030259],
|
1089
1089
|
[0.9999999999999998, 0.5600313357106791, -0.3206271749873188]
|
1090
|
-
],
|
1090
|
+
], tl = [
|
1091
1091
|
[2.0701522183894223, -1.3263473389671563, 0.2066510476294053],
|
1092
1092
|
[0.3647385209748072, 0.6805660249472273, -0.0453045459220347],
|
1093
1093
|
[-0.0497472075358123, -0.0492609666966131, 1.1880659249923042]
|
@@ -1122,45 +1122,45 @@ var Pe = new g({
|
|
1122
1122
|
},
|
1123
1123
|
base: qe,
|
1124
1124
|
fromBase(r) {
|
1125
|
-
let o = $(
|
1126
|
-
return
|
1125
|
+
let o = $(ol, r);
|
1126
|
+
return al(o);
|
1127
1127
|
},
|
1128
1128
|
toBase(r) {
|
1129
|
-
let o =
|
1130
|
-
return $(
|
1129
|
+
let o = ll(r);
|
1130
|
+
return $(tl, o);
|
1131
1131
|
}
|
1132
1132
|
});
|
1133
|
-
function
|
1133
|
+
function al(r) {
|
1134
1134
|
let o = r.map(function(e) {
|
1135
|
-
let t =
|
1136
|
-
return (t / a) **
|
1135
|
+
let t = _t + Et * (e / 1e4) ** br, a = 1 + At * (e / 1e4) ** br;
|
1136
|
+
return (t / a) ** Ja;
|
1137
1137
|
});
|
1138
|
-
return $(
|
1138
|
+
return $(el, o);
|
1139
1139
|
}
|
1140
|
-
function
|
1141
|
-
return $(
|
1142
|
-
let e = Math.max(o **
|
1143
|
-
return 1e4 * (e / t) **
|
1140
|
+
function ll(r) {
|
1141
|
+
return $(rl, r).map(function(o) {
|
1142
|
+
let e = Math.max(o ** zr - _t, 0), t = Et - At * o ** zr;
|
1143
|
+
return 1e4 * (e / t) ** Qa;
|
1144
1144
|
});
|
1145
1145
|
}
|
1146
|
-
function
|
1146
|
+
function sl(r, o) {
|
1147
1147
|
[r, o] = v([r, o]);
|
1148
1148
|
let [e, t, a] = Pe.from(r), [l, s, n] = Pe.from(o);
|
1149
1149
|
return 720 * Math.sqrt((e - l) ** 2 + 0.25 * (t - s) ** 2 + (a - n) ** 2);
|
1150
1150
|
}
|
1151
|
-
const
|
1151
|
+
const nl = j.D65, Rt = 0.42, vr = 1 / Rt, be = 2 * Math.PI, Pt = [
|
1152
1152
|
[0.401288, 0.650173, -0.051461],
|
1153
1153
|
[-0.250268, 1.204414, 0.045854],
|
1154
1154
|
[-2079e-6, 0.048952, 0.953127]
|
1155
|
-
],
|
1155
|
+
], il = [
|
1156
1156
|
[1.8620678550872327, -1.0112546305316843, 0.14918677544445175],
|
1157
1157
|
[0.38752654323613717, 0.6214474419314753, -0.008973985167612518],
|
1158
1158
|
[-0.015841498849333856, -0.03412293802851557, 1.0499644368778496]
|
1159
|
-
],
|
1159
|
+
], cl = [
|
1160
1160
|
[460, 451, 288],
|
1161
1161
|
[460, -891, -261],
|
1162
1162
|
[460, -220, -6300]
|
1163
|
-
],
|
1163
|
+
], ul = {
|
1164
1164
|
dark: [0.8, 0.525, 0.8],
|
1165
1165
|
dim: [0.9, 0.59, 0.9],
|
1166
1166
|
average: [1, 0.69, 1]
|
@@ -1169,27 +1169,27 @@ const il = j.D65, Pt = 0.42, wr = 1 / Pt, be = 2 * Math.PI, Ht = [
|
|
1169
1169
|
h: [20.14, 90, 164.25, 237.53, 380.14],
|
1170
1170
|
e: [0.8, 0.7, 1, 1.2, 0.8],
|
1171
1171
|
H: [0, 100, 200, 300, 400]
|
1172
|
-
},
|
1173
|
-
function
|
1172
|
+
}, hl = 180 / Math.PI, wr = Math.PI / 180;
|
1173
|
+
function Ht(r, o) {
|
1174
1174
|
return r.map((e) => {
|
1175
|
-
const t = to(o * Math.abs(e) * 0.01,
|
1175
|
+
const t = to(o * Math.abs(e) * 0.01, Rt);
|
1176
1176
|
return 400 * ue(t, e) / (t + 27.13);
|
1177
1177
|
});
|
1178
1178
|
}
|
1179
|
-
function
|
1180
|
-
const e = 100 / o * 27.13 **
|
1179
|
+
function dl(r, o) {
|
1180
|
+
const e = 100 / o * 27.13 ** vr;
|
1181
1181
|
return r.map((t) => {
|
1182
1182
|
const a = Math.abs(t);
|
1183
|
-
return ue(e * to(a / (400 - a),
|
1183
|
+
return ue(e * to(a / (400 - a), vr), t);
|
1184
1184
|
});
|
1185
1185
|
}
|
1186
|
-
function
|
1186
|
+
function ml(r) {
|
1187
1187
|
let o = ao(r);
|
1188
1188
|
o <= zo.h[0] && (o += 360);
|
1189
|
-
const e =
|
1189
|
+
const e = Ct(zo.h, o) - 1, [t, a] = zo.h.slice(e, e + 2), [l, s] = zo.e.slice(e, e + 2), n = zo.H[e], i = (o - t) / l;
|
1190
1190
|
return n + 100 * i / (i + (a - o) / s);
|
1191
1191
|
}
|
1192
|
-
function
|
1192
|
+
function pl(r) {
|
1193
1193
|
let o = (r % 400 + 400) % 400;
|
1194
1194
|
const e = Math.floor(0.01 * o);
|
1195
1195
|
o = o % 100;
|
@@ -1198,13 +1198,13 @@ function gl(r) {
|
|
1198
1198
|
(o * (s * t - l * a) - 100 * t * s) / (o * (s - l) - 100 * s)
|
1199
1199
|
);
|
1200
1200
|
}
|
1201
|
-
function
|
1201
|
+
function Nt(r, o, e, t, a) {
|
1202
1202
|
const l = {};
|
1203
1203
|
l.discounting = a, l.refWhite = r, l.surround = t;
|
1204
1204
|
const s = r.map((b) => b * 100);
|
1205
1205
|
l.la = o, l.yb = e;
|
1206
|
-
const n = s[1], i = $(
|
1207
|
-
t =
|
1206
|
+
const n = s[1], i = $(Pt, s);
|
1207
|
+
t = ul[l.surround];
|
1208
1208
|
const c = t[0];
|
1209
1209
|
l.c = t[1], l.nc = t[2];
|
1210
1210
|
const u = (1 / (5 * l.la + 1)) ** 4;
|
@@ -1213,12 +1213,12 @@ function Bt(r, o, e, t, a) {
|
|
1213
1213
|
Math.min(c * (1 - 1 / 3.6 * Math.exp((-l.la - 42) / 92)), 1),
|
1214
1214
|
0
|
1215
1215
|
);
|
1216
|
-
l.dRgb = i.map((b) =>
|
1217
|
-
const d = i.map((b, p) => b * l.dRgb[p]), f =
|
1216
|
+
l.dRgb = i.map((b) => Oo(1, n / b, h)), l.dRgbInv = l.dRgb.map((b) => 1 / b);
|
1217
|
+
const d = i.map((b, p) => b * l.dRgb[p]), f = Ht(d, l.fl);
|
1218
1218
|
return l.aW = l.nbb * (2 * f[0] + f[1] + 0.05 * f[2]), l;
|
1219
1219
|
}
|
1220
|
-
const
|
1221
|
-
|
1220
|
+
const yr = Nt(
|
1221
|
+
nl,
|
1222
1222
|
64 / Math.PI * 0.2,
|
1223
1223
|
20,
|
1224
1224
|
"average",
|
@@ -1234,7 +1234,7 @@ function He(r, o) {
|
|
1234
1234
|
if (r.J === 0 || r.Q === 0)
|
1235
1235
|
return [0, 0, 0];
|
1236
1236
|
let e = 0;
|
1237
|
-
r.h !== void 0 ? e = ao(r.h) *
|
1237
|
+
r.h !== void 0 ? e = ao(r.h) * wr : e = pl(r.H) * wr;
|
1238
1238
|
const t = Math.cos(e), a = Math.sin(e);
|
1239
1239
|
let l = 0;
|
1240
1240
|
r.J !== void 0 ? l = to(r.J, 1 / 2) * 0.1 : r.Q !== void 0 && (l = 0.25 * o.c * r.Q / ((o.aW + 4) * o.flRoot));
|
@@ -1243,26 +1243,26 @@ function He(r, o) {
|
|
1243
1243
|
const n = to(
|
1244
1244
|
s * Math.pow(1.64 - Math.pow(0.29, o.n), -0.73),
|
1245
1245
|
10 / 9
|
1246
|
-
), i = 0.25 * (Math.cos(e + 2) + 3.8), c = o.aW * to(l, 2 / o.c / o.z), u = 5e4 / 13 * o.nc * o.ncb * i, h = c / o.nbb, d = 23 * (h + 0.305) * je(n, 23 * u + n * (11 * t + 108 * a)), f = d * t, b = d * a, p =
|
1247
|
-
$(
|
1246
|
+
), i = 0.25 * (Math.cos(e + 2) + 3.8), c = o.aW * to(l, 2 / o.c / o.z), u = 5e4 / 13 * o.nc * o.ncb * i, h = c / o.nbb, d = 23 * (h + 0.305) * je(n, 23 * u + n * (11 * t + 108 * a)), f = d * t, b = d * a, p = dl(
|
1247
|
+
$(cl, [h, f, b]).map((z) => z * 1 / 1403),
|
1248
1248
|
o.fl
|
1249
1249
|
);
|
1250
1250
|
return $(
|
1251
|
-
|
1251
|
+
il,
|
1252
1252
|
p.map((z, w) => z * o.dRgbInv[w])
|
1253
1253
|
).map((z) => z / 100);
|
1254
1254
|
}
|
1255
|
-
function
|
1256
|
-
const e = r.map((C) => C * 100), t =
|
1257
|
-
$(
|
1255
|
+
function Bt(r, o) {
|
1256
|
+
const e = r.map((C) => C * 100), t = Ht(
|
1257
|
+
$(Pt, e).map((C, x) => C * o.dRgb[x]),
|
1258
1258
|
o.fl
|
1259
1259
|
), a = t[0] + (-12 * t[1] + t[2]) / 11, l = (t[0] + t[1] - 2 * t[2]) / 9, s = (Math.atan2(l, a) % be + be) % be, n = 0.25 * (Math.cos(s + 2) + 3.8), i = 5e4 / 13 * o.nc * o.ncb * je(
|
1260
1260
|
n * Math.sqrt(a ** 2 + l ** 2),
|
1261
1261
|
t[0] + t[1] + 1.05 * t[2] + 0.305
|
1262
|
-
), c = to(i, 0.9) * Math.pow(1.64 - Math.pow(0.29, o.n), 0.73), u = o.nbb * (2 * t[0] + t[1] + 0.05 * t[2]), h = to(u / o.aW, 0.5 * o.c * o.z), d = 100 * to(h, 2), f = 4 / o.c * h * (o.aW + 4) * o.flRoot, b = c * h, p = b * o.flRoot, z = ao(s *
|
1262
|
+
), c = to(i, 0.9) * Math.pow(1.64 - Math.pow(0.29, o.n), 0.73), u = o.nbb * (2 * t[0] + t[1] + 0.05 * t[2]), h = to(u / o.aW, 0.5 * o.c * o.z), d = 100 * to(h, 2), f = 4 / o.c * h * (o.aW + 4) * o.flRoot, b = c * h, p = b * o.flRoot, z = ao(s * hl), w = ml(z), y = 50 * to(o.c * c / (o.aW + 4), 1 / 2);
|
1263
1263
|
return { J: d, C: b, h: z, s: y, Q: f, M: p, H: w };
|
1264
1264
|
}
|
1265
|
-
var
|
1265
|
+
var gl = new g({
|
1266
1266
|
id: "cam16-jmh",
|
1267
1267
|
cssId: "--cam16-jmh",
|
1268
1268
|
name: "CAM16-JMh",
|
@@ -1283,24 +1283,24 @@ var fl = new g({
|
|
1283
1283
|
},
|
1284
1284
|
base: B,
|
1285
1285
|
fromBase(r) {
|
1286
|
-
const o =
|
1286
|
+
const o = Bt(r, yr);
|
1287
1287
|
return [o.J, o.M, o.h];
|
1288
1288
|
},
|
1289
1289
|
toBase(r) {
|
1290
1290
|
return He(
|
1291
1291
|
{ J: r[0], M: r[1], h: r[2] },
|
1292
|
-
|
1292
|
+
yr
|
1293
1293
|
);
|
1294
1294
|
}
|
1295
1295
|
});
|
1296
|
-
const
|
1297
|
-
function
|
1298
|
-
return 116 * (r >
|
1296
|
+
const fl = j.D65, bl = 216 / 24389, It = 24389 / 27;
|
1297
|
+
function zl(r) {
|
1298
|
+
return 116 * (r > bl ? Math.cbrt(r) : (It * r + 16) / 116) - 16;
|
1299
1299
|
}
|
1300
1300
|
function Ne(r) {
|
1301
1301
|
return r > 8 ? Math.pow((r + 16) / 116, 3) : r / It;
|
1302
1302
|
}
|
1303
|
-
function
|
1303
|
+
function vl(r, o) {
|
1304
1304
|
let [e, t, a] = r, l = [], s = 0;
|
1305
1305
|
if (a === 0)
|
1306
1306
|
return [0, 0, 0];
|
@@ -1320,15 +1320,15 @@ function wl(r, o) {
|
|
1320
1320
|
}
|
1321
1321
|
return He({ J: s, C: t, h: e }, o);
|
1322
1322
|
}
|
1323
|
-
function
|
1324
|
-
const e =
|
1323
|
+
function wl(r, o) {
|
1324
|
+
const e = zl(r[1]);
|
1325
1325
|
if (e === 0)
|
1326
1326
|
return [0, 0, 0];
|
1327
|
-
const t =
|
1327
|
+
const t = Bt(r, We);
|
1328
1328
|
return [ao(t.h), t.C, e];
|
1329
1329
|
}
|
1330
|
-
const We =
|
1331
|
-
|
1330
|
+
const We = Nt(
|
1331
|
+
fl,
|
1332
1332
|
200 / Math.PI * Ne(50),
|
1333
1333
|
Ne(50) * 100,
|
1334
1334
|
"average",
|
@@ -1354,10 +1354,10 @@ var Lo = new g({
|
|
1354
1354
|
},
|
1355
1355
|
base: B,
|
1356
1356
|
fromBase(r) {
|
1357
|
-
return
|
1357
|
+
return wl(r);
|
1358
1358
|
},
|
1359
1359
|
toBase(r) {
|
1360
|
-
return
|
1360
|
+
return vl(r, We);
|
1361
1361
|
},
|
1362
1362
|
formats: {
|
1363
1363
|
color: {
|
@@ -1366,31 +1366,31 @@ var Lo = new g({
|
|
1366
1366
|
}
|
1367
1367
|
}
|
1368
1368
|
});
|
1369
|
-
const
|
1370
|
-
function
|
1369
|
+
const yl = Math.PI / 180, xr = [1, 7e-3, 0.0228];
|
1370
|
+
function Cr(r) {
|
1371
1371
|
r[1] < 0 && (r = Lo.fromBase(Lo.toBase(r)));
|
1372
|
-
const o = Math.log(Math.max(1 +
|
1372
|
+
const o = Math.log(Math.max(1 + xr[2] * r[1] * We.flRoot, 1)) / xr[2], e = r[0] * yl, t = o * Math.cos(e), a = o * Math.sin(e);
|
1373
1373
|
return [r[2], t, a];
|
1374
1374
|
}
|
1375
|
-
function
|
1375
|
+
function xl(r, o) {
|
1376
1376
|
[r, o] = v([r, o]);
|
1377
|
-
let [e, t, a] =
|
1377
|
+
let [e, t, a] = Cr(Lo.from(r)), [l, s, n] = Cr(Lo.from(o));
|
1378
1378
|
return Math.sqrt((e - l) ** 2 + (t - s) ** 2 + (a - n) ** 2);
|
1379
1379
|
}
|
1380
1380
|
var Eo = {
|
1381
|
-
deltaE76:
|
1382
|
-
deltaECMC:
|
1383
|
-
deltaE2000:
|
1384
|
-
deltaEJz:
|
1385
|
-
deltaEITP:
|
1381
|
+
deltaE76: Ta,
|
1382
|
+
deltaECMC: Wa,
|
1383
|
+
deltaE2000: Mt,
|
1384
|
+
deltaEJz: Va,
|
1385
|
+
deltaEITP: sl,
|
1386
1386
|
deltaEOK: Ae,
|
1387
|
-
deltaEHCT:
|
1387
|
+
deltaEHCT: xl
|
1388
1388
|
};
|
1389
|
-
function
|
1389
|
+
function Cl(r) {
|
1390
1390
|
const o = r ? Math.floor(Math.log10(Math.abs(r))) : 0;
|
1391
1391
|
return Math.max(parseFloat(`1e${o - 2}`), 1e-6);
|
1392
1392
|
}
|
1393
|
-
const
|
1393
|
+
const kr = {
|
1394
1394
|
hct: {
|
1395
1395
|
method: "hct.c",
|
1396
1396
|
jnd: 2,
|
@@ -1415,11 +1415,11 @@ function go(r, {
|
|
1415
1415
|
return r;
|
1416
1416
|
let s;
|
1417
1417
|
if (o === "css")
|
1418
|
-
s =
|
1418
|
+
s = kl(r, { space: e });
|
1419
1419
|
else {
|
1420
1420
|
if (o !== "clip" && !yo(r, e)) {
|
1421
|
-
Object.prototype.hasOwnProperty.call(
|
1422
|
-
let n =
|
1421
|
+
Object.prototype.hasOwnProperty.call(kr, o) && ({ method: o, jnd: a, deltaEMethod: t, blackWhiteClamp: l } = kr[o]);
|
1422
|
+
let n = Mt;
|
1423
1423
|
if (t !== "") {
|
1424
1424
|
for (let c in Eo)
|
1425
1425
|
if ("deltae" + t.toLowerCase() === c.toLowerCase()) {
|
@@ -1440,7 +1440,7 @@ function go(r, {
|
|
1440
1440
|
d.coords.forEach((w, y) => {
|
1441
1441
|
mo(w) && (d.coords[y] = 0);
|
1442
1442
|
});
|
1443
|
-
let f = (c.range || c.refRange)[0], b =
|
1443
|
+
let f = (c.range || c.refRange)[0], b = Cl(a), p = f, z = X(d, h);
|
1444
1444
|
for (; z - p > b; ) {
|
1445
1445
|
let w = _o(d);
|
1446
1446
|
w = go(w, { space: e, method: "clip" }), n(d, w) - a < b ? p = X(d, h) : z = X(d, h), no(d, h, (p + z) / 2);
|
@@ -1461,11 +1461,11 @@ function go(r, {
|
|
1461
1461
|
return e !== r.space && (s = M(s, r.space)), r.coords = s.coords, r;
|
1462
1462
|
}
|
1463
1463
|
go.returns = "color";
|
1464
|
-
const
|
1464
|
+
const Mr = {
|
1465
1465
|
WHITE: { space: So, coords: [1, 0, 0] },
|
1466
1466
|
BLACK: { space: So, coords: [0, 0, 0] }
|
1467
1467
|
};
|
1468
|
-
function
|
1468
|
+
function kl(r, { space: o } = {}) {
|
1469
1469
|
r = v(r), o || (o = r.space), o = g.get(o);
|
1470
1470
|
const e = g.get("oklch");
|
1471
1471
|
if (o.isUnbounded)
|
@@ -1473,11 +1473,11 @@ function Ml(r, { space: o } = {}) {
|
|
1473
1473
|
const t = M(r, e);
|
1474
1474
|
let a = t.coords[0];
|
1475
1475
|
if (a >= 1) {
|
1476
|
-
const d = M(
|
1476
|
+
const d = M(Mr.WHITE, o);
|
1477
1477
|
return d.alpha = r.alpha, M(d, o);
|
1478
1478
|
}
|
1479
1479
|
if (a <= 0) {
|
1480
|
-
const d = M(
|
1480
|
+
const d = M(Mr.BLACK, o);
|
1481
1481
|
return d.alpha = r.alpha, M(d, o);
|
1482
1482
|
}
|
1483
1483
|
if (yo(t, o, { epsilon: 0 }))
|
@@ -1487,7 +1487,7 @@ function Ml(r, { space: o } = {}) {
|
|
1487
1487
|
return f.coords = f.coords.map((p, z) => {
|
1488
1488
|
if ("range" in b[z]) {
|
1489
1489
|
const [w, y] = b[z].range;
|
1490
|
-
return
|
1490
|
+
return xt(w, p, y);
|
1491
1491
|
}
|
1492
1492
|
return p;
|
1493
1493
|
}), f;
|
@@ -1514,7 +1514,7 @@ function M(r, o, { inGamut: e } = {}) {
|
|
1514
1514
|
return e && (a = go(a, e === !0 ? void 0 : e)), a;
|
1515
1515
|
}
|
1516
1516
|
M.returns = "color";
|
1517
|
-
function
|
1517
|
+
function Io(r, {
|
1518
1518
|
precision: o = G.precision,
|
1519
1519
|
format: e = "default",
|
1520
1520
|
inGamut: t = !0,
|
@@ -1546,11 +1546,11 @@ function Oo(r, {
|
|
1546
1546
|
}
|
1547
1547
|
return s;
|
1548
1548
|
}
|
1549
|
-
const
|
1549
|
+
const Ml = [
|
1550
1550
|
[0.6369580483012914, 0.14461690358620832, 0.1688809751641721],
|
1551
1551
|
[0.2627002120112671, 0.6779980715188708, 0.05930171646986196],
|
1552
1552
|
[0, 0.028072693049087428, 1.060985057710791]
|
1553
|
-
],
|
1553
|
+
], $l = [
|
1554
1554
|
[1.716651187971268, -0.355670783776392, -0.25336628137366],
|
1555
1555
|
[-0.666684351832489, 1.616481236634939, 0.0157685458139111],
|
1556
1556
|
[0.017639857445311, -0.042770613257809, 0.942103121235474]
|
@@ -1560,44 +1560,44 @@ var he = new T({
|
|
1560
1560
|
cssId: "--rec2020-linear",
|
1561
1561
|
name: "Linear REC.2020",
|
1562
1562
|
white: "D65",
|
1563
|
-
toXYZ_M:
|
1564
|
-
fromXYZ_M:
|
1563
|
+
toXYZ_M: Ml,
|
1564
|
+
fromXYZ_M: $l
|
1565
1565
|
});
|
1566
|
-
const Zo = 1.09929682680944,
|
1567
|
-
var
|
1566
|
+
const Zo = 1.09929682680944, $r = 0.018053968510807;
|
1567
|
+
var Ot = new T({
|
1568
1568
|
id: "rec2020",
|
1569
1569
|
name: "REC.2020",
|
1570
1570
|
base: he,
|
1571
1571
|
// Non-linear transfer function from Rec. ITU-R BT.2020-2 table 4
|
1572
1572
|
toBase(r) {
|
1573
1573
|
return r.map(function(o) {
|
1574
|
-
return o <
|
1574
|
+
return o < $r * 4.5 ? o / 4.5 : Math.pow((o + Zo - 1) / Zo, 1 / 0.45);
|
1575
1575
|
});
|
1576
1576
|
},
|
1577
1577
|
fromBase(r) {
|
1578
1578
|
return r.map(function(o) {
|
1579
|
-
return o >=
|
1579
|
+
return o >= $r ? Zo * Math.pow(o, 0.45) - (Zo - 1) : 4.5 * o;
|
1580
1580
|
});
|
1581
1581
|
}
|
1582
1582
|
});
|
1583
|
-
const
|
1583
|
+
const Sl = [
|
1584
1584
|
[0.4865709486482162, 0.26566769316909306, 0.1982172852343625],
|
1585
1585
|
[0.2289745640697488, 0.6917385218365064, 0.079286914093745],
|
1586
1586
|
[0, 0.04511338185890264, 1.043944368900976]
|
1587
|
-
],
|
1587
|
+
], _l = [
|
1588
1588
|
[2.493496911941425, -0.9313836179191239, -0.40271078445071684],
|
1589
1589
|
[-0.8294889695615747, 1.7626640603183463, 0.023624685841943577],
|
1590
1590
|
[0.03584583024378447, -0.07617238926804182, 0.9568845240076872]
|
1591
1591
|
];
|
1592
|
-
var
|
1592
|
+
var Ft = new T({
|
1593
1593
|
id: "p3-linear",
|
1594
1594
|
cssId: "--display-p3-linear",
|
1595
1595
|
name: "Linear P3",
|
1596
1596
|
white: "D65",
|
1597
|
-
toXYZ_M:
|
1598
|
-
fromXYZ_M:
|
1597
|
+
toXYZ_M: Sl,
|
1598
|
+
fromXYZ_M: _l
|
1599
1599
|
});
|
1600
|
-
const
|
1600
|
+
const El = [
|
1601
1601
|
[0.41239079926595934, 0.357584339383878, 0.1804807884018343],
|
1602
1602
|
[0.21263900587151027, 0.715168678767756, 0.07219231536073371],
|
1603
1603
|
[0.01933081871559182, 0.11919477979462598, 0.9505321522496607]
|
@@ -1606,13 +1606,13 @@ const Al = [
|
|
1606
1606
|
[-0.9692436362808796, 1.8759675015077202, 0.04155505740717559],
|
1607
1607
|
[0.05563007969699366, -0.20397695888897652, 1.0569715142428786]
|
1608
1608
|
];
|
1609
|
-
var
|
1609
|
+
var Lt = new T({
|
1610
1610
|
id: "srgb-linear",
|
1611
1611
|
name: "Linear sRGB",
|
1612
1612
|
white: "D65",
|
1613
|
-
toXYZ_M:
|
1613
|
+
toXYZ_M: El,
|
1614
1614
|
fromXYZ_M: P
|
1615
|
-
}),
|
1615
|
+
}), Sr = {
|
1616
1616
|
aliceblue: [240 / 255, 248 / 255, 1],
|
1617
1617
|
antiquewhite: [250 / 255, 235 / 255, 215 / 255],
|
1618
1618
|
aqua: [0, 1, 1],
|
@@ -1762,11 +1762,11 @@ var jt = new T({
|
|
1762
1762
|
yellow: [1, 1, 0],
|
1763
1763
|
yellowgreen: [154 / 255, 205 / 255, 50 / 255]
|
1764
1764
|
};
|
1765
|
-
let
|
1765
|
+
let _r = Array(3).fill("<percentage> | <number>[0, 255]"), Er = Array(3).fill("<number>[0, 255]");
|
1766
1766
|
var Ao = new T({
|
1767
1767
|
id: "srgb",
|
1768
1768
|
name: "sRGB",
|
1769
|
-
base:
|
1769
|
+
base: Lt,
|
1770
1770
|
fromBase: (r) => r.map((o) => {
|
1771
1771
|
let e = o < 0 ? -1 : 1, t = o * e;
|
1772
1772
|
return t > 31308e-7 ? e * (1.055 * t ** (1 / 2.4) - 0.055) : 12.92 * o;
|
@@ -1777,26 +1777,26 @@ var Ao = new T({
|
|
1777
1777
|
}),
|
1778
1778
|
formats: {
|
1779
1779
|
rgb: {
|
1780
|
-
coords:
|
1780
|
+
coords: _r
|
1781
1781
|
},
|
1782
1782
|
rgb_number: {
|
1783
1783
|
name: "rgb",
|
1784
1784
|
commas: !0,
|
1785
|
-
coords:
|
1785
|
+
coords: Er,
|
1786
1786
|
noAlpha: !0
|
1787
1787
|
},
|
1788
1788
|
color: {
|
1789
1789
|
/* use defaults */
|
1790
1790
|
},
|
1791
1791
|
rgba: {
|
1792
|
-
coords:
|
1792
|
+
coords: _r,
|
1793
1793
|
commas: !0,
|
1794
1794
|
lastAlpha: !0
|
1795
1795
|
},
|
1796
1796
|
rgba_number: {
|
1797
1797
|
name: "rgba",
|
1798
1798
|
commas: !0,
|
1799
|
-
coords:
|
1799
|
+
coords: Er
|
1800
1800
|
},
|
1801
1801
|
hex: {
|
1802
1802
|
type: "custom",
|
@@ -1828,108 +1828,108 @@ var Ao = new T({
|
|
1828
1828
|
parse(r) {
|
1829
1829
|
r = r.toLowerCase();
|
1830
1830
|
let o = { spaceId: "srgb", coords: null, alpha: 1 };
|
1831
|
-
if (r === "transparent" ? (o.coords =
|
1831
|
+
if (r === "transparent" ? (o.coords = Sr.black, o.alpha = 0) : o.coords = Sr[r], o.coords)
|
1832
1832
|
return o;
|
1833
1833
|
}
|
1834
1834
|
}
|
1835
1835
|
}
|
1836
|
-
}),
|
1836
|
+
}), jt = new T({
|
1837
1837
|
id: "p3",
|
1838
1838
|
cssId: "display-p3",
|
1839
1839
|
name: "P3",
|
1840
|
-
base:
|
1840
|
+
base: Ft,
|
1841
1841
|
// Gamma encoding/decoding is the same as sRGB
|
1842
1842
|
fromBase: Ao.fromBase,
|
1843
1843
|
toBase: Ao.toBase
|
1844
1844
|
});
|
1845
1845
|
G.display_space = Ao;
|
1846
|
-
let
|
1846
|
+
let Ar;
|
1847
1847
|
if (typeof CSS < "u" && CSS.supports)
|
1848
|
-
for (let r of [Y,
|
1849
|
-
let o = r.getMinCoords(), e =
|
1848
|
+
for (let r of [Y, Ot, jt]) {
|
1849
|
+
let o = r.getMinCoords(), e = Io({ space: r, coords: o, alpha: 1 });
|
1850
1850
|
if (CSS.supports("color", e)) {
|
1851
1851
|
G.display_space = r;
|
1852
1852
|
break;
|
1853
1853
|
}
|
1854
1854
|
}
|
1855
|
-
function
|
1856
|
-
let t =
|
1855
|
+
function Al(r, { space: o = G.display_space, ...e } = {}) {
|
1856
|
+
let t = Io(r, e);
|
1857
1857
|
if (typeof CSS > "u" || CSS.supports("color", t) || !G.display_space)
|
1858
1858
|
t = new String(t), t.color = r;
|
1859
1859
|
else {
|
1860
1860
|
let a = r;
|
1861
|
-
if ((r.coords.some(mo) || mo(r.alpha)) && !(
|
1861
|
+
if ((r.coords.some(mo) || mo(r.alpha)) && !(Ar ?? (Ar = CSS.supports("color", "hsl(none 50% 50%)"))) && (a = _o(r), a.coords = a.coords.map(R), a.alpha = R(a.alpha), t = Io(a, e), CSS.supports("color", t)))
|
1862
1862
|
return t = new String(t), t.color = a, t;
|
1863
|
-
a = M(a, o), t = new String(
|
1863
|
+
a = M(a, o), t = new String(Io(a, e)), t.color = a;
|
1864
1864
|
}
|
1865
1865
|
return t;
|
1866
1866
|
}
|
1867
|
-
function
|
1867
|
+
function Rl(r, o) {
|
1868
1868
|
return r = v(r), o = v(o), r.space === o.space && r.alpha === o.alpha && r.coords.every((e, t) => e === o.coords[t]);
|
1869
1869
|
}
|
1870
1870
|
function fo(r) {
|
1871
1871
|
return X(r, [B, "y"]);
|
1872
1872
|
}
|
1873
|
-
function
|
1873
|
+
function Dt(r, o) {
|
1874
1874
|
no(r, [B, "y"], o);
|
1875
1875
|
}
|
1876
|
-
function
|
1876
|
+
function Pl(r) {
|
1877
1877
|
Object.defineProperty(r.prototype, "luminance", {
|
1878
1878
|
get() {
|
1879
1879
|
return fo(this);
|
1880
1880
|
},
|
1881
1881
|
set(o) {
|
1882
|
-
|
1882
|
+
Dt(this, o);
|
1883
1883
|
}
|
1884
1884
|
});
|
1885
1885
|
}
|
1886
|
-
var
|
1886
|
+
var Hl = /* @__PURE__ */ Object.freeze({
|
1887
1887
|
__proto__: null,
|
1888
1888
|
getLuminance: fo,
|
1889
|
-
register:
|
1890
|
-
setLuminance:
|
1889
|
+
register: Pl,
|
1890
|
+
setLuminance: Dt
|
1891
1891
|
});
|
1892
|
-
function
|
1892
|
+
function Nl(r, o) {
|
1893
1893
|
r = v(r), o = v(o);
|
1894
1894
|
let e = Math.max(fo(r), 0), t = Math.max(fo(o), 0);
|
1895
1895
|
return t > e && ([e, t] = [t, e]), (e + 0.05) / (t + 0.05);
|
1896
1896
|
}
|
1897
|
-
const
|
1898
|
-
function
|
1899
|
-
return r >=
|
1897
|
+
const Bl = 0.56, Il = 0.57, Ol = 0.62, Fl = 0.65, Rr = 0.022, Ll = 1.414, jl = 0.1, Dl = 5e-4, Tl = 1.14, Pr = 0.027, ql = 1.14;
|
1898
|
+
function Hr(r) {
|
1899
|
+
return r >= Rr ? r : r + (Rr - r) ** Ll;
|
1900
1900
|
}
|
1901
1901
|
function ko(r) {
|
1902
1902
|
let o = r < 0 ? -1 : 1, e = Math.abs(r);
|
1903
1903
|
return o * Math.pow(e, 2.4);
|
1904
1904
|
}
|
1905
|
-
function
|
1905
|
+
function Wl(r, o) {
|
1906
1906
|
o = v(o), r = v(r);
|
1907
1907
|
let e, t, a, l, s, n;
|
1908
1908
|
o = M(o, "srgb"), [l, s, n] = o.coords;
|
1909
1909
|
let i = ko(l) * 0.2126729 + ko(s) * 0.7151522 + ko(n) * 0.072175;
|
1910
1910
|
r = M(r, "srgb"), [l, s, n] = r.coords;
|
1911
|
-
let c = ko(l) * 0.2126729 + ko(s) * 0.7151522 + ko(n) * 0.072175, u =
|
1912
|
-
return Math.abs(h - u) <
|
1911
|
+
let c = ko(l) * 0.2126729 + ko(s) * 0.7151522 + ko(n) * 0.072175, u = Hr(i), h = Hr(c), d = h > u;
|
1912
|
+
return Math.abs(h - u) < Dl ? t = 0 : d ? (e = h ** Bl - u ** Il, t = e * Tl) : (e = h ** Fl - u ** Ol, t = e * ql), Math.abs(t) < jl ? a = 0 : t > 0 ? a = t - Pr : a = t + Pr, a * 100;
|
1913
1913
|
}
|
1914
|
-
function
|
1914
|
+
function Ul(r, o) {
|
1915
1915
|
r = v(r), o = v(o);
|
1916
1916
|
let e = Math.max(fo(r), 0), t = Math.max(fo(o), 0);
|
1917
1917
|
t > e && ([e, t] = [t, e]);
|
1918
1918
|
let a = e + t;
|
1919
1919
|
return a === 0 ? 0 : (e - t) / a;
|
1920
1920
|
}
|
1921
|
-
const
|
1922
|
-
function
|
1921
|
+
const Xl = 5e4;
|
1922
|
+
function Yl(r, o) {
|
1923
1923
|
r = v(r), o = v(o);
|
1924
1924
|
let e = Math.max(fo(r), 0), t = Math.max(fo(o), 0);
|
1925
|
-
return t > e && ([e, t] = [t, e]), t === 0 ?
|
1925
|
+
return t > e && ([e, t] = [t, e]), t === 0 ? Xl : (e - t) / t;
|
1926
1926
|
}
|
1927
|
-
function
|
1927
|
+
function Gl(r, o) {
|
1928
1928
|
r = v(r), o = v(o);
|
1929
1929
|
let e = X(r, [Y, "l"]), t = X(o, [Y, "l"]);
|
1930
1930
|
return Math.abs(e - t);
|
1931
1931
|
}
|
1932
|
-
const
|
1932
|
+
const Zl = 216 / 24389, Nr = 24 / 116, Ko = 24389 / 27;
|
1933
1933
|
let ze = j.D65;
|
1934
1934
|
var Be = new g({
|
1935
1935
|
id: "lab-d65",
|
@@ -1953,7 +1953,7 @@ var Be = new g({
|
|
1953
1953
|
// Convert D65-adapted XYZ to Lab
|
1954
1954
|
// CIE 15.3:2004 section 8.2.1.1
|
1955
1955
|
fromBase(r) {
|
1956
|
-
let o = r.map((e, t) => e / ze[t]).map((e) => e >
|
1956
|
+
let o = r.map((e, t) => e / ze[t]).map((e) => e > Zl ? Math.cbrt(e) : (Ko * e + 16) / 116);
|
1957
1957
|
return [
|
1958
1958
|
116 * o[1] - 16,
|
1959
1959
|
// L
|
@@ -1969,9 +1969,9 @@ var Be = new g({
|
|
1969
1969
|
toBase(r) {
|
1970
1970
|
let o = [];
|
1971
1971
|
return o[1] = (r[0] + 16) / 116, o[0] = r[1] / 500 + o[1], o[2] = o[1] - r[2] / 200, [
|
1972
|
-
o[0] >
|
1972
|
+
o[0] > Nr ? Math.pow(o[0], 3) : (116 * o[0] - 16) / Ko,
|
1973
1973
|
r[0] > 8 ? Math.pow((r[0] + 16) / 116, 3) : r[0] / Ko,
|
1974
|
-
o[2] >
|
1974
|
+
o[2] > Nr ? Math.pow(o[2], 3) : (116 * o[2] - 16) / Ko
|
1975
1975
|
].map((e, t) => e * ze[t]);
|
1976
1976
|
},
|
1977
1977
|
formats: {
|
@@ -1981,21 +1981,21 @@ var Be = new g({
|
|
1981
1981
|
}
|
1982
1982
|
});
|
1983
1983
|
const ve = Math.pow(5, 0.5) * 0.5 + 0.5;
|
1984
|
-
function
|
1984
|
+
function Kl(r, o) {
|
1985
1985
|
r = v(r), o = v(o);
|
1986
1986
|
let e = X(r, [Be, "l"]), t = X(o, [Be, "l"]), a = Math.abs(Math.pow(e, ve) - Math.pow(t, ve)), l = Math.pow(a, 1 / ve) * Math.SQRT2 - 40;
|
1987
1987
|
return l < 7.5 ? 0 : l;
|
1988
1988
|
}
|
1989
1989
|
var te = /* @__PURE__ */ Object.freeze({
|
1990
1990
|
__proto__: null,
|
1991
|
-
contrastAPCA:
|
1992
|
-
contrastDeltaPhi:
|
1993
|
-
contrastLstar:
|
1994
|
-
contrastMichelson:
|
1995
|
-
contrastWCAG21:
|
1996
|
-
contrastWeber:
|
1991
|
+
contrastAPCA: Wl,
|
1992
|
+
contrastDeltaPhi: Kl,
|
1993
|
+
contrastLstar: Gl,
|
1994
|
+
contrastMichelson: Ul,
|
1995
|
+
contrastWCAG21: Nl,
|
1996
|
+
contrastWeber: Yl
|
1997
1997
|
});
|
1998
|
-
function
|
1998
|
+
function Vl(r, o, e = {}) {
|
1999
1999
|
Do(e) && (e = { algorithm: e });
|
2000
2000
|
let { algorithm: t, ...a } = e;
|
2001
2001
|
if (!t) {
|
@@ -2012,26 +2012,26 @@ function de(r) {
|
|
2012
2012
|
let [o, e, t] = To(r, B), a = o + 15 * e + 3 * t;
|
2013
2013
|
return [4 * o / a, 9 * e / a];
|
2014
2014
|
}
|
2015
|
-
function
|
2015
|
+
function Tt(r) {
|
2016
2016
|
let [o, e, t] = To(r, B), a = o + e + t;
|
2017
2017
|
return [o / a, e / a];
|
2018
2018
|
}
|
2019
|
-
function
|
2019
|
+
function Jl(r) {
|
2020
2020
|
Object.defineProperty(r.prototype, "uv", {
|
2021
2021
|
get() {
|
2022
2022
|
return de(this);
|
2023
2023
|
}
|
2024
2024
|
}), Object.defineProperty(r.prototype, "xy", {
|
2025
2025
|
get() {
|
2026
|
-
return
|
2026
|
+
return Tt(this);
|
2027
2027
|
}
|
2028
2028
|
});
|
2029
2029
|
}
|
2030
|
-
var
|
2030
|
+
var Ql = /* @__PURE__ */ Object.freeze({
|
2031
2031
|
__proto__: null,
|
2032
|
-
register:
|
2032
|
+
register: Jl,
|
2033
2033
|
uv: de,
|
2034
|
-
xy:
|
2034
|
+
xy: Tt
|
2035
2035
|
});
|
2036
2036
|
function Bo(r, o, e = {}) {
|
2037
2037
|
Do(e) && (e = { method: e });
|
@@ -2041,23 +2041,23 @@ function Bo(r, o, e = {}) {
|
|
2041
2041
|
return Eo[l](r, o, a);
|
2042
2042
|
throw new TypeError(`Unknown deltaE method: ${t}`);
|
2043
2043
|
}
|
2044
|
-
function
|
2044
|
+
function os(r, o = 0.25) {
|
2045
2045
|
let e = [g.get("oklch", "lch"), "l"];
|
2046
2046
|
return no(r, e, (t) => t * (1 + o));
|
2047
2047
|
}
|
2048
|
-
function
|
2048
|
+
function es(r, o = 0.25) {
|
2049
2049
|
let e = [g.get("oklch", "lch"), "l"];
|
2050
2050
|
return no(r, e, (t) => t * (1 - o));
|
2051
2051
|
}
|
2052
|
-
var
|
2052
|
+
var rs = /* @__PURE__ */ Object.freeze({
|
2053
2053
|
__proto__: null,
|
2054
|
-
darken:
|
2055
|
-
lighten:
|
2054
|
+
darken: es,
|
2055
|
+
lighten: os
|
2056
2056
|
});
|
2057
|
-
function
|
2057
|
+
function qt(r, o, e = 0.5, t = {}) {
|
2058
2058
|
return [r, o] = [v(r), v(o)], ho(e) === "object" && ([e, t] = [0.5, e]), qo(r, o, t)(e);
|
2059
2059
|
}
|
2060
|
-
function
|
2060
|
+
function Wt(r, o, e = {}) {
|
2061
2061
|
let t;
|
2062
2062
|
Ue(r) && ([t, e] = [r, o], [r, o] = t.rangeArgs.colors);
|
2063
2063
|
let {
|
@@ -2111,8 +2111,8 @@ function qo(r, o, e = {}) {
|
|
2111
2111
|
i = l ? l(i) : i;
|
2112
2112
|
let c = r.coords.map((d, f) => {
|
2113
2113
|
let b = o.coords[f];
|
2114
|
-
return
|
2115
|
-
}), u =
|
2114
|
+
return Oo(d, b, i);
|
2115
|
+
}), u = Oo(r.alpha, o.alpha, i), h = { space: t, coords: c, alpha: u };
|
2116
2116
|
return s && (h.coords = h.coords.map((d) => d / u)), a !== t && (h = M(h, a)), h;
|
2117
2117
|
}, {
|
2118
2118
|
rangeArgs: n
|
@@ -2122,17 +2122,17 @@ function Ue(r) {
|
|
2122
2122
|
return ho(r) === "function" && !!r.rangeArgs;
|
2123
2123
|
}
|
2124
2124
|
G.interpolationSpace = "lab";
|
2125
|
-
function
|
2126
|
-
r.defineFunction("mix",
|
2125
|
+
function ts(r) {
|
2126
|
+
r.defineFunction("mix", qt, { returns: "color" }), r.defineFunction("range", qo, { returns: "function<color>" }), r.defineFunction("steps", Wt, { returns: "array<color>" });
|
2127
2127
|
}
|
2128
|
-
var
|
2128
|
+
var as = /* @__PURE__ */ Object.freeze({
|
2129
2129
|
__proto__: null,
|
2130
2130
|
isRange: Ue,
|
2131
|
-
mix:
|
2131
|
+
mix: qt,
|
2132
2132
|
range: qo,
|
2133
|
-
register:
|
2134
|
-
steps:
|
2135
|
-
}),
|
2133
|
+
register: ts,
|
2134
|
+
steps: Wt
|
2135
|
+
}), Ut = new g({
|
2136
2136
|
id: "hsl",
|
2137
2137
|
name: "HSL",
|
2138
2138
|
coords: {
|
@@ -2189,7 +2189,7 @@ var ls = /* @__PURE__ */ Object.freeze({
|
|
2189
2189
|
lastAlpha: !0
|
2190
2190
|
}
|
2191
2191
|
}
|
2192
|
-
}),
|
2192
|
+
}), Xt = new g({
|
2193
2193
|
id: "hsv",
|
2194
2194
|
name: "HSV",
|
2195
2195
|
coords: {
|
@@ -2207,7 +2207,7 @@ var ls = /* @__PURE__ */ Object.freeze({
|
|
2207
2207
|
name: "Value"
|
2208
2208
|
}
|
2209
2209
|
},
|
2210
|
-
base:
|
2210
|
+
base: Ut,
|
2211
2211
|
// https://en.wikipedia.org/wiki/HSL_and_HSV#Interconversion
|
2212
2212
|
fromBase(r) {
|
2213
2213
|
let [o, e, t] = r;
|
@@ -2239,7 +2239,7 @@ var ls = /* @__PURE__ */ Object.freeze({
|
|
2239
2239
|
coords: ["<number> | <angle>", "<percentage> | <number>", "<percentage> | <number>"]
|
2240
2240
|
}
|
2241
2241
|
}
|
2242
|
-
}),
|
2242
|
+
}), ls = new g({
|
2243
2243
|
id: "hwb",
|
2244
2244
|
name: "HWB",
|
2245
2245
|
coords: {
|
@@ -2257,7 +2257,7 @@ var ls = /* @__PURE__ */ Object.freeze({
|
|
2257
2257
|
name: "Blackness"
|
2258
2258
|
}
|
2259
2259
|
},
|
2260
|
-
base:
|
2260
|
+
base: Xt,
|
2261
2261
|
fromBase(r) {
|
2262
2262
|
let [o, e, t] = r;
|
2263
2263
|
return [o, t * (100 - e) / 100, 100 - t];
|
@@ -2279,61 +2279,61 @@ var ls = /* @__PURE__ */ Object.freeze({
|
|
2279
2279
|
}
|
2280
2280
|
}
|
2281
2281
|
});
|
2282
|
-
const
|
2282
|
+
const ss = [
|
2283
2283
|
[0.5766690429101305, 0.1855582379065463, 0.1882286462349947],
|
2284
2284
|
[0.29734497525053605, 0.6273635662554661, 0.07529145849399788],
|
2285
2285
|
[0.02703136138641234, 0.07068885253582723, 0.9913375368376388]
|
2286
|
-
],
|
2286
|
+
], ns = [
|
2287
2287
|
[2.0415879038107465, -0.5650069742788596, -0.34473135077832956],
|
2288
2288
|
[-0.9692436362808795, 1.8759675015077202, 0.04155505740717557],
|
2289
2289
|
[0.013444280632031142, -0.11836239223101838, 1.0151749943912054]
|
2290
2290
|
];
|
2291
|
-
var
|
2291
|
+
var Yt = new T({
|
2292
2292
|
id: "a98rgb-linear",
|
2293
2293
|
cssId: "--a98-rgb-linear",
|
2294
2294
|
name: "Linear Adobe® 98 RGB compatible",
|
2295
2295
|
white: "D65",
|
2296
|
-
toXYZ_M:
|
2297
|
-
fromXYZ_M:
|
2298
|
-
}),
|
2296
|
+
toXYZ_M: ss,
|
2297
|
+
fromXYZ_M: ns
|
2298
|
+
}), is = new T({
|
2299
2299
|
id: "a98rgb",
|
2300
2300
|
cssId: "a98-rgb",
|
2301
2301
|
name: "Adobe® 98 RGB compatible",
|
2302
|
-
base:
|
2302
|
+
base: Yt,
|
2303
2303
|
toBase: (r) => r.map((o) => Math.pow(Math.abs(o), 563 / 256) * Math.sign(o)),
|
2304
2304
|
fromBase: (r) => r.map((o) => Math.pow(Math.abs(o), 256 / 563) * Math.sign(o))
|
2305
2305
|
});
|
2306
|
-
const
|
2306
|
+
const cs = [
|
2307
2307
|
[0.7977666449006423, 0.13518129740053308, 0.0313477341283922],
|
2308
2308
|
[0.2880748288194013, 0.711835234241873, 8993693872564e-17],
|
2309
2309
|
[0, 0, 0.8251046025104602]
|
2310
|
-
],
|
2310
|
+
], us = [
|
2311
2311
|
[1.3457868816471583, -0.25557208737979464, -0.05110186497554526],
|
2312
2312
|
[-0.5446307051249019, 1.5082477428451468, 0.02052744743642139],
|
2313
2313
|
[0, 0, 1.2119675456389452]
|
2314
2314
|
];
|
2315
|
-
var
|
2315
|
+
var Gt = new T({
|
2316
2316
|
id: "prophoto-linear",
|
2317
2317
|
cssId: "--prophoto-rgb-linear",
|
2318
2318
|
name: "Linear ProPhoto",
|
2319
2319
|
white: "D50",
|
2320
2320
|
base: Te,
|
2321
|
-
toXYZ_M:
|
2322
|
-
fromXYZ_M:
|
2321
|
+
toXYZ_M: cs,
|
2322
|
+
fromXYZ_M: us
|
2323
2323
|
});
|
2324
|
-
const
|
2325
|
-
var
|
2324
|
+
const hs = 1 / 512, ds = 16 / 512;
|
2325
|
+
var ms = new T({
|
2326
2326
|
id: "prophoto",
|
2327
2327
|
cssId: "prophoto-rgb",
|
2328
2328
|
name: "ProPhoto",
|
2329
|
-
base:
|
2329
|
+
base: Gt,
|
2330
2330
|
toBase(r) {
|
2331
|
-
return r.map((o) => o <
|
2331
|
+
return r.map((o) => o < ds ? o / 16 : o ** 1.8);
|
2332
2332
|
},
|
2333
2333
|
fromBase(r) {
|
2334
|
-
return r.map((o) => o >=
|
2334
|
+
return r.map((o) => o >= hs ? o ** (1 / 1.8) : 16 * o);
|
2335
2335
|
}
|
2336
|
-
}),
|
2336
|
+
}), ps = new g({
|
2337
2337
|
id: "oklch",
|
2338
2338
|
name: "Oklch",
|
2339
2339
|
coords: {
|
@@ -2376,9 +2376,9 @@ var ps = new T({
|
|
2376
2376
|
}
|
2377
2377
|
}
|
2378
2378
|
});
|
2379
|
-
let
|
2380
|
-
const
|
2381
|
-
var
|
2379
|
+
let Zt = j.D65;
|
2380
|
+
const gs = 216 / 24389, Br = 24389 / 27, [Ir, Or] = de({ space: B, coords: Zt });
|
2381
|
+
var Kt = new g({
|
2382
2382
|
id: "luv",
|
2383
2383
|
name: "Luv",
|
2384
2384
|
coords: {
|
@@ -2394,7 +2394,7 @@ var Vt = new g({
|
|
2394
2394
|
refRange: [-215, 215]
|
2395
2395
|
}
|
2396
2396
|
},
|
2397
|
-
white:
|
2397
|
+
white: Zt,
|
2398
2398
|
base: B,
|
2399
2399
|
// Convert D65-adapted XYZ to Luv
|
2400
2400
|
// https://en.wikipedia.org/wiki/CIELUV#The_forward_transformation
|
@@ -2402,11 +2402,11 @@ var Vt = new g({
|
|
2402
2402
|
let o = [R(r[0]), R(r[1]), R(r[2])], e = o[1], [t, a] = de({ space: B, coords: o });
|
2403
2403
|
if (!Number.isFinite(t) || !Number.isFinite(a))
|
2404
2404
|
return [0, 0, 0];
|
2405
|
-
let l = e <=
|
2405
|
+
let l = e <= gs ? Br * e : 116 * Math.cbrt(e) - 16;
|
2406
2406
|
return [
|
2407
2407
|
l,
|
2408
2408
|
13 * l * (t - Ir),
|
2409
|
-
13 * l * (a -
|
2409
|
+
13 * l * (a - Or)
|
2410
2410
|
];
|
2411
2411
|
},
|
2412
2412
|
// Convert Luv to D65-adapted XYZ
|
@@ -2416,7 +2416,7 @@ var Vt = new g({
|
|
2416
2416
|
if (o === 0 || mo(o))
|
2417
2417
|
return [0, 0, 0];
|
2418
2418
|
e = R(e), t = R(t);
|
2419
|
-
let a = e / (13 * o) + Ir, l = t / (13 * o) +
|
2419
|
+
let a = e / (13 * o) + Ir, l = t / (13 * o) + Or, s = o <= 8 ? o / Br : Math.pow((o + 16) / 116, 3);
|
2420
2420
|
return [
|
2421
2421
|
s * (9 * a / (4 * l)),
|
2422
2422
|
s,
|
@@ -2447,7 +2447,7 @@ var Vt = new g({
|
|
2447
2447
|
name: "Hue"
|
2448
2448
|
}
|
2449
2449
|
},
|
2450
|
-
base:
|
2450
|
+
base: Kt,
|
2451
2451
|
fromBase(r) {
|
2452
2452
|
let [o, e, t] = r, a;
|
2453
2453
|
const l = 0.02;
|
@@ -2478,13 +2478,13 @@ var Vt = new g({
|
|
2478
2478
|
}
|
2479
2479
|
}
|
2480
2480
|
});
|
2481
|
-
const
|
2481
|
+
const fs = 216 / 24389, bs = 24389 / 27, Fr = P[0][0], Lr = P[0][1], we = P[0][2], jr = P[1][0], Dr = P[1][1], ye = P[1][2], Tr = P[2][0], qr = P[2][1], xe = P[2][2];
|
2482
2482
|
function Mo(r, o, e) {
|
2483
2483
|
const t = o / (Math.sin(e) - r * Math.cos(e));
|
2484
2484
|
return t < 0 ? 1 / 0 : t;
|
2485
2485
|
}
|
2486
2486
|
function ne(r) {
|
2487
|
-
const o = Math.pow(r + 16, 3) / 1560896, e = o >
|
2487
|
+
const o = Math.pow(r + 16, 3) / 1560896, e = o > fs ? o : r / bs, t = e * (284517 * Fr - 94839 * we), a = e * (838422 * we + 769860 * Lr + 731718 * Fr), l = e * (632260 * we - 126452 * Lr), s = e * (284517 * jr - 94839 * ye), n = e * (838422 * ye + 769860 * Dr + 731718 * jr), i = e * (632260 * ye - 126452 * Dr), c = e * (284517 * Tr - 94839 * xe), u = e * (838422 * xe + 769860 * qr + 731718 * Tr), h = e * (632260 * xe - 126452 * qr);
|
2488
2488
|
return {
|
2489
2489
|
r0s: t / l,
|
2490
2490
|
r0i: a * r / l,
|
@@ -2500,11 +2500,11 @@ function ne(r) {
|
|
2500
2500
|
b1i: (u - 769860) * r / (h + 126452)
|
2501
2501
|
};
|
2502
2502
|
}
|
2503
|
-
function
|
2503
|
+
function Wr(r, o) {
|
2504
2504
|
const e = o / 360 * Math.PI * 2, t = Mo(r.r0s, r.r0i, e), a = Mo(r.r1s, r.r1i, e), l = Mo(r.g0s, r.g0i, e), s = Mo(r.g1s, r.g1i, e), n = Mo(r.b0s, r.b0i, e), i = Mo(r.b1s, r.b1i, e);
|
2505
2505
|
return Math.min(t, a, l, s, n, i);
|
2506
2506
|
}
|
2507
|
-
var
|
2507
|
+
var zs = new g({
|
2508
2508
|
id: "hsluv",
|
2509
2509
|
name: "HSLuv",
|
2510
2510
|
coords: {
|
@@ -2532,7 +2532,7 @@ var vs = new g({
|
|
2532
2532
|
else if (o < 1e-8)
|
2533
2533
|
a = 0, o = 0;
|
2534
2534
|
else {
|
2535
|
-
let l = ne(o), s =
|
2535
|
+
let l = ne(o), s = Wr(l, t);
|
2536
2536
|
a = e / s * 100;
|
2537
2537
|
}
|
2538
2538
|
return [t, a, o];
|
@@ -2546,7 +2546,7 @@ var vs = new g({
|
|
2546
2546
|
t = 0, a = 0;
|
2547
2547
|
else {
|
2548
2548
|
let l = ne(t);
|
2549
|
-
a =
|
2549
|
+
a = Wr(l, o) / 100 * e;
|
2550
2550
|
}
|
2551
2551
|
return [t, a, o];
|
2552
2552
|
},
|
@@ -2569,11 +2569,11 @@ P[2][2];
|
|
2569
2569
|
function $o(r, o) {
|
2570
2570
|
return Math.abs(o) / Math.sqrt(Math.pow(r, 2) + 1);
|
2571
2571
|
}
|
2572
|
-
function
|
2572
|
+
function Ur(r) {
|
2573
2573
|
let o = $o(r.r0s, r.r0i), e = $o(r.r1s, r.r1i), t = $o(r.g0s, r.g0i), a = $o(r.g1s, r.g1i), l = $o(r.b0s, r.b0i), s = $o(r.b1s, r.b1i);
|
2574
2574
|
return Math.min(o, e, t, a, l, s);
|
2575
2575
|
}
|
2576
|
-
var
|
2576
|
+
var vs = new g({
|
2577
2577
|
id: "hpluv",
|
2578
2578
|
name: "HPLuv",
|
2579
2579
|
coords: {
|
@@ -2601,7 +2601,7 @@ var ws = new g({
|
|
2601
2601
|
else if (o < 1e-8)
|
2602
2602
|
a = 0, o = 0;
|
2603
2603
|
else {
|
2604
|
-
let l = ne(o), s =
|
2604
|
+
let l = ne(o), s = Ur(l);
|
2605
2605
|
a = e / s * 100;
|
2606
2606
|
}
|
2607
2607
|
return [t, a, o];
|
@@ -2615,7 +2615,7 @@ var ws = new g({
|
|
2615
2615
|
t = 0, a = 0;
|
2616
2616
|
else {
|
2617
2617
|
let l = ne(t);
|
2618
|
-
a =
|
2618
|
+
a = Ur(l) / 100 * e;
|
2619
2619
|
}
|
2620
2620
|
return [t, a, o];
|
2621
2621
|
},
|
@@ -2626,26 +2626,26 @@ var ws = new g({
|
|
2626
2626
|
}
|
2627
2627
|
}
|
2628
2628
|
});
|
2629
|
-
const
|
2630
|
-
var
|
2629
|
+
const Xr = 203, Yr = 2610 / 2 ** 14, ws = 2 ** 14 / 2610, ys = 2523 / 2 ** 5, Gr = 2 ** 5 / 2523, Zr = 3424 / 2 ** 12, Kr = 2413 / 2 ** 7, Vr = 2392 / 2 ** 7;
|
2630
|
+
var xs = new T({
|
2631
2631
|
id: "rec2100pq",
|
2632
2632
|
cssId: "rec2100-pq",
|
2633
2633
|
name: "REC.2100-PQ",
|
2634
2634
|
base: he,
|
2635
2635
|
toBase(r) {
|
2636
2636
|
return r.map(function(o) {
|
2637
|
-
return (Math.max(o **
|
2637
|
+
return (Math.max(o ** Gr - Zr, 0) / (Kr - Vr * o ** Gr)) ** ws * 1e4 / Xr;
|
2638
2638
|
});
|
2639
2639
|
},
|
2640
2640
|
fromBase(r) {
|
2641
2641
|
return r.map(function(o) {
|
2642
|
-
let e = Math.max(o *
|
2643
|
-
return (t / a) **
|
2642
|
+
let e = Math.max(o * Xr / 1e4, 0), t = Zr + Kr * e ** Yr, a = 1 + Vr * e ** Yr;
|
2643
|
+
return (t / a) ** ys;
|
2644
2644
|
});
|
2645
2645
|
}
|
2646
2646
|
});
|
2647
|
-
const
|
2648
|
-
var
|
2647
|
+
const Jr = 0.17883277, Qr = 0.28466892, ot = 0.55991073, Ce = 3.7743;
|
2648
|
+
var Cs = new T({
|
2649
2649
|
id: "rec2100hlg",
|
2650
2650
|
cssId: "rec2100-hlg",
|
2651
2651
|
name: "REC.2100-HLG",
|
@@ -2653,27 +2653,27 @@ var ks = new T({
|
|
2653
2653
|
base: he,
|
2654
2654
|
toBase(r) {
|
2655
2655
|
return r.map(function(o) {
|
2656
|
-
return o <= 0.5 ? o ** 2 / 3 * Ce : (Math.exp((o -
|
2656
|
+
return o <= 0.5 ? o ** 2 / 3 * Ce : (Math.exp((o - ot) / Jr) + Qr) / 12 * Ce;
|
2657
2657
|
});
|
2658
2658
|
},
|
2659
2659
|
fromBase(r) {
|
2660
2660
|
return r.map(function(o) {
|
2661
|
-
return o /= Ce, o <= 1 / 12 ? Math.sqrt(3 * o) :
|
2661
|
+
return o /= Ce, o <= 1 / 12 ? Math.sqrt(3 * o) : Jr * Math.log(12 * o - Qr) + ot;
|
2662
2662
|
});
|
2663
2663
|
}
|
2664
2664
|
});
|
2665
|
-
const
|
2665
|
+
const Vt = {};
|
2666
2666
|
po.add("chromatic-adaptation-start", (r) => {
|
2667
|
-
r.options.method && (r.M =
|
2667
|
+
r.options.method && (r.M = Jt(r.W1, r.W2, r.options.method));
|
2668
2668
|
});
|
2669
2669
|
po.add("chromatic-adaptation-end", (r) => {
|
2670
|
-
r.M || (r.M =
|
2670
|
+
r.M || (r.M = Jt(r.W1, r.W2, r.options.method));
|
2671
2671
|
});
|
2672
2672
|
function me({ id: r, toCone_M: o, fromCone_M: e }) {
|
2673
|
-
|
2673
|
+
Vt[r] = arguments[0];
|
2674
2674
|
}
|
2675
|
-
function
|
2676
|
-
let t =
|
2675
|
+
function Jt(r, o, e = "Bradford") {
|
2676
|
+
let t = Vt[e], [a, l, s] = $(t.toCone_M, r), [n, i, c] = $(t.toCone_M, o), u = [
|
2677
2677
|
[n / a, 0, 0],
|
2678
2678
|
[0, i / l, 0],
|
2679
2679
|
[0, 0, c / s]
|
@@ -2757,16 +2757,16 @@ Object.assign(j, {
|
|
2757
2757
|
F11: [1.00962, 1, 0.6435]
|
2758
2758
|
});
|
2759
2759
|
j.ACES = [0.32168 / 0.33767, 1, (1 - 0.32168 - 0.33767) / 0.33767];
|
2760
|
-
const
|
2760
|
+
const ks = [
|
2761
2761
|
[0.6624541811085053, 0.13400420645643313, 0.1561876870049078],
|
2762
2762
|
[0.27222871678091454, 0.6740817658111484, 0.05368951740793705],
|
2763
2763
|
[-0.005574649490394108, 0.004060733528982826, 1.0103391003129971]
|
2764
|
-
],
|
2764
|
+
], Ms = [
|
2765
2765
|
[1.6410233796943257, -0.32480329418479, -0.23642469523761225],
|
2766
2766
|
[-0.6636628587229829, 1.6153315916573379, 0.016756347685530137],
|
2767
2767
|
[0.011721894328375376, -0.008284441996237409, 0.9883948585390215]
|
2768
2768
|
];
|
2769
|
-
var
|
2769
|
+
var Qt = new T({
|
2770
2770
|
id: "acescg",
|
2771
2771
|
cssId: "--acescg",
|
2772
2772
|
name: "ACEScg",
|
@@ -2789,11 +2789,11 @@ var oa = new T({
|
|
2789
2789
|
},
|
2790
2790
|
referred: "scene",
|
2791
2791
|
white: j.ACES,
|
2792
|
-
toXYZ_M:
|
2793
|
-
fromXYZ_M:
|
2792
|
+
toXYZ_M: ks,
|
2793
|
+
fromXYZ_M: Ms
|
2794
2794
|
});
|
2795
2795
|
const Vo = 2 ** -16, ke = -0.35828683, Jo = (Math.log2(65504) + 9.72) / 17.52;
|
2796
|
-
var
|
2796
|
+
var $s = new T({
|
2797
2797
|
id: "acescc",
|
2798
2798
|
cssId: "--acescc",
|
2799
2799
|
name: "ACEScc",
|
@@ -2819,7 +2819,7 @@ var Ss = new T({
|
|
2819
2819
|
}
|
2820
2820
|
},
|
2821
2821
|
referred: "scene",
|
2822
|
-
base:
|
2822
|
+
base: Qt,
|
2823
2823
|
// from section 4.4.2 Decoding Function
|
2824
2824
|
toBase(r) {
|
2825
2825
|
const o = -0.3013698630136986;
|
@@ -2835,42 +2835,42 @@ var Ss = new T({
|
|
2835
2835
|
}
|
2836
2836
|
// encoded media white (rgb 1,1,1) => linear [ 222.861, 222.861, 222.861 ]
|
2837
2837
|
// encoded media black (rgb 0,0,0) => linear [ 0.0011857, 0.0011857, 0.0011857]
|
2838
|
-
}),
|
2838
|
+
}), et = /* @__PURE__ */ Object.freeze({
|
2839
2839
|
__proto__: null,
|
2840
|
-
A98RGB:
|
2841
|
-
A98RGB_Linear:
|
2842
|
-
ACEScc:
|
2843
|
-
ACEScg:
|
2844
|
-
CAM16_JMh:
|
2840
|
+
A98RGB: is,
|
2841
|
+
A98RGB_Linear: Yt,
|
2842
|
+
ACEScc: $s,
|
2843
|
+
ACEScg: Qt,
|
2844
|
+
CAM16_JMh: gl,
|
2845
2845
|
HCT: Lo,
|
2846
|
-
HPLuv:
|
2847
|
-
HSL:
|
2848
|
-
HSLuv:
|
2849
|
-
HSV:
|
2850
|
-
HWB:
|
2846
|
+
HPLuv: vs,
|
2847
|
+
HSL: Ut,
|
2848
|
+
HSLuv: zs,
|
2849
|
+
HSV: Xt,
|
2850
|
+
HWB: ls,
|
2851
2851
|
ICTCP: Pe,
|
2852
2852
|
JzCzHz: Re,
|
2853
|
-
Jzazbz:
|
2853
|
+
Jzazbz: St,
|
2854
2854
|
LCH: Fo,
|
2855
2855
|
LCHuv: Xe,
|
2856
2856
|
Lab: Y,
|
2857
2857
|
Lab_D65: Be,
|
2858
|
-
Luv:
|
2859
|
-
OKLCH:
|
2858
|
+
Luv: Kt,
|
2859
|
+
OKLCH: ps,
|
2860
2860
|
OKLab: So,
|
2861
|
-
P3:
|
2862
|
-
P3_Linear:
|
2863
|
-
ProPhoto:
|
2864
|
-
ProPhoto_Linear:
|
2865
|
-
REC_2020:
|
2861
|
+
P3: jt,
|
2862
|
+
P3_Linear: Ft,
|
2863
|
+
ProPhoto: ms,
|
2864
|
+
ProPhoto_Linear: Gt,
|
2865
|
+
REC_2020: Ot,
|
2866
2866
|
REC_2020_Linear: he,
|
2867
|
-
REC_2100_HLG:
|
2868
|
-
REC_2100_PQ:
|
2867
|
+
REC_2100_HLG: Cs,
|
2868
|
+
REC_2100_PQ: xs,
|
2869
2869
|
XYZ_ABS_D65: qe,
|
2870
2870
|
XYZ_D50: Te,
|
2871
2871
|
XYZ_D65: B,
|
2872
2872
|
sRGB: Ao,
|
2873
|
-
sRGB_Linear:
|
2873
|
+
sRGB_Linear: Lt
|
2874
2874
|
});
|
2875
2875
|
let _ = class D {
|
2876
2876
|
/**
|
@@ -2915,7 +2915,7 @@ let _ = class D {
|
|
2915
2915
|
};
|
2916
2916
|
}
|
2917
2917
|
display(...o) {
|
2918
|
-
let e =
|
2918
|
+
let e = Al(this, ...o);
|
2919
2919
|
return e.color = new D(e.color), e;
|
2920
2920
|
}
|
2921
2921
|
/**
|
@@ -2961,33 +2961,33 @@ _.defineFunctions({
|
|
2961
2961
|
set: no,
|
2962
2962
|
setAll: De,
|
2963
2963
|
to: M,
|
2964
|
-
equals:
|
2964
|
+
equals: Rl,
|
2965
2965
|
inGamut: yo,
|
2966
2966
|
toGamut: go,
|
2967
|
-
distance:
|
2968
|
-
toString:
|
2967
|
+
distance: $t,
|
2968
|
+
toString: Io
|
2969
2969
|
});
|
2970
2970
|
Object.assign(_, {
|
2971
|
-
util:
|
2971
|
+
util: Aa,
|
2972
2972
|
hooks: po,
|
2973
2973
|
WHITES: j,
|
2974
2974
|
Space: g,
|
2975
2975
|
spaces: g.registry,
|
2976
|
-
parse:
|
2976
|
+
parse: kt,
|
2977
2977
|
// Global defaults one may want to configure
|
2978
2978
|
defaults: G
|
2979
2979
|
});
|
2980
|
-
for (let r of Object.keys(
|
2981
|
-
g.register(
|
2980
|
+
for (let r of Object.keys(et))
|
2981
|
+
g.register(et[r]);
|
2982
2982
|
for (let r in g.registry)
|
2983
|
-
|
2983
|
+
Ie(r, g.registry[r]);
|
2984
2984
|
po.add("colorspace-init-end", (r) => {
|
2985
2985
|
var o;
|
2986
|
-
|
2987
|
-
|
2986
|
+
Ie(r.id, r), (o = r.aliases) == null || o.forEach((e) => {
|
2987
|
+
Ie(e, r);
|
2988
2988
|
});
|
2989
2989
|
});
|
2990
|
-
function
|
2990
|
+
function Ie(r, o) {
|
2991
2991
|
let e = r.replace(/-/g, "_");
|
2992
2992
|
Object.defineProperty(_.prototype, e, {
|
2993
2993
|
// Convert coords to coords in another colorspace and return them
|
@@ -3034,13 +3034,13 @@ function Oe(r, o) {
|
|
3034
3034
|
_.extend(Eo);
|
3035
3035
|
_.extend({ deltaE: Bo });
|
3036
3036
|
Object.assign(_, { deltaEMethods: Eo });
|
3037
|
-
_.extend(
|
3038
|
-
_.extend({ contrast:
|
3039
|
-
_.extend(
|
3040
|
-
_.extend(
|
3041
|
-
_.extend(
|
3037
|
+
_.extend(rs);
|
3038
|
+
_.extend({ contrast: Vl });
|
3039
|
+
_.extend(Ql);
|
3040
|
+
_.extend(Hl);
|
3041
|
+
_.extend(as);
|
3042
3042
|
_.extend(te);
|
3043
|
-
class
|
3043
|
+
class oa {
|
3044
3044
|
/**
|
3045
3045
|
* Creates an instance of ColorController.
|
3046
3046
|
*
|
@@ -3080,63 +3080,31 @@ class ea {
|
|
3080
3080
|
isValid: !1,
|
3081
3081
|
alpha: 1
|
3082
3082
|
}, n = [
|
3083
|
-
// With commas
|
3084
3083
|
/rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d*\.?\d+)\s*\)/i,
|
3085
|
-
// rgba(r, g, b, a)
|
3086
3084
|
/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/i,
|
3087
|
-
// rgb(r, g, b)
|
3088
|
-
// With spaces
|
3089
3085
|
/^rgba\s+(\d{1,3})\s+(\d{1,3})\s+(\d{1,3})\s+(0|0?\.\d+|1)\s*$/i,
|
3090
|
-
// rgba r g b a
|
3091
3086
|
/^rgb\s+(\d{1,3})\s+(\d{1,3})\s+(\d{1,3})\s*$/i,
|
3092
|
-
// rgb r g b
|
3093
|
-
// Spaces inside parentheses
|
3094
3087
|
/^rgba\(\s*(\d{1,3})\s+(\d{1,3})\s+(\d{1,3})\s+(\d*\.?\d+)\s*\)$/i,
|
3095
|
-
// rgba(r g b a)
|
3096
3088
|
/^rgb\(\s*(\d{1,3})\s+(\d{1,3})\s+(\d{1,3})\s*\)$/i,
|
3097
|
-
// rgb(r g b)
|
3098
|
-
// Percentage values
|
3099
3089
|
/rgb\(\s*(100|[0-9]{1,2}%)\s*,\s*(100|[0-9]{1,2}%)\s*,\s*(100|[0-9]{1,2}%)\s*\)/i,
|
3100
|
-
// rgb(r%, g%, b%)
|
3101
3090
|
/rgba\(\s*(100|[0-9]{1,2})%\s*,\s*(100|[0-9]{1,2})%\s*,\s*(100|[0-9]{1,2})%\s*,\s*(\d*\.?\d+)\s*\)/i
|
3102
|
-
// rgba(r%, g%, b%, a)
|
3103
3091
|
], i = [
|
3104
|
-
// With commas
|
3105
3092
|
/hsla\(\s*(\d{1,3})\s*,\s*(\d{1,3}%?)\s*,\s*(\d{1,3}%?)\s*,\s*(\d*\.?\d+)\s*\)/i,
|
3106
|
-
// hsla(h, s, l, a)
|
3107
3093
|
/hsl\(\s*(\d{1,3})\s*,\s*(\d{1,3}%?)\s*,\s*(\d{1,3}%?)\s*\)/i,
|
3108
|
-
// hsl(h, s, l)
|
3109
|
-
// With spaces
|
3110
3094
|
/^hsla\s+(\d{1,3})\s+(\d{1,3}%?)\s+(\d{1,3}%?)\s+(\d*\.?\d+)\s*$/i,
|
3111
|
-
// hsla h s l a
|
3112
3095
|
/^hsl\s+(\d{1,3})\s+(\d{1,3}%?)\s+(\d{1,3}%?)\s*$/i,
|
3113
|
-
// hsl h s l
|
3114
|
-
// Spaces inside parentheses
|
3115
3096
|
/^hsla\(\s*(\d{1,3})\s+(\d{1,3}%?)\s+(\d{1,3}%?)\s+(\d*\.?\d+)\s*\)$/i,
|
3116
|
-
// hsla(h s l a)
|
3117
3097
|
/^hsl\(\s*(\d{1,3})\s+(\d{1,3}%?)\s+(\d{1,3}%?)\s*\)$/i
|
3118
|
-
// hsl(h s l)
|
3119
3098
|
], c = [
|
3120
|
-
// With commas
|
3121
3099
|
/hsva\(\s*(\d{1,3})\s*,\s*(\d{1,3}%?)\s*,\s*(\d{1,3}%?)\s*,\s*(\d*\.?\d+)\s*\)/i,
|
3122
|
-
// hsva(h, s, v, a)
|
3123
3100
|
/hsv\(\s*(\d{1,3})\s*,\s*(\d{1,3}%?)\s*,\s*(\d{1,3}%?)\s*\)/i,
|
3124
|
-
// hsv(h, s, v)
|
3125
|
-
// With spaces
|
3126
3101
|
/^hsva\s+(\d{1,3})\s+(\d{1,3}%?)\s+(\d{1,3}%?)\s+(\d*\.?\d+)\s*$/i,
|
3127
|
-
// hsva h s v a
|
3128
3102
|
/^hsv\s+(\d{1,3})\s+(\d{1,3}%?)\s+(\d{1,3}%?)\s*$/i,
|
3129
|
-
// hsv h s v
|
3130
|
-
// Spaces inside parentheses
|
3131
3103
|
/^hsva\(\s*(\d{1,3})\s+(\d{1,3}%?)\s+(\d{1,3}%?)\s+(\d*\.?\d+)\s*\)$/i,
|
3132
|
-
// hsva(h s v a)
|
3133
3104
|
/^hsv\(\s*(\d{1,3})\s+(\d{1,3}%?)\s+(\d{1,3}%?)\s*\)$/i
|
3134
|
-
// hsv(h s v)
|
3135
3105
|
], u = [
|
3136
|
-
/^#([A-Fa-f0-9]{6})([
|
3137
|
-
|
3138
|
-
/^#([A-Fa-f0-9]{3})([A-Fa-f0-9]{1})?$/
|
3139
|
-
// 3-digit hex with optional hex alpha
|
3106
|
+
/^#([A-Fa-f0-9]{6})(?:\s*([01](?:\.\d+)?))?$/,
|
3107
|
+
/^#([A-Fa-f0-9]{3})(?:\s*([01](?:\.\d+)?))?$/
|
3140
3108
|
], h = (e = n.find((p) => p.test(o))) == null ? void 0 : e.exec(o), d = (t = i.find((p) => p.test(o))) == null ? void 0 : t.exec(o), f = (a = c.find((p) => p.test(o))) == null ? void 0 : a.exec(o), b = (l = u.find((p) => p.test(o))) == null ? void 0 : l.exec(o);
|
3141
3109
|
if (h) {
|
3142
3110
|
const [, p, z, w, y] = h.filter(
|
@@ -3157,7 +3125,7 @@ class ea {
|
|
3157
3125
|
const [, p, z] = b, w = (S) => (S.length === 1 && (S = S + S), Number.parseInt(S, 16) / 255);
|
3158
3126
|
let y, C, x;
|
3159
3127
|
p.length === 3 ? (y = w(p.slice(0, 1)), C = w(p.slice(1, 2)), x = w(p.slice(2, 3))) : (y = w(p.slice(0, 2)), C = w(p.slice(2, 4)), x = w(p.slice(4, 6)));
|
3160
|
-
const k = z ?
|
3128
|
+
const k = z ? Number(z) : 1;
|
3161
3129
|
s.spaceId = "srgb", s.coords = [y, C, x], s.alpha = k, s.isValid = y >= 0 && y <= 1 && C >= 0 && C <= 1 && x >= 0 && x <= 1 && k >= 0 && k <= 1;
|
3162
3130
|
}
|
3163
3131
|
return s;
|
@@ -3422,25 +3390,25 @@ class ea {
|
|
3422
3390
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
3423
3391
|
* SOFTWARE.
|
3424
3392
|
* */
|
3425
|
-
const
|
3393
|
+
const Ss = () => {
|
3426
3394
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
3427
3395
|
const r = document.createElement("style");
|
3428
3396
|
r.setAttribute("data-luzmo-vars", ""), r.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-informative-color: #1a77e9;--luzmo-informative-color-rgb: 26, 119, 233;--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}', document.head.appendChild(r);
|
3429
3397
|
}
|
3430
3398
|
};
|
3431
|
-
|
3432
|
-
const
|
3433
|
-
var
|
3434
|
-
for (var a = t > 1 ? void 0 : t ?
|
3399
|
+
Ss();
|
3400
|
+
const _s = "@media (forced-colors: active){:host{--highcontrast-color-area-border-color-disabled: GrayText;--highcontrast-color-area-border-color: Canvas;--highcontrast-color-area-fill-color-disabled: Canvas}.gradient,:host([disabled]){forced-color-adjust:none}}:host{cursor:default;-webkit-user-select:none;user-select:none;min-inline-size:var(--luzmo-color-area-min-width, 64px);min-block-size:var(--luzmo-color-area-min-height, 64px);inline-size:var(--luzmo-color-area-width, 192px);block-size:var(--luzmo-color-area-height, 192px);box-sizing:border-box;border-radius:var(--luzmo-color-area-border-radius, var(--luzmo-border-radius-s));border:var(--luzmo-color-area-border-width, var(--luzmo-border-width)) solid var(--highcontrast-color-area-border-color, var(--luzmo-color-area-border-color, var(--luzmo-border-color)));display:inline-block;position:relative}:host([focused]){z-index:1}:host([disabled]){pointer-events:none;background:var(--highcontrast-color-area-fill-color-disabled, var(--luzmo-color-area-disabled-background-color, var(--luzmo-dimmed-color)));border:var(--luzmo-color-area-border-width, var(--luzmo-border-width)) solid var(--highcontrast-color-area-border-color-disabled)}:host([disabled]) .gradient{display:none}.handle{transform:translate(calc(var(--luzmo-color-area-width, 192px) - var(--luzmo-border-width)));inset-block-start:0}.handle:dir(rtl),:host([dir=rtl]) .handle{inset-inline-end:0}.gradient{inline-size:100%;block-size:100%;border-radius:var(--luzmo-color-area-border-radius, var(--luzmo-border-radius-s))}.slider{opacity:0;inline-size:100%;block-size:100%;z-index:0;pointer-events:none;margin:0;position:absolute;inset-block-start:0;inset-inline-start:0}:host{touch-action:none}:host:before{pointer-events:none}.gradient{overflow:hidden}.handle{transform:translate(var(--luzmo-color-area-default-width))}::slotted(*){width:100%;height:100%}:host([dir=rtl]) .gradient{transform:scaleX(-1)}.slider[orient=vertical]{-webkit-appearance:slider-vertical;-moz-appearance:slider-vertical;appearance:slider-vertical}.slider:focus{z-index:1}.fieldset{border:0;margin:0;padding:0}";
|
3401
|
+
var Es = Object.defineProperty, As = Object.getOwnPropertyDescriptor, L = (r, o, e, t) => {
|
3402
|
+
for (var a = t > 1 ? void 0 : t ? As(o, e) : o, l = r.length - 1, s; l >= 0; l--)
|
3435
3403
|
(s = r[l]) && (a = (t ? s(o, e, a) : s(a)) || a);
|
3436
|
-
return t && a &&
|
3404
|
+
return t && a && Es(o, e, a), a;
|
3437
3405
|
};
|
3438
|
-
let
|
3406
|
+
let O = class extends jo {
|
3439
3407
|
constructor() {
|
3440
|
-
super(...arguments), this.disabled = !1, this.focused = !1, this.labelX = "saturation", this.labelY = "luminosity", this.isLTR = !0, this.languageResolver = new
|
3408
|
+
super(...arguments), this.disabled = !1, this.focused = !1, this.labelX = "saturation", this.labelY = "luminosity", this.isLTR = !0, this.languageResolver = new ht(this), this.colorController = new oa(this, { manageAs: "hsv" }), this.activeAxis = "x", this.step = 0.01, this.altered = 0, this.activeKeys = /* @__PURE__ */ new Set(), this._valueChanged = !1, this._pointerDown = !1;
|
3441
3409
|
}
|
3442
3410
|
static get styles() {
|
3443
|
-
return [io(
|
3411
|
+
return [io(_s)];
|
3444
3412
|
}
|
3445
3413
|
get hue() {
|
3446
3414
|
return this.colorController.hue;
|
@@ -3605,7 +3573,7 @@ let I = class extends jo {
|
|
3605
3573
|
o.button === 0 && (o.stopPropagation(), o.preventDefault(), this.handle.dispatchEvent(new PointerEvent("pointerdown", o)), this.handlePointermove(o));
|
3606
3574
|
}
|
3607
3575
|
render() {
|
3608
|
-
const { width: o = 0, height: e = 0 } = this.boundingClientRect || {}, t =
|
3576
|
+
const { width: o = 0, height: e = 0 } = this.boundingClientRect || {}, t = ma() || pa(), a = "Color Picker", l = wo(t ? void 0 : "2d slider"), s = this.labelX, n = this.labelY, i = new Intl.NumberFormat(this.languageResolver.language, {
|
3609
3577
|
style: "percent",
|
3610
3578
|
unitDisplay: "narrow"
|
3611
3579
|
}).format(this.x), c = new Intl.NumberFormat(this.languageResolver.language, {
|
@@ -3631,7 +3599,7 @@ let I = class extends jo {
|
|
3631
3599
|
color=${this.colorController.getHslString()}
|
3632
3600
|
?disabled=${this.disabled}
|
3633
3601
|
style=${`transform: translate(${(this.isLTR ? this.x : 1 - this.x) * o}px, ${e - this.y * e}px);`}
|
3634
|
-
${
|
3602
|
+
${dt({
|
3635
3603
|
start: ["pointerdown", this.handlePointerdown],
|
3636
3604
|
streamInside: ["pointermove", this.handlePointermove],
|
3637
3605
|
end: [
|
@@ -3728,53 +3696,53 @@ let I = class extends jo {
|
|
3728
3696
|
};
|
3729
3697
|
L([
|
3730
3698
|
m({ type: String, reflect: !0 })
|
3731
|
-
],
|
3699
|
+
], O.prototype, "dir", 2);
|
3732
3700
|
L([
|
3733
3701
|
m({ type: Boolean, reflect: !0 })
|
3734
|
-
],
|
3702
|
+
], O.prototype, "disabled", 2);
|
3735
3703
|
L([
|
3736
3704
|
m({ type: Boolean, reflect: !0 })
|
3737
|
-
],
|
3705
|
+
], O.prototype, "focused", 2);
|
3738
3706
|
L([
|
3739
3707
|
m({ type: String, attribute: "label-x" })
|
3740
|
-
],
|
3708
|
+
], O.prototype, "labelX", 2);
|
3741
3709
|
L([
|
3742
3710
|
m({ type: String, attribute: "label-y" })
|
3743
|
-
],
|
3711
|
+
], O.prototype, "labelY", 2);
|
3744
3712
|
L([
|
3745
3713
|
m({ type: Boolean, attribute: "is-ltr" })
|
3746
|
-
],
|
3714
|
+
], O.prototype, "isLTR", 2);
|
3747
3715
|
L([
|
3748
|
-
|
3749
|
-
],
|
3716
|
+
V(".handle")
|
3717
|
+
], O.prototype, "handle", 2);
|
3750
3718
|
L([
|
3751
3719
|
m({ type: Number })
|
3752
|
-
],
|
3720
|
+
], O.prototype, "hue", 1);
|
3753
3721
|
L([
|
3754
3722
|
m({ type: String })
|
3755
|
-
],
|
3723
|
+
], O.prototype, "value", 1);
|
3756
3724
|
L([
|
3757
3725
|
m({ type: String })
|
3758
|
-
],
|
3726
|
+
], O.prototype, "color", 1);
|
3759
3727
|
L([
|
3760
3728
|
m({ attribute: !1 })
|
3761
|
-
],
|
3729
|
+
], O.prototype, "activeAxis", 2);
|
3762
3730
|
L([
|
3763
3731
|
m({ type: Number })
|
3764
|
-
],
|
3732
|
+
], O.prototype, "x", 1);
|
3765
3733
|
L([
|
3766
3734
|
m({ type: Number })
|
3767
|
-
],
|
3735
|
+
], O.prototype, "y", 1);
|
3768
3736
|
L([
|
3769
3737
|
m({ type: Number })
|
3770
|
-
],
|
3738
|
+
], O.prototype, "step", 2);
|
3771
3739
|
L([
|
3772
|
-
|
3773
|
-
],
|
3740
|
+
V('[name="x"]')
|
3741
|
+
], O.prototype, "inputX", 2);
|
3774
3742
|
L([
|
3775
|
-
|
3776
|
-
],
|
3777
|
-
customElements.get("luzmo-color-area") || customElements.define("luzmo-color-area",
|
3743
|
+
V('[name="y"]')
|
3744
|
+
], O.prototype, "inputY", 2);
|
3745
|
+
customElements.get("luzmo-color-area") || customElements.define("luzmo-color-area", O);
|
3778
3746
|
/*! * Lucero - The design system for Luzmo.
|
3779
3747
|
*
|
3780
3748
|
* Copyright © 2025 Luzmo
|
@@ -3792,25 +3760,25 @@ customElements.get("luzmo-color-area") || customElements.define("luzmo-color-are
|
|
3792
3760
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
3793
3761
|
* SOFTWARE.
|
3794
3762
|
* */
|
3795
|
-
const
|
3763
|
+
const Rs = () => {
|
3796
3764
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
3797
3765
|
const r = document.createElement("style");
|
3798
3766
|
r.setAttribute("data-luzmo-vars", ""), r.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-informative-color: #1a77e9;--luzmo-informative-color-rgb: 26, 119, 233;--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}', document.head.appendChild(r);
|
3799
3767
|
}
|
3800
3768
|
};
|
3801
|
-
|
3802
|
-
const
|
3803
|
-
var
|
3769
|
+
Rs();
|
3770
|
+
const Ps = ":host{position:relative}";
|
3771
|
+
var Hs = Object.defineProperty, Ns = (r, o, e, t) => {
|
3804
3772
|
for (var a = void 0, l = r.length - 1, s; l >= 0; l--)
|
3805
3773
|
(s = r[l]) && (a = s(o, e, a) || a);
|
3806
|
-
return a &&
|
3774
|
+
return a && Hs(o, e, a), a;
|
3807
3775
|
};
|
3808
|
-
class
|
3776
|
+
class ea extends ga {
|
3809
3777
|
constructor() {
|
3810
|
-
super(), this.viewColor = !1, this.
|
3778
|
+
super(), this.viewColor = !1, this._value = "", this.colorController = new oa(this);
|
3811
3779
|
}
|
3812
3780
|
static get styles() {
|
3813
|
-
return [...super.styles, io(
|
3781
|
+
return [...super.styles, io(Ps)];
|
3814
3782
|
}
|
3815
3783
|
set value(o) {
|
3816
3784
|
if (o === this.value)
|
@@ -3821,43 +3789,31 @@ class Ye extends fa {
|
|
3821
3789
|
get value() {
|
3822
3790
|
return this._value;
|
3823
3791
|
}
|
3824
|
-
updated(o) {
|
3825
|
-
super.updated(o), o.has("noAlphaChannel") && this.checkValidity();
|
3826
|
-
}
|
3827
3792
|
renderColorHandle() {
|
3828
3793
|
return this.viewColor && this.valid ? N`
|
3829
|
-
<
|
3794
|
+
<sp-color-handle
|
3830
3795
|
size="m"
|
3831
3796
|
color=${this.colorController.getColor("srgb").toString()}
|
3832
|
-
></
|
3797
|
+
></sp-color-handle>
|
3833
3798
|
` : N``;
|
3834
3799
|
}
|
3835
3800
|
getColorValue() {
|
3836
3801
|
return this.valid ? this.colorController.getColor("srgb").toString() : "";
|
3837
3802
|
}
|
3838
3803
|
render() {
|
3839
|
-
return this.viewColor && Promise.resolve().then(() =>
|
3804
|
+
return this.viewColor && Promise.resolve().then(() => $a), N` ${super.render()} ${this.renderColorHandle()} `;
|
3840
3805
|
}
|
3841
3806
|
checkValidity() {
|
3842
3807
|
let o = super.checkValidity();
|
3843
|
-
|
3844
|
-
|
3845
|
-
|
3846
|
-
);
|
3847
|
-
let t = !1;
|
3848
|
-
this.value.startsWith("rgba") ? t = !0 : this.value.startsWith("rgb") ? t = !1 : this.value.startsWith("hsla") ? t = !0 : this.value.startsWith("hsl") ? t = !1 : this.value.startsWith("#") && (t = this.value.length === 9), this.valid = o = e.isValid && (!this.noAlphaChannel || !t), this.invalid = !o, this.valid && (this.colorController.color = this.value);
|
3849
|
-
} else
|
3850
|
-
this.valid = this.invalid = !1;
|
3851
|
-
return o;
|
3808
|
+
return this.value ? (this.valid = o = this.colorController.validateColorString(
|
3809
|
+
this.value
|
3810
|
+
).isValid, this.invalid = !o, this.valid && (this.colorController.color = this.value)) : this.valid = this.invalid = !1, o;
|
3852
3811
|
}
|
3853
3812
|
}
|
3854
|
-
|
3813
|
+
Ns([
|
3855
3814
|
m({ type: Boolean, attribute: "view-color" })
|
3856
|
-
],
|
3857
|
-
|
3858
|
-
m({ type: Boolean, attribute: "no-alpha-channel" })
|
3859
|
-
], Ye.prototype, "noAlphaChannel");
|
3860
|
-
customElements.get("luzmo-color-field") || customElements.define("luzmo-color-field", Ye);
|
3815
|
+
], ea.prototype, "viewColor");
|
3816
|
+
customElements.get("luzmo-color-field") || customElements.define("luzmo-color-field", ea);
|
3861
3817
|
/*! * Lucero - The design system for Luzmo.
|
3862
3818
|
*
|
3863
3819
|
* Copyright © 2025 Luzmo
|
@@ -3875,9 +3831,9 @@ customElements.get("luzmo-color-field") || customElements.define("luzmo-color-fi
|
|
3875
3831
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
3876
3832
|
* SOFTWARE.
|
3877
3833
|
* */
|
3878
|
-
function
|
3834
|
+
function I(r, o) {
|
3879
3835
|
Bs(r) && (r = "100%");
|
3880
|
-
const e =
|
3836
|
+
const e = Is(r);
|
3881
3837
|
return r = o === 360 ? r : Math.min(o, Math.max(0, parseFloat(r))), e && (r = parseInt(String(r * o), 10) / 100), Math.abs(r - o) < 1e-6 ? 1 : (o === 360 ? r = (r < 0 ? r % o + o : r % o) / parseFloat(String(o)) : r = r % o / parseFloat(String(o)), r);
|
3882
3838
|
}
|
3883
3839
|
function Qo(r) {
|
@@ -3886,10 +3842,10 @@ function Qo(r) {
|
|
3886
3842
|
function Bs(r) {
|
3887
3843
|
return typeof r == "string" && r.indexOf(".") !== -1 && parseFloat(r) === 1;
|
3888
3844
|
}
|
3889
|
-
function
|
3845
|
+
function Is(r) {
|
3890
3846
|
return typeof r == "string" && r.indexOf("%") !== -1;
|
3891
3847
|
}
|
3892
|
-
function
|
3848
|
+
function ra(r) {
|
3893
3849
|
return r = parseFloat(r), (isNaN(r) || r < 0 || r > 1) && (r = 1), r;
|
3894
3850
|
}
|
3895
3851
|
function oe(r) {
|
@@ -3898,15 +3854,15 @@ function oe(r) {
|
|
3898
3854
|
function vo(r) {
|
3899
3855
|
return r.length === 1 ? "0" + r : String(r);
|
3900
3856
|
}
|
3901
|
-
function
|
3857
|
+
function Os(r, o, e) {
|
3902
3858
|
return {
|
3903
|
-
r:
|
3904
|
-
g:
|
3905
|
-
b:
|
3859
|
+
r: I(r, 255) * 255,
|
3860
|
+
g: I(o, 255) * 255,
|
3861
|
+
b: I(e, 255) * 255
|
3906
3862
|
};
|
3907
3863
|
}
|
3908
|
-
function
|
3909
|
-
r =
|
3864
|
+
function rt(r, o, e) {
|
3865
|
+
r = I(r, 255), o = I(o, 255), e = I(e, 255);
|
3910
3866
|
const t = Math.max(r, o, e), a = Math.min(r, o, e);
|
3911
3867
|
let l = 0, s = 0;
|
3912
3868
|
const n = (t + a) / 2;
|
@@ -3934,7 +3890,7 @@ function Me(r, o, e) {
|
|
3934
3890
|
}
|
3935
3891
|
function Fs(r, o, e) {
|
3936
3892
|
let t, a, l;
|
3937
|
-
if (r =
|
3893
|
+
if (r = I(r, 360), o = I(o, 100), e = I(e, 100), o === 0)
|
3938
3894
|
a = e, l = e, t = e;
|
3939
3895
|
else {
|
3940
3896
|
const s = e < 0.5 ? e * (1 + o) : e + o - e * o, n = 2 * e - s;
|
@@ -3942,8 +3898,8 @@ function Fs(r, o, e) {
|
|
3942
3898
|
}
|
3943
3899
|
return { r: t * 255, g: a * 255, b: l * 255 };
|
3944
3900
|
}
|
3945
|
-
function
|
3946
|
-
r =
|
3901
|
+
function tt(r, o, e) {
|
3902
|
+
r = I(r, 255), o = I(o, 255), e = I(e, 255);
|
3947
3903
|
const t = Math.max(r, o, e), a = Math.min(r, o, e);
|
3948
3904
|
let l = 0;
|
3949
3905
|
const s = t, n = t - a, i = t === 0 ? 0 : n / t;
|
@@ -3966,11 +3922,11 @@ function at(r, o, e) {
|
|
3966
3922
|
return { h: l, s: i, v: s };
|
3967
3923
|
}
|
3968
3924
|
function Ls(r, o, e) {
|
3969
|
-
r =
|
3925
|
+
r = I(r, 360) * 6, o = I(o, 100), e = I(e, 100);
|
3970
3926
|
const t = Math.floor(r), a = r - t, l = e * (1 - o), s = e * (1 - a * o), n = e * (1 - (1 - a) * o), i = t % 6, c = [e, s, l, l, n, e][i], u = [n, e, e, s, l, l][i], h = [l, l, n, e, e, s][i];
|
3971
3927
|
return { r: c * 255, g: u * 255, b: h * 255 };
|
3972
3928
|
}
|
3973
|
-
function
|
3929
|
+
function at(r, o, e, t) {
|
3974
3930
|
const a = [
|
3975
3931
|
vo(Math.round(r).toString(16)),
|
3976
3932
|
vo(Math.round(o).toString(16)),
|
@@ -3991,7 +3947,7 @@ function Ds(r, o, e, t) {
|
|
3991
3947
|
const a = r / 100, l = o / 100, s = e / 100, n = t / 100, i = 255 * (1 - a) * (1 - n), c = 255 * (1 - l) * (1 - n), u = 255 * (1 - s) * (1 - n);
|
3992
3948
|
return { r: i, g: c, b: u };
|
3993
3949
|
}
|
3994
|
-
function
|
3950
|
+
function lt(r, o, e) {
|
3995
3951
|
let t = 1 - r / 255, a = 1 - o / 255, l = 1 - e / 255, s = Math.min(t, a, l);
|
3996
3952
|
return s === 1 ? (t = 0, a = 0, l = 0) : (t = (t - s) / (1 - s) * 100, a = (a - s) / (1 - s) * 100, l = (l - s) / (1 - s) * 100), s *= 100, {
|
3997
3953
|
c: Math.round(t),
|
@@ -4003,7 +3959,7 @@ function st(r, o, e) {
|
|
4003
3959
|
function Ts(r) {
|
4004
3960
|
return Math.round(parseFloat(r) * 255).toString(16);
|
4005
3961
|
}
|
4006
|
-
function
|
3962
|
+
function st(r) {
|
4007
3963
|
return U(r) / 255;
|
4008
3964
|
}
|
4009
3965
|
function U(r) {
|
@@ -4016,7 +3972,7 @@ function qs(r) {
|
|
4016
3972
|
b: r & 255
|
4017
3973
|
};
|
4018
3974
|
}
|
4019
|
-
const
|
3975
|
+
const Oe = {
|
4020
3976
|
aliceblue: "#f0f8ff",
|
4021
3977
|
antiquewhite: "#faebd7",
|
4022
3978
|
aqua: "#00ffff",
|
@@ -4168,7 +4124,7 @@ const Ie = {
|
|
4168
4124
|
};
|
4169
4125
|
function Ws(r) {
|
4170
4126
|
let o = { r: 0, g: 0, b: 0 }, e = 1, t = null, a = null, l = null, s = !1, n = !1;
|
4171
|
-
return typeof r == "string" && (r = Ys(r)), typeof r == "object" && (W(r.r) && W(r.g) && W(r.b) ? (o =
|
4127
|
+
return typeof r == "string" && (r = Ys(r)), typeof r == "object" && (W(r.r) && W(r.g) && W(r.b) ? (o = Os(r.r, r.g, r.b), s = !0, n = String(r.r).substr(-1) === "%" ? "prgb" : "rgb") : W(r.h) && W(r.s) && W(r.v) ? (t = oe(r.s), a = oe(r.v), o = Ls(r.h, t, a), s = !0, n = "hsv") : W(r.h) && W(r.s) && W(r.l) ? (t = oe(r.s), l = oe(r.l), o = Fs(r.h, t, l), s = !0, n = "hsl") : W(r.c) && W(r.m) && W(r.y) && W(r.k) && (o = Ds(r.c, r.m, r.y, r.k), s = !0, n = "cmyk"), Object.prototype.hasOwnProperty.call(r, "a") && (e = r.a)), e = ra(e), {
|
4172
4128
|
ok: s,
|
4173
4129
|
format: r.format || n,
|
4174
4130
|
r: Math.min(255, Math.max(o.r, 0)),
|
@@ -4180,7 +4136,7 @@ function Ws(r) {
|
|
4180
4136
|
const Us = "[-\\+]?\\d+%?", Xs = "[-\\+]?\\d*\\.\\d+%?", uo = "(?:" + Xs + ")|(?:" + Us + ")", $e = "[\\s|\\(]+(" + uo + ")[,|\\s]+(" + uo + ")[,|\\s]+(" + uo + ")\\s*\\)?", ee = (
|
4181
4137
|
// eslint-disable-next-line prettier/prettier
|
4182
4138
|
"[\\s|\\(]+(" + uo + ")[,|\\s]+(" + uo + ")[,|\\s]+(" + uo + ")[,|\\s]+(" + uo + ")\\s*\\)?"
|
4183
|
-
),
|
4139
|
+
), K = {
|
4184
4140
|
CSS_UNIT: new RegExp(uo),
|
4185
4141
|
rgb: new RegExp("rgb" + $e),
|
4186
4142
|
rgba: new RegExp("rgba" + ee),
|
@@ -4198,34 +4154,34 @@ function Ys(r) {
|
|
4198
4154
|
if (r = r.trim().toLowerCase(), r.length === 0)
|
4199
4155
|
return !1;
|
4200
4156
|
let o = !1;
|
4201
|
-
if (
|
4202
|
-
r =
|
4157
|
+
if (Oe[r])
|
4158
|
+
r = Oe[r], o = !0;
|
4203
4159
|
else if (r === "transparent")
|
4204
4160
|
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
|
4205
|
-
let e =
|
4206
|
-
return e ? { r: e[1], g: e[2], b: e[3] } : (e =
|
4161
|
+
let e = K.rgb.exec(r);
|
4162
|
+
return e ? { r: e[1], g: e[2], b: e[3] } : (e = K.rgba.exec(r), e ? { r: e[1], g: e[2], b: e[3], a: e[4] } : (e = K.hsl.exec(r), e ? { h: e[1], s: e[2], l: e[3] } : (e = K.hsla.exec(r), e ? { h: e[1], s: e[2], l: e[3], a: e[4] } : (e = K.hsv.exec(r), e ? { h: e[1], s: e[2], v: e[3] } : (e = K.hsva.exec(r), e ? { h: e[1], s: e[2], v: e[3], a: e[4] } : (e = K.cmyk.exec(r), e ? {
|
4207
4163
|
c: e[1],
|
4208
4164
|
m: e[2],
|
4209
4165
|
y: e[3],
|
4210
4166
|
k: e[4]
|
4211
|
-
} : (e =
|
4167
|
+
} : (e = K.hex8.exec(r), e ? {
|
4212
4168
|
r: U(e[1]),
|
4213
4169
|
g: U(e[2]),
|
4214
4170
|
b: U(e[3]),
|
4215
|
-
a:
|
4171
|
+
a: st(e[4]),
|
4216
4172
|
format: o ? "name" : "hex8"
|
4217
|
-
} : (e =
|
4173
|
+
} : (e = K.hex6.exec(r), e ? {
|
4218
4174
|
r: U(e[1]),
|
4219
4175
|
g: U(e[2]),
|
4220
4176
|
b: U(e[3]),
|
4221
4177
|
format: o ? "name" : "hex"
|
4222
|
-
} : (e =
|
4178
|
+
} : (e = K.hex4.exec(r), e ? {
|
4223
4179
|
r: U(e[1] + e[1]),
|
4224
4180
|
g: U(e[2] + e[2]),
|
4225
4181
|
b: U(e[3] + e[3]),
|
4226
|
-
a:
|
4182
|
+
a: st(e[4] + e[4]),
|
4227
4183
|
format: o ? "name" : "hex8"
|
4228
|
-
} : (e =
|
4184
|
+
} : (e = K.hex3.exec(r), e ? {
|
4229
4185
|
r: U(e[1] + e[1]),
|
4230
4186
|
g: U(e[2] + e[2]),
|
4231
4187
|
b: U(e[3] + e[3]),
|
@@ -4233,7 +4189,7 @@ function Ys(r) {
|
|
4233
4189
|
} : !1))))))))));
|
4234
4190
|
}
|
4235
4191
|
function W(r) {
|
4236
|
-
return typeof r == "number" ? !Number.isNaN(r) :
|
4192
|
+
return typeof r == "number" ? !Number.isNaN(r) : K.CSS_UNIT.test(r);
|
4237
4193
|
}
|
4238
4194
|
let H = class A {
|
4239
4195
|
constructor(o = "", e = {}) {
|
@@ -4277,7 +4233,7 @@ let H = class A {
|
|
4277
4233
|
* @param alpha - The new alpha value. The accepted range is 0-1.
|
4278
4234
|
*/
|
4279
4235
|
setAlpha(o) {
|
4280
|
-
return this.a =
|
4236
|
+
return this.a = ra(o), this.roundA = Math.round(100 * this.a) / 100, this;
|
4281
4237
|
}
|
4282
4238
|
/**
|
4283
4239
|
* Returns whether the color is monochrome.
|
@@ -4290,7 +4246,7 @@ let H = class A {
|
|
4290
4246
|
* Returns the object as a HSVA object.
|
4291
4247
|
*/
|
4292
4248
|
toHsv() {
|
4293
|
-
const o =
|
4249
|
+
const o = tt(this.r, this.g, this.b);
|
4294
4250
|
return { h: o.h * 360, s: o.s, v: o.v, a: this.a };
|
4295
4251
|
}
|
4296
4252
|
/**
|
@@ -4298,14 +4254,14 @@ let H = class A {
|
|
4298
4254
|
* "hsva(xxx, xxx, xxx, xx)".
|
4299
4255
|
*/
|
4300
4256
|
toHsvString() {
|
4301
|
-
const o =
|
4257
|
+
const o = tt(this.r, this.g, this.b), e = Math.round(o.h * 360), t = Math.round(o.s * 100), a = Math.round(o.v * 100);
|
4302
4258
|
return this.a === 1 ? `hsv(${e}, ${t}%, ${a}%)` : `hsva(${e}, ${t}%, ${a}%, ${this.roundA})`;
|
4303
4259
|
}
|
4304
4260
|
/**
|
4305
4261
|
* Returns the object as a HSLA object.
|
4306
4262
|
*/
|
4307
4263
|
toHsl() {
|
4308
|
-
const o =
|
4264
|
+
const o = rt(this.r, this.g, this.b);
|
4309
4265
|
return { h: o.h * 360, s: o.s, l: o.l, a: this.a };
|
4310
4266
|
}
|
4311
4267
|
/**
|
@@ -4313,7 +4269,7 @@ let H = class A {
|
|
4313
4269
|
* "hsla(xxx, xxx, xxx, xx)".
|
4314
4270
|
*/
|
4315
4271
|
toHslString() {
|
4316
|
-
const o =
|
4272
|
+
const o = rt(this.r, this.g, this.b), e = Math.round(o.h * 360), t = Math.round(o.s * 100), a = Math.round(o.l * 100);
|
4317
4273
|
return this.a === 1 ? `hsl(${e}, ${t}%, ${a}%)` : `hsla(${e}, ${t}%, ${a}%, ${this.roundA})`;
|
4318
4274
|
}
|
4319
4275
|
/**
|
@@ -4321,7 +4277,7 @@ let H = class A {
|
|
4321
4277
|
* @param allow3Char will shorten hex value to 3 char if possible
|
4322
4278
|
*/
|
4323
4279
|
toHex(o = !1) {
|
4324
|
-
return
|
4280
|
+
return at(this.r, this.g, this.b, o);
|
4325
4281
|
}
|
4326
4282
|
/**
|
4327
4283
|
* Returns the hex value of the color -with a # prefixed.
|
@@ -4374,7 +4330,7 @@ let H = class A {
|
|
4374
4330
|
* Returns the object as a RGBA object.
|
4375
4331
|
*/
|
4376
4332
|
toPercentageRgb() {
|
4377
|
-
const o = (e) => `${Math.round(
|
4333
|
+
const o = (e) => `${Math.round(I(e, 255) * 100)}%`;
|
4378
4334
|
return {
|
4379
4335
|
r: o(this.r),
|
4380
4336
|
g: o(this.g),
|
@@ -4386,16 +4342,16 @@ let H = class A {
|
|
4386
4342
|
* Returns the RGBA relative values interpolated into a string
|
4387
4343
|
*/
|
4388
4344
|
toPercentageRgbString() {
|
4389
|
-
const o = (e) => Math.round(
|
4345
|
+
const o = (e) => Math.round(I(e, 255) * 100);
|
4390
4346
|
return this.a === 1 ? `rgb(${o(this.r)}%, ${o(this.g)}%, ${o(this.b)}%)` : `rgba(${o(this.r)}%, ${o(this.g)}%, ${o(this.b)}%, ${this.roundA})`;
|
4391
4347
|
}
|
4392
4348
|
toCmyk() {
|
4393
4349
|
return {
|
4394
|
-
...
|
4350
|
+
...lt(this.r, this.g, this.b)
|
4395
4351
|
};
|
4396
4352
|
}
|
4397
4353
|
toCmykString() {
|
4398
|
-
const { c: o, m: e, y: t, k: a } =
|
4354
|
+
const { c: o, m: e, y: t, k: a } = lt(this.r, this.g, this.b);
|
4399
4355
|
return `cmyk(${o}, ${e}, ${t}, ${a})`;
|
4400
4356
|
}
|
4401
4357
|
/**
|
@@ -4406,8 +4362,8 @@ let H = class A {
|
|
4406
4362
|
return "transparent";
|
4407
4363
|
if (this.a < 1)
|
4408
4364
|
return !1;
|
4409
|
-
const o = "#" +
|
4410
|
-
for (const [e, t] of Object.entries(
|
4365
|
+
const o = "#" + at(this.r, this.g, this.b, !1);
|
4366
|
+
for (const [e, t] of Object.entries(Oe))
|
4411
4367
|
if (o === t)
|
4412
4368
|
return e;
|
4413
4369
|
return !1;
|
@@ -4582,7 +4538,7 @@ let H = class A {
|
|
4582
4538
|
return this.format === "cmyk" || e.format === "cmyk" ? this.toCmykString() === e.toCmykString() : this.toRgbString() === e.toRgbString();
|
4583
4539
|
}
|
4584
4540
|
};
|
4585
|
-
const
|
4541
|
+
const nt = /^hs[v|l]a?\s?\((\d{1,3}\.?\d*?),?\s?(\d{1,3})/, it = /(^hs[v|l]a?\s?\()\d{1,3}\.?\d*?(,?\s?)\d{1,3}/, ct = /(^hs[v|l]a?\()\d{1,3}/, re = (r, o) => o ? r.toHexString() : r.toHex();
|
4586
4542
|
class Gs {
|
4587
4543
|
constructor(o, {
|
4588
4544
|
applyColorToState: e,
|
@@ -4597,13 +4553,13 @@ class Gs {
|
|
4597
4553
|
hsl: (l, s) => {
|
4598
4554
|
if (this.maintains === "hue") {
|
4599
4555
|
if (s)
|
4600
|
-
return l.toHslString().replace(
|
4556
|
+
return l.toHslString().replace(ct, `$1${this.hue}`);
|
4601
4557
|
const { s: u, l: h, a: d } = l.toHsl();
|
4602
4558
|
return { h: this.hue, s: u, l: h, a: d };
|
4603
4559
|
}
|
4604
4560
|
if (s)
|
4605
4561
|
return l.toHslString().replace(
|
4606
|
-
|
4562
|
+
it,
|
4607
4563
|
`$1${this.hue}$2${this.saturation}`
|
4608
4564
|
);
|
4609
4565
|
const { s: n, l: i, a: c } = l.toHsl();
|
@@ -4612,13 +4568,13 @@ class Gs {
|
|
4612
4568
|
hsv: (l, s) => {
|
4613
4569
|
if (this.maintains === "hue") {
|
4614
4570
|
if (s)
|
4615
|
-
return l.toHsvString().replace(
|
4571
|
+
return l.toHsvString().replace(ct, `$1${this.hue}`);
|
4616
4572
|
const { s: u, v: h, a: d } = l.toHsv();
|
4617
4573
|
return { h: this.hue, s: u, v: h, a: d };
|
4618
4574
|
}
|
4619
4575
|
if (s)
|
4620
4576
|
return l.toHsvString().replace(
|
4621
|
-
|
4577
|
+
it,
|
4622
4578
|
`$1${this.hue}$2${this.saturation}`
|
4623
4579
|
);
|
4624
4580
|
const { s: n, v: i, a: c } = l.toHsv();
|
@@ -4645,7 +4601,7 @@ class Gs {
|
|
4645
4601
|
const { h: l, s, v: n, a: i } = this._color.toHsv();
|
4646
4602
|
let c;
|
4647
4603
|
if (a && t.startsWith("hs")) {
|
4648
|
-
const u =
|
4604
|
+
const u = nt.exec(e);
|
4649
4605
|
if (u !== null) {
|
4650
4606
|
const [, h] = u;
|
4651
4607
|
c = Number(h);
|
@@ -4659,7 +4615,7 @@ class Gs {
|
|
4659
4615
|
setColorMaintainSaturation(o, e, t, a) {
|
4660
4616
|
const { a: l } = this._color.toHsv();
|
4661
4617
|
if (a && t.startsWith("hs")) {
|
4662
|
-
const s =
|
4618
|
+
const s = nt.exec(e);
|
4663
4619
|
if (s !== null) {
|
4664
4620
|
const [, n, i] = s;
|
4665
4621
|
this.hue = Number(n), this.saturation = Number(i);
|
@@ -4747,7 +4703,7 @@ var Ks = Object.defineProperty, Vs = Object.getOwnPropertyDescriptor, Z = (r, o,
|
|
4747
4703
|
};
|
4748
4704
|
let q = class extends Fe {
|
4749
4705
|
constructor() {
|
4750
|
-
super(...arguments), this.disabled = !1, this.focused = !1, this.label = "hue", this.vertical = !1, this.languageResolver = new
|
4706
|
+
super(...arguments), this.disabled = !1, this.focused = !1, this.label = "hue", this.vertical = !1, this.languageResolver = new ht(this), this.colorController = new Gs(this, {
|
4751
4707
|
/* c8 ignore next 3 */
|
4752
4708
|
applyColorToState: () => {
|
4753
4709
|
if (this.mode === "opacity") {
|
@@ -4921,7 +4877,7 @@ let q = class extends Fe {
|
|
4921
4877
|
<div
|
4922
4878
|
class="gradient"
|
4923
4879
|
role="presentation"
|
4924
|
-
style=${
|
4880
|
+
style=${fa(this.getColorSliderStyle)}
|
4925
4881
|
>
|
4926
4882
|
<slot name="gradient"></slot>
|
4927
4883
|
</div>
|
@@ -4934,7 +4890,7 @@ let q = class extends Fe {
|
|
4934
4890
|
color=${this.mode === "opacity" ? this.color : "hsl(" + this.value + ", 100%, 50%)"}
|
4935
4891
|
?disabled=${this.disabled}
|
4936
4892
|
style=${this.handlePositionStyles}
|
4937
|
-
${
|
4893
|
+
${dt({
|
4938
4894
|
start: ["pointerdown", this.handlePointerdown],
|
4939
4895
|
streamInside: ["pointermove", this.handlePointermove],
|
4940
4896
|
end: [
|
@@ -4993,7 +4949,7 @@ Z([
|
|
4993
4949
|
m({ type: Boolean, reflect: !0 })
|
4994
4950
|
], q.prototype, "focused", 2);
|
4995
4951
|
Z([
|
4996
|
-
|
4952
|
+
V(".handle")
|
4997
4953
|
], q.prototype, "handle", 2);
|
4998
4954
|
Z([
|
4999
4955
|
m({ type: String })
|
@@ -5017,7 +4973,7 @@ Z([
|
|
5017
4973
|
m({ type: Boolean, attribute: "is-ltr" })
|
5018
4974
|
], q.prototype, "isLTR", 2);
|
5019
4975
|
Z([
|
5020
|
-
|
4976
|
+
V("input")
|
5021
4977
|
], q.prototype, "input", 2);
|
5022
4978
|
customElements.get("luzmo-color-slider") || customElements.define("luzmo-color-slider", q);
|
5023
4979
|
/*! * Lucero - The design system for Luzmo.
|
@@ -5044,13 +5000,13 @@ const Js = () => {
|
|
5044
5000
|
}
|
5045
5001
|
};
|
5046
5002
|
Js();
|
5047
|
-
const Qs = '@media (forced-colors: active){:host{--highcontrast-swatch-disabled-icon-color: GrayText;--highcontrast-swatch-focus-indicator-color: ButtonText;--highcontrast-swatch-background-color-selected: Background;--highcontrast-swatch-border-color-selected: Highlight;--highcontrast-swatch-border-color: ButtonText;--highcontrast-swatch-fill-foreground-color: ButtonText}.fill{forced-color-adjust:none}:host([disabled]){--highcontrast-swatch-border-color: GrayText}}:host{box-sizing:border-box;inline-size:var(--luzmo-swatch-size, var(--swatch-size));block-size:var(--luzmo-swatch-size, var(--swatch-size));-webkit-user-select:none;user-select:none;outline:none;justify-content:center;align-items:center;display:flex;position:relative}.disabled-icon{inline-size:var(--luzmo-swatch-disabled-icon-size, var(--swatch-disabled-icon-size));block-size:var(--luzmo-swatch-disabled-icon-size, var(--swatch-disabled-icon-size))}:host,:host:before{border-radius:var(--luzmo-swatch-border-radius, var(--swatch-border-radius))}:host([selected]){background-color:var(--highcontrast-swatch-background-color-selected, var(--luzmo-swatch-inner-border-color-selected, var(--swatch-inner-border-color-selected)))}:host([selected]) .fill:before{box-shadow:none;border-radius:0}:host([selected]):before{opacity:1}:host .is-image .fill:before{background-color:initial}:host([mixed-value]) .fill{background:none;background:var(--picked-color, transparent)}:host([mixed-value]) .mixed-value-icon{color:var(--swatch-dash-icon-color);display:block}:host([nothing]) .fill{background-color:initial;background-color:var(--picked-color, transparent);background-image:none}:host([nothing]) .fill:after{inline-size:var(--luzmo-swatch-slash-thickness, var(--swatch-slash-thickness));content:"";block-size:200%;background:var(--highcontrast-swatch-fill-foreground-color, var(--luzmo-swatch-slash-icon-color, var(--swatch-slash-icon-color)));position:absolute;transform:rotate(-45deg)}:host([nothing][shape=rectangle]) .fill:after{transform:rotate(-25deg)}:host([disabled]) .disabled-icon{display:block}:host:before{content:"";border-width:var(--luzmo-swatch-border-thickness-selected, var(--swatch-border-thickness-selected));border-style:solid;border-color:var(--highcontrast-swatch-border-color-selected, var(--luzmo-swatch-border-color-selected, var(--swatch-border-color-selected)));opacity:0;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0}:host:after{content:"";inset:calc(var(--luzmo-swatch-focus-indicator-gap, var(--swatch-focus-indicator-gap)) * -2);
|
5048
|
-
var on = Object.defineProperty, en = Object.getOwnPropertyDescriptor,
|
5003
|
+
const Qs = '@media (forced-colors: active){:host{--highcontrast-swatch-disabled-icon-color: GrayText;--highcontrast-swatch-focus-indicator-color: ButtonText;--highcontrast-swatch-background-color-selected: Background;--highcontrast-swatch-border-color-selected: Highlight;--highcontrast-swatch-border-color: ButtonText;--highcontrast-swatch-fill-foreground-color: ButtonText}.fill{forced-color-adjust:none}:host([disabled]){--highcontrast-swatch-border-color: GrayText}}:host{box-sizing:border-box;inline-size:var(--luzmo-swatch-size, var(--swatch-size));block-size:var(--luzmo-swatch-size, var(--swatch-size));-webkit-user-select:none;user-select:none;outline:none;justify-content:center;align-items:center;display:flex;position:relative}.disabled-icon{inline-size:var(--luzmo-swatch-disabled-icon-size, var(--swatch-disabled-icon-size));block-size:var(--luzmo-swatch-disabled-icon-size, var(--swatch-disabled-icon-size))}:host,:host:before{border-radius:var(--luzmo-swatch-border-radius, var(--swatch-border-radius))}:host([selected]){background-color:var(--highcontrast-swatch-background-color-selected, var(--luzmo-swatch-inner-border-color-selected, var(--swatch-inner-border-color-selected)))}:host([selected]) .fill:before{box-shadow:none;border-radius:0}:host([selected]):before{opacity:1}:host .is-image .fill:before{background-color:initial}:host([mixed-value]) .fill{background:none;background:var(--picked-color, transparent)}:host([mixed-value]) .mixed-value-icon{color:var(--swatch-dash-icon-color);display:block}:host([nothing]) .fill{background-color:initial;background-color:var(--picked-color, transparent);background-image:none}:host([nothing]) .fill:after{inline-size:var(--luzmo-swatch-slash-thickness, var(--swatch-slash-thickness));content:"";block-size:200%;background:var(--highcontrast-swatch-fill-foreground-color, var(--luzmo-swatch-slash-icon-color, var(--swatch-slash-icon-color)));position:absolute;transform:rotate(-45deg)}:host([nothing][shape=rectangle]) .fill:after{transform:rotate(-25deg)}:host([disabled]) .disabled-icon{display:block}:host:before{content:"";border-width:var(--luzmo-swatch-border-thickness-selected, var(--swatch-border-thickness-selected));border-style:solid;border-color:var(--highcontrast-swatch-border-color-selected, var(--luzmo-swatch-border-color-selected, var(--swatch-border-color-selected)));opacity:0;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0}:host:after{content:"";inset:calc(var(--luzmo-swatch-focus-indicator-gap, var(--swatch-focus-indicator-gap)) * -2);opacity:0;border-width:var(--luzmo-swatch-focus-indicator-width, var(--swatch-focus-indicator-width));border-style:solid;border-color:var(--highcontrast-swatch-focus-indicator-color, var(--luzmo-swatch-focus-indicator-color, var(--swatch-focus-indicator-color)));border-radius:var(--luzmo-swatch-focus-indicator-border-radius, var(--swatch-focus-indicator-border-radius));transition:opacity var(--luzmo-animation-duration) ease-in-out;position:absolute}:host(:focus-visible):after{opacity:1}.fill{inline-size:100%;block-size:100%;box-sizing:border-box;border-radius:var(--luzmo-swatch-border-radius, var(--swatch-border-radius));justify-content:center;align-items:center;display:flex;position:relative;overflow:hidden}.fill:before{content:"";z-index:0;box-sizing:border-box;box-shadow:inset 0 0 0 var(--luzmo-swatch-border-thickness, var(--swatch-border-thickness)) var(--highcontrast-swatch-border-color, var(--luzmo-swatch-border-color, var(--swatch-border-color)));border-radius:var(--luzmo-swatch-border-radius, var(--swatch-border-radius));position:absolute;top:0;right:0;bottom:0;left:0}:host([border=none]) .fill:before,.fill:before{background-color:initial;background-color:var(--picked-color, transparent)}:host([border=none]) .fill:before{box-shadow:none}.mixed-value-icon{pointer-events:none;color:#0000;color:var(--picked-color, transparent);display:none}.disabled-icon{z-index:1;pointer-events:none;color:var(--highcontrast-swatch-disabled-icon-color, var(--luzmo-swatch-disabled-icon-color, var(--swatch-disabled-icon-color)));stroke:var(--highcontrast-swatch-disabled-icon-color, var(--luzmo-swatch-disabled-icon-color, var(--swatch-disabled-icon-color)));display:none;position:relative}.disabled-icon path:first-child{fill:var(--highcontrast-swatch-disabled-icon-color, var(--luzmo-swatch-disabled-icon-color, var(--swatch-disabled-icon-color)))}.disabled-icon path:last-child{fill:var(--luzmo-swatch-icon-border-color, var(--swatch-icon-border-color))}:host([shape=rectangle]){inline-size:calc(var(--luzmo-swatch-size, var(--swatch-size)) * 2)}:host([rounding=none]),:host([rounding=none]) .fill,:host([rounding=none]) .fill:before,:host([rounding=none][selected]) .fill,:host([rounding=none][selected]) .fill:before,:host([rounding=none]):after,:host([rounding=none]):before{border-radius:0}:host([rounding=full][selected]:not([shape=rectangle])) .fill,:host([rounding=full][selected]:not([shape=rectangle])) .fill:before,:host([rounding=full]:not([shape=rectangle])),:host([rounding=full]:not([shape=rectangle])) .fill,:host([rounding=full]:not([shape=rectangle])) .fill:before,:host([rounding=full]:not([shape=rectangle])):after,:host([rounding=full]:not([shape=rectangle])):before{border-radius:100%}:host([selected]) .fill{width:calc(var(--luzmo-swatch-size, var(--swatch-size)) - 2 * var(--luzmo-swatch-border-thickness-selected, var(--swatch-border-thickness-selected)) + -2 * var(--luzmo-swatch-focus-indicator-gap, var(--swatch-focus-indicator-gap)));height:calc(var(--luzmo-swatch-size, var(--swatch-size)) - 2 * var(--luzmo-swatch-border-thickness-selected, var(--swatch-border-thickness-selected)) + -2 * var(--luzmo-swatch-focus-indicator-gap, var(--swatch-focus-indicator-gap)))}:host([selected][shape=rectangle]) .fill{width:calc(var(--luzmo-swatch-size, var(--swatch-size)) * 2 - 2 * var(--luzmo-swatch-border-thickness-selected, var(--swatch-border-thickness-selected)) + -2 * var(--luzmo-swatch-focus-indicator-gap, var(--swatch-focus-indicator-gap)))}::slotted([slot=image]){object-fit:contain;inline-size:100%;block-size:100%;transition:width var(--luzmo-animation-duration) ease-in-out,height var(--luzmo-animation-duration) ease-in-out}:host([size=xl]){--swatch-size: var(--luzmo-component-height-xl);--swatch-disabled-icon-size: 24px;--swatch-slash-thickness: 6px}:host([size=l]){--swatch-size: var(--luzmo-component-height-l);--swatch-disabled-icon-size: 20px;--swatch-slash-thickness: 5px}:host([size=s]){--swatch-size: var(--luzmo-component-height-s);--swatch-disabled-icon-size: 16px;--swatch-slash-thickness: 3px}:host([size=xs]){--swatch-size: var(--luzmo-component-height-xs);--swatch-disabled-icon-size: 16px;--swatch-slash-thickness: 2px}:host([size=xxs]){--swatch-size: var(--luzmo-component-height-xxs);--swatch-disabled-icon-size: 14px;--swatch-slash-thickness: 2px}:host{--swatch-size: var(--luzmo-component-height);--swatch-disabled-icon-size: 18px;--swatch-slash-thickness: 4px}:host{--swatch-border-radius: var(--luzmo-border-radius-s);--swatch-focus-indicator-border-radius: var(--luzmo-border-radius-s);--swatch-border-thickness: var(--luzmo-border-width);--swatch-border-thickness-selected: var(--luzmo-border-width);--swatch-focus-indicator-width: var(--luzmo-indicator-width);--swatch-focus-indicator-gap: var(--luzmo-indicator-gap);--swatch-border-color: var(--luzmo-border-color-down);--swatch-icon-border-color: var(--luzmo-border-color);--swatch-border-color-selected: var(--luzmo-border-color-full-down);--swatch-inner-border-color-selected: var(--luzmo-background-color);--swatch-disabled-icon-color: rgb(255, 255, 255);--swatch-dash-icon-color: var(--luzmo-font-color);--swatch-slash-icon-color: var(--luzmo-negative-color);--swatch-focus-indicator-color: var(--luzmo-primary)}.fill:before{background:var(--picked-color, transparent)}:host([border=none]) .fill:before{background:var(--picked-color, transparent)}:host .is-image .fill:before{background:#0000}:host .opacity-checkerboard{background:repeating-conic-gradient(var(--luzmo-swatch-checkerboard-light, rgb(255, 255, 255)) 0 25%,var(--luzmo-swatch-checkerboard-dark, rgb(230, 230, 230)) 0 50%) var(--luzmo-swatch-checkerboard-position, left top)/calc(var(--luzmo-swatch-checkerboard-size, 8px) * 2) calc(var(--luzmo-swatch-checkerboard-size, 8px) * 2)}';
|
5004
|
+
var on = Object.defineProperty, en = Object.getOwnPropertyDescriptor, eo = (r, o, e, t) => {
|
5049
5005
|
for (var a = t > 1 ? void 0 : t ? en(o, e) : o, l = r.length - 1, s; l >= 0; l--)
|
5050
5006
|
(s = r[l]) && (a = (t ? s(o, e, a) : s(a)) || a);
|
5051
5007
|
return t && a && on(o, e, a), a;
|
5052
5008
|
};
|
5053
|
-
let
|
5009
|
+
let J = class extends ie(Fe, {
|
5054
5010
|
validSizes: ["xxs", "xs", "s", "m", "l", "xl"],
|
5055
5011
|
noDefaultSize: !0
|
5056
5012
|
}) {
|
@@ -5072,7 +5028,7 @@ let Q = class extends ie(Fe, {
|
|
5072
5028
|
fill="var(--swatch-disabled-icon-stroke-color)"
|
5073
5029
|
/>
|
5074
5030
|
</svg>
|
5075
|
-
`, this.renderMixedValue = () => Se(
|
5031
|
+
`, this.renderMixedValue = () => Se(ua);
|
5076
5032
|
}
|
5077
5033
|
static get styles() {
|
5078
5034
|
return [io(Qs)];
|
@@ -5137,8 +5093,8 @@ let Q = class extends ie(Fe, {
|
|
5137
5093
|
)}
|
5138
5094
|
>
|
5139
5095
|
<slot name="image"></slot>
|
5140
|
-
${
|
5141
|
-
${
|
5096
|
+
${Qe(this.disabled, this.renderDisabled)}
|
5097
|
+
${Qe(this.mixedValue, this.renderMixedValue)}
|
5142
5098
|
</div>
|
5143
5099
|
`;
|
5144
5100
|
}
|
@@ -5154,39 +5110,39 @@ let Q = class extends ie(Fe, {
|
|
5154
5110
|
super.firstUpdated(o), this.addEventListener("click", this.handleClick), this.addEventListener("keydown", this.handleKeydown), this.addEventListener("keypress", this.handleKeypress), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0");
|
5155
5111
|
}
|
5156
5112
|
};
|
5157
|
-
|
5113
|
+
eo([
|
5158
5114
|
m({ reflect: !0 })
|
5159
|
-
],
|
5160
|
-
|
5115
|
+
], J.prototype, "border", 2);
|
5116
|
+
eo([
|
5161
5117
|
m()
|
5162
|
-
],
|
5163
|
-
|
5118
|
+
], J.prototype, "color", 2);
|
5119
|
+
eo([
|
5164
5120
|
m()
|
5165
|
-
],
|
5166
|
-
|
5121
|
+
], J.prototype, "label", 2);
|
5122
|
+
eo([
|
5167
5123
|
m({ type: Boolean, reflect: !0, attribute: "mixed-value" })
|
5168
|
-
],
|
5169
|
-
|
5124
|
+
], J.prototype, "mixedValue", 2);
|
5125
|
+
eo([
|
5170
5126
|
m({ type: Boolean, reflect: !0 })
|
5171
|
-
],
|
5172
|
-
|
5127
|
+
], J.prototype, "nothing", 2);
|
5128
|
+
eo([
|
5173
5129
|
m({ reflect: !0 })
|
5174
|
-
],
|
5175
|
-
|
5130
|
+
], J.prototype, "role", 2);
|
5131
|
+
eo([
|
5176
5132
|
m({ reflect: !0 })
|
5177
|
-
],
|
5178
|
-
|
5133
|
+
], J.prototype, "rounding", 2);
|
5134
|
+
eo([
|
5179
5135
|
m({ type: Boolean, reflect: !0 })
|
5180
|
-
],
|
5181
|
-
|
5136
|
+
], J.prototype, "selected", 2);
|
5137
|
+
eo([
|
5182
5138
|
m({ type: Boolean, reflect: !0 })
|
5183
|
-
],
|
5184
|
-
|
5139
|
+
], J.prototype, "readonly", 2);
|
5140
|
+
eo([
|
5185
5141
|
m({ reflect: !0 })
|
5186
|
-
],
|
5187
|
-
|
5142
|
+
], J.prototype, "shape", 2);
|
5143
|
+
eo([
|
5188
5144
|
m()
|
5189
|
-
],
|
5145
|
+
], J.prototype, "value", 1);
|
5190
5146
|
const rn = ":host{justify-content:flex-start;align-items:flex-start;gap:var(--luzmo-swatch-group-spacing-regular, var(--swatch-group-spacing-regular));flex-flow:wrap;display:inline-flex}:host([density=compact]){gap:var(--luzmo-swatch-group-spacing-compact, var(--swatch-group-spacing-compact))}:host([density=spacious]){gap:var(--luzmo-swatch-group-spacing-spacious, var(--swatch-group-spacing-spacious))}:host{--swatch-group-spacing-compact: 2px;--swatch-group-spacing-regular: 4px;--swatch-group-spacing-spacious: 8px}";
|
5191
5147
|
var tn = Object.defineProperty, an = Object.getOwnPropertyDescriptor, xo = (r, o, e, t) => {
|
5192
5148
|
for (var a = t > 1 ? void 0 : t ? an(o, e) : o, l = r.length - 1, s; l >= 0; l--)
|
@@ -5198,7 +5154,7 @@ class bo extends ie(jo, {
|
|
5198
5154
|
noDefaultSize: !0
|
5199
5155
|
}) {
|
5200
5156
|
constructor() {
|
5201
|
-
super(), this._selected = [], this.selectedSet = /* @__PURE__ */ new Set(), this.rovingTabindexController = new
|
5157
|
+
super(), this._selected = [], this.selectedSet = /* @__PURE__ */ new Set(), this.rovingTabindexController = new wa(this, {
|
5202
5158
|
focusInIndex: (o) => {
|
5203
5159
|
let e = -1;
|
5204
5160
|
const t = o.findIndex((a, l) => (!o[e] && !a.disabled && (e = l), a.selected && !a.disabled));
|
@@ -5213,7 +5169,7 @@ class bo extends ie(jo, {
|
|
5213
5169
|
}), this.selectedSet.forEach((e) => {
|
5214
5170
|
o.has(e) || this.selectedSet.delete(e);
|
5215
5171
|
}), this._selected = [...this.selectedSet], this.rovingTabindexController.clearElementCache();
|
5216
|
-
}, new
|
5172
|
+
}, new va(this, {
|
5217
5173
|
config: {
|
5218
5174
|
attributes: !0,
|
5219
5175
|
childList: !0,
|
@@ -5343,9 +5299,9 @@ xo([
|
|
5343
5299
|
m({ reflect: !0 })
|
5344
5300
|
], bo.prototype, "shape", 2);
|
5345
5301
|
xo([
|
5346
|
-
|
5302
|
+
ba({ flatten: !0 })
|
5347
5303
|
], bo.prototype, "swatches", 2);
|
5348
|
-
customElements.get("luzmo-swatch") || customElements.define("luzmo-swatch",
|
5304
|
+
customElements.get("luzmo-swatch") || customElements.define("luzmo-swatch", J);
|
5349
5305
|
customElements.get("luzmo-swatch-group") || customElements.define("luzmo-swatch-group", bo);
|
5350
5306
|
/*! * Lucero - The design system for Luzmo.
|
5351
5307
|
*
|
@@ -5377,7 +5333,7 @@ var nn = Object.defineProperty, co = (r, o, e, t) => {
|
|
5377
5333
|
(s = r[l]) && (a = s(o, e, a) || a);
|
5378
5334
|
return a && nn(o, e, a), a;
|
5379
5335
|
};
|
5380
|
-
const
|
5336
|
+
const ta = class extends ie(Fe) {
|
5381
5337
|
constructor() {
|
5382
5338
|
super(...arguments), this.color = "rgb(255, 0, 0)", this.noAlphaChannel = !1, this._alpha = 1, this._rgbColor = "rgb(255, 0, 0)", this._rgbaColor = "rgb(255, 0, 0, 1)", this._previousColor = "rgb(255, 0, 0)";
|
5383
5339
|
}
|
@@ -5399,7 +5355,7 @@ const aa = class extends ie(Fe) {
|
|
5399
5355
|
const e = new H(this._rgbColor).toHsl();
|
5400
5356
|
e.h = this.hueSliderElement.value;
|
5401
5357
|
const t = new H(e);
|
5402
|
-
this._rgbColor = t.toRgbString(), this._rgbaColor = t.setAlpha(this._alpha).toRgbString(), this.areaElement.color =
|
5358
|
+
this._rgbColor = t.toRgbString(), this._rgbaColor = t.setAlpha(this._alpha).toRgbString(), this.areaElement.color = this._rgbColor, this.noAlphaChannel || (this.opacitySliderElement.color = this._rgbaColor), this.colorFieldElement.value = this.formatTextField(t), this.swatchElement.color = this._rgbaColor, this._previousColor = this._rgbaColor, this.color = this._rgbaColor, this.dispatchEvent(new CustomEvent("change", { detail: this.color }));
|
5403
5359
|
}
|
5404
5360
|
handleOpacitySliderChange(o) {
|
5405
5361
|
o.stopPropagation(), o.preventDefault(), this._alpha = this.opacitySliderElement.sliderHandlePosition / 100;
|
@@ -5479,8 +5435,8 @@ const aa = class extends ie(Fe) {
|
|
5479
5435
|
>
|
5480
5436
|
<div class="format-label">${this._format}</div>
|
5481
5437
|
<div class="change-format-icon">
|
5438
|
+
<div class="angle-icon">${Se(ha)}</div>
|
5482
5439
|
<div class="angle-icon">${Se(da)}</div>
|
5483
|
-
<div class="angle-icon">${Se(ma)}</div>
|
5484
5440
|
</div>
|
5485
5441
|
</button>
|
5486
5442
|
</div>
|
@@ -5507,8 +5463,8 @@ const aa = class extends ie(Fe) {
|
|
5507
5463
|
`;
|
5508
5464
|
}
|
5509
5465
|
};
|
5510
|
-
|
5511
|
-
let lo =
|
5466
|
+
ta.styles = io(sn);
|
5467
|
+
let lo = ta;
|
5512
5468
|
co([
|
5513
5469
|
m({ type: String, reflect: !0 })
|
5514
5470
|
], lo.prototype, "color");
|
@@ -5519,22 +5475,22 @@ co([
|
|
5519
5475
|
m({ type: Array, reflect: !0 })
|
5520
5476
|
], lo.prototype, "swatches");
|
5521
5477
|
co([
|
5522
|
-
|
5478
|
+
V("luzmo-color-area")
|
5523
5479
|
], lo.prototype, "areaElement");
|
5524
5480
|
co([
|
5525
|
-
|
5481
|
+
V("#luzmo-hue-slider")
|
5526
5482
|
], lo.prototype, "hueSliderElement");
|
5527
5483
|
co([
|
5528
|
-
|
5484
|
+
V("#luzmo-opacity-slider")
|
5529
5485
|
], lo.prototype, "opacitySliderElement");
|
5530
5486
|
co([
|
5531
|
-
|
5487
|
+
V("luzmo-color-field")
|
5532
5488
|
], lo.prototype, "colorFieldElement");
|
5533
5489
|
co([
|
5534
|
-
|
5490
|
+
V("luzmo-swatch")
|
5535
5491
|
], lo.prototype, "swatchElement");
|
5536
5492
|
co([
|
5537
|
-
|
5493
|
+
ut()
|
5538
5494
|
], lo.prototype, "_format");
|
5539
5495
|
customElements.get("luzmo-color-menu") || customElements.define("luzmo-color-menu", lo);
|
5540
5496
|
/*! * Lucero - The design system for Luzmo.
|
@@ -5561,15 +5517,15 @@ const cn = () => {
|
|
5561
5517
|
}
|
5562
5518
|
};
|
5563
5519
|
cn();
|
5564
|
-
const un = "luzmo-popover{margin-left:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap));margin-right:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap))}luzmo-swatch{cursor:pointer}:host
|
5565
|
-
var hn = Object.defineProperty,
|
5520
|
+
const un = "luzmo-popover{margin-left:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap));margin-right:var(--luzmo-color-picker-popover-horizontal-gap, var(--color-picker-popover-horizontal-gap))}luzmo-swatch{cursor:pointer}:host{--luzmo-popover-content-area-spacing-vertical: 0;--color-picker-popover-horizontal-gap: var(--luzmo-spacing-4)}:host([size=s]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-3)}:host([size=l]),:host([size=xl]){--color-picker-popover-horizontal-gap: var(--luzmo-spacing-5)}";
|
5521
|
+
var hn = Object.defineProperty, ro = (r, o, e, t) => {
|
5566
5522
|
for (var a = void 0, l = r.length - 1, s; l >= 0; l--)
|
5567
5523
|
(s = r[l]) && (a = s(o, e, a) || a);
|
5568
5524
|
return a && hn(o, e, a), a;
|
5569
5525
|
};
|
5570
|
-
const
|
5526
|
+
const aa = class extends ie(jo) {
|
5571
5527
|
constructor() {
|
5572
|
-
super(...arguments), this.color = "rgb(255, 0, 0)", this.open = !1, this.disabled = !1, this.
|
5528
|
+
super(...arguments), this.color = "rgb(255, 0, 0)", this.open = !1, this.disabled = !1, this.placement = "left-start", this.rounding = "full", this.swatches = [], this.noAlphaChannel = !1, this._renderMenu = !1;
|
5573
5529
|
}
|
5574
5530
|
overlayCloseEvent() {
|
5575
5531
|
this.open = !1;
|
@@ -5588,7 +5544,7 @@ const la = class extends ie(jo) {
|
|
5588
5544
|
}
|
5589
5545
|
firstUpdated() {
|
5590
5546
|
this.overlayElement.addEventListener("slottable-request", (o) => {
|
5591
|
-
this._renderMenu = o.data !==
|
5547
|
+
this._renderMenu = o.data !== za;
|
5592
5548
|
});
|
5593
5549
|
}
|
5594
5550
|
updated(o) {
|
@@ -5615,12 +5571,11 @@ const la = class extends ie(jo) {
|
|
5615
5571
|
.color=${this.color}
|
5616
5572
|
.selected=${this.open && !this.disabled}
|
5617
5573
|
?disabled=${this.disabled}
|
5618
|
-
?read-only=${this.readOnly}
|
5619
5574
|
@luzmo-closed=${this.overlayCloseEvent}
|
5620
5575
|
@luzmo-opened=${this.overlayOpenEvent}
|
5621
5576
|
></luzmo-swatch>
|
5622
5577
|
<luzmo-overlay
|
5623
|
-
trigger=${this.disabled
|
5578
|
+
trigger=${this.disabled ? "" : "trigger@click"}
|
5624
5579
|
.placement=${this.placement}
|
5625
5580
|
type="auto"
|
5626
5581
|
>
|
@@ -5631,42 +5586,39 @@ const la = class extends ie(jo) {
|
|
5631
5586
|
`;
|
5632
5587
|
}
|
5633
5588
|
};
|
5634
|
-
|
5635
|
-
let
|
5636
|
-
|
5589
|
+
aa.styles = io(un);
|
5590
|
+
let Q = aa;
|
5591
|
+
ro([
|
5637
5592
|
m({ type: String, reflect: !0 })
|
5638
|
-
],
|
5639
|
-
|
5593
|
+
], Q.prototype, "color");
|
5594
|
+
ro([
|
5640
5595
|
m({ type: Boolean, reflect: !0 })
|
5641
|
-
],
|
5642
|
-
|
5596
|
+
], Q.prototype, "open");
|
5597
|
+
ro([
|
5643
5598
|
m({ type: Boolean, reflect: !0 })
|
5644
|
-
],
|
5645
|
-
|
5646
|
-
m({ type: Boolean, reflect: !0, attribute: "read-only" })
|
5647
|
-
], K.prototype, "readOnly");
|
5648
|
-
oo([
|
5599
|
+
], Q.prototype, "disabled");
|
5600
|
+
ro([
|
5649
5601
|
m({ type: String, reflect: !0 })
|
5650
|
-
],
|
5651
|
-
|
5602
|
+
], Q.prototype, "placement");
|
5603
|
+
ro([
|
5652
5604
|
m({ type: String, reflect: !0 })
|
5653
|
-
],
|
5654
|
-
|
5605
|
+
], Q.prototype, "rounding");
|
5606
|
+
ro([
|
5655
5607
|
m({ type: String, reflect: !0 })
|
5656
|
-
],
|
5657
|
-
|
5608
|
+
], Q.prototype, "shape");
|
5609
|
+
ro([
|
5658
5610
|
m({ type: Array, reflect: !0 })
|
5659
|
-
],
|
5660
|
-
|
5611
|
+
], Q.prototype, "swatches");
|
5612
|
+
ro([
|
5661
5613
|
m({ type: Boolean, reflect: !0, attribute: "no-alpha-channel" })
|
5662
|
-
],
|
5663
|
-
|
5664
|
-
|
5665
|
-
],
|
5666
|
-
|
5667
|
-
|
5668
|
-
],
|
5669
|
-
|
5670
|
-
|
5671
|
-
],
|
5672
|
-
customElements.get("luzmo-color-picker") || customElements.define("luzmo-color-picker",
|
5614
|
+
], Q.prototype, "noAlphaChannel");
|
5615
|
+
ro([
|
5616
|
+
V("luzmo-color-menu")
|
5617
|
+
], Q.prototype, "menuElement");
|
5618
|
+
ro([
|
5619
|
+
V("luzmo-overlay")
|
5620
|
+
], Q.prototype, "overlayElement");
|
5621
|
+
ro([
|
5622
|
+
ut()
|
5623
|
+
], Q.prototype, "_renderMenu");
|
5624
|
+
customElements.get("luzmo-color-picker") || customElements.define("luzmo-color-picker", Q);
|