@blofin/blofin-ui 0.7.58 → 0.7.59

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 (293) hide show
  1. package/dist/Badge.es.js +8 -10
  2. package/dist/Button.es.js +125 -127
  3. package/dist/Dialog.es.js +10 -180
  4. package/dist/Divider.es.js +10 -12
  5. package/dist/Drawer.es.js +51 -44
  6. package/dist/Form.d.ts +1 -0
  7. package/dist/Form.es.js +752 -0
  8. package/dist/ProTable-63e2c020.js +3444 -0
  9. package/dist/ProTable.es.js +6 -9
  10. package/dist/Slider.es.js +140 -141
  11. package/dist/Sort.es.js +10 -144
  12. package/dist/blofin.css +1 -1
  13. package/dist/{close-0df24351.js → close-c67ec245.js} +0 -1
  14. package/dist/clsx.m-b14a941b.js +32 -0
  15. package/dist/components/Alert/Alert.d.ts +3 -3
  16. package/dist/components/Alert/styles.d.ts +2 -2
  17. package/dist/components/Badge/Badge.d.ts +2 -2
  18. package/dist/components/Button/Button.d.ts +2 -2
  19. package/dist/components/Button/Loading/index.d.ts +2 -2
  20. package/dist/components/Button/index.d.ts +0 -2
  21. package/dist/components/Button/styles.d.ts +1 -1
  22. package/dist/components/Checkbox/styles.d.ts +1 -1
  23. package/dist/components/CssDropdown/CssDropdown.d.ts +3 -3
  24. package/dist/components/DatePickerRange/styles.d.ts +1 -0
  25. package/dist/components/DateTimePicker/ScrollableList.d.ts +1 -1
  26. package/dist/components/Dialog/Dialog.d.ts +2 -5
  27. package/dist/components/Dialog/index.d.ts +2 -4
  28. package/dist/components/Dialog/styles.d.ts +2 -2
  29. package/dist/components/Drawer/Drawer.d.ts +1 -1
  30. package/dist/components/Dropdown/Dropdown.d.ts +2 -2
  31. package/dist/components/Empty/index.d.ts +5 -2
  32. package/dist/components/Form/Control.d.ts +13 -0
  33. package/dist/components/Form/Form.d.ts +4 -0
  34. package/dist/components/Form/FormItem.d.ts +4 -0
  35. package/dist/components/Form/FormLabel.d.ts +4 -0
  36. package/dist/components/Form/context.d.ts +6 -0
  37. package/dist/components/Form/index.d.ts +8 -0
  38. package/dist/components/Form/interface.d.ts +48 -0
  39. package/dist/components/Form/store.d.ts +16 -0
  40. package/dist/components/Form/styles/item.d.ts +5 -0
  41. package/dist/components/Form/useForm.d.ts +3 -0
  42. package/dist/components/LabelTextField/LabelTextField.d.ts +6 -6
  43. package/dist/components/MonthPicker/index.d.ts +17 -2
  44. package/dist/components/MultiSelect/MultiSelect.d.ts +4 -4
  45. package/dist/components/Notification/Notification.d.ts +1 -1
  46. package/dist/components/Pagination/PageOptions.d.ts +1 -1
  47. package/dist/components/Pagination/Pagination.d.ts +2 -2
  48. package/dist/components/Picker/hooks/usePickerMethod.d.ts +1 -1
  49. package/dist/components/Picker/index.d.ts +10 -2
  50. package/dist/components/Popover/Popover.d.ts +1 -1
  51. package/dist/components/Popup/index.d.ts +15 -4
  52. package/dist/components/RadioButton/RadioButton.d.ts +4 -4
  53. package/dist/components/RadioButton/styles.d.ts +1 -1
  54. package/dist/components/Select/Select.d.ts +9 -6
  55. package/dist/components/Slider/Slider.d.ts +2 -2
  56. package/dist/components/Sort/SortButton.d.ts +5 -5
  57. package/dist/components/Sort/SortGroup.d.ts +4 -4
  58. package/dist/components/Sort/index.d.ts +6 -5
  59. package/dist/components/Sortable/SortItem.d.ts +4 -4
  60. package/dist/components/Sortable/index.d.ts +11 -3
  61. package/dist/components/Switch/Switch.d.ts +2 -2
  62. package/dist/components/Switch/styles.d.ts +3 -3
  63. package/dist/components/Tab/Tab.d.ts +2 -2
  64. package/dist/components/Tab/styles.d.ts +1 -1
  65. package/dist/components/Table/Pagination/index.d.ts +2 -2
  66. package/dist/components/Table/Table.d.ts +2 -2
  67. package/dist/components/Table/Tbody/index.d.ts +3 -3
  68. package/dist/components/Table/Thead/index.d.ts +3 -3
  69. package/dist/components/Table/context.d.ts +3 -3
  70. package/dist/components/Table/hooks/useStickyOffset.d.ts +3 -3
  71. package/dist/components/Table/index.d.ts +3 -3
  72. package/dist/components/Table/interface.d.ts +4 -4
  73. package/dist/components/TextField/TextField.d.ts +4 -4
  74. package/dist/components/TextField/index.d.ts +0 -2
  75. package/dist/components/TextSelect/TextSelect.d.ts +8 -8
  76. package/dist/components/Textarea/index.d.ts +15 -2
  77. package/dist/components/Toast/Toast.d.ts +13 -2
  78. package/dist/components/Toast/styles.d.ts +1 -1
  79. package/dist/components/Tooltip/Tooltip.d.ts +5 -4
  80. package/dist/components/Typography/Typography.d.ts +2 -2
  81. package/dist/components/Typography/styles.d.ts +1 -1
  82. package/dist/hooks/useLatest.d.ts +1 -1
  83. package/dist/hooks/useNotification.d.ts +7 -5
  84. package/dist/hooks/useToast.d.ts +1 -1
  85. package/dist/{index-4f94d7fa.js → index-001dd0f7.js} +39 -24
  86. package/dist/{index-29d37c73.js → index-003572ca.js} +67 -52
  87. package/dist/{index-57a163fd.js → index-0330bc93.js} +28 -13
  88. package/dist/{index-d81e15f3.js → index-05bf2879.js} +34 -19
  89. package/dist/{index-b54ef52a.js → index-0773f9b5.js} +31 -16
  90. package/dist/{index-6856be22.js → index-0c50dcda.js} +38 -23
  91. package/dist/{index-7cf9b111.js → index-0e6d56f6.js} +33 -18
  92. package/dist/{index-a89abb42.js → index-0eb53476.js} +19 -4
  93. package/dist/{index-0230b5a9.js → index-0f855a91.js} +4 -5
  94. package/dist/{index-cbc0d36b.js → index-10144af4.js} +30 -15
  95. package/dist/{index-06d0f2f7.js → index-11dc8e91.js} +28 -13
  96. package/dist/{index-c6371af1.js → index-14eba896.js} +25 -10
  97. package/dist/{index-c1381bca.js → index-18869ac6.js} +35 -20
  98. package/dist/{index-1b2a64df.js → index-189196e6.js} +46 -31
  99. package/dist/{index-898678dc.js → index-198ccc85.js} +45 -30
  100. package/dist/{index-e2b960e4.js → index-1b087231.js} +38 -23
  101. package/dist/{index-f40f45fb.js → index-204cbb23.js} +30 -15
  102. package/dist/{index-4df0c3e4.js → index-220ed10a.js} +31 -16
  103. package/dist/{index-67678963.js → index-28a6835c.js} +48 -33
  104. package/dist/{index-e98ef24f.js → index-2d400fe1.js} +32 -17
  105. package/dist/{index-e8fb69e0.js → index-2e0c8d16.js} +37 -22
  106. package/dist/{index-cc1cd309.js → index-2e784550.js} +28 -13
  107. package/dist/index-304d7874.js +64 -0
  108. package/dist/{index-12d32536.js → index-3375e2e3.js} +28 -13
  109. package/dist/{index-954d3973.js → index-36521981.js} +28 -13
  110. package/dist/{index-cfee583b.js → index-377dc190.js} +36 -21
  111. package/dist/{index-4f94900a.js → index-390505ce.js} +34 -19
  112. package/dist/index-40626e62.js +174 -0
  113. package/dist/{index-b0da3dfd.js → index-41bebee7.js} +39 -24
  114. package/dist/{index-5fb7b3bc.js → index-45cfa2f3.js} +27 -12
  115. package/dist/{index-80cc70e4.js → index-47408940.js} +41 -26
  116. package/dist/{index-141cec17.js → index-4b9249fc.js} +29 -14
  117. package/dist/index-543e2f77.js +65 -0
  118. package/dist/index-563cafee.js +64 -0
  119. package/dist/index-5956ed9f.js +11569 -0
  120. package/dist/{index-b103ed31.js → index-59c7d611.js} +27 -12
  121. package/dist/{index-d2f2742e.js → index-5bc791c5.js} +30 -15
  122. package/dist/{index-03513979.js → index-5f3da225.js} +26 -11
  123. package/dist/{index-8aa9b1be.js → index-603f0f2a.js} +39 -24
  124. package/dist/{index-4bc493f0.js → index-636a6216.js} +19 -4
  125. package/dist/{index-2334248a.js → index-640dc4ab.js} +24 -9
  126. package/dist/{index-73bfc020.js → index-64ba8d88.js} +47 -32
  127. package/dist/{index-2ae0474b.js → index-65986673.js} +39 -24
  128. package/dist/{index-6f728206.js → index-65df0a7b.js} +24 -9
  129. package/dist/{index-02f669c4.js → index-6e4d9a19.js} +1 -2
  130. package/dist/{index-360aaaac.js → index-7241c703.js} +46 -31
  131. package/dist/index-7272669e.js +36 -0
  132. package/dist/{index-9c73c442.js → index-73673cf3.js} +60 -45
  133. package/dist/{index-08a64465.js → index-74676234.js} +31 -16
  134. package/dist/{index-7edb6aec.js → index-770fe605.js} +34 -19
  135. package/dist/{index-5beeed26.js → index-772d6529.js} +38 -23
  136. package/dist/{index-6e969585.js → index-797b8f6c.js} +52 -37
  137. package/dist/{index-a6fa33ce.js → index-7c12aa98.js} +28 -13
  138. package/dist/{index-5e6ffc2f.js → index-7e7cdd81.js} +1 -2
  139. package/dist/{index-03169373.js → index-81072b24.js} +37 -22
  140. package/dist/{index-75190b99.js → index-8684e896.js} +22 -7
  141. package/dist/{index-7bb9ffdf.js → index-89f184f3.js} +2 -3
  142. package/dist/{index-40710f09.js → index-8a7c46ae.js} +41 -26
  143. package/dist/{index-117d018c.js → index-8cec0e82.js} +37 -22
  144. package/dist/{index-094d2a65.js → index-91062be2.js} +34 -19
  145. package/dist/{index-d3419554.js → index-9253a5ce.js} +30 -15
  146. package/dist/index-95c68eda.js +152 -0
  147. package/dist/{index-956b36a6.js → index-9eaebb69.js} +45 -30
  148. package/dist/{index-63a66f13.js → index-a4077786.js} +45 -30
  149. package/dist/{index-e9a1ff7f.js → index-ad2acfd2.js} +19 -4
  150. package/dist/{index-fdffd6e6.js → index-af60bed6.js} +29 -14
  151. package/dist/{index-fda88eb4.js → index-b5ff5e93.js} +45 -30
  152. package/dist/{index-11268759.js → index-bba889fc.js} +33 -18
  153. package/dist/{index-b7941b97.js → index-c002eb57.js} +23 -8
  154. package/dist/{index-4c6ad36c.js → index-c73b6cc3.js} +47 -32
  155. package/dist/{index-60fe7f16.js → index-c81a4a2a.js} +32 -17
  156. package/dist/{index-f7c4ae83.js → index-c8690f0a.js} +48 -33
  157. package/dist/{index-79e7317f.js → index-cdaffd70.js} +27 -12
  158. package/dist/{index-4d780cf4.js → index-cf872561.js} +37 -22
  159. package/dist/{index-cb1218d8.js → index-dafac81d.js} +25 -10
  160. package/dist/{index-19d177fe.js → index-db7c7495.js} +31 -16
  161. package/dist/{index-f1726c63.js → index-dbd4bd27.js} +29 -14
  162. package/dist/{index-ceae4147.js → index-dc23eb8b.js} +27 -12
  163. package/dist/{index-9e5efc0a.js → index-dc69cdd8.js} +45 -30
  164. package/dist/{index-c69f6dfc.js → index-e6091315.js} +36 -21
  165. package/dist/{index-06ef2e10.js → index-e869e999.js} +28 -13
  166. package/dist/{index-03d6aef0.js → index-f0c42ec9.js} +33 -18
  167. package/dist/{index-f64eddcc.js → index-f16b36a5.js} +31 -16
  168. package/dist/{index-e1a6a03d.js → index-f4d65525.js} +24 -9
  169. package/dist/index-f53123c7.js +64 -0
  170. package/dist/{index-770e5f53.js → index-f753119c.js} +27 -12
  171. package/dist/{index-8585c2f3.js → index-f83dab77.js} +38 -23
  172. package/dist/{index-6f963c6a.js → index-f852d9b6.js} +35 -20
  173. package/dist/{index-3ee2bafa.js → index-fa51b278.js} +30 -15
  174. package/dist/{index-e169373b.js → index-fc135912.js} +25 -10
  175. package/dist/{index-ef31f5f8.js → index-fcb1ec65.js} +1 -2
  176. package/dist/{index-d86842c8.js → index-ff943066.js} +34 -19
  177. package/dist/index.d.ts +48 -36
  178. package/dist/index.es.js +56 -223
  179. package/dist/isObjectLike-1b8bbac2.js +44 -0
  180. package/dist/jsx-runtime-82a9ddf6.js +646 -0
  181. package/dist/provider/NoticeProvider.d.ts +1 -1
  182. package/dist/provider/ThemeProvider.d.ts +3 -7
  183. package/dist/provider/useTheme.d.ts +1 -1
  184. package/dist/types/component.d.ts +1 -1
  185. package/dist/utils/helper.d.ts +1 -1
  186. package/dist/{utils-071abd68.js → utils-cacf528c.js} +1 -2
  187. package/package.json +3 -2
  188. package/dist/Calendar.d.ts +0 -1
  189. package/dist/Calendar.es.js +0 -210
  190. package/dist/Checkbox.d.ts +0 -1
  191. package/dist/Checkbox.es.js +0 -138
  192. package/dist/CssDropdown.d.ts +0 -1
  193. package/dist/CssDropdown.es.js +0 -38
  194. package/dist/DatePickerRange.d.ts +0 -1
  195. package/dist/DatePickerRange.es.js +0 -410
  196. package/dist/DateTimePicker.d.ts +0 -1
  197. package/dist/DateTimePicker.es.js +0 -519
  198. package/dist/Dropdown.d.ts +0 -1
  199. package/dist/Dropdown.es.js +0 -134
  200. package/dist/Empty.d.ts +0 -1
  201. package/dist/Empty.es.js +0 -11
  202. package/dist/LabelTextField.d.ts +0 -1
  203. package/dist/LabelTextField.es.js +0 -100
  204. package/dist/MonthPicker.d.ts +0 -1
  205. package/dist/MonthPicker.es.js +0 -16
  206. package/dist/MultiSelect.d.ts +0 -1
  207. package/dist/MultiSelect.es.js +0 -425
  208. package/dist/Notification.d.ts +0 -1
  209. package/dist/Notification.es.js +0 -12
  210. package/dist/Pagination.d.ts +0 -1
  211. package/dist/Pagination.es.js +0 -219
  212. package/dist/Picker.d.ts +0 -1
  213. package/dist/Picker.es.js +0 -224
  214. package/dist/Popover.d.ts +0 -1
  215. package/dist/Popover.es.js +0 -107
  216. package/dist/Popup.d.ts +0 -1
  217. package/dist/Popup.es.js +0 -62
  218. package/dist/ProTable-7a07d8b6.js +0 -565
  219. package/dist/RadioButton.d.ts +0 -1
  220. package/dist/RadioButton.es.js +0 -152
  221. package/dist/Select.d.ts +0 -1
  222. package/dist/Select.es.js +0 -316
  223. package/dist/Sortable.d.ts +0 -1
  224. package/dist/Sortable.es.js +0 -39
  225. package/dist/Switch.d.ts +0 -1
  226. package/dist/Switch.es.js +0 -64
  227. package/dist/Tab.d.ts +0 -1
  228. package/dist/Tab.es.js +0 -101
  229. package/dist/Table.d.ts +0 -1
  230. package/dist/Table.es.js +0 -359
  231. package/dist/TextField.d.ts +0 -1
  232. package/dist/TextField.es.js +0 -64
  233. package/dist/TextSelect.d.ts +0 -1
  234. package/dist/TextSelect.es.js +0 -17
  235. package/dist/Textarea.d.ts +0 -1
  236. package/dist/Textarea.es.js +0 -106
  237. package/dist/Toast.d.ts +0 -1
  238. package/dist/Toast.es.js +0 -12
  239. package/dist/Tooltip.d.ts +0 -1
  240. package/dist/Tooltip.es.js +0 -144
  241. package/dist/Typography.d.ts +0 -1
  242. package/dist/Typography.es.js +0 -74
  243. package/dist/_commonjsHelpers-1d52fb73.js +0 -9
  244. package/dist/arrow-down-011b02c7.js +0 -6
  245. package/dist/arrow-down-l-line-97e4fe24.js +0 -6
  246. package/dist/arrow-fill-70becd96.js +0 -6
  247. package/dist/arrow-right-l-line-87881b4d.js +0 -7
  248. package/dist/close-bg-6d2211ef.js +0 -6
  249. package/dist/clsx.m-e965ef18.js +0 -22
  250. package/dist/components/CssDropdown/index.d.ts +0 -2
  251. package/dist/components/DatePickerRange/index.d.ts +0 -4
  252. package/dist/components/DateTimePicker/index.d.ts +0 -4
  253. package/dist/components/Dropdown/index.d.ts +0 -2
  254. package/dist/components/Empty/Empty.d.ts +0 -5
  255. package/dist/components/MonthPicker/MonthPicker.d.ts +0 -17
  256. package/dist/components/MultiSelect/index.d.ts +0 -2
  257. package/dist/components/Notification/index.d.ts +0 -2
  258. package/dist/components/Pagination/index.d.ts +0 -3
  259. package/dist/components/Picker/Picker.d.ts +0 -10
  260. package/dist/components/Popover/index.d.ts +0 -5
  261. package/dist/components/Popup/Popup.d.ts +0 -15
  262. package/dist/components/Sortable/Sortable.d.ts +0 -11
  263. package/dist/components/Switch/index.d.ts +0 -2
  264. package/dist/components/Tab/index.d.ts +0 -4
  265. package/dist/components/TextSelect/index.d.ts +0 -2
  266. package/dist/components/Textarea/Textarea.d.ts +0 -15
  267. package/dist/components/Toast/index.d.ts +0 -2
  268. package/dist/components/Tooltip/index.d.ts +0 -2
  269. package/dist/components/Typography/index.d.ts +0 -4
  270. package/dist/enum-0398044b.js +0 -17
  271. package/dist/helper-221987f8.js +0 -7
  272. package/dist/index-293f8244.js +0 -49
  273. package/dist/index-40023d52.js +0 -5322
  274. package/dist/index-4528ba11.js +0 -49
  275. package/dist/index-596c785d.js +0 -50
  276. package/dist/index-67554651.js +0 -49
  277. package/dist/index-9349bf2d.js +0 -345
  278. package/dist/index-b7027a1d.js +0 -1295
  279. package/dist/index-c57db938.js +0 -37
  280. package/dist/index-eea69add.js +0 -71
  281. package/dist/index.esm-71578db5.js +0 -1198
  282. package/dist/index.module-1d7bbdf8.js +0 -7
  283. package/dist/index.module-86edc823.js +0 -15
  284. package/dist/index.module-b4239ff5.js +0 -9
  285. package/dist/index.module-fb41ba3b.js +0 -39
  286. package/dist/locales-776f0072.js +0 -440
  287. package/dist/search-b79a3be5.js +0 -6
  288. package/dist/sortable.esm-1c13d908.js +0 -2896
  289. package/dist/sortable.esm-8d31c120.js +0 -1275
  290. package/dist/styles-85a9fe64.js +0 -136
  291. package/dist/useAlign-916ed3be.js +0 -44
  292. package/dist/useDelayEvent-f577f6a3.js +0 -1082
  293. package/dist/useTheme-0688f238.js +0 -16
