@luzmo/analytics-components-kit 1.0.1-alpha.94 → 1.0.1-alpha.96

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 (560) hide show
  1. package/components/ai-chat-message-user/index.cjs +0 -19
  2. package/components/ai-chat-messages-container/index.cjs +0 -19
  3. package/components/ai-interaction-textarea/index.cjs +0 -19
  4. package/components/dataset-icon/index.cjs +0 -19
  5. package/components/dataset-selector-list/index.cjs +1 -20
  6. package/components/dataset-selector-list/index.js +1 -1
  7. package/components/dataset-selector-row/index.cjs +0 -19
  8. package/components/display-settings-binning/index.cjs +0 -19
  9. package/components/display-settings-numeric/index.js +42 -51
  10. package/components/draggable-data-item-level/index.js +1 -1
  11. package/components/droppable-slot/index.js +2 -2
  12. package/components/edit-option-color-picker/index.cjs +0 -19
  13. package/components/edit-option-multi-language-field/index.cjs +0 -19
  14. package/components/edit-option-number-field/index.cjs +0 -19
  15. package/components/edit-option-picker/index.cjs +0 -19
  16. package/components/edit-option-radio-button-group/index.cjs +0 -19
  17. package/components/edit-option-slider/index.cjs +0 -19
  18. package/components/edit-option-text-field/index.cjs +0 -19
  19. package/components/filter-item/index.js +1 -1
  20. package/components/filter-value-picker-hierarchy/index.js +1 -1
  21. package/components/filter-value-picker-numeric/index.js +1 -1
  22. package/components/index.cjs +0 -19
  23. package/components/item-list.cjs +0 -19
  24. package/components/item-options-configs.cjs +0 -19
  25. package/components/slot-menu/index.js +1 -1
  26. package/components/slot-menu-list/index.js +3 -3
  27. package/components/utils.js +1 -1
  28. package/components/widget-menu/index.js +3 -1
  29. package/package.json +3 -3
  30. package/components/ai-chat-message-assistant/ai-chat-message-assistant.d.ts +0 -29
  31. package/components/ai-chat-message-assistant/index.cjs +0 -52
  32. package/components/ai-chat-message-assistant/index.d.ts +0 -7
  33. package/components/ai-chat-message-user/ai-chat-message-user.d.ts +0 -13
  34. package/components/ai-chat-message-user/index.d.ts +0 -7
  35. package/components/ai-chat-messages-container/ai-chat-messages-container.d.ts +0 -11
  36. package/components/ai-chat-messages-container/index.d.ts +0 -7
  37. package/components/ai-interaction-textarea/ai-interaction-textarea.d.ts +0 -83
  38. package/components/ai-interaction-textarea/index.d.ts +0 -7
  39. package/components/area-chart-options.config-C7sMAHco.cjs +0 -20
  40. package/components/area-chart-options.de-D_LVLa1H.cjs +0 -20
  41. package/components/area-chart-options.en-IauEvPHP.cjs +0 -20
  42. package/components/area-chart-options.es-CmPycXn2.cjs +0 -20
  43. package/components/area-chart-options.fr-BMnkGWlJ.cjs +0 -20
  44. package/components/area-chart-options.nl-C7-N_idS.cjs +0 -20
  45. package/components/area-chart-slots.config-Dx_ysVZK.cjs +0 -20
  46. package/components/bar-chart-options.config-DcxEkOT5.cjs +0 -20
  47. package/components/bar-chart-options.de-Dr5zKz8Q.cjs +0 -20
  48. package/components/bar-chart-options.en-DdQ2PYrw.cjs +0 -20
  49. package/components/bar-chart-options.es-DgYVxn9U.cjs +0 -20
  50. package/components/bar-chart-options.fr-rteFm93C.cjs +0 -20
  51. package/components/bar-chart-options.nl--gwlkpc0.cjs +0 -20
  52. package/components/bar-chart-slots.config-c_9ABPOI.cjs +0 -20
  53. package/components/bliss-DQej6Odb.cjs +0 -20
  54. package/components/box-plot-options.config-SrrbDEYW.cjs +0 -20
  55. package/components/box-plot-options.de-QbWt-xja.cjs +0 -20
  56. package/components/box-plot-options.en-CZhtAYXJ.cjs +0 -20
  57. package/components/box-plot-options.es-lyXLMKKo.cjs +0 -20
  58. package/components/box-plot-options.fr-BXh76t2K.cjs +0 -20
  59. package/components/box-plot-options.nl-DDAzT-zP.cjs +0 -20
  60. package/components/box-plot-slots.config-K-1CiWO-.cjs +0 -20
  61. package/components/bubble-chart-options.config-Ihn6eVQI.cjs +0 -20
  62. package/components/bubble-chart-options.de-D2Z88fwi.cjs +0 -20
  63. package/components/bubble-chart-options.en-CP9PhuPw.cjs +0 -20
  64. package/components/bubble-chart-options.es-B6mTDtxs.cjs +0 -20
  65. package/components/bubble-chart-options.fr-BMPe3Z5G.cjs +0 -20
  66. package/components/bubble-chart-options.nl-5thQrFoi.cjs +0 -20
  67. package/components/bubble-chart-slots.config-BwSwgleO.cjs +0 -20
  68. package/components/bullet-chart-options.config-DfS4Bwds.cjs +0 -20
  69. package/components/bullet-chart-options.de-D0XaMKPn.cjs +0 -20
  70. package/components/bullet-chart-options.en-BPjbk6Lk.cjs +0 -20
  71. package/components/bullet-chart-options.es-DxC9GWBS.cjs +0 -20
  72. package/components/bullet-chart-options.fr-Cf_rodY7.cjs +0 -20
  73. package/components/bullet-chart-options.nl-BdIjKMZf.cjs +0 -20
  74. package/components/bullet-chart-slots.config-DQarxMR7.cjs +0 -20
  75. package/components/calculate-data-item-icon-CEa82-5u.cjs +0 -20
  76. package/components/choropleth-map-options.config-ZW8yoZH2.cjs +0 -20
  77. package/components/choropleth-map-options.de-C4ko9lE4.cjs +0 -20
  78. package/components/choropleth-map-options.en-DVWBmXFe.cjs +0 -20
  79. package/components/choropleth-map-options.es-v5dYm1W3.cjs +0 -20
  80. package/components/choropleth-map-options.fr-Bpk_J4Gw.cjs +0 -20
  81. package/components/choropleth-map-options.nl-CyDZDpyE.cjs +0 -20
  82. package/components/choropleth-map-slots.config-CFERs0ca.cjs +0 -20
  83. package/components/circle-pack-chart-options.config-DWql72cN.cjs +0 -20
  84. package/components/circle-pack-chart-options.de-BKCxSgFo.cjs +0 -20
  85. package/components/circle-pack-chart-options.en-8QoEZniy.cjs +0 -20
  86. package/components/circle-pack-chart-options.es-BAdMklie.cjs +0 -20
  87. package/components/circle-pack-chart-options.fr-Dx2iO7nE.cjs +0 -20
  88. package/components/circle-pack-chart-options.nl-BEbtjCy_.cjs +0 -20
  89. package/components/circle-pack-chart-slots.config-B18aqdH1.cjs +0 -20
  90. package/components/circular-gauge-options.config-msZ4mfpN.cjs +0 -20
  91. package/components/circular-gauge-options.de-CzEREduR.cjs +0 -20
  92. package/components/circular-gauge-options.en--hMYjiKb.cjs +0 -20
  93. package/components/circular-gauge-options.es-bS5N1QyR.cjs +0 -20
  94. package/components/circular-gauge-options.fr-VgkkhIDb.cjs +0 -20
  95. package/components/circular-gauge-options.nl-B-E_GXJl.cjs +0 -20
  96. package/components/circular-gauge-slots.config-Cd-nkNPm.cjs +0 -20
  97. package/components/classic-CW66MgMj.cjs +0 -20
  98. package/components/classic-dark-DCtf8kpl.cjs +0 -20
  99. package/components/color-B6LaL8qz.cjs +0 -20
  100. package/components/color-palettes-DhNHcib8.cjs +0 -20
  101. package/components/color-range-utils-C5yXW7ZC.cjs +0 -20
  102. package/components/column-chart-options.config-BjDvA7i9.cjs +0 -20
  103. package/components/column-chart-options.de-BU__cJy3.cjs +0 -20
  104. package/components/column-chart-options.en-DdQ2PYrw.cjs +0 -20
  105. package/components/column-chart-options.es-CkaTU6qn.cjs +0 -20
  106. package/components/column-chart-options.fr-rteFm93C.cjs +0 -20
  107. package/components/column-chart-options.nl-Bhe6rcUo.cjs +0 -20
  108. package/components/column-chart-slots.config-C0nGjkmv.cjs +0 -20
  109. package/components/combination-chart-options.config-CyYEp-gX.cjs +0 -20
  110. package/components/combination-chart-options.de-CuVQ-JHu.cjs +0 -20
  111. package/components/combination-chart-options.en-BPcGTsP4.cjs +0 -20
  112. package/components/combination-chart-options.es-Dy7jzzFy.cjs +0 -20
  113. package/components/combination-chart-options.fr-CLUyqNH7.cjs +0 -20
  114. package/components/combination-chart-options.nl-BF6joCMV.cjs +0 -20
  115. package/components/combination-chart-slots.config-CY07Q5Hw.cjs +0 -20
  116. package/components/conditional-number-options.config-DgzUo0xi.cjs +0 -20
  117. package/components/conditional-number-options.de-R9Mtj45x.cjs +0 -20
  118. package/components/conditional-number-options.en-C-nOJ85m.cjs +0 -20
  119. package/components/conditional-number-options.es-C41csR3J.cjs +0 -20
  120. package/components/conditional-number-options.fr-DgaXesnu.cjs +0 -20
  121. package/components/conditional-number-options.nl-CJ5teRtT.cjs +0 -20
  122. package/components/conditional-number-slots.config-CD5ZwXuY.cjs +0 -20
  123. package/components/cs-I9E81keK.cjs +0 -20
  124. package/components/da-QkdvupDg.cjs +0 -20
  125. package/components/dataset-icon/dataset-icon.d.ts +0 -45
  126. package/components/dataset-icon/index.d.ts +0 -7
  127. package/components/dataset-selector-list/dataset-selector-list.d.ts +0 -94
  128. package/components/dataset-selector-list/index.d.ts +0 -7
  129. package/components/dataset-selector-row/dataset-selector-row.d.ts +0 -85
  130. package/components/dataset-selector-row/index.d.ts +0 -7
  131. package/components/date-comparison-filter-options.config-DAVncmi0.cjs +0 -20
  132. package/components/date-comparison-filter-options.de-CJBePtFH.cjs +0 -20
  133. package/components/date-comparison-filter-options.en-Of-X7-Ft.cjs +0 -20
  134. package/components/date-comparison-filter-options.es-CU3KrdQh.cjs +0 -20
  135. package/components/date-comparison-filter-options.fr-U0cC2xXg.cjs +0 -20
  136. package/components/date-comparison-filter-options.nl-DJGHjXwg.cjs +0 -20
  137. package/components/date-comparison-filter-slots.config-CrA5ijD3.cjs +0 -20
  138. package/components/date-filter-options.config-CWPMtA18.cjs +0 -20
  139. package/components/date-filter-options.de-Cav0BXbX.cjs +0 -20
  140. package/components/date-filter-options.en-B7MjV7xe.cjs +0 -20
  141. package/components/date-filter-options.es-C__wCKac.cjs +0 -20
  142. package/components/date-filter-options.fr-CFqwPRzc.cjs +0 -20
  143. package/components/date-filter-options.nl-CHOlmw93.cjs +0 -20
  144. package/components/date-filter-slots.config-CrA5ijD3.cjs +0 -20
  145. package/components/de-COKGBX9L.cjs +0 -20
  146. package/components/de-Dn5mUzha.cjs +0 -20
  147. package/components/decompose-numeric-format-B3rVVHpO.cjs +0 -20
  148. package/components/default-DcRD5JRU.cjs +0 -20
  149. package/components/default-dark-1299UcUs.cjs +0 -20
  150. package/components/display-settings/display-settings.d.ts +0 -90
  151. package/components/display-settings/index.cjs +0 -20
  152. package/components/display-settings/index.d.ts +0 -7
  153. package/components/display-settings-binning/display-settings-binning.d.ts +0 -33
  154. package/components/display-settings-binning/index.d.ts +0 -7
  155. package/components/display-settings-datetime/display-settings-datetime.d.ts +0 -86
  156. package/components/display-settings-datetime/index.cjs +0 -215
  157. package/components/display-settings-datetime/index.d.ts +0 -7
  158. package/components/display-settings-grand-totals/display-settings-grand-totals.d.ts +0 -31
  159. package/components/display-settings-grand-totals/index.cjs +0 -44
  160. package/components/display-settings-grand-totals/index.d.ts +0 -7
  161. package/components/display-settings-numeric/display-settings-numeric.d.ts +0 -85
  162. package/components/display-settings-numeric/helpers/constants.d.ts +0 -19
  163. package/components/display-settings-numeric/index.cjs +0 -183
  164. package/components/display-settings-numeric/index.d.ts +0 -7
  165. package/components/display-settings-period-over-period/display-settings-period-over-period.d.ts +0 -68
  166. package/components/display-settings-period-over-period/helpers/constants.d.ts +0 -44
  167. package/components/display-settings-period-over-period/index.cjs +0 -224
  168. package/components/display-settings-period-over-period/index.d.ts +0 -7
  169. package/components/donut-chart-options.config-tNpqBZfR.cjs +0 -20
  170. package/components/donut-chart-options.de-LQ01wQGN.cjs +0 -20
  171. package/components/donut-chart-options.en-DHCYs2el.cjs +0 -20
  172. package/components/donut-chart-options.es-BLDU1xpY.cjs +0 -20
  173. package/components/donut-chart-options.fr-C33dLw52.cjs +0 -20
  174. package/components/donut-chart-options.nl-h5-SSy_L.cjs +0 -20
  175. package/components/donut-chart-slots.config-DBowIZNO.cjs +0 -20
  176. package/components/draggable-data-item/draggable-data-item.d.ts +0 -26
  177. package/components/draggable-data-item/index.cjs +0 -48
  178. package/components/draggable-data-item/index.d.ts +0 -8
  179. package/components/draggable-data-item/types.d.ts +0 -21
  180. package/components/draggable-data-item-level/draggable-data-item-level.d.ts +0 -34
  181. package/components/draggable-data-item-level/helpers/generate-preview.d.ts +0 -9
  182. package/components/draggable-data-item-level/index.cjs +0 -50
  183. package/components/draggable-data-item-level/index.d.ts +0 -7
  184. package/components/draggable-data-item-level/types.d.ts +0 -12
  185. package/components/dropdown-filter-options.config-DS-MORmq.cjs +0 -20
  186. package/components/dropdown-filter-options.de-WLFUtnO_.cjs +0 -20
  187. package/components/dropdown-filter-options.en-txvgrhI8.cjs +0 -20
  188. package/components/dropdown-filter-options.es-C-U0fQJO.cjs +0 -20
  189. package/components/dropdown-filter-options.fr-Bl7uZNdT.cjs +0 -20
  190. package/components/dropdown-filter-options.nl-DIvw6DFh.cjs +0 -20
  191. package/components/dropdown-filter-slots.config-0wn6pMvi.cjs +0 -20
  192. package/components/droppable-slot/droppable-slot.d.ts +0 -86
  193. package/components/droppable-slot/index.cjs +0 -84
  194. package/components/droppable-slot/index.d.ts +0 -8
  195. package/components/droppable-slot/item-slots-configs/index.d.ts +0 -45
  196. package/components/droppable-slot/item-slots-configs/slot-labels.const.d.ts +0 -8
  197. package/components/droppable-slot/types.d.ts +0 -9
  198. package/components/edit-item/edit-item.d.ts +0 -55
  199. package/components/edit-item/index.cjs +0 -53
  200. package/components/edit-item/index.d.ts +0 -7
  201. package/components/edit-option/edit-option.d.ts +0 -24
  202. package/components/edit-option/helpers/control-markup.d.ts +0 -14
  203. package/components/edit-option/helpers/control-templates/action-button-group-template.d.ts +0 -2
  204. package/components/edit-option/helpers/control-templates/color-palette-picker-template.d.ts +0 -2
  205. package/components/edit-option/helpers/control-templates/color-picker-template.d.ts +0 -2
  206. package/components/edit-option/helpers/control-templates/color-range-template.d.ts +0 -2
  207. package/components/edit-option/helpers/control-templates/multi-language-field-template.d.ts +0 -8
  208. package/components/edit-option/helpers/control-templates/number-field-template.d.ts +0 -2
  209. package/components/edit-option/helpers/control-templates/picker-template.d.ts +0 -2
  210. package/components/edit-option/helpers/control-templates/position-picker-template.d.ts +0 -2
  211. package/components/edit-option/helpers/control-templates/positions-number-field-template.d.ts +0 -2
  212. package/components/edit-option/helpers/control-templates/radio-button-group.d.ts +0 -2
  213. package/components/edit-option/helpers/control-templates/slider-template.d.ts +0 -2
  214. package/components/edit-option/helpers/control-templates/switch-template.d.ts +0 -2
  215. package/components/edit-option/helpers/control-templates/text-field-template.d.ts +0 -7
  216. package/components/edit-option/helpers/generate-callback.d.ts +0 -1
  217. package/components/edit-option/helpers/get-control-by-key.d.ts +0 -1
  218. package/components/edit-option/helpers/get-default-value.d.ts +0 -1
  219. package/components/edit-option/helpers/get-enum-values.d.ts +0 -1
  220. package/components/edit-option/helpers/get-extra-label-values.d.ts +0 -7
  221. package/components/edit-option/helpers/get-value-by-key.d.ts +0 -1
  222. package/components/edit-option/index.cjs +0 -20
  223. package/components/edit-option/index.d.ts +0 -7
  224. package/components/edit-option-action-button-group/edit-option-action-button-group.d.ts +0 -27
  225. package/components/edit-option-action-button-group/index.cjs +0 -52
  226. package/components/edit-option-action-button-group/index.d.ts +0 -7
  227. package/components/edit-option-base/edit-option-base.d.ts +0 -23
  228. package/components/edit-option-base-VhTih9T1.cjs +0 -53
  229. package/components/edit-option-color-palette-picker/edit-option-color-palette-picker.d.ts +0 -42
  230. package/components/edit-option-color-palette-picker/index.cjs +0 -37
  231. package/components/edit-option-color-palette-picker/index.d.ts +0 -7
  232. package/components/edit-option-color-picker/edit-option-color-picker.d.ts +0 -28
  233. package/components/edit-option-color-picker/index.d.ts +0 -7
  234. package/components/edit-option-color-range/edit-option-color-range.d.ts +0 -99
  235. package/components/edit-option-color-range/index.cjs +0 -85
  236. package/components/edit-option-color-range/index.d.ts +0 -7
  237. package/components/edit-option-multi-language-field/edit-option-multi-language-field.d.ts +0 -17
  238. package/components/edit-option-multi-language-field/index.d.ts +0 -7
  239. package/components/edit-option-number-field/edit-option-number-field.d.ts +0 -21
  240. package/components/edit-option-number-field/index.d.ts +0 -7
  241. package/components/edit-option-picker/edit-option-picker.d.ts +0 -22
  242. package/components/edit-option-picker/index.d.ts +0 -7
  243. package/components/edit-option-position-picker/edit-option-position-picker.d.ts +0 -13
  244. package/components/edit-option-position-picker/index.cjs +0 -25
  245. package/components/edit-option-position-picker/index.d.ts +0 -7
  246. package/components/edit-option-positions-number-field/edit-option-positions-number-field.d.ts +0 -30
  247. package/components/edit-option-positions-number-field/index.cjs +0 -42
  248. package/components/edit-option-positions-number-field/index.d.ts +0 -7
  249. package/components/edit-option-radio-button-group/edit-option-radio-button-group.d.ts +0 -18
  250. package/components/edit-option-radio-button-group/index.d.ts +0 -7
  251. package/components/edit-option-slider/edit-option-slider.d.ts +0 -15
  252. package/components/edit-option-slider/index.d.ts +0 -7
  253. package/components/edit-option-switch/edit-option-switch.d.ts +0 -11
  254. package/components/edit-option-switch/index.cjs +0 -30
  255. package/components/edit-option-switch/index.d.ts +0 -7
  256. package/components/edit-option-text-field/edit-option-text-field.d.ts +0 -15
  257. package/components/edit-option-text-field/index.d.ts +0 -7
  258. package/components/en-BKBhKBXY.cjs +0 -20
  259. package/components/en-GB-DG6uS3sM.cjs +0 -20
  260. package/components/es-CaKfa7fn.cjs +0 -20
  261. package/components/es-CwyPlN5d.cjs +0 -20
  262. package/components/evolution-number-options.config-BgIZY4gQ.cjs +0 -20
  263. package/components/evolution-number-options.de-BVv1Uutc.cjs +0 -20
  264. package/components/evolution-number-options.en-CiZmE5r7.cjs +0 -20
  265. package/components/evolution-number-options.es-k2eY1Y3G.cjs +0 -20
  266. package/components/evolution-number-options.fr-B47Fwd-D.cjs +0 -20
  267. package/components/evolution-number-options.nl-CTppS5EY.cjs +0 -20
  268. package/components/evolution-number-slots.config-CNNVp6vR.cjs +0 -20
  269. package/components/extrapolate-color-0j_AeYkz.cjs +0 -20
  270. package/components/fi-rijeZE5V.cjs +0 -20
  271. package/components/filter-data-item-picker/filter-data-item-picker.d.ts +0 -76
  272. package/components/filter-data-item-picker/index.cjs +0 -47
  273. package/components/filter-data-item-picker/index.d.ts +0 -7
  274. package/components/filter-expression-picker/filter-expression-picker.d.ts +0 -74
  275. package/components/filter-expression-picker/index.cjs +0 -20
  276. package/components/filter-expression-picker/index.d.ts +0 -7
  277. package/components/filter-group/filter-group.d.ts +0 -26
  278. package/components/filter-group/index.d.ts +0 -7
  279. package/components/filter-item/filter-item.d.ts +0 -76
  280. package/components/filter-item/index.cjs +0 -52
  281. package/components/filter-item/index.d.ts +0 -7
  282. package/components/filter-parameter-picker/filter-parameter-picker.d.ts +0 -25
  283. package/components/filter-parameter-picker/index.d.ts +0 -7
  284. package/components/filter-value-picker/filter-value-picker.d.ts +0 -65
  285. package/components/filter-value-picker/index.cjs +0 -51
  286. package/components/filter-value-picker/index.d.ts +0 -7
  287. package/components/filter-value-picker-datetime/filter-value-picker-datetime.d.ts +0 -43
  288. package/components/filter-value-picker-datetime/index.cjs +0 -39
  289. package/components/filter-value-picker-datetime/index.d.ts +0 -7
  290. package/components/filter-value-picker-hierarchy/filter-value-picker-hierarchy.d.ts +0 -82
  291. package/components/filter-value-picker-hierarchy/index.cjs +0 -46
  292. package/components/filter-value-picker-hierarchy/index.d.ts +0 -7
  293. package/components/filter-value-picker-numeric/filter-value-picker-numeric.d.ts +0 -83
  294. package/components/filter-value-picker-numeric/index.cjs +0 -46
  295. package/components/filter-value-picker-numeric/index.d.ts +0 -7
  296. package/components/focusable-B3E_hQmm.cjs +0 -20
  297. package/components/fr-BcgE-6S_.cjs +0 -20
  298. package/components/fr-DiZbjx_a.cjs +0 -20
  299. package/components/funnel-chart-options.config-D7H7gFcx.cjs +0 -20
  300. package/components/funnel-chart-options.de-DRAGes5d.cjs +0 -20
  301. package/components/funnel-chart-options.en-b6BBKfZh.cjs +0 -20
  302. package/components/funnel-chart-options.es-DfDw5S5g.cjs +0 -20
  303. package/components/funnel-chart-options.fr-DWkPkC47.cjs +0 -20
  304. package/components/funnel-chart-options.nl-BdAL0ZJP.cjs +0 -20
  305. package/components/funnel-chart-slots.config-GKBCY9xN.cjs +0 -20
  306. package/components/get-css-variable-BEYG097C.js +0 -1446
  307. package/components/get-css-variable-BZxY4IOa.cjs +0 -35
  308. package/components/get-css-variable-DLiZYZEi.cjs +0 -24
  309. package/components/grid/actions.d.ts +0 -3
  310. package/components/grid/grid-item-actions-menu.d.ts +0 -35
  311. package/components/grid/grid.d.ts +0 -150
  312. package/components/grid/index.cjs +0 -319
  313. package/components/grid/index.d.ts +0 -10
  314. package/components/he-O6Ih8Bqh.cjs +0 -20
  315. package/components/heat-map-options.config-DVH-Bb5-.cjs +0 -20
  316. package/components/heat-map-options.de-CCzVMy-R.cjs +0 -20
  317. package/components/heat-map-options.en-Bg7i7QKn.cjs +0 -20
  318. package/components/heat-map-options.es-BYyHRdIH.cjs +0 -20
  319. package/components/heat-map-options.fr-CLB-XMRA.cjs +0 -20
  320. package/components/heat-map-options.nl-BHrmi96k.cjs +0 -20
  321. package/components/heat-map-slots.config-D7cSAVdX.cjs +0 -20
  322. package/components/heat-table-options.config-B12JEYnp.cjs +0 -20
  323. package/components/heat-table-options.de-cnjPxQep.cjs +0 -20
  324. package/components/heat-table-options.en-Bjqpkm75.cjs +0 -20
  325. package/components/heat-table-options.es-IaNf_Ge4.cjs +0 -20
  326. package/components/heat-table-options.fr-BdZnJYlb.cjs +0 -20
  327. package/components/heat-table-options.nl-DGS7vzoT.cjs +0 -20
  328. package/components/heat-table-slots.config-GGX3BCh1.cjs +0 -20
  329. package/components/helpers-DXQwEH1P.cjs +0 -20
  330. package/components/hexbin-map-options.config-DZERRhM8.cjs +0 -20
  331. package/components/hexbin-map-options.de-DUp41p9I.cjs +0 -20
  332. package/components/hexbin-map-options.en-B10UanAQ.cjs +0 -20
  333. package/components/hexbin-map-options.es-97IUVMSg.cjs +0 -20
  334. package/components/hexbin-map-options.fr-Bh9Swyi3.cjs +0 -20
  335. package/components/hexbin-map-options.nl-BzyMf0JQ.cjs +0 -20
  336. package/components/hexbin-map-slots.config-D7cSAVdX.cjs +0 -20
  337. package/components/hu-BnZ8y3xQ.cjs +0 -20
  338. package/components/image-options.config-Dqhc2c3b.cjs +0 -20
  339. package/components/image-options.de-CBkRiIbw.cjs +0 -20
  340. package/components/image-options.en-DflcU_2H.cjs +0 -20
  341. package/components/image-options.es-CRbNv384.cjs +0 -20
  342. package/components/image-options.fr-ycH7UoX5.cjs +0 -20
  343. package/components/image-options.nl-DQL45o0j.cjs +0 -20
  344. package/components/image-slots.config-mPXMR1CE.cjs +0 -20
  345. package/components/index-6PmXiNch.cjs +0 -20
  346. package/components/index-BPNsFiyq.cjs +0 -38
  347. package/components/index-CQ9ck-BO.cjs +0 -249
  348. package/components/index-CXn67vdn.cjs +0 -121
  349. package/components/index-Cz9vSXy6.cjs +0 -20
  350. package/components/index-DhDgy1sp.cjs +0 -20
  351. package/components/index-Dn0j_pcR.cjs +0 -20
  352. package/components/index-E239Dotg.js +0 -1735
  353. package/components/index-Vdyb9z2D.cjs +0 -20
  354. package/components/it-PshtLMkq.cjs +0 -20
  355. package/components/item-context-configs.cjs +0 -226
  356. package/components/item-menu/item-list/item-list.d.ts +0 -37
  357. package/components/item-slots-configs.cjs +0 -20
  358. package/components/ja-KIS2HdaG.cjs +0 -20
  359. package/components/ko--l4qmjLV.cjs +0 -20
  360. package/components/line-chart-options.config-DSugoe0t.cjs +0 -20
  361. package/components/line-chart-options.de-zuguhS7L.cjs +0 -20
  362. package/components/line-chart-options.en-C88UT2iR.cjs +0 -20
  363. package/components/line-chart-options.es-CvABRdF7.cjs +0 -20
  364. package/components/line-chart-options.fr-BtfgIPkW.cjs +0 -20
  365. package/components/line-chart-options.nl-mAxtSkJo.cjs +0 -20
  366. package/components/line-chart-slots.config-Dx_ysVZK.cjs +0 -20
  367. package/components/localize-r7ALOUy_.cjs +0 -20
  368. package/components/marker-map-options.config-_FYZzRwA.cjs +0 -20
  369. package/components/marker-map-options.de-BsQQMw02.cjs +0 -20
  370. package/components/marker-map-options.en-CS9itUOA.cjs +0 -20
  371. package/components/marker-map-options.es-A5ZV4oul.cjs +0 -20
  372. package/components/marker-map-options.fr-yEc1vbcL.cjs +0 -20
  373. package/components/marker-map-options.nl-YdcS3JJg.cjs +0 -20
  374. package/components/marker-map-slots.config-D7cSAVdX.cjs +0 -20
  375. package/components/mk-DZlj-edb.cjs +0 -20
  376. package/components/nl-BKlDqOXb.cjs +0 -20
  377. package/components/nl-Bot6bJ4g.cjs +0 -20
  378. package/components/no-D_SzxhTu.cjs +0 -20
  379. package/components/ohlc-chart-options.config-BLlRV_bs.cjs +0 -20
  380. package/components/ohlc-chart-options.de-D82a4TlN.cjs +0 -20
  381. package/components/ohlc-chart-options.en-WsfJ9z1E.cjs +0 -20
  382. package/components/ohlc-chart-options.es-BLKIOFho.cjs +0 -20
  383. package/components/ohlc-chart-options.fr-D6YoAH4U.cjs +0 -20
  384. package/components/ohlc-chart-options.nl-lWVHjRUM.cjs +0 -20
  385. package/components/ohlc-chart-slots.config-DMomcHMV.cjs +0 -20
  386. package/components/orion-CfUR1e5D.cjs +0 -20
  387. package/components/parallel-coordinates-plot-options.config-B9eRq_Dj.cjs +0 -20
  388. package/components/parallel-coordinates-plot-options.de-Dm5-9Du6.cjs +0 -20
  389. package/components/parallel-coordinates-plot-options.en-mGJiceE7.cjs +0 -20
  390. package/components/parallel-coordinates-plot-options.es-UhSh9vHw.cjs +0 -20
  391. package/components/parallel-coordinates-plot-options.fr-DNjANPoh.cjs +0 -20
  392. package/components/parallel-coordinates-plot-options.nl-DCXPdyr2.cjs +0 -20
  393. package/components/parallel-coordinates-plot-slots.config--fk40ZDu.cjs +0 -20
  394. package/components/periods.const-3jA-ECRf.cjs +0 -20
  395. package/components/pinky-DptTgIM4.cjs +0 -20
  396. package/components/pivot-table-options.config-BiJXKSFR.cjs +0 -20
  397. package/components/pivot-table-options.de-CEaD9SHr.cjs +0 -20
  398. package/components/pivot-table-options.en-DC07VN7H.cjs +0 -20
  399. package/components/pivot-table-options.es-Xm6ENByP.cjs +0 -20
  400. package/components/pivot-table-options.fr-ClLROt4b.cjs +0 -20
  401. package/components/pivot-table-options.nl-Dk2Oeu8i.cjs +0 -20
  402. package/components/pivot-table-slots.config-45V_Gdm7.cjs +0 -20
  403. package/components/pl-PIK23rK_.cjs +0 -20
  404. package/components/pt-Dqlu4MS5.cjs +0 -20
  405. package/components/pyramid-chart-options.config-C4zbFS26.cjs +0 -20
  406. package/components/pyramid-chart-options.de-DKas0NiC.cjs +0 -20
  407. package/components/pyramid-chart-options.en-L6DFdrRz.cjs +0 -20
  408. package/components/pyramid-chart-options.es-Cu0g6t6A.cjs +0 -20
  409. package/components/pyramid-chart-options.fr-CreHLwD_.cjs +0 -20
  410. package/components/pyramid-chart-options.nl-CRbkXz3i.cjs +0 -20
  411. package/components/pyramid-chart-slots.config-D5F0WX2d.cjs +0 -20
  412. package/components/radar-chart-options.config-EqQu6PTh.cjs +0 -20
  413. package/components/radar-chart-options.de-BGHs6QoY.cjs +0 -20
  414. package/components/radar-chart-options.en-DXlfL8Qm.cjs +0 -20
  415. package/components/radar-chart-options.es-DBw1arWW.cjs +0 -20
  416. package/components/radar-chart-options.fr-CKBFCZK0.cjs +0 -20
  417. package/components/radar-chart-options.nl-k4gGr6lf.cjs +0 -20
  418. package/components/radar-chart-slots.config-BEigR_Ml.cjs +0 -20
  419. package/components/radiant-Dv7GVveL.cjs +0 -20
  420. package/components/regular-table-options.config-DTx3RTnS.cjs +0 -20
  421. package/components/regular-table-options.de-DHgnwaEe.cjs +0 -20
  422. package/components/regular-table-options.en-DPoF7r6r.cjs +0 -20
  423. package/components/regular-table-options.es-8cbzQG40.cjs +0 -20
  424. package/components/regular-table-options.fr-D4dSaBN-.cjs +0 -20
  425. package/components/regular-table-options.nl-DvIvjTvR.cjs +0 -20
  426. package/components/regular-table-slots.config-RLnMgOXn.cjs +0 -20
  427. package/components/route-map-options.config-D7NJePTu.cjs +0 -20
  428. package/components/route-map-options.de-w5wuIvwf.cjs +0 -20
  429. package/components/route-map-options.en-Co0Fbjkz.cjs +0 -20
  430. package/components/route-map-options.es-Cjasm-ZQ.cjs +0 -20
  431. package/components/route-map-options.fr-C1SCfKLH.cjs +0 -20
  432. package/components/route-map-options.nl-CYmB51pE.cjs +0 -20
  433. package/components/route-map-slots.config-DsVJBR3D.cjs +0 -20
  434. package/components/royale-Ooq8M7Ef.cjs +0 -20
  435. package/components/ru-zyNDTB04.cjs +0 -20
  436. package/components/sankey-diagram-options.config-RFB83YLZ.cjs +0 -20
  437. package/components/sankey-diagram-options.de-BOtJSpbI.cjs +0 -20
  438. package/components/sankey-diagram-options.en-DMx4MkN-.cjs +0 -20
  439. package/components/sankey-diagram-options.es-BdDSG9DB.cjs +0 -20
  440. package/components/sankey-diagram-options.fr-D1MrJM4P.cjs +0 -20
  441. package/components/sankey-diagram-options.nl-DW_wVZ1O.cjs +0 -20
  442. package/components/sankey-diagram-slots.config-CiyYElLX.cjs +0 -20
  443. package/components/scatter-plot-options.config-CFfGJXsV.cjs +0 -20
  444. package/components/scatter-plot-options.de-fSoIvHJy.cjs +0 -20
  445. package/components/scatter-plot-options.en-CGCdpOtQ.cjs +0 -20
  446. package/components/scatter-plot-options.es-CLRJMSqn.cjs +0 -20
  447. package/components/scatter-plot-options.fr-Da2McGuN.cjs +0 -20
  448. package/components/scatter-plot-options.nl-CRWq01rL.cjs +0 -20
  449. package/components/scatter-plot-slots.config-47cB5_RC.cjs +0 -20
  450. package/components/search-filter-options.config-BCaDlYqZ.cjs +0 -20
  451. package/components/search-filter-options.de-BK66ORWq.cjs +0 -20
  452. package/components/search-filter-options.en-CDPrPilw.cjs +0 -20
  453. package/components/search-filter-options.es-D7Z_PcC1.cjs +0 -20
  454. package/components/search-filter-options.fr-DhaK1uUa.cjs +0 -20
  455. package/components/search-filter-options.nl-CAA7cBhK.cjs +0 -20
  456. package/components/search-filter-slots.config-DeHkvc2Q.cjs +0 -20
  457. package/components/seasonal-OSKpFyta.cjs +0 -20
  458. package/components/set-locale-BRRalqne.cjs +0 -20
  459. package/components/sized-mixin-DcvJLFeo.cjs +0 -20
  460. package/components/slicer-filter-options.config-DNI-XevE.cjs +0 -20
  461. package/components/slicer-filter-options.de-DRazS_m2.cjs +0 -20
  462. package/components/slicer-filter-options.en-CpMgGFQr.cjs +0 -20
  463. package/components/slicer-filter-options.es-CS_RNuGQ.cjs +0 -20
  464. package/components/slicer-filter-options.fr-CfCs-AJo.cjs +0 -20
  465. package/components/slicer-filter-options.nl-C_n1KiTW.cjs +0 -20
  466. package/components/slicer-filter-slots.config-V7hURjKI.cjs +0 -20
  467. package/components/slider-filter-options.config-_8Z2zKmU.cjs +0 -20
  468. package/components/slider-filter-options.de-BgUkQGYO.cjs +0 -20
  469. package/components/slider-filter-options.en-Dvn-ux4N.cjs +0 -20
  470. package/components/slider-filter-options.es-B9ObSQWh.cjs +0 -20
  471. package/components/slider-filter-options.fr-DI6QMjqa.cjs +0 -20
  472. package/components/slider-filter-options.nl-autc8gPj.cjs +0 -20
  473. package/components/slider-filter-slots.config-B--K9cpP.cjs +0 -20
  474. package/components/slot-contents-picker/index.cjs +0 -146
  475. package/components/slot-contents-picker/index.d.ts +0 -7
  476. package/components/slot-contents-picker/slot-contents-picker.d.ts +0 -113
  477. package/components/slot-menu/index.cjs +0 -62
  478. package/components/slot-menu/index.d.ts +0 -8
  479. package/components/slot-menu/slot-menu.d.ts +0 -111
  480. package/components/slot-menu/types.d.ts +0 -25
  481. package/components/slot-menu-list/index.cjs +0 -35
  482. package/components/slot-menu-list/index.d.ts +0 -7
  483. package/components/slot-menu-list/slot-menu-list.d.ts +0 -35
  484. package/components/spacer-options.config-mPXMR1CE.cjs +0 -20
  485. package/components/speedometer-chart-options.config-BX9LTQBH.cjs +0 -20
  486. package/components/speedometer-chart-options.de-D5SIAUZA.cjs +0 -20
  487. package/components/speedometer-chart-options.en-BUj6JXhT.cjs +0 -20
  488. package/components/speedometer-chart-options.es-DalX0e7D.cjs +0 -20
  489. package/components/speedometer-chart-options.fr-Dqn95u64.cjs +0 -20
  490. package/components/speedometer-chart-options.nl-Bo6cV2j0.cjs +0 -20
  491. package/components/speedometer-chart-slots.config-Cd-nkNPm.cjs +0 -20
  492. package/components/spike-map-options.config-DoBFXPmN.cjs +0 -20
  493. package/components/spike-map-options.de-_47BiyJQ.cjs +0 -20
  494. package/components/spike-map-options.en-B9InMjtg.cjs +0 -20
  495. package/components/spike-map-options.es-e-sVsx0P.cjs +0 -20
  496. package/components/spike-map-options.fr-DPpYI3Yd.cjs +0 -20
  497. package/components/spike-map-options.nl-DOJHgdzZ.cjs +0 -20
  498. package/components/spike-map-slots.config-BM5-Dlub.cjs +0 -20
  499. package/components/strip-plot-options.config-CKy1s16H.cjs +0 -20
  500. package/components/strip-plot-options.de-DwOrv0sQ.cjs +0 -20
  501. package/components/strip-plot-options.en-CjD5zNiU.cjs +0 -20
  502. package/components/strip-plot-options.es-D_ZS1l9j.cjs +0 -20
  503. package/components/strip-plot-options.fr-C6gKZaLg.cjs +0 -20
  504. package/components/strip-plot-options.nl-BkQ9nc9g.cjs +0 -20
  505. package/components/strip-plot-slots.config-DDUlLO8K.cjs +0 -20
  506. package/components/sunburst-chart-options.config-AbNjWS6t.cjs +0 -20
  507. package/components/sunburst-chart-options.de-BDu_ZCdb.cjs +0 -20
  508. package/components/sunburst-chart-options.en-D9Rr49yw.cjs +0 -20
  509. package/components/sunburst-chart-options.es-Ba8WDFHg.cjs +0 -20
  510. package/components/sunburst-chart-options.fr-1Ecu2sp2.cjs +0 -20
  511. package/components/sunburst-chart-options.nl-BbOLWrEh.cjs +0 -20
  512. package/components/sunburst-chart-slots.config-B18aqdH1.cjs +0 -20
  513. package/components/sv-1DPTltNQ.cjs +0 -20
  514. package/components/symbol-map-options.config-m-lwLTtu.cjs +0 -20
  515. package/components/symbol-map-options.de-BpGDOFd7.cjs +0 -20
  516. package/components/symbol-map-options.en-DfbVAChu.cjs +0 -20
  517. package/components/symbol-map-options.es-DwitkQlR.cjs +0 -20
  518. package/components/symbol-map-options.fr-CmMvfUDf.cjs +0 -20
  519. package/components/symbol-map-options.nl-DxnQtnnP.cjs +0 -20
  520. package/components/symbol-map-slots.config-Dm_FRGHA.cjs +0 -20
  521. package/components/text-options.config-BFB3rEmt.cjs +0 -20
  522. package/components/text-options.de-DLr2-jBn.cjs +0 -20
  523. package/components/text-options.en-LfsMtwo6.cjs +0 -20
  524. package/components/text-options.es-BLQBqlvK.cjs +0 -20
  525. package/components/text-options.fr-B8x29grG.cjs +0 -20
  526. package/components/text-options.nl-DzglrI3i.cjs +0 -20
  527. package/components/text-slots.config-BMBEkf0O.cjs +0 -20
  528. package/components/tr-BkmWvOG2.cjs +0 -20
  529. package/components/treemap-chart-options.config-C0Q9aQ1Z.cjs +0 -20
  530. package/components/treemap-chart-options.de-Crku8ynJ.cjs +0 -20
  531. package/components/treemap-chart-options.en-zSWDcqFt.cjs +0 -20
  532. package/components/treemap-chart-options.es-DXX2PyUh.cjs +0 -20
  533. package/components/treemap-chart-options.fr-B93bhLpR.cjs +0 -20
  534. package/components/treemap-chart-options.nl-ButbMHmU.cjs +0 -20
  535. package/components/treemap-chart-slots.config-C3bnHCyy.cjs +0 -20
  536. package/components/types-VPf7E5dD.cjs +0 -20
  537. package/components/urban-BLQl5Oye.cjs +0 -20
  538. package/components/utils.cjs +0 -20
  539. package/components/venn-diagram-options.config-mPXMR1CE.cjs +0 -20
  540. package/components/venn-diagram-slots.config-GytlZGbF.cjs +0 -20
  541. package/components/video-options.config-CGsDTwHc.cjs +0 -20
  542. package/components/video-options.de-DZUy2pUo.cjs +0 -20
  543. package/components/video-options.en-D69d612-.cjs +0 -20
  544. package/components/video-options.es-BUKi6Pyc.cjs +0 -20
  545. package/components/video-options.fr-B7b4NJso.cjs +0 -20
  546. package/components/video-options.nl-CSiCG3Vu.cjs +0 -20
  547. package/components/video-slots.config-mPXMR1CE.cjs +0 -20
  548. package/components/vivid-BpRn83MR.cjs +0 -20
  549. package/components/widget-menu/index.cjs +0 -51
  550. package/components/widget-menu/index.d.ts +0 -8
  551. package/components/widget-menu/widget-menu.d.ts +0 -77
  552. package/components/wordcloud-chart-options.config-vGfCW8kE.cjs +0 -20
  553. package/components/wordcloud-chart-options.de-DnJjN2l-.cjs +0 -20
  554. package/components/wordcloud-chart-options.en-Ca5fXbS9.cjs +0 -20
  555. package/components/wordcloud-chart-options.es-TkHFgMUu.cjs +0 -20
  556. package/components/wordcloud-chart-options.fr-Dz53DWyA.cjs +0 -20
  557. package/components/wordcloud-chart-options.nl-Cy_9TRvD.cjs +0 -20
  558. package/components/wordcloud-chart-slots.config-D7CiYopX.cjs +0 -20
  559. package/components/zh-CN-DTZ4OmdP.cjs +0 -20
  560. package/components/zh-TW-DTZ4OmdP.cjs +0 -20
