genesys-spark-components 4.0.0-beta.37 → 4.0.0-beta.39

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 (330) hide show
  1. package/dist/cjs/genesys-webcomponents.cjs.js +1 -1
  2. package/dist/cjs/gux-accordion.cjs.entry.js +1 -1
  3. package/dist/cjs/gux-action-button.cjs.entry.js +1 -1
  4. package/dist/cjs/gux-action-toast-legacy.cjs.entry.js +1 -1
  5. package/dist/cjs/gux-advanced-dropdown-legacy.cjs.entry.js +1 -1
  6. package/dist/cjs/gux-announce-beta.cjs.entry.js +1 -1
  7. package/dist/cjs/gux-badge.cjs.entry.js +1 -1
  8. package/dist/cjs/gux-blank-state.cjs.entry.js +1 -1
  9. package/dist/cjs/gux-breadcrumb-item.cjs.entry.js +1 -1
  10. package/dist/cjs/gux-breadcrumbs.cjs.entry.js +1 -1
  11. package/dist/cjs/gux-button-multi.cjs.entry.js +1 -1
  12. package/dist/cjs/gux-button-slot.cjs.entry.js +2 -2
  13. package/dist/cjs/gux-button.cjs.entry.js +2 -2
  14. package/dist/cjs/gux-calendar.cjs.entry.js +1 -1
  15. package/dist/cjs/gux-card.cjs.entry.js +1 -1
  16. package/dist/cjs/gux-column-manager.cjs.entry.js +1 -1
  17. package/dist/cjs/gux-content-search.cjs.entry.js +1 -1
  18. package/dist/cjs/gux-context-menu.cjs.entry.js +1 -1
  19. package/dist/cjs/gux-copy-to-clipboard.cjs.entry.js +1 -1
  20. package/dist/cjs/gux-date-beta.cjs.entry.js +1 -1
  21. package/dist/cjs/gux-date-time-beta.cjs.entry.js +1 -1
  22. package/dist/cjs/gux-datepicker.cjs.entry.js +1 -1
  23. package/dist/cjs/gux-disclosure-button-legacy.cjs.entry.js +1 -1
  24. package/dist/cjs/gux-dismiss-button.cjs.entry.js +1 -1
  25. package/dist/cjs/gux-dropdown-multi.cjs.entry.js +1 -1
  26. package/dist/cjs/gux-dropdown_3.cjs.entry.js +1 -1
  27. package/dist/cjs/gux-flyout-menu.cjs.entry.js +72 -38
  28. package/dist/cjs/gux-form-field-checkbox.cjs.entry.js +2 -2
  29. package/dist/cjs/gux-form-field-color.cjs.entry.js +1 -1
  30. package/dist/cjs/gux-form-field-dropdown.cjs.entry.js +1 -1
  31. package/dist/cjs/gux-form-field-input-clear-button.cjs.entry.js +1 -1
  32. package/dist/cjs/gux-form-field-number_3.cjs.entry.js +1 -1
  33. package/dist/cjs/gux-form-field-phone.cjs.entry.js +1 -1
  34. package/dist/cjs/gux-form-field-radio.cjs.entry.js +1 -1
  35. package/dist/cjs/gux-form-field-range.cjs.entry.js +1 -1
  36. package/dist/cjs/gux-form-field-search.cjs.entry.js +1 -1
  37. package/dist/cjs/gux-form-field-select.cjs.entry.js +1 -1
  38. package/dist/cjs/gux-form-field-text-like.cjs.entry.js +1 -1
  39. package/dist/cjs/gux-form-field-textarea.cjs.entry.js +1 -1
  40. package/dist/cjs/gux-form-field-time-picker.cjs.entry.js +1 -1
  41. package/dist/cjs/gux-icon.cjs.entry.js +1 -1
  42. package/dist/cjs/gux-inline-alert.cjs.entry.js +1 -1
  43. package/dist/cjs/gux-list.cjs.entry.js +1 -1
  44. package/dist/cjs/gux-listbox-multi.cjs.entry.js +1 -1
  45. package/dist/cjs/gux-loading-message.cjs.entry.js +1 -1
  46. package/dist/cjs/gux-menu.cjs.entry.js +2 -2
  47. package/dist/cjs/gux-modal.cjs.entry.js +2 -2
  48. package/dist/cjs/gux-month-picker-beta.cjs.entry.js +1 -1
  49. package/dist/cjs/gux-notification-toast-legacy.cjs.entry.js +1 -1
  50. package/dist/cjs/gux-page-loading-spinner.cjs.entry.js +1 -1
  51. package/dist/cjs/gux-pagination-cursor.cjs.entry.js +1 -1
  52. package/dist/cjs/gux-pagination-legacy.cjs.entry.js +1 -1
  53. package/dist/cjs/gux-pagination.cjs.entry.js +1 -1
  54. package/dist/cjs/gux-phone-input-beta.cjs.entry.js +1 -1
  55. package/dist/cjs/gux-popover-list.cjs.entry.js +1 -1
  56. package/dist/cjs/gux-radial-loading.cjs.entry.js +1 -1
  57. package/dist/cjs/gux-radial-progress.cjs.entry.js +1 -1
  58. package/dist/cjs/gux-rating.cjs.entry.js +1 -1
  59. package/dist/cjs/gux-region-icon.cjs.entry.js +1 -1
  60. package/dist/cjs/gux-screen-reader-beta.cjs.entry.js +1 -1
  61. package/dist/cjs/gux-segmented-control-beta.cjs.entry.js +1 -1
  62. package/dist/cjs/gux-simple-toast-legacy.cjs.entry.js +1 -1
  63. package/dist/cjs/gux-skip-navigation-list.cjs.entry.js +1 -1
  64. package/dist/cjs/gux-sort-control.cjs.entry.js +1 -1
  65. package/dist/cjs/gux-submenu.cjs.entry.js +8 -3
  66. package/dist/cjs/gux-switch-legacy.cjs.entry.js +1 -1
  67. package/dist/cjs/gux-tab-advanced-list.cjs.entry.js +3038 -19
  68. package/dist/cjs/gux-table-select-popover.cjs.entry.js +1792 -2
  69. package/dist/cjs/gux-table-toolbar-action.cjs.entry.js +1 -1
  70. package/dist/cjs/gux-table-toolbar-custom-action.cjs.entry.js +1 -1
  71. package/dist/cjs/gux-table-toolbar-menu-button.cjs.entry.js +1 -1
  72. package/dist/cjs/gux-table-toolbar.cjs.entry.js +1 -1
  73. package/dist/cjs/gux-table.cjs.entry.js +1 -1
  74. package/dist/cjs/gux-tabs-advanced.cjs.entry.js +1 -1
  75. package/dist/cjs/gux-tabs.cjs.entry.js +1 -1
  76. package/dist/cjs/gux-tag.cjs.entry.js +1 -1
  77. package/dist/cjs/gux-text-highlight.cjs.entry.js +1 -1
  78. package/dist/cjs/gux-time-beta.cjs.entry.js +1 -1
  79. package/dist/cjs/gux-time-picker.cjs.entry.js +1 -1
  80. package/dist/cjs/gux-time-zone-picker-beta.cjs.entry.js +1 -1
  81. package/dist/cjs/gux-toast.cjs.entry.js +1 -1
  82. package/dist/cjs/gux-toggle.cjs.entry.js +1 -1
  83. package/dist/cjs/gux-tooltip.cjs.entry.js +1 -1
  84. package/dist/cjs/index-39160f18.js +4 -20
  85. package/dist/cjs/loader.cjs.js +1 -1
  86. package/dist/cjs/{usage-dea328c9.js → usage-2ce57ba4.js} +1 -1
  87. package/dist/collection/collection-manifest.json +0 -4
  88. package/dist/collection/components/stable/gux-breadcrumbs/breadcrumb-item/gux-breadcrumb-item.css +31 -31
  89. package/dist/collection/components/stable/gux-button/gux-button.css +4 -4
  90. package/dist/collection/components/stable/gux-button-slot/gux-button-slot.css +4 -4
  91. package/dist/collection/components/stable/gux-flyout-menu/gux-flyout-menu.css +11 -17
  92. package/dist/collection/components/stable/gux-flyout-menu/gux-flyout-menu.js +70 -39
  93. package/dist/collection/components/stable/gux-flyout-menu/gux-menu/gux-menu.css +0 -15
  94. package/dist/collection/components/stable/gux-flyout-menu/gux-menu/gux-menu.js +1 -1
  95. package/dist/collection/components/stable/gux-flyout-menu/gux-menu/gux-submenu/gux-submenu.css +7 -2
  96. package/dist/collection/components/stable/gux-flyout-menu/gux-menu/gux-submenu/gux-submenu.js +8 -3
  97. package/dist/collection/components/stable/gux-form-field/components/gux-form-field-checkbox/gux-form-field-checkbox.css +42 -13
  98. package/dist/collection/components/stable/gux-icon/gux-icon.js +1 -1
  99. package/dist/collection/components/stable/gux-icon/icons/fa/eye-regular.svg +1 -0
  100. package/dist/collection/components/stable/gux-icon/icons/fa/eye-slash-regular.svg +1 -0
  101. package/dist/collection/components/stable/gux-icon/icons/fa/laptop-slash-regular.svg +1 -0
  102. package/dist/collection/components/stable/gux-icon/icons/fa/message-bot-regular.svg +1 -0
  103. package/dist/collection/components/stable/gux-modal/gux-modal.css +1 -1
  104. package/dist/component-specs.json +4 -9
  105. package/dist/deploy-info.json +3 -3
  106. package/dist/esm/genesys-webcomponents.js +1 -1
  107. package/dist/esm/gux-accordion.entry.js +1 -1
  108. package/dist/esm/gux-action-button.entry.js +1 -1
  109. package/dist/esm/gux-action-toast-legacy.entry.js +1 -1
  110. package/dist/esm/gux-advanced-dropdown-legacy.entry.js +1 -1
  111. package/dist/esm/gux-announce-beta.entry.js +1 -1
  112. package/dist/esm/gux-badge.entry.js +1 -1
  113. package/dist/esm/gux-blank-state.entry.js +1 -1
  114. package/dist/esm/gux-breadcrumb-item.entry.js +1 -1
  115. package/dist/esm/gux-breadcrumbs.entry.js +1 -1
  116. package/dist/esm/gux-button-multi.entry.js +1 -1
  117. package/dist/esm/gux-button-slot.entry.js +2 -2
  118. package/dist/esm/gux-button.entry.js +2 -2
  119. package/dist/esm/gux-calendar.entry.js +1 -1
  120. package/dist/esm/gux-card.entry.js +1 -1
  121. package/dist/esm/gux-column-manager.entry.js +1 -1
  122. package/dist/esm/gux-content-search.entry.js +1 -1
  123. package/dist/esm/gux-context-menu.entry.js +1 -1
  124. package/dist/esm/gux-copy-to-clipboard.entry.js +1 -1
  125. package/dist/esm/gux-date-beta.entry.js +1 -1
  126. package/dist/esm/gux-date-time-beta.entry.js +1 -1
  127. package/dist/esm/gux-datepicker.entry.js +1 -1
  128. package/dist/esm/gux-disclosure-button-legacy.entry.js +1 -1
  129. package/dist/esm/gux-dismiss-button.entry.js +1 -1
  130. package/dist/esm/gux-dropdown-multi.entry.js +1 -1
  131. package/dist/esm/gux-dropdown_3.entry.js +1 -1
  132. package/dist/esm/gux-flyout-menu.entry.js +72 -38
  133. package/dist/esm/gux-form-field-checkbox.entry.js +2 -2
  134. package/dist/esm/gux-form-field-color.entry.js +1 -1
  135. package/dist/esm/gux-form-field-dropdown.entry.js +1 -1
  136. package/dist/esm/gux-form-field-input-clear-button.entry.js +1 -1
  137. package/dist/esm/gux-form-field-number_3.entry.js +1 -1
  138. package/dist/esm/gux-form-field-phone.entry.js +1 -1
  139. package/dist/esm/gux-form-field-radio.entry.js +1 -1
  140. package/dist/esm/gux-form-field-range.entry.js +1 -1
  141. package/dist/esm/gux-form-field-search.entry.js +1 -1
  142. package/dist/esm/gux-form-field-select.entry.js +1 -1
  143. package/dist/esm/gux-form-field-text-like.entry.js +1 -1
  144. package/dist/esm/gux-form-field-textarea.entry.js +1 -1
  145. package/dist/esm/gux-form-field-time-picker.entry.js +1 -1
  146. package/dist/esm/gux-icon.entry.js +1 -1
  147. package/dist/esm/gux-inline-alert.entry.js +1 -1
  148. package/dist/esm/gux-list.entry.js +1 -1
  149. package/dist/esm/gux-listbox-multi.entry.js +1 -1
  150. package/dist/esm/gux-loading-message.entry.js +1 -1
  151. package/dist/esm/gux-menu.entry.js +2 -2
  152. package/dist/esm/gux-modal.entry.js +2 -2
  153. package/dist/esm/gux-month-picker-beta.entry.js +1 -1
  154. package/dist/esm/gux-notification-toast-legacy.entry.js +1 -1
  155. package/dist/esm/gux-page-loading-spinner.entry.js +1 -1
  156. package/dist/esm/gux-pagination-cursor.entry.js +1 -1
  157. package/dist/esm/gux-pagination-legacy.entry.js +1 -1
  158. package/dist/esm/gux-pagination.entry.js +1 -1
  159. package/dist/esm/gux-phone-input-beta.entry.js +1 -1
  160. package/dist/esm/gux-popover-list.entry.js +1 -1
  161. package/dist/esm/gux-radial-loading.entry.js +1 -1
  162. package/dist/esm/gux-radial-progress.entry.js +1 -1
  163. package/dist/esm/gux-rating.entry.js +1 -1
  164. package/dist/esm/gux-region-icon.entry.js +1 -1
  165. package/dist/esm/gux-screen-reader-beta.entry.js +1 -1
  166. package/dist/esm/gux-segmented-control-beta.entry.js +1 -1
  167. package/dist/esm/gux-simple-toast-legacy.entry.js +1 -1
  168. package/dist/esm/gux-skip-navigation-list.entry.js +1 -1
  169. package/dist/esm/gux-sort-control.entry.js +1 -1
  170. package/dist/esm/gux-submenu.entry.js +9 -4
  171. package/dist/esm/gux-switch-legacy.entry.js +1 -1
  172. package/dist/esm/gux-tab-advanced-list.entry.js +3020 -1
  173. package/dist/esm/gux-table-select-popover.entry.js +1791 -1
  174. package/dist/esm/gux-table-toolbar-action.entry.js +1 -1
  175. package/dist/esm/gux-table-toolbar-custom-action.entry.js +1 -1
  176. package/dist/esm/gux-table-toolbar-menu-button.entry.js +1 -1
  177. package/dist/esm/gux-table-toolbar.entry.js +1 -1
  178. package/dist/esm/gux-table.entry.js +1 -1
  179. package/dist/esm/gux-tabs-advanced.entry.js +1 -1
  180. package/dist/esm/gux-tabs.entry.js +1 -1
  181. package/dist/esm/gux-tag.entry.js +1 -1
  182. package/dist/esm/gux-text-highlight.entry.js +1 -1
  183. package/dist/esm/gux-time-beta.entry.js +1 -1
  184. package/dist/esm/gux-time-picker.entry.js +1 -1
  185. package/dist/esm/gux-time-zone-picker-beta.entry.js +1 -1
  186. package/dist/esm/gux-toast.entry.js +1 -1
  187. package/dist/esm/gux-toggle.entry.js +1 -1
  188. package/dist/esm/gux-tooltip.entry.js +1 -1
  189. package/dist/esm/index-a0eec33a.js +4 -20
  190. package/dist/esm/loader.js +1 -1
  191. package/dist/esm/{usage-9db89e81.js → usage-b87fd180.js} +1 -1
  192. package/dist/genesys-webcomponents/genesys-webcomponents.css +1 -1
  193. package/dist/genesys-webcomponents/genesys-webcomponents.esm.js +1 -1
  194. package/dist/genesys-webcomponents/i18n/genesys-webcomponents.i18n.en.json +1 -1
  195. package/dist/genesys-webcomponents/icons/fa/eye-regular.svg +1 -0
  196. package/dist/genesys-webcomponents/icons/fa/eye-slash-regular.svg +1 -0
  197. package/dist/genesys-webcomponents/icons/fa/laptop-slash-regular.svg +1 -0
  198. package/dist/genesys-webcomponents/icons/fa/message-bot-regular.svg +1 -0
  199. package/dist/genesys-webcomponents/{p-275190eb.entry.js → p-004e23db.entry.js} +1 -1
  200. package/dist/genesys-webcomponents/{p-82ff960a.entry.js → p-05ef8928.entry.js} +1 -1
  201. package/dist/genesys-webcomponents/{p-aa66df62.entry.js → p-06126ae7.entry.js} +1 -1
  202. package/dist/genesys-webcomponents/{p-bf3640cf.entry.js → p-06a66c14.entry.js} +1 -1
  203. package/dist/genesys-webcomponents/{p-64f97f86.entry.js → p-12328ac7.entry.js} +1 -1
  204. package/dist/genesys-webcomponents/{p-3aa647fd.entry.js → p-13469f27.entry.js} +1 -1
  205. package/dist/genesys-webcomponents/{p-a110a467.entry.js → p-15e2b136.entry.js} +1 -1
  206. package/dist/genesys-webcomponents/{p-53a1d44e.entry.js → p-16e3230c.entry.js} +1 -1
  207. package/dist/genesys-webcomponents/{p-170e10d8.entry.js → p-17a69995.entry.js} +1 -1
  208. package/dist/genesys-webcomponents/{p-48d0d172.entry.js → p-182557c0.entry.js} +1 -1
  209. package/dist/genesys-webcomponents/{p-645bf22d.entry.js → p-1fe5cedc.entry.js} +1 -1
  210. package/dist/genesys-webcomponents/{p-c2352a62.entry.js → p-20fcaa12.entry.js} +1 -1
  211. package/dist/genesys-webcomponents/p-21e688a3.entry.js +1 -0
  212. package/dist/genesys-webcomponents/{p-0e9b22e4.entry.js → p-2730f018.entry.js} +1 -1
  213. package/dist/genesys-webcomponents/{p-77b466cc.entry.js → p-2858df24.entry.js} +1 -1
  214. package/dist/genesys-webcomponents/{p-96a2defd.entry.js → p-28665401.entry.js} +1 -1
  215. package/dist/genesys-webcomponents/{p-04e7b0a5.entry.js → p-2910e18c.entry.js} +1 -1
  216. package/dist/genesys-webcomponents/{p-947008c7.entry.js → p-2ac021cd.entry.js} +1 -1
  217. package/dist/genesys-webcomponents/{p-71ea12be.entry.js → p-2bf6faa3.entry.js} +1 -1
  218. package/dist/genesys-webcomponents/{p-bb8382c8.entry.js → p-2e05dde3.entry.js} +1 -1
  219. package/dist/genesys-webcomponents/p-347abe5b.entry.js +1 -0
  220. package/dist/genesys-webcomponents/{p-8e2f5120.entry.js → p-3a2cebaa.entry.js} +1 -1
  221. package/dist/genesys-webcomponents/{p-f0ad551b.entry.js → p-3cc54e8e.entry.js} +1 -1
  222. package/dist/genesys-webcomponents/{p-80e52443.entry.js → p-3d91f060.entry.js} +1 -1
  223. package/dist/genesys-webcomponents/{p-adecb65e.entry.js → p-43f34ba2.entry.js} +1 -1
  224. package/dist/genesys-webcomponents/{p-20e0415d.entry.js → p-46e1ce79.entry.js} +1 -1
  225. package/dist/genesys-webcomponents/{p-4ef7f5b0.entry.js → p-4c398f43.entry.js} +1 -1
  226. package/dist/genesys-webcomponents/{p-e93b4a73.entry.js → p-4d58d798.entry.js} +1 -1
  227. package/dist/genesys-webcomponents/{p-2c325bd9.entry.js → p-4d5aae91.entry.js} +1 -1
  228. package/dist/genesys-webcomponents/{p-23e0e71f.entry.js → p-4df3d0fa.entry.js} +1 -1
  229. package/dist/genesys-webcomponents/{p-2d2f6a98.entry.js → p-53e47d10.entry.js} +1 -1
  230. package/dist/genesys-webcomponents/{p-7e0bec76.entry.js → p-561a63aa.entry.js} +1 -1
  231. package/dist/genesys-webcomponents/{p-a6dbce60.entry.js → p-575c6d23.entry.js} +1 -1
  232. package/dist/genesys-webcomponents/{p-0fb8a131.entry.js → p-5b4a402d.entry.js} +1 -1
  233. package/dist/genesys-webcomponents/{p-ea3298b3.entry.js → p-6114bb74.entry.js} +1 -1
  234. package/dist/genesys-webcomponents/{p-07abb8df.entry.js → p-633f03b7.entry.js} +1 -1
  235. package/dist/genesys-webcomponents/p-65cf4c58.entry.js +7 -0
  236. package/dist/genesys-webcomponents/{p-22590862.entry.js → p-664266fc.entry.js} +1 -1
  237. package/dist/genesys-webcomponents/{p-3c951a20.entry.js → p-679f1b15.entry.js} +1 -1
  238. package/dist/genesys-webcomponents/p-69153f39.entry.js +1 -0
  239. package/dist/genesys-webcomponents/{p-03c3a43a.entry.js → p-6aee4b77.entry.js} +1 -1
  240. package/dist/genesys-webcomponents/{p-478e3b1c.entry.js → p-6de4fd79.entry.js} +1 -1
  241. package/dist/genesys-webcomponents/{p-74330868.entry.js → p-6ea8918f.entry.js} +1 -1
  242. package/dist/genesys-webcomponents/{p-6c5bcc19.entry.js → p-76d70fe8.entry.js} +1 -1
  243. package/dist/genesys-webcomponents/{p-f1d85fd3.entry.js → p-78a234a5.entry.js} +1 -1
  244. package/dist/genesys-webcomponents/{p-801d58d0.entry.js → p-7bca36b4.entry.js} +1 -1
  245. package/dist/genesys-webcomponents/{p-0443695b.entry.js → p-7c073ff3.entry.js} +1 -1
  246. package/dist/genesys-webcomponents/{p-23fdc919.entry.js → p-81a95b8a.entry.js} +1 -1
  247. package/dist/genesys-webcomponents/{p-e9803c6d.entry.js → p-82fc4cbf.entry.js} +1 -1
  248. package/dist/genesys-webcomponents/{p-cefecb77.entry.js → p-88cff9d7.entry.js} +1 -1
  249. package/dist/genesys-webcomponents/{p-24aaca86.entry.js → p-8d6256cc.entry.js} +1 -1
  250. package/dist/genesys-webcomponents/{p-9b14db2e.entry.js → p-8d8500ef.entry.js} +1 -1
  251. package/dist/genesys-webcomponents/{p-9c7f235d.entry.js → p-8f731a36.entry.js} +1 -1
  252. package/dist/genesys-webcomponents/{p-eba5e8e8.entry.js → p-8fd503b6.entry.js} +1 -1
  253. package/dist/genesys-webcomponents/{p-49fa664f.entry.js → p-91a50e2f.entry.js} +1 -1
  254. package/dist/genesys-webcomponents/{p-2e88df19.entry.js → p-91be3acf.entry.js} +1 -1
  255. package/dist/genesys-webcomponents/{p-75c18eb2.entry.js → p-98cf7f13.entry.js} +1 -1
  256. package/dist/genesys-webcomponents/{p-b4a578d1.entry.js → p-9bf98889.entry.js} +1 -1
  257. package/dist/genesys-webcomponents/p-9d684bc6.entry.js +1 -0
  258. package/dist/genesys-webcomponents/p-a1c693e2.entry.js +1 -0
  259. package/dist/genesys-webcomponents/p-abc49c2f.entry.js +1 -0
  260. package/dist/genesys-webcomponents/{p-7c4e5b42.entry.js → p-ade08f16.entry.js} +1 -1
  261. package/dist/genesys-webcomponents/{p-18901baf.entry.js → p-b5293bdb.entry.js} +1 -1
  262. package/dist/genesys-webcomponents/{p-16101c87.entry.js → p-b8c97d62.entry.js} +1 -1
  263. package/dist/genesys-webcomponents/p-b9bd1aa0.entry.js +1 -0
  264. package/dist/genesys-webcomponents/{p-88ebf763.entry.js → p-c027647a.entry.js} +1 -1
  265. package/dist/genesys-webcomponents/{p-ca39b814.entry.js → p-c39b6dd3.entry.js} +1 -1
  266. package/dist/genesys-webcomponents/{p-9c69a37d.entry.js → p-c56b2a96.entry.js} +1 -1
  267. package/dist/genesys-webcomponents/{p-8897f0c8.entry.js → p-c963637a.entry.js} +1 -1
  268. package/dist/genesys-webcomponents/{p-354af9aa.entry.js → p-ca2bc125.entry.js} +1 -1
  269. package/dist/genesys-webcomponents/{p-7293caff.entry.js → p-ce09a0c1.entry.js} +1 -1
  270. package/dist/genesys-webcomponents/{p-c1253f5b.entry.js → p-ced0ce28.entry.js} +1 -1
  271. package/dist/genesys-webcomponents/{p-6eaaa7d4.entry.js → p-d0913f6c.entry.js} +1 -1
  272. package/dist/genesys-webcomponents/{p-3c614740.js → p-d12602d6.js} +1 -1
  273. package/dist/genesys-webcomponents/{p-b4e0bdda.entry.js → p-d7b3bc8d.entry.js} +1 -1
  274. package/dist/genesys-webcomponents/{p-290db8e8.entry.js → p-e36a3384.entry.js} +1 -1
  275. package/dist/genesys-webcomponents/{p-cae769d3.entry.js → p-e4a50387.entry.js} +1 -1
  276. package/dist/genesys-webcomponents/{p-2339dbe7.entry.js → p-e8ef27c7.entry.js} +1 -1
  277. package/dist/genesys-webcomponents/{p-47417e1a.entry.js → p-ec0814f2.entry.js} +1 -1
  278. package/dist/genesys-webcomponents/{p-b14af97c.entry.js → p-ecfb44b0.entry.js} +1 -1
  279. package/dist/genesys-webcomponents/{p-4303e91c.entry.js → p-f7e75e45.entry.js} +1 -1
  280. package/dist/genesys-webcomponents/{p-581afbbd.entry.js → p-f9c135c9.entry.js} +1 -1
  281. package/dist/genesys-webcomponents/{p-67bf8797.entry.js → p-fb91923a.entry.js} +1 -1
  282. package/dist/stencil-wrapper.js +1 -1
  283. package/dist/types/components/stable/gux-flyout-menu/gux-flyout-menu.d.ts +5 -4
  284. package/dist/types/components/stable/gux-icon/gux-icon.types.d.ts +1 -1
  285. package/dist/types/components.d.ts +0 -132
  286. package/dist/types/stencil-wrapper.d.ts +1 -1
  287. package/package.json +1 -1
  288. package/dist/cjs/en-5507bf0d.js +0 -24
  289. package/dist/cjs/gux-tab-advanced-legacy.cjs.entry.js +0 -157
  290. package/dist/cjs/gux-tab-advanced-list-legacy.cjs.entry.js +0 -470
  291. package/dist/cjs/gux-tab-advanced-panel-legacy.cjs.entry.js +0 -34
  292. package/dist/cjs/gux-tabs-advanced-legacy.cjs.entry.js +0 -63
  293. package/dist/cjs/popper-9a6aec9e.js +0 -1794
  294. package/dist/cjs/sortable.esm-73cf219b.js +0 -3023
  295. package/dist/collection/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced/gux-tab-advanced.css +0 -117
  296. package/dist/collection/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced/gux-tab-advanced.js +0 -320
  297. package/dist/collection/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced-list/gux-tab-advanced-list.css +0 -127
  298. package/dist/collection/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced-list/gux-tab-advanced-list.js +0 -624
  299. package/dist/collection/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced-panel/gux-tab-advanced-panel.css +0 -7
  300. package/dist/collection/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced-panel/gux-tab-advanced-panel.js +0 -107
  301. package/dist/collection/components/legacy/gux-tabs-advanced-legacy/gux-tabs-advanced.css +0 -3
  302. package/dist/collection/components/legacy/gux-tabs-advanced-legacy/gux-tabs-advanced.js +0 -148
  303. package/dist/collection/components/legacy/gux-tabs-advanced-legacy/tests/gux-tabs-advanced.e2e.js +0 -216
  304. package/dist/collection/components/legacy/gux-tabs-advanced-legacy/tests/gux-tabs-advanced.spec.js +0 -73
  305. package/dist/esm/en-b0526f2a.js +0 -22
  306. package/dist/esm/gux-tab-advanced-legacy.entry.js +0 -153
  307. package/dist/esm/gux-tab-advanced-list-legacy.entry.js +0 -466
  308. package/dist/esm/gux-tab-advanced-panel-legacy.entry.js +0 -30
  309. package/dist/esm/gux-tabs-advanced-legacy.entry.js +0 -59
  310. package/dist/esm/popper-1604923e.js +0 -1792
  311. package/dist/esm/sortable.esm-8c3d5856.js +0 -3021
  312. package/dist/genesys-webcomponents/p-0e1a0eef.entry.js +0 -1
  313. package/dist/genesys-webcomponents/p-1486d7ea.js +0 -7
  314. package/dist/genesys-webcomponents/p-2187b61f.entry.js +0 -1
  315. package/dist/genesys-webcomponents/p-38c797a5.entry.js +0 -1
  316. package/dist/genesys-webcomponents/p-5844e8c2.js +0 -1
  317. package/dist/genesys-webcomponents/p-741109b2.entry.js +0 -1
  318. package/dist/genesys-webcomponents/p-77db656b.entry.js +0 -1
  319. package/dist/genesys-webcomponents/p-9cc0c717.entry.js +0 -1
  320. package/dist/genesys-webcomponents/p-b3fd4623.entry.js +0 -1
  321. package/dist/genesys-webcomponents/p-c4a77eda.entry.js +0 -1
  322. package/dist/genesys-webcomponents/p-c7a90b16.entry.js +0 -1
  323. package/dist/genesys-webcomponents/p-c88906c4.entry.js +0 -1
  324. package/dist/genesys-webcomponents/p-e459974a.js +0 -1
  325. package/dist/genesys-webcomponents/p-f34da37c.entry.js +0 -1
  326. package/dist/genesys-webcomponents/p-f3ac7576.entry.js +0 -1
  327. package/dist/types/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced/gux-tab-advanced.d.ts +0 -45
  328. package/dist/types/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced-list/gux-tab-advanced-list.d.ts +0 -82
  329. package/dist/types/components/legacy/gux-tabs-advanced-legacy/gux-tab-advanced-panel/gux-tab-advanced-panel.d.ts +0 -12
  330. package/dist/types/components/legacy/gux-tabs-advanced-legacy/gux-tabs-advanced.d.ts +0 -25
