@rocketspark/domain-checker 1.0.2 → 1.0.4

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.
Files changed (104) hide show
  1. package/.nvmrc +1 -1
  2. package/build/141.index.js +2 -2
  3. package/build/141.index.js.map +1 -1
  4. package/build/147.index.js +2 -2
  5. package/build/147.index.js.map +1 -1
  6. package/build/167.index.js +2 -2
  7. package/build/167.index.js.map +1 -1
  8. package/build/17.index.js +2 -2
  9. package/build/17.index.js.map +1 -1
  10. package/build/194.index.js +2 -2
  11. package/build/194.index.js.map +1 -1
  12. package/build/208.index.js +2 -2
  13. package/build/208.index.js.map +1 -1
  14. package/build/237.index.js +2 -2
  15. package/build/237.index.js.map +1 -1
  16. package/build/245.index.js +2 -2
  17. package/build/245.index.js.map +1 -1
  18. package/build/278.index.js +2 -2
  19. package/build/278.index.js.map +1 -1
  20. package/build/386.index.js +2 -2
  21. package/build/386.index.js.map +1 -1
  22. package/build/404.index.js +2 -2
  23. package/build/404.index.js.map +1 -1
  24. package/build/420.index.js +2 -2
  25. package/build/420.index.js.map +1 -1
  26. package/build/514.index.js +2 -2
  27. package/build/514.index.js.map +1 -1
  28. package/build/524.index.js +2 -2
  29. package/build/524.index.js.map +1 -1
  30. package/build/542.index.js +2 -2
  31. package/build/542.index.js.map +1 -1
  32. package/build/551.index.js +2 -2
  33. package/build/551.index.js.map +1 -1
  34. package/build/567.index.js +2 -2
  35. package/build/567.index.js.map +1 -1
  36. package/build/571.index.js +2 -2
  37. package/build/571.index.js.map +1 -1
  38. package/build/572.index.js +2 -2
  39. package/build/572.index.js.map +1 -1
  40. package/build/584.index.js +2 -2
  41. package/build/584.index.js.map +1 -1
  42. package/build/588.index.js +2 -2
  43. package/build/588.index.js.map +1 -1
  44. package/build/598.index.js +2 -2
  45. package/build/598.index.js.map +1 -1
  46. package/build/60.index.js +2 -2
  47. package/build/60.index.js.map +1 -1
  48. package/build/616.index.js +2 -2
  49. package/build/616.index.js.map +1 -1
  50. package/build/631.index.js +2 -2
  51. package/build/631.index.js.map +1 -1
  52. package/build/643.index.js +2 -2
  53. package/build/643.index.js.map +1 -1
  54. package/build/654.index.js +2 -2
  55. package/build/654.index.js.map +1 -1
  56. package/build/66.index.js +2 -2
  57. package/build/66.index.js.map +1 -1
  58. package/build/697.index.js +2 -2
  59. package/build/697.index.js.map +1 -1
  60. package/build/714.index.js +2 -2
  61. package/build/714.index.js.map +1 -1
  62. package/build/717.index.js +13 -0
  63. package/build/717.index.js.map +1 -0
  64. package/build/795.index.js +2 -2
  65. package/build/795.index.js.map +1 -1
  66. package/build/8.index.js +2 -2
  67. package/build/8.index.js.map +1 -1
  68. package/build/808.index.js +2 -2
  69. package/build/808.index.js.map +1 -1
  70. package/build/810.index.js +2 -2
  71. package/build/810.index.js.map +1 -1
  72. package/build/833.index.js +2 -2
  73. package/build/833.index.js.map +1 -1
  74. package/build/835.index.js +2 -2
  75. package/build/835.index.js.map +1 -1
  76. package/build/847.index.js +2 -2
  77. package/build/847.index.js.map +1 -1
  78. package/build/853.index.js +2 -2
  79. package/build/853.index.js.map +1 -1
  80. package/build/871.index.js +2 -2
  81. package/build/871.index.js.map +1 -1
  82. package/build/890.index.js +2 -2
  83. package/build/890.index.js.map +1 -1
  84. package/build/899.index.js +2 -2
  85. package/build/899.index.js.map +1 -1
  86. package/build/938.index.js +2 -2
  87. package/build/938.index.js.map +1 -1
  88. package/build/964.index.js +2 -2
  89. package/build/964.index.js.map +1 -1
  90. package/build/970.index.js +2 -2
  91. package/build/970.index.js.map +1 -1
  92. package/build/984.index.js +13 -0
  93. package/build/984.index.js.map +1 -0
  94. package/build/993.index.js +2 -2
  95. package/build/993.index.js.map +1 -1
  96. package/build/css/index.css +2 -2
  97. package/build/css/index.css.map +1 -1
  98. package/build/index.js +4 -4
  99. package/build/index.js.map +1 -1
  100. package/package.json +2 -2
  101. package/build/540.index.js +0 -13
  102. package/build/540.index.js.map +0 -1
  103. package/build/861.index.js +0 -13
  104. package/build/861.index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"208.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,EAAI,IACbI,EAAIV,EAAMO,GACVI,EAAIJ,EAASG,EACbE,EAAIH,GAAU,EAAID,GAClBK,EAAIJ,GAAU,EAAIE,EAAIH,GACtBM,EAAIL,GAAU,GAAK,EAAIE,GAAKH,GAC5BO,EAAML,EAAI,EAIhB,MAAO,CAAK,IAHF,CAACD,EAAQI,EAAGD,EAAGA,EAAGE,EAAGL,GAAQM,GAGlB,IAFX,CAACD,EAAGL,EAAQA,EAAQI,EAAGD,EAAGA,GAAGG,GAET,IADpB,CAACH,EAAGA,EAAGE,EAAGL,EAAQA,EAAQI,GAAGE,GAEzC,CACA,SAASC,EAASZ,EAAGC,EAAGC,GACtB,OAAOH,EAASC,EAAGC,EAAGC,GAAGW,KAAIC,GAAOjB,EAAMiB,GACvCC,SAAS,IACTC,SAAS,EAAG,MACjB,CAYA,SAASC,EAASjB,EAAGC,EAAGC,GACtB,IAAIE,EAASH,EAAI,IACjB,MAAMI,EAASH,EAAI,IACbgB,GAAM,EAAId,GAAUC,EAAU,EAYpC,OAXU,IAANa,IAEAd,EADQ,IAANc,EACO,EAEFA,EAAI,GACDd,EAASC,GAAe,EAAJa,GAGpBd,EAASC,GAAW,EAAQ,EAAJa,IAG/B,CAAClB,EAAY,IAATI,EAAkB,IAAJc,EAC3B,CACA,SAASC,EAASC,EAAKC,EAAOC,GAC5B,MAAMC,EAAIH,EAAM,IACVI,EAAIH,EAAQ,IACZI,EAAIH,EAAO,IACXI,EAAShC,EAAI6B,EAAGC,EAAGC,GACnBE,EAAShC,EAAI4B,EAAGC,EAAGC,GACnBG,EAAQD,EAASD,E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AAApJ,GAAWoJ,IAAkC,gBAAxBA,EAAMzG,aACpC,CACA,MAAIiF,GAAO,OAAO,IAAA1G,GAAWyE,KAAO,CACpC,mBAAWuF,GAAa,MAAO,CAC7B,MAAS,CAAC,eACT,GAEL9D,EAAcwD,MA3KW,06C","sources":["webpack://DomainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/HSVaColor-0aa7247b.js","webpack://DomainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/rs-color-swatch.entry.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, g as getElement } from './index-3d0f28ab.js';\nimport { D as DEFAULT_COLOR, H as HSVaColor, p as parseToHSVA, i as isValidHex } from './HSVaColor-0aa7247b.js';\n\nconst rsColorSwatchCss = \":host{display:block}.rs-color-swatch__inner{background:var(--rs-color-white);box-shadow:inset 0 0 0 1px var(--rs-color-select-border);border-radius:4px;padding:6px;cursor:pointer;min-width:32px;box-sizing:border-box;display:flex;align-items:center;justify-content:start}.rs-color-swatch__container{width:20px;height:20px;box-sizing:border-box;position:relative;overflow:hidden;border-radius:50%}.rs-color-swatch__container::before{content:\\\"\\\";position:absolute;width:18px;height:18px;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;border-radius:50%;top:1px;left:1px}.rs-color-swatch__container::after{content:\\\"\\\";position:absolute;border-top:2px solid red;width:18px;transform:rotate(-45deg);transform-origin:center;top:9px;left:1px;opacity:0}.rs-color-swatch__container--transparent::after{opacity:1}.rs-color-swatch__swatch{display:block;width:20px;height:20px;min-width:10px;box-sizing:border-box;position:relative;overflow:hidden;border-radius:50%;border:1px solid rgb(223 223 224)}.rs-color-swatch__container--transparent .rs-color-swatch__swatch{background:#fff !important}.rs-color-swatch__label{display:none;margin-left:7px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\";\n\nconst RsColorSwatch = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.close = createEvent(this, \"close\", 7);\n this.rsClose = createEvent(this, \"rsClose\", 7);\n this.isDirty = false;\n /**\n * Checks if the swatch element is close to the bottom of the viewport\n */\n this.isNearBottomOfViewport = () => {\n return (window.innerHeight - this.el.getBoundingClientRect().bottom) < 200;\n };\n /**\n * Checked if there's enough space above the color swatch element for displaying the color picker\n */\n this.isTopSpaceEnoughForColorPicker = () => {\n const topOffset = 150;\n const colorPickerHeight = 450; // max height of the color picker\n const colorSwatchRect = this.el.getBoundingClientRect();\n return (colorPickerHeight + topOffset) < colorSwatchRect.y;\n };\n /**\n * If the color swatch is close to the bottom of the sidebar/view port\n * then we show the color picker above the swatch\n */\n this.updateColorPickerPosition = () => {\n /*\n * If there's no space at the bottom, but there's enough space at the top,\n * then we reposition the color picker above the swatch\n */\n if (this.isNearBottomOfViewport() && this.isTopSpaceEnoughForColorPicker()) {\n this.colorPicker.position = 'top';\n }\n else {\n this.colorPicker.position = 'default';\n }\n };\n this.toggleColorPicker = () => {\n this.updateColorPickerPosition();\n if (!this.colorPicker.showPicker) {\n this.colorPicker.show();\n document.addEventListener('click', this.listenToBody.bind(this));\n }\n else {\n this.sendCloseEvent();\n this.sendCloseEventWithObject();\n this.closeColorPicker();\n document.removeEventListener('click', this.listenToBody.bind(this));\n }\n };\n this.alignmentClass = () => {\n if (this.alignment === 'center') {\n return {\n left: '50%',\n transform: 'translateX(-50%)',\n };\n }\n return {};\n };\n this.internalOpacity = undefined;\n this.internalColor = undefined;\n this.label = '';\n this.color = DEFAULT_COLOR;\n this.palettes = undefined;\n this.opacity = false;\n this.alignment = 'center';\n this.transparentButton = false;\n this.mode = 'default';\n this.width = undefined;\n }\n updateColor(color) {\n if (!RsColorSwatch.allowedColorString(color)) {\n return;\n }\n this.setInternalColor(color);\n this.colorPicker.setColor(this.internalColor.toHEXA().toString());\n }\n /**\n * Set the color of the color swatch\n * @param color\n */\n async setColor(color) {\n if (!RsColorSwatch.allowedColorString(color)) {\n return;\n }\n this.setInternalColor(color);\n await this.colorPicker.setColor(this.internalColor.toHEXA().toString());\n }\n /**\n * Returns a HSVaColor object of the currently selected color\n */\n async getColor() {\n return this.internalColor;\n }\n listenToBody(event) {\n if (!event.composedPath().includes(this.el) && this.colorPicker.showPicker) {\n this.sendCloseEvent();\n this.sendCloseEventWithObject();\n this.closeColorPicker();\n }\n }\n sendCloseEvent() {\n this.close.emit({ color: this.color, isDirty: this.isDirty });\n }\n sendCloseEventWithObject() {\n this.rsClose.emit({ color: this.internalColor, isDirty: this.isDirty });\n }\n closeColorPicker() {\n this.colorPicker.hide();\n this.isDirty = false;\n }\n rsColorChangeHandler(event) {\n this.setInternalColor(event.detail.value);\n this.isDirty = true;\n }\n swatchBackgroundColor() {\n return `linear-gradient(135deg, ${this.internalColor.toRGB().toString()} 50%, ${this.internalColor.toRGBModern().toString()} 50%)`;\n }\n componentWillLoad() {\n this.setInternalColor(this.color === '' ? DEFAULT_COLOR : this.color);\n }\n setInternalColor(color) {\n if (typeof color === 'string') {\n color = RsColorSwatch.allowedColorString(color) ? color : DEFAULT_COLOR;\n this.internalColor = new HSVaColor(...parseToHSVA(color).values);\n }\n else if (color instanceof HSVaColor) {\n this.internalColor = color;\n }\n else {\n throw new Error(`A valid color string or HSVaColor object is required`);\n }\n this.internalOpacity = this.internalColor.alpha;\n }\n render() {\n return (h(Host, { style: {\n 'display': this.label === '' ? 'inline-block' : null,\n 'width': this.getWidth()\n } }, h(\"div\", { class: \"rs-color-swatch__inner\", onClick: this.toggleColorPicker }, h(\"div\", { class: {\n 'rs-color-swatch__container': true,\n 'rs-color-swatch__container--transparent': this.internalOpacity === 0,\n } }, h(\"div\", { class: {\n 'rs-color-swatch__swatch': true,\n 'rs-color-swatch__swatch--solid-half': true,\n }, style: {\n background: this.swatchBackgroundColor()\n } })), this.label !== '' ?\n h(\"rs-caption\", { style: {\n 'display': this.label !== '' ? 'block' : null,\n }, class: \"rs-color-swatch__label\", color: \"secondary\" }, this.label !== '' ? this.label : '')\n : ''), h(\"rs-color-picker\", { class: \"rs-color-swatch__color-picker\", mode: this.mode, style: this.alignmentClass(), color: this.internalColor.toHEXA().toString().toLowerCase(), palettes: this.palettes, opacity: this.opacity, transparentButton: this.transparentButton, ref: el => this.colorPicker = el })));\n }\n getWidth() {\n if (this.width !== undefined) {\n return this.width;\n }\n if (this.label !== '') {\n return '100%';\n }\n return null;\n }\n static allowedColorString(color) {\n return isValidHex(color) || color.toLowerCase() === 'transparent';\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"color\": [\"updateColor\"]\n }; }\n};\nRsColorSwatch.style = rsColorSwatchCss;\n\nexport { RsColorSwatch as rs_color_swatch };\n\n//# sourceMappingURL=rs-color-swatch.entry.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","RsColorSwatch","hostRef","close","rsClose","isDirty","isNearBottomOfViewport","window","innerHeight","el","getBoundingClientRect","bottom","isTopSpaceEnoughForColorPicker","updateColorPickerPosition","colorPicker","position","toggleColorPicker","showPicker","sendCloseEvent","sendCloseEventWithObject","closeColorPicker","removeEventListener","listenToBody","bind","show","addEventListener","alignmentClass","alignment","left","transform","internalOpacity","internalColor","label","color","D","palettes","opacity","transparentButton","mode","width","updateColor","allowedColorString","setInternalColor","setColor","getColor","event","composedPath","includes","emit","hide","rsColorChangeHandler","detail","swatchBackgroundColor","componentWillLoad","H","Error","render","style","getWidth","class","onClick","background","ref","watchers"],"sourceRoot":""}
