@antv/util 3.1.0 → 3.2.0

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 (997) hide show
  1. package/README.md +13 -1
  2. package/dist/util.min.js +1 -1
  3. package/esm/color/arr2rgb.js +3 -3
  4. package/esm/color/arr2rgb.js.map +1 -1
  5. package/esm/color/gradient.js +9 -9
  6. package/esm/color/gradient.js.map +1 -1
  7. package/esm/color/tocssgradient.js +18 -18
  8. package/esm/color/tocssgradient.js.map +1 -1
  9. package/esm/color/torgb.js +6 -6
  10. package/esm/color/torgb.js.map +1 -1
  11. package/esm/helper/to-radian.js +1 -1
  12. package/esm/helper/to-radian.js.map +1 -1
  13. package/esm/index.d.ts +1 -0
  14. package/esm/index.js +1 -0
  15. package/esm/index.js.map +1 -1
  16. package/esm/lodash/augment.d.ts +2 -0
  17. package/esm/lodash/augment.js +18 -0
  18. package/esm/lodash/augment.js.map +1 -0
  19. package/esm/lodash/cache.d.ts +14 -0
  20. package/esm/lodash/cache.js +30 -0
  21. package/esm/lodash/cache.js.map +1 -0
  22. package/esm/lodash/clamp.d.ts +2 -0
  23. package/esm/lodash/clamp.js +11 -0
  24. package/esm/lodash/clamp.js.map +1 -0
  25. package/esm/lodash/clear-animation-frame.d.ts +1 -0
  26. package/esm/lodash/clear-animation-frame.js +12 -0
  27. package/esm/lodash/clear-animation-frame.js.map +1 -0
  28. package/esm/lodash/clone.d.ts +2 -0
  29. package/esm/lodash/clone.js +32 -0
  30. package/esm/lodash/clone.js.map +1 -0
  31. package/esm/lodash/contains.d.ts +2 -0
  32. package/esm/lodash/contains.js +9 -0
  33. package/esm/lodash/contains.js.map +1 -0
  34. package/esm/lodash/debounce.d.ts +2 -0
  35. package/esm/lodash/debounce.js +20 -0
  36. package/esm/lodash/debounce.js.map +1 -0
  37. package/esm/lodash/deep-mix.d.ts +2 -0
  38. package/esm/lodash/deep-mix.js +43 -0
  39. package/esm/lodash/deep-mix.js.map +1 -0
  40. package/esm/lodash/difference.d.ts +11 -0
  41. package/esm/lodash/difference.js +17 -0
  42. package/esm/lodash/difference.js.map +1 -0
  43. package/esm/lodash/each.d.ts +2 -0
  44. package/esm/lodash/each.js +28 -0
  45. package/esm/lodash/each.js.map +1 -0
  46. package/esm/lodash/ends-with.d.ts +3 -0
  47. package/esm/lodash/ends-with.js +7 -0
  48. package/esm/lodash/ends-with.js.map +1 -0
  49. package/esm/lodash/every.d.ts +7 -0
  50. package/esm/lodash/every.js +14 -0
  51. package/esm/lodash/every.js.map +1 -0
  52. package/esm/lodash/extend.d.ts +2 -0
  53. package/esm/lodash/extend.js +33 -0
  54. package/esm/lodash/extend.js.map +1 -0
  55. package/esm/lodash/filter.d.ts +2 -0
  56. package/esm/lodash/filter.js +16 -0
  57. package/esm/lodash/filter.js.map +1 -0
  58. package/esm/lodash/find-index.d.ts +2 -0
  59. package/esm/lodash/find-index.js +12 -0
  60. package/esm/lodash/find-index.js.map +1 -0
  61. package/esm/lodash/find.d.ts +3 -0
  62. package/esm/lodash/find.js +25 -0
  63. package/esm/lodash/find.js.map +1 -0
  64. package/esm/lodash/first-value.d.ts +2 -0
  65. package/esm/lodash/first-value.js +21 -0
  66. package/esm/lodash/first-value.js.map +1 -0
  67. package/esm/lodash/fixed-base.d.ts +2 -0
  68. package/esm/lodash/fixed-base.js +14 -0
  69. package/esm/lodash/fixed-base.js.map +1 -0
  70. package/esm/lodash/flatten-deep.d.ts +12 -0
  71. package/esm/lodash/flatten-deep.js +25 -0
  72. package/esm/lodash/flatten-deep.js.map +1 -0
  73. package/esm/lodash/flatten.d.ts +11 -0
  74. package/esm/lodash/flatten.js +22 -0
  75. package/esm/lodash/flatten.js.map +1 -0
  76. package/esm/lodash/for-in.d.ts +2 -0
  77. package/esm/lodash/for-in.js +3 -0
  78. package/esm/lodash/for-in.js.map +1 -0
  79. package/esm/lodash/get-range.d.ts +6 -0
  80. package/esm/lodash/get-range.js +29 -0
  81. package/esm/lodash/get-range.js.map +1 -0
  82. package/esm/lodash/get-type.d.ts +2 -0
  83. package/esm/lodash/get-type.js +9 -0
  84. package/esm/lodash/get-type.js.map +1 -0
  85. package/esm/lodash/get-wrap-behavior.d.ts +9 -0
  86. package/esm/lodash/get-wrap-behavior.js +12 -0
  87. package/esm/lodash/get-wrap-behavior.js.map +1 -0
  88. package/esm/lodash/get.d.ts +8 -0
  89. package/esm/lodash/get.js +16 -0
  90. package/esm/lodash/get.js.map +1 -0
  91. package/esm/lodash/group-by.d.ts +6 -0
  92. package/esm/lodash/group-by.js +25 -0
  93. package/esm/lodash/group-by.js.map +1 -0
  94. package/esm/lodash/group-to-map.d.ts +8 -0
  95. package/esm/lodash/group-to-map.js +29 -0
  96. package/esm/lodash/group-to-map.js.map +1 -0
  97. package/esm/lodash/group.d.ts +2 -0
  98. package/esm/lodash/group.js +14 -0
  99. package/esm/lodash/group.js.map +1 -0
  100. package/esm/lodash/has-key.d.ts +2 -0
  101. package/esm/lodash/has-key.js +3 -0
  102. package/esm/lodash/has-key.js.map +1 -0
  103. package/esm/lodash/has-value.d.ts +2 -0
  104. package/esm/lodash/has-value.js +4 -0
  105. package/esm/lodash/has-value.js.map +1 -0
  106. package/esm/lodash/has.d.ts +2 -0
  107. package/esm/lodash/has.js +2 -0
  108. package/esm/lodash/has.js.map +1 -0
  109. package/esm/lodash/head.d.ts +1 -0
  110. package/esm/lodash/head.js +8 -0
  111. package/esm/lodash/head.js.map +1 -0
  112. package/esm/lodash/identity.d.ts +2 -0
  113. package/esm/lodash/identity.js +2 -0
  114. package/esm/lodash/identity.js.map +1 -0
  115. package/esm/lodash/index-of.d.ts +2 -0
  116. package/esm/lodash/index-of.js +20 -0
  117. package/esm/lodash/index-of.js.map +1 -0
  118. package/esm/lodash/index.d.ts +108 -0
  119. package/esm/lodash/index.js +118 -0
  120. package/esm/lodash/index.js.map +1 -0
  121. package/esm/lodash/is-arguments.d.ts +2 -0
  122. package/esm/lodash/is-arguments.js +12 -0
  123. package/esm/lodash/is-arguments.js.map +1 -0
  124. package/esm/lodash/is-array-like.d.ts +2 -0
  125. package/esm/lodash/is-array-like.js +11 -0
  126. package/esm/lodash/is-array-like.js.map +1 -0
  127. package/esm/lodash/is-array.d.ts +2 -0
  128. package/esm/lodash/is-array.js +5 -0
  129. package/esm/lodash/is-array.js.map +1 -0
  130. package/esm/lodash/is-boolean.d.ts +2 -0
  131. package/esm/lodash/is-boolean.js +12 -0
  132. package/esm/lodash/is-boolean.js.map +1 -0
  133. package/esm/lodash/is-date.d.ts +2 -0
  134. package/esm/lodash/is-date.js +6 -0
  135. package/esm/lodash/is-date.js.map +1 -0
  136. package/esm/lodash/is-decimal.d.ts +2 -0
  137. package/esm/lodash/is-decimal.js +6 -0
  138. package/esm/lodash/is-decimal.js.map +1 -0
  139. package/esm/lodash/is-element.d.ts +6 -0
  140. package/esm/lodash/is-element.js +9 -0
  141. package/esm/lodash/is-element.js.map +1 -0
  142. package/esm/lodash/is-empty.d.ts +2 -0
  143. package/esm/lodash/is-empty.js +37 -0
  144. package/esm/lodash/is-empty.js.map +1 -0
  145. package/esm/lodash/is-equal-with.d.ts +24 -0
  146. package/esm/lodash/is-equal-with.js +31 -0
  147. package/esm/lodash/is-equal-with.js.map +1 -0
  148. package/esm/lodash/is-equal.d.ts +2 -0
  149. package/esm/lodash/is-equal.js +45 -0
  150. package/esm/lodash/is-equal.js.map +1 -0
  151. package/esm/lodash/is-error.d.ts +2 -0
  152. package/esm/lodash/is-error.js +12 -0
  153. package/esm/lodash/is-error.js.map +1 -0
  154. package/esm/lodash/is-even.d.ts +2 -0
  155. package/esm/lodash/is-even.js +6 -0
  156. package/esm/lodash/is-even.js.map +1 -0
  157. package/esm/lodash/is-finite.d.ts +1 -0
  158. package/esm/lodash/is-finite.js +9 -0
  159. package/esm/lodash/is-finite.js.map +1 -0
  160. package/esm/lodash/is-function.d.ts +2 -0
  161. package/esm/lodash/is-function.js +10 -0
  162. package/esm/lodash/is-function.js.map +1 -0
  163. package/esm/lodash/is-integer.d.ts +2 -0
  164. package/esm/lodash/is-integer.js +8 -0
  165. package/esm/lodash/is-integer.js.map +1 -0
  166. package/esm/lodash/is-match.d.ts +2 -0
  167. package/esm/lodash/is-match.js +17 -0
  168. package/esm/lodash/is-match.js.map +1 -0
  169. package/esm/lodash/is-negative.d.ts +2 -0
  170. package/esm/lodash/is-negative.js +6 -0
  171. package/esm/lodash/is-negative.js.map +1 -0
  172. package/esm/lodash/is-nil.d.ts +2 -0
  173. package/esm/lodash/is-nil.js +10 -0
  174. package/esm/lodash/is-nil.js.map +1 -0
  175. package/esm/lodash/is-null.d.ts +2 -0
  176. package/esm/lodash/is-null.js +5 -0
  177. package/esm/lodash/is-null.js.map +1 -0
  178. package/esm/lodash/is-number-equal.d.ts +1 -0
  179. package/esm/lodash/is-number-equal.js +6 -0
  180. package/esm/lodash/is-number-equal.js.map +1 -0
  181. package/esm/lodash/is-number.d.ts +2 -0
  182. package/esm/lodash/is-number.js +10 -0
  183. package/esm/lodash/is-number.js.map +1 -0
  184. package/esm/lodash/is-object-like.d.ts +2 -0
  185. package/esm/lodash/is-object-like.js +11 -0
  186. package/esm/lodash/is-object-like.js.map +1 -0
  187. package/esm/lodash/is-object.d.ts +2 -0
  188. package/esm/lodash/is-object.js +11 -0
  189. package/esm/lodash/is-object.js.map +1 -0
  190. package/esm/lodash/is-odd.d.ts +2 -0
  191. package/esm/lodash/is-odd.js +6 -0
  192. package/esm/lodash/is-odd.js.map +1 -0
  193. package/esm/lodash/is-plain-object.d.ts +2 -0
  194. package/esm/lodash/is-plain-object.js +23 -0
  195. package/esm/lodash/is-plain-object.js.map +1 -0
  196. package/esm/lodash/is-positive.d.ts +2 -0
  197. package/esm/lodash/is-positive.js +6 -0
  198. package/esm/lodash/is-positive.js.map +1 -0
  199. package/esm/lodash/is-prototype.d.ts +2 -0
  200. package/esm/lodash/is-prototype.js +8 -0
  201. package/esm/lodash/is-prototype.js.map +1 -0
  202. package/esm/lodash/is-reg-exp.d.ts +2 -0
  203. package/esm/lodash/is-reg-exp.js +6 -0
  204. package/esm/lodash/is-reg-exp.js.map +1 -0
  205. package/esm/lodash/is-segment-equal.d.ts +2 -0
  206. package/esm/lodash/is-segment-equal.js +15 -0
  207. package/esm/lodash/is-segment-equal.js.map +1 -0
  208. package/esm/lodash/is-string.d.ts +2 -0
  209. package/esm/lodash/is-string.js +5 -0
  210. package/esm/lodash/is-string.js.map +1 -0
  211. package/esm/lodash/is-type.d.ts +2 -0
  212. package/esm/lodash/is-type.js +4 -0
  213. package/esm/lodash/is-type.js.map +1 -0
  214. package/esm/lodash/is-undefined.d.ts +2 -0
  215. package/esm/lodash/is-undefined.js +5 -0
  216. package/esm/lodash/is-undefined.js.map +1 -0
  217. package/esm/lodash/keys.d.ts +2 -0
  218. package/esm/lodash/keys.js +15 -0
  219. package/esm/lodash/keys.js.map +1 -0
  220. package/esm/lodash/last.d.ts +1 -0
  221. package/esm/lodash/last.js +9 -0
  222. package/esm/lodash/last.js.map +1 -0
  223. package/esm/lodash/lower-case.d.ts +2 -0
  224. package/esm/lodash/lower-case.js +6 -0
  225. package/esm/lodash/lower-case.js.map +1 -0
  226. package/esm/lodash/lower-first.d.ts +2 -0
  227. package/esm/lodash/lower-first.js +7 -0
  228. package/esm/lodash/lower-first.js.map +1 -0
  229. package/esm/lodash/map-values.d.ts +6 -0
  230. package/esm/lodash/map-values.js +15 -0
  231. package/esm/lodash/map-values.js.map +1 -0
  232. package/esm/lodash/map.d.ts +2 -0
  233. package/esm/lodash/map.js +15 -0
  234. package/esm/lodash/map.js.map +1 -0
  235. package/esm/lodash/max-by.d.ts +16 -0
  236. package/esm/lodash/max-by.js +33 -0
  237. package/esm/lodash/max-by.js.map +1 -0
  238. package/esm/lodash/max.d.ts +19 -0
  239. package/esm/lodash/max.js +27 -0
  240. package/esm/lodash/max.js.map +1 -0
  241. package/esm/lodash/memoize.d.ts +11 -0
  242. package/esm/lodash/memoize.js +31 -0
  243. package/esm/lodash/memoize.js.map +1 -0
  244. package/esm/lodash/merge.d.ts +7 -0
  245. package/esm/lodash/merge.js +13 -0
  246. package/esm/lodash/merge.js.map +1 -0
  247. package/esm/lodash/min-by.d.ts +16 -0
  248. package/esm/lodash/min-by.js +33 -0
  249. package/esm/lodash/min-by.js.map +1 -0
  250. package/esm/lodash/min.d.ts +19 -0
  251. package/esm/lodash/min.js +27 -0
  252. package/esm/lodash/min.js.map +1 -0
  253. package/esm/lodash/mix.d.ts +1 -0
  254. package/esm/lodash/mix.js +18 -0
  255. package/esm/lodash/mix.js.map +1 -0
  256. package/esm/lodash/mod.d.ts +2 -0
  257. package/esm/lodash/mod.js +5 -0
  258. package/esm/lodash/mod.js.map +1 -0
  259. package/esm/lodash/noop.d.ts +2 -0
  260. package/esm/lodash/noop.js +2 -0
  261. package/esm/lodash/noop.js.map +1 -0
  262. package/esm/lodash/number2color.d.ts +2 -0
  263. package/esm/lodash/number2color.js +16 -0
  264. package/esm/lodash/number2color.js.map +1 -0
  265. package/esm/lodash/omit.d.ts +3 -0
  266. package/esm/lodash/omit.js +10 -0
  267. package/esm/lodash/omit.js.map +1 -0
  268. package/esm/lodash/parse-radius.d.ts +9 -0
  269. package/esm/lodash/parse-radius.js +35 -0
  270. package/esm/lodash/parse-radius.js.map +1 -0
  271. package/esm/lodash/pick.d.ts +16 -0
  272. package/esm/lodash/pick.js +16 -0
  273. package/esm/lodash/pick.js.map +1 -0
  274. package/esm/lodash/pull-at.d.ts +2 -0
  275. package/esm/lodash/pull-at.js +20 -0
  276. package/esm/lodash/pull-at.js.map +1 -0
  277. package/esm/lodash/pull.d.ts +2 -0
  278. package/esm/lodash/pull.js +19 -0
  279. package/esm/lodash/pull.js.map +1 -0
  280. package/esm/lodash/reduce.d.ts +3 -0
  281. package/esm/lodash/reduce.js +15 -0
  282. package/esm/lodash/reduce.js.map +1 -0
  283. package/esm/lodash/remove.d.ts +2 -0
  284. package/esm/lodash/remove.js +28 -0
  285. package/esm/lodash/remove.js.map +1 -0
  286. package/esm/lodash/request-animation-frame.d.ts +1 -0
  287. package/esm/lodash/request-animation-frame.js +14 -0
  288. package/esm/lodash/request-animation-frame.js.map +1 -0
  289. package/esm/lodash/set.d.ts +8 -0
  290. package/esm/lodash/set.js +27 -0
  291. package/esm/lodash/set.js.map +1 -0
  292. package/esm/lodash/size.d.ts +1 -0
  293. package/esm/lodash/size.js +12 -0
  294. package/esm/lodash/size.js.map +1 -0
  295. package/esm/lodash/some.d.ts +7 -0
  296. package/esm/lodash/some.js +14 -0
  297. package/esm/lodash/some.js.map +1 -0
  298. package/esm/lodash/sort-by.d.ts +7 -0
  299. package/esm/lodash/sort-by.js +34 -0
  300. package/esm/lodash/sort-by.js.map +1 -0
  301. package/esm/lodash/starts-with.d.ts +3 -0
  302. package/esm/lodash/starts-with.js +7 -0
  303. package/esm/lodash/starts-with.js.map +1 -0
  304. package/esm/lodash/substitute.d.ts +5 -0
  305. package/esm/lodash/substitute.js +13 -0
  306. package/esm/lodash/substitute.js.map +1 -0
  307. package/esm/lodash/throttle.d.ts +6 -0
  308. package/esm/lodash/throttle.js +42 -0
  309. package/esm/lodash/throttle.js.map +1 -0
  310. package/esm/lodash/to-array.d.ts +2 -0
  311. package/esm/lodash/to-array.js +5 -0
  312. package/esm/lodash/to-array.js.map +1 -0
  313. package/esm/lodash/to-degree.d.ts +2 -0
  314. package/esm/lodash/to-degree.js +6 -0
  315. package/esm/lodash/to-degree.js.map +1 -0
  316. package/esm/lodash/to-integer.d.ts +1 -0
  317. package/esm/lodash/to-integer.js +2 -0
  318. package/esm/lodash/to-integer.js.map +1 -0
  319. package/esm/lodash/to-radian.d.ts +2 -0
  320. package/esm/lodash/to-radian.js +6 -0
  321. package/esm/lodash/to-radian.js.map +1 -0
  322. package/esm/lodash/to-string.d.ts +2 -0
  323. package/esm/lodash/to-string.js +7 -0
  324. package/esm/lodash/to-string.js.map +1 -0
  325. package/esm/lodash/types/index.d.ts +3 -0
  326. package/esm/lodash/types/index.js +2 -0
  327. package/esm/lodash/types/index.js.map +1 -0
  328. package/esm/lodash/union.d.ts +2 -0
  329. package/esm/lodash/union.js +10 -0
  330. package/esm/lodash/union.js.map +1 -0
  331. package/esm/lodash/uniq.d.ts +1 -0
  332. package/esm/lodash/uniq.js +16 -0
  333. package/esm/lodash/uniq.js.map +1 -0
  334. package/esm/lodash/unique-id.d.ts +2 -0
  335. package/esm/lodash/unique-id.js +12 -0
  336. package/esm/lodash/unique-id.js.map +1 -0
  337. package/esm/lodash/upper-case.d.ts +2 -0
  338. package/esm/lodash/upper-case.js +6 -0
  339. package/esm/lodash/upper-case.js.map +1 -0
  340. package/esm/lodash/upper-first.d.ts +2 -0
  341. package/esm/lodash/upper-first.js +7 -0
  342. package/esm/lodash/upper-first.js.map +1 -0
  343. package/esm/lodash/values-of-key.d.ts +2 -0
  344. package/esm/lodash/values-of-key.js +26 -0
  345. package/esm/lodash/values-of-key.js.map +1 -0
  346. package/esm/lodash/values.d.ts +2 -0
  347. package/esm/lodash/values.js +16 -0
  348. package/esm/lodash/values.js.map +1 -0
  349. package/esm/lodash/wrap-behavior.d.ts +9 -0
  350. package/esm/lodash/wrap-behavior.js +19 -0
  351. package/esm/lodash/wrap-behavior.js.map +1 -0
  352. package/esm/matrix/index.js +8 -8
  353. package/esm/matrix/index.js.map +1 -1
  354. package/esm/path/convert/path-2-absolute.js +18 -17
  355. package/esm/path/convert/path-2-absolute.js.map +1 -1
  356. package/esm/path/convert/path-2-curve.js +15 -13
  357. package/esm/path/convert/path-2-curve.js.map +1 -1
  358. package/esm/path/convert/path-2-string.js +3 -2
  359. package/esm/path/convert/path-2-string.js.map +1 -1
  360. package/esm/path/parser/finalize-segment.js +6 -5
  361. package/esm/path/parser/finalize-segment.js.map +1 -1
  362. package/esm/path/parser/is-space.js +1 -1
  363. package/esm/path/parser/is-space.js.map +1 -1
  364. package/esm/path/parser/params-count.js +1 -1
  365. package/esm/path/parser/params-count.js.map +1 -1
  366. package/esm/path/parser/params-parser.js +1 -1
  367. package/esm/path/parser/params-parser.js.map +1 -1
  368. package/esm/path/parser/parse-path-string.js +1 -1
  369. package/esm/path/parser/parse-path-string.js.map +1 -1
  370. package/esm/path/parser/path-parser.js +5 -3
  371. package/esm/path/parser/path-parser.js.map +1 -1
  372. package/esm/path/parser/scan-flag.js +3 -3
  373. package/esm/path/parser/scan-flag.js.map +1 -1
  374. package/esm/path/parser/scan-param.js +12 -12
  375. package/esm/path/parser/scan-param.js.map +1 -1
  376. package/esm/path/parser/scan-segment.js +5 -5
  377. package/esm/path/parser/scan-segment.js.map +1 -1
  378. package/esm/path/parser/skip-spaces.js +1 -1
  379. package/esm/path/parser/skip-spaces.js.map +1 -1
  380. package/esm/path/process/arc-2-cubic.js +43 -42
  381. package/esm/path/process/arc-2-cubic.js.map +1 -1
  382. package/esm/path/process/clone-path.js +2 -1
  383. package/esm/path/process/clone-path.js.map +1 -1
  384. package/esm/path/process/fix-arc.js +2 -2
  385. package/esm/path/process/fix-arc.js.map +1 -1
  386. package/esm/path/process/line-2-cubic.js +13 -12
  387. package/esm/path/process/line-2-cubic.js.map +1 -1
  388. package/esm/path/process/normalize-path.js +10 -9
  389. package/esm/path/process/normalize-path.js.map +1 -1
  390. package/esm/path/process/normalize-segment.js +12 -11
  391. package/esm/path/process/normalize-segment.js.map +1 -1
  392. package/esm/path/process/quad-2-cubic.js +2 -2
  393. package/esm/path/process/quad-2-cubic.js.map +1 -1
  394. package/esm/path/process/reverse-curve.js +7 -6
  395. package/esm/path/process/reverse-curve.js.map +1 -1
  396. package/esm/path/process/round-path.js +6 -5
  397. package/esm/path/process/round-path.js.map +1 -1
  398. package/esm/path/process/segment-2-cubic.js +12 -11
  399. package/esm/path/process/segment-2-cubic.js.map +1 -1
  400. package/esm/path/util/equalize-segments.js +46 -38
  401. package/esm/path/util/equalize-segments.js.map +1 -1
  402. package/esm/path/util/get-path-area.js +10 -8
  403. package/esm/path/util/get-path-area.js.map +1 -1
  404. package/esm/path/util/get-path-bbox-total-length.js +6 -6
  405. package/esm/path/util/get-path-bbox-total-length.js.map +1 -1
  406. package/esm/path/util/get-path-bbox.js +5 -5
  407. package/esm/path/util/get-path-bbox.js.map +1 -1
  408. package/esm/path/util/get-properties-at-length.js +26 -22
  409. package/esm/path/util/get-properties-at-length.js.map +1 -1
  410. package/esm/path/util/get-properties-at-point.js +22 -22
  411. package/esm/path/util/get-properties-at-point.js.map +1 -1
  412. package/esm/path/util/get-rotated-curve.js +22 -20
  413. package/esm/path/util/get-rotated-curve.js.map +1 -1
  414. package/esm/path/util/is-absolute-array.js +4 -1
  415. package/esm/path/util/is-absolute-array.js.map +1 -1
  416. package/esm/path/util/is-curve-array.js +4 -1
  417. package/esm/path/util/is-curve-array.js.map +1 -1
  418. package/esm/path/util/is-normalized-array.js +4 -1
  419. package/esm/path/util/is-normalized-array.js.map +1 -1
  420. package/esm/path/util/is-path-array.js +2 -2
  421. package/esm/path/util/is-path-array.js.map +1 -1
  422. package/esm/path/util/is-point-in-stroke.js +1 -1
  423. package/esm/path/util/is-point-in-stroke.js.map +1 -1
  424. package/esm/path/util/mid-point.js +4 -4
  425. package/esm/path/util/mid-point.js.map +1 -1
  426. package/esm/path/util/path-length-factory.js +37 -35
  427. package/esm/path/util/path-length-factory.js.map +1 -1
  428. package/esm/path/util/rotate-vector.js +2 -2
  429. package/esm/path/util/rotate-vector.js.map +1 -1
  430. package/esm/path/util/segment-arc-factory.js +51 -49
  431. package/esm/path/util/segment-arc-factory.js.map +1 -1
  432. package/esm/path/util/segment-cubic-factory.js +23 -21
  433. package/esm/path/util/segment-cubic-factory.js.map +1 -1
  434. package/esm/path/util/segment-line-factory.js +7 -8
  435. package/esm/path/util/segment-line-factory.js.map +1 -1
  436. package/esm/path/util/segment-quad-factory.js +23 -21
  437. package/esm/path/util/segment-quad-factory.js.map +1 -1
  438. package/lib/color/arr2rgb.js +3 -3
  439. package/lib/color/arr2rgb.js.map +1 -1
  440. package/lib/color/gradient.js +12 -12
  441. package/lib/color/gradient.js.map +1 -1
  442. package/lib/color/tocssgradient.js +18 -18
  443. package/lib/color/tocssgradient.js.map +1 -1
  444. package/lib/color/torgb.js +7 -7
  445. package/lib/color/torgb.js.map +1 -1
  446. package/lib/helper/to-radian.js +1 -1
  447. package/lib/helper/to-radian.js.map +1 -1
  448. package/lib/index.d.ts +1 -0
  449. package/lib/index.js +5 -13
  450. package/lib/index.js.map +1 -1
  451. package/lib/lodash/augment.d.ts +2 -0
  452. package/lib/lodash/augment.js +21 -0
  453. package/lib/lodash/augment.js.map +1 -0
  454. package/lib/lodash/cache.d.ts +14 -0
  455. package/lib/lodash/cache.js +32 -0
  456. package/lib/lodash/cache.js.map +1 -0
  457. package/lib/lodash/clamp.d.ts +2 -0
  458. package/lib/lodash/clamp.js +13 -0
  459. package/lib/lodash/clamp.js.map +1 -0
  460. package/lib/lodash/clear-animation-frame.d.ts +1 -0
  461. package/lib/lodash/clear-animation-frame.js +15 -0
  462. package/lib/lodash/clear-animation-frame.js.map +1 -0
  463. package/lib/lodash/clone.d.ts +2 -0
  464. package/lib/lodash/clone.js +35 -0
  465. package/lib/lodash/clone.js.map +1 -0
  466. package/lib/lodash/contains.d.ts +2 -0
  467. package/lib/lodash/contains.js +12 -0
  468. package/lib/lodash/contains.js.map +1 -0
  469. package/lib/lodash/debounce.d.ts +2 -0
  470. package/lib/lodash/debounce.js +22 -0
  471. package/lib/lodash/debounce.js.map +1 -0
  472. package/lib/lodash/deep-mix.d.ts +2 -0
  473. package/lib/lodash/deep-mix.js +46 -0
  474. package/lib/lodash/deep-mix.js.map +1 -0
  475. package/lib/lodash/difference.d.ts +11 -0
  476. package/lib/lodash/difference.js +20 -0
  477. package/lib/lodash/difference.js.map +1 -0
  478. package/lib/lodash/each.d.ts +2 -0
  479. package/lib/lodash/each.js +31 -0
  480. package/lib/lodash/each.js.map +1 -0
  481. package/lib/lodash/ends-with.d.ts +3 -0
  482. package/lib/lodash/ends-with.js +10 -0
  483. package/lib/lodash/ends-with.js.map +1 -0
  484. package/lib/lodash/every.d.ts +7 -0
  485. package/lib/lodash/every.js +16 -0
  486. package/lib/lodash/every.js.map +1 -0
  487. package/lib/lodash/extend.d.ts +2 -0
  488. package/lib/lodash/extend.js +36 -0
  489. package/lib/lodash/extend.js.map +1 -0
  490. package/lib/lodash/filter.d.ts +2 -0
  491. package/lib/lodash/filter.js +19 -0
  492. package/lib/lodash/filter.js.map +1 -0
  493. package/lib/lodash/find-index.d.ts +2 -0
  494. package/lib/lodash/find-index.js +14 -0
  495. package/lib/lodash/find-index.js.map +1 -0
  496. package/lib/lodash/find.d.ts +3 -0
  497. package/lib/lodash/find.js +28 -0
  498. package/lib/lodash/find.js.map +1 -0
  499. package/lib/lodash/first-value.d.ts +2 -0
  500. package/lib/lodash/first-value.js +24 -0
  501. package/lib/lodash/first-value.js.map +1 -0
  502. package/lib/lodash/fixed-base.d.ts +2 -0
  503. package/lib/lodash/fixed-base.js +16 -0
  504. package/lib/lodash/fixed-base.js.map +1 -0
  505. package/lib/lodash/flatten-deep.d.ts +12 -0
  506. package/lib/lodash/flatten-deep.js +28 -0
  507. package/lib/lodash/flatten-deep.js.map +1 -0
  508. package/lib/lodash/flatten.d.ts +11 -0
  509. package/lib/lodash/flatten.js +25 -0
  510. package/lib/lodash/flatten.js.map +1 -0
  511. package/lib/lodash/for-in.d.ts +2 -0
  512. package/lib/lodash/for-in.js +6 -0
  513. package/lib/lodash/for-in.js.map +1 -0
  514. package/lib/lodash/get-range.d.ts +6 -0
  515. package/lib/lodash/get-range.js +32 -0
  516. package/lib/lodash/get-range.js.map +1 -0
  517. package/lib/lodash/get-type.d.ts +2 -0
  518. package/lib/lodash/get-type.js +11 -0
  519. package/lib/lodash/get-type.js.map +1 -0
  520. package/lib/lodash/get-wrap-behavior.d.ts +9 -0
  521. package/lib/lodash/get-wrap-behavior.js +14 -0
  522. package/lib/lodash/get-wrap-behavior.js.map +1 -0
  523. package/lib/lodash/get.d.ts +8 -0
  524. package/lib/lodash/get.js +19 -0
  525. package/lib/lodash/get.js.map +1 -0
  526. package/lib/lodash/group-by.d.ts +6 -0
  527. package/lib/lodash/group-by.js +28 -0
  528. package/lib/lodash/group-by.js.map +1 -0
  529. package/lib/lodash/group-to-map.d.ts +8 -0
  530. package/lib/lodash/group-to-map.js +33 -0
  531. package/lib/lodash/group-to-map.js.map +1 -0
  532. package/lib/lodash/group.d.ts +2 -0
  533. package/lib/lodash/group.js +17 -0
  534. package/lib/lodash/group.js.map +1 -0
  535. package/lib/lodash/has-key.d.ts +2 -0
  536. package/lib/lodash/has-key.js +6 -0
  537. package/lib/lodash/has-key.js.map +1 -0
  538. package/lib/lodash/has-value.d.ts +2 -0
  539. package/lib/lodash/has-value.js +7 -0
  540. package/lib/lodash/has-value.js.map +1 -0
  541. package/lib/lodash/has.d.ts +2 -0
  542. package/lib/lodash/has.js +4 -0
  543. package/lib/lodash/has.js.map +1 -0
  544. package/lib/lodash/head.d.ts +1 -0
  545. package/lib/lodash/head.js +12 -0
  546. package/lib/lodash/head.js.map +1 -0
  547. package/lib/lodash/identity.d.ts +2 -0
  548. package/lib/lodash/identity.js +4 -0
  549. package/lib/lodash/identity.js.map +1 -0
  550. package/lib/lodash/index-of.d.ts +2 -0
  551. package/lib/lodash/index-of.js +23 -0
  552. package/lib/lodash/index-of.js.map +1 -0
  553. package/lib/lodash/index.d.ts +108 -0
  554. package/lib/lodash/index.js +236 -0
  555. package/lib/lodash/index.js.map +1 -0
  556. package/lib/lodash/is-arguments.d.ts +2 -0
  557. package/lib/lodash/is-arguments.js +15 -0
  558. package/lib/lodash/is-arguments.js.map +1 -0
  559. package/lib/lodash/is-array-like.d.ts +2 -0
  560. package/lib/lodash/is-array-like.js +13 -0
  561. package/lib/lodash/is-array-like.js.map +1 -0
  562. package/lib/lodash/is-array.d.ts +2 -0
  563. package/lib/lodash/is-array.js +8 -0
  564. package/lib/lodash/is-array.js.map +1 -0
  565. package/lib/lodash/is-boolean.d.ts +2 -0
  566. package/lib/lodash/is-boolean.js +15 -0
  567. package/lib/lodash/is-boolean.js.map +1 -0
  568. package/lib/lodash/is-date.d.ts +2 -0
  569. package/lib/lodash/is-date.js +9 -0
  570. package/lib/lodash/is-date.js.map +1 -0
  571. package/lib/lodash/is-decimal.d.ts +2 -0
  572. package/lib/lodash/is-decimal.js +9 -0
  573. package/lib/lodash/is-decimal.js.map +1 -0
  574. package/lib/lodash/is-element.d.ts +6 -0
  575. package/lib/lodash/is-element.js +11 -0
  576. package/lib/lodash/is-element.js.map +1 -0
  577. package/lib/lodash/is-empty.d.ts +2 -0
  578. package/lib/lodash/is-empty.js +40 -0
  579. package/lib/lodash/is-empty.js.map +1 -0
  580. package/lib/lodash/is-equal-with.d.ts +24 -0
  581. package/lib/lodash/is-equal-with.js +34 -0
  582. package/lib/lodash/is-equal-with.js.map +1 -0
  583. package/lib/lodash/is-equal.d.ts +2 -0
  584. package/lib/lodash/is-equal.js +48 -0
  585. package/lib/lodash/is-equal.js.map +1 -0
  586. package/lib/lodash/is-error.d.ts +2 -0
  587. package/lib/lodash/is-error.js +15 -0
  588. package/lib/lodash/is-error.js.map +1 -0
  589. package/lib/lodash/is-even.d.ts +2 -0
  590. package/lib/lodash/is-even.js +9 -0
  591. package/lib/lodash/is-even.js.map +1 -0
  592. package/lib/lodash/is-finite.d.ts +1 -0
  593. package/lib/lodash/is-finite.js +13 -0
  594. package/lib/lodash/is-finite.js.map +1 -0
  595. package/lib/lodash/is-function.d.ts +2 -0
  596. package/lib/lodash/is-function.js +13 -0
  597. package/lib/lodash/is-function.js.map +1 -0
  598. package/lib/lodash/is-integer.d.ts +2 -0
  599. package/lib/lodash/is-integer.js +11 -0
  600. package/lib/lodash/is-integer.js.map +1 -0
  601. package/lib/lodash/is-match.d.ts +2 -0
  602. package/lib/lodash/is-match.js +20 -0
  603. package/lib/lodash/is-match.js.map +1 -0
  604. package/lib/lodash/is-negative.d.ts +2 -0
  605. package/lib/lodash/is-negative.js +9 -0
  606. package/lib/lodash/is-negative.js.map +1 -0
  607. package/lib/lodash/is-nil.d.ts +2 -0
  608. package/lib/lodash/is-nil.js +12 -0
  609. package/lib/lodash/is-nil.js.map +1 -0
  610. package/lib/lodash/is-null.d.ts +2 -0
  611. package/lib/lodash/is-null.js +7 -0
  612. package/lib/lodash/is-null.js.map +1 -0
  613. package/lib/lodash/is-number-equal.d.ts +1 -0
  614. package/lib/lodash/is-number-equal.js +9 -0
  615. package/lib/lodash/is-number-equal.js.map +1 -0
  616. package/lib/lodash/is-number.d.ts +2 -0
  617. package/lib/lodash/is-number.js +13 -0
  618. package/lib/lodash/is-number.js.map +1 -0
  619. package/lib/lodash/is-object-like.d.ts +2 -0
  620. package/lib/lodash/is-object-like.js +13 -0
  621. package/lib/lodash/is-object-like.js.map +1 -0
  622. package/lib/lodash/is-object.d.ts +2 -0
  623. package/lib/lodash/is-object.js +13 -0
  624. package/lib/lodash/is-object.js.map +1 -0
  625. package/lib/lodash/is-odd.d.ts +2 -0
  626. package/lib/lodash/is-odd.js +9 -0
  627. package/lib/lodash/is-odd.js.map +1 -0
  628. package/lib/lodash/is-plain-object.d.ts +2 -0
  629. package/lib/lodash/is-plain-object.js +26 -0
  630. package/lib/lodash/is-plain-object.js.map +1 -0
  631. package/lib/lodash/is-positive.d.ts +2 -0
  632. package/lib/lodash/is-positive.js +9 -0
  633. package/lib/lodash/is-positive.js.map +1 -0
  634. package/lib/lodash/is-prototype.d.ts +2 -0
  635. package/lib/lodash/is-prototype.js +10 -0
  636. package/lib/lodash/is-prototype.js.map +1 -0
  637. package/lib/lodash/is-reg-exp.d.ts +2 -0
  638. package/lib/lodash/is-reg-exp.js +9 -0
  639. package/lib/lodash/is-reg-exp.js.map +1 -0
  640. package/lib/lodash/is-segment-equal.d.ts +2 -0
  641. package/lib/lodash/is-segment-equal.js +18 -0
  642. package/lib/lodash/is-segment-equal.js.map +1 -0
  643. package/lib/lodash/is-string.d.ts +2 -0
  644. package/lib/lodash/is-string.js +8 -0
  645. package/lib/lodash/is-string.js.map +1 -0
  646. package/lib/lodash/is-type.d.ts +2 -0
  647. package/lib/lodash/is-type.js +6 -0
  648. package/lib/lodash/is-type.js.map +1 -0
  649. package/lib/lodash/is-undefined.d.ts +2 -0
  650. package/lib/lodash/is-undefined.js +7 -0
  651. package/lib/lodash/is-undefined.js.map +1 -0
  652. package/lib/lodash/keys.d.ts +2 -0
  653. package/lib/lodash/keys.js +18 -0
  654. package/lib/lodash/keys.js.map +1 -0
  655. package/lib/lodash/last.d.ts +1 -0
  656. package/lib/lodash/last.js +13 -0
  657. package/lib/lodash/last.js.map +1 -0
  658. package/lib/lodash/lower-case.d.ts +2 -0
  659. package/lib/lodash/lower-case.js +9 -0
  660. package/lib/lodash/lower-case.js.map +1 -0
  661. package/lib/lodash/lower-first.d.ts +2 -0
  662. package/lib/lodash/lower-first.js +10 -0
  663. package/lib/lodash/lower-first.js.map +1 -0
  664. package/lib/lodash/map-values.d.ts +6 -0
  665. package/lib/lodash/map-values.js +18 -0
  666. package/lib/lodash/map-values.js.map +1 -0
  667. package/lib/lodash/map.d.ts +2 -0
  668. package/lib/lodash/map.js +18 -0
  669. package/lib/lodash/map.js.map +1 -0
  670. package/lib/lodash/max-by.d.ts +16 -0
  671. package/lib/lodash/max-by.js +36 -0
  672. package/lib/lodash/max-by.js.map +1 -0
  673. package/lib/lodash/max.d.ts +19 -0
  674. package/lib/lodash/max.js +30 -0
  675. package/lib/lodash/max.js.map +1 -0
  676. package/lib/lodash/memoize.d.ts +11 -0
  677. package/lib/lodash/memoize.js +34 -0
  678. package/lib/lodash/memoize.js.map +1 -0
  679. package/lib/lodash/merge.d.ts +7 -0
  680. package/lib/lodash/merge.js +15 -0
  681. package/lib/lodash/merge.js.map +1 -0
  682. package/lib/lodash/min-by.d.ts +16 -0
  683. package/lib/lodash/min-by.js +36 -0
  684. package/lib/lodash/min-by.js.map +1 -0
  685. package/lib/lodash/min.d.ts +19 -0
  686. package/lib/lodash/min.js +30 -0
  687. package/lib/lodash/min.js.map +1 -0
  688. package/lib/lodash/mix.d.ts +1 -0
  689. package/lib/lodash/mix.js +21 -0
  690. package/lib/lodash/mix.js.map +1 -0
  691. package/lib/lodash/mod.d.ts +2 -0
  692. package/lib/lodash/mod.js +7 -0
  693. package/lib/lodash/mod.js.map +1 -0
  694. package/lib/lodash/noop.d.ts +2 -0
  695. package/lib/lodash/noop.js +4 -0
  696. package/lib/lodash/noop.js.map +1 -0
  697. package/lib/lodash/number2color.d.ts +2 -0
  698. package/lib/lodash/number2color.js +18 -0
  699. package/lib/lodash/number2color.js.map +1 -0
  700. package/lib/lodash/omit.d.ts +3 -0
  701. package/lib/lodash/omit.js +13 -0
  702. package/lib/lodash/omit.js.map +1 -0
  703. package/lib/lodash/parse-radius.d.ts +9 -0
  704. package/lib/lodash/parse-radius.js +38 -0
  705. package/lib/lodash/parse-radius.js.map +1 -0
  706. package/lib/lodash/pick.d.ts +16 -0
  707. package/lib/lodash/pick.js +19 -0
  708. package/lib/lodash/pick.js.map +1 -0
  709. package/lib/lodash/pull-at.d.ts +2 -0
  710. package/lib/lodash/pull-at.js +23 -0
  711. package/lib/lodash/pull-at.js.map +1 -0
  712. package/lib/lodash/pull.d.ts +2 -0
  713. package/lib/lodash/pull.js +21 -0
  714. package/lib/lodash/pull.js.map +1 -0
  715. package/lib/lodash/reduce.d.ts +3 -0
  716. package/lib/lodash/reduce.js +18 -0
  717. package/lib/lodash/reduce.js.map +1 -0
  718. package/lib/lodash/remove.d.ts +2 -0
  719. package/lib/lodash/remove.js +31 -0
  720. package/lib/lodash/remove.js.map +1 -0
  721. package/lib/lodash/request-animation-frame.d.ts +1 -0
  722. package/lib/lodash/request-animation-frame.js +17 -0
  723. package/lib/lodash/request-animation-frame.js.map +1 -0
  724. package/lib/lodash/set.d.ts +8 -0
  725. package/lib/lodash/set.js +30 -0
  726. package/lib/lodash/set.js.map +1 -0
  727. package/lib/lodash/size.d.ts +1 -0
  728. package/lib/lodash/size.js +16 -0
  729. package/lib/lodash/size.js.map +1 -0
  730. package/lib/lodash/some.d.ts +7 -0
  731. package/lib/lodash/some.js +16 -0
  732. package/lib/lodash/some.js.map +1 -0
  733. package/lib/lodash/sort-by.d.ts +7 -0
  734. package/lib/lodash/sort-by.js +37 -0
  735. package/lib/lodash/sort-by.js.map +1 -0
  736. package/lib/lodash/starts-with.d.ts +3 -0
  737. package/lib/lodash/starts-with.js +10 -0
  738. package/lib/lodash/starts-with.js.map +1 -0
  739. package/lib/lodash/substitute.d.ts +5 -0
  740. package/lib/lodash/substitute.js +15 -0
  741. package/lib/lodash/substitute.js.map +1 -0
  742. package/lib/lodash/throttle.d.ts +6 -0
  743. package/lib/lodash/throttle.js +44 -0
  744. package/lib/lodash/throttle.js.map +1 -0
  745. package/lib/lodash/to-array.d.ts +2 -0
  746. package/lib/lodash/to-array.js +8 -0
  747. package/lib/lodash/to-array.js.map +1 -0
  748. package/lib/lodash/to-degree.d.ts +2 -0
  749. package/lib/lodash/to-degree.js +8 -0
  750. package/lib/lodash/to-degree.js.map +1 -0
  751. package/lib/lodash/to-integer.d.ts +1 -0
  752. package/lib/lodash/to-integer.js +4 -0
  753. package/lib/lodash/to-integer.js.map +1 -0
  754. package/lib/lodash/to-radian.d.ts +2 -0
  755. package/lib/lodash/to-radian.js +8 -0
  756. package/lib/lodash/to-radian.js.map +1 -0
  757. package/lib/lodash/to-string.d.ts +2 -0
  758. package/lib/lodash/to-string.js +10 -0
  759. package/lib/lodash/to-string.js.map +1 -0
  760. package/lib/lodash/types/index.d.ts +3 -0
  761. package/lib/lodash/types/index.js +3 -0
  762. package/lib/lodash/types/index.js.map +1 -0
  763. package/lib/lodash/union.d.ts +2 -0
  764. package/lib/lodash/union.js +13 -0
  765. package/lib/lodash/union.js.map +1 -0
  766. package/lib/lodash/uniq.d.ts +1 -0
  767. package/lib/lodash/uniq.js +19 -0
  768. package/lib/lodash/uniq.js.map +1 -0
  769. package/lib/lodash/unique-id.d.ts +2 -0
  770. package/lib/lodash/unique-id.js +14 -0
  771. package/lib/lodash/unique-id.js.map +1 -0
  772. package/lib/lodash/upper-case.d.ts +2 -0
  773. package/lib/lodash/upper-case.js +9 -0
  774. package/lib/lodash/upper-case.js.map +1 -0
  775. package/lib/lodash/upper-first.d.ts +2 -0
  776. package/lib/lodash/upper-first.js +10 -0
  777. package/lib/lodash/upper-first.js.map +1 -0
  778. package/lib/lodash/values-of-key.d.ts +2 -0
  779. package/lib/lodash/values-of-key.js +29 -0
  780. package/lib/lodash/values-of-key.js.map +1 -0
  781. package/lib/lodash/values.d.ts +2 -0
  782. package/lib/lodash/values.js +19 -0
  783. package/lib/lodash/values.js.map +1 -0
  784. package/lib/lodash/wrap-behavior.d.ts +9 -0
  785. package/lib/lodash/wrap-behavior.js +21 -0
  786. package/lib/lodash/wrap-behavior.js.map +1 -0
  787. package/lib/matrix/index.js +9 -9
  788. package/lib/matrix/index.js.map +1 -1
  789. package/lib/path/convert/path-2-absolute.js +21 -20
  790. package/lib/path/convert/path-2-absolute.js.map +1 -1
  791. package/lib/path/convert/path-2-curve.js +21 -19
  792. package/lib/path/convert/path-2-curve.js.map +1 -1
  793. package/lib/path/convert/path-2-string.js +4 -3
  794. package/lib/path/convert/path-2-string.js.map +1 -1
  795. package/lib/path/index.js +2 -11
  796. package/lib/path/index.js.map +1 -1
  797. package/lib/path/parser/finalize-segment.js +7 -6
  798. package/lib/path/parser/finalize-segment.js.map +1 -1
  799. package/lib/path/parser/is-space.js +1 -1
  800. package/lib/path/parser/is-space.js.map +1 -1
  801. package/lib/path/parser/parse-path-string.js +6 -6
  802. package/lib/path/parser/parse-path-string.js.map +1 -1
  803. package/lib/path/parser/path-parser.js +4 -3
  804. package/lib/path/parser/path-parser.js.map +1 -1
  805. package/lib/path/parser/scan-flag.js +3 -3
  806. package/lib/path/parser/scan-flag.js.map +1 -1
  807. package/lib/path/parser/scan-param.js +13 -13
  808. package/lib/path/parser/scan-param.js.map +1 -1
  809. package/lib/path/parser/scan-segment.js +13 -13
  810. package/lib/path/parser/scan-segment.js.map +1 -1
  811. package/lib/path/parser/skip-spaces.js +2 -2
  812. package/lib/path/parser/skip-spaces.js.map +1 -1
  813. package/lib/path/process/arc-2-cubic.js +44 -43
  814. package/lib/path/process/arc-2-cubic.js.map +1 -1
  815. package/lib/path/process/clone-path.js +2 -1
  816. package/lib/path/process/clone-path.js.map +1 -1
  817. package/lib/path/process/fix-arc.js +2 -2
  818. package/lib/path/process/fix-arc.js.map +1 -1
  819. package/lib/path/process/line-2-cubic.js +15 -14
  820. package/lib/path/process/line-2-cubic.js.map +1 -1
  821. package/lib/path/process/normalize-path.js +15 -14
  822. package/lib/path/process/normalize-path.js.map +1 -1
  823. package/lib/path/process/normalize-segment.js +12 -11
  824. package/lib/path/process/normalize-segment.js.map +1 -1
  825. package/lib/path/process/quad-2-cubic.js +2 -2
  826. package/lib/path/process/quad-2-cubic.js.map +1 -1
  827. package/lib/path/process/reverse-curve.js +7 -6
  828. package/lib/path/process/reverse-curve.js.map +1 -1
  829. package/lib/path/process/round-path.js +7 -6
  830. package/lib/path/process/round-path.js.map +1 -1
  831. package/lib/path/process/segment-2-cubic.js +15 -14
  832. package/lib/path/process/segment-2-cubic.js.map +1 -1
  833. package/lib/path/util/equalize-segments.js +48 -40
  834. package/lib/path/util/equalize-segments.js.map +1 -1
  835. package/lib/path/util/get-draw-direction.js +1 -1
  836. package/lib/path/util/get-draw-direction.js.map +1 -1
  837. package/lib/path/util/get-path-area.js +11 -9
  838. package/lib/path/util/get-path-area.js.map +1 -1
  839. package/lib/path/util/get-path-bbox-total-length.js +7 -7
  840. package/lib/path/util/get-path-bbox-total-length.js.map +1 -1
  841. package/lib/path/util/get-path-bbox.js +6 -6
  842. package/lib/path/util/get-path-bbox.js.map +1 -1
  843. package/lib/path/util/get-point-at-length.js +1 -1
  844. package/lib/path/util/get-point-at-length.js.map +1 -1
  845. package/lib/path/util/get-properties-at-length.js +28 -24
  846. package/lib/path/util/get-properties-at-length.js.map +1 -1
  847. package/lib/path/util/get-properties-at-point.js +27 -27
  848. package/lib/path/util/get-properties-at-point.js.map +1 -1
  849. package/lib/path/util/get-rotated-curve.js +23 -21
  850. package/lib/path/util/get-rotated-curve.js.map +1 -1
  851. package/lib/path/util/get-total-length.js +1 -1
  852. package/lib/path/util/get-total-length.js.map +1 -1
  853. package/lib/path/util/is-absolute-array.js +5 -2
  854. package/lib/path/util/is-absolute-array.js.map +1 -1
  855. package/lib/path/util/is-curve-array.js +5 -2
  856. package/lib/path/util/is-curve-array.js.map +1 -1
  857. package/lib/path/util/is-normalized-array.js +5 -2
  858. package/lib/path/util/is-normalized-array.js.map +1 -1
  859. package/lib/path/util/is-path-array.js +3 -3
  860. package/lib/path/util/is-path-array.js.map +1 -1
  861. package/lib/path/util/is-point-in-stroke.js +2 -2
  862. package/lib/path/util/is-point-in-stroke.js.map +1 -1
  863. package/lib/path/util/mid-point.js +4 -4
  864. package/lib/path/util/mid-point.js.map +1 -1
  865. package/lib/path/util/path-length-factory.js +42 -40
  866. package/lib/path/util/path-length-factory.js.map +1 -1
  867. package/lib/path/util/rotate-vector.js +2 -2
  868. package/lib/path/util/rotate-vector.js.map +1 -1
  869. package/lib/path/util/segment-arc-factory.js +53 -51
  870. package/lib/path/util/segment-arc-factory.js.map +1 -1
  871. package/lib/path/util/segment-cubic-factory.js +24 -22
  872. package/lib/path/util/segment-cubic-factory.js.map +1 -1
  873. package/lib/path/util/segment-line-factory.js +9 -10
  874. package/lib/path/util/segment-line-factory.js.map +1 -1
  875. package/lib/path/util/segment-quad-factory.js +24 -22
  876. package/lib/path/util/segment-quad-factory.js.map +1 -1
  877. package/package.json +3 -2
  878. package/src/index.ts +1 -0
  879. package/src/lodash/augment.ts +16 -0
  880. package/src/lodash/cache.ts +31 -0
  881. package/src/lodash/clamp.ts +10 -0
  882. package/src/lodash/clear-animation-frame.ts +13 -0
  883. package/src/lodash/clone.ts +31 -0
  884. package/src/lodash/contains.ts +10 -0
  885. package/src/lodash/debounce.ts +21 -0
  886. package/src/lodash/deep-mix.ts +39 -0
  887. package/src/lodash/difference.ts +17 -0
  888. package/src/lodash/each.ts +28 -0
  889. package/src/lodash/ends-with.ts +10 -0
  890. package/src/lodash/every.ts +14 -0
  891. package/src/lodash/extend.ts +36 -0
  892. package/src/lodash/filter.ts +18 -0
  893. package/src/lodash/find-index.ts +12 -0
  894. package/src/lodash/find.ts +29 -0
  895. package/src/lodash/first-value.ts +21 -0
  896. package/src/lodash/fixed-base.ts +14 -0
  897. package/src/lodash/flatten-deep.ts +24 -0
  898. package/src/lodash/flatten.ts +23 -0
  899. package/src/lodash/for-in.ts +3 -0
  900. package/src/lodash/get-range.ts +35 -0
  901. package/src/lodash/get-type.ts +10 -0
  902. package/src/lodash/get-wrap-behavior.ts +12 -0
  903. package/src/lodash/get.ts +18 -0
  904. package/src/lodash/group-by.ts +35 -0
  905. package/src/lodash/group-to-map.ts +30 -0
  906. package/src/lodash/group.ts +14 -0
  907. package/src/lodash/has-key.ts +2 -0
  908. package/src/lodash/has-value.ts +4 -0
  909. package/src/lodash/has.ts +1 -0
  910. package/src/lodash/head.ts +8 -0
  911. package/src/lodash/identity.ts +1 -0
  912. package/src/lodash/index-of.ts +22 -0
  913. package/src/lodash/index.ts +126 -0
  914. package/src/lodash/is-arguments.ts +13 -0
  915. package/src/lodash/is-array-like.ts +11 -0
  916. package/src/lodash/is-array.ts +5 -0
  917. package/src/lodash/is-boolean.ts +13 -0
  918. package/src/lodash/is-date.ts +7 -0
  919. package/src/lodash/is-decimal.ts +7 -0
  920. package/src/lodash/is-element.ts +8 -0
  921. package/src/lodash/is-empty.ts +39 -0
  922. package/src/lodash/is-equal-with.ts +31 -0
  923. package/src/lodash/is-equal.ts +46 -0
  924. package/src/lodash/is-error.ts +13 -0
  925. package/src/lodash/is-even.ts +7 -0
  926. package/src/lodash/is-finite.ts +9 -0
  927. package/src/lodash/is-function.ts +10 -0
  928. package/src/lodash/is-integer.ts +9 -0
  929. package/src/lodash/is-match.ts +17 -0
  930. package/src/lodash/is-negative.ts +7 -0
  931. package/src/lodash/is-nil.ts +10 -0
  932. package/src/lodash/is-null.ts +5 -0
  933. package/src/lodash/is-number-equal.ts +5 -0
  934. package/src/lodash/is-number.ts +10 -0
  935. package/src/lodash/is-object-like.ts +11 -0
  936. package/src/lodash/is-object.ts +10 -0
  937. package/src/lodash/is-odd.ts +7 -0
  938. package/src/lodash/is-plain-object.ts +24 -0
  939. package/src/lodash/is-positive.ts +7 -0
  940. package/src/lodash/is-prototype.ts +9 -0
  941. package/src/lodash/is-reg-exp.ts +7 -0
  942. package/src/lodash/is-segment-equal.ts +15 -0
  943. package/src/lodash/is-string.ts +5 -0
  944. package/src/lodash/is-type.ts +5 -0
  945. package/src/lodash/is-undefined.ts +5 -0
  946. package/src/lodash/keys.ts +16 -0
  947. package/src/lodash/last.ts +9 -0
  948. package/src/lodash/lower-case.ts +7 -0
  949. package/src/lodash/lower-first.ts +8 -0
  950. package/src/lodash/map-values.ts +22 -0
  951. package/src/lodash/map.ts +17 -0
  952. package/src/lodash/max-by.ts +37 -0
  953. package/src/lodash/max.ts +28 -0
  954. package/src/lodash/memoize.ts +31 -0
  955. package/src/lodash/merge.ts +12 -0
  956. package/src/lodash/min-by.ts +38 -0
  957. package/src/lodash/min.ts +28 -0
  958. package/src/lodash/mix.ts +15 -0
  959. package/src/lodash/mod.ts +5 -0
  960. package/src/lodash/noop.ts +1 -0
  961. package/src/lodash/number2color.ts +17 -0
  962. package/src/lodash/omit.ts +15 -0
  963. package/src/lodash/parse-radius.ts +45 -0
  964. package/src/lodash/pick.ts +32 -0
  965. package/src/lodash/pull-at.ts +23 -0
  966. package/src/lodash/pull.ts +16 -0
  967. package/src/lodash/reduce.ts +17 -0
  968. package/src/lodash/remove.ts +30 -0
  969. package/src/lodash/request-animation-frame.ts +15 -0
  970. package/src/lodash/set.ts +29 -0
  971. package/src/lodash/size.ts +12 -0
  972. package/src/lodash/some.ts +14 -0
  973. package/src/lodash/sort-by.ts +42 -0
  974. package/src/lodash/starts-with.ts +10 -0
  975. package/src/lodash/substitute.ts +17 -0
  976. package/src/lodash/throttle.ts +45 -0
  977. package/src/lodash/to-array.ts +5 -0
  978. package/src/lodash/to-degree.ts +7 -0
  979. package/src/lodash/to-integer.ts +1 -0
  980. package/src/lodash/to-radian.ts +7 -0
  981. package/src/lodash/to-string.ts +6 -0
  982. package/src/lodash/types/index.ts +3 -0
  983. package/src/lodash/union.ts +7 -0
  984. package/src/lodash/uniq.ts +15 -0
  985. package/src/lodash/unique-id.ts +11 -0
  986. package/src/lodash/upper-case.ts +7 -0
  987. package/src/lodash/upper-first.ts +8 -0
  988. package/src/lodash/values-of-key.ts +29 -0
  989. package/src/lodash/values.ts +17 -0
  990. package/src/lodash/wrap-behavior.ts +19 -0
  991. package/src/path/process/arc-2-cubic.ts +2 -2
  992. package/src/path/util/segment-arc-factory.ts +1 -1
  993. package/src/path/util/segment-cubic-factory.ts +1 -1
  994. package/src/path/util/segment-line-factory.ts +1 -2
  995. package/src/path/util/segment-quad-factory.ts +1 -1
  996. package/src/.DS_Store +0 -0
  997. package/src/path/.DS_Store +0 -0
