drizzle-cube 0.4.39 → 0.4.41

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 (162) hide show
  1. package/dist/cli/index.cjs +439 -0
  2. package/dist/client/charts/ChartLoader.d.ts +18 -3
  3. package/dist/client/charts/chartConfigRegistry.d.ts +11 -1
  4. package/dist/client/charts/chartPlugin.d.ts +74 -0
  5. package/dist/client/charts/lazyChartConfigRegistry.d.ts +10 -0
  6. package/dist/client/charts.js +13 -15
  7. package/dist/client/chunks/{DashboardEditModal-EmBxK-89.js → DashboardEditModal-D_7J62sG.js} +683 -685
  8. package/dist/client/chunks/DashboardEditModal-D_7J62sG.js.map +1 -0
  9. package/dist/client/chunks/{FieldSearchModal-BxQ5JhWz.js → FieldSearchModal-5Qz6vvTz.js} +15 -16
  10. package/dist/client/chunks/{FieldSearchModal-BxQ5JhWz.js.map → FieldSearchModal-5Qz6vvTz.js.map} +1 -1
  11. package/dist/client/chunks/{RetentionCombinedChart-D4Yf1TnQ.js → RetentionCombinedChart-B1hUYaXt.js} +2 -2
  12. package/dist/client/chunks/{RetentionCombinedChart-D4Yf1TnQ.js.map → RetentionCombinedChart-B1hUYaXt.js.map} +1 -1
  13. package/dist/client/chunks/{RetentionHeatmap-BoGY6mlZ.js → RetentionHeatmap-Dn2ocjVf.js} +2 -2
  14. package/dist/client/chunks/{RetentionHeatmap-BoGY6mlZ.js.map → RetentionHeatmap-Dn2ocjVf.js.map} +1 -1
  15. package/dist/client/chunks/{analysis-builder-D70S-LZy.js → analysis-builder-DPJJiHVx.js} +1506 -1564
  16. package/dist/client/chunks/analysis-builder-DPJJiHVx.js.map +1 -0
  17. package/dist/client/chunks/{analysis-builder-shared-BxHYfTzo.js → analysis-builder-shared-C-C-rOgu.js} +762 -778
  18. package/dist/client/chunks/analysis-builder-shared-C-C-rOgu.js.map +1 -0
  19. package/dist/client/chunks/{chart-bar-Bx4oKlqo.js → chart-bar-DVzmau1G.js} +1 -1
  20. package/dist/client/chunks/{chart-bar-Bx4oKlqo.js.map → chart-bar-DVzmau1G.js.map} +1 -1
  21. package/dist/client/chunks/{chart-box-plot-CVIi1aM5.js → chart-box-plot-CCmbHv1Y.js} +1 -1
  22. package/dist/client/chunks/{chart-box-plot-CVIi1aM5.js.map → chart-box-plot-CCmbHv1Y.js.map} +1 -1
  23. package/dist/client/chunks/{chart-bubble-DvyG15UB.js → chart-bubble-S6qSwWdK.js} +1 -1
  24. package/dist/client/chunks/{chart-bubble-DvyG15UB.js.map → chart-bubble-S6qSwWdK.js.map} +1 -1
  25. package/dist/client/chunks/{chart-candlestick-caHyxB9O.js → chart-candlestick-BNKbDruo.js} +1 -1
  26. package/dist/client/chunks/{chart-candlestick-caHyxB9O.js.map → chart-candlestick-BNKbDruo.js.map} +1 -1
  27. package/dist/client/chunks/{chart-config-activity-grid-USo7JrPh.js → chart-config-activity-grid-BSWS08cI.js} +1 -1
  28. package/dist/client/chunks/{chart-config-activity-grid-USo7JrPh.js.map → chart-config-activity-grid-BSWS08cI.js.map} +1 -1
  29. package/dist/client/chunks/{chart-config-area-D_ZufYzg.js → chart-config-area-DKwgcHp4.js} +1 -1
  30. package/dist/client/chunks/{chart-config-area-D_ZufYzg.js.map → chart-config-area-DKwgcHp4.js.map} +1 -1
  31. package/dist/client/chunks/{chart-config-bar-BCi2Wmd6.js → chart-config-bar-deTjEhap.js} +1 -1
  32. package/dist/client/chunks/{chart-config-bar-BCi2Wmd6.js.map → chart-config-bar-deTjEhap.js.map} +1 -1
  33. package/dist/client/chunks/{chart-config-box-plot-afKLzJSp.js → chart-config-box-plot-DU4iWk3V.js} +1 -1
  34. package/dist/client/chunks/{chart-config-box-plot-afKLzJSp.js.map → chart-config-box-plot-DU4iWk3V.js.map} +1 -1
  35. package/dist/client/chunks/{chart-config-bubble-CgbBjPv8.js → chart-config-bubble-B8FSHSW-.js} +1 -1
  36. package/dist/client/chunks/{chart-config-bubble-CgbBjPv8.js.map → chart-config-bubble-B8FSHSW-.js.map} +1 -1
  37. package/dist/client/chunks/{chart-config-candlestick-7boGjZ-A.js → chart-config-candlestick-BGfyWFft.js} +1 -1
  38. package/dist/client/chunks/{chart-config-candlestick-7boGjZ-A.js.map → chart-config-candlestick-BGfyWFft.js.map} +1 -1
  39. package/dist/client/chunks/{chart-config-data-table-Cl7sBasW.js → chart-config-data-table-DKRcGa8t.js} +1 -1
  40. package/dist/client/chunks/{chart-config-data-table-Cl7sBasW.js.map → chart-config-data-table-DKRcGa8t.js.map} +1 -1
  41. package/dist/client/chunks/{chart-config-funnel-CXPYQtTl.js → chart-config-funnel-Bt4iGFo_.js} +1 -1
  42. package/dist/client/chunks/{chart-config-funnel-CXPYQtTl.js.map → chart-config-funnel-Bt4iGFo_.js.map} +1 -1
  43. package/dist/client/chunks/{chart-config-gauge-DUNEUCvh.js → chart-config-gauge-Bk4Jjp3W.js} +1 -1
  44. package/dist/client/chunks/{chart-config-gauge-DUNEUCvh.js.map → chart-config-gauge-Bk4Jjp3W.js.map} +1 -1
  45. package/dist/client/chunks/{chart-config-heat-map-BFf1tO11.js → chart-config-heat-map-CkHsqkrY.js} +1 -1
  46. package/dist/client/chunks/{chart-config-heat-map-BFf1tO11.js.map → chart-config-heat-map-CkHsqkrY.js.map} +1 -1
  47. package/dist/client/chunks/{chart-config-kpi-delta-C5k2waIJ.js → chart-config-kpi-delta-CkUX98JV.js} +1 -1
  48. package/dist/client/chunks/{chart-config-kpi-delta-C5k2waIJ.js.map → chart-config-kpi-delta-CkUX98JV.js.map} +1 -1
  49. package/dist/client/chunks/{chart-config-kpi-number-DptOyhk0.js → chart-config-kpi-number-DcxyiUgs.js} +1 -1
  50. package/dist/client/chunks/{chart-config-kpi-number-DptOyhk0.js.map → chart-config-kpi-number-DcxyiUgs.js.map} +1 -1
  51. package/dist/client/chunks/{chart-config-kpi-text-D9DdVWqd.js → chart-config-kpi-text-DI4mj8CN.js} +1 -1
  52. package/dist/client/chunks/{chart-config-kpi-text-D9DdVWqd.js.map → chart-config-kpi-text-DI4mj8CN.js.map} +1 -1
  53. package/dist/client/chunks/{chart-config-line-B3NgLF7K.js → chart-config-line--j7-dLue.js} +1 -1
  54. package/dist/client/chunks/{chart-config-line-B3NgLF7K.js.map → chart-config-line--j7-dLue.js.map} +1 -1
  55. package/dist/client/chunks/{chart-config-markdown-tlfivQTt.js → chart-config-markdown-DUjvVjV4.js} +1 -1
  56. package/dist/client/chunks/{chart-config-markdown-tlfivQTt.js.map → chart-config-markdown-DUjvVjV4.js.map} +1 -1
  57. package/dist/client/chunks/{chart-config-measure-profile-D7XDwrU2.js → chart-config-measure-profile-B9FKBNGc.js} +1 -1
  58. package/dist/client/chunks/{chart-config-measure-profile-D7XDwrU2.js.map → chart-config-measure-profile-B9FKBNGc.js.map} +1 -1
  59. package/dist/client/chunks/{chart-config-pie-wY0B52PC.js → chart-config-pie-yU4jipl9.js} +1 -1
  60. package/dist/client/chunks/{chart-config-pie-wY0B52PC.js.map → chart-config-pie-yU4jipl9.js.map} +1 -1
  61. package/dist/client/chunks/{chart-config-radar-DRpJBy1M.js → chart-config-radar-R9Fkc8wL.js} +1 -1
  62. package/dist/client/chunks/{chart-config-radar-DRpJBy1M.js.map → chart-config-radar-R9Fkc8wL.js.map} +1 -1
  63. package/dist/client/chunks/{chart-config-radial-bar-DCUpXv9G.js → chart-config-radial-bar-DeoXfpIp.js} +1 -1
  64. package/dist/client/chunks/{chart-config-radial-bar-DCUpXv9G.js.map → chart-config-radial-bar-DeoXfpIp.js.map} +1 -1
  65. package/dist/client/chunks/{chart-config-sankey-CdOhlm4h.js → chart-config-sankey-CXEsxo6s.js} +1 -1
  66. package/dist/client/chunks/{chart-config-sankey-CdOhlm4h.js.map → chart-config-sankey-CXEsxo6s.js.map} +1 -1
  67. package/dist/client/chunks/{chart-config-scatter-B2su_x8f.js → chart-config-scatter-MVUFupub.js} +1 -1
  68. package/dist/client/chunks/{chart-config-scatter-B2su_x8f.js.map → chart-config-scatter-MVUFupub.js.map} +1 -1
  69. package/dist/client/chunks/{chart-config-sunburst-BPdjbk18.js → chart-config-sunburst-Z_gqIY5u.js} +1 -1
  70. package/dist/client/chunks/{chart-config-sunburst-BPdjbk18.js.map → chart-config-sunburst-Z_gqIY5u.js.map} +1 -1
  71. package/dist/client/chunks/{chart-config-tree-map-Cbsh2fe2.js → chart-config-tree-map-BD-xAeIy.js} +1 -1
  72. package/dist/client/chunks/{chart-config-tree-map-Cbsh2fe2.js.map → chart-config-tree-map-BD-xAeIy.js.map} +1 -1
  73. package/dist/client/chunks/{chart-config-waterfall-DGmuZfQF.js → chart-config-waterfall-CHwVkXZc.js} +1 -1
  74. package/dist/client/chunks/{chart-config-waterfall-DGmuZfQF.js.map → chart-config-waterfall-CHwVkXZc.js.map} +1 -1
  75. package/dist/client/chunks/{chart-data-table-CW_qZDpt.js → chart-data-table-D4s27-U3.js} +1452 -826
  76. package/dist/client/chunks/chart-data-table-D4s27-U3.js.map +1 -0
  77. package/dist/client/chunks/{chart-gauge-BLLJqeXo.js → chart-gauge-BFhc4i_f.js} +1 -1
  78. package/dist/client/chunks/{chart-gauge-BLLJqeXo.js.map → chart-gauge-BFhc4i_f.js.map} +1 -1
  79. package/dist/client/chunks/{chart-heat-map-f2fM2mDC.js → chart-heat-map-BOMQeUDL.js} +1 -1
  80. package/dist/client/chunks/{chart-heat-map-f2fM2mDC.js.map → chart-heat-map-BOMQeUDL.js.map} +1 -1
  81. package/dist/client/chunks/{chart-kpi-delta-BPexzOe7.js → chart-kpi-delta-DzGNnIcW.js} +4 -4
  82. package/dist/client/chunks/{chart-kpi-delta-BPexzOe7.js.map → chart-kpi-delta-DzGNnIcW.js.map} +1 -1
  83. package/dist/client/chunks/{chart-kpi-number-BBtGBtZL.js → chart-kpi-number-sHtgbE_f.js} +5 -5
  84. package/dist/client/chunks/{chart-kpi-number-BBtGBtZL.js.map → chart-kpi-number-sHtgbE_f.js.map} +1 -1
  85. package/dist/client/chunks/{chart-kpi-text-BqHhmJEB.js → chart-kpi-text-Bmk-GzVJ.js} +2 -2
  86. package/dist/client/chunks/{chart-kpi-text-BqHhmJEB.js.map → chart-kpi-text-Bmk-GzVJ.js.map} +1 -1
  87. package/dist/client/chunks/{chart-line-CPhQRMZ7.js → chart-line-Bkl5WQAw.js} +1 -1
  88. package/dist/client/chunks/{chart-line-CPhQRMZ7.js.map → chart-line-Bkl5WQAw.js.map} +1 -1
  89. package/dist/client/chunks/{chart-markdown-B2X4IwLO.js → chart-markdown-7MNetRtX.js} +1 -1
  90. package/dist/client/chunks/{chart-markdown-B2X4IwLO.js.map → chart-markdown-7MNetRtX.js.map} +1 -1
  91. package/dist/client/chunks/{chart-measure-profile-CVlqGslU.js → chart-measure-profile-B7h6vQo4.js} +1 -1
  92. package/dist/client/chunks/{chart-measure-profile-CVlqGslU.js.map → chart-measure-profile-B7h6vQo4.js.map} +1 -1
  93. package/dist/client/chunks/{chart-pie-DafSc9sE.js → chart-pie-Do2YnCxl.js} +1 -1
  94. package/dist/client/chunks/{chart-pie-DafSc9sE.js.map → chart-pie-Do2YnCxl.js.map} +1 -1
  95. package/dist/client/chunks/{chart-radar-Dz9F5k-B.js → chart-radar-C7gQkH70.js} +1 -1
  96. package/dist/client/chunks/{chart-radar-Dz9F5k-B.js.map → chart-radar-C7gQkH70.js.map} +1 -1
  97. package/dist/client/chunks/{chart-radial-bar-N3MNUL7o.js → chart-radial-bar-DHqCck3x.js} +1 -1
  98. package/dist/client/chunks/{chart-radial-bar-N3MNUL7o.js.map → chart-radial-bar-DHqCck3x.js.map} +1 -1
  99. package/dist/client/chunks/{chart-scatter-J2JNi88S.js → chart-scatter-YSHOUfXf.js} +1 -1
  100. package/dist/client/chunks/{chart-scatter-J2JNi88S.js.map → chart-scatter-YSHOUfXf.js.map} +1 -1
  101. package/dist/client/chunks/{chart-sunburst-D1NFQjqk.js → chart-sunburst-BGhJ4fui.js} +1 -1
  102. package/dist/client/chunks/{chart-sunburst-D1NFQjqk.js.map → chart-sunburst-BGhJ4fui.js.map} +1 -1
  103. package/dist/client/chunks/{chart-tree-map-CbYjko2s.js → chart-tree-map-BlhcXK1F.js} +1 -1
  104. package/dist/client/chunks/{chart-tree-map-CbYjko2s.js.map → chart-tree-map-BlhcXK1F.js.map} +1 -1
  105. package/dist/client/chunks/{chart-waterfall-Z65TGMUO.js → chart-waterfall-BWCAzlPq.js} +1 -1
  106. package/dist/client/chunks/{chart-waterfall-Z65TGMUO.js.map → chart-waterfall-BWCAzlPq.js.map} +1 -1
  107. package/dist/client/chunks/{charts-core-CJlGzwsW.js → charts-core-Cy3rHADX.js} +1 -1
  108. package/dist/client/chunks/{charts-core-CJlGzwsW.js.map → charts-core-Cy3rHADX.js.map} +1 -1
  109. package/dist/client/chunks/{core-DJrniqct.js → core-BdWfCZ3y.js} +1 -1
  110. package/dist/client/chunks/{core-DJrniqct.js.map → core-BdWfCZ3y.js.map} +1 -1
  111. package/dist/client/chunks/{dist-DDBeV_JI.js → dist-BWPE2m_X.js} +1 -1
  112. package/dist/client/chunks/{dist-DDBeV_JI.js.map → dist-BWPE2m_X.js.map} +1 -1
  113. package/dist/client/chunks/{javascript-BBwTSo6e.js → javascript-O1RIRkZr.js} +1 -1
  114. package/dist/client/chunks/{javascript-BBwTSo6e.js.map → javascript-O1RIRkZr.js.map} +1 -1
  115. package/dist/client/chunks/{json-BpTrLZSh.js → json-C5bX2tt1.js} +1 -1
  116. package/dist/client/chunks/{json-BpTrLZSh.js.map → json-C5bX2tt1.js.map} +1 -1
  117. package/dist/client/chunks/{retention-UEXlSdZ-.js → retention-YhT1Oohi.js} +1 -1
  118. package/dist/client/chunks/{retention-UEXlSdZ-.js.map → retention-YhT1Oohi.js.map} +1 -1
  119. package/dist/client/chunks/{schema-visualization-BFPl_eKV.js → schema-visualization-BJ8HrNqB.js} +12 -12
  120. package/dist/client/chunks/schema-visualization-BJ8HrNqB.js.map +1 -0
  121. package/dist/client/chunks/{sql-B0chxcEK.js → sql-D2qikO5q.js} +1 -1
  122. package/dist/client/chunks/{sql-B0chxcEK.js.map → sql-D2qikO5q.js.map} +1 -1
  123. package/dist/client/chunks/{syntaxHighlighting-BLl0ch4A.js → syntaxHighlighting-BYYWYmjr.js} +2 -2
  124. package/dist/client/chunks/{syntaxHighlighting-BLl0ch4A.js.map → syntaxHighlighting-BYYWYmjr.js.map} +1 -1
  125. package/dist/client/chunks/{useDebounce-C_wstEud.js → useDebounce-EWynD0lC.js} +12 -12
  126. package/dist/client/chunks/{useDebounce-C_wstEud.js.map → useDebounce-EWynD0lC.js.map} +1 -1
  127. package/dist/client/chunks/{useDirtyStateTracking-CgKZWkel.js → useDirtyStateTracking-KAjwj1Ht.js} +1 -1
  128. package/dist/client/chunks/{useDirtyStateTracking-CgKZWkel.js.map → useDirtyStateTracking-KAjwj1Ht.js.map} +1 -1
  129. package/dist/client/chunks/{useExplainAI-C9ytXRIC.js → useExplainAI-BBTJWQVu.js} +14 -14
  130. package/dist/client/chunks/{useExplainAI-C9ytXRIC.js.map → useExplainAI-BBTJWQVu.js.map} +1 -1
  131. package/dist/client/chunks/{useNotebookLayout-BFZ_33Kb.js → useNotebookLayout-DKkMenhj.js} +1 -1
  132. package/dist/client/chunks/{useNotebookLayout-BFZ_33Kb.js.map → useNotebookLayout-DKkMenhj.js.map} +1 -1
  133. package/dist/client/chunks/{utils-3FNmeZJR.js → utils-DMyRayr_.js} +2 -2
  134. package/dist/client/chunks/{utils-3FNmeZJR.js.map → utils-DMyRayr_.js.map} +1 -1
  135. package/dist/client/chunks/{vendor-BPRWulB7.js → vendor-iY25ogTA.js} +40 -40
  136. package/dist/client/chunks/{vendor-BPRWulB7.js.map → vendor-iY25ogTA.js.map} +1 -1
  137. package/dist/client/components.js +3 -3
  138. package/dist/client/hooks.js +5 -5
  139. package/dist/client/icons/registry.d.ts +6 -0
  140. package/dist/client/icons.js +2 -2
  141. package/dist/client/index.d.ts +3 -1
  142. package/dist/client/index.js +160 -161
  143. package/dist/client/index.js.map +1 -1
  144. package/dist/client/providers/CubeProvider.d.ts +4 -1
  145. package/dist/client/providers.js +2 -2
  146. package/dist/client/types.d.ts +2 -1
  147. package/dist/client/utils.js +6 -6
  148. package/dist/client-bundle-stats.html +1 -1
  149. package/package.json +6 -2
  150. package/dist/client/chunks/DashboardEditModal-EmBxK-89.js.map +0 -1
  151. package/dist/client/chunks/RetentionCombinedChart.config-DprbXd1N.js +0 -56
  152. package/dist/client/chunks/RetentionCombinedChart.config-DprbXd1N.js.map +0 -1
  153. package/dist/client/chunks/RetentionHeatmap.config-cbaNExVy.js +0 -25
  154. package/dist/client/chunks/RetentionHeatmap.config-cbaNExVy.js.map +0 -1
  155. package/dist/client/chunks/analysis-builder-D70S-LZy.js.map +0 -1
  156. package/dist/client/chunks/analysis-builder-shared-BxHYfTzo.js.map +0 -1
  157. package/dist/client/chunks/chart-data-table-CW_qZDpt.js.map +0 -1
  158. package/dist/client/chunks/charts-loader-gZjOqZwG.js +0 -259
  159. package/dist/client/chunks/charts-loader-gZjOqZwG.js.map +0 -1
  160. package/dist/client/chunks/lazyChartConfigRegistry-BjhxDaSf.js +0 -149
  161. package/dist/client/chunks/lazyChartConfigRegistry-BjhxDaSf.js.map +0 -1
  162. package/dist/client/chunks/schema-visualization-BFPl_eKV.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"chart-data-table-CW_qZDpt.js","names":["#setup","#cleanup","#focused","#providerCalled","#provider","#setup","#cleanup","#online","#gcTimeout","#abortSignalConsumed","#defaultOptions","#client","#cache","#initialState","getDefaultState","#retryer","#dispatch","#isInitialPausedFetch","#revertState","#client","#selectError","#currentThenable","#currentQuery","#executeFetch","#updateTimers","#clearStaleTimeout","#clearRefetchInterval","#updateQuery","#updateStaleTimeout","#computeRefetchInterval","#currentRefetchInterval","#updateRefetchInterval","#currentResult","#currentResultOptions","#currentResultState","#trackedProps","#staleTimeoutId","#refetchIntervalId","#currentQueryInitialState","#lastQueryWithDefinedData","#selectFn","#selectResult","#notify","#client","#mutationCache","#observers","#retryer","#dispatch","#mutations","#scopes","#mutationId","#queries","#queryCache","#mutationCache","#defaultOptions","#queryDefaults","#mutationDefaults","#mountCount","#unsubscribeFocus","#unsubscribeOnline","React","React","React","React","getIconData","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data","data"],"sources":["../../../node_modules/@tanstack/query-core/build/modern/subscribable.js","../../../node_modules/@tanstack/query-core/build/modern/focusManager.js","../../../node_modules/@tanstack/query-core/build/modern/timeoutManager.js","../../../node_modules/@tanstack/query-core/build/modern/utils.js","../../../node_modules/@tanstack/query-core/build/modern/environmentManager.js","../../../node_modules/@tanstack/query-core/build/modern/thenable.js","../../../node_modules/@tanstack/query-core/build/modern/notifyManager.js","../../../node_modules/@tanstack/query-core/build/modern/onlineManager.js","../../../node_modules/@tanstack/query-core/build/modern/retryer.js","../../../node_modules/@tanstack/query-core/build/modern/removable.js","../../../node_modules/@tanstack/query-core/build/modern/query.js","../../../node_modules/@tanstack/query-core/build/modern/queryObserver.js","../../../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js","../../../node_modules/@tanstack/query-core/build/modern/mutation.js","../../../node_modules/@tanstack/query-core/build/modern/mutationCache.js","../../../node_modules/@tanstack/query-core/build/modern/queryCache.js","../../../node_modules/@tanstack/query-core/build/modern/queryClient.js","../../../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js","../../../node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js","../../../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js","../../../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js","../../../node_modules/@tanstack/react-query/build/modern/suspense.js","../../../node_modules/@tanstack/react-query/build/modern/useBaseQuery.js","../../../node_modules/@tanstack/react-query/build/modern/useQuery.js","../../../src/client/client/CubeClient.ts","../../../src/client/client/BatchCoordinator.ts","../../../src/client/providers/CubeApiProvider.tsx","../../../src/client/hooks/queries/useCubeMetaQuery.ts","../../../src/client/utils/thumbnail.ts","../../../src/client/providers/CubeFeaturesProvider.tsx","../../../node_modules/@iconify/react/dist/iconify.js","../../../node_modules/@iconify-icons/heroicons-outline/x-mark.js","../../../node_modules/@iconify-icons/heroicons-outline/plus.js","../../../node_modules/@iconify-icons/heroicons-outline/pencil.js","../../../node_modules/@iconify-icons/heroicons-outline/trash.js","../../../node_modules/@iconify-icons/heroicons-outline/arrow-path.js","../../../node_modules/@iconify-icons/heroicons-outline/clipboard-document.js","../../../node_modules/@iconify-icons/heroicons-outline/document-duplicate.js","../../../node_modules/@iconify-icons/heroicons-outline/cog.js","../../../node_modules/@iconify-icons/heroicons-outline/funnel.js","../../../node_modules/@iconify-icons/heroicons-outline/share.js","../../../node_modules/@iconify-icons/heroicons-outline/chevron-up.js","../../../node_modules/@iconify-icons/heroicons-outline/chevron-down.js","../../../node_modules/@iconify-icons/heroicons-outline/chevron-left.js","../../../node_modules/@iconify-icons/heroicons-outline/chevron-right.js","../../../node_modules/@iconify-icons/heroicons-outline/magnifying-glass.js","../../../node_modules/@iconify-icons/heroicons-outline/bars-3.js","../../../node_modules/@iconify-icons/heroicons-outline/check-circle.js","../../../node_modules/@iconify-icons/heroicons-outline/exclaimation-triangle.js","../../../node_modules/@iconify-icons/heroicons-outline/exclamation-circle.js","../../../node_modules/@iconify-icons/heroicons-outline/sparkles.js","../../../node_modules/@iconify-icons/heroicons-outline/eye.js","../../../node_modules/@iconify-icons/heroicons-outline/eye-slash.js","../../../node_modules/@iconify-icons/heroicons-outline/adjustments-horizontal.js","../../../node_modules/@iconify-icons/heroicons-outline/computer-desktop.js","../../../node_modules/@iconify-icons/heroicons-outline/table-cells.js","../../../node_modules/@iconify-icons/heroicons-outline/link.js","../../../node_modules/@iconify-icons/heroicons-outline/arrow-right.js","../../../node_modules/@iconify-icons/heroicons-outline/sun.js","../../../node_modules/@iconify-icons/heroicons-outline/moon.js","../../../node_modules/@iconify-icons/heroicons-outline/ellipsis-horizontal.js","../../../node_modules/@iconify-icons/heroicons-outline/document-text.js","../../../node_modules/@iconify-icons/heroicons-outline/book-open.js","../../../node_modules/@iconify-icons/heroicons-outline/code-bracket.js","../../../node_modules/@iconify-icons/heroicons-outline/swatch.js","../../../node_modules/@iconify-icons/heroicons-outline/camera.js","../../../node_modules/@iconify-icons/heroicons-solid/hand-thumb-up.js","../../../node_modules/@iconify-icons/heroicons-solid/hand-thumb-down.js","../../../node_modules/@iconify-icons/heroicons-solid/chart-bar.js","../../../node_modules/@iconify-icons/heroicons-solid/tag.js","../../../node_modules/@iconify-icons/heroicons-solid/calendar.js","../../../node_modules/@iconify-icons/heroicons-solid/rectangle-group.js","../../../node_modules/@iconify-icons/heroicons-solid/play.js","../../../node_modules/@iconify-icons/heroicons-solid/check.js","../../../node_modules/@iconify-icons/heroicons-solid/scale.js","../../../node_modules/@iconify-icons/heroicons-solid/arrow-down-circle.js","../../../node_modules/@iconify-icons/heroicons-solid/arrow-up-circle.js","../../../node_modules/@iconify-icons/heroicons-solid/arrow-trending-up.js","../../../node_modules/@iconify-icons/heroicons-solid/beaker.js","../../../node_modules/@iconify-icons/heroicons-solid/bars-3-bottom-left.js","../../../node_modules/@iconify-icons/heroicons-solid/finger-print.js","../../../node_modules/@iconify-icons/heroicons-solid/chart-bar-square.js","../../../node_modules/@iconify-icons/heroicons-solid/plus-circle.js","../../../node_modules/@iconify-icons/heroicons-solid/hashtag.js","../../../node_modules/@iconify-icons/tabler/chart-bar.js","../../../node_modules/@iconify-icons/tabler/chart-line.js","../../../node_modules/@iconify-icons/tabler/chart-area-line.js","../../../node_modules/@iconify-icons/tabler/chart-pie.js","../../../node_modules/@iconify-icons/tabler/chart-dots-2.js","../../../node_modules/@iconify-icons/tabler/chart-bubble.js","../../../node_modules/@iconify-icons/tabler/chart-radar.js","../../../node_modules/@iconify-icons/tabler/radar-2.js","../../../node_modules/@iconify-icons/tabler/chart-treemap.js","../../../src/client/icons/customIcons.ts","../../../node_modules/@iconify-icons/tabler/chart-donut-4.js","../../../node_modules/@iconify-icons/tabler/table.js","../../../node_modules/@iconify-icons/tabler/calendar-stats.js","../../../node_modules/@iconify-icons/tabler/number.js","../../../node_modules/@iconify-icons/tabler/trending-up.js","../../../node_modules/@iconify-icons/tabler/typography.js","../../../node_modules/@iconify-icons/tabler/file-text.js","../../../node_modules/@iconify-icons/tabler/info-circle.js","../../../node_modules/@iconify-icons/tabler/selector.js","../../../node_modules/@iconify-icons/tabler/chart-grid-dots.js","../../../node_modules/@iconify-icons/heroicons-outline/map.js","../../../node_modules/@iconify-icons/heroicons-outline/cube.js","../../../src/client/icons/defaultIcons.ts","../../../src/client/icons/registry.tsx","../../../src/client/providers/CubeMetaProvider.tsx","../../../src/client/providers/CubeProvider.tsx","../../../src/client/utils/pivotUtils.ts","../../../src/client/components/charts/DataTable.tsx"],"sourcesContent":["// src/subscribable.ts\nvar Subscribable = class {\n constructor() {\n this.listeners = /* @__PURE__ */ new Set();\n this.subscribe = this.subscribe.bind(this);\n }\n subscribe(listener) {\n this.listeners.add(listener);\n this.onSubscribe();\n return () => {\n this.listeners.delete(listener);\n this.onUnsubscribe();\n };\n }\n hasListeners() {\n return this.listeners.size > 0;\n }\n onSubscribe() {\n }\n onUnsubscribe() {\n }\n};\nexport {\n Subscribable\n};\n//# sourceMappingURL=subscribable.js.map","// src/focusManager.ts\nimport { Subscribable } from \"./subscribable.js\";\nvar FocusManager = class extends Subscribable {\n #focused;\n #cleanup;\n #setup;\n constructor() {\n super();\n this.#setup = (onFocus) => {\n if (typeof window !== \"undefined\" && window.addEventListener) {\n const listener = () => onFocus();\n window.addEventListener(\"visibilitychange\", listener, false);\n return () => {\n window.removeEventListener(\"visibilitychange\", listener);\n };\n }\n return;\n };\n }\n onSubscribe() {\n if (!this.#cleanup) {\n this.setEventListener(this.#setup);\n }\n }\n onUnsubscribe() {\n if (!this.hasListeners()) {\n this.#cleanup?.();\n this.#cleanup = void 0;\n }\n }\n setEventListener(setup) {\n this.#setup = setup;\n this.#cleanup?.();\n this.#cleanup = setup((focused) => {\n if (typeof focused === \"boolean\") {\n this.setFocused(focused);\n } else {\n this.onFocus();\n }\n });\n }\n setFocused(focused) {\n const changed = this.#focused !== focused;\n if (changed) {\n this.#focused = focused;\n this.onFocus();\n }\n }\n onFocus() {\n const isFocused = this.isFocused();\n this.listeners.forEach((listener) => {\n listener(isFocused);\n });\n }\n isFocused() {\n if (typeof this.#focused === \"boolean\") {\n return this.#focused;\n }\n return globalThis.document?.visibilityState !== \"hidden\";\n }\n};\nvar focusManager = new FocusManager();\nexport {\n FocusManager,\n focusManager\n};\n//# sourceMappingURL=focusManager.js.map","// src/timeoutManager.ts\nvar defaultTimeoutProvider = {\n // We need the wrapper function syntax below instead of direct references to\n // global setTimeout etc.\n //\n // BAD: `setTimeout: setTimeout`\n // GOOD: `setTimeout: (cb, delay) => setTimeout(cb, delay)`\n //\n // If we use direct references here, then anything that wants to spy on or\n // replace the global setTimeout (like tests) won't work since we'll already\n // have a hard reference to the original implementation at the time when this\n // file was imported.\n setTimeout: (callback, delay) => setTimeout(callback, delay),\n clearTimeout: (timeoutId) => clearTimeout(timeoutId),\n setInterval: (callback, delay) => setInterval(callback, delay),\n clearInterval: (intervalId) => clearInterval(intervalId)\n};\nvar TimeoutManager = class {\n // We cannot have TimeoutManager<T> as we must instantiate it with a concrete\n // type at app boot; and if we leave that type, then any new timer provider\n // would need to support ReturnType<typeof setTimeout>, which is infeasible.\n //\n // We settle for type safety for the TimeoutProvider type, and accept that\n // this class is unsafe internally to allow for extension.\n #provider = defaultTimeoutProvider;\n #providerCalled = false;\n setTimeoutProvider(provider) {\n if (process.env.NODE_ENV !== \"production\") {\n if (this.#providerCalled && provider !== this.#provider) {\n console.error(\n `[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.`,\n { previous: this.#provider, provider }\n );\n }\n }\n this.#provider = provider;\n if (process.env.NODE_ENV !== \"production\") {\n this.#providerCalled = false;\n }\n }\n setTimeout(callback, delay) {\n if (process.env.NODE_ENV !== \"production\") {\n this.#providerCalled = true;\n }\n return this.#provider.setTimeout(callback, delay);\n }\n clearTimeout(timeoutId) {\n this.#provider.clearTimeout(timeoutId);\n }\n setInterval(callback, delay) {\n if (process.env.NODE_ENV !== \"production\") {\n this.#providerCalled = true;\n }\n return this.#provider.setInterval(callback, delay);\n }\n clearInterval(intervalId) {\n this.#provider.clearInterval(intervalId);\n }\n};\nvar timeoutManager = new TimeoutManager();\nfunction systemSetTimeoutZero(callback) {\n setTimeout(callback, 0);\n}\nexport {\n TimeoutManager,\n defaultTimeoutProvider,\n systemSetTimeoutZero,\n timeoutManager\n};\n//# sourceMappingURL=timeoutManager.js.map","// src/utils.ts\nimport { timeoutManager } from \"./timeoutManager.js\";\nvar isServer = typeof window === \"undefined\" || \"Deno\" in globalThis;\nfunction noop() {\n}\nfunction functionalUpdate(updater, input) {\n return typeof updater === \"function\" ? updater(input) : updater;\n}\nfunction isValidTimeout(value) {\n return typeof value === \"number\" && value >= 0 && value !== Infinity;\n}\nfunction timeUntilStale(updatedAt, staleTime) {\n return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);\n}\nfunction resolveStaleTime(staleTime, query) {\n return typeof staleTime === \"function\" ? staleTime(query) : staleTime;\n}\nfunction resolveEnabled(enabled, query) {\n return typeof enabled === \"function\" ? enabled(query) : enabled;\n}\nfunction matchQuery(filters, query) {\n const {\n type = \"all\",\n exact,\n fetchStatus,\n predicate,\n queryKey,\n stale\n } = filters;\n if (queryKey) {\n if (exact) {\n if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) {\n return false;\n }\n } else if (!partialMatchKey(query.queryKey, queryKey)) {\n return false;\n }\n }\n if (type !== \"all\") {\n const isActive = query.isActive();\n if (type === \"active\" && !isActive) {\n return false;\n }\n if (type === \"inactive\" && isActive) {\n return false;\n }\n }\n if (typeof stale === \"boolean\" && query.isStale() !== stale) {\n return false;\n }\n if (fetchStatus && fetchStatus !== query.state.fetchStatus) {\n return false;\n }\n if (predicate && !predicate(query)) {\n return false;\n }\n return true;\n}\nfunction matchMutation(filters, mutation) {\n const { exact, status, predicate, mutationKey } = filters;\n if (mutationKey) {\n if (!mutation.options.mutationKey) {\n return false;\n }\n if (exact) {\n if (hashKey(mutation.options.mutationKey) !== hashKey(mutationKey)) {\n return false;\n }\n } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) {\n return false;\n }\n }\n if (status && mutation.state.status !== status) {\n return false;\n }\n if (predicate && !predicate(mutation)) {\n return false;\n }\n return true;\n}\nfunction hashQueryKeyByOptions(queryKey, options) {\n const hashFn = options?.queryKeyHashFn || hashKey;\n return hashFn(queryKey);\n}\nfunction hashKey(queryKey) {\n return JSON.stringify(\n queryKey,\n (_, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result, key) => {\n result[key] = val[key];\n return result;\n }, {}) : val\n );\n}\nfunction partialMatchKey(a, b) {\n if (a === b) {\n return true;\n }\n if (typeof a !== typeof b) {\n return false;\n }\n if (a && b && typeof a === \"object\" && typeof b === \"object\") {\n return Object.keys(b).every((key) => partialMatchKey(a[key], b[key]));\n }\n return false;\n}\nvar hasOwn = Object.prototype.hasOwnProperty;\nfunction replaceEqualDeep(a, b, depth = 0) {\n if (a === b) {\n return a;\n }\n if (depth > 500) return b;\n const array = isPlainArray(a) && isPlainArray(b);\n if (!array && !(isPlainObject(a) && isPlainObject(b))) return b;\n const aItems = array ? a : Object.keys(a);\n const aSize = aItems.length;\n const bItems = array ? b : Object.keys(b);\n const bSize = bItems.length;\n const copy = array ? new Array(bSize) : {};\n let equalItems = 0;\n for (let i = 0; i < bSize; i++) {\n const key = array ? i : bItems[i];\n const aItem = a[key];\n const bItem = b[key];\n if (aItem === bItem) {\n copy[key] = aItem;\n if (array ? i < aSize : hasOwn.call(a, key)) equalItems++;\n continue;\n }\n if (aItem === null || bItem === null || typeof aItem !== \"object\" || typeof bItem !== \"object\") {\n copy[key] = bItem;\n continue;\n }\n const v = replaceEqualDeep(aItem, bItem, depth + 1);\n copy[key] = v;\n if (v === aItem) equalItems++;\n }\n return aSize === bSize && equalItems === aSize ? a : copy;\n}\nfunction shallowEqualObjects(a, b) {\n if (!b || Object.keys(a).length !== Object.keys(b).length) {\n return false;\n }\n for (const key in a) {\n if (a[key] !== b[key]) {\n return false;\n }\n }\n return true;\n}\nfunction isPlainArray(value) {\n return Array.isArray(value) && value.length === Object.keys(value).length;\n}\nfunction isPlainObject(o) {\n if (!hasObjectPrototype(o)) {\n return false;\n }\n const ctor = o.constructor;\n if (ctor === void 0) {\n return true;\n }\n const prot = ctor.prototype;\n if (!hasObjectPrototype(prot)) {\n return false;\n }\n if (!prot.hasOwnProperty(\"isPrototypeOf\")) {\n return false;\n }\n if (Object.getPrototypeOf(o) !== Object.prototype) {\n return false;\n }\n return true;\n}\nfunction hasObjectPrototype(o) {\n return Object.prototype.toString.call(o) === \"[object Object]\";\n}\nfunction sleep(timeout) {\n return new Promise((resolve) => {\n timeoutManager.setTimeout(resolve, timeout);\n });\n}\nfunction replaceData(prevData, data, options) {\n if (typeof options.structuralSharing === \"function\") {\n return options.structuralSharing(prevData, data);\n } else if (options.structuralSharing !== false) {\n if (process.env.NODE_ENV !== \"production\") {\n try {\n return replaceEqualDeep(prevData, data);\n } catch (error) {\n console.error(\n `Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${options.queryHash}]: ${error}`\n );\n throw error;\n }\n }\n return replaceEqualDeep(prevData, data);\n }\n return data;\n}\nfunction keepPreviousData(previousData) {\n return previousData;\n}\nfunction addToEnd(items, item, max = 0) {\n const newItems = [...items, item];\n return max && newItems.length > max ? newItems.slice(1) : newItems;\n}\nfunction addToStart(items, item, max = 0) {\n const newItems = [item, ...items];\n return max && newItems.length > max ? newItems.slice(0, -1) : newItems;\n}\nvar skipToken = /* @__PURE__ */ Symbol();\nfunction ensureQueryFn(options, fetchOptions) {\n if (process.env.NODE_ENV !== \"production\") {\n if (options.queryFn === skipToken) {\n console.error(\n `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${options.queryHash}'`\n );\n }\n }\n if (!options.queryFn && fetchOptions?.initialPromise) {\n return () => fetchOptions.initialPromise;\n }\n if (!options.queryFn || options.queryFn === skipToken) {\n return () => Promise.reject(new Error(`Missing queryFn: '${options.queryHash}'`));\n }\n return options.queryFn;\n}\nfunction shouldThrowError(throwOnError, params) {\n if (typeof throwOnError === \"function\") {\n return throwOnError(...params);\n }\n return !!throwOnError;\n}\nfunction addConsumeAwareSignal(object, getSignal, onCancelled) {\n let consumed = false;\n let signal;\n Object.defineProperty(object, \"signal\", {\n enumerable: true,\n get: () => {\n signal ??= getSignal();\n if (consumed) {\n return signal;\n }\n consumed = true;\n if (signal.aborted) {\n onCancelled();\n } else {\n signal.addEventListener(\"abort\", onCancelled, { once: true });\n }\n return signal;\n }\n });\n return object;\n}\nexport {\n addConsumeAwareSignal,\n addToEnd,\n addToStart,\n ensureQueryFn,\n functionalUpdate,\n hashKey,\n hashQueryKeyByOptions,\n isPlainArray,\n isPlainObject,\n isServer,\n isValidTimeout,\n keepPreviousData,\n matchMutation,\n matchQuery,\n noop,\n partialMatchKey,\n replaceData,\n replaceEqualDeep,\n resolveEnabled,\n resolveStaleTime,\n shallowEqualObjects,\n shouldThrowError,\n skipToken,\n sleep,\n timeUntilStale\n};\n//# sourceMappingURL=utils.js.map","// src/environmentManager.ts\nimport { isServer } from \"./utils.js\";\nvar environmentManager = /* @__PURE__ */ (() => {\n let isServerFn = () => isServer;\n return {\n /**\n * Returns whether the current runtime should be treated as a server environment.\n */\n isServer() {\n return isServerFn();\n },\n /**\n * Overrides the server check globally.\n */\n setIsServer(isServerValue) {\n isServerFn = isServerValue;\n }\n };\n})();\nexport {\n environmentManager\n};\n//# sourceMappingURL=environmentManager.js.map","// src/thenable.ts\nimport { noop } from \"./utils.js\";\nfunction pendingThenable() {\n let resolve;\n let reject;\n const thenable = new Promise((_resolve, _reject) => {\n resolve = _resolve;\n reject = _reject;\n });\n thenable.status = \"pending\";\n thenable.catch(() => {\n });\n function finalize(data) {\n Object.assign(thenable, data);\n delete thenable.resolve;\n delete thenable.reject;\n }\n thenable.resolve = (value) => {\n finalize({\n status: \"fulfilled\",\n value\n });\n resolve(value);\n };\n thenable.reject = (reason) => {\n finalize({\n status: \"rejected\",\n reason\n });\n reject(reason);\n };\n return thenable;\n}\nfunction tryResolveSync(promise) {\n let data;\n promise.then((result) => {\n data = result;\n return result;\n }, noop)?.catch(noop);\n if (data !== void 0) {\n return { data };\n }\n return void 0;\n}\nexport {\n pendingThenable,\n tryResolveSync\n};\n//# sourceMappingURL=thenable.js.map","// src/notifyManager.ts\nimport { systemSetTimeoutZero } from \"./timeoutManager.js\";\nvar defaultScheduler = systemSetTimeoutZero;\nfunction createNotifyManager() {\n let queue = [];\n let transactions = 0;\n let notifyFn = (callback) => {\n callback();\n };\n let batchNotifyFn = (callback) => {\n callback();\n };\n let scheduleFn = defaultScheduler;\n const schedule = (callback) => {\n if (transactions) {\n queue.push(callback);\n } else {\n scheduleFn(() => {\n notifyFn(callback);\n });\n }\n };\n const flush = () => {\n const originalQueue = queue;\n queue = [];\n if (originalQueue.length) {\n scheduleFn(() => {\n batchNotifyFn(() => {\n originalQueue.forEach((callback) => {\n notifyFn(callback);\n });\n });\n });\n }\n };\n return {\n batch: (callback) => {\n let result;\n transactions++;\n try {\n result = callback();\n } finally {\n transactions--;\n if (!transactions) {\n flush();\n }\n }\n return result;\n },\n /**\n * All calls to the wrapped function will be batched.\n */\n batchCalls: (callback) => {\n return (...args) => {\n schedule(() => {\n callback(...args);\n });\n };\n },\n schedule,\n /**\n * Use this method to set a custom notify function.\n * This can be used to for example wrap notifications with `React.act` while running tests.\n */\n setNotifyFunction: (fn) => {\n notifyFn = fn;\n },\n /**\n * Use this method to set a custom function to batch notifications together into a single tick.\n * By default React Query will use the batch function provided by ReactDOM or React Native.\n */\n setBatchNotifyFunction: (fn) => {\n batchNotifyFn = fn;\n },\n setScheduler: (fn) => {\n scheduleFn = fn;\n }\n };\n}\nvar notifyManager = createNotifyManager();\nexport {\n createNotifyManager,\n defaultScheduler,\n notifyManager\n};\n//# sourceMappingURL=notifyManager.js.map","// src/onlineManager.ts\nimport { Subscribable } from \"./subscribable.js\";\nvar OnlineManager = class extends Subscribable {\n #online = true;\n #cleanup;\n #setup;\n constructor() {\n super();\n this.#setup = (onOnline) => {\n if (typeof window !== \"undefined\" && window.addEventListener) {\n const onlineListener = () => onOnline(true);\n const offlineListener = () => onOnline(false);\n window.addEventListener(\"online\", onlineListener, false);\n window.addEventListener(\"offline\", offlineListener, false);\n return () => {\n window.removeEventListener(\"online\", onlineListener);\n window.removeEventListener(\"offline\", offlineListener);\n };\n }\n return;\n };\n }\n onSubscribe() {\n if (!this.#cleanup) {\n this.setEventListener(this.#setup);\n }\n }\n onUnsubscribe() {\n if (!this.hasListeners()) {\n this.#cleanup?.();\n this.#cleanup = void 0;\n }\n }\n setEventListener(setup) {\n this.#setup = setup;\n this.#cleanup?.();\n this.#cleanup = setup(this.setOnline.bind(this));\n }\n setOnline(online) {\n const changed = this.#online !== online;\n if (changed) {\n this.#online = online;\n this.listeners.forEach((listener) => {\n listener(online);\n });\n }\n }\n isOnline() {\n return this.#online;\n }\n};\nvar onlineManager = new OnlineManager();\nexport {\n OnlineManager,\n onlineManager\n};\n//# sourceMappingURL=onlineManager.js.map","// src/retryer.ts\nimport { focusManager } from \"./focusManager.js\";\nimport { onlineManager } from \"./onlineManager.js\";\nimport { pendingThenable } from \"./thenable.js\";\nimport { environmentManager } from \"./environmentManager.js\";\nimport { sleep } from \"./utils.js\";\nfunction defaultRetryDelay(failureCount) {\n return Math.min(1e3 * 2 ** failureCount, 3e4);\n}\nfunction canFetch(networkMode) {\n return (networkMode ?? \"online\") === \"online\" ? onlineManager.isOnline() : true;\n}\nvar CancelledError = class extends Error {\n constructor(options) {\n super(\"CancelledError\");\n this.revert = options?.revert;\n this.silent = options?.silent;\n }\n};\nfunction isCancelledError(value) {\n return value instanceof CancelledError;\n}\nfunction createRetryer(config) {\n let isRetryCancelled = false;\n let failureCount = 0;\n let continueFn;\n const thenable = pendingThenable();\n const isResolved = () => thenable.status !== \"pending\";\n const cancel = (cancelOptions) => {\n if (!isResolved()) {\n const error = new CancelledError(cancelOptions);\n reject(error);\n config.onCancel?.(error);\n }\n };\n const cancelRetry = () => {\n isRetryCancelled = true;\n };\n const continueRetry = () => {\n isRetryCancelled = false;\n };\n const canContinue = () => focusManager.isFocused() && (config.networkMode === \"always\" || onlineManager.isOnline()) && config.canRun();\n const canStart = () => canFetch(config.networkMode) && config.canRun();\n const resolve = (value) => {\n if (!isResolved()) {\n continueFn?.();\n thenable.resolve(value);\n }\n };\n const reject = (value) => {\n if (!isResolved()) {\n continueFn?.();\n thenable.reject(value);\n }\n };\n const pause = () => {\n return new Promise((continueResolve) => {\n continueFn = (value) => {\n if (isResolved() || canContinue()) {\n continueResolve(value);\n }\n };\n config.onPause?.();\n }).then(() => {\n continueFn = void 0;\n if (!isResolved()) {\n config.onContinue?.();\n }\n });\n };\n const run = () => {\n if (isResolved()) {\n return;\n }\n let promiseOrValue;\n const initialPromise = failureCount === 0 ? config.initialPromise : void 0;\n try {\n promiseOrValue = initialPromise ?? config.fn();\n } catch (error) {\n promiseOrValue = Promise.reject(error);\n }\n Promise.resolve(promiseOrValue).then(resolve).catch((error) => {\n if (isResolved()) {\n return;\n }\n const retry = config.retry ?? (environmentManager.isServer() ? 0 : 3);\n const retryDelay = config.retryDelay ?? defaultRetryDelay;\n const delay = typeof retryDelay === \"function\" ? retryDelay(failureCount, error) : retryDelay;\n const shouldRetry = retry === true || typeof retry === \"number\" && failureCount < retry || typeof retry === \"function\" && retry(failureCount, error);\n if (isRetryCancelled || !shouldRetry) {\n reject(error);\n return;\n }\n failureCount++;\n config.onFail?.(failureCount, error);\n sleep(delay).then(() => {\n return canContinue() ? void 0 : pause();\n }).then(() => {\n if (isRetryCancelled) {\n reject(error);\n } else {\n run();\n }\n });\n });\n };\n return {\n promise: thenable,\n status: () => thenable.status,\n cancel,\n continue: () => {\n continueFn?.();\n return thenable;\n },\n cancelRetry,\n continueRetry,\n canStart,\n start: () => {\n if (canStart()) {\n run();\n } else {\n pause().then(run);\n }\n return thenable;\n }\n };\n}\nexport {\n CancelledError,\n canFetch,\n createRetryer,\n isCancelledError\n};\n//# sourceMappingURL=retryer.js.map","// src/removable.ts\nimport { timeoutManager } from \"./timeoutManager.js\";\nimport { environmentManager } from \"./environmentManager.js\";\nimport { isValidTimeout } from \"./utils.js\";\nvar Removable = class {\n #gcTimeout;\n destroy() {\n this.clearGcTimeout();\n }\n scheduleGc() {\n this.clearGcTimeout();\n if (isValidTimeout(this.gcTime)) {\n this.#gcTimeout = timeoutManager.setTimeout(() => {\n this.optionalRemove();\n }, this.gcTime);\n }\n }\n updateGcTime(newGcTime) {\n this.gcTime = Math.max(\n this.gcTime || 0,\n newGcTime ?? (environmentManager.isServer() ? Infinity : 5 * 60 * 1e3)\n );\n }\n clearGcTimeout() {\n if (this.#gcTimeout) {\n timeoutManager.clearTimeout(this.#gcTimeout);\n this.#gcTimeout = void 0;\n }\n }\n};\nexport {\n Removable\n};\n//# sourceMappingURL=removable.js.map","// src/query.ts\nimport {\n ensureQueryFn,\n noop,\n replaceData,\n resolveEnabled,\n resolveStaleTime,\n skipToken,\n timeUntilStale\n} from \"./utils.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { CancelledError, canFetch, createRetryer } from \"./retryer.js\";\nimport { Removable } from \"./removable.js\";\nvar Query = class extends Removable {\n #initialState;\n #revertState;\n #cache;\n #client;\n #retryer;\n #defaultOptions;\n #abortSignalConsumed;\n constructor(config) {\n super();\n this.#abortSignalConsumed = false;\n this.#defaultOptions = config.defaultOptions;\n this.setOptions(config.options);\n this.observers = [];\n this.#client = config.client;\n this.#cache = this.#client.getQueryCache();\n this.queryKey = config.queryKey;\n this.queryHash = config.queryHash;\n this.#initialState = getDefaultState(this.options);\n this.state = config.state ?? this.#initialState;\n this.scheduleGc();\n }\n get meta() {\n return this.options.meta;\n }\n get promise() {\n return this.#retryer?.promise;\n }\n setOptions(options) {\n this.options = { ...this.#defaultOptions, ...options };\n this.updateGcTime(this.options.gcTime);\n if (this.state && this.state.data === void 0) {\n const defaultState = getDefaultState(this.options);\n if (defaultState.data !== void 0) {\n this.setState(\n successState(defaultState.data, defaultState.dataUpdatedAt)\n );\n this.#initialState = defaultState;\n }\n }\n }\n optionalRemove() {\n if (!this.observers.length && this.state.fetchStatus === \"idle\") {\n this.#cache.remove(this);\n }\n }\n setData(newData, options) {\n const data = replaceData(this.state.data, newData, this.options);\n this.#dispatch({\n data,\n type: \"success\",\n dataUpdatedAt: options?.updatedAt,\n manual: options?.manual\n });\n return data;\n }\n setState(state, setStateOptions) {\n this.#dispatch({ type: \"setState\", state, setStateOptions });\n }\n cancel(options) {\n const promise = this.#retryer?.promise;\n this.#retryer?.cancel(options);\n return promise ? promise.then(noop).catch(noop) : Promise.resolve();\n }\n destroy() {\n super.destroy();\n this.cancel({ silent: true });\n }\n get resetState() {\n return this.#initialState;\n }\n reset() {\n this.destroy();\n this.setState(this.resetState);\n }\n isActive() {\n return this.observers.some(\n (observer) => resolveEnabled(observer.options.enabled, this) !== false\n );\n }\n isDisabled() {\n if (this.getObserversCount() > 0) {\n return !this.isActive();\n }\n return this.options.queryFn === skipToken || !this.isFetched();\n }\n isFetched() {\n return this.state.dataUpdateCount + this.state.errorUpdateCount > 0;\n }\n isStatic() {\n if (this.getObserversCount() > 0) {\n return this.observers.some(\n (observer) => resolveStaleTime(observer.options.staleTime, this) === \"static\"\n );\n }\n return false;\n }\n isStale() {\n if (this.getObserversCount() > 0) {\n return this.observers.some(\n (observer) => observer.getCurrentResult().isStale\n );\n }\n return this.state.data === void 0 || this.state.isInvalidated;\n }\n isStaleByTime(staleTime = 0) {\n if (this.state.data === void 0) {\n return true;\n }\n if (staleTime === \"static\") {\n return false;\n }\n if (this.state.isInvalidated) {\n return true;\n }\n return !timeUntilStale(this.state.dataUpdatedAt, staleTime);\n }\n onFocus() {\n const observer = this.observers.find((x) => x.shouldFetchOnWindowFocus());\n observer?.refetch({ cancelRefetch: false });\n this.#retryer?.continue();\n }\n onOnline() {\n const observer = this.observers.find((x) => x.shouldFetchOnReconnect());\n observer?.refetch({ cancelRefetch: false });\n this.#retryer?.continue();\n }\n addObserver(observer) {\n if (!this.observers.includes(observer)) {\n this.observers.push(observer);\n this.clearGcTimeout();\n this.#cache.notify({ type: \"observerAdded\", query: this, observer });\n }\n }\n removeObserver(observer) {\n if (this.observers.includes(observer)) {\n this.observers = this.observers.filter((x) => x !== observer);\n if (!this.observers.length) {\n if (this.#retryer) {\n if (this.#abortSignalConsumed || this.#isInitialPausedFetch()) {\n this.#retryer.cancel({ revert: true });\n } else {\n this.#retryer.cancelRetry();\n }\n }\n this.scheduleGc();\n }\n this.#cache.notify({ type: \"observerRemoved\", query: this, observer });\n }\n }\n getObserversCount() {\n return this.observers.length;\n }\n #isInitialPausedFetch() {\n return this.state.fetchStatus === \"paused\" && this.state.status === \"pending\";\n }\n invalidate() {\n if (!this.state.isInvalidated) {\n this.#dispatch({ type: \"invalidate\" });\n }\n }\n async fetch(options, fetchOptions) {\n if (this.state.fetchStatus !== \"idle\" && // If the promise in the retryer is already rejected, we have to definitely\n // re-start the fetch; there is a chance that the query is still in a\n // pending state when that happens\n this.#retryer?.status() !== \"rejected\") {\n if (this.state.data !== void 0 && fetchOptions?.cancelRefetch) {\n this.cancel({ silent: true });\n } else if (this.#retryer) {\n this.#retryer.continueRetry();\n return this.#retryer.promise;\n }\n }\n if (options) {\n this.setOptions(options);\n }\n if (!this.options.queryFn) {\n const observer = this.observers.find((x) => x.options.queryFn);\n if (observer) {\n this.setOptions(observer.options);\n }\n }\n if (process.env.NODE_ENV !== \"production\") {\n if (!Array.isArray(this.options.queryKey)) {\n console.error(\n `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']`\n );\n }\n }\n const abortController = new AbortController();\n const addSignalProperty = (object) => {\n Object.defineProperty(object, \"signal\", {\n enumerable: true,\n get: () => {\n this.#abortSignalConsumed = true;\n return abortController.signal;\n }\n });\n };\n const fetchFn = () => {\n const queryFn = ensureQueryFn(this.options, fetchOptions);\n const createQueryFnContext = () => {\n const queryFnContext2 = {\n client: this.#client,\n queryKey: this.queryKey,\n meta: this.meta\n };\n addSignalProperty(queryFnContext2);\n return queryFnContext2;\n };\n const queryFnContext = createQueryFnContext();\n this.#abortSignalConsumed = false;\n if (this.options.persister) {\n return this.options.persister(\n queryFn,\n queryFnContext,\n this\n );\n }\n return queryFn(queryFnContext);\n };\n const createFetchContext = () => {\n const context2 = {\n fetchOptions,\n options: this.options,\n queryKey: this.queryKey,\n client: this.#client,\n state: this.state,\n fetchFn\n };\n addSignalProperty(context2);\n return context2;\n };\n const context = createFetchContext();\n this.options.behavior?.onFetch(context, this);\n this.#revertState = this.state;\n if (this.state.fetchStatus === \"idle\" || this.state.fetchMeta !== context.fetchOptions?.meta) {\n this.#dispatch({ type: \"fetch\", meta: context.fetchOptions?.meta });\n }\n this.#retryer = createRetryer({\n initialPromise: fetchOptions?.initialPromise,\n fn: context.fetchFn,\n onCancel: (error) => {\n if (error instanceof CancelledError && error.revert) {\n this.setState({\n ...this.#revertState,\n fetchStatus: \"idle\"\n });\n }\n abortController.abort();\n },\n onFail: (failureCount, error) => {\n this.#dispatch({ type: \"failed\", failureCount, error });\n },\n onPause: () => {\n this.#dispatch({ type: \"pause\" });\n },\n onContinue: () => {\n this.#dispatch({ type: \"continue\" });\n },\n retry: context.options.retry,\n retryDelay: context.options.retryDelay,\n networkMode: context.options.networkMode,\n canRun: () => true\n });\n try {\n const data = await this.#retryer.start();\n if (data === void 0) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(\n `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`\n );\n }\n throw new Error(`${this.queryHash} data is undefined`);\n }\n this.setData(data);\n this.#cache.config.onSuccess?.(data, this);\n this.#cache.config.onSettled?.(\n data,\n this.state.error,\n this\n );\n return data;\n } catch (error) {\n if (error instanceof CancelledError) {\n if (error.silent) {\n return this.#retryer.promise;\n } else if (error.revert) {\n if (this.state.data === void 0) {\n throw error;\n }\n return this.state.data;\n }\n }\n this.#dispatch({\n type: \"error\",\n error\n });\n this.#cache.config.onError?.(\n error,\n this\n );\n this.#cache.config.onSettled?.(\n this.state.data,\n error,\n this\n );\n throw error;\n } finally {\n this.scheduleGc();\n }\n }\n #dispatch(action) {\n const reducer = (state) => {\n switch (action.type) {\n case \"failed\":\n return {\n ...state,\n fetchFailureCount: action.failureCount,\n fetchFailureReason: action.error\n };\n case \"pause\":\n return {\n ...state,\n fetchStatus: \"paused\"\n };\n case \"continue\":\n return {\n ...state,\n fetchStatus: \"fetching\"\n };\n case \"fetch\":\n return {\n ...state,\n ...fetchState(state.data, this.options),\n fetchMeta: action.meta ?? null\n };\n case \"success\":\n const newState = {\n ...state,\n ...successState(action.data, action.dataUpdatedAt),\n dataUpdateCount: state.dataUpdateCount + 1,\n ...!action.manual && {\n fetchStatus: \"idle\",\n fetchFailureCount: 0,\n fetchFailureReason: null\n }\n };\n this.#revertState = action.manual ? newState : void 0;\n return newState;\n case \"error\":\n const error = action.error;\n return {\n ...state,\n error,\n errorUpdateCount: state.errorUpdateCount + 1,\n errorUpdatedAt: Date.now(),\n fetchFailureCount: state.fetchFailureCount + 1,\n fetchFailureReason: error,\n fetchStatus: \"idle\",\n status: \"error\",\n // flag existing data as invalidated if we get a background error\n // note that \"no data\" always means stale so we can set unconditionally here\n isInvalidated: true\n };\n case \"invalidate\":\n return {\n ...state,\n isInvalidated: true\n };\n case \"setState\":\n return {\n ...state,\n ...action.state\n };\n }\n };\n this.state = reducer(this.state);\n notifyManager.batch(() => {\n this.observers.forEach((observer) => {\n observer.onQueryUpdate();\n });\n this.#cache.notify({ query: this, type: \"updated\", action });\n });\n }\n};\nfunction fetchState(data, options) {\n return {\n fetchFailureCount: 0,\n fetchFailureReason: null,\n fetchStatus: canFetch(options.networkMode) ? \"fetching\" : \"paused\",\n ...data === void 0 && {\n error: null,\n status: \"pending\"\n }\n };\n}\nfunction successState(data, dataUpdatedAt) {\n return {\n data,\n dataUpdatedAt: dataUpdatedAt ?? Date.now(),\n error: null,\n isInvalidated: false,\n status: \"success\"\n };\n}\nfunction getDefaultState(options) {\n const data = typeof options.initialData === \"function\" ? options.initialData() : options.initialData;\n const hasData = data !== void 0;\n const initialDataUpdatedAt = hasData ? typeof options.initialDataUpdatedAt === \"function\" ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;\n return {\n data,\n dataUpdateCount: 0,\n dataUpdatedAt: hasData ? initialDataUpdatedAt ?? Date.now() : 0,\n error: null,\n errorUpdateCount: 0,\n errorUpdatedAt: 0,\n fetchFailureCount: 0,\n fetchFailureReason: null,\n fetchMeta: null,\n isInvalidated: false,\n status: hasData ? \"success\" : \"pending\",\n fetchStatus: \"idle\"\n };\n}\nexport {\n Query,\n fetchState\n};\n//# sourceMappingURL=query.js.map","// src/queryObserver.ts\nimport { focusManager } from \"./focusManager.js\";\nimport { environmentManager } from \"./environmentManager.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { fetchState } from \"./query.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { pendingThenable } from \"./thenable.js\";\nimport {\n isValidTimeout,\n noop,\n replaceData,\n resolveEnabled,\n resolveStaleTime,\n shallowEqualObjects,\n timeUntilStale\n} from \"./utils.js\";\nimport { timeoutManager } from \"./timeoutManager.js\";\nvar QueryObserver = class extends Subscribable {\n constructor(client, options) {\n super();\n this.options = options;\n this.#client = client;\n this.#selectError = null;\n this.#currentThenable = pendingThenable();\n this.bindMethods();\n this.setOptions(options);\n }\n #client;\n #currentQuery = void 0;\n #currentQueryInitialState = void 0;\n #currentResult = void 0;\n #currentResultState;\n #currentResultOptions;\n #currentThenable;\n #selectError;\n #selectFn;\n #selectResult;\n // This property keeps track of the last query with defined data.\n // It will be used to pass the previous data and query to the placeholder function between renders.\n #lastQueryWithDefinedData;\n #staleTimeoutId;\n #refetchIntervalId;\n #currentRefetchInterval;\n #trackedProps = /* @__PURE__ */ new Set();\n bindMethods() {\n this.refetch = this.refetch.bind(this);\n }\n onSubscribe() {\n if (this.listeners.size === 1) {\n this.#currentQuery.addObserver(this);\n if (shouldFetchOnMount(this.#currentQuery, this.options)) {\n this.#executeFetch();\n } else {\n this.updateResult();\n }\n this.#updateTimers();\n }\n }\n onUnsubscribe() {\n if (!this.hasListeners()) {\n this.destroy();\n }\n }\n shouldFetchOnReconnect() {\n return shouldFetchOn(\n this.#currentQuery,\n this.options,\n this.options.refetchOnReconnect\n );\n }\n shouldFetchOnWindowFocus() {\n return shouldFetchOn(\n this.#currentQuery,\n this.options,\n this.options.refetchOnWindowFocus\n );\n }\n destroy() {\n this.listeners = /* @__PURE__ */ new Set();\n this.#clearStaleTimeout();\n this.#clearRefetchInterval();\n this.#currentQuery.removeObserver(this);\n }\n setOptions(options) {\n const prevOptions = this.options;\n const prevQuery = this.#currentQuery;\n this.options = this.#client.defaultQueryOptions(options);\n if (this.options.enabled !== void 0 && typeof this.options.enabled !== \"boolean\" && typeof this.options.enabled !== \"function\" && typeof resolveEnabled(this.options.enabled, this.#currentQuery) !== \"boolean\") {\n throw new Error(\n \"Expected enabled to be a boolean or a callback that returns a boolean\"\n );\n }\n this.#updateQuery();\n this.#currentQuery.setOptions(this.options);\n if (prevOptions._defaulted && !shallowEqualObjects(this.options, prevOptions)) {\n this.#client.getQueryCache().notify({\n type: \"observerOptionsUpdated\",\n query: this.#currentQuery,\n observer: this\n });\n }\n const mounted = this.hasListeners();\n if (mounted && shouldFetchOptionally(\n this.#currentQuery,\n prevQuery,\n this.options,\n prevOptions\n )) {\n this.#executeFetch();\n }\n this.updateResult();\n if (mounted && (this.#currentQuery !== prevQuery || resolveEnabled(this.options.enabled, this.#currentQuery) !== resolveEnabled(prevOptions.enabled, this.#currentQuery) || resolveStaleTime(this.options.staleTime, this.#currentQuery) !== resolveStaleTime(prevOptions.staleTime, this.#currentQuery))) {\n this.#updateStaleTimeout();\n }\n const nextRefetchInterval = this.#computeRefetchInterval();\n if (mounted && (this.#currentQuery !== prevQuery || resolveEnabled(this.options.enabled, this.#currentQuery) !== resolveEnabled(prevOptions.enabled, this.#currentQuery) || nextRefetchInterval !== this.#currentRefetchInterval)) {\n this.#updateRefetchInterval(nextRefetchInterval);\n }\n }\n getOptimisticResult(options) {\n const query = this.#client.getQueryCache().build(this.#client, options);\n const result = this.createResult(query, options);\n if (shouldAssignObserverCurrentProperties(this, result)) {\n this.#currentResult = result;\n this.#currentResultOptions = this.options;\n this.#currentResultState = this.#currentQuery.state;\n }\n return result;\n }\n getCurrentResult() {\n return this.#currentResult;\n }\n trackResult(result, onPropTracked) {\n return new Proxy(result, {\n get: (target, key) => {\n this.trackProp(key);\n onPropTracked?.(key);\n if (key === \"promise\") {\n this.trackProp(\"data\");\n if (!this.options.experimental_prefetchInRender && this.#currentThenable.status === \"pending\") {\n this.#currentThenable.reject(\n new Error(\n \"experimental_prefetchInRender feature flag is not enabled\"\n )\n );\n }\n }\n return Reflect.get(target, key);\n }\n });\n }\n trackProp(key) {\n this.#trackedProps.add(key);\n }\n getCurrentQuery() {\n return this.#currentQuery;\n }\n refetch({ ...options } = {}) {\n return this.fetch({\n ...options\n });\n }\n fetchOptimistic(options) {\n const defaultedOptions = this.#client.defaultQueryOptions(options);\n const query = this.#client.getQueryCache().build(this.#client, defaultedOptions);\n return query.fetch().then(() => this.createResult(query, defaultedOptions));\n }\n fetch(fetchOptions) {\n return this.#executeFetch({\n ...fetchOptions,\n cancelRefetch: fetchOptions.cancelRefetch ?? true\n }).then(() => {\n this.updateResult();\n return this.#currentResult;\n });\n }\n #executeFetch(fetchOptions) {\n this.#updateQuery();\n let promise = this.#currentQuery.fetch(\n this.options,\n fetchOptions\n );\n if (!fetchOptions?.throwOnError) {\n promise = promise.catch(noop);\n }\n return promise;\n }\n #updateStaleTimeout() {\n this.#clearStaleTimeout();\n const staleTime = resolveStaleTime(\n this.options.staleTime,\n this.#currentQuery\n );\n if (environmentManager.isServer() || this.#currentResult.isStale || !isValidTimeout(staleTime)) {\n return;\n }\n const time = timeUntilStale(this.#currentResult.dataUpdatedAt, staleTime);\n const timeout = time + 1;\n this.#staleTimeoutId = timeoutManager.setTimeout(() => {\n if (!this.#currentResult.isStale) {\n this.updateResult();\n }\n }, timeout);\n }\n #computeRefetchInterval() {\n return (typeof this.options.refetchInterval === \"function\" ? this.options.refetchInterval(this.#currentQuery) : this.options.refetchInterval) ?? false;\n }\n #updateRefetchInterval(nextInterval) {\n this.#clearRefetchInterval();\n this.#currentRefetchInterval = nextInterval;\n if (environmentManager.isServer() || resolveEnabled(this.options.enabled, this.#currentQuery) === false || !isValidTimeout(this.#currentRefetchInterval) || this.#currentRefetchInterval === 0) {\n return;\n }\n this.#refetchIntervalId = timeoutManager.setInterval(() => {\n if (this.options.refetchIntervalInBackground || focusManager.isFocused()) {\n this.#executeFetch();\n }\n }, this.#currentRefetchInterval);\n }\n #updateTimers() {\n this.#updateStaleTimeout();\n this.#updateRefetchInterval(this.#computeRefetchInterval());\n }\n #clearStaleTimeout() {\n if (this.#staleTimeoutId) {\n timeoutManager.clearTimeout(this.#staleTimeoutId);\n this.#staleTimeoutId = void 0;\n }\n }\n #clearRefetchInterval() {\n if (this.#refetchIntervalId) {\n timeoutManager.clearInterval(this.#refetchIntervalId);\n this.#refetchIntervalId = void 0;\n }\n }\n createResult(query, options) {\n const prevQuery = this.#currentQuery;\n const prevOptions = this.options;\n const prevResult = this.#currentResult;\n const prevResultState = this.#currentResultState;\n const prevResultOptions = this.#currentResultOptions;\n const queryChange = query !== prevQuery;\n const queryInitialState = queryChange ? query.state : this.#currentQueryInitialState;\n const { state } = query;\n let newState = { ...state };\n let isPlaceholderData = false;\n let data;\n if (options._optimisticResults) {\n const mounted = this.hasListeners();\n const fetchOnMount = !mounted && shouldFetchOnMount(query, options);\n const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);\n if (fetchOnMount || fetchOptionally) {\n newState = {\n ...newState,\n ...fetchState(state.data, query.options)\n };\n }\n if (options._optimisticResults === \"isRestoring\") {\n newState.fetchStatus = \"idle\";\n }\n }\n let { error, errorUpdatedAt, status } = newState;\n data = newState.data;\n let skipSelect = false;\n if (options.placeholderData !== void 0 && data === void 0 && status === \"pending\") {\n let placeholderData;\n if (prevResult?.isPlaceholderData && options.placeholderData === prevResultOptions?.placeholderData) {\n placeholderData = prevResult.data;\n skipSelect = true;\n } else {\n placeholderData = typeof options.placeholderData === \"function\" ? options.placeholderData(\n this.#lastQueryWithDefinedData?.state.data,\n this.#lastQueryWithDefinedData\n ) : options.placeholderData;\n }\n if (placeholderData !== void 0) {\n status = \"success\";\n data = replaceData(\n prevResult?.data,\n placeholderData,\n options\n );\n isPlaceholderData = true;\n }\n }\n if (options.select && data !== void 0 && !skipSelect) {\n if (prevResult && data === prevResultState?.data && options.select === this.#selectFn) {\n data = this.#selectResult;\n } else {\n try {\n this.#selectFn = options.select;\n data = options.select(data);\n data = replaceData(prevResult?.data, data, options);\n this.#selectResult = data;\n this.#selectError = null;\n } catch (selectError) {\n this.#selectError = selectError;\n }\n }\n }\n if (this.#selectError) {\n error = this.#selectError;\n data = this.#selectResult;\n errorUpdatedAt = Date.now();\n status = \"error\";\n }\n const isFetching = newState.fetchStatus === \"fetching\";\n const isPending = status === \"pending\";\n const isError = status === \"error\";\n const isLoading = isPending && isFetching;\n const hasData = data !== void 0;\n const result = {\n status,\n fetchStatus: newState.fetchStatus,\n isPending,\n isSuccess: status === \"success\",\n isError,\n isInitialLoading: isLoading,\n isLoading,\n data,\n dataUpdatedAt: newState.dataUpdatedAt,\n error,\n errorUpdatedAt,\n failureCount: newState.fetchFailureCount,\n failureReason: newState.fetchFailureReason,\n errorUpdateCount: newState.errorUpdateCount,\n isFetched: query.isFetched(),\n isFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount,\n isFetching,\n isRefetching: isFetching && !isPending,\n isLoadingError: isError && !hasData,\n isPaused: newState.fetchStatus === \"paused\",\n isPlaceholderData,\n isRefetchError: isError && hasData,\n isStale: isStale(query, options),\n refetch: this.refetch,\n promise: this.#currentThenable,\n isEnabled: resolveEnabled(options.enabled, query) !== false\n };\n const nextResult = result;\n if (this.options.experimental_prefetchInRender) {\n const hasResultData = nextResult.data !== void 0;\n const isErrorWithoutData = nextResult.status === \"error\" && !hasResultData;\n const finalizeThenableIfPossible = (thenable) => {\n if (isErrorWithoutData) {\n thenable.reject(nextResult.error);\n } else if (hasResultData) {\n thenable.resolve(nextResult.data);\n }\n };\n const recreateThenable = () => {\n const pending = this.#currentThenable = nextResult.promise = pendingThenable();\n finalizeThenableIfPossible(pending);\n };\n const prevThenable = this.#currentThenable;\n switch (prevThenable.status) {\n case \"pending\":\n if (query.queryHash === prevQuery.queryHash) {\n finalizeThenableIfPossible(prevThenable);\n }\n break;\n case \"fulfilled\":\n if (isErrorWithoutData || nextResult.data !== prevThenable.value) {\n recreateThenable();\n }\n break;\n case \"rejected\":\n if (!isErrorWithoutData || nextResult.error !== prevThenable.reason) {\n recreateThenable();\n }\n break;\n }\n }\n return nextResult;\n }\n updateResult() {\n const prevResult = this.#currentResult;\n const nextResult = this.createResult(this.#currentQuery, this.options);\n this.#currentResultState = this.#currentQuery.state;\n this.#currentResultOptions = this.options;\n if (this.#currentResultState.data !== void 0) {\n this.#lastQueryWithDefinedData = this.#currentQuery;\n }\n if (shallowEqualObjects(nextResult, prevResult)) {\n return;\n }\n this.#currentResult = nextResult;\n const shouldNotifyListeners = () => {\n if (!prevResult) {\n return true;\n }\n const { notifyOnChangeProps } = this.options;\n const notifyOnChangePropsValue = typeof notifyOnChangeProps === \"function\" ? notifyOnChangeProps() : notifyOnChangeProps;\n if (notifyOnChangePropsValue === \"all\" || !notifyOnChangePropsValue && !this.#trackedProps.size) {\n return true;\n }\n const includedProps = new Set(\n notifyOnChangePropsValue ?? this.#trackedProps\n );\n if (this.options.throwOnError) {\n includedProps.add(\"error\");\n }\n return Object.keys(this.#currentResult).some((key) => {\n const typedKey = key;\n const changed = this.#currentResult[typedKey] !== prevResult[typedKey];\n return changed && includedProps.has(typedKey);\n });\n };\n this.#notify({ listeners: shouldNotifyListeners() });\n }\n #updateQuery() {\n const query = this.#client.getQueryCache().build(this.#client, this.options);\n if (query === this.#currentQuery) {\n return;\n }\n const prevQuery = this.#currentQuery;\n this.#currentQuery = query;\n this.#currentQueryInitialState = query.state;\n if (this.hasListeners()) {\n prevQuery?.removeObserver(this);\n query.addObserver(this);\n }\n }\n onQueryUpdate() {\n this.updateResult();\n if (this.hasListeners()) {\n this.#updateTimers();\n }\n }\n #notify(notifyOptions) {\n notifyManager.batch(() => {\n if (notifyOptions.listeners) {\n this.listeners.forEach((listener) => {\n listener(this.#currentResult);\n });\n }\n this.#client.getQueryCache().notify({\n query: this.#currentQuery,\n type: \"observerResultsUpdated\"\n });\n });\n }\n};\nfunction shouldLoadOnMount(query, options) {\n return resolveEnabled(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === \"error\" && options.retryOnMount === false);\n}\nfunction shouldFetchOnMount(query, options) {\n return shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount);\n}\nfunction shouldFetchOn(query, options, field) {\n if (resolveEnabled(options.enabled, query) !== false && resolveStaleTime(options.staleTime, query) !== \"static\") {\n const value = typeof field === \"function\" ? field(query) : field;\n return value === \"always\" || value !== false && isStale(query, options);\n }\n return false;\n}\nfunction shouldFetchOptionally(query, prevQuery, options, prevOptions) {\n return (query !== prevQuery || resolveEnabled(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== \"error\") && isStale(query, options);\n}\nfunction isStale(query, options) {\n return resolveEnabled(options.enabled, query) !== false && query.isStaleByTime(resolveStaleTime(options.staleTime, query));\n}\nfunction shouldAssignObserverCurrentProperties(observer, optimisticResult) {\n if (!shallowEqualObjects(observer.getCurrentResult(), optimisticResult)) {\n return true;\n }\n return false;\n}\nexport {\n QueryObserver\n};\n//# sourceMappingURL=queryObserver.js.map","// src/infiniteQueryBehavior.ts\nimport {\n addConsumeAwareSignal,\n addToEnd,\n addToStart,\n ensureQueryFn\n} from \"./utils.js\";\nfunction infiniteQueryBehavior(pages) {\n return {\n onFetch: (context, query) => {\n const options = context.options;\n const direction = context.fetchOptions?.meta?.fetchMore?.direction;\n const oldPages = context.state.data?.pages || [];\n const oldPageParams = context.state.data?.pageParams || [];\n let result = { pages: [], pageParams: [] };\n let currentPage = 0;\n const fetchFn = async () => {\n let cancelled = false;\n const addSignalProperty = (object) => {\n addConsumeAwareSignal(\n object,\n () => context.signal,\n () => cancelled = true\n );\n };\n const queryFn = ensureQueryFn(context.options, context.fetchOptions);\n const fetchPage = async (data, param, previous) => {\n if (cancelled) {\n return Promise.reject();\n }\n if (param == null && data.pages.length) {\n return Promise.resolve(data);\n }\n const createQueryFnContext = () => {\n const queryFnContext2 = {\n client: context.client,\n queryKey: context.queryKey,\n pageParam: param,\n direction: previous ? \"backward\" : \"forward\",\n meta: context.options.meta\n };\n addSignalProperty(queryFnContext2);\n return queryFnContext2;\n };\n const queryFnContext = createQueryFnContext();\n const page = await queryFn(queryFnContext);\n const { maxPages } = context.options;\n const addTo = previous ? addToStart : addToEnd;\n return {\n pages: addTo(data.pages, page, maxPages),\n pageParams: addTo(data.pageParams, param, maxPages)\n };\n };\n if (direction && oldPages.length) {\n const previous = direction === \"backward\";\n const pageParamFn = previous ? getPreviousPageParam : getNextPageParam;\n const oldData = {\n pages: oldPages,\n pageParams: oldPageParams\n };\n const param = pageParamFn(options, oldData);\n result = await fetchPage(oldData, param, previous);\n } else {\n const remainingPages = pages ?? oldPages.length;\n do {\n const param = currentPage === 0 ? oldPageParams[0] ?? options.initialPageParam : getNextPageParam(options, result);\n if (currentPage > 0 && param == null) {\n break;\n }\n result = await fetchPage(result, param);\n currentPage++;\n } while (currentPage < remainingPages);\n }\n return result;\n };\n if (context.options.persister) {\n context.fetchFn = () => {\n return context.options.persister?.(\n fetchFn,\n {\n client: context.client,\n queryKey: context.queryKey,\n meta: context.options.meta,\n signal: context.signal\n },\n query\n );\n };\n } else {\n context.fetchFn = fetchFn;\n }\n }\n };\n}\nfunction getNextPageParam(options, { pages, pageParams }) {\n const lastIndex = pages.length - 1;\n return pages.length > 0 ? options.getNextPageParam(\n pages[lastIndex],\n pages,\n pageParams[lastIndex],\n pageParams\n ) : void 0;\n}\nfunction getPreviousPageParam(options, { pages, pageParams }) {\n return pages.length > 0 ? options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams) : void 0;\n}\nfunction hasNextPage(options, data) {\n if (!data) return false;\n return getNextPageParam(options, data) != null;\n}\nfunction hasPreviousPage(options, data) {\n if (!data || !options.getPreviousPageParam) return false;\n return getPreviousPageParam(options, data) != null;\n}\nexport {\n hasNextPage,\n hasPreviousPage,\n infiniteQueryBehavior\n};\n//# sourceMappingURL=infiniteQueryBehavior.js.map","// src/mutation.ts\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Removable } from \"./removable.js\";\nimport { createRetryer } from \"./retryer.js\";\nvar Mutation = class extends Removable {\n #client;\n #observers;\n #mutationCache;\n #retryer;\n constructor(config) {\n super();\n this.#client = config.client;\n this.mutationId = config.mutationId;\n this.#mutationCache = config.mutationCache;\n this.#observers = [];\n this.state = config.state || getDefaultState();\n this.setOptions(config.options);\n this.scheduleGc();\n }\n setOptions(options) {\n this.options = options;\n this.updateGcTime(this.options.gcTime);\n }\n get meta() {\n return this.options.meta;\n }\n addObserver(observer) {\n if (!this.#observers.includes(observer)) {\n this.#observers.push(observer);\n this.clearGcTimeout();\n this.#mutationCache.notify({\n type: \"observerAdded\",\n mutation: this,\n observer\n });\n }\n }\n removeObserver(observer) {\n this.#observers = this.#observers.filter((x) => x !== observer);\n this.scheduleGc();\n this.#mutationCache.notify({\n type: \"observerRemoved\",\n mutation: this,\n observer\n });\n }\n optionalRemove() {\n if (!this.#observers.length) {\n if (this.state.status === \"pending\") {\n this.scheduleGc();\n } else {\n this.#mutationCache.remove(this);\n }\n }\n }\n continue() {\n return this.#retryer?.continue() ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before\n this.execute(this.state.variables);\n }\n async execute(variables) {\n const onContinue = () => {\n this.#dispatch({ type: \"continue\" });\n };\n const mutationFnContext = {\n client: this.#client,\n meta: this.options.meta,\n mutationKey: this.options.mutationKey\n };\n this.#retryer = createRetryer({\n fn: () => {\n if (!this.options.mutationFn) {\n return Promise.reject(new Error(\"No mutationFn found\"));\n }\n return this.options.mutationFn(variables, mutationFnContext);\n },\n onFail: (failureCount, error) => {\n this.#dispatch({ type: \"failed\", failureCount, error });\n },\n onPause: () => {\n this.#dispatch({ type: \"pause\" });\n },\n onContinue,\n retry: this.options.retry ?? 0,\n retryDelay: this.options.retryDelay,\n networkMode: this.options.networkMode,\n canRun: () => this.#mutationCache.canRun(this)\n });\n const restored = this.state.status === \"pending\";\n const isPaused = !this.#retryer.canStart();\n try {\n if (restored) {\n onContinue();\n } else {\n this.#dispatch({ type: \"pending\", variables, isPaused });\n if (this.#mutationCache.config.onMutate) {\n await this.#mutationCache.config.onMutate(\n variables,\n this,\n mutationFnContext\n );\n }\n const context = await this.options.onMutate?.(\n variables,\n mutationFnContext\n );\n if (context !== this.state.context) {\n this.#dispatch({\n type: \"pending\",\n context,\n variables,\n isPaused\n });\n }\n }\n const data = await this.#retryer.start();\n await this.#mutationCache.config.onSuccess?.(\n data,\n variables,\n this.state.context,\n this,\n mutationFnContext\n );\n await this.options.onSuccess?.(\n data,\n variables,\n this.state.context,\n mutationFnContext\n );\n await this.#mutationCache.config.onSettled?.(\n data,\n null,\n this.state.variables,\n this.state.context,\n this,\n mutationFnContext\n );\n await this.options.onSettled?.(\n data,\n null,\n variables,\n this.state.context,\n mutationFnContext\n );\n this.#dispatch({ type: \"success\", data });\n return data;\n } catch (error) {\n try {\n await this.#mutationCache.config.onError?.(\n error,\n variables,\n this.state.context,\n this,\n mutationFnContext\n );\n } catch (e) {\n void Promise.reject(e);\n }\n try {\n await this.options.onError?.(\n error,\n variables,\n this.state.context,\n mutationFnContext\n );\n } catch (e) {\n void Promise.reject(e);\n }\n try {\n await this.#mutationCache.config.onSettled?.(\n void 0,\n error,\n this.state.variables,\n this.state.context,\n this,\n mutationFnContext\n );\n } catch (e) {\n void Promise.reject(e);\n }\n try {\n await this.options.onSettled?.(\n void 0,\n error,\n variables,\n this.state.context,\n mutationFnContext\n );\n } catch (e) {\n void Promise.reject(e);\n }\n this.#dispatch({ type: \"error\", error });\n throw error;\n } finally {\n this.#mutationCache.runNext(this);\n }\n }\n #dispatch(action) {\n const reducer = (state) => {\n switch (action.type) {\n case \"failed\":\n return {\n ...state,\n failureCount: action.failureCount,\n failureReason: action.error\n };\n case \"pause\":\n return {\n ...state,\n isPaused: true\n };\n case \"continue\":\n return {\n ...state,\n isPaused: false\n };\n case \"pending\":\n return {\n ...state,\n context: action.context,\n data: void 0,\n failureCount: 0,\n failureReason: null,\n error: null,\n isPaused: action.isPaused,\n status: \"pending\",\n variables: action.variables,\n submittedAt: Date.now()\n };\n case \"success\":\n return {\n ...state,\n data: action.data,\n failureCount: 0,\n failureReason: null,\n error: null,\n status: \"success\",\n isPaused: false\n };\n case \"error\":\n return {\n ...state,\n data: void 0,\n error: action.error,\n failureCount: state.failureCount + 1,\n failureReason: action.error,\n isPaused: false,\n status: \"error\"\n };\n }\n };\n this.state = reducer(this.state);\n notifyManager.batch(() => {\n this.#observers.forEach((observer) => {\n observer.onMutationUpdate(action);\n });\n this.#mutationCache.notify({\n mutation: this,\n type: \"updated\",\n action\n });\n });\n }\n};\nfunction getDefaultState() {\n return {\n context: void 0,\n data: void 0,\n error: null,\n failureCount: 0,\n failureReason: null,\n isPaused: false,\n status: \"idle\",\n variables: void 0,\n submittedAt: 0\n };\n}\nexport {\n Mutation,\n getDefaultState\n};\n//# sourceMappingURL=mutation.js.map","// src/mutationCache.ts\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Mutation } from \"./mutation.js\";\nimport { matchMutation, noop } from \"./utils.js\";\nimport { Subscribable } from \"./subscribable.js\";\nvar MutationCache = class extends Subscribable {\n constructor(config = {}) {\n super();\n this.config = config;\n this.#mutations = /* @__PURE__ */ new Set();\n this.#scopes = /* @__PURE__ */ new Map();\n this.#mutationId = 0;\n }\n #mutations;\n #scopes;\n #mutationId;\n build(client, options, state) {\n const mutation = new Mutation({\n client,\n mutationCache: this,\n mutationId: ++this.#mutationId,\n options: client.defaultMutationOptions(options),\n state\n });\n this.add(mutation);\n return mutation;\n }\n add(mutation) {\n this.#mutations.add(mutation);\n const scope = scopeFor(mutation);\n if (typeof scope === \"string\") {\n const scopedMutations = this.#scopes.get(scope);\n if (scopedMutations) {\n scopedMutations.push(mutation);\n } else {\n this.#scopes.set(scope, [mutation]);\n }\n }\n this.notify({ type: \"added\", mutation });\n }\n remove(mutation) {\n if (this.#mutations.delete(mutation)) {\n const scope = scopeFor(mutation);\n if (typeof scope === \"string\") {\n const scopedMutations = this.#scopes.get(scope);\n if (scopedMutations) {\n if (scopedMutations.length > 1) {\n const index = scopedMutations.indexOf(mutation);\n if (index !== -1) {\n scopedMutations.splice(index, 1);\n }\n } else if (scopedMutations[0] === mutation) {\n this.#scopes.delete(scope);\n }\n }\n }\n }\n this.notify({ type: \"removed\", mutation });\n }\n canRun(mutation) {\n const scope = scopeFor(mutation);\n if (typeof scope === \"string\") {\n const mutationsWithSameScope = this.#scopes.get(scope);\n const firstPendingMutation = mutationsWithSameScope?.find(\n (m) => m.state.status === \"pending\"\n );\n return !firstPendingMutation || firstPendingMutation === mutation;\n } else {\n return true;\n }\n }\n runNext(mutation) {\n const scope = scopeFor(mutation);\n if (typeof scope === \"string\") {\n const foundMutation = this.#scopes.get(scope)?.find((m) => m !== mutation && m.state.isPaused);\n return foundMutation?.continue() ?? Promise.resolve();\n } else {\n return Promise.resolve();\n }\n }\n clear() {\n notifyManager.batch(() => {\n this.#mutations.forEach((mutation) => {\n this.notify({ type: \"removed\", mutation });\n });\n this.#mutations.clear();\n this.#scopes.clear();\n });\n }\n getAll() {\n return Array.from(this.#mutations);\n }\n find(filters) {\n const defaultedFilters = { exact: true, ...filters };\n return this.getAll().find(\n (mutation) => matchMutation(defaultedFilters, mutation)\n );\n }\n findAll(filters = {}) {\n return this.getAll().filter((mutation) => matchMutation(filters, mutation));\n }\n notify(event) {\n notifyManager.batch(() => {\n this.listeners.forEach((listener) => {\n listener(event);\n });\n });\n }\n resumePausedMutations() {\n const pausedMutations = this.getAll().filter((x) => x.state.isPaused);\n return notifyManager.batch(\n () => Promise.all(\n pausedMutations.map((mutation) => mutation.continue().catch(noop))\n )\n );\n }\n};\nfunction scopeFor(mutation) {\n return mutation.options.scope?.id;\n}\nexport {\n MutationCache\n};\n//# sourceMappingURL=mutationCache.js.map","// src/queryCache.ts\nimport { hashQueryKeyByOptions, matchQuery } from \"./utils.js\";\nimport { Query } from \"./query.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Subscribable } from \"./subscribable.js\";\nvar QueryCache = class extends Subscribable {\n constructor(config = {}) {\n super();\n this.config = config;\n this.#queries = /* @__PURE__ */ new Map();\n }\n #queries;\n build(client, options, state) {\n const queryKey = options.queryKey;\n const queryHash = options.queryHash ?? hashQueryKeyByOptions(queryKey, options);\n let query = this.get(queryHash);\n if (!query) {\n query = new Query({\n client,\n queryKey,\n queryHash,\n options: client.defaultQueryOptions(options),\n state,\n defaultOptions: client.getQueryDefaults(queryKey)\n });\n this.add(query);\n }\n return query;\n }\n add(query) {\n if (!this.#queries.has(query.queryHash)) {\n this.#queries.set(query.queryHash, query);\n this.notify({\n type: \"added\",\n query\n });\n }\n }\n remove(query) {\n const queryInMap = this.#queries.get(query.queryHash);\n if (queryInMap) {\n query.destroy();\n if (queryInMap === query) {\n this.#queries.delete(query.queryHash);\n }\n this.notify({ type: \"removed\", query });\n }\n }\n clear() {\n notifyManager.batch(() => {\n this.getAll().forEach((query) => {\n this.remove(query);\n });\n });\n }\n get(queryHash) {\n return this.#queries.get(queryHash);\n }\n getAll() {\n return [...this.#queries.values()];\n }\n find(filters) {\n const defaultedFilters = { exact: true, ...filters };\n return this.getAll().find(\n (query) => matchQuery(defaultedFilters, query)\n );\n }\n findAll(filters = {}) {\n const queries = this.getAll();\n return Object.keys(filters).length > 0 ? queries.filter((query) => matchQuery(filters, query)) : queries;\n }\n notify(event) {\n notifyManager.batch(() => {\n this.listeners.forEach((listener) => {\n listener(event);\n });\n });\n }\n onFocus() {\n notifyManager.batch(() => {\n this.getAll().forEach((query) => {\n query.onFocus();\n });\n });\n }\n onOnline() {\n notifyManager.batch(() => {\n this.getAll().forEach((query) => {\n query.onOnline();\n });\n });\n }\n};\nexport {\n QueryCache\n};\n//# sourceMappingURL=queryCache.js.map","// src/queryClient.ts\nimport {\n functionalUpdate,\n hashKey,\n hashQueryKeyByOptions,\n noop,\n partialMatchKey,\n resolveStaleTime,\n skipToken\n} from \"./utils.js\";\nimport { QueryCache } from \"./queryCache.js\";\nimport { MutationCache } from \"./mutationCache.js\";\nimport { focusManager } from \"./focusManager.js\";\nimport { onlineManager } from \"./onlineManager.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { infiniteQueryBehavior } from \"./infiniteQueryBehavior.js\";\nvar QueryClient = class {\n #queryCache;\n #mutationCache;\n #defaultOptions;\n #queryDefaults;\n #mutationDefaults;\n #mountCount;\n #unsubscribeFocus;\n #unsubscribeOnline;\n constructor(config = {}) {\n this.#queryCache = config.queryCache || new QueryCache();\n this.#mutationCache = config.mutationCache || new MutationCache();\n this.#defaultOptions = config.defaultOptions || {};\n this.#queryDefaults = /* @__PURE__ */ new Map();\n this.#mutationDefaults = /* @__PURE__ */ new Map();\n this.#mountCount = 0;\n }\n mount() {\n this.#mountCount++;\n if (this.#mountCount !== 1) return;\n this.#unsubscribeFocus = focusManager.subscribe(async (focused) => {\n if (focused) {\n await this.resumePausedMutations();\n this.#queryCache.onFocus();\n }\n });\n this.#unsubscribeOnline = onlineManager.subscribe(async (online) => {\n if (online) {\n await this.resumePausedMutations();\n this.#queryCache.onOnline();\n }\n });\n }\n unmount() {\n this.#mountCount--;\n if (this.#mountCount !== 0) return;\n this.#unsubscribeFocus?.();\n this.#unsubscribeFocus = void 0;\n this.#unsubscribeOnline?.();\n this.#unsubscribeOnline = void 0;\n }\n isFetching(filters) {\n return this.#queryCache.findAll({ ...filters, fetchStatus: \"fetching\" }).length;\n }\n isMutating(filters) {\n return this.#mutationCache.findAll({ ...filters, status: \"pending\" }).length;\n }\n /**\n * Imperative (non-reactive) way to retrieve data for a QueryKey.\n * Should only be used in callbacks or functions where reading the latest data is necessary, e.g. for optimistic updates.\n *\n * Hint: Do not use this function inside a component, because it won't receive updates.\n * Use `useQuery` to create a `QueryObserver` that subscribes to changes.\n */\n getQueryData(queryKey) {\n const options = this.defaultQueryOptions({ queryKey });\n return this.#queryCache.get(options.queryHash)?.state.data;\n }\n ensureQueryData(options) {\n const defaultedOptions = this.defaultQueryOptions(options);\n const query = this.#queryCache.build(this, defaultedOptions);\n const cachedData = query.state.data;\n if (cachedData === void 0) {\n return this.fetchQuery(options);\n }\n if (options.revalidateIfStale && query.isStaleByTime(resolveStaleTime(defaultedOptions.staleTime, query))) {\n void this.prefetchQuery(defaultedOptions);\n }\n return Promise.resolve(cachedData);\n }\n getQueriesData(filters) {\n return this.#queryCache.findAll(filters).map(({ queryKey, state }) => {\n const data = state.data;\n return [queryKey, data];\n });\n }\n setQueryData(queryKey, updater, options) {\n const defaultedOptions = this.defaultQueryOptions({ queryKey });\n const query = this.#queryCache.get(\n defaultedOptions.queryHash\n );\n const prevData = query?.state.data;\n const data = functionalUpdate(updater, prevData);\n if (data === void 0) {\n return void 0;\n }\n return this.#queryCache.build(this, defaultedOptions).setData(data, { ...options, manual: true });\n }\n setQueriesData(filters, updater, options) {\n return notifyManager.batch(\n () => this.#queryCache.findAll(filters).map(({ queryKey }) => [\n queryKey,\n this.setQueryData(queryKey, updater, options)\n ])\n );\n }\n getQueryState(queryKey) {\n const options = this.defaultQueryOptions({ queryKey });\n return this.#queryCache.get(\n options.queryHash\n )?.state;\n }\n removeQueries(filters) {\n const queryCache = this.#queryCache;\n notifyManager.batch(() => {\n queryCache.findAll(filters).forEach((query) => {\n queryCache.remove(query);\n });\n });\n }\n resetQueries(filters, options) {\n const queryCache = this.#queryCache;\n return notifyManager.batch(() => {\n queryCache.findAll(filters).forEach((query) => {\n query.reset();\n });\n return this.refetchQueries(\n {\n type: \"active\",\n ...filters\n },\n options\n );\n });\n }\n cancelQueries(filters, cancelOptions = {}) {\n const defaultedCancelOptions = { revert: true, ...cancelOptions };\n const promises = notifyManager.batch(\n () => this.#queryCache.findAll(filters).map((query) => query.cancel(defaultedCancelOptions))\n );\n return Promise.all(promises).then(noop).catch(noop);\n }\n invalidateQueries(filters, options = {}) {\n return notifyManager.batch(() => {\n this.#queryCache.findAll(filters).forEach((query) => {\n query.invalidate();\n });\n if (filters?.refetchType === \"none\") {\n return Promise.resolve();\n }\n return this.refetchQueries(\n {\n ...filters,\n type: filters?.refetchType ?? filters?.type ?? \"active\"\n },\n options\n );\n });\n }\n refetchQueries(filters, options = {}) {\n const fetchOptions = {\n ...options,\n cancelRefetch: options.cancelRefetch ?? true\n };\n const promises = notifyManager.batch(\n () => this.#queryCache.findAll(filters).filter((query) => !query.isDisabled() && !query.isStatic()).map((query) => {\n let promise = query.fetch(void 0, fetchOptions);\n if (!fetchOptions.throwOnError) {\n promise = promise.catch(noop);\n }\n return query.state.fetchStatus === \"paused\" ? Promise.resolve() : promise;\n })\n );\n return Promise.all(promises).then(noop);\n }\n fetchQuery(options) {\n const defaultedOptions = this.defaultQueryOptions(options);\n if (defaultedOptions.retry === void 0) {\n defaultedOptions.retry = false;\n }\n const query = this.#queryCache.build(this, defaultedOptions);\n return query.isStaleByTime(\n resolveStaleTime(defaultedOptions.staleTime, query)\n ) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);\n }\n prefetchQuery(options) {\n return this.fetchQuery(options).then(noop).catch(noop);\n }\n fetchInfiniteQuery(options) {\n options.behavior = infiniteQueryBehavior(options.pages);\n return this.fetchQuery(options);\n }\n prefetchInfiniteQuery(options) {\n return this.fetchInfiniteQuery(options).then(noop).catch(noop);\n }\n ensureInfiniteQueryData(options) {\n options.behavior = infiniteQueryBehavior(options.pages);\n return this.ensureQueryData(options);\n }\n resumePausedMutations() {\n if (onlineManager.isOnline()) {\n return this.#mutationCache.resumePausedMutations();\n }\n return Promise.resolve();\n }\n getQueryCache() {\n return this.#queryCache;\n }\n getMutationCache() {\n return this.#mutationCache;\n }\n getDefaultOptions() {\n return this.#defaultOptions;\n }\n setDefaultOptions(options) {\n this.#defaultOptions = options;\n }\n setQueryDefaults(queryKey, options) {\n this.#queryDefaults.set(hashKey(queryKey), {\n queryKey,\n defaultOptions: options\n });\n }\n getQueryDefaults(queryKey) {\n const defaults = [...this.#queryDefaults.values()];\n const result = {};\n defaults.forEach((queryDefault) => {\n if (partialMatchKey(queryKey, queryDefault.queryKey)) {\n Object.assign(result, queryDefault.defaultOptions);\n }\n });\n return result;\n }\n setMutationDefaults(mutationKey, options) {\n this.#mutationDefaults.set(hashKey(mutationKey), {\n mutationKey,\n defaultOptions: options\n });\n }\n getMutationDefaults(mutationKey) {\n const defaults = [...this.#mutationDefaults.values()];\n const result = {};\n defaults.forEach((queryDefault) => {\n if (partialMatchKey(mutationKey, queryDefault.mutationKey)) {\n Object.assign(result, queryDefault.defaultOptions);\n }\n });\n return result;\n }\n defaultQueryOptions(options) {\n if (options._defaulted) {\n return options;\n }\n const defaultedOptions = {\n ...this.#defaultOptions.queries,\n ...this.getQueryDefaults(options.queryKey),\n ...options,\n _defaulted: true\n };\n if (!defaultedOptions.queryHash) {\n defaultedOptions.queryHash = hashQueryKeyByOptions(\n defaultedOptions.queryKey,\n defaultedOptions\n );\n }\n if (defaultedOptions.refetchOnReconnect === void 0) {\n defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== \"always\";\n }\n if (defaultedOptions.throwOnError === void 0) {\n defaultedOptions.throwOnError = !!defaultedOptions.suspense;\n }\n if (!defaultedOptions.networkMode && defaultedOptions.persister) {\n defaultedOptions.networkMode = \"offlineFirst\";\n }\n if (defaultedOptions.queryFn === skipToken) {\n defaultedOptions.enabled = false;\n }\n return defaultedOptions;\n }\n defaultMutationOptions(options) {\n if (options?._defaulted) {\n return options;\n }\n return {\n ...this.#defaultOptions.mutations,\n ...options?.mutationKey && this.getMutationDefaults(options.mutationKey),\n ...options,\n _defaulted: true\n };\n }\n clear() {\n this.#queryCache.clear();\n this.#mutationCache.clear();\n }\n};\nexport {\n QueryClient\n};\n//# sourceMappingURL=queryClient.js.map","\"use client\";\n\n// src/QueryClientProvider.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar QueryClientContext = React.createContext(\n void 0\n);\nvar useQueryClient = (queryClient) => {\n const client = React.useContext(QueryClientContext);\n if (queryClient) {\n return queryClient;\n }\n if (!client) {\n throw new Error(\"No QueryClient set, use QueryClientProvider to set one\");\n }\n return client;\n};\nvar QueryClientProvider = ({\n client,\n children\n}) => {\n React.useEffect(() => {\n client.mount();\n return () => {\n client.unmount();\n };\n }, [client]);\n return /* @__PURE__ */ jsx(QueryClientContext.Provider, { value: client, children });\n};\nexport {\n QueryClientContext,\n QueryClientProvider,\n useQueryClient\n};\n//# sourceMappingURL=QueryClientProvider.js.map","\"use client\";\n\n// src/IsRestoringProvider.ts\nimport * as React from \"react\";\nvar IsRestoringContext = React.createContext(false);\nvar useIsRestoring = () => React.useContext(IsRestoringContext);\nvar IsRestoringProvider = IsRestoringContext.Provider;\nexport {\n IsRestoringProvider,\n useIsRestoring\n};\n//# sourceMappingURL=IsRestoringProvider.js.map","\"use client\";\n\n// src/QueryErrorResetBoundary.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createValue() {\n let isReset = false;\n return {\n clearReset: () => {\n isReset = false;\n },\n reset: () => {\n isReset = true;\n },\n isReset: () => {\n return isReset;\n }\n };\n}\nvar QueryErrorResetBoundaryContext = React.createContext(createValue());\nvar useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);\nvar QueryErrorResetBoundary = ({\n children\n}) => {\n const [value] = React.useState(() => createValue());\n return /* @__PURE__ */ jsx(QueryErrorResetBoundaryContext.Provider, { value, children: typeof children === \"function\" ? children(value) : children });\n};\nexport {\n QueryErrorResetBoundary,\n useQueryErrorResetBoundary\n};\n//# sourceMappingURL=QueryErrorResetBoundary.js.map","\"use client\";\n\n// src/errorBoundaryUtils.ts\nimport * as React from \"react\";\nimport { shouldThrowError } from \"@tanstack/query-core\";\nvar ensurePreventErrorBoundaryRetry = (options, errorResetBoundary, query) => {\n const throwOnError = query?.state.error && typeof options.throwOnError === \"function\" ? shouldThrowError(options.throwOnError, [query.state.error, query]) : options.throwOnError;\n if (options.suspense || options.experimental_prefetchInRender || throwOnError) {\n if (!errorResetBoundary.isReset()) {\n options.retryOnMount = false;\n }\n }\n};\nvar useClearResetErrorBoundary = (errorResetBoundary) => {\n React.useEffect(() => {\n errorResetBoundary.clearReset();\n }, [errorResetBoundary]);\n};\nvar getHasError = ({\n result,\n errorResetBoundary,\n throwOnError,\n query,\n suspense\n}) => {\n return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || shouldThrowError(throwOnError, [result.error, query]));\n};\nexport {\n ensurePreventErrorBoundaryRetry,\n getHasError,\n useClearResetErrorBoundary\n};\n//# sourceMappingURL=errorBoundaryUtils.js.map","// src/suspense.ts\nvar defaultThrowOnError = (_error, query) => query.state.data === void 0;\nvar ensureSuspenseTimers = (defaultedOptions) => {\n if (defaultedOptions.suspense) {\n const MIN_SUSPENSE_TIME_MS = 1e3;\n const clamp = (value) => value === \"static\" ? value : Math.max(value ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS);\n const originalStaleTime = defaultedOptions.staleTime;\n defaultedOptions.staleTime = typeof originalStaleTime === \"function\" ? (...args) => clamp(originalStaleTime(...args)) : clamp(originalStaleTime);\n if (typeof defaultedOptions.gcTime === \"number\") {\n defaultedOptions.gcTime = Math.max(\n defaultedOptions.gcTime,\n MIN_SUSPENSE_TIME_MS\n );\n }\n }\n};\nvar willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;\nvar shouldSuspend = (defaultedOptions, result) => defaultedOptions?.suspense && result.isPending;\nvar fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {\n errorResetBoundary.clearReset();\n});\nexport {\n defaultThrowOnError,\n ensureSuspenseTimers,\n fetchOptimistic,\n shouldSuspend,\n willFetch\n};\n//# sourceMappingURL=suspense.js.map","\"use client\";\n\n// src/useBaseQuery.ts\nimport * as React from \"react\";\nimport { environmentManager, noop, notifyManager } from \"@tanstack/query-core\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport { useQueryErrorResetBoundary } from \"./QueryErrorResetBoundary.js\";\nimport {\n ensurePreventErrorBoundaryRetry,\n getHasError,\n useClearResetErrorBoundary\n} from \"./errorBoundaryUtils.js\";\nimport { useIsRestoring } from \"./IsRestoringProvider.js\";\nimport {\n ensureSuspenseTimers,\n fetchOptimistic,\n shouldSuspend,\n willFetch\n} from \"./suspense.js\";\nfunction useBaseQuery(options, Observer, queryClient) {\n if (process.env.NODE_ENV !== \"production\") {\n if (typeof options !== \"object\" || Array.isArray(options)) {\n throw new Error(\n 'Bad argument type. Starting with v5, only the \"Object\" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'\n );\n }\n }\n const isRestoring = useIsRestoring();\n const errorResetBoundary = useQueryErrorResetBoundary();\n const client = useQueryClient(queryClient);\n const defaultedOptions = client.defaultQueryOptions(options);\n client.getDefaultOptions().queries?._experimental_beforeQuery?.(\n defaultedOptions\n );\n const query = client.getQueryCache().get(defaultedOptions.queryHash);\n if (process.env.NODE_ENV !== \"production\") {\n if (!defaultedOptions.queryFn) {\n console.error(\n `[${defaultedOptions.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`\n );\n }\n }\n defaultedOptions._optimisticResults = isRestoring ? \"isRestoring\" : \"optimistic\";\n ensureSuspenseTimers(defaultedOptions);\n ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary, query);\n useClearResetErrorBoundary(errorResetBoundary);\n const isNewCacheEntry = !client.getQueryCache().get(defaultedOptions.queryHash);\n const [observer] = React.useState(\n () => new Observer(\n client,\n defaultedOptions\n )\n );\n const result = observer.getOptimisticResult(defaultedOptions);\n const shouldSubscribe = !isRestoring && options.subscribed !== false;\n React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) => {\n const unsubscribe = shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop;\n observer.updateResult();\n return unsubscribe;\n },\n [observer, shouldSubscribe]\n ),\n () => observer.getCurrentResult(),\n () => observer.getCurrentResult()\n );\n React.useEffect(() => {\n observer.setOptions(defaultedOptions);\n }, [defaultedOptions, observer]);\n if (shouldSuspend(defaultedOptions, result)) {\n throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary);\n }\n if (getHasError({\n result,\n errorResetBoundary,\n throwOnError: defaultedOptions.throwOnError,\n query,\n suspense: defaultedOptions.suspense\n })) {\n throw result.error;\n }\n ;\n client.getDefaultOptions().queries?._experimental_afterQuery?.(\n defaultedOptions,\n result\n );\n if (defaultedOptions.experimental_prefetchInRender && !environmentManager.isServer() && willFetch(result, isRestoring)) {\n const promise = isNewCacheEntry ? (\n // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted\n fetchOptimistic(defaultedOptions, observer, errorResetBoundary)\n ) : (\n // subscribe to the \"cache promise\" so that we can finalize the currentThenable once data comes in\n query?.promise\n );\n promise?.catch(noop).finally(() => {\n observer.updateResult();\n });\n }\n return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;\n}\nexport {\n useBaseQuery\n};\n//# sourceMappingURL=useBaseQuery.js.map","\"use client\";\n\n// src/useQuery.ts\nimport { QueryObserver } from \"@tanstack/query-core\";\nimport { useBaseQuery } from \"./useBaseQuery.js\";\nfunction useQuery(options, queryClient) {\n return useBaseQuery(options, QueryObserver, queryClient);\n}\nexport {\n useQuery\n};\n//# sourceMappingURL=useQuery.js.map","/**\n * Minimal Cube client implementation\n * Replaces @cubejs-client/core with lighter implementation\n */\n\nimport type { CubeQuery, CubeApiOptions, CubeResultSet, ExplainResult, ExplainOptions } from '../types'\n\nexport class CubeClient {\n private apiUrl: string\n private headers: Record<string, string>\n private credentials: 'include' | 'omit' | 'same-origin'\n\n constructor(token?: string, options: CubeApiOptions = {}) {\n this.apiUrl = options.apiUrl || '/cubejs-api/v1'\n this.headers = {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n this.credentials = options.credentials ?? 'include'\n\n if (token) {\n this.headers['Authorization'] = token\n }\n }\n\n async load(query: CubeQuery, options?: { bustCache?: boolean }): Promise<CubeResultSet> {\n // Use GET with query parameter for standard Cube.js compatibility\n const queryString = JSON.stringify(query)\n const queryParam = encodeURIComponent(queryString)\n const url = `${this.apiUrl}/load?query=${queryParam}`\n\n // Build headers, optionally adding cache bust header\n const requestHeaders: Record<string, string> = {\n // Remove Content-Type for GET request\n ...Object.fromEntries(\n Object.entries(this.headers).filter(([key]) => key !== 'Content-Type')\n )\n }\n if (options?.bustCache) {\n requestHeaders['X-Cache-Control'] = 'no-cache'\n }\n\n const response = await fetch(url, {\n method: 'GET',\n headers: requestHeaders,\n credentials: this.credentials\n })\n\n if (!response.ok) {\n let errorMessage = `Cube query failed: ${response.status}`\n try {\n const errorText = await response.text()\n // Try to parse as JSON first to get structured error\n try {\n const errorData = JSON.parse(errorText)\n if (errorData.error) {\n errorMessage = errorData.error\n } else {\n errorMessage += ` ${errorText}`\n }\n } catch {\n // If not JSON, use the raw text\n errorMessage += ` ${errorText}`\n }\n } catch {\n // If we can't read the response, just use the status\n }\n throw new Error(errorMessage)\n }\n\n const result = await response.json()\n return new ResultSet(result)\n }\n\n async meta(): Promise<any> {\n const url = `${this.apiUrl}/meta`\n \n const response = await fetch(url, {\n method: 'GET',\n headers: this.headers,\n credentials: this.credentials\n })\n\n if (!response.ok) {\n throw new Error(`Failed to fetch meta: ${response.status}`)\n }\n\n return response.json()\n }\n\n async sql(query: CubeQuery): Promise<any> {\n // Use GET with query parameter for standard Cube.js compatibility\n const queryParam = encodeURIComponent(JSON.stringify(query))\n const url = `${this.apiUrl}/sql?query=${queryParam}`\n \n const response = await fetch(url, {\n method: 'GET',\n headers: {\n // Remove Content-Type for GET request\n ...Object.fromEntries(\n Object.entries(this.headers).filter(([key]) => key !== 'Content-Type')\n )\n },\n credentials: this.credentials\n })\n\n if (!response.ok) {\n throw new Error(`SQL generation failed: ${response.status}`)\n }\n\n return response.json()\n }\n\n async dryRun(query: CubeQuery): Promise<any> {\n const url = `${this.apiUrl}/dry-run`\n\n const response = await fetch(url, {\n method: 'POST',\n headers: this.headers,\n credentials: this.credentials,\n body: JSON.stringify({ query })\n })\n\n if (!response.ok) {\n let errorMessage = `Dry run failed: ${response.status}`\n try {\n const errorText = await response.text()\n try {\n const errorData = JSON.parse(errorText)\n if (errorData.error) {\n errorMessage = errorData.error\n } else {\n errorMessage += ` ${errorText}`\n }\n } catch {\n errorMessage += ` ${errorText}`\n }\n } catch {\n // If we can't read the response, just use the status\n }\n throw new Error(errorMessage)\n }\n\n return response.json()\n }\n\n /**\n * Execute EXPLAIN on a query to get the execution plan\n * Returns normalized plan across PostgreSQL, MySQL, and SQLite\n * Accepts standard queries, funnel queries ({ funnel: {...} }), or flow queries ({ flow: {...} })\n */\n async explain(query: CubeQuery | unknown, options?: ExplainOptions): Promise<ExplainResult> {\n const url = `${this.apiUrl}/explain`\n\n const response = await fetch(url, {\n method: 'POST',\n headers: this.headers,\n credentials: this.credentials,\n body: JSON.stringify({ query, options })\n })\n\n if (!response.ok) {\n let errorMessage = `Explain failed: ${response.status}`\n try {\n const errorText = await response.text()\n try {\n const errorData = JSON.parse(errorText)\n if (errorData.error) {\n errorMessage = errorData.error\n } else {\n errorMessage += ` ${errorText}`\n }\n } catch {\n errorMessage += ` ${errorText}`\n }\n } catch {\n // If we can't read the response, just use the status\n }\n throw new Error(errorMessage)\n }\n\n return response.json()\n }\n\n /**\n * Execute multiple queries in a single batch request\n * Used by BatchCoordinator to optimize network requests\n * Pass { bustCache: true } to bypass server-side cache\n */\n async batchLoad(queries: CubeQuery[], options?: { bustCache?: boolean }): Promise<CubeResultSet[]> {\n const url = `${this.apiUrl}/batch`\n\n // Build headers with optional cache bypass\n const requestHeaders: Record<string, string> = { ...this.headers }\n if (options?.bustCache) {\n requestHeaders['X-Cache-Control'] = 'no-cache'\n }\n\n const response = await fetch(url, {\n method: 'POST',\n headers: requestHeaders,\n credentials: this.credentials,\n body: JSON.stringify({ queries })\n })\n\n if (!response.ok) {\n let errorMessage = `Batch query failed: ${response.status}`\n try {\n const errorText = await response.text()\n try {\n const errorData = JSON.parse(errorText)\n if (errorData.error) {\n errorMessage = errorData.error\n } else {\n errorMessage += ` ${errorText}`\n }\n } catch {\n errorMessage += ` ${errorText}`\n }\n } catch {\n // If we can't read the response, just use the status\n }\n throw new Error(errorMessage)\n }\n\n const batchResponse = await response.json()\n\n // batchResponse.results is an array of individual query results\n // Each result may have succeeded or failed\n return batchResponse.results.map((result: any) => {\n // If this individual query failed, create a ResultSet with error info\n if (!result.success && result.error) {\n // Create a result set that will throw when accessed\n return {\n ...new ResultSet({ data: [], annotation: {} }),\n error: result.error\n }\n }\n\n // Create ResultSet from successful result\n return new ResultSet(result)\n })\n }\n}\n\n/**\n * Simple ResultSet implementation\n */\nclass ResultSet implements CubeResultSet {\n public loadResponse: any\n\n constructor(loadResponse: any) {\n this.loadResponse = loadResponse\n }\n\n rawData(): any[] {\n // Handle new nested structure: loadResponse.results[0].data\n // Keep backward compatibility with old structure: loadResponse.data\n if (this.loadResponse.results && this.loadResponse.results[0]) {\n return this.loadResponse.results[0].data || []\n }\n return this.loadResponse.data || []\n }\n\n tablePivot(): any[] {\n // For pie charts and tables, return the raw data\n return this.rawData()\n }\n\n series(): any[] {\n // Simple series implementation\n return this.rawData()\n }\n\n annotation(): any {\n // Handle new nested structure: loadResponse.results[0].annotation\n // Keep backward compatibility with old structure: loadResponse.annotation\n if (this.loadResponse.results && this.loadResponse.results[0]) {\n return this.loadResponse.results[0].annotation || {}\n }\n return this.loadResponse.annotation || {}\n }\n\n /**\n * Get cache metadata if result was served from cache\n * Returns undefined if not a cache hit\n */\n cacheInfo(): { hit: true; cachedAt: string; ttlMs: number; ttlRemainingMs: number } | undefined {\n // Handle nested structure: loadResponse.results[0].cache\n if (this.loadResponse.results && this.loadResponse.results[0]) {\n return this.loadResponse.results[0].cache\n }\n return this.loadResponse.cache\n }\n}\n\n/**\n * Factory function to create a cube client\n */\nexport function createCubeClient(token?: string, options: CubeApiOptions = {}): CubeClient {\n return new CubeClient(token, options)\n}\n\n// Legacy compatibility export\nexport function cube(token?: string, options: CubeApiOptions = {}): CubeClient {\n return createCubeClient(token, options)\n}","import type { CubeQuery, CubeResultSet } from '../types'\n\n/**\n * Represents a queued query with its resolver/rejector\n */\ninterface QueuedQuery {\n query: CubeQuery\n resolve: (result: CubeResultSet) => void\n reject: (error: Error) => void\n}\n\n/**\n * BatchCoordinator collects queries triggered in the same render cycle\n * and sends them as a single batch request to minimize network overhead.\n *\n * Uses a configurable delay (default 100ms) to batch queries from lazy-loaded\n * portlets that become visible during the same scroll action.\n */\nexport class BatchCoordinator {\n private queue: QueuedQuery[] = []\n private flushScheduled = false\n private batchExecutor: (queries: CubeQuery[]) => Promise<CubeResultSet[]>\n private delayMs: number\n\n constructor(batchExecutor: (queries: CubeQuery[]) => Promise<CubeResultSet[]>, delayMs: number = 50) {\n this.batchExecutor = batchExecutor\n this.delayMs = delayMs\n }\n\n /**\n * Register a query to be batched. Returns a promise that resolves\n * when the batch is executed and this specific query's result is available.\n */\n public register(query: CubeQuery): Promise<CubeResultSet> {\n return new Promise<CubeResultSet>((resolve, reject) => {\n // Add query to queue\n this.queue.push({ query, resolve, reject })\n\n // Schedule flush if not already scheduled\n if (!this.flushScheduled) {\n this.scheduleFlush()\n }\n })\n }\n\n /**\n * Schedule a flush after a short delay to collect multiple queries.\n * The delay allows queries from lazy-loaded portlets that become visible\n * during the same scroll action to be batched together.\n */\n private scheduleFlush(): void {\n this.flushScheduled = true\n\n setTimeout(() => {\n this.flush()\n }, this.delayMs)\n }\n\n /**\n * Execute all queued queries as a batch and resolve individual promises\n */\n private async flush(): Promise<void> {\n // Reset state\n this.flushScheduled = false\n\n // Take current queue and clear it\n const currentQueue = this.queue.slice()\n this.queue = []\n\n if (currentQueue.length === 0) {\n return\n }\n\n try {\n // Extract queries\n const queries = currentQueue.map(item => item.query)\n\n // Execute batch\n const results = await this.batchExecutor(queries)\n\n // Resolve individual promises with their corresponding results\n currentQueue.forEach((item, index) => {\n const result = results[index]\n\n // Check if this specific query had an error\n if (result && 'error' in result && result.error) {\n item.reject(new Error(result.error as string))\n } else {\n item.resolve(result)\n }\n })\n } catch (error) {\n // If entire batch fails, reject all queries\n currentQueue.forEach(item => {\n item.reject(error instanceof Error ? error : new Error(String(error)))\n })\n }\n }\n\n /**\n * Get current queue size (useful for debugging)\n */\n public getQueueSize(): number {\n return this.queue.length\n }\n\n /**\n * Clear the queue (useful for testing/cleanup)\n */\n public clear(): void {\n this.queue = []\n this.flushScheduled = false\n }\n}\n","/**\n * CubeApiProvider - Stable API Context Layer\n *\n * Provides the CubeClient API instance that only changes on authentication updates.\n * Isolated from metadata and feature contexts to prevent unnecessary re-renders.\n */\n\nimport { createContext, useContext, useState, useMemo, useCallback, useEffect, type ReactNode } from 'react'\nimport { createCubeClient, type CubeClient } from '../client/CubeClient'\nimport type { CubeQueryOptions, CubeApiOptions } from '../types'\nimport { BatchCoordinator } from '../client/BatchCoordinator'\n\ninterface CubeApiContextValue {\n cubeApi: CubeClient\n options?: CubeQueryOptions\n apiOptions: CubeApiOptions\n updateApiConfig: (apiOptions: CubeApiOptions, token?: string) => void\n batchCoordinator: BatchCoordinator | null\n enableBatching: boolean\n}\n\nconst CubeApiContext = createContext<CubeApiContextValue | null>(null)\n\ninterface CubeApiProviderProps {\n apiOptions: CubeApiOptions\n token?: string\n options?: CubeQueryOptions\n enableBatching?: boolean\n batchDelayMs?: number\n children: ReactNode\n}\n\nexport function CubeApiProvider({\n apiOptions: initialApiOptions,\n token: initialToken,\n options = {},\n enableBatching = true,\n batchDelayMs = 50,\n children\n}: CubeApiProviderProps) {\n const baseConfig = useMemo(\n () => ({ apiOptions: initialApiOptions, token: initialToken }),\n [initialApiOptions, initialToken]\n )\n const [overrideConfig, setOverrideConfig] = useState<{\n apiOptions: CubeApiOptions\n token?: string\n } | null>(null)\n\n useEffect(() => {\n setOverrideConfig(null)\n }, [baseConfig])\n\n const config = overrideConfig ?? baseConfig\n\n // Create CubeClient - only recreates when config changes\n const cubeApi = useMemo(() =>\n createCubeClient(config.token, config.apiOptions),\n [config.apiOptions, config.token]\n )\n\n // Create BatchCoordinator - only recreates when cubeApi or batching config changes\n const batchCoordinator = useMemo(() => {\n if (!enableBatching) return null\n return new BatchCoordinator((queries) => cubeApi.batchLoad(queries), batchDelayMs)\n }, [enableBatching, cubeApi, batchDelayMs])\n\n // Stable callback for updating config\n const updateApiConfig = useCallback((newApiOptions: CubeApiOptions, newToken?: string) => {\n setOverrideConfig({ apiOptions: newApiOptions, token: newToken })\n }, [])\n\n // Memoize context value - only changes when cubeApi/options change\n const value = useMemo(() => ({\n cubeApi,\n options,\n apiOptions: config.apiOptions,\n updateApiConfig,\n batchCoordinator,\n enableBatching\n }), [cubeApi, options, config.apiOptions, updateApiConfig, batchCoordinator, enableBatching])\n\n return (\n <CubeApiContext.Provider value={value}>\n {children}\n </CubeApiContext.Provider>\n )\n}\n\nexport function useCubeApi() {\n const context = useContext(CubeApiContext)\n if (!context) {\n throw new Error('useCubeApi must be used within CubeApiProvider')\n }\n return context\n}\n","/**\n * useCubeMetaQuery - TanStack Query hook for cube metadata\n *\n * Replaces manual caching in useCubeMeta with TanStack Query's built-in\n * cache management. Provides:\n * - Automatic caching with configurable stale time\n * - Built-in loading and error states\n * - Automatic refetch on mount (if stale)\n * - Manual refetch capability\n *\n * This hook wraps the existing CubeClient.meta() method.\n */\n\nimport { useQuery, useQueryClient } from '@tanstack/react-query'\nimport { useCubeApi } from '../../providers/CubeApiProvider'\nimport type { CubeMeta, FieldLabelMap } from '../../types'\n\n// Query key for cube metadata\nexport const CUBE_META_QUERY_KEY = ['cube', 'meta'] as const\n\n/**\n * Build a field label map from cube metadata\n * Maps field names to their display titles\n */\nfunction buildLabelMap(meta: CubeMeta): FieldLabelMap {\n const labelMap: FieldLabelMap = {}\n\n meta.cubes.forEach((cube) => {\n // Add measures\n cube.measures.forEach((measure) => {\n labelMap[measure.name] = measure.title || measure.shortTitle || measure.name\n })\n\n // Add dimensions\n cube.dimensions.forEach((dimension) => {\n labelMap[dimension.name] = dimension.title || dimension.shortTitle || dimension.name\n })\n\n // Add segments\n cube.segments.forEach((segment) => {\n labelMap[segment.name] = segment.title || segment.shortTitle || segment.name\n })\n })\n\n return labelMap\n}\n\nexport interface UseCubeMetaQueryOptions {\n /**\n * Whether to skip the query (useful for conditional fetching)\n * @default false\n */\n enabled?: boolean\n /**\n * Stale time in milliseconds (how long before data is considered stale)\n * @default 5 * 60 * 1000 (5 minutes)\n */\n staleTime?: number\n}\n\nexport interface UseCubeMetaQueryResult {\n /** Cube metadata */\n meta: CubeMeta | null\n /** Field label map for quick lookups */\n labelMap: FieldLabelMap\n /** Whether the query is loading */\n isLoading: boolean\n /** Whether the query is fetching (includes background refetch) */\n isFetching: boolean\n /** Error if the query failed */\n error: Error | null\n /** Manually refetch the metadata */\n refetch: () => void\n /** Get a field's display label */\n getFieldLabel: (fieldName: string) => string\n}\n\n/**\n * TanStack Query hook for fetching cube metadata\n *\n * Usage:\n * ```tsx\n * const { meta, labelMap, isLoading, error, refetch } = useCubeMetaQuery()\n * ```\n */\nexport function useCubeMetaQuery(\n options: UseCubeMetaQueryOptions = {}\n): UseCubeMetaQueryResult {\n const { enabled = true, staleTime = 5 * 60 * 1000 } = options\n const { cubeApi } = useCubeApi()\n const queryClient = useQueryClient()\n\n const query = useQuery({\n queryKey: CUBE_META_QUERY_KEY,\n queryFn: async () => {\n const metaData = await cubeApi.meta()\n const labelMap = buildLabelMap(metaData)\n return { meta: metaData, labelMap }\n },\n enabled,\n staleTime,\n // Keep data in cache for 15 minutes after it becomes unused\n gcTime: 15 * 60 * 1000,\n })\n\n // Extract data from query result\n const meta = query.data?.meta ?? null\n const labelMap = query.data?.labelMap ?? {}\n\n // Stable refetch function\n const refetch = () => {\n queryClient.invalidateQueries({ queryKey: CUBE_META_QUERY_KEY })\n }\n\n // Stable getFieldLabel function\n const getFieldLabel = (fieldName: string): string => {\n return labelMap[fieldName] || fieldName\n }\n\n return {\n meta,\n labelMap,\n isLoading: query.isLoading,\n isFetching: query.isFetching,\n error: query.error,\n refetch,\n getFieldLabel,\n }\n}\n\n/**\n * Prefetch cube metadata - useful for eager loading\n *\n * Usage:\n * ```tsx\n * const queryClient = useQueryClient()\n * await prefetchCubeMeta(queryClient, cubeApi)\n * ```\n */\nexport async function prefetchCubeMeta(\n queryClient: ReturnType<typeof useQueryClient>,\n cubeApi: ReturnType<typeof useCubeApi>['cubeApi']\n): Promise<void> {\n await queryClient.prefetchQuery({\n queryKey: CUBE_META_QUERY_KEY,\n queryFn: async () => {\n const metaData = await cubeApi.meta()\n const labelMap = buildLabelMap(metaData)\n return { meta: metaData, labelMap }\n },\n })\n}\n","/**\n * Dashboard Thumbnail Capture Utility\n *\n * Provides optional screenshot functionality for dashboard thumbnails.\n * Requires modern-screenshot as an optional peer dependency.\n *\n * Usage:\n * 1. Install the optional dependency: npm install modern-screenshot\n * 2. Enable in CubeProvider: features={{ thumbnail: { enabled: true } }}\n * 3. Thumbnails are automatically captured on dashboard save\n */\n\nimport type { RefObject } from 'react'\nimport type { ThumbnailFeatureConfig } from '../types'\n\n// Type definition for modern-screenshot (optional dependency)\ntype ModernScreenshotModule = {\n domToPng: (element: HTMLElement, options?: Record<string, unknown>) => Promise<string>\n domToJpeg: (element: HTMLElement, options?: Record<string, unknown>) => Promise<string>\n}\n\n// Cache the import result to avoid repeated dynamic imports\nlet screenshotModule: ModernScreenshotModule | null = null\nlet moduleChecked = false\n\n/**\n * Resize an image to the specified dimensions while maintaining quality.\n * This takes a high-resolution source and scales it down to target dimensions,\n * which produces better results than capturing at low resolution directly.\n *\n * Uses Canvas imageSmoothingQuality for best downscaling results.\n */\nfunction resizeImage(\n dataUri: string,\n targetWidth: number,\n targetHeight: number,\n format: 'png' | 'jpeg',\n quality: number\n): Promise<string> {\n return new Promise((resolve, reject) => {\n const img = new Image()\n img.onload = () => {\n const canvas = document.createElement('canvas')\n canvas.width = targetWidth\n canvas.height = targetHeight\n\n const ctx = canvas.getContext('2d')\n if (!ctx) {\n reject(new Error('Failed to get canvas context'))\n return\n }\n\n // Enable high-quality image smoothing for downscaling\n ctx.imageSmoothingEnabled = true\n ctx.imageSmoothingQuality = 'high'\n\n // Calculate aspect-ratio-preserving dimensions\n const sourceAspect = img.width / img.height\n const targetAspect = targetWidth / targetHeight\n\n let sourceX = 0\n let sourceY = 0\n let sourceWidth = img.width\n let sourceHeight = img.height\n\n // Crop source to match target aspect ratio (center crop)\n if (sourceAspect > targetAspect) {\n // Source is wider - crop horizontally\n sourceWidth = img.height * targetAspect\n sourceX = (img.width - sourceWidth) / 2\n } else if (sourceAspect < targetAspect) {\n // Source is taller - crop vertically (take from top)\n sourceHeight = img.width / targetAspect\n // Don't center - take from top for dashboard previews\n sourceY = 0\n }\n\n // Draw the scaled and cropped image\n ctx.drawImage(\n img,\n sourceX, sourceY, sourceWidth, sourceHeight, // Source region\n 0, 0, targetWidth, targetHeight // Destination (full canvas)\n )\n\n const mimeType = format === 'jpeg' ? 'image/jpeg' : 'image/png'\n resolve(canvas.toDataURL(mimeType, quality))\n }\n img.onerror = () => reject(new Error('Failed to load image for resizing'))\n img.src = dataUri\n })\n}\n\n/**\n * Check if modern-screenshot is available (installed as peer dependency)\n */\nasync function getScreenshotModule(): Promise<ModernScreenshotModule | null> {\n if (moduleChecked) {\n return screenshotModule\n }\n\n try {\n // Dynamic import - modern-screenshot is an optional peer dependency\n // @ts-ignore - modern-screenshot may not be installed\n screenshotModule = await import('modern-screenshot') as ModernScreenshotModule\n moduleChecked = true\n return screenshotModule\n } catch {\n moduleChecked = true\n screenshotModule = null\n return null\n }\n}\n\n// Extend Window interface for our warning flag\ndeclare global {\n interface Window {\n __drizzle_cube_thumbnail_warning__?: boolean\n }\n}\n\n/**\n * Log a development-mode warning when thumbnail feature is enabled but modern-screenshot is missing\n */\nexport function warnIfScreenshotLibMissing(thumbnailConfig: ThumbnailFeatureConfig | undefined): void {\n if (typeof window === 'undefined') return\n if (!thumbnailConfig?.enabled) return\n\n // Only warn once per session\n if (window.__drizzle_cube_thumbnail_warning__) return\n\n getScreenshotModule().then((mod) => {\n if (!mod && typeof process !== 'undefined' && process.env?.NODE_ENV === 'development') {\n console.warn(\n '[drizzle-cube] Thumbnail feature enabled but modern-screenshot not installed. ' +\n 'Run: npm install modern-screenshot'\n )\n window.__drizzle_cube_thumbnail_warning__ = true\n }\n })\n}\n\n/**\n * Capture a thumbnail of the dashboard element\n *\n * @param elementRef - React ref to the dashboard container element\n * @param config - Thumbnail configuration (dimensions, format, quality)\n * @returns Base64 data URI of the thumbnail, or null if capture failed\n */\nexport async function captureThumbnail(\n elementRef: RefObject<HTMLElement | null>,\n config: ThumbnailFeatureConfig\n): Promise<string | null> {\n // Check if we're in a browser environment\n if (typeof window === 'undefined') {\n return null\n }\n\n // Check if the element ref is valid\n if (!elementRef.current) {\n return null\n }\n\n // Try to load modern-screenshot\n const screenshot = await getScreenshotModule()\n if (!screenshot) {\n return null\n }\n\n try {\n // Higher default dimensions for crisp thumbnails on retina displays\n // 1600x1200 provides good quality while keeping file size reasonable\n const targetWidth = config.width ?? 1600\n const targetHeight = config.height ?? 1200\n const format = config.format ?? 'png'\n const quality = config.quality ?? 0.95 // Higher default quality\n\n const element = elementRef.current\n\n // Always capture at 2x scale for high quality (like copy-to-clipboard)\n // This produces a sharp image that we then resize down\n const captureScale = 2\n\n // Get theme-aware background color (walks DOM tree to find effective bg)\n const backgroundColor = getEffectiveBackgroundColor(element)\n\n // Capture at high resolution with proper background\n const fullDataUri = await screenshot.domToPng(element, {\n scale: captureScale,\n backgroundColor,\n })\n\n // Resize to target dimensions (high-quality downscaling)\n const resizedDataUri = await resizeImage(\n fullDataUri,\n targetWidth,\n targetHeight,\n format,\n quality\n )\n\n return resizedDataUri\n } catch (error) {\n console.error('[drizzle-cube] Failed to capture thumbnail:', error)\n return null\n }\n}\n\n/**\n * Check if thumbnail capture is available and enabled\n */\nexport async function isThumbnailCaptureAvailable(\n config: ThumbnailFeatureConfig | undefined\n): Promise<boolean> {\n if (!config?.enabled) {\n return false\n }\n\n if (typeof window === 'undefined') {\n return false\n }\n\n const screenshot = await getScreenshotModule()\n return screenshot !== null\n}\n\n/**\n * Check if portlet screenshot-to-clipboard is available.\n * Requires both modern-screenshot AND Clipboard API with image support.\n */\nexport async function isPortletCopyAvailable(): Promise<boolean> {\n // Check if we're in browser environment\n if (typeof window === 'undefined') {\n return false\n }\n\n // Check modern-screenshot is installed\n const screenshot = await getScreenshotModule()\n if (!screenshot) {\n return false\n }\n\n // Check Clipboard API supports writing images (ClipboardItem with image/png blob)\n return (\n typeof ClipboardItem !== 'undefined' &&\n typeof navigator?.clipboard?.write === 'function'\n )\n}\n\n/**\n * Check if a background color is transparent or effectively invisible\n */\nfunction isTransparentBackground(color: string): boolean {\n if (!color || color === 'transparent' || color === 'rgba(0, 0, 0, 0)') {\n return true\n }\n // Check for rgba with 0 alpha\n const rgbaMatch = color.match(/rgba\\(\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*([\\d.]+)\\s*\\)/)\n if (rgbaMatch && parseFloat(rgbaMatch[1]) === 0) {\n return true\n }\n return false\n}\n\n/**\n * Find the effective background color by walking up the DOM tree\n */\nfunction getEffectiveBackgroundColor(element: HTMLElement): string {\n let current: HTMLElement | null = element\n\n while (current) {\n const bg = getComputedStyle(current).backgroundColor\n if (!isTransparentBackground(bg)) {\n return bg\n }\n current = current.parentElement\n }\n\n // Fallback to theme variable or white\n const themeColor = getComputedStyle(document.documentElement)\n .getPropertyValue('--dc-surface')\n .trim()\n\n return themeColor || '#ffffff'\n}\n\n/**\n * Capture a portlet element and copy to clipboard as PNG.\n * Returns true on success, false on failure.\n *\n * @param element - The HTML element to capture\n * @returns Promise<boolean> - true if successfully copied to clipboard\n */\nexport async function copyPortletToClipboard(element: HTMLElement): Promise<boolean> {\n try {\n const screenshot = await getScreenshotModule()\n if (!screenshot) {\n console.warn('[drizzle-cube] Cannot copy portlet: modern-screenshot not available')\n return false\n }\n\n // Get theme-aware background color by walking up the DOM tree\n const backgroundColor = getEffectiveBackgroundColor(element)\n\n // Capture as PNG data URL at 2x scale for retina quality\n const dataUrl = await screenshot.domToPng(element, {\n scale: 2,\n backgroundColor,\n })\n\n // Convert data URL to blob\n const response = await fetch(dataUrl)\n const blob = await response.blob()\n\n // Write to clipboard\n await navigator.clipboard.write([new ClipboardItem({ 'image/png': blob })])\n\n return true\n } catch (error) {\n console.warn('[drizzle-cube] Failed to copy portlet to clipboard:', error)\n return false\n }\n}\n","/**\n * CubeFeaturesProvider - Feature Flags Context Layer\n *\n * Provides feature configuration isolated from API and metadata layers.\n * This prevents components from re-rendering when feature flags change\n * if they don't use features.\n */\n\nimport { createContext, useContext, useState, useMemo, useCallback, useEffect, type ReactNode } from 'react'\nimport type { FeaturesConfig, DashboardLayoutMode } from '../types'\nimport { warnIfScreenshotLibMissing } from '../utils/thumbnail'\n\ninterface CubeFeaturesContextValue {\n features: FeaturesConfig\n dashboardModes: DashboardLayoutMode[]\n updateFeatures: (newFeatures: Partial<FeaturesConfig>) => void\n}\n\nconst CubeFeaturesContext = createContext<CubeFeaturesContextValue | null>(null)\n\ninterface CubeFeaturesProviderProps {\n features?: FeaturesConfig\n dashboardModes?: DashboardLayoutMode[]\n children: ReactNode\n}\n\nconst DEFAULT_FEATURES: FeaturesConfig = {\n enableAI: true,\n aiEndpoint: '/api/ai/generate',\n showSchemaDiagram: false,\n useAnalysisBuilder: false,\n editToolbar: 'both',\n floatingToolbarPosition: 'right'\n}\n\nexport function CubeFeaturesProvider({\n features: initialFeatures,\n dashboardModes = ['rows', 'grid'],\n children\n}: CubeFeaturesProviderProps) {\n // Merge passed features with defaults so new features get default values\n const [features, setFeatures] = useState<FeaturesConfig>(() => ({\n ...DEFAULT_FEATURES,\n ...initialFeatures\n }))\n\n // Warn in development if thumbnail feature is enabled but modern-screenshot is not installed\n useEffect(() => {\n warnIfScreenshotLibMissing(features.thumbnail)\n }, [features.thumbnail])\n\n const updateFeatures = useCallback((newFeatures: Partial<FeaturesConfig>) => {\n setFeatures(prev => ({ ...prev, ...newFeatures }))\n }, [])\n\n const value = useMemo(() => ({\n features,\n dashboardModes,\n updateFeatures\n }), [features, dashboardModes, updateFeatures])\n\n return (\n <CubeFeaturesContext.Provider value={value}>\n {children}\n </CubeFeaturesContext.Provider>\n )\n}\n\n// Default context value when used outside provider (safe fallback for hooks)\nconst DEFAULT_CONTEXT: CubeFeaturesContextValue = {\n features: DEFAULT_FEATURES,\n dashboardModes: ['rows', 'grid'],\n updateFeatures: () => {\n // No-op when used outside provider\n }\n}\n\n/**\n * Hook to access cube features context.\n * Returns default values if used outside CubeFeaturesProvider (graceful fallback).\n */\nexport function useCubeFeatures() {\n const context = useContext(CubeFeaturesContext)\n // Return default context if not within provider (allows hooks like useCubeLoadQuery to work in isolation)\n return context ?? DEFAULT_CONTEXT\n}\n","'use client';\n\nimport { createElement, forwardRef, useState, useEffect } from 'react';\n\n/**\n* Resolve icon set icons\n*\n* Returns parent icon for each icon\n*/\nfunction getIconsTree(data, names) {\n\tconst icons = data.icons;\n\tconst aliases = data.aliases || Object.create(null);\n\tconst resolved = Object.create(null);\n\tfunction resolve(name) {\n\t\tif (icons[name]) return resolved[name] = [];\n\t\tif (!(name in resolved)) {\n\t\t\tresolved[name] = null;\n\t\t\tconst parent = aliases[name] && aliases[name].parent;\n\t\t\tconst value = parent && resolve(parent);\n\t\t\tif (value) resolved[name] = [parent].concat(value);\n\t\t}\n\t\treturn resolved[name];\n\t}\n\t(Object.keys(icons).concat(Object.keys(aliases))).forEach(resolve);\n\treturn resolved;\n}\n\n/**\n* Default values for dimensions\n*/\nconst defaultIconDimensions = Object.freeze({\n\tleft: 0,\n\ttop: 0,\n\twidth: 16,\n\theight: 16\n});\n/**\n* Default values for transformations\n*/\nconst defaultIconTransformations = Object.freeze({\n\trotate: 0,\n\tvFlip: false,\n\thFlip: false\n});\n/**\n* Default values for all optional IconifyIcon properties\n*/\nconst defaultIconProps = Object.freeze({\n\t...defaultIconDimensions,\n\t...defaultIconTransformations\n});\n/**\n* Default values for all properties used in ExtendedIconifyIcon\n*/\nconst defaultExtendedIconProps = Object.freeze({\n\t...defaultIconProps,\n\tbody: \"\",\n\thidden: false\n});\n\n/**\n* Merge transformations\n*/\nfunction mergeIconTransformations(obj1, obj2) {\n\tconst result = {};\n\tif (!obj1.hFlip !== !obj2.hFlip) result.hFlip = true;\n\tif (!obj1.vFlip !== !obj2.vFlip) result.vFlip = true;\n\tconst rotate = ((obj1.rotate || 0) + (obj2.rotate || 0)) % 4;\n\tif (rotate) result.rotate = rotate;\n\treturn result;\n}\n\n/**\n* Merge icon and alias\n*\n* Can also be used to merge default values and icon\n*/\nfunction mergeIconData(parent, child) {\n\tconst result = mergeIconTransformations(parent, child);\n\tfor (const key in defaultExtendedIconProps) if (key in defaultIconTransformations) {\n\t\tif (key in parent && !(key in result)) result[key] = defaultIconTransformations[key];\n\t} else if (key in child) result[key] = child[key];\n\telse if (key in parent) result[key] = parent[key];\n\treturn result;\n}\n\n/**\n* Get icon data, using prepared aliases tree\n*/\nfunction internalGetIconData(data, name, tree) {\n\tconst icons = data.icons;\n\tconst aliases = data.aliases || Object.create(null);\n\tlet currentProps = {};\n\tfunction parse(name$1) {\n\t\tcurrentProps = mergeIconData(icons[name$1] || aliases[name$1], currentProps);\n\t}\n\tparse(name);\n\ttree.forEach(parse);\n\treturn mergeIconData(data, currentProps);\n}\n\n/**\n* Extract icons from an icon set\n*\n* Returns list of icons that were found in icon set\n*/\nfunction parseIconSet(data, callback) {\n\tconst names = [];\n\tif (typeof data !== \"object\" || typeof data.icons !== \"object\") return names;\n\tif (data.not_found instanceof Array) data.not_found.forEach((name) => {\n\t\tcallback(name, null);\n\t\tnames.push(name);\n\t});\n\tconst tree = getIconsTree(data);\n\tfor (const name in tree) {\n\t\tconst item = tree[name];\n\t\tif (item) {\n\t\t\tcallback(name, internalGetIconData(data, name, item));\n\t\t\tnames.push(name);\n\t\t}\n\t}\n\treturn names;\n}\n\n/**\n* Optional properties\n*/\nconst optionalPropertyDefaults = {\n\tprovider: \"\",\n\taliases: {},\n\tnot_found: {},\n\t...defaultIconDimensions\n};\n/**\n* Check props\n*/\nfunction checkOptionalProps(item, defaults) {\n\tfor (const prop in defaults) if (prop in item && typeof item[prop] !== typeof defaults[prop]) return false;\n\treturn true;\n}\n/**\n* Validate icon set, return it as IconifyJSON on success, null on failure\n*\n* Unlike validateIconSet(), this function is very basic.\n* It does not throw exceptions, it does not check metadata, it does not fix stuff.\n*/\nfunction quicklyValidateIconSet(obj) {\n\tif (typeof obj !== \"object\" || obj === null) return null;\n\tconst data = obj;\n\tif (typeof data.prefix !== \"string\" || !obj.icons || typeof obj.icons !== \"object\") return null;\n\tif (!checkOptionalProps(obj, optionalPropertyDefaults)) return null;\n\tconst icons = data.icons;\n\tfor (const name in icons) {\n\t\tconst icon = icons[name];\n\t\tif (!name || typeof icon.body !== \"string\" || !checkOptionalProps(icon, defaultExtendedIconProps)) return null;\n\t}\n\tconst aliases = data.aliases || Object.create(null);\n\tfor (const name in aliases) {\n\t\tconst icon = aliases[name];\n\t\tconst parent = icon.parent;\n\t\tif (!name || typeof parent !== \"string\" || !icons[parent] && !aliases[parent] || !checkOptionalProps(icon, defaultExtendedIconProps)) return null;\n\t}\n\treturn data;\n}\n\n/**\n* Storage by provider and prefix\n*/\nconst dataStorage = Object.create(null);\n/**\n* Create new storage\n*/\nfunction newStorage(provider, prefix) {\n\treturn {\n\t\tprovider,\n\t\tprefix,\n\t\ticons: Object.create(null),\n\t\tmissing: /* @__PURE__ */ new Set()\n\t};\n}\n/**\n* Get storage for provider and prefix\n*/\nfunction getStorage(provider, prefix) {\n\tconst providerStorage = dataStorage[provider] || (dataStorage[provider] = Object.create(null));\n\treturn providerStorage[prefix] || (providerStorage[prefix] = newStorage(provider, prefix));\n}\n/**\n* Add icon set to storage\n*\n* Returns array of added icons\n*/\nfunction addIconSet(storage, data) {\n\tif (!quicklyValidateIconSet(data)) return [];\n\treturn parseIconSet(data, (name, icon) => {\n\t\tif (icon) storage.icons[name] = icon;\n\t\telse storage.missing.add(name);\n\t});\n}\n/**\n* Add icon to storage\n*/\nfunction addIconToStorage(storage, name, icon) {\n\ttry {\n\t\tif (typeof icon.body === \"string\") {\n\t\t\tstorage.icons[name] = { ...icon };\n\t\t\treturn true;\n\t\t}\n\t} catch (err) {}\n\treturn false;\n}\n/**\n* List available icons\n*/\nfunction listIcons(provider, prefix) {\n\tlet allIcons = [];\n\tconst providers = typeof provider === \"string\" ? [provider] : Object.keys(dataStorage);\n\tproviders.forEach((provider$1) => {\n\t\tconst prefixes = typeof provider$1 === \"string\" && typeof prefix === \"string\" ? [prefix] : Object.keys(dataStorage[provider$1] || {});\n\t\tprefixes.forEach((prefix$1) => {\n\t\t\tconst storage = getStorage(provider$1, prefix$1);\n\t\t\tallIcons = allIcons.concat(Object.keys(storage.icons).map((name) => (provider$1 !== \"\" ? \"@\" + provider$1 + \":\" : \"\") + prefix$1 + \":\" + name));\n\t\t});\n\t});\n\treturn allIcons;\n}\n\n/**\n* Expression to test part of icon name.\n*\n* Used when loading icons from Iconify API due to project naming convension.\n* Ignored when using custom icon sets - convension does not apply.\n*/\nconst matchIconName = /^[a-z0-9]+(-[a-z0-9]+)*$/;\n/**\n* Convert string icon name to IconifyIconName object.\n*/\nconst stringToIcon = (value, validate, allowSimpleName, provider = \"\") => {\n\tconst colonSeparated = value.split(\":\");\n\tif (value.slice(0, 1) === \"@\") {\n\t\tif (colonSeparated.length < 2 || colonSeparated.length > 3) return null;\n\t\tprovider = colonSeparated.shift().slice(1);\n\t}\n\tif (colonSeparated.length > 3 || !colonSeparated.length) return null;\n\tif (colonSeparated.length > 1) {\n\t\tconst name$1 = colonSeparated.pop();\n\t\tconst prefix = colonSeparated.pop();\n\t\tconst result = {\n\t\t\tprovider: colonSeparated.length > 0 ? colonSeparated[0] : provider,\n\t\t\tprefix,\n\t\t\tname: name$1\n\t\t};\n\t\treturn validate && !validateIconName(result) ? null : result;\n\t}\n\tconst name = colonSeparated[0];\n\tconst dashSeparated = name.split(\"-\");\n\tif (dashSeparated.length > 1) {\n\t\tconst result = {\n\t\t\tprovider,\n\t\t\tprefix: dashSeparated.shift(),\n\t\t\tname: dashSeparated.join(\"-\")\n\t\t};\n\t\treturn validate && !validateIconName(result) ? null : result;\n\t}\n\tif (allowSimpleName && provider === \"\") {\n\t\tconst result = {\n\t\t\tprovider,\n\t\t\tprefix: \"\",\n\t\t\tname\n\t\t};\n\t\treturn validate && !validateIconName(result, allowSimpleName) ? null : result;\n\t}\n\treturn null;\n};\n/**\n* Check if icon is valid.\n*\n* This function is not part of stringToIcon because validation is not needed for most code.\n*/\nconst validateIconName = (icon, allowSimpleName) => {\n\tif (!icon) return false;\n\treturn !!((allowSimpleName && icon.prefix === \"\" || !!icon.prefix) && !!icon.name);\n};\n\n/**\n* Allow storing icons without provider or prefix, making it possible to store icons like \"home\"\n*/\nlet simpleNames = false;\nfunction allowSimpleNames(allow) {\n\tif (typeof allow === \"boolean\") simpleNames = allow;\n\treturn simpleNames;\n}\n/**\n* Get icon data\n*\n* Returns:\n* - IconifyIcon on success, object directly from storage so don't modify it\n* - null if icon is marked as missing (returned in `not_found` property from API, so don't bother sending API requests)\n* - undefined if icon is missing in storage\n*/\nfunction getIconData(name) {\n\tconst icon = typeof name === \"string\" ? stringToIcon(name, true, simpleNames) : name;\n\tif (icon) {\n\t\tconst storage = getStorage(icon.provider, icon.prefix);\n\t\tconst iconName = icon.name;\n\t\treturn storage.icons[iconName] || (storage.missing.has(iconName) ? null : void 0);\n\t}\n}\n/**\n* Add one icon\n*/\nfunction addIcon(name, data) {\n\tconst icon = stringToIcon(name, true, simpleNames);\n\tif (!icon) return false;\n\tconst storage = getStorage(icon.provider, icon.prefix);\n\tif (data) return addIconToStorage(storage, icon.name, data);\n\telse {\n\t\tstorage.missing.add(icon.name);\n\t\treturn true;\n\t}\n}\n/**\n* Add icon set\n*/\nfunction addCollection(data, provider) {\n\tif (typeof data !== \"object\") return false;\n\tif (typeof provider !== \"string\") provider = data.provider || \"\";\n\tif (simpleNames && !provider && !data.prefix) {\n\t\tlet added = false;\n\t\tif (quicklyValidateIconSet(data)) {\n\t\t\tdata.prefix = \"\";\n\t\t\tparseIconSet(data, (name, icon) => {\n\t\t\t\tif (addIcon(name, icon)) added = true;\n\t\t\t});\n\t\t}\n\t\treturn added;\n\t}\n\tconst prefix = data.prefix;\n\tif (!validateIconName({\n\t\tprefix,\n\t\tname: \"a\"\n\t})) return false;\n\tconst storage = getStorage(provider, prefix);\n\treturn !!addIconSet(storage, data);\n}\n/**\n* Check if icon data is available\n*/\nfunction iconLoaded(name) {\n\treturn !!getIconData(name);\n}\n/**\n* Get full icon\n*/\nfunction getIcon(name) {\n\tconst result = getIconData(name);\n\treturn result ? {\n\t\t...defaultIconProps,\n\t\t...result\n\t} : result;\n}\n\n/**\n* Default icon customisations values\n*/\nconst defaultIconSizeCustomisations = Object.freeze({\n\twidth: null,\n\theight: null\n});\nconst defaultIconCustomisations = Object.freeze({\n\t...defaultIconSizeCustomisations,\n\t...defaultIconTransformations\n});\n\n/**\n* Regular expressions for calculating dimensions\n*/\nconst unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g;\nconst unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g;\nfunction calculateSize(size, ratio, precision) {\n\tif (ratio === 1) return size;\n\tprecision = precision || 100;\n\tif (typeof size === \"number\") return Math.ceil(size * ratio * precision) / precision;\n\tif (typeof size !== \"string\") return size;\n\tconst oldParts = size.split(unitsSplit);\n\tif (oldParts === null || !oldParts.length) return size;\n\tconst newParts = [];\n\tlet code = oldParts.shift();\n\tlet isNumber = unitsTest.test(code);\n\twhile (true) {\n\t\tif (isNumber) {\n\t\t\tconst num = parseFloat(code);\n\t\t\tif (isNaN(num)) newParts.push(code);\n\t\t\telse newParts.push(Math.ceil(num * ratio * precision) / precision);\n\t\t} else newParts.push(code);\n\t\tcode = oldParts.shift();\n\t\tif (code === void 0) return newParts.join(\"\");\n\t\tisNumber = !isNumber;\n\t}\n}\n\nfunction splitSVGDefs(content, tag = \"defs\") {\n\tlet defs = \"\";\n\tconst index = content.indexOf(\"<\" + tag);\n\twhile (index >= 0) {\n\t\tconst start = content.indexOf(\">\", index);\n\t\tconst end = content.indexOf(\"</\" + tag);\n\t\tif (start === -1 || end === -1) break;\n\t\tconst endEnd = content.indexOf(\">\", end);\n\t\tif (endEnd === -1) break;\n\t\tdefs += content.slice(start + 1, end).trim();\n\t\tcontent = content.slice(0, index).trim() + content.slice(endEnd + 1);\n\t}\n\treturn {\n\t\tdefs,\n\t\tcontent\n\t};\n}\n/**\n* Merge defs and content\n*/\nfunction mergeDefsAndContent(defs, content) {\n\treturn defs ? \"<defs>\" + defs + \"</defs>\" + content : content;\n}\n/**\n* Wrap SVG content, without wrapping definitions\n*/\nfunction wrapSVGContent(body, start, end) {\n\tconst split = splitSVGDefs(body);\n\treturn mergeDefsAndContent(split.defs, start + split.content + end);\n}\n\n/**\n* Check if value should be unset. Allows multiple keywords\n*/\nconst isUnsetKeyword = (value) => value === \"unset\" || value === \"undefined\" || value === \"none\";\n/**\n* Get SVG attributes and content from icon + customisations\n*\n* Does not generate style to make it compatible with frameworks that use objects for style, such as React.\n* Instead, it generates 'inline' value. If true, rendering engine should add verticalAlign: -0.125em to icon.\n*\n* Customisations should be normalised by platform specific parser.\n* Result should be converted to <svg> by platform specific parser.\n* Use replaceIDs to generate unique IDs for body.\n*/\nfunction iconToSVG(icon, customisations) {\n\tconst fullIcon = {\n\t\t...defaultIconProps,\n\t\t...icon\n\t};\n\tconst fullCustomisations = {\n\t\t...defaultIconCustomisations,\n\t\t...customisations\n\t};\n\tconst box = {\n\t\tleft: fullIcon.left,\n\t\ttop: fullIcon.top,\n\t\twidth: fullIcon.width,\n\t\theight: fullIcon.height\n\t};\n\tlet body = fullIcon.body;\n\t[fullIcon, fullCustomisations].forEach((props) => {\n\t\tconst transformations = [];\n\t\tconst hFlip = props.hFlip;\n\t\tconst vFlip = props.vFlip;\n\t\tlet rotation = props.rotate;\n\t\tif (hFlip) if (vFlip) rotation += 2;\n\t\telse {\n\t\t\ttransformations.push(\"translate(\" + (box.width + box.left).toString() + \" \" + (0 - box.top).toString() + \")\");\n\t\t\ttransformations.push(\"scale(-1 1)\");\n\t\t\tbox.top = box.left = 0;\n\t\t}\n\t\telse if (vFlip) {\n\t\t\ttransformations.push(\"translate(\" + (0 - box.left).toString() + \" \" + (box.height + box.top).toString() + \")\");\n\t\t\ttransformations.push(\"scale(1 -1)\");\n\t\t\tbox.top = box.left = 0;\n\t\t}\n\t\tlet tempValue;\n\t\tif (rotation < 0) rotation -= Math.floor(rotation / 4) * 4;\n\t\trotation = rotation % 4;\n\t\tswitch (rotation) {\n\t\t\tcase 1:\n\t\t\t\ttempValue = box.height / 2 + box.top;\n\t\t\t\ttransformations.unshift(\"rotate(90 \" + tempValue.toString() + \" \" + tempValue.toString() + \")\");\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\ttransformations.unshift(\"rotate(180 \" + (box.width / 2 + box.left).toString() + \" \" + (box.height / 2 + box.top).toString() + \")\");\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\ttempValue = box.width / 2 + box.left;\n\t\t\t\ttransformations.unshift(\"rotate(-90 \" + tempValue.toString() + \" \" + tempValue.toString() + \")\");\n\t\t\t\tbreak;\n\t\t}\n\t\tif (rotation % 2 === 1) {\n\t\t\tif (box.left !== box.top) {\n\t\t\t\ttempValue = box.left;\n\t\t\t\tbox.left = box.top;\n\t\t\t\tbox.top = tempValue;\n\t\t\t}\n\t\t\tif (box.width !== box.height) {\n\t\t\t\ttempValue = box.width;\n\t\t\t\tbox.width = box.height;\n\t\t\t\tbox.height = tempValue;\n\t\t\t}\n\t\t}\n\t\tif (transformations.length) body = wrapSVGContent(body, \"<g transform=\\\"\" + transformations.join(\" \") + \"\\\">\", \"</g>\");\n\t});\n\tconst customisationsWidth = fullCustomisations.width;\n\tconst customisationsHeight = fullCustomisations.height;\n\tconst boxWidth = box.width;\n\tconst boxHeight = box.height;\n\tlet width;\n\tlet height;\n\tif (customisationsWidth === null) {\n\t\theight = customisationsHeight === null ? \"1em\" : customisationsHeight === \"auto\" ? boxHeight : customisationsHeight;\n\t\twidth = calculateSize(height, boxWidth / boxHeight);\n\t} else {\n\t\twidth = customisationsWidth === \"auto\" ? boxWidth : customisationsWidth;\n\t\theight = customisationsHeight === null ? calculateSize(width, boxHeight / boxWidth) : customisationsHeight === \"auto\" ? boxHeight : customisationsHeight;\n\t}\n\tconst attributes = {};\n\tconst setAttr = (prop, value) => {\n\t\tif (!isUnsetKeyword(value)) attributes[prop] = value.toString();\n\t};\n\tsetAttr(\"width\", width);\n\tsetAttr(\"height\", height);\n\tconst viewBox = [\n\t\tbox.left,\n\t\tbox.top,\n\t\tboxWidth,\n\t\tboxHeight\n\t];\n\tattributes.viewBox = viewBox.join(\" \");\n\treturn {\n\t\tattributes,\n\t\tviewBox,\n\t\tbody\n\t};\n}\n\n/**\n* IDs usage:\n*\n* id=\"{id}\"\n* xlink:href=\"#{id}\"\n* url(#{id})\n*\n* From SVG animations:\n*\n* begin=\"0;{id}.end\"\n* begin=\"{id}.end\"\n* begin=\"{id}.click\"\n*/\n/**\n* Regular expression for finding ids\n*/\nconst regex = /\\sid=\"(\\S+)\"/g;\n/**\n* New random-ish prefix for ids\n*\n* Do not use dash, it cannot be used in SVG 2 animations\n*/\nconst randomPrefix = \"IconifyId\" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);\n/**\n* Counter for ids, increasing with every replacement\n*/\nlet counter = 0;\n/**\n* Replace IDs in SVG output with unique IDs\n*/\nfunction replaceIDs(body, prefix = randomPrefix) {\n\tconst ids = [];\n\tlet match;\n\twhile (match = regex.exec(body)) ids.push(match[1]);\n\tif (!ids.length) return body;\n\tconst suffix = \"suffix\" + (Math.random() * 16777216 | Date.now()).toString(16);\n\tids.forEach((id) => {\n\t\tconst newID = typeof prefix === \"function\" ? prefix(id) : prefix + (counter++).toString();\n\t\tconst escapedID = id.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n\t\tbody = body.replace(new RegExp(\"([#;\\\"])(\" + escapedID + \")([\\\")]|\\\\.[a-z])\", \"g\"), \"$1\" + newID + suffix + \"$3\");\n\t});\n\tbody = body.replace(new RegExp(suffix, \"g\"), \"\");\n\treturn body;\n}\n\n/**\n* Local storate types and entries\n*/\nconst storage = Object.create(null);\n/**\n* Set API module\n*/\nfunction setAPIModule(provider, item) {\n\tstorage[provider] = item;\n}\n/**\n* Get API module\n*/\nfunction getAPIModule(provider) {\n\treturn storage[provider] || storage[\"\"];\n}\n\n/**\n* Create full API configuration from partial data\n*/\nfunction createAPIConfig(source) {\n\tlet resources;\n\tif (typeof source.resources === \"string\") resources = [source.resources];\n\telse {\n\t\tresources = source.resources;\n\t\tif (!(resources instanceof Array) || !resources.length) return null;\n\t}\n\tconst result = {\n\t\tresources,\n\t\tpath: source.path || \"/\",\n\t\tmaxURL: source.maxURL || 500,\n\t\trotate: source.rotate || 750,\n\t\ttimeout: source.timeout || 5e3,\n\t\trandom: source.random === true,\n\t\tindex: source.index || 0,\n\t\tdataAfterTimeout: source.dataAfterTimeout !== false\n\t};\n\treturn result;\n}\n/**\n* Local storage\n*/\nconst configStorage = Object.create(null);\n/**\n* Redundancy for API servers.\n*\n* API should have very high uptime because of implemented redundancy at server level, but\n* sometimes bad things happen. On internet 100% uptime is not possible.\n*\n* There could be routing problems. Server might go down for whatever reason, but it takes\n* few minutes to detect that downtime, so during those few minutes API might not be accessible.\n*\n* This script has some redundancy to mitigate possible network issues.\n*\n* If one host cannot be reached in 'rotate' (750 by default) ms, script will try to retrieve\n* data from different host. Hosts have different configurations, pointing to different\n* API servers hosted at different providers.\n*/\nconst fallBackAPISources = [\"https://api.simplesvg.com\", \"https://api.unisvg.com\"];\nconst fallBackAPI = [];\nwhile (fallBackAPISources.length > 0) if (fallBackAPISources.length === 1) fallBackAPI.push(fallBackAPISources.shift());\nelse if (Math.random() > .5) fallBackAPI.push(fallBackAPISources.shift());\nelse fallBackAPI.push(fallBackAPISources.pop());\nconfigStorage[\"\"] = createAPIConfig({ resources: [\"https://api.iconify.design\"].concat(fallBackAPI) });\n/**\n* Add custom config for provider\n*/\nfunction addAPIProvider(provider, customConfig) {\n\tconst config = createAPIConfig(customConfig);\n\tif (config === null) return false;\n\tconfigStorage[provider] = config;\n\treturn true;\n}\n/**\n* Get API configuration\n*/\nfunction getAPIConfig(provider) {\n\treturn configStorage[provider];\n}\n/**\n* List API providers\n*/\nfunction listAPIProviders() {\n\treturn Object.keys(configStorage);\n}\n\nconst detectFetch = () => {\n\tlet callback;\n\ttry {\n\t\tcallback = fetch;\n\t\tif (typeof callback === \"function\") return callback;\n\t} catch (err) {}\n};\n/**\n* Fetch function\n*/\nlet fetchModule = detectFetch();\n/**\n* Set custom fetch() function\n*/\nfunction setFetch(fetch$1) {\n\tfetchModule = fetch$1;\n}\n/**\n* Get fetch() function. Used by Icon Finder Core\n*/\nfunction getFetch() {\n\treturn fetchModule;\n}\n/**\n* Calculate maximum icons list length for prefix\n*/\nfunction calculateMaxLength(provider, prefix) {\n\tconst config = getAPIConfig(provider);\n\tif (!config) return 0;\n\tlet result;\n\tif (!config.maxURL) result = 0;\n\telse {\n\t\tlet maxHostLength = 0;\n\t\tconfig.resources.forEach((item) => {\n\t\t\tconst host = item;\n\t\t\tmaxHostLength = Math.max(maxHostLength, host.length);\n\t\t});\n\t\tconst url = prefix + \".json?icons=\";\n\t\tresult = config.maxURL - maxHostLength - config.path.length - url.length;\n\t}\n\treturn result;\n}\n/**\n* Should query be aborted, based on last HTTP status\n*/\nfunction shouldAbort(status) {\n\treturn status === 404;\n}\n/**\n* Prepare params\n*/\nconst prepare = (provider, prefix, icons) => {\n\tconst results = [];\n\tconst maxLength = calculateMaxLength(provider, prefix);\n\tconst type = \"icons\";\n\tlet item = {\n\t\ttype,\n\t\tprovider,\n\t\tprefix,\n\t\ticons: []\n\t};\n\tlet length = 0;\n\ticons.forEach((name, index) => {\n\t\tlength += name.length + 1;\n\t\tif (length >= maxLength && index > 0) {\n\t\t\tresults.push(item);\n\t\t\titem = {\n\t\t\t\ttype,\n\t\t\t\tprovider,\n\t\t\t\tprefix,\n\t\t\t\ticons: []\n\t\t\t};\n\t\t\tlength = name.length;\n\t\t}\n\t\titem.icons.push(name);\n\t});\n\tresults.push(item);\n\treturn results;\n};\n/**\n* Get path\n*/\nfunction getPath(provider) {\n\tif (typeof provider === \"string\") {\n\t\tconst config = getAPIConfig(provider);\n\t\tif (config) return config.path;\n\t}\n\treturn \"/\";\n}\n/**\n* Load icons\n*/\nconst send = (host, params, callback) => {\n\tif (!fetchModule) {\n\t\tcallback(\"abort\", 424);\n\t\treturn;\n\t}\n\tlet path = getPath(params.provider);\n\tswitch (params.type) {\n\t\tcase \"icons\": {\n\t\t\tconst prefix = params.prefix;\n\t\t\tconst icons = params.icons;\n\t\t\tconst iconsList = icons.join(\",\");\n\t\t\tconst urlParams = new URLSearchParams({ icons: iconsList });\n\t\t\tpath += prefix + \".json?\" + urlParams.toString();\n\t\t\tbreak;\n\t\t}\n\t\tcase \"custom\": {\n\t\t\tconst uri = params.uri;\n\t\t\tpath += uri.slice(0, 1) === \"/\" ? uri.slice(1) : uri;\n\t\t\tbreak;\n\t\t}\n\t\tdefault:\n\t\t\tcallback(\"abort\", 400);\n\t\t\treturn;\n\t}\n\tlet defaultError = 503;\n\tfetchModule(host + path).then((response) => {\n\t\tconst status = response.status;\n\t\tif (status !== 200) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tcallback(shouldAbort(status) ? \"abort\" : \"next\", status);\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tdefaultError = 501;\n\t\treturn response.json();\n\t}).then((data) => {\n\t\tif (typeof data !== \"object\" || data === null) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (data === 404) callback(\"abort\", data);\n\t\t\t\telse callback(\"next\", defaultError);\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tsetTimeout(() => {\n\t\t\tcallback(\"success\", data);\n\t\t});\n\t}).catch(() => {\n\t\tcallback(\"next\", defaultError);\n\t});\n};\n/**\n* Export module\n*/\nconst fetchAPIModule = {\n\tprepare,\n\tsend\n};\n\n/**\n* Remove callback\n*/\nfunction removeCallback(storages, id) {\n\tstorages.forEach((storage) => {\n\t\tconst items = storage.loaderCallbacks;\n\t\tif (items) storage.loaderCallbacks = items.filter((row) => row.id !== id);\n\t});\n}\n/**\n* Update all callbacks for provider and prefix\n*/\nfunction updateCallbacks(storage) {\n\tif (!storage.pendingCallbacksFlag) {\n\t\tstorage.pendingCallbacksFlag = true;\n\t\tsetTimeout(() => {\n\t\t\tstorage.pendingCallbacksFlag = false;\n\t\t\tconst items = storage.loaderCallbacks ? storage.loaderCallbacks.slice(0) : [];\n\t\t\tif (!items.length) return;\n\t\t\tlet hasPending = false;\n\t\t\tconst provider = storage.provider;\n\t\t\tconst prefix = storage.prefix;\n\t\t\titems.forEach((item) => {\n\t\t\t\tconst icons = item.icons;\n\t\t\t\tconst oldLength = icons.pending.length;\n\t\t\t\ticons.pending = icons.pending.filter((icon) => {\n\t\t\t\t\tif (icon.prefix !== prefix) return true;\n\t\t\t\t\tconst name = icon.name;\n\t\t\t\t\tif (storage.icons[name]) icons.loaded.push({\n\t\t\t\t\t\tprovider,\n\t\t\t\t\t\tprefix,\n\t\t\t\t\t\tname\n\t\t\t\t\t});\n\t\t\t\t\telse if (storage.missing.has(name)) icons.missing.push({\n\t\t\t\t\t\tprovider,\n\t\t\t\t\t\tprefix,\n\t\t\t\t\t\tname\n\t\t\t\t\t});\n\t\t\t\t\telse {\n\t\t\t\t\t\thasPending = true;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\t\t\t\tif (icons.pending.length !== oldLength) {\n\t\t\t\t\tif (!hasPending) removeCallback([storage], item.id);\n\t\t\t\t\titem.callback(icons.loaded.slice(0), icons.missing.slice(0), icons.pending.slice(0), item.abort);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n}\n/**\n* Unique id counter for callbacks\n*/\nlet idCounter = 0;\n/**\n* Add callback\n*/\nfunction storeCallback(callback, icons, pendingSources) {\n\tconst id = idCounter++;\n\tconst abort = removeCallback.bind(null, pendingSources, id);\n\tif (!icons.pending.length) return abort;\n\tconst item = {\n\t\tid,\n\t\ticons,\n\t\tcallback,\n\t\tabort\n\t};\n\tpendingSources.forEach((storage) => {\n\t\t(storage.loaderCallbacks || (storage.loaderCallbacks = [])).push(item);\n\t});\n\treturn abort;\n}\n\n/**\n* Check if icons have been loaded\n*/\nfunction sortIcons(icons) {\n\tconst result = {\n\t\tloaded: [],\n\t\tmissing: [],\n\t\tpending: []\n\t};\n\tconst storage = Object.create(null);\n\ticons.sort((a, b) => {\n\t\tif (a.provider !== b.provider) return a.provider.localeCompare(b.provider);\n\t\tif (a.prefix !== b.prefix) return a.prefix.localeCompare(b.prefix);\n\t\treturn a.name.localeCompare(b.name);\n\t});\n\tlet lastIcon = {\n\t\tprovider: \"\",\n\t\tprefix: \"\",\n\t\tname: \"\"\n\t};\n\ticons.forEach((icon) => {\n\t\tif (lastIcon.name === icon.name && lastIcon.prefix === icon.prefix && lastIcon.provider === icon.provider) return;\n\t\tlastIcon = icon;\n\t\tconst provider = icon.provider;\n\t\tconst prefix = icon.prefix;\n\t\tconst name = icon.name;\n\t\tconst providerStorage = storage[provider] || (storage[provider] = Object.create(null));\n\t\tconst localStorage = providerStorage[prefix] || (providerStorage[prefix] = getStorage(provider, prefix));\n\t\tlet list;\n\t\tif (name in localStorage.icons) list = result.loaded;\n\t\telse if (prefix === \"\" || localStorage.missing.has(name)) list = result.missing;\n\t\telse list = result.pending;\n\t\tconst item = {\n\t\t\tprovider,\n\t\t\tprefix,\n\t\t\tname\n\t\t};\n\t\tlist.push(item);\n\t});\n\treturn result;\n}\n\n/**\n* Convert icons list from string/icon mix to icons and validate them\n*/\nfunction listToIcons(list, validate = true, simpleNames = false) {\n\tconst result = [];\n\tlist.forEach((item) => {\n\t\tconst icon = typeof item === \"string\" ? stringToIcon(item, validate, simpleNames) : item;\n\t\tif (icon) result.push(icon);\n\t});\n\treturn result;\n}\n\n/**\n* Default RedundancyConfig for API calls\n*/\nconst defaultConfig = {\n\tresources: [],\n\tindex: 0,\n\ttimeout: 2e3,\n\trotate: 750,\n\trandom: false,\n\tdataAfterTimeout: false\n};\n\n/**\n* Send query\n*/\nfunction sendQuery(config, payload, query, done) {\n\tconst resourcesCount = config.resources.length;\n\tconst startIndex = config.random ? Math.floor(Math.random() * resourcesCount) : config.index;\n\tlet resources;\n\tif (config.random) {\n\t\tlet list = config.resources.slice(0);\n\t\tresources = [];\n\t\twhile (list.length > 1) {\n\t\t\tconst nextIndex = Math.floor(Math.random() * list.length);\n\t\t\tresources.push(list[nextIndex]);\n\t\t\tlist = list.slice(0, nextIndex).concat(list.slice(nextIndex + 1));\n\t\t}\n\t\tresources = resources.concat(list);\n\t} else resources = config.resources.slice(startIndex).concat(config.resources.slice(0, startIndex));\n\tconst startTime = Date.now();\n\tlet status = \"pending\";\n\tlet queriesSent = 0;\n\tlet lastError;\n\tlet timer = null;\n\tlet queue = [];\n\tlet doneCallbacks = [];\n\tif (typeof done === \"function\") doneCallbacks.push(done);\n\t/**\n\t* Reset timer\n\t*/\n\tfunction resetTimer() {\n\t\tif (timer) {\n\t\t\tclearTimeout(timer);\n\t\t\ttimer = null;\n\t\t}\n\t}\n\t/**\n\t* Abort everything\n\t*/\n\tfunction abort() {\n\t\tif (status === \"pending\") status = \"aborted\";\n\t\tresetTimer();\n\t\tqueue.forEach((item) => {\n\t\t\tif (item.status === \"pending\") item.status = \"aborted\";\n\t\t});\n\t\tqueue = [];\n\t}\n\t/**\n\t* Add / replace callback to call when execution is complete.\n\t* This can be used to abort pending query implementations when query is complete or aborted.\n\t*/\n\tfunction subscribe(callback, overwrite) {\n\t\tif (overwrite) doneCallbacks = [];\n\t\tif (typeof callback === \"function\") doneCallbacks.push(callback);\n\t}\n\t/**\n\t* Get query status\n\t*/\n\tfunction getQueryStatus() {\n\t\treturn {\n\t\t\tstartTime,\n\t\t\tpayload,\n\t\t\tstatus,\n\t\t\tqueriesSent,\n\t\t\tqueriesPending: queue.length,\n\t\t\tsubscribe,\n\t\t\tabort\n\t\t};\n\t}\n\t/**\n\t* Fail query\n\t*/\n\tfunction failQuery() {\n\t\tstatus = \"failed\";\n\t\tdoneCallbacks.forEach((callback) => {\n\t\t\tcallback(void 0, lastError);\n\t\t});\n\t}\n\t/**\n\t* Clear queue\n\t*/\n\tfunction clearQueue() {\n\t\tqueue.forEach((item) => {\n\t\t\tif (item.status === \"pending\") item.status = \"aborted\";\n\t\t});\n\t\tqueue = [];\n\t}\n\t/**\n\t* Got response from module\n\t*/\n\tfunction moduleResponse(item, response, data) {\n\t\tconst isError = response !== \"success\";\n\t\tqueue = queue.filter((queued) => queued !== item);\n\t\tswitch (status) {\n\t\t\tcase \"pending\": break;\n\t\t\tcase \"failed\":\n\t\t\t\tif (isError || !config.dataAfterTimeout) return;\n\t\t\t\tbreak;\n\t\t\tdefault: return;\n\t\t}\n\t\tif (response === \"abort\") {\n\t\t\tlastError = data;\n\t\t\tfailQuery();\n\t\t\treturn;\n\t\t}\n\t\tif (isError) {\n\t\t\tlastError = data;\n\t\t\tif (!queue.length) if (!resources.length) failQuery();\n\t\t\telse execNext();\n\t\t\treturn;\n\t\t}\n\t\tresetTimer();\n\t\tclearQueue();\n\t\tif (!config.random) {\n\t\t\tconst index = config.resources.indexOf(item.resource);\n\t\t\tif (index !== -1 && index !== config.index) config.index = index;\n\t\t}\n\t\tstatus = \"completed\";\n\t\tdoneCallbacks.forEach((callback) => {\n\t\t\tcallback(data);\n\t\t});\n\t}\n\t/**\n\t* Execute next query\n\t*/\n\tfunction execNext() {\n\t\tif (status !== \"pending\") return;\n\t\tresetTimer();\n\t\tconst resource = resources.shift();\n\t\tif (resource === void 0) {\n\t\t\tif (queue.length) {\n\t\t\t\ttimer = setTimeout(() => {\n\t\t\t\t\tresetTimer();\n\t\t\t\t\tif (status === \"pending\") {\n\t\t\t\t\t\tclearQueue();\n\t\t\t\t\t\tfailQuery();\n\t\t\t\t\t}\n\t\t\t\t}, config.timeout);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfailQuery();\n\t\t\treturn;\n\t\t}\n\t\tconst item = {\n\t\t\tstatus: \"pending\",\n\t\t\tresource,\n\t\t\tcallback: (status$1, data) => {\n\t\t\t\tmoduleResponse(item, status$1, data);\n\t\t\t}\n\t\t};\n\t\tqueue.push(item);\n\t\tqueriesSent++;\n\t\ttimer = setTimeout(execNext, config.rotate);\n\t\tquery(resource, payload, item.callback);\n\t}\n\tsetTimeout(execNext);\n\treturn getQueryStatus;\n}\n\n/**\n* Redundancy instance\n*/\nfunction initRedundancy(cfg) {\n\tconst config = {\n\t\t...defaultConfig,\n\t\t...cfg\n\t};\n\tlet queries = [];\n\t/**\n\t* Remove aborted and completed queries\n\t*/\n\tfunction cleanup() {\n\t\tqueries = queries.filter((item) => item().status === \"pending\");\n\t}\n\t/**\n\t* Send query\n\t*/\n\tfunction query(payload, queryCallback, doneCallback) {\n\t\tconst query$1 = sendQuery(config, payload, queryCallback, (data, error) => {\n\t\t\tcleanup();\n\t\t\tif (doneCallback) doneCallback(data, error);\n\t\t});\n\t\tqueries.push(query$1);\n\t\treturn query$1;\n\t}\n\t/**\n\t* Find instance\n\t*/\n\tfunction find(callback) {\n\t\treturn queries.find((value) => {\n\t\t\treturn callback(value);\n\t\t}) || null;\n\t}\n\tconst instance = {\n\t\tquery,\n\t\tfind,\n\t\tsetIndex: (index) => {\n\t\t\tconfig.index = index;\n\t\t},\n\t\tgetIndex: () => config.index,\n\t\tcleanup\n\t};\n\treturn instance;\n}\n\nfunction emptyCallback$1() {}\nconst redundancyCache = Object.create(null);\n/**\n* Get Redundancy instance for provider\n*/\nfunction getRedundancyCache(provider) {\n\tif (!redundancyCache[provider]) {\n\t\tconst config = getAPIConfig(provider);\n\t\tif (!config) return;\n\t\tconst redundancy = initRedundancy(config);\n\t\tconst cachedReundancy = {\n\t\t\tconfig,\n\t\t\tredundancy\n\t\t};\n\t\tredundancyCache[provider] = cachedReundancy;\n\t}\n\treturn redundancyCache[provider];\n}\n/**\n* Send API query\n*/\nfunction sendAPIQuery(target, query, callback) {\n\tlet redundancy;\n\tlet send;\n\tif (typeof target === \"string\") {\n\t\tconst api = getAPIModule(target);\n\t\tif (!api) {\n\t\t\tcallback(void 0, 424);\n\t\t\treturn emptyCallback$1;\n\t\t}\n\t\tsend = api.send;\n\t\tconst cached = getRedundancyCache(target);\n\t\tif (cached) redundancy = cached.redundancy;\n\t} else {\n\t\tconst config = createAPIConfig(target);\n\t\tif (config) {\n\t\t\tredundancy = initRedundancy(config);\n\t\t\tconst moduleKey = target.resources ? target.resources[0] : \"\";\n\t\t\tconst api = getAPIModule(moduleKey);\n\t\t\tif (api) send = api.send;\n\t\t}\n\t}\n\tif (!redundancy || !send) {\n\t\tcallback(void 0, 424);\n\t\treturn emptyCallback$1;\n\t}\n\treturn redundancy.query(query, send, callback)().abort;\n}\n\nfunction emptyCallback() {}\n/**\n* Function called when new icons have been loaded\n*/\nfunction loadedNewIcons(storage) {\n\tif (!storage.iconsLoaderFlag) {\n\t\tstorage.iconsLoaderFlag = true;\n\t\tsetTimeout(() => {\n\t\t\tstorage.iconsLoaderFlag = false;\n\t\t\tupdateCallbacks(storage);\n\t\t});\n\t}\n}\n/**\n* Check icon names for API\n*/\nfunction checkIconNamesForAPI(icons) {\n\tconst valid = [];\n\tconst invalid = [];\n\ticons.forEach((name) => {\n\t\t(name.match(matchIconName) ? valid : invalid).push(name);\n\t});\n\treturn {\n\t\tvalid,\n\t\tinvalid\n\t};\n}\n/**\n* Parse loader response\n*/\nfunction parseLoaderResponse(storage, icons, data) {\n\tfunction checkMissing() {\n\t\tconst pending = storage.pendingIcons;\n\t\ticons.forEach((name) => {\n\t\t\tif (pending) pending.delete(name);\n\t\t\tif (!storage.icons[name]) storage.missing.add(name);\n\t\t});\n\t}\n\tif (data && typeof data === \"object\") try {\n\t\tconst parsed = addIconSet(storage, data);\n\t\tif (!parsed.length) {\n\t\t\tcheckMissing();\n\t\t\treturn;\n\t\t}\n\t} catch (err) {\n\t\tconsole.error(err);\n\t}\n\tcheckMissing();\n\tloadedNewIcons(storage);\n}\n/**\n* Handle response that can be async\n*/\nfunction parsePossiblyAsyncResponse(response, callback) {\n\tif (response instanceof Promise) response.then((data) => {\n\t\tcallback(data);\n\t}).catch(() => {\n\t\tcallback(null);\n\t});\n\telse callback(response);\n}\n/**\n* Load icons\n*/\nfunction loadNewIcons(storage, icons) {\n\tif (!storage.iconsToLoad) storage.iconsToLoad = icons;\n\telse storage.iconsToLoad = storage.iconsToLoad.concat(icons).sort();\n\tif (!storage.iconsQueueFlag) {\n\t\tstorage.iconsQueueFlag = true;\n\t\tsetTimeout(() => {\n\t\t\tstorage.iconsQueueFlag = false;\n\t\t\tconst { provider, prefix } = storage;\n\t\t\tconst icons$1 = storage.iconsToLoad;\n\t\t\tdelete storage.iconsToLoad;\n\t\t\tif (!icons$1 || !icons$1.length) return;\n\t\t\tconst customIconLoader = storage.loadIcon;\n\t\t\tif (storage.loadIcons && (icons$1.length > 1 || !customIconLoader)) {\n\t\t\t\tparsePossiblyAsyncResponse(storage.loadIcons(icons$1, prefix, provider), (data) => {\n\t\t\t\t\tparseLoaderResponse(storage, icons$1, data);\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (customIconLoader) {\n\t\t\t\ticons$1.forEach((name) => {\n\t\t\t\t\tconst response = customIconLoader(name, prefix, provider);\n\t\t\t\t\tparsePossiblyAsyncResponse(response, (data) => {\n\t\t\t\t\t\tconst iconSet = data ? {\n\t\t\t\t\t\t\tprefix,\n\t\t\t\t\t\t\ticons: { [name]: data }\n\t\t\t\t\t\t} : null;\n\t\t\t\t\t\tparseLoaderResponse(storage, [name], iconSet);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { valid, invalid } = checkIconNamesForAPI(icons$1);\n\t\t\tif (invalid.length) parseLoaderResponse(storage, invalid, null);\n\t\t\tif (!valid.length) return;\n\t\t\tconst api = prefix.match(matchIconName) ? getAPIModule(provider) : null;\n\t\t\tif (!api) {\n\t\t\t\tparseLoaderResponse(storage, valid, null);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst params = api.prepare(provider, prefix, valid);\n\t\t\tparams.forEach((item) => {\n\t\t\t\tsendAPIQuery(provider, item, (data) => {\n\t\t\t\t\tparseLoaderResponse(storage, item.icons, data);\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n}\n/**\n* Load icons\n*/\nconst loadIcons = (icons, callback) => {\n\tconst cleanedIcons = listToIcons(icons, true, allowSimpleNames());\n\tconst sortedIcons = sortIcons(cleanedIcons);\n\tif (!sortedIcons.pending.length) {\n\t\tlet callCallback = true;\n\t\tif (callback) setTimeout(() => {\n\t\t\tif (callCallback) callback(sortedIcons.loaded, sortedIcons.missing, sortedIcons.pending, emptyCallback);\n\t\t});\n\t\treturn () => {\n\t\t\tcallCallback = false;\n\t\t};\n\t}\n\tconst newIcons = Object.create(null);\n\tconst sources = [];\n\tlet lastProvider, lastPrefix;\n\tsortedIcons.pending.forEach((icon) => {\n\t\tconst { provider, prefix } = icon;\n\t\tif (prefix === lastPrefix && provider === lastProvider) return;\n\t\tlastProvider = provider;\n\t\tlastPrefix = prefix;\n\t\tsources.push(getStorage(provider, prefix));\n\t\tconst providerNewIcons = newIcons[provider] || (newIcons[provider] = Object.create(null));\n\t\tif (!providerNewIcons[prefix]) providerNewIcons[prefix] = [];\n\t});\n\tsortedIcons.pending.forEach((icon) => {\n\t\tconst { provider, prefix, name } = icon;\n\t\tconst storage = getStorage(provider, prefix);\n\t\tconst pendingQueue = storage.pendingIcons || (storage.pendingIcons = /* @__PURE__ */ new Set());\n\t\tif (!pendingQueue.has(name)) {\n\t\t\tpendingQueue.add(name);\n\t\t\tnewIcons[provider][prefix].push(name);\n\t\t}\n\t});\n\tsources.forEach((storage) => {\n\t\tconst list = newIcons[storage.provider][storage.prefix];\n\t\tif (list.length) loadNewIcons(storage, list);\n\t});\n\treturn callback ? storeCallback(callback, sortedIcons, sources) : emptyCallback;\n};\n/**\n* Load one icon using Promise\n*/\nconst loadIcon = (icon) => {\n\treturn new Promise((fulfill, reject) => {\n\t\tconst iconObj = typeof icon === \"string\" ? stringToIcon(icon, true) : icon;\n\t\tif (!iconObj) {\n\t\t\treject(icon);\n\t\t\treturn;\n\t\t}\n\t\tloadIcons([iconObj || icon], (loaded) => {\n\t\t\tif (loaded.length && iconObj) {\n\t\t\t\tconst data = getIconData(iconObj);\n\t\t\t\tif (data) {\n\t\t\t\t\tfulfill({\n\t\t\t\t\t\t...defaultIconProps,\n\t\t\t\t\t\t...data\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\treject(icon);\n\t\t});\n\t});\n};\n\n/**\n* Set custom loader for multiple icons\n*/\nfunction setCustomIconsLoader(loader, prefix, provider) {\n\tgetStorage(provider || \"\", prefix).loadIcons = loader;\n}\n/**\n* Set custom loader for one icon\n*/\nfunction setCustomIconLoader(loader, prefix, provider) {\n\tgetStorage(provider || \"\", prefix).loadIcon = loader;\n}\n\n/**\n* Convert IconifyIconCustomisations to FullIconCustomisations, checking value types\n*/\nfunction mergeCustomisations(defaults, item) {\n\tconst result = { ...defaults };\n\tfor (const key in item) {\n\t\tconst value = item[key];\n\t\tconst valueType = typeof value;\n\t\tif (key in defaultIconSizeCustomisations) {\n\t\t\tif (value === null || value && (valueType === \"string\" || valueType === \"number\")) result[key] = value;\n\t\t} else if (valueType === typeof result[key]) result[key] = key === \"rotate\" ? value % 4 : value;\n\t}\n\treturn result;\n}\n\nconst separator = /[\\s,]+/;\n/**\n* Apply \"flip\" string to icon customisations\n*/\nfunction flipFromString(custom, flip) {\n\tflip.split(separator).forEach((str) => {\n\t\tconst value = str.trim();\n\t\tswitch (value) {\n\t\t\tcase \"horizontal\":\n\t\t\t\tcustom.hFlip = true;\n\t\t\t\tbreak;\n\t\t\tcase \"vertical\":\n\t\t\t\tcustom.vFlip = true;\n\t\t\t\tbreak;\n\t\t}\n\t});\n}\n\n/**\n* Get rotation value\n*/\nfunction rotateFromString(value, defaultValue = 0) {\n\tconst units = value.replace(/^-?[0-9.]*/, \"\");\n\tfunction cleanup(value$1) {\n\t\twhile (value$1 < 0) value$1 += 4;\n\t\treturn value$1 % 4;\n\t}\n\tif (units === \"\") {\n\t\tconst num = parseInt(value);\n\t\treturn isNaN(num) ? 0 : cleanup(num);\n\t} else if (units !== value) {\n\t\tlet split = 0;\n\t\tswitch (units) {\n\t\t\tcase \"%\":\n\t\t\t\tsplit = 25;\n\t\t\t\tbreak;\n\t\t\tcase \"deg\": split = 90;\n\t\t}\n\t\tif (split) {\n\t\t\tlet num = parseFloat(value.slice(0, value.length - units.length));\n\t\t\tif (isNaN(num)) return 0;\n\t\t\tnum = num / split;\n\t\t\treturn num % 1 === 0 ? cleanup(num) : 0;\n\t\t}\n\t}\n\treturn defaultValue;\n}\n\n/**\n* Generate <svg>\n*/\nfunction iconToHTML(body, attributes) {\n\tlet renderAttribsHTML = body.indexOf(\"xlink:\") === -1 ? \"\" : \" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\"\";\n\tfor (const attr in attributes) renderAttribsHTML += \" \" + attr + \"=\\\"\" + attributes[attr] + \"\\\"\";\n\treturn \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\"\" + renderAttribsHTML + \">\" + body + \"</svg>\";\n}\n\n/**\n* Encode SVG for use in url()\n*\n* Short alternative to encodeURIComponent() that encodes only stuff used in SVG, generating\n* smaller code.\n*/\nfunction encodeSVGforURL(svg) {\n\treturn svg.replace(/\"/g, \"'\").replace(/%/g, \"%25\").replace(/#/g, \"%23\").replace(/</g, \"%3C\").replace(/>/g, \"%3E\").replace(/\\s+/g, \" \");\n}\n/**\n* Generate data: URL from SVG\n*/\nfunction svgToData(svg) {\n\treturn \"data:image/svg+xml,\" + encodeSVGforURL(svg);\n}\n/**\n* Generate url() from SVG\n*/\nfunction svgToURL(svg) {\n\treturn \"url(\\\"\" + svgToData(svg) + \"\\\")\";\n}\n\nlet policy;\n/**\n* Attempt to create policy\n*/\nfunction createPolicy() {\n\ttry {\n\t\tpolicy = window.trustedTypes.createPolicy(\"iconify\", { createHTML: (s) => s });\n\t} catch (err) {\n\t\tpolicy = null;\n\t}\n}\n/**\n* Clean up value for innerHTML assignment\n*\n* This code doesn't actually clean up anything.\n* It is intended be used with Iconify icon data, which has already been validated\n*/\nfunction cleanUpInnerHTML(html) {\n\tif (policy === void 0) createPolicy();\n\treturn policy ? policy.createHTML(html) : html;\n}\n\nconst defaultExtendedIconCustomisations = {\n ...defaultIconCustomisations,\n inline: false,\n};\n\n/**\n * Default SVG attributes\n */\nconst svgDefaults = {\n 'xmlns': 'http://www.w3.org/2000/svg',\n 'xmlnsXlink': 'http://www.w3.org/1999/xlink',\n 'aria-hidden': true,\n 'role': 'img',\n};\n/**\n * Style modes\n */\nconst commonProps = {\n display: 'inline-block',\n};\nconst monotoneProps = {\n backgroundColor: 'currentColor',\n};\nconst coloredProps = {\n backgroundColor: 'transparent',\n};\n// Dynamically add common props to variables above\nconst propsToAdd = {\n Image: 'var(--svg)',\n Repeat: 'no-repeat',\n Size: '100% 100%',\n};\nconst propsToAddTo = {\n WebkitMask: monotoneProps,\n mask: monotoneProps,\n background: coloredProps,\n};\nfor (const prefix in propsToAddTo) {\n const list = propsToAddTo[prefix];\n for (const prop in propsToAdd) {\n list[prefix + prop] = propsToAdd[prop];\n }\n}\n/**\n * Default values for customisations for inline icon\n */\nconst inlineDefaults = {\n ...defaultExtendedIconCustomisations,\n inline: true,\n};\n/**\n * Fix size: add 'px' to numbers\n */\nfunction fixSize(value) {\n return value + (value.match(/^[-0-9.]+$/) ? 'px' : '');\n}\n/**\n * Render icon\n */\nconst render = (\n// Icon must be validated before calling this function\nicon, \n// Partial properties\nprops, \n// Icon name\nname) => {\n // Get default properties\n const defaultProps = props.inline\n ? inlineDefaults\n : defaultExtendedIconCustomisations;\n // Get all customisations\n const customisations = mergeCustomisations(defaultProps, props);\n // Check mode\n const mode = props.mode || 'svg';\n // Create style\n const style = {};\n const customStyle = props.style || {};\n // Create SVG component properties\n const componentProps = {\n ...(mode === 'svg' ? svgDefaults : {}),\n };\n if (name) {\n const iconName = stringToIcon(name, false, true);\n if (iconName) {\n const classNames = ['iconify'];\n const props = [\n 'provider',\n 'prefix',\n ];\n for (const prop of props) {\n if (iconName[prop]) {\n classNames.push('iconify--' + iconName[prop]);\n }\n }\n componentProps.className = classNames.join(' ');\n }\n }\n // Get element properties\n for (let key in props) {\n const value = props[key];\n if (value === void 0) {\n continue;\n }\n switch (key) {\n // Properties to ignore\n case 'icon':\n case 'style':\n case 'children':\n case 'onLoad':\n case 'mode':\n case 'ssr':\n case 'fallback':\n break;\n // Forward ref\n case '_ref':\n componentProps.ref = value;\n break;\n // Merge class names\n case 'className':\n componentProps[key] =\n (componentProps[key] ? componentProps[key] + ' ' : '') +\n value;\n break;\n // Boolean attributes\n case 'inline':\n case 'hFlip':\n case 'vFlip':\n customisations[key] =\n value === true || value === 'true' || value === 1;\n break;\n // Flip as string: 'horizontal,vertical'\n case 'flip':\n if (typeof value === 'string') {\n flipFromString(customisations, value);\n }\n break;\n // Color: copy to style\n case 'color':\n style.color = value;\n break;\n // Rotation as string\n case 'rotate':\n if (typeof value === 'string') {\n customisations[key] = rotateFromString(value);\n }\n else if (typeof value === 'number') {\n customisations[key] = value;\n }\n break;\n // Remove aria-hidden\n case 'ariaHidden':\n case 'aria-hidden':\n if (value !== true && value !== 'true') {\n delete componentProps['aria-hidden'];\n }\n break;\n // Copy missing property if it does not exist in customisations\n default:\n if (defaultProps[key] === void 0) {\n componentProps[key] = value;\n }\n }\n }\n // Generate icon\n const item = iconToSVG(icon, customisations);\n const renderAttribs = item.attributes;\n // Inline display\n if (customisations.inline) {\n style.verticalAlign = '-0.125em';\n }\n if (mode === 'svg') {\n // Add style\n componentProps.style = {\n ...style,\n ...customStyle,\n };\n // Add icon stuff\n Object.assign(componentProps, renderAttribs);\n // Counter for ids based on \"id\" property to render icons consistently on server and client\n let localCounter = 0;\n let id = props.id;\n if (typeof id === 'string') {\n // Convert '-' to '_' to avoid errors in animations\n id = id.replace(/-/g, '_');\n }\n // Add icon stuff\n componentProps.dangerouslySetInnerHTML = {\n __html: cleanUpInnerHTML(replaceIDs(item.body, id ? () => id + 'ID' + localCounter++ : 'iconifyReact')),\n };\n return createElement('svg', componentProps);\n }\n // Render <span> with style\n const { body, width, height } = icon;\n const useMask = mode === 'mask' ||\n (mode === 'bg' ? false : body.indexOf('currentColor') !== -1);\n // Generate SVG\n const html = iconToHTML(body, {\n ...renderAttribs,\n width: width + '',\n height: height + '',\n });\n // Generate style\n componentProps.style = {\n ...style,\n '--svg': svgToURL(html),\n 'width': fixSize(renderAttribs.width),\n 'height': fixSize(renderAttribs.height),\n ...commonProps,\n ...(useMask ? monotoneProps : coloredProps),\n ...customStyle,\n };\n return createElement('span', componentProps);\n};\n\n/**\n * Initialise stuff\n */\n// Enable short names\nallowSimpleNames(true);\n// Set API module\nsetAPIModule('', fetchAPIModule);\n/**\n * Browser stuff\n */\nif (typeof document !== 'undefined' && typeof window !== 'undefined') {\n const _window = window;\n // Load icons from global \"IconifyPreload\"\n if (_window.IconifyPreload !== void 0) {\n const preload = _window.IconifyPreload;\n const err = 'Invalid IconifyPreload syntax.';\n if (typeof preload === 'object' && preload !== null) {\n (preload instanceof Array ? preload : [preload]).forEach((item) => {\n try {\n if (\n // Check if item is an object and not null/array\n typeof item !== 'object' ||\n item === null ||\n item instanceof Array ||\n // Check for 'icons' and 'prefix'\n typeof item.icons !== 'object' ||\n typeof item.prefix !== 'string' ||\n // Add icon set\n !addCollection(item)) {\n console.error(err);\n }\n }\n catch (e) {\n console.error(err);\n }\n });\n }\n }\n // Set API from global \"IconifyProviders\"\n if (_window.IconifyProviders !== void 0) {\n const providers = _window.IconifyProviders;\n if (typeof providers === 'object' && providers !== null) {\n for (let key in providers) {\n const err = 'IconifyProviders[' + key + '] is invalid.';\n try {\n const value = providers[key];\n if (typeof value !== 'object' ||\n !value ||\n value.resources === void 0) {\n continue;\n }\n if (!addAPIProvider(key, value)) {\n console.error(err);\n }\n }\n catch (e) {\n console.error(err);\n }\n }\n }\n }\n}\nfunction IconComponent(props) {\n const [mounted, setMounted] = useState(!!props.ssr);\n const [abort, setAbort] = useState({});\n // Get initial state\n function getInitialState(mounted) {\n if (mounted) {\n const name = props.icon;\n if (typeof name === 'object') {\n // Icon as object\n return {\n name: '',\n data: name,\n };\n }\n const data = getIconData(name);\n if (data) {\n return {\n name,\n data,\n };\n }\n }\n return {\n name: '',\n };\n }\n const [state, setState] = useState(getInitialState(!!props.ssr));\n // Cancel loading\n function cleanup() {\n const callback = abort.callback;\n if (callback) {\n callback();\n setAbort({});\n }\n }\n // Change state if it is different\n function changeState(newState) {\n if (JSON.stringify(state) !== JSON.stringify(newState)) {\n cleanup();\n setState(newState);\n return true;\n }\n }\n // Update state\n function updateState() {\n var _a;\n const name = props.icon;\n if (typeof name === 'object') {\n // Icon as object\n changeState({\n name: '',\n data: name,\n });\n return;\n }\n // New icon or got icon data\n const data = getIconData(name);\n if (changeState({\n name,\n data,\n })) {\n if (data === undefined) {\n // Load icon, update state when done\n const callback = loadIcons([name], updateState);\n setAbort({\n callback,\n });\n }\n else if (data) {\n // Icon data is available: trigger onLoad callback if present\n (_a = props.onLoad) === null || _a === void 0 ? void 0 : _a.call(props, name);\n }\n }\n }\n // Mounted state, cleanup for loader\n useEffect(() => {\n setMounted(true);\n return cleanup;\n }, []);\n // Icon changed or component mounted\n useEffect(() => {\n if (mounted) {\n updateState();\n }\n }, [props.icon, mounted]);\n // Render icon\n const { name, data } = state;\n if (!data) {\n return props.children\n ? props.children\n : props.fallback\n ? props.fallback\n : createElement('span', {});\n }\n return render({\n ...defaultIconProps,\n ...data,\n }, props, name);\n}\n/**\n * Block icon\n *\n * @param props - Component properties\n */\nconst Icon = forwardRef((props, ref) => IconComponent({\n ...props,\n _ref: ref,\n}));\n/**\n * Inline icon (has negative verticalAlign that makes it behave like icon font)\n *\n * @param props - Component properties\n */\nconst InlineIcon = forwardRef((props, ref) => IconComponent({\n inline: true,\n ...props,\n _ref: ref,\n}));\n/**\n * Internal API\n */\nconst _api = {\n getAPIConfig,\n setAPIModule,\n sendAPIQuery,\n setFetch,\n getFetch,\n listAPIProviders,\n};\n\nexport { Icon, InlineIcon, _api, addAPIProvider, addCollection, addIcon, iconToSVG as buildIcon, calculateSize, getIcon, iconLoaded, listIcons, loadIcon, loadIcons, replaceIDs, setCustomIconLoader, setCustomIconsLoader };\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"hidden\": true,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"1.5\\\" d=\\\"m4.5 19.5l15-15m-15 0l15 15\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M12 4v16m8-8H4\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"m15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 1 1 3.536 3.536L6.5 21.036H3v-3.572L16.732 3.732Z\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"m19 7l-.867 12.142A2 2 0 0 1 16.138 21H7.862a2 2 0 0 1-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v3M4 7h16\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"hidden\": true,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"1.5\\\" d=\\\"M4.5 12c0-1.232.046-2.453.138-3.662a4.006 4.006 0 0 1 3.7-3.7a48.678 48.678 0 0 1 7.324 0a4.006 4.006 0 0 1 3.7 3.7c.017.22.032.441.046.662M4.5 12l-3-3m3 3l3-3m12 3c0 1.232-.046 2.453-.138 3.662a4.006 4.006 0 0 1-3.7 3.7a48.657 48.657 0 0 1-7.324 0a4.006 4.006 0 0 1-3.7-3.7c-.017-.22-.032-.441-.046-.662M19.5 12l-3 3m3-3l3 3\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"hidden\": true,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"1.5\\\" d=\\\"M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192c.373-.03.748-.057 1.123-.08M15.75 18H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5A3.375 3.375 0 0 0 6.375 7.5H5.25m11.9-3.664A2.251 2.251 0 0 0 15 2.25h-1.5a2.251 2.251 0 0 0-2.15 1.586m5.8 0c.065.21.1.433.1.664v.75h-6V4.5c0-.231.035-.454.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 0 0-9-9Z\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M8 7v8a2 2 0 0 0 2 2h6M8 7V5a2 2 0 0 1 2-2h4.586a1 1 0 0 1 .707.293l4.414 4.414a1 1 0 0 1 .293.707V15a2 2 0 0 1-2 2h-2M8 7H6a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-2\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<g fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\"><path d=\\\"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 0 0-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 0 0-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 0 0-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 0 0-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 0 0 1.066-2.573c-.94-1.543.826-3.31 2.37-2.37c.996.608 2.296.07 2.572-1.065Z\\\"/><path d=\\\"M15 12a3 3 0 1 1-6 0a3 3 0 0 1 6 0Z\\\"/></g>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"hidden\": true,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"1.5\\\" d=\\\"M12 3c2.755 0 5.455.232 8.083.678c.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 1 1 0-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 1 0 5.367-2.684a3 3 0 0 0-5.367 2.684Zm0 9.316a3 3 0 1 0 5.368 2.684a3 3 0 0 0-5.368-2.684Z\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"m5 15l7-7l7 7\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"m19 9l-7 7l-7-7\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"m15 19l-7-7l7-7\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"m9 5l7 7l-7 7\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"hidden\": true,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"1.5\\\" d=\\\"m21 21l-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"hidden\": true,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"1.5\\\" d=\\\"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"m9 12l2 2l4-4m6 2a9 9 0 1 1-18 0a9 9 0 0 1 18 0Z\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"hidden\": true,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"1.5\\\" d=\\\"M12 10.5v3.75m-9.303 3.376C1.83 19.126 2.914 21 4.645 21h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 4.88c-.866-1.501-3.032-1.501-3.898 0L2.697 17.626ZM12 17.25h.007v.008H12v-.008Z\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M12 8v4m0 4h.01M21 12a9 9 0 1 1-18 0a9 9 0 0 1 18 0Z\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3Z\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<g fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\"><path d=\\\"M15 12a3 3 0 1 1-6 0a3 3 0 0 1 6 0Z\\\"/><path d=\\\"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7c-4.477 0-8.268-2.943-9.542-7Z\\\"/></g>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"hidden\": true,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"1.5\\\" d=\\\"M3.98 8.223A10.477 10.477 0 0 0 1.934 12c1.292 4.338 5.31 7.5 10.066 7.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 0 1-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"hidden\": true,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"1.5\\\" d=\\\"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"hidden\": true,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"1.5\\\" d=\\\"M9 17.25v1.007a3 3 0 0 1-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0 1 15 18.257V17.25m6-12V15a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 15V5.25m18 0A2.25 2.25 0 0 0 18.75 3H5.25A2.25 2.25 0 0 0 3 5.25m18 0V12a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 12V5.25\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"hidden\": true,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"1.5\\\" d=\\\"M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 0 1-1.125-1.125M3.375 19.5h7.5c.621 0 1.125-.504 1.125-1.125m-9.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-7.5A1.125 1.125 0 0 1 12 18.375m9.75-12.75c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125m19.5 0v1.5c0 .621-.504 1.125-1.125 1.125M2.25 5.625v1.5c0 .621.504 1.125 1.125 1.125m0 0h17.25m-17.25 0h7.5c.621 0 1.125.504 1.125 1.125M3.375 8.25c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m17.25-3.75h-7.5c-.621 0-1.125.504-1.125 1.125m8.625-1.125c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125M12 10.875v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 10.875c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125M13.125 12h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125M20.625 12c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5M12 14.625v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 14.625c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125m0 1.5v-1.5m0 0c0-.621.504-1.125 1.125-1.125m0 0h7.5\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M13.828 10.172a4 4 0 0 0-5.656 0l-4 4a4 4 0 1 0 5.656 5.656l1.102-1.101m-.758-4.899a4 4 0 0 0 5.656 0l4-4a4 4 0 0 0-5.656-5.656l-1.1 1.1\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"m14 5l7 7m0 0l-7 7m7-7H3\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 1 1-8 0a4 4 0 0 1 8 0Z\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M20.354 15.354A9 9 0 0 1 8.646 3.646A9.003 9.003 0 0 0 12 21a9.003 9.003 0 0 0 8.354-5.646Z\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"hidden\": true,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"1.5\\\" d=\\\"M6.75 12a.75.75 0 1 1-1.5 0a.75.75 0 0 1 1.5 0Zm6 0a.75.75 0 1 1-1.5 0a.75.75 0 0 1 1.5 0Zm6 0a.75.75 0 1 1-1.5 0a.75.75 0 0 1 1.5 0Z\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M9 12h6m-6 4h6m2 5H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5.586a1 1 0 0 1 .707.293l5.414 5.414a1 1 0 0 1 .293.707V19a2 2 0 0 1-2 2Z\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"hidden\": true,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"1.5\\\" d=\\\"M17.25 6.75L22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3l-4.5 16.5\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"hidden\": true,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"1.5\\\" d=\\\"M4.098 19.902a3.75 3.75 0 0 0 5.304 0l6.401-6.402M6.75 21A3.75 3.75 0 0 1 3 17.25V4.125C3 3.504 3.504 3 4.125 3h5.25c.621 0 1.125.504 1.125 1.125v4.072M6.75 21a3.75 3.75 0 0 0 3.75-3.75V8.197M6.75 21h13.125c.621 0 1.125-.504 1.125-1.125v-5.25c0-.621-.504-1.125-1.125-1.125h-4.072M10.5 8.197l2.88-2.88a1.124 1.124 0 0 1 1.59 0l3.712 3.713c.44.44.44 1.152 0 1.59l-2.879 2.88M6.75 17.25h.008v.008H6.75v-.008Z\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<g fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\"><path d=\\\"M3 9a2 2 0 0 1 2-2h.93a2 2 0 0 0 1.664-.89l.812-1.22A2 2 0 0 1 10.07 4h3.86a2 2 0 0 1 1.664.89l.812 1.22A2 2 0 0 0 18.07 7H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9Z\\\"/><path d=\\\"M15 13a3 3 0 1 1-6 0a3 3 0 0 1 6 0Z\\\"/></g>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 20,\n\t\"height\": 20,\n\t\"hidden\": true,\n\t\"body\": \"<path fill=\\\"currentColor\\\" d=\\\"M1 8.25a1.25 1.25 0 1 1 2.5 0v7.5a1.25 1.25 0 1 1-2.5 0v-7.5ZM11 3V1.7c0-.268.14-.526.395-.607A2 2 0 0 1 14 3c0 .995-.182 1.948-.514 2.826c-.204.54.166 1.174.744 1.174h2.52c1.243 0 2.261 1.01 2.146 2.247a23.864 23.864 0 0 1-1.341 5.974C17.153 16.323 16.072 17 14.9 17h-3.192a3 3 0 0 1-1.341-.317l-2.734-1.366A3 3 0 0 0 6.292 15H5V8h.963c.685 0 1.258-.483 1.612-1.068a4.011 4.011 0 0 1 2.166-1.73c.432-.143.853-.386 1.011-.814c.16-.432.248-.9.248-1.388Z\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 20,\n\t\"height\": 20,\n\t\"hidden\": true,\n\t\"body\": \"<path fill=\\\"currentColor\\\" d=\\\"M18.905 12.75a1.25 1.25 0 0 1-2.5 0v-7.5a1.25 1.25 0 1 1 2.5 0v7.5Zm-10 4.25v1.3c0 .268-.14.526-.395.607A2 2 0 0 1 5.905 17c0-.995.182-1.948.514-2.826c.204-.54-.166-1.174-.744-1.174h-2.52c-1.242 0-2.26-1.01-2.146-2.247c.193-2.08.652-4.082 1.341-5.974C2.752 3.678 3.833 3 5.005 3h3.192a3 3 0 0 1 1.342.317l2.733 1.366A3 3 0 0 0 13.613 5h1.292v7h-.963c-.684 0-1.258.482-1.612 1.068a4.012 4.012 0 0 1-2.165 1.73c-.433.143-.854.386-1.012.814c-.16.432-.248.9-.248 1.388Z\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 20,\n\t\"height\": 20,\n\t\"body\": \"<path fill=\\\"currentColor\\\" d=\\\"M2 11a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-5Zm6-4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V7Zm6-3a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1V4Z\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 20,\n\t\"height\": 20,\n\t\"body\": \"<path fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\" d=\\\"M17.707 9.293a1 1 0 0 1 0 1.414l-7 7a1 1 0 0 1-1.414 0l-7-7A.997.997 0 0 1 2 10V5a3 3 0 0 1 3-3h5c.256 0 .512.098.707.293l7 7ZM5 6a1 1 0 1 0 0-2a1 1 0 0 0 0 2Z\\\" clip-rule=\\\"evenodd\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 20,\n\t\"height\": 20,\n\t\"body\": \"<path fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\" d=\\\"M6 2a1 1 0 0 0-1 1v1H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-1V3a1 1 0 1 0-2 0v1H7V3a1 1 0 0 0-1-1Zm0 5a1 1 0 0 0 0 2h8a1 1 0 1 0 0-2H6Z\\\" clip-rule=\\\"evenodd\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 20,\n\t\"height\": 20,\n\t\"hidden\": true,\n\t\"body\": \"<path fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\" d=\\\"M2.5 3A1.5 1.5 0 0 0 1 4.5v4A1.5 1.5 0 0 0 2.5 10h6A1.5 1.5 0 0 0 10 8.5v-4A1.5 1.5 0 0 0 8.5 3h-6Zm11 2A1.5 1.5 0 0 0 12 6.5v7a1.5 1.5 0 0 0 1.5 1.5h4a1.5 1.5 0 0 0 1.5-1.5v-7A1.5 1.5 0 0 0 17.5 5h-4Zm-10 7A1.5 1.5 0 0 0 2 13.5v2A1.5 1.5 0 0 0 3.5 17h6a1.5 1.5 0 0 0 1.5-1.5v-2A1.5 1.5 0 0 0 9.5 12h-6Z\\\" clip-rule=\\\"evenodd\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 20,\n\t\"height\": 20,\n\t\"body\": \"<path fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\" d=\\\"M10 18a8 8 0 1 0 0-16a8 8 0 0 0 0 16ZM9.555 7.168A1 1 0 0 0 8 8v4a1 1 0 0 0 1.555.832l3-2a1 1 0 0 0 0-1.664l-3-2Z\\\" clip-rule=\\\"evenodd\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 20,\n\t\"height\": 20,\n\t\"body\": \"<path fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\" d=\\\"M16.707 5.293a1 1 0 0 1 0 1.414l-8 8a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 1.414-1.414L8 12.586l7.293-7.293a1 1 0 0 1 1.414 0Z\\\" clip-rule=\\\"evenodd\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 20,\n\t\"height\": 20,\n\t\"body\": \"<path fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\" d=\\\"M10 2a1 1 0 0 1 1 1v1.323l3.954 1.582l1.599-.8a1 1 0 0 1 .894 1.79l-1.233.616l1.738 5.42a1 1 0 0 1-.285 1.05A3.989 3.989 0 0 1 15 15a3.989 3.989 0 0 1-2.667-1.019a1 1 0 0 1-.285-1.05l1.715-5.349L11 6.477V16h2a1 1 0 1 1 0 2H7a1 1 0 1 1 0-2h2V6.477L6.237 7.582l1.715 5.349a1 1 0 0 1-.285 1.05A3.989 3.989 0 0 1 5 15a3.989 3.989 0 0 1-2.667-1.019a1 1 0 0 1-.285-1.05l1.738-5.42l-1.233-.617a1 1 0 0 1 .894-1.788l1.599.799L9 4.323V3a1 1 0 0 1 1-1Zm-5 8.274l-.818 2.552c.25.112.526.174.818.174c.292 0 .569-.062.818-.174L5 10.274Zm10 0l-.818 2.552c.25.112.526.174.818.174c.292 0 .569-.062.818-.174L15 10.274Z\\\" clip-rule=\\\"evenodd\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 20,\n\t\"height\": 20,\n\t\"hidden\": true,\n\t\"body\": \"<path fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\" d=\\\"M10 18a8 8 0 1 0 0-16a8 8 0 0 0 0 16Zm.75-11.25a.75.75 0 0 0-1.5 0v4.59L7.3 9.24a.75.75 0 0 0-1.1 1.02l3.25 3.5a.75.75 0 0 0 1.1 0l3.25-3.5a.75.75 0 1 0-1.1-1.02l-1.95 2.1V6.75Z\\\" clip-rule=\\\"evenodd\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 20,\n\t\"height\": 20,\n\t\"hidden\": true,\n\t\"body\": \"<path fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\" d=\\\"M10 18a8 8 0 1 0 0-16a8 8 0 0 0 0 16Zm-.75-4.75a.75.75 0 0 0 1.5 0V8.66l1.95 2.1a.75.75 0 1 0 1.1-1.02l-3.25-3.5a.75.75 0 0 0-1.1 0L6.2 9.74a.75.75 0 1 0 1.1 1.02l1.95-2.1v4.59Z\\\" clip-rule=\\\"evenodd\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 20,\n\t\"height\": 20,\n\t\"hidden\": true,\n\t\"body\": \"<path fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\" d=\\\"M12.577 4.878a.75.75 0 0 1 .919-.53l4.78 1.281a.75.75 0 0 1 .531.919l-1.281 4.78a.75.75 0 0 1-1.449-.387l.81-3.022a19.407 19.407 0 0 0-5.594 5.203a.75.75 0 0 1-1.139.093L7 10.06l-4.72 4.72a.75.75 0 0 1-1.06-1.061l5.25-5.25a.75.75 0 0 1 1.06 0l3.074 3.073a20.923 20.923 0 0 1 5.545-4.931l-3.042-.815a.75.75 0 0 1-.53-.919Z\\\" clip-rule=\\\"evenodd\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 20,\n\t\"height\": 20,\n\t\"body\": \"<path fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\" d=\\\"M7 2a1 1 0 0 0-.707 1.707L7 4.414v3.758a1 1 0 0 1-.293.707l-4 4C.817 14.769 2.156 18 4.828 18h10.343c2.673 0 4.012-3.231 2.122-5.121l-4-4A1 1 0 0 1 13 8.172V4.414l.707-.707A1 1 0 0 0 13 2H7Zm2 6.172V4h2v4.172a3 3 0 0 0 .879 2.12l1.027 1.028a4 4 0 0 0-2.171.102l-.47.156a4 4 0 0 1-2.53 0l-.563-.187a1.993 1.993 0 0 0-.114-.035l1.063-1.063A3 3 0 0 0 9 8.172Z\\\" clip-rule=\\\"evenodd\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 20,\n\t\"height\": 20,\n\t\"hidden\": true,\n\t\"body\": \"<path fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\" d=\\\"M2 4.75A.75.75 0 0 1 2.75 4h14.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 4.75Zm0 10.5a.75.75 0 0 1 .75-.75h7.5a.75.75 0 0 1 0 1.5h-7.5a.75.75 0 0 1-.75-.75ZM2 10a.75.75 0 0 1 .75-.75h14.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 10Z\\\" clip-rule=\\\"evenodd\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 20,\n\t\"height\": 20,\n\t\"body\": \"<g fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\"><path d=\\\"M6.625 2.655A9 9 0 0 1 19 11a1 1 0 1 1-2 0a7 7 0 0 0-9.625-6.492a1 1 0 1 1-.75-1.853ZM4.662 4.959A1 1 0 0 1 4.75 6.37A6.97 6.97 0 0 0 3 11a1 1 0 1 1-2 0a8.97 8.97 0 0 1 2.25-5.953a1 1 0 0 1 1.412-.088Z\\\"/><path d=\\\"M5 11a5 5 0 1 1 10 0a1 1 0 1 1-2 0a3 3 0 1 0-6 0c0 1.677-.345 3.276-.968 4.729a1 1 0 1 1-1.838-.789A9.964 9.964 0 0 0 5 11Zm8.921 2.012a1 1 0 0 1 .831 1.145a19.86 19.86 0 0 1-.545 2.436a1 1 0 1 1-1.92-.558c.207-.713.371-1.445.49-2.192a1 1 0 0 1 1.144-.83Z\\\"/><path d=\\\"M10 10a1 1 0 0 1 1 1c0 2.236-.46 4.368-1.29 6.304a1 1 0 0 1-1.838-.789A13.952 13.952 0 0 0 9 11a1 1 0 0 1 1-1Z\\\"/></g>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 20,\n\t\"height\": 20,\n\t\"hidden\": true,\n\t\"body\": \"<path fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\" d=\\\"M4.25 2A2.25 2.25 0 0 0 2 4.25v11.5A2.25 2.25 0 0 0 4.25 18h11.5A2.25 2.25 0 0 0 18 15.75V4.25A2.25 2.25 0 0 0 15.75 2H4.25ZM15 5.75a.75.75 0 0 0-1.5 0v8.5a.75.75 0 0 0 1.5 0v-8.5Zm-8.5 6a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0v-2.5ZM8.584 9a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5a.75.75 0 0 1 .75-.75Zm3.58-1.25a.75.75 0 0 0-1.5 0v6.5a.75.75 0 0 0 1.5 0v-6.5Z\\\" clip-rule=\\\"evenodd\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 20,\n\t\"height\": 20,\n\t\"body\": \"<path fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\" d=\\\"M10 18a8 8 0 1 0 0-16a8 8 0 0 0 0 16Zm1-11a1 1 0 1 0-2 0v2H7a1 1 0 1 0 0 2h2v2a1 1 0 1 0 2 0v-2h2a1 1 0 1 0 0-2h-2V7Z\\\" clip-rule=\\\"evenodd\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 20,\n\t\"height\": 20,\n\t\"body\": \"<path fill=\\\"currentColor\\\" fill-rule=\\\"evenodd\\\" d=\\\"M9.243 3.03a1 1 0 0 1 .727 1.213L9.53 6h2.94l.56-2.243a1 1 0 1 1 1.94.486L14.53 6H17a1 1 0 1 1 0 2h-2.97l-1 4H15a1 1 0 1 1 0 2h-2.47l-.56 2.242a1 1 0 1 1-1.94-.485L10.47 14H7.53l-.56 2.242a1 1 0 1 1-1.94-.485L5.47 14H3a1 1 0 1 1 0-2h2.97l1-4H5a1 1 0 1 1 0-2h2.47l.56-2.243a1 1 0 0 1 1.213-.727ZM9.03 8l-1 4h2.938l1-4H9.031Z\\\" clip-rule=\\\"evenodd\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M3 13a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1zm6-4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1zm6-4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1zM4 20h14\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M4 19h16M4 15l4-6l4 2l4-5l4 4\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"m4 19l4-6l4 2l4-5l4 4v5H4m0-7l3-4l4 2l5-6l4 4\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<g fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\"><path d=\\\"M10 3.2A9 9 0 1 0 20.8 14a1 1 0 0 0-1-1H13a2 2 0 0 1-2-2V4a.9.9 0 0 0-1-.8\\\"/><path d=\\\"M15 3.5A9 9 0 0 1 20.5 9H16a1 1 0 0 1-1-1V3.5\\\"/></g>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<g fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\"><path d=\\\"M3 3v18h18\\\"/><path d=\\\"M7 15a2 2 0 1 0 4 0a2 2 0 1 0-4 0m4-10a2 2 0 1 0 4 0a2 2 0 1 0-4 0m5 7a2 2 0 1 0 4 0a2 2 0 1 0-4 0m5-9l-6 1.5m-.887 2.15l2.771 3.695M16 12.5l-5 2\\\"/></g>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M3 16a3 3 0 1 0 6 0a3 3 0 1 0-6 0m11 3a2 2 0 1 0 4 0a2 2 0 1 0-4 0M10 7.5a4.5 4.5 0 1 0 9 0a4.5 4.5 0 1 0-9 0\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<g fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\"><path d=\\\"m12 3l9.5 7L18 21H6L2.5 10z\\\"/><path d=\\\"m12 7.5l5.5 4L15 17H8.5l-2-5.5z\\\"/><path d=\\\"m2.5 10l9.5 3l9.5-3\\\"/><path d=\\\"M12 3v10l6 8M6 21l6-8\\\"/></g>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<g fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\"><path d=\\\"M11 12a1 1 0 1 0 2 0a1 1 0 1 0-2 0\\\"/><path d=\\\"M15.51 15.56A5 5 0 1 0 12 17\\\"/><path d=\\\"M18.832 17.86A9 9 0 1 0 12 21m0-9v9\\\"/></g>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm8-2v16m-8-5h8m0-3h8m-4 0v8m0-4h4\\\"/>\"\n};\nexport default data;\n","/**\n * Custom SVG icons for drizzle-cube\n * These are hand-crafted icons when existing icon libraries don't have good options\n */\n\nimport type { IconifyIcon } from '@iconify/types'\n\n/**\n * Custom Flow/Sankey icon\n * Nodes connected by flowing S-curve paths representing user journey flows\n * Shows data flowing between stages with branching paths\n * 24x24 viewBox, stroke-width 1.5 for clean appearance\n */\nexport const flowIcon: IconifyIcon = {\n body: `<g fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"3\" y=\"4\" width=\"5\" height=\"3\" rx=\"0.75\"/>\n <rect x=\"16\" y=\"4\" width=\"5\" height=\"3\" rx=\"0.75\"/>\n <rect x=\"16\" y=\"10.5\" width=\"5\" height=\"3\" rx=\"0.75\"/>\n <rect x=\"16\" y=\"17\" width=\"5\" height=\"3\" rx=\"0.75\"/>\n <path d=\"M8 5.5 C11 5.5, 13 5.5, 16 5.5\"/>\n <path d=\"M8 5.5 C10 5.5, 11 7, 12 9 C13 11, 14 12, 16 12\"/>\n <path d=\"M8 5.5 C10 5.5, 11 10, 12 14 C13 17, 14 18.5, 16 18.5\"/>\n </g>`,\n width: 24,\n height: 24,\n}\n\n/**\n * Custom Funnel icon\n * Horizontal bars that progressively narrow, showing conversion stages\n * Connected by angled lines showing flow between stages\n * 24x24 viewBox, stroke-width 1.5 for clean appearance\n */\nexport const funnelIcon: IconifyIcon = {\n body: `<g fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"2\" y=\"3\" width=\"20\" height=\"4\" rx=\"1\"/>\n <rect x=\"4\" y=\"10\" width=\"16\" height=\"4\" rx=\"1\"/>\n <rect x=\"6\" y=\"17\" width=\"12\" height=\"4\" rx=\"1\"/>\n </g>`,\n width: 24,\n height: 24,\n}\n\n/**\n * Custom Retention icon\n * Grid/heatmap pattern representing cohort retention matrix\n * Shows users tracked across time periods with varying intensity cells\n * 24x24 viewBox, stroke-width 1.5 for clean appearance\n */\nexport const retentionIcon: IconifyIcon = {\n body: `<g fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <!-- Grid cells representing retention matrix -->\n <rect x=\"3\" y=\"3\" width=\"4\" height=\"4\" rx=\"0.5\"/>\n <rect x=\"10\" y=\"3\" width=\"4\" height=\"4\" rx=\"0.5\"/>\n <rect x=\"17\" y=\"3\" width=\"4\" height=\"4\" rx=\"0.5\"/>\n <rect x=\"3\" y=\"10\" width=\"4\" height=\"4\" rx=\"0.5\"/>\n <rect x=\"10\" y=\"10\" width=\"4\" height=\"4\" rx=\"0.5\"/>\n <rect x=\"17\" y=\"10\" width=\"4\" height=\"4\" rx=\"0.5\"/>\n <rect x=\"3\" y=\"17\" width=\"4\" height=\"4\" rx=\"0.5\"/>\n <rect x=\"10\" y=\"17\" width=\"4\" height=\"4\" rx=\"0.5\"/>\n <rect x=\"17\" y=\"17\" width=\"4\" height=\"4\" rx=\"0.5\"/>\n </g>`,\n width: 24,\n height: 24,\n}\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<g fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\"><path d=\\\"M8.848 14.667L5.5 17.5M12 3v5m4 4h5M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0m11.219 3.328L17 19.5\\\"/><path d=\\\"M8 12a4 4 0 1 0 8 0a4 4 0 1 0-8 0\\\"/></g>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M3 5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5zm0 5h18M10 3v18\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<g fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\"><path d=\\\"M11.795 21H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4m-1 3v4h4\\\"/><path d=\\\"M14 18a4 4 0 1 0 8 0a4 4 0 1 0-8 0m1-15v4M7 3v4m-4 4h16\\\"/></g>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M4 17V7l7 10V7m4 10h5m-5-7a2.5 3 0 1 0 5 0a2.5 3 0 1 0-5 0\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<g fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\"><path d=\\\"m3 17l6-6l4 4l8-8\\\"/><path d=\\\"M14 7h7v7\\\"/></g>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M4 20h3m7 0h7M6.9 15h6.9m-3.6-8.7L16 20M5 20l6-16h2l7 16\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<g fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\"><path d=\\\"M14 3v4a1 1 0 0 0 1 1h4\\\"/><path d=\\\"M17 21H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7l5 5v11a2 2 0 0 1-2 2zM9 9h1m-1 4h6m-6 4h6\\\"/></g>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<g fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\"><path d=\\\"M3 12a9 9 0 1 0 18 0a9 9 0 0 0-18 0m9-3h.01\\\"/><path d=\\\"M11 12h1v4h1\\\"/></g>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"m8 9l4-4l4 4m0 6l-4 4l-4-4\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M16 6a2 2 0 1 0 4 0a2 2 0 1 0-4 0M4 12a2 2 0 1 0 4 0a2 2 0 1 0-4 0m0 6a2 2 0 1 0 4 0a2 2 0 1 0-4 0m12 0a2 2 0 1 0 4 0a2 2 0 1 0-4 0m-8 0h8m2 2v1m0-18v1M6 20v1m0-11V3m6 0v18m6-13v8M8 12h13m0-6h-1m-4 0H3m0 6h1m16 6h1M3 18h1m2-4v2\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"m9 20l-5.447-2.724A1 1 0 0 1 3 16.382V5.618a1 1 0 0 1 1.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0 0 21 18.382V7.618a1 1 0 0 0-.553-.894L15 4m0 13V4m0 0L9 7\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 24,\n\t\"height\": 24,\n\t\"body\": \"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"m20 7l-8-4l-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4\\\"/>\"\n};\nexport default data;\n","/**\n * Default icon definitions using Iconify icon sets\n * Uses HeroIcons (outline/solid) and Tabler icons via Iconify\n */\n\n// HeroIcons Outline\nimport xMark from '@iconify-icons/heroicons-outline/x-mark'\nimport plus from '@iconify-icons/heroicons-outline/plus'\nimport pencil from '@iconify-icons/heroicons-outline/pencil'\nimport trash from '@iconify-icons/heroicons-outline/trash'\nimport arrowPath from '@iconify-icons/heroicons-outline/arrow-path'\nimport clipboardDocument from '@iconify-icons/heroicons-outline/clipboard-document'\nimport documentDuplicate from '@iconify-icons/heroicons-outline/document-duplicate'\nimport cog from '@iconify-icons/heroicons-outline/cog'\nimport funnel from '@iconify-icons/heroicons-outline/funnel'\nimport share from '@iconify-icons/heroicons-outline/share'\nimport chevronUp from '@iconify-icons/heroicons-outline/chevron-up'\nimport chevronDown from '@iconify-icons/heroicons-outline/chevron-down'\nimport chevronLeft from '@iconify-icons/heroicons-outline/chevron-left'\nimport chevronRight from '@iconify-icons/heroicons-outline/chevron-right'\nimport magnifyingGlass from '@iconify-icons/heroicons-outline/magnifying-glass'\nimport bars3 from '@iconify-icons/heroicons-outline/bars-3'\nimport checkCircle from '@iconify-icons/heroicons-outline/check-circle'\nimport exclamationTriangle from '@iconify-icons/heroicons-outline/exclaimation-triangle'\nimport exclamationCircle from '@iconify-icons/heroicons-outline/exclamation-circle'\nimport sparkles from '@iconify-icons/heroicons-outline/sparkles'\nimport eye from '@iconify-icons/heroicons-outline/eye'\nimport eyeSlash from '@iconify-icons/heroicons-outline/eye-slash'\nimport adjustmentsHorizontal from '@iconify-icons/heroicons-outline/adjustments-horizontal'\nimport computerDesktop from '@iconify-icons/heroicons-outline/computer-desktop'\nimport tableCells from '@iconify-icons/heroicons-outline/table-cells'\nimport link from '@iconify-icons/heroicons-outline/link'\nimport arrowRight from '@iconify-icons/heroicons-outline/arrow-right'\nimport sun from '@iconify-icons/heroicons-outline/sun'\nimport moon from '@iconify-icons/heroicons-outline/moon'\nimport ellipsisHorizontal from '@iconify-icons/heroicons-outline/ellipsis-horizontal'\nimport documentText from '@iconify-icons/heroicons-outline/document-text'\nimport bookOpen from '@iconify-icons/heroicons-outline/book-open'\nimport codeBracket from '@iconify-icons/heroicons-outline/code-bracket'\nimport swatch from '@iconify-icons/heroicons-outline/swatch'\nimport camera from '@iconify-icons/heroicons-outline/camera'\nimport handThumbUp from '@iconify-icons/heroicons-solid/hand-thumb-up'\nimport handThumbDown from '@iconify-icons/heroicons-solid/hand-thumb-down'\n\n// HeroIcons Solid (for field type indicators and measures)\nimport chartBarSolid from '@iconify-icons/heroicons-solid/chart-bar'\nimport tagSolid from '@iconify-icons/heroicons-solid/tag'\nimport calendarSolid from '@iconify-icons/heroicons-solid/calendar'\nimport rectangleGroupSolid from '@iconify-icons/heroicons-solid/rectangle-group'\nimport playSolid from '@iconify-icons/heroicons-solid/play'\nimport checkSolid from '@iconify-icons/heroicons-solid/check'\nimport scaleSolid from '@iconify-icons/heroicons-solid/scale'\nimport arrowDownCircleSolid from '@iconify-icons/heroicons-solid/arrow-down-circle'\nimport arrowUpCircleSolid from '@iconify-icons/heroicons-solid/arrow-up-circle'\nimport arrowTrendingUpSolid from '@iconify-icons/heroicons-solid/arrow-trending-up'\nimport beakerSolid from '@iconify-icons/heroicons-solid/beaker'\nimport bars3BottomLeftSolid from '@iconify-icons/heroicons-solid/bars-3-bottom-left'\nimport fingerPrintSolid from '@iconify-icons/heroicons-solid/finger-print'\nimport chartBarSquareSolid from '@iconify-icons/heroicons-solid/chart-bar-square'\nimport plusCircleSolid from '@iconify-icons/heroicons-solid/plus-circle'\nimport hashtagSolid from '@iconify-icons/heroicons-solid/hashtag'\n\n// Tabler icons for chart types (already using these)\nimport chartBarTabler from '@iconify-icons/tabler/chart-bar'\nimport chartLine from '@iconify-icons/tabler/chart-line'\nimport chartAreaLine from '@iconify-icons/tabler/chart-area-line'\nimport chartPie from '@iconify-icons/tabler/chart-pie'\nimport chartDots2 from '@iconify-icons/tabler/chart-dots-2'\nimport chartBubble from '@iconify-icons/tabler/chart-bubble'\nimport chartRadar from '@iconify-icons/tabler/chart-radar'\nimport radar2 from '@iconify-icons/tabler/radar-2'\nimport chartTreemap from '@iconify-icons/tabler/chart-treemap'\n// Custom icons - better represents flow/funnel/retention visualizations\nimport { flowIcon, funnelIcon, retentionIcon } from './customIcons'\nimport chartDonut4 from '@iconify-icons/tabler/chart-donut-4'\nimport table from '@iconify-icons/tabler/table'\nimport calendarStats from '@iconify-icons/tabler/calendar-stats'\nimport number from '@iconify-icons/tabler/number'\nimport trendingUp from '@iconify-icons/tabler/trending-up'\nimport typography from '@iconify-icons/tabler/typography'\nimport fileText from '@iconify-icons/tabler/file-text'\nimport infoCircle from '@iconify-icons/tabler/info-circle'\nimport selector from '@iconify-icons/tabler/selector'\nimport chartGridDots from '@iconify-icons/tabler/chart-grid-dots'\nimport map from '@iconify-icons/heroicons-outline/map'\nimport cubeOutline from '@iconify-icons/heroicons-outline/cube'\n\nimport type { IconRegistry } from './types'\n\n/**\n * Default icon registry with all icons used in drizzle-cube\n */\nexport const DEFAULT_ICONS: IconRegistry = {\n // Action icons\n close: { icon: xMark, category: 'action' },\n add: { icon: plus, category: 'action' },\n edit: { icon: pencil, category: 'action' },\n delete: { icon: trash, category: 'action' },\n refresh: { icon: arrowPath, category: 'action' },\n copy: { icon: clipboardDocument, category: 'action' },\n duplicate: { icon: documentDuplicate, category: 'action' },\n settings: { icon: cog, category: 'action' },\n filter: { icon: funnel, category: 'action' },\n share: { icon: share, category: 'action' },\n expand: { icon: chevronDown, category: 'action' },\n collapse: { icon: chevronUp, category: 'action' },\n search: { icon: magnifyingGlass, category: 'action' },\n menu: { icon: bars3, category: 'action' },\n run: { icon: playSolid, category: 'action' },\n check: { icon: checkSolid, category: 'action' },\n link: { icon: link, category: 'action' },\n eye: { icon: eye, category: 'action' },\n eyeOff: { icon: eyeSlash, category: 'action' },\n adjustments: { icon: adjustmentsHorizontal, category: 'action' },\n desktop: { icon: computerDesktop, category: 'action' },\n table: { icon: tableCells, category: 'action' },\n sun: { icon: sun, category: 'action' },\n moon: { icon: moon, category: 'action' },\n ellipsisHorizontal: { icon: ellipsisHorizontal, category: 'action' },\n documentText: { icon: documentText, category: 'action' },\n bookOpen: { icon: bookOpen, category: 'action' },\n codeBracket: { icon: codeBracket, category: 'action' },\n swatch: { icon: swatch, category: 'action' },\n camera: { icon: camera, category: 'action' },\n thumbUp: { icon: handThumbUp, category: 'action' },\n thumbDown: { icon: handThumbDown, category: 'action' },\n schemaGraph: { icon: map, category: 'action' },\n cube: { icon: cubeOutline, category: 'action' },\n\n // Field type icons (solid for visual distinction)\n measure: { icon: chartBarSolid, category: 'field' },\n dimension: { icon: tagSolid, category: 'field' },\n timeDimension: { icon: calendarSolid, category: 'field' },\n segment: { icon: rectangleGroupSolid, category: 'field' },\n\n // Chart type icons (Tabler - keeping existing visuals)\n chartBar: { icon: chartBarTabler, category: 'chart' },\n chartLine: { icon: chartLine, category: 'chart' },\n chartArea: { icon: chartAreaLine, category: 'chart' },\n chartPie: { icon: chartPie, category: 'chart' },\n chartScatter: { icon: chartDots2, category: 'chart' },\n chartBubble: { icon: chartBubble, category: 'chart' },\n chartRadar: { icon: chartRadar, category: 'chart' },\n chartRadialBar: { icon: radar2, category: 'chart' },\n chartTreemap: { icon: chartTreemap, category: 'chart' },\n chartTable: { icon: table, category: 'chart' },\n chartActivityGrid: { icon: calendarStats, category: 'chart' },\n chartKpiNumber: { icon: number, category: 'chart' },\n chartKpiDelta: { icon: trendingUp, category: 'chart' },\n chartKpiText: { icon: typography, category: 'chart' },\n chartMarkdown: { icon: fileText, category: 'chart' },\n chartFunnel: { icon: funnelIcon, category: 'chart' },\n chartSankey: { icon: flowIcon, category: 'chart' },\n chartSunburst: { icon: chartDonut4, category: 'chart' },\n chartHeatmap: { icon: chartGridDots, category: 'chart' },\n chartRetention: { icon: retentionIcon, category: 'chart' },\n\n // Measure type icons (solid)\n measureCount: { icon: bars3BottomLeftSolid, category: 'measure' },\n measureCountDistinct: { icon: fingerPrintSolid, category: 'measure' },\n measureCountDistinctApprox: { icon: chartBarSquareSolid, category: 'measure' },\n measureSum: { icon: plusCircleSolid, category: 'measure' },\n measureAvg: { icon: scaleSolid, category: 'measure' },\n measureMin: { icon: arrowDownCircleSolid, category: 'measure' },\n measureMax: { icon: arrowUpCircleSolid, category: 'measure' },\n measureRunningTotal: { icon: arrowTrendingUpSolid, category: 'measure' },\n measureCalculated: { icon: beakerSolid, category: 'measure' },\n measureNumber: { icon: hashtagSolid, category: 'measure' },\n\n // State icons\n success: { icon: checkCircle, category: 'state' },\n warning: { icon: exclamationTriangle, category: 'state' },\n error: { icon: exclamationCircle, category: 'state' },\n info: { icon: infoCircle, category: 'state' },\n loading: { icon: arrowPath, category: 'state' },\n sparkles: { icon: sparkles, category: 'state' },\n\n // Navigation icons\n chevronUp: { icon: chevronUp, category: 'navigation' },\n chevronDown: { icon: chevronDown, category: 'navigation' },\n chevronLeft: { icon: chevronLeft, category: 'navigation' },\n chevronRight: { icon: chevronRight, category: 'navigation' },\n chevronUpDown: { icon: selector, category: 'navigation' },\n arrowUp: { icon: arrowUpCircleSolid, category: 'navigation' },\n arrowDown: { icon: arrowDownCircleSolid, category: 'navigation' },\n arrowRight: { icon: arrowRight, category: 'navigation' },\n arrowPath: { icon: arrowPath, category: 'navigation' },\n}\n","/**\n * Icon Registry - Centralized icon management following the theme pattern\n * Allows users to override any icon with their own implementations\n */\n\nimport { Icon } from '@iconify/react'\nimport type { IconifyIcon } from '@iconify/types'\nimport type { ComponentType } from 'react'\nimport { DEFAULT_ICONS } from './defaultIcons'\nimport type { IconRegistry, IconName, IconDefinition, IconCategory, IconProps, PartialIconRegistry } from './types'\n\n// Internal mutable registry - starts with defaults\nlet _registry: IconRegistry = { ...DEFAULT_ICONS }\n\n// Cache for icon components to avoid recreating on every getIcon() call\n// This prevents React from unmounting/remounting icons on each render\nconst _iconComponentCache = new Map<IconName, ComponentType<IconProps>>()\n\n/**\n * Get the full icon registry\n */\nexport function getIconRegistry(): IconRegistry {\n return _registry\n}\n\n/**\n * Get a specific icon as a React component\n * @param name The icon name from the registry\n * @returns A React component that renders the icon (cached for stable references)\n */\nexport function getIcon(name: IconName): ComponentType<IconProps> {\n // Check cache first for stable component references\n const cached = _iconComponentCache.get(name)\n if (cached) {\n return cached\n }\n\n const iconDef = _registry[name]\n if (!iconDef) {\n console.warn(`Icon \"${name}\" not found in registry, using fallback`)\n // Create and cache fallback component\n const FallbackIcon = ({ className, ...props }: IconProps) => (\n <Icon icon={_registry.info.icon} className={className} {...props} />\n )\n return FallbackIcon\n }\n\n // Create and cache the icon component\n const IconComponent = ({ className, ...props }: IconProps) => (\n <Icon icon={iconDef.icon} className={className} {...props} />\n )\n _iconComponentCache.set(name, IconComponent)\n return IconComponent\n}\n\n/**\n * Get icon data directly (for use with Iconify's Icon component)\n * @param name The icon name from the registry\n * @returns The IconifyIcon data\n */\nexport function getIconData(name: IconName): IconifyIcon {\n return _registry[name]?.icon ?? _registry.info.icon\n}\n\n/**\n * Override a single icon in the registry\n * @param name The icon name to override\n * @param icon The new IconifyIcon data\n */\nexport function setIcon(name: IconName, icon: IconifyIcon): void {\n if (_registry[name]) {\n _registry[name] = {\n ..._registry[name],\n icon\n }\n // Clear cache for this icon so it gets recreated with new definition\n _iconComponentCache.delete(name)\n }\n}\n\n/**\n * Register multiple icon overrides at once\n * @param overrides Partial registry with icons to override\n */\nexport function registerIcons(overrides: PartialIconRegistry): void {\n for (const [key, value] of Object.entries(overrides)) {\n if (value && key in _registry) {\n const iconKey = key as IconName\n\n // Check if it's a raw IconifyIcon or a full IconDefinition\n if ('body' in value) {\n // It's an IconifyIcon\n _registry[iconKey] = {\n ..._registry[iconKey],\n icon: value as IconifyIcon\n }\n } else {\n // It's a partial IconDefinition\n const partial = value as Partial<IconDefinition>\n _registry[iconKey] = {\n ..._registry[iconKey],\n ...partial,\n icon: partial.icon ?? _registry[iconKey].icon\n }\n }\n // Clear cache for this icon so it gets recreated with new definition\n _iconComponentCache.delete(iconKey)\n }\n }\n}\n\n/**\n * Reset the registry to default icons\n */\nexport function resetIcons(): void {\n _registry = { ...DEFAULT_ICONS }\n // Clear all cached icon components\n _iconComponentCache.clear()\n}\n\n/**\n * Get all icons in a specific category\n * @param category The icon category to filter by\n * @returns Record of icon names to their components\n */\nexport function getIconsByCategory(category: IconCategory): Record<string, ComponentType<IconProps>> {\n const result: Record<string, ComponentType<IconProps>> = {}\n\n for (const [key, value] of Object.entries(_registry)) {\n if (value.category === category) {\n result[key] = getIcon(key as IconName)\n }\n }\n\n return result\n}\n\n/**\n * Helper to get measure type icon component\n * @param measureType The measure type (count, avg, sum, etc.)\n * @returns React component for the icon\n */\nexport function getMeasureTypeIcon(measureType: string | undefined): ComponentType<IconProps> {\n const typeMap: Record<string, IconName> = {\n count: 'measureCount',\n countDistinct: 'measureCountDistinct',\n countDistinctApprox: 'measureCountDistinctApprox',\n sum: 'measureSum',\n avg: 'measureAvg',\n min: 'measureMin',\n max: 'measureMax',\n runningTotal: 'measureRunningTotal',\n calculated: 'measureCalculated',\n number: 'measureNumber'\n }\n\n const iconName = typeMap[measureType || ''] || 'measureCount'\n return getIcon(iconName)\n}\n\n/**\n * Helper to get chart type icon component\n * @param chartType The chart type (bar, line, pie, etc.)\n * @returns React component for the icon\n */\nexport function getChartTypeIcon(chartType: string): ComponentType<IconProps> {\n const typeMap: Record<string, IconName> = {\n bar: 'chartBar',\n line: 'chartLine',\n area: 'chartArea',\n pie: 'chartPie',\n scatter: 'chartScatter',\n bubble: 'chartBubble',\n radar: 'chartRadar',\n radialBar: 'chartRadialBar',\n treemap: 'chartTreemap',\n table: 'chartTable',\n activityGrid: 'chartActivityGrid',\n kpiNumber: 'chartKpiNumber',\n kpiDelta: 'chartKpiDelta',\n kpiText: 'chartKpiText',\n markdown: 'chartMarkdown',\n funnel: 'chartFunnel',\n sankey: 'chartSankey',\n sunburst: 'chartSunburst',\n heatmap: 'chartHeatmap'\n }\n\n const iconName = typeMap[chartType] || 'chartBar'\n return getIcon(iconName)\n}\n\n/**\n * Helper to get field type icon component\n * @param fieldType The field type (measure, dimension, timeDimension)\n * @returns React component for the icon\n */\nexport function getFieldTypeIcon(fieldType: string): ComponentType<IconProps> {\n const typeMap: Record<string, IconName> = {\n measure: 'measure',\n dimension: 'dimension',\n timeDimension: 'timeDimension',\n time: 'timeDimension',\n segment: 'segment'\n }\n\n const iconName = typeMap[fieldType] || 'dimension'\n return getIcon(iconName)\n}\n","/**\n * CubeMetaProvider - Metadata Context Layer\n *\n * Provides cube metadata (meta, labelMap) isolated from API layer.\n * This prevents components from re-rendering when metadata loads\n * if they only need API access.\n *\n * Uses TanStack Query for metadata fetching with built-in caching.\n */\n\nimport { useCallback, useMemo, type ReactNode } from 'react'\nimport { useCubeMetaQuery } from '../hooks/queries/useCubeMetaQuery'\nimport { CubeMetaContext } from './CubeMetaContext'\n\ninterface CubeMetaProviderProps {\n children: ReactNode\n}\n\nexport function CubeMetaProvider({ children }: CubeMetaProviderProps) {\n // Use TanStack Query hook for metadata fetching\n const {\n meta,\n labelMap,\n isLoading: metaLoading,\n error,\n refetch,\n getFieldLabel: getFieldLabelFromQuery\n } = useCubeMetaQuery()\n\n // Convert error to string for backward compatibility\n const metaError = error ? (error instanceof Error ? error.message : String(error)) : null\n\n // Wrap refetch to match expected signature\n const refetchMeta = useCallback(() => {\n refetch()\n }, [refetch])\n\n // Create stable getFieldLabel that reads from current labelMap\n const getFieldLabel = useCallback((fieldName: string): string => {\n return getFieldLabelFromQuery(fieldName)\n }, [getFieldLabelFromQuery])\n\n // Memoize context value to prevent unnecessary re-renders\n const value = useMemo(() => ({\n meta,\n labelMap,\n metaLoading,\n metaError,\n getFieldLabel,\n refetchMeta\n }), [meta, labelMap, metaLoading, metaError, getFieldLabel, refetchMeta])\n\n return (\n <CubeMetaContext.Provider value={value}>\n {children}\n </CubeMetaContext.Provider>\n )\n}\n","/**\n * CubeProvider - Backward Compatibility Wrapper\n *\n * This provider wraps the three specialized context providers (API, Meta, Features)\n * to maintain 100% backward compatibility with existing code using useCubeContext().\n *\n * New code should use the specialized hooks (useCubeApi, useCubeMeta, useCubeFeatures)\n * for better performance and selective re-rendering.\n *\n * Also includes TanStack Query's QueryClientProvider for data fetching in\n * AnalysisBuilder and other components that use TanStack Query hooks.\n */\n\nimport { useMemo, useState, type ReactNode } from 'react'\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query'\nimport { CubeApiProvider, useCubeApi } from './CubeApiProvider'\nimport { CubeMetaProvider } from './CubeMetaProvider'\nimport { useCubeMeta } from './CubeMetaContext'\nimport { CubeFeaturesProvider, useCubeFeatures } from './CubeFeaturesProvider'\nimport type { CubeQueryOptions, CubeApiOptions, FeaturesConfig, DashboardLayoutMode, CubeMeta, FieldLabelMap } from '../types'\nimport type { CubeClient } from '../client/CubeClient'\nimport type { BatchCoordinator } from '../client/BatchCoordinator'\n\nconst DEFAULT_API_OPTIONS: CubeApiOptions = { apiUrl: '/cubejs-api/v1' }\n\nexport const createCubeQueryClient = () => new QueryClient({\n defaultOptions: {\n queries: {\n // Stale time: 5 minutes (matches existing cache duration)\n staleTime: 5 * 60 * 1000,\n // GC time: 15 minutes\n gcTime: 15 * 60 * 1000,\n // Retry failed queries up to 3 times\n retry: 3,\n // Don't refetch on window focus by default (can be overridden per-query)\n refetchOnWindowFocus: false,\n },\n },\n})\n\n// Legacy default client (useful for tests or explicit injection)\nexport const queryClient = createCubeQueryClient()\n\n// Backward compatible interface - merges all three contexts\ninterface CubeContextValue {\n cubeApi: CubeClient\n options?: CubeQueryOptions\n meta: CubeMeta | null\n labelMap: FieldLabelMap\n metaLoading: boolean\n metaError: string | null\n getFieldLabel: (fieldName: string) => string\n refetchMeta: () => void\n updateApiConfig: (apiOptions: CubeApiOptions, token?: string) => void\n features: FeaturesConfig\n batchCoordinator: BatchCoordinator | null\n enableBatching: boolean\n dashboardModes: DashboardLayoutMode[]\n}\n\ninterface CubeProviderProps {\n cubeApi?: CubeClient\n apiOptions?: CubeApiOptions\n token?: string\n options?: CubeQueryOptions\n features?: FeaturesConfig\n dashboardModes?: DashboardLayoutMode[]\n enableBatching?: boolean\n batchDelayMs?: number // Delay in ms to collect queries before batching (default: 100)\n queryClient?: QueryClient\n children: ReactNode\n}\n\n/**\n * CubeProvider - Three-layer context wrapper\n *\n * Wraps children in three isolated context providers for optimal performance:\n * 1. CubeApiProvider - Stable API layer (changes only on auth)\n * 2. CubeMetaProvider - Metadata layer (changes on metadata load)\n * 3. CubeFeaturesProvider - Feature flags layer (changes on feature updates)\n */\nexport function CubeProvider({\n cubeApi: _initialCubeApi, // Intentionally unused - for backward compatibility\n apiOptions,\n token,\n options,\n features,\n dashboardModes,\n enableBatching,\n batchDelayMs,\n queryClient: providedQueryClient,\n children\n}: CubeProviderProps) {\n const [internalQueryClient] = useState(() => createCubeQueryClient())\n const queryClient = providedQueryClient ?? internalQueryClient\n\n return (\n <QueryClientProvider client={queryClient}>\n <CubeApiProvider\n apiOptions={apiOptions || DEFAULT_API_OPTIONS}\n token={token}\n options={options}\n enableBatching={enableBatching}\n batchDelayMs={batchDelayMs}\n >\n <CubeMetaProvider>\n <CubeFeaturesProvider features={features} dashboardModes={dashboardModes}>\n {children}\n </CubeFeaturesProvider>\n </CubeMetaProvider>\n </CubeApiProvider>\n </QueryClientProvider>\n )\n}\n\n/**\n * useCubeContext - Backward compatible hook\n *\n * Merges all three contexts into a single object for backward compatibility.\n * Components using this hook will re-render when ANY context changes.\n *\n * For better performance, use specialized hooks:\n * - useCubeApi() - Only re-renders on API changes\n * - useCubeMeta() - Only re-renders on metadata changes\n * - useCubeFeatures() - Only re-renders on feature changes\n */\nexport function useCubeContext(): CubeContextValue {\n const api = useCubeApi()\n const meta = useCubeMeta()\n const featuresCtx = useCubeFeatures()\n\n return useMemo(() => ({\n ...api,\n ...meta,\n features: featuresCtx.features,\n dashboardModes: featuresCtx.dashboardModes\n }), [api, meta, featuresCtx])\n}\n\n// Re-export specialized hooks for better tree-shaking and performance\nexport { useCubeApi, useCubeMeta, useCubeFeatures }\n\n// Export factory for testing and advanced use cases\nexport { createCubeQueryClient as createQueryClient }\n","/**\n * Pivot utilities for DataTable time dimension pivoting\n *\n * When a query includes a time dimension with granularity, transforms flat data\n * into a pivoted structure with time periods as columns.\n */\n\nimport type { CubeQuery, CubeMeta } from '../types'\nimport { formatTimeValue } from './chartUtils'\n\n/**\n * Derives ordered column list from a CubeQuery object.\n * Order: dimensions, timeDimensions (as field names), measures\n *\n * @param queryObject The CubeQuery object\n * @returns Array of field names in order\n */\nexport function getOrderedColumnsFromQuery(queryObject?: CubeQuery): string[] {\n if (!queryObject) return []\n\n const columns: string[] = []\n\n // Add regular dimensions first\n if (queryObject.dimensions) {\n columns.push(...queryObject.dimensions)\n }\n\n // Add time dimensions\n if (queryObject.timeDimensions) {\n queryObject.timeDimensions.forEach(td => {\n if (!columns.includes(td.dimension)) {\n columns.push(td.dimension)\n }\n })\n }\n\n // Add measures last\n if (queryObject.measures) {\n columns.push(...queryObject.measures)\n }\n\n return columns\n}\n\n/**\n * Configuration for pivoting based on query structure\n */\nexport interface PivotConfig {\n /** Time dimension field name (e.g., \"Sales.date\") */\n timeDimension: string\n /** Time granularity (e.g., \"month\", \"day\", \"year\") */\n granularity: string\n /** Non-time dimension fields */\n dimensions: string[]\n /** Measure fields */\n measures: string[]\n}\n\n/**\n * Column definition for pivoted table\n */\nexport interface PivotColumn {\n /** Column key for data access */\n key: string\n /** Display label for column header */\n label: string\n /** Whether this is a time column (vs row identifier column) */\n isTimeColumn: boolean\n /** Whether this is the measure column */\n isMeasureColumn?: boolean\n}\n\n/**\n * Row in the pivoted table\n */\nexport interface PivotRow {\n /** Unique row identifier */\n id: string\n /** The measure field name (for icon lookup) */\n measureField: string\n /** Values keyed by column key */\n values: Record<string, any>\n /** Whether this is the first row in a dimension group (for row spanning) */\n isFirstInGroup?: boolean\n /** Number of rows to span for dimension cells (only set on first row in group) */\n dimensionRowSpan?: number\n}\n\n/**\n * Result of pivoting table data\n */\nexport interface PivotedTableData {\n /** Whether data was pivoted (has time dimension with granularity) */\n isPivoted: boolean\n /** Column definitions for the pivoted table */\n columns: PivotColumn[]\n /** Rows of pivoted data */\n rows: PivotRow[]\n}\n\n/**\n * Determines if a query has a time dimension with granularity that should trigger pivoting\n * @param queryObject The CubeQuery object\n * @param xAxisOverride Optional array of fields to use for filtering dimensions and measures\n * (for respecting chartConfig.xAxis configuration)\n * @returns PivotConfig if pivoting should occur, null otherwise\n */\nexport function hasTimeDimensionForPivot(\n queryObject?: CubeQuery,\n xAxisOverride?: string[]\n): PivotConfig | null {\n if (!queryObject?.timeDimensions?.length) return null\n\n // Find the first time dimension with granularity\n const timeDim = queryObject.timeDimensions.find(td => td.granularity)\n if (!timeDim?.granularity) return null\n\n // Must have at least one measure to pivot\n if (!queryObject.measures?.length) return null\n\n let dimensions: string[]\n let measures: string[]\n\n if (xAxisOverride && xAxisOverride.length > 0) {\n // Filter dimensions from xAxisOverride (excluding time dimension and measures)\n dimensions = xAxisOverride.filter(field => {\n // Exclude the time dimension being pivoted (it becomes columns)\n if (field === timeDim.dimension) return false\n // Exclude measures (they become row values, not dimension columns)\n if (queryObject.measures?.includes(field)) return false\n return true\n })\n\n // Filter measures from xAxisOverride - only show measures that are in xAxis\n const measuresInXAxis = xAxisOverride.filter(field =>\n queryObject.measures?.includes(field)\n )\n // If xAxis contains measures, use only those; otherwise fall back to all measures\n measures = measuresInXAxis.length > 0 ? measuresInXAxis : queryObject.measures\n } else {\n dimensions = queryObject.dimensions || []\n measures = queryObject.measures\n }\n\n // Must have at least one measure after filtering\n if (measures.length === 0) return null\n\n return {\n timeDimension: timeDim.dimension,\n granularity: timeDim.granularity,\n dimensions,\n measures\n }\n}\n\n/**\n * Extracts unique time values from data and sorts them chronologically\n */\nfunction extractAndSortTimeValues(\n data: any[],\n timeDimension: string,\n granularity: string\n): string[] {\n const timeSet = new Set<string>()\n\n data.forEach(row => {\n const rawTime = row[timeDimension]\n if (rawTime != null) {\n const formattedTime = formatTimeValue(rawTime, granularity)\n timeSet.add(formattedTime)\n }\n })\n\n // Sort chronologically - ISO date strings sort correctly alphabetically\n return Array.from(timeSet).sort()\n}\n\n/**\n * Builds column definitions for pivoted table\n * Order: Measure (if multiple) -> Dimensions -> Time columns\n */\nfunction buildColumns(\n config: PivotConfig,\n timeValues: string[],\n getFieldLabel: (field: string) => string\n): PivotColumn[] {\n const columns: PivotColumn[] = []\n\n // Add measure column first (if multiple measures)\n if (config.measures.length > 1) {\n columns.push({\n key: '__measure__',\n label: 'Measure',\n isTimeColumn: false,\n isMeasureColumn: true\n })\n }\n\n // Add dimension columns\n config.dimensions.forEach(dim => {\n columns.push({\n key: dim,\n label: getFieldLabel(dim),\n isTimeColumn: false\n })\n })\n\n // Add time columns (already sorted chronologically)\n timeValues.forEach(timeVal => {\n columns.push({\n key: timeVal,\n label: timeVal,\n isTimeColumn: true\n })\n })\n\n return columns\n}\n\n/**\n * Groups data by dimension values, then by time period\n * Returns Map<dimensionKey, Map<formattedTime, dataRow>>\n */\nfunction groupByDimensions(\n data: any[],\n config: PivotConfig\n): Map<string, Map<string, any>> {\n const grouped = new Map<string, Map<string, any>>()\n\n data.forEach(row => {\n // Build dimension key from all dimension values\n const dimKey = config.dimensions.length > 0\n ? config.dimensions.map(dim => String(row[dim] ?? '')).join('|')\n : '__all__'\n\n // Get or create time map for this dimension combo\n if (!grouped.has(dimKey)) {\n grouped.set(dimKey, new Map())\n }\n\n // Store data point by formatted time value\n const rawTime = row[config.timeDimension]\n if (rawTime != null) {\n const formattedTime = formatTimeValue(rawTime, config.granularity)\n grouped.get(dimKey)!.set(formattedTime, row)\n }\n })\n\n return grouped\n}\n\n/**\n * Builds pivoted rows from grouped data\n * Rows are grouped by measure first (all Revenue rows together, all Quantity rows together)\n * Then within each measure group, rows are ordered by dimension values\n */\nfunction buildPivotedRows(\n data: any[],\n config: PivotConfig,\n timeValues: string[],\n getFieldLabel: (field: string) => string\n): PivotRow[] {\n // Group data by dimensions and time\n const grouped = groupByDimensions(data, config)\n const dimensionKeys = Array.from(grouped.keys())\n\n const rows: PivotRow[] = []\n const measureCount = config.measures.length\n const dimensionCount = dimensionKeys.length\n\n // Iterate over measures first, then dimensions\n // This groups all rows for one measure together\n config.measures.forEach((measure) => {\n dimensionKeys.forEach((dimensionKey, dimIndex) => {\n const timeData = grouped.get(dimensionKey)!\n const rowId = measureCount > 1\n ? `${measure}|${dimensionKey}`\n : dimensionKey\n\n const values: Record<string, any> = {}\n\n // Add dimension values\n const dimValues = dimensionKey === '__all__' ? [] : dimensionKey.split('|')\n config.dimensions.forEach((dim, idx) => {\n values[dim] = dimValues[idx] ?? ''\n })\n\n // Add measure name if multiple measures (for display in Measure column)\n if (measureCount > 1) {\n values['__measure__'] = getFieldLabel(measure)\n }\n\n // Add time period values\n timeValues.forEach(timeVal => {\n const dataPoint = timeData.get(timeVal)\n values[timeVal] = dataPoint?.[measure] ?? null\n })\n\n // Track grouping for row spanning (when multiple measures)\n // First row of each measure group should span all dimension rows\n const isFirstInGroup = dimIndex === 0\n const measureRowSpan = isFirstInGroup && measureCount > 1 ? dimensionCount : undefined\n\n rows.push({\n id: rowId,\n measureField: measure,\n values,\n isFirstInGroup,\n dimensionRowSpan: measureRowSpan\n })\n })\n })\n\n return rows\n}\n\n/**\n * Pivots flat data into time-columned table structure\n *\n * @param data Raw data array from query result\n * @param config Pivot configuration\n * @param getFieldLabel Function to get display label for a field\n * @param meta Optional cube metadata for looking up measure types\n * @returns Pivoted table data structure\n */\nexport function pivotTableData(\n data: any[],\n config: PivotConfig,\n getFieldLabel: (field: string) => string,\n _meta?: CubeMeta | null\n): PivotedTableData {\n if (!data || data.length === 0) {\n return { isPivoted: true, columns: [], rows: [] }\n }\n\n // Extract unique time values and sort chronologically\n const timeValues = extractAndSortTimeValues(data, config.timeDimension, config.granularity)\n\n // Build column definitions\n const columns = buildColumns(config, timeValues, getFieldLabel)\n\n // Build pivoted rows\n const rows = buildPivotedRows(data, config, timeValues, getFieldLabel)\n\n return { isPivoted: true, columns, rows }\n}\n\n/**\n * Looks up the measure type from metadata\n *\n * @param measureField The fully qualified measure field name (e.g., \"Sales.revenue\")\n * @param meta Cube metadata\n * @returns The measure type (e.g., \"sum\", \"count\", \"avg\") or undefined\n */\nexport function getMeasureType(measureField: string, meta: CubeMeta | null): string | undefined {\n if (!meta?.cubes) return undefined\n\n for (const cube of meta.cubes) {\n const measure = cube.measures.find(m => m.name === measureField)\n if (measure) {\n return measure.type\n }\n }\n\n return undefined\n}\n","/**\n * Data Table component with time dimension pivoting\n *\n * When a query includes a time dimension with granularity, the table\n * automatically pivots to show time periods as columns.\n */\n\nimport React, { useMemo } from 'react'\nimport { useCubeMeta } from '../../providers/CubeProvider'\nimport { getMeasureTypeIcon } from '../../icons'\nimport {\n hasTimeDimensionForPivot,\n pivotTableData,\n getMeasureType,\n getOrderedColumnsFromQuery,\n type PivotedTableData,\n type PivotColumn,\n type PivotRow\n} from '../../utils/pivotUtils'\nimport { formatAxisValue } from '../../utils/chartUtils'\nimport type { ChartProps, AxisFormatConfig } from '../../types'\n\nconst DataTable = React.memo(function DataTable({\n data,\n chartConfig,\n displayConfig = {},\n queryObject,\n height = 300\n}: ChartProps) {\n const { getFieldLabel, meta } = useCubeMeta()\n\n // Detect if we should pivot based on query structure\n // Pass chartConfig.xAxis to respect user-configured column ordering\n const pivotConfig = useMemo(\n () => hasTimeDimensionForPivot(queryObject, chartConfig?.xAxis),\n [queryObject, chartConfig?.xAxis]\n )\n\n // Check if pivoting is enabled (default: true when time dimension present)\n const enablePivot = displayConfig?.pivotTimeDimension !== false\n\n // Compute pivoted data if applicable\n const pivotedData = useMemo<PivotedTableData | null>(() => {\n if (!pivotConfig || !enablePivot) return null\n return pivotTableData(data, pivotConfig, getFieldLabel, meta)\n }, [data, pivotConfig, enablePivot, getFieldLabel, meta])\n\n // Empty state\n if (!data || data.length === 0) {\n return (\n <div\n className=\"dc:flex dc:items-center dc:justify-center dc:w-full\"\n style={{ height }}\n >\n <div className=\"dc:text-center text-dc-text-muted\">\n <div className=\"dc:text-sm dc:font-semibold dc:mb-1\">No data available</div>\n <div className=\"dc:text-xs text-dc-text-secondary\">No data to display in table</div>\n </div>\n </div>\n )\n }\n\n // Render pivoted table if applicable\n if (pivotedData?.isPivoted && pivotedData.columns.length > 0) {\n return (\n <PivotedTable\n pivotedData={pivotedData}\n height={height}\n meta={meta}\n leftYAxisFormat={displayConfig?.leftYAxisFormat}\n />\n )\n }\n\n // Fallback to flat table rendering\n return (\n <FlatTable\n data={data}\n chartConfig={chartConfig}\n queryObject={queryObject}\n height={height}\n getFieldLabel={getFieldLabel}\n leftYAxisFormat={displayConfig?.leftYAxisFormat}\n />\n )\n})\n\nexport default DataTable\n\n/**\n * Pivoted table component - renders time dimension as columns\n */\nfunction PivotedTable({\n pivotedData,\n height,\n meta,\n leftYAxisFormat\n}: {\n pivotedData: PivotedTableData\n height: number | string\n meta: any\n leftYAxisFormat?: AxisFormatConfig\n}) {\n const { columns, rows } = pivotedData\n\n if (columns.length === 0 || rows.length === 0) {\n return (\n <div\n className=\"dc:flex dc:items-center dc:justify-center dc:w-full\"\n style={{ height }}\n >\n <div className=\"dc:text-center text-dc-text-muted\">\n <div className=\"dc:text-sm dc:font-semibold dc:mb-1\">No data available</div>\n <div className=\"dc:text-xs text-dc-text-secondary\">No data to display in table</div>\n </div>\n </div>\n )\n }\n\n return (\n <div className=\"dc:w-full dc:overflow-auto\" style={{ height }}>\n <table className=\"dc:min-w-full dc:divide-y border-dc-border\">\n <thead className=\"bg-dc-surface-secondary dc:sticky dc:top-0\">\n <tr>\n {columns.map((col: PivotColumn) => (\n <th\n key={col.key}\n className={`dc:px-3 dc:py-2 dc:text-xs dc:font-medium text-dc-text-muted dc:uppercase dc:tracking-wider dc:whitespace-nowrap ${\n col.isTimeColumn ? 'dc:text-right' : 'dc:text-left'\n }`}\n >\n {col.label}\n </th>\n ))}\n </tr>\n </thead>\n <tbody className=\"bg-dc-surface dc:divide-y border-dc-border\">\n {rows.map((row: PivotRow) => (\n <PivotedTableRow\n key={row.id}\n row={row}\n columns={columns}\n meta={meta}\n leftYAxisFormat={leftYAxisFormat}\n />\n ))}\n </tbody>\n </table>\n </div>\n )\n}\n\n/**\n * Single row in the pivoted table\n * Supports row spanning for measure cells when grouped by measure\n */\nfunction PivotedTableRow({\n row,\n columns,\n meta,\n leftYAxisFormat\n}: {\n row: PivotRow\n columns: PivotColumn[]\n meta: any\n leftYAxisFormat?: AxisFormatConfig\n}) {\n // Get measure icon for this row\n const measureType = getMeasureType(row.measureField, meta)\n const MeasureIcon = getMeasureTypeIcon(measureType)\n\n return (\n <tr className=\"hover:bg-dc-surface-secondary\">\n {columns.map((col: PivotColumn) => {\n const value = row.values[col.key]\n\n // Measure column - show icon + label with row spanning\n if (col.isMeasureColumn) {\n // Skip this cell if not first in measure group\n if (row.isFirstInGroup === false) {\n return null\n }\n\n return (\n <td\n key={col.key}\n className=\"dc:px-3 dc:py-2 dc:whitespace-nowrap dc:text-sm text-dc-text dc:align-top\"\n rowSpan={row.dimensionRowSpan}\n >\n <div className=\"dc:flex dc:items-center\">\n <MeasureIcon className=\"dc:w-3.5 dc:h-3.5 dc:mr-1.5 text-dc-text-muted dc:shrink-0\" />\n <span>{value}</span>\n </div>\n </td>\n )\n }\n\n // Time column - right-aligned, formatted values (these are measure values)\n if (col.isTimeColumn) {\n return (\n <td\n key={col.key}\n className=\"dc:px-3 dc:py-2 dc:whitespace-nowrap dc:text-sm dc:text-right text-dc-text\"\n >\n {formatPivotCellValue(value, leftYAxisFormat)}\n </td>\n )\n }\n\n // Dimension column - left-aligned (no row spanning) - no number formatting\n return (\n <td\n key={col.key}\n className=\"dc:px-3 dc:py-2 dc:whitespace-nowrap dc:text-sm text-dc-text\"\n >\n {formatPivotCellValue(value)}\n </td>\n )\n })}\n </tr>\n )\n}\n\n/**\n * Format cell value for pivoted table display\n * Shows \"-\" for null/undefined values\n */\nfunction formatPivotCellValue(value: any, formatConfig?: AxisFormatConfig): string {\n if (value === null || value === undefined) return '-'\n if (typeof value === 'number') {\n // Use formatAxisValue if config provided\n if (formatConfig) {\n return formatAxisValue(value, formatConfig)\n }\n // Format with locale and up to 2 decimal places\n if (Number.isInteger(value)) {\n return value.toLocaleString()\n }\n return parseFloat(value.toFixed(2)).toLocaleString()\n }\n if (typeof value === 'boolean') {\n return value ? 'Yes' : 'No'\n }\n return String(value)\n}\n\n/**\n * Flat table component - original non-pivoted table rendering\n */\nfunction FlatTable({\n data,\n chartConfig,\n queryObject,\n height,\n getFieldLabel,\n leftYAxisFormat\n}: {\n data: any[]\n chartConfig?: { xAxis?: string[] }\n queryObject?: ChartProps['queryObject']\n height: number | string\n getFieldLabel: (field: string) => string\n leftYAxisFormat?: AxisFormatConfig\n}) {\n // Get all columns available in data\n const allColumns = Object.keys(data[0] || {})\n\n // Determine column order with proper fallback:\n // 1. If xAxis is configured, use that order\n // 2. Otherwise, derive order from queryObject (dimensions + timeDimensions + measures)\n // 3. Fallback: Object.keys order\n const columns = useMemo(() => {\n // If xAxis is configured, use that order (filtered to existing columns)\n if (chartConfig?.xAxis && chartConfig.xAxis.length > 0) {\n return chartConfig.xAxis.filter(col => allColumns.includes(col))\n }\n\n // Derive order from queryObject\n const queryOrder = getOrderedColumnsFromQuery(queryObject)\n if (queryOrder.length > 0) {\n // Filter to only columns that exist in data\n const ordered = queryOrder.filter(col => allColumns.includes(col))\n // Add any columns in data that weren't in query (edge case)\n const remaining = allColumns.filter(col => !ordered.includes(col))\n return [...ordered, ...remaining]\n }\n\n // Final fallback: Object.keys order\n return allColumns\n }, [chartConfig?.xAxis, queryObject, allColumns])\n\n if (columns.length === 0) {\n return (\n <div\n className=\"dc:flex dc:items-center dc:justify-center dc:w-full\"\n style={{ height }}\n >\n <div className=\"dc:text-center text-dc-text-muted\">\n <div className=\"dc:text-sm dc:font-semibold dc:mb-1\">No columns available</div>\n <div className=\"dc:text-xs text-dc-text-secondary\">Data structure is invalid</div>\n </div>\n </div>\n )\n }\n\n return (\n <div className=\"dc:w-full dc:overflow-auto\" style={{ height }}>\n <table className=\"dc:min-w-full dc:divide-y border-dc-border\">\n <thead className=\"bg-dc-surface-secondary dc:sticky dc:top-0\">\n <tr>\n {columns.map((column) => (\n <th\n key={column}\n className=\"dc:px-3 dc:py-2 dc:text-left dc:text-xs dc:font-medium text-dc-text-muted dc:uppercase dc:tracking-wider\"\n >\n {getFieldLabel(column)}\n </th>\n ))}\n </tr>\n </thead>\n <tbody className=\"bg-dc-surface dc:divide-y border-dc-border\">\n {data.map((row, index) => (\n <tr key={index} className=\"hover:bg-dc-surface-secondary\">\n {columns.map((column) => (\n <td\n key={column}\n className=\"dc:px-3 dc:py-2 dc:whitespace-nowrap dc:text-sm text-dc-text\"\n >\n {formatCellValue(row[column], leftYAxisFormat)}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )\n}\n\n/**\n * Format cell value for flat table display\n */\nfunction formatCellValue(value: any, formatConfig?: AxisFormatConfig): string {\n if (value == null) return ''\n if (typeof value === 'number') {\n // Use formatAxisValue if config provided\n if (formatConfig) {\n return formatAxisValue(value, formatConfig)\n }\n return value.toLocaleString()\n }\n if (typeof value === 'boolean') {\n return value ? 'Yes' : 'No'\n }\n return String(value)\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,94,95,96,97,98,99,100,101,102,103,104,105],"mappings":";;;;;;AACA,IAAI,IAAe,MAAM;CACvB,cAAc;AAEZ,EADA,KAAK,4BAA4B,IAAI,KAAK,EAC1C,KAAK,YAAY,KAAK,UAAU,KAAK,KAAK;;CAE5C,UAAU,GAAU;AAGlB,SAFA,KAAK,UAAU,IAAI,EAAS,EAC5B,KAAK,aAAa,QACL;AAEX,GADA,KAAK,UAAU,OAAO,EAAS,EAC/B,KAAK,eAAe;;;CAGxB,eAAe;AACb,SAAO,KAAK,UAAU,OAAO;;CAE/B,cAAc;CAEd,gBAAgB;GC0Cd,IAAe,IA3DA,cAAc,EAAa;CAC5C;CACA;CACA;CACA,cAAc;AAEZ,EADA,OAAO,EACP,MAAA,KAAe,MAAY;AACzB,OAAI,OAAO,SAAW,OAAe,OAAO,kBAAkB;IAC5D,IAAM,UAAiB,GAAS;AAEhC,WADA,OAAO,iBAAiB,oBAAoB,GAAU,GAAM,QAC/C;AACX,YAAO,oBAAoB,oBAAoB,EAAS;;;;;CAMhE,cAAc;AACZ,EAAK,MAAA,KACH,KAAK,iBAAiB,MAAA,EAAY;;CAGtC,gBAAgB;AACd,EAAK,KAAK,cAAc,KACtB,MAAA,KAAiB,EACjB,MAAA,IAAgB,KAAK;;CAGzB,iBAAiB,GAAO;AAGtB,EAFA,MAAA,IAAc,GACd,MAAA,KAAiB,EACjB,MAAA,IAAgB,GAAO,MAAY;AACjC,GAAI,OAAO,KAAY,YACrB,KAAK,WAAW,EAAQ,GAExB,KAAK,SAAS;IAEhB;;CAEJ,WAAW,GAAS;AAElB,EADgB,MAAA,MAAkB,MAEhC,MA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