@esri/calcite-components 1.0.0-next.284 → 1.0.0-next.288

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (868) hide show
  1. package/CHANGELOG.md +14 -2
  2. package/dist/calcite/assets/calcite-icon/classifyObjects16.json +1 -0
  3. package/dist/calcite/assets/calcite-icon/classifyObjects24.json +1 -0
  4. package/dist/calcite/assets/calcite-icon/classifyObjects32.json +1 -0
  5. package/dist/calcite/assets/calcite-icon/classifyPixels16.json +1 -0
  6. package/dist/calcite/assets/calcite-icon/classifyPixels24.json +1 -0
  7. package/dist/calcite/assets/calcite-icon/classifyPixels32.json +1 -0
  8. package/dist/calcite/assets/calcite-icon/dataCloud16.json +1 -0
  9. package/dist/calcite/assets/calcite-icon/dataCloud24.json +1 -0
  10. package/dist/calcite/assets/calcite-icon/dataCloud32.json +1 -0
  11. package/dist/calcite/assets/calcite-icon/dataFolder16.json +1 -0
  12. package/dist/calcite/assets/calcite-icon/dataFolder24.json +1 -0
  13. package/dist/calcite/assets/calcite-icon/dataFolder32.json +1 -0
  14. package/dist/calcite/assets/calcite-icon/dataRaster16.json +1 -0
  15. package/dist/calcite/assets/calcite-icon/dataRaster24.json +1 -0
  16. package/dist/calcite/assets/calcite-icon/dataRaster32.json +1 -0
  17. package/dist/calcite/assets/calcite-icon/distributeHeightEvenly16.json +1 -0
  18. package/dist/calcite/assets/calcite-icon/distributeHeightEvenly24.json +1 -0
  19. package/dist/calcite/assets/calcite-icon/distributeHeightEvenly32.json +1 -0
  20. package/dist/calcite/assets/calcite-icon/distributeWidthEvenly16.json +1 -0
  21. package/dist/calcite/assets/calcite-icon/distributeWidthEvenly24.json +1 -0
  22. package/dist/calcite/assets/calcite-icon/distributeWidthEvenly32.json +1 -0
  23. package/dist/calcite/assets/calcite-icon/gridUnit16.json +1 -0
  24. package/dist/calcite/assets/calcite-icon/gridUnit24.json +1 -0
  25. package/dist/calcite/assets/calcite-icon/gridUnit32.json +1 -0
  26. package/dist/calcite/assets/calcite-icon/horizontalDistribute16.json +1 -0
  27. package/dist/calcite/assets/calcite-icon/horizontalDistribute24.json +1 -0
  28. package/dist/calcite/assets/calcite-icon/horizontalDistribute32.json +1 -0
  29. package/dist/calcite/assets/calcite-icon/imageChips16.json +1 -0
  30. package/dist/calcite/assets/calcite-icon/imageChips24.json +1 -0
  31. package/dist/calcite/assets/calcite-icon/imageChips32.json +1 -0
  32. package/dist/calcite/assets/calcite-icon/imageUnit16.json +1 -0
  33. package/dist/calcite/assets/calcite-icon/imageUnit24.json +1 -0
  34. package/dist/calcite/assets/calcite-icon/imageUnit32.json +1 -0
  35. package/dist/calcite/assets/calcite-icon/newTraining16.json +1 -0
  36. package/dist/calcite/assets/calcite-icon/newTraining24.json +1 -0
  37. package/dist/calcite/assets/calcite-icon/newTraining32.json +1 -0
  38. package/dist/calcite/assets/calcite-icon/retrain16.json +1 -0
  39. package/dist/calcite/assets/calcite-icon/retrain24.json +1 -0
  40. package/dist/calcite/assets/calcite-icon/retrain32.json +1 -0
  41. package/dist/calcite/assets/calcite-icon/smartForm16.json +1 -0
  42. package/dist/calcite/assets/calcite-icon/smartForm24.json +1 -0
  43. package/dist/calcite/assets/calcite-icon/smartForm32.json +1 -0
  44. package/dist/calcite/assets/calcite-icon/verticalDistribute16.json +1 -0
  45. package/dist/calcite/assets/calcite-icon/verticalDistribute24.json +1 -0
  46. package/dist/calcite/assets/calcite-icon/verticalDistribute32.json +1 -0
  47. package/dist/calcite/calcite.esm.js +5 -1
  48. package/dist/calcite/calcite.js +1 -1
  49. package/dist/calcite/index.esm.js +4 -0
  50. package/dist/calcite/p-00c20cb8.entry.js +5 -0
  51. package/dist/calcite/p-01574cc9.system.entry.js +5 -0
  52. package/dist/calcite/p-034b30d0.system.entry.js +5 -0
  53. package/dist/calcite/{p-c2cd9c1d.system.entry.js → p-0467efd5.system.entry.js} +5 -1
  54. package/dist/calcite/{p-caf80cd7.js → p-05bf835f.js} +5 -1
  55. package/dist/calcite/p-07ba39b6.js +5 -0
  56. package/dist/calcite/p-09ced3ff.system.entry.js +5 -0
  57. package/dist/calcite/p-0e30afe6.entry.js +5 -0
  58. package/dist/calcite/p-11071ac7.entry.js +5 -0
  59. package/dist/calcite/p-157d05ce.js +5 -0
  60. package/dist/calcite/p-16148eef.entry.js +5 -0
  61. package/dist/calcite/p-161fae80.entry.js +5 -0
  62. package/dist/calcite/p-1682482b.entry.js +5 -0
  63. package/dist/calcite/p-1800ca58.system.entry.js +5 -0
  64. package/dist/calcite/p-192289eb.system.entry.js +5 -0
  65. package/dist/calcite/{p-a54a11ee.system.entry.js → p-197382be.system.entry.js} +5 -1
  66. package/dist/calcite/p-1a27bf28.system.entry.js +5 -0
  67. package/dist/calcite/p-1b2c1f55.entry.js +5 -0
  68. package/dist/calcite/{p-53caa311.system.js → p-1d6404b5.system.js} +4 -0
  69. package/dist/calcite/p-1dc68118.system.entry.js +5 -0
  70. package/dist/calcite/p-1f17f6c6.entry.js +5 -0
  71. package/dist/calcite/p-1f27021e.entry.js +5 -0
  72. package/dist/calcite/p-1fb7138b.js +5 -0
  73. package/dist/calcite/p-22b45d8e.entry.js +5 -0
  74. package/dist/calcite/p-26508b91.js +5 -0
  75. package/dist/calcite/p-280404ef.system.entry.js +5 -0
  76. package/dist/calcite/p-28fecce5.system.entry.js +5 -0
  77. package/dist/calcite/p-294dbdf2.entry.js +5 -0
  78. package/dist/calcite/{p-771da7ed.system.entry.js → p-2b13e5a9.system.entry.js} +5 -1
  79. package/dist/calcite/p-2e53f47f.system.entry.js +5 -0
  80. package/dist/calcite/p-32faf98b.system.entry.js +5 -0
  81. package/dist/calcite/p-32fbf8cd.system.js +5 -0
  82. package/dist/calcite/p-33e58a20.entry.js +5 -0
  83. package/dist/calcite/p-34a6550f.system.entry.js +5 -0
  84. package/dist/calcite/p-34fdad31.entry.js +5 -0
  85. package/dist/calcite/p-36115e9d.system.entry.js +5 -0
  86. package/dist/calcite/{p-a6b26bd1.system.js → p-378ffa38.system.js} +4 -0
  87. package/dist/calcite/{p-efe6556c.system.entry.js → p-37fac73b.system.entry.js} +5 -1
  88. package/dist/calcite/{p-ef0ea98b.system.entry.js → p-380c71e8.system.entry.js} +5 -1
  89. package/dist/calcite/p-38daa875.entry.js +5 -0
  90. package/dist/calcite/p-38f1f404.entry.js +5 -0
  91. package/dist/calcite/p-3a529cc9.entry.js +5 -0
  92. package/dist/calcite/p-3b17d8d0.system.js +5 -0
  93. package/dist/calcite/p-3db2dc30.system.entry.js +5 -0
  94. package/dist/calcite/{p-5a1b0338.system.js → p-4035444d.system.js} +5 -1
  95. package/dist/calcite/p-42c1ceea.system.entry.js +5 -0
  96. package/dist/calcite/p-43c9ac47.entry.js +5 -0
  97. package/dist/calcite/p-45b13361.system.entry.js +5 -0
  98. package/dist/calcite/{p-defdc464.system.js → p-47313747.system.js} +4 -0
  99. package/dist/calcite/p-477bac2c.system.js +5 -0
  100. package/dist/calcite/p-4805ca9a.system.entry.js +5 -0
  101. package/dist/calcite/p-48d862ab.system.entry.js +5 -0
  102. package/dist/calcite/p-49dfc82d.system.entry.js +5 -0
  103. package/dist/calcite/p-49fcc674.entry.js +5 -0
  104. package/dist/calcite/p-4b2f69cc.entry.js +5 -0
  105. package/dist/calcite/p-4ba0e355.entry.js +5 -0
  106. package/dist/calcite/p-4de6f4fd.system.js +5 -0
  107. package/dist/calcite/p-50e1a7c9.system.entry.js +5 -0
  108. package/dist/calcite/p-5376ff1d.entry.js +5 -0
  109. package/dist/calcite/{p-95dfb659.system.js → p-56b352bf.system.js} +4 -0
  110. package/dist/calcite/{p-39b743d9.system.entry.js → p-5accac7d.system.entry.js} +5 -1
  111. package/dist/calcite/p-5b87b98f.system.entry.js +5 -0
  112. package/dist/calcite/p-5cab6853.js +5 -0
  113. package/dist/calcite/{p-dc825c55.js → p-5fda3de2.js} +5 -1
  114. package/dist/calcite/{p-23b87c6a.system.entry.js → p-6235a763.system.entry.js} +5 -1
  115. package/dist/calcite/p-6281ab45.system.entry.js +5 -0
  116. package/dist/calcite/p-649b9bf0.entry.js +5 -0
  117. package/dist/calcite/p-66845ec0.entry.js +5 -0
  118. package/dist/calcite/{p-2a9b4a25.system.js → p-6a541e77.system.js} +5 -1
  119. package/dist/calcite/p-6bdedd7f.system.js +5 -0
  120. package/dist/calcite/p-6fe5f2de.system.entry.js +5 -0
  121. package/dist/calcite/{p-cebd4de5.js → p-72563742.js} +4 -0
  122. package/dist/calcite/p-773b9826.system.entry.js +5 -0
  123. package/dist/calcite/p-7839d1c9.entry.js +5 -0
  124. package/dist/calcite/p-7878aa7c.entry.js +5 -0
  125. package/dist/calcite/p-78820fed.system.entry.js +5 -0
  126. package/dist/calcite/p-7bcd2eb9.system.js +5 -0
  127. package/dist/calcite/p-7ed4c551.system.js +5 -0
  128. package/dist/calcite/{p-7c5c2b30.js → p-7fab451d.js} +5 -1
  129. package/dist/calcite/p-7fed4823.entry.js +5 -0
  130. package/dist/calcite/p-800874fd.entry.js +5 -0
  131. package/dist/calcite/p-8655c0a1.entry.js +5 -0
  132. package/dist/calcite/p-86788d34.entry.js +5 -0
  133. package/dist/calcite/p-8967b27b.entry.js +5 -0
  134. package/dist/calcite/p-89b4e322.system.entry.js +5 -0
  135. package/dist/calcite/p-8a535973.entry.js +5 -0
  136. package/dist/calcite/p-8a63221d.js +5 -0
  137. package/dist/calcite/p-8efb43fc.entry.js +5 -0
  138. package/dist/calcite/p-914c3cc4.system.js +5 -0
  139. package/dist/calcite/p-91645bf7.system.js +5 -0
  140. package/dist/calcite/p-91889ade.system.entry.js +5 -0
  141. package/dist/calcite/{p-90b88d97.system.entry.js → p-9358deb1.system.entry.js} +5 -1
  142. package/dist/calcite/{p-00f2f64d.system.entry.js → p-975ca343.system.entry.js} +5 -1
  143. package/dist/calcite/{p-8c9b39be.system.js → p-9965ea81.system.js} +5 -1
  144. package/dist/calcite/p-9cad254a.entry.js +5 -0
  145. package/dist/calcite/p-9d04923b.entry.js +5 -0
  146. package/dist/calcite/p-9ff5b403.entry.js +5 -0
  147. package/dist/calcite/p-a0c02648.system.js +5 -0
  148. package/dist/calcite/p-a1911108.entry.js +5 -0
  149. package/dist/calcite/{p-8dc31333.js → p-a20df95c.js} +5 -1
  150. package/dist/calcite/p-a4f2cc4c.entry.js +5 -0
  151. package/dist/calcite/p-a5a50052.entry.js +5 -0
  152. package/dist/calcite/{p-55f7adaa.system.entry.js → p-a5bbfe14.system.entry.js} +5 -1
  153. package/dist/calcite/{p-19ac376f.js → p-a62de092.js} +4 -0
  154. package/dist/calcite/p-a8c759ae.system.js +5 -0
  155. package/dist/calcite/{p-170fb8e8.system.entry.js → p-a8cd5cde.system.entry.js} +5 -1
  156. package/dist/calcite/p-a923201d.system.entry.js +5 -0
  157. package/dist/calcite/p-a97338b7.entry.js +5 -0
  158. package/dist/calcite/p-aa53b2aa.system.entry.js +5 -0
  159. package/dist/calcite/p-aad45edf.system.js +5 -0
  160. package/dist/calcite/{p-82a11724.system.js → p-ac9607f2.system.js} +4 -0
  161. package/dist/calcite/p-accdb0ce.js +5 -0
  162. package/dist/calcite/p-adfa75fa.entry.js +5 -0
  163. package/dist/calcite/p-ae4f203c.system.entry.js +5 -0
  164. package/dist/calcite/{p-58421494.js → p-b06207bb.js} +4 -0
  165. package/dist/calcite/p-b1a670dd.system.entry.js +5 -0
  166. package/dist/calcite/p-b2ab0485.js +5 -0
  167. package/dist/calcite/{p-79e0b61b.system.entry.js → p-b5c2dfce.system.entry.js} +5 -1
  168. package/dist/calcite/{p-7b71e1d4.js → p-b7d3039d.js} +5 -1
  169. package/dist/calcite/p-b95dbc48.system.entry.js +5 -0
  170. package/dist/calcite/p-bb577ef7.system.entry.js +5 -0
  171. package/dist/calcite/{p-675364da.system.entry.js → p-bb916828.system.entry.js} +5 -1
  172. package/dist/calcite/p-bc56ab40.entry.js +5 -0
  173. package/dist/calcite/p-bdd6ec61.entry.js +5 -0
  174. package/dist/calcite/p-bee79057.system.entry.js +5 -0
  175. package/dist/calcite/p-c026ce05.entry.js +5 -0
  176. package/dist/calcite/p-c198f23c.entry.js +5 -0
  177. package/dist/calcite/{p-19d3b749.system.entry.js → p-c3922ef7.system.entry.js} +5 -1
  178. package/dist/calcite/p-c57f8690.entry.js +5 -0
  179. package/dist/calcite/{p-a57a7f49.js → p-c5ec8d74.js} +4 -0
  180. package/dist/calcite/p-c74fc589.system.js +5 -0
  181. package/dist/calcite/p-c7b4e11f.entry.js +5 -0
  182. package/dist/calcite/{p-8a30b93d.system.js → p-caf7085a.system.js} +4 -0
  183. package/dist/calcite/p-cb44170e.system.js +5 -0
  184. package/dist/calcite/p-cb87824b.entry.js +5 -0
  185. package/dist/calcite/{p-30f1442b.js → p-cbdf0e6c.js} +4 -0
  186. package/dist/calcite/p-cf512cfc.system.entry.js +5 -0
  187. package/dist/calcite/p-d1b49fa1.system.entry.js +5 -0
  188. package/dist/calcite/p-d24c670c.system.entry.js +5 -0
  189. package/dist/calcite/p-d35a300b.entry.js +5 -0
  190. package/dist/calcite/{p-18a62b5e.js → p-d35e423d.js} +4 -0
  191. package/dist/calcite/p-d7756753.entry.js +5 -0
  192. package/dist/calcite/p-daf4bb66.js +5 -0
  193. package/dist/calcite/p-db10485b.system.js +5 -0
  194. package/dist/calcite/p-dd92cde1.entry.js +5 -0
  195. package/dist/calcite/{p-2c235db8.system.js → p-e020662f.system.js} +4 -0
  196. package/dist/calcite/p-e3ea64dc.entry.js +5 -0
  197. package/dist/calcite/p-e4acb5a8.js +5 -0
  198. package/dist/calcite/p-e524bf4d.system.entry.js +5 -0
  199. package/dist/calcite/p-e6cc7798.entry.js +5 -0
  200. package/dist/calcite/p-e6ec69cf.entry.js +5 -0
  201. package/dist/calcite/{p-835b14f7.system.entry.js → p-eb027f31.system.entry.js} +5 -1
  202. package/dist/calcite/p-edc12d5c.entry.js +5 -0
  203. package/dist/calcite/p-efbf0d26.entry.js +5 -0
  204. package/dist/calcite/{p-ea51eaaa.js → p-f07d3627.js} +5 -1
  205. package/dist/calcite/{p-59f7b582.system.entry.js → p-f1cf1a10.system.entry.js} +5 -1
  206. package/dist/calcite/p-f243b615.js +5 -0
  207. package/dist/calcite/p-f33a21cf.system.entry.js +5 -0
  208. package/dist/calcite/p-f9428f19.system.entry.js +5 -0
  209. package/dist/calcite/p-fc0b3ef2.entry.js +5 -0
  210. package/dist/calcite/p-fe3880f2.entry.js +5 -0
  211. package/dist/calcite/p-ffb8f0a9.system.entry.js +5 -0
  212. package/dist/cjs/{CalciteExpandToggle-b5735fd2.js → CalciteExpandToggle-0d802f83.js} +8 -4
  213. package/dist/cjs/{CalciteHeading-177f59f2.js → CalciteHeading-381b977d.js} +5 -1
  214. package/dist/cjs/array-a5dedf5a.js +11 -0
  215. package/dist/cjs/calcite-accordion_2.cjs.entry.js +10 -6
  216. package/dist/cjs/calcite-action-bar.cjs.entry.js +13 -9
  217. package/dist/cjs/calcite-action-group.cjs.entry.js +10 -6
  218. package/dist/cjs/calcite-action-menu.cjs.entry.js +11 -7
  219. package/dist/cjs/calcite-action-pad.cjs.entry.js +11 -7
  220. package/dist/cjs/calcite-action.cjs.entry.js +9 -5
  221. package/dist/cjs/calcite-alert.cjs.entry.js +9 -5
  222. package/dist/cjs/calcite-avatar.cjs.entry.js +9 -5
  223. package/dist/cjs/calcite-block_2.cjs.entry.js +22 -15
  224. package/dist/cjs/calcite-button.cjs.entry.js +10 -6
  225. package/dist/cjs/calcite-card.cjs.entry.js +9 -5
  226. package/dist/cjs/calcite-checkbox.cjs.entry.js +10 -6
  227. package/dist/cjs/calcite-chip.cjs.entry.js +8 -4
  228. package/dist/cjs/calcite-color-picker_3.cjs.entry.js +14 -10
  229. package/dist/cjs/calcite-combobox_3.cjs.entry.js +17 -13
  230. package/dist/cjs/calcite-date-picker_4.cjs.entry.js +19 -15
  231. package/dist/cjs/calcite-dropdown_3.cjs.entry.js +13 -9
  232. package/dist/cjs/calcite-fab.cjs.entry.js +8 -4
  233. package/dist/cjs/calcite-filter.cjs.entry.js +10 -6
  234. package/dist/cjs/calcite-flow.cjs.entry.js +7 -3
  235. package/dist/cjs/calcite-graph_2.cjs.entry.js +12 -8
  236. package/dist/cjs/calcite-handle.cjs.entry.js +6 -2
  237. package/dist/cjs/calcite-icon.cjs.entry.js +9 -5
  238. package/dist/cjs/calcite-inline-editable.cjs.entry.js +9 -5
  239. package/dist/cjs/calcite-input-date-picker.cjs.entry.js +14 -10
  240. package/dist/cjs/calcite-input-message.cjs.entry.js +8 -4
  241. package/dist/cjs/calcite-input-time-picker_2.cjs.entry.js +12 -8
  242. package/dist/cjs/calcite-input.cjs.entry.js +18 -19
  243. package/dist/cjs/calcite-label.cjs.entry.js +9 -5
  244. package/dist/cjs/calcite-link.cjs.entry.js +8 -4
  245. package/dist/cjs/calcite-list_3.cjs.entry.js +11 -7
  246. package/dist/cjs/calcite-loader.cjs.entry.js +7 -3
  247. package/dist/cjs/calcite-modal.cjs.entry.js +10 -6
  248. package/dist/cjs/calcite-notice.cjs.entry.js +9 -5
  249. package/dist/cjs/calcite-option_3.cjs.entry.js +12 -8
  250. package/dist/cjs/calcite-pagination.cjs.entry.js +8 -4
  251. package/dist/cjs/calcite-panel.cjs.entry.js +10 -6
  252. package/dist/cjs/calcite-pick-list_3.cjs.entry.js +15 -11
  253. package/dist/cjs/calcite-popover_2.cjs.entry.js +11 -7
  254. package/dist/cjs/calcite-progress.cjs.entry.js +6 -2
  255. package/dist/cjs/calcite-radio-button-group.cjs.entry.js +6 -2
  256. package/dist/cjs/calcite-radio-group_2.cjs.entry.js +12 -8
  257. package/dist/cjs/calcite-radio_2.cjs.entry.js +11 -7
  258. package/dist/cjs/calcite-rating.cjs.entry.js +9 -5
  259. package/dist/cjs/calcite-scrim.cjs.entry.js +6 -2
  260. package/dist/cjs/calcite-shell_3.cjs.entry.js +10 -6
  261. package/dist/cjs/calcite-sortable-list.cjs.entry.js +8 -4
  262. package/dist/cjs/calcite-split-button.cjs.entry.js +8 -4
  263. package/dist/cjs/calcite-stepper_2.cjs.entry.js +10 -6
  264. package/dist/cjs/calcite-switch.cjs.entry.js +11 -7
  265. package/dist/cjs/calcite-tab_4.cjs.entry.js +13 -9
  266. package/dist/cjs/calcite-tile-select_2.cjs.entry.js +9 -5
  267. package/dist/cjs/calcite-tile.cjs.entry.js +8 -4
  268. package/dist/cjs/calcite-tip_3.cjs.entry.js +12 -8
  269. package/dist/cjs/calcite-tooltip_2.cjs.entry.js +11 -7
  270. package/dist/cjs/calcite-tree_2.cjs.entry.js +10 -6
  271. package/dist/cjs/calcite-value-list_2.cjs.entry.js +14 -10
  272. package/dist/cjs/calcite.cjs.js +6 -2
  273. package/dist/cjs/{debounce-11980960.js → debounce-95979061.js} +4 -0
  274. package/dist/cjs/{dom-c9cafa59.js → dom-19822169.js} +5 -1
  275. package/dist/cjs/{forIn-46535ded.js → forIn-a5d553af.js} +5 -1
  276. package/dist/cjs/{form-432ae178.js → form-00fb301c.js} +4 -0
  277. package/dist/cjs/{guid-4637ad8f.js → guid-b270f0db.js} +4 -0
  278. package/dist/cjs/{index-105d9087.js → index-1987a382.js} +4 -0
  279. package/dist/cjs/index.cjs.js +4 -0
  280. package/dist/cjs/{interfaces-bc0f5779.js → interfaces-54651c1c.js} +4 -0
  281. package/dist/cjs/{key-f470de4c.js → key-8bfb93ec.js} +4 -0
  282. package/dist/cjs/{label-80f9023b.js → label-4c30cbca.js} +5 -1
  283. package/dist/cjs/loader.cjs.js +6 -2
  284. package/dist/cjs/{locale-eb4486ae.js → locale-69dc9583.js} +5 -1
  285. package/dist/cjs/math-9d44163f.js +9 -0
  286. package/dist/cjs/{number-77308374.js → number-e6448e15.js} +5 -5
  287. package/dist/cjs/{observers-88b3a2d4.js → observers-41837607.js} +4 -0
  288. package/dist/cjs/{popper-a103e375.js → popper-cd9c0742.js} +36 -32
  289. package/dist/cjs/{resources-ae299e51.js → resources-407a4290.js} +4 -0
  290. package/dist/cjs/{resources-41daa7d4.js → resources-7dcd68d1.js} +6 -2
  291. package/dist/cjs/{resources-bbca3cea.js → resources-d0619f6a.js} +8 -4
  292. package/dist/cjs/{resources-76637167.js → resources-ffe563a2.js} +4 -0
  293. package/dist/cjs/{sortable.esm-bcce1d94.js → sortable.esm-d7a4560b.js} +4 -0
  294. package/dist/cjs/{utils-d549a0a9.js → utils-55d67711.js} +4 -0
  295. package/dist/collection/collection-manifest.json +1 -1
  296. package/dist/collection/components/calcite-accordion/calcite-accordion.js +4 -0
  297. package/dist/collection/components/calcite-accordion/interfaces.js +4 -0
  298. package/dist/collection/components/calcite-accordion-item/calcite-accordion-item.js +4 -0
  299. package/dist/collection/components/calcite-action/calcite-action.js +4 -0
  300. package/dist/collection/components/calcite-action/resources.js +4 -0
  301. package/dist/collection/components/calcite-action-bar/calcite-action-bar.js +4 -0
  302. package/dist/collection/components/calcite-action-bar/resources.js +4 -0
  303. package/dist/collection/components/calcite-action-bar/utils.js +4 -0
  304. package/dist/collection/components/calcite-action-group/calcite-action-group.js +4 -0
  305. package/dist/collection/components/calcite-action-group/resources.js +4 -0
  306. package/dist/collection/components/calcite-action-menu/calcite-action-menu.js +4 -0
  307. package/dist/collection/components/calcite-action-menu/resources.js +4 -0
  308. package/dist/collection/components/calcite-action-pad/calcite-action-pad.js +4 -0
  309. package/dist/collection/components/calcite-action-pad/resources.js +4 -0
  310. package/dist/collection/components/calcite-alert/calcite-alert.js +4 -0
  311. package/dist/collection/components/calcite-alert/interfaces.js +4 -0
  312. package/dist/collection/components/calcite-alert/resources.js +4 -0
  313. package/dist/collection/components/calcite-avatar/calcite-avatar.js +4 -0
  314. package/dist/collection/components/calcite-avatar/utils.js +4 -0
  315. package/dist/collection/components/calcite-block/calcite-block.css +18 -0
  316. package/dist/collection/components/calcite-block/calcite-block.js +11 -6
  317. package/dist/collection/components/calcite-block/resources.js +8 -2
  318. package/dist/collection/components/calcite-block-section/calcite-block-section.js +4 -0
  319. package/dist/collection/components/calcite-block-section/interfaces.js +4 -0
  320. package/dist/collection/components/calcite-block-section/resources.js +4 -0
  321. package/dist/collection/components/calcite-button/calcite-button.js +4 -0
  322. package/dist/collection/components/calcite-button/interfaces.js +4 -0
  323. package/dist/collection/components/calcite-button/resources.js +4 -0
  324. package/dist/collection/components/calcite-card/calcite-card.js +4 -0
  325. package/dist/collection/components/calcite-card/resources.js +4 -0
  326. package/dist/collection/components/calcite-checkbox/calcite-checkbox.js +4 -0
  327. package/dist/collection/components/calcite-chip/calcite-chip.js +4 -0
  328. package/dist/collection/components/calcite-chip/interfaces.js +4 -0
  329. package/dist/collection/components/calcite-chip/resources.js +4 -0
  330. package/dist/collection/components/calcite-color-picker/calcite-color-picker.js +4 -0
  331. package/dist/collection/components/calcite-color-picker/interfaces.js +4 -0
  332. package/dist/collection/components/calcite-color-picker/resources.js +4 -0
  333. package/dist/collection/components/calcite-color-picker/utils.js +4 -0
  334. package/dist/collection/components/calcite-color-picker-hex-input/calcite-color-picker-hex-input.js +4 -0
  335. package/dist/collection/components/calcite-color-picker-hex-input/resources.js +4 -0
  336. package/dist/collection/components/calcite-color-picker-swatch/calcite-color-picker-swatch.js +4 -0
  337. package/dist/collection/components/calcite-color-picker-swatch/resources.js +4 -0
  338. package/dist/collection/components/calcite-combobox/calcite-combobox.js +4 -0
  339. package/dist/collection/components/calcite-combobox/interfaces.js +4 -0
  340. package/dist/collection/components/calcite-combobox/resources.js +4 -0
  341. package/dist/collection/components/calcite-combobox/utils.js +4 -0
  342. package/dist/collection/components/calcite-combobox-item/calcite-combobox-item.css +1 -1
  343. package/dist/collection/components/calcite-combobox-item/calcite-combobox-item.js +4 -0
  344. package/dist/collection/components/calcite-combobox-item/resources.js +4 -0
  345. package/dist/collection/components/calcite-combobox-item-group/calcite-combobox-item-group.js +4 -0
  346. package/dist/collection/components/calcite-combobox-item-group/resources.js +4 -0
  347. package/dist/collection/components/calcite-date-picker/calcite-date-picker.js +4 -0
  348. package/dist/collection/components/calcite-date-picker/interfaces.js +4 -0
  349. package/dist/collection/components/calcite-date-picker/resources.js +4 -0
  350. package/dist/collection/components/calcite-date-picker/utils.js +4 -0
  351. package/dist/collection/components/calcite-date-picker-day/calcite-date-picker-day.css +1 -1
  352. package/dist/collection/components/calcite-date-picker-day/calcite-date-picker-day.js +4 -0
  353. package/dist/collection/components/calcite-date-picker-month/calcite-date-picker-month.css +1 -1
  354. package/dist/collection/components/calcite-date-picker-month/calcite-date-picker-month.js +4 -0
  355. package/dist/collection/components/calcite-date-picker-month-header/calcite-date-picker-month-header.css +1 -1
  356. package/dist/collection/components/calcite-date-picker-month-header/calcite-date-picker-month-header.js +4 -0
  357. package/dist/collection/components/calcite-dropdown/calcite-dropdown.css +0 -1
  358. package/dist/collection/components/calcite-dropdown/calcite-dropdown.js +4 -0
  359. package/dist/collection/components/calcite-dropdown/interfaces.js +4 -0
  360. package/dist/collection/components/calcite-dropdown/resources.js +4 -0
  361. package/dist/collection/components/calcite-dropdown-group/calcite-dropdown-group.js +4 -0
  362. package/dist/collection/components/calcite-dropdown-group/interfaces.js +4 -0
  363. package/dist/collection/components/calcite-dropdown-group/resources.js +4 -0
  364. package/dist/collection/components/calcite-dropdown-item/calcite-dropdown-item.js +4 -0
  365. package/dist/collection/components/calcite-dropdown-item/resources.js +4 -0
  366. package/dist/collection/components/calcite-fab/calcite-fab.js +4 -0
  367. package/dist/collection/components/calcite-fab/resources.js +4 -0
  368. package/dist/collection/components/calcite-filter/calcite-filter.js +4 -0
  369. package/dist/collection/components/calcite-filter/resources.js +4 -0
  370. package/dist/collection/components/calcite-flow/calcite-flow.js +4 -0
  371. package/dist/collection/components/calcite-flow/interfaces.js +4 -0
  372. package/dist/collection/components/calcite-flow/resources.js +4 -0
  373. package/dist/collection/components/calcite-graph/calcite-graph.js +4 -0
  374. package/dist/collection/components/calcite-graph/interfaces.js +4 -0
  375. package/dist/collection/components/calcite-graph/util.js +4 -0
  376. package/dist/collection/components/calcite-handle/calcite-handle.js +4 -0
  377. package/dist/collection/components/calcite-handle/resources.js +4 -0
  378. package/dist/collection/components/calcite-icon/assets/calcite-icon/classifyObjects16.json +1 -0
  379. package/dist/collection/components/calcite-icon/assets/calcite-icon/classifyObjects24.json +1 -0
  380. package/dist/collection/components/calcite-icon/assets/calcite-icon/classifyObjects32.json +1 -0
  381. package/dist/collection/components/calcite-icon/assets/calcite-icon/classifyPixels16.json +1 -0
  382. package/dist/collection/components/calcite-icon/assets/calcite-icon/classifyPixels24.json +1 -0
  383. package/dist/collection/components/calcite-icon/assets/calcite-icon/classifyPixels32.json +1 -0
  384. package/dist/collection/components/calcite-icon/assets/calcite-icon/dataCloud16.json +1 -0
  385. package/dist/collection/components/calcite-icon/assets/calcite-icon/dataCloud24.json +1 -0
  386. package/dist/collection/components/calcite-icon/assets/calcite-icon/dataCloud32.json +1 -0
  387. package/dist/collection/components/calcite-icon/assets/calcite-icon/dataFolder16.json +1 -0
  388. package/dist/collection/components/calcite-icon/assets/calcite-icon/dataFolder24.json +1 -0
  389. package/dist/collection/components/calcite-icon/assets/calcite-icon/dataFolder32.json +1 -0
  390. package/dist/collection/components/calcite-icon/assets/calcite-icon/dataRaster16.json +1 -0
  391. package/dist/collection/components/calcite-icon/assets/calcite-icon/dataRaster24.json +1 -0
  392. package/dist/collection/components/calcite-icon/assets/calcite-icon/dataRaster32.json +1 -0
  393. package/dist/collection/components/calcite-icon/assets/calcite-icon/distributeHeightEvenly16.json +1 -0
  394. package/dist/collection/components/calcite-icon/assets/calcite-icon/distributeHeightEvenly24.json +1 -0
  395. package/dist/collection/components/calcite-icon/assets/calcite-icon/distributeHeightEvenly32.json +1 -0
  396. package/dist/collection/components/calcite-icon/assets/calcite-icon/distributeWidthEvenly16.json +1 -0
  397. package/dist/collection/components/calcite-icon/assets/calcite-icon/distributeWidthEvenly24.json +1 -0
  398. package/dist/collection/components/calcite-icon/assets/calcite-icon/distributeWidthEvenly32.json +1 -0
  399. package/dist/collection/components/calcite-icon/assets/calcite-icon/gridUnit16.json +1 -0
  400. package/dist/collection/components/calcite-icon/assets/calcite-icon/gridUnit24.json +1 -0
  401. package/dist/collection/components/calcite-icon/assets/calcite-icon/gridUnit32.json +1 -0
  402. package/dist/collection/components/calcite-icon/assets/calcite-icon/horizontalDistribute16.json +1 -0
  403. package/dist/collection/components/calcite-icon/assets/calcite-icon/horizontalDistribute24.json +1 -0
  404. package/dist/collection/components/calcite-icon/assets/calcite-icon/horizontalDistribute32.json +1 -0
  405. package/dist/collection/components/calcite-icon/assets/calcite-icon/imageChips16.json +1 -0
  406. package/dist/collection/components/calcite-icon/assets/calcite-icon/imageChips24.json +1 -0
  407. package/dist/collection/components/calcite-icon/assets/calcite-icon/imageChips32.json +1 -0
  408. package/dist/collection/components/calcite-icon/assets/calcite-icon/imageUnit16.json +1 -0
  409. package/dist/collection/components/calcite-icon/assets/calcite-icon/imageUnit24.json +1 -0
  410. package/dist/collection/components/calcite-icon/assets/calcite-icon/imageUnit32.json +1 -0
  411. package/dist/collection/components/calcite-icon/assets/calcite-icon/newTraining16.json +1 -0
  412. package/dist/collection/components/calcite-icon/assets/calcite-icon/newTraining24.json +1 -0
  413. package/dist/collection/components/calcite-icon/assets/calcite-icon/newTraining32.json +1 -0
  414. package/dist/collection/components/calcite-icon/assets/calcite-icon/retrain16.json +1 -0
  415. package/dist/collection/components/calcite-icon/assets/calcite-icon/retrain24.json +1 -0
  416. package/dist/collection/components/calcite-icon/assets/calcite-icon/retrain32.json +1 -0
  417. package/dist/collection/components/calcite-icon/assets/calcite-icon/smartForm16.json +1 -0
  418. package/dist/collection/components/calcite-icon/assets/calcite-icon/smartForm24.json +1 -0
  419. package/dist/collection/components/calcite-icon/assets/calcite-icon/smartForm32.json +1 -0
  420. package/dist/collection/components/calcite-icon/assets/calcite-icon/verticalDistribute16.json +1 -0
  421. package/dist/collection/components/calcite-icon/assets/calcite-icon/verticalDistribute24.json +1 -0
  422. package/dist/collection/components/calcite-icon/assets/calcite-icon/verticalDistribute32.json +1 -0
  423. package/dist/collection/components/calcite-icon/calcite-icon.js +4 -0
  424. package/dist/collection/components/calcite-icon/resources.js +4 -0
  425. package/dist/collection/components/calcite-icon/utils.js +4 -0
  426. package/dist/collection/components/calcite-inline-editable/calcite-inline-editable.js +4 -0
  427. package/dist/collection/components/calcite-inline-editable/resources.js +4 -0
  428. package/dist/collection/components/calcite-input/calcite-input.js +10 -11
  429. package/dist/collection/components/calcite-input/interfaces.js +4 -0
  430. package/dist/collection/components/calcite-input/resources.js +4 -0
  431. package/dist/collection/components/calcite-input-date-picker/calcite-input-date-picker.js +4 -0
  432. package/dist/collection/components/calcite-input-message/calcite-input-message.js +4 -0
  433. package/dist/collection/components/calcite-input-message/interfaces.js +4 -0
  434. package/dist/collection/components/calcite-input-time-picker/calcite-input-time-picker.js +4 -0
  435. package/dist/collection/components/calcite-label/calcite-label.js +6 -2
  436. package/dist/collection/components/calcite-label/resources.js +4 -0
  437. package/dist/collection/components/calcite-link/calcite-link.js +4 -0
  438. package/dist/collection/components/calcite-list/calcite-list.js +4 -0
  439. package/dist/collection/components/calcite-list/resources.js +4 -0
  440. package/dist/collection/components/calcite-list-item/calcite-list-item.js +4 -0
  441. package/dist/collection/components/calcite-list-item/resources.js +4 -0
  442. package/dist/collection/components/calcite-list-item-group/calcite-list-item-group.js +4 -0
  443. package/dist/collection/components/calcite-list-item-group/resources.js +4 -0
  444. package/dist/collection/components/calcite-loader/calcite-loader.js +4 -0
  445. package/dist/collection/components/calcite-modal/calcite-modal.js +4 -0
  446. package/dist/collection/components/calcite-modal/interfaces.js +4 -0
  447. package/dist/collection/components/calcite-modal/resources.js +4 -0
  448. package/dist/collection/components/calcite-notice/calcite-notice.js +4 -0
  449. package/dist/collection/components/calcite-notice/resources.js +4 -0
  450. package/dist/collection/components/calcite-option/calcite-option.js +4 -0
  451. package/dist/collection/components/calcite-option-group/calcite-option-group.js +4 -0
  452. package/dist/collection/components/calcite-pagination/calcite-pagination.js +4 -0
  453. package/dist/collection/components/calcite-pagination/resources.js +4 -0
  454. package/dist/collection/components/calcite-panel/calcite-panel.js +4 -0
  455. package/dist/collection/components/calcite-panel/resources.js +4 -0
  456. package/dist/collection/components/calcite-pick-list/calcite-pick-list.js +4 -0
  457. package/dist/collection/components/calcite-pick-list/resources.js +4 -0
  458. package/dist/collection/components/calcite-pick-list/shared-list-logic.js +4 -0
  459. package/dist/collection/components/calcite-pick-list/shared-list-render.js +4 -0
  460. package/dist/collection/components/calcite-pick-list-group/calcite-pick-list-group.js +4 -0
  461. package/dist/collection/components/calcite-pick-list-group/resources.js +4 -0
  462. package/dist/collection/components/calcite-pick-list-item/calcite-pick-list-item.js +4 -0
  463. package/dist/collection/components/calcite-pick-list-item/resources.js +4 -0
  464. package/dist/collection/components/calcite-popover/calcite-popover.js +4 -0
  465. package/dist/collection/components/calcite-popover/resources.js +4 -0
  466. package/dist/collection/components/calcite-popover-manager/calcite-popover-manager.js +4 -0
  467. package/dist/collection/components/calcite-progress/calcite-progress.js +4 -0
  468. package/dist/collection/components/calcite-radio/calcite-radio.js +4 -0
  469. package/dist/collection/components/calcite-radio-button/calcite-radio-button.js +4 -0
  470. package/dist/collection/components/calcite-radio-button/resources.js +4 -0
  471. package/dist/collection/components/calcite-radio-button-group/calcite-radio-button-group.js +4 -0
  472. package/dist/collection/components/calcite-radio-group/calcite-radio-group.js +4 -0
  473. package/dist/collection/components/calcite-radio-group/interfaces.js +4 -0
  474. package/dist/collection/components/calcite-radio-group-item/calcite-radio-group-item.js +4 -0
  475. package/dist/collection/components/calcite-radio-group-item/resources.js +4 -0
  476. package/dist/collection/components/calcite-rating/calcite-rating.js +4 -0
  477. package/dist/collection/components/calcite-rating/resources.js +4 -0
  478. package/dist/collection/components/calcite-scrim/calcite-scrim.js +4 -0
  479. package/dist/collection/components/calcite-scrim/resources.js +4 -0
  480. package/dist/collection/components/calcite-select/calcite-select.js +4 -0
  481. package/dist/collection/components/calcite-select/resources.js +4 -0
  482. package/dist/collection/components/calcite-shell/calcite-shell.js +4 -0
  483. package/dist/collection/components/calcite-shell/resources.js +4 -0
  484. package/dist/collection/components/calcite-shell-center-row/calcite-shell-center-row.js +4 -0
  485. package/dist/collection/components/calcite-shell-center-row/resources.js +4 -0
  486. package/dist/collection/components/calcite-shell-panel/calcite-shell-panel.js +4 -0
  487. package/dist/collection/components/calcite-shell-panel/resources.js +4 -0
  488. package/dist/collection/components/calcite-slider/calcite-slider.js +4 -0
  489. package/dist/collection/components/calcite-sortable-list/calcite-sortable-list.js +4 -0
  490. package/dist/collection/components/calcite-sortable-list/resources.js +4 -0
  491. package/dist/collection/components/calcite-split-button/calcite-split-button.js +4 -0
  492. package/dist/collection/components/calcite-split-button/resources.js +4 -0
  493. package/dist/collection/components/calcite-stepper/calcite-stepper.js +4 -0
  494. package/dist/collection/components/calcite-stepper-item/calcite-stepper-item.js +4 -0
  495. package/dist/collection/components/calcite-switch/calcite-switch.js +4 -0
  496. package/dist/collection/components/calcite-tab/calcite-tab.js +4 -0
  497. package/dist/collection/components/calcite-tab/interfaces.js +4 -0
  498. package/dist/collection/components/calcite-tab-nav/calcite-tab-nav.js +4 -0
  499. package/dist/collection/components/calcite-tab-title/calcite-tab-title.js +4 -0
  500. package/dist/collection/components/calcite-tabs/calcite-tabs.js +4 -0
  501. package/dist/collection/components/calcite-tabs/interfaces.js +4 -0
  502. package/dist/collection/components/calcite-tabs/resources.js +4 -0
  503. package/dist/collection/components/calcite-tile/calcite-tile.js +4 -0
  504. package/dist/collection/components/calcite-tile/resources.js +4 -0
  505. package/dist/collection/components/calcite-tile-select/calcite-tile-select.js +4 -0
  506. package/dist/collection/components/calcite-tile-select/interfaces.js +4 -0
  507. package/dist/collection/components/calcite-tile-select-group/calcite-tile-select-group.js +4 -0
  508. package/dist/collection/components/calcite-tile-select-group/interfaces.js +4 -0
  509. package/dist/collection/components/calcite-time-picker/calcite-time-picker.js +4 -0
  510. package/dist/collection/components/calcite-time-picker/resources.js +4 -0
  511. package/dist/collection/components/calcite-tip/calcite-tip.js +4 -0
  512. package/dist/collection/components/calcite-tip/resources.js +4 -0
  513. package/dist/collection/components/calcite-tip-group/calcite-tip-group.js +4 -0
  514. package/dist/collection/components/calcite-tip-manager/calcite-tip-manager.js +4 -0
  515. package/dist/collection/components/calcite-tip-manager/resources.js +4 -0
  516. package/dist/collection/components/calcite-tooltip/calcite-tooltip.js +4 -0
  517. package/dist/collection/components/calcite-tooltip/resources.js +4 -0
  518. package/dist/collection/components/calcite-tooltip-manager/calcite-tooltip-manager.js +4 -0
  519. package/dist/collection/components/calcite-tree/calcite-tree.js +4 -0
  520. package/dist/collection/components/calcite-tree/interfaces.js +4 -0
  521. package/dist/collection/components/calcite-tree-item/calcite-tree-item.js +4 -0
  522. package/dist/collection/components/calcite-tree-item/interfaces.js +4 -0
  523. package/dist/collection/components/calcite-tree-item/resources.js +4 -0
  524. package/dist/collection/components/calcite-value-list/calcite-value-list.js +5 -1
  525. package/dist/collection/components/calcite-value-list/resources.js +4 -0
  526. package/dist/collection/components/calcite-value-list-item/calcite-value-list-item.js +4 -0
  527. package/dist/collection/components/calcite-value-list-item/resources.js +4 -0
  528. package/dist/collection/components/functional/CalciteExpandToggle.js +4 -0
  529. package/dist/collection/components/functional/CalciteHeading.js +4 -0
  530. package/dist/collection/components/interfaces.js +4 -0
  531. package/dist/collection/utils/array.js +4 -0
  532. package/dist/collection/utils/date.js +4 -0
  533. package/dist/collection/utils/dom.js +4 -0
  534. package/dist/collection/utils/filter.js +4 -0
  535. package/dist/collection/utils/form.js +4 -0
  536. package/dist/collection/utils/guid.js +4 -0
  537. package/dist/collection/utils/key.js +4 -0
  538. package/dist/collection/utils/label.js +4 -0
  539. package/dist/collection/utils/locale.js +4 -0
  540. package/dist/collection/utils/math.js +4 -0
  541. package/dist/collection/utils/number.js +4 -3
  542. package/dist/collection/utils/observers.js +4 -0
  543. package/dist/collection/utils/popper.js +4 -0
  544. package/dist/collection/utils/resources.js +4 -0
  545. package/dist/collection/utils/time.js +4 -0
  546. package/dist/custom-elements/index.js +149 -150
  547. package/dist/custom-elements/index.mjs +149 -150
  548. package/dist/esm/{CalciteExpandToggle-a149fed4.js → CalciteExpandToggle-b1e6e72d.js} +8 -4
  549. package/dist/esm/{CalciteHeading-29855e9f.js → CalciteHeading-1735f17a.js} +5 -1
  550. package/dist/esm/array-91a648e2.js +9 -0
  551. package/dist/esm/calcite-accordion_2.entry.js +10 -6
  552. package/dist/esm/calcite-action-bar.entry.js +13 -9
  553. package/dist/esm/calcite-action-group.entry.js +10 -6
  554. package/dist/esm/calcite-action-menu.entry.js +11 -7
  555. package/dist/esm/calcite-action-pad.entry.js +11 -7
  556. package/dist/esm/calcite-action.entry.js +9 -5
  557. package/dist/esm/calcite-alert.entry.js +9 -5
  558. package/dist/esm/calcite-avatar.entry.js +9 -5
  559. package/dist/esm/calcite-block_2.entry.js +22 -15
  560. package/dist/esm/calcite-button.entry.js +10 -6
  561. package/dist/esm/calcite-card.entry.js +9 -5
  562. package/dist/esm/calcite-checkbox.entry.js +10 -6
  563. package/dist/esm/calcite-chip.entry.js +8 -4
  564. package/dist/esm/calcite-color-picker_3.entry.js +14 -10
  565. package/dist/esm/calcite-combobox_3.entry.js +17 -13
  566. package/dist/esm/calcite-date-picker_4.entry.js +19 -15
  567. package/dist/esm/calcite-dropdown_3.entry.js +13 -9
  568. package/dist/esm/calcite-fab.entry.js +8 -4
  569. package/dist/esm/calcite-filter.entry.js +10 -6
  570. package/dist/esm/calcite-flow.entry.js +7 -3
  571. package/dist/esm/calcite-graph_2.entry.js +12 -8
  572. package/dist/esm/calcite-handle.entry.js +6 -2
  573. package/dist/esm/calcite-icon.entry.js +9 -5
  574. package/dist/esm/calcite-inline-editable.entry.js +9 -5
  575. package/dist/esm/calcite-input-date-picker.entry.js +14 -10
  576. package/dist/esm/calcite-input-message.entry.js +8 -4
  577. package/dist/esm/calcite-input-time-picker_2.entry.js +12 -8
  578. package/dist/esm/calcite-input.entry.js +18 -19
  579. package/dist/esm/calcite-label.entry.js +9 -5
  580. package/dist/esm/calcite-link.entry.js +8 -4
  581. package/dist/esm/calcite-list_3.entry.js +11 -7
  582. package/dist/esm/calcite-loader.entry.js +7 -3
  583. package/dist/esm/calcite-modal.entry.js +10 -6
  584. package/dist/esm/calcite-notice.entry.js +9 -5
  585. package/dist/esm/calcite-option_3.entry.js +12 -8
  586. package/dist/esm/calcite-pagination.entry.js +8 -4
  587. package/dist/esm/calcite-panel.entry.js +10 -6
  588. package/dist/esm/calcite-pick-list_3.entry.js +15 -11
  589. package/dist/esm/calcite-popover_2.entry.js +11 -7
  590. package/dist/esm/calcite-progress.entry.js +6 -2
  591. package/dist/esm/calcite-radio-button-group.entry.js +6 -2
  592. package/dist/esm/calcite-radio-group_2.entry.js +12 -8
  593. package/dist/esm/calcite-radio_2.entry.js +11 -7
  594. package/dist/esm/calcite-rating.entry.js +9 -5
  595. package/dist/esm/calcite-scrim.entry.js +6 -2
  596. package/dist/esm/calcite-shell_3.entry.js +10 -6
  597. package/dist/esm/calcite-sortable-list.entry.js +8 -4
  598. package/dist/esm/calcite-split-button.entry.js +8 -4
  599. package/dist/esm/calcite-stepper_2.entry.js +10 -6
  600. package/dist/esm/calcite-switch.entry.js +11 -7
  601. package/dist/esm/calcite-tab_4.entry.js +13 -9
  602. package/dist/esm/calcite-tile-select_2.entry.js +9 -5
  603. package/dist/esm/calcite-tile.entry.js +8 -4
  604. package/dist/esm/calcite-tip_3.entry.js +12 -8
  605. package/dist/esm/calcite-tooltip_2.entry.js +11 -7
  606. package/dist/esm/calcite-tree_2.entry.js +10 -6
  607. package/dist/esm/calcite-value-list_2.entry.js +14 -10
  608. package/dist/esm/calcite.js +6 -2
  609. package/dist/esm/{debounce-047e09f4.js → debounce-79648d42.js} +4 -0
  610. package/dist/esm/{dom-b369a031.js → dom-70b0e988.js} +5 -1
  611. package/dist/esm/{forIn-d55260fc.js → forIn-48d8fb84.js} +5 -1
  612. package/dist/esm/{form-8aa0d95b.js → form-cee9f632.js} +4 -0
  613. package/dist/esm/{guid-09142681.js → guid-196bd5ea.js} +4 -0
  614. package/dist/esm/{index-f8f0bea7.js → index-d653c37f.js} +4 -0
  615. package/dist/esm/index.js +4 -1
  616. package/dist/esm/{interfaces-355fccb6.js → interfaces-51dc4e1b.js} +4 -0
  617. package/dist/esm/{key-ec82f942.js → key-69001a68.js} +4 -0
  618. package/dist/esm/{label-7b249c54.js → label-426b4471.js} +5 -1
  619. package/dist/esm/loader.js +6 -2
  620. package/dist/esm/{locale-8436bbe1.js → locale-6c1b85c7.js} +5 -1
  621. package/dist/esm/math-250d4476.js +7 -0
  622. package/dist/esm/{number-358ca1d4.js → number-e7393766.js} +6 -5
  623. package/dist/esm/{observers-c93d4fe5.js → observers-8f0bc419.js} +4 -0
  624. package/dist/esm/{popper-2757192a.js → popper-44055f06.js} +36 -32
  625. package/dist/esm/{resources-28d71943.js → resources-3b481489.js} +6 -2
  626. package/dist/esm/{resources-c651d73a.js → resources-56ac5dd9.js} +8 -4
  627. package/dist/esm/{resources-82817f70.js → resources-584acd9b.js} +4 -0
  628. package/dist/esm/{resources-c72ebfea.js → resources-7c6029b6.js} +4 -0
  629. package/dist/esm/{sortable.esm-2f5354d3.js → sortable.esm-04824d33.js} +4 -0
  630. package/dist/esm/{utils-60acc1d6.js → utils-6beb0662.js} +4 -0
  631. package/dist/esm-es5/{CalciteExpandToggle-a149fed4.js → CalciteExpandToggle-b1e6e72d.js} +5 -1
  632. package/dist/esm-es5/CalciteHeading-1735f17a.js +5 -0
  633. package/dist/esm-es5/array-91a648e2.js +5 -0
  634. package/dist/esm-es5/calcite-accordion_2.entry.js +5 -1
  635. package/dist/esm-es5/calcite-action-bar.entry.js +5 -1
  636. package/dist/esm-es5/calcite-action-group.entry.js +5 -1
  637. package/dist/esm-es5/calcite-action-menu.entry.js +5 -1
  638. package/dist/esm-es5/calcite-action-pad.entry.js +5 -1
  639. package/dist/esm-es5/calcite-action.entry.js +5 -1
  640. package/dist/esm-es5/calcite-alert.entry.js +5 -1
  641. package/dist/esm-es5/calcite-avatar.entry.js +5 -1
  642. package/dist/esm-es5/calcite-block_2.entry.js +5 -1
  643. package/dist/esm-es5/calcite-button.entry.js +5 -1
  644. package/dist/esm-es5/calcite-card.entry.js +5 -1
  645. package/dist/esm-es5/calcite-checkbox.entry.js +5 -1
  646. package/dist/esm-es5/calcite-chip.entry.js +5 -1
  647. package/dist/esm-es5/calcite-color-picker_3.entry.js +5 -1
  648. package/dist/esm-es5/calcite-combobox_3.entry.js +5 -1
  649. package/dist/esm-es5/calcite-date-picker_4.entry.js +5 -1
  650. package/dist/esm-es5/calcite-dropdown_3.entry.js +5 -1
  651. package/dist/esm-es5/calcite-fab.entry.js +5 -1
  652. package/dist/esm-es5/calcite-filter.entry.js +5 -1
  653. package/dist/esm-es5/calcite-flow.entry.js +5 -1
  654. package/dist/esm-es5/calcite-graph_2.entry.js +5 -1
  655. package/dist/esm-es5/calcite-handle.entry.js +5 -1
  656. package/dist/esm-es5/calcite-icon.entry.js +5 -1
  657. package/dist/esm-es5/calcite-inline-editable.entry.js +5 -1
  658. package/dist/esm-es5/calcite-input-date-picker.entry.js +5 -1
  659. package/dist/esm-es5/calcite-input-message.entry.js +5 -1
  660. package/dist/esm-es5/calcite-input-time-picker_2.entry.js +5 -1
  661. package/dist/esm-es5/calcite-input.entry.js +5 -1
  662. package/dist/esm-es5/calcite-label.entry.js +5 -1
  663. package/dist/esm-es5/calcite-link.entry.js +5 -1
  664. package/dist/esm-es5/calcite-list_3.entry.js +5 -1
  665. package/dist/esm-es5/calcite-loader.entry.js +5 -1
  666. package/dist/esm-es5/calcite-modal.entry.js +5 -1
  667. package/dist/esm-es5/calcite-notice.entry.js +5 -1
  668. package/dist/esm-es5/calcite-option_3.entry.js +5 -1
  669. package/dist/esm-es5/calcite-pagination.entry.js +5 -1
  670. package/dist/esm-es5/calcite-panel.entry.js +5 -1
  671. package/dist/esm-es5/calcite-pick-list_3.entry.js +5 -1
  672. package/dist/esm-es5/calcite-popover_2.entry.js +5 -1
  673. package/dist/esm-es5/calcite-progress.entry.js +5 -1
  674. package/dist/esm-es5/calcite-radio-button-group.entry.js +5 -1
  675. package/dist/esm-es5/calcite-radio-group_2.entry.js +5 -1
  676. package/dist/esm-es5/calcite-radio_2.entry.js +5 -1
  677. package/dist/esm-es5/calcite-rating.entry.js +5 -1
  678. package/dist/esm-es5/calcite-scrim.entry.js +5 -1
  679. package/dist/esm-es5/calcite-shell_3.entry.js +5 -1
  680. package/dist/esm-es5/calcite-sortable-list.entry.js +5 -1
  681. package/dist/esm-es5/calcite-split-button.entry.js +5 -1
  682. package/dist/esm-es5/calcite-stepper_2.entry.js +5 -1
  683. package/dist/esm-es5/calcite-switch.entry.js +5 -1
  684. package/dist/esm-es5/calcite-tab_4.entry.js +5 -1
  685. package/dist/esm-es5/calcite-tile-select_2.entry.js +5 -1
  686. package/dist/esm-es5/calcite-tile.entry.js +5 -1
  687. package/dist/esm-es5/calcite-tip_3.entry.js +5 -1
  688. package/dist/esm-es5/calcite-tooltip_2.entry.js +5 -1
  689. package/dist/esm-es5/calcite-tree_2.entry.js +5 -1
  690. package/dist/esm-es5/calcite-value-list_2.entry.js +5 -1
  691. package/dist/esm-es5/calcite.js +5 -1
  692. package/dist/esm-es5/{debounce-047e09f4.js → debounce-79648d42.js} +4 -0
  693. package/dist/esm-es5/dom-70b0e988.js +5 -0
  694. package/dist/esm-es5/{forIn-d55260fc.js → forIn-48d8fb84.js} +5 -1
  695. package/dist/esm-es5/{form-8aa0d95b.js → form-cee9f632.js} +4 -0
  696. package/dist/esm-es5/guid-196bd5ea.js +5 -0
  697. package/dist/esm-es5/index-d653c37f.js +5 -0
  698. package/dist/esm-es5/index.js +4 -0
  699. package/dist/esm-es5/{interfaces-355fccb6.js → interfaces-51dc4e1b.js} +4 -0
  700. package/dist/esm-es5/{key-ec82f942.js → key-69001a68.js} +4 -0
  701. package/dist/esm-es5/{label-7b249c54.js → label-426b4471.js} +5 -1
  702. package/dist/esm-es5/loader.js +5 -1
  703. package/dist/esm-es5/{locale-8436bbe1.js → locale-6c1b85c7.js} +5 -1
  704. package/dist/esm-es5/math-250d4476.js +5 -0
  705. package/dist/esm-es5/number-e7393766.js +5 -0
  706. package/dist/esm-es5/observers-8f0bc419.js +5 -0
  707. package/dist/esm-es5/popper-44055f06.js +5 -0
  708. package/dist/esm-es5/resources-3b481489.js +5 -0
  709. package/dist/esm-es5/resources-56ac5dd9.js +5 -0
  710. package/dist/esm-es5/resources-584acd9b.js +5 -0
  711. package/dist/esm-es5/resources-7c6029b6.js +5 -0
  712. package/dist/esm-es5/{sortable.esm-2f5354d3.js → sortable.esm-04824d33.js} +4 -0
  713. package/dist/esm-es5/{utils-60acc1d6.js → utils-6beb0662.js} +4 -0
  714. package/dist/extras/docs-json.json +5 -5
  715. package/dist/loader/cdn.js +4 -1
  716. package/dist/loader/index.cjs.js +4 -1
  717. package/dist/loader/index.d.ts +0 -1
  718. package/dist/loader/index.es2017.js +4 -1
  719. package/dist/loader/index.js +4 -1
  720. package/dist/types/components/calcite-block/resources.d.ts +2 -0
  721. package/dist/types/components/calcite-label/calcite-label.d.ts +1 -1
  722. package/dist/types/components/calcite-value-list/calcite-value-list.d.ts +1 -1
  723. package/dist/types/components.d.ts +2 -2
  724. package/dist/types/utils/number.d.ts +0 -1
  725. package/hydrate/index.js +63 -61
  726. package/package.json +22 -22
  727. package/readme.md +3 -3
  728. package/dist/calcite/p-058f3354.system.entry.js +0 -1
  729. package/dist/calcite/p-088c0c7a.entry.js +0 -1
  730. package/dist/calcite/p-0ae16e31.js +0 -1
  731. package/dist/calcite/p-0b539bae.system.entry.js +0 -1
  732. package/dist/calcite/p-1436091f.entry.js +0 -1
  733. package/dist/calcite/p-14893331.system.entry.js +0 -1
  734. package/dist/calcite/p-15df41f1.entry.js +0 -1
  735. package/dist/calcite/p-16f5928d.entry.js +0 -1
  736. package/dist/calcite/p-1a53829b.system.entry.js +0 -1
  737. package/dist/calcite/p-1bf298c2.entry.js +0 -1
  738. package/dist/calcite/p-1c3f7bb2.entry.js +0 -1
  739. package/dist/calcite/p-1df0fd29.system.entry.js +0 -1
  740. package/dist/calcite/p-25276cc7.entry.js +0 -1
  741. package/dist/calcite/p-31962890.entry.js +0 -1
  742. package/dist/calcite/p-3426e87b.system.js +0 -1
  743. package/dist/calcite/p-354fbadd.js +0 -1
  744. package/dist/calcite/p-38b3ff5f.system.entry.js +0 -1
  745. package/dist/calcite/p-3c0315f6.entry.js +0 -1
  746. package/dist/calcite/p-3c6b85d2.entry.js +0 -1
  747. package/dist/calcite/p-41ad9e5a.entry.js +0 -1
  748. package/dist/calcite/p-43a9faca.js +0 -1
  749. package/dist/calcite/p-44c0b088.entry.js +0 -1
  750. package/dist/calcite/p-46f1277f.entry.js +0 -1
  751. package/dist/calcite/p-482ec054.system.js +0 -1
  752. package/dist/calcite/p-484d449e.entry.js +0 -1
  753. package/dist/calcite/p-4a41b489.entry.js +0 -1
  754. package/dist/calcite/p-4ee7aac6.entry.js +0 -1
  755. package/dist/calcite/p-4f24139e.system.entry.js +0 -1
  756. package/dist/calcite/p-4fce2a7a.system.js +0 -1
  757. package/dist/calcite/p-4fda49e6.js +0 -1
  758. package/dist/calcite/p-50ea2036.system.js +0 -1
  759. package/dist/calcite/p-520d805f.entry.js +0 -1
  760. package/dist/calcite/p-52ae0e4a.entry.js +0 -1
  761. package/dist/calcite/p-55379ee6.system.entry.js +0 -1
  762. package/dist/calcite/p-559ffa87.js +0 -1
  763. package/dist/calcite/p-5b2e8494.entry.js +0 -1
  764. package/dist/calcite/p-5d57b25e.entry.js +0 -1
  765. package/dist/calcite/p-5f50d376.system.entry.js +0 -1
  766. package/dist/calcite/p-61471d5c.entry.js +0 -1
  767. package/dist/calcite/p-62977e6b.system.entry.js +0 -1
  768. package/dist/calcite/p-6350bcd3.system.js +0 -1
  769. package/dist/calcite/p-66798503.entry.js +0 -1
  770. package/dist/calcite/p-674bc090.system.js +0 -1
  771. package/dist/calcite/p-68206a3f.entry.js +0 -1
  772. package/dist/calcite/p-6b82c386.entry.js +0 -1
  773. package/dist/calcite/p-6d98d9dc.system.entry.js +0 -1
  774. package/dist/calcite/p-6edac967.system.entry.js +0 -1
  775. package/dist/calcite/p-74d42e2c.entry.js +0 -1
  776. package/dist/calcite/p-7506e28d.entry.js +0 -1
  777. package/dist/calcite/p-7521b7ab.system.entry.js +0 -1
  778. package/dist/calcite/p-77a53b72.entry.js +0 -1
  779. package/dist/calcite/p-77f3da33.entry.js +0 -1
  780. package/dist/calcite/p-7a241325.system.entry.js +0 -1
  781. package/dist/calcite/p-7b856f76.system.entry.js +0 -1
  782. package/dist/calcite/p-7d1978f4.entry.js +0 -1
  783. package/dist/calcite/p-7d61c919.entry.js +0 -1
  784. package/dist/calcite/p-7e4036a3.system.entry.js +0 -1
  785. package/dist/calcite/p-7e4be59e.system.entry.js +0 -1
  786. package/dist/calcite/p-7ec8ab00.entry.js +0 -1
  787. package/dist/calcite/p-82be2fac.entry.js +0 -1
  788. package/dist/calcite/p-8943850c.entry.js +0 -1
  789. package/dist/calcite/p-8958d1f6.system.js +0 -1
  790. package/dist/calcite/p-8a16620b.system.js +0 -1
  791. package/dist/calcite/p-8bce0bbf.entry.js +0 -1
  792. package/dist/calcite/p-8d57e974.entry.js +0 -1
  793. package/dist/calcite/p-8d5f5ebf.js +0 -1
  794. package/dist/calcite/p-8ef1afae.system.entry.js +0 -1
  795. package/dist/calcite/p-8fb7b17f.system.entry.js +0 -1
  796. package/dist/calcite/p-93dffbbd.entry.js +0 -1
  797. package/dist/calcite/p-950bdd5b.system.entry.js +0 -1
  798. package/dist/calcite/p-95550217.entry.js +0 -1
  799. package/dist/calcite/p-987310d2.system.js +0 -1
  800. package/dist/calcite/p-99ce9de6.entry.js +0 -1
  801. package/dist/calcite/p-9c371694.system.entry.js +0 -1
  802. package/dist/calcite/p-a096738b.system.entry.js +0 -1
  803. package/dist/calcite/p-a4d3e67f.entry.js +0 -1
  804. package/dist/calcite/p-a4e6e35b.js +0 -1
  805. package/dist/calcite/p-a8650c17.system.js +0 -1
  806. package/dist/calcite/p-ac44517b.system.entry.js +0 -1
  807. package/dist/calcite/p-ad290529.system.entry.js +0 -1
  808. package/dist/calcite/p-aec1c004.entry.js +0 -1
  809. package/dist/calcite/p-b10d0018.system.entry.js +0 -1
  810. package/dist/calcite/p-b2425e21.js +0 -1
  811. package/dist/calcite/p-b286e0a5.system.entry.js +0 -1
  812. package/dist/calcite/p-b2a79aa2.system.entry.js +0 -1
  813. package/dist/calcite/p-b4cc79dc.system.js +0 -1
  814. package/dist/calcite/p-ba77eb78.entry.js +0 -1
  815. package/dist/calcite/p-bbffc12a.entry.js +0 -1
  816. package/dist/calcite/p-be531ce4.system.entry.js +0 -1
  817. package/dist/calcite/p-c0ee1569.system.entry.js +0 -1
  818. package/dist/calcite/p-c15a632e.system.entry.js +0 -1
  819. package/dist/calcite/p-c23bfaf9.system.entry.js +0 -1
  820. package/dist/calcite/p-c3a502d6.entry.js +0 -1
  821. package/dist/calcite/p-c4953aa6.system.entry.js +0 -1
  822. package/dist/calcite/p-c5216cf9.entry.js +0 -1
  823. package/dist/calcite/p-c59d3bb3.system.entry.js +0 -1
  824. package/dist/calcite/p-c79fd1e1.entry.js +0 -1
  825. package/dist/calcite/p-c7d85b95.system.entry.js +0 -1
  826. package/dist/calcite/p-cb603214.entry.js +0 -1
  827. package/dist/calcite/p-cc7664db.entry.js +0 -1
  828. package/dist/calcite/p-d53c2d2e.system.js +0 -1
  829. package/dist/calcite/p-d63d1c19.entry.js +0 -1
  830. package/dist/calcite/p-d74caa31.system.entry.js +0 -1
  831. package/dist/calcite/p-d7e0ef91.system.entry.js +0 -1
  832. package/dist/calcite/p-d858b7ab.js +0 -1
  833. package/dist/calcite/p-d8a015cb.system.entry.js +0 -1
  834. package/dist/calcite/p-dc043b78.entry.js +0 -1
  835. package/dist/calcite/p-dcfa0bba.js +0 -1
  836. package/dist/calcite/p-dd3f7c73.system.entry.js +0 -1
  837. package/dist/calcite/p-dda58d1e.system.js +0 -1
  838. package/dist/calcite/p-ddf50685.system.entry.js +0 -1
  839. package/dist/calcite/p-de9b7982.system.entry.js +0 -1
  840. package/dist/calcite/p-df949bcc.entry.js +0 -1
  841. package/dist/calcite/p-e1392ddf.entry.js +0 -1
  842. package/dist/calcite/p-e3781613.entry.js +0 -1
  843. package/dist/calcite/p-e87acd87.system.js +0 -1
  844. package/dist/calcite/p-ed68dd02.entry.js +0 -1
  845. package/dist/calcite/p-eea35b03.entry.js +0 -1
  846. package/dist/calcite/p-ef38dee8.js +0 -1
  847. package/dist/calcite/p-f02d04ab.system.js +0 -1
  848. package/dist/calcite/p-f1eca44a.entry.js +0 -1
  849. package/dist/calcite/p-f1eddb0f.system.entry.js +0 -1
  850. package/dist/calcite/p-faac0f15.entry.js +0 -1
  851. package/dist/calcite/p-fbf4ad06.entry.js +0 -1
  852. package/dist/cjs/array-4fc5abfa.js +0 -7
  853. package/dist/cjs/math-750406eb.js +0 -5
  854. package/dist/esm/array-af19adb2.js +0 -5
  855. package/dist/esm/math-c8e7aa13.js +0 -3
  856. package/dist/esm-es5/CalciteHeading-29855e9f.js +0 -1
  857. package/dist/esm-es5/array-af19adb2.js +0 -1
  858. package/dist/esm-es5/dom-b369a031.js +0 -1
  859. package/dist/esm-es5/guid-09142681.js +0 -1
  860. package/dist/esm-es5/index-f8f0bea7.js +0 -1
  861. package/dist/esm-es5/math-c8e7aa13.js +0 -1
  862. package/dist/esm-es5/number-358ca1d4.js +0 -1
  863. package/dist/esm-es5/observers-c93d4fe5.js +0 -1
  864. package/dist/esm-es5/popper-2757192a.js +0 -1
  865. package/dist/esm-es5/resources-28d71943.js +0 -1
  866. package/dist/esm-es5/resources-82817f70.js +0 -1
  867. package/dist/esm-es5/resources-c651d73a.js +0 -1
  868. package/dist/esm-es5/resources-c72ebfea.js +0 -1