1
+ {"version":3,"file":"208.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,EAAIH,GACtBM,EAAIL,GAAU,GAAK,EAAIE,GAAKH,GAC5BO,EAAML,EAAI,EAIhB,MAAO,CAAK,IAHF,CAACD,EAAQI,EAAGD,EAAGA,EAAGE,EAAGL,GAAQM,GAGlB,IAFX,CAACD,EAAGL,EAAQA,EAAQI,EAAGD,EAAGA,GAAGG,GAET,IADpB,CAACH,EAAGA,EAAGE,EAAGL,EAAQA,EAAQI,GAAGE,GAE3C,CACA,SAASC,EAASZ,EAAGC,EAAGC,GACpB,OAAOH,EAASC,EAAGC,EAAGC,GAAGW,KAA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MAAe,QAAU,MAC1CmD,MAAO,yBAA0BlD,MAAO,aAA8B,KAAf/B,KAAK8B,MAAe9B,KAAK8B,MAAQ,IAC7F,KAAK,IAAA/H,GAAE,kBAAmB,CAAEoC,IAAK,2CAA4C8I,MAAO,gCAAiC7C,KAAMpC,KAAKoC,KAAM2C,MAAO/E,KAAKyD,iBAAkB1B,MAAO/B,KAAKgE,cAAc9C,SAASpG,WAAWkC,cAAeoI,SAAUpF,KAAKoF,SAAUnD,QAASjC,KAAKiC,QAASE,kBAAmBnC,KAAKmC,kBAAmBkD,IAAK7C,GAAMxC,KAAK6C,YAAcL,IACpW,CACA,QAAAwC,GACI,YAAmB5H,IAAf4C,KAAKsF,MACEtF,KAAKsF,MAEG,KAAftF,KAAK8B,MACE,OAEJ,IACX,CACA,yBAAO+B,CAAmB9B,GACtB,OAAO,IAAA1H,GAAW0H,IAAkC,gBAAxBA,EAAM/E,aACtC,CACA,MAAIwF,GAAO,OAAO,IAAAjH,GAAWyE,KAAO,CACpC,mBAAWuF,GAAa,MAAO,CAC3B,MAAS,CAAC,eACX,GAEP9D,EAAcsD,MA3LW,06C","sources":["webpack://DomainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/HSVaColor-db3c71a6.js","webpack://DomainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/rs-color-swatch.entry.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, g as getElement } from './index-def1ecaa.js';\nimport { D as DEFAULT_COLOR, H as HSVaColor, p as parseToHSVA, i as isValidHex } from './HSVaColor-db3c71a6.js';\n\nconst rsColorSwatchCss = \":host{display:block}.rs-color-swatch__inner{background:var(--rs-color-white);box-shadow:inset 0 0 0 1px var(--rs-color-select-border);border-radius:4px;padding:6px;cursor:pointer;min-width:32px;box-sizing:border-box;display:flex;align-items:center;justify-content:start}.rs-color-swatch__container{width:20px;height:20px;box-sizing:border-box;position:relative;overflow:hidden;border-radius:50%}.rs-color-swatch__container::before{content:\\\"\\\";position:absolute;width:18px;height:18px;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;border-radius:50%;top:1px;left:1px}.rs-color-swatch__container::after{content:\\\"\\\";position:absolute;border-top:2px solid red;width:18px;transform:rotate(-45deg);transform-origin:center;top:9px;left:1px;opacity:0}.rs-color-swatch__container--transparent::after{opacity:1}.rs-color-swatch__swatch{display:block;width:20px;height:20px;min-width:10px;box-sizing:border-box;position:relative;overflow:hidden;border-radius:50%;border:1px solid rgb(223 223 224)}.rs-color-swatch__container--transparent .rs-color-swatch__swatch{background:#fff !important}.rs-color-swatch__label{display:none;margin-left:7px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\";\nconst RsColorSwatchStyle0 = rsColorSwatchCss;\n\nconst RsColorSwatch = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.close = createEvent(this, \"close\", 7);\n this.rsClose = createEvent(this, \"rsClose\", 7);\n this.isDirty = false;\n /**\n * Colour picker label\n * If this is set, the label is added to the right of the color swatch\n */\n this.label = '';\n /**\n * Selected colour\n */\n this.color = DEFAULT_COLOR;\n /**\n * If true, will show an opacity slider in the colour picker popup\n */\n this.opacity = false;\n /**\n * Sets the alignment of the colour picker relative to the color swatch\n */\n this.alignment = 'center';\n /**\n * If set to true, a button will show in the color picker 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 preset, we only show the preset colors and don't allow custom selection via any method\n */\n this.mode = 'default';\n /**\n * Checks if the swatch element is close to the bottom of the viewport\n */\n this.isNearBottomOfViewport = () => {\n return (window.innerHeight - this.el.getBoundingClientRect().bottom) < 200;\n };\n /**\n * Checked if there's enough space above the color swatch element for displaying the color picker\n */\n this.isTopSpaceEnoughForColorPicker = () => {\n const topOffset = 150;\n const colorPickerHeight = 450; // max height of the color picker\n const colorSwatchRect = this.el.getBoundingClientRect();\n return (colorPickerHeight + topOffset) < colorSwatchRect.y;\n };\n /**\n * If the color swatch is close to the bottom of the sidebar/view port\n * then we show the color picker above the swatch\n */\n this.updateColorPickerPosition = () => {\n /*\n * If there's no space at the bottom, but there's enough space at the top,\n * then we reposition the color picker above the swatch\n */\n if (this.isNearBottomOfViewport() && this.isTopSpaceEnoughForColorPicker()) {\n this.colorPicker.position = 'top';\n }\n else {\n this.colorPicker.position = 'default';\n }\n };\n this.toggleColorPicker = () => {\n this.updateColorPickerPosition();\n if (!this.colorPicker.showPicker) {\n this.colorPicker.show();\n document.addEventListener('click', this.listenToBody.bind(this));\n }\n else {\n this.sendCloseEvent();\n this.sendCloseEventWithObject();\n this.closeColorPicker();\n document.removeEventListener('click', this.listenToBody.bind(this));\n }\n };\n this.alignmentClass = () => {\n if (this.alignment === 'center') {\n return {\n left: '50%',\n transform: 'translateX(-50%)',\n };\n }\n return {};\n };\n }\n updateColor(color) {\n if (!RsColorSwatch.allowedColorString(color)) {\n return;\n }\n this.setInternalColor(color);\n this.colorPicker.setColor(this.internalColor.toHEXA().toString());\n }\n /**\n * Set the color of the color swatch\n * @param color\n */\n async setColor(color) {\n if (!RsColorSwatch.allowedColorString(color)) {\n return;\n }\n this.setInternalColor(color);\n await this.colorPicker.setColor(this.internalColor.toHEXA().toString());\n }\n /**\n * Returns a HSVaColor object of the currently selected color\n */\n async getColor() {\n return this.internalColor;\n }\n listenToBody(event) {\n if (!event.composedPath().includes(this.el) && this.colorPicker.showPicker) {\n this.sendCloseEvent();\n this.sendCloseEventWithObject();\n this.closeColorPicker();\n }\n }\n sendCloseEvent() {\n this.close.emit({ color: this.color, isDirty: this.isDirty });\n }\n sendCloseEventWithObject() {\n this.rsClose.emit({ color: this.internalColor, isDirty: this.isDirty });\n }\n closeColorPicker() {\n this.colorPicker.hide();\n this.isDirty = false;\n }\n rsColorChangeHandler(event) {\n this.setInternalColor(event.detail.value);\n this.isDirty = true;\n }\n swatchBackgroundColor() {\n return `linear-gradient(135deg, ${this.internalColor.toRGB().toString()} 50%, ${this.internalColor.toRGBModern().toString()} 50%)`;\n }\n componentWillLoad() {\n this.setInternalColor(this.color === '' ? DEFAULT_COLOR : this.color);\n }\n setInternalColor(color) {\n if (typeof color === 'string') {\n color = RsColorSwatch.allowedColorString(color) ? color : DEFAULT_COLOR;\n this.internalColor = new HSVaColor(...parseToHSVA(color).values);\n }\n else if (color instanceof HSVaColor) {\n this.internalColor = color;\n }\n else {\n throw new Error(`A valid color string or HSVaColor object is required`);\n }\n this.internalOpacity = this.internalColor.alpha;\n }\n render() {\n return (h(Host, { key: '9e3114a27c6e7a5cfdf4b4aac570cdda7850124a', style: {\n 'display': this.label === '' ? 'inline-block' : null,\n 'width': this.getWidth()\n } }, h(\"div\", { key: 'bd9886f20f83081b56e10bc06ce682b82ede5966', class: \"rs-color-swatch__inner\", onClick: this.toggleColorPicker }, h(\"div\", { key: '0ae14294486d071743d208afeef4d55b6d625933', class: {\n 'rs-color-swatch__container': true,\n 'rs-color-swatch__container--transparent': this.internalOpacity === 0,\n } }, h(\"div\", { key: '68dfecc74d02e467fbf0e479db4a43cd58d17949', class: {\n 'rs-color-swatch__swatch': true,\n 'rs-color-swatch__swatch--solid-half': true,\n }, style: {\n background: this.swatchBackgroundColor()\n } })), this.label !== '' ?\n h(\"rs-caption\", { style: {\n 'display': this.label !== '' ? 'block' : null,\n }, class: \"rs-color-swatch__label\", color: \"secondary\" }, this.label !== '' ? this.label : '')\n : ''), h(\"rs-color-picker\", { key: '55ac5efe377d3ecbbc716eb69e220b7ee112214b', class: \"rs-color-swatch__color-picker\", mode: this.mode, style: this.alignmentClass(), color: this.internalColor.toHEXA().toString().toLowerCase(), palettes: this.palettes, opacity: this.opacity, transparentButton: this.transparentButton, ref: el => this.colorPicker = el })));\n }\n getWidth() {\n if (this.width !== undefined) {\n return this.width;\n }\n if (this.label !== '') {\n return '100%';\n }\n return null;\n }\n static allowedColorString(color) {\n return isValidHex(color) || color.toLowerCase() === 'transparent';\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"color\": [\"updateColor\"]\n }; }\n};\nRsColorSwatch.style = RsColorSwatchStyle0;\n\nexport { RsColorSwatch as rs_color_swatch };\n\n//# sourceMappingURL=rs-color-swatch.entry.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","RsColorSwatch","hostRef","close","rsClose","isDirty","label","color","D","opacity","alignment","transparentButton","mode","isNearBottomOfViewport","window","innerHeight","el","getBoundingClientRect","bottom","isTopSpaceEnoughForColorPicker","updateColorPickerPosition","colorPicker","position","toggleColorPicker","showPicker","sendCloseEvent","sendCloseEventWithObject","closeColorPicker","removeEventListener","listenToBody","bind","show","addEventListener","alignmentClass","left","transform","updateColor","allowedColorString","setInternalColor","setColor","internalColor","getColor","event","composedPath","includes","emit","hide","rsColorChangeHandler","detail","swatchBackgroundColor","componentWillLoad","H","Error","internalOpacity","render","style","getWidth","class","onClick","background","palettes","ref","width","watchers"],"sourceRoot":""}
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @rocketspark/domain-checker v1.0.2
3
+ * @rocketspark/domain-checker v1.0.4
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([[237],{5237:function(t,e,o){o.r(e),o.d(e,{rs_content_placeholder:function(){return r}});var s=o(7915);const r=class{constructor(t){(0,s.r)(this,t),this.mask=void 0,this.border=!0,this.maskContent="",this.width=void 0,this.scale=void 0}componentDidLoad(){if(void 0===this.mask)return;const t=(0,s.a)(`./assets/svg-masks/${this.mask}.svg`),e=new XMLHttpRequest;e.open("GET",t),e.onreadystatechange=()=>{if(4==e.readyState&&200==e.status){const t=document.createElement("div");t.innerHTML=e.responseText;const o=t.querySelector("svg");this.maskContent=o.outerHTML,this.width=o.getAttribute("width");const s=o.getAttribute("height");this.scale=parseFloat(s)/parseFloat(this.width)*100}},e.send()}render(){return(0,s.h)(s.H,null,(0,s.h)("div",{class:{"rs-content-placeholder__container":!0,"rs-content-placeholder__container--no-border":!this.border},style:{width:`${this.width}px`}},(0,s.h)("div",{class:"rs-content-placeholder__loading",style:{paddingBottom:`${this.scale}%`,clipPath:"url(#clip-mask)"}}),(0,s.h)("div",{class:"rs-content-placeholder__svg-container",innerHTML:this.maskContent})))}static get assetsDirs(){return["assets"]}};r.style=":host{display:block}.rs-content-placeholder__container{box-shadow:inset 0 0 0 2px var(--rs-color-light);display:inline-block;border-radius:4px;cursor:wait}.rs-content-placeholder__container--no-border{box-shadow:none}.rs-content-placeholder__svg-container{height:0;width:0;overflow:hidden}.rs-content-placeholder__loading{width:100%;height:100%;position:relative;overflow:hidden;background-color:var(--rs-color-light)}.rs-content-placeholder__loading::before{content:'';display:block;position:absolute;left:-150px;top:0;height:100%;width:150px;background:linear-gradient(to right, var(--rs-color-light) 0%, rgba(255, 255, 255, 0.8) 50%, var(--rs-color-light) 100%);animation:rs-content-placeholder__load 2s cubic-bezier(0.4, 0.0, 0.2, 1) infinite}@keyframes rs-content-placeholder__load{from{left:-150px}to{left:100%}}"}}]);
12
+ "use strict";(self.webpackChunkDomainChecker=self.webpackChunkDomainChecker||[]).push([[237],{5237:function(e,t,o){o.r(t),o.d(t,{rs_content_placeholder:function(){return n}});var r=o(6919);const n=class{constructor(e){(0,r.r)(this,e),this.border=!0,this.maskContent=""}componentDidLoad(){if(void 0===this.mask)return;const e=(0,r.a)(`./assets/svg-masks/${this.mask}.svg`),t=new XMLHttpRequest;t.open("GET",e),t.onreadystatechange=()=>{if(4==t.readyState&&200==t.status){const e=document.createElement("div");e.innerHTML=t.responseText;const o=e.querySelector("svg");this.maskContent=o.outerHTML,this.width=o.getAttribute("width");const r=o.getAttribute("height");this.scale=parseFloat(r)/parseFloat(this.width)*100}},t.send()}render(){return(0,r.h)(r.H,{key:"9acb72c69ab7ecff0dbc6d236d38243948578823"},(0,r.h)("div",{key:"d149506c9fb99e0c748d9ebfd929133a0abbc076",class:{"rs-content-placeholder__container":!0,"rs-content-placeholder__container--no-border":!this.border},style:{width:`${this.width}px`}},(0,r.h)("div",{key:"c2f8252354bd35b2268892f5e7238b178fd89e6a",class:"rs-content-placeholder__loading",style:{paddingBottom:`${this.scale}%`,clipPath:"url(#clip-mask)"}}),(0,r.h)("div",{key:"00c8c79de8df53e5f9bef7cdd310f838cc59c36c",class:"rs-content-placeholder__svg-container",innerHTML:this.maskContent})))}static get assetsDirs(){return["assets"]}};n.style=":host{display:block}.rs-content-placeholder__container{box-shadow:inset 0 0 0 2px var(--rs-color-light);display:inline-block;border-radius:4px;cursor:wait}.rs-content-placeholder__container--no-border{box-shadow:none}.rs-content-placeholder__svg-container{height:0;width:0;overflow:hidden}.rs-content-placeholder__loading{width:100%;height:100%;position:relative;overflow:hidden;background-color:var(--rs-color-light)}.rs-content-placeholder__loading::before{content:'';display:block;position:absolute;left:-150px;top:0;height:100%;width:150px;background:linear-gradient(to right, var(--rs-color-light) 0%, rgba(255, 255, 255, 0.8) 50%, var(--rs-color-light) 100%);animation:rs-content-placeholder__load 2s cubic-bezier(0.4, 0.0, 0.2, 1) infinite}@keyframes rs-content-placeholder__load{from{left:-150px}to{left:100%}}"}}]);
13
13
  //# sourceMappingURL=237.index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"237.index.js","mappings":";;;;;;;;;;;6LAEA,MAEMA,EAAuB,MAC3B,WAAAC,CAAYC,IACV,IAAAC,GAAiBC,KAAMF,GACvBE,KAAKC,UAAOC,EACZF,KAAKG,QAAS,EACdH,KAAKI,YAAc,GACnBJ,KAAKK,WAAQH,EACbF,KAAKM,WAAQJ,CACf,CACA,gBAAAK,GACE,QAAkBL,IAAdF,KAAKC,KACP,OAEF,MAAMA,GAAO,OAAa,sBAAsBD,KAAKC,YAC/CO,EAAS,IAAIC,eACnBD,EAAOE,KAAK,MAAOT,GACnBO,EAAOG,mBAAqB,KAC1B,GAAyB,GAArBH,EAAOI,YAAoC,KAAjBJ,EAAOK,OAAe,CAClD,MAAMC,EAAmBC,SAASC,cAAc,OAChDF,EAAiBG,UAAYT,EAAOU,aACpC,MAAMC,EAAcL,EAAiBM,cAAc,OACnDpB,KAAKI,YAAce,EAAYE,UAC/BrB,KAAKK,MAAQc,EAAYG,aAAa,SACtC,MAAMC,EAASJ,EAAYG,aAAa,UACxCtB,KAAKM,MAASkB,WAAWD,GAAUC,WAAWxB,KAAKK,OAAU,GAC/D,GAEFG,EAAOiB,MACT,CACA,MAAAC,GACE,OAAQ,IAAAC,GAAE,EAAAC,EAAM,MAAM,IAAAD,GAAE,MAAO,CAAEE,MAAO,CACpC,qCAAqC,EACrC,gDAAiD7B,KAAKG,QACrD2B,MAAO,CACRzB,MAAO,GAAGL,KAAKK,aACZ,IAAAsB,GAAE,MAAO,CAAEE,MAAO,kCAAmCC,MAAO,CAC/DC,cAAe,GAAG/B,KAAKM,SACvB0B,SAAU,sBACN,IAAAL,GAAE,MAAO,CAAEE,MAAO,wCAAyCZ,UAAWjB,KAAKI,eACrF,CACA,qBAAW6B,GAAe,MAAO,CAAC,SAAW,GAE/CrC,EAAqBkC,MA5CW,ozB","sources":["webpack://DomainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/rs-content-placeholder.entry.js"],"sourcesContent":["import { r as registerInstance, a as getAssetPath, h, H as Host } from './index-3d0f28ab.js';\n\nconst rsContentPlaceholderCss = \":host{display:block}.rs-content-placeholder__container{box-shadow:inset 0 0 0 2px var(--rs-color-light);display:inline-block;border-radius:4px;cursor:wait}.rs-content-placeholder__container--no-border{box-shadow:none}.rs-content-placeholder__svg-container{height:0;width:0;overflow:hidden}.rs-content-placeholder__loading{width:100%;height:100%;position:relative;overflow:hidden;background-color:var(--rs-color-light)}.rs-content-placeholder__loading::before{content:'';display:block;position:absolute;left:-150px;top:0;height:100%;width:150px;background:linear-gradient(to right, var(--rs-color-light) 0%, rgba(255, 255, 255, 0.8) 50%, var(--rs-color-light) 100%);animation:rs-content-placeholder__load 2s cubic-bezier(0.4, 0.0, 0.2, 1) infinite}@keyframes rs-content-placeholder__load{from{left:-150px}to{left:100%}}\";\n\nconst RsContentPlaceholder = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.mask = undefined;\n this.border = true;\n this.maskContent = '';\n this.width = undefined;\n this.scale = undefined;\n }\n componentDidLoad() {\n if (this.mask === undefined) {\n return;\n }\n const mask = getAssetPath(`./assets/svg-masks/${this.mask}.svg`);\n const client = new XMLHttpRequest();\n client.open('GET', mask);\n client.onreadystatechange = () => {\n if (client.readyState == 4 && client.status == 200) {\n const maskElementOuter = document.createElement('div');\n maskElementOuter.innerHTML = client.responseText;\n const maskElement = maskElementOuter.querySelector('svg');\n this.maskContent = maskElement.outerHTML;\n this.width = maskElement.getAttribute('width');\n const height = maskElement.getAttribute('height');\n this.scale = (parseFloat(height) / parseFloat(this.width)) * 100;\n }\n };\n client.send();\n }\n render() {\n return (h(Host, null, h(\"div\", { class: {\n 'rs-content-placeholder__container': true,\n 'rs-content-placeholder__container--no-border': !this.border,\n }, style: {\n width: `${this.width}px`,\n } }, h(\"div\", { class: \"rs-content-placeholder__loading\", style: {\n paddingBottom: `${this.scale}%`,\n clipPath: 'url(#clip-mask)'\n } }), h(\"div\", { class: 'rs-content-placeholder__svg-container', innerHTML: this.maskContent }))));\n }\n static get assetsDirs() { return [\"assets\"]; }\n};\nRsContentPlaceholder.style = rsContentPlaceholderCss;\n\nexport { RsContentPlaceholder as rs_content_placeholder };\n\n//# sourceMappingURL=rs-content-placeholder.entry.js.map"],"names":["RsContentPlaceholder","constructor","hostRef","r","this","mask","undefined","border","maskContent","width","scale","componentDidLoad","client","XMLHttpRequest","open","onreadystatechange","readyState","status","maskElementOuter","document","createElement","innerHTML","responseText","maskElement","querySelector","outerHTML","getAttribute","height","parseFloat","send","render","h","H","class","style","paddingBottom","clipPath","assetsDirs"],"sourceRoot":""}