@@ -1,20 +0,0 @@
1
- /*! * A kit of modern Luzmo Web Components for analytics in your web application.
2
- *
3
- * Copyright © 2025 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
- "use strict";var Fe=s=>{throw TypeError(s)};var we=(s,e,t)=>e.has(s)||Fe("Cannot "+t);var r=(s,e,t)=>(we(s,e,"read from private field"),t?t.call(s):e.get(s)),f=(s,e,t)=>e.has(s)?Fe("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(s):e.set(s,t),h=(s,e,t,i)=>(we(s,e,"write to private field"),i?i.call(s,t):e.set(s,t),t),P=(s,e,t)=>(we(s,e,"access private method"),t);var me=(s,e,t,i)=>({set _(n){h(s,e,n,t)},get _(){return r(s,e,i)}});var be=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(s){return this.listeners.add(s),this.onSubscribe(),()=>{this.listeners.delete(s),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ge=typeof window>"u"||"Deno"in globalThis;function Q(){}function Je(s,e){return typeof s=="function"?s(e):s}function ze(s){return typeof s=="number"&&s>=0&&s!==1/0}function We(s,e){return Math.max(s+(e||0)-Date.now(),0)}function Se(s,e){return typeof s=="function"?s(e):s}function Xe(s,e){return typeof s=="function"?s(e):s}function Ae(s,e){const{type:t="all",exact:i,fetchStatus:n,predicate:u,queryKey:o,stale:a}=s;if(o){if(i){if(e.queryHash!==qe(o,e.options))return!1}else if(!ce(e.queryKey,o))return!1}if(t!=="all"){const l=e.isActive();if(t==="active"&&!l||t==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||n&&n!==e.state.fetchStatus||u&&!u(e))}function De(s,e){const{exact:t,status:i,predicate:n,mutationKey:u}=s;if(u){if(!e.options.mutationKey)return!1;if(t){if(he(e.options.mutationKey)!==he(u))return!1}else if(!ce(e.options.mutationKey,u))return!1}return!(i&&e.state.status!==i||n&&!n(e))}function qe(s,e){return((e==null?void 0:e.queryKeyHashFn)||he)(s)}function he(s){return JSON.stringify(s,(e,t)=>Ce(t)?Object.keys(t).sort().reduce((i,n)=>(i[n]=t[n],i),{}):t)}function ce(s,e){return s===e?!0:typeof s!=typeof e?!1:s&&e&&typeof s=="object"&&typeof e=="object"?Object.keys(e).every(t=>ce(s[t],e[t])):!1}function He(s,e){if(s===e)return s;const t=Ee(s)&&Ee(e);if(t||Ce(s)&&Ce(e)){const i=t?s:Object.keys(s),n=i.length,u=t?e:Object.keys(e),o=u.length,a=t?[]:{};let l=0;for(let y=0;y<o;y++){const m=t?y:u[y];(!t&&i.includes(m)||t)&&s[m]===void 0&&e[m]===void 0?(a[m]=void 0,l++):(a[m]=He(s[m],e[m]),a[m]===s[m]&&s[m]!==void 0&&l++)}return n===o&&l===n?s:a}return e}function Ee(s){return Array.isArray(s)&&s.length===Object.keys(s).length}function Ce(s){if(!Me(s))return!1;const e=s.constructor;if(e===void 0)return!0;const t=e.prototype;return!(!Me(t)||!t.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(s)!==Object.prototype)}function Me(s){return Object.prototype.toString.call(s)==="[object Object]"}function Ye(s){return new Promise(e=>{setTimeout(e,s)})}function Ze(s,e,t){return typeof t.structuralSharing=="function"?t.structuralSharing(s,e):t.structuralSharing!==!1?He(s,e):e}function et(s,e,t=0){const i=[...s,e];return t&&i.length>t?i.slice(1):i}function tt(s,e,t=0){const i=[e,...s];return t&&i.length>t?i.slice(0,-1):i}var Oe=Symbol();function Ge(s,e){return!s.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!s.queryFn||s.queryFn===Oe?()=>Promise.reject(new Error(`Missing queryFn: '${s.queryHash}'`)):s.queryFn}var J,G,Z,Re,st=(Re=class extends be{constructor(){super();f(this,J);f(this,G);f(this,Z);h(this,Z,e=>{if(!ge&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){r(this,G)||this.setEventListener(r(this,Z))}onUnsubscribe(){var e;this.hasListeners()||((e=r(this,G))==null||e.call(this),h(this,G,void 0))}setEventListener(e){var t;h(this,Z,e),(t=r(this,G))==null||t.call(this),h(this,G,e(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(e){r(this,J)!==e&&(h(this,J,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return typeof r(this,J)=="boolean"?r(this,J):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},J=new WeakMap,G=new WeakMap,Z=new WeakMap,Re),Ne=new st,ee,N,te,Ke,it=(Ke=class extends be{constructor(){super();f(this,ee,!0);f(this,N);f(this,te);h(this,te,e=>{if(!ge&&window.addEventListener){const t=()=>e(!0),i=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",i)}}})}onSubscribe(){r(this,N)||this.setEventListener(r(this,te))}onUnsubscribe(){var e;this.hasListeners()||((e=r(this,N))==null||e.call(this),h(this,N,void 0))}setEventListener(e){var t;h(this,te,e),(t=r(this,N))==null||t.call(this),h(this,N,e(this.setOnline.bind(this)))}setOnline(e){r(this,ee)!==e&&(h(this,ee,e),this.listeners.forEach(i=>{i(e)}))}isOnline(){return r(this,ee)}},ee=new WeakMap,N=new WeakMap,te=new WeakMap,Ke),ve=new it;function rt(){let s,e;const t=new Promise((n,u)=>{s=n,e=u});t.status="pending",t.catch(()=>{});function i(n){Object.assign(t,n),delete t.resolve,delete t.reject}return t.resolve=n=>{i({status:"fulfilled",value:n}),s(n)},t.reject=n=>{i({status:"rejected",reason:n}),e(n)},t}function nt(s){return Math.min(1e3*2**s,3e4)}function Ve(s){return(s??"online")==="online"?ve.isOnline():!0}var _e=class extends Error{constructor(s){super("CancelledError"),this.revert=s==null?void 0:s.revert,this.silent=s==null?void 0:s.silent}};function Pe(s){return s instanceof _e}function $e(s){let e=!1,t=0,i=!1,n;const u=rt(),o=d=>{var v;i||(p(new _e(d)),(v=s.abort)==null||v.call(s))},a=()=>{e=!0},l=()=>{e=!1},y=()=>Ne.isFocused()&&(s.networkMode==="always"||ve.isOnline())&&s.canRun(),m=()=>Ve(s.networkMode)&&s.canRun(),c=d=>{var v;i||(i=!0,(v=s.onSuccess)==null||v.call(s,d),n==null||n(),u.resolve(d))},p=d=>{var v;i||(i=!0,(v=s.onError)==null||v.call(s,d),n==null||n(),u.reject(d))},S=()=>new Promise(d=>{var v;n=A=>{(i||y())&&d(A)},(v=s.onPause)==null||v.call(s)}).then(()=>{var d;n=void 0,i||(d=s.onContinue)==null||d.call(s)}),q=()=>{if(i)return;let d;const v=t===0?s.initialPromise:void 0;try{d=v??s.fn()}catch(A){d=Promise.reject(A)}Promise.resolve(d).then(c).catch(A=>{var j;if(i)return;const M=s.retry??(ge?0:3),g=s.retryDelay??nt,D=typeof g=="function"?g(t,A):g,K=M===!0||typeof M=="number"&&t<M||typeof M=="function"&&M(t,A);if(e||!K){p(A);return}t++,(j=s.onFail)==null||j.call(s,t,A),Ye(D).then(()=>y()?void 0:S()).then(()=>{e?p(A):q()})})};return{promise:u,cancel:o,continue:()=>(n==null||n(),u),cancelRetry:a,continueRetry:l,canStart:m,start:()=>(m()?q():S().then(q),u)}}var at=s=>setTimeout(s,0);function ut(){let s=[],e=0,t=a=>{a()},i=a=>{a()},n=at;const u=a=>{e?s.push(a):n(()=>{t(a)})},o=()=>{const a=s;s=[],a.length&&n(()=>{i(()=>{a.forEach(l=>{t(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||o()}return l},batchCalls:a=>(...l)=>{u(()=>{a(...l)})},schedule:u,setNotifyFunction:a=>{t=a},setBatchNotifyFunction:a=>{i=a},setScheduler:a=>{n=a}}}var F=ut(),z,je,Be=(je=class{constructor(){f(this,z)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ze(this.gcTime)&&h(this,z,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(s){this.gcTime=Math.max(this.gcTime||0,s??(ge?1/0:5*60*1e3))}clearGcTimeout(){r(this,z)&&(clearTimeout(r(this,z)),h(this,z,void 0))}},z=new WeakMap,je),se,ie,E,W,C,le,X,T,L,ke,ot=(ke=class extends Be{constructor(e){super();f(this,T);f(this,se);f(this,ie);f(this,E);f(this,W);f(this,C);f(this,le);f(this,X);h(this,X,!1),h(this,le,e.defaultOptions),this.setOptions(e.options),this.observers=[],h(this,W,e.client),h(this,E,r(this,W).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,h(this,se,ct(this.options)),this.state=e.state??r(this,se),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=r(this,C))==null?void 0:e.promise}setOptions(e){this.options={...r(this,le),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&r(this,E).remove(this)}setData(e,t){const i=Ze(this.state.data,e,this.options);return P(this,T,L).call(this,{data:i,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),i}setState(e,t){P(this,T,L).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var i,n;const t=(i=r(this,C))==null?void 0:i.promise;return(n=r(this,C))==null||n.cancel(e),t?t.then(Q).catch(Q):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(r(this,se))}isActive(){return this.observers.some(e=>Xe(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Oe||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!We(this.state.dataUpdatedAt,e)}onFocus(){var t;const e=this.observers.find(i=>i.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(t=r(this,C))==null||t.continue()}onOnline(){var t;const e=this.observers.find(i=>i.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(t=r(this,C))==null||t.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),r(this,E).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(r(this,C)&&(r(this,X)?r(this,C).cancel({revert:!0}):r(this,C).cancelRetry()),this.scheduleGc()),r(this,E).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||P(this,T,L).call(this,{type:"invalidate"})}fetch(e,t){var l,y,m;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(r(this,C))return r(this,C).continueRetry(),r(this,C).promise}if(e&&this.setOptions(e),!this.options.queryFn){const c=this.observers.find(p=>p.options.queryFn);c&&this.setOptions(c.options)}const i=new AbortController,n=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(h(this,X,!0),i.signal)})},u=()=>{const c=Ge(this.options,t),p={client:r(this,W),queryKey:this.queryKey,meta:this.meta};return n(p),h(this,X,!1),this.options.persister?this.options.persister(c,p,this):c(p)},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:r(this,W),state:this.state,fetchFn:u};n(o),(l=this.options.behavior)==null||l.onFetch(o,this),h(this,ie,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((y=o.fetchOptions)==null?void 0:y.meta))&&P(this,T,L).call(this,{type:"fetch",meta:(m=o.fetchOptions)==null?void 0:m.meta});const a=c=>{var p,S,q,d;Pe(c)&&c.silent||P(this,T,L).call(this,{type:"error",error:c}),Pe(c)||((S=(p=r(this,E).config).onError)==null||S.call(p,c,this),(d=(q=r(this,E).config).onSettled)==null||d.call(q,this.state.data,c,this)),this.scheduleGc()};return h(this,C,$e({initialPromise:t==null?void 0:t.initialPromise,fn:o.fetchFn,abort:i.abort.bind(i),onSuccess:c=>{var p,S,q,d;if(c===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(v){a(v);return}(S=(p=r(this,E).config).onSuccess)==null||S.call(p,c,this),(d=(q=r(this,E).config).onSettled)==null||d.call(q,c,this.state.error,this),this.scheduleGc()},onError:a,onFail:(c,p)=>{P(this,T,L).call(this,{type:"failed",failureCount:c,error:p})},onPause:()=>{P(this,T,L).call(this,{type:"pause"})},onContinue:()=>{P(this,T,L).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),r(this,C).start()}},se=new WeakMap,ie=new WeakMap,E=new WeakMap,W=new WeakMap,C=new WeakMap,le=new WeakMap,X=new WeakMap,T=new WeakSet,L=function(e){const t=i=>{switch(e.type){case"failed":return{...i,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...ht(i.data,this.options),fetchMeta:e.meta??null};case"success":return{...i,data:e.data,dataUpdateCount:i.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const n=e.error;return Pe(n)&&n.revert&&r(this,ie)?{...r(this,ie),fetchStatus:"idle"}:{...i,error:n,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error"};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...e.state}}};this.state=t(this.state),F.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),r(this,E).notify({query:this,type:"updated",action:e})})},ke);function ht(s,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ve(e.networkMode)?"fetching":"paused",...s===void 0&&{error:null,status:"pending"}}}function ct(s){const e=typeof s.initialData=="function"?s.initialData():s.initialData,t=e!==void 0,i=t?typeof s.initialDataUpdatedAt=="function"?s.initialDataUpdatedAt():s.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var k,Ue,lt=(Ue=class extends be{constructor(e={}){super();f(this,k);this.config=e,h(this,k,new Map)}build(e,t,i){const n=t.queryKey,u=t.queryHash??qe(n,t);let o=this.get(u);return o||(o=new ot({client:e,queryKey:n,queryHash:u,options:e.defaultQueryOptions(t),state:i,defaultOptions:e.getQueryDefaults(n)}),this.add(o)),o}add(e){r(this,k).has(e.queryHash)||(r(this,k).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=r(this,k).get(e.queryHash);t&&(e.destroy(),t===e&&r(this,k).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){F.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return r(this,k).get(e)}getAll(){return[...r(this,k).values()]}find(e){const t={exact:!0,...e};return this.getAll().find(i=>Ae(t,i))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(i=>Ae(e,i)):t}notify(e){F.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){F.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){F.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},k=new WeakMap,Ue),U,O,Y,I,H,Ie,dt=(Ie=class extends Be{constructor(e){super();f(this,I);f(this,U);f(this,O);f(this,Y);this.mutationId=e.mutationId,h(this,O,e.mutationCache),h(this,U,[]),this.state=e.state||ft(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){r(this,U).includes(e)||(r(this,U).push(e),this.clearGcTimeout(),r(this,O).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){h(this,U,r(this,U).filter(t=>t!==e)),this.scheduleGc(),r(this,O).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){r(this,U).length||(this.state.status==="pending"?this.scheduleGc():r(this,O).remove(this))}continue(){var e;return((e=r(this,Y))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var u,o,a,l,y,m,c,p,S,q,d,v,A,M,g,D,K,j,fe,oe;const t=()=>{P(this,I,H).call(this,{type:"continue"})};h(this,Y,$e({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(w,ye)=>{P(this,I,H).call(this,{type:"failed",failureCount:w,error:ye})},onPause:()=>{P(this,I,H).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>r(this,O).canRun(this)}));const i=this.state.status==="pending",n=!r(this,Y).canStart();try{if(i)t();else{P(this,I,H).call(this,{type:"pending",variables:e,isPaused:n}),await((o=(u=r(this,O).config).onMutate)==null?void 0:o.call(u,e,this));const ye=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,e));ye!==this.state.context&&P(this,I,H).call(this,{type:"pending",context:ye,variables:e,isPaused:n})}const w=await r(this,Y).start();return await((m=(y=r(this,O).config).onSuccess)==null?void 0:m.call(y,w,e,this.state.context,this)),await((p=(c=this.options).onSuccess)==null?void 0:p.call(c,w,e,this.state.context)),await((q=(S=r(this,O).config).onSettled)==null?void 0:q.call(S,w,null,this.state.variables,this.state.context,this)),await((v=(d=this.options).onSettled)==null?void 0:v.call(d,w,null,e,this.state.context)),P(this,I,H).call(this,{type:"success",data:w}),w}catch(w){try{throw await((M=(A=r(this,O).config).onError)==null?void 0:M.call(A,w,e,this.state.context,this)),await((D=(g=this.options).onError)==null?void 0:D.call(g,w,e,this.state.context)),await((j=(K=r(this,O).config).onSettled)==null?void 0:j.call(K,void 0,w,this.state.variables,this.state.context,this)),await((oe=(fe=this.options).onSettled)==null?void 0:oe.call(fe,void 0,w,e,this.state.context)),w}finally{P(this,I,H).call(this,{type:"error",error:w})}}finally{r(this,O).runNext(this)}}},U=new WeakMap,O=new WeakMap,Y=new WeakMap,I=new WeakSet,H=function(e){const t=i=>{switch(e.type){case"failed":return{...i,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...i,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:e.error,failureCount:i.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),F.batch(()=>{r(this,U).forEach(i=>{i.onMutationUpdate(e)}),r(this,O).notify({mutation:this,type:"updated",action:e})})},Ie);function ft(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var x,R,de,Le,yt=(Le=class extends be{constructor(e={}){super();f(this,x);f(this,R);f(this,de);this.config=e,h(this,x,new Set),h(this,R,new Map),h(this,de,0)}build(e,t,i){const n=new dt({mutationCache:this,mutationId:++me(this,de)._,options:e.defaultMutationOptions(t),state:i});return this.add(n),n}add(e){r(this,x).add(e);const t=pe(e);if(typeof t=="string"){const i=r(this,R).get(t);i?i.push(e):r(this,R).set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(r(this,x).delete(e)){const t=pe(e);if(typeof t=="string"){const i=r(this,R).get(t);if(i)if(i.length>1){const n=i.indexOf(e);n!==-1&&i.splice(n,1)}else i[0]===e&&r(this,R).delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=pe(e);if(typeof t=="string"){const i=r(this,R).get(t),n=i==null?void 0:i.find(u=>u.state.status==="pending");return!n||n===e}else return!0}runNext(e){var i;const t=pe(e);if(typeof t=="string"){const n=(i=r(this,R).get(t))==null?void 0:i.find(u=>u!==e&&u.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}else return Promise.resolve()}clear(){F.batch(()=>{r(this,x).forEach(e=>{this.notify({type:"removed",mutation:e})}),r(this,x).clear(),r(this,R).clear()})}getAll(){return Array.from(r(this,x))}find(e){const t={exact:!0,...e};return this.getAll().find(i=>De(t,i))}findAll(e={}){return this.getAll().filter(t=>De(e,t))}notify(e){F.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return F.batch(()=>Promise.all(e.map(t=>t.continue().catch(Q))))}},x=new WeakMap,R=new WeakMap,de=new WeakMap,Le);function pe(s){var e;return(e=s.options.scope)==null?void 0:e.id}function Qe(s){return{onFetch:(e,t)=>{var m,c,p,S,q;const i=e.options,n=(p=(c=(m=e.fetchOptions)==null?void 0:m.meta)==null?void 0:c.fetchMore)==null?void 0:p.direction,u=((S=e.state.data)==null?void 0:S.pages)||[],o=((q=e.state.data)==null?void 0:q.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const y=async()=>{let d=!1;const v=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(e.signal.aborted?d=!0:e.signal.addEventListener("abort",()=>{d=!0}),e.signal)})},A=Ge(e.options,e.fetchOptions),M=async(g,D,K)=>{if(d)return Promise.reject();if(D==null&&g.pages.length)return Promise.resolve(g);const j={client:e.client,queryKey:e.queryKey,pageParam:D,direction:K?"backward":"forward",meta:e.options.meta};v(j);const fe=await A(j),{maxPages:oe}=e.options,w=K?tt:et;return{pages:w(g.pages,fe,oe),pageParams:w(g.pageParams,D,oe)}};if(n&&u.length){const g=n==="backward",D=g?mt:Te,K={pages:u,pageParams:o},j=D(i,K);a=await M(K,j,g)}else{const g=s??u.length;do{const D=l===0?o[0]??i.initialPageParam:Te(i,a);if(l>0&&D==null)break;a=await M(a,D),l++}while(l<g)}return a};e.options.persister?e.fetchFn=()=>{var d,v;return(v=(d=e.options).persister)==null?void 0:v.call(d,y,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t)}:e.fetchFn=y}}}function Te(s,{pages:e,pageParams:t}){const i=e.length-1;return e.length>0?s.getNextPageParam(e[i],e,t[i],t):void 0}function mt(s,{pages:e,pageParams:t}){var i;return e.length>0?(i=s.getPreviousPageParam)==null?void 0:i.call(s,e[0],e,t[0],t):void 0}var b,V,_,re,ne,$,ae,ue,xe,pt=(xe=class{constructor(s={}){f(this,b);f(this,V);f(this,_);f(this,re);f(this,ne);f(this,$);f(this,ae);f(this,ue);h(this,b,s.queryCache||new lt),h(this,V,s.mutationCache||new yt),h(this,_,s.defaultOptions||{}),h(this,re,new Map),h(this,ne,new Map),h(this,$,0)}mount(){me(this,$)._++,r(this,$)===1&&(h(this,ae,Ne.subscribe(async s=>{s&&(await this.resumePausedMutations(),r(this,b).onFocus())})),h(this,ue,ve.subscribe(async s=>{s&&(await this.resumePausedMutations(),r(this,b).onOnline())})))}unmount(){var s,e;me(this,$)._--,r(this,$)===0&&((s=r(this,ae))==null||s.call(this),h(this,ae,void 0),(e=r(this,ue))==null||e.call(this),h(this,ue,void 0))}isFetching(s){return r(this,b).findAll({...s,fetchStatus:"fetching"}).length}isMutating(s){return r(this,V).findAll({...s,status:"pending"}).length}getQueryData(s){var t;const e=this.defaultQueryOptions({queryKey:s});return(t=r(this,b).get(e.queryHash))==null?void 0:t.state.data}ensureQueryData(s){const e=this.defaultQueryOptions(s),t=r(this,b).build(this,e),i=t.state.data;return i===void 0?this.fetchQuery(s):(s.revalidateIfStale&&t.isStaleByTime(Se(e.staleTime,t))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(s){return r(this,b).findAll(s).map(({queryKey:e,state:t})=>{const i=t.data;return[e,i]})}setQueryData(s,e,t){const i=this.defaultQueryOptions({queryKey:s}),n=r(this,b).get(i.queryHash),u=n==null?void 0:n.state.data,o=Je(e,u);if(o!==void 0)return r(this,b).build(this,i).setData(o,{...t,manual:!0})}setQueriesData(s,e,t){return F.batch(()=>r(this,b).findAll(s).map(({queryKey:i})=>[i,this.setQueryData(i,e,t)]))}getQueryState(s){var t;const e=this.defaultQueryOptions({queryKey:s});return(t=r(this,b).get(e.queryHash))==null?void 0:t.state}removeQueries(s){const e=r(this,b);F.batch(()=>{e.findAll(s).forEach(t=>{e.remove(t)})})}resetQueries(s,e){const t=r(this,b);return F.batch(()=>(t.findAll(s).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...s},e)))}cancelQueries(s,e={}){const t={revert:!0,...e},i=F.batch(()=>r(this,b).findAll(s).map(n=>n.cancel(t)));return Promise.all(i).then(Q).catch(Q)}invalidateQueries(s,e={}){return F.batch(()=>(r(this,b).findAll(s).forEach(t=>{t.invalidate()}),(s==null?void 0:s.refetchType)==="none"?Promise.resolve():this.refetchQueries({...s,type:(s==null?void 0:s.refetchType)??(s==null?void 0:s.type)??"active"},e)))}refetchQueries(s,e={}){const t={...e,cancelRefetch:e.cancelRefetch??!0},i=F.batch(()=>r(this,b).findAll(s).filter(n=>!n.isDisabled()).map(n=>{let u=n.fetch(void 0,t);return t.throwOnError||(u=u.catch(Q)),n.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(i).then(Q)}fetchQuery(s){const e=this.defaultQueryOptions(s);e.retry===void 0&&(e.retry=!1);const t=r(this,b).build(this,e);return t.isStaleByTime(Se(e.staleTime,t))?t.fetch(e):Promise.resolve(t.state.data)}prefetchQuery(s){return this.fetchQuery(s).then(Q).catch(Q)}fetchInfiniteQuery(s){return s.behavior=Qe(s.pages),this.fetchQuery(s)}prefetchInfiniteQuery(s){return this.fetchInfiniteQuery(s).then(Q).catch(Q)}ensureInfiniteQueryData(s){return s.behavior=Qe(s.pages),this.ensureQueryData(s)}resumePausedMutations(){return ve.isOnline()?r(this,V).resumePausedMutations():Promise.resolve()}getQueryCache(){return r(this,b)}getMutationCache(){return r(this,V)}getDefaultOptions(){return r(this,_)}setDefaultOptions(s){h(this,_,s)}setQueryDefaults(s,e){r(this,re).set(he(s),{queryKey:s,defaultOptions:e})}getQueryDefaults(s){const e=[...r(this,re).values()],t={};return e.forEach(i=>{ce(s,i.queryKey)&&Object.assign(t,i.defaultOptions)}),t}setMutationDefaults(s,e){r(this,ne).set(he(s),{mutationKey:s,defaultOptions:e})}getMutationDefaults(s){const e=[...r(this,ne).values()],t={};return e.forEach(i=>{ce(s,i.mutationKey)&&Object.assign(t,i.defaultOptions)}),t}defaultQueryOptions(s){if(s._defaulted)return s;const e={...r(this,_).queries,...this.getQueryDefaults(s.queryKey),...s,_defaulted:!0};return e.queryHash||(e.queryHash=qe(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Oe&&(e.enabled=!1),e}defaultMutationOptions(s){return s!=null&&s._defaulted?s:{...r(this,_).mutations,...(s==null?void 0:s.mutationKey)&&this.getMutationDefaults(s.mutationKey),...s,_defaulted:!0}}clear(){r(this,b).clear(),r(this,V).clear()}},b=new WeakMap,V=new WeakMap,_=new WeakMap,re=new WeakMap,ne=new WeakMap,$=new WeakMap,ae=new WeakMap,ue=new WeakMap,xe);class B{constructor(e={}){this.availableDatasets=[],this.apiUrl=e.apiUrl||"https://api.luzmo.com",this.apiVersion=e.apiVersion||"0.1.0",this.authKey=e.authKey||"",this.authToken=e.authToken||"",this.queryClient=new pt({defaultOptions:{queries:{staleTime:e.staleTime||5*60*1e3,gcTime:e.gcTime||10*60*1e3,retry:e.retry||3,retryDelay:e.retryDelay||(t=>Math.min(1e3*2**t,3e4))}}}),this.initNetworkListeners()}configure(e={}){if(e.apiVersion&&(this.apiVersion=e.apiVersion),e.apiUrl&&(this.apiUrl=e.apiUrl),e.authKey&&(this.authKey=e.authKey),e.authToken&&(this.authToken=e.authToken),e.staleTime||e.gcTime||e.retry){const t={};e.staleTime&&(t.staleTime=e.staleTime),e.gcTime&&(t.gcTime=e.gcTime),e.retry&&(t.retry=e.retry),this.queryClient.setDefaultOptions({queries:{...this.queryClient.getDefaultOptions().queries,...t}})}}initNetworkListeners(){typeof window<"u"&&window.addEventListener("online",()=>{console.warn("Network connection restored, refreshing data..."),this.refreshAll()})}getHeaders(e={}){return{"Content-Type":"application/json",...e}}async fetchApi(e,t,i={}){const n=`${this.apiUrl}/${this.apiVersion}${e}`,o={method:i.method||"POST",headers:this.getHeaders(i.headers),mode:"cors",...i};t!==void 0&&(t.key=this.authKey,t.token=this.authToken,o.body=JSON.stringify(t));try{const a=await fetch(n,o);if(!a.ok){const l=await a.json().catch(()=>null);throw a.status===401||a.status===403?new Error("Authentication failed. Please check your API token."):a.status===404?new Error(`Resource not found: ${e}`):a.status===429?new Error("Rate limit exceeded. Please try again later."):new Error((l==null?void 0:l.message)||`API request failed with status ${a.status}`)}return await a.json()}catch(a){throw console.error(`API request to ${e} failed:`,a),a instanceof Error&&(a.endpoint=e,a.timestamp=new Date().toISOString()),a}}async fetchAllDatasets(e={}){const t=e.offset||0,i=e.limit||50,n=["datasets",t,i];return await this.queryClient.fetchQuery({queryKey:n,queryFn:async()=>{const u={action:"get",version:this.apiVersion,find:{where:{type:"dataset"},limit:i,offset:t}},o=await this.fetchApi("/securable",u);return{data:(o==null?void 0:o.rows)??[],pagination:{offset:t,limit:i,total:(o==null?void 0:o.count)??0,pages:Math.ceil(((o==null?void 0:o.count)??0)/i)}}}})}async searchDatasets(e,t){if(!e)return{data:[]};const i=["datasets","search",e,t];return await this.queryClient.fetchQuery({queryKey:i,queryFn:async()=>{const n={action:"get",version:this.apiVersion,find:{where:{type:"dataset"}}};(e==null?void 0:e.length)>0&&(n.find.search={match_types:["name"],keyphrase:e}),t!=null&&t.offset&&(n.find.offset=t==null?void 0:t.offset),t!=null&&t.limit&&(n.find.limit=t==null?void 0:t.limit);const u=await this.fetchApi("/securable",n),o={data:(u==null?void 0:u.rows)??[]};return t!=null&&t.limit&&(o.pagination={offset:(t==null?void 0:t.offset)??0,limit:t==null?void 0:t.limit,total:(u==null?void 0:u.count)??0,pages:Math.ceil(((u==null?void 0:u.count)??0)/(t==null?void 0:t.limit))}),o}})}async fetchDatasetsWithColumnsAndFormulas(e){if(!e||e.length===0)throw new Error("At least one dataset ID is required");const t=["datasets",e,this.authKey,this.authToken];return await this.queryClient.fetchQuery({queryKey:t,queryFn:async()=>{const i={action:"get",version:this.apiVersion,find:{where:{type:"dataset",id:{in:e}},attributes:["name","id","description"],include:[{model:"Column",attributes:["id","name","description","type","subtype","format","hidden","lowestLevel","expression","duration_levels","duration_format"],separate:!0,order:[["order","asc"]],include:[{model:"Column",attributes:["id","securable_id","hierarchy_enabled","currency_id"],as:"Joins"},{model:"HierarchyLevel",attributes:["id","level","name"],as:"HierarchyLevels"},{model:"Currency",attributes:["id","name","symbol"],as:"Currency"}]},{model:"Formula",attributes:["id","name","description","type","subtype","format","hidden","lowestLevel","expression","duration_levels","duration_format"],include:[{model:"Currency",attributes:["id","name","symbol"],as:"Currency"}]}]}},n=await this.fetchApi("/securable",i);return(n==null?void 0:n.rows)??[]}})}async fetchData(e){if(!e)throw new Error("Query is required");const t=["data",e];return await this.queryClient.fetchQuery({queryKey:t,queryFn:async()=>{const i={action:"get",version:this.apiVersion,find:{queries:[e]}},n=await this.fetchApi("/data",i);return{data:(n==null?void 0:n.data)||[],performance:(n==null?void 0:n.performance)||{}}}})}refreshAll(){this.queryClient.refetchQueries()}invalidateDatasetData(e){e?(this.queryClient.invalidateQueries({queryKey:["dataset",e]}),this.queryClient.invalidateQueries({queryKey:["columns",e]})):this.queryClient.invalidateQueries({queryKey:["datasets"]})}invalidateAll(){this.queryClient.clear()}static getInstance(e={}){return B.instance?Object.keys(e).length>0&&B.instance.configure(e):B.instance=new B(e),B.instance}async fetchDatasetsRecursive(e){if(!e||e.length===0)throw new Error("At least one dataset ID is required");const t=[...new Set(e)],i=new Set,n=new Map,u=o=>{o&&!i.has(o)&&!t.includes(o)&&t.push(o)};for(;t.length>0;){const o=[];for(;t.length>0&&o.length<50;){const a=t.shift();i.has(a)||o.push(a)}if(o.length!==0)try{(await this.fetchDatasetsWithColumnsAndFormulas(o)).forEach(l=>{const y=this.postProcessDatasetMetadata(l);i.add(y.id),this.queryClient.setQueryData(["dataset",y.id],y),(y.outgoingJoins??[]).map(c=>c.securable_id).filter(c=>!!c&&c!==y.id).forEach(c=>{u(c)}),n.set(y.id,y),this.availableDatasets.some(c=>c.id===y.id)||this.availableDatasets.push({id:y.id,name:y.name,columns:y.columns})})}catch(a){console.error("Error fetching datasets recursively:",a)}}return[...n.values()]}postProcessDatasetMetadata(e){const t=[],i=(e.columns??[]).map(n=>{const u=n.joins??(Array.isArray(n.joins)?n.joins:[]);Array.isArray(u)&&u.length>0&&t.push(...u);const{joins:o,...a}=n;return{...a,joins:u}});return{...e,columns:i,formulas:e.formulas??[],outgoingJoins:t,dateLoaded:new Date}}getAvailableDatasets(){return this.availableDatasets}getLinkedDatasetsIds(e){const t=this.queryClient.getQueryData(["dataset",e]);return t?(t.outgoingJoins??[]).map(i=>i.securable_id).filter(i=>!!i&&i!==e):[]}}const vt=B.getInstance();exports.dataBroker=vt;
@@ -1,20 +0,0 @@
1
- /*! * A kit of modern Luzmo Web Components for analytics in your web application.
2
- *
3
- * Copyright © 2025 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
- "use strict";const t={"No Tiles":{name:"No Tiles",id:"no-tiles",url:"",attribution:"",rasterName:"No Tiles"},Basic:{name:"Basic",id:"klokantech-basic",url:"https://openmaptiles.github.io/klokantech-basic-gl-style/style-cdn.json",attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',rasterName:"OpenStreetMap"},Bright:{name:"Bright",id:"osm-bright",url:"https://openmaptiles.github.io/osm-bright-gl-style/style-cdn.json",attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',rasterName:"OpenStreetMap"},Dark:{name:"Dark",id:"dark-matter",url:"https://openmaptiles.github.io/dark-matter-gl-style/style-cdn.json",attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',rasterName:"OpenStreetMap"},Fiord:{name:"Fiord",id:"fiord-color",url:"https://openmaptiles.github.io/fiord-color-gl-style/style-cdn.json",attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',rasterName:"OpenStreetMap"},Liberty:{name:"Liberty",id:"osm-liberty",url:"https://rawgit.com/lukasmartinelli/osm-liberty/gh-pages/style.json",attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',rasterName:"OpenStreetMap"},Pastel:{name:"Pastel",id:"pastel",url:"https://api.maptiler.com/maps/pastel/style.json",attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',rasterName:"OpenStreetMap"},Positron:{name:"Positron",id:"positron",url:"https://openmaptiles.github.io/positron-gl-style/style-cdn.json",attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',rasterName:"OpenStreetMap"},Streets:{name:"Streets",id:"streets",url:"https://api.maptiler.com/maps/streets/style.json",attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',rasterName:"OpenStreetMap"},Toner:{name:"Toner",id:"toner",url:"https://openmaptiles.github.io/toner-gl-style/style-cdn.json",attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',rasterName:"OpenStreetMap"},Topographique:{name:"Topographique",id:"topographique",url:"https://api.maptiler.com/maps/topographique/style.json",attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',rasterName:"OpenStreetMap"},Voyager:{name:"Voyager",id:"voyager",url:"https://api.maptiler.com/maps/voyager/style.json",attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',rasterName:"OpenStreetMap"},"3D buildings":{name:"3D buildings",id:"klokantech-3d",url:"https://openmaptiles.github.io/klokantech-3d-gl-style/style-cdn.json",attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',rasterName:"OpenStreetMap"}};exports.mapVectorTileProviders=t;
@@ -1,20 +0,0 @@
1
- /*! * A kit of modern Luzmo Web Components for analytics in your web application.
2
- *
3
- * Copyright © 2025 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
- "use strict";var Fe=s=>{throw TypeError(s)};var qe=(s,e,t)=>e.has(s)||Fe("Cannot "+t);var i=(s,e,t)=>(qe(s,e,"read from private field"),t?t.call(s):e.get(s)),f=(s,e,t)=>e.has(s)?Fe("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(s):e.set(s,t),h=(s,e,t,r)=>(qe(s,e,"write to private field"),r?r.call(s,t):e.set(s,t),t),q=(s,e,t)=>(qe(s,e,"access private method"),t);var me=(s,e,t,r)=>({set _(n){h(s,e,n,t)},get _(){return i(s,e,r)}});var be=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(s){return this.listeners.add(s),this.onSubscribe(),()=>{this.listeners.delete(s),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},we=typeof window>"u"||"Deno"in globalThis;function M(){}function ze(s,e){return typeof s=="function"?s(e):s}function Be(s){return typeof s=="number"&&s>=0&&s!==1/0}function We(s,e){return Math.max(s+(e||0)-Date.now(),0)}function Ae(s,e){return typeof s=="function"?s(e):s}function Xe(s,e){return typeof s=="function"?s(e):s}function De(s,e){const{type:t="all",exact:r,fetchStatus:n,predicate:u,queryKey:o,stale:a}=s;if(o){if(r){if(e.queryHash!==Se(o,e.options))return!1}else if(!ce(e.queryKey,o))return!1}if(t!=="all"){const l=e.isActive();if(t==="active"&&!l||t==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||n&&n!==e.state.fetchStatus||u&&!u(e))}function Qe(s,e){const{exact:t,status:r,predicate:n,mutationKey:u}=s;if(u){if(!e.options.mutationKey)return!1;if(t){if(he(e.options.mutationKey)!==he(u))return!1}else if(!ce(e.options.mutationKey,u))return!1}return!(r&&e.state.status!==r||n&&!n(e))}function Se(s,e){return((e==null?void 0:e.queryKeyHashFn)||he)(s)}function he(s){return JSON.stringify(s,(e,t)=>Oe(t)?Object.keys(t).sort().reduce((r,n)=>(r[n]=t[n],r),{}):t)}function ce(s,e){return s===e?!0:typeof s!=typeof e?!1:s&&e&&typeof s=="object"&&typeof e=="object"?Object.keys(e).every(t=>ce(s[t],e[t])):!1}function Ce(s,e){if(s===e)return s;const t=Ee(s)&&Ee(e);if(t||Oe(s)&&Oe(e)){const r=t?s:Object.keys(s),n=r.length,u=t?e:Object.keys(e),o=u.length,a=t?[]:{};let l=0;for(let y=0;y<o;y++){const m=t?y:u[y];(!t&&r.includes(m)||t)&&s[m]===void 0&&e[m]===void 0?(a[m]=void 0,l++):(a[m]=Ce(s[m],e[m]),a[m]===s[m]&&s[m]!==void 0&&l++)}return n===o&&l===n?s:a}return e}function Ee(s){return Array.isArray(s)&&s.length===Object.keys(s).length}function Oe(s){if(!Me(s))return!1;const e=s.constructor;if(e===void 0)return!0;const t=e.prototype;return!(!Me(t)||!t.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(s)!==Object.prototype)}function Me(s){return Object.prototype.toString.call(s)==="[object Object]"}function Ye(s){return new Promise(e=>{setTimeout(e,s)})}function Ze(s,e,t){if(typeof t.structuralSharing=="function")return t.structuralSharing(s,e);if(t.structuralSharing!==!1){try{return Ce(s,e)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${t.queryHash}]: ${r}`),r}return Ce(s,e)}return e}function et(s,e,t=0){const r=[...s,e];return t&&r.length>t?r.slice(1):r}function tt(s,e,t=0){const r=[e,...s];return t&&r.length>t?r.slice(0,-1):r}var ve=Symbol();function Ge(s,e){return s.queryFn===ve&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${s.queryHash}'`),!s.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!s.queryFn||s.queryFn===ve?()=>Promise.reject(new Error(`Missing queryFn: '${s.queryHash}'`)):s.queryFn}var z,G,Z,ke,st=(ke=class extends be{constructor(){super();f(this,z);f(this,G);f(this,Z);h(this,Z,e=>{if(!we&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){i(this,G)||this.setEventListener(i(this,Z))}onUnsubscribe(){var e;this.hasListeners()||((e=i(this,G))==null||e.call(this),h(this,G,void 0))}setEventListener(e){var t;h(this,Z,e),(t=i(this,G))==null||t.call(this),h(this,G,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){i(this,z)!==e&&(h(this,z,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return typeof i(this,z)=="boolean"?i(this,z):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},z=new WeakMap,G=new WeakMap,Z=new WeakMap,ke),Ne=new st,ee,N,te,Ke,rt=(Ke=class extends be{constructor(){super();f(this,ee,!0);f(this,N);f(this,te);h(this,te,e=>{if(!we&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}})}onSubscribe(){i(this,N)||this.setEventListener(i(this,te))}onUnsubscribe(){var e;this.hasListeners()||((e=i(this,N))==null||e.call(this),h(this,N,void 0))}setEventListener(e){var t;h(this,te,e),(t=i(this,N))==null||t.call(this),h(this,N,e(this.setOnline.bind(this)))}setOnline(e){i(this,ee)!==e&&(h(this,ee,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return i(this,ee)}},ee=new WeakMap,N=new WeakMap,te=new WeakMap,Ke),ge=new rt;function it(){let s,e;const t=new Promise((n,u)=>{s=n,e=u});t.status="pending",t.catch(()=>{});function r(n){Object.assign(t,n),delete t.resolve,delete t.reject}return t.resolve=n=>{r({status:"fulfilled",value:n}),s(n)},t.reject=n=>{r({status:"rejected",reason:n}),e(n)},t}function nt(s){return Math.min(1e3*2**s,3e4)}function $e(s){return(s??"online")==="online"?ge.isOnline():!0}var Ve=class extends Error{constructor(s){super("CancelledError"),this.revert=s==null?void 0:s.revert,this.silent=s==null?void 0:s.silent}};function Pe(s){return s instanceof Ve}function _e(s){let e=!1,t=0,r=!1,n;const u=it(),o=d=>{var v;r||(p(new Ve(d)),(v=s.abort)==null||v.call(s))},a=()=>{e=!0},l=()=>{e=!1},y=()=>Ne.isFocused()&&(s.networkMode==="always"||ge.isOnline())&&s.canRun(),m=()=>$e(s.networkMode)&&s.canRun(),c=d=>{var v;r||(r=!0,(v=s.onSuccess)==null||v.call(s,d),n==null||n(),u.resolve(d))},p=d=>{var v;r||(r=!0,(v=s.onError)==null||v.call(s,d),n==null||n(),u.reject(d))},F=()=>new Promise(d=>{var v;n=A=>{(r||y())&&d(A)},(v=s.onPause)==null||v.call(s)}).then(()=>{var d;n=void 0,r||(d=s.onContinue)==null||d.call(s)}),C=()=>{if(r)return;let d;const v=t===0?s.initialPromise:void 0;try{d=v??s.fn()}catch(A){d=Promise.reject(A)}Promise.resolve(d).then(c).catch(A=>{var K;if(r)return;const E=s.retry??(we?0:3),b=s.retryDelay??nt,D=typeof b=="function"?b(t,A):b,k=E===!0||typeof E=="number"&&t<E||typeof E=="function"&&E(t,A);if(e||!k){p(A);return}t++,(K=s.onFail)==null||K.call(s,t,A),Ye(D).then(()=>y()?void 0:F()).then(()=>{e?p(A):C()})})};return{promise:u,cancel:o,continue:()=>(n==null||n(),u),cancelRetry:a,continueRetry:l,canStart:m,start:()=>(m()?C():F().then(C),u)}}var at=s=>setTimeout(s,0);function ut(){let s=[],e=0,t=a=>{a()},r=a=>{a()},n=at;const u=a=>{e?s.push(a):n(()=>{t(a)})},o=()=>{const a=s;s=[],a.length&&n(()=>{r(()=>{a.forEach(l=>{t(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||o()}return l},batchCalls:a=>(...l)=>{u(()=>{a(...l)})},schedule:u,setNotifyFunction:a=>{t=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{n=a}}}var S=ut(),B,je,Je=(je=class{constructor(){f(this,B)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Be(this.gcTime)&&h(this,B,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(s){this.gcTime=Math.max(this.gcTime||0,s??(we?1/0:5*60*1e3))}clearGcTimeout(){i(this,B)&&(clearTimeout(i(this,B)),h(this,B,void 0))}},B=new WeakMap,je),se,re,Q,W,P,le,X,T,L,Ue,ot=(Ue=class extends Je{constructor(e){super();f(this,T);f(this,se);f(this,re);f(this,Q);f(this,W);f(this,P);f(this,le);f(this,X);h(this,X,!1),h(this,le,e.defaultOptions),this.setOptions(e.options),this.observers=[],h(this,W,e.client),h(this,Q,i(this,W).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,h(this,se,ct(this.options)),this.state=e.state??i(this,se),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=i(this,P))==null?void 0:e.promise}setOptions(e){this.options={...i(this,le),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&i(this,Q).remove(this)}setData(e,t){const r=Ze(this.state.data,e,this.options);return q(this,T,L).call(this,{data:r,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),r}setState(e,t){q(this,T,L).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var r,n;const t=(r=i(this,P))==null?void 0:r.promise;return(n=i(this,P))==null||n.cancel(e),t?t.then(M).catch(M):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(i(this,se))}isActive(){return this.observers.some(e=>Xe(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ve||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!We(this.state.dataUpdatedAt,e)}onFocus(){var t;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(t=i(this,P))==null||t.continue()}onOnline(){var t;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(t=i(this,P))==null||t.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),i(this,Q).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(i(this,P)&&(i(this,X)?i(this,P).cancel({revert:!0}):i(this,P).cancelRetry()),this.scheduleGc()),i(this,Q).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||q(this,T,L).call(this,{type:"invalidate"})}fetch(e,t){var l,y,m;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(i(this,P))return i(this,P).continueRetry(),i(this,P).promise}if(e&&this.setOptions(e),!this.options.queryFn){const c=this.observers.find(p=>p.options.queryFn);c&&this.setOptions(c.options)}Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']");const r=new AbortController,n=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(h(this,X,!0),r.signal)})},u=()=>{const c=Ge(this.options,t),p={client:i(this,W),queryKey:this.queryKey,meta:this.meta};return n(p),h(this,X,!1),this.options.persister?this.options.persister(c,p,this):c(p)},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:i(this,W),state:this.state,fetchFn:u};n(o),(l=this.options.behavior)==null||l.onFetch(o,this),h(this,re,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((y=o.fetchOptions)==null?void 0:y.meta))&&q(this,T,L).call(this,{type:"fetch",meta:(m=o.fetchOptions)==null?void 0:m.meta});const a=c=>{var p,F,C,d;Pe(c)&&c.silent||q(this,T,L).call(this,{type:"error",error:c}),Pe(c)||((F=(p=i(this,Q).config).onError)==null||F.call(p,c,this),(d=(C=i(this,Q).config).onSettled)==null||d.call(C,this.state.data,c,this)),this.scheduleGc()};return h(this,P,_e({initialPromise:t==null?void 0:t.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var p,F,C,d;if(c===void 0){console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(v){a(v);return}(F=(p=i(this,Q).config).onSuccess)==null||F.call(p,c,this),(d=(C=i(this,Q).config).onSettled)==null||d.call(C,c,this.state.error,this),this.scheduleGc()},onError:a,onFail:(c,p)=>{q(this,T,L).call(this,{type:"failed",failureCount:c,error:p})},onPause:()=>{q(this,T,L).call(this,{type:"pause"})},onContinue:()=>{q(this,T,L).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),i(this,P).start()}},se=new WeakMap,re=new WeakMap,Q=new WeakMap,W=new WeakMap,P=new WeakMap,le=new WeakMap,X=new WeakMap,T=new WeakSet,L=function(e){const t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...ht(r.data,this.options),fetchMeta:e.meta??null};case"success":return{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const n=e.error;return Pe(n)&&n.revert&&i(this,re)?{...i(this,re),fetchStatus:"idle"}:{...r,error:n,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),S.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),i(this,Q).notify({query:this,type:"updated",action:e})})},Ue);function ht(s,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:$e(e.networkMode)?"fetching":"paused",...s===void 0&&{error:null,status:"pending"}}}function ct(s){const e=typeof s.initialData=="function"?s.initialData():s.initialData,t=e!==void 0,r=t?typeof s.initialDataUpdatedAt=="function"?s.initialDataUpdatedAt():s.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var j,Ie,lt=(Ie=class extends be{constructor(e={}){super();f(this,j);this.config=e,h(this,j,new Map)}build(e,t,r){const n=t.queryKey,u=t.queryHash??Se(n,t);let o=this.get(u);return o||(o=new ot({client:e,queryKey:n,queryHash:u,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(n)}),this.add(o)),o}add(e){i(this,j).has(e.queryHash)||(i(this,j).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=i(this,j).get(e.queryHash);t&&(e.destroy(),t===e&&i(this,j).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){S.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return i(this,j).get(e)}getAll(){return[...i(this,j).values()]}find(e){const t={exact:!0,...e};return this.getAll().find(r=>De(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>De(e,r)):t}notify(e){S.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){S.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){S.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},j=new WeakMap,Ie),U,O,Y,I,x,Le,dt=(Le=class extends Je{constructor(e){super();f(this,I);f(this,U);f(this,O);f(this,Y);this.mutationId=e.mutationId,h(this,O,e.mutationCache),h(this,U,[]),this.state=e.state||ft(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){i(this,U).includes(e)||(i(this,U).push(e),this.clearGcTimeout(),i(this,O).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){h(this,U,i(this,U).filter(t=>t!==e)),this.scheduleGc(),i(this,O).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){i(this,U).length||(this.state.status==="pending"?this.scheduleGc():i(this,O).remove(this))}continue(){var e;return((e=i(this,Y))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var u,o,a,l,y,m,c,p,F,C,d,v,A,E,b,D,k,K,fe,oe;const t=()=>{q(this,I,x).call(this,{type:"continue"})};h(this,Y,_e({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(w,ye)=>{q(this,I,x).call(this,{type:"failed",failureCount:w,error:ye})},onPause:()=>{q(this,I,x).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>i(this,O).canRun(this)}));const r=this.state.status==="pending",n=!i(this,Y).canStart();try{if(r)t();else{q(this,I,x).call(this,{type:"pending",variables:e,isPaused:n}),await((o=(u=i(this,O).config).onMutate)==null?void 0:o.call(u,e,this));const ye=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,e));ye!==this.state.context&&q(this,I,x).call(this,{type:"pending",context:ye,variables:e,isPaused:n})}const w=await i(this,Y).start();return await((m=(y=i(this,O).config).onSuccess)==null?void 0:m.call(y,w,e,this.state.context,this)),await((p=(c=this.options).onSuccess)==null?void 0:p.call(c,w,e,this.state.context)),await((C=(F=i(this,O).config).onSettled)==null?void 0:C.call(F,w,null,this.state.variables,this.state.context,this)),await((v=(d=this.options).onSettled)==null?void 0:v.call(d,w,null,e,this.state.context)),q(this,I,x).call(this,{type:"success",data:w}),w}catch(w){try{throw await((E=(A=i(this,O).config).onError)==null?void 0:E.call(A,w,e,this.state.context,this)),await((D=(b=this.options).onError)==null?void 0:D.call(b,w,e,this.state.context)),await((K=(k=i(this,O).config).onSettled)==null?void 0:K.call(k,void 0,w,this.state.variables,this.state.context,this)),await((oe=(fe=this.options).onSettled)==null?void 0:oe.call(fe,void 0,w,e,this.state.context)),w}finally{q(this,I,x).call(this,{type:"error",error:w})}}finally{i(this,O).runNext(this)}}},U=new WeakMap,O=new WeakMap,Y=new WeakMap,I=new WeakSet,x=function(e){const t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),S.batch(()=>{i(this,U).forEach(r=>{r.onMutationUpdate(e)}),i(this,O).notify({mutation:this,type:"updated",action:e})})},Le);function ft(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var H,R,de,He,yt=(He=class extends be{constructor(e={}){super();f(this,H);f(this,R);f(this,de);this.config=e,h(this,H,new Set),h(this,R,new Map),h(this,de,0)}build(e,t,r){const n=new dt({mutationCache:this,mutationId:++me(this,de)._,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){i(this,H).add(e);const t=pe(e);if(typeof t=="string"){const r=i(this,R).get(t);r?r.push(e):i(this,R).set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(i(this,H).delete(e)){const t=pe(e);if(typeof t=="string"){const r=i(this,R).get(t);if(r)if(r.length>1){const n=r.indexOf(e);n!==-1&&r.splice(n,1)}else r[0]===e&&i(this,R).delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=pe(e);if(typeof t=="string"){const r=i(this,R).get(t),n=r==null?void 0:r.find(u=>u.state.status==="pending");return!n||n===e}else return!0}runNext(e){var r;const t=pe(e);if(typeof t=="string"){const n=(r=i(this,R).get(t))==null?void 0:r.find(u=>u!==e&&u.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}else return Promise.resolve()}clear(){S.batch(()=>{i(this,H).forEach(e=>{this.notify({type:"removed",mutation:e})}),i(this,H).clear(),i(this,R).clear()})}getAll(){return Array.from(i(this,H))}find(e){const t={exact:!0,...e};return this.getAll().find(r=>Qe(t,r))}findAll(e={}){return this.getAll().filter(t=>Qe(e,t))}notify(e){S.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return S.batch(()=>Promise.all(e.map(t=>t.continue().catch(M))))}},H=new WeakMap,R=new WeakMap,de=new WeakMap,He);function pe(s){var e;return(e=s.options.scope)==null?void 0:e.id}function Te(s){return{onFetch:(e,t)=>{var m,c,p,F,C;const r=e.options,n=(p=(c=(m=e.fetchOptions)==null?void 0:m.meta)==null?void 0:c.fetchMore)==null?void 0:p.direction,u=((F=e.state.data)==null?void 0:F.pages)||[],o=((C=e.state.data)==null?void 0:C.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const y=async()=>{let d=!1;const v=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(e.signal.aborted?d=!0:e.signal.addEventListener("abort",()=>{d=!0}),e.signal)})},A=Ge(e.options,e.fetchOptions),E=async(b,D,k)=>{if(d)return Promise.reject();if(D==null&&b.pages.length)return Promise.resolve(b);const K={client:e.client,queryKey:e.queryKey,pageParam:D,direction:k?"backward":"forward",meta:e.options.meta};v(K);const fe=await A(K),{maxPages:oe}=e.options,w=k?tt:et;return{pages:w(b.pages,fe,oe),pageParams:w(b.pageParams,D,oe)}};if(n&&u.length){const b=n==="backward",D=b?mt:Re,k={pages:u,pageParams:o},K=D(r,k);a=await E(k,K,b)}else{const b=s??u.length;do{const D=l===0?o[0]??r.initialPageParam:Re(r,a);if(l>0&&D==null)break;a=await E(a,D),l++}while(l<b)}return a};e.options.persister?e.fetchFn=()=>{var d,v;return(v=(d=e.options).persister)==null?void 0:v.call(d,y,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t)}:e.fetchFn=y}}}function Re(s,{pages:e,pageParams:t}){const r=e.length-1;return e.length>0?s.getNextPageParam(e[r],e,t[r],t):void 0}function mt(s,{pages:e,pageParams:t}){var r;return e.length>0?(r=s.getPreviousPageParam)==null?void 0:r.call(s,e[0],e,t[0],t):void 0}var g,$,V,ie,ne,_,ae,ue,xe,pt=(xe=class{constructor(s={}){f(this,g);f(this,$);f(this,V);f(this,ie);f(this,ne);f(this,_);f(this,ae);f(this,ue);h(this,g,s.queryCache||new lt),h(this,$,s.mutationCache||new yt),h(this,V,s.defaultOptions||{}),h(this,ie,new Map),h(this,ne,new Map),h(this,_,0)}mount(){me(this,_)._++,i(this,_)===1&&(h(this,ae,Ne.subscribe(async s=>{s&&(await this.resumePausedMutations(),i(this,g).onFocus())})),h(this,ue,ge.subscribe(async s=>{s&&(await this.resumePausedMutations(),i(this,g).onOnline())})))}unmount(){var s,e;me(this,_)._--,i(this,_)===0&&((s=i(this,ae))==null||s.call(this),h(this,ae,void 0),(e=i(this,ue))==null||e.call(this),h(this,ue,void 0))}isFetching(s){return i(this,g).findAll({...s,fetchStatus:"fetching"}).length}isMutating(s){return i(this,$).findAll({...s,status:"pending"}).length}getQueryData(s){var t;const e=this.defaultQueryOptions({queryKey:s});return(t=i(this,g).get(e.queryHash))==null?void 0:t.state.data}ensureQueryData(s){const e=this.defaultQueryOptions(s),t=i(this,g).build(this,e),r=t.state.data;return r===void 0?this.fetchQuery(s):(s.revalidateIfStale&&t.isStaleByTime(Ae(e.staleTime,t))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(s){return i(this,g).findAll(s).map(({queryKey:e,state:t})=>{const r=t.data;return[e,r]})}setQueryData(s,e,t){const r=this.defaultQueryOptions({queryKey:s}),n=i(this,g).get(r.queryHash),u=n==null?void 0:n.state.data,o=ze(e,u);if(o!==void 0)return i(this,g).build(this,r).setData(o,{...t,manual:!0})}setQueriesData(s,e,t){return S.batch(()=>i(this,g).findAll(s).map(({queryKey:r})=>[r,this.setQueryData(r,e,t)]))}getQueryState(s){var t;const e=this.defaultQueryOptions({queryKey:s});return(t=i(this,g).get(e.queryHash))==null?void 0:t.state}removeQueries(s){const e=i(this,g);S.batch(()=>{e.findAll(s).forEach(t=>{e.remove(t)})})}resetQueries(s,e){const t=i(this,g);return S.batch(()=>(t.findAll(s).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...s},e)))}cancelQueries(s,e={}){const t={revert:!0,...e},r=S.batch(()=>i(this,g).findAll(s).map(n=>n.cancel(t)));return Promise.all(r).then(M).catch(M)}invalidateQueries(s,e={}){return S.batch(()=>(i(this,g).findAll(s).forEach(t=>{t.invalidate()}),(s==null?void 0:s.refetchType)==="none"?Promise.resolve():this.refetchQueries({...s,type:(s==null?void 0:s.refetchType)??(s==null?void 0:s.type)??"active"},e)))}refetchQueries(s,e={}){const t={...e,cancelRefetch:e.cancelRefetch??!0},r=S.batch(()=>i(this,g).findAll(s).filter(n=>!n.isDisabled()).map(n=>{let u=n.fetch(void 0,t);return t.throwOnError||(u=u.catch(M)),n.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(r).then(M)}fetchQuery(s){const e=this.defaultQueryOptions(s);e.retry===void 0&&(e.retry=!1);const t=i(this,g).build(this,e);return t.isStaleByTime(Ae(e.staleTime,t))?t.fetch(e):Promise.resolve(t.state.data)}prefetchQuery(s){return this.fetchQuery(s).then(M).catch(M)}fetchInfiniteQuery(s){return s.behavior=Te(s.pages),this.fetchQuery(s)}prefetchInfiniteQuery(s){return this.fetchInfiniteQuery(s).then(M).catch(M)}ensureInfiniteQueryData(s){return s.behavior=Te(s.pages),this.ensureQueryData(s)}resumePausedMutations(){return ge.isOnline()?i(this,$).resumePausedMutations():Promise.resolve()}getQueryCache(){return i(this,g)}getMutationCache(){return i(this,$)}getDefaultOptions(){return i(this,V)}setDefaultOptions(s){h(this,V,s)}setQueryDefaults(s,e){i(this,ie).set(he(s),{queryKey:s,defaultOptions:e})}getQueryDefaults(s){const e=[...i(this,ie).values()],t={};return e.forEach(r=>{ce(s,r.queryKey)&&Object.assign(t,r.defaultOptions)}),t}setMutationDefaults(s,e){i(this,ne).set(he(s),{mutationKey:s,defaultOptions:e})}getMutationDefaults(s){const e=[...i(this,ne).values()],t={};return e.forEach(r=>{ce(s,r.mutationKey)&&Object.assign(t,r.defaultOptions)}),t}defaultQueryOptions(s){if(s._defaulted)return s;const e={...i(this,V).queries,...this.getQueryDefaults(s.queryKey),...s,_defaulted:!0};return e.queryHash||(e.queryHash=Se(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===ve&&(e.enabled=!1),e}defaultMutationOptions(s){return s!=null&&s._defaulted?s:{...i(this,V).mutations,...(s==null?void 0:s.mutationKey)&&this.getMutationDefaults(s.mutationKey),...s,_defaulted:!0}}clear(){i(this,g).clear(),i(this,$).clear()}},g=new WeakMap,$=new WeakMap,V=new WeakMap,ie=new WeakMap,ne=new WeakMap,_=new WeakMap,ae=new WeakMap,ue=new WeakMap,xe);class J{constructor(e={}){this.availableDatasets=[],this.apiUrl=e.apiUrl||"https://api.luzmo.com",this.apiVersion=e.apiVersion||"0.1.0",this.authKey=e.authKey||"",this.authToken=e.authToken||"",this.queryClient=new pt({defaultOptions:{queries:{staleTime:e.staleTime||5*60*1e3,gcTime:e.gcTime||10*60*1e3,retry:e.retry||3,retryDelay:e.retryDelay||(t=>Math.min(1e3*2**t,3e4))}}}),this.initNetworkListeners()}configure(e={}){if(e.apiVersion&&(this.apiVersion=e.apiVersion),e.apiUrl&&(this.apiUrl=e.apiUrl),e.authKey&&(this.authKey=e.authKey),e.authToken&&(this.authToken=e.authToken),e.staleTime||e.gcTime||e.retry){const t={};e.staleTime&&(t.staleTime=e.staleTime),e.gcTime&&(t.gcTime=e.gcTime),e.retry&&(t.retry=e.retry),this.queryClient.setDefaultOptions({queries:{...this.queryClient.getDefaultOptions().queries,...t}})}}initNetworkListeners(){typeof window<"u"&&window.addEventListener("online",()=>{console.warn("Network connection restored, refreshing data..."),this.refreshAll()})}getHeaders(e={}){return{"Content-Type":"application/json",...e}}async fetchApi(e,t,r={}){const n=`${this.apiUrl}/${this.apiVersion}${e}`,o={method:r.method||"POST",headers:this.getHeaders(r.headers),mode:"cors",...r};t!==void 0&&(t.key=this.authKey,t.token=this.authToken,o.body=JSON.stringify(t));try{const a=await fetch(n,o);if(!a.ok){const l=await a.json().catch(()=>null);throw a.status===401||a.status===403?new Error("Authentication failed. Please check your API token."):a.status===404?new Error(`Resource not found: ${e}`):a.status===429?new Error("Rate limit exceeded. Please try again later."):new Error((l==null?void 0:l.message)||`API request failed with status ${a.status}`)}return await a.json()}catch(a){throw console.error(`API request to ${e} failed:`,a),a instanceof Error&&(a.endpoint=e,a.timestamp=new Date().toISOString()),a}}async fetchAllDatasets(e={}){const t=e.offset||0,r=e.limit||50,n=["datasets",t,r];return await this.queryClient.fetchQuery({queryKey:n,queryFn:async()=>{const u={action:"get",version:this.apiVersion,find:{where:{type:"dataset"},limit:r,offset:t}},o=await this.fetchApi("/securable",u);return{data:(o==null?void 0:o.rows)??[],pagination:{offset:t,limit:r,total:(o==null?void 0:o.count)??0,pages:Math.ceil(((o==null?void 0:o.count)??0)/r)}}}})}async searchDatasets(e,t){if(!e)return{data:[]};const r=["datasets","search",e,t];return await this.queryClient.fetchQuery({queryKey:r,queryFn:async()=>{const n={action:"get",version:this.apiVersion,find:{where:{type:"dataset"}}};(e==null?void 0:e.length)>0&&(n.find.search={match_types:["name"],keyphrase:e}),t!=null&&t.offset&&(n.find.offset=t==null?void 0:t.offset),t!=null&&t.limit&&(n.find.limit=t==null?void 0:t.limit);const u=await this.fetchApi("/securable",n),o={data:(u==null?void 0:u.rows)??[]};return t!=null&&t.limit&&(o.pagination={offset:(t==null?void 0:t.offset)??0,limit:t==null?void 0:t.limit,total:(u==null?void 0:u.count)??0,pages:Math.ceil(((u==null?void 0:u.count)??0)/(t==null?void 0:t.limit))}),o}})}async fetchDatasetsWithColumnsAndFormulas(e){if(!e||e.length===0)throw new Error("At least one dataset ID is required");const t=["datasets",e,this.authKey,this.authToken];return await this.queryClient.fetchQuery({queryKey:t,queryFn:async()=>{const r={action:"get",version:this.apiVersion,find:{where:{type:"dataset",id:{in:e}},attributes:["name","id","description"],include:[{model:"Column",attributes:["id","name","description","type","subtype","format","hidden","lowestLevel","expression","duration_levels","duration_format"],separate:!0,order:[["order","asc"]],include:[{model:"Column",attributes:["id","securable_id","hierarchy_enabled","currency_id"],as:"Joins"},{model:"HierarchyLevel",attributes:["id","level","name"],as:"HierarchyLevels"},{model:"Currency",attributes:["id","name","symbol"],as:"Currency"}]},{model:"Formula",attributes:["id","name","description","type","subtype","format","hidden","lowestLevel","expression","duration_levels","duration_format"],include:[{model:"Currency",attributes:["id","name","symbol"],as:"Currency"}]}]}},n=await this.fetchApi("/securable",r);return(n==null?void 0:n.rows)??[]}})}async fetchData(e){if(!e)throw new Error("Query is required");const t=["data",e];return await this.queryClient.fetchQuery({queryKey:t,queryFn:async()=>{const r={action:"get",version:this.apiVersion,find:{queries:[e]}},n=await this.fetchApi("/data",r);return{data:(n==null?void 0:n.data)||[],performance:(n==null?void 0:n.performance)||{}}}})}refreshAll(){this.queryClient.refetchQueries()}invalidateDatasetData(e){e?(this.queryClient.invalidateQueries({queryKey:["dataset",e]}),this.queryClient.invalidateQueries({queryKey:["columns",e]})):this.queryClient.invalidateQueries({queryKey:["datasets"]})}invalidateAll(){this.queryClient.clear()}static getInstance(e={}){return J.instance?Object.keys(e).length>0&&J.instance.configure(e):J.instance=new J(e),J.instance}async fetchDatasetsRecursive(e){if(!e||e.length===0)throw new Error("At least one dataset ID is required");const t=[...new Set(e)],r=new Set,n=new Map,u=o=>{o&&!r.has(o)&&!t.includes(o)&&t.push(o)};for(;t.length>0;){const o=[];for(;t.length>0&&o.length<50;){const a=t.shift();r.has(a)||o.push(a)}if(o.length!==0)try{(await this.fetchDatasetsWithColumnsAndFormulas(o)).forEach(l=>{const y=this.postProcessDatasetMetadata(l);r.add(y.id),this.queryClient.setQueryData(["dataset",y.id],y),(y.outgoingJoins??[]).map(c=>c.securable_id).filter(c=>!!c&&c!==y.id).forEach(c=>{u(c)}),n.set(y.id,y),this.availableDatasets.some(c=>c.id===y.id)||this.availableDatasets.push({id:y.id,name:y.name,columns:y.columns})})}catch(a){console.error("Error fetching datasets recursively:",a)}}return[...n.values()]}postProcessDatasetMetadata(e){const t=[],r=(e.columns??[]).map(n=>{const u=n.joins??(Array.isArray(n.joins)?n.joins:[]);Array.isArray(u)&&u.length>0&&t.push(...u);const{joins:o,...a}=n;return{...a,joins:u}});return{...e,columns:r,formulas:e.formulas??[],outgoingJoins:t,dateLoaded:new Date}}getAvailableDatasets(){return this.availableDatasets}getLinkedDatasetsIds(e){const t=this.queryClient.getQueryData(["dataset",e]);return t?(t.outgoingJoins??[]).map(r=>r.securable_id).filter(r=>!!r&&r!==e):[]}}const vt=J.getInstance();exports.dataBroker=vt;