@esri/solutions-components 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1230) hide show
  1. package/dist/cjs/ExpandToggle-3ab7dfd7.js +118 -0
  2. package/dist/cjs/FloatingArrow-89e0e55a.js +50 -0
  3. package/dist/cjs/Heading-9112a4c5.js +25 -0
  4. package/dist/cjs/InitiativeUiSchemaEdit-108652db.js +28 -0
  5. package/dist/cjs/ProjectUiSchemaCreate-81217580.js +126 -0
  6. package/dist/cjs/ProjectUiSchemaEdit-d5f11c17.js +178 -0
  7. package/dist/cjs/Validation-20182093.js +20 -0
  8. package/dist/cjs/_commonjsHelpers-ed90c4ad.js +55 -0
  9. package/dist/cjs/app-globals-379d737f.js +69 -0
  10. package/dist/cjs/ar-a694ca24.js +105 -0
  11. package/dist/cjs/arcgis-login.cjs.entry.js +1 -1
  12. package/dist/cjs/basemap-gallery.cjs.entry.js +121 -0
  13. package/dist/cjs/bg-62b6b3ba.js +83 -0
  14. package/dist/cjs/browser-fe25aefa.js +28 -0
  15. package/dist/cjs/bs-e673542b.js +52 -0
  16. package/dist/cjs/buffer-tools.cjs.entry.js +257 -0
  17. package/dist/cjs/ca-e4d2f562.js +72 -0
  18. package/dist/cjs/calcite-accordion-item.cjs.entry.js +5 -5
  19. package/dist/cjs/calcite-accordion.cjs.entry.js +2 -2
  20. package/dist/cjs/calcite-action-bar.cjs.entry.js +12 -12
  21. package/dist/cjs/calcite-action-group.cjs.entry.js +9 -9
  22. package/dist/cjs/calcite-action-menu.cjs.entry.js +295 -0
  23. package/dist/cjs/calcite-action-pad.cjs.entry.js +169 -0
  24. package/dist/cjs/calcite-action-pad_2.cjs.entry.js +1 -1
  25. package/dist/cjs/calcite-action.cjs.entry.js +188 -0
  26. package/dist/cjs/calcite-alert.cjs.entry.js +322 -0
  27. package/dist/cjs/calcite-avatar.cjs.entry.js +4 -4
  28. package/dist/cjs/calcite-block-section.cjs.entry.js +8 -8
  29. package/dist/cjs/calcite-block.cjs.entry.js +214 -0
  30. package/dist/cjs/calcite-button.cjs.entry.js +13 -13
  31. package/dist/cjs/calcite-card.cjs.entry.js +8 -8
  32. package/dist/cjs/calcite-checkbox.cjs.entry.js +9 -9
  33. package/dist/cjs/calcite-chip-group.cjs.entry.js +7 -7
  34. package/dist/cjs/calcite-chip.cjs.entry.js +262 -0
  35. package/dist/cjs/calcite-color-picker-hex-input.cjs.entry.js +274 -0
  36. package/dist/cjs/calcite-color-picker-swatch.cjs.entry.js +99 -0
  37. package/dist/cjs/calcite-color-picker.cjs.entry.js +22 -22
  38. package/dist/cjs/calcite-combobox-item-group.cjs.entry.js +4 -4
  39. package/dist/cjs/calcite-combobox-item.cjs.entry.js +145 -0
  40. package/dist/cjs/calcite-combobox.cjs.entry.js +1431 -0
  41. package/dist/cjs/calcite-date-picker-day.cjs.entry.js +97 -0
  42. package/dist/cjs/calcite-date-picker-month-header.cjs.entry.js +207 -0
  43. package/dist/cjs/calcite-date-picker-month.cjs.entry.js +362 -0
  44. package/dist/cjs/calcite-date-picker.cjs.entry.js +460 -0
  45. package/dist/cjs/calcite-dropdown-group.cjs.entry.js +85 -0
  46. package/dist/cjs/calcite-dropdown-item.cjs.entry.js +188 -0
  47. package/dist/cjs/calcite-dropdown.cjs.entry.js +430 -0
  48. package/dist/cjs/calcite-fab.cjs.entry.js +6 -6
  49. package/dist/cjs/calcite-filter.cjs.entry.js +179 -0
  50. package/dist/cjs/calcite-flow-item.cjs.entry.js +198 -0
  51. package/dist/cjs/calcite-flow.cjs.entry.js +153 -0
  52. package/dist/cjs/calcite-graph.cjs.entry.js +226 -0
  53. package/dist/cjs/calcite-handle.cjs.entry.js +204 -0
  54. package/dist/cjs/calcite-icon.cjs.entry.js +5 -5
  55. package/dist/cjs/calcite-inline-editable.cjs.entry.js +11 -11
  56. package/dist/cjs/calcite-input-date-picker.cjs.entry.js +744 -0
  57. package/dist/cjs/calcite-input-date-picker_3.cjs.entry.js +16 -10
  58. package/dist/cjs/calcite-input-message.cjs.entry.js +70 -0
  59. package/dist/cjs/calcite-input-number.cjs.entry.js +13 -13
  60. package/dist/cjs/calcite-input-text.cjs.entry.js +13 -13
  61. package/dist/cjs/calcite-input-time-picker-9e93f694.js +1854 -0
  62. package/dist/cjs/calcite-input-time-picker.cjs.entry.js +17 -17
  63. package/dist/cjs/calcite-input-time-zone.cjs.entry.js +12 -12
  64. package/dist/cjs/calcite-input.cjs.entry.js +695 -0
  65. package/dist/cjs/calcite-label.cjs.entry.js +4 -4
  66. package/dist/cjs/calcite-link.cjs.entry.js +6 -6
  67. package/dist/cjs/calcite-list-item-group.cjs.entry.js +4 -4
  68. package/dist/cjs/calcite-list-item.cjs.entry.js +454 -0
  69. package/dist/cjs/calcite-list.cjs.entry.js +567 -0
  70. package/dist/cjs/calcite-loader.cjs.entry.js +80 -0
  71. package/dist/cjs/calcite-menu-item.cjs.entry.js +8 -8
  72. package/dist/cjs/calcite-menu.cjs.entry.js +8 -8
  73. package/dist/cjs/calcite-meter.cjs.entry.js +8 -8
  74. package/dist/cjs/calcite-modal.cjs.entry.js +17 -11
  75. package/dist/cjs/calcite-navigation-logo.cjs.entry.js +2 -2
  76. package/dist/cjs/calcite-navigation-user.cjs.entry.js +2 -2
  77. package/dist/cjs/calcite-navigation.cjs.entry.js +4 -4
  78. package/dist/cjs/calcite-notice.cjs.entry.js +10 -10
  79. package/dist/cjs/calcite-option-group.cjs.entry.js +1 -1
  80. package/dist/cjs/calcite-option.cjs.entry.js +88 -0
  81. package/dist/cjs/calcite-pagination.cjs.entry.js +201 -8
  82. package/dist/cjs/calcite-panel.cjs.entry.js +270 -0
  83. package/dist/cjs/calcite-pick-list-group.cjs.entry.js +6 -6
  84. package/dist/cjs/calcite-pick-list-item.cjs.entry.js +23 -23
  85. package/dist/cjs/calcite-pick-list.cjs.entry.js +10 -10
  86. package/dist/cjs/calcite-popover.cjs.entry.js +418 -0
  87. package/dist/cjs/calcite-progress.cjs.entry.js +41 -0
  88. package/dist/cjs/calcite-radio-button-group.cjs.entry.js +4 -4
  89. package/dist/cjs/calcite-radio-button.cjs.entry.js +8 -8
  90. package/dist/cjs/calcite-rating.cjs.entry.js +14 -12
  91. package/dist/cjs/calcite-scrim.cjs.entry.js +7 -7
  92. package/dist/cjs/calcite-segmented-control-item.cjs.entry.js +70 -0
  93. package/dist/cjs/calcite-segmented-control.cjs.entry.js +245 -0
  94. package/dist/cjs/calcite-select.cjs.entry.js +235 -0
  95. package/dist/cjs/calcite-sheet.cjs.entry.js +7 -7
  96. package/dist/cjs/calcite-shell-center-row.cjs.entry.js +5 -5
  97. package/dist/cjs/calcite-shell-panel.cjs.entry.js +414 -0
  98. package/dist/cjs/calcite-shell.cjs.entry.js +174 -0
  99. package/dist/cjs/calcite-slider.cjs.entry.js +844 -0
  100. package/dist/cjs/calcite-sortable-list.cjs.entry.js +7 -7
  101. package/dist/cjs/calcite-split-button.cjs.entry.js +4 -4
  102. package/dist/cjs/calcite-stack.cjs.entry.js +74 -0
  103. package/dist/cjs/calcite-stepper-item.cjs.entry.js +10 -10
  104. package/dist/cjs/calcite-stepper.cjs.entry.js +7 -7
  105. package/dist/cjs/calcite-switch.cjs.entry.js +9 -9
  106. package/dist/cjs/calcite-tab-nav.cjs.entry.js +263 -0
  107. package/dist/cjs/calcite-tab-title.cjs.entry.js +291 -0
  108. package/dist/cjs/calcite-tab.cjs.entry.js +112 -0
  109. package/dist/cjs/calcite-table-cell.cjs.entry.js +156 -0
  110. package/dist/cjs/calcite-table-header.cjs.entry.js +169 -0
  111. package/dist/cjs/calcite-table-row.cjs.entry.js +6 -6
  112. package/dist/cjs/calcite-table.cjs.entry.js +9 -9
  113. package/dist/cjs/calcite-tabs.cjs.entry.js +178 -0
  114. package/dist/cjs/calcite-text-area.cjs.entry.js +15 -16
  115. package/dist/cjs/calcite-tile-select-group.cjs.entry.js +3 -3
  116. package/dist/cjs/calcite-tile-select.cjs.entry.js +4 -4
  117. package/dist/cjs/calcite-tile.cjs.entry.js +7 -7
  118. package/dist/cjs/calcite-time-picker.cjs.entry.js +9 -9
  119. package/dist/cjs/calcite-tip-group.cjs.entry.js +1 -1
  120. package/dist/cjs/calcite-tip-manager.cjs.entry.js +15 -8
  121. package/dist/cjs/calcite-tip.cjs.entry.js +9 -9
  122. package/dist/cjs/calcite-tooltip.cjs.entry.js +7 -7
  123. package/dist/cjs/calcite-tree-item.cjs.entry.js +296 -0
  124. package/dist/cjs/calcite-tree.cjs.entry.js +315 -0
  125. package/dist/cjs/calcite-value-list-item.cjs.entry.js +157 -0
  126. package/dist/cjs/calcite-value-list.cjs.entry.js +326 -0
  127. package/dist/cjs/card-manager.cjs.entry.js +107 -0
  128. package/dist/cjs/card-manager_3.cjs.entry.js +1 -1
  129. package/dist/cjs/common-1b4bd8de.js +297 -0
  130. package/dist/cjs/conditionalSlot-73e71a05.js +63 -0
  131. package/dist/cjs/consent-manager.cjs.entry.js +379 -15
  132. package/dist/cjs/create-feature.cjs.entry.js +263 -0
  133. package/dist/cjs/crowdsource-manager.cjs.entry.js +7 -5
  134. package/dist/cjs/crowdsource-reporter.cjs.entry.js +9 -7
  135. package/dist/cjs/cs-1ea34123.js +148 -0
  136. package/dist/cjs/da-199f5488.js +67 -0
  137. package/dist/cjs/date-3d094f58.js +261 -0
  138. package/dist/cjs/de-222afa04.js +92 -0
  139. package/dist/cjs/de-at-a62870ea.js +91 -0
  140. package/dist/cjs/de-ch-b0b46c1b.js +91 -0
  141. package/dist/cjs/deduct-calculator.cjs.entry.js +1 -1
  142. package/dist/cjs/delete-button.cjs.entry.js +150 -0
  143. package/dist/cjs/dom-cf1e2e9f.js +1114 -0
  144. package/dist/cjs/{downloadUtils-c2bd7c80.js → downloadUtils-1f283d95.js} +37 -6
  145. package/dist/cjs/downloadUtils-de0c0682.js +4246 -0
  146. package/dist/cjs/edit-card.cjs.entry.js +228 -0
  147. package/dist/cjs/el-934951a0.js +67 -0
  148. package/dist/cjs/en-au-6872d248.js +67 -0
  149. package/dist/cjs/en-ca-7133c4f2.js +66 -0
  150. package/dist/cjs/en-gb-2c66b954.js +70 -0
  151. package/dist/cjs/es-48e65aa5.js +67 -0
  152. package/dist/cjs/es-mx-46d70897.js +66 -0
  153. package/dist/cjs/esri-loader-5b8fbfa4.js +308 -0
  154. package/dist/cjs/et-63c5628d.js +93 -0
  155. package/dist/cjs/feature-comments.cjs.entry.js +1 -1
  156. package/dist/cjs/feature-form-flow-item.cjs.entry.js +1 -1
  157. package/dist/cjs/feature-list.cjs.entry.js +199 -0
  158. package/dist/cjs/features-flow-item.cjs.entry.js +1 -1
  159. package/dist/cjs/fi-dc20f9ac.js +116 -0
  160. package/dist/cjs/filter-cc2705b7.js +48 -0
  161. package/dist/cjs/floating-ui-90bd00af.js +2350 -0
  162. package/dist/cjs/floor-filter.cjs.entry.js +111 -0
  163. package/dist/cjs/focusTrapComponent-946b0666.js +1028 -0
  164. package/dist/cjs/form-da52e819.js +316 -0
  165. package/dist/cjs/fr-7067996a.js +69 -0
  166. package/dist/cjs/fr-ch-dbd7ba02.js +67 -0
  167. package/dist/cjs/he-4eb6a5a9.js +106 -0
  168. package/dist/cjs/helpers-7415d67a.js +830 -0
  169. package/dist/cjs/{helpers-81779c18.js → helpers-b014d9a9.js} +1 -1
  170. package/dist/cjs/hi-5563acd4.js +66 -0
  171. package/dist/cjs/hr-7a0a4191.js +81 -0
  172. package/dist/cjs/html2canvas-57f1616d.js +7847 -0
  173. package/dist/cjs/hu-0b69b8fb.js +89 -0
  174. package/dist/cjs/id-345dd5a9.js +67 -0
  175. package/dist/cjs/index-5799a29c.js +41521 -0
  176. package/dist/cjs/index-8c75d784.js +1958 -0
  177. package/dist/cjs/index-af047760.js +201 -0
  178. package/dist/cjs/index-b53bfd7c.js +4185 -0
  179. package/dist/cjs/index.cjs.js +15 -0
  180. package/dist/cjs/index.es-152bb462.js +11342 -0
  181. package/dist/cjs/{index.es-22b3d1a2.js → index.es-4af23ecc.js} +1 -1
  182. package/dist/cjs/info-card.cjs.entry.js +320 -0
  183. package/dist/cjs/instant-apps-ckeditor-wrapper.cjs.entry.js +125 -0
  184. package/dist/cjs/instant-apps-ckeditor-wrapper_3.cjs.entry.js +4 -4
  185. package/dist/cjs/instant-apps-control-panel.cjs.entry.js +4 -4
  186. package/dist/cjs/instant-apps-export.cjs.entry.js +20 -14
  187. package/dist/cjs/instant-apps-filter-list.cjs.entry.js +1059 -0
  188. package/dist/cjs/instant-apps-header.cjs.entry.js +5 -4
  189. package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +25 -21
  190. package/dist/cjs/instant-apps-interactive-legend-count.cjs.entry.js +104 -0
  191. package/dist/cjs/instant-apps-interactive-legend-count_2.cjs.entry.js +2 -2
  192. package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +7 -6
  193. package/dist/cjs/instant-apps-interactive-legend-group-legend-element.cjs.entry.js +56 -0
  194. package/dist/cjs/instant-apps-interactive-legend-group-legend-element_5.cjs.entry.js +2 -2
  195. package/dist/cjs/instant-apps-interactive-legend-layer-element-caption.cjs.entry.js +55 -0
  196. package/dist/cjs/instant-apps-interactive-legend-layer-element.cjs.entry.js +57 -0
  197. package/dist/cjs/instant-apps-interactive-legend-legend-element-caption.cjs.entry.js +104 -0
  198. package/dist/cjs/instant-apps-interactive-legend-legend-element.cjs.entry.js +65 -0
  199. package/dist/cjs/instant-apps-interactive-legend-relationship.cjs.entry.js +552 -0
  200. package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +9 -8
  201. package/dist/cjs/instant-apps-keyboard-shortcuts.cjs.entry.js +6 -6
  202. package/dist/cjs/instant-apps-landing-page.cjs.entry.js +2 -2
  203. package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +9 -9
  204. package/dist/cjs/instant-apps-language-translator-item.cjs.entry.js +384 -0
  205. package/dist/cjs/instant-apps-language-translator-search.cjs.entry.js +105 -0
  206. package/dist/cjs/instant-apps-language-translator.cjs.entry.js +9 -9
  207. package/dist/cjs/instant-apps-measurement-tool.cjs.entry.js +139 -0
  208. package/dist/cjs/instant-apps-measurement.cjs.entry.js +7 -7
  209. package/dist/cjs/instant-apps-popover.cjs.entry.js +6 -6
  210. package/dist/cjs/instant-apps-popovers.cjs.entry.js +1 -1
  211. package/dist/cjs/instant-apps-scoreboard.cjs.entry.js +6 -6
  212. package/dist/cjs/instant-apps-social-share.cjs.entry.js +515 -0
  213. package/dist/cjs/instant-apps-splash.cjs.entry.js +17 -8
  214. package/dist/cjs/interactive-08e5bc95.js +144 -0
  215. package/dist/cjs/it-ac7cf3e5.js +67 -0
  216. package/dist/cjs/it-ch-6f7209eb.js +67 -0
  217. package/dist/cjs/ja-29e7b0a2.js +73 -0
  218. package/dist/cjs/json-editor.cjs.entry.js +406 -0
  219. package/dist/cjs/key-86f4a0b0.js +47 -0
  220. package/dist/cjs/ko-aeebde8b.js +73 -0
  221. package/dist/cjs/label-24b05042.js +186 -0
  222. package/dist/cjs/{languageSwitcher-4822684b.js → languageSwitcher-3870c772.js} +1 -1
  223. package/dist/cjs/languageSwitcher-aafa5b47.js +58 -0
  224. package/dist/cjs/{languageUtil-9bd00bad.js → languageUtil-0df39c0c.js} +1 -1
  225. package/dist/cjs/languageUtil-43c3acdc.js +90 -0
  226. package/dist/cjs/layer-list.cjs.entry.js +207 -0
  227. package/dist/cjs/layer-table.cjs.entry.js +1487 -0
  228. package/dist/cjs/layout-manager.cjs.entry.js +5 -4
  229. package/dist/cjs/list-flow-item.cjs.entry.js +1 -1
  230. package/dist/cjs/{loadModules-69fc5b98.js → loadModules-01306709.js} +1 -1
  231. package/dist/cjs/loadModules-a67b6702.js +23 -0
  232. package/dist/cjs/loadModules-b5f244cd.js +30 -0
  233. package/dist/cjs/loadable-41446b78.js +97 -0
  234. package/dist/cjs/loader.cjs.js +4 -4
  235. package/dist/cjs/{locale-3e33f44c.js → locale-28c7c569.js} +2 -2
  236. package/dist/cjs/locale-42a9e623.js +152 -0
  237. package/dist/cjs/locale-4cef466e.js +91 -0
  238. package/dist/cjs/locale-a615b02f.js +585 -0
  239. package/dist/cjs/location-flow-item.cjs.entry.js +1 -1
  240. package/dist/cjs/lodash-7587da9f.js +18030 -0
  241. package/dist/cjs/lt-6816d14c.js +98 -0
  242. package/dist/cjs/lv-2c998515.js +67 -0
  243. package/dist/cjs/map-card.cjs.entry.js +192 -0
  244. package/dist/cjs/map-draw-tools.cjs.entry.js +358 -0
  245. package/dist/cjs/map-fullscreen.cjs.entry.js +116 -0
  246. package/dist/cjs/map-layer-picker.cjs.entry.js +346 -0
  247. package/dist/cjs/map-legend.cjs.entry.js +109 -0
  248. package/dist/cjs/map-picker.cjs.entry.js +174 -0
  249. package/dist/cjs/map-search.cjs.entry.js +184 -0
  250. package/dist/cjs/map-select-tools.cjs.entry.js +798 -0
  251. package/dist/cjs/map-select-tools_3.cjs.entry.js +1 -1
  252. package/dist/cjs/map-tools.cjs.entry.js +375 -0
  253. package/dist/cjs/mapViewUtils-6fa5bab1.js +271 -0
  254. package/dist/cjs/mk-147994ea.js +67 -0
  255. package/dist/cjs/mode-a0417ce5.js +27 -0
  256. package/dist/cjs/nb-f3d75f05.js +68 -0
  257. package/dist/cjs/nl-cb0a22c8.js +68 -0
  258. package/dist/cjs/observers-5923a7cc.js +58 -0
  259. package/dist/cjs/openCloseComponent-8d9cb545.js +140 -0
  260. package/dist/cjs/parser-e80279bf.js +1656 -0
  261. package/dist/cjs/pci-calculator.cjs.entry.js +1 -1
  262. package/dist/cjs/pdf-download.cjs.entry.js +359 -0
  263. package/dist/cjs/pl-ade28edd.js +115 -0
  264. package/dist/cjs/popupUtils-4de17e65.js +96 -0
  265. package/dist/cjs/pt-5543b782.js +68 -0
  266. package/dist/cjs/pt-br-bdce1868.js +66 -0
  267. package/dist/cjs/public-notification.cjs.entry.js +12 -11
  268. package/dist/cjs/publicNotificationStore-f690e171.js +47 -0
  269. package/dist/cjs/purify-557ad134.js +1715 -0
  270. package/dist/cjs/queryUtils-aba29fcf.js +253 -0
  271. package/dist/cjs/refine-results-flow-item.cjs.entry.js +1 -1
  272. package/dist/cjs/refine-selection.cjs.entry.js +411 -0
  273. package/dist/cjs/resources-2ccf85d3.js +53 -0
  274. package/dist/cjs/resources-37006465.js +29 -0
  275. package/dist/cjs/resources-63b3a6b8.js +116 -0
  276. package/dist/cjs/resources-a2b1b149.js +49 -0
  277. package/dist/cjs/resources-ac626172.js +26 -0
  278. package/dist/cjs/resources-b0cc39b4.js +30 -0
  279. package/dist/cjs/ro-f4bb9704.js +67 -0
  280. package/dist/cjs/ru-ba86b627.js +127 -0
  281. package/dist/cjs/shadow-css-bbaea014.js +483 -0
  282. package/dist/cjs/share-item.cjs.entry.js +1 -1
  283. package/dist/cjs/shared-list-render-c8555864.js +370 -0
  284. package/dist/cjs/sk-ac03aca5.js +149 -0
  285. package/dist/cjs/sl-c68e3fd0.js +169 -0
  286. package/dist/cjs/solution-configuration.cjs.entry.js +21 -1105
  287. package/dist/cjs/solution-contents.cjs.entry.js +84 -0
  288. package/dist/cjs/solution-item-details.cjs.entry.js +199 -0
  289. package/dist/cjs/solution-item-icon.cjs.entry.js +1 -1
  290. package/dist/cjs/solution-item-sharing.cjs.entry.js +139 -0
  291. package/dist/cjs/solution-item.cjs.entry.js +106 -0
  292. package/dist/cjs/solution-organization-variables.cjs.entry.js +95 -0
  293. package/dist/cjs/solution-resource-item.cjs.entry.js +284 -0
  294. package/dist/cjs/solution-spatial-ref.cjs.entry.js +158 -0
  295. package/dist/cjs/solution-store-6194ba89.js +589 -0
  296. package/dist/cjs/solution-template-data.cjs.entry.js +119 -0
  297. package/dist/cjs/solution-variables.cjs.entry.js +107 -0
  298. package/dist/cjs/solutions-components.cjs.js +36 -5
  299. package/dist/cjs/sortableComponent-5e3419af.js +3443 -0
  300. package/dist/cjs/spatial-ref.cjs.entry.js +7 -6
  301. package/dist/cjs/sr-80f65cf0.js +102 -0
  302. package/dist/cjs/store-1f422ad4.js +91 -0
  303. package/dist/cjs/store-manager.cjs.entry.js +1 -1
  304. package/dist/cjs/sv-eee15401.js +72 -0
  305. package/dist/cjs/t9n-463dcbff.js +103 -0
  306. package/dist/cjs/th-f90768db.js +66 -0
  307. package/dist/cjs/time-4a9bf7e2.js +289 -0
  308. package/dist/cjs/tr-37fec0b5.js +67 -0
  309. package/dist/cjs/uk-3041a292.js +105 -0
  310. package/dist/cjs/utils-3a633152.js +64 -0
  311. package/dist/cjs/utils-7281bf72.js +110 -0
  312. package/dist/cjs/utils-72a66b3c.js +66 -0
  313. package/dist/cjs/utils-934ee777.js +142 -0
  314. package/dist/cjs/{utils-ea7a5a63.js → utils-ac836e7a.js} +1 -1
  315. package/dist/cjs/utils-b276a49d.js +226 -0
  316. package/dist/cjs/vi-57a02ad1.js +71 -0
  317. package/dist/cjs/zh-cn-165c486d.js +95 -0
  318. package/dist/cjs/zh-hk-0aa560a6.js +72 -0
  319. package/dist/cjs/zh-tw-42d975f0.js +93 -0
  320. package/dist/collection/utils/downloadUtils.js +36 -5
  321. package/dist/collection/utils/downloadUtils.ts +44 -5
  322. package/dist/collection/utils/test/downloadUtils.spec.js +33 -1
  323. package/dist/collection/utils/test/downloadUtils.spec.tsx +40 -1
  324. package/dist/components/ExpandToggle.js +8 -8
  325. package/dist/components/InitiativeUiSchemaEdit.js +26 -0
  326. package/dist/components/ProjectUiSchemaCreate.js +122 -0
  327. package/dist/components/ProjectUiSchemaEdit.js +176 -0
  328. package/dist/components/_commonjsHelpers.js +10 -2
  329. package/dist/components/action-bar.js +3 -3
  330. package/dist/components/action-group.js +1 -1
  331. package/dist/components/action-menu.js +1 -1
  332. package/dist/components/action-pad.js +1 -1
  333. package/dist/components/action.js +1 -1
  334. package/dist/components/alert.js +2 -2
  335. package/dist/components/arcgis-login.js +1 -1
  336. package/dist/components/avatar.js +1 -1
  337. package/dist/components/basemap-gallery2.js +1 -1
  338. package/dist/components/block.js +1 -1
  339. package/dist/components/buffer-tools2.js +1 -1
  340. package/dist/components/button.js +1 -1
  341. package/dist/components/calcite-accordion-item.js +1 -1
  342. package/dist/components/calcite-accordion.js +1 -1
  343. package/dist/components/calcite-block-section.js +1 -1
  344. package/dist/components/calcite-card.js +1 -1
  345. package/dist/components/calcite-chip-group.js +1 -1
  346. package/dist/components/calcite-color-picker.js +5 -5
  347. package/dist/components/calcite-combobox-item-group.js +1 -1
  348. package/dist/components/calcite-fab.js +1 -1
  349. package/dist/components/calcite-inline-editable.js +1 -1
  350. package/dist/components/calcite-input-time-picker.js +5 -1
  351. package/dist/components/calcite-input-time-zone.js +2 -2
  352. package/dist/components/calcite-list-item-group.js +1 -1
  353. package/dist/components/calcite-menu-item.js +1 -1
  354. package/dist/components/calcite-meter.js +1 -1
  355. package/dist/components/calcite-navigation-logo.js +1 -1
  356. package/dist/components/calcite-navigation-user.js +1 -1
  357. package/dist/components/calcite-navigation.js +1 -1
  358. package/dist/components/calcite-option-group.js +1 -1
  359. package/dist/components/calcite-pick-list-group.js +3 -3
  360. package/dist/components/calcite-pick-list.js +1 -1
  361. package/dist/components/calcite-radio-button-group.js +1 -1
  362. package/dist/components/calcite-rating.js +3 -1
  363. package/dist/components/calcite-sheet.js +1 -1
  364. package/dist/components/calcite-shell-center-row.js +1 -1
  365. package/dist/components/calcite-sortable-list.js +1 -1
  366. package/dist/components/calcite-split-button.js +1 -1
  367. package/dist/components/calcite-stepper-item.js +1 -1
  368. package/dist/components/calcite-stepper.js +1 -1
  369. package/dist/components/calcite-table-row.js +1 -1
  370. package/dist/components/calcite-table.js +1 -1
  371. package/dist/components/calcite-text-area.js +2 -2
  372. package/dist/components/calcite-tile-select-group.js +1 -1
  373. package/dist/components/calcite-tile-select.js +1 -1
  374. package/dist/components/calcite-tile.js +1 -1
  375. package/dist/components/calcite-tip-group.js +1 -1
  376. package/dist/components/calcite-tip-manager.js +8 -1
  377. package/dist/components/calcite-tip.js +2 -2
  378. package/dist/components/card-manager2.js +1 -1
  379. package/dist/components/checkbox.js +1 -1
  380. package/dist/components/chip.js +1 -1
  381. package/dist/components/color-picker-hex-input.js +2 -2
  382. package/dist/components/color-picker-swatch.js +1 -1
  383. package/dist/components/combobox-item.js +1 -1
  384. package/dist/components/combobox.js +314 -3
  385. package/dist/components/consent-manager.js +376 -13
  386. package/dist/components/create-feature2.js +1 -1
  387. package/dist/components/crowdsource-manager.js +1 -1
  388. package/dist/components/crowdsource-reporter.js +1 -1
  389. package/dist/components/date-picker-day.js +1 -1
  390. package/dist/components/date-picker-month-header.js +1 -1
  391. package/dist/components/date-picker-month.js +1 -1
  392. package/dist/components/date-picker.js +1 -1
  393. package/dist/components/deduct-calculator2.js +1 -1
  394. package/dist/components/delete-button2.js +1 -1
  395. package/dist/components/dom.js +28 -1
  396. package/dist/components/downloadUtils.js +1213 -102
  397. package/dist/components/dropdown-group.js +1 -1
  398. package/dist/components/dropdown-item.js +1 -1
  399. package/dist/components/dropdown.js +1 -1
  400. package/dist/components/edit-card2.js +1 -1
  401. package/dist/components/esri-loader.js +8 -3
  402. package/dist/components/feature-comments.js +1 -1
  403. package/dist/components/feature-form-flow-item.js +1 -1
  404. package/dist/components/feature-list2.js +1 -1
  405. package/dist/components/features-flow-item.js +1 -1
  406. package/dist/components/filter.js +1 -718
  407. package/dist/components/filter2.js +2 -2
  408. package/dist/components/floating-ui.js +384 -7
  409. package/dist/components/floor-filter2.js +1 -1
  410. package/dist/components/flow-item.js +1 -1
  411. package/dist/components/flow.js +1 -1
  412. package/dist/components/focusTrapComponent.js +1 -1
  413. package/dist/components/form.js +1 -1
  414. package/dist/components/graph.js +1 -1
  415. package/dist/components/handle.js +1 -1
  416. package/dist/components/helpers.js +6 -2
  417. package/dist/components/html2canvas.js +8 -3
  418. package/dist/components/icon.js +1 -1
  419. package/dist/components/index.es.js +555 -22
  420. package/dist/components/index.js +16 -0
  421. package/dist/components/index2.js +3 -0
  422. package/dist/components/index3.js +41270 -1873
  423. package/dist/components/index5.js +2086 -185
  424. package/dist/components/index6.js +188 -55
  425. package/dist/components/index7.js +71 -0
  426. package/dist/components/info-card2.js +1 -1
  427. package/dist/components/input-date-picker.js +1 -1
  428. package/dist/components/input-message.js +1 -1
  429. package/dist/components/input-number.js +1 -1
  430. package/dist/components/input-text.js +1 -1
  431. package/dist/components/input.js +1 -1
  432. package/dist/components/instant-apps-ckeditor-wrapper2.js +1 -1
  433. package/dist/components/instant-apps-control-panel.js +1 -1
  434. package/dist/components/instant-apps-export.js +14 -8
  435. package/dist/components/instant-apps-filter-list2.js +2 -1
  436. package/dist/components/instant-apps-header2.js +2 -2
  437. package/dist/components/instant-apps-interactive-legend-classic2.js +10 -7
  438. package/dist/components/instant-apps-interactive-legend-count2.js +2 -2
  439. package/dist/components/instant-apps-interactive-legend-group-legend-element-caption.js +1 -1
  440. package/dist/components/instant-apps-interactive-legend-group-legend-element2.js +1 -1
  441. package/dist/components/instant-apps-interactive-legend-layer-element-caption2.js +1 -1
  442. package/dist/components/instant-apps-interactive-legend-layer-element2.js +1 -1
  443. package/dist/components/instant-apps-interactive-legend-legend-element-caption2.js +2 -2
  444. package/dist/components/instant-apps-interactive-legend-legend-element2.js +1 -1
  445. package/dist/components/instant-apps-interactive-legend-relationship2.js +1 -1
  446. package/dist/components/instant-apps-interactive-legend.js +1 -1
  447. package/dist/components/instant-apps-keyboard-shortcuts.js +1 -1
  448. package/dist/components/instant-apps-landing-page.js +2 -2
  449. package/dist/components/instant-apps-language-switcher.js +1 -1
  450. package/dist/components/instant-apps-language-translator-item2.js +1 -1
  451. package/dist/components/instant-apps-language-translator-search2.js +1 -1
  452. package/dist/components/instant-apps-language-translator2.js +1 -1
  453. package/dist/components/instant-apps-measurement-tool2.js +1 -1
  454. package/dist/components/instant-apps-measurement.js +2 -2
  455. package/dist/components/instant-apps-popover.js +1 -1
  456. package/dist/components/instant-apps-popovers.js +1 -1
  457. package/dist/components/instant-apps-scoreboard.js +1 -1
  458. package/dist/components/instant-apps-social-share2.js +14 -8
  459. package/dist/components/instant-apps-splash.js +18 -4
  460. package/dist/components/json-editor2.js +1 -1
  461. package/dist/components/key.js +28 -0
  462. package/dist/components/label.js +1 -1
  463. package/dist/components/label2.js +1 -1
  464. package/dist/components/languageUtil.js +23 -2
  465. package/dist/components/layer-list2.js +1 -1
  466. package/dist/components/layer-table2.js +1 -1
  467. package/dist/components/layout-manager.js +1 -1
  468. package/dist/components/link.js +1 -1
  469. package/dist/components/list-flow-item.js +1 -1
  470. package/dist/components/list-item.js +1 -1
  471. package/dist/components/list.js +2 -2
  472. package/dist/components/loadModules2.js +1 -1
  473. package/dist/components/loader.js +1 -1
  474. package/dist/components/locale.js +12 -0
  475. package/dist/components/locale2.js +2 -1
  476. package/dist/components/location-flow-item.js +1 -1
  477. package/dist/components/lodash.js +18025 -0
  478. package/dist/components/map-card2.js +1 -1
  479. package/dist/components/map-draw-tools2.js +1 -1
  480. package/dist/components/map-fullscreen2.js +1 -1
  481. package/dist/components/map-layer-picker2.js +1 -1
  482. package/dist/components/map-legend2.js +1 -1
  483. package/dist/components/map-picker2.js +1 -1
  484. package/dist/components/map-search2.js +1 -1
  485. package/dist/components/map-select-tools2.js +1 -1
  486. package/dist/components/map-tools2.js +3 -1
  487. package/dist/components/menu.js +1 -1
  488. package/dist/components/modal.js +7 -1
  489. package/dist/components/mode.js +8 -0
  490. package/dist/components/notice.js +1 -1
  491. package/dist/components/openCloseComponent.js +48 -0
  492. package/dist/components/option.js +1 -1
  493. package/dist/components/pagination.js +194 -1
  494. package/dist/components/panel.js +2 -1
  495. package/dist/components/parser.js +1654 -0
  496. package/dist/components/pci-calculator.js +1 -1
  497. package/dist/components/pdf-download2.js +1 -1
  498. package/dist/components/pick-list-item.js +1 -1
  499. package/dist/components/popover.js +1 -1
  500. package/dist/components/progress.js +1 -1
  501. package/dist/components/public-notification.js +1 -1
  502. package/dist/components/purify.js +5 -2
  503. package/dist/components/queryUtils.js +43 -0
  504. package/dist/components/radio-button.js +1 -1
  505. package/dist/components/refine-results-flow-item.js +1 -1
  506. package/dist/components/refine-selection2.js +1 -1
  507. package/dist/components/resources.js +17 -0
  508. package/dist/components/resources4.js +3 -0
  509. package/dist/components/scrim.js +1 -1
  510. package/dist/components/segmented-control-item.js +1 -1
  511. package/dist/components/segmented-control.js +1 -1
  512. package/dist/components/select.js +1 -1
  513. package/dist/components/share-item.js +1 -1
  514. package/dist/components/shared-list-render.js +6 -1
  515. package/dist/components/shell-panel.js +1 -1
  516. package/dist/components/shell.js +1 -1
  517. package/dist/components/slider.js +3 -1
  518. package/dist/components/solution-configuration.js +2 -1088
  519. package/dist/components/solution-contents2.js +1 -1
  520. package/dist/components/solution-item-details2.js +1 -1
  521. package/dist/components/solution-item-icon2.js +1 -1
  522. package/dist/components/solution-item-sharing2.js +1 -1
  523. package/dist/components/solution-item2.js +1 -1
  524. package/dist/components/solution-organization-variables2.js +1 -1
  525. package/dist/components/solution-resource-item2.js +2 -3
  526. package/dist/components/solution-spatial-ref2.js +1 -1
  527. package/dist/components/solution-store.js +1 -756
  528. package/dist/components/solution-template-data2.js +1 -1
  529. package/dist/components/solution-variables2.js +1 -1
  530. package/dist/components/sortableComponent.js +701 -0
  531. package/dist/components/spatial-ref2.js +263 -4
  532. package/dist/components/stack.js +1 -1
  533. package/dist/components/store-manager.js +1 -1
  534. package/dist/components/store.js +1 -0
  535. package/dist/components/switch.js +1 -1
  536. package/dist/components/t9n.js +1 -1
  537. package/dist/components/tab-nav.js +1 -1
  538. package/dist/components/tab-title.js +1 -1
  539. package/dist/components/tab.js +1 -1
  540. package/dist/components/table-cell.js +1 -1
  541. package/dist/components/table-header.js +1 -1
  542. package/dist/components/tabs.js +1 -1
  543. package/dist/components/time-picker.js +2 -2
  544. package/dist/components/tooltip.js +1 -1
  545. package/dist/components/tree-item.js +1 -1
  546. package/dist/components/tree.js +1 -1
  547. package/dist/components/utils.js +6 -1
  548. package/dist/components/utils2.js +1 -1
  549. package/dist/components/utils4.js +12 -0
  550. package/dist/components/value-list-item.js +1 -1
  551. package/dist/components/value-list.js +4 -1
  552. package/dist/esm/ExpandToggle-22fd2faa.js +110 -0
  553. package/dist/esm/FloatingArrow-de6fd1c7.js +48 -0
  554. package/dist/esm/Heading-f003a141.js +22 -0
  555. package/dist/esm/InitiativeUiSchemaEdit-8ddacfe8.js +26 -0
  556. package/dist/esm/ProjectUiSchemaCreate-dd179c0f.js +124 -0
  557. package/dist/esm/ProjectUiSchemaEdit-fbfdf6e4.js +176 -0
  558. package/dist/esm/Validation-59a77488.js +18 -0
  559. package/dist/esm/_commonjsHelpers-3cd6d4ee.js +49 -0
  560. package/dist/esm/app-globals-928553ab.js +67 -0
  561. package/dist/esm/ar-75ffdabb.js +103 -0
  562. package/dist/esm/arcgis-login.entry.js +1 -1
  563. package/dist/esm/basemap-gallery.entry.js +117 -0
  564. package/dist/esm/bg-fac0bf10.js +81 -0
  565. package/dist/esm/browser-b8d08bed.js +26 -0
  566. package/dist/esm/bs-c03c8ef2.js +50 -0
  567. package/dist/esm/buffer-tools.entry.js +253 -0
  568. package/dist/esm/ca-29e49f82.js +70 -0
  569. package/dist/esm/calcite-accordion-item.entry.js +5 -5
  570. package/dist/esm/calcite-accordion.entry.js +2 -2
  571. package/dist/esm/calcite-action-bar.entry.js +11 -11
  572. package/dist/esm/calcite-action-group.entry.js +12 -12
  573. package/dist/esm/calcite-action-menu.entry.js +291 -0
  574. package/dist/esm/calcite-action-pad.entry.js +165 -0
  575. package/dist/esm/calcite-action-pad_2.entry.js +1 -1
  576. package/dist/esm/calcite-action.entry.js +184 -0
  577. package/dist/esm/calcite-alert.entry.js +318 -0
  578. package/dist/esm/calcite-avatar.entry.js +4 -4
  579. package/dist/esm/calcite-block-section.entry.js +8 -8
  580. package/dist/esm/calcite-block.entry.js +210 -0
  581. package/dist/esm/calcite-button.entry.js +13 -13
  582. package/dist/esm/calcite-card.entry.js +8 -8
  583. package/dist/esm/calcite-checkbox.entry.js +9 -9
  584. package/dist/esm/calcite-chip-group.entry.js +7 -7
  585. package/dist/esm/calcite-chip.entry.js +258 -0
  586. package/dist/esm/calcite-color-picker-hex-input.entry.js +270 -0
  587. package/dist/esm/calcite-color-picker-swatch.entry.js +95 -0
  588. package/dist/esm/calcite-color-picker.entry.js +16 -16
  589. package/dist/esm/calcite-combobox-item-group.entry.js +4 -4
  590. package/dist/esm/calcite-combobox-item.entry.js +141 -0
  591. package/dist/esm/calcite-combobox.entry.js +1427 -0
  592. package/dist/esm/calcite-date-picker-day.entry.js +93 -0
  593. package/dist/esm/calcite-date-picker-month-header.entry.js +203 -0
  594. package/dist/esm/calcite-date-picker-month.entry.js +358 -0
  595. package/dist/esm/calcite-date-picker.entry.js +456 -0
  596. package/dist/esm/calcite-dropdown-group.entry.js +81 -0
  597. package/dist/esm/calcite-dropdown-item.entry.js +184 -0
  598. package/dist/esm/calcite-dropdown.entry.js +426 -0
  599. package/dist/esm/calcite-fab.entry.js +6 -6
  600. package/dist/esm/calcite-filter.entry.js +175 -0
  601. package/dist/esm/calcite-flow-item.entry.js +194 -0
  602. package/dist/esm/calcite-flow.entry.js +149 -0
  603. package/dist/esm/calcite-graph.entry.js +222 -0
  604. package/dist/esm/calcite-handle.entry.js +200 -0
  605. package/dist/esm/calcite-icon.entry.js +5 -5
  606. package/dist/esm/calcite-inline-editable.entry.js +11 -11
  607. package/dist/esm/calcite-input-date-picker.entry.js +740 -0
  608. package/dist/esm/calcite-input-date-picker_3.entry.js +16 -10
  609. package/dist/esm/calcite-input-message.entry.js +66 -0
  610. package/dist/esm/calcite-input-number.entry.js +13 -13
  611. package/dist/esm/calcite-input-text.entry.js +13 -13
  612. package/dist/esm/calcite-input-time-picker-e5cd4d26.js +1851 -0
  613. package/dist/esm/calcite-input-time-picker.entry.js +17 -17
  614. package/dist/esm/calcite-input-time-zone.entry.js +12 -12
  615. package/dist/esm/calcite-input.entry.js +691 -0
  616. package/dist/esm/calcite-label.entry.js +4 -4
  617. package/dist/esm/calcite-link.entry.js +6 -6
  618. package/dist/esm/calcite-list-item-group.entry.js +4 -4
  619. package/dist/esm/calcite-list-item.entry.js +450 -0
  620. package/dist/esm/calcite-list.entry.js +563 -0
  621. package/dist/esm/calcite-loader.entry.js +76 -0
  622. package/dist/esm/calcite-menu-item.entry.js +8 -8
  623. package/dist/esm/calcite-menu.entry.js +8 -8
  624. package/dist/esm/calcite-meter.entry.js +8 -8
  625. package/dist/esm/calcite-modal.entry.js +17 -11
  626. package/dist/esm/calcite-navigation-logo.entry.js +2 -2
  627. package/dist/esm/calcite-navigation-user.entry.js +2 -2
  628. package/dist/esm/calcite-navigation.entry.js +4 -4
  629. package/dist/esm/calcite-notice.entry.js +10 -10
  630. package/dist/esm/calcite-option-group.entry.js +1 -1
  631. package/dist/esm/calcite-option.entry.js +84 -0
  632. package/dist/esm/calcite-pagination.entry.js +201 -8
  633. package/dist/esm/calcite-panel.entry.js +266 -0
  634. package/dist/esm/calcite-pick-list-group.entry.js +6 -6
  635. package/dist/esm/calcite-pick-list-item.entry.js +13 -13
  636. package/dist/esm/calcite-pick-list.entry.js +10 -10
  637. package/dist/esm/calcite-popover.entry.js +414 -0
  638. package/dist/esm/calcite-progress.entry.js +37 -0
  639. package/dist/esm/calcite-radio-button-group.entry.js +4 -4
  640. package/dist/esm/calcite-radio-button.entry.js +8 -8
  641. package/dist/esm/calcite-rating.entry.js +14 -12
  642. package/dist/esm/calcite-scrim.entry.js +7 -7
  643. package/dist/esm/calcite-segmented-control-item.entry.js +66 -0
  644. package/dist/esm/calcite-segmented-control.entry.js +241 -0
  645. package/dist/esm/calcite-select.entry.js +231 -0
  646. package/dist/esm/calcite-sheet.entry.js +7 -7
  647. package/dist/esm/calcite-shell-center-row.entry.js +5 -5
  648. package/dist/esm/calcite-shell-panel.entry.js +410 -0
  649. package/dist/esm/calcite-shell.entry.js +170 -0
  650. package/dist/esm/calcite-slider.entry.js +840 -0
  651. package/dist/esm/calcite-sortable-list.entry.js +7 -7
  652. package/dist/esm/calcite-split-button.entry.js +4 -4
  653. package/dist/esm/calcite-stack.entry.js +70 -0
  654. package/dist/esm/calcite-stepper-item.entry.js +10 -10
  655. package/dist/esm/calcite-stepper.entry.js +7 -7
  656. package/dist/esm/calcite-switch.entry.js +9 -9
  657. package/dist/esm/calcite-tab-nav.entry.js +259 -0
  658. package/dist/esm/calcite-tab-title.entry.js +287 -0
  659. package/dist/esm/calcite-tab.entry.js +108 -0
  660. package/dist/esm/calcite-table-cell.entry.js +152 -0
  661. package/dist/esm/calcite-table-header.entry.js +165 -0
  662. package/dist/esm/calcite-table-row.entry.js +6 -6
  663. package/dist/esm/calcite-table.entry.js +9 -9
  664. package/dist/esm/calcite-tabs.entry.js +174 -0
  665. package/dist/esm/calcite-text-area.entry.js +14 -15
  666. package/dist/esm/calcite-tile-select-group.entry.js +3 -3
  667. package/dist/esm/calcite-tile-select.entry.js +4 -4
  668. package/dist/esm/calcite-tile.entry.js +7 -7
  669. package/dist/esm/calcite-time-picker.entry.js +9 -9
  670. package/dist/esm/calcite-tip-group.entry.js +1 -1
  671. package/dist/esm/calcite-tip-manager.entry.js +15 -8
  672. package/dist/esm/calcite-tip.entry.js +9 -9
  673. package/dist/esm/calcite-tooltip.entry.js +7 -7
  674. package/dist/esm/calcite-tree-item.entry.js +292 -0
  675. package/dist/esm/calcite-tree.entry.js +311 -0
  676. package/dist/esm/calcite-value-list-item.entry.js +153 -0
  677. package/dist/esm/calcite-value-list.entry.js +322 -0
  678. package/dist/esm/card-manager.entry.js +103 -0
  679. package/dist/esm/card-manager_3.entry.js +1 -1
  680. package/dist/esm/common-7e0dcaa2.js +295 -0
  681. package/dist/esm/conditionalSlot-a395417e.js +60 -0
  682. package/dist/esm/consent-manager.entry.js +379 -15
  683. package/dist/esm/create-feature.entry.js +259 -0
  684. package/dist/esm/crowdsource-manager.entry.js +7 -5
  685. package/dist/esm/crowdsource-reporter.entry.js +7 -5
  686. package/dist/esm/cs-04f36d01.js +146 -0
  687. package/dist/esm/da-5a3b8600.js +65 -0
  688. package/dist/esm/date-74c7f03b.js +245 -0
  689. package/dist/esm/de-579cda2e.js +90 -0
  690. package/dist/esm/de-at-52bf1c4c.js +89 -0
  691. package/dist/esm/de-ch-12d03480.js +89 -0
  692. package/dist/esm/deduct-calculator.entry.js +1 -1
  693. package/dist/esm/delete-button.entry.js +146 -0
  694. package/dist/esm/dom-b91aa537.js +1083 -0
  695. package/dist/esm/{downloadUtils-a6c0e25f.js → downloadUtils-01e2cb56.js} +37 -6
  696. package/dist/esm/downloadUtils-b3220f86.js +4240 -0
  697. package/dist/esm/edit-card.entry.js +224 -0
  698. package/dist/esm/el-c18d3ea4.js +65 -0
  699. package/dist/esm/en-au-2599e6da.js +65 -0
  700. package/dist/esm/en-ca-8cfbe6bc.js +64 -0
  701. package/dist/esm/en-gb-5e4e8a1e.js +68 -0
  702. package/dist/esm/es-d86f9957.js +65 -0
  703. package/dist/esm/es-mx-f99d9fd1.js +64 -0
  704. package/dist/esm/esri-loader-af2bbfd5.js +306 -0
  705. package/dist/esm/et-8bf52e57.js +91 -0
  706. package/dist/esm/feature-comments.entry.js +1 -1
  707. package/dist/esm/feature-form-flow-item.entry.js +1 -1
  708. package/dist/esm/feature-list.entry.js +195 -0
  709. package/dist/esm/features-flow-item.entry.js +1 -1
  710. package/dist/esm/fi-aeb49e52.js +114 -0
  711. package/dist/esm/filter-0d00d2e2.js +46 -0
  712. package/dist/esm/floating-ui-b3256614.js +2342 -0
  713. package/dist/esm/floor-filter.entry.js +107 -0
  714. package/dist/esm/focusTrapComponent-2fe6623b.js +1023 -0
  715. package/dist/esm/form-f2181470.js +307 -0
  716. package/dist/esm/fr-6200cc01.js +67 -0
  717. package/dist/esm/fr-ch-df62bb30.js +65 -0
  718. package/dist/esm/he-07ace6cb.js +104 -0
  719. package/dist/esm/helpers-85ca7251.js +807 -0
  720. package/dist/esm/{helpers-aeddac74.js → helpers-f9256189.js} +1 -1
  721. package/dist/esm/hi-5aa9519e.js +64 -0
  722. package/dist/esm/hr-e0614bed.js +79 -0
  723. package/dist/esm/html2canvas-d52e7c8d.js +7845 -0
  724. package/dist/esm/hu-732fe37c.js +87 -0
  725. package/dist/esm/id-0832fc24.js +65 -0
  726. package/dist/esm/index-7fc1cba9.js +41502 -0
  727. package/dist/esm/index-91eeaf01.js +199 -0
  728. package/dist/esm/index-b1fb529b.js +1956 -0
  729. package/dist/esm/index-bdfaac50.js +4145 -0
  730. package/dist/esm/index.es-3db60115.js +11256 -0
  731. package/dist/esm/{index.es-b0a676ae.js → index.es-ac6f5e76.js} +1 -1
  732. package/dist/esm/index.js +15 -0
  733. package/dist/esm/info-card.entry.js +316 -0
  734. package/dist/esm/instant-apps-ckeditor-wrapper.entry.js +121 -0
  735. package/dist/esm/instant-apps-ckeditor-wrapper_3.entry.js +4 -4
  736. package/dist/esm/instant-apps-control-panel.entry.js +4 -4
  737. package/dist/esm/instant-apps-export.entry.js +20 -14
  738. package/dist/esm/instant-apps-filter-list.entry.js +1055 -0
  739. package/dist/esm/instant-apps-header.entry.js +5 -4
  740. package/dist/esm/instant-apps-interactive-legend-classic.entry.js +15 -11
  741. package/dist/esm/instant-apps-interactive-legend-count.entry.js +100 -0
  742. package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +2 -2
  743. package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +7 -6
  744. package/dist/esm/instant-apps-interactive-legend-group-legend-element.entry.js +52 -0
  745. package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +2 -2
  746. package/dist/esm/instant-apps-interactive-legend-layer-element-caption.entry.js +51 -0
  747. package/dist/esm/instant-apps-interactive-legend-layer-element.entry.js +53 -0
  748. package/dist/esm/instant-apps-interactive-legend-legend-element-caption.entry.js +100 -0
  749. package/dist/esm/instant-apps-interactive-legend-legend-element.entry.js +61 -0
  750. package/dist/esm/instant-apps-interactive-legend-relationship.entry.js +548 -0
  751. package/dist/esm/instant-apps-interactive-legend.entry.js +9 -8
  752. package/dist/esm/instant-apps-keyboard-shortcuts.entry.js +6 -6
  753. package/dist/esm/instant-apps-landing-page.entry.js +2 -2
  754. package/dist/esm/instant-apps-language-switcher.entry.js +9 -9
  755. package/dist/esm/instant-apps-language-translator-item.entry.js +380 -0
  756. package/dist/esm/instant-apps-language-translator-search.entry.js +101 -0
  757. package/dist/esm/instant-apps-language-translator.entry.js +9 -9
  758. package/dist/esm/instant-apps-measurement-tool.entry.js +135 -0
  759. package/dist/esm/instant-apps-measurement.entry.js +7 -7
  760. package/dist/esm/instant-apps-popover.entry.js +6 -6
  761. package/dist/esm/instant-apps-popovers.entry.js +1 -1
  762. package/dist/esm/instant-apps-scoreboard.entry.js +6 -6
  763. package/dist/esm/instant-apps-social-share.entry.js +511 -0
  764. package/dist/esm/instant-apps-splash.entry.js +17 -8
  765. package/dist/esm/interactive-71585ecc.js +139 -0
  766. package/dist/esm/it-142bc820.js +65 -0
  767. package/dist/esm/it-ch-1ad1f0ac.js +65 -0
  768. package/dist/esm/ja-6a33e9d4.js +71 -0
  769. package/dist/esm/json-editor.entry.js +402 -0
  770. package/dist/esm/key-9a10d862.js +44 -0
  771. package/dist/esm/ko-d61df01d.js +71 -0
  772. package/dist/esm/label-16184ce7.js +179 -0
  773. package/dist/esm/{languageSwitcher-4faa659f.js → languageSwitcher-068998b1.js} +1 -1
  774. package/dist/esm/languageSwitcher-2a9037e5.js +55 -0
  775. package/dist/esm/{languageUtil-dc3111c1.js → languageUtil-035e7728.js} +1 -1
  776. package/dist/esm/languageUtil-71a7a914.js +87 -0
  777. package/dist/esm/layer-list.entry.js +203 -0
  778. package/dist/esm/layer-table.entry.js +1483 -0
  779. package/dist/esm/layout-manager.entry.js +5 -4
  780. package/dist/esm/list-flow-item.entry.js +1 -1
  781. package/dist/esm/{loadModules-877bbb89.js → loadModules-7a5f1022.js} +1 -1
  782. package/dist/esm/loadModules-827c5581.js +28 -0
  783. package/dist/esm/loadModules-acccbc1c.js +21 -0
  784. package/dist/esm/loadable-aea90723.js +92 -0
  785. package/dist/esm/loader.js +5 -5
  786. package/dist/esm/{locale-bd9034e1.js → locale-4cab280d.js} +2 -2
  787. package/dist/esm/locale-4cfbae3e.js +86 -0
  788. package/dist/esm/locale-857f39cf.js +572 -0
  789. package/dist/esm/locale-d9463a95.js +148 -0
  790. package/dist/esm/location-flow-item.entry.js +1 -1
  791. package/dist/esm/lodash-98e4b7d0.js +18025 -0
  792. package/dist/esm/lt-652c530a.js +96 -0
  793. package/dist/esm/lv-84e48ed0.js +65 -0
  794. package/dist/esm/map-card.entry.js +188 -0
  795. package/dist/esm/map-draw-tools.entry.js +354 -0
  796. package/dist/esm/map-fullscreen.entry.js +112 -0
  797. package/dist/esm/map-layer-picker.entry.js +342 -0
  798. package/dist/esm/map-legend.entry.js +105 -0
  799. package/dist/esm/map-picker.entry.js +170 -0
  800. package/dist/esm/map-search.entry.js +180 -0
  801. package/dist/esm/map-select-tools.entry.js +794 -0
  802. package/dist/esm/map-select-tools_3.entry.js +1 -1
  803. package/dist/esm/map-tools.entry.js +371 -0
  804. package/dist/esm/mapViewUtils-436a516e.js +261 -0
  805. package/dist/esm/mk-bbf2ee01.js +65 -0
  806. package/dist/esm/mode-f9bfc4e9.js +25 -0
  807. package/dist/esm/nb-ccfaa0f7.js +66 -0
  808. package/dist/esm/nl-4bc56289.js +66 -0
  809. package/dist/esm/observers-5ba39eee.js +56 -0
  810. package/dist/esm/openCloseComponent-b4b3788b.js +138 -0
  811. package/dist/esm/parser-87982ce2.js +1654 -0
  812. package/dist/esm/pci-calculator.entry.js +1 -1
  813. package/dist/esm/pdf-download.entry.js +355 -0
  814. package/dist/esm/pl-1f435988.js +113 -0
  815. package/dist/esm/popupUtils-b61d7ffd.js +94 -0
  816. package/dist/esm/pt-4a05a00d.js +66 -0
  817. package/dist/esm/pt-br-9720547b.js +64 -0
  818. package/dist/esm/public-notification.entry.js +11 -10
  819. package/dist/esm/publicNotificationStore-208e26f0.js +45 -0
  820. package/dist/esm/purify-909c20fa.js +1713 -0
  821. package/dist/esm/queryUtils-2529c537.js +244 -0
  822. package/dist/esm/refine-results-flow-item.entry.js +1 -1
  823. package/dist/esm/refine-selection.entry.js +407 -0
  824. package/dist/esm/resources-0f8db821.js +45 -0
  825. package/dist/esm/resources-3c6947d3.js +26 -0
  826. package/dist/esm/resources-47b3ca40.js +106 -0
  827. package/dist/esm/resources-667afb5d.js +27 -0
  828. package/dist/esm/resources-9b2084c6.js +24 -0
  829. package/dist/esm/resources-bb6c11c3.js +49 -0
  830. package/dist/esm/ro-f87076a1.js +65 -0
  831. package/dist/esm/ru-e69ca895.js +125 -0
  832. package/dist/esm/shadow-css-f5236d52.js +481 -0
  833. package/dist/esm/share-item.entry.js +1 -1
  834. package/dist/esm/shared-list-render-a572ef93.js +348 -0
  835. package/dist/esm/sk-d632e850.js +147 -0
  836. package/dist/esm/sl-5099fa6f.js +167 -0
  837. package/dist/esm/solution-configuration.entry.js +9 -1093
  838. package/dist/esm/solution-contents.entry.js +80 -0
  839. package/dist/esm/solution-item-details.entry.js +195 -0
  840. package/dist/esm/solution-item-icon.entry.js +1 -1
  841. package/dist/esm/solution-item-sharing.entry.js +135 -0
  842. package/dist/esm/solution-item.entry.js +102 -0
  843. package/dist/esm/solution-organization-variables.entry.js +91 -0
  844. package/dist/esm/solution-resource-item.entry.js +280 -0
  845. package/dist/esm/solution-spatial-ref.entry.js +154 -0
  846. package/dist/esm/solution-store-31cccb90.js +587 -0
  847. package/dist/esm/solution-template-data.entry.js +115 -0
  848. package/dist/esm/solution-variables.entry.js +103 -0
  849. package/dist/esm/solutions-components.js +37 -6
  850. package/dist/esm/sortableComponent-e715a3dd.js +3439 -0
  851. package/dist/esm/spatial-ref.entry.js +7 -6
  852. package/dist/esm/sr-944b7fd7.js +100 -0
  853. package/dist/esm/store-194c1a01.js +87 -0
  854. package/dist/esm/store-manager.entry.js +1 -1
  855. package/dist/esm/sv-e481fa6a.js +70 -0
  856. package/dist/esm/t9n-b39c5433.js +98 -0
  857. package/dist/esm/th-60961669.js +64 -0
  858. package/dist/esm/time-4a90614b.js +274 -0
  859. package/dist/esm/tr-eba8dd86.js +65 -0
  860. package/dist/esm/uk-ec375ce0.js +103 -0
  861. package/dist/esm/utils-32df4a1e.js +133 -0
  862. package/dist/esm/utils-57e2ccde.js +61 -0
  863. package/dist/esm/{utils-28d0a086.js → utils-78fe6e5b.js} +1 -1
  864. package/dist/esm/utils-7db4ecdc.js +100 -0
  865. package/dist/esm/utils-95e9dd51.js +55 -0
  866. package/dist/esm/utils-cfbe589a.js +208 -0
  867. package/dist/esm/vi-29345f79.js +69 -0
  868. package/dist/esm/zh-cn-32c7c714.js +93 -0
  869. package/dist/esm/zh-hk-7c770845.js +70 -0
  870. package/dist/esm/zh-tw-c318be5c.js +91 -0
  871. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-header/instant-apps-header.css +1 -1
  872. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-scoreboard/instant-apps-scoreboard.css +1 -1
  873. package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-social-share/instant-apps-social-share.css +8 -1
  874. package/dist/solutions-components/ExpandToggle-22fd2faa.js +110 -0
  875. package/dist/solutions-components/FloatingArrow-de6fd1c7.js +48 -0
  876. package/dist/solutions-components/Heading-f003a141.js +22 -0
  877. package/dist/solutions-components/InitiativeUiSchemaEdit-8ddacfe8.js +26 -0
  878. package/dist/solutions-components/ProjectUiSchemaCreate-dd179c0f.js +124 -0
  879. package/dist/solutions-components/ProjectUiSchemaEdit-fbfdf6e4.js +176 -0
  880. package/dist/solutions-components/Validation-59a77488.js +18 -0
  881. package/dist/solutions-components/_commonjsHelpers-3cd6d4ee.js +49 -0
  882. package/dist/solutions-components/app-globals-928553ab.js +67 -0
  883. package/dist/solutions-components/ar-75ffdabb.js +103 -0
  884. package/dist/solutions-components/arcgis-login.entry.js +56 -0
  885. package/dist/solutions-components/array-396bdf3c.js +15 -0
  886. package/dist/solutions-components/basemap-gallery.entry.js +117 -0
  887. package/dist/solutions-components/bg-fac0bf10.js +81 -0
  888. package/dist/solutions-components/breakpoints-f0f1417d.js +15 -0
  889. package/dist/solutions-components/browser-b8d08bed.js +26 -0
  890. package/dist/solutions-components/bs-c03c8ef2.js +50 -0
  891. package/dist/solutions-components/buffer-tools.entry.js +253 -0
  892. package/dist/solutions-components/ca-29e49f82.js +70 -0
  893. package/dist/solutions-components/calcite-accordion-item.entry.js +176 -0
  894. package/dist/solutions-components/calcite-accordion.entry.js +81 -0
  895. package/dist/solutions-components/calcite-action-bar.entry.js +252 -0
  896. package/dist/solutions-components/calcite-action-group.entry.js +112 -0
  897. package/dist/solutions-components/calcite-action-menu.entry.js +291 -0
  898. package/dist/solutions-components/calcite-action-pad.entry.js +165 -0
  899. package/dist/solutions-components/calcite-action.entry.js +184 -0
  900. package/dist/solutions-components/calcite-alert.entry.js +318 -0
  901. package/dist/solutions-components/calcite-avatar.entry.js +146 -0
  902. package/dist/solutions-components/calcite-block-section.entry.js +162 -0
  903. package/dist/solutions-components/calcite-block.entry.js +210 -0
  904. package/dist/solutions-components/calcite-button.entry.js +227 -0
  905. package/dist/solutions-components/calcite-card.entry.js +132 -0
  906. package/dist/solutions-components/calcite-checkbox.entry.js +134 -0
  907. package/dist/solutions-components/calcite-chip-group.entry.js +175 -0
  908. package/dist/solutions-components/calcite-chip.entry.js +258 -0
  909. package/dist/solutions-components/calcite-color-picker-hex-input.entry.js +270 -0
  910. package/dist/solutions-components/calcite-color-picker-swatch.entry.js +95 -0
  911. package/dist/solutions-components/calcite-color-picker.entry.js +906 -0
  912. package/dist/solutions-components/calcite-combobox-item-group.entry.js +56 -0
  913. package/dist/solutions-components/calcite-combobox-item.entry.js +141 -0
  914. package/dist/solutions-components/calcite-combobox.entry.js +1427 -0
  915. package/dist/solutions-components/calcite-date-picker-day.entry.js +93 -0
  916. package/dist/solutions-components/calcite-date-picker-month-header.entry.js +203 -0
  917. package/dist/solutions-components/calcite-date-picker-month.entry.js +358 -0
  918. package/dist/solutions-components/calcite-date-picker.entry.js +456 -0
  919. package/dist/solutions-components/calcite-dropdown-group.entry.js +81 -0
  920. package/dist/solutions-components/calcite-dropdown-item.entry.js +184 -0
  921. package/dist/solutions-components/calcite-dropdown.entry.js +426 -0
  922. package/dist/solutions-components/calcite-fab.entry.js +90 -0
  923. package/dist/solutions-components/calcite-filter.entry.js +175 -0
  924. package/dist/solutions-components/calcite-flow-item.entry.js +194 -0
  925. package/dist/solutions-components/calcite-flow.entry.js +149 -0
  926. package/dist/solutions-components/calcite-graph.entry.js +222 -0
  927. package/dist/solutions-components/calcite-handle.entry.js +200 -0
  928. package/dist/solutions-components/calcite-icon.entry.js +179 -0
  929. package/dist/solutions-components/calcite-inline-editable.entry.js +253 -0
  930. package/dist/solutions-components/calcite-input-date-picker.entry.js +740 -0
  931. package/dist/solutions-components/calcite-input-message.entry.js +66 -0
  932. package/dist/solutions-components/calcite-input-number.entry.js +610 -0
  933. package/dist/solutions-components/calcite-input-text.entry.js +349 -0
  934. package/dist/solutions-components/calcite-input-time-picker-e5cd4d26.js +1851 -0
  935. package/dist/solutions-components/calcite-input-time-picker.entry.js +25 -0
  936. package/dist/solutions-components/calcite-input-time-zone.entry.js +332 -0
  937. package/dist/solutions-components/calcite-input.entry.js +691 -0
  938. package/dist/solutions-components/calcite-label.entry.js +67 -0
  939. package/dist/solutions-components/calcite-link.entry.js +108 -0
  940. package/dist/solutions-components/calcite-list-item-group.entry.js +69 -0
  941. package/dist/solutions-components/calcite-list-item.entry.js +450 -0
  942. package/dist/solutions-components/calcite-list.entry.js +563 -0
  943. package/dist/solutions-components/calcite-loader.entry.js +76 -0
  944. package/dist/solutions-components/calcite-menu-item.entry.js +281 -0
  945. package/dist/solutions-components/calcite-menu.entry.js +180 -0
  946. package/dist/solutions-components/calcite-meter.entry.js +332 -0
  947. package/dist/solutions-components/calcite-modal.entry.js +394 -0
  948. package/dist/solutions-components/calcite-navigation-logo.entry.js +84 -0
  949. package/dist/solutions-components/calcite-navigation-user.entry.js +68 -0
  950. package/dist/solutions-components/calcite-navigation.entry.js +166 -0
  951. package/dist/solutions-components/calcite-notice.entry.js +163 -0
  952. package/dist/solutions-components/calcite-option-group.entry.js +35 -0
  953. package/dist/solutions-components/calcite-option.entry.js +84 -0
  954. package/dist/solutions-components/calcite-pagination.entry.js +554 -0
  955. package/dist/solutions-components/calcite-panel.entry.js +266 -0
  956. package/dist/solutions-components/calcite-pick-list-group.entry.js +57 -0
  957. package/dist/solutions-components/calcite-pick-list-item.entry.js +193 -0
  958. package/dist/solutions-components/calcite-pick-list.entry.js +142 -0
  959. package/dist/solutions-components/calcite-popover.entry.js +414 -0
  960. package/dist/solutions-components/calcite-progress.entry.js +37 -0
  961. package/dist/solutions-components/calcite-radio-button-group.entry.js +141 -0
  962. package/dist/solutions-components/calcite-radio-button.entry.js +318 -0
  963. package/dist/solutions-components/calcite-rating.entry.js +261 -0
  964. package/dist/solutions-components/calcite-scrim.entry.js +121 -0
  965. package/dist/solutions-components/calcite-segmented-control-item.entry.js +66 -0
  966. package/dist/solutions-components/calcite-segmented-control.entry.js +241 -0
  967. package/dist/solutions-components/calcite-select.entry.js +231 -0
  968. package/dist/solutions-components/calcite-sheet.entry.js +223 -0
  969. package/dist/solutions-components/calcite-shell-center-row.entry.js +66 -0
  970. package/dist/solutions-components/calcite-shell-panel.entry.js +410 -0
  971. package/dist/solutions-components/calcite-shell.entry.js +170 -0
  972. package/dist/solutions-components/calcite-slider.entry.js +840 -0
  973. package/dist/solutions-components/calcite-sortable-list.entry.js +166 -0
  974. package/dist/solutions-components/calcite-split-button.entry.js +112 -0
  975. package/dist/solutions-components/calcite-stack.entry.js +70 -0
  976. package/dist/solutions-components/calcite-stepper-item.entry.js +238 -0
  977. package/dist/solutions-components/calcite-stepper.entry.js +377 -0
  978. package/dist/solutions-components/calcite-switch.entry.js +113 -0
  979. package/dist/solutions-components/calcite-tab-nav.entry.js +259 -0
  980. package/dist/solutions-components/calcite-tab-title.entry.js +287 -0
  981. package/dist/solutions-components/calcite-tab.entry.js +108 -0
  982. package/dist/solutions-components/calcite-table-cell.entry.js +152 -0
  983. package/dist/solutions-components/calcite-table-header.entry.js +165 -0
  984. package/dist/solutions-components/calcite-table-row.entry.js +244 -0
  985. package/dist/solutions-components/calcite-table.entry.js +314 -0
  986. package/dist/solutions-components/calcite-tabs.entry.js +174 -0
  987. package/dist/solutions-components/calcite-text-area.entry.js +276 -0
  988. package/dist/solutions-components/calcite-tile-select-group.entry.js +39 -0
  989. package/dist/solutions-components/calcite-tile-select.entry.js +225 -0
  990. package/dist/solutions-components/calcite-tile.entry.js +75 -0
  991. package/dist/solutions-components/calcite-time-picker.entry.js +839 -0
  992. package/dist/solutions-components/calcite-tip-group.entry.js +21 -0
  993. package/dist/solutions-components/calcite-tip-manager.entry.js +227 -0
  994. package/dist/solutions-components/calcite-tip.entry.js +126 -0
  995. package/dist/solutions-components/calcite-tooltip.entry.js +434 -0
  996. package/dist/solutions-components/calcite-tree-item.entry.js +292 -0
  997. package/dist/solutions-components/calcite-tree.entry.js +311 -0
  998. package/dist/solutions-components/calcite-value-list-item.entry.js +153 -0
  999. package/dist/solutions-components/calcite-value-list.entry.js +322 -0
  1000. package/dist/solutions-components/card-manager.entry.js +103 -0
  1001. package/dist/solutions-components/common-7e0dcaa2.js +295 -0
  1002. package/dist/solutions-components/component-edd2c3cd.js +30 -0
  1003. package/dist/solutions-components/conditionalSlot-a395417e.js +60 -0
  1004. package/dist/solutions-components/consent-manager.entry.js +2139 -0
  1005. package/dist/solutions-components/create-feature.entry.js +259 -0
  1006. package/dist/solutions-components/crowdsource-manager.entry.js +494 -0
  1007. package/dist/solutions-components/crowdsource-reporter.entry.js +557 -0
  1008. package/dist/solutions-components/cs-04f36d01.js +146 -0
  1009. package/dist/solutions-components/da-5a3b8600.js +65 -0
  1010. package/dist/solutions-components/date-74c7f03b.js +245 -0
  1011. package/dist/solutions-components/de-579cda2e.js +90 -0
  1012. package/dist/solutions-components/de-at-52bf1c4c.js +89 -0
  1013. package/dist/solutions-components/de-ch-12d03480.js +89 -0
  1014. package/dist/solutions-components/deduct-calculator.entry.js +101 -0
  1015. package/dist/solutions-components/delete-button.entry.js +146 -0
  1016. package/dist/solutions-components/dom-b91aa537.js +1083 -0
  1017. package/dist/solutions-components/downloadUtils-b3220f86.js +4240 -0
  1018. package/dist/solutions-components/edit-card.entry.js +224 -0
  1019. package/dist/solutions-components/el-c18d3ea4.js +65 -0
  1020. package/dist/solutions-components/en-au-2599e6da.js +65 -0
  1021. package/dist/solutions-components/en-ca-8cfbe6bc.js +64 -0
  1022. package/dist/solutions-components/en-gb-5e4e8a1e.js +68 -0
  1023. package/dist/solutions-components/es-d86f9957.js +65 -0
  1024. package/dist/solutions-components/es-mx-f99d9fd1.js +64 -0
  1025. package/dist/solutions-components/esri-loader-af2bbfd5.js +306 -0
  1026. package/dist/solutions-components/et-8bf52e57.js +91 -0
  1027. package/dist/solutions-components/feature-comments.entry.js +56 -0
  1028. package/dist/solutions-components/feature-form-flow-item.entry.js +56 -0
  1029. package/dist/solutions-components/feature-list.entry.js +195 -0
  1030. package/dist/solutions-components/features-flow-item.entry.js +56 -0
  1031. package/dist/solutions-components/fi-aeb49e52.js +114 -0
  1032. package/dist/solutions-components/filter-0d00d2e2.js +46 -0
  1033. package/dist/solutions-components/floating-ui-b3256614.js +2342 -0
  1034. package/dist/solutions-components/floor-filter.entry.js +107 -0
  1035. package/dist/solutions-components/focusTrapComponent-2fe6623b.js +1023 -0
  1036. package/dist/solutions-components/form-f2181470.js +307 -0
  1037. package/dist/solutions-components/fr-6200cc01.js +67 -0
  1038. package/dist/solutions-components/fr-ch-df62bb30.js +65 -0
  1039. package/dist/solutions-components/guid-b75a5f7b.js +24 -0
  1040. package/dist/solutions-components/he-07ace6cb.js +104 -0
  1041. package/dist/solutions-components/helpers-85ca7251.js +807 -0
  1042. package/dist/solutions-components/hi-5aa9519e.js +64 -0
  1043. package/dist/solutions-components/hr-e0614bed.js +79 -0
  1044. package/dist/solutions-components/html2canvas-d52e7c8d.js +7845 -0
  1045. package/dist/solutions-components/hu-732fe37c.js +87 -0
  1046. package/dist/solutions-components/id-0832fc24.js +65 -0
  1047. package/dist/solutions-components/index-5110a27a.js +71 -0
  1048. package/dist/solutions-components/index-7fc1cba9.js +41502 -0
  1049. package/dist/solutions-components/index-91eeaf01.js +199 -0
  1050. package/dist/solutions-components/index-a1e91462.js +2105 -0
  1051. package/dist/solutions-components/index-b1fb529b.js +1956 -0
  1052. package/dist/solutions-components/index-bdfaac50.js +4145 -0
  1053. package/dist/solutions-components/index-d8ff08ed.js +204 -0
  1054. package/dist/solutions-components/index.es-3db60115.js +11256 -0
  1055. package/dist/solutions-components/index.esm.js +15 -0
  1056. package/dist/solutions-components/info-card.entry.js +316 -0
  1057. package/dist/solutions-components/instant-apps-ckeditor-wrapper.entry.js +121 -0
  1058. package/dist/solutions-components/instant-apps-control-panel.entry.js +94 -0
  1059. package/dist/solutions-components/instant-apps-export.entry.js +888 -0
  1060. package/dist/solutions-components/instant-apps-filter-list.entry.js +1055 -0
  1061. package/dist/solutions-components/instant-apps-header.entry.js +124 -0
  1062. package/dist/solutions-components/instant-apps-interactive-legend-classic.entry.js +1604 -0
  1063. package/dist/solutions-components/instant-apps-interactive-legend-count.entry.js +100 -0
  1064. package/dist/solutions-components/instant-apps-interactive-legend-group-legend-element-caption.entry.js +53 -0
  1065. package/dist/solutions-components/instant-apps-interactive-legend-group-legend-element.entry.js +52 -0
  1066. package/dist/solutions-components/instant-apps-interactive-legend-layer-element-caption.entry.js +51 -0
  1067. package/dist/solutions-components/instant-apps-interactive-legend-layer-element.entry.js +53 -0
  1068. package/dist/solutions-components/instant-apps-interactive-legend-legend-element-caption.entry.js +100 -0
  1069. package/dist/solutions-components/instant-apps-interactive-legend-legend-element.entry.js +61 -0
  1070. package/dist/solutions-components/instant-apps-interactive-legend-relationship.entry.js +548 -0
  1071. package/dist/solutions-components/instant-apps-interactive-legend.entry.js +112 -0
  1072. package/dist/solutions-components/instant-apps-keyboard-shortcuts.entry.js +139 -0
  1073. package/dist/solutions-components/instant-apps-landing-page.entry.js +114 -0
  1074. package/dist/solutions-components/instant-apps-language-switcher.entry.js +173 -0
  1075. package/dist/solutions-components/instant-apps-language-translator-item.entry.js +380 -0
  1076. package/dist/solutions-components/instant-apps-language-translator-search.entry.js +101 -0
  1077. package/dist/solutions-components/instant-apps-language-translator.entry.js +286 -0
  1078. package/dist/solutions-components/instant-apps-measurement-tool.entry.js +135 -0
  1079. package/dist/solutions-components/instant-apps-measurement.entry.js +66 -0
  1080. package/dist/solutions-components/instant-apps-popover.entry.js +74 -0
  1081. package/dist/solutions-components/instant-apps-popovers.entry.js +88 -0
  1082. package/dist/solutions-components/instant-apps-scoreboard.entry.js +463 -0
  1083. package/dist/solutions-components/instant-apps-social-share.entry.js +511 -0
  1084. package/dist/solutions-components/instant-apps-splash.entry.js +144 -0
  1085. package/dist/solutions-components/interactive-71585ecc.js +139 -0
  1086. package/dist/solutions-components/interfaces-586e863c.js +80 -0
  1087. package/dist/solutions-components/it-142bc820.js +65 -0
  1088. package/dist/solutions-components/it-ch-1ad1f0ac.js +65 -0
  1089. package/dist/solutions-components/ja-6a33e9d4.js +71 -0
  1090. package/dist/solutions-components/json-editor.entry.js +402 -0
  1091. package/dist/solutions-components/key-9a10d862.js +44 -0
  1092. package/dist/solutions-components/ko-d61df01d.js +71 -0
  1093. package/dist/solutions-components/label-16184ce7.js +179 -0
  1094. package/dist/solutions-components/languageSwitcher-2a9037e5.js +55 -0
  1095. package/dist/solutions-components/languageUtil-71a7a914.js +87 -0
  1096. package/dist/solutions-components/layer-list.entry.js +203 -0
  1097. package/dist/solutions-components/layer-table.entry.js +1483 -0
  1098. package/dist/solutions-components/layout-manager.entry.js +91 -0
  1099. package/dist/solutions-components/list-flow-item.entry.js +56 -0
  1100. package/dist/solutions-components/loadModules-827c5581.js +28 -0
  1101. package/dist/solutions-components/loadModules-acccbc1c.js +21 -0
  1102. package/dist/solutions-components/loadable-aea90723.js +92 -0
  1103. package/dist/solutions-components/locale-4cfbae3e.js +86 -0
  1104. package/dist/solutions-components/locale-857f39cf.js +572 -0
  1105. package/dist/solutions-components/locale-d9463a95.js +148 -0
  1106. package/dist/solutions-components/location-flow-item.entry.js +56 -0
  1107. package/dist/solutions-components/lodash-98e4b7d0.js +18025 -0
  1108. package/dist/solutions-components/lt-652c530a.js +96 -0
  1109. package/dist/solutions-components/lv-84e48ed0.js +65 -0
  1110. package/dist/solutions-components/map-card.entry.js +188 -0
  1111. package/dist/solutions-components/map-draw-tools.entry.js +354 -0
  1112. package/dist/solutions-components/map-fullscreen.entry.js +112 -0
  1113. package/dist/solutions-components/map-layer-picker.entry.js +342 -0
  1114. package/dist/solutions-components/map-legend.entry.js +105 -0
  1115. package/dist/solutions-components/map-picker.entry.js +170 -0
  1116. package/dist/solutions-components/map-search.entry.js +180 -0
  1117. package/dist/solutions-components/map-select-tools.entry.js +794 -0
  1118. package/dist/solutions-components/map-tools.entry.js +371 -0
  1119. package/dist/solutions-components/mapViewUtils-436a516e.js +261 -0
  1120. package/dist/solutions-components/math-efada7a9.js +54 -0
  1121. package/dist/solutions-components/mk-bbf2ee01.js +65 -0
  1122. package/dist/solutions-components/mode-f9bfc4e9.js +25 -0
  1123. package/dist/solutions-components/nb-ccfaa0f7.js +66 -0
  1124. package/dist/solutions-components/nl-4bc56289.js +66 -0
  1125. package/dist/solutions-components/observers-5ba39eee.js +56 -0
  1126. package/dist/solutions-components/openCloseComponent-b4b3788b.js +138 -0
  1127. package/dist/solutions-components/{p-a455c3f0.entry.js → p-00524417.entry.js} +1 -1
  1128. package/dist/solutions-components/{p-52b37bad.entry.js → p-04dbc667.entry.js} +1 -1
  1129. package/dist/solutions-components/{p-8e9f96db.js → p-12a7d0d1.js} +1 -1
  1130. package/dist/solutions-components/{p-a7b7f8d1.js → p-15a0e7fb.js} +1 -1
  1131. package/dist/solutions-components/p-2d72eac3.entry.js +6 -0
  1132. package/dist/solutions-components/{p-a2544cba.entry.js → p-30edeb79.entry.js} +1 -1
  1133. package/dist/solutions-components/{p-220c46c2.entry.js → p-3a6a1ce9.entry.js} +1 -1
  1134. package/dist/solutions-components/{p-a59078ee.entry.js → p-3b9e4882.entry.js} +1 -1
  1135. package/dist/solutions-components/{p-8ad937b4.entry.js → p-465aa7d9.entry.js} +1 -1
  1136. package/dist/solutions-components/p-4dcc150d.entry.js +6 -0
  1137. package/dist/solutions-components/{p-1bca71bf.entry.js → p-4efd2af6.entry.js} +1 -1
  1138. package/dist/solutions-components/{p-5a28d60c.entry.js → p-5320dc25.entry.js} +1 -1
  1139. package/dist/solutions-components/{p-015a45e2.entry.js → p-53ef8adf.entry.js} +1 -1
  1140. package/dist/solutions-components/{p-0d72a9ca.entry.js → p-5f6e7429.entry.js} +1 -1
  1141. package/dist/solutions-components/{p-0f427774.entry.js → p-607773a3.entry.js} +1 -1
  1142. package/dist/solutions-components/{p-2e7a9b9b.entry.js → p-88932d2f.entry.js} +2 -2
  1143. package/dist/solutions-components/{p-b41e2c4c.js → p-8910dc99.js} +10 -10
  1144. package/dist/solutions-components/{p-104f07e3.entry.js → p-954dc86f.entry.js} +1 -1
  1145. package/dist/solutions-components/{p-c302bbea.entry.js → p-a3132356.entry.js} +1 -1
  1146. package/dist/solutions-components/{p-c10b44ee.entry.js → p-a886ab7f.entry.js} +1 -1
  1147. package/dist/solutions-components/{p-03037cf9.js → p-ad98c346.js} +1 -1
  1148. package/dist/solutions-components/{p-734d1dc5.js → p-b4913a01.js} +1 -1
  1149. package/dist/solutions-components/{p-03a65871.entry.js → p-bf6b4eb7.entry.js} +1 -1
  1150. package/dist/solutions-components/{p-09801ba6.entry.js → p-c4ff3b52.entry.js} +3 -3
  1151. package/dist/solutions-components/p-d599cfa8.entry.js +6 -0
  1152. package/dist/solutions-components/{p-cfe890f6.entry.js → p-f313b45b.entry.js} +1 -1
  1153. package/dist/solutions-components/{p-aec4441b.entry.js → p-fc1367d9.entry.js} +1 -1
  1154. package/dist/solutions-components/{p-07626c45.js → p-fc2fb61b.js} +1 -1
  1155. package/dist/solutions-components/parser-87982ce2.js +1654 -0
  1156. package/dist/solutions-components/pci-calculator.entry.js +113 -0
  1157. package/dist/solutions-components/pciUtils-73d4b6b4.js +844 -0
  1158. package/dist/solutions-components/pdf-download.entry.js +355 -0
  1159. package/dist/solutions-components/pl-1f435988.js +113 -0
  1160. package/dist/solutions-components/popupUtils-b61d7ffd.js +94 -0
  1161. package/dist/solutions-components/pt-4a05a00d.js +66 -0
  1162. package/dist/solutions-components/pt-br-9720547b.js +64 -0
  1163. package/dist/solutions-components/public-notification.entry.js +886 -0
  1164. package/dist/solutions-components/publicNotificationStore-208e26f0.js +45 -0
  1165. package/dist/solutions-components/purify-909c20fa.js +1713 -0
  1166. package/dist/solutions-components/queryUtils-2529c537.js +244 -0
  1167. package/dist/solutions-components/refine-results-flow-item.entry.js +56 -0
  1168. package/dist/solutions-components/refine-selection.entry.js +407 -0
  1169. package/dist/solutions-components/resources-0f8db821.js +45 -0
  1170. package/dist/solutions-components/resources-20074cb1.js +24 -0
  1171. package/dist/solutions-components/resources-3709252d.js +35 -0
  1172. package/dist/solutions-components/resources-3c6947d3.js +26 -0
  1173. package/dist/solutions-components/resources-47b3ca40.js +106 -0
  1174. package/dist/solutions-components/resources-667afb5d.js +27 -0
  1175. package/dist/solutions-components/resources-88a48c5c.js +20 -0
  1176. package/dist/solutions-components/resources-9b2084c6.js +24 -0
  1177. package/dist/solutions-components/resources-9b7e72d5.js +20 -0
  1178. package/dist/solutions-components/resources-b0e2b809.js +22 -0
  1179. package/dist/solutions-components/resources-bb6c11c3.js +49 -0
  1180. package/dist/solutions-components/ro-f87076a1.js +65 -0
  1181. package/dist/solutions-components/ru-e69ca895.js +125 -0
  1182. package/dist/solutions-components/shadow-css-f5236d52.js +481 -0
  1183. package/dist/solutions-components/share-item.entry.js +56 -0
  1184. package/dist/solutions-components/shared-list-render-a572ef93.js +348 -0
  1185. package/dist/solutions-components/sk-d632e850.js +147 -0
  1186. package/dist/solutions-components/sl-5099fa6f.js +167 -0
  1187. package/dist/solutions-components/solution-configuration.entry.js +906 -0
  1188. package/dist/solutions-components/solution-contents.entry.js +80 -0
  1189. package/dist/solutions-components/solution-item-details.entry.js +195 -0
  1190. package/dist/solutions-components/solution-item-icon.entry.js +323 -0
  1191. package/dist/solutions-components/solution-item-sharing.entry.js +135 -0
  1192. package/dist/solutions-components/solution-item.entry.js +102 -0
  1193. package/dist/solutions-components/solution-organization-variables.entry.js +91 -0
  1194. package/dist/solutions-components/solution-resource-item.entry.js +280 -0
  1195. package/dist/solutions-components/solution-spatial-ref.entry.js +154 -0
  1196. package/dist/solutions-components/solution-store-31cccb90.js +587 -0
  1197. package/dist/solutions-components/solution-template-data.entry.js +115 -0
  1198. package/dist/solutions-components/solution-variables.entry.js +103 -0
  1199. package/dist/solutions-components/solutions-components.css +84 -1
  1200. package/dist/solutions-components/solutions-components.esm.js +52 -1
  1201. package/dist/solutions-components/sortableComponent-e715a3dd.js +3439 -0
  1202. package/dist/solutions-components/spatial-ref.entry.js +21296 -0
  1203. package/dist/solutions-components/sr-944b7fd7.js +100 -0
  1204. package/dist/solutions-components/store-194c1a01.js +87 -0
  1205. package/dist/solutions-components/store-manager.entry.js +61 -0
  1206. package/dist/solutions-components/styles-367380b5.js +11 -0
  1207. package/dist/solutions-components/sv-e481fa6a.js +70 -0
  1208. package/dist/solutions-components/t9n-b39c5433.js +98 -0
  1209. package/dist/solutions-components/th-60961669.js +64 -0
  1210. package/dist/solutions-components/time-4a90614b.js +274 -0
  1211. package/dist/solutions-components/tr-eba8dd86.js +65 -0
  1212. package/dist/solutions-components/uk-ec375ce0.js +103 -0
  1213. package/dist/solutions-components/utils/downloadUtils.ts +44 -5
  1214. package/dist/solutions-components/utils/test/downloadUtils.spec.tsx +40 -1
  1215. package/dist/solutions-components/utils-32df4a1e.js +133 -0
  1216. package/dist/solutions-components/utils-57e2ccde.js +61 -0
  1217. package/dist/solutions-components/utils-7db4ecdc.js +100 -0
  1218. package/dist/solutions-components/utils-95e9dd51.js +55 -0
  1219. package/dist/solutions-components/utils-cfbe589a.js +208 -0
  1220. package/dist/solutions-components/vi-29345f79.js +69 -0
  1221. package/dist/solutions-components/zh-cn-32c7c714.js +93 -0
  1222. package/dist/solutions-components/zh-hk-7c770845.js +70 -0
  1223. package/dist/solutions-components/zh-tw-c318be5c.js +91 -0
  1224. package/dist/types/utils/downloadUtils.d.ts +18 -4
  1225. package/package.json +6 -6
  1226. package/dist/solutions-components/p-7d6ee026.entry.js +0 -6
  1227. package/dist/solutions-components/p-b80bc5b9.entry.js +0 -6
  1228. package/dist/solutions-components/p-dd45738e.entry.js +0 -6
  1229. /package/dist/solutions-components/{p-70359c2b.js → p-89218b6e.js} +0 -0
  1230. /package/dist/solutions-components/{p-090e0241.js → p-e85ba21c.js} +0 -0
@@ -0,0 +1,3439 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ /**!
7
+ * Sortable 1.15.1
8
+ * @author RubaXa <trash@rubaxa.org>
9
+ * @author owenm <owen23355@gmail.com>
10
+ * @license MIT
11
+ */
12
+ function ownKeys(object, enumerableOnly) {
13
+ var keys = Object.keys(object);
14
+ if (Object.getOwnPropertySymbols) {
15
+ var symbols = Object.getOwnPropertySymbols(object);
16
+ if (enumerableOnly) {
17
+ symbols = symbols.filter(function (sym) {
18
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
19
+ });
20
+ }
21
+ keys.push.apply(keys, symbols);
22
+ }
23
+ return keys;
24
+ }
25
+ function _objectSpread2(target) {
26
+ for (var i = 1; i < arguments.length; i++) {
27
+ var source = arguments[i] != null ? arguments[i] : {};
28
+ if (i % 2) {
29
+ ownKeys(Object(source), true).forEach(function (key) {
30
+ _defineProperty(target, key, source[key]);
31
+ });
32
+ } else if (Object.getOwnPropertyDescriptors) {
33
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
34
+ } else {
35
+ ownKeys(Object(source)).forEach(function (key) {
36
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
37
+ });
38
+ }
39
+ }
40
+ return target;
41
+ }
42
+ function _typeof(obj) {
43
+ "@babel/helpers - typeof";
44
+
45
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
46
+ _typeof = function (obj) {
47
+ return typeof obj;
48
+ };
49
+ } else {
50
+ _typeof = function (obj) {
51
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
52
+ };
53
+ }
54
+ return _typeof(obj);
55
+ }
56
+ function _defineProperty(obj, key, value) {
57
+ if (key in obj) {
58
+ Object.defineProperty(obj, key, {
59
+ value: value,
60
+ enumerable: true,
61
+ configurable: true,
62
+ writable: true
63
+ });
64
+ } else {
65
+ obj[key] = value;
66
+ }
67
+ return obj;
68
+ }
69
+ function _extends() {
70
+ _extends = Object.assign || function (target) {
71
+ for (var i = 1; i < arguments.length; i++) {
72
+ var source = arguments[i];
73
+ for (var key in source) {
74
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
75
+ target[key] = source[key];
76
+ }
77
+ }
78
+ }
79
+ return target;
80
+ };
81
+ return _extends.apply(this, arguments);
82
+ }
83
+ function _objectWithoutPropertiesLoose(source, excluded) {
84
+ if (source == null) return {};
85
+ var target = {};
86
+ var sourceKeys = Object.keys(source);
87
+ var key, i;
88
+ for (i = 0; i < sourceKeys.length; i++) {
89
+ key = sourceKeys[i];
90
+ if (excluded.indexOf(key) >= 0) continue;
91
+ target[key] = source[key];
92
+ }
93
+ return target;
94
+ }
95
+ function _objectWithoutProperties(source, excluded) {
96
+ if (source == null) return {};
97
+ var target = _objectWithoutPropertiesLoose(source, excluded);
98
+ var key, i;
99
+ if (Object.getOwnPropertySymbols) {
100
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
101
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
102
+ key = sourceSymbolKeys[i];
103
+ if (excluded.indexOf(key) >= 0) continue;
104
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
105
+ target[key] = source[key];
106
+ }
107
+ }
108
+ return target;
109
+ }
110
+ function _toConsumableArray(arr) {
111
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
112
+ }
113
+ function _arrayWithoutHoles(arr) {
114
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
115
+ }
116
+ function _iterableToArray(iter) {
117
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
118
+ }
119
+ function _unsupportedIterableToArray(o, minLen) {
120
+ if (!o) return;
121
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
122
+ var n = Object.prototype.toString.call(o).slice(8, -1);
123
+ if (n === "Object" && o.constructor) n = o.constructor.name;
124
+ if (n === "Map" || n === "Set") return Array.from(o);
125
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
126
+ }
127
+ function _arrayLikeToArray(arr, len) {
128
+ if (len == null || len > arr.length) len = arr.length;
129
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
130
+ return arr2;
131
+ }
132
+ function _nonIterableSpread() {
133
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
134
+ }
135
+
136
+ var version = "1.15.1";
137
+
138
+ function userAgent(pattern) {
139
+ if (typeof window !== 'undefined' && window.navigator) {
140
+ return !! /*@__PURE__*/navigator.userAgent.match(pattern);
141
+ }
142
+ }
143
+ var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);
144
+ var Edge = userAgent(/Edge/i);
145
+ var FireFox = userAgent(/firefox/i);
146
+ var Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);
147
+ var IOS = userAgent(/iP(ad|od|hone)/i);
148
+ var ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);
149
+
150
+ var captureMode = {
151
+ capture: false,
152
+ passive: false
153
+ };
154
+ function on(el, event, fn) {
155
+ el.addEventListener(event, fn, !IE11OrLess && captureMode);
156
+ }
157
+ function off(el, event, fn) {
158
+ el.removeEventListener(event, fn, !IE11OrLess && captureMode);
159
+ }
160
+ function matches( /**HTMLElement*/el, /**String*/selector) {
161
+ if (!selector) return;
162
+ selector[0] === '>' && (selector = selector.substring(1));
163
+ if (el) {
164
+ try {
165
+ if (el.matches) {
166
+ return el.matches(selector);
167
+ } else if (el.msMatchesSelector) {
168
+ return el.msMatchesSelector(selector);
169
+ } else if (el.webkitMatchesSelector) {
170
+ return el.webkitMatchesSelector(selector);
171
+ }
172
+ } catch (_) {
173
+ return false;
174
+ }
175
+ }
176
+ return false;
177
+ }
178
+ function getParentOrHost(el) {
179
+ return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;
180
+ }
181
+ function closest( /**HTMLElement*/el, /**String*/selector, /**HTMLElement*/ctx, includeCTX) {
182
+ if (el) {
183
+ ctx = ctx || document;
184
+ do {
185
+ if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {
186
+ return el;
187
+ }
188
+ if (el === ctx) break;
189
+ /* jshint boss:true */
190
+ } while (el = getParentOrHost(el));
191
+ }
192
+ return null;
193
+ }
194
+ var R_SPACE = /\s+/g;
195
+ function toggleClass(el, name, state) {
196
+ if (el && name) {
197
+ if (el.classList) {
198
+ el.classList[state ? 'add' : 'remove'](name);
199
+ } else {
200
+ var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');
201
+ el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');
202
+ }
203
+ }
204
+ }
205
+ function css(el, prop, val) {
206
+ var style = el && el.style;
207
+ if (style) {
208
+ if (val === void 0) {
209
+ if (document.defaultView && document.defaultView.getComputedStyle) {
210
+ val = document.defaultView.getComputedStyle(el, '');
211
+ } else if (el.currentStyle) {
212
+ val = el.currentStyle;
213
+ }
214
+ return prop === void 0 ? val : val[prop];
215
+ } else {
216
+ if (!(prop in style) && prop.indexOf('webkit') === -1) {
217
+ prop = '-webkit-' + prop;
218
+ }
219
+ style[prop] = val + (typeof val === 'string' ? '' : 'px');
220
+ }
221
+ }
222
+ }
223
+ function matrix(el, selfOnly) {
224
+ var appliedTransforms = '';
225
+ if (typeof el === 'string') {
226
+ appliedTransforms = el;
227
+ } else {
228
+ do {
229
+ var transform = css(el, 'transform');
230
+ if (transform && transform !== 'none') {
231
+ appliedTransforms = transform + ' ' + appliedTransforms;
232
+ }
233
+ /* jshint boss:true */
234
+ } while (!selfOnly && (el = el.parentNode));
235
+ }
236
+ var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
237
+ /*jshint -W056 */
238
+ return matrixFn && new matrixFn(appliedTransforms);
239
+ }
240
+ function find(ctx, tagName, iterator) {
241
+ if (ctx) {
242
+ var list = ctx.getElementsByTagName(tagName),
243
+ i = 0,
244
+ n = list.length;
245
+ if (iterator) {
246
+ for (; i < n; i++) {
247
+ iterator(list[i], i);
248
+ }
249
+ }
250
+ return list;
251
+ }
252
+ return [];
253
+ }
254
+ function getWindowScrollingElement() {
255
+ var scrollingElement = document.scrollingElement;
256
+ if (scrollingElement) {
257
+ return scrollingElement;
258
+ } else {
259
+ return document.documentElement;
260
+ }
261
+ }
262
+
263
+ /**
264
+ * Returns the "bounding client rect" of given element
265
+ * @param {HTMLElement} el The element whose boundingClientRect is wanted
266
+ * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container
267
+ * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr
268
+ * @param {[Boolean]} undoScale Whether the container's scale() should be undone
269
+ * @param {[HTMLElement]} container The parent the element will be placed in
270
+ * @return {Object} The boundingClientRect of el, with specified adjustments
271
+ */
272
+ function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {
273
+ if (!el.getBoundingClientRect && el !== window) return;
274
+ var elRect, top, left, bottom, right, height, width;
275
+ if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {
276
+ elRect = el.getBoundingClientRect();
277
+ top = elRect.top;
278
+ left = elRect.left;
279
+ bottom = elRect.bottom;
280
+ right = elRect.right;
281
+ height = elRect.height;
282
+ width = elRect.width;
283
+ } else {
284
+ top = 0;
285
+ left = 0;
286
+ bottom = window.innerHeight;
287
+ right = window.innerWidth;
288
+ height = window.innerHeight;
289
+ width = window.innerWidth;
290
+ }
291
+ if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {
292
+ // Adjust for translate()
293
+ container = container || el.parentNode;
294
+
295
+ // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)
296
+ // Not needed on <= IE11
297
+ if (!IE11OrLess) {
298
+ do {
299
+ if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {
300
+ var containerRect = container.getBoundingClientRect();
301
+
302
+ // Set relative to edges of padding box of container
303
+ top -= containerRect.top + parseInt(css(container, 'border-top-width'));
304
+ left -= containerRect.left + parseInt(css(container, 'border-left-width'));
305
+ bottom = top + elRect.height;
306
+ right = left + elRect.width;
307
+ break;
308
+ }
309
+ /* jshint boss:true */
310
+ } while (container = container.parentNode);
311
+ }
312
+ }
313
+ if (undoScale && el !== window) {
314
+ // Adjust for scale()
315
+ var elMatrix = matrix(container || el),
316
+ scaleX = elMatrix && elMatrix.a,
317
+ scaleY = elMatrix && elMatrix.d;
318
+ if (elMatrix) {
319
+ top /= scaleY;
320
+ left /= scaleX;
321
+ width /= scaleX;
322
+ height /= scaleY;
323
+ bottom = top + height;
324
+ right = left + width;
325
+ }
326
+ }
327
+ return {
328
+ top: top,
329
+ left: left,
330
+ bottom: bottom,
331
+ right: right,
332
+ width: width,
333
+ height: height
334
+ };
335
+ }
336
+
337
+ /**
338
+ * Returns the content rect of the element (bounding rect minus border and padding)
339
+ * @param {HTMLElement} el
340
+ */
341
+ function getContentRect(el) {
342
+ var rect = getRect(el);
343
+ var paddingLeft = parseInt(css(el, 'padding-left')),
344
+ paddingTop = parseInt(css(el, 'padding-top')),
345
+ paddingRight = parseInt(css(el, 'padding-right')),
346
+ paddingBottom = parseInt(css(el, 'padding-bottom'));
347
+ rect.top += paddingTop + parseInt(css(el, 'border-top-width'));
348
+ rect.left += paddingLeft + parseInt(css(el, 'border-left-width'));
349
+ // Client Width/Height includes padding only
350
+ rect.width = el.clientWidth - paddingLeft - paddingRight;
351
+ rect.height = el.clientHeight - paddingTop - paddingBottom;
352
+ rect.bottom = rect.top + rect.height;
353
+ rect.right = rect.left + rect.width;
354
+ return rect;
355
+ }
356
+
357
+ /**
358
+ * Checks if a side of an element is scrolled past a side of its parents
359
+ * @param {HTMLElement} el The element who's side being scrolled out of view is in question
360
+ * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')
361
+ * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')
362
+ * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element
363
+ */
364
+ function isScrolledPast(el, elSide, parentSide) {
365
+ var parent = getParentAutoScrollElement(el, true),
366
+ elSideVal = getRect(el)[elSide];
367
+
368
+ /* jshint boss:true */
369
+ while (parent) {
370
+ var parentSideVal = getRect(parent)[parentSide],
371
+ visible = void 0;
372
+ if (parentSide === 'top' || parentSide === 'left') {
373
+ visible = elSideVal >= parentSideVal;
374
+ } else {
375
+ visible = elSideVal <= parentSideVal;
376
+ }
377
+ if (!visible) return parent;
378
+ if (parent === getWindowScrollingElement()) break;
379
+ parent = getParentAutoScrollElement(parent, false);
380
+ }
381
+ return false;
382
+ }
383
+
384
+ /**
385
+ * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)
386
+ * and non-draggable elements
387
+ * @param {HTMLElement} el The parent element
388
+ * @param {Number} childNum The index of the child
389
+ * @param {Object} options Parent Sortable's options
390
+ * @return {HTMLElement} The child at index childNum, or null if not found
391
+ */
392
+ function getChild(el, childNum, options, includeDragEl) {
393
+ var currentChild = 0,
394
+ i = 0,
395
+ children = el.children;
396
+ while (i < children.length) {
397
+ if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {
398
+ if (currentChild === childNum) {
399
+ return children[i];
400
+ }
401
+ currentChild++;
402
+ }
403
+ i++;
404
+ }
405
+ return null;
406
+ }
407
+
408
+ /**
409
+ * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)
410
+ * @param {HTMLElement} el Parent element
411
+ * @param {selector} selector Any other elements that should be ignored
412
+ * @return {HTMLElement} The last child, ignoring ghostEl
413
+ */
414
+ function lastChild(el, selector) {
415
+ var last = el.lastElementChild;
416
+ while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {
417
+ last = last.previousElementSibling;
418
+ }
419
+ return last || null;
420
+ }
421
+
422
+ /**
423
+ * Returns the index of an element within its parent for a selected set of
424
+ * elements
425
+ * @param {HTMLElement} el
426
+ * @param {selector} selector
427
+ * @return {number}
428
+ */
429
+ function index(el, selector) {
430
+ var index = 0;
431
+ if (!el || !el.parentNode) {
432
+ return -1;
433
+ }
434
+
435
+ /* jshint boss:true */
436
+ while (el = el.previousElementSibling) {
437
+ if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {
438
+ index++;
439
+ }
440
+ }
441
+ return index;
442
+ }
443
+
444
+ /**
445
+ * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.
446
+ * The value is returned in real pixels.
447
+ * @param {HTMLElement} el
448
+ * @return {Array} Offsets in the format of [left, top]
449
+ */
450
+ function getRelativeScrollOffset(el) {
451
+ var offsetLeft = 0,
452
+ offsetTop = 0,
453
+ winScroller = getWindowScrollingElement();
454
+ if (el) {
455
+ do {
456
+ var elMatrix = matrix(el),
457
+ scaleX = elMatrix.a,
458
+ scaleY = elMatrix.d;
459
+ offsetLeft += el.scrollLeft * scaleX;
460
+ offsetTop += el.scrollTop * scaleY;
461
+ } while (el !== winScroller && (el = el.parentNode));
462
+ }
463
+ return [offsetLeft, offsetTop];
464
+ }
465
+
466
+ /**
467
+ * Returns the index of the object within the given array
468
+ * @param {Array} arr Array that may or may not hold the object
469
+ * @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
470
+ * @return {Number} The index of the object in the array, or -1
471
+ */
472
+ function indexOfObject(arr, obj) {
473
+ for (var i in arr) {
474
+ if (!arr.hasOwnProperty(i)) continue;
475
+ for (var key in obj) {
476
+ if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);
477
+ }
478
+ }
479
+ return -1;
480
+ }
481
+ function getParentAutoScrollElement(el, includeSelf) {
482
+ // skip to window
483
+ if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();
484
+ var elem = el;
485
+ var gotSelf = false;
486
+ do {
487
+ // we don't need to get elem css if it isn't even overflowing in the first place (performance)
488
+ if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {
489
+ var elemCSS = css(elem);
490
+ if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {
491
+ if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();
492
+ if (gotSelf || includeSelf) return elem;
493
+ gotSelf = true;
494
+ }
495
+ }
496
+ /* jshint boss:true */
497
+ } while (elem = elem.parentNode);
498
+ return getWindowScrollingElement();
499
+ }
500
+ function extend(dst, src) {
501
+ if (dst && src) {
502
+ for (var key in src) {
503
+ if (src.hasOwnProperty(key)) {
504
+ dst[key] = src[key];
505
+ }
506
+ }
507
+ }
508
+ return dst;
509
+ }
510
+ function isRectEqual(rect1, rect2) {
511
+ 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);
512
+ }
513
+ var _throttleTimeout;
514
+ function throttle(callback, ms) {
515
+ return function () {
516
+ if (!_throttleTimeout) {
517
+ var args = arguments,
518
+ _this = this;
519
+ if (args.length === 1) {
520
+ callback.call(_this, args[0]);
521
+ } else {
522
+ callback.apply(_this, args);
523
+ }
524
+ _throttleTimeout = setTimeout(function () {
525
+ _throttleTimeout = void 0;
526
+ }, ms);
527
+ }
528
+ };
529
+ }
530
+ function cancelThrottle() {
531
+ clearTimeout(_throttleTimeout);
532
+ _throttleTimeout = void 0;
533
+ }
534
+ function scrollBy(el, x, y) {
535
+ el.scrollLeft += x;
536
+ el.scrollTop += y;
537
+ }
538
+ function clone(el) {
539
+ var Polymer = window.Polymer;
540
+ var $ = window.jQuery || window.Zepto;
541
+ if (Polymer && Polymer.dom) {
542
+ return Polymer.dom(el).cloneNode(true);
543
+ } else if ($) {
544
+ return $(el).clone(true)[0];
545
+ } else {
546
+ return el.cloneNode(true);
547
+ }
548
+ }
549
+ function setRect(el, rect) {
550
+ css(el, 'position', 'absolute');
551
+ css(el, 'top', rect.top);
552
+ css(el, 'left', rect.left);
553
+ css(el, 'width', rect.width);
554
+ css(el, 'height', rect.height);
555
+ }
556
+ function unsetRect(el) {
557
+ css(el, 'position', '');
558
+ css(el, 'top', '');
559
+ css(el, 'left', '');
560
+ css(el, 'width', '');
561
+ css(el, 'height', '');
562
+ }
563
+ var expando = 'Sortable' + new Date().getTime();
564
+
565
+ function AnimationStateManager() {
566
+ var animationStates = [],
567
+ animationCallbackId;
568
+ return {
569
+ captureAnimationState: function captureAnimationState() {
570
+ animationStates = [];
571
+ if (!this.options.animation) return;
572
+ var children = [].slice.call(this.el.children);
573
+ children.forEach(function (child) {
574
+ if (css(child, 'display') === 'none' || child === Sortable.ghost) return;
575
+ animationStates.push({
576
+ target: child,
577
+ rect: getRect(child)
578
+ });
579
+ var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect);
580
+
581
+ // If animating: compensate for current animation
582
+ if (child.thisAnimationDuration) {
583
+ var childMatrix = matrix(child, true);
584
+ if (childMatrix) {
585
+ fromRect.top -= childMatrix.f;
586
+ fromRect.left -= childMatrix.e;
587
+ }
588
+ }
589
+ child.fromRect = fromRect;
590
+ });
591
+ },
592
+ addAnimationState: function addAnimationState(state) {
593
+ animationStates.push(state);
594
+ },
595
+ removeAnimationState: function removeAnimationState(target) {
596
+ animationStates.splice(indexOfObject(animationStates, {
597
+ target: target
598
+ }), 1);
599
+ },
600
+ animateAll: function animateAll(callback) {
601
+ var _this = this;
602
+ if (!this.options.animation) {
603
+ clearTimeout(animationCallbackId);
604
+ if (typeof callback === 'function') callback();
605
+ return;
606
+ }
607
+ var animating = false,
608
+ animationTime = 0;
609
+ animationStates.forEach(function (state) {
610
+ var time = 0,
611
+ target = state.target,
612
+ fromRect = target.fromRect,
613
+ toRect = getRect(target),
614
+ prevFromRect = target.prevFromRect,
615
+ prevToRect = target.prevToRect,
616
+ animatingRect = state.rect,
617
+ targetMatrix = matrix(target, true);
618
+ if (targetMatrix) {
619
+ // Compensate for current animation
620
+ toRect.top -= targetMatrix.f;
621
+ toRect.left -= targetMatrix.e;
622
+ }
623
+ target.toRect = toRect;
624
+ if (target.thisAnimationDuration) {
625
+ // Could also check if animatingRect is between fromRect and toRect
626
+ if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) &&
627
+ // Make sure animatingRect is on line between toRect & fromRect
628
+ (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {
629
+ // If returning to same place as started from animation and on same axis
630
+ time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);
631
+ }
632
+ }
633
+
634
+ // if fromRect != toRect: animate
635
+ if (!isRectEqual(toRect, fromRect)) {
636
+ target.prevFromRect = fromRect;
637
+ target.prevToRect = toRect;
638
+ if (!time) {
639
+ time = _this.options.animation;
640
+ }
641
+ _this.animate(target, animatingRect, toRect, time);
642
+ }
643
+ if (time) {
644
+ animating = true;
645
+ animationTime = Math.max(animationTime, time);
646
+ clearTimeout(target.animationResetTimer);
647
+ target.animationResetTimer = setTimeout(function () {
648
+ target.animationTime = 0;
649
+ target.prevFromRect = null;
650
+ target.fromRect = null;
651
+ target.prevToRect = null;
652
+ target.thisAnimationDuration = null;
653
+ }, time);
654
+ target.thisAnimationDuration = time;
655
+ }
656
+ });
657
+ clearTimeout(animationCallbackId);
658
+ if (!animating) {
659
+ if (typeof callback === 'function') callback();
660
+ } else {
661
+ animationCallbackId = setTimeout(function () {
662
+ if (typeof callback === 'function') callback();
663
+ }, animationTime);
664
+ }
665
+ animationStates = [];
666
+ },
667
+ animate: function animate(target, currentRect, toRect, duration) {
668
+ if (duration) {
669
+ css(target, 'transition', '');
670
+ css(target, 'transform', '');
671
+ var elMatrix = matrix(this.el),
672
+ scaleX = elMatrix && elMatrix.a,
673
+ scaleY = elMatrix && elMatrix.d,
674
+ translateX = (currentRect.left - toRect.left) / (scaleX || 1),
675
+ translateY = (currentRect.top - toRect.top) / (scaleY || 1);
676
+ target.animatingX = !!translateX;
677
+ target.animatingY = !!translateY;
678
+ css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');
679
+ this.forRepaintDummy = repaint(target); // repaint
680
+
681
+ css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));
682
+ css(target, 'transform', 'translate3d(0,0,0)');
683
+ typeof target.animated === 'number' && clearTimeout(target.animated);
684
+ target.animated = setTimeout(function () {
685
+ css(target, 'transition', '');
686
+ css(target, 'transform', '');
687
+ target.animated = false;
688
+ target.animatingX = false;
689
+ target.animatingY = false;
690
+ }, duration);
691
+ }
692
+ }
693
+ };
694
+ }
695
+ function repaint(target) {
696
+ return target.offsetWidth;
697
+ }
698
+ function calculateRealTime(animatingRect, fromRect, toRect, options) {
699
+ 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;
700
+ }
701
+
702
+ var plugins = [];
703
+ var defaults = {
704
+ initializeByDefault: true
705
+ };
706
+ var PluginManager = {
707
+ mount: function mount(plugin) {
708
+ // Set default static properties
709
+ for (var option in defaults) {
710
+ if (defaults.hasOwnProperty(option) && !(option in plugin)) {
711
+ plugin[option] = defaults[option];
712
+ }
713
+ }
714
+ plugins.forEach(function (p) {
715
+ if (p.pluginName === plugin.pluginName) {
716
+ throw "Sortable: Cannot mount plugin ".concat(plugin.pluginName, " more than once");
717
+ }
718
+ });
719
+ plugins.push(plugin);
720
+ },
721
+ pluginEvent: function pluginEvent(eventName, sortable, evt) {
722
+ var _this = this;
723
+ this.eventCanceled = false;
724
+ evt.cancel = function () {
725
+ _this.eventCanceled = true;
726
+ };
727
+ var eventNameGlobal = eventName + 'Global';
728
+ plugins.forEach(function (plugin) {
729
+ if (!sortable[plugin.pluginName]) return;
730
+ // Fire global events if it exists in this sortable
731
+ if (sortable[plugin.pluginName][eventNameGlobal]) {
732
+ sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({
733
+ sortable: sortable
734
+ }, evt));
735
+ }
736
+
737
+ // Only fire plugin event if plugin is enabled in this sortable,
738
+ // and plugin has event defined
739
+ if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {
740
+ sortable[plugin.pluginName][eventName](_objectSpread2({
741
+ sortable: sortable
742
+ }, evt));
743
+ }
744
+ });
745
+ },
746
+ initializePlugins: function initializePlugins(sortable, el, defaults, options) {
747
+ plugins.forEach(function (plugin) {
748
+ var pluginName = plugin.pluginName;
749
+ if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;
750
+ var initialized = new plugin(sortable, el, sortable.options);
751
+ initialized.sortable = sortable;
752
+ initialized.options = sortable.options;
753
+ sortable[pluginName] = initialized;
754
+
755
+ // Add default options from plugin
756
+ _extends(defaults, initialized.defaults);
757
+ });
758
+ for (var option in sortable.options) {
759
+ if (!sortable.options.hasOwnProperty(option)) continue;
760
+ var modified = this.modifyOption(sortable, option, sortable.options[option]);
761
+ if (typeof modified !== 'undefined') {
762
+ sortable.options[option] = modified;
763
+ }
764
+ }
765
+ },
766
+ getEventProperties: function getEventProperties(name, sortable) {
767
+ var eventProperties = {};
768
+ plugins.forEach(function (plugin) {
769
+ if (typeof plugin.eventProperties !== 'function') return;
770
+ _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));
771
+ });
772
+ return eventProperties;
773
+ },
774
+ modifyOption: function modifyOption(sortable, name, value) {
775
+ var modifiedValue;
776
+ plugins.forEach(function (plugin) {
777
+ // Plugin must exist on the Sortable
778
+ if (!sortable[plugin.pluginName]) return;
779
+
780
+ // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin
781
+ if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {
782
+ modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);
783
+ }
784
+ });
785
+ return modifiedValue;
786
+ }
787
+ };
788
+
789
+ function dispatchEvent(_ref) {
790
+ var sortable = _ref.sortable,
791
+ rootEl = _ref.rootEl,
792
+ name = _ref.name,
793
+ targetEl = _ref.targetEl,
794
+ cloneEl = _ref.cloneEl,
795
+ toEl = _ref.toEl,
796
+ fromEl = _ref.fromEl,
797
+ oldIndex = _ref.oldIndex,
798
+ newIndex = _ref.newIndex,
799
+ oldDraggableIndex = _ref.oldDraggableIndex,
800
+ newDraggableIndex = _ref.newDraggableIndex,
801
+ originalEvent = _ref.originalEvent,
802
+ putSortable = _ref.putSortable,
803
+ extraEventProperties = _ref.extraEventProperties;
804
+ sortable = sortable || rootEl && rootEl[expando];
805
+ if (!sortable) return;
806
+ var evt,
807
+ options = sortable.options,
808
+ onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1);
809
+ // Support for new CustomEvent feature
810
+ if (window.CustomEvent && !IE11OrLess && !Edge) {
811
+ evt = new CustomEvent(name, {
812
+ bubbles: true,
813
+ cancelable: true
814
+ });
815
+ } else {
816
+ evt = document.createEvent('Event');
817
+ evt.initEvent(name, true, true);
818
+ }
819
+ evt.to = toEl || rootEl;
820
+ evt.from = fromEl || rootEl;
821
+ evt.item = targetEl || rootEl;
822
+ evt.clone = cloneEl;
823
+ evt.oldIndex = oldIndex;
824
+ evt.newIndex = newIndex;
825
+ evt.oldDraggableIndex = oldDraggableIndex;
826
+ evt.newDraggableIndex = newDraggableIndex;
827
+ evt.originalEvent = originalEvent;
828
+ evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;
829
+ var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));
830
+ for (var option in allEventProperties) {
831
+ evt[option] = allEventProperties[option];
832
+ }
833
+ if (rootEl) {
834
+ rootEl.dispatchEvent(evt);
835
+ }
836
+ if (options[onName]) {
837
+ options[onName].call(sortable, evt);
838
+ }
839
+ }
840
+
841
+ var _excluded = ["evt"];
842
+ var pluginEvent = function pluginEvent(eventName, sortable) {
843
+ var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
844
+ originalEvent = _ref.evt,
845
+ data = _objectWithoutProperties(_ref, _excluded);
846
+ PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({
847
+ dragEl: dragEl,
848
+ parentEl: parentEl,
849
+ ghostEl: ghostEl,
850
+ rootEl: rootEl,
851
+ nextEl: nextEl,
852
+ lastDownEl: lastDownEl,
853
+ cloneEl: cloneEl,
854
+ cloneHidden: cloneHidden,
855
+ dragStarted: moved,
856
+ putSortable: putSortable,
857
+ activeSortable: Sortable.active,
858
+ originalEvent: originalEvent,
859
+ oldIndex: oldIndex,
860
+ oldDraggableIndex: oldDraggableIndex,
861
+ newIndex: newIndex,
862
+ newDraggableIndex: newDraggableIndex,
863
+ hideGhostForTarget: _hideGhostForTarget,
864
+ unhideGhostForTarget: _unhideGhostForTarget,
865
+ cloneNowHidden: function cloneNowHidden() {
866
+ cloneHidden = true;
867
+ },
868
+ cloneNowShown: function cloneNowShown() {
869
+ cloneHidden = false;
870
+ },
871
+ dispatchSortableEvent: function dispatchSortableEvent(name) {
872
+ _dispatchEvent({
873
+ sortable: sortable,
874
+ name: name,
875
+ originalEvent: originalEvent
876
+ });
877
+ }
878
+ }, data));
879
+ };
880
+ function _dispatchEvent(info) {
881
+ dispatchEvent(_objectSpread2({
882
+ putSortable: putSortable,
883
+ cloneEl: cloneEl,
884
+ targetEl: dragEl,
885
+ rootEl: rootEl,
886
+ oldIndex: oldIndex,
887
+ oldDraggableIndex: oldDraggableIndex,
888
+ newIndex: newIndex,
889
+ newDraggableIndex: newDraggableIndex
890
+ }, info));
891
+ }
892
+ var dragEl,
893
+ parentEl,
894
+ ghostEl,
895
+ rootEl,
896
+ nextEl,
897
+ lastDownEl,
898
+ cloneEl,
899
+ cloneHidden,
900
+ oldIndex,
901
+ newIndex,
902
+ oldDraggableIndex,
903
+ newDraggableIndex,
904
+ activeGroup,
905
+ putSortable,
906
+ awaitingDragStarted = false,
907
+ ignoreNextClick = false,
908
+ sortables = [],
909
+ tapEvt,
910
+ touchEvt,
911
+ lastDx,
912
+ lastDy,
913
+ tapDistanceLeft,
914
+ tapDistanceTop,
915
+ moved,
916
+ lastTarget,
917
+ lastDirection,
918
+ pastFirstInvertThresh = false,
919
+ isCircumstantialInvert = false,
920
+ targetMoveDistance,
921
+ // For positioning ghost absolutely
922
+ ghostRelativeParent,
923
+ ghostRelativeParentInitialScroll = [],
924
+ // (left, top)
925
+
926
+ _silent = false,
927
+ savedInputChecked = [];
928
+
929
+ /** @const */
930
+ var documentExists = typeof document !== 'undefined',
931
+ PositionGhostAbsolutely = IOS,
932
+ CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',
933
+ // This will not pass for IE9, because IE9 DnD only works on anchors
934
+ supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),
935
+ supportCssPointerEvents = function () {
936
+ if (!documentExists) return;
937
+ // false when <= IE11
938
+ if (IE11OrLess) {
939
+ return false;
940
+ }
941
+ var el = document.createElement('x');
942
+ el.style.cssText = 'pointer-events:auto';
943
+ return el.style.pointerEvents === 'auto';
944
+ }(),
945
+ _detectDirection = function _detectDirection(el, options) {
946
+ var elCSS = css(el),
947
+ elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),
948
+ child1 = getChild(el, 0, options),
949
+ child2 = getChild(el, 1, options),
950
+ firstChildCSS = child1 && css(child1),
951
+ secondChildCSS = child2 && css(child2),
952
+ firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,
953
+ secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;
954
+ if (elCSS.display === 'flex') {
955
+ return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';
956
+ }
957
+ if (elCSS.display === 'grid') {
958
+ return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';
959
+ }
960
+ if (child1 && firstChildCSS["float"] && firstChildCSS["float"] !== 'none') {
961
+ var touchingSideChild2 = firstChildCSS["float"] === 'left' ? 'left' : 'right';
962
+ return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';
963
+ }
964
+ 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';
965
+ },
966
+ _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {
967
+ var dragElS1Opp = vertical ? dragRect.left : dragRect.top,
968
+ dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,
969
+ dragElOppLength = vertical ? dragRect.width : dragRect.height,
970
+ targetS1Opp = vertical ? targetRect.left : targetRect.top,
971
+ targetS2Opp = vertical ? targetRect.right : targetRect.bottom,
972
+ targetOppLength = vertical ? targetRect.width : targetRect.height;
973
+ return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;
974
+ },
975
+ /**
976
+ * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.
977
+ * @param {Number} x X position
978
+ * @param {Number} y Y position
979
+ * @return {HTMLElement} Element of the first found nearest Sortable
980
+ */
981
+ _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {
982
+ var ret;
983
+ sortables.some(function (sortable) {
984
+ var threshold = sortable[expando].options.emptyInsertThreshold;
985
+ if (!threshold || lastChild(sortable)) return;
986
+ var rect = getRect(sortable),
987
+ insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,
988
+ insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;
989
+ if (insideHorizontally && insideVertically) {
990
+ return ret = sortable;
991
+ }
992
+ });
993
+ return ret;
994
+ },
995
+ _prepareGroup = function _prepareGroup(options) {
996
+ function toFn(value, pull) {
997
+ return function (to, from, dragEl, evt) {
998
+ var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;
999
+ if (value == null && (pull || sameGroup)) {
1000
+ // Default pull value
1001
+ // Default pull and put value if same group
1002
+ return true;
1003
+ } else if (value == null || value === false) {
1004
+ return false;
1005
+ } else if (pull && value === 'clone') {
1006
+ return value;
1007
+ } else if (typeof value === 'function') {
1008
+ return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);
1009
+ } else {
1010
+ var otherGroup = (pull ? to : from).options.group.name;
1011
+ return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;
1012
+ }
1013
+ };
1014
+ }
1015
+ var group = {};
1016
+ var originalGroup = options.group;
1017
+ if (!originalGroup || _typeof(originalGroup) != 'object') {
1018
+ originalGroup = {
1019
+ name: originalGroup
1020
+ };
1021
+ }
1022
+ group.name = originalGroup.name;
1023
+ group.checkPull = toFn(originalGroup.pull, true);
1024
+ group.checkPut = toFn(originalGroup.put);
1025
+ group.revertClone = originalGroup.revertClone;
1026
+ options.group = group;
1027
+ },
1028
+ _hideGhostForTarget = function _hideGhostForTarget() {
1029
+ if (!supportCssPointerEvents && ghostEl) {
1030
+ css(ghostEl, 'display', 'none');
1031
+ }
1032
+ },
1033
+ _unhideGhostForTarget = function _unhideGhostForTarget() {
1034
+ if (!supportCssPointerEvents && ghostEl) {
1035
+ css(ghostEl, 'display', '');
1036
+ }
1037
+ };
1038
+
1039
+ // #1184 fix - Prevent click event on fallback if dragged but item not changed position
1040
+ if (documentExists && !ChromeForAndroid) {
1041
+ document.addEventListener('click', function (evt) {
1042
+ if (ignoreNextClick) {
1043
+ evt.preventDefault();
1044
+ evt.stopPropagation && evt.stopPropagation();
1045
+ evt.stopImmediatePropagation && evt.stopImmediatePropagation();
1046
+ ignoreNextClick = false;
1047
+ return false;
1048
+ }
1049
+ }, true);
1050
+ }
1051
+ var nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {
1052
+ if (dragEl) {
1053
+ evt = evt.touches ? evt.touches[0] : evt;
1054
+ var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);
1055
+ if (nearest) {
1056
+ // Create imitation event
1057
+ var event = {};
1058
+ for (var i in evt) {
1059
+ if (evt.hasOwnProperty(i)) {
1060
+ event[i] = evt[i];
1061
+ }
1062
+ }
1063
+ event.target = event.rootEl = nearest;
1064
+ event.preventDefault = void 0;
1065
+ event.stopPropagation = void 0;
1066
+ nearest[expando]._onDragOver(event);
1067
+ }
1068
+ }
1069
+ };
1070
+ var _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {
1071
+ if (dragEl) {
1072
+ dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
1073
+ }
1074
+ };
1075
+
1076
+ /**
1077
+ * @class Sortable
1078
+ * @param {HTMLElement} el
1079
+ * @param {Object} [options]
1080
+ */
1081
+ function Sortable(el, options) {
1082
+ if (!(el && el.nodeType && el.nodeType === 1)) {
1083
+ throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(el));
1084
+ }
1085
+ this.el = el; // root element
1086
+ this.options = options = _extends({}, options);
1087
+
1088
+ // Export instance
1089
+ el[expando] = this;
1090
+ var defaults = {
1091
+ group: null,
1092
+ sort: true,
1093
+ disabled: false,
1094
+ store: null,
1095
+ handle: null,
1096
+ draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',
1097
+ swapThreshold: 1,
1098
+ // percentage; 0 <= x <= 1
1099
+ invertSwap: false,
1100
+ // invert always
1101
+ invertedSwapThreshold: null,
1102
+ // will be set to same as swapThreshold if default
1103
+ removeCloneOnHide: true,
1104
+ direction: function direction() {
1105
+ return _detectDirection(el, this.options);
1106
+ },
1107
+ ghostClass: 'sortable-ghost',
1108
+ chosenClass: 'sortable-chosen',
1109
+ dragClass: 'sortable-drag',
1110
+ ignore: 'a, img',
1111
+ filter: null,
1112
+ preventOnFilter: true,
1113
+ animation: 0,
1114
+ easing: null,
1115
+ setData: function setData(dataTransfer, dragEl) {
1116
+ dataTransfer.setData('Text', dragEl.textContent);
1117
+ },
1118
+ dropBubble: false,
1119
+ dragoverBubble: false,
1120
+ dataIdAttr: 'data-id',
1121
+ delay: 0,
1122
+ delayOnTouchOnly: false,
1123
+ touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
1124
+ forceFallback: false,
1125
+ fallbackClass: 'sortable-fallback',
1126
+ fallbackOnBody: false,
1127
+ fallbackTolerance: 0,
1128
+ fallbackOffset: {
1129
+ x: 0,
1130
+ y: 0
1131
+ },
1132
+ supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,
1133
+ emptyInsertThreshold: 5
1134
+ };
1135
+ PluginManager.initializePlugins(this, el, defaults);
1136
+
1137
+ // Set default options
1138
+ for (var name in defaults) {
1139
+ !(name in options) && (options[name] = defaults[name]);
1140
+ }
1141
+ _prepareGroup(options);
1142
+
1143
+ // Bind all private methods
1144
+ for (var fn in this) {
1145
+ if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
1146
+ this[fn] = this[fn].bind(this);
1147
+ }
1148
+ }
1149
+
1150
+ // Setup drag mode
1151
+ this.nativeDraggable = options.forceFallback ? false : supportDraggable;
1152
+ if (this.nativeDraggable) {
1153
+ // Touch start threshold cannot be greater than the native dragstart threshold
1154
+ this.options.touchStartThreshold = 1;
1155
+ }
1156
+
1157
+ // Bind events
1158
+ if (options.supportPointer) {
1159
+ on(el, 'pointerdown', this._onTapStart);
1160
+ } else {
1161
+ on(el, 'mousedown', this._onTapStart);
1162
+ on(el, 'touchstart', this._onTapStart);
1163
+ }
1164
+ if (this.nativeDraggable) {
1165
+ on(el, 'dragover', this);
1166
+ on(el, 'dragenter', this);
1167
+ }
1168
+ sortables.push(this.el);
1169
+
1170
+ // Restore sorting
1171
+ options.store && options.store.get && this.sort(options.store.get(this) || []);
1172
+
1173
+ // Add animation state manager
1174
+ _extends(this, AnimationStateManager());
1175
+ }
1176
+ Sortable.prototype = /** @lends Sortable.prototype */{
1177
+ constructor: Sortable,
1178
+ _isOutsideThisEl: function _isOutsideThisEl(target) {
1179
+ if (!this.el.contains(target) && target !== this.el) {
1180
+ lastTarget = null;
1181
+ }
1182
+ },
1183
+ _getDirection: function _getDirection(evt, target) {
1184
+ return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;
1185
+ },
1186
+ _onTapStart: function _onTapStart( /** Event|TouchEvent */evt) {
1187
+ if (!evt.cancelable) return;
1188
+ var _this = this,
1189
+ el = this.el,
1190
+ options = this.options,
1191
+ preventOnFilter = options.preventOnFilter,
1192
+ type = evt.type,
1193
+ touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,
1194
+ target = (touch || evt).target,
1195
+ originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,
1196
+ filter = options.filter;
1197
+ _saveInputCheckedState(el);
1198
+
1199
+ // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.
1200
+ if (dragEl) {
1201
+ return;
1202
+ }
1203
+ if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {
1204
+ return; // only left button and enabled
1205
+ }
1206
+
1207
+ // cancel dnd if original target is content editable
1208
+ if (originalTarget.isContentEditable) {
1209
+ return;
1210
+ }
1211
+
1212
+ // Safari ignores further event handling after mousedown
1213
+ if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {
1214
+ return;
1215
+ }
1216
+ target = closest(target, options.draggable, el, false);
1217
+ if (target && target.animated) {
1218
+ return;
1219
+ }
1220
+ if (lastDownEl === target) {
1221
+ // Ignoring duplicate `down`
1222
+ return;
1223
+ }
1224
+
1225
+ // Get the index of the dragged element within its parent
1226
+ oldIndex = index(target);
1227
+ oldDraggableIndex = index(target, options.draggable);
1228
+
1229
+ // Check filter
1230
+ if (typeof filter === 'function') {
1231
+ if (filter.call(this, evt, target, this)) {
1232
+ _dispatchEvent({
1233
+ sortable: _this,
1234
+ rootEl: originalTarget,
1235
+ name: 'filter',
1236
+ targetEl: target,
1237
+ toEl: el,
1238
+ fromEl: el
1239
+ });
1240
+ pluginEvent('filter', _this, {
1241
+ evt: evt
1242
+ });
1243
+ preventOnFilter && evt.cancelable && evt.preventDefault();
1244
+ return; // cancel dnd
1245
+ }
1246
+ } else if (filter) {
1247
+ filter = filter.split(',').some(function (criteria) {
1248
+ criteria = closest(originalTarget, criteria.trim(), el, false);
1249
+ if (criteria) {
1250
+ _dispatchEvent({
1251
+ sortable: _this,
1252
+ rootEl: criteria,
1253
+ name: 'filter',
1254
+ targetEl: target,
1255
+ fromEl: el,
1256
+ toEl: el
1257
+ });
1258
+ pluginEvent('filter', _this, {
1259
+ evt: evt
1260
+ });
1261
+ return true;
1262
+ }
1263
+ });
1264
+ if (filter) {
1265
+ preventOnFilter && evt.cancelable && evt.preventDefault();
1266
+ return; // cancel dnd
1267
+ }
1268
+ }
1269
+ if (options.handle && !closest(originalTarget, options.handle, el, false)) {
1270
+ return;
1271
+ }
1272
+
1273
+ // Prepare `dragstart`
1274
+ this._prepareDragStart(evt, touch, target);
1275
+ },
1276
+ _prepareDragStart: function _prepareDragStart( /** Event */evt, /** Touch */touch, /** HTMLElement */target) {
1277
+ var _this = this,
1278
+ el = _this.el,
1279
+ options = _this.options,
1280
+ ownerDocument = el.ownerDocument,
1281
+ dragStartFn;
1282
+ if (target && !dragEl && target.parentNode === el) {
1283
+ var dragRect = getRect(target);
1284
+ rootEl = el;
1285
+ dragEl = target;
1286
+ parentEl = dragEl.parentNode;
1287
+ nextEl = dragEl.nextSibling;
1288
+ lastDownEl = target;
1289
+ activeGroup = options.group;
1290
+ Sortable.dragged = dragEl;
1291
+ tapEvt = {
1292
+ target: dragEl,
1293
+ clientX: (touch || evt).clientX,
1294
+ clientY: (touch || evt).clientY
1295
+ };
1296
+ tapDistanceLeft = tapEvt.clientX - dragRect.left;
1297
+ tapDistanceTop = tapEvt.clientY - dragRect.top;
1298
+ this._lastX = (touch || evt).clientX;
1299
+ this._lastY = (touch || evt).clientY;
1300
+ dragEl.style['will-change'] = 'all';
1301
+ dragStartFn = function dragStartFn() {
1302
+ pluginEvent('delayEnded', _this, {
1303
+ evt: evt
1304
+ });
1305
+ if (Sortable.eventCanceled) {
1306
+ _this._onDrop();
1307
+ return;
1308
+ }
1309
+ // Delayed drag has been triggered
1310
+ // we can re-enable the events: touchmove/mousemove
1311
+ _this._disableDelayedDragEvents();
1312
+ if (!FireFox && _this.nativeDraggable) {
1313
+ dragEl.draggable = true;
1314
+ }
1315
+
1316
+ // Bind the events: dragstart/dragend
1317
+ _this._triggerDragStart(evt, touch);
1318
+
1319
+ // Drag start event
1320
+ _dispatchEvent({
1321
+ sortable: _this,
1322
+ name: 'choose',
1323
+ originalEvent: evt
1324
+ });
1325
+
1326
+ // Chosen item
1327
+ toggleClass(dragEl, options.chosenClass, true);
1328
+ };
1329
+
1330
+ // Disable "draggable"
1331
+ options.ignore.split(',').forEach(function (criteria) {
1332
+ find(dragEl, criteria.trim(), _disableDraggable);
1333
+ });
1334
+ on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);
1335
+ on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);
1336
+ on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);
1337
+ on(ownerDocument, 'mouseup', _this._onDrop);
1338
+ on(ownerDocument, 'touchend', _this._onDrop);
1339
+ on(ownerDocument, 'touchcancel', _this._onDrop);
1340
+
1341
+ // Make dragEl draggable (must be before delay for FireFox)
1342
+ if (FireFox && this.nativeDraggable) {
1343
+ this.options.touchStartThreshold = 4;
1344
+ dragEl.draggable = true;
1345
+ }
1346
+ pluginEvent('delayStart', this, {
1347
+ evt: evt
1348
+ });
1349
+
1350
+ // Delay is impossible for native DnD in Edge or IE
1351
+ if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {
1352
+ if (Sortable.eventCanceled) {
1353
+ this._onDrop();
1354
+ return;
1355
+ }
1356
+ // If the user moves the pointer or let go the click or touch
1357
+ // before the delay has been reached:
1358
+ // disable the delayed drag
1359
+ on(ownerDocument, 'mouseup', _this._disableDelayedDrag);
1360
+ on(ownerDocument, 'touchend', _this._disableDelayedDrag);
1361
+ on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);
1362
+ on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);
1363
+ on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);
1364
+ options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);
1365
+ _this._dragStartTimer = setTimeout(dragStartFn, options.delay);
1366
+ } else {
1367
+ dragStartFn();
1368
+ }
1369
+ }
1370
+ },
1371
+ _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler( /** TouchEvent|PointerEvent **/e) {
1372
+ var touch = e.touches ? e.touches[0] : e;
1373
+ 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))) {
1374
+ this._disableDelayedDrag();
1375
+ }
1376
+ },
1377
+ _disableDelayedDrag: function _disableDelayedDrag() {
1378
+ dragEl && _disableDraggable(dragEl);
1379
+ clearTimeout(this._dragStartTimer);
1380
+ this._disableDelayedDragEvents();
1381
+ },
1382
+ _disableDelayedDragEvents: function _disableDelayedDragEvents() {
1383
+ var ownerDocument = this.el.ownerDocument;
1384
+ off(ownerDocument, 'mouseup', this._disableDelayedDrag);
1385
+ off(ownerDocument, 'touchend', this._disableDelayedDrag);
1386
+ off(ownerDocument, 'touchcancel', this._disableDelayedDrag);
1387
+ off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);
1388
+ off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);
1389
+ off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);
1390
+ },
1391
+ _triggerDragStart: function _triggerDragStart( /** Event */evt, /** Touch */touch) {
1392
+ touch = touch || evt.pointerType == 'touch' && evt;
1393
+ if (!this.nativeDraggable || touch) {
1394
+ if (this.options.supportPointer) {
1395
+ on(document, 'pointermove', this._onTouchMove);
1396
+ } else if (touch) {
1397
+ on(document, 'touchmove', this._onTouchMove);
1398
+ } else {
1399
+ on(document, 'mousemove', this._onTouchMove);
1400
+ }
1401
+ } else {
1402
+ on(dragEl, 'dragend', this);
1403
+ on(rootEl, 'dragstart', this._onDragStart);
1404
+ }
1405
+ try {
1406
+ if (document.selection) {
1407
+ // Timeout neccessary for IE9
1408
+ _nextTick(function () {
1409
+ document.selection.empty();
1410
+ });
1411
+ } else {
1412
+ window.getSelection().removeAllRanges();
1413
+ }
1414
+ } catch (err) {}
1415
+ },
1416
+ _dragStarted: function _dragStarted(fallback, evt) {
1417
+ awaitingDragStarted = false;
1418
+ if (rootEl && dragEl) {
1419
+ pluginEvent('dragStarted', this, {
1420
+ evt: evt
1421
+ });
1422
+ if (this.nativeDraggable) {
1423
+ on(document, 'dragover', _checkOutsideTargetEl);
1424
+ }
1425
+ var options = this.options;
1426
+
1427
+ // Apply effect
1428
+ !fallback && toggleClass(dragEl, options.dragClass, false);
1429
+ toggleClass(dragEl, options.ghostClass, true);
1430
+ Sortable.active = this;
1431
+ fallback && this._appendGhost();
1432
+
1433
+ // Drag start event
1434
+ _dispatchEvent({
1435
+ sortable: this,
1436
+ name: 'start',
1437
+ originalEvent: evt
1438
+ });
1439
+ } else {
1440
+ this._nulling();
1441
+ }
1442
+ },
1443
+ _emulateDragOver: function _emulateDragOver() {
1444
+ if (touchEvt) {
1445
+ this._lastX = touchEvt.clientX;
1446
+ this._lastY = touchEvt.clientY;
1447
+ _hideGhostForTarget();
1448
+ var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
1449
+ var parent = target;
1450
+ while (target && target.shadowRoot) {
1451
+ target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
1452
+ if (target === parent) break;
1453
+ parent = target;
1454
+ }
1455
+ dragEl.parentNode[expando]._isOutsideThisEl(target);
1456
+ if (parent) {
1457
+ do {
1458
+ if (parent[expando]) {
1459
+ var inserted = void 0;
1460
+ inserted = parent[expando]._onDragOver({
1461
+ clientX: touchEvt.clientX,
1462
+ clientY: touchEvt.clientY,
1463
+ target: target,
1464
+ rootEl: parent
1465
+ });
1466
+ if (inserted && !this.options.dragoverBubble) {
1467
+ break;
1468
+ }
1469
+ }
1470
+ target = parent; // store last element
1471
+ }
1472
+ /* jshint boss:true */ while (parent = parent.parentNode);
1473
+ }
1474
+ _unhideGhostForTarget();
1475
+ }
1476
+ },
1477
+ _onTouchMove: function _onTouchMove( /**TouchEvent*/evt) {
1478
+ if (tapEvt) {
1479
+ var options = this.options,
1480
+ fallbackTolerance = options.fallbackTolerance,
1481
+ fallbackOffset = options.fallbackOffset,
1482
+ touch = evt.touches ? evt.touches[0] : evt,
1483
+ ghostMatrix = ghostEl && matrix(ghostEl, true),
1484
+ scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
1485
+ scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
1486
+ relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
1487
+ dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),
1488
+ dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1);
1489
+
1490
+ // only set the status to dragging, when we are actually dragging
1491
+ if (!Sortable.active && !awaitingDragStarted) {
1492
+ if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {
1493
+ return;
1494
+ }
1495
+ this._onDragStart(evt, true);
1496
+ }
1497
+ if (ghostEl) {
1498
+ if (ghostMatrix) {
1499
+ ghostMatrix.e += dx - (lastDx || 0);
1500
+ ghostMatrix.f += dy - (lastDy || 0);
1501
+ } else {
1502
+ ghostMatrix = {
1503
+ a: 1,
1504
+ b: 0,
1505
+ c: 0,
1506
+ d: 1,
1507
+ e: dx,
1508
+ f: dy
1509
+ };
1510
+ }
1511
+ var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")");
1512
+ css(ghostEl, 'webkitTransform', cssMatrix);
1513
+ css(ghostEl, 'mozTransform', cssMatrix);
1514
+ css(ghostEl, 'msTransform', cssMatrix);
1515
+ css(ghostEl, 'transform', cssMatrix);
1516
+ lastDx = dx;
1517
+ lastDy = dy;
1518
+ touchEvt = touch;
1519
+ }
1520
+ evt.cancelable && evt.preventDefault();
1521
+ }
1522
+ },
1523
+ _appendGhost: function _appendGhost() {
1524
+ // Bug if using scale(): https://stackoverflow.com/questions/2637058
1525
+ // Not being adjusted for
1526
+ if (!ghostEl) {
1527
+ var container = this.options.fallbackOnBody ? document.body : rootEl,
1528
+ rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),
1529
+ options = this.options;
1530
+
1531
+ // Position absolutely
1532
+ if (PositionGhostAbsolutely) {
1533
+ // Get relatively positioned parent
1534
+ ghostRelativeParent = container;
1535
+ while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {
1536
+ ghostRelativeParent = ghostRelativeParent.parentNode;
1537
+ }
1538
+ if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {
1539
+ if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();
1540
+ rect.top += ghostRelativeParent.scrollTop;
1541
+ rect.left += ghostRelativeParent.scrollLeft;
1542
+ } else {
1543
+ ghostRelativeParent = getWindowScrollingElement();
1544
+ }
1545
+ ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);
1546
+ }
1547
+ ghostEl = dragEl.cloneNode(true);
1548
+ toggleClass(ghostEl, options.ghostClass, false);
1549
+ toggleClass(ghostEl, options.fallbackClass, true);
1550
+ toggleClass(ghostEl, options.dragClass, true);
1551
+ css(ghostEl, 'transition', '');
1552
+ css(ghostEl, 'transform', '');
1553
+ css(ghostEl, 'box-sizing', 'border-box');
1554
+ css(ghostEl, 'margin', 0);
1555
+ css(ghostEl, 'top', rect.top);
1556
+ css(ghostEl, 'left', rect.left);
1557
+ css(ghostEl, 'width', rect.width);
1558
+ css(ghostEl, 'height', rect.height);
1559
+ css(ghostEl, 'opacity', '0.8');
1560
+ css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');
1561
+ css(ghostEl, 'zIndex', '100000');
1562
+ css(ghostEl, 'pointerEvents', 'none');
1563
+ Sortable.ghost = ghostEl;
1564
+ container.appendChild(ghostEl);
1565
+
1566
+ // Set transform-origin
1567
+ css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');
1568
+ }
1569
+ },
1570
+ _onDragStart: function _onDragStart( /**Event*/evt, /**boolean*/fallback) {
1571
+ var _this = this;
1572
+ var dataTransfer = evt.dataTransfer;
1573
+ var options = _this.options;
1574
+ pluginEvent('dragStart', this, {
1575
+ evt: evt
1576
+ });
1577
+ if (Sortable.eventCanceled) {
1578
+ this._onDrop();
1579
+ return;
1580
+ }
1581
+ pluginEvent('setupClone', this);
1582
+ if (!Sortable.eventCanceled) {
1583
+ cloneEl = clone(dragEl);
1584
+ cloneEl.removeAttribute("id");
1585
+ cloneEl.draggable = false;
1586
+ cloneEl.style['will-change'] = '';
1587
+ this._hideClone();
1588
+ toggleClass(cloneEl, this.options.chosenClass, false);
1589
+ Sortable.clone = cloneEl;
1590
+ }
1591
+
1592
+ // #1143: IFrame support workaround
1593
+ _this.cloneId = _nextTick(function () {
1594
+ pluginEvent('clone', _this);
1595
+ if (Sortable.eventCanceled) return;
1596
+ if (!_this.options.removeCloneOnHide) {
1597
+ rootEl.insertBefore(cloneEl, dragEl);
1598
+ }
1599
+ _this._hideClone();
1600
+ _dispatchEvent({
1601
+ sortable: _this,
1602
+ name: 'clone'
1603
+ });
1604
+ });
1605
+ !fallback && toggleClass(dragEl, options.dragClass, true);
1606
+
1607
+ // Set proper drop events
1608
+ if (fallback) {
1609
+ ignoreNextClick = true;
1610
+ _this._loopId = setInterval(_this._emulateDragOver, 50);
1611
+ } else {
1612
+ // Undo what was set in _prepareDragStart before drag started
1613
+ off(document, 'mouseup', _this._onDrop);
1614
+ off(document, 'touchend', _this._onDrop);
1615
+ off(document, 'touchcancel', _this._onDrop);
1616
+ if (dataTransfer) {
1617
+ dataTransfer.effectAllowed = 'move';
1618
+ options.setData && options.setData.call(_this, dataTransfer, dragEl);
1619
+ }
1620
+ on(document, 'drop', _this);
1621
+
1622
+ // #1276 fix:
1623
+ css(dragEl, 'transform', 'translateZ(0)');
1624
+ }
1625
+ awaitingDragStarted = true;
1626
+ _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));
1627
+ on(document, 'selectstart', _this);
1628
+ moved = true;
1629
+ if (Safari) {
1630
+ css(document.body, 'user-select', 'none');
1631
+ }
1632
+ },
1633
+ // Returns true - if no further action is needed (either inserted or another condition)
1634
+ _onDragOver: function _onDragOver( /**Event*/evt) {
1635
+ var el = this.el,
1636
+ target = evt.target,
1637
+ dragRect,
1638
+ targetRect,
1639
+ revert,
1640
+ options = this.options,
1641
+ group = options.group,
1642
+ activeSortable = Sortable.active,
1643
+ isOwner = activeGroup === group,
1644
+ canSort = options.sort,
1645
+ fromSortable = putSortable || activeSortable,
1646
+ vertical,
1647
+ _this = this,
1648
+ completedFired = false;
1649
+ if (_silent) return;
1650
+ function dragOverEvent(name, extra) {
1651
+ pluginEvent(name, _this, _objectSpread2({
1652
+ evt: evt,
1653
+ isOwner: isOwner,
1654
+ axis: vertical ? 'vertical' : 'horizontal',
1655
+ revert: revert,
1656
+ dragRect: dragRect,
1657
+ targetRect: targetRect,
1658
+ canSort: canSort,
1659
+ fromSortable: fromSortable,
1660
+ target: target,
1661
+ completed: completed,
1662
+ onMove: function onMove(target, after) {
1663
+ return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);
1664
+ },
1665
+ changed: changed
1666
+ }, extra));
1667
+ }
1668
+
1669
+ // Capture animation state
1670
+ function capture() {
1671
+ dragOverEvent('dragOverAnimationCapture');
1672
+ _this.captureAnimationState();
1673
+ if (_this !== fromSortable) {
1674
+ fromSortable.captureAnimationState();
1675
+ }
1676
+ }
1677
+
1678
+ // Return invocation when dragEl is inserted (or completed)
1679
+ function completed(insertion) {
1680
+ dragOverEvent('dragOverCompleted', {
1681
+ insertion: insertion
1682
+ });
1683
+ if (insertion) {
1684
+ // Clones must be hidden before folding animation to capture dragRectAbsolute properly
1685
+ if (isOwner) {
1686
+ activeSortable._hideClone();
1687
+ } else {
1688
+ activeSortable._showClone(_this);
1689
+ }
1690
+ if (_this !== fromSortable) {
1691
+ // Set ghost class to new sortable's ghost class
1692
+ toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);
1693
+ toggleClass(dragEl, options.ghostClass, true);
1694
+ }
1695
+ if (putSortable !== _this && _this !== Sortable.active) {
1696
+ putSortable = _this;
1697
+ } else if (_this === Sortable.active && putSortable) {
1698
+ putSortable = null;
1699
+ }
1700
+
1701
+ // Animation
1702
+ if (fromSortable === _this) {
1703
+ _this._ignoreWhileAnimating = target;
1704
+ }
1705
+ _this.animateAll(function () {
1706
+ dragOverEvent('dragOverAnimationComplete');
1707
+ _this._ignoreWhileAnimating = null;
1708
+ });
1709
+ if (_this !== fromSortable) {
1710
+ fromSortable.animateAll();
1711
+ fromSortable._ignoreWhileAnimating = null;
1712
+ }
1713
+ }
1714
+
1715
+ // Null lastTarget if it is not inside a previously swapped element
1716
+ if (target === dragEl && !dragEl.animated || target === el && !target.animated) {
1717
+ lastTarget = null;
1718
+ }
1719
+
1720
+ // no bubbling and not fallback
1721
+ if (!options.dragoverBubble && !evt.rootEl && target !== document) {
1722
+ dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
1723
+
1724
+ // Do not detect for empty insert if already inserted
1725
+ !insertion && nearestEmptyInsertDetectEvent(evt);
1726
+ }
1727
+ !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();
1728
+ return completedFired = true;
1729
+ }
1730
+
1731
+ // Call when dragEl has been inserted
1732
+ function changed() {
1733
+ newIndex = index(dragEl);
1734
+ newDraggableIndex = index(dragEl, options.draggable);
1735
+ _dispatchEvent({
1736
+ sortable: _this,
1737
+ name: 'change',
1738
+ toEl: el,
1739
+ newIndex: newIndex,
1740
+ newDraggableIndex: newDraggableIndex,
1741
+ originalEvent: evt
1742
+ });
1743
+ }
1744
+ if (evt.preventDefault !== void 0) {
1745
+ evt.cancelable && evt.preventDefault();
1746
+ }
1747
+ target = closest(target, options.draggable, el, true);
1748
+ dragOverEvent('dragOver');
1749
+ if (Sortable.eventCanceled) return completedFired;
1750
+ if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {
1751
+ return completed(false);
1752
+ }
1753
+ ignoreNextClick = false;
1754
+ if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list
1755
+ : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {
1756
+ vertical = this._getDirection(evt, target) === 'vertical';
1757
+ dragRect = getRect(dragEl);
1758
+ dragOverEvent('dragOverValid');
1759
+ if (Sortable.eventCanceled) return completedFired;
1760
+ if (revert) {
1761
+ parentEl = rootEl; // actualization
1762
+ capture();
1763
+ this._hideClone();
1764
+ dragOverEvent('revert');
1765
+ if (!Sortable.eventCanceled) {
1766
+ if (nextEl) {
1767
+ rootEl.insertBefore(dragEl, nextEl);
1768
+ } else {
1769
+ rootEl.appendChild(dragEl);
1770
+ }
1771
+ }
1772
+ return completed(true);
1773
+ }
1774
+ var elLastChild = lastChild(el, options.draggable);
1775
+ if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {
1776
+ // Insert to end of list
1777
+
1778
+ // If already at end of list: Do not insert
1779
+ if (elLastChild === dragEl) {
1780
+ return completed(false);
1781
+ }
1782
+
1783
+ // if there is a last element, it is the target
1784
+ if (elLastChild && el === evt.target) {
1785
+ target = elLastChild;
1786
+ }
1787
+ if (target) {
1788
+ targetRect = getRect(target);
1789
+ }
1790
+ if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
1791
+ capture();
1792
+ if (elLastChild && elLastChild.nextSibling) {
1793
+ // the last draggable element is not the last node
1794
+ el.insertBefore(dragEl, elLastChild.nextSibling);
1795
+ } else {
1796
+ el.appendChild(dragEl);
1797
+ }
1798
+ parentEl = el; // actualization
1799
+
1800
+ changed();
1801
+ return completed(true);
1802
+ }
1803
+ } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {
1804
+ // Insert to start of list
1805
+ var firstChild = getChild(el, 0, options, true);
1806
+ if (firstChild === dragEl) {
1807
+ return completed(false);
1808
+ }
1809
+ target = firstChild;
1810
+ targetRect = getRect(target);
1811
+ if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {
1812
+ capture();
1813
+ el.insertBefore(dragEl, firstChild);
1814
+ parentEl = el; // actualization
1815
+
1816
+ changed();
1817
+ return completed(true);
1818
+ }
1819
+ } else if (target.parentNode === el) {
1820
+ targetRect = getRect(target);
1821
+ var direction = 0,
1822
+ targetBeforeFirstSwap,
1823
+ differentLevel = dragEl.parentNode !== el,
1824
+ differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),
1825
+ side1 = vertical ? 'top' : 'left',
1826
+ scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),
1827
+ scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;
1828
+ if (lastTarget !== target) {
1829
+ targetBeforeFirstSwap = targetRect[side1];
1830
+ pastFirstInvertThresh = false;
1831
+ isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;
1832
+ }
1833
+ direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);
1834
+ var sibling;
1835
+ if (direction !== 0) {
1836
+ // Check if target is beside dragEl in respective direction (ignoring hidden elements)
1837
+ var dragIndex = index(dragEl);
1838
+ do {
1839
+ dragIndex -= direction;
1840
+ sibling = parentEl.children[dragIndex];
1841
+ } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));
1842
+ }
1843
+ // If dragEl is already beside target: Do not insert
1844
+ if (direction === 0 || sibling === target) {
1845
+ return completed(false);
1846
+ }
1847
+ lastTarget = target;
1848
+ lastDirection = direction;
1849
+ var nextSibling = target.nextElementSibling,
1850
+ after = false;
1851
+ after = direction === 1;
1852
+ var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);
1853
+ if (moveVector !== false) {
1854
+ if (moveVector === 1 || moveVector === -1) {
1855
+ after = moveVector === 1;
1856
+ }
1857
+ _silent = true;
1858
+ setTimeout(_unsilent, 30);
1859
+ capture();
1860
+ if (after && !nextSibling) {
1861
+ el.appendChild(dragEl);
1862
+ } else {
1863
+ target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
1864
+ }
1865
+
1866
+ // Undo chrome's scroll adjustment (has no effect on other browsers)
1867
+ if (scrolledPastTop) {
1868
+ scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);
1869
+ }
1870
+ parentEl = dragEl.parentNode; // actualization
1871
+
1872
+ // must be done before animation
1873
+ if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {
1874
+ targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);
1875
+ }
1876
+ changed();
1877
+ return completed(true);
1878
+ }
1879
+ }
1880
+ if (el.contains(dragEl)) {
1881
+ return completed(false);
1882
+ }
1883
+ }
1884
+ return false;
1885
+ },
1886
+ _ignoreWhileAnimating: null,
1887
+ _offMoveEvents: function _offMoveEvents() {
1888
+ off(document, 'mousemove', this._onTouchMove);
1889
+ off(document, 'touchmove', this._onTouchMove);
1890
+ off(document, 'pointermove', this._onTouchMove);
1891
+ off(document, 'dragover', nearestEmptyInsertDetectEvent);
1892
+ off(document, 'mousemove', nearestEmptyInsertDetectEvent);
1893
+ off(document, 'touchmove', nearestEmptyInsertDetectEvent);
1894
+ },
1895
+ _offUpEvents: function _offUpEvents() {
1896
+ var ownerDocument = this.el.ownerDocument;
1897
+ off(ownerDocument, 'mouseup', this._onDrop);
1898
+ off(ownerDocument, 'touchend', this._onDrop);
1899
+ off(ownerDocument, 'pointerup', this._onDrop);
1900
+ off(ownerDocument, 'touchcancel', this._onDrop);
1901
+ off(document, 'selectstart', this);
1902
+ },
1903
+ _onDrop: function _onDrop( /**Event*/evt) {
1904
+ var el = this.el,
1905
+ options = this.options;
1906
+
1907
+ // Get the index of the dragged element within its parent
1908
+ newIndex = index(dragEl);
1909
+ newDraggableIndex = index(dragEl, options.draggable);
1910
+ pluginEvent('drop', this, {
1911
+ evt: evt
1912
+ });
1913
+ parentEl = dragEl && dragEl.parentNode;
1914
+
1915
+ // Get again after plugin event
1916
+ newIndex = index(dragEl);
1917
+ newDraggableIndex = index(dragEl, options.draggable);
1918
+ if (Sortable.eventCanceled) {
1919
+ this._nulling();
1920
+ return;
1921
+ }
1922
+ awaitingDragStarted = false;
1923
+ isCircumstantialInvert = false;
1924
+ pastFirstInvertThresh = false;
1925
+ clearInterval(this._loopId);
1926
+ clearTimeout(this._dragStartTimer);
1927
+ _cancelNextTick(this.cloneId);
1928
+ _cancelNextTick(this._dragStartId);
1929
+
1930
+ // Unbind events
1931
+ if (this.nativeDraggable) {
1932
+ off(document, 'drop', this);
1933
+ off(el, 'dragstart', this._onDragStart);
1934
+ }
1935
+ this._offMoveEvents();
1936
+ this._offUpEvents();
1937
+ if (Safari) {
1938
+ css(document.body, 'user-select', '');
1939
+ }
1940
+ css(dragEl, 'transform', '');
1941
+ if (evt) {
1942
+ if (moved) {
1943
+ evt.cancelable && evt.preventDefault();
1944
+ !options.dropBubble && evt.stopPropagation();
1945
+ }
1946
+ ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);
1947
+ if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
1948
+ // Remove clone(s)
1949
+ cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);
1950
+ }
1951
+ if (dragEl) {
1952
+ if (this.nativeDraggable) {
1953
+ off(dragEl, 'dragend', this);
1954
+ }
1955
+ _disableDraggable(dragEl);
1956
+ dragEl.style['will-change'] = '';
1957
+
1958
+ // Remove classes
1959
+ // ghostClass is added in dragStarted
1960
+ if (moved && !awaitingDragStarted) {
1961
+ toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);
1962
+ }
1963
+ toggleClass(dragEl, this.options.chosenClass, false);
1964
+
1965
+ // Drag stop event
1966
+ _dispatchEvent({
1967
+ sortable: this,
1968
+ name: 'unchoose',
1969
+ toEl: parentEl,
1970
+ newIndex: null,
1971
+ newDraggableIndex: null,
1972
+ originalEvent: evt
1973
+ });
1974
+ if (rootEl !== parentEl) {
1975
+ if (newIndex >= 0) {
1976
+ // Add event
1977
+ _dispatchEvent({
1978
+ rootEl: parentEl,
1979
+ name: 'add',
1980
+ toEl: parentEl,
1981
+ fromEl: rootEl,
1982
+ originalEvent: evt
1983
+ });
1984
+
1985
+ // Remove event
1986
+ _dispatchEvent({
1987
+ sortable: this,
1988
+ name: 'remove',
1989
+ toEl: parentEl,
1990
+ originalEvent: evt
1991
+ });
1992
+
1993
+ // drag from one list and drop into another
1994
+ _dispatchEvent({
1995
+ rootEl: parentEl,
1996
+ name: 'sort',
1997
+ toEl: parentEl,
1998
+ fromEl: rootEl,
1999
+ originalEvent: evt
2000
+ });
2001
+ _dispatchEvent({
2002
+ sortable: this,
2003
+ name: 'sort',
2004
+ toEl: parentEl,
2005
+ originalEvent: evt
2006
+ });
2007
+ }
2008
+ putSortable && putSortable.save();
2009
+ } else {
2010
+ if (newIndex !== oldIndex) {
2011
+ if (newIndex >= 0) {
2012
+ // drag & drop within the same list
2013
+ _dispatchEvent({
2014
+ sortable: this,
2015
+ name: 'update',
2016
+ toEl: parentEl,
2017
+ originalEvent: evt
2018
+ });
2019
+ _dispatchEvent({
2020
+ sortable: this,
2021
+ name: 'sort',
2022
+ toEl: parentEl,
2023
+ originalEvent: evt
2024
+ });
2025
+ }
2026
+ }
2027
+ }
2028
+ if (Sortable.active) {
2029
+ /* jshint eqnull:true */
2030
+ if (newIndex == null || newIndex === -1) {
2031
+ newIndex = oldIndex;
2032
+ newDraggableIndex = oldDraggableIndex;
2033
+ }
2034
+ _dispatchEvent({
2035
+ sortable: this,
2036
+ name: 'end',
2037
+ toEl: parentEl,
2038
+ originalEvent: evt
2039
+ });
2040
+
2041
+ // Save sorting
2042
+ this.save();
2043
+ }
2044
+ }
2045
+ }
2046
+ this._nulling();
2047
+ },
2048
+ _nulling: function _nulling() {
2049
+ pluginEvent('nulling', this);
2050
+ 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;
2051
+ savedInputChecked.forEach(function (el) {
2052
+ el.checked = true;
2053
+ });
2054
+ savedInputChecked.length = lastDx = lastDy = 0;
2055
+ },
2056
+ handleEvent: function handleEvent( /**Event*/evt) {
2057
+ switch (evt.type) {
2058
+ case 'drop':
2059
+ case 'dragend':
2060
+ this._onDrop(evt);
2061
+ break;
2062
+ case 'dragenter':
2063
+ case 'dragover':
2064
+ if (dragEl) {
2065
+ this._onDragOver(evt);
2066
+ _globalDragOver(evt);
2067
+ }
2068
+ break;
2069
+ case 'selectstart':
2070
+ evt.preventDefault();
2071
+ break;
2072
+ }
2073
+ },
2074
+ /**
2075
+ * Serializes the item into an array of string.
2076
+ * @returns {String[]}
2077
+ */
2078
+ toArray: function toArray() {
2079
+ var order = [],
2080
+ el,
2081
+ children = this.el.children,
2082
+ i = 0,
2083
+ n = children.length,
2084
+ options = this.options;
2085
+ for (; i < n; i++) {
2086
+ el = children[i];
2087
+ if (closest(el, options.draggable, this.el, false)) {
2088
+ order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));
2089
+ }
2090
+ }
2091
+ return order;
2092
+ },
2093
+ /**
2094
+ * Sorts the elements according to the array.
2095
+ * @param {String[]} order order of the items
2096
+ */
2097
+ sort: function sort(order, useAnimation) {
2098
+ var items = {},
2099
+ rootEl = this.el;
2100
+ this.toArray().forEach(function (id, i) {
2101
+ var el = rootEl.children[i];
2102
+ if (closest(el, this.options.draggable, rootEl, false)) {
2103
+ items[id] = el;
2104
+ }
2105
+ }, this);
2106
+ useAnimation && this.captureAnimationState();
2107
+ order.forEach(function (id) {
2108
+ if (items[id]) {
2109
+ rootEl.removeChild(items[id]);
2110
+ rootEl.appendChild(items[id]);
2111
+ }
2112
+ });
2113
+ useAnimation && this.animateAll();
2114
+ },
2115
+ /**
2116
+ * Save the current sorting
2117
+ */
2118
+ save: function save() {
2119
+ var store = this.options.store;
2120
+ store && store.set && store.set(this);
2121
+ },
2122
+ /**
2123
+ * 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.
2124
+ * @param {HTMLElement} el
2125
+ * @param {String} [selector] default: `options.draggable`
2126
+ * @returns {HTMLElement|null}
2127
+ */
2128
+ closest: function closest$1(el, selector) {
2129
+ return closest(el, selector || this.options.draggable, this.el, false);
2130
+ },
2131
+ /**
2132
+ * Set/get option
2133
+ * @param {string} name
2134
+ * @param {*} [value]
2135
+ * @returns {*}
2136
+ */
2137
+ option: function option(name, value) {
2138
+ var options = this.options;
2139
+ if (value === void 0) {
2140
+ return options[name];
2141
+ } else {
2142
+ var modifiedValue = PluginManager.modifyOption(this, name, value);
2143
+ if (typeof modifiedValue !== 'undefined') {
2144
+ options[name] = modifiedValue;
2145
+ } else {
2146
+ options[name] = value;
2147
+ }
2148
+ if (name === 'group') {
2149
+ _prepareGroup(options);
2150
+ }
2151
+ }
2152
+ },
2153
+ /**
2154
+ * Destroy
2155
+ */
2156
+ destroy: function destroy() {
2157
+ pluginEvent('destroy', this);
2158
+ var el = this.el;
2159
+ el[expando] = null;
2160
+ off(el, 'mousedown', this._onTapStart);
2161
+ off(el, 'touchstart', this._onTapStart);
2162
+ off(el, 'pointerdown', this._onTapStart);
2163
+ if (this.nativeDraggable) {
2164
+ off(el, 'dragover', this);
2165
+ off(el, 'dragenter', this);
2166
+ }
2167
+ // Remove draggable attributes
2168
+ Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {
2169
+ el.removeAttribute('draggable');
2170
+ });
2171
+ this._onDrop();
2172
+ this._disableDelayedDragEvents();
2173
+ sortables.splice(sortables.indexOf(this.el), 1);
2174
+ this.el = el = null;
2175
+ },
2176
+ _hideClone: function _hideClone() {
2177
+ if (!cloneHidden) {
2178
+ pluginEvent('hideClone', this);
2179
+ if (Sortable.eventCanceled) return;
2180
+ css(cloneEl, 'display', 'none');
2181
+ if (this.options.removeCloneOnHide && cloneEl.parentNode) {
2182
+ cloneEl.parentNode.removeChild(cloneEl);
2183
+ }
2184
+ cloneHidden = true;
2185
+ }
2186
+ },
2187
+ _showClone: function _showClone(putSortable) {
2188
+ if (putSortable.lastPutMode !== 'clone') {
2189
+ this._hideClone();
2190
+ return;
2191
+ }
2192
+ if (cloneHidden) {
2193
+ pluginEvent('showClone', this);
2194
+ if (Sortable.eventCanceled) return;
2195
+
2196
+ // show clone at dragEl or original position
2197
+ if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {
2198
+ rootEl.insertBefore(cloneEl, dragEl);
2199
+ } else if (nextEl) {
2200
+ rootEl.insertBefore(cloneEl, nextEl);
2201
+ } else {
2202
+ rootEl.appendChild(cloneEl);
2203
+ }
2204
+ if (this.options.group.revertClone) {
2205
+ this.animate(dragEl, cloneEl);
2206
+ }
2207
+ css(cloneEl, 'display', '');
2208
+ cloneHidden = false;
2209
+ }
2210
+ }
2211
+ };
2212
+ function _globalDragOver( /**Event*/evt) {
2213
+ if (evt.dataTransfer) {
2214
+ evt.dataTransfer.dropEffect = 'move';
2215
+ }
2216
+ evt.cancelable && evt.preventDefault();
2217
+ }
2218
+ function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {
2219
+ var evt,
2220
+ sortable = fromEl[expando],
2221
+ onMoveFn = sortable.options.onMove,
2222
+ retVal;
2223
+ // Support for new CustomEvent feature
2224
+ if (window.CustomEvent && !IE11OrLess && !Edge) {
2225
+ evt = new CustomEvent('move', {
2226
+ bubbles: true,
2227
+ cancelable: true
2228
+ });
2229
+ } else {
2230
+ evt = document.createEvent('Event');
2231
+ evt.initEvent('move', true, true);
2232
+ }
2233
+ evt.to = toEl;
2234
+ evt.from = fromEl;
2235
+ evt.dragged = dragEl;
2236
+ evt.draggedRect = dragRect;
2237
+ evt.related = targetEl || toEl;
2238
+ evt.relatedRect = targetRect || getRect(toEl);
2239
+ evt.willInsertAfter = willInsertAfter;
2240
+ evt.originalEvent = originalEvent;
2241
+ fromEl.dispatchEvent(evt);
2242
+ if (onMoveFn) {
2243
+ retVal = onMoveFn.call(sortable, evt, originalEvent);
2244
+ }
2245
+ return retVal;
2246
+ }
2247
+ function _disableDraggable(el) {
2248
+ el.draggable = false;
2249
+ }
2250
+ function _unsilent() {
2251
+ _silent = false;
2252
+ }
2253
+ function _ghostIsFirst(evt, vertical, sortable) {
2254
+ var firstElRect = getRect(getChild(sortable.el, 0, sortable.options, true));
2255
+ var sortableContentRect = getContentRect(sortable.el);
2256
+ var spacer = 10;
2257
+ return vertical ? evt.clientX < sortableContentRect.left - spacer || evt.clientY < firstElRect.top && evt.clientX < firstElRect.right : evt.clientY < sortableContentRect.top - spacer || evt.clientY < firstElRect.bottom && evt.clientX < firstElRect.left;
2258
+ }
2259
+ function _ghostIsLast(evt, vertical, sortable) {
2260
+ var lastElRect = getRect(lastChild(sortable.el, sortable.options.draggable));
2261
+ var sortableContentRect = getContentRect(sortable.el);
2262
+ var spacer = 10;
2263
+ return vertical ? evt.clientX > sortableContentRect.right + spacer || evt.clientY > lastElRect.bottom && evt.clientX > lastElRect.left : evt.clientY > sortableContentRect.bottom + spacer || evt.clientX > lastElRect.right && evt.clientY > lastElRect.top;
2264
+ }
2265
+ function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {
2266
+ var mouseOnAxis = vertical ? evt.clientY : evt.clientX,
2267
+ targetLength = vertical ? targetRect.height : targetRect.width,
2268
+ targetS1 = vertical ? targetRect.top : targetRect.left,
2269
+ targetS2 = vertical ? targetRect.bottom : targetRect.right,
2270
+ invert = false;
2271
+ if (!invertSwap) {
2272
+ // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold
2273
+ if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {
2274
+ // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2
2275
+ // check if past first invert threshold on side opposite of lastDirection
2276
+ if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {
2277
+ // past first invert threshold, do not restrict inverted threshold to dragEl shadow
2278
+ pastFirstInvertThresh = true;
2279
+ }
2280
+ if (!pastFirstInvertThresh) {
2281
+ // dragEl shadow (target move distance shadow)
2282
+ if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow
2283
+ : mouseOnAxis > targetS2 - targetMoveDistance) {
2284
+ return -lastDirection;
2285
+ }
2286
+ } else {
2287
+ invert = true;
2288
+ }
2289
+ } else {
2290
+ // Regular
2291
+ if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {
2292
+ return _getInsertDirection(target);
2293
+ }
2294
+ }
2295
+ }
2296
+ invert = invert || invertSwap;
2297
+ if (invert) {
2298
+ // Invert of regular
2299
+ if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {
2300
+ return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;
2301
+ }
2302
+ }
2303
+ return 0;
2304
+ }
2305
+
2306
+ /**
2307
+ * Gets the direction dragEl must be swapped relative to target in order to make it
2308
+ * seem that dragEl has been "inserted" into that element's position
2309
+ * @param {HTMLElement} target The target whose position dragEl is being inserted at
2310
+ * @return {Number} Direction dragEl must be swapped
2311
+ */
2312
+ function _getInsertDirection(target) {
2313
+ if (index(dragEl) < index(target)) {
2314
+ return 1;
2315
+ } else {
2316
+ return -1;
2317
+ }
2318
+ }
2319
+
2320
+ /**
2321
+ * Generate id
2322
+ * @param {HTMLElement} el
2323
+ * @returns {String}
2324
+ * @private
2325
+ */
2326
+ function _generateId(el) {
2327
+ var str = el.tagName + el.className + el.src + el.href + el.textContent,
2328
+ i = str.length,
2329
+ sum = 0;
2330
+ while (i--) {
2331
+ sum += str.charCodeAt(i);
2332
+ }
2333
+ return sum.toString(36);
2334
+ }
2335
+ function _saveInputCheckedState(root) {
2336
+ savedInputChecked.length = 0;
2337
+ var inputs = root.getElementsByTagName('input');
2338
+ var idx = inputs.length;
2339
+ while (idx--) {
2340
+ var el = inputs[idx];
2341
+ el.checked && savedInputChecked.push(el);
2342
+ }
2343
+ }
2344
+ function _nextTick(fn) {
2345
+ return setTimeout(fn, 0);
2346
+ }
2347
+ function _cancelNextTick(id) {
2348
+ return clearTimeout(id);
2349
+ }
2350
+
2351
+ // Fixed #973:
2352
+ if (documentExists) {
2353
+ on(document, 'touchmove', function (evt) {
2354
+ if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {
2355
+ evt.preventDefault();
2356
+ }
2357
+ });
2358
+ }
2359
+
2360
+ // Export utils
2361
+ Sortable.utils = {
2362
+ on: on,
2363
+ off: off,
2364
+ css: css,
2365
+ find: find,
2366
+ is: function is(el, selector) {
2367
+ return !!closest(el, selector, el, false);
2368
+ },
2369
+ extend: extend,
2370
+ throttle: throttle,
2371
+ closest: closest,
2372
+ toggleClass: toggleClass,
2373
+ clone: clone,
2374
+ index: index,
2375
+ nextTick: _nextTick,
2376
+ cancelNextTick: _cancelNextTick,
2377
+ detectDirection: _detectDirection,
2378
+ getChild: getChild
2379
+ };
2380
+
2381
+ /**
2382
+ * Get the Sortable instance of an element
2383
+ * @param {HTMLElement} element The element
2384
+ * @return {Sortable|undefined} The instance of Sortable
2385
+ */
2386
+ Sortable.get = function (element) {
2387
+ return element[expando];
2388
+ };
2389
+
2390
+ /**
2391
+ * Mount a plugin to Sortable
2392
+ * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted
2393
+ */
2394
+ Sortable.mount = function () {
2395
+ for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {
2396
+ plugins[_key] = arguments[_key];
2397
+ }
2398
+ if (plugins[0].constructor === Array) plugins = plugins[0];
2399
+ plugins.forEach(function (plugin) {
2400
+ if (!plugin.prototype || !plugin.prototype.constructor) {
2401
+ throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(plugin));
2402
+ }
2403
+ if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);
2404
+ PluginManager.mount(plugin);
2405
+ });
2406
+ };
2407
+
2408
+ /**
2409
+ * Create sortable instance
2410
+ * @param {HTMLElement} el
2411
+ * @param {Object} [options]
2412
+ */
2413
+ Sortable.create = function (el, options) {
2414
+ return new Sortable(el, options);
2415
+ };
2416
+
2417
+ // Export
2418
+ Sortable.version = version;
2419
+
2420
+ var autoScrolls = [],
2421
+ scrollEl,
2422
+ scrollRootEl,
2423
+ scrolling = false,
2424
+ lastAutoScrollX,
2425
+ lastAutoScrollY,
2426
+ touchEvt$1,
2427
+ pointerElemChangedInterval;
2428
+ function AutoScrollPlugin() {
2429
+ function AutoScroll() {
2430
+ this.defaults = {
2431
+ scroll: true,
2432
+ forceAutoScrollFallback: false,
2433
+ scrollSensitivity: 30,
2434
+ scrollSpeed: 10,
2435
+ bubbleScroll: true
2436
+ };
2437
+
2438
+ // Bind all private methods
2439
+ for (var fn in this) {
2440
+ if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
2441
+ this[fn] = this[fn].bind(this);
2442
+ }
2443
+ }
2444
+ }
2445
+ AutoScroll.prototype = {
2446
+ dragStarted: function dragStarted(_ref) {
2447
+ var originalEvent = _ref.originalEvent;
2448
+ if (this.sortable.nativeDraggable) {
2449
+ on(document, 'dragover', this._handleAutoScroll);
2450
+ } else {
2451
+ if (this.options.supportPointer) {
2452
+ on(document, 'pointermove', this._handleFallbackAutoScroll);
2453
+ } else if (originalEvent.touches) {
2454
+ on(document, 'touchmove', this._handleFallbackAutoScroll);
2455
+ } else {
2456
+ on(document, 'mousemove', this._handleFallbackAutoScroll);
2457
+ }
2458
+ }
2459
+ },
2460
+ dragOverCompleted: function dragOverCompleted(_ref2) {
2461
+ var originalEvent = _ref2.originalEvent;
2462
+ // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)
2463
+ if (!this.options.dragOverBubble && !originalEvent.rootEl) {
2464
+ this._handleAutoScroll(originalEvent);
2465
+ }
2466
+ },
2467
+ drop: function drop() {
2468
+ if (this.sortable.nativeDraggable) {
2469
+ off(document, 'dragover', this._handleAutoScroll);
2470
+ } else {
2471
+ off(document, 'pointermove', this._handleFallbackAutoScroll);
2472
+ off(document, 'touchmove', this._handleFallbackAutoScroll);
2473
+ off(document, 'mousemove', this._handleFallbackAutoScroll);
2474
+ }
2475
+ clearPointerElemChangedInterval();
2476
+ clearAutoScrolls();
2477
+ cancelThrottle();
2478
+ },
2479
+ nulling: function nulling() {
2480
+ touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;
2481
+ autoScrolls.length = 0;
2482
+ },
2483
+ _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {
2484
+ this._handleAutoScroll(evt, true);
2485
+ },
2486
+ _handleAutoScroll: function _handleAutoScroll(evt, fallback) {
2487
+ var _this = this;
2488
+ var x = (evt.touches ? evt.touches[0] : evt).clientX,
2489
+ y = (evt.touches ? evt.touches[0] : evt).clientY,
2490
+ elem = document.elementFromPoint(x, y);
2491
+ touchEvt$1 = evt;
2492
+
2493
+ // IE does not seem to have native autoscroll,
2494
+ // Edge's autoscroll seems too conditional,
2495
+ // MACOS Safari does not have autoscroll,
2496
+ // Firefox and Chrome are good
2497
+ if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {
2498
+ autoScroll(evt, this.options, elem, fallback);
2499
+
2500
+ // Listener for pointer element change
2501
+ var ogElemScroller = getParentAutoScrollElement(elem, true);
2502
+ if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {
2503
+ pointerElemChangedInterval && clearPointerElemChangedInterval();
2504
+ // Detect for pointer elem change, emulating native DnD behaviour
2505
+ pointerElemChangedInterval = setInterval(function () {
2506
+ var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);
2507
+ if (newElem !== ogElemScroller) {
2508
+ ogElemScroller = newElem;
2509
+ clearAutoScrolls();
2510
+ }
2511
+ autoScroll(evt, _this.options, newElem, fallback);
2512
+ }, 10);
2513
+ lastAutoScrollX = x;
2514
+ lastAutoScrollY = y;
2515
+ }
2516
+ } else {
2517
+ // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll
2518
+ if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {
2519
+ clearAutoScrolls();
2520
+ return;
2521
+ }
2522
+ autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);
2523
+ }
2524
+ }
2525
+ };
2526
+ return _extends(AutoScroll, {
2527
+ pluginName: 'scroll',
2528
+ initializeByDefault: true
2529
+ });
2530
+ }
2531
+ function clearAutoScrolls() {
2532
+ autoScrolls.forEach(function (autoScroll) {
2533
+ clearInterval(autoScroll.pid);
2534
+ });
2535
+ autoScrolls = [];
2536
+ }
2537
+ function clearPointerElemChangedInterval() {
2538
+ clearInterval(pointerElemChangedInterval);
2539
+ }
2540
+ var autoScroll = throttle(function (evt, options, rootEl, isFallback) {
2541
+ // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521
2542
+ if (!options.scroll) return;
2543
+ var x = (evt.touches ? evt.touches[0] : evt).clientX,
2544
+ y = (evt.touches ? evt.touches[0] : evt).clientY,
2545
+ sens = options.scrollSensitivity,
2546
+ speed = options.scrollSpeed,
2547
+ winScroller = getWindowScrollingElement();
2548
+ var scrollThisInstance = false,
2549
+ scrollCustomFn;
2550
+
2551
+ // New scroll root, set scrollEl
2552
+ if (scrollRootEl !== rootEl) {
2553
+ scrollRootEl = rootEl;
2554
+ clearAutoScrolls();
2555
+ scrollEl = options.scroll;
2556
+ scrollCustomFn = options.scrollFn;
2557
+ if (scrollEl === true) {
2558
+ scrollEl = getParentAutoScrollElement(rootEl, true);
2559
+ }
2560
+ }
2561
+ var layersOut = 0;
2562
+ var currentParent = scrollEl;
2563
+ do {
2564
+ var el = currentParent,
2565
+ rect = getRect(el),
2566
+ top = rect.top,
2567
+ bottom = rect.bottom,
2568
+ left = rect.left,
2569
+ right = rect.right,
2570
+ width = rect.width,
2571
+ height = rect.height,
2572
+ canScrollX = void 0,
2573
+ canScrollY = void 0,
2574
+ scrollWidth = el.scrollWidth,
2575
+ scrollHeight = el.scrollHeight,
2576
+ elCSS = css(el),
2577
+ scrollPosX = el.scrollLeft,
2578
+ scrollPosY = el.scrollTop;
2579
+ if (el === winScroller) {
2580
+ canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');
2581
+ canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');
2582
+ } else {
2583
+ canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');
2584
+ canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');
2585
+ }
2586
+ var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);
2587
+ var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);
2588
+ if (!autoScrolls[layersOut]) {
2589
+ for (var i = 0; i <= layersOut; i++) {
2590
+ if (!autoScrolls[i]) {
2591
+ autoScrolls[i] = {};
2592
+ }
2593
+ }
2594
+ }
2595
+ if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {
2596
+ autoScrolls[layersOut].el = el;
2597
+ autoScrolls[layersOut].vx = vx;
2598
+ autoScrolls[layersOut].vy = vy;
2599
+ clearInterval(autoScrolls[layersOut].pid);
2600
+ if (vx != 0 || vy != 0) {
2601
+ scrollThisInstance = true;
2602
+ /* jshint loopfunc:true */
2603
+ autoScrolls[layersOut].pid = setInterval(function () {
2604
+ // emulate drag over during autoscroll (fallback), emulating native DnD behaviour
2605
+ if (isFallback && this.layer === 0) {
2606
+ Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely
2607
+ }
2608
+ var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;
2609
+ var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;
2610
+ if (typeof scrollCustomFn === 'function') {
2611
+ if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {
2612
+ return;
2613
+ }
2614
+ }
2615
+ scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);
2616
+ }.bind({
2617
+ layer: layersOut
2618
+ }), 24);
2619
+ }
2620
+ }
2621
+ layersOut++;
2622
+ } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));
2623
+ scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not
2624
+ }, 30);
2625
+
2626
+ var drop = function drop(_ref) {
2627
+ var originalEvent = _ref.originalEvent,
2628
+ putSortable = _ref.putSortable,
2629
+ dragEl = _ref.dragEl,
2630
+ activeSortable = _ref.activeSortable,
2631
+ dispatchSortableEvent = _ref.dispatchSortableEvent,
2632
+ hideGhostForTarget = _ref.hideGhostForTarget,
2633
+ unhideGhostForTarget = _ref.unhideGhostForTarget;
2634
+ if (!originalEvent) return;
2635
+ var toSortable = putSortable || activeSortable;
2636
+ hideGhostForTarget();
2637
+ var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;
2638
+ var target = document.elementFromPoint(touch.clientX, touch.clientY);
2639
+ unhideGhostForTarget();
2640
+ if (toSortable && !toSortable.el.contains(target)) {
2641
+ dispatchSortableEvent('spill');
2642
+ this.onSpill({
2643
+ dragEl: dragEl,
2644
+ putSortable: putSortable
2645
+ });
2646
+ }
2647
+ };
2648
+ function Revert() {}
2649
+ Revert.prototype = {
2650
+ startIndex: null,
2651
+ dragStart: function dragStart(_ref2) {
2652
+ var oldDraggableIndex = _ref2.oldDraggableIndex;
2653
+ this.startIndex = oldDraggableIndex;
2654
+ },
2655
+ onSpill: function onSpill(_ref3) {
2656
+ var dragEl = _ref3.dragEl,
2657
+ putSortable = _ref3.putSortable;
2658
+ this.sortable.captureAnimationState();
2659
+ if (putSortable) {
2660
+ putSortable.captureAnimationState();
2661
+ }
2662
+ var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);
2663
+ if (nextSibling) {
2664
+ this.sortable.el.insertBefore(dragEl, nextSibling);
2665
+ } else {
2666
+ this.sortable.el.appendChild(dragEl);
2667
+ }
2668
+ this.sortable.animateAll();
2669
+ if (putSortable) {
2670
+ putSortable.animateAll();
2671
+ }
2672
+ },
2673
+ drop: drop
2674
+ };
2675
+ _extends(Revert, {
2676
+ pluginName: 'revertOnSpill'
2677
+ });
2678
+ function Remove() {}
2679
+ Remove.prototype = {
2680
+ onSpill: function onSpill(_ref4) {
2681
+ var dragEl = _ref4.dragEl,
2682
+ putSortable = _ref4.putSortable;
2683
+ var parentSortable = putSortable || this.sortable;
2684
+ parentSortable.captureAnimationState();
2685
+ dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);
2686
+ parentSortable.animateAll();
2687
+ },
2688
+ drop: drop
2689
+ };
2690
+ _extends(Remove, {
2691
+ pluginName: 'removeOnSpill'
2692
+ });
2693
+
2694
+ var lastSwapEl;
2695
+ function SwapPlugin() {
2696
+ function Swap() {
2697
+ this.defaults = {
2698
+ swapClass: 'sortable-swap-highlight'
2699
+ };
2700
+ }
2701
+ Swap.prototype = {
2702
+ dragStart: function dragStart(_ref) {
2703
+ var dragEl = _ref.dragEl;
2704
+ lastSwapEl = dragEl;
2705
+ },
2706
+ dragOverValid: function dragOverValid(_ref2) {
2707
+ var completed = _ref2.completed,
2708
+ target = _ref2.target,
2709
+ onMove = _ref2.onMove,
2710
+ activeSortable = _ref2.activeSortable,
2711
+ changed = _ref2.changed,
2712
+ cancel = _ref2.cancel;
2713
+ if (!activeSortable.options.swap) return;
2714
+ var el = this.sortable.el,
2715
+ options = this.options;
2716
+ if (target && target !== el) {
2717
+ var prevSwapEl = lastSwapEl;
2718
+ if (onMove(target) !== false) {
2719
+ toggleClass(target, options.swapClass, true);
2720
+ lastSwapEl = target;
2721
+ } else {
2722
+ lastSwapEl = null;
2723
+ }
2724
+ if (prevSwapEl && prevSwapEl !== lastSwapEl) {
2725
+ toggleClass(prevSwapEl, options.swapClass, false);
2726
+ }
2727
+ }
2728
+ changed();
2729
+ completed(true);
2730
+ cancel();
2731
+ },
2732
+ drop: function drop(_ref3) {
2733
+ var activeSortable = _ref3.activeSortable,
2734
+ putSortable = _ref3.putSortable,
2735
+ dragEl = _ref3.dragEl;
2736
+ var toSortable = putSortable || this.sortable;
2737
+ var options = this.options;
2738
+ lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);
2739
+ if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {
2740
+ if (dragEl !== lastSwapEl) {
2741
+ toSortable.captureAnimationState();
2742
+ if (toSortable !== activeSortable) activeSortable.captureAnimationState();
2743
+ swapNodes(dragEl, lastSwapEl);
2744
+ toSortable.animateAll();
2745
+ if (toSortable !== activeSortable) activeSortable.animateAll();
2746
+ }
2747
+ }
2748
+ },
2749
+ nulling: function nulling() {
2750
+ lastSwapEl = null;
2751
+ }
2752
+ };
2753
+ return _extends(Swap, {
2754
+ pluginName: 'swap',
2755
+ eventProperties: function eventProperties() {
2756
+ return {
2757
+ swapItem: lastSwapEl
2758
+ };
2759
+ }
2760
+ });
2761
+ }
2762
+ function swapNodes(n1, n2) {
2763
+ var p1 = n1.parentNode,
2764
+ p2 = n2.parentNode,
2765
+ i1,
2766
+ i2;
2767
+ if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;
2768
+ i1 = index(n1);
2769
+ i2 = index(n2);
2770
+ if (p1.isEqualNode(p2) && i1 < i2) {
2771
+ i2++;
2772
+ }
2773
+ p1.insertBefore(n2, p1.children[i1]);
2774
+ p2.insertBefore(n1, p2.children[i2]);
2775
+ }
2776
+
2777
+ var multiDragElements = [],
2778
+ multiDragClones = [],
2779
+ lastMultiDragSelect,
2780
+ // for selection with modifier key down (SHIFT)
2781
+ multiDragSortable,
2782
+ initialFolding = false,
2783
+ // Initial multi-drag fold when drag started
2784
+ folding = false,
2785
+ // Folding any other time
2786
+ dragStarted = false,
2787
+ dragEl$1,
2788
+ clonesFromRect,
2789
+ clonesHidden;
2790
+ function MultiDragPlugin() {
2791
+ function MultiDrag(sortable) {
2792
+ // Bind all private methods
2793
+ for (var fn in this) {
2794
+ if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
2795
+ this[fn] = this[fn].bind(this);
2796
+ }
2797
+ }
2798
+ if (!sortable.options.avoidImplicitDeselect) {
2799
+ if (sortable.options.supportPointer) {
2800
+ on(document, 'pointerup', this._deselectMultiDrag);
2801
+ } else {
2802
+ on(document, 'mouseup', this._deselectMultiDrag);
2803
+ on(document, 'touchend', this._deselectMultiDrag);
2804
+ }
2805
+ }
2806
+ on(document, 'keydown', this._checkKeyDown);
2807
+ on(document, 'keyup', this._checkKeyUp);
2808
+ this.defaults = {
2809
+ selectedClass: 'sortable-selected',
2810
+ multiDragKey: null,
2811
+ avoidImplicitDeselect: false,
2812
+ setData: function setData(dataTransfer, dragEl) {
2813
+ var data = '';
2814
+ if (multiDragElements.length && multiDragSortable === sortable) {
2815
+ multiDragElements.forEach(function (multiDragElement, i) {
2816
+ data += (!i ? '' : ', ') + multiDragElement.textContent;
2817
+ });
2818
+ } else {
2819
+ data = dragEl.textContent;
2820
+ }
2821
+ dataTransfer.setData('Text', data);
2822
+ }
2823
+ };
2824
+ }
2825
+ MultiDrag.prototype = {
2826
+ multiDragKeyDown: false,
2827
+ isMultiDrag: false,
2828
+ delayStartGlobal: function delayStartGlobal(_ref) {
2829
+ var dragged = _ref.dragEl;
2830
+ dragEl$1 = dragged;
2831
+ },
2832
+ delayEnded: function delayEnded() {
2833
+ this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);
2834
+ },
2835
+ setupClone: function setupClone(_ref2) {
2836
+ var sortable = _ref2.sortable,
2837
+ cancel = _ref2.cancel;
2838
+ if (!this.isMultiDrag) return;
2839
+ for (var i = 0; i < multiDragElements.length; i++) {
2840
+ multiDragClones.push(clone(multiDragElements[i]));
2841
+ multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;
2842
+ multiDragClones[i].draggable = false;
2843
+ multiDragClones[i].style['will-change'] = '';
2844
+ toggleClass(multiDragClones[i], this.options.selectedClass, false);
2845
+ multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);
2846
+ }
2847
+ sortable._hideClone();
2848
+ cancel();
2849
+ },
2850
+ clone: function clone(_ref3) {
2851
+ var sortable = _ref3.sortable,
2852
+ rootEl = _ref3.rootEl,
2853
+ dispatchSortableEvent = _ref3.dispatchSortableEvent,
2854
+ cancel = _ref3.cancel;
2855
+ if (!this.isMultiDrag) return;
2856
+ if (!this.options.removeCloneOnHide) {
2857
+ if (multiDragElements.length && multiDragSortable === sortable) {
2858
+ insertMultiDragClones(true, rootEl);
2859
+ dispatchSortableEvent('clone');
2860
+ cancel();
2861
+ }
2862
+ }
2863
+ },
2864
+ showClone: function showClone(_ref4) {
2865
+ var cloneNowShown = _ref4.cloneNowShown,
2866
+ rootEl = _ref4.rootEl,
2867
+ cancel = _ref4.cancel;
2868
+ if (!this.isMultiDrag) return;
2869
+ insertMultiDragClones(false, rootEl);
2870
+ multiDragClones.forEach(function (clone) {
2871
+ css(clone, 'display', '');
2872
+ });
2873
+ cloneNowShown();
2874
+ clonesHidden = false;
2875
+ cancel();
2876
+ },
2877
+ hideClone: function hideClone(_ref5) {
2878
+ var _this = this;
2879
+ var sortable = _ref5.sortable,
2880
+ cloneNowHidden = _ref5.cloneNowHidden,
2881
+ cancel = _ref5.cancel;
2882
+ if (!this.isMultiDrag) return;
2883
+ multiDragClones.forEach(function (clone) {
2884
+ css(clone, 'display', 'none');
2885
+ if (_this.options.removeCloneOnHide && clone.parentNode) {
2886
+ clone.parentNode.removeChild(clone);
2887
+ }
2888
+ });
2889
+ cloneNowHidden();
2890
+ clonesHidden = true;
2891
+ cancel();
2892
+ },
2893
+ dragStartGlobal: function dragStartGlobal(_ref6) {
2894
+ var sortable = _ref6.sortable;
2895
+ if (!this.isMultiDrag && multiDragSortable) {
2896
+ multiDragSortable.multiDrag._deselectMultiDrag();
2897
+ }
2898
+ multiDragElements.forEach(function (multiDragElement) {
2899
+ multiDragElement.sortableIndex = index(multiDragElement);
2900
+ });
2901
+
2902
+ // Sort multi-drag elements
2903
+ multiDragElements = multiDragElements.sort(function (a, b) {
2904
+ return a.sortableIndex - b.sortableIndex;
2905
+ });
2906
+ dragStarted = true;
2907
+ },
2908
+ dragStarted: function dragStarted(_ref7) {
2909
+ var _this2 = this;
2910
+ var sortable = _ref7.sortable;
2911
+ if (!this.isMultiDrag) return;
2912
+ if (this.options.sort) {
2913
+ // Capture rects,
2914
+ // hide multi drag elements (by positioning them absolute),
2915
+ // set multi drag elements rects to dragRect,
2916
+ // show multi drag elements,
2917
+ // animate to rects,
2918
+ // unset rects & remove from DOM
2919
+
2920
+ sortable.captureAnimationState();
2921
+ if (this.options.animation) {
2922
+ multiDragElements.forEach(function (multiDragElement) {
2923
+ if (multiDragElement === dragEl$1) return;
2924
+ css(multiDragElement, 'position', 'absolute');
2925
+ });
2926
+ var dragRect = getRect(dragEl$1, false, true, true);
2927
+ multiDragElements.forEach(function (multiDragElement) {
2928
+ if (multiDragElement === dragEl$1) return;
2929
+ setRect(multiDragElement, dragRect);
2930
+ });
2931
+ folding = true;
2932
+ initialFolding = true;
2933
+ }
2934
+ }
2935
+ sortable.animateAll(function () {
2936
+ folding = false;
2937
+ initialFolding = false;
2938
+ if (_this2.options.animation) {
2939
+ multiDragElements.forEach(function (multiDragElement) {
2940
+ unsetRect(multiDragElement);
2941
+ });
2942
+ }
2943
+
2944
+ // Remove all auxiliary multidrag items from el, if sorting enabled
2945
+ if (_this2.options.sort) {
2946
+ removeMultiDragElements();
2947
+ }
2948
+ });
2949
+ },
2950
+ dragOver: function dragOver(_ref8) {
2951
+ var target = _ref8.target,
2952
+ completed = _ref8.completed,
2953
+ cancel = _ref8.cancel;
2954
+ if (folding && ~multiDragElements.indexOf(target)) {
2955
+ completed(false);
2956
+ cancel();
2957
+ }
2958
+ },
2959
+ revert: function revert(_ref9) {
2960
+ var fromSortable = _ref9.fromSortable,
2961
+ rootEl = _ref9.rootEl,
2962
+ sortable = _ref9.sortable,
2963
+ dragRect = _ref9.dragRect;
2964
+ if (multiDragElements.length > 1) {
2965
+ // Setup unfold animation
2966
+ multiDragElements.forEach(function (multiDragElement) {
2967
+ sortable.addAnimationState({
2968
+ target: multiDragElement,
2969
+ rect: folding ? getRect(multiDragElement) : dragRect
2970
+ });
2971
+ unsetRect(multiDragElement);
2972
+ multiDragElement.fromRect = dragRect;
2973
+ fromSortable.removeAnimationState(multiDragElement);
2974
+ });
2975
+ folding = false;
2976
+ insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);
2977
+ }
2978
+ },
2979
+ dragOverCompleted: function dragOverCompleted(_ref10) {
2980
+ var sortable = _ref10.sortable,
2981
+ isOwner = _ref10.isOwner,
2982
+ insertion = _ref10.insertion,
2983
+ activeSortable = _ref10.activeSortable,
2984
+ parentEl = _ref10.parentEl,
2985
+ putSortable = _ref10.putSortable;
2986
+ var options = this.options;
2987
+ if (insertion) {
2988
+ // Clones must be hidden before folding animation to capture dragRectAbsolute properly
2989
+ if (isOwner) {
2990
+ activeSortable._hideClone();
2991
+ }
2992
+ initialFolding = false;
2993
+ // If leaving sort:false root, or already folding - Fold to new location
2994
+ if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {
2995
+ // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible
2996
+ var dragRectAbsolute = getRect(dragEl$1, false, true, true);
2997
+ multiDragElements.forEach(function (multiDragElement) {
2998
+ if (multiDragElement === dragEl$1) return;
2999
+ setRect(multiDragElement, dragRectAbsolute);
3000
+
3001
+ // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted
3002
+ // while folding, and so that we can capture them again because old sortable will no longer be fromSortable
3003
+ parentEl.appendChild(multiDragElement);
3004
+ });
3005
+ folding = true;
3006
+ }
3007
+
3008
+ // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out
3009
+ if (!isOwner) {
3010
+ // Only remove if not folding (folding will remove them anyways)
3011
+ if (!folding) {
3012
+ removeMultiDragElements();
3013
+ }
3014
+ if (multiDragElements.length > 1) {
3015
+ var clonesHiddenBefore = clonesHidden;
3016
+ activeSortable._showClone(sortable);
3017
+
3018
+ // Unfold animation for clones if showing from hidden
3019
+ if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {
3020
+ multiDragClones.forEach(function (clone) {
3021
+ activeSortable.addAnimationState({
3022
+ target: clone,
3023
+ rect: clonesFromRect
3024
+ });
3025
+ clone.fromRect = clonesFromRect;
3026
+ clone.thisAnimationDuration = null;
3027
+ });
3028
+ }
3029
+ } else {
3030
+ activeSortable._showClone(sortable);
3031
+ }
3032
+ }
3033
+ }
3034
+ },
3035
+ dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {
3036
+ var dragRect = _ref11.dragRect,
3037
+ isOwner = _ref11.isOwner,
3038
+ activeSortable = _ref11.activeSortable;
3039
+ multiDragElements.forEach(function (multiDragElement) {
3040
+ multiDragElement.thisAnimationDuration = null;
3041
+ });
3042
+ if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {
3043
+ clonesFromRect = _extends({}, dragRect);
3044
+ var dragMatrix = matrix(dragEl$1, true);
3045
+ clonesFromRect.top -= dragMatrix.f;
3046
+ clonesFromRect.left -= dragMatrix.e;
3047
+ }
3048
+ },
3049
+ dragOverAnimationComplete: function dragOverAnimationComplete() {
3050
+ if (folding) {
3051
+ folding = false;
3052
+ removeMultiDragElements();
3053
+ }
3054
+ },
3055
+ drop: function drop(_ref12) {
3056
+ var evt = _ref12.originalEvent,
3057
+ rootEl = _ref12.rootEl,
3058
+ parentEl = _ref12.parentEl,
3059
+ sortable = _ref12.sortable,
3060
+ dispatchSortableEvent = _ref12.dispatchSortableEvent,
3061
+ oldIndex = _ref12.oldIndex,
3062
+ putSortable = _ref12.putSortable;
3063
+ var toSortable = putSortable || this.sortable;
3064
+ if (!evt) return;
3065
+ var options = this.options,
3066
+ children = parentEl.children;
3067
+
3068
+ // Multi-drag selection
3069
+ if (!dragStarted) {
3070
+ if (options.multiDragKey && !this.multiDragKeyDown) {
3071
+ this._deselectMultiDrag();
3072
+ }
3073
+ toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));
3074
+ if (!~multiDragElements.indexOf(dragEl$1)) {
3075
+ multiDragElements.push(dragEl$1);
3076
+ dispatchEvent({
3077
+ sortable: sortable,
3078
+ rootEl: rootEl,
3079
+ name: 'select',
3080
+ targetEl: dragEl$1,
3081
+ originalEvent: evt
3082
+ });
3083
+
3084
+ // Modifier activated, select from last to dragEl
3085
+ if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {
3086
+ var lastIndex = index(lastMultiDragSelect),
3087
+ currentIndex = index(dragEl$1);
3088
+ if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {
3089
+ // Must include lastMultiDragSelect (select it), in case modified selection from no selection
3090
+ // (but previous selection existed)
3091
+ var n, i;
3092
+ if (currentIndex > lastIndex) {
3093
+ i = lastIndex;
3094
+ n = currentIndex;
3095
+ } else {
3096
+ i = currentIndex;
3097
+ n = lastIndex + 1;
3098
+ }
3099
+ for (; i < n; i++) {
3100
+ if (~multiDragElements.indexOf(children[i])) continue;
3101
+ toggleClass(children[i], options.selectedClass, true);
3102
+ multiDragElements.push(children[i]);
3103
+ dispatchEvent({
3104
+ sortable: sortable,
3105
+ rootEl: rootEl,
3106
+ name: 'select',
3107
+ targetEl: children[i],
3108
+ originalEvent: evt
3109
+ });
3110
+ }
3111
+ }
3112
+ } else {
3113
+ lastMultiDragSelect = dragEl$1;
3114
+ }
3115
+ multiDragSortable = toSortable;
3116
+ } else {
3117
+ multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);
3118
+ lastMultiDragSelect = null;
3119
+ dispatchEvent({
3120
+ sortable: sortable,
3121
+ rootEl: rootEl,
3122
+ name: 'deselect',
3123
+ targetEl: dragEl$1,
3124
+ originalEvent: evt
3125
+ });
3126
+ }
3127
+ }
3128
+
3129
+ // Multi-drag drop
3130
+ if (dragStarted && this.isMultiDrag) {
3131
+ folding = false;
3132
+ // Do not "unfold" after around dragEl if reverted
3133
+ if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {
3134
+ var dragRect = getRect(dragEl$1),
3135
+ multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');
3136
+ if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;
3137
+ toSortable.captureAnimationState();
3138
+ if (!initialFolding) {
3139
+ if (options.animation) {
3140
+ dragEl$1.fromRect = dragRect;
3141
+ multiDragElements.forEach(function (multiDragElement) {
3142
+ multiDragElement.thisAnimationDuration = null;
3143
+ if (multiDragElement !== dragEl$1) {
3144
+ var rect = folding ? getRect(multiDragElement) : dragRect;
3145
+ multiDragElement.fromRect = rect;
3146
+
3147
+ // Prepare unfold animation
3148
+ toSortable.addAnimationState({
3149
+ target: multiDragElement,
3150
+ rect: rect
3151
+ });
3152
+ }
3153
+ });
3154
+ }
3155
+
3156
+ // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert
3157
+ // properly they must all be removed
3158
+ removeMultiDragElements();
3159
+ multiDragElements.forEach(function (multiDragElement) {
3160
+ if (children[multiDragIndex]) {
3161
+ parentEl.insertBefore(multiDragElement, children[multiDragIndex]);
3162
+ } else {
3163
+ parentEl.appendChild(multiDragElement);
3164
+ }
3165
+ multiDragIndex++;
3166
+ });
3167
+
3168
+ // If initial folding is done, the elements may have changed position because they are now
3169
+ // unfolding around dragEl, even though dragEl may not have his index changed, so update event
3170
+ // must be fired here as Sortable will not.
3171
+ if (oldIndex === index(dragEl$1)) {
3172
+ var update = false;
3173
+ multiDragElements.forEach(function (multiDragElement) {
3174
+ if (multiDragElement.sortableIndex !== index(multiDragElement)) {
3175
+ update = true;
3176
+ return;
3177
+ }
3178
+ });
3179
+ if (update) {
3180
+ dispatchSortableEvent('update');
3181
+ dispatchSortableEvent('sort');
3182
+ }
3183
+ }
3184
+ }
3185
+
3186
+ // Must be done after capturing individual rects (scroll bar)
3187
+ multiDragElements.forEach(function (multiDragElement) {
3188
+ unsetRect(multiDragElement);
3189
+ });
3190
+ toSortable.animateAll();
3191
+ }
3192
+ multiDragSortable = toSortable;
3193
+ }
3194
+
3195
+ // Remove clones if necessary
3196
+ if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
3197
+ multiDragClones.forEach(function (clone) {
3198
+ clone.parentNode && clone.parentNode.removeChild(clone);
3199
+ });
3200
+ }
3201
+ },
3202
+ nullingGlobal: function nullingGlobal() {
3203
+ this.isMultiDrag = dragStarted = false;
3204
+ multiDragClones.length = 0;
3205
+ },
3206
+ destroyGlobal: function destroyGlobal() {
3207
+ this._deselectMultiDrag();
3208
+ off(document, 'pointerup', this._deselectMultiDrag);
3209
+ off(document, 'mouseup', this._deselectMultiDrag);
3210
+ off(document, 'touchend', this._deselectMultiDrag);
3211
+ off(document, 'keydown', this._checkKeyDown);
3212
+ off(document, 'keyup', this._checkKeyUp);
3213
+ },
3214
+ _deselectMultiDrag: function _deselectMultiDrag(evt) {
3215
+ if (typeof dragStarted !== "undefined" && dragStarted) return;
3216
+
3217
+ // Only deselect if selection is in this sortable
3218
+ if (multiDragSortable !== this.sortable) return;
3219
+
3220
+ // Only deselect if target is not item in this sortable
3221
+ if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return;
3222
+
3223
+ // Only deselect if left click
3224
+ if (evt && evt.button !== 0) return;
3225
+ while (multiDragElements.length) {
3226
+ var el = multiDragElements[0];
3227
+ toggleClass(el, this.options.selectedClass, false);
3228
+ multiDragElements.shift();
3229
+ dispatchEvent({
3230
+ sortable: this.sortable,
3231
+ rootEl: this.sortable.el,
3232
+ name: 'deselect',
3233
+ targetEl: el,
3234
+ originalEvent: evt
3235
+ });
3236
+ }
3237
+ },
3238
+ _checkKeyDown: function _checkKeyDown(evt) {
3239
+ if (evt.key === this.options.multiDragKey) {
3240
+ this.multiDragKeyDown = true;
3241
+ }
3242
+ },
3243
+ _checkKeyUp: function _checkKeyUp(evt) {
3244
+ if (evt.key === this.options.multiDragKey) {
3245
+ this.multiDragKeyDown = false;
3246
+ }
3247
+ }
3248
+ };
3249
+ return _extends(MultiDrag, {
3250
+ // Static methods & properties
3251
+ pluginName: 'multiDrag',
3252
+ utils: {
3253
+ /**
3254
+ * Selects the provided multi-drag item
3255
+ * @param {HTMLElement} el The element to be selected
3256
+ */
3257
+ select: function select(el) {
3258
+ var sortable = el.parentNode[expando];
3259
+ if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;
3260
+ if (multiDragSortable && multiDragSortable !== sortable) {
3261
+ multiDragSortable.multiDrag._deselectMultiDrag();
3262
+ multiDragSortable = sortable;
3263
+ }
3264
+ toggleClass(el, sortable.options.selectedClass, true);
3265
+ multiDragElements.push(el);
3266
+ },
3267
+ /**
3268
+ * Deselects the provided multi-drag item
3269
+ * @param {HTMLElement} el The element to be deselected
3270
+ */
3271
+ deselect: function deselect(el) {
3272
+ var sortable = el.parentNode[expando],
3273
+ index = multiDragElements.indexOf(el);
3274
+ if (!sortable || !sortable.options.multiDrag || !~index) return;
3275
+ toggleClass(el, sortable.options.selectedClass, false);
3276
+ multiDragElements.splice(index, 1);
3277
+ }
3278
+ },
3279
+ eventProperties: function eventProperties() {
3280
+ var _this3 = this;
3281
+ var oldIndicies = [],
3282
+ newIndicies = [];
3283
+ multiDragElements.forEach(function (multiDragElement) {
3284
+ oldIndicies.push({
3285
+ multiDragElement: multiDragElement,
3286
+ index: multiDragElement.sortableIndex
3287
+ });
3288
+
3289
+ // multiDragElements will already be sorted if folding
3290
+ var newIndex;
3291
+ if (folding && multiDragElement !== dragEl$1) {
3292
+ newIndex = -1;
3293
+ } else if (folding) {
3294
+ newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');
3295
+ } else {
3296
+ newIndex = index(multiDragElement);
3297
+ }
3298
+ newIndicies.push({
3299
+ multiDragElement: multiDragElement,
3300
+ index: newIndex
3301
+ });
3302
+ });
3303
+ return {
3304
+ items: _toConsumableArray(multiDragElements),
3305
+ clones: [].concat(multiDragClones),
3306
+ oldIndicies: oldIndicies,
3307
+ newIndicies: newIndicies
3308
+ };
3309
+ },
3310
+ optionListeners: {
3311
+ multiDragKey: function multiDragKey(key) {
3312
+ key = key.toLowerCase();
3313
+ if (key === 'ctrl') {
3314
+ key = 'Control';
3315
+ } else if (key.length > 1) {
3316
+ key = key.charAt(0).toUpperCase() + key.substr(1);
3317
+ }
3318
+ return key;
3319
+ }
3320
+ }
3321
+ });
3322
+ }
3323
+ function insertMultiDragElements(clonesInserted, rootEl) {
3324
+ multiDragElements.forEach(function (multiDragElement, i) {
3325
+ var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];
3326
+ if (target) {
3327
+ rootEl.insertBefore(multiDragElement, target);
3328
+ } else {
3329
+ rootEl.appendChild(multiDragElement);
3330
+ }
3331
+ });
3332
+ }
3333
+
3334
+ /**
3335
+ * Insert multi-drag clones
3336
+ * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted
3337
+ * @param {HTMLElement} rootEl
3338
+ */
3339
+ function insertMultiDragClones(elementsInserted, rootEl) {
3340
+ multiDragClones.forEach(function (clone, i) {
3341
+ var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];
3342
+ if (target) {
3343
+ rootEl.insertBefore(clone, target);
3344
+ } else {
3345
+ rootEl.appendChild(clone);
3346
+ }
3347
+ });
3348
+ }
3349
+ function removeMultiDragElements() {
3350
+ multiDragElements.forEach(function (multiDragElement) {
3351
+ if (multiDragElement === dragEl$1) return;
3352
+ multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);
3353
+ });
3354
+ }
3355
+
3356
+ Sortable.mount(new AutoScrollPlugin());
3357
+ Sortable.mount(Remove, Revert);
3358
+
3359
+ /*!
3360
+ * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3361
+ * See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
3362
+ * v2.4.0
3363
+ */
3364
+ const sortableComponentSet = new Set();
3365
+ const CSS = {
3366
+ ghostClass: "calcite-sortable--ghost",
3367
+ chosenClass: "calcite-sortable--chosen",
3368
+ dragClass: "calcite-sortable--drag",
3369
+ };
3370
+ /**
3371
+ * Helper to keep track of a SortableComponent. This should be called in the `connectedCallback` lifecycle method as well as any other method necessary to rebuild the sortable instance.
3372
+ *
3373
+ * @param {SortableComponent} component - The sortable component.
3374
+ */
3375
+ function connectSortableComponent(component) {
3376
+ disconnectSortableComponent(component);
3377
+ sortableComponentSet.add(component);
3378
+ const dataIdAttr = "id";
3379
+ const { group, handleSelector: handle, dragSelector: draggable } = component;
3380
+ component.sortable = Sortable.create(component.el, {
3381
+ dataIdAttr,
3382
+ ...CSS,
3383
+ ...(!!draggable && { draggable }),
3384
+ ...(!!group && {
3385
+ group: {
3386
+ name: group,
3387
+ ...(!!component.canPull && {
3388
+ pull: (to, from, dragEl, { newIndex, oldIndex }) => component.canPull({ toEl: to.el, fromEl: from.el, dragEl, newIndex, oldIndex }),
3389
+ }),
3390
+ ...(!!component.canPut && {
3391
+ put: (to, from, dragEl, { newIndex, oldIndex }) => component.canPut({ toEl: to.el, fromEl: from.el, dragEl, newIndex, oldIndex }),
3392
+ }),
3393
+ },
3394
+ }),
3395
+ handle,
3396
+ filter: "[drag-disabled]",
3397
+ onStart: ({ from: fromEl, item: dragEl, to: toEl, newIndex, oldIndex }) => {
3398
+ dragState.active = true;
3399
+ onGlobalDragStart();
3400
+ component.onDragStart({ fromEl, dragEl, toEl, newIndex, oldIndex });
3401
+ },
3402
+ onEnd: ({ from: fromEl, item: dragEl, to: toEl, newIndex, oldIndex }) => {
3403
+ dragState.active = false;
3404
+ onGlobalDragEnd();
3405
+ component.onDragEnd({ fromEl, dragEl, toEl, newIndex, oldIndex });
3406
+ },
3407
+ onSort: ({ from: fromEl, item: dragEl, to: toEl, newIndex, oldIndex }) => {
3408
+ component.onDragSort({ fromEl, dragEl, toEl, newIndex, oldIndex });
3409
+ },
3410
+ });
3411
+ }
3412
+ /**
3413
+ * Helper to remove track of a SortableComponent. This should be called in the `disconnectedCallback` lifecycle method.
3414
+ *
3415
+ * @param {SortableComponent} component - The sortable component.
3416
+ */
3417
+ function disconnectSortableComponent(component) {
3418
+ sortableComponentSet.delete(component);
3419
+ component.sortable?.destroy();
3420
+ component.sortable = null;
3421
+ }
3422
+ const dragState = { active: false };
3423
+ /**
3424
+ * Helper to determine if dragging is currently active.
3425
+ *
3426
+ * @param component The sortable component.
3427
+ * @returns {boolean} a boolean value.
3428
+ */
3429
+ function dragActive(component) {
3430
+ return component.dragEnabled && dragState.active;
3431
+ }
3432
+ function onGlobalDragStart() {
3433
+ Array.from(sortableComponentSet).forEach((component) => component.onGlobalDragStart());
3434
+ }
3435
+ function onGlobalDragEnd() {
3436
+ Array.from(sortableComponentSet).forEach((component) => component.onGlobalDragEnd());
3437
+ }
3438
+
3439
+ export { disconnectSortableComponent as a, connectSortableComponent as c, dragActive as d };