@unicom-cloud/ui 0.8.73 → 0.8.75

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 (306) hide show
  1. package/Affix.js +2 -2
  2. package/Alert.js +3 -3
  3. package/AutoComplete.js +2 -2
  4. package/BackTop.js +4 -4
  5. package/Badge.js +3 -3
  6. package/Breadcrumb.js +3 -3
  7. package/Button.js +2 -2
  8. package/Calendar.js +3 -3
  9. package/Card.js +2 -2
  10. package/Carousel.js +2 -2
  11. package/Cascader.js +1 -1
  12. package/Checkbox.js +1 -1
  13. package/Collapse.js +1 -1
  14. package/ColorPicker.js +2 -2
  15. package/Comment.js +2 -2
  16. package/ConfigProvider.js +1 -1
  17. package/Copy.js +3 -3
  18. package/DatePicker.js +1 -1
  19. package/Descriptions.js +2 -2
  20. package/Divider.js +2 -2
  21. package/Draggable.js +2 -2
  22. package/Dropdown.js +2 -2
  23. package/Empty.js +2 -2
  24. package/Icon.js +2 -2
  25. package/IconHover.js +2 -2
  26. package/Image.js +1 -1
  27. package/InputNumber.js +2 -2
  28. package/Layout.js +2 -2
  29. package/Link.js +2 -2
  30. package/List.js +2 -2
  31. package/Mentions.js +2 -2
  32. package/Menu.js +1 -1
  33. package/Message.js +4 -4
  34. package/Modal.js +1 -1
  35. package/Notice.js +2 -2
  36. package/Notification.js +4 -4
  37. package/OverflowEllipsis.js +2 -2
  38. package/PageHeader.js +2 -2
  39. package/Popconfirm.js +2 -2
  40. package/Popover.js +2 -2
  41. package/Progress.js +2 -2
  42. package/Radio.js +1 -1
  43. package/Rate.js +2 -2
  44. package/ResizeBox.js +2 -2
  45. package/Result.js +2 -2
  46. package/SelectView.js +1 -1
  47. package/Skeleton.js +2 -2
  48. package/Slider.js +2 -2
  49. package/Space.js +2 -2
  50. package/SpeechSynthesis.js +4 -4
  51. package/Spin.js +2 -2
  52. package/Statistic.js +3 -3
  53. package/Steps.js +2 -2
  54. package/Switch.js +4 -4
  55. package/Table.js +1 -1
  56. package/Tabs.js +1 -1
  57. package/Tag.js +2 -2
  58. package/Tooltip.js +3 -3
  59. package/Transfer.js +2 -2
  60. package/Tree.js +1 -1
  61. package/Trigger.js +3 -3
  62. package/affix/index.js +2 -2
  63. package/alert/index.js +9 -9
  64. package/anchor/Anchor.js +26 -26
  65. package/anchor/Link.js +2 -2
  66. package/anchor/util.js +1 -1
  67. package/auto-complete/index.js +2 -2
  68. package/avatar/Avatar.js +2 -2
  69. package/avatar/Group.js +2 -2
  70. package/back-top/index.js +11 -11
  71. package/badge/Count.js +7 -7
  72. package/badge/index.js +9 -9
  73. package/breadcrumb/Item.js +6 -6
  74. package/breadcrumb/index.js +3 -3
  75. package/button/Group.js +2 -2
  76. package/button/index.js +2 -2
  77. package/calendar/Month.js +2 -2
  78. package/calendar/Year.js +1 -1
  79. package/calendar/index.js +4 -4
  80. package/card/Grid.js +5 -5
  81. package/card/Meta.js +4 -4
  82. package/card/index.js +2 -2
  83. package/carousel/Arrow.js +2 -2
  84. package/carousel/Indicator.js +6 -6
  85. package/carousel/index.js +2 -2
  86. package/cascader/Cascader.js +3 -3
  87. package/cascader/index.js +1 -1
  88. package/cascader/util.js +1 -1
  89. package/checkbox/Checkbox.js +3 -3
  90. package/checkbox/Group.js +3 -3
  91. package/checkbox/index.js +1 -1
  92. package/chunk/{oHDWCJnz.js → 0mWCmQHr.js} +3 -3
  93. package/chunk/{UDX9U6M7.js → B8hkFIar.js} +3 -3
  94. package/chunk/BFmckYou.js +25 -0
  95. package/chunk/{Cj2SQJiO.js → BJ9_azwQ.js} +487 -487
  96. package/chunk/{Dg0M2OmF.js → BViFMHr-.js} +5 -5
  97. package/chunk/BbqvFW5R.js +927 -0
  98. package/chunk/{uKZyjtff.js → BhBEMwvI.js} +21 -20
  99. package/chunk/{Bj4EV0eG.js → BpYX5PN4.js} +1 -1
  100. package/chunk/{B7hulkj9.js → BxZ39GzB.js} +2 -2
  101. package/chunk/C9XYyypq.js +713 -0
  102. package/chunk/CIkPwQlq.js +6 -0
  103. package/chunk/{uH6uxyao.js → CPlPBkN7.js} +2 -2
  104. package/chunk/CUFsOxJ2.js +10 -0
  105. package/chunk/CWlklVfi.js +257 -0
  106. package/chunk/{Ey4YJCkX.js → D0Dlbc2g.js} +2 -1
  107. package/chunk/{DejjIa3N.js → DFcz9ZPP.js} +35 -35
  108. package/chunk/{AwZqeapI.js → DRTWRsgI.js} +1 -1
  109. package/chunk/{D2LLXZQX.js → DeCsZrXb.js} +4 -4
  110. package/chunk/{DpoumMDw.js → DohlrJ4S.js} +1 -1
  111. package/chunk/DskaI8QL.js +25 -0
  112. package/chunk/{7HDzVe32.js → Dv6USvVF.js} +4 -4
  113. package/chunk/{DJDOFlqC.js → EL5Jmjgr.js} +2 -2
  114. package/chunk/{CiY7w1ZO.js → WVoGhvMI.js} +3 -3
  115. package/chunk/{BJ1soa2K.js → uEGHykhe.js} +18 -18
  116. package/collapse/Collapse.js +3 -3
  117. package/collapse/Item.js +4 -4
  118. package/collapse/index.js +1 -1
  119. package/color-picker/ControlBar.js +2 -2
  120. package/color-picker/InputAlpha.js +1 -1
  121. package/color-picker/InputHex.js +7 -7
  122. package/color-picker/InputRgb.js +6 -6
  123. package/color-picker/Palette.js +5 -5
  124. package/color-picker/Panel.js +4 -4
  125. package/color-picker/colors.js +7 -12
  126. package/color-picker/index.js +20 -20
  127. package/color-picker/utils.js +1 -1
  128. package/comment/index.js +6 -6
  129. package/config-provider/ConfigProvider.js +2 -2
  130. package/config-provider/context.js +1 -1
  131. package/config-provider/index.js +2 -2
  132. package/copy/index.js +16 -16
  133. package/date-picker/Picker.js +2 -2
  134. package/date-picker/PickerRange.js +3 -3
  135. package/date-picker/index.js +1 -1
  136. package/descriptions/index.js +2 -2
  137. package/divider/index.js +5 -5
  138. package/draggable/Item.js +1 -1
  139. package/draggable/index.js +9 -9
  140. package/drawer/Drawer.js +3 -3
  141. package/dropdown/Button.js +1 -1
  142. package/dropdown/index.js +2 -2
  143. package/empty/index.js +2 -2
  144. package/form/Control.js +1 -1
  145. package/form/Form.js +2 -2
  146. package/form/FormItem.js +3 -3
  147. package/form/FormLabel.js +9 -9
  148. package/form/context.js +1 -1
  149. package/grid/Col.js +2 -2
  150. package/grid/Row.js +2 -2
  151. package/grid/grid-item.js +2 -2
  152. package/grid/grid.js +8 -8
  153. package/icon/index.js +11 -11
  154. package/icon-hover/index.js +2 -2
  155. package/image/Image.js +4 -4
  156. package/image/ImageFooter.js +2 -2
  157. package/image/ImagePreview.js +5 -5
  158. package/image/ImagePreviewArrow.js +4 -4
  159. package/image/ImagePreviewGroup.js +1 -1
  160. package/image/ImagePreviewToolbar.js +1 -1
  161. package/image/TriggerForToolbar.js +4 -4
  162. package/image/index.js +1 -1
  163. package/index.js +586 -592
  164. package/input/Group.js +4 -4
  165. package/input/Input.js +45 -45
  166. package/input/InputElement.js +2 -2
  167. package/input/Password.js +2 -2
  168. package/input/Search.js +2 -2
  169. package/input/Textarea.js +2 -2
  170. package/input-number/index.js +2 -2
  171. package/input-tag/InputTag.js +4 -4
  172. package/layout/Content.js +2 -2
  173. package/layout/Footer.js +5 -5
  174. package/layout/Header.js +4 -4
  175. package/layout/Sider.js +2 -2
  176. package/layout/index.js +2 -2
  177. package/link/index.js +5 -5
  178. package/list/Item.js +2 -2
  179. package/list/Meta.js +4 -4
  180. package/list/index.js +2 -2
  181. package/mentions/index.js +2 -2
  182. package/menu/Item.js +5 -5
  183. package/menu/ItemGroup.js +1 -1
  184. package/menu/Menu.js +3 -3
  185. package/menu/OverflowWrap.js +2 -2
  186. package/menu/index.js +2 -2
  187. package/message/index.js +4 -4
  188. package/message/useMessage.js +1 -1
  189. package/modal/Confirm.js +2 -2
  190. package/modal/Modal.js +4 -4
  191. package/modal/index.js +1 -1
  192. package/notice/index.js +2 -2
  193. package/notification/index.js +4 -4
  194. package/notification/useNotification.js +1 -1
  195. package/overflow-ellipsis/OverflowItem.js +6 -6
  196. package/overflow-ellipsis/index.js +8 -8
  197. package/package.json +1 -1
  198. package/page-header/index.js +2 -2
  199. package/pagination/PageItem.js +2 -2
  200. package/pagination/PageJumper.js +1 -1
  201. package/pagination/PageOption.js +1 -1
  202. package/pagination/Pagination.js +23 -23
  203. package/picker/Input.js +7 -7
  204. package/picker/InputRange.js +9 -9
  205. package/popconfirm/index.js +2 -2
  206. package/popover/index.js +2 -2
  207. package/progress/CircleProgress.js +7 -7
  208. package/progress/LineProgess.js +1 -1
  209. package/progress/StepProgress.js +7 -7
  210. package/progress/index.js +8 -8
  211. package/radio/Group.js +3 -3
  212. package/radio/Radio.js +3 -3
  213. package/radio/index.js +2 -2
  214. package/rate/index.js +2 -2
  215. package/resize-box/ResizeTrigger.js +10 -10
  216. package/resize-box/Split.js +12 -12
  217. package/resize-box/SplitGroup.js +2 -2
  218. package/resize-box/index.js +2 -2
  219. package/result/index.js +9 -9
  220. package/select/Option.js +2 -2
  221. package/select/Select.js +3 -3
  222. package/select-view/Core.js +27 -27
  223. package/select-view/index.js +1 -1
  224. package/skeleton/Image.js +4 -4
  225. package/skeleton/Text.js +7 -7
  226. package/skeleton/index.js +2 -2
  227. package/slider/Button.js +2 -2
  228. package/slider/Dot.js +5 -5
  229. package/slider/Input.js +12 -12
  230. package/slider/Tick.js +6 -6
  231. package/slider/index.js +2 -2
  232. package/space/index.js +12 -12
  233. package/speech-synthesis/index.js +4 -4
  234. package/spin/DotLoading.js +1 -1
  235. package/spin/index.js +2 -2
  236. package/statistic/Countdown.js +7 -7
  237. package/statistic/index.js +20 -20
  238. package/steps/Step.js +1 -1
  239. package/steps/index.js +2 -2
  240. package/style/variables.less +375 -710
  241. package/style.css +1 -1
  242. package/switch/index.js +4 -4
  243. package/table/Table.js +4 -4
  244. package/table/index.js +4 -4
  245. package/tabs/Tab.js +3 -3
  246. package/tabs/TabContent.js +3 -3
  247. package/tabs/TabPane.js +2 -2
  248. package/tabs/index.js +2 -2
  249. package/tag/index.js +6 -6
  250. package/time-picker/Picker.js +2 -2
  251. package/time-picker/TimeColumn.js +7 -7
  252. package/time-picker/TimePicker.js +23 -23
  253. package/time-picker/util.js +5 -5
  254. package/timeline/Item.js +2 -2
  255. package/timeline/Timeline.js +2 -2
  256. package/tooltip/index.js +3 -3
  257. package/transfer/Item.js +3 -3
  258. package/transfer/List.js +3 -3
  259. package/transfer/index.js +2 -2
  260. package/tree/Animation.js +3 -3
  261. package/tree/Node.js +4 -4
  262. package/tree/NodeList.js +1 -1
  263. package/tree/Tree.js +3 -3
  264. package/tree/index.js +1 -1
  265. package/tree-select/Select.js +2 -2
  266. package/trigger/index.js +3 -3
  267. package/types/color-picker/colors.d.ts +1 -1
  268. package/types/config-provider/interface.d.ts +0 -1
  269. package/types/utils/color.d.ts +1 -1
  270. package/types/utils/constant.d.ts +1 -1
  271. package/types/utils/index.d.ts +1 -0
  272. package/types/utils/setDarkTheme.d.ts +4 -0
  273. package/typography/Base.js +2 -2
  274. package/typography/EditContent.js +1 -1
  275. package/typography/Ellipsis.js +14 -15
  276. package/typography/Paragraph.js +6 -6
  277. package/typography/Typography.js +5 -5
  278. package/typography/index.js +12 -13
  279. package/upload/TriggerNode.js +2 -2
  280. package/upload/Upload.js +5 -5
  281. package/upload/Uploader.js +2 -2
  282. package/upload/request.js +1 -1
  283. package/upload/request_.js +1 -1
  284. package/utils/PqbCSSTransition.js +1 -1
  285. package/utils/className.js +3 -3
  286. package/utils/color.js +2 -116
  287. package/utils/constant.js +3 -2
  288. package/utils/contextHolder.js +1 -1
  289. package/utils/copy.js +4 -4
  290. package/utils/dom.js +1 -1
  291. package/utils/fileToURL.js +1 -1
  292. package/utils/index.js +303 -309
  293. package/utils/reactTransitionGroup.js +1 -1
  294. package/utils/saveAs.js +1 -1
  295. package/utils/setDarkTheme.js +7 -0
  296. package/utils/tinycolor.js +13 -13
  297. package/utils/tween.js +1 -1
  298. package/verification-code/VerificationCode.js +7 -7
  299. package/version/index.js +1 -1
  300. package/watermark/Watermark.js +6 -6
  301. package/chunk/B0UZ1Ee2.js +0 -257
  302. package/chunk/Byd0ztYY.js +0 -724
  303. package/chunk/CCVU-Kst.js +0 -770
  304. package/chunk/CTxjmYmx.js +0 -19
  305. package/chunk/D0ZWT7db.js +0 -5
  306. package/chunk/JPPo5nY_.js +0 -9
