mage-ai 0.9.46__py3-none-any.whl → 0.9.47__py3-none-any.whl

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 (309) hide show
  1. mage_ai/api/operations/base.py +27 -5
  2. mage_ai/api/policies/GlobalHookPolicy.py +1 -1
  3. mage_ai/api/policies/IntegrationSourcePolicy.py +62 -0
  4. mage_ai/api/policies/OauthPolicy.py +6 -6
  5. mage_ai/api/presenters/GlobalHookPresenter.py +1 -1
  6. mage_ai/api/presenters/IntegrationSourcePresenter.py +9 -2
  7. mage_ai/api/presenters/PipelinePresenter.py +2 -0
  8. mage_ai/api/presenters/PipelineRunPresenter.py +8 -3
  9. mage_ai/api/presenters/PipelineSchedulePresenter.py +22 -1
  10. mage_ai/api/resources/BlockResource.py +5 -0
  11. mage_ai/api/resources/DataProviderResource.py +2 -0
  12. mage_ai/api/resources/IntegrationSourceResource.py +149 -2
  13. mage_ai/data_integrations/sources/constants.py +5 -0
  14. mage_ai/data_integrations/utils/scheduler.py +57 -2
  15. mage_ai/data_preparation/executors/block_executor.py +9 -1
  16. mage_ai/data_preparation/models/block/__init__.py +25 -12
  17. mage_ai/data_preparation/models/block/data_integration/constants.py +3 -0
  18. mage_ai/data_preparation/models/block/data_integration/utils.py +196 -37
  19. mage_ai/data_preparation/models/block/sql/utils/shared.py +18 -1
  20. mage_ai/data_preparation/models/block/utils.py +28 -13
  21. mage_ai/data_preparation/models/global_hooks/constants.py +50 -1
  22. mage_ai/data_preparation/models/global_hooks/models.py +148 -84
  23. mage_ai/data_preparation/models/global_hooks/predicates.py +316 -0
  24. mage_ai/data_preparation/models/pipeline.py +2 -0
  25. mage_ai/data_preparation/models/pipelines/integration_pipeline.py +0 -1
  26. mage_ai/data_preparation/preferences.py +29 -18
  27. mage_ai/data_preparation/repo_manager.py +12 -2
  28. mage_ai/data_preparation/sync/__init__.py +2 -0
  29. mage_ai/data_preparation/templates/constants.py +14 -0
  30. mage_ai/data_preparation/templates/data_exporters/chroma.py +24 -0
  31. mage_ai/data_preparation/templates/data_exporters/streaming/rabbitmq.yaml +7 -0
  32. mage_ai/data_preparation/templates/data_loaders/chroma.py +27 -0
  33. mage_ai/data_preparation/templates/repo/io_config.yaml +3 -0
  34. mage_ai/io/base.py +1 -0
  35. mage_ai/io/chroma.py +153 -0
  36. mage_ai/io/config.py +8 -0
  37. mage_ai/orchestration/db/models/schedules.py +98 -34
  38. mage_ai/orchestration/pipeline_scheduler.py +58 -19
  39. mage_ai/server/constants.py +1 -1
  40. mage_ai/server/frontend_dist/404.html +2 -2
  41. mage_ai/server/frontend_dist/_next/static/N3FS4bHv0jpYeeg672uYK/_buildManifest.js +1 -0
  42. mage_ai/server/frontend_dist/_next/static/chunks/{1749-9a6276b2918fdae1.js → 1749-bf512b4dabbab7fa.js} +1 -1
  43. mage_ai/server/frontend_dist/_next/static/chunks/{1952-ac7722e8b1ab88fe.js → 1952-57858e7445d24413.js} +1 -1
  44. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/2714-1e79e9f2e998b544.js → frontend_dist/_next/static/chunks/2714-68fef54789d7eaeb.js} +1 -1
  45. mage_ai/server/frontend_dist/_next/static/chunks/2717-92cdffd87b6f6e05.js +1 -0
  46. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/3419-f8d518d024e7b5c8.js → frontend_dist/_next/static/chunks/3419-715ca383fa15a5ef.js} +1 -1
  47. mage_ai/server/frontend_dist/_next/static/chunks/3437-b4d6a037cf5781f8.js +1 -0
  48. mage_ai/server/frontend_dist/_next/static/chunks/3943-c9fb980f03df6450.js +1 -0
  49. mage_ai/server/frontend_dist/_next/static/chunks/4267-cb102e060a43d9bd.js +1 -0
  50. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/4366-93e09e5a4a7e182c.js → frontend_dist/_next/static/chunks/4366-3e52497942acbafe.js} +1 -1
  51. mage_ai/server/frontend_dist/_next/static/chunks/{4783-1a21d9be47574bba.js → 4783-422429203610c318.js} +1 -1
  52. mage_ai/server/frontend_dist/_next/static/chunks/5810-e26a0768db1cfdba.js +1 -0
  53. mage_ai/server/frontend_dist/_next/static/chunks/{5896-14e5a23b1c6a0769.js → 5896-7b8e36634d7d94eb.js} +1 -1
  54. mage_ai/server/frontend_dist/_next/static/chunks/{6285-e9b45335bfb9ccaf.js → 6285-648f9a732e100b2f.js} +1 -1
  55. mage_ai/server/frontend_dist/_next/static/chunks/6798-b904395b0c18647b.js +1 -0
  56. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/7022-070ec0144a4d029c.js → frontend_dist/_next/static/chunks/7022-e76cae3ba5ee5312.js} +1 -1
  57. mage_ai/server/frontend_dist/_next/static/chunks/722-900f786d24f91b2e.js +1 -0
  58. mage_ai/server/frontend_dist/_next/static/chunks/{7361-694e1e4fb9c97d68.js → 7361-6c5c9063b9f91700.js} +1 -1
  59. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/8146-92e7ccfed169ee9c.js → frontend_dist/_next/static/chunks/8146-27f0e31f309897a5.js} +1 -1
  60. mage_ai/server/frontend_dist/_next/static/chunks/845-9a73c65fe3fdc328.js +1 -0
  61. mage_ai/server/frontend_dist/_next/static/chunks/8487-8e1c09546dff4dbf.js +1 -0
  62. mage_ai/server/frontend_dist/_next/static/chunks/9264-cc44b07f248707b0.js +1 -0
  63. mage_ai/server/frontend_dist/_next/static/chunks/9618-4eb49cdbd1ba11d7.js +1 -0
  64. mage_ai/server/frontend_dist/_next/static/chunks/{976-18c98af60b76f1a7.js → 976-0a8c2c4d7acd957b.js} +1 -1
  65. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-78c4a077a2f279c2.js +1 -0
  66. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-b37d221eb5ddc248.js +1 -0
  67. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-7adc543fc490367a.js +1 -0
  68. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks-51d366993f6dd449.js +1 -0
  69. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{files-449a022f2f0f2d94.js → files-fe6e73463a20d67c.js} +1 -1
  70. mage_ai/server/frontend_dist/_next/static/chunks/pages/{manage-f83deb790548693b.js → manage-d8a38b5d1f50e798.js} +1 -1
  71. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-9adc2974aada27ba.js +1 -0
  72. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-51b1311dff2a974e.js +1 -0
  73. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-2333e524d34b474a.js +1 -0
  74. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-e051057d9fe94f23.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-6d1afeb4a84f50f7.js} +1 -1
  75. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1ff9bb8e22ca1e75.js +1 -0
  76. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-11363aa58d51f4e1.js +1 -0
  77. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-779c3ef0676a12ac.js +1 -0
  78. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-bbea9a088657404a.js +1 -0
  79. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-3737f2b0afc2ede3.js +1 -0
  80. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-3c8f062913c66f3e.js +1 -0
  81. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-c1f4ed17d501ccca.js +1 -0
  82. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-8bdd858240d5dbf6.js +1 -0
  83. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-dd4fb405695f74bf.js +1 -0
  84. mage_ai/server/frontend_dist/block-layout.html +2 -2
  85. mage_ai/server/frontend_dist/compute.html +5 -5
  86. mage_ai/server/frontend_dist/files.html +5 -5
  87. mage_ai/server/frontend_dist/global-data-products/[...slug].html +5 -5
  88. mage_ai/server/frontend_dist/global-data-products.html +5 -5
  89. mage_ai/server/frontend_dist/global-hooks/[...slug].html +5 -5
  90. mage_ai/server/frontend_dist/global-hooks.html +5 -5
  91. mage_ai/server/frontend_dist/index.html +2 -2
  92. mage_ai/server/frontend_dist/manage/files.html +5 -5
  93. mage_ai/server/frontend_dist/manage/settings.html +5 -5
  94. mage_ai/server/frontend_dist/manage/users/[user].html +5 -5
  95. mage_ai/server/frontend_dist/manage/users/new.html +5 -5
  96. mage_ai/server/frontend_dist/manage/users.html +5 -5
  97. mage_ai/server/frontend_dist/manage.html +5 -5
  98. mage_ai/server/frontend_dist/oauth.html +4 -4
  99. mage_ai/server/frontend_dist/overview.html +5 -5
  100. mage_ai/server/frontend_dist/pipeline-runs.html +5 -5
  101. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +5 -5
  102. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +5 -5
  103. mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +5 -5
  104. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
  105. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +5 -5
  106. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +5 -5
  107. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +5 -5
  108. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +5 -5
  109. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +5 -5
  110. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +5 -5
  111. mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +5 -5
  112. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +5 -5
  113. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +5 -5
  114. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +5 -5
  115. mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
  116. mage_ai/server/frontend_dist/pipelines.html +5 -5
  117. mage_ai/server/frontend_dist/settings/account/profile.html +5 -5
  118. mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +5 -5
  119. mage_ai/server/frontend_dist/settings/workspace/permissions.html +5 -5
  120. mage_ai/server/frontend_dist/settings/workspace/preferences.html +5 -5
  121. mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +5 -5
  122. mage_ai/server/frontend_dist/settings/workspace/roles.html +5 -5
  123. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +5 -5
  124. mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +5 -5
  125. mage_ai/server/frontend_dist/settings/workspace/users.html +5 -5
  126. mage_ai/server/frontend_dist/settings.html +2 -2
  127. mage_ai/server/frontend_dist/sign-in.html +20 -20
  128. mage_ai/server/frontend_dist/templates/[...slug].html +5 -5
  129. mage_ai/server/frontend_dist/templates.html +5 -5
  130. mage_ai/server/frontend_dist/terminal.html +5 -5
  131. mage_ai/server/frontend_dist/test.html +5 -5
  132. mage_ai/server/frontend_dist/triggers.html +5 -5
  133. mage_ai/server/frontend_dist/version-control.html +5 -5
  134. mage_ai/server/frontend_dist_base_path_template/404.html +2 -2
  135. mage_ai/server/frontend_dist_base_path_template/_next/static/aoO6jYZLVlUGCCdY-wmy8/_buildManifest.js +1 -0
  136. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1749-9a6276b2918fdae1.js → 1749-bf512b4dabbab7fa.js} +1 -1
  137. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1952-ac7722e8b1ab88fe.js → 1952-57858e7445d24413.js} +1 -1
  138. mage_ai/server/{frontend_dist/_next/static/chunks/2714-1e79e9f2e998b544.js → frontend_dist_base_path_template/_next/static/chunks/2714-68fef54789d7eaeb.js} +1 -1
  139. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-92cdffd87b6f6e05.js +1 -0
  140. mage_ai/server/{frontend_dist/_next/static/chunks/3419-f8d518d024e7b5c8.js → frontend_dist_base_path_template/_next/static/chunks/3419-715ca383fa15a5ef.js} +1 -1
  141. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3437-b4d6a037cf5781f8.js +1 -0
  142. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3943-c9fb980f03df6450.js +1 -0
  143. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4267-cb102e060a43d9bd.js +1 -0
  144. mage_ai/server/{frontend_dist/_next/static/chunks/4366-93e09e5a4a7e182c.js → frontend_dist_base_path_template/_next/static/chunks/4366-3e52497942acbafe.js} +1 -1
  145. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{4783-1a21d9be47574bba.js → 4783-422429203610c318.js} +1 -1
  146. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5810-e26a0768db1cfdba.js +1 -0
  147. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{5896-14e5a23b1c6a0769.js → 5896-7b8e36634d7d94eb.js} +1 -1
  148. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{6285-e9b45335bfb9ccaf.js → 6285-648f9a732e100b2f.js} +1 -1
  149. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6798-b904395b0c18647b.js +1 -0
  150. mage_ai/server/{frontend_dist/_next/static/chunks/7022-070ec0144a4d029c.js → frontend_dist_base_path_template/_next/static/chunks/7022-e76cae3ba5ee5312.js} +1 -1
  151. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/722-900f786d24f91b2e.js +1 -0
  152. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{7361-694e1e4fb9c97d68.js → 7361-6c5c9063b9f91700.js} +1 -1
  153. mage_ai/server/{frontend_dist/_next/static/chunks/8146-92e7ccfed169ee9c.js → frontend_dist_base_path_template/_next/static/chunks/8146-27f0e31f309897a5.js} +1 -1
  154. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/845-9a73c65fe3fdc328.js +1 -0
  155. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8487-8e1c09546dff4dbf.js +1 -0
  156. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-cc44b07f248707b0.js +1 -0
  157. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9618-4eb49cdbd1ba11d7.js +1 -0
  158. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{976-18c98af60b76f1a7.js → 976-0a8c2c4d7acd957b.js} +1 -1
  159. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-78c4a077a2f279c2.js +1 -0
  160. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-b37d221eb5ddc248.js +1 -0
  161. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-7adc543fc490367a.js +1 -0
  162. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks-51d366993f6dd449.js +1 -0
  163. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{files-449a022f2f0f2d94.js → files-fe6e73463a20d67c.js} +1 -1
  164. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{manage-f83deb790548693b.js → manage-d8a38b5d1f50e798.js} +1 -1
  165. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-9adc2974aada27ba.js +1 -0
  166. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-51b1311dff2a974e.js +1 -0
  167. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-2333e524d34b474a.js +1 -0
  168. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-e051057d9fe94f23.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-6d1afeb4a84f50f7.js} +1 -1
  169. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1ff9bb8e22ca1e75.js +1 -0
  170. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-11363aa58d51f4e1.js +1 -0
  171. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-779c3ef0676a12ac.js +1 -0
  172. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-bbea9a088657404a.js +1 -0
  173. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-3737f2b0afc2ede3.js +1 -0
  174. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-3c8f062913c66f3e.js +1 -0
  175. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-c1f4ed17d501ccca.js +1 -0
  176. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-8bdd858240d5dbf6.js +1 -0
  177. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-dd4fb405695f74bf.js +1 -0
  178. mage_ai/server/frontend_dist_base_path_template/block-layout.html +2 -2
  179. mage_ai/server/frontend_dist_base_path_template/compute.html +5 -5
  180. mage_ai/server/frontend_dist_base_path_template/files.html +5 -5
  181. mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +5 -5
  182. mage_ai/server/frontend_dist_base_path_template/global-data-products.html +5 -5
  183. mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +5 -5
  184. mage_ai/server/frontend_dist_base_path_template/global-hooks.html +5 -5
  185. mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
  186. mage_ai/server/frontend_dist_base_path_template/manage/files.html +5 -5
  187. mage_ai/server/frontend_dist_base_path_template/manage/settings.html +5 -5
  188. mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +5 -5
  189. mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +5 -5
  190. mage_ai/server/frontend_dist_base_path_template/manage/users.html +5 -5
  191. mage_ai/server/frontend_dist_base_path_template/manage.html +5 -5
  192. mage_ai/server/frontend_dist_base_path_template/oauth.html +4 -4
  193. mage_ai/server/frontend_dist_base_path_template/overview.html +5 -5
  194. mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +5 -5
  195. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +5 -5
  196. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +5 -5
  197. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +5 -5
  198. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
  199. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +5 -5
  200. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +5 -5
  201. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +5 -5
  202. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +5 -5
  203. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +5 -5
  204. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +5 -5
  205. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +5 -5
  206. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +5 -5
  207. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +5 -5
  208. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +5 -5
  209. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
  210. mage_ai/server/frontend_dist_base_path_template/pipelines.html +5 -5
  211. mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +5 -5
  212. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +5 -5
  213. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +5 -5
  214. mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +5 -5
  215. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +5 -5
  216. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +5 -5
  217. mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +5 -5
  218. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +5 -5
  219. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +5 -5
  220. mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
  221. mage_ai/server/frontend_dist_base_path_template/sign-in.html +23 -23
  222. mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +5 -5
  223. mage_ai/server/frontend_dist_base_path_template/templates.html +5 -5
  224. mage_ai/server/frontend_dist_base_path_template/terminal.html +5 -5
  225. mage_ai/server/frontend_dist_base_path_template/test.html +5 -5
  226. mage_ai/server/frontend_dist_base_path_template/triggers.html +5 -5
  227. mage_ai/server/frontend_dist_base_path_template/version-control.html +5 -5
  228. mage_ai/server/server.py +9 -3
  229. mage_ai/services/k8s/job_manager.py +1 -0
  230. mage_ai/settings/repo.py +3 -0
  231. mage_ai/shared/files.py +47 -0
  232. mage_ai/shared/models.py +1 -0
  233. mage_ai/streaming/constants.py +1 -0
  234. mage_ai/streaming/sinks/postgres.py +2 -0
  235. mage_ai/streaming/sinks/rabbitmq.py +76 -0
  236. mage_ai/streaming/sinks/sink_factory.py +4 -0
  237. mage_ai/tests/api/operations/test_operations_with_hooks.py +136 -91
  238. mage_ai/tests/api/policies/test_oauth_policy.py +38 -0
  239. mage_ai/tests/data_preparation/models/global_hooks/test_global_hooks.py +33 -8
  240. mage_ai/tests/data_preparation/models/global_hooks/test_hook.py +82 -38
  241. mage_ai/tests/data_preparation/models/global_hooks/test_predicates.py +803 -0
  242. mage_ai/tests/data_preparation/models/global_hooks/test_utils.py +6 -1
  243. mage_ai/tests/data_preparation/models/test_block.py +26 -0
  244. mage_ai/tests/data_preparation/models/test_pipeline.py +10 -0
  245. mage_ai/tests/factory.py +40 -2
  246. mage_ai/tests/orchestration/test_pipeline_scheduler.py +82 -1
  247. mage_ai/tests/services/k8s/test_job_manager.py +16 -0
  248. mage_ai/tests/shared/mixins.py +60 -23
  249. mage_ai/tests/streaming/sinks/test_rabbitmq.py +36 -0
  250. {mage_ai-0.9.46.dist-info → mage_ai-0.9.47.dist-info}/METADATA +7 -4
  251. {mage_ai-0.9.46.dist-info → mage_ai-0.9.47.dist-info}/RECORD +257 -243
  252. {mage_ai-0.9.46.dist-info → mage_ai-0.9.47.dist-info}/WHEEL +1 -1
  253. mage_ai/server/frontend_dist/_next/static/9jB4XPuz6BzxBcG9VNao5/_buildManifest.js +0 -1
  254. mage_ai/server/frontend_dist/_next/static/chunks/3943-9e1105393a3be0de.js +0 -1
  255. mage_ai/server/frontend_dist/_next/static/chunks/4267-fd4d8049e83178de.js +0 -1
  256. mage_ai/server/frontend_dist/_next/static/chunks/5810-12eadc488265d55b.js +0 -1
  257. mage_ai/server/frontend_dist/_next/static/chunks/595-0d174b1f9fbfce4f.js +0 -1
  258. mage_ai/server/frontend_dist/_next/static/chunks/6333-bc1b433b428a9095.js +0 -1
  259. mage_ai/server/frontend_dist/_next/static/chunks/722-a1584445357a276c.js +0 -1
  260. mage_ai/server/frontend_dist/_next/static/chunks/8487-032ef9b17d20aad9.js +0 -1
  261. mage_ai/server/frontend_dist/_next/static/chunks/9264-1d4f0327d42fed91.js +0 -1
  262. mage_ai/server/frontend_dist/_next/static/chunks/9618-2c5045255ac5a6e7.js +0 -1
  263. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-ebef928183f9a3bb.js +0 -1
  264. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-0f2d4be6fdca86ca.js +0 -1
  265. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-77edfa32d000e88b.js +0 -1
  266. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks-e561ae38cf5592e8.js +0 -1
  267. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-10e9a2d19541caa2.js +0 -1
  268. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-c8d3a5289ab93f88.js +0 -1
  269. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-ff7e9108502f5716.js +0 -1
  270. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-0691711636fa95c7.js +0 -1
  271. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-2914e326a5f1ffe0.js +0 -1
  272. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-3a7500e6e53084d3.js +0 -1
  273. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-c0e551d265a8d467.js +0 -1
  274. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-e47db5c3eaf683af.js +0 -1
  275. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-55ac955dfa9a5a8d.js +0 -1
  276. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-29c92a9bc54ae5cd.js +0 -1
  277. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-572d82d6eb7a5d43.js +0 -1
  278. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-2d26d80370a2e481.js +0 -1
  279. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3943-9e1105393a3be0de.js +0 -1
  280. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4267-fd4d8049e83178de.js +0 -1
  281. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5810-12eadc488265d55b.js +0 -1
  282. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/595-0d174b1f9fbfce4f.js +0 -1
  283. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6333-bc1b433b428a9095.js +0 -1
  284. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/722-a1584445357a276c.js +0 -1
  285. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8487-032ef9b17d20aad9.js +0 -1
  286. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-1d4f0327d42fed91.js +0 -1
  287. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9618-2c5045255ac5a6e7.js +0 -1
  288. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-ebef928183f9a3bb.js +0 -1
  289. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-0f2d4be6fdca86ca.js +0 -1
  290. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-77edfa32d000e88b.js +0 -1
  291. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks-e561ae38cf5592e8.js +0 -1
  292. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-10e9a2d19541caa2.js +0 -1
  293. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-c8d3a5289ab93f88.js +0 -1
  294. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-ff7e9108502f5716.js +0 -1
  295. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-0691711636fa95c7.js +0 -1
  296. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-2914e326a5f1ffe0.js +0 -1
  297. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-3a7500e6e53084d3.js +0 -1
  298. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-c0e551d265a8d467.js +0 -1
  299. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-e47db5c3eaf683af.js +0 -1
  300. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-55ac955dfa9a5a8d.js +0 -1
  301. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-29c92a9bc54ae5cd.js +0 -1
  302. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-572d82d6eb7a5d43.js +0 -1
  303. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-2d26d80370a2e481.js +0 -1
  304. mage_ai/server/frontend_dist_base_path_template/_next/static/uPDjJYpJMst1q6psbRyte/_buildManifest.js +0 -1
  305. /mage_ai/server/frontend_dist/_next/static/{9jB4XPuz6BzxBcG9VNao5 → N3FS4bHv0jpYeeg672uYK}/_ssgManifest.js +0 -0
  306. /mage_ai/server/frontend_dist_base_path_template/_next/static/{uPDjJYpJMst1q6psbRyte → aoO6jYZLVlUGCCdY-wmy8}/_ssgManifest.js +0 -0
  307. {mage_ai-0.9.46.dist-info → mage_ai-0.9.47.dist-info}/LICENSE +0 -0
  308. {mage_ai-0.9.46.dist-info → mage_ai-0.9.47.dist-info}/entry_points.txt +0 -0
  309. {mage_ai-0.9.46.dist-info → mage_ai-0.9.47.dist-info}/top_level.txt +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9618],{29618:function(n,e,t){t.d(e,{Z:function(){return j}});var o=t(82394),i=t(75582),r=t(17717),l=t(82684),u=t(80329),c=t(69864),a=t(40761),d=t(44425),s=t(71180),A=t(38626),f=t(97618),R=t(55485),T=t(28598),O=A.default.div.withConfig({displayName:"ButtonGroup__ButtonGroupStyle",componentId:"sc-15vbmc8-0"})([""]),E=A.default.div.withConfig({displayName:"ButtonGroup__VerticalDivider",componentId:"sc-15vbmc8-1"})(["width:1px;"]),p=function(n){var e=n.children,t=n.divider,o=l.Children.toArray(e).length;return(0,T.jsx)(O,{children:(0,T.jsx)(R.ZP,{children:l.Children.map(e,(function(n,e){return n&&(0,T.jsxs)(f.Z,{children:[e>=1&&t&&(0,T.jsx)(E,{}),l.cloneElement(n,{borderRadiusLeft:o>=2&&0===e,borderRadiusRight:o>=2&&e===o-1,halfPaddingLeft:o>=2&&0!==e,halfPaddingRight:o>=2&&e!==o-1,noBorder:o>=2&&e>0&&e<o-1,noBorderRight:o>=2&&e!==o-1})]},"button-group-child-".concat(e))}))})})},v=t(75810),D=t(89706),h=t(93369),S=t(57653),C=t(38276),L=t(35686),N=t(39643),P=t(11498),_=t(85385),Z=t(68669),b=t(86735),M=t(53005),m=t(81728),k=t(72619),g=t(42041),y=t(44688);function w(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,o)}return t}function I(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?w(Object(t),!0).forEach((function(e){(0,o.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):w(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var j=function(n){var e=n.active,t=n.addNewBlock,A=n.disableRefreshWarning,f=n.fetchPipeline,O=n.fetchVariables,E=n.filePath,w=n.hideHeaderButtons,j=n.onContentChange,U=n.onUpdateFileSuccess,x=n.openSidekickView,B=n.pipeline,H=n.saveFile,X=n.selectedFilePath,F=n.sendTerminalMessage,K=n.setDisableShortcuts,Y=n.setErrors,W=n.setFilesTouched,G=n.setSelectedBlock,Q=(0,u.j)("apiReloads"),V=(0,i.Z)(Q,2)[1],q=(0,l.useState)(null),J=q[0],z=q[1],$=(0,l.useState)(!1),nn=$[0],en=($[1],(0,l.useRef)(null)),tn=(0,l.useMemo)((function(){return new a.Z}),[]),on=(0,l.useMemo)((function(){return{api_key:P.l,token:tn.decodedToken.token}}),[tn]),rn=L.ZP.statuses.list().data,ln=(0,l.useMemo)((function(){var n,e;return null===rn||void 0===rn||null===(n=rn.statuses)||void 0===n||null===(e=n[0])||void 0===e?void 0:e.repo_path}),[rn]),un=L.ZP.file_contents.detail(E).data;(0,l.useEffect)((function(){null!==un&&void 0!==un&&un.file_content?z(un.file_content):null!==un&&void 0!==un&&un.error&&(0,k.h$)(un,{onErrorCallback:function(n,e){return Y({errors:e,response:n})}})}),[un,Y]);var cn=(0,l.useState)(null===J||void 0===J?void 0:J.content),an=cn[0],dn=cn[1],sn=(0,l.useCallback)((function(n){dn(n),j&&(null===j||void 0===j||j(n))}),[j]),An=(0,l.useState)(!1),fn=An[0],Rn=An[1];(0,l.useEffect)((function(){e&&K&&(null===K||void 0===K||K(!0))}),[e,K]),(0,l.useEffect)((function(){var n;X&&(null===en||void 0===en||null===(n=en.current)||void 0===n||n.scrollIntoView())}),[X]);var Tn=(0,c.Db)(L.ZP.file_contents.useUpdate((null===J||void 0===J?void 0:J.path)&&encodeURIComponent(null===J||void 0===J?void 0:J.path)),{onSuccess:function(n){return(0,k.wD)(n,{callback:function(n){var e=n.file_content;V((function(n){return I(I({},n),{},(0,o.Z)({},"FileVersions/".concat(null===J||void 0===J?void 0:J.path),Number(new Date)))})),U&&(null===U||void 0===U||U(e))},onErrorCallback:function(n,e){return null===Y||void 0===Y?void 0:Y({errors:e,response:n})}})}}),On=(0,i.Z)(Tn,1)[0],En=(0,l.useCallback)((function(n,e){if(H)return H(n,e);On({file_content:I(I({},e),{},{content:n})}).then((function(){decodeURIComponent(E).split(r.sep).pop()===D.dT.METADATA_YAML&&O&&(null===O||void 0===O||O())})),W((function(n){return I(I({},n),{},(0,o.Z)({},null===e||void 0===e?void 0:e.path,!1))})),Rn(!1)}),[O,E,H,W,On]),pn=(0,l.useMemo)((function(){return(0,Z.lU)()}),[]),vn=(0,l.useMemo)((function(){var n,e,t,o;return null===(null===J||void 0===J||null===(n=J.path)||void 0===n?void 0:n.match(pn))?D.Lu.TXT:null===J||void 0===J||null===(e=J.path)||void 0===e||null===(t=e.match(pn))||void 0===t||null===(o=t[0])||void 0===o?void 0:o.split(".")[1]}),[pn,J]),Dn=(0,l.useMemo)((function(){if(null!==J&&void 0!==J&&J.path)return(0,T.jsx)(v.Z,{autoHeight:!0,language:D.nB[vn],onChange:function(n){sn(n),W((function(n){return I(I({},n),{},(0,o.Z)({},null===J||void 0===J?void 0:J.path,!0))})),Rn(!0)},onSave:function(n){En(n,J)},padding:10,selected:!0,textareaFocused:!0,value:(0,m.Pb)(null===J||void 0===J?void 0:J.content)?JSON.stringify(JSON.parse(null===J||void 0===J?void 0:J.content),null,2):null===J||void 0===J?void 0:J.content,width:"100%"})}),[J,vn,En,sn,W]),hn=null!==B&&void 0!==B&&B.blocks?(0,b.sE)(null===B||void 0===B?void 0:B.blocks,(function(n){var e=n.type;return d.tf.DATA_EXPORTER===e})):null,Sn=(0,c.Db)(L.ZP.blocks.pipelines.useUpdate(null===B||void 0===B?void 0:B.uuid,null===hn||void 0===hn?void 0:hn.uuid),{onSuccess:function(n){return(0,k.wD)(n,{callback:function(){null===f||void 0===f||f()}})}}),Cn=(0,i.Z)(Sn,1)[0],Ln=t&&B&&(vn===D.Lu.PY||vn===D.Lu.SQL||(vn===D.Lu.YAML||vn===D.Lu.R)&&(0,M.V3)(J,null===J||void 0===J?void 0:J.path))&&(0,Z.ck)(J.path.split(r.sep))!==d.tf.SCRATCHPAD&&(0,M.lr)(J)&&(0,T.jsx)(s.ZP,{onClick:function(){var n=(null===B||void 0===B?void 0:B.type)===S.qL.INTEGRATION,e=(0,Z.TU)(J,ln,B);t(e,(function(e){n&&hn&&Cn({block:I(I({},hn),{},{upstream_blocks:[e.uuid]})}),null===G||void 0===G||G(e)}))},primary:!0,children:"Add to current pipeline"}),Nn=F&&(0,T.jsx)(C.Z,{m:2,children:(0,T.jsx)(h.ZP,{disabled:!ln,inline:!0,loading:nn,onClick:function(){null===x||void 0===x||x(_.cH.TERMINAL),null===F||void 0===F||F(JSON.stringify(I(I({},on),{},{command:["stdin","pip install -r ".concat(ln,"/requirements.txt\r")]})))},title:ln?"Pip install packages from your saved requirements.txt file (\u2318+S to save).":"Please use right panel terminal to install packages.",uuid:"FileEditor/InstallPackages",children:"Install packages"})}),Pn="FileEditor/".concat(null===J||void 0===J?void 0:J.path),_n=(0,y.y)(),Zn=_n.registerOnKeyDown,bn=_n.unregisterOnKeyDown;return(0,l.useEffect)((function(){return function(){bn(Pn)}}),[bn,Pn]),Zn(Pn,(function(n,t){if(e&&!A)if((0,g.y)([N.zX,N.Um],t)||(0,g.y)([N.PQ,N.Um],t))n.preventDefault(),En(an,J);else if(fn&&(0,g.y)([N.zX,N.hS],t)){n.preventDefault();var o="".concat(J.path," has changes that are unsaved. ")+"Click cancel and save your changes before reloading page.";"undefined"!==typeof location&&window.confirm(o)&&location.reload()}}),[e,an,A,J,En,fn]),(0,T.jsxs)("div",{ref:en,children:[!w&&(0,T.jsx)(C.Z,{p:2,children:(0,T.jsxs)(R.ZP,{justifyContent:"space-between",children:[(0,T.jsxs)(p,{children:[Ln,(0,T.jsx)(s.ZP,{disabled:!an,onClick:function(n){n.preventDefault(),En(an,J)},title:an?null:"No changes have been made to this file.",children:"Save file content"})]}),x&&(0,T.jsx)(p,{children:(0,T.jsx)(s.ZP,{compact:!0,onClick:function(){x(_.cH.FILE_VERSIONS)},small:!0,title:"View previous changes to this file.",children:"Show versions"})})]})}),Dn,E===D.dT.REQS_TXT&&Nn]})}},44425:function(n,e,t){t.d(e,{$W:function(){return E},DA:function(){return T},HX:function(){return h},J8:function(){return D},L8:function(){return u},LE:function(){return A},Lk:function(){return L},Lq:function(){return f},M5:function(){return R},Q3:function(){return p},Qj:function(){return S},Ut:function(){return _},V4:function(){return P},VZ:function(){return v},dO:function(){return s},f2:function(){return N},iZ:function(){return C},t6:function(){return c},tf:function(){return d}});var o,i,r,l,u,c,a=t(82394);!function(n){n.CONDITION="condition",n.DBT_SNAPSHOT="snapshot",n.DYNAMIC="dynamic",n.DYNAMIC_CHILD="dynamic_child",n.REDUCE_OUTPUT="reduce_output",n.REPLICA="replica"}(u||(u={})),function(n){n.MARKDOWN="markdown",n.PYTHON="python",n.R="r",n.SQL="sql",n.YAML="yaml"}(c||(c={}));var d,s=(o={},(0,a.Z)(o,c.MARKDOWN,"MD"),(0,a.Z)(o,c.PYTHON,"PY"),(0,a.Z)(o,c.R,"R"),(0,a.Z)(o,c.SQL,"SQL"),(0,a.Z)(o,c.YAML,"YAML"),o),A=(i={},(0,a.Z)(i,c.MARKDOWN,"Markdown"),(0,a.Z)(i,c.PYTHON,"Python"),(0,a.Z)(i,c.R,"R"),(0,a.Z)(i,c.SQL,"SQL"),(0,a.Z)(i,c.YAML,"YAML"),i);!function(n){n.CALLBACK="callback",n.CHART="chart",n.CONDITIONAL="conditional",n.CUSTOM="custom",n.DATA_EXPORTER="data_exporter",n.DATA_LOADER="data_loader",n.DBT="dbt",n.EXTENSION="extension",n.GLOBAL_DATA_PRODUCT="global_data_product",n.SCRATCHPAD="scratchpad",n.SENSOR="sensor",n.MARKDOWN="markdown",n.TRANSFORMER="transformer"}(d||(d={}));var f,R=[d.CALLBACK,d.CONDITIONAL,d.EXTENSION];!function(n){n.BLUE="blue",n.GREY="grey",n.PINK="pink",n.PURPLE="purple",n.TEAL="teal",n.YELLOW="yellow"}(f||(f={}));var T,O,E=[d.CHART,d.CUSTOM,d.DATA_EXPORTER,d.DATA_LOADER,d.SCRATCHPAD,d.SENSOR,d.MARKDOWN,d.TRANSFORMER],p=[d.CUSTOM,d.DATA_EXPORTER,d.DATA_LOADER,d.SCRATCHPAD,d.SENSOR,d.MARKDOWN,d.TRANSFORMER],v=[d.DATA_EXPORTER,d.DATA_LOADER],D=[d.DATA_EXPORTER,d.DATA_LOADER,d.TRANSFORMER],h=[d.DATA_EXPORTER,d.DATA_LOADER,d.DBT,d.TRANSFORMER],S=[d.CHART,d.SCRATCHPAD,d.SENSOR,d.MARKDOWN],C=[d.CALLBACK,d.CHART,d.EXTENSION,d.SCRATCHPAD,d.MARKDOWN],L=[d.CUSTOM,d.DATA_EXPORTER,d.DATA_LOADER,d.SENSOR,d.TRANSFORMER];!function(n){n.EXECUTED="executed",n.FAILED="failed",n.NOT_EXECUTED="not_executed",n.UPDATED="updated"}(T||(T={})),function(n){n.BLOCK_FILE="block_file",n.CUSTOM_BLOCK_TEMPLATE="custom_block_template",n.MAGE_TEMPLATE="mage_template"}(O||(O={}));var N=[d.CUSTOM,d.DATA_EXPORTER,d.DATA_LOADER,d.TRANSFORMER],P=(r={},(0,a.Z)(r,d.CALLBACK,"Callback"),(0,a.Z)(r,d.CHART,"Chart"),(0,a.Z)(r,d.CONDITIONAL,"Conditional"),(0,a.Z)(r,d.CUSTOM,"Custom"),(0,a.Z)(r,d.DATA_EXPORTER,"Data exporter"),(0,a.Z)(r,d.DATA_LOADER,"Data loader"),(0,a.Z)(r,d.DBT,"DBT"),(0,a.Z)(r,d.EXTENSION,"Extension"),(0,a.Z)(r,d.GLOBAL_DATA_PRODUCT,"Global data product"),(0,a.Z)(r,d.MARKDOWN,"Markdown"),(0,a.Z)(r,d.SCRATCHPAD,"Scratchpad"),(0,a.Z)(r,d.SENSOR,"Sensor"),(0,a.Z)(r,d.TRANSFORMER,"Transformer"),r),_=[d.DATA_LOADER,d.TRANSFORMER,d.DATA_EXPORTER,d.SENSOR];l={},(0,a.Z)(l,d.DATA_EXPORTER,"DE"),(0,a.Z)(l,d.DATA_LOADER,"DL"),(0,a.Z)(l,d.SCRATCHPAD,"SP"),(0,a.Z)(l,d.SENSOR,"SR"),(0,a.Z)(l,d.MARKDOWN,"MD"),(0,a.Z)(l,d.TRANSFORMER,"TF")},80329:function(n,e,t){t.d(e,{j:function(){return o}});var o=(0,t(44152).r)({apiReloads:{}}).useGlobalState}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[976],{4006:function(t,e,n){n.d(e,{Z:function(){return dt}});var r=n(75582),i=n(82394),o=n(92083),a=n.n(o),l=n(26304),c=n(26226),u=n(84969),d=n(90948),s=n(65743),h=n(39048),f=n(79487),p=n(29989),m=n(61655),g=n(16853),x=n(65376),y=n(55485),v=n(30160),b=n(94035),j=n(95363),k=n(70515),Z=n(21831),w=n(82684),O=n(38626),S=n(48072),P=n(24903),A=n(98677),I=n(84181),L=n(44897),T=n(79633),C=n(61896),M=n(81728);function D(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function E(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?D(Object(n),!0).forEach((function(e){(0,i.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var F={bottom:k.iI*(3+k.cd),left:k.iI*k.cd,right:k.iI*k.cd,top:k.iI*k.cd};function N(t,e){return Math.max.apply(Math,(0,Z.Z)(t.map(e)))}function _(t){var e=t.data,n=t.height,r=t.keyForYData,i=t.large,o=t.margin,a=void 0===o?{}:o,l=t.orientationVertical,c=void 0!==l&&l,u=t.showTooltip,d=t.width,s=t.yLabelFormat,h=(0,w.useContext)(O.ThemeContext),f=(0,w.useCallback)((function(t){return t[r]}),[r]),p=s;p||(p=function(t){return t.length>20?"".concat(t.substring(0,20),"..."):t});var m=i?C.iD:C.J5,g=E(E({},F),a),x=e.slice(Math.max(0,e.length-50)),y=(0,w.useMemo)((function(){return Object.keys((null===x||void 0===x?void 0:x[0])||{}).filter((function(t){return t!==r}))}),[x,r]),v=(0,P.Z)({domain:y,range:[T.a$,T.Ej,T.hM,T.ZA,T.$R,T.X_,T.er,T.hl,T.nQ]}),b=(0,w.useMemo)((function(){return x.map(f)}),[x,f]),j=(0,A.Z)({domain:b,padding:.1}),k=(0,A.Z)({domain:y,padding:.1}),D=(0,I.Z)({domain:[0,N(x,(function(t){return N(y,(function(e){return Number(t[e])}))}))]}),_={active:(null===h||void 0===h?void 0:h.content.default)||L.Z.content.default,backgroundPrimary:(null===h||void 0===h?void 0:h.chart.backgroundPrimary)||L.Z.chart.backgroundPrimary,backgroundSecondary:(null===h||void 0===h?void 0:h.chart.backgroundSecondary)||L.Z.chart.backgroundSecondary,muted:(null===h||void 0===h?void 0:h.content.muted)||L.Z.content.muted,primary:(null===h||void 0===h?void 0:h.chart.primary)||L.Z.chart.primary,tooltipBackground:(null===h||void 0===h?void 0:h.background.navigation)||L.Z.background.navigation},R=b;c&&(R=x.reduce((function(t,e){return t.concat(y.map((function(t){var n=e[t];return(0,M.HW)(n)?parseInt(String(n)):n})))}),[]));var B=Math.min(Math.max.apply(Math,(0,Z.Z)(R.map((function(t){return String(t).length})))),20);g.left+=7*B;var V=d-(g.left+g.right),z=n-(g.top+g.bottom);c?(j.rangeRound([0,V]),D.rangeRound([z,0])):(j.rangeRound([z,0]),D.rangeRound([0,V])),k.rangeRound([0,j.bandwidth()]);var Y=x.map(f).length,H=0;c||(H=j(R[Y-1]));var J=(0,w.useCallback)((function(t){var e=(0,S.Z)(t)||{x:0,y:0},n=e.x,r=e.y,i=n-g.left,o=r-g.top,a=0;a=c?(i-H/2)/(V-H):1-(o-H/2)/(z-H);var l=Math.floor(a*Y),d=x[l];"undefined"===typeof d&&(d=x[l-1]),c?i>H&&i<V+g.left-H&&u({tooltipData:d,tooltipLeft:n,tooltipTop:r}):o>H&&o<z-H&&u({tooltipData:d,tooltipLeft:n,tooltipTop:r})}),[x,Y,g.left,g.top,c,u,H,V,z]);return{colorScale:v,colors:_,data:x,fontSize:m,handleTooltip:J,margin:g,tempScale:D,tickValues:R,xKeys:y,xMax:V,y1Scale:k,yLabelFormat:p,yMax:z,yScale:j,ySerialize:f}}var R=n(28598),B=["height","width","xAxisLabel","yAxisLabel"];function V(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function z(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?V(Object(n),!0).forEach((function(e){(0,i.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Y=3*k.iI,H=(k.iI,k.iI,k.iI,(0,m.Z)((function(t){var e=t.data,n=t.height,i=t.hideTooltip,o=t.keyForYData,a=void 0===o?"__y":o,l=t.large,c=t.margin,m=void 0===c?{}:c,y=t.renderNoDataText,b=t.renderTooltipContent,k=t.showTooltip,Z=t.tooltipData,w=t.tooltipLeft,O=t.tooltipOpen,S=t.tooltipTop,P=t.width,A=t.xAxisLabel,I=t.xNumTicks,L=t.yLabelFormat,T=_({data:e,height:n,keyForYData:a,large:l,margin:m,showTooltip:k,width:P,yLabelFormat:L}),C=T.colorScale,D=T.colors,E=T.data,F=T.fontSize,N=T.handleTooltip,B=T.margin,V=T.tempScale,H=T.tickValues,J=T.xKeys,W=T.xMax,X=T.y1Scale,K=T.yLabelFormat,G=T.yMax,U=T.yScale,q=T.ySerialize,Q=[];Math.min((null===H||void 0===H?void 0:H.length)||0,Math.floor(n/Y));return null===H||void 0===H||H.forEach((function(t){Q.push(t)})),P<10?null:(0,R.jsxs)("div",{children:[(0,R.jsxs)("svg",{height:n,width:P,children:[y&&!(null!==E&&void 0!==E&&E.length)&&(0,R.jsx)("text",{fill:D.active,dominantBaseline:"middle",textAnchor:"middle",fontFamily:j.ry,fontSize:F,x:"50%",y:"50%",children:y()}),(0,R.jsx)(s.Z,{fill:"transparent",height:n-(B.top+B.bottom),onMouseLeave:function(){return i()},onMouseMove:N,onTouchMove:N,onTouchStart:N,rx:14,width:P-(B.left+B.right),x:B.left,y:B.top}),(null===E||void 0===E?void 0:E.length)&&(0,R.jsxs)(p.Z,{left:B.left,top:B.top,children:[(0,R.jsx)(h.Z,{color:C,data:E,keys:J,width:W,xScale:V,y0:q,y0Scale:U,y1Scale:X,children:function(t){return t.map((function(t){return(0,R.jsx)(p.Z,{top:t.y0,children:t.bars.map((function(e){return(0,R.jsx)("g",{children:(0,R.jsx)(R.Fragment,{children:(0,R.jsx)("rect",{fill:e.color,height:e.height,pointerEvents:"none",rx:4,width:e.width,x:e.x,y:e.y})})},"".concat(t.index,"-").concat(e.index,"-").concat(e.key))}))},"bar-group-horizontal-".concat(t.index,"-").concat(t.y0))}))}}),(0,R.jsx)(u.Z,{hideTicks:!0,scale:U,stroke:D.muted,tickFormat:function(t){return K(t)},tickLabelProps:function(){return{fill:D.active,fontFamily:j.ry,fontSize:F,style:{width:"10px"},textAnchor:"end"}},tickStroke:D.muted,tickValues:Q,top:2}),(0,R.jsx)(d.Z,{label:A,labelProps:{fill:D.muted,fontFamily:j.ry,fontSize:F,textAnchor:"middle"},numTicks:I,scale:V,stroke:D.muted,tickLabelProps:function(){return{fill:D.active,fontFamily:j.ry,fontSize:F,textAnchor:"middle"}},tickStroke:D.muted,top:G})]}),Z&&(0,R.jsx)("g",{children:(0,R.jsx)(f.Z,{from:{x:B.left,y:S},pointerEvents:"none",stroke:D.active,strokeDasharray:"5,2",strokeWidth:1,to:{x:W+B.left,y:S}})})]}),O&&Z&&(0,R.jsxs)(g.Z,{left:w,style:z(z({},x.j),{},{backgroundColor:D.tooltipBackground}),top:S,children:[b&&b(Z),!b&&Object.entries(Z).map((function(t){var e=(0,r.Z)(t,2),n=e[0],i=e[1];if(a!==n){var o=i;return(0,M.HW)(o)&&String(o).split(".").length>=2&&(o=o.toFixed(4)),(0,R.jsxs)(v.ZP,{inverted:!0,small:!0,children:[n,": ",o]},n)}}))]})]})})));var J=function(t){var e,n=t.height,r=t.width,i=t.xAxisLabel,o=t.yAxisLabel,a=(0,l.Z)(t,B);return e="undefined"===typeof r?"100%":o?0===r?r:r-28:r,(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)("div",{style:{display:"flex",height:n,marginBottom:i?k.iI:null,width:"100%"},children:[o&&(0,R.jsx)(y.ZP,{alignItems:"center",fullHeight:!0,justifyContent:"center",width:28,children:(0,R.jsx)(b.Z,{children:(0,R.jsx)(v.ZP,{center:!0,muted:!0,small:!0,children:o})})}),(0,R.jsx)("div",{style:{height:n,width:e},children:(0,R.jsx)(c.Z,{children:function(t){var e=t.width,n=t.height;return(0,R.jsx)(H,z(z({},a),{},{height:n,width:e}))}})})]}),i&&(0,R.jsx)("div",{style:{paddingLeft:o?36:0,paddingTop:4},children:(0,R.jsx)(v.ZP,{center:!0,muted:!0,small:!0,children:i})})]})},W=n(95422),X=["keyForYData"],K=["height","width","xAxisLabel","yAxisLabel"];function G(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function U(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?G(Object(n),!0).forEach((function(e){(0,i.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var q=6*k.iI,Q=(0,m.Z)((function(t){var e=t.keyForYData,n=void 0===e?"__y":e,i=(0,l.Z)(t,X),o=i.height,a=i.hideTooltip,c=i.renderNoDataText,h=i.renderTooltipContent,m=i.tooltipData,y=i.tooltipLeft,b=i.tooltipOpen,k=i.tooltipTop,Z=i.width,w=i.xLabelFormat,O=i.xNumTicks,S=i.yNumTicks,P=_(U(U({},i),{},{keyForYData:n,orientationVertical:!0})),A=P.colorScale,I=P.colors,L=P.data,T=P.fontSize,C=P.handleTooltip,D=P.margin,E=P.tempScale,F=(P.tickValues,P.xKeys),N=(P.xMax,P.y1Scale),B=P.yLabelFormat,V=P.yMax,z=P.yScale,Y=P.ySerialize,H=Math.min(O,Z/q);return Z<10?null:(0,R.jsxs)("div",{children:[(0,R.jsxs)("svg",{height:o,width:Z,children:[c&&!(null!==L&&void 0!==L&&L.length)&&(0,R.jsx)("text",{fill:I.active,dominantBaseline:"middle",textAnchor:"middle",fontFamily:j.ry,fontSize:T,x:"50%",y:"50%",children:c()}),(null===L||void 0===L?void 0:L.length)&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(s.Z,{fill:"transparent",height:o-(D.top+D.bottom),onMouseLeave:function(){return a()},onMouseMove:C,onTouchMove:C,onTouchStart:C,rx:14,width:Z-(D.left+D.right),x:D.left,y:2*D.top}),(0,R.jsxs)(p.Z,{top:D.top,children:[(0,R.jsx)(W.Z,{color:A,data:L,height:V,keys:F,x0:Y,x0Scale:z,x1Scale:N,yScale:E,children:function(t){return t.map((function(t){return(0,R.jsx)(p.Z,{left:t.x0+D.left,top:D.top,children:t.bars.map((function(e){return(0,R.jsx)("g",{children:(0,R.jsx)("rect",{fill:e.color,height:e.height,pointerEvents:"none",rx:4,width:e.width,x:e.x,y:e.y})},"".concat(t.index,"-").concat(e.index,"-").concat(e.key))}))},"bar-group-horizontal-".concat(t.index,"-").concat(t.x0))}))}}),(0,R.jsx)(u.Z,{left:D.left,numTicks:S,scale:E,stroke:I.muted,tickFormat:function(t){return B(t)},tickLabelProps:function(){return{fill:I.active,fontFamily:j.ry,fontSize:T,textAnchor:"end",transform:"translate(-2,2.5)"}},tickStroke:I.muted,top:D.top}),(0,R.jsx)(d.Z,{hideTicks:!0,left:D.left,numTicks:H,scale:z,stroke:I.muted,tickFormat:w,tickLabelProps:function(){return{fill:I.active,fontFamily:j.ry,fontSize:T,textAnchor:"middle"}},tickStroke:I.muted,top:V+D.top})]})]}),m&&(0,R.jsx)("g",{children:(0,R.jsx)(f.Z,{from:{x:y,y:2*D.top},pointerEvents:"none",stroke:I.active,strokeDasharray:"5,2",strokeWidth:1,to:{x:y,y:V+2*D.top}})})]}),b&&m&&(0,R.jsxs)(g.Z,{left:y,style:U(U({},x.j),{},{backgroundColor:I.tooltipBackground}),top:k,children:[h&&h(m),!h&&Object.entries(m).map((function(t){var e=(0,r.Z)(t,2),i=e[0],o=e[1];if(n!==i){var a=o;return(0,M.HW)(a)&&String(a).split(".").length>=2&&(a=a.toFixed(4)),(0,R.jsxs)(v.ZP,{inverted:!0,small:!0,children:[i,": ",a]},i)}})),(0,R.jsx)("br",{}),(0,R.jsxs)(v.ZP,{inverted:!0,small:!0,children:[w&&w(Y(m)),!w&&Y(m)]})]})]})}));var $=function(t){var e=t.height,n=t.width,r=t.xAxisLabel,i=t.yAxisLabel,o=(0,l.Z)(t,K);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)("div",{style:{display:"flex",height:e,marginBottom:r?k.iI:null,width:"100%"},children:[i&&(0,R.jsx)(y.ZP,{alignItems:"center",fullHeight:!0,justifyContent:"center",width:28,children:(0,R.jsx)(b.Z,{children:(0,R.jsx)(v.ZP,{center:!0,muted:!0,small:!0,children:i})})}),(0,R.jsx)("div",{style:{height:e,width:i?0===n?n:n-28:n},children:(0,R.jsx)(c.Z,{children:function(t){var e=t.height,n=t.width;return(0,R.jsx)(Q,U(U({},o),{},{height:e,width:n}))}})})]}),r&&(0,R.jsx)("div",{style:{paddingLeft:i?36:0,paddingTop:4},children:(0,R.jsx)(v.ZP,{center:!0,muted:!0,small:!0,children:r})})]})},tt=n(93859),et=n(52729),nt=n(74168),rt=n(87862),it=n(97301),ot=n(35058),at=n(3917),lt=n(86735);function ct(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ut(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ct(Object(n),!0).forEach((function(e){(0,i.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ct(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var dt=function(t){var e,n=t.block,o=t.data,l=t.width,c=t.xAxisLabel,u=n.configuration,d=void 0===u?{}:u,s=d||{},h=s.chart_style,f=s.chart_type,p=s.y_sort_order,m=d[ot.JJ]||it.lA,g=(null===d||void 0===d||null===(e=d[ot.bE])||void 0===e?void 0:e.map((function(t){return(0,ot.c0)(t)})))||[],x=at.n1,y=d[ot.Yg];if([ot.aE.HOUR,ot.aE.MINUTE,ot.aE.SECOND].includes(y)&&(x=at.OC),ot.oV.BAR_CHART===f||ot.oV.TIME_SERIES_BAR_CHART===f){var b=o.x,j=o.y,Z=ot.oV.TIME_SERIES_BAR_CHART===f;if(b&&j&&Array.isArray(b)&&Array.isArray(j)){var w,O=null===(w=d[ot.eN])||void 0===w?void 0:w.join(", "),S=null===g||void 0===g?void 0:g.join(", ");g.length||g.push(ot.rj);var P=g[0],A=b.map((function(t,e){return ut({__y:t},g.reduce((function(t,n,r){var o,a=null===j||void 0===j||null===(o=j[r])||void 0===o?void 0:o[e];return"undefined"===typeof a?t:ut(ut({},t),{},(0,i.Z)({},n,a))}),{}))}));ot.JT.HORIZONTAL===h?ot.MP.ASCENDING===p?A=(0,lt.YC)(A,(function(t){return t[P]}),{ascending:!1}):ot.MP.DESCENDING===p&&(A=(0,lt.YC)(A,(function(t){return t[P]}),{ascending:!0})):ot.JT.VERTICAL===h&&(ot.MP.ASCENDING===p?A=(0,lt.YC)(A,(function(t){return t[P]}),{ascending:!0}):ot.MP.DESCENDING===p&&(A=(0,lt.YC)(A,(function(t){return t[P]}),{ascending:!1})));var I={data:A,height:m,renderNoDataText:function(){return"No data matching query"},width:l,xNumTicks:3};return ot.JT.HORIZONTAL===h?(0,R.jsx)(J,ut(ut({},I),{},{xAxisLabel:S||d[ot.rj],yAxisLabel:c||O||d[ot.a3]})):(0,R.jsx)($,ut(ut({},I),{},{xAxisLabel:c||O,xLabelFormat:function(t){return Z?a()(1e3*t).format(at.n1):t},xNumTicks:A.length,yAxisLabel:S,yNumTicks:5}))}}else if(ot.oV.HISTOGRAM===f){var L,T=o.x,C=o.y,D=null===(L=d[ot.eN])||void 0===L?void 0:L.join(", ");if(T&&C&&Array.isArray(T))return(0,R.jsx)(et.Z,{data:T.map((function(t,e){var n,r=t.max,i=t.min;return[r,null===C||void 0===C||null===(n=C[e])||void 0===n?void 0:n.value,i]})),height:m,width:l,large:!0,margin:{left:5*k.iI,right:1*k.iI,top:3*k.iI},noPadding:!0,renderTooltipContent:function(t){var e=(0,r.Z)(t,3),n=e[0],i=e[1],o=e[2];return(0,R.jsxs)(v.ZP,{inverted:!0,monospace:!0,small:!0,children:["Count : ",i,(0,R.jsx)("br",{}),"Bucket: ",o,"-",n]})},showAxisLabels:!0,showYAxisLabels:!0,showZeroes:!0,sortData:function(t){return(0,lt.YC)(t,"[0]")},xAxisLabel:c||D||d[ot.a3],yAxisLabel:D?"count(".concat(D,")"):d[ot.rj]})}else if(ot.oV.LINE_CHART===f||ot.oV.TIME_SERIES_LINE_CHART===f){var E=o.x,F=o.y,N=ot.oV.TIME_SERIES_LINE_CHART===f;if(E&&F&&Array.isArray(E)&&Array.isArray(F)&&Array.isArray(null===F||void 0===F?void 0:F[0])){var _,B=g;d[ot.e]&&(B=d[ot.e].split(",").map((function(t){return t.trim()})));var V=E.map((function(t,e){return{x:t,y:(0,lt.w6)(F.length).map((function(t,n){var r=F[n][e];return"undefined"===typeof r||null===r?0:r}))}})),z=null===(_=d[ot.eN])||void 0===_?void 0:_.join(", "),Y=g.join(", ");return(0,R.jsx)(nt.Z,{data:V,height:m,lineLegendNames:B,margin:{bottom:8*k.iI,left:5*k.iI},noCurve:!0,renderXTooltipContent:function(t){t.index;var e=t.x,n=d[ot.a3],r=e;return d[ot.eN]&&(n=d[ot.eN].map(String).join(", ")),N&&(r=a()(1e3*e).format(x)),(0,R.jsxs)(v.ZP,{inverted:!0,small:!0,children:[n,": ",r]})},renderYTooltipContent:function(t,e){var n=t.y;return(0,R.jsxs)(v.ZP,{inverted:!0,small:!0,children:[B&&B[e]&&"".concat(B[e],": "),n&&(0,M.x6)((0,M.QV)(n[e],4))]})},width:l?l-(3*k.iI+3):l,xAxisLabel:c||z||String(d[ot.a3]||""),xLabelFormat:function(t){return N?a()(1e3*t).format(at.n1):t},yAxisLabel:Y||String(d[ot.rj]),yLabelFormat:function(t){return t}})}}else if(ot.oV.PIE_CHART===f){var H,W=o[String(d[ot.a3]||ot.a3)],X=null===(H=d[ot.eN])||void 0===H?void 0:H.join(", ");if(W)return(0,R.jsx)(rt.Z,{data:Object.entries(W),getX:function(t){var e=(0,r.Z)(t,2),n=e[0],i=e[1];return"".concat(n," (").concat((0,M.x6)(i),")")},getY:function(t){return(0,r.Z)(t,2)[1]},height:m,width:l,xAxisLabel:c||X||String(d[ot.a3]||"")})}else if(ot.oV.TABLE===f){var K=o.index,G=o.x,U=o.y;return Array.isArray(G)&&Array.isArray(U)&&Array.isArray(U[0])&&(0,R.jsx)(tt.Z,{columns:G,height:d[ot.JJ]?null:m,index:K,maxHeight:d[ot.JJ]?m:null,noBorderBottom:!0,noBorderLeft:!0,noBorderRight:!0,noBorderTop:!0,rows:U,width:l})}return(0,R.jsx)("div",{})}},97301:function(t,e,n){n.d(e,{T7:function(){return d},Tb:function(){return u},lA:function(){return l},pM:function(){return c},y9:function(){return s}});var r=n(38626),i=n(44897),o=n(42631),a=n(70515),l=40*a.iI,c=r.default.div.withConfig({displayName:"indexstyle__ChartBlockStyle",componentId:"sc-1c3ufnj-0"})(["border-radius:","px;margin-left:","px;margin-right:","px;margin-top:","px;",""],o.n_,.5*a.iI,.5*a.iI,1*a.iI,(function(t){return"\n background-color: ".concat((t.theme.background||i.Z.background).codeArea,";\n ")})),u=r.default.div.withConfig({displayName:"indexstyle__ConfigurationOptionsStyle",componentId:"sc-1c3ufnj-1"})(["flex:4;padding-left:","px;padding-right:","px;"],1*a.iI,1*a.iI),d=r.default.div.withConfig({displayName:"indexstyle__CodeStyle",componentId:"sc-1c3ufnj-2"})(["padding-top:","px;",""],a.iI/2,(function(t){return"\n background-color: ".concat((t.theme.background||i.Z.background).codeTextarea,";\n ")})),s=r.default.div.withConfig({displayName:"indexstyle__CodeHelperStyle",componentId:"sc-1c3ufnj-3"})(["margin-bottom:","px;padding-bottom:","px;padding-left:","px;",""],a.cd*a.iI,a.iI,a.iI,(function(t){return"\n border-bottom: 1px solid ".concat((t.theme.borders||i.Z.borders).medium,";\n ")}))},52729:function(t,e,n){n.d(e,{Z:function(){return V}});var r=n(26304),i=n(21831),o=n(82394),a=n(82684),l=n(26226),c=n(84969),u=n(90948),d=n(65743),s=n(29989),h=n(38626),f=n(61655),p=n(16853),m=n(65376),g=n(48072),x=n(98677),y=n(84181),v=n(55485),b=n(4190),j=n(30160),k=n(94035),Z=n(70987),w=n(79633),O=n(89370),S=n(95363),P=n(61896),A=n(70515),I=n(88543),L=n(6568),T=function(t){return t.slice(0,10)},C=function(t,e){var n=t.toISOString().slice(0,10),r=e.toISOString().slice(0,10);return"".concat(n,":").concat(r)},M=n(79221),D=n(98684),E=n(28598),F=["height","loading","selected","width","xAxisLabel","yAxisLabel"];function N(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?N(Object(n),!0).forEach((function(e){(0,o.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var R={bottom:A.iI,left:3*A.iI,right:0,top:1*A.iI},B=(0,f.Z)((function(t){var e=t.columnType,n=t.data,r=void 0===n?[]:n,o=t.getBarColor,l=t.getXValue,f=t.getYValue,v=t.height,b=t.hideTooltip,k=t.large,F=t.margin,N=void 0===F?{}:F,B=t.muted,V=t.noPadding,z=t.numberOfXTicks,Y=t.renderTooltipContent,H=t.selected,J=t.showAxisLabels,W=t.showTooltip,X=t.showYAxisLabels,K=t.showZeroes,G=t.sortData,U=t.tooltipData,q=t.tooltipLeft,Q=t.tooltipOpen,$=t.tooltipTop,tt=t.width,et=t.xLabelFormat,nt=t.yLabelFormat,rt=k?P.J5:P.VK,it=(0,a.useCallback)((function(t){return l?l(t):t[0]}),[l]),ot=(0,a.useCallback)((function(t){return f?f(t):t[1]}),[f]),at=(0,a.useContext)(h.ThemeContext),lt=e===O.RL.DATETIME,ct=_(_({},R),N);J&&(ct=_(_({},ct),{},{left:ct.left+A.iI}));var ut=G?G(r):r.sort((function(t,e){return e[1]-t[1]})),dt=lt?r.sort((function(t,e){return new Date(t[0])-new Date(e[0])})).filter((function(t){return!!t[0]})):ut.slice(0,60),st=tt-(ct.left+ct.right),ht=v-(ct.bottom+ct.top),ft=lt?function(t,e){var n,r=t.map((function(t){return new Date(t[0])})).sort((function(t,e){return t-e}));return(0,L.Z)({domain:(n=r,[(0,I.Z)(n[0]),(0,I.Z)(n[n.length-1])]),nice:!0,range:[0,e]})}(dt,st):null,pt=function(t,e){if(null===e)return{};var n=e.ticks().map((function(t){return t.toISOString()})),r={},i=0,o=1;return t.forEach((function(t){var e=new Date(t[0]),a=t[1],l=n[i],c=n[o];if(l&&c){var u=new Date(l),d=new Date(c),s=C(u,d);if(e>=u&&e<d)r[s]=(r[s]||0)+a;else for(;o<n.length||!r[s];)if(i+=1,o+=1,u=new Date(n[i]),d=new Date(n[o]),s=C(u,d),e>=u&&e<d)return void(r[s]=(r[s]||0)+a)}})),n.reduce((function(t,e,n,r){if(0===n)return t;var i=T(e),o=T(r[n-1]);return t.push("".concat(o,":").concat(i)),t}),[]).forEach((function(t){r[t]=r[t]||0})),r}(dt,ft);dt=ft?Object.entries(pt).sort((function(t,e){return new Date(T(t[0]))-new Date(T(e[0]))})):dt;var mt=ft?Math.max.apply(Math,(0,i.Z)(Object.values(pt))):0,gt=dt.reduce((function(t,e){return(0!==ot(e)||lt||K)&&t.push(it(e)),t}),[]),xt=gt.length,yt=function(t,e,n){return n?.05:t>=30&&e<300?.5:t>=15?.3:t>=5?.1:t>2?.05:2===t?.025:0}(xt,tt,lt),vt=(0,x.Z)({domain:gt,paddingInner:V?null:yt,range:[0,st],round:!1}),bt=(0,y.Z)({domain:[0,Math.max.apply(Math,(0,i.Z)(dt.map(ot)))],range:[ht,0],round:!0}),jt=(0,D.K)(at),kt={active:((null===at||void 0===at?void 0:at.content)||Z.Z.content).active,default:jt[0],muted:((null===at||void 0===at?void 0:at.monotone)||Z.Z.monotone).gray,selected:((null===at||void 0===at?void 0:at.elevation)||Z.Z.elevation).visualizationAccent},Zt=kt.default;B?Zt=kt.muted:H&&(Zt=kt.selected);var wt=xt?lt?mt:Math.max.apply(Math,(0,i.Z)(dt.map((function(t){return ot(t)})))):0,Ot=Math.floor(wt/6),St=[0],Pt=0;if(wt>6)for(;Pt<wt;)St.push(Pt+Ot),Pt+=Ot;else for(;Pt<=wt;)St.push(Pt+1),Pt+=1;wt>9999?ct=_(_({},ct),{},{left:k?8*A.iI:4.1*A.iI}):wt>999&&(ct=_(_({},ct),{},{left:k?5*A.iI:3.6*A.iI}));var At=lt?2.25:0,It=xt<10||e===O.RL.NUMBER||e===O.RL.NUMBER_WITH_DECIMALS||lt||X,Lt=(0,a.useCallback)((function(t){var e=(0,g.Z)(t)||{x:0,y:0},n=e.x,r=e.y,i=(n-(J?ct.left:0))/st,o=Math.floor(xt*i),a=dt[o];"undefined"===typeof a&&(a=dt[0]);var l=it(a);l=l.length>15?"".concat(l.slice(0,21)):l;var c=Y?Y(a):"".concat(l," (").concat(ot(a),")");W({tooltipData:c,tooltipLeft:n-ct.left,tooltipTop:r+ct.top})}),[dt,xt,it,ot,ct.left,ct.top,Y,J,W,tt]);return tt<10||!r.length?null:(0,E.jsxs)("div",{children:[(0,E.jsxs)("svg",{height:v+ct.bottom*(lt?7.5:3),width:tt,children:[(0,E.jsx)(s.Z,{left:J?ct.left:0,top:ct.top+At,children:dt.reduce((function(t,e){var n=it(e),r=ot(e);if(0!==r){var i,a=vt.bandwidth(),l=ht-(null!==(i=bt(r))&&void 0!==i?i:0),c=vt(n),u=ht-l;t.push((0,E.jsx)(d.Z,{fill:o?o(e):Zt,height:l,onMouseLeave:function(){return b()},onMouseMove:Lt,onTouchMove:Lt,onTouchStart:Lt,width:a,x:c,y:u},"bar-".concat(n)))}return t}),[])}),J&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(c.Z,{left:ct.left,scale:bt,stroke:kt.muted,tickFormat:function(t){return nt?nt(t):(0,M.P5)(t)},tickLabelProps:function(){return{fill:kt.active,fontFamily:S.ry,fontSize:rt,textAnchor:"end",transform:"translate(-2,2.5)"}},tickStroke:kt.muted,tickValues:St,top:ct.top+At}),(0,E.jsx)(u.Z,{left:ct.left,numTicks:lt?void 0:z||6,orientation:"top",scale:ft||vt,stroke:kt.muted,tickFormat:function(t){return et?et(String(t)):lt?t.toISOString().slice(0,10):String(t)},tickLabelProps:function(t){return{fill:It?kt.active:"transparent",fontFamily:S.ry,fontSize:rt,textAnchor:"middle",transform:lt?"rotate(-90,".concat(ft(t),",0) translate(-33,10)"):"translate(0, ".concat(3*ct.bottom,")")}},tickLineProps:{transform:"translate(0,".concat(A.iI,")")},tickStroke:It?kt.muted:"transparent",top:ht+ct.top+At})]})]}),Q&&U&&(0,E.jsx)(p.Z,{left:q,style:m.j,top:$,children:(0,E.jsx)(j.ZP,{color:w.E5,small:!0,children:U})})]})}));var V=function(t){var e=t.height,n=t.loading,i=t.selected,o=t.width,a=t.xAxisLabel,c=t.yAxisLabel,u=(0,r.Z)(t,F);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)("div",{style:{display:"flex",height:e,marginBottom:A.iI,width:"100%"},children:[c&&(0,E.jsx)(v.ZP,{alignItems:"center",fullHeight:!0,justifyContent:"center",width:28,children:(0,E.jsx)(k.Z,{children:(0,E.jsx)(j.ZP,{center:!0,muted:!0,small:!0,children:c})})}),(0,E.jsxs)("div",{style:{height:e,width:c?0===o?o:o-28:o},children:[n&&(0,E.jsx)(b.Z,{}),!n&&(0,E.jsx)(l.Z,{children:function(t){var e=t.height,n=t.width;return(0,E.jsx)(B,_(_({},u),{},{height:e,selected:i,width:n}))}})]})]}),a&&(0,E.jsx)("div",{style:{paddingLeft:c?36:0,paddingTop:4},children:(0,E.jsx)(j.ZP,{center:!0,muted:!0,small:!0,children:a})})]})}},74168:function(t,e,n){var r=n(26304),i=n(21831),o=n(82394),a=n(82684),l=n(26226),c=n(38626),u=n(90948),d=n(84969),s=n(65743),h=n(85587),f=n(79487),p=n(52136),m=n(67778),g=n(29989),x=n(17066),y=n(84482),v=n(76771),b=n(98889),j=n(65376),k=n(61655),Z=n(97745),w=n(48072),O=n(10103),S=n(84181),P=n(24903),A=n(55485),I=n(30160),L=n(94035),T=n(44897),C=n(8454),M=n(79633),D=n(95363),E=n(61896),F=n(70515),N=n(86735),_=n(79221),R=n(98684),B=n(28598),V=["areaBetweenLines","data","events","height","lineLegendNames","margin","width","xAxisLabel","xLabelFormat","yAxisLabel","yLabelFormat"];function z(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Y(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?z(Object(n),!0).forEach((function(e){(0,o.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var H=Y(Y({},j.j),{},{backgroundColor:T.Z.background.muted,border:"none"}),J=(0,k.Z)((function(t){var e=t.areaBetweenLines,n=t.data,r=t.events,o=void 0!==r&&r,l=t.getX,k=t.getY,A=t.getYScaleValues,L=t.gridProps,V=void 0===L?{}:L,z=t.height,J=t.hideGridX,W=t.hideTooltip,X=t.increasedXTicks,K=t.lineLegendNames,G=t.margin,U=t.noCurve,q=t.numYTicks,Q=t.renderXTooltipContent,$=t.renderYTooltipContent,tt=t.showTooltip,et=t.thickStroke,nt=t.tooltipData,rt=t.tooltipLeft,it=void 0===rt?0:rt,ot=t.tooltipTop,at=void 0===ot?[]:ot,lt=t.width,ct=t.xLabelFormat,ut=t.xLabelRotate,dt=void 0===ut||ut,st=t.yLabelFormat,ht=(0,a.useContext)(c.ThemeContext),ft=l||function(t){return null===t||void 0===t?void 0:t.x},pt=k||function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return null===t||void 0===t||null===(e=t.y)||void 0===e?void 0:e[n]},mt=T.Z.monotone.gray,gt=T.Z.brand.wind200,xt=T.Z.content.muted,yt=T.Z.monotone.gray,vt=n.map((function(t){return Number(ft(t))}));if(lt<10)return null;var bt=lt-G.left-G.right,jt=z-G.top-G.bottom,kt=bt/2,Zt=0===n.length?0:Math.max.apply(Math,(0,i.Z)(n.map((function(t){var e=t.y;return(null===e||void 0===e?void 0:e.length)||0})))),wt=(0,a.useMemo)((function(){return(0,S.Z)({domain:[Math.min.apply(Math,(0,i.Z)(vt)),Math.max.apply(Math,(0,i.Z)(vt))],range:[0,bt]})}),[bt,vt]),Ot=Math.min.apply(Math,(0,i.Z)(n.map((function(t){var e=t.y;return Math.min.apply(Math,(0,i.Z)(A?A(e):e||[]))})))),St=Math.max.apply(Math,(0,i.Z)(n.map((function(t){var e=t.y;return Math.max.apply(Math,(0,i.Z)(A?A(e):e||[]))})))),Pt=(0,a.useMemo)((function(){return(0,S.Z)({domain:[Ot,St],nice:!0,range:[jt,0]})}),[jt,St,Ot]),At=lt>520?X?20:10:X?10:5,It=(0,R.K)(ht),Lt=xt,Tt=It.map((function(t){return{stroke:t}})),Ct=(0,P.Z)({domain:K||[],range:Tt.map((function(t){return t.stroke}))}),Mt=(0,a.useCallback)((function(t){var e=((0,w.Z)(t)||{x:0}).x,r=wt.invert(e-G.left),i=(0,N.ry)(vt,(function(t){return r>=t})),o=n[i-1],a=n[i],l=o;a&&(r-ft(o)>ft(a)-r?l=a:(l=o,i-=1));var c=(0,O.range)(0,Zt).map((function(t){return Pt(pt(l,t))})),u=c.some((function(t){return"undefined"===typeof t}));(pt(l)||A&&!u)&&tt({tooltipData:Y(Y({},l),{},{index:i}),tooltipLeft:e,tooltipTop:c})}),[n,ft,pt,A,G,tt,wt,vt,Pt]),Dt={};return U||(Dt.curve=Z.ZP),(0,B.jsxs)(B.Fragment,{children:[K&&(0,B.jsx)("div",{style:{marginLeft:null===G||void 0===G?void 0:G.left},children:(0,B.jsx)(x.Z,{labelFormat:function(t){return t},scale:Ct,children:function(t){return(0,B.jsx)("div",{style:{display:"flex",flexDirection:C.qs.ROW},children:t.map((function(t,e){return(0,B.jsxs)(y.Z,{margin:"0 5px",onClick:function(){o&&alert("clicked: ".concat(JSON.stringify(t)))},children:[(0,B.jsx)("svg",{height:15,width:15,children:(0,B.jsx)("rect",{fill:t.value,height:15,width:15})}),(0,B.jsx)(v.Z,{align:"left",margin:"0 0 0 4px",children:(0,B.jsx)(I.ZP,{small:!0,children:t.text})})]},"legend-quantile-".concat(e))}))})}})}),(0,B.jsxs)("svg",{height:z,width:lt,children:[!e&&(0,B.jsx)(s.Z,{fill:"transparent",height:z,onMouseLeave:function(){return W()},onMouseMove:Mt,onTouchMove:Mt,onTouchStart:Mt,rx:14,width:lt-(G.left+G.right),x:G.left,y:0}),(0,B.jsxs)(g.Z,{left:G.left,top:G.top,children:[!J&&(0,B.jsx)(p.Z,Y({height:jt,pointerEvents:"none",scale:wt,stroke:mt,strokeDasharray:"3,3",strokeOpacity:.4,width:bt},V)),(0,B.jsx)(m.Z,Y({height:jt,pointerEvents:"none",scale:Pt,stroke:mt,strokeDasharray:"3,3",strokeOpacity:.4,width:bt},V)),(0,B.jsx)("line",{stroke:mt,x1:bt,x2:bt,y1:0,y2:jt}),(0,B.jsx)(u.Z,{numTicks:At,scale:wt,stroke:Lt,tickFormat:function(t){return ct?ct(t):t},tickLabelProps:function(t){return{fill:xt,fontFamily:D.ry,fontSize:E.J5,textAnchor:"middle",transform:dt&&"rotate(-45, ".concat(wt(t),", 0) translate(-32, 4)")}},tickStroke:Lt,top:jt}),(0,B.jsx)(d.Z,{hideTicks:!0,numTicks:q,scale:Pt,stroke:Lt,tickFormat:function(t){return st?st(t):(0,_.P5)(t)},tickLabelProps:function(t){return{dx:String(t).length>4?3:0,fill:xt,fontFamily:D.ry,fontSize:E.J5,textAnchor:"end",transform:"translate(0,2.5)"}},tickStroke:Lt}),e&&e.map((function(t){var e=t[0],r=t[1];return(0,a.createElement)(b.Z,Y(Y({},Dt),{},{aboveAreaProps:{fill:T.Z.brand.earth400,fillOpacity:.3},belowAreaProps:{fill:gt,fillOpacity:.2},clipAboveTo:0,clipBelowTo:jt,data:n,id:"".concat(Math.random()),key:"".concat(e,"-").concat(r),x:function(t){return wt(ft(t))},y0:function(t){return Pt("undefined"===typeof r?Ot:pt(t,r))},y1:function(t){return Pt(pt(t,e))}}))})),(0,O.range)(0,Zt).map((function(t){return(0,a.createElement)(h.Z,Y(Y({},Dt),{},{data:n.filter((function(t){return void 0!=t.y})),key:t,pointerEvents:"none",strokeWidth:et?2:1,x:function(t){return wt(ft(t))},y:function(e){return Pt(e.y&&(t>=e.y.length?Ot:pt(e,t)))}},Tt[t]))}))]}),nt&&(0,B.jsxs)("g",{children:[(0,B.jsx)(f.Z,{from:{x:it,y:G.top},pointerEvents:"none",stroke:M.Ej,strokeDasharray:"5,2",strokeWidth:1,to:{x:it,y:jt+G.top}}),at.map((function(t,e){return(0,B.jsx)("circle",{cx:it,cy:t+1+G.top,fill:Tt[e].stroke,fillOpacity:.1,pointerEvents:"none",r:4,stroke:yt,strokeOpacity:.1,strokeWidth:1},e)})),at.map((function(t,e){return(0,B.jsx)("circle",{cx:it,cy:t+G.top,fill:Tt[e].stroke,pointerEvents:"none",r:4,stroke:Tt[e].stroke,strokeWidth:2},e)}))]})]}),nt&&(0,B.jsxs)("div",{children:[at.map((function(t,e){var n=pt(nt,e);return e>=1&&Math.abs(at[e-1]-t)<5*F.iI&&(t+=3*F.iI),(0,B.jsxs)(j.Z,{left:it>kt?it-(0,_.Vs)($,nt,e)*F.iI:it+F.iI,style:H,top:t-2*F.iI,children:[$&&$(nt,e),!$&&(0,B.jsxs)(I.ZP,{center:!0,small:!0,children:[n.toFixed?n.toFixed(3):n," ",null===K||void 0===K?void 0:K[e]]})]},e)})),(0,B.jsxs)(j.Z,{left:it>kt?it-4*(0,_.Vs)(Q,nt):it,style:Y(Y({},H),{},{transform:"translateX(-65%)"}),top:jt+G.top,children:[Q&&Q(nt),!Q&&(0,B.jsx)(I.ZP,{center:!0,small:!0,children:ft(nt).toFixed(3)})]})]})]})}));e.Z=function(t){var e=t.areaBetweenLines,n=t.data,i=(t.events,t.height),o=t.lineLegendNames,a=t.margin,c=void 0===a?{}:a,u=t.width,d=t.xAxisLabel,s=t.xLabelFormat,h=t.yAxisLabel,f=t.yLabelFormat,p=(0,r.Z)(t,V),m=Y(Y({},{bottom:3*F.iI,left:5*F.iI,right:3*F.iI,top:3*F.iI}),c);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("div",{style:{display:"flex",height:i,marginBottom:F.iI,width:"100%"},children:[h&&(0,B.jsx)(A.ZP,{alignItems:"center",fullHeight:!0,justifyContent:"center",width:28,children:(0,B.jsx)(L.Z,{children:(0,B.jsx)(I.ZP,{center:!0,muted:!0,small:!0,children:h})})}),(0,B.jsx)("div",{style:{height:i,width:"undefined"===typeof u?"100%":u},children:(0,B.jsx)(l.Z,{children:function(t){var r=t.width,i=t.height;return(0,B.jsx)(J,Y(Y({},p),{},{areaBetweenLines:e,data:n,height:i,lineLegendNames:o,margin:m,width:r,xLabelFormat:s,yLabelFormat:f}))}})})]}),d&&(0,B.jsx)("div",{style:{paddingLeft:h?36:0,paddingTop:4},children:(0,B.jsx)(I.ZP,{center:!0,muted:!0,small:!0,children:d})})]})}},87862:function(t,e,n){n.d(e,{Z:function(){return A}});var r=n(26304),i=n(82394),o=n(75582),a=n(26226),l=n(28940),c=n(82684),u=n(29989),d=n(38626),s=n(11684),h=n(24903),f=n(30160),p=n(44897),m=n(95363),g=n(61896),x=n(70515),y=n(98684),v=n(28598),b=["height","width","xAxisLabel"];function j(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function k(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?j(Object(n),!0).forEach((function(e){(0,i.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Z={bottom:0,left:0,right:0,top:0},w=function(t){var e=t.endAngle;return{endAngle:e>Math.PI?2*Math.PI:0,opacity:0,startAngle:e>Math.PI?2*Math.PI:0}},O=function(t){var e=t.startAngle;return{endAngle:t.endAngle,opacity:1,startAngle:e}};function S(t){var e=t.animate,n=t.arcs,r=t.path,i=t.getKey,a=t.getColor,l=t.onClickDatum,c=t.textColor;return(0,s.useTransition)(n,{enter:O,from:e?w:O,keys:i,leave:e?w:O,update:O})((function(t,e,n){var u=n.key,d=r.centroid(e),h=(0,o.Z)(d,2),f=h[0],p=h[1],x=e.endAngle-e.startAngle>=.1;return(0,v.jsxs)("g",{children:[(0,v.jsx)(s.animated.path,{d:(0,s.to)([t.startAngle,t.endAngle],(function(t,n){return r(k(k({},e),{},{endAngle:n,startAngle:t}))})),fill:a(e),onClick:function(){return l(e)},onTouchStart:function(){return l(e)}}),x&&(0,v.jsx)(s.animated.g,{style:{opacity:t.opacity},children:(0,v.jsx)("text",{dy:".33em",fill:c,fontFamily:m.ry,fontSize:g.J5,pointerEvents:"none",textAnchor:"middle",x:f,y:p,children:i(e)})})]},u)}))}function P(t){var e=t.animate,n=void 0===e||e,r=t.data,i=t.getX,o=t.getY,a=t.height,s=t.margin,f=void 0===s?Z:s,m=t.textColor,g=t.width,b=(0,c.useState)(null),j=b[0],w=b[1],O=(0,c.useContext)(d.ThemeContext),P=m||(null===O||void 0===O?void 0:O.content.active)||p.Z.content.active;if(g<10)return null;var A=(0,h.Z)({domain:r.map((function(t){return i(t)})),range:(0,y.K)(O)}),I=g-f.left-f.right,L=a-f.top-f.bottom,T=Math.min(I,L)/2,C=L/2,M=I/2,D=Math.min(I/4,12*x.iI);return(0,v.jsx)("svg",{height:a,width:g,children:(0,v.jsx)(u.Z,{left:M+f.left,top:C+f.top,children:(0,v.jsx)(l.Z,{cornerRadius:x.iI/2,data:j?r.filter((function(t){return JSON.stringify(t)===JSON.stringify(j)})):r,innerRadius:Math.max(T-D,12.25),outerRadius:T,padAngle:.005,pieValue:o,children:function(t){return(0,v.jsx)(S,k(k({},t),{},{animate:n,getColor:function(t){var e=t.data;return A(i(e))},getKey:function(t){var e=t.data;return i(e)},onClickDatum:function(t){var e=t.data;return n&&w(j&&JSON.stringify(j)===JSON.stringify(e)?null:e)},textColor:P}))}})})})}function A(t){var e=t.height,n=t.width,i=t.xAxisLabel,o=(0,r.Z)(t,b),l={};return"undefined"!==typeof e&&(l.height=e),"undefined"!==typeof n&&(l.width=n),(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("div",{style:l,children:(0,v.jsx)(a.Z,{children:function(t){var e=t.width,n=t.height;return(0,v.jsx)(P,k(k({},o),{},{height:n,width:e}))}})}),i&&(0,v.jsx)("div",{style:{paddingTop:4},children:(0,v.jsx)(f.ZP,{center:!0,muted:!0,small:!0,children:i})})]})}},98684:function(t,e,n){n.d(e,{K:function(){return i}});var r=n(70987),i=function(t){var e=t||r.Z,n=e.brand,i=n.earth200,o=n.earth300,a=n.earth400,l=n.energy200,c=n.energy300,u=n.energy400,d=n.fire200,s=n.fire300,h=n.fire400,f=n.water200,p=n.water300,m=n.water400,g=n.wind200,x=n.wind300,y=n.wind400,v=e.chart;return[v.backgroundPrimary,v.backgroundSecondary,v.backgroundTertiary].concat([y,m,h,u,a,x,p,s,c,o,g,f,d,l,i])}},94035:function(t,e,n){var r=n(38626).default.div.withConfig({displayName:"YAxisLabelContainer",componentId:"sc-qwp21x-0"})(["-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-o-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);white-space:nowrap;"]);e.Z=r},79221:function(t,e,n){n.d(e,{P5:function(){return r},Vs:function(){return i}});n(81728);function r(t,e){var n=e||{},r=n.maxFractionDigits,i=n.minAmount,o=Intl.NumberFormat("en-US",{maximumFractionDigits:r||2,notation:"compact"});return"number"!==typeof t?t:t>=(i||1e4)?o.format(t):t.toString()}function i(t,e,n){var r,i;if("undefined"===typeof t||"undefined"===typeof e)return 0;var o=null===t||void 0===t||null===(r=t(e,n))||void 0===r||null===(i=r.props)||void 0===i?void 0:i.children;return(Array.isArray(o)?o:[o]).join("").length}},31882:function(t,e,n){var r=n(38626),i=n(71180),o=n(55485),a=n(30160),l=n(44897),c=n(72473),u=n(70515),d=n(61896),s=n(28598),h=r.default.div.withConfig({displayName:"Chip__ChipStyle",componentId:"sc-1ok73g-0"})(["display:inline-block;"," "," "," "," "," ",""],(function(t){return!t.primary&&"\n background-color: ".concat((t.theme.background||l.Z.background).tag,";\n ")}),(function(t){return t.primary&&"\n background-color: ".concat((t.theme.chart||l.Z.chart).primary,";\n ")}),(function(t){return!t.small&&"\n border-radius: ".concat((u.iI+d.Al)/2,"px;\n height: ").concat(1.5*u.iI+d.Al,"px;\n padding: ").concat(u.iI/1.5,"px ").concat(1.25*u.iI,"px;\n ")}),(function(t){return t.small&&"\n border-radius: ".concat((u.iI/2+d.Al)/2,"px;\n height: ").concat(d.Al+u.iI/2+2,"px;\n padding: ").concat(u.iI/4,"px ").concat(u.iI,"px;\n ")}),(function(t){return t.xsmall&&"\n border-radius: ".concat((u.iI/1+d.Al)/1,"px;\n height: ").concat(20,"px;\n padding: 4px 6px;\n ")}),(function(t){return t.border&&"\n border: 1px solid ".concat((t.theme.content||l.Z.content).muted,";\n ")}));e.Z=function(t){var e=t.border,n=t.children,r=t.disabled,l=t.label,d=t.monospace,f=t.onClick,p=t.primary,m=t.small,g=t.xsmall;return(0,s.jsx)(h,{border:e,primary:p,small:m,xsmall:g,children:(0,s.jsx)(i.ZP,{basic:!0,disabled:r,noBackground:!0,noPadding:!0,onClick:f,transparent:!0,children:(0,s.jsxs)(o.ZP,{alignItems:"center",children:[n,l&&(0,s.jsx)(a.ZP,{monospace:d,small:m,xsmall:g,children:l}),!r&&f&&(0,s.jsx)("div",{style:{marginLeft:2}}),!r&&f&&(0,s.jsx)(c.x8,{default:p,muted:!p,size:m?u.iI:1.25*u.iI})]})})})}},10305:function(t,e,n){var r=n(82684),i=n(55485),o=n(38276),a=n(28598);e.Z=function(t){var e=t.children,n=t.onChange,l=(0,r.useState)(r.Children.map(e,(function(){return null}))),c=l[0],u=l[1],d=(0,r.useState)(0),s=d[0],h=d[1];return(0,a.jsx)(i.ZP,{children:r.Children.map(e,(function(t,e){return(0,a.jsx)(o.Z,{ml:e>=1?1:0,style:{display:"flex",flex:1},children:r.cloneElement(t,{onChange:function(t){u((function(r){return r[e]=t.target.value,n(r,{resetValues:function(){return h((function(t){return t+1}))},setValues:u}),r}))},value:c[e]})},"multi-select-child-".concat(e,"-").concat(s))}))})}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[976],{4006:function(t,e,n){n.d(e,{Z:function(){return dt}});var r=n(75582),i=n(82394),o=n(92083),a=n.n(o),l=n(26304),c=n(26226),u=n(84969),d=n(90948),s=n(65743),h=n(39048),f=n(79487),p=n(29989),m=n(61655),g=n(16853),x=n(65376),y=n(55485),v=n(30160),b=n(94035),j=n(95363),k=n(70515),Z=n(21831),w=n(82684),O=n(38626),S=n(48072),P=n(24903),A=n(98677),I=n(84181),L=n(44897),T=n(79633),C=n(61896),M=n(81728);function D(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function E(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?D(Object(n),!0).forEach((function(e){(0,i.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var F={bottom:k.iI*(3+k.cd),left:k.iI*k.cd,right:k.iI*k.cd,top:k.iI*k.cd};function N(t,e){return Math.max.apply(Math,(0,Z.Z)(t.map(e)))}function _(t){var e=t.data,n=t.height,r=t.keyForYData,i=t.large,o=t.margin,a=void 0===o?{}:o,l=t.orientationVertical,c=void 0!==l&&l,u=t.showTooltip,d=t.width,s=t.yLabelFormat,h=(0,w.useContext)(O.ThemeContext),f=(0,w.useCallback)((function(t){return t[r]}),[r]),p=s;p||(p=function(t){return t.length>20?"".concat(t.substring(0,20),"..."):t});var m=i?C.iD:C.J5,g=E(E({},F),a),x=e.slice(Math.max(0,e.length-50)),y=(0,w.useMemo)((function(){return Object.keys((null===x||void 0===x?void 0:x[0])||{}).filter((function(t){return t!==r}))}),[x,r]),v=(0,P.Z)({domain:y,range:[T.a$,T.Ej,T.hM,T.ZA,T.$R,T.X_,T.er,T.hl,T.nQ]}),b=(0,w.useMemo)((function(){return x.map(f)}),[x,f]),j=(0,A.Z)({domain:b,padding:.1}),k=(0,A.Z)({domain:y,padding:.1}),D=(0,I.Z)({domain:[0,N(x,(function(t){return N(y,(function(e){return Number(t[e])}))}))]}),_={active:(null===h||void 0===h?void 0:h.content.default)||L.Z.content.default,backgroundPrimary:(null===h||void 0===h?void 0:h.chart.backgroundPrimary)||L.Z.chart.backgroundPrimary,backgroundSecondary:(null===h||void 0===h?void 0:h.chart.backgroundSecondary)||L.Z.chart.backgroundSecondary,muted:(null===h||void 0===h?void 0:h.content.muted)||L.Z.content.muted,primary:(null===h||void 0===h?void 0:h.chart.primary)||L.Z.chart.primary,tooltipBackground:(null===h||void 0===h?void 0:h.background.navigation)||L.Z.background.navigation},R=b;c&&(R=x.reduce((function(t,e){return t.concat(y.map((function(t){var n=e[t];return(0,M.HW)(n)?parseInt(String(n)):n})))}),[]));var B=Math.min(Math.max.apply(Math,(0,Z.Z)(R.map((function(t){return String(t).length})))),20);g.left+=7*B;var V=d-(g.left+g.right),z=n-(g.top+g.bottom);c?(j.rangeRound([0,V]),D.rangeRound([z,0])):(j.rangeRound([z,0]),D.rangeRound([0,V])),k.rangeRound([0,j.bandwidth()]);var Y=x.map(f).length,H=0;c||(H=j(R[Y-1]));var J=(0,w.useCallback)((function(t){var e=(0,S.Z)(t)||{x:0,y:0},n=e.x,r=e.y,i=n-g.left,o=r-g.top,a=0;a=c?(i-H/2)/(V-H):1-(o-H/2)/(z-H);var l=Math.floor(a*Y),d=x[l];"undefined"===typeof d&&(d=x[l-1]),c?i>H&&i<V+g.left-H&&u({tooltipData:d,tooltipLeft:n,tooltipTop:r}):o>H&&o<z-H&&u({tooltipData:d,tooltipLeft:n,tooltipTop:r})}),[x,Y,g.left,g.top,c,u,H,V,z]);return{colorScale:v,colors:_,data:x,fontSize:m,handleTooltip:J,margin:g,tempScale:D,tickValues:R,xKeys:y,xMax:V,y1Scale:k,yLabelFormat:p,yMax:z,yScale:j,ySerialize:f}}var R=n(28598),B=["height","width","xAxisLabel","yAxisLabel"];function V(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function z(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?V(Object(n),!0).forEach((function(e){(0,i.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Y=3*k.iI,H=(k.iI,k.iI,k.iI,(0,m.Z)((function(t){var e=t.data,n=t.height,i=t.hideTooltip,o=t.keyForYData,a=void 0===o?"__y":o,l=t.large,c=t.margin,m=void 0===c?{}:c,y=t.renderNoDataText,b=t.renderTooltipContent,k=t.showTooltip,Z=t.tooltipData,w=t.tooltipLeft,O=t.tooltipOpen,S=t.tooltipTop,P=t.width,A=t.xAxisLabel,I=t.xNumTicks,L=t.yLabelFormat,T=_({data:e,height:n,keyForYData:a,large:l,margin:m,showTooltip:k,width:P,yLabelFormat:L}),C=T.colorScale,D=T.colors,E=T.data,F=T.fontSize,N=T.handleTooltip,B=T.margin,V=T.tempScale,H=T.tickValues,J=T.xKeys,W=T.xMax,X=T.y1Scale,K=T.yLabelFormat,G=T.yMax,U=T.yScale,q=T.ySerialize,Q=[];Math.min((null===H||void 0===H?void 0:H.length)||0,Math.floor(n/Y));return null===H||void 0===H||H.forEach((function(t){Q.push(t)})),P<10?null:(0,R.jsxs)("div",{children:[(0,R.jsxs)("svg",{height:n,width:P,children:[y&&!(null!==E&&void 0!==E&&E.length)&&(0,R.jsx)("text",{fill:D.active,dominantBaseline:"middle",textAnchor:"middle",fontFamily:j.ry,fontSize:F,x:"50%",y:"50%",children:y()}),(0,R.jsx)(s.Z,{fill:"transparent",height:n-(B.top+B.bottom),onMouseLeave:function(){return i()},onMouseMove:N,onTouchMove:N,onTouchStart:N,rx:14,width:P-(B.left+B.right),x:B.left,y:B.top}),(null===E||void 0===E?void 0:E.length)&&(0,R.jsxs)(p.Z,{left:B.left,top:B.top,children:[(0,R.jsx)(h.Z,{color:C,data:E,keys:J,width:W,xScale:V,y0:q,y0Scale:U,y1Scale:X,children:function(t){return t.map((function(t){return(0,R.jsx)(p.Z,{top:t.y0,children:t.bars.map((function(e){return(0,R.jsx)("g",{children:(0,R.jsx)(R.Fragment,{children:(0,R.jsx)("rect",{fill:e.color,height:e.height,pointerEvents:"none",rx:4,width:e.width,x:e.x,y:e.y})})},"".concat(t.index,"-").concat(e.index,"-").concat(e.key))}))},"bar-group-horizontal-".concat(t.index,"-").concat(t.y0))}))}}),(0,R.jsx)(u.Z,{hideTicks:!0,scale:U,stroke:D.muted,tickFormat:function(t){return K(t)},tickLabelProps:function(){return{fill:D.active,fontFamily:j.ry,fontSize:F,style:{width:"10px"},textAnchor:"end"}},tickStroke:D.muted,tickValues:Q,top:2}),(0,R.jsx)(d.Z,{label:A,labelProps:{fill:D.muted,fontFamily:j.ry,fontSize:F,textAnchor:"middle"},numTicks:I,scale:V,stroke:D.muted,tickLabelProps:function(){return{fill:D.active,fontFamily:j.ry,fontSize:F,textAnchor:"middle"}},tickStroke:D.muted,top:G})]}),Z&&(0,R.jsx)("g",{children:(0,R.jsx)(f.Z,{from:{x:B.left,y:S},pointerEvents:"none",stroke:D.active,strokeDasharray:"5,2",strokeWidth:1,to:{x:W+B.left,y:S}})})]}),O&&Z&&(0,R.jsxs)(g.Z,{left:w,style:z(z({},x.j),{},{backgroundColor:D.tooltipBackground}),top:S,children:[b&&b(Z),!b&&Object.entries(Z).map((function(t){var e=(0,r.Z)(t,2),n=e[0],i=e[1];if(a!==n){var o=i;return(0,M.HW)(o)&&String(o).split(".").length>=2&&(o=o.toFixed(4)),(0,R.jsxs)(v.ZP,{inverted:!0,small:!0,children:[n,": ",o]},n)}}))]})]})})));var J=function(t){var e,n=t.height,r=t.width,i=t.xAxisLabel,o=t.yAxisLabel,a=(0,l.Z)(t,B);return e="undefined"===typeof r?"100%":o?0===r?r:r-28:r,(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)("div",{style:{display:"flex",height:n,marginBottom:i?k.iI:null,width:"100%"},children:[o&&(0,R.jsx)(y.ZP,{alignItems:"center",fullHeight:!0,justifyContent:"center",width:28,children:(0,R.jsx)(b.Z,{children:(0,R.jsx)(v.ZP,{center:!0,muted:!0,small:!0,children:o})})}),(0,R.jsx)("div",{style:{height:n,width:e},children:(0,R.jsx)(c.Z,{children:function(t){var e=t.width,n=t.height;return(0,R.jsx)(H,z(z({},a),{},{height:n,width:e}))}})})]}),i&&(0,R.jsx)("div",{style:{paddingLeft:o?36:0,paddingTop:4},children:(0,R.jsx)(v.ZP,{center:!0,muted:!0,small:!0,children:i})})]})},W=n(95422),X=["keyForYData"],K=["height","width","xAxisLabel","yAxisLabel"];function G(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function U(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?G(Object(n),!0).forEach((function(e){(0,i.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var q=6*k.iI,Q=(0,m.Z)((function(t){var e=t.keyForYData,n=void 0===e?"__y":e,i=(0,l.Z)(t,X),o=i.height,a=i.hideTooltip,c=i.renderNoDataText,h=i.renderTooltipContent,m=i.tooltipData,y=i.tooltipLeft,b=i.tooltipOpen,k=i.tooltipTop,Z=i.width,w=i.xLabelFormat,O=i.xNumTicks,S=i.yNumTicks,P=_(U(U({},i),{},{keyForYData:n,orientationVertical:!0})),A=P.colorScale,I=P.colors,L=P.data,T=P.fontSize,C=P.handleTooltip,D=P.margin,E=P.tempScale,F=(P.tickValues,P.xKeys),N=(P.xMax,P.y1Scale),B=P.yLabelFormat,V=P.yMax,z=P.yScale,Y=P.ySerialize,H=Math.min(O,Z/q);return Z<10?null:(0,R.jsxs)("div",{children:[(0,R.jsxs)("svg",{height:o,width:Z,children:[c&&!(null!==L&&void 0!==L&&L.length)&&(0,R.jsx)("text",{fill:I.active,dominantBaseline:"middle",textAnchor:"middle",fontFamily:j.ry,fontSize:T,x:"50%",y:"50%",children:c()}),(null===L||void 0===L?void 0:L.length)&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(s.Z,{fill:"transparent",height:o-(D.top+D.bottom),onMouseLeave:function(){return a()},onMouseMove:C,onTouchMove:C,onTouchStart:C,rx:14,width:Z-(D.left+D.right),x:D.left,y:2*D.top}),(0,R.jsxs)(p.Z,{top:D.top,children:[(0,R.jsx)(W.Z,{color:A,data:L,height:V,keys:F,x0:Y,x0Scale:z,x1Scale:N,yScale:E,children:function(t){return t.map((function(t){return(0,R.jsx)(p.Z,{left:t.x0+D.left,top:D.top,children:t.bars.map((function(e){return(0,R.jsx)("g",{children:(0,R.jsx)("rect",{fill:e.color,height:e.height,pointerEvents:"none",rx:4,width:e.width,x:e.x,y:e.y})},"".concat(t.index,"-").concat(e.index,"-").concat(e.key))}))},"bar-group-horizontal-".concat(t.index,"-").concat(t.x0))}))}}),(0,R.jsx)(u.Z,{left:D.left,numTicks:S,scale:E,stroke:I.muted,tickFormat:function(t){return B(t)},tickLabelProps:function(){return{fill:I.active,fontFamily:j.ry,fontSize:T,textAnchor:"end",transform:"translate(-2,2.5)"}},tickStroke:I.muted,top:D.top}),(0,R.jsx)(d.Z,{hideTicks:!0,left:D.left,numTicks:H,scale:z,stroke:I.muted,tickFormat:w,tickLabelProps:function(){return{fill:I.active,fontFamily:j.ry,fontSize:T,textAnchor:"middle"}},tickStroke:I.muted,top:V+D.top})]})]}),m&&(0,R.jsx)("g",{children:(0,R.jsx)(f.Z,{from:{x:y,y:2*D.top},pointerEvents:"none",stroke:I.active,strokeDasharray:"5,2",strokeWidth:1,to:{x:y,y:V+2*D.top}})})]}),b&&m&&(0,R.jsxs)(g.Z,{left:y,style:U(U({},x.j),{},{backgroundColor:I.tooltipBackground}),top:k,children:[h&&h(m),!h&&Object.entries(m).map((function(t){var e=(0,r.Z)(t,2),i=e[0],o=e[1];if(n!==i){var a=o;return(0,M.HW)(a)&&String(a).split(".").length>=2&&(a=a.toFixed(4)),(0,R.jsxs)(v.ZP,{inverted:!0,small:!0,children:[i,": ",a]},i)}})),(0,R.jsx)("br",{}),(0,R.jsxs)(v.ZP,{inverted:!0,small:!0,children:[w&&w(Y(m)),!w&&Y(m)]})]})]})}));var $=function(t){var e=t.height,n=t.width,r=t.xAxisLabel,i=t.yAxisLabel,o=(0,l.Z)(t,K);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)("div",{style:{display:"flex",height:e,marginBottom:r?k.iI:null,width:"100%"},children:[i&&(0,R.jsx)(y.ZP,{alignItems:"center",fullHeight:!0,justifyContent:"center",width:28,children:(0,R.jsx)(b.Z,{children:(0,R.jsx)(v.ZP,{center:!0,muted:!0,small:!0,children:i})})}),(0,R.jsx)("div",{style:{height:e,width:i?0===n?n:n-28:n},children:(0,R.jsx)(c.Z,{children:function(t){var e=t.height,n=t.width;return(0,R.jsx)(Q,U(U({},o),{},{height:e,width:n}))}})})]}),r&&(0,R.jsx)("div",{style:{paddingLeft:i?36:0,paddingTop:4},children:(0,R.jsx)(v.ZP,{center:!0,muted:!0,small:!0,children:r})})]})},tt=n(93859),et=n(52729),nt=n(74168),rt=n(87862),it=n(97301),ot=n(35058),at=n(3917),lt=n(86735);function ct(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ut(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ct(Object(n),!0).forEach((function(e){(0,i.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ct(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var dt=function(t){var e,n=t.block,o=t.data,l=t.width,c=t.xAxisLabel,u=n.configuration,d=void 0===u?{}:u,s=d||{},h=s.chart_style,f=s.chart_type,p=s.y_sort_order,m=d[ot.JJ]||it.lA,g=(null===d||void 0===d||null===(e=d[ot.bE])||void 0===e?void 0:e.map((function(t){return(0,ot.c0)(t)})))||[],x=at.n1,y=d[ot.Yg];if([ot.aE.HOUR,ot.aE.MINUTE,ot.aE.SECOND].includes(y)&&(x=at.OC),ot.oV.BAR_CHART===f||ot.oV.TIME_SERIES_BAR_CHART===f){var b=o.x,j=o.y,Z=ot.oV.TIME_SERIES_BAR_CHART===f;if(b&&j&&Array.isArray(b)&&Array.isArray(j)){var w,O=null===(w=d[ot.eN])||void 0===w?void 0:w.join(", "),S=null===g||void 0===g?void 0:g.join(", ");g.length||g.push(ot.rj);var P=g[0],A=b.map((function(t,e){return ut({__y:t},g.reduce((function(t,n,r){var o,a=null===j||void 0===j||null===(o=j[r])||void 0===o?void 0:o[e];return"undefined"===typeof a?t:ut(ut({},t),{},(0,i.Z)({},n,a))}),{}))}));ot.JT.HORIZONTAL===h?ot.MP.ASCENDING===p?A=(0,lt.YC)(A,(function(t){return t[P]}),{ascending:!1}):ot.MP.DESCENDING===p&&(A=(0,lt.YC)(A,(function(t){return t[P]}),{ascending:!0})):ot.JT.VERTICAL===h&&(ot.MP.ASCENDING===p?A=(0,lt.YC)(A,(function(t){return t[P]}),{ascending:!0}):ot.MP.DESCENDING===p&&(A=(0,lt.YC)(A,(function(t){return t[P]}),{ascending:!1})));var I={data:A,height:m,renderNoDataText:function(){return"No data matching query"},width:l,xNumTicks:3};return ot.JT.HORIZONTAL===h?(0,R.jsx)(J,ut(ut({},I),{},{xAxisLabel:S||d[ot.rj],yAxisLabel:c||O||d[ot.a3]})):(0,R.jsx)($,ut(ut({},I),{},{xAxisLabel:c||O,xLabelFormat:function(t){return Z?a()(1e3*t).format(at.n1):t},xNumTicks:A.length,yAxisLabel:S,yNumTicks:5}))}}else if(ot.oV.HISTOGRAM===f){var L,T=o.x,C=o.y,D=null===(L=d[ot.eN])||void 0===L?void 0:L.join(", ");if(T&&C&&Array.isArray(T))return(0,R.jsx)(et.Z,{data:T.map((function(t,e){var n,r=t.max,i=t.min;return[r,null===C||void 0===C||null===(n=C[e])||void 0===n?void 0:n.value,i]})),height:m,width:l,large:!0,margin:{left:5*k.iI,right:1*k.iI,top:3*k.iI},noPadding:!0,renderTooltipContent:function(t){var e=(0,r.Z)(t,3),n=e[0],i=e[1],o=e[2];return(0,R.jsxs)(v.ZP,{inverted:!0,monospace:!0,small:!0,children:["Count : ",i,(0,R.jsx)("br",{}),"Bucket: ",o,"-",n]})},showAxisLabels:!0,showYAxisLabels:!0,showZeroes:!0,sortData:function(t){return(0,lt.YC)(t,"[0]")},xAxisLabel:c||D||d[ot.a3],yAxisLabel:D?"count(".concat(D,")"):d[ot.rj]})}else if(ot.oV.LINE_CHART===f||ot.oV.TIME_SERIES_LINE_CHART===f){var E=o.x,F=o.y,N=ot.oV.TIME_SERIES_LINE_CHART===f;if(E&&F&&Array.isArray(E)&&Array.isArray(F)&&Array.isArray(null===F||void 0===F?void 0:F[0])){var _,B=g;d[ot.e]&&(B=d[ot.e].split(",").map((function(t){return t.trim()})));var V=E.map((function(t,e){return{x:t,y:(0,lt.w6)(F.length).map((function(t,n){var r=F[n][e];return"undefined"===typeof r||null===r?0:r}))}})),z=null===(_=d[ot.eN])||void 0===_?void 0:_.join(", "),Y=g.join(", ");return(0,R.jsx)(nt.Z,{data:V,height:m,lineLegendNames:B,margin:{bottom:8*k.iI,left:5*k.iI},noCurve:!0,renderXTooltipContent:function(t){t.index;var e=t.x,n=d[ot.a3],r=e;return d[ot.eN]&&(n=d[ot.eN].map(String).join(", ")),N&&(r=a()(1e3*e).format(x)),(0,R.jsxs)(v.ZP,{inverted:!0,small:!0,children:[n,": ",r]})},renderYTooltipContent:function(t,e){var n=t.y;return(0,R.jsxs)(v.ZP,{inverted:!0,small:!0,children:[B&&B[e]&&"".concat(B[e],": "),n&&(0,M.x6)((0,M.QV)(n[e],4))]})},width:l?l-(3*k.iI+3):l,xAxisLabel:c||z||String(d[ot.a3]||""),xLabelFormat:function(t){return N?a()(1e3*t).format(at.n1):t},yAxisLabel:Y||String(d[ot.rj]),yLabelFormat:function(t){return t}})}}else if(ot.oV.PIE_CHART===f){var H,W=o[String(d[ot.a3]||ot.a3)],X=null===(H=d[ot.eN])||void 0===H?void 0:H.join(", ");if(W)return(0,R.jsx)(rt.Z,{data:Object.entries(W),getX:function(t){var e=(0,r.Z)(t,2),n=e[0],i=e[1];return"".concat(n," (").concat((0,M.x6)(i),")")},getY:function(t){return(0,r.Z)(t,2)[1]},height:m,width:l,xAxisLabel:c||X||String(d[ot.a3]||"")})}else if(ot.oV.TABLE===f){var K=o.index,G=o.x,U=o.y;return Array.isArray(G)&&Array.isArray(U)&&Array.isArray(U[0])&&(0,R.jsx)(tt.Z,{columns:G,height:d[ot.JJ]?null:m,index:K,maxHeight:d[ot.JJ]?m:null,noBorderBottom:!0,noBorderLeft:!0,noBorderRight:!0,noBorderTop:!0,rows:U,width:l})}return(0,R.jsx)("div",{})}},97301:function(t,e,n){n.d(e,{T7:function(){return d},Tb:function(){return u},lA:function(){return l},pM:function(){return c},y9:function(){return s}});var r=n(38626),i=n(44897),o=n(42631),a=n(70515),l=40*a.iI,c=r.default.div.withConfig({displayName:"indexstyle__ChartBlockStyle",componentId:"sc-1c3ufnj-0"})(["border-radius:","px;margin-left:","px;margin-right:","px;margin-top:","px;",""],o.n_,.5*a.iI,.5*a.iI,1*a.iI,(function(t){return"\n background-color: ".concat((t.theme.background||i.Z.background).codeArea,";\n ")})),u=r.default.div.withConfig({displayName:"indexstyle__ConfigurationOptionsStyle",componentId:"sc-1c3ufnj-1"})(["flex:4;padding-left:","px;padding-right:","px;"],1*a.iI,1*a.iI),d=r.default.div.withConfig({displayName:"indexstyle__CodeStyle",componentId:"sc-1c3ufnj-2"})(["padding-top:","px;",""],a.iI/2,(function(t){return"\n background-color: ".concat((t.theme.background||i.Z.background).codeTextarea,";\n ")})),s=r.default.div.withConfig({displayName:"indexstyle__CodeHelperStyle",componentId:"sc-1c3ufnj-3"})(["margin-bottom:","px;padding-bottom:","px;padding-left:","px;",""],a.cd*a.iI,a.iI,a.iI,(function(t){return"\n border-bottom: 1px solid ".concat((t.theme.borders||i.Z.borders).medium,";\n ")}))},52729:function(t,e,n){n.d(e,{Z:function(){return V}});var r=n(26304),i=n(21831),o=n(82394),a=n(82684),l=n(26226),c=n(84969),u=n(90948),d=n(65743),s=n(29989),h=n(38626),f=n(61655),p=n(16853),m=n(65376),g=n(48072),x=n(98677),y=n(84181),v=n(55485),b=n(4190),j=n(30160),k=n(94035),Z=n(70987),w=n(79633),O=n(89370),S=n(95363),P=n(61896),A=n(70515),I=n(38469),L=n(6568),T=function(t){return t.slice(0,10)},C=function(t,e){var n=t.toISOString().slice(0,10),r=e.toISOString().slice(0,10);return"".concat(n,":").concat(r)},M=n(79221),D=n(98684),E=n(28598),F=["height","loading","selected","width","xAxisLabel","yAxisLabel"];function N(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?N(Object(n),!0).forEach((function(e){(0,o.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var R={bottom:A.iI,left:3*A.iI,right:0,top:1*A.iI},B=(0,f.Z)((function(t){var e=t.columnType,n=t.data,r=void 0===n?[]:n,o=t.getBarColor,l=t.getXValue,f=t.getYValue,v=t.height,b=t.hideTooltip,k=t.large,F=t.margin,N=void 0===F?{}:F,B=t.muted,V=t.noPadding,z=t.numberOfXTicks,Y=t.renderTooltipContent,H=t.selected,J=t.showAxisLabels,W=t.showTooltip,X=t.showYAxisLabels,K=t.showZeroes,G=t.sortData,U=t.tooltipData,q=t.tooltipLeft,Q=t.tooltipOpen,$=t.tooltipTop,tt=t.width,et=t.xLabelFormat,nt=t.yLabelFormat,rt=k?P.J5:P.VK,it=(0,a.useCallback)((function(t){return l?l(t):t[0]}),[l]),ot=(0,a.useCallback)((function(t){return f?f(t):t[1]}),[f]),at=(0,a.useContext)(h.ThemeContext),lt=e===O.RL.DATETIME,ct=_(_({},R),N);J&&(ct=_(_({},ct),{},{left:ct.left+A.iI}));var ut=G?G(r):r.sort((function(t,e){return e[1]-t[1]})),dt=lt?r.sort((function(t,e){return new Date(t[0])-new Date(e[0])})).filter((function(t){return!!t[0]})):ut.slice(0,60),st=tt-(ct.left+ct.right),ht=v-(ct.bottom+ct.top),ft=lt?function(t,e){var n,r=t.map((function(t){return new Date(t[0])})).sort((function(t,e){return t-e}));return(0,L.Z)({domain:(n=r,[(0,I.Z)(n[0]),(0,I.Z)(n[n.length-1])]),nice:!0,range:[0,e]})}(dt,st):null,pt=function(t,e){if(null===e)return{};var n=e.ticks().map((function(t){return t.toISOString()})),r={},i=0,o=1;return t.forEach((function(t){var e=new Date(t[0]),a=t[1],l=n[i],c=n[o];if(l&&c){var u=new Date(l),d=new Date(c),s=C(u,d);if(e>=u&&e<d)r[s]=(r[s]||0)+a;else for(;o<n.length||!r[s];)if(i+=1,o+=1,u=new Date(n[i]),d=new Date(n[o]),s=C(u,d),e>=u&&e<d)return void(r[s]=(r[s]||0)+a)}})),n.reduce((function(t,e,n,r){if(0===n)return t;var i=T(e),o=T(r[n-1]);return t.push("".concat(o,":").concat(i)),t}),[]).forEach((function(t){r[t]=r[t]||0})),r}(dt,ft);dt=ft?Object.entries(pt).sort((function(t,e){return new Date(T(t[0]))-new Date(T(e[0]))})):dt;var mt=ft?Math.max.apply(Math,(0,i.Z)(Object.values(pt))):0,gt=dt.reduce((function(t,e){return(0!==ot(e)||lt||K)&&t.push(it(e)),t}),[]),xt=gt.length,yt=function(t,e,n){return n?.05:t>=30&&e<300?.5:t>=15?.3:t>=5?.1:t>2?.05:2===t?.025:0}(xt,tt,lt),vt=(0,x.Z)({domain:gt,paddingInner:V?null:yt,range:[0,st],round:!1}),bt=(0,y.Z)({domain:[0,Math.max.apply(Math,(0,i.Z)(dt.map(ot)))],range:[ht,0],round:!0}),jt=(0,D.K)(at),kt={active:((null===at||void 0===at?void 0:at.content)||Z.Z.content).active,default:jt[0],muted:((null===at||void 0===at?void 0:at.monotone)||Z.Z.monotone).gray,selected:((null===at||void 0===at?void 0:at.elevation)||Z.Z.elevation).visualizationAccent},Zt=kt.default;B?Zt=kt.muted:H&&(Zt=kt.selected);var wt=xt?lt?mt:Math.max.apply(Math,(0,i.Z)(dt.map((function(t){return ot(t)})))):0,Ot=Math.floor(wt/6),St=[0],Pt=0;if(wt>6)for(;Pt<wt;)St.push(Pt+Ot),Pt+=Ot;else for(;Pt<=wt;)St.push(Pt+1),Pt+=1;wt>9999?ct=_(_({},ct),{},{left:k?8*A.iI:4.1*A.iI}):wt>999&&(ct=_(_({},ct),{},{left:k?5*A.iI:3.6*A.iI}));var At=lt?2.25:0,It=xt<10||e===O.RL.NUMBER||e===O.RL.NUMBER_WITH_DECIMALS||lt||X,Lt=(0,a.useCallback)((function(t){var e=(0,g.Z)(t)||{x:0,y:0},n=e.x,r=e.y,i=(n-(J?ct.left:0))/st,o=Math.floor(xt*i),a=dt[o];"undefined"===typeof a&&(a=dt[0]);var l=it(a);l=l.length>15?"".concat(l.slice(0,21)):l;var c=Y?Y(a):"".concat(l," (").concat(ot(a),")");W({tooltipData:c,tooltipLeft:n-ct.left,tooltipTop:r+ct.top})}),[dt,xt,it,ot,ct.left,ct.top,Y,J,W,tt]);return tt<10||!r.length?null:(0,E.jsxs)("div",{children:[(0,E.jsxs)("svg",{height:v+ct.bottom*(lt?7.5:3),width:tt,children:[(0,E.jsx)(s.Z,{left:J?ct.left:0,top:ct.top+At,children:dt.reduce((function(t,e){var n=it(e),r=ot(e);if(0!==r){var i,a=vt.bandwidth(),l=ht-(null!==(i=bt(r))&&void 0!==i?i:0),c=vt(n),u=ht-l;t.push((0,E.jsx)(d.Z,{fill:o?o(e):Zt,height:l,onMouseLeave:function(){return b()},onMouseMove:Lt,onTouchMove:Lt,onTouchStart:Lt,width:a,x:c,y:u},"bar-".concat(n)))}return t}),[])}),J&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(c.Z,{left:ct.left,scale:bt,stroke:kt.muted,tickFormat:function(t){return nt?nt(t):(0,M.P5)(t)},tickLabelProps:function(){return{fill:kt.active,fontFamily:S.ry,fontSize:rt,textAnchor:"end",transform:"translate(-2,2.5)"}},tickStroke:kt.muted,tickValues:St,top:ct.top+At}),(0,E.jsx)(u.Z,{left:ct.left,numTicks:lt?void 0:z||6,orientation:"top",scale:ft||vt,stroke:kt.muted,tickFormat:function(t){return et?et(String(t)):lt?t.toISOString().slice(0,10):String(t)},tickLabelProps:function(t){return{fill:It?kt.active:"transparent",fontFamily:S.ry,fontSize:rt,textAnchor:"middle",transform:lt?"rotate(-90,".concat(ft(t),",0) translate(-33,10)"):"translate(0, ".concat(3*ct.bottom,")")}},tickLineProps:{transform:"translate(0,".concat(A.iI,")")},tickStroke:It?kt.muted:"transparent",top:ht+ct.top+At})]})]}),Q&&U&&(0,E.jsx)(p.Z,{left:q,style:m.j,top:$,children:(0,E.jsx)(j.ZP,{color:w.E5,small:!0,children:U})})]})}));var V=function(t){var e=t.height,n=t.loading,i=t.selected,o=t.width,a=t.xAxisLabel,c=t.yAxisLabel,u=(0,r.Z)(t,F);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)("div",{style:{display:"flex",height:e,marginBottom:A.iI,width:"100%"},children:[c&&(0,E.jsx)(v.ZP,{alignItems:"center",fullHeight:!0,justifyContent:"center",width:28,children:(0,E.jsx)(k.Z,{children:(0,E.jsx)(j.ZP,{center:!0,muted:!0,small:!0,children:c})})}),(0,E.jsxs)("div",{style:{height:e,width:c?0===o?o:o-28:o},children:[n&&(0,E.jsx)(b.Z,{}),!n&&(0,E.jsx)(l.Z,{children:function(t){var e=t.height,n=t.width;return(0,E.jsx)(B,_(_({},u),{},{height:e,selected:i,width:n}))}})]})]}),a&&(0,E.jsx)("div",{style:{paddingLeft:c?36:0,paddingTop:4},children:(0,E.jsx)(j.ZP,{center:!0,muted:!0,small:!0,children:a})})]})}},74168:function(t,e,n){var r=n(26304),i=n(21831),o=n(82394),a=n(82684),l=n(26226),c=n(38626),u=n(90948),d=n(84969),s=n(65743),h=n(85587),f=n(79487),p=n(52136),m=n(67778),g=n(29989),x=n(17066),y=n(84482),v=n(76771),b=n(98889),j=n(65376),k=n(61655),Z=n(97745),w=n(48072),O=n(10103),S=n(84181),P=n(24903),A=n(55485),I=n(30160),L=n(94035),T=n(44897),C=n(8454),M=n(79633),D=n(95363),E=n(61896),F=n(70515),N=n(86735),_=n(79221),R=n(98684),B=n(28598),V=["areaBetweenLines","data","events","height","lineLegendNames","margin","width","xAxisLabel","xLabelFormat","yAxisLabel","yLabelFormat"];function z(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Y(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?z(Object(n),!0).forEach((function(e){(0,o.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var H=Y(Y({},j.j),{},{backgroundColor:T.Z.background.muted,border:"none"}),J=(0,k.Z)((function(t){var e=t.areaBetweenLines,n=t.data,r=t.events,o=void 0!==r&&r,l=t.getX,k=t.getY,A=t.getYScaleValues,L=t.gridProps,V=void 0===L?{}:L,z=t.height,J=t.hideGridX,W=t.hideTooltip,X=t.increasedXTicks,K=t.lineLegendNames,G=t.margin,U=t.noCurve,q=t.numYTicks,Q=t.renderXTooltipContent,$=t.renderYTooltipContent,tt=t.showTooltip,et=t.thickStroke,nt=t.tooltipData,rt=t.tooltipLeft,it=void 0===rt?0:rt,ot=t.tooltipTop,at=void 0===ot?[]:ot,lt=t.width,ct=t.xLabelFormat,ut=t.xLabelRotate,dt=void 0===ut||ut,st=t.yLabelFormat,ht=(0,a.useContext)(c.ThemeContext),ft=l||function(t){return null===t||void 0===t?void 0:t.x},pt=k||function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return null===t||void 0===t||null===(e=t.y)||void 0===e?void 0:e[n]},mt=T.Z.monotone.gray,gt=T.Z.brand.wind200,xt=T.Z.content.muted,yt=T.Z.monotone.gray,vt=n.map((function(t){return Number(ft(t))}));if(lt<10)return null;var bt=lt-G.left-G.right,jt=z-G.top-G.bottom,kt=bt/2,Zt=0===n.length?0:Math.max.apply(Math,(0,i.Z)(n.map((function(t){var e=t.y;return(null===e||void 0===e?void 0:e.length)||0})))),wt=(0,a.useMemo)((function(){return(0,S.Z)({domain:[Math.min.apply(Math,(0,i.Z)(vt)),Math.max.apply(Math,(0,i.Z)(vt))],range:[0,bt]})}),[bt,vt]),Ot=Math.min.apply(Math,(0,i.Z)(n.map((function(t){var e=t.y;return Math.min.apply(Math,(0,i.Z)(A?A(e):e||[]))})))),St=Math.max.apply(Math,(0,i.Z)(n.map((function(t){var e=t.y;return Math.max.apply(Math,(0,i.Z)(A?A(e):e||[]))})))),Pt=(0,a.useMemo)((function(){return(0,S.Z)({domain:[Ot,St],nice:!0,range:[jt,0]})}),[jt,St,Ot]),At=lt>520?X?20:10:X?10:5,It=(0,R.K)(ht),Lt=xt,Tt=It.map((function(t){return{stroke:t}})),Ct=(0,P.Z)({domain:K||[],range:Tt.map((function(t){return t.stroke}))}),Mt=(0,a.useCallback)((function(t){var e=((0,w.Z)(t)||{x:0}).x,r=wt.invert(e-G.left),i=(0,N.ry)(vt,(function(t){return r>=t})),o=n[i-1],a=n[i],l=o;a&&(r-ft(o)>ft(a)-r?l=a:(l=o,i-=1));var c=(0,O.range)(0,Zt).map((function(t){return Pt(pt(l,t))})),u=c.some((function(t){return"undefined"===typeof t}));(pt(l)||A&&!u)&&tt({tooltipData:Y(Y({},l),{},{index:i}),tooltipLeft:e,tooltipTop:c})}),[n,ft,pt,A,G,tt,wt,vt,Pt]),Dt={};return U||(Dt.curve=Z.ZP),(0,B.jsxs)(B.Fragment,{children:[K&&(0,B.jsx)("div",{style:{marginLeft:null===G||void 0===G?void 0:G.left},children:(0,B.jsx)(x.Z,{labelFormat:function(t){return t},scale:Ct,children:function(t){return(0,B.jsx)("div",{style:{display:"flex",flexDirection:C.qs.ROW},children:t.map((function(t,e){return(0,B.jsxs)(y.Z,{margin:"0 5px",onClick:function(){o&&alert("clicked: ".concat(JSON.stringify(t)))},children:[(0,B.jsx)("svg",{height:15,width:15,children:(0,B.jsx)("rect",{fill:t.value,height:15,width:15})}),(0,B.jsx)(v.Z,{align:"left",margin:"0 0 0 4px",children:(0,B.jsx)(I.ZP,{small:!0,children:t.text})})]},"legend-quantile-".concat(e))}))})}})}),(0,B.jsxs)("svg",{height:z,width:lt,children:[!e&&(0,B.jsx)(s.Z,{fill:"transparent",height:z,onMouseLeave:function(){return W()},onMouseMove:Mt,onTouchMove:Mt,onTouchStart:Mt,rx:14,width:lt-(G.left+G.right),x:G.left,y:0}),(0,B.jsxs)(g.Z,{left:G.left,top:G.top,children:[!J&&(0,B.jsx)(p.Z,Y({height:jt,pointerEvents:"none",scale:wt,stroke:mt,strokeDasharray:"3,3",strokeOpacity:.4,width:bt},V)),(0,B.jsx)(m.Z,Y({height:jt,pointerEvents:"none",scale:Pt,stroke:mt,strokeDasharray:"3,3",strokeOpacity:.4,width:bt},V)),(0,B.jsx)("line",{stroke:mt,x1:bt,x2:bt,y1:0,y2:jt}),(0,B.jsx)(u.Z,{numTicks:At,scale:wt,stroke:Lt,tickFormat:function(t){return ct?ct(t):t},tickLabelProps:function(t){return{fill:xt,fontFamily:D.ry,fontSize:E.J5,textAnchor:"middle",transform:dt&&"rotate(-45, ".concat(wt(t),", 0) translate(-32, 4)")}},tickStroke:Lt,top:jt}),(0,B.jsx)(d.Z,{hideTicks:!0,numTicks:q,scale:Pt,stroke:Lt,tickFormat:function(t){return st?st(t):(0,_.P5)(t)},tickLabelProps:function(t){return{dx:String(t).length>4?3:0,fill:xt,fontFamily:D.ry,fontSize:E.J5,textAnchor:"end",transform:"translate(0,2.5)"}},tickStroke:Lt}),e&&e.map((function(t){var e=t[0],r=t[1];return(0,a.createElement)(b.Z,Y(Y({},Dt),{},{aboveAreaProps:{fill:T.Z.brand.earth400,fillOpacity:.3},belowAreaProps:{fill:gt,fillOpacity:.2},clipAboveTo:0,clipBelowTo:jt,data:n,id:"".concat(Math.random()),key:"".concat(e,"-").concat(r),x:function(t){return wt(ft(t))},y0:function(t){return Pt("undefined"===typeof r?Ot:pt(t,r))},y1:function(t){return Pt(pt(t,e))}}))})),(0,O.range)(0,Zt).map((function(t){return(0,a.createElement)(h.Z,Y(Y({},Dt),{},{data:n.filter((function(t){return void 0!=t.y})),key:t,pointerEvents:"none",strokeWidth:et?2:1,x:function(t){return wt(ft(t))},y:function(e){return Pt(e.y&&(t>=e.y.length?Ot:pt(e,t)))}},Tt[t]))}))]}),nt&&(0,B.jsxs)("g",{children:[(0,B.jsx)(f.Z,{from:{x:it,y:G.top},pointerEvents:"none",stroke:M.Ej,strokeDasharray:"5,2",strokeWidth:1,to:{x:it,y:jt+G.top}}),at.map((function(t,e){return(0,B.jsx)("circle",{cx:it,cy:t+1+G.top,fill:Tt[e].stroke,fillOpacity:.1,pointerEvents:"none",r:4,stroke:yt,strokeOpacity:.1,strokeWidth:1},e)})),at.map((function(t,e){return(0,B.jsx)("circle",{cx:it,cy:t+G.top,fill:Tt[e].stroke,pointerEvents:"none",r:4,stroke:Tt[e].stroke,strokeWidth:2},e)}))]})]}),nt&&(0,B.jsxs)("div",{children:[at.map((function(t,e){var n=pt(nt,e);return e>=1&&Math.abs(at[e-1]-t)<5*F.iI&&(t+=3*F.iI),(0,B.jsxs)(j.Z,{left:it>kt?it-(0,_.Vs)($,nt,e)*F.iI:it+F.iI,style:H,top:t-2*F.iI,children:[$&&$(nt,e),!$&&(0,B.jsxs)(I.ZP,{center:!0,small:!0,children:[n.toFixed?n.toFixed(3):n," ",null===K||void 0===K?void 0:K[e]]})]},e)})),(0,B.jsxs)(j.Z,{left:it>kt?it-4*(0,_.Vs)(Q,nt):it,style:Y(Y({},H),{},{transform:"translateX(-65%)"}),top:jt+G.top,children:[Q&&Q(nt),!Q&&(0,B.jsx)(I.ZP,{center:!0,small:!0,children:ft(nt).toFixed(3)})]})]})]})}));e.Z=function(t){var e=t.areaBetweenLines,n=t.data,i=(t.events,t.height),o=t.lineLegendNames,a=t.margin,c=void 0===a?{}:a,u=t.width,d=t.xAxisLabel,s=t.xLabelFormat,h=t.yAxisLabel,f=t.yLabelFormat,p=(0,r.Z)(t,V),m=Y(Y({},{bottom:3*F.iI,left:5*F.iI,right:3*F.iI,top:3*F.iI}),c);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("div",{style:{display:"flex",height:i,marginBottom:F.iI,width:"100%"},children:[h&&(0,B.jsx)(A.ZP,{alignItems:"center",fullHeight:!0,justifyContent:"center",width:28,children:(0,B.jsx)(L.Z,{children:(0,B.jsx)(I.ZP,{center:!0,muted:!0,small:!0,children:h})})}),(0,B.jsx)("div",{style:{height:i,width:"undefined"===typeof u?"100%":u},children:(0,B.jsx)(l.Z,{children:function(t){var r=t.width,i=t.height;return(0,B.jsx)(J,Y(Y({},p),{},{areaBetweenLines:e,data:n,height:i,lineLegendNames:o,margin:m,width:r,xLabelFormat:s,yLabelFormat:f}))}})})]}),d&&(0,B.jsx)("div",{style:{paddingLeft:h?36:0,paddingTop:4},children:(0,B.jsx)(I.ZP,{center:!0,muted:!0,small:!0,children:d})})]})}},87862:function(t,e,n){n.d(e,{Z:function(){return A}});var r=n(26304),i=n(82394),o=n(75582),a=n(26226),l=n(28940),c=n(82684),u=n(29989),d=n(38626),s=n(11684),h=n(24903),f=n(30160),p=n(44897),m=n(95363),g=n(61896),x=n(70515),y=n(98684),v=n(28598),b=["height","width","xAxisLabel"];function j(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function k(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?j(Object(n),!0).forEach((function(e){(0,i.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Z={bottom:0,left:0,right:0,top:0},w=function(t){var e=t.endAngle;return{endAngle:e>Math.PI?2*Math.PI:0,opacity:0,startAngle:e>Math.PI?2*Math.PI:0}},O=function(t){var e=t.startAngle;return{endAngle:t.endAngle,opacity:1,startAngle:e}};function S(t){var e=t.animate,n=t.arcs,r=t.path,i=t.getKey,a=t.getColor,l=t.onClickDatum,c=t.textColor;return(0,s.useTransition)(n,{enter:O,from:e?w:O,keys:i,leave:e?w:O,update:O})((function(t,e,n){var u=n.key,d=r.centroid(e),h=(0,o.Z)(d,2),f=h[0],p=h[1],x=e.endAngle-e.startAngle>=.1;return(0,v.jsxs)("g",{children:[(0,v.jsx)(s.animated.path,{d:(0,s.to)([t.startAngle,t.endAngle],(function(t,n){return r(k(k({},e),{},{endAngle:n,startAngle:t}))})),fill:a(e),onClick:function(){return l(e)},onTouchStart:function(){return l(e)}}),x&&(0,v.jsx)(s.animated.g,{style:{opacity:t.opacity},children:(0,v.jsx)("text",{dy:".33em",fill:c,fontFamily:m.ry,fontSize:g.J5,pointerEvents:"none",textAnchor:"middle",x:f,y:p,children:i(e)})})]},u)}))}function P(t){var e=t.animate,n=void 0===e||e,r=t.data,i=t.getX,o=t.getY,a=t.height,s=t.margin,f=void 0===s?Z:s,m=t.textColor,g=t.width,b=(0,c.useState)(null),j=b[0],w=b[1],O=(0,c.useContext)(d.ThemeContext),P=m||(null===O||void 0===O?void 0:O.content.active)||p.Z.content.active;if(g<10)return null;var A=(0,h.Z)({domain:r.map((function(t){return i(t)})),range:(0,y.K)(O)}),I=g-f.left-f.right,L=a-f.top-f.bottom,T=Math.min(I,L)/2,C=L/2,M=I/2,D=Math.min(I/4,12*x.iI);return(0,v.jsx)("svg",{height:a,width:g,children:(0,v.jsx)(u.Z,{left:M+f.left,top:C+f.top,children:(0,v.jsx)(l.Z,{cornerRadius:x.iI/2,data:j?r.filter((function(t){return JSON.stringify(t)===JSON.stringify(j)})):r,innerRadius:Math.max(T-D,12.25),outerRadius:T,padAngle:.005,pieValue:o,children:function(t){return(0,v.jsx)(S,k(k({},t),{},{animate:n,getColor:function(t){var e=t.data;return A(i(e))},getKey:function(t){var e=t.data;return i(e)},onClickDatum:function(t){var e=t.data;return n&&w(j&&JSON.stringify(j)===JSON.stringify(e)?null:e)},textColor:P}))}})})})}function A(t){var e=t.height,n=t.width,i=t.xAxisLabel,o=(0,r.Z)(t,b),l={};return"undefined"!==typeof e&&(l.height=e),"undefined"!==typeof n&&(l.width=n),(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("div",{style:l,children:(0,v.jsx)(a.Z,{children:function(t){var e=t.width,n=t.height;return(0,v.jsx)(P,k(k({},o),{},{height:n,width:e}))}})}),i&&(0,v.jsx)("div",{style:{paddingTop:4},children:(0,v.jsx)(f.ZP,{center:!0,muted:!0,small:!0,children:i})})]})}},98684:function(t,e,n){n.d(e,{K:function(){return i}});var r=n(70987),i=function(t){var e=t||r.Z,n=e.brand,i=n.earth200,o=n.earth300,a=n.earth400,l=n.energy200,c=n.energy300,u=n.energy400,d=n.fire200,s=n.fire300,h=n.fire400,f=n.water200,p=n.water300,m=n.water400,g=n.wind200,x=n.wind300,y=n.wind400,v=e.chart;return[v.backgroundPrimary,v.backgroundSecondary,v.backgroundTertiary].concat([y,m,h,u,a,x,p,s,c,o,g,f,d,l,i])}},94035:function(t,e,n){var r=n(38626).default.div.withConfig({displayName:"YAxisLabelContainer",componentId:"sc-qwp21x-0"})(["-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-o-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);white-space:nowrap;"]);e.Z=r},79221:function(t,e,n){n.d(e,{P5:function(){return r},Vs:function(){return i}});n(81728);function r(t,e){var n=e||{},r=n.maxFractionDigits,i=n.minAmount,o=Intl.NumberFormat("en-US",{maximumFractionDigits:r||2,notation:"compact"});return"number"!==typeof t?t:t>=(i||1e4)?o.format(t):t.toString()}function i(t,e,n){var r,i;if("undefined"===typeof t||"undefined"===typeof e)return 0;var o=null===t||void 0===t||null===(r=t(e,n))||void 0===r||null===(i=r.props)||void 0===i?void 0:i.children;return(Array.isArray(o)?o:[o]).join("").length}},31882:function(t,e,n){var r=n(38626),i=n(71180),o=n(55485),a=n(30160),l=n(44897),c=n(72473),u=n(70515),d=n(61896),s=n(28598),h=r.default.div.withConfig({displayName:"Chip__ChipStyle",componentId:"sc-1ok73g-0"})(["display:inline-block;"," "," "," "," "," ",""],(function(t){return!t.primary&&"\n background-color: ".concat((t.theme.background||l.Z.background).tag,";\n ")}),(function(t){return t.primary&&"\n background-color: ".concat((t.theme.chart||l.Z.chart).primary,";\n ")}),(function(t){return!t.small&&"\n border-radius: ".concat((u.iI+d.Al)/2,"px;\n height: ").concat(1.5*u.iI+d.Al,"px;\n padding: ").concat(u.iI/1.5,"px ").concat(1.25*u.iI,"px;\n ")}),(function(t){return t.small&&"\n border-radius: ".concat((u.iI/2+d.Al)/2,"px;\n height: ").concat(d.Al+u.iI/2+2,"px;\n padding: ").concat(u.iI/4,"px ").concat(u.iI,"px;\n ")}),(function(t){return t.xsmall&&"\n border-radius: ".concat((u.iI/1+d.Al)/1,"px;\n height: ").concat(20,"px;\n padding: 4px 6px;\n ")}),(function(t){return t.border&&"\n border: 1px solid ".concat((t.theme.content||l.Z.content).muted,";\n ")}));e.Z=function(t){var e=t.border,n=t.children,r=t.disabled,l=t.label,d=t.monospace,f=t.onClick,p=t.primary,m=t.small,g=t.xsmall;return(0,s.jsx)(h,{border:e,primary:p,small:m,xsmall:g,children:(0,s.jsx)(i.ZP,{basic:!0,disabled:r,noBackground:!0,noPadding:!0,onClick:f,transparent:!0,children:(0,s.jsxs)(o.ZP,{alignItems:"center",children:[n,l&&(0,s.jsx)(a.ZP,{monospace:d,small:m,xsmall:g,children:l}),!r&&f&&(0,s.jsx)("div",{style:{marginLeft:2}}),!r&&f&&(0,s.jsx)(c.x8,{default:p,muted:!p,size:m?u.iI:1.25*u.iI})]})})})}},10305:function(t,e,n){var r=n(82684),i=n(55485),o=n(38276),a=n(28598);e.Z=function(t){var e=t.children,n=t.onChange,l=(0,r.useState)(r.Children.map(e,(function(){return null}))),c=l[0],u=l[1],d=(0,r.useState)(0),s=d[0],h=d[1];return(0,a.jsx)(i.ZP,{children:r.Children.map(e,(function(t,e){return(0,a.jsx)(o.Z,{ml:e>=1?1:0,style:{display:"flex",flex:1},children:r.cloneElement(t,{onChange:function(t){u((function(r){return r[e]=t.target.value,n(r,{resetValues:function(){return h((function(t){return t+1}))},setValues:u}),r}))},value:c[e]})},"multi-select-child-".concat(e,"-").concat(s))}))})}}}]);