@thednp/color-picker 1.0.1 → 2.0.0-alpha2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. package/.eslintrc.cjs +199 -0
  2. package/.lgtm.yml +9 -0
  3. package/.prettierrc.json +15 -0
  4. package/.stylelintrc.json +236 -0
  5. package/LICENSE +0 -0
  6. package/README.md +55 -72
  7. package/compile.js +48 -0
  8. package/cypress/e2e/color-palette.cy.ts +128 -0
  9. package/cypress/e2e/color-picker.cy.ts +920 -0
  10. package/cypress/fixtures/colorNamesFrench.js +3 -0
  11. package/cypress/fixtures/componentLabelsFrench.js +21 -0
  12. package/cypress/fixtures/format.js +3 -0
  13. package/cypress/fixtures/getCEMarkup.js +29 -0
  14. package/cypress/fixtures/getMarkup.js +28 -0
  15. package/cypress/fixtures/getRandomInt.js +6 -0
  16. package/cypress/fixtures/sampleWebcolors.js +18 -0
  17. package/cypress/fixtures/testSample.js +8 -0
  18. package/cypress/plugins/esbuild-istanbul.ts +50 -0
  19. package/cypress/plugins/tsCompile.ts +34 -0
  20. package/cypress/support/commands.ts +0 -0
  21. package/cypress/support/e2e.ts +21 -0
  22. package/cypress/test.html +23 -0
  23. package/cypress.config.ts +29 -0
  24. package/dist/css/color-picker.css +16 -40
  25. package/dist/css/color-picker.min.css +2 -2
  26. package/dist/css/color-picker.rtl.css +16 -40
  27. package/dist/css/color-picker.rtl.min.css +2 -2
  28. package/dist/js/color-picker.cjs +8 -0
  29. package/dist/js/color-picker.cjs.map +1 -0
  30. package/dist/js/color-picker.d.ts +278 -0
  31. package/dist/js/color-picker.js +5 -3570
  32. package/dist/js/color-picker.js.map +1 -0
  33. package/dist/js/color-picker.mjs +2631 -0
  34. package/dist/js/color-picker.mjs.map +1 -0
  35. package/dts.config.ts +15 -0
  36. package/package.json +64 -74
  37. package/src/scss/_variables.scss +0 -1
  38. package/src/scss/color-picker.rtl.scss +4 -0
  39. package/src/scss/color-picker.scss +80 -40
  40. package/src/ts/colorPalette.ts +89 -0
  41. package/src/{js/color-picker.js → ts/index.ts} +489 -486
  42. package/src/ts/interface/colorPickerLabels.ts +20 -0
  43. package/src/ts/interface/colorPickerOptions.ts +11 -0
  44. package/src/ts/interface/paletteOptions.ts +6 -0
  45. package/src/ts/util/colorNames.ts +21 -0
  46. package/src/{js/util/colorPickerLabels.js → ts/util/colorPickerLabels.ts} +4 -2
  47. package/src/ts/util/getColorControls.ts +90 -0
  48. package/src/{js/util/getColorForm.js → ts/util/getColorForm.ts} +28 -18
  49. package/src/{js/util/getColorMenu.js → ts/util/getColorMenu.ts} +21 -30
  50. package/src/ts/util/isValidJSON.ts +19 -0
  51. package/src/{js/util/setMarkup.js → ts/util/setMarkup.ts} +57 -48
  52. package/src/{js/util/vHidden.js → ts/util/vHidden.ts} +0 -0
  53. package/tsconfig.json +29 -0
  54. package/vite.config.ts +34 -0
  55. package/dist/js/color-esm.js +0 -1164
  56. package/dist/js/color-esm.min.js +0 -2
  57. package/dist/js/color-palette-esm.js +0 -1235
  58. package/dist/js/color-palette-esm.min.js +0 -2
  59. package/dist/js/color-palette.js +0 -1243
  60. package/dist/js/color-palette.min.js +0 -2
  61. package/dist/js/color-picker-element-esm.js +0 -3718
  62. package/dist/js/color-picker-element-esm.min.js +0 -2
  63. package/dist/js/color-picker-element.js +0 -3726
  64. package/dist/js/color-picker-element.min.js +0 -2
  65. package/dist/js/color-picker-esm.js +0 -3565
  66. package/dist/js/color-picker-esm.min.js +0 -2
  67. package/dist/js/color-picker.min.js +0 -2
  68. package/dist/js/color.js +0 -1172
  69. package/dist/js/color.min.js +0 -2
  70. package/src/js/color-palette.js +0 -75
  71. package/src/js/color-picker-element.js +0 -107
  72. package/src/js/color.js +0 -1104
  73. package/src/js/index.js +0 -8
  74. package/src/js/util/colorNames.js +0 -6
  75. package/src/js/util/getColorControls.js +0 -103
  76. package/src/js/util/isValidJSON.js +0 -13
  77. package/src/js/util/nonColors.js +0 -5
  78. package/src/js/util/roundPart.js +0 -9
  79. package/src/js/util/setCSSProperties.js +0 -12
  80. package/src/js/util/tabindex.js +0 -3
  81. package/src/js/util/toggleCEAttr.js +0 -70
  82. package/src/js/util/version.js +0 -5
  83. package/src/js/version.js +0 -5
  84. package/types/cp.d.ts +0 -558
  85. package/types/index.d.ts +0 -44
  86. package/types/source/source.ts +0 -4
  87. package/types/source/types.d.ts +0 -92
