@rocketspark/domain-checker 1.0.2 → 1.0.3
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/build/141.index.js +2 -2
- package/build/141.index.js.map +1 -1
- package/build/147.index.js +2 -2
- package/build/147.index.js.map +1 -1
- package/build/167.index.js +2 -2
- package/build/167.index.js.map +1 -1
- package/build/17.index.js +2 -2
- package/build/17.index.js.map +1 -1
- package/build/194.index.js +2 -2
- package/build/194.index.js.map +1 -1
- package/build/208.index.js +2 -2
- package/build/208.index.js.map +1 -1
- package/build/237.index.js +2 -2
- package/build/237.index.js.map +1 -1
- package/build/245.index.js +2 -2
- package/build/245.index.js.map +1 -1
- package/build/278.index.js +2 -2
- package/build/278.index.js.map +1 -1
- package/build/386.index.js +2 -2
- package/build/386.index.js.map +1 -1
- package/build/404.index.js +2 -2
- package/build/404.index.js.map +1 -1
- package/build/420.index.js +2 -2
- package/build/420.index.js.map +1 -1
- package/build/514.index.js +2 -2
- package/build/514.index.js.map +1 -1
- package/build/524.index.js +2 -2
- package/build/524.index.js.map +1 -1
- package/build/542.index.js +2 -2
- package/build/542.index.js.map +1 -1
- package/build/551.index.js +2 -2
- package/build/551.index.js.map +1 -1
- package/build/567.index.js +2 -2
- package/build/567.index.js.map +1 -1
- package/build/571.index.js +2 -2
- package/build/571.index.js.map +1 -1
- package/build/572.index.js +2 -2
- package/build/572.index.js.map +1 -1
- package/build/584.index.js +2 -2
- package/build/584.index.js.map +1 -1
- package/build/588.index.js +2 -2
- package/build/588.index.js.map +1 -1
- package/build/598.index.js +2 -2
- package/build/598.index.js.map +1 -1
- package/build/60.index.js +2 -2
- package/build/60.index.js.map +1 -1
- package/build/616.index.js +2 -2
- package/build/616.index.js.map +1 -1
- package/build/631.index.js +2 -2
- package/build/631.index.js.map +1 -1
- package/build/643.index.js +2 -2
- package/build/643.index.js.map +1 -1
- package/build/654.index.js +2 -2
- package/build/654.index.js.map +1 -1
- package/build/66.index.js +2 -2
- package/build/66.index.js.map +1 -1
- package/build/697.index.js +2 -2
- package/build/697.index.js.map +1 -1
- package/build/714.index.js +2 -2
- package/build/714.index.js.map +1 -1
- package/build/717.index.js +13 -0
- package/build/717.index.js.map +1 -0
- package/build/795.index.js +2 -2
- package/build/795.index.js.map +1 -1
- package/build/8.index.js +2 -2
- package/build/8.index.js.map +1 -1
- package/build/808.index.js +2 -2
- package/build/808.index.js.map +1 -1
- package/build/810.index.js +2 -2
- package/build/810.index.js.map +1 -1
- package/build/833.index.js +2 -2
- package/build/833.index.js.map +1 -1
- package/build/835.index.js +2 -2
- package/build/835.index.js.map +1 -1
- package/build/847.index.js +2 -2
- package/build/847.index.js.map +1 -1
- package/build/853.index.js +2 -2
- package/build/853.index.js.map +1 -1
- package/build/871.index.js +2 -2
- package/build/871.index.js.map +1 -1
- package/build/890.index.js +2 -2
- package/build/890.index.js.map +1 -1
- package/build/899.index.js +2 -2
- package/build/899.index.js.map +1 -1
- package/build/938.index.js +2 -2
- package/build/938.index.js.map +1 -1
- package/build/964.index.js +2 -2
- package/build/964.index.js.map +1 -1
- package/build/970.index.js +2 -2
- package/build/970.index.js.map +1 -1
- package/build/984.index.js +13 -0
- package/build/984.index.js.map +1 -0
- package/build/993.index.js +2 -2
- package/build/993.index.js.map +1 -1
- package/build/css/index.css +2 -2
- package/build/css/index.css.map +1 -1
- package/build/index.js +4 -4
- package/build/index.js.map +1 -1
- package/package.json +2 -2
- package/build/540.index.js +0 -13
- package/build/540.index.js.map +0 -1
- package/build/861.index.js +0 -13
- package/build/861.index.js.map +0 -1
package/build/245.index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"245.index.js","mappings":";;;;;;;;;;;wNAAA,MAAM,IAAEA,EAAG,IAAEC,EAAG,MAAEC,EAAK,MAAEC,GAAUC,KAenC,SAASC,EAASC,EAAGC,EAAGC,GACtB,MAAMC,EAAUH,EAAI,IAAO,EACrBI,EAASH,EAAI,IACbI,EAASH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GACF,GAAG,GACL,IAAG,EAAM,C","sources":["webpack://DomainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/HSVaColor-0aa7247b.js","webpack://DomainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/color-picker_4.entry.js","webpack://DomainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/utils-6d01f45b.js"],"sourcesContent":["const { min, max, floor, round } = Math;\nfunction standardizeColor(name) {\n if (name === undefined) {\n return '#000';\n }\n if (name.toLowerCase() === 'black') {\n return '#000';\n }\n const ctx = document.createElement('canvas').getContext('2d');\n if (ctx === null) {\n return null;\n }\n ctx.fillStyle = name;\n return ctx.fillStyle === '#000' ? null : ctx.fillStyle;\n}\nfunction hsvToRgb(h, s, v) {\n const hLocal = (h / 360) * 6;\n const sLocal = s / 100;\n const vLocal = v / 100;\n const i = floor(hLocal);\n const f = hLocal - i;\n const p = vLocal * (1 - sLocal);\n const q = vLocal * (1 - f * sLocal);\n const t = vLocal * (1 - (1 - f) * sLocal);\n const mod = i % 6;\n const r = [vLocal, q, p, p, t, vLocal][mod];\n const g = [t, vLocal, vLocal, q, p, p][mod];\n const b = [p, p, t, vLocal, vLocal, q][mod];\n return [r * 255, g * 255, b * 255];\n}\nfunction hsvToHex(h, s, v) {\n return hsvToRgb(h, s, v).map(rgb => round(rgb)\n .toString(16)\n .padStart(2, '0'));\n}\nfunction hsvToCmyk(h, s, v) {\n const rgb = hsvToRgb(h, s, v);\n const r = rgb[0] / 255;\n const g = rgb[1] / 255;\n const b = rgb[2] / 255;\n const k = min(1 - r, 1 - g, 1 - b);\n const c = k === 1 ? 0 : (1 - r - k) / (1 - k);\n const m = k === 1 ? 0 : (1 - g - k) / (1 - k);\n const y = k === 1 ? 0 : (1 - b - k) / (1 - k);\n return [c * 100, m * 100, y * 100, k * 100];\n}\nfunction hsvToHsl(h, s, v) {\n let sLocal = s / 100;\n const vLocal = v / 100;\n const l = ((2 - sLocal) * vLocal) / 2;\n if (l !== 0) {\n if (l === 1) {\n sLocal = 0;\n }\n else if (l < 0.5) {\n sLocal = (sLocal * vLocal) / (l * 2);\n }\n else {\n sLocal = (sLocal * vLocal) / (2 - l * 2);\n }\n }\n return [h, sLocal * 100, l * 100];\n}\nfunction rgbToHsv(red, green, blue) {\n const r = red / 255;\n const g = green / 255;\n const b = blue / 255;\n const minVal = min(r, g, b);\n const maxVal = max(r, g, b);\n const delta = maxVal - minVal;\n let h;\n let s;\n const v = maxVal;\n if (delta === 0) {\n h = 0;\n s = 0;\n }\n else {\n s = delta / maxVal;\n const dr = ((maxVal - r) / 6 + delta / 2) / delta;\n const dg = ((maxVal - g) / 6 + delta / 2) / delta;\n const db = ((maxVal - b) / 6 + delta / 2) / delta;\n if (r === maxVal) {\n h = db - dg;\n }\n else if (g === maxVal) {\n h = 1 / 3 + dr - db;\n }\n else if (b === maxVal) {\n h = 2 / 3 + dg - dr;\n }\n if (h < 0) {\n h += 1;\n }\n else if (h > 1) {\n h -= 1;\n }\n }\n return [h * 360, s * 100, v * 100];\n}\nfunction cmykToHsv(cyan, magenta, yellow, key) {\n const c = cyan / 100;\n const m = magenta / 100;\n const y = yellow / 100;\n const k = key / 100;\n const r = (1 - min(1, c * (1 - k) + k)) * 255;\n const g = (1 - min(1, m * (1 - k) + k)) * 255;\n const b = (1 - min(1, y * (1 - k) + k)) * 255;\n return [...rgbToHsv(r, g, b)];\n}\nfunction hslToHsv(hue, saturation, lightness) {\n let s = saturation / 100;\n const l = lightness / 100;\n s *= l < 0.5 ? l : 1 - l;\n const ns = ((2 * s) / (l + s)) * 100;\n const v = (l + s) * 100;\n return [hue, Number.isNaN(ns) ? 0 : ns, v];\n}\nfunction hexToHsv(hex) {\n const hexRgb = hex.match(/.{2}/g);\n if (hexRgb !== null) {\n const [red, green, blue] = hexRgb.map(v => Number.parseInt(v, 16));\n return rgbToHsv(red, green, blue);\n }\n return null;\n}\nfunction getColorType(colorString) {\n // Regular expressions to match different types of color representation\n const regex = {\n cmyk: /^cmyk[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]+([\\d.]+)/i,\n rgba: /^((rgba)|rgb)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]*?([\\d.]+|$)/i,\n hsla: /^((hsla)|hsl)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]*?([\\d.]+|$)/i,\n hsva: /^((hsva)|hsv)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]*?([\\d.]+|$)/i,\n hexa: /^#?(([\\dA-Fa-f]{3,4})|([\\dA-Fa-f]{6})|([\\dA-Fa-f]{8}))$/i,\n };\n const colorType = Object.entries(regex).find(([, colorRegex]) => colorRegex.exec(colorString));\n if (colorType !== undefined) {\n const match = colorType[1].exec(colorString);\n return {\n type: colorType[0],\n regex: colorType[1],\n match,\n };\n }\n return {\n type: null,\n };\n}\n/**\n * Try's to parse a string which represents a color to an HSV array.\n * Current supported types are cmyk, rgba, hsla and hexadecimal.\n */\nfunction parseToHSVA(colorString = '#000') {\n // Check if string is a color-name\n if (colorString.toLowerCase() === 'transparent') {\n colorString = '#00000000';\n }\n const string = colorString.match(/^[a-zA-Z]+$/) !== null ? standardizeColor(colorString) : colorString;\n const { type, match } = getColorType(string);\n /**\n * Takes an Array of any type, convert strings which represents\n * a number to a number an anything else to undefined.\n * */\n const numarize = (array) => array.map(v => (/^(|\\d+)\\.\\d+|\\d+$/.test(v) ? Number(v) : undefined));\n if (type === null || match === null) {\n return { values: null, type: 'hexa' };\n }\n // Match[2] does only contain a truthy value if rgba, hsla, or hsla got matched\n const hasValidAlphaChannel = (a) => !!match[2] === (typeof a === 'number');\n const isValidAlpha = (a) => a >= 0 && a <= 1 && hasValidAlphaChannel(a);\n if (type === 'cmyk') {\n const [, c, m, y, k] = numarize(match);\n if (c && m && y && k && c <= 100 && m <= 100 && y <= 100 && k <= 100) {\n return { values: cmykToHsv(c, m, y, k), type };\n }\n }\n if (type === 'rgba') {\n const [, , , r, g, b, a] = numarize(match);\n if (r !== undefined && g !== undefined && b !== undefined && a !== undefined && r <= 255 && g <= 255 && b <= 255 && isValidAlpha(a)) {\n return { values: [...rgbToHsv(r, g, b), a], alpha: a, type };\n }\n }\n if (type === 'hexa') {\n let [, hex] = match;\n if (hex.length === 4 || hex.length === 3) {\n hex = hex\n .split('')\n .map(v => v + v)\n .join('');\n }\n const raw = hex.substring(0, 6);\n let a = hex.substring(6);\n // Convert 0 - 255 to 0 - 1 for opacity\n a = a ? parseInt(a, 16) / 255 : undefined;\n const hsvValue = hexToHsv(raw);\n if (hsvValue !== undefined) {\n return { values: [...hsvValue, a], alpha: a, type };\n }\n }\n if (type === 'hsla') {\n const [, , , h, s, l, a] = numarize(match);\n if (h && s && l && a && h <= 360 && s <= 100 && l <= 100 && a >= 0 && a <= 1 && isValidAlpha(a)) {\n return { values: [...hslToHsv(h, s, l), a], alpha: a, type };\n }\n }\n if (type === 'hsva') {\n const [, , , h, s, v, a] = numarize(match);\n if (h && s && v && a && h <= 360 && s <= 100 && v <= 100 && a >= 0 && a <= 1 && isValidAlpha(a)) {\n return { values: [h, s, v, a], alpha: a, type };\n }\n }\n return { values: null, type: 'hexa' };\n}\nconst isValidHex = string => {\n if (string === undefined) {\n return false;\n }\n return string.match(/^#?[\\dA-Fa-f]{6,8}$/i);\n};\nconst DEFAULT_COLOR = '#7CA1FF';\n\n/**\n * Simple class which holds the properties\n * of the color representation model hsla (hue saturation lightness alpha)\n */\nclass HSVaColor {\n constructor(h = 0, s = 0, v = 0, a = 1) {\n this.mapper = (original, next) => (precision = -1) => {\n return next(precision >= 0 ? original.map(v => Number(v.toFixed(precision))) : original);\n };\n this.h = h;\n this.s = s;\n this.v = v;\n this.a = (a > 1) ? a / 100 : a;\n }\n toHSVA() {\n const hsva = [this.h, this.s, this.v, this.a];\n hsva.toString = this.mapper(hsva, arr => `hsva(${arr[0]}, ${arr[1]}%, ${arr[2]}%, ${this.readableAlpha()})`);\n return hsva;\n }\n toHSLA() {\n const hsla = [...hsvToHsl(this.h, this.s, this.v), this.a];\n hsla.toString = this.mapper(hsla, arr => `hsla(${arr[0]}, ${arr[1]}%, ${arr[2]}%, ${this.readableAlpha()})`);\n return hsla;\n }\n toHSL() {\n const hsl = hsvToHsl(this.h, this.s, this.v);\n hsl.toString = this.mapper(hsl, arr => `hsl(${arr[0]}, ${arr[1]}%, ${arr[2]}%)`);\n return hsl;\n }\n toRGBA() {\n const rgba = [...hsvToRgb(this.h, this.s, this.v), this.a];\n rgba.toString = this.mapper(rgba, arr => `rgba(${Math.round(arr[0])}, ${Math.round(arr[1])}, ${Math.round(arr[2])}, ${this.readableAlpha()})`);\n return rgba;\n }\n /**\n * @deprecated {@see toRGBModern()}\n */\n toRGB() {\n const rgb = hsvToRgb(this.h, this.s, this.v);\n rgb.toString = this.mapper(rgb, arr => `rgb(${Math.round(arr[0])}, ${Math.round(arr[1])}, ${Math.round(arr[2])})`);\n return rgb;\n }\n toRGBModern() {\n const rgba = [...hsvToRgb(this.h, this.s, this.v), this.a];\n rgba.toString = this.mapper(rgba, arr => `rgb(${Math.round(arr[0])} ${Math.round(arr[1])} ${Math.round(arr[2])} / ${this.alphaAsPercent()})`);\n return rgba;\n }\n toCMYK() {\n const cmyk = hsvToCmyk(this.h, this.s, this.v);\n cmyk.toString = this.mapper(cmyk, arr => `cmyk(${arr[0]}%, ${arr[1]}%, ${arr[2]}%, ${arr[3]}%)`);\n return cmyk;\n }\n toHEXA() {\n const hex = hsvToHex(this.h, this.s, this.v);\n // Check if alpha channel make sense, convert it to 255 number space, convert\n // To hex and pad it with zeros if needed.\n const alpha = this.a >= 1\n ? ''\n : Number((this.a * 255).toFixed(0))\n .toString(16)\n .toUpperCase()\n .padStart(2, '0');\n alpha && hex.push(alpha);\n hex.toString = () => `#${hex.join('').toUpperCase()}`;\n return hex;\n }\n toHEX() {\n const hex = hsvToHex(this.h, this.s, this.v);\n hex.toString = () => `#${hex.join('').toLowerCase()}`;\n return hex;\n }\n set alpha(a) {\n this.a = (a > 1) ? a / 100 : a;\n }\n get alpha() {\n return this.a;\n }\n set hue(h) {\n this.h = Math.round(h);\n }\n get hue() {\n return this.h;\n }\n set saturation(s) {\n this.s = Math.round(s);\n }\n get saturation() {\n return this.s;\n }\n set value(v) {\n this.v = Math.round(v);\n }\n get value() {\n return this.v;\n }\n clone() {\n return new HSVaColor(this.h, this.s, this.v, this.a);\n }\n readableAlpha() {\n return Math.round((this.a + Number.EPSILON) * 100) / 100;\n }\n alphaAsPercent() {\n return Math.round((this.a + Number.EPSILON) * 100) + '%';\n }\n}\n\nexport { DEFAULT_COLOR as D, HSVaColor as H, isValidHex as i, parseToHSVA as p };\n\n//# sourceMappingURL=HSVaColor-0aa7247b.js.map","import { r as registerInstance, c as createEvent, h, H as Host } from './index-3d0f28ab.js';\nimport { i as isValidHex, D as DEFAULT_COLOR, H as HSVaColor, p as parseToHSVA } from './HSVaColor-0aa7247b.js';\nimport { S as ScrollStop, o as on, a as off } from './utils-6d01f45b.js';\n\nconst numberAsPercent = (number) => number <= 1 ? Math.round(number * 100) : Math.round(number);\n\nclass JsStorage {\n constructor() {\n this.storage = new WeakMap();\n }\n set(element, key, value) {\n if (this.has(element, key)) {\n console.warn('Overwriting existing key:', key);\n }\n if (!this.storage.get(element)) {\n this.storage.set(element, new Map());\n }\n this.storage.get(element).set(key, value);\n }\n get(element, key) {\n var _a;\n if (this.storage.get(element) !== undefined) {\n return this.storage.get(element).get(key);\n }\n return (_a = this.storage[key]) !== null && _a !== void 0 ? _a : null;\n }\n has(element, key) {\n return (this.storage.get(element) !== undefined) && this.storage.get(element).has(key);\n }\n delete(element, key) {\n if (this.has(element, key)) {\n this.storage.get(element).delete(key);\n if (this.storage.get(element).size === 0) {\n this.storage.delete(element);\n }\n }\n }\n}\nconst Storage = new JsStorage();\n\nclass ToolTip {\n /**\n * @param element\n * @param options\n */\n constructor(element, options = {}) {\n this.arrowOffset = 10;\n // private leftTolerance: number = 5;\n this.isScrolling = false;\n this.positionClasses = [];\n this.defaults = {\n // if set to horizontal or vertical, we try and auto-detect the best place to put it on that axis\n position: 'horizontal',\n // delay before the tooltip appears/hides (ms)\n delayShow: 1000,\n delayHide: 500,\n // Vertical and Horizontal offset for the tooltip for finer control\n horizontalOffset: -5,\n verticalOffset: 0,\n };\n this.classNames = {\n tooltip: 'rs-tooltip',\n horizontal: 'rs-tooltip--horizontal',\n vertical: 'rs-tooltip--vertical',\n arrowBottom: 'rs-tooltip--bottom',\n arrowLeft: 'rs-tooltip--left',\n arrowRight: 'rs-tooltip-right',\n arrowTop: 'rs-tooltip--top',\n active: 'rs-tooltip--active'\n };\n if (element.dataset.tip === undefined || element.dataset.tip === '') {\n return;\n }\n if (Storage.has(element, 'tooltip-loaded')) {\n return;\n }\n Storage.set(element, 'tooltip-loaded', true);\n // If the \"options\" parameter is an object, then lets merge it with the defaults,\n // Otherwise, we just use defaults\n if (typeof options === 'object') {\n this.options = Object.assign(this.defaults, options);\n }\n // If they have passed through a string, then we'll convert it to a dom object\n if (typeof element === 'string') {\n element = document.querySelector(element);\n }\n // If the element doesn't actually exist, then we want to stop here.\n if (!(element instanceof Element || element instanceof Element || element === null)) {\n throw new Error(`You haven't passed through a DOM element, or the element can't be found: ${element}`);\n }\n this.element = element;\n this.createStructure();\n // When we mouse over the element we need to show the relevant tool tip\n this.element.addEventListener('mouseenter', () => {\n let delayShow = this.isVisible() ? 0 : this.options.delayShow;\n // Check to see if we are waiting to hide the tooltip. If we are, then we can cancel that timeout\n const hideTimeout = Storage.get(this.tooltipContainer, 'tooltipHideTimeout');\n if (hideTimeout !== undefined) {\n clearTimeout(hideTimeout);\n Storage.delete(this.tooltipContainer, 'tooltipHideTimeout');\n }\n // Check to see if we are in the process of starting a tooltip, if we are, we cancel that one as we want to initiate this one instead\n const showTimeout = Storage.get(this.tooltipContainer, 'tooltipShowTimeout');\n if (showTimeout !== undefined) {\n clearTimeout(showTimeout);\n Storage.delete(this.tooltipContainer, 'tooltipShowTimeout');\n }\n // Start the timeout to show the tooltip after the set the delay. Save the timeout process for use in the mouseleave\n const timeout = setTimeout(() => {\n this.show();\n }, delayShow);\n Storage.set(this.tooltipContainer, 'showTimeout', timeout);\n });\n // When our mouse leaves the element, we want to start the process to hide the tooltip\n this.element.addEventListener('mouseleave', () => {\n // Start the timeout to hide the tooltip after the set the delay. Save the timeout process for use in the mouseenter\n const timeout = setTimeout(() => {\n this.hide();\n Storage.delete(this.tooltipContainer, 'tooltipHideTimeout');\n }, this.options.delayHide);\n Storage.set(this.tooltipContainer, 'tooltipHideTimeout', timeout);\n const showTimeout = Storage.get(this.tooltipContainer, 'showTimeout');\n if (showTimeout !== undefined) {\n clearTimeout(showTimeout);\n Storage.delete(this.tooltipContainer, 'showTimeout');\n }\n });\n // When we scroll, we want to hide all tooltips. We only want to fire this function once though, so when we have stopped scrolling, we want to re-init the scroll event\n window.addEventListener('scroll', () => {\n this.isScrolling = true;\n this.hide(true);\n ScrollStop(() => {\n this.isScrolling = false;\n window.addEventListener('scroll', () => {\n this.isScrolling = true;\n this.hide(true);\n }, {\n once: true\n });\n });\n }, {\n once: true\n });\n }\n /**\n * This gets fired once per page load and creates the dom element on the page\n * @private\n */\n createStructure() {\n if (document.querySelector(`rs-tool-tip`) !== null) {\n this.tooltipContainer = document.querySelector('rs-tool-tip');\n return;\n }\n this.tooltipContainer = document.createElement('rs-tool-tip');\n this.tooltipContainer.classList.add(this.classNames.tooltip);\n document.body.append(this.tooltipContainer);\n }\n /**\n * This does the actual magic of showing the tooltip. It will get relevant positioning info, content info and set the tooltip to display\n */\n show() {\n // We don't want to show when we are scrolling as this can get a bit messy\n if (this.isScrolling) {\n return;\n }\n // Set a small delay of 150 before we show the next tooltip. This is to allow any fadeout from css to happen which are 150ms long\n let delay = 150;\n this.hide();\n setTimeout(() => {\n this.tooltipContainer.innerHTML = this.element.dataset.tip;\n this.setPosition();\n this.tooltipContainer.classList.add(this.classNames.active);\n }, delay);\n }\n /**\n * We need to set the relevant classes on the tooltip and position relative to the element\n */\n setPosition() {\n let top = undefined;\n let left = undefined;\n this.tooltipContainer.style.width = null;\n this.tooltipContainer.style.height = null;\n const elementPos = this.element.getBoundingClientRect();\n const elementLeft = elementPos.left;\n const elementTop = elementPos.top;\n const elementWidth = elementPos.width;\n const elementHeight = elementPos.height;\n const tooltipWidth = this.tooltipContainer.offsetWidth;\n const tooltipHeight = this.tooltipContainer.offsetHeight;\n const scrollTop = window.scrollY || document.documentElement.scrollTop;\n const tolerance = 20; // This is a tolerance for auto checking where to put the tooltip to make sure there's a bit of room around it\n let tooltipPosition = 'left';\n if (this.options.position === 'horizontal') {\n tooltipPosition = 'right'; // We want left to be default\n // First we'll check to see if it'll fit to the left side\n // If the tooltip width + the tolerance is less than the left position of the element, there is enough room for the left\n if (window.innerWidth - elementLeft + elementWidth > tooltipWidth + tolerance) {\n tooltipPosition = 'right';\n }\n else if (elementLeft > tooltipWidth + tolerance) {\n tooltipPosition = 'left';\n }\n }\n else if (this.options.position === 'vertical') {\n tooltipPosition = 'top'; // Bottom will be the default\n // First we'll check to see if it'll on the bottom\n // If the tooltip width + the tolerance is less than the left position of the element, there is enough room for the left\n if (window.innerHeight - elementTop + elementHeight > tooltipHeight + tolerance) {\n tooltipPosition = 'bottom';\n }\n else if (elementTop > tooltipWidth + tolerance) {\n tooltipPosition = 'top';\n }\n }\n this.positionClasses.push(this.classNames[`arrow${tooltipPosition.charAt(0).toUpperCase() + tooltipPosition.slice(1)}`]);\n if (tooltipPosition === 'top') {\n this.positionClasses.push(this.classNames.vertical);\n left = ((elementWidth / 2) + elementLeft) - (tooltipWidth / 2) + this.options.horizontalOffset;\n top = ((elementTop + scrollTop) - tooltipHeight - this.arrowOffset) + this.options.verticalOffset;\n }\n else if (tooltipPosition === 'bottom') {\n this.positionClasses.push(this.classNames.vertical);\n left = ((elementWidth / 2) + elementLeft) - (tooltipWidth / 2) + this.options.horizontalOffset;\n top = ((elementTop + scrollTop) + elementHeight + this.arrowOffset) + this.options.verticalOffset;\n }\n else if (tooltipPosition === 'left') {\n this.positionClasses.push(this.classNames.horizontal);\n left = (elementLeft - tooltipWidth - this.arrowOffset) + this.options.horizontalOffset;\n top = ((elementTop + scrollTop) + (elementHeight / 2) - (tooltipHeight / 2)) + this.options.verticalOffset;\n }\n else if (tooltipPosition === 'right') {\n this.positionClasses.push(this.classNames.horizontal);\n left = (elementWidth + elementLeft + this.arrowOffset) + this.options.horizontalOffset;\n top = ((elementTop + scrollTop) + (elementHeight / 2) - (tooltipHeight / 2)) + this.options.verticalOffset;\n }\n // if (left < this.leftTolerance) {\n // const arrowLeft = left - this.leftTolerance;\n // left = this.leftTolerance;\n // this.tooltipArrow.style.marginLeft = arrowLeft + 'px';\n // }\n // } else {\n // this.tooltipArrow.style.marginLeft = null;\n // }\n const { left: bodyLeft } = window.getComputedStyle(document.body);\n const leftPosition = left !== undefined ? left - Number.parseInt(bodyLeft) : 'auto';\n this.tooltipContainer.style.top = `${top !== null && top !== void 0 ? top : 'auto'}px`;\n this.tooltipContainer.style.right = `${'auto'}px`;\n this.tooltipContainer.style.bottom = `${'auto'}px`;\n this.tooltipContainer.style.left = `${leftPosition}px`;\n this.tooltipContainer.classList.add(...this.positionClasses);\n this.tooltipContainer.setAttribute('arrow', tooltipPosition);\n }\n hide(instantHide = false) {\n const delay = instantHide ? 0 : 150;\n this.tooltipContainer.classList.remove(this.classNames.active);\n setTimeout(() => {\n this.tooltipContainer.classList.remove(this.classNames.arrowBottom, this.classNames.arrowTop, this.classNames.arrowLeft, this.classNames.arrowRight);\n this.tooltipContainer.style.top = null;\n this.tooltipContainer.style.right = null;\n this.tooltipContainer.style.bottom = null;\n this.tooltipContainer.style.left = null;\n }, delay);\n }\n isVisible() {\n const computedStyle = window.getComputedStyle(this.tooltipContainer);\n return !(this.tooltipContainer.offsetParent === null || computedStyle.opacity === '0');\n }\n}\n\nconst colorPickerCss = \":host{display:inline-block;font-family:arial, sans-serif;-webkit-font-smoothing:antialiased}.container{padding:16px;border-radius:8px;background:#fff;box-shadow:0 5px 15px rgb(70 74 83 / 0.25);font-family:soleil, sans-serif}:host(.color-picker--inline) .container{padding:0;box-shadow:none;background:none}.input-container{position:relative;flex-grow:1;flex-shrink:1}.input-label{font-size:12px;color:#95a8bd;position:absolute;right:15px;top:50%;transform:translateY(-50%)}.palettes-header{color:#748393;font-size:12px;font-weight:normal}.palettes-container{display:grid;gap:10px;grid-template-columns:repeat(6, 24px);grid-auto-rows:minmax(24px, auto)}.palettes-message{background:var(--rs-color-light);padding:16px;font-size:12px;width:162px;text-align:center;display:flex;flex-direction:column;gap:10px;border-radius:8px}.help-guide-link{color:var(--rs-color-primary);font-weight:700;cursor:pointer}:host(.color-picker--inline) .palettes-container{grid-template-columns:repeat(auto-fit, 24px)}.palette__container{border-radius:30px;overflow:hidden;position:relative}.palette__container--active{box-shadow:0 0 0 2px rgb(116 131 147 / 0.5);border:2px solid #fff}.palette{border-radius:30px;width:100%;height:100%;display:block;box-sizing:border-box;cursor:pointer;position:absolute;top:0;left:0;bottom:0;right:0;border:1px solid rgb(44 48 53 / 0.15)}.checkerboard{position:absolute;top:0;left:0;bottom:0;right:0;opacity:0.5;background-image:linear-gradient(45deg, #808080 25%, transparent 25%), linear-gradient(-45deg, #808080 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #808080 75%), linear-gradient(-45deg, transparent 75%, #808080 75%);background-size:6px 6px;background-position:0 0, 0 3px, 3px -3px, -3px 0}input,.transparent-button{font-family:soleil, arial, sans-serif;font-size:14px;text-transform:uppercase;color:#748393;height:28px;text-indent:8px;border-radius:4px;background:#fff;border:1px solid #ddd;box-sizing:border-box;min-width:0;width:100%}.transparent-button{margin-top:16px;text-transform:unset;text-align:left;display:flex;align-items:center;cursor:pointer;justify-content:space-between;padding:0 4px}.transparent-button__swatch{width:20px;height:20px;display:block;opacity:0.5;box-shadow:inset 0 0 1px 1px var(--rs-color-secondary);border-radius:20px;transition:box-shadow 0.15s cubic-bezier(0, 0.55, 0.45, 1);position:relative;overflow:hidden}.transparent-button:hover .transparent-button__swatch{box-shadow:inset 0 0 3px 1px var(--rs-color-secondary)}.transparent-button__swatch::after{content:\\\"\\\";position:absolute;border-top:2px solid red;width:21px;transform:rotate(-45deg);transform-origin:center;top:8px;z-index:1;left:0}\";\n\nconst ColorPicker = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.colorChange = createEvent(this, \"colorChange\", 7);\n this.presetColorChoice = createEvent(this, \"presetColorChoice\", 7);\n this.hasRecentColors = false;\n this.hueChangeHandler = (event) => {\n if (this.hasTransparentButton()) {\n this.currentOpacity = 100;\n this.currentColor.alpha = this.currentOpacity;\n }\n this.currentColor.hue = event.detail;\n this.setHue(event.detail);\n this.setColorAndEmit(this.currentColor.toHEXA().toString());\n };\n this.colorPaletteChangeHandler = (event) => {\n var _a;\n if (this.hasTransparentButton() || !this.supportsOpacity()) {\n this.currentOpacity = 100;\n }\n (_a = this.opacitySlider) === null || _a === void 0 ? void 0 : _a.setColor(event.detail.toHEXA().toString());\n event.detail.alpha = this.currentOpacity;\n this.setColorAndEmit(event.detail.toHEXA().toString());\n };\n this.handleOpacityInput = event => {\n const opacityValue = isNaN(event.target.value) ? 0 : event.target.value;\n this.currentOpacity = Math.max(Math.min(opacityValue, 100), 0);\n this.setColorAndEmit(this.currentColor.toHEXA().toString());\n };\n this.setPresetPalette = event => {\n var _a, _b, _c;\n const palettes = (_a = this.palettesToDisplay.filter(palettes => {\n return palettes.label === event.target.dataset.category;\n })[0]) !== null && _a !== void 0 ? _a : { palettes: [] };\n const palette = (_b = palettes.palettes.filter(palette => {\n return palette.index === Number.parseInt(event.target.dataset.index);\n })[0]) !== null && _b !== void 0 ? _b : {};\n this.setColorFromPalette(event.target.dataset.color);\n this.presetColorChoice.emit({\n color: this.currentColor,\n data: (_c = palette.data) !== null && _c !== void 0 ? _c : null\n });\n };\n this.handleHexInput = event => {\n const hexValue = event.target.value;\n const hex = hexValue.startsWith('#') ? hexValue : `#${hexValue}`;\n if (isValidHex(hex)) {\n this.setColorAndEmit(hex);\n this.setHue(this.currentColor.hue);\n }\n };\n this.handleHexFocus = event => {\n event.target.select();\n };\n this.hasOpacity = (color) => color.length > 7;\n this.setTransparentButton = () => {\n this.currentOpacity = 0;\n this.currentColor.alpha = this.currentOpacity;\n this.setColorAndEmit(this.currentColor.toHEXA().toString());\n };\n this.currentColor = undefined;\n this.currentOpacity = undefined;\n this.palettesToDisplay = [];\n this.color = undefined;\n this.opacity = false;\n this.palettes = undefined;\n this.maxPresetDisplay = 12;\n this.recentColorsLabel = 'Recent Colors';\n this.transparentButton = false;\n this.display = 'default';\n this.mode = 'default';\n }\n watchPalettes() {\n this.buildPresetPalettes();\n }\n componentWillLoad() {\n var _a;\n this.setColorValue((_a = this.color) !== null && _a !== void 0 ? _a : DEFAULT_COLOR);\n this.buildPresetPalettes();\n }\n componentDidRender() {\n this.createToolTips();\n }\n opacityChangeHandler(event) {\n this.currentOpacity = numberAsPercent(event.detail);\n this.currentColor.alpha = this.currentOpacity;\n this.setColorAndEmit(this.currentColor.toHEXA().toString());\n }\n colorPickerAddRecentHandler(event) {\n if (!this.hasRecentColors) {\n return;\n }\n const recentPalettes = this.getPresetPaletteGroup(this.recentColorsLabel);\n if (!this.paletteExists(event.detail.hex, recentPalettes.palettes)) {\n this.addToPreset(event.detail.hex, this.recentColorsLabel);\n }\n }\n /**\n * Reset the color picker to a requested color\n * @param color in hex format\n */\n async setColor(color) {\n this.setColorValue(color);\n await this.updateColorPickerControls();\n }\n /**\n * Returns a HSVaColor object of the currently selected color\n */\n async getColor() {\n return this.currentColor;\n }\n /**\n * Add a single color the list of preset palettes. If the label already exists it will be added to the start. If it doesn't exist, a new section will be created.\n * @param hex\n * @param label\n */\n async addToPreset(hex, label) {\n if (this.renderPresetPalette(hex)) {\n const palettes = JSON.parse(JSON.stringify(this.palettesToDisplay));\n const paletteIndex = palettes.findIndex(p => p.label === label);\n if (paletteIndex !== -1) {\n if (!this.paletteExists(hex, palettes[paletteIndex].palettes)) {\n palettes[paletteIndex].palettes.unshift(hex);\n }\n }\n else {\n palettes.push({\n label: label,\n palettes: [\n hex\n ]\n });\n }\n this.palettesToDisplay = palettes;\n }\n }\n async updateColorPickerControls() {\n await this.colorPalette.setColor(this.currentColor.toHEXA().toString());\n await this.hueSlider.setHue(this.currentColor.hue);\n this.setOpacitySlider();\n }\n ;\n getPresetPaletteGroup(label) {\n const palettes = JSON.parse(JSON.stringify(this.palettesToDisplay));\n const paletteIndex = palettes.findIndex(p => p.label === label);\n return palettes[paletteIndex];\n }\n setColorAndEmit(color) {\n this.setColorValue(color);\n this.colorChange.emit(this.currentColor);\n }\n setColorValue(color) {\n this.currentColor = new HSVaColor(...parseToHSVA(color).values);\n if (this.hasTransparentButton() && !this.showOpacity() && this.currentColor.alpha < 1) {\n this.currentColor.alpha = 0;\n }\n else if (!this.showOpacity()) {\n this.currentColor.alpha = 100;\n this.currentOpacity = numberAsPercent(this.currentColor.alpha);\n }\n else {\n this.currentOpacity = numberAsPercent(this.currentColor.alpha);\n }\n }\n setOpacitySlider() {\n if (this.showOpacity()) {\n this.opacitySlider.setColor(this.currentColor.toHEX().toString());\n this.opacitySlider.setOpacity(this.currentColor.alpha);\n }\n }\n supportsOpacity() {\n return this.showOpacity() || this.hasTransparentButton();\n }\n hasTransparentButton() {\n return this.transparentButton !== undefined && this.transparentButton === true && !this.showOpacity();\n }\n showOpacity() {\n return this.opacity !== undefined && this.opacity === true;\n }\n renderPresetPalette(palette) {\n return (isValidHex(palette) && !this.showOpacity() && !this.hasOpacity(palette)) ||\n (isValidHex(palette) && this.showOpacity());\n }\n paletteExists(hex, palettes) {\n return palettes.findIndex(pHex => pHex.toLowerCase() === hex.toLowerCase()) !== -1;\n }\n renderOpacityInput() {\n if (this.showOpacity()) {\n return (h(\"div\", { class: 'input-container', style: {\n flexBasis: '70px'\n } }, h(\"input\", { type: \"text\", value: `${this.currentOpacity}`, onInput: this.handleOpacityInput }), h(\"div\", { class: 'input-label' }, \"%\")));\n }\n }\n buildPresetPalettes() {\n let palettes = this.palettes;\n if (typeof this.palettes === 'string') {\n try {\n palettes = JSON.parse(this.palettes);\n }\n catch (_a) {\n palettes = [];\n }\n }\n if (palettes === undefined) {\n palettes = [];\n }\n if (!Array.isArray(palettes)) {\n palettes = [palettes];\n }\n this.palettesToDisplay = palettes.map(({ label, palettes, count }) => {\n return {\n label,\n count,\n palettes: palettes.reduce((result, palette, index) => {\n var _a, _b, _c;\n const color = typeof palette === 'string' && isValidHex(palette) ? palette : typeof palette.color === 'string' && isValidHex(palette.color) ? palette.color : null;\n if (color !== null) {\n result.push({\n index,\n color,\n title: (_a = palette.title) !== null && _a !== void 0 ? _a : null,\n description: (_b = palette.description) !== null && _b !== void 0 ? _b : null,\n data: (_c = palette.data) !== null && _c !== void 0 ? _c : null,\n });\n }\n return result;\n }, [])\n };\n });\n }\n setColorFromPalette(color) {\n this.setColorAndEmit(color);\n this.currentOpacity = numberAsPercent(this.currentColor.alpha);\n if (this.mode === 'preset') {\n return;\n }\n this.colorPalette.setColor(this.currentColor.toHEXA().toString());\n this.hueSlider.setHue(this.currentColor.hue);\n this.setOpacitySlider();\n }\n setHue(hue) {\n var _a, _b;\n (_a = this.hueSlider) === null || _a === void 0 ? void 0 : _a.setHue(hue);\n (_b = this.colorPalette) === null || _b === void 0 ? void 0 : _b.setHue(hue);\n }\n render() {\n return (h(Host, { class: `color-picker--${this.display}` }, h(\"div\", { class: 'container' }, this.mode === 'default' ?\n h(\"div\", null, h(\"color-picker-color-palette\", { display: this.display, color: this.currentColor.toHEX().toString(), onColorPaletteChange: this.colorPaletteChangeHandler, ref: el => this.colorPalette = el }), h(\"color-picker-hue-slider\", { display: this.display, hue: this.currentColor.hue, onHueChange: this.hueChangeHandler, ref: el => this.hueSlider = el }), this.showOpacity()\n ?\n h(\"color-picker-opacity-slider\", { display: this.display, color: this.currentColor.toHEX().toString(), opacity: this.currentOpacity, ref: el => this.opacitySlider = el })\n : '', h(\"div\", { style: {\n width: '100%',\n maxWidth: this.display === 'inline' ? '100%' : '200px',\n display: 'flex',\n gap: '12px',\n marginTop: '16px',\n } }, h(\"div\", { class: 'input-container' }, h(\"input\", { type: \"text\", maxlength: 7, value: this.currentColor.toHEX().toString(), onInput: this.handleHexInput, onFocus: this.handleHexFocus }), h(\"div\", { class: 'input-label' }, \"Hex\")), this.renderOpacityInput()))\n : '', h(\"div\", { ref: el => this.palettesContainer = el }, this.palettesToDisplay.map(({ label, palettes, count }, index) => {\n let presetCount = 0;\n if (label === this.recentColorsLabel) {\n this.hasRecentColors = true;\n }\n return (h(\"div\", null, h(\"h3\", { class: 'palettes-header', style: {\n marginTop: index === 0 && this.mode === 'preset' ? '0' : ''\n } }, label), h(\"div\", { class: 'palettes-container' }, palettes.map(palette => {\n if (this.renderPresetPalette(palette.color) && presetCount < this.getMaxPalettesToDisplay(count, palettes.length)) {\n presetCount++;\n return (h(\"div\", { class: {\n 'palette__container': true,\n 'palette__container--active': this.currentColor.toHEX().toString().toLowerCase() === palette.color.toLowerCase(),\n } }, h(\"span\", { class: 'checkerboard' }), h(\"span\", { class: 'palette', \"data-category\": label, \"data-index\": palette.index, \"data-tip\": ColorPicker.buildToolTip(palette), \"data-color\": palette.color, style: { backgroundColor: palette.color }, onClick: this.setPresetPalette })));\n }\n })), h(\"div\", null, (palettes.length <= 0 && label === 'Brand Colours') ?\n h(\"div\", { class: 'palettes-message' }, h(\"rs-content\", { style: {\n fontSize: '12px',\n } }, \"No brand colours have been added to your website yet\"), h(\"a\", { href: 'https://support.rocketspark.com/hc/en-us/articles/6551728489881-Want-to-add-your-Brand-Colours-to-your-site-', target: '_blank', class: 'help-guide-link' }, \"View help guide\"))\n : '')));\n })), this.hasTransparentButton() ?\n h(\"button\", { class: 'transparent-button', onClick: this.setTransparentButton }, \"Transparent\", h(\"span\", { class: 'transparent-button__swatch' }, \"\\u00A0\"))\n : '')));\n }\n static buildToolTip(palette) {\n let toolTip;\n if (palette.title !== null && palette.title !== '') {\n toolTip = `<h5 class=\"rs-tooltip__heading\">${palette.title}</h5>`;\n }\n if (palette.description !== null && palette.description !== '') {\n toolTip += `<p class=\"rs-tooltip__caption\">${palette.description}</p>`;\n }\n return toolTip;\n }\n createToolTips() {\n var _a, _b;\n (_b = (_a = this.palettesContainer) === null || _a === void 0 ? void 0 : _a.querySelectorAll('.palette')) === null || _b === void 0 ? void 0 : _b.forEach((element) => {\n new ToolTip(element, {\n position: 'horizontal',\n horizontalOffset: 10\n });\n });\n }\n getMaxPalettesToDisplay(count, numberOfPalettes) {\n if (count === undefined) {\n return this.maxPresetDisplay;\n }\n if (count === 0) {\n return numberOfPalettes;\n }\n return count;\n }\n static get watchers() { return {\n \"palettes\": [\"watchPalettes\"]\n }; }\n};\nColorPicker.style = colorPickerCss;\n\nclass Moveable {\n constructor(options) {\n this.cache = {\n x: 0,\n y: 0,\n };\n this.clamp = (v) => Math.max(Math.min(v, 1), 0);\n this.options = Object.assign(Object.assign({}, Moveable.DEFAULT_OPTIONS), options);\n this.tapStartBinding = this.tapstart.bind(this);\n this.tapStopBinding = this.tapstop.bind(this);\n this.tapMoveBinding = this.tapmove.bind(this);\n on([this.options.wrapper, this.options.element], 'mousedown', this.tapStartBinding);\n on([this.options.wrapper, this.options.element], 'touchstart', this.tapStartBinding, {\n passive: false,\n });\n on(document, ['keydown', 'keyup'], this.keyboard.bind(this));\n }\n keyboard(e) {\n const { type, key } = e;\n // Check to see if the Movable is focused and then move it based on arrow key inputs\n // For improved accessibility\n if (document.activeElement === this.options.wrapper) {\n const { lock } = this.options;\n const up = key === 'ArrowUp';\n const right = key === 'ArrowRight';\n const down = key === 'ArrowDown';\n const left = key === 'ArrowLeft';\n if (type === 'keydown' && (up || right || down || left)) {\n let xm;\n let ym = 0;\n if (lock === 'v') {\n xm = up || right ? 1 : -1;\n }\n else if (lock === 'h') {\n xm = up || right ? -1 : 1;\n }\n else {\n ym = 0;\n if (up) {\n ym = -1;\n }\n else if (down) {\n ym = 1;\n }\n xm = 0;\n if (left) {\n xm = -1;\n }\n else if (right) {\n xm = 1;\n }\n }\n this.update(this.clamp(this.cache.x + 0.01 * xm), this.clamp(this.cache.y + 0.01 * ym));\n e.preventDefault();\n }\n else if (key.startsWith('Arrow')) {\n this.options.onstop();\n e.preventDefault();\n }\n }\n }\n tapstart(evt) {\n this.wrapperBoundingClient = this.options.wrapper.getBoundingClientRect();\n on(document, ['mouseup', 'touchend', 'touchcancel'], this.tapStopBinding);\n on(document, ['mousemove', 'touchmove'], this.tapMoveBinding);\n if (evt.cancelable) {\n evt.preventDefault();\n }\n const event = new CustomEvent('start');\n this.options.element.dispatchEvent(event);\n // Trigger\n this.tapmove(evt);\n }\n tapmove(evt) {\n let x;\n let y;\n if (evt) {\n const touch = evt && evt.touches && evt.touches[0];\n x = evt ? (touch || evt).clientX : 0;\n y = evt ? (touch || evt).clientY : 0;\n if (Moveable.outsideLeftBounds(x, this.wrapperBoundingClient)) {\n x = this.wrapperBoundingClient.left;\n }\n else if (Moveable.outsideRightBounds(x, this.wrapperBoundingClient)) {\n x = this.wrapperBoundingClient.left + this.wrapperBoundingClient.width;\n }\n if (Moveable.outsideTopBounds(y, this.wrapperBoundingClient)) {\n y = this.wrapperBoundingClient.top;\n }\n else if (Moveable.outsideBottomBounds(y, this.wrapperBoundingClient)) {\n y = this.wrapperBoundingClient.top + this.wrapperBoundingClient.height;\n }\n // Normalize (Set x/y to coords inside wrapper)\n x -= this.wrapperBoundingClient.left;\n y -= this.wrapperBoundingClient.top;\n }\n else {\n x = this.cache.x * this.wrapperBoundingClient.width;\n y = this.cache.y * this.wrapperBoundingClient.height;\n }\n if (this.options.lock !== 'h') {\n // this.options.element.style.left = `calc(${ (x / this.wrapperBoundingClient.width) * 100 }% - ${ this.options.element.offsetWidth / 2 }px)`;\n this.options.element.style.left = `${(x / this.wrapperBoundingClient.width) * 100}%`;\n }\n if (this.options.lock !== 'v') {\n // this.options.element.style.top = `calc(${ (y / this.wrapperBoundingClient.height) * 100 }% - ${ this.options.element.offsetHeight / 2 }px)`;\n this.options.element.style.top = `${(y / this.wrapperBoundingClient.height) * 100}%`;\n }\n this.cache = {\n x: x / this.wrapperBoundingClient.width,\n y: y / this.wrapperBoundingClient.height\n };\n const cx = this.clamp(this.cache.x);\n const cy = this.clamp(this.cache.y);\n const event = new CustomEvent('change', {\n detail: {\n x: cx,\n y: cy,\n }\n });\n this.options.element.dispatchEvent(event);\n }\n tapstop() {\n this.options.onstop();\n off(document, ['mouseup', 'touchend', 'touchcancel'], this.tapStopBinding);\n off(document, ['mousemove', 'touchmove'], this.tapMoveBinding);\n const event = new CustomEvent('stop');\n this.options.element.dispatchEvent(event);\n }\n trigger() {\n this.tapmove(null);\n }\n update(xPos = 0, yPos = 0) {\n const x = xPos;\n let y = this.options.lock === 'h' ? x : yPos;\n const { left, top, width, height } = this.options.wrapper.getBoundingClientRect();\n this.tapmove({\n clientX: left + width * x,\n clientY: top + height * y,\n });\n }\n destroy() {\n off(document, ['keydown', 'keyup'], this.keyboard.bind(this));\n off([this.options.wrapper, this.options.element], 'mousedown', this.tapstart.bind(this));\n off([this.options.wrapper, this.options.element], 'touchstart', this.tapstart.bind(this), {\n passive: false,\n });\n }\n}\nMoveable.DEFAULT_OPTIONS = {\n lock: null,\n onchange: () => 0,\n onstop: () => 0,\n};\nMoveable.outsideBottomBounds = (y, wrappingBoundingRect) => y > wrappingBoundingRect.top + wrappingBoundingRect.height;\nMoveable.outsideTopBounds = (y, wrappingBoundingRect) => y < wrappingBoundingRect.top;\nMoveable.outsideRightBounds = (x, wrappingBoundingRect) => x > wrappingBoundingRect.left + wrappingBoundingRect.width;\nMoveable.outsideLeftBounds = (x, wrappingBoundingRect) => x < wrappingBoundingRect.left;\n\nconst colorPickerColorPaletteCss = \":host{display:block}.selector__pickr{position:absolute;height:16px;width:16px;border-radius:16px;border:2px solid #fff;box-sizing:border-box;box-shadow:0 5px 15px rgb(70 74 83 / 0.25);cursor:pointer;transition:top 150ms linear, left 150ms linear;transform:translate(-50%, -50%)}.selector__pickr:active,.color-selector:active .selector__pickr{transition:none;cursor:none}.color-selector{height:155px;width:200px;border-radius:6px;position:relative}.color-selector--inline{width:100%}\";\n\nconst ColorPalette = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.colorPaletteChange = createEvent(this, \"colorPaletteChange\", 7);\n this.getPaletteBackgroundColor = () => {\n return `\n linear-gradient(to top, rgba(0, 0, 0, 1), transparent),\n linear-gradient(to left, hsla(${this.hue}, 100%, 50%, 1),\n rgba(255, 255, 255, 1))\n `;\n };\n this.handleChange = event => {\n const { x, y } = event.detail;\n // Calculate saturation based on the position\n const saturation = x * 100;\n // Calculate the value\n let value = 100 - y * 100;\n // Prevent falling under zero\n value < 0 ? (value = 0) : 0;\n this.currentColor.saturation = saturation;\n this.currentColor.value = value;\n this.slider.style.background = this.currentColor.toRGB().toString();\n this.colorPaletteChange.emit(this.currentColor);\n };\n this.sliderOffsetWidth = 8;\n this.sliderOffsetHeight = 8;\n this.sliderLeft = 50;\n this.sliderTop = 50;\n this.paletteBackgroundStyle = undefined;\n this.hue = 0;\n this.display = 'default';\n this.color = undefined;\n }\n componentWillLoad() {\n this.setInternalColor(this.color);\n return new Promise(resolve => {\n if (this.slider !== null && this.slider !== undefined) {\n const offsetWidth = this.slider.offsetWidth;\n const offsetHeight = this.slider.offsetHeight;\n if (!isNaN(offsetWidth)) {\n this.sliderOffsetWidth = offsetWidth / 2;\n }\n if (!isNaN(offsetHeight)) {\n this.sliderOffsetHeight = this.slider.offsetHeight / 2;\n }\n }\n resolve();\n });\n }\n componentDidLoad() {\n new Moveable({\n element: this.slider,\n wrapper: this.palette,\n });\n }\n /**\n * Set the hue ONLY on color palette\n * @param hue\n */\n async setHue(hue) {\n this.currentColor.hue = hue;\n this.hue = hue;\n }\n /**\n * Sets the color. Must pass through a hex value\n * @param {string} color\n */\n async setColor(color) {\n this.setInternalColor(color);\n }\n setInternalColor(color) {\n this.currentColor = new HSVaColor(...parseToHSVA(color).values);\n this.hue = this.currentColor.hue;\n this.sliderLeft = this.currentColor.saturation;\n this.sliderTop = 100 - this.currentColor.value;\n }\n render() {\n return (h(\"div\", { class: {\n 'color-selector': true,\n [`color-selector--${this.display}`]: true\n }, ref: el => this.palette = el, style: {\n background: this.getPaletteBackgroundColor()\n } }, h(\"div\", { class: 'selector__pickr', style: {\n 'left': `${this.sliderLeft}%`,\n 'top': `${this.sliderTop}%`,\n 'background': this.currentColor.toRGB().toString()\n }, onChange: this.handleChange, ref: el => this.slider = el })));\n }\n};\nColorPalette.style = colorPickerColorPaletteCss;\n\nconst colorPickerHueSliderCss = \":host{display:block}.selector__pickr{position:absolute;height:16px;width:16px;border-radius:16px;border:2px solid #fff;box-sizing:border-box;box-shadow:0 5px 15px rgb(70 74 83 / 0.25);cursor:pointer;transition:left 150ms linear;transform:translateX(-50%)}.selector__pickr:active,.color-selector:active .selector__pickr{transition:none;cursor:none}.component-outer{position:relative;height:8px;width:100%;max-width:200px;cursor:pointer}.component-outer--inline{max-width:100%}.component-selector{position:absolute;top:0;left:0;right:0;bottom:0;border-radius:10px;overflow:hidden}.hue-selector{background:linear-gradient(90deg, #f00 0%, #f57a20 12.78%, #ffd708 25.28%, #61ff00 37.78%, #0ff 50.28%, #0f4ded 62.26%, #640fed 73.72%, #ed0fe4 85.7%, #ed0f87 97.68%)}\";\n\nconst HueSlider = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.hueChange = createEvent(this, \"hueChange\", 7);\n this.handleChange = (event) => {\n const hue = event.detail.x * 360;\n this.hueChange.emit(hue);\n this.slider.style.backgroundColor = `hsl(${hue}, 100%, 50%)`;\n };\n this._hue = undefined;\n this.display = 'default';\n this.hue = undefined;\n }\n /**\n * Sets the hue value\n * @param {number} hue\n */\n async setHue(hue) {\n this._hue = hue;\n }\n componentWillLoad() {\n this._hue = this.hue;\n }\n componentDidLoad() {\n new Moveable({\n lock: 'v',\n element: this.slider,\n wrapper: this.container,\n });\n }\n render() {\n return (h(\"div\", { class: {\n 'component-outer': true,\n [`component-outer--${this.display}`]: true\n }, style: {\n 'margin-top': '16px',\n }, ref: el => this.container = el }, h(\"div\", { class: 'hue-selector component-selector' }), h(\"div\", { class: 'selector__pickr', style: {\n 'margin-top': '-4px',\n 'left': `${this._hue / 360 * 100}%`,\n 'background': `hsl(${this._hue}, 100%, 50%)`\n }, onChange: this.handleChange, ref: el => this.slider = el })));\n }\n};\nHueSlider.style = colorPickerHueSliderCss;\n\nconst colorPickerOpacitySliderCss = \":host{display:block}.component-outer{position:relative;cursor:pointer;height:8px;width:100%;max-width:200px}.component-outer--inline{max-width:100%}.component-selector{position:absolute;top:0;left:0;right:0;bottom:0;border-radius:10px;overflow:hidden}.checker-board{background-image:linear-gradient(45deg, #808080 25%, transparent 25%), linear-gradient(-45deg, #808080 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #808080 75%), linear-gradient(-45deg, transparent 75%, #808080 75%);background-size:6px 6px;background-position:0 0, 0 3px, 3px -3px, -3px 0}.selector__pickr{transform:translateX(-50%);position:absolute;height:16px;width:16px;border-radius:16px;border:2px solid #fff;box-sizing:border-box;box-shadow:0 5px 15px rgb(70 74 83 / 0.25);cursor:pointer;transition:left 150ms linear}.selector__pickr:active,.color-selector:active .selector__pickr{transition:none;cursor:none}\";\n\nconst OpacitySlider = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.opacityChange = createEvent(this, \"opacityChange\", 7);\n this.handleOpacityChange = (event) => {\n this.currentColor.alpha = this.currentOpacity = event.detail.x;\n this.slider.style.background = this.currentColor.toRGBA().toString();\n this.opacityChange.emit(this.currentOpacity);\n };\n this.currentRgb = undefined;\n this.currentOpacity = undefined;\n this.color = '#000000';\n this.opacity = undefined;\n this.display = 'default';\n }\n watchOpacity(opacity) {\n this.setInternalOpacity(opacity);\n }\n getOpacityAsPercent() {\n return this.currentOpacity <= 1 ? this.currentOpacity * 100 : this.currentOpacity;\n }\n /**\n * Sets the color for the slider\n * @param color\n */\n async setColor(color) {\n this.setInternalColor(color);\n }\n /**\n * Sets te opacity for the slider\n * @param opacity\n */\n async setOpacity(opacity) {\n this.setInternalOpacity(opacity);\n }\n componentDidLoad() {\n new Moveable({\n lock: 'v',\n element: this.slider,\n wrapper: this.container,\n });\n }\n componentWillLoad() {\n this.setInternalOpacity(this.opacity);\n this.setInternalColor(this.color);\n }\n setInternalOpacity(opacity) {\n const o = opacity !== null && opacity !== void 0 ? opacity : 100;\n this.currentOpacity = o > 1 ? o / 100 : o;\n }\n setInternalColor(color) {\n this.currentColor = new HSVaColor(...parseToHSVA(color).values);\n this.currentColor.alpha = this.currentOpacity;\n this.currentRgb = this.currentColor.toRGB();\n }\n render() {\n return (h(\"div\", { class: {\n 'component-outer': true,\n [`component-outer--${this.display}`]: true\n }, style: {\n 'margin-top': '16px',\n }, ref: el => this.container = el }, h(\"div\", { class: 'checker-board component-selector' }), h(\"div\", { class: 'component-selector', style: {\n 'background': `linear-gradient(90deg, rgba(${this.currentRgb[0]},${this.currentRgb[1]},${this.currentRgb[2]}, 0) 0%, rgba(${this.currentRgb[0]},${this.currentRgb[1]},${this.currentRgb[2]}, 1) 100%)`\n } }), h(\"div\", { class: 'selector__pickr', style: {\n 'margin-top': '-4px',\n 'left': `${this.getOpacityAsPercent()}%`,\n 'background': `rgba(${this.currentRgb[0]},${this.currentRgb[1]},${this.currentRgb[2]}, ${this.currentOpacity})`\n }, onChange: this.handleOpacityChange, ref: el => this.slider = el })));\n }\n static get watchers() { return {\n \"opacity\": [\"watchOpacity\"]\n }; }\n};\nOpacitySlider.style = colorPickerOpacitySliderCss;\n\nexport { ColorPicker as color_picker, ColorPalette as color_picker_color_palette, HueSlider as color_picker_hue_slider, OpacitySlider as color_picker_opacity_slider };\n\n//# sourceMappingURL=color-picker_4.entry.js.map","const flexGapSupported = () => {\n // create flex container with row-gap set\n const flex = document.createElement('div');\n flex.style.display = 'flex';\n flex.style.flexDirection = 'column';\n flex.style.rowGap = '1px';\n // create two, elements inside it\n flex.appendChild(document.createElement('div'));\n flex.appendChild(document.createElement('div'));\n // append to the DOM (needed to obtain scrollHeight)\n document.body.appendChild(flex);\n const isSupported = flex.scrollHeight === 1; // flex container should be 1px high from the row-gap\n flex.parentNode.removeChild(flex);\n return isSupported;\n};\nfunction eventListener(method, elements, events, fn, options = {}) {\n let localElements = elements;\n if (Array.isArray(elements)) {\n localElements = Array.from(elements);\n }\n else if (!Array.isArray(elements)) {\n localElements = [elements];\n }\n let localEvents = events;\n if (!Array.isArray(events)) {\n localEvents = [events];\n }\n localElements.forEach(el => {\n localEvents.forEach(ev => {\n el[method](ev, fn, Object.assign({ capture: false }, options));\n });\n });\n return [elements, events, fn, options];\n}\nconst on = eventListener.bind(null, 'addEventListener');\nconst off = eventListener.bind(null, 'removeEventListener');\nconst ScrollStop = (callback) => {\n // Make sure a valid callback was provided\n if (!callback || Object.prototype.toString.call(callback) !== '[object Function]') {\n return;\n }\n // Setup scrolling variable\n let isScrolling;\n // Listen for scroll events\n window.addEventListener('scroll', function () {\n // Clear our timeout throughout the scroll\n window.clearTimeout(isScrolling);\n // Set a timeout to run after scrolling ends\n isScrolling = setTimeout(function () {\n // Run the callback\n callback();\n }, 66);\n }, false);\n};\n\nexport { ScrollStop as S, off as a, flexGapSupported as f, on as o };\n\n//# sourceMappingURL=utils-6d01f45b.js.map"],"names":["min","max","floor","round","Math","hsvToRgb","h","s","v","hLocal","sLocal","vLocal","i","f","p","q","t","mod","hsvToHex","map","rgb","toString","padStart","hsvToHsl","l","rgbToHsv","red","green","blue","r","g","b","minVal","maxVal","delta","dr","dg","db","cmykToHsv","cyan","magenta","yellow","key","m","y","k","hslToHsv","hue","saturation","lightness","ns","Number","isNaN","parseToHSVA","colorString","toLowerCase","string","match","name","undefined","ctx","document","createElement","getContext","fillStyle","standardizeColor","type","colorType","Object","entries","cmyk","rgba","hsla","hsva","hexa","find","colorRegex","exec","regex","getColorType","numarize","array","test","values","isValidAlpha","a","hasValidAlphaChannel","c","alpha","hex","length","split","join","raw","substring","parseInt","hsvValue","hexRgb","hexToHsv","isValidHex","DEFAULT_COLOR","HSVaColor","constructor","this","mapper","original","next","precision","toFixed","toHSVA","arr","readableAlpha","toHSLA","toHSL","hsl","toRGBA","toRGB","toRGBModern","alphaAsPercent","toCMYK","hsvToCmyk","toHEXA","toUpperCase","push","toHEX","value","clone","EPSILON","numberAsPercent","number","Storage","storage","WeakMap","set","element","has","console","warn","get","Map","_a","delete","size","ToolTip","options","arrowOffset","isScrolling","positionClasses","defaults","position","delayShow","delayHide","horizontalOffset","verticalOffset","classNames","tooltip","horizontal","vertical","arrowBottom","arrowLeft","arrowRight","arrowTop","active","dataset","tip","assign","querySelector","Element","Error","createStructure","addEventListener","isVisible","hideTimeout","tooltipContainer","clearTimeout","showTimeout","timeout","setTimeout","show","hide","window","S","once","classList","add","body","append","innerHTML","setPosition","top","left","style","width","height","elementPos","getBoundingClientRect","elementLeft","elementTop","elementWidth","elementHeight","tooltipWidth","offsetWidth","tooltipHeight","offsetHeight","scrollTop","scrollY","documentElement","tooltipPosition","innerWidth","innerHeight","charAt","slice","bodyLeft","getComputedStyle","leftPosition","right","bottom","setAttribute","instantHide","delay","remove","computedStyle","offsetParent","opacity","ColorPicker","hostRef","colorChange","presetColorChoice","hasRecentColors","hueChangeHandler","event","hasTransparentButton","currentOpacity","currentColor","detail","setHue","setColorAndEmit","colorPaletteChangeHandler","supportsOpacity","opacitySlider","setColor","handleOpacityInput","opacityValue","target","setPresetPalette","_b","_c","palette","palettesToDisplay","filter","palettes","label","category","index","setColorFromPalette","color","emit","data","handleHexInput","hexValue","startsWith","handleHexFocus","select","hasOpacity","setTransparentButton","maxPresetDisplay","recentColorsLabel","transparentButton","display","mode","watchPalettes","buildPresetPalettes","componentWillLoad","setColorValue","D","componentDidRender","createToolTips","opacityChangeHandler","colorPickerAddRecentHandler","recentPalettes","getPresetPaletteGroup","paletteExists","addToPreset","updateColorPickerControls","getColor","renderPresetPalette","JSON","parse","stringify","paletteIndex","findIndex","unshift","colorPalette","hueSlider","setOpacitySlider","H","showOpacity","setOpacity","pHex","renderOpacityInput","class","flexBasis","onInput","Array","isArray","count","reduce","result","title","description","render","onColorPaletteChange","ref","el","onHueChange","maxWidth","gap","marginTop","maxlength","onFocus","palettesContainer","presetCount","getMaxPalettesToDisplay","buildToolTip","backgroundColor","onClick","fontSize","href","toolTip","querySelectorAll","forEach","numberOfPalettes","watchers","Moveable","cache","x","clamp","DEFAULT_OPTIONS","tapStartBinding","tapstart","bind","tapStopBinding","tapstop","tapMoveBinding","tapmove","o","wrapper","passive","keyboard","e","activeElement","lock","up","down","xm","ym","update","preventDefault","onstop","evt","wrapperBoundingClient","cancelable","CustomEvent","dispatchEvent","touch","touches","clientX","clientY","outsideLeftBounds","outsideRightBounds","outsideTopBounds","outsideBottomBounds","cx","cy","trigger","xPos","yPos","destroy","onchange","wrappingBoundingRect","ColorPalette","colorPaletteChange","getPaletteBackgroundColor","handleChange","slider","background","sliderOffsetWidth","sliderOffsetHeight","sliderLeft","sliderTop","paletteBackgroundStyle","setInternalColor","Promise","resolve","componentDidLoad","onChange","HueSlider","hueChange","_hue","container","OpacitySlider","opacityChange","handleOpacityChange","currentRgb","watchOpacity","setInternalOpacity","getOpacityAsPercent","flexGapSupported","flex","flexDirection","rowGap","appendChild","isSupported","scrollHeight","parentNode","removeChild","eventListener","method","elements","events","fn","localElements","from","localEvents","ev","capture","on","off","ScrollStop","callback","prototype","call"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"245.index.js","mappings":";;;;;;;;;;;uNAAA,MAAM,IAAEA,EAAG,IAAEC,EAAG,MAAEC,EAAK,MAAEC,GAAUC,KAenC,SAASC,EAASC,EAAGC,EAAGC,GACpB,MAAMC,EAAUH,EAAI,IAAO,EACrBI,EAASH,EAAI,IACbI,EAASH,EAAI,IACbI,EAAIV,EAAMO,GACVI,EAAIJ,EAASG,EACbE,EAAIH,GAAU,EAAID,GAClBK,EAAIJ,GAAU,EAAIE,EAAI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c,OACpCyV,EAAKxN,MAAM0C,QAAU,OACrB8K,EAAKxN,MAAMyN,cAAgB,SAC3BD,EAAKxN,MAAM0N,OAAS,MAEpBF,EAAKG,YAAY7V,SAASC,cAAc,QACxCyV,EAAKG,YAAY7V,SAASC,cAAc,QAExCD,SAAS4H,KAAKiO,YAAYH,GAC1B,MAAMI,EAAoC,IAAtBJ,EAAKK,aAEzB,OADAL,EAAKM,WAAWC,YAAYP,GACrBI,CAAW,EAEtB,SAASI,EAAcC,EAAQC,EAAUC,EAAQC,EAAInR,EAAU,CAAC,GAC5D,IAAIoR,EAAgBH,EAChBlH,MAAMC,QAAQiH,GACdG,EAAgBrH,MAAMsH,KAAKJ,GAErBlH,MAAMC,QAAQiH,KACpBG,EAAgB,CAACH,IAErB,IAAIK,EAAcJ,EASlB,OARKnH,MAAMC,QAAQkH,KACfI,EAAc,CAACJ,IAEnBE,EAAc1F,SAAQjB,IAClB6G,EAAY5F,SAAQ6F,IAChB9G,EAAGuG,GAAQO,EAAIJ,EAAI/V,OAAOiG,OAAO,CAAEmQ,SAAS,GAASxR,GAAS,GAChE,IAEC,CAACiR,EAAUC,EAAQC,EAAInR,EAClC,CACA,MAAMyR,EAAKV,EAAc3E,KAAK,KAAM,oBAC9BsF,EAAMX,EAAc3E,KAAK,KAAM,uBAC/BuF,EAAcC,IAEhB,IAAKA,GAAyD,sBAA7CxW,OAAOyW,UAAUxZ,SAASyZ,KAAKF,GAC5C,OAGJ,IAAI1R,EAEJkC,OAAOV,iBAAiB,UAAU,WAE9BU,OAAON,aAAa5B,GAEpBA,EAAc+B,YAAW,WAErB2P,GACJ,GAAG,GACP,IAAG,EAAM,C","sources":["webpack://DomainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/HSVaColor-db3c71a6.js","webpack://DomainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/color-picker_4.entry.js","webpack://DomainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/utils-025bb042.js"],"sourcesContent":["const { min, max, floor, round } = Math;\nfunction standardizeColor(name) {\n if (name === undefined) {\n return '#000';\n }\n if (name.toLowerCase() === 'black') {\n return '#000';\n }\n const ctx = document.createElement('canvas').getContext('2d');\n if (ctx === null) {\n return null;\n }\n ctx.fillStyle = name;\n return ctx.fillStyle === '#000' ? null : ctx.fillStyle;\n}\nfunction hsvToRgb(h, s, v) {\n const hLocal = (h / 360) * 6;\n const sLocal = s / 100;\n const vLocal = v / 100;\n const i = floor(hLocal);\n const f = hLocal - i;\n const p = vLocal * (1 - sLocal);\n const q = vLocal * (1 - f * sLocal);\n const t = vLocal * (1 - (1 - f) * sLocal);\n const mod = i % 6;\n const r = [vLocal, q, p, p, t, vLocal][mod];\n const g = [t, vLocal, vLocal, q, p, p][mod];\n const b = [p, p, t, vLocal, vLocal, q][mod];\n return [r * 255, g * 255, b * 255];\n}\nfunction hsvToHex(h, s, v) {\n return hsvToRgb(h, s, v).map(rgb => round(rgb)\n .toString(16)\n .padStart(2, '0'));\n}\nfunction hsvToCmyk(h, s, v) {\n const rgb = hsvToRgb(h, s, v);\n const r = rgb[0] / 255;\n const g = rgb[1] / 255;\n const b = rgb[2] / 255;\n const k = min(1 - r, 1 - g, 1 - b);\n const c = k === 1 ? 0 : (1 - r - k) / (1 - k);\n const m = k === 1 ? 0 : (1 - g - k) / (1 - k);\n const y = k === 1 ? 0 : (1 - b - k) / (1 - k);\n return [c * 100, m * 100, y * 100, k * 100];\n}\nfunction hsvToHsl(h, s, v) {\n let sLocal = s / 100;\n const vLocal = v / 100;\n const l = ((2 - sLocal) * vLocal) / 2;\n if (l !== 0) {\n if (l === 1) {\n sLocal = 0;\n }\n else if (l < 0.5) {\n sLocal = (sLocal * vLocal) / (l * 2);\n }\n else {\n sLocal = (sLocal * vLocal) / (2 - l * 2);\n }\n }\n return [h, sLocal * 100, l * 100];\n}\nfunction rgbToHsv(red, green, blue) {\n const r = red / 255;\n const g = green / 255;\n const b = blue / 255;\n const minVal = min(r, g, b);\n const maxVal = max(r, g, b);\n const delta = maxVal - minVal;\n let h;\n let s;\n const v = maxVal;\n if (delta === 0) {\n h = 0;\n s = 0;\n }\n else {\n s = delta / maxVal;\n const dr = ((maxVal - r) / 6 + delta / 2) / delta;\n const dg = ((maxVal - g) / 6 + delta / 2) / delta;\n const db = ((maxVal - b) / 6 + delta / 2) / delta;\n if (r === maxVal) {\n h = db - dg;\n }\n else if (g === maxVal) {\n h = 1 / 3 + dr - db;\n }\n else if (b === maxVal) {\n h = 2 / 3 + dg - dr;\n }\n if (h < 0) {\n h += 1;\n }\n else if (h > 1) {\n h -= 1;\n }\n }\n return [h * 360, s * 100, v * 100];\n}\nfunction cmykToHsv(cyan, magenta, yellow, key) {\n const c = cyan / 100;\n const m = magenta / 100;\n const y = yellow / 100;\n const k = key / 100;\n const r = (1 - min(1, c * (1 - k) + k)) * 255;\n const g = (1 - min(1, m * (1 - k) + k)) * 255;\n const b = (1 - min(1, y * (1 - k) + k)) * 255;\n return [...rgbToHsv(r, g, b)];\n}\nfunction hslToHsv(hue, saturation, lightness) {\n let s = saturation / 100;\n const l = lightness / 100;\n s *= l < 0.5 ? l : 1 - l;\n const ns = ((2 * s) / (l + s)) * 100;\n const v = (l + s) * 100;\n return [hue, Number.isNaN(ns) ? 0 : ns, v];\n}\nfunction hexToHsv(hex) {\n const hexRgb = hex.match(/.{2}/g);\n if (hexRgb !== null) {\n const [red, green, blue] = hexRgb.map(v => Number.parseInt(v, 16));\n return rgbToHsv(red, green, blue);\n }\n return null;\n}\nfunction getColorType(colorString) {\n // Regular expressions to match different types of color representation\n const regex = {\n cmyk: /^cmyk[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]+([\\d.]+)/i,\n rgba: /^((rgba)|rgb)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]*?([\\d.]+|$)/i,\n hsla: /^((hsla)|hsl)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]*?([\\d.]+|$)/i,\n hsva: /^((hsva)|hsv)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]*?([\\d.]+|$)/i,\n hexa: /^#?(([\\dA-Fa-f]{3,4})|([\\dA-Fa-f]{6})|([\\dA-Fa-f]{8}))$/i,\n };\n const colorType = Object.entries(regex).find(([, colorRegex]) => colorRegex.exec(colorString));\n if (colorType !== undefined) {\n const match = colorType[1].exec(colorString);\n return {\n type: colorType[0],\n regex: colorType[1],\n match,\n };\n }\n return {\n type: null,\n };\n}\n/**\n * Try's to parse a string which represents a color to an HSV array.\n * Current supported types are cmyk, rgba, hsla and hexadecimal.\n */\nfunction parseToHSVA(colorString = '#000') {\n // Check if string is a color-name\n if (colorString.toLowerCase() === 'transparent') {\n colorString = '#00000000';\n }\n const string = colorString.match(/^[a-zA-Z]+$/) !== null ? standardizeColor(colorString) : colorString;\n const { type, match } = getColorType(string);\n /**\n * Takes an Array of any type, convert strings which represents\n * a number to a number an anything else to undefined.\n * */\n const numarize = (array) => array.map(v => (/^(|\\d+)\\.\\d+|\\d+$/.test(v) ? Number(v) : undefined));\n if (type === null || match === null) {\n return { values: null, type: 'hexa' };\n }\n // Match[2] does only contain a truthy value if rgba, hsla, or hsla got matched\n const hasValidAlphaChannel = (a) => !!match[2] === (typeof a === 'number');\n const isValidAlpha = (a) => a >= 0 && a <= 1 && hasValidAlphaChannel(a);\n if (type === 'cmyk') {\n const [, c, m, y, k] = numarize(match);\n if (c && m && y && k && c <= 100 && m <= 100 && y <= 100 && k <= 100) {\n return { values: cmykToHsv(c, m, y, k), type };\n }\n }\n if (type === 'rgba') {\n const [, , , r, g, b, a] = numarize(match);\n if (r !== undefined && g !== undefined && b !== undefined && a !== undefined && r <= 255 && g <= 255 && b <= 255 && isValidAlpha(a)) {\n return { values: [...rgbToHsv(r, g, b), a], alpha: a, type };\n }\n }\n if (type === 'hexa') {\n let [, hex] = match;\n if (hex.length === 4 || hex.length === 3) {\n hex = hex\n .split('')\n .map(v => v + v)\n .join('');\n }\n const raw = hex.substring(0, 6);\n let a = hex.substring(6);\n // Convert 0 - 255 to 0 - 1 for opacity\n a = a ? parseInt(a, 16) / 255 : undefined;\n const hsvValue = hexToHsv(raw);\n if (hsvValue !== undefined) {\n return { values: [...hsvValue, a], alpha: a, type };\n }\n }\n if (type === 'hsla') {\n const [, , , h, s, l, a] = numarize(match);\n if (h && s && l && a && h <= 360 && s <= 100 && l <= 100 && a >= 0 && a <= 1 && isValidAlpha(a)) {\n return { values: [...hslToHsv(h, s, l), a], alpha: a, type };\n }\n }\n if (type === 'hsva') {\n const [, , , h, s, v, a] = numarize(match);\n if (h && s && v && a && h <= 360 && s <= 100 && v <= 100 && a >= 0 && a <= 1 && isValidAlpha(a)) {\n return { values: [h, s, v, a], alpha: a, type };\n }\n }\n return { values: null, type: 'hexa' };\n}\nconst isValidHex = string => {\n if (string === undefined) {\n return false;\n }\n return string.match(/^#?[\\dA-Fa-f]{6,8}$/i);\n};\nconst DEFAULT_COLOR = '#7CA1FF';\n\n/**\n * Simple class which holds the properties\n * of the color representation model hsla (hue saturation lightness alpha)\n */\nclass HSVaColor {\n constructor(h = 0, s = 0, v = 0, a = 1) {\n this.mapper = (original, next) => (precision = -1) => {\n return next(precision >= 0 ? original.map(v => Number(v.toFixed(precision))) : original);\n };\n this.h = h;\n this.s = s;\n this.v = v;\n this.a = (a > 1) ? a / 100 : a;\n }\n toHSVA() {\n const hsva = [this.h, this.s, this.v, this.a];\n hsva.toString = this.mapper(hsva, arr => `hsva(${arr[0]}, ${arr[1]}%, ${arr[2]}%, ${this.readableAlpha()})`);\n return hsva;\n }\n toHSLA() {\n const hsla = [...hsvToHsl(this.h, this.s, this.v), this.a];\n hsla.toString = this.mapper(hsla, arr => `hsla(${arr[0]}, ${arr[1]}%, ${arr[2]}%, ${this.readableAlpha()})`);\n return hsla;\n }\n toHSL() {\n const hsl = hsvToHsl(this.h, this.s, this.v);\n hsl.toString = this.mapper(hsl, arr => `hsl(${arr[0]}, ${arr[1]}%, ${arr[2]}%)`);\n return hsl;\n }\n toRGBA() {\n const rgba = [...hsvToRgb(this.h, this.s, this.v), this.a];\n rgba.toString = this.mapper(rgba, arr => `rgba(${Math.round(arr[0])}, ${Math.round(arr[1])}, ${Math.round(arr[2])}, ${this.readableAlpha()})`);\n return rgba;\n }\n /**\n * @deprecated {@see toRGBModern()}\n */\n toRGB() {\n const rgb = hsvToRgb(this.h, this.s, this.v);\n rgb.toString = this.mapper(rgb, arr => `rgb(${Math.round(arr[0])}, ${Math.round(arr[1])}, ${Math.round(arr[2])})`);\n return rgb;\n }\n toRGBModern() {\n const rgba = [...hsvToRgb(this.h, this.s, this.v), this.a];\n rgba.toString = this.mapper(rgba, arr => `rgb(${Math.round(arr[0])} ${Math.round(arr[1])} ${Math.round(arr[2])} / ${this.alphaAsPercent()})`);\n return rgba;\n }\n toCMYK() {\n const cmyk = hsvToCmyk(this.h, this.s, this.v);\n cmyk.toString = this.mapper(cmyk, arr => `cmyk(${arr[0]}%, ${arr[1]}%, ${arr[2]}%, ${arr[3]}%)`);\n return cmyk;\n }\n toHEXA() {\n const hex = hsvToHex(this.h, this.s, this.v);\n // Check if alpha channel make sense, convert it to 255 number space, convert\n // To hex and pad it with zeros if needed.\n const alpha = this.a >= 1\n ? ''\n : Number((this.a * 255).toFixed(0))\n .toString(16)\n .toUpperCase()\n .padStart(2, '0');\n alpha && hex.push(alpha);\n hex.toString = () => `#${hex.join('').toUpperCase()}`;\n return hex;\n }\n toHEX() {\n const hex = hsvToHex(this.h, this.s, this.v);\n hex.toString = () => `#${hex.join('').toLowerCase()}`;\n return hex;\n }\n set alpha(a) {\n this.a = (a > 1) ? a / 100 : a;\n }\n get alpha() {\n return this.a;\n }\n set hue(h) {\n this.h = Math.round(h);\n }\n get hue() {\n return this.h;\n }\n set saturation(s) {\n this.s = Math.round(s);\n }\n get saturation() {\n return this.s;\n }\n set value(v) {\n this.v = Math.round(v);\n }\n get value() {\n return this.v;\n }\n clone() {\n return new HSVaColor(this.h, this.s, this.v, this.a);\n }\n readableAlpha() {\n return Math.round((this.a + Number.EPSILON) * 100) / 100;\n }\n alphaAsPercent() {\n return Math.round((this.a + Number.EPSILON) * 100) + '%';\n }\n}\n\nexport { DEFAULT_COLOR as D, HSVaColor as H, isValidHex as i, parseToHSVA as p };\n\n//# sourceMappingURL=HSVaColor-db3c71a6.js.map","import { r as registerInstance, c as createEvent, h, H as Host } from './index-def1ecaa.js';\nimport { i as isValidHex, D as DEFAULT_COLOR, H as HSVaColor, p as parseToHSVA } from './HSVaColor-db3c71a6.js';\nimport { S as ScrollStop, o as on, a as off } from './utils-025bb042.js';\n\nconst numberAsPercent = (number) => number <= 1 ? Math.round(number * 100) : Math.round(number);\n\nclass JsStorage {\n constructor() {\n this.storage = new WeakMap();\n }\n set(element, key, value) {\n if (this.has(element, key)) {\n console.warn('Overwriting existing key:', key);\n }\n if (!this.storage.get(element)) {\n this.storage.set(element, new Map());\n }\n this.storage.get(element).set(key, value);\n }\n get(element, key) {\n var _a;\n if (this.storage.get(element) !== undefined) {\n return this.storage.get(element).get(key);\n }\n return (_a = this.storage[key]) !== null && _a !== void 0 ? _a : null;\n }\n has(element, key) {\n return (this.storage.get(element) !== undefined) && this.storage.get(element).has(key);\n }\n delete(element, key) {\n if (this.has(element, key)) {\n this.storage.get(element).delete(key);\n if (this.storage.get(element).size === 0) {\n this.storage.delete(element);\n }\n }\n }\n}\nconst Storage = new JsStorage();\n\nclass ToolTip {\n /**\n * @param element\n * @param options\n */\n constructor(element, options = {}) {\n this.arrowOffset = 10;\n // private leftTolerance: number = 5;\n this.isScrolling = false;\n this.positionClasses = [];\n this.defaults = {\n // if set to horizontal or vertical, we try and auto-detect the best place to put it on that axis\n position: 'horizontal',\n // delay before the tooltip appears/hides (ms)\n delayShow: 1000,\n delayHide: 500,\n // Vertical and Horizontal offset for the tooltip for finer control\n horizontalOffset: -5,\n verticalOffset: 0,\n };\n this.classNames = {\n tooltip: 'rs-tooltip',\n horizontal: 'rs-tooltip--horizontal',\n vertical: 'rs-tooltip--vertical',\n arrowBottom: 'rs-tooltip--bottom',\n arrowLeft: 'rs-tooltip--left',\n arrowRight: 'rs-tooltip-right',\n arrowTop: 'rs-tooltip--top',\n active: 'rs-tooltip--active'\n };\n if (element.dataset.tip === undefined || element.dataset.tip === '') {\n return;\n }\n if (Storage.has(element, 'tooltip-loaded')) {\n return;\n }\n Storage.set(element, 'tooltip-loaded', true);\n // If the \"options\" parameter is an object, then lets merge it with the defaults,\n // Otherwise, we just use defaults\n if (typeof options === 'object') {\n this.options = Object.assign(this.defaults, options);\n }\n // If they have passed through a string, then we'll convert it to a dom object\n if (typeof element === 'string') {\n element = document.querySelector(element);\n }\n // If the element doesn't actually exist, then we want to stop here.\n if (!(element instanceof Element || element instanceof Element || element === null)) {\n throw new Error(`You haven't passed through a DOM element, or the element can't be found: ${element}`);\n }\n this.element = element;\n this.createStructure();\n // When we mouse over the element we need to show the relevant tool tip\n this.element.addEventListener('mouseenter', () => {\n let delayShow = this.isVisible() ? 0 : this.options.delayShow;\n // Check to see if we are waiting to hide the tooltip. If we are, then we can cancel that timeout\n const hideTimeout = Storage.get(this.tooltipContainer, 'tooltipHideTimeout');\n if (hideTimeout !== undefined) {\n clearTimeout(hideTimeout);\n Storage.delete(this.tooltipContainer, 'tooltipHideTimeout');\n }\n // Check to see if we are in the process of starting a tooltip, if we are, we cancel that one as we want to initiate this one instead\n const showTimeout = Storage.get(this.tooltipContainer, 'tooltipShowTimeout');\n if (showTimeout !== undefined) {\n clearTimeout(showTimeout);\n Storage.delete(this.tooltipContainer, 'tooltipShowTimeout');\n }\n // Start the timeout to show the tooltip after the set the delay. Save the timeout process for use in the mouseleave\n const timeout = setTimeout(() => {\n this.show();\n }, delayShow);\n Storage.set(this.tooltipContainer, 'showTimeout', timeout);\n });\n // When our mouse leaves the element, we want to start the process to hide the tooltip\n this.element.addEventListener('mouseleave', () => {\n // Start the timeout to hide the tooltip after the set the delay. Save the timeout process for use in the mouseenter\n const timeout = setTimeout(() => {\n this.hide();\n Storage.delete(this.tooltipContainer, 'tooltipHideTimeout');\n }, this.options.delayHide);\n Storage.set(this.tooltipContainer, 'tooltipHideTimeout', timeout);\n const showTimeout = Storage.get(this.tooltipContainer, 'showTimeout');\n if (showTimeout !== undefined) {\n clearTimeout(showTimeout);\n Storage.delete(this.tooltipContainer, 'showTimeout');\n }\n });\n // When we scroll, we want to hide all tooltips. We only want to fire this function once though, so when we have stopped scrolling, we want to re-init the scroll event\n window.addEventListener('scroll', () => {\n this.isScrolling = true;\n this.hide(true);\n ScrollStop(() => {\n this.isScrolling = false;\n window.addEventListener('scroll', () => {\n this.isScrolling = true;\n this.hide(true);\n }, {\n once: true\n });\n });\n }, {\n once: true\n });\n }\n /**\n * This gets fired once per page load and creates the dom element on the page\n * @private\n */\n createStructure() {\n if (document.querySelector(`rs-tool-tip`) !== null) {\n this.tooltipContainer = document.querySelector('rs-tool-tip');\n return;\n }\n this.tooltipContainer = document.createElement('rs-tool-tip');\n this.tooltipContainer.classList.add(this.classNames.tooltip);\n document.body.append(this.tooltipContainer);\n }\n /**\n * This does the actual magic of showing the tooltip. It will get relevant positioning info, content info and set the tooltip to display\n */\n show() {\n // We don't want to show when we are scrolling as this can get a bit messy\n if (this.isScrolling) {\n return;\n }\n // Set a small delay of 150 before we show the next tooltip. This is to allow any fadeout from css to happen which are 150ms long\n let delay = 150;\n this.hide();\n setTimeout(() => {\n this.tooltipContainer.innerHTML = this.element.dataset.tip;\n this.setPosition();\n this.tooltipContainer.classList.add(this.classNames.active);\n }, delay);\n }\n /**\n * We need to set the relevant classes on the tooltip and position relative to the element\n */\n setPosition() {\n let top = undefined;\n let left = undefined;\n this.tooltipContainer.style.width = null;\n this.tooltipContainer.style.height = null;\n const elementPos = this.element.getBoundingClientRect();\n const elementLeft = elementPos.left;\n const elementTop = elementPos.top;\n const elementWidth = elementPos.width;\n const elementHeight = elementPos.height;\n const tooltipWidth = this.tooltipContainer.offsetWidth;\n const tooltipHeight = this.tooltipContainer.offsetHeight;\n const scrollTop = window.scrollY || document.documentElement.scrollTop;\n const tolerance = 20; // This is a tolerance for auto checking where to put the tooltip to make sure there's a bit of room around it\n let tooltipPosition = 'left';\n if (this.options.position === 'horizontal') {\n tooltipPosition = 'right'; // We want left to be default\n // First we'll check to see if it'll fit to the left side\n // If the tooltip width + the tolerance is less than the left position of the element, there is enough room for the left\n if (window.innerWidth - elementLeft + elementWidth > tooltipWidth + tolerance) {\n tooltipPosition = 'right';\n }\n else if (elementLeft > tooltipWidth + tolerance) {\n tooltipPosition = 'left';\n }\n }\n else if (this.options.position === 'vertical') {\n tooltipPosition = 'top'; // Bottom will be the default\n // First we'll check to see if it'll on the bottom\n // If the tooltip width + the tolerance is less than the left position of the element, there is enough room for the left\n if (window.innerHeight - elementTop + elementHeight > tooltipHeight + tolerance) {\n tooltipPosition = 'bottom';\n }\n else if (elementTop > tooltipWidth + tolerance) {\n tooltipPosition = 'top';\n }\n }\n this.positionClasses.push(this.classNames[`arrow${tooltipPosition.charAt(0).toUpperCase() + tooltipPosition.slice(1)}`]);\n if (tooltipPosition === 'top') {\n this.positionClasses.push(this.classNames.vertical);\n left = ((elementWidth / 2) + elementLeft) - (tooltipWidth / 2) + this.options.horizontalOffset;\n top = ((elementTop + scrollTop) - tooltipHeight - this.arrowOffset) + this.options.verticalOffset;\n }\n else if (tooltipPosition === 'bottom') {\n this.positionClasses.push(this.classNames.vertical);\n left = ((elementWidth / 2) + elementLeft) - (tooltipWidth / 2) + this.options.horizontalOffset;\n top = ((elementTop + scrollTop) + elementHeight + this.arrowOffset) + this.options.verticalOffset;\n }\n else if (tooltipPosition === 'left') {\n this.positionClasses.push(this.classNames.horizontal);\n left = (elementLeft - tooltipWidth - this.arrowOffset) + this.options.horizontalOffset;\n top = ((elementTop + scrollTop) + (elementHeight / 2) - (tooltipHeight / 2)) + this.options.verticalOffset;\n }\n else if (tooltipPosition === 'right') {\n this.positionClasses.push(this.classNames.horizontal);\n left = (elementWidth + elementLeft + this.arrowOffset) + this.options.horizontalOffset;\n top = ((elementTop + scrollTop) + (elementHeight / 2) - (tooltipHeight / 2)) + this.options.verticalOffset;\n }\n // if (left < this.leftTolerance) {\n // const arrowLeft = left - this.leftTolerance;\n // left = this.leftTolerance;\n // this.tooltipArrow.style.marginLeft = arrowLeft + 'px';\n // }\n // } else {\n // this.tooltipArrow.style.marginLeft = null;\n // }\n const { left: bodyLeft } = window.getComputedStyle(document.body);\n const leftPosition = left !== undefined ? left - Number.parseInt(bodyLeft) : 'auto';\n this.tooltipContainer.style.top = `${top !== null && top !== void 0 ? top : 'auto'}px`;\n this.tooltipContainer.style.right = `${'auto'}px`;\n this.tooltipContainer.style.bottom = `${'auto'}px`;\n this.tooltipContainer.style.left = `${leftPosition}px`;\n this.tooltipContainer.classList.add(...this.positionClasses);\n this.tooltipContainer.setAttribute('arrow', tooltipPosition);\n }\n hide(instantHide = false) {\n const delay = instantHide ? 0 : 150;\n this.tooltipContainer.classList.remove(this.classNames.active);\n setTimeout(() => {\n this.tooltipContainer.classList.remove(this.classNames.arrowBottom, this.classNames.arrowTop, this.classNames.arrowLeft, this.classNames.arrowRight);\n this.tooltipContainer.style.top = null;\n this.tooltipContainer.style.right = null;\n this.tooltipContainer.style.bottom = null;\n this.tooltipContainer.style.left = null;\n }, delay);\n }\n isVisible() {\n const computedStyle = window.getComputedStyle(this.tooltipContainer);\n return !(this.tooltipContainer.offsetParent === null || computedStyle.opacity === '0');\n }\n}\n\nconst colorPickerCss = \":host{display:inline-block;font-family:arial, sans-serif;-webkit-font-smoothing:antialiased}.container{padding:16px;border-radius:8px;background:#fff;box-shadow:0 5px 15px rgb(70 74 83 / 0.25);font-family:soleil, sans-serif}:host(.color-picker--inline) .container{padding:0;box-shadow:none;background:none}.input-container{position:relative;flex-grow:1;flex-shrink:1}.input-label{font-size:12px;color:#95a8bd;position:absolute;right:15px;top:50%;transform:translateY(-50%)}.palettes-header{color:#748393;font-size:12px;font-weight:normal}.palettes-container{display:grid;gap:10px;grid-template-columns:repeat(6, 24px);grid-auto-rows:minmax(24px, auto)}.palettes-message{background:var(--rs-color-light);padding:16px;font-size:12px;width:162px;text-align:center;display:flex;flex-direction:column;gap:10px;border-radius:8px}.help-guide-link{color:var(--rs-color-primary);font-weight:700;cursor:pointer}:host(.color-picker--inline) .palettes-container{grid-template-columns:repeat(auto-fit, 24px)}.palette__container{border-radius:30px;overflow:hidden;position:relative}.palette__container--active{box-shadow:0 0 0 2px rgb(116 131 147 / 0.5);border:2px solid #fff}.palette{border-radius:30px;width:100%;height:100%;display:block;box-sizing:border-box;cursor:pointer;position:absolute;top:0;left:0;bottom:0;right:0;border:1px solid rgb(44 48 53 / 0.15)}.checkerboard{position:absolute;top:0;left:0;bottom:0;right:0;opacity:0.5;background-image:linear-gradient(45deg, #808080 25%, transparent 25%), linear-gradient(-45deg, #808080 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #808080 75%), linear-gradient(-45deg, transparent 75%, #808080 75%);background-size:6px 6px;background-position:0 0, 0 3px, 3px -3px, -3px 0}input,.transparent-button{font-family:soleil, arial, sans-serif;font-size:14px;text-transform:uppercase;color:#748393;height:28px;text-indent:8px;border-radius:4px;background:#fff;border:1px solid #ddd;box-sizing:border-box;min-width:0;width:100%}.transparent-button{margin-top:16px;text-transform:unset;text-align:left;display:flex;align-items:center;cursor:pointer;justify-content:space-between;padding:0 4px}.transparent-button__swatch{width:20px;height:20px;display:block;opacity:0.5;box-shadow:inset 0 0 1px 1px var(--rs-color-secondary);border-radius:20px;transition:box-shadow 0.15s cubic-bezier(0, 0.55, 0.45, 1);position:relative;overflow:hidden}.transparent-button:hover .transparent-button__swatch{box-shadow:inset 0 0 3px 1px var(--rs-color-secondary)}.transparent-button__swatch::after{content:\\\"\\\";position:absolute;border-top:2px solid red;width:21px;transform:rotate(-45deg);transform-origin:center;top:8px;z-index:1;left:0}\";\nconst ColorPickerStyle0 = colorPickerCss;\n\nconst ColorPicker = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.colorChange = createEvent(this, \"colorChange\", 7);\n this.presetColorChoice = createEvent(this, \"presetColorChoice\", 7);\n this.hasRecentColors = false;\n this.palettesToDisplay = [];\n /**\n * Whether opacity is supported on this instance.\n */\n this.opacity = false;\n /**\n * Max number of preset palettes to display\n */\n this.maxPresetDisplay = 12;\n /**\n * The label that corresponds to the group of palettes for your recent colors\n */\n this.recentColorsLabel = 'Recent Colors';\n /**\n * If set to true, a button will show that will allow the user to set the color picker to transparent without the need for the opacity slider\n */\n this.transparentButton = false;\n /**\n * If set to default, color picker's floating and has drop shadow - will display relative to the nearest positioned ancestor.\n * If set to inline, color picker will always display according to the normal flow of the page - will have no drop-shadow and width is always 100%.\n */\n this.display = 'default';\n /**\n * If set to preset, we only show the preset colors and don't allow custom selection via any method\n */\n this.mode = 'default';\n this.hueChangeHandler = (event) => {\n if (this.hasTransparentButton()) {\n this.currentOpacity = 100;\n this.currentColor.alpha = this.currentOpacity;\n }\n this.currentColor.hue = event.detail;\n this.setHue(event.detail);\n this.setColorAndEmit(this.currentColor.toHEXA().toString());\n };\n this.colorPaletteChangeHandler = (event) => {\n var _a;\n if (this.hasTransparentButton() || !this.supportsOpacity()) {\n this.currentOpacity = 100;\n }\n (_a = this.opacitySlider) === null || _a === void 0 ? void 0 : _a.setColor(event.detail.toHEXA().toString());\n event.detail.alpha = this.currentOpacity;\n this.setColorAndEmit(event.detail.toHEXA().toString());\n };\n this.handleOpacityInput = event => {\n const opacityValue = isNaN(event.target.value) ? 0 : event.target.value;\n this.currentOpacity = Math.max(Math.min(opacityValue, 100), 0);\n this.setColorAndEmit(this.currentColor.toHEXA().toString());\n };\n this.setPresetPalette = event => {\n var _a, _b, _c;\n const palettes = (_a = this.palettesToDisplay.filter(palettes => {\n return palettes.label === event.target.dataset.category;\n })[0]) !== null && _a !== void 0 ? _a : { palettes: [] };\n const palette = (_b = palettes.palettes.filter(palette => {\n return palette.index === Number.parseInt(event.target.dataset.index);\n })[0]) !== null && _b !== void 0 ? _b : {};\n this.setColorFromPalette(event.target.dataset.color);\n this.presetColorChoice.emit({\n color: this.currentColor,\n data: (_c = palette.data) !== null && _c !== void 0 ? _c : null\n });\n };\n this.handleHexInput = event => {\n const hexValue = event.target.value;\n const hex = hexValue.startsWith('#') ? hexValue : `#${hexValue}`;\n if (isValidHex(hex)) {\n this.setColorAndEmit(hex);\n this.setHue(this.currentColor.hue);\n }\n };\n this.handleHexFocus = event => {\n event.target.select();\n };\n this.hasOpacity = (color) => color.length > 7;\n this.setTransparentButton = () => {\n this.currentOpacity = 0;\n this.currentColor.alpha = this.currentOpacity;\n this.setColorAndEmit(this.currentColor.toHEXA().toString());\n };\n }\n watchPalettes() {\n this.buildPresetPalettes();\n }\n componentWillLoad() {\n var _a;\n this.setColorValue((_a = this.color) !== null && _a !== void 0 ? _a : DEFAULT_COLOR);\n this.buildPresetPalettes();\n }\n componentDidRender() {\n this.createToolTips();\n }\n opacityChangeHandler(event) {\n this.currentOpacity = numberAsPercent(event.detail);\n this.currentColor.alpha = this.currentOpacity;\n this.setColorAndEmit(this.currentColor.toHEXA().toString());\n }\n colorPickerAddRecentHandler(event) {\n if (!this.hasRecentColors) {\n return;\n }\n const recentPalettes = this.getPresetPaletteGroup(this.recentColorsLabel);\n if (!this.paletteExists(event.detail.hex, recentPalettes.palettes)) {\n this.addToPreset(event.detail.hex, this.recentColorsLabel);\n }\n }\n /**\n * Reset the color picker to a requested color\n * @param color in hex format\n */\n async setColor(color) {\n this.setColorValue(color);\n await this.updateColorPickerControls();\n }\n /**\n * Returns a HSVaColor object of the currently selected color\n */\n async getColor() {\n return this.currentColor;\n }\n /**\n * Add a single color the list of preset palettes. If the label already exists it will be added to the start. If it doesn't exist, a new section will be created.\n * @param hex\n * @param label\n */\n async addToPreset(hex, label) {\n if (this.renderPresetPalette(hex)) {\n const palettes = JSON.parse(JSON.stringify(this.palettesToDisplay));\n const paletteIndex = palettes.findIndex(p => p.label === label);\n if (paletteIndex !== -1) {\n if (!this.paletteExists(hex, palettes[paletteIndex].palettes)) {\n palettes[paletteIndex].palettes.unshift(hex);\n }\n }\n else {\n palettes.push({\n label: label,\n palettes: [\n hex\n ]\n });\n }\n this.palettesToDisplay = palettes;\n }\n }\n async updateColorPickerControls() {\n await this.colorPalette.setColor(this.currentColor.toHEXA().toString());\n await this.hueSlider.setHue(this.currentColor.hue);\n this.setOpacitySlider();\n }\n ;\n getPresetPaletteGroup(label) {\n const palettes = JSON.parse(JSON.stringify(this.palettesToDisplay));\n const paletteIndex = palettes.findIndex(p => p.label === label);\n return palettes[paletteIndex];\n }\n setColorAndEmit(color) {\n this.setColorValue(color);\n this.colorChange.emit(this.currentColor);\n }\n setColorValue(color) {\n this.currentColor = new HSVaColor(...parseToHSVA(color).values);\n if (this.hasTransparentButton() && !this.showOpacity() && this.currentColor.alpha < 1) {\n this.currentColor.alpha = 0;\n }\n else if (!this.showOpacity()) {\n this.currentColor.alpha = 100;\n this.currentOpacity = numberAsPercent(this.currentColor.alpha);\n }\n else {\n this.currentOpacity = numberAsPercent(this.currentColor.alpha);\n }\n }\n setOpacitySlider() {\n if (this.showOpacity()) {\n this.opacitySlider.setColor(this.currentColor.toHEX().toString());\n this.opacitySlider.setOpacity(this.currentColor.alpha);\n }\n }\n supportsOpacity() {\n return this.showOpacity() || this.hasTransparentButton();\n }\n hasTransparentButton() {\n return this.transparentButton !== undefined && this.transparentButton === true && !this.showOpacity();\n }\n showOpacity() {\n return this.opacity !== undefined && this.opacity === true;\n }\n renderPresetPalette(palette) {\n return (isValidHex(palette) && !this.showOpacity() && !this.hasOpacity(palette)) ||\n (isValidHex(palette) && this.showOpacity());\n }\n paletteExists(hex, palettes) {\n return palettes.findIndex(pHex => pHex.toLowerCase() === hex.toLowerCase()) !== -1;\n }\n renderOpacityInput() {\n if (this.showOpacity()) {\n return (h(\"div\", { class: 'input-container', style: {\n flexBasis: '70px'\n } }, h(\"input\", { type: \"text\", value: `${this.currentOpacity}`, onInput: this.handleOpacityInput }), h(\"div\", { class: 'input-label' }, \"%\")));\n }\n }\n buildPresetPalettes() {\n let palettes = this.palettes;\n if (typeof this.palettes === 'string') {\n try {\n palettes = JSON.parse(this.palettes);\n }\n catch (_a) {\n palettes = [];\n }\n }\n if (palettes === undefined) {\n palettes = [];\n }\n if (!Array.isArray(palettes)) {\n palettes = [palettes];\n }\n this.palettesToDisplay = palettes.map(({ label, palettes, count }) => {\n return {\n label,\n count,\n palettes: palettes.reduce((result, palette, index) => {\n var _a, _b, _c;\n const color = typeof palette === 'string' && isValidHex(palette) ? palette : typeof palette.color === 'string' && isValidHex(palette.color) ? palette.color : null;\n if (color !== null) {\n result.push({\n index,\n color,\n title: (_a = palette.title) !== null && _a !== void 0 ? _a : null,\n description: (_b = palette.description) !== null && _b !== void 0 ? _b : null,\n data: (_c = palette.data) !== null && _c !== void 0 ? _c : null,\n });\n }\n return result;\n }, [])\n };\n });\n }\n setColorFromPalette(color) {\n this.setColorAndEmit(color);\n this.currentOpacity = numberAsPercent(this.currentColor.alpha);\n if (this.mode === 'preset') {\n return;\n }\n this.colorPalette.setColor(this.currentColor.toHEXA().toString());\n this.hueSlider.setHue(this.currentColor.hue);\n this.setOpacitySlider();\n }\n setHue(hue) {\n var _a, _b;\n (_a = this.hueSlider) === null || _a === void 0 ? void 0 : _a.setHue(hue);\n (_b = this.colorPalette) === null || _b === void 0 ? void 0 : _b.setHue(hue);\n }\n render() {\n return (h(Host, { key: '43937d9520976b79be1f7a5154dd233d55ec76ae', class: `color-picker--${this.display}` }, h(\"div\", { key: '9824de5c98c9d6d59c3f993bf7340d9857078378', class: 'container' }, this.mode === 'default' ?\n h(\"div\", null, h(\"color-picker-color-palette\", { display: this.display, color: this.currentColor.toHEX().toString(), onColorPaletteChange: this.colorPaletteChangeHandler, ref: el => this.colorPalette = el }), h(\"color-picker-hue-slider\", { display: this.display, hue: this.currentColor.hue, onHueChange: this.hueChangeHandler, ref: el => this.hueSlider = el }), this.showOpacity()\n ?\n h(\"color-picker-opacity-slider\", { display: this.display, color: this.currentColor.toHEX().toString(), opacity: this.currentOpacity, ref: el => this.opacitySlider = el })\n : '', h(\"div\", { style: {\n width: '100%',\n maxWidth: this.display === 'inline' ? '100%' : '200px',\n display: 'flex',\n gap: '12px',\n marginTop: '16px',\n } }, h(\"div\", { class: 'input-container' }, h(\"input\", { type: \"text\", maxlength: 7, value: this.currentColor.toHEX().toString(), onInput: this.handleHexInput, onFocus: this.handleHexFocus }), h(\"div\", { class: 'input-label' }, \"Hex\")), this.renderOpacityInput()))\n : '', h(\"div\", { key: 'd641498f69ddc3d1ec259303a9014824c476741c', ref: el => this.palettesContainer = el }, this.palettesToDisplay.map(({ label, palettes, count }, index) => {\n let presetCount = 0;\n if (label === this.recentColorsLabel) {\n this.hasRecentColors = true;\n }\n return (h(\"div\", null, h(\"h3\", { class: 'palettes-header', style: {\n marginTop: index === 0 && this.mode === 'preset' ? '0' : ''\n } }, label), h(\"div\", { class: 'palettes-container' }, palettes.map(palette => {\n if (this.renderPresetPalette(palette.color) && presetCount < this.getMaxPalettesToDisplay(count, palettes.length)) {\n presetCount++;\n return (h(\"div\", { class: {\n 'palette__container': true,\n 'palette__container--active': this.currentColor.toHEX().toString().toLowerCase() === palette.color.toLowerCase(),\n } }, h(\"span\", { class: 'checkerboard' }), h(\"span\", { class: 'palette', \"data-category\": label, \"data-index\": palette.index, \"data-tip\": ColorPicker.buildToolTip(palette), \"data-color\": palette.color, style: { backgroundColor: palette.color }, onClick: this.setPresetPalette })));\n }\n })), h(\"div\", null, (palettes.length <= 0 && label === 'Brand Colours') ?\n h(\"div\", { class: 'palettes-message' }, h(\"rs-content\", { style: {\n fontSize: '12px',\n } }, \"No brand colours have been added to your website yet\"), h(\"a\", { href: 'https://support.rocketspark.com/hc/en-us/articles/6551728489881-Want-to-add-your-Brand-Colours-to-your-site-', target: '_blank', class: 'help-guide-link' }, \"View help guide\"))\n : '')));\n })), this.hasTransparentButton() ?\n h(\"button\", { class: 'transparent-button', onClick: this.setTransparentButton }, \"Transparent\", h(\"span\", { class: 'transparent-button__swatch' }, \"\\u00A0\"))\n : '')));\n }\n static buildToolTip(palette) {\n let toolTip;\n if (palette.title !== null && palette.title !== '') {\n toolTip = `<h5 class=\"rs-tooltip__heading\">${palette.title}</h5>`;\n }\n if (palette.description !== null && palette.description !== '') {\n toolTip += `<p class=\"rs-tooltip__caption\">${palette.description}</p>`;\n }\n return toolTip;\n }\n createToolTips() {\n var _a, _b;\n (_b = (_a = this.palettesContainer) === null || _a === void 0 ? void 0 : _a.querySelectorAll('.palette')) === null || _b === void 0 ? void 0 : _b.forEach((element) => {\n new ToolTip(element, {\n position: 'horizontal',\n horizontalOffset: 10\n });\n });\n }\n getMaxPalettesToDisplay(count, numberOfPalettes) {\n if (count === undefined) {\n return this.maxPresetDisplay;\n }\n if (count === 0) {\n return numberOfPalettes;\n }\n return count;\n }\n static get watchers() { return {\n \"palettes\": [\"watchPalettes\"]\n }; }\n};\nColorPicker.style = ColorPickerStyle0;\n\nclass Moveable {\n constructor(options) {\n this.cache = {\n x: 0,\n y: 0,\n };\n this.clamp = (v) => Math.max(Math.min(v, 1), 0);\n this.options = Object.assign(Object.assign({}, Moveable.DEFAULT_OPTIONS), options);\n this.tapStartBinding = this.tapstart.bind(this);\n this.tapStopBinding = this.tapstop.bind(this);\n this.tapMoveBinding = this.tapmove.bind(this);\n on([this.options.wrapper, this.options.element], 'mousedown', this.tapStartBinding);\n on([this.options.wrapper, this.options.element], 'touchstart', this.tapStartBinding, {\n passive: false,\n });\n on(document, ['keydown', 'keyup'], this.keyboard.bind(this));\n }\n keyboard(e) {\n const { type, key } = e;\n // Check to see if the Movable is focused and then move it based on arrow key inputs\n // For improved accessibility\n if (document.activeElement === this.options.wrapper) {\n const { lock } = this.options;\n const up = key === 'ArrowUp';\n const right = key === 'ArrowRight';\n const down = key === 'ArrowDown';\n const left = key === 'ArrowLeft';\n if (type === 'keydown' && (up || right || down || left)) {\n let xm;\n let ym = 0;\n if (lock === 'v') {\n xm = up || right ? 1 : -1;\n }\n else if (lock === 'h') {\n xm = up || right ? -1 : 1;\n }\n else {\n ym = 0;\n if (up) {\n ym = -1;\n }\n else if (down) {\n ym = 1;\n }\n xm = 0;\n if (left) {\n xm = -1;\n }\n else if (right) {\n xm = 1;\n }\n }\n this.update(this.clamp(this.cache.x + 0.01 * xm), this.clamp(this.cache.y + 0.01 * ym));\n e.preventDefault();\n }\n else if (key.startsWith('Arrow')) {\n this.options.onstop();\n e.preventDefault();\n }\n }\n }\n tapstart(evt) {\n this.wrapperBoundingClient = this.options.wrapper.getBoundingClientRect();\n on(document, ['mouseup', 'touchend', 'touchcancel'], this.tapStopBinding);\n on(document, ['mousemove', 'touchmove'], this.tapMoveBinding);\n if (evt.cancelable) {\n evt.preventDefault();\n }\n const event = new CustomEvent('start');\n this.options.element.dispatchEvent(event);\n // Trigger\n this.tapmove(evt);\n }\n tapmove(evt) {\n let x;\n let y;\n if (evt) {\n const touch = evt && evt.touches && evt.touches[0];\n x = evt ? (touch || evt).clientX : 0;\n y = evt ? (touch || evt).clientY : 0;\n if (Moveable.outsideLeftBounds(x, this.wrapperBoundingClient)) {\n x = this.wrapperBoundingClient.left;\n }\n else if (Moveable.outsideRightBounds(x, this.wrapperBoundingClient)) {\n x = this.wrapperBoundingClient.left + this.wrapperBoundingClient.width;\n }\n if (Moveable.outsideTopBounds(y, this.wrapperBoundingClient)) {\n y = this.wrapperBoundingClient.top;\n }\n else if (Moveable.outsideBottomBounds(y, this.wrapperBoundingClient)) {\n y = this.wrapperBoundingClient.top + this.wrapperBoundingClient.height;\n }\n // Normalize (Set x/y to coords inside wrapper)\n x -= this.wrapperBoundingClient.left;\n y -= this.wrapperBoundingClient.top;\n }\n else {\n x = this.cache.x * this.wrapperBoundingClient.width;\n y = this.cache.y * this.wrapperBoundingClient.height;\n }\n if (this.options.lock !== 'h') {\n // this.options.element.style.left = `calc(${ (x / this.wrapperBoundingClient.width) * 100 }% - ${ this.options.element.offsetWidth / 2 }px)`;\n this.options.element.style.left = `${(x / this.wrapperBoundingClient.width) * 100}%`;\n }\n if (this.options.lock !== 'v') {\n // this.options.element.style.top = `calc(${ (y / this.wrapperBoundingClient.height) * 100 }% - ${ this.options.element.offsetHeight / 2 }px)`;\n this.options.element.style.top = `${(y / this.wrapperBoundingClient.height) * 100}%`;\n }\n this.cache = {\n x: x / this.wrapperBoundingClient.width,\n y: y / this.wrapperBoundingClient.height\n };\n const cx = this.clamp(this.cache.x);\n const cy = this.clamp(this.cache.y);\n const event = new CustomEvent('change', {\n detail: {\n x: cx,\n y: cy,\n }\n });\n this.options.element.dispatchEvent(event);\n }\n tapstop() {\n this.options.onstop();\n off(document, ['mouseup', 'touchend', 'touchcancel'], this.tapStopBinding);\n off(document, ['mousemove', 'touchmove'], this.tapMoveBinding);\n const event = new CustomEvent('stop');\n this.options.element.dispatchEvent(event);\n }\n trigger() {\n this.tapmove(null);\n }\n update(xPos = 0, yPos = 0) {\n const x = xPos;\n let y = this.options.lock === 'h' ? x : yPos;\n const { left, top, width, height } = this.options.wrapper.getBoundingClientRect();\n this.tapmove({\n clientX: left + width * x,\n clientY: top + height * y,\n });\n }\n destroy() {\n off(document, ['keydown', 'keyup'], this.keyboard.bind(this));\n off([this.options.wrapper, this.options.element], 'mousedown', this.tapstart.bind(this));\n off([this.options.wrapper, this.options.element], 'touchstart', this.tapstart.bind(this), {\n passive: false,\n });\n }\n}\nMoveable.DEFAULT_OPTIONS = {\n lock: null,\n onchange: () => 0,\n onstop: () => 0,\n};\nMoveable.outsideBottomBounds = (y, wrappingBoundingRect) => y > wrappingBoundingRect.top + wrappingBoundingRect.height;\nMoveable.outsideTopBounds = (y, wrappingBoundingRect) => y < wrappingBoundingRect.top;\nMoveable.outsideRightBounds = (x, wrappingBoundingRect) => x > wrappingBoundingRect.left + wrappingBoundingRect.width;\nMoveable.outsideLeftBounds = (x, wrappingBoundingRect) => x < wrappingBoundingRect.left;\n\nconst colorPickerColorPaletteCss = \":host{display:block}.selector__pickr{position:absolute;height:16px;width:16px;border-radius:16px;border:2px solid #fff;box-sizing:border-box;box-shadow:0 5px 15px rgb(70 74 83 / 0.25);cursor:pointer;transition:top 150ms linear, left 150ms linear;transform:translate(-50%, -50%)}.selector__pickr:active,.color-selector:active .selector__pickr{transition:none;cursor:none}.color-selector{height:155px;width:200px;border-radius:6px;position:relative}.color-selector--inline{width:100%}\";\nconst ColorPickerColorPaletteStyle0 = colorPickerColorPaletteCss;\n\nconst ColorPalette = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.colorPaletteChange = createEvent(this, \"colorPaletteChange\", 7);\n this.sliderOffsetWidth = 8;\n this.sliderOffsetHeight = 8;\n this.sliderLeft = 50;\n this.sliderTop = 50;\n this.hue = 0;\n /**\n * If set to default, color palette have a fixed width.\n * If inline, color palette will have 100% width.\n */\n this.display = 'default';\n this.getPaletteBackgroundColor = () => {\n return `\n linear-gradient(to top, rgba(0, 0, 0, 1), transparent),\n linear-gradient(to left, hsla(${this.hue}, 100%, 50%, 1),\n rgba(255, 255, 255, 1))\n `;\n };\n this.handleChange = event => {\n const { x, y } = event.detail;\n // Calculate saturation based on the position\n const saturation = x * 100;\n // Calculate the value\n let value = 100 - y * 100;\n // Prevent falling under zero\n value < 0 ? (value = 0) : 0;\n this.currentColor.saturation = saturation;\n this.currentColor.value = value;\n this.slider.style.background = this.currentColor.toRGB().toString();\n this.colorPaletteChange.emit(this.currentColor);\n };\n }\n componentWillLoad() {\n this.setInternalColor(this.color);\n return new Promise(resolve => {\n if (this.slider !== null && this.slider !== undefined) {\n const offsetWidth = this.slider.offsetWidth;\n const offsetHeight = this.slider.offsetHeight;\n if (!isNaN(offsetWidth)) {\n this.sliderOffsetWidth = offsetWidth / 2;\n }\n if (!isNaN(offsetHeight)) {\n this.sliderOffsetHeight = this.slider.offsetHeight / 2;\n }\n }\n resolve();\n });\n }\n componentDidLoad() {\n new Moveable({\n element: this.slider,\n wrapper: this.palette,\n });\n }\n /**\n * Set the hue ONLY on color palette\n * @param hue\n */\n async setHue(hue) {\n this.currentColor.hue = hue;\n this.hue = hue;\n }\n /**\n * Sets the color. Must pass through a hex value\n * @param {string} color\n */\n async setColor(color) {\n this.setInternalColor(color);\n }\n setInternalColor(color) {\n this.currentColor = new HSVaColor(...parseToHSVA(color).values);\n this.hue = this.currentColor.hue;\n this.sliderLeft = this.currentColor.saturation;\n this.sliderTop = 100 - this.currentColor.value;\n }\n render() {\n return (h(\"div\", { key: 'f5728b33ac7593a22cbdee208e337e2cb087e7a5', class: {\n 'color-selector': true,\n [`color-selector--${this.display}`]: true\n }, ref: el => this.palette = el, style: {\n background: this.getPaletteBackgroundColor()\n } }, h(\"div\", { key: '84f243bd113623ba09520d73617ae1e98a4e3a7e', class: 'selector__pickr', style: {\n 'left': `${this.sliderLeft}%`,\n 'top': `${this.sliderTop}%`,\n 'background': this.currentColor.toRGB().toString()\n }, onChange: this.handleChange, ref: el => this.slider = el })));\n }\n};\nColorPalette.style = ColorPickerColorPaletteStyle0;\n\nconst colorPickerHueSliderCss = \":host{display:block}.selector__pickr{position:absolute;height:16px;width:16px;border-radius:16px;border:2px solid #fff;box-sizing:border-box;box-shadow:0 5px 15px rgb(70 74 83 / 0.25);cursor:pointer;transition:left 150ms linear;transform:translateX(-50%)}.selector__pickr:active,.color-selector:active .selector__pickr{transition:none;cursor:none}.component-outer{position:relative;height:8px;width:100%;max-width:200px;cursor:pointer}.component-outer--inline{max-width:100%}.component-selector{position:absolute;top:0;left:0;right:0;bottom:0;border-radius:10px;overflow:hidden}.hue-selector{background:linear-gradient(90deg, #f00 0%, #f57a20 12.78%, #ffd708 25.28%, #61ff00 37.78%, #0ff 50.28%, #0f4ded 62.26%, #640fed 73.72%, #ed0fe4 85.7%, #ed0f87 97.68%)}\";\nconst ColorPickerHueSliderStyle0 = colorPickerHueSliderCss;\n\nconst HueSlider = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.hueChange = createEvent(this, \"hueChange\", 7);\n /**\n * If set to default, color palette have a fixed width.\n * If inline, color palette will have 100% width.\n */\n this.display = 'default';\n this.handleChange = (event) => {\n const hue = event.detail.x * 360;\n this.hueChange.emit(hue);\n this.slider.style.backgroundColor = `hsl(${hue}, 100%, 50%)`;\n };\n }\n /**\n * Sets the hue value\n * @param {number} hue\n */\n async setHue(hue) {\n this._hue = hue;\n }\n componentWillLoad() {\n this._hue = this.hue;\n }\n componentDidLoad() {\n new Moveable({\n lock: 'v',\n element: this.slider,\n wrapper: this.container,\n });\n }\n render() {\n return (h(\"div\", { key: 'aae99fa8a86c2544569e0c6caf9f3f23c46ab8d1', class: {\n 'component-outer': true,\n [`component-outer--${this.display}`]: true\n }, style: {\n 'margin-top': '16px',\n }, ref: el => this.container = el }, h(\"div\", { key: 'dce858da0afe98d2244a75f649313c0f77b26ba3', class: 'hue-selector component-selector' }), h(\"div\", { key: '16f08a19d0ff39ac5f3d186f4e25784f138d0f50', class: 'selector__pickr', style: {\n 'margin-top': '-4px',\n 'left': `${this._hue / 360 * 100}%`,\n 'background': `hsl(${this._hue}, 100%, 50%)`\n }, onChange: this.handleChange, ref: el => this.slider = el })));\n }\n};\nHueSlider.style = ColorPickerHueSliderStyle0;\n\nconst colorPickerOpacitySliderCss = \":host{display:block}.component-outer{position:relative;cursor:pointer;height:8px;width:100%;max-width:200px}.component-outer--inline{max-width:100%}.component-selector{position:absolute;top:0;left:0;right:0;bottom:0;border-radius:10px;overflow:hidden}.checker-board{background-image:linear-gradient(45deg, #808080 25%, transparent 25%), linear-gradient(-45deg, #808080 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #808080 75%), linear-gradient(-45deg, transparent 75%, #808080 75%);background-size:6px 6px;background-position:0 0, 0 3px, 3px -3px, -3px 0}.selector__pickr{transform:translateX(-50%);position:absolute;height:16px;width:16px;border-radius:16px;border:2px solid #fff;box-sizing:border-box;box-shadow:0 5px 15px rgb(70 74 83 / 0.25);cursor:pointer;transition:left 150ms linear}.selector__pickr:active,.color-selector:active .selector__pickr{transition:none;cursor:none}\";\nconst ColorPickerOpacitySliderStyle0 = colorPickerOpacitySliderCss;\n\nconst OpacitySlider = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.opacityChange = createEvent(this, \"opacityChange\", 7);\n /**\n * The color that is being displayed. This currently *MUST* be in 6 digit hex format.\n */\n this.color = '#000000';\n /**\n \n /**\n * If default, color palette have a fixed width.\n * If inline, color palette will have 100% width.\n */\n this.display = 'default';\n this.handleOpacityChange = (event) => {\n this.currentColor.alpha = this.currentOpacity = event.detail.x;\n this.slider.style.background = this.currentColor.toRGBA().toString();\n this.opacityChange.emit(this.currentOpacity);\n };\n }\n watchOpacity(opacity) {\n this.setInternalOpacity(opacity);\n }\n getOpacityAsPercent() {\n return this.currentOpacity <= 1 ? this.currentOpacity * 100 : this.currentOpacity;\n }\n /**\n * Sets the color for the slider\n * @param color\n */\n async setColor(color) {\n this.setInternalColor(color);\n }\n /**\n * Sets te opacity for the slider\n * @param opacity\n */\n async setOpacity(opacity) {\n this.setInternalOpacity(opacity);\n }\n componentDidLoad() {\n new Moveable({\n lock: 'v',\n element: this.slider,\n wrapper: this.container,\n });\n }\n componentWillLoad() {\n this.setInternalOpacity(this.opacity);\n this.setInternalColor(this.color);\n }\n setInternalOpacity(opacity) {\n const o = opacity !== null && opacity !== void 0 ? opacity : 100;\n this.currentOpacity = o > 1 ? o / 100 : o;\n }\n setInternalColor(color) {\n this.currentColor = new HSVaColor(...parseToHSVA(color).values);\n this.currentColor.alpha = this.currentOpacity;\n this.currentRgb = this.currentColor.toRGB();\n }\n render() {\n return (h(\"div\", { key: '8b5daccc6b2b77ddcd15dca8632f8f68be57fc0a', class: {\n 'component-outer': true,\n [`component-outer--${this.display}`]: true\n }, style: {\n 'margin-top': '16px',\n }, ref: el => this.container = el }, h(\"div\", { key: '5399198da6828d72cc5b9af4ac0a064891ac9864', class: 'checker-board component-selector' }), h(\"div\", { key: '31e20b5c45c2bf2537d93d199620056b12c68085', class: 'component-selector', style: {\n 'background': `linear-gradient(90deg, rgba(${this.currentRgb[0]},${this.currentRgb[1]},${this.currentRgb[2]}, 0) 0%, rgba(${this.currentRgb[0]},${this.currentRgb[1]},${this.currentRgb[2]}, 1) 100%)`\n } }), h(\"div\", { key: 'bff7d5f16d7cb26f9657b6e716f0ebb40ecf990c', class: 'selector__pickr', style: {\n 'margin-top': '-4px',\n 'left': `${this.getOpacityAsPercent()}%`,\n 'background': `rgba(${this.currentRgb[0]},${this.currentRgb[1]},${this.currentRgb[2]}, ${this.currentOpacity})`\n }, onChange: this.handleOpacityChange, ref: el => this.slider = el })));\n }\n static get watchers() { return {\n \"opacity\": [\"watchOpacity\"]\n }; }\n};\nOpacitySlider.style = ColorPickerOpacitySliderStyle0;\n\nexport { ColorPicker as color_picker, ColorPalette as color_picker_color_palette, HueSlider as color_picker_hue_slider, OpacitySlider as color_picker_opacity_slider };\n\n//# sourceMappingURL=color-picker_4.entry.js.map","const flexGapSupported = () => {\n // create flex container with row-gap set\n const flex = document.createElement('div');\n flex.style.display = 'flex';\n flex.style.flexDirection = 'column';\n flex.style.rowGap = '1px';\n // create two, elements inside it\n flex.appendChild(document.createElement('div'));\n flex.appendChild(document.createElement('div'));\n // append to the DOM (needed to obtain scrollHeight)\n document.body.appendChild(flex);\n const isSupported = flex.scrollHeight === 1; // flex container should be 1px high from the row-gap\n flex.parentNode.removeChild(flex);\n return isSupported;\n};\nfunction eventListener(method, elements, events, fn, options = {}) {\n let localElements = elements;\n if (Array.isArray(elements)) {\n localElements = Array.from(elements);\n }\n else if (!Array.isArray(elements)) {\n localElements = [elements];\n }\n let localEvents = events;\n if (!Array.isArray(events)) {\n localEvents = [events];\n }\n localElements.forEach(el => {\n localEvents.forEach(ev => {\n el[method](ev, fn, Object.assign({ capture: false }, options));\n });\n });\n return [elements, events, fn, options];\n}\nconst on = eventListener.bind(null, 'addEventListener');\nconst off = eventListener.bind(null, 'removeEventListener');\nconst ScrollStop = (callback) => {\n // Make sure a valid callback was provided\n if (!callback || Object.prototype.toString.call(callback) !== '[object Function]') {\n return;\n }\n // Setup scrolling variable\n let isScrolling;\n // Listen for scroll events\n window.addEventListener('scroll', function () {\n // Clear our timeout throughout the scroll\n window.clearTimeout(isScrolling);\n // Set a timeout to run after scrolling ends\n isScrolling = setTimeout(function () {\n // Run the callback\n callback();\n }, 66);\n }, false);\n};\n\nexport { ScrollStop as S, off as a, flexGapSupported as f, on as o };\n\n//# sourceMappingURL=utils-025bb042.js.map"],"names":["min","max","floor","round","Math","hsvToRgb","h","s","v","hLocal","sLocal","vLocal","i","f","p","q","t","mod","hsvToHex","map","rgb","toString","padStart","hsvToHsl","l","rgbToHsv","red","green","blue","r","g","b","minVal","maxVal","delta","dr","dg","db","cmykToHsv","cyan","magenta","yellow","key","m","y","k","hslToHsv","hue","saturation","lightness","ns","Number","isNaN","parseToHSVA","colorString","toLowerCase","string","match","name","undefined","ctx","document","createElement","getContext","fillStyle","standardizeColor","type","colorType","Object","entries","cmyk","rgba","hsla","hsva","hexa","find","colorRegex","exec","regex","getColorType","numarize","array","test","values","isValidAlpha","a","hasValidAlphaChannel","c","alpha","hex","length","split","join","raw","substring","parseInt","hsvValue","hexRgb","hexToHsv","isValidHex","DEFAULT_COLOR","HSVaColor","constructor","this","mapper","original","next","precision","toFixed","toHSVA","arr","readableAlpha","toHSLA","toHSL","hsl","toRGBA","toRGB","toRGBModern","alphaAsPercent","toCMYK","hsvToCmyk","toHEXA","toUpperCase","push","toHEX","value","clone","EPSILON","numberAsPercent","number","Storage","storage","WeakMap","set","element","has","console","warn","get","Map","_a","delete","size","ToolTip","options","arrowOffset","isScrolling","positionClasses","defaults","position","delayShow","delayHide","horizontalOffset","verticalOffset","classNames","tooltip","horizontal","vertical","arrowBottom","arrowLeft","arrowRight","arrowTop","active","dataset","tip","assign","querySelector","Element","Error","createStructure","addEventListener","isVisible","hideTimeout","tooltipContainer","clearTimeout","showTimeout","timeout","setTimeout","show","hide","window","S","once","classList","add","body","append","innerHTML","setPosition","top","left","style","width","height","elementPos","getBoundingClientRect","elementLeft","elementTop","elementWidth","elementHeight","tooltipWidth","offsetWidth","tooltipHeight","offsetHeight","scrollTop","scrollY","documentElement","tooltipPosition","innerWidth","innerHeight","charAt","slice","bodyLeft","getComputedStyle","leftPosition","right","bottom","setAttribute","instantHide","delay","remove","computedStyle","offsetParent","opacity","ColorPicker","hostRef","colorChange","presetColorChoice","hasRecentColors","palettesToDisplay","maxPresetDisplay","recentColorsLabel","transparentButton","display","mode","hueChangeHandler","event","hasTransparentButton","currentOpacity","currentColor","detail","setHue","setColorAndEmit","colorPaletteChangeHandler","supportsOpacity","opacitySlider","setColor","handleOpacityInput","opacityValue","target","setPresetPalette","_b","_c","palette","filter","palettes","label","category","index","setColorFromPalette","color","emit","data","handleHexInput","hexValue","startsWith","handleHexFocus","select","hasOpacity","setTransparentButton","watchPalettes","buildPresetPalettes","componentWillLoad","setColorValue","D","componentDidRender","createToolTips","opacityChangeHandler","colorPickerAddRecentHandler","recentPalettes","getPresetPaletteGroup","paletteExists","addToPreset","updateColorPickerControls","getColor","renderPresetPalette","JSON","parse","stringify","paletteIndex","findIndex","unshift","colorPalette","hueSlider","setOpacitySlider","H","showOpacity","setOpacity","pHex","renderOpacityInput","class","flexBasis","onInput","Array","isArray","count","reduce","result","title","description","render","onColorPaletteChange","ref","el","onHueChange","maxWidth","gap","marginTop","maxlength","onFocus","palettesContainer","presetCount","getMaxPalettesToDisplay","buildToolTip","backgroundColor","onClick","fontSize","href","toolTip","querySelectorAll","forEach","numberOfPalettes","watchers","Moveable","cache","x","clamp","DEFAULT_OPTIONS","tapStartBinding","tapstart","bind","tapStopBinding","tapstop","tapMoveBinding","tapmove","o","wrapper","passive","keyboard","e","activeElement","lock","up","down","xm","ym","update","preventDefault","onstop","evt","wrapperBoundingClient","cancelable","CustomEvent","dispatchEvent","touch","touches","clientX","clientY","outsideLeftBounds","outsideRightBounds","outsideTopBounds","outsideBottomBounds","cx","cy","trigger","xPos","yPos","destroy","onchange","wrappingBoundingRect","ColorPalette","colorPaletteChange","sliderOffsetWidth","sliderOffsetHeight","sliderLeft","sliderTop","getPaletteBackgroundColor","handleChange","slider","background","setInternalColor","Promise","resolve","componentDidLoad","onChange","HueSlider","hueChange","_hue","container","OpacitySlider","opacityChange","handleOpacityChange","watchOpacity","setInternalOpacity","getOpacityAsPercent","currentRgb","flexGapSupported","flex","flexDirection","rowGap","appendChild","isSupported","scrollHeight","parentNode","removeChild","eventListener","method","elements","events","fn","localElements","from","localEvents","ev","capture","on","off","ScrollStop","callback","prototype","call"],"sourceRoot":""}
|
package/build/278.index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* @rocketspark/domain-checker v1.0.
|
|
3
|
+
* @rocketspark/domain-checker v1.0.3
|
|
4
4
|
* https://github.com/rocketspark/domain-checker.git
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) Lee Reichardt and project contributors.
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
12
|
-
"use strict";(self.webpackChunkDomainChecker=self.webpackChunkDomainChecker||[]).push([[278],{
|
|
12
|
+
"use strict";(self.webpackChunkDomainChecker=self.webpackChunkDomainChecker||[]).push([[278],{825:function(t,e,s){s.d(e,{D:function(){return m},H:function(){return v},i:function(){return f},p:function(){return d}});const{min:r,max:i,floor:o,round:n}=Math;function a(t,e,s){const r=t/360*6,i=e/100,n=s/100,a=o(r),h=r-a,l=n*(1-i),c=n*(1-h*i),u=n*(1-(1-h)*i),p=a%6;return[255*[n,c,l,l,u,n][p],255*[u,n,n,c,l,l][p],255*[l,l,u,n,n,c][p]]}function h(t,e,s){return a(t,e,s).map((t=>n(t).toString(16).padStart(2,"0")))}function l(t,e,s){let r=e/100;const i=s/100,o=(2-r)*i/2;return 0!==o&&(r=1===o?0:o<.5?r*i/(2*o):r*i/(2-2*o)),[t,100*r,100*o]}function c(t,e,s){const o=t/255,n=e/255,a=s/255,h=r(o,n,a),l=i(o,n,a),c=l-h;let u,p;if(0===c)u=0,p=0;else{p=c/l;const t=((l-o)/6+c/2)/c,e=((l-n)/6+c/2)/c,s=((l-a)/6+c/2)/c;o===l?u=s-e:n===l?u=1/3+t-s:a===l&&(u=2/3+e-t),u<0?u+=1:u>1&&(u-=1)}return[360*u,100*p,100*l]}function u(t,e,s,i){const o=e/100,n=s/100,a=i/100;return[...c(255*(1-r(1,t/100*(1-a)+a)),255*(1-r(1,o*(1-a)+a)),255*(1-r(1,n*(1-a)+a)))]}function p(t,e,s){let r=e/100;const i=s/100;r*=i<.5?i:1-i;const o=2*r/(i+r)*100,n=100*(i+r);return[t,Number.isNaN(o)?0:o,n]}function d(t="#000"){"transparent"===t.toLowerCase()&&(t="#00000000");const e=null!==t.match(/^[a-zA-Z]+$/)?function(t){if(void 0===t)return"#000";if("black"===t.toLowerCase())return"#000";const e=document.createElement("canvas").getContext("2d");return null===e?null:(e.fillStyle=t,"#000"===e.fillStyle?null:e.fillStyle)}(t):t,{type:s,match:r}=function(t){const e=Object.entries({cmyk:/^cmyk[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)/i,rgba:/^((rgba)|rgb)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]*?([\d.]+|$)/i,hsla:/^((hsla)|hsl)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]*?([\d.]+|$)/i,hsva:/^((hsva)|hsv)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]*?([\d.]+|$)/i,hexa:/^#?(([\dA-Fa-f]{3,4})|([\dA-Fa-f]{6})|([\dA-Fa-f]{8}))$/i}).find((([,e])=>e.exec(t)));if(void 0!==e){const s=e[1].exec(t);return{type:e[0],regex:e[1],match:s}}return{type:null}}(e),i=t=>t.map((t=>/^(|\d+)\.\d+|\d+$/.test(t)?Number(t):void 0));if(null===s||null===r)return{values:null,type:"hexa"};const o=t=>t>=0&&t<=1&&(t=>!!r[2]==("number"==typeof t))(t);if("cmyk"===s){const[,t,e,o,n]=i(r);if(t&&e&&o&&n&&t<=100&&e<=100&&o<=100&&n<=100)return{values:u(t,e,o,n),type:s}}if("rgba"===s){const[,,,t,e,n,a]=i(r);if(void 0!==t&&void 0!==e&&void 0!==n&&void 0!==a&&t<=255&&e<=255&&n<=255&&o(a))return{values:[...c(t,e,n),a],alpha:a,type:s}}if("hexa"===s){let[,t]=r;4!==t.length&&3!==t.length||(t=t.split("").map((t=>t+t)).join(""));const e=t.substring(0,6);let i=t.substring(6);i=i?parseInt(i,16)/255:void 0;const o=function(t){const e=t.match(/.{2}/g);if(null!==e){const[t,s,r]=e.map((t=>Number.parseInt(t,16)));return c(t,s,r)}return null}(e);if(void 0!==o)return{values:[...o,i],alpha:i,type:s}}if("hsla"===s){const[,,,t,e,n,a]=i(r);if(t&&e&&n&&a&&t<=360&&e<=100&&n<=100&&a>=0&&a<=1&&o(a))return{values:[...p(t,e,n),a],alpha:a,type:s}}if("hsva"===s){const[,,,t,e,n,a]=i(r);if(t&&e&&n&&a&&t<=360&&e<=100&&n<=100&&a>=0&&a<=1&&o(a))return{values:[t,e,n,a],alpha:a,type:s}}return{values:null,type:"hexa"}}const f=t=>void 0!==t&&t.match(/^#?[\dA-Fa-f]{6,8}$/i),m="#7CA1FF";class v{constructor(t=0,e=0,s=0,r=1){this.mapper=(t,e)=>(s=-1)=>e(s>=0?t.map((t=>Number(t.toFixed(s)))):t),this.h=t,this.s=e,this.v=s,this.a=r>1?r/100:r}toHSVA(){const t=[this.h,this.s,this.v,this.a];return t.toString=this.mapper(t,(t=>`hsva(${t[0]}, ${t[1]}%, ${t[2]}%, ${this.readableAlpha()})`)),t}toHSLA(){const t=[...l(this.h,this.s,this.v),this.a];return t.toString=this.mapper(t,(t=>`hsla(${t[0]}, ${t[1]}%, ${t[2]}%, ${this.readableAlpha()})`)),t}toHSL(){const t=l(this.h,this.s,this.v);return t.toString=this.mapper(t,(t=>`hsl(${t[0]}, ${t[1]}%, ${t[2]}%)`)),t}toRGBA(){const t=[...a(this.h,this.s,this.v),this.a];return t.toString=this.mapper(t,(t=>`rgba(${Math.round(t[0])}, ${Math.round(t[1])}, ${Math.round(t[2])}, ${this.readableAlpha()})`)),t}toRGB(){const t=a(this.h,this.s,this.v);return t.toString=this.mapper(t,(t=>`rgb(${Math.round(t[0])}, ${Math.round(t[1])}, ${Math.round(t[2])})`)),t}toRGBModern(){const t=[...a(this.h,this.s,this.v),this.a];return t.toString=this.mapper(t,(t=>`rgb(${Math.round(t[0])} ${Math.round(t[1])} ${Math.round(t[2])} / ${this.alphaAsPercent()})`)),t}toCMYK(){const t=function(t,e,s){const i=a(t,e,s),o=i[0]/255,n=i[1]/255,h=i[2]/255,l=r(1-o,1-n,1-h);return[100*(1===l?0:(1-o-l)/(1-l)),100*(1===l?0:(1-n-l)/(1-l)),100*(1===l?0:(1-h-l)/(1-l)),100*l]}(this.h,this.s,this.v);return t.toString=this.mapper(t,(t=>`cmyk(${t[0]}%, ${t[1]}%, ${t[2]}%, ${t[3]}%)`)),t}toHEXA(){const t=h(this.h,this.s,this.v),e=this.a>=1?"":Number((255*this.a).toFixed(0)).toString(16).toUpperCase().padStart(2,"0");return e&&t.push(e),t.toString=()=>`#${t.join("").toUpperCase()}`,t}toHEX(){const t=h(this.h,this.s,this.v);return t.toString=()=>`#${t.join("").toLowerCase()}`,t}set alpha(t){this.a=t>1?t/100:t}get alpha(){return this.a}set hue(t){this.h=Math.round(t)}get hue(){return this.h}set saturation(t){this.s=Math.round(t)}get saturation(){return this.s}set value(t){this.v=Math.round(t)}get value(){return this.v}clone(){return new v(this.h,this.s,this.v,this.a)}readableAlpha(){return Math.round(100*(this.a+Number.EPSILON))/100}alphaAsPercent(){return Math.round(100*(this.a+Number.EPSILON))+"%"}}},278:function(t,e,s){s.r(e),s.d(e,{rs_color_picker:function(){return o}});var r=s(6919),i=s(825);const o=class{constructor(t){(0,r.r)(this,t),this.rsColorChange=(0,r.c)(this,"rsColorChange",7),this.rsPresetColorChoice=(0,r.c)(this,"rsPresetColorChoice",7),this.color=i.D,this.opacity=!1,this.showPicker=!1,this.position="default",this.display="default",this.transparentButton=!1,this.mode="default",this.colorSwatches=null,this.onColorChange=t=>{t.stopImmediatePropagation(),this.internalColor=t.detail,this.rsColorChange.emit({value:t.detail})},this.onPresetColorChoice=t=>{t.stopImmediatePropagation(),this.rsPresetColorChoice.emit({value:t.detail})},this.positionStyle=()=>"top"===this.position?{bottom:"37px","margin-top":"0px","padding-bottom":"0px"}:{}}async setColor(t){o.allowedColorString(t)&&await this.rsColorPicker.setColor(t)}async getColor(){return this.internalColor}async show(){this.showPicker=!0}async hide(){this.showPicker=!1}componentWillLoad(){var t;this.internalColor=new i.H(...(0,i.p)(null!==(t=this.color)&&void 0!==t?t:i.D).values)}render(){return(0,r.h)(r.H,{key:"f77ce1a1fc422ba45b6cd1ed14b0a4eb52730ed4",style:Object.assign({display:this.showPicker||"inline"===this.display?"block":"none"},this.positionStyle()),class:`rs-color-picker--${this.display}`},(0,r.h)("div",{key:"3d066e618b9069a1a8e9342087466eb9c9d91312",class:"rs-color-picker__inner"},(0,r.h)("div",{key:"93f13033ca65be2fe652ada17c0740f0c926e2c7",class:"rs-color-picker__swatch"}),(0,r.h)("div",{key:"ac1e1e46009fc42a18e95908ff887a78ea4852af",class:"rs-color-picker__popup"},(0,r.h)("color-picker",{key:"ce631924706933d920257fa525e705399617b9ec",class:"rs-color-picker__picker",color:this.color,mode:this.mode,palettes:this.palettes,opacity:this.opacity,display:this.display,transparentButton:this.transparentButton,onColorChange:this.onColorChange,onPresetColorChoice:this.onPresetColorChoice,ref:t=>this.rsColorPicker=t}))))}static allowedColorString(t){return(0,i.i)(t)||"transparent"===t.toLowerCase()}};o.style=":host{display:block;margin-top:5px;position:absolute;z-index:2;padding-bottom:20px}:host(.rs-color-picker--inline){position:unset;padding-bottom:0}:host(.rs-color-picker--inline) .rs-color-picker__picker{width:100%;max-width:500px}"}}]);
|
|
13
13
|
//# sourceMappingURL=278.index.js.map
|