1
+ {"version":3,"file":"237.index.js","mappings":";;;;;;;;;;;6LAEA,MAGMA,EAAuB,MACzB,WAAAC,CAAYC,IACR,IAAAC,GAAiBC,KAAMF,GAIvBE,KAAKC,QAAS,EACdD,KAAKE,YAAc,EACvB,CACA,gBAAAC,GACI,QAAkBC,IAAdJ,KAAKK,KACL,OAEJ,MAAMA,GAAO,OAAa,sBAAsBL,KAAKK,YAC/CC,EAAS,IAAIC,eACnBD,EAAOE,KAAK,MAAOH,GACnBC,EAAOG,mBAAqB,KACxB,GAAyB,GAArBH,EAAOI,YAAoC,KAAjBJ,EAAOK,OAAe,CAChD,MAAMC,EAAmBC,SAASC,cAAc,OAChDF,EAAiBG,UAAYT,EAAOU,aACpC,MAAMC,EAAcL,EAAiBM,cAAc,OACnDlB,KAAKE,YAAce,EAAYE,UAC/BnB,KAAKoB,MAAQH,EAAYI,aAAa,SACtC,MAAMC,EAASL,EAAYI,aAAa,UACxCrB,KAAKuB,MAASC,WAAWF,GAAUE,WAAWxB,KAAKoB,OAAU,GACjE,GAEJd,EAAOmB,MACX,CACA,MAAAC,GACI,OAAQ,IAAAC,GAAE,EAAAC,EAAM,CAAEC,IAAK,6CAA8C,IAAAF,GAAE,MAAO,CAAEE,IAAK,2CAA4CC,MAAO,CAChI,qCAAqC,EACrC,gDAAiD9B,KAAKC,QACvD8B,MAAO,CACNX,MAAO,GAAGpB,KAAKoB,aACd,IAAAO,GAAE,MAAO,CAAEE,IAAK,2CAA4CC,MAAO,kCAAmCC,MAAO,CAC9GC,cAAe,GAAGhC,KAAKuB,SACvBU,SAAU,sBACR,IAAAN,GAAE,MAAO,CAAEE,IAAK,2CAA4CC,MAAO,wCAAyCf,UAAWf,KAAKE,eAC1I,CACA,qBAAWgC,GAAe,MAAO,CAAC,SAAW,GAEjDtC,EAAqBmC,MA7CW,ozB","sources":["webpack://DomainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/rs-content-placeholder.entry.js"],"sourcesContent":["import { r as registerInstance, a as getAssetPath, h, H as Host } from './index-def1ecaa.js';\n\nconst rsContentPlaceholderCss = \":host{display:block}.rs-content-placeholder__container{box-shadow:inset 0 0 0 2px var(--rs-color-light);display:inline-block;border-radius:4px;cursor:wait}.rs-content-placeholder__container--no-border{box-shadow:none}.rs-content-placeholder__svg-container{height:0;width:0;overflow:hidden}.rs-content-placeholder__loading{width:100%;height:100%;position:relative;overflow:hidden;background-color:var(--rs-color-light)}.rs-content-placeholder__loading::before{content:'';display:block;position:absolute;left:-150px;top:0;height:100%;width:150px;background:linear-gradient(to right, var(--rs-color-light) 0%, rgba(255, 255, 255, 0.8) 50%, var(--rs-color-light) 100%);animation:rs-content-placeholder__load 2s cubic-bezier(0.4, 0.0, 0.2, 1) infinite}@keyframes rs-content-placeholder__load{from{left:-150px}to{left:100%}}\";\nconst RsContentPlaceholderStyle0 = rsContentPlaceholderCss;\n\nconst RsContentPlaceholder = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n /**\n * Adds a border around the placeholder if set to true\n */\n this.border = true;\n this.maskContent = '';\n }\n componentDidLoad() {\n if (this.mask === undefined) {\n return;\n }\n const mask = getAssetPath(`./assets/svg-masks/${this.mask}.svg`);\n const client = new XMLHttpRequest();\n client.open('GET', mask);\n client.onreadystatechange = () => {\n if (client.readyState == 4 && client.status == 200) {\n const maskElementOuter = document.createElement('div');\n maskElementOuter.innerHTML = client.responseText;\n const maskElement = maskElementOuter.querySelector('svg');\n this.maskContent = maskElement.outerHTML;\n this.width = maskElement.getAttribute('width');\n const height = maskElement.getAttribute('height');\n this.scale = (parseFloat(height) / parseFloat(this.width)) * 100;\n }\n };\n client.send();\n }\n render() {\n return (h(Host, { key: '9acb72c69ab7ecff0dbc6d236d38243948578823' }, h(\"div\", { key: 'd149506c9fb99e0c748d9ebfd929133a0abbc076', class: {\n 'rs-content-placeholder__container': true,\n 'rs-content-placeholder__container--no-border': !this.border,\n }, style: {\n width: `${this.width}px`,\n } }, h(\"div\", { key: 'c2f8252354bd35b2268892f5e7238b178fd89e6a', class: \"rs-content-placeholder__loading\", style: {\n paddingBottom: `${this.scale}%`,\n clipPath: 'url(#clip-mask)'\n } }), h(\"div\", { key: '00c8c79de8df53e5f9bef7cdd310f838cc59c36c', class: 'rs-content-placeholder__svg-container', innerHTML: this.maskContent }))));\n }\n static get assetsDirs() { return [\"assets\"]; }\n};\nRsContentPlaceholder.style = RsContentPlaceholderStyle0;\n\nexport { RsContentPlaceholder as rs_content_placeholder };\n\n//# sourceMappingURL=rs-content-placeholder.entry.js.map"],"names":["RsContentPlaceholder","constructor","hostRef","r","this","border","maskContent","componentDidLoad","undefined","mask","client","XMLHttpRequest","open","onreadystatechange","readyState","status","maskElementOuter","document","createElement","innerHTML","responseText","maskElement","querySelector","outerHTML","width","getAttribute","height","scale","parseFloat","send","render","h","H","key","class","style","paddingBottom","clipPath","assetsDirs"],"sourceRoot":""}
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @rocketspark/domain-checker v1.0.2
3
+ * @rocketspark/domain-checker v1.0.4
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([[245],{4902:function(t,e,i){i.d(e,{D:function(){return f},H:function(){return m},i:function(){return g},p:function(){return u}});const{min:o,max:s,floor:r,round:n}=Math;function a(t,e,i){const o=t/360*6,s=e/100,n=i/100,a=r(o),l=o-a,h=n*(1-s),p=n*(1-l*s),c=n*(1-(1-l)*s),d=a%6;return[255*[n,p,h,h,c,n][d],255*[c,n,n,p,h,h][d],255*[h,h,c,n,n,p][d]]}function l(t,e,i){return a(t,e,i).map((t=>n(t).toString(16).padStart(2,"0")))}function h(t,e,i){let o=e/100;const s=i/100,r=(2-o)*s/2;return 0!==r&&(o=1===r?0:r<.5?o*s/(2*r):o*s/(2-2*r)),[t,100*o,100*r]}function p(t,e,i){const r=t/255,n=e/255,a=i/255,l=o(r,n,a),h=s(r,n,a),p=h-l;let c,d;if(0===p)c=0,d=0;else{d=p/h;const t=((h-r)/6+p/2)/p,e=((h-n)/6+p/2)/p,i=((h-a)/6+p/2)/p;r===h?c=i-e:n===h?c=1/3+t-i:a===h&&(c=2/3+e-t),c<0?c+=1:c>1&&(c-=1)}return[360*c,100*d,100*h]}function c(t,e,i,s){const r=e/100,n=i/100,a=s/100;return[...p(255*(1-o(1,t/100*(1-a)+a)),255*(1-o(1,r*(1-a)+a)),255*(1-o(1,n*(1-a)+a)))]}function d(t,e,i){let o=e/100;const s=i/100;o*=s<.5?s:1-s;const r=2*o/(s+o)*100,n=100*(s+o);return[t,Number.isNaN(r)?0:r,n]}function u(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:i,match:o}=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 i=e[1].exec(t);return{type:e[0],regex:e[1],match:i}}return{type:null}}(e),s=t=>t.map((t=>/^(|\d+)\.\d+|\d+$/.test(t)?Number(t):void 0));if(null===i||null===o)return{values:null,type:"hexa"};const r=t=>t>=0&&t<=1&&(t=>!!o[2]==("number"==typeof t))(t);if("cmyk"===i){const[,t,e,r,n]=s(o);if(t&&e&&r&&n&&t<=100&&e<=100&&r<=100&&n<=100)return{values:c(t,e,r,n),type:i}}if("rgba"===i){const[,,,t,e,n,a]=s(o);if(void 0!==t&&void 0!==e&&void 0!==n&&void 0!==a&&t<=255&&e<=255&&n<=255&&r(a))return{values:[...p(t,e,n),a],alpha:a,type:i}}if("hexa"===i){let[,t]=o;4!==t.length&&3!==t.length||(t=t.split("").map((t=>t+t)).join(""));const e=t.substring(0,6);let s=t.substring(6);s=s?parseInt(s,16)/255:void 0;const r=function(t){const e=t.match(/.{2}/g);if(null!==e){const[t,i,o]=e.map((t=>Number.parseInt(t,16)));return p(t,i,o)}return null}(e);if(void 0!==r)return{values:[...r,s],alpha:s,type:i}}if("hsla"===i){const[,,,t,e,n,a]=s(o);if(t&&e&&n&&a&&t<=360&&e<=100&&n<=100&&a>=0&&a<=1&&r(a))return{values:[...d(t,e,n),a],alpha:a,type:i}}if("hsva"===i){const[,,,t,e,n,a]=s(o);if(t&&e&&n&&a&&t<=360&&e<=100&&n<=100&&a>=0&&a<=1&&r(a))return{values:[t,e,n,a],alpha:a,type:i}}return{values:null,type:"hexa"}}const g=t=>void 0!==t&&t.match(/^#?[\dA-Fa-f]{6,8}$/i),f="#7CA1FF";class m{constructor(t=0,e=0,i=0,o=1){this.mapper=(t,e)=>(i=-1)=>e(i>=0?t.map((t=>Number(t.toFixed(i)))):t),this.h=t,this.s=e,this.v=i,this.a=o>1?o/100:o}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=[...h(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=h(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,i){const s=a(t,e,i),r=s[0]/255,n=s[1]/255,l=s[2]/255,h=o(1-r,1-n,1-l);return[100*(1===h?0:(1-r-h)/(1-h)),100*(1===h?0:(1-n-h)/(1-h)),100*(1===h?0:(1-l-h)/(1-h)),100*h]}(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=l(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=l(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 m(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))+"%"}}},7245:function(t,e,i){i.r(e),i.d(e,{color_picker:function(){return h},color_picker_color_palette:function(){return c},color_picker_hue_slider:function(){return d},color_picker_opacity_slider:function(){return u}});var o=i(7915),s=i(4902),r=i(4700);const n=t=>t<=1?Math.round(100*t):Math.round(t);const a=new class{constructor(){this.storage=new WeakMap}set(t,e,i){this.has(t,e)&&console.warn("Overwriting existing key:",e),this.storage.get(t)||this.storage.set(t,new Map),this.storage.get(t).set(e,i)}get(t,e){var i;return void 0!==this.storage.get(t)?this.storage.get(t).get(e):null!==(i=this.storage[e])&&void 0!==i?i:null}has(t,e){return void 0!==this.storage.get(t)&&this.storage.get(t).has(e)}delete(t,e){this.has(t,e)&&(this.storage.get(t).delete(e),0===this.storage.get(t).size&&this.storage.delete(t))}};class l{constructor(t,e={}){if(this.arrowOffset=10,this.isScrolling=!1,this.positionClasses=[],this.defaults={position:"horizontal",delayShow:1e3,delayHide:500,horizontalOffset:-5,verticalOffset:0},this.classNames={tooltip:"rs-tooltip",horizontal:"rs-tooltip--horizontal",vertical:"rs-tooltip--vertical",arrowBottom:"rs-tooltip--bottom",arrowLeft:"rs-tooltip--left",arrowRight:"rs-tooltip-right",arrowTop:"rs-tooltip--top",active:"rs-tooltip--active"},void 0!==t.dataset.tip&&""!==t.dataset.tip&&!a.has(t,"tooltip-loaded")){if(a.set(t,"tooltip-loaded",!0),"object"==typeof e&&(this.options=Object.assign(this.defaults,e)),"string"==typeof t&&(t=document.querySelector(t)),!(t instanceof Element||t instanceof Element||null===t))throw new Error(`You haven't passed through a DOM element, or the element can't be found: ${t}`);this.element=t,this.createStructure(),this.element.addEventListener("mouseenter",(()=>{let t=this.isVisible()?0:this.options.delayShow;const e=a.get(this.tooltipContainer,"tooltipHideTimeout");void 0!==e&&(clearTimeout(e),a.delete(this.tooltipContainer,"tooltipHideTimeout"));const i=a.get(this.tooltipContainer,"tooltipShowTimeout");void 0!==i&&(clearTimeout(i),a.delete(this.tooltipContainer,"tooltipShowTimeout"));const o=setTimeout((()=>{this.show()}),t);a.set(this.tooltipContainer,"showTimeout",o)})),this.element.addEventListener("mouseleave",(()=>{const t=setTimeout((()=>{this.hide(),a.delete(this.tooltipContainer,"tooltipHideTimeout")}),this.options.delayHide);a.set(this.tooltipContainer,"tooltipHideTimeout",t);const e=a.get(this.tooltipContainer,"showTimeout");void 0!==e&&(clearTimeout(e),a.delete(this.tooltipContainer,"showTimeout"))})),window.addEventListener("scroll",(()=>{this.isScrolling=!0,this.hide(!0),(0,r.S)((()=>{this.isScrolling=!1,window.addEventListener("scroll",(()=>{this.isScrolling=!0,this.hide(!0)}),{once:!0})}))}),{once:!0})}}createStructure(){null===document.querySelector("rs-tool-tip")?(this.tooltipContainer=document.createElement("rs-tool-tip"),this.tooltipContainer.classList.add(this.classNames.tooltip),document.body.append(this.tooltipContainer)):this.tooltipContainer=document.querySelector("rs-tool-tip")}show(){if(this.isScrolling)return;this.hide(),setTimeout((()=>{this.tooltipContainer.innerHTML=this.element.dataset.tip,this.setPosition(),this.tooltipContainer.classList.add(this.classNames.active)}),150)}setPosition(){let t,e;this.tooltipContainer.style.width=null,this.tooltipContainer.style.height=null;const i=this.element.getBoundingClientRect(),o=i.left,s=i.top,r=i.width,n=i.height,a=this.tooltipContainer.offsetWidth,l=this.tooltipContainer.offsetHeight,h=window.scrollY||document.documentElement.scrollTop;let p="left";"horizontal"===this.options.position?(p="right",window.innerWidth-o+r>a+20?p="right":o>a+20&&(p="left")):"vertical"===this.options.position&&(p="top",window.innerHeight-s+n>l+20?p="bottom":s>a+20&&(p="top")),this.positionClasses.push(this.classNames[`arrow${p.charAt(0).toUpperCase()+p.slice(1)}`]),"top"===p?(this.positionClasses.push(this.classNames.vertical),e=r/2+o-a/2+this.options.horizontalOffset,t=s+h-l-this.arrowOffset+this.options.verticalOffset):"bottom"===p?(this.positionClasses.push(this.classNames.vertical),e=r/2+o-a/2+this.options.horizontalOffset,t=s+h+n+this.arrowOffset+this.options.verticalOffset):"left"===p?(this.positionClasses.push(this.classNames.horizontal),e=o-a-this.arrowOffset+this.options.horizontalOffset,t=s+h+n/2-l/2+this.options.verticalOffset):"right"===p&&(this.positionClasses.push(this.classNames.horizontal),e=r+o+this.arrowOffset+this.options.horizontalOffset,t=s+h+n/2-l/2+this.options.verticalOffset);const{left:c}=window.getComputedStyle(document.body),d=void 0!==e?e-Number.parseInt(c):"auto";this.tooltipContainer.style.top=`${null!=t?t:"auto"}px`,this.tooltipContainer.style.right="autopx",this.tooltipContainer.style.bottom="autopx",this.tooltipContainer.style.left=`${d}px`,this.tooltipContainer.classList.add(...this.positionClasses),this.tooltipContainer.setAttribute("arrow",p)}hide(t=!1){const e=t?0:150;this.tooltipContainer.classList.remove(this.classNames.active),setTimeout((()=>{this.tooltipContainer.classList.remove(this.classNames.arrowBottom,this.classNames.arrowTop,this.classNames.arrowLeft,this.classNames.arrowRight),this.tooltipContainer.style.top=null,this.tooltipContainer.style.right=null,this.tooltipContainer.style.bottom=null,this.tooltipContainer.style.left=null}),e)}isVisible(){const t=window.getComputedStyle(this.tooltipContainer);return!(null===this.tooltipContainer.offsetParent||"0"===t.opacity)}}const h=class{constructor(t){(0,o.r)(this,t),this.colorChange=(0,o.c)(this,"colorChange",7),this.presetColorChoice=(0,o.c)(this,"presetColorChoice",7),this.hasRecentColors=!1,this.hueChangeHandler=t=>{this.hasTransparentButton()&&(this.currentOpacity=100,this.currentColor.alpha=this.currentOpacity),this.currentColor.hue=t.detail,this.setHue(t.detail),this.setColorAndEmit(this.currentColor.toHEXA().toString())},this.colorPaletteChangeHandler=t=>{var e;!this.hasTransparentButton()&&this.supportsOpacity()||(this.currentOpacity=100),null===(e=this.opacitySlider)||void 0===e||e.setColor(t.detail.toHEXA().toString()),t.detail.alpha=this.currentOpacity,this.setColorAndEmit(t.detail.toHEXA().toString())},this.handleOpacityInput=t=>{const e=isNaN(t.target.value)?0:t.target.value;this.currentOpacity=Math.max(Math.min(e,100),0),this.setColorAndEmit(this.currentColor.toHEXA().toString())},this.setPresetPalette=t=>{var e,i,o;const s=null!==(i=(null!==(e=this.palettesToDisplay.filter((e=>e.label===t.target.dataset.category))[0])&&void 0!==e?e:{palettes:[]}).palettes.filter((e=>e.index===Number.parseInt(t.target.dataset.index)))[0])&&void 0!==i?i:{};this.setColorFromPalette(t.target.dataset.color),this.presetColorChoice.emit({color:this.currentColor,data:null!==(o=s.data)&&void 0!==o?o:null})},this.handleHexInput=t=>{const e=t.target.value,i=e.startsWith("#")?e:`#${e}`;(0,s.i)(i)&&(this.setColorAndEmit(i),this.setHue(this.currentColor.hue))},this.handleHexFocus=t=>{t.target.select()},this.hasOpacity=t=>t.length>7,this.setTransparentButton=()=>{this.currentOpacity=0,this.currentColor.alpha=this.currentOpacity,this.setColorAndEmit(this.currentColor.toHEXA().toString())},this.currentColor=void 0,this.currentOpacity=void 0,this.palettesToDisplay=[],this.color=void 0,this.opacity=!1,this.palettes=void 0,this.maxPresetDisplay=12,this.recentColorsLabel="Recent Colors",this.transparentButton=!1,this.display="default",this.mode="default"}watchPalettes(){this.buildPresetPalettes()}componentWillLoad(){var t;this.setColorValue(null!==(t=this.color)&&void 0!==t?t:s.D),this.buildPresetPalettes()}componentDidRender(){this.createToolTips()}opacityChangeHandler(t){this.currentOpacity=n(t.detail),this.currentColor.alpha=this.currentOpacity,this.setColorAndEmit(this.currentColor.toHEXA().toString())}colorPickerAddRecentHandler(t){if(!this.hasRecentColors)return;const e=this.getPresetPaletteGroup(this.recentColorsLabel);this.paletteExists(t.detail.hex,e.palettes)||this.addToPreset(t.detail.hex,this.recentColorsLabel)}async setColor(t){this.setColorValue(t),await this.updateColorPickerControls()}async getColor(){return this.currentColor}async addToPreset(t,e){if(this.renderPresetPalette(t)){const i=JSON.parse(JSON.stringify(this.palettesToDisplay)),o=i.findIndex((t=>t.label===e));-1!==o?this.paletteExists(t,i[o].palettes)||i[o].palettes.unshift(t):i.push({label:e,palettes:[t]}),this.palettesToDisplay=i}}async updateColorPickerControls(){await this.colorPalette.setColor(this.currentColor.toHEXA().toString()),await this.hueSlider.setHue(this.currentColor.hue),this.setOpacitySlider()}getPresetPaletteGroup(t){const e=JSON.parse(JSON.stringify(this.palettesToDisplay)),i=e.findIndex((e=>e.label===t));return e[i]}setColorAndEmit(t){this.setColorValue(t),this.colorChange.emit(this.currentColor)}setColorValue(t){this.currentColor=new s.H(...(0,s.p)(t).values),this.hasTransparentButton()&&!this.showOpacity()&&this.currentColor.alpha<1?this.currentColor.alpha=0:(this.showOpacity()||(this.currentColor.alpha=100),this.currentOpacity=n(this.currentColor.alpha))}setOpacitySlider(){this.showOpacity()&&(this.opacitySlider.setColor(this.currentColor.toHEX().toString()),this.opacitySlider.setOpacity(this.currentColor.alpha))}supportsOpacity(){return this.showOpacity()||this.hasTransparentButton()}hasTransparentButton(){return void 0!==this.transparentButton&&!0===this.transparentButton&&!this.showOpacity()}showOpacity(){return void 0!==this.opacity&&!0===this.opacity}renderPresetPalette(t){return(0,s.i)(t)&&!this.showOpacity()&&!this.hasOpacity(t)||(0,s.i)(t)&&this.showOpacity()}paletteExists(t,e){return-1!==e.findIndex((e=>e.toLowerCase()===t.toLowerCase()))}renderOpacityInput(){if(this.showOpacity())return(0,o.h)("div",{class:"input-container",style:{flexBasis:"70px"}},(0,o.h)("input",{type:"text",value:`${this.currentOpacity}`,onInput:this.handleOpacityInput}),(0,o.h)("div",{class:"input-label"},"%"))}buildPresetPalettes(){let t=this.palettes;if("string"==typeof this.palettes)try{t=JSON.parse(this.palettes)}catch(e){t=[]}void 0===t&&(t=[]),Array.isArray(t)||(t=[t]),this.palettesToDisplay=t.map((({label:t,palettes:e,count:i})=>({label:t,count:i,palettes:e.reduce(((t,e,i)=>{var o,r,n;const a="string"==typeof e&&(0,s.i)(e)?e:"string"==typeof e.color&&(0,s.i)(e.color)?e.color:null;return null!==a&&t.push({index:i,color:a,title:null!==(o=e.title)&&void 0!==o?o:null,description:null!==(r=e.description)&&void 0!==r?r:null,data:null!==(n=e.data)&&void 0!==n?n:null}),t}),[])})))}setColorFromPalette(t){this.setColorAndEmit(t),this.currentOpacity=n(this.currentColor.alpha),"preset"!==this.mode&&(this.colorPalette.setColor(this.currentColor.toHEXA().toString()),this.hueSlider.setHue(this.currentColor.hue),this.setOpacitySlider())}setHue(t){var e,i;null===(e=this.hueSlider)||void 0===e||e.setHue(t),null===(i=this.colorPalette)||void 0===i||i.setHue(t)}render(){return(0,o.h)(o.H,{class:`color-picker--${this.display}`},(0,o.h)("div",{class:"container"},"default"===this.mode?(0,o.h)("div",null,(0,o.h)("color-picker-color-palette",{display:this.display,color:this.currentColor.toHEX().toString(),onColorPaletteChange:this.colorPaletteChangeHandler,ref:t=>this.colorPalette=t}),(0,o.h)("color-picker-hue-slider",{display:this.display,hue:this.currentColor.hue,onHueChange:this.hueChangeHandler,ref:t=>this.hueSlider=t}),this.showOpacity()?(0,o.h)("color-picker-opacity-slider",{display:this.display,color:this.currentColor.toHEX().toString(),opacity:this.currentOpacity,ref:t=>this.opacitySlider=t}):"",(0,o.h)("div",{style:{width:"100%",maxWidth:"inline"===this.display?"100%":"200px",display:"flex",gap:"12px",marginTop:"16px"}},(0,o.h)("div",{class:"input-container"},(0,o.h)("input",{type:"text",maxlength:7,value:this.currentColor.toHEX().toString(),onInput:this.handleHexInput,onFocus:this.handleHexFocus}),(0,o.h)("div",{class:"input-label"},"Hex")),this.renderOpacityInput())):"",(0,o.h)("div",{ref:t=>this.palettesContainer=t},this.palettesToDisplay.map((({label:t,palettes:e,count:i},s)=>{let r=0;return t===this.recentColorsLabel&&(this.hasRecentColors=!0),(0,o.h)("div",null,(0,o.h)("h3",{class:"palettes-header",style:{marginTop:0===s&&"preset"===this.mode?"0":""}},t),(0,o.h)("div",{class:"palettes-container"},e.map((s=>{if(this.renderPresetPalette(s.color)&&r<this.getMaxPalettesToDisplay(i,e.length))return r++,(0,o.h)("div",{class:{palette__container:!0,"palette__container--active":this.currentColor.toHEX().toString().toLowerCase()===s.color.toLowerCase()}},(0,o.h)("span",{class:"checkerboard"}),(0,o.h)("span",{class:"palette","data-category":t,"data-index":s.index,"data-tip":h.buildToolTip(s),"data-color":s.color,style:{backgroundColor:s.color},onClick:this.setPresetPalette}))}))),(0,o.h)("div",null,e.length<=0&&"Brand Colours"===t?(0,o.h)("div",{class:"palettes-message"},(0,o.h)("rs-content",{style:{fontSize:"12px"}},"No brand colours have been added to your website yet"),(0,o.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")):""))}))),this.hasTransparentButton()?(0,o.h)("button",{class:"transparent-button",onClick:this.setTransparentButton},"Transparent",(0,o.h)("span",{class:"transparent-button__swatch"}," ")):""))}static buildToolTip(t){let e;return null!==t.title&&""!==t.title&&(e=`<h5 class="rs-tooltip__heading">${t.title}</h5>`),null!==t.description&&""!==t.description&&(e+=`<p class="rs-tooltip__caption">${t.description}</p>`),e}createToolTips(){var t,e;null===(e=null===(t=this.palettesContainer)||void 0===t?void 0:t.querySelectorAll(".palette"))||void 0===e||e.forEach((t=>{new l(t,{position:"horizontal",horizontalOffset:10})}))}getMaxPalettesToDisplay(t,e){return void 0===t?this.maxPresetDisplay:0===t?e:t}static get watchers(){return{palettes:["watchPalettes"]}}};h.style=':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}';class p{constructor(t){this.cache={x:0,y:0},this.clamp=t=>Math.max(Math.min(t,1),0),this.options=Object.assign(Object.assign({},p.DEFAULT_OPTIONS),t),this.tapStartBinding=this.tapstart.bind(this),this.tapStopBinding=this.tapstop.bind(this),this.tapMoveBinding=this.tapmove.bind(this),(0,r.o)([this.options.wrapper,this.options.element],"mousedown",this.tapStartBinding),(0,r.o)([this.options.wrapper,this.options.element],"touchstart",this.tapStartBinding,{passive:!1}),(0,r.o)(document,["keydown","keyup"],this.keyboard.bind(this))}keyboard(t){const{type:e,key:i}=t;if(document.activeElement===this.options.wrapper){const{lock:o}=this.options,s="ArrowUp"===i,r="ArrowRight"===i,n="ArrowDown"===i,a="ArrowLeft"===i;if("keydown"===e&&(s||r||n||a)){let e,i=0;"v"===o?e=s||r?1:-1:"h"===o?e=s||r?-1:1:(i=0,s?i=-1:n&&(i=1),e=0,a?e=-1:r&&(e=1)),this.update(this.clamp(this.cache.x+.01*e),this.clamp(this.cache.y+.01*i)),t.preventDefault()}else i.startsWith("Arrow")&&(this.options.onstop(),t.preventDefault())}}tapstart(t){this.wrapperBoundingClient=this.options.wrapper.getBoundingClientRect(),(0,r.o)(document,["mouseup","touchend","touchcancel"],this.tapStopBinding),(0,r.o)(document,["mousemove","touchmove"],this.tapMoveBinding),t.cancelable&&t.preventDefault();const e=new CustomEvent("start");this.options.element.dispatchEvent(e),this.tapmove(t)}tapmove(t){let e,i;if(t){const o=t&&t.touches&&t.touches[0];e=t?(o||t).clientX:0,i=t?(o||t).clientY:0,p.outsideLeftBounds(e,this.wrapperBoundingClient)?e=this.wrapperBoundingClient.left:p.outsideRightBounds(e,this.wrapperBoundingClient)&&(e=this.wrapperBoundingClient.left+this.wrapperBoundingClient.width),p.outsideTopBounds(i,this.wrapperBoundingClient)?i=this.wrapperBoundingClient.top:p.outsideBottomBounds(i,this.wrapperBoundingClient)&&(i=this.wrapperBoundingClient.top+this.wrapperBoundingClient.height),e-=this.wrapperBoundingClient.left,i-=this.wrapperBoundingClient.top}else e=this.cache.x*this.wrapperBoundingClient.width,i=this.cache.y*this.wrapperBoundingClient.height;"h"!==this.options.lock&&(this.options.element.style.left=e/this.wrapperBoundingClient.width*100+"%"),"v"!==this.options.lock&&(this.options.element.style.top=i/this.wrapperBoundingClient.height*100+"%"),this.cache={x:e/this.wrapperBoundingClient.width,y:i/this.wrapperBoundingClient.height};const o=this.clamp(this.cache.x),s=this.clamp(this.cache.y),r=new CustomEvent("change",{detail:{x:o,y:s}});this.options.element.dispatchEvent(r)}tapstop(){this.options.onstop(),(0,r.a)(document,["mouseup","touchend","touchcancel"],this.tapStopBinding),(0,r.a)(document,["mousemove","touchmove"],this.tapMoveBinding);const t=new CustomEvent("stop");this.options.element.dispatchEvent(t)}trigger(){this.tapmove(null)}update(t=0,e=0){const i=t;let o="h"===this.options.lock?i:e;const{left:s,top:r,width:n,height:a}=this.options.wrapper.getBoundingClientRect();this.tapmove({clientX:s+n*i,clientY:r+a*o})}destroy(){(0,r.a)(document,["keydown","keyup"],this.keyboard.bind(this)),(0,r.a)([this.options.wrapper,this.options.element],"mousedown",this.tapstart.bind(this)),(0,r.a)([this.options.wrapper,this.options.element],"touchstart",this.tapstart.bind(this),{passive:!1})}}p.DEFAULT_OPTIONS={lock:null,onchange:()=>0,onstop:()=>0},p.outsideBottomBounds=(t,e)=>t>e.top+e.height,p.outsideTopBounds=(t,e)=>t<e.top,p.outsideRightBounds=(t,e)=>t>e.left+e.width,p.outsideLeftBounds=(t,e)=>t<e.left;const c=class{constructor(t){(0,o.r)(this,t),this.colorPaletteChange=(0,o.c)(this,"colorPaletteChange",7),this.getPaletteBackgroundColor=()=>`\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 `,this.handleChange=t=>{const{x:e,y:i}=t.detail,o=100*e;let s=100-100*i;s<0&&(s=0),this.currentColor.saturation=o,this.currentColor.value=s,this.slider.style.background=this.currentColor.toRGB().toString(),this.colorPaletteChange.emit(this.currentColor)},this.sliderOffsetWidth=8,this.sliderOffsetHeight=8,this.sliderLeft=50,this.sliderTop=50,this.paletteBackgroundStyle=void 0,this.hue=0,this.display="default",this.color=void 0}componentWillLoad(){return this.setInternalColor(this.color),new Promise((t=>{if(null!==this.slider&&void 0!==this.slider){const t=this.slider.offsetWidth,e=this.slider.offsetHeight;isNaN(t)||(this.sliderOffsetWidth=t/2),isNaN(e)||(this.sliderOffsetHeight=this.slider.offsetHeight/2)}t()}))}componentDidLoad(){new p({element:this.slider,wrapper:this.palette})}async setHue(t){this.currentColor.hue=t,this.hue=t}async setColor(t){this.setInternalColor(t)}setInternalColor(t){this.currentColor=new s.H(...(0,s.p)(t).values),this.hue=this.currentColor.hue,this.sliderLeft=this.currentColor.saturation,this.sliderTop=100-this.currentColor.value}render(){return(0,o.h)("div",{class:{"color-selector":!0,[`color-selector--${this.display}`]:!0},ref:t=>this.palette=t,style:{background:this.getPaletteBackgroundColor()}},(0,o.h)("div",{class:"selector__pickr",style:{left:`${this.sliderLeft}%`,top:`${this.sliderTop}%`,background:this.currentColor.toRGB().toString()},onChange:this.handleChange,ref:t=>this.slider=t}))}};c.style=":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%}";const d=class{constructor(t){(0,o.r)(this,t),this.hueChange=(0,o.c)(this,"hueChange",7),this.handleChange=t=>{const e=360*t.detail.x;this.hueChange.emit(e),this.slider.style.backgroundColor=`hsl(${e}, 100%, 50%)`},this._hue=void 0,this.display="default",this.hue=void 0}async setHue(t){this._hue=t}componentWillLoad(){this._hue=this.hue}componentDidLoad(){new p({lock:"v",element:this.slider,wrapper:this.container})}render(){return(0,o.h)("div",{class:{"component-outer":!0,[`component-outer--${this.display}`]:!0},style:{"margin-top":"16px"},ref:t=>this.container=t},(0,o.h)("div",{class:"hue-selector component-selector"}),(0,o.h)("div",{class:"selector__pickr",style:{"margin-top":"-4px",left:this._hue/360*100+"%",background:`hsl(${this._hue}, 100%, 50%)`},onChange:this.handleChange,ref:t=>this.slider=t}))}};d.style=":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%)}";const u=class{constructor(t){(0,o.r)(this,t),this.opacityChange=(0,o.c)(this,"opacityChange",7),this.handleOpacityChange=t=>{this.currentColor.alpha=this.currentOpacity=t.detail.x,this.slider.style.background=this.currentColor.toRGBA().toString(),this.opacityChange.emit(this.currentOpacity)},this.currentRgb=void 0,this.currentOpacity=void 0,this.color="#000000",this.opacity=void 0,this.display="default"}watchOpacity(t){this.setInternalOpacity(t)}getOpacityAsPercent(){return this.currentOpacity<=1?100*this.currentOpacity:this.currentOpacity}async setColor(t){this.setInternalColor(t)}async setOpacity(t){this.setInternalOpacity(t)}componentDidLoad(){new p({lock:"v",element:this.slider,wrapper:this.container})}componentWillLoad(){this.setInternalOpacity(this.opacity),this.setInternalColor(this.color)}setInternalOpacity(t){const e=null!=t?t:100;this.currentOpacity=e>1?e/100:e}setInternalColor(t){this.currentColor=new s.H(...(0,s.p)(t).values),this.currentColor.alpha=this.currentOpacity,this.currentRgb=this.currentColor.toRGB()}render(){return(0,o.h)("div",{class:{"component-outer":!0,[`component-outer--${this.display}`]:!0},style:{"margin-top":"16px"},ref:t=>this.container=t},(0,o.h)("div",{class:"checker-board component-selector"}),(0,o.h)("div",{class:"component-selector",style:{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%)`}}),(0,o.h)("div",{class:"selector__pickr",style:{"margin-top":"-4px",left:`${this.getOpacityAsPercent()}%`,background:`rgba(${this.currentRgb[0]},${this.currentRgb[1]},${this.currentRgb[2]}, ${this.currentOpacity})`},onChange:this.handleOpacityChange,ref:t=>this.slider=t}))}static get watchers(){return{opacity:["watchOpacity"]}}};u.style=":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}"},4700:function(t,e,i){i.d(e,{S:function(){return a},a:function(){return n},f:function(){return o},o:function(){return r}});const o=()=>{const t=document.createElement("div");t.style.display="flex",t.style.flexDirection="column",t.style.rowGap="1px",t.appendChild(document.createElement("div")),t.appendChild(document.createElement("div")),document.body.appendChild(t);const e=1===t.scrollHeight;return t.parentNode.removeChild(t),e};function s(t,e,i,o,s={}){let r=e;Array.isArray(e)?r=Array.from(e):Array.isArray(e)||(r=[e]);let n=i;return Array.isArray(i)||(n=[i]),r.forEach((e=>{n.forEach((i=>{e[t](i,o,Object.assign({capture:!1},s))}))})),[e,i,o,s]}const r=s.bind(null,"addEventListener"),n=s.bind(null,"removeEventListener"),a=t=>{if(!t||"[object Function]"!==Object.prototype.toString.call(t))return;let e;window.addEventListener("scroll",(function(){window.clearTimeout(e),e=setTimeout((function(){t()}),66)}),!1)}}}]);
12
+ "use strict";(self.webpackChunkDomainChecker=self.webpackChunkDomainChecker||[]).push([[245],{825:function(t,e,i){i.d(e,{D:function(){return f},H:function(){return m},i:function(){return g},p:function(){return u}});const{min:o,max:s,floor:r,round:n}=Math;function a(t,e,i){const o=t/360*6,s=e/100,n=i/100,a=r(o),l=o-a,h=n*(1-s),c=n*(1-l*s),p=n*(1-(1-l)*s),d=a%6;return[255*[n,c,h,h,p,n][d],255*[p,n,n,c,h,h][d],255*[h,h,p,n,n,c][d]]}function l(t,e,i){return a(t,e,i).map((t=>n(t).toString(16).padStart(2,"0")))}function h(t,e,i){let o=e/100;const s=i/100,r=(2-o)*s/2;return 0!==r&&(o=1===r?0:r<.5?o*s/(2*r):o*s/(2-2*r)),[t,100*o,100*r]}function c(t,e,i){const r=t/255,n=e/255,a=i/255,l=o(r,n,a),h=s(r,n,a),c=h-l;let p,d;if(0===c)p=0,d=0;else{d=c/h;const t=((h-r)/6+c/2)/c,e=((h-n)/6+c/2)/c,i=((h-a)/6+c/2)/c;r===h?p=i-e:n===h?p=1/3+t-i:a===h&&(p=2/3+e-t),p<0?p+=1:p>1&&(p-=1)}return[360*p,100*d,100*h]}function p(t,e,i,s){const r=e/100,n=i/100,a=s/100;return[...c(255*(1-o(1,t/100*(1-a)+a)),255*(1-o(1,r*(1-a)+a)),255*(1-o(1,n*(1-a)+a)))]}function d(t,e,i){let o=e/100;const s=i/100;o*=s<.5?s:1-s;const r=2*o/(s+o)*100,n=100*(s+o);return[t,Number.isNaN(r)?0:r,n]}function u(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:i,match:o}=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 i=e[1].exec(t);return{type:e[0],regex:e[1],match:i}}return{type:null}}(e),s=t=>t.map((t=>/^(|\d+)\.\d+|\d+$/.test(t)?Number(t):void 0));if(null===i||null===o)return{values:null,type:"hexa"};const r=t=>t>=0&&t<=1&&(t=>!!o[2]==("number"==typeof t))(t);if("cmyk"===i){const[,t,e,r,n]=s(o);if(t&&e&&r&&n&&t<=100&&e<=100&&r<=100&&n<=100)return{values:p(t,e,r,n),type:i}}if("rgba"===i){const[,,,t,e,n,a]=s(o);if(void 0!==t&&void 0!==e&&void 0!==n&&void 0!==a&&t<=255&&e<=255&&n<=255&&r(a))return{values:[...c(t,e,n),a],alpha:a,type:i}}if("hexa"===i){let[,t]=o;4!==t.length&&3!==t.length||(t=t.split("").map((t=>t+t)).join(""));const e=t.substring(0,6);let s=t.substring(6);s=s?parseInt(s,16)/255:void 0;const r=function(t){const e=t.match(/.{2}/g);if(null!==e){const[t,i,o]=e.map((t=>Number.parseInt(t,16)));return c(t,i,o)}return null}(e);if(void 0!==r)return{values:[...r,s],alpha:s,type:i}}if("hsla"===i){const[,,,t,e,n,a]=s(o);if(t&&e&&n&&a&&t<=360&&e<=100&&n<=100&&a>=0&&a<=1&&r(a))return{values:[...d(t,e,n),a],alpha:a,type:i}}if("hsva"===i){const[,,,t,e,n,a]=s(o);if(t&&e&&n&&a&&t<=360&&e<=100&&n<=100&&a>=0&&a<=1&&r(a))return{values:[t,e,n,a],alpha:a,type:i}}return{values:null,type:"hexa"}}const g=t=>void 0!==t&&t.match(/^#?[\dA-Fa-f]{6,8}$/i),f="#7CA1FF";class m{constructor(t=0,e=0,i=0,o=1){this.mapper=(t,e)=>(i=-1)=>e(i>=0?t.map((t=>Number(t.toFixed(i)))):t),this.h=t,this.s=e,this.v=i,this.a=o>1?o/100:o}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=[...h(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=h(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,i){const s=a(t,e,i),r=s[0]/255,n=s[1]/255,l=s[2]/255,h=o(1-r,1-n,1-l);return[100*(1===h?0:(1-r-h)/(1-h)),100*(1===h?0:(1-n-h)/(1-h)),100*(1===h?0:(1-l-h)/(1-h)),100*h]}(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=l(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=l(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 m(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))+"%"}}},7245:function(t,e,i){i.r(e),i.d(e,{color_picker:function(){return h},color_picker_color_palette:function(){return p},color_picker_hue_slider:function(){return d},color_picker_opacity_slider:function(){return u}});var o=i(6919),s=i(825),r=i(9041);const n=t=>t<=1?Math.round(100*t):Math.round(t);const a=new class{constructor(){this.storage=new WeakMap}set(t,e,i){this.has(t,e)&&console.warn("Overwriting existing key:",e),this.storage.get(t)||this.storage.set(t,new Map),this.storage.get(t).set(e,i)}get(t,e){var i;return void 0!==this.storage.get(t)?this.storage.get(t).get(e):null!==(i=this.storage[e])&&void 0!==i?i:null}has(t,e){return void 0!==this.storage.get(t)&&this.storage.get(t).has(e)}delete(t,e){this.has(t,e)&&(this.storage.get(t).delete(e),0===this.storage.get(t).size&&this.storage.delete(t))}};class l{constructor(t,e={}){if(this.arrowOffset=10,this.isScrolling=!1,this.positionClasses=[],this.defaults={position:"horizontal",delayShow:1e3,delayHide:500,horizontalOffset:-5,verticalOffset:0},this.classNames={tooltip:"rs-tooltip",horizontal:"rs-tooltip--horizontal",vertical:"rs-tooltip--vertical",arrowBottom:"rs-tooltip--bottom",arrowLeft:"rs-tooltip--left",arrowRight:"rs-tooltip-right",arrowTop:"rs-tooltip--top",active:"rs-tooltip--active"},void 0!==t.dataset.tip&&""!==t.dataset.tip&&!a.has(t,"tooltip-loaded")){if(a.set(t,"tooltip-loaded",!0),"object"==typeof e&&(this.options=Object.assign(this.defaults,e)),"string"==typeof t&&(t=document.querySelector(t)),!(t instanceof Element||t instanceof Element||null===t))throw new Error(`You haven't passed through a DOM element, or the element can't be found: ${t}`);this.element=t,this.createStructure(),this.element.addEventListener("mouseenter",(()=>{let t=this.isVisible()?0:this.options.delayShow;const e=a.get(this.tooltipContainer,"tooltipHideTimeout");void 0!==e&&(clearTimeout(e),a.delete(this.tooltipContainer,"tooltipHideTimeout"));const i=a.get(this.tooltipContainer,"tooltipShowTimeout");void 0!==i&&(clearTimeout(i),a.delete(this.tooltipContainer,"tooltipShowTimeout"));const o=setTimeout((()=>{this.show()}),t);a.set(this.tooltipContainer,"showTimeout",o)})),this.element.addEventListener("mouseleave",(()=>{const t=setTimeout((()=>{this.hide(),a.delete(this.tooltipContainer,"tooltipHideTimeout")}),this.options.delayHide);a.set(this.tooltipContainer,"tooltipHideTimeout",t);const e=a.get(this.tooltipContainer,"showTimeout");void 0!==e&&(clearTimeout(e),a.delete(this.tooltipContainer,"showTimeout"))})),window.addEventListener("scroll",(()=>{this.isScrolling=!0,this.hide(!0),(0,r.S)((()=>{this.isScrolling=!1,window.addEventListener("scroll",(()=>{this.isScrolling=!0,this.hide(!0)}),{once:!0})}))}),{once:!0})}}createStructure(){null===document.querySelector("rs-tool-tip")?(this.tooltipContainer=document.createElement("rs-tool-tip"),this.tooltipContainer.classList.add(this.classNames.tooltip),document.body.append(this.tooltipContainer)):this.tooltipContainer=document.querySelector("rs-tool-tip")}show(){if(this.isScrolling)return;this.hide(),setTimeout((()=>{this.tooltipContainer.innerHTML=this.element.dataset.tip,this.setPosition(),this.tooltipContainer.classList.add(this.classNames.active)}),150)}setPosition(){let t,e;this.tooltipContainer.style.width=null,this.tooltipContainer.style.height=null;const i=this.element.getBoundingClientRect(),o=i.left,s=i.top,r=i.width,n=i.height,a=this.tooltipContainer.offsetWidth,l=this.tooltipContainer.offsetHeight,h=window.scrollY||document.documentElement.scrollTop;let c="left";"horizontal"===this.options.position?(c="right",window.innerWidth-o+r>a+20?c="right":o>a+20&&(c="left")):"vertical"===this.options.position&&(c="top",window.innerHeight-s+n>l+20?c="bottom":s>a+20&&(c="top")),this.positionClasses.push(this.classNames[`arrow${c.charAt(0).toUpperCase()+c.slice(1)}`]),"top"===c?(this.positionClasses.push(this.classNames.vertical),e=r/2+o-a/2+this.options.horizontalOffset,t=s+h-l-this.arrowOffset+this.options.verticalOffset):"bottom"===c?(this.positionClasses.push(this.classNames.vertical),e=r/2+o-a/2+this.options.horizontalOffset,t=s+h+n+this.arrowOffset+this.options.verticalOffset):"left"===c?(this.positionClasses.push(this.classNames.horizontal),e=o-a-this.arrowOffset+this.options.horizontalOffset,t=s+h+n/2-l/2+this.options.verticalOffset):"right"===c&&(this.positionClasses.push(this.classNames.horizontal),e=r+o+this.arrowOffset+this.options.horizontalOffset,t=s+h+n/2-l/2+this.options.verticalOffset);const{left:p}=window.getComputedStyle(document.body),d=void 0!==e?e-Number.parseInt(p):"auto";this.tooltipContainer.style.top=`${null!=t?t:"auto"}px`,this.tooltipContainer.style.right="autopx",this.tooltipContainer.style.bottom="autopx",this.tooltipContainer.style.left=`${d}px`,this.tooltipContainer.classList.add(...this.positionClasses),this.tooltipContainer.setAttribute("arrow",c)}hide(t=!1){const e=t?0:150;this.tooltipContainer.classList.remove(this.classNames.active),setTimeout((()=>{this.tooltipContainer.classList.remove(this.classNames.arrowBottom,this.classNames.arrowTop,this.classNames.arrowLeft,this.classNames.arrowRight),this.tooltipContainer.style.top=null,this.tooltipContainer.style.right=null,this.tooltipContainer.style.bottom=null,this.tooltipContainer.style.left=null}),e)}isVisible(){const t=window.getComputedStyle(this.tooltipContainer);return!(null===this.tooltipContainer.offsetParent||"0"===t.opacity)}}const h=class{constructor(t){(0,o.r)(this,t),this.colorChange=(0,o.c)(this,"colorChange",7),this.presetColorChoice=(0,o.c)(this,"presetColorChoice",7),this.hasRecentColors=!1,this.palettesToDisplay=[],this.opacity=!1,this.maxPresetDisplay=12,this.recentColorsLabel="Recent Colors",this.transparentButton=!1,this.display="default",this.mode="default",this.hueChangeHandler=t=>{this.hasTransparentButton()&&(this.currentOpacity=100,this.currentColor.alpha=this.currentOpacity),this.currentColor.hue=t.detail,this.setHue(t.detail),this.setColorAndEmit(this.currentColor.toHEXA().toString())},this.colorPaletteChangeHandler=t=>{var e;!this.hasTransparentButton()&&this.supportsOpacity()||(this.currentOpacity=100),null===(e=this.opacitySlider)||void 0===e||e.setColor(t.detail.toHEXA().toString()),t.detail.alpha=this.currentOpacity,this.setColorAndEmit(t.detail.toHEXA().toString())},this.handleOpacityInput=t=>{const e=isNaN(t.target.value)?0:t.target.value;this.currentOpacity=Math.max(Math.min(e,100),0),this.setColorAndEmit(this.currentColor.toHEXA().toString())},this.setPresetPalette=t=>{var e,i,o;const s=null!==(i=(null!==(e=this.palettesToDisplay.filter((e=>e.label===t.target.dataset.category))[0])&&void 0!==e?e:{palettes:[]}).palettes.filter((e=>e.index===Number.parseInt(t.target.dataset.index)))[0])&&void 0!==i?i:{};this.setColorFromPalette(t.target.dataset.color),this.presetColorChoice.emit({color:this.currentColor,data:null!==(o=s.data)&&void 0!==o?o:null})},this.handleHexInput=t=>{const e=t.target.value,i=e.startsWith("#")?e:`#${e}`;(0,s.i)(i)&&(this.setColorAndEmit(i),this.setHue(this.currentColor.hue))},this.handleHexFocus=t=>{t.target.select()},this.hasOpacity=t=>t.length>7,this.setTransparentButton=()=>{this.currentOpacity=0,this.currentColor.alpha=this.currentOpacity,this.setColorAndEmit(this.currentColor.toHEXA().toString())}}watchPalettes(){this.buildPresetPalettes()}componentWillLoad(){var t;this.setColorValue(null!==(t=this.color)&&void 0!==t?t:s.D),this.buildPresetPalettes()}componentDidRender(){this.createToolTips()}opacityChangeHandler(t){this.currentOpacity=n(t.detail),this.currentColor.alpha=this.currentOpacity,this.setColorAndEmit(this.currentColor.toHEXA().toString())}colorPickerAddRecentHandler(t){if(!this.hasRecentColors)return;const e=this.getPresetPaletteGroup(this.recentColorsLabel);this.paletteExists(t.detail.hex,e.palettes)||this.addToPreset(t.detail.hex,this.recentColorsLabel)}async setColor(t){this.setColorValue(t),await this.updateColorPickerControls()}async getColor(){return this.currentColor}async addToPreset(t,e){if(this.renderPresetPalette(t)){const i=JSON.parse(JSON.stringify(this.palettesToDisplay)),o=i.findIndex((t=>t.label===e));-1!==o?this.paletteExists(t,i[o].palettes)||i[o].palettes.unshift(t):i.push({label:e,palettes:[t]}),this.palettesToDisplay=i}}async updateColorPickerControls(){await this.colorPalette.setColor(this.currentColor.toHEXA().toString()),await this.hueSlider.setHue(this.currentColor.hue),this.setOpacitySlider()}getPresetPaletteGroup(t){const e=JSON.parse(JSON.stringify(this.palettesToDisplay)),i=e.findIndex((e=>e.label===t));return e[i]}setColorAndEmit(t){this.setColorValue(t),this.colorChange.emit(this.currentColor)}setColorValue(t){this.currentColor=new s.H(...(0,s.p)(t).values),this.hasTransparentButton()&&!this.showOpacity()&&this.currentColor.alpha<1?this.currentColor.alpha=0:(this.showOpacity()||(this.currentColor.alpha=100),this.currentOpacity=n(this.currentColor.alpha))}setOpacitySlider(){this.showOpacity()&&(this.opacitySlider.setColor(this.currentColor.toHEX().toString()),this.opacitySlider.setOpacity(this.currentColor.alpha))}supportsOpacity(){return this.showOpacity()||this.hasTransparentButton()}hasTransparentButton(){return void 0!==this.transparentButton&&!0===this.transparentButton&&!this.showOpacity()}showOpacity(){return void 0!==this.opacity&&!0===this.opacity}renderPresetPalette(t){return(0,s.i)(t)&&!this.showOpacity()&&!this.hasOpacity(t)||(0,s.i)(t)&&this.showOpacity()}paletteExists(t,e){return-1!==e.findIndex((e=>e.toLowerCase()===t.toLowerCase()))}renderOpacityInput(){if(this.showOpacity())return(0,o.h)("div",{class:"input-container",style:{flexBasis:"70px"}},(0,o.h)("input",{type:"text",value:`${this.currentOpacity}`,onInput:this.handleOpacityInput}),(0,o.h)("div",{class:"input-label"},"%"))}buildPresetPalettes(){let t=this.palettes;if("string"==typeof this.palettes)try{t=JSON.parse(this.palettes)}catch(e){t=[]}void 0===t&&(t=[]),Array.isArray(t)||(t=[t]),this.palettesToDisplay=t.map((({label:t,palettes:e,count:i})=>({label:t,count:i,palettes:e.reduce(((t,e,i)=>{var o,r,n;const a="string"==typeof e&&(0,s.i)(e)?e:"string"==typeof e.color&&(0,s.i)(e.color)?e.color:null;return null!==a&&t.push({index:i,color:a,title:null!==(o=e.title)&&void 0!==o?o:null,description:null!==(r=e.description)&&void 0!==r?r:null,data:null!==(n=e.data)&&void 0!==n?n:null}),t}),[])})))}setColorFromPalette(t){this.setColorAndEmit(t),this.currentOpacity=n(this.currentColor.alpha),"preset"!==this.mode&&(this.colorPalette.setColor(this.currentColor.toHEXA().toString()),this.hueSlider.setHue(this.currentColor.hue),this.setOpacitySlider())}setHue(t){var e,i;null===(e=this.hueSlider)||void 0===e||e.setHue(t),null===(i=this.colorPalette)||void 0===i||i.setHue(t)}render(){return(0,o.h)(o.H,{key:"43937d9520976b79be1f7a5154dd233d55ec76ae",class:`color-picker--${this.display}`},(0,o.h)("div",{key:"9824de5c98c9d6d59c3f993bf7340d9857078378",class:"container"},"default"===this.mode?(0,o.h)("div",null,(0,o.h)("color-picker-color-palette",{display:this.display,color:this.currentColor.toHEX().toString(),onColorPaletteChange:this.colorPaletteChangeHandler,ref:t=>this.colorPalette=t}),(0,o.h)("color-picker-hue-slider",{display:this.display,hue:this.currentColor.hue,onHueChange:this.hueChangeHandler,ref:t=>this.hueSlider=t}),this.showOpacity()?(0,o.h)("color-picker-opacity-slider",{display:this.display,color:this.currentColor.toHEX().toString(),opacity:this.currentOpacity,ref:t=>this.opacitySlider=t}):"",(0,o.h)("div",{style:{width:"100%",maxWidth:"inline"===this.display?"100%":"200px",display:"flex",gap:"12px",marginTop:"16px"}},(0,o.h)("div",{class:"input-container"},(0,o.h)("input",{type:"text",maxlength:7,value:this.currentColor.toHEX().toString(),onInput:this.handleHexInput,onFocus:this.handleHexFocus}),(0,o.h)("div",{class:"input-label"},"Hex")),this.renderOpacityInput())):"",(0,o.h)("div",{key:"d641498f69ddc3d1ec259303a9014824c476741c",ref:t=>this.palettesContainer=t},this.palettesToDisplay.map((({label:t,palettes:e,count:i},s)=>{let r=0;return t===this.recentColorsLabel&&(this.hasRecentColors=!0),(0,o.h)("div",null,(0,o.h)("h3",{class:"palettes-header",style:{marginTop:0===s&&"preset"===this.mode?"0":""}},t),(0,o.h)("div",{class:"palettes-container"},e.map((s=>{if(this.renderPresetPalette(s.color)&&r<this.getMaxPalettesToDisplay(i,e.length))return r++,(0,o.h)("div",{class:{palette__container:!0,"palette__container--active":this.currentColor.toHEX().toString().toLowerCase()===s.color.toLowerCase()}},(0,o.h)("span",{class:"checkerboard"}),(0,o.h)("span",{class:"palette","data-category":t,"data-index":s.index,"data-tip":h.buildToolTip(s),"data-color":s.color,style:{backgroundColor:s.color},onClick:this.setPresetPalette}))}))),(0,o.h)("div",null,e.length<=0&&"Brand Colours"===t?(0,o.h)("div",{class:"palettes-message"},(0,o.h)("rs-content",{style:{fontSize:"12px"}},"No brand colours have been added to your website yet"),(0,o.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")):""))}))),this.hasTransparentButton()?(0,o.h)("button",{class:"transparent-button",onClick:this.setTransparentButton},"Transparent",(0,o.h)("span",{class:"transparent-button__swatch"}," ")):""))}static buildToolTip(t){let e;return null!==t.title&&""!==t.title&&(e=`<h5 class="rs-tooltip__heading">${t.title}</h5>`),null!==t.description&&""!==t.description&&(e+=`<p class="rs-tooltip__caption">${t.description}</p>`),e}createToolTips(){var t,e;null===(e=null===(t=this.palettesContainer)||void 0===t?void 0:t.querySelectorAll(".palette"))||void 0===e||e.forEach((t=>{new l(t,{position:"horizontal",horizontalOffset:10})}))}getMaxPalettesToDisplay(t,e){return void 0===t?this.maxPresetDisplay:0===t?e:t}static get watchers(){return{palettes:["watchPalettes"]}}};h.style=':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}';class c{constructor(t){this.cache={x:0,y:0},this.clamp=t=>Math.max(Math.min(t,1),0),this.options=Object.assign(Object.assign({},c.DEFAULT_OPTIONS),t),this.tapStartBinding=this.tapstart.bind(this),this.tapStopBinding=this.tapstop.bind(this),this.tapMoveBinding=this.tapmove.bind(this),(0,r.o)([this.options.wrapper,this.options.element],"mousedown",this.tapStartBinding),(0,r.o)([this.options.wrapper,this.options.element],"touchstart",this.tapStartBinding,{passive:!1}),(0,r.o)(document,["keydown","keyup"],this.keyboard.bind(this))}keyboard(t){const{type:e,key:i}=t;if(document.activeElement===this.options.wrapper){const{lock:o}=this.options,s="ArrowUp"===i,r="ArrowRight"===i,n="ArrowDown"===i,a="ArrowLeft"===i;if("keydown"===e&&(s||r||n||a)){let e,i=0;"v"===o?e=s||r?1:-1:"h"===o?e=s||r?-1:1:(i=0,s?i=-1:n&&(i=1),e=0,a?e=-1:r&&(e=1)),this.update(this.clamp(this.cache.x+.01*e),this.clamp(this.cache.y+.01*i)),t.preventDefault()}else i.startsWith("Arrow")&&(this.options.onstop(),t.preventDefault())}}tapstart(t){this.wrapperBoundingClient=this.options.wrapper.getBoundingClientRect(),(0,r.o)(document,["mouseup","touchend","touchcancel"],this.tapStopBinding),(0,r.o)(document,["mousemove","touchmove"],this.tapMoveBinding),t.cancelable&&t.preventDefault();const e=new CustomEvent("start");this.options.element.dispatchEvent(e),this.tapmove(t)}tapmove(t){let e,i;if(t){const o=t&&t.touches&&t.touches[0];e=t?(o||t).clientX:0,i=t?(o||t).clientY:0,c.outsideLeftBounds(e,this.wrapperBoundingClient)?e=this.wrapperBoundingClient.left:c.outsideRightBounds(e,this.wrapperBoundingClient)&&(e=this.wrapperBoundingClient.left+this.wrapperBoundingClient.width),c.outsideTopBounds(i,this.wrapperBoundingClient)?i=this.wrapperBoundingClient.top:c.outsideBottomBounds(i,this.wrapperBoundingClient)&&(i=this.wrapperBoundingClient.top+this.wrapperBoundingClient.height),e-=this.wrapperBoundingClient.left,i-=this.wrapperBoundingClient.top}else e=this.cache.x*this.wrapperBoundingClient.width,i=this.cache.y*this.wrapperBoundingClient.height;"h"!==this.options.lock&&(this.options.element.style.left=e/this.wrapperBoundingClient.width*100+"%"),"v"!==this.options.lock&&(this.options.element.style.top=i/this.wrapperBoundingClient.height*100+"%"),this.cache={x:e/this.wrapperBoundingClient.width,y:i/this.wrapperBoundingClient.height};const o=this.clamp(this.cache.x),s=this.clamp(this.cache.y),r=new CustomEvent("change",{detail:{x:o,y:s}});this.options.element.dispatchEvent(r)}tapstop(){this.options.onstop(),(0,r.a)(document,["mouseup","touchend","touchcancel"],this.tapStopBinding),(0,r.a)(document,["mousemove","touchmove"],this.tapMoveBinding);const t=new CustomEvent("stop");this.options.element.dispatchEvent(t)}trigger(){this.tapmove(null)}update(t=0,e=0){const i=t;let o="h"===this.options.lock?i:e;const{left:s,top:r,width:n,height:a}=this.options.wrapper.getBoundingClientRect();this.tapmove({clientX:s+n*i,clientY:r+a*o})}destroy(){(0,r.a)(document,["keydown","keyup"],this.keyboard.bind(this)),(0,r.a)([this.options.wrapper,this.options.element],"mousedown",this.tapstart.bind(this)),(0,r.a)([this.options.wrapper,this.options.element],"touchstart",this.tapstart.bind(this),{passive:!1})}}c.DEFAULT_OPTIONS={lock:null,onchange:()=>0,onstop:()=>0},c.outsideBottomBounds=(t,e)=>t>e.top+e.height,c.outsideTopBounds=(t,e)=>t<e.top,c.outsideRightBounds=(t,e)=>t>e.left+e.width,c.outsideLeftBounds=(t,e)=>t<e.left;const p=class{constructor(t){(0,o.r)(this,t),this.colorPaletteChange=(0,o.c)(this,"colorPaletteChange",7),this.sliderOffsetWidth=8,this.sliderOffsetHeight=8,this.sliderLeft=50,this.sliderTop=50,this.hue=0,this.display="default",this.getPaletteBackgroundColor=()=>`\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 `,this.handleChange=t=>{const{x:e,y:i}=t.detail,o=100*e;let s=100-100*i;s<0&&(s=0),this.currentColor.saturation=o,this.currentColor.value=s,this.slider.style.background=this.currentColor.toRGB().toString(),this.colorPaletteChange.emit(this.currentColor)}}componentWillLoad(){return this.setInternalColor(this.color),new Promise((t=>{if(null!==this.slider&&void 0!==this.slider){const t=this.slider.offsetWidth,e=this.slider.offsetHeight;isNaN(t)||(this.sliderOffsetWidth=t/2),isNaN(e)||(this.sliderOffsetHeight=this.slider.offsetHeight/2)}t()}))}componentDidLoad(){new c({element:this.slider,wrapper:this.palette})}async setHue(t){this.currentColor.hue=t,this.hue=t}async setColor(t){this.setInternalColor(t)}setInternalColor(t){this.currentColor=new s.H(...(0,s.p)(t).values),this.hue=this.currentColor.hue,this.sliderLeft=this.currentColor.saturation,this.sliderTop=100-this.currentColor.value}render(){return(0,o.h)("div",{key:"f5728b33ac7593a22cbdee208e337e2cb087e7a5",class:{"color-selector":!0,[`color-selector--${this.display}`]:!0},ref:t=>this.palette=t,style:{background:this.getPaletteBackgroundColor()}},(0,o.h)("div",{key:"84f243bd113623ba09520d73617ae1e98a4e3a7e",class:"selector__pickr",style:{left:`${this.sliderLeft}%`,top:`${this.sliderTop}%`,background:this.currentColor.toRGB().toString()},onChange:this.handleChange,ref:t=>this.slider=t}))}};p.style=":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%}";const d=class{constructor(t){(0,o.r)(this,t),this.hueChange=(0,o.c)(this,"hueChange",7),this.display="default",this.handleChange=t=>{const e=360*t.detail.x;this.hueChange.emit(e),this.slider.style.backgroundColor=`hsl(${e}, 100%, 50%)`}}async setHue(t){this._hue=t}componentWillLoad(){this._hue=this.hue}componentDidLoad(){new c({lock:"v",element:this.slider,wrapper:this.container})}render(){return(0,o.h)("div",{key:"aae99fa8a86c2544569e0c6caf9f3f23c46ab8d1",class:{"component-outer":!0,[`component-outer--${this.display}`]:!0},style:{"margin-top":"16px"},ref:t=>this.container=t},(0,o.h)("div",{key:"dce858da0afe98d2244a75f649313c0f77b26ba3",class:"hue-selector component-selector"}),(0,o.h)("div",{key:"16f08a19d0ff39ac5f3d186f4e25784f138d0f50",class:"selector__pickr",style:{"margin-top":"-4px",left:this._hue/360*100+"%",background:`hsl(${this._hue}, 100%, 50%)`},onChange:this.handleChange,ref:t=>this.slider=t}))}};d.style=":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%)}";const u=class{constructor(t){(0,o.r)(this,t),this.opacityChange=(0,o.c)(this,"opacityChange",7),this.color="#000000",this.display="default",this.handleOpacityChange=t=>{this.currentColor.alpha=this.currentOpacity=t.detail.x,this.slider.style.background=this.currentColor.toRGBA().toString(),this.opacityChange.emit(this.currentOpacity)}}watchOpacity(t){this.setInternalOpacity(t)}getOpacityAsPercent(){return this.currentOpacity<=1?100*this.currentOpacity:this.currentOpacity}async setColor(t){this.setInternalColor(t)}async setOpacity(t){this.setInternalOpacity(t)}componentDidLoad(){new c({lock:"v",element:this.slider,wrapper:this.container})}componentWillLoad(){this.setInternalOpacity(this.opacity),this.setInternalColor(this.color)}setInternalOpacity(t){const e=null!=t?t:100;this.currentOpacity=e>1?e/100:e}setInternalColor(t){this.currentColor=new s.H(...(0,s.p)(t).values),this.currentColor.alpha=this.currentOpacity,this.currentRgb=this.currentColor.toRGB()}render(){return(0,o.h)("div",{key:"8b5daccc6b2b77ddcd15dca8632f8f68be57fc0a",class:{"component-outer":!0,[`component-outer--${this.display}`]:!0},style:{"margin-top":"16px"},ref:t=>this.container=t},(0,o.h)("div",{key:"5399198da6828d72cc5b9af4ac0a064891ac9864",class:"checker-board component-selector"}),(0,o.h)("div",{key:"31e20b5c45c2bf2537d93d199620056b12c68085",class:"component-selector",style:{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%)`}}),(0,o.h)("div",{key:"bff7d5f16d7cb26f9657b6e716f0ebb40ecf990c",class:"selector__pickr",style:{"margin-top":"-4px",left:`${this.getOpacityAsPercent()}%`,background:`rgba(${this.currentRgb[0]},${this.currentRgb[1]},${this.currentRgb[2]}, ${this.currentOpacity})`},onChange:this.handleOpacityChange,ref:t=>this.slider=t}))}static get watchers(){return{opacity:["watchOpacity"]}}};u.style=":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}"},9041:function(t,e,i){i.d(e,{S:function(){return a},a:function(){return n},f:function(){return o},o:function(){return r}});const o=()=>{const t=document.createElement("div");t.style.display="flex",t.style.flexDirection="column",t.style.rowGap="1px",t.appendChild(document.createElement("div")),t.appendChild(document.createElement("div")),document.body.appendChild(t);const e=1===t.scrollHeight;return t.parentNode.removeChild(t),e};function s(t,e,i,o,s={}){let r=e;Array.isArray(e)?r=Array.from(e):Array.isArray(e)||(r=[e]);let n=i;return Array.isArray(i)||(n=[i]),r.forEach((e=>{n.forEach((i=>{e[t](i,o,Object.assign({capture:!1},s))}))})),[e,i,o,s]}const r=s.bind(null,"addEventListener"),n=s.bind(null,"removeEventListener"),a=t=>{if(!t||"[object Function]"!==Object.prototype.toString.call(t))return;let e;window.addEventListener("scroll",(function(){window.clearTimeout(e),e=setTimeout((function(){t()}),66)}),!1)}}}]);
13
13
  //# sourceMappingURL=245.index.js.map