@@ -1,2 +1,2 @@
1
- /* ColorPicker RTL v1.0.1 | thednp © 2022 | MIT-License */
2
- color-picker,.color-picker{position:relative;display:flex;--white-15: rgba(255, 255, 255, 0.15);--white-25: rgba(255, 255, 255, 0.25);--white-33: rgba(255, 255, 255, 0.33);--white-50: rgba(255, 255, 255, 0.5);--white-75: rgba(255, 255, 255, 0.75);--white-90: rgba(255, 255, 255, 0.9);--black-15: rgba(0, 0, 0, 0.15);--black-25: rgba(0, 0, 0, 0.25);--black-33: rgba(0, 0, 0, 0.33);--black-50: rgba(0, 0, 0, 0.5);--black-75: rgba(0, 0, 0, 0.75);--black-90: rgba(0, 0, 0, 0.9);--dropdown-transition: transform 0.33s ease, opacity 0.33s ease;--btn-transition: box-shadow 0.33s ease, border 0.33s ease;--options-transition: height 0.33s ease;--dropdown-bg: var(--black-75);--dropdown-color: var(--white-75);--dropdown-shadow: 0 6px 12px var(--black-33);--dropdown-scrollbar-bg: var(--white-33);--dropdown-scrollbar-bg-hover: var(--white-50);--knob-bg: #000;--knob-border: 1px solid var(--white-90);--knob-shadow-hover: 0 0 0 6px var(--white-50);--knob-shadow-active: 0 0 0 6px var(--white-90);--input-border: 1px solid var(--white-15);--input-border-hover: 1px solid var(--white-33);--input-bg-hover: var(--black-15);--option-color-hover: var(--black-75);--option-bg-hover: var(--white-50);--option-color-active: var(--black-75);--option-bg-active: var(--white-90);--visual-shadow: 0 0 0 1px var(--white-15) inset}color-picker:focus,.color-picker:focus{outline:none}.color-dropdown{position:absolute;z-index:50;display:none;flex-direction:column;width:min-content;padding:.5rem;color:var(--dropdown-color);background:var(--dropdown-bg);border-radius:.5rem;box-shadow:var(--dropdown-shadow);opacity:0;transition:var(--dropdown-transition)}.color-dropdown.picker{left:0}.color-dropdown.menu{right:0}.open .color-dropdown.top{top:auto;bottom:100%}.color-dropdown.bottom{top:100%}.open .color-dropdown.top,.open .color-dropdown.bottom{display:flex}.color-dropdown.show{opacity:1}.color-dropdown.show.top{transform:translate(0, -5px)}.color-dropdown.show.bottom{transform:translate(0, 5px)}.color-controls{display:none;flex-wrap:wrap;justify-content:space-between;width:max-content}.btn-appearance{width:100%;height:1.5rem;padding:.6rem 1rem;font-size:1rem;line-height:1.5;border:0;border-radius:.25rem;outline:none;appearance:none;transition:var(--btn-transition)}.btn-appearance:focus,.btn-appearance:hover{box-shadow:0 0 0 3px var(--black-15)}.color-preview{box-shadow:0 0 0 1px rgba(120,120,120,.33) inset;direction:ltr}.txt-dark .color-preview{color:var(--white-75)}.txt-dark .color-preview:focus{box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--black-15)}.txt-dark .color-preview::placeholder{color:var(--white-50)}.txt-light .color-preview{color:var(--black-75)}.txt-light .color-preview:focus{color:var(--black-75);box-shadow:0 0 0 1px #000 inset,0 0 0 3px var(--black-15)}.txt-light .color-preview::placeholder{color:var(--black-50)}.picker-toggle{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0);border:0}.open .picker-toggle{z-index:-1}.menu-toggle{position:absolute;top:0;right:0;display:flex;width:3rem;height:100%;padding:0 .25rem;cursor:pointer;border:0;border-radius:0 .25rem .25rem 0}.txt-light .menu-toggle{background:var(--black-50)}.txt-light .menu-toggle:focus,.txt-light .menu-toggle:focus{background:var(--black-75)}.txt-dark .menu-toggle{background:var(--white-33)}.txt-dark .menu-toggle:focus,.txt-dark .menu-toggle:focus{background:var(--white-50)}.menu-toggle svg{width:auto;height:100%}.scrollable{overflow-x:hidden;overflow-y:auto;scrollbar-width:thin}.scrollable::-webkit-scrollbar{width:.5rem}.scrollable::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.scrollable::-webkit-scrollbar-thumb{width:.5rem;background-color:rgba(0,0,0,0);background-clip:content-box;border:0}.scrollable:hover::-webkit-scrollbar-thumb{background-color:var(--dropdown-scrollbar-bg)}.scrollable::-webkit-scrollbar-thumb:hover{background-color:var(--dropdown-scrollbar-bg-hover)}.color-defaults{display:none;flex-wrap:wrap;flex-flow:column;margin:0;list-style:none;padding-inline:0}.color-dropdown.menu .color-defaults,.color-dropdown.picker .color-controls{display:flex}.color-dropdown.menu{max-height:230px}.color-defaults .color-option{padding:.25rem .5rem;color:inherit}.color-option{cursor:pointer}.color-defaults .color-option:focus,.color-defaults .color-option:hover{color:var(--option-color-hover);background:var(--option-bg-hover);outline:none}.color-defaults .color-option:active,.color-defaults .color-option.active{color:var(--option-color-active);background:var(--option-bg-active)}.color-options{--grid-item-size: 2rem;--grid-fit: 5;--grid-gap: .25rem;--grid-height: auto;--grid-hover-height: auto;display:grid;padding:0;margin:0;list-style:none;grid-template-columns:repeat(var(--grid-fit), var(--grid-item-size));grid-template-rows:repeat(auto-fill, var(--grid-item-size));gap:var(--grid-gap)}.color-options.scrollable{height:var(--grid-height);margin:0 -0.5rem 0 0;overflow-y:scroll;transition:var(--options-transition)}.color-options.scrollable:hover{height:var(--grid-hover-height)}.color-options+.color-defaults{margin-top:.25rem}.multiline+.color-defaults{flex-direction:row;flex-wrap:wrap}.multiline+.color-defaults .color-option{padding:.25rem .33rem;font-size:12px}.color-options .color-option{position:relative;width:var(--grid-item-size);height:var(--grid-item-size);overflow:hidden;text-indent:2.1rem}.color-options .color-option:active,.color-options .color-option:focus{outline:none}.color-options .color-option::before{position:absolute;top:0;right:0;bottom:0;left:0}.color-options .color-option:hover::before,.color-options .color-option:active::before,.color-options .color-option:focus::before{content:"";border:3px solid var(--white-75);mix-blend-mode:difference}.color-options .color-option:active,.color-options .color-option:focus{box-shadow:0 0 0 4px rgba(125,125,125,.75) inset}.color-options .color-option.active:after{position:absolute;top:50%;left:50%;width:4px;height:4px;margin:-2px 0 0 -2px;content:"";border-radius:4px}.txt-dark .color-options .color-option.active:after{box-shadow:0 0 0 4px var(--white-90)}.txt-light .color-options .color-option.active:after{box-shadow:0 0 0 4px var(--black-90)}.color-form{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;padding:.25rem 0 0;font:12px sans-serif}.color-form.hex{max-width:initial}.color-form>*{flex:1 0 0%;width:17.5%;max-width:17.5%}.color-form label{width:7.5%;max-width:7.5%;text-align:center}.color-input{color:inherit;text-align:right;background:rgba(0,0,0,0);border:var(--input-border);outline:none}.color-input.hex{width:92.5%;max-width:92.5%}.color-input:active,.color-input:focus{background:var(--input-bg-hover);border:var(--input-border-hover)}.visual-control{height:150px;touch-action:none;box-shadow:var(--visual-shadow)}.visual-control1{width:150px}.visual-control2,.visual-control3{width:21px;cursor:ns-resize}@media(min-width: 578px){.visual-control{height:230px}.visual-control1{width:230px}}@media(min-width: 1200px){.visual-control{height:300px}.visual-control1{width:300px}}.color-control{position:relative;display:inline-block}.color-slider{left:0;width:calc(100% - 2px);cursor:ns-resize}.color-control+.color-control{margin-left:.5rem}.knob{position:absolute;top:0;left:0;height:7px;touch-action:none;user-select:none;background-color:var(--knob-bg);border:var(--knob-border);border-radius:5px;outline:none;will-change:transform}.knob:hover{box-shadow:var(--knob-shadow-hover)}.knob:focus,.knob:active{z-index:1;box-shadow:var(--knob-shadow-active)}.color-pointer{width:7px;background-color:rgba(0,0,0,0);border:0}.txt-dark .color-pointer{box-shadow:0 0 0 5px var(--white-50)}.txt-light .color-pointer{box-shadow:0 0 0 5px var(--black-50)}.txt-dark .color-pointer:hover{box-shadow:0 0 0 5px var(--white-75)}.txt-light .color-pointer:hover{box-shadow:0 0 0 5px var(--black-75)}.txt-dark .color-pointer:focus,.txt-dark .color-pointer:active{box-shadow:0 0 0 5px var(--white-90)}.txt-light .color-pointer:focus,.txt-light .color-pointer:active{box-shadow:0 0 0 5px var(--black-90)}.v-hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}[dir=rtl] .color-preview{text-align:right}[dir=rtl] .menu-toggle{right:auto;left:0;border-radius:.25rem 0 0 .25rem}[dir=rtl] .color-dropdown.picker{right:0;left:auto}[dir=rtl] .color-dropdown.menu{right:auto;left:0}[dir=rtl] .color-control+.color-control{margin-right:.5rem;margin-left:0}[dir=rtl] .color-options.scrollable{margin:0 0 0 -0.5rem}
1
+ /* ColorPicker RTL v2.0.0-alpha2 | thednp © 2023 | MIT-License */
2
+ .color-picker{position:relative;display:flex;--white-15: rgba(255, 255, 255, 0.15);--white-25: rgba(255, 255, 255, 0.25);--white-33: rgba(255, 255, 255, 0.33);--white-50: rgba(255, 255, 255, 0.5);--white-75: rgba(255, 255, 255, 0.75);--white-90: rgba(255, 255, 255, 0.9);--black-15: rgba(0, 0, 0, 0.15);--black-25: rgba(0, 0, 0, 0.25);--black-33: rgba(0, 0, 0, 0.33);--black-50: rgba(0, 0, 0, 0.5);--black-75: rgba(0, 0, 0, 0.75);--black-90: rgba(0, 0, 0, 0.9);--dropdown-transition: transform 0.33s ease, opacity 0.33s ease;--btn-transition: box-shadow 0.33s ease, border 0.33s ease;--options-transition: height 0.33s ease;--dropdown-bg: var(--black-75);--dropdown-color: var(--white-75);--dropdown-shadow: 0 6px 12px var(--black-33);--dropdown-scrollbar-bg: var(--white-33);--dropdown-scrollbar-bg-hover: var(--white-50);--knob-bg: #000;--knob-border: 1px solid var(--white-90);--knob-shadow-hover: 0 0 0 6px var(--white-50);--knob-shadow-active: 0 0 0 6px var(--white-90);--input-border: 1px solid var(--white-15);--input-border-hover: 1px solid var(--white-33);--input-bg-hover: var(--black-15);--option-color-hover: var(--black-75);--option-bg-hover: var(--white-50);--option-color-active: var(--black-75);--option-bg-active: var(--white-90);--visual-shadow: 0 0 0 1px var(--white-15) inset}.color-picker:focus{outline:none}.color-dropdown{position:absolute;z-index:50;display:none;flex-direction:column;width:min-content;padding:.5rem;color:var(--dropdown-color);background:var(--dropdown-bg);border-radius:.5rem;box-shadow:var(--dropdown-shadow);opacity:0;transition:var(--dropdown-transition)}.color-dropdown.picker{left:0}.color-dropdown.menu{right:0;max-height:230px}.open .color-dropdown.top{top:auto;bottom:100%}.color-dropdown.bottom{top:100%}.open .color-dropdown.top,.open .color-dropdown.bottom{display:flex}.color-dropdown.show{opacity:1}.color-dropdown.show.top{transform:translate(0, -5px)}.color-dropdown.show.bottom{transform:translate(0, 5px)}.color-controls{display:none;flex-wrap:wrap;justify-content:space-between;width:max-content}.btn-appearance{width:100%;height:1.5rem;padding:.6rem 1rem;font-size:1rem;line-height:1.5;border:0;border-radius:.25rem;outline:none;appearance:none;transition:var(--btn-transition)}.btn-appearance:focus,.btn-appearance:hover{box-shadow:0 0 0 3px var(--black-15)}.color-preview{box-shadow:0 0 0 1px rgba(120,120,120,.33) inset;direction:ltr}.txt-dark .color-preview{color:var(--white-75)}.txt-dark .color-preview:focus{box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--black-15)}.txt-dark .color-preview::placeholder{color:var(--white-50)}.txt-light .color-preview{color:var(--black-75)}.txt-light .color-preview:focus{color:var(--black-75);box-shadow:0 0 0 1px #000 inset,0 0 0 3px var(--black-15)}.txt-light .color-preview::placeholder{color:var(--black-50)}.picker-toggle{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0);border:0}.open .picker-toggle{z-index:-1}.menu-toggle{position:absolute;top:0;right:0;display:flex;width:3rem;height:100%;padding:0 .25rem;cursor:pointer;border:0;border-radius:0 .25rem .25rem 0}.txt-light .menu-toggle{background:var(--black-50)}.txt-light .menu-toggle:focus{background:var(--black-75)}.txt-dark .menu-toggle{background:var(--white-33)}.txt-dark .menu-toggle:focus{background:var(--white-50)}.menu-toggle svg{width:auto;height:100%}.scrollable{overflow-x:hidden;overflow-y:auto;scrollbar-width:thin}.scrollable::-webkit-scrollbar{width:.5rem}.scrollable::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.scrollable::-webkit-scrollbar-thumb{width:.5rem;background-color:rgba(0,0,0,0);background-clip:content-box;border:0}.scrollable:hover::-webkit-scrollbar-thumb{background-color:var(--dropdown-scrollbar-bg)}.scrollable::-webkit-scrollbar-thumb:hover{background-color:var(--dropdown-scrollbar-bg-hover)}.color-defaults{display:none;flex-flow:column wrap;margin:0;list-style:none;padding-inline:0}.color-dropdown.menu .color-defaults,.color-dropdown.picker .color-controls{display:flex}.color-defaults .color-option{padding:.25rem .5rem;color:inherit}.color-option{cursor:pointer}.color-defaults .color-option:focus,.color-defaults .color-option:hover{color:var(--option-color-hover);background:var(--option-bg-hover);outline:none}.color-defaults .color-option:active,.color-defaults .color-option.active{color:var(--option-color-active);background:var(--option-bg-active)}.color-options{--grid-item-size: 2rem;--grid-fit: 5;--grid-gap: .25rem;--grid-height: auto;--grid-hover-height: auto;display:grid;padding:0;margin:0;list-style:none;grid-template-columns:repeat(var(--grid-fit), var(--grid-item-size));grid-template-rows:repeat(auto-fill, var(--grid-item-size));gap:var(--grid-gap)}.color-options.scrollable{height:var(--grid-height);margin:0 -0.5rem 0 0;overflow-y:scroll;transition:var(--options-transition)}.color-options.scrollable:hover{height:var(--grid-hover-height)}.color-options+.color-defaults{margin-top:.25rem}.multiline+.color-defaults{flex-flow:row wrap}.multiline+.color-defaults .color-option{padding:.25rem .33rem;font-size:12px}.color-options .color-option{position:relative;width:var(--grid-item-size);height:var(--grid-item-size);overflow:hidden;text-indent:2.1rem}.color-options .color-option:active,.color-options .color-option:focus{outline:none;box-shadow:0 0 0 4px rgba(125,125,125,.75) inset}.color-options .color-option::before{position:absolute;inset:0}.color-options .color-option:hover::before,.color-options .color-option:active::before,.color-options .color-option:focus::before{content:"";border:3px solid var(--white-75);mix-blend-mode:difference}.color-options .color-option.active::after{position:absolute;top:50%;left:50%;width:4px;height:4px;margin:-2px 0 0 -2px;content:"";border-radius:4px}.txt-dark .color-options .color-option.active::after{box-shadow:0 0 0 4px var(--white-90)}.txt-light .color-options .color-option.active::after{box-shadow:0 0 0 4px var(--black-90)}.color-form{display:flex;flex-flow:row wrap;align-items:center;padding:.25rem 0 0;font:12px sans-serif}.color-form.hex{max-width:initial}.color-form>*{flex:1 0 0%;width:17.5%;max-width:17.5%}.color-form label{width:7.5%;max-width:7.5%;text-align:center}.color-input{color:inherit;text-align:right;background:rgba(0,0,0,0);border:var(--input-border);outline:none}.color-input.hex{width:92.5%;max-width:92.5%}.color-input:active,.color-input:focus{background:var(--input-bg-hover);border:var(--input-border-hover)}.visual-control{height:150px;touch-action:none;box-shadow:var(--visual-shadow)}.visual-control1{width:150px}.visual-control2,.visual-control3{width:21px;cursor:ns-resize}@media(width >= 578px){.visual-control{height:230px}.visual-control1{width:230px}}@media(width >= 1200px){.visual-control{height:300px}.visual-control1{width:300px}}.color-control{position:relative;display:inline-block}.color-slider{left:0;width:calc(100% - 2px);cursor:ns-resize}.color-control+.color-control{margin-left:.5rem}.knob{position:absolute;top:0;left:0;height:7px;touch-action:none;user-select:none;background-color:var(--knob-bg);border:var(--knob-border);border-radius:5px;outline:none;will-change:transform}.knob:hover{box-shadow:var(--knob-shadow-hover)}.knob:focus,.knob:active{z-index:1;box-shadow:var(--knob-shadow-active)}.color-pointer{width:7px;background-color:rgba(0,0,0,0);border:0}.txt-dark .color-pointer{box-shadow:0 0 0 5px var(--white-50)}.txt-light .color-pointer{box-shadow:0 0 0 5px var(--black-50)}.txt-dark .color-pointer:hover{box-shadow:0 0 0 5px var(--white-75)}.txt-light .color-pointer:hover{box-shadow:0 0 0 5px var(--black-75)}.txt-dark .color-pointer:focus,.txt-dark .color-pointer:active{box-shadow:0 0 0 5px var(--white-90)}.txt-light .color-pointer:focus,.txt-light .color-pointer:active{box-shadow:0 0 0 5px var(--black-90)}.v-hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}[dir=rtl] .color-preview{text-align:right}[dir=rtl] .menu-toggle{right:auto;left:0;border-radius:.25rem 0 0 .25rem}[dir=rtl] .color-dropdown.picker{right:0;left:auto}[dir=rtl] .color-dropdown.menu{right:auto;left:0}[dir=rtl] .color-control+.color-control{margin-right:.5rem;margin-left:0}[dir=rtl] .color-options.scrollable{margin:0 0 0 -0.5rem}
@@ -0,0 +1,8 @@
1
+ "use strict";const J={},he=o=>{const{type:t,currentTarget:e}=o;[...J[t]].forEach(([s,n])=>{e===s&&[...n].forEach(([r,i])=>{r.apply(s,[o]),typeof i=="object"&&i.once&&Bt(s,t,r,i)})})},ge=(o,t,e,s)=>{J[t]||(J[t]=new Map);const n=J[t];n.has(o)||n.set(o,new Map);const r=n.get(o),{size:i}=r;r.set(e,s),i||o.addEventListener(t,he,s)},Bt=(o,t,e,s)=>{const n=J[t],r=n&&n.get(o),i=r&&r.get(e),a=i!==void 0?i:s;r&&r.has(e)&&r.delete(e),n&&(!r||!r.size)&&n.delete(o),(!n||!n.size)&&delete J[t],(!r||!r.size)&&o.removeEventListener(t,he,a)},Gt="aria-description",Nt="aria-expanded",Te="aria-hidden",Pt="aria-selected",et="aria-valuenow",ot="aria-valuetext",Re="change",De="DOMContentLoaded",Oe="focusin",Fe="focusout",Ut="keydown",Ie="keyup",Et="click",Ke="pointerdown",ue="pointermove",Ve="pointerup",Be="resize",je="scroll",qe="touchmove",j="ArrowDown",st="ArrowUp",ht="ArrowLeft",G="ArrowRight",ze="Enter",Ge="Escape",_t="Space",Ue="transitionDuration",_e="transitionProperty",Y="tabindex",We=navigator.userAgentData,mt=We,{userAgent:Xe}=navigator,vt=Xe,Wt=/iPhone|iPad|iPod|Android/i;mt?mt.brands.some(o=>Wt.test(o.brand)):Wt.test(vt);const Xt=/(iPhone|iPod|iPad)/;mt?mt.brands.some(o=>Xt.test(o.brand)):Xt.test(vt);vt&&vt.includes("Firefox");const{head:kt}=document;["webkitPerspective","perspective"].some(o=>o in kt.style);const Je=(o,t,e,s)=>{const n=s||!1;o.addEventListener(t,e,n)},Ye=(o,t,e,s)=>{const n=s||!1;o.removeEventListener(t,e,n)},Ze=(o,t,e,s)=>{const n=r=>{(r.target===o||r.currentTarget===o)&&(e.apply(o,[r]),Ye(o,t,n,s))};Je(o,t,n,s)},Qe=()=>{};(()=>{let o=!1;try{const t=Object.defineProperty({},"passive",{get:()=>(o=!0,o)});Ze(document,De,Qe,t)}catch{}return o})();["webkitTransform","transform"].some(o=>o in kt.style);["webkitAnimation","animation"].some(o=>o in kt.style);["webkitTransition","transition"].some(o=>o in kt.style);const yt=(o,t)=>o.getAttribute(t),m=(o,t,e)=>o.setAttribute(t,e),St=(o,t)=>o.removeAttribute(t),q=(o,...t)=>{o.classList.add(...t)},D=(o,...t)=>{o.classList.remove(...t)},T=(o,t)=>o.classList.contains(t),jt=o=>o!=null&&typeof o=="object"||!1,Q=o=>jt(o)&&typeof o.nodeType=="number"&&[1,2,3,4,5,6,7,8,9,10,11].some(t=>o.nodeType===t)||!1,at=o=>Q(o)&&o.nodeType===1||!1,W=new Map,ct={data:W,set:(o,t,e)=>{at(o)&&(W.has(t)||W.set(t,new Map),W.get(t).set(o,e))},getAllFor:o=>W.get(o)||null,get:(o,t)=>{if(!at(o)||!t)return null;const e=ct.getAllFor(t);return o&&e&&e.get(o)||null},remove:(o,t)=>{const e=ct.getAllFor(t);!e||!at(o)||(e.delete(o),e.size===0&&W.delete(t))}},to=(o,t)=>ct.get(o,t),V=o=>typeof o=="string"||!1,eo=o=>jt(o)&&o.constructor.name==="Window"||!1,be=o=>Q(o)&&o.nodeType===9||!1,K=o=>eo(o)?o.document:be(o)?o:Q(o)?o.ownerDocument:window.document,B=(o,...t)=>Object.assign(o,...t),x=o=>{if(!o)return;if(V(o))return K().createElement(o);const{tagName:t}=o,e=x(t);if(!e)return;const s={...o};return delete s.tagName,B(e,s)},Mt=(o,t)=>{if(!o||!t)return;if(V(t))return K().createElementNS(o,t);const{tagName:e}=t,s=Mt(o,e);if(!s)return;const n={...t};return delete n.tagName,B(s,n)},oo=(o,t)=>o.dispatchEvent(t),Tt=(o,t)=>{const e=getComputedStyle(o),s=t.replace("webkit","Webkit").replace(/([A-Z])/g,"-$1").toLowerCase();return e.getPropertyValue(s)},so=o=>{const t=Tt(o,_e),e=Tt(o,Ue),s=e.includes("ms")?1:1e3,n=t&&t!=="none"?parseFloat(e)*s:0;return Number.isNaN(n)?0:n},U=(o,t)=>o.focus(t),Jt=o=>["true",!0].includes(o)?!0:["false",!1].includes(o)?!1:["null","",null,void 0].includes(o)?null:o!==""&&!Number.isNaN(+o)?+o:o,pt=o=>Object.entries(o),no=o=>o.toLowerCase(),ro=(o,t,e,s)=>{const n={...e},r={...o.dataset},i={...t},a={},l="title";return pt(r).forEach(([c,h])=>{const b=s&&typeof c=="string"&&c.includes(s)?c.replace(s,"").replace(/[A-Z]/g,u=>no(u)):c;a[b]=Jt(h)}),pt(n).forEach(([c,h])=>{n[c]=Jt(h)}),pt(t).forEach(([c,h])=>{c in n?i[c]=n[c]:c in a?i[c]=a[c]:i[c]=c===l?yt(o,l):h}),i},io=o=>o.offsetHeight,O=(o,t)=>{pt(t).forEach(([e,s])=>{if(s&&V(e)&&e.includes("--"))o.style.setProperty(e,s);else{const n={};n[e]=s,B(o.style,n)}})},ao=o=>jt(o)&&o.constructor.name==="Map"||!1,pe=o=>o.toUpperCase(),gt=(o,t)=>{const{width:e,height:s,top:n,right:r,bottom:i,left:a}=o.getBoundingClientRect();let l=1,c=1;if(t&&at(o)){const{offsetWidth:h,offsetHeight:b}=o;l=h>0?Math.round(e)/h:1,c=b>0?Math.round(s)/b:1}return{width:e/l,height:s/c,top:n/c,right:r/l,bottom:i/c,left:a/l,x:a/l,y:n/c}},Ct=o=>K(o).documentElement;let Yt=0,Zt=0;const X=new Map,de=(o,t)=>{let e=t?Yt:Zt;if(t){const s=de(o),n=X.get(s)||new Map;X.has(s)||X.set(s,n),ao(n)&&!n.has(t)?(n.set(t,e),Yt+=1):e=n.get(t)}else{const s=o.id||o;X.has(s)?e=X.get(s):(X.set(s,e),Zt+=1)}return e},lo=o=>{var t;return o?be(o)?o.defaultView:Q(o)?(t=o?.ownerDocument)==null?void 0:t.defaultView:o:window},Lt=o=>Array.isArray(o)||!1,fe=(o,t)=>o?o.closest(t)||fe(o.getRootNode().host,t):null,_=(o,t)=>at(o)?o:(Q(t)?t:K()).querySelector(o),nt=(o,t)=>(t&&Q(t)?t:K()).getElementsByClassName(o),qt=["transparent","currentColor","inherit","revert","initial"],v=o=>{const t=Math.floor(o);return o-t<.5?t:Math.round(o)},wt=[["aliceblue",{r:240,g:248,b:255}],["antiquewhite",{r:250,g:235,b:215}],["aqua",{r:0,g:255,b:255}],["aquamarine",{r:127,g:255,b:212}],["azure",{r:240,g:255,b:255}],["beige",{r:245,g:245,b:220}],["bisque",{r:255,g:228,b:196}],["black",{r:0,g:0,b:0}],["blanchedalmond",{r:255,g:235,b:205}],["blue",{r:0,g:0,b:255}],["blueviolet",{r:138,g:43,b:226}],["brown",{r:165,g:42,b:42}],["burlywood",{r:222,g:184,b:135}],["cadetblue",{r:95,g:158,b:160}],["chartreuse",{r:127,g:255,b:0}],["chocolate",{r:210,g:105,b:30}],["coral",{r:255,g:127,b:80}],["cornflowerblue",{r:100,g:149,b:237}],["cornsilk",{r:255,g:248,b:220}],["crimson",{r:220,g:20,b:60}],["cyan",{r:0,g:255,b:255}],["darkblue",{r:0,g:0,b:139}],["darkcyan",{r:0,g:139,b:139}],["darkgoldenrod",{r:184,g:134,b:11}],["darkgray",{r:169,g:169,b:169}],["darkgreen",{r:0,g:100,b:0}],["darkgrey",{r:169,g:169,b:169}],["darkkhaki",{r:189,g:183,b:107}],["darkmagenta",{r:139,g:0,b:139}],["darkolivegreen",{r:85,g:107,b:47}],["darkorange",{r:255,g:140,b:0}],["darkorchid",{r:153,g:50,b:204}],["darkred",{r:139,g:0,b:0}],["darksalmon",{r:233,g:150,b:122}],["darkseagreen",{r:143,g:188,b:143}],["darkslateblue",{r:72,g:61,b:139}],["darkslategray",{r:47,g:79,b:79}],["darkslategrey",{r:47,g:79,b:79}],["darkturquoise",{r:0,g:206,b:209}],["darkviolet",{r:148,g:0,b:211}],["deeppink",{r:255,g:20,b:147}],["deepskyblue",{r:0,g:191,b:255}],["dimgray",{r:105,g:105,b:105}],["dimgrey",{r:105,g:105,b:105}],["dodgerblue",{r:30,g:144,b:255}],["firebrick",{r:178,g:34,b:34}],["floralwhite",{r:255,g:250,b:240}],["forestgreen",{r:34,g:139,b:34}],["fuchsia",{r:255,g:0,b:255}],["gainsboro",{r:220,g:220,b:220}],["ghostwhite",{r:248,g:248,b:255}],["goldenrod",{r:218,g:165,b:32}],["gold",{r:255,g:215,b:0}],["gray",{r:128,g:128,b:128}],["green",{r:0,g:128,b:0}],["greenyellow",{r:173,g:255,b:47}],["grey",{r:128,g:128,b:128}],["honeydew",{r:240,g:255,b:240}],["hotpink",{r:255,g:105,b:180}],["indianred",{r:205,g:92,b:92}],["indigo",{r:75,g:0,b:130}],["ivory",{r:255,g:255,b:240}],["khaki",{r:240,g:230,b:140}],["lavenderblush",{r:255,g:240,b:245}],["lavender",{r:230,g:230,b:250}],["lawngreen",{r:124,g:252,b:0}],["lemonchiffon",{r:255,g:250,b:205}],["lightblue",{r:173,g:216,b:230}],["lightcoral",{r:240,g:128,b:128}],["lightcyan",{r:224,g:255,b:255}],["lightgoldenrodyellow",{r:250,g:250,b:210}],["lightgray",{r:211,g:211,b:211}],["lightgreen",{r:144,g:238,b:144}],["lightgrey",{r:211,g:211,b:211}],["lightpink",{r:255,g:182,b:193}],["lightsalmon",{r:255,g:160,b:122}],["lightseagreen",{r:32,g:178,b:170}],["lightskyblue",{r:135,g:206,b:250}],["lightslategray",{r:119,g:136,b:153}],["lightslategrey",{r:119,g:136,b:153}],["lightsteelblue",{r:176,g:196,b:222}],["lightyellow",{r:255,g:255,b:224}],["lime",{r:0,g:255,b:0}],["limegreen",{r:50,g:205,b:50}],["linen",{r:250,g:240,b:230}],["magenta",{r:255,g:0,b:255}],["maroon",{r:128,g:0,b:0}],["mediumaquamarine",{r:102,g:205,b:170}],["mediumblue",{r:0,g:0,b:205}],["mediumorchid",{r:186,g:85,b:211}],["mediumpurple",{r:147,g:112,b:219}],["mediumseagreen",{r:60,g:179,b:113}],["mediumslateblue",{r:123,g:104,b:238}],["mediumspringgreen",{r:0,g:250,b:154}],["mediumturquoise",{r:72,g:209,b:204}],["mediumvioletred",{r:199,g:21,b:133}],["midnightblue",{r:25,g:25,b:112}],["mintcream",{r:245,g:255,b:250}],["mistyrose",{r:255,g:228,b:225}],["moccasin",{r:255,g:228,b:181}],["navajowhite",{r:255,g:222,b:173}],["navy",{r:0,g:0,b:128}],["oldlace",{r:253,g:245,b:230}],["olive",{r:128,g:128,b:0}],["olivedrab",{r:107,g:142,b:35}],["orange",{r:255,g:165,b:0}],["orangered",{r:255,g:69,b:0}],["orchid",{r:218,g:112,b:214}],["palegoldenrod",{r:238,g:232,b:170}],["palegreen",{r:152,g:251,b:152}],["paleturquoise",{r:175,g:238,b:238}],["palevioletred",{r:219,g:112,b:147}],["papayawhip",{r:255,g:239,b:213}],["peachpuff",{r:255,g:218,b:185}],["peru",{r:205,g:133,b:63}],["pink",{r:255,g:192,b:203}],["plum",{r:221,g:160,b:221}],["powderblue",{r:176,g:224,b:230}],["purple",{r:128,g:0,b:128}],["rebeccapurple",{r:102,g:51,b:153}],["red",{r:255,g:0,b:0}],["rosybrown",{r:188,g:143,b:143}],["royalblue",{r:65,g:105,b:225}],["saddlebrown",{r:139,g:69,b:19}],["salmon",{r:250,g:128,b:114}],["sandybrown",{r:244,g:164,b:96}],["seagreen",{r:46,g:139,b:87}],["seashell",{r:255,g:245,b:238}],["sienna",{r:160,g:82,b:45}],["silver",{r:192,g:192,b:192}],["skyblue",{r:135,g:206,b:235}],["slateblue",{r:106,g:90,b:205}],["slategray",{r:112,g:128,b:144}],["slategrey",{r:112,g:128,b:144}],["snow",{r:255,g:250,b:250}],["springgreen",{r:0,g:255,b:127}],["steelblue",{r:70,g:130,b:180}],["tan",{r:210,g:180,b:140}],["teal",{r:0,g:128,b:128}],["thistle",{r:216,g:191,b:216}],["tomato",{r:255,g:99,b:71}],["turquoise",{r:64,g:224,b:208}],["violet",{r:238,g:130,b:238}],["wheat",{r:245,g:222,b:179}],["white",{r:255,g:255,b:255}],["whitesmoke",{r:245,g:245,b:245}],["yellow",{r:255,g:255,b:0}],["yellowgreen",{r:154,g:205,b:50}]],me="deg|rad|grad|turn",ve="[-\\+]?\\d+%?",we="[-\\+]?\\d*\\.\\d+%?",$e=`[-\\+]?\\d*\\.?\\d+(?:${me})?`,dt=`(?:${we})|(?:${ve})`,Rt=`(?:${dt})|(?:${$e}?)`,co="(?:[\\s|\\(\\s|\\s\\(\\s]+)?",ho="(?:[\\s|\\)\\s]+)?",Qt="(?:[,|\\s]+)",go="(?:[,|\\/\\s]*)?",rt=`${co}(${Rt})${Qt}(${dt})${Qt}(${dt})${go}(${dt})?${ho}`,I={CSS_UNIT:new RegExp(Rt),ANGLES:me,CSS_ANGLE:$e,CSS_INTEGER:ve,CSS_NUMBER:we,CSS_UNIT2:Rt,PERMISSIVE_MATCH:rt,hwb:new RegExp(`hwb${rt}`),rgb:new RegExp(`rgb(?:a)?${rt}`),hsl:new RegExp(`hsl(?:a)?${rt}`),hsv:new RegExp(`hsv(?:a)?${rt}`),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/},ke=o=>qt.includes(o),it=(o,t)=>o!==null&&typeof o=="object"&&Object.keys(t).every(e=>e in o),ye=o=>`${o}`.includes(".")&&parseFloat(o)===1,$t=o=>typeof o=="string"&&o.includes("%"),H=o=>!!I.CSS_UNIT.exec(`${o}`),xe=["rgb","hex","hsl","hsv","hwb"],Pe=o=>qt.includes(o)||["#",...xe].some(t=>o.includes(t))?!1:wt.some(([t])=>o===t),R=(o,t)=>{let e=o;if(typeof o=="number"&&Math.min(o,0)===0&&Math.max(o,1)===1)return o;ye(o)&&(e="100%");const s=$t(e);return e=t===360?parseFloat(e):Math.min(t,Math.max(0,parseFloat(e))),s&&(e=e*t/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/t:e=e%t/t,e)},Dt=o=>{let t=parseFloat(o);return(Number.isNaN(t)||t<0||t>1)&&(t=1),t},ut=o=>Math.min(1,Math.max(0,o)),z=o=>o.length===1?`0${o}`:String(o),Se=o=>{const[[,t]]=wt.filter(([e])=>e===o.toLowerCase());return t},N=o=>parseInt(o,16),Ot=o=>N(o)/255,Ce=o=>v(o*255).toString(16),te=(o,t,e)=>{const s=Math.max(o,t,e),n=Math.min(o,t,e);let r=0,i=0;const a=(s+n)/2;if(s===n)i=0,r=0;else{const l=s-n;i=a>.5?l/(2-s-n):l/(s+n),s===o&&(r=(t-e)/l+(t<e?6:0)),s===t&&(r=(e-o)/l+2),s===e&&(r=(o-t)/l+4),r/=6}return{h:r,s:i,l:a}},ft=(o,t,e)=>{let s=e;return s<0&&(s+=1),s>1&&(s-=1),s<1/6?o+(t-o)*(6*s):s<1/2?t:s<2/3?o+(t-o)*(2/3-s)*6:o},lt=(o,t,e)=>{let s=0,n=0,r=0;if(t===0)n=e,r=e,s=e;else if(e){const i=e<.5?e*(1+t):e+t-e*t,a=2*e-i;s=ft(a,i,o+1/3),n=ft(a,i,o),r=ft(a,i,o-1/3)}return{r:s,g:n,b:r}},ee=(o,t,e)=>{let s=0,n=0;const r=Math.min(o,t,e),i=Math.max(o,t,e),a=1-i;if(i===r)return{h:0,w:r,b:a};o===r?(s=t-e,n=3):(s=t===r?e-o:o-t,n=t===r?5:1);const l=(n-s/(i-r))/6;return{h:l===1?0:l,w:r,b:a}},Le=(o,t,e)=>{if(t+e>=1){const i=t/(t+e);return{r:i,g:i,b:i}}let{r:s,g:n,b:r}=lt(o,1,.5);return[s,n,r]=[s,n,r].map(i=>i*(1-t-e)+t),{r:s,g:n,b:r}},oe=(o,t,e)=>{const s=Math.max(o,t,e),n=Math.min(o,t,e);let r=0;const i=s,a=s-n,l=s===0?0:a/s;return s===n?r=0:(o===s&&(r=(t-e)/a+(t<e?6:0)),t===s&&(r=(e-o)/a+2),e===s&&(r=(o-t)/a+4),r/=6),{h:r,s:l,v:i}},Ft=(o,t,e)=>{const s=o*6,n=t,r=e,i=Math.floor(s),a=s-i,l=r*(1-n),c=r*(1-a*n),h=r*(1-(1-a)*n),b=i%6,u=[r,c,l,l,h,r][b],d=[h,r,r,c,l,l][b],g=[l,l,h,r,r,c][b];return{r:u,g:d,b:g}},se=(o,t,e,s)=>{const n=[z(v(o).toString(16)),z(v(t).toString(16)),z(v(e).toString(16))];return s&&n[0].charAt(0)===n[0].charAt(1)&&n[1].charAt(0)===n[1].charAt(1)&&n[2].charAt(0)===n[2].charAt(1)?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0):n.join("")},At=(o,t,e,s,n)=>{const r=[z(v(o).toString(16)),z(v(t).toString(16)),z(v(e).toString(16)),z(Ce(s))];return n&&r[0].charAt(0)===r[0].charAt(1)&&r[1].charAt(0)===r[1].charAt(1)&&r[2].charAt(0)===r[2].charAt(1)&&r[3].charAt(0)===r[3].charAt(1)?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0)+r[3].charAt(0):r.join("")},Ae=o=>{const t=String(o).trim().toLowerCase();if(Pe(t))return Object.assign(Se(t),{a:1,format:"rgb",ok:!0});if(ke(t))return{r:0,g:0,b:0,a:t==="transparent"?0:1,format:"rgb",ok:!0};let[,e,s,n,r]=I.rgb.exec(t)||[];return e&&s&&n?{r:e,g:s,b:n,a:r!==void 0?r:1,format:"rgb",ok:!0}:([,e,s,n,r]=I.hsl.exec(t)||[],e&&s&&n?{h:e,s,l:n,a:r!==void 0?r:1,format:"hsl",ok:!0}:([,e,s,n,r]=I.hsv.exec(t)||[],e&&s&&n?{h:e,s,v:n,a:r!==void 0?r:1,format:"hsv",ok:!0}:([,e,s,n,r]=I.hwb.exec(t)||[],e&&s&&n?{h:e,w:s,b:n,a:r!==void 0?r:1,format:"hwb",ok:!0}:([,e,s,n,r]=I.hex8.exec(t)||[],e&&s&&n&&r?{r:N(e),g:N(s),b:N(n),a:Ot(r),format:"hex",ok:!0}:([,e,s,n]=I.hex6.exec(t)||[],e&&s&&n?{r:N(e),g:N(s),b:N(n),a:1,format:"hex",ok:!0}:([,e,s,n,r]=I.hex4.exec(t)||[],e&&s&&n&&r?{r:N(e+e),g:N(s+s),b:N(n+n),a:Ot(r+r),format:"hex",ok:!0}:([,e,s,n]=I.hex3.exec(t)||[],e&&s&&n?{r:N(e+e),g:N(s+s),b:N(n+n),a:1,format:"hex",ok:!0}:{r:0,g:0,b:0,a:1,format:"rgb",ok:!o})))))))},ne=o=>{let t={r:0,g:0,b:0},e=o,s=1,n,r,i,a,l,c,h,b,u="rgb",d=!1;return(!e||typeof e=="string")&&(e=Ae(e),d=e.ok),it(e,t)&&H(e.r)&&H(e.g)&&H(e.b)&&({r:h,g:b,b:l}=e,[h,b,l]=[h,b,l].map(g=>R(g,$t(g)?100:255)),t={r:h,g:b,b:l},u="format"in e?e.format:"rgb"),it(e,{h:0,s:0,v:0})&&H(e.h)&&H(e.s)&&H(e.v)&&({h:c,s:n,v:r}=e,c=R(c,360),n=R(n,100),r=R(r,100),t=Ft(c,n,r),u="hsv"),it(e,{h:0,s:0,l:0})&&H(e.h)&&H(e.s)&&H(e.l)&&({h:c,s:n,l:i}=e,c=R(c,360),n=R(n,100),i=R(i,100),t=lt(c,n,i),u="hsl"),it(e,{h:0,w:0,b:0})&&H(e.h)&&H(e.w)&&H(e.b)&&({h:c,w:a,b:l}=e,c=R(c,360),a=R(a,100),l=R(l,100),t=Le(c,a,l),u="hwb"),H(e.a)&&(s=e.a,s=$t(s)||parseFloat(`${s}`)>1?R(s,100):s),{r:t.r,g:t.g,b:t.b,a:Dt(s),format:u,ok:d}},uo="1.0.7";class y{static matchers=I;static isOnePointZero=ye;static isPercentage=$t;static isValidCSSUnit=H;static isNonColor=ke;static isColorName=Pe;static isColorType=it;static pad2=z;static clamp01=ut;static bound01=R;static boundAlpha=Dt;static getRGBFromName=Se;static convertHexToDecimal=Ot;static convertDecimalToHex=Ce;static rgbToHsl=te;static rgbToHex=se;static rgbToHsv=oe;static rgbToHwb=ee;static rgbaToHex=At;static hslToRgb=Ft;static hsvToRgb=Ft;static hueToRgb=ft;static hwbToRgb=Le;static parseIntFromHex=N;static stringInputToObject=Ae;static inputToRGB=ne;static roundPart=v;static webColors=wt;static nonColors=qt;static version=uo;r;g;b;a;format;ok;originalInput;constructor(t,e){const s=e&&xe.includes(e)?e:"",{r:n,g:r,b:i,a,ok:l,format:c}=ne(t);this.originalInput=t,this.r=n,this.g=r,this.b=i,this.a=a,this.ok=l,this.format=s||c}get isValid(){return this.ok}get isDark(){return this.brightness<120}get luminance(){const{r:t,g:e,b:s}=this;let n=0,r=0,i=0;return t<=.03928?n=t/12.92:n=((t+.055)/1.055)**2.4,e<=.03928?r=e/12.92:r=((e+.055)/1.055)**2.4,s<=.03928?i=s/12.92:i=((s+.055)/1.055)**2.4,.2126*n+.7152*r+.0722*i}get brightness(){const{r:t,g:e,b:s}=this.toRgb();return(t*299+e*587+s*114)/1e3}get name(){const{r:t,g:e,b:s}=this.toRgb(),[n]=wt.map(([r,i])=>{const a=(((i.r-t)*.3)**2+((i.g-e)*.6)**2+((i.b-s)*.1)**2)**.5;return[r,a]}).find(([,r],i,a)=>r===Math.min(...a.map(([,l])=>l)));return n}toRgb(){let{r:t,g:e,b:s,a:n}=this;return[t,e,s]=[t,e,s].map(r=>v(r*255*100)/100),n=v(n*100)/100,{r:t,g:e,b:s,a:n}}toRgbString(){const{r:t,g:e,b:s,a:n}=this.toRgb(),[r,i,a]=[t,e,s].map(v);return n===1?`rgb(${r}, ${i}, ${a})`:`rgba(${r}, ${i}, ${a}, ${n})`}toRgbCSS4String(){const{r:t,g:e,b:s,a:n}=this.toRgb(),[r,i,a]=[t,e,s].map(v),l=n===1?"":` / ${v(n*100)}%`;return`rgb(${r} ${i} ${a}${l})`}toHex(t){const{r:e,g:s,b:n,a:r}=this.toRgb();return r===1?se(e,s,n,t):At(e,s,n,r,t)}toHexString(t){return`#${this.toHex(t)}`}toHex8(t){const{r:e,g:s,b:n,a:r}=this.toRgb();return At(e,s,n,r,t)}toHex8String(t){return`#${this.toHex8(t)}`}toHsv(){const{r:t,g:e,b:s,a:n}=this,{h:r,s:i,v:a}=oe(t,e,s);return{h:r,s:i,v:a,a:n}}toHsl(){const{r:t,g:e,b:s,a:n}=this,{h:r,s:i,l:a}=te(t,e,s);return{h:r,s:i,l:a,a:n}}toHslString(){let{h:t,s:e,l:s,a:n}=this.toHsl();return t=v(t*360),e=v(e*100),s=v(s*100),n=v(n*100)/100,n===1?`hsl(${t}, ${e}%, ${s}%)`:`hsla(${t}, ${e}%, ${s}%, ${n})`}toHslCSS4String(){let{h:t,s:e,l:s,a:n}=this.toHsl();t=v(t*360),e=v(e*100),s=v(s*100),n=v(n*100);const r=n<100?` / ${v(n)}%`:"";return`hsl(${t}deg ${e}% ${s}%${r})`}toHwb(){const{r:t,g:e,b:s,a:n}=this,{h:r,w:i,b:a}=ee(t,e,s);return{h:r,w:i,b:a,a:n}}toHwbString(){let{h:t,w:e,b:s,a:n}=this.toHwb();t=v(t*360),e=v(e*100),s=v(s*100),n=v(n*100);const r=n<100?` / ${v(n)}%`:"";return`hwb(${t}deg ${e}% ${s}%${r})`}setAlpha(t){return typeof t!="number"?this:(this.a=Dt(t),this)}saturate(t){if(typeof t!="number")return this;const{h:e,s,l:n}=this.toHsl(),{r,g:i,b:a}=lt(e,ut(s+t/100),n);return Object.assign(this,{r,g:i,b:a}),this}desaturate(t){return typeof t=="number"?this.saturate(-t):this}greyscale(){return this.saturate(-100)}lighten(t){if(typeof t!="number")return this;const{h:e,s,l:n}=this.toHsl(),{r,g:i,b:a}=lt(e,s,ut(n+t/100));return Object.assign(this,{r,g:i,b:a}),this}darken(t){return typeof t=="number"?this.lighten(-t):this}spin(t){if(typeof t!="number")return this;const{h:e,s,l:n}=this.toHsl(),{r,g:i,b:a}=lt(ut((e*360+t)%360/360),s,n);return Object.assign(this,{r,g:i,b:a}),this}clone(){return new y(this)}toString(t){const{format:e}=this;return e==="hex"?this.toHexString(t):e==="hsl"?this.toHslString():e==="hwb"?this.toHwbString():this.toRgbString()}}class It{static Color=y;hue;hueSteps;lightSteps;saturation;colors;constructor(...t){let e=0,s=12,n=10,r=[.5],i=100;if(t.length===4)[e,s,n,i]=t;else if(t.length===3)[e,s,n]=t;else if(t.length===2&&([s,n]=t,[s,n].some(g=>g<1)))throw TypeError("ColorPalette: the two minimum arguments must be numbers higher than 0.");const a=[],l=360/s,c=y.roundPart((n-(n%2?1:0))/2),h=[.25,.2,.15,.11,.09,.075],b=[[1,2,3],[4,5],[6,7],[8,9],[10,11],[12,13]],u=b.find(g=>g.includes(n)),d=u?h[b.indexOf(u)]:100/(n+(n%2?0:1))/100;for(let g=1;g<c+1;g+=1)r=[...r,.5+d*g];for(let g=1;g<n-c;g+=1)r=[.5-d*g,...r];for(let g=0;g<s;g+=1){const p=(e+g*l)%360/360;r.forEach(f=>{const w=new y({h:p,s:1,l:f});a.push(i<100?w.saturate(i-100):w)})}this.hue=e,this.hueSteps=s,this.lightSteps=n,this.saturation=i,this.colors=a}}const He={pickerLabel:"Colour Picker",appearanceLabel:"Colour Appearance",valueLabel:"Colour Value",toggleLabel:"Select Colour",presetsLabel:"Colour Presets",defaultsLabel:"Colour Defaults",formatLabel:"Format",alphaLabel:"Alpha",hexLabel:"Hexadecimal",hueLabel:"Hue",whitenessLabel:"Whiteness",blacknessLabel:"Blackness",saturationLabel:"Saturation",lightnessLabel:"Lightness",redLabel:"Red",greenLabel:"Green",blueLabel:"Blue"},Kt=["white","black","grey","red","orange","brown","gold","olive","yellow","lime","green","teal","cyan","blue","violet","magenta","pink"],re=o=>{if(!V(o))return!1;try{JSON.parse(o)}catch{return!1}return!0},Vt="v-hidden",bo=o=>{const{format:t,id:e,componentLabels:s}=o,n=x({tagName:"div",className:`color-form ${t}`});let r=["hex"];return t==="rgb"?r=["red","green","blue","alpha"]:t==="hsl"?r=["hue","saturation","lightness","alpha"]:t==="hwb"&&(r=["hue","whiteness","blackness","alpha"]),r.forEach(i=>{const[a]=t==="hex"?["#"]:pe(i).split(""),l=`color_${t}_${i}_${e}`,c=s[`${i}Label`],h=x({tagName:"label"});m(h,"for",l),h.append(x({tagName:"span",ariaHidden:"true",innerText:`${a}:`}),x({tagName:"span",className:Vt,innerText:c}));const b=x({tagName:"input",id:l,type:t==="hex"?"text":"number",value:i==="alpha"?"100":"0",className:`color-input ${i}`,autocomplete:"off",spellcheck:!1});let u="100",d="1";i!=="alpha"&&(t==="rgb"?(u="255",d="1"):i==="hue"&&(u="360",d="1")),B(b,{min:"0",max:u,step:d}),n.append(h,b)}),n},po=o=>{const{format:t,componentLabels:e}=o,{hueLabel:s,alphaLabel:n,lightnessLabel:r,saturationLabel:i,whitenessLabel:a,blacknessLabel:l}=e,c=t==="hsl"?360:100,h=t==="hsl"?100:360,b=100;let u=t==="hsl"?`${s} & ${r}`:`${r} & ${i}`;u=t==="hwb"?`${a} & ${l}`:u;const d=t==="hsl"?`${i}`:`${s}`,g=x({tagName:"div",className:`color-controls ${t}`}),p="color-pointer",f="color-slider";return[{i:1,c:p,l:u,min:0,max:c},{i:2,c:f,l:d,min:0,max:h},{i:3,c:f,l:n,min:0,max:b}].forEach($=>{const{i:P,c:L,l:S,min:C,max:M}=$,E=x({tagName:"div",className:"color-control",role:"presentation"});E.append(x({tagName:"div",className:`visual-control visual-control${P}`}));const A=x({tagName:"div",className:`${L} knob`,ariaLive:"polite",ariaLabel:S,role:"slider",tabIndex:0,ariaValueMin:`${C}`,ariaValueMax:`${M}`});E.append(A),g.append(E)}),g},ie=(o,t,e)=>{const{input:s,format:n,componentLabels:r}=o,{defaultsLabel:i,presetsLabel:a}=r,l=e==="color-options",c=t instanceof It,h=l?a:i,b=c?t.colors:t,u=b.length,{lightSteps:d}=c?t:{lightSteps:null},g=d||[9,10].find(A=>u>=A*2&&!(u%A))||5,p=l&&u>g;let f=2;f=p&&u>g*2?3:f,f=p&&u>g*3?4:f,f=p&&u>g*4?5:f;const w=f-(u<=g*3?1:2),$=p&&u>w*g;let P=e;P+=$?" scrollable":"",P+=p?" multiline":"";const L=p?"1px":"0.25rem";let S=p?1.75:2;S=g>5&&p?1.5:S;const C=`${w*S}rem`,M=`calc(${f} * ${S}rem + ${f-1} * ${L})`,E=x({tagName:"ul",className:P,role:"listbox",ariaLabel:h});return $&&O(E,{"--grid-item-size":`${S}rem`,"--grid-fit":`${g}`,"--grid-gap":L,"--grid-height":C,"--grid-hover-height":M}),b.forEach(A=>{let[F,tt]=typeof A=="string"?A.trim().split(":"):[];A instanceof y&&(F=A.toHexString(),tt=F);const zt=new y(A instanceof y?A:F,n).toString()===yt(s,"value"),xt=x({tagName:"li",className:`color-option${zt?" active":""}`,innerText:`${tt||F}`,tabIndex:0,role:"option",ariaSelected:zt?"true":"false"});m(xt,"data-value",`${F}`),l&&O(xt,{backgroundColor:F}),E.append(xt)}),E},fo=o=>{const{input:t,parent:e,format:s,id:n,componentLabels:r,colorKeywords:i,colorPresets:a}=o,l=yt(t,"value")||"#fff",{nonColors:c}=y,{toggleLabel:h,pickerLabel:b,formatLabel:u,hexLabel:d}=r,g=c.includes(l)?"#fff":l;o.color=new y(g,s);const p=s==="hex"?d:pe(s),f=x({id:`picker-btn-${n}`,tagName:"button",className:"picker-toggle btn-appearance",ariaExpanded:"false",ariaHasPopup:"true"});f.append(x({tagName:"span",className:Vt,innerText:`${b}. ${u}: ${p}`}));const w=x({tagName:"div",className:"color-dropdown picker",role:"group",ariaLabelledBy:`picker-btn-${n}`}),$=po(o),P=bo(o);if(w.append($,P),t.before(f),e.append(w),i||a){const L=x({tagName:"div",className:"color-dropdown scrollable menu"});a&&L.append(ie(o,a,"color-options")),i&&i.length&&L.append(ie(o,i,"color-defaults"));const S=x({tagName:"button",className:"menu-toggle btn-appearance",tabIndex:-1,ariaExpanded:"false",ariaHasPopup:"true"}),C=encodeURI("http://www.w3.org/2000/svg"),M=Mt(C,{tagName:"svg"});m(M,"xmlns",C),m(M,"viewBox","0 0 512 512"),m(M,Te,"true");const E=Mt(C,{tagName:"path"});m(E,"d","M98,158l157,156L411,158l27,27L255,368L71,185L98,158z"),m(E,"fill","#fff"),M.append(E),S.append(x({tagName:"span",className:Vt,innerText:`${h}`}),M),e.append(S,L)}i&&c.includes(l)&&(o.value=l),m(t,Y,"-1")},mo="2.0.0-alpha2",Z="color-picker",vo=`[data-function="${Z}"]`,ae=`.${Z}`,wo={componentLabels:He,colorLabels:Kt,format:"rgb",colorPresets:!1,colorKeywords:!1},{roundPart:k,nonColors:bt}=y,$o=o=>to(o,Z),ko=o=>new Me(o),le=(o,t)=>{const e=t?ge:Bt,{input:s,pickerToggle:n,menuToggle:r}=o;e(s,Oe,o.showPicker),e(n,Et,o.togglePicker),r&&e(r,Et,o.toggleMenu)},Ne=(o,t)=>{const e=t?ge:Bt,{input:s,colorMenu:n,parent:r}=o,i=K(s),a=lo(i);e(o.controls,Ke,o.pointerDown),o.controlKnobs.forEach(l=>e(l,Ut,o.handleKnobs)),e(a,je,o.handleScroll),e(a,Be,o.update),[s,...o.inputs].forEach(l=>e(l,Re,o.changeHandler)),n&&(e(n,Et,o.menuClickHandler),e(n,Ut,o.menuKeyHandler)),e(i,ue,o.pointerMove),e(i,Ve,o.pointerUp),e(r,Fe,o.handleFocusOut),e(i,Ie,o.handleDismiss)},ce=o=>{oo(o.input,new CustomEvent("colorpicker.change"))},Ee=o=>{o&&["bottom","top"].forEach(t=>D(o,t))},Ht=(o,t)=>{const{colorPicker:e,colorMenu:s,menuToggle:n,pickerToggle:r,parent:i}=o,a=t===e,l=a?s:e,c=a?n:r,h=a?r:n;T(i,"open")||q(i,"open"),l&&(D(l,"show"),Ee(l)),q(t,"bottom"),io(t),q(t,"show"),a&&o.update(),o.isOpen||(Ne(o,!0),o.updateDropdownPosition(),o.isOpen=!0,m(o.input,Y,"0"),n&&m(n,Y,"0")),m(h,Nt,"true"),c&&m(c,Nt,"false")};class Me{static Color=y;static ColorPalette=It;static getInstance=$o;static init=ko;static selector=vo;static roundPart=k;static setElementStyle=O;static setAttribute=m;static getBoundingClientRect=gt;static version=mo;id;input;color;format="rgb";parent;dragElement;isOpen=!1;controlPositions;colorLabels={};colorKeywords;colorPresets;componentLabels;pickerToggle;menuToggle;colorPicker;colorMenu;controls;inputs;controlKnobs;visuals;constructor(t,e){const s=_(t);if(typeof t>"u")throw new TypeError("ColorPicker target not specified.");if(V(t)&&!s)throw new TypeError(`ColorPicker target "${t}" cannot be found.`);this.input=s;const n=fe(s,ae);if(!n)throw new TypeError("ColorPicker requires a specific markup to work.");this.parent=n,this.id=de(s,Z),this.dragElement=void 0,this.isOpen=!1,this.controlPositions={c1x:0,c1y:0,c2y:0,c3y:0},this.colorLabels={},this.colorKeywords=!1,this.colorPresets=!1;const{format:r,componentLabels:i,colorLabels:a,colorKeywords:l,colorPresets:c}=ro(s,wo,e||{});let h=Kt;Lt(a)&&a.length===17?h=a:V(a)&&a.split(",").length===17&&(h=a.split(",")),Kt.forEach((p,f)=>{this.colorLabels[p]=h[f].trim()});const b=V(i)&&re(i)?JSON.parse(i):i;if(this.componentLabels=B({...He},b),this.color=new y(s.value||"#fff",r),this.format=r,Lt(l)&&l.length?this.colorKeywords=l:V(l)&&l.length&&(this.colorKeywords=l.split(",").map(p=>p.trim())),Lt(c)&&c.length)this.colorPresets=c;else if(c&&re(c)){const{hue:p,hueSteps:f,lightSteps:w,saturation:$}=JSON.parse(c);this.colorPresets=new It(p,f,w,$)}else V(c)&&(this.colorPresets=c.split(",").map(p=>p.trim()));this.showPicker=this.showPicker.bind(this),this.togglePicker=this.togglePicker.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.menuClickHandler=this.menuClickHandler.bind(this),this.menuKeyHandler=this.menuKeyHandler.bind(this),this.pointerDown=this.pointerDown.bind(this),this.pointerMove=this.pointerMove.bind(this),this.pointerUp=this.pointerUp.bind(this),this.update=this.update.bind(this),this.handleScroll=this.handleScroll.bind(this),this.handleFocusOut=this.handleFocusOut.bind(this),this.changeHandler=this.changeHandler.bind(this),this.handleDismiss=this.handleDismiss.bind(this),this.handleKnobs=this.handleKnobs.bind(this),fo(this);const[u,d]=nt("color-dropdown",n);this.pickerToggle=_(".picker-toggle",n),this.menuToggle=_(".menu-toggle",n),this.colorPicker=u,this.colorMenu=d,this.inputs=[...nt("color-input",n)];const[g]=nt("color-controls",n);this.controls=g,this.controlKnobs=[...nt("knob",g)],this.visuals=[...nt("visual-control",g)],this.update(),le(this,!0),ct.set(s,Z,this)}get value(){return this.input.value}set value(t){this.input.value=t}get hasNonColor(){return this.colorKeywords instanceof Array&&this.colorKeywords.some(t=>bt.includes(t))}get hex(){return this.color.toHex(!0)}get hsv(){return this.color.toHsv()}get hsl(){return this.color.toHsl()}get hwb(){return this.color.toHwb()}get rgb(){return this.color.toRgb()}get brightness(){return this.color.brightness}get luminance(){return this.color.luminance}get isDark(){const{color:t,brightness:e}=this;return e<120&&t.a>.33}get isValid(){const t=this.input.value;return t!==""&&new y(t).isValid}get appearance(){const{colorLabels:t,hsl:e,hsv:s,format:n}=this,r=k(e.h*360),i=n==="hsl"?e.s:s.s,a=k(i*100),l=k(e.l*100),c=s.v*100;let h="black";if(l===100&&a===0)h=t.white;else if(l===0)h=t.black;else if(a===0)h=t.grey;else if(r<15||r>=345)h=t.red;else if(r>=15&&r<45)h=c>80&&a>80?t.orange:t.brown;else if(r>=45&&r<75){const b=r>46&&r<54&&c<80&&a>90,u=r>=54&&r<75&&c<80;h=b?t.gold:t.yellow,h=u?t.olive:h}else r>=75&&r<155?h=c<68?t.green:t.lime:r>=155&&r<175?h=t.teal:r>=175&&r<195?h=t.cyan:r>=195&&r<255?h=t.blue:r>=255&&r<270?h=t.violet:r>=270&&r<295?h=t.magenta:r>=295&&r<345&&(h=t.pink);return h}updateVisuals(){const{controlPositions:t,visuals:e}=this,[s,n,r]=e,{offsetHeight:i}=s,a=t.c2y/i,{r:l,g:c,b:h}=new y({h:a,s:1,l:.5}).toRgb(),b="linear-gradient(rgb(255,255,255) 0%, rgb(255,255,255) 100%)",u=1-t.c3y/i,d=k(u*100)/100,g=new y({h:a,s:1,l:.5,a:u}).toRgbString(),p=`linear-gradient(
2
+ rgb(255,0,0) 0%, rgb(255,255,0) 16.67%,
3
+ rgb(0,255,0) 33.33%, rgb(0,255,255) 50%,
4
+ rgb(0,0,255) 66.67%, rgb(255,0,255) 83.33%,
5
+ rgb(255,0,0) 100%)`;O(s,{background:`linear-gradient(rgba(0,0,0,0) 0%, rgba(0,0,0,${d}) 100%),
6
+ linear-gradient(to right, rgba(255,255,255,${d}) 0%, ${g} 100%),
7
+ ${b}`}),O(n,{background:p}),O(r,{background:`linear-gradient(rgba(${l},${c},${h},1) 0%,rgba(${l},${c},${h},0) 100%)`})}handleFocusOut({relatedTarget:t}){t&&!this.parent.contains(t)&&this.hide(!0)}handleDismiss({code:t}){this.isOpen&&t===Ge&&this.hide()}handleScroll(t){const{activeElement:e}=K(this.input);this.updateDropdownPosition(),([ue,qe].includes(t.type)&&this.dragElement||e&&this.controlKnobs.includes(e))&&(t.stopPropagation(),t.preventDefault())}menuKeyHandler(t){const{target:e,code:s}=t,{previousElementSibling:n,nextElementSibling:r,parentElement:i}=e,a=i&&T(i,"color-options"),l=i?[...i.children]:[],c=a&&Tt(i,"grid-template-columns").split(" ").length,h=l.indexOf(e),b=h>-1&&c&&l[h-c],u=h>-1&&c&&l[h+c];[j,st,_t].includes(s)&&t.preventDefault(),a?b&&s===st?U(b):u&&s===j?U(u):n&&s===ht?U(n):r&&s===G&&U(r):n&&[ht,st].includes(s)?U(n):r&&[G,j].includes(s)&&U(r),[ze,_t].includes(s)&&this.menuClickHandler(t)}menuClickHandler(t){const{target:e}=t,{colorMenu:s}=this,n=(yt(e,"data-value")||"").trim();if(!n.length)return;const r=_("li.active",s);let i=n;i=bt.includes(i)?"white":i,i=i==="transparent"?"rgba(0,0,0,0)":i;const{r:a,g:l,b:c,a:h}=new y(i);B(this.color,{r:a,g:l,b:c,a:h}),this.update(),r!==e&&(r&&(D(r,"active"),St(r,Pt)),q(e,"active"),m(e,Pt,"true"),bt.includes(n)&&(this.value=n),ce(this))}pointerDown(t){const{target:e,pageX:s,pageY:n}=t,{colorMenu:r,visuals:i,controlKnobs:a}=this,[l,c,h]=i,[b,u,d]=a,g=a.includes(e)?e.previousElementSibling:e,p=gt(g),f=Ct(l),w=s-f.scrollLeft-p.left,$=n-f.scrollTop-p.top;if(e===l||e===b?(this.dragElement=g,this.changeControl1(w,$)):e===c||e===u?(this.dragElement=g,this.changeControl2($)):(e===h||e===d)&&(this.dragElement=g,this.changeAlpha($)),r){const P=_("li.active",r);P&&(D(P,"active"),St(P,Pt))}t.preventDefault()}pointerUp({target:t}){const{parent:e}=this,s=K(e),n=_(`${ae}.open`,s)!==null,r=s.getSelection();!this.dragElement&&(!r||!r.toString().length)&&!e.contains(t)&&this.hide(n),this.dragElement=void 0}pointerMove(t){const{dragElement:e,visuals:s}=this,[n,r,i]=s,{pageX:a,pageY:l}=t;if(!e)return;const c=gt(e),h=Ct(n),b=a-h.scrollLeft-c.left,u=l-h.scrollTop-c.top;e===n&&this.changeControl1(b,u),e===r&&this.changeControl2(u),e===i&&this.changeAlpha(u)}handleKnobs(t){const{target:e,code:s}=t;if(![st,j,ht,G].includes(s))return;t.preventDefault();const{controlKnobs:n,visuals:r}=this,{offsetWidth:i,offsetHeight:a}=r[0],[l,c,h]=n,{activeElement:b}=K(l),u=n.find(g=>g===b),d=a/360;if(u){let g=0,p=0;if(e===l){const f=i/100;[ht,G].includes(s)?this.controlPositions.c1x+=s===G?f:-f:[st,j].includes(s)&&(this.controlPositions.c1y+=s===j?d:-d),g=this.controlPositions.c1x,p=this.controlPositions.c1y,this.changeControl1(g,p)}else e===c?(this.controlPositions.c2y+=[j,G].includes(s)?d:-d,p=this.controlPositions.c2y,this.changeControl2(p)):e===h&&(this.controlPositions.c3y+=[j,G].includes(s)?d:-d,p=this.controlPositions.c3y,this.changeAlpha(p));this.handleScroll(t)}}changeHandler(){let t;const{inputs:e,format:s,value:n,input:r,controlPositions:i,visuals:a}=this,{activeElement:l}=K(r),{offsetHeight:c}=a[0],[h,,,b]=e,[u,d,g,p]=s==="rgb"?e.map($=>parseFloat($.value)/($===b?100:1)):e.map($=>parseFloat($.value)/($!==h?100:360)),f=this.hasNonColor&&bt.includes(n),w=b?p:1-i.c3y/c;if(l===r||l&&e.includes(l)){l===r?f?t=n==="transparent"?"rgba(0,0,0,0)":"rgb(0,0,0)":t=n:s==="hex"?t=h.value:s==="hsl"?t={h:u,s:d,l:g,a:w}:s==="hwb"?t={h:u,w:d,b:g,a:w}:t={r:u,g:d,b:g,a:w};const{r:$,g:P,b:L,a:S}=new y(t);B(this.color,{r:$,g:P,b:L,a:S}),this.setControlPositions(),this.updateAppearance(),this.updateInputs(),this.updateControls(),this.updateVisuals(),l===r&&f&&(this.value=n)}}changeControl1(t,e){let[s,n]=[0,0];const{controlPositions:r,visuals:i}=this,{offsetHeight:a,offsetWidth:l}=i[0];t>l?s=l:t>=0&&(s=t),e>a?n=a:e>=0&&(n=e);const c=r.c2y/a,h=s/l,b=1-n/a,u=1-r.c3y/a,{r:d,g,b:p,a:f}=new y({h:c,s:h,v:b,a:u});B(this.color,{r:d,g,b:p,a:f}),this.controlPositions.c1x=s,this.controlPositions.c1y=n,this.updateAppearance(),this.updateInputs(),this.updateControls(),this.updateVisuals()}changeControl2(t){const{controlPositions:e,visuals:s}=this,{offsetHeight:n,offsetWidth:r}=s[0];let i=0;t>n?i=n:t>=0&&(i=t);const a=i/n,l=e.c1x/r,c=1-e.c1y/n,h=1-e.c3y/n,{r:b,g:u,b:d,a:g}=new y({h:a,s:l,v:c,a:h});B(this.color,{r:b,g:u,b:d,a:g}),this.controlPositions.c2y=i,this.updateAppearance(),this.updateInputs(),this.updateControls(),this.updateVisuals()}changeAlpha(t){const{visuals:e}=this,{offsetHeight:s}=e[0];let n=0;t>s?n=s:t>=0&&(n=t);const r=1-n/s;this.color.setAlpha(r),this.controlPositions.c3y=n,this.updateAppearance(),this.updateInputs(),this.updateControls(),this.updateVisuals()}update(){this.updateDropdownPosition(),this.updateAppearance(),this.setControlPositions(),this.updateInputs(!0),this.updateControls(),this.updateVisuals()}updateDropdownPosition(){const{input:t,colorPicker:e,colorMenu:s}=this,n=gt(t),{top:r,bottom:i}=n,{offsetHeight:a}=t,l=Ct(t).clientHeight,h=T(e,"show")?e:s;if(!h)return;const{offsetHeight:b}=h,u=l-i,d=r,g=r+b+a>l,p=r-b<0;(T(h,"bottom")||!p)&&u<d&&g?(D(h,"bottom"),q(h,"top")):(D(h,"top"),q(h,"bottom"))}setControlPositions(){const{visuals:t,color:e,hsv:s}=this,{offsetHeight:n,offsetWidth:r}=t[0],i=e.a,a=s.h,l=s.s,c=s.v;this.controlPositions.c1x=l*r,this.controlPositions.c1y=(1-c)*n,this.controlPositions.c2y=a*n,this.controlPositions.c3y=(1-i)*n}updateAppearance(){const{componentLabels:t,color:e,parent:s,hsv:n,hex:r,format:i,controlKnobs:a}=this,{appearanceLabel:l,hexLabel:c,valueLabel:h}=t;let{r:b,g:u,b:d}=e.toRgb();const[g,p,f]=a,w=k(n.h*360),$=e.a,P=k(n.s*100),L=k(n.v*100),S=this.appearance;let C=`${c} ${r.split("").join(" ")}`;if(i==="hwb"){const{hwb:A}=this,F=k(A.w*100),tt=k(A.b*100);C=`HWB: ${w}°, ${F}%, ${tt}%`,m(g,ot,`${F}% & ${tt}%`),m(g,et,`${F}`),m(p,Gt,`${h}: ${C}. ${l}: ${S}.`),m(p,ot,`${w}%`),m(p,et,`${w}`)}else[b,u,d]=[b,u,d].map(k),C=i==="hsl"?`HSL: ${w}°, ${P}%, ${L}%`:C,C=i==="rgb"?`RGB: ${b}, ${u}, ${d}`:C,m(g,ot,`${L}% & ${P}%`),m(g,et,`${L}`),m(p,Gt,`${h}: ${C}. ${l}: ${S}.`),m(p,ot,`${w}°`),m(p,et,`${w}`);const M=k($*100);m(f,ot,`${M}%`),m(f,et,`${M}`);const E=e.toString();O(this.input,{backgroundColor:E}),this.isDark?(T(s,"txt-light")&&D(s,"txt-light"),T(s,"txt-dark")||q(s,"txt-dark")):(T(s,"txt-dark")&&D(s,"txt-dark"),T(s,"txt-light")||q(s,"txt-light"))}updateControls(){const{controlKnobs:t,controlPositions:e}=this;let{c1x:s,c1y:n,c2y:r,c3y:i}=e;const[a,l,c]=t;[s,n,r,i]=[s,n,r,i].map(k),O(a,{transform:`translate3d(${s-4}px,${n-4}px,0)`}),O(l,{transform:`translate3d(0,${r-4}px,0)`}),O(c,{transform:`translate3d(0,${i-4}px,0)`})}updateInputs(t){const{value:e,format:s,inputs:n,color:r,hsl:i}=this,[a,l,c,h]=n,b=k(r.a*100),u=k(i.h*360);let d=r.toString();if(s==="hex")d=this.color.toHexString(!0),a.value=this.hex;else if(s==="hsl"){const g=k(i.l*100),p=k(i.s*100);d=this.color.toHslString(),a.value=`${u}`,l.value=`${p}`,c.value=`${g}`,h.value=`${b}`}else if(s==="hwb"){const{w:g,b:p}=this.hwb,f=k(g*100),w=k(p*100);d=this.color.toHwbString(),a.value=`${u}`,l.value=`${f}`,c.value=`${w}`,h.value=`${b}`}else if(s==="rgb"){let{r:g,g:p,b:f}=this.rgb;[g,p,f]=[g,p,f].map(k),d=this.color.toRgbString(),a.value=`${g}`,l.value=`${p}`,c.value=`${f}`,h.value=`${b}`}this.value=d,!t&&d!==e&&ce(this)}togglePicker(t){t&&t.preventDefault();const{colorPicker:e}=this;this.isOpen&&T(e,"show")?this.hide(!0):Ht(this,e)}showPicker(){const{colorPicker:t}=this;["top","bottom"].some(e=>T(t,e))||Ht(this,t)}toggleMenu(t){t&&t.preventDefault();const{colorMenu:e}=this;this.isOpen&&T(e,"show")?this.hide(!0):Ht(this,e)}hide(t){if(this.isOpen){const{pickerToggle:e,menuToggle:s,colorPicker:n,colorMenu:r,parent:i,input:a}=this,l=T(n,"show"),c=l?n:r,h=l?e:s,b=c&&so(c);this.value=this.color.toString(!0),c&&(D(c,"show"),m(h,Nt,"false"),setTimeout(()=>{Ee(c),_(".show",i)||(D(i,"open"),Ne(this),this.isOpen=!1)},b)),t||U(e),m(a,Y,"-1"),h===s&&m(s,Y,"-1")}}dispose(){const{input:t,parent:e}=this;this.hide(!0),le(this),[...e.children].forEach(s=>{s!==t&&s.remove()}),St(t,Y),O(t,{backgroundColor:""}),["txt-light","txt-dark"].forEach(s=>D(e,s)),ct.remove(t,Z)}}module.exports=Me;
8
+ //# sourceMappingURL=color-picker.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-picker.cjs","sources":["../../node_modules/@thednp/event-listener/dist/event-listener.mjs","../../node_modules/@thednp/shorty/dist/shorty.mjs","../../node_modules/@thednp/color/dist/index.mjs","../../src/ts/colorPalette.ts","../../src/ts/util/colorPickerLabels.ts","../../src/ts/util/colorNames.ts","../../src/ts/util/isValidJSON.ts","../../src/ts/util/vHidden.ts","../../src/ts/util/getColorForm.ts","../../src/ts/util/getColorControls.ts","../../src/ts/util/getColorMenu.ts","../../src/ts/util/setMarkup.ts","../../src/ts/index.ts"],"sourcesContent":["const e = {}, f = (t) => {\n const { type: c, currentTarget: i } = t;\n [...e[c]].forEach(([n, s]) => {\n i === n && [...s].forEach(([o, a]) => {\n o.apply(n, [t]), typeof a == \"object\" && a.once && r(n, c, o, a);\n });\n });\n}, E = (t, c, i, n) => {\n e[c] || (e[c] = /* @__PURE__ */ new Map());\n const s = e[c];\n s.has(t) || s.set(t, /* @__PURE__ */ new Map());\n const o = s.get(t), { size: a } = o;\n o.set(i, n), a || t.addEventListener(c, f, n);\n}, r = (t, c, i, n) => {\n const s = e[c], o = s && s.get(t), a = o && o.get(i), d = a !== void 0 ? a : n;\n o && o.has(i) && o.delete(i), s && (!o || !o.size) && s.delete(t), (!s || !s.size) && delete e[c], (!o || !o.size) && t.removeEventListener(c, f, d);\n}, g = E, M = r;\nexport {\n E as addListener,\n f as globalListener,\n M as off,\n g as on,\n e as registry,\n r as removeListener\n};\n//# sourceMappingURL=event-listener.mjs.map\n","const pe = \"aria-checked\", fe = \"aria-description\", me = \"aria-describedby\", ge = \"aria-expanded\", ve = \"aria-haspopup\", Ee = \"aria-hidden\", be = \"aria-label\", he = \"aria-labelledby\", ye = \"aria-modal\", we = \"aria-pressed\", Ae = \"aria-selected\", Se = \"aria-valuemin\", Me = \"aria-valuemax\", Ne = \"aria-valuenow\", ke = \"aria-valuetext\", G = \"abort\", j = \"beforeunload\", J = \"blur\", K = \"change\", X = \"contextmenu\", P = \"DOMContentLoaded\", Y = \"DOMMouseScroll\", Z = \"error\", $ = \"focus\", _ = \"focusin\", tt = \"focusout\", et = \"gesturechange\", nt = \"gestureend\", ot = \"gesturestart\", st = \"keydown\", ct = \"keypress\", rt = \"keyup\", at = \"load\", it = \"click\", ut = \"dblclick\", lt = \"mousedown\", dt = \"mouseup\", pt = \"hover\", ft = \"mouseenter\", mt = \"mouseleave\", gt = \"mousein\", vt = \"mouseout\", Et = \"mouseover\", bt = \"mousemove\", ht = \"mousewheel\", yt = \"move\", wt = \"orientationchange\", At = \"pointercancel\", St = \"pointerdown\", Mt = \"pointerleave\", Nt = \"pointermove\", kt = \"pointerup\", Tt = \"readystatechange\", Dt = \"reset\", Ct = \"resize\", Lt = \"select\", Ot = \"selectend\", It = \"selectstart\", zt = \"scroll\", xt = \"submit\", Vt = \"touchstart\", Bt = \"touchmove\", Ht = \"touchcancel\", Pt = \"touchend\", Ut = \"unload\", Te = {\n DOMContentLoaded: P,\n DOMMouseScroll: Y,\n abort: G,\n beforeunload: j,\n blur: J,\n change: K,\n click: it,\n contextmenu: X,\n dblclick: ut,\n error: Z,\n focus: $,\n focusin: _,\n focusout: tt,\n gesturechange: et,\n gestureend: nt,\n gesturestart: ot,\n hover: pt,\n keydown: st,\n keypress: ct,\n keyup: rt,\n load: at,\n mousedown: lt,\n mousemove: bt,\n mousein: gt,\n mouseout: vt,\n mouseenter: ft,\n mouseleave: mt,\n mouseover: Et,\n mouseup: dt,\n mousewheel: ht,\n move: yt,\n orientationchange: wt,\n pointercancel: At,\n pointerdown: St,\n pointerleave: Mt,\n pointermove: Nt,\n pointerup: kt,\n readystatechange: Tt,\n reset: Dt,\n resize: Ct,\n scroll: zt,\n select: Lt,\n selectend: Ot,\n selectstart: It,\n submit: xt,\n touchcancel: Ht,\n touchend: Pt,\n touchmove: Bt,\n touchstart: Vt,\n unload: Ut\n}, De = \"drag\", Ce = \"dragstart\", Le = \"dragenter\", Oe = \"dragleave\", Ie = \"dragover\", ze = \"dragend\", xe = \"loadstart\", Ve = {\n start: \"mousedown\",\n end: \"mouseup\",\n move: \"mousemove\",\n cancel: \"mouseleave\"\n}, Be = { down: \"mousedown\", up: \"mouseup\" }, He = \"onmouseleave\" in document ? [\"mouseenter\", \"mouseleave\"] : (\n /* istanbul ignore next */\n [\"mouseover\", \"mouseout\"]\n), Pe = {\n start: \"touchstart\",\n end: \"touchend\",\n move: \"touchmove\",\n cancel: \"touchcancel\"\n}, Ue = { in: \"focusin\", out: \"focusout\" }, Fe = {\n Backspace: \"Backspace\",\n // 8\n Tab: \"Tab\",\n // 9\n Enter: \"Enter\",\n // 13\n Shift: \"Shift\",\n // 16\n Control: \"Control\",\n // 17\n Alt: \"Alt\",\n // 18\n Pause: \"Pause\",\n // 19\n CapsLock: \"CapsLock\",\n // 20\n Escape: \"Escape\",\n // 27\n Scape: \"Space\",\n // 32\n ArrowLeft: \"ArrowLeft\",\n // 37\n ArrowUp: \"ArrowUp\",\n // 38\n ArrowRight: \"ArrowRight\",\n // 39\n ArrowDown: \"ArrowDown\",\n // 40\n Insert: \"Insert\",\n // 45\n Delete: \"Delete\",\n // 46\n Meta: \"Meta\",\n // 91 windows key\n ContextMenu: \"ContextMenu\",\n // 93\n ScrollLock: \"ScrollLock\"\n // 145\n}, We = \"Alt\", Re = \"ArrowDown\", Qe = \"ArrowUp\", qe = \"ArrowLeft\", Ge = \"ArrowRight\", je = \"Backspace\", Je = \"CapsLock\", Ke = \"Control\", Xe = \"Delete\", Ye = \"Enter\", Ze = \"Escape\", $e = \"Insert\", _e = \"Meta\", tn = \"Pause\", en = \"ScrollLock\", nn = \"Shift\", on = \"Space\", sn = \"Tab\", Ft = \"animationDuration\", Wt = \"animationDelay\", U = \"animationName\", D = \"animationend\", Rt = \"transitionDuration\", Qt = \"transitionDelay\", C = \"transitionend\", F = \"transitionProperty\", cn = \"addEventListener\", rn = \"removeEventListener\", an = {\n linear: \"linear\",\n easingSinusoidalIn: \"cubic-bezier(0.47,0,0.745,0.715)\",\n easingSinusoidalOut: \"cubic-bezier(0.39,0.575,0.565,1)\",\n easingSinusoidalInOut: \"cubic-bezier(0.445,0.05,0.55,0.95)\",\n easingQuadraticIn: \"cubic-bezier(0.550,0.085,0.680,0.530)\",\n easingQuadraticOut: \"cubic-bezier(0.250,0.460,0.450,0.940)\",\n easingQuadraticInOut: \"cubic-bezier(0.455,0.030,0.515,0.955)\",\n easingCubicIn: \"cubic-bezier(0.55,0.055,0.675,0.19)\",\n easingCubicOut: \"cubic-bezier(0.215,0.61,0.355,1)\",\n easingCubicInOut: \"cubic-bezier(0.645,0.045,0.355,1)\",\n easingQuarticIn: \"cubic-bezier(0.895,0.03,0.685,0.22)\",\n easingQuarticOut: \"cubic-bezier(0.165,0.84,0.44,1)\",\n easingQuarticInOut: \"cubic-bezier(0.77,0,0.175,1)\",\n easingQuinticIn: \"cubic-bezier(0.755,0.05,0.855,0.06)\",\n easingQuinticOut: \"cubic-bezier(0.23,1,0.32,1)\",\n easingQuinticInOut: \"cubic-bezier(0.86,0,0.07,1)\",\n easingExponentialIn: \"cubic-bezier(0.95,0.05,0.795,0.035)\",\n easingExponentialOut: \"cubic-bezier(0.19,1,0.22,1)\",\n easingExponentialInOut: \"cubic-bezier(1,0,0,1)\",\n easingCircularIn: \"cubic-bezier(0.6,0.04,0.98,0.335)\",\n easingCircularOut: \"cubic-bezier(0.075,0.82,0.165,1)\",\n easingCircularInOut: \"cubic-bezier(0.785,0.135,0.15,0.86)\",\n easingBackIn: \"cubic-bezier(0.6,-0.28,0.735,0.045)\",\n easingBackOut: \"cubic-bezier(0.175,0.885,0.32,1.275)\",\n easingBackInOut: \"cubic-bezier(0.68,-0.55,0.265,1.55)\"\n}, un = \"offsetHeight\", ln = \"offsetWidth\", dn = \"scrollHeight\", pn = \"scrollWidth\", fn = \"tabindex\", qt = navigator.userAgentData, A = qt, { userAgent: Gt } = navigator, S = Gt, z = /iPhone|iPad|iPod|Android/i;\nlet L = !1;\nA ? L = A.brands.some((t) => z.test(t.brand)) : L = z.test(S);\nconst mn = L, x = /(iPhone|iPod|iPad)/, gn = A ? A.brands.some((t) => x.test(t.brand)) : (\n /* istanbul ignore next */\n x.test(S)\n), vn = S ? S.includes(\"Firefox\") : (\n /* istanbul ignore next */\n !1\n), { head: M } = document, En = [\"webkitPerspective\", \"perspective\"].some((t) => t in M.style), jt = (t, e, n, o) => {\n const s = o || !1;\n t.addEventListener(e, n, s);\n}, Jt = (t, e, n, o) => {\n const s = o || !1;\n t.removeEventListener(e, n, s);\n}, Kt = (t, e, n, o) => {\n const s = (r) => {\n (r.target === t || r.currentTarget === t) && (n.apply(t, [r]), Jt(t, e, s, o));\n };\n jt(t, e, s, o);\n}, Xt = () => {\n}, bn = (() => {\n let t = !1;\n try {\n const e = Object.defineProperty({}, \"passive\", {\n get: () => (t = !0, t)\n });\n Kt(document, P, Xt, e);\n } catch {\n }\n return t;\n})(), hn = [\"webkitTransform\", \"transform\"].some((t) => t in M.style), yn = \"ontouchstart\" in window || /* istanbul ignore next */\n\"msMaxTouchPoints\" in navigator, wn = [\"webkitAnimation\", \"animation\"].some((t) => t in M.style), An = [\"webkitTransition\", \"transition\"].some((t) => t in M.style), Yt = (t, e) => t.getAttribute(e), Sn = (t, e, n) => e.getAttributeNS(t, n), Mn = (t, e) => t.hasAttribute(e), Nn = (t, e, n) => e.hasAttributeNS(t, n), kn = (t, e, n) => t.setAttribute(e, n), Tn = (t, e, n, o) => e.setAttributeNS(t, n, o), Dn = (t, e) => t.removeAttribute(e), Cn = (t, e, n) => e.removeAttributeNS(t, n), Ln = (t, ...e) => {\n t.classList.add(...e);\n}, On = (t, ...e) => {\n t.classList.remove(...e);\n}, In = (t, e) => t.classList.contains(e), { body: zn } = document, { documentElement: xn } = document, Vn = (t) => Array.from(t), v = (t) => t != null && typeof t == \"object\" || !1, i = (t) => v(t) && typeof t.nodeType == \"number\" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some((e) => t.nodeType === e) || !1, u = (t) => i(t) && t.nodeType === 1 || !1, E = /* @__PURE__ */ new Map(), O = {\n data: E,\n /**\n * Sets web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @param instance the component instance\n */\n set: (t, e, n) => {\n if (!u(t))\n return;\n E.has(e) || E.set(e, /* @__PURE__ */ new Map()), E.get(e).set(t, n);\n },\n /**\n * Returns all instances for specified component.\n *\n * @param component the component's name or a unique key\n * @returns all the component instances\n */\n getAllFor: (t) => E.get(t) || null,\n /**\n * Returns the instance associated with the target.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @returns the instance\n */\n get: (t, e) => {\n if (!u(t) || !e)\n return null;\n const n = O.getAllFor(e);\n return t && n && n.get(t) || null;\n },\n /**\n * Removes web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n */\n remove: (t, e) => {\n const n = O.getAllFor(e);\n !n || !u(t) || (n.delete(t), n.size === 0 && E.delete(e));\n }\n}, Bn = (t, e) => O.get(t, e), N = (t) => typeof t == \"string\" || !1, W = (t) => v(t) && t.constructor.name === \"Window\" || !1, R = (t) => i(t) && t.nodeType === 9 || !1, d = (t) => W(t) ? t.document : R(t) ? t : i(t) ? t.ownerDocument : window.document, k = (t, ...e) => Object.assign(t, ...e), Zt = (t) => {\n if (!t)\n return;\n if (N(t))\n return d().createElement(t);\n const { tagName: e } = t, n = Zt(e);\n if (!n)\n return;\n const o = { ...t };\n return delete o.tagName, k(n, o);\n}, $t = (t, e) => {\n if (!t || !e)\n return;\n if (N(e))\n return d().createElementNS(t, e);\n const { tagName: n } = e, o = $t(t, n);\n if (!o)\n return;\n const s = { ...e };\n return delete s.tagName, k(o, s);\n}, Q = (t, e) => t.dispatchEvent(e), Hn = (t, e, n) => n.indexOf(t) === e, g = (t, e) => {\n const n = getComputedStyle(t), o = e.replace(\"webkit\", \"Webkit\").replace(/([A-Z])/g, \"-$1\").toLowerCase();\n return n.getPropertyValue(o);\n}, _t = (t) => {\n const e = g(t, U), n = g(t, Wt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, te = (t) => {\n const e = g(t, U), n = g(t, Ft), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, Pn = (t, e) => {\n let n = 0;\n const o = new Event(D), s = te(t), r = _t(t);\n if (s) {\n const a = (l) => {\n l.target === t && (e.apply(t, [l]), t.removeEventListener(D, a), n = 1);\n };\n t.addEventListener(D, a), setTimeout(() => {\n n || Q(t, o);\n }, s + r + 17);\n } else\n e.apply(t, [o]);\n}, ee = (t) => {\n const e = g(t, F), n = g(t, Qt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, ne = (t) => {\n const e = g(t, F), n = g(t, Rt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, Un = (t, e) => {\n let n = 0;\n const o = new Event(C), s = ne(t), r = ee(t);\n if (s) {\n const a = (l) => {\n l.target === t && (e.apply(t, [l]), t.removeEventListener(C, a), n = 1);\n };\n t.addEventListener(C, a), setTimeout(() => {\n n || Q(t, o);\n }, s + r + 17);\n } else\n e.apply(t, [o]);\n}, Fn = (t) => Float32Array.from(Array.from(t)), Wn = (t) => Float64Array.from(Array.from(t)), Rn = (t, e) => t.focus(e), V = (t) => [\"true\", !0].includes(t) ? !0 : [\"false\", !1].includes(t) ? !1 : [\"null\", \"\", null, void 0].includes(t) ? null : t !== \"\" && !Number.isNaN(+t) ? +t : t, w = (t) => Object.entries(t), oe = (t) => t.toLowerCase(), Qn = (t, e, n, o) => {\n const s = { ...n }, r = { ...t.dataset }, a = { ...e }, l = {}, p = \"title\";\n return w(r).forEach(([c, f]) => {\n const y = o && typeof c == \"string\" && c.includes(o) ? c.replace(o, \"\").replace(/[A-Z]/g, (q) => oe(q)) : c;\n l[y] = V(f);\n }), w(s).forEach(([c, f]) => {\n s[c] = V(f);\n }), w(e).forEach(([c, f]) => {\n c in s ? a[c] = s[c] : c in l ? a[c] = l[c] : a[c] = c === p ? Yt(t, p) : f;\n }), a;\n}, qn = (t, e) => v(t) && (Object.hasOwn(t, e) || e in t), Gn = (t) => Object.keys(t), jn = (t) => Object.values(t), Jn = (t, e) => {\n const n = new CustomEvent(t, {\n cancelable: !0,\n bubbles: !0\n });\n return v(e) && k(n, e), n;\n}, Kn = { passive: !0 }, Xn = (t) => t.offsetHeight, Yn = (t, e) => {\n w(e).forEach(([n, o]) => {\n if (o && N(n) && n.includes(\"--\"))\n t.style.setProperty(n, o);\n else {\n const s = {};\n s[n] = o, k(t.style, s);\n }\n });\n}, I = (t) => v(t) && t.constructor.name === \"Map\" || !1, se = (t) => typeof t == \"number\" || !1, m = /* @__PURE__ */ new Map(), Zn = {\n /**\n * Sets a new timeout timer for an element, or element -> key association.\n *\n * @param element target element\n * @param callback the callback\n * @param delay the execution delay\n * @param key a unique key\n */\n set: (t, e, n, o) => {\n u(t) && (o && o.length ? (m.has(t) || m.set(t, /* @__PURE__ */ new Map()), m.get(t).set(o, setTimeout(e, n))) : m.set(t, setTimeout(e, n)));\n },\n /**\n * Returns the timer associated with the target.\n *\n * @param element target element\n * @param key a unique\n * @returns the timer\n */\n get: (t, e) => {\n if (!u(t))\n return null;\n const n = m.get(t);\n return e && n && I(n) ? n.get(e) || /* istanbul ignore next */\n null : se(n) ? n : null;\n },\n /**\n * Clears the element's timer.\n *\n * @param element target element\n * @param key a unique key\n */\n clear: (t, e) => {\n if (!u(t))\n return;\n const n = m.get(t);\n e && e.length && I(n) ? (clearTimeout(n.get(e)), n.delete(e), n.size === 0 && m.delete(t)) : (clearTimeout(n), m.delete(t));\n }\n}, $n = (t) => t.toUpperCase(), h = (t, e) => {\n const { width: n, height: o, top: s, right: r, bottom: a, left: l } = t.getBoundingClientRect();\n let p = 1, c = 1;\n if (e && u(t)) {\n const { offsetWidth: f, offsetHeight: y } = t;\n p = f > 0 ? Math.round(n) / f : (\n /* istanbul ignore next */\n 1\n ), c = y > 0 ? Math.round(o) / y : (\n /* istanbul ignore next */\n 1\n );\n }\n return {\n width: n / p,\n height: o / c,\n top: s / c,\n right: r / p,\n bottom: a / c,\n left: l / p,\n x: l / p,\n y: s / c\n };\n}, _n = (t) => d(t).body, T = (t) => d(t).documentElement, to = (t) => d(t).head, eo = (t) => {\n const e = W(t), n = e ? t.scrollX : t.scrollLeft, o = e ? t.scrollY : t.scrollTop;\n return { x: n, y: o };\n}, ce = (t) => i(t) && t.constructor.name === \"ShadowRoot\" || !1, no = (t) => t.nodeName === \"HTML\" ? t : u(t) && t.assignedSlot || // step into the shadow DOM of the parent of a slotted node\ni(t) && t.parentNode || // DOM Element detected\nce(t) && t.host || // ShadowRoot detected\nT(t), re = (t) => {\n if (!u(t))\n return !1;\n const { width: e, height: n } = h(t), { offsetWidth: o, offsetHeight: s } = t;\n return Math.round(e) !== o || Math.round(n) !== s;\n}, oo = (t, e, n) => {\n const o = u(e), s = h(t, o && re(e)), r = { x: 0, y: 0 };\n if (o) {\n const a = h(e, !0);\n r.x = a.x + e.clientLeft, r.y = a.y + e.clientTop;\n }\n return {\n x: s.left + n.x - r.x,\n y: s.top + n.y - r.y,\n width: s.width,\n height: s.height\n };\n};\nlet B = 0, H = 0;\nconst b = /* @__PURE__ */ new Map(), ae = (t, e) => {\n let n = e ? B : H;\n if (e) {\n const o = ae(t), s = b.get(o) || /* @__PURE__ */ new Map();\n b.has(o) || b.set(o, s), I(s) && !s.has(e) ? (s.set(e, n), B += 1) : n = s.get(e);\n } else {\n const o = t.id || t;\n b.has(o) ? n = b.get(o) : (b.set(o, n), H += 1);\n }\n return n;\n}, so = (t) => {\n var e;\n return t ? R(t) ? t.defaultView : i(t) ? (e = t == null ? void 0 : t.ownerDocument) == null ? void 0 : e.defaultView : t : window;\n}, ie = (t) => Array.isArray(t) || !1, co = (t) => i(t) && t.nodeName === \"CANVAS\" || !1, ue = (t) => u(t) && !!t.shadowRoot || !1, ro = (t) => i(t) && [1, 2, 3, 4, 5, 6, 7, 8].some((e) => t.nodeType === e) || !1, ao = (t) => {\n if (!i(t))\n return !1;\n const { top: e, bottom: n } = h(t), { clientHeight: o } = T(t);\n return e <= o && n >= 0;\n}, io = (t) => {\n if (!i(t))\n return !1;\n const { clientWidth: e, clientHeight: n } = T(t), { top: o, left: s, bottom: r, right: a } = h(t, !0);\n return o >= 0 && s >= 0 && r <= n && a <= e;\n}, uo = (t) => ie(t) && t.every(u) || !1, lo = (t) => typeof t == \"function\" || !1, po = (t) => v(t) && t.constructor.name === \"HTMLCollection\" || !1, fo = (t) => u(t) && t.tagName === \"IMG\" || !1, mo = (t) => {\n if (!N(t))\n return !1;\n try {\n JSON.parse(t);\n } catch {\n return !1;\n }\n return !0;\n}, go = (t) => v(t) && t.constructor.name === \"WeakMap\" || !1, vo = (t) => i(t) && [\"SVG\", \"Image\", \"Video\", \"Canvas\"].some((e) => t.constructor.name.includes(e)) || !1, Eo = (t) => v(t) && t.constructor.name === \"NodeList\" || !1, bo = (t) => T(t).dir === \"rtl\", ho = (t) => i(t) && t.constructor.name.includes(\"SVG\") || !1, yo = (t) => i(t) && [\"TABLE\", \"TD\", \"TH\"].includes(t.nodeName) || !1, le = (t, e) => t ? t.closest(e) || // break out of `ShadowRoot`\nle(t.getRootNode().host, e) : null, wo = (t, e) => u(t) ? t : (i(e) ? e : d()).querySelector(t), de = (t, e) => (i(e) ? e : d()).getElementsByTagName(t), Ao = (t) => [...de(\"*\", t)].filter(ue), So = (t, e) => d(e).getElementById(t) || null, Mo = (t, e) => (i(e) ? e : d()).querySelectorAll(t), No = (t, e) => (e && i(e) ? e : d()).getElementsByClassName(\n t\n), ko = (t, e) => t.matches(e), To = \"2.0.0alpha15\";\nexport {\n Vn as ArrayFrom,\n P as DOMContentLoadedEvent,\n Y as DOMMouseScrollEvent,\n O as Data,\n Fn as Float32ArrayFrom,\n Wn as Float64ArrayFrom,\n k as ObjectAssign,\n w as ObjectEntries,\n qn as ObjectHasOwn,\n Gn as ObjectKeys,\n jn as ObjectValues,\n Zn as Timer,\n G as abortEvent,\n Ln as addClass,\n cn as addEventListener,\n Wt as animationDelay,\n Ft as animationDuration,\n D as animationEndEvent,\n U as animationName,\n pe as ariaChecked,\n me as ariaDescribedBy,\n fe as ariaDescription,\n ge as ariaExpanded,\n ve as ariaHasPopup,\n Ee as ariaHidden,\n be as ariaLabel,\n he as ariaLabelledBy,\n ye as ariaModal,\n we as ariaPressed,\n Ae as ariaSelected,\n Me as ariaValueMax,\n Se as ariaValueMin,\n Ne as ariaValueNow,\n ke as ariaValueText,\n j as beforeunloadEvent,\n an as bezierEasings,\n J as blurEvent,\n K as changeEvent,\n le as closest,\n X as contextmenuEvent,\n Jn as createCustomEvent,\n Zt as createElement,\n $t as createElementNS,\n Q as dispatchEvent,\n Hn as distinct,\n zn as documentBody,\n xn as documentElement,\n M as documentHead,\n De as dragEvent,\n ze as dragendEvent,\n Le as dragenterEvent,\n Oe as dragleaveEvent,\n Ie as dragoverEvent,\n Ce as dragstartEvent,\n Pn as emulateAnimationEnd,\n Un as emulateTransitionEnd,\n Z as errorEvent,\n Rn as focus,\n $ as focusEvent,\n Ue as focusEvents,\n _ as focusinEvent,\n tt as focusoutEvent,\n et as gesturechangeEvent,\n nt as gestureendEvent,\n ot as gesturestartEvent,\n Yt as getAttribute,\n Sn as getAttributeNS,\n h as getBoundingClientRect,\n Ao as getCustomElements,\n d as getDocument,\n _n as getDocumentBody,\n T as getDocumentElement,\n to as getDocumentHead,\n _t as getElementAnimationDelay,\n te as getElementAnimationDuration,\n So as getElementById,\n g as getElementStyle,\n ee as getElementTransitionDelay,\n ne as getElementTransitionDuration,\n No as getElementsByClassName,\n de as getElementsByTagName,\n Bn as getInstance,\n eo as getNodeScroll,\n no as getParentNode,\n oo as getRectRelativeToOffsetParent,\n ae as getUID,\n so as getWindow,\n Mn as hasAttribute,\n Nn as hasAttributeNS,\n In as hasClass,\n gn as isApple,\n ie as isArray,\n co as isCanvas,\n ue as isCustomElement,\n R as isDocument,\n ro as isElement,\n ao as isElementInScrollRange,\n io as isElementInViewport,\n uo as isElementsArray,\n vn as isFirefox,\n lo as isFunction,\n po as isHTMLCollection,\n u as isHTMLElement,\n fo as isHTMLImageElement,\n mo as isJSON,\n I as isMap,\n vo as isMedia,\n mn as isMobile,\n i as isNode,\n Eo as isNodeList,\n se as isNumber,\n v as isObject,\n bo as isRTL,\n ho as isSVGElement,\n re as isScaledElement,\n ce as isShadowRoot,\n N as isString,\n yo as isTableElement,\n go as isWeakMap,\n W as isWindow,\n We as keyAlt,\n Re as keyArrowDown,\n qe as keyArrowLeft,\n Ge as keyArrowRight,\n Qe as keyArrowUp,\n je as keyBackspace,\n Je as keyCapsLock,\n Ke as keyControl,\n Xe as keyDelete,\n Ye as keyEnter,\n Ze as keyEscape,\n $e as keyInsert,\n _e as keyMeta,\n tn as keyPause,\n en as keyScrollLock,\n nn as keyShift,\n on as keySpace,\n sn as keyTab,\n Fe as keyboardEventKeys,\n st as keydownEvent,\n ct as keypressEvent,\n rt as keyupEvent,\n at as loadEvent,\n xe as loadstartEvent,\n ko as matches,\n Be as mouseClickEvents,\n He as mouseHoverEvents,\n Ve as mouseSwipeEvents,\n it as mouseclickEvent,\n ut as mousedblclickEvent,\n lt as mousedownEvent,\n ft as mouseenterEvent,\n pt as mousehoverEvent,\n gt as mouseinEvent,\n mt as mouseleaveEvent,\n bt as mousemoveEvent,\n vt as mouseoutEvent,\n Et as mouseoverEvent,\n dt as mouseupEvent,\n ht as mousewheelEvent,\n yt as moveEvent,\n Te as nativeEvents,\n Xt as noop,\n Qn as normalizeOptions,\n V as normalizeValue,\n Jt as off,\n un as offsetHeight,\n ln as offsetWidth,\n jt as on,\n Kt as one,\n wt as orientationchangeEvent,\n Kn as passiveHandler,\n At as pointercancelEvent,\n St as pointerdownEvent,\n Mt as pointerleaveEvent,\n Nt as pointermoveEvent,\n kt as pointerupEvent,\n wo as querySelector,\n Mo as querySelectorAll,\n Tt as readystatechangeEvent,\n Xn as reflow,\n Dn as removeAttribute,\n Cn as removeAttributeNS,\n On as removeClass,\n rn as removeEventListener,\n Dt as resetEvent,\n Ct as resizeEvent,\n zt as scrollEvent,\n dn as scrollHeight,\n pn as scrollWidth,\n Lt as selectEvent,\n Ot as selectendEvent,\n It as selectstartEvent,\n kn as setAttribute,\n Tn as setAttributeNS,\n Yn as setElementStyle,\n xt as submitEvent,\n En as support3DTransform,\n wn as supportAnimation,\n bn as supportPassive,\n yn as supportTouch,\n hn as supportTransform,\n An as supportTransition,\n fn as tabindex,\n oe as toLowerCase,\n $n as toUpperCase,\n Pe as touchEvents,\n Ht as touchcancelEvent,\n Pt as touchendEvent,\n Bt as touchmoveEvent,\n Vt as touchstartEvent,\n Qt as transitionDelay,\n Rt as transitionDuration,\n C as transitionEndEvent,\n F as transitionProperty,\n Ut as unloadEvent,\n S as userAgent,\n A as userAgentData,\n To as version\n};\n//# sourceMappingURL=shorty.mjs.map\n","const N = [\"transparent\", \"currentColor\", \"inherit\", \"revert\", \"initial\"], b = (o) => {\n const t = Math.floor(o);\n return o - t < 0.5 ? t : Math.round(o);\n}, T = [\n [\n \"aliceblue\",\n {\n r: 240,\n g: 248,\n b: 255\n }\n ],\n [\n \"antiquewhite\",\n {\n r: 250,\n g: 235,\n b: 215\n }\n ],\n [\n \"aqua\",\n {\n r: 0,\n g: 255,\n b: 255\n }\n ],\n [\n \"aquamarine\",\n {\n r: 127,\n g: 255,\n b: 212\n }\n ],\n [\n \"azure\",\n {\n r: 240,\n g: 255,\n b: 255\n }\n ],\n [\n \"beige\",\n {\n r: 245,\n g: 245,\n b: 220\n }\n ],\n [\n \"bisque\",\n {\n r: 255,\n g: 228,\n b: 196\n }\n ],\n [\n \"black\",\n {\n r: 0,\n g: 0,\n b: 0\n }\n ],\n [\n \"blanchedalmond\",\n {\n r: 255,\n g: 235,\n b: 205\n }\n ],\n [\n \"blue\",\n {\n r: 0,\n g: 0,\n b: 255\n }\n ],\n [\n \"blueviolet\",\n {\n r: 138,\n g: 43,\n b: 226\n }\n ],\n [\n \"brown\",\n {\n r: 165,\n g: 42,\n b: 42\n }\n ],\n [\n \"burlywood\",\n {\n r: 222,\n g: 184,\n b: 135\n }\n ],\n [\n \"cadetblue\",\n {\n r: 95,\n g: 158,\n b: 160\n }\n ],\n [\n \"chartreuse\",\n {\n r: 127,\n g: 255,\n b: 0\n }\n ],\n [\n \"chocolate\",\n {\n r: 210,\n g: 105,\n b: 30\n }\n ],\n [\n \"coral\",\n {\n r: 255,\n g: 127,\n b: 80\n }\n ],\n [\n \"cornflowerblue\",\n {\n r: 100,\n g: 149,\n b: 237\n }\n ],\n [\n \"cornsilk\",\n {\n r: 255,\n g: 248,\n b: 220\n }\n ],\n [\n \"crimson\",\n {\n r: 220,\n g: 20,\n b: 60\n }\n ],\n [\n \"cyan\",\n {\n r: 0,\n g: 255,\n b: 255\n }\n ],\n [\n \"darkblue\",\n {\n r: 0,\n g: 0,\n b: 139\n }\n ],\n [\n \"darkcyan\",\n {\n r: 0,\n g: 139,\n b: 139\n }\n ],\n [\n \"darkgoldenrod\",\n {\n r: 184,\n g: 134,\n b: 11\n }\n ],\n [\n \"darkgray\",\n {\n r: 169,\n g: 169,\n b: 169\n }\n ],\n [\n \"darkgreen\",\n {\n r: 0,\n g: 100,\n b: 0\n }\n ],\n [\n \"darkgrey\",\n {\n r: 169,\n g: 169,\n b: 169\n }\n ],\n [\n \"darkkhaki\",\n {\n r: 189,\n g: 183,\n b: 107\n }\n ],\n [\n \"darkmagenta\",\n {\n r: 139,\n g: 0,\n b: 139\n }\n ],\n [\n \"darkolivegreen\",\n {\n r: 85,\n g: 107,\n b: 47\n }\n ],\n [\n \"darkorange\",\n {\n r: 255,\n g: 140,\n b: 0\n }\n ],\n [\n \"darkorchid\",\n {\n r: 153,\n g: 50,\n b: 204\n }\n ],\n [\n \"darkred\",\n {\n r: 139,\n g: 0,\n b: 0\n }\n ],\n [\n \"darksalmon\",\n {\n r: 233,\n g: 150,\n b: 122\n }\n ],\n [\n \"darkseagreen\",\n {\n r: 143,\n g: 188,\n b: 143\n }\n ],\n [\n \"darkslateblue\",\n {\n r: 72,\n g: 61,\n b: 139\n }\n ],\n [\n \"darkslategray\",\n {\n r: 47,\n g: 79,\n b: 79\n }\n ],\n [\n \"darkslategrey\",\n {\n r: 47,\n g: 79,\n b: 79\n }\n ],\n [\n \"darkturquoise\",\n {\n r: 0,\n g: 206,\n b: 209\n }\n ],\n [\n \"darkviolet\",\n {\n r: 148,\n g: 0,\n b: 211\n }\n ],\n [\n \"deeppink\",\n {\n r: 255,\n g: 20,\n b: 147\n }\n ],\n [\n \"deepskyblue\",\n {\n r: 0,\n g: 191,\n b: 255\n }\n ],\n [\n \"dimgray\",\n {\n r: 105,\n g: 105,\n b: 105\n }\n ],\n [\n \"dimgrey\",\n {\n r: 105,\n g: 105,\n b: 105\n }\n ],\n [\n \"dodgerblue\",\n {\n r: 30,\n g: 144,\n b: 255\n }\n ],\n [\n \"firebrick\",\n {\n r: 178,\n g: 34,\n b: 34\n }\n ],\n [\n \"floralwhite\",\n {\n r: 255,\n g: 250,\n b: 240\n }\n ],\n [\n \"forestgreen\",\n {\n r: 34,\n g: 139,\n b: 34\n }\n ],\n [\n \"fuchsia\",\n {\n r: 255,\n g: 0,\n b: 255\n }\n ],\n [\n \"gainsboro\",\n {\n r: 220,\n g: 220,\n b: 220\n }\n ],\n [\n \"ghostwhite\",\n {\n r: 248,\n g: 248,\n b: 255\n }\n ],\n [\n \"goldenrod\",\n {\n r: 218,\n g: 165,\n b: 32\n }\n ],\n [\n \"gold\",\n {\n r: 255,\n g: 215,\n b: 0\n }\n ],\n [\n \"gray\",\n {\n r: 128,\n g: 128,\n b: 128\n }\n ],\n [\n \"green\",\n {\n r: 0,\n g: 128,\n b: 0\n }\n ],\n [\n \"greenyellow\",\n {\n r: 173,\n g: 255,\n b: 47\n }\n ],\n [\n \"grey\",\n {\n r: 128,\n g: 128,\n b: 128\n }\n ],\n [\n \"honeydew\",\n {\n r: 240,\n g: 255,\n b: 240\n }\n ],\n [\n \"hotpink\",\n {\n r: 255,\n g: 105,\n b: 180\n }\n ],\n [\n \"indianred\",\n {\n r: 205,\n g: 92,\n b: 92\n }\n ],\n [\n \"indigo\",\n {\n r: 75,\n g: 0,\n b: 130\n }\n ],\n [\n \"ivory\",\n {\n r: 255,\n g: 255,\n b: 240\n }\n ],\n [\n \"khaki\",\n {\n r: 240,\n g: 230,\n b: 140\n }\n ],\n [\n \"lavenderblush\",\n {\n r: 255,\n g: 240,\n b: 245\n }\n ],\n [\n \"lavender\",\n {\n r: 230,\n g: 230,\n b: 250\n }\n ],\n [\n \"lawngreen\",\n {\n r: 124,\n g: 252,\n b: 0\n }\n ],\n [\n \"lemonchiffon\",\n {\n r: 255,\n g: 250,\n b: 205\n }\n ],\n [\n \"lightblue\",\n {\n r: 173,\n g: 216,\n b: 230\n }\n ],\n [\n \"lightcoral\",\n {\n r: 240,\n g: 128,\n b: 128\n }\n ],\n [\n \"lightcyan\",\n {\n r: 224,\n g: 255,\n b: 255\n }\n ],\n [\n \"lightgoldenrodyellow\",\n {\n r: 250,\n g: 250,\n b: 210\n }\n ],\n [\n \"lightgray\",\n {\n r: 211,\n g: 211,\n b: 211\n }\n ],\n [\n \"lightgreen\",\n {\n r: 144,\n g: 238,\n b: 144\n }\n ],\n [\n \"lightgrey\",\n {\n r: 211,\n g: 211,\n b: 211\n }\n ],\n [\n \"lightpink\",\n {\n r: 255,\n g: 182,\n b: 193\n }\n ],\n [\n \"lightsalmon\",\n {\n r: 255,\n g: 160,\n b: 122\n }\n ],\n [\n \"lightseagreen\",\n {\n r: 32,\n g: 178,\n b: 170\n }\n ],\n [\n \"lightskyblue\",\n {\n r: 135,\n g: 206,\n b: 250\n }\n ],\n [\n \"lightslategray\",\n {\n r: 119,\n g: 136,\n b: 153\n }\n ],\n [\n \"lightslategrey\",\n {\n r: 119,\n g: 136,\n b: 153\n }\n ],\n [\n \"lightsteelblue\",\n {\n r: 176,\n g: 196,\n b: 222\n }\n ],\n [\n \"lightyellow\",\n {\n r: 255,\n g: 255,\n b: 224\n }\n ],\n [\n \"lime\",\n {\n r: 0,\n g: 255,\n b: 0\n }\n ],\n [\n \"limegreen\",\n {\n r: 50,\n g: 205,\n b: 50\n }\n ],\n [\n \"linen\",\n {\n r: 250,\n g: 240,\n b: 230\n }\n ],\n [\n \"magenta\",\n {\n r: 255,\n g: 0,\n b: 255\n }\n ],\n [\n \"maroon\",\n {\n r: 128,\n g: 0,\n b: 0\n }\n ],\n [\n \"mediumaquamarine\",\n {\n r: 102,\n g: 205,\n b: 170\n }\n ],\n [\n \"mediumblue\",\n {\n r: 0,\n g: 0,\n b: 205\n }\n ],\n [\n \"mediumorchid\",\n {\n r: 186,\n g: 85,\n b: 211\n }\n ],\n [\n \"mediumpurple\",\n {\n r: 147,\n g: 112,\n b: 219\n }\n ],\n [\n \"mediumseagreen\",\n {\n r: 60,\n g: 179,\n b: 113\n }\n ],\n [\n \"mediumslateblue\",\n {\n r: 123,\n g: 104,\n b: 238\n }\n ],\n [\n \"mediumspringgreen\",\n {\n r: 0,\n g: 250,\n b: 154\n }\n ],\n [\n \"mediumturquoise\",\n {\n r: 72,\n g: 209,\n b: 204\n }\n ],\n [\n \"mediumvioletred\",\n {\n r: 199,\n g: 21,\n b: 133\n }\n ],\n [\n \"midnightblue\",\n {\n r: 25,\n g: 25,\n b: 112\n }\n ],\n [\n \"mintcream\",\n {\n r: 245,\n g: 255,\n b: 250\n }\n ],\n [\n \"mistyrose\",\n {\n r: 255,\n g: 228,\n b: 225\n }\n ],\n [\n \"moccasin\",\n {\n r: 255,\n g: 228,\n b: 181\n }\n ],\n [\n \"navajowhite\",\n {\n r: 255,\n g: 222,\n b: 173\n }\n ],\n [\n \"navy\",\n {\n r: 0,\n g: 0,\n b: 128\n }\n ],\n [\n \"oldlace\",\n {\n r: 253,\n g: 245,\n b: 230\n }\n ],\n [\n \"olive\",\n {\n r: 128,\n g: 128,\n b: 0\n }\n ],\n [\n \"olivedrab\",\n {\n r: 107,\n g: 142,\n b: 35\n }\n ],\n [\n \"orange\",\n {\n r: 255,\n g: 165,\n b: 0\n }\n ],\n [\n \"orangered\",\n {\n r: 255,\n g: 69,\n b: 0\n }\n ],\n [\n \"orchid\",\n {\n r: 218,\n g: 112,\n b: 214\n }\n ],\n [\n \"palegoldenrod\",\n {\n r: 238,\n g: 232,\n b: 170\n }\n ],\n [\n \"palegreen\",\n {\n r: 152,\n g: 251,\n b: 152\n }\n ],\n [\n \"paleturquoise\",\n {\n r: 175,\n g: 238,\n b: 238\n }\n ],\n [\n \"palevioletred\",\n {\n r: 219,\n g: 112,\n b: 147\n }\n ],\n [\n \"papayawhip\",\n {\n r: 255,\n g: 239,\n b: 213\n }\n ],\n [\n \"peachpuff\",\n {\n r: 255,\n g: 218,\n b: 185\n }\n ],\n [\n \"peru\",\n {\n r: 205,\n g: 133,\n b: 63\n }\n ],\n [\n \"pink\",\n {\n r: 255,\n g: 192,\n b: 203\n }\n ],\n [\n \"plum\",\n {\n r: 221,\n g: 160,\n b: 221\n }\n ],\n [\n \"powderblue\",\n {\n r: 176,\n g: 224,\n b: 230\n }\n ],\n [\n \"purple\",\n {\n r: 128,\n g: 0,\n b: 128\n }\n ],\n [\n \"rebeccapurple\",\n {\n r: 102,\n g: 51,\n b: 153\n }\n ],\n [\n \"red\",\n {\n r: 255,\n g: 0,\n b: 0\n }\n ],\n [\n \"rosybrown\",\n {\n r: 188,\n g: 143,\n b: 143\n }\n ],\n [\n \"royalblue\",\n {\n r: 65,\n g: 105,\n b: 225\n }\n ],\n [\n \"saddlebrown\",\n {\n r: 139,\n g: 69,\n b: 19\n }\n ],\n [\n \"salmon\",\n {\n r: 250,\n g: 128,\n b: 114\n }\n ],\n [\n \"sandybrown\",\n {\n r: 244,\n g: 164,\n b: 96\n }\n ],\n [\n \"seagreen\",\n {\n r: 46,\n g: 139,\n b: 87\n }\n ],\n [\n \"seashell\",\n {\n r: 255,\n g: 245,\n b: 238\n }\n ],\n [\n \"sienna\",\n {\n r: 160,\n g: 82,\n b: 45\n }\n ],\n [\n \"silver\",\n {\n r: 192,\n g: 192,\n b: 192\n }\n ],\n [\n \"skyblue\",\n {\n r: 135,\n g: 206,\n b: 235\n }\n ],\n [\n \"slateblue\",\n {\n r: 106,\n g: 90,\n b: 205\n }\n ],\n [\n \"slategray\",\n {\n r: 112,\n g: 128,\n b: 144\n }\n ],\n [\n \"slategrey\",\n {\n r: 112,\n g: 128,\n b: 144\n }\n ],\n [\n \"snow\",\n {\n r: 255,\n g: 250,\n b: 250\n }\n ],\n [\n \"springgreen\",\n {\n r: 0,\n g: 255,\n b: 127\n }\n ],\n [\n \"steelblue\",\n {\n r: 70,\n g: 130,\n b: 180\n }\n ],\n [\n \"tan\",\n {\n r: 210,\n g: 180,\n b: 140\n }\n ],\n [\n \"teal\",\n {\n r: 0,\n g: 128,\n b: 128\n }\n ],\n [\n \"thistle\",\n {\n r: 216,\n g: 191,\n b: 216\n }\n ],\n [\n \"tomato\",\n {\n r: 255,\n g: 99,\n b: 71\n }\n ],\n [\n \"turquoise\",\n {\n r: 64,\n g: 224,\n b: 208\n }\n ],\n [\n \"violet\",\n {\n r: 238,\n g: 130,\n b: 238\n }\n ],\n [\n \"wheat\",\n {\n r: 245,\n g: 222,\n b: 179\n }\n ],\n [\n \"white\",\n {\n r: 255,\n g: 255,\n b: 255\n }\n ],\n [\n \"whitesmoke\",\n {\n r: 245,\n g: 245,\n b: 245\n }\n ],\n [\n \"yellow\",\n {\n r: 255,\n g: 255,\n b: 0\n }\n ],\n [\n \"yellowgreen\",\n {\n r: 154,\n g: 205,\n b: 50\n }\n ]\n], B = \"deg|rad|grad|turn\", U = \"[-\\\\+]?\\\\d+%?\", D = \"[-\\\\+]?\\\\d*\\\\.\\\\d+%?\", L = `[-\\\\+]?\\\\d*\\\\.?\\\\d+(?:${B})?`, v = `(?:${D})|(?:${U})`, F = `(?:${v})|(?:${L}?)`, rr = \"(?:[\\\\s|\\\\(\\\\s|\\\\s\\\\(\\\\s]+)?\", tr = \"(?:[\\\\s|\\\\)\\\\s]+)?\", O = \"(?:[,|\\\\s]+)\", er = \"(?:[,|\\\\/\\\\s]*)?\", $ = `${rr}(${F})${O}(${v})${O}(${v})${er}(${v})?${tr}`, f = {\n CSS_UNIT: new RegExp(F),\n ANGLES: B,\n CSS_ANGLE: L,\n CSS_INTEGER: U,\n CSS_NUMBER: D,\n CSS_UNIT2: F,\n PERMISSIVE_MATCH: $,\n hwb: new RegExp(`hwb${$}`),\n rgb: new RegExp(`rgb(?:a)?${$}`),\n hsl: new RegExp(`hsl(?:a)?${$}`),\n hsv: new RegExp(`hsv(?:a)?${$}`),\n hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/\n}, V = (o) => N.includes(o), k = (o, t) => o !== null && typeof o == \"object\" && Object.keys(t).every((r) => r in o), Z = (o) => `${o}`.includes(\".\") && parseFloat(o) === 1, R = (o) => typeof o == \"string\" && o.includes(\"%\"), c = (o) => !!f.CSS_UNIT.exec(`${o}`), z = [\"rgb\", \"hex\", \"hsl\", \"hsv\", \"hwb\"], J = (o) => N.includes(o) || [\"#\", ...z].some((t) => o.includes(t)) ? !1 : T.some(([t]) => o === t), u = (o, t) => {\n let r = o;\n if (typeof o == \"number\" && Math.min(o, 0) === 0 && // round values to 6 decimals Math.round(N * (10 ** 6)) / 10 ** 6\n Math.max(o, 1) === 1)\n return o;\n Z(o) && (r = \"100%\");\n const e = R(r);\n return r = t === 360 ? parseFloat(r) : Math.min(t, Math.max(0, parseFloat(r))), e && (r = r * t / 100), Math.abs(r - t) < 1e-6 ? 1 : (t === 360 ? r = (r < 0 ? r % t + t : r % t) / t : r = r % t / t, r);\n}, M = (o) => {\n let t = parseFloat(o);\n return (Number.isNaN(t) || t < 0 || t > 1) && (t = 1), t;\n}, x = (o) => Math.min(1, Math.max(0, o)), p = (o) => o.length === 1 ? `0${o}` : String(o), K = (o) => {\n const [[, t]] = T.filter(([r]) => r === o.toLowerCase());\n return t;\n}, h = (o) => parseInt(o, 16), E = (o) => h(o) / 255, Q = (o) => b(o * 255).toString(16), _ = (o, t, r) => {\n const e = Math.max(o, t, r), s = Math.min(o, t, r);\n let n = 0, g = 0;\n const a = (e + s) / 2;\n if (e === s)\n g = 0, n = 0;\n else {\n const i = e - s;\n g = a > 0.5 ? i / (2 - e - s) : i / (e + s), e === o && (n = (t - r) / i + (t < r ? 6 : 0)), e === t && (n = (r - o) / i + 2), e === r && (n = (o - t) / i + 4), n /= 6;\n }\n return { h: n, s: g, l: a };\n}, H = (o, t, r) => {\n let e = r;\n return e < 0 && (e += 1), e > 1 && (e -= 1), e < 1 / 6 ? o + (t - o) * (6 * e) : e < 1 / 2 ? t : e < 2 / 3 ? o + (t - o) * (2 / 3 - e) * 6 : o;\n}, y = (o, t, r) => {\n let e = 0, s = 0, n = 0;\n if (t === 0)\n s = r, n = r, e = r;\n else if (r) {\n const g = r < 0.5 ? r * (1 + t) : r + t - r * t, a = 2 * r - g;\n e = H(a, g, o + 1 / 3), s = H(a, g, o), n = H(a, g, o - 1 / 3);\n }\n return { r: e, g: s, b: n };\n}, G = (o, t, r) => {\n let e = 0, s = 0;\n const n = Math.min(o, t, r), g = Math.max(o, t, r), a = 1 - g;\n if (g === n)\n return { h: 0, w: n, b: a };\n o === n ? (e = t - r, s = 3) : (e = t === n ? r - o : o - t, s = t === n ? 5 : 1);\n const i = (s - e / (g - n)) / 6;\n return {\n h: i === 1 ? 0 : i,\n w: n,\n b: a\n };\n}, X = (o, t, r) => {\n if (t + r >= 1) {\n const g = t / (t + r);\n return { r: g, g, b: g };\n }\n let { r: e, g: s, b: n } = y(o, 1, 0.5);\n return [e, s, n] = [e, s, n].map((g) => g * (1 - t - r) + t), { r: e, g: s, b: n };\n}, P = (o, t, r) => {\n const e = Math.max(o, t, r), s = Math.min(o, t, r);\n let n = 0;\n const g = e, a = e - s, i = e === 0 ? 0 : a / e;\n return e === s ? n = 0 : (o === e && (n = (t - r) / a + (t < r ? 6 : 0)), t === e && (n = (r - o) / a + 2), r === e && (n = (o - t) / a + 4), n /= 6), { h: n, s: i, v: g };\n}, I = (o, t, r) => {\n const e = o * 6, s = t, n = r, g = Math.floor(e), a = e - g, i = n * (1 - s), l = n * (1 - a * s), d = n * (1 - (1 - a) * s), m = g % 6, w = [n, l, i, i, d, n][m], S = [d, n, n, l, i, i][m], A = [i, i, d, n, n, l][m];\n return { r: w, g: S, b: A };\n}, j = (o, t, r, e) => {\n const s = [\n p(b(o).toString(16)),\n p(b(t).toString(16)),\n p(b(r).toString(16))\n ];\n return e && s[0].charAt(0) === s[0].charAt(1) && s[1].charAt(0) === s[1].charAt(1) && s[2].charAt(0) === s[2].charAt(1) ? s[0].charAt(0) + s[1].charAt(0) + s[2].charAt(0) : s.join(\"\");\n}, C = (o, t, r, e, s) => {\n const n = [\n p(b(o).toString(16)),\n p(b(t).toString(16)),\n p(b(r).toString(16)),\n p(Q(e))\n ];\n return s && n[0].charAt(0) === n[0].charAt(1) && n[1].charAt(0) === n[1].charAt(1) && n[2].charAt(0) === n[2].charAt(1) && n[3].charAt(0) === n[3].charAt(1) ? n[0].charAt(0) + n[1].charAt(0) + n[2].charAt(0) + n[3].charAt(0) : n.join(\"\");\n}, Y = (o) => {\n const t = String(o).trim().toLowerCase();\n if (J(t))\n return Object.assign(K(t), {\n a: 1,\n format: \"rgb\",\n ok: !0\n });\n if (V(t))\n return {\n r: 0,\n g: 0,\n b: 0,\n a: t === \"transparent\" ? 0 : 1,\n format: \"rgb\",\n ok: !0\n };\n let [, r, e, s, n] = f.rgb.exec(t) || [];\n return r && e && s ? {\n r,\n g: e,\n b: s,\n a: n !== void 0 ? n : 1,\n format: \"rgb\",\n ok: !0\n } : ([, r, e, s, n] = f.hsl.exec(t) || [], r && e && s ? {\n h: r,\n s: e,\n l: s,\n a: n !== void 0 ? n : 1,\n format: \"hsl\",\n ok: !0\n } : ([, r, e, s, n] = f.hsv.exec(t) || [], r && e && s ? {\n h: r,\n s: e,\n v: s,\n a: n !== void 0 ? n : 1,\n format: \"hsv\",\n ok: !0\n } : ([, r, e, s, n] = f.hwb.exec(t) || [], r && e && s ? {\n h: r,\n w: e,\n b: s,\n a: n !== void 0 ? n : 1,\n format: \"hwb\",\n ok: !0\n } : ([, r, e, s, n] = f.hex8.exec(t) || [], r && e && s && n ? {\n r: h(r),\n g: h(e),\n b: h(s),\n a: E(n),\n format: \"hex\",\n ok: !0\n } : ([, r, e, s] = f.hex6.exec(t) || [], r && e && s ? {\n r: h(r),\n g: h(e),\n b: h(s),\n a: 1,\n format: \"hex\",\n ok: !0\n } : ([, r, e, s, n] = f.hex4.exec(t) || [], r && e && s && n ? {\n r: h(r + r),\n g: h(e + e),\n b: h(s + s),\n a: E(n + n),\n format: \"hex\",\n ok: !0\n } : ([, r, e, s] = f.hex3.exec(t) || [], r && e && s ? {\n r: h(r + r),\n g: h(e + e),\n b: h(s + s),\n a: 1,\n format: \"hex\",\n ok: !0\n } : {\n r: 0,\n g: 0,\n b: 0,\n a: 1,\n format: \"rgb\",\n ok: !o\n })))))));\n}, q = (o) => {\n let t = { r: 0, g: 0, b: 0 }, r = o, e = 1, s, n, g, a, i, l, d, m, w = \"rgb\", S = !1;\n return (!r || typeof r == \"string\") && (r = Y(r), S = r.ok), k(r, t) && c(r.r) && c(r.g) && c(r.b) && ({ r: d, g: m, b: i } = r, [d, m, i] = [d, m, i].map((A) => u(A, R(A) ? 100 : 255)), t = { r: d, g: m, b: i }, w = \"format\" in r ? r.format : \"rgb\"), k(r, { h: 0, s: 0, v: 0 }) && c(r.h) && c(r.s) && c(r.v) && ({ h: l, s, v: n } = r, l = u(l, 360), s = u(s, 100), n = u(n, 100), t = I(l, s, n), w = \"hsv\"), k(r, { h: 0, s: 0, l: 0 }) && c(r.h) && c(r.s) && c(r.l) && ({ h: l, s, l: g } = r, l = u(l, 360), s = u(s, 100), g = u(g, 100), t = y(l, s, g), w = \"hsl\"), k(r, { h: 0, w: 0, b: 0 }) && c(r.h) && c(r.w) && c(r.b) && ({ h: l, w: a, b: i } = r, l = u(l, 360), a = u(a, 100), i = u(i, 100), t = X(l, a, i), w = \"hwb\"), c(r.a) && (e = r.a, e = R(e) || parseFloat(`${e}`) > 1 ? u(e, 100) : e), {\n r: t.r,\n g: t.g,\n b: t.b,\n a: M(e),\n format: w,\n ok: S\n };\n}, sr = \"1.0.7\";\nclass W {\n // bring main utilities to front\n static matchers = f;\n static isOnePointZero = Z;\n static isPercentage = R;\n static isValidCSSUnit = c;\n static isNonColor = V;\n static isColorName = J;\n static isColorType = k;\n static pad2 = p;\n static clamp01 = x;\n static bound01 = u;\n static boundAlpha = M;\n static getRGBFromName = K;\n static convertHexToDecimal = E;\n static convertDecimalToHex = Q;\n static rgbToHsl = _;\n static rgbToHex = j;\n static rgbToHsv = P;\n static rgbToHwb = G;\n static rgbaToHex = C;\n static hslToRgb = I;\n static hsvToRgb = I;\n static hueToRgb = H;\n static hwbToRgb = X;\n static parseIntFromHex = h;\n static stringInputToObject = Y;\n static inputToRGB = q;\n static roundPart = b;\n static webColors = T;\n static nonColors = N;\n static version = sr;\n // main public properties\n r;\n g;\n b;\n a;\n format;\n ok;\n originalInput;\n // main public methods\n constructor(t, r) {\n const e = r && z.includes(r) ? r : \"\", { r: s, g: n, b: g, a, ok: i, format: l } = q(t);\n this.originalInput = t, this.r = s, this.g = n, this.b = g, this.a = a, this.ok = i, this.format = e || l;\n }\n /**\n * Checks if the current input value is a valid colour.\n */\n get isValid() {\n return this.ok;\n }\n /**\n * Checks if the current colour requires a light text colour.\n */\n get isDark() {\n return this.brightness < 120;\n }\n /**\n * Returns the perceived luminance of a colour.\n *\n * @see http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n */\n get luminance() {\n const { r: t, g: r, b: e } = this;\n let s = 0, n = 0, g = 0;\n return t <= 0.03928 ? s = t / 12.92 : s = ((t + 0.055) / 1.055) ** 2.4, r <= 0.03928 ? n = r / 12.92 : n = ((r + 0.055) / 1.055) ** 2.4, e <= 0.03928 ? g = e / 12.92 : g = ((e + 0.055) / 1.055) ** 2.4, 0.2126 * s + 0.7152 * n + 0.0722 * g;\n }\n /**\n * Returns the perceived brightness of the colour.\n */\n get brightness() {\n const { r: t, g: r, b: e } = this.toRgb();\n return (t * 299 + r * 587 + e * 114) / 1e3;\n }\n /**\n * Returns the web colour name closest to the current colour.\n */\n get name() {\n const { r: t, g: r, b: e } = this.toRgb(), [s] = T.map(([n, g]) => {\n const a = (\n // ((rgb.r - r) ** 2 + (rgb.g - g) ** 2 + (rgb.b - b) ** 2) ** 0.5; // standard\n (((g.r - t) * 0.3) ** 2 + ((g.g - r) * 0.6) ** 2 + ((g.b - e) * 0.1) ** 2) ** 0.5\n );\n return [n, a];\n }).find(([, n], g, a) => n === Math.min(...a.map(([, i]) => i)));\n return s;\n }\n /**\n * Returns the colour as an RGBA object.\n */\n toRgb() {\n let { r: t, g: r, b: e, a: s } = this;\n return [t, r, e] = [t, r, e].map((n) => b(n * 255 * 100) / 100), s = b(s * 100) / 100, {\n r: t,\n g: r,\n b: e,\n a: s\n };\n }\n /**\n * Returns the RGBA values concatenated into a CSS3 Module string format.\n * * rgb(255,255,255)\n * * rgba(255,255,255,0.5)\n */\n toRgbString() {\n const { r: t, g: r, b: e, a: s } = this.toRgb(), [n, g, a] = [t, r, e].map(b);\n return s === 1 ? `rgb(${n}, ${g}, ${a})` : `rgba(${n}, ${g}, ${a}, ${s})`;\n }\n /**\n * Returns the RGBA values concatenated into a CSS4 Module string format.\n * * rgb(255 255 255)\n * * rgb(255 255 255 / 50%)\n */\n toRgbCSS4String() {\n const { r: t, g: r, b: e, a: s } = this.toRgb(), [n, g, a] = [t, r, e].map(b), i = s === 1 ? \"\" : ` / ${b(s * 100)}%`;\n return `rgb(${n} ${g} ${a}${i})`;\n }\n /**\n * Returns the hexadecimal value of the colour. When the parameter is *true*\n * it will find a 3 characters shorthand of the decimal value.\n */\n toHex(t) {\n const { r, g: e, b: s, a: n } = this.toRgb();\n return n === 1 ? j(r, e, s, t) : C(r, e, s, n, t);\n }\n /**\n * Returns the CSS valid hexadecimal vaue of the colour. When the parameter is *true*\n * it will find a 3 characters shorthand of the value.\n */\n toHexString(t) {\n return `#${this.toHex(t)}`;\n }\n /**\n * Returns the HEX8 value of the colour.\n */\n toHex8(t) {\n const { r, g: e, b: s, a: n } = this.toRgb();\n return C(r, e, s, n, t);\n }\n /**\n * Returns the HEX8 value of the colour.\n */\n toHex8String(t) {\n return `#${this.toHex8(t)}`;\n }\n /**\n * Returns the colour as a HSVA object.\n */\n toHsv() {\n const { r: t, g: r, b: e, a: s } = this, { h: n, s: g, v: a } = P(t, r, e);\n return {\n h: n,\n s: g,\n v: a,\n a: s\n };\n }\n /**\n * Returns the colour as an HSLA object.\n */\n toHsl() {\n const { r: t, g: r, b: e, a: s } = this, { h: n, s: g, l: a } = _(t, r, e);\n return {\n h: n,\n s: g,\n l: a,\n a: s\n };\n }\n /**\n * Returns the HSLA values concatenated into a CSS3 Module format string.\n * * `hsl(150, 100%, 50%)`\n * * `hsla(150, 100%, 50%, 0.5)`\n */\n toHslString() {\n let { h: t, s: r, l: e, a: s } = this.toHsl();\n return t = b(t * 360), r = b(r * 100), e = b(e * 100), s = b(s * 100) / 100, s === 1 ? `hsl(${t}, ${r}%, ${e}%)` : `hsla(${t}, ${r}%, ${e}%, ${s})`;\n }\n /**\n * Returns the HSLA values concatenated into a CSS4 Module format string.\n * * `hsl(150deg 100% 50%)`\n * * `hsl(150deg 100% 50% / 50%)`\n */\n toHslCSS4String() {\n let { h: t, s: r, l: e, a: s } = this.toHsl();\n t = b(t * 360), r = b(r * 100), e = b(e * 100), s = b(s * 100);\n const n = s < 100 ? ` / ${b(s)}%` : \"\";\n return `hsl(${t}deg ${r}% ${e}%${n})`;\n }\n /**\n * Returns the colour as an HWBA object.\n */\n toHwb() {\n const { r: t, g: r, b: e, a: s } = this, { h: n, w: g, b: a } = G(t, r, e);\n return {\n h: n,\n w: g,\n b: a,\n a: s\n };\n }\n /**\n * Returns the HWBA values concatenated into a string.\n */\n toHwbString() {\n let { h: t, w: r, b: e, a: s } = this.toHwb();\n t = b(t * 360), r = b(r * 100), e = b(e * 100), s = b(s * 100);\n const n = s < 100 ? ` / ${b(s)}%` : \"\";\n return `hwb(${t}deg ${r}% ${e}%${n})`;\n }\n /**\n * Sets the alpha value of the current colour.\n */\n setAlpha(t) {\n return typeof t != \"number\" ? this : (this.a = M(t), this);\n }\n /**\n * Saturate the colour with a given amount.\n */\n saturate(t) {\n if (typeof t != \"number\")\n return this;\n const { h: r, s: e, l: s } = this.toHsl(), { r: n, g, b: a } = y(r, x(e + t / 100), s);\n return Object.assign(this, { r: n, g, b: a }), this;\n }\n /**\n * Desaturate the colour with a given amount.\n */\n desaturate(t) {\n return typeof t == \"number\" ? this.saturate(-t) : this;\n }\n /**\n * Completely desaturates a colour into greyscale.\n * Same as calling `desaturate(100)`\n */\n greyscale() {\n return this.saturate(-100);\n }\n /**\n * Increase the colour lightness with a given amount.\n */\n lighten(t) {\n if (typeof t != \"number\")\n return this;\n const { h: r, s: e, l: s } = this.toHsl(), { r: n, g, b: a } = y(r, e, x(s + t / 100));\n return Object.assign(this, { r: n, g, b: a }), this;\n }\n /**\n * Decrease the colour lightness with a given amount.\n */\n darken(t) {\n return typeof t == \"number\" ? this.lighten(-t) : this;\n }\n /**\n * Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n * Values outside of this range will be wrapped into this range.\n */\n spin(t) {\n if (typeof t != \"number\")\n return this;\n const { h: r, s: e, l: s } = this.toHsl(), { r: n, g, b: a } = y(x((r * 360 + t) % 360 / 360), e, s);\n return Object.assign(this, { r: n, g, b: a }), this;\n }\n /** Returns a clone of the current `Color` instance. */\n clone() {\n return new W(this);\n }\n /**\n * Returns the colour value in CSS valid string format.\n */\n toString(t) {\n const { format: r } = this;\n return r === \"hex\" ? this.toHexString(t) : r === \"hsl\" ? this.toHslString() : r === \"hwb\" ? this.toHwbString() : this.toRgbString();\n }\n}\nexport {\n W as default\n};\n//# sourceMappingURL=index.mjs.map\n","import Color from '@thednp/color';\n// import { isNumber } from '@thednp/shorty';\n\n/**\n * Returns a color palette with a given set of parameters.\n *\n * @example\n * new ColorPalette(0, 12, 10, 80);\n * // => { hue: 0, hueSteps: 12, lightSteps: 10, saturation: 80, colors: Array<Color> }\n */\nexport default class ColorPalette {\n public static Color = Color;\n hue: number;\n hueSteps: number;\n lightSteps: number;\n saturation: number;\n colors: Color[];\n /**\n * The `hue` parameter is optional, which would be set to 0.\n * * `args.hue` the starting Hue [0, 360]\n * * `args.hueSteps` Hue Steps Count [5, 24]\n * * `args.lightSteps` Lightness Steps Count [5, 12]\n * * `args.saturation` Saturation [0, 100]\n */\n constructor(...args: [number?, number?, number?, number?]) {\n let hue = 0;\n let hueSteps = 12;\n let lightSteps = 10;\n let lightnessArray = [0.5];\n let saturation = 100;\n // if (!args.every(n => isNumber(n))) throw TypeError('ColorPalette only accepts numbers.');\n\n if (args.length === 4) {\n [hue, hueSteps, lightSteps, saturation] = args as [number, number, number, number];\n } else if (args.length === 3) {\n [hue, hueSteps, lightSteps] = args as [number, number, number];\n } else if (args.length === 2) {\n [hueSteps, lightSteps] = args as [number, number];\n if ([hueSteps, lightSteps].some(n => n < 1)) {\n throw TypeError('ColorPalette: the two minimum arguments must be numbers higher than 0.');\n }\n }\n\n const colors: Color[] = [];\n const hueStep = 360 / hueSteps;\n const half = Color.roundPart((lightSteps - (lightSteps % 2 ? 1 : 0)) / 2);\n const steps1To13 = [0.25, 0.2, 0.15, 0.11, 0.09, 0.075];\n const lightSets = [\n [1, 2, 3],\n [4, 5],\n [6, 7],\n [8, 9],\n [10, 11],\n [12, 13],\n ];\n const closestSet = lightSets.find(set => set.includes(lightSteps));\n\n // find a lightStep that won't go beyond black and white\n // something within the [10-90] range of lightness\n const lightStep = closestSet\n ? steps1To13[lightSets.indexOf(closestSet)]\n : 100 / (lightSteps + (lightSteps % 2 ? 0 : 1)) / 100;\n\n // light tints\n for (let i = 1; i < half + 1; i += 1) {\n lightnessArray = [...lightnessArray, 0.5 + lightStep * i];\n }\n\n // dark tints\n for (let i = 1; i < lightSteps - half; i += 1) {\n lightnessArray = [0.5 - lightStep * i, ...lightnessArray];\n }\n\n // feed `colors` Array\n for (let i = 0; i < hueSteps; i += 1) {\n const currentHue = ((hue + i * hueStep) % 360) / 360;\n lightnessArray.forEach(l => {\n const newColor = new Color({ h: currentHue, s: 1, l });\n colors.push(saturation < 100 ? newColor.saturate(saturation - 100) : newColor);\n });\n }\n\n this.hue = hue;\n this.hueSteps = hueSteps;\n this.lightSteps = lightSteps;\n this.saturation = saturation;\n this.colors = colors;\n }\n}\n","import ColorPickerLabels from '../interface/colorPickerLabels';\n\n/** The labels presented to the user. */\nconst colorPickerLabels: ColorPickerLabels = {\n pickerLabel: 'Colour Picker',\n appearanceLabel: 'Colour Appearance',\n valueLabel: 'Colour Value',\n toggleLabel: 'Select Colour',\n presetsLabel: 'Colour Presets',\n defaultsLabel: 'Colour Defaults',\n formatLabel: 'Format',\n alphaLabel: 'Alpha',\n hexLabel: 'Hexadecimal',\n hueLabel: 'Hue',\n whitenessLabel: 'Whiteness',\n blacknessLabel: 'Blackness',\n saturationLabel: 'Saturation',\n lightnessLabel: 'Lightness',\n redLabel: 'Red',\n greenLabel: 'Green',\n blueLabel: 'Blue',\n};\n\nexport default colorPickerLabels;\n","/** A list of 17 color names used for WAI-ARIA compliance. */\nconst colorNames: string[] = [\n 'white',\n 'black',\n 'grey',\n 'red',\n 'orange',\n 'brown',\n 'gold',\n 'olive',\n 'yellow',\n 'lime',\n 'green',\n 'teal',\n 'cyan',\n 'blue',\n 'violet',\n 'magenta',\n 'pink',\n];\nexport default colorNames;\n","import { isString } from '@thednp/shorty';\n\n/**\n * Check if a string is valid JSON string.\n *\n * @param str the string input\n * @returns the query result\n */\nconst isValidJSON = (str: unknown): str is string => {\n if (!isString(str)) return false;\n try {\n JSON.parse(str);\n } catch (e) {\n return false;\n }\n return true;\n};\n\nexport default isValidJSON;\n","const vHidden = 'v-hidden';\nexport default vHidden;\n","import { createElement, setAttribute, ObjectAssign, toUpperCase } from '@thednp/shorty';\n\nimport vHidden from './vHidden';\nimport ColorPicker from '../index';\n\n/**\n * Returns the color form for `ColorPicker`.\n *\n * @param self the `ColorPicker` instance\n * @returns a new `<div>` element with color component `<input>`\n */\nconst getColorForm = (self: ColorPicker): HTMLElement => {\n const { format, id, componentLabels } = self;\n const colorForm = createElement({\n tagName: 'div',\n className: `color-form ${format}`,\n }) as HTMLElement;\n\n let components = ['hex'];\n if (format === 'rgb') components = ['red', 'green', 'blue', 'alpha'];\n else if (format === 'hsl') components = ['hue', 'saturation', 'lightness', 'alpha'];\n else if (format === 'hwb') components = ['hue', 'whiteness', 'blackness', 'alpha'];\n\n components.forEach((c: string): void => {\n const [C] = format === 'hex' ? ['#'] : toUpperCase(c).split('');\n const cID = `color_${format}_${c}_${id}`;\n const formatLabel = componentLabels[`${c}Label`];\n const cInputLabel = createElement({ tagName: 'label' }) as HTMLElement;\n setAttribute(cInputLabel, 'for', cID);\n cInputLabel.append(\n createElement({\n tagName: 'span',\n ariaHidden: 'true',\n innerText: `${C}:`,\n }) as HTMLElement,\n createElement({\n tagName: 'span',\n className: vHidden,\n innerText: formatLabel,\n }) as HTMLElement,\n );\n const cInput = createElement({\n tagName: 'input',\n id: cID,\n // name: cID, - prevent saving the value to a form\n type: format === 'hex' ? 'text' : 'number',\n value: c === 'alpha' ? '100' : '0',\n className: `color-input ${c}`,\n autocomplete: 'off',\n spellcheck: false,\n } as Partial<HTMLInputElement>) as HTMLInputElement;\n\n // alpha\n let max = '100';\n let step = '1';\n if (c !== 'alpha') {\n if (format === 'rgb') {\n max = '255';\n step = '1';\n } else if (c === 'hue') {\n max = '360';\n step = '1';\n }\n }\n ObjectAssign(cInput, {\n min: '0',\n max,\n step,\n });\n colorForm.append(cInputLabel, cInput);\n });\n return colorForm;\n};\n\nexport default getColorForm;\n","import { createElement } from '@thednp/shorty';\n\nimport ColorPicker from '..';\n\n/**\n * Returns all color controls for `ColorPicker`.\n *\n * @param self the `ColorPicker` instance\n * @returns color controls\n */\nconst getColorControls = (self: ColorPicker): HTMLElement => {\n const { format, componentLabels } = self;\n const { hueLabel, alphaLabel, lightnessLabel, saturationLabel, whitenessLabel, blacknessLabel } = componentLabels;\n\n const max1 = format === 'hsl' ? 360 : 100;\n const max2 = format === 'hsl' ? 100 : 360;\n const max3 = 100;\n\n let ctrl1Label = format === 'hsl' ? `${hueLabel} & ${lightnessLabel}` : `${lightnessLabel} & ${saturationLabel}`;\n\n ctrl1Label = format === 'hwb' ? `${whitenessLabel} & ${blacknessLabel}` : ctrl1Label;\n\n const ctrl2Label = format === 'hsl' ? `${saturationLabel}` : `${hueLabel}`;\n\n const colorControls = createElement({\n tagName: 'div',\n className: `color-controls ${format}`,\n }) as HTMLElement;\n\n const colorPointer = 'color-pointer';\n const colorSlider = 'color-slider';\n\n const controls = [\n {\n i: 1,\n c: colorPointer,\n l: ctrl1Label,\n min: 0,\n max: max1,\n },\n {\n i: 2,\n c: colorSlider,\n l: ctrl2Label,\n min: 0,\n max: max2,\n },\n {\n i: 3,\n c: colorSlider,\n l: alphaLabel,\n min: 0,\n max: max3,\n },\n ];\n\n controls.forEach(template => {\n const { i, c, l, min, max } = template;\n const control = createElement({\n tagName: 'div',\n className: 'color-control',\n role: 'presentation',\n }) as HTMLElement;\n\n control.append(\n createElement({\n tagName: 'div',\n className: `visual-control visual-control${i}`,\n }) as HTMLElement,\n );\n\n const knob = createElement({\n tagName: 'div',\n className: `${c} knob`,\n ariaLive: 'polite',\n ariaLabel: l,\n role: 'slider',\n tabIndex: 0,\n ariaValueMin: `${min}`,\n ariaValueMax: `${max}`,\n }) as HTMLElement;\n\n control.append(knob);\n colorControls.append(control);\n });\n\n return colorControls;\n};\n\nexport default getColorControls;\n","import { setAttribute, getAttribute, createElement, setElementStyle } from '@thednp/shorty';\n\nimport Color from '@thednp/color';\nimport ColorPalette from '../colorPalette';\nimport ColorPicker from '../index';\n\n/**\n * Returns a color-defaults with given values and class.\n */\nconst getColorMenu = (self: ColorPicker, colorsSource: ColorPalette | string[], menuClass: string): HTMLElement => {\n const { input, format, componentLabels } = self;\n const { defaultsLabel, presetsLabel } = componentLabels;\n const isOptionsMenu = menuClass === 'color-options';\n const isPalette = colorsSource instanceof ColorPalette;\n const menuLabel = isOptionsMenu ? presetsLabel : defaultsLabel;\n const colorsArray = isPalette ? colorsSource.colors : colorsSource;\n const colorsCount = colorsArray.length;\n const { lightSteps } = isPalette ? colorsSource : { lightSteps: null };\n const fit = lightSteps || [9, 10].find(x => colorsCount >= x * 2 && !(colorsCount % x)) || 5;\n const isMultiLine = isOptionsMenu && colorsCount > fit;\n let rowCountHover = 2;\n rowCountHover = isMultiLine && colorsCount > fit * 2 ? 3 : rowCountHover;\n rowCountHover = isMultiLine && colorsCount > fit * 3 ? 4 : rowCountHover;\n rowCountHover = isMultiLine && colorsCount > fit * 4 ? 5 : rowCountHover;\n const rowCount = rowCountHover - (colorsCount <= fit * 3 ? 1 : 2);\n const isScrollable = isMultiLine && colorsCount > rowCount * fit;\n let finalClass = menuClass;\n finalClass += isScrollable ? ' scrollable' : '';\n finalClass += isMultiLine ? ' multiline' : '';\n const gap = isMultiLine ? '1px' : '0.25rem';\n let optionSize = isMultiLine ? 1.75 : 2;\n optionSize = fit > 5 && isMultiLine ? 1.5 : optionSize;\n const menuHeight = `${rowCount * optionSize}rem`;\n const menuHeightHover = `calc(${rowCountHover} * ${optionSize}rem + ${rowCountHover - 1} * ${gap})`;\n\n // <UL> is an `HTMLElement`\n const menu = createElement({\n tagName: 'ul',\n className: finalClass,\n role: 'listbox',\n ariaLabel: menuLabel,\n }) as HTMLElement;\n\n if (isScrollable) {\n setElementStyle(menu, {\n '--grid-item-size': `${optionSize}rem`,\n '--grid-fit': `${fit}`,\n '--grid-gap': gap,\n '--grid-height': menuHeight,\n '--grid-hover-height': menuHeightHover,\n });\n }\n\n colorsArray.forEach(x => {\n let [value, label] = typeof x === 'string' ? x.trim().split(':') : [];\n if (x instanceof Color) {\n value = x.toHexString();\n label = value;\n }\n const color = new Color(x instanceof Color ? x : value, format);\n const isActive = color.toString() === getAttribute(input, 'value');\n const active = isActive ? ' active' : '';\n\n const option = createElement({\n tagName: 'li',\n className: `color-option${active}`,\n innerText: `${label || value}`,\n tabIndex: 0,\n role: 'option',\n ariaSelected: isActive ? 'true' : 'false',\n }) as HTMLElement;\n setAttribute(option, 'data-value', `${value}`);\n\n if (isOptionsMenu) {\n setElementStyle(option, { backgroundColor: value });\n }\n\n menu.append(option);\n });\n return menu;\n};\n\nexport default getColorMenu;\n","import {\n getAttribute,\n setAttribute,\n toUpperCase,\n ariaHidden,\n tabindex,\n createElement,\n createElementNS,\n} from '@thednp/shorty';\n\nimport Color from '@thednp/color';\n\nimport getColorForm from './getColorForm';\nimport getColorControls from './getColorControls';\nimport getColorMenu from './getColorMenu';\nimport vHidden from './vHidden';\n\nimport ColorPicker from '../index';\n\n/**\n * Generate HTML markup and update instance properties.\n *\n * @param self\n */\nconst setMarkup = (self: ColorPicker) => {\n const { input, parent, format, id, componentLabels, colorKeywords, colorPresets } = self;\n const colorValue = getAttribute(input, 'value') || '#fff';\n const { nonColors } = Color;\n\n const { toggleLabel, pickerLabel, formatLabel, hexLabel } = componentLabels;\n\n // update color\n const color = nonColors.includes(colorValue) ? '#fff' : colorValue;\n self.color = new Color(color, format);\n\n // set initial controls dimensions\n const formatString = format === 'hex' ? hexLabel : toUpperCase(format);\n\n const pickerBtn = createElement({\n id: `picker-btn-${id}`,\n tagName: 'button',\n className: 'picker-toggle btn-appearance',\n ariaExpanded: 'false',\n ariaHasPopup: 'true',\n }) as HTMLElement;\n\n pickerBtn.append(\n createElement({\n tagName: 'span',\n className: vHidden,\n innerText: `${pickerLabel}. ${formatLabel}: ${formatString}`,\n }) as HTMLElement,\n );\n\n const pickerDropdown = createElement({\n tagName: 'div',\n className: 'color-dropdown picker',\n role: 'group',\n ariaLabelledBy: `picker-btn-${id}`,\n } as Partial<HTMLElement> & { ariaLabelledBy: string }) as HTMLElement;\n\n const colorControls = getColorControls(self);\n const colorForm = getColorForm(self);\n\n pickerDropdown.append(colorControls, colorForm);\n input.before(pickerBtn);\n parent.append(pickerDropdown);\n\n // set colour key menu template\n if (colorKeywords || colorPresets) {\n const presetsDropdown = createElement({\n tagName: 'div',\n className: 'color-dropdown scrollable menu',\n }) as HTMLElement;\n\n // color presets\n if (colorPresets) {\n presetsDropdown.append(getColorMenu(self, colorPresets, 'color-options'));\n }\n\n // explicit defaults [reset, initial, inherit, transparent, currentColor]\n // also custom defaults [default: #069, complementary: #930]\n if (colorKeywords && colorKeywords.length) {\n presetsDropdown.append(getColorMenu(self, colorKeywords, 'color-defaults'));\n }\n\n const presetsBtn = createElement({\n tagName: 'button',\n className: 'menu-toggle btn-appearance',\n tabIndex: -1,\n ariaExpanded: 'false',\n ariaHasPopup: 'true',\n }) as HTMLElement;\n\n const xmlns = encodeURI('http://www.w3.org/2000/svg');\n const presetsIcon = createElementNS(xmlns, {\n tagName: 'svg',\n }) as HTMLElement;\n setAttribute(presetsIcon, 'xmlns', xmlns);\n setAttribute(presetsIcon, 'viewBox', '0 0 512 512');\n setAttribute(presetsIcon, ariaHidden, 'true');\n\n const path = createElementNS(xmlns, {\n tagName: 'path',\n }) as HTMLElement;\n setAttribute(path, 'd', 'M98,158l157,156L411,158l27,27L255,368L71,185L98,158z');\n setAttribute(path, 'fill', '#fff');\n presetsIcon.append(path);\n presetsBtn.append(\n createElement({\n tagName: 'span',\n className: vHidden,\n innerText: `${toggleLabel}`,\n }) as HTMLElement,\n presetsIcon,\n );\n\n parent.append(presetsBtn, presetsDropdown);\n }\n\n // solve non-colors after settings save\n if (colorKeywords && nonColors.includes(colorValue)) {\n self.value = colorValue;\n }\n setAttribute(input, tabindex, '-1');\n};\n\nexport default setMarkup;\n","import { addListener, removeListener } from '@thednp/event-listener';\n\nimport {\n ariaDescription,\n ariaSelected,\n ariaValueNow,\n ariaValueText,\n ariaExpanded,\n keyArrowDown,\n keyArrowUp,\n keyArrowLeft,\n keyArrowRight,\n keyEnter,\n keySpace,\n keyEscape,\n focusinEvent,\n mouseclickEvent,\n keydownEvent,\n changeEvent,\n touchmoveEvent,\n pointerdownEvent,\n pointermoveEvent,\n pointerupEvent,\n tabindex,\n focusoutEvent,\n resizeEvent,\n keyupEvent,\n scrollEvent,\n dispatchEvent,\n getElementsByClassName,\n closest,\n querySelector,\n getElementTransitionDuration,\n getBoundingClientRect,\n getUID,\n getElementStyle,\n getDocumentElement,\n getDocument,\n ObjectAssign,\n Data,\n getInstance,\n setElementStyle,\n normalizeOptions,\n reflow,\n focus,\n hasClass,\n addClass,\n removeClass,\n setAttribute,\n getAttribute,\n removeAttribute,\n isArray,\n isString,\n getWindow,\n} from '@thednp/shorty';\n\n// ColorPicker Util\n// ================\nimport Color from '@thednp/color';\nimport type { RGBA, HWBA, HSLA, HSVA } from '@thednp/color';\n\nimport ColorPalette from './colorPalette';\nimport colorPickerLabels from './util/colorPickerLabels';\nimport colorNames from './util/colorNames';\nimport isValidJSON from './util/isValidJSON';\nimport setMarkup from './util/setMarkup';\n\nimport ColorPickerOptions from './interface/colorPickerOptions';\nimport ColorPickerLabels from './interface/colorPickerLabels';\nimport { version } from '../../package.json';\n\n// ColorPicker GC\n// ==============\nconst colorPickerString = 'color-picker';\nconst colorPickerSelector = `[data-function=\"${colorPickerString}\"]`;\nconst colorPickerParentSelector = `.${colorPickerString}`;\nconst colorPickerDefaults: ColorPickerOptions = {\n componentLabels: colorPickerLabels,\n colorLabels: colorNames,\n format: 'rgb',\n colorPresets: false,\n colorKeywords: false,\n};\nconst { roundPart, nonColors } = Color;\n\n// ColorPicker Static Methods\n// ==========================\nconst getColorPickerInstance = (element: HTMLInputElement) => getInstance<ColorPicker>(element, colorPickerString);\nconst initColorPicker = (element: HTMLInputElement) => new ColorPicker(element);\n\n// ColorPicker Private Methods\n// ===========================\n\n/**\n * Add / remove `ColorPicker` main event listeners.\n */\nconst toggleEvents = (self: ColorPicker, action?: boolean) => {\n const fn = action ? addListener : removeListener;\n const { input, pickerToggle, menuToggle } = self;\n\n fn(input, focusinEvent, self.showPicker);\n fn(pickerToggle, mouseclickEvent, self.togglePicker);\n\n if (menuToggle) {\n fn(menuToggle, mouseclickEvent, self.toggleMenu);\n }\n};\n\n/**\n * Add / remove `ColorPicker` event listeners active only when open.\n */\nconst toggleEventsOnShown = (self: ColorPicker, action?: boolean) => {\n const fn = action ? addListener : removeListener;\n const { input, colorMenu, parent } = self;\n const doc = getDocument(input);\n const win = getWindow(doc);\n\n fn(self.controls, pointerdownEvent, self.pointerDown as EventListener);\n self.controlKnobs.forEach(x => fn(x, keydownEvent, self.handleKnobs as EventListener));\n\n fn(win, scrollEvent, self.handleScroll);\n fn(win, resizeEvent, self.update);\n\n [input, ...self.inputs].forEach(x => fn(x, changeEvent, self.changeHandler));\n\n if (colorMenu) {\n fn(colorMenu, mouseclickEvent, self.menuClickHandler);\n fn(colorMenu, keydownEvent, self.menuKeyHandler as EventListener);\n }\n\n fn(doc, pointermoveEvent, self.pointerMove as EventListener);\n fn(doc, pointerupEvent, self.pointerUp as EventListener);\n fn(parent, focusoutEvent, self.handleFocusOut as EventListener);\n fn(doc, keyupEvent, self.handleDismiss as EventListener);\n};\n\n/**\n * Triggers the `ColorPicker` original event.\n */\nconst firePickerChange = (self: ColorPicker) => {\n dispatchEvent(self.input, new CustomEvent('colorpicker.change'));\n};\n\n/**\n * Hides a visible dropdown.\n */\nconst removePosition = (element: HTMLElement) => {\n /* istanbul ignore else */\n if (element) {\n ['bottom', 'top'].forEach(x => removeClass(element, x));\n }\n};\n\n/**\n * Shows a `ColorPicker` dropdown and close the curent open dropdown.\n */\nconst showDropdown = (self: ColorPicker, dropdown: HTMLElement) => {\n const { colorPicker, colorMenu, menuToggle, pickerToggle, parent } = self;\n const isPicker = dropdown === colorPicker;\n const openDropdown = isPicker ? colorMenu : colorPicker;\n const activeBtn = isPicker ? menuToggle : pickerToggle;\n const nextBtn = !isPicker ? menuToggle : pickerToggle;\n\n if (!hasClass(parent, 'open')) {\n addClass(parent, 'open');\n }\n if (openDropdown) {\n removeClass(openDropdown, 'show');\n removePosition(openDropdown);\n }\n addClass(dropdown, 'bottom');\n reflow(dropdown);\n addClass(dropdown, 'show');\n\n if (isPicker) self.update();\n\n if (!self.isOpen) {\n toggleEventsOnShown(self, true);\n self.updateDropdownPosition();\n self.isOpen = true;\n setAttribute(self.input, tabindex, '0');\n if (menuToggle) {\n setAttribute(menuToggle, tabindex, '0');\n }\n }\n\n setAttribute(nextBtn, ariaExpanded, 'true');\n if (activeBtn) {\n setAttribute(activeBtn, ariaExpanded, 'false');\n }\n};\n\n/**\n * Color Picker Web Component\n *\n * @see http://thednp.github.io/color-picker\n */\nexport default class ColorPicker {\n // bring utils to staic\n public static Color = Color;\n public static ColorPalette = ColorPalette;\n public static getInstance = getColorPickerInstance;\n public static init = initColorPicker;\n public static selector = colorPickerSelector;\n // utils important for render\n public static roundPart = roundPart;\n public static setElementStyle = setElementStyle;\n public static setAttribute = setAttribute;\n public static getBoundingClientRect = getBoundingClientRect;\n public static version = version;\n\n id: number;\n input: HTMLInputElement;\n color: Color;\n format = 'rgb';\n parent: HTMLElement;\n dragElement: HTMLElement | undefined;\n isOpen = false;\n controlPositions: {\n c1x: number;\n c1y: number;\n c2y: number;\n c3y: number;\n };\n colorLabels: Record<string, string> = {};\n colorKeywords: string[] | false;\n colorPresets: ColorPalette | string[] | false;\n componentLabels: ColorPickerLabels;\n pickerToggle: HTMLElement;\n menuToggle: HTMLElement;\n colorPicker: HTMLElement;\n colorMenu: HTMLElement;\n controls: HTMLElement;\n inputs: HTMLInputElement[];\n controlKnobs: HTMLElement[];\n visuals: HTMLElement[];\n\n /**\n * Returns a new `ColorPicker` instance. The target of this constructor\n * must be an `HTMLInputElement`.\n *\n * @param target the target `<input>` element\n * @param config instance options\n */\n constructor(target: (HTMLElement & HTMLInputElement) | string, config?: Partial<ColorPickerOptions>) {\n const input = querySelector(target) as HTMLInputElement;\n\n // invalidate\n if (typeof target === 'undefined') throw new TypeError(`ColorPicker target not specified.`);\n if (isString(target) && !input) throw new TypeError(`ColorPicker target \"${target}\" cannot be found.`);\n this.input = input;\n\n const parent = closest(input, colorPickerParentSelector);\n if (!parent) throw new TypeError('ColorPicker requires a specific markup to work.');\n\n this.parent = parent;\n this.id = getUID(input, colorPickerString);\n this.dragElement = undefined;\n this.isOpen = false;\n this.controlPositions = {\n c1x: 0,\n c1y: 0,\n c2y: 0,\n c3y: 0,\n };\n this.colorLabels = {};\n this.colorKeywords = false;\n this.colorPresets = false;\n\n // process options\n const { format, componentLabels, colorLabels, colorKeywords, colorPresets } = normalizeOptions(\n input,\n colorPickerDefaults,\n config || {},\n );\n\n let translatedColorLabels = colorNames;\n /* istanbul ignore else */\n if (isArray(colorLabels) && colorLabels.length === 17) {\n translatedColorLabels = colorLabels;\n } else if (isString(colorLabels) && colorLabels.split(',').length === 17) {\n translatedColorLabels = colorLabels.split(',');\n }\n\n // expose colour labels to all methods\n colorNames.forEach((c, i) => {\n this.colorLabels[c] = translatedColorLabels[i].trim();\n });\n\n // update and expose component labels\n const tempComponentLabels =\n isString(componentLabels) && isValidJSON(componentLabels)\n ? (JSON.parse(componentLabels) as ColorPickerLabels)\n : componentLabels;\n this.componentLabels = ObjectAssign({ ...colorPickerLabels }, tempComponentLabels);\n this.color = new Color(input.value || '#fff', format);\n this.format = format;\n\n // set colour defaults\n if (isArray(colorKeywords) && colorKeywords.length) {\n this.colorKeywords = colorKeywords;\n } else if (isString(colorKeywords) && colorKeywords.length) {\n this.colorKeywords = colorKeywords.split(',').map(x => x.trim());\n }\n\n // set colour presets\n if (isArray(colorPresets) && colorPresets.length) {\n this.colorPresets = colorPresets;\n } else if (colorPresets && isValidJSON(colorPresets)) {\n const { hue, hueSteps, lightSteps, saturation } = JSON.parse(colorPresets) as {\n hue: number;\n hueSteps: number;\n lightSteps: number;\n saturation: number;\n };\n this.colorPresets = new ColorPalette(hue, hueSteps, lightSteps, saturation);\n } else if (isString(colorPresets)) {\n this.colorPresets = colorPresets.split(',').map((x: string) => x.trim());\n }\n\n // bind events\n this.showPicker = this.showPicker.bind(this);\n this.togglePicker = this.togglePicker.bind(this);\n this.toggleMenu = this.toggleMenu.bind(this);\n this.menuClickHandler = this.menuClickHandler.bind(this);\n this.menuKeyHandler = this.menuKeyHandler.bind(this);\n this.pointerDown = this.pointerDown.bind(this);\n this.pointerMove = this.pointerMove.bind(this);\n this.pointerUp = this.pointerUp.bind(this);\n this.update = this.update.bind(this);\n this.handleScroll = this.handleScroll.bind(this);\n this.handleFocusOut = this.handleFocusOut.bind(this);\n this.changeHandler = this.changeHandler.bind(this);\n this.handleDismiss = this.handleDismiss.bind(this);\n this.handleKnobs = this.handleKnobs.bind(this);\n\n // generate markup\n setMarkup(this);\n\n const [colorPicker, colorMenu] = getElementsByClassName('color-dropdown', parent);\n // set main elements\n this.pickerToggle = querySelector('.picker-toggle', parent) as HTMLElement;\n this.menuToggle = querySelector('.menu-toggle', parent) as HTMLElement;\n this.colorPicker = colorPicker;\n this.colorMenu = colorMenu;\n this.inputs = [...getElementsByClassName('color-input', parent)] as HTMLInputElement[];\n const [controls] = getElementsByClassName('color-controls', parent);\n this.controls = controls;\n this.controlKnobs = [...getElementsByClassName('knob', controls)];\n this.visuals = [...getElementsByClassName('visual-control', controls)];\n\n // update colour picker controls, inputs and visuals\n this.update();\n // console.log(this)\n\n // add main events listeners\n toggleEvents(this, true);\n\n // set component data\n Data.set(input, colorPickerString, this);\n }\n\n /** Returns the current colour value */\n get value(): string {\n return this.input.value;\n }\n\n /**\n * Sets a new colour value.\n *\n * @param {string} v new colour value\n */\n set value(v: string) {\n this.input.value = v;\n }\n\n /** Check if the colour presets include any non-colour. */\n get hasNonColor(): boolean {\n return this.colorKeywords instanceof Array && this.colorKeywords.some(x => nonColors.includes(x));\n }\n\n /** Returns hexadecimal value of the current colour. */\n get hex(): string {\n return this.color.toHex(true);\n }\n\n /** Returns the current colour value in {h,s,v,a} object format. */\n get hsv(): HSVA {\n return this.color.toHsv();\n }\n\n /** Returns the current colour value in {h,s,l,a} object format. */\n get hsl(): HSLA {\n return this.color.toHsl();\n }\n\n /** Returns the current colour value in {h,w,b,a} object format. */\n get hwb(): HWBA {\n return this.color.toHwb();\n }\n\n /** Returns the current colour value in {r,g,b,a} object format. */\n get rgb(): RGBA {\n return this.color.toRgb();\n }\n\n /** Returns the current colour brightness. */\n get brightness(): number {\n return this.color.brightness;\n }\n\n /** Returns the current colour luminance. */\n get luminance(): number {\n return this.color.luminance;\n }\n\n /** Checks if the current colour requires a light text colour. */\n get isDark(): boolean {\n const { color, brightness } = this;\n return brightness < 120 && color.a > 0.33;\n }\n\n /** Checks if the current input value is a valid colour. */\n get isValid(): boolean {\n const inputValue = this.input.value;\n return inputValue !== '' && new Color(inputValue).isValid;\n }\n\n /** Returns the colour appearance, usually the closest colour name for the current value. */\n get appearance(): string {\n const { colorLabels, hsl, hsv, format } = this;\n\n const hue = roundPart(hsl.h * 360);\n const saturationSource = format === 'hsl' ? hsl.s : hsv.s;\n const saturation = roundPart(saturationSource * 100);\n const lightness = roundPart(hsl.l * 100);\n const hsvl = hsv.v * 100;\n\n let colorName = 'black';\n\n // determine color appearance\n /* istanbul ignore else */\n if (lightness === 100 && saturation === 0) {\n colorName = colorLabels.white;\n } else if (lightness === 0) {\n colorName = colorLabels.black;\n } else if (saturation === 0) {\n colorName = colorLabels.grey;\n } else if (hue < 15 || hue >= 345) {\n colorName = colorLabels.red;\n } else if (hue >= 15 && hue < 45) {\n colorName = hsvl > 80 && saturation > 80 ? colorLabels.orange : colorLabels.brown;\n } else if (hue >= 45 && hue < 75) {\n const isGold = hue > 46 && hue < 54 && hsvl < 80 && saturation > 90;\n const isOlive = hue >= 54 && hue < 75 && hsvl < 80;\n colorName = isGold ? colorLabels.gold : colorLabels.yellow;\n colorName = isOlive ? colorLabels.olive : colorName;\n } else if (hue >= 75 && hue < 155) {\n colorName = hsvl < 68 ? colorLabels.green : colorLabels.lime;\n } else if (hue >= 155 && hue < 175) {\n colorName = colorLabels.teal;\n } else if (hue >= 175 && hue < 195) {\n colorName = colorLabels.cyan;\n } else if (hue >= 195 && hue < 255) {\n colorName = colorLabels.blue;\n } else if (hue >= 255 && hue < 270) {\n colorName = colorLabels.violet;\n } else if (hue >= 270 && hue < 295) {\n colorName = colorLabels.magenta;\n } else if (hue >= 295 && hue < 345) {\n colorName = colorLabels.pink;\n }\n return colorName;\n }\n\n /** Updates `ColorPicker` visuals. */\n updateVisuals(): void {\n const { controlPositions, visuals } = this;\n const [v1, v2, v3] = visuals;\n const { offsetHeight } = v1;\n const hue = controlPositions.c2y / offsetHeight;\n const { r, g, b } = new Color({ h: hue, s: 1, l: 0.5 }).toRgb();\n const whiteGrad = 'linear-gradient(rgb(255,255,255) 0%, rgb(255,255,255) 100%)';\n const alpha = 1 - controlPositions.c3y / offsetHeight;\n const roundA = roundPart(alpha * 100) / 100;\n\n const fill = new Color({\n h: hue,\n s: 1,\n l: 0.5,\n a: alpha,\n }).toRgbString();\n const hueGradient = `linear-gradient(\n rgb(255,0,0) 0%, rgb(255,255,0) 16.67%,\n rgb(0,255,0) 33.33%, rgb(0,255,255) 50%,\n rgb(0,0,255) 66.67%, rgb(255,0,255) 83.33%,\n rgb(255,0,0) 100%)`;\n setElementStyle(v1, {\n background: `linear-gradient(rgba(0,0,0,0) 0%, rgba(0,0,0,${roundA}) 100%),\n linear-gradient(to right, rgba(255,255,255,${roundA}) 0%, ${fill} 100%),\n ${whiteGrad}`,\n });\n setElementStyle(v2, { background: hueGradient });\n\n setElementStyle(v3, {\n background: `linear-gradient(rgba(${r},${g},${b},1) 0%,rgba(${r},${g},${b},0) 100%)`,\n });\n }\n\n /**\n * The `ColorPicker` *focusout* event listener when open.\n *\n * @param e\n * @this {ColorPicker}\n */\n handleFocusOut({ relatedTarget }: FocusEvent & { relatedTarget: HTMLElement }): void {\n if (relatedTarget && !this.parent.contains(relatedTarget)) {\n this.hide(true);\n }\n }\n\n /**\n * The `ColorPicker` *keyup* event listener when open.\n *\n * @param e\n * @this {ColorPicker}\n */\n handleDismiss({ code }: KeyboardEvent): void {\n if (this.isOpen && code === keyEscape) {\n this.hide();\n }\n }\n\n /**\n * The `ColorPicker` *scroll* event listener when open.\n *\n * @param e\n * @this {ColorPicker}\n */\n handleScroll(e: Event): void {\n const { activeElement } = getDocument(this.input);\n\n this.updateDropdownPosition();\n\n /* istanbul ignore next */\n if (\n ([pointermoveEvent, touchmoveEvent].includes(e.type) && this.dragElement) ||\n (activeElement && this.controlKnobs.includes(activeElement as HTMLElement))\n ) {\n e.stopPropagation();\n e.preventDefault();\n }\n }\n\n /**\n * The `ColorPicker` keyboard event listener for menu navigation.\n *\n * @param e\n */\n menuKeyHandler(e: Event & { target: HTMLElement; code: string }) {\n const { target, code } = e;\n const { previousElementSibling, nextElementSibling, parentElement } = target;\n const isColorOptionsMenu = parentElement && hasClass(parentElement, 'color-options');\n const allSiblings = parentElement ? [...parentElement.children] : [];\n const columnsCount =\n isColorOptionsMenu && getElementStyle(parentElement, 'grid-template-columns').split(' ').length;\n const currentIndex = allSiblings.indexOf(target);\n const previousElement = currentIndex > -1 && columnsCount && allSiblings[currentIndex - columnsCount];\n const nextElement = currentIndex > -1 && columnsCount && allSiblings[currentIndex + columnsCount];\n\n if ([keyArrowDown, keyArrowUp, keySpace].includes(code)) {\n // prevent scroll when navigating the menu via arrow keys / Space\n e.preventDefault();\n }\n if (isColorOptionsMenu) {\n if (previousElement && code === keyArrowUp) {\n focus(previousElement as HTMLElement);\n } else if (nextElement && code === keyArrowDown) {\n focus(nextElement as HTMLElement);\n } else if (previousElementSibling && code === keyArrowLeft) {\n focus(previousElementSibling as HTMLElement);\n } else if (nextElementSibling && code === keyArrowRight) {\n focus(nextElementSibling as HTMLElement);\n }\n } else if (previousElementSibling && [keyArrowLeft, keyArrowUp].includes(code)) {\n focus(previousElementSibling as HTMLElement);\n } else if (nextElementSibling && [keyArrowRight, keyArrowDown].includes(code)) {\n focus(nextElementSibling as HTMLElement);\n }\n\n if ([keyEnter, keySpace].includes(code)) {\n this.menuClickHandler(e);\n }\n }\n\n /**\n * The `ColorPicker` click event listener for the colour menu presets / defaults.\n *\n * @param e\n * @this {ColorPicker}\n */\n menuClickHandler(e: Event): void {\n const { target } = e;\n const { colorMenu } = this;\n const newOption = (getAttribute(target as HTMLElement, 'data-value') || '').trim();\n // invalidate for targets other than color options\n if (!newOption.length) return;\n const currentActive = querySelector('li.active', colorMenu);\n let newColor = newOption;\n newColor = nonColors.includes(newColor) ? 'white' : newColor;\n newColor = newColor === 'transparent' ? 'rgba(0,0,0,0)' : newColor;\n\n const { r, g, b, a } = new Color(newColor);\n\n ObjectAssign(this.color, {\n r,\n g,\n b,\n a,\n });\n\n this.update();\n\n /* istanbul ignore else */\n if (currentActive !== target) {\n /* istanbul ignore else */\n if (currentActive) {\n removeClass(currentActive, 'active');\n removeAttribute(currentActive, ariaSelected);\n }\n\n addClass(target as HTMLElement, 'active');\n setAttribute(target as HTMLElement, ariaSelected, 'true');\n\n if (nonColors.includes(newOption)) {\n this.value = newOption;\n }\n firePickerChange(this);\n }\n }\n\n /**\n * The `ColorPicker` *touchstart* / *mousedown* events listener for control knobs.\n *\n * @param e\n */\n pointerDown(e: Event & { target: HTMLElement; pageX: number; pageY: number }) {\n const { target, pageX, pageY } = e;\n const { colorMenu, visuals, controlKnobs } = this;\n const [v1, v2, v3] = visuals;\n const [c1, c2, c3] = controlKnobs;\n const visual = controlKnobs.includes(target) ? (target.previousElementSibling as HTMLElement) : target;\n const visualRect = getBoundingClientRect(visual);\n const html = getDocumentElement(v1);\n const offsetX = pageX - html.scrollLeft - visualRect.left;\n const offsetY = pageY - html.scrollTop - visualRect.top;\n\n /* istanbul ignore else */\n if (target === v1 || target === c1) {\n this.dragElement = visual;\n this.changeControl1(offsetX, offsetY);\n } else if (target === v2 || target === c2) {\n this.dragElement = visual;\n this.changeControl2(offsetY);\n } else if (target === v3 || target === c3) {\n this.dragElement = visual;\n this.changeAlpha(offsetY);\n }\n\n if (colorMenu) {\n const currentActive = querySelector('li.active', colorMenu);\n if (currentActive) {\n removeClass(currentActive, 'active');\n removeAttribute(currentActive, ariaSelected);\n }\n }\n e.preventDefault();\n }\n\n /**\n * The `ColorPicker` *touchend* / *mouseup* events listener for control knobs.\n *\n * @param e\n * @this\n */\n pointerUp({ target }: PointerEvent & { target: HTMLElement }) {\n const { parent } = this;\n const doc = getDocument(parent);\n const currentOpen = querySelector(`${colorPickerParentSelector}.open`, doc) !== null;\n const selection = doc.getSelection();\n\n if (!this.dragElement && (!selection || !selection.toString().length) && !parent.contains(target)) {\n this.hide(currentOpen);\n }\n\n this.dragElement = undefined;\n }\n\n /**\n * The `ColorPicker` *touchmove* / *mousemove* events listener for control knobs.\n *\n * @param {PointerEvent} e\n */\n pointerMove(e: PointerEvent): void {\n const { dragElement, visuals } = this;\n const [v1, v2, v3] = visuals;\n const { pageX, pageY } = e;\n\n if (!dragElement) return;\n\n const controlRect = getBoundingClientRect(dragElement);\n const win = getDocumentElement(v1);\n const offsetX = pageX - win.scrollLeft - controlRect.left;\n const offsetY = pageY - win.scrollTop - controlRect.top;\n\n if (dragElement === v1) {\n this.changeControl1(offsetX, offsetY);\n }\n\n if (dragElement === v2) {\n this.changeControl2(offsetY);\n }\n\n if (dragElement === v3) {\n this.changeAlpha(offsetY);\n }\n }\n\n /**\n * The `ColorPicker` *keydown* event listener for control knobs.\n *\n * @param e\n */\n handleKnobs(e: Event & { code: string }) {\n const { target, code } = e;\n\n // only react to arrow buttons\n if (![keyArrowUp, keyArrowDown, keyArrowLeft, keyArrowRight].includes(code)) return;\n e.preventDefault();\n\n const { controlKnobs, visuals } = this;\n const { offsetWidth, offsetHeight } = visuals[0];\n const [c1, c2, c3] = controlKnobs;\n const { activeElement } = getDocument(c1);\n const currentKnob = controlKnobs.find(x => x === activeElement);\n const yRatio = offsetHeight / 360;\n\n /* istanbul ignore else */\n if (currentKnob) {\n let offsetX = 0;\n let offsetY = 0;\n\n /* istanbul ignore else */\n if (target === c1) {\n const xRatio = offsetWidth / 100;\n\n /* istanbul ignore else */\n if ([keyArrowLeft, keyArrowRight].includes(code)) {\n this.controlPositions.c1x += code === keyArrowRight ? xRatio : -xRatio;\n } else if ([keyArrowUp, keyArrowDown].includes(code)) {\n this.controlPositions.c1y += code === keyArrowDown ? yRatio : -yRatio;\n }\n\n offsetX = this.controlPositions.c1x;\n offsetY = this.controlPositions.c1y;\n this.changeControl1(offsetX, offsetY);\n } else if (target === c2) {\n this.controlPositions.c2y += [keyArrowDown, keyArrowRight].includes(code) ? yRatio : -yRatio;\n\n offsetY = this.controlPositions.c2y;\n this.changeControl2(offsetY);\n } else if (target === c3) {\n this.controlPositions.c3y += [keyArrowDown, keyArrowRight].includes(code) ? yRatio : -yRatio;\n\n offsetY = this.controlPositions.c3y;\n this.changeAlpha(offsetY);\n }\n this.handleScroll(e);\n }\n }\n\n /** The event listener of the colour form inputs. */\n changeHandler(): void {\n let colorSource;\n const { inputs, format, value: currentValue, input, controlPositions, visuals } = this;\n const { activeElement } = getDocument(input);\n const { offsetHeight } = visuals[0];\n const [i1, , , i4] = inputs;\n const [v1, v2, v3, v4] =\n format === 'rgb'\n ? inputs.map(i => parseFloat(i.value) / (i === i4 ? 100 : 1))\n : inputs.map(i => parseFloat(i.value) / (i !== i1 ? 100 : 360));\n const isNonColorValue = this.hasNonColor && nonColors.includes(currentValue);\n const alpha = i4 ? v4 : 1 - controlPositions.c3y / offsetHeight;\n\n /* istanbul ignore else */\n if (activeElement === input || (activeElement && inputs.includes(activeElement as HTMLInputElement))) {\n if (activeElement === input) {\n if (isNonColorValue) {\n colorSource = currentValue === 'transparent' ? 'rgba(0,0,0,0)' : 'rgb(0,0,0)';\n } else {\n colorSource = currentValue;\n }\n } else if (format === 'hex') {\n colorSource = i1.value;\n } else if (format === 'hsl') {\n colorSource = {\n h: v1,\n s: v2,\n l: v3,\n a: alpha,\n };\n } else if (format === 'hwb') {\n colorSource = {\n h: v1,\n w: v2,\n b: v3,\n a: alpha,\n };\n } else {\n colorSource = {\n r: v1,\n g: v2,\n b: v3,\n a: alpha,\n };\n }\n\n const { r, g, b, a } = new Color(colorSource);\n\n ObjectAssign(this.color, {\n r,\n g,\n b,\n a,\n });\n this.setControlPositions();\n this.updateAppearance();\n this.updateInputs();\n this.updateControls();\n this.updateVisuals();\n\n // set non-color keyword\n if (activeElement === input && isNonColorValue) {\n this.value = currentValue;\n }\n }\n }\n\n /**\n * Updates `ColorPicker` first control:\n * * `lightness` and `saturation` for HEX/RGB;\n * * `lightness` and `hue` for HSL.\n *\n * @param X the X component of the offset\n * @param Y the Y component of the offset\n */\n changeControl1(X: number, Y: number): void {\n let [offsetX, offsetY] = [0, 0];\n const { controlPositions, visuals } = this;\n const { offsetHeight, offsetWidth } = visuals[0];\n\n if (X > offsetWidth) offsetX = offsetWidth;\n else if (X >= 0) offsetX = X;\n\n if (Y > offsetHeight) offsetY = offsetHeight;\n else if (Y >= 0) offsetY = Y;\n\n const hue = controlPositions.c2y / offsetHeight;\n\n const saturation = offsetX / offsetWidth;\n\n const lightness = 1 - offsetY / offsetHeight;\n const alpha = 1 - controlPositions.c3y / offsetHeight;\n\n // new color\n const { r, g, b, a } = new Color({\n h: hue,\n s: saturation,\n v: lightness,\n a: alpha,\n });\n\n ObjectAssign(this.color, {\n r,\n g,\n b,\n a,\n });\n\n // new positions\n this.controlPositions.c1x = offsetX;\n this.controlPositions.c1y = offsetY;\n\n // update color picker\n this.updateAppearance();\n this.updateInputs();\n this.updateControls();\n this.updateVisuals();\n }\n\n /**\n * Updates `ColorPicker` second control:\n * * `hue` for HEX/RGB/HWB;\n * * `saturation` for HSL.\n *\n * @param Y the Y offset\n */\n changeControl2(Y: number) {\n const { controlPositions, visuals } = this;\n const { offsetHeight, offsetWidth } = visuals[0];\n\n let offsetY = 0;\n\n if (Y > offsetHeight) offsetY = offsetHeight;\n else if (Y >= 0) offsetY = Y;\n\n const hue = offsetY / offsetHeight;\n const saturation = controlPositions.c1x / offsetWidth;\n const lightness = 1 - controlPositions.c1y / offsetHeight;\n const alpha = 1 - controlPositions.c3y / offsetHeight;\n\n // new color\n const { r, g, b, a } = new Color({\n h: hue,\n s: saturation,\n v: lightness,\n a: alpha,\n });\n\n ObjectAssign(this.color, {\n r,\n g,\n b,\n a,\n });\n\n // new position\n this.controlPositions.c2y = offsetY;\n // update color picker\n this.updateAppearance();\n this.updateInputs();\n this.updateControls();\n this.updateVisuals();\n }\n\n /**\n * Updates `ColorPicker` last control,\n * the `alpha` channel.\n *\n * @param Y\n */\n changeAlpha(Y: number) {\n const { visuals } = this;\n const { offsetHeight } = visuals[0];\n let offsetY = 0;\n\n if (Y > offsetHeight) offsetY = offsetHeight;\n else if (Y >= 0) offsetY = Y;\n\n // update color alpha\n const alpha = 1 - offsetY / offsetHeight;\n this.color.setAlpha(alpha);\n // update position\n this.controlPositions.c3y = offsetY;\n // update color picker\n this.updateAppearance();\n this.updateInputs();\n this.updateControls();\n this.updateVisuals();\n }\n\n /**\n * Updates `ColorPicker` control positions on:\n * * initialization\n * * window resize\n */\n update() {\n this.updateDropdownPosition();\n this.updateAppearance();\n this.setControlPositions();\n this.updateInputs(true);\n this.updateControls();\n this.updateVisuals();\n }\n\n /** Updates the open dropdown position on *scroll* event. */\n updateDropdownPosition() {\n const { input, colorPicker, colorMenu } = this;\n const elRect = getBoundingClientRect(input);\n const { top, bottom } = elRect;\n const { offsetHeight: elHeight } = input;\n const windowHeight = getDocumentElement(input).clientHeight;\n const isPicker = hasClass(colorPicker, 'show');\n const dropdown = isPicker ? colorPicker : colorMenu;\n if (!dropdown) return;\n const { offsetHeight: dropHeight } = dropdown;\n const distanceBottom = windowHeight - bottom;\n const distanceTop = top;\n const bottomExceed = top + dropHeight + elHeight > windowHeight; // show\n const topExceed = top - dropHeight < 0; // show-top\n\n if ((hasClass(dropdown, 'bottom') || !topExceed) && distanceBottom < distanceTop && bottomExceed) {\n removeClass(dropdown, 'bottom');\n addClass(dropdown, 'top');\n } else {\n removeClass(dropdown, 'top');\n addClass(dropdown, 'bottom');\n }\n }\n\n /** Updates control knobs' positions. */\n setControlPositions() {\n const { visuals, color, hsv } = this;\n const { offsetHeight, offsetWidth } = visuals[0];\n const alpha = color.a;\n const hue = hsv.h;\n\n const saturation = hsv.s;\n const lightness = hsv.v;\n\n this.controlPositions.c1x = saturation * offsetWidth;\n this.controlPositions.c1y = (1 - lightness) * offsetHeight;\n this.controlPositions.c2y = hue * offsetHeight;\n this.controlPositions.c3y = (1 - alpha) * offsetHeight;\n }\n\n /** Update the visual appearance label and control knob labels. */\n updateAppearance() {\n const { componentLabels, color, parent, hsv, hex, format, controlKnobs } = this;\n const { appearanceLabel, hexLabel, valueLabel } = componentLabels;\n let { r, g, b } = color.toRgb();\n const [knob1, knob2, knob3] = controlKnobs;\n const hue = roundPart(hsv.h * 360);\n const alpha = color.a;\n const saturation = roundPart(hsv.s * 100);\n const lightness = roundPart(hsv.v * 100);\n const colorName = this.appearance;\n\n let colorLabel = `${hexLabel} ${hex.split('').join(' ')}`;\n\n if (format === 'hwb') {\n const { hwb } = this;\n const whiteness = roundPart(hwb.w * 100);\n const blackness = roundPart(hwb.b * 100);\n colorLabel = `HWB: ${hue}°, ${whiteness}%, ${blackness}%`;\n setAttribute(knob1, ariaValueText, `${whiteness}% & ${blackness}%`);\n setAttribute(knob1, ariaValueNow, `${whiteness}`);\n setAttribute(knob2, ariaDescription, `${valueLabel}: ${colorLabel}. ${appearanceLabel}: ${colorName}.`);\n setAttribute(knob2, ariaValueText, `${hue}%`);\n setAttribute(knob2, ariaValueNow, `${hue}`);\n } else {\n [r, g, b] = [r, g, b].map(roundPart);\n colorLabel = format === 'hsl' ? `HSL: ${hue}°, ${saturation}%, ${lightness}%` : colorLabel;\n colorLabel = format === 'rgb' ? `RGB: ${r}, ${g}, ${b}` : colorLabel;\n\n setAttribute(knob1, ariaValueText, `${lightness}% & ${saturation}%`);\n setAttribute(knob1, ariaValueNow, `${lightness}`);\n setAttribute(knob2, ariaDescription, `${valueLabel}: ${colorLabel}. ${appearanceLabel}: ${colorName}.`);\n setAttribute(knob2, ariaValueText, `${hue}°`);\n setAttribute(knob2, ariaValueNow, `${hue}`);\n }\n\n const alphaValue = roundPart(alpha * 100);\n setAttribute(knob3, ariaValueText, `${alphaValue}%`);\n setAttribute(knob3, ariaValueNow, `${alphaValue}`);\n\n // update the input backgroundColor\n const newColor = color.toString();\n setElementStyle(this.input, { backgroundColor: newColor });\n\n // toggle dark/light classes will also style the placeholder\n // dark sets color white, light sets color black\n // isDark ? '#000' : '#fff'\n if (!this.isDark) {\n if (hasClass(parent, 'txt-dark')) removeClass(parent, 'txt-dark');\n if (!hasClass(parent, 'txt-light')) addClass(parent, 'txt-light');\n } else {\n if (hasClass(parent, 'txt-light')) removeClass(parent, 'txt-light');\n if (!hasClass(parent, 'txt-dark')) addClass(parent, 'txt-dark');\n }\n }\n\n /** Updates the control knobs actual positions. */\n updateControls() {\n const { controlKnobs, controlPositions } = this;\n let { c1x, c1y, c2y, c3y } = controlPositions;\n const [control1, control2, control3] = controlKnobs;\n // round control positions\n [c1x, c1y, c2y, c3y] = [c1x, c1y, c2y, c3y].map(roundPart);\n\n setElementStyle(control1, {\n transform: `translate3d(${c1x - 4}px,${c1y - 4}px,0)`,\n });\n setElementStyle(control2, { transform: `translate3d(0,${c2y - 4}px,0)` });\n setElementStyle(control3, { transform: `translate3d(0,${c3y - 4}px,0)` });\n }\n\n /**\n * Updates all color form inputs.\n *\n * @param isPrevented when `true`, the component original event is prevented\n */\n updateInputs(isPrevented?: boolean) {\n const { value: oldColor, format, inputs, color, hsl } = this;\n const [i1, i2, i3, i4] = inputs;\n const alpha = roundPart(color.a * 100);\n const hue = roundPart(hsl.h * 360);\n let newColor = color.toString();\n\n /* istanbul ignore else */\n if (format === 'hex') {\n newColor = this.color.toHexString(true);\n i1.value = this.hex;\n } else if (format === 'hsl') {\n const lightness = roundPart(hsl.l * 100);\n const saturation = roundPart(hsl.s * 100);\n newColor = this.color.toHslString();\n i1.value = `${hue}`;\n i2.value = `${saturation}`;\n i3.value = `${lightness}`;\n i4.value = `${alpha}`;\n } else if (format === 'hwb') {\n const { w, b } = this.hwb;\n const whiteness = roundPart(w * 100);\n const blackness = roundPart(b * 100);\n\n newColor = this.color.toHwbString();\n i1.value = `${hue}`;\n i2.value = `${whiteness}`;\n i3.value = `${blackness}`;\n i4.value = `${alpha}`;\n } else if (format === 'rgb') {\n let { r, g, b } = this.rgb;\n [r, g, b] = [r, g, b].map(roundPart);\n\n newColor = this.color.toRgbString();\n i1.value = `${r}`;\n i2.value = `${g}`;\n i3.value = `${b}`;\n i4.value = `${alpha}`;\n }\n\n // update the color value\n this.value = newColor;\n\n // don't trigger the custom event unless it's really changed\n if (!isPrevented && newColor !== oldColor) {\n firePickerChange(this);\n }\n }\n\n /**\n * Toggle the `ColorPicker` dropdown visibility.\n *\n * @param e\n */\n togglePicker(e?: Event) {\n if (e) e.preventDefault();\n const { colorPicker } = this;\n\n if (this.isOpen && hasClass(colorPicker, 'show')) {\n this.hide(true);\n } else {\n showDropdown(this, colorPicker);\n }\n }\n\n /** Shows the `ColorPicker` dropdown. */\n showPicker() {\n const { colorPicker } = this;\n\n if (!['top', 'bottom'].some(c => hasClass(colorPicker, c))) {\n showDropdown(this, colorPicker);\n }\n }\n\n /**\n * Toggles the visibility of the `ColorPicker` presets menu.\n *\n * @param e\n * @this {ColorPicker}\n */\n toggleMenu(e?: Event) {\n if (e) e.preventDefault();\n const { colorMenu } = this;\n\n if (this.isOpen && hasClass(colorMenu, 'show')) {\n this.hide(true);\n } else {\n showDropdown(this, colorMenu);\n }\n }\n\n /**\n * Hides the currently open `ColorPicker` dropdown.\n *\n * @param {boolean=} focusPrevented\n */\n hide(focusPrevented?: boolean) {\n if (this.isOpen) {\n const { pickerToggle, menuToggle, colorPicker, colorMenu, parent, input } = this;\n const openPicker = hasClass(colorPicker, 'show');\n const openDropdown = openPicker ? colorPicker : colorMenu;\n const relatedBtn = openPicker ? pickerToggle : menuToggle;\n const animationDuration = openDropdown && getElementTransitionDuration(openDropdown);\n\n this.value = this.color.toString(true);\n\n /* istanbul ignore else */\n if (openDropdown) {\n removeClass(openDropdown, 'show');\n setAttribute(relatedBtn, ariaExpanded, 'false');\n setTimeout(() => {\n removePosition(openDropdown);\n /* istanbul ignore else */\n if (!querySelector('.show', parent)) {\n removeClass(parent, 'open');\n toggleEventsOnShown(this);\n this.isOpen = false;\n }\n }, animationDuration);\n }\n\n if (!focusPrevented) {\n focus(pickerToggle);\n }\n setAttribute(input, tabindex, '-1');\n if (relatedBtn === menuToggle) {\n setAttribute(menuToggle, tabindex, '-1');\n }\n }\n }\n\n /** Removes `ColorPicker` from target `<input>`. */\n dispose() {\n const { input, parent } = this;\n this.hide(true);\n toggleEvents(this);\n [...parent.children].forEach(el => {\n if (el !== input) el.remove();\n });\n\n removeAttribute(input, tabindex);\n setElementStyle(input, { backgroundColor: '' });\n\n ['txt-light', 'txt-dark'].forEach(c => removeClass(parent, c));\n Data.remove(input, colorPickerString);\n }\n}\n"],"names":["e","f","t","c","i","n","s","o","a","r","E","d","fe","ge","Ee","Ae","Ne","ke","K","P","_","tt","st","rt","it","St","Nt","kt","Ct","zt","Bt","Re","Qe","qe","Ge","Ye","Ze","on","Rt","F","fn","qt","A","Gt","S","z","x","M","jt","Jt","Kt","Xt","Yt","kn","Dn","Ln","On","In","v","u","O","Bn","N","W","R","k","Zt","$t","Q","g","ne","Rn","V","w","oe","Qn","l","p","y","q","Xn","Yn","I","$n","h","T","B","H","b","ae","so","ie","le","wo","No","U","D","L","rr","tr","er","$","Z","J","G","X","m","j","C","Y","sr","ColorPalette","Color","args","hue","hueSteps","lightSteps","lightnessArray","saturation","colors","hueStep","half","steps1To13","lightSets","closestSet","set","lightStep","currentHue","newColor","colorPickerLabels","colorNames","isValidJSON","str","isString","vHidden","getColorForm","self","format","id","componentLabels","colorForm","createElement","components","toUpperCase","cID","formatLabel","cInputLabel","setAttribute","cInput","max","step","ObjectAssign","getColorControls","hueLabel","alphaLabel","lightnessLabel","saturationLabel","whitenessLabel","blacknessLabel","max1","max2","max3","ctrl1Label","ctrl2Label","colorControls","colorPointer","colorSlider","template","min","control","knob","getColorMenu","colorsSource","menuClass","input","defaultsLabel","presetsLabel","isOptionsMenu","isPalette","menuLabel","colorsArray","colorsCount","fit","isMultiLine","rowCountHover","rowCount","isScrollable","finalClass","gap","optionSize","menuHeight","menuHeightHover","menu","setElementStyle","value","label","isActive","getAttribute","option","setMarkup","parent","colorKeywords","colorPresets","colorValue","nonColors","toggleLabel","pickerLabel","hexLabel","color","formatString","pickerBtn","pickerDropdown","presetsDropdown","presetsBtn","xmlns","presetsIcon","createElementNS","ariaHidden","path","tabindex","colorPickerString","colorPickerSelector","colorPickerParentSelector","colorPickerDefaults","roundPart","getColorPickerInstance","element","getInstance","initColorPicker","ColorPicker","toggleEvents","action","addListener","removeListener","pickerToggle","menuToggle","focusinEvent","mouseclickEvent","toggleEventsOnShown","colorMenu","doc","getDocument","win","getWindow","pointerdownEvent","keydownEvent","scrollEvent","resizeEvent","changeEvent","pointermoveEvent","pointerupEvent","focusoutEvent","keyupEvent","firePickerChange","dispatchEvent","removePosition","removeClass","showDropdown","dropdown","colorPicker","isPicker","openDropdown","activeBtn","nextBtn","hasClass","addClass","reflow","ariaExpanded","getBoundingClientRect","version","target","config","querySelector","closest","getUID","colorLabels","normalizeOptions","translatedColorLabels","isArray","tempComponentLabels","getElementsByClassName","controls","Data","brightness","inputValue","hsl","hsv","saturationSource","lightness","hsvl","colorName","isGold","isOlive","controlPositions","visuals","v1","v2","v3","offsetHeight","whiteGrad","alpha","roundA","fill","hueGradient","relatedTarget","code","keyEscape","activeElement","touchmoveEvent","previousElementSibling","nextElementSibling","parentElement","isColorOptionsMenu","allSiblings","columnsCount","getElementStyle","currentIndex","previousElement","nextElement","keyArrowDown","keyArrowUp","keySpace","focus","keyArrowLeft","keyArrowRight","keyEnter","newOption","currentActive","removeAttribute","ariaSelected","pageX","pageY","controlKnobs","c1","c2","c3","visual","visualRect","html","getDocumentElement","offsetX","offsetY","currentOpen","selection","dragElement","controlRect","offsetWidth","currentKnob","yRatio","xRatio","colorSource","inputs","currentValue","i1","i4","v4","isNonColorValue","elRect","top","bottom","elHeight","windowHeight","dropHeight","distanceBottom","distanceTop","bottomExceed","topExceed","hex","appearanceLabel","valueLabel","knob1","knob2","knob3","colorLabel","hwb","whiteness","blackness","ariaValueText","ariaValueNow","ariaDescription","alphaValue","c1x","c1y","c2y","c3y","control1","control2","control3","isPrevented","oldColor","i2","i3","focusPrevented","openPicker","relatedBtn","animationDuration","getElementTransitionDuration","el"],"mappings":"aAAK,MAACA,EAAI,CAAE,EAAEC,GAAKC,GAAM,CACvB,KAAM,CAAE,KAAMC,EAAG,cAAeC,CAAC,EAAKF,EACtC,CAAC,GAAGF,EAAEG,CAAC,CAAC,EAAE,QAAQ,CAAC,CAACE,EAAGC,CAAC,IAAM,CAC5BF,IAAMC,GAAK,CAAC,GAAGC,CAAC,EAAE,QAAQ,CAAC,CAACC,EAAGC,CAAC,IAAM,CACpCD,EAAE,MAAMF,EAAG,CAACH,CAAC,CAAC,EAAG,OAAOM,GAAK,UAAYA,EAAE,MAAQC,GAAEJ,EAAGF,EAAGI,EAAGC,CAAC,CACrE,CAAK,CACL,CAAG,CACH,EAAGE,GAAI,CAACR,EAAGC,EAAGC,EAAGC,IAAM,CACrBL,EAAEG,CAAC,IAAMH,EAAEG,CAAC,EAAoB,IAAI,KACpC,MAAMG,EAAIN,EAAEG,CAAC,EACbG,EAAE,IAAIJ,CAAC,GAAKI,EAAE,IAAIJ,EAAmB,IAAI,GAAK,EAC9C,MAAMK,EAAID,EAAE,IAAIJ,CAAC,EAAG,CAAE,KAAMM,CAAG,EAAGD,EAClCA,EAAE,IAAIH,EAAGC,CAAC,EAAGG,GAAKN,EAAE,iBAAiBC,EAAGF,GAAGI,CAAC,CAC9C,EAAGI,GAAI,CAACP,EAAGC,EAAGC,EAAGC,IA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5F,EAAGF,KAAOA,GAAKI,EAAEJ,CAAC,EAAIA,EAAIW,EAAC,GAAI,uBACzUT,CACF,EC5bM4D,GAAI,CAAC,cAAe,eAAgB,UAAW,SAAU,SAAS,EAAG0B,EAAK,GAAM,CACpF,MAAM,EAAI,KAAK,MAAM,CAAC,EACtB,OAAO,EAAI,EAAI,GAAM,EAAI,KAAK,MAAM,CAAC,CACvC,EAAGH,GAAI,CACL,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,eACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,OACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,QACA,CACE,EAAG,EACH,EAAG,EACH,EAAG,CACJ,CACF,EACD,CACE,iBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,OACA,CACE,EAAG,EACH,EAAG,EACH,EAAG,GACJ,CACF,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,GACJ,CACF,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,EACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,CACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,EACJ,CACF,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,EACJ,CACF,EACD,CACE,iBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,WACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,EACJ,CACF,EACD,CACE,OACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,WACA,CACE,EAAG,EACH,EAAG,EACH,EAAG,GACJ,CACF,EACD,CACE,WACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,gBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,EACJ,CACF,EACD,CACE,WACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,CACJ,CACF,EACD,CACE,WACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,cACA,CACE,EAAG,IACH,EAAG,EACH,EAAG,GACJ,CACF,EACD,CACE,iBACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,EACJ,CACF,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,CACJ,CACF,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,GACJ,CACF,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,EACH,EAAG,CACJ,CACF,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,eACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,gBACA,CACE,EAAG,GACH,EAAG,GACH,EAAG,GACJ,CACF,EACD,CACE,gBACA,CACE,EAAG,GACH,EAAG,GACH,EAAG,EACJ,CACF,EACD,CACE,gBACA,CACE,EAAG,GACH,EAAG,GACH,EAAG,EACJ,CACF,EACD,CACE,gBACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,EACH,EAAG,GACJ,CACF,EACD,CACE,WACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,GACJ,CACF,EACD,CACE,cACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,aACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,EACJ,CACF,EACD,CACE,cACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,cACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,EACJ,CACF,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,EACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,EACJ,CACF,EACD,CACE,OACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,CACJ,CACF,EACD,CACE,OACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,QACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,CACJ,CACF,EACD,CACE,cACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,EACJ,CACF,EACD,CACE,OACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,WACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,EACJ,CACF,EACD,CACE,SACA,CACE,EAAG,GACH,EAAG,EACH,EAAG,GACJ,CACF,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,gBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,WACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,CACJ,CACF,EACD,CACE,eACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,uBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,cACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,gBACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,eACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,iBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,iBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,iBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,cACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,OACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,CACJ,CACF,EACD,CACE,YACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,EACJ,CACF,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,EACH,EAAG,GACJ,CACF,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,EACH,EAAG,CACJ,CACF,EACD,CACE,mBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,aACA,CACE,EAAG,EACH,EAAG,EACH,EAAG,GACJ,CACF,EACD,CACE,eACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,GACJ,CACF,EACD,CACE,eACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,iBACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,kBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,oBACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,kBACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,kBACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,GACJ,CACF,EACD,CACE,eACA,CACE,EAAG,GACH,EAAG,GACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,WACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,cACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,OACA,CACE,EAAG,EACH,EAAG,EACH,EAAG,GACJ,CACF,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,CACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,EACJ,CACF,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,CACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,CACJ,CACF,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,gBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,gBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,gBACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,OACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,EACJ,CACF,EACD,CACE,OACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,OACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,EACH,EAAG,GACJ,CACF,EACD,CACE,gBACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,GACJ,CACF,EACD,CACE,MACA,CACE,EAAG,IACH,EAAG,EACH,EAAG,CACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,cACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,EACJ,CACF,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,aACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,EACJ,CACF,EACD,CACE,WACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,EACJ,CACF,EACD,CACE,WACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,EACJ,CACF,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,OACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,cACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,YACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,MACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,OACA,CACE,EAAG,EACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,UACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,GACH,EAAG,EACJ,CACF,EACD,CACE,YACA,CACE,EAAG,GACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,SACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,QACA,CACE,EAAG,IACH,EAAG,IACH,EAAG,GACJ,CACF,EACD,CACE,QACA,CAC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