@@ -0,0 +1,927 @@
1
+ function l(r, t) {
2
+ ue(r) && (r = "100%");
3
+ const e = fe(r);
4
+ return r = t === 360 ? r : Math.min(t, Math.max(0, parseFloat(r))), e && (r = parseInt(String(r * t), 10) / 100), Math.abs(r - t) < 1e-6 ? 1 : (t === 360 ? r = (r < 0 ? r % t + t : r % t) / parseFloat(String(t)) : r = r % t / parseFloat(String(t)), r);
5
+ }
6
+ function A(r) {
7
+ return Math.min(1, Math.max(0, r));
8
+ }
9
+ function ue(r) {
10
+ return typeof r == "string" && r.indexOf(".") !== -1 && parseFloat(r) === 1;
11
+ }
12
+ function fe(r) {
13
+ return typeof r == "string" && r.indexOf("%") !== -1;
14
+ }
15
+ function L(r) {
16
+ return r = parseFloat(r), (isNaN(r) || r < 0 || r > 1) && (r = 1), r;
17
+ }
18
+ function S(r) {
19
+ return Number(r) <= 1 ? `${Number(r) * 100}%` : r;
20
+ }
21
+ function b(r) {
22
+ return r.length === 1 ? "0" + r : String(r);
23
+ }
24
+ function ge(r, t, e) {
25
+ return {
26
+ r: l(r, 255) * 255,
27
+ g: l(t, 255) * 255,
28
+ b: l(e, 255) * 255
29
+ };
30
+ }
31
+ function q(r, t, e) {
32
+ r = l(r, 255), t = l(t, 255), e = l(e, 255);
33
+ const a = Math.max(r, t, e), n = Math.min(r, t, e);
34
+ let s = 0, i = 0;
35
+ const h = (a + n) / 2;
36
+ if (a === n)
37
+ i = 0, s = 0;
38
+ else {
39
+ const u = a - n;
40
+ switch (i = h > 0.5 ? u / (2 - a - n) : u / (a + n), a) {
41
+ case r:
42
+ s = (t - e) / u + (t < e ? 6 : 0);
43
+ break;
44
+ case t:
45
+ s = (e - r) / u + 2;
46
+ break;
47
+ case e:
48
+ s = (r - t) / u + 4;
49
+ break;
50
+ }
51
+ s /= 6;
52
+ }
53
+ return { h: s, s: i, l: h };
54
+ }
55
+ function H(r, t, e) {
56
+ return e < 0 && (e += 1), e > 1 && (e -= 1), e < 1 / 6 ? r + (t - r) * (6 * e) : e < 1 / 2 ? t : e < 2 / 3 ? r + (t - r) * (2 / 3 - e) * 6 : r;
57
+ }
58
+ function ce(r, t, e) {
59
+ let a, n, s;
60
+ if (r = l(r, 360), t = l(t, 100), e = l(e, 100), t === 0)
61
+ n = e, s = e, a = e;
62
+ else {
63
+ const i = e < 0.5 ? e * (1 + t) : e + t - e * t, h = 2 * e - i;
64
+ a = H(h, i, r + 1 / 3), n = H(h, i, r), s = H(h, i, r - 1 / 3);
65
+ }
66
+ return { r: a * 255, g: n * 255, b: s * 255 };
67
+ }
68
+ function R(r, t, e) {
69
+ r = l(r, 255), t = l(t, 255), e = l(e, 255);
70
+ const a = Math.max(r, t, e), n = Math.min(r, t, e);
71
+ let s = 0;
72
+ const i = a, h = a - n, u = a === 0 ? 0 : h / a;
73
+ if (a === n)
74
+ s = 0;
75
+ else {
76
+ switch (a) {
77
+ case r:
78
+ s = (t - e) / h + (t < e ? 6 : 0);
79
+ break;
80
+ case t:
81
+ s = (e - r) / h + 2;
82
+ break;
83
+ case e:
84
+ s = (r - t) / h + 4;
85
+ break;
86
+ }
87
+ s /= 6;
88
+ }
89
+ return { h: s, s: u, v: i };
90
+ }
91
+ function de(r, t, e) {
92
+ r = l(r, 360) * 6, t = l(t, 100), e = l(e, 100);
93
+ const a = Math.floor(r), n = r - a, s = e * (1 - t), i = e * (1 - n * t), h = e * (1 - (1 - n) * t), u = a % 6, d = [e, i, s, s, h, e][u], m = [h, e, e, i, s, s][u], M = [s, s, h, e, e, i][u];
94
+ return { r: d * 255, g: m * 255, b: M * 255 };
95
+ }
96
+ function T(r, t, e, a) {
97
+ const n = [
98
+ b(Math.round(r).toString(16)),
99
+ b(Math.round(t).toString(16)),
100
+ b(Math.round(e).toString(16))
101
+ ];
102
+ return a && n[0].startsWith(n[0].charAt(1)) && n[1].startsWith(n[1].charAt(1)) && n[2].startsWith(n[2].charAt(1)) ? n[0].charAt(0) + n[1].charAt(0) + n[2].charAt(0) : n.join("");
103
+ }
104
+ function be(r, t, e, a, n) {
105
+ const s = [
106
+ b(Math.round(r).toString(16)),
107
+ b(Math.round(t).toString(16)),
108
+ b(Math.round(e).toString(16)),
109
+ b(V(a))
110
+ ];
111
+ return n && s[0].startsWith(s[0].charAt(1)) && s[1].startsWith(s[1].charAt(1)) && s[2].startsWith(s[2].charAt(1)) && s[3].startsWith(s[3].charAt(1)) ? s[0].charAt(0) + s[1].charAt(0) + s[2].charAt(0) + s[3].charAt(0) : s.join("");
112
+ }
113
+ function Ae(r, t, e, a) {
114
+ return [
115
+ b(V(a)),
116
+ b(Math.round(r).toString(16)),
117
+ b(Math.round(t).toString(16)),
118
+ b(Math.round(e).toString(16))
119
+ ].join("");
120
+ }
121
+ function me(r, t, e, a) {
122
+ const n = r / 100, s = t / 100, i = e / 100, h = a / 100, u = 255 * (1 - n) * (1 - h), d = 255 * (1 - s) * (1 - h), m = 255 * (1 - i) * (1 - h);
123
+ return { r: u, g: d, b: m };
124
+ }
125
+ function O(r, t, e) {
126
+ let a = 1 - r / 255, n = 1 - t / 255, s = 1 - e / 255, i = Math.min(a, n, s);
127
+ return i === 1 ? (a = 0, n = 0, s = 0) : (a = (a - i) / (1 - i) * 100, n = (n - i) / (1 - i) * 100, s = (s - i) / (1 - i) * 100), i *= 100, {
128
+ c: Math.round(a),
129
+ m: Math.round(n),
130
+ y: Math.round(s),
131
+ k: Math.round(i)
132
+ };
133
+ }
134
+ function V(r) {
135
+ return Math.round(parseFloat(r) * 255).toString(16);
136
+ }
137
+ function P(r) {
138
+ return g(r) / 255;
139
+ }
140
+ function g(r) {
141
+ return parseInt(r, 16);
142
+ }
143
+ function pe(r) {
144
+ return {
145
+ r: r >> 16,
146
+ g: (r & 65280) >> 8,
147
+ b: r & 255
148
+ };
149
+ }
150
+ const C = {
151
+ aliceblue: "#f0f8ff",
152
+ antiquewhite: "#faebd7",
153
+ aqua: "#00ffff",
154
+ aquamarine: "#7fffd4",
155
+ azure: "#f0ffff",
156
+ beige: "#f5f5dc",
157
+ bisque: "#ffe4c4",
158
+ black: "#000000",
159
+ blanchedalmond: "#ffebcd",
160
+ blue: "#0000ff",
161
+ blueviolet: "#8a2be2",
162
+ brown: "#a52a2a",
163
+ burlywood: "#deb887",
164
+ cadetblue: "#5f9ea0",
165
+ chartreuse: "#7fff00",
166
+ chocolate: "#d2691e",
167
+ coral: "#ff7f50",
168
+ cornflowerblue: "#6495ed",
169
+ cornsilk: "#fff8dc",
170
+ crimson: "#dc143c",
171
+ cyan: "#00ffff",
172
+ darkblue: "#00008b",
173
+ darkcyan: "#008b8b",
174
+ darkgoldenrod: "#b8860b",
175
+ darkgray: "#a9a9a9",
176
+ darkgreen: "#006400",
177
+ darkgrey: "#a9a9a9",
178
+ darkkhaki: "#bdb76b",
179
+ darkmagenta: "#8b008b",
180
+ darkolivegreen: "#556b2f",
181
+ darkorange: "#ff8c00",
182
+ darkorchid: "#9932cc",
183
+ darkred: "#8b0000",
184
+ darksalmon: "#e9967a",
185
+ darkseagreen: "#8fbc8f",
186
+ darkslateblue: "#483d8b",
187
+ darkslategray: "#2f4f4f",
188
+ darkslategrey: "#2f4f4f",
189
+ darkturquoise: "#00ced1",
190
+ darkviolet: "#9400d3",
191
+ deeppink: "#ff1493",
192
+ deepskyblue: "#00bfff",
193
+ dimgray: "#696969",
194
+ dimgrey: "#696969",
195
+ dodgerblue: "#1e90ff",
196
+ firebrick: "#b22222",
197
+ floralwhite: "#fffaf0",
198
+ forestgreen: "#228b22",
199
+ fuchsia: "#ff00ff",
200
+ gainsboro: "#dcdcdc",
201
+ ghostwhite: "#f8f8ff",
202
+ goldenrod: "#daa520",
203
+ gold: "#ffd700",
204
+ gray: "#808080",
205
+ green: "#008000",
206
+ greenyellow: "#adff2f",
207
+ grey: "#808080",
208
+ honeydew: "#f0fff0",
209
+ hotpink: "#ff69b4",
210
+ indianred: "#cd5c5c",
211
+ indigo: "#4b0082",
212
+ ivory: "#fffff0",
213
+ khaki: "#f0e68c",
214
+ lavenderblush: "#fff0f5",
215
+ lavender: "#e6e6fa",
216
+ lawngreen: "#7cfc00",
217
+ lemonchiffon: "#fffacd",
218
+ lightblue: "#add8e6",
219
+ lightcoral: "#f08080",
220
+ lightcyan: "#e0ffff",
221
+ lightgoldenrodyellow: "#fafad2",
222
+ lightgray: "#d3d3d3",
223
+ lightgreen: "#90ee90",
224
+ lightgrey: "#d3d3d3",
225
+ lightpink: "#ffb6c1",
226
+ lightsalmon: "#ffa07a",
227
+ lightseagreen: "#20b2aa",
228
+ lightskyblue: "#87cefa",
229
+ lightslategray: "#778899",
230
+ lightslategrey: "#778899",
231
+ lightsteelblue: "#b0c4de",
232
+ lightyellow: "#ffffe0",
233
+ lime: "#00ff00",
234
+ limegreen: "#32cd32",
235
+ linen: "#faf0e6",
236
+ magenta: "#ff00ff",
237
+ maroon: "#800000",
238
+ mediumaquamarine: "#66cdaa",
239
+ mediumblue: "#0000cd",
240
+ mediumorchid: "#ba55d3",
241
+ mediumpurple: "#9370db",
242
+ mediumseagreen: "#3cb371",
243
+ mediumslateblue: "#7b68ee",
244
+ mediumspringgreen: "#00fa9a",
245
+ mediumturquoise: "#48d1cc",
246
+ mediumvioletred: "#c71585",
247
+ midnightblue: "#191970",
248
+ mintcream: "#f5fffa",
249
+ mistyrose: "#ffe4e1",
250
+ moccasin: "#ffe4b5",
251
+ navajowhite: "#ffdead",
252
+ navy: "#000080",
253
+ oldlace: "#fdf5e6",
254
+ olive: "#808000",
255
+ olivedrab: "#6b8e23",
256
+ orange: "#ffa500",
257
+ orangered: "#ff4500",
258
+ orchid: "#da70d6",
259
+ palegoldenrod: "#eee8aa",
260
+ palegreen: "#98fb98",
261
+ paleturquoise: "#afeeee",
262
+ palevioletred: "#db7093",
263
+ papayawhip: "#ffefd5",
264
+ peachpuff: "#ffdab9",
265
+ peru: "#cd853f",
266
+ pink: "#ffc0cb",
267
+ plum: "#dda0dd",
268
+ powderblue: "#b0e0e6",
269
+ purple: "#800080",
270
+ rebeccapurple: "#663399",
271
+ red: "#ff0000",
272
+ rosybrown: "#bc8f8f",
273
+ royalblue: "#4169e1",
274
+ saddlebrown: "#8b4513",
275
+ salmon: "#fa8072",
276
+ sandybrown: "#f4a460",
277
+ seagreen: "#2e8b57",
278
+ seashell: "#fff5ee",
279
+ sienna: "#a0522d",
280
+ silver: "#c0c0c0",
281
+ skyblue: "#87ceeb",
282
+ slateblue: "#6a5acd",
283
+ slategray: "#708090",
284
+ slategrey: "#708090",
285
+ snow: "#fffafa",
286
+ springgreen: "#00ff7f",
287
+ steelblue: "#4682b4",
288
+ tan: "#d2b48c",
289
+ teal: "#008080",
290
+ thistle: "#d8bfd8",
291
+ tomato: "#ff6347",
292
+ turquoise: "#40e0d0",
293
+ violet: "#ee82ee",
294
+ wheat: "#f5deb3",
295
+ white: "#ffffff",
296
+ whitesmoke: "#f5f5f5",
297
+ yellow: "#ffff00",
298
+ yellowgreen: "#9acd32"
299
+ };
300
+ function ye(r) {
301
+ let t = { r: 0, g: 0, b: 0 }, e = 1, a = null, n = null, s = null, i = !1, h = !1;
302
+ return typeof r == "string" && (r = ve(r)), typeof r == "object" && (f(r.r) && f(r.g) && f(r.b) ? (t = ge(r.r, r.g, r.b), i = !0, h = String(r.r).slice(-1) === "%" ? "prgb" : "rgb") : f(r.h) && f(r.s) && f(r.v) ? (a = S(r.s), n = S(r.v), t = de(r.h, a, n), i = !0, h = "hsv") : f(r.h) && f(r.s) && f(r.l) ? (a = S(r.s), s = S(r.l), t = ce(r.h, a, s), i = !0, h = "hsl") : f(r.c) && f(r.m) && f(r.y) && f(r.k) && (t = me(r.c, r.m, r.y, r.k), i = !0, h = "cmyk"), Object.prototype.hasOwnProperty.call(r, "a") && (e = r.a)), e = L(e), {
303
+ ok: i,
304
+ format: r.format || h,
305
+ r: Math.min(255, Math.max(t.r, 0)),
306
+ g: Math.min(255, Math.max(t.g, 0)),
307
+ b: Math.min(255, Math.max(t.b, 0)),
308
+ a: e
309
+ };
310
+ }
311
+ const ke = "[-\\+]?\\d+%?", $e = "[-\\+]?\\d*\\.\\d+%?", y = "(?:" + $e + ")|(?:" + ke + ")", E = "[\\s|\\(]+(" + y + ")[,|\\s]+(" + y + ")[,|\\s]+(" + y + ")\\s*\\)?", F = (
312
+ // eslint-disable-next-line prettier/prettier
313
+ "[\\s|\\(]+(" + y + ")[,|\\s]+(" + y + ")[,|\\s]+(" + y + ")[,|\\s]+(" + y + ")\\s*\\)?"
314
+ ), c = {
315
+ CSS_UNIT: new RegExp(y),
316
+ rgb: new RegExp("rgb" + E),
317
+ rgba: new RegExp("rgba" + F),
318
+ hsl: new RegExp("hsl" + E),
319
+ hsla: new RegExp("hsla" + F),
320
+ hsv: new RegExp("hsv" + E),
321
+ hsva: new RegExp("hsva" + F),
322
+ cmyk: new RegExp("cmyk" + F),
323
+ hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
324
+ hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
325
+ hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
326
+ hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
327
+ };
328
+ function ve(r) {
329
+ if (r = r.trim().toLowerCase(), r.length === 0)
330
+ return !1;
331
+ let t = !1;
332
+ if (C[r])
333
+ r = C[r], t = !0;
334
+ else if (r === "transparent")
335
+ return { r: 0, g: 0, b: 0, a: 0, format: "name" };
336
+ let e = c.rgb.exec(r);
337
+ return e ? { r: e[1], g: e[2], b: e[3] } : (e = c.rgba.exec(r), e ? { r: e[1], g: e[2], b: e[3], a: e[4] } : (e = c.hsl.exec(r), e ? { h: e[1], s: e[2], l: e[3] } : (e = c.hsla.exec(r), e ? { h: e[1], s: e[2], l: e[3], a: e[4] } : (e = c.hsv.exec(r), e ? { h: e[1], s: e[2], v: e[3] } : (e = c.hsva.exec(r), e ? { h: e[1], s: e[2], v: e[3], a: e[4] } : (e = c.cmyk.exec(r), e ? {
338
+ c: e[1],
339
+ m: e[2],
340
+ y: e[3],
341
+ k: e[4]
342
+ } : (e = c.hex8.exec(r), e ? {
343
+ r: g(e[1]),
344
+ g: g(e[2]),
345
+ b: g(e[3]),
346
+ a: P(e[4]),
347
+ format: t ? "name" : "hex8"
348
+ } : (e = c.hex6.exec(r), e ? {
349
+ r: g(e[1]),
350
+ g: g(e[2]),
351
+ b: g(e[3]),
352
+ format: t ? "name" : "hex"
353
+ } : (e = c.hex4.exec(r), e ? {
354
+ r: g(e[1] + e[1]),
355
+ g: g(e[2] + e[2]),
356
+ b: g(e[3] + e[3]),
357
+ a: P(e[4] + e[4]),
358
+ format: t ? "name" : "hex8"
359
+ } : (e = c.hex3.exec(r), e ? {
360
+ r: g(e[1] + e[1]),
361
+ g: g(e[2] + e[2]),
362
+ b: g(e[3] + e[3]),
363
+ format: t ? "name" : "hex"
364
+ } : !1))))))))));
365
+ }
366
+ function f(r) {
367
+ return typeof r == "number" ? !Number.isNaN(r) : c.CSS_UNIT.test(r);
368
+ }
369
+ var Me = Object.defineProperty, xe = (r, t, e) => t in r ? Me(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, p = (r, t, e) => xe(r, typeof t != "symbol" ? t + "" : t, e);
370
+ class o {
371
+ constructor(t = "", e = {}) {
372
+ if (p(this, "r"), p(this, "g"), p(this, "b"), p(this, "a"), p(this, "format"), p(this, "originalInput"), p(this, "isValid"), p(this, "gradientType"), p(this, "roundA"), t instanceof o)
373
+ return t;
374
+ typeof t == "number" && (t = pe(t)), this.originalInput = t;
375
+ const a = ye(t);
376
+ this.originalInput = t, this.r = a.r, this.g = a.g, this.b = a.b, this.a = a.a, this.roundA = Math.round(100 * this.a) / 100, this.format = e.format ?? a.format, this.gradientType = e.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = a.ok;
377
+ }
378
+ get ok() {
379
+ return this.isValid;
380
+ }
381
+ isDark() {
382
+ return this.getBrightness() < 128;
383
+ }
384
+ isLight() {
385
+ return !this.isDark();
386
+ }
387
+ /**
388
+ * Returns the perceived brightness of the color, from 0-255.
389
+ */
390
+ getBrightness() {
391
+ const t = this.toRgb();
392
+ return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
393
+ }
394
+ /**
395
+ * Returns the perceived luminance of a color, from 0-1.
396
+ */
397
+ getLuminance() {
398
+ const t = this.toRgb();
399
+ let e, a, n;
400
+ const s = t.r / 255, i = t.g / 255, h = t.b / 255;
401
+ return s <= 0.03928 ? e = s / 12.92 : e = Math.pow((s + 0.055) / 1.055, 2.4), i <= 0.03928 ? a = i / 12.92 : a = Math.pow((i + 0.055) / 1.055, 2.4), h <= 0.03928 ? n = h / 12.92 : n = Math.pow((h + 0.055) / 1.055, 2.4), 0.2126 * e + 0.7152 * a + 0.0722 * n;
402
+ }
403
+ /**
404
+ * Returns the alpha value of a color, from 0-1.
405
+ */
406
+ getAlpha() {
407
+ return this.a;
408
+ }
409
+ /**
410
+ * Sets the alpha value on the current color.
411
+ *
412
+ * @param alpha - The new alpha value. The accepted range is 0-1.
413
+ */
414
+ setAlpha(t) {
415
+ return this.a = L(t), this.roundA = Math.round(100 * this.a) / 100, this;
416
+ }
417
+ /**
418
+ * Returns whether the color is monochrome.
419
+ */
420
+ isMonochrome() {
421
+ const { s: t } = this.toHsl();
422
+ return t === 0;
423
+ }
424
+ /**
425
+ * Returns the object as a HSVA object.
426
+ */
427
+ toHsv() {
428
+ const t = R(this.r, this.g, this.b);
429
+ return { h: t.h * 360, s: t.s, v: t.v, a: this.a };
430
+ }
431
+ toHsv_() {
432
+ const t = R(this.r, this.g, this.b);
433
+ return { h: t.h, s: t.s, v: t.v, a: this.a };
434
+ }
435
+ /**
436
+ * Returns the hsva values interpolated into a string with the following format:
437
+ * "hsva(xxx, xxx, xxx, xx)".
438
+ */
439
+ toHsvString() {
440
+ const t = R(this.r, this.g, this.b), e = Math.round(t.h * 360), a = Math.round(t.s * 100), n = Math.round(t.v * 100);
441
+ return this.a === 1 ? `hsv(${e}, ${a}%, ${n}%)` : `hsva(${e}, ${a}%, ${n}%, ${this.roundA})`;
442
+ }
443
+ /**
444
+ * Returns the object as a HSLA object.
445
+ */
446
+ toHsl() {
447
+ const t = q(this.r, this.g, this.b);
448
+ return { h: t.h * 360, s: t.s, l: t.l, a: this.a };
449
+ }
450
+ /**
451
+ * Returns the hsla values interpolated into a string with the following format:
452
+ * "hsla(xxx, xxx, xxx, xx)".
453
+ */
454
+ toHslString() {
455
+ const t = q(this.r, this.g, this.b), e = Math.round(t.h * 360), a = Math.round(t.s * 100), n = Math.round(t.l * 100);
456
+ return this.a === 1 ? `hsl(${e}, ${a}%, ${n}%)` : `hsla(${e}, ${a}%, ${n}%, ${this.roundA})`;
457
+ }
458
+ /**
459
+ * Returns the hex value of the color.
460
+ * @param allow3Char will shorten hex value to 3 char if possible
461
+ */
462
+ toHex(t = !1) {
463
+ return T(this.r, this.g, this.b, t);
464
+ }
465
+ /**
466
+ * Returns the hex value of the color -with a # prefixed.
467
+ * @param allow3Char will shorten hex value to 3 char if possible
468
+ */
469
+ toHexString(t = !1) {
470
+ return `#${this.toHex(t)}`;
471
+ }
472
+ /**
473
+ * Returns the hex 8 value of the color.
474
+ * @param allow4Char will shorten hex value to 4 char if possible
475
+ */
476
+ toHex8(t = !1) {
477
+ return be(this.r, this.g, this.b, this.a, t);
478
+ }
479
+ /**
480
+ * Returns the hex 8 value of the color -with a # prefixed.
481
+ * @param allow4Char will shorten hex value to 4 char if possible
482
+ */
483
+ toHex8String(t = !1) {
484
+ return `#${this.toHex8(t)}`;
485
+ }
486
+ /**
487
+ * Returns the shorter hex value of the color depends on its alpha -with a # prefixed.
488
+ * @param allowShortChar will shorten hex value to 3 or 4 char if possible
489
+ */
490
+ toHexShortString(t = !1) {
491
+ return this.a === 1 ? this.toHexString(t) : this.toHex8String(t);
492
+ }
493
+ /**
494
+ * Returns the object as a RGBA object.
495
+ */
496
+ toRgb() {
497
+ return {
498
+ r: Math.round(this.r),
499
+ g: Math.round(this.g),
500
+ b: Math.round(this.b),
501
+ a: this.a
502
+ };
503
+ }
504
+ toRgba() {
505
+ return this.toRgb();
506
+ }
507
+ toRgbArray() {
508
+ const t = this.toRgb();
509
+ return [t.r, t.g, t.b];
510
+ }
511
+ toRgbArrayString() {
512
+ const t = this.toRgb();
513
+ return `${t.r},${t.g},${t.b}`;
514
+ }
515
+ /**
516
+ * Returns the RGBA values interpolated into a string with the following format:
517
+ * "RGBA(xxx, xxx, xxx, xx)".
518
+ */
519
+ toRgbString() {
520
+ const t = Math.round(this.r), e = Math.round(this.g), a = Math.round(this.b);
521
+ return this.a === 1 ? `rgb(${t}, ${e}, ${a})` : `rgba(${t}, ${e}, ${a}, ${this.roundA})`;
522
+ }
523
+ toRgbaString() {
524
+ const t = Math.round(this.r), e = Math.round(this.g), a = Math.round(this.b);
525
+ return `rgba(${t}, ${e}, ${a}, ${this.roundA})`;
526
+ }
527
+ /**
528
+ * Returns the object as a RGBA object.
529
+ */
530
+ toPercentageRgb() {
531
+ const t = (e) => `${Math.round(l(e, 255) * 100)}%`;
532
+ return {
533
+ r: t(this.r),
534
+ g: t(this.g),
535
+ b: t(this.b),
536
+ a: this.a
537
+ };
538
+ }
539
+ /**
540
+ * Returns the RGBA relative values interpolated into a string
541
+ */
542
+ toPercentageRgbString() {
543
+ const t = (e) => Math.round(l(e, 255) * 100);
544
+ return this.a === 1 ? `rgb(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%)` : `rgba(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%, ${this.roundA})`;
545
+ }
546
+ toCmyk() {
547
+ return {
548
+ ...O(this.r, this.g, this.b)
549
+ };
550
+ }
551
+ toCmykString() {
552
+ const { c: t, m: e, y: a, k: n } = O(this.r, this.g, this.b);
553
+ return `cmyk(${t}, ${e}, ${a}, ${n})`;
554
+ }
555
+ /**
556
+ * The 'real' name of the color -if there is one.
557
+ */
558
+ toName() {
559
+ if (this.a === 0)
560
+ return "transparent";
561
+ if (this.a < 1)
562
+ return !1;
563
+ const t = `#${T(this.r, this.g, this.b, !1)}`;
564
+ for (const [e, a] of Object.entries(C))
565
+ if (t === a)
566
+ return e;
567
+ return !1;
568
+ }
569
+ toString(t) {
570
+ const e = !!t;
571
+ t = t ?? this.format;
572
+ let a = !1;
573
+ const n = this.a < 1 && this.a >= 0;
574
+ return !e && n && (t.startsWith("hex") || t === "name") ? t === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (a = this.toRgbString()), t === "prgb" && (a = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (a = this.toHexString()), t === "hex3" && (a = this.toHexString(!0)), t === "hex4" && (a = this.toHex8String(!0)), t === "hex8" && (a = this.toHex8String()), t === "name" && (a = this.toName()), t === "hsl" && (a = this.toHslString()), t === "hsv" && (a = this.toHsvString()), t === "cmyk" && (a = this.toCmykString()), a || this.toHexString());
575
+ }
576
+ toNumber() {
577
+ return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
578
+ }
579
+ clone() {
580
+ return new o(this.toString());
581
+ }
582
+ /**
583
+ * Lighten the color a given amount. Providing 100 will always return white.
584
+ * @param amount - valid between 1-100
585
+ */
586
+ lighten(t = 10) {
587
+ const e = this.toHsl();
588
+ return e.l += t / 100, e.l = A(e.l), new o(e);
589
+ }
590
+ /**
591
+ * Brighten the color a given amount, from 0 to 100.
592
+ * @param amount - valid between 1-100
593
+ */
594
+ brighten(t = 10) {
595
+ const e = this.toRgb();
596
+ return e.r = Math.max(
597
+ 0,
598
+ Math.min(255, e.r - Math.round(255 * -(t / 100)))
599
+ ), e.g = Math.max(
600
+ 0,
601
+ Math.min(255, e.g - Math.round(255 * -(t / 100)))
602
+ ), e.b = Math.max(
603
+ 0,
604
+ Math.min(255, e.b - Math.round(255 * -(t / 100)))
605
+ ), new o(e);
606
+ }
607
+ /**
608
+ * Darken the color a given amount, from 0 to 100.
609
+ * Providing 100 will always return black.
610
+ * @param amount - valid between 1-100
611
+ */
612
+ darken(t = 10) {
613
+ const e = this.toHsl();
614
+ return e.l -= t / 100, e.l = A(e.l), new o(e);
615
+ }
616
+ /**
617
+ * Mix the color with pure white, from 0 to 100.
618
+ * Providing 0 will do nothing, providing 100 will always return white.
619
+ * @param amount - valid between 1-100
620
+ */
621
+ tint(t = 10) {
622
+ return this.mix("white", t);
623
+ }
624
+ /**
625
+ * Mix the color with pure black, from 0 to 100.
626
+ * Providing 0 will do nothing, providing 100 will always return black.
627
+ * @param amount - valid between 1-100
628
+ */
629
+ shade(t = 10) {
630
+ return this.mix("black", t);
631
+ }
632
+ /**
633
+ * Desaturate the color a given amount, from 0 to 100.
634
+ * Providing 100 will is the same as calling greyscale
635
+ * @param amount - valid between 1-100
636
+ */
637
+ desaturate(t = 10) {
638
+ const e = this.toHsl();
639
+ return e.s -= t / 100, e.s = A(e.s), new o(e);
640
+ }
641
+ /**
642
+ * Saturate the color a given amount, from 0 to 100.
643
+ * @param amount - valid between 1-100
644
+ */
645
+ saturate(t = 10) {
646
+ const e = this.toHsl();
647
+ return e.s += t / 100, e.s = A(e.s), new o(e);
648
+ }
649
+ /**
650
+ * Completely desaturates a color into greyscale.
651
+ * Same as calling `desaturate(100)`
652
+ */
653
+ greyscale() {
654
+ return this.desaturate(100);
655
+ }
656
+ /**
657
+ * Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
658
+ * Values outside of this range will be wrapped into this range.
659
+ */
660
+ spin(t) {
661
+ const e = this.toHsl(), a = (e.h + t) % 360;
662
+ return e.h = a < 0 ? 360 + a : a, new o(e);
663
+ }
664
+ /**
665
+ * Mix the current color a given amount with another color, from 0 to 100.
666
+ * 0 means no mixing (return current color).
667
+ */
668
+ mix(t, e = 50) {
669
+ const a = this.toRgb(), n = new o(t).toRgb(), s = e / 100, i = {
670
+ r: (n.r - a.r) * s + a.r,
671
+ g: (n.g - a.g) * s + a.g,
672
+ b: (n.b - a.b) * s + a.b,
673
+ a: (n.a - a.a) * s + a.a
674
+ };
675
+ return new o(i);
676
+ }
677
+ analogous(t = 6, e = 30) {
678
+ const a = this.toHsl(), n = 360 / e, s = [this];
679
+ for (a.h = (a.h - (n * t >> 1) + 720) % 360; --t; )
680
+ a.h = (a.h + n) % 360, s.push(new o(a));
681
+ return s;
682
+ }
683
+ /**
684
+ * taken from https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js
685
+ */
686
+ complement() {
687
+ const t = this.toHsl();
688
+ return t.h = (t.h + 180) % 360, new o(t);
689
+ }
690
+ monochromatic(t = 6) {
691
+ const e = this.toHsv(), { h: a } = e, { s: n } = e;
692
+ let { v: s } = e;
693
+ const i = [], h = 1 / t;
694
+ for (; t--; )
695
+ i.push(new o({ h: a, s: n, v: s })), s = (s + h) % 1;
696
+ return i;
697
+ }
698
+ splitcomplement() {
699
+ const t = this.toHsl(), { h: e } = t;
700
+ return [
701
+ this,
702
+ new o({ h: (e + 72) % 360, s: t.s, l: t.l }),
703
+ new o({ h: (e + 216) % 360, s: t.s, l: t.l })
704
+ ];
705
+ }
706
+ /**
707
+ * Compute how the color would appear on a background
708
+ */
709
+ onBackground(t) {
710
+ const e = this.toRgb(), a = new o(t).toRgb(), n = e.a + a.a * (1 - e.a);
711
+ return new o({
712
+ r: (e.r * e.a + a.r * a.a * (1 - e.a)) / n,
713
+ g: (e.g * e.a + a.g * a.a * (1 - e.a)) / n,
714
+ b: (e.b * e.a + a.b * a.a * (1 - e.a)) / n,
715
+ a: n
716
+ });
717
+ }
718
+ /**
719
+ * Alias for `polyad(3)`
720
+ */
721
+ triad() {
722
+ return this.polyad(3);
723
+ }
724
+ /**
725
+ * Alias for `polyad(4)`
726
+ */
727
+ tetrad() {
728
+ return this.polyad(4);
729
+ }
730
+ /**
731
+ * Get polyad colors, like (for 1, 2, 3, 4, 5, 6, 7, 8, etc...)
732
+ * monad, dyad, triad, tetrad, pentad, hexad, heptad, octad, etc...
733
+ */
734
+ polyad(t) {
735
+ const e = this.toHsl(), { h: a } = e, n = [this], s = 360 / t;
736
+ for (let i = 1; i < t; i++)
737
+ n.push(
738
+ new o({ h: (a + i * s) % 360, s: e.s, l: e.l })
739
+ );
740
+ return n;
741
+ }
742
+ /**
743
+ * compare color vs current color
744
+ */
745
+ equals(t) {
746
+ const e = new o(t);
747
+ return this.format === "cmyk" || e.format === "cmyk" ? this.toCmykString() === e.toCmykString() : this.toRgbString() === e.toRgbString();
748
+ }
749
+ }
750
+ const $ = 10, k = {
751
+ name: { zh: "中性灰", en: "gray" },
752
+ value: "#6B6C6D"
753
+ }, G = {
754
+ name: { zh: "浪漫红", en: "red" },
755
+ value: "#F53F3F"
756
+ }, U = {
757
+ name: { zh: "晚秋红", en: "orangered" },
758
+ value: "#FF702E"
759
+ }, J = {
760
+ name: { zh: "活力橙", en: "orange" },
761
+ value: "#FFA500"
762
+ }, K = {
763
+ name: { zh: "黄昏", en: "gold" },
764
+ value: "#FFBD14"
765
+ }, Q = {
766
+ name: { zh: "柠檬黄", en: "yellow" },
767
+ value: "#FFE014"
768
+ }, X = {
769
+ name: { zh: "新生绿", en: "lime" },
770
+ value: "#A1E619"
771
+ }, Y = {
772
+ name: { zh: "仙野绿", en: "green" },
773
+ value: "#00B82B"
774
+ }, Z = {
775
+ name: { zh: "碧涛青", en: "cyan" },
776
+ value: "#0BD0D0"
777
+ }, _ = {
778
+ name: { zh: "海蔚蓝", en: "blue" },
779
+ value: "#2E8FFF"
780
+ }, ee = {
781
+ name: { zh: "极致蓝", en: "pqbblue" },
782
+ value: "#1A5EFF"
783
+ }, te = {
784
+ name: { zh: "暗夜紫", en: "purple" },
785
+ value: "#7126D9"
786
+ }, re = {
787
+ name: { zh: "青春紫", en: "pinkpurple" },
788
+ value: "#D91AD9"
789
+ }, ae = {
790
+ name: { zh: "品红", en: "magenta" },
791
+ value: "#FF299F"
792
+ }, z = [
793
+ G,
794
+ U,
795
+ J,
796
+ K,
797
+ Q,
798
+ X,
799
+ Y,
800
+ Z,
801
+ _,
802
+ ee,
803
+ te,
804
+ re,
805
+ ae
806
+ ];
807
+ var W, I;
808
+ const ne = {
809
+ key: ((W = k.name) == null ? void 0 : W.en) ?? ((I = k.name) == null ? void 0 : I.zh) ?? k.name,
810
+ name: k.name,
811
+ primary: k.value,
812
+ light: [
813
+ "#F7F8F9",
814
+ "#F2F3F4",
815
+ "#E5E6E7",
816
+ "#C9CACB",
817
+ "#A9ABAC",
818
+ "#868788",
819
+ k.value,
820
+ "#4D4E4F",
821
+ "#28292A",
822
+ "#1E1F20"
823
+ ],
824
+ dark: [
825
+ "#121213",
826
+ "#1C1C1D",
827
+ "#404142",
828
+ "#5E5F60",
829
+ "#797A7B",
830
+ "#9C9E9F",
831
+ "#BCBDBE",
832
+ "#D8D9DB",
833
+ "#E4E6E8",
834
+ "#E8EBEE"
835
+ ]
836
+ }, we = z.map((r, t, e) => {
837
+ const a = r.name, n = (a == null ? void 0 : a.en) ?? (a == null ? void 0 : a.zh) ?? a, s = r.value;
838
+ return {
839
+ key: n,
840
+ name: a,
841
+ primary: s,
842
+ light: ie({ color: s, length: $ }),
843
+ dark: he({ color: s, length: $ })
844
+ };
845
+ }).concat([ne]);
846
+ function B(r = {}) {
847
+ const { length: t, color: e, level: a } = r, n = (t ?? $) / 2 + 1, s = a ?? n;
848
+ let i = new o(e);
849
+ const h = i.toHsv(), u = h.h, d = h.s, m = h.v, M = u === 0 && d === 0, D = s < n, x = Math.abs(n - s), oe = 1, N = 0.1;
850
+ let v = d;
851
+ v > N && (D ? v = d - (d - N) / (n - 1) * x : v = d + (oe - d) / (n - 1) * x), M && (v = d);
852
+ const le = M ? 0.97 : 1, j = 0.1;
853
+ let w = m;
854
+ return w > j && (D ? w = m + (le - m) / (n - 1) * x : w = m - (m - j) / (n - 1) * x), i = new o({
855
+ h: u,
856
+ s: v,
857
+ v: w
858
+ }), r.dark && (i = i.darken(r.amount ?? 10)), i.toHexString();
859
+ }
860
+ function se(r = {}) {
861
+ return B({ ...r, dark: !0 });
862
+ }
863
+ function ie(r = {}) {
864
+ const { length: t } = r;
865
+ return Array.from(new Array(t ?? $), (e, a) => {
866
+ const n = a + 1;
867
+ return B({ ...r, level: n });
868
+ });
869
+ }
870
+ function he(r = {}) {
871
+ const { length: t } = r;
872
+ return Array.from(new Array(t ?? $), (e, a) => {
873
+ const n = a + 1;
874
+ return se({
875
+ ...r,
876
+ level: $ - n + 1
877
+ });
878
+ });
879
+ }
880
+ const Se = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
881
+ __proto__: null,
882
+ LENGTH: $,
883
+ blue: _,
884
+ colorPresets: we,
885
+ colors: z,
886
+ cyan: Z,
887
+ default: z,
888
+ generate: ie,
889
+ generateDark: he,
890
+ gold: K,
891
+ gray: k,
892
+ grayPresets: ne,
893
+ green: Y,
894
+ lime: X,
895
+ magenta: ae,
896
+ orange: J,
897
+ orangered: U,
898
+ palette: B,
899
+ paletteDark: se,
900
+ pinkpurple: re,
901
+ pqbblue: ee,
902
+ purple: te,
903
+ red: G,
904
+ yellow: Q
905
+ }, Symbol.toStringTag, { value: "Module" }));
906
+ export {
907
+ ge as A,
908
+ O as C,
909
+ T as H,
910
+ ye as N,
911
+ Se as R,
912
+ de as S,
913
+ q as T,
914
+ be as W,
915
+ pe as a,
916
+ g as b,
917
+ o as c,
918
+ V as d,
919
+ C as e,
920
+ P as j,
921
+ ce as k,
922
+ R as l,
923
+ f as n,
924
+ Ae as p,
925
+ ve as w,
926
+ me as y
927
+ };