@@ -1,5 +1,4 @@
1
1
  import { r as registerInstance, c as createEvent, d as readTask, w as writeTask, h, g as getElement } from './index-a0eec33a.js';
2
- import { S as Sortable } from './sortable.esm-8c3d5856.js';
3
2
  import { O as OnMutation } from './on-mutation-c1be3c74.js';
4
3
  import { e as eventIsFrom } from './event-is-from-e25c5a22.js';
5
4
  import { a as afterNextRenderTimeout } from './after-next-render-84ec18ad.js';
@@ -7,6 +6,3026 @@ import { b as buildI18nForComponent } from './index-e5ccc024.js';
7
6
  import { t as tabsResources } from './en-bf740e9b.js';
8
7
  import './get-closest-element-66f63212.js';
9
8
 
9
+ /**!
10
+ * Sortable 1.15.0
11
+ * @author RubaXa <trash@rubaxa.org>
12
+ * @author owenm <owen23355@gmail.com>
13
+ * @license MIT
14
+ */
15
+ function ownKeys(object, enumerableOnly) {
16
+ var keys = Object.keys(object);
17
+
18
+ if (Object.getOwnPropertySymbols) {
19
+ var symbols = Object.getOwnPropertySymbols(object);
20
+
21
+ if (enumerableOnly) {
22
+ symbols = symbols.filter(function (sym) {
23
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
24
+ });
25
+ }
26
+
27
+ keys.push.apply(keys, symbols);
28
+ }
29
+
30
+ return keys;
31
+ }
32
+
33
+ function _objectSpread2(target) {
34
+ for (var i = 1; i < arguments.length; i++) {
35
+ var source = arguments[i] != null ? arguments[i] : {};
36
+
37
+ if (i % 2) {
38
+ ownKeys(Object(source), true).forEach(function (key) {
39
+ _defineProperty(target, key, source[key]);
40
+ });
41
+ } else if (Object.getOwnPropertyDescriptors) {
42
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
43
+ } else {
44
+ ownKeys(Object(source)).forEach(function (key) {
45
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
46
+ });
47
+ }
48
+ }
49
+
50
+ return target;
51
+ }
52
+
53
+ function _typeof(obj) {
54
+ "@babel/helpers - typeof";
55
+
56
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
57
+ _typeof = function (obj) {
58
+ return typeof obj;
59
+ };
60
+ } else {
61
+ _typeof = function (obj) {
62
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
63
+ };
64
+ }
65
+
66
+ return _typeof(obj);
67
+ }
68
+
69
+ function _defineProperty(obj, key, value) {
70
+ if (key in obj) {
71
+ Object.defineProperty(obj, key, {
72
+ value: value,
73
+ enumerable: true,
74
+ configurable: true,
75
+ writable: true
76
+ });
77
+ } else {
78
+ obj[key] = value;
79
+ }
80
+
81
+ return obj;
82
+ }
83
+
84
+ function _extends() {
85
+ _extends = Object.assign || function (target) {
86
+ for (var i = 1; i < arguments.length; i++) {
87
+ var source = arguments[i];
88
+
89
+ for (var key in source) {
90
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
91
+ target[key] = source[key];
92
+ }
93
+ }
94
+ }
95
+
96
+ return target;
97
+ };
98
+
99
+ return _extends.apply(this, arguments);
100
+ }
101
+
102
+ function _objectWithoutPropertiesLoose(source, excluded) {
103
+ if (source == null) return {};
104
+ var target = {};
105
+ var sourceKeys = Object.keys(source);
106
+ var key, i;
107
+
108
+ for (i = 0; i < sourceKeys.length; i++) {
109
+ key = sourceKeys[i];
110
+ if (excluded.indexOf(key) >= 0) continue;
111
+ target[key] = source[key];
112
+ }
113
+
114
+ return target;
115
+ }
116
+
117
+ function _objectWithoutProperties(source, excluded) {
118
+ if (source == null) return {};
119
+
120
+ var target = _objectWithoutPropertiesLoose(source, excluded);
121
+
122
+ var key, i;
123
+
124
+ if (Object.getOwnPropertySymbols) {
125
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
126
+
127
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
128
+ key = sourceSymbolKeys[i];
129
+ if (excluded.indexOf(key) >= 0) continue;
130
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
131
+ target[key] = source[key];
132
+ }
133
+ }
134
+
135
+ return target;
136
+ }
137
+
138
+ var version = "1.15.0";
139
+
140
+ function userAgent(pattern) {
141
+ if (typeof window !== 'undefined' && window.navigator) {
142
+ return !! /*@__PURE__*/navigator.userAgent.match(pattern);
143
+ }
144
+ }
145
+
146
+ var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);
147
+ var Edge = userAgent(/Edge/i);
148
+ var FireFox = userAgent(/firefox/i);
149
+ var Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);
150
+ var IOS = userAgent(/iP(ad|od|hone)/i);
151
+ var ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);
152
+
153
+ var captureMode = {
154
+ capture: false,
155
+ passive: false
156
+ };
157
+
158
+ function on(el, event, fn) {
159
+ el.addEventListener(event, fn, !IE11OrLess && captureMode);
160
+ }
161
+
162
+ function off(el, event, fn) {
163
+ el.removeEventListener(event, fn, !IE11OrLess && captureMode);
164
+ }
165
+
166
+ function matches(
167
+ /**HTMLElement*/
168
+ el,
169
+ /**String*/
170
+ selector) {
171
+ if (!selector) return;
172
+ selector[0] === '>' && (selector = selector.substring(1));
173
+
174
+ if (el) {
175
+ try {
176
+ if (el.matches) {
177
+ return el.matches(selector);
178
+ } else if (el.msMatchesSelector) {
179
+ return el.msMatchesSelector(selector);
180
+ } else if (el.webkitMatchesSelector) {
181
+ return el.webkitMatchesSelector(selector);
182
+ }
183
+ } catch (_) {
184
+ return false;
185
+ }
186
+ }
187
+
188
+ return false;
189
+ }
190
+
191
+ function getParentOrHost(el) {
192
+ return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;
193
+ }
194
+
195
+ function closest(
196
+ /**HTMLElement*/
197
+ el,
198
+ /**String*/
199
+ selector,
200
+ /**HTMLElement*/
201
+ ctx, includeCTX) {
202
+ if (el) {
203
+ ctx = ctx || document;
204
+
205
+ do {
206
+ if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {
207
+ return el;
208
+ }
209
+
210
+ if (el === ctx) break;
211
+ /* jshint boss:true */
212
+ } while (el = getParentOrHost(el));
213
+ }
214
+
215
+ return null;
216
+ }
217
+
218
+ var R_SPACE = /\s+/g;
219
+
220
+ function toggleClass(el, name, state) {
221
+ if (el && name) {
222
+ if (el.classList) {
223
+ el.classList[state ? 'add' : 'remove'](name);
224
+ } else {
225
+ var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');
226
+ el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');
227
+ }
228
+ }
229
+ }
230
+
231
+ function css(el, prop, val) {
232
+ var style = el && el.style;
233
+
234
+ if (style) {
235
+ if (val === void 0) {
236
+ if (document.defaultView && document.defaultView.getComputedStyle) {
237
+ val = document.defaultView.getComputedStyle(el, '');
238
+ } else if (el.currentStyle) {
239
+ val = el.currentStyle;
240
+ }
241
+
242
+ return prop === void 0 ? val : val[prop];
243
+ } else {
244
+ if (!(prop in style) && prop.indexOf('webkit') === -1) {
245
+ prop = '-webkit-' + prop;
246
+ }
247
+
248
+ style[prop] = val + (typeof val === 'string' ? '' : 'px');
249
+ }
250
+ }
251
+ }
252
+
253
+ function matrix(el, selfOnly) {
254
+ var appliedTransforms = '';
255
+
256
+ if (typeof el === 'string') {
257
+ appliedTransforms = el;
258
+ } else {
259
+ do {
260
+ var transform = css(el, 'transform');
261
+
262
+ if (transform && transform !== 'none') {
263
+ appliedTransforms = transform + ' ' + appliedTransforms;
264
+ }
265
+ /* jshint boss:true */
266
+
267
+ } while (!selfOnly && (el = el.parentNode));
268
+ }
269
+
270
+ var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
271
+ /*jshint -W056 */
272
+
273
+ return matrixFn && new matrixFn(appliedTransforms);
274
+ }
275
+
276
+ function find(ctx, tagName, iterator) {
277
+ if (ctx) {
278
+ var list = ctx.getElementsByTagName(tagName),
279
+ i = 0,
280
+ n = list.length;
281
+
282
+ if (iterator) {
283
+ for (; i < n; i++) {
284
+ iterator(list[i], i);
285
+ }
286
+ }
287
+
288
+ return list;
289
+ }
290
+
291
+ return [];
292
+ }
293
+
294
+ function getWindowScrollingElement() {
295
+ var scrollingElement = document.scrollingElement;
296
+
297
+ if (scrollingElement) {
298
+ return scrollingElement;
299
+ } else {
300
+ return document.documentElement;
301
+ }
302
+ }
303
+ /**
304
+ * Returns the "bounding client rect" of given element
305
+ * @param {HTMLElement} el The element whose boundingClientRect is wanted
306
+ * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container
307
+ * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr
308
+ * @param {[Boolean]} undoScale Whether the container's scale() should be undone
309
+ * @param {[HTMLElement]} container The parent the element will be placed in
310
+ * @return {Object} The boundingClientRect of el, with specified adjustments
311
+ */
312
+
313
+
314
+ function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {
315
+ if (!el.getBoundingClientRect && el !== window) return;
316
+ var elRect, top, left, bottom, right, height, width;
317
+
318
+ if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {
319
+ elRect = el.getBoundingClientRect();
320
+ top = elRect.top;
321
+ left = elRect.left;
322
+ bottom = elRect.bottom;
323
+ right = elRect.right;
324
+ height = elRect.height;
325
+ width = elRect.width;
326
+ } else {
327
+ top = 0;
328
+ left = 0;
329
+ bottom = window.innerHeight;
330
+ right = window.innerWidth;
331
+ height = window.innerHeight;
332
+ width = window.innerWidth;
333
+ }
334
+
335
+ if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {
336
+ // Adjust for translate()
337
+ container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)
338
+ // Not needed on <= IE11
339
+
340
+ if (!IE11OrLess) {
341
+ do {
342
+ if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {
343
+ var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container
344
+
345
+ top -= containerRect.top + parseInt(css(container, 'border-top-width'));
346
+ left -= containerRect.left + parseInt(css(container, 'border-left-width'));
347
+ bottom = top + elRect.height;
348
+ right = left + elRect.width;
349
+ break;
350
+ }
351
+ /* jshint boss:true */
352
+
353
+ } while (container = container.parentNode);
354
+ }
355
+ }
356
+
357
+ if (undoScale && el !== window) {
358
+ // Adjust for scale()
359
+ var elMatrix = matrix(container || el),
360
+ scaleX = elMatrix && elMatrix.a,
361
+ scaleY = elMatrix && elMatrix.d;
362
+
363
+ if (elMatrix) {
364
+ top /= scaleY;
365
+ left /= scaleX;
366
+ width /= scaleX;
367
+ height /= scaleY;
368
+ bottom = top + height;
369
+ right = left + width;
370
+ }
371
+ }
372
+
373
+ return {
374
+ top: top,
375
+ left: left,
376
+ bottom: bottom,
377
+ right: right,
378
+ width: width,
379
+ height: height
380
+ };
381
+ }
382
+ /**
383
+ * Checks if a side of an element is scrolled past a side of its parents
384
+ * @param {HTMLElement} el The element who's side being scrolled out of view is in question
385
+ * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')
386
+ * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')
387
+ * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element
388
+ */
389
+
390
+
391
+ function isScrolledPast(el, elSide, parentSide) {
392
+ var parent = getParentAutoScrollElement(el, true),
393
+ elSideVal = getRect(el)[elSide];
394
+ /* jshint boss:true */
395
+
396
+ while (parent) {
397
+ var parentSideVal = getRect(parent)[parentSide],
398
+ visible = void 0;
399
+
400
+ if (parentSide === 'top' || parentSide === 'left') {
401
+ visible = elSideVal >= parentSideVal;
402
+ } else {
403
+ visible = elSideVal <= parentSideVal;
404
+ }
405
+
406
+ if (!visible) return parent;
407
+ if (parent === getWindowScrollingElement()) break;
408
+ parent = getParentAutoScrollElement(parent, false);
409
+ }
410
+
411
+ return false;
412
+ }
413
+ /**
414
+ * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)
415
+ * and non-draggable elements
416
+ * @param {HTMLElement} el The parent element
417
+ * @param {Number} childNum The index of the child
418
+ * @param {Object} options Parent Sortable's options
419
+ * @return {HTMLElement} The child at index childNum, or null if not found
420
+ */
421
+
422
+
423
+ function getChild(el, childNum, options, includeDragEl) {
424
+ var currentChild = 0,
425
+ i = 0,
426
+ children = el.children;
427
+
428
+ while (i < children.length) {
429
+ if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {
430
+ if (currentChild === childNum) {
431
+ return children[i];
432
+ }
433
+
434
+ currentChild++;
435
+ }
436
+
437
+ i++;
438
+ }
439
+
440
+ return null;
441
+ }
442
+ /**
443
+ * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)
444
+ * @param {HTMLElement} el Parent element
445
+ * @param {selector} selector Any other elements that should be ignored
446
+ * @return {HTMLElement} The last child, ignoring ghostEl
447
+ */
448
+
449
+
450
+ function lastChild(el, selector) {
451
+ var last = el.lastElementChild;
452
+
453
+ while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {
454
+ last = last.previousElementSibling;
455
+ }
456
+
457
+ return last || null;
458
+ }
459
+ /**
460
+ * Returns the index of an element within its parent for a selected set of
461
+ * elements
462
+ * @param {HTMLElement} el
463
+ * @param {selector} selector
464
+ * @return {number}
465
+ */
466
+
467
+
468
+ function index(el, selector) {
469
+ var index = 0;
470
+
471
+ if (!el || !el.parentNode) {
472
+ return -1;
473
+ }
474
+ /* jshint boss:true */
475
+
476
+
477
+ while (el = el.previousElementSibling) {
478
+ if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {
479
+ index++;
480
+ }
481
+ }
482
+
483
+ return index;
484
+ }
485
+ /**
486
+ * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.
487
+ * The value is returned in real pixels.
488
+ * @param {HTMLElement} el
489
+ * @return {Array} Offsets in the format of [left, top]
490
+ */
491
+
492
+
493
+ function getRelativeScrollOffset(el) {
494
+ var offsetLeft = 0,
495
+ offsetTop = 0,
496
+ winScroller = getWindowScrollingElement();
497
+
498
+ if (el) {
499
+ do {
500
+ var elMatrix = matrix(el),
501
+ scaleX = elMatrix.a,
502
+ scaleY = elMatrix.d;
503
+ offsetLeft += el.scrollLeft * scaleX;
504
+ offsetTop += el.scrollTop * scaleY;
505
+ } while (el !== winScroller && (el = el.parentNode));
506
+ }
507
+
508
+ return [offsetLeft, offsetTop];
509
+ }
510
+ /**
511
+ * Returns the index of the object within the given array
512
+ * @param {Array} arr Array that may or may not hold the object
513
+ * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find
514
+ * @return {Number} The index of the object in the array, or -1
515
+ */
516
+
517
+
518
+ function indexOfObject(arr, obj) {
519
+ for (var i in arr) {
520
+ if (!arr.hasOwnProperty(i)) continue;
521
+
522
+ for (var key in obj) {
523
+ if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);
524
+ }
525
+ }
526
+
527
+ return -1;
528
+ }
529
+
530
+ function getParentAutoScrollElement(el, includeSelf) {
531
+ // skip to window
532
+ if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();
533
+ var elem = el;
534
+ var gotSelf = false;
535
+
536
+ do {
537
+ // we don't need to get elem css if it isn't even overflowing in the first place (performance)
538
+ if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {
539
+ var elemCSS = css(elem);
540
+
541
+ if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {
542
+ if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();
543
+ if (gotSelf || includeSelf) return elem;
544
+ gotSelf = true;
545
+ }
546
+ }
547
+ /* jshint boss:true */
548
+
549
+ } while (elem = elem.parentNode);
550
+
551
+ return getWindowScrollingElement();
552
+ }
553
+
554
+ function extend(dst, src) {
555
+ if (dst && src) {
556
+ for (var key in src) {
557
+ if (src.hasOwnProperty(key)) {
558
+ dst[key] = src[key];
559
+ }
560
+ }
561
+ }
562
+
563
+ return dst;
564
+ }
565
+
566
+ function isRectEqual(rect1, rect2) {
567
+ return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);
568
+ }
569
+
570
+ var _throttleTimeout;
571
+
572
+ function throttle(callback, ms) {
573
+ return function () {
574
+ if (!_throttleTimeout) {
575
+ var args = arguments,
576
+ _this = this;
577
+
578
+ if (args.length === 1) {
579
+ callback.call(_this, args[0]);
580
+ } else {
581
+ callback.apply(_this, args);
582
+ }
583
+
584
+ _throttleTimeout = setTimeout(function () {
585
+ _throttleTimeout = void 0;
586
+ }, ms);
587
+ }
588
+ };
589
+ }
590
+
591
+ function cancelThrottle() {
592
+ clearTimeout(_throttleTimeout);
593
+ _throttleTimeout = void 0;
594
+ }
595
+
596
+ function scrollBy(el, x, y) {
597
+ el.scrollLeft += x;
598
+ el.scrollTop += y;
599
+ }
600
+
601
+ function clone(el) {
602
+ var Polymer = window.Polymer;
603
+ var $ = window.jQuery || window.Zepto;
604
+
605
+ if (Polymer && Polymer.dom) {
606
+ return Polymer.dom(el).cloneNode(true);
607
+ } else if ($) {
608
+ return $(el).clone(true)[0];
609
+ } else {
610
+ return el.cloneNode(true);
611
+ }
612
+ }
613
+
614
+ var expando = 'Sortable' + new Date().getTime();
615
+
616
+ function AnimationStateManager() {
617
+ var animationStates = [],
618
+ animationCallbackId;
619
+ return {
620
+ captureAnimationState: function captureAnimationState() {
621
+ animationStates = [];
622
+ if (!this.options.animation) return;
623
+ var children = [].slice.call(this.el.children);
624
+ children.forEach(function (child) {
625
+ if (css(child, 'display') === 'none' || child === Sortable.ghost) return;
626
+ animationStates.push({
627
+ target: child,
628
+ rect: getRect(child)
629
+ });
630
+
631
+ var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation
632
+
633
+
634
+ if (child.thisAnimationDuration) {
635
+ var childMatrix = matrix(child, true);
636
+
637
+ if (childMatrix) {
638
+ fromRect.top -= childMatrix.f;
639
+ fromRect.left -= childMatrix.e;
640
+ }
641
+ }
642
+
643
+ child.fromRect = fromRect;
644
+ });
645
+ },
646
+ addAnimationState: function addAnimationState(state) {
647
+ animationStates.push(state);
648
+ },
649
+ removeAnimationState: function removeAnimationState(target) {
650
+ animationStates.splice(indexOfObject(animationStates, {
651
+ target: target
652
+ }), 1);
653
+ },
654
+ animateAll: function animateAll(callback) {
655
+ var _this = this;
656
+
657
+ if (!this.options.animation) {
658
+ clearTimeout(animationCallbackId);
659
+ if (typeof callback === 'function') callback();
660
+ return;
661
+ }
662
+
663
+ var animating = false,
664
+ animationTime = 0;
665
+ animationStates.forEach(function (state) {
666
+ var time = 0,
667
+ target = state.target,
668
+ fromRect = target.fromRect,
669
+ toRect = getRect(target),
670
+ prevFromRect = target.prevFromRect,
671
+ prevToRect = target.prevToRect,
672
+ animatingRect = state.rect,
673
+ targetMatrix = matrix(target, true);
674
+
675
+ if (targetMatrix) {
676
+ // Compensate for current animation
677
+ toRect.top -= targetMatrix.f;
678
+ toRect.left -= targetMatrix.e;
679
+ }
680
+
681
+ target.toRect = toRect;
682
+
683
+ if (target.thisAnimationDuration) {
684
+ // Could also check if animatingRect is between fromRect and toRect
685
+ if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect
686
+ (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {
687
+ // If returning to same place as started from animation and on same axis
688
+ time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);
689
+ }
690
+ } // if fromRect != toRect: animate
691
+
692
+
693
+ if (!isRectEqual(toRect, fromRect)) {
694
+ target.prevFromRect = fromRect;
695
+ target.prevToRect = toRect;
696
+
697
+ if (!time) {
698
+ time = _this.options.animation;
699
+ }
700
+
701
+ _this.animate(target, animatingRect, toRect, time);
702
+ }
703
+
704
+ if (time) {
705
+ animating = true;
706
+ animationTime = Math.max(animationTime, time);
707
+ clearTimeout(target.animationResetTimer);
708
+ target.animationResetTimer = setTimeout(function () {
709
+ target.animationTime = 0;
710
+ target.prevFromRect = null;
711
+ target.fromRect = null;
712
+ target.prevToRect = null;
713
+ target.thisAnimationDuration = null;
714
+ }, time);
715
+ target.thisAnimationDuration = time;
716
+ }
717
+ });
718
+ clearTimeout(animationCallbackId);
719
+
720
+ if (!animating) {
721
+ if (typeof callback === 'function') callback();
722
+ } else {
723
+ animationCallbackId = setTimeout(function () {
724
+ if (typeof callback === 'function') callback();
725
+ }, animationTime);
726
+ }
727
+
728
+ animationStates = [];
729
+ },
730
+ animate: function animate(target, currentRect, toRect, duration) {
731
+ if (duration) {
732
+ css(target, 'transition', '');
733
+ css(target, 'transform', '');
734
+ var elMatrix = matrix(this.el),
735
+ scaleX = elMatrix && elMatrix.a,
736
+ scaleY = elMatrix && elMatrix.d,
737
+ translateX = (currentRect.left - toRect.left) / (scaleX || 1),
738
+ translateY = (currentRect.top - toRect.top) / (scaleY || 1);
739
+ target.animatingX = !!translateX;
740
+ target.animatingY = !!translateY;
741
+ css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');
742
+ this.forRepaintDummy = repaint(target); // repaint
743
+
744
+ css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));
745
+ css(target, 'transform', 'translate3d(0,0,0)');
746
+ typeof target.animated === 'number' && clearTimeout(target.animated);
747
+ target.animated = setTimeout(function () {
748
+ css(target, 'transition', '');
749
+ css(target, 'transform', '');
750
+ target.animated = false;
751
+ target.animatingX = false;
752
+ target.animatingY = false;
753
+ }, duration);
754
+ }
755
+ }
756
+ };
757
+ }
758
+
759
+ function repaint(target) {
760
+ return target.offsetWidth;
761
+ }
762
+
763
+ function calculateRealTime(animatingRect, fromRect, toRect, options) {
764
+ return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;
765
+ }
766
+
767
+ var plugins = [];
768
+ var defaults = {
769
+ initializeByDefault: true
770
+ };
771
+ var PluginManager = {
772
+ mount: function mount(plugin) {
773
+ // Set default static properties
774
+ for (var option in defaults) {
775
+ if (defaults.hasOwnProperty(option) && !(option in plugin)) {
776
+ plugin[option] = defaults[option];
777
+ }
778
+ }
779
+
780
+ plugins.forEach(function (p) {
781
+ if (p.pluginName === plugin.pluginName) {
782
+ throw "Sortable: Cannot mount plugin ".concat(plugin.pluginName, " more than once");
783
+ }
784
+ });
785
+ plugins.push(plugin);
786
+ },
787
+ pluginEvent: function pluginEvent(eventName, sortable, evt) {
788
+ var _this = this;
789
+
790
+ this.eventCanceled = false;
791
+
792
+ evt.cancel = function () {
793
+ _this.eventCanceled = true;
794
+ };
795
+
796
+ var eventNameGlobal = eventName + 'Global';
797
+ plugins.forEach(function (plugin) {
798
+ if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable
799
+
800
+ if (sortable[plugin.pluginName][eventNameGlobal]) {
801
+ sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({
802
+ sortable: sortable
803
+ }, evt));
804
+ } // Only fire plugin event if plugin is enabled in this sortable,
805
+ // and plugin has event defined
806
+
807
+
808
+ if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {
809
+ sortable[plugin.pluginName][eventName](_objectSpread2({
810
+ sortable: sortable
811
+ }, evt));
812
+ }
813
+ });
814
+ },
815
+ initializePlugins: function initializePlugins(sortable, el, defaults, options) {
816
+ plugins.forEach(function (plugin) {
817
+ var pluginName = plugin.pluginName;
818
+ if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;
819
+ var initialized = new plugin(sortable, el, sortable.options);
820
+ initialized.sortable = sortable;
821
+ initialized.options = sortable.options;
822
+ sortable[pluginName] = initialized; // Add default options from plugin
823
+
824
+ _extends(defaults, initialized.defaults);
825
+ });
826
+
827
+ for (var option in sortable.options) {
828
+ if (!sortable.options.hasOwnProperty(option)) continue;
829
+ var modified = this.modifyOption(sortable, option, sortable.options[option]);
830
+
831
+ if (typeof modified !== 'undefined') {
832
+ sortable.options[option] = modified;
833
+ }
834
+ }
835
+ },
836
+ getEventProperties: function getEventProperties(name, sortable) {
837
+ var eventProperties = {};
838
+ plugins.forEach(function (plugin) {
839
+ if (typeof plugin.eventProperties !== 'function') return;
840
+
841
+ _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));
842
+ });
843
+ return eventProperties;
844
+ },
845
+ modifyOption: function modifyOption(sortable, name, value) {
846
+ var modifiedValue;
847
+ plugins.forEach(function (plugin) {
848
+ // Plugin must exist on the Sortable
849
+ if (!sortable[plugin.pluginName]) return; // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin
850
+
851
+ if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {
852
+ modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);
853
+ }
854
+ });
855
+ return modifiedValue;
856
+ }
857
+ };
858
+
859
+ function dispatchEvent(_ref) {
860
+ var sortable = _ref.sortable,
861
+ rootEl = _ref.rootEl,
862
+ name = _ref.name,
863
+ targetEl = _ref.targetEl,
864
+ cloneEl = _ref.cloneEl,
865
+ toEl = _ref.toEl,
866
+ fromEl = _ref.fromEl,
867
+ oldIndex = _ref.oldIndex,
868
+ newIndex = _ref.newIndex,
869
+ oldDraggableIndex = _ref.oldDraggableIndex,
870
+ newDraggableIndex = _ref.newDraggableIndex,
871
+ originalEvent = _ref.originalEvent,
872
+ putSortable = _ref.putSortable,
873
+ extraEventProperties = _ref.extraEventProperties;
874
+ sortable = sortable || rootEl && rootEl[expando];
875
+ if (!sortable) return;
876
+ var evt,
877
+ options = sortable.options,
878
+ onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature
879
+
880
+ if (window.CustomEvent && !IE11OrLess && !Edge) {
881
+ evt = new CustomEvent(name, {
882
+ bubbles: true,
883
+ cancelable: true
884
+ });
885
+ } else {
886
+ evt = document.createEvent('Event');
887
+ evt.initEvent(name, true, true);
888
+ }
889
+
890
+ evt.to = toEl || rootEl;
891
+ evt.from = fromEl || rootEl;
892
+ evt.item = targetEl || rootEl;
893
+ evt.clone = cloneEl;
894
+ evt.oldIndex = oldIndex;
895
+ evt.newIndex = newIndex;
896
+ evt.oldDraggableIndex = oldDraggableIndex;
897
+ evt.newDraggableIndex = newDraggableIndex;
898
+ evt.originalEvent = originalEvent;
899
+ evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;
900
+
901
+ var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));
902
+
903
+ for (var option in allEventProperties) {
904
+ evt[option] = allEventProperties[option];
905
+ }
906
+
907
+ if (rootEl) {
908
+ rootEl.dispatchEvent(evt);
909
+ }
910
+
911
+ if (options[onName]) {
912
+ options[onName].call(sortable, evt);
913
+ }
914
+ }
915
+
916
+ var _excluded = ["evt"];
917
+
918
+ var pluginEvent = function pluginEvent(eventName, sortable) {
919
+ var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
920
+ originalEvent = _ref.evt,
921
+ data = _objectWithoutProperties(_ref, _excluded);
922
+
923
+ PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({
924
+ dragEl: dragEl,
925
+ parentEl: parentEl,
926
+ ghostEl: ghostEl,
927
+ rootEl: rootEl,
928
+ nextEl: nextEl,
929
+ lastDownEl: lastDownEl,
930
+ cloneEl: cloneEl,
931
+ cloneHidden: cloneHidden,
932
+ dragStarted: moved,
933
+ putSortable: putSortable,
934
+ activeSortable: Sortable.active,
935
+ originalEvent: originalEvent,
936
+ oldIndex: oldIndex,
937
+ oldDraggableIndex: oldDraggableIndex,
938
+ newIndex: newIndex,
939
+ newDraggableIndex: newDraggableIndex,
940
+ hideGhostForTarget: _hideGhostForTarget,
941
+ unhideGhostForTarget: _unhideGhostForTarget,
942
+ cloneNowHidden: function cloneNowHidden() {
943
+ cloneHidden = true;
944
+ },
945
+ cloneNowShown: function cloneNowShown() {
946
+ cloneHidden = false;
947
+ },
948
+ dispatchSortableEvent: function dispatchSortableEvent(name) {
949
+ _dispatchEvent({
950
+ sortable: sortable,
951
+ name: name,
952
+ originalEvent: originalEvent
953
+ });
954
+ }
955
+ }, data));
956
+ };
957
+
958
+ function _dispatchEvent(info) {
959
+ dispatchEvent(_objectSpread2({
960
+ putSortable: putSortable,
961
+ cloneEl: cloneEl,
962
+ targetEl: dragEl,
963
+ rootEl: rootEl,
964
+ oldIndex: oldIndex,
965
+ oldDraggableIndex: oldDraggableIndex,
966
+ newIndex: newIndex,
967
+ newDraggableIndex: newDraggableIndex
968
+ }, info));
969
+ }
970
+
971
+ var dragEl,
972
+ parentEl,
973
+ ghostEl,
974
+ rootEl,
975
+ nextEl,
976
+ lastDownEl,
977
+ cloneEl,
978
+ cloneHidden,
979
+ oldIndex,
980
+ newIndex,
981
+ oldDraggableIndex,
982
+ newDraggableIndex,
983
+ activeGroup,
984
+ putSortable,
985
+ awaitingDragStarted = false,
986
+ ignoreNextClick = false,
987
+ sortables = [],
988
+ tapEvt,
989
+ touchEvt,
990
+ lastDx,
991
+ lastDy,
992
+ tapDistanceLeft,
993
+ tapDistanceTop,
994
+ moved,
995
+ lastTarget,
996
+ lastDirection,
997
+ pastFirstInvertThresh = false,
998
+ isCircumstantialInvert = false,
999
+ targetMoveDistance,
1000
+ // For positioning ghost absolutely
1001
+ ghostRelativeParent,
1002
+ ghostRelativeParentInitialScroll = [],
1003
+ // (left, top)
1004
+ _silent = false,
1005
+ savedInputChecked = [];
1006
+ /** @const */
1007
+
1008
+ var documentExists = typeof document !== 'undefined',
1009
+ PositionGhostAbsolutely = IOS,
1010
+ CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',
1011
+ // This will not pass for IE9, because IE9 DnD only works on anchors
1012
+ supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),
1013
+ supportCssPointerEvents = function () {
1014
+ if (!documentExists) return; // false when <= IE11
1015
+
1016
+ if (IE11OrLess) {
1017
+ return false;
1018
+ }
1019
+
1020
+ var el = document.createElement('x');
1021
+ el.style.cssText = 'pointer-events:auto';
1022
+ return el.style.pointerEvents === 'auto';
1023
+ }(),
1024
+ _detectDirection = function _detectDirection(el, options) {
1025
+ var elCSS = css(el),
1026
+ elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),
1027
+ child1 = getChild(el, 0, options),
1028
+ child2 = getChild(el, 1, options),
1029
+ firstChildCSS = child1 && css(child1),
1030
+ secondChildCSS = child2 && css(child2),
1031
+ firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,
1032
+ secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;
1033
+
1034
+ if (elCSS.display === 'flex') {
1035
+ return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';
1036
+ }
1037
+
1038
+ if (elCSS.display === 'grid') {
1039
+ return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';
1040
+ }
1041
+
1042
+ if (child1 && firstChildCSS["float"] && firstChildCSS["float"] !== 'none') {
1043
+ var touchingSideChild2 = firstChildCSS["float"] === 'left' ? 'left' : 'right';
1044
+ return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';
1045
+ }
1046
+
1047
+ return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';
1048
+ },
1049
+ _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {
1050
+ var dragElS1Opp = vertical ? dragRect.left : dragRect.top,
1051
+ dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,
1052
+ dragElOppLength = vertical ? dragRect.width : dragRect.height,
1053
+ targetS1Opp = vertical ? targetRect.left : targetRect.top,
1054
+ targetS2Opp = vertical ? targetRect.right : targetRect.bottom,
1055
+ targetOppLength = vertical ? targetRect.width : targetRect.height;
1056
+ return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;
1057
+ },
1058
+
1059
+ /**
1060
+ * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.
1061
+ * @param {Number} x X position
1062
+ * @param {Number} y Y position
1063
+ * @return {HTMLElement} Element of the first found nearest Sortable
1064
+ */
1065
+ _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {
1066
+ var ret;
1067
+ sortables.some(function (sortable) {
1068
+ var threshold = sortable[expando].options.emptyInsertThreshold;
1069
+ if (!threshold || lastChild(sortable)) return;
1070
+ var rect = getRect(sortable),
1071
+ insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,
1072
+ insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;
1073
+
1074
+ if (insideHorizontally && insideVertically) {
1075
+ return ret = sortable;
1076
+ }
1077
+ });
1078
+ return ret;
1079
+ },
1080
+ _prepareGroup = function _prepareGroup(options) {
1081
+ function toFn(value, pull) {
1082
+ return function (to, from, dragEl, evt) {
1083
+ var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;
1084
+
1085
+ if (value == null && (pull || sameGroup)) {
1086
+ // Default pull value
1087
+ // Default pull and put value if same group
1088
+ return true;
1089
+ } else if (value == null || value === false) {
1090
+ return false;
1091
+ } else if (pull && value === 'clone') {
1092
+ return value;
1093
+ } else if (typeof value === 'function') {
1094
+ return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);
1095
+ } else {
1096
+ var otherGroup = (pull ? to : from).options.group.name;
1097
+ return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;
1098
+ }
1099
+ };
1100
+ }
1101
+
1102
+ var group = {};
1103
+ var originalGroup = options.group;
1104
+
1105
+ if (!originalGroup || _typeof(originalGroup) != 'object') {
1106
+ originalGroup = {
1107
+ name: originalGroup
1108
+ };
1109
+ }
1110
+
1111
+ group.name = originalGroup.name;
1112
+ group.checkPull = toFn(originalGroup.pull, true);
1113
+ group.checkPut = toFn(originalGroup.put);
1114
+ group.revertClone = originalGroup.revertClone;
1115
+ options.group = group;
1116
+ },
1117
+ _hideGhostForTarget = function _hideGhostForTarget() {
1118
+ if (!supportCssPointerEvents && ghostEl) {
1119
+ css(ghostEl, 'display', 'none');
1120
+ }
1121
+ },
1122
+ _unhideGhostForTarget = function _unhideGhostForTarget() {
1123
+ if (!supportCssPointerEvents && ghostEl) {
1124
+ css(ghostEl, 'display', '');
1125
+ }
1126
+ }; // #1184 fix - Prevent click event on fallback if dragged but item not changed position
1127
+
1128
+
1129
+ if (documentExists && !ChromeForAndroid) {
1130
+ document.addEventListener('click', function (evt) {
1131
+ if (ignoreNextClick) {
1132
+ evt.preventDefault();
1133
+ evt.stopPropagation && evt.stopPropagation();
1134
+ evt.stopImmediatePropagation && evt.stopImmediatePropagation();
1135
+ ignoreNextClick = false;
1136
+ return false;
1137
+ }
1138
+ }, true);
1139
+ }
1140
+
1141
+ var nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {
1142
+ if (dragEl) {
1143
+ evt = evt.touches ? evt.touches[0] : evt;
1144
+
1145
+ var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);
1146
+
1147
+ if (nearest) {
1148
+ // Create imitation event
1149
+ var event = {};
1150
+
1151
+ for (var i in evt) {
1152
+ if (evt.hasOwnProperty(i)) {
1153
+ event[i] = evt[i];
1154
+ }
1155
+ }
1156
+
1157
+ event.target = event.rootEl = nearest;
1158
+ event.preventDefault = void 0;
1159
+ event.stopPropagation = void 0;
1160
+
1161
+ nearest[expando]._onDragOver(event);
1162
+ }
1163
+ }
1164
+ };
1165
+
1166
+ var _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {
1167
+ if (dragEl) {
1168
+ dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
1169
+ }
1170
+ };
1171
+ /**
1172
+ * @class Sortable
1173
+ * @param {HTMLElement} el
1174
+ * @param {Object} [options]
1175
+ */
1176
+
1177
+
1178
+ function Sortable(el, options) {
1179
+ if (!(el && el.nodeType && el.nodeType === 1)) {
1180
+ throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(el));
1181
+ }
1182
+
1183
+ this.el = el; // root element
1184
+
1185
+ this.options = options = _extends({}, options); // Export instance
1186
+
1187
+ el[expando] = this;
1188
+ var defaults = {
1189
+ group: null,
1190
+ sort: true,
1191
+ disabled: false,
1192
+ store: null,
1193
+ handle: null,
1194
+ draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',
1195
+ swapThreshold: 1,
1196
+ // percentage; 0 <= x <= 1
1197
+ invertSwap: false,
1198
+ // invert always
1199
+ invertedSwapThreshold: null,
1200
+ // will be set to same as swapThreshold if default
1201
+ removeCloneOnHide: true,
1202
+ direction: function direction() {
1203
+ return _detectDirection(el, this.options);
1204
+ },
1205
+ ghostClass: 'sortable-ghost',
1206
+ chosenClass: 'sortable-chosen',
1207
+ dragClass: 'sortable-drag',
1208
+ ignore: 'a, img',
1209
+ filter: null,
1210
+ preventOnFilter: true,
1211
+ animation: 0,
1212
+ easing: null,
1213
+ setData: function setData(dataTransfer, dragEl) {
1214
+ dataTransfer.setData('Text', dragEl.textContent);
1215
+ },
1216
+ dropBubble: false,
1217
+ dragoverBubble: false,
1218
+ dataIdAttr: 'data-id',
1219
+ delay: 0,
1220
+ delayOnTouchOnly: false,
1221
+ touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
1222
+ forceFallback: false,
1223
+ fallbackClass: 'sortable-fallback',
1224
+ fallbackOnBody: false,
1225
+ fallbackTolerance: 0,
1226
+ fallbackOffset: {
1227
+ x: 0,
1228
+ y: 0
1229
+ },
1230
+ supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,
1231
+ emptyInsertThreshold: 5
1232
+ };
1233
+ PluginManager.initializePlugins(this, el, defaults); // Set default options
1234
+
1235
+ for (var name in defaults) {
1236
+ !(name in options) && (options[name] = defaults[name]);
1237
+ }
1238
+
1239
+ _prepareGroup(options); // Bind all private methods
1240
+
1241
+
1242
+ for (var fn in this) {
1243
+ if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
1244
+ this[fn] = this[fn].bind(this);
1245
+ }
1246
+ } // Setup drag mode
1247
+
1248
+
1249
+ this.nativeDraggable = options.forceFallback ? false : supportDraggable;
1250
+
1251
+ if (this.nativeDraggable) {
1252
+ // Touch start threshold cannot be greater than the native dragstart threshold
1253
+ this.options.touchStartThreshold = 1;
1254
+ } // Bind events
1255
+
1256
+
1257
+ if (options.supportPointer) {
1258
+ on(el, 'pointerdown', this._onTapStart);
1259
+ } else {
1260
+ on(el, 'mousedown', this._onTapStart);
1261
+ on(el, 'touchstart', this._onTapStart);
1262
+ }
1263
+
1264
+ if (this.nativeDraggable) {
1265
+ on(el, 'dragover', this);
1266
+ on(el, 'dragenter', this);
1267
+ }
1268
+
1269
+ sortables.push(this.el); // Restore sorting
1270
+
1271
+ options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager
1272
+
1273
+ _extends(this, AnimationStateManager());
1274
+ }
1275
+
1276
+ Sortable.prototype =
1277
+ /** @lends Sortable.prototype */
1278
+ {
1279
+ constructor: Sortable,
1280
+ _isOutsideThisEl: function _isOutsideThisEl(target) {
1281
+ if (!this.el.contains(target) && target !== this.el) {
1282
+ lastTarget = null;
1283
+ }
1284
+ },
1285
+ _getDirection: function _getDirection(evt, target) {
1286
+ return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;
1287
+ },
1288
+ _onTapStart: function _onTapStart(
1289
+ /** Event|TouchEvent */
1290
+ evt) {
1291
+ if (!evt.cancelable) return;
1292
+
1293
+ var _this = this,
1294
+ el = this.el,
1295
+ options = this.options,
1296
+ preventOnFilter = options.preventOnFilter,
1297
+ type = evt.type,
1298
+ touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,
1299
+ target = (touch || evt).target,
1300
+ originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,
1301
+ filter = options.filter;
1302
+
1303
+ _saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.
1304
+
1305
+
1306
+ if (dragEl) {
1307
+ return;
1308
+ }
1309
+
1310
+ if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {
1311
+ return; // only left button and enabled
1312
+ } // cancel dnd if original target is content editable
1313
+
1314
+
1315
+ if (originalTarget.isContentEditable) {
1316
+ return;
1317
+ } // Safari ignores further event handling after mousedown
1318
+
1319
+
1320
+ if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {
1321
+ return;
1322
+ }
1323
+
1324
+ target = closest(target, options.draggable, el, false);
1325
+
1326
+ if (target && target.animated) {
1327
+ return;
1328
+ }
1329
+
1330
+ if (lastDownEl === target) {
1331
+ // Ignoring duplicate `down`
1332
+ return;
1333
+ } // Get the index of the dragged element within its parent
1334
+
1335
+
1336
+ oldIndex = index(target);
1337
+ oldDraggableIndex = index(target, options.draggable); // Check filter
1338
+
1339
+ if (typeof filter === 'function') {
1340
+ if (filter.call(this, evt, target, this)) {
1341
+ _dispatchEvent({
1342
+ sortable: _this,
1343
+ rootEl: originalTarget,
1344
+ name: 'filter',
1345
+ targetEl: target,
1346
+ toEl: el,
1347
+ fromEl: el
1348
+ });
1349
+
1350
+ pluginEvent('filter', _this, {
1351
+ evt: evt
1352
+ });
1353
+ preventOnFilter && evt.cancelable && evt.preventDefault();
1354
+ return; // cancel dnd
1355
+ }
1356
+ } else if (filter) {
1357
+ filter = filter.split(',').some(function (criteria) {
1358
+ criteria = closest(originalTarget, criteria.trim(), el, false);
1359
+
1360
+ if (criteria) {
1361
+ _dispatchEvent({
1362
+ sortable: _this,
1363
+ rootEl: criteria,
1364
+ name: 'filter',
1365
+ targetEl: target,
1366
+ fromEl: el,
1367
+ toEl: el
1368
+ });
1369
+
1370
+ pluginEvent('filter', _this, {
1371
+ evt: evt
1372
+ });
1373
+ return true;
1374
+ }
1375
+ });
1376
+
1377
+ if (filter) {
1378
+ preventOnFilter && evt.cancelable && evt.preventDefault();
1379
+ return; // cancel dnd
1380
+ }
1381
+ }
1382
+
1383
+ if (options.handle && !closest(originalTarget, options.handle, el, false)) {
1384
+ return;
1385
+ } // Prepare `dragstart`
1386
+
1387
+
1388
+ this._prepareDragStart(evt, touch, target);
1389
+ },
1390
+ _prepareDragStart: function _prepareDragStart(
1391
+ /** Event */
1392
+ evt,
1393
+ /** Touch */
1394
+ touch,
1395
+ /** HTMLElement */
1396
+ target) {
1397
+ var _this = this,
1398
+ el = _this.el,
1399
+ options = _this.options,
1400
+ ownerDocument = el.ownerDocument,
1401
+ dragStartFn;
1402
+
1403
+ if (target && !dragEl && target.parentNode === el) {
1404
+ var dragRect = getRect(target);
1405
+ rootEl = el;
1406
+ dragEl = target;
1407
+ parentEl = dragEl.parentNode;
1408
+ nextEl = dragEl.nextSibling;
1409
+ lastDownEl = target;
1410
+ activeGroup = options.group;
1411
+ Sortable.dragged = dragEl;
1412
+ tapEvt = {
1413
+ target: dragEl,
1414
+ clientX: (touch || evt).clientX,
1415
+ clientY: (touch || evt).clientY
1416
+ };
1417
+ tapDistanceLeft = tapEvt.clientX - dragRect.left;
1418
+ tapDistanceTop = tapEvt.clientY - dragRect.top;
1419
+ this._lastX = (touch || evt).clientX;
1420
+ this._lastY = (touch || evt).clientY;
1421
+ dragEl.style['will-change'] = 'all';
1422
+
1423
+ dragStartFn = function dragStartFn() {
1424
+ pluginEvent('delayEnded', _this, {
1425
+ evt: evt
1426
+ });
1427
+
1428
+ if (Sortable.eventCanceled) {
1429
+ _this._onDrop();
1430
+
1431
+ return;
1432
+ } // Delayed drag has been triggered
1433
+ // we can re-enable the events: touchmove/mousemove
1434
+
1435
+
1436
+ _this._disableDelayedDragEvents();
1437
+
1438
+ if (!FireFox && _this.nativeDraggable) {
1439
+ dragEl.draggable = true;
1440
+ } // Bind the events: dragstart/dragend
1441
+
1442
+
1443
+ _this._triggerDragStart(evt, touch); // Drag start event
1444
+
1445
+
1446
+ _dispatchEvent({
1447
+ sortable: _this,
1448
+ name: 'choose',
1449
+ originalEvent: evt
1450
+ }); // Chosen item
1451
+
1452
+
1453
+ toggleClass(dragEl, options.chosenClass, true);
1454
+ }; // Disable "draggable"
1455
+
1456
+
1457
+ options.ignore.split(',').forEach(function (criteria) {
1458
+ find(dragEl, criteria.trim(), _disableDraggable);
1459
+ });
1460
+ on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);
1461
+ on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);
1462
+ on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);
1463
+ on(ownerDocument, 'mouseup', _this._onDrop);
1464
+ on(ownerDocument, 'touchend', _this._onDrop);
1465
+ on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox)
1466
+
1467
+ if (FireFox && this.nativeDraggable) {
1468
+ this.options.touchStartThreshold = 4;
1469
+ dragEl.draggable = true;
1470
+ }
1471
+
1472
+ pluginEvent('delayStart', this, {
1473
+ evt: evt
1474
+ }); // Delay is impossible for native DnD in Edge or IE
1475
+
1476
+ if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {
1477
+ if (Sortable.eventCanceled) {
1478
+ this._onDrop();
1479
+
1480
+ return;
1481
+ } // If the user moves the pointer or let go the click or touch
1482
+ // before the delay has been reached:
1483
+ // disable the delayed drag
1484
+
1485
+
1486
+ on(ownerDocument, 'mouseup', _this._disableDelayedDrag);
1487
+ on(ownerDocument, 'touchend', _this._disableDelayedDrag);
1488
+ on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);
1489
+ on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);
1490
+ on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);
1491
+ options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);
1492
+ _this._dragStartTimer = setTimeout(dragStartFn, options.delay);
1493
+ } else {
1494
+ dragStartFn();
1495
+ }
1496
+ }
1497
+ },
1498
+ _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(
1499
+ /** TouchEvent|PointerEvent **/
1500
+ e) {
1501
+ var touch = e.touches ? e.touches[0] : e;
1502
+
1503
+ if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {
1504
+ this._disableDelayedDrag();
1505
+ }
1506
+ },
1507
+ _disableDelayedDrag: function _disableDelayedDrag() {
1508
+ dragEl && _disableDraggable(dragEl);
1509
+ clearTimeout(this._dragStartTimer);
1510
+
1511
+ this._disableDelayedDragEvents();
1512
+ },
1513
+ _disableDelayedDragEvents: function _disableDelayedDragEvents() {
1514
+ var ownerDocument = this.el.ownerDocument;
1515
+ off(ownerDocument, 'mouseup', this._disableDelayedDrag);
1516
+ off(ownerDocument, 'touchend', this._disableDelayedDrag);
1517
+ off(ownerDocument, 'touchcancel', this._disableDelayedDrag);
1518
+ off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);
1519
+ off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);
1520
+ off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);
1521
+ },
1522
+ _triggerDragStart: function _triggerDragStart(
1523
+ /** Event */
1524
+ evt,
1525
+ /** Touch */
1526
+ touch) {
1527
+ touch = touch || evt.pointerType == 'touch' && evt;
1528
+
1529
+ if (!this.nativeDraggable || touch) {
1530
+ if (this.options.supportPointer) {
1531
+ on(document, 'pointermove', this._onTouchMove);
1532
+ } else if (touch) {
1533
+ on(document, 'touchmove', this._onTouchMove);
1534
+ } else {
1535
+ on(document, 'mousemove', this._onTouchMove);
1536
+ }
1537
+ } else {
1538
+ on(dragEl, 'dragend', this);
1539
+ on(rootEl, 'dragstart', this._onDragStart);
1540
+ }
1541
+
1542
+ try {
1543
+ if (document.selection) {
1544
+ // Timeout neccessary for IE9
1545
+ _nextTick(function () {
1546
+ document.selection.empty();
1547
+ });
1548
+ } else {
1549
+ window.getSelection().removeAllRanges();
1550
+ }
1551
+ } catch (err) {}
1552
+ },
1553
+ _dragStarted: function _dragStarted(fallback, evt) {
1554
+
1555
+ awaitingDragStarted = false;
1556
+
1557
+ if (rootEl && dragEl) {
1558
+ pluginEvent('dragStarted', this, {
1559
+ evt: evt
1560
+ });
1561
+
1562
+ if (this.nativeDraggable) {
1563
+ on(document, 'dragover', _checkOutsideTargetEl);
1564
+ }
1565
+
1566
+ var options = this.options; // Apply effect
1567
+
1568
+ !fallback && toggleClass(dragEl, options.dragClass, false);
1569
+ toggleClass(dragEl, options.ghostClass, true);
1570
+ Sortable.active = this;
1571
+ fallback && this._appendGhost(); // Drag start event
1572
+
1573
+ _dispatchEvent({
1574
+ sortable: this,
1575
+ name: 'start',
1576
+ originalEvent: evt
1577
+ });
1578
+ } else {
1579
+ this._nulling();
1580
+ }
1581
+ },
1582
+ _emulateDragOver: function _emulateDragOver() {
1583
+ if (touchEvt) {
1584
+ this._lastX = touchEvt.clientX;
1585
+ this._lastY = touchEvt.clientY;
1586
+
1587
+ _hideGhostForTarget();
1588
+
1589
+ var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
1590
+ var parent = target;
1591
+
1592
+ while (target && target.shadowRoot) {
1593
+ target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
1594
+ if (target === parent) break;
1595
+ parent = target;
1596
+ }
1597
+
1598
+ dragEl.parentNode[expando]._isOutsideThisEl(target);
1599
+
1600
+ if (parent) {
1601
+ do {
1602
+ if (parent[expando]) {
1603
+ var inserted = void 0;
1604
+ inserted = parent[expando]._onDragOver({
1605
+ clientX: touchEvt.clientX,
1606
+ clientY: touchEvt.clientY,
1607
+ target: target,
1608
+ rootEl: parent
1609
+ });
1610
+
1611
+ if (inserted && !this.options.dragoverBubble) {
1612
+ break;
1613
+ }
1614
+ }
1615
+
1616
+ target = parent; // store last element
1617
+ }
1618
+ /* jshint boss:true */
1619
+ while (parent = parent.parentNode);
1620
+ }
1621
+
1622
+ _unhideGhostForTarget();
1623
+ }
1624
+ },
1625
+ _onTouchMove: function _onTouchMove(
1626
+ /**TouchEvent*/
1627
+ evt) {
1628
+ if (tapEvt) {
1629
+ var options = this.options,
1630
+ fallbackTolerance = options.fallbackTolerance,
1631
+ fallbackOffset = options.fallbackOffset,
1632
+ touch = evt.touches ? evt.touches[0] : evt,
1633
+ ghostMatrix = ghostEl && matrix(ghostEl, true),
1634
+ scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
1635
+ scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
1636
+ relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
1637
+ dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),
1638
+ dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1); // only set the status to dragging, when we are actually dragging
1639
+
1640
+ if (!Sortable.active && !awaitingDragStarted) {
1641
+ if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {
1642
+ return;
1643
+ }
1644
+
1645
+ this._onDragStart(evt, true);
1646
+ }
1647
+
1648
+ if (ghostEl) {
1649
+ if (ghostMatrix) {
1650
+ ghostMatrix.e += dx - (lastDx || 0);
1651
+ ghostMatrix.f += dy - (lastDy || 0);
1652
+ } else {
1653
+ ghostMatrix = {
1654
+ a: 1,
1655
+ b: 0,
1656
+ c: 0,
1657
+ d: 1,
1658
+ e: dx,
1659
+ f: dy
1660
+ };
1661
+ }
1662
+
1663
+ var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")");
1664
+ css(ghostEl, 'webkitTransform', cssMatrix);
1665
+ css(ghostEl, 'mozTransform', cssMatrix);
1666
+ css(ghostEl, 'msTransform', cssMatrix);
1667
+ css(ghostEl, 'transform', cssMatrix);
1668
+ lastDx = dx;
1669
+ lastDy = dy;
1670
+ touchEvt = touch;
1671
+ }
1672
+
1673
+ evt.cancelable && evt.preventDefault();
1674
+ }
1675
+ },
1676
+ _appendGhost: function _appendGhost() {
1677
+ // Bug if using scale(): https://stackoverflow.com/questions/2637058
1678
+ // Not being adjusted for
1679
+ if (!ghostEl) {
1680
+ var container = this.options.fallbackOnBody ? document.body : rootEl,
1681
+ rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),
1682
+ options = this.options; // Position absolutely
1683
+
1684
+ if (PositionGhostAbsolutely) {
1685
+ // Get relatively positioned parent
1686
+ ghostRelativeParent = container;
1687
+
1688
+ while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {
1689
+ ghostRelativeParent = ghostRelativeParent.parentNode;
1690
+ }
1691
+
1692
+ if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {
1693
+ if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();
1694
+ rect.top += ghostRelativeParent.scrollTop;
1695
+ rect.left += ghostRelativeParent.scrollLeft;
1696
+ } else {
1697
+ ghostRelativeParent = getWindowScrollingElement();
1698
+ }
1699
+
1700
+ ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);
1701
+ }
1702
+
1703
+ ghostEl = dragEl.cloneNode(true);
1704
+ toggleClass(ghostEl, options.ghostClass, false);
1705
+ toggleClass(ghostEl, options.fallbackClass, true);
1706
+ toggleClass(ghostEl, options.dragClass, true);
1707
+ css(ghostEl, 'transition', '');
1708
+ css(ghostEl, 'transform', '');
1709
+ css(ghostEl, 'box-sizing', 'border-box');
1710
+ css(ghostEl, 'margin', 0);
1711
+ css(ghostEl, 'top', rect.top);
1712
+ css(ghostEl, 'left', rect.left);
1713
+ css(ghostEl, 'width', rect.width);
1714
+ css(ghostEl, 'height', rect.height);
1715
+ css(ghostEl, 'opacity', '0.8');
1716
+ css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');
1717
+ css(ghostEl, 'zIndex', '100000');
1718
+ css(ghostEl, 'pointerEvents', 'none');
1719
+ Sortable.ghost = ghostEl;
1720
+ container.appendChild(ghostEl); // Set transform-origin
1721
+
1722
+ css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');
1723
+ }
1724
+ },
1725
+ _onDragStart: function _onDragStart(
1726
+ /**Event*/
1727
+ evt,
1728
+ /**boolean*/
1729
+ fallback) {
1730
+ var _this = this;
1731
+
1732
+ var dataTransfer = evt.dataTransfer;
1733
+ var options = _this.options;
1734
+ pluginEvent('dragStart', this, {
1735
+ evt: evt
1736
+ });
1737
+
1738
+ if (Sortable.eventCanceled) {
1739
+ this._onDrop();
1740
+
1741
+ return;
1742
+ }
1743
+
1744
+ pluginEvent('setupClone', this);
1745
+
1746
+ if (!Sortable.eventCanceled) {
1747
+ cloneEl = clone(dragEl);
1748
+ cloneEl.removeAttribute("id");
1749
+ cloneEl.draggable = false;
1750
+ cloneEl.style['will-change'] = '';
1751
+
1752
+ this._hideClone();
1753
+
1754
+ toggleClass(cloneEl, this.options.chosenClass, false);
1755
+ Sortable.clone = cloneEl;
1756
+ } // #1143: IFrame support workaround
1757
+
1758
+
1759
+ _this.cloneId = _nextTick(function () {
1760
+ pluginEvent('clone', _this);
1761
+ if (Sortable.eventCanceled) return;
1762
+
1763
+ if (!_this.options.removeCloneOnHide) {
1764
+ rootEl.insertBefore(cloneEl, dragEl);
1765
+ }
1766
+
1767
+ _this._hideClone();
1768
+
1769
+ _dispatchEvent({
1770
+ sortable: _this,
1771
+ name: 'clone'
1772
+ });
1773
+ });
1774
+ !fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events
1775
+
1776
+ if (fallback) {
1777
+ ignoreNextClick = true;
1778
+ _this._loopId = setInterval(_this._emulateDragOver, 50);
1779
+ } else {
1780
+ // Undo what was set in _prepareDragStart before drag started
1781
+ off(document, 'mouseup', _this._onDrop);
1782
+ off(document, 'touchend', _this._onDrop);
1783
+ off(document, 'touchcancel', _this._onDrop);
1784
+
1785
+ if (dataTransfer) {
1786
+ dataTransfer.effectAllowed = 'move';
1787
+ options.setData && options.setData.call(_this, dataTransfer, dragEl);
1788
+ }
1789
+
1790
+ on(document, 'drop', _this); // #1276 fix:
1791
+
1792
+ css(dragEl, 'transform', 'translateZ(0)');
1793
+ }
1794
+
1795
+ awaitingDragStarted = true;
1796
+ _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));
1797
+ on(document, 'selectstart', _this);
1798
+ moved = true;
1799
+
1800
+ if (Safari) {
1801
+ css(document.body, 'user-select', 'none');
1802
+ }
1803
+ },
1804
+ // Returns true - if no further action is needed (either inserted or another condition)
1805
+ _onDragOver: function _onDragOver(
1806
+ /**Event*/
1807
+ evt) {
1808
+ var el = this.el,
1809
+ target = evt.target,
1810
+ dragRect,
1811
+ targetRect,
1812
+ revert,
1813
+ options = this.options,
1814
+ group = options.group,
1815
+ activeSortable = Sortable.active,
1816
+ isOwner = activeGroup === group,
1817
+ canSort = options.sort,
1818
+ fromSortable = putSortable || activeSortable,
1819
+ vertical,
1820
+ _this = this,
1821
+ completedFired = false;
1822
+
1823
+ if (_silent) return;
1824
+
1825
+ function dragOverEvent(name, extra) {
1826
+ pluginEvent(name, _this, _objectSpread2({
1827
+ evt: evt,
1828
+ isOwner: isOwner,
1829
+ axis: vertical ? 'vertical' : 'horizontal',
1830
+ revert: revert,
1831
+ dragRect: dragRect,
1832
+ targetRect: targetRect,
1833
+ canSort: canSort,
1834
+ fromSortable: fromSortable,
1835
+ target: target,
1836
+ completed: completed,
1837
+ onMove: function onMove(target, after) {
1838
+ return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);
1839
+ },
1840
+ changed: changed
1841
+ }, extra));
1842
+ } // Capture animation state
1843
+
1844
+
1845
+ function capture() {
1846
+ dragOverEvent('dragOverAnimationCapture');
1847
+
1848
+ _this.captureAnimationState();
1849
+
1850
+ if (_this !== fromSortable) {
1851
+ fromSortable.captureAnimationState();
1852
+ }
1853
+ } // Return invocation when dragEl is inserted (or completed)
1854
+
1855
+
1856
+ function completed(insertion) {
1857
+ dragOverEvent('dragOverCompleted', {
1858
+ insertion: insertion
1859
+ });
1860
+
1861
+ if (insertion) {
1862
+ // Clones must be hidden before folding animation to capture dragRectAbsolute properly
1863
+ if (isOwner) {
1864
+ activeSortable._hideClone();
1865
+ } else {
1866
+ activeSortable._showClone(_this);
1867
+ }
1868
+
1869
+ if (_this !== fromSortable) {
1870
+ // Set ghost class to new sortable's ghost class
1871
+ toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);
1872
+ toggleClass(dragEl, options.ghostClass, true);
1873
+ }
1874
+
1875
+ if (putSortable !== _this && _this !== Sortable.active) {
1876
+ putSortable = _this;
1877
+ } else if (_this === Sortable.active && putSortable) {
1878
+ putSortable = null;
1879
+ } // Animation
1880
+
1881
+
1882
+ if (fromSortable === _this) {
1883
+ _this._ignoreWhileAnimating = target;
1884
+ }
1885
+
1886
+ _this.animateAll(function () {
1887
+ dragOverEvent('dragOverAnimationComplete');
1888
+ _this._ignoreWhileAnimating = null;
1889
+ });
1890
+
1891
+ if (_this !== fromSortable) {
1892
+ fromSortable.animateAll();
1893
+ fromSortable._ignoreWhileAnimating = null;
1894
+ }
1895
+ } // Null lastTarget if it is not inside a previously swapped element
1896
+
1897
+
1898
+ if (target === dragEl && !dragEl.animated || target === el && !target.animated) {
1899
+ lastTarget = null;
1900
+ } // no bubbling and not fallback
1901
+
1902
+
1903
+ if (!options.dragoverBubble && !evt.rootEl && target !== document) {
1904
+ dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted
1905
+
1906
+
1907
+ !insertion && nearestEmptyInsertDetectEvent(evt);
1908
+ }
1909
+
1910
+ !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();
1911
+ return completedFired = true;
1912
+ } // Call when dragEl has been inserted
1913
+
1914
+
1915
+ function changed() {
1916
+ newIndex = index(dragEl);
1917
+ newDraggableIndex = index(dragEl, options.draggable);
1918
+
1919
+ _dispatchEvent({
1920
+ sortable: _this,
1921
+ name: 'change',
1922
+ toEl: el,
1923
+ newIndex: newIndex,
1924
+ newDraggableIndex: newDraggableIndex,
1925
+ originalEvent: evt
1926
+ });
1927
+ }
1928
+
1929
+ if (evt.preventDefault !== void 0) {
1930
+ evt.cancelable && evt.preventDefault();
1931
+ }
1932
+
1933
+ target = closest(target, options.draggable, el, true);
1934
+ dragOverEvent('dragOver');
1935
+ if (Sortable.eventCanceled) return completedFired;
1936
+
1937
+ if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {
1938
+ return completed(false);
1939
+ }
1940
+
1941
+ ignoreNextClick = false;
1942
+
1943
+ if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list
1944
+ : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {
1945
+ vertical = this._getDirection(evt, target) === 'vertical';
1946
+ dragRect = getRect(dragEl);
1947
+ dragOverEvent('dragOverValid');
1948
+ if (Sortable.eventCanceled) return completedFired;
1949
+
1950
+ if (revert) {
1951
+ parentEl = rootEl; // actualization
1952
+
1953
+ capture();
1954
+
1955
+ this._hideClone();
1956
+
1957
+ dragOverEvent('revert');
1958
+
1959
+ if (!Sortable.eventCanceled) {
1960
+ if (nextEl) {
1961
+ rootEl.insertBefore(dragEl, nextEl);
1962
+ } else {
1963
+ rootEl.appendChild(dragEl);
1964
+ }
1965
+ }
1966
+
1967
+ return completed(true);
1968
+ }
1969
+
1970
+ var elLastChild = lastChild(el, options.draggable);
1971
+
1972
+ if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {
1973
+ // Insert to end of list
1974
+ // If already at end of list: Do not insert
1975
+ if (elLastChild === dragEl) {
1976
+ return completed(false);
1977
+ } // if there is a last element, it is the target
1978
+
1979
+
1980
+ if (elLastChild && el === evt.target) {
1981
+ target = elLastChild;
1982
+ }
1983
+
1984
+ if (target) {
1985
+ targetRect = getRect(target);
1986
+ }
1987
+
1988
+ if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
1989
+ capture();
1990
+
1991
+ if (elLastChild && elLastChild.nextSibling) {
1992
+ // the last draggable element is not the last node
1993
+ el.insertBefore(dragEl, elLastChild.nextSibling);
1994
+ } else {
1995
+ el.appendChild(dragEl);
1996
+ }
1997
+
1998
+ parentEl = el; // actualization
1999
+
2000
+ changed();
2001
+ return completed(true);
2002
+ }
2003
+ } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {
2004
+ // Insert to start of list
2005
+ var firstChild = getChild(el, 0, options, true);
2006
+
2007
+ if (firstChild === dragEl) {
2008
+ return completed(false);
2009
+ }
2010
+
2011
+ target = firstChild;
2012
+ targetRect = getRect(target);
2013
+
2014
+ if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {
2015
+ capture();
2016
+ el.insertBefore(dragEl, firstChild);
2017
+ parentEl = el; // actualization
2018
+
2019
+ changed();
2020
+ return completed(true);
2021
+ }
2022
+ } else if (target.parentNode === el) {
2023
+ targetRect = getRect(target);
2024
+ var direction = 0,
2025
+ targetBeforeFirstSwap,
2026
+ differentLevel = dragEl.parentNode !== el,
2027
+ differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),
2028
+ side1 = vertical ? 'top' : 'left',
2029
+ scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),
2030
+ scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;
2031
+
2032
+ if (lastTarget !== target) {
2033
+ targetBeforeFirstSwap = targetRect[side1];
2034
+ pastFirstInvertThresh = false;
2035
+ isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;
2036
+ }
2037
+
2038
+ direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);
2039
+ var sibling;
2040
+
2041
+ if (direction !== 0) {
2042
+ // Check if target is beside dragEl in respective direction (ignoring hidden elements)
2043
+ var dragIndex = index(dragEl);
2044
+
2045
+ do {
2046
+ dragIndex -= direction;
2047
+ sibling = parentEl.children[dragIndex];
2048
+ } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));
2049
+ } // If dragEl is already beside target: Do not insert
2050
+
2051
+
2052
+ if (direction === 0 || sibling === target) {
2053
+ return completed(false);
2054
+ }
2055
+
2056
+ lastTarget = target;
2057
+ lastDirection = direction;
2058
+ var nextSibling = target.nextElementSibling,
2059
+ after = false;
2060
+ after = direction === 1;
2061
+
2062
+ var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);
2063
+
2064
+ if (moveVector !== false) {
2065
+ if (moveVector === 1 || moveVector === -1) {
2066
+ after = moveVector === 1;
2067
+ }
2068
+
2069
+ _silent = true;
2070
+ setTimeout(_unsilent, 30);
2071
+ capture();
2072
+
2073
+ if (after && !nextSibling) {
2074
+ el.appendChild(dragEl);
2075
+ } else {
2076
+ target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
2077
+ } // Undo chrome's scroll adjustment (has no effect on other browsers)
2078
+
2079
+
2080
+ if (scrolledPastTop) {
2081
+ scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);
2082
+ }
2083
+
2084
+ parentEl = dragEl.parentNode; // actualization
2085
+ // must be done before animation
2086
+
2087
+ if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {
2088
+ targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);
2089
+ }
2090
+
2091
+ changed();
2092
+ return completed(true);
2093
+ }
2094
+ }
2095
+
2096
+ if (el.contains(dragEl)) {
2097
+ return completed(false);
2098
+ }
2099
+ }
2100
+
2101
+ return false;
2102
+ },
2103
+ _ignoreWhileAnimating: null,
2104
+ _offMoveEvents: function _offMoveEvents() {
2105
+ off(document, 'mousemove', this._onTouchMove);
2106
+ off(document, 'touchmove', this._onTouchMove);
2107
+ off(document, 'pointermove', this._onTouchMove);
2108
+ off(document, 'dragover', nearestEmptyInsertDetectEvent);
2109
+ off(document, 'mousemove', nearestEmptyInsertDetectEvent);
2110
+ off(document, 'touchmove', nearestEmptyInsertDetectEvent);
2111
+ },
2112
+ _offUpEvents: function _offUpEvents() {
2113
+ var ownerDocument = this.el.ownerDocument;
2114
+ off(ownerDocument, 'mouseup', this._onDrop);
2115
+ off(ownerDocument, 'touchend', this._onDrop);
2116
+ off(ownerDocument, 'pointerup', this._onDrop);
2117
+ off(ownerDocument, 'touchcancel', this._onDrop);
2118
+ off(document, 'selectstart', this);
2119
+ },
2120
+ _onDrop: function _onDrop(
2121
+ /**Event*/
2122
+ evt) {
2123
+ var el = this.el,
2124
+ options = this.options; // Get the index of the dragged element within its parent
2125
+
2126
+ newIndex = index(dragEl);
2127
+ newDraggableIndex = index(dragEl, options.draggable);
2128
+ pluginEvent('drop', this, {
2129
+ evt: evt
2130
+ });
2131
+ parentEl = dragEl && dragEl.parentNode; // Get again after plugin event
2132
+
2133
+ newIndex = index(dragEl);
2134
+ newDraggableIndex = index(dragEl, options.draggable);
2135
+
2136
+ if (Sortable.eventCanceled) {
2137
+ this._nulling();
2138
+
2139
+ return;
2140
+ }
2141
+
2142
+ awaitingDragStarted = false;
2143
+ isCircumstantialInvert = false;
2144
+ pastFirstInvertThresh = false;
2145
+ clearInterval(this._loopId);
2146
+ clearTimeout(this._dragStartTimer);
2147
+
2148
+ _cancelNextTick(this.cloneId);
2149
+
2150
+ _cancelNextTick(this._dragStartId); // Unbind events
2151
+
2152
+
2153
+ if (this.nativeDraggable) {
2154
+ off(document, 'drop', this);
2155
+ off(el, 'dragstart', this._onDragStart);
2156
+ }
2157
+
2158
+ this._offMoveEvents();
2159
+
2160
+ this._offUpEvents();
2161
+
2162
+ if (Safari) {
2163
+ css(document.body, 'user-select', '');
2164
+ }
2165
+
2166
+ css(dragEl, 'transform', '');
2167
+
2168
+ if (evt) {
2169
+ if (moved) {
2170
+ evt.cancelable && evt.preventDefault();
2171
+ !options.dropBubble && evt.stopPropagation();
2172
+ }
2173
+
2174
+ ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);
2175
+
2176
+ if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
2177
+ // Remove clone(s)
2178
+ cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);
2179
+ }
2180
+
2181
+ if (dragEl) {
2182
+ if (this.nativeDraggable) {
2183
+ off(dragEl, 'dragend', this);
2184
+ }
2185
+
2186
+ _disableDraggable(dragEl);
2187
+
2188
+ dragEl.style['will-change'] = ''; // Remove classes
2189
+ // ghostClass is added in dragStarted
2190
+
2191
+ if (moved && !awaitingDragStarted) {
2192
+ toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);
2193
+ }
2194
+
2195
+ toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event
2196
+
2197
+ _dispatchEvent({
2198
+ sortable: this,
2199
+ name: 'unchoose',
2200
+ toEl: parentEl,
2201
+ newIndex: null,
2202
+ newDraggableIndex: null,
2203
+ originalEvent: evt
2204
+ });
2205
+
2206
+ if (rootEl !== parentEl) {
2207
+ if (newIndex >= 0) {
2208
+ // Add event
2209
+ _dispatchEvent({
2210
+ rootEl: parentEl,
2211
+ name: 'add',
2212
+ toEl: parentEl,
2213
+ fromEl: rootEl,
2214
+ originalEvent: evt
2215
+ }); // Remove event
2216
+
2217
+
2218
+ _dispatchEvent({
2219
+ sortable: this,
2220
+ name: 'remove',
2221
+ toEl: parentEl,
2222
+ originalEvent: evt
2223
+ }); // drag from one list and drop into another
2224
+
2225
+
2226
+ _dispatchEvent({
2227
+ rootEl: parentEl,
2228
+ name: 'sort',
2229
+ toEl: parentEl,
2230
+ fromEl: rootEl,
2231
+ originalEvent: evt
2232
+ });
2233
+
2234
+ _dispatchEvent({
2235
+ sortable: this,
2236
+ name: 'sort',
2237
+ toEl: parentEl,
2238
+ originalEvent: evt
2239
+ });
2240
+ }
2241
+
2242
+ putSortable && putSortable.save();
2243
+ } else {
2244
+ if (newIndex !== oldIndex) {
2245
+ if (newIndex >= 0) {
2246
+ // drag & drop within the same list
2247
+ _dispatchEvent({
2248
+ sortable: this,
2249
+ name: 'update',
2250
+ toEl: parentEl,
2251
+ originalEvent: evt
2252
+ });
2253
+
2254
+ _dispatchEvent({
2255
+ sortable: this,
2256
+ name: 'sort',
2257
+ toEl: parentEl,
2258
+ originalEvent: evt
2259
+ });
2260
+ }
2261
+ }
2262
+ }
2263
+
2264
+ if (Sortable.active) {
2265
+ /* jshint eqnull:true */
2266
+ if (newIndex == null || newIndex === -1) {
2267
+ newIndex = oldIndex;
2268
+ newDraggableIndex = oldDraggableIndex;
2269
+ }
2270
+
2271
+ _dispatchEvent({
2272
+ sortable: this,
2273
+ name: 'end',
2274
+ toEl: parentEl,
2275
+ originalEvent: evt
2276
+ }); // Save sorting
2277
+
2278
+
2279
+ this.save();
2280
+ }
2281
+ }
2282
+ }
2283
+
2284
+ this._nulling();
2285
+ },
2286
+ _nulling: function _nulling() {
2287
+ pluginEvent('nulling', this);
2288
+ rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;
2289
+ savedInputChecked.forEach(function (el) {
2290
+ el.checked = true;
2291
+ });
2292
+ savedInputChecked.length = lastDx = lastDy = 0;
2293
+ },
2294
+ handleEvent: function handleEvent(
2295
+ /**Event*/
2296
+ evt) {
2297
+ switch (evt.type) {
2298
+ case 'drop':
2299
+ case 'dragend':
2300
+ this._onDrop(evt);
2301
+
2302
+ break;
2303
+
2304
+ case 'dragenter':
2305
+ case 'dragover':
2306
+ if (dragEl) {
2307
+ this._onDragOver(evt);
2308
+
2309
+ _globalDragOver(evt);
2310
+ }
2311
+
2312
+ break;
2313
+
2314
+ case 'selectstart':
2315
+ evt.preventDefault();
2316
+ break;
2317
+ }
2318
+ },
2319
+
2320
+ /**
2321
+ * Serializes the item into an array of string.
2322
+ * @returns {String[]}
2323
+ */
2324
+ toArray: function toArray() {
2325
+ var order = [],
2326
+ el,
2327
+ children = this.el.children,
2328
+ i = 0,
2329
+ n = children.length,
2330
+ options = this.options;
2331
+
2332
+ for (; i < n; i++) {
2333
+ el = children[i];
2334
+
2335
+ if (closest(el, options.draggable, this.el, false)) {
2336
+ order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));
2337
+ }
2338
+ }
2339
+
2340
+ return order;
2341
+ },
2342
+
2343
+ /**
2344
+ * Sorts the elements according to the array.
2345
+ * @param {String[]} order order of the items
2346
+ */
2347
+ sort: function sort(order, useAnimation) {
2348
+ var items = {},
2349
+ rootEl = this.el;
2350
+ this.toArray().forEach(function (id, i) {
2351
+ var el = rootEl.children[i];
2352
+
2353
+ if (closest(el, this.options.draggable, rootEl, false)) {
2354
+ items[id] = el;
2355
+ }
2356
+ }, this);
2357
+ useAnimation && this.captureAnimationState();
2358
+ order.forEach(function (id) {
2359
+ if (items[id]) {
2360
+ rootEl.removeChild(items[id]);
2361
+ rootEl.appendChild(items[id]);
2362
+ }
2363
+ });
2364
+ useAnimation && this.animateAll();
2365
+ },
2366
+
2367
+ /**
2368
+ * Save the current sorting
2369
+ */
2370
+ save: function save() {
2371
+ var store = this.options.store;
2372
+ store && store.set && store.set(this);
2373
+ },
2374
+
2375
+ /**
2376
+ * 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.
2377
+ * @param {HTMLElement} el
2378
+ * @param {String} [selector] default: `options.draggable`
2379
+ * @returns {HTMLElement|null}
2380
+ */
2381
+ closest: function closest$1(el, selector) {
2382
+ return closest(el, selector || this.options.draggable, this.el, false);
2383
+ },
2384
+
2385
+ /**
2386
+ * Set/get option
2387
+ * @param {string} name
2388
+ * @param {*} [value]
2389
+ * @returns {*}
2390
+ */
2391
+ option: function option(name, value) {
2392
+ var options = this.options;
2393
+
2394
+ if (value === void 0) {
2395
+ return options[name];
2396
+ } else {
2397
+ var modifiedValue = PluginManager.modifyOption(this, name, value);
2398
+
2399
+ if (typeof modifiedValue !== 'undefined') {
2400
+ options[name] = modifiedValue;
2401
+ } else {
2402
+ options[name] = value;
2403
+ }
2404
+
2405
+ if (name === 'group') {
2406
+ _prepareGroup(options);
2407
+ }
2408
+ }
2409
+ },
2410
+
2411
+ /**
2412
+ * Destroy
2413
+ */
2414
+ destroy: function destroy() {
2415
+ pluginEvent('destroy', this);
2416
+ var el = this.el;
2417
+ el[expando] = null;
2418
+ off(el, 'mousedown', this._onTapStart);
2419
+ off(el, 'touchstart', this._onTapStart);
2420
+ off(el, 'pointerdown', this._onTapStart);
2421
+
2422
+ if (this.nativeDraggable) {
2423
+ off(el, 'dragover', this);
2424
+ off(el, 'dragenter', this);
2425
+ } // Remove draggable attributes
2426
+
2427
+
2428
+ Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {
2429
+ el.removeAttribute('draggable');
2430
+ });
2431
+
2432
+ this._onDrop();
2433
+
2434
+ this._disableDelayedDragEvents();
2435
+
2436
+ sortables.splice(sortables.indexOf(this.el), 1);
2437
+ this.el = el = null;
2438
+ },
2439
+ _hideClone: function _hideClone() {
2440
+ if (!cloneHidden) {
2441
+ pluginEvent('hideClone', this);
2442
+ if (Sortable.eventCanceled) return;
2443
+ css(cloneEl, 'display', 'none');
2444
+
2445
+ if (this.options.removeCloneOnHide && cloneEl.parentNode) {
2446
+ cloneEl.parentNode.removeChild(cloneEl);
2447
+ }
2448
+
2449
+ cloneHidden = true;
2450
+ }
2451
+ },
2452
+ _showClone: function _showClone(putSortable) {
2453
+ if (putSortable.lastPutMode !== 'clone') {
2454
+ this._hideClone();
2455
+
2456
+ return;
2457
+ }
2458
+
2459
+ if (cloneHidden) {
2460
+ pluginEvent('showClone', this);
2461
+ if (Sortable.eventCanceled) return; // show clone at dragEl or original position
2462
+
2463
+ if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {
2464
+ rootEl.insertBefore(cloneEl, dragEl);
2465
+ } else if (nextEl) {
2466
+ rootEl.insertBefore(cloneEl, nextEl);
2467
+ } else {
2468
+ rootEl.appendChild(cloneEl);
2469
+ }
2470
+
2471
+ if (this.options.group.revertClone) {
2472
+ this.animate(dragEl, cloneEl);
2473
+ }
2474
+
2475
+ css(cloneEl, 'display', '');
2476
+ cloneHidden = false;
2477
+ }
2478
+ }
2479
+ };
2480
+
2481
+ function _globalDragOver(
2482
+ /**Event*/
2483
+ evt) {
2484
+ if (evt.dataTransfer) {
2485
+ evt.dataTransfer.dropEffect = 'move';
2486
+ }
2487
+
2488
+ evt.cancelable && evt.preventDefault();
2489
+ }
2490
+
2491
+ function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {
2492
+ var evt,
2493
+ sortable = fromEl[expando],
2494
+ onMoveFn = sortable.options.onMove,
2495
+ retVal; // Support for new CustomEvent feature
2496
+
2497
+ if (window.CustomEvent && !IE11OrLess && !Edge) {
2498
+ evt = new CustomEvent('move', {
2499
+ bubbles: true,
2500
+ cancelable: true
2501
+ });
2502
+ } else {
2503
+ evt = document.createEvent('Event');
2504
+ evt.initEvent('move', true, true);
2505
+ }
2506
+
2507
+ evt.to = toEl;
2508
+ evt.from = fromEl;
2509
+ evt.dragged = dragEl;
2510
+ evt.draggedRect = dragRect;
2511
+ evt.related = targetEl || toEl;
2512
+ evt.relatedRect = targetRect || getRect(toEl);
2513
+ evt.willInsertAfter = willInsertAfter;
2514
+ evt.originalEvent = originalEvent;
2515
+ fromEl.dispatchEvent(evt);
2516
+
2517
+ if (onMoveFn) {
2518
+ retVal = onMoveFn.call(sortable, evt, originalEvent);
2519
+ }
2520
+
2521
+ return retVal;
2522
+ }
2523
+
2524
+ function _disableDraggable(el) {
2525
+ el.draggable = false;
2526
+ }
2527
+
2528
+ function _unsilent() {
2529
+ _silent = false;
2530
+ }
2531
+
2532
+ function _ghostIsFirst(evt, vertical, sortable) {
2533
+ var rect = getRect(getChild(sortable.el, 0, sortable.options, true));
2534
+ var spacer = 10;
2535
+ return vertical ? evt.clientX < rect.left - spacer || evt.clientY < rect.top && evt.clientX < rect.right : evt.clientY < rect.top - spacer || evt.clientY < rect.bottom && evt.clientX < rect.left;
2536
+ }
2537
+
2538
+ function _ghostIsLast(evt, vertical, sortable) {
2539
+ var rect = getRect(lastChild(sortable.el, sortable.options.draggable));
2540
+ var spacer = 10;
2541
+ return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer;
2542
+ }
2543
+
2544
+ function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {
2545
+ var mouseOnAxis = vertical ? evt.clientY : evt.clientX,
2546
+ targetLength = vertical ? targetRect.height : targetRect.width,
2547
+ targetS1 = vertical ? targetRect.top : targetRect.left,
2548
+ targetS2 = vertical ? targetRect.bottom : targetRect.right,
2549
+ invert = false;
2550
+
2551
+ if (!invertSwap) {
2552
+ // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold
2553
+ if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {
2554
+ // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2
2555
+ // check if past first invert threshold on side opposite of lastDirection
2556
+ if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {
2557
+ // past first invert threshold, do not restrict inverted threshold to dragEl shadow
2558
+ pastFirstInvertThresh = true;
2559
+ }
2560
+
2561
+ if (!pastFirstInvertThresh) {
2562
+ // dragEl shadow (target move distance shadow)
2563
+ if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow
2564
+ : mouseOnAxis > targetS2 - targetMoveDistance) {
2565
+ return -lastDirection;
2566
+ }
2567
+ } else {
2568
+ invert = true;
2569
+ }
2570
+ } else {
2571
+ // Regular
2572
+ if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {
2573
+ return _getInsertDirection(target);
2574
+ }
2575
+ }
2576
+ }
2577
+
2578
+ invert = invert || invertSwap;
2579
+
2580
+ if (invert) {
2581
+ // Invert of regular
2582
+ if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {
2583
+ return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;
2584
+ }
2585
+ }
2586
+
2587
+ return 0;
2588
+ }
2589
+ /**
2590
+ * Gets the direction dragEl must be swapped relative to target in order to make it
2591
+ * seem that dragEl has been "inserted" into that element's position
2592
+ * @param {HTMLElement} target The target whose position dragEl is being inserted at
2593
+ * @return {Number} Direction dragEl must be swapped
2594
+ */
2595
+
2596
+
2597
+ function _getInsertDirection(target) {
2598
+ if (index(dragEl) < index(target)) {
2599
+ return 1;
2600
+ } else {
2601
+ return -1;
2602
+ }
2603
+ }
2604
+ /**
2605
+ * Generate id
2606
+ * @param {HTMLElement} el
2607
+ * @returns {String}
2608
+ * @private
2609
+ */
2610
+
2611
+
2612
+ function _generateId(el) {
2613
+ var str = el.tagName + el.className + el.src + el.href + el.textContent,
2614
+ i = str.length,
2615
+ sum = 0;
2616
+
2617
+ while (i--) {
2618
+ sum += str.charCodeAt(i);
2619
+ }
2620
+
2621
+ return sum.toString(36);
2622
+ }
2623
+
2624
+ function _saveInputCheckedState(root) {
2625
+ savedInputChecked.length = 0;
2626
+ var inputs = root.getElementsByTagName('input');
2627
+ var idx = inputs.length;
2628
+
2629
+ while (idx--) {
2630
+ var el = inputs[idx];
2631
+ el.checked && savedInputChecked.push(el);
2632
+ }
2633
+ }
2634
+
2635
+ function _nextTick(fn) {
2636
+ return setTimeout(fn, 0);
2637
+ }
2638
+
2639
+ function _cancelNextTick(id) {
2640
+ return clearTimeout(id);
2641
+ } // Fixed #973:
2642
+
2643
+
2644
+ if (documentExists) {
2645
+ on(document, 'touchmove', function (evt) {
2646
+ if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {
2647
+ evt.preventDefault();
2648
+ }
2649
+ });
2650
+ } // Export utils
2651
+
2652
+
2653
+ Sortable.utils = {
2654
+ on: on,
2655
+ off: off,
2656
+ css: css,
2657
+ find: find,
2658
+ is: function is(el, selector) {
2659
+ return !!closest(el, selector, el, false);
2660
+ },
2661
+ extend: extend,
2662
+ throttle: throttle,
2663
+ closest: closest,
2664
+ toggleClass: toggleClass,
2665
+ clone: clone,
2666
+ index: index,
2667
+ nextTick: _nextTick,
2668
+ cancelNextTick: _cancelNextTick,
2669
+ detectDirection: _detectDirection,
2670
+ getChild: getChild
2671
+ };
2672
+ /**
2673
+ * Get the Sortable instance of an element
2674
+ * @param {HTMLElement} element The element
2675
+ * @return {Sortable|undefined} The instance of Sortable
2676
+ */
2677
+
2678
+ Sortable.get = function (element) {
2679
+ return element[expando];
2680
+ };
2681
+ /**
2682
+ * Mount a plugin to Sortable
2683
+ * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted
2684
+ */
2685
+
2686
+
2687
+ Sortable.mount = function () {
2688
+ for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {
2689
+ plugins[_key] = arguments[_key];
2690
+ }
2691
+
2692
+ if (plugins[0].constructor === Array) plugins = plugins[0];
2693
+ plugins.forEach(function (plugin) {
2694
+ if (!plugin.prototype || !plugin.prototype.constructor) {
2695
+ throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(plugin));
2696
+ }
2697
+
2698
+ if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);
2699
+ PluginManager.mount(plugin);
2700
+ });
2701
+ };
2702
+ /**
2703
+ * Create sortable instance
2704
+ * @param {HTMLElement} el
2705
+ * @param {Object} [options]
2706
+ */
2707
+
2708
+
2709
+ Sortable.create = function (el, options) {
2710
+ return new Sortable(el, options);
2711
+ }; // Export
2712
+
2713
+
2714
+ Sortable.version = version;
2715
+
2716
+ var autoScrolls = [],
2717
+ scrollEl,
2718
+ scrollRootEl,
2719
+ scrolling = false,
2720
+ lastAutoScrollX,
2721
+ lastAutoScrollY,
2722
+ touchEvt$1,
2723
+ pointerElemChangedInterval;
2724
+
2725
+ function AutoScrollPlugin() {
2726
+ function AutoScroll() {
2727
+ this.defaults = {
2728
+ scroll: true,
2729
+ forceAutoScrollFallback: false,
2730
+ scrollSensitivity: 30,
2731
+ scrollSpeed: 10,
2732
+ bubbleScroll: true
2733
+ }; // Bind all private methods
2734
+
2735
+ for (var fn in this) {
2736
+ if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
2737
+ this[fn] = this[fn].bind(this);
2738
+ }
2739
+ }
2740
+ }
2741
+
2742
+ AutoScroll.prototype = {
2743
+ dragStarted: function dragStarted(_ref) {
2744
+ var originalEvent = _ref.originalEvent;
2745
+
2746
+ if (this.sortable.nativeDraggable) {
2747
+ on(document, 'dragover', this._handleAutoScroll);
2748
+ } else {
2749
+ if (this.options.supportPointer) {
2750
+ on(document, 'pointermove', this._handleFallbackAutoScroll);
2751
+ } else if (originalEvent.touches) {
2752
+ on(document, 'touchmove', this._handleFallbackAutoScroll);
2753
+ } else {
2754
+ on(document, 'mousemove', this._handleFallbackAutoScroll);
2755
+ }
2756
+ }
2757
+ },
2758
+ dragOverCompleted: function dragOverCompleted(_ref2) {
2759
+ var originalEvent = _ref2.originalEvent;
2760
+
2761
+ // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)
2762
+ if (!this.options.dragOverBubble && !originalEvent.rootEl) {
2763
+ this._handleAutoScroll(originalEvent);
2764
+ }
2765
+ },
2766
+ drop: function drop() {
2767
+ if (this.sortable.nativeDraggable) {
2768
+ off(document, 'dragover', this._handleAutoScroll);
2769
+ } else {
2770
+ off(document, 'pointermove', this._handleFallbackAutoScroll);
2771
+ off(document, 'touchmove', this._handleFallbackAutoScroll);
2772
+ off(document, 'mousemove', this._handleFallbackAutoScroll);
2773
+ }
2774
+
2775
+ clearPointerElemChangedInterval();
2776
+ clearAutoScrolls();
2777
+ cancelThrottle();
2778
+ },
2779
+ nulling: function nulling() {
2780
+ touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;
2781
+ autoScrolls.length = 0;
2782
+ },
2783
+ _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {
2784
+ this._handleAutoScroll(evt, true);
2785
+ },
2786
+ _handleAutoScroll: function _handleAutoScroll(evt, fallback) {
2787
+ var _this = this;
2788
+
2789
+ var x = (evt.touches ? evt.touches[0] : evt).clientX,
2790
+ y = (evt.touches ? evt.touches[0] : evt).clientY,
2791
+ elem = document.elementFromPoint(x, y);
2792
+ touchEvt$1 = evt; // IE does not seem to have native autoscroll,
2793
+ // Edge's autoscroll seems too conditional,
2794
+ // MACOS Safari does not have autoscroll,
2795
+ // Firefox and Chrome are good
2796
+
2797
+ if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {
2798
+ autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change
2799
+
2800
+ var ogElemScroller = getParentAutoScrollElement(elem, true);
2801
+
2802
+ if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {
2803
+ pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour
2804
+
2805
+ pointerElemChangedInterval = setInterval(function () {
2806
+ var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);
2807
+
2808
+ if (newElem !== ogElemScroller) {
2809
+ ogElemScroller = newElem;
2810
+ clearAutoScrolls();
2811
+ }
2812
+
2813
+ autoScroll(evt, _this.options, newElem, fallback);
2814
+ }, 10);
2815
+ lastAutoScrollX = x;
2816
+ lastAutoScrollY = y;
2817
+ }
2818
+ } else {
2819
+ // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll
2820
+ if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {
2821
+ clearAutoScrolls();
2822
+ return;
2823
+ }
2824
+
2825
+ autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);
2826
+ }
2827
+ }
2828
+ };
2829
+ return _extends(AutoScroll, {
2830
+ pluginName: 'scroll',
2831
+ initializeByDefault: true
2832
+ });
2833
+ }
2834
+
2835
+ function clearAutoScrolls() {
2836
+ autoScrolls.forEach(function (autoScroll) {
2837
+ clearInterval(autoScroll.pid);
2838
+ });
2839
+ autoScrolls = [];
2840
+ }
2841
+
2842
+ function clearPointerElemChangedInterval() {
2843
+ clearInterval(pointerElemChangedInterval);
2844
+ }
2845
+
2846
+ var autoScroll = throttle(function (evt, options, rootEl, isFallback) {
2847
+ // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521
2848
+ if (!options.scroll) return;
2849
+ var x = (evt.touches ? evt.touches[0] : evt).clientX,
2850
+ y = (evt.touches ? evt.touches[0] : evt).clientY,
2851
+ sens = options.scrollSensitivity,
2852
+ speed = options.scrollSpeed,
2853
+ winScroller = getWindowScrollingElement();
2854
+ var scrollThisInstance = false,
2855
+ scrollCustomFn; // New scroll root, set scrollEl
2856
+
2857
+ if (scrollRootEl !== rootEl) {
2858
+ scrollRootEl = rootEl;
2859
+ clearAutoScrolls();
2860
+ scrollEl = options.scroll;
2861
+ scrollCustomFn = options.scrollFn;
2862
+
2863
+ if (scrollEl === true) {
2864
+ scrollEl = getParentAutoScrollElement(rootEl, true);
2865
+ }
2866
+ }
2867
+
2868
+ var layersOut = 0;
2869
+ var currentParent = scrollEl;
2870
+
2871
+ do {
2872
+ var el = currentParent,
2873
+ rect = getRect(el),
2874
+ top = rect.top,
2875
+ bottom = rect.bottom,
2876
+ left = rect.left,
2877
+ right = rect.right,
2878
+ width = rect.width,
2879
+ height = rect.height,
2880
+ canScrollX = void 0,
2881
+ canScrollY = void 0,
2882
+ scrollWidth = el.scrollWidth,
2883
+ scrollHeight = el.scrollHeight,
2884
+ elCSS = css(el),
2885
+ scrollPosX = el.scrollLeft,
2886
+ scrollPosY = el.scrollTop;
2887
+
2888
+ if (el === winScroller) {
2889
+ canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');
2890
+ canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');
2891
+ } else {
2892
+ canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');
2893
+ canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');
2894
+ }
2895
+
2896
+ var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);
2897
+ var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);
2898
+
2899
+ if (!autoScrolls[layersOut]) {
2900
+ for (var i = 0; i <= layersOut; i++) {
2901
+ if (!autoScrolls[i]) {
2902
+ autoScrolls[i] = {};
2903
+ }
2904
+ }
2905
+ }
2906
+
2907
+ if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {
2908
+ autoScrolls[layersOut].el = el;
2909
+ autoScrolls[layersOut].vx = vx;
2910
+ autoScrolls[layersOut].vy = vy;
2911
+ clearInterval(autoScrolls[layersOut].pid);
2912
+
2913
+ if (vx != 0 || vy != 0) {
2914
+ scrollThisInstance = true;
2915
+ /* jshint loopfunc:true */
2916
+
2917
+ autoScrolls[layersOut].pid = setInterval(function () {
2918
+ // emulate drag over during autoscroll (fallback), emulating native DnD behaviour
2919
+ if (isFallback && this.layer === 0) {
2920
+ Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely
2921
+
2922
+ }
2923
+
2924
+ var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;
2925
+ var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;
2926
+
2927
+ if (typeof scrollCustomFn === 'function') {
2928
+ if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {
2929
+ return;
2930
+ }
2931
+ }
2932
+
2933
+ scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);
2934
+ }.bind({
2935
+ layer: layersOut
2936
+ }), 24);
2937
+ }
2938
+ }
2939
+
2940
+ layersOut++;
2941
+ } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));
2942
+
2943
+ scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not
2944
+ }, 30);
2945
+
2946
+ var drop = function drop(_ref) {
2947
+ var originalEvent = _ref.originalEvent,
2948
+ putSortable = _ref.putSortable,
2949
+ dragEl = _ref.dragEl,
2950
+ activeSortable = _ref.activeSortable,
2951
+ dispatchSortableEvent = _ref.dispatchSortableEvent,
2952
+ hideGhostForTarget = _ref.hideGhostForTarget,
2953
+ unhideGhostForTarget = _ref.unhideGhostForTarget;
2954
+ if (!originalEvent) return;
2955
+ var toSortable = putSortable || activeSortable;
2956
+ hideGhostForTarget();
2957
+ var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;
2958
+ var target = document.elementFromPoint(touch.clientX, touch.clientY);
2959
+ unhideGhostForTarget();
2960
+
2961
+ if (toSortable && !toSortable.el.contains(target)) {
2962
+ dispatchSortableEvent('spill');
2963
+ this.onSpill({
2964
+ dragEl: dragEl,
2965
+ putSortable: putSortable
2966
+ });
2967
+ }
2968
+ };
2969
+
2970
+ function Revert() {}
2971
+
2972
+ Revert.prototype = {
2973
+ startIndex: null,
2974
+ dragStart: function dragStart(_ref2) {
2975
+ var oldDraggableIndex = _ref2.oldDraggableIndex;
2976
+ this.startIndex = oldDraggableIndex;
2977
+ },
2978
+ onSpill: function onSpill(_ref3) {
2979
+ var dragEl = _ref3.dragEl,
2980
+ putSortable = _ref3.putSortable;
2981
+ this.sortable.captureAnimationState();
2982
+
2983
+ if (putSortable) {
2984
+ putSortable.captureAnimationState();
2985
+ }
2986
+
2987
+ var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);
2988
+
2989
+ if (nextSibling) {
2990
+ this.sortable.el.insertBefore(dragEl, nextSibling);
2991
+ } else {
2992
+ this.sortable.el.appendChild(dragEl);
2993
+ }
2994
+
2995
+ this.sortable.animateAll();
2996
+
2997
+ if (putSortable) {
2998
+ putSortable.animateAll();
2999
+ }
3000
+ },
3001
+ drop: drop
3002
+ };
3003
+
3004
+ _extends(Revert, {
3005
+ pluginName: 'revertOnSpill'
3006
+ });
3007
+
3008
+ function Remove() {}
3009
+
3010
+ Remove.prototype = {
3011
+ onSpill: function onSpill(_ref4) {
3012
+ var dragEl = _ref4.dragEl,
3013
+ putSortable = _ref4.putSortable;
3014
+ var parentSortable = putSortable || this.sortable;
3015
+ parentSortable.captureAnimationState();
3016
+ dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);
3017
+ parentSortable.animateAll();
3018
+ },
3019
+ drop: drop
3020
+ };
3021
+
3022
+ _extends(Remove, {
3023
+ pluginName: 'removeOnSpill'
3024
+ });
3025
+
3026
+ Sortable.mount(new AutoScrollPlugin());
3027
+ Sortable.mount(Remove, Revert);
3028
+
10
3029
  const guxTabAdvancedListCss = "gux-tab-advanced-list .gux-tab-container{display:flex;align-items:flex-end;width:100%;height:50px;margin-bottom:16px;overflow-x:auto;overflow-y:hidden;background-color:#f6f7f9;border-bottom:1px solid #d7dce5;border-radius:4px 4px 0 0}gux-tab-advanced-list .gux-tab-container .action-button-container{display:flex;border-radius:4px}gux-tab-advanced-list .gux-tab-container .action-button-container .add-tab-button{min-width:35px;height:50px;padding:0;margin-left:2px;color:#2e394c;background-color:#e2e6ee;border:none;border-radius:4px;transition:color 0.25s}gux-tab-advanced-list .gux-tab-container .action-button-container .add-tab-button [slot=add-tab]{display:inline-flex;align-items:center;padding:0 12px;white-space:nowrap;font-family:var(--gse-core-fontFamily-body), sans-serif;font-weight:var(--gse-core-fontWeight-bold)}gux-tab-advanced-list .gux-tab-container .action-button-container .add-tab-button [slot=add-tab] gux-icon{padding-right:8px}gux-tab-advanced-list .gux-tab-container .action-button-container .add-tab-button:disabled{opacity:0.5}gux-tab-advanced-list .gux-tab-container .action-button-container .add-tab-button:hover{background-color:#d7dce5}gux-tab-advanced-list .gux-tab-container .action-button-container .add-tab-button:active{background-color:#c8cfda}gux-tab-advanced-list .gux-tab-container .action-button-container .add-tab-button:focus-visible{outline:none;box-shadow:inset 0 0 0 3px #aac9ff}gux-tab-advanced-list .gux-tab-container .action-button-container .add-tab-button:focus-visible{border-radius:5px;outline:none;box-shadow:inset 0 0 0 3px #aac9ff}gux-tab-advanced-list .gux-tab-container .action-button-container .add-tab-button gux-icon{width:16px;height:16px}gux-tab-advanced-list .gux-tab-container .action-button-container .gux-scroll-button-container{display:flex;border-radius:4px}gux-tab-advanced-list .gux-tab-container .action-button-container .gux-scroll-button-container .gux-scroll-button{display:flex;align-items:center;justify-content:center;width:28px;height:50px;padding:0;color:#2e394c;background-color:#e2e6ee;border:none;border-radius:4px;transition:color 0.25s}gux-tab-advanced-list .gux-tab-container .action-button-container .gux-scroll-button-container .gux-scroll-button:focus-visible{border:3px solid #aac9ff;border-radius:5px;outline:none}gux-tab-advanced-list .gux-tab-container .action-button-container .gux-scroll-button-container .gux-scroll-button gux-icon{width:16px;height:16px}gux-tab-advanced-list .gux-tab-container .action-button-container .gux-scroll-button-container .gux-scroll-button:focus-visible{border:3px solid #aac9ff;outline:none}gux-tab-advanced-list .gux-tab-container .action-button-container .gux-scroll-button-container .gux-scroll-button:hover{background-color:#d7dce5}gux-tab-advanced-list .gux-tab-container .action-button-container .gux-scroll-button-container .gux-scroll-button:active{background-color:#c8cfda}gux-tab-advanced-list .gux-tab-container .action-button-container .gux-scroll-button-container .gux-scroll-button:focus-visible{outline:var(--gse-semantic-focusRing-default-border-color) var(--gse-semantic-focusRing-default-border-style) var(--gse-semantic-focusRing-default-border-width);outline-offset:var(--gse-semantic-focusRing-offset)}gux-tab-advanced-list .gux-tab-container .gux-scrollable-section{display:flex;align-items:flex-end;height:50px;overflow-x:auto;scroll-behavior:smooth;scrollbar-width:none}gux-tab-advanced-list .gux-tab-container .gux-scrollable-section::-webkit-scrollbar{height:0}gux-tab-advanced-list .gux-sr-only{position:absolute;top:auto;left:-10000px;width:1px;height:1px;overflow:hidden}";
11
3030
 
12
3031
  var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {