@luzmo/analytics-components-kit 1.0.9-beta.1 → 1.0.9-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1112) hide show
  1. package/README.md +7 -1
  2. package/components/add-to-dashboard/add-to-dashboard.d.ts +134 -0
  3. package/components/add-to-dashboard/dashboard-actions.d.ts +14 -0
  4. package/components/add-to-dashboard/helpers/add-to-dashboard-helpers.d.ts +3 -0
  5. package/components/add-to-dashboard/index.cjs +20 -0
  6. package/components/add-to-dashboard/index.d.ts +11 -0
  7. package/components/add-to-dashboard/index.js +21 -0
  8. package/components/add-to-dashboard/types.d.ts +7 -0
  9. package/components/add-to-dashboard-BY70QBzE.js +805 -0
  10. package/components/add-to-dashboard-nYUaDghN.cjs +166 -0
  11. package/components/ai-chat/ai-chat-request.d.ts +1 -1
  12. package/components/ai-chat/ai-chat.d.ts +12 -4
  13. package/components/ai-chat/empty-state/ai-chat-empty-state.d.ts +9 -2
  14. package/components/ai-chat/helpers/elicitation-template.d.ts +3 -1
  15. package/components/ai-chat/index.cjs +1 -1
  16. package/components/ai-chat/index.d.ts +2 -2
  17. package/components/ai-chat/index.js +2 -9
  18. package/components/ai-chat-DfuJOWao.cjs +338 -0
  19. package/components/ai-chat-DmDtBF47.js +4325 -0
  20. package/components/ai-interaction-textarea/ai-interaction-textarea.d.ts +8 -1
  21. package/components/ai-interaction-textarea/index.cjs +1 -1
  22. package/components/ai-interaction-textarea/index.js +1 -8
  23. package/components/ai-interaction-textarea-6ECwAdeT.js +823 -0
  24. package/components/ai-interaction-textarea-CRyyTj_B.cjs +101 -0
  25. package/components/area-chart-positioning.config-CoCdjr2E.cjs +20 -0
  26. package/components/area-chart-positioning.config-o-uJPEr5.js +55 -0
  27. package/components/bar-chart-positioning.config-CZgrS6lc.js +59 -0
  28. package/components/bar-chart-positioning.config-fsB82756.cjs +20 -0
  29. package/components/base-BmvsQ-s1.cjs +20 -0
  30. package/components/base-CrpOMVeU.js +248 -0
  31. package/components/base-store-CkIsrRcu.cjs +20 -0
  32. package/components/base-store-gYqg__8A.js +151 -0
  33. package/components/box-plot-positioning.config-BMfGGDfe.cjs +20 -0
  34. package/components/box-plot-positioning.config-CDq460FI.js +48 -0
  35. package/components/bubble-chart-positioning.config-C9MmTtTX.cjs +20 -0
  36. package/components/bubble-chart-positioning.config-DWfz4tud.js +55 -0
  37. package/components/bullet-chart-positioning.config-BwHPM5ui.cjs +20 -0
  38. package/components/bullet-chart-positioning.config-DmSlVIjL.js +56 -0
  39. package/components/chart-helpers-DQS2iqSd.js +250 -0
  40. package/components/chart-helpers-ufZ6VbXs.cjs +20 -0
  41. package/components/choropleth-map-options.config-CP-IK-4W.js +352 -0
  42. package/components/choropleth-map-options.config-DSXndhIY.cjs +20 -0
  43. package/components/choropleth-map-positioning.config-C0m6zzD3.cjs +20 -0
  44. package/components/choropleth-map-positioning.config-cjBzi_Db.js +55 -0
  45. package/components/circle-pack-chart-positioning.config-BAFFQSHe.cjs +20 -0
  46. package/components/circle-pack-chart-positioning.config-CY2rLb57.js +48 -0
  47. package/components/circular-gauge-positioning.config-6pZUNxYa.js +48 -0
  48. package/components/circular-gauge-positioning.config-BfWAjAY2.cjs +20 -0
  49. package/components/color-B7SELPGq.js +3812 -0
  50. package/components/color-BIEQvHs4.cjs +20 -0
  51. package/components/color-range-utils-6oEqHV0y.js +63 -0
  52. package/components/color-range-utils-Bgzuy2bR.cjs +20 -0
  53. package/components/column-chart-positioning.config-hrAvNd7T.js +55 -0
  54. package/components/column-chart-positioning.config-xgRuA_l5.cjs +20 -0
  55. package/components/combination-chart-positioning.config-BI8HroaG.js +48 -0
  56. package/components/combination-chart-positioning.config-D0TU4hge.cjs +20 -0
  57. package/components/conditional-number-positioning.config-B_yISWne.cjs +20 -0
  58. package/components/conditional-number-positioning.config-CWaDhMLA.js +48 -0
  59. package/components/data-broker-Cb-Fq9xy.cjs +20 -0
  60. package/components/data-broker-DNfq_8Lg.js +1695 -0
  61. package/components/data-field/index.cjs +1 -1
  62. package/components/data-field/index.js +1 -8
  63. package/components/data-field-D4YFqg1H.js +119 -0
  64. package/components/data-field-Hi-ITTzx.cjs +54 -0
  65. package/components/data-field-level/index.cjs +1 -1
  66. package/components/data-field-level/index.js +1 -8
  67. package/components/data-field-level-BWQPtFP5.cjs +55 -0
  68. package/components/data-field-level-CB5GtdU5.js +245 -0
  69. package/components/data-field-panel/index.cjs +1 -1
  70. package/components/data-field-panel/index.js +1 -8
  71. package/components/data-field-panel-64HoViNT.js +383 -0
  72. package/components/data-field-panel-DzKwmQi_.cjs +87 -0
  73. package/components/data-fields-select/data-fields-select.d.ts +1 -1
  74. package/components/data-fields-select/index.cjs +1 -1
  75. package/components/data-fields-select/index.js +1 -8
  76. package/components/data-fields-select-BOwoWq0j.js +290 -0
  77. package/components/data-fields-select-DXv6PQHG.cjs +43 -0
  78. package/components/dataset-icon/dataset-icon.d.ts +5 -4
  79. package/components/dataset-icon/index.cjs +1 -1
  80. package/components/dataset-icon/index.js +1 -8
  81. package/components/dataset-icon-Bag_eDv8.js +115 -0
  82. package/components/dataset-icon-CWKBYjGJ.cjs +62 -0
  83. package/components/dataset-selector-list/index.cjs +1 -1
  84. package/components/dataset-selector-list/index.js +1 -8
  85. package/components/dataset-selector-list-DFC2bvn0.js +321 -0
  86. package/components/dataset-selector-list-_AL1-GWw.cjs +75 -0
  87. package/components/dataset-selector-row/dataset-selector-row.d.ts +10 -1
  88. package/components/dataset-selector-row/index.cjs +1 -1
  89. package/components/dataset-selector-row/index.js +1 -8
  90. package/components/dataset-selector-row-By2ko-Rd.cjs +104 -0
  91. package/components/dataset-selector-row-DC6mrVyF.js +448 -0
  92. package/components/de-CjQMTFtl.cjs +20 -0
  93. package/components/de-Yl3kqB03.js +594 -0
  94. package/components/defineProperty-AldSMFEH.js +58 -0
  95. package/components/defineProperty-X1c4tIPD.cjs +20 -0
  96. package/components/display-settings/display-settings.d.ts +2 -2
  97. package/components/display-settings/index.cjs +1 -1
  98. package/components/display-settings/index.js +1 -8
  99. package/components/display-settings-B2V_F_CU.cjs +142 -0
  100. package/components/display-settings-BsCKV9ae.js +316 -0
  101. package/components/display-settings-binning/index.cjs +1 -1
  102. package/components/display-settings-binning/index.js +1 -8
  103. package/components/display-settings-binning-BdtxayZT.cjs +56 -0
  104. package/components/display-settings-binning-CkrbhPVB.js +111 -0
  105. package/components/display-settings-datetime/index.cjs +1 -1
  106. package/components/display-settings-datetime/index.js +1 -8
  107. package/components/display-settings-datetime-CpFyrcGk.cjs +217 -0
  108. package/components/display-settings-datetime-mVh5Tjrx.js +414 -0
  109. package/components/display-settings-grand-totals/index.cjs +1 -1
  110. package/components/display-settings-grand-totals/index.js +1 -8
  111. package/components/display-settings-grand-totals-CwOGoE06.cjs +44 -0
  112. package/components/display-settings-grand-totals-D7unOEKl.js +90 -0
  113. package/components/display-settings-numeric/index.cjs +1 -1
  114. package/components/display-settings-numeric/index.js +1 -8
  115. package/components/display-settings-numeric-DDZyFNFF.js +480 -0
  116. package/components/display-settings-numeric-DhiXPU3f.cjs +190 -0
  117. package/components/display-settings-period-over-period/display-settings-period-over-period.d.ts +2 -2
  118. package/components/display-settings-period-over-period/index.cjs +1 -1
  119. package/components/display-settings-period-over-period/index.js +1 -8
  120. package/components/display-settings-period-over-period-BNFjbgP0.cjs +227 -0
  121. package/components/display-settings-period-over-period-Hd172SzT.js +443 -0
  122. package/components/donut-chart-positioning.config-B2CrxOig.js +48 -0
  123. package/components/donut-chart-positioning.config-DQb53kWI.cjs +20 -0
  124. package/components/es-Ctf1SIsp.js +594 -0
  125. package/components/es-DmmTP7D0.cjs +20 -0
  126. package/components/evolution-number-positioning.config-BdH8pv6_.js +48 -0
  127. package/components/evolution-number-positioning.config-BzBsGcD4.cjs +20 -0
  128. package/components/filter-expression-picker/index.cjs +1 -1
  129. package/components/filter-expression-picker/index.js +1 -8
  130. package/components/filter-expression-picker-Bn_jAdQX.cjs +40 -0
  131. package/components/filter-expression-picker-Cjr8xWxy.js +434 -0
  132. package/components/filter-item/filter-item.d.ts +1 -1
  133. package/components/filter-item/index.cjs +1 -1
  134. package/components/filter-item/index.js +1 -8
  135. package/components/filter-item-CHJDVOju.cjs +111 -0
  136. package/components/filter-item-D6y8eCmG.js +793 -0
  137. package/components/filter-parameter-picker/index.cjs +1 -1
  138. package/components/filter-parameter-picker/index.js +1 -8
  139. package/components/filter-parameter-picker-C955tF0T.js +372 -0
  140. package/components/filter-parameter-picker-jyrh3POQ.cjs +124 -0
  141. package/components/filter-value-picker/index.cjs +1 -1
  142. package/components/filter-value-picker/index.js +1 -8
  143. package/components/filter-value-picker-B8nA8hTV.js +170 -0
  144. package/components/filter-value-picker-DmWiNLZH.cjs +69 -0
  145. package/components/filter-value-picker-datetime/index.cjs +1 -1
  146. package/components/filter-value-picker-datetime/index.js +1 -8
  147. package/components/filter-value-picker-datetime-BAhXn1BS.js +160 -0
  148. package/components/filter-value-picker-datetime-U4XWKSFx.cjs +51 -0
  149. package/components/filter-value-picker-hierarchy/index.cjs +1 -1
  150. package/components/filter-value-picker-hierarchy/index.js +1 -8
  151. package/components/filter-value-picker-hierarchy-1ya1_rS3.cjs +54 -0
  152. package/components/filter-value-picker-hierarchy-CUPz5Ggs.js +316 -0
  153. package/components/filter-value-picker-numeric/index.cjs +1 -1
  154. package/components/filter-value-picker-numeric/index.js +1 -8
  155. package/components/filter-value-picker-numeric-D8mLaxzj.js +237 -0
  156. package/components/filter-value-picker-numeric-DrHdHj31.cjs +54 -0
  157. package/components/filters/index.cjs +1 -1
  158. package/components/filters/index.js +1 -8
  159. package/components/filters-Byy8HE19.js +927 -0
  160. package/components/filters-C8xz8DV-.cjs +199 -0
  161. package/components/formula/formula.d.ts +2 -2
  162. package/components/formula/index.cjs +1 -1
  163. package/components/formula/index.js +1 -8
  164. package/components/formula-C6dPJyKm.cjs +45 -0
  165. package/components/formula-D_ipR6d1.js +136 -0
  166. package/components/formula-codemirror/formula-codemirror.d.ts +2 -2
  167. package/components/formula-codemirror/pills/formula-aggregation/formula-aggregation.d.ts +2 -2
  168. package/components/formula-codemirror/pills/formula-empty-argument-pill/formula-empty-argument-pill.d.ts +2 -2
  169. package/components/formula-codemirror/pills/formula-include-exclude-panel.d.ts +1 -1
  170. package/components/formula-codemirror-C1UFMf6i.cjs +215 -0
  171. package/components/formula-codemirror-CdlIly66.js +12008 -0
  172. package/components/formula-display-store-B0ifmvCi.cjs +20 -0
  173. package/components/formula-display-store-CfObcBCd.js +1087 -0
  174. package/components/formula-editor/formula-aggregations-list.d.ts +2 -2
  175. package/components/formula-editor/formula-datasets-list.d.ts +2 -2
  176. package/components/formula-editor/formula-description.d.ts +1 -1
  177. package/components/formula-editor/formula-editor.d.ts +1 -1
  178. package/components/formula-editor/formula-functions-list.d.ts +2 -2
  179. package/components/formula-editor/index.cjs +1 -1
  180. package/components/formula-editor/index.d.ts +3 -3
  181. package/components/formula-editor/index.js +3 -10
  182. package/components/formula-editor-B9ikCsLK.cjs +224 -0
  183. package/components/formula-editor-DJ-0AVCl.js +685 -0
  184. package/components/formula-field/formula-field.d.ts +1 -1
  185. package/components/formula-field/index.cjs +1 -1
  186. package/components/formula-field/index.js +1 -8
  187. package/components/formula-field-Bq-RYt0H.js +38 -0
  188. package/components/formula-field-CNqn6Xbh.cjs +20 -0
  189. package/components/formula-input-base-Dple-9bo.js +236 -0
  190. package/components/formula-input-base-KSmmN1uI.cjs +49 -0
  191. package/components/fr-DKDPLLAZ.cjs +20 -0
  192. package/components/fr-zWhjQv4B.js +594 -0
  193. package/components/funnel-chart-positioning.config-DgRle8n1.js +48 -0
  194. package/components/funnel-chart-positioning.config-DleNZIG-.cjs +20 -0
  195. package/components/get-dataset-name-3UfKdy0m.cjs +20 -0
  196. package/components/get-dataset-name-trrlomzY.js +32 -0
  197. package/components/grid-core-BFNgmaGk.js +4490 -0
  198. package/components/grid-core-DY0vyroD.cjs +68 -0
  199. package/components/grid-core.cjs +20 -0
  200. package/components/grid-core.js +21 -0
  201. package/components/groupings-B55Oba6e.js +52 -0
  202. package/components/groupings-DEpTt8DV.cjs +20 -0
  203. package/components/heat-map-options.config-D58595hz.js +226 -0
  204. package/components/heat-map-options.config-DhQrM9S9.cjs +20 -0
  205. package/components/heat-map-positioning.config-BTabq_f9.js +48 -0
  206. package/components/heat-map-positioning.config-DCB3Eagz.cjs +20 -0
  207. package/components/heat-table-options.config-AhmEjDAb.cjs +20 -0
  208. package/components/heat-table-options.config-x-KBTZo1.js +269 -0
  209. package/components/heat-table-positioning.config-Dnu133l4.cjs +20 -0
  210. package/components/heat-table-positioning.config-pK8Wn1dw.js +55 -0
  211. package/components/hexbin-map-positioning.config-DjYp-lX8.js +48 -0
  212. package/components/hexbin-map-positioning.config-IqRt8f29.cjs +20 -0
  213. package/components/index.cjs +1 -1
  214. package/components/index.js +69 -73
  215. package/components/interactive-viz-item/index.cjs +1 -1
  216. package/components/interactive-viz-item/index.d.ts +2 -0
  217. package/components/interactive-viz-item/index.js +3 -9
  218. package/components/interactive-viz-item/interactive-viz-item.d.ts +21 -4
  219. package/components/interactive-viz-item/load-add-to-dashboard.d.ts +1 -0
  220. package/components/interactive-viz-item-CM-LoEa5.cjs +261 -0
  221. package/components/interactive-viz-item-D6lWVMHb.js +528 -0
  222. package/components/item-grid/actions.d.ts +2 -1
  223. package/components/item-grid/helpers/grid-chart-rendering.d.ts +12 -0
  224. package/components/item-grid/helpers/grid-events.d.ts +1 -56
  225. package/components/item-grid/helpers/grid-interactions.d.ts +1 -88
  226. package/components/item-grid/helpers/grid-item-management.d.ts +5 -26
  227. package/components/item-grid/helpers/grid-item-popover.d.ts +1 -21
  228. package/components/item-grid/helpers/grid-items.d.ts +1 -9
  229. package/components/item-grid/helpers/grid-keyboard-updates.d.ts +1 -18
  230. package/components/item-grid/helpers/grid-keydown-event.d.ts +1 -18
  231. package/components/item-grid/helpers/grid-popover-cleanup.d.ts +1 -4
  232. package/components/item-grid/helpers/grid-rendering.d.ts +0 -50
  233. package/components/item-grid/helpers/grid-stack-lifecycle.d.ts +1 -26
  234. package/components/item-grid/helpers/grid-theme.d.ts +2 -14
  235. package/components/item-grid/helpers/grid-update-cycle.d.ts +1 -22
  236. package/components/item-grid/index.cjs +1 -1
  237. package/components/item-grid/index.d.ts +3 -3
  238. package/components/item-grid/index.js +3 -9
  239. package/components/item-grid/item-grid.d.ts +12 -207
  240. package/components/item-grid/types.d.ts +1 -57
  241. package/components/item-grid-CbXKsQm4.js +245 -0
  242. package/components/item-grid-DTishUCb.cjs +41 -0
  243. package/components/item-grid-item-actions-menu/index.cjs +20 -0
  244. package/components/item-grid-item-actions-menu/index.d.ts +8 -0
  245. package/components/item-grid-item-actions-menu/index.js +21 -0
  246. package/components/item-grid-item-actions-menu/item-grid-item-actions-menu.d.ts +70 -0
  247. package/components/item-grid-item-actions-menu/types.d.ts +11 -0
  248. package/components/item-grid-item-actions-menu-B7ylgTwO.js +199 -0
  249. package/components/item-grid-item-actions-menu-C3BUxZJc.cjs +52 -0
  250. package/components/item-option/index.cjs +1 -1
  251. package/components/item-option/index.js +1 -8
  252. package/components/item-option-BTSV33ft.cjs +269 -0
  253. package/components/item-option-BUju6ZE1.js +953 -0
  254. package/components/item-option-action-button-group/index.cjs +1 -1
  255. package/components/item-option-action-button-group/index.js +1 -8
  256. package/components/item-option-action-button-group-CuDeyDRi.cjs +53 -0
  257. package/components/item-option-action-button-group-DnTBh3R4.js +117 -0
  258. package/components/item-option-base-BIDIiNfI.js +120 -0
  259. package/components/item-option-base-C6RQH9M8.cjs +56 -0
  260. package/components/item-option-color-palette-picker/index.cjs +1 -1
  261. package/components/item-option-color-palette-picker/index.js +1 -8
  262. package/components/item-option-color-palette-picker-DbsqP2zA.js +2040 -0
  263. package/components/item-option-color-palette-picker-DsG-wxGB.cjs +40 -0
  264. package/components/item-option-color-picker/index.cjs +1 -1
  265. package/components/item-option-color-picker/index.js +1 -8
  266. package/components/item-option-color-picker-BUN5YK-t.cjs +34 -0
  267. package/components/item-option-color-picker-CKGUj3cW.js +86 -0
  268. package/components/item-option-color-range/index.cjs +1 -1
  269. package/components/item-option-color-range/index.js +1 -8
  270. package/components/item-option-color-range-BN81ePAI.cjs +98 -0
  271. package/components/item-option-color-range-dMehrwqA.js +219 -0
  272. package/components/item-option-guidelines/index.cjs +1 -1
  273. package/components/item-option-guidelines/index.js +1 -8
  274. package/components/item-option-guidelines-Bn1HSCgL.js +420 -0
  275. package/components/item-option-guidelines-CmPaMdqb.cjs +135 -0
  276. package/components/item-option-multi-language-field/index.cjs +1 -1
  277. package/components/item-option-multi-language-field/index.js +1 -8
  278. package/components/item-option-multi-language-field-BFgbOzMM.js +81 -0
  279. package/components/item-option-multi-language-field-Du609wC_.cjs +33 -0
  280. package/components/item-option-number-field/index.cjs +1 -1
  281. package/components/item-option-number-field/index.js +1 -8
  282. package/components/item-option-number-field-CDcf6_4D.js +101 -0
  283. package/components/item-option-number-field-CVAtj0UX.cjs +38 -0
  284. package/components/item-option-panel/index.cjs +1 -1
  285. package/components/item-option-panel/index.js +1 -8
  286. package/components/item-option-panel-0iHLl9-q.cjs +67 -0
  287. package/components/item-option-panel-DUlIB6qj.js +181 -0
  288. package/components/item-option-picker/index.cjs +1 -1
  289. package/components/item-option-picker/index.js +1 -8
  290. package/components/item-option-picker-ClKAGpgs.js +76 -0
  291. package/components/item-option-picker-Dkc3nd3x.cjs +37 -0
  292. package/components/item-option-position-picker/index.cjs +1 -1
  293. package/components/item-option-position-picker/index.js +1 -8
  294. package/components/item-option-position-picker-O8PpyiRv.js +116 -0
  295. package/components/item-option-position-picker-qCKh0Mfs.cjs +32 -0
  296. package/components/item-option-positions-number-field/index.cjs +1 -1
  297. package/components/item-option-positions-number-field/index.js +1 -8
  298. package/components/item-option-positions-number-field-CBx4uQ39.js +165 -0
  299. package/components/item-option-positions-number-field-Dfe4ufnF.cjs +49 -0
  300. package/components/item-option-radio-button-group/index.cjs +1 -1
  301. package/components/item-option-radio-button-group/index.js +1 -8
  302. package/components/item-option-radio-button-group-B5OVbLRg.cjs +37 -0
  303. package/components/item-option-radio-button-group-J_ZusHOP.js +73 -0
  304. package/components/item-option-slider/index.cjs +1 -1
  305. package/components/item-option-slider/index.js +1 -8
  306. package/components/item-option-slider-BDAEs7Fk.cjs +33 -0
  307. package/components/item-option-slider-V9z4qqyE.js +97 -0
  308. package/components/item-option-switch/index.cjs +1 -1
  309. package/components/item-option-switch/index.js +1 -8
  310. package/components/item-option-switch-BA4ifIHK.js +68 -0
  311. package/components/item-option-switch-Bzy2VRLg.cjs +30 -0
  312. package/components/item-option-text-field/index.cjs +1 -1
  313. package/components/item-option-text-field/index.js +1 -8
  314. package/components/item-option-text-field-C-sTkUre.cjs +33 -0
  315. package/components/item-option-text-field-Cf0khC48.js +79 -0
  316. package/components/item-options-configs.cjs +1 -1
  317. package/components/item-options-configs.js +5 -5
  318. package/components/item-slot-drop/index.cjs +1 -1
  319. package/components/item-slot-drop/index.js +1 -8
  320. package/components/item-slot-drop-D2VDgqYS.js +329 -0
  321. package/components/item-slot-drop-DrJRtG7b.cjs +91 -0
  322. package/components/item-slot-drop-panel/index.cjs +1 -1
  323. package/components/item-slot-drop-panel/index.js +1 -8
  324. package/components/item-slot-drop-panel-CCCOwtYM.js +353 -0
  325. package/components/item-slot-drop-panel-CFerKcdH.cjs +57 -0
  326. package/components/item-slot-picker/index.cjs +1 -1
  327. package/components/item-slot-picker/index.js +1 -8
  328. package/components/item-slot-picker-BdfYcBKT.js +503 -0
  329. package/components/item-slot-picker-aqePvZ9B.cjs +174 -0
  330. package/components/item-slot-picker-panel/index.cjs +1 -1
  331. package/components/item-slot-picker-panel/index.js +1 -8
  332. package/components/item-slot-picker-panel-DC3i7XZP.js +446 -0
  333. package/components/item-slot-picker-panel-dU6NywBo.cjs +81 -0
  334. package/components/line-chart-positioning.config-BW19v66B.js +55 -0
  335. package/components/line-chart-positioning.config-DX5mLAP7.cjs +20 -0
  336. package/components/load-data-fields-for-datasets-C4h8NWIE.cjs +20 -0
  337. package/components/load-data-fields-for-datasets-CInmiDlZ.js +42 -0
  338. package/components/localized-mixin-Bt25Frg1.cjs +20 -0
  339. package/components/localized-mixin-CYMFnS-n.js +45 -0
  340. package/components/marker-map-positioning.config-BJGwlWKz.js +48 -0
  341. package/components/marker-map-positioning.config-C0V5LZG-.cjs +20 -0
  342. package/components/nl-BrjaaktE.cjs +20 -0
  343. package/components/nl-TUFktGm6.js +594 -0
  344. package/components/ohlc-chart-positioning.config-Bu1_IBVK.cjs +20 -0
  345. package/components/ohlc-chart-positioning.config-CFvbZzCR.js +78 -0
  346. package/components/parallel-coordinates-plot-positioning.config-Bc3qCyxq.js +48 -0
  347. package/components/parallel-coordinates-plot-positioning.config-EJz1XA1k.cjs +20 -0
  348. package/components/pivot-table-positioning.config-Bay8gxV-.js +55 -0
  349. package/components/pivot-table-positioning.config-CMzGb-BR.cjs +20 -0
  350. package/components/pyramid-chart-positioning.config-BUSeYxYH.js +55 -0
  351. package/components/pyramid-chart-positioning.config-CrU2vKM-.cjs +20 -0
  352. package/components/radar-chart-positioning.config-BEzqTXyr.cjs +20 -0
  353. package/components/radar-chart-positioning.config-DOLpdn-d.js +55 -0
  354. package/components/route-map-options.config-BnufVGcz.js +328 -0
  355. package/components/route-map-options.config-DA3k24sP.cjs +20 -0
  356. package/components/route-map-positioning.config-BgjizdWh.cjs +20 -0
  357. package/components/route-map-positioning.config-Brg6_eCi.js +66 -0
  358. package/components/sankey-diagram-positioning.config-DJlWiNYL.js +66 -0
  359. package/components/sankey-diagram-positioning.config-vccTz1pG.cjs +20 -0
  360. package/components/scatter-plot-positioning.config-BKqPHMrS.js +77 -0
  361. package/components/scatter-plot-positioning.config-D7uFFBVZ.cjs +20 -0
  362. package/components/set-locale-Bgz1WNGE.cjs +20 -0
  363. package/components/set-locale-s-1X7Jce.js +43 -0
  364. package/components/slicer-filter-positioning.config-D1kR4xly.cjs +20 -0
  365. package/components/slicer-filter-positioning.config-Gl9jhO_G.js +48 -0
  366. package/components/slot-menu/index.cjs +1 -1
  367. package/components/slot-menu/index.js +1 -8
  368. package/components/slot-menu/types.d.ts +1 -1
  369. package/components/slot-menu-CAhxaK5-.cjs +71 -0
  370. package/components/slot-menu-Dw53Y-iu.js +429 -0
  371. package/components/slot-menu-list/index.cjs +1 -1
  372. package/components/slot-menu-list/index.js +1 -8
  373. package/components/slot-menu-list-5NsRo9XD.js +348 -0
  374. package/components/slot-menu-list-CUsmYkiV.cjs +44 -0
  375. package/components/speedometer-chart-positioning.config-VBLrLNmO.js +48 -0
  376. package/components/speedometer-chart-positioning.config-fa90zZdb.cjs +20 -0
  377. package/components/spike-map-options.config-34Vf0UbN.cjs +20 -0
  378. package/components/spike-map-options.config-CBpHkAfo.js +415 -0
  379. package/components/spike-map-positioning.config-DrxdeFsj.cjs +20 -0
  380. package/components/spike-map-positioning.config-oYjk3n9a.js +55 -0
  381. package/components/strip-plot-positioning.config-Bx_fqmEj.cjs +20 -0
  382. package/components/strip-plot-positioning.config-lMn33cM4.js +48 -0
  383. package/components/sunburst-chart-positioning.config-C-We-zZF.js +48 -0
  384. package/components/sunburst-chart-positioning.config-D-GRWmyF.cjs +20 -0
  385. package/components/superPropGet-CBezYwzm.js +52 -0
  386. package/components/superPropGet-DmmlTXgo.cjs +20 -0
  387. package/components/symbol-map-positioning.config-B0sLlLzK.cjs +20 -0
  388. package/components/symbol-map-positioning.config-_TJSfpVj.js +55 -0
  389. package/components/tokens-BWMfo_w4.cjs +20 -0
  390. package/components/tokens-Ov1pCR4Y.js +29 -0
  391. package/components/treemap-chart-positioning.config-CO05Gv7X.cjs +20 -0
  392. package/components/treemap-chart-positioning.config-DAdvoS2I.js +55 -0
  393. package/components/utils/base.cjs +1 -1
  394. package/components/utils/base.js +2 -2
  395. package/components/utils/store.cjs +1 -1
  396. package/components/utils/store.js +1 -1
  397. package/components/utils-CGJh0jrq.cjs +20 -0
  398. package/components/utils-Dk4dM9xv.js +240 -0
  399. package/components/utils.cjs +1 -1
  400. package/components/utils.js +3 -3
  401. package/components/venn-diagram-positioning.config-DKXWVaUI.cjs +20 -0
  402. package/components/venn-diagram-positioning.config-DUwmPQ1A.js +55 -0
  403. package/components/wordcloud-chart-positioning.config-CgbB_SI0.cjs +20 -0
  404. package/components/wordcloud-chart-positioning.config-qK5_CF7v.js +55 -0
  405. package/custom-elements.json +7065 -5792
  406. package/deprecated-react/components/add-to-dashboard.component.cjs +1 -0
  407. package/deprecated-react/components/item-grid-item-actions-menu.component.cjs +1 -0
  408. package/grid-core/helpers/grid-events.d.ts +56 -0
  409. package/grid-core/helpers/grid-interactions.d.ts +88 -0
  410. package/grid-core/helpers/grid-item-management.d.ts +28 -0
  411. package/grid-core/helpers/grid-item-popover.d.ts +21 -0
  412. package/grid-core/helpers/grid-items.d.ts +9 -0
  413. package/grid-core/helpers/grid-keyboard-updates.d.ts +18 -0
  414. package/grid-core/helpers/grid-keydown-event.d.ts +18 -0
  415. package/grid-core/helpers/grid-popover-cleanup.d.ts +4 -0
  416. package/grid-core/helpers/grid-rendering.d.ts +41 -0
  417. package/grid-core/helpers/grid-stack-lifecycle.d.ts +26 -0
  418. package/grid-core/helpers/grid-theme.d.ts +15 -0
  419. package/grid-core/helpers/grid-update-cycle.d.ts +22 -0
  420. package/grid-core/index.d.ts +5 -0
  421. package/grid-core/item-grid-base.d.ts +223 -0
  422. package/grid-core/types.d.ts +57 -0
  423. package/index.d.ts +2 -1
  424. package/package.json +20 -9
  425. package/react/components/add-to-dashboard.component.ts +30 -0
  426. package/react/components/ai-chat.component.ts +1 -1
  427. package/react/components/interactive-viz-item.component.ts +11 -5
  428. package/react/components/item-grid-item-actions-menu.component.ts +30 -0
  429. package/react/components/item-grid.component.ts +4 -1
  430. package/react/esm/components/add-to-dashboard.component.d.ts +14 -0
  431. package/react/esm/components/add-to-dashboard.component.js +19 -0
  432. package/react/esm/components/ai-chat.component.d.ts +1 -1
  433. package/react/esm/components/ai-chat.component.js +1 -1
  434. package/react/esm/components/interactive-viz-item.component.d.ts +8 -4
  435. package/react/esm/components/interactive-viz-item.component.js +8 -4
  436. package/react/esm/components/item-grid-item-actions-menu.component.d.ts +14 -0
  437. package/react/esm/components/item-grid-item-actions-menu.component.js +19 -0
  438. package/react/esm/components/item-grid.component.d.ts +3 -1
  439. package/react/esm/components/item-grid.component.js +2 -0
  440. package/react/esm/index.d.ts +4 -3
  441. package/react/esm/index.js +10 -6
  442. package/react/index.ts +10 -6
  443. package/react/luzmo-stub.d.ts +15 -6
  444. package/react/package.json +2 -2
  445. package/standalone/chunks/add-to-dashboard-BrWieRxp.js +148 -0
  446. package/standalone/chunks/area-chart-options.config-CXWPLl-0.js +2 -0
  447. package/standalone/chunks/area-chart-options.de-Dr8RVJtb.js +2 -0
  448. package/standalone/chunks/area-chart-options.en-DV1AZ274.js +2 -0
  449. package/standalone/chunks/area-chart-options.es-Cg7uU7OK.js +2 -0
  450. package/standalone/chunks/area-chart-options.fr-CJjgrAt2.js +2 -0
  451. package/standalone/chunks/area-chart-options.nl-CTGxVXNo.js +2 -0
  452. package/standalone/chunks/area-chart-slots.config-Bxvau_Ii.js +2 -0
  453. package/standalone/chunks/axis-options.config-DP9f04t6.js +2 -0
  454. package/standalone/chunks/axis-options.i18n-BwkGC9PX.js +2 -0
  455. package/standalone/chunks/bar-chart-options.config-w4REKu0t.js +2 -0
  456. package/standalone/chunks/bar-chart-options.de-DCVBVtFi.js +2 -0
  457. package/standalone/chunks/bar-chart-options.en-B4xiZxTy.js +2 -0
  458. package/standalone/chunks/bar-chart-options.es-UqehXB9Z.js +2 -0
  459. package/standalone/chunks/bar-chart-options.fr-CaUBeZBK.js +2 -0
  460. package/standalone/chunks/bar-chart-options.nl-C2tFvUE8.js +2 -0
  461. package/standalone/chunks/bar-chart-slots.config-BWQoKCYJ.js +2 -0
  462. package/standalone/chunks/base-CLcNr-fQ.js +2 -0
  463. package/standalone/chunks/bliss-BS5cbLqS.js +2 -0
  464. package/standalone/chunks/box-plot-options.config-BlYMd4FN.js +2 -0
  465. package/standalone/chunks/box-plot-options.de-RDAv8kHb.js +2 -0
  466. package/standalone/chunks/box-plot-options.en-kGLfLsv3.js +2 -0
  467. package/standalone/chunks/box-plot-options.es-Dw3ivv22.js +2 -0
  468. package/standalone/chunks/box-plot-options.fr-De5nkQNr.js +2 -0
  469. package/standalone/chunks/box-plot-options.nl-DD1f-Nlt.js +2 -0
  470. package/standalone/chunks/box-plot-slots.config-4hmeA6nr.js +2 -0
  471. package/standalone/chunks/bubble-chart-options.config-BKPTymfC.js +2 -0
  472. package/standalone/chunks/bubble-chart-options.de-C4pA9ZdS.js +2 -0
  473. package/standalone/chunks/bubble-chart-options.en-DM-MH8pT.js +2 -0
  474. package/standalone/chunks/bubble-chart-options.es-C2VE7E7k.js +2 -0
  475. package/standalone/chunks/bubble-chart-options.fr-BugyvkW9.js +2 -0
  476. package/standalone/chunks/bubble-chart-options.nl-oDPNybDE.js +2 -0
  477. package/standalone/chunks/bubble-chart-slots.config-CqTUMwvW.js +2 -0
  478. package/standalone/chunks/bullet-chart-options.config-Cc5lKDjs.js +2 -0
  479. package/standalone/chunks/bullet-chart-options.de-Ci81seQn.js +2 -0
  480. package/standalone/chunks/bullet-chart-options.en-Dk95moRX.js +2 -0
  481. package/standalone/chunks/bullet-chart-options.es-eIqahAOr.js +2 -0
  482. package/standalone/chunks/bullet-chart-options.fr-CEABbpT0.js +2 -0
  483. package/standalone/chunks/bullet-chart-options.nl-B3gOPn5D.js +2 -0
  484. package/standalone/chunks/bullet-chart-slots.config-BiFMJsgN.js +2 -0
  485. package/standalone/chunks/calculate-data-field-icon-CrEVAfzJ.js +2 -0
  486. package/standalone/chunks/chart-helpers-BplLoVQz.js +2 -0
  487. package/standalone/chunks/choropleth-map-options.config-Ul1FSTwf.js +2 -0
  488. package/standalone/chunks/choropleth-map-options.de-eALhIYgW.js +2 -0
  489. package/standalone/chunks/choropleth-map-options.en-DNdPCTz7.js +2 -0
  490. package/standalone/chunks/choropleth-map-options.es-BoHXBNpE.js +2 -0
  491. package/standalone/chunks/choropleth-map-options.fr-Di8f-OWA.js +2 -0
  492. package/standalone/chunks/choropleth-map-options.nl-XKS-glHm.js +2 -0
  493. package/standalone/chunks/choropleth-map-slots.config-CRF7J3QP.js +2 -0
  494. package/standalone/chunks/circle-pack-chart-options.config-CjDkh4DG.js +2 -0
  495. package/standalone/chunks/circle-pack-chart-options.de-Dwf0pYf1.js +2 -0
  496. package/standalone/chunks/circle-pack-chart-options.en-DhCFF4vx.js +2 -0
  497. package/standalone/chunks/circle-pack-chart-options.es-DDKEbXse.js +2 -0
  498. package/standalone/chunks/circle-pack-chart-options.fr-Dezqd3QL.js +2 -0
  499. package/standalone/chunks/circle-pack-chart-options.nl-BNXyskRD.js +2 -0
  500. package/standalone/chunks/circle-pack-chart-slots.config-Deq7IUoK.js +2 -0
  501. package/standalone/chunks/circular-gauge-options.config-p2zb-ORR.js +2 -0
  502. package/standalone/chunks/circular-gauge-options.de-DXGoiD0i.js +2 -0
  503. package/standalone/chunks/circular-gauge-options.en-SHYrAgsX.js +2 -0
  504. package/standalone/chunks/circular-gauge-options.es-D4xJXTQ-.js +2 -0
  505. package/standalone/chunks/circular-gauge-options.fr-6vBd5iUe.js +2 -0
  506. package/standalone/chunks/circular-gauge-options.nl-CDoO99Is.js +2 -0
  507. package/standalone/chunks/circular-gauge-slots.config-C7yUFfFJ.js +2 -0
  508. package/standalone/chunks/classic-CHhNczKi.js +2 -0
  509. package/standalone/chunks/classic-dark-Cmrn7jod.js +2 -0
  510. package/standalone/chunks/color-DaeCRJ5Q.js +2 -0
  511. package/standalone/chunks/color-palettes-B41FvzWH.js +2 -0
  512. package/standalone/chunks/color-range-utils-CLqVCA5J.js +2 -0
  513. package/standalone/chunks/column-chart-options.config-v7fBgXRI.js +2 -0
  514. package/standalone/chunks/column-chart-options.de-OoMpZc7N.js +2 -0
  515. package/standalone/chunks/column-chart-options.en-B4xiZxTy.js +2 -0
  516. package/standalone/chunks/column-chart-options.es-BL-wKXpp.js +2 -0
  517. package/standalone/chunks/column-chart-options.fr-CaUBeZBK.js +2 -0
  518. package/standalone/chunks/column-chart-options.nl-C2tFvUE8.js +2 -0
  519. package/standalone/chunks/column-chart-slots.config-ZBLvqhEb.js +2 -0
  520. package/standalone/chunks/combination-chart-options.config-C9hmUPal.js +2 -0
  521. package/standalone/chunks/combination-chart-options.de-ChlEhT09.js +2 -0
  522. package/standalone/chunks/combination-chart-options.en-DhCXqnwj.js +2 -0
  523. package/standalone/chunks/combination-chart-options.es-DESqZp0U.js +2 -0
  524. package/standalone/chunks/combination-chart-options.fr-v6P2xQCi.js +2 -0
  525. package/standalone/chunks/combination-chart-options.nl-D8ato2ve.js +2 -0
  526. package/standalone/chunks/combination-chart-slots.config-BNVJfRB2.js +2 -0
  527. package/standalone/chunks/conditional-number-options.config-hdARPTD7.js +2 -0
  528. package/standalone/chunks/conditional-number-options.de-BNkYWqfn.js +2 -0
  529. package/standalone/chunks/conditional-number-options.en-J7yPXdbP.js +2 -0
  530. package/standalone/chunks/conditional-number-options.es-CKDTBiYp.js +2 -0
  531. package/standalone/chunks/conditional-number-options.fr-BX1cbt1S.js +2 -0
  532. package/standalone/chunks/conditional-number-options.nl-6IE86oA9.js +2 -0
  533. package/standalone/chunks/conditional-number-slots.config-B4kqODqw.js +2 -0
  534. package/standalone/chunks/create-lazy-loader-DC0rJePE.js +2 -0
  535. package/standalone/chunks/cs-DLnr3a23.js +2 -0
  536. package/standalone/chunks/da-BJgbo0uE.js +2 -0
  537. package/standalone/chunks/data-broker-Dgg5mQze.js +2 -0
  538. package/standalone/chunks/date-comparison-filter-options.config-a_qCDcWA.js +2 -0
  539. package/standalone/chunks/date-comparison-filter-options.de-WqpVCnC1.js +2 -0
  540. package/standalone/chunks/date-comparison-filter-options.en-Obm6KfbI.js +2 -0
  541. package/standalone/chunks/date-comparison-filter-options.es-CxYTNaTq.js +2 -0
  542. package/standalone/chunks/date-comparison-filter-options.fr-DhrKNPxX.js +2 -0
  543. package/standalone/chunks/date-comparison-filter-options.nl-D2RV7246.js +2 -0
  544. package/standalone/chunks/date-comparison-filter-slots.config-DfHq9lB8.js +2 -0
  545. package/standalone/chunks/date-filter-options.config-DHTbxiWn.js +2 -0
  546. package/standalone/chunks/date-filter-options.de-B83VkpDz.js +2 -0
  547. package/standalone/chunks/date-filter-options.en-DKQexBC1.js +2 -0
  548. package/standalone/chunks/date-filter-options.es-DfDqzkVB.js +2 -0
  549. package/standalone/chunks/date-filter-options.fr-DoZy8DU8.js +2 -0
  550. package/standalone/chunks/date-filter-options.nl-DKtF0sFB.js +2 -0
  551. package/standalone/chunks/date-filter-slots.config-DHaOkULx.js +2 -0
  552. package/standalone/chunks/de-BtQ1ecN1.js +2 -0
  553. package/standalone/chunks/de-DPgYMyja.js +2 -0
  554. package/standalone/chunks/decompose-numeric-format-BXLQ97e2.js +2 -0
  555. package/standalone/chunks/default-Bi3Z4SMm.js +2 -0
  556. package/standalone/chunks/default-dark-C2ykXPQt.js +2 -0
  557. package/standalone/chunks/default-local-formats-CES1ItiK.js +2 -0
  558. package/standalone/chunks/display-settings-binning-B_lKObyP.js +38 -0
  559. package/standalone/chunks/display-settings-datetime-CTmJyEOX.js +199 -0
  560. package/standalone/chunks/display-settings-grand-totals-IjcbBoyZ.js +26 -0
  561. package/standalone/chunks/display-settings-numeric-D9hvRtfN.js +172 -0
  562. package/standalone/chunks/display-settings-period-over-period-Dnstsyqe.js +209 -0
  563. package/standalone/chunks/donut-chart-options.config-BuZj-QX5.js +2 -0
  564. package/standalone/chunks/donut-chart-options.de-QusCBL9B.js +2 -0
  565. package/standalone/chunks/donut-chart-options.en-D0ligFH6.js +2 -0
  566. package/standalone/chunks/donut-chart-options.es-Bmn34sGt.js +2 -0
  567. package/standalone/chunks/donut-chart-options.fr-DGBawYKp.js +2 -0
  568. package/standalone/chunks/donut-chart-options.nl-DzNTu0v4.js +2 -0
  569. package/standalone/chunks/donut-chart-slots.config-7pDpzNBG.js +2 -0
  570. package/standalone/chunks/dropdown-filter-options.config-zwR7hmkX.js +2 -0
  571. package/standalone/chunks/dropdown-filter-options.de-dj6aTNQQ.js +2 -0
  572. package/standalone/chunks/dropdown-filter-options.en-DH7Jfk8Q.js +2 -0
  573. package/standalone/chunks/dropdown-filter-options.es-K2L8ln9j.js +2 -0
  574. package/standalone/chunks/dropdown-filter-options.fr-CMapzFiR.js +2 -0
  575. package/standalone/chunks/dropdown-filter-options.nl-BLAyit4D.js +2 -0
  576. package/standalone/chunks/dropdown-filter-slots.config-DkqLjilE.js +2 -0
  577. package/standalone/chunks/embed-Dymwil3u.js +228 -0
  578. package/standalone/chunks/en-BD2RCLuw.js +2 -0
  579. package/standalone/chunks/en-GB-DnwmFNwC.js +2 -0
  580. package/standalone/chunks/en-US-BD2RCLuw.js +2 -0
  581. package/standalone/chunks/es-CAWreooi.js +2 -0
  582. package/standalone/chunks/es-Dp1UuDDz.js +2 -0
  583. package/standalone/chunks/evolution-number-options.config-B5Cj0YAQ.js +2 -0
  584. package/standalone/chunks/evolution-number-options.de-Ch0LaHwI.js +2 -0
  585. package/standalone/chunks/evolution-number-options.en-riChGfa6.js +2 -0
  586. package/standalone/chunks/evolution-number-options.es-BdG3lvVQ.js +2 -0
  587. package/standalone/chunks/evolution-number-options.fr-_h0kLeRL.js +2 -0
  588. package/standalone/chunks/evolution-number-options.nl-CqycrLe1.js +2 -0
  589. package/standalone/chunks/evolution-number-slots.config-IqPfnCrw.js +2 -0
  590. package/standalone/chunks/fi-CLQ6vC7V.js +2 -0
  591. package/standalone/chunks/filters-CBmZhipt.js +544 -0
  592. package/standalone/chunks/formatter-B7zz6UOp.js +2 -0
  593. package/standalone/chunks/formula-codemirror-D2F6Aj2h.js +197 -0
  594. package/standalone/chunks/fr-BG0nQk8g.js +2 -0
  595. package/standalone/chunks/fr-D8xrUEX4.js +2 -0
  596. package/standalone/chunks/funnel-chart-options.config-1SyJ_qYd.js +2 -0
  597. package/standalone/chunks/funnel-chart-options.de-BTxwd7Pe.js +2 -0
  598. package/standalone/chunks/funnel-chart-options.en-CmY-uO1P.js +2 -0
  599. package/standalone/chunks/funnel-chart-options.es-DLqBydsE.js +2 -0
  600. package/standalone/chunks/funnel-chart-options.fr-ztQ5OMZi.js +2 -0
  601. package/standalone/chunks/funnel-chart-options.nl-DVysx7tP.js +2 -0
  602. package/standalone/chunks/funnel-chart-slots.config-DfeuNGEL.js +2 -0
  603. package/standalone/chunks/guidelines-options.config-CS29_J9M.js +2 -0
  604. package/standalone/chunks/he-DHPb0VBo.js +2 -0
  605. package/standalone/chunks/heat-map-options.config-DYIrP8cV.js +2 -0
  606. package/standalone/chunks/heat-map-options.de-BfJMMX2Q.js +2 -0
  607. package/standalone/chunks/heat-map-options.en-Dr653pN6.js +2 -0
  608. package/standalone/chunks/heat-map-options.es-CklrBP1w.js +2 -0
  609. package/standalone/chunks/heat-map-options.fr-DwtCOHrA.js +2 -0
  610. package/standalone/chunks/heat-map-options.nl-DQBLussF.js +2 -0
  611. package/standalone/chunks/heat-map-slots.config-BVBzVjJJ.js +2 -0
  612. package/standalone/chunks/heat-table-options.config-ByHwT44G.js +2 -0
  613. package/standalone/chunks/heat-table-options.de-BMx67hXo.js +2 -0
  614. package/standalone/chunks/heat-table-options.en-BbobGoXs.js +2 -0
  615. package/standalone/chunks/heat-table-options.es-zKo-QMBY.js +2 -0
  616. package/standalone/chunks/heat-table-options.fr-XSTL1CSb.js +2 -0
  617. package/standalone/chunks/heat-table-options.nl-Cgcccsee.js +2 -0
  618. package/standalone/chunks/heat-table-slots.config-CcOl-PCp.js +2 -0
  619. package/standalone/chunks/helpers-DalWg6k7.js +2 -0
  620. package/standalone/chunks/hexbin-map-options.config-Elr44Jin.js +2 -0
  621. package/standalone/chunks/hexbin-map-options.de-C45yz1mZ.js +2 -0
  622. package/standalone/chunks/hexbin-map-options.en-CIrLRJJ1.js +2 -0
  623. package/standalone/chunks/hexbin-map-options.es-wf4yF2eW.js +2 -0
  624. package/standalone/chunks/hexbin-map-options.fr-C0SN47Nq.js +2 -0
  625. package/standalone/chunks/hexbin-map-options.nl-CweMyvfk.js +2 -0
  626. package/standalone/chunks/hexbin-map-slots.config-D6qVm4nj.js +2 -0
  627. package/standalone/chunks/hu-BpaYooip.js +2 -0
  628. package/standalone/chunks/image-options.config-Cj4r1ypi.js +2 -0
  629. package/standalone/chunks/image-options.de-CFUHfYzb.js +2 -0
  630. package/standalone/chunks/image-options.en-BIyq9f_H.js +2 -0
  631. package/standalone/chunks/image-options.es-BD---IOk.js +2 -0
  632. package/standalone/chunks/image-options.fr-BGFgsNTs.js +2 -0
  633. package/standalone/chunks/image-options.nl-DD1JEJSa.js +2 -0
  634. package/standalone/chunks/image-slots.config-CdWEUY0l.js +2 -0
  635. package/standalone/chunks/info-tooltip-options.config-DtfU5ZO8.js +2 -0
  636. package/standalone/chunks/info-tooltip-options.i18n-B_gjTq0R.js +2 -0
  637. package/standalone/chunks/interactivity-options.config-09eXx6k6.js +2 -0
  638. package/standalone/chunks/interactivity-options.i18n-BLDCmZkC.js +2 -0
  639. package/standalone/chunks/it-DWTvD2Xn.js +2 -0
  640. package/standalone/chunks/item-option-action-button-group-BZyiRTfe.js +35 -0
  641. package/standalone/chunks/item-option-base-Bk5qxdcQ.js +38 -0
  642. package/standalone/chunks/item-option-color-palette-picker-O8kT0i8p.js +22 -0
  643. package/standalone/chunks/item-option-color-picker-CUTCc_yN.js +16 -0
  644. package/standalone/chunks/item-option-color-range-DsKPvjLj.js +80 -0
  645. package/standalone/chunks/item-option-guidelines-CZyvhgtN.js +117 -0
  646. package/standalone/chunks/item-option-multi-language-field-DlC-cCD7.js +15 -0
  647. package/standalone/chunks/item-option-number-field-BW9VpN9_.js +20 -0
  648. package/standalone/chunks/item-option-panel-BXA3sIYG.js +298 -0
  649. package/standalone/chunks/item-option-picker-B2KmO7a6.js +19 -0
  650. package/standalone/chunks/item-option-position-picker-C9C9SKDD.js +14 -0
  651. package/standalone/chunks/item-option-positions-number-field-C2ahVlxe.js +31 -0
  652. package/standalone/chunks/item-option-radio-button-group-2q3doUXH.js +19 -0
  653. package/standalone/chunks/item-option-slider-C7TT3CqL.js +15 -0
  654. package/standalone/chunks/item-option-switch-CZR2_Bs9.js +12 -0
  655. package/standalone/chunks/item-option-text-field-DBUOD_fv.js +15 -0
  656. package/standalone/chunks/item-slot-picker-panel-CTePASjI.js +439 -0
  657. package/standalone/chunks/ja-CtDlXHD1.js +2 -0
  658. package/standalone/chunks/ko-CekuHU50.js +2 -0
  659. package/standalone/chunks/line-chart-options.config-DyqQLGw8.js +2 -0
  660. package/standalone/chunks/line-chart-options.de-BScjvJsI.js +2 -0
  661. package/standalone/chunks/line-chart-options.en-BVWFsre-.js +2 -0
  662. package/standalone/chunks/line-chart-options.es-CxNJevNs.js +2 -0
  663. package/standalone/chunks/line-chart-options.fr-LCsLx0Uh.js +2 -0
  664. package/standalone/chunks/line-chart-options.nl-BOgcjx48.js +2 -0
  665. package/standalone/chunks/line-chart-slots.config-CavGuJXK.js +2 -0
  666. package/standalone/chunks/lit-localize-CIGP-NUw.js +2 -0
  667. package/standalone/chunks/load-data-fields-for-datasets-CPf_Q7p4.js +25 -0
  668. package/standalone/chunks/load-formula-codemirror-CA7NW4Zq.js +6 -0
  669. package/standalone/chunks/localize-BXHWaHdZ.js +2 -0
  670. package/standalone/chunks/localized-decorator-Buib6Rq1.js +2 -0
  671. package/standalone/chunks/localized-mixin-DN2aV3CC.js +2 -0
  672. package/standalone/chunks/luzmo-icon-markup-27PRW8QM.js +13 -0
  673. package/standalone/chunks/luzmoAlignLeft-HA-XKPHy.js +2 -0
  674. package/standalone/chunks/luzmoAngleDown-PNrItYzK.js +2 -0
  675. package/standalone/chunks/luzmoAngleLeft-ebJO7ROy.js +2 -0
  676. package/standalone/chunks/luzmoArrowsHorizontal-TohKbcQD.js +2 -0
  677. package/standalone/chunks/luzmoBorderDotted-CWXwQ_Hm.js +2 -0
  678. package/standalone/chunks/luzmoCheckbox-BksyONqE.js +2 -0
  679. package/standalone/chunks/luzmoCog-C4v4vc5N.js +2 -0
  680. package/standalone/chunks/luzmoLockOutline-Dctb86HR.js +2 -0
  681. package/standalone/chunks/luzmoPlus-Dyrrz0v8.js +2 -0
  682. package/standalone/chunks/luzmoTable-BYeZ8pW6.js +2 -0
  683. package/standalone/chunks/luzmoTrashOutline-DXZpJx7f.js +2 -0
  684. package/standalone/chunks/map-tile-providers-DZT1QZX_.js +2 -0
  685. package/standalone/chunks/marker-map-options.config-D_OTOZRe.js +2 -0
  686. package/standalone/chunks/marker-map-options.de-SuCAxwxR.js +2 -0
  687. package/standalone/chunks/marker-map-options.en-B-gl_14v.js +2 -0
  688. package/standalone/chunks/marker-map-options.es-CSJGCzjk.js +2 -0
  689. package/standalone/chunks/marker-map-options.fr-D5P_HjSn.js +2 -0
  690. package/standalone/chunks/marker-map-options.nl-DdeyYFJQ.js +2 -0
  691. package/standalone/chunks/marker-map-slots.config-CtzpU-rK.js +2 -0
  692. package/standalone/chunks/mk-Dq3YK4jD.js +2 -0
  693. package/standalone/chunks/nl-7csxtU-I.js +2 -0
  694. package/standalone/chunks/nl-BXPduS2Q.js +2 -0
  695. package/standalone/chunks/no-DJNRx8au.js +2 -0
  696. package/standalone/chunks/ohlc-chart-options.config-Bu2GKlAH.js +2 -0
  697. package/standalone/chunks/ohlc-chart-options.de-DeQ8wdeE.js +2 -0
  698. package/standalone/chunks/ohlc-chart-options.en-DopM1kPj.js +2 -0
  699. package/standalone/chunks/ohlc-chart-options.es-BKjQWwH0.js +2 -0
  700. package/standalone/chunks/ohlc-chart-options.fr-DWhV_lXz.js +2 -0
  701. package/standalone/chunks/ohlc-chart-options.nl-D8lhNKIv.js +2 -0
  702. package/standalone/chunks/ohlc-chart-slots.config-xYpPbmg2.js +2 -0
  703. package/standalone/chunks/orion-BHOu-xse.js +2 -0
  704. package/standalone/chunks/parallel-coordinates-plot-options.config-BcIYCRdF.js +2 -0
  705. package/standalone/chunks/parallel-coordinates-plot-options.de-Dvi0gBbB.js +2 -0
  706. package/standalone/chunks/parallel-coordinates-plot-options.en-LdifcLcc.js +2 -0
  707. package/standalone/chunks/parallel-coordinates-plot-options.es-DNisZWdC.js +2 -0
  708. package/standalone/chunks/parallel-coordinates-plot-options.fr-DwOBR0cp.js +2 -0
  709. package/standalone/chunks/parallel-coordinates-plot-options.nl-DCXeTldD.js +2 -0
  710. package/standalone/chunks/parallel-coordinates-plot-slots.config-DvJljfr8.js +2 -0
  711. package/standalone/chunks/period-over-period-condition.const-AC_onvUf.js +2 -0
  712. package/standalone/chunks/periods.const-Cie50jR4.js +2 -0
  713. package/standalone/chunks/pinky-CkEB6Fvc.js +2 -0
  714. package/standalone/chunks/pivot-table-options.config-BZpId1ju.js +2 -0
  715. package/standalone/chunks/pivot-table-options.de-B0l711Q7.js +2 -0
  716. package/standalone/chunks/pivot-table-options.en-D3MYHTWH.js +2 -0
  717. package/standalone/chunks/pivot-table-options.es-CDACogGQ.js +2 -0
  718. package/standalone/chunks/pivot-table-options.fr-C-w1sys8.js +2 -0
  719. package/standalone/chunks/pivot-table-options.nl-Dy9VJ1bm.js +2 -0
  720. package/standalone/chunks/pivot-table-slots.config-DZOE04Ea.js +2 -0
  721. package/standalone/chunks/pl-zDnuk9Gd.js +2 -0
  722. package/standalone/chunks/pt-BEVAH5AJ.js +2 -0
  723. package/standalone/chunks/pyramid-chart-options.config-CBd-pgn_.js +2 -0
  724. package/standalone/chunks/pyramid-chart-options.de-CBL_8UjH.js +2 -0
  725. package/standalone/chunks/pyramid-chart-options.en-CTozc1Uh.js +2 -0
  726. package/standalone/chunks/pyramid-chart-options.es-BKciL-nO.js +2 -0
  727. package/standalone/chunks/pyramid-chart-options.fr-B04m8B_b.js +2 -0
  728. package/standalone/chunks/pyramid-chart-options.nl-DIhj1NYF.js +2 -0
  729. package/standalone/chunks/pyramid-chart-slots.config-DKBFy-TL.js +2 -0
  730. package/standalone/chunks/radar-chart-options.config-CnQ8mbs9.js +2 -0
  731. package/standalone/chunks/radar-chart-options.de-_LSueG69.js +2 -0
  732. package/standalone/chunks/radar-chart-options.en-DBA8TpKJ.js +2 -0
  733. package/standalone/chunks/radar-chart-options.es-DjSsFQkP.js +2 -0
  734. package/standalone/chunks/radar-chart-options.fr-CCh2jYPS.js +2 -0
  735. package/standalone/chunks/radar-chart-options.nl-tZ0JRjXD.js +2 -0
  736. package/standalone/chunks/radar-chart-slots.config-CHauNDhi.js +2 -0
  737. package/standalone/chunks/radiant-BfVbXYeP.js +2 -0
  738. package/standalone/chunks/regular-table-options.config-BnhDzc-m.js +2 -0
  739. package/standalone/chunks/regular-table-options.de-DPmii-jp.js +2 -0
  740. package/standalone/chunks/regular-table-options.en-DQugncwx.js +2 -0
  741. package/standalone/chunks/regular-table-options.es-DzbTEFoh.js +2 -0
  742. package/standalone/chunks/regular-table-options.fr-roRCzuK8.js +2 -0
  743. package/standalone/chunks/regular-table-options.nl-DxYUm_Rz.js +2 -0
  744. package/standalone/chunks/regular-table-slots.config-BqEJgzhG.js +2 -0
  745. package/standalone/chunks/route-map-options.config-CWyA9_SB.js +2 -0
  746. package/standalone/chunks/route-map-options.de-Ke-Bybpi.js +2 -0
  747. package/standalone/chunks/route-map-options.en-CDXIcBc0.js +2 -0
  748. package/standalone/chunks/route-map-options.es-CCEXcHLb.js +2 -0
  749. package/standalone/chunks/route-map-options.fr-BXoMKK54.js +2 -0
  750. package/standalone/chunks/route-map-options.nl-U52AE8MW.js +2 -0
  751. package/standalone/chunks/route-map-slots.config-B5G4JVnI.js +2 -0
  752. package/standalone/chunks/royale-Bcd5VvC5.js +2 -0
  753. package/standalone/chunks/ru-Ceji1Fqk.js +2 -0
  754. package/standalone/chunks/sankey-diagram-options.config-Curc2-If.js +2 -0
  755. package/standalone/chunks/sankey-diagram-options.de-Bisx6mpj.js +2 -0
  756. package/standalone/chunks/sankey-diagram-options.en-DonChVRz.js +2 -0
  757. package/standalone/chunks/sankey-diagram-options.es-TCXmlth5.js +2 -0
  758. package/standalone/chunks/sankey-diagram-options.fr-B3iAnJNW.js +2 -0
  759. package/standalone/chunks/sankey-diagram-options.nl-BnXZQEKn.js +2 -0
  760. package/standalone/chunks/sankey-diagram-slots.config-jyKqjUsV.js +2 -0
  761. package/standalone/chunks/scatter-plot-options.config-BV9Lb6-v.js +2 -0
  762. package/standalone/chunks/scatter-plot-options.de-Dg3O1b2R.js +2 -0
  763. package/standalone/chunks/scatter-plot-options.en-CJH2ZlFW.js +2 -0
  764. package/standalone/chunks/scatter-plot-options.es-7kExRi4J.js +2 -0
  765. package/standalone/chunks/scatter-plot-options.fr-Bbkf8efT.js +2 -0
  766. package/standalone/chunks/scatter-plot-options.nl-zrEXoM-k.js +2 -0
  767. package/standalone/chunks/scatter-plot-slots.config-CF2Ii2Ez.js +2 -0
  768. package/standalone/chunks/search-filter-options.config-DPhYMtlJ.js +2 -0
  769. package/standalone/chunks/search-filter-options.de-DewLFwK0.js +2 -0
  770. package/standalone/chunks/search-filter-options.en-DyIupnO9.js +2 -0
  771. package/standalone/chunks/search-filter-options.es-Dx1WGz-q.js +2 -0
  772. package/standalone/chunks/search-filter-options.fr-BdnlKNNx.js +2 -0
  773. package/standalone/chunks/search-filter-options.nl-DsKcc6ke.js +2 -0
  774. package/standalone/chunks/search-filter-slots.config-BcTF-DAh.js +2 -0
  775. package/standalone/chunks/seasonal-f6I--CYV.js +2 -0
  776. package/standalone/chunks/slicer-filter-options.config-BQ1vpcTb.js +2 -0
  777. package/standalone/chunks/slicer-filter-options.de-v0So4hDH.js +2 -0
  778. package/standalone/chunks/slicer-filter-options.en-BkVZDku6.js +2 -0
  779. package/standalone/chunks/slicer-filter-options.es-BATOs827.js +2 -0
  780. package/standalone/chunks/slicer-filter-options.fr-DROih5R8.js +2 -0
  781. package/standalone/chunks/slicer-filter-options.nl-CT4HfMiT.js +2 -0
  782. package/standalone/chunks/slicer-filter-slots.config-DL3Q0Zbm.js +2 -0
  783. package/standalone/chunks/slider-filter-options.config-ZCkBkeXQ.js +2 -0
  784. package/standalone/chunks/slider-filter-options.de-BToTmIkJ.js +2 -0
  785. package/standalone/chunks/slider-filter-options.en-Du0cf6NC.js +2 -0
  786. package/standalone/chunks/slider-filter-options.es-6yGUkJ9r.js +2 -0
  787. package/standalone/chunks/slider-filter-options.fr-DeupuOm1.js +2 -0
  788. package/standalone/chunks/slider-filter-options.nl-K6BEul4-.js +2 -0
  789. package/standalone/chunks/slider-filter-slots.config-52Bs7zu3.js +2 -0
  790. package/standalone/chunks/spacer-options.config-DmYOnwBz.js +2 -0
  791. package/standalone/chunks/speedometer-chart-options.config-YmUv49lQ.js +2 -0
  792. package/standalone/chunks/speedometer-chart-options.de-CWVMBrx9.js +2 -0
  793. package/standalone/chunks/speedometer-chart-options.en-DtCdA113.js +2 -0
  794. package/standalone/chunks/speedometer-chart-options.es-BC1Y-Hje.js +2 -0
  795. package/standalone/chunks/speedometer-chart-options.fr-BqnVNM9x.js +2 -0
  796. package/standalone/chunks/speedometer-chart-options.nl-D2dmDbhJ.js +2 -0
  797. package/standalone/chunks/speedometer-chart-slots.config-Cfsna_2O.js +2 -0
  798. package/standalone/chunks/spike-map-options.config-YOYHTzZs.js +2 -0
  799. package/standalone/chunks/spike-map-options.de-cIVh4l8Z.js +2 -0
  800. package/standalone/chunks/spike-map-options.en-CKjynYQl.js +2 -0
  801. package/standalone/chunks/spike-map-options.es-_GxcrK73.js +2 -0
  802. package/standalone/chunks/spike-map-options.fr-DHi_gHN6.js +2 -0
  803. package/standalone/chunks/spike-map-options.nl-Bicq35x0.js +2 -0
  804. package/standalone/chunks/spike-map-slots.config-FfXNX2O3.js +2 -0
  805. package/standalone/chunks/strip-plot-options.config-D84diNaB.js +2 -0
  806. package/standalone/chunks/strip-plot-options.de-DjNnWJl2.js +2 -0
  807. package/standalone/chunks/strip-plot-options.en-Of1sTT_A.js +2 -0
  808. package/standalone/chunks/strip-plot-options.es-BEHY8I7g.js +2 -0
  809. package/standalone/chunks/strip-plot-options.fr-DLfEoXBO.js +2 -0
  810. package/standalone/chunks/strip-plot-options.nl-CA3oh18P.js +2 -0
  811. package/standalone/chunks/strip-plot-slots.config-DQrrby2Y.js +2 -0
  812. package/standalone/chunks/sunburst-chart-options.config-DRjBFJV0.js +2 -0
  813. package/standalone/chunks/sunburst-chart-options.de-D6enQCjV.js +2 -0
  814. package/standalone/chunks/sunburst-chart-options.en-D9DSivE2.js +2 -0
  815. package/standalone/chunks/sunburst-chart-options.es-Bb7iCI1h.js +2 -0
  816. package/standalone/chunks/sunburst-chart-options.fr-CCzUgv7r.js +2 -0
  817. package/standalone/chunks/sunburst-chart-options.nl-bGOCvc4m.js +2 -0
  818. package/standalone/chunks/sunburst-chart-slots.config-DqW1e0nf.js +2 -0
  819. package/standalone/chunks/sv-CgssnOqA.js +2 -0
  820. package/standalone/chunks/symbol-map-options.config-Bbb3xIKg.js +2 -0
  821. package/standalone/chunks/symbol-map-options.de-CqxosoVr.js +2 -0
  822. package/standalone/chunks/symbol-map-options.en-DT7vsjRh.js +2 -0
  823. package/standalone/chunks/symbol-map-options.es-PGR-C-uM.js +2 -0
  824. package/standalone/chunks/symbol-map-options.fr-CPNydqFW.js +2 -0
  825. package/standalone/chunks/symbol-map-options.nl-BBHmJwLF.js +2 -0
  826. package/standalone/chunks/symbol-map-slots.config-B_UtYexb.js +2 -0
  827. package/standalone/chunks/task-CNp3cEJA.js +2 -0
  828. package/standalone/chunks/text-options.config-Chv14kyQ.js +2 -0
  829. package/standalone/chunks/text-options.de-CRVu5VAm.js +2 -0
  830. package/standalone/chunks/text-options.en-CupCY5Us.js +2 -0
  831. package/standalone/chunks/text-options.es-uKgRI4LZ.js +2 -0
  832. package/standalone/chunks/text-options.fr-C256Njqd.js +2 -0
  833. package/standalone/chunks/text-options.nl-CpMqMCOZ.js +2 -0
  834. package/standalone/chunks/text-slots.config-D33nu0FP.js +2 -0
  835. package/standalone/chunks/themes-BD5sKr3j.js +2 -0
  836. package/standalone/chunks/tr-i3G2sFi4.js +2 -0
  837. package/standalone/chunks/treemap-chart-options.config-DxkumoYq.js +2 -0
  838. package/standalone/chunks/treemap-chart-options.de-DdhcpjTu.js +2 -0
  839. package/standalone/chunks/treemap-chart-options.en-DB87QjbN.js +2 -0
  840. package/standalone/chunks/treemap-chart-options.es-DEImFeIB.js +2 -0
  841. package/standalone/chunks/treemap-chart-options.fr-BzM5c_vV.js +2 -0
  842. package/standalone/chunks/treemap-chart-options.nl-CFJgBJi2.js +2 -0
  843. package/standalone/chunks/treemap-chart-slots.config-CaearczZ.js +2 -0
  844. package/standalone/chunks/type-check-CC6bgirK.js +2 -0
  845. package/standalone/chunks/types-BS6dxSMT.js +2 -0
  846. package/standalone/chunks/urban-BEeGnayr.js +2 -0
  847. package/standalone/chunks/v4-CI0qP0ur.js +2 -0
  848. package/standalone/chunks/venn-diagram-options.config-DmYOnwBz.js +2 -0
  849. package/standalone/chunks/venn-diagram-slots.config-GnP5AAAL.js +2 -0
  850. package/standalone/chunks/version-DJES6maY.js +2 -0
  851. package/standalone/chunks/video-options.config-CfgT_MAw.js +2 -0
  852. package/standalone/chunks/video-options.de-Cxs3-JN3.js +2 -0
  853. package/standalone/chunks/video-options.en-ck74JByC.js +2 -0
  854. package/standalone/chunks/video-options.es-UdEH3Rzk.js +2 -0
  855. package/standalone/chunks/video-options.fr-p5bOI-bw.js +2 -0
  856. package/standalone/chunks/video-options.nl-CBYWp-Df.js +2 -0
  857. package/standalone/chunks/video-slots.config-ufoVcXKL.js +2 -0
  858. package/standalone/chunks/vivid-BC9AYKyD.js +2 -0
  859. package/standalone/chunks/wordcloud-chart-options.config-b-ibtRWp.js +2 -0
  860. package/standalone/chunks/wordcloud-chart-options.de-B0CeI2KB.js +2 -0
  861. package/standalone/chunks/wordcloud-chart-options.en-BQ-8ciOw.js +2 -0
  862. package/standalone/chunks/wordcloud-chart-options.es-DyMrHpJL.js +2 -0
  863. package/standalone/chunks/wordcloud-chart-options.fr-V1k_70yq.js +2 -0
  864. package/standalone/chunks/wordcloud-chart-options.nl-CrfYuaYy.js +2 -0
  865. package/standalone/chunks/wordcloud-chart-slots.config-g7QwS2dG.js +2 -0
  866. package/standalone/chunks/zh-CN-NVnv57dz.js +2 -0
  867. package/standalone/chunks/zh-TW-NVnv57dz.js +2 -0
  868. package/standalone/interactive-viz-item.js +263 -0
  869. package/standalone/item-grid.js +123 -0
  870. package/standalone/manifest.json +436 -0
  871. package/storybook/register-components.d.ts +2 -1
  872. package/styles/tokens.d.ts +1 -0
  873. package/types/add-to-dashboard.types.d.ts +51 -0
  874. package/types.d.ts +3 -1
  875. package/utils/data-broker/index.d.ts +19 -1
  876. package/utils/filters/filter-text.d.ts +1 -1
  877. package/utils/formula/base/formula-base.d.ts +2 -2
  878. package/utils/formula/config/build-datasets.d.ts +2 -2
  879. package/utils/formula/store/formula-display-store.d.ts +1 -1
  880. package/components/ai-chat-1OlRpimu.cjs +0 -337
  881. package/components/ai-chat-PesGGOLP.js +0 -4350
  882. package/components/ai-interaction-textarea-BXKG2elT.js +0 -820
  883. package/components/ai-interaction-textarea-CmFGJzbb.cjs +0 -99
  884. package/components/area-chart-positioning.config-C37nmNfP.cjs +0 -20
  885. package/components/area-chart-positioning.config-CF8Z7PuX.js +0 -55
  886. package/components/bar-chart-positioning.config-C4ii41mE.cjs +0 -20
  887. package/components/bar-chart-positioning.config-vuRQZsYr.js +0 -59
  888. package/components/base-8L8Jt2vi.js +0 -249
  889. package/components/base-K-bf6_7X.cjs +0 -20
  890. package/components/base-store-BhGpnbqi.js +0 -152
  891. package/components/base-store-D5cDq6d4.cjs +0 -20
  892. package/components/box-plot-positioning.config-D2LpbgQ_.cjs +0 -20
  893. package/components/box-plot-positioning.config-DMIsI9yU.js +0 -48
  894. package/components/bubble-chart-positioning.config-Btak-zwN.cjs +0 -20
  895. package/components/bubble-chart-positioning.config-jYu0Q0Mc.js +0 -55
  896. package/components/bullet-chart-positioning.config-BWHfPPyA.js +0 -56
  897. package/components/bullet-chart-positioning.config-CwoRVgNS.cjs +0 -20
  898. package/components/choropleth-map-options.config-DWWydGJ3.js +0 -352
  899. package/components/choropleth-map-options.config-VG10yjwC.cjs +0 -20
  900. package/components/choropleth-map-positioning.config-DttV0Dk_.cjs +0 -20
  901. package/components/choropleth-map-positioning.config-KtxcLW7E.js +0 -55
  902. package/components/circle-pack-chart-positioning.config-N-rZvQjR.cjs +0 -20
  903. package/components/circle-pack-chart-positioning.config-QBO-pwDr.js +0 -48
  904. package/components/circular-gauge-positioning.config-Cf1zuLXa.cjs +0 -20
  905. package/components/circular-gauge-positioning.config-DKGmEpFj.js +0 -48
  906. package/components/color-BWnYpOu7.js +0 -3812
  907. package/components/color-Bl8h58rV.cjs +0 -20
  908. package/components/color-range-utils-C3HJJUS1.cjs +0 -20
  909. package/components/color-range-utils-CiqduHJS.js +0 -63
  910. package/components/column-chart-positioning.config-DcErS56C.cjs +0 -20
  911. package/components/column-chart-positioning.config-LkQSNtSH.js +0 -55
  912. package/components/combination-chart-positioning.config-7iAEpO7h.js +0 -48
  913. package/components/combination-chart-positioning.config-Dzi93oAp.cjs +0 -20
  914. package/components/conditional-number-positioning.config-Bse6AKPP.js +0 -48
  915. package/components/conditional-number-positioning.config-CTy0zLXu.cjs +0 -20
  916. package/components/data-broker-B0uUO5er.js +0 -1684
  917. package/components/data-broker-CyMYR6w1.cjs +0 -20
  918. package/components/data-field-CSm9APdz.js +0 -121
  919. package/components/data-field-D2y4cv9j.cjs +0 -54
  920. package/components/data-field-level-B0aj8c5M.js +0 -247
  921. package/components/data-field-level-Llx0Y9m-.cjs +0 -55
  922. package/components/data-field-panel-DpBWJnes.js +0 -385
  923. package/components/data-field-panel-Dv60lRUC.cjs +0 -87
  924. package/components/data-fields-select-69TDpIG_.js +0 -289
  925. package/components/data-fields-select-BHa8THub.cjs +0 -43
  926. package/components/dataset-icon-BAV0S4sZ.cjs +0 -64
  927. package/components/dataset-icon-CWT5Ju8w.js +0 -125
  928. package/components/dataset-selector-list-D5lBv2sD.cjs +0 -75
  929. package/components/dataset-selector-list-DTMXvqfO.js +0 -323
  930. package/components/dataset-selector-row-gHWsZlrC.cjs +0 -102
  931. package/components/dataset-selector-row-kiHtzZcP.js +0 -427
  932. package/components/de-BhKtDR6p.js +0 -565
  933. package/components/de-DXFLsh4N.cjs +0 -20
  934. package/components/display-settings-DKuvd62j.js +0 -315
  935. package/components/display-settings-DPqTRJ7E.cjs +0 -142
  936. package/components/display-settings-binning-BkCNSkgf.js +0 -110
  937. package/components/display-settings-binning-DZKo_tBm.cjs +0 -56
  938. package/components/display-settings-datetime-BTgriFcv.js +0 -413
  939. package/components/display-settings-datetime-DD7Oh-2T.cjs +0 -217
  940. package/components/display-settings-grand-totals-BsIZg67h.cjs +0 -44
  941. package/components/display-settings-grand-totals-DH7AoyQY.js +0 -89
  942. package/components/display-settings-numeric-CkFpOoWU.js +0 -479
  943. package/components/display-settings-numeric-CsmrnEp2.cjs +0 -190
  944. package/components/display-settings-period-over-period-CdI5wuL_.js +0 -442
  945. package/components/display-settings-period-over-period-Co37HcSm.cjs +0 -227
  946. package/components/donut-chart-positioning.config-BThtaJEt.cjs +0 -20
  947. package/components/donut-chart-positioning.config-D2uG_Irk.js +0 -48
  948. package/components/es-DK-49nGv.cjs +0 -20
  949. package/components/es-DUENN-m1.js +0 -565
  950. package/components/evolution-number-positioning.config-BtjobZqK.js +0 -48
  951. package/components/evolution-number-positioning.config-DtYiv9oB.cjs +0 -20
  952. package/components/filter-expression-picker-C4kE_Thd.js +0 -433
  953. package/components/filter-expression-picker-CU-OfSmI.cjs +0 -40
  954. package/components/filter-item-Be6Z7NMz.js +0 -792
  955. package/components/filter-item-CxPrwF-R.cjs +0 -111
  956. package/components/filter-parameter-picker-Ba8bvoPZ.js +0 -371
  957. package/components/filter-parameter-picker-BtJLCUbT.cjs +0 -124
  958. package/components/filter-value-picker-DD206JZl.js +0 -169
  959. package/components/filter-value-picker-Dpua1vcJ.cjs +0 -69
  960. package/components/filter-value-picker-datetime-Bj0YaPtB.js +0 -159
  961. package/components/filter-value-picker-datetime-DWgI83nJ.cjs +0 -51
  962. package/components/filter-value-picker-hierarchy-BEoqkQq0.cjs +0 -54
  963. package/components/filter-value-picker-hierarchy-ZMThNJYm.js +0 -315
  964. package/components/filter-value-picker-numeric-1Vxp_Vam.cjs +0 -54
  965. package/components/filter-value-picker-numeric-CVaDogFQ.js +0 -236
  966. package/components/filters-Cnm0Kwk3.js +0 -926
  967. package/components/filters-Dtbt99BP.cjs +0 -199
  968. package/components/formula-BE9bipho.js +0 -138
  969. package/components/formula-DGMnKmnR.cjs +0 -45
  970. package/components/formula-codemirror-B14vsZXJ.cjs +0 -215
  971. package/components/formula-codemirror-xfm0QtJN.js +0 -12018
  972. package/components/formula-display-store-8hohve9v.cjs +0 -20
  973. package/components/formula-display-store-JAaWuYNB.js +0 -1087
  974. package/components/formula-editor-CkW-JfyT.cjs +0 -224
  975. package/components/formula-editor-DN87mT8q.js +0 -690
  976. package/components/formula-field-B1EMJOfK.js +0 -40
  977. package/components/formula-field-CQYFSBHL.cjs +0 -20
  978. package/components/formula-input-base-BCQXmd1P.cjs +0 -49
  979. package/components/formula-input-base-HL0Fg74x.js +0 -236
  980. package/components/fr-CePmGBUH.js +0 -565
  981. package/components/fr-uE3fb3kc.cjs +0 -20
  982. package/components/funnel-chart-positioning.config-DeLnAGGT.cjs +0 -20
  983. package/components/funnel-chart-positioning.config-TVzSiV6I.js +0 -48
  984. package/components/get-dataset-name-DLjeChNS.js +0 -32
  985. package/components/get-dataset-name-mGNEfkAv.cjs +0 -20
  986. package/components/groupings-CODDxpbZ.js +0 -52
  987. package/components/groupings-DKMq8DgS.cjs +0 -20
  988. package/components/heat-map-options.config-DtDh9Gpy.cjs +0 -20
  989. package/components/heat-map-options.config-X96sw-BV.js +0 -226
  990. package/components/heat-map-positioning.config--wm9l7bB.js +0 -48
  991. package/components/heat-map-positioning.config-ddrgZXa9.cjs +0 -20
  992. package/components/heat-table-options.config-CugBuoUA.cjs +0 -20
  993. package/components/heat-table-options.config-D6dA9J97.js +0 -269
  994. package/components/heat-table-positioning.config-CIhhBEMg.js +0 -55
  995. package/components/heat-table-positioning.config-qMDSRhZR.cjs +0 -20
  996. package/components/hexbin-map-positioning.config-E_BpcIFy.cjs +0 -20
  997. package/components/hexbin-map-positioning.config-S7VYUwVD.js +0 -48
  998. package/components/interactive-viz-item--kqitfEZ.cjs +0 -249
  999. package/components/interactive-viz-item-cdShBZQA.js +0 -722
  1000. package/components/item-grid/item-grid-item-actions-menu.d.ts +0 -35
  1001. package/components/item-grid-BfhqMuQA.cjs +0 -113
  1002. package/components/item-grid-xCM8AqRH.js +0 -4559
  1003. package/components/item-option-B5FraAiv.cjs +0 -269
  1004. package/components/item-option-DaAlj_OB.js +0 -955
  1005. package/components/item-option-action-button-group-4w8ub3cT.js +0 -118
  1006. package/components/item-option-action-button-group-DHu8VjCy.cjs +0 -53
  1007. package/components/item-option-base-4Bwn-3Fc.cjs +0 -56
  1008. package/components/item-option-base-BxQUwXzg.js +0 -123
  1009. package/components/item-option-color-palette-picker-D5nO-Bqb.js +0 -2041
  1010. package/components/item-option-color-palette-picker-DrhHKaAK.cjs +0 -40
  1011. package/components/item-option-color-picker-Bhv_k1uW.cjs +0 -34
  1012. package/components/item-option-color-picker-CKokPQcS.js +0 -87
  1013. package/components/item-option-color-range-CwDkzRcx.cjs +0 -98
  1014. package/components/item-option-color-range-DYsMbFEb.js +0 -220
  1015. package/components/item-option-guidelines-CXl4Yla4.js +0 -419
  1016. package/components/item-option-guidelines-DMjA-h3h.cjs +0 -135
  1017. package/components/item-option-multi-language-field-C75Hd2fG.cjs +0 -33
  1018. package/components/item-option-multi-language-field-S6Mt3k23.js +0 -82
  1019. package/components/item-option-number-field-Bg5r0IAX.cjs +0 -38
  1020. package/components/item-option-number-field-CALw8q_J.js +0 -102
  1021. package/components/item-option-panel-DBXgOsM4.cjs +0 -67
  1022. package/components/item-option-panel-v7yUS9hb.js +0 -183
  1023. package/components/item-option-picker-CZyzd3Nq.js +0 -77
  1024. package/components/item-option-picker-RFstpFwI.cjs +0 -37
  1025. package/components/item-option-position-picker-C8cnHEH4.js +0 -117
  1026. package/components/item-option-position-picker-CKHbHHl1.cjs +0 -32
  1027. package/components/item-option-positions-number-field-BGs3WWaz.cjs +0 -49
  1028. package/components/item-option-positions-number-field-BJTY1qZR.js +0 -164
  1029. package/components/item-option-radio-button-group-CN8TLtsV.cjs +0 -37
  1030. package/components/item-option-radio-button-group-vhm4r4_k.js +0 -74
  1031. package/components/item-option-slider-CQOKWBZQ.js +0 -96
  1032. package/components/item-option-slider-DbLPhpJd.cjs +0 -33
  1033. package/components/item-option-switch-CWpb0nf3.cjs +0 -30
  1034. package/components/item-option-switch-azZX2vJr.js +0 -69
  1035. package/components/item-option-text-field-CIM_38yi.js +0 -80
  1036. package/components/item-option-text-field-CS3Lccda.cjs +0 -33
  1037. package/components/item-slot-drop-C8WYPu_w.cjs +0 -91
  1038. package/components/item-slot-drop-DeZ2GvAu.js +0 -331
  1039. package/components/item-slot-drop-panel-BcBHDDTT.cjs +0 -57
  1040. package/components/item-slot-drop-panel-LpfX7ap0.js +0 -355
  1041. package/components/item-slot-picker-BSO1ltXC.js +0 -505
  1042. package/components/item-slot-picker-CvySq194.cjs +0 -174
  1043. package/components/item-slot-picker-panel-CsntXcAp.js +0 -448
  1044. package/components/item-slot-picker-panel-DQ_OzMO_.cjs +0 -81
  1045. package/components/line-chart-positioning.config-CrreArf5.js +0 -55
  1046. package/components/line-chart-positioning.config-DMe1Ldwk.cjs +0 -20
  1047. package/components/load-data-fields-for-datasets-B3XcFFfg.js +0 -42
  1048. package/components/load-data-fields-for-datasets-rL24A68g.cjs +0 -20
  1049. package/components/localized-mixin-DaLXe5J9.js +0 -45
  1050. package/components/localized-mixin-DiUJOd06.cjs +0 -20
  1051. package/components/marker-map-positioning.config-CpI8nCtC.cjs +0 -20
  1052. package/components/marker-map-positioning.config-DW9tMO2M.js +0 -48
  1053. package/components/nl-BaZM3WoR.js +0 -565
  1054. package/components/nl-BoEhzeIh.cjs +0 -20
  1055. package/components/ohlc-chart-positioning.config-9DETh4xy.cjs +0 -20
  1056. package/components/ohlc-chart-positioning.config-CkX8gyS2.js +0 -78
  1057. package/components/parallel-coordinates-plot-positioning.config-CLDZdGdh.cjs +0 -20
  1058. package/components/parallel-coordinates-plot-positioning.config-DTJZLEeT.js +0 -48
  1059. package/components/pivot-table-positioning.config-B-SALuVb.cjs +0 -20
  1060. package/components/pivot-table-positioning.config-CtSYHD-n.js +0 -55
  1061. package/components/pyramid-chart-positioning.config-0Juiava5.js +0 -55
  1062. package/components/pyramid-chart-positioning.config-BllFtneP.cjs +0 -20
  1063. package/components/radar-chart-positioning.config-BPbb63S6.js +0 -55
  1064. package/components/radar-chart-positioning.config-BY4RKNDi.cjs +0 -20
  1065. package/components/route-map-options.config-C65J81_7.js +0 -328
  1066. package/components/route-map-options.config-DS9cCAQK.cjs +0 -20
  1067. package/components/route-map-positioning.config-D6nZFd8f.js +0 -66
  1068. package/components/route-map-positioning.config-GQ9AJfej.cjs +0 -20
  1069. package/components/sankey-diagram-positioning.config-DAuj5A08.cjs +0 -20
  1070. package/components/sankey-diagram-positioning.config-R1EjoR5F.js +0 -66
  1071. package/components/scatter-plot-positioning.config-DGoMnNZy.js +0 -77
  1072. package/components/scatter-plot-positioning.config-o4c-wuRo.cjs +0 -20
  1073. package/components/set-locale-Xh_1AFbC.cjs +0 -20
  1074. package/components/set-locale-ydAPif-7.js +0 -43
  1075. package/components/slicer-filter-positioning.config-BqpIENEm.cjs +0 -20
  1076. package/components/slicer-filter-positioning.config-D_didkcw.js +0 -48
  1077. package/components/slot-menu-CUdbaW3K.js +0 -428
  1078. package/components/slot-menu-DRx1Ffla.cjs +0 -71
  1079. package/components/slot-menu-list-DVSxamVa.js +0 -347
  1080. package/components/slot-menu-list-DaHzz_ve.cjs +0 -44
  1081. package/components/speedometer-chart-positioning.config-CmxsV4-x.js +0 -48
  1082. package/components/speedometer-chart-positioning.config-eVUWDhkL.cjs +0 -20
  1083. package/components/spike-map-options.config-BRwdTyrp.cjs +0 -20
  1084. package/components/spike-map-options.config-DjoTrAsC.js +0 -415
  1085. package/components/spike-map-positioning.config-B38djRlf.cjs +0 -20
  1086. package/components/spike-map-positioning.config-Bta7ar9e.js +0 -55
  1087. package/components/strip-plot-positioning.config-0vlAfmDB.js +0 -48
  1088. package/components/strip-plot-positioning.config-atH68L8u.cjs +0 -20
  1089. package/components/sunburst-chart-positioning.config-B2x6afBV.js +0 -48
  1090. package/components/sunburst-chart-positioning.config-NFzFNuXB.cjs +0 -20
  1091. package/components/symbol-map-positioning.config-B6v9PFTk.js +0 -55
  1092. package/components/symbol-map-positioning.config-DGpmp_N1.cjs +0 -20
  1093. package/components/treemap-chart-positioning.config-Bf2VNVRQ.js +0 -55
  1094. package/components/treemap-chart-positioning.config-NMULB8UM.cjs +0 -20
  1095. package/components/utils-SzKvwZ9-.cjs +0 -20
  1096. package/components/utils-_8LPCz9-.js +0 -240
  1097. package/components/venn-diagram-positioning.config-D4cODPGV.cjs +0 -20
  1098. package/components/venn-diagram-positioning.config-DgOl0Vh-.js +0 -55
  1099. package/components/viz-item-menu/index.cjs +0 -20
  1100. package/components/viz-item-menu/index.d.ts +0 -8
  1101. package/components/viz-item-menu/index.js +0 -28
  1102. package/components/viz-item-menu/types.d.ts +0 -9
  1103. package/components/viz-item-menu/viz-item-menu.d.ts +0 -78
  1104. package/components/viz-item-menu-CNHv6qDa.cjs +0 -55
  1105. package/components/viz-item-menu-L_j0L08h.js +0 -170
  1106. package/components/wordcloud-chart-positioning.config-BP6iqy-N.js +0 -55
  1107. package/components/wordcloud-chart-positioning.config-DZEkWvb0.cjs +0 -20
  1108. package/deprecated-react/components/viz-item-menu.component.cjs +0 -1
  1109. package/react/components/viz-item-menu.component.ts +0 -33
  1110. package/react/esm/components/viz-item-menu.component.d.ts +0 -16
  1111. package/react/esm/components/viz-item-menu.component.js +0 -21
  1112. /package/{storybook/inject-global-vars.d.ts → utils/data-broker/tests/data-broker.test.d.ts} +0 -0
@@ -0,0 +1,4490 @@
1
+ /*! * A kit of modern Luzmo Web Components for analytics in your web application.
2
+ *
3
+ * Copyright © 2026 Luzmo
4
+ * All rights reserved.
5
+ * Luzmo web components (“Luzmo Web Components”)
6
+ * must be used according to the Luzmo Terms of Service.
7
+ * This license allows users with a current active Luzmo account
8
+ * to use the Luzmo Web Components. This license terminates
9
+ * automatically if a user no longer has an active Luzmo account.
10
+ * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
11
+ *
12
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
+ * SOFTWARE.
19
+ * */
20
+ import "./tokens-Ov1pCR4Y.js";
21
+ import { t as e } from "./decorate-DyMgX_Uh.js";
22
+ import { t } from "./color-B7SELPGq.js";
23
+ import { t as n } from "./v4-DIjJgmR0.js";
24
+ import { luzmoArrows as r } from "@luzmo/icons";
25
+ import "@luzmo/lucero/icon";
26
+ import { html as i, render as a, unsafeCSS as o } from "lit";
27
+ import { property as s, query as c, queryAll as l, state as u } from "lit/decorators.js";
28
+ import { msg as d, str as f } from "@lit/localize";
29
+ import { repeat as p } from "lit/directives/repeat.js";
30
+ import { guard as m } from "lit/directives/guard.js";
31
+ import { LuzmoElement as h } from "@luzmo/lucero/utils";
32
+ //#region node_modules/gridstack/dist/gridstack.min.css?inline
33
+ var g = ".grid-stack{position:relative}.grid-stack-placeholder>.placeholder-content{background-color:#0000001a;width:auto;margin:0;position:absolute;z-index:0!important}.grid-stack>.grid-stack-item{width:var(--gs-column-width);height:var(--gs-cell-height);padding:0;position:absolute;top:0}.grid-stack>.grid-stack-item>.grid-stack-item-content{width:auto;margin:0;position:absolute;overflow:hidden auto}.grid-stack>.grid-stack-item.size-to-content:not(.size-to-content-max)>.grid-stack-item-content{overflow-y:hidden}.grid-stack:not(.grid-stack-rtl)>.grid-stack-item{left:0}.grid-stack.grid-stack-rtl>.grid-stack-item{right:0}.grid-stack>.grid-stack-item>.grid-stack-item-content,.grid-stack>.grid-stack-placeholder>.placeholder-content{top:var(--gs-item-margin-top);right:var(--gs-item-margin-right);bottom:var(--gs-item-margin-bottom);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-handle{-ms-touch-action:manipulation;touch-action:manipulation;-webkit-user-select:none;user-select:none;z-index:100;font-size:.1px;display:block;position:absolute}.grid-stack-item.ui-resizable-autohide>.ui-resizable-handle,.grid-stack-item.ui-resizable-disabled>.ui-resizable-handle{display:none}.grid-stack-item>.ui-resizable-ne,.grid-stack-item>.ui-resizable-nw,.grid-stack-item>.ui-resizable-se,.grid-stack-item>.ui-resizable-sw{z-index:101;background-image:url(\"data:image/svg+xml;utf8,<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" fill=\\\"none\\\" stroke=\\\"%23666\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m10 3 2 2H8l2-2v14l-2-2h4l-2 2\\\"/></svg>\");background-position:50%;background-repeat:no-repeat}.grid-stack-item>.ui-resizable-ne,.grid-stack-item>.ui-resizable-sw{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-nw,.grid-stack-item>.ui-resizable-se{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-nw{cursor:nw-resize;width:20px;height:20px;top:var(--gs-item-margin-top);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-n{cursor:n-resize;height:10px;top:var(--gs-item-margin-top);left:25px;right:25px}.grid-stack-item>.ui-resizable-ne{cursor:ne-resize;width:20px;height:20px;top:var(--gs-item-margin-top);right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-e{cursor:e-resize;width:10px;top:15px;bottom:15px;right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-se{cursor:se-resize;width:20px;height:20px;bottom:var(--gs-item-margin-bottom);right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-s{cursor:s-resize;height:10px;left:25px;bottom:var(--gs-item-margin-bottom);right:25px}.grid-stack-item>.ui-resizable-sw{cursor:sw-resize;width:20px;height:20px;bottom:var(--gs-item-margin-bottom);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-w{cursor:w-resize;width:10px;top:15px;bottom:15px;left:var(--gs-item-margin-left)}.grid-stack-item.ui-draggable-dragging>.ui-resizable-handle{display:none!important}.grid-stack-item.ui-draggable-dragging{will-change:left,right,top}.grid-stack-item.ui-resizable-resizing{will-change:width,height}.grid-stack-item.ui-draggable-armed{cursor:move;animation:.25s ease-in-out infinite gs-armed-wiggle}.grid-stack-item>.ui-resizable-handle.ui-resizable-armed{animation:.5s ease-in-out infinite gs-armed-pulse}@keyframes gs-armed-wiggle{0%,to{transform:rotate(0)}25%{transform:rotate(-1.5deg)}75%{transform:rotate(1.5deg)}}@keyframes gs-armed-pulse{0%,to{opacity:1}50%{opacity:.3}}.ui-draggable-dragging,.ui-resizable-resizing{z-index:10000}.ui-draggable-dragging>.grid-stack-item-content,.ui-resizable-resizing>.grid-stack-item-content{opacity:.8;box-shadow:1px 4px 6px #0003}.grid-stack-animate,.grid-stack-animate .grid-stack-item{transition:left .3s,right .3s,top .3s,height .3s,width .3s}.grid-stack-animate .grid-stack-item.grid-stack-placeholder,.grid-stack-animate .grid-stack-item.ui-draggable-dragging,.grid-stack-animate .grid-stack-item.ui-resizable-resizing{transition:left,right,top,height,width}.grid-stack>.grid-stack-item[gs-y=\"0\"]{top:0}.grid-stack:not(.grid-stack-rtl)>.grid-stack-item[gs-x=\"0\"]{left:0}.grid-stack.grid-stack-rtl>.grid-stack-item[gs-x=\"0\"]{right:0}.gs-print-show{display:none}@media print{@page gs-landscape{size:landscape}@page gs-portrait{size:portrait}.grid-stack{height:auto!important;display:block!important;position:static!important}.grid-stack>.grid-stack-item{float:left!important;height:auto!important;width:calc(100% * var(--gs-w)/ var(--gs-columns,12))!important;break-inside:avoid!important;page-break-inside:avoid!important;display:block!important;position:static!important;top:auto!important;left:auto!important}.grid-stack>.grid-stack-item>.grid-stack-item-content{white-space:normal!important;height:auto!important;margin-top:var(--gs-item-margin-top)!important;margin-right:var(--gs-item-margin-right)!important;margin-bottom:var(--gs-item-margin-bottom)!important;margin-left:var(--gs-item-margin-left)!important;position:relative!important;top:auto!important;bottom:auto!important;left:auto!important;right:auto!important;overflow:visible!important}.gs-print-hide{display:none}.gs-print-show{display:block}.gs-print-avoid-break-after{break-after:avoid!important;page-break-after:avoid!important}.grid-stack>.grid-stack-item.gs-print-hide{display:none!important}.grid-stack>.grid-stack-item[gs-page-break=true],.grid-stack>.grid-stack-item[gs-print-orientation]{float:none!important;clear:both!important}.grid-stack>.grid-stack-item[gs-page-break=true]{page-break-before:always!important;break-before:page!important}.grid-stack>.grid-stack-item[gs-print-orientation=landscape]{page:gs-landscape;min-width:calc(100vmax * var(--gs-w)/ var(--gs-columns,12))!important}.grid-stack>.grid-stack-item[gs-print-orientation=portrait]{page:gs-portrait;min-width:calc(100vmin * var(--gs-w)/ var(--gs-columns,12))!important}.grid-stack>.grid-stack-item[gs-break-inside=true]{float:none!important;clear:both!important;break-inside:auto!important;page-break-inside:auto!important;width:100%!important}.grid-stack>.grid-stack-item>.ui-resizable-handle{display:none!important}}", _ = ({ action: e, actionType: t, active: n, items: r, element: i, itemId: a, item: o, deletedId: s, originalElement: c, updatedItems: l }) => ({
34
+ action: e,
35
+ actionType: t,
36
+ active: n,
37
+ items: r,
38
+ element: i,
39
+ item: {
40
+ ...o,
41
+ id: a,
42
+ filters: o?.filters ?? []
43
+ },
44
+ ...s && { deletedId: s },
45
+ ...c && { originalElement: c },
46
+ ...l && { updatedItems: l }
47
+ }), v = ({ target: e, action: t, actionType: n, active: r, items: i, element: a, itemId: o, item: s, deletedId: c, originalElement: l, updatedItems: u }) => {
48
+ e.dispatchEvent(new CustomEvent("luzmo-item-grid-item-action", {
49
+ detail: _({
50
+ action: t,
51
+ actionType: n,
52
+ active: r,
53
+ items: i,
54
+ element: a,
55
+ itemId: o,
56
+ item: s,
57
+ deletedId: c,
58
+ originalElement: l,
59
+ updatedItems: u
60
+ }),
61
+ bubbles: !0,
62
+ composed: !0,
63
+ cancelable: !0
64
+ }));
65
+ }, y = ({ target: e, itemStates: t, updatedItemStates: n, changedItemStates: r }) => {
66
+ e.dispatchEvent(new CustomEvent("luzmo-item-grid-item-states-changed", {
67
+ detail: {
68
+ itemStates: t,
69
+ updatedItemStates: n,
70
+ changedItemStates: r
71
+ },
72
+ bubbles: !0,
73
+ composed: !0
74
+ }));
75
+ }, b = ({ target: e, eventName: t, detail: n }) => {
76
+ e.dispatchEvent(new CustomEvent(t, {
77
+ detail: n,
78
+ bubbles: !0,
79
+ composed: !0
80
+ }));
81
+ }, x = (e) => e instanceof Element ? e : void 0, ee = (e) => x(e)?.closest(".grid-stack-item"), te = ({ event: e, gridItem: t }) => !x(e.relatedTarget)?.closest(".grid-item-actions-popover") && !t.hasAttribute("active"), S = ({ event: e, focusedItemElement: t, removeItemActionsMenuPopover: n }) => {
82
+ let r = ee(e.target);
83
+ return r ? (t && t !== r && (t.removeAttribute("focused"), n(t)), r.setAttribute("focused", "true"), r) : t;
84
+ }, C = ({ event: e, focusedItemElement: t, removeItemActionsMenuPopover: n }) => t ? x(e.relatedTarget)?.closest("luzmo-item-grid-item-actions-menu") ? {
85
+ focusedItemElement: t,
86
+ shouldFocusGrid: !1
87
+ } : (t.removeAttribute("focused"), n(t), {
88
+ focusedItemElement: void 0,
89
+ shouldFocusGrid: !0
90
+ }) : {
91
+ focusedItemElement: void 0,
92
+ shouldFocusGrid: !1
93
+ }, ne = ({ item: e, activeItemElement: t, gridElement: n, removeItemActionsMenuPopover: r }) => {
94
+ if (e.removeAttribute("active"), r(e), t === e) {
95
+ n.removeAttribute("has-active-item");
96
+ return;
97
+ }
98
+ return t;
99
+ }, re = ({ event: e, gridElement: t, items: n, state: r, cleanupActiveItem: i, dispatchItemActionEvent: a, createItemActionsMenuPopover: o }) => {
100
+ e.stopPropagation();
101
+ let s = e.detail, c = e.target?.closest(".grid-stack-item");
102
+ if (!c) return r;
103
+ let l = c.getAttribute("gs-id"), u = n.find((e) => e.id === l);
104
+ return s.type === "toggle" && s.action === r.activeItemActionToggle && c === r.activeItemElement ? (r.activeItemElement = void 0, r.activeItemActionToggle = void 0, t.removeAttribute("has-active-item"), c.removeAttribute("active"), i(c), l && a(s.action, s.type, !1, c, l, u), r) : (t.querySelectorAll(".grid-stack-item").forEach((e) => {
105
+ e !== c && i(e);
106
+ }), s.type === "toggle" ? (r.activeItemElement = c, r.activeItemActionToggle = s.action, t.setAttribute("has-active-item", "true"), c.setAttribute("active", "true"), o(c, [s.action])) : r.activeItemElement && r.activeItemElement !== c && (r.activeItemElement = void 0, r.activeItemActionToggle = void 0), l && a(s.action, s.type, s.active, c, l, u), r);
107
+ }, ie = ({ event: e, gridElement: t, hostElement: n, items: r, activeItemActionToggle: i, cleanupActiveItem: a, dispatchItemActionEvent: o }) => {
108
+ let s = e.composedPath();
109
+ if (!s.includes(t) && !s.includes(n)) return { activeItemActionToggle: i };
110
+ let c = t.querySelector(".grid-stack-item[active]");
111
+ if (!c || s.includes(c)) return { activeItemActionToggle: i };
112
+ let l = c.querySelector(".grid-item-actions-popover");
113
+ if (l && s.includes(l)) return { activeItemActionToggle: i };
114
+ let u = c.getAttribute("gs-id"), d = r.find((e) => e.id === u);
115
+ return a(c), i && u && o(i, "toggle", !1, c, u, d), { activeItemActionToggle: void 0 };
116
+ }, ae = ({ gridElement: e, items: t, gridItemData: n, itemId: r, action: i, options: a, state: o, cleanupActiveItem: s, dispatchItemActionEvent: c, createItemActionsMenuPopover: l }) => {
117
+ if (!n?.element) return {
118
+ result: void 0,
119
+ state: o
120
+ };
121
+ let u = n.element, d = n.item, f = i === o.activeItemActionToggle && u === o.activeItemElement, p = a?.active ?? !f;
122
+ if (a?.active !== void 0 && p === f) return {
123
+ result: f,
124
+ state: o
125
+ };
126
+ if (!p) return o.activeItemElement = void 0, o.activeItemActionToggle = void 0, e.removeAttribute("has-active-item"), u.removeAttribute("active"), s(u), c(i, "toggle", !1, u, r, d), {
127
+ result: !1,
128
+ state: o
129
+ };
130
+ if (o.activeItemElement && o.activeItemElement !== u) {
131
+ let e = o.activeItemElement.getAttribute("gs-id"), n = t.find((t) => t.id === e), r = o.activeItemActionToggle, i = o.activeItemElement;
132
+ s(o.activeItemElement), o.activeItemElement = void 0, o.activeItemActionToggle = void 0, r && e && n && c(r, "toggle", !1, i, e, n);
133
+ }
134
+ return o.activeItemElement = u, o.activeItemActionToggle = i, e.setAttribute("has-active-item", "true"), u.setAttribute("active", "true"), l(u, [i]), c(i, "toggle", !0, u, r, d), {
135
+ result: !0,
136
+ state: o
137
+ };
138
+ }, oe = ({ gridElement: e, items: t, state: n, cleanupActiveItem: r, dispatchItemActionEvent: i }) => {
139
+ let a = 0;
140
+ if (n.activeItemElement && n.activeItemActionToggle) {
141
+ let o = n.activeItemElement.getAttribute("gs-id"), s = t.find((e) => e.id === o), c = n.activeItemActionToggle, l = n.activeItemElement;
142
+ r(n.activeItemElement), n.activeItemElement = void 0, n.activeItemActionToggle = void 0, e.removeAttribute("has-active-item"), c && o && s && (i(c, "toggle", !1, l, o, s), a++);
143
+ }
144
+ return {
145
+ deactivatedCount: a,
146
+ state: n
147
+ };
148
+ }, se = {
149
+ sizeX: 1,
150
+ sizeY: 1,
151
+ col: 0,
152
+ row: 0
153
+ }, ce = (e) => {
154
+ e.forEach((e) => {
155
+ if (!e.id) throw Error("Grid item id is required");
156
+ });
157
+ }, le = (e) => {
158
+ if (!e.id) throw Error("Grid item id is required");
159
+ return e.id;
160
+ }, ue = (e, t) => ({
161
+ id: t,
162
+ x: e?.position?.col ?? 0,
163
+ y: e?.position?.row ?? 0,
164
+ w: e?.position?.sizeX ?? 1,
165
+ h: e?.position?.sizeY ?? 1
166
+ }), de = (e, t) => ({
167
+ ...structuredClone(e),
168
+ id: t,
169
+ position: {
170
+ ...se,
171
+ ...structuredClone(e.position)
172
+ },
173
+ canFilter: e.canFilter ?? "all"
174
+ }), fe = (e, t) => {
175
+ if (t) {
176
+ for (let n of e) if (n.getAttribute("luzmo-item-grid-item-id") === t) return n;
177
+ }
178
+ }, pe = (e, t) => e.map((e) => ({
179
+ item: e,
180
+ element: t.querySelector(`[gs-id="${CSS.escape(e.id)}"]`)
181
+ })), me = ({ item: e, engine: t, existingItems: n, autoPosition: r, excludeNodeId: i }) => {
182
+ let a = e.position, o = i ? t.nodes.filter((e) => e.id !== i) : t.nodes, s = new t.constructor({
183
+ column: t.column,
184
+ mode: t.mode,
185
+ nodes: o.map((e) => ({ ...e }))
186
+ }), c = {
187
+ x: a.col,
188
+ y: a.row,
189
+ w: a.sizeX,
190
+ h: a.sizeY,
191
+ id: e.id,
192
+ autoPosition: r
193
+ };
194
+ s.addNode(c);
195
+ let l = {
196
+ ...e,
197
+ position: {
198
+ col: c.x ?? a.col,
199
+ row: c.y ?? a.row,
200
+ sizeX: c.w ?? a.sizeX,
201
+ sizeY: c.h ?? a.sizeY
202
+ }
203
+ };
204
+ return {
205
+ resolvedItem: l,
206
+ updatedItems: [...n.map((e) => {
207
+ let t = s.nodes.find((t) => t.id === e.id);
208
+ return t && t.x != null && t.y != null && t.w != null && t.h != null ? {
209
+ ...e,
210
+ position: {
211
+ col: t.x,
212
+ row: t.y,
213
+ sizeX: t.w,
214
+ sizeY: t.h
215
+ }
216
+ } : e;
217
+ }), l]
218
+ };
219
+ }, he = ({ itemId: e, patch: t, engine: n, existingItems: r }) => {
220
+ let i = r.find((t) => t.id === e);
221
+ if (!i?.position) return r;
222
+ let { resolvedItem: a, updatedItems: o } = me({
223
+ item: {
224
+ ...i,
225
+ position: {
226
+ ...i.position,
227
+ ...t
228
+ }
229
+ },
230
+ engine: n,
231
+ existingItems: r.filter((t) => t.id !== e),
232
+ autoPosition: !1,
233
+ excludeNodeId: e
234
+ });
235
+ return r.map((t) => t.id === e ? a : o.find((e) => e.id === t.id) ?? t);
236
+ }, ge = (e) => de(e, e.id), _e = Math.min, w = Math.max, ve = Math.round, ye = Math.floor, T = (e) => ({
237
+ x: e,
238
+ y: e
239
+ }), be = {
240
+ left: "right",
241
+ right: "left",
242
+ bottom: "top",
243
+ top: "bottom"
244
+ };
245
+ function xe(e, t) {
246
+ return typeof e == "function" ? e(t) : e;
247
+ }
248
+ function E(e) {
249
+ return e.split("-")[0];
250
+ }
251
+ function Se(e) {
252
+ return e.split("-")[1];
253
+ }
254
+ function Ce(e) {
255
+ return e === "x" ? "y" : "x";
256
+ }
257
+ function we(e) {
258
+ return e === "y" ? "height" : "width";
259
+ }
260
+ function D(e) {
261
+ let t = e[0];
262
+ return t === "t" || t === "b" ? "y" : "x";
263
+ }
264
+ function Te(e) {
265
+ return Ce(D(e));
266
+ }
267
+ function Ee(e, t, n) {
268
+ n === void 0 && (n = !1);
269
+ let r = Se(e), i = Te(e), a = we(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
270
+ return t.reference[a] > t.floating[a] && (o = O(o)), [o, O(o)];
271
+ }
272
+ function De(e) {
273
+ let t = O(e);
274
+ return [
275
+ Oe(e),
276
+ t,
277
+ Oe(t)
278
+ ];
279
+ }
280
+ function Oe(e) {
281
+ return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
282
+ }
283
+ var ke = ["left", "right"], Ae = ["right", "left"], je = ["top", "bottom"], Me = ["bottom", "top"];
284
+ function Ne(e, t, n) {
285
+ switch (e) {
286
+ case "top":
287
+ case "bottom": return n ? t ? Ae : ke : t ? ke : Ae;
288
+ case "left":
289
+ case "right": return t ? je : Me;
290
+ default: return [];
291
+ }
292
+ }
293
+ function Pe(e, t, n, r) {
294
+ let i = Se(e), a = Ne(E(e), n === "start", r);
295
+ return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(Oe)))), a;
296
+ }
297
+ function O(e) {
298
+ let t = E(e);
299
+ return be[t] + e.slice(t.length);
300
+ }
301
+ function Fe(e) {
302
+ return {
303
+ top: 0,
304
+ right: 0,
305
+ bottom: 0,
306
+ left: 0,
307
+ ...e
308
+ };
309
+ }
310
+ function Ie(e) {
311
+ return typeof e == "number" ? {
312
+ top: e,
313
+ right: e,
314
+ bottom: e,
315
+ left: e
316
+ } : Fe(e);
317
+ }
318
+ function k(e) {
319
+ let { x: t, y: n, width: r, height: i } = e;
320
+ return {
321
+ width: r,
322
+ height: i,
323
+ top: n,
324
+ left: t,
325
+ right: t + r,
326
+ bottom: n + i,
327
+ x: t,
328
+ y: n
329
+ };
330
+ }
331
+ //#endregion
332
+ //#region node_modules/@floating-ui/core/dist/floating-ui.core.mjs
333
+ function Le(e, t, n) {
334
+ let { reference: r, floating: i } = e, a = D(t), o = Te(t), s = we(o), c = E(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
335
+ switch (c) {
336
+ case "top":
337
+ p = {
338
+ x: u,
339
+ y: r.y - i.height
340
+ };
341
+ break;
342
+ case "bottom":
343
+ p = {
344
+ x: u,
345
+ y: r.y + r.height
346
+ };
347
+ break;
348
+ case "right":
349
+ p = {
350
+ x: r.x + r.width,
351
+ y: d
352
+ };
353
+ break;
354
+ case "left":
355
+ p = {
356
+ x: r.x - i.width,
357
+ y: d
358
+ };
359
+ break;
360
+ default: p = {
361
+ x: r.x,
362
+ y: r.y
363
+ };
364
+ }
365
+ switch (Se(t)) {
366
+ case "start":
367
+ p[o] -= f * (n && l ? -1 : 1);
368
+ break;
369
+ case "end":
370
+ p[o] += f * (n && l ? -1 : 1);
371
+ break;
372
+ }
373
+ return p;
374
+ }
375
+ async function Re(e, t) {
376
+ t === void 0 && (t = {});
377
+ let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = xe(t, e), p = Ie(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = k(await i.getClippingRect({
378
+ element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
379
+ boundary: c,
380
+ rootBoundary: l,
381
+ strategy: s
382
+ })), g = u === "floating" ? {
383
+ x: n,
384
+ y: r,
385
+ width: a.floating.width,
386
+ height: a.floating.height
387
+ } : a.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), v = await (i.isElement == null ? void 0 : i.isElement(_)) && await (i.getScale == null ? void 0 : i.getScale(_)) || {
388
+ x: 1,
389
+ y: 1
390
+ }, y = k(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
391
+ elements: o,
392
+ rect: g,
393
+ offsetParent: _,
394
+ strategy: s
395
+ }) : g);
396
+ return {
397
+ top: (h.top - y.top + p.top) / v.y,
398
+ bottom: (y.bottom - h.bottom + p.bottom) / v.y,
399
+ left: (h.left - y.left + p.left) / v.x,
400
+ right: (y.right - h.right + p.right) / v.x
401
+ };
402
+ }
403
+ var ze = 50, Be = async (e, t, n) => {
404
+ let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = o.detectOverflow ? o : {
405
+ ...o,
406
+ detectOverflow: Re
407
+ }, c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
408
+ reference: e,
409
+ floating: t,
410
+ strategy: i
411
+ }), { x: u, y: d } = Le(l, r, c), f = r, p = 0, m = {};
412
+ for (let n = 0; n < a.length; n++) {
413
+ let h = a[n];
414
+ if (!h) continue;
415
+ let { name: g, fn: _ } = h, { x: v, y, data: b, reset: x } = await _({
416
+ x: u,
417
+ y: d,
418
+ initialPlacement: r,
419
+ placement: f,
420
+ strategy: i,
421
+ middlewareData: m,
422
+ rects: l,
423
+ platform: s,
424
+ elements: {
425
+ reference: e,
426
+ floating: t
427
+ }
428
+ });
429
+ u = v ?? u, d = y ?? d, m[g] = {
430
+ ...m[g],
431
+ ...b
432
+ }, x && p < ze && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
433
+ reference: e,
434
+ floating: t,
435
+ strategy: i
436
+ }) : x.rects), {x: u, y: d} = Le(l, f, c)), n = -1);
437
+ }
438
+ return {
439
+ x: u,
440
+ y: d,
441
+ placement: f,
442
+ strategy: i,
443
+ middlewareData: m
444
+ };
445
+ }, Ve = function(e) {
446
+ return e === void 0 && (e = {}), {
447
+ name: "flip",
448
+ options: e,
449
+ async fn(t) {
450
+ var n;
451
+ let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = xe(e, t);
452
+ if ((n = i.arrow) != null && n.alignmentOffset) return {};
453
+ let g = E(r), _ = D(o), v = E(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [O(o)] : De(o)), x = p !== "none";
454
+ !d && x && b.push(...Pe(o, m, p, y));
455
+ let ee = [o, ...b], te = await s.detectOverflow(t, h), S = [], C = i.flip?.overflows || [];
456
+ if (l && S.push(te[g]), u) {
457
+ let e = Ee(r, a, y);
458
+ S.push(te[e[0]], te[e[1]]);
459
+ }
460
+ if (C = [...C, {
461
+ placement: r,
462
+ overflows: S
463
+ }], !S.every((e) => e <= 0)) {
464
+ let e = (i.flip?.index || 0) + 1, t = ee[e];
465
+ if (t && (!(u === "alignment" && _ !== D(t)) || C.every((e) => D(e.placement) !== _ || e.overflows[0] > 0))) return {
466
+ data: {
467
+ index: e,
468
+ overflows: C
469
+ },
470
+ reset: { placement: t }
471
+ };
472
+ let n = C.filter((e) => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0]?.placement;
473
+ if (!n) switch (f) {
474
+ case "bestFit": {
475
+ let e = C.filter((e) => {
476
+ if (x) {
477
+ let t = D(e.placement);
478
+ return t === _ || t === "y";
479
+ }
480
+ return !0;
481
+ }).map((e) => [e.placement, e.overflows.filter((e) => e > 0).reduce((e, t) => e + t, 0)]).sort((e, t) => e[1] - t[1])[0]?.[0];
482
+ e && (n = e);
483
+ break;
484
+ }
485
+ case "initialPlacement":
486
+ n = o;
487
+ break;
488
+ }
489
+ if (r !== n) return { reset: { placement: n } };
490
+ }
491
+ return {};
492
+ }
493
+ };
494
+ }, He = /*#__PURE__*/ new Set(["left", "top"]);
495
+ async function Ue(e, t) {
496
+ let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = E(n), s = Se(n), c = D(n) === "y", l = He.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = xe(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
497
+ mainAxis: d,
498
+ crossAxis: 0,
499
+ alignmentAxis: null
500
+ } : {
501
+ mainAxis: d.mainAxis || 0,
502
+ crossAxis: d.crossAxis || 0,
503
+ alignmentAxis: d.alignmentAxis
504
+ };
505
+ return s && typeof m == "number" && (p = s === "end" ? m * -1 : m), c ? {
506
+ x: p * u,
507
+ y: f * l
508
+ } : {
509
+ x: f * l,
510
+ y: p * u
511
+ };
512
+ }
513
+ var We = function(e) {
514
+ return e === void 0 && (e = 0), {
515
+ name: "offset",
516
+ options: e,
517
+ async fn(t) {
518
+ var n;
519
+ let { x: r, y: i, placement: a, middlewareData: o } = t, s = await Ue(t, e);
520
+ return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
521
+ x: r + s.x,
522
+ y: i + s.y,
523
+ data: {
524
+ ...s,
525
+ placement: a
526
+ }
527
+ };
528
+ }
529
+ };
530
+ };
531
+ //#endregion
532
+ //#region node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
533
+ function Ge() {
534
+ return typeof window < "u";
535
+ }
536
+ function A(e) {
537
+ return Ke(e) ? (e.nodeName || "").toLowerCase() : "#document";
538
+ }
539
+ function j(e) {
540
+ var t;
541
+ return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
542
+ }
543
+ function M(e) {
544
+ return ((Ke(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
545
+ }
546
+ function Ke(e) {
547
+ return Ge() ? e instanceof Node || e instanceof j(e).Node : !1;
548
+ }
549
+ function N(e) {
550
+ return Ge() ? e instanceof Element || e instanceof j(e).Element : !1;
551
+ }
552
+ function P(e) {
553
+ return Ge() ? e instanceof HTMLElement || e instanceof j(e).HTMLElement : !1;
554
+ }
555
+ function qe(e) {
556
+ return !Ge() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof j(e).ShadowRoot;
557
+ }
558
+ function F(e) {
559
+ let { overflow: t, overflowX: n, overflowY: r, display: i } = R(e);
560
+ return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
561
+ }
562
+ function Je(e) {
563
+ return /^(table|td|th)$/.test(A(e));
564
+ }
565
+ function Ye(e) {
566
+ try {
567
+ if (e.matches(":popover-open")) return !0;
568
+ } catch {}
569
+ try {
570
+ return e.matches(":modal");
571
+ } catch {
572
+ return !1;
573
+ }
574
+ }
575
+ var Xe = /transform|translate|scale|rotate|perspective|filter/, Ze = /paint|layout|strict|content/, I = (e) => !!e && e !== "none", Qe;
576
+ function $e(e) {
577
+ let t = N(e) ? R(e) : e;
578
+ return I(t.transform) || I(t.translate) || I(t.scale) || I(t.rotate) || I(t.perspective) || !tt() && (I(t.backdropFilter) || I(t.filter)) || Xe.test(t.willChange || "") || Ze.test(t.contain || "");
579
+ }
580
+ function et(e) {
581
+ let t = z(e);
582
+ for (; P(t) && !L(t);) {
583
+ if ($e(t)) return t;
584
+ if (Ye(t)) return null;
585
+ t = z(t);
586
+ }
587
+ return null;
588
+ }
589
+ function tt() {
590
+ return Qe ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), Qe;
591
+ }
592
+ function L(e) {
593
+ return /^(html|body|#document)$/.test(A(e));
594
+ }
595
+ function R(e) {
596
+ return j(e).getComputedStyle(e);
597
+ }
598
+ function nt(e) {
599
+ return N(e) ? {
600
+ scrollLeft: e.scrollLeft,
601
+ scrollTop: e.scrollTop
602
+ } : {
603
+ scrollLeft: e.scrollX,
604
+ scrollTop: e.scrollY
605
+ };
606
+ }
607
+ function z(e) {
608
+ if (A(e) === "html") return e;
609
+ let t = e.assignedSlot || e.parentNode || qe(e) && e.host || M(e);
610
+ return qe(t) ? t.host : t;
611
+ }
612
+ function rt(e) {
613
+ let t = z(e);
614
+ return L(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : P(t) && F(t) ? t : rt(t);
615
+ }
616
+ function B(e, t, n) {
617
+ t === void 0 && (t = []), n === void 0 && (n = !0);
618
+ let r = rt(e), i = r === e.ownerDocument?.body, a = j(r);
619
+ if (i) {
620
+ let e = it(a);
621
+ return t.concat(a, a.visualViewport || [], F(r) ? r : [], e && n ? B(e) : []);
622
+ } else return t.concat(r, B(r, [], n));
623
+ }
624
+ function it(e) {
625
+ return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
626
+ }
627
+ //#endregion
628
+ //#region node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
629
+ function at(e) {
630
+ let t = R(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = P(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = ve(n) !== a || ve(r) !== o;
631
+ return s && (n = a, r = o), {
632
+ width: n,
633
+ height: r,
634
+ $: s
635
+ };
636
+ }
637
+ function ot(e) {
638
+ return N(e) ? e : e.contextElement;
639
+ }
640
+ function V(e) {
641
+ let t = ot(e);
642
+ if (!P(t)) return T(1);
643
+ let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = at(t), o = (a ? ve(n.width) : n.width) / r, s = (a ? ve(n.height) : n.height) / i;
644
+ return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
645
+ x: o,
646
+ y: s
647
+ };
648
+ }
649
+ var st = /*#__PURE__*/ T(0);
650
+ function ct(e) {
651
+ let t = j(e);
652
+ return !tt() || !t.visualViewport ? st : {
653
+ x: t.visualViewport.offsetLeft,
654
+ y: t.visualViewport.offsetTop
655
+ };
656
+ }
657
+ function lt(e, t, n) {
658
+ return t === void 0 && (t = !1), !n || t && n !== j(e) ? !1 : t;
659
+ }
660
+ function H(e, t, n, r) {
661
+ t === void 0 && (t = !1), n === void 0 && (n = !1);
662
+ let i = e.getBoundingClientRect(), a = ot(e), o = T(1);
663
+ t && (r ? N(r) && (o = V(r)) : o = V(e));
664
+ let s = lt(a, n, r) ? ct(a) : T(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
665
+ if (a) {
666
+ let e = j(a), t = r && N(r) ? j(r) : r, n = e, i = it(n);
667
+ for (; i && r && t !== n;) {
668
+ let e = V(i), t = i.getBoundingClientRect(), r = R(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
669
+ c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = j(i), i = it(n);
670
+ }
671
+ }
672
+ return k({
673
+ width: u,
674
+ height: d,
675
+ x: c,
676
+ y: l
677
+ });
678
+ }
679
+ function ut(e, t) {
680
+ let n = nt(e).scrollLeft;
681
+ return t ? t.left + n : H(M(e)).left + n;
682
+ }
683
+ function dt(e, t) {
684
+ let n = e.getBoundingClientRect();
685
+ return {
686
+ x: n.left + t.scrollLeft - ut(e, n),
687
+ y: n.top + t.scrollTop
688
+ };
689
+ }
690
+ function ft(e) {
691
+ let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = M(r), s = t ? Ye(t.floating) : !1;
692
+ if (r === o || s && a) return n;
693
+ let c = {
694
+ scrollLeft: 0,
695
+ scrollTop: 0
696
+ }, l = T(1), u = T(0), d = P(r);
697
+ if ((d || !d && !a) && ((A(r) !== "body" || F(o)) && (c = nt(r)), d)) {
698
+ let e = H(r);
699
+ l = V(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
700
+ }
701
+ let f = o && !d && !a ? dt(o, c) : T(0);
702
+ return {
703
+ width: n.width * l.x,
704
+ height: n.height * l.y,
705
+ x: n.x * l.x - c.scrollLeft * l.x + u.x + f.x,
706
+ y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
707
+ };
708
+ }
709
+ function pt(e) {
710
+ return Array.from(e.getClientRects());
711
+ }
712
+ function mt(e) {
713
+ let t = M(e), n = nt(e), r = e.ownerDocument.body, i = w(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = w(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight), o = -n.scrollLeft + ut(e), s = -n.scrollTop;
714
+ return R(r).direction === "rtl" && (o += w(t.clientWidth, r.clientWidth) - i), {
715
+ width: i,
716
+ height: a,
717
+ x: o,
718
+ y: s
719
+ };
720
+ }
721
+ var ht = 25;
722
+ function gt(e, t) {
723
+ let n = j(e), r = M(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0;
724
+ if (i) {
725
+ a = i.width, o = i.height;
726
+ let e = tt();
727
+ (!e || e && t === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
728
+ }
729
+ let l = ut(r);
730
+ if (l <= 0) {
731
+ let e = r.ownerDocument, t = e.body, n = getComputedStyle(t), i = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, o = Math.abs(r.clientWidth - t.clientWidth - i);
732
+ o <= ht && (a -= o);
733
+ } else l <= ht && (a += l);
734
+ return {
735
+ width: a,
736
+ height: o,
737
+ x: s,
738
+ y: c
739
+ };
740
+ }
741
+ function _t(e, t) {
742
+ let n = H(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = P(e) ? V(e) : T(1);
743
+ return {
744
+ width: e.clientWidth * a.x,
745
+ height: e.clientHeight * a.y,
746
+ x: i * a.x,
747
+ y: r * a.y
748
+ };
749
+ }
750
+ function vt(e, t, n) {
751
+ let r;
752
+ if (t === "viewport") r = gt(e, n);
753
+ else if (t === "document") r = mt(M(e));
754
+ else if (N(t)) r = _t(t, n);
755
+ else {
756
+ let n = ct(e);
757
+ r = {
758
+ x: t.x - n.x,
759
+ y: t.y - n.y,
760
+ width: t.width,
761
+ height: t.height
762
+ };
763
+ }
764
+ return k(r);
765
+ }
766
+ function yt(e, t) {
767
+ let n = z(e);
768
+ return n === t || !N(n) || L(n) ? !1 : R(n).position === "fixed" || yt(n, t);
769
+ }
770
+ function bt(e, t) {
771
+ let n = t.get(e);
772
+ if (n) return n;
773
+ let r = B(e, [], !1).filter((e) => N(e) && A(e) !== "body"), i = null, a = R(e).position === "fixed", o = a ? z(e) : e;
774
+ for (; N(o) && !L(o);) {
775
+ let t = R(o), n = $e(o);
776
+ !n && t.position === "fixed" && (i = null), (a ? !n && !i : !n && t.position === "static" && i && (i.position === "absolute" || i.position === "fixed") || F(o) && !n && yt(e, o)) ? r = r.filter((e) => e !== o) : i = t, o = z(o);
777
+ }
778
+ return t.set(e, r), r;
779
+ }
780
+ function xt(e) {
781
+ let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? Ye(t) ? [] : bt(t, this._c) : [].concat(n), r], o = vt(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
782
+ for (let e = 1; e < a.length; e++) {
783
+ let n = vt(t, a[e], i);
784
+ s = w(n.top, s), c = _e(n.right, c), l = _e(n.bottom, l), u = w(n.left, u);
785
+ }
786
+ return {
787
+ width: c - u,
788
+ height: l - s,
789
+ x: u,
790
+ y: s
791
+ };
792
+ }
793
+ function St(e) {
794
+ let { width: t, height: n } = at(e);
795
+ return {
796
+ width: t,
797
+ height: n
798
+ };
799
+ }
800
+ function Ct(e, t, n) {
801
+ let r = P(t), i = M(t), a = n === "fixed", o = H(e, !0, a, t), s = {
802
+ scrollLeft: 0,
803
+ scrollTop: 0
804
+ }, c = T(0);
805
+ function l() {
806
+ c.x = ut(i);
807
+ }
808
+ if (r || !r && !a) if ((A(t) !== "body" || F(i)) && (s = nt(t)), r) {
809
+ let e = H(t, !0, a, t);
810
+ c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
811
+ } else i && l();
812
+ a && !r && i && l();
813
+ let u = i && !r && !a ? dt(i, s) : T(0);
814
+ return {
815
+ x: o.left + s.scrollLeft - c.x - u.x,
816
+ y: o.top + s.scrollTop - c.y - u.y,
817
+ width: o.width,
818
+ height: o.height
819
+ };
820
+ }
821
+ function wt(e) {
822
+ return R(e).position === "static";
823
+ }
824
+ function Tt(e, t) {
825
+ if (!P(e) || R(e).position === "fixed") return null;
826
+ if (t) return t(e);
827
+ let n = e.offsetParent;
828
+ return M(e) === n && (n = n.ownerDocument.body), n;
829
+ }
830
+ function Et(e, t) {
831
+ let n = j(e);
832
+ if (Ye(e)) return n;
833
+ if (!P(e)) {
834
+ let t = z(e);
835
+ for (; t && !L(t);) {
836
+ if (N(t) && !wt(t)) return t;
837
+ t = z(t);
838
+ }
839
+ return n;
840
+ }
841
+ let r = Tt(e, t);
842
+ for (; r && Je(r) && wt(r);) r = Tt(r, t);
843
+ return r && L(r) && wt(r) && !$e(r) ? n : r || et(e) || n;
844
+ }
845
+ var Dt = async function(e) {
846
+ let t = this.getOffsetParent || Et, n = this.getDimensions, r = await n(e.floating);
847
+ return {
848
+ reference: Ct(e.reference, await t(e.floating), e.strategy),
849
+ floating: {
850
+ x: 0,
851
+ y: 0,
852
+ width: r.width,
853
+ height: r.height
854
+ }
855
+ };
856
+ };
857
+ function Ot(e) {
858
+ return R(e).direction === "rtl";
859
+ }
860
+ var kt = {
861
+ convertOffsetParentRelativeRectToViewportRelativeRect: ft,
862
+ getDocumentElement: M,
863
+ getClippingRect: xt,
864
+ getOffsetParent: Et,
865
+ getElementRects: Dt,
866
+ getClientRects: pt,
867
+ getDimensions: St,
868
+ getScale: V,
869
+ isElement: N,
870
+ isRTL: Ot
871
+ };
872
+ function At(e, t) {
873
+ return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
874
+ }
875
+ function jt(e, t) {
876
+ let n = null, r, i = M(e);
877
+ function a() {
878
+ var e;
879
+ clearTimeout(r), (e = n) == null || e.disconnect(), n = null;
880
+ }
881
+ function o(s, c) {
882
+ s === void 0 && (s = !1), c === void 0 && (c = 1), a();
883
+ let l = e.getBoundingClientRect(), { left: u, top: d, width: f, height: p } = l;
884
+ if (s || t(), !f || !p) return;
885
+ let m = ye(d), h = ye(i.clientWidth - (u + f)), g = ye(i.clientHeight - (d + p)), _ = ye(u), v = {
886
+ rootMargin: -m + "px " + -h + "px " + -g + "px " + -_ + "px",
887
+ threshold: w(0, _e(1, c)) || 1
888
+ }, y = !0;
889
+ function b(t) {
890
+ let n = t[0].intersectionRatio;
891
+ if (n !== c) {
892
+ if (!y) return o();
893
+ n ? o(!1, n) : r = setTimeout(() => {
894
+ o(!1, 1e-7);
895
+ }, 1e3);
896
+ }
897
+ n === 1 && !At(l, e.getBoundingClientRect()) && o(), y = !1;
898
+ }
899
+ try {
900
+ n = new IntersectionObserver(b, {
901
+ ...v,
902
+ root: i.ownerDocument
903
+ });
904
+ } catch {
905
+ n = new IntersectionObserver(b, v);
906
+ }
907
+ n.observe(e);
908
+ }
909
+ return o(!0), a;
910
+ }
911
+ function Mt(e, t, n, r) {
912
+ r === void 0 && (r = {});
913
+ let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = ot(e), u = i || a ? [...l ? B(l) : [], ...t ? B(t) : []] : [];
914
+ u.forEach((e) => {
915
+ i && e.addEventListener("scroll", n, { passive: !0 }), a && e.addEventListener("resize", n);
916
+ });
917
+ let d = l && s ? jt(l, n) : null, f = -1, p = null;
918
+ o && (p = new ResizeObserver((e) => {
919
+ let [r] = e;
920
+ r && r.target === l && p && t && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
921
+ var e;
922
+ (e = p) == null || e.observe(t);
923
+ })), n();
924
+ }), l && !c && p.observe(l), t && p.observe(t));
925
+ let m, h = c ? H(e) : null;
926
+ c && g();
927
+ function g() {
928
+ let t = H(e);
929
+ h && !At(h, t) && n(), h = t, m = requestAnimationFrame(g);
930
+ }
931
+ return n(), () => {
932
+ var e;
933
+ u.forEach((e) => {
934
+ i && e.removeEventListener("scroll", n), a && e.removeEventListener("resize", n);
935
+ }), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
936
+ };
937
+ }
938
+ var Nt = We, Pt = Ve, Ft = (e, t, n) => {
939
+ let r = /* @__PURE__ */ new Map(), i = {
940
+ platform: kt,
941
+ ...n
942
+ }, a = {
943
+ ...i.platform,
944
+ _c: r
945
+ };
946
+ return Be(e, t, {
947
+ ...i,
948
+ platform: a
949
+ });
950
+ }, It = /* @__PURE__ */ new WeakMap(), Lt = (e, t) => {
951
+ Rt(e), It.set(e, t);
952
+ }, Rt = (e) => {
953
+ let t = It.get(e);
954
+ t && (t(), It.delete(e));
955
+ }, zt = ({ element: e, activeActions: t, getGridItemById: n, placementItemActionsMenu: r, renderOverlayContent: i, removeItemActionsMenuPopover: o, itemActionsDocumentPopover: s = !0 }) => {
956
+ let c = e.querySelector(".grid-item-actions-popover"), l = e.querySelector(".grid-stack-item-content"), u = n(e.getAttribute("gs-id") ?? "");
957
+ if (t && t.length > 0 && c && (o(e), c = null), !c) {
958
+ let n = document.createDocumentFragment();
959
+ if (a(i(u?.item, t), n), c = n.querySelector(".grid-item-actions-popover"), !c) return;
960
+ e.append(c);
961
+ }
962
+ let d = s ? "absolute" : "fixed", f = Mt(l, c, async () => {
963
+ let { x: e, y: t } = await Ft(l, c, {
964
+ placement: u?.item?.placementActionsMenu ?? r ?? "right-start",
965
+ strategy: d,
966
+ middleware: [Nt(0), Pt({ crossAxis: !1 })]
967
+ });
968
+ c.style.left = `${e}px`, c.style.top = `${t}px`, s || (c.style.position = "fixed", c.style.right = "auto", c.style.bottom = "auto", c.style.margin = "0");
969
+ });
970
+ Lt(c, f), s && c.isConnected && !c.matches(":popover-open") && c.showPopover();
971
+ }, Bt = (e) => {
972
+ let t = e.querySelector(".grid-item-actions-popover");
973
+ t && (Rt(t), t.hasAttribute("popover") && t.matches(":popover-open") && t.hidePopover(), t.remove());
974
+ }, Vt = (e) => e === "ArrowLeft" || e === "ArrowRight" || e === "ArrowUp" || e === "ArrowDown", Ht = ({ key: e, node: t, maxColumns: n, shiftKey: r, ctrlKey: i, metaKey: a }) => {
975
+ let o = {
976
+ ArrowLeft: {
977
+ move: { x: t.x - 1 },
978
+ resize: {
979
+ x: t.x - 1,
980
+ w: t.w + 1
981
+ },
982
+ shrink: { w: t.w - 1 },
983
+ canMove: t.x > 0,
984
+ canResize: t.x > 0,
985
+ canShrink: t.w > 1
986
+ },
987
+ ArrowRight: {
988
+ move: { x: t.x + 1 },
989
+ resize: { w: t.w + 1 },
990
+ shrink: {
991
+ x: t.x + 1,
992
+ w: t.w - 1
993
+ },
994
+ canMove: t.x < n - t.w,
995
+ canResize: t.x + t.w < n,
996
+ canShrink: t.w > 1
997
+ },
998
+ ArrowUp: {
999
+ move: { y: t.y - 1 },
1000
+ resize: {
1001
+ y: t.y - 1,
1002
+ h: t.h + 1
1003
+ },
1004
+ shrink: { h: t.h - 1 },
1005
+ canMove: t.y > 0,
1006
+ canResize: t.y > 0,
1007
+ canShrink: t.h > 1
1008
+ },
1009
+ ArrowDown: {
1010
+ move: { y: t.y + 1 },
1011
+ resize: { h: t.h + 1 },
1012
+ shrink: {
1013
+ y: t.y + 1,
1014
+ h: t.h - 1
1015
+ },
1016
+ canMove: !0,
1017
+ canResize: !0,
1018
+ canShrink: t.h > 1
1019
+ }
1020
+ }[e];
1021
+ if (r && o.canResize) return o.resize;
1022
+ if ((i || a) && o.canShrink) return o.shrink;
1023
+ if (o.canMove) return o.move;
1024
+ }, Ut = ({ event: e, viewMode: t, focusedItemElement: n, activeItemElement: r, gridElement: i, grid: a, columns: o, onDeleteRequest: s, removeItemActionsMenuPopover: c, createItemActionsMenuPopover: l }) => {
1025
+ if (t) return {
1026
+ focusedItemElement: n,
1027
+ activeItemElement: r
1028
+ };
1029
+ let u = n, d = r;
1030
+ if (e.key === "Delete" && n) {
1031
+ let e = n.nextElementSibling ?? n.previousElementSibling;
1032
+ s(n), u = e ?? void 0, u ? requestAnimationFrame(() => u?.focus()) : i.focus(), r === n && (d = void 0);
1033
+ } else if (e.key === "Escape" && n) n.removeAttribute("focused"), c(n), u = void 0, i.focus();
1034
+ else if (e.key === "Enter" && n) e.preventDefault(), e.stopPropagation(), r && (r.removeAttribute("active"), i.removeAttribute("has-active-item"), c(r), d = void 0), i.querySelectorAll(".grid-stack-item").forEach((e) => {
1035
+ e !== n && c(e);
1036
+ }), l(n), requestAnimationFrame(() => {
1037
+ let e = n.querySelector("luzmo-item-grid-item-actions-menu");
1038
+ e && e.focus();
1039
+ });
1040
+ else if (n && a && Vt(e.key)) {
1041
+ e.preventDefault(), e.stopPropagation();
1042
+ let t = n.gridstackNode;
1043
+ if (!t) return {
1044
+ focusedItemElement: u,
1045
+ activeItemElement: d
1046
+ };
1047
+ let r = Ht({
1048
+ key: e.key,
1049
+ node: t,
1050
+ maxColumns: o,
1051
+ shiftKey: e.shiftKey,
1052
+ ctrlKey: e.ctrlKey,
1053
+ metaKey: e.metaKey
1054
+ });
1055
+ r && a.update(n, r);
1056
+ }
1057
+ return {
1058
+ focusedItemElement: u,
1059
+ activeItemElement: d
1060
+ };
1061
+ }, Wt = 16, Gt = 10, U = (e, t) => t >= 1 ? `rgba(${e.r},${e.g},${e.b},1)` : t <= 0 ? `rgba(${e.r},${e.g},${e.b},0)` : `rgba(${e.r},${e.g},${e.b},${t})`, Kt = (e) => [(e?.margins?.[0] ?? Wt) / 2, (e?.margins?.[1] ?? Wt) / 2], qt = (e) => Gt - (e?.margins?.[0] ?? Gt), Jt = (e) => {
1062
+ let n = e?.boxShadow;
1063
+ if (!n) return "";
1064
+ let r = new t(n.color), i = {
1065
+ r: Math.round(r.srgb.r * 255),
1066
+ g: Math.round(r.srgb.g * 255),
1067
+ b: Math.round(r.srgb.b * 255)
1068
+ }, a = e?.margins?.[0] ?? Wt, o = Math.min(a / 10, 2);
1069
+ return n.size === "none" ? "none" : n.size === "S" ? `0 ${o * 2}px ${o * 4}px ${U(i, .16)}, 0 ${o * 2}px ${o * 4}px ${U(i, .23)}` : n.size === "M" ? `0 ${o * 8}px ${o * 16}px ${U(i, .19)}, 0 ${o * 4}px ${o * 4}px ${U(i, .23)}` : n.size === "L" ? `0 ${o * 12}px ${o * 24}px ${U(i, .25)}, 0 ${o * 8}px ${o * 8}px ${U(i, .22)}` : "";
1070
+ }, Yt = (e) => {
1071
+ let t = Jt(e);
1072
+ return /* @__PURE__ */ new Map([
1073
+ ["--grid-font-family", e?.font?.fontFamily],
1074
+ ["--grid-background", e?.background],
1075
+ ["--grid-item-box-shadow", t],
1076
+ ["--grid-item-background", e?.itemsBackground],
1077
+ ["--grid-item-border-color", e?.borders?.["border-color"]],
1078
+ ["--grid-item-border-style", e?.borders?.["border-style"]],
1079
+ ["--grid-item-border-radius", e?.borders?.["border-radius"]],
1080
+ ["--grid-item-border-width", `${e?.borders?.["border-top-width"]}`],
1081
+ ["--grid-item-border-top-width", e?.borders?.["border-top-width"]],
1082
+ ["--grid-item-border-right-width", e?.borders?.["border-right-width"]],
1083
+ ["--grid-item-border-bottom-width", e?.borders?.["border-bottom-width"]],
1084
+ ["--grid-item-border-left-width", e?.borders?.["border-left-width"]]
1085
+ ]);
1086
+ }, Xt = (e) => {
1087
+ let n = e?.itemsBackground ?? e?.background;
1088
+ return n ? new t(n).luminance < .5 : !1;
1089
+ }, Zt = (e, t) => {
1090
+ t && Yt(t).forEach((t, n) => {
1091
+ t ? e.setProperty(n, t) : e.removeProperty(n);
1092
+ });
1093
+ }, Qt = ({ item: e, index: t, initialized: n, viewMode: a, renderItemContent: o, handleMouseover: s, handleMouseout: c, handleFocus: l, handleBlur: u }) => {
1094
+ let p = !a;
1095
+ return i`
1096
+ <div
1097
+ class="luzmo-item-grid-item has-luzmo-viz-item"
1098
+ luzmo-item-grid-item-id=${e.id ?? ""}
1099
+ tabindex="0"
1100
+ role="row"
1101
+ @mouseover=${s}
1102
+ @mouseout=${c}
1103
+ @focus=${l}
1104
+ @blur=${u}
1105
+ >
1106
+ <div
1107
+ class="grid-stack-item-content"
1108
+ role="gridcell"
1109
+ aria-label=${d(f`Grid item ${t + 1}`, { desc: "Accessible label for a grid item with its position" })}
1110
+ >
1111
+ ${p ? i`
1112
+ <div class="grid-item-drag-handle">
1113
+ <luzmo-icon .icon=${r} size="s"></luzmo-icon>
1114
+ </div>
1115
+ ` : i`
1116
+
1117
+ `}
1118
+ ${n ? o(e, t) : i`
1119
+
1120
+ `}
1121
+ </div>
1122
+ </div>
1123
+ `;
1124
+ }, $t = ({ items: e, initialized: t, viewMode: n, fullTheme: r, renderItem: i, renderDependencies: a }) => p(e, (e) => e.id, (e, o) => m([
1125
+ e,
1126
+ t,
1127
+ n,
1128
+ r,
1129
+ ...a
1130
+ ], () => i(e, o))), en = ({ items: e, initialized: t, viewMode: n, fullTheme: r, columns: a, renderItemContent: o, renderDependencies: s, ensureGridItemId: c, handleMouseover: l, handleMouseout: u, handleFocus: f, handleBlur: p }) => {
1131
+ e.forEach((e) => {
1132
+ c(e);
1133
+ });
1134
+ let m = $t({
1135
+ items: e,
1136
+ initialized: t,
1137
+ viewMode: n,
1138
+ fullTheme: r,
1139
+ renderDependencies: s,
1140
+ renderItem: (e, r) => Qt({
1141
+ item: e,
1142
+ index: r,
1143
+ initialized: t,
1144
+ viewMode: n,
1145
+ renderItemContent: o,
1146
+ handleMouseover: l,
1147
+ handleMouseout: u,
1148
+ handleFocus: f,
1149
+ handleBlur: p
1150
+ })
1151
+ });
1152
+ return i`
1153
+ <div
1154
+ ?dark-background=${t ? Xt(r) : !1}
1155
+ class="grid-stack"
1156
+ data-grid-columns=${a}
1157
+ role="grid"
1158
+ aria-label=${d("Dashboard grid", { desc: "Accessible label for the dashboard grid" })}
1159
+ >
1160
+ ${m}
1161
+ </div>
1162
+ `;
1163
+ }, W = class e {
1164
+ static getElements(e, t = document) {
1165
+ if (typeof e == "string") {
1166
+ let n = "getElementById" in t ? t : void 0;
1167
+ if (n && !isNaN(+e[0])) {
1168
+ let t = n.getElementById(e);
1169
+ return t ? [t] : [];
1170
+ }
1171
+ let r = t.querySelectorAll(e);
1172
+ if (!r.length && e[0] !== "." && e[0] !== "#" && (r = t.querySelectorAll("." + e), r.length || (r = t.querySelectorAll("#" + e)), !r.length)) {
1173
+ let n = t.querySelector(`[gs-id="${e}"]`);
1174
+ return n ? [n] : [];
1175
+ }
1176
+ return Array.from(r);
1177
+ }
1178
+ return [e];
1179
+ }
1180
+ static getElement(e, t = document) {
1181
+ if (typeof e == "string") {
1182
+ let n = "getElementById" in t ? t : void 0;
1183
+ if (!e.length) return null;
1184
+ if (n && e[0] === "#") return n.getElementById(e.substring(1));
1185
+ if (e[0] === "#" || e[0] === "." || e[0] === "[") return t.querySelector(e);
1186
+ if (n && !isNaN(+e[0])) return n.getElementById(e);
1187
+ let r = t.querySelector(e);
1188
+ return n && !r && (r = n.getElementById(e)), r ||= t.querySelector("." + e), r;
1189
+ }
1190
+ return e;
1191
+ }
1192
+ static lazyLoad(e) {
1193
+ return !!(e.lazyLoad || e.grid?.opts?.lazyLoad && e.lazyLoad !== !1);
1194
+ }
1195
+ static createDiv(e, t) {
1196
+ let n = document.createElement("div");
1197
+ return e.forEach((e) => {
1198
+ e && n.classList.add(e);
1199
+ }), t?.appendChild(n), n;
1200
+ }
1201
+ static shouldSizeToContent(e, t = !1) {
1202
+ return !!(e?.grid && (t ? e.sizeToContent === !0 || e.grid.opts.sizeToContent === !0 && e.sizeToContent === void 0 : e.sizeToContent || e.grid.opts.sizeToContent && e.sizeToContent !== !1));
1203
+ }
1204
+ static isIntercepted(e, t) {
1205
+ return !(e.y >= t.y + t.h || e.y + e.h <= t.y || e.x + e.w <= t.x || e.x >= t.x + t.w);
1206
+ }
1207
+ static isTouching(t, n) {
1208
+ return e.isIntercepted(t, {
1209
+ x: n.x - .5,
1210
+ y: n.y - .5,
1211
+ w: n.w + 1,
1212
+ h: n.h + 1
1213
+ });
1214
+ }
1215
+ static areaIntercept(e, t) {
1216
+ let n = e.x > t.x ? e.x : t.x, r = e.x + e.w < t.x + t.w ? e.x + e.w : t.x + t.w;
1217
+ if (r <= n) return 0;
1218
+ let i = e.y > t.y ? e.y : t.y, a = e.y + e.h < t.y + t.h ? e.y + e.h : t.y + t.h;
1219
+ return a <= i ? 0 : (r - n) * (a - i);
1220
+ }
1221
+ static area(e) {
1222
+ return e.w * e.h;
1223
+ }
1224
+ static sort(e, t = 1) {
1225
+ let n = 2 ** 53 - 1;
1226
+ return e.sort((e, r) => {
1227
+ let i = t * ((e.y ?? n) - (r.y ?? n));
1228
+ return i === 0 ? t * ((e.x ?? n) - (r.x ?? n)) : i;
1229
+ });
1230
+ }
1231
+ static find(e, t) {
1232
+ return t ? e.find((e) => e.id === t) : void 0;
1233
+ }
1234
+ static findInGrid(t, n, r) {
1235
+ let i = t.engine.nodes.find((e) => String(e.id) === n);
1236
+ if (i || !r) return i;
1237
+ for (let r of t.engine.nodes) if (r.subGrid) {
1238
+ let t = e.findInGrid(r.subGrid, n);
1239
+ if (t) return t;
1240
+ }
1241
+ }
1242
+ static toBool(e) {
1243
+ return typeof e == "boolean" ? e : typeof e == "string" ? (e = e.toLowerCase(), !(e === "" || e === "no" || e === "false" || e === "0")) : !!e;
1244
+ }
1245
+ static toNumber(e) {
1246
+ return e === null || e.length === 0 ? void 0 : Number(e);
1247
+ }
1248
+ static parseHeight(e) {
1249
+ let t, n = "px";
1250
+ if (typeof e == "string") if (e === "auto" || e === "") t = 0;
1251
+ else {
1252
+ let r = e.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%|cm|mm)?$/);
1253
+ if (!r) throw Error(`Invalid height val = ${e}`);
1254
+ n = r[2] || "px", t = parseFloat(r[1]);
1255
+ }
1256
+ else t = e;
1257
+ return {
1258
+ h: t,
1259
+ unit: n
1260
+ };
1261
+ }
1262
+ static defaults(t, ...n) {
1263
+ return n.forEach((n) => {
1264
+ for (let r in n) {
1265
+ if (!Object.prototype.hasOwnProperty.call(n, r)) return;
1266
+ t[r] === null || t[r] === void 0 ? t[r] = n[r] : typeof n[r] == "object" && typeof t[r] == "object" && e.defaults(t[r], n[r]);
1267
+ }
1268
+ }), t;
1269
+ }
1270
+ static same(e, t) {
1271
+ if (typeof e != "object") return e == t;
1272
+ if (typeof e != typeof t) return !1;
1273
+ let n = e, r = t;
1274
+ if (Object.keys(n).length !== Object.keys(r).length) return !1;
1275
+ for (let e in n) if (n[e] !== r[e]) return !1;
1276
+ return !0;
1277
+ }
1278
+ static copyPos(e, t, n = !1) {
1279
+ return t.x !== void 0 && (e.x = t.x), t.y !== void 0 && (e.y = t.y), t.w !== void 0 && (e.w = t.w), t.h !== void 0 && (e.h = t.h), n && (t.minW && (e.minW = t.minW), t.minH && (e.minH = t.minH), t.maxW && (e.maxW = t.maxW), t.maxH && (e.maxH = t.maxH)), e;
1280
+ }
1281
+ static samePos(e, t) {
1282
+ return e && t && e.x === t.x && e.y === t.y && (e.w || 1) === (t.w || 1) && (e.h || 1) === (t.h || 1);
1283
+ }
1284
+ static sanitizeMinMax(e) {
1285
+ e.minW || delete e.minW, e.minH || delete e.minH, e.maxW || delete e.maxW, e.maxH || delete e.maxH;
1286
+ }
1287
+ static removeInternalAndSame(t, n) {
1288
+ if (typeof t != "object" || typeof n != "object" || !t || !n || Array.isArray(t) || Array.isArray(n)) return;
1289
+ let r = t, i = n;
1290
+ for (let t in r) {
1291
+ let n = r[t], a = i[t];
1292
+ t[0] === "_" || n === a ? delete r[t] : n && typeof n == "object" && a !== void 0 && (e.removeInternalAndSame(n, a), Object.keys(n).length || delete r[t]);
1293
+ }
1294
+ }
1295
+ static removeInternalForSave(e, t = !0) {
1296
+ let n = e;
1297
+ for (let e in n) (e[0] === "_" || n[e] === null || n[e] === void 0) && delete n[e];
1298
+ delete e.grid, t && delete e.el, e.autoPosition || delete e.autoPosition, e.noResize || delete e.noResize, e.noMove || delete e.noMove, e.locked || delete e.locked, (e.w === 1 || e.w === e.minW) && delete e.w, (e.h === 1 || e.h === e.minH) && delete e.h;
1299
+ }
1300
+ static throttle(e, t) {
1301
+ let n = !1;
1302
+ return (...r) => {
1303
+ n || (n = !0, setTimeout(() => {
1304
+ e(...r), n = !1;
1305
+ }, t));
1306
+ };
1307
+ }
1308
+ static removePositioningStyles(e) {
1309
+ let t = e.style;
1310
+ t.position && t.removeProperty("position"), t.left && t.removeProperty("left"), t.top && t.removeProperty("top"), t.width && t.removeProperty("width"), t.height && t.removeProperty("height");
1311
+ }
1312
+ static getScrollElement(t) {
1313
+ if (!t) return document.scrollingElement || document.documentElement;
1314
+ let n = getComputedStyle(t).overflowY;
1315
+ return (n === "auto" || n === "scroll") && t.scrollHeight > t.clientHeight ? t : e.getScrollElement(t.parentElement ?? void 0);
1316
+ }
1317
+ static updateScrollResize(t, n, r) {
1318
+ let i = e.getScrollElement(n), a = i.clientHeight, o = i === e.getScrollElement() ? 0 : i.getBoundingClientRect().top, s = t.clientY - o, c = s < r, l = s > a - r;
1319
+ c ? i.scrollBy({
1320
+ behavior: "smooth",
1321
+ top: s - r
1322
+ }) : l && i.scrollBy({
1323
+ behavior: "smooth",
1324
+ top: r - (a - s)
1325
+ });
1326
+ }
1327
+ static pauseIframePointerEvents(e) {
1328
+ document.querySelectorAll("iframe").forEach((t) => {
1329
+ t.style.pointerEvents = e ? "none" : "";
1330
+ });
1331
+ }
1332
+ static clone(e) {
1333
+ return typeof e != "object" || !e ? e : e instanceof Array ? [...e] : { ...e };
1334
+ }
1335
+ static cloneDeep(t) {
1336
+ let n = [
1337
+ "parentGrid",
1338
+ "el",
1339
+ "grid",
1340
+ "subGrid",
1341
+ "engine"
1342
+ ], r = e.clone(t);
1343
+ for (let i in r) Object.prototype.hasOwnProperty.call(r, i) && typeof r[i] == "object" && i.substring(0, 2) !== "__" && !n.find((e) => e === i) && (r[i] = e.cloneDeep(t[i]));
1344
+ return r;
1345
+ }
1346
+ static cloneNode(e) {
1347
+ let t = e.cloneNode(!0);
1348
+ return t.removeAttribute("id"), t;
1349
+ }
1350
+ static appendTo(t, n) {
1351
+ let r;
1352
+ r = typeof n == "string" ? e.getElement(n) : n, r && r.appendChild(t);
1353
+ }
1354
+ static addElStyles(e, t) {
1355
+ if (t instanceof Object) {
1356
+ let n = e.style;
1357
+ for (let e in t) Object.prototype.hasOwnProperty.call(t, e) && (Array.isArray(t[e]) ? t[e].forEach((t) => {
1358
+ n[e] = t;
1359
+ }) : n[e] = t[e]);
1360
+ }
1361
+ }
1362
+ static initEvent(e, t) {
1363
+ let n = { type: t.type }, r = {
1364
+ button: 0,
1365
+ which: 0,
1366
+ buttons: 1,
1367
+ bubbles: !0,
1368
+ cancelable: !0,
1369
+ target: t.target ? t.target : e.target
1370
+ }, i = e;
1371
+ return [
1372
+ "altKey",
1373
+ "ctrlKey",
1374
+ "metaKey",
1375
+ "shiftKey"
1376
+ ].forEach((e) => n[e] = i[e]), [
1377
+ "pageX",
1378
+ "pageY",
1379
+ "clientX",
1380
+ "clientY",
1381
+ "screenX",
1382
+ "screenY"
1383
+ ].forEach((e) => n[e] = i[e]), {
1384
+ ...n,
1385
+ ...r
1386
+ };
1387
+ }
1388
+ static simulateMouseEvent(e, t, n) {
1389
+ let r = e, i = new MouseEvent(t, {
1390
+ bubbles: !0,
1391
+ composed: !0,
1392
+ cancelable: !0,
1393
+ view: window,
1394
+ detail: 1,
1395
+ screenX: e.screenX,
1396
+ screenY: e.screenY,
1397
+ clientX: e.clientX,
1398
+ clientY: e.clientY,
1399
+ ctrlKey: r.ctrlKey ?? !1,
1400
+ altKey: r.altKey ?? !1,
1401
+ shiftKey: r.shiftKey ?? !1,
1402
+ metaKey: r.metaKey ?? !1,
1403
+ button: 0,
1404
+ relatedTarget: e.target
1405
+ });
1406
+ (n || e.target).dispatchEvent(i);
1407
+ }
1408
+ static getValuesFromTransformedElement(t) {
1409
+ let n = document.createElement("div");
1410
+ e.addElStyles(n, {
1411
+ opacity: "0",
1412
+ position: "fixed",
1413
+ top: "0px",
1414
+ left: "0px",
1415
+ width: "1px",
1416
+ height: "1px",
1417
+ zIndex: "-999999"
1418
+ }), t.appendChild(n);
1419
+ let r = n.getBoundingClientRect();
1420
+ return t.removeChild(n), n.remove(), {
1421
+ xScale: 1 / r.width,
1422
+ yScale: 1 / r.height,
1423
+ xOffset: r.left,
1424
+ yOffset: r.top
1425
+ };
1426
+ }
1427
+ static swap(e, t, n) {
1428
+ if (!e) return;
1429
+ let r = e, i = r[t];
1430
+ r[t] = r[n], r[n] = i;
1431
+ }
1432
+ static canBeRotated(e) {
1433
+ return !(!e || e.w === e.h || e.locked || e.noResize || e.grid?.opts.disableResize || e.minW && e.minW === e.maxW || e.minH && e.minH === e.maxH);
1434
+ }
1435
+ }, tn = class e {
1436
+ constructor(e = {}) {
1437
+ this.addedNodes = [], this.removedNodes = [], this.defaultColumn = 12, this.column = e.column || this.defaultColumn, this.column > this.defaultColumn && (this.defaultColumn = this.column), this.maxRow = e.maxRow ?? 0, this._mode = e.mode || "top", this.nodes = e.nodes || [], this.onChange = e.onChange ?? (() => {});
1438
+ }
1439
+ batchUpdate(e = !0, t = !0) {
1440
+ return !!this.batchMode === e ? this : (this.batchMode = e, e ? (this._prevMode = this._mode, this._mode = "float", this.cleanNodes(), this.nodes.some((e) => e._updating) || this.saveInitial()) : (this._mode = this._prevMode || "top", delete this._prevMode, t && this._packNodes(), this._notify()), this);
1441
+ }
1442
+ get _realMode() {
1443
+ return this.batchMode ? this._prevMode || "top" : this.mode;
1444
+ }
1445
+ _useEntireRowArea(e, t) {
1446
+ return (this.mode !== "float" || this.batchMode && this._prevMode !== "float") && !this._hasLocked && (!e._moving || e._skipDown || t.y <= e.y);
1447
+ }
1448
+ _fixCollisions(e, t = e, n, r = {}) {
1449
+ if (this.sortNodes(-1), n ||= this.collide(e, t), !n) return !1;
1450
+ if (e._moving && !e._isExternal && !r.nested && this.mode !== "float" && this.swap(e, n)) return !0;
1451
+ let i = t;
1452
+ !this._loading && this._useEntireRowArea(e, t) && (i = {
1453
+ x: 0,
1454
+ w: this.column,
1455
+ y: t.y,
1456
+ h: t.h
1457
+ }, n = this.collide(e, i, r.skip));
1458
+ let a = !1, o = {
1459
+ nested: !0,
1460
+ pack: !1
1461
+ }, s = 0;
1462
+ for (; n ||= this.collide(e, i, r.skip);) {
1463
+ if (s++ > this.nodes.length * 2) throw Error("Infinite collide check");
1464
+ let i;
1465
+ if (n.locked || this._loading || e._moving && !e._skipDown && t.y > e.y && this.mode !== "float" && (!this.collide(n, {
1466
+ ...n,
1467
+ y: e.y
1468
+ }, e) || !this.collide(n, {
1469
+ ...n,
1470
+ y: t.y - n.h
1471
+ }, e))) {
1472
+ e._skipDown = e._skipDown || t.y > e.y;
1473
+ let s = {
1474
+ ...t,
1475
+ y: n.y + n.h,
1476
+ ...o
1477
+ };
1478
+ i = this._loading && W.samePos(e, s) ? !0 : this.moveNode(e, s), (n.locked || this._loading) && i ? W.copyPos(t, e) : !n.locked && i && r.pack && (this._packNodes(), t.y = n.y + n.h, W.copyPos(e, t)), a ||= i;
1479
+ } else i = this.moveNode(n, {
1480
+ ...n,
1481
+ y: t.y + t.h,
1482
+ skip: e,
1483
+ ...o
1484
+ });
1485
+ if (!i) return a;
1486
+ n = void 0;
1487
+ }
1488
+ return a;
1489
+ }
1490
+ collide(e, t = e, n) {
1491
+ let r = e._id, i = n?._id;
1492
+ return this.nodes.find((e) => e._id !== r && e._id !== i && W.isIntercepted(e, t));
1493
+ }
1494
+ collideAll(e, t = e, n) {
1495
+ let r = e._id, i = n?._id;
1496
+ return this.nodes.filter((e) => e._id !== r && e._id !== i && W.isIntercepted(e, t));
1497
+ }
1498
+ directionCollideCoverage(e, t, n) {
1499
+ if (!t.rect || !e._rect) return;
1500
+ let r = e._rect, i = { ...t.rect };
1501
+ i.y > r.y ? (i.h = i.h + i.y - r.y, i.y = r.y) : i.h = i.h + r.y - i.y, i.x > r.x ? (i.w = i.w + i.x - r.x, i.x = r.x) : i.w = i.w + r.x - i.x;
1502
+ let a, o = .5;
1503
+ for (let e of n) {
1504
+ if (e.locked || !e._rect) continue;
1505
+ let t = e._rect, n = Number.MAX_VALUE, s = Number.MAX_VALUE;
1506
+ r.y < t.y ? n = (i.y + i.h - t.y) / t.h : r.y + r.h > t.y + t.h && (n = (t.y + t.h - i.y) / t.h), r.x < t.x ? s = (i.x + i.w - t.x) / t.w : r.x + r.w > t.x + t.w && (s = (t.x + t.w - i.x) / t.w);
1507
+ let c = Math.min(s, n);
1508
+ c > o && (o = c, a = e);
1509
+ }
1510
+ return t.collide = a, a;
1511
+ }
1512
+ cacheRects(e, t, n, r, i, a) {
1513
+ return this.nodes.forEach((o) => o._rect = {
1514
+ y: o.y * t + n,
1515
+ x: o.x * e + a,
1516
+ w: o.w * e - a - r,
1517
+ h: o.h * t - n - i
1518
+ }), this;
1519
+ }
1520
+ swap(e, t) {
1521
+ if (!t || t.locked || !e || e.locked) return !1;
1522
+ function n() {
1523
+ let n = t.x, r = t.y;
1524
+ return t.x = e.x, t.y = e.y, e.h == t.h ? e.w == t.w ? (e.x = n, e.y = r) : (e.x = t.x + t.w, e.y = r) : (e.x = n, e.y = t.y + t.h), e._dirty = t._dirty = !0, !0;
1525
+ }
1526
+ let r;
1527
+ if (e.w === t.w && e.h === t.h && (e.x === t.x || e.y === t.y) && (r = W.isTouching(e, t))) return n();
1528
+ if (r !== !1) {
1529
+ if (e.w === t.w && e.x === t.x && (r ||= W.isTouching(e, t))) {
1530
+ if (t.y < e.y) {
1531
+ let n = e;
1532
+ e = t, t = n;
1533
+ }
1534
+ return n();
1535
+ }
1536
+ if (r !== !1) {
1537
+ if (e.h === t.h && e.y === t.y && (r ||= W.isTouching(e, t))) {
1538
+ if (t.x < e.x) {
1539
+ let n = e;
1540
+ e = t, t = n;
1541
+ }
1542
+ return n();
1543
+ }
1544
+ return !1;
1545
+ }
1546
+ }
1547
+ }
1548
+ isAreaEmpty(e, t, n, r) {
1549
+ let i = {
1550
+ x: e || 0,
1551
+ y: t || 0,
1552
+ w: n || 1,
1553
+ h: r || 1
1554
+ };
1555
+ return !this.collide(i);
1556
+ }
1557
+ compact(e = "compact", t = !0) {
1558
+ if (this.nodes.length === 0) return this;
1559
+ let n = this.batchMode;
1560
+ return n || this.batchUpdate(), this._relayout(e, t), n || this.batchUpdate(!1), this;
1561
+ }
1562
+ _relayout(e, t = !0) {
1563
+ if (this.nodes.length === 0) return this;
1564
+ t && this.sortNodes();
1565
+ let n = this._inColumnResize;
1566
+ n || (this._inColumnResize = !0);
1567
+ let r = this.nodes;
1568
+ this.nodes = r.filter((e) => e.locked);
1569
+ let i = /* @__PURE__ */ new Set(), a = 0, o = (e) => {
1570
+ for (let t = e.y; t < e.y + e.h; t++) for (let n = e.x; n < e.x + e.w; n++) i.add(t * this.column + n);
1571
+ for (; i.has(a);) ++a;
1572
+ };
1573
+ return this.nodes.forEach(o), r.forEach((t, n, r) => {
1574
+ if (t.locked) return;
1575
+ t.autoPosition = !0;
1576
+ let i = e === "list" ? n ? r[n - 1] : 0 : a;
1577
+ this.addNode(t, !1, i), o(t);
1578
+ }), n || delete this._inColumnResize, this;
1579
+ }
1580
+ set mode(e) {
1581
+ this._mode !== e && (this._mode = e || "top", this._mode !== "float" && this._packNodes()._notify());
1582
+ }
1583
+ get mode() {
1584
+ return this._mode || "top";
1585
+ }
1586
+ sortNodes(e = 1) {
1587
+ return this.nodes = W.sort(this.nodes, e), this;
1588
+ }
1589
+ _packNodes() {
1590
+ if (this.batchMode) return this;
1591
+ if (this.sortNodes(), this.mode === "float") this.nodes.forEach((e) => {
1592
+ if (e._updating || e._orig === void 0 || e.y === e._orig.y) return;
1593
+ let t = e.y;
1594
+ for (; t > e._orig.y;) --t, this.collide(e, {
1595
+ x: e.x,
1596
+ y: t,
1597
+ w: e.w,
1598
+ h: e.h
1599
+ }) || (e._dirty = !0, e.y = t);
1600
+ });
1601
+ else if (this.mode === "list" || this.mode === "compact") {
1602
+ let e = this.mode === "compact" && this.nodes.some((e) => e._updating) ? "list" : this.mode, t = this.batchMode;
1603
+ this.batchMode = !0, this._relayout(e, !1), this.batchMode = t;
1604
+ } else this.nodes.forEach((e, t) => {
1605
+ if (!e.locked) for (; e.y > 0;) {
1606
+ let n = t === 0 ? 0 : e.y - 1;
1607
+ if (!(t === 0 || !this.collide(e, {
1608
+ x: e.x,
1609
+ y: n,
1610
+ w: e.w,
1611
+ h: e.h
1612
+ }))) break;
1613
+ e._dirty = e.y !== n, e.y = n;
1614
+ }
1615
+ });
1616
+ return this;
1617
+ }
1618
+ prepareNode(t, n) {
1619
+ t._id = t._id ?? e._idSeq++;
1620
+ let r = t.id;
1621
+ if (r) {
1622
+ let e = 1;
1623
+ for (; this.nodes.find((e) => e.id === t.id && e !== t);) t.id = r + "_" + e++;
1624
+ }
1625
+ (t.x === void 0 || t.y === void 0 || t.x === null || t.y === null) && (t.autoPosition = !0);
1626
+ let i = {
1627
+ x: 0,
1628
+ y: 0,
1629
+ w: 1,
1630
+ h: 1
1631
+ };
1632
+ return W.defaults(t, i), t.autoPosition || delete t.autoPosition, t.noResize || delete t.noResize, t.noMove || delete t.noMove, W.sanitizeMinMax(t), typeof t.x == "string" && (t.x = Number(t.x)), typeof t.y == "string" && (t.y = Number(t.y)), typeof t.w == "string" && (t.w = Number(t.w)), typeof t.h == "string" && (t.h = Number(t.h)), isNaN(t.x) && (t.x = i.x, t.autoPosition = !0), isNaN(t.y) && (t.y = i.y, t.autoPosition = !0), isNaN(t.w) && (t.w = i.w), isNaN(t.h) && (t.h = i.h), this.nodeBoundFix(t, n), t;
1633
+ }
1634
+ nodeBoundFix(e, t) {
1635
+ let n = e._orig || W.copyPos({}, e);
1636
+ if (e.x !== void 0 && !Number.isFinite(e.x) && (e.x = 0), e.y !== void 0 && !Number.isFinite(e.y) && (e.y = 0), e.w !== void 0 && !Number.isFinite(e.w) && (e.w = 1), e.h !== void 0 && !Number.isFinite(e.h) && (e.h = 1), e.maxW && (e.w = Math.min(e.w || 1, e.maxW)), e.maxH && (e.h = Math.min(e.h || 1, e.maxH)), e.minW && (e.w = Math.max(e.w || 1, e.minW)), e.minH && (e.h = Math.max(e.h || 1, e.minH)), (e.x || 0) + (e.w || 1) > this.column && this.column < this.defaultColumn && !this._inColumnResize && !this.skipCacheUpdate && e._id != null && this.findCacheLayout(e, this.defaultColumn) === -1) {
1637
+ let t = { ...e };
1638
+ t.autoPosition || t.x === void 0 ? (delete t.x, delete t.y) : t.x = Math.min(this.defaultColumn - 1, t.x), t.w = Math.min(this.defaultColumn, t.w || 1), this.cacheOneLayout(t, this.defaultColumn);
1639
+ }
1640
+ return e.w > this.column ? e.w = this.column : e.w < 1 && (e.w = 1), this.maxRow && e.h > this.maxRow ? e.h = this.maxRow : e.h < 1 && (e.h = 1), e.x < 0 && (e.x = 0), e.y < 0 && (e.y = 0), e.x + e.w > this.column && (t ? e.w = this.column - e.x : e.x = this.column - e.w), this.maxRow && e.y + e.h > this.maxRow && (t ? e.h = this.maxRow - e.y : e.y = this.maxRow - e.h), W.samePos(e, n) || (e._dirty = !0), this;
1641
+ }
1642
+ getDirtyNodes(e) {
1643
+ return e ? this.nodes.filter((e) => e._dirty && e._orig && !W.samePos(e, e._orig)) : this.nodes.filter((e) => e._dirty);
1644
+ }
1645
+ _notify(e) {
1646
+ if (this.batchMode || !this.onChange) return this;
1647
+ let t = (e || []).concat(this.getDirtyNodes());
1648
+ return this.onChange(t), this;
1649
+ }
1650
+ cleanNodes() {
1651
+ return this.batchMode || this.nodes.forEach((e) => {
1652
+ delete e._dirty, delete e._lastTried;
1653
+ }), this;
1654
+ }
1655
+ saveInitial() {
1656
+ return this.nodes.forEach((e) => {
1657
+ e._orig = W.copyPos({}, e), delete e._dirty;
1658
+ }), this._hasLocked = this.nodes.some((e) => e.locked), this;
1659
+ }
1660
+ restoreInitial() {
1661
+ return this.nodes.forEach((e) => {
1662
+ !e._orig || W.samePos(e, e._orig) || (W.copyPos(e, e._orig), e._dirty = !0);
1663
+ }), this._notify(), this;
1664
+ }
1665
+ findEmptyPosition(e, t = this.nodes, n = this.column, r) {
1666
+ let i = typeof r == "number" ? r : r ? r.y * n + (r.x + r.w) : 0, a = !1;
1667
+ for (let r = i; !a; ++r) {
1668
+ let i = r % n, o = Math.floor(r / n);
1669
+ if (i + e.w > n) continue;
1670
+ let s = {
1671
+ x: i,
1672
+ y: o,
1673
+ w: e.w,
1674
+ h: e.h
1675
+ };
1676
+ t.find((e) => W.isIntercepted(s, e)) || ((e.x !== i || e.y !== o) && (e._dirty = !0), e.x = i, e.y = o, delete e.autoPosition, a = !0);
1677
+ }
1678
+ return a;
1679
+ }
1680
+ addNode(e, t = !1, n) {
1681
+ let r = this.nodes.find((t) => t._id === e._id);
1682
+ if (r) return r;
1683
+ this._inColumnResize ? this.nodeBoundFix(e) : this.prepareNode(e), delete e._temporaryRemoved, delete e._removeDOM;
1684
+ let i = !1;
1685
+ return e.autoPosition && (n === void 0 && this._realMode === "list" && (n = this.nodes[this.nodes.length - 1]), this.findEmptyPosition(e, this.nodes, this.column, n) && (delete e.autoPosition, i = !0)), !i && (this.mode === "list" || this.mode === "compact") ? (this.nodes.unshift(e), i = !0) : this.nodes.push(e), t && this.addedNodes.push(e), i || this._fixCollisions(e), this.batchMode || this._packNodes()._notify(), e;
1686
+ }
1687
+ removeNode(e, t = !0, n = !1) {
1688
+ return this.nodes.find((t) => t._id === e._id) ? (n && this.removedNodes.push(e), t && (e._removeDOM = !0), this.nodes = this.nodes.filter((t) => t._id !== e._id), e._isAboutToRemove || this._packNodes(), this._notify([e]), this) : this;
1689
+ }
1690
+ removeAll(e = !0, t = !0) {
1691
+ if (delete this._layouts, !this.nodes.length) return this;
1692
+ e && this.nodes.forEach((e) => e._removeDOM = !0);
1693
+ let n = this.nodes;
1694
+ return this.removedNodes = t ? n : [], this.nodes = [], this._notify(n);
1695
+ }
1696
+ moveNodeCheck(t, n) {
1697
+ if (!this.changedPosConstrain(t, n) && !n.forceCollide) return !1;
1698
+ if (n.pack === void 0 && !this.batchMode && (n.pack = !0), !this.maxRow) return this.moveNode(t, n);
1699
+ let r, i = new e({
1700
+ column: this.column,
1701
+ mode: this.mode,
1702
+ nodes: this.nodes.map((e) => e._id === t._id ? (r = { ...e }, r) : { ...e })
1703
+ });
1704
+ if (!r) return !1;
1705
+ let a = i.moveNode(r, n) && i.getRow() <= Math.max(this.getRow(), this.maxRow);
1706
+ if (!a && !n.resizing && n.collide && !t._isExternal) {
1707
+ let e = n.collide.el?.gridstackNode;
1708
+ if (e && this.swap(t, e)) return this._notify(), !0;
1709
+ }
1710
+ return a ? (i.nodes.filter((e) => e._dirty).forEach((e) => {
1711
+ let t = this.nodes.find((t) => t._id === e._id);
1712
+ t && (W.copyPos(t, e), t._dirty = !0);
1713
+ }), this._notify(), !0) : !1;
1714
+ }
1715
+ willItFit(t) {
1716
+ if (delete t._willFitPos, !this.maxRow) return !0;
1717
+ let n = new e({
1718
+ column: this.column,
1719
+ mode: this.mode,
1720
+ nodes: this.nodes.map((e) => ({ ...e }))
1721
+ }), r = { ...t };
1722
+ return this.cleanupNode(r), delete r.el, delete r._id, delete r.content, delete r.grid, n.addNode(r), n.getRow() <= this.maxRow ? (t._willFitPos = W.copyPos({}, r), !0) : !1;
1723
+ }
1724
+ _makeDynamicSubGrid(e, t, n) {
1725
+ if (!n || !e.grid?.opts?.subGridDynamic || e.grid._isTemp || !t.rect || !n._rect) return !1;
1726
+ let r = W.areaIntercept(t.rect, n._rect), i = W.area(t.rect), a = W.area(n._rect);
1727
+ return r / (i < a ? i : a) <= .8 ? !1 : (n.grid.makeSubGrid(n.el, void 0, e), !0);
1728
+ }
1729
+ changedPosConstrain(e, t) {
1730
+ return t.w = t.w || e.w, t.h = t.h || e.h, e.x !== t.x || e.y !== t.y ? !0 : (e.maxW && (t.w = Math.min(t.w, e.maxW)), e.maxH && (t.h = Math.min(t.h, e.maxH)), e.minW && (t.w = Math.max(t.w, e.minW)), e.minH && (t.h = Math.max(t.h, e.minH)), e.w !== t.w || e.h !== t.h);
1731
+ }
1732
+ moveNode(e, t) {
1733
+ if (!e || !t) return !1;
1734
+ let n = !1;
1735
+ t.pack === void 0 && !this.batchMode && (n = t.pack = !0), typeof t.x != "number" && (t.x = e.x), typeof t.y != "number" && (t.y = e.y), typeof t.w != "number" && (t.w = e.w), typeof t.h != "number" && (t.h = e.h);
1736
+ let r = e.w !== t.w || e.h !== t.h, i = W.copyPos({}, e, !0);
1737
+ if (W.copyPos(i, t), this.nodeBoundFix(i, r), W.copyPos(t, i), !t.forceCollide && W.samePos(e, t)) return !1;
1738
+ let a = W.copyPos({}, e);
1739
+ if (this.mode === "list" || this.mode === "compact") {
1740
+ let r = !1;
1741
+ if (e._moving && !t.nested && e.grid?.opts?.subGridDynamic) {
1742
+ let a = this.directionCollideCoverage(e, t, this.collideAll(e, i, t.skip));
1743
+ this._makeDynamicSubGrid(e, t, a) && (r = !0, n && delete t.pack);
1744
+ }
1745
+ if (!r) {
1746
+ e._dirty = !0;
1747
+ let t = a.y * this.column + a.x;
1748
+ W.copyPos(e, i);
1749
+ let n = this.nodes.indexOf(e);
1750
+ n !== -1 && (this.nodes.splice(n, 1), e.y * this.column + e.x < t ? this.nodes.unshift(e) : this.nodes.push(e));
1751
+ }
1752
+ } else {
1753
+ let r = this.collideAll(e, i, t.skip), a = !0;
1754
+ if (r.length) {
1755
+ let o = e._moving && !t.nested, s = o ? this.directionCollideCoverage(e, t, r) : r[0];
1756
+ o && this._makeDynamicSubGrid(e, t, s) && (s = void 0), s ? a = !this._fixCollisions(e, i, s, t) : (a = !1, n && delete t.pack);
1757
+ }
1758
+ a && !W.samePos(e, i) && (e._dirty = !0, W.copyPos(e, i));
1759
+ }
1760
+ return t.pack && this._packNodes()._notify(), !W.samePos(e, a);
1761
+ }
1762
+ getRow() {
1763
+ return this.nodes.reduce((e, t) => Math.max(e, t.y + t.h), 0);
1764
+ }
1765
+ beginUpdate(e) {
1766
+ return e._updating || (e._updating = !0, delete e._skipDown, this.batchMode || this.saveInitial()), this;
1767
+ }
1768
+ endUpdate() {
1769
+ let e = this.nodes.find((e) => e._updating);
1770
+ return e && (delete e._updating, delete e._skipDown, this.mode === "compact" && this._packNodes()._notify()), this;
1771
+ }
1772
+ save(e = !0, t, n) {
1773
+ let r = this._layouts?.length || 0, i;
1774
+ r && (n ? n !== this.column && (i = this._layouts[n]) : this.column !== r - 1 && (i = this._layouts[r - 1]));
1775
+ let a = [];
1776
+ return this.sortNodes(), this.nodes.forEach((n) => {
1777
+ let r = i?.find((e) => e._id === n._id), o = {
1778
+ ...n,
1779
+ ...r || {}
1780
+ };
1781
+ W.removeInternalForSave(o, !e), t && t(n, o), a.push(o);
1782
+ }), a;
1783
+ }
1784
+ layoutsNodesChange(e) {
1785
+ return !this._layouts || this._inColumnResize || this._layouts.forEach((t, n) => {
1786
+ if (!(!t || n === this.column)) if (n < this.column) this._layouts[n] = void 0;
1787
+ else {
1788
+ let r = n / this.column;
1789
+ e.forEach((e) => {
1790
+ if (!e._orig) return;
1791
+ let n = t.find((t) => t._id === e._id);
1792
+ n && (n.y >= 0 && e.y !== e._orig.y && (n.y += e.y - e._orig.y, n.y < 0 && (n.y = 0)), e.x !== e._orig.x && (n.x = Math.round(e.x * r), n.x < 0 && (n.x = 0)), e.w !== e._orig.w && (n.w = Math.round(e.w * r), n.w < 1 && (n.w = 1)));
1793
+ });
1794
+ }
1795
+ }), this;
1796
+ }
1797
+ columnChanged(e, t, n) {
1798
+ if (!this.nodes.length || !t || e === t) return this;
1799
+ n ??= this.mode === "list" || this.mode === "compact" ? this.mode : "moveScale";
1800
+ let r = n === "compact" || n === "list" ? n : void 0;
1801
+ r && this.sortNodes(1), t < e && this.cacheLayout(this.nodes, e), this.batchUpdate();
1802
+ let i = [], a = r ? this.nodes : W.sort(this.nodes, -1);
1803
+ if (t > e && this._layouts) {
1804
+ let n = this._layouts[t] || [], o = this._layouts.length - 1;
1805
+ !n.length && e !== o && this._layouts[o]?.length && (e = o, this._layouts[o].forEach((e) => {
1806
+ let t = a.find((t) => t._id === e._id);
1807
+ t && (!r && !e.autoPosition && (t.x = e.x ?? t.x, t.y = e.y ?? t.y), t.w = e.w ?? t.w, (e.x == null || e.y === void 0) && (t.autoPosition = !0));
1808
+ })), n.forEach((e) => {
1809
+ let t = a.findIndex((t) => t._id === e._id);
1810
+ if (t !== -1) {
1811
+ let n = a[t];
1812
+ if (r) {
1813
+ n.w = e.w;
1814
+ return;
1815
+ }
1816
+ (e.autoPosition || isNaN(e.x) || isNaN(e.y)) && this.findEmptyPosition(e, i), e.autoPosition || (n.x = e.x ?? n.x, n.y = e.y ?? n.y, n.w = e.w ?? n.w, i.push(n)), a.splice(t, 1);
1817
+ }
1818
+ });
1819
+ }
1820
+ if (r) this.compact(r, !1);
1821
+ else {
1822
+ if (a.length) if (typeof n == "function") n(t, e, i, a);
1823
+ else {
1824
+ let o = r || n === "none" ? 1 : t / e, s = n === "move" || n === "moveScale", c = n === "scale" || n === "moveScale";
1825
+ a.forEach((n) => {
1826
+ n.x = t === 1 ? 0 : s ? Math.round(n.x * o) : Math.min(n.x, t - 1), n.w = t === 1 || e === 1 ? 1 : c ? Math.round(n.w * o) || 1 : Math.min(n.w, t), i.push(n);
1827
+ }), a = [];
1828
+ }
1829
+ i = W.sort(i, -1), this._inColumnResize = !0, this.nodes = [], i.forEach((e) => {
1830
+ this.addNode(e, !1), delete e._orig;
1831
+ });
1832
+ }
1833
+ return this.nodes.forEach((e) => delete e._orig), this.batchUpdate(!1, !r), delete this._inColumnResize, this;
1834
+ }
1835
+ cacheLayout(t, n, r = !1) {
1836
+ let i = [];
1837
+ return t.forEach((t, n) => {
1838
+ t._id === void 0 && (t._id = (t.id ? this.nodes.find((e) => e.id === t.id) : void 0)?._id ?? e._idSeq++), i[n] = {
1839
+ x: t.x,
1840
+ y: t.y,
1841
+ w: t.w,
1842
+ _id: t._id
1843
+ };
1844
+ }), this._layouts = r ? [] : this._layouts || [], this._layouts[n] = i, this;
1845
+ }
1846
+ cacheOneLayout(t, n) {
1847
+ t._id = t._id ?? e._idSeq++;
1848
+ let r = {
1849
+ x: t.x,
1850
+ y: t.y,
1851
+ w: t.w,
1852
+ _id: t._id
1853
+ };
1854
+ (t.autoPosition || t.x === void 0) && (delete r.x, delete r.y, t.autoPosition && (r.autoPosition = !0)), this._layouts = this._layouts || [], this._layouts[n] = this._layouts[n] || [];
1855
+ let i = this.findCacheLayout(t, n);
1856
+ return i === -1 ? this._layouts[n].push(r) : this._layouts[n][i] = r, this;
1857
+ }
1858
+ findCacheLayout(e, t) {
1859
+ return this._layouts?.[t]?.findIndex((t) => t._id === e._id) ?? -1;
1860
+ }
1861
+ removeNodeFromLayoutCache(e) {
1862
+ if (this._layouts) for (let t = 0; t < this._layouts.length; t++) {
1863
+ let n = this.findCacheLayout(e, t);
1864
+ n !== -1 && this._layouts[t].splice(n, 1);
1865
+ }
1866
+ }
1867
+ cleanupNode(e) {
1868
+ let t = e;
1869
+ for (let e in t) e[0] === "_" && e !== "_id" && delete t[e];
1870
+ return this;
1871
+ }
1872
+ };
1873
+ tn._idSeq = 0;
1874
+ //#endregion
1875
+ //#region node_modules/gridstack/dist/types.js
1876
+ var G = {
1877
+ alwaysShowResizeHandle: "mobile",
1878
+ animate: !0,
1879
+ auto: !0,
1880
+ cellHeight: "auto",
1881
+ cellHeightThrottle: 100,
1882
+ cellHeightUnit: "px",
1883
+ column: 12,
1884
+ draggable: {
1885
+ handle: ".grid-stack-item-content",
1886
+ appendTo: "body",
1887
+ scroll: !0
1888
+ },
1889
+ handle: ".grid-stack-item-content",
1890
+ itemClass: "grid-stack-item",
1891
+ margin: 10,
1892
+ marginUnit: "px",
1893
+ maxRow: 0,
1894
+ minRow: 0,
1895
+ placeholderClass: "grid-stack-placeholder",
1896
+ placeholderText: "",
1897
+ removableOptions: {
1898
+ accept: "grid-stack-item",
1899
+ decline: "grid-stack-non-removable"
1900
+ },
1901
+ resizable: { handles: "se" },
1902
+ rtl: "auto"
1903
+ }, K = class {}, q = typeof window < "u" && typeof document < "u" && ("ontouchstart" in document || "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch || navigator.maxTouchPoints > 0 && window.matchMedia("(any-pointer: coarse)").matches || navigator.msMaxTouchPoints > 0), nn = 300, rn = 10, J = class {};
1904
+ function Y(e) {
1905
+ e.preventDefault();
1906
+ }
1907
+ function an() {
1908
+ document.addEventListener("contextmenu", Y, !0), document.addEventListener("selectstart", Y, !0);
1909
+ }
1910
+ function on() {
1911
+ document.removeEventListener("contextmenu", Y, !0), document.removeEventListener("selectstart", Y, !0);
1912
+ }
1913
+ function sn(e, t, n) {
1914
+ e.removeEventListener("touchmove", t), e.removeEventListener("touchend", n), e.removeEventListener("touchcancel", n), cn();
1915
+ }
1916
+ function cn() {
1917
+ J.touchDelayTimer && (window.clearTimeout(J.touchDelayTimer), delete J.touchDelayTimer), on();
1918
+ }
1919
+ function ln(e, t) {
1920
+ e.touches.length > 1 || (e.cancelable && e.preventDefault(), W.simulateMouseEvent(e.changedTouches[0], t));
1921
+ }
1922
+ function un(e, t) {
1923
+ e.cancelable && e.preventDefault(), W.simulateMouseEvent(e, t);
1924
+ }
1925
+ function dn(e) {
1926
+ if (J.touchHandled) return;
1927
+ let t = e.currentTarget, n = e.touches[0].clientX, r = e.touches[0].clientY, i = () => sn(t, a, i), a = (e) => {
1928
+ let t = e.touches[0];
1929
+ Math.abs(t.clientX - n) + Math.abs(t.clientY - r) > rn && i();
1930
+ };
1931
+ t.addEventListener("touchmove", a, { passive: !0 }), t.addEventListener("touchend", i, { passive: !0 }), t.addEventListener("touchcancel", i, { passive: !0 }), J.touchDelayTimer = window.setTimeout(() => {
1932
+ sn(t, a, i), J.touchHandled = !0, J.wasDelayed = !0, an(), ln(e, "mousedown"), delete J.wasDelayed;
1933
+ }, nn);
1934
+ }
1935
+ function fn(e) {
1936
+ J.touchHandled && ln(e, "mousemove");
1937
+ }
1938
+ function X(e) {
1939
+ if (!J.touchHandled) return;
1940
+ on(), J.pointerLeaveTimeout && (window.clearTimeout(J.pointerLeaveTimeout), delete J.pointerLeaveTimeout);
1941
+ let t = !!K.dragElement;
1942
+ ln(e, "mouseup"), !t && e.type !== "touchcancel" && ln(e, "click"), J.touchHandled = !1;
1943
+ }
1944
+ function pn(e) {
1945
+ e.pointerType !== "mouse" && e.target.releasePointerCapture(e.pointerId);
1946
+ }
1947
+ function mn(e) {
1948
+ K.dragElement && e.pointerType !== "mouse" && un(e, "mouseenter");
1949
+ }
1950
+ function hn(e) {
1951
+ K.dragElement && e.pointerType !== "mouse" && (J.pointerLeaveTimeout = window.setTimeout(() => {
1952
+ delete J.pointerLeaveTimeout, un(e, "mouseleave");
1953
+ }, 10));
1954
+ }
1955
+ //#endregion
1956
+ //#region node_modules/gridstack/dist/dd-resizable-handle.js
1957
+ var gn = class e {
1958
+ constructor(e, t, n) {
1959
+ this.host = e, this.dir = t, this.option = n, this._mouseDown = this._mouseDown.bind(this), this._mouseMove = this._mouseMove.bind(this), this._mouseUp = this._mouseUp.bind(this), this._keyEvent = this._keyEvent.bind(this), this._init();
1960
+ }
1961
+ _init() {
1962
+ if (this.option.element) try {
1963
+ this.el = this.option.element instanceof HTMLElement ? this.option.element : this.host.querySelector(this.option.element);
1964
+ } catch (e) {
1965
+ this.option.element = void 0, console.error("Query for resizeable handle failed, falling back", e);
1966
+ }
1967
+ return this.el || (this.el = document.createElement("div"), this.host.appendChild(this.el)), this.el.classList.add("ui-resizable-handle"), this.el.classList.add(`${e.prefix}${this.dir}`), this.el.addEventListener("mousedown", this._mouseDown), q && (this.el.addEventListener("touchstart", dn), this.el.addEventListener("pointerdown", pn)), this;
1968
+ }
1969
+ destroy() {
1970
+ return this.mouseDownEvent && this._mouseUp(this.mouseDownEvent), cn(), this.el.removeEventListener("mousedown", this._mouseDown), q && (this.el.removeEventListener("touchstart", dn), this.el.removeEventListener("pointerdown", pn)), this.option.element || this.host.removeChild(this.el), this;
1971
+ }
1972
+ _mouseDown(e) {
1973
+ this.mouseDownEvent = e, document.addEventListener("mousemove", this._mouseMove, {
1974
+ capture: !0,
1975
+ passive: !0
1976
+ }), document.addEventListener("mouseup", this._mouseUp, !0), q && (this.el.addEventListener("touchmove", fn), this.el.addEventListener("touchend", X), this.el.addEventListener("touchcancel", X)), J.wasDelayed && this.el.classList.add("ui-resizable-armed"), e.stopPropagation(), e.preventDefault();
1977
+ }
1978
+ _mouseMove(e) {
1979
+ let t = this.mouseDownEvent;
1980
+ this.moving ? this._triggerEvent("move", e) : Math.abs(e.x - t.x) + Math.abs(e.y - t.y) > 2 && (this.moving = !0, this.el.classList.remove("ui-resizable-armed"), this._triggerEvent("start", this.mouseDownEvent), this._triggerEvent("move", e), document.addEventListener("keydown", this._keyEvent)), e.stopPropagation();
1981
+ }
1982
+ _mouseUp(e) {
1983
+ this.moving && (this._triggerEvent("stop", e), document.removeEventListener("keydown", this._keyEvent)), this.el.classList.remove("ui-resizable-armed"), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), q && (this.el.removeEventListener("touchmove", fn), this.el.removeEventListener("touchend", X), this.el.removeEventListener("touchcancel", X)), delete this.moving, delete this.mouseDownEvent, e.stopPropagation(), e.preventDefault();
1984
+ }
1985
+ _keyEvent(e) {
1986
+ e.key === "Escape" && (this.host.gridstackNode?.grid?.engine.restoreInitial(), this._mouseUp(this.mouseDownEvent));
1987
+ }
1988
+ _triggerEvent(e, t) {
1989
+ let n = this.option;
1990
+ return n[e] && n[e](t), this;
1991
+ }
1992
+ };
1993
+ gn.prefix = "ui-resizable-";
1994
+ //#endregion
1995
+ //#region node_modules/gridstack/dist/dd-base-impl.js
1996
+ var _n = class {
1997
+ constructor() {
1998
+ this._eventRegister = {};
1999
+ }
2000
+ get disabled() {
2001
+ return this._disabled;
2002
+ }
2003
+ on(e, t) {
2004
+ this._eventRegister[e] = t;
2005
+ }
2006
+ off(e) {
2007
+ delete this._eventRegister[e];
2008
+ }
2009
+ enable() {
2010
+ this._disabled = !1;
2011
+ }
2012
+ disable() {
2013
+ this._disabled = !0;
2014
+ }
2015
+ destroy() {
2016
+ this._eventRegister = {};
2017
+ }
2018
+ triggerEvent(e, t) {
2019
+ if (!this.disabled && this._eventRegister[e]) return this._eventRegister[e](t);
2020
+ }
2021
+ }, vn = class e extends _n {
2022
+ constructor(e, t = {}) {
2023
+ super(), this.el = e, this.option = t, this.rectScale = {
2024
+ x: 1,
2025
+ y: 1
2026
+ }, this._ui = () => {
2027
+ let e = this.el.parentElement.getBoundingClientRect(), t = {
2028
+ width: this.originalRect.width,
2029
+ height: this.originalRect.height + this.scrolled,
2030
+ left: this.originalRect.left,
2031
+ right: this.originalRect.right,
2032
+ top: this.originalRect.top - this.scrolled
2033
+ }, n = this.temporalRect || t;
2034
+ return {
2035
+ position: {
2036
+ left: this.option.rtl ? (e.right - n.right) * this.rectScale.x : (n.left - e.left) * this.rectScale.x,
2037
+ top: (n.top - e.top) * this.rectScale.y
2038
+ },
2039
+ size: {
2040
+ width: n.width * this.rectScale.x,
2041
+ height: n.height * this.rectScale.y
2042
+ }
2043
+ };
2044
+ }, this._mouseOver = this._mouseOver.bind(this), this._mouseOut = this._mouseOut.bind(this), this.enable(), this._setupAutoHide(!!this.option.autoHide), this._setupHandlers();
2045
+ }
2046
+ on(e, t) {
2047
+ super.on(e, t);
2048
+ }
2049
+ off(e) {
2050
+ super.off(e);
2051
+ }
2052
+ enable() {
2053
+ super.enable(), this.el.classList.remove("ui-resizable-disabled"), this._setupAutoHide(!!this.option.autoHide);
2054
+ }
2055
+ disable() {
2056
+ super.disable(), this.el.classList.add("ui-resizable-disabled"), this._setupAutoHide(!1);
2057
+ }
2058
+ destroy() {
2059
+ K.resizeElement === this && delete K.resizeElement, this._removeHandlers(), this._setupAutoHide(!1), delete this.el, super.destroy();
2060
+ }
2061
+ updateOption(e) {
2062
+ let t = e.handles && e.handles !== this.option.handles, n = e.autoHide && e.autoHide !== this.option.autoHide;
2063
+ return Object.assign(this.option, e), t && (this._removeHandlers(), this._setupHandlers()), n && this._setupAutoHide(!!this.option.autoHide), this;
2064
+ }
2065
+ _setupAutoHide(e) {
2066
+ return e ? (this.el.classList.add("ui-resizable-autohide"), this.el.addEventListener("mouseover", this._mouseOver), this.el.addEventListener("mouseout", this._mouseOut)) : (this.el.classList.remove("ui-resizable-autohide"), this.el.removeEventListener("mouseover", this._mouseOver), this.el.removeEventListener("mouseout", this._mouseOut), K.overResizeElement === this && delete K.overResizeElement), this;
2067
+ }
2068
+ _mouseOver(e) {
2069
+ K.overResizeElement || K.dragElement || (K.overResizeElement = this, K.resizeElement || this.el.classList.remove("ui-resizable-autohide"));
2070
+ }
2071
+ _mouseOut(e) {
2072
+ K.overResizeElement === this && (delete K.overResizeElement, this.el.classList.add("ui-resizable-autohide"));
2073
+ }
2074
+ _setupHandlers() {
2075
+ return this.handlers = (this.option.handles ?? "se").split(",").map((e) => e.trim()).map((e) => new gn(this.el, e, {
2076
+ element: this.option.element,
2077
+ start: (e) => this._resizeStart(e),
2078
+ stop: (e) => this._resizeStop(e),
2079
+ move: (t) => this._resizing(t, e)
2080
+ })), this;
2081
+ }
2082
+ _resizeStart(e) {
2083
+ this.sizeToContent = W.shouldSizeToContent(this.el.gridstackNode, !0), this.originalRect = this.el.getBoundingClientRect(), this.scrollEl = W.getScrollElement(this.el), this.scrollY = this.scrollEl.scrollTop, this.scrolled = 0, this.startEvent = e, W.pauseIframePointerEvents(!0), this._setupHelper(), this._applyChange();
2084
+ let t = W.initEvent(e, {
2085
+ type: "resizestart",
2086
+ target: this.el
2087
+ });
2088
+ return K.resizeElement = this, this.option.start && this.option.start(t, this._ui()), this.el.classList.add("ui-resizable-resizing"), this.triggerEvent("resizestart", t), this;
2089
+ }
2090
+ _resizing(e, t) {
2091
+ this.scrolled = this.scrollEl.scrollTop - this.scrollY, this.temporalRect = this._getChange(e, t), this._applyChange();
2092
+ let n = W.initEvent(e, {
2093
+ type: "resize",
2094
+ target: this.el
2095
+ });
2096
+ return n.resizeDir = t, n.hasMovedX = this.option.rtl ? t.includes("e") : t.includes("w"), n.hasMovedY = t.includes("n"), this.option.resize && this.option.resize(n, this._ui()), this.triggerEvent("resize", n), this;
2097
+ }
2098
+ _resizeStop(e) {
2099
+ let t = W.initEvent(e, {
2100
+ type: "resizestop",
2101
+ target: this.el
2102
+ });
2103
+ return W.pauseIframePointerEvents(!1), this._cleanHelper(), this.option.stop && this.option.stop(t), this.el.classList.remove("ui-resizable-resizing"), K.resizeElement === this && delete K.resizeElement, !K.resizeElement && K.overResizeElement && K.overResizeElement.el.classList.remove("ui-resizable-autohide"), this.triggerEvent("resizestop", t), delete this.startEvent, delete this.originalRect, delete this.temporalRect, delete this.scrollY, delete this.scrolled, this;
2104
+ }
2105
+ _setupHelper() {
2106
+ this.elOriginStyleVal = e._originStyleProp.map((e) => this.el.style[e]);
2107
+ let t = this.el.parentElement;
2108
+ this.parentOriginStylePosition = t.style.position;
2109
+ let n = W.getValuesFromTransformedElement(t);
2110
+ return this.rectScale = {
2111
+ x: n.xScale,
2112
+ y: n.yScale
2113
+ }, getComputedStyle(t).position.match(/static/) && (t.style.position = "relative"), this.el.style.position = "absolute", this.el.style.opacity = "0.8", this;
2114
+ }
2115
+ _cleanHelper() {
2116
+ return e._originStyleProp.forEach((e, t) => {
2117
+ this.el.style[e] = this.elOriginStyleVal[t] || null;
2118
+ }), this.el.parentElement.style.position = this.parentOriginStylePosition || null, this;
2119
+ }
2120
+ _getChange(e, t) {
2121
+ let n = this.startEvent, r = {
2122
+ width: this.originalRect.width,
2123
+ height: this.originalRect.height + this.scrolled,
2124
+ left: this.originalRect.left,
2125
+ right: this.originalRect.right,
2126
+ top: this.originalRect.top - this.scrolled
2127
+ }, i = e.clientX - n.clientX, a = this.sizeToContent ? 0 : e.clientY - n.clientY, o = !1, s = !1, c = this.option.rtl;
2128
+ !c && t.indexOf("e") > -1 ? r.width += i : c && t.indexOf("w") > -1 ? r.width -= i : !c && t.indexOf("w") > -1 ? (r.width -= i, r.left += i, o = !0) : c && t.indexOf("e") > -1 && (r.width += i, r.right += i, o = !0), t.indexOf("s") > -1 ? r.height += a : t.indexOf("n") > -1 && (r.height -= a, r.top += a, s = !0);
2129
+ let l = this._constrainSize(r.width, r.height, o, s);
2130
+ return Math.round(r.width) !== Math.round(l.width) && (!c && t.indexOf("w") > -1 ? r.left += r.width - l.width : c && t.indexOf("e") > -1 && (r.right -= r.width - l.width), r.width = l.width), Math.round(r.height) !== Math.round(l.height) && (t.indexOf("n") > -1 && (r.top += r.height - l.height), r.height = l.height), r;
2131
+ }
2132
+ _constrainSize(e, t, n, r) {
2133
+ let i = this.option, a = (n ? i.maxWidthMoveLeft : i.maxWidth) || 2 ** 53 - 1, o = (i.minWidth ?? 0) / this.rectScale.x || e, s = (r ? i.maxHeightMoveUp : i.maxHeight) || 2 ** 53 - 1, c = (i.minHeight ?? 0) / this.rectScale.y || t;
2134
+ return {
2135
+ width: Math.min(a, Math.max(o, e)),
2136
+ height: Math.min(s, Math.max(c, t))
2137
+ };
2138
+ }
2139
+ _applyChange() {
2140
+ let e = {
2141
+ left: 0,
2142
+ right: 0,
2143
+ top: 0,
2144
+ width: 0,
2145
+ height: 0
2146
+ };
2147
+ if (this.el.style.position === "absolute") {
2148
+ let { left: t, right: n, top: r } = this.el.parentElement.getBoundingClientRect();
2149
+ e = {
2150
+ left: t,
2151
+ right: n,
2152
+ top: r,
2153
+ width: 0,
2154
+ height: 0
2155
+ };
2156
+ }
2157
+ if (!this.temporalRect) return this;
2158
+ let t = e;
2159
+ return Object.entries(this.temporalRect).forEach(([n, r]) => {
2160
+ if (this.option.rtl ? n === "left" : n === "right") return;
2161
+ let i = n === "width" || n === "left" || n === "right" ? this.rectScale.x : n === "height" || n === "top" ? this.rectScale.y : 1, a;
2162
+ a = n === "right" ? (e.right - r) * this.rectScale.x + "px" : (r - t[n]) * i + "px", this.el.style[n] = a;
2163
+ }), this;
2164
+ }
2165
+ _removeHandlers() {
2166
+ return this.handlers.forEach((e) => e.destroy()), delete this.handlers, this;
2167
+ }
2168
+ };
2169
+ vn._originStyleProp = [
2170
+ "width",
2171
+ "height",
2172
+ "position",
2173
+ "left",
2174
+ "right",
2175
+ "top",
2176
+ "opacity",
2177
+ "zIndex"
2178
+ ];
2179
+ //#endregion
2180
+ //#region node_modules/gridstack/dist/dd-draggable.js
2181
+ var yn = "input,textarea,button,select,option,[contenteditable=\"true\"],.ui-resizable-handle", bn = class e extends _n {
2182
+ constructor(e, t = {}) {
2183
+ super(), this.el = e, this.option = t, this.dragTransform = {
2184
+ xScale: 1,
2185
+ yScale: 1,
2186
+ xOffset: 0,
2187
+ yOffset: 0
2188
+ }, this._autoScrollTick = () => {
2189
+ let e = this.helper, t = this._autoScrollContainer;
2190
+ if (!e || !t) {
2191
+ this._stopScrolling();
2192
+ return;
2193
+ }
2194
+ let n = this._getClipping(e, t);
2195
+ if (n === 0) {
2196
+ this._stopScrolling();
2197
+ return;
2198
+ }
2199
+ if (!this._autoScrollMaxSpeed) {
2200
+ let e = window.innerHeight || document.documentElement.clientHeight;
2201
+ this._autoScrollMaxSpeed = Math.max(e / 150, 4);
2202
+ }
2203
+ let r = Math.min(Math.abs(n) * .5, this._autoScrollMaxSpeed), i = n > 0 ? r : -r, a = t.scrollTop;
2204
+ if (t.scrollTop += i, t.scrollTop === a) {
2205
+ this._stopScrolling();
2206
+ return;
2207
+ }
2208
+ this.dragging && this.lastDrag && (this._dragFollow(this.lastDrag), this._callDrag(this.lastDrag)), this._autoScrollAnimId = requestAnimationFrame(this._autoScrollTick);
2209
+ };
2210
+ let n = t?.handle?.substring(1), r = e.gridstackNode;
2211
+ this.dragEls = !n || e.classList.contains(n) ? [e] : r?.subGrid ? [e.querySelector(t.handle) || e] : this.getAllHandles(), this.dragEls.length === 0 && (this.dragEls = [e]), this._mouseDown = this._mouseDown.bind(this), this._mouseMove = this._mouseMove.bind(this), this._mouseUp = this._mouseUp.bind(this), this._keyEvent = this._keyEvent.bind(this), this.enable();
2212
+ }
2213
+ getAllHandles() {
2214
+ let e = this.option.handle;
2215
+ if (!e) return [];
2216
+ let t = [], n = (r) => {
2217
+ t.push(...Array.from(r.querySelectorAll(e))), r.querySelectorAll("*").forEach((e) => {
2218
+ let t = e.shadowRoot;
2219
+ t && n(t);
2220
+ });
2221
+ };
2222
+ return n(this.el), t.filter((e) => {
2223
+ if (!(e instanceof HTMLElement)) return !1;
2224
+ let t = e.closest(".grid-stack-item"), n = e.getRootNode();
2225
+ for (; !t && n instanceof ShadowRoot;) t = n.host.closest(".grid-stack-item"), n = n.host.getRootNode();
2226
+ return t === this.el || !t;
2227
+ });
2228
+ }
2229
+ on(e, t) {
2230
+ super.on(e, t);
2231
+ }
2232
+ off(e) {
2233
+ super.off(e);
2234
+ }
2235
+ enable() {
2236
+ this.disabled !== !1 && (super.enable(), this.dragEls.forEach((e) => {
2237
+ e.addEventListener("mousedown", this._mouseDown), q && (e.addEventListener("touchstart", dn), e.addEventListener("pointerdown", pn));
2238
+ }), this.el.classList.remove("ui-draggable-disabled"));
2239
+ }
2240
+ disable(e = !1) {
2241
+ this.disabled !== !0 && (super.disable(), cn(), this.dragEls.forEach((e) => {
2242
+ e.removeEventListener("mousedown", this._mouseDown), q && (e.removeEventListener("touchstart", dn), e.removeEventListener("pointerdown", pn));
2243
+ }), e || this.el.classList.add("ui-draggable-disabled"));
2244
+ }
2245
+ destroy() {
2246
+ this.dragTimeout && window.clearTimeout(this.dragTimeout), delete this.dragTimeout, this.mouseDownEvent && this._mouseUp(this.mouseDownEvent), this.disable(!0), delete this.el, delete this.option, super.destroy();
2247
+ }
2248
+ updateOption(e) {
2249
+ return Object.assign(this.option, e), this;
2250
+ }
2251
+ refreshHandles() {
2252
+ let e = this.disabled;
2253
+ e || this.disable(!0);
2254
+ let t = this.option?.handle?.substring(1), n = this.el.gridstackNode;
2255
+ this.dragEls = !t || this.el.classList.contains(t) ? [this.el] : n?.subGrid ? [this.el.querySelector(this.option.handle) || this.el] : this.getAllHandles(), this.dragEls.length === 0 && (this.dragEls = [this.el]), e || this.enable();
2256
+ }
2257
+ _mouseDown(e) {
2258
+ if (e.isTrusted && (J.touchHandled &&= !1, K.mouseHandled && e.timeStamp !== K.mouseHandledTimeStamp && delete K.mouseHandled), K.mouseHandled || e.button !== 0) return !0;
2259
+ let t = e.target.closest(yn);
2260
+ return t && !this.dragEls.some((n) => n === e.target || n === t) || this.option.cancel && e.target.closest(this.option.cancel) ? !0 : (this.mouseDownEvent = e, delete this.dragging, delete K.dragElement, delete K.dropElement, delete this._autoScrollMaxSpeed, delete this._autoScrollContainer, document.addEventListener("mousemove", this._mouseMove, {
2261
+ capture: !0,
2262
+ passive: !0
2263
+ }), document.addEventListener("mouseup", this._mouseUp, !0), q && e.currentTarget && (e.currentTarget.addEventListener("touchmove", fn), e.currentTarget.addEventListener("touchend", X), e.currentTarget.addEventListener("touchcancel", X)), J.wasDelayed && this.el.classList.add("ui-draggable-armed"), e.preventDefault(), document.activeElement && document.activeElement.blur(), K.mouseHandled = !0, K.mouseHandledTimeStamp = e.timeStamp, !0);
2264
+ }
2265
+ _callDrag(e) {
2266
+ if (!this.dragging) return;
2267
+ let t = W.initEvent(e, {
2268
+ target: this.el,
2269
+ type: "drag"
2270
+ });
2271
+ this.option.drag && this.option.drag(t, this.ui()), this.triggerEvent("drag", t);
2272
+ }
2273
+ _mouseMove(e) {
2274
+ let t = this.mouseDownEvent;
2275
+ if (this.lastDrag = e, this.dragging) if (this._dragFollow(e), K.pauseDrag) {
2276
+ let t = Number.isInteger(K.pauseDrag) ? K.pauseDrag : 100;
2277
+ this.dragTimeout && window.clearTimeout(this.dragTimeout), this.dragTimeout = window.setTimeout(() => this._callDrag(e), t);
2278
+ } else this._callDrag(e);
2279
+ else if (Math.abs(e.x - t.x) + Math.abs(e.y - t.y) > 3) {
2280
+ this.dragging = !0, W.pauseIframePointerEvents(!0), this.el.classList.remove("ui-draggable-armed"), K.dragElement = this;
2281
+ let t = this.el.gridstackNode?.grid;
2282
+ t ? K.dropElement = t.el.ddElement?.ddDroppable : delete K.dropElement, this.helper = this._createHelper(), this._setupHelperContainmentStyle(), this.dragTransform = W.getValuesFromTransformedElement(this.helperContainment), this.dragOffset = this._getDragOffset(e, this.el, this.helperContainment), this._setupHelperStyle(e);
2283
+ let n = W.initEvent(e, {
2284
+ target: this.el,
2285
+ type: "dragstart"
2286
+ });
2287
+ this.option.start && this.option.start(n, this.ui()), this.triggerEvent("dragstart", n), document.addEventListener("keydown", this._keyEvent);
2288
+ }
2289
+ return !0;
2290
+ }
2291
+ _mouseUp(e) {
2292
+ if (this._stopScrolling(), this.el.classList.remove("ui-draggable-armed"), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), q && e.currentTarget && (e.currentTarget.removeEventListener("touchmove", fn, !0), e.currentTarget.removeEventListener("touchend", X, !0), e.currentTarget.removeEventListener("touchcancel", X, !0)), this.dragging) {
2293
+ delete this.dragging, W.pauseIframePointerEvents(!1), delete this.el.gridstackNode?._origRotate, document.removeEventListener("keydown", this._keyEvent), K.dropElement?.el === this.el.parentElement && delete K.dropElement, this.helperContainment.style.position = this.parentOriginStylePosition || null, this.helper && this.helper !== this.el && this.helper.remove(), this._removeHelperStyle();
2294
+ let t = W.initEvent(e, {
2295
+ target: this.el,
2296
+ type: "dragstop"
2297
+ });
2298
+ this.option.stop && this.option.stop(t), this.triggerEvent("dragstop", t), K.dropElement && K.dropElement.drop(e);
2299
+ }
2300
+ delete this.helper, delete this.mouseDownEvent, delete K.dragElement, delete K.dropElement, delete K.mouseHandled, delete K.mouseHandledTimeStamp, J.touchHandled = !1, e.preventDefault();
2301
+ }
2302
+ _keyEvent(e) {
2303
+ let t = this.el.gridstackNode, n = t?.grid || K.dropElement?.el?.gridstack;
2304
+ if (e.key === "Escape") t && t._origRotate && (t._orig = t._origRotate, delete t._origRotate), n?.cancelDrag(), this._mouseUp(this.mouseDownEvent);
2305
+ else if (t && n && (e.key === "r" || e.key === "R")) {
2306
+ if (!W.canBeRotated(t)) return;
2307
+ t._origRotate = t._origRotate || { ...t._orig }, delete t._moving, n.setAnimation(!1).rotate(t.el, {
2308
+ top: -this.dragOffset.offsetTop,
2309
+ left: -this.dragOffset.offsetX
2310
+ }).setAnimation(), t._moving = !0, this.dragOffset = this._getDragOffset(this.lastDrag, t.el, this.helperContainment), this.helper.style.width = this.dragOffset.width + "px", this.helper.style.height = this.dragOffset.height + "px", W.swap(t._orig, "w", "h"), delete t._rect, this._mouseMove(this.lastDrag);
2311
+ }
2312
+ }
2313
+ _createHelper() {
2314
+ let t = this.el;
2315
+ return typeof this.option.helper == "function" ? t = this.option.helper(this.el) : this.option.helper === "clone" && (t = W.cloneNode(this.el)), t.parentElement || W.appendTo(t, this.option.appendTo === "parent" ? this.el.parentElement : this.option.appendTo ?? "body"), this.dragElementOriginStyle = e.originStyleProp.map((e) => this.el.style[e]), t;
2316
+ }
2317
+ _setupHelperStyle(e) {
2318
+ this.helper.classList.add("ui-draggable-dragging"), this.el.gridstackNode?.grid?.el.classList.add("grid-stack-dragging");
2319
+ let t = this.helper.style;
2320
+ return t.pointerEvents = "none", t.width = this.dragOffset.width + "px", t.height = this.dragOffset.height + "px", t.willChange = "left, right, top", t.position = "fixed", this._dragFollow(e), t.transition = "none", setTimeout(() => {
2321
+ this.helper && (t.transition = null);
2322
+ }, 0), this;
2323
+ }
2324
+ _removeHelperStyle() {
2325
+ if (this.helper.classList.remove("ui-draggable-dragging"), (this.el._gridstackNodeOrig || this.el.gridstackNode)?.grid?.el.classList.remove("grid-stack-dragging"), !this.helper?.gridstackNode?._isAboutToRemove && this.dragElementOriginStyle) {
2326
+ let t = this.helper, n = this.dragElementOriginStyle, r = e.originStyleProp.indexOf("transition"), i = n[r] || null;
2327
+ t.style.transition = n[r] = "none";
2328
+ let a = t.style;
2329
+ e.originStyleProp.forEach((e, t) => a[e] = n[t] || null), setTimeout(() => t.style.transition = i || "", 50);
2330
+ }
2331
+ return delete this.dragElementOriginStyle, this;
2332
+ }
2333
+ _dragFollow(e) {
2334
+ let t = this.helper.style, n = this.dragOffset;
2335
+ this.option.rtl ? (t.right = (window.innerWidth - e.clientX + n.offsetX) * this.dragTransform.xScale + "px", t.left &&= "") : (t.left = (e.clientX + n.offsetX) * this.dragTransform.xScale + "px", t.right &&= ""), t.top = (e.clientY + n.offsetTop) * this.dragTransform.yScale + "px";
2336
+ }
2337
+ _setupHelperContainmentStyle() {
2338
+ return this.helperContainment = this.helper.parentElement, this.helper.style.position !== "fixed" && (this.parentOriginStylePosition = this.helperContainment.style.position, getComputedStyle(this.helperContainment).position.match(/static/) && (this.helperContainment.style.position = "relative")), this;
2339
+ }
2340
+ _getDragOffset(e, t, n) {
2341
+ let r = 0, i = 0;
2342
+ n && (r = this.dragTransform.xOffset, i = this.dragTransform.yOffset);
2343
+ let a = t.getBoundingClientRect(), o = this.option.rtl ? a.right : a.left, s = this.option.rtl ? e.clientX - a.right + r : -e.clientX + a.left - r;
2344
+ return {
2345
+ x: o,
2346
+ top: a.top,
2347
+ offsetX: s,
2348
+ offsetTop: -e.clientY + a.top - i,
2349
+ width: a.width * this.dragTransform.xScale,
2350
+ height: a.height * this.dragTransform.yScale
2351
+ };
2352
+ }
2353
+ updateScrollPosition(e) {
2354
+ this._autoScrollContainer = W.getScrollElement(e), this._getClipping(this.helper, this._autoScrollContainer) === 0 ? this._stopScrolling() : this._autoScrollAnimId ||= requestAnimationFrame(this._autoScrollTick);
2355
+ }
2356
+ _getClipping(e, t) {
2357
+ let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerHeight || document.documentElement.clientHeight;
2358
+ if (n.bottom < r.top || n.top > r.bottom) return 0;
2359
+ let a = n.bottom - Math.min(r.bottom, i), o = n.top - Math.max(r.top, 0);
2360
+ return o < 0 ? o : a > 0 ? a : 0;
2361
+ }
2362
+ _stopScrolling() {
2363
+ this._autoScrollAnimId && (cancelAnimationFrame(this._autoScrollAnimId), delete this._autoScrollAnimId);
2364
+ }
2365
+ ui() {
2366
+ let e = this.el.parentElement.getBoundingClientRect(), t = this.helper.getBoundingClientRect(), n = this.option.rtl ? (e.right - t.right) * this.dragTransform.xScale : (t.left - e.left) * this.dragTransform.xScale;
2367
+ return { position: {
2368
+ top: (t.top - e.top) * this.dragTransform.yScale,
2369
+ left: n
2370
+ } };
2371
+ }
2372
+ };
2373
+ bn.originStyleProp = [
2374
+ "width",
2375
+ "height",
2376
+ "transform",
2377
+ "transform-origin",
2378
+ "transition",
2379
+ "pointerEvents",
2380
+ "position",
2381
+ "left",
2382
+ "right",
2383
+ "top",
2384
+ "minWidth",
2385
+ "willChange"
2386
+ ];
2387
+ //#endregion
2388
+ //#region node_modules/gridstack/dist/dd-droppable.js
2389
+ var xn = class extends _n {
2390
+ constructor(e, t = {}) {
2391
+ super(), this.el = e, this.option = t, this._mouseEnter = this._mouseEnter.bind(this), this._mouseLeave = this._mouseLeave.bind(this), this.eventEl = this.el.closest(".grid-stack-item") || this.el, this.enable(), this._setupAccept();
2392
+ }
2393
+ on(e, t) {
2394
+ super.on(e, t);
2395
+ }
2396
+ off(e) {
2397
+ super.off(e);
2398
+ }
2399
+ enable() {
2400
+ this.disabled !== !1 && (super.enable(), this.el.classList.add("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), this.eventEl.addEventListener("mouseenter", this._mouseEnter), this.eventEl.addEventListener("mouseleave", this._mouseLeave), q && (this.eventEl.addEventListener("pointerenter", mn), this.eventEl.addEventListener("pointerleave", hn)));
2401
+ }
2402
+ disable(e = !1) {
2403
+ this.disabled !== !0 && (super.disable(), this.el.classList.remove("ui-droppable"), e || this.el.classList.add("ui-droppable-disabled"), this.eventEl.removeEventListener("mouseenter", this._mouseEnter), this.eventEl.removeEventListener("mouseleave", this._mouseLeave), q && (this.eventEl.removeEventListener("pointerenter", mn), this.eventEl.removeEventListener("pointerleave", hn)));
2404
+ }
2405
+ destroy() {
2406
+ this.disable(!0), this.el.classList.remove("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), super.destroy();
2407
+ }
2408
+ updateOption(e) {
2409
+ return Object.assign(this.option, e), this._setupAccept(), this;
2410
+ }
2411
+ _mouseEnter(e) {
2412
+ if (!K.dragElement || J.touchHandled && e.isTrusted || !this._canDrop(K.dragElement.el)) return;
2413
+ e.preventDefault(), e.stopPropagation(), K.dragElement._stopScrolling(), K.dropElement && K.dropElement !== this && K.dropElement._mouseLeave(e, !0), K.dropElement = this;
2414
+ let t = W.initEvent(e, {
2415
+ target: this.el,
2416
+ type: "dropover"
2417
+ });
2418
+ this.option.over && this.option.over(t, this._ui(K.dragElement)), this.triggerEvent("dropover", t), this.el.classList.add("ui-droppable-over");
2419
+ }
2420
+ _mouseLeave(e, t = !1) {
2421
+ if (!K.dragElement || K.dropElement !== this) return;
2422
+ e.preventDefault(), e.stopPropagation(), t && K.dragElement._stopScrolling();
2423
+ let n = W.initEvent(e, {
2424
+ target: this.el,
2425
+ type: "dropout"
2426
+ });
2427
+ if (this.option.out && this.option.out(n, this._ui(K.dragElement)), this.triggerEvent("dropout", n), K.dropElement === this && (delete K.dropElement, !t)) {
2428
+ let t, n = this.el.parentElement;
2429
+ for (; !t && n;) t = n.ddElement?.ddDroppable, n = n.parentElement;
2430
+ t && t._mouseEnter(e);
2431
+ }
2432
+ }
2433
+ drop(e) {
2434
+ e.preventDefault();
2435
+ let t = W.initEvent(e, {
2436
+ target: this.el,
2437
+ type: "drop"
2438
+ });
2439
+ this.option.drop && this.option.drop(t, this._ui(K.dragElement)), this.triggerEvent("drop", t);
2440
+ }
2441
+ _canDrop(e) {
2442
+ return e && (!this.accept || this.accept(e));
2443
+ }
2444
+ _setupAccept() {
2445
+ return this.option.accept && (typeof this.option.accept == "string" ? this.accept = (e) => e.classList.contains(this.option.accept) || e.matches(this.option.accept) : this.accept = this.option.accept), this;
2446
+ }
2447
+ _ui(e) {
2448
+ return {
2449
+ draggable: e.el,
2450
+ ...e.ui()
2451
+ };
2452
+ }
2453
+ }, Sn = class e {
2454
+ static init(t) {
2455
+ return t.ddElement ||= new e(t), t.ddElement;
2456
+ }
2457
+ constructor(e) {
2458
+ this.el = e;
2459
+ }
2460
+ on(e, t) {
2461
+ return this.ddDraggable && [
2462
+ "drag",
2463
+ "dragstart",
2464
+ "dragstop"
2465
+ ].indexOf(e) > -1 ? this.ddDraggable.on(e, t) : this.ddDroppable && [
2466
+ "drop",
2467
+ "dropover",
2468
+ "dropout"
2469
+ ].indexOf(e) > -1 ? this.ddDroppable.on(e, t) : this.ddResizable && [
2470
+ "resizestart",
2471
+ "resize",
2472
+ "resizestop"
2473
+ ].indexOf(e) > -1 && this.ddResizable.on(e, t), this;
2474
+ }
2475
+ off(e) {
2476
+ return this.ddDraggable && [
2477
+ "drag",
2478
+ "dragstart",
2479
+ "dragstop"
2480
+ ].indexOf(e) > -1 ? this.ddDraggable.off(e) : this.ddDroppable && [
2481
+ "drop",
2482
+ "dropover",
2483
+ "dropout"
2484
+ ].indexOf(e) > -1 ? this.ddDroppable.off(e) : this.ddResizable && [
2485
+ "resizestart",
2486
+ "resize",
2487
+ "resizestop"
2488
+ ].indexOf(e) > -1 && this.ddResizable.off(e), this;
2489
+ }
2490
+ setupDraggable(e) {
2491
+ return this.ddDraggable ? this.ddDraggable.updateOption(e) : this.ddDraggable = new bn(this.el, e), this;
2492
+ }
2493
+ cleanDraggable() {
2494
+ return this.ddDraggable && (this.ddDraggable.destroy(), delete this.ddDraggable), this;
2495
+ }
2496
+ setupResizable(e) {
2497
+ return this.ddResizable ? this.ddResizable.updateOption(e) : this.ddResizable = new vn(this.el, e), this;
2498
+ }
2499
+ cleanResizable() {
2500
+ return this.ddResizable && (this.ddResizable.destroy(), delete this.ddResizable), this;
2501
+ }
2502
+ setupDroppable(e) {
2503
+ return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new xn(this.el, e), this;
2504
+ }
2505
+ cleanDroppable() {
2506
+ return this.ddDroppable && (this.ddDroppable.destroy(), delete this.ddDroppable), this;
2507
+ }
2508
+ }, Z = new class {
2509
+ resizable(e, t, n, r) {
2510
+ return this._getDDElements(e, typeof t == "string" ? t : void 0).forEach((e) => {
2511
+ if (t === "disable" || t === "enable") e.ddResizable && e.ddResizable[t]();
2512
+ else if (t === "destroy") e.ddResizable && e.cleanResizable();
2513
+ else if (t === "option") e.setupResizable({ [n]: r });
2514
+ else {
2515
+ let n = e.el.gridstackNode.grid, r = e.el.getAttribute("gs-resize-handles") || n.opts.resizable.handles || "e,s,se";
2516
+ r === "all" && (r = "n,e,s,w,se,sw,ne,nw");
2517
+ let i = !n.opts.alwaysShowResizeHandle, a = t;
2518
+ e.setupResizable({
2519
+ ...n.opts.resizable,
2520
+ handles: r,
2521
+ autoHide: i,
2522
+ start: a.start,
2523
+ stop: a.stop,
2524
+ resize: a.resize,
2525
+ rtl: a.rtl
2526
+ });
2527
+ }
2528
+ }), this;
2529
+ }
2530
+ draggable(e, t, n, r) {
2531
+ return this._getDDElements(e, typeof t == "string" ? t : void 0).forEach((e) => {
2532
+ if (t === "disable" || t === "enable") e.ddDraggable && e.ddDraggable[t]();
2533
+ else if (t === "destroy") e.ddDraggable && e.cleanDraggable();
2534
+ else if (t === "option") e.setupDraggable({ [n]: r });
2535
+ else {
2536
+ let n = e.el.gridstackNode.grid, r = t;
2537
+ e.setupDraggable({
2538
+ ...n.opts.draggable,
2539
+ start: r.start,
2540
+ stop: r.stop,
2541
+ drag: r.drag,
2542
+ rtl: r.rtl
2543
+ });
2544
+ }
2545
+ }), this;
2546
+ }
2547
+ dragIn(e, t) {
2548
+ return this._getDDElements(e).forEach((e) => e.setupDraggable(t)), this;
2549
+ }
2550
+ droppable(e, t, n, r) {
2551
+ if (typeof t != "string") {
2552
+ let e = t;
2553
+ typeof e.accept == "function" && !e._accept && (e._accept = e.accept, e.accept = (t) => e._accept(t));
2554
+ }
2555
+ let i = typeof t == "string" ? t : void 0;
2556
+ return this._getDDElements(e, i).forEach((e) => {
2557
+ t === "disable" || t === "enable" ? e.ddDroppable && e.ddDroppable[t]() : t === "destroy" ? e.ddDroppable && e.cleanDroppable() : t === "option" ? e.setupDroppable({ [n]: r }) : e.setupDroppable(t);
2558
+ }), this;
2559
+ }
2560
+ isDroppable(e) {
2561
+ return !!(e?.ddElement?.ddDroppable && !e.ddElement.ddDroppable.disabled);
2562
+ }
2563
+ isDraggable(e) {
2564
+ return !!(e?.ddElement?.ddDraggable && !e.ddElement.ddDraggable.disabled);
2565
+ }
2566
+ isResizable(e) {
2567
+ return !!(e?.ddElement?.ddResizable && !e.ddElement.ddResizable.disabled);
2568
+ }
2569
+ on(e, t, n) {
2570
+ return this._getDDElements(e).forEach((e) => e.on(t, (e) => {
2571
+ n(e, K.dragElement ? K.dragElement.el : e.target, K.dragElement ? K.dragElement.helper : void 0);
2572
+ })), this;
2573
+ }
2574
+ off(e, t) {
2575
+ return this._getDDElements(e).forEach((e) => e.off(t)), this;
2576
+ }
2577
+ _getDDElements(e, t) {
2578
+ let n = e.gridstack || t !== "destroy" && t !== "disable", r = W.getElements(e);
2579
+ return r.length ? r.map((e) => e.ddElement || (n ? Sn.init(e) : null)).filter((e) => !!e) : [];
2580
+ }
2581
+ }(), Q = class e {
2582
+ static init(t = {}, n = ".grid-stack") {
2583
+ if (typeof document > "u") return null;
2584
+ let r = e.getGridElement(n);
2585
+ return r ? (r.gridstack ||= new e(r, W.cloneDeep(t)), r.gridstack) : (console.error(typeof n == "string" ? "GridStack.initAll() no grid was found with selector \"" + n + "\" - element missing or wrong selector ?\nNote: \".grid-stack\" is required for proper CSS styling and drag/drop, and is the default selector." : "GridStack.init() no grid element was passed."), null);
2586
+ }
2587
+ static initAll(t = {}, n = ".grid-stack") {
2588
+ let r = [];
2589
+ return typeof document > "u" ? r : (e.getGridElements(n).forEach((n) => {
2590
+ n.gridstack ||= new e(n, W.cloneDeep(t)), r.push(n.gridstack);
2591
+ }), r.length === 0 && console.error("GridStack.initAll() no grid was found with selector \"" + n + "\" - element missing or wrong selector ?\nNote: \".grid-stack\" is required for proper CSS styling and drag/drop, and is the default selector."), r);
2592
+ }
2593
+ static addGrid(t, n = {}) {
2594
+ if (!t) return null;
2595
+ let r = t;
2596
+ if (r.gridstack) {
2597
+ let e = r.gridstack;
2598
+ return n && (e.opts = {
2599
+ ...e.opts,
2600
+ ...n
2601
+ }), n.children !== void 0 && e.load(n.children), e;
2602
+ }
2603
+ return (!t.classList.contains("grid-stack") || e.addRemoveCB) && (r = e.addRemoveCB ? e.addRemoveCB(t, n, !0, !0) : W.createDiv(["grid-stack", n.class], t)), e.init(n, r);
2604
+ }
2605
+ static registerEngine(t) {
2606
+ e.engineClass = t;
2607
+ }
2608
+ static _migrateFloat(e) {
2609
+ let t = e.float;
2610
+ t !== void 0 && (e.mode === void 0 && (e.mode = t ? "float" : "top"), delete e.float);
2611
+ }
2612
+ get placeholder() {
2613
+ if (!this._placeholder) {
2614
+ this._placeholder = W.createDiv([
2615
+ this.opts.placeholderClass,
2616
+ G.itemClass,
2617
+ this.opts.itemClass
2618
+ ]);
2619
+ let e = W.createDiv(["placeholder-content"], this._placeholder);
2620
+ this.opts.placeholderText && (e.textContent = this.opts.placeholderText);
2621
+ }
2622
+ return this._placeholder;
2623
+ }
2624
+ constructor(t, n = {}) {
2625
+ this.el = t, this.opts = n, this.animationDelay = 310, this._gsEventHandler = {}, this._extraDragRow = 0, this.dragTransform = {
2626
+ xScale: 1,
2627
+ yScale: 1,
2628
+ xOffset: 0,
2629
+ yOffset: 0
2630
+ }, t.gridstack = this, this.opts = n ||= {}, e._migrateFloat(n), t.classList.contains("grid-stack") || this.el.classList.add("grid-stack"), n.row && (n.minRow = n.maxRow = n.row, delete n.row);
2631
+ let r = W.toNumber(t.getAttribute("gs-row"));
2632
+ n.column === "auto" && delete n.column, n.alwaysShowResizeHandle !== void 0 && (n._alwaysShowResizeHandle = n.alwaysShowResizeHandle);
2633
+ let i = n.columnOpts;
2634
+ if (i) {
2635
+ let e = i.breakpoints;
2636
+ !i.columnWidth && !e?.length ? delete n.columnOpts : (e && e.length > 1 && (e.sort((e, t) => (t.w || 0) - (e.w || 0)), delete i.columnWidth), i.columnMax ??= 12);
2637
+ }
2638
+ let a = {
2639
+ ...W.cloneDeep(G),
2640
+ column: W.toNumber(t.getAttribute("gs-column")) || G.column,
2641
+ minRow: r || W.toNumber(t.getAttribute("gs-min-row")) || G.minRow,
2642
+ maxRow: r || W.toNumber(t.getAttribute("gs-max-row")) || G.maxRow,
2643
+ staticGrid: W.toBool(t.getAttribute("gs-static")) || G.staticGrid,
2644
+ sizeToContent: W.toBool(t.getAttribute("gs-size-to-content")) || void 0,
2645
+ draggable: { handle: (n.handleClass ? "." + n.handleClass : n.handle ? n.handle : "") || G.draggable.handle },
2646
+ removableOptions: {
2647
+ accept: n.itemClass || G.removableOptions.accept,
2648
+ decline: G.removableOptions.decline
2649
+ }
2650
+ };
2651
+ t.getAttribute("gs-animate") && (a.animate = W.toBool(t.getAttribute("gs-animate"))), n = W.defaults(n, a), this._initMargin(), this.checkDynamicColumn(), this._updateColumnVar(n), n.rtl === "auto" && (n.rtl = t.style.direction === "rtl"), n.rtl && this.el.classList.add("grid-stack-rtl");
2652
+ let o = this.el.closest("." + G.itemClass)?.gridstackNode;
2653
+ if (o && (o.subGrid = this, this.parentGridNode = o, this.el.classList.add("grid-stack-nested"), o.el.classList.add("grid-stack-sub-grid")), this._isAutoCellHeight = n.cellHeight === "auto", this._isFillCellHeight = n.cellHeight === "fill", this._isAutoCellHeight || this._isFillCellHeight || n.cellHeight === "initial") this.cellHeight(void 0);
2654
+ else {
2655
+ typeof n.cellHeight == "number" && n.cellHeightUnit && n.cellHeightUnit !== G.cellHeightUnit && (n.cellHeight += n.cellHeightUnit, delete n.cellHeightUnit);
2656
+ let e = n.cellHeight;
2657
+ delete n.cellHeight, this.cellHeight(e);
2658
+ }
2659
+ n.alwaysShowResizeHandle === "mobile" && (n.alwaysShowResizeHandle = q), this._setStaticClass();
2660
+ let s = n.engineClass || e.engineClass || tn;
2661
+ if (this.engine = new s({
2662
+ column: this.getColumn(),
2663
+ mode: n.mode,
2664
+ maxRow: n.maxRow,
2665
+ onChange: (e) => {
2666
+ e.forEach((e) => {
2667
+ let t = e.el;
2668
+ t && (e._removeDOM ? (t && t.remove(), delete e._removeDOM) : this._writePosAttr(t, e));
2669
+ }), this._updateContainerHeight();
2670
+ }
2671
+ }), n.auto && (this.batchUpdate(), this.engine._loading = !0, this.getGridItems().forEach((e) => this._prepareElement(e)), delete this.engine._loading, this.batchUpdate(!1)), n.children) {
2672
+ let e = n.children;
2673
+ delete n.children, e.length && this.load(e);
2674
+ }
2675
+ this.setAnimation(), n.subGridDynamic && !K.pauseDrag && (K.pauseDrag = !0), n.draggable?.pause !== void 0 && (K.pauseDrag = n.draggable.pause), this._setupRemoveDrop(), this._setupAcceptWidget(), this._updateResizeEvent();
2676
+ }
2677
+ _updateColumnVar(e = this.opts) {
2678
+ this.el.classList.add("gs-" + e.column), typeof e.column == "number" && (this.el.style.setProperty("--gs-column-width", `${100 / e.column}%`), this.el.style.setProperty("--gs-columns", String(e.column)));
2679
+ }
2680
+ addWidget(t) {
2681
+ if (!t) return;
2682
+ if (typeof t == "string") {
2683
+ console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");
2684
+ return;
2685
+ }
2686
+ if (t.ELEMENT_NODE) return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"), this.makeWidget(t);
2687
+ let n, r = t;
2688
+ if (r.grid = this, n = r.el ? r.el : e.addRemoveCB ? e.addRemoveCB(this.el, t, !0, !1) : this.createWidgetDivs(r), !n) return;
2689
+ if (r = n.gridstackNode, r && n.parentElement === this.el && this.engine.nodes.find((e) => e._id === r._id)) return n;
2690
+ let i = this._readAttr(n);
2691
+ return W.defaults(t, i), this.engine.prepareNode(t), this.el.appendChild(n), this.makeWidget(n, t), n;
2692
+ }
2693
+ createWidgetDivs(t) {
2694
+ let n = W.createDiv(["grid-stack-item", this.opts.itemClass]), r = W.createDiv(["grid-stack-item-content"], n);
2695
+ return W.lazyLoad(t) ? t.visibleObservable || (t.visibleObservable = new IntersectionObserver(([n]) => {
2696
+ n.isIntersecting && (t.visibleObservable?.disconnect(), delete t.visibleObservable, e.renderCB(r, t), t.grid?.prepareDragDrop(t.el));
2697
+ }), window.setTimeout(() => t.visibleObservable?.observe(n))) : e.renderCB(r, t), n;
2698
+ }
2699
+ makeSubGrid(t, n, r, i = !0) {
2700
+ let a = t.gridstackNode;
2701
+ if (a ||= this.makeWidget(t).gridstackNode, a.subGrid?.el) return a.subGrid;
2702
+ let o, s = this;
2703
+ for (; s && !o;) o = s.opts?.subGridOpts, s = s.parentGridNode?.grid;
2704
+ n = W.cloneDeep({
2705
+ ...this.opts,
2706
+ id: void 0,
2707
+ children: void 0,
2708
+ column: "auto",
2709
+ columnOpts: void 0,
2710
+ layout: "list",
2711
+ subGridOpts: void 0,
2712
+ ...o || {},
2713
+ ...n || a.subGridOpts || {}
2714
+ }), a.subGridOpts = n;
2715
+ let c = !1;
2716
+ n.column === "auto" && (c = !0, n.column = Math.max(a.w || 1, r?.w || 1), delete n.columnOpts);
2717
+ let l = a.el.querySelector(".grid-stack-item-content"), u, d;
2718
+ if (i && (this._removeDD(a.el), d = {
2719
+ ...a,
2720
+ x: 0,
2721
+ y: 0
2722
+ }, W.removeInternalForSave(d), delete d.subGridOpts, a.content && (d.content = a.content, delete a.content), e.addRemoveCB ? u = e.addRemoveCB(this.el, d, !0, !1) || void 0 : (u = W.createDiv(["grid-stack-item"]), u.appendChild(l), l = W.createDiv(["grid-stack-item-content"], a.el)), this.prepareDragDrop(a.el)), r) {
2723
+ let e = c ? n.column : a.w, t = a.h + r.h, i = a.el.style;
2724
+ i.transition = "none", this.update(a.el, {
2725
+ w: e,
2726
+ h: t
2727
+ }), setTimeout(() => i.transition = "");
2728
+ }
2729
+ let f = a.subGrid = e.addGrid(l, n) || void 0;
2730
+ return r?._moving && (f._isTemp = !0), c && (f._autoColumn = !0), i && f.makeWidget(u, d), r && (r._moving ? window.setTimeout(() => W.simulateMouseEvent(r._event, "mouseenter", f.el), 0) : f.makeWidget(a.el, a)), this.resizeToContentCheck(!1, a), f;
2731
+ }
2732
+ removeAsSubGrid(e) {
2733
+ let t = this.parentGridNode?.grid;
2734
+ if (t && (t.batchUpdate(), t.removeWidget(this.parentGridNode.el, !0, !0), this.engine.nodes.forEach((e) => {
2735
+ e.x = (e.x ?? 0) + (this.parentGridNode.x ?? 0), e.y = (e.y ?? 0) + (this.parentGridNode.y ?? 0), this._removeDD(e.el), e.el.remove(), delete e.el.gridstackNode, t.makeWidget(e.el, e);
2736
+ }), t.batchUpdate(!1), this.parentGridNode && delete this.parentGridNode.subGrid, delete this.parentGridNode, e)) {
2737
+ let n = e.el?.gridstackNode;
2738
+ n && n !== e && (n._temporaryRemoved = !0), window.setTimeout(() => {
2739
+ let n = K.dragElement?.lastDrag || e._event;
2740
+ n && W.simulateMouseEvent(n, "mouseenter", t.el);
2741
+ }, 0);
2742
+ }
2743
+ }
2744
+ save(t = !0, n = !1, r = e.saveCB, i) {
2745
+ let a = this.engine.save(t, r, i);
2746
+ if (a.forEach((e) => {
2747
+ if (t && e.el && !e.subGrid && !r) e.content = e.el.querySelector(".grid-stack-item-content")?.innerHTML, e.content || delete e.content;
2748
+ else if (!t && !r && delete e.content, e.subGrid?.el) {
2749
+ let i = e.w || e.subGrid.getColumn(), a = e.subGrid.save(t, n, r, i);
2750
+ e.subGridOpts = n ? a : { children: a }, delete e.subGrid;
2751
+ }
2752
+ delete e.el;
2753
+ }), n) {
2754
+ let e = W.cloneDeep(this.opts);
2755
+ e.marginBottom === e.marginTop && e.marginRight === e.marginLeft && e.marginTop === e.marginRight && (e.margin = e.marginTop, delete e.marginTop, delete e.marginRight, delete e.marginBottom, delete e.marginLeft), e.rtl === (this.el.style.direction === "rtl") && (e.rtl = "auto"), this._isAutoCellHeight && (e.cellHeight = "auto"), this._autoColumn && (e.column = "auto");
2756
+ let t = e._alwaysShowResizeHandle;
2757
+ return delete e._alwaysShowResizeHandle, t === void 0 ? delete e.alwaysShowResizeHandle : e.alwaysShowResizeHandle = t, W.removeInternalAndSame(e, G), e.children = a, e;
2758
+ }
2759
+ return a;
2760
+ }
2761
+ load(t, n = e.addRemoveCB || !0) {
2762
+ t.forEach((e) => {
2763
+ e.w = e.w || e.minW || 1, e.h = e.h || e.minH || 1;
2764
+ }), t = W.sort(t), this.engine.skipCacheUpdate = this._ignoreLayoutsNodeChange = !0;
2765
+ let r = 0;
2766
+ t.forEach((e) => {
2767
+ r = Math.max(r, (e.x || 0) + e.w);
2768
+ }), r > this.engine.defaultColumn && (this.engine.defaultColumn = r);
2769
+ let i = this.getColumn();
2770
+ r > i && (this.engine.nodes.length === 0 && this.responseLayout ? (this.engine.nodes = t, this.engine.columnChanged(r, i, this.responseLayout), t = this.engine.nodes, this.engine.nodes = [], delete this.responseLayout) : this.engine.cacheLayout(t, r, !0));
2771
+ let a = e.addRemoveCB;
2772
+ typeof n == "function" && (e.addRemoveCB = n);
2773
+ let o = [];
2774
+ this.batchUpdate();
2775
+ let s = !this.engine.nodes.length, c = s && this.opts.animate;
2776
+ c && this.setAnimation(!1), !s && n && [...this.engine.nodes].forEach((n) => {
2777
+ n.id && (W.find(t, n.id) || (e.addRemoveCB && e.addRemoveCB(this.el, n, !1, !1), o.push(n), this.removeWidget(n.el, !0, !1)));
2778
+ }), this.engine._loading = !0;
2779
+ let l = [];
2780
+ return this.engine.nodes = this.engine.nodes.filter((e) => e.id && W.find(t, e.id) ? (l.push(e), !1) : !0), t.forEach((e) => {
2781
+ let t = e.id ? W.find(l, e.id) : void 0;
2782
+ if (t) {
2783
+ if (W.shouldSizeToContent(t) && (e.h = t.h), this.engine.nodeBoundFix(e), (e.autoPosition || e.x === void 0 || e.y === void 0) && (e.w = e.w || t.w, e.h = e.h || t.h, this.engine.findEmptyPosition(e)), this.engine.nodes.push(t), W.samePos(t, e) && this.engine.nodes.length > 1 && (this.moveNode(t, {
2784
+ ...e,
2785
+ forceCollide: !0
2786
+ }), W.copyPos(e, t)), this.update(t.el, e), e.subGridOpts?.children) {
2787
+ let n = t.el.querySelector(".grid-stack");
2788
+ n && n.gridstack && n.gridstack.load(e.subGridOpts.children);
2789
+ }
2790
+ } else n && this.addWidget(e);
2791
+ }), delete this.engine._loading, this.engine.removedNodes = o, this.batchUpdate(!1), delete this._ignoreLayoutsNodeChange, delete this.engine.skipCacheUpdate, a ? e.addRemoveCB = a : delete e.addRemoveCB, c && this.setAnimation(!0, !0), this;
2792
+ }
2793
+ batchUpdate(e = !0) {
2794
+ return this.engine.batchUpdate(e), e || (this._updateContainerHeight(), this._triggerRemoveEvent(), this._triggerAddEvent(), this._triggerChangeEvent()), this;
2795
+ }
2796
+ getCellHeight(e = !1) {
2797
+ if (this.opts.cellHeight && this.opts.cellHeight !== "auto" && (!e || !this.opts.cellHeightUnit || this.opts.cellHeightUnit === "px")) return this.opts.cellHeight;
2798
+ if (this.opts.cellHeightUnit === "rem") return this.opts.cellHeight * parseFloat(getComputedStyle(document.documentElement).fontSize);
2799
+ if (this.opts.cellHeightUnit === "em") return this.opts.cellHeight * parseFloat(getComputedStyle(this.el).fontSize);
2800
+ if (this.opts.cellHeightUnit === "cm") return this.opts.cellHeight * (96 / 2.54);
2801
+ if (this.opts.cellHeightUnit === "mm") return this.opts.cellHeight * (96 / 2.54) / 10;
2802
+ let t = this.el.querySelector("." + this.opts.itemClass);
2803
+ if (t) {
2804
+ let e = W.toNumber(t.getAttribute("gs-h")) || 1;
2805
+ return Math.round(t.offsetHeight / e);
2806
+ }
2807
+ let n = parseInt(this.el.getAttribute("gs-current-row") || "0");
2808
+ return n ? Math.round(this.el.getBoundingClientRect().height / n) : this.opts.cellHeight;
2809
+ }
2810
+ cellHeight(e) {
2811
+ if (e !== void 0 && (this._isAutoCellHeight !== (e === "auto") || this._isFillCellHeight !== (e === "fill")) && (this._isAutoCellHeight = e === "auto", this._isFillCellHeight = e === "fill", this._updateResizeEvent()), (e === "initial" || e === "auto" || e === "fill") && (e = void 0), e === void 0 && this._isFillCellHeight) {
2812
+ let t = this.getRow() || this.opts.row || this.opts.maxRow || 1, n = this.el.clientHeight;
2813
+ n > 0 && (e = Math.max(1, n / t));
2814
+ }
2815
+ if (e === void 0) {
2816
+ let t = -this.opts.marginRight - this.opts.marginLeft + this.opts.marginTop + this.opts.marginBottom;
2817
+ e = this.cellWidth() + t;
2818
+ }
2819
+ let t = W.parseHeight(e);
2820
+ return this.opts.cellHeightUnit === t.unit && this.opts.cellHeight === t.h ? this : (this.opts.cellHeightUnit = t.unit, this.opts.cellHeight = t.h, this.el.style.setProperty("--gs-cell-height", `${this.opts.cellHeight}${this.opts.cellHeightUnit}`), this._updateContainerHeight(), this.resizeToContentCheck(), this);
2821
+ }
2822
+ cellWidth() {
2823
+ return this._widthOrContainer() / this.getColumn();
2824
+ }
2825
+ _widthOrContainer(e = !1) {
2826
+ return e && this.opts.columnOpts?.breakpointForWindow ? window.innerWidth : this.el.clientWidth || this.el.parentElement.clientWidth || window.innerWidth;
2827
+ }
2828
+ checkDynamicColumn() {
2829
+ let e = this.opts.columnOpts;
2830
+ if (!e || !e.columnWidth && !e.breakpoints?.length) return !1;
2831
+ let t = this.getColumn(), n = t, r = this._widthOrContainer(!0);
2832
+ if (e.columnWidth) n = Math.min(Math.round(r / e.columnWidth) || 1, e.columnMax);
2833
+ else {
2834
+ n = e.columnMax;
2835
+ let i = 0;
2836
+ for (; i < e.breakpoints.length && r <= e.breakpoints[i].w;) n = e.breakpoints[i++].c || t;
2837
+ }
2838
+ if (n !== t) {
2839
+ let t = e.breakpoints?.find((e) => e.c === n);
2840
+ return this.column(n, t?.layout || e.layout), !0;
2841
+ }
2842
+ return !1;
2843
+ }
2844
+ compact(e = "compact", t = !0) {
2845
+ return this.engine.compact(e, t), this._triggerChangeEvent(), this;
2846
+ }
2847
+ column(e, t) {
2848
+ if (!e || e < 1 || this.opts.column === e) return this;
2849
+ t ??= this.opts.mode === "list" || this.opts.mode === "compact" ? this.opts.mode : "moveScale";
2850
+ let n = this.getColumn();
2851
+ return this.opts.column = e, this.engine ? (this.engine.column = e, this.el.classList.remove("gs-" + n), this._updateColumnVar(), this.engine.columnChanged(n, e, t), (this._isAutoCellHeight || this._isFillCellHeight) && this.cellHeight(), this.resizeToContentCheck(!0), this._ignoreLayoutsNodeChange = !0, this._triggerChangeEvent(), delete this._ignoreLayoutsNodeChange, this) : (this.responseLayout = t, this);
2852
+ }
2853
+ getColumn() {
2854
+ return this.opts.column;
2855
+ }
2856
+ getGridItems() {
2857
+ return Array.from(this.el.children).filter((e) => e.matches("." + this.opts.itemClass) && !e.matches("." + this.opts.placeholderClass));
2858
+ }
2859
+ isIgnoreChangeCB() {
2860
+ return !!this._ignoreLayoutsNodeChange;
2861
+ }
2862
+ destroy(e = !0) {
2863
+ return this.el ? (this.offAll(), this._updateResizeEvent(!0), this.setStatic(!0, !1), this.setAnimation(!1), e ? this.el.parentNode.removeChild(this.el) : (this.removeAll(e), this.el.removeAttribute("gs-current-row")), this.parentGridNode && delete this.parentGridNode.subGrid, delete this.parentGridNode, delete this.opts, delete this._placeholder?.gridstackNode, delete this._placeholder, delete this.engine, delete this.el.gridstack, delete this.el, this) : this;
2864
+ }
2865
+ mode(e) {
2866
+ return this.opts.mode !== e && (this.opts.mode = this.engine.mode = e, this._triggerChangeEvent()), this;
2867
+ }
2868
+ getMode() {
2869
+ return this.engine.mode;
2870
+ }
2871
+ getCellFromPixel(e, t = !1) {
2872
+ let n = this.el.getBoundingClientRect(), r;
2873
+ r = t ? {
2874
+ top: n.top + document.documentElement.scrollTop,
2875
+ left: n.left
2876
+ } : {
2877
+ top: this.el.offsetTop,
2878
+ left: this.el.offsetLeft
2879
+ };
2880
+ let i = e.left - r.left, a = e.top - r.top, o = n.width / this.getColumn(), s = n.height / parseInt(this.el.getAttribute("gs-current-row") || "0");
2881
+ return {
2882
+ x: Math.floor(i / o),
2883
+ y: Math.floor(a / s)
2884
+ };
2885
+ }
2886
+ getRow() {
2887
+ return Math.max(this.engine?.getRow() || 0, this.opts.minRow || 0);
2888
+ }
2889
+ isAreaEmpty(e, t, n, r) {
2890
+ return this.engine.isAreaEmpty(e, t, n, r);
2891
+ }
2892
+ makeWidget(t, n) {
2893
+ let r = e.getElement(t);
2894
+ if (!r || r.gridstackNode) return r;
2895
+ r.parentElement || this.el.appendChild(r), this._prepareElement(r, !0, n);
2896
+ let i = r.gridstackNode;
2897
+ this._updateContainerHeight(), i.subGridOpts && this.makeSubGrid(r, i.subGridOpts, void 0, !1);
2898
+ let a = !1;
2899
+ return this.opts.column === 1 && !this._ignoreLayoutsNodeChange && (a = this._ignoreLayoutsNodeChange = !0), this._triggerAddEvent(), this._triggerChangeEvent(), a && delete this._ignoreLayoutsNodeChange, r;
2900
+ }
2901
+ on(e, t) {
2902
+ return e.indexOf(" ") === -1 ? (e === "change" || e === "added" || e === "removed" || e === "enable" || e === "disable" ? (e === "enable" || e === "disable" ? this._gsEventHandler[e] = (e) => t(e) : this._gsEventHandler[e] = ((e) => {
2903
+ e.detail && t(e, e.detail);
2904
+ }), this.el.addEventListener(e, this._gsEventHandler[e])) : e === "drag" || e === "dragstart" || e === "dragstop" || e === "resizestart" || e === "resize" || e === "resizestop" || e === "dropped" || e === "resizecontent" ? this._gsEventHandler[e] = t : console.error("GridStack.on(" + e + ") event not supported"), this) : (e.split(" ").forEach((e) => this.on(e, t)), this);
2905
+ }
2906
+ off(e) {
2907
+ return e.indexOf(" ") === -1 ? ((e === "change" || e === "added" || e === "removed" || e === "enable" || e === "disable") && this._gsEventHandler[e] && this.el.removeEventListener(e, this._gsEventHandler[e]), delete this._gsEventHandler[e], this) : (e.split(" ").forEach((e) => this.off(e)), this);
2908
+ }
2909
+ offAll() {
2910
+ return Object.keys(this._gsEventHandler).forEach((e) => this.off(e)), this;
2911
+ }
2912
+ removeWidget(t, n = !0, r = !0) {
2913
+ return t ? (e.getElements(t).forEach((t) => {
2914
+ if (t.parentElement && t.parentElement !== this.el) return;
2915
+ let i = t.gridstackNode;
2916
+ i ||= this.engine.nodes.find((e) => t === e.el), i && (n && e.addRemoveCB && e.addRemoveCB(this.el, i, !1, !1), delete t.gridstackNode, this._removeDD(t), this.engine.removeNode(i, n, r), n && t.parentElement && t.remove());
2917
+ }), r && (this._triggerRemoveEvent(), this._triggerChangeEvent()), this) : (console.error("Error: GridStack.removeWidget(undefined) called"), this);
2918
+ }
2919
+ removeAll(t = !0, n = !0) {
2920
+ return this.engine.nodes.forEach((n) => {
2921
+ t && e.addRemoveCB && e.addRemoveCB(this.el, n, !1, !1), delete n.el.gridstackNode, this.opts.staticGrid || this._removeDD(n.el);
2922
+ }), this.engine.removeAll(t, n), n && this._triggerRemoveEvent(), this;
2923
+ }
2924
+ setAnimation(e = this.opts.animate, t) {
2925
+ return t ? setTimeout(() => {
2926
+ this.opts && this.setAnimation(e);
2927
+ }) : e ? this.el.classList.add("grid-stack-animate") : this.el.classList.remove("grid-stack-animate"), this.opts.animate = e, this;
2928
+ }
2929
+ hasAnimationCSS() {
2930
+ return this.el.classList.contains("grid-stack-animate");
2931
+ }
2932
+ setStatic(e, t = !0, n = !0) {
2933
+ return !!this.opts.staticGrid === e ? this : (e ? this.opts.staticGrid = !0 : delete this.opts.staticGrid, this._setupRemoveDrop(), this._setupAcceptWidget(), this.engine.nodes.forEach((r) => {
2934
+ this.prepareDragDrop(r.el), r.subGrid && n && r.subGrid.setStatic(e, t, n);
2935
+ }), t && this._setStaticClass(), this);
2936
+ }
2937
+ updateOptions(t) {
2938
+ let n = this.opts;
2939
+ if (t === n) return this;
2940
+ if (e._migrateFloat(t), t.acceptWidgets !== void 0 && (n.acceptWidgets = t.acceptWidgets, this._setupAcceptWidget()), t.animate !== void 0 && this.setAnimation(t.animate), t.cellHeight && this.cellHeight(t.cellHeight), t.class !== void 0 && t.class !== n.class && (n.class && this.el.classList.remove(n.class), t.class && this.el.classList.add(t.class)), t.columnOpts) {
2941
+ let e = !!this.opts.columnOpts;
2942
+ this.opts.columnOpts = t.columnOpts, e !== !!this.opts.columnOpts && this._updateResizeEvent(), this.checkDynamicColumn();
2943
+ } else t.columnOpts === null && this.opts.columnOpts ? (delete this.opts.columnOpts, this._updateResizeEvent()) : typeof t.column == "number" && this.column(t.column);
2944
+ return t.margin !== void 0 && this.margin(t.margin), t.staticGrid !== void 0 && this.setStatic(t.staticGrid), t.disableDrag !== void 0 && !t.staticGrid && this.enableMove(!t.disableDrag), t.disableResize !== void 0 && !t.staticGrid && this.enableResize(!t.disableResize), t.mode !== void 0 && this.mode(t.mode), t.row === void 0 ? (t.minRow !== void 0 && (n.minRow = t.minRow, this._updateContainerHeight()), t.maxRow !== void 0 && (n.maxRow = this.engine.maxRow = t.maxRow, this.engine.getRow() > t.maxRow && this.compact())) : (n.minRow = n.maxRow = this.engine.maxRow = n.row = t.row, this._updateContainerHeight(), this.engine.getRow() > t.row && this.compact()), t.lazyLoad !== void 0 && (n.lazyLoad = t.lazyLoad), t.children?.length && this.load(t.children), this;
2945
+ }
2946
+ update(t, n) {
2947
+ return e.getElements(t).forEach((t) => {
2948
+ let r = t?.gridstackNode;
2949
+ if (!r) return;
2950
+ let i = {
2951
+ ...W.copyPos({}, r),
2952
+ ...W.cloneDeep(n)
2953
+ };
2954
+ this.engine.nodeBoundFix(i), delete i.autoPosition;
2955
+ let a = [
2956
+ "x",
2957
+ "y",
2958
+ "w",
2959
+ "h"
2960
+ ], o, s = i, c = r;
2961
+ if (a.some((e) => s[e] !== void 0 && s[e] !== c[e])) {
2962
+ o = {};
2963
+ let e = o;
2964
+ a.forEach((t) => {
2965
+ e[t] = s[t] === void 0 ? c[t] : s[t], delete s[t];
2966
+ });
2967
+ }
2968
+ if (!o && (i.minW || i.minH || i.maxW || i.maxH) && (o = {}), i.content !== void 0) {
2969
+ let n = t.querySelector(".grid-stack-item-content");
2970
+ n && n.textContent !== i.content && (r.content = i.content, e.renderCB(n, i), r.subGrid?.el && (n.appendChild(r.subGrid.el), r.subGrid._updateContainerHeight())), delete i.content;
2971
+ }
2972
+ let l = !1, u = !1;
2973
+ for (let e in s) e[0] !== "_" && c[e] !== s[e] && (c[e] = s[e], l = !0, u ||= !this.opts.staticGrid && (e === "noResize" || e === "noMove" || e === "locked"));
2974
+ if (W.sanitizeMinMax(r), o) {
2975
+ let e = o.w !== void 0 && o.w !== r.w;
2976
+ this.moveNode(r, o), e && r.subGrid ? r.subGrid.onResize(this.hasAnimationCSS() ? r.w : void 0) : this.resizeToContentCheck(e, r), r._updating || delete r._orig;
2977
+ }
2978
+ (o || l) && this._writeAttr(t, r), u && this.prepareDragDrop(r.el), e.updateCB && e.updateCB(r);
2979
+ }), this;
2980
+ }
2981
+ moveNode(e, t) {
2982
+ let n = e._updating;
2983
+ n || this.engine.cleanNodes().beginUpdate(e), this.engine.moveNodeCheck(e, t), this._updateContainerHeight(), n || (this._triggerChangeEvent(), this.engine.endUpdate());
2984
+ }
2985
+ resizeToContent(t) {
2986
+ if (!t || (t.classList.remove("size-to-content-max"), !t.clientHeight)) return;
2987
+ let n = t.gridstackNode;
2988
+ if (!n) return;
2989
+ let r = n.grid;
2990
+ if (!r || t.parentElement !== r.el) return;
2991
+ let i = r.getCellHeight(!0);
2992
+ if (!i) return;
2993
+ let a = n.h ? n.h * i : t.clientHeight, o = null;
2994
+ if (n.resizeToContentParent && (o = t.querySelector(n.resizeToContentParent)), o ||= t.querySelector(e.resizeToContentParent), !o) return;
2995
+ let s = t.clientHeight - o.clientHeight, c = n.h ? n.h * i - s : o.clientHeight, l;
2996
+ if (n.subGrid) {
2997
+ l = n.subGrid.getRow() * n.subGrid.getCellHeight(!0);
2998
+ let e = n.subGrid.el.getBoundingClientRect(), r = t.getBoundingClientRect();
2999
+ l += e.top - r.top;
3000
+ } else if (n.subGridOpts?.children?.length) return;
3001
+ else {
3002
+ let t = o.firstElementChild;
3003
+ if (!t) {
3004
+ console.error(`Error: GridStack.resizeToContent() widget id:${n.id} '${e.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);
3005
+ return;
3006
+ }
3007
+ l = t.getBoundingClientRect().height || c;
3008
+ }
3009
+ if (c === l) return;
3010
+ a += l - c;
3011
+ let u = Math.ceil(a / i), d = Number.isInteger(n.sizeToContent) ? n.sizeToContent : 0;
3012
+ d && u > d && (u = d, t.classList.add("size-to-content-max")), n.minH && u < n.minH ? u = n.minH : n.maxH && u > n.maxH && (u = n.maxH), u !== n.h && (r._ignoreLayoutsNodeChange = !0, r.moveNode(n, { h: u }), delete r._ignoreLayoutsNodeChange);
3013
+ }
3014
+ resizeToContentCBCheck(t) {
3015
+ e.resizeToContentCB ? e.resizeToContentCB(t) : this.resizeToContent(t);
3016
+ }
3017
+ rotate(t, n) {
3018
+ return e.getElements(t).forEach((e) => {
3019
+ let t = e.gridstackNode;
3020
+ if (!t || !W.canBeRotated(t)) return;
3021
+ let r = {
3022
+ w: t.h,
3023
+ h: t.w,
3024
+ minH: t.minW,
3025
+ minW: t.minH,
3026
+ maxH: t.maxW,
3027
+ maxW: t.maxH
3028
+ };
3029
+ if (n) {
3030
+ let e = n.left > 0 ? Math.floor(n.left / this.cellWidth()) : 0, i = n.top > 0 ? Math.floor(n.top / this.opts.cellHeight) : 0;
3031
+ r.x = t.x + e - (t.h - (i + 1)), r.y = t.y + i - e;
3032
+ }
3033
+ let i = r;
3034
+ Object.keys(i).forEach((e) => {
3035
+ i[e] === void 0 && delete i[e];
3036
+ });
3037
+ let a = t._orig;
3038
+ this.update(e, r), t._orig = a;
3039
+ }), this;
3040
+ }
3041
+ margin(e) {
3042
+ if (!(typeof e == "string" && e.split(" ").length > 1)) {
3043
+ let t = W.parseHeight(e);
3044
+ if (this.opts.marginUnit === t.unit && this.opts.margin === t.h) return this;
3045
+ }
3046
+ return this.opts.margin = e, this.opts.marginTop = this.opts.marginBottom = this.opts.marginLeft = this.opts.marginRight = void 0, this._initMargin(), this;
3047
+ }
3048
+ getMargin() {
3049
+ return this.opts.margin;
3050
+ }
3051
+ willItFit(e) {
3052
+ return this.engine.willItFit(e);
3053
+ }
3054
+ _triggerChangeEvent() {
3055
+ if (this.engine.batchMode) return this;
3056
+ let e = this.engine.getDirtyNodes(!0);
3057
+ return e && e.length && (this._ignoreLayoutsNodeChange || this.engine.layoutsNodesChange(e), this._triggerEvent("change", e)), this.engine.saveInitial(), this._sortDom(), this._isFillCellHeight && this.cellHeight(), this;
3058
+ }
3059
+ _sortDom() {
3060
+ let e = this.engine.nodes;
3061
+ if (e.forEach((e) => {
3062
+ e.subGrid && e.subGrid._sortDom();
3063
+ }), e.length < 2) return this;
3064
+ this.engine.sortNodes(), e = this.engine.nodes;
3065
+ let t = this.el.children;
3066
+ if (e.some((e, n) => e.el !== t[n])) {
3067
+ let t = this.el.moveBefore?.bind(this.el);
3068
+ e.forEach((e) => {
3069
+ e.el && e.el.parentElement === this.el && (t ? t(e.el, null) : this.el.appendChild(e.el));
3070
+ });
3071
+ }
3072
+ return this;
3073
+ }
3074
+ _triggerAddEvent() {
3075
+ if (this.engine.batchMode) return this;
3076
+ if (this.engine.addedNodes?.length) {
3077
+ this._ignoreLayoutsNodeChange || this.engine.layoutsNodesChange(this.engine.addedNodes), this.engine.addedNodes.forEach((e) => {
3078
+ delete e._dirty;
3079
+ });
3080
+ let e = [...this.engine.addedNodes];
3081
+ this.engine.addedNodes = [], this._triggerEvent("added", e);
3082
+ }
3083
+ return this;
3084
+ }
3085
+ _triggerRemoveEvent() {
3086
+ if (this.engine.batchMode) return this;
3087
+ if (this.engine.removedNodes?.length) {
3088
+ let e = [...this.engine.removedNodes];
3089
+ this.engine.removedNodes = [], this._triggerEvent("removed", e);
3090
+ }
3091
+ return this;
3092
+ }
3093
+ _triggerEvent(e, t) {
3094
+ let n = t ? new CustomEvent(e, {
3095
+ bubbles: !1,
3096
+ detail: t
3097
+ }) : new Event(e), r = this;
3098
+ for (; r.parentGridNode;) r = r.parentGridNode.grid;
3099
+ return r.el.dispatchEvent(n), this;
3100
+ }
3101
+ _updateContainerHeight() {
3102
+ if (!this.engine || this.engine.batchMode) return this;
3103
+ let e = this.parentGridNode, t = this.getRow() + this._extraDragRow, n = this.opts.cellHeight, r = this.opts.cellHeightUnit;
3104
+ if (!n) return this;
3105
+ if (!e && !this.opts.minRow) {
3106
+ let e = W.parseHeight(getComputedStyle(this.el).minHeight);
3107
+ if (e.h > 0 && e.unit === r) {
3108
+ let r = Math.floor(e.h / n);
3109
+ t < r && (t = r);
3110
+ }
3111
+ }
3112
+ return this.el.setAttribute("gs-current-row", String(t)), this.el.style.removeProperty("min-height"), this.el.style.removeProperty("height"), t && (e || !this._isFillCellHeight) && (this.el.style[e ? "minHeight" : "height"] = t * n + r), e && W.shouldSizeToContent(e) && e.grid.resizeToContentCBCheck(e.el), this;
3113
+ }
3114
+ _prepareElement(e, t = !1, n) {
3115
+ n ||= this._readAttr(e), e.gridstackNode = n, n.el = e, n.grid = this, n = this.engine.addNode(n, t), this._writeAttr(e, n), e.classList.add(G.itemClass, this.opts.itemClass);
3116
+ let r = W.shouldSizeToContent(n);
3117
+ return r ? e.classList.add("size-to-content") : e.classList.remove("size-to-content"), r && this.resizeToContentCheck(!1, n), (!W.lazyLoad(n) || !n.visibleObservable) && this.prepareDragDrop(n.el), this;
3118
+ }
3119
+ _writePosAttr(e, t) {
3120
+ if (!t._moving && !t._resizing || this._placeholder === e) {
3121
+ let n = this.opts.rtl ? "right" : "left", r = e.style;
3122
+ r.top = t.y ? t.y === 1 ? "var(--gs-cell-height)" : `calc(${t.y} * var(--gs-cell-height))` : null, r[n] = t.x ? t.x === 1 ? "var(--gs-column-width)" : `calc(${t.x} * var(--gs-column-width))` : null, r.width = t.w > 1 ? `calc(${t.w} * var(--gs-column-width))` : null, r.height = t.h > 1 ? `calc(${t.h} * var(--gs-cell-height))` : null;
3123
+ }
3124
+ return e.style.setProperty("--gs-x", String(t.x || 0)), e.style.setProperty("--gs-y", String(t.y || 0)), e.style.setProperty("--gs-w", String(t.w || 1)), e.style.setProperty("--gs-h", String(t.h || 1)), e.setAttribute("gs-x", String(t.x ?? 0)), e.setAttribute("gs-y", String(t.y ?? 0)), t.w > 1 ? e.setAttribute("gs-w", String(t.w)) : e.removeAttribute("gs-w"), t.h > 1 ? e.setAttribute("gs-h", String(t.h)) : e.removeAttribute("gs-h"), this;
3125
+ }
3126
+ _writeAttr(e, t) {
3127
+ if (!t) return this;
3128
+ this._writePosAttr(e, t);
3129
+ let n = {
3130
+ noResize: "gs-no-resize",
3131
+ noMove: "gs-no-move",
3132
+ locked: "gs-locked",
3133
+ id: "gs-id",
3134
+ sizeToContent: "gs-size-to-content"
3135
+ }, r = t, i = n;
3136
+ for (let t in i) r[t] !== void 0 && r[t] !== null && r[t] !== !1 ? e.setAttribute(i[t], String(r[t])) : e.removeAttribute(i[t]);
3137
+ let a = t.print;
3138
+ return a ? (a.pageBreak ? e.setAttribute("gs-page-break", String(a.pageBreak)) : e.removeAttribute("gs-page-break"), a.hide ? e.classList.add("gs-print-hide") : e.classList.remove("gs-print-hide"), a.orientation ? e.setAttribute("gs-print-orientation", String(a.orientation)) : e.removeAttribute("gs-print-orientation"), a.breakInside ? e.setAttribute("gs-break-inside", String(a.breakInside)) : e.removeAttribute("gs-break-inside")) : (e.removeAttribute("gs-page-break"), e.classList.remove("gs-print-hide"), e.removeAttribute("gs-print-orientation"), e.removeAttribute("gs-break-inside")), this;
3139
+ }
3140
+ _readAttr(e, t = !0) {
3141
+ let n = {};
3142
+ n.x = W.toNumber(e.getAttribute("gs-x")), n.y = W.toNumber(e.getAttribute("gs-y")), n.w = W.toNumber(e.getAttribute("gs-w")), n.h = W.toNumber(e.getAttribute("gs-h")), n.autoPosition = W.toBool(e.getAttribute("gs-auto-position")), n.noResize = W.toBool(e.getAttribute("gs-no-resize")), n.noMove = W.toBool(e.getAttribute("gs-no-move")), n.locked = W.toBool(e.getAttribute("gs-locked"));
3143
+ let r = e.getAttribute("gs-page-break"), i = e.classList.contains("gs-print-hide"), a = e.getAttribute("gs-print-orientation"), o = e.getAttribute("gs-break-inside");
3144
+ (r || i || a || o) && (n.print = {}, r && (n.print.pageBreak = W.toBool(r)), i && (n.print.hide = !0), a && (n.print.orientation = a), o && (n.print.breakInside = W.toBool(o)));
3145
+ let s = e.getAttribute("gs-size-to-content");
3146
+ s && (s === "true" || s === "false" ? n.sizeToContent = W.toBool(s) : n.sizeToContent = parseInt(s, 10)), n.id = e.getAttribute("gs-id") ?? void 0, n.maxW = W.toNumber(e.getAttribute("gs-max-w")), n.minW = W.toNumber(e.getAttribute("gs-min-w")), n.maxH = W.toNumber(e.getAttribute("gs-max-h")), n.minH = W.toNumber(e.getAttribute("gs-min-h")), t && (n.w === 1 && e.removeAttribute("gs-w"), n.h === 1 && e.removeAttribute("gs-h"), n.maxW && e.removeAttribute("gs-max-w"), n.minW && e.removeAttribute("gs-min-w"), n.maxH && e.removeAttribute("gs-max-h"), n.minH && e.removeAttribute("gs-min-h"));
3147
+ let c = n;
3148
+ for (let e in c) n.hasOwnProperty(e) && !c[e] && c[e] !== 0 && e !== "sizeToContent" && delete c[e];
3149
+ return n;
3150
+ }
3151
+ _setStaticClass() {
3152
+ let e = ["grid-stack-static"];
3153
+ return this.opts.staticGrid ? (this.el.classList.add(...e), this.el.setAttribute("gs-static", "true")) : (this.el.classList.remove(...e), this.el.removeAttribute("gs-static")), this;
3154
+ }
3155
+ onResize(e = this.el?.clientWidth, t = this.el?.clientHeight) {
3156
+ if (!e || e === this.prevWidth && t === this.prevHeight || e === this.prevWidth && !this._isFillCellHeight) return this;
3157
+ this.prevWidth = e, this.prevHeight = t, this.batchUpdate();
3158
+ let n = !1;
3159
+ return this._autoColumn && this.parentGridNode ? this.opts.column !== this.parentGridNode.w && (this.column(this.parentGridNode.w, this.opts.layout || "list"), n = !0) : n = this.checkDynamicColumn(), (this._isAutoCellHeight || this._isFillCellHeight) && this.cellHeight(), this.engine.nodes.forEach((e) => {
3160
+ e.subGrid && e.subGrid.onResize();
3161
+ }), this._skipInitialResize || this.resizeToContentCheck(n), delete this._skipInitialResize, this.batchUpdate(!1), this;
3162
+ }
3163
+ resizeToContentCheck(e = !1, t) {
3164
+ if (!this.engine) return;
3165
+ if (e && this.hasAnimationCSS()) {
3166
+ setTimeout(() => this.resizeToContentCheck(!1, t), this.animationDelay);
3167
+ return;
3168
+ }
3169
+ if (t) W.shouldSizeToContent(t) && this.resizeToContentCBCheck(t.el);
3170
+ else if (this.engine.nodes.some((e) => W.shouldSizeToContent(e))) {
3171
+ let e = [...this.engine.nodes];
3172
+ this.batchUpdate(), e.forEach((e) => {
3173
+ W.shouldSizeToContent(e) && this.resizeToContentCBCheck(e.el);
3174
+ }), this._ignoreLayoutsNodeChange = !0, this.batchUpdate(!1), this._ignoreLayoutsNodeChange = !1;
3175
+ }
3176
+ let n = this._gsEventHandler.resizecontent;
3177
+ n && n(new Event("resizecontent"), t ? [t] : this.engine.nodes);
3178
+ }
3179
+ _updateResizeEvent(e = !1) {
3180
+ let t = !this.parentGridNode && (this._isAutoCellHeight || this._isFillCellHeight || this.opts.sizeToContent || this.opts.columnOpts || this.engine.nodes.find((e) => e.sizeToContent));
3181
+ return !e && t && !this.resizeObserver ? (this._sizeThrottle = W.throttle(() => this.onResize(), this.opts.cellHeightThrottle), this.resizeObserver = new ResizeObserver(() => this._sizeThrottle()), this.resizeObserver.observe(this.el), this._skipInitialResize = !0) : (e || !t) && this.resizeObserver && (this.resizeObserver.disconnect(), delete this.resizeObserver, delete this._sizeThrottle), this;
3182
+ }
3183
+ static getElement(e = ".grid-stack-item") {
3184
+ return W.getElement(e);
3185
+ }
3186
+ static getElements(e = ".grid-stack-item") {
3187
+ return W.getElements(e);
3188
+ }
3189
+ static getGridElement(t) {
3190
+ return e.getElement(t);
3191
+ }
3192
+ static getGridElements(e) {
3193
+ return W.getElements(e);
3194
+ }
3195
+ _initMargin() {
3196
+ let e = {
3197
+ h: 0,
3198
+ unit: "px"
3199
+ }, t = 0, n = [];
3200
+ typeof this.opts.margin == "string" && (n = this.opts.margin.split(" ")), n.length === 2 ? (this.opts.marginTop = this.opts.marginBottom = n[0], this.opts.marginLeft = this.opts.marginRight = n[1]) : n.length === 4 ? (this.opts.marginTop = n[0], this.opts.marginRight = n[1], this.opts.marginBottom = n[2], this.opts.marginLeft = n[3]) : (e = W.parseHeight(this.opts.margin), this.opts.marginUnit = e.unit, t = this.opts.margin = e.h);
3201
+ let r = [
3202
+ "marginTop",
3203
+ "marginRight",
3204
+ "marginBottom",
3205
+ "marginLeft"
3206
+ ], i = this.opts;
3207
+ r.forEach((n) => {
3208
+ i[n] === void 0 ? i[n] = t : (e = W.parseHeight(i[n]), i[n] = e.h, delete this.opts.margin);
3209
+ }), this.opts.marginUnit = e.unit, this.opts.marginTop === this.opts.marginBottom && this.opts.marginLeft === this.opts.marginRight && this.opts.marginTop === this.opts.marginRight && (this.opts.margin = this.opts.marginTop);
3210
+ let a = this.el.style;
3211
+ return a.setProperty("--gs-item-margin-top", `${this.opts.marginTop}${this.opts.marginUnit}`), a.setProperty("--gs-item-margin-bottom", `${this.opts.marginBottom}${this.opts.marginUnit}`), a.setProperty("--gs-item-margin-right", `${this.opts.marginRight}${this.opts.marginUnit}`), a.setProperty("--gs-item-margin-left", `${this.opts.marginLeft}${this.opts.marginUnit}`), this;
3212
+ }
3213
+ static getDD() {
3214
+ return Z;
3215
+ }
3216
+ static setupDragIn(e, t, n, r = document) {
3217
+ t?.pause !== void 0 && (K.pauseDrag = t.pause), t = {
3218
+ appendTo: "body",
3219
+ helper: "clone",
3220
+ ...t || {}
3221
+ };
3222
+ let i = t.start, a = t.drag, o = t.stop, s = (e, t, n) => e.dispatchEvent(new CustomEvent(t, {
3223
+ bubbles: !0,
3224
+ detail: {
3225
+ el: e,
3226
+ ui: n
3227
+ }
3228
+ }));
3229
+ (typeof e == "string" ? W.getElements(e, r) : e).forEach((e, r) => {
3230
+ Z.isDraggable(e) || Z.dragIn(e, {
3231
+ ...t,
3232
+ start: (t, n) => {
3233
+ i?.(t, n), s(e, "dragstart", n);
3234
+ },
3235
+ drag: (t, n) => {
3236
+ a?.(t, n), s(e, "drag", n);
3237
+ },
3238
+ stop: (t) => {
3239
+ o?.(t), s(e, "dragstop");
3240
+ }
3241
+ }), n?.[r] && (e.gridstackNode = n[r]);
3242
+ });
3243
+ }
3244
+ movable(t, n) {
3245
+ return this.opts.staticGrid || e.getElements(t).forEach((e) => {
3246
+ let t = e.gridstackNode;
3247
+ t && (n ? delete t.noMove : t.noMove = !0, this.prepareDragDrop(t.el));
3248
+ }), this;
3249
+ }
3250
+ resizable(t, n) {
3251
+ return this.opts.staticGrid || e.getElements(t).forEach((e) => {
3252
+ let t = e.gridstackNode;
3253
+ t && (n ? delete t.noResize : t.noResize = !0, this.prepareDragDrop(t.el));
3254
+ }), this;
3255
+ }
3256
+ disable(e = !0) {
3257
+ return this.opts.staticGrid ? this : (this.enableMove(!1, e), this.enableResize(!1, e), this._triggerEvent("disable"), this);
3258
+ }
3259
+ enable(e = !0) {
3260
+ return this.opts.staticGrid ? this : (this.enableMove(!0, e), this.enableResize(!0, e), this._triggerEvent("enable"), this);
3261
+ }
3262
+ enableMove(e, t = !0) {
3263
+ return this.opts.staticGrid ? this : (e ? delete this.opts.disableDrag : this.opts.disableDrag = !0, this.engine.nodes.forEach((n) => {
3264
+ this.prepareDragDrop(n.el), n.subGrid && t && n.subGrid.enableMove(e, t);
3265
+ }), this);
3266
+ }
3267
+ enableResize(e, t = !0) {
3268
+ return this.opts.staticGrid ? this : (e ? delete this.opts.disableResize : this.opts.disableResize = !0, this.engine.nodes.forEach((n) => {
3269
+ this.prepareDragDrop(n.el), n.subGrid && t && n.subGrid.enableResize(e, t);
3270
+ }), this);
3271
+ }
3272
+ cancelDrag() {
3273
+ let t = K.dragElement?.el;
3274
+ if (t?._gridstackNodeOrig) {
3275
+ let e = t._gridstackNodeOrig, n = e.grid, r = this._placeholder?.gridstackNode;
3276
+ r && (r._isAboutToRemove = !0, this.engine.removeNode(r)), this.engine.restoreInitial(), t.gridstackNode = e, delete t._gridstackNodeOrig, delete K.dropElement, n && (n.engine.addNode(e, !1), n.engine.restoreInitial());
3277
+ return;
3278
+ }
3279
+ let n = this._placeholder?.gridstackNode;
3280
+ n && (n._isExternal ? (n._isAboutToRemove = !0, this.engine.removeNode(n)) : n._isAboutToRemove && e._itemRemoving(n.el, !1), this.engine.restoreInitial());
3281
+ }
3282
+ _removeDD(e) {
3283
+ return Z.draggable(e, "destroy").resizable(e, "destroy"), e.gridstackNode && delete e.gridstackNode._initDD, delete e.ddElement, this;
3284
+ }
3285
+ _setupAcceptWidget() {
3286
+ if (this.opts.staticGrid || !this.opts.acceptWidgets && !this.opts.removable) return Z.droppable(this.el, "destroy"), this;
3287
+ let t, n, r = (e, r, i) => {
3288
+ i ||= r;
3289
+ let a = i.gridstackNode;
3290
+ if (!a) return;
3291
+ if (!a.grid?.el) {
3292
+ i.style.transform = `scale(${1 / this.dragTransform.xScale},${1 / this.dragTransform.yScale})`;
3293
+ let t = i.getBoundingClientRect();
3294
+ i.style.left = t.x + (this.dragTransform.xScale - 1) * (e.clientX - t.x) / this.dragTransform.xScale + "px", i.style.top = t.y + (this.dragTransform.yScale - 1) * (e.clientY - t.y) / this.dragTransform.yScale + "px", i.style.transformOrigin = "0px 0px";
3295
+ }
3296
+ let { top: o, left: s } = i.getBoundingClientRect(), c = this.el.getBoundingClientRect();
3297
+ s -= c.left, o -= c.top;
3298
+ let l = { position: {
3299
+ top: o * this.dragTransform.xScale,
3300
+ left: s * this.dragTransform.yScale
3301
+ } };
3302
+ if (a._temporaryRemoved) {
3303
+ if (a.x = Math.max(0, Math.round(s / n)), a.y = Math.max(0, Math.round(o / t)), delete a.autoPosition, this.engine.nodeBoundFix(a), !this.engine.willItFit(a)) {
3304
+ if (a.autoPosition = !0, !this.engine.willItFit(a)) {
3305
+ Z.off(r, "drag");
3306
+ return;
3307
+ }
3308
+ a._willFitPos && (W.copyPos(a, a._willFitPos), delete a._willFitPos);
3309
+ }
3310
+ this._onStartMoving(i, e, l, a, n, t);
3311
+ } else this._dragOrResize(i, e, l, a, n, t);
3312
+ };
3313
+ return Z.droppable(this.el, { accept: (e) => {
3314
+ let t = e.gridstackNode || this._readAttr(e, !1);
3315
+ if (t?.grid === this) return !0;
3316
+ if (!this.opts.acceptWidgets) return !1;
3317
+ let n = !0;
3318
+ if (typeof this.opts.acceptWidgets == "function") n = this.opts.acceptWidgets(e);
3319
+ else {
3320
+ let t = this.opts.acceptWidgets === !0 ? ".grid-stack-item" : this.opts.acceptWidgets;
3321
+ n = e.matches(t);
3322
+ }
3323
+ if (n && t && this.opts.maxRow) {
3324
+ let e = {
3325
+ w: t.w,
3326
+ h: t.h,
3327
+ minW: t.minW,
3328
+ minH: t.minH
3329
+ };
3330
+ n = this.engine.willItFit(e);
3331
+ }
3332
+ return n;
3333
+ } }).on(this.el, "dropover", (i, a, o) => {
3334
+ let s = o?.gridstackNode || a.gridstackNode;
3335
+ if (s?.grid === this && !s._temporaryRemoved) return !1;
3336
+ if (s?._sidebarOrig && (s.w = s._sidebarOrig.w, s.h = s._sidebarOrig.h), s?.grid && s.grid !== this && !s._temporaryRemoved && s.grid._leave(a, o), o ||= a, n = this.cellWidth(), t = this.getCellHeight(!0), !s) {
3337
+ let e = o.getAttribute("data-gs-widget") || o.getAttribute("gridstacknode");
3338
+ if (e) {
3339
+ try {
3340
+ s = JSON.parse(e);
3341
+ } catch {
3342
+ console.error("Gridstack dropover: Bad JSON format: ", e);
3343
+ }
3344
+ o.removeAttribute("data-gs-widget"), o.removeAttribute("gridstacknode");
3345
+ }
3346
+ s ||= this._readAttr(o), s._sidebarOrig = {
3347
+ w: s.w,
3348
+ h: s.h
3349
+ };
3350
+ }
3351
+ s.grid || (s.el || (s = { ...s }), s._isExternal = !0, o.gridstackNode = s);
3352
+ let c = s.w || Math.round(o.offsetWidth / n) || 1, l = s.h || Math.round(o.offsetHeight / t) || 1;
3353
+ return s.grid && s.grid !== this ? (a._gridstackNodeOrig ||= s, a.gridstackNode = s = {
3354
+ ...s,
3355
+ w: c,
3356
+ h: l,
3357
+ grid: this
3358
+ }, delete s.x, delete s.y, this.engine.cleanupNode(s).nodeBoundFix(s), s._initDD = s._isExternal = s._temporaryRemoved = !0) : (s.w = c, s.h = l, s._temporaryRemoved = !0), e._itemRemoving(s.el, !1), Z.on(a, "drag", r), r(i, a, o), !1;
3359
+ }).on(this.el, "dropout", (e, t, n) => {
3360
+ let r = n?.gridstackNode || t.gridstackNode;
3361
+ return r && (!r.grid || r.grid === this) && (this._leave(t, n), this._isTemp && this.removeAsSubGrid(r)), !1;
3362
+ }).on(this.el, "drop", (t, n, r) => {
3363
+ let i = r?.gridstackNode || n.gridstackNode;
3364
+ if (i?.grid === this && !i._isExternal) return !1;
3365
+ let a = !!this.placeholder.parentElement, o = n !== r;
3366
+ this.placeholder.remove(), delete this.placeholder.gridstackNode, a && this.opts.animate && (this.setAnimation(!1), this.setAnimation(!0, !0));
3367
+ let s = n._gridstackNodeOrig;
3368
+ if (delete n._gridstackNodeOrig, a && s?.grid && s.grid !== this) {
3369
+ let e = s.grid;
3370
+ e.engine.removeNodeFromLayoutCache(s), e.engine.removedNodes.push(s), e._triggerRemoveEvent()._triggerChangeEvent(), e.parentGridNode && !e.engine.nodes.length && e.opts.subGridDynamic && e.removeAsSubGrid();
3371
+ }
3372
+ if (!i || (a && (this.engine.cleanupNode(i), i.grid = this), delete i.grid?._isTemp, Z.off(n, "drag"), r && r !== n ? (r.remove(), n = r) : n.remove(), this._removeDD(n), !a)) return !1;
3373
+ let c = i.subGrid?.el?.gridstack;
3374
+ return W.copyPos(i, this._readAttr(this.placeholder)), W.removePositioningStyles(n), o && (i.content || i.subGridOpts || e.addRemoveCB) ? (delete i.el, n = this.addWidget(i) || n) : (this._prepareElement(n, !0, i), this.el.appendChild(n), this.resizeToContentCheck(!1, i), c && (c.parentGridNode = i), this._updateContainerHeight()), this.engine.addedNodes.push(i), this._triggerAddEvent(), this._triggerChangeEvent(), this.engine.endUpdate(), this._gsEventHandler.dropped && this._gsEventHandler.dropped({
3375
+ ...t,
3376
+ type: "dropped"
3377
+ }, s && s.grid ? s : void 0, i), !1;
3378
+ }), this;
3379
+ }
3380
+ static _itemRemoving(e, t) {
3381
+ if (!e) return;
3382
+ let n = e ? e.gridstackNode : void 0;
3383
+ !n?.grid || e.classList.contains(n.grid.opts.removableOptions.decline) || (t ? n._isAboutToRemove = !0 : delete n._isAboutToRemove, t ? e.classList.add("grid-stack-item-removing") : e.classList.remove("grid-stack-item-removing"));
3384
+ }
3385
+ _setupRemoveDrop() {
3386
+ if (typeof this.opts.removable != "string") return this;
3387
+ let t = document.querySelector(this.opts.removable);
3388
+ return t && !this.opts.staticGrid && !Z.isDroppable(t) && Z.droppable(t, this.opts.removableOptions).on(t, "dropover", (t, n) => e._itemRemoving(n, !0)).on(t, "dropout", (t, n) => e._itemRemoving(n, !1)), this;
3389
+ }
3390
+ refreshDragHandles(t) {
3391
+ return e.getElements(t).forEach((e) => {
3392
+ e.ddElement?.ddDraggable?.refreshHandles();
3393
+ }), this;
3394
+ }
3395
+ prepareDragDrop(e, t = !1) {
3396
+ let n = e?.gridstackNode;
3397
+ if (!n) return this;
3398
+ let r = n.noMove || this.opts.disableDrag, i = n.noResize || this.opts.disableResize, a = this.opts.staticGrid || r && i;
3399
+ if ((t || a) && (n._initDD && (this._removeDD(e), delete n._initDD), a)) return e.classList.add("ui-draggable-disabled", "ui-resizable-disabled"), this;
3400
+ if (!n._initDD) {
3401
+ let t, r, i = (i, a) => {
3402
+ this.triggerEvent(i, i.target), t = this.cellWidth(), r = this.getCellHeight(!0), this._onStartMoving(e, i, a, n, t, r);
3403
+ }, a = (i, a) => {
3404
+ this._dragOrResize(e, i, a, n, t, r);
3405
+ }, o = (t) => {
3406
+ this.placeholder.remove(), delete this.placeholder.gridstackNode, delete n._moving, delete n._resizing, delete n._event, delete n._lastTried;
3407
+ let r = !!n._orig && n.w !== n._orig.w, i = t.target;
3408
+ if (!(!i.gridstackNode || i.gridstackNode.grid !== this)) {
3409
+ if (n.el = i, n._isAboutToRemove) {
3410
+ let r = e.gridstackNode.grid;
3411
+ r._gsEventHandler[t.type] && r._gsEventHandler[t.type](t, i), r.engine.nodes.push(n), r.removeWidget(e, !0, !0);
3412
+ } else W.removePositioningStyles(i), n._temporaryRemoved ? (this._writePosAttr(i, n), this.engine.addNode(n)) : this._writePosAttr(i, n), this.triggerEvent(t, i);
3413
+ this._extraDragRow = 0, this._updateContainerHeight(), this._triggerChangeEvent(), this.engine.endUpdate(), t.type === "resizestop" && (Number.isInteger(n.sizeToContent) && (n.sizeToContent = n.h), this.resizeToContentCheck(r, n));
3414
+ }
3415
+ };
3416
+ Z.draggable(e, {
3417
+ start: i,
3418
+ stop: o,
3419
+ drag: a,
3420
+ rtl: this.opts.rtl === "auto" ? void 0 : this.opts.rtl
3421
+ }).resizable(e, {
3422
+ start: i,
3423
+ stop: o,
3424
+ resize: a,
3425
+ rtl: this.opts.rtl === "auto" ? void 0 : this.opts.rtl
3426
+ }), n._initDD = !0;
3427
+ }
3428
+ return Z.draggable(e, r ? "disable" : "enable").resizable(e, i ? "disable" : "enable"), this;
3429
+ }
3430
+ _onStartMoving(e, t, n, r, i, a) {
3431
+ if (this.engine.cleanNodes().beginUpdate(r), this._writePosAttr(this.placeholder, r), this.el.appendChild(this.placeholder), this.placeholder.gridstackNode = r, r.grid?.el) this.dragTransform = W.getValuesFromTransformedElement(e);
3432
+ else if (this.placeholder && this.placeholder.closest(".grid-stack")) {
3433
+ let e = this.placeholder.closest(".grid-stack");
3434
+ this.dragTransform = W.getValuesFromTransformedElement(e);
3435
+ } else this.dragTransform = {
3436
+ xScale: 1,
3437
+ xOffset: 0,
3438
+ yScale: 1,
3439
+ yOffset: 0
3440
+ };
3441
+ if (r.el = this.placeholder, r._lastUiPosition = n.position, r._prevYPix = n.position.top, r._moving = t.type === "dragstart", r._resizing = t.type === "resizestart", delete r._lastTried, t.type === "dropover" && r._temporaryRemoved && (this.engine.addNode(r), r._moving = !0), this.engine.cacheRects(i, a, this.opts.marginTop, this.opts.marginRight, this.opts.marginBottom, this.opts.marginLeft), t.type === "resizestart") {
3442
+ let t = this.getColumn() - r.x, n = (this.opts.maxRow || 2 ** 53 - 1) - r.y;
3443
+ Z.resizable(e, "option", "minWidth", i * Math.min(r.minW || 1, t)).resizable(e, "option", "minHeight", a * Math.min(r.minH || 1, n)).resizable(e, "option", "maxWidth", i * Math.min(r.maxW || 2 ** 53 - 1, t)).resizable(e, "option", "maxWidthMoveLeft", i * Math.min(r.maxW || 2 ** 53 - 1, r.x + r.w)).resizable(e, "option", "maxHeight", a * Math.min(r.maxH || 2 ** 53 - 1, n)).resizable(e, "option", "maxHeightMoveUp", a * Math.min(r.maxH || 2 ** 53 - 1, r.y + r.h));
3444
+ }
3445
+ }
3446
+ _dragOrResize(e, t, n, r, i, a) {
3447
+ let o = { ...r._orig }, s = !1, c = this.opts.marginLeft, l = this.opts.marginRight, u = this.opts.marginTop, d = this.opts.marginBottom, f = Math.round(a * .1), p = Math.round(i * .1);
3448
+ if (c = Math.min(c, p), l = Math.min(l, p), u = Math.min(u, f), d = Math.min(d, f), t.type === "drag") {
3449
+ if (r._temporaryRemoved) return;
3450
+ r._prevYPix = n.position.top, this.opts.draggable.scroll !== !1 && K.dragElement?.updateScrollPosition(this.el);
3451
+ let e = n.position.left + (n.position.left > r._lastUiPosition.left ? -l : c), t = n.position.top + (n.position.top > r._lastUiPosition.top ? -d : u);
3452
+ o.x = Math.round(e / i), o.y = Math.round(t / a);
3453
+ let s = this._extraDragRow;
3454
+ if (this.engine.collide(r, o)) {
3455
+ let e = this.getRow(), t = Math.max(0, o.y + r.h - e);
3456
+ this.opts.maxRow && e + t > this.opts.maxRow && (t = Math.max(0, this.opts.maxRow - e)), this._extraDragRow = t;
3457
+ } else this._extraDragRow = 0;
3458
+ if (this._extraDragRow !== s && this._updateContainerHeight(), r.x === o.x && r.y === o.y) return;
3459
+ } else if (t.type === "resize") {
3460
+ if ((o.x ?? 0) < 0 || (W.updateScrollResize(t, e, a), o.w = Math.round((n.size.width - c) / i), o.h = Math.round((n.size.height - u) / a), r.w === o.w && r.h === o.h) || r._lastTried && r._lastTried.w === o.w && r._lastTried.h === o.h) return;
3461
+ if (t.hasMovedX) {
3462
+ let e = r.x - (o.w - r.w);
3463
+ o.x = e < 0 ? 0 : e;
3464
+ }
3465
+ if (t.hasMovedY) {
3466
+ let e = r.y - (o.h - r.h);
3467
+ o.y = e < 0 ? 0 : e;
3468
+ }
3469
+ s = !0;
3470
+ }
3471
+ r._event = t, r._lastTried = o;
3472
+ let m = {
3473
+ x: n.position.left + c,
3474
+ y: n.position.top + u,
3475
+ w: (n.size ? n.size.width : r.w * i) - c - l,
3476
+ h: (n.size ? n.size.height : r.h * a) - u - d
3477
+ };
3478
+ if (this.engine.moveNodeCheck(r, {
3479
+ ...o,
3480
+ cellWidth: i,
3481
+ cellHeight: a,
3482
+ rect: m,
3483
+ resizing: s
3484
+ })) {
3485
+ r._lastUiPosition = n.position, this.engine.cacheRects(i, a, u, l, d, c), delete r._skipDown, s && r.subGrid && r.subGrid.onResize(), this._extraDragRow = 0, this._updateContainerHeight();
3486
+ let e = t.target;
3487
+ r._sidebarOrig || this._writePosAttr(e, r), this.triggerEvent(t, e);
3488
+ }
3489
+ }
3490
+ triggerEvent(e, t) {
3491
+ let n = this;
3492
+ for (; n.parentGridNode;) n = n.parentGridNode.grid;
3493
+ n._gsEventHandler[e.type] && n._gsEventHandler[e.type](e, t);
3494
+ }
3495
+ _leave(t, n) {
3496
+ n ||= t;
3497
+ let r = n.gridstackNode;
3498
+ if (!r || (n.style.transform = n.style.transformOrigin = "", Z.off(t, "drag"), r._temporaryRemoved)) return;
3499
+ r._temporaryRemoved = !0, this.engine.removeNode(r), r.el = r._isExternal && n ? n : t;
3500
+ let i = r._sidebarOrig;
3501
+ r._isExternal && this.engine.cleanupNode(r), r._sidebarOrig = i, this.opts.removable === !0 && e._itemRemoving(t, !0), t._gridstackNodeOrig ? (t.gridstackNode = t._gridstackNodeOrig, delete t._gridstackNodeOrig) : r._isExternal && this.engine.restoreInitial();
3502
+ }
3503
+ };
3504
+ Q.renderCB = (e, t) => {
3505
+ e && t?.content && (e.textContent = t.content);
3506
+ }, Q.resizeToContentParent = ".grid-stack-item-content", Q.Utils = W, Q.Engine = tn, Q.GDRev = "14.0.0";
3507
+ //#endregion
3508
+ //#region src/grid-core/helpers/grid-stack-lifecycle.ts
3509
+ var Cn = ({ gridElement: e, gridItemElements: t, items: n, columns: r, rowHeight: i, viewMode: a, fullTheme: o, onCreateOrUpdateDimensionsHint: s, onRemoveDimensionsHint: c, onChange: l }) => {
3510
+ let [u, d] = Kt(o), f = {
3511
+ column: r,
3512
+ cellHeight: i,
3513
+ marginTop: u,
3514
+ marginLeft: d,
3515
+ marginRight: d,
3516
+ marginBottom: u,
3517
+ animate: !0,
3518
+ auto: !1,
3519
+ mode: "top",
3520
+ removable: !1,
3521
+ acceptWidgets: !0,
3522
+ disableDrag: a,
3523
+ disableResize: a,
3524
+ minRow: 1,
3525
+ resizable: { handles: [
3526
+ "n",
3527
+ "ne",
3528
+ "e",
3529
+ "se",
3530
+ "s",
3531
+ "sw",
3532
+ "w",
3533
+ "nw"
3534
+ ].join(", ") },
3535
+ handle: ".grid-item-drag-handle"
3536
+ }, p = Q.init(f, e);
3537
+ if (!p) throw Error("GridStack.init() returned no grid");
3538
+ return p._sortDom = () => p, p.batchUpdate(), t.forEach((e) => {
3539
+ let t = e.getAttribute("luzmo-item-grid-item-id"), r = ue(n.find((e) => e.id === t), t ?? void 0);
3540
+ p.makeWidget(e, r);
3541
+ }), p.batchUpdate(!1), p.on("resizestart", (e, t) => {
3542
+ s(t, t.getAttribute("gs-w") ?? "", t.getAttribute("gs-h") ?? "");
3543
+ }), p.on("resize", (e, t) => {
3544
+ s(t, t.getAttribute("gs-w") ?? "", t.getAttribute("gs-h") ?? "");
3545
+ }), p.on("resizestop", (e, t) => {
3546
+ c(t);
3547
+ }), p.on("change", (e, t) => {
3548
+ l(t);
3549
+ }), p;
3550
+ }, wn = (e, t) => {
3551
+ let n = new Map(t.filter((e) => e.id).map((e) => [e.id, e]));
3552
+ return e.map((e) => {
3553
+ let t = e.id ? n.get(e.id) : void 0;
3554
+ return t ? {
3555
+ ...e,
3556
+ position: {
3557
+ sizeX: t.w ?? 1,
3558
+ sizeY: t.h ?? 1,
3559
+ row: t.y ?? 0,
3560
+ col: t.x ?? 0
3561
+ }
3562
+ } : e;
3563
+ });
3564
+ }, Tn = ({ element: e, numberOfColumns: t, numberOfRows: n, offsetHint: r }) => {
3565
+ let i = e.querySelector(".dimensions-hint-popover");
3566
+ if (i) {
3567
+ i.style.display = t.length > 0 && n.length > 0 ? "block" : "none", i.textContent = `${t} × ${n}`;
3568
+ return;
3569
+ }
3570
+ let a = document.createElement("div");
3571
+ a.className = "dimensions-hint-popover", a.setAttribute("popover", "hint"), a.style.display = t.length > 0 && n.length > 0 ? "block" : "none", a.textContent = `${t} × ${n}`, e.append(a), Lt(a, Mt(e, a, async () => {
3572
+ let { x: t, y: n } = await Ft(e, a, {
3573
+ placement: "bottom",
3574
+ middleware: [Nt(r), Pt()]
3575
+ });
3576
+ a.style.left = `${t}px`, a.style.top = `${n}px`;
3577
+ })), a.matches(":popover-open") || a.showPopover();
3578
+ }, En = (e) => {
3579
+ let t = e.querySelector(".dimensions-hint-popover");
3580
+ t && (Rt(t), t.matches(":popover-open") && t.hidePopover(), t.remove());
3581
+ }, Dn = ({ initialized: e, grid: t, hasItemsChanged: n, gridItemElements: r, items: i }) => {
3582
+ !e || !t || !n || (t.setAnimation(!1), t.batchUpdate(), t.removeAll(!1), i.forEach((e) => {
3583
+ let n = fe(r, e.id);
3584
+ n && t.makeWidget(n, ue(e, e.id));
3585
+ }), t.batchUpdate(!1), t.setAnimation(!0));
3586
+ }, On = ({ initialized: e, grid: t, hasViewModeChanged: n, viewMode: r, previousViewMode: i, activeItemElement: a, gridElement: o, cleanupActiveItem: s }) => {
3587
+ if (!e || !t || !n || r === i) return a;
3588
+ if (r) {
3589
+ if (t.disable(), a) {
3590
+ s(a), o.removeAttribute("has-active-item");
3591
+ return;
3592
+ }
3593
+ return a;
3594
+ }
3595
+ return t.enable(), a;
3596
+ }, kn = ":host{width:100%;display:block}.grid-stack{width:100%;min-height:var(--luzmo-item-grid-min-height);background:var(--luzmo-item-grid-background,var(--grid-background,var(--luzmo-background-color)));position:relative}.grid-stack[has-active-item] .grid-stack-item:not([active])>.grid-stack-item-content,.grid-stack[has-active-item] .grid-stack-item:not([active])>.grid-item-actions-popover{opacity:.5}.grid-stack .grid-stack-item[active]>.ui-resizable-handle,.grid-stack .grid-stack-item[active].ui-resizable-autohide>.ui-resizable-handle{display:block}.grid-stack .grid-stack-item.ui-resizable-resizing,.grid-stack .grid-stack-item.ui-resizable-resizing>.grid-stack-item-content{opacity:var(--luzmo-item-grid-item-resizing-opacity,.8)!important}.grid-item-drag-handle{color:var(--luzmo-item-grid-item-drag-handle-color,#000);top:var(--luzmo-item-grid-item-drag-handle-position-top,0);left:var(--luzmo-item-grid-item-drag-handle-position-left,0);right:var(--luzmo-item-grid-item-drag-handle-position-right,auto);bottom:var(--luzmo-item-grid-item-drag-handle-position-bottom,auto);padding:var(--luzmo-item-grid-item-drag-handle-padding,.5rem);z-index:var(--luzmo-item-grid-item-drag-handle-z-index,3);cursor:var(--luzmo-item-grid-item-drag-handle-cursor,move);position:absolute}.grid-stack[dark-background] .grid-item-drag-handle{color:var(--luzmo-item-grid-item-drag-handle-color,#fff)}.grid-stack .grid-stack-item .grid-stack-item-content{border-radius:var(--luzmo-item-grid-item-border-radius,var(--grid-item-border-radius,4px));background:var(--luzmo-item-grid-item-background,var(--grid-item-background,transparent));box-shadow:var(--luzmo-item-grid-item-box-shadow,var(--grid-item-box-shadow,none));border-style:var(--luzmo-item-grid-item-border-style,none);border-color:var(--luzmo-item-grid-item-border-color,transparent);-webkit-backdrop-filter:var(--luzmo-item-grid-item-backdrop-filter,none);backdrop-filter:var(--luzmo-item-grid-item-backdrop-filter,none);overflow:hidden}.grid-stack .grid-stack-item:not(.has-luzmo-viz-item) .grid-stack-item-content{border-style:var(--luzmo-item-grid-item-border-style,var(--grid-item-border-style,none));border-color:var(--luzmo-item-grid-item-border-color,var(--grid-item-border-color,transparent));border-width:var(--luzmo-item-grid-item-border-width,var(--grid-item-border-width,0));border-top-width:var(--luzmo-item-grid-item-border-top-width,var(--grid-item-border-top-width,0));border-right-width:var(--luzmo-item-grid-item-border-right-width,var(--grid-item-border-right-width,0));border-bottom-width:var(--luzmo-item-grid-item-border-bottom-width,var(--grid-item-border-bottom-width,0));border-left-width:var(--luzmo-item-grid-item-border-left-width,var(--grid-item-border-left-width,0))}.grid-stack .grid-stack-placeholder>.placeholder-content{border-radius:var(--grid-item-border-radius,4px)}:host .grid-stack-item[active]>.ui-resizable-handle,:host .grid-stack-item:hover>.ui-resizable-handle{z-index:var(--luzmo-item-grid-resize-handle-z-index,100);background:var(--luzmo-item-grid-resize-handle-background,#fff);border-radius:var(--luzmo-item-grid-resize-handle-border-radius,3px);opacity:var(--luzmo-item-grid-resize-handle-opacity,0);transition:var(--luzmo-item-grid-resize-handle-transition,opacity .2s ease);box-shadow:0 0 6px #0000001a,0 0 2px #000000bf;display:block!important;position:absolute!important}:host .grid-stack[dark-background]>.grid-stack-item[active]>.ui-resizable-handle,:host .grid-stack[dark-background]>.grid-stack-item:hover>.ui-resizable-handle{background:var(--luzmo-item-grid-resize-handle-background,#333);box-shadow:0 0 6px #ffffff1a,0 0 2px #ffffffbf}:host .grid-stack-item[active]>.ui-resizable-handle,:host .grid-stack-item:hover>.ui-resizable-handle{opacity:var(--luzmo-item-grid-resize-handle-opacity-hover,1)}:host .grid-stack-item>.ui-resizable-handle:hover{opacity:var(--luzmo-item-grid-resize-handle-opacity-active,1);background:var(--luzmo-item-grid-resize-handle-background-hover,var(--luzmo-background-color-highlight))}:host .grid-stack-item>.ui-resizable-n,:host .grid-stack-item>.ui-resizable-s{height:var(--luzmo-item-grid-resize-handle-edge-size,8px);width:var(--luzmo-item-grid-resize-handle-side-size,18px);left:calc(50% - var(--luzmo-item-grid-resize-handle-side-size,18px) / 2)}:host .grid-stack-item>.ui-resizable-n{cursor:n-resize;top:calc(var(--luzmo-item-grid-resize-handle-edge-offset,-4px) + var(--gs-item-margin-top,0px))}:host .grid-stack-item>.ui-resizable-s{cursor:s-resize;bottom:calc(var(--luzmo-item-grid-resize-handle-edge-offset,-4px) + var(--gs-item-margin-bottom,0px))}:host .grid-stack-item>.ui-resizable-e,:host .grid-stack-item>.ui-resizable-w{width:var(--luzmo-item-grid-resize-handle-edge-size,8px);height:var(--luzmo-item-grid-resize-handle-side-size,18px);top:calc(50% - var(--luzmo-item-grid-resize-handle-side-size,18px) / 2)}:host .grid-stack-item>.ui-resizable-e{cursor:e-resize;right:calc(var(--luzmo-item-grid-resize-handle-edge-offset,-4px) + var(--gs-item-margin-right,0px))}:host .grid-stack-item>.ui-resizable-w{cursor:w-resize;left:calc(var(--luzmo-item-grid-resize-handle-edge-offset,-4px) + var(--gs-item-margin-left,0px))}:host .grid-stack-item>.ui-resizable-ne,:host .grid-stack-item>.ui-resizable-nw,:host .grid-stack-item>.ui-resizable-se,:host .grid-stack-item>.ui-resizable-sw{width:var(--luzmo-item-grid-resize-handle-corner-size,12px);height:var(--luzmo-item-grid-resize-handle-corner-size,12px);background-image:none;transform:none}:host .grid-stack-item>.ui-resizable-ne{cursor:ne-resize;top:calc(var(--luzmo-item-grid-resize-handle-edge-offset,-6px) + var(--gs-item-margin-top,0px));right:calc(var(--luzmo-item-grid-resize-handle-edge-offset,-6px) + var(--gs-item-margin-right,0px))}:host .grid-stack-item>.ui-resizable-nw{cursor:nw-resize;top:calc(var(--luzmo-item-grid-resize-handle-edge-offset,-6px) + var(--gs-item-margin-top,0px));left:calc(var(--luzmo-item-grid-resize-handle-edge-offset,-6px) + var(--gs-item-margin-left,0px))}:host .grid-stack-item>.ui-resizable-se{cursor:se-resize;right:calc(var(--luzmo-item-grid-resize-handle-corner-offset,-4px) + var(--gs-item-margin-right,0px));bottom:calc(var(--luzmo-item-grid-resize-handle-corner-offset,-4px) + var(--gs-item-margin-bottom,0px))}:host .grid-stack-item>.ui-resizable-sw{cursor:sw-resize;left:calc(var(--luzmo-item-grid-resize-handle-corner-offset,-4px) + var(--gs-item-margin-left,0px));bottom:calc(var(--luzmo-item-grid-resize-handle-corner-offset,-4px) + var(--gs-item-margin-bottom,0px))}:host .grid-stack-item>.ui-resizable-resizing .ui-resizable-handle{background:var(--luzmo-item-grid-resize-handle-background-active,var(--luzmo-background-color-highlight));opacity:1!important}.grid-item-actions-popover{z-index:2;background:0 0;border:none;outline:none;margin:0;padding:0;position:absolute;overflow:visible}.grid-item-actions-popover:not([popover]){z-index:var(--luzmo-item-grid-item-actions-in-tree-z-index,50);position:fixed}luzmo-item-grid-item-actions-menu{padding:var(--luzmo-item-grid-item-actions-padding,var(--grid-item-actions-padding))}.dimensions-hint-popover{font-size:var(--luzmo-item-grid-item-dimensions-hint-font-size,var(--luzmo-font-size-xs,10px));font-family:var(--luzmo-item-grid-item-dimensions-hint-font-family,var(--luzmo-font-family,inherit));border-width:var(--luzmo-item-grid-item-dimensions-hint-border-width,var(--luzmo-border-width));border-style:solid;border-color:var(--luzmo-item-grid-item-dimensions-hint-border-color,var(--luzmo-border-color));border-radius:var(--luzmo-item-grid-item-dimensions-hint-border-radius,var(--luzmo-border-radius));padding:var(--luzmo-item-grid-item-dimensions-hint-padding,var(--luzmo-spacing-1) var(--luzmo-spacing-2));z-index:3;background:var(--luzmo-item-grid-item-dimensions-hint-background,var(--luzmo-background-color));color:var(--luzmo-item-grid-item-dimensions-hint-color,var(--luzmo-font-color));pointer-events:none;outline:none;margin:0;position:absolute;overflow:visible}luzmo-item-grid-item-actions-menu{--grid-item-actions-padding:0 .75rem}luzmo-item-grid-item-actions-menu[placement=top-start],luzmo-item-grid-item-actions-menu[placement=top],luzmo-item-grid-item-actions-menu[placement=top-end],luzmo-item-grid-item-actions-menu[placement=bottom-start],luzmo-item-grid-item-actions-menu[placement=bottom],luzmo-item-grid-item-actions-menu[placement=bottom-end]{--grid-item-actions-padding:.75rem 0}.grid-stack-item:focus-visible{outline:none}.grid-stack-item:focus-visible .grid-stack-item-content:after{content:\"\";border:var(--luzmo-indicator-width) solid var(--luzmo-indicator-color,var(--luzmo-primary));box-sizing:border-box;border-radius:var(--luzmo-item-grid-item-border-radius,var(--grid-item-border-radius,4px));z-index:2;width:100%;height:100%;position:absolute;top:0;left:0}", $ = class extends h {
3597
+ constructor(...e) {
3598
+ super(...e), this.language = "en", this.contentLanguage = "en", this.columns = 48, this.rowHeight = 16, this.viewMode = !1, this.itemActionsDocumentPopover = !0, this.placementItemActionsMenu = "right-start", this.clonedItemPositioning = "below-item", this._items = [], this._hasControlledItems = !1, this._initialItems = [], this.renderers = {}, this._initialized = !1, this._themeLoadVersion = 0, this.defaultRenderer = (e) => i`
3599
+ <div class="grid-item-content">
3600
+ <div class="grid-item-type">${e.type}</div>
3601
+ </div>
3602
+ `, this._internalItemStates = {}, this._initialItemStatesApplied = !1, this._internalItems = [], this._initialItemsApplied = !1, this._hasWarnedControlledAndInitialItems = !1, this._hasWarnedIgnoredInitialItems = !1, this._suppressItemStatesEvent = !1, this._suppressNextLayoutChangedEvent = !1, this._hasWarnedControlledAndInitialStates = !1, this._internalItemsVersion = 0, this._handleMouseout = (e) => {
3603
+ if (this.viewMode) return;
3604
+ let t = ee(e.target);
3605
+ t && te({
3606
+ event: e,
3607
+ gridItem: t
3608
+ }) && this._removeItemActionsMenuPopover(t);
3609
+ }, this._handleKeyDown = (e) => {
3610
+ let t = Ut({
3611
+ event: e,
3612
+ viewMode: this.viewMode,
3613
+ focusedItemElement: this._focusedItemElement,
3614
+ activeItemElement: this._activeItemElement,
3615
+ gridElement: this._gridElement,
3616
+ grid: this._grid,
3617
+ columns: this.columns ?? 48,
3618
+ onDeleteRequest: (e) => {
3619
+ let t = e.getAttribute("gs-id");
3620
+ if (!t) return;
3621
+ let n = this._effectiveItems, r = n.find((e) => e.id === t);
3622
+ if (!r) return;
3623
+ this._isControlled || this._clearGridItemUiStateForDelete(e);
3624
+ let i = n.filter((e) => e.id !== t);
3625
+ v({
3626
+ target: this,
3627
+ action: "delete",
3628
+ actionType: "button",
3629
+ active: !1,
3630
+ items: n,
3631
+ element: e,
3632
+ itemId: t,
3633
+ item: r,
3634
+ updatedItems: i
3635
+ }), this._isItemsControlled || this._setInternalItems(i, { reconcileStates: !0 });
3636
+ },
3637
+ removeItemActionsMenuPopover: this._removeItemActionsMenuPopover.bind(this),
3638
+ createItemActionsMenuPopover: this._createItemActionsMenuPopover.bind(this)
3639
+ });
3640
+ this._focusedItemElement = t.focusedItemElement, this._activeItemElement = t.activeItemElement;
3641
+ }, this._handleFocus = (e) => {
3642
+ this._focusedItemElement = S({
3643
+ event: e,
3644
+ focusedItemElement: this._focusedItemElement,
3645
+ removeItemActionsMenuPopover: this._removeItemActionsMenuPopover.bind(this)
3646
+ });
3647
+ }, this._handleBlur = (e) => {
3648
+ let t = C({
3649
+ event: e,
3650
+ focusedItemElement: this._focusedItemElement,
3651
+ removeItemActionsMenuPopover: this._removeItemActionsMenuPopover.bind(this)
3652
+ });
3653
+ this._focusedItemElement = t.focusedItemElement, t.shouldFocusGrid && this._gridElement.focus();
3654
+ }, this._handleGridClick = (e) => {
3655
+ if (this._isControlled) {
3656
+ this._emitControlledClickAwayDeactivation(e);
3657
+ return;
3658
+ }
3659
+ let t = ie({
3660
+ event: e,
3661
+ gridElement: this._gridElement,
3662
+ hostElement: this,
3663
+ items: this.items,
3664
+ activeItemActionToggle: this._activeItemActionToggle,
3665
+ cleanupActiveItem: this._cleanupActiveItem.bind(this),
3666
+ dispatchItemActionEvent: this._dispatchItemActionEvent.bind(this)
3667
+ });
3668
+ this._activeItemActionToggle = t.activeItemActionToggle;
3669
+ }, this.handleItemAction = (e) => {
3670
+ let t = e.detail, r = e.target?.closest(".grid-stack-item"), i = r?.getAttribute("gs-id");
3671
+ if (["delete", "clone"].includes(t.action)) {
3672
+ if (e.stopPropagation(), !i) return;
3673
+ let a = this._effectiveItems, o = a.find((e) => e.id === i);
3674
+ if (!o) return;
3675
+ let s = this._gridElement.querySelector(".grid-stack-item[active]") ?? this._activeItemElement;
3676
+ if (!this._isControlled && s && s !== r) {
3677
+ let e = s.getAttribute("gs-id"), t = a.find((t) => t.id === e), n = this._activeItemActionToggle, r = s;
3678
+ this._cleanupActiveItem(s), n && e && t && this._dispatchItemActionEvent(n, "toggle", !1, r, e, t), this._activeItemElement = void 0, this._activeItemActionToggle = void 0, this._internalItemStates = {};
3679
+ }
3680
+ if (t.action === "delete") {
3681
+ this._isControlled || this._clearGridItemUiStateForDelete(r);
3682
+ let e = a.filter((e) => e.id !== i);
3683
+ v({
3684
+ target: this,
3685
+ action: "delete",
3686
+ actionType: t.type,
3687
+ active: t.active,
3688
+ items: a,
3689
+ element: r,
3690
+ itemId: i,
3691
+ item: o,
3692
+ updatedItems: e
3693
+ }), this._isItemsControlled || this._setInternalItems(e, { reconcileStates: !0 });
3694
+ } else {
3695
+ let e = {
3696
+ ...structuredClone(o),
3697
+ id: n()
3698
+ }, i = this._simulateCloneLayout(e, o), s = i.find((t) => t.id === e.id) ?? e;
3699
+ v({
3700
+ target: this,
3701
+ action: "clone",
3702
+ actionType: t.type,
3703
+ active: t.active,
3704
+ items: a,
3705
+ element: r,
3706
+ itemId: e.id,
3707
+ item: s,
3708
+ originalElement: r,
3709
+ updatedItems: i
3710
+ }), this._isItemsControlled || this._setInternalItems(i, { reconcileStates: !0 });
3711
+ }
3712
+ return;
3713
+ }
3714
+ if (this._isControlled) {
3715
+ if (e.stopPropagation(), !i) return;
3716
+ let n = this.items.find((e) => e.id === i);
3717
+ if (t.type === "toggle") {
3718
+ let e = this._effectiveItemStates, n = t.active, r = this._computeNextItemStates(i, t.action, n);
3719
+ y({
3720
+ target: this,
3721
+ itemStates: e,
3722
+ updatedItemStates: r,
3723
+ changedItemStates: { [i]: [t.action] }
3724
+ });
3725
+ } else v({
3726
+ target: this,
3727
+ action: t.action,
3728
+ actionType: t.type,
3729
+ active: t.active,
3730
+ items: this.items,
3731
+ element: r,
3732
+ itemId: i,
3733
+ item: n
3734
+ });
3735
+ r && !r.hasAttribute("active") && this._removeItemActionsMenuPopover(r);
3736
+ return;
3737
+ }
3738
+ this._suppressItemStatesEvent = !0;
3739
+ let a = re({
3740
+ event: e,
3741
+ gridElement: this._gridElement,
3742
+ items: this.items,
3743
+ state: {
3744
+ activeItemElement: this._activeItemElement,
3745
+ activeItemActionToggle: this._activeItemActionToggle
3746
+ },
3747
+ cleanupActiveItem: this._cleanupActiveItem.bind(this),
3748
+ dispatchItemActionEvent: this._dispatchItemActionEvent.bind(this),
3749
+ createItemActionsMenuPopover: this._createItemActionsMenuPopover.bind(this)
3750
+ });
3751
+ if (this._suppressItemStatesEvent = !1, this._activeItemElement = a.activeItemElement, this._activeItemActionToggle = a.activeItemActionToggle, t.type === "toggle" && i) {
3752
+ let e = this._effectiveItemStates, n = a.activeItemElement === r && a.activeItemActionToggle === t.action, o = this._computeNextItemStates(i, t.action, n);
3753
+ this._internalItemStates = o, y({
3754
+ target: this,
3755
+ itemStates: e,
3756
+ updatedItemStates: o,
3757
+ changedItemStates: this._diffItemStates(e, o)
3758
+ });
3759
+ }
3760
+ };
3761
+ }
3762
+ static get styles() {
3763
+ return [o(g), o(kn)];
3764
+ }
3765
+ set items(e) {
3766
+ let t = this._items, n = structuredClone(e ?? []);
3767
+ this._validateItemsHaveIds(n, "items");
3768
+ let r = this._hasControlledItems;
3769
+ this._items = n, this._hasControlledItems = e !== void 0, r && !this._hasControlledItems && (this._setInternalItems(t, { reconcileStates: !0 }), this._initialItemsApplied = !0), this.requestUpdate("items", t);
3770
+ }
3771
+ get items() {
3772
+ return this._effectiveItems;
3773
+ }
3774
+ set initialItems(e) {
3775
+ let t = this._initialItems, n = structuredClone(e ?? []);
3776
+ this._validateItemsHaveIds(n, "initialItems"), !(!this._isItemsControlled && this._initialItemsApplied) && (this._initialItems = n, this._isItemsControlled || (this._initialItemsApplied = !1), this.requestUpdate("initialItems", t));
3777
+ }
3778
+ get initialItems() {
3779
+ return this._initialItems;
3780
+ }
3781
+ set itemStates(e) {
3782
+ let t = this._itemStates;
3783
+ this._itemStates = e ?? void 0, this.requestUpdate("itemStates", t);
3784
+ }
3785
+ get itemStates() {
3786
+ return this._itemStates;
3787
+ }
3788
+ get _isControlled() {
3789
+ return this.itemStates !== void 0;
3790
+ }
3791
+ get _isItemsControlled() {
3792
+ return this._hasControlledItems;
3793
+ }
3794
+ get _effectiveItems() {
3795
+ return this._isItemsControlled ? this._items : this._internalItems;
3796
+ }
3797
+ get _effectiveItemStates() {
3798
+ return this._isControlled ? this.itemStates : this._internalItemStates;
3799
+ }
3800
+ _validateItemsHaveIds(e, t) {
3801
+ for (let n = 0; n < e.length; n += 1) if (!e[n]?.id) throw Error(`luzmo-item-grid: ${t}[${n}] is missing required id`);
3802
+ }
3803
+ async _loadTheme(e) {
3804
+ let t = this._initialized, n = ++this._themeLoadVersion, r = await this.resolveTheme(e, this._fullTheme);
3805
+ if (!(!this.isConnected || n !== this._themeLoadVersion)) {
3806
+ if (this._fullTheme = r, this._initialized && Zt(this.style, this._fullTheme), !this._initialized && this._gridElement && await new Promise((e) => {
3807
+ requestAnimationFrame(() => {
3808
+ this.isConnected && n === this._themeLoadVersion && this._initializeGrid(), e();
3809
+ });
3810
+ }), this._grid) {
3811
+ let [e, t] = Kt(this._fullTheme);
3812
+ this._grid.margin([e, t].join(" "));
3813
+ }
3814
+ t && this.requestUpdate();
3815
+ }
3816
+ }
3817
+ connectedCallback() {
3818
+ super.connectedCallback(), this.requestUpdate(), document.addEventListener("click", this._handleGridClick), this.addEventListener("keydown", this._handleKeyDown);
3819
+ }
3820
+ disconnectedCallback() {
3821
+ super.disconnectedCallback(), this._themeLoadVersion += 1, this._cleanup(), document.removeEventListener("click", this._handleGridClick), this.removeEventListener("keydown", this._handleKeyDown);
3822
+ }
3823
+ willUpdate(e) {
3824
+ if (super.willUpdate(e), e.has("_initialized") && (Zt(this.style, this._fullTheme), this._initialized && this._grid && this._fullTheme?.margins)) {
3825
+ let [e, t] = Kt(this._fullTheme);
3826
+ this._grid.margin([e, t].join(" "));
3827
+ }
3828
+ }
3829
+ updated(e) {
3830
+ super.updated(e);
3831
+ let t = e.has("viewMode"), n = e.has("items"), r = e.has("initialItems"), i = n || e.has("_internalItemsVersion"), a = e.has("theme"), o = e.has("itemStates");
3832
+ this._isItemsControlled && this.initialItems && this.initialItems.length > 0 ? this._hasWarnedControlledAndInitialItems ||= (console.warn("luzmo-item-grid: Both items and initialItems are set. The component will be treated as controlled (initialItems is ignored)."), !0) : this._hasWarnedControlledAndInitialItems = !1, !this._initialItemsApplied && !this._isItemsControlled && this._initialItems.length > 0 ? (this._setInternalItems(this._initialItems, { reconcileStates: !0 }), this._initialItemsApplied = !0) : r && !this._isItemsControlled && this._initialItems.length === 0 && !this._initialItemsApplied && (this._setInternalItems([], { reconcileStates: !0 }), this._initialItemsApplied = !0), this.itemStates !== void 0 && this.initialItemStates !== void 0 ? this._hasWarnedControlledAndInitialStates ||= (console.warn("luzmo-item-grid: Both itemStates and initialItemStates are set. The component will be treated as controlled (initialItemStates is ignored)."), !0) : this._hasWarnedControlledAndInitialStates = !1, !this._initialItemStatesApplied && this.initialItemStates && !this._isControlled && (this._internalItemStates = this._sanitizeInitialItemStates(this.initialItemStates), this._initialItemStatesApplied = !0), ce(this._effectiveItems), Dn({
3833
+ initialized: this._initialized,
3834
+ grid: this._grid,
3835
+ hasItemsChanged: i,
3836
+ gridItemElements: this._gridItemElements,
3837
+ items: this._effectiveItems
3838
+ }), n && this._reconcileStaleItemStates(), this._activeItemElement = On({
3839
+ initialized: this._initialized,
3840
+ grid: this._grid,
3841
+ hasViewModeChanged: t,
3842
+ viewMode: this.viewMode,
3843
+ previousViewMode: e.get("viewMode"),
3844
+ activeItemElement: this._activeItemElement,
3845
+ gridElement: this._gridElement,
3846
+ cleanupActiveItem: this._cleanupActiveItem.bind(this)
3847
+ }), this.isConnected && (a || !this._initialized) && this._loadTheme(this.theme), (i || o) && this._initialized && this._applyItemStates();
3848
+ }
3849
+ _setInternalItems(e, t = {}) {
3850
+ let n = structuredClone(e);
3851
+ this._validateItemsHaveIds(n, "internalItems"), this._internalItems = n, ce(this._internalItems), this._internalItemsVersion += 1, t.reconcileStates && this._reconcileStaleItemStates();
3852
+ }
3853
+ _handleMouseover(e) {
3854
+ if (this.viewMode) return;
3855
+ let t = ee(e.target);
3856
+ t && this._createItemActionsMenuPopover(t);
3857
+ }
3858
+ _emitControlledClickAwayDeactivation(e) {
3859
+ let t = this._effectiveItemStates, n = Object.entries(t).filter(([, e]) => e.length > 0);
3860
+ if (!this._gridElement || n.length === 0) return;
3861
+ let r = e.composedPath();
3862
+ if (n.some(([e]) => {
3863
+ let t = Array.from(this._gridElement.querySelectorAll(".grid-stack-item")).find((t) => t.getAttribute("gs-id") === e);
3864
+ if (!t) return !1;
3865
+ if (r.includes(t)) return !0;
3866
+ let n = t.querySelector(".grid-item-actions-popover");
3867
+ return n ? r.includes(n) : !1;
3868
+ })) return;
3869
+ let i = {}, a = { ...t };
3870
+ for (let [e, t] of n) {
3871
+ for (let n of t) a = this._computeNextItemStates(e, n, !1, a);
3872
+ i[e] = [...t];
3873
+ }
3874
+ y({
3875
+ target: this,
3876
+ itemStates: t,
3877
+ updatedItemStates: a,
3878
+ changedItemStates: i
3879
+ });
3880
+ }
3881
+ _cleanupActiveItem(e) {
3882
+ this._activeItemElement = ne({
3883
+ item: e,
3884
+ activeItemElement: this._activeItemElement,
3885
+ gridElement: this._gridElement,
3886
+ removeItemActionsMenuPopover: this._removeItemActionsMenuPopover.bind(this)
3887
+ });
3888
+ }
3889
+ _clearGridItemUiStateForDelete(e) {
3890
+ e.hasAttribute("focused") && e.removeAttribute("focused"), e.hasAttribute("active") && e.removeAttribute("active"), this._removeItemActionsMenuPopover(e), this._focusedItemElement === e && (this._focusedItemElement = void 0), this._activeItemElement === e && (this._activeItemElement = void 0, this._activeItemActionToggle = void 0), this._gridElement.querySelector(".grid-stack-item[active]") || this._gridElement.removeAttribute("has-active-item");
3891
+ }
3892
+ _dispatchItemActionEvent(e, t, n, r, i, a, o, s) {
3893
+ if (v({
3894
+ target: this,
3895
+ action: e,
3896
+ actionType: t,
3897
+ active: n,
3898
+ items: this.items,
3899
+ element: r,
3900
+ itemId: i,
3901
+ item: a,
3902
+ deletedId: o,
3903
+ originalElement: s
3904
+ }), t === "toggle" && !this._suppressItemStatesEvent) {
3905
+ let t = this._effectiveItemStates, r = this._computeNextItemStates(i, e, n);
3906
+ this._isControlled || (this._internalItemStates = r), y({
3907
+ target: this,
3908
+ itemStates: t,
3909
+ updatedItemStates: r,
3910
+ changedItemStates: { [i]: [e] }
3911
+ });
3912
+ }
3913
+ }
3914
+ _sanitizeInitialItemStates(e) {
3915
+ let t = Object.entries(e).filter(([, e]) => e.length > 0), n = t.length, r = t.reduce((e, [, t]) => e + t.length, 0);
3916
+ if (n > 1 || r > 1) {
3917
+ console.warn("luzmo-item-grid: initialItemStates contains multiple items or actions. In uncontrolled mode, only one item with one active action is supported at a time. Only the first item and its first action will be applied. Use controlled mode (itemStates) for multiple simultaneous active items.");
3918
+ let [e, n] = t[0];
3919
+ return { [e]: [n[0]] };
3920
+ }
3921
+ return { ...e };
3922
+ }
3923
+ _diffItemStates(e, t) {
3924
+ let n = {}, r = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)]);
3925
+ for (let i of r) {
3926
+ let r = e[i] ?? [], a = t[i] ?? [], o = a.filter((e) => !r.includes(e)), s = r.filter((e) => !a.includes(e)), c = [...o, ...s];
3927
+ c.length > 0 && (n[i] = c);
3928
+ }
3929
+ return n;
3930
+ }
3931
+ _computeNextItemStates(e, t, n, r) {
3932
+ if (!this._isControlled) return n ? { [e]: [t] } : {};
3933
+ let i = { ...r ?? this._effectiveItemStates };
3934
+ if (n) {
3935
+ let n = i[e] ?? [];
3936
+ n.includes(t) || (i[e] = [...n, t]);
3937
+ } else {
3938
+ let n = i[e];
3939
+ if (n) {
3940
+ let r = n.filter((e) => e !== t);
3941
+ r.length === 0 ? delete i[e] : i[e] = r;
3942
+ }
3943
+ }
3944
+ return i;
3945
+ }
3946
+ _filterItemStatesToExistingItems(e) {
3947
+ let t = new Set(this.items.map((e) => e.id).filter((e) => !!e)), n = {};
3948
+ for (let [r, i] of Object.entries(e)) !t.has(r) || i.length === 0 || (n[r] = [...i]);
3949
+ return n;
3950
+ }
3951
+ _reconcileStaleItemStates() {
3952
+ let e = this._isControlled ? this._effectiveItemStates : this._internalItemStates, t = this._filterItemStatesToExistingItems(e), n = {};
3953
+ for (let [r, i] of Object.entries(e)) !t[r] && i.length > 0 && (n[r] = [...i]);
3954
+ Object.keys(n).length > 0 && y({
3955
+ target: this,
3956
+ itemStates: e,
3957
+ updatedItemStates: t,
3958
+ changedItemStates: n
3959
+ }), this._isControlled || (this._internalItemStates = t);
3960
+ }
3961
+ _simulateCloneLayout(e, t) {
3962
+ let n = this._effectiveItems;
3963
+ if (!this._grid) return [...n, e];
3964
+ let r = e.position ?? this._resolvePositionFromEngine(t.id);
3965
+ if (!r) return [...n, e];
3966
+ e = {
3967
+ ...e,
3968
+ position: { ...r }
3969
+ };
3970
+ let i = t.position ?? this._resolvePositionFromEngine(t.id);
3971
+ this.clonedItemPositioning === "below-item" && i && (e.position = {
3972
+ ...e.position,
3973
+ col: i.col,
3974
+ row: i.row + i.sizeY
3975
+ });
3976
+ let a = this.clonedItemPositioning !== "below-item" || !i, { updatedItems: o } = me({
3977
+ item: e,
3978
+ engine: this._grid.engine,
3979
+ existingItems: this._enrichItemsWithEnginePositions(n),
3980
+ autoPosition: a
3981
+ });
3982
+ return o;
3983
+ }
3984
+ _cleanup() {
3985
+ for (let e of this._gridItemElements) this._cleanupActiveItem(e);
3986
+ this._grid &&= (this._grid.destroy(!1), void 0), this._initialized = !1;
3987
+ }
3988
+ _restoreItemsLayout(e) {
3989
+ if (!this._grid || !this._gridElement || e.length === 0 || !this._isItemsControlled) return;
3990
+ let t = [];
3991
+ for (let n of e) {
3992
+ if (!n.id) continue;
3993
+ let e = this._effectiveItems.find((e) => e.id === n.id);
3994
+ if (!e) continue;
3995
+ let r = e.position ?? this._resolvePositionFromEngine(e.id);
3996
+ if (!r) continue;
3997
+ let i = this._gridElement.querySelector(`.grid-stack-item[gs-id="${CSS.escape(e.id)}"]`);
3998
+ i && (n.x !== r.col || n.y !== r.row || n.w !== r.sizeX || n.h !== r.sizeY) && t.push({
3999
+ element: i,
4000
+ position: r
4001
+ });
4002
+ }
4003
+ if (t.length !== 0) {
4004
+ this._suppressNextLayoutChangedEvent = !0, this._grid.batchUpdate();
4005
+ for (let e of t) this._grid.update(e.element, {
4006
+ x: e.position.col,
4007
+ y: e.position.row,
4008
+ w: e.position.sizeX,
4009
+ h: e.position.sizeY
4010
+ });
4011
+ this._grid.batchUpdate(!1), setTimeout(() => {
4012
+ this._suppressNextLayoutChangedEvent &&= !1;
4013
+ }, 0);
4014
+ }
4015
+ }
4016
+ _initializeGrid() {
4017
+ this._initialized || !this._gridElement || (this._grid = Cn({
4018
+ gridElement: this._gridElement,
4019
+ gridItemElements: this._gridItemElements,
4020
+ items: this._effectiveItems,
4021
+ columns: this.columns ?? 48,
4022
+ rowHeight: this.rowHeight ?? 16,
4023
+ viewMode: this.viewMode,
4024
+ fullTheme: this._fullTheme,
4025
+ onCreateOrUpdateDimensionsHint: this._createOrUpdateDimensionsHint.bind(this),
4026
+ onRemoveDimensionsHint: this._removeDimensionsHint.bind(this),
4027
+ onChange: (e) => {
4028
+ if (this._suppressNextLayoutChangedEvent) {
4029
+ this._suppressNextLayoutChangedEvent = !1;
4030
+ return;
4031
+ }
4032
+ let t = this._effectiveItems, n = wn(t, e);
4033
+ this._isItemsControlled || this._setInternalItems(n, { reconcileStates: !0 }), b({
4034
+ target: this,
4035
+ eventName: "luzmo-item-grid-layout-changed",
4036
+ detail: {
4037
+ element: this._gridElement,
4038
+ grid: this._grid,
4039
+ items: t,
4040
+ updatedItems: n
4041
+ }
4042
+ }), this._restoreItemsLayout(e);
4043
+ }
4044
+ }), this._initialized = !0, b({
4045
+ target: this,
4046
+ eventName: "luzmo-item-grid-ready",
4047
+ detail: {
4048
+ element: this._gridElement,
4049
+ grid: this._grid,
4050
+ items: this._effectiveItems
4051
+ }
4052
+ }), this._applyItemStates());
4053
+ }
4054
+ _applyItemStates() {
4055
+ let e = this._filterItemStatesToExistingItems(this._effectiveItemStates), t = new Set(Object.entries(e).filter(([, e]) => e.length > 0).map(([e]) => e)), n = [], r = this._gridElement?.querySelectorAll(".grid-stack-item[active]");
4056
+ if (r) for (let e of r) {
4057
+ let n = e.getAttribute("gs-id");
4058
+ (!n || !t.has(n)) && (e.removeAttribute("active"), this._removeItemActionsMenuPopover(e));
4059
+ }
4060
+ if (this._activeItemElement = void 0, this._activeItemActionToggle = void 0, t.size === 0) {
4061
+ this._gridElement?.removeAttribute("has-active-item");
4062
+ return;
4063
+ }
4064
+ for (let [t, r] of Object.entries(e)) {
4065
+ if (r.length === 0) continue;
4066
+ let e = this.getGridItemById(t);
4067
+ if (!e?.element) continue;
4068
+ let i = e.element;
4069
+ i.setAttribute("active", "true"), this._gridElement?.setAttribute("has-active-item", "true"), this._createItemActionsMenuPopover(i, r);
4070
+ for (let e of r) n.push({
4071
+ element: i,
4072
+ action: e
4073
+ });
4074
+ }
4075
+ if (n.length === 0) {
4076
+ this._gridElement?.removeAttribute("has-active-item"), this._activeItemElement = void 0, this._activeItemActionToggle = void 0;
4077
+ return;
4078
+ }
4079
+ n.length === 1 ? (this._activeItemElement = n[0].element, this._activeItemActionToggle = n[0].action) : (this._activeItemElement = void 0, this._activeItemActionToggle = void 0);
4080
+ }
4081
+ _createOrUpdateDimensionsHint(e, t, n) {
4082
+ Tn({
4083
+ element: e,
4084
+ numberOfColumns: t,
4085
+ numberOfRows: n,
4086
+ offsetHint: qt(this._fullTheme)
4087
+ });
4088
+ }
4089
+ _removeDimensionsHint(e) {
4090
+ En(e);
4091
+ }
4092
+ get grid() {
4093
+ return this._grid;
4094
+ }
4095
+ get gridItems() {
4096
+ return pe(this.items, this._gridElement);
4097
+ }
4098
+ registerRenderer(e, t) {
4099
+ this.renderers = {
4100
+ ...this.renderers,
4101
+ [e]: t
4102
+ };
4103
+ }
4104
+ renderItemContent(e, t) {
4105
+ return i`
4106
+
4107
+ `;
4108
+ }
4109
+ getItemRenderDependencies() {
4110
+ return [];
4111
+ }
4112
+ resolveTheme(e, t) {
4113
+ return Promise.resolve(e ? structuredClone(e) : t);
4114
+ }
4115
+ get resolvedTheme() {
4116
+ return this._fullTheme;
4117
+ }
4118
+ renderOverlayContent(e, t) {
4119
+ return i`
4120
+
4121
+ `;
4122
+ }
4123
+ _createItemActionsMenuPopover(e, t) {
4124
+ zt({
4125
+ element: e,
4126
+ activeActions: t,
4127
+ getGridItemById: this.getGridItemById.bind(this),
4128
+ placementItemActionsMenu: this.placementItemActionsMenu,
4129
+ renderOverlayContent: this.renderOverlayContent.bind(this),
4130
+ removeItemActionsMenuPopover: this._removeItemActionsMenuPopover.bind(this),
4131
+ itemActionsDocumentPopover: this.itemActionsDocumentPopover
4132
+ });
4133
+ }
4134
+ _removeItemActionsMenuPopover(e) {
4135
+ Bt(e);
4136
+ }
4137
+ getGridItemById(e) {
4138
+ return this.gridItems.find((t) => t.item.id === e);
4139
+ }
4140
+ scrollToItem(e) {
4141
+ let t = this.getGridItemById(e);
4142
+ if (!t?.element) return;
4143
+ let n = t.element.getBoundingClientRect();
4144
+ (n.bottom > window.innerHeight || n.top < 0) && t.element.scrollIntoView({
4145
+ behavior: "smooth",
4146
+ block: "center"
4147
+ });
4148
+ }
4149
+ _createMissingItemError(e) {
4150
+ return /* @__PURE__ */ Error(`Grid item with id "${e}" not found`);
4151
+ }
4152
+ _requireGridItem(e) {
4153
+ let t = this._effectiveItems.find((t) => t.id === e);
4154
+ if (!t) throw this._createMissingItemError(e);
4155
+ return t;
4156
+ }
4157
+ _resolvePositionFromEngine(e) {
4158
+ let t = this._grid?.engine.nodes.find((t) => t.id === e);
4159
+ if (!(!t || t.x == null || t.y == null || t.w == null || t.h == null)) return {
4160
+ col: t.x,
4161
+ row: t.y,
4162
+ sizeX: t.w,
4163
+ sizeY: t.h
4164
+ };
4165
+ }
4166
+ _requireGridItemWithPosition(e) {
4167
+ let t = this._requireGridItem(e);
4168
+ if (!t.position) {
4169
+ let n = this._resolvePositionFromEngine(e);
4170
+ if (!n) throw Error(`Grid item with id "${e}" does not have a position`);
4171
+ return {
4172
+ ...t,
4173
+ position: n
4174
+ };
4175
+ }
4176
+ return t;
4177
+ }
4178
+ _assertAddItemHasId(e) {
4179
+ if (!e.id) throw Error("addGridItem requires newItem.id");
4180
+ }
4181
+ addGridItem(e) {
4182
+ if (this._assertAddItemHasId(e), this._effectiveItems.some((t) => t.id === e.id)) throw Error(`addGridItem rejected: an item with id "${e.id}" already exists`);
4183
+ let t = ge(e), n = this._effectiveItems;
4184
+ if (!this._grid) {
4185
+ let r = e.position?.col == null || e.position?.row == null ? {
4186
+ ...t,
4187
+ position: void 0
4188
+ } : t, i = [...n, r];
4189
+ return this._isItemsControlled || this._setInternalItems(i, { reconcileStates: !0 }), i;
4190
+ }
4191
+ if (!t.position) {
4192
+ let e = [...n, t];
4193
+ return this._isItemsControlled || this._setInternalItems(e, { reconcileStates: !0 }), e;
4194
+ }
4195
+ let r = e.position?.col == null || e.position?.row == null, { updatedItems: i } = me({
4196
+ item: t,
4197
+ engine: this._grid.engine,
4198
+ existingItems: n,
4199
+ autoPosition: r
4200
+ });
4201
+ return this._isItemsControlled || this._setInternalItems(i, { reconcileStates: !0 }), i;
4202
+ }
4203
+ _enrichItemsWithEnginePositions(e) {
4204
+ return this._grid ? e.map((e) => {
4205
+ if (e.position) return e;
4206
+ let t = this._resolvePositionFromEngine(e.id);
4207
+ return t ? {
4208
+ ...e,
4209
+ position: t
4210
+ } : e;
4211
+ }) : e;
4212
+ }
4213
+ _updateGridItemPosition(e, t) {
4214
+ let n = this._effectiveItems, r = this._requireGridItemWithPosition(e);
4215
+ return n.map((n) => {
4216
+ if (n.id !== e) return n;
4217
+ let i = n.position ?? r.position;
4218
+ return {
4219
+ ...n,
4220
+ position: {
4221
+ ...i,
4222
+ ...t
4223
+ }
4224
+ };
4225
+ });
4226
+ }
4227
+ _dispatchLayoutChangedEvent(e, t) {
4228
+ b({
4229
+ target: this,
4230
+ eventName: "luzmo-item-grid-layout-changed",
4231
+ detail: {
4232
+ element: this._gridElement,
4233
+ grid: this._grid,
4234
+ items: e,
4235
+ updatedItems: t
4236
+ }
4237
+ });
4238
+ }
4239
+ _updateItemField(e, t) {
4240
+ let n = this._effectiveItems;
4241
+ this._requireGridItem(e);
4242
+ let r = n.map((n) => n.id === e ? {
4243
+ ...n,
4244
+ ...t
4245
+ } : n);
4246
+ return this._isItemsControlled || this._setInternalItems(r, { reconcileStates: !0 }), r;
4247
+ }
4248
+ removeGridItem(e) {
4249
+ let t = this._effectiveItems, n = this._requireGridItem(e), r = t.filter((t) => t.id !== e);
4250
+ return v({
4251
+ target: this,
4252
+ action: "delete",
4253
+ actionType: "button",
4254
+ active: !1,
4255
+ items: t,
4256
+ element: this.getGridItemById(e)?.element ?? this,
4257
+ itemId: e,
4258
+ item: n,
4259
+ updatedItems: r
4260
+ }), this._isItemsControlled || this._setInternalItems(r, { reconcileStates: !0 }), r;
4261
+ }
4262
+ cloneGridItem(e) {
4263
+ let t = this._effectiveItems, r = this._requireGridItem(e), i = {
4264
+ ...structuredClone(r),
4265
+ id: n()
4266
+ }, a = this._simulateCloneLayout(i, r), o = a.find((e) => e.id === i.id) ?? i;
4267
+ return v({
4268
+ target: this,
4269
+ action: "clone",
4270
+ actionType: "button",
4271
+ active: !1,
4272
+ items: t,
4273
+ element: this.getGridItemById(e)?.element ?? this,
4274
+ itemId: i.id,
4275
+ item: o,
4276
+ originalElement: this.getGridItemById(e)?.element,
4277
+ updatedItems: a
4278
+ }), this._isItemsControlled || this._setInternalItems(a, { reconcileStates: !0 }), a;
4279
+ }
4280
+ updateGridItemPosition(e, t) {
4281
+ let n = this._updateGridItemPosition(e, t);
4282
+ return this._dispatchLayoutChangedEvent(this._effectiveItems, n), this._isItemsControlled || this._setInternalItems(n, { reconcileStates: !0 }), n;
4283
+ }
4284
+ updateGridItemSize(e, t) {
4285
+ let n = this._updateGridItemPosition(e, t);
4286
+ return this._dispatchLayoutChangedEvent(this._effectiveItems, n), this._isItemsControlled || this._setInternalItems(n, { reconcileStates: !0 }), n;
4287
+ }
4288
+ updateGridItemSlots(e, t) {
4289
+ return this._updateItemField(e, { slots: t });
4290
+ }
4291
+ updateGridItemOptions(e, t) {
4292
+ return this._updateItemField(e, { options: t });
4293
+ }
4294
+ updateGridItemFilters(e, t) {
4295
+ return this._updateItemField(e, { filters: t });
4296
+ }
4297
+ updateGridItemType(e, t) {
4298
+ return this._updateItemField(e, { type: t });
4299
+ }
4300
+ updateGridItem(e, t) {
4301
+ let n = this._effectiveItems;
4302
+ this._requireGridItem(e);
4303
+ let { position: r, ...i } = t, a;
4304
+ return r && this._grid ? (a = he({
4305
+ itemId: e,
4306
+ patch: r,
4307
+ engine: this._grid.engine,
4308
+ existingItems: this._enrichItemsWithEnginePositions(n)
4309
+ }), a = a.map((t) => t.id === e ? {
4310
+ ...t,
4311
+ ...i
4312
+ } : t)) : a = n.map((t) => t.id === e ? {
4313
+ ...t,
4314
+ ...i,
4315
+ ...r && t.position ? { position: {
4316
+ ...t.position,
4317
+ ...r
4318
+ } } : r ? { position: r } : {}
4319
+ } : t), t.position && this._dispatchLayoutChangedEvent(n, a), this._isItemsControlled || this._setInternalItems(a, { reconcileStates: !0 }), a;
4320
+ }
4321
+ async triggerItemAction(e, t, n) {
4322
+ await this.updateComplete;
4323
+ let r = this.getGridItemById(e);
4324
+ if (!r?.element) {
4325
+ console.warn(`Grid item with id "${e}" not found`);
4326
+ return;
4327
+ }
4328
+ if (this._isControlled) return this._triggerControlledItemAction(e, t, n);
4329
+ this._suppressItemStatesEvent = !0;
4330
+ let i = ae({
4331
+ gridElement: this._gridElement,
4332
+ items: this.items,
4333
+ gridItemData: r,
4334
+ itemId: e,
4335
+ action: t,
4336
+ options: n,
4337
+ state: {
4338
+ activeItemElement: this._activeItemElement,
4339
+ activeItemActionToggle: this._activeItemActionToggle
4340
+ },
4341
+ cleanupActiveItem: this._cleanupActiveItem.bind(this),
4342
+ dispatchItemActionEvent: this._dispatchItemActionEvent.bind(this),
4343
+ createItemActionsMenuPopover: this._createItemActionsMenuPopover.bind(this)
4344
+ });
4345
+ if (this._suppressItemStatesEvent = !1, this._activeItemElement = i.state.activeItemElement, this._activeItemActionToggle = i.state.activeItemActionToggle, i.result !== void 0) {
4346
+ let n = this._effectiveItemStates, r = this._computeNextItemStates(e, t, i.result);
4347
+ this._internalItemStates = r, y({
4348
+ target: this,
4349
+ itemStates: n,
4350
+ updatedItemStates: r,
4351
+ changedItemStates: this._diffItemStates(n, r)
4352
+ });
4353
+ }
4354
+ return i.result;
4355
+ }
4356
+ activateItemAction(e, t, n) {
4357
+ return this.triggerItemAction(e, t, n);
4358
+ }
4359
+ _triggerControlledItemAction(e, t, n) {
4360
+ let r = (this._effectiveItemStates[e] ?? []).includes(t), i = n?.active ?? !r;
4361
+ if (n?.active !== void 0 && i === r) return r;
4362
+ let a = this._effectiveItemStates, o = this._computeNextItemStates(e, t, i);
4363
+ return y({
4364
+ target: this,
4365
+ itemStates: a,
4366
+ updatedItemStates: o,
4367
+ changedItemStates: { [e]: [t] }
4368
+ }), i;
4369
+ }
4370
+ deactivateItems() {
4371
+ if (this._isControlled) {
4372
+ let e = this._effectiveItemStates, t = Object.entries(e).flatMap(([e, t]) => t.map((t) => ({
4373
+ itemId: e,
4374
+ action: t
4375
+ })));
4376
+ if (t.length === 0) return 0;
4377
+ let n = {}, r = { ...e };
4378
+ for (let e of t) r = this._computeNextItemStates(e.itemId, e.action, !1, r), n[e.itemId] = [...n[e.itemId] ?? [], e.action];
4379
+ return y({
4380
+ target: this,
4381
+ itemStates: e,
4382
+ updatedItemStates: r,
4383
+ changedItemStates: n
4384
+ }), new Set(t.map((e) => e.itemId)).size;
4385
+ }
4386
+ let e = this._effectiveItemStates, t = Object.entries(e).flatMap(([e, t]) => t.map((t) => ({
4387
+ itemId: e,
4388
+ action: t
4389
+ })));
4390
+ this._suppressItemStatesEvent = !0;
4391
+ let n = oe({
4392
+ gridElement: this._gridElement,
4393
+ items: this.items,
4394
+ state: {
4395
+ activeItemElement: this._activeItemElement,
4396
+ activeItemActionToggle: this._activeItemActionToggle
4397
+ },
4398
+ cleanupActiveItem: this._cleanupActiveItem.bind(this),
4399
+ dispatchItemActionEvent: this._dispatchItemActionEvent.bind(this)
4400
+ });
4401
+ if (this._suppressItemStatesEvent = !1, this._activeItemElement = n.state.activeItemElement, this._activeItemActionToggle = n.state.activeItemActionToggle, this._isControlled || (this._internalItemStates = {}), t.length > 0) {
4402
+ let n = {};
4403
+ for (let e of t) n[e.itemId] = [...n[e.itemId] ?? [], e.action];
4404
+ y({
4405
+ target: this,
4406
+ itemStates: e,
4407
+ updatedItemStates: {},
4408
+ changedItemStates: n
4409
+ });
4410
+ }
4411
+ return n.deactivatedCount;
4412
+ }
4413
+ _renderGrid() {
4414
+ return en({
4415
+ items: this.items,
4416
+ initialized: this._initialized,
4417
+ viewMode: this.viewMode,
4418
+ fullTheme: this._fullTheme,
4419
+ columns: this.columns ?? 48,
4420
+ renderItemContent: this.renderItemContent.bind(this),
4421
+ renderDependencies: this.getItemRenderDependencies(),
4422
+ ensureGridItemId: (e) => le(e),
4423
+ handleMouseover: this._handleMouseover.bind(this),
4424
+ handleMouseout: this._handleMouseout,
4425
+ handleFocus: this._handleFocus,
4426
+ handleBlur: this._handleBlur
4427
+ });
4428
+ }
4429
+ render() {
4430
+ return this._renderGrid();
4431
+ }
4432
+ };
4433
+ e([s({
4434
+ type: String,
4435
+ reflect: !0
4436
+ })], $.prototype, "language", void 0), e([s({
4437
+ type: String,
4438
+ attribute: "content-language",
4439
+ reflect: !0
4440
+ })], $.prototype, "contentLanguage", void 0), e([s({
4441
+ type: Number,
4442
+ reflect: !0
4443
+ })], $.prototype, "columns", void 0), e([s({
4444
+ type: Number,
4445
+ reflect: !0,
4446
+ attribute: "row-height"
4447
+ })], $.prototype, "rowHeight", void 0), e([s({
4448
+ type: Boolean,
4449
+ reflect: !0,
4450
+ attribute: "view-mode"
4451
+ })], $.prototype, "viewMode", void 0), e([s({
4452
+ type: Boolean,
4453
+ reflect: !0,
4454
+ attribute: "item-actions-document-popover"
4455
+ })], $.prototype, "itemActionsDocumentPopover", void 0), e([s({
4456
+ type: String,
4457
+ reflect: !0,
4458
+ attribute: "placement-item-actions-menu"
4459
+ })], $.prototype, "placementItemActionsMenu", void 0), e([s({
4460
+ type: Array,
4461
+ reflect: !0,
4462
+ attribute: "default-item-actions-menu"
4463
+ })], $.prototype, "defaultItemActionsMenu", void 0), e([s({
4464
+ type: String,
4465
+ reflect: !0,
4466
+ attribute: "cloned-item-positioning"
4467
+ })], $.prototype, "clonedItemPositioning", void 0), e([s({
4468
+ type: Object,
4469
+ reflect: !0
4470
+ })], $.prototype, "theme", void 0), e([s({
4471
+ type: Array,
4472
+ reflect: !1
4473
+ })], $.prototype, "items", null), e([s({
4474
+ type: Array,
4475
+ reflect: !1,
4476
+ attribute: "initial-items"
4477
+ })], $.prototype, "initialItems", null), e([s({
4478
+ type: Object,
4479
+ reflect: !1
4480
+ })], $.prototype, "renderers", void 0), e([s({
4481
+ type: Object,
4482
+ reflect: !1,
4483
+ attribute: "item-states"
4484
+ })], $.prototype, "itemStates", null), e([s({
4485
+ type: Object,
4486
+ reflect: !1,
4487
+ attribute: "initial-item-states"
4488
+ })], $.prototype, "initialItemStates", void 0), e([u()], $.prototype, "_initialized", void 0), e([c(".grid-stack")], $.prototype, "_gridElement", void 0), e([l(".luzmo-item-grid-item")], $.prototype, "_gridItemElements", void 0), e([u()], $.prototype, "_internalItemsVersion", void 0);
4489
+ //#endregion
4490
+ export { pe as n, $ as t };