@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,1735 +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
- var Fe = (s) => {
21
- throw TypeError(s);
22
- };
23
- var qe = (s, e, t) => e.has(s) || Fe("Cannot " + t);
24
- 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);
25
- var me = (s, e, t, r) => ({
26
- set _(n) {
27
- h(s, e, n, t);
28
- },
29
- get _() {
30
- return i(s, e, r);
31
- }
32
- });
33
- var be = class {
34
- constructor() {
35
- this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
36
- }
37
- subscribe(s) {
38
- return this.listeners.add(s), this.onSubscribe(), () => {
39
- this.listeners.delete(s), this.onUnsubscribe();
40
- };
41
- }
42
- hasListeners() {
43
- return this.listeners.size > 0;
44
- }
45
- onSubscribe() {
46
- }
47
- onUnsubscribe() {
48
- }
49
- }, we = typeof window > "u" || "Deno" in globalThis;
50
- function M() {
51
- }
52
- function ze(s, e) {
53
- return typeof s == "function" ? s(e) : s;
54
- }
55
- function Be(s) {
56
- return typeof s == "number" && s >= 0 && s !== 1 / 0;
57
- }
58
- function We(s, e) {
59
- return Math.max(s + (e || 0) - Date.now(), 0);
60
- }
61
- function Ae(s, e) {
62
- return typeof s == "function" ? s(e) : s;
63
- }
64
- function Xe(s, e) {
65
- return typeof s == "function" ? s(e) : s;
66
- }
67
- function De(s, e) {
68
- const {
69
- type: t = "all",
70
- exact: r,
71
- fetchStatus: n,
72
- predicate: u,
73
- queryKey: o,
74
- stale: a
75
- } = s;
76
- if (o) {
77
- if (r) {
78
- if (e.queryHash !== Se(o, e.options))
79
- return !1;
80
- } else if (!ce(e.queryKey, o))
81
- return !1;
82
- }
83
- if (t !== "all") {
84
- const l = e.isActive();
85
- if (t === "active" && !l || t === "inactive" && l)
86
- return !1;
87
- }
88
- return !(typeof a == "boolean" && e.isStale() !== a || n && n !== e.state.fetchStatus || u && !u(e));
89
- }
90
- function Qe(s, e) {
91
- const { exact: t, status: r, predicate: n, mutationKey: u } = s;
92
- if (u) {
93
- if (!e.options.mutationKey)
94
- return !1;
95
- if (t) {
96
- if (he(e.options.mutationKey) !== he(u))
97
- return !1;
98
- } else if (!ce(e.options.mutationKey, u))
99
- return !1;
100
- }
101
- return !(r && e.state.status !== r || n && !n(e));
102
- }
103
- function Se(s, e) {
104
- return ((e == null ? void 0 : e.queryKeyHashFn) || he)(s);
105
- }
106
- function he(s) {
107
- return JSON.stringify(
108
- s,
109
- (e, t) => Oe(t) ? Object.keys(t).sort().reduce((r, n) => (r[n] = t[n], r), {}) : t
110
- );
111
- }
112
- function ce(s, e) {
113
- 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;
114
- }
115
- function Ce(s, e) {
116
- if (s === e)
117
- return s;
118
- const t = Ee(s) && Ee(e);
119
- if (t || Oe(s) && Oe(e)) {
120
- const r = t ? s : Object.keys(s), n = r.length, u = t ? e : Object.keys(e), o = u.length, a = t ? [] : {};
121
- let l = 0;
122
- for (let y = 0; y < o; y++) {
123
- const m = t ? y : u[y];
124
- (!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++);
125
- }
126
- return n === o && l === n ? s : a;
127
- }
128
- return e;
129
- }
130
- function Ee(s) {
131
- return Array.isArray(s) && s.length === Object.keys(s).length;
132
- }
133
- function Oe(s) {
134
- if (!Me(s))
135
- return !1;
136
- const e = s.constructor;
137
- if (e === void 0)
138
- return !0;
139
- const t = e.prototype;
140
- return !(!Me(t) || !t.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(s) !== Object.prototype);
141
- }
142
- function Me(s) {
143
- return Object.prototype.toString.call(s) === "[object Object]";
144
- }
145
- function Ye(s) {
146
- return new Promise((e) => {
147
- setTimeout(e, s);
148
- });
149
- }
150
- function Ze(s, e, t) {
151
- if (typeof t.structuralSharing == "function")
152
- return t.structuralSharing(s, e);
153
- if (t.structuralSharing !== !1) {
154
- try {
155
- return Ce(s, e);
156
- } catch (r) {
157
- throw console.error(
158
- `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}`
159
- ), r;
160
- }
161
- return Ce(s, e);
162
- }
163
- return e;
164
- }
165
- function et(s, e, t = 0) {
166
- const r = [...s, e];
167
- return t && r.length > t ? r.slice(1) : r;
168
- }
169
- function tt(s, e, t = 0) {
170
- const r = [e, ...s];
171
- return t && r.length > t ? r.slice(0, -1) : r;
172
- }
173
- var ve = Symbol();
174
- function Ge(s, e) {
175
- return s.queryFn === ve && console.error(
176
- `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${s.queryHash}'`
177
- ), !s.queryFn && (e != null && e.initialPromise) ? () => e.initialPromise : !s.queryFn || s.queryFn === ve ? () => Promise.reject(new Error(`Missing queryFn: '${s.queryHash}'`)) : s.queryFn;
178
- }
179
- var z, G, Z, ke, st = (ke = class extends be {
180
- constructor() {
181
- super();
182
- f(this, z);
183
- f(this, G);
184
- f(this, Z);
185
- h(this, Z, (e) => {
186
- if (!we && window.addEventListener) {
187
- const t = () => e();
188
- return window.addEventListener("visibilitychange", t, !1), () => {
189
- window.removeEventListener("visibilitychange", t);
190
- };
191
- }
192
- });
193
- }
194
- onSubscribe() {
195
- i(this, G) || this.setEventListener(i(this, Z));
196
- }
197
- onUnsubscribe() {
198
- var e;
199
- this.hasListeners() || ((e = i(this, G)) == null || e.call(this), h(this, G, void 0));
200
- }
201
- setEventListener(e) {
202
- var t;
203
- h(this, Z, e), (t = i(this, G)) == null || t.call(this), h(this, G, e((r) => {
204
- typeof r == "boolean" ? this.setFocused(r) : this.onFocus();
205
- }));
206
- }
207
- setFocused(e) {
208
- i(this, z) !== e && (h(this, z, e), this.onFocus());
209
- }
210
- onFocus() {
211
- const e = this.isFocused();
212
- this.listeners.forEach((t) => {
213
- t(e);
214
- });
215
- }
216
- isFocused() {
217
- var e;
218
- return typeof i(this, z) == "boolean" ? i(this, z) : ((e = globalThis.document) == null ? void 0 : e.visibilityState) !== "hidden";
219
- }
220
- }, z = new WeakMap(), G = new WeakMap(), Z = new WeakMap(), ke), Ne = new st(), ee, N, te, Ke, rt = (Ke = class extends be {
221
- constructor() {
222
- super();
223
- f(this, ee, !0);
224
- f(this, N);
225
- f(this, te);
226
- h(this, te, (e) => {
227
- if (!we && window.addEventListener) {
228
- const t = () => e(!0), r = () => e(!1);
229
- return window.addEventListener("online", t, !1), window.addEventListener("offline", r, !1), () => {
230
- window.removeEventListener("online", t), window.removeEventListener("offline", r);
231
- };
232
- }
233
- });
234
- }
235
- onSubscribe() {
236
- i(this, N) || this.setEventListener(i(this, te));
237
- }
238
- onUnsubscribe() {
239
- var e;
240
- this.hasListeners() || ((e = i(this, N)) == null || e.call(this), h(this, N, void 0));
241
- }
242
- setEventListener(e) {
243
- var t;
244
- h(this, te, e), (t = i(this, N)) == null || t.call(this), h(this, N, e(this.setOnline.bind(this)));
245
- }
246
- setOnline(e) {
247
- i(this, ee) !== e && (h(this, ee, e), this.listeners.forEach((r) => {
248
- r(e);
249
- }));
250
- }
251
- isOnline() {
252
- return i(this, ee);
253
- }
254
- }, ee = new WeakMap(), N = new WeakMap(), te = new WeakMap(), Ke), ge = new rt();
255
- function it() {
256
- let s, e;
257
- const t = new Promise((n, u) => {
258
- s = n, e = u;
259
- });
260
- t.status = "pending", t.catch(() => {
261
- });
262
- function r(n) {
263
- Object.assign(t, n), delete t.resolve, delete t.reject;
264
- }
265
- return t.resolve = (n) => {
266
- r({
267
- status: "fulfilled",
268
- value: n
269
- }), s(n);
270
- }, t.reject = (n) => {
271
- r({
272
- status: "rejected",
273
- reason: n
274
- }), e(n);
275
- }, t;
276
- }
277
- function nt(s) {
278
- return Math.min(1e3 * 2 ** s, 3e4);
279
- }
280
- function $e(s) {
281
- return (s ?? "online") === "online" ? ge.isOnline() : !0;
282
- }
283
- var Ve = class extends Error {
284
- constructor(s) {
285
- super("CancelledError"), this.revert = s == null ? void 0 : s.revert, this.silent = s == null ? void 0 : s.silent;
286
- }
287
- };
288
- function Pe(s) {
289
- return s instanceof Ve;
290
- }
291
- function _e(s) {
292
- let e = !1, t = 0, r = !1, n;
293
- const u = it(), o = (d) => {
294
- var v;
295
- r || (p(new Ve(d)), (v = s.abort) == null || v.call(s));
296
- }, a = () => {
297
- e = !0;
298
- }, l = () => {
299
- e = !1;
300
- }, y = () => Ne.isFocused() && (s.networkMode === "always" || ge.isOnline()) && s.canRun(), m = () => $e(s.networkMode) && s.canRun(), c = (d) => {
301
- var v;
302
- r || (r = !0, (v = s.onSuccess) == null || v.call(s, d), n == null || n(), u.resolve(d));
303
- }, p = (d) => {
304
- var v;
305
- r || (r = !0, (v = s.onError) == null || v.call(s, d), n == null || n(), u.reject(d));
306
- }, F = () => new Promise((d) => {
307
- var v;
308
- n = (A) => {
309
- (r || y()) && d(A);
310
- }, (v = s.onPause) == null || v.call(s);
311
- }).then(() => {
312
- var d;
313
- n = void 0, r || (d = s.onContinue) == null || d.call(s);
314
- }), C = () => {
315
- if (r)
316
- return;
317
- let d;
318
- const v = t === 0 ? s.initialPromise : void 0;
319
- try {
320
- d = v ?? s.fn();
321
- } catch (A) {
322
- d = Promise.reject(A);
323
- }
324
- Promise.resolve(d).then(c).catch((A) => {
325
- var K;
326
- if (r)
327
- return;
328
- 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);
329
- if (e || !k) {
330
- p(A);
331
- return;
332
- }
333
- t++, (K = s.onFail) == null || K.call(s, t, A), Ye(D).then(() => y() ? void 0 : F()).then(() => {
334
- e ? p(A) : C();
335
- });
336
- });
337
- };
338
- return {
339
- promise: u,
340
- cancel: o,
341
- continue: () => (n == null || n(), u),
342
- cancelRetry: a,
343
- continueRetry: l,
344
- canStart: m,
345
- start: () => (m() ? C() : F().then(C), u)
346
- };
347
- }
348
- var at = (s) => setTimeout(s, 0);
349
- function ut() {
350
- let s = [], e = 0, t = (a) => {
351
- a();
352
- }, r = (a) => {
353
- a();
354
- }, n = at;
355
- const u = (a) => {
356
- e ? s.push(a) : n(() => {
357
- t(a);
358
- });
359
- }, o = () => {
360
- const a = s;
361
- s = [], a.length && n(() => {
362
- r(() => {
363
- a.forEach((l) => {
364
- t(l);
365
- });
366
- });
367
- });
368
- };
369
- return {
370
- batch: (a) => {
371
- let l;
372
- e++;
373
- try {
374
- l = a();
375
- } finally {
376
- e--, e || o();
377
- }
378
- return l;
379
- },
380
- /**
381
- * All calls to the wrapped function will be batched.
382
- */
383
- batchCalls: (a) => (...l) => {
384
- u(() => {
385
- a(...l);
386
- });
387
- },
388
- schedule: u,
389
- /**
390
- * Use this method to set a custom notify function.
391
- * This can be used to for example wrap notifications with `React.act` while running tests.
392
- */
393
- setNotifyFunction: (a) => {
394
- t = a;
395
- },
396
- /**
397
- * Use this method to set a custom function to batch notifications together into a single tick.
398
- * By default React Query will use the batch function provided by ReactDOM or React Native.
399
- */
400
- setBatchNotifyFunction: (a) => {
401
- r = a;
402
- },
403
- setScheduler: (a) => {
404
- n = a;
405
- }
406
- };
407
- }
408
- var S = ut(), B, je, Je = (je = class {
409
- constructor() {
410
- f(this, B);
411
- }
412
- destroy() {
413
- this.clearGcTimeout();
414
- }
415
- scheduleGc() {
416
- this.clearGcTimeout(), Be(this.gcTime) && h(this, B, setTimeout(() => {
417
- this.optionalRemove();
418
- }, this.gcTime));
419
- }
420
- updateGcTime(s) {
421
- this.gcTime = Math.max(
422
- this.gcTime || 0,
423
- s ?? (we ? 1 / 0 : 5 * 60 * 1e3)
424
- );
425
- }
426
- clearGcTimeout() {
427
- i(this, B) && (clearTimeout(i(this, B)), h(this, B, void 0));
428
- }
429
- }, B = new WeakMap(), je), se, re, Q, W, P, le, X, T, L, Ue, ot = (Ue = class extends Je {
430
- constructor(e) {
431
- super();
432
- f(this, T);
433
- f(this, se);
434
- f(this, re);
435
- f(this, Q);
436
- f(this, W);
437
- f(this, P);
438
- f(this, le);
439
- f(this, X);
440
- 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();
441
- }
442
- get meta() {
443
- return this.options.meta;
444
- }
445
- get promise() {
446
- var e;
447
- return (e = i(this, P)) == null ? void 0 : e.promise;
448
- }
449
- setOptions(e) {
450
- this.options = { ...i(this, le), ...e }, this.updateGcTime(this.options.gcTime);
451
- }
452
- optionalRemove() {
453
- !this.observers.length && this.state.fetchStatus === "idle" && i(this, Q).remove(this);
454
- }
455
- setData(e, t) {
456
- const r = Ze(this.state.data, e, this.options);
457
- return q(this, T, L).call(this, {
458
- data: r,
459
- type: "success",
460
- dataUpdatedAt: t == null ? void 0 : t.updatedAt,
461
- manual: t == null ? void 0 : t.manual
462
- }), r;
463
- }
464
- setState(e, t) {
465
- q(this, T, L).call(this, { type: "setState", state: e, setStateOptions: t });
466
- }
467
- cancel(e) {
468
- var r, n;
469
- const t = (r = i(this, P)) == null ? void 0 : r.promise;
470
- return (n = i(this, P)) == null || n.cancel(e), t ? t.then(M).catch(M) : Promise.resolve();
471
- }
472
- destroy() {
473
- super.destroy(), this.cancel({ silent: !0 });
474
- }
475
- reset() {
476
- this.destroy(), this.setState(i(this, se));
477
- }
478
- isActive() {
479
- return this.observers.some(
480
- (e) => Xe(e.options.enabled, this) !== !1
481
- );
482
- }
483
- isDisabled() {
484
- return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === ve || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
485
- }
486
- isStale() {
487
- return this.state.isInvalidated ? !0 : this.getObserversCount() > 0 ? this.observers.some(
488
- (e) => e.getCurrentResult().isStale
489
- ) : this.state.data === void 0;
490
- }
491
- isStaleByTime(e = 0) {
492
- return this.state.isInvalidated || this.state.data === void 0 || !We(this.state.dataUpdatedAt, e);
493
- }
494
- onFocus() {
495
- var t;
496
- const e = this.observers.find((r) => r.shouldFetchOnWindowFocus());
497
- e == null || e.refetch({ cancelRefetch: !1 }), (t = i(this, P)) == null || t.continue();
498
- }
499
- onOnline() {
500
- var t;
501
- const e = this.observers.find((r) => r.shouldFetchOnReconnect());
502
- e == null || e.refetch({ cancelRefetch: !1 }), (t = i(this, P)) == null || t.continue();
503
- }
504
- addObserver(e) {
505
- this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), i(this, Q).notify({ type: "observerAdded", query: this, observer: e }));
506
- }
507
- removeObserver(e) {
508
- 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 }));
509
- }
510
- getObserversCount() {
511
- return this.observers.length;
512
- }
513
- invalidate() {
514
- this.state.isInvalidated || q(this, T, L).call(this, { type: "invalidate" });
515
- }
516
- fetch(e, t) {
517
- var l, y, m;
518
- if (this.state.fetchStatus !== "idle") {
519
- if (this.state.data !== void 0 && (t != null && t.cancelRefetch))
520
- this.cancel({ silent: !0 });
521
- else if (i(this, P))
522
- return i(this, P).continueRetry(), i(this, P).promise;
523
- }
524
- if (e && this.setOptions(e), !this.options.queryFn) {
525
- const c = this.observers.find((p) => p.options.queryFn);
526
- c && this.setOptions(c.options);
527
- }
528
- Array.isArray(this.options.queryKey) || console.error(
529
- "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']"
530
- );
531
- const r = new AbortController(), n = (c) => {
532
- Object.defineProperty(c, "signal", {
533
- enumerable: !0,
534
- get: () => (h(this, X, !0), r.signal)
535
- });
536
- }, u = () => {
537
- const c = Ge(this.options, t), p = {
538
- client: i(this, W),
539
- queryKey: this.queryKey,
540
- meta: this.meta
541
- };
542
- return n(p), h(this, X, !1), this.options.persister ? this.options.persister(
543
- c,
544
- p,
545
- this
546
- ) : c(p);
547
- }, o = {
548
- fetchOptions: t,
549
- options: this.options,
550
- queryKey: this.queryKey,
551
- client: i(this, W),
552
- state: this.state,
553
- fetchFn: u
554
- };
555
- n(o), (l = this.options.behavior) == null || l.onFetch(
556
- o,
557
- this
558
- ), 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 });
559
- const a = (c) => {
560
- var p, F, C, d;
561
- Pe(c) && c.silent || q(this, T, L).call(this, {
562
- type: "error",
563
- error: c
564
- }), Pe(c) || ((F = (p = i(this, Q).config).onError) == null || F.call(
565
- p,
566
- c,
567
- this
568
- ), (d = (C = i(this, Q).config).onSettled) == null || d.call(
569
- C,
570
- this.state.data,
571
- c,
572
- this
573
- )), this.scheduleGc();
574
- };
575
- return h(this, P, _e({
576
- initialPromise: t == null ? void 0 : t.initialPromise,
577
- fn: o.fetchFn,
578
- abort: r.abort.bind(r),
579
- onSuccess: (c) => {
580
- var p, F, C, d;
581
- if (c === void 0) {
582
- console.error(
583
- `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
584
- ), a(new Error(`${this.queryHash} data is undefined`));
585
- return;
586
- }
587
- try {
588
- this.setData(c);
589
- } catch (v) {
590
- a(v);
591
- return;
592
- }
593
- (F = (p = i(this, Q).config).onSuccess) == null || F.call(p, c, this), (d = (C = i(this, Q).config).onSettled) == null || d.call(
594
- C,
595
- c,
596
- this.state.error,
597
- this
598
- ), this.scheduleGc();
599
- },
600
- onError: a,
601
- onFail: (c, p) => {
602
- q(this, T, L).call(this, { type: "failed", failureCount: c, error: p });
603
- },
604
- onPause: () => {
605
- q(this, T, L).call(this, { type: "pause" });
606
- },
607
- onContinue: () => {
608
- q(this, T, L).call(this, { type: "continue" });
609
- },
610
- retry: o.options.retry,
611
- retryDelay: o.options.retryDelay,
612
- networkMode: o.options.networkMode,
613
- canRun: () => !0
614
- })), i(this, P).start();
615
- }
616
- }, 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) {
617
- const t = (r) => {
618
- switch (e.type) {
619
- case "failed":
620
- return {
621
- ...r,
622
- fetchFailureCount: e.failureCount,
623
- fetchFailureReason: e.error
624
- };
625
- case "pause":
626
- return {
627
- ...r,
628
- fetchStatus: "paused"
629
- };
630
- case "continue":
631
- return {
632
- ...r,
633
- fetchStatus: "fetching"
634
- };
635
- case "fetch":
636
- return {
637
- ...r,
638
- ...ht(r.data, this.options),
639
- fetchMeta: e.meta ?? null
640
- };
641
- case "success":
642
- return {
643
- ...r,
644
- data: e.data,
645
- dataUpdateCount: r.dataUpdateCount + 1,
646
- dataUpdatedAt: e.dataUpdatedAt ?? Date.now(),
647
- error: null,
648
- isInvalidated: !1,
649
- status: "success",
650
- ...!e.manual && {
651
- fetchStatus: "idle",
652
- fetchFailureCount: 0,
653
- fetchFailureReason: null
654
- }
655
- };
656
- case "error":
657
- const n = e.error;
658
- return Pe(n) && n.revert && i(this, re) ? { ...i(this, re), fetchStatus: "idle" } : {
659
- ...r,
660
- error: n,
661
- errorUpdateCount: r.errorUpdateCount + 1,
662
- errorUpdatedAt: Date.now(),
663
- fetchFailureCount: r.fetchFailureCount + 1,
664
- fetchFailureReason: n,
665
- fetchStatus: "idle",
666
- status: "error"
667
- };
668
- case "invalidate":
669
- return {
670
- ...r,
671
- isInvalidated: !0
672
- };
673
- case "setState":
674
- return {
675
- ...r,
676
- ...e.state
677
- };
678
- }
679
- };
680
- this.state = t(this.state), S.batch(() => {
681
- this.observers.forEach((r) => {
682
- r.onQueryUpdate();
683
- }), i(this, Q).notify({ query: this, type: "updated", action: e });
684
- });
685
- }, Ue);
686
- function ht(s, e) {
687
- return {
688
- fetchFailureCount: 0,
689
- fetchFailureReason: null,
690
- fetchStatus: $e(e.networkMode) ? "fetching" : "paused",
691
- ...s === void 0 && {
692
- error: null,
693
- status: "pending"
694
- }
695
- };
696
- }
697
- function ct(s) {
698
- 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;
699
- return {
700
- data: e,
701
- dataUpdateCount: 0,
702
- dataUpdatedAt: t ? r ?? Date.now() : 0,
703
- error: null,
704
- errorUpdateCount: 0,
705
- errorUpdatedAt: 0,
706
- fetchFailureCount: 0,
707
- fetchFailureReason: null,
708
- fetchMeta: null,
709
- isInvalidated: !1,
710
- status: t ? "success" : "pending",
711
- fetchStatus: "idle"
712
- };
713
- }
714
- var j, Ie, lt = (Ie = class extends be {
715
- constructor(e = {}) {
716
- super();
717
- f(this, j);
718
- this.config = e, h(this, j, /* @__PURE__ */ new Map());
719
- }
720
- build(e, t, r) {
721
- const n = t.queryKey, u = t.queryHash ?? Se(n, t);
722
- let o = this.get(u);
723
- return o || (o = new ot({
724
- client: e,
725
- queryKey: n,
726
- queryHash: u,
727
- options: e.defaultQueryOptions(t),
728
- state: r,
729
- defaultOptions: e.getQueryDefaults(n)
730
- }), this.add(o)), o;
731
- }
732
- add(e) {
733
- i(this, j).has(e.queryHash) || (i(this, j).set(e.queryHash, e), this.notify({
734
- type: "added",
735
- query: e
736
- }));
737
- }
738
- remove(e) {
739
- const t = i(this, j).get(e.queryHash);
740
- t && (e.destroy(), t === e && i(this, j).delete(e.queryHash), this.notify({ type: "removed", query: e }));
741
- }
742
- clear() {
743
- S.batch(() => {
744
- this.getAll().forEach((e) => {
745
- this.remove(e);
746
- });
747
- });
748
- }
749
- get(e) {
750
- return i(this, j).get(e);
751
- }
752
- getAll() {
753
- return [...i(this, j).values()];
754
- }
755
- find(e) {
756
- const t = { exact: !0, ...e };
757
- return this.getAll().find(
758
- (r) => De(t, r)
759
- );
760
- }
761
- findAll(e = {}) {
762
- const t = this.getAll();
763
- return Object.keys(e).length > 0 ? t.filter((r) => De(e, r)) : t;
764
- }
765
- notify(e) {
766
- S.batch(() => {
767
- this.listeners.forEach((t) => {
768
- t(e);
769
- });
770
- });
771
- }
772
- onFocus() {
773
- S.batch(() => {
774
- this.getAll().forEach((e) => {
775
- e.onFocus();
776
- });
777
- });
778
- }
779
- onOnline() {
780
- S.batch(() => {
781
- this.getAll().forEach((e) => {
782
- e.onOnline();
783
- });
784
- });
785
- }
786
- }, j = new WeakMap(), Ie), U, O, Y, I, x, Le, dt = (Le = class extends Je {
787
- constructor(e) {
788
- super();
789
- f(this, I);
790
- f(this, U);
791
- f(this, O);
792
- f(this, Y);
793
- this.mutationId = e.mutationId, h(this, O, e.mutationCache), h(this, U, []), this.state = e.state || ft(), this.setOptions(e.options), this.scheduleGc();
794
- }
795
- setOptions(e) {
796
- this.options = e, this.updateGcTime(this.options.gcTime);
797
- }
798
- get meta() {
799
- return this.options.meta;
800
- }
801
- addObserver(e) {
802
- i(this, U).includes(e) || (i(this, U).push(e), this.clearGcTimeout(), i(this, O).notify({
803
- type: "observerAdded",
804
- mutation: this,
805
- observer: e
806
- }));
807
- }
808
- removeObserver(e) {
809
- h(this, U, i(this, U).filter((t) => t !== e)), this.scheduleGc(), i(this, O).notify({
810
- type: "observerRemoved",
811
- mutation: this,
812
- observer: e
813
- });
814
- }
815
- optionalRemove() {
816
- i(this, U).length || (this.state.status === "pending" ? this.scheduleGc() : i(this, O).remove(this));
817
- }
818
- continue() {
819
- var e;
820
- return ((e = i(this, Y)) == null ? void 0 : e.continue()) ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
821
- this.execute(this.state.variables);
822
- }
823
- async execute(e) {
824
- var u, o, a, l, y, m, c, p, F, C, d, v, A, E, b, D, k, K, fe, oe;
825
- const t = () => {
826
- q(this, I, x).call(this, { type: "continue" });
827
- };
828
- h(this, Y, _e({
829
- fn: () => this.options.mutationFn ? this.options.mutationFn(e) : Promise.reject(new Error("No mutationFn found")),
830
- onFail: (w, ye) => {
831
- q(this, I, x).call(this, { type: "failed", failureCount: w, error: ye });
832
- },
833
- onPause: () => {
834
- q(this, I, x).call(this, { type: "pause" });
835
- },
836
- onContinue: t,
837
- retry: this.options.retry ?? 0,
838
- retryDelay: this.options.retryDelay,
839
- networkMode: this.options.networkMode,
840
- canRun: () => i(this, O).canRun(this)
841
- }));
842
- const r = this.state.status === "pending", n = !i(this, Y).canStart();
843
- try {
844
- if (r)
845
- t();
846
- else {
847
- 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(
848
- u,
849
- e,
850
- this
851
- ));
852
- const ye = await ((l = (a = this.options).onMutate) == null ? void 0 : l.call(a, e));
853
- ye !== this.state.context && q(this, I, x).call(this, {
854
- type: "pending",
855
- context: ye,
856
- variables: e,
857
- isPaused: n
858
- });
859
- }
860
- const w = await i(this, Y).start();
861
- return await ((m = (y = i(this, O).config).onSuccess) == null ? void 0 : m.call(
862
- y,
863
- w,
864
- e,
865
- this.state.context,
866
- this
867
- )), 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(
868
- F,
869
- w,
870
- null,
871
- this.state.variables,
872
- this.state.context,
873
- this
874
- )), 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;
875
- } catch (w) {
876
- try {
877
- throw await ((E = (A = i(this, O).config).onError) == null ? void 0 : E.call(
878
- A,
879
- w,
880
- e,
881
- this.state.context,
882
- this
883
- )), await ((D = (b = this.options).onError) == null ? void 0 : D.call(
884
- b,
885
- w,
886
- e,
887
- this.state.context
888
- )), await ((K = (k = i(this, O).config).onSettled) == null ? void 0 : K.call(
889
- k,
890
- void 0,
891
- w,
892
- this.state.variables,
893
- this.state.context,
894
- this
895
- )), await ((oe = (fe = this.options).onSettled) == null ? void 0 : oe.call(
896
- fe,
897
- void 0,
898
- w,
899
- e,
900
- this.state.context
901
- )), w;
902
- } finally {
903
- q(this, I, x).call(this, { type: "error", error: w });
904
- }
905
- } finally {
906
- i(this, O).runNext(this);
907
- }
908
- }
909
- }, U = new WeakMap(), O = new WeakMap(), Y = new WeakMap(), I = new WeakSet(), x = function(e) {
910
- const t = (r) => {
911
- switch (e.type) {
912
- case "failed":
913
- return {
914
- ...r,
915
- failureCount: e.failureCount,
916
- failureReason: e.error
917
- };
918
- case "pause":
919
- return {
920
- ...r,
921
- isPaused: !0
922
- };
923
- case "continue":
924
- return {
925
- ...r,
926
- isPaused: !1
927
- };
928
- case "pending":
929
- return {
930
- ...r,
931
- context: e.context,
932
- data: void 0,
933
- failureCount: 0,
934
- failureReason: null,
935
- error: null,
936
- isPaused: e.isPaused,
937
- status: "pending",
938
- variables: e.variables,
939
- submittedAt: Date.now()
940
- };
941
- case "success":
942
- return {
943
- ...r,
944
- data: e.data,
945
- failureCount: 0,
946
- failureReason: null,
947
- error: null,
948
- status: "success",
949
- isPaused: !1
950
- };
951
- case "error":
952
- return {
953
- ...r,
954
- data: void 0,
955
- error: e.error,
956
- failureCount: r.failureCount + 1,
957
- failureReason: e.error,
958
- isPaused: !1,
959
- status: "error"
960
- };
961
- }
962
- };
963
- this.state = t(this.state), S.batch(() => {
964
- i(this, U).forEach((r) => {
965
- r.onMutationUpdate(e);
966
- }), i(this, O).notify({
967
- mutation: this,
968
- type: "updated",
969
- action: e
970
- });
971
- });
972
- }, Le);
973
- function ft() {
974
- return {
975
- context: void 0,
976
- data: void 0,
977
- error: null,
978
- failureCount: 0,
979
- failureReason: null,
980
- isPaused: !1,
981
- status: "idle",
982
- variables: void 0,
983
- submittedAt: 0
984
- };
985
- }
986
- var H, R, de, He, yt = (He = class extends be {
987
- constructor(e = {}) {
988
- super();
989
- f(this, H);
990
- f(this, R);
991
- f(this, de);
992
- this.config = e, h(this, H, /* @__PURE__ */ new Set()), h(this, R, /* @__PURE__ */ new Map()), h(this, de, 0);
993
- }
994
- build(e, t, r) {
995
- const n = new dt({
996
- mutationCache: this,
997
- mutationId: ++me(this, de)._,
998
- options: e.defaultMutationOptions(t),
999
- state: r
1000
- });
1001
- return this.add(n), n;
1002
- }
1003
- add(e) {
1004
- i(this, H).add(e);
1005
- const t = pe(e);
1006
- if (typeof t == "string") {
1007
- const r = i(this, R).get(t);
1008
- r ? r.push(e) : i(this, R).set(t, [e]);
1009
- }
1010
- this.notify({ type: "added", mutation: e });
1011
- }
1012
- remove(e) {
1013
- if (i(this, H).delete(e)) {
1014
- const t = pe(e);
1015
- if (typeof t == "string") {
1016
- const r = i(this, R).get(t);
1017
- if (r)
1018
- if (r.length > 1) {
1019
- const n = r.indexOf(e);
1020
- n !== -1 && r.splice(n, 1);
1021
- } else r[0] === e && i(this, R).delete(t);
1022
- }
1023
- }
1024
- this.notify({ type: "removed", mutation: e });
1025
- }
1026
- canRun(e) {
1027
- const t = pe(e);
1028
- if (typeof t == "string") {
1029
- const r = i(this, R).get(t), n = r == null ? void 0 : r.find(
1030
- (u) => u.state.status === "pending"
1031
- );
1032
- return !n || n === e;
1033
- } else
1034
- return !0;
1035
- }
1036
- runNext(e) {
1037
- var r;
1038
- const t = pe(e);
1039
- if (typeof t == "string") {
1040
- const n = (r = i(this, R).get(t)) == null ? void 0 : r.find((u) => u !== e && u.state.isPaused);
1041
- return (n == null ? void 0 : n.continue()) ?? Promise.resolve();
1042
- } else
1043
- return Promise.resolve();
1044
- }
1045
- clear() {
1046
- S.batch(() => {
1047
- i(this, H).forEach((e) => {
1048
- this.notify({ type: "removed", mutation: e });
1049
- }), i(this, H).clear(), i(this, R).clear();
1050
- });
1051
- }
1052
- getAll() {
1053
- return Array.from(i(this, H));
1054
- }
1055
- find(e) {
1056
- const t = { exact: !0, ...e };
1057
- return this.getAll().find(
1058
- (r) => Qe(t, r)
1059
- );
1060
- }
1061
- findAll(e = {}) {
1062
- return this.getAll().filter((t) => Qe(e, t));
1063
- }
1064
- notify(e) {
1065
- S.batch(() => {
1066
- this.listeners.forEach((t) => {
1067
- t(e);
1068
- });
1069
- });
1070
- }
1071
- resumePausedMutations() {
1072
- const e = this.getAll().filter((t) => t.state.isPaused);
1073
- return S.batch(
1074
- () => Promise.all(
1075
- e.map((t) => t.continue().catch(M))
1076
- )
1077
- );
1078
- }
1079
- }, H = new WeakMap(), R = new WeakMap(), de = new WeakMap(), He);
1080
- function pe(s) {
1081
- var e;
1082
- return (e = s.options.scope) == null ? void 0 : e.id;
1083
- }
1084
- function Te(s) {
1085
- return {
1086
- onFetch: (e, t) => {
1087
- var m, c, p, F, C;
1088
- 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) || [];
1089
- let a = { pages: [], pageParams: [] }, l = 0;
1090
- const y = async () => {
1091
- let d = !1;
1092
- const v = (b) => {
1093
- Object.defineProperty(b, "signal", {
1094
- enumerable: !0,
1095
- get: () => (e.signal.aborted ? d = !0 : e.signal.addEventListener("abort", () => {
1096
- d = !0;
1097
- }), e.signal)
1098
- });
1099
- }, A = Ge(e.options, e.fetchOptions), E = async (b, D, k) => {
1100
- if (d)
1101
- return Promise.reject();
1102
- if (D == null && b.pages.length)
1103
- return Promise.resolve(b);
1104
- const K = {
1105
- client: e.client,
1106
- queryKey: e.queryKey,
1107
- pageParam: D,
1108
- direction: k ? "backward" : "forward",
1109
- meta: e.options.meta
1110
- };
1111
- v(K);
1112
- const fe = await A(
1113
- K
1114
- ), { maxPages: oe } = e.options, w = k ? tt : et;
1115
- return {
1116
- pages: w(b.pages, fe, oe),
1117
- pageParams: w(b.pageParams, D, oe)
1118
- };
1119
- };
1120
- if (n && u.length) {
1121
- const b = n === "backward", D = b ? mt : Re, k = {
1122
- pages: u,
1123
- pageParams: o
1124
- }, K = D(r, k);
1125
- a = await E(k, K, b);
1126
- } else {
1127
- const b = s ?? u.length;
1128
- do {
1129
- const D = l === 0 ? o[0] ?? r.initialPageParam : Re(r, a);
1130
- if (l > 0 && D == null)
1131
- break;
1132
- a = await E(a, D), l++;
1133
- } while (l < b);
1134
- }
1135
- return a;
1136
- };
1137
- e.options.persister ? e.fetchFn = () => {
1138
- var d, v;
1139
- return (v = (d = e.options).persister) == null ? void 0 : v.call(
1140
- d,
1141
- y,
1142
- {
1143
- client: e.client,
1144
- queryKey: e.queryKey,
1145
- meta: e.options.meta,
1146
- signal: e.signal
1147
- },
1148
- t
1149
- );
1150
- } : e.fetchFn = y;
1151
- }
1152
- };
1153
- }
1154
- function Re(s, { pages: e, pageParams: t }) {
1155
- const r = e.length - 1;
1156
- return e.length > 0 ? s.getNextPageParam(
1157
- e[r],
1158
- e,
1159
- t[r],
1160
- t
1161
- ) : void 0;
1162
- }
1163
- function mt(s, { pages: e, pageParams: t }) {
1164
- var r;
1165
- return e.length > 0 ? (r = s.getPreviousPageParam) == null ? void 0 : r.call(s, e[0], e, t[0], t) : void 0;
1166
- }
1167
- var g, $, V, ie, ne, _, ae, ue, xe, pt = (xe = class {
1168
- constructor(s = {}) {
1169
- f(this, g);
1170
- f(this, $);
1171
- f(this, V);
1172
- f(this, ie);
1173
- f(this, ne);
1174
- f(this, _);
1175
- f(this, ae);
1176
- f(this, ue);
1177
- h(this, g, s.queryCache || new lt()), h(this, $, s.mutationCache || new yt()), h(this, V, s.defaultOptions || {}), h(this, ie, /* @__PURE__ */ new Map()), h(this, ne, /* @__PURE__ */ new Map()), h(this, _, 0);
1178
- }
1179
- mount() {
1180
- me(this, _)._++, i(this, _) === 1 && (h(this, ae, Ne.subscribe(async (s) => {
1181
- s && (await this.resumePausedMutations(), i(this, g).onFocus());
1182
- })), h(this, ue, ge.subscribe(async (s) => {
1183
- s && (await this.resumePausedMutations(), i(this, g).onOnline());
1184
- })));
1185
- }
1186
- unmount() {
1187
- var s, e;
1188
- 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));
1189
- }
1190
- isFetching(s) {
1191
- return i(this, g).findAll({ ...s, fetchStatus: "fetching" }).length;
1192
- }
1193
- isMutating(s) {
1194
- return i(this, $).findAll({ ...s, status: "pending" }).length;
1195
- }
1196
- /**
1197
- * Imperative (non-reactive) way to retrieve data for a QueryKey.
1198
- * Should only be used in callbacks or functions where reading the latest data is necessary, e.g. for optimistic updates.
1199
- *
1200
- * Hint: Do not use this function inside a component, because it won't receive updates.
1201
- * Use `useQuery` to create a `QueryObserver` that subscribes to changes.
1202
- */
1203
- getQueryData(s) {
1204
- var t;
1205
- const e = this.defaultQueryOptions({ queryKey: s });
1206
- return (t = i(this, g).get(e.queryHash)) == null ? void 0 : t.state.data;
1207
- }
1208
- ensureQueryData(s) {
1209
- const e = this.defaultQueryOptions(s), t = i(this, g).build(this, e), r = t.state.data;
1210
- return r === void 0 ? this.fetchQuery(s) : (s.revalidateIfStale && t.isStaleByTime(Ae(e.staleTime, t)) && this.prefetchQuery(e), Promise.resolve(r));
1211
- }
1212
- getQueriesData(s) {
1213
- return i(this, g).findAll(s).map(({ queryKey: e, state: t }) => {
1214
- const r = t.data;
1215
- return [e, r];
1216
- });
1217
- }
1218
- setQueryData(s, e, t) {
1219
- const r = this.defaultQueryOptions({ queryKey: s }), n = i(this, g).get(
1220
- r.queryHash
1221
- ), u = n == null ? void 0 : n.state.data, o = ze(e, u);
1222
- if (o !== void 0)
1223
- return i(this, g).build(this, r).setData(o, { ...t, manual: !0 });
1224
- }
1225
- setQueriesData(s, e, t) {
1226
- return S.batch(
1227
- () => i(this, g).findAll(s).map(({ queryKey: r }) => [
1228
- r,
1229
- this.setQueryData(r, e, t)
1230
- ])
1231
- );
1232
- }
1233
- getQueryState(s) {
1234
- var t;
1235
- const e = this.defaultQueryOptions({ queryKey: s });
1236
- return (t = i(this, g).get(
1237
- e.queryHash
1238
- )) == null ? void 0 : t.state;
1239
- }
1240
- removeQueries(s) {
1241
- const e = i(this, g);
1242
- S.batch(() => {
1243
- e.findAll(s).forEach((t) => {
1244
- e.remove(t);
1245
- });
1246
- });
1247
- }
1248
- resetQueries(s, e) {
1249
- const t = i(this, g);
1250
- return S.batch(() => (t.findAll(s).forEach((r) => {
1251
- r.reset();
1252
- }), this.refetchQueries(
1253
- {
1254
- type: "active",
1255
- ...s
1256
- },
1257
- e
1258
- )));
1259
- }
1260
- cancelQueries(s, e = {}) {
1261
- const t = { revert: !0, ...e }, r = S.batch(
1262
- () => i(this, g).findAll(s).map((n) => n.cancel(t))
1263
- );
1264
- return Promise.all(r).then(M).catch(M);
1265
- }
1266
- invalidateQueries(s, e = {}) {
1267
- return S.batch(() => (i(this, g).findAll(s).forEach((t) => {
1268
- t.invalidate();
1269
- }), (s == null ? void 0 : s.refetchType) === "none" ? Promise.resolve() : this.refetchQueries(
1270
- {
1271
- ...s,
1272
- type: (s == null ? void 0 : s.refetchType) ?? (s == null ? void 0 : s.type) ?? "active"
1273
- },
1274
- e
1275
- )));
1276
- }
1277
- refetchQueries(s, e = {}) {
1278
- const t = {
1279
- ...e,
1280
- cancelRefetch: e.cancelRefetch ?? !0
1281
- }, r = S.batch(
1282
- () => i(this, g).findAll(s).filter((n) => !n.isDisabled()).map((n) => {
1283
- let u = n.fetch(void 0, t);
1284
- return t.throwOnError || (u = u.catch(M)), n.state.fetchStatus === "paused" ? Promise.resolve() : u;
1285
- })
1286
- );
1287
- return Promise.all(r).then(M);
1288
- }
1289
- fetchQuery(s) {
1290
- const e = this.defaultQueryOptions(s);
1291
- e.retry === void 0 && (e.retry = !1);
1292
- const t = i(this, g).build(this, e);
1293
- return t.isStaleByTime(
1294
- Ae(e.staleTime, t)
1295
- ) ? t.fetch(e) : Promise.resolve(t.state.data);
1296
- }
1297
- prefetchQuery(s) {
1298
- return this.fetchQuery(s).then(M).catch(M);
1299
- }
1300
- fetchInfiniteQuery(s) {
1301
- return s.behavior = Te(s.pages), this.fetchQuery(s);
1302
- }
1303
- prefetchInfiniteQuery(s) {
1304
- return this.fetchInfiniteQuery(s).then(M).catch(M);
1305
- }
1306
- ensureInfiniteQueryData(s) {
1307
- return s.behavior = Te(s.pages), this.ensureQueryData(s);
1308
- }
1309
- resumePausedMutations() {
1310
- return ge.isOnline() ? i(this, $).resumePausedMutations() : Promise.resolve();
1311
- }
1312
- getQueryCache() {
1313
- return i(this, g);
1314
- }
1315
- getMutationCache() {
1316
- return i(this, $);
1317
- }
1318
- getDefaultOptions() {
1319
- return i(this, V);
1320
- }
1321
- setDefaultOptions(s) {
1322
- h(this, V, s);
1323
- }
1324
- setQueryDefaults(s, e) {
1325
- i(this, ie).set(he(s), {
1326
- queryKey: s,
1327
- defaultOptions: e
1328
- });
1329
- }
1330
- getQueryDefaults(s) {
1331
- const e = [...i(this, ie).values()], t = {};
1332
- return e.forEach((r) => {
1333
- ce(s, r.queryKey) && Object.assign(t, r.defaultOptions);
1334
- }), t;
1335
- }
1336
- setMutationDefaults(s, e) {
1337
- i(this, ne).set(he(s), {
1338
- mutationKey: s,
1339
- defaultOptions: e
1340
- });
1341
- }
1342
- getMutationDefaults(s) {
1343
- const e = [...i(this, ne).values()], t = {};
1344
- return e.forEach((r) => {
1345
- ce(s, r.mutationKey) && Object.assign(t, r.defaultOptions);
1346
- }), t;
1347
- }
1348
- defaultQueryOptions(s) {
1349
- if (s._defaulted)
1350
- return s;
1351
- const e = {
1352
- ...i(this, V).queries,
1353
- ...this.getQueryDefaults(s.queryKey),
1354
- ...s,
1355
- _defaulted: !0
1356
- };
1357
- return e.queryHash || (e.queryHash = Se(
1358
- e.queryKey,
1359
- e
1360
- )), 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;
1361
- }
1362
- defaultMutationOptions(s) {
1363
- return s != null && s._defaulted ? s : {
1364
- ...i(this, V).mutations,
1365
- ...(s == null ? void 0 : s.mutationKey) && this.getMutationDefaults(s.mutationKey),
1366
- ...s,
1367
- _defaulted: !0
1368
- };
1369
- }
1370
- clear() {
1371
- i(this, g).clear(), i(this, $).clear();
1372
- }
1373
- }, g = new WeakMap(), $ = new WeakMap(), V = new WeakMap(), ie = new WeakMap(), ne = new WeakMap(), _ = new WeakMap(), ae = new WeakMap(), ue = new WeakMap(), xe);
1374
- class J {
1375
- constructor(e = {}) {
1376
- 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({
1377
- defaultOptions: {
1378
- queries: {
1379
- staleTime: e.staleTime || 5 * 60 * 1e3,
1380
- // 5 minutes
1381
- gcTime: e.gcTime || 10 * 60 * 1e3,
1382
- // 10 minutes
1383
- retry: e.retry || 3,
1384
- retryDelay: e.retryDelay || ((t) => Math.min(1e3 * 2 ** t, 3e4))
1385
- }
1386
- }
1387
- }), this.initNetworkListeners();
1388
- }
1389
- /**
1390
- * Set API configuration
1391
- * @param config - API configuration
1392
- */
1393
- configure(e = {}) {
1394
- 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) {
1395
- const t = {};
1396
- e.staleTime && (t.staleTime = e.staleTime), e.gcTime && (t.gcTime = e.gcTime), e.retry && (t.retry = e.retry), this.queryClient.setDefaultOptions({
1397
- queries: {
1398
- ...this.queryClient.getDefaultOptions().queries,
1399
- ...t
1400
- }
1401
- });
1402
- }
1403
- }
1404
- /**
1405
- * Initialize network status listeners
1406
- */
1407
- initNetworkListeners() {
1408
- typeof window < "u" && window.addEventListener("online", () => {
1409
- console.warn("Network connection restored, refreshing data..."), this.refreshAll();
1410
- });
1411
- }
1412
- /**
1413
- * Get API headers
1414
- * @param additionalHeaders - Additional headers to include
1415
- * @returns Headers for API requests
1416
- */
1417
- getHeaders(e = {}) {
1418
- return {
1419
- "Content-Type": "application/json",
1420
- ...e
1421
- };
1422
- }
1423
- /**
1424
- * Make API request with advanced error handling
1425
- * Default method is POST and supports an optional JSON body
1426
- * @param endpoint - API endpoint
1427
- * @param jsonBody - Optional JSON body to send with request
1428
- * @param options - Additional fetch options
1429
- * @returns API response
1430
- * @throws {Error} If API request fails
1431
- */
1432
- async fetchApi(e, t, r = {}) {
1433
- const n = `${this.apiUrl}/${this.apiVersion}${e}`, o = {
1434
- method: r.method || "POST",
1435
- headers: this.getHeaders(r.headers),
1436
- mode: "cors",
1437
- ...r
1438
- };
1439
- t !== void 0 && (t.key = this.authKey, t.token = this.authToken, o.body = JSON.stringify(t));
1440
- try {
1441
- const a = await fetch(n, o);
1442
- if (!a.ok) {
1443
- const l = await a.json().catch(() => null);
1444
- throw a.status === 401 || a.status === 403 ? new Error(
1445
- "Authentication failed. Please check your API token."
1446
- ) : a.status === 404 ? new Error(`Resource not found: ${e}`) : a.status === 429 ? new Error("Rate limit exceeded. Please try again later.") : new Error(
1447
- (l == null ? void 0 : l.message) || `API request failed with status ${a.status}`
1448
- );
1449
- }
1450
- return await a.json();
1451
- } catch (a) {
1452
- throw console.error(`API request to ${e} failed:`, a), a instanceof Error && (a.endpoint = e, a.timestamp = (/* @__PURE__ */ new Date()).toISOString()), a;
1453
- }
1454
- }
1455
- /**
1456
- * Fetch all available datasets with pagination support
1457
- * @param options - Pagination options
1458
- * @returns Paginated list of datasets
1459
- */
1460
- async fetchAllDatasets(e = {}) {
1461
- const t = e.offset || 0, r = e.limit || 50, n = ["datasets", t, r];
1462
- return await this.queryClient.fetchQuery({
1463
- queryKey: n,
1464
- queryFn: async () => {
1465
- const u = {
1466
- action: "get",
1467
- version: this.apiVersion,
1468
- find: {
1469
- where: {
1470
- type: "dataset"
1471
- },
1472
- limit: r,
1473
- offset: t
1474
- }
1475
- }, o = await this.fetchApi("/securable", u);
1476
- return {
1477
- data: (o == null ? void 0 : o.rows) ?? [],
1478
- pagination: {
1479
- offset: t,
1480
- limit: r,
1481
- total: (o == null ? void 0 : o.count) ?? 0,
1482
- pages: Math.ceil(((o == null ? void 0 : o.count) ?? 0) / r)
1483
- }
1484
- };
1485
- }
1486
- });
1487
- }
1488
- /**
1489
- * Search datasets by name or description
1490
- * @param query - Search query
1491
- * @returns List of matching datasets
1492
- */
1493
- async searchDatasets(e, t) {
1494
- if (!e)
1495
- return { data: [] };
1496
- const r = ["datasets", "search", e, t];
1497
- return await this.queryClient.fetchQuery({
1498
- queryKey: r,
1499
- queryFn: async () => {
1500
- const n = {
1501
- action: "get",
1502
- version: this.apiVersion,
1503
- find: {
1504
- where: {
1505
- type: "dataset"
1506
- }
1507
- }
1508
- };
1509
- (e == null ? void 0 : e.length) > 0 && (n.find.search = {
1510
- match_types: ["name"],
1511
- keyphrase: e
1512
- }), 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);
1513
- const u = await this.fetchApi("/securable", n), o = {
1514
- data: (u == null ? void 0 : u.rows) ?? []
1515
- };
1516
- return t != null && t.limit && (o.pagination = {
1517
- offset: (t == null ? void 0 : t.offset) ?? 0,
1518
- limit: t == null ? void 0 : t.limit,
1519
- total: (u == null ? void 0 : u.count) ?? 0,
1520
- pages: Math.ceil(((u == null ? void 0 : u.count) ?? 0) / (t == null ? void 0 : t.limit))
1521
- }), o;
1522
- }
1523
- });
1524
- }
1525
- /**
1526
- * Fetches multiple datasets with their associated columns and formulas metadata
1527
- * @param datasetIds - Array of dataset IDs to fetch
1528
- * @returns Promise that resolves to an array of DatasetMetadata objects containing:
1529
- * - Basic dataset info (id, name, description)
1530
- * - Columns with metadata including joins, hierarchy levels, and currency info
1531
- * - Formulas with their expressions and currency associations
1532
- * @throws Error if datasetIds is empty or null
1533
- */
1534
- async fetchDatasetsWithColumnsAndFormulas(e) {
1535
- if (!e || e.length === 0)
1536
- throw new Error("At least one dataset ID is required");
1537
- const t = ["datasets", e, this.authKey, this.authToken];
1538
- return await this.queryClient.fetchQuery({
1539
- queryKey: t,
1540
- queryFn: async () => {
1541
- const r = {
1542
- action: "get",
1543
- version: this.apiVersion,
1544
- find: {
1545
- where: {
1546
- type: "dataset",
1547
- id: {
1548
- in: e
1549
- }
1550
- },
1551
- attributes: ["name", "id", "description"],
1552
- include: [
1553
- {
1554
- model: "Column",
1555
- attributes: [
1556
- "id",
1557
- "name",
1558
- "description",
1559
- "type",
1560
- "subtype",
1561
- "format",
1562
- "hidden",
1563
- "lowestLevel",
1564
- "expression",
1565
- "duration_levels",
1566
- "duration_format"
1567
- ],
1568
- separate: !0,
1569
- order: [["order", "asc"]],
1570
- include: [
1571
- {
1572
- model: "Column",
1573
- attributes: [
1574
- "id",
1575
- "securable_id",
1576
- "hierarchy_enabled",
1577
- "currency_id"
1578
- ],
1579
- as: "Joins"
1580
- },
1581
- {
1582
- model: "HierarchyLevel",
1583
- attributes: ["id", "level", "name"],
1584
- as: "HierarchyLevels"
1585
- },
1586
- {
1587
- model: "Currency",
1588
- attributes: ["id", "name", "symbol"],
1589
- as: "Currency"
1590
- }
1591
- ]
1592
- },
1593
- {
1594
- model: "Formula",
1595
- attributes: [
1596
- "id",
1597
- "name",
1598
- "description",
1599
- "type",
1600
- "subtype",
1601
- "format",
1602
- "hidden",
1603
- "lowestLevel",
1604
- "expression",
1605
- "duration_levels",
1606
- "duration_format"
1607
- ],
1608
- include: [
1609
- {
1610
- model: "Currency",
1611
- attributes: ["id", "name", "symbol"],
1612
- as: "Currency"
1613
- }
1614
- ]
1615
- }
1616
- ]
1617
- }
1618
- }, n = await this.fetchApi("/securable", r);
1619
- return (n == null ? void 0 : n.rows) ?? [];
1620
- }
1621
- });
1622
- }
1623
- /**
1624
- * Fetch data from a dataset with filtering
1625
- * @param datasetId - Dataset ID
1626
- * @param queryParams - Query parameters (filters, sort, etc.)
1627
- * @returns Dataset data
1628
- */
1629
- async fetchData(e) {
1630
- if (!e) throw new Error("Query is required");
1631
- const t = ["data", e];
1632
- return await this.queryClient.fetchQuery({
1633
- queryKey: t,
1634
- queryFn: async () => {
1635
- const r = {
1636
- action: "get",
1637
- version: this.apiVersion,
1638
- find: {
1639
- queries: [e]
1640
- }
1641
- }, n = await this.fetchApi("/data", r);
1642
- return {
1643
- data: (n == null ? void 0 : n.data) || [],
1644
- performance: (n == null ? void 0 : n.performance) || {}
1645
- };
1646
- }
1647
- });
1648
- }
1649
- /**
1650
- * Refresh all queries
1651
- */
1652
- refreshAll() {
1653
- this.queryClient.refetchQueries();
1654
- }
1655
- /**
1656
- * Invalidate cached data for a dataset
1657
- * @param datasetId - Dataset ID (optional)
1658
- */
1659
- invalidateDatasetData(e) {
1660
- e ? (this.queryClient.invalidateQueries({ queryKey: ["dataset", e] }), this.queryClient.invalidateQueries({ queryKey: ["columns", e] })) : this.queryClient.invalidateQueries({ queryKey: ["datasets"] });
1661
- }
1662
- /**
1663
- * Invalidate all cached data
1664
- */
1665
- invalidateAll() {
1666
- this.queryClient.clear();
1667
- }
1668
- /**
1669
- * Create a singleton instance
1670
- * @param config - API configuration
1671
- * @returns Singleton instance
1672
- */
1673
- static getInstance(e = {}) {
1674
- return J.instance ? Object.keys(e).length > 0 && J.instance.configure(e) : J.instance = new J(e), J.instance;
1675
- }
1676
- async fetchDatasetsRecursive(e) {
1677
- if (!e || e.length === 0)
1678
- throw new Error("At least one dataset ID is required");
1679
- const t = [...new Set(e)], r = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Map(), u = (o) => {
1680
- o && !r.has(o) && !t.includes(o) && t.push(o);
1681
- };
1682
- for (; t.length > 0; ) {
1683
- const o = [];
1684
- for (; t.length > 0 && o.length < 50; ) {
1685
- const a = t.shift();
1686
- r.has(a) || o.push(a);
1687
- }
1688
- if (o.length !== 0)
1689
- try {
1690
- (await this.fetchDatasetsWithColumnsAndFormulas(o)).forEach((l) => {
1691
- const y = this.postProcessDatasetMetadata(l);
1692
- 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) => {
1693
- u(c);
1694
- }), n.set(y.id, y), this.availableDatasets.some((c) => c.id === y.id) || this.availableDatasets.push({
1695
- id: y.id,
1696
- name: y.name,
1697
- columns: y.columns
1698
- });
1699
- });
1700
- } catch (a) {
1701
- console.error("Error fetching datasets recursively:", a);
1702
- }
1703
- }
1704
- return [...n.values()];
1705
- }
1706
- postProcessDatasetMetadata(e) {
1707
- const t = [], r = (e.columns ?? []).map((n) => {
1708
- const u = n.joins ?? (Array.isArray(n.joins) ? n.joins : []);
1709
- Array.isArray(u) && u.length > 0 && t.push(...u);
1710
- const { joins: o, ...a } = n;
1711
- return {
1712
- ...a,
1713
- joins: u
1714
- };
1715
- });
1716
- return {
1717
- ...e,
1718
- columns: r,
1719
- formulas: e.formulas ?? [],
1720
- outgoingJoins: t,
1721
- dateLoaded: /* @__PURE__ */ new Date()
1722
- };
1723
- }
1724
- getAvailableDatasets() {
1725
- return this.availableDatasets;
1726
- }
1727
- getLinkedDatasetsIds(e) {
1728
- const t = this.queryClient.getQueryData(["dataset", e]);
1729
- return t ? (t.outgoingJoins ?? []).map((r) => r.securable_id).filter((r) => !!r && r !== e) : [];
1730
- }
1731
- }
1732
- const gt = J.getInstance();
1733
- export {
1734
- gt as d
1735
- };