@@ -1,1275 +0,0 @@
1
- "use client";
2
- /**!
3
- * Sortable 1.15.6
4
- * @author RubaXa <trash@rubaxa.org>
5
- * @author owenm <owen23355@gmail.com>
6
- * @license MIT
7
- */
8
- function se(o, t) {
9
- var e = Object.keys(o);
10
- if (Object.getOwnPropertySymbols) {
11
- var n = Object.getOwnPropertySymbols(o);
12
- t && (n = n.filter(function(i) {
13
- return Object.getOwnPropertyDescriptor(o, i).enumerable;
14
- })), e.push.apply(e, n);
15
- }
16
- return e;
17
- }
18
- function z(o) {
19
- for (var t = 1; t < arguments.length; t++) {
20
- var e = arguments[t] != null ? arguments[t] : {};
21
- t % 2 ? se(Object(e), !0).forEach(function(n) {
22
- Me(o, n, e[n]);
23
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(e)) : se(Object(e)).forEach(function(n) {
24
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(e, n));
25
- });
26
- }
27
- return o;
28
- }
29
- function Mt(o) {
30
- "@babel/helpers - typeof";
31
- return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Mt = function(t) {
32
- return typeof t;
33
- } : Mt = function(t) {
34
- return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
35
- }, Mt(o);
36
- }
37
- function Me(o, t, e) {
38
- return t in o ? Object.defineProperty(o, t, {
39
- value: e,
40
- enumerable: !0,
41
- configurable: !0,
42
- writable: !0
43
- }) : o[t] = e, o;
44
- }
45
- function q() {
46
- return q = Object.assign || function(o) {
47
- for (var t = 1; t < arguments.length; t++) {
48
- var e = arguments[t];
49
- for (var n in e)
50
- Object.prototype.hasOwnProperty.call(e, n) && (o[n] = e[n]);
51
- }
52
- return o;
53
- }, q.apply(this, arguments);
54
- }
55
- function Fe(o, t) {
56
- if (o == null)
57
- return {};
58
- var e = {}, n = Object.keys(o), i, r;
59
- for (r = 0; r < n.length; r++)
60
- i = n[r], !(t.indexOf(i) >= 0) && (e[i] = o[i]);
61
- return e;
62
- }
63
- function Re(o, t) {
64
- if (o == null)
65
- return {};
66
- var e = Fe(o, t), n, i;
67
- if (Object.getOwnPropertySymbols) {
68
- var r = Object.getOwnPropertySymbols(o);
69
- for (i = 0; i < r.length; i++)
70
- n = r[i], !(t.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(o, n) && (e[n] = o[n]);
71
- }
72
- return e;
73
- }
74
- var Xe = "1.15.6";
75
- function U(o) {
76
- if (typeof window < "u" && window.navigator)
77
- return !!/* @__PURE__ */ navigator.userAgent.match(o);
78
- }
79
- var V = U(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Ct = U(/Edge/i), ue = U(/firefox/i), wt = U(/safari/i) && !U(/chrome/i) && !U(/android/i), oe = U(/iP(ad|od|hone)/i), ve = U(/chrome/i) && U(/android/i), be = {
80
- capture: !1,
81
- passive: !1
82
- };
83
- function v(o, t, e) {
84
- o.addEventListener(t, e, !V && be);
85
- }
86
- function m(o, t, e) {
87
- o.removeEventListener(t, e, !V && be);
88
- }
89
- function kt(o, t) {
90
- if (t) {
91
- if (t[0] === ">" && (t = t.substring(1)), o)
92
- try {
93
- if (o.matches)
94
- return o.matches(t);
95
- if (o.msMatchesSelector)
96
- return o.msMatchesSelector(t);
97
- if (o.webkitMatchesSelector)
98
- return o.webkitMatchesSelector(t);
99
- } catch {
100
- return !1;
101
- }
102
- return !1;
103
- }
104
- }
105
- function Ee(o) {
106
- return o.host && o !== document && o.host.nodeType ? o.host : o.parentNode;
107
- }
108
- function W(o, t, e, n) {
109
- if (o) {
110
- e = e || document;
111
- do {
112
- if (t != null && (t[0] === ">" ? o.parentNode === e && kt(o, t) : kt(o, t)) || n && o === e)
113
- return o;
114
- if (o === e)
115
- break;
116
- } while (o = Ee(o));
117
- }
118
- return null;
119
- }
120
- var fe = /\s+/g;
121
- function R(o, t, e) {
122
- if (o && t)
123
- if (o.classList)
124
- o.classList[e ? "add" : "remove"](t);
125
- else {
126
- var n = (" " + o.className + " ").replace(fe, " ").replace(" " + t + " ", " ");
127
- o.className = (n + (e ? " " + t : "")).replace(fe, " ");
128
- }
129
- }
130
- function h(o, t, e) {
131
- var n = o && o.style;
132
- if (n) {
133
- if (e === void 0)
134
- return document.defaultView && document.defaultView.getComputedStyle ? e = document.defaultView.getComputedStyle(o, "") : o.currentStyle && (e = o.currentStyle), t === void 0 ? e : e[t];
135
- !(t in n) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), n[t] = e + (typeof e == "string" ? "" : "px");
136
- }
137
- }
138
- function ct(o, t) {
139
- var e = "";
140
- if (typeof o == "string")
141
- e = o;
142
- else
143
- do {
144
- var n = h(o, "transform");
145
- n && n !== "none" && (e = n + " " + e);
146
- } while (!t && (o = o.parentNode));
147
- var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
148
- return i && new i(e);
149
- }
150
- function ye(o, t, e) {
151
- if (o) {
152
- var n = o.getElementsByTagName(t), i = 0, r = n.length;
153
- if (e)
154
- for (; i < r; i++)
155
- e(n[i], i);
156
- return n;
157
- }
158
- return [];
159
- }
160
- function L() {
161
- var o = document.scrollingElement;
162
- return o || document.documentElement;
163
- }
164
- function C(o, t, e, n, i) {
165
- if (!(!o.getBoundingClientRect && o !== window)) {
166
- var r, a, l, s, u, d, c;
167
- if (o !== window && o.parentNode && o !== L() ? (r = o.getBoundingClientRect(), a = r.top, l = r.left, s = r.bottom, u = r.right, d = r.height, c = r.width) : (a = 0, l = 0, s = window.innerHeight, u = window.innerWidth, d = window.innerHeight, c = window.innerWidth), (t || e) && o !== window && (i = i || o.parentNode, !V))
168
- do
169
- if (i && i.getBoundingClientRect && (h(i, "transform") !== "none" || e && h(i, "position") !== "static")) {
170
- var b = i.getBoundingClientRect();
171
- a -= b.top + parseInt(h(i, "border-top-width")), l -= b.left + parseInt(h(i, "border-left-width")), s = a + r.height, u = l + r.width;
172
- break;
173
- }
174
- while (i = i.parentNode);
175
- if (n && o !== window) {
176
- var w = ct(i || o), E = w && w.a, y = w && w.d;
177
- w && (a /= y, l /= E, c /= E, d /= y, s = a + d, u = l + c);
178
- }
179
- return {
180
- top: a,
181
- left: l,
182
- bottom: s,
183
- right: u,
184
- width: c,
185
- height: d
186
- };
187
- }
188
- }
189
- function ce(o, t, e) {
190
- for (var n = tt(o, !0), i = C(o)[t]; n; ) {
191
- var r = C(n)[e], a = void 0;
192
- if (e === "top" || e === "left" ? a = i >= r : a = i <= r, !a)
193
- return n;
194
- if (n === L())
195
- break;
196
- n = tt(n, !1);
197
- }
198
- return !1;
199
- }
200
- function dt(o, t, e, n) {
201
- for (var i = 0, r = 0, a = o.children; r < a.length; ) {
202
- if (a[r].style.display !== "none" && a[r] !== p.ghost && (n || a[r] !== p.dragged) && W(a[r], e.draggable, o, !1)) {
203
- if (i === t)
204
- return a[r];
205
- i++;
206
- }
207
- r++;
208
- }
209
- return null;
210
- }
211
- function ie(o, t) {
212
- for (var e = o.lastElementChild; e && (e === p.ghost || h(e, "display") === "none" || t && !kt(e, t)); )
213
- e = e.previousElementSibling;
214
- return e || null;
215
- }
216
- function Y(o, t) {
217
- var e = 0;
218
- if (!o || !o.parentNode)
219
- return -1;
220
- for (; o = o.previousElementSibling; )
221
- o.nodeName.toUpperCase() !== "TEMPLATE" && o !== p.clone && (!t || kt(o, t)) && e++;
222
- return e;
223
- }
224
- function de(o) {
225
- var t = 0, e = 0, n = L();
226
- if (o)
227
- do {
228
- var i = ct(o), r = i.a, a = i.d;
229
- t += o.scrollLeft * r, e += o.scrollTop * a;
230
- } while (o !== n && (o = o.parentNode));
231
- return [t, e];
232
- }
233
- function Ye(o, t) {
234
- for (var e in o)
235
- if (o.hasOwnProperty(e)) {
236
- for (var n in t)
237
- if (t.hasOwnProperty(n) && t[n] === o[e][n])
238
- return Number(e);
239
- }
240
- return -1;
241
- }
242
- function tt(o, t) {
243
- if (!o || !o.getBoundingClientRect)
244
- return L();
245
- var e = o, n = !1;
246
- do
247
- if (e.clientWidth < e.scrollWidth || e.clientHeight < e.scrollHeight) {
248
- var i = h(e);
249
- if (e.clientWidth < e.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || e.clientHeight < e.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
250
- if (!e.getBoundingClientRect || e === document.body)
251
- return L();
252
- if (n || t)
253
- return e;
254
- n = !0;
255
- }
256
- }
257
- while (e = e.parentNode);
258
- return L();
259
- }
260
- function ke(o, t) {
261
- if (o && t)
262
- for (var e in t)
263
- t.hasOwnProperty(e) && (o[e] = t[e]);
264
- return o;
265
- }
266
- function zt(o, t) {
267
- return Math.round(o.top) === Math.round(t.top) && Math.round(o.left) === Math.round(t.left) && Math.round(o.height) === Math.round(t.height) && Math.round(o.width) === Math.round(t.width);
268
- }
269
- var _t;
270
- function we(o, t) {
271
- return function() {
272
- if (!_t) {
273
- var e = arguments, n = this;
274
- e.length === 1 ? o.call(n, e[0]) : o.apply(n, e), _t = setTimeout(function() {
275
- _t = void 0;
276
- }, t);
277
- }
278
- };
279
- }
280
- function Be() {
281
- clearTimeout(_t), _t = void 0;
282
- }
283
- function _e(o, t, e) {
284
- o.scrollLeft += t, o.scrollTop += e;
285
- }
286
- function De(o) {
287
- var t = window.Polymer, e = window.jQuery || window.Zepto;
288
- return t && t.dom ? t.dom(o).cloneNode(!0) : e ? e(o).clone(!0)[0] : o.cloneNode(!0);
289
- }
290
- function Se(o, t, e) {
291
- var n = {};
292
- return Array.from(o.children).forEach(function(i) {
293
- var r, a, l, s;
294
- if (!(!W(i, t.draggable, o, !1) || i.animated || i === e)) {
295
- var u = C(i);
296
- n.left = Math.min((r = n.left) !== null && r !== void 0 ? r : 1 / 0, u.left), n.top = Math.min((a = n.top) !== null && a !== void 0 ? a : 1 / 0, u.top), n.right = Math.max((l = n.right) !== null && l !== void 0 ? l : -1 / 0, u.right), n.bottom = Math.max((s = n.bottom) !== null && s !== void 0 ? s : -1 / 0, u.bottom);
297
- }
298
- }), n.width = n.right - n.left, n.height = n.bottom - n.top, n.x = n.left, n.y = n.top, n;
299
- }
300
- var N = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
301
- function He() {
302
- var o = [], t;
303
- return {
304
- captureAnimationState: function() {
305
- if (o = [], !!this.options.animation) {
306
- var n = [].slice.call(this.el.children);
307
- n.forEach(function(i) {
308
- if (!(h(i, "display") === "none" || i === p.ghost)) {
309
- o.push({
310
- target: i,
311
- rect: C(i)
312
- });
313
- var r = z({}, o[o.length - 1].rect);
314
- if (i.thisAnimationDuration) {
315
- var a = ct(i, !0);
316
- a && (r.top -= a.f, r.left -= a.e);
317
- }
318
- i.fromRect = r;
319
- }
320
- });
321
- }
322
- },
323
- addAnimationState: function(n) {
324
- o.push(n);
325
- },
326
- removeAnimationState: function(n) {
327
- o.splice(Ye(o, {
328
- target: n
329
- }), 1);
330
- },
331
- animateAll: function(n) {
332
- var i = this;
333
- if (!this.options.animation) {
334
- clearTimeout(t), typeof n == "function" && n();
335
- return;
336
- }
337
- var r = !1, a = 0;
338
- o.forEach(function(l) {
339
- var s = 0, u = l.target, d = u.fromRect, c = C(u), b = u.prevFromRect, w = u.prevToRect, E = l.rect, y = ct(u, !0);
340
- y && (c.top -= y.f, c.left -= y.e), u.toRect = c, u.thisAnimationDuration && zt(b, c) && !zt(d, c) && // Make sure animatingRect is on line between toRect & fromRect
341
- (E.top - c.top) / (E.left - c.left) === (d.top - c.top) / (d.left - c.left) && (s = Ge(E, b, w, i.options)), zt(c, d) || (u.prevFromRect = d, u.prevToRect = c, s || (s = i.options.animation), i.animate(u, E, c, s)), s && (r = !0, a = Math.max(a, s), clearTimeout(u.animationResetTimer), u.animationResetTimer = setTimeout(function() {
342
- u.animationTime = 0, u.prevFromRect = null, u.fromRect = null, u.prevToRect = null, u.thisAnimationDuration = null;
343
- }, s), u.thisAnimationDuration = s);
344
- }), clearTimeout(t), r ? t = setTimeout(function() {
345
- typeof n == "function" && n();
346
- }, a) : typeof n == "function" && n(), o = [];
347
- },
348
- animate: function(n, i, r, a) {
349
- if (a) {
350
- h(n, "transition", ""), h(n, "transform", "");
351
- var l = ct(this.el), s = l && l.a, u = l && l.d, d = (i.left - r.left) / (s || 1), c = (i.top - r.top) / (u || 1);
352
- n.animatingX = !!d, n.animatingY = !!c, h(n, "transform", "translate3d(" + d + "px," + c + "px,0)"), this.forRepaintDummy = We(n), h(n, "transition", "transform " + a + "ms" + (this.options.easing ? " " + this.options.easing : "")), h(n, "transform", "translate3d(0,0,0)"), typeof n.animated == "number" && clearTimeout(n.animated), n.animated = setTimeout(function() {
353
- h(n, "transition", ""), h(n, "transform", ""), n.animated = !1, n.animatingX = !1, n.animatingY = !1;
354
- }, a);
355
- }
356
- }
357
- };
358
- }
359
- function We(o) {
360
- return o.offsetWidth;
361
- }
362
- function Ge(o, t, e, n) {
363
- return Math.sqrt(Math.pow(t.top - o.top, 2) + Math.pow(t.left - o.left, 2)) / Math.sqrt(Math.pow(t.top - e.top, 2) + Math.pow(t.left - e.left, 2)) * n.animation;
364
- }
365
- var lt = [], jt = {
366
- initializeByDefault: !0
367
- }, Ot = {
368
- mount: function(t) {
369
- for (var e in jt)
370
- jt.hasOwnProperty(e) && !(e in t) && (t[e] = jt[e]);
371
- lt.forEach(function(n) {
372
- if (n.pluginName === t.pluginName)
373
- throw "Sortable: Cannot mount plugin ".concat(t.pluginName, " more than once");
374
- }), lt.push(t);
375
- },
376
- pluginEvent: function(t, e, n) {
377
- var i = this;
378
- this.eventCanceled = !1, n.cancel = function() {
379
- i.eventCanceled = !0;
380
- };
381
- var r = t + "Global";
382
- lt.forEach(function(a) {
383
- e[a.pluginName] && (e[a.pluginName][r] && e[a.pluginName][r](z({
384
- sortable: e
385
- }, n)), e.options[a.pluginName] && e[a.pluginName][t] && e[a.pluginName][t](z({
386
- sortable: e
387
- }, n)));
388
- });
389
- },
390
- initializePlugins: function(t, e, n, i) {
391
- lt.forEach(function(l) {
392
- var s = l.pluginName;
393
- if (!(!t.options[s] && !l.initializeByDefault)) {
394
- var u = new l(t, e, t.options);
395
- u.sortable = t, u.options = t.options, t[s] = u, q(n, u.defaults);
396
- }
397
- });
398
- for (var r in t.options)
399
- if (t.options.hasOwnProperty(r)) {
400
- var a = this.modifyOption(t, r, t.options[r]);
401
- typeof a < "u" && (t.options[r] = a);
402
- }
403
- },
404
- getEventProperties: function(t, e) {
405
- var n = {};
406
- return lt.forEach(function(i) {
407
- typeof i.eventProperties == "function" && q(n, i.eventProperties.call(e[i.pluginName], t));
408
- }), n;
409
- },
410
- modifyOption: function(t, e, n) {
411
- var i;
412
- return lt.forEach(function(r) {
413
- t[r.pluginName] && r.optionListeners && typeof r.optionListeners[e] == "function" && (i = r.optionListeners[e].call(t[r.pluginName], n));
414
- }), i;
415
- }
416
- };
417
- function Le(o) {
418
- var t = o.sortable, e = o.rootEl, n = o.name, i = o.targetEl, r = o.cloneEl, a = o.toEl, l = o.fromEl, s = o.oldIndex, u = o.newIndex, d = o.oldDraggableIndex, c = o.newDraggableIndex, b = o.originalEvent, w = o.putSortable, E = o.extraEventProperties;
419
- if (t = t || e && e[N], !!t) {
420
- var y, k = t.options, j = "on" + n.charAt(0).toUpperCase() + n.substr(1);
421
- window.CustomEvent && !V && !Ct ? y = new CustomEvent(n, {
422
- bubbles: !0,
423
- cancelable: !0
424
- }) : (y = document.createEvent("Event"), y.initEvent(n, !0, !0)), y.to = a || e, y.from = l || e, y.item = i || e, y.clone = r, y.oldIndex = s, y.newIndex = u, y.oldDraggableIndex = d, y.newDraggableIndex = c, y.originalEvent = b, y.pullMode = w ? w.lastPutMode : void 0;
425
- var A = z(z({}, E), Ot.getEventProperties(n, t));
426
- for (var B in A)
427
- y[B] = A[B];
428
- e && e.dispatchEvent(y), k[j] && k[j].call(t, y);
429
- }
430
- }
431
- var ze = ["evt"], x = function(t, e) {
432
- var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = n.evt, r = Re(n, ze);
433
- Ot.pluginEvent.bind(p)(t, e, z({
434
- dragEl: f,
435
- parentEl: S,
436
- ghostEl: g,
437
- rootEl: _,
438
- nextEl: at,
439
- lastDownEl: Ft,
440
- cloneEl: D,
441
- cloneHidden: J,
442
- dragStarted: bt,
443
- putSortable: O,
444
- activeSortable: p.active,
445
- originalEvent: i,
446
- oldIndex: ft,
447
- oldDraggableIndex: Dt,
448
- newIndex: X,
449
- newDraggableIndex: Q,
450
- hideGhostForTarget: Ie,
451
- unhideGhostForTarget: Ae,
452
- cloneNowHidden: function() {
453
- J = !0;
454
- },
455
- cloneNowShown: function() {
456
- J = !1;
457
- },
458
- dispatchSortableEvent: function(l) {
459
- P({
460
- sortable: e,
461
- name: l,
462
- originalEvent: i
463
- });
464
- }
465
- }, r));
466
- };
467
- function P(o) {
468
- Le(z({
469
- putSortable: O,
470
- cloneEl: D,
471
- targetEl: f,
472
- rootEl: _,
473
- oldIndex: ft,
474
- oldDraggableIndex: Dt,
475
- newIndex: X,
476
- newDraggableIndex: Q
477
- }, o));
478
- }
479
- var f, S, g, _, at, Ft, D, J, ft, X, Dt, Q, At, O, ut = !1, Bt = !1, Ht = [], it, H, $t, Ut, he, pe, bt, st, St, Tt = !1, Pt = !1, Rt, I, qt = [], Jt = !1, Wt = [], Lt = typeof document < "u", xt = oe, ge = Ct || V ? "cssFloat" : "float", je = Lt && !ve && !oe && "draggable" in document.createElement("div"), Te = function() {
480
- if (Lt) {
481
- if (V)
482
- return !1;
483
- var o = document.createElement("x");
484
- return o.style.cssText = "pointer-events:auto", o.style.pointerEvents === "auto";
485
- }
486
- }(), Ce = function(t, e) {
487
- var n = h(t), i = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), r = dt(t, 0, e), a = dt(t, 1, e), l = r && h(r), s = a && h(a), u = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + C(r).width, d = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + C(a).width;
488
- if (n.display === "flex")
489
- return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
490
- if (n.display === "grid")
491
- return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
492
- if (r && l.float && l.float !== "none") {
493
- var c = l.float === "left" ? "left" : "right";
494
- return a && (s.clear === "both" || s.clear === c) ? "vertical" : "horizontal";
495
- }
496
- return r && (l.display === "block" || l.display === "flex" || l.display === "table" || l.display === "grid" || u >= i && n[ge] === "none" || a && n[ge] === "none" && u + d > i) ? "vertical" : "horizontal";
497
- }, $e = function(t, e, n) {
498
- var i = n ? t.left : t.top, r = n ? t.right : t.bottom, a = n ? t.width : t.height, l = n ? e.left : e.top, s = n ? e.right : e.bottom, u = n ? e.width : e.height;
499
- return i === l || r === s || i + a / 2 === l + u / 2;
500
- }, Ue = function(t, e) {
501
- var n;
502
- return Ht.some(function(i) {
503
- var r = i[N].options.emptyInsertThreshold;
504
- if (!(!r || ie(i))) {
505
- var a = C(i), l = t >= a.left - r && t <= a.right + r, s = e >= a.top - r && e <= a.bottom + r;
506
- if (l && s)
507
- return n = i;
508
- }
509
- }), n;
510
- }, Oe = function(t) {
511
- function e(r, a) {
512
- return function(l, s, u, d) {
513
- var c = l.options.group.name && s.options.group.name && l.options.group.name === s.options.group.name;
514
- if (r == null && (a || c))
515
- return !0;
516
- if (r == null || r === !1)
517
- return !1;
518
- if (a && r === "clone")
519
- return r;
520
- if (typeof r == "function")
521
- return e(r(l, s, u, d), a)(l, s, u, d);
522
- var b = (a ? l : s).options.group.name;
523
- return r === !0 || typeof r == "string" && r === b || r.join && r.indexOf(b) > -1;
524
- };
525
- }
526
- var n = {}, i = t.group;
527
- (!i || Mt(i) != "object") && (i = {
528
- name: i
529
- }), n.name = i.name, n.checkPull = e(i.pull, !0), n.checkPut = e(i.put), n.revertClone = i.revertClone, t.group = n;
530
- }, Ie = function() {
531
- !Te && g && h(g, "display", "none");
532
- }, Ae = function() {
533
- !Te && g && h(g, "display", "");
534
- };
535
- Lt && !ve && document.addEventListener("click", function(o) {
536
- if (Bt)
537
- return o.preventDefault(), o.stopPropagation && o.stopPropagation(), o.stopImmediatePropagation && o.stopImmediatePropagation(), Bt = !1, !1;
538
- }, !0);
539
- var rt = function(t) {
540
- if (f) {
541
- t = t.touches ? t.touches[0] : t;
542
- var e = Ue(t.clientX, t.clientY);
543
- if (e) {
544
- var n = {};
545
- for (var i in t)
546
- t.hasOwnProperty(i) && (n[i] = t[i]);
547
- n.target = n.rootEl = e, n.preventDefault = void 0, n.stopPropagation = void 0, e[N]._onDragOver(n);
548
- }
549
- }
550
- }, qe = function(t) {
551
- f && f.parentNode[N]._isOutsideThisEl(t.target);
552
- };
553
- function p(o, t) {
554
- if (!(o && o.nodeType && o.nodeType === 1))
555
- throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));
556
- this.el = o, this.options = t = q({}, t), o[N] = this;
557
- var e = {
558
- group: null,
559
- sort: !0,
560
- disabled: !1,
561
- store: null,
562
- handle: null,
563
- draggable: /^[uo]l$/i.test(o.nodeName) ? ">li" : ">*",
564
- swapThreshold: 1,
565
- // percentage; 0 <= x <= 1
566
- invertSwap: !1,
567
- // invert always
568
- invertedSwapThreshold: null,
569
- // will be set to same as swapThreshold if default
570
- removeCloneOnHide: !0,
571
- direction: function() {
572
- return Ce(o, this.options);
573
- },
574
- ghostClass: "sortable-ghost",
575
- chosenClass: "sortable-chosen",
576
- dragClass: "sortable-drag",
577
- ignore: "a, img",
578
- filter: null,
579
- preventOnFilter: !0,
580
- animation: 0,
581
- easing: null,
582
- setData: function(a, l) {
583
- a.setData("Text", l.textContent);
584
- },
585
- dropBubble: !1,
586
- dragoverBubble: !1,
587
- dataIdAttr: "data-id",
588
- delay: 0,
589
- delayOnTouchOnly: !1,
590
- touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
591
- forceFallback: !1,
592
- fallbackClass: "sortable-fallback",
593
- fallbackOnBody: !1,
594
- fallbackTolerance: 0,
595
- fallbackOffset: {
596
- x: 0,
597
- y: 0
598
- },
599
- // Disabled on Safari: #1571; Enabled on Safari IOS: #2244
600
- supportPointer: p.supportPointer !== !1 && "PointerEvent" in window && (!wt || oe),
601
- emptyInsertThreshold: 5
602
- };
603
- Ot.initializePlugins(this, o, e);
604
- for (var n in e)
605
- !(n in t) && (t[n] = e[n]);
606
- Oe(t);
607
- for (var i in this)
608
- i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
609
- this.nativeDraggable = t.forceFallback ? !1 : je, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? v(o, "pointerdown", this._onTapStart) : (v(o, "mousedown", this._onTapStart), v(o, "touchstart", this._onTapStart)), this.nativeDraggable && (v(o, "dragover", this), v(o, "dragenter", this)), Ht.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), q(this, He());
610
- }
611
- p.prototype = /** @lends Sortable.prototype */
612
- {
613
- constructor: p,
614
- _isOutsideThisEl: function(t) {
615
- !this.el.contains(t) && t !== this.el && (st = null);
616
- },
617
- _getDirection: function(t, e) {
618
- return typeof this.options.direction == "function" ? this.options.direction.call(this, t, e, f) : this.options.direction;
619
- },
620
- _onTapStart: function(t) {
621
- if (t.cancelable) {
622
- var e = this, n = this.el, i = this.options, r = i.preventOnFilter, a = t.type, l = t.touches && t.touches[0] || t.pointerType && t.pointerType === "touch" && t, s = (l || t).target, u = t.target.shadowRoot && (t.path && t.path[0] || t.composedPath && t.composedPath()[0]) || s, d = i.filter;
623
- if (nn(n), !f && !(/mousedown|pointerdown/.test(a) && t.button !== 0 || i.disabled) && !u.isContentEditable && !(!this.nativeDraggable && wt && s && s.tagName.toUpperCase() === "SELECT") && (s = W(s, i.draggable, n, !1), !(s && s.animated) && Ft !== s)) {
624
- if (ft = Y(s), Dt = Y(s, i.draggable), typeof d == "function") {
625
- if (d.call(this, t, s, this)) {
626
- P({
627
- sortable: e,
628
- rootEl: u,
629
- name: "filter",
630
- targetEl: s,
631
- toEl: n,
632
- fromEl: n
633
- }), x("filter", e, {
634
- evt: t
635
- }), r && t.preventDefault();
636
- return;
637
- }
638
- } else if (d && (d = d.split(",").some(function(c) {
639
- if (c = W(u, c.trim(), n, !1), c)
640
- return P({
641
- sortable: e,
642
- rootEl: c,
643
- name: "filter",
644
- targetEl: s,
645
- fromEl: n,
646
- toEl: n
647
- }), x("filter", e, {
648
- evt: t
649
- }), !0;
650
- }), d)) {
651
- r && t.preventDefault();
652
- return;
653
- }
654
- i.handle && !W(u, i.handle, n, !1) || this._prepareDragStart(t, l, s);
655
- }
656
- }
657
- },
658
- _prepareDragStart: function(t, e, n) {
659
- var i = this, r = i.el, a = i.options, l = r.ownerDocument, s;
660
- if (n && !f && n.parentNode === r) {
661
- var u = C(n);
662
- if (_ = r, f = n, S = f.parentNode, at = f.nextSibling, Ft = n, At = a.group, p.dragged = f, it = {
663
- target: f,
664
- clientX: (e || t).clientX,
665
- clientY: (e || t).clientY
666
- }, he = it.clientX - u.left, pe = it.clientY - u.top, this._lastX = (e || t).clientX, this._lastY = (e || t).clientY, f.style["will-change"] = "all", s = function() {
667
- if (x("delayEnded", i, {
668
- evt: t
669
- }), p.eventCanceled) {
670
- i._onDrop();
671
- return;
672
- }
673
- i._disableDelayedDragEvents(), !ue && i.nativeDraggable && (f.draggable = !0), i._triggerDragStart(t, e), P({
674
- sortable: i,
675
- name: "choose",
676
- originalEvent: t
677
- }), R(f, a.chosenClass, !0);
678
- }, a.ignore.split(",").forEach(function(d) {
679
- ye(f, d.trim(), Vt);
680
- }), v(l, "dragover", rt), v(l, "mousemove", rt), v(l, "touchmove", rt), a.supportPointer ? (v(l, "pointerup", i._onDrop), !this.nativeDraggable && v(l, "pointercancel", i._onDrop)) : (v(l, "mouseup", i._onDrop), v(l, "touchend", i._onDrop), v(l, "touchcancel", i._onDrop)), ue && this.nativeDraggable && (this.options.touchStartThreshold = 4, f.draggable = !0), x("delayStart", this, {
681
- evt: t
682
- }), a.delay && (!a.delayOnTouchOnly || e) && (!this.nativeDraggable || !(Ct || V))) {
683
- if (p.eventCanceled) {
684
- this._onDrop();
685
- return;
686
- }
687
- a.supportPointer ? (v(l, "pointerup", i._disableDelayedDrag), v(l, "pointercancel", i._disableDelayedDrag)) : (v(l, "mouseup", i._disableDelayedDrag), v(l, "touchend", i._disableDelayedDrag), v(l, "touchcancel", i._disableDelayedDrag)), v(l, "mousemove", i._delayedDragTouchMoveHandler), v(l, "touchmove", i._delayedDragTouchMoveHandler), a.supportPointer && v(l, "pointermove", i._delayedDragTouchMoveHandler), i._dragStartTimer = setTimeout(s, a.delay);
688
- } else
689
- s();
690
- }
691
- },
692
- _delayedDragTouchMoveHandler: function(t) {
693
- var e = t.touches ? t.touches[0] : t;
694
- Math.max(Math.abs(e.clientX - this._lastX), Math.abs(e.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
695
- },
696
- _disableDelayedDrag: function() {
697
- f && Vt(f), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
698
- },
699
- _disableDelayedDragEvents: function() {
700
- var t = this.el.ownerDocument;
701
- m(t, "mouseup", this._disableDelayedDrag), m(t, "touchend", this._disableDelayedDrag), m(t, "touchcancel", this._disableDelayedDrag), m(t, "pointerup", this._disableDelayedDrag), m(t, "pointercancel", this._disableDelayedDrag), m(t, "mousemove", this._delayedDragTouchMoveHandler), m(t, "touchmove", this._delayedDragTouchMoveHandler), m(t, "pointermove", this._delayedDragTouchMoveHandler);
702
- },
703
- _triggerDragStart: function(t, e) {
704
- e = e || t.pointerType == "touch" && t, !this.nativeDraggable || e ? this.options.supportPointer ? v(document, "pointermove", this._onTouchMove) : e ? v(document, "touchmove", this._onTouchMove) : v(document, "mousemove", this._onTouchMove) : (v(f, "dragend", this), v(_, "dragstart", this._onDragStart));
705
- try {
706
- document.selection ? Xt(function() {
707
- document.selection.empty();
708
- }) : window.getSelection().removeAllRanges();
709
- } catch {
710
- }
711
- },
712
- _dragStarted: function(t, e) {
713
- if (ut = !1, _ && f) {
714
- x("dragStarted", this, {
715
- evt: e
716
- }), this.nativeDraggable && v(document, "dragover", qe);
717
- var n = this.options;
718
- !t && R(f, n.dragClass, !1), R(f, n.ghostClass, !0), p.active = this, t && this._appendGhost(), P({
719
- sortable: this,
720
- name: "start",
721
- originalEvent: e
722
- });
723
- } else
724
- this._nulling();
725
- },
726
- _emulateDragOver: function() {
727
- if (H) {
728
- this._lastX = H.clientX, this._lastY = H.clientY, Ie();
729
- for (var t = document.elementFromPoint(H.clientX, H.clientY), e = t; t && t.shadowRoot && (t = t.shadowRoot.elementFromPoint(H.clientX, H.clientY), t !== e); )
730
- e = t;
731
- if (f.parentNode[N]._isOutsideThisEl(t), e)
732
- do {
733
- if (e[N]) {
734
- var n = void 0;
735
- if (n = e[N]._onDragOver({
736
- clientX: H.clientX,
737
- clientY: H.clientY,
738
- target: t,
739
- rootEl: e
740
- }), n && !this.options.dragoverBubble)
741
- break;
742
- }
743
- t = e;
744
- } while (e = Ee(e));
745
- Ae();
746
- }
747
- },
748
- _onTouchMove: function(t) {
749
- if (it) {
750
- var e = this.options, n = e.fallbackTolerance, i = e.fallbackOffset, r = t.touches ? t.touches[0] : t, a = g && ct(g, !0), l = g && a && a.a, s = g && a && a.d, u = xt && I && de(I), d = (r.clientX - it.clientX + i.x) / (l || 1) + (u ? u[0] - qt[0] : 0) / (l || 1), c = (r.clientY - it.clientY + i.y) / (s || 1) + (u ? u[1] - qt[1] : 0) / (s || 1);
751
- if (!p.active && !ut) {
752
- if (n && Math.max(Math.abs(r.clientX - this._lastX), Math.abs(r.clientY - this._lastY)) < n)
753
- return;
754
- this._onDragStart(t, !0);
755
- }
756
- if (g) {
757
- a ? (a.e += d - ($t || 0), a.f += c - (Ut || 0)) : a = {
758
- a: 1,
759
- b: 0,
760
- c: 0,
761
- d: 1,
762
- e: d,
763
- f: c
764
- };
765
- var b = "matrix(".concat(a.a, ",").concat(a.b, ",").concat(a.c, ",").concat(a.d, ",").concat(a.e, ",").concat(a.f, ")");
766
- h(g, "webkitTransform", b), h(g, "mozTransform", b), h(g, "msTransform", b), h(g, "transform", b), $t = d, Ut = c, H = r;
767
- }
768
- t.cancelable && t.preventDefault();
769
- }
770
- },
771
- _appendGhost: function() {
772
- if (!g) {
773
- var t = this.options.fallbackOnBody ? document.body : _, e = C(f, !0, xt, !0, t), n = this.options;
774
- if (xt) {
775
- for (I = t; h(I, "position") === "static" && h(I, "transform") === "none" && I !== document; )
776
- I = I.parentNode;
777
- I !== document.body && I !== document.documentElement ? (I === document && (I = L()), e.top += I.scrollTop, e.left += I.scrollLeft) : I = L(), qt = de(I);
778
- }
779
- g = f.cloneNode(!0), R(g, n.ghostClass, !1), R(g, n.fallbackClass, !0), R(g, n.dragClass, !0), h(g, "transition", ""), h(g, "transform", ""), h(g, "box-sizing", "border-box"), h(g, "margin", 0), h(g, "top", e.top), h(g, "left", e.left), h(g, "width", e.width), h(g, "height", e.height), h(g, "opacity", "0.8"), h(g, "position", xt ? "absolute" : "fixed"), h(g, "zIndex", "100000"), h(g, "pointerEvents", "none"), p.ghost = g, t.appendChild(g), h(g, "transform-origin", he / parseInt(g.style.width) * 100 + "% " + pe / parseInt(g.style.height) * 100 + "%");
780
- }
781
- },
782
- _onDragStart: function(t, e) {
783
- var n = this, i = t.dataTransfer, r = n.options;
784
- if (x("dragStart", this, {
785
- evt: t
786
- }), p.eventCanceled) {
787
- this._onDrop();
788
- return;
789
- }
790
- x("setupClone", this), p.eventCanceled || (D = De(f), D.removeAttribute("id"), D.draggable = !1, D.style["will-change"] = "", this._hideClone(), R(D, this.options.chosenClass, !1), p.clone = D), n.cloneId = Xt(function() {
791
- x("clone", n), !p.eventCanceled && (n.options.removeCloneOnHide || _.insertBefore(D, f), n._hideClone(), P({
792
- sortable: n,
793
- name: "clone"
794
- }));
795
- }), !e && R(f, r.dragClass, !0), e ? (Bt = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (m(document, "mouseup", n._onDrop), m(document, "touchend", n._onDrop), m(document, "touchcancel", n._onDrop), i && (i.effectAllowed = "move", r.setData && r.setData.call(n, i, f)), v(document, "drop", n), h(f, "transform", "translateZ(0)")), ut = !0, n._dragStartId = Xt(n._dragStarted.bind(n, e, t)), v(document, "selectstart", n), bt = !0, window.getSelection().removeAllRanges(), wt && h(document.body, "user-select", "none");
796
- },
797
- // Returns true - if no further action is needed (either inserted or another condition)
798
- _onDragOver: function(t) {
799
- var e = this.el, n = t.target, i, r, a, l = this.options, s = l.group, u = p.active, d = At === s, c = l.sort, b = O || u, w, E = this, y = !1;
800
- if (Jt)
801
- return;
802
- function k(vt, xe) {
803
- x(vt, E, z({
804
- evt: t,
805
- isOwner: d,
806
- axis: w ? "vertical" : "horizontal",
807
- revert: a,
808
- dragRect: i,
809
- targetRect: r,
810
- canSort: c,
811
- fromSortable: b,
812
- target: n,
813
- completed: A,
814
- onMove: function(le, Ne) {
815
- return Nt(_, e, f, i, le, C(le), t, Ne);
816
- },
817
- changed: B
818
- }, xe));
819
- }
820
- function j() {
821
- k("dragOverAnimationCapture"), E.captureAnimationState(), E !== b && b.captureAnimationState();
822
- }
823
- function A(vt) {
824
- return k("dragOverCompleted", {
825
- insertion: vt
826
- }), vt && (d ? u._hideClone() : u._showClone(E), E !== b && (R(f, O ? O.options.ghostClass : u.options.ghostClass, !1), R(f, l.ghostClass, !0)), O !== E && E !== p.active ? O = E : E === p.active && O && (O = null), b === E && (E._ignoreWhileAnimating = n), E.animateAll(function() {
827
- k("dragOverAnimationComplete"), E._ignoreWhileAnimating = null;
828
- }), E !== b && (b.animateAll(), b._ignoreWhileAnimating = null)), (n === f && !f.animated || n === e && !n.animated) && (st = null), !l.dragoverBubble && !t.rootEl && n !== document && (f.parentNode[N]._isOutsideThisEl(t.target), !vt && rt(t)), !l.dragoverBubble && t.stopPropagation && t.stopPropagation(), y = !0;
829
- }
830
- function B() {
831
- X = Y(f), Q = Y(f, l.draggable), P({
832
- sortable: E,
833
- name: "change",
834
- toEl: e,
835
- newIndex: X,
836
- newDraggableIndex: Q,
837
- originalEvent: t
838
- });
839
- }
840
- if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), n = W(n, l.draggable, e, !0), k("dragOver"), p.eventCanceled)
841
- return y;
842
- if (f.contains(t.target) || n.animated && n.animatingX && n.animatingY || E._ignoreWhileAnimating === n)
843
- return A(!1);
844
- if (Bt = !1, u && !l.disabled && (d ? c || (a = S !== _) : O === this || (this.lastPutMode = At.checkPull(this, u, f, t)) && s.checkPut(this, u, f, t))) {
845
- if (w = this._getDirection(t, n) === "vertical", i = C(f), k("dragOverValid"), p.eventCanceled)
846
- return y;
847
- if (a)
848
- return S = _, j(), this._hideClone(), k("revert"), p.eventCanceled || (at ? _.insertBefore(f, at) : _.appendChild(f)), A(!0);
849
- var M = ie(e, l.draggable);
850
- if (!M || Qe(t, w, this) && !M.animated) {
851
- if (M === f)
852
- return A(!1);
853
- if (M && e === t.target && (n = M), n && (r = C(n)), Nt(_, e, f, i, n, r, t, !!n) !== !1)
854
- return j(), M && M.nextSibling ? e.insertBefore(f, M.nextSibling) : e.appendChild(f), S = e, B(), A(!0);
855
- } else if (M && Ze(t, w, this)) {
856
- var et = dt(e, 0, l, !0);
857
- if (et === f)
858
- return A(!1);
859
- if (n = et, r = C(n), Nt(_, e, f, i, n, r, t, !1) !== !1)
860
- return j(), e.insertBefore(f, et), S = e, B(), A(!0);
861
- } else if (n.parentNode === e) {
862
- r = C(n);
863
- var G = 0, nt, ht = f.parentNode !== e, F = !$e(f.animated && f.toRect || i, n.animated && n.toRect || r, w), pt = w ? "top" : "left", K = ce(n, "top", "top") || ce(f, "top", "top"), gt = K ? K.scrollTop : void 0;
864
- st !== n && (nt = r[pt], Tt = !1, Pt = !F && l.invertSwap || ht), G = Je(t, n, r, w, F ? 1 : l.swapThreshold, l.invertedSwapThreshold == null ? l.swapThreshold : l.invertedSwapThreshold, Pt, st === n);
865
- var $;
866
- if (G !== 0) {
867
- var ot = Y(f);
868
- do
869
- ot -= G, $ = S.children[ot];
870
- while ($ && (h($, "display") === "none" || $ === g));
871
- }
872
- if (G === 0 || $ === n)
873
- return A(!1);
874
- st = n, St = G;
875
- var mt = n.nextElementSibling, Z = !1;
876
- Z = G === 1;
877
- var It = Nt(_, e, f, i, n, r, t, Z);
878
- if (It !== !1)
879
- return (It === 1 || It === -1) && (Z = It === 1), Jt = !0, setTimeout(Ke, 30), j(), Z && !mt ? e.appendChild(f) : n.parentNode.insertBefore(f, Z ? mt : n), K && _e(K, 0, gt - K.scrollTop), S = f.parentNode, nt !== void 0 && !Pt && (Rt = Math.abs(nt - C(n)[pt])), B(), A(!0);
880
- }
881
- if (e.contains(f))
882
- return A(!1);
883
- }
884
- return !1;
885
- },
886
- _ignoreWhileAnimating: null,
887
- _offMoveEvents: function() {
888
- m(document, "mousemove", this._onTouchMove), m(document, "touchmove", this._onTouchMove), m(document, "pointermove", this._onTouchMove), m(document, "dragover", rt), m(document, "mousemove", rt), m(document, "touchmove", rt);
889
- },
890
- _offUpEvents: function() {
891
- var t = this.el.ownerDocument;
892
- m(t, "mouseup", this._onDrop), m(t, "touchend", this._onDrop), m(t, "pointerup", this._onDrop), m(t, "pointercancel", this._onDrop), m(t, "touchcancel", this._onDrop), m(document, "selectstart", this);
893
- },
894
- _onDrop: function(t) {
895
- var e = this.el, n = this.options;
896
- if (X = Y(f), Q = Y(f, n.draggable), x("drop", this, {
897
- evt: t
898
- }), S = f && f.parentNode, X = Y(f), Q = Y(f, n.draggable), p.eventCanceled) {
899
- this._nulling();
900
- return;
901
- }
902
- ut = !1, Pt = !1, Tt = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), te(this.cloneId), te(this._dragStartId), this.nativeDraggable && (m(document, "drop", this), m(e, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), wt && h(document.body, "user-select", ""), h(f, "transform", ""), t && (bt && (t.cancelable && t.preventDefault(), !n.dropBubble && t.stopPropagation()), g && g.parentNode && g.parentNode.removeChild(g), (_ === S || O && O.lastPutMode !== "clone") && D && D.parentNode && D.parentNode.removeChild(D), f && (this.nativeDraggable && m(f, "dragend", this), Vt(f), f.style["will-change"] = "", bt && !ut && R(f, O ? O.options.ghostClass : this.options.ghostClass, !1), R(f, this.options.chosenClass, !1), P({
903
- sortable: this,
904
- name: "unchoose",
905
- toEl: S,
906
- newIndex: null,
907
- newDraggableIndex: null,
908
- originalEvent: t
909
- }), _ !== S ? (X >= 0 && (P({
910
- rootEl: S,
911
- name: "add",
912
- toEl: S,
913
- fromEl: _,
914
- originalEvent: t
915
- }), P({
916
- sortable: this,
917
- name: "remove",
918
- toEl: S,
919
- originalEvent: t
920
- }), P({
921
- rootEl: S,
922
- name: "sort",
923
- toEl: S,
924
- fromEl: _,
925
- originalEvent: t
926
- }), P({
927
- sortable: this,
928
- name: "sort",
929
- toEl: S,
930
- originalEvent: t
931
- })), O && O.save()) : X !== ft && X >= 0 && (P({
932
- sortable: this,
933
- name: "update",
934
- toEl: S,
935
- originalEvent: t
936
- }), P({
937
- sortable: this,
938
- name: "sort",
939
- toEl: S,
940
- originalEvent: t
941
- })), p.active && ((X == null || X === -1) && (X = ft, Q = Dt), P({
942
- sortable: this,
943
- name: "end",
944
- toEl: S,
945
- originalEvent: t
946
- }), this.save()))), this._nulling();
947
- },
948
- _nulling: function() {
949
- x("nulling", this), _ = f = S = g = at = D = Ft = J = it = H = bt = X = Q = ft = Dt = st = St = O = At = p.dragged = p.ghost = p.clone = p.active = null, Wt.forEach(function(t) {
950
- t.checked = !0;
951
- }), Wt.length = $t = Ut = 0;
952
- },
953
- handleEvent: function(t) {
954
- switch (t.type) {
955
- case "drop":
956
- case "dragend":
957
- this._onDrop(t);
958
- break;
959
- case "dragenter":
960
- case "dragover":
961
- f && (this._onDragOver(t), Ve(t));
962
- break;
963
- case "selectstart":
964
- t.preventDefault();
965
- break;
966
- }
967
- },
968
- /**
969
- * Serializes the item into an array of string.
970
- * @returns {String[]}
971
- */
972
- toArray: function() {
973
- for (var t = [], e, n = this.el.children, i = 0, r = n.length, a = this.options; i < r; i++)
974
- e = n[i], W(e, a.draggable, this.el, !1) && t.push(e.getAttribute(a.dataIdAttr) || en(e));
975
- return t;
976
- },
977
- /**
978
- * Sorts the elements according to the array.
979
- * @param {String[]} order order of the items
980
- */
981
- sort: function(t, e) {
982
- var n = {}, i = this.el;
983
- this.toArray().forEach(function(r, a) {
984
- var l = i.children[a];
985
- W(l, this.options.draggable, i, !1) && (n[r] = l);
986
- }, this), e && this.captureAnimationState(), t.forEach(function(r) {
987
- n[r] && (i.removeChild(n[r]), i.appendChild(n[r]));
988
- }), e && this.animateAll();
989
- },
990
- /**
991
- * Save the current sorting
992
- */
993
- save: function() {
994
- var t = this.options.store;
995
- t && t.set && t.set(this);
996
- },
997
- /**
998
- * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
999
- * @param {HTMLElement} el
1000
- * @param {String} [selector] default: `options.draggable`
1001
- * @returns {HTMLElement|null}
1002
- */
1003
- closest: function(t, e) {
1004
- return W(t, e || this.options.draggable, this.el, !1);
1005
- },
1006
- /**
1007
- * Set/get option
1008
- * @param {string} name
1009
- * @param {*} [value]
1010
- * @returns {*}
1011
- */
1012
- option: function(t, e) {
1013
- var n = this.options;
1014
- if (e === void 0)
1015
- return n[t];
1016
- var i = Ot.modifyOption(this, t, e);
1017
- typeof i < "u" ? n[t] = i : n[t] = e, t === "group" && Oe(n);
1018
- },
1019
- /**
1020
- * Destroy
1021
- */
1022
- destroy: function() {
1023
- x("destroy", this);
1024
- var t = this.el;
1025
- t[N] = null, m(t, "mousedown", this._onTapStart), m(t, "touchstart", this._onTapStart), m(t, "pointerdown", this._onTapStart), this.nativeDraggable && (m(t, "dragover", this), m(t, "dragenter", this)), Array.prototype.forEach.call(t.querySelectorAll("[draggable]"), function(e) {
1026
- e.removeAttribute("draggable");
1027
- }), this._onDrop(), this._disableDelayedDragEvents(), Ht.splice(Ht.indexOf(this.el), 1), this.el = t = null;
1028
- },
1029
- _hideClone: function() {
1030
- if (!J) {
1031
- if (x("hideClone", this), p.eventCanceled)
1032
- return;
1033
- h(D, "display", "none"), this.options.removeCloneOnHide && D.parentNode && D.parentNode.removeChild(D), J = !0;
1034
- }
1035
- },
1036
- _showClone: function(t) {
1037
- if (t.lastPutMode !== "clone") {
1038
- this._hideClone();
1039
- return;
1040
- }
1041
- if (J) {
1042
- if (x("showClone", this), p.eventCanceled)
1043
- return;
1044
- f.parentNode == _ && !this.options.group.revertClone ? _.insertBefore(D, f) : at ? _.insertBefore(D, at) : _.appendChild(D), this.options.group.revertClone && this.animate(f, D), h(D, "display", ""), J = !1;
1045
- }
1046
- }
1047
- };
1048
- function Ve(o) {
1049
- o.dataTransfer && (o.dataTransfer.dropEffect = "move"), o.cancelable && o.preventDefault();
1050
- }
1051
- function Nt(o, t, e, n, i, r, a, l) {
1052
- var s, u = o[N], d = u.options.onMove, c;
1053
- return window.CustomEvent && !V && !Ct ? s = new CustomEvent("move", {
1054
- bubbles: !0,
1055
- cancelable: !0
1056
- }) : (s = document.createEvent("Event"), s.initEvent("move", !0, !0)), s.to = t, s.from = o, s.dragged = e, s.draggedRect = n, s.related = i || t, s.relatedRect = r || C(t), s.willInsertAfter = l, s.originalEvent = a, o.dispatchEvent(s), d && (c = d.call(u, s, a)), c;
1057
- }
1058
- function Vt(o) {
1059
- o.draggable = !1;
1060
- }
1061
- function Ke() {
1062
- Jt = !1;
1063
- }
1064
- function Ze(o, t, e) {
1065
- var n = C(dt(e.el, 0, e.options, !0)), i = Se(e.el, e.options, g), r = 10;
1066
- return t ? o.clientX < i.left - r || o.clientY < n.top && o.clientX < n.right : o.clientY < i.top - r || o.clientY < n.bottom && o.clientX < n.left;
1067
- }
1068
- function Qe(o, t, e) {
1069
- var n = C(ie(e.el, e.options.draggable)), i = Se(e.el, e.options, g), r = 10;
1070
- return t ? o.clientX > i.right + r || o.clientY > n.bottom && o.clientX > n.left : o.clientY > i.bottom + r || o.clientX > n.right && o.clientY > n.top;
1071
- }
1072
- function Je(o, t, e, n, i, r, a, l) {
1073
- var s = n ? o.clientY : o.clientX, u = n ? e.height : e.width, d = n ? e.top : e.left, c = n ? e.bottom : e.right, b = !1;
1074
- if (!a) {
1075
- if (l && Rt < u * i) {
1076
- if (!Tt && (St === 1 ? s > d + u * r / 2 : s < c - u * r / 2) && (Tt = !0), Tt)
1077
- b = !0;
1078
- else if (St === 1 ? s < d + Rt : s > c - Rt)
1079
- return -St;
1080
- } else if (s > d + u * (1 - i) / 2 && s < c - u * (1 - i) / 2)
1081
- return tn(t);
1082
- }
1083
- return b = b || a, b && (s < d + u * r / 2 || s > c - u * r / 2) ? s > d + u / 2 ? 1 : -1 : 0;
1084
- }
1085
- function tn(o) {
1086
- return Y(f) < Y(o) ? 1 : -1;
1087
- }
1088
- function en(o) {
1089
- for (var t = o.tagName + o.className + o.src + o.href + o.textContent, e = t.length, n = 0; e--; )
1090
- n += t.charCodeAt(e);
1091
- return n.toString(36);
1092
- }
1093
- function nn(o) {
1094
- Wt.length = 0;
1095
- for (var t = o.getElementsByTagName("input"), e = t.length; e--; ) {
1096
- var n = t[e];
1097
- n.checked && Wt.push(n);
1098
- }
1099
- }
1100
- function Xt(o) {
1101
- return setTimeout(o, 0);
1102
- }
1103
- function te(o) {
1104
- return clearTimeout(o);
1105
- }
1106
- Lt && v(document, "touchmove", function(o) {
1107
- (p.active || ut) && o.cancelable && o.preventDefault();
1108
- });
1109
- p.utils = {
1110
- on: v,
1111
- off: m,
1112
- css: h,
1113
- find: ye,
1114
- is: function(t, e) {
1115
- return !!W(t, e, t, !1);
1116
- },
1117
- extend: ke,
1118
- throttle: we,
1119
- closest: W,
1120
- toggleClass: R,
1121
- clone: De,
1122
- index: Y,
1123
- nextTick: Xt,
1124
- cancelNextTick: te,
1125
- detectDirection: Ce,
1126
- getChild: dt,
1127
- expando: N
1128
- };
1129
- p.get = function(o) {
1130
- return o[N];
1131
- };
1132
- p.mount = function() {
1133
- for (var o = arguments.length, t = new Array(o), e = 0; e < o; e++)
1134
- t[e] = arguments[e];
1135
- t[0].constructor === Array && (t = t[0]), t.forEach(function(n) {
1136
- if (!n.prototype || !n.prototype.constructor)
1137
- throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));
1138
- n.utils && (p.utils = z(z({}, p.utils), n.utils)), Ot.mount(n);
1139
- });
1140
- };
1141
- p.create = function(o, t) {
1142
- return new p(o, t);
1143
- };
1144
- p.version = Xe;
1145
- var T = [], Et, ee, ne = !1, Kt, Zt, Gt, yt;
1146
- function on() {
1147
- function o() {
1148
- this.defaults = {
1149
- scroll: !0,
1150
- forceAutoScrollFallback: !1,
1151
- scrollSensitivity: 30,
1152
- scrollSpeed: 10,
1153
- bubbleScroll: !0
1154
- };
1155
- for (var t in this)
1156
- t.charAt(0) === "_" && typeof this[t] == "function" && (this[t] = this[t].bind(this));
1157
- }
1158
- return o.prototype = {
1159
- dragStarted: function(e) {
1160
- var n = e.originalEvent;
1161
- this.sortable.nativeDraggable ? v(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? v(document, "pointermove", this._handleFallbackAutoScroll) : n.touches ? v(document, "touchmove", this._handleFallbackAutoScroll) : v(document, "mousemove", this._handleFallbackAutoScroll);
1162
- },
1163
- dragOverCompleted: function(e) {
1164
- var n = e.originalEvent;
1165
- !this.options.dragOverBubble && !n.rootEl && this._handleAutoScroll(n);
1166
- },
1167
- drop: function() {
1168
- this.sortable.nativeDraggable ? m(document, "dragover", this._handleAutoScroll) : (m(document, "pointermove", this._handleFallbackAutoScroll), m(document, "touchmove", this._handleFallbackAutoScroll), m(document, "mousemove", this._handleFallbackAutoScroll)), me(), Yt(), Be();
1169
- },
1170
- nulling: function() {
1171
- Gt = ee = Et = ne = yt = Kt = Zt = null, T.length = 0;
1172
- },
1173
- _handleFallbackAutoScroll: function(e) {
1174
- this._handleAutoScroll(e, !0);
1175
- },
1176
- _handleAutoScroll: function(e, n) {
1177
- var i = this, r = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, l = document.elementFromPoint(r, a);
1178
- if (Gt = e, n || this.options.forceAutoScrollFallback || Ct || V || wt) {
1179
- Qt(e, this.options, l, n);
1180
- var s = tt(l, !0);
1181
- ne && (!yt || r !== Kt || a !== Zt) && (yt && me(), yt = setInterval(function() {
1182
- var u = tt(document.elementFromPoint(r, a), !0);
1183
- u !== s && (s = u, Yt()), Qt(e, i.options, u, n);
1184
- }, 10), Kt = r, Zt = a);
1185
- } else {
1186
- if (!this.options.bubbleScroll || tt(l, !0) === L()) {
1187
- Yt();
1188
- return;
1189
- }
1190
- Qt(e, this.options, tt(l, !1), !1);
1191
- }
1192
- }
1193
- }, q(o, {
1194
- pluginName: "scroll",
1195
- initializeByDefault: !0
1196
- });
1197
- }
1198
- function Yt() {
1199
- T.forEach(function(o) {
1200
- clearInterval(o.pid);
1201
- }), T = [];
1202
- }
1203
- function me() {
1204
- clearInterval(yt);
1205
- }
1206
- var Qt = we(function(o, t, e, n) {
1207
- if (t.scroll) {
1208
- var i = (o.touches ? o.touches[0] : o).clientX, r = (o.touches ? o.touches[0] : o).clientY, a = t.scrollSensitivity, l = t.scrollSpeed, s = L(), u = !1, d;
1209
- ee !== e && (ee = e, Yt(), Et = t.scroll, d = t.scrollFn, Et === !0 && (Et = tt(e, !0)));
1210
- var c = 0, b = Et;
1211
- do {
1212
- var w = b, E = C(w), y = E.top, k = E.bottom, j = E.left, A = E.right, B = E.width, M = E.height, et = void 0, G = void 0, nt = w.scrollWidth, ht = w.scrollHeight, F = h(w), pt = w.scrollLeft, K = w.scrollTop;
1213
- w === s ? (et = B < nt && (F.overflowX === "auto" || F.overflowX === "scroll" || F.overflowX === "visible"), G = M < ht && (F.overflowY === "auto" || F.overflowY === "scroll" || F.overflowY === "visible")) : (et = B < nt && (F.overflowX === "auto" || F.overflowX === "scroll"), G = M < ht && (F.overflowY === "auto" || F.overflowY === "scroll"));
1214
- var gt = et && (Math.abs(A - i) <= a && pt + B < nt) - (Math.abs(j - i) <= a && !!pt), $ = G && (Math.abs(k - r) <= a && K + M < ht) - (Math.abs(y - r) <= a && !!K);
1215
- if (!T[c])
1216
- for (var ot = 0; ot <= c; ot++)
1217
- T[ot] || (T[ot] = {});
1218
- (T[c].vx != gt || T[c].vy != $ || T[c].el !== w) && (T[c].el = w, T[c].vx = gt, T[c].vy = $, clearInterval(T[c].pid), (gt != 0 || $ != 0) && (u = !0, T[c].pid = setInterval((function() {
1219
- n && this.layer === 0 && p.active._onTouchMove(Gt);
1220
- var mt = T[this.layer].vy ? T[this.layer].vy * l : 0, Z = T[this.layer].vx ? T[this.layer].vx * l : 0;
1221
- typeof d == "function" && d.call(p.dragged.parentNode[N], Z, mt, o, Gt, T[this.layer].el) !== "continue" || _e(T[this.layer].el, Z, mt);
1222
- }).bind({
1223
- layer: c
1224
- }), 24))), c++;
1225
- } while (t.bubbleScroll && b !== s && (b = tt(b, !1)));
1226
- ne = u;
1227
- }
1228
- }, 30), Pe = function(t) {
1229
- var e = t.originalEvent, n = t.putSortable, i = t.dragEl, r = t.activeSortable, a = t.dispatchSortableEvent, l = t.hideGhostForTarget, s = t.unhideGhostForTarget;
1230
- if (e) {
1231
- var u = n || r;
1232
- l();
1233
- var d = e.changedTouches && e.changedTouches.length ? e.changedTouches[0] : e, c = document.elementFromPoint(d.clientX, d.clientY);
1234
- s(), u && !u.el.contains(c) && (a("spill"), this.onSpill({
1235
- dragEl: i,
1236
- putSortable: n
1237
- }));
1238
- }
1239
- };
1240
- function re() {
1241
- }
1242
- re.prototype = {
1243
- startIndex: null,
1244
- dragStart: function(t) {
1245
- var e = t.oldDraggableIndex;
1246
- this.startIndex = e;
1247
- },
1248
- onSpill: function(t) {
1249
- var e = t.dragEl, n = t.putSortable;
1250
- this.sortable.captureAnimationState(), n && n.captureAnimationState();
1251
- var i = dt(this.sortable.el, this.startIndex, this.options);
1252
- i ? this.sortable.el.insertBefore(e, i) : this.sortable.el.appendChild(e), this.sortable.animateAll(), n && n.animateAll();
1253
- },
1254
- drop: Pe
1255
- };
1256
- q(re, {
1257
- pluginName: "revertOnSpill"
1258
- });
1259
- function ae() {
1260
- }
1261
- ae.prototype = {
1262
- onSpill: function(t) {
1263
- var e = t.dragEl, n = t.putSortable, i = n || this.sortable;
1264
- i.captureAnimationState(), e.parentNode && e.parentNode.removeChild(e), i.animateAll();
1265
- },
1266
- drop: Pe
1267
- };
1268
- q(ae, {
1269
- pluginName: "removeOnSpill"
1270
- });
1271
- p.mount(new on());
1272
- p.mount(ae, re);
1273
- export {
1274
- p as S
1275
- };