package/README.md CHANGED
@@ -163,9 +163,21 @@ expect(point).toEqual({ x: 0, y: 0 });
163
163
 
164
164
  计算路径包围的面积。内部实现中首先通过 [path2Curve](#path2Curve) 转曲,再计算 cubic curve 面积,[详见](https://stackoverflow.com/a/15845996)。
165
165
 
166
+ 方法签名如下:
167
+
168
+ ```js
169
+ function getPathArea(path: PathArray): number;
170
+ ```
171
+
166
172
  ### isPointInStroke
167
173
 
168
- 判断一个点是否在路径上,仅通过几何定义,不考虑其他样式属性例如线宽、lineJoin、miter 等。
174
+ 判断一个点是否在路径上,仅通过几何定义计算,不考虑其他样式属性例如线宽、lineJoin、miter 等。
175
+
176
+ 方法签名如下:
177
+
178
+ ```js
179
+ isPointInStroke(pathInput: string | PathArray, point: Point): boolean;
180
+ ```
169
181
 
170
182
  ```js
171
183
  const result = isPointInStroke(segments, { x: 10, y: 10 });
package/dist/util.min.js CHANGED
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).util={})}(this,function(t){"use strict";function n(t){return[parseInt(t.substr(1,2),16),parseInt(t.substr(3,2),16),parseInt(t.substr(5,2),16)]}function e(t){t=Math.round(t).toString(16);return 1===t.length?"0"+t:t}function o(t){return"#"+e(t[0])+e(t[1])+e(t[2])}const F=/rgba?\(([\s.,0-9]+)\)/;let a;function r(t){if("#"===t[0]&&7===t.length)return t;(a=a||function(){const t=document.createElement("i");return t.title="Web Colour Picker",t.style.display="none",document.body.appendChild(t),t}()).style.color=t;t=document.defaultView.getComputedStyle(a,"").getPropertyValue("color");const e=F.exec(t);return o(e[1].split(/\s*,\s*/).map(t=>Number(t)))}function c(t,e,n,a){return t[a]+(e[a]-t[a])*n}const Q=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,j=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Z=/[\d.]+:(#[^\s]+|[^)]+\))/gi;var i="undefined"!=typeof Float32Array?Float32Array:Array;function u(t,e,n){var a=e[0],r=e[1],i=e[2],o=e[3],c=e[4],l=e[5],s=e[6],h=e[7],e=e[8],u=n[0],x=n[1],p=n[2],f=n[3],m=n[4],y=n[5],d=n[6],M=n[7],n=n[8];return t[0]=u*a+x*o+p*s,t[1]=u*r+x*c+p*h,t[2]=u*i+x*l+p*e,t[3]=f*a+m*o+y*s,t[4]=f*r+m*c+y*h,t[5]=f*i+m*l+y*e,t[6]=d*a+M*o+n*s,t[7]=d*r+M*c+n*h,t[8]=d*i+M*l+n*e,t}function l(){var t=new i(3);return i!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function s(t,e,n){var a=new i(3);return a[0]=t,a[1]=e,a[2]=n,a}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});function h(){var t=new i(4);return i!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}l(),x=new i(4),i!=Float32Array&&(x[0]=0,x[1]=0,x[2]=0,x[3]=0);var x;function B(t,e,n){var a,r,i=[0,0,0,0,0,0,0,0,0];a=i,n=n,r=Math.sin(n),n=Math.cos(n),a[0]=n,a[1]=r,a[2]=0,a[3]=-r,a[4]=n,a[5]=0,a[6]=0,a[7]=0,a[8]=1,u(t,i,e)}function p(t,e){return t[0]*e[1]-e[0]*t[1]}function m(t){return t.map(t=>Array.isArray(t)?[...t]:t)}l(),s(1,0,0),s(0,1,0),h(),h(),x=new i(9),i!=Float32Array&&(x[1]=0,x[2]=0,x[3]=0,x[5]=0,x[6]=0,x[7]=0),x[0]=1,x[4]=1,x[8]=1,x=new i(2),i!=Float32Array&&(x[0]=0,x[1]=0);const y={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};const f={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function d(t){return Array.isArray(t)&&t.every(t=>{var e=t[0].toLowerCase();return f[e]===t.length-1&&"achlmqstvz".includes(e)})}function M(t){return d(t)&&t.every(([t])=>t===t.toUpperCase())}function g(t){return M(t)&&t.every(([t])=>"ACLMQZ".includes(t))}function v(t){let e=t.pathValue[t.segmentStart],n=e.toLowerCase();const a=t["data"];for(;a.length>=f[n]&&("m"===n&&2<a.length?(t.segments.push([e,...a.splice(0,2)]),n="l",e="m"===e?"l":"L"):t.segments.push([e,...a.splice(0,f[n])]),f[n]););}function w(t){return 48<=t&&t<=57}function b(t){const{pathValue:e,max:n}=t;for(;t.index<n&&(10===(a=e.charCodeAt(t.index))||13===a||8232===a||8233===a||32===a||9===a||11===a||12===a||160===a||5760<=a&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(a));)t.index+=1;var a}function E(e){const{max:n,pathValue:a,index:t}=e;var r,i=a.charCodeAt(t),o=f[a[t].toLowerCase()];if(e.segmentStart=t,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return 1;default:return}}(i))if(e.index+=1,b(e),e.data=[],o){for(;;){for(let t=o;0<t;--t){if(97!=(32|i)||3!==t&&4!==t)(function(t){const{max:e,pathValue:n,index:a}=t;let r=a;var i;let o=!1,c=!1,l=!1,s;if(r>=e)t.err=`[path-util]: Invalid path value at index ${r}, "pathValue" is missing param`;else if(43!==(s=n.charCodeAt(r))&&45!==s||(r+=1,s=n.charCodeAt(r)),w(s)||46===s){if(46!==s){if(i=48===s,r+=1,s=n.charCodeAt(r),i&&r<e&&s&&w(s))return t.err=`[path-util]: Invalid path value at index ${a}, "${n[a]}" illegal number`;for(;r<e&&w(n.charCodeAt(r));)r+=1,o=!0;s=n.charCodeAt(r)}if(46===s){for(l=!0,r+=1;w(n.charCodeAt(r));)r+=1,c=!0;s=n.charCodeAt(r)}if(101===s||69===s){if(l&&!o&&!c)return t.err=`[path-util]: Invalid path value at index ${r}, "${n[r]}" invalid float exponent`;if(r+=1,43!==(s=n.charCodeAt(r))&&45!==s||(r+=1),!(r<e&&w(n.charCodeAt(r))))return t.err=`[path-util]: Invalid path value at index ${r}, "${n[r]}" invalid integer exponent`;for(;r<e&&w(n.charCodeAt(r));)r+=1}t.index=r,t.param=+t.pathValue.slice(a,r)}else t.err=`[path-util]: Invalid path value at index ${r}, "${n[r]}" is not a number`})(e);else{l=c=void 0;var c=e;const{index:s,pathValue:h}=c;var l=h.charCodeAt(s);48===l?(c.param=0,c.index+=1):49===l?(c.param=1,c.index+=1):c.err=`[path-util]: invalid Arc flag "${h[s]}", expecting 0 or 1 at index `+s}if(e.err.length)return;e.data.push(e.param),b(e),e.index<n&&44===a.charCodeAt(e.index)&&(e.index+=1,b(e))}if(e.index>=e.max)break;if(!(48<=(r=a.charCodeAt(e.index))&&r<=57||43===r||45===r||46===r))break}v(e)}else v(e);else e.err=`[path-util]: Invalid path value "${a[t]}" is not a path command`}class O{constructor(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""}}function A(t){if(d(t))return m(t);var e=new O(t);for(b(e);e.index<e.max&&!e.err.length;)E(e);return e.err||e.segments}function C(t){if(M(t))return m(t);const e=A(t);let c=0,l=0,s=0,h=0;return e.map(t=>{const e=t.slice(1).map(Number),[n]=t;var a=n.toUpperCase();if("M"===n)return[c,l]=e,s=c,h=l,["M",c,l];let r;if(n!==a)switch(a){case"A":r=[a,e[0],e[1],e[2],e[3],e[4],e[5]+c,e[6]+l];break;case"V":r=[a,e[0]+l];break;case"H":r=[a,e[0]+c];break;default:var i=e.map((t,e)=>t+(e%2?l:c));r=[a,...i]}else r=[a,...e];var o=r.length;switch(a){case"Z":c=s,l=h;break;case"H":[,c]=r;break;case"V":[,l]=r;break;default:c=r[o-2],l=r[o-1],"M"===a&&(s=c,h=l)}return r})}function q(t){if(g(t))return m(t);const e=C(t),n=Object.assign({},y);var a=e.length;for(let t=0;t<a;t+=1){e[t],e[t]=function(t,e){var[n]=t,{x1:a,y1:r,x2:i,y2:o}=e,c=t.slice(1).map(Number);let l=t;return"TQ".includes(n)||(e.qx=null,e.qy=null),"H"===n?l=["L",t[1],r]:"V"===n?l=["L",a,t[1]]:"S"===n?(t=2*r-o,e.x1=o=2*a-i,e.y1=t,l=["C",o,t,...c]):"T"===n?(i=2*a-e.qx,o=2*r-e.qy,e.qx=i,e.qy=o,l=["Q",i,o,...c]):"Q"===n&&([t,a]=c,e.qx=t,e.qy=a),l}(e[t],n);var r=e[t],i=r.length;n.x1=+r[i-2],n.y1=+r[i-1],n.x2=+r[i-4]||n.x1,n.y2=+r[i-3]||n.y1}return e}function I(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function P(t,e,n){var a=t[0],t=t[1];return[a+(e[0]-a)*n,t+(e[1]-t)*n]}function S(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function $(t,e,n,a,r){var i=S([t,e],[n,a]);let o={x:0,y:0};return{length:i,point:o="number"==typeof r?0===r?{x:t,y:e}:i<=r?{x:n,y:a}:([r,i]=P([t,e],[n,a],r/i),{x:r,y:i}):o,min:{x:Math.min(t,n),y:Math.min(e,a)},max:{x:Math.max(t,n),y:Math.max(e,a)}}}function k(t,e,n,a){var t=[t,e],e=[n,a],r=P(t,e,.5),i=P(e,r,.5),o=P(r,i,.5),c=P(i,o,.5),l=P(o,c,.5),t=$(...[...t,...r,...o,...l,.5]).point,r=$(...[...l,...c,...i,...e,0]).point;return[t.x,t.y,r.x,r.y,n,a]}function R(t,e){var[n]=t,a=t.slice(1).map(Number),[r,i]=a;let o;var c,l,s,h,u,x,{x1:p,y1:f,x:m,y}=e;switch("TQ".includes(n)||(e.qx=null,e.qy=null),n){case"M":return e.x=r,e.y=i,t;case"A":return["C",...function t(e,n,a,r,i,o,c,l,s,h){let u=e,x=n,p=a,f=r,m=l,y=s;var e=120*Math.PI/180,d=Math.PI/180*(+i||0);let M=[],g,v,w,b;h?[g,v,w,b]=h:(n=I(u,x,-d),u=n.x,x=n.y,n=I(m,y,-d),m=n.x,y=n.y,a=(u-m)/2,r=(x-y)/2,1<(l=a*a/(p*p)+r*r/(f*f))&&(l=Math.sqrt(l),p*=l,f*=l),s=p*p,n=f*f,l=(o===c?-1:1)*Math.sqrt(Math.abs((s*n-s*r*r-n*a*a)/(s*r*r+n*a*a))),w=l*p*r/f+(u+m)/2,b=l*-f*a/p+(x+y)/2,g=(Math.asin((x-b)/f)*Math.pow(10,9)>>0)/Math.pow(10,9),v=(Math.asin((y-b)/f)*Math.pow(10,9)>>0)/Math.pow(10,9),g=u<w?Math.PI-g:g,v=m<w?Math.PI-v:v,g<0&&(g=2*Math.PI+g),v<0&&(v=2*Math.PI+v),c&&g>v&&(g-=2*Math.PI),!c&&v>g&&(v-=2*Math.PI));o=v-g,Math.abs(o)>e&&(s=v,n=m,r=y,v=g+e*(c&&v>g?1:-1),m=w+p*Math.cos(v),y=b+f*Math.sin(v),M=t(m,y,p,f,i,0,c,n,r,[v,s,w,b])),o=v-g,l=Math.cos(g),a=Math.sin(g),e=Math.cos(v),i=Math.sin(v),c=Math.tan(o/4),n=4/3*p*c,r=4/3*f*c,s=[u,x];const A=[u+n*a,x-r*l];o=[m+n*i,y-r*e],c=[m,y];if(A[0]=2*s[0]-A[0],A[1]=2*s[1]-A[1],h)return[...A,...o,...c,...M];const C=[];for(let t=0,e=(M=[...A,...o,...c,...M]).length;t<e;t+=1)C[t]=t%2?I(M[t-1],M[t],d).y:I(M[t],M[t+1],d).x;return C}(...o=[p,f,...a])];case"Q":return e.qx=r,e.qy=i,o=[p,f,...a],["C",...([c,l,s,h,u,x]=[...o],[1/3*c+2/3*s,1/3*l+2/3*h,1/3*u+2/3*s,1/3*x+2/3*h,u,x])];case"L":return["C",...k(p,f,r,i)];case"Z":return p===m&&f===y?["C",p,f,m,y,m,y]:["C",...k(p,f,m,y)]}return t}function L(t,e=!1){var n,a;if(g(n=t)&&n.every(([t])=>"MC".includes(t)))return n=m(t),e?[n,[]]:n;const r=q(t),i=Object.assign({},y),o=[];let c="",l=r.length;const s=[];for(let t=0;t<l;t+=1){r[t]&&([c]=r[t]),o[t]=c;var h=R(r[t],i),u=(r[t]=h,p=x=u=void 0,r),x=o,p=t;if(7<u[p].length){u[p].shift();const f=u[p];let t=p;for(;f.length;)x[p]="A",u.splice(t+=1,0,["C"].concat(f.splice(0,6)));u.splice(p,1)}l=r.length,"Z"===c&&s.push(t),a=(h=r[t]).length,i.x1=+h[a-2],i.y1=+h[a-1],i.x2=+h[a-4]||i.x1,i.y2=+h[a-3]||i.y1}return e?[r,s]:r}function V(t,e){var{x:t,y:n}=t,{x:e,y:a}=e,r=t*e+n*a,i=Math.sqrt((Math.pow(t,2)+Math.pow(n,2))*(Math.pow(e,2)+Math.pow(a,2)));return(t*a-n*e<0?-1:1)*Math.acos(r/i)}function H(e,n,a,r,i,o,c,l,s,h){var u="number"==typeof h;let x=e,p=n,f=0,m=[x,p,f],y=[x,p];let d={x:0,y:0},M=[{x:x,y:p}];u&&0===h&&(d={x:x,y:p});for(let t=0;t<=300;t+=1){var g=t/300;({x,y:p}=function(t,e,n,a,r,i,o,c,l,s){const{abs:h,sin:u,cos:x,sqrt:p,PI:f}=Math;let m=h(n),y=h(a);if(n=f/180*((r%360+360)%360),t===c&&e===l)return{x:t,y:e};if(0===m||0===y)return $(t,e,c,l,s).point;a=(t-c)/2,r=(e-l)/2,a={x:x(n)*a+u(n)*r,y:-u(n)*a+x(n)*r},1<(r=Math.pow(a.x,2)/Math.pow(m,2)+Math.pow(a.y,2)/Math.pow(y,2))&&(m*=p(r),y*=p(r));let d=(r=Math.pow(m,2)*Math.pow(y,2)-Math.pow(m,2)*Math.pow(a.y,2)-Math.pow(y,2)*Math.pow(a.x,2))/(Math.pow(m,2)*Math.pow(a.y,2)+Math.pow(y,2)*Math.pow(a.x,2));d=d<0?0:d;const M=(r=(i!==o?1:-1)*p(d))*(m*a.y/y),g=r*(-y*a.x/m),v=x(n)*M-u(n)*g+(t+c)/2,w=u(n)*M+x(n)*g+(e+l)/2;i={x:(a.x-M)/m,y:(a.y-g)/y},r=V({x:1,y:0},i);let b=V(i,{x:(-a.x-M)/m,y:(-a.y-g)/y});return!o&&0<b?b-=2*f:o&&b<0&&(b+=2*f),t=r+(b%=2*f)*s,c=m*x(t),e=y*u(t),{x:x(n)*c-u(n)*e+v,y:u(n)*c+x(n)*e+w}}(e,n,a,r,i,o,c,l,s,g)),M=[...M,{x:x,y:p}],f+=S(y,[x,p]),y=[x,p],u&&f>h&&h>m[2]&&(g=(f-h)/(f-m[2]),d={x:y[0]*(1-g)+m[0]*g,y:y[1]*(1-g)+m[1]*g}),m=[x,p,f]}return u&&h>=f&&(d={x:l,y:s}),{length:f,point:d,min:{x:Math.min(...M.map(t=>t.x)),y:Math.min(...M.map(t=>t.y))},max:{x:Math.max(...M.map(t=>t.x)),y:Math.max(...M.map(t=>t.y))}}}function D(e,n,a,r,i,o,c,l,s){var h="number"==typeof s;let u=e,x=n,p=0,f=[u,x,p],m=[u,x];let y={x:0,y:0},d=[{x:u,y:x}];h&&0===s&&(y={x:u,y:x});var M,g,v,w,b,A,C,q;for(let t=0;t<=20;t+=1){var I,P=t/20;({x:u,y:x}=(I=e,M=n,g=a,v=r,w=i,b=o,A=c,C=l,q=void 0,q=1-(P=P),{x:Math.pow(q,3)*I+3*Math.pow(q,2)*P*g+3*q*Math.pow(P,2)*w+Math.pow(P,3)*A,y:Math.pow(q,3)*M+3*Math.pow(q,2)*P*v+3*q*Math.pow(P,2)*b+Math.pow(P,3)*C})),d=[...d,{x:u,y:x}],p+=S(m,[u,x]),m=[u,x],h&&p>s&&s>f[2]&&(I=(p-s)/(p-f[2]),y={x:m[0]*(1-I)+f[0]*I,y:m[1]*(1-I)+f[1]*I}),f=[u,x,p]}return h&&s>=p&&(y={x:c,y:l}),{length:p,point:y,min:{x:Math.min(...d.map(t=>t.x)),y:Math.min(...d.map(t=>t.y))},max:{x:Math.max(...d.map(t=>t.x)),y:Math.max(...d.map(t=>t.y))}}}function G(e,n,a,r,i,o,c){var l="number"==typeof c;let s=e,h=n,u=0,x=[s,h,u],p=[s,h];let f={x:0,y:0},m=[{x:s,y:h}];l&&0===c&&(f={x:s,y:h});var y,d,M,g,v,w;for(let t=0;t<=300;t+=1){var b,A=t/300;({x:s,y:h}=(b=e,y=n,d=a,M=r,g=i,v=o,w=void 0,w=1-(A=A),{x:Math.pow(w,2)*b+2*w*A*d+Math.pow(A,2)*g,y:Math.pow(w,2)*y+2*w*A*M+Math.pow(A,2)*v})),m=[...m,{x:s,y:h}],u+=S(p,[s,h]),p=[s,h],l&&u>c&&c>x[2]&&(b=(u-c)/(u-x[2]),f={x:p[0]*(1-b)+x[0]*b,y:p[1]*(1-b)+x[1]*b}),x=[s,h,u]}return l&&c>=u&&(f={x:i,y:o}),{length:u,point:f,min:{x:Math.min(...m.map(t=>t.x)),y:Math.min(...m.map(t=>t.y))},max:{x:Math.max(...m.map(t=>t.x)),y:Math.max(...m.map(t=>t.y))}}}function N(t,n){var a,r,i=q(t),o="number"==typeof n;let c=[],l=0,s=0,h=0,u=0,x,p=[],f=[],m=0,y={x:0,y:0},d=y,M=y,g=y,v=0;for(let t=0,e=i.length;t<e;t+=1)[r]=x=i[t],a="M"===r,c=a?c:[l,s,...x.slice(1)],a?([,h,u]=x,y={x:h,y:u},d=y,m=0,o&&n<.001&&(g=y)):"L"===r?{length:m,min:y,max:d,point:M}=$(...c,(n||0)-v):"A"===r?{length:m,min:y,max:d,point:M}=H(...c,(n||0)-v):"C"===r?{length:m,min:y,max:d,point:M}=D(...c,(n||0)-v):"Q"===r?{length:m,min:y,max:d,point:M}=G(...c,(n||0)-v):"Z"===r&&(c=[l,s,h,u],{length:m,min:y,max:d,point:M}=$(...c,(n||0)-v)),o&&v<n&&v+m>=n&&(g=M),f=[...f,d],p=[...p,y],v+=m,[l,s]="Z"!==r?x.slice(-2):[h,u];return o&&n>=v&&(g={x:l,y:s}),{length:v,point:g,min:{x:Math.min(...p.map(t=>t.x)),y:Math.min(...p.map(t=>t.y))},max:{x:Math.max(...f.map(t=>t.x)),y:Math.max(...f.map(t=>t.y))}}}function T(t){return N(t).length}function U(t){let s=0,h=0,u;return L(t).map(t=>{return"M"!==t[0]?(u=([e,n,a,r,i,o,c,l]=[s,h,...t.slice(1)],3*((l-n)*(a+i)-(c-e)*(r+o)+r*(e-i)-a*(n-o)+l*(i+e/3)-c*(o+n/3))/20),[s,h]=t.slice(-2),u):([,s,h]=t,0);var e,n,a,r,i,o,c,l}).reduce((t,e)=>t+e,0)}function z(t,e){return N(t,e).point}function _(t,n){var e,t=A(t),a=q(t),r=T(t),i=t=>{var e=t.x-n.x,t=t.y-n.y;return e*e+t*t};let o=8;var c,l,s;let h,u=0,x=1/0;for(let t=0;t<=r;t+=o)(c=i(e=z(a,t)))<x&&(h=e,u=t,x=c);o/=2;for(var p,f,m,y;.5<o;)m=i(l=z(a,p=u-o)),y=i(s=z(a,f=u+o)),0<=p&&m<x?(h=l,u=p,x=m):f<=r&&y<x?(h=s,u=f,x=y):o/=2;var t=function(t,e){const n=A(t);if("string"==typeof n)throw TypeError(n);let a=[...n],r=T(a),i=a.length-1,o=0,c=0,l=n[0];var[t,s]=l.slice(-2),t={x:t,y:s};if(i<=0||!e||!Number.isFinite(e))return{segment:l,index:0,length:c,point:t,lengthAtSegment:o};if(e>=r)return a=n.slice(0,-1),o=T(a),c=r-o,{segment:n[i],index:i,length:c,lengthAtSegment:o};const h=[];for(;0<i;)l=a[i],a=a.slice(0,-1),o=T(a),c=r-o,r=o,h.push({segment:l,index:i,length:c,lengthAtSegment:o}),--i;return h.find(({lengthAtSegment:t})=>t<=e)}(t,u),d=Math.sqrt(x);return{closest:h,distance:d,segment:t}}function W(t){return t.map((t,e,n)=>{var a,r,i,o,n=e&&n[e-1].slice(-2).concat(t.slice(1)),c=e?D(...n).length:0;let l;return{s:t,ss:l=e?c?(e=.5,a=(n=n).slice(0,2),r=n.slice(2,4),i=n.slice(4,6),n=n.slice(6,8),a=P(a,r,e),r=P(r,i,e),i=P(i,n,e),o=P(a,r,e),r=P(r,i,e),e=P(o,r,e),[["C"].concat(a,o,e),["C"].concat(r,i,n)]):[t,t]:[t],l:c}})}t.angleTo=function(t,e,n){r=e,o=(a=t)[0],a=a[1],c=r[0],r=r[1],i=Math.sqrt(o*o+a*a)*Math.sqrt(c*c+r*r);var a,r,i,o=Math.acos(Math.min(Math.max(i&&(o*c+a*r)/i,-1),1)),c=0<=p(t,e);return n?c?2*Math.PI-o:o:c?o:2*Math.PI-o},t.clonePath=m,t.direction=p,t.distanceSquareRoot=S,t.equalizeSegments=function t(e,n,a){const r=W(e),i=W(n);var e=r.length,n=i.length,o=r.filter(t=>t.l).length,c=i.filter(t=>t.l).length,o=r.filter(t=>t.l).reduce((t,{l:e})=>t+e,0)/o||0,c=i.filter(t=>t.l).reduce((t,{l:e})=>t+e,0)/c||0;const l=a||Math.max(e,n),s=[o,c],h=[l-e,l-n];let u;a=[r,i].map((t,n)=>t.l===l?t.map(t=>t.s):t.map((t,e)=>(u=e&&h[n]&&t.l>=s[n],h[n]-=u?1:0,u?t.ss:[t.s])).flat());return a[0].length===a[1].length?a:t(a[0],a[1],l)},t.getDrawDirection=function(t){return 0<=U(t)},t.getPathArea=U,t.getPathBBox=function(t){if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0,cx:0,cy:0,cz:0};var{min:{x:t,y:e},max:{x:n,y:a}}=N(t),r=n-t,i=a-e;return{width:r,height:i,x:t,y:e,x2:n,y2:a,cx:t+r/2,cy:e+i/2,cz:Math.max(r,i)+Math.min(r,i)/2}},t.getPathBBoxTotalLength=function(t){if(!t)return{length:0,x:0,y:0,width:0,height:0,x2:0,y2:0,cx:0,cy:0,cz:0};var{length:t,min:{x:e,y:n},max:{x:a,y:r}}=N(t),i=a-e,o=r-n;return{length:t,width:i,height:o,x:e,y:n,x2:a,y2:r,cx:e+i/2,cy:n+o/2,cz:Math.max(i,o)+Math.min(i,o)/2}},t.getPointAtLength=z,t.getRotatedCurve=function(a,r){const i=a.length-1,e=[];var t;let o=0;const n=function(i){const o=i.length,c=o-1;return i.map((t,r)=>i.map((t,e)=>{let n=r+e,a;return 0===e||i[n]&&"M"===i[n][0]?(a=i[n],["M"].concat(a.slice(-2))):(n>=o&&(n-=c),i[n])}))}(a);return n.forEach((t,n)=>{a.slice(1).forEach((t,e)=>{o+=S(a[(n+e)%i].slice(-2),r[e%i].slice(-2))}),e[n]=o,o=0}),t=e.indexOf(Math.min.apply(null,e)),n[t]},t.getTotalLength=T,t.gradient=function(t){const e="string"==typeof t?t.split("-"):t,i=e.map(t=>n(-1===t.indexOf("#")?r(t):t));return t=>{return e=i,t=t,t=isNaN(Number(t))||t<0?0:1<t?1:Number(t),n=e.length-1,a=Math.floor(n*t),t=n*t-a,r=e[a],n=a===n?r:e[a+1],o([c(r,n,t,0),c(r,n,t,1),c(r,n,t,2)]);var e,n,a,r}},t.isPointInStroke=function(t,e){return t=_(t,e).distance,Math.abs(t)<.001},t.normalizePath=q,t.path2Absolute=C,t.path2Curve=L,t.path2String=function(t,e="off"){return function(t,n){if("off"===n)return m(t);const a="number"==typeof n&&1<=n?Math.pow(10,n):1;return t.map(t=>{var e=t.slice(1).map(Number).map(t=>n?Math.round(t*a)/a:Math.round(t));return[t[0],...e]})}(t,e).map(t=>t[0]+t.slice(1).join(" ")).join("")},t.reverseCurve=function(a){const t=a.slice(1).map((t,e,n)=>(e?n[e-1].slice(-2):a[0].slice(1)).concat(t.slice(1))).map(n=>n.map((t,e)=>n[n.length-e-2*(1-e%2)])).reverse();return[["M"].concat(t[0].slice(0,2))].concat(t.map(t=>["C"].concat(t.slice(2))))},t.rgb2arr=n,t.toCSSGradient=function(e){if(/^[r,R,L,l]{1}[\s]*\(/.test(e)){let n,t;var a,r;"l"===e[0]?(a=+(r=Q.exec(e))[1]+90,t=r[2],n=`linear-gradient(${a}deg, `):"r"===e[0]&&(n="radial-gradient(",r=j.exec(e),t=r[4]);const i=t.match(Z);return i.forEach((t,e)=>{t=t.split(":");n+=`${t[1]} ${100*Number(t[0])}%`,e!==i.length-1&&(n+=", ")}),n+=")"}return e},t.toRGB=r,t.transform=function(t,n){var a,r,i,o,c,l,s=t?[].concat(t):[1,0,0,0,1,0,0,0,1];for(let t=0,e=n.length;t<e;t++){var h=n[t];switch(h[0]){case"t":i=r=s,o=[h[1],h[2]],c=void 0,o=o,(c=l=[0,0,0,0,0,0,0,0,0])[0]=1,c[1]=0,c[2]=0,c[3]=0,c[4]=1,c[5]=0,c[6]=o[0],c[7]=o[1],c[8]=1,u(r,l,i);break;case"s":c=o=s,r=[h[1],h[2]],l=void 0,(l=i=[0,0,0,0,0,0,0,0,0])[0]=(r=r)[0],l[1]=0,l[2]=0,l[3]=0,l[4]=r[1],l[5]=0,l[6]=0,l[7]=0,l[8]=1,u(o,i,c);break;case"r":B(s,s,h[1]);break;case"m":a=h[1],u(s,a,s)}}return s},t.vertical=function(t,e,n){return n?(t[0]=e[1],t[1]=-1*e[0]):(t[0]=-1*e[1],t[1]=e[0]),t},Object.defineProperty(t,"__esModule",{value:!0})});
1
+ !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).util={})}(this,function(t){"use strict";function L(t){return[parseInt(t.substr(1,2),16),parseInt(t.substr(3,2),16),parseInt(t.substr(5,2),16)]}function n(t){t=Math.round(t).toString(16);return 1===t.length?"0"+t:t}function V(t){return"#"+n(t[0])+n(t[1])+n(t[2])}var r,z=/rgba?\(([\s.,0-9]+)\)/;function B(t){if("#"===t[0]&&7===t.length)return t;r||((n=document.createElement("i")).title="Web Colour Picker",n.style.display="none",document.body.appendChild(n),r=n),r.style.color=t;var n=document.defaultView.getComputedStyle(r,"").getPropertyValue("color");return V(z.exec(n)[1].split(/\s*,\s*/).map(function(t){return Number(t)}))}function R(t,n,r,e){return t[e]+(n[e]-t[e])*r}var D=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,_=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Q=/[\d.]+:(#[^\s]+|[^)]+\))/gi;var a="undefined"!=typeof Float32Array?Float32Array:Array;function s(t,n,r){var e=n[0],a=n[1],i=n[2],u=n[3],o=n[4],c=n[5],f=n[6],l=n[7],n=n[8],h=r[0],s=r[1],p=r[2],y=r[3],v=r[4],m=r[5],g=r[6],x=r[7],r=r[8];return t[0]=h*e+s*u+p*f,t[1]=h*a+s*o+p*l,t[2]=h*i+s*c+p*n,t[3]=y*e+v*u+m*f,t[4]=y*a+v*o+m*l,t[5]=y*i+v*c+m*n,t[6]=g*e+x*u+r*f,t[7]=g*a+x*o+r*l,t[8]=g*i+x*c+r*n,t}function Z(){var t=new a(3);return a!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function U(t,n,r){var e=new a(3);return e[0]=t,e[1]=n,e[2]=r,e}Math.hypot||(Math.hypot=function(){for(var t=0,n=arguments.length;n--;)t+=arguments[n]*arguments[n];return Math.sqrt(t)});function W(){var t=new a(4);return a!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}Z(),j=new a(4),a!=Float32Array&&(j[0]=0,j[1]=0,j[2]=0,j[3]=0);function H(t,n,r){var e,a,i=[0,0,0,0,0,0,0,0,0];e=i,r=r,a=Math.sin(r),r=Math.cos(r),e[0]=r,e[1]=a,e[2]=0,e[3]=-a,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1,s(t,i,n)}function G(t,n){return t[0]*n[1]-n[0]*t[1]}Z(),U(1,0,0),U(0,1,0),W(),W(),j=new a(9),a!=Float32Array&&(j[1]=0,j[2]=0,j[3]=0,j[5]=0,j[6]=0,j[7]=0),j[0]=1,j[4]=1,j[8]=1,j=new a(2),a!=Float32Array&&(j[0]=0,j[1]=0);var K=function(){return(K=Object.assign||function(t){for(var n,r=1,e=arguments.length;r<e;r++)for(var a in n=arguments[r])Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a]);return t}).apply(this,arguments)};function q(t,n,r){if(r||2===arguments.length)for(var e,a=0,i=n.length;a<i;a++)!e&&a in n||((e=e||Array.prototype.slice.call(n,0,a))[a]=n[a]);return t.concat(e||Array.prototype.slice.call(n))}function g(t){return t.map(function(t){return Array.isArray(t)?q([],t,!0):t})}var $={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};var p={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function J(t){return Array.isArray(t)&&t.every(function(t){var n=t[0].toLowerCase();return p[n]===t.length-1&&"achlmqstvz".includes(n)})}function X(t){return J(t)&&t.every(function(t){t=t[0];return t===t.toUpperCase()})}function Y(t){return X(t)&&t.every(function(t){t=t[0];return"ACLMQZ".includes(t)})}function tt(t){for(var n=t.pathValue[t.segmentStart],r=n.toLowerCase(),e=t.data;e.length>=p[r]&&("m"===r&&2<e.length?(t.segments.push(q([n],e.splice(0,2),!0)),r="l",n="m"===n?"l":"L"):t.segments.push(q([n],e.splice(0,p[r]),!0)),p[r]););}function y(t){return 48<=t&&t<=57}function v(t){for(var n,r=t.pathValue,e=t.max;t.index<e&&(10===(n=r.charCodeAt(t.index))||13===n||8232===n||8233===n||32===n||9===n||11===n||12===n||160===n||5760<=n&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(n));)t.index+=1}function nt(t){var n,r,e,a,i,u=t.max,o=t.pathValue,c=t.index,f=o.charCodeAt(c),l=p[o[c].toLowerCase()];if(t.segmentStart=c,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return 1;default:return}}(f))if(t.index+=1,v(t),t.data=[],l){for(;;){for(var h=l;0<h;--h){if(97!=(32|f)||3!==h&&4!==h?function(t){var n,r,e=t.max,a=t.pathValue,i=t.index,u=i,o=!1,c=!1,f=!1;if(e<=u)t.err="[path-util]: Invalid path value at index "+u+', "pathValue" is missing param';else if(y(r=43!==(r=a.charCodeAt(u))&&45!==r?r:a.charCodeAt(u+=1))||46===r){if(46!==r){if(n=48===r,r=a.charCodeAt(u+=1),n&&u<e&&r&&y(r))return t.err="[path-util]: Invalid path value at index "+i+', "'+a[i]+'" illegal number';for(;u<e&&y(a.charCodeAt(u));)u+=1,o=!0;r=a.charCodeAt(u)}if(46===r){for(f=!0,u+=1;y(a.charCodeAt(u));)u+=1,c=!0;r=a.charCodeAt(u)}if(101===r||69===r){if(f&&!o&&!c)return t.err="[path-util]: Invalid path value at index "+u+', "'+a[u]+'" invalid float exponent';if(43!==(r=a.charCodeAt(u+=1))&&45!==r||(u+=1),!(u<e&&y(a.charCodeAt(u))))return t.err="[path-util]: Invalid path value at index "+u+', "'+a[u]+'" invalid integer exponent';for(;u<e&&y(a.charCodeAt(u));)u+=1}t.index=u,t.param=+t.pathValue.slice(i,u)}else t.err="[path-util]: Invalid path value at index "+u+', "'+a[u]+'" is not a number'}(t):(i=a=e=void 0,e=(r=t).index,a=r.pathValue,48===(i=a.charCodeAt(e))?(r.param=0,r.index+=1):49===i?(r.param=1,r.index+=1):r.err='[path-util]: invalid Arc flag "'+a[e]+'", expecting 0 or 1 at index '+e),t.err.length)return;t.data.push(t.param),v(t),t.index<u&&44===o.charCodeAt(t.index)&&(t.index+=1,v(t))}if(t.index>=t.max)break;if(!(48<=(n=o.charCodeAt(t.index))&&n<=57||43===n||45===n||46===n))break}tt(t)}else tt(t);else t.err='[path-util]: Invalid path value "'+o[c]+'" is not a path command'}var rt=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function et(t){if(J(t))return g(t);var n=new rt(t);for(v(n);n.index<n.max&&!n.err.length;)nt(n);return n.err||n.segments}function at(t){if(X(t))return g(t);var t=et(t),i=0,u=0,o=0,c=0;return t.map(function(t){var n=t.slice(1).map(Number),t=t[0],r=t.toUpperCase();if("M"===t)return i=n[0],u=n[1],["M",o=i,c=u];if(t!==r)switch(r){case"A":e=[r,n[0],n[1],n[2],n[3],n[4],n[5]+i,n[6]+u];break;case"V":e=[r,n[0]+u];break;case"H":e=[r,n[0]+i];break;default:var e=q([r],n.map(function(t,n){return t+(n%2?u:i)}),!0)}else e=q([r],n,!0);var a=e.length;switch(r){case"Z":i=o,u=c;break;case"H":i=e[1];break;case"V":u=e[1];break;default:i=e[a-2],u=e[a-1],"M"===r&&(o=i,c=u)}return e})}function b(t){if(Y(t))return g(t);for(var n,r,e,a,i,u,o,c=at(t),f=K({},$),l=c.length,h=0;h<l;h+=1){c[h][0],c[h]=(n=c[h],r=f,o=u=p=i=s=a=e=void 0,e=n[0],a=r.x1,s=r.y1,i=r.x2,p=r.y2,u=n.slice(1).map(Number),o=n,"TQ".includes(e)||(r.qx=null,r.qy=null),"H"===e?o=["L",n[1],s]:"V"===e?o=["L",a,n[1]]:"S"===e?(n=2*s-p,o=q(["C",r.x1=2*a-i,r.y1=n],u,!0)):"T"===e?(p=2*a-r.qx,i=2*s-r.qy,o=q(["Q",r.qx=p,r.qy=i],u,!0)):"Q"===e&&(n=u[0],a=u[1],r.qx=n,r.qy=a),o);var s=c[h],p=s.length;f.x1=+s[p-2],f.y1=+s[p-1],f.x2=+s[p-4]||f.x1,f.y2=+s[p-3]||f.y1}return c}function O(t,n,r){return{x:t*Math.cos(r)-n*Math.sin(r),y:t*Math.sin(r)+n*Math.cos(r)}}function f(t,n,r){var e=t[0],t=t[1];return[e+(n[0]-e)*r,t+(n[1]-t)*r]}function k(t,n){return Math.sqrt((t[0]-n[0])*(t[0]-n[0])+(t[1]-n[1])*(t[1]-n[1]))}function A(t,n,r,e,a){var i=k([t,n],[r,e]),u={x:0,y:0};return{length:i,point:u="number"==typeof a?a<=0?{x:t,y:n}:i<=a?{x:r,y:e}:{x:(a=f([t,n],[r,e],a/i))[0],y:a[1]}:u,min:{x:Math.min(t,r),y:Math.min(n,e)},max:{x:Math.max(t,r),y:Math.max(n,e)}}}function it(t,n,r,e){var t=[t,n],n=[r,e],a=f(t,n,.5),i=f(n,a,.5),u=f(a,i,.5),o=f(i,u,.5),c=f(u,o,.5),t=q(q(q(q(q([],t,!0),a,!0),u,!0),c,!0),[.5],!1),a=A.apply(void 0,t).point,u=q(q(q(q(q([],c,!0),o,!0),i,!0),n,!0),[0],!1),t=A.apply(void 0,u).point;return[a.x,a.y,t.x,t.y,r,e]}function ut(t,n){var r,e=t[0],a=t.slice(1).map(Number),i=a[0],u=a[1],o=n.x1,c=n.y1,f=n.x,l=n.y;switch("TQ".includes(e)||(n.qx=null,n.qy=null),e){case"M":return n.x=i,n.y=u,t;case"A":return r=q([o,c],a,!0),q(["C"],function t(n,r,e,a,i,u,o,c,f,l){var h=120*Math.PI/180,s=Math.PI/180*(+i||0),p=[],y=(l?(M=l[0],w=l[1],x=l[2],d=l[3]):(n=(m=O(n,r,-s)).x,r=m.y,1<(y=(v=(n-(c=(m=O(c,f,-s)).x))/2)*v/(e*e)+(m=(r-(f=m.y))/2)*m/(a*a))&&(e*=y=Math.sqrt(y),a*=y),y=e*e,g=a*a,x=(u=(u===o?-1:1)*Math.sqrt(Math.abs((y*g-y*m*m-g*v*v)/(y*m*m+g*v*v))))*e*m/a+(n+c)/2,d=u*-a*v/e+(r+f)/2,M=Math.asin(((r-d)/a*Math.pow(10,9)>>0)/Math.pow(10,9)),w=Math.asin(((f-d)/a*Math.pow(10,9)>>0)/Math.pow(10,9)),M=n<x?Math.PI-M:M,w=c<x?Math.PI-w:w,M<0&&(M=2*Math.PI+M),w<0&&(w=2*Math.PI+w),o&&w<M&&(M-=2*Math.PI),!o&&M<w&&(w-=2*Math.PI)),w-M),v=(Math.abs(y)>h&&(g=w,m=c,u=f,w=M+h*(o&&M<w?1:-1),p=t(c=x+e*Math.cos(w),f=d+a*Math.sin(w),e,a,i,0,o,m,u,[w,g,x,d])),y=w-M,Math.cos(M)),h=Math.sin(M),i=Math.cos(w),o=Math.sin(w),m=Math.tan(y/4),u=4/3*e*m,g=4/3*a*m,x=[n,r],d=[n+u*h,r-g*v],M=[c+u*o,f-g*i],w=[c,f];if(d[0]=2*x[0]-d[0],d[1]=2*x[1]-d[1],l)return q(q(q(q([],d,!0),M,!0),w,!0),p,!0);for(var b=[],A=0,C=(p=q(q(q(q([],d,!0),M,!0),w,!0),p,!0)).length;A<C;A+=1)b[A]=A%2?O(p[A-1],p[A],s).y:O(p[A],p[A+1],s).x;return b}.apply(void 0,r),!0);case"Q":return n.qx=i,n.qy=u,r=q([o,c],a,!0),q(["C"],function(t,n,r,e,a,i){return[1/3*t+2/3*r,1/3*n+2/3*e,1/3*a+2/3*r,1/3*i+2/3*e,a,i]}.apply(void 0,r),!0);case"L":return q(["C"],it(o,c,i,u),!0);case"Z":return o===f&&c===l?["C",o,c,f,l,f,l]:q(["C"],it(o,c,f,l),!0)}return t}function ot(t,n){var r;if(void 0===n&&(n=!1),Y(r=t)&&r.every(function(t){t=t[0];return"MC".includes(t)}))return r=g(t),n?[r,[]]:r;for(var e,a=b(t),i=K({},$),u=[],o="",c=a.length,f=[],l=0;l<c;l+=1){a[l]&&(o=a[l][0]),u[l]=o;var h=ut(a[l],i),s=(a[l]=h,m=v=y=p=s=void 0,a),p=u,y=l;if(7<s[y].length){s[y].shift();for(var v=s[y],m=y;v.length;)p[y]="A",s.splice(m+=1,0,["C"].concat(v.splice(0,6)));s.splice(y,1)}c=a.length,"Z"===o&&f.push(l),e=(h=a[l]).length,i.x1=+h[e-2],i.y1=+h[e-1],i.x2=+h[e-4]||i.x1,i.y2=+h[e-3]||i.y1}return n?[a,f]:a}function ct(t,n){var r=t.x,t=t.y,e=n.x,n=n.y,a=r*e+t*n,i=Math.sqrt((Math.pow(r,2)+Math.pow(t,2))*(Math.pow(e,2)+Math.pow(n,2)));return(r*n-t*e<0?-1:1)*Math.acos(a/i)}function ft(t,n,r,e,a,i,u,o,c,f){for(var l="number"==typeof f,h=0,s=[x=t,d=n,h],p=[x,d],y={x:0,y:0},v=[{x:x,y:d}],m=(l&&f<=0&&(y={x:x,y:d}),0);m<=300;m+=1){var g,x=(g=function(t,n,r,e,a,i,u,o,c,f){var l=Math.abs,h=Math.sin,s=Math.cos,p=Math.sqrt,y=Math.PI,r=l(r),l=l(e),e=y/180*((a%360+360)%360);if(t===o&&n===c)return{x:t,y:n};if(0===r||0===l)return A(t,n,o,c,f).point;var a=(t-o)/2,v=(n-c)/2,a={x:s(e)*a+h(e)*v,y:-h(e)*a+s(e)*v};return 1<(v=Math.pow(a.x,2)/Math.pow(r,2)+Math.pow(a.y,2)/Math.pow(l,2))&&(r*=p(v),l*=p(v)),v=(Math.pow(r,2)*Math.pow(l,2)-Math.pow(r,2)*Math.pow(a.y,2)-Math.pow(l,2)*Math.pow(a.x,2))/(Math.pow(r,2)*Math.pow(a.y,2)+Math.pow(l,2)*Math.pow(a.x,2)),i=(i!==u?1:-1)*p(v=v<0?0:v),p=r*a.y/l*i,v=-l*a.x/r*i,i=s(e)*p-h(e)*v+(t+o)/2,t=h(e)*p+s(e)*v+(n+c)/2,n=ct({x:1,y:0},o={x:(a.x-p)/r,y:(a.y-v)/l}),c=ct(o,{x:(-a.x-p)/r,y:(-a.y-v)/l}),!u&&0<c?c-=2*y:u&&c<0&&(c+=2*y),o=n+(c%=2*y)*f,p=r*s(o),a=l*h(o),{x:s(e)*p-h(e)*a+i,y:h(e)*p+s(e)*a+t}}(t,n,r,e,a,i,u,o,c,m/300)).x,d=g.y,v=q(q([],v,!0),[{x:x,y:d}],!1);h+=k(p,[x,d]),p=[x,d],l&&f<h&&f>s[2]&&(g=(h-f)/(h-s[2]),y={x:p[0]*(1-g)+s[0]*g,y:p[1]*(1-g)+s[1]*g}),s=[x,d,h]}return{length:h,point:y=l&&h<=f?{x:o,y:c}:y,min:{x:Math.min.apply(Math,v.map(function(t){return t.x})),y:Math.min.apply(Math,v.map(function(t){return t.y}))},max:{x:Math.max.apply(Math,v.map(function(t){return t.x})),y:Math.max.apply(Math,v.map(function(t){return t.y}))}}}function lt(t,n,r,e,a,i,u,o,c){for(var f,l,h,s,p,y,v,m,g,x,d="number"==typeof c,M=t,w=n,b=0,A=[M,w,b],C=[M,w],O={x:0,y:0},P=[{x:M,y:w}],j=(d&&c<=0&&(O={x:M,y:w}),0);j<=20;j+=1)f=t,l=n,h=r,s=e,p=a,y=i,v=u,m=o,x=void 0,x=1-(g=j/20),M=(f={x:Math.pow(x,3)*f+3*Math.pow(x,2)*g*h+3*x*Math.pow(g,2)*p+Math.pow(g,3)*v,y:Math.pow(x,3)*l+3*Math.pow(x,2)*g*s+3*x*Math.pow(g,2)*y+Math.pow(g,3)*m}).x,w=f.y,P=q(q([],P,!0),[{x:M,y:w}],!1),b+=k(C,[M,w]),C=[M,w],d&&c<b&&c>A[2]&&(h=(b-c)/(b-A[2]),O={x:C[0]*(1-h)+A[0]*h,y:C[1]*(1-h)+A[1]*h}),A=[M,w,b];return{length:b,point:O=d&&b<=c?{x:u,y:o}:O,min:{x:Math.min.apply(Math,P.map(function(t){return t.x})),y:Math.min.apply(Math,P.map(function(t){return t.y}))},max:{x:Math.max.apply(Math,P.map(function(t){return t.x})),y:Math.max.apply(Math,P.map(function(t){return t.y}))}}}function ht(t,n,r,e,a,i,u){for(var o,c,f,l,h,s,p,y,v="number"==typeof u,m=t,g=n,x=0,d=[m,g,x],M=[m,g],w={x:0,y:0},b=[{x:m,y:g}],A=(v&&u<=0&&(w={x:m,y:g}),0);A<=300;A+=1)o=t,c=n,f=r,l=e,h=a,s=i,y=void 0,y=1-(p=A/300),m=(o={x:Math.pow(y,2)*o+2*y*p*f+Math.pow(p,2)*h,y:Math.pow(y,2)*c+2*y*p*l+Math.pow(p,2)*s}).x,g=o.y,b=q(q([],b,!0),[{x:m,y:g}],!1),x+=k(M,[m,g]),M=[m,g],v&&u<x&&u>d[2]&&(f=(x-u)/(x-d[2]),w={x:M[0]*(1-f)+d[0]*f,y:M[1]*(1-f)+d[1]*f}),d=[m,g,x];return{length:x,point:w=v&&x<=u?{x:a,y:i}:w,min:{x:Math.min.apply(Math,b.map(function(t){return t.x})),y:Math.min.apply(Math,b.map(function(t){return t.y}))},max:{x:Math.max.apply(Math,b.map(function(t){return t.x})),y:Math.max.apply(Math,b.map(function(t){return t.y}))}}}function o(t,n){for(var r,e,a,i=b(t),u="number"==typeof n,o=[],c=0,f=0,l=0,h=0,s=[],p=[],y=0,v={x:0,y:0},m=v,g=v,x=v,d=0,M=0,w=i.length;M<w;M+=1)o=(r="M"===(e=(a=i[M])[0]))?o:q([c,f],a.slice(1),!0),r?(m=v={x:l=a[1],y:h=a[2]},y=0,u&&n<.001&&(x=v)):"L"===e?(y=(r=A.apply(void 0,q(q([],o,!1),[(n||0)-d],!1))).length,v=r.min,m=r.max,g=r.point):"A"===e?(y=(r=ft.apply(void 0,q(q([],o,!1),[(n||0)-d],!1))).length,v=r.min,m=r.max,g=r.point):"C"===e?(y=(r=lt.apply(void 0,q(q([],o,!1),[(n||0)-d],!1))).length,v=r.min,m=r.max,g=r.point):"Q"===e?(y=(r=ht.apply(void 0,q(q([],o,!1),[(n||0)-d],!1))).length,v=r.min,m=r.max,g=r.point):"Z"===e&&(y=(r=A.apply(void 0,q(q([],o=[c,f,l,h],!1),[(n||0)-d],!1))).length,v=r.min,m=r.max,g=r.point),u&&d<n&&n<=d+y&&(x=g),p=q(q([],p,!0),[m],!1),s=q(q([],s,!0),[v],!1),d+=y,c=(r="Z"!==e?a.slice(-2):[l,h])[0],f=r[1];return{length:d,point:x=u&&d<=n?{x:c,y:f}:x,min:{x:Math.min.apply(Math,s.map(function(t){return t.x})),y:Math.min.apply(Math,s.map(function(t){return t.y}))},max:{x:Math.max.apply(Math,p.map(function(t){return t.x})),y:Math.max.apply(Math,p.map(function(t){return t.y}))}}}function x(t){return o(t).length}function st(t){var r,e=0,a=0;return ot(t).map(function(t){var n;return"M"!==t[0]?(r=function(t,n,r,e,a,i,u,o){return 3*((o-n)*(r+a)-(u-t)*(e+i)+e*(t-a)-r*(n-i)+o*(a+t/3)-u*(i+n/3))/20}.apply(void 0,q([e,a],t.slice(1),!1)),n=t.slice(-2),e=n[0],a=n[1],r):(e=t[1],a=t[2],0)}).reduce(function(t,n){return t+n},0)}function d(t,n){return o(t,n).point}function pt(t,r){for(var n,e,a,i,u,t=et(t),o=b(t),c=x(t),f=function(t){var n=t.x-r.x,t=t.y-r.y;return n*n+t*t},l=8,h=0,s=1/0,p=0;p<=c;p+=l)(e=f(n=d(o,p)))<s&&(a=n,h=p,s=e);l/=2;for(var y,v,m,g;.5<l;)m=f(i=d(o,y=h-l)),g=f(u=d(o,v=h+l)),0<=y&&m<s?(a=i,h=y,s=m):v<=c&&g<s?(a=u,h=v,s=g):l/=2;t=function(t,n){if("string"==typeof(t=et(t)))throw TypeError(t);var r=q([],t,!0),e=x(r),a=r.length-1,i=0,u=0,o=t[0],c={x:(c=o.slice(-2))[0],y:c[1]};if(a<=0||!n||!Number.isFinite(n))return{segment:o,index:0,length:u,point:c,lengthAtSegment:i};if(e<=n)return i=x(r=t.slice(0,-1)),{segment:t[a],index:a,length:u=e-i,lengthAtSegment:i};for(var f=[];0<a;)o=r[a],u=e-(i=x(r=r.slice(0,-1))),e=i,f.push({segment:o,index:a,length:u,lengthAtSegment:i}),--a;return f.find(function(t){return t.lengthAtSegment<=n})}(t,h);return{closest:a,distance:Math.sqrt(s),segment:t}}function yt(t){return t.map(function(t,n,r){var e,a,i,u,r=n&&r[n-1].slice(-2).concat(t.slice(1)),o=n?lt.apply(void 0,r).length:0,r=n?o?(void 0===e&&(e=.5),r=(n=r).slice(0,2),a=n.slice(2,4),i=n.slice(4,6),n=n.slice(6,8),r=f(r,a,e),a=f(a,i,e),i=f(i,n,e),u=f(r,a,e),a=f(a,i,e),e=f(u,a,e),[["C"].concat(r,u,e),["C"].concat(a,i,n)]):[t,t]:[t];return{s:t,ss:r,l:o}})}function e(t,n){return!!c(t)&&-1<t.indexOf(n)}function vt(t,n){if(!c(t))return t;for(var r=[],e=0;e<t.length;e++){var a=t[e];n(a,e)&&r.push(a)}return r}function i(t){var n=typeof t;return null!==t&&"object"==n||"function"==n}var c=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},mt={}.toString,u=function(t,n){return mt.call(t)==="[object "+n+"]"},l=function(t){return u(t,"Function")},h=function(t){return null==t},m=function(t){return Array.isArray?Array.isArray(t):u(t,"Array")};function M(t,n){if(t)if(m(t))for(var r=0,e=t.length;r<e&&!1!==n(t[r],r);r++);else if(i(t))for(var a in t)if(t.hasOwnProperty(a)&&!1===n(t[a],a))break}var gt=Object.keys?function(t){return Object.keys(t)}:function(r){var e=[];return M(r,function(t,n){l(r)&&"prototype"===n||e.push(n)}),e};function xt(t,n){var r=gt(n),e=r.length;if(h(t))return!e;for(var a=0;a<e;a+=1){var i=r[a];if(n[i]!==t[i]||!(i in t))return!1}return!0}var w=function(t){return"object"==typeof t&&null!==t},C=function(t){if(!w(t)||!u(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n};function dt(t,n){if(void 0===n&&(n=[]),m(t))for(var r=0;r<t.length;r+=1)dt(t[r],n);else n.push(t);return n}function Mt(t){if(m(t))return t.reduce(function(t,n){return Math.max(t,n)},t[0])}function wt(t){if(m(t))return t.reduce(function(t,n){return Math.min(t,n)},t[0])}function bt(t,n){if(!c(t))return[];for(var r=t?n.length:0,e=r-1;r--;){var a=void 0,i=n[r];r!==e&&i===a||Pt.call(t,a=i,1)}return t}function At(t,r,n){if(!m(t)&&!C(t))return t;var e=n;return M(t,function(t,n){e=r(e,t,n)}),e}function P(t){return u(t,"String")}var j=Array.prototype,Ct=j.splice,Ot=j.indexOf,Pt=Array.prototype.splice;function jt(t,n){void 0===n&&(n=new Map);var r=[];if(Array.isArray(t))for(var e=0,a=t.length;e<a;e++){var i=t[e];n.has(i)||(r.push(i),n.set(i,!0))}return r}var qt=Object.prototype.hasOwnProperty;function kt(t,n){if(!n||!m(t))return{};for(var r={},e=l(n)?n:function(t){return t[n]},a=0;a<t.length;a++){var i=t[a],u=e(i);qt.call(r,u)?r[u].push(i):r[u]=[i]}return r}function It(t,n){return n?(l(n)||(a=m(n)?n:n.replace(/\s+/g,"").split("*"),n=function(t){for(var n="_",r=0,e=a.length;r<e;r++)n+=t[a[r]]&&t[a[r]].toString();return n}),kt(t,n)):{0:t};var a}var Ft={};function I(t){return u(t,"Number")}j=Number.isInteger||function(t){return I(t)&&t%1==0};function St(t,n){return t.hasOwnProperty(n)}function F(t){return h(t)?"":t.toString()}var Tt=180/Math.PI,Et=parseInt,Nt=Math.PI/180,Lt=Object.values?function(t){return Object.values(t)}:function(r){var e=[];return M(r,function(t,n){l(r)&&"prototype"===n||e.push(t)}),e};function Vt(t){return zt.call(t).replace(/^\[object /,"").replace(/]$/,"")}var zt={}.toString;function Bt(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||Rt)}var Rt=Object.prototype;function Dt(t,n){for(var r in n)n.hasOwnProperty(r)&&"constructor"!==r&&void 0!==n[r]&&(t[r]=n[r])}function S(t,n,r,e){return n&&Dt(t,n),r&&Dt(t,r),e&&Dt(t,e),t}function _t(t){if("object"!=typeof t||null===t)return t;if(m(t))for(var n=[],r=0,e=t.length;r<e;r++)"object"==typeof t[r]&&null!=t[r]?n[r]=_t(t[r]):n[r]=t[r];else for(var a in n={},t)"object"==typeof t[a]&&null!=t[a]?n[a]=_t(t[a]):n[a]=t[a];return n}var Qt=5;var Zt=Object.prototype.hasOwnProperty;function T(t,n){if(t===n)return!0;if(!t||!n)return!1;if(P(t)||P(n))return!1;if(c(t)||c(n)){if(t.length!==n.length)return!1;for(var r=!0,e=0;e<t.length&&(r=T(t[e],n[e]));e++);return r}if(w(t)||w(n)){var a=Object.keys(t),i=Object.keys(n);if(a.length!==i.length)return!1;for(r=!0,e=0;e<a.length&&(r=T(t[a[e]],n[a[e]]));e++);return r}return!1}function Ut(t){return t}var Wt=Object.prototype.hasOwnProperty,E={};function N(){this.map={}}N.prototype.has=function(t){return void 0!==this.map[t]},N.prototype.get=function(t,n){t=this.map[t];return void 0===t?n:t},N.prototype.set=function(t,n){this.map[t]=n},N.prototype.clear=function(){this.map={}},N.prototype.delete=function(t){delete this.map[t]},N.prototype.size=function(){return Object.keys(this.map).length},t.Cache=N,t.angleTo=function(t,n,r){a=n,u=(e=t)[0],e=e[1],o=a[0],a=a[1],i=Math.sqrt(u*u+e*e)*Math.sqrt(o*o+a*a);var e,a,i,u=Math.acos(Math.min(Math.max(i&&(u*o+e*a)/i,-1),1)),o=0<=G(t,n);return r?o?2*Math.PI-u:u:o?u:2*Math.PI-u},t.assign=S,t.augment=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=t[0],e=1;e<t.length;e++){var a=t[e];l(a)&&(a=a.prototype),S(r.prototype,a)}},t.clamp=function(t,n,r){return t<n?n:r<t?r:t},t.clearAnimationFrame=function(t){(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame||clearTimeout)(t)},t.clone=_t,t.clonePath=g,t.contains=e,t.debounce=function(e,a,i){var u;return function(){var t=this,n=arguments,r=i&&!u;clearTimeout(u),u=setTimeout(function(){u=null,i||e.apply(t,n)},a),r&&e.apply(t,n)}},t.deepMix=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];for(var e=0;e<n.length;e+=1)!function t(n,r,e,a){for(var i in e=e||0,a=a||Qt,r){var u;r.hasOwnProperty(i)&&(null!==(u=r[i])&&C(u)?(C(n[i])||(n[i]={}),e<a?t(n[i],u,e+1,a):n[i]=r[i]):m(u)?(n[i]=[],n[i]=n[i].concat(u)):void 0!==u&&(n[i]=u))}}(t,n[e]);return t},t.difference=function(t,n){return void 0===n&&(n=[]),vt(t,function(t){return!e(n,t)})},t.direction=G,t.distanceSquareRoot=k,t.each=M,t.endsWith=function(t,n){return!(!m(t)&&!P(t))&&t[t.length-1]===n},t.equalizeSegments=function t(n,r,e){var a,n=yt(n),r=yt(r),i=n.length,u=r.length,o=n.filter(function(t){return t.l}).length,c=r.filter(function(t){return t.l}).length,o=n.filter(function(t){return t.l}).reduce(function(t,n){return t+n.l},0)/o||0,c=r.filter(function(t){return t.l}).reduce(function(t,n){return t+n.l},0)/c||0,f=e||Math.max(i,u),l=[o,c],h=[f-i,f-u],e=[n,r].map(function(t,r){return t.l===f?t.map(function(t){return t.s}):t.map(function(t,n){return a=n&&h[r]&&t.l>=l[r],h[r]-=a?1:0,a?t.ss:[t.s]}).flat()});return e[0].length===e[1].length?e:t(e[0],e[1],f)},t.every=function(t,n){for(var r=0;r<t.length;r++)if(!n(t[r],r))return!1;return!0},t.extend=function(t,n,r,e){l(n)||(r=n,n=t,t=function(){});var a=Object.create?function(t,n){return Object.create(t,{constructor:{value:n}})}:function(t,n){function r(){}r.prototype=t;t=new r;return t.constructor=n,t},i=a(n.prototype,t);return t.prototype=S(i,t.prototype),t.superclass=a(n.prototype,n),S(i,r),S(t,e),t},t.filter=vt,t.find=function(t,n){if(!m(t))return null;var r;if(l(n)&&(r=n),r=C(n)?function(t){return xt(t,n)}:r)for(var e=0;e<t.length;e+=1)if(r(t[e]))return t[e];return null},t.findIndex=function(t,n,r){for(var e=r=void 0===r?0:r;e<t.length;e++)if(n(t[e],e))return e;return-1},t.firstValue=function(t,n){for(var r=null,e=0;e<t.length;e++){var a=t[e][n];if(!h(a)){r=m(a)?a[0]:a;break}}return r},t.fixedBase=function(t,n){var n=n.toString(),r=n.indexOf(".");if(-1===r)return Math.round(t);n=n.substr(r+1).length;return 20<n&&(n=20),parseFloat(t.toFixed(n))},t.flatten=function(t){if(!m(t))return[];for(var n=[],r=0;r<t.length;r++)n=n.concat(t[r]);return n},t.flattenDeep=dt,t.forIn=M,t.get=function(t,n,r){for(var e=0,a=P(n)?n.split("."):n;t&&e<a.length;)t=t[a[e++]];return void 0===t||e<a.length?r:t},t.getDrawDirection=function(t){return 0<=st(t)},t.getPathArea=st,t.getPathBBox=function(t){if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0,cx:0,cy:0,cz:0};var t=o(t),n=(r=t.min).x,r=r.y,e=(t=t.max).x,t=t.y,a=e-n,i=t-r;return{width:a,height:i,x:n,y:r,x2:e,y2:t,cx:n+a/2,cy:r+i/2,cz:Math.max(a,i)+Math.min(a,i)/2}},t.getPathBBoxTotalLength=function(t){if(!t)return{length:0,x:0,y:0,width:0,height:0,x2:0,y2:0,cx:0,cy:0,cz:0};var n=(t=o(t)).length,r=(e=t.min).x,e=e.y,a=(t=t.max).x,t=t.y,i=a-r,u=t-e;return{length:n,width:i,height:u,x:r,y:e,x2:a,y2:t,cx:r+i/2,cy:e+u/2,cz:Math.max(i,u)+Math.min(i,u)/2}},t.getPointAtLength=d,t.getRange=function(t){var n=t.filter(function(t){return!isNaN(t)});if(!n.length)return{min:0,max:0};if(m(t[0])){for(var r=[],e=0;e<t.length;e++)r=r.concat(t[e]);n=r}var a=Mt(n);return{min:wt(n),max:a}},t.getRotatedCurve=function(e,a){var i,u,o,c=e.length-1,n=[],f=0,t=(u=(i=e).length,o=u-1,i.map(function(t,e){return i.map(function(t,n){var r=e+n;return 0===n||i[r]&&"M"===i[r][0]?(n=i[r],["M"].concat(n.slice(-2))):(u<=r&&(r-=o),i[r])})}));return t.forEach(function(t,r){e.slice(1).forEach(function(t,n){f+=k(e[(r+n)%c].slice(-2),a[n%c].slice(-2))}),n[r]=f,f=0}),t[n.indexOf(Math.min.apply(null,n))]},t.getTotalLength=x,t.getType=Vt,t.getWrapBehavior=function(t,n){return t["_wrap_"+n]},t.gradient=function(t){var i=("string"==typeof t?t.split("-"):t).map(function(t){return L(-1===t.indexOf("#")?B(t):t)});return function(t){return n=i,t=t,t=isNaN(Number(t))||t<0?0:1<t?1:Number(t),r=n.length-1,e=Math.floor(r*t),t=r*t-e,a=n[e],r=e===r?a:n[e+1],V([R(a,r,t,0),R(a,r,t,1),R(a,r,t,2)]);var n,r,e,a}},t.group=function(t,n){if(!n)return[t];var r,e=It(t,n),a=[];for(r in e)a.push(e[r]);return a},t.groupBy=kt,t.groupToMap=It,t.has=St,t.hasKey=St,t.hasValue=function(t,n){return e(Lt(t),n)},t.head=function(t){if(c(t))return t[0]},t.identity=function(t){return t},t.includes=e,t.indexOf=function(t,n){if(!c(t))return-1;var r=Array.prototype.indexOf;if(r)return r.call(t,n);for(var e=-1,a=0;a<t.length;a++)if(t[a]===n){e=a;break}return e},t.isArguments=function(t){return u(t,"Arguments")},t.isArray=m,t.isArrayLike=c,t.isBoolean=function(t){return u(t,"Boolean")},t.isDate=function(t){return u(t,"Date")},t.isDecimal=function(t){return I(t)&&t%1!=0},t.isElement=function(t){return t instanceof Element||t instanceof HTMLDocument},t.isEmpty=function(t){if(h(t))return!0;if(c(t))return!t.length;var n,r=Vt(t);if("Map"===r||"Set"===r)return!t.size;if(Bt(t))return!Object.keys(t).length;for(n in t)if(Zt.call(t,n))return!1;return!0},t.isEqual=T,t.isEqualWith=function(t,n,r){return l(r)?!!r(t,n):T(t,n)},t.isError=function(t){return u(t,"Error")},t.isEven=function(t){return I(t)&&t%2==0},t.isFinite=function(t){return I(t)&&isFinite(t)},t.isFunction=l,t.isInteger=j,t.isMatch=xt,t.isNegative=function(t){return I(t)&&t<0},t.isNil=h,t.isNull=function(t){return null===t},t.isNumber=I,t.isNumberEqual=function(t,n,r){return void 0===r&&(r=1e-5),Math.abs(t-n)<r},t.isObject=i,t.isObjectLike=w,t.isOdd=function(t){return I(t)&&t%2!=0},t.isPlainObject=C,t.isPointInStroke=function(t,n){return t=pt(t,n).distance,Math.abs(t)<.001},t.isPositive=function(t){return I(t)&&0<t},t.isPrototype=Bt,t.isRegExp=function(t){return u(t,"RegExp")},t.isString=P,t.isType=u,t.isUndefined=function(t){return void 0===t},t.keys=gt,t.last=function(t){if(c(t))return t[t.length-1]},t.lowerCase=function(t){return F(t).toLowerCase()},t.lowerFirst=function(t){t=F(t);return t.charAt(0).toLowerCase()+t.substring(1)},t.map=function(t,n){if(!c(t))return t;for(var r=[],e=0;e<t.length;e++){var a=t[e];r.push(n(a,e))}return r},t.mapValues=function(n,r){void 0===r&&(r=Ut);var e={};return i(n)&&!h(n)&&Object.keys(n).forEach(function(t){e[t]=r(n[t],t)}),e},t.max=Mt,t.maxBy=function(t,n){if(m(t)){for(var r,e=-1/0,a=0;a<t.length;a++){var i=t[a],u=l(n)?n(i):i[n];e<u&&(r=i,e=u)}return r}},t.memoize=function(i,u){if(!l(i))throw new TypeError("Expected a function");function o(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=u?u.apply(this,t):t[0],e=o.cache;if(e.has(r))return e.get(r);var a=i.apply(this,t);return e.set(r,a),a}return o.cache=new Map,o},t.min=wt,t.minBy=function(t,n){if(m(t)){for(var r,e=1/0,a=0;a<t.length;a++){var i=t[a],u=l(n)?n(i):i[n];u<e&&(r=i,e=u)}return r}},t.mix=S,t.mod=function(t,n){return(t%n+n)%n},t.noop=function(){},t.normalizePath=b,t.number2color=function(t){var n=Ft[t];if(!n){for(var r=t.toString(16),e=r.length;e<6;e++)r="0"+r;Ft[t]=n="#"+r}return n},t.omit=function(t,e){return At(t,function(t,n,r){return e.includes(r)||(t[r]=n),t},{})},t.parseRadius=function(t){var n=0,r=0,e=0,a=0;return m(t)?1===t.length?n=r=e=a=t[0]:2===t.length?(n=e=t[0],r=a=t[1]):3===t.length?(n=t[0],r=a=t[1],e=t[2]):(n=t[0],r=t[1],e=t[2],a=t[3]):n=r=e=a=t,{r1:n,r2:r,r3:e,r4:a}},t.path2Absolute=at,t.path2Curve=ot,t.path2String=function(t,n){return function(t,r){if("off"===r)return g(t);var e="number"==typeof r&&1<=r?Math.pow(10,r):1;return t.map(function(t){var n=t.slice(1).map(Number).map(function(t){return r?Math.round(t*e)/e:Math.round(t)});return q([t[0]],n,!0)})}(t,n=void 0===n?"off":n).map(function(t){return t[0]+t.slice(1).join(" ")}).join("")},t.pick=function(n,t){if(null===n||!C(n))return{};var r={};return M(t,function(t){Wt.call(n,t)&&(r[t]=n[t])}),r},t.pull=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];for(var e=0;e<n.length;e++)for(var a,i=n[e];-1<(a=Ot.call(t,i));)Ct.call(t,a,1);return t},t.pullAt=bt,t.reduce=At,t.remove=function(t,n){var r=[];if(!c(t))return r;for(var e=-1,a=[],i=t.length;++e<i;){var u=t[e];n(u,e,t)&&(r.push(u),a.push(e))}return bt(t,a),r},t.requestAnimationFrame=function(t){return(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return setTimeout(t,16)})(t)},t.reverseCurve=function(e){var t=e.slice(1).map(function(t,n,r){return(n?r[n-1].slice(-2):e[0].slice(1)).concat(t.slice(1))}).map(function(r){return r.map(function(t,n){return r[r.length-n-2*(1-n%2)]})}).reverse();return[["M"].concat(t[0].slice(0,2))].concat(t.map(function(t){return["C"].concat(t.slice(2))}))},t.rgb2arr=L,t.set=function(t,n,r){var e=t,a=P(n)?n.split("."):n;return a.forEach(function(t,n){n<a.length-1?(i(e[t])||(e[t]=I(a[n+1])?[]:{}),e=e[t]):e[t]=r}),t},t.size=function(t){return h(t)?0:(c(t)?t:Object.keys(t)).length},t.some=function(t,n){for(var r=0;r<t.length;r++)if(n(t[r],r))return!0;return!1},t.sortBy=function(t,r){var a,n=l(r)?function(t,n){return r(t)-r(n)}:(a=[],P(r)?a.push(r):m(r)&&(a=r),function(t,n){for(var r=0;r<a.length;r+=1){var e=a[r];if(t[e]>n[e])return 1;if(t[e]<n[e])return-1}return 0});return t.sort(n),t},t.startsWith=function(t,n){return!(!m(t)&&!P(t))&&t[0]===n},t.substitute=function(t,r){return t&&r?t.replace(/\\?\{([^{}]+)\}/g,function(t,n){return"\\"===t.charAt(0)?t.slice(1):void 0===r[n]?"":r[n]}):t},t.throttle=function(r,e,a){function i(){l=!1===a.leading?0:Date.now(),u=null,f=r.apply(o,c),u||(o=c=null)}function t(){var t=Date.now(),n=(l||!1!==a.leading||(l=t),e-(t-l));return o=this,c=arguments,n<=0||e<n?(u&&(clearTimeout(u),u=null),l=t,f=r.apply(o,c),u||(o=c=null)):u||!1===a.trailing||(u=setTimeout(i,n)),f}var u,o,c,f,l=0;a=a||{};return t.cancel=function(){clearTimeout(u),l=0,u=o=c=null},t},t.toArray=function(t){return c(t)?Array.prototype.slice.call(t):[]},t.toCSSGradient=function(t){var n,r,e,a,i;return/^[r,R,L,l]{1}[\s]*\(/.test(t)?(r=void 0,"l"===t[0]?(n=+(a=D.exec(t))[1]+90,r=a[2],e="linear-gradient("+n+"deg, "):"r"===t[0]&&(e="radial-gradient(",r=(a=_.exec(t))[4]),(i=r.match(Q)).forEach(function(t,n){t=t.split(":");e+=t[1]+" "+100*Number(t[0])+"%",n!==i.length-1&&(e+=", ")}),e+=")"):t},t.toDegree=function(t){return Tt*t},t.toInteger=Et,t.toRGB=B,t.toRadian=function(t){return Nt*t},t.toString=F,t.transform=function(t,n){for(var r,e,a,i,u,o,c=t?[].concat(t):[1,0,0,0,1,0,0,0,1],f=0,l=n.length;f<l;f++){var h=n[f];switch(h[0]){case"t":a=e=c,i=[h[1],h[2]],u=void 0,i=i,(u=o=[0,0,0,0,0,0,0,0,0])[0]=1,u[1]=0,u[2]=0,u[3]=0,u[4]=1,u[5]=0,u[6]=i[0],u[7]=i[1],u[8]=1,s(e,o,a);break;case"s":u=i=c,e=[h[1],h[2]],o=void 0,(o=a=[0,0,0,0,0,0,0,0,0])[0]=(e=e)[0],o[1]=0,o[2]=0,o[3]=0,o[4]=e[1],o[5]=0,o[6]=0,o[7]=0,o[8]=1,s(i,a,u);break;case"r":H(c,c,h[1]);break;case"m":r=h[1],s(c,r,c)}}return c},t.union=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return jt([].concat.apply([],t))},t.uniq=jt,t.uniqueId=function(t){return E[t=t||"g"]?E[t]+=1:E[t]=1,t+E[t]},t.upperCase=function(t){return F(t).toUpperCase()},t.upperFirst=function(t){t=F(t);return t.charAt(0).toUpperCase()+t.substring(1)},t.values=Lt,t.valuesOfKey=function(t,n){for(var r=[],e={},a=0;a<t.length;a++){var i=t[a][n];if(!h(i)){m(i)||(i=[i]);for(var u=0;u<i.length;u++){var o=i[u];e[o]||(r.push(o),e[o]=!0)}}}return r},t.vertical=function(t,n,r){return r?(t[0]=n[1],t[1]=-1*n[0]):(t[0]=-1*n[1],t[1]=n[0]),t},t.wrapBehavior=function(n,r){return n["_wrap_"+r]||(n["_wrap_"+r]=t);function t(t){n[r](t)}},Object.defineProperty(t,"__esModule",{value:!0})});
@@ -4,8 +4,8 @@
4
4
  * @returns
5
5
  */
6
6
  export function toHex(value) {
7
- const x16Value = Math.round(value).toString(16);
8
- return x16Value.length === 1 ? `0${x16Value}` : x16Value;
7
+ var x16Value = Math.round(value).toString(16);
8
+ return x16Value.length === 1 ? "0" + x16Value : x16Value;
9
9
  }
10
10
  /**
11
11
  * 数组转换成颜色
@@ -13,6 +13,6 @@ export function toHex(value) {
13
13
  * @returns
14
14
  */
15
15
  export function arr2rgb(arr) {
16
- return `#${toHex(arr[0])}${toHex(arr[1])}${toHex(arr[2])}`;
16
+ return "#" + toHex(arr[0]) + toHex(arr[1]) + toHex(arr[2]);
17
17
  }
18
18
  //# sourceMappingURL=arr2rgb.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"arr2rgb.js","sourceRoot":"src/","sources":["color/arr2rgb.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,KAAK,CAAC,KAAa;IACjC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAEhD,OAAO,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;AAC3D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAC,GAAa;IACnC,OAAO,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC7D,CAAC"}
1
+ {"version":3,"file":"arr2rgb.js","sourceRoot":"src/","sources":["color/arr2rgb.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,KAAK,CAAC,KAAa;IACjC,IAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAEhD,OAAO,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAI,QAAU,CAAC,CAAC,CAAC,QAAQ,CAAC;AAC3D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAC,GAAa;IACnC,OAAO,MAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAG,CAAC;AAC7D,CAAC"}
@@ -19,12 +19,12 @@ function getValue(start, end, percent, index) {
19
19
  * @returns
20
20
  */
21
21
  function calColor(points, percent) {
22
- const fixedPercent = isNaN(Number(percent)) || percent < 0 ? 0 : percent > 1 ? 1 : Number(percent);
23
- const steps = points.length - 1;
24
- const step = Math.floor(steps * fixedPercent);
25
- const left = steps * fixedPercent - step;
26
- const start = points[step];
27
- const end = step === steps ? start : points[step + 1];
22
+ var fixedPercent = isNaN(Number(percent)) || percent < 0 ? 0 : percent > 1 ? 1 : Number(percent);
23
+ var steps = points.length - 1;
24
+ var step = Math.floor(steps * fixedPercent);
25
+ var left = steps * fixedPercent - step;
26
+ var start = points[step];
27
+ var end = step === steps ? start : points[step + 1];
28
28
  return arr2rgb([getValue(start, end, left, 0), getValue(start, end, left, 1), getValue(start, end, left, 2)]);
29
29
  }
30
30
  /**
@@ -33,12 +33,12 @@ function calColor(points, percent) {
33
33
  * @return 颜色值
34
34
  */
35
35
  export function gradient(colors) {
36
- const colorArray = typeof colors === 'string' ? colors.split('-') : colors;
37
- const points = colorArray.map((color) => {
36
+ var colorArray = typeof colors === 'string' ? colors.split('-') : colors;
37
+ var points = colorArray.map(function (color) {
38
38
  return rgb2arr(color.indexOf('#') === -1 ? toRGB(color) : color);
39
39
  });
40
40
  // 返回一个函数
41
- return (percent) => {
41
+ return function (percent) {
42
42
  return calColor(points, percent);
43
43
  };
44
44
  }
@@ -1 +1 @@
1
- {"version":3,"file":"gradient.js","sourceRoot":"src/","sources":["color/gradient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC;;;;;;;GAOG;AACH,SAAS,QAAQ,CAAC,KAAe,EAAE,GAAa,EAAE,OAAe,EAAE,KAAa;IAC9E,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,OAAO,CAAC;AAC9D,CAAC;AAED;;;;;GAKG;AACH,SAAS,QAAQ,CAAC,MAAkB,EAAE,OAAe;IACnD,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAEnG,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;IAEhC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,YAAY,CAAC,CAAC;IAE9C,MAAM,IAAI,GAAG,KAAK,GAAG,YAAY,GAAG,IAAI,CAAC;IAEzC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAE3B,MAAM,GAAG,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;IAEtD,OAAO,OAAO,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAChH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAC,MAAyB;IAChD,MAAM,UAAU,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAE,MAAiB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAEvF,MAAM,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACtC,OAAO,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;IAEH,SAAS;IACT,OAAO,CAAC,OAAe,EAAU,EAAE;QACjC,OAAO,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,CAAC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"gradient.js","sourceRoot":"src/","sources":["color/gradient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC;;;;;;;GAOG;AACH,SAAS,QAAQ,CAAC,KAAe,EAAE,GAAa,EAAE,OAAe,EAAE,KAAa;IAC9E,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,OAAO,CAAC;AAC9D,CAAC;AAED;;;;;GAKG;AACH,SAAS,QAAQ,CAAC,MAAkB,EAAE,OAAe;IACnD,IAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAEnG,IAAM,KAAK,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;IAEhC,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,YAAY,CAAC,CAAC;IAE9C,IAAM,IAAI,GAAG,KAAK,GAAG,YAAY,GAAG,IAAI,CAAC;IAEzC,IAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAE3B,IAAM,GAAG,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;IAEtD,OAAO,OAAO,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAChH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAC,MAAyB;IAChD,IAAM,UAAU,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAE,MAAiB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAEvF,IAAM,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,UAAC,KAAK;QAClC,OAAO,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;IAEH,SAAS;IACT,OAAO,UAAC,OAAe;QACrB,OAAO,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,CAAC,CAAC;AACJ,CAAC"}
@@ -1,36 +1,36 @@
1
- const regexLG = /^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i;
2
- const regexRG = /^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i;
3
- const regexColorStop = /[\d.]+:(#[^\s]+|[^)]+\))/gi;
1
+ var regexLG = /^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i;
2
+ var regexRG = /^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i;
3
+ var regexColorStop = /[\d.]+:(#[^\s]+|[^)]+\))/gi;
4
4
  function isGradientColor(val) {
5
5
  return /^[r,R,L,l]{1}[\s]*\(/.test(val);
6
6
  }
7
7
  export function toCSSGradient(gradientColor) {
8
8
  if (isGradientColor(gradientColor)) {
9
- let cssColor;
10
- let steps;
9
+ var cssColor_1;
10
+ var steps = void 0;
11
11
  if (gradientColor[0] === 'l') {
12
12
  // 线性渐变
13
- const arr = regexLG.exec(gradientColor);
14
- const angle = +arr[1] + 90; // css 和 g 的渐变起始角度不同
13
+ var arr = regexLG.exec(gradientColor);
14
+ var angle = +arr[1] + 90; // css 和 g 的渐变起始角度不同
15
15
  steps = arr[2];
16
- cssColor = `linear-gradient(${angle}deg, `;
16
+ cssColor_1 = "linear-gradient(" + angle + "deg, ";
17
17
  }
18
18
  else if (gradientColor[0] === 'r') {
19
19
  // 径向渐变
20
- cssColor = 'radial-gradient(';
21
- const arr = regexRG.exec(gradientColor);
20
+ cssColor_1 = 'radial-gradient(';
21
+ var arr = regexRG.exec(gradientColor);
22
22
  steps = arr[4];
23
23
  }
24
- const colorStops = steps.match(regexColorStop);
25
- colorStops.forEach((item, index) => {
26
- const itemArr = item.split(':');
27
- cssColor += `${itemArr[1]} ${Number(itemArr[0]) * 100}%`;
28
- if (index !== colorStops.length - 1) {
29
- cssColor += ', ';
24
+ var colorStops_1 = steps.match(regexColorStop);
25
+ colorStops_1.forEach(function (item, index) {
26
+ var itemArr = item.split(':');
27
+ cssColor_1 += itemArr[1] + " " + Number(itemArr[0]) * 100 + "%";
28
+ if (index !== colorStops_1.length - 1) {
29
+ cssColor_1 += ', ';
30
30
  }
31
31
  });
32
- cssColor += ')';
33
- return cssColor;
32
+ cssColor_1 += ')';
33
+ return cssColor_1;
34
34
  }
35
35
  return gradientColor;
36
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tocssgradient.js","sourceRoot":"src/","sources":["color/tocssgradient.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,GAAG,iCAAiC,CAAC;AAClD,MAAM,OAAO,GAAG,+DAA+D,CAAC;AAChF,MAAM,cAAc,GAAG,4BAA4B,CAAC;AAEpD,SAAS,eAAe,CAAC,GAAG;IAC1B,OAAO,sBAAsB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,aAAa;IACzC,IAAI,eAAe,CAAC,aAAa,CAAC,EAAE;QAClC,IAAI,QAAQ,CAAC;QACb,IAAI,KAAK,CAAC;QACV,IAAI,aAAa,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;YAC5B,OAAO;YACP,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YACxC,MAAM,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,oBAAoB;YAChD,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;YAEf,QAAQ,GAAG,mBAAmB,KAAK,OAAO,CAAC;SAC5C;aAAM,IAAI,aAAa,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;YACnC,OAAO;YACP,QAAQ,GAAG,kBAAkB,CAAC;YAC9B,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YACxC,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;SAChB;QAED,MAAM,UAAU,GAAa,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QAEzD,UAAU,CAAC,OAAO,CAAC,CAAC,IAAY,EAAE,KAAa,EAAE,EAAE;YACjD,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAChC,QAAQ,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC;YACzD,IAAI,KAAK,KAAK,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;gBACnC,QAAQ,IAAI,IAAI,CAAC;aAClB;QACH,CAAC,CAAC,CAAC;QAEH,QAAQ,IAAI,GAAG,CAAC;QAEhB,OAAO,QAAQ,CAAC;KACjB;IAED,OAAO,aAAa,CAAC;AACvB,CAAC"}
1
+ {"version":3,"file":"tocssgradient.js","sourceRoot":"src/","sources":["color/tocssgradient.ts"],"names":[],"mappings":"AAAA,IAAM,OAAO,GAAG,iCAAiC,CAAC;AAClD,IAAM,OAAO,GAAG,+DAA+D,CAAC;AAChF,IAAM,cAAc,GAAG,4BAA4B,CAAC;AAEpD,SAAS,eAAe,CAAC,GAAG;IAC1B,OAAO,sBAAsB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,aAAa;IACzC,IAAI,eAAe,CAAC,aAAa,CAAC,EAAE;QAClC,IAAI,UAAQ,CAAC;QACb,IAAI,KAAK,SAAA,CAAC;QACV,IAAI,aAAa,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;YAC5B,OAAO;YACP,IAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YACxC,IAAM,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,oBAAoB;YAChD,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;YAEf,UAAQ,GAAG,qBAAmB,KAAK,UAAO,CAAC;SAC5C;aAAM,IAAI,aAAa,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;YACnC,OAAO;YACP,UAAQ,GAAG,kBAAkB,CAAC;YAC9B,IAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YACxC,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;SAChB;QAED,IAAM,YAAU,GAAa,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QAEzD,YAAU,CAAC,OAAO,CAAC,UAAC,IAAY,EAAE,KAAa;YAC7C,IAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAChC,UAAQ,IAAO,OAAO,CAAC,CAAC,CAAC,SAAI,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,MAAG,CAAC;YACzD,IAAI,KAAK,KAAK,YAAU,CAAC,MAAM,GAAG,CAAC,EAAE;gBACnC,UAAQ,IAAI,IAAI,CAAC;aAClB;QACH,CAAC,CAAC,CAAC;QAEH,UAAQ,IAAI,GAAG,CAAC;QAEhB,OAAO,UAAQ,CAAC;KACjB;IAED,OAAO,aAAa,CAAC;AACvB,CAAC"}
@@ -1,17 +1,17 @@
1
1
  import { arr2rgb } from './arr2rgb';
2
- const RGB_REG = /rgba?\(([\s.,0-9]+)\)/;
2
+ var RGB_REG = /rgba?\(([\s.,0-9]+)\)/;
3
3
  /**
4
4
  * 创建辅助 tag 取颜色
5
5
  * @returns
6
6
  */
7
7
  function createTmp() {
8
- const i = document.createElement('i');
8
+ var i = document.createElement('i');
9
9
  i.title = 'Web Colour Picker';
10
10
  i.style.display = 'none';
11
11
  document.body.appendChild(i);
12
12
  return i;
13
13
  }
14
- let iEl;
14
+ var iEl;
15
15
  /**
16
16
  * 将颜色转换到 rgb 的格式
17
17
  * @param {color} color 颜色
@@ -27,9 +27,9 @@ export function toRGB(color) {
27
27
  iEl = createTmp();
28
28
  }
29
29
  iEl.style.color = color;
30
- let rst = document.defaultView.getComputedStyle(iEl, '').getPropertyValue('color');
31
- const matches = RGB_REG.exec(rst);
32
- const cArray = matches[1].split(/\s*,\s*/).map((s) => Number(s));
30
+ var rst = document.defaultView.getComputedStyle(iEl, '').getPropertyValue('color');
31
+ var matches = RGB_REG.exec(rst);
32
+ var cArray = matches[1].split(/\s*,\s*/).map(function (s) { return Number(s); });
33
33
  rst = arr2rgb(cArray);
34
34
  return rst;
35
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"torgb.js","sourceRoot":"src/","sources":["color/torgb.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,OAAO,GAAG,uBAAuB,CAAC;AAExC;;;GAGG;AACH,SAAS,SAAS;IAChB,MAAM,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC,CAAC,KAAK,GAAG,mBAAmB,CAAC;IAC9B,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAC7B,OAAO,CAAC,CAAC;AACX,CAAC;AAED,IAAI,GAAgB,CAAC;AAErB;;;;GAIG;AACH,MAAM,UAAU,KAAK,CAAC,KAAa;IACjC,eAAe;IACf,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QAC1C,OAAO,KAAK,CAAC;KACd;IAED,IAAI,CAAC,GAAG,EAAE;QACR,YAAY;QACZ,GAAG,GAAG,SAAS,EAAE,CAAC;KACnB;IAED,GAAG,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;IAExB,IAAI,GAAG,GAAG,QAAQ,CAAC,WAAW,CAAC,gBAAgB,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAEnF,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,CAAa,CAAC;IAC9C,MAAM,MAAM,GAAa,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAE3E,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEtB,OAAO,GAAG,CAAC;AACb,CAAC"}
1
+ {"version":3,"file":"torgb.js","sourceRoot":"src/","sources":["color/torgb.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,IAAM,OAAO,GAAG,uBAAuB,CAAC;AAExC;;;GAGG;AACH,SAAS,SAAS;IAChB,IAAM,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC,CAAC,KAAK,GAAG,mBAAmB,CAAC;IAC9B,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAC7B,OAAO,CAAC,CAAC;AACX,CAAC;AAED,IAAI,GAAgB,CAAC;AAErB;;;;GAIG;AACH,MAAM,UAAU,KAAK,CAAC,KAAa;IACjC,eAAe;IACf,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QAC1C,OAAO,KAAK,CAAC;KACd;IAED,IAAI,CAAC,GAAG,EAAE;QACR,YAAY;QACZ,GAAG,GAAG,SAAS,EAAE,CAAC;KACnB;IAED,GAAG,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;IAExB,IAAI,GAAG,GAAG,QAAQ,CAAC,WAAW,CAAC,gBAAgB,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAEnF,IAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,CAAa,CAAC;IAC9C,IAAM,MAAM,GAAa,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,MAAM,CAAC,CAAC,CAAC,EAAT,CAAS,CAAC,CAAC;IAE3E,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEtB,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -1,4 +1,4 @@
1
- const RADIAN = Math.PI / 180;
1
+ var RADIAN = Math.PI / 180;
2
2
  export function toRadian(degree) {
3
3
  return RADIAN * degree;
4
4
  }
@@ -1 +1 @@
1
- {"version":3,"file":"to-radian.js","sourceRoot":"src/","sources":["helper/to-radian.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC;AAE7B,MAAM,UAAU,QAAQ,CAAC,MAAc;IACrC,OAAO,MAAM,GAAG,MAAM,CAAC;AACzB,CAAC"}
1
+ {"version":3,"file":"to-radian.js","sourceRoot":"src/","sources":["helper/to-radian.ts"],"names":[],"mappings":"AAAA,IAAM,MAAM,GAAG,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC;AAE7B,MAAM,UAAU,QAAQ,CAAC,MAAc;IACrC,OAAO,MAAM,GAAG,MAAM,CAAC;AACzB,CAAC"}
package/esm/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './color';
2
2
  export * from './matrix';
3
3
  export * from './path';
4
+ export * from './lodash';
package/esm/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './color';
2
2
  export * from './matrix';
3
3
  export * from './path';
4
+ export * from './lodash';
4
5
  //# sourceMappingURL=index.js.map
package/esm/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"src/","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"src/","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
@@ -0,0 +1,2 @@
1
+ declare const augment: (...args: any[]) => void;
2
+ export default augment;
@@ -0,0 +1,18 @@
1
+ import mix from './mix';
2
+ import isFunction from './is-function';
3
+ var augment = function () {
4
+ var args = [];
5
+ for (var _i = 0; _i < arguments.length; _i++) {
6
+ args[_i] = arguments[_i];
7
+ }
8
+ var c = args[0];
9
+ for (var i = 1; i < args.length; i++) {
10
+ var obj = args[i];
11
+ if (isFunction(obj)) {
12
+ obj = obj.prototype;
13
+ }
14
+ mix(c.prototype, obj);
15
+ }
16
+ };
17
+ export default augment;
18
+ //# sourceMappingURL=augment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"augment.js","sourceRoot":"src/","sources":["lodash/augment.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,UAAU,MAAM,eAAe,CAAC;AAGvC,IAAM,OAAO,GAAG;IAAU,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,yBAAc;;IACtC,IAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACpC,IAAI,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,IAAI,UAAU,CAAC,GAAG,CAAC,EAAE;YACnB,GAAG,GAAG,GAAG,CAAC,SAAS,CAAC;SACrB;QACD,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;KACvB;AACH,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * k-v 存储
3
+ */
4
+ export default class<T> {
5
+ map: {
6
+ [key: string]: T;
7
+ };
8
+ has(key: string): boolean;
9
+ get(key: string, def?: T): T | undefined;
10
+ set(key: string, value: T): void;
11
+ clear(): void;
12
+ delete(key: string): void;
13
+ size(): number;
14
+ }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * k-v 存储
3
+ */
4
+ var default_1 = /** @class */ (function () {
5
+ function default_1() {
6
+ this.map = {};
7
+ }
8
+ default_1.prototype.has = function (key) {
9
+ return this.map[key] !== undefined;
10
+ };
11
+ default_1.prototype.get = function (key, def) {
12
+ var v = this.map[key];
13
+ return v === undefined ? def : v;
14
+ };
15
+ default_1.prototype.set = function (key, value) {
16
+ this.map[key] = value;
17
+ };
18
+ default_1.prototype.clear = function () {
19
+ this.map = {};
20
+ };
21
+ default_1.prototype.delete = function (key) {
22
+ delete this.map[key];
23
+ };
24
+ default_1.prototype.size = function () {
25
+ return Object.keys(this.map).length;
26
+ };
27
+ return default_1;
28
+ }());
29
+ export default default_1;
30
+ //# sourceMappingURL=cache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.js","sourceRoot":"src/","sources":["lodash/cache.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;IAAA;QACE,QAAG,GAAyB,EAAE,CAAC;IA0BjC,CAAC;IAxBC,uBAAG,GAAH,UAAI,GAAW;QACb,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,SAAS,CAAC;IACrC,CAAC;IAED,uBAAG,GAAH,UAAI,GAAW,EAAE,GAAO;QACtB,IAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACxB,OAAO,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC;IAED,uBAAG,GAAH,UAAI,GAAW,EAAE,KAAQ;QACvB,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,yBAAK,GAAL;QACE,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;IAChB,CAAC;IAED,0BAAM,GAAN,UAAO,GAAW;QAChB,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACvB,CAAC;IAED,wBAAI,GAAJ;QACE,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,CAAC;IACH,gBAAC;AAAD,CAAC,AA3BD,IA2BC"}
@@ -0,0 +1,2 @@
1
+ declare const clamp: (a: number, min: number, max: number) => number;
2
+ export default clamp;
@@ -0,0 +1,11 @@
1
+ var clamp = function (a, min, max) {
2
+ if (a < min) {
3
+ return min;
4
+ }
5
+ else if (a > max) {
6
+ return max;
7
+ }
8
+ return a;
9
+ };
10
+ export default clamp;
11
+ //# sourceMappingURL=clamp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clamp.js","sourceRoot":"src/","sources":["lodash/clamp.ts"],"names":[],"mappings":"AAAA,IAAM,KAAK,GAAG,UAAU,CAAS,EAAE,GAAW,EAAE,GAAW;IACzD,IAAI,CAAC,GAAG,GAAG,EAAE;QACX,OAAO,GAAG,CAAC;KACZ;SAAM,IAAI,CAAC,GAAG,GAAG,EAAE;QAClB,OAAO,GAAG,CAAC;KACZ;IACD,OAAO,CAAC,CAAC;AACX,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -0,0 +1 @@
1
+ export default function cancelAnimationFrame(handler: number): void;
@@ -0,0 +1,12 @@
1
+ export default function cancelAnimationFrame(handler) {
2
+ var method = window.cancelAnimationFrame ||
3
+ // @ts-ignore
4
+ window.webkitCancelAnimationFrame ||
5
+ // @ts-ignore
6
+ window.mozCancelAnimationFrame ||
7
+ // @ts-ignore
8
+ window.msCancelAnimationFrame ||
9
+ clearTimeout;
10
+ method(handler);
11
+ }
12
+ //# sourceMappingURL=clear-animation-frame.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clear-animation-frame.js","sourceRoot":"src/","sources":["lodash/clear-animation-frame.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,OAAe;IAC1D,IAAM,MAAM,GACV,MAAM,CAAC,oBAAoB;QAC3B,aAAa;QACb,MAAM,CAAC,0BAA0B;QACjC,aAAa;QACb,MAAM,CAAC,uBAAuB;QAC9B,aAAa;QACb,MAAM,CAAC,sBAAsB;QAC7B,YAAY,CAAC;IAEf,MAAM,CAAC,OAAO,CAAC,CAAC;AAClB,CAAC"}
@@ -0,0 +1,2 @@
1
+ declare const clone: (obj: any) => any;
2
+ export default clone;
@@ -0,0 +1,32 @@
1
+ import isArray from './is-array';
2
+ var clone = function (obj) {
3
+ if (typeof obj !== 'object' || obj === null) {
4
+ return obj;
5
+ }
6
+ var rst;
7
+ if (isArray(obj)) {
8
+ rst = [];
9
+ for (var i = 0, l = obj.length; i < l; i++) {
10
+ if (typeof obj[i] === 'object' && obj[i] != null) {
11
+ rst[i] = clone(obj[i]);
12
+ }
13
+ else {
14
+ rst[i] = obj[i];
15
+ }
16
+ }
17
+ }
18
+ else {
19
+ rst = {};
20
+ for (var k in obj) {
21
+ if (typeof obj[k] === 'object' && obj[k] != null) {
22
+ rst[k] = clone(obj[k]);
23
+ }
24
+ else {
25
+ rst[k] = obj[k];
26
+ }
27
+ }
28
+ }
29
+ return rst;
30
+ };
31
+ export default clone;
32
+ //# sourceMappingURL=clone.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clone.js","sourceRoot":"src/","sources":["lodash/clone.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,YAAY,CAAC;AAEjC,IAAM,KAAK,GAAG,UAAU,GAAG;IACzB,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,EAAE;QAC3C,OAAO,GAAG,CAAC;KACZ;IACD,IAAI,GAAG,CAAC;IACR,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE;QAChB,GAAG,GAAG,EAAE,CAAC;QACT,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;YAC1C,IAAI,OAAO,GAAG,CAAC,CAAC,CAAC,KAAK,QAAQ,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE;gBAChD,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;aACxB;iBAAM;gBACL,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;aACjB;SACF;KACF;SAAM;QACL,GAAG,GAAG,EAAE,CAAC;QACT,KAAK,IAAM,CAAC,IAAI,GAAG,EAAE;YACnB,IAAI,OAAO,GAAG,CAAC,CAAC,CAAC,KAAK,QAAQ,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE;gBAChD,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;aACxB;iBAAM;gBACL,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;aACjB;SACF;KACF;IAED,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -0,0 +1,2 @@
1
+ declare const contains: (arr: any[], value: any) => boolean;
2
+ export default contains;
@@ -0,0 +1,9 @@
1
+ import isArrayLike from './is-array-like';
2
+ var contains = function (arr, value) {
3
+ if (!isArrayLike(arr)) {
4
+ return false;
5
+ }
6
+ return arr.indexOf(value) > -1;
7
+ };
8
+ export default contains;
9
+ //# sourceMappingURL=contains.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contains.js","sourceRoot":"src/","sources":["lodash/contains.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAE1C,IAAM,QAAQ,GAAG,UAAU,GAAU,EAAE,KAAU;IAC/C,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE;QACrB,OAAO,KAAK,CAAC;KACd;IACD,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;AACjC,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,2 @@
1
+ declare function debounce(func: Function, wait?: number, immediate?: boolean): () => void;
2
+ export default debounce;
@@ -0,0 +1,20 @@
1
+ function debounce(func, wait, immediate) {
2
+ var timeout;
3
+ return function () {
4
+ var context = this, args = arguments;
5
+ var later = function () {
6
+ timeout = null;
7
+ if (!immediate) {
8
+ func.apply(context, args);
9
+ }
10
+ };
11
+ var callNow = immediate && !timeout;
12
+ clearTimeout(timeout);
13
+ timeout = setTimeout(later, wait);
14
+ if (callNow) {
15
+ func.apply(context, args);
16
+ }
17
+ };
18
+ }
19
+ export default debounce;
20
+ //# sourceMappingURL=debounce.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debounce.js","sourceRoot":"src/","sources":["lodash/debounce.ts"],"names":[],"mappings":"AAAA,SAAS,QAAQ,CAAC,IAAc,EAAE,IAAa,EAAE,SAAmB;IAClE,IAAI,OAAO,CAAC;IACZ,OAAO;QACL,IAAM,OAAO,GAAG,IAAI,EAClB,IAAI,GAAG,SAAS,CAAC;QACnB,IAAM,KAAK,GAAG;YACZ,OAAO,GAAG,IAAI,CAAC;YACf,IAAI,CAAC,SAAS,EAAE;gBACd,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;aAC3B;QACH,CAAC,CAAC;QACF,IAAM,OAAO,GAAG,SAAS,IAAI,CAAC,OAAO,CAAC;QACtC,YAAY,CAAC,OAAO,CAAC,CAAC;QACtB,OAAO,GAAG,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAClC,IAAI,OAAO,EAAE;YACX,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;SAC3B;IACH,CAAC,CAAC;AACJ,CAAC;AAED,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,2 @@
1
+ declare const deepMix: (rst: any, ...args: any[]) => any;
2
+ export default deepMix;