@@ -1 +1,5 @@
1
- import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-f8f0bea7.js";import{g as getElementDir,C as CSS_UTILITY}from"./dom-b369a031.js";import{g as getKey}from"./key-ec82f942.js";import"./guid-09142681.js";var CSS={container:"container",header:"header",footer:"footer",title:"title",subtitle:"subtitle",thumbnailWrapper:"thumbnail-wrapper",checkboxWrapper:"checkbox-wrapper"};var SLOTS={thumbnail:"thumbnail",title:"title",subtitle:"subtitle",footerLeading:"footer-leading",footerTrailing:"footer-trailing"};var TEXT={select:"Select",deselect:"Deselect",loading:"Loading"};var calciteCardCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{max-width:100%;display:block}:host .calcite-card-container{display:-ms-flexbox;display:flex;height:100%;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;background-color:var(--calcite-ui-foreground-1);-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);position:relative;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-2);color:var(--calcite-ui-text-3);-webkit-box-shadow:none;box-shadow:none}:host .calcite-card-container:hover{-webkit-box-shadow:0 4px 16px 0 rgba(0, 0, 0, 0.08), 0 2px 8px 0 rgba(0, 0, 0, 0.04);box-shadow:0 4px 16px 0 rgba(0, 0, 0, 0.08), 0 2px 8px 0 rgba(0, 0, 0, 0.04);z-index:1}:host .calcite-card-container:active{-webkit-box-shadow:0 1px 6px -1px rgba(0, 0, 0, 0.16), 0 1px 2px -1px rgba(0, 0, 0, 0.08);box-shadow:0 1px 6px -1px rgba(0, 0, 0, 0.16), 0 1px 2px -1px rgba(0, 0, 0, 0.08);-webkit-transition-duration:75ms;transition-duration:75ms;z-index:1}.container{-ms-flex:1 1 auto;flex:1 1 auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host([loading]) .calcite-card-container *:not(calcite-loader):not(.calcite-card-loader-container){opacity:0;pointer-events:none}:host([loading]) .calcite-card-loader-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;top:0;right:0;bottom:0;left:0}.header,.footer{padding-top:0.75rem;padding-bottom:0.25rem;padding-left:0.75rem;padding-right:0.75rem;display:-ms-flexbox;display:flex}.header{-ms-flex-direction:column;flex-direction:column}.footer{padding-top:0.25rem;padding-bottom:0.75rem;padding-left:0.75rem;padding-right:0.75rem;-ms-flex-direction:row;flex-direction:row;-ms-flex-line-pack:justify;align-content:space-between;-ms-flex-pack:justify;justify-content:space-between;margin-top:auto}.card-content{padding:0.75rem;color:var(--calcite-ui-text-3);font-size:var(--calcite-font-size--2);line-height:1.375}:host([selectable]) .calcite-card-container:active{-webkit-box-shadow:0 1px 6px -1px rgba(0, 0, 0, 0.16), 0 1px 2px -1px rgba(0, 0, 0, 0.08);box-shadow:0 1px 6px -1px rgba(0, 0, 0, 0.16), 0 1px 2px -1px rgba(0, 0, 0, 0.08)}:host([selected]) .calcite-card-container{border-color:var(--calcite-ui-brand)}slot[name=title]::slotted(*),*::slotted([slot=title]){font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1);margin:0;font-size:var(--calcite-font-size--1);line-height:1.375}slot[name=subtitle]::slotted(*),*::slotted([slot=subtitle]){font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-2);margin:0;margin-top:0.5rem;font-size:var(--calcite-font-size--2);line-height:1.375}slot[name=thumbnail]::slotted(img),img::slotted([slot=thumbnail]){max-width:100%;min-width:100%}slot[name=footer-leading]::slotted(*),*::slotted([slot=footer-leading]){-ms-flex-item-align:center;align-self:center;font-size:var(--calcite-font-size--2);line-height:1.375;-webkit-margin-end:auto;margin-inline-end:auto}slot[name=footer-trailing]::slotted(*),*::slotted([slot=footer-trailing]){-ms-flex-item-align:center;align-self:center;font-size:var(--calcite-font-size--2);line-height:1.375}.thumbnail-wrapper{font-size:var(--calcite-font-size-0);line-height:1.375}.checkbox-wrapper{position:absolute;margin:0;padding:0;top:0.5rem;right:0.5rem}.calcite--rtl .checkbox-wrapper{right:auto;left:0.5rem}";var CalciteCard=function(){function e(e){var t=this;registerInstance(this,e);this.calciteCardSelect=createEvent(this,"calciteCardSelect",7);this.loading=false;this.selected=false;this.selectable=false;this.intlLoading=TEXT.loading;this.intlSelect=TEXT.select;this.intlDeselect=TEXT.deselect;this.cardSelectClick=function(){t.selectCard()};this.cardSelectKeyDown=function(e){switch(getKey(e.key)){case" ":case"Enter":t.selectCard();e.preventDefault();break}}}e.prototype.render=function(){var e,t;var a=getElementDir(this.el);return h("div",{class:(e={"calcite-card-container":true},e[CSS_UTILITY.rtl]=a==="rtl",e)},this.loading?h("div",{class:"calcite-card-loader-container"},h("calcite-loader",{active:true,label:this.intlLoading})):null,h("section",{"aria-busy":this.loading.toString(),class:(t={},t[CSS.container]=true,t)},this.selectable?this.renderCheckbox():null,this.renderThumbnail(),this.renderHeader(),h("div",{class:"card-content"},h("slot",null)),this.renderFooter()))};e.prototype.selectCard=function(){this.selected=!this.selected;this.calciteCardSelect.emit()};e.prototype.renderThumbnail=function(){var e=this.el.querySelector("[slot="+SLOTS.thumbnail+"]");return e?h("div",{class:CSS.thumbnailWrapper},h("slot",{name:SLOTS.thumbnail})):null};e.prototype.renderCheckbox=function(){var e=this.selected?this.intlDeselect:this.intlSelect;return h("label",{"aria-label":e,class:CSS.checkboxWrapper,onClick:this.cardSelectClick,onKeyDown:this.cardSelectKeyDown,title:e},h("calcite-checkbox",{checked:this.selected}))};e.prototype.renderHeader=function(){var e=this.el.querySelector("[slot="+SLOTS.title+"]");var t=this.el.querySelector("[slot="+SLOTS.subtitle+"]");var a=e||t;return a?h("header",{class:CSS.header},h("slot",{name:SLOTS.title}),h("slot",{name:SLOTS.subtitle})):null};e.prototype.renderFooter=function(){var e=this.el.querySelector("[slot="+SLOTS.footerLeading+"]");var t=this.el.querySelector("[slot="+SLOTS.footerTrailing+"]");var a=e||t;return a?h("footer",{class:CSS.footer},h("slot",{name:SLOTS.footerLeading}),h("slot",{name:SLOTS.footerTrailing})):null};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();CalciteCard.style=calciteCardCss;export{CalciteCard as calcite_card};
1
+ /*!
2
+ * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
+ */
5
+ import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-d653c37f.js";import{g as getElementDir,C as CSS_UTILITY}from"./dom-70b0e988.js";import{g as getKey}from"./key-69001a68.js";import"./guid-196bd5ea.js";var CSS={container:"container",header:"header",footer:"footer",title:"title",subtitle:"subtitle",thumbnailWrapper:"thumbnail-wrapper",checkboxWrapper:"checkbox-wrapper"};var SLOTS={thumbnail:"thumbnail",title:"title",subtitle:"subtitle",footerLeading:"footer-leading",footerTrailing:"footer-trailing"};var TEXT={select:"Select",deselect:"Deselect",loading:"Loading"};var calciteCardCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{max-width:100%;display:block}:host .calcite-card-container{display:-ms-flexbox;display:flex;height:100%;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;background-color:var(--calcite-ui-foreground-1);-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);position:relative;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-2);color:var(--calcite-ui-text-3);-webkit-box-shadow:none;box-shadow:none}:host .calcite-card-container:hover{-webkit-box-shadow:0 4px 16px 0 rgba(0, 0, 0, 0.08), 0 2px 8px 0 rgba(0, 0, 0, 0.04);box-shadow:0 4px 16px 0 rgba(0, 0, 0, 0.08), 0 2px 8px 0 rgba(0, 0, 0, 0.04);z-index:1}:host .calcite-card-container:active{-webkit-box-shadow:0 1px 6px -1px rgba(0, 0, 0, 0.16), 0 1px 2px -1px rgba(0, 0, 0, 0.08);box-shadow:0 1px 6px -1px rgba(0, 0, 0, 0.16), 0 1px 2px -1px rgba(0, 0, 0, 0.08);-webkit-transition-duration:75ms;transition-duration:75ms;z-index:1}.container{-ms-flex:1 1 auto;flex:1 1 auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host([loading]) .calcite-card-container *:not(calcite-loader):not(.calcite-card-loader-container){opacity:0;pointer-events:none}:host([loading]) .calcite-card-loader-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;top:0;right:0;bottom:0;left:0}.header,.footer{padding-top:0.75rem;padding-bottom:0.25rem;padding-left:0.75rem;padding-right:0.75rem;display:-ms-flexbox;display:flex}.header{-ms-flex-direction:column;flex-direction:column}.footer{padding-top:0.25rem;padding-bottom:0.75rem;padding-left:0.75rem;padding-right:0.75rem;-ms-flex-direction:row;flex-direction:row;-ms-flex-line-pack:justify;align-content:space-between;-ms-flex-pack:justify;justify-content:space-between;margin-top:auto}.card-content{padding:0.75rem;color:var(--calcite-ui-text-3);font-size:var(--calcite-font-size--2);line-height:1.375}:host([selectable]) .calcite-card-container:active{-webkit-box-shadow:0 1px 6px -1px rgba(0, 0, 0, 0.16), 0 1px 2px -1px rgba(0, 0, 0, 0.08);box-shadow:0 1px 6px -1px rgba(0, 0, 0, 0.16), 0 1px 2px -1px rgba(0, 0, 0, 0.08)}:host([selected]) .calcite-card-container{border-color:var(--calcite-ui-brand)}slot[name=title]::slotted(*),*::slotted([slot=title]){font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1);margin:0;font-size:var(--calcite-font-size--1);line-height:1.375}slot[name=subtitle]::slotted(*),*::slotted([slot=subtitle]){font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-2);margin:0;margin-top:0.5rem;font-size:var(--calcite-font-size--2);line-height:1.375}slot[name=thumbnail]::slotted(img),img::slotted([slot=thumbnail]){max-width:100%;min-width:100%}slot[name=footer-leading]::slotted(*),*::slotted([slot=footer-leading]){-ms-flex-item-align:center;align-self:center;font-size:var(--calcite-font-size--2);line-height:1.375;-webkit-margin-end:auto;margin-inline-end:auto}slot[name=footer-trailing]::slotted(*),*::slotted([slot=footer-trailing]){-ms-flex-item-align:center;align-self:center;font-size:var(--calcite-font-size--2);line-height:1.375}.thumbnail-wrapper{font-size:var(--calcite-font-size-0);line-height:1.375}.checkbox-wrapper{position:absolute;margin:0;padding:0;top:0.5rem;right:0.5rem}.calcite--rtl .checkbox-wrapper{right:auto;left:0.5rem}";var CalciteCard=function(){function e(e){var t=this;registerInstance(this,e);this.calciteCardSelect=createEvent(this,"calciteCardSelect",7);this.loading=false;this.selected=false;this.selectable=false;this.intlLoading=TEXT.loading;this.intlSelect=TEXT.select;this.intlDeselect=TEXT.deselect;this.cardSelectClick=function(){t.selectCard()};this.cardSelectKeyDown=function(e){switch(getKey(e.key)){case" ":case"Enter":t.selectCard();e.preventDefault();break}}}e.prototype.render=function(){var e,t;var a=getElementDir(this.el);return h("div",{class:(e={"calcite-card-container":true},e[CSS_UTILITY.rtl]=a==="rtl",e)},this.loading?h("div",{class:"calcite-card-loader-container"},h("calcite-loader",{active:true,label:this.intlLoading})):null,h("section",{"aria-busy":this.loading.toString(),class:(t={},t[CSS.container]=true,t)},this.selectable?this.renderCheckbox():null,this.renderThumbnail(),this.renderHeader(),h("div",{class:"card-content"},h("slot",null)),this.renderFooter()))};e.prototype.selectCard=function(){this.selected=!this.selected;this.calciteCardSelect.emit()};e.prototype.renderThumbnail=function(){var e=this.el.querySelector("[slot="+SLOTS.thumbnail+"]");return e?h("div",{class:CSS.thumbnailWrapper},h("slot",{name:SLOTS.thumbnail})):null};e.prototype.renderCheckbox=function(){var e=this.selected?this.intlDeselect:this.intlSelect;return h("label",{"aria-label":e,class:CSS.checkboxWrapper,onClick:this.cardSelectClick,onKeyDown:this.cardSelectKeyDown,title:e},h("calcite-checkbox",{checked:this.selected}))};e.prototype.renderHeader=function(){var e=this.el.querySelector("[slot="+SLOTS.title+"]");var t=this.el.querySelector("[slot="+SLOTS.subtitle+"]");var a=e||t;return a?h("header",{class:CSS.header},h("slot",{name:SLOTS.title}),h("slot",{name:SLOTS.subtitle})):null};e.prototype.renderFooter=function(){var e=this.el.querySelector("[slot="+SLOTS.footerLeading+"]");var t=this.el.querySelector("[slot="+SLOTS.footerTrailing+"]");var a=e||t;return a?h("footer",{class:CSS.footer},h("slot",{name:SLOTS.footerLeading}),h("slot",{name:SLOTS.footerTrailing})):null};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();CalciteCard.style=calciteCardCss;export{CalciteCard as calcite_card};
@@ -1 +1,5 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,i,n){function a(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n["throw"](e))}catch(e){o(e)}}function c(e){e.done?i(e.value):a(e.value).then(r,s)}c((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,a,o,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(e){return function(t){return c([e,t])}}function c(r){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,a&&(o=r[0]&2?a["return"]:r[0]?a["throw"]||((o=a["return"])&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;if(a=0,o)r=[r[0]&2,o.value];switch(r[0]){case 0:case 1:o=r;break;case 4:i.label++;return{value:r[1],done:false};case 5:i.label++;a=r[1];r=[0];continue;case 7:r=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!o||r[1]>o[0]&&r[1]<o[3])){i.label=r[1];break}if(r[0]===6&&i.label<o[1]){i.label=o[1];o=r;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(r);break}if(o[2])i.ops.pop();i.trys.pop();continue}r=t.call(e,i)}catch(e){r=[6,e];a=0}finally{n=o=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-f8f0bea7.js";import{g as guid}from"./guid-09142681.js";import{f as focusElement,c as closestElementCrossShadowBoundary}from"./dom-b369a031.js";import{h as hiddenInputStyle}from"./form-8aa0d95b.js";import{c as connectLabel,g as getLabelText,d as disconnectLabel}from"./label-7b249c54.js";var calciteCheckboxCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host([scale=s]){--calcite-checkbox-size:0.75rem}:host([scale=m]){--calcite-checkbox-size:var(--calcite-font-size--1)}:host([scale=l]){--calcite-checkbox-size:1rem}:host{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}:host .check-svg{overflow:hidden;display:block;background-color:var(--calcite-ui-foreground-1);pointer-events:none;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);width:var(--calcite-checkbox-size);height:var(--calcite-checkbox-size);-webkit-box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input);box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input);fill:var(--calcite-ui-background)}:host ::slotted(input){width:var(--calcite-checkbox-size);height:var(--calcite-checkbox-size)}:host(:hover) .check-svg,:host([hovered]) .check-svg{-webkit-box-shadow:inset 0 0 0 2px var(--calcite-ui-brand);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}:host([checked]) .check-svg,:host([indeterminate]) .check-svg{background-color:var(--calcite-ui-brand);-webkit-box-shadow:inset 0 0 0 1px var(--calcite-ui-brand);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand)}:host .focused .check-svg{-webkit-box-shadow:inset 0 0 0 1px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1), 0 0 0 4px var(--calcite-ui-brand);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1), 0 0 0 4px var(--calcite-ui-brand);-webkit-transition:150ms ease-in-out;transition:150ms ease-in-out}:host([disabled]){cursor:default;opacity:var(--calcite-ui-opacity-disabled);pointer-events:none}";var CalciteCheckbox=function(){function e(e){var t=this;registerInstance(this,e);this.calciteInternalCheckboxBlur=createEvent(this,"calciteInternalCheckboxBlur",7);this.calciteCheckboxChange=createEvent(this,"calciteCheckboxChange",7);this.calciteInternalCheckboxFocus=createEvent(this,"calciteInternalCheckboxFocus",7);this.checked=false;this.disabled=false;this.hovered=false;this.indeterminate=false;this.name="";this.scale="m";this.checkedPath="M5.5 12L2 8.689l.637-.636L5.5 10.727l8.022-7.87.637.637z";this.indeterminatePath="M13 8v1H3V8z";this.focused=false;this.getPath=function(){return t.indeterminate?t.indeterminatePath:t.checked?t.checkedPath:""};this.toggle=function(){if(!t.disabled){t.checked=!t.checked;focusElement(t.input);t.indeterminate=false;t.calciteCheckboxChange.emit()}};this.clickHandler=function(){t.toggle()};this.formResetHandler=function(){t.checked=t.initialChecked};this.onLabelClick=function(){t.toggle()}}e.prototype.checkedWatcher=function(e){this.input.checked=e};e.prototype.disabledChanged=function(e){this.input.disabled=e};e.prototype.nameChanged=function(e){this.input.name=e};e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){focusElement(this.input);return[2]}))}))};e.prototype.mouseenter=function(){this.hovered=true};e.prototype.mouseleave=function(){this.hovered=false};e.prototype.onInputBlur=function(){this.focused=false;this.calciteInternalCheckboxBlur.emit(false)};e.prototype.onInputFocus=function(){this.focused=true;this.calciteInternalCheckboxFocus.emit(true)};e.prototype.connectedCallback=function(){this.guid=this.el.id||"calcite-checkbox-"+guid();this.initialChecked=this.checked;this.renderHiddenCheckboxInput();var e=closestElementCrossShadowBoundary(this.el,"form");if(e){e.addEventListener("reset",this.formResetHandler)}connectLabel(this)};e.prototype.componentDidLoad=function(){this.input.setAttribute("aria-label",getLabelText(this))};e.prototype.disconnectedCallback=function(){this.input.parentNode.removeChild(this.input);var e=closestElementCrossShadowBoundary(this.el,"form");if(e){e.removeEventListener("reset",this.formResetHandler)}disconnectLabel(this)};e.prototype.renderHiddenCheckboxInput=function(){this.input=document.createElement("input");this.checked&&this.input.setAttribute("checked","");this.input.disabled=this.disabled;this.input.id=this.guid+"-input";this.input.name=this.name;this.input.onblur=this.onInputBlur.bind(this);this.input.onfocus=this.onInputFocus.bind(this);this.input.style.cssText=hiddenInputStyle;this.input.type="checkbox";this.input.setAttribute("aria-label",getLabelText(this));if(this.value){this.input.value=this.value!=null?this.value.toString():""}this.el.appendChild(this.input)};e.prototype.render=function(){return h(Host,{onClick:this.clickHandler},h("div",{class:{focused:this.focused,test:true}},h("svg",{class:"check-svg",viewBox:"0 0 16 16"},h("path",{d:this.getPath()})),h("slot",null)))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{checked:["checkedWatcher"],disabled:["disabledChanged"],name:["nameChanged"]}},enumerable:false,configurable:true});return e}();CalciteCheckbox.style=calciteCheckboxCss;export{CalciteCheckbox as calcite_checkbox};
1
+ var __awaiter=this&&this.__awaiter||function(e,t,i,n){function a(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n["throw"](e))}catch(e){o(e)}}function c(e){e.done?i(e.value):a(e.value).then(r,s)}c((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,a,o,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(e){return function(t){return c([e,t])}}function c(r){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,a&&(o=r[0]&2?a["return"]:r[0]?a["throw"]||((o=a["return"])&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;if(a=0,o)r=[r[0]&2,o.value];switch(r[0]){case 0:case 1:o=r;break;case 4:i.label++;return{value:r[1],done:false};case 5:i.label++;a=r[1];r=[0];continue;case 7:r=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!o||r[1]>o[0]&&r[1]<o[3])){i.label=r[1];break}if(r[0]===6&&i.label<o[1]){i.label=o[1];o=r;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(r);break}if(o[2])i.ops.pop();i.trys.pop();continue}r=t.call(e,i)}catch(e){r=[6,e];a=0}finally{n=o=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};
2
+ /*!
3
+ * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
4
+ * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
5
+ */import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-d653c37f.js";import{g as guid}from"./guid-196bd5ea.js";import{f as focusElement,c as closestElementCrossShadowBoundary}from"./dom-70b0e988.js";import{h as hiddenInputStyle}from"./form-cee9f632.js";import{c as connectLabel,g as getLabelText,d as disconnectLabel}from"./label-426b4471.js";var calciteCheckboxCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host([scale=s]){--calcite-checkbox-size:0.75rem}:host([scale=m]){--calcite-checkbox-size:var(--calcite-font-size--1)}:host([scale=l]){--calcite-checkbox-size:1rem}:host{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}:host .check-svg{overflow:hidden;display:block;background-color:var(--calcite-ui-foreground-1);pointer-events:none;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);width:var(--calcite-checkbox-size);height:var(--calcite-checkbox-size);-webkit-box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input);box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input);fill:var(--calcite-ui-background)}:host ::slotted(input){width:var(--calcite-checkbox-size);height:var(--calcite-checkbox-size)}:host(:hover) .check-svg,:host([hovered]) .check-svg{-webkit-box-shadow:inset 0 0 0 2px var(--calcite-ui-brand);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}:host([checked]) .check-svg,:host([indeterminate]) .check-svg{background-color:var(--calcite-ui-brand);-webkit-box-shadow:inset 0 0 0 1px var(--calcite-ui-brand);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand)}:host .focused .check-svg{-webkit-box-shadow:inset 0 0 0 1px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1), 0 0 0 4px var(--calcite-ui-brand);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1), 0 0 0 4px var(--calcite-ui-brand);-webkit-transition:150ms ease-in-out;transition:150ms ease-in-out}:host([disabled]){cursor:default;opacity:var(--calcite-ui-opacity-disabled);pointer-events:none}";var CalciteCheckbox=function(){function e(e){var t=this;registerInstance(this,e);this.calciteInternalCheckboxBlur=createEvent(this,"calciteInternalCheckboxBlur",7);this.calciteCheckboxChange=createEvent(this,"calciteCheckboxChange",7);this.calciteInternalCheckboxFocus=createEvent(this,"calciteInternalCheckboxFocus",7);this.checked=false;this.disabled=false;this.hovered=false;this.indeterminate=false;this.name="";this.scale="m";this.checkedPath="M5.5 12L2 8.689l.637-.636L5.5 10.727l8.022-7.87.637.637z";this.indeterminatePath="M13 8v1H3V8z";this.focused=false;this.getPath=function(){return t.indeterminate?t.indeterminatePath:t.checked?t.checkedPath:""};this.toggle=function(){if(!t.disabled){t.checked=!t.checked;focusElement(t.input);t.indeterminate=false;t.calciteCheckboxChange.emit()}};this.clickHandler=function(){t.toggle()};this.formResetHandler=function(){t.checked=t.initialChecked};this.onLabelClick=function(){t.toggle()}}e.prototype.checkedWatcher=function(e){this.input.checked=e};e.prototype.disabledChanged=function(e){this.input.disabled=e};e.prototype.nameChanged=function(e){this.input.name=e};e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){focusElement(this.input);return[2]}))}))};e.prototype.mouseenter=function(){this.hovered=true};e.prototype.mouseleave=function(){this.hovered=false};e.prototype.onInputBlur=function(){this.focused=false;this.calciteInternalCheckboxBlur.emit(false)};e.prototype.onInputFocus=function(){this.focused=true;this.calciteInternalCheckboxFocus.emit(true)};e.prototype.connectedCallback=function(){this.guid=this.el.id||"calcite-checkbox-"+guid();this.initialChecked=this.checked;this.renderHiddenCheckboxInput();var e=closestElementCrossShadowBoundary(this.el,"form");if(e){e.addEventListener("reset",this.formResetHandler)}connectLabel(this)};e.prototype.componentDidLoad=function(){this.input.setAttribute("aria-label",getLabelText(this))};e.prototype.disconnectedCallback=function(){this.input.parentNode.removeChild(this.input);var e=closestElementCrossShadowBoundary(this.el,"form");if(e){e.removeEventListener("reset",this.formResetHandler)}disconnectLabel(this)};e.prototype.renderHiddenCheckboxInput=function(){this.input=document.createElement("input");this.checked&&this.input.setAttribute("checked","");this.input.disabled=this.disabled;this.input.id=this.guid+"-input";this.input.name=this.name;this.input.onblur=this.onInputBlur.bind(this);this.input.onfocus=this.onInputFocus.bind(this);this.input.style.cssText=hiddenInputStyle;this.input.type="checkbox";this.input.setAttribute("aria-label",getLabelText(this));if(this.value){this.input.value=this.value!=null?this.value.toString():""}this.el.appendChild(this.input)};e.prototype.render=function(){return h(Host,{onClick:this.clickHandler},h("div",{class:{focused:this.focused,test:true}},h("svg",{class:"check-svg",viewBox:"0 0 16 16"},h("path",{d:this.getPath()})),h("slot",null)))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{checked:["checkedWatcher"],disabled:["disabledChanged"],name:["nameChanged"]}},enumerable:false,configurable:true});return e}();CalciteCheckbox.style=calciteCheckboxCss;export{CalciteCheckbox as calcite_checkbox};
@@ -1 +1,5 @@
1
- var __awaiter=this&&this.__awaiter||function(i,e,t,a){function r(i){return i instanceof t?i:new t((function(e){e(i)}))}return new(t||(t=Promise))((function(t,n){function o(i){try{l(a.next(i))}catch(i){n(i)}}function c(i){try{l(a["throw"](i))}catch(i){n(i)}}function l(i){i.done?t(i.value):r(i.value).then(o,c)}l((a=a.apply(i,e||[])).next())}))};var __generator=this&&this.__generator||function(i,e){var t={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},a,r,n,o;return o={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(i){return function(e){return l([i,e])}}function l(o){if(a)throw new TypeError("Generator is already executing.");while(t)try{if(a=1,r&&(n=o[0]&2?r["return"]:o[0]?r["throw"]||((n=r["return"])&&n.call(r),0):r.next)&&!(n=n.call(r,o[1])).done)return n;if(r=0,n)o=[o[0]&2,n.value];switch(o[0]){case 0:case 1:n=o;break;case 4:t.label++;return{value:o[1],done:false};case 5:t.label++;r=o[1];o=[0];continue;case 7:o=t.ops.pop();t.trys.pop();continue;default:if(!(n=t.trys,n=n.length>0&&n[n.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!n||o[1]>n[0]&&o[1]<n[3])){t.label=o[1];break}if(o[0]===6&&t.label<n[1]){t.label=n[1];n=o;break}if(n&&t.label<n[2]){t.label=n[2];t.ops.push(o);break}if(n[2])t.ops.pop();t.trys.pop();continue}o=e.call(i,t)}catch(i){o=[6,i];r=0}finally{a=n=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-f8f0bea7.js";import{a as getSlotted,g as getElementDir,C as CSS_UTILITY}from"./dom-b369a031.js";import{g as guid}from"./guid-09142681.js";var CSS={title:"title",close:"close",chipImageContainer:"chip-image-container",calciteChipIcon:"calcite-chip--icon"};var TEXT={close:"Close"};var SLOTS={image:"image"};var ICONS={close:"x"};var calciteChipCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host([scale=s]){height:1.5rem;font-size:var(--calcite-font-size--2);--calcite-chip-spacing-unit-l:0.5rem;--calcite-chip-spacing-unit-s:0.25rem}:host([scale=s]) .chip-image-container{height:1.25rem;width:1.25rem}:host([scale=m]){height:2rem;font-size:var(--calcite-font-size--1);--calcite-chip-spacing-unit-l:0.75rem;--calcite-chip-spacing-unit-s:6px}:host([scale=m]) .chip-image-container{height:1.5rem;width:1.5rem;padding-left:0.25rem}:host([scale=l]){height:2.75rem;font-size:var(--calcite-font-size-0);--calcite-chip-spacing-unit-l:1rem;--calcite-chip-spacing-unit-s:0.5rem}:host([scale=l]) .chip-image-container{height:2rem;width:2rem;padding-left:0.25rem}:host([scale=m]) .calcite--rtl .chip-image-container{padding-left:0;padding-right:0.25rem}:host([scale=l]) .calcite--rtl .chip-image-container{padding-left:0;padding-right:0.25rem}:host{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-1);color:var(--calcite-ui-text-1);font-weight:var(--calcite-font-weight-medium);cursor:default;border-radius:9999px;-webkit-box-sizing:border-box;box-sizing:border-box;--calcite-chip-button-border-radius:0 50px 50px 0}.container{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;height:100%;max-width:100%}.title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.calcite--rtl{text-align:right;--calcite-chip-button-border-radius:50px 0 0 50px}:host span{padding:0 var(--calcite-chip-spacing-unit-l)}:host([dismissible]) span{padding:0 var(--calcite-chip-spacing-unit-s) 0 var(--calcite-chip-spacing-unit-l)}:host([dismissible]) .calcite--rtl span{padding:0 var(--calcite-chip-spacing-unit-l) 0 var(--calcite-chip-spacing-unit-s)}:host([icon]:not([dismissible])) span{padding:0 var(--calcite-chip-spacing-unit-l)}:host([icon]:not([dismissible])) .calcite--rtl span{padding:0 var(--calcite-chip-spacing-unit-l)}:host button{margin:0;background-color:transparent;outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;display:-ms-inline-flexbox;display:inline-flex;min-height:100%;max-height:100%;-ms-flex-item-align:stretch;align-self:stretch;-ms-flex-align:center;align-items:center;border-style:none;cursor:pointer;-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-delay:0s;transition-delay:0s;color:var(--calcite-ui-text-1);-webkit-appearance:none;border-radius:var(--calcite-chip-button-border-radius);padding:0 var(--calcite-chip-spacing-unit-s);color:inherit;--calcite-chip-transparent-hover:var(--calcite-button-transparent-hover);--calcite-chip-transparent-press:var(--calcite-button-transparent-press)}:host button:hover{background-color:var(--calcite-chip-transparent-hover)}:host button:focus{background-color:var(--calcite-chip-transparent-hover);outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}:host button:active{background-color:var(--calcite-chip-transparent-press)}.chip-image-container{border-radius:50%;overflow:hidden;display:-ms-inline-flexbox;display:inline-flex}:host slot[name=image]::slotted(*){display:-ms-flexbox;display:flex;height:100%;width:100%;border-radius:50%;overflow:hidden}.calcite-chip--icon{display:-ms-inline-flexbox;display:inline-flex;position:relative;margin-top:0;margin-bottom:0;margin-right:0;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);margin-left:var(--calcite-chip-spacing-unit-l);border-radius:var(--calcite-chip-button-border-radius)}.calcite--rtl .calcite-chip--icon{margin-top:0;margin-bottom:0;margin-left:0;margin-right:var(--calcite-chip-spacing-unit-l)}:host([color=blue][appearance=solid]){border-color:transparent;background-color:var(--calcite-ui-info);color:var(--calcite-ui-text-inverse)}:host([color=red][appearance=solid]){border-color:transparent;background-color:var(--calcite-ui-danger);color:var(--calcite-ui-text-inverse)}:host([color=yellow][appearance=solid]){border-color:transparent;background-color:var(--calcite-ui-warning);color:#151515}:host([color=green][appearance=solid]){border-color:transparent;background-color:var(--calcite-ui-success);color:#151515}:host([color=grey][appearance=solid]){border-color:transparent;background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}:host([color=grey][appearance=solid]) button,:host([color=grey][appearance=solid]) calcite-icon{color:var(--calcite-ui-text-3)}:host([color=blue][appearance=clear]){border-color:var(--calcite-ui-info)}:host([color=blue][appearance=clear]) .calcite-chip--icon{color:var(--calcite-ui-info)}:host([color=red][appearance=clear]){border-color:var(--calcite-ui-danger)}:host([color=red][appearance=clear]) .calcite-chip--icon{color:var(--calcite-ui-danger)}:host([color=yellow][appearance=clear]){border-color:var(--calcite-ui-warning)}:host([color=yellow][appearance=clear]) .calcite-chip--icon{color:var(--calcite-ui-warning)}:host([color=green][appearance=clear]){border-color:var(--calcite-ui-success)}:host([color=green][appearance=clear]) .calcite-chip--icon{color:var(--calcite-ui-success)}:host([color=grey][appearance=clear]){border-color:var(--calcite-ui-border-1)}:host([color=grey][appearance=clear]) .calcite-chip--icon{color:var(--calcite-ui-text-3)}";var CalciteChip=function(){function i(i){var e=this;registerInstance(this,i);this.calciteChipDismiss=createEvent(this,"calciteChipDismiss",7);this.appearance="solid";this.color="grey";this.dismissible=false;this.dismissLabel=TEXT.close;this.iconFlipRtl=false;this.scale="m";this.closeClickHandler=function(i){i.preventDefault();e.calciteChipDismiss.emit(e.el)};this.guid=guid()}i.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){var i;return __generator(this,(function(e){(i=this.closeButton)===null||i===void 0?void 0:i.focus();return[2]}))}))};i.prototype.renderChipImage=function(){var i=this.el;var e=getSlotted(i,SLOTS.image);return e?h("div",{class:CSS.chipImageContainer},h("slot",{name:SLOTS.image})):null};i.prototype.render=function(){var i;var e=this;var t=getElementDir(this.el);var a=h("calcite-icon",{class:CSS.calciteChipIcon,dir:t,flipRtl:this.iconFlipRtl,icon:this.icon,scale:"s"});var r=h("button",{"aria-describedby":this.guid,"aria-label":this.dismissLabel,class:CSS.close,onClick:this.closeClickHandler,ref:function(i){return e.closeButton=i}},h("calcite-icon",{icon:ICONS.close,scale:"s"}));return h("div",{class:(i={container:true},i[CSS_UTILITY.rtl]=t==="rtl",i)},this.renderChipImage(),this.icon?a:null,h("span",{class:CSS.title,id:this.guid},h("slot",null)),this.dismissible?r:null)};Object.defineProperty(i.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return i}();CalciteChip.style=calciteChipCss;export{CalciteChip as calcite_chip};
1
+ var __awaiter=this&&this.__awaiter||function(i,e,t,a){function r(i){return i instanceof t?i:new t((function(e){e(i)}))}return new(t||(t=Promise))((function(t,n){function o(i){try{l(a.next(i))}catch(i){n(i)}}function c(i){try{l(a["throw"](i))}catch(i){n(i)}}function l(i){i.done?t(i.value):r(i.value).then(o,c)}l((a=a.apply(i,e||[])).next())}))};var __generator=this&&this.__generator||function(i,e){var t={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},a,r,n,o;return o={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(i){return function(e){return l([i,e])}}function l(o){if(a)throw new TypeError("Generator is already executing.");while(t)try{if(a=1,r&&(n=o[0]&2?r["return"]:o[0]?r["throw"]||((n=r["return"])&&n.call(r),0):r.next)&&!(n=n.call(r,o[1])).done)return n;if(r=0,n)o=[o[0]&2,n.value];switch(o[0]){case 0:case 1:n=o;break;case 4:t.label++;return{value:o[1],done:false};case 5:t.label++;r=o[1];o=[0];continue;case 7:o=t.ops.pop();t.trys.pop();continue;default:if(!(n=t.trys,n=n.length>0&&n[n.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!n||o[1]>n[0]&&o[1]<n[3])){t.label=o[1];break}if(o[0]===6&&t.label<n[1]){t.label=n[1];n=o;break}if(n&&t.label<n[2]){t.label=n[2];t.ops.push(o);break}if(n[2])t.ops.pop();t.trys.pop();continue}o=e.call(i,t)}catch(i){o=[6,i];r=0}finally{a=n=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};
2
+ /*!
3
+ * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
4
+ * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
5
+ */import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-d653c37f.js";import{a as getSlotted,g as getElementDir,C as CSS_UTILITY}from"./dom-70b0e988.js";import{g as guid}from"./guid-196bd5ea.js";var CSS={title:"title",close:"close",chipImageContainer:"chip-image-container",calciteChipIcon:"calcite-chip--icon"};var TEXT={close:"Close"};var SLOTS={image:"image"};var ICONS={close:"x"};var calciteChipCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host([scale=s]){height:1.5rem;font-size:var(--calcite-font-size--2);--calcite-chip-spacing-unit-l:0.5rem;--calcite-chip-spacing-unit-s:0.25rem}:host([scale=s]) .chip-image-container{height:1.25rem;width:1.25rem}:host([scale=m]){height:2rem;font-size:var(--calcite-font-size--1);--calcite-chip-spacing-unit-l:0.75rem;--calcite-chip-spacing-unit-s:6px}:host([scale=m]) .chip-image-container{height:1.5rem;width:1.5rem;padding-left:0.25rem}:host([scale=l]){height:2.75rem;font-size:var(--calcite-font-size-0);--calcite-chip-spacing-unit-l:1rem;--calcite-chip-spacing-unit-s:0.5rem}:host([scale=l]) .chip-image-container{height:2rem;width:2rem;padding-left:0.25rem}:host([scale=m]) .calcite--rtl .chip-image-container{padding-left:0;padding-right:0.25rem}:host([scale=l]) .calcite--rtl .chip-image-container{padding-left:0;padding-right:0.25rem}:host{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-1);color:var(--calcite-ui-text-1);font-weight:var(--calcite-font-weight-medium);cursor:default;border-radius:9999px;-webkit-box-sizing:border-box;box-sizing:border-box;--calcite-chip-button-border-radius:0 50px 50px 0}.container{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;height:100%;max-width:100%}.title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.calcite--rtl{text-align:right;--calcite-chip-button-border-radius:50px 0 0 50px}:host span{padding:0 var(--calcite-chip-spacing-unit-l)}:host([dismissible]) span{padding:0 var(--calcite-chip-spacing-unit-s) 0 var(--calcite-chip-spacing-unit-l)}:host([dismissible]) .calcite--rtl span{padding:0 var(--calcite-chip-spacing-unit-l) 0 var(--calcite-chip-spacing-unit-s)}:host([icon]:not([dismissible])) span{padding:0 var(--calcite-chip-spacing-unit-l)}:host([icon]:not([dismissible])) .calcite--rtl span{padding:0 var(--calcite-chip-spacing-unit-l)}:host button{margin:0;background-color:transparent;outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;display:-ms-inline-flexbox;display:inline-flex;min-height:100%;max-height:100%;-ms-flex-item-align:stretch;align-self:stretch;-ms-flex-align:center;align-items:center;border-style:none;cursor:pointer;-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-delay:0s;transition-delay:0s;color:var(--calcite-ui-text-1);-webkit-appearance:none;border-radius:var(--calcite-chip-button-border-radius);padding:0 var(--calcite-chip-spacing-unit-s);color:inherit;--calcite-chip-transparent-hover:var(--calcite-button-transparent-hover);--calcite-chip-transparent-press:var(--calcite-button-transparent-press)}:host button:hover{background-color:var(--calcite-chip-transparent-hover)}:host button:focus{background-color:var(--calcite-chip-transparent-hover);outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}:host button:active{background-color:var(--calcite-chip-transparent-press)}.chip-image-container{border-radius:50%;overflow:hidden;display:-ms-inline-flexbox;display:inline-flex}:host slot[name=image]::slotted(*){display:-ms-flexbox;display:flex;height:100%;width:100%;border-radius:50%;overflow:hidden}.calcite-chip--icon{display:-ms-inline-flexbox;display:inline-flex;position:relative;margin-top:0;margin-bottom:0;margin-right:0;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);margin-left:var(--calcite-chip-spacing-unit-l);border-radius:var(--calcite-chip-button-border-radius)}.calcite--rtl .calcite-chip--icon{margin-top:0;margin-bottom:0;margin-left:0;margin-right:var(--calcite-chip-spacing-unit-l)}:host([color=blue][appearance=solid]){border-color:transparent;background-color:var(--calcite-ui-info);color:var(--calcite-ui-text-inverse)}:host([color=red][appearance=solid]){border-color:transparent;background-color:var(--calcite-ui-danger);color:var(--calcite-ui-text-inverse)}:host([color=yellow][appearance=solid]){border-color:transparent;background-color:var(--calcite-ui-warning);color:#151515}:host([color=green][appearance=solid]){border-color:transparent;background-color:var(--calcite-ui-success);color:#151515}:host([color=grey][appearance=solid]){border-color:transparent;background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}:host([color=grey][appearance=solid]) button,:host([color=grey][appearance=solid]) calcite-icon{color:var(--calcite-ui-text-3)}:host([color=blue][appearance=clear]){border-color:var(--calcite-ui-info)}:host([color=blue][appearance=clear]) .calcite-chip--icon{color:var(--calcite-ui-info)}:host([color=red][appearance=clear]){border-color:var(--calcite-ui-danger)}:host([color=red][appearance=clear]) .calcite-chip--icon{color:var(--calcite-ui-danger)}:host([color=yellow][appearance=clear]){border-color:var(--calcite-ui-warning)}:host([color=yellow][appearance=clear]) .calcite-chip--icon{color:var(--calcite-ui-warning)}:host([color=green][appearance=clear]){border-color:var(--calcite-ui-success)}:host([color=green][appearance=clear]) .calcite-chip--icon{color:var(--calcite-ui-success)}:host([color=grey][appearance=clear]){border-color:var(--calcite-ui-border-1)}:host([color=grey][appearance=clear]) .calcite-chip--icon{color:var(--calcite-ui-text-3)}";var CalciteChip=function(){function i(i){var e=this;registerInstance(this,i);this.calciteChipDismiss=createEvent(this,"calciteChipDismiss",7);this.appearance="solid";this.color="grey";this.dismissible=false;this.dismissLabel=TEXT.close;this.iconFlipRtl=false;this.scale="m";this.closeClickHandler=function(i){i.preventDefault();e.calciteChipDismiss.emit(e.el)};this.guid=guid()}i.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){var i;return __generator(this,(function(e){(i=this.closeButton)===null||i===void 0?void 0:i.focus();return[2]}))}))};i.prototype.renderChipImage=function(){var i=this.el;var e=getSlotted(i,SLOTS.image);return e?h("div",{class:CSS.chipImageContainer},h("slot",{name:SLOTS.image})):null};i.prototype.render=function(){var i;var e=this;var t=getElementDir(this.el);var a=h("calcite-icon",{class:CSS.calciteChipIcon,dir:t,flipRtl:this.iconFlipRtl,icon:this.icon,scale:"s"});var r=h("button",{"aria-describedby":this.guid,"aria-label":this.dismissLabel,class:CSS.close,onClick:this.closeClickHandler,ref:function(i){return e.closeButton=i}},h("calcite-icon",{icon:ICONS.close,scale:"s"}));return h("div",{class:(i={container:true},i[CSS_UTILITY.rtl]=t==="rtl",i)},this.renderChipImage(),this.icon?a:null,h("span",{class:CSS.title,id:this.guid},h("slot",null)),this.dismissible?r:null)};Object.defineProperty(i.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return i}();CalciteChip.style=calciteChipCss;export{CalciteChip as calcite_chip};
@@ -1 +1,5 @@
1
- var __awaiter=this&&this.__awaiter||function(e,r,t,a){function n(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,o){function i(e){try{s(a.next(e))}catch(e){o(e)}}function l(e){try{s(a["throw"](e))}catch(e){o(e)}}function s(e){e.done?t(e.value):n(e.value).then(i,l)}s((a=a.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},a,n,o,i;return i={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function l(e){return function(r){return s([e,r])}}function s(i){if(a)throw new TypeError("Generator is already executing.");while(t)try{if(a=1,n&&(o=i[0]&2?n["return"]:i[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;if(n=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:t.label++;return{value:i[1],done:false};case 5:t.label++;n=i[1];i=[0];continue;case 7:i=t.ops.pop();t.trys.pop();continue;default:if(!(o=t.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){t=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){t.label=i[1];break}if(i[0]===6&&t.label<o[1]){t.label=o[1];o=i;break}if(o&&t.label<o[2]){t.label=o[2];t.ops.push(i);break}if(o[2])t.ops.pop();t.trys.pop();continue}i=r.call(e,t)}catch(e){i=[6,e];n=0}finally{a=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,r){for(var t=0,a=r.length,n=e.length;t<a;t++,n++)e[n]=r[t];return e};import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-f8f0bea7.js";import{f as focusElement,g as getElementDir,C as CSS_UTILITY,b as getThemeName}from"./dom-b369a031.js";import{n as normalizeHex,C as CSSColorMode,p as parseMode,c as colorEqual,i as isValidHex,a as isLonghandHex,r as rgbToHex,h as hexToRGB,b as hexChar}from"./utils-60acc1d6.js";import{g as getKey}from"./key-ec82f942.js";import{c as clamp}from"./math-c8e7aa13.js";import{d as debounce,i as isObject}from"./debounce-047e09f4.js";import"./guid-09142681.js";var FUNC_ERROR_TEXT="Expected a function";function throttle(e,r,t){var a=true,n=true;if(typeof e!="function"){throw new TypeError(FUNC_ERROR_TEXT)}if(isObject(t)){a="leading"in t?!!t.leading:a;n="trailing"in t?!!t.trailing:n}return debounce(e,r,{leading:a,maxWait:r,trailing:n})}function createCommonjsModule(e,r,t){return t={path:r,exports:{},require:function(e,r){return commonjsRequire()}},e(t,t.exports),t.exports}function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var colorName$1={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};var isArrayish=function e(r){if(!r||typeof r==="string"){return false}return r instanceof Array||Array.isArray(r)||r.length>=0&&(r.splice instanceof Function||Object.getOwnPropertyDescriptor(r,r.length-1)&&r.constructor.name!=="String")};var simpleSwizzle=createCommonjsModule((function(e){var r=Array.prototype.concat;var t=Array.prototype.slice;var a=e.exports=function e(a){var n=[];for(var o=0,i=a.length;o<i;o++){var l=a[o];if(isArrayish(l)){n=r.call(n,t.call(l))}else{n.push(l)}}return n};a.wrap=function(e){return function(){return e(a(arguments))}}}));var colorString=createCommonjsModule((function(e){var r={};for(var t in colorName$1){if(colorName$1.hasOwnProperty(t)){r[colorName$1[t]]=t}}var a=e.exports={to:{},get:{}};a.get=function(e){var r=e.substring(0,3).toLowerCase();var t;var n;switch(r){case"hsl":t=a.get.hsl(e);n="hsl";break;case"hwb":t=a.get.hwb(e);n="hwb";break;default:t=a.get.rgb(e);n="rgb";break}if(!t){return null}return{model:n,value:t}};a.get.rgb=function(e){if(!e){return null}var r=/^#([a-f0-9]{3,4})$/i;var t=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i;var a=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/;var o=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/;var i=/(\D+)/;var l=[0,0,0,1];var s;var c;var h;if(s=e.match(t)){h=s[2];s=s[1];for(c=0;c<3;c++){var u=c*2;l[c]=parseInt(s.slice(u,u+2),16)}if(h){l[3]=parseInt(h,16)/255}}else if(s=e.match(r)){s=s[1];h=s[3];for(c=0;c<3;c++){l[c]=parseInt(s[c]+s[c],16)}if(h){l[3]=parseInt(h+h,16)/255}}else if(s=e.match(a)){for(c=0;c<3;c++){l[c]=parseInt(s[c+1],0)}if(s[4]){l[3]=parseFloat(s[4])}}else if(s=e.match(o)){for(c=0;c<3;c++){l[c]=Math.round(parseFloat(s[c+1])*2.55)}if(s[4]){l[3]=parseFloat(s[4])}}else if(s=e.match(i)){if(s[1]==="transparent"){return[0,0,0,0]}l=colorName$1[s[1]];if(!l){return null}l[3]=1;return l}else{return null}for(c=0;c<3;c++){l[c]=n(l[c],0,255)}l[3]=n(l[3],0,1);return l};a.get.hsl=function(e){if(!e){return null}var r=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?[\d\.]+)\s*)?\)$/;var t=e.match(r);if(t){var a=parseFloat(t[4]);var o=(parseFloat(t[1])+360)%360;var i=n(parseFloat(t[2]),0,100);var l=n(parseFloat(t[3]),0,100);var s=n(isNaN(a)?1:a,0,1);return[o,i,l,s]}return null};a.get.hwb=function(e){if(!e){return null}var r=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/;var t=e.match(r);if(t){var a=parseFloat(t[4]);var o=(parseFloat(t[1])%360+360)%360;var i=n(parseFloat(t[2]),0,100);var l=n(parseFloat(t[3]),0,100);var s=n(isNaN(a)?1:a,0,1);return[o,i,l,s]}return null};a.to.hex=function(){var e=simpleSwizzle(arguments);return"#"+o(e[0])+o(e[1])+o(e[2])+(e[3]<1?o(Math.round(e[3]*255)):"")};a.to.rgb=function(){var e=simpleSwizzle(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};a.to.rgb.percent=function(){var e=simpleSwizzle(arguments);var r=Math.round(e[0]/255*100);var t=Math.round(e[1]/255*100);var a=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+r+"%, "+t+"%, "+a+"%)":"rgba("+r+"%, "+t+"%, "+a+"%, "+e[3]+")"};a.to.hsl=function(){var e=simpleSwizzle(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};a.to.hwb=function(){var e=simpleSwizzle(arguments);var r="";if(e.length>=4&&e[3]!==1){r=", "+e[3]}return"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+r+")"};a.to.keyword=function(e){return r[e.slice(0,3)]};function n(e,r,t){return Math.min(Math.max(r,e),t)}function o(e){var r=e.toString(16).toUpperCase();return r.length<2?"0"+r:r}}));var colorName={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};var reverseKeywords={};for(var _i=0,_b=Object.keys(colorName);_i<_b.length;_i++){var key=_b[_i];reverseKeywords[colorName[key]]=key}var convert$1={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var conversions=convert$1;for(var _c=0,_d=Object.keys(convert$1);_c<_d.length;_c++){var model=_d[_c];if(!("channels"in convert$1[model])){throw new Error("missing channels property: "+model)}if(!("labels"in convert$1[model])){throw new Error("missing channel labels property: "+model)}if(convert$1[model].labels.length!==convert$1[model].channels){throw new Error("channel and label counts mismatch: "+model)}var _e=convert$1[model],channels=_e.channels,labels=_e.labels;delete convert$1[model].channels;delete convert$1[model].labels;Object.defineProperty(convert$1[model],"channels",{value:channels});Object.defineProperty(convert$1[model],"labels",{value:labels})}convert$1.rgb.hsl=function(e){var r=e[0]/255;var t=e[1]/255;var a=e[2]/255;var n=Math.min(r,t,a);var o=Math.max(r,t,a);var i=o-n;var l;var s;if(o===n){l=0}else if(r===o){l=(t-a)/i}else if(t===o){l=2+(a-r)/i}else if(a===o){l=4+(r-t)/i}l=Math.min(l*60,360);if(l<0){l+=360}var c=(n+o)/2;if(o===n){s=0}else if(c<=.5){s=i/(o+n)}else{s=i/(2-o-n)}return[l,s*100,c*100]};convert$1.rgb.hsv=function(e){var r;var t;var a;var n;var o;var i=e[0]/255;var l=e[1]/255;var s=e[2]/255;var c=Math.max(i,l,s);var h=c-Math.min(i,l,s);var u=function(e){return(c-e)/6/h+1/2};if(h===0){n=0;o=0}else{o=h/c;r=u(i);t=u(l);a=u(s);if(i===c){n=a-t}else if(l===c){n=1/3+r-a}else if(s===c){n=2/3+t-r}if(n<0){n+=1}else if(n>1){n-=1}}return[n*360,o*100,c*100]};convert$1.rgb.hwb=function(e){var r=e[0];var t=e[1];var a=e[2];var n=convert$1.rgb.hsl(e)[0];var o=1/255*Math.min(r,Math.min(t,a));a=1-1/255*Math.max(r,Math.max(t,a));return[n,o*100,a*100]};convert$1.rgb.cmyk=function(e){var r=e[0]/255;var t=e[1]/255;var a=e[2]/255;var n=Math.min(1-r,1-t,1-a);var o=(1-r-n)/(1-n)||0;var i=(1-t-n)/(1-n)||0;var l=(1-a-n)/(1-n)||0;return[o*100,i*100,l*100,n*100]};function comparativeDistance(e,r){return Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2)+Math.pow(e[2]-r[2],2)}convert$1.rgb.keyword=function(e){var r=reverseKeywords[e];if(r){return r}var t=Infinity;var a;for(var n=0,o=Object.keys(colorName);n<o.length;n++){var i=o[n];var l=colorName[i];var s=comparativeDistance(e,l);if(s<t){t=s;a=i}}return a};convert$1.keyword.rgb=function(e){return colorName[e]};convert$1.rgb.xyz=function(e){var r=e[0]/255;var t=e[1]/255;var a=e[2]/255;r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92;t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92;a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92;var n=r*.4124+t*.3576+a*.1805;var o=r*.2126+t*.7152+a*.0722;var i=r*.0193+t*.1192+a*.9505;return[n*100,o*100,i*100]};convert$1.rgb.lab=function(e){var r=convert$1.rgb.xyz(e);var t=r[0];var a=r[1];var n=r[2];t/=95.047;a/=100;n/=108.883;t=t>.008856?Math.pow(t,1/3):7.787*t+16/116;a=a>.008856?Math.pow(a,1/3):7.787*a+16/116;n=n>.008856?Math.pow(n,1/3):7.787*n+16/116;var o=116*a-16;var i=500*(t-a);var l=200*(a-n);return[o,i,l]};convert$1.hsl.rgb=function(e){var r=e[0]/360;var t=e[1]/100;var a=e[2]/100;var n;var o;var i;if(t===0){i=a*255;return[i,i,i]}if(a<.5){n=a*(1+t)}else{n=a+t-a*t}var l=2*a-n;var s=[0,0,0];for(var c=0;c<3;c++){o=r+1/3*-(c-1);if(o<0){o++}if(o>1){o--}if(6*o<1){i=l+(n-l)*6*o}else if(2*o<1){i=n}else if(3*o<2){i=l+(n-l)*(2/3-o)*6}else{i=l}s[c]=i*255}return s};convert$1.hsl.hsv=function(e){var r=e[0];var t=e[1]/100;var a=e[2]/100;var n=t;var o=Math.max(a,.01);a*=2;t*=a<=1?a:2-a;n*=o<=1?o:2-o;var i=(a+t)/2;var l=a===0?2*n/(o+n):2*t/(a+t);return[r,l*100,i*100]};convert$1.hsv.rgb=function(e){var r=e[0]/60;var t=e[1]/100;var a=e[2]/100;var n=Math.floor(r)%6;var o=r-Math.floor(r);var i=255*a*(1-t);var l=255*a*(1-t*o);var s=255*a*(1-t*(1-o));a*=255;switch(n){case 0:return[a,s,i];case 1:return[l,a,i];case 2:return[i,a,s];case 3:return[i,l,a];case 4:return[s,i,a];case 5:return[a,i,l]}};convert$1.hsv.hsl=function(e){var r=e[0];var t=e[1]/100;var a=e[2]/100;var n=Math.max(a,.01);var o;var i;i=(2-t)*a;var l=(2-t)*n;o=t*n;o/=l<=1?l:2-l;o=o||0;i/=2;return[r,o*100,i*100]};convert$1.hwb.rgb=function(e){var r=e[0]/360;var t=e[1]/100;var a=e[2]/100;var n=t+a;var o;if(n>1){t/=n;a/=n}var i=Math.floor(6*r);var l=1-a;o=6*r-i;if((i&1)!==0){o=1-o}var s=t+o*(l-t);var c;var h;var u;switch(i){default:case 6:case 0:c=l;h=s;u=t;break;case 1:c=s;h=l;u=t;break;case 2:c=t;h=l;u=s;break;case 3:c=t;h=s;u=l;break;case 4:c=s;h=t;u=l;break;case 5:c=l;h=t;u=s;break}return[c*255,h*255,u*255]};convert$1.cmyk.rgb=function(e){var r=e[0]/100;var t=e[1]/100;var a=e[2]/100;var n=e[3]/100;var o=1-Math.min(1,r*(1-n)+n);var i=1-Math.min(1,t*(1-n)+n);var l=1-Math.min(1,a*(1-n)+n);return[o*255,i*255,l*255]};convert$1.xyz.rgb=function(e){var r=e[0]/100;var t=e[1]/100;var a=e[2]/100;var n;var o;var i;n=r*3.2406+t*-1.5372+a*-.4986;o=r*-.9689+t*1.8758+a*.0415;i=r*.0557+t*-.204+a*1.057;n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*12.92;o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92;i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92;n=Math.min(Math.max(0,n),1);o=Math.min(Math.max(0,o),1);i=Math.min(Math.max(0,i),1);return[n*255,o*255,i*255]};convert$1.xyz.lab=function(e){var r=e[0];var t=e[1];var a=e[2];r/=95.047;t/=100;a/=108.883;r=r>.008856?Math.pow(r,1/3):7.787*r+16/116;t=t>.008856?Math.pow(t,1/3):7.787*t+16/116;a=a>.008856?Math.pow(a,1/3):7.787*a+16/116;var n=116*t-16;var o=500*(r-t);var i=200*(t-a);return[n,o,i]};convert$1.lab.xyz=function(e){var r=e[0];var t=e[1];var a=e[2];var n;var o;var i;o=(r+16)/116;n=t/500+o;i=o-a/200;var l=Math.pow(o,3);var s=Math.pow(n,3);var c=Math.pow(i,3);o=l>.008856?l:(o-16/116)/7.787;n=s>.008856?s:(n-16/116)/7.787;i=c>.008856?c:(i-16/116)/7.787;n*=95.047;o*=100;i*=108.883;return[n,o,i]};convert$1.lab.lch=function(e){var r=e[0];var t=e[1];var a=e[2];var n;var o=Math.atan2(a,t);n=o*360/2/Math.PI;if(n<0){n+=360}var i=Math.sqrt(t*t+a*a);return[r,i,n]};convert$1.lch.lab=function(e){var r=e[0];var t=e[1];var a=e[2];var n=a/360*2*Math.PI;var o=t*Math.cos(n);var i=t*Math.sin(n);return[r,o,i]};convert$1.rgb.ansi16=function(e,r){if(r===void 0){r=null}var t=e[0],a=e[1],n=e[2];var o=r===null?convert$1.rgb.hsv(e)[2]:r;o=Math.round(o/50);if(o===0){return 30}var i=30+(Math.round(n/255)<<2|Math.round(a/255)<<1|Math.round(t/255));if(o===2){i+=60}return i};convert$1.hsv.ansi16=function(e){return convert$1.rgb.ansi16(convert$1.hsv.rgb(e),e[2])};convert$1.rgb.ansi256=function(e){var r=e[0];var t=e[1];var a=e[2];if(r===t&&t===a){if(r<8){return 16}if(r>248){return 231}return Math.round((r-8)/247*24)+232}var n=16+36*Math.round(r/255*5)+6*Math.round(t/255*5)+Math.round(a/255*5);return n};convert$1.ansi16.rgb=function(e){var r=e%10;if(r===0||r===7){if(e>50){r+=3.5}r=r/10.5*255;return[r,r,r]}var t=(~~(e>50)+1)*.5;var a=(r&1)*t*255;var n=(r>>1&1)*t*255;var o=(r>>2&1)*t*255;return[a,n,o]};convert$1.ansi256.rgb=function(e){if(e>=232){var r=(e-232)*10+8;return[r,r,r]}e-=16;var t;var a=Math.floor(e/36)/5*255;var n=Math.floor((t=e%36)/6)/5*255;var o=t%6/5*255;return[a,n,o]};convert$1.rgb.hex=function(e){var r=((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255);var t=r.toString(16).toUpperCase();return"000000".substring(t.length)+t};convert$1.hex.rgb=function(e){var r=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!r){return[0,0,0]}var t=r[0];if(r[0].length===3){t=t.split("").map((function(e){return e+e})).join("")}var a=parseInt(t,16);var n=a>>16&255;var o=a>>8&255;var i=a&255;return[n,o,i]};convert$1.rgb.hcg=function(e){var r=e[0]/255;var t=e[1]/255;var a=e[2]/255;var n=Math.max(Math.max(r,t),a);var o=Math.min(Math.min(r,t),a);var i=n-o;var l;var s;if(i<1){l=o/(1-i)}else{l=0}if(i<=0){s=0}else if(n===r){s=(t-a)/i%6}else if(n===t){s=2+(a-r)/i}else{s=4+(r-t)/i}s/=6;s%=1;return[s*360,i*100,l*100]};convert$1.hsl.hcg=function(e){var r=e[1]/100;var t=e[2]/100;var a=t<.5?2*r*t:2*r*(1-t);var n=0;if(a<1){n=(t-.5*a)/(1-a)}return[e[0],a*100,n*100]};convert$1.hsv.hcg=function(e){var r=e[1]/100;var t=e[2]/100;var a=r*t;var n=0;if(a<1){n=(t-a)/(1-a)}return[e[0],a*100,n*100]};convert$1.hcg.rgb=function(e){var r=e[0]/360;var t=e[1]/100;var a=e[2]/100;if(t===0){return[a*255,a*255,a*255]}var n=[0,0,0];var o=r%1*6;var i=o%1;var l=1-i;var s=0;switch(Math.floor(o)){case 0:n[0]=1;n[1]=i;n[2]=0;break;case 1:n[0]=l;n[1]=1;n[2]=0;break;case 2:n[0]=0;n[1]=1;n[2]=i;break;case 3:n[0]=0;n[1]=l;n[2]=1;break;case 4:n[0]=i;n[1]=0;n[2]=1;break;default:n[0]=1;n[1]=0;n[2]=l}s=(1-t)*a;return[(t*n[0]+s)*255,(t*n[1]+s)*255,(t*n[2]+s)*255]};convert$1.hcg.hsv=function(e){var r=e[1]/100;var t=e[2]/100;var a=r+t*(1-r);var n=0;if(a>0){n=r/a}return[e[0],n*100,a*100]};convert$1.hcg.hsl=function(e){var r=e[1]/100;var t=e[2]/100;var a=t*(1-r)+.5*r;var n=0;if(a>0&&a<.5){n=r/(2*a)}else if(a>=.5&&a<1){n=r/(2*(1-a))}return[e[0],n*100,a*100]};convert$1.hcg.hwb=function(e){var r=e[1]/100;var t=e[2]/100;var a=r+t*(1-r);return[e[0],(a-r)*100,(1-a)*100]};convert$1.hwb.hcg=function(e){var r=e[1]/100;var t=e[2]/100;var a=1-t;var n=a-r;var o=0;if(n<1){o=(a-n)/(1-n)}return[e[0],n*100,o*100]};convert$1.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};convert$1.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};convert$1.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};convert$1.gray.hsl=function(e){return[0,0,e[0]]};convert$1.gray.hsv=convert$1.gray.hsl;convert$1.gray.hwb=function(e){return[0,100,e[0]]};convert$1.gray.cmyk=function(e){return[0,0,0,e[0]]};convert$1.gray.lab=function(e){return[e[0],0,0]};convert$1.gray.hex=function(e){var r=Math.round(e[0]/100*255)&255;var t=(r<<16)+(r<<8)+r;var a=t.toString(16).toUpperCase();return"000000".substring(a.length)+a};convert$1.rgb.gray=function(e){var r=(e[0]+e[1]+e[2])/3;return[r/255*100]};function buildGraph(){var e={};var r=Object.keys(conversions);for(var t=r.length,a=0;a<t;a++){e[r[a]]={distance:-1,parent:null}}return e}function deriveBFS(e){var r=buildGraph();var t=[e];r[e].distance=0;while(t.length){var a=t.pop();var n=Object.keys(conversions[a]);for(var o=n.length,i=0;i<o;i++){var l=n[i];var s=r[l];if(s.distance===-1){s.distance=r[a].distance+1;s.parent=a;t.unshift(l)}}}return r}function link(e,r){return function(t){return r(e(t))}}function wrapConversion(e,r){var t=[r[e].parent,e];var a=conversions[r[e].parent][e];var n=r[e].parent;while(r[n].parent){t.unshift(r[n].parent);a=link(conversions[r[n].parent][n],a);n=r[n].parent}a.conversion=t;return a}var route=function(e){var r=deriveBFS(e);var t={};var a=Object.keys(r);for(var n=a.length,o=0;o<n;o++){var i=a[o];var l=r[i];if(l.parent===null){continue}t[i]=wrapConversion(i,r)}return t};var convert={};var models=Object.keys(conversions);function wrapRaw(e){var r=function(){var r=[];for(var t=0;t<arguments.length;t++){r[t]=arguments[t]}var a=r[0];if(a===undefined||a===null){return a}if(a.length>1){r=a}return e(r)};if("conversion"in e){r.conversion=e.conversion}return r}function wrapRounded(e){var r=function(){var r=[];for(var t=0;t<arguments.length;t++){r[t]=arguments[t]}var a=r[0];if(a===undefined||a===null){return a}if(a.length>1){r=a}var n=e(r);if(typeof n==="object"){for(var o=n.length,i=0;i<o;i++){n[i]=Math.round(n[i])}}return n};if("conversion"in e){r.conversion=e.conversion}return r}models.forEach((function(e){convert[e]={};Object.defineProperty(convert[e],"channels",{value:conversions[e].channels});Object.defineProperty(convert[e],"labels",{value:conversions[e].labels});var r=route(e);var t=Object.keys(r);t.forEach((function(t){var a=r[t];convert[e][t]=wrapRounded(a);convert[e][t].raw=wrapRaw(a)}))}));var colorConvert=convert;var _slice=[].slice;var skippedModels=["keyword","gray","hex"];var hashedModelKeys={};for(var _f=0,_g=Object.keys(colorConvert);_f<_g.length;_f++){var model=_g[_f];hashedModelKeys[_slice.call(colorConvert[model].labels).sort().join("")]=model}var limiters={};function Color(e,r){if(!(this instanceof Color)){return new Color(e,r)}if(r&&r in skippedModels){r=null}if(r&&!(r in colorConvert)){throw new Error("Unknown model: "+r)}var t;var a;if(e==null){this.model="rgb";this.color=[0,0,0];this.valpha=1}else if(e instanceof Color){this.model=e.model;this.color=e.color.slice();this.valpha=e.valpha}else if(typeof e==="string"){var n=colorString.get(e);if(n===null){throw new Error("Unable to parse color from string: "+e)}this.model=n.model;a=colorConvert[this.model].channels;this.color=n.value.slice(0,a);this.valpha=typeof n.value[a]==="number"?n.value[a]:1}else if(e.length>0){this.model=r||"rgb";a=colorConvert[this.model].channels;var o=_slice.call(e,0,a);this.color=zeroArray(o,a);this.valpha=typeof e[a]==="number"?e[a]:1}else if(typeof e==="number"){this.model="rgb";this.color=[e>>16&255,e>>8&255,e&255];this.valpha=1}else{this.valpha=1;var i=Object.keys(e);if("alpha"in e){i.splice(i.indexOf("alpha"),1);this.valpha=typeof e.alpha==="number"?e.alpha:0}var l=i.sort().join("");if(!(l in hashedModelKeys)){throw new Error("Unable to parse color from object: "+JSON.stringify(e))}this.model=hashedModelKeys[l];var s=colorConvert[this.model].labels;var c=[];for(t=0;t<s.length;t++){c.push(e[s[t]])}this.color=zeroArray(c)}if(limiters[this.model]){a=colorConvert[this.model].channels;for(t=0;t<a;t++){var h=limiters[this.model][t];if(h){this.color[t]=h(this.color[t])}}}this.valpha=Math.max(0,Math.min(1,this.valpha));if(Object.freeze){Object.freeze(this)}}Color.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(e){var r=this.model in colorString.to?this:this.rgb();r=r.round(typeof e==="number"?e:1);var t=r.valpha===1?r.color:r.color.concat(this.valpha);return colorString.to[r.model](t)},percentString:function(e){var r=this.rgb().round(typeof e==="number"?e:1);var t=r.valpha===1?r.color:r.color.concat(this.valpha);return colorString.to.rgb.percent(t)},array:function(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object:function(){var e={};var r=colorConvert[this.model].channels;var t=colorConvert[this.model].labels;for(var a=0;a<r;a++){e[t[a]]=this.color[a]}if(this.valpha!==1){e.alpha=this.valpha}return e},unitArray:function(){var e=this.rgb().color;e[0]/=255;e[1]/=255;e[2]/=255;if(this.valpha!==1){e.push(this.valpha)}return e},unitObject:function(){var e=this.rgb().object();e.r/=255;e.g/=255;e.b/=255;if(this.valpha!==1){e.alpha=this.valpha}return e},round:function(e){e=Math.max(e||0,0);return new Color(this.color.map(roundToPlace(e)).concat(this.valpha),this.model)},alpha:function(e){if(arguments.length>0){return new Color(this.color.concat(Math.max(0,Math.min(1,e))),this.model)}return this.valpha},red:getset("rgb",0,maxfn(255)),green:getset("rgb",1,maxfn(255)),blue:getset("rgb",2,maxfn(255)),hue:getset(["hsl","hsv","hsl","hwb","hcg"],0,(function(e){return(e%360+360)%360})),saturationl:getset("hsl",1,maxfn(100)),lightness:getset("hsl",2,maxfn(100)),saturationv:getset("hsv",1,maxfn(100)),value:getset("hsv",2,maxfn(100)),chroma:getset("hcg",1,maxfn(100)),gray:getset("hcg",2,maxfn(100)),white:getset("hwb",1,maxfn(100)),wblack:getset("hwb",2,maxfn(100)),cyan:getset("cmyk",0,maxfn(100)),magenta:getset("cmyk",1,maxfn(100)),yellow:getset("cmyk",2,maxfn(100)),black:getset("cmyk",3,maxfn(100)),x:getset("xyz",0,maxfn(100)),y:getset("xyz",1,maxfn(100)),z:getset("xyz",2,maxfn(100)),l:getset("lab",0,maxfn(100)),a:getset("lab",1),b:getset("lab",2),keyword:function(e){if(arguments.length>0){return new Color(e)}return colorConvert[this.model].keyword(this.color)},hex:function(e){if(arguments.length>0){return new Color(e)}return colorString.to.hex(this.rgb().round().color)},rgbNumber:function(){var e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity:function(){var e=this.rgb().color;var r=[];for(var t=0,a=e.entries();t<a.length;t++){var n=a[t],o=n[0],i=n[1];var l=i/255;r[o]=l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4)}return.2126*r[0]+.7152*r[1]+.0722*r[2]},contrast:function(e){var r=this.luminosity();var t=e.luminosity();if(r>t){return(r+.05)/(t+.05)}return(t+.05)/(r+.05)},level:function(e){var r=this.contrast(e);if(r>=7.1){return"AAA"}return r>=4.5?"AA":""},isDark:function(){var e=this.rgb().color;var r=(e[0]*299+e[1]*587+e[2]*114)/1e3;return r<128},isLight:function(){return!this.isDark()},negate:function(){var e=this.rgb();for(var r=0;r<3;r++){e.color[r]=255-e.color[r]}return e},lighten:function(e){var r=this.hsl();r.color[2]+=r.color[2]*e;return r},darken:function(e){var r=this.hsl();r.color[2]-=r.color[2]*e;return r},saturate:function(e){var r=this.hsl();r.color[1]+=r.color[1]*e;return r},desaturate:function(e){var r=this.hsl();r.color[1]-=r.color[1]*e;return r},whiten:function(e){var r=this.hwb();r.color[1]+=r.color[1]*e;return r},blacken:function(e){var r=this.hwb();r.color[2]+=r.color[2]*e;return r},grayscale:function(){var e=this.rgb().color;var r=e[0]*.3+e[1]*.59+e[2]*.11;return Color.rgb(r,r,r)},fade:function(e){return this.alpha(this.valpha-this.valpha*e)},opaquer:function(e){return this.alpha(this.valpha+this.valpha*e)},rotate:function(e){var r=this.hsl();var t=r.color[0];t=(t+e)%360;t=t<0?360+t:t;r.color[0]=t;return r},mix:function(e,r){if(!e||!e.rgb){throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e)}var t=e.rgb();var a=this.rgb();var n=r===undefined?.5:r;var o=2*n-1;var i=t.alpha()-a.alpha();var l=((o*i===-1?o:(o+i)/(1+o*i))+1)/2;var s=1-l;return Color.rgb(l*t.red()+s*a.red(),l*t.green()+s*a.green(),l*t.blue()+s*a.blue(),t.alpha()*n+a.alpha()*(1-n))}};var _loop_1=function(e){if(skippedModels.includes(e)){return"continue"}var r=colorConvert[e].channels;Color.prototype[e]=function(){if(this.model===e){return new Color(this)}if(arguments.length>0){return new Color(arguments,e)}var t=typeof arguments[r]==="number"?r:this.valpha;return new Color(assertArray(colorConvert[this.model][e].raw(this.color)).concat(t),e)};Color[e]=function(t){if(typeof t==="number"){t=zeroArray(_slice.call(arguments),r)}return new Color(t,e)}};for(var _h=0,_j=Object.keys(colorConvert);_h<_j.length;_h++){var model=_j[_h];_loop_1(model)}function roundTo(e,r){return Number(e.toFixed(r))}function roundToPlace(e){return function(r){return roundTo(r,e)}}function getset(e,r,t){e=Array.isArray(e)?e:[e];for(var a=0,n=e;a<n.length;a++){var o=n[a];(limiters[o]||(limiters[o]=[]))[r]=t}e=e[0];return function(a){var n;if(arguments.length>0){if(t){a=t(a)}n=this[e]();n.color[r]=a;return n}n=this[e]().color[r];if(t){n=t(n)}return n}}function maxfn(e){return function(r){return Math.max(0,Math.min(e,r))}}function assertArray(e){return Array.isArray(e)?e:[e]}function zeroArray(e,r){for(var t=0;t<r;t++){if(typeof e[t]!=="number"){e[t]=0}}return e}var color=Color;var CSS$2={container:"container",controlSection:"control-section",hexOptions:"color-hex-options",section:"section",header:"header",control:"control",splitSection:"section--split",colorModeContainer:"color-mode-container",colorMode:"color-mode",channels:"channels",channel:"channel",savedColors:"saved-colors",savedColorsSection:"saved-colors-section",saveColor:"save-color",deleteColor:"delete-color",savedColorsButtons:"saved-colors-buttons",headerHex:"header--hex",colorFieldAndSlider:"color-field-and-slider",colorFieldAndSliderInteractive:"color-field-and-slider--interactive",colorFieldAndSliderWrap:"color-field-and-slider-wrap",scope:"scope",hueScope:"scope--hue",colorFieldScope:"scope--color-field",savedColor:"saved-color"};var DEFAULT_COLOR$1=color("#007AC2");var DEFAULT_STORAGE_KEY_PREFIX="calcite-color-";var RGB_LIMITS={r:255,g:255,b:255};var HSV_LIMITS={h:360,s:100,v:100};var TEXT={b:"B",blue:"Blue",deleteColor:"Delete color",g:"G",green:"Green",h:"H",hsv:"HSV",hex:"Hex",hue:"Hue",noColor:"No color",r:"R",red:"Red",rgb:"RGB",s:"S",saturation:"Saturation",saveColor:"Save color",saved:"Saved",v:"V",value:"Value"};var DIMENSIONS={s:{slider:{height:10,width:160},colorField:{height:80,width:160},thumb:{radius:8}},m:{slider:{height:14,width:272},colorField:{height:150,width:272},thumb:{radius:10}},l:{slider:{height:16,width:464},colorField:{height:200,width:464},thumb:{radius:12}}};var calciteColorPickerCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:inline-block;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-normal)}:host([scale=s]) .container{width:160px}:host([scale=s]) .saved-colors{grid-template-columns:repeat(auto-fill, minmax(20px, 1fr))}:host([scale=s]) .channels{-ms-flex-direction:column;flex-direction:column}:host([scale=s]) .channel{width:100%;margin-bottom:4px}:host([scale=s]) .channel:last-child{margin-bottom:0}:host([scale=m]) .container{width:272px}:host([scale=l]) .control-section.section.calcite--rtl>:nth-child(2){margin-left:0;margin-right:12px}:host([scale=l]) .header{padding-bottom:0}:host([scale=l]){font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]) .container{width:464px}:host([scale=l]) .color-field-and-slider{margin-bottom:-20px}:host([scale=l]) .section{padding:0 16px 16px}:host([scale=l]) .section:first-of-type{padding-top:16px}:host([scale=l]) .saved-colors{grid-template-columns:repeat(auto-fill, minmax(28px, 1fr));grid-gap:12px;padding-top:16px}:host([scale=l]) .control-section{-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-align:baseline;align-items:baseline}:host([scale=l]) .control-section>:nth-child(2){margin-left:12px}:host([scale=l]) .color-hex-options{-ms-flex-negative:1;flex-shrink:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:distribute;justify-content:space-around;min-height:98px;width:160px}:host([scale=l]) .color-mode-container{-ms-flex-negative:3;flex-shrink:3}:host([appearance=minimal]) .container{border:none}.container{background-color:var(--calcite-ui-foreground-1);display:inline-block;border:1px solid var(--calcite-ui-border-1)}.color-field-and-slider-wrap{position:relative}.scope{font-size:var(--calcite-font-size--1);padding:0;margin-bottom:0;margin-right:0;outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;width:0.5rem;height:0.5rem;position:absolute;pointer-events:none;margin-top:-0.25rem;margin-left:-0.25rem;outline-offset:10px}.scope:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px;outline-offset:12px}.color-field-and-slider{margin-bottom:-16px}.color-field-and-slider--interactive{cursor:pointer}.control-section{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}.section{padding:0 12px 12px}.section:first-of-type{padding-top:12px}.color-hex-options,.section--split{-ms-flex-positive:1;flex-grow:1}.header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;color:var(--calcite-ui-text-1);padding-bottom:0.25rem}.header--hex,.color-mode-container{padding-top:12px}.channels{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.channel{width:31%}.saved-colors{padding-top:12px;display:grid;grid-template-columns:repeat(auto-fill, minmax(24px, 1fr));grid-gap:8px;width:100%}.saved-colors-buttons{display:-ms-flexbox;display:flex}.saved-color{outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;cursor:pointer}.saved-color:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.saved-color:hover{-webkit-transition:outline-color 100ms ease-in-out;transition:outline-color 100ms ease-in-out;outline:2px solid var(--calcite-ui-border-2);outline-offset:2px}";var throttleFor60FpsInMs=16;var defaultValue=normalizeHex(DEFAULT_COLOR$1.hex());var defaultFormat="auto";var CalciteColorPicker=function(){function e(e){var r=this;registerInstance(this,e);this.calciteColorPickerChange=createEvent(this,"calciteColorPickerChange",7);this.calciteColorPickerInput=createEvent(this,"calciteColorPickerInput",7);this.allowEmpty=false;this.appearance="default";this.color=DEFAULT_COLOR$1;this.format=defaultFormat;this.hideHex=false;this.hideChannels=false;this.hideSaved=false;this.intlB=TEXT.b;this.intlBlue=TEXT.blue;this.intlDeleteColor=TEXT.deleteColor;this.intlG=TEXT.g;this.intlGreen=TEXT.green;this.intlH=TEXT.h;this.intlHsv=TEXT.hsv;this.intlHex=TEXT.hex;this.intlHue=TEXT.hue;this.intlNoColor=TEXT.noColor;this.intlR=TEXT.r;this.intlRed=TEXT.red;this.intlRgb=TEXT.rgb;this.intlS=TEXT.s;this.intlSaturation=TEXT.saturation;this.intlSaveColor=TEXT.saveColor;this.intlSaved=TEXT.saved;this.intlV=TEXT.v;this.intlValue=TEXT.value;this.scale="m";this.value=defaultValue;this.colorUpdateLocked=false;this.colorFieldAndSliderHovered=false;this.hueThumbState="idle";this.mode=CSSColorMode.HEX;this.shiftKeyChannelAdjustment=0;this.sliderThumbState="idle";this.colorFieldAndSliderInteractive=false;this.channelMode="rgb";this.channels=this.toChannels(DEFAULT_COLOR$1);this.dimensions=DIMENSIONS.m;this.savedColors=[];this.handleTabActivate=function(e){r.channelMode=e.currentTarget.getAttribute("data-color-mode");r.updateChannelsFromColor(r.color)};this.handleColorFieldScopeKeyDown=function(e){var t=getKey(e.key);var a={ArrowUp:{x:0,y:-10},ArrowRight:{x:10,y:0},ArrowDown:{x:0,y:10},ArrowLeft:{x:-10,y:0}};if(a[t]){e.preventDefault();r.scopeOrientation=t==="ArrowDown"||t==="ArrowUp"?"vertical":"horizontal";r.captureColorFieldColor(r.colorFieldScopeLeft+a[t].x||0,r.colorFieldScopeTop+a[t].y||0,false)}};this.handleHueScopeKeyDown=function(e){var t=e.shiftKey?10:1;var a=getKey(e.key);var n={ArrowUp:1,ArrowRight:1,ArrowDown:-1,ArrowLeft:-1};if(n[a]){e.preventDefault();var o=n[a]*t;var i=r.baseColorFieldColor.hue();var l=r.baseColorFieldColor.hue(i+o);r.internalColorSet(l,false)}};this.handleHexInputChange=function(e){e.stopPropagation();var t=r,a=t.allowEmpty,n=t.color;var o=e.target;var i=o.value;if(a&&!i){r.internalColorSet(null);return}var l=n&&normalizeHex(n.hex());if(i!==l){r.internalColorSet(color(i))}};this.handleSavedColorSelect=function(e){var t=e.currentTarget;r.internalColorSet(color(t.color))};this.handleChannelInput=function(e){var t=e.currentTarget;var a=e.detail.nativeEvent.target;var n=Number(t.getAttribute("data-channel-index"));var o=r.channelMode==="rgb"?RGB_LIMITS[Object.keys(RGB_LIMITS)[n]]:HSV_LIMITS[Object.keys(HSV_LIMITS)[n]];var i;if(r.allowEmpty&&!t.value){i=""}else{var l=Number(t.value)+r.shiftKeyChannelAdjustment;var s=clamp(l,0,o);i=s.toString()}t.value=i;a.value=i};this.handleChannelChange=function(e){var t=e.currentTarget;var a=Number(t.getAttribute("data-channel-index"));var n=__spreadArray([],r.channels);var o=r.allowEmpty&&!t.value;if(o){r.channels=[null,null,null];r.internalColorSet(null);return}n[a]=Number(t.value);r.updateColorFromChannels(n)};this.handleSavedColorKeyDown=function(e){if(e.key===" "||e.key==="Enter"){e.preventDefault();e.stopPropagation();r.handleSavedColorSelect(e)}};this.handleColorFieldAndSliderMouseLeave=function(){r.colorFieldAndSliderInteractive=false;r.colorFieldAndSliderHovered=false;if(r.sliderThumbState!=="drag"&&r.hueThumbState!=="drag"){r.hueThumbState="idle";r.sliderThumbState="idle";r.drawColorFieldAndSlider()}};this.handleColorFieldAndSliderMouseDown=function(e){var t=e.offsetX,a=e.offsetY;var n=r.getCanvasRegion(a);if(n==="color-field"){r.hueThumbState="drag";r.captureColorFieldColor(t,a)}else if(n==="slider"){r.sliderThumbState="drag";r.captureHueSliderColor(t)}e.preventDefault();document.addEventListener("mousemove",r.globalMouseMoveHandler);document.addEventListener("mouseup",r.globalMouseUpHandler,{once:true});r.activeColorFieldAndSliderRect=r.fieldAndSliderRenderingContext.canvas.getBoundingClientRect()};this.globalMouseUpHandler=function(){var e=r.sliderThumbState==="drag"||r.hueThumbState==="drag";r.hueThumbState="idle";r.sliderThumbState="idle";r.activeColorFieldAndSliderRect=null;r.drawColorFieldAndSlider();if(e){r.calciteColorPickerChange.emit()}};this.globalMouseMoveHandler=function(e){var t=r,a=t.el,n=t.dimensions;var o=r.sliderThumbState==="drag";var i=r.hueThumbState==="drag";if(!a.isConnected||!o&&!i){return}var l;var s;var c=r.activeColorFieldAndSliderRect;var h=e.clientX,u=e.clientY;if(r.colorFieldAndSliderHovered){l=h-c.x;s=u-c.y}else{var d=n.colorField.width;var v=n.colorField.height;var f=n.slider.height;if(h<c.x+d&&h>c.x){l=h-c.x}else if(h<c.x){l=0}else{l=d}if(u<c.y+v+f&&u>c.y){s=u-c.y}else if(u<c.y){s=0}else{s=v+f}}if(i){r.captureColorFieldColor(l,s,false)}else{r.captureHueSliderColor(l)}};this.handleColorFieldAndSliderMouseEnterOrMove=function(e){var t=e.offsetX,a=e.offsetY;var n=r.dimensions,o=n.colorField,i=n.slider,l=n.thumb;r.colorFieldAndSliderInteractive=a<=o.height+i.height;r.colorFieldAndSliderHovered=true;var s=r.getCanvasRegion(a);if(s==="color-field"){var c=r.hueThumbState;var h=r.baseColorFieldColor.hsv();var u=Math.round(h.saturationv()/(HSV_LIMITS.s/o.width));var d=Math.round(o.height-h.value()/(HSV_LIMITS.v/o.height));var v=r.containsPoint(t,a,u,d,l.radius);var f=false;if(c==="idle"&&v){r.hueThumbState="hover";f=true}else if(c==="hover"&&!v){r.hueThumbState="idle";f=true}if(r.hueThumbState!=="drag"){if(f){r.drawColorFieldAndSlider()}}}else if(s==="slider"){var p=r.baseColorFieldColor.hsv().saturationv(100).value(100);var m=r.sliderThumbState;var g=Math.round(p.hue()/(360/i.width));var b=Math.round((i.height+r.getSliderCapSpacing())/2)+o.height;var y=r.containsPoint(t,a,g,b,l.radius);var w=false;if(m==="idle"&&y){r.sliderThumbState="hover";w=true}else if(m==="hover"&&!y){r.sliderThumbState="idle";w=true}if(r.sliderThumbState!=="drag"){if(w){r.drawColorFieldAndSlider()}}}};this.storeColorFieldScope=function(e){r.colorFieldScopeNode=e};this.renderChannelsTabTitle=function(e){var t=r,a=t.channelMode,n=t.intlRgb,o=t.intlHsv;var i=e===a;var l=e==="rgb"?n:o;return h("calcite-tab-title",{active:i,class:CSS$2.colorMode,"data-color-mode":e,key:e,onCalciteTabsActivate:r.handleTabActivate},l)};this.renderChannelsTab=function(e){var t=r,a=t.channelMode,n=t.channels,o=t.intlB,i=t.intlBlue,l=t.intlG,s=t.intlGreen,c=t.intlH,u=t.intlHue,d=t.intlR,v=t.intlRed,f=t.intlS,p=t.intlSaturation,m=t.intlV,g=t.intlValue;var b=e===a;var y=e==="rgb";var w=y?[d,l,o]:[c,f,m];var C=y?[v,s,i]:[u,p,g];return h("calcite-tab",{active:b,class:CSS$2.control,key:e},h("div",{class:CSS$2.channels},n.map((function(e,t){return r.renderChannel(e,t,w[t],C[t])}))))};this.renderChannel=function(e,t,a,n){return h("calcite-input",{class:CSS$2.channel,"data-channel-index":t,label:n,numberButtonType:"none",onCalciteInputChange:r.handleChannelChange,onCalciteInputInput:r.handleChannelInput,prefixText:a,scale:r.scale==="l"?"m":"s",type:"number",value:e===null||e===void 0?void 0:e.toString()})};this.deleteColor=function(){var e=r.color.hex();var t=r.savedColors.indexOf(e)>-1;if(!t){return}var a=r.savedColors.filter((function(r){return r!==e}));r.savedColors=a;var n=""+DEFAULT_STORAGE_KEY_PREFIX+r.storageId;if(r.storageId){localStorage.setItem(n,JSON.stringify(a))}};this.saveColor=function(){var e=r.color.hex();var t=r.savedColors.indexOf(e)>-1;if(t){return}var a=__spreadArray(__spreadArray([],r.savedColors),[e]);r.savedColors=a;var n=""+DEFAULT_STORAGE_KEY_PREFIX+r.storageId;if(r.storageId){localStorage.setItem(n,JSON.stringify(a))}};this.drawColorFieldAndSlider=throttle((function(){if(!r.fieldAndSliderRenderingContext){return}r.drawColorField();r.drawHueSlider()}),throttleFor60FpsInMs);this.captureColorFieldColor=function(e,t,a){if(a===void 0){a=true}var n=r.dimensions.colorField,o=n.height,i=n.width;var l=Math.round(HSV_LIMITS.s/i*e);var s=Math.round(HSV_LIMITS.v/o*(o-t));r.internalColorSet(r.baseColorFieldColor.hsv().saturationv(l).value(s),a)};this.initColorFieldAndSlider=function(e){r.fieldAndSliderRenderingContext=e.getContext("2d");r.setCanvasContextSize(e,{width:r.dimensions.colorField.width,height:r.dimensions.colorField.height+r.dimensions.slider.height+r.getSliderCapSpacing()*2});r.drawColorFieldAndSlider()}}e.prototype.handleColorChange=function(e,r){this.drawColorFieldAndSlider();this.updateChannelsFromColor(e);this.previousColor=r;if(this.colorUpdateLocked){return}this.value=this.toValue(e)};e.prototype.handleFormatChange=function(e){this.setMode(e);this.value=this.toValue(this.color)};e.prototype.handleScaleChange=function(e){if(e===void 0){e="m"}this.updateDimensions(e)};e.prototype.handleValueChange=function(e,r){var t=this,a=t.allowEmpty,n=t.format;var o=!a||e;var i=false;if(o){var l=parseMode(e);if(!l||n!=="auto"&&l!==n){this.showIncompatibleColorWarning(e,n);this.value=r;return}i=this.mode!==l;this.setMode(l)}var s=this.sliderThumbState==="drag"||this.hueThumbState==="drag";if(this.colorUpdateLocked){this.calciteColorPickerInput.emit();if(!s){this.calciteColorPickerChange.emit()}return}var c=a&&!e?null:color(e);var h=!colorEqual(c,this.color);if(i||h){this.color=c;this.calciteColorPickerInput.emit();if(!s){this.calciteColorPickerChange.emit()}}};Object.defineProperty(e.prototype,"baseColorFieldColor",{get:function(){return this.color||this.previousColor||DEFAULT_COLOR$1},enumerable:false,configurable:true});e.prototype.handleChannelKeyUpOrDown=function(e){this.shiftKeyChannelAdjustment=0;var r=getKey(e.key);if(r!=="ArrowUp"&&r!=="ArrowDown"||!e.composedPath().some((function(e){var r;return(r=e.classList)===null||r===void 0?void 0:r.contains(CSS$2.channel)}))){return}var t=e.shiftKey;e.preventDefault();if(!this.color){this.internalColorSet(this.previousColor);e.stopPropagation();return}var a=9;this.shiftKeyChannelAdjustment=r==="ArrowUp"&&t?a:r==="ArrowDown"&&t?-a:0};e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,focusElement(this.colorFieldScopeNode)]}))}))};e.prototype.componentWillLoad=function(){var e=""+DEFAULT_STORAGE_KEY_PREFIX+this.storageId;if(this.storageId&&localStorage.getItem(e)){this.savedColors=JSON.parse(localStorage.getItem(e))}};e.prototype.connectedCallback=function(){var e=this,r=e.allowEmpty,t=e.color,a=e.format,n=e.value;var o=r&&!n;var i=parseMode(n);var l=a==="auto"&&i||a===i;var s=o?null:l?color(n):t;if(!l){this.showIncompatibleColorWarning(n,a)}this.setMode(a);this.internalColorSet(s,false);this.updateDimensions(this.scale)};e.prototype.disconnectedCallback=function(){document.removeEventListener("mousemove",this.globalMouseMoveHandler);document.removeEventListener("mouseup",this.globalMouseUpHandler)};e.prototype.render=function(){var e,r,t,a,n,o,i;var l=this;var s=this,c=s.allowEmpty,u=s.color,d=s.intlDeleteColor,v=s.el,f=s.hideHex,p=s.hideChannels,m=s.hideSaved,g=s.intlHex,b=s.intlSaved,y=s.intlSaveColor,w=s.savedColors,C=s.scale;var S=u?u.hex():null;var k=C==="l"?"m":"s";var x=this,M=x.colorFieldAndSliderInteractive,T=x.colorFieldScopeTop,_=x.colorFieldScopeLeft,D=x.hueScopeLeft,F=x.hueScopeTop,A=x.scopeOrientation,I=x.dimensions,$=I.colorField,E=$.height,H=$.width,O=I.slider.height;var L=F!==null&&F!==void 0?F:O/2+E;var R=D!==null&&D!==void 0?D:H*DEFAULT_COLOR$1.hue()/HSV_LIMITS.h;var j=getElementDir(v);var P=u===null;var z=A==="vertical";return h("div",{class:CSS$2.container},h("div",{class:CSS$2.colorFieldAndSliderWrap},h("canvas",{class:(e={},e[CSS$2.colorFieldAndSlider]=true,e[CSS$2.colorFieldAndSliderInteractive]=M,e),onMouseDown:this.handleColorFieldAndSliderMouseDown,onMouseEnter:this.handleColorFieldAndSliderMouseEnterOrMove,onMouseLeave:this.handleColorFieldAndSliderMouseLeave,onMouseMove:this.handleColorFieldAndSliderMouseEnterOrMove,ref:this.initColorFieldAndSlider}),h("div",{"aria-label":z?this.intlValue:this.intlSaturation,"aria-valuemax":z?HSV_LIMITS.v:HSV_LIMITS.s,"aria-valuemin":"0","aria-valuenow":(z?u===null||u===void 0?void 0:u.saturationv():u===null||u===void 0?void 0:u.value())||"0",class:(r={},r[CSS$2.scope]=true,r[CSS$2.colorFieldScope]=true,r),onKeyDown:this.handleColorFieldScopeKeyDown,ref:this.storeColorFieldScope,role:"slider",style:{top:(T||0)+"px",left:(_||0)+"px"},tabindex:"0"}),h("div",{"aria-label":this.intlHue,"aria-valuemax":HSV_LIMITS.h,"aria-valuemin":"0","aria-valuenow":(u===null||u===void 0?void 0:u.round().hue())||DEFAULT_COLOR$1.round().hue(),class:(t={},t[CSS$2.scope]=true,t[CSS$2.hueScope]=true,t),onKeyDown:this.handleHueScopeKeyDown,role:"slider",style:{top:L+"px",left:R+"px"},tabindex:"0"})),f&&p?null:h("div",{class:(a={},a[CSS$2.controlSection]=true,a[CSS$2.section]=true,a[CSS_UTILITY.rtl]=j==="rtl",a)},f?null:h("div",{class:CSS$2.hexOptions},h("span",{class:(n={},n[CSS$2.header]=true,n[CSS$2.headerHex]=true,n)},g),h("calcite-color-picker-hex-input",{allowEmpty:c,class:CSS$2.control,dir:j,onCalciteColorPickerHexInputChange:this.handleHexInputChange,scale:k,value:S})),p?null:h("calcite-tabs",{class:(o={},o[CSS$2.colorModeContainer]=true,o[CSS$2.splitSection]=true,o),dir:j,scale:k},h("calcite-tab-nav",{slot:"tab-nav"},this.renderChannelsTabTitle("rgb"),this.renderChannelsTabTitle("hsv")),this.renderChannelsTab("rgb"),this.renderChannelsTab("hsv"))),m?null:h("div",{class:(i={},i[CSS$2.savedColorsSection]=true,i[CSS$2.section]=true,i)},h("div",{class:CSS$2.header},h("label",null,b),h("div",{class:CSS$2.savedColorsButtons},h("calcite-button",{appearance:"transparent",class:CSS$2.deleteColor,color:"neutral",disabled:P,iconStart:"minus",label:d,onClick:this.deleteColor,scale:k}),h("calcite-button",{appearance:"transparent",class:CSS$2.saveColor,color:"neutral",disabled:P,iconStart:"plus",label:y,onClick:this.saveColor,scale:k}))),w.length>0?h("div",{class:CSS$2.savedColors},__spreadArray([],w.map((function(e){return h("calcite-color-picker-swatch",{active:S===e,class:CSS$2.savedColor,color:e,key:e,onClick:l.handleSavedColorSelect,onKeyDown:l.handleSavedColorKeyDown,scale:C,tabIndex:0})})))):null))};e.prototype.showIncompatibleColorWarning=function(e,r){console.warn("ignoring color value ("+e+") as it is not compatible with the current format ("+r+")")};e.prototype.setMode=function(e){this.mode=e==="auto"?this.mode:e};e.prototype.captureHueSliderColor=function(e){var r=this.dimensions.slider.width;var t=360/r*e;this.internalColorSet(this.baseColorFieldColor.hue(t),false)};e.prototype.getCanvasRegion=function(e){var r=this.dimensions,t=r.colorField.height,a=r.slider.height;if(e<=t){return"color-field"}if(e<=t+a){return"slider"}return"none"};e.prototype.internalColorSet=function(e,r){if(r===void 0){r=true}if(r&&colorEqual(e,this.color)){return}this.colorUpdateLocked=true;this.color=e;this.value=this.toValue(e);this.colorUpdateLocked=false};e.prototype.toValue=function(e,r){if(r===void 0){r=this.mode}if(!e){return null}var t="hex";if(r.includes(t)){return normalizeHex(e.round()[t]())}if(r.includes("-css")){return e[r.replace("-css","").replace("a","")]().round().string()}var a=e[r]().round().object();if(r.endsWith("a")){a.a=a.alpha;delete a.alpha}return a};e.prototype.getSliderCapSpacing=function(){var e=this.dimensions,r=e.slider.height,t=e.thumb.radius;return t*2-r};e.prototype.updateDimensions=function(e){if(e===void 0){e="m"}this.dimensions=DIMENSIONS[e]};e.prototype.drawColorField=function(){var e=this.fieldAndSliderRenderingContext;var r=this.dimensions.colorField,t=r.height,a=r.width;e.fillStyle=this.baseColorFieldColor.hsv().saturationv(100).value(100).string();e.fillRect(0,0,a,t);var n=e.createLinearGradient(0,0,a,0);n.addColorStop(0,"rgba(255,255,255,1)");n.addColorStop(1,"rgba(255,255,255,0)");e.fillStyle=n;e.fillRect(0,0,a,t);var o=e.createLinearGradient(0,0,0,t);o.addColorStop(0,"rgba(0,0,0,0)");o.addColorStop(1,"rgba(0,0,0,1)");e.fillStyle=o;e.fillRect(0,0,a,t);this.drawActiveColorFieldColor()};e.prototype.setCanvasContextSize=function(e,r){var t=r.height,a=r.width;var n=window.devicePixelRatio||1;e.width=a*n;e.height=t*n;e.style.height=t+"px";e.style.width=a+"px";var o=e.getContext("2d");o.scale(n,n)};e.prototype.containsPoint=function(e,r,t,a,n){return Math.pow(e-t,2)+Math.pow(r-a,2)<=Math.pow(n,2)};e.prototype.drawActiveColorFieldColor=function(){var e=this;var r=this.color;if(!r){return}var t=r.hsv();var a=this.dimensions,n=a.colorField,o=n.height,i=n.width,l=a.thumb.radius;var s=t.saturationv()/(HSV_LIMITS.s/i);var c=o-t.value()/(HSV_LIMITS.v/o);requestAnimationFrame((function(){e.colorFieldScopeLeft=s;e.colorFieldScopeTop=c}));this.drawThumb(this.fieldAndSliderRenderingContext,l,s,c,t,this.hueThumbState)};e.prototype.drawThumb=function(e,r,t,a,n,o){var i=0;var l=2*Math.PI;e.beginPath();e.arc(t,a,r,i,l);e.shadowBlur=o==="hover"?32:16;e.shadowColor="rgba(0, 0, 0, "+(o==="drag"?.32:.16)+")";e.fillStyle="#fff";e.fill();e.beginPath();e.arc(t,a,r-3,i,l);e.shadowBlur=0;e.shadowColor="transparent";e.fillStyle=n.rgb().string();e.fill()};e.prototype.drawActiveHueSliderColor=function(){var e=this;var r=this.color;if(!r){return}var t=r.hsv().saturationv(100).value(100);var a=this.dimensions,n=a.colorField.height,o=a.slider,i=o.height,l=o.width,s=a.thumb.radius;var c=t.hue()/(360/l);var h=i/2+n;requestAnimationFrame((function(){e.hueScopeLeft=c;e.hueScopeTop=h}));this.drawThumb(this.fieldAndSliderRenderingContext,s,c,h,t,this.sliderThumbState)};e.prototype.drawHueSlider=function(){var e=this.fieldAndSliderRenderingContext;var r=this.dimensions,t=r.colorField.height,a=r.slider,n=a.height,o=a.width;var i=e.createLinearGradient(0,0,o,0);var l=["red","yellow","lime","cyan","blue","magenta","red"];var s=1/(l.length-1);var c=0;l.forEach((function(e){i.addColorStop(c,color(e).string());c+=s}));e.fillStyle=i;e.clearRect(0,t,o,n+this.getSliderCapSpacing()*2);e.fillRect(0,t,o,n);this.drawActiveHueSliderColor()};e.prototype.updateColorFromChannels=function(e){this.internalColorSet(color(e,this.channelMode))};e.prototype.updateChannelsFromColor=function(e){this.channels=e?this.toChannels(e):[null,null,null]};e.prototype.toChannels=function(e){var r=this.channelMode;return e[r]().array().map((function(e){return Math.floor(e)}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{color:["handleColorChange"],format:["handleFormatChange"],scale:["handleScaleChange"],value:["handleValueChange"]}},enumerable:false,configurable:true});return e}();CalciteColorPicker.style=calciteColorPickerCss;var CSS$1={container:"container",preview:"preview",input:"input"};var calciteColorPickerHexInputCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:block}.container{width:100%;display:inline-grid;-ms-flex-align:center;align-items:center;grid-template-columns:1fr auto}.preview{grid-column:2/3;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;pointer-events:none;margin-top:0;margin-bottom:0;margin-left:0.25rem;margin-right:0.25rem;z-index:1}.preview,.input{grid-row:1}.input{grid-column:1/3;text-transform:uppercase;width:100%}";var DEFAULT_COLOR=color();var CalciteColorPickerHexInput=function(){function e(e){var r=this;registerInstance(this,e);this.calciteColorPickerHexInputChange=createEvent(this,"calciteColorPickerHexInputChange",7);this.allowEmpty=false;this.intlHex=TEXT.hex;this.intlNoColor=TEXT.noColor;this.scale="m";this.value=normalizeHex(DEFAULT_COLOR.hex());this.onCalciteInputBlur=function(e){var t=e.currentTarget;var a=t.value;var n="#"+a;var o=r.allowEmpty&&!a;if(o||isValidHex(n)&&isLonghandHex(n)){return}t.value=r.allowEmpty&&!r.internalColor?"":r.formatForInternalInput(rgbToHex(r.internalColor.object()))};this.onInputChange=function(e){var t=e.currentTarget;var a=t.value;var n;if(a){var o=a;var i=hexToRGB("#"+o);if(!i){return}n=normalizeHex(o)}else if(r.allowEmpty){n=null}r.value=n;r.calciteColorPickerHexInputChange.emit()};this.internalColor=DEFAULT_COLOR;this.previousNonNullValue=this.value;this.storeInputRef=function(e){r.inputNode=e}}e.prototype.connectedCallback=function(){var e=this,r=e.allowEmpty,t=e.value;if(t){var a=normalizeHex(t);if(isValidHex(a)){this.internalColor=color(a);this.value=a}return}if(r){this.internalColor=null;this.value=null}};e.prototype.handleValueChange=function(e,r){if(e){var t=normalizeHex(e);if(isValidHex(t)){var a=this.internalColor;var n=!a||t!==normalizeHex(a.hex());this.internalColor=color(t);this.previousNonNullValue=t;this.value=t;if(n){this.calciteColorPickerHexInputChange.emit()}return}}else if(this.allowEmpty){this.internalColor=null;this.value=null;this.calciteColorPickerHexInputChange.emit();return}this.value=r};e.prototype.onInputKeyDown=function(e){var r=e.altKey,t=e.ctrlKey,a=e.metaKey,n=e.shiftKey;var o=this,i=o.el,l=o.inputNode,s=o.internalColor,c=o.value;var h=getKey(e.key);var u=h==="ArrowDown"||h==="ArrowUp";if(u){if(!c){this.value=this.previousNonNullValue;e.preventDefault();return}var d=h==="ArrowUp"?1:-1;var v=n?10:1;this.value=normalizeHex(this.nudgeRGBChannels(s,v*d).hex());e.preventDefault();return}var f=r||t||a;var p=l.value.length>=6;var m=i.shadowRoot.activeElement;var g=m.selectionStart!=m.selectionEnd;var b=h.length===1;var y=hexChar.test(h);if(b&&!f&&(!y||!g&&p)){e.preventDefault()}};e.prototype.render=function(){var e=this,r=e.el,t=e.intlHex,a=e.value;var n=this.formatForInternalInput(a);var o=getElementDir(r);return h("div",{class:CSS$1.container},h("calcite-input",{class:CSS$1.input,dir:o,label:t,onCalciteInputBlur:this.onCalciteInputBlur,onChange:this.onInputChange,prefixText:"#",ref:this.storeInputRef,scale:this.scale,value:n}),n?h("calcite-color-picker-swatch",{active:true,class:CSS$1.preview,color:"#"+n,scale:this.scale}):null)};e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){focusElement(this.inputNode);return[2]}))}))};e.prototype.formatForInternalInput=function(e){return e?e.replace("#",""):""};e.prototype.nudgeRGBChannels=function(e,r){return color.rgb(e.array().map((function(e){return e+r})))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{value:["handleValueChange"]}},enumerable:false,configurable:true});return e}();CalciteColorPickerHexInput.style=calciteColorPickerHexInputCss;var CSS={swatch:"swatch",noColorIcon:"no-color-icon"};var COLORS={borderLight:"rgba(0, 0, 0, 0.15)",borderDark:"rgba(255, 255, 255, 0.15)"};var calciteColorPickerSwatchCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:-ms-inline-flexbox;display:inline-flex;position:relative}:host([scale=s]){height:1.25rem;width:1.25rem}:host([scale=m]){height:1.5rem;width:1.5rem}:host([scale=l]){height:2rem;width:2rem}.swatch{overflow:visible;height:inherit;width:inherit}.swatch rect{-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.no-color-icon{height:100%;width:100%;top:0;right:0;bottom:0;left:0;position:absolute}";var CalciteColorPickerSwatch=function(){function e(e){registerInstance(this,e);this.active=false;this.scale="m"}e.prototype.handleColorChange=function(e){this.internalColor=color(e)};e.prototype.componentWillLoad=function(){this.handleColorChange(this.color)};e.prototype.render=function(){var e=this,r=e.active,t=e.el,a=e.internalColor;var n=r?"100%":"0";var o=a.hex();var i=getThemeName(t);var l=i==="light"?COLORS.borderLight:COLORS.borderDark;return h("svg",{class:CSS.swatch,xmlns:"http://www.w3.org/2000/svg"},h("title",null,o),h("rect",{fill:o,height:"100%",id:"swatch",rx:n,stroke:l,"stroke-width":"2",style:{"clip-path":"inset(0 round "+n+")"},width:"100%"}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{color:["handleColorChange"]}},enumerable:false,configurable:true});return e}();CalciteColorPickerSwatch.style=calciteColorPickerSwatchCss;export{CalciteColorPicker as calcite_color_picker,CalciteColorPickerHexInput as calcite_color_picker_hex_input,CalciteColorPickerSwatch as calcite_color_picker_swatch};
1
+ var __awaiter=this&&this.__awaiter||function(e,r,t,a){function n(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,o){function i(e){try{s(a.next(e))}catch(e){o(e)}}function l(e){try{s(a["throw"](e))}catch(e){o(e)}}function s(e){e.done?t(e.value):n(e.value).then(i,l)}s((a=a.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},a,n,o,i;return i={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function l(e){return function(r){return s([e,r])}}function s(i){if(a)throw new TypeError("Generator is already executing.");while(t)try{if(a=1,n&&(o=i[0]&2?n["return"]:i[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;if(n=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:t.label++;return{value:i[1],done:false};case 5:t.label++;n=i[1];i=[0];continue;case 7:i=t.ops.pop();t.trys.pop();continue;default:if(!(o=t.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){t=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){t.label=i[1];break}if(i[0]===6&&t.label<o[1]){t.label=o[1];o=i;break}if(o&&t.label<o[2]){t.label=o[2];t.ops.push(i);break}if(o[2])t.ops.pop();t.trys.pop();continue}i=r.call(e,t)}catch(e){i=[6,e];n=0}finally{a=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,r){for(var t=0,a=r.length,n=e.length;t<a;t++,n++)e[n]=r[t];return e};
2
+ /*!
3
+ * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
4
+ * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
5
+ */import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-d653c37f.js";import{f as focusElement,g as getElementDir,C as CSS_UTILITY,b as getThemeName}from"./dom-70b0e988.js";import{n as normalizeHex,C as CSSColorMode,p as parseMode,c as colorEqual,i as isValidHex,a as isLonghandHex,r as rgbToHex,h as hexToRGB,b as hexChar}from"./utils-6beb0662.js";import{g as getKey}from"./key-69001a68.js";import{c as clamp}from"./math-250d4476.js";import{d as debounce,i as isObject}from"./debounce-79648d42.js";import"./guid-196bd5ea.js";var FUNC_ERROR_TEXT="Expected a function";function throttle(e,r,t){var a=true,n=true;if(typeof e!="function"){throw new TypeError(FUNC_ERROR_TEXT)}if(isObject(t)){a="leading"in t?!!t.leading:a;n="trailing"in t?!!t.trailing:n}return debounce(e,r,{leading:a,maxWait:r,trailing:n})}function createCommonjsModule(e,r,t){return t={path:r,exports:{},require:function(e,r){return commonjsRequire()}},e(t,t.exports),t.exports}function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var colorName$1={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};var isArrayish=function e(r){if(!r||typeof r==="string"){return false}return r instanceof Array||Array.isArray(r)||r.length>=0&&(r.splice instanceof Function||Object.getOwnPropertyDescriptor(r,r.length-1)&&r.constructor.name!=="String")};var simpleSwizzle=createCommonjsModule((function(e){var r=Array.prototype.concat;var t=Array.prototype.slice;var a=e.exports=function e(a){var n=[];for(var o=0,i=a.length;o<i;o++){var l=a[o];if(isArrayish(l)){n=r.call(n,t.call(l))}else{n.push(l)}}return n};a.wrap=function(e){return function(){return e(a(arguments))}}}));var colorString=createCommonjsModule((function(e){var r={};for(var t in colorName$1){if(colorName$1.hasOwnProperty(t)){r[colorName$1[t]]=t}}var a=e.exports={to:{},get:{}};a.get=function(e){var r=e.substring(0,3).toLowerCase();var t;var n;switch(r){case"hsl":t=a.get.hsl(e);n="hsl";break;case"hwb":t=a.get.hwb(e);n="hwb";break;default:t=a.get.rgb(e);n="rgb";break}if(!t){return null}return{model:n,value:t}};a.get.rgb=function(e){if(!e){return null}var r=/^#([a-f0-9]{3,4})$/i;var t=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i;var a=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/;var o=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/;var i=/(\D+)/;var l=[0,0,0,1];var s;var c;var h;if(s=e.match(t)){h=s[2];s=s[1];for(c=0;c<3;c++){var u=c*2;l[c]=parseInt(s.slice(u,u+2),16)}if(h){l[3]=parseInt(h,16)/255}}else if(s=e.match(r)){s=s[1];h=s[3];for(c=0;c<3;c++){l[c]=parseInt(s[c]+s[c],16)}if(h){l[3]=parseInt(h+h,16)/255}}else if(s=e.match(a)){for(c=0;c<3;c++){l[c]=parseInt(s[c+1],0)}if(s[4]){l[3]=parseFloat(s[4])}}else if(s=e.match(o)){for(c=0;c<3;c++){l[c]=Math.round(parseFloat(s[c+1])*2.55)}if(s[4]){l[3]=parseFloat(s[4])}}else if(s=e.match(i)){if(s[1]==="transparent"){return[0,0,0,0]}l=colorName$1[s[1]];if(!l){return null}l[3]=1;return l}else{return null}for(c=0;c<3;c++){l[c]=n(l[c],0,255)}l[3]=n(l[3],0,1);return l};a.get.hsl=function(e){if(!e){return null}var r=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?[\d\.]+)\s*)?\)$/;var t=e.match(r);if(t){var a=parseFloat(t[4]);var o=(parseFloat(t[1])+360)%360;var i=n(parseFloat(t[2]),0,100);var l=n(parseFloat(t[3]),0,100);var s=n(isNaN(a)?1:a,0,1);return[o,i,l,s]}return null};a.get.hwb=function(e){if(!e){return null}var r=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/;var t=e.match(r);if(t){var a=parseFloat(t[4]);var o=(parseFloat(t[1])%360+360)%360;var i=n(parseFloat(t[2]),0,100);var l=n(parseFloat(t[3]),0,100);var s=n(isNaN(a)?1:a,0,1);return[o,i,l,s]}return null};a.to.hex=function(){var e=simpleSwizzle(arguments);return"#"+o(e[0])+o(e[1])+o(e[2])+(e[3]<1?o(Math.round(e[3]*255)):"")};a.to.rgb=function(){var e=simpleSwizzle(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};a.to.rgb.percent=function(){var e=simpleSwizzle(arguments);var r=Math.round(e[0]/255*100);var t=Math.round(e[1]/255*100);var a=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+r+"%, "+t+"%, "+a+"%)":"rgba("+r+"%, "+t+"%, "+a+"%, "+e[3]+")"};a.to.hsl=function(){var e=simpleSwizzle(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};a.to.hwb=function(){var e=simpleSwizzle(arguments);var r="";if(e.length>=4&&e[3]!==1){r=", "+e[3]}return"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+r+")"};a.to.keyword=function(e){return r[e.slice(0,3)]};function n(e,r,t){return Math.min(Math.max(r,e),t)}function o(e){var r=e.toString(16).toUpperCase();return r.length<2?"0"+r:r}}));var colorName={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};var reverseKeywords={};for(var _i=0,_b=Object.keys(colorName);_i<_b.length;_i++){var key=_b[_i];reverseKeywords[colorName[key]]=key}var convert$1={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var conversions=convert$1;for(var _c=0,_d=Object.keys(convert$1);_c<_d.length;_c++){var model=_d[_c];if(!("channels"in convert$1[model])){throw new Error("missing channels property: "+model)}if(!("labels"in convert$1[model])){throw new Error("missing channel labels property: "+model)}if(convert$1[model].labels.length!==convert$1[model].channels){throw new Error("channel and label counts mismatch: "+model)}var _e=convert$1[model],channels=_e.channels,labels=_e.labels;delete convert$1[model].channels;delete convert$1[model].labels;Object.defineProperty(convert$1[model],"channels",{value:channels});Object.defineProperty(convert$1[model],"labels",{value:labels})}convert$1.rgb.hsl=function(e){var r=e[0]/255;var t=e[1]/255;var a=e[2]/255;var n=Math.min(r,t,a);var o=Math.max(r,t,a);var i=o-n;var l;var s;if(o===n){l=0}else if(r===o){l=(t-a)/i}else if(t===o){l=2+(a-r)/i}else if(a===o){l=4+(r-t)/i}l=Math.min(l*60,360);if(l<0){l+=360}var c=(n+o)/2;if(o===n){s=0}else if(c<=.5){s=i/(o+n)}else{s=i/(2-o-n)}return[l,s*100,c*100]};convert$1.rgb.hsv=function(e){var r;var t;var a;var n;var o;var i=e[0]/255;var l=e[1]/255;var s=e[2]/255;var c=Math.max(i,l,s);var h=c-Math.min(i,l,s);var u=function(e){return(c-e)/6/h+1/2};if(h===0){n=0;o=0}else{o=h/c;r=u(i);t=u(l);a=u(s);if(i===c){n=a-t}else if(l===c){n=1/3+r-a}else if(s===c){n=2/3+t-r}if(n<0){n+=1}else if(n>1){n-=1}}return[n*360,o*100,c*100]};convert$1.rgb.hwb=function(e){var r=e[0];var t=e[1];var a=e[2];var n=convert$1.rgb.hsl(e)[0];var o=1/255*Math.min(r,Math.min(t,a));a=1-1/255*Math.max(r,Math.max(t,a));return[n,o*100,a*100]};convert$1.rgb.cmyk=function(e){var r=e[0]/255;var t=e[1]/255;var a=e[2]/255;var n=Math.min(1-r,1-t,1-a);var o=(1-r-n)/(1-n)||0;var i=(1-t-n)/(1-n)||0;var l=(1-a-n)/(1-n)||0;return[o*100,i*100,l*100,n*100]};function comparativeDistance(e,r){return Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2)+Math.pow(e[2]-r[2],2)}convert$1.rgb.keyword=function(e){var r=reverseKeywords[e];if(r){return r}var t=Infinity;var a;for(var n=0,o=Object.keys(colorName);n<o.length;n++){var i=o[n];var l=colorName[i];var s=comparativeDistance(e,l);if(s<t){t=s;a=i}}return a};convert$1.keyword.rgb=function(e){return colorName[e]};convert$1.rgb.xyz=function(e){var r=e[0]/255;var t=e[1]/255;var a=e[2]/255;r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92;t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92;a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92;var n=r*.4124+t*.3576+a*.1805;var o=r*.2126+t*.7152+a*.0722;var i=r*.0193+t*.1192+a*.9505;return[n*100,o*100,i*100]};convert$1.rgb.lab=function(e){var r=convert$1.rgb.xyz(e);var t=r[0];var a=r[1];var n=r[2];t/=95.047;a/=100;n/=108.883;t=t>.008856?Math.pow(t,1/3):7.787*t+16/116;a=a>.008856?Math.pow(a,1/3):7.787*a+16/116;n=n>.008856?Math.pow(n,1/3):7.787*n+16/116;var o=116*a-16;var i=500*(t-a);var l=200*(a-n);return[o,i,l]};convert$1.hsl.rgb=function(e){var r=e[0]/360;var t=e[1]/100;var a=e[2]/100;var n;var o;var i;if(t===0){i=a*255;return[i,i,i]}if(a<.5){n=a*(1+t)}else{n=a+t-a*t}var l=2*a-n;var s=[0,0,0];for(var c=0;c<3;c++){o=r+1/3*-(c-1);if(o<0){o++}if(o>1){o--}if(6*o<1){i=l+(n-l)*6*o}else if(2*o<1){i=n}else if(3*o<2){i=l+(n-l)*(2/3-o)*6}else{i=l}s[c]=i*255}return s};convert$1.hsl.hsv=function(e){var r=e[0];var t=e[1]/100;var a=e[2]/100;var n=t;var o=Math.max(a,.01);a*=2;t*=a<=1?a:2-a;n*=o<=1?o:2-o;var i=(a+t)/2;var l=a===0?2*n/(o+n):2*t/(a+t);return[r,l*100,i*100]};convert$1.hsv.rgb=function(e){var r=e[0]/60;var t=e[1]/100;var a=e[2]/100;var n=Math.floor(r)%6;var o=r-Math.floor(r);var i=255*a*(1-t);var l=255*a*(1-t*o);var s=255*a*(1-t*(1-o));a*=255;switch(n){case 0:return[a,s,i];case 1:return[l,a,i];case 2:return[i,a,s];case 3:return[i,l,a];case 4:return[s,i,a];case 5:return[a,i,l]}};convert$1.hsv.hsl=function(e){var r=e[0];var t=e[1]/100;var a=e[2]/100;var n=Math.max(a,.01);var o;var i;i=(2-t)*a;var l=(2-t)*n;o=t*n;o/=l<=1?l:2-l;o=o||0;i/=2;return[r,o*100,i*100]};convert$1.hwb.rgb=function(e){var r=e[0]/360;var t=e[1]/100;var a=e[2]/100;var n=t+a;var o;if(n>1){t/=n;a/=n}var i=Math.floor(6*r);var l=1-a;o=6*r-i;if((i&1)!==0){o=1-o}var s=t+o*(l-t);var c;var h;var u;switch(i){default:case 6:case 0:c=l;h=s;u=t;break;case 1:c=s;h=l;u=t;break;case 2:c=t;h=l;u=s;break;case 3:c=t;h=s;u=l;break;case 4:c=s;h=t;u=l;break;case 5:c=l;h=t;u=s;break}return[c*255,h*255,u*255]};convert$1.cmyk.rgb=function(e){var r=e[0]/100;var t=e[1]/100;var a=e[2]/100;var n=e[3]/100;var o=1-Math.min(1,r*(1-n)+n);var i=1-Math.min(1,t*(1-n)+n);var l=1-Math.min(1,a*(1-n)+n);return[o*255,i*255,l*255]};convert$1.xyz.rgb=function(e){var r=e[0]/100;var t=e[1]/100;var a=e[2]/100;var n;var o;var i;n=r*3.2406+t*-1.5372+a*-.4986;o=r*-.9689+t*1.8758+a*.0415;i=r*.0557+t*-.204+a*1.057;n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*12.92;o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92;i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92;n=Math.min(Math.max(0,n),1);o=Math.min(Math.max(0,o),1);i=Math.min(Math.max(0,i),1);return[n*255,o*255,i*255]};convert$1.xyz.lab=function(e){var r=e[0];var t=e[1];var a=e[2];r/=95.047;t/=100;a/=108.883;r=r>.008856?Math.pow(r,1/3):7.787*r+16/116;t=t>.008856?Math.pow(t,1/3):7.787*t+16/116;a=a>.008856?Math.pow(a,1/3):7.787*a+16/116;var n=116*t-16;var o=500*(r-t);var i=200*(t-a);return[n,o,i]};convert$1.lab.xyz=function(e){var r=e[0];var t=e[1];var a=e[2];var n;var o;var i;o=(r+16)/116;n=t/500+o;i=o-a/200;var l=Math.pow(o,3);var s=Math.pow(n,3);var c=Math.pow(i,3);o=l>.008856?l:(o-16/116)/7.787;n=s>.008856?s:(n-16/116)/7.787;i=c>.008856?c:(i-16/116)/7.787;n*=95.047;o*=100;i*=108.883;return[n,o,i]};convert$1.lab.lch=function(e){var r=e[0];var t=e[1];var a=e[2];var n;var o=Math.atan2(a,t);n=o*360/2/Math.PI;if(n<0){n+=360}var i=Math.sqrt(t*t+a*a);return[r,i,n]};convert$1.lch.lab=function(e){var r=e[0];var t=e[1];var a=e[2];var n=a/360*2*Math.PI;var o=t*Math.cos(n);var i=t*Math.sin(n);return[r,o,i]};convert$1.rgb.ansi16=function(e,r){if(r===void 0){r=null}var t=e[0],a=e[1],n=e[2];var o=r===null?convert$1.rgb.hsv(e)[2]:r;o=Math.round(o/50);if(o===0){return 30}var i=30+(Math.round(n/255)<<2|Math.round(a/255)<<1|Math.round(t/255));if(o===2){i+=60}return i};convert$1.hsv.ansi16=function(e){return convert$1.rgb.ansi16(convert$1.hsv.rgb(e),e[2])};convert$1.rgb.ansi256=function(e){var r=e[0];var t=e[1];var a=e[2];if(r===t&&t===a){if(r<8){return 16}if(r>248){return 231}return Math.round((r-8)/247*24)+232}var n=16+36*Math.round(r/255*5)+6*Math.round(t/255*5)+Math.round(a/255*5);return n};convert$1.ansi16.rgb=function(e){var r=e%10;if(r===0||r===7){if(e>50){r+=3.5}r=r/10.5*255;return[r,r,r]}var t=(~~(e>50)+1)*.5;var a=(r&1)*t*255;var n=(r>>1&1)*t*255;var o=(r>>2&1)*t*255;return[a,n,o]};convert$1.ansi256.rgb=function(e){if(e>=232){var r=(e-232)*10+8;return[r,r,r]}e-=16;var t;var a=Math.floor(e/36)/5*255;var n=Math.floor((t=e%36)/6)/5*255;var o=t%6/5*255;return[a,n,o]};convert$1.rgb.hex=function(e){var r=((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255);var t=r.toString(16).toUpperCase();return"000000".substring(t.length)+t};convert$1.hex.rgb=function(e){var r=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!r){return[0,0,0]}var t=r[0];if(r[0].length===3){t=t.split("").map((function(e){return e+e})).join("")}var a=parseInt(t,16);var n=a>>16&255;var o=a>>8&255;var i=a&255;return[n,o,i]};convert$1.rgb.hcg=function(e){var r=e[0]/255;var t=e[1]/255;var a=e[2]/255;var n=Math.max(Math.max(r,t),a);var o=Math.min(Math.min(r,t),a);var i=n-o;var l;var s;if(i<1){l=o/(1-i)}else{l=0}if(i<=0){s=0}else if(n===r){s=(t-a)/i%6}else if(n===t){s=2+(a-r)/i}else{s=4+(r-t)/i}s/=6;s%=1;return[s*360,i*100,l*100]};convert$1.hsl.hcg=function(e){var r=e[1]/100;var t=e[2]/100;var a=t<.5?2*r*t:2*r*(1-t);var n=0;if(a<1){n=(t-.5*a)/(1-a)}return[e[0],a*100,n*100]};convert$1.hsv.hcg=function(e){var r=e[1]/100;var t=e[2]/100;var a=r*t;var n=0;if(a<1){n=(t-a)/(1-a)}return[e[0],a*100,n*100]};convert$1.hcg.rgb=function(e){var r=e[0]/360;var t=e[1]/100;var a=e[2]/100;if(t===0){return[a*255,a*255,a*255]}var n=[0,0,0];var o=r%1*6;var i=o%1;var l=1-i;var s=0;switch(Math.floor(o)){case 0:n[0]=1;n[1]=i;n[2]=0;break;case 1:n[0]=l;n[1]=1;n[2]=0;break;case 2:n[0]=0;n[1]=1;n[2]=i;break;case 3:n[0]=0;n[1]=l;n[2]=1;break;case 4:n[0]=i;n[1]=0;n[2]=1;break;default:n[0]=1;n[1]=0;n[2]=l}s=(1-t)*a;return[(t*n[0]+s)*255,(t*n[1]+s)*255,(t*n[2]+s)*255]};convert$1.hcg.hsv=function(e){var r=e[1]/100;var t=e[2]/100;var a=r+t*(1-r);var n=0;if(a>0){n=r/a}return[e[0],n*100,a*100]};convert$1.hcg.hsl=function(e){var r=e[1]/100;var t=e[2]/100;var a=t*(1-r)+.5*r;var n=0;if(a>0&&a<.5){n=r/(2*a)}else if(a>=.5&&a<1){n=r/(2*(1-a))}return[e[0],n*100,a*100]};convert$1.hcg.hwb=function(e){var r=e[1]/100;var t=e[2]/100;var a=r+t*(1-r);return[e[0],(a-r)*100,(1-a)*100]};convert$1.hwb.hcg=function(e){var r=e[1]/100;var t=e[2]/100;var a=1-t;var n=a-r;var o=0;if(n<1){o=(a-n)/(1-n)}return[e[0],n*100,o*100]};convert$1.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};convert$1.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};convert$1.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};convert$1.gray.hsl=function(e){return[0,0,e[0]]};convert$1.gray.hsv=convert$1.gray.hsl;convert$1.gray.hwb=function(e){return[0,100,e[0]]};convert$1.gray.cmyk=function(e){return[0,0,0,e[0]]};convert$1.gray.lab=function(e){return[e[0],0,0]};convert$1.gray.hex=function(e){var r=Math.round(e[0]/100*255)&255;var t=(r<<16)+(r<<8)+r;var a=t.toString(16).toUpperCase();return"000000".substring(a.length)+a};convert$1.rgb.gray=function(e){var r=(e[0]+e[1]+e[2])/3;return[r/255*100]};function buildGraph(){var e={};var r=Object.keys(conversions);for(var t=r.length,a=0;a<t;a++){e[r[a]]={distance:-1,parent:null}}return e}function deriveBFS(e){var r=buildGraph();var t=[e];r[e].distance=0;while(t.length){var a=t.pop();var n=Object.keys(conversions[a]);for(var o=n.length,i=0;i<o;i++){var l=n[i];var s=r[l];if(s.distance===-1){s.distance=r[a].distance+1;s.parent=a;t.unshift(l)}}}return r}function link(e,r){return function(t){return r(e(t))}}function wrapConversion(e,r){var t=[r[e].parent,e];var a=conversions[r[e].parent][e];var n=r[e].parent;while(r[n].parent){t.unshift(r[n].parent);a=link(conversions[r[n].parent][n],a);n=r[n].parent}a.conversion=t;return a}var route=function(e){var r=deriveBFS(e);var t={};var a=Object.keys(r);for(var n=a.length,o=0;o<n;o++){var i=a[o];var l=r[i];if(l.parent===null){continue}t[i]=wrapConversion(i,r)}return t};var convert={};var models=Object.keys(conversions);function wrapRaw(e){var r=function(){var r=[];for(var t=0;t<arguments.length;t++){r[t]=arguments[t]}var a=r[0];if(a===undefined||a===null){return a}if(a.length>1){r=a}return e(r)};if("conversion"in e){r.conversion=e.conversion}return r}function wrapRounded(e){var r=function(){var r=[];for(var t=0;t<arguments.length;t++){r[t]=arguments[t]}var a=r[0];if(a===undefined||a===null){return a}if(a.length>1){r=a}var n=e(r);if(typeof n==="object"){for(var o=n.length,i=0;i<o;i++){n[i]=Math.round(n[i])}}return n};if("conversion"in e){r.conversion=e.conversion}return r}models.forEach((function(e){convert[e]={};Object.defineProperty(convert[e],"channels",{value:conversions[e].channels});Object.defineProperty(convert[e],"labels",{value:conversions[e].labels});var r=route(e);var t=Object.keys(r);t.forEach((function(t){var a=r[t];convert[e][t]=wrapRounded(a);convert[e][t].raw=wrapRaw(a)}))}));var colorConvert=convert;var _slice=[].slice;var skippedModels=["keyword","gray","hex"];var hashedModelKeys={};for(var _f=0,_g=Object.keys(colorConvert);_f<_g.length;_f++){var model=_g[_f];hashedModelKeys[_slice.call(colorConvert[model].labels).sort().join("")]=model}var limiters={};function Color(e,r){if(!(this instanceof Color)){return new Color(e,r)}if(r&&r in skippedModels){r=null}if(r&&!(r in colorConvert)){throw new Error("Unknown model: "+r)}var t;var a;if(e==null){this.model="rgb";this.color=[0,0,0];this.valpha=1}else if(e instanceof Color){this.model=e.model;this.color=e.color.slice();this.valpha=e.valpha}else if(typeof e==="string"){var n=colorString.get(e);if(n===null){throw new Error("Unable to parse color from string: "+e)}this.model=n.model;a=colorConvert[this.model].channels;this.color=n.value.slice(0,a);this.valpha=typeof n.value[a]==="number"?n.value[a]:1}else if(e.length>0){this.model=r||"rgb";a=colorConvert[this.model].channels;var o=_slice.call(e,0,a);this.color=zeroArray(o,a);this.valpha=typeof e[a]==="number"?e[a]:1}else if(typeof e==="number"){this.model="rgb";this.color=[e>>16&255,e>>8&255,e&255];this.valpha=1}else{this.valpha=1;var i=Object.keys(e);if("alpha"in e){i.splice(i.indexOf("alpha"),1);this.valpha=typeof e.alpha==="number"?e.alpha:0}var l=i.sort().join("");if(!(l in hashedModelKeys)){throw new Error("Unable to parse color from object: "+JSON.stringify(e))}this.model=hashedModelKeys[l];var s=colorConvert[this.model].labels;var c=[];for(t=0;t<s.length;t++){c.push(e[s[t]])}this.color=zeroArray(c)}if(limiters[this.model]){a=colorConvert[this.model].channels;for(t=0;t<a;t++){var h=limiters[this.model][t];if(h){this.color[t]=h(this.color[t])}}}this.valpha=Math.max(0,Math.min(1,this.valpha));if(Object.freeze){Object.freeze(this)}}Color.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(e){var r=this.model in colorString.to?this:this.rgb();r=r.round(typeof e==="number"?e:1);var t=r.valpha===1?r.color:r.color.concat(this.valpha);return colorString.to[r.model](t)},percentString:function(e){var r=this.rgb().round(typeof e==="number"?e:1);var t=r.valpha===1?r.color:r.color.concat(this.valpha);return colorString.to.rgb.percent(t)},array:function(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object:function(){var e={};var r=colorConvert[this.model].channels;var t=colorConvert[this.model].labels;for(var a=0;a<r;a++){e[t[a]]=this.color[a]}if(this.valpha!==1){e.alpha=this.valpha}return e},unitArray:function(){var e=this.rgb().color;e[0]/=255;e[1]/=255;e[2]/=255;if(this.valpha!==1){e.push(this.valpha)}return e},unitObject:function(){var e=this.rgb().object();e.r/=255;e.g/=255;e.b/=255;if(this.valpha!==1){e.alpha=this.valpha}return e},round:function(e){e=Math.max(e||0,0);return new Color(this.color.map(roundToPlace(e)).concat(this.valpha),this.model)},alpha:function(e){if(arguments.length>0){return new Color(this.color.concat(Math.max(0,Math.min(1,e))),this.model)}return this.valpha},red:getset("rgb",0,maxfn(255)),green:getset("rgb",1,maxfn(255)),blue:getset("rgb",2,maxfn(255)),hue:getset(["hsl","hsv","hsl","hwb","hcg"],0,(function(e){return(e%360+360)%360})),saturationl:getset("hsl",1,maxfn(100)),lightness:getset("hsl",2,maxfn(100)),saturationv:getset("hsv",1,maxfn(100)),value:getset("hsv",2,maxfn(100)),chroma:getset("hcg",1,maxfn(100)),gray:getset("hcg",2,maxfn(100)),white:getset("hwb",1,maxfn(100)),wblack:getset("hwb",2,maxfn(100)),cyan:getset("cmyk",0,maxfn(100)),magenta:getset("cmyk",1,maxfn(100)),yellow:getset("cmyk",2,maxfn(100)),black:getset("cmyk",3,maxfn(100)),x:getset("xyz",0,maxfn(100)),y:getset("xyz",1,maxfn(100)),z:getset("xyz",2,maxfn(100)),l:getset("lab",0,maxfn(100)),a:getset("lab",1),b:getset("lab",2),keyword:function(e){if(arguments.length>0){return new Color(e)}return colorConvert[this.model].keyword(this.color)},hex:function(e){if(arguments.length>0){return new Color(e)}return colorString.to.hex(this.rgb().round().color)},rgbNumber:function(){var e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity:function(){var e=this.rgb().color;var r=[];for(var t=0,a=e.entries();t<a.length;t++){var n=a[t],o=n[0],i=n[1];var l=i/255;r[o]=l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4)}return.2126*r[0]+.7152*r[1]+.0722*r[2]},contrast:function(e){var r=this.luminosity();var t=e.luminosity();if(r>t){return(r+.05)/(t+.05)}return(t+.05)/(r+.05)},level:function(e){var r=this.contrast(e);if(r>=7.1){return"AAA"}return r>=4.5?"AA":""},isDark:function(){var e=this.rgb().color;var r=(e[0]*299+e[1]*587+e[2]*114)/1e3;return r<128},isLight:function(){return!this.isDark()},negate:function(){var e=this.rgb();for(var r=0;r<3;r++){e.color[r]=255-e.color[r]}return e},lighten:function(e){var r=this.hsl();r.color[2]+=r.color[2]*e;return r},darken:function(e){var r=this.hsl();r.color[2]-=r.color[2]*e;return r},saturate:function(e){var r=this.hsl();r.color[1]+=r.color[1]*e;return r},desaturate:function(e){var r=this.hsl();r.color[1]-=r.color[1]*e;return r},whiten:function(e){var r=this.hwb();r.color[1]+=r.color[1]*e;return r},blacken:function(e){var r=this.hwb();r.color[2]+=r.color[2]*e;return r},grayscale:function(){var e=this.rgb().color;var r=e[0]*.3+e[1]*.59+e[2]*.11;return Color.rgb(r,r,r)},fade:function(e){return this.alpha(this.valpha-this.valpha*e)},opaquer:function(e){return this.alpha(this.valpha+this.valpha*e)},rotate:function(e){var r=this.hsl();var t=r.color[0];t=(t+e)%360;t=t<0?360+t:t;r.color[0]=t;return r},mix:function(e,r){if(!e||!e.rgb){throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e)}var t=e.rgb();var a=this.rgb();var n=r===undefined?.5:r;var o=2*n-1;var i=t.alpha()-a.alpha();var l=((o*i===-1?o:(o+i)/(1+o*i))+1)/2;var s=1-l;return Color.rgb(l*t.red()+s*a.red(),l*t.green()+s*a.green(),l*t.blue()+s*a.blue(),t.alpha()*n+a.alpha()*(1-n))}};var _loop_1=function(e){if(skippedModels.includes(e)){return"continue"}var r=colorConvert[e].channels;Color.prototype[e]=function(){if(this.model===e){return new Color(this)}if(arguments.length>0){return new Color(arguments,e)}var t=typeof arguments[r]==="number"?r:this.valpha;return new Color(assertArray(colorConvert[this.model][e].raw(this.color)).concat(t),e)};Color[e]=function(t){if(typeof t==="number"){t=zeroArray(_slice.call(arguments),r)}return new Color(t,e)}};for(var _h=0,_j=Object.keys(colorConvert);_h<_j.length;_h++){var model=_j[_h];_loop_1(model)}function roundTo(e,r){return Number(e.toFixed(r))}function roundToPlace(e){return function(r){return roundTo(r,e)}}function getset(e,r,t){e=Array.isArray(e)?e:[e];for(var a=0,n=e;a<n.length;a++){var o=n[a];(limiters[o]||(limiters[o]=[]))[r]=t}e=e[0];return function(a){var n;if(arguments.length>0){if(t){a=t(a)}n=this[e]();n.color[r]=a;return n}n=this[e]().color[r];if(t){n=t(n)}return n}}function maxfn(e){return function(r){return Math.max(0,Math.min(e,r))}}function assertArray(e){return Array.isArray(e)?e:[e]}function zeroArray(e,r){for(var t=0;t<r;t++){if(typeof e[t]!=="number"){e[t]=0}}return e}var color=Color;var CSS$2={container:"container",controlSection:"control-section",hexOptions:"color-hex-options",section:"section",header:"header",control:"control",splitSection:"section--split",colorModeContainer:"color-mode-container",colorMode:"color-mode",channels:"channels",channel:"channel",savedColors:"saved-colors",savedColorsSection:"saved-colors-section",saveColor:"save-color",deleteColor:"delete-color",savedColorsButtons:"saved-colors-buttons",headerHex:"header--hex",colorFieldAndSlider:"color-field-and-slider",colorFieldAndSliderInteractive:"color-field-and-slider--interactive",colorFieldAndSliderWrap:"color-field-and-slider-wrap",scope:"scope",hueScope:"scope--hue",colorFieldScope:"scope--color-field",savedColor:"saved-color"};var DEFAULT_COLOR$1=color("#007AC2");var DEFAULT_STORAGE_KEY_PREFIX="calcite-color-";var RGB_LIMITS={r:255,g:255,b:255};var HSV_LIMITS={h:360,s:100,v:100};var TEXT={b:"B",blue:"Blue",deleteColor:"Delete color",g:"G",green:"Green",h:"H",hsv:"HSV",hex:"Hex",hue:"Hue",noColor:"No color",r:"R",red:"Red",rgb:"RGB",s:"S",saturation:"Saturation",saveColor:"Save color",saved:"Saved",v:"V",value:"Value"};var DIMENSIONS={s:{slider:{height:10,width:160},colorField:{height:80,width:160},thumb:{radius:8}},m:{slider:{height:14,width:272},colorField:{height:150,width:272},thumb:{radius:10}},l:{slider:{height:16,width:464},colorField:{height:200,width:464},thumb:{radius:12}}};var calciteColorPickerCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:inline-block;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-normal)}:host([scale=s]) .container{width:160px}:host([scale=s]) .saved-colors{grid-template-columns:repeat(auto-fill, minmax(20px, 1fr))}:host([scale=s]) .channels{-ms-flex-direction:column;flex-direction:column}:host([scale=s]) .channel{width:100%;margin-bottom:4px}:host([scale=s]) .channel:last-child{margin-bottom:0}:host([scale=m]) .container{width:272px}:host([scale=l]) .control-section.section.calcite--rtl>:nth-child(2){margin-left:0;margin-right:12px}:host([scale=l]) .header{padding-bottom:0}:host([scale=l]){font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]) .container{width:464px}:host([scale=l]) .color-field-and-slider{margin-bottom:-20px}:host([scale=l]) .section{padding:0 16px 16px}:host([scale=l]) .section:first-of-type{padding-top:16px}:host([scale=l]) .saved-colors{grid-template-columns:repeat(auto-fill, minmax(28px, 1fr));grid-gap:12px;padding-top:16px}:host([scale=l]) .control-section{-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-align:baseline;align-items:baseline}:host([scale=l]) .control-section>:nth-child(2){margin-left:12px}:host([scale=l]) .color-hex-options{-ms-flex-negative:1;flex-shrink:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:distribute;justify-content:space-around;min-height:98px;width:160px}:host([scale=l]) .color-mode-container{-ms-flex-negative:3;flex-shrink:3}:host([appearance=minimal]) .container{border:none}.container{background-color:var(--calcite-ui-foreground-1);display:inline-block;border:1px solid var(--calcite-ui-border-1)}.color-field-and-slider-wrap{position:relative}.scope{font-size:var(--calcite-font-size--1);padding:0;margin-bottom:0;margin-right:0;outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;width:0.5rem;height:0.5rem;position:absolute;pointer-events:none;margin-top:-0.25rem;margin-left:-0.25rem;outline-offset:10px}.scope:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px;outline-offset:12px}.color-field-and-slider{margin-bottom:-16px}.color-field-and-slider--interactive{cursor:pointer}.control-section{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}.section{padding:0 12px 12px}.section:first-of-type{padding-top:12px}.color-hex-options,.section--split{-ms-flex-positive:1;flex-grow:1}.header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;color:var(--calcite-ui-text-1);padding-bottom:0.25rem}.header--hex,.color-mode-container{padding-top:12px}.channels{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.channel{width:31%}.saved-colors{padding-top:12px;display:grid;grid-template-columns:repeat(auto-fill, minmax(24px, 1fr));grid-gap:8px;width:100%}.saved-colors-buttons{display:-ms-flexbox;display:flex}.saved-color{outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;cursor:pointer}.saved-color:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.saved-color:hover{-webkit-transition:outline-color 100ms ease-in-out;transition:outline-color 100ms ease-in-out;outline:2px solid var(--calcite-ui-border-2);outline-offset:2px}";var throttleFor60FpsInMs=16;var defaultValue=normalizeHex(DEFAULT_COLOR$1.hex());var defaultFormat="auto";var CalciteColorPicker=function(){function e(e){var r=this;registerInstance(this,e);this.calciteColorPickerChange=createEvent(this,"calciteColorPickerChange",7);this.calciteColorPickerInput=createEvent(this,"calciteColorPickerInput",7);this.allowEmpty=false;this.appearance="default";this.color=DEFAULT_COLOR$1;this.format=defaultFormat;this.hideHex=false;this.hideChannels=false;this.hideSaved=false;this.intlB=TEXT.b;this.intlBlue=TEXT.blue;this.intlDeleteColor=TEXT.deleteColor;this.intlG=TEXT.g;this.intlGreen=TEXT.green;this.intlH=TEXT.h;this.intlHsv=TEXT.hsv;this.intlHex=TEXT.hex;this.intlHue=TEXT.hue;this.intlNoColor=TEXT.noColor;this.intlR=TEXT.r;this.intlRed=TEXT.red;this.intlRgb=TEXT.rgb;this.intlS=TEXT.s;this.intlSaturation=TEXT.saturation;this.intlSaveColor=TEXT.saveColor;this.intlSaved=TEXT.saved;this.intlV=TEXT.v;this.intlValue=TEXT.value;this.scale="m";this.value=defaultValue;this.colorUpdateLocked=false;this.colorFieldAndSliderHovered=false;this.hueThumbState="idle";this.mode=CSSColorMode.HEX;this.shiftKeyChannelAdjustment=0;this.sliderThumbState="idle";this.colorFieldAndSliderInteractive=false;this.channelMode="rgb";this.channels=this.toChannels(DEFAULT_COLOR$1);this.dimensions=DIMENSIONS.m;this.savedColors=[];this.handleTabActivate=function(e){r.channelMode=e.currentTarget.getAttribute("data-color-mode");r.updateChannelsFromColor(r.color)};this.handleColorFieldScopeKeyDown=function(e){var t=getKey(e.key);var a={ArrowUp:{x:0,y:-10},ArrowRight:{x:10,y:0},ArrowDown:{x:0,y:10},ArrowLeft:{x:-10,y:0}};if(a[t]){e.preventDefault();r.scopeOrientation=t==="ArrowDown"||t==="ArrowUp"?"vertical":"horizontal";r.captureColorFieldColor(r.colorFieldScopeLeft+a[t].x||0,r.colorFieldScopeTop+a[t].y||0,false)}};this.handleHueScopeKeyDown=function(e){var t=e.shiftKey?10:1;var a=getKey(e.key);var n={ArrowUp:1,ArrowRight:1,ArrowDown:-1,ArrowLeft:-1};if(n[a]){e.preventDefault();var o=n[a]*t;var i=r.baseColorFieldColor.hue();var l=r.baseColorFieldColor.hue(i+o);r.internalColorSet(l,false)}};this.handleHexInputChange=function(e){e.stopPropagation();var t=r,a=t.allowEmpty,n=t.color;var o=e.target;var i=o.value;if(a&&!i){r.internalColorSet(null);return}var l=n&&normalizeHex(n.hex());if(i!==l){r.internalColorSet(color(i))}};this.handleSavedColorSelect=function(e){var t=e.currentTarget;r.internalColorSet(color(t.color))};this.handleChannelInput=function(e){var t=e.currentTarget;var a=e.detail.nativeEvent.target;var n=Number(t.getAttribute("data-channel-index"));var o=r.channelMode==="rgb"?RGB_LIMITS[Object.keys(RGB_LIMITS)[n]]:HSV_LIMITS[Object.keys(HSV_LIMITS)[n]];var i;if(r.allowEmpty&&!t.value){i=""}else{var l=Number(t.value)+r.shiftKeyChannelAdjustment;var s=clamp(l,0,o);i=s.toString()}t.value=i;a.value=i};this.handleChannelChange=function(e){var t=e.currentTarget;var a=Number(t.getAttribute("data-channel-index"));var n=__spreadArray([],r.channels);var o=r.allowEmpty&&!t.value;if(o){r.channels=[null,null,null];r.internalColorSet(null);return}n[a]=Number(t.value);r.updateColorFromChannels(n)};this.handleSavedColorKeyDown=function(e){if(e.key===" "||e.key==="Enter"){e.preventDefault();e.stopPropagation();r.handleSavedColorSelect(e)}};this.handleColorFieldAndSliderMouseLeave=function(){r.colorFieldAndSliderInteractive=false;r.colorFieldAndSliderHovered=false;if(r.sliderThumbState!=="drag"&&r.hueThumbState!=="drag"){r.hueThumbState="idle";r.sliderThumbState="idle";r.drawColorFieldAndSlider()}};this.handleColorFieldAndSliderMouseDown=function(e){var t=e.offsetX,a=e.offsetY;var n=r.getCanvasRegion(a);if(n==="color-field"){r.hueThumbState="drag";r.captureColorFieldColor(t,a)}else if(n==="slider"){r.sliderThumbState="drag";r.captureHueSliderColor(t)}e.preventDefault();document.addEventListener("mousemove",r.globalMouseMoveHandler);document.addEventListener("mouseup",r.globalMouseUpHandler,{once:true});r.activeColorFieldAndSliderRect=r.fieldAndSliderRenderingContext.canvas.getBoundingClientRect()};this.globalMouseUpHandler=function(){var e=r.sliderThumbState==="drag"||r.hueThumbState==="drag";r.hueThumbState="idle";r.sliderThumbState="idle";r.activeColorFieldAndSliderRect=null;r.drawColorFieldAndSlider();if(e){r.calciteColorPickerChange.emit()}};this.globalMouseMoveHandler=function(e){var t=r,a=t.el,n=t.dimensions;var o=r.sliderThumbState==="drag";var i=r.hueThumbState==="drag";if(!a.isConnected||!o&&!i){return}var l;var s;var c=r.activeColorFieldAndSliderRect;var h=e.clientX,u=e.clientY;if(r.colorFieldAndSliderHovered){l=h-c.x;s=u-c.y}else{var d=n.colorField.width;var v=n.colorField.height;var f=n.slider.height;if(h<c.x+d&&h>c.x){l=h-c.x}else if(h<c.x){l=0}else{l=d}if(u<c.y+v+f&&u>c.y){s=u-c.y}else if(u<c.y){s=0}else{s=v+f}}if(i){r.captureColorFieldColor(l,s,false)}else{r.captureHueSliderColor(l)}};this.handleColorFieldAndSliderMouseEnterOrMove=function(e){var t=e.offsetX,a=e.offsetY;var n=r.dimensions,o=n.colorField,i=n.slider,l=n.thumb;r.colorFieldAndSliderInteractive=a<=o.height+i.height;r.colorFieldAndSliderHovered=true;var s=r.getCanvasRegion(a);if(s==="color-field"){var c=r.hueThumbState;var h=r.baseColorFieldColor.hsv();var u=Math.round(h.saturationv()/(HSV_LIMITS.s/o.width));var d=Math.round(o.height-h.value()/(HSV_LIMITS.v/o.height));var v=r.containsPoint(t,a,u,d,l.radius);var f=false;if(c==="idle"&&v){r.hueThumbState="hover";f=true}else if(c==="hover"&&!v){r.hueThumbState="idle";f=true}if(r.hueThumbState!=="drag"){if(f){r.drawColorFieldAndSlider()}}}else if(s==="slider"){var p=r.baseColorFieldColor.hsv().saturationv(100).value(100);var m=r.sliderThumbState;var g=Math.round(p.hue()/(360/i.width));var b=Math.round((i.height+r.getSliderCapSpacing())/2)+o.height;var y=r.containsPoint(t,a,g,b,l.radius);var w=false;if(m==="idle"&&y){r.sliderThumbState="hover";w=true}else if(m==="hover"&&!y){r.sliderThumbState="idle";w=true}if(r.sliderThumbState!=="drag"){if(w){r.drawColorFieldAndSlider()}}}};this.storeColorFieldScope=function(e){r.colorFieldScopeNode=e};this.renderChannelsTabTitle=function(e){var t=r,a=t.channelMode,n=t.intlRgb,o=t.intlHsv;var i=e===a;var l=e==="rgb"?n:o;return h("calcite-tab-title",{active:i,class:CSS$2.colorMode,"data-color-mode":e,key:e,onCalciteTabsActivate:r.handleTabActivate},l)};this.renderChannelsTab=function(e){var t=r,a=t.channelMode,n=t.channels,o=t.intlB,i=t.intlBlue,l=t.intlG,s=t.intlGreen,c=t.intlH,u=t.intlHue,d=t.intlR,v=t.intlRed,f=t.intlS,p=t.intlSaturation,m=t.intlV,g=t.intlValue;var b=e===a;var y=e==="rgb";var w=y?[d,l,o]:[c,f,m];var C=y?[v,s,i]:[u,p,g];return h("calcite-tab",{active:b,class:CSS$2.control,key:e},h("div",{class:CSS$2.channels},n.map((function(e,t){return r.renderChannel(e,t,w[t],C[t])}))))};this.renderChannel=function(e,t,a,n){return h("calcite-input",{class:CSS$2.channel,"data-channel-index":t,label:n,numberButtonType:"none",onCalciteInputChange:r.handleChannelChange,onCalciteInputInput:r.handleChannelInput,prefixText:a,scale:r.scale==="l"?"m":"s",type:"number",value:e===null||e===void 0?void 0:e.toString()})};this.deleteColor=function(){var e=r.color.hex();var t=r.savedColors.indexOf(e)>-1;if(!t){return}var a=r.savedColors.filter((function(r){return r!==e}));r.savedColors=a;var n=""+DEFAULT_STORAGE_KEY_PREFIX+r.storageId;if(r.storageId){localStorage.setItem(n,JSON.stringify(a))}};this.saveColor=function(){var e=r.color.hex();var t=r.savedColors.indexOf(e)>-1;if(t){return}var a=__spreadArray(__spreadArray([],r.savedColors),[e]);r.savedColors=a;var n=""+DEFAULT_STORAGE_KEY_PREFIX+r.storageId;if(r.storageId){localStorage.setItem(n,JSON.stringify(a))}};this.drawColorFieldAndSlider=throttle((function(){if(!r.fieldAndSliderRenderingContext){return}r.drawColorField();r.drawHueSlider()}),throttleFor60FpsInMs);this.captureColorFieldColor=function(e,t,a){if(a===void 0){a=true}var n=r.dimensions.colorField,o=n.height,i=n.width;var l=Math.round(HSV_LIMITS.s/i*e);var s=Math.round(HSV_LIMITS.v/o*(o-t));r.internalColorSet(r.baseColorFieldColor.hsv().saturationv(l).value(s),a)};this.initColorFieldAndSlider=function(e){r.fieldAndSliderRenderingContext=e.getContext("2d");r.setCanvasContextSize(e,{width:r.dimensions.colorField.width,height:r.dimensions.colorField.height+r.dimensions.slider.height+r.getSliderCapSpacing()*2});r.drawColorFieldAndSlider()}}e.prototype.handleColorChange=function(e,r){this.drawColorFieldAndSlider();this.updateChannelsFromColor(e);this.previousColor=r;if(this.colorUpdateLocked){return}this.value=this.toValue(e)};e.prototype.handleFormatChange=function(e){this.setMode(e);this.value=this.toValue(this.color)};e.prototype.handleScaleChange=function(e){if(e===void 0){e="m"}this.updateDimensions(e)};e.prototype.handleValueChange=function(e,r){var t=this,a=t.allowEmpty,n=t.format;var o=!a||e;var i=false;if(o){var l=parseMode(e);if(!l||n!=="auto"&&l!==n){this.showIncompatibleColorWarning(e,n);this.value=r;return}i=this.mode!==l;this.setMode(l)}var s=this.sliderThumbState==="drag"||this.hueThumbState==="drag";if(this.colorUpdateLocked){this.calciteColorPickerInput.emit();if(!s){this.calciteColorPickerChange.emit()}return}var c=a&&!e?null:color(e);var h=!colorEqual(c,this.color);if(i||h){this.color=c;this.calciteColorPickerInput.emit();if(!s){this.calciteColorPickerChange.emit()}}};Object.defineProperty(e.prototype,"baseColorFieldColor",{get:function(){return this.color||this.previousColor||DEFAULT_COLOR$1},enumerable:false,configurable:true});e.prototype.handleChannelKeyUpOrDown=function(e){this.shiftKeyChannelAdjustment=0;var r=getKey(e.key);if(r!=="ArrowUp"&&r!=="ArrowDown"||!e.composedPath().some((function(e){var r;return(r=e.classList)===null||r===void 0?void 0:r.contains(CSS$2.channel)}))){return}var t=e.shiftKey;e.preventDefault();if(!this.color){this.internalColorSet(this.previousColor);e.stopPropagation();return}var a=9;this.shiftKeyChannelAdjustment=r==="ArrowUp"&&t?a:r==="ArrowDown"&&t?-a:0};e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,focusElement(this.colorFieldScopeNode)]}))}))};e.prototype.componentWillLoad=function(){var e=""+DEFAULT_STORAGE_KEY_PREFIX+this.storageId;if(this.storageId&&localStorage.getItem(e)){this.savedColors=JSON.parse(localStorage.getItem(e))}};e.prototype.connectedCallback=function(){var e=this,r=e.allowEmpty,t=e.color,a=e.format,n=e.value;var o=r&&!n;var i=parseMode(n);var l=a==="auto"&&i||a===i;var s=o?null:l?color(n):t;if(!l){this.showIncompatibleColorWarning(n,a)}this.setMode(a);this.internalColorSet(s,false);this.updateDimensions(this.scale)};e.prototype.disconnectedCallback=function(){document.removeEventListener("mousemove",this.globalMouseMoveHandler);document.removeEventListener("mouseup",this.globalMouseUpHandler)};e.prototype.render=function(){var e,r,t,a,n,o,i;var l=this;var s=this,c=s.allowEmpty,u=s.color,d=s.intlDeleteColor,v=s.el,f=s.hideHex,p=s.hideChannels,m=s.hideSaved,g=s.intlHex,b=s.intlSaved,y=s.intlSaveColor,w=s.savedColors,C=s.scale;var S=u?u.hex():null;var k=C==="l"?"m":"s";var x=this,M=x.colorFieldAndSliderInteractive,T=x.colorFieldScopeTop,_=x.colorFieldScopeLeft,D=x.hueScopeLeft,F=x.hueScopeTop,A=x.scopeOrientation,I=x.dimensions,$=I.colorField,E=$.height,H=$.width,O=I.slider.height;var L=F!==null&&F!==void 0?F:O/2+E;var R=D!==null&&D!==void 0?D:H*DEFAULT_COLOR$1.hue()/HSV_LIMITS.h;var j=getElementDir(v);var P=u===null;var z=A==="vertical";return h("div",{class:CSS$2.container},h("div",{class:CSS$2.colorFieldAndSliderWrap},h("canvas",{class:(e={},e[CSS$2.colorFieldAndSlider]=true,e[CSS$2.colorFieldAndSliderInteractive]=M,e),onMouseDown:this.handleColorFieldAndSliderMouseDown,onMouseEnter:this.handleColorFieldAndSliderMouseEnterOrMove,onMouseLeave:this.handleColorFieldAndSliderMouseLeave,onMouseMove:this.handleColorFieldAndSliderMouseEnterOrMove,ref:this.initColorFieldAndSlider}),h("div",{"aria-label":z?this.intlValue:this.intlSaturation,"aria-valuemax":z?HSV_LIMITS.v:HSV_LIMITS.s,"aria-valuemin":"0","aria-valuenow":(z?u===null||u===void 0?void 0:u.saturationv():u===null||u===void 0?void 0:u.value())||"0",class:(r={},r[CSS$2.scope]=true,r[CSS$2.colorFieldScope]=true,r),onKeyDown:this.handleColorFieldScopeKeyDown,ref:this.storeColorFieldScope,role:"slider",style:{top:(T||0)+"px",left:(_||0)+"px"},tabindex:"0"}),h("div",{"aria-label":this.intlHue,"aria-valuemax":HSV_LIMITS.h,"aria-valuemin":"0","aria-valuenow":(u===null||u===void 0?void 0:u.round().hue())||DEFAULT_COLOR$1.round().hue(),class:(t={},t[CSS$2.scope]=true,t[CSS$2.hueScope]=true,t),onKeyDown:this.handleHueScopeKeyDown,role:"slider",style:{top:L+"px",left:R+"px"},tabindex:"0"})),f&&p?null:h("div",{class:(a={},a[CSS$2.controlSection]=true,a[CSS$2.section]=true,a[CSS_UTILITY.rtl]=j==="rtl",a)},f?null:h("div",{class:CSS$2.hexOptions},h("span",{class:(n={},n[CSS$2.header]=true,n[CSS$2.headerHex]=true,n)},g),h("calcite-color-picker-hex-input",{allowEmpty:c,class:CSS$2.control,dir:j,onCalciteColorPickerHexInputChange:this.handleHexInputChange,scale:k,value:S})),p?null:h("calcite-tabs",{class:(o={},o[CSS$2.colorModeContainer]=true,o[CSS$2.splitSection]=true,o),dir:j,scale:k},h("calcite-tab-nav",{slot:"tab-nav"},this.renderChannelsTabTitle("rgb"),this.renderChannelsTabTitle("hsv")),this.renderChannelsTab("rgb"),this.renderChannelsTab("hsv"))),m?null:h("div",{class:(i={},i[CSS$2.savedColorsSection]=true,i[CSS$2.section]=true,i)},h("div",{class:CSS$2.header},h("label",null,b),h("div",{class:CSS$2.savedColorsButtons},h("calcite-button",{appearance:"transparent",class:CSS$2.deleteColor,color:"neutral",disabled:P,iconStart:"minus",label:d,onClick:this.deleteColor,scale:k}),h("calcite-button",{appearance:"transparent",class:CSS$2.saveColor,color:"neutral",disabled:P,iconStart:"plus",label:y,onClick:this.saveColor,scale:k}))),w.length>0?h("div",{class:CSS$2.savedColors},__spreadArray([],w.map((function(e){return h("calcite-color-picker-swatch",{active:S===e,class:CSS$2.savedColor,color:e,key:e,onClick:l.handleSavedColorSelect,onKeyDown:l.handleSavedColorKeyDown,scale:C,tabIndex:0})})))):null))};e.prototype.showIncompatibleColorWarning=function(e,r){console.warn("ignoring color value ("+e+") as it is not compatible with the current format ("+r+")")};e.prototype.setMode=function(e){this.mode=e==="auto"?this.mode:e};e.prototype.captureHueSliderColor=function(e){var r=this.dimensions.slider.width;var t=360/r*e;this.internalColorSet(this.baseColorFieldColor.hue(t),false)};e.prototype.getCanvasRegion=function(e){var r=this.dimensions,t=r.colorField.height,a=r.slider.height;if(e<=t){return"color-field"}if(e<=t+a){return"slider"}return"none"};e.prototype.internalColorSet=function(e,r){if(r===void 0){r=true}if(r&&colorEqual(e,this.color)){return}this.colorUpdateLocked=true;this.color=e;this.value=this.toValue(e);this.colorUpdateLocked=false};e.prototype.toValue=function(e,r){if(r===void 0){r=this.mode}if(!e){return null}var t="hex";if(r.includes(t)){return normalizeHex(e.round()[t]())}if(r.includes("-css")){return e[r.replace("-css","").replace("a","")]().round().string()}var a=e[r]().round().object();if(r.endsWith("a")){a.a=a.alpha;delete a.alpha}return a};e.prototype.getSliderCapSpacing=function(){var e=this.dimensions,r=e.slider.height,t=e.thumb.radius;return t*2-r};e.prototype.updateDimensions=function(e){if(e===void 0){e="m"}this.dimensions=DIMENSIONS[e]};e.prototype.drawColorField=function(){var e=this.fieldAndSliderRenderingContext;var r=this.dimensions.colorField,t=r.height,a=r.width;e.fillStyle=this.baseColorFieldColor.hsv().saturationv(100).value(100).string();e.fillRect(0,0,a,t);var n=e.createLinearGradient(0,0,a,0);n.addColorStop(0,"rgba(255,255,255,1)");n.addColorStop(1,"rgba(255,255,255,0)");e.fillStyle=n;e.fillRect(0,0,a,t);var o=e.createLinearGradient(0,0,0,t);o.addColorStop(0,"rgba(0,0,0,0)");o.addColorStop(1,"rgba(0,0,0,1)");e.fillStyle=o;e.fillRect(0,0,a,t);this.drawActiveColorFieldColor()};e.prototype.setCanvasContextSize=function(e,r){var t=r.height,a=r.width;var n=window.devicePixelRatio||1;e.width=a*n;e.height=t*n;e.style.height=t+"px";e.style.width=a+"px";var o=e.getContext("2d");o.scale(n,n)};e.prototype.containsPoint=function(e,r,t,a,n){return Math.pow(e-t,2)+Math.pow(r-a,2)<=Math.pow(n,2)};e.prototype.drawActiveColorFieldColor=function(){var e=this;var r=this.color;if(!r){return}var t=r.hsv();var a=this.dimensions,n=a.colorField,o=n.height,i=n.width,l=a.thumb.radius;var s=t.saturationv()/(HSV_LIMITS.s/i);var c=o-t.value()/(HSV_LIMITS.v/o);requestAnimationFrame((function(){e.colorFieldScopeLeft=s;e.colorFieldScopeTop=c}));this.drawThumb(this.fieldAndSliderRenderingContext,l,s,c,t,this.hueThumbState)};e.prototype.drawThumb=function(e,r,t,a,n,o){var i=0;var l=2*Math.PI;e.beginPath();e.arc(t,a,r,i,l);e.shadowBlur=o==="hover"?32:16;e.shadowColor="rgba(0, 0, 0, "+(o==="drag"?.32:.16)+")";e.fillStyle="#fff";e.fill();e.beginPath();e.arc(t,a,r-3,i,l);e.shadowBlur=0;e.shadowColor="transparent";e.fillStyle=n.rgb().string();e.fill()};e.prototype.drawActiveHueSliderColor=function(){var e=this;var r=this.color;if(!r){return}var t=r.hsv().saturationv(100).value(100);var a=this.dimensions,n=a.colorField.height,o=a.slider,i=o.height,l=o.width,s=a.thumb.radius;var c=t.hue()/(360/l);var h=i/2+n;requestAnimationFrame((function(){e.hueScopeLeft=c;e.hueScopeTop=h}));this.drawThumb(this.fieldAndSliderRenderingContext,s,c,h,t,this.sliderThumbState)};e.prototype.drawHueSlider=function(){var e=this.fieldAndSliderRenderingContext;var r=this.dimensions,t=r.colorField.height,a=r.slider,n=a.height,o=a.width;var i=e.createLinearGradient(0,0,o,0);var l=["red","yellow","lime","cyan","blue","magenta","red"];var s=1/(l.length-1);var c=0;l.forEach((function(e){i.addColorStop(c,color(e).string());c+=s}));e.fillStyle=i;e.clearRect(0,t,o,n+this.getSliderCapSpacing()*2);e.fillRect(0,t,o,n);this.drawActiveHueSliderColor()};e.prototype.updateColorFromChannels=function(e){this.internalColorSet(color(e,this.channelMode))};e.prototype.updateChannelsFromColor=function(e){this.channels=e?this.toChannels(e):[null,null,null]};e.prototype.toChannels=function(e){var r=this.channelMode;return e[r]().array().map((function(e){return Math.floor(e)}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{color:["handleColorChange"],format:["handleFormatChange"],scale:["handleScaleChange"],value:["handleValueChange"]}},enumerable:false,configurable:true});return e}();CalciteColorPicker.style=calciteColorPickerCss;var CSS$1={container:"container",preview:"preview",input:"input"};var calciteColorPickerHexInputCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:block}.container{width:100%;display:inline-grid;-ms-flex-align:center;align-items:center;grid-template-columns:1fr auto}.preview{grid-column:2/3;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;pointer-events:none;margin-top:0;margin-bottom:0;margin-left:0.25rem;margin-right:0.25rem;z-index:1}.preview,.input{grid-row:1}.input{grid-column:1/3;text-transform:uppercase;width:100%}";var DEFAULT_COLOR=color();var CalciteColorPickerHexInput=function(){function e(e){var r=this;registerInstance(this,e);this.calciteColorPickerHexInputChange=createEvent(this,"calciteColorPickerHexInputChange",7);this.allowEmpty=false;this.intlHex=TEXT.hex;this.intlNoColor=TEXT.noColor;this.scale="m";this.value=normalizeHex(DEFAULT_COLOR.hex());this.onCalciteInputBlur=function(e){var t=e.currentTarget;var a=t.value;var n="#"+a;var o=r.allowEmpty&&!a;if(o||isValidHex(n)&&isLonghandHex(n)){return}t.value=r.allowEmpty&&!r.internalColor?"":r.formatForInternalInput(rgbToHex(r.internalColor.object()))};this.onInputChange=function(e){var t=e.currentTarget;var a=t.value;var n;if(a){var o=a;var i=hexToRGB("#"+o);if(!i){return}n=normalizeHex(o)}else if(r.allowEmpty){n=null}r.value=n;r.calciteColorPickerHexInputChange.emit()};this.internalColor=DEFAULT_COLOR;this.previousNonNullValue=this.value;this.storeInputRef=function(e){r.inputNode=e}}e.prototype.connectedCallback=function(){var e=this,r=e.allowEmpty,t=e.value;if(t){var a=normalizeHex(t);if(isValidHex(a)){this.internalColor=color(a);this.value=a}return}if(r){this.internalColor=null;this.value=null}};e.prototype.handleValueChange=function(e,r){if(e){var t=normalizeHex(e);if(isValidHex(t)){var a=this.internalColor;var n=!a||t!==normalizeHex(a.hex());this.internalColor=color(t);this.previousNonNullValue=t;this.value=t;if(n){this.calciteColorPickerHexInputChange.emit()}return}}else if(this.allowEmpty){this.internalColor=null;this.value=null;this.calciteColorPickerHexInputChange.emit();return}this.value=r};e.prototype.onInputKeyDown=function(e){var r=e.altKey,t=e.ctrlKey,a=e.metaKey,n=e.shiftKey;var o=this,i=o.el,l=o.inputNode,s=o.internalColor,c=o.value;var h=getKey(e.key);var u=h==="ArrowDown"||h==="ArrowUp";if(u){if(!c){this.value=this.previousNonNullValue;e.preventDefault();return}var d=h==="ArrowUp"?1:-1;var v=n?10:1;this.value=normalizeHex(this.nudgeRGBChannels(s,v*d).hex());e.preventDefault();return}var f=r||t||a;var p=l.value.length>=6;var m=i.shadowRoot.activeElement;var g=m.selectionStart!=m.selectionEnd;var b=h.length===1;var y=hexChar.test(h);if(b&&!f&&(!y||!g&&p)){e.preventDefault()}};e.prototype.render=function(){var e=this,r=e.el,t=e.intlHex,a=e.value;var n=this.formatForInternalInput(a);var o=getElementDir(r);return h("div",{class:CSS$1.container},h("calcite-input",{class:CSS$1.input,dir:o,label:t,onCalciteInputBlur:this.onCalciteInputBlur,onChange:this.onInputChange,prefixText:"#",ref:this.storeInputRef,scale:this.scale,value:n}),n?h("calcite-color-picker-swatch",{active:true,class:CSS$1.preview,color:"#"+n,scale:this.scale}):null)};e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){focusElement(this.inputNode);return[2]}))}))};e.prototype.formatForInternalInput=function(e){return e?e.replace("#",""):""};e.prototype.nudgeRGBChannels=function(e,r){return color.rgb(e.array().map((function(e){return e+r})))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{value:["handleValueChange"]}},enumerable:false,configurable:true});return e}();CalciteColorPickerHexInput.style=calciteColorPickerHexInputCss;var CSS={swatch:"swatch",noColorIcon:"no-color-icon"};var COLORS={borderLight:"rgba(0, 0, 0, 0.15)",borderDark:"rgba(255, 255, 255, 0.15)"};var calciteColorPickerSwatchCss="@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:-ms-inline-flexbox;display:inline-flex;position:relative}:host([scale=s]){height:1.25rem;width:1.25rem}:host([scale=m]){height:1.5rem;width:1.5rem}:host([scale=l]){height:2rem;width:2rem}.swatch{overflow:visible;height:inherit;width:inherit}.swatch rect{-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:150ms;transition-duration:150ms;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.no-color-icon{height:100%;width:100%;top:0;right:0;bottom:0;left:0;position:absolute}";var CalciteColorPickerSwatch=function(){function e(e){registerInstance(this,e);this.active=false;this.scale="m"}e.prototype.handleColorChange=function(e){this.internalColor=color(e)};e.prototype.componentWillLoad=function(){this.handleColorChange(this.color)};e.prototype.render=function(){var e=this,r=e.active,t=e.el,a=e.internalColor;var n=r?"100%":"0";var o=a.hex();var i=getThemeName(t);var l=i==="light"?COLORS.borderLight:COLORS.borderDark;return h("svg",{class:CSS.swatch,xmlns:"http://www.w3.org/2000/svg"},h("title",null,o),h("rect",{fill:o,height:"100%",id:"swatch",rx:n,stroke:l,"stroke-width":"2",style:{"clip-path":"inset(0 round "+n+")"},width:"100%"}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{color:["handleColorChange"]}},enumerable:false,configurable:true});return e}();CalciteColorPickerSwatch.style=calciteColorPickerSwatchCss;export{CalciteColorPicker as calcite_color_picker,CalciteColorPickerHexInput as calcite_color_picker_hex_input,CalciteColorPickerSwatch as calcite_color_picker_swatch};