mage-ai 0.9.32__py3-none-any.whl → 0.9.34__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.
Potentially problematic release.
This version of mage-ai might be problematic. Click here for more details.
- mage_ai/api/constants.py +37 -2
- mage_ai/api/errors.py +9 -5
- mage_ai/api/middleware.py +2 -2
- mage_ai/api/mixins/__init__.py +0 -0
- mage_ai/api/mixins/result_set.py +65 -0
- mage_ai/api/operations/base.py +41 -11
- mage_ai/api/operations/constants.py +7 -6
- mage_ai/api/parsers/BaseParser.py +6 -4
- mage_ai/api/parsers/PipelineScheduleParser.py +36 -2
- mage_ai/api/policies/BackfillPolicy.py +1 -0
- mage_ai/api/policies/BasePolicy.py +229 -40
- mage_ai/api/policies/PermissionPolicy.py +17 -0
- mage_ai/api/policies/PipelineSchedulePolicy.py +18 -2
- mage_ai/api/policies/RolePermissionPolicy.py +2 -1
- mage_ai/api/policies/RolePolicy.py +3 -0
- mage_ai/api/policies/SessionPolicy.py +36 -1
- mage_ai/api/policies/StatusPolicy.py +46 -3
- mage_ai/api/policies/UserPolicy.py +25 -2
- mage_ai/api/policies/mixins/__init__.py +0 -0
- mage_ai/api/policies/mixins/user_permissions.py +241 -0
- mage_ai/api/presenters/PermissionPresenter.py +35 -8
- mage_ai/api/presenters/RolePresenter.py +29 -12
- mage_ai/api/presenters/StatusPresenter.py +11 -0
- mage_ai/api/presenters/UserPresenter.py +21 -24
- mage_ai/api/resources/BaseResource.py +24 -9
- mage_ai/api/resources/BlockResource.py +3 -2
- mage_ai/api/resources/DatabaseResource.py +2 -2
- mage_ai/api/resources/PermissionResource.py +65 -3
- mage_ai/api/resources/Resource.py +8 -1
- mage_ai/api/resources/RolePermissionResource.py +23 -0
- mage_ai/api/resources/RoleResource.py +75 -4
- mage_ai/api/resources/StatusResource.py +34 -0
- mage_ai/api/resources/UserResource.py +35 -4
- mage_ai/api/result_set.py +8 -1
- mage_ai/authentication/permissions/constants.py +78 -0
- mage_ai/data_integrations/destinations/constants.py +1 -0
- mage_ai/data_integrations/utils/config.py +9 -0
- mage_ai/data_integrations/utils/scheduler.py +16 -7
- mage_ai/data_preparation/models/block/__init__.py +56 -16
- mage_ai/data_preparation/models/block/data_integration/mixins.py +92 -1
- mage_ai/data_preparation/models/block/data_integration/utils.py +5 -5
- mage_ai/data_preparation/models/block/integration/__init__.py +12 -7
- mage_ai/data_preparation/models/block/sql/__init__.py +5 -2
- mage_ai/data_preparation/models/block/sql/utils/shared.py +15 -1
- mage_ai/data_preparation/models/pipelines/interactions.py +15 -0
- mage_ai/data_preparation/shared/secrets.py +7 -17
- mage_ai/data_preparation/templates/data_exporters/streaming/google_cloud_pubsub.yaml +5 -0
- mage_ai/data_preparation/templates/repo/metadata.yaml +5 -0
- mage_ai/io/druid.py +9 -5
- mage_ai/io/mssql.py +52 -30
- mage_ai/io/postgres.py +1 -0
- mage_ai/io/sql.py +15 -1
- mage_ai/orchestration/db/models/oauth.py +181 -17
- mage_ai/orchestration/db/models/schedules.py +11 -0
- mage_ai/presenters/interactions/constants.py +1 -0
- mage_ai/presenters/pages/loaders/pipeline_schedules.py +9 -3
- mage_ai/server/api/base.py +16 -6
- mage_ai/server/api/v1.py +2 -1
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +2 -2
- mage_ai/server/frontend_dist/_next/static/PBVuphyo_muEAj347ZP_b/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1124-d8fc76201b83b376.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{1749-9ec0f4709f5a9284.js → 1749-a6bdce4ee8a09bce.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1769-613e23e361eb5bce.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1821-953efd0da290d25f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2327-1a797c758f8b064a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2677-a85c5a72bb695304.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/3419-6c8ec8db8c398c12.js → frontend_dist/_next/static/chunks/3419-0df6c5ef72f2e672.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3684-e1a713b7c16f0151.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/3859-3501cdba0a33f9f2.js → frontend_dist/_next/static/chunks/3859-ba594d21a1260cd2.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/4636-84f545d1d238df13.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/4839-963da65cea58054f.js → frontend_dist/_next/static/chunks/4839-e5fe343a369734bc.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5457-97433bc45b42a88a.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/5499-63667ad5a785dba5.js → frontend_dist/_next/static/chunks/5499-b74459f6be5f9229.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6043-6ea109833b88eb1d.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/6333-ca4cd6a73a597a40.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7022-80d082a1d7fd1234.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7361-25f211ef377e5958.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/8013-1d6b1f7c13264cb4.js → frontend_dist/_next/static/chunks/8013-e67c71ddea072a20.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8146-941c5155c3bfcc35.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/9161-837b653aa849a76f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/9264-5730e4e059db40a8.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-752d991f239a128f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{block-layout-a624972d126a3dbd.js → block-layout-a27a28d2a615e364.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/files-98e27a4d7bd0da47.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/{[...slug]-a95787fe1695f493.js → [...slug]-9eb5dad57da13efd.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{global-data-products-0d55711df91a78d0.js → global-data-products-26909dec66f00231.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-b9eea6abc676ca81.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-11c601c6ef07fe86.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/new-ae6083077c9c1c41.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-bfce0ee677d57206.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-476c921d62f565fc.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/overview-9bc34ef66d84330a.js → frontend_dist/_next/static/chunks/pages/overview-2ec6b17e45a52be8.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-605918f3a5c1aac4.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-84ec3ab0770bcd68.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ee65a62ed166bd85.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-2402004a19a6ad53.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-9a5b4768a640cd68.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-8781db69f19759a1.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-d7fd4857579e2b00.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-bd4bd009146bab36.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-234007c99efdccf6.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-8405a83adeaa8ff5.js → block-runs-da7510d4b277e47b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runtime-98aa0840a00cc661.js → block-runtime-eae853ff34b09481.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-0fb48e1cc51f78b2.js → monitors-a057b17847b82468.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/{[run]-845c1f010d5ec380.js → [run]-99d11c86f8b15369.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-9255f85760e1f57a.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-3f0980d8810a540b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{settings-187ac359020704e1.js → settings-9edf75d03460aaeb.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-c52d0c49439ec620.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-e7692e54979f037d.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-7b3b57523b226a0e.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-cb6a3bcaf4fa1a81.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-5eff96c149584e87.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipelines-efc080913a247e99.js → pipelines-270b912e1ac189b5.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-2058d022972cdea4.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions/[...slug]-1a95628ea8d0d846.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions-cb1cdf5f8e5bf9c5.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-58978256db4efbda.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles/[...slug]-9ddd7eb842d5a911.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles-1694c5eb1acbcf30.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-6850e854fbedbb61.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users/[...slug]-5061c073e1c0de07.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users-f551c5665bfd3494.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-6fe3657070f98aca.js → frontend_dist/_next/static/chunks/pages/sign-in-e779dbab123e626e.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/templates/[...slug]-935113d252ada806.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/templates-25b6d24cfa81c306.js → frontend_dist/_next/static/chunks/pages/templates-7079d637e396f2a8.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-67fdb4a3be93aa14.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-9c0374c7c783b34a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-ea3a0d48e5822b42.js +1 -0
- mage_ai/server/frontend_dist/block-layout.html +2 -2
- mage_ai/server/frontend_dist/files.html +2 -2
- mage_ai/server/frontend_dist/global-data-products/[...slug].html +2 -2
- mage_ai/server/frontend_dist/global-data-products.html +2 -2
- mage_ai/server/frontend_dist/index.html +2 -2
- mage_ai/server/frontend_dist/manage/settings.html +2 -2
- mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
- mage_ai/server/frontend_dist/manage/users/new.html +2 -2
- mage_ai/server/frontend_dist/manage/users.html +2 -2
- mage_ai/server/frontend_dist/manage.html +2 -2
- mage_ai/server/frontend_dist/overview.html +2 -2
- mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist/pipelines.html +2 -2
- mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +24 -0
- mage_ai/server/frontend_dist/settings/workspace/permissions.html +24 -0
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +24 -0
- mage_ai/server/frontend_dist/settings/workspace/roles.html +24 -0
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +24 -0
- mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
- mage_ai/server/frontend_dist/settings.html +2 -2
- mage_ai/server/frontend_dist/sign-in.html +5 -5
- mage_ai/server/frontend_dist/templates/[...slug].html +2 -2
- mage_ai/server/frontend_dist/templates.html +2 -2
- mage_ai/server/frontend_dist/terminal.html +2 -2
- mage_ai/server/frontend_dist/test.html +2 -2
- mage_ai/server/frontend_dist/triggers.html +2 -2
- mage_ai/server/frontend_dist/version-control.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/404.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/_next/static/L-IKw5_bRZUs-wyjnpN_j/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1124-d8fc76201b83b376.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1749-9ec0f4709f5a9284.js → 1749-a6bdce4ee8a09bce.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1769-613e23e361eb5bce.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1821-953efd0da290d25f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2327-1a797c758f8b064a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2677-a85c5a72bb695304.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/3419-6c8ec8db8c398c12.js → frontend_dist_base_path_template/_next/static/chunks/3419-0df6c5ef72f2e672.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3684-e1a713b7c16f0151.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/3859-3501cdba0a33f9f2.js → frontend_dist_base_path_template/_next/static/chunks/3859-ba594d21a1260cd2.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4636-84f545d1d238df13.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/4839-963da65cea58054f.js → frontend_dist_base_path_template/_next/static/chunks/4839-e5fe343a369734bc.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5457-97433bc45b42a88a.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/5499-63667ad5a785dba5.js → frontend_dist_base_path_template/_next/static/chunks/5499-b74459f6be5f9229.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6043-6ea109833b88eb1d.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6333-ca4cd6a73a597a40.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7022-80d082a1d7fd1234.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-25f211ef377e5958.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/8013-1d6b1f7c13264cb4.js → frontend_dist_base_path_template/_next/static/chunks/8013-e67c71ddea072a20.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8146-941c5155c3bfcc35.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9161-837b653aa849a76f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-5730e4e059db40a8.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-752d991f239a128f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{block-layout-a624972d126a3dbd.js → block-layout-a27a28d2a615e364.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-98e27a4d7bd0da47.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/{[...slug]-a95787fe1695f493.js → [...slug]-9eb5dad57da13efd.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{global-data-products-0d55711df91a78d0.js → global-data-products-26909dec66f00231.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-b9eea6abc676ca81.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-11c601c6ef07fe86.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-ae6083077c9c1c41.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users-bfce0ee677d57206.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-476c921d62f565fc.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/overview-9bc34ef66d84330a.js → frontend_dist_base_path_template/_next/static/chunks/pages/overview-2ec6b17e45a52be8.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-605918f3a5c1aac4.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-84ec3ab0770bcd68.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ee65a62ed166bd85.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-2402004a19a6ad53.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-9a5b4768a640cd68.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-8781db69f19759a1.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-d7fd4857579e2b00.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-bd4bd009146bab36.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-234007c99efdccf6.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-8405a83adeaa8ff5.js → block-runs-da7510d4b277e47b.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runtime-98aa0840a00cc661.js → block-runtime-eae853ff34b09481.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-0fb48e1cc51f78b2.js → monitors-a057b17847b82468.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/{[run]-845c1f010d5ec380.js → [run]-99d11c86f8b15369.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-9255f85760e1f57a.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-3f0980d8810a540b.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{settings-187ac359020704e1.js → settings-9edf75d03460aaeb.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-c52d0c49439ec620.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-e7692e54979f037d.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-7b3b57523b226a0e.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-cb6a3bcaf4fa1a81.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-5eff96c149584e87.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{pipelines-efc080913a247e99.js → pipelines-270b912e1ac189b5.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-2058d022972cdea4.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions/[...slug]-1a95628ea8d0d846.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions-cb1cdf5f8e5bf9c5.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-58978256db4efbda.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles/[...slug]-9ddd7eb842d5a911.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles-1694c5eb1acbcf30.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-6850e854fbedbb61.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users/[...slug]-5061c073e1c0de07.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users-f551c5665bfd3494.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/sign-in-6fe3657070f98aca.js → frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-e779dbab123e626e.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-935113d252ada806.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/templates-25b6d24cfa81c306.js → frontend_dist_base_path_template/_next/static/chunks/pages/templates-7079d637e396f2a8.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/terminal-67fdb4a3be93aa14.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-9c0374c7c783b34a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-ea3a0d48e5822b42.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/block-layout.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/files.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/global-data-products.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/settings.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/manage/users.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/manage.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/overview.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +24 -0
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +24 -0
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +24 -0
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +24 -0
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +24 -0
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/sign-in.html +13 -13
- mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/templates.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/terminal.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/test.html +4 -4
- mage_ai/server/frontend_dist_base_path_template/triggers.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/version-control.html +5 -5
- mage_ai/server/server.py +37 -2
- mage_ai/services/aws/__init__.py +19 -8
- mage_ai/services/spark/config.py +5 -1
- mage_ai/services/spark/spark.py +5 -4
- mage_ai/settings/__init__.py +2 -0
- mage_ai/streaming/constants.py +1 -0
- mage_ai/streaming/sinks/google_cloud_pubsub.py +66 -0
- mage_ai/streaming/sinks/sink_factory.py +6 -0
- mage_ai/tests/api/operations/test_operations.py +8 -2
- mage_ai/tests/api/operations/test_pipeline_schedules.py +3 -0
- mage_ai/tests/data_preparation/models/block/sql/utils/test_shared.py +130 -5
- mage_ai/tests/factory.py +2 -0
- mage_ai/tests/orchestration/test_pipeline_scheduler.py +20 -3
- mage_ai/tests/streaming/sinks/test_google_cloud_pubsub.py +28 -0
- mage_ai/usage_statistics/logger.py +4 -1
- {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/METADATA +1 -1
- {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/RECORD +302 -268
- mage_ai/api/policies/utils.py +0 -14
- mage_ai/server/frontend_dist/_next/static/cbN7L4Ms6UUPoANozEh9w/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1769-e2efd4df8d09481f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2327-2d8a1555605cf4af.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2369-cb9cd97052e18d27.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2677-aea54e655c4a727f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5457-994e1044953f1425.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5597-c034402ee26af3b4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6333-d1f8db4e7d9656a5.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6648-9bd31397f1d1b551.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9161-0101571a3635a938.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9264-7c4fcfed1200046a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9696-3e8ab7786f0e3a0e.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-976b488b8aea327f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/files-1a6c6654bfc953ac.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-49004d918b04c866.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-97177740fbb6eb9f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/new-5b6411c9eb8c4ba4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-0a7a746cc0998608.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-606012a580245001.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-0801de3c9a2976ea.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-0a5865d4cf012127.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-87b1a0601c4236cd.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-77ffaa2d721a0a4e.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-4e72d40881ac0605.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-8da8f8e2fdb1c99f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-be029347e99fcea2.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users-d4b07df78b3d6037.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/templates/[...slug]-87c492e9edc6064e.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-2ab9f3d0c50cce81.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-0ba40243a030ddf4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-28a3a43d65074394.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1769-e2efd4df8d09481f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2327-2d8a1555605cf4af.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2369-cb9cd97052e18d27.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2677-aea54e655c4a727f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5457-994e1044953f1425.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5597-c034402ee26af3b4.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6333-d1f8db4e7d9656a5.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6648-9bd31397f1d1b551.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9161-0101571a3635a938.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-7c4fcfed1200046a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9696-3e8ab7786f0e3a0e.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-976b488b8aea327f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-1a6c6654bfc953ac.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-49004d918b04c866.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-97177740fbb6eb9f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-5b6411c9eb8c4ba4.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users-0a7a746cc0998608.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-606012a580245001.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-0801de3c9a2976ea.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-0a5865d4cf012127.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-87b1a0601c4236cd.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-77ffaa2d721a0a4e.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-4e72d40881ac0605.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-8da8f8e2fdb1c99f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-be029347e99fcea2.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users-d4b07df78b3d6037.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-87c492e9edc6064e.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/terminal-2ab9f3d0c50cce81.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-0ba40243a030ddf4.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-28a3a43d65074394.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/o_Yc57jh8Te2SI-VoipGQ/_buildManifest.js +0 -1
- /mage_ai/server/frontend_dist/_next/static/{cbN7L4Ms6UUPoANozEh9w → PBVuphyo_muEAj347ZP_b}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{o_Yc57jh8Te2SI-VoipGQ → L-IKw5_bRZUs-wyjnpN_j}/_ssgManifest.js +0 -0
- {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/WHEEL +0 -0
- {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/top_level.txt +0 -0
mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-7c4fcfed1200046a.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9264],{27277:function(e,n,t){var o=t(82394),r=t(21831),i=t(82684),u=t(39643),l=t(44688),c=t(28598);function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.highlightedItemIndexInitial,t=void 0===n?null:n,o=e.itemGroups,a=e.noResultGroups,d=e.onHighlightItemIndexChange,f=e.onMouseEnterItem,p=e.onMouseLeaveItem,m=e.onSelectItem,v=e.renderEmptyState,h=e.searchQuery,b=e.selectedItem,g=e.setItemRefs,x=e.uuid,j=(0,i.useState)(!0),C=j[0],O=j[1],_=(0,i.useMemo)((function(){var e=[],n=o.reduce((function(n,t){var o=t.items.filter((function(e){return!h||function(e,n){return e.searchQueries.filter((function(e){return String(e).toLowerCase().includes(n.toLowerCase())})).length>=1}(e,h)}));return 0===o.length?n:(e.push.apply(e,(0,r.Z)(o)),n.concat(s(s({},t),{},{items:o})))}),[]);return{itemGroups:n,itemsFlattened:e}}),[o,h]),Z=_.itemGroups,E=_.itemsFlattened;a&&0===E.length&&(Z.push.apply(Z,(0,r.Z)(a)),E.push.apply(E,(0,r.Z)(a.reduce((function(e,n){var t=n.items;return e.concat(t)}),[]))));var y=(0,i.useRef)(null);y.current=E.map((function(){return(0,i.createRef)()}));var k=(0,i.useState)(t),T=k[0],I=k[1],S=(0,i.useCallback)((function(e){null===d||void 0===d||d(e),I(e)}),[d,I]),A=E[T],P=(0,l.y)(),R=P.registerOnKeyDown,w=P.unregisterOnKeyDown;(0,i.useEffect)((function(){return function(){return w(x)}}),[w,x]),null===R||void 0===R||R(x,(function(e,n,t){var o,r=!0,i=E.length,l=E.findIndex((function(e,o){var r=e.keyboardShortcutValidation;return null===r||void 0===r?void 0:r({keyHistory:t,keyMapping:n},o)})),c=n[u.Gs]&&!n[u.XR]&&!b;return-1!==l?(e.preventDefault(),m(E[l]),O(r),S(l)):(n[u.Uq]||c)&&E[T]?(c&&e.preventDefault(),m(E[T]),O(r),S(T)):(n[u.Bu]?(r=!1,o=null===T?i-1:T-1):n[u.kD]?(r=!1,o=null===T?0:T+1):n[u.vP]&&S(null),"undefined"!==typeof o&&(o>=i?o=0:o<=-1&&(o=i-1),o>=0&&o<=i-1?(S(o),e.preventDefault()):S(null)),void O(r))}),[T,E,b,S,O]),(0,i.useEffect)((function(){null===g||void 0===g||g(y)}),[y,E,g]),(0,i.useEffect)((function(){var e=null===T||"undefined"===typeof T||T>=E.length;(null===h||void 0===h?void 0:h.length)>=1&&e&&S(0)}),[T,E,h,S]);var D=(0,i.useCallback)((function(){return O(!0)}),[O]);return(0,i.useEffect)((function(){return window.addEventListener("mousemove",D),function(){window.removeEventListener("mousemove",D)}}),[D]),0===Z.length&&v?v():(0,c.jsx)(c.Fragment,{children:Z.map((function(e,n){var t=e.items,o=e.renderItem,r=e.renderGroupHeader,i=e.uuid,u=n>=1?Z.slice(0,n).reduce((function(e,n){return e+n.items.length}),0):0,l=t.map((function(e,n){var t=e.itemObject,r=e.value,i=r===(null===A||void 0===A?void 0:A.value),l=n+u,a=(null===t||void 0===t?void 0:t.id)||(null===t||void 0===t?void 0:t.uuid);return(0,c.jsx)("div",{id:"item-".concat(r,"-").concat(a),onMouseMove:function(){return C&&S(l)},ref:y.current[l],children:o(e,{highlighted:i,onClick:function(){return m(e)},onMouseEnter:function(){return null===f||void 0===f?void 0:f(e)},onMouseLeave:function(){return null===p||void 0===p?void 0:p(e)}},n,l)},"item-".concat(r,"-").concat(a))}));return l.length>=1&&(0,c.jsxs)("div",{children:[null===r||void 0===r?void 0:r(),l]},i||"group-uuid-".concat(n))}))})}},85108:function(e,n,t){t.d(n,{G8:function(){return p},SR:function(){return v},VR:function(){return a},_H:function(){return h},x8:function(){return m}});var o,r,i,u,l,c,a,s=t(82394),d=t(35058);!function(e){e.COLUMNS="columns",e.METRICS="metrics",e.NUMBER="number"}(a||(a={}));var f={noCode:[{label:function(){return"time column"},settings:{maxValues:1},type:a.COLUMNS,uuid:d.eN},{label:function(){return"time interval"},options:[d.aE.ORIGINAL,d.aE.SECOND,d.aE.MINUTE,d.aE.HOUR,d.aE.DAY,d.aE.WEEK,d.aE.MONTH,d.aE.YEAR],uuid:d.Yg},{label:function(){return"metrics"},type:a.METRICS,uuid:d.bE}]},p=(o={},(0,s.Z)(o,d.oV.BAR_CHART,{noCode:[{label:function(){return"group by columns"},type:a.COLUMNS,uuid:d.eN},{label:function(){return"metrics"},type:a.METRICS,uuid:d.bE},{autoRun:!0,label:function(){return"chart style"},options:[d.JT.HORIZONTAL,d.JT.VERTICAL],uuid:d.R8},{autoRun:!0,label:function(){return"sort direction"},options:[null,d.MP.ASCENDING,d.MP.DESCENDING],uuid:d.$1}],code:[{label:function(){return"variable name of x-axis values"},monospace:!0,uuid:d.a3},{label:function(){return"variable name of y-axis values"},monospace:!0,uuid:d.rj}]}),(0,s.Z)(o,d.oV.HISTOGRAM,{noCode:[{label:function(){return"number column for chart"},settings:{maxValues:1},type:a.COLUMNS,uuid:d.eN},{autoRun:!0,label:function(){return"Number of buckets"},type:a.NUMBER,uuid:d.m7}],code:[{label:function(){return"variable name of values"},monospace:!0,uuid:d.a3}]}),(0,s.Z)(o,d.oV.LINE_CHART,{noCode:[{label:function(){return"group by columns"},settings:{maxValues:1},type:a.COLUMNS,uuid:d.eN},{label:function(){return"metrics"},type:a.METRICS,uuid:d.bE}],code:[{label:function(){return"variable name of x-axis values"},monospace:!0,uuid:d.a3},{label:function(){return"variable name of y-axis values"},monospace:!0,uuid:d.rj},{label:function(){return"labels of lines in chart (comma separated)"},uuid:d.e}]}),(0,s.Z)(o,d.oV.PIE_CHART,{noCode:[{label:function(){return"column for chart"},settings:{maxValues:1},type:a.COLUMNS,uuid:d.eN},{autoRun:!0,label:function(){return"Number of slices"},type:a.NUMBER,uuid:d.m7}],code:[{label:function(){return"variable name of values"},monospace:!0,uuid:d.a3}]}),(0,s.Z)(o,d.oV.TABLE,{noCode:[{label:function(){return"columns"},type:a.COLUMNS,uuid:d.eN},{label:function(){return"max number of rows"},type:a.NUMBER,uuid:d.PG}],code:[{label:function(){return"variable name of columns"},monospace:!0,uuid:d.a3},{label:function(){return"variable name of rows"},monospace:!0,uuid:d.rj}]}),(0,s.Z)(o,d.oV.TIME_SERIES_BAR_CHART,f),(0,s.Z)(o,d.oV.TIME_SERIES_LINE_CHART,f),o),m=(r={},(0,s.Z)(r,d.oV.BAR_CHART,{configuration:function(e){var n;return n={},(0,s.Z)(n,d.a3,"x"),(0,s.Z)(n,d.rj,"y"),(0,s.Z)(n,d.R8,d.JT.VERTICAL),n},content:function(e){return"columns = df_1.columns\nx = df_1.columns[:7]\ny = [[v] for v in [len(df_1[col].unique()) for col in x]]\n"}}),(0,s.Z)(r,d.oV.HISTOGRAM,{configuration:function(e){var n;return n={},(0,s.Z)(n,d.m7,10),(0,s.Z)(n,d.a3,"x"),n},content:function(e){return"columns = df_1.columns\ncol = list(filter(lambda x: df_1[x].dtype == float or df_1[x].dtype == int, columns))[0]\nx = df_1[col]\n"}}),(0,s.Z)(r,d.oV.LINE_CHART,{configuration:function(e){var n;return n={},(0,s.Z)(n,d.a3,"x"),(0,s.Z)(n,d.rj,"y"),n},content:function(e){return"columns = df_1.columns\ncols = list(filter(lambda x: df_1[x].dtype == float or df_1[x].dtype == int, columns))\nx = df_1[cols[0]]\ny = [df_1[cols[1]]]\n"}}),(0,s.Z)(r,d.oV.PIE_CHART,{configuration:function(e){var n;return n={},(0,s.Z)(n,d.m7,7),(0,s.Z)(n,d.a3,"x"),n},content:function(e){return"x = df_1[df_1.columns[0]]"}}),(0,s.Z)(r,d.oV.TABLE,{configuration:function(e){var n;return n={},(0,s.Z)(n,d.PG,10),(0,s.Z)(n,d.a3,"x"),(0,s.Z)(n,d.rj,"y"),n},content:function(e){return"x = df_1.columns\ny = df_1.to_numpy()"}}),(0,s.Z)(r,d.oV.TIME_SERIES_BAR_CHART,{configuration:function(e){return(0,s.Z)({},d.Yg,d.aE.ORIGINAL)}}),(0,s.Z)(r,d.oV.TIME_SERIES_LINE_CHART,{configuration:function(e){return(0,s.Z)({},d.Yg,d.aE.ORIGINAL)}}),r),v=(c={},(0,s.Z)(c,d.oV.BAR_CHART,(i={},(0,s.Z)(i,d.a3,(function(){return"must be a list of booleans, dates, integers, floats, or strings."})),(0,s.Z)(i,d.rj,(function(){return"must be a list of lists containing integers or floats."})),i)),(0,s.Z)(c,d.oV.HISTOGRAM,(0,s.Z)({},d.a3,(function(){return"must be a list of integers or floats."}))),(0,s.Z)(c,d.oV.LINE_CHART,(u={},(0,s.Z)(u,d.a3,(function(){return"must be a list of integers or floats."})),(0,s.Z)(u,d.rj,(function(){return"must be a list of lists containing integers or floats. Each list is a single line in the chart."})),u)),(0,s.Z)(c,d.oV.PIE_CHART,(0,s.Z)({},d.a3,(function(){return"must be a list of booleans, dates, integers, floats, or strings."}))),(0,s.Z)(c,d.oV.TABLE,(l={},(0,s.Z)(l,d.a3,(function(){return"must be a list of strings."})),(0,s.Z)(l,d.rj,(function(){return"must be a list of lists containing booleans, dates, integers, floats, or strings."})),l)),c),h=[{label:function(){return"% of missing values"},widgetTemplate:function(e){var n,t=e.block;return{name:"missing values for ".concat(null===t||void 0===t?void 0:t.uuid),configuration:(n={},(0,s.Z)(n,d.a3,"columns_with_mising_values"),(0,s.Z)(n,d.rj,"percentage_of_missing_values"),(0,s.Z)(n,d.R8,d.JT.HORIZONTAL),(0,s.Z)(n,d.$1,d.MP.DESCENDING),(0,s.Z)(n,"chart_type",d.oV.BAR_CHART),n),content:"number_of_rows = len(df_1.index)\ncolumns_with_mising_values = []\npercentage_of_missing_values = []\nfor col in df_1.columns:\n missing = df_1[col].isna().sum()\n if missing > 0:\n columns_with_mising_values.append(col)\n percentage_of_missing_values.append(100 * missing / number_of_rows)\n"}}},{label:function(){return"Unique values"},widgetTemplate:function(e){var n,t=e.block;return{name:"unique values for ".concat(null===t||void 0===t?void 0:t.uuid),configuration:(n={},(0,s.Z)(n,d.a3,"columns"),(0,s.Z)(n,d.rj,"number_of_unique_values"),(0,s.Z)(n,d.R8,d.JT.HORIZONTAL),(0,s.Z)(n,d.$1,d.MP.DESCENDING),(0,s.Z)(n,"chart_type",d.oV.BAR_CHART),n),content:"columns = df_1.columns\nnumber_of_unique_values = [df_1[col].nunique() for col in columns]\n"}}},{label:function(){return"Most frequent values"},widgetTemplate:function(e){var n,t=e.block;return{name:"most frequent values for ".concat(null===t||void 0===t?void 0:t.uuid),configuration:(n={},(0,s.Z)(n,d.JJ,3e3),(0,s.Z)(n,d.ED,"column_index"),(0,s.Z)(n,d.a3,"columns"),(0,s.Z)(n,d.rj,"rows"),(0,s.Z)(n,"chart_type",d.oV.TABLE),n),content:"columns = ['mode value', 'frequency', '% of values']\n\ncolumn_index = []\nrows = []\nfor col in df_1.columns:\n value_counts = df_1[col].value_counts()\n if len(value_counts.index) == 0:\n continue\n column_value = value_counts.index[0]\n value = value_counts[column_value]\n number_of_rows = df_1[col].count()\n column_index.append(col)\n rows.append([\n column_value,\n f'{round(100 * value / number_of_rows, 2)}%',\n value,\n ])\n"}}},{label:function(){return"Summary overview"},widgetTemplate:function(e){var n,t=e.block;return{name:"summary overview for ".concat(null===t||void 0===t?void 0:t.uuid),configuration:(n={},(0,s.Z)(n,d.JJ,3e3),(0,s.Z)(n,d.ED,"stats"),(0,s.Z)(n,d.a3,"headers"),(0,s.Z)(n,d.rj,"rows"),(0,s.Z)(n,"chart_type",d.oV.TABLE),n),content:"from mage_ai.data_cleaner.column_types.column_type_detector import infer_column_types\n\n\nheaders = ['value']\nstats = ['Columns', 'Rows']\nrows = [[len(df_1.columns)], [len(df_1.index)]]\n\ncol_counts = {}\nfor col, col_type in infer_column_types(df_1).items():\n col_type_name = col_type.value\n if not col_counts.get(col_type_name):\n col_counts[col_type_name] = 0\n col_counts[col_type_name] += 1\n\nfor col_type, count in sorted(col_counts.items()):\n stats.append(f'# of {col_type}')\n rows.append([count])\n"}}},{label:function(){return"Feature profiles"},widgetTemplate:function(e){var n,t=e.block;return{name:"feature profiles for ".concat(null===t||void 0===t?void 0:t.uuid),configuration:(n={},(0,s.Z)(n,d.JJ,3e3),(0,s.Z)(n,d.ED,"stats"),(0,s.Z)(n,d.a3,"columns"),(0,s.Z)(n,d.rj,"rows"),(0,s.Z)(n,"chart_type",d.oV.TABLE),n),content:"from mage_ai.data_cleaner.column_types.column_type_detector import infer_column_types\nimport statistics\n\n\ncolumns_and_types = infer_column_types(df_1).items()\ncolumns = [t[0] for t in columns_and_types]\nstats = ['Type', 'Missing values', 'Unique values', 'Min', 'Max', 'Mean', 'Median', 'Mode']\nrows = [[] for _ in stats]\n\nfor col, col_type in columns_and_types:\n series = df_1[col]\n min_value = None\n max_value = None\n mean = None\n median = None\n\n not_null = series[series.notnull()]\n\n if col_type.value in ['number', 'number_with_decimals']:\n count = len(not_null.index)\n if count >= 1:\n mean = round(not_null.sum() / count, 2)\n median = sorted(not_null)[int(count / 2)]\n min_value = round(series.min(), 2)\n max_value = round(series.max(), 2)\n else:\n min_value = not_null.astype(str).min()\n max_value = not_null.astype(str).max()\n\n _, mode = sorted(\n [(v, k) for k, v in not_null.value_counts().items()],\n reverse=True,\n )[0]\n\n for idx, value in enumerate([\n col_type.value,\n len(series[series.isna()].index),\n len(series.unique()),\n min_value,\n max_value,\n mean,\n median,\n mode,\n ]):\n rows[idx].append(value)\n"}}}]},88494:function(e,n,t){t.d(n,{MB:function(){return m},Nk:function(){return a},T5:function(){return s},_A:function(){return f},a3:function(){return p},wx:function(){return d}});var o=t(38626),r=t(44897),i=t(55283),u=t(42631),l=t(70515),c=t(30160),a=o.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-n38rkq-0"})([""," border-left-style:solid;border-left-width:2px;border-right-style:solid;border-right-width:2px;overflow:hidden;"," "," ",""],i.Kf,(function(e){return e.addBottomPadding&&"\n padding-bottom: ".concat(2*l.tr,"px;\n ")}),(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).table,";\n ")}),(function(e){return!e.executedAndIdle&&"\n border-bottom-left-radius: ".concat(u.n_,"px;\n border-bottom-right-radius: ").concat(u.n_,"px;\n border-bottom-style: solid;\n border-bottom-width: 2px;\n ")})),s=o.default.div.withConfig({displayName:"indexstyle__OutputRowStyle",componentId:"sc-n38rkq-1"})([""," "," ",""],(function(e){return e.first&&"\n padding-top: ".concat(l.iI*l.cd,"px;\n ")}),(function(e){return e.last&&"\n padding-bottom: ".concat(l.iI*l.cd,"px;\n ")}),(function(e){return e.contained&&"\n padding-left: ".concat(i.oh,"px;\n padding-right: ").concat(l.iI*l.cd,"px;\n ")})),d=o.default.div.withConfig({displayName:"indexstyle__HTMLOutputStyle",componentId:"sc-n38rkq-2"})([""," table{"," border-left-style:solid;border-left-width:2px;border-right-style:solid;border-right-width:2px;}td,th{padding:0 8px;}a{","}"],c.IH,i.Kf,(function(e){return"\n color: ".concat((e.theme.interactive||r.Z.interactive).linkPrimary,";\n ")})),f=o.default.div.withConfig({displayName:"indexstyle__ExtraInfoStyle",componentId:"sc-n38rkq-3"})([""," border-bottom-style:solid;border-bottom-width:2px;border-left-style:solid;border-left-width:2px;border-right-style:solid;border-right-width:2px;",""],i.Kf,(function(e){return"\n background-color: ".concat((e.theme.borders||r.Z.borders).light,";\n border-bottom-left-radius: ").concat(u.n_,"px;\n border-bottom-right-radius: ").concat(u.n_,"px;\n ")})),p=o.default.div.withConfig({displayName:"indexstyle__ExtraInfoContentStyle",componentId:"sc-n38rkq-4"})(["padding-bottom:","px;padding-left:","px;padding-right:","px;padding-top:","px;"],l.iI,i.oh,l.iI*l.cd,l.iI),m=o.default.div.withConfig({displayName:"indexstyle__ExtraInfoBorderStyle",componentId:"sc-n38rkq-5"})(["height:1px;width:100%;",""],(function(e){return"\n border-top: 1px solid ".concat((e.theme.borders||r.Z.borders).medium,";\n ")}))},12869:function(e,n,t){var o=t(21831),r=t(82394),i=t(75582),u=t(82684),l=t(89565),c=t.n(l),a=t(62302),s=t(69864),d=t(40761),f=t(44425),p=t(71180),m=t(39867),v=t(75810),h=t(93859),b=t(17586),g=t(15338),x=t(97618),j=t(55485),C=t(48339),O=t(57653),_=t(35185),Z=t(38276),E=t(30160),y=t(12468),k=t(35686),T=t(98464),I=t(72473),S=t(88494),A=t(15135),P=t(65044),R=t(70515),w=t(11498),D=t(47041),N=t(41429),M=t(85385),L=t(74052),B=t(81728),U=t(72619),F=t(28598);function G(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function H(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?G(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):G(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Q={appearAbove:!0,appearBefore:!0,block:!0,size:null,widthFitContent:!0},K={basic:!0,iconOnly:!0,noPadding:!0,transparent:!0};n.Z=function(e){var n=e.block,t=e.blockMetadata,r=e.buttonTabs,l=e.collapsed,G=e.contained,z=void 0===G||G,Y=e.dynamicBlock,W=e.dynamicChildBlock,q=e.hasError,V=e.hasOutput,X=e.hideExtraInfo,J=e.isInProgress,$=e.mainContainerWidth,ee=e.messages,ne=e.messagesAll,te=e.openSidekickView,oe=e.pipeline,re=e.runCount,ie=e.runEndTime,ue=e.runStartTime,le=e.selected,ce=e.selectedTab,ae=e.setCollapsed,se=e.setErrors,de=e.setOutputBlocks,fe=e.setSelectedOutputBlock,pe=e.setSelectedTab,me=n||{},ve=me.color,he=me.status,be=me.type,ge=me.uuid,xe=(0,u.useMemo)((function(){return{blockColor:ve,blockType:be,dynamicBlock:Y,dynamicChildBlock:W,hasError:q,selected:le}}),[ve,be,Y,W,q,le]),je=(0,u.useMemo)((function(){return(null===ee||void 0===ee?void 0:ee.length)||0}),[ee]),Ce=f.DA.EXECUTED===he||!J&&0===re&&je>=1||!J&&re>=1&&ie>=ue,Oe=(0,u.useState)(),_e=Oe[0],Ze=Oe[1],Ee=(0,u.useState)(),ye=Ee[0],ke=Ee[1],Te=(0,u.useState)(null),Ie=Te[0],Se=Te[1],Ae=(0,u.useMemo)((function(){var e,n;return null===(e=new d.Z)||void 0===e||null===(n=e.decodedToken)||void 0===n?void 0:n.token}),[]),Pe=(0,s.Db)((function(){return k.ZP.block_outputs.pipelines.downloads.detailAsync(null===oe||void 0===oe?void 0:oe.uuid,ge,{token:Ae},{onDownloadProgress:function(e){return Se((Number((null===e||void 0===e?void 0:e.loaded)||0)/1e6).toFixed(3))},responseType:w.E.BLOB})}),{onSuccess:function(e){return(0,U.wD)(e,{callback:function(e){(0,L.uS)(e,"".concat(ge,".").concat(A.Lu.CSV))},onErrorCallback:function(e,n){return null===se||void 0===se?void 0:se({errors:n,response:e})}})}}),Re=(0,i.Z)(Pe,2),we=Re[0],De=Re[1].isLoading;(0,u.useEffect)((function(){J||ke(100)}),[J]);var Ne=function(e){return Array.isArray(e)?e.join("\n"):e},Me=(0,u.useMemo)((function(){return(null===ee||void 0===ee?void 0:ee.length)>=1?ee.reduce((function(e,n){var t=e.at(-1);if(C.jU.includes(null===t||void 0===t?void 0:t.type)&&(null===t||void 0===t?void 0:t.type)===n.type&&!Ne(null===n||void 0===n?void 0:n.data).match(P.Lz)){if(Array.isArray(t.data))t.data.concat(n.data);else if("string"===typeof t.data){var o=Ne(n.data)||"";t.data=[t.data,o].join("\n")}}else C.jU.includes(null===n||void 0===n?void 0:n.type)&&!Ne(null===n||void 0===n?void 0:n.data).match(P.Lz)?e.push(H(H({},n),{},{data:Ne(n.data)})):e.push(H({},n));return e}),[]):ne||[]}),[ee,ne]),Le=(0,u.useMemo)((function(){return!(null!==ee&&void 0!==ee&&ee.length)&&(null===ne||void 0===ne?void 0:ne.length)>=1}),[ee,ne]),Be=(0,u.useMemo)((function(){return(0,F.jsx)(_.Z,{progress:ye})}),[ye]),Ue=f.tf.DBT===(null===n||void 0===n?void 0:n.type),Fe=(0,T.Z)(q);(0,u.useEffect)((function(){Ue&&!Fe&&q&&pe(N.Rj)}),[q,Fe,Ue,pe]);var Ge=(0,u.useMemo)((function(){var e=function(e,n){var t=e.columns,o=e.index,r=e.rows,i=e.shape,u=n.borderTop,l=n.selected;return i&&Ze(i),r.length>=1&&(0,F.jsx)(h.Z,{columns:t,disableScrolling:!l,index:o,maxHeight:60*R.iI,noBorderBottom:!0,noBorderLeft:!0,noBorderRight:!0,noBorderTop:!u,rows:r,width:$-(2+R.cd*R.iI*2+2+D.nn)},"data-table-".concat(o))},n=[],t=[],r=[];return null===Me||void 0===Me||Me.forEach((function(i,u){var l,s,d,f=Array.isArray(i);if(Le&&f?(s={columns:["-"],index:0,rows:null===i||void 0===i?void 0:i.map((function(e){return[(0,B.Pb)(e)?JSON.parse(e):e]})),shape:[null===i||void 0===i?void 0:i.length,1]},d=C.Gi.TABLE):"string"===typeof i?(s=i,d=C.Gi.TEXT_PLAIN):(s=null===i||void 0===i?void 0:i.data,d=null===i||void 0===i?void 0:i.type),f||s&&0!==(null===(l=s)||void 0===l?void 0:l.length)){var p=[];p=(p=Array.isArray(s)?s:[s]).filter((function(e){return e}));var m=[];p.forEach((function(e){if(d===C.Gi.TEXT_HTML)m.push(e);else if(e&&"string"===typeof e){var n=e.split("\n");m.push.apply(m,(0,o.Z)(n))}else"object"===typeof m&&m.push(e)}));var v=m.length,h=[];m.forEach((function(n,o){var i,l,s={contained:z,first:0===u&&0===o,last:u===Me.length-1&&o===v-1},f=u>=1;if("string"===typeof n&&n.match(P.Gr)){var p=n.split("\n"),m=[];p.forEach((function(e){if(e.match(P.Gr)){var t=e.split(P.Vc),o=t[t.length-1];(0,B.Pb)(o)&&r.push(JSON.parse(o))}else m.push(e);n=m.length>=1?m.join("\n"):null}))}if(null!==n){if("string"===typeof n&&n.match(P.Lz)){var b=n.split(P.gr),g=b[b.length-1],x=g.split("FloatProgress");if(b.length>=2&&(g=x[0]),(0,B.Pb)(g)){var j=JSON.parse(g),O=j.data,_=j.type;if(C.Gi.TABLE===_){!0;var Z=e(O,{borderTop:f,selected:le});t.push(Z),Ue||(l=Z)}}}else if(d===C.Gi.TABLE){!0;var y=e((0,B.Pb)(n)?JSON.parse(n):n,{borderTop:f,selected:le});t.push(y),Ue||(l=y)}else if(C.jU.includes(d)){var k,T=null===(k=n)||void 0===k?void 0:k.split("\\n");l=(0,F.jsx)(S.T5,H(H({},s),{},{children:T.map((function(e){return(0,F.jsxs)(E.ZP,{monospace:!0,preWrap:!0,children:[(null===e||void 0===e?void 0:e.length)>=1&&(0,F.jsx)(c(),{children:e}),!(null!==e&&void 0!==e&&e.length)&&(0,F.jsx)(F.Fragment,{children:"\xa0"})]},e)}))}))}else if(d===C.Gi.TEXT_HTML)n&&(l=(0,F.jsx)(S.T5,H(H({},s),{},{children:(0,F.jsx)(S.wx,{monospace:!0,children:(0,F.jsx)(a.Z,{html:n})})})));else if(d===C.Gi.IMAGE_PNG&&(null===(i=n)||void 0===i?void 0:i.length)>=1)l=(0,F.jsx)("div",{style:{backgroundColor:"white"},children:(0,F.jsx)("img",{alt:"Image ".concat(u," from code output"),src:"data:image/png;base64, ".concat(n)})});else if(d===C.Gi.PROGRESS){var I=parseInt(n);ke(I>90?90:I)}l&&h.push((0,F.jsx)("div",{children:l},"code-output-".concat(u,"-").concat(o)))}})),h.length>=1&&n.push(h)}})),J&&(null===oe||void 0===oe?void 0:oe.type)===O.qL.PYSPARK&&n.unshift([(0,F.jsx)(S.T5,{contained:!0,children:(0,F.jsx)(Z.Z,{mt:1,children:Be})},"progress_bar")]),{content:n,tableContent:t,testContent:r}}),[Me,z,Ue,J,$,oe,Be,Le,le]),He=Ge.content,Qe=Ge.tableContent,Ke=Ge.testContent,ze=(null===_e||void 0===_e?void 0:_e[1])||0,Ye=ze>30?" (30 out of ".concat(ze," columns displayed)"):"",We=(0,u.useMemo)((function(){var e;if(Ue&&ce){var n=ce.uuid;if(N.$m.uuid===n)(null===Qe||void 0===Qe?void 0:Qe.length)>=1?e=Qe:J||(e=(0,F.jsx)(Z.Z,{px:2,py:1,children:(0,F.jsx)(E.ZP,{muted:!0,children:q?"Error, check logs.":"No preview to display yet, try running the block."})}));else if(N.Rj.uuid===n)(null===He||void 0===He?void 0:He.length)>=1?e=He:J||(e=(0,F.jsx)(Z.Z,{px:2,py:1,children:(0,F.jsx)(E.ZP,{muted:!0,children:q?"Error, check logs.":"No logs to display yet, try running the block."})}));else if(N.Jt.uuid===n){var o,i=null===t||void 0===t||null===(o=t.dbt)||void 0===o?void 0:o.sql;e=i?(0,F.jsx)(v.Z,{autoHeight:!0,language:A.Lu.SQL,padding:!0,readOnly:!0,value:i,width:"100%"}):null}else if(N.gM.uuid===n){var u,l=null===t||void 0===t||null===(u=t.dbt)||void 0===u?void 0:u.lineage;e=l?(0,F.jsx)(b.Z,{disabled:!0,enablePorts:!1,height:55*R.iI,pannable:le,pipeline:H(H({},oe),{},{blocks:l}),zoomable:le}):null}}else e=He;return(0,F.jsxs)(F.Fragment,{children:[r,e]})}),[t,r,He,q,Ue,J,oe,le,ce,Qe]);return r||q||V||Le?(0,F.jsxs)(F.Fragment,{children:[z&&(0,F.jsxs)(S.Nk,H(H({},xe),{},{addBottomPadding:J&&(null===oe||void 0===oe?void 0:oe.type)===O.qL.PYSPARK,blockType:be,dynamicBlock:Y,dynamicChildBlock:W,executedAndIdle:Ce,hasError:q,selected:le,children:[!l&&(null===Ke||void 0===Ke?void 0:Ke.length)>=1&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Z.Z,{py:2,children:(0,F.jsx)(S.T5,{contained:!0,children:Ke.map((function(e,n){var t=e.error,o=e.message,r=e.stacktrace;return(0,F.jsxs)(Z.Z,{mt:n>=1?3:0,children:[(0,F.jsx)(E.ZP,{monospace:!0,preWrap:!0,children:(0,F.jsx)(c(),{children:"".concat(o).concat(t?" "+t:"")})}),null===r||void 0===r?void 0:r.map((function(e){return(0,F.jsx)(E.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:(0,F.jsx)(c(),{children:e})},e)}))]},o)}))})}),(0,F.jsx)(Z.Z,{mb:q?2:0,children:(0,F.jsx)(g.Z,{medium:!0})})]}),!l&&We]})),!z&&We,Ce&&!X&&(0,F.jsxs)(S._A,H(H({},xe),{},{blockType:be,dynamicBlock:Y,dynamicChildBlock:W,hasError:q,selected:le,children:[(0,F.jsx)(S.MB,{}),(0,F.jsxs)(j.ZP,{justifyContent:"space-between",children:[ae&&(0,F.jsx)(x.Z,{alignItems:"center",px:1,children:(0,F.jsx)(p.Z,H(H({},K),{},{onClick:function(){return ae(!l)},children:l?(0,F.jsxs)(j.ZP,{alignItems:"center",children:[(0,F.jsx)(I._M,{muted:!0,size:2*R.iI}),"\xa0",(0,F.jsx)(E.ZP,{default:!0,children:"Expand output"})]}):(0,F.jsxs)(j.ZP,{alignItems:"center",children:[(0,F.jsx)(I.Kh,{muted:!0,size:2*R.iI}),_e&&(0,F.jsx)(Z.Z,{ml:2,children:(0,F.jsx)(E.ZP,{children:"".concat(_e[0]," rows x ").concat(_e[1]," columns").concat(Ye)})})]})}))}),(0,F.jsx)(S.a3,{children:(0,F.jsxs)(j.ZP,{alignItems:"center",fullWidth:!0,justifyContent:"flex-end",children:[(0,F.jsx)(y.Z,H(H({},Q),{},{label:re>=1&&ue?"Last run at ".concat(new Date(ue.valueOf()).toLocaleString()):q?"Block executed with errors":"Block executed successfully",children:(0,F.jsxs)(j.ZP,{alignItems:"center",children:[re>=1&&Number(ie)>Number(ue)&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(E.ZP,{small:!0,children:[(Number(ie)-Number(ue))/1e3,"s"]}),(0,F.jsx)(Z.Z,{mr:1})]}),!q&&(0,F.jsx)(I.Jr,{size:2*R.iI,success:!0}),q&&(0,F.jsx)(m.Z,{danger:!0,size:2*R.iI,children:(0,F.jsx)(E.ZP,{bold:!0,monospace:!0,small:!0,children:"!"})})]})})),!q&&!f.Qj.includes(be)&&(0,F.jsx)(Z.Z,{pl:2,children:(0,F.jsxs)(j.ZP,{alignItems:"center",children:[(0,F.jsx)(y.Z,H(H({},Q),{},{label:"Expand table",children:(0,F.jsx)(p.Z,H(H({},K),{},{onClick:function(){(0,L.OF)(null===oe||void 0===oe?void 0:oe.uuid,ge),null===te||void 0===te||te(M.cH.DATA),null===de||void 0===de||de((function(e){return e.find((function(e){return e.uuid===ge}))?e:(null===fe||void 0===fe||fe(n),e.concat(n))}))},children:(0,F.jsx)(I.M0,{muted:!0,size:1.75*R.iI})}))})),(0,F.jsx)(Z.Z,{pl:2}),(0,F.jsx)(y.Z,H(H({},Q),{},{forceVisible:De,label:De?"".concat(Ie||0,"mb downloaded..."):"Save output as CSV file",children:(0,F.jsx)(p.Z,H(H({},K),{},{compact:!0,loading:De,onClick:function(){Se(null),we()},children:(0,F.jsx)(I.vc,{muted:!0,size:1.75*R.iI})}))}))]})})]})})]})]}))]}):null}},69632:function(e,n,t){t.d(n,{JX:function(){return c},NJ:function(){return s},au:function(){return l},eQ:function(){return a}});var o=t(38626),r=t(44897),i=t(42631),u=t(70515),l=(u.iI,o.default.div.withConfig({displayName:"indexstyle__HeaderSectionStyle",componentId:"sc-nlaveq-0"})(["",""],(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).content,";\n ")}))),c=o.default.div.withConfig({displayName:"indexstyle__StreamSectionStyle",componentId:"sc-nlaveq-1"})(["border-bottom-left-radius:","px;border-bottom-right-radius:","px;overflow:hidden;",""],i.n_,i.n_,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).content,";\n ")})),a=o.default.div.withConfig({displayName:"indexstyle__EmptyCodeSpace",componentId:"sc-nlaveq-2"})(["",""],(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).codeTextarea,";\n ")})),s=o.default.div.withConfig({displayName:"indexstyle__CalloutStyle",componentId:"sc-nlaveq-3"})(["border-radius:","px;padding:","px;",""],i.n_,u.cd*u.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).panel,";\n border: 1px solid ").concat((e.theme.borders||r.Z.borders).light,";\n ")}))},41429:function(e,n,t){t.d(n,{$m:function(){return r},C:function(){return a},C4:function(){return p},Jt:function(){return u},Rj:function(){return i},Xy:function(){return c},aj:function(){return f},gM:function(){return l},vT:function(){return s},zr:function(){return d}});var o=t(70515),r={uuid:"Preview results"},i={uuid:"Logs"},u={uuid:"SQL"},l={uuid:"Lineage"},c=function(e){var n,t,o=e.metadata,c=[i,u];return(null===o||void 0===o||null===(n=o.dbt)||void 0===n||null===(t=n.block)||void 0===t?void 0:t.snapshot)||(c.unshift(r),c.push(l)),c},a=2.5*o.iI,s="CodeBlock_HiddenBlock",d={label:function(){return"CODE"},uuid:"code"},f={label:function(){return"INTERACTIONS"},uuid:"interactions"},p=[d,f]},79818:function(e,n,t){t.d(n,{z:function(){return Ve},Z:function(){return Je}});var o=t(21831),r=t(75582),i=t(82394),u=t(12691),l=t.n(u),c=t(82684),a=t(38626),s=t(10975),d=t(14567),f=t(69864),p=t(57271),m=t(79757),v=t(71180),h=t(55485),b=t(38276),g=t(30160),x=t(55283),j=t(28598);var C=function(e){var n=e.blocks,t=e.onClick,o=(0,c.useContext)(a.ThemeContext);return(0,j.jsx)(h.ZP,{alignItems:"center",children:null===n||void 0===n?void 0:n.map((function(e){var n=e.color,r=e.type,i=e.uuid,u=(0,x.qn)(r,{blockColor:n,theme:o}).accentLight;return(0,j.jsx)(b.Z,{ml:1,mt:1,children:(0,j.jsx)(v.Z,{backgroundColor:u,compact:!0,onClick:function(){return t(e)},small:!0,children:(0,j.jsx)(g.ZP,{monospace:!0,small:!0,children:i})})},i)}))})},O=t(97618),_=t(26084),Z=t(85385),E=t(86735);function y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function k(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?y(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):y(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var T=function(e){var n=e.block,t=e.blocks,o=e.openSidekickView,i=e.pipeline,u=(0,c.useMemo)((function(){return(0,E.HK)(t,(function(e){return e.uuid}))}),[t]),l=(0,c.useMemo)((function(){var e;return null===n||void 0===n||null===(e=n.callback_blocks)||void 0===e?void 0:e.reduce((function(e,n){var t=null===u||void 0===u?void 0:u[n];return t?e.concat(t):e}),[])}),[n,u]),a=(0,c.useMemo)((function(){var e;return null===n||void 0===n||null===(e=n.conditional_blocks)||void 0===e?void 0:e.reduce((function(e,n){var t=null===u||void 0===u?void 0:u[n];return t?e.concat(t):e}),[])}),[n,u]),s=(0,c.useMemo)((function(){var e,t=[];return null===(e=Object.entries((null===i||void 0===i?void 0:i.extensions)||{}))||void 0===e||e.forEach((function(e){var o=(0,r.Z)(e,2),i=o[0],l=o[1].blocks;null===l||void 0===l||l.forEach((function(e){var o=e.upstream_blocks,r=e.uuid;if(null!==o&&void 0!==o&&o.includes(null===n||void 0===n?void 0:n.uuid)){var l=null===u||void 0===u?void 0:u[r];l&&t.push(k(k({},l),{},{extension_uuid:i}))}}))})),t}),[n,u,i]),d=(0,c.useMemo)((function(){return null===a||void 0===a?void 0:a.length}),[a]),f=(0,c.useMemo)((function(){return null===l||void 0===l?void 0:l.length}),[l]),p=(0,c.useMemo)((function(){return null===s||void 0===s?void 0:s.length}),[s]);return(0,j.jsxs)(b.Z,{pb:d>=1||f>=1||p>=1?1:0,children:[d>=1&&(0,j.jsx)(b.Z,{mt:1,children:(0,j.jsxs)(O.Z,{flexDirection:"column",children:[(0,j.jsx)(b.Z,{px:1,children:(0,j.jsx)(g.ZP,{bold:!0,muted:!0,children:"Conditionals"})}),(0,j.jsx)(C,{blocks:a,onClick:function(e){var n=e.uuid;return o(Z.cH.ADDON_BLOCKS,!0,{addon:_.Q.CONDITIONAL,blockUUID:n})}})]})}),f>=1&&(0,j.jsx)(b.Z,{mt:1,children:(0,j.jsxs)(O.Z,{flexDirection:"column",children:[(0,j.jsx)(b.Z,{px:1,children:(0,j.jsx)(g.ZP,{bold:!0,muted:!0,children:"Callbacks"})}),(0,j.jsx)(C,{blocks:l,onClick:function(e){var n=e.uuid;return o(Z.cH.ADDON_BLOCKS,!0,{addon:_.Q.CALLBACK,blockUUID:n})}})]})}),p>=1&&(0,j.jsx)(b.Z,{mt:1,children:(0,j.jsxs)(O.Z,{flexDirection:"column",children:[(0,j.jsx)(b.Z,{px:1,children:(0,j.jsx)(g.ZP,{bold:!0,muted:!0,children:"Extensions"})}),(0,j.jsx)(C,{blocks:s,onClick:function(e){var n=e.extension_uuid,t=e.uuid;return o(Z.cH.EXTENSIONS,!0,{blockUUID:t,extension:n})}})]})})]})},I=t(81769),S=t(44425),A=t(90299),P=t(70652),R=t(39867),w=t(75810),D=t(12869),N=t(70374),M=t(35058),L=t(85108),B=t(70515),U=t(81728);function F(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function G(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?F(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):F(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var H=function(e){var n=e.addWidget,t=e.block,r=e.left,i=e.rightOffset,u=e.onClickCallback,l=e.open,a=e.parentRef,s=e.runBlock,d=e.topOffset,f=(0,c.useMemo)((function(){return M.CK.map((function(e){var o,r,i={configuration:{chart_type:e},language:t.language,type:S.tf.CHART,upstream_blocks:t?[t.uuid]:null},u=L.x8[e],l=(null===u||void 0===u||null===(o=u.configuration)||void 0===o?void 0:o.call(u,i))||{},c=S.t6.SQL===(null===t||void 0===t?void 0:t.language)?null:(null===u||void 0===u||null===(r=u.content)||void 0===r?void 0:r.call(u,i))||null,a=e;return t&&(a="".concat(a," for ").concat(t.uuid)),{label:function(){return(0,U.vg)(e)},onClick:function(){return n(G(G({},i),{},{name:"".concat(a," ").concat((0,U.Mp)()),configuration:G(G({},i.configuration),l),content:c}),{onCreateCallback:function(e){t&&S.t6.SQL!==t.language&&([S.DA.EXECUTED,S.DA.UPDATED].includes(t.status)?null===s||void 0===s||s({block:e,code:c,disableReset:!0}):null===s||void 0===s||s({block:t,runDownstream:!0}))}})},uuid:e}}))}),[M.CK,t,s]),p=(0,c.useMemo)((function(){return L._H.map((function(e){var o=e.label,r=G(G({},(0,e.widgetTemplate)({block:t})),{},{language:t.language,type:S.tf.CHART,upstream_blocks:t?[t.uuid]:null});return{label:o,onClick:function(){return n(r,{onCreateCallback:function(e){t&&S.t6.SQL!==t.language&&([S.DA.EXECUTED,S.DA.UPDATED].includes(t.status)?null===s||void 0===s||s({block:e,code:e.content,disableReset:!0}):null===s||void 0===s||s({block:t,runDownstream:!0}))}})},uuid:o()}}))}),[L._H,n,t,s]),m=[{isGroupingTitle:!0,label:function(){return"Custom charts"},uuid:"custom_charts"}].concat((0,o.Z)(f));return S.t6.SQL!==t.language&&m.push.apply(m,[{isGroupingTitle:!0,label:function(){return"Templates"},uuid:"chart_templates"}].concat((0,o.Z)(p))),(0,j.jsx)(N.Z,{items:m,left:r,onClickCallback:u,open:l,parentRef:a,rightOffset:i,topOffset:d,uuid:"CommandButtons/add_charts",width:25*B.iI})},Q=t(50724),K=t(63403),z=a.default.svg.withConfig({displayName:"Convert__SVGStyle",componentId:"sc-fmw0vr-0"})([""]),Y=function(e){var n=e.fill,t=e.opacity,o=e.size,r=void 0===o?K.C:o,i=e.style,u=e.viewBox,l=void 0===u?"0 0 12 12":u;return(0,j.jsxs)(z,{fill:n,height:r,opacity:t,style:i,viewBox:l,width:r,children:[(0,j.jsx)("path",{clipRule:"evenodd",d:"M2.5 1C1.67157 1 1 1.67157 1 2.5v.0625c0 .27614-.223858.5-.5.5s-.5-.22386-.5-.5V2.5C0 1.11929 1.11929 0 2.5 0h7C10.8807 0 12 1.11929 12 2.5v7c0 1.3807-1.1193 2.5-2.5 2.5h-7C1.11929 12 0 10.8807 0 9.5v-.0625c0-.27614.223858-.5.5-.5s.5.22386.5.5V9.5c0 .8284.67157 1.5 1.5 1.5h7c.8284 0 1.5-.6716 1.5-1.5v-7c0-.82843-.6716-1.5-1.5-1.5h-7z",fill:"url(#paint0_linear_1332_60037)",fillRule:"evenodd"}),(0,j.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.05806 3.55806c.24408-.24408.6398-.24408.88388 0l2 2c.24408.24408.24408.6398 0 .88388l-2 2c-.24408.24408-.6398.24408-.88388 0-.24408-.24408-.24408-.6398 0-.88388l.93306-.93306H1C.654822 6.625.375 6.34518.375 6s.279822-.625.625-.625h5.99112l-.93306-.93306c-.24408-.24408-.24408-.6398 0-.88388z",fill:"#fff"}),(0,j.jsx)("defs",{children:(0,j.jsxs)("linearGradient",{id:"paint0_linear_1332_60037",x1:"-.618557",y1:"-.000001",x2:"10.5709",y2:".83113",gradientUnits:"userSpaceOnUse",children:[(0,j.jsx)("stop",{stopColor:"#FFCC19"}),(0,j.jsx)("stop",{offset:".585938",stopColor:"#2ECDF7"}),(0,j.jsx)("stop",{offset:"1",stopColor:"#9E7BFF"})]})})]})},W=t(46732),q=t(49130),V=t(7267),X=t(48670),J=t(65956),$=t(4190),ee=t(12468),ne=t(35686),te=t(44897),oe=t(48339),re=t(72473),ie=t(41429),ue=t(39643),le=t(57653),ce=t(61709),ae=t(58325),se=t(72619),de=t(23780);function fe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function pe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?fe(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):fe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var me=function(e){var n=e.addNewBlock,t=e.addWidget,o=e.block,i=e.blockContent,u=e.blocks,l=e.deleteBlock,s=e.executionState,d=e.fetchFileTree,p=e.fetchPipeline,m=e.hideExtraButtons,C=e.interruptKernel,O=e.isEditingBlock,_=e.openSidekickView,y=e.pipeline,k=e.project,T=e.runBlock,I=e.setBlockContent,A=e.setIsEditingBlock,P=e.savePipelineContent,w=e.setErrors,D=e.setOutputCollapsed,M=e.showConfigureProjectModal,L=(0,de.VI)(null,{},[],{uuid:"CommandButtons/".concat(null===o||void 0===o?void 0:o.uuid)}),U=(0,r.Z)(L,1)[0],F=o.all_upstream_blocks_executed,G=void 0===F||F,K=o.color,z=o.language,fe=(o.metadata,o.type),me=o.uuid,ve=(0,c.useRef)(null),he=(0,c.useRef)(null),be=(0,c.useRef)(null),ge=(0,c.useRef)(null),xe=(0,c.useRef)(null),je=null===y||void 0===y?void 0:y.type,Ce=(0,c.useState)(!1),Oe=Ce[0],_e=Ce[1],Ze=(0,c.useState)(!1),Ee=Ze[0],ye=Ze[1],ke=(0,c.useState)(!1),Te=ke[0],Ie=ke[1],Se=(0,c.useState)(!1),Ae=Se[0],Pe=Se[1],Re=(0,c.useState)(!1),we=Re[0],De=Re[1],Ne=(0,c.useContext)(a.ThemeContext),Me=oe.uF.IDLE!==s,Le=(0,x.qn)(fe,{blockColor:K,theme:Ne}).accent,Be=(0,c.useMemo)((function(){return je===le.qL.STREAMING}),[je]),Ue=(0,c.useMemo)((function(){return je===le.qL.INTEGRATION}),[je]),Fe=(0,c.useMemo)((function(){return(0,ce.Ts)(o,u,"CommandButtons",n).map((function(e){return pe(pe({},e),{},{onClick:function(){return P().then((function(){return e.onClick()}))}})}))}),[n,o,u,P]),Ge=(0,c.useMemo)((function(){return(0,E.HK)(u,(function(e){return e.uuid}))}),[u]),He=(0,c.useMemo)((function(){return S.tf.DBT===(null===o||void 0===o?void 0:o.type)}),[o]),Qe=(0,c.useMemo)((function(){return S.tf.MARKDOWN===(null===o||void 0===o?void 0:o.type)}),[o]),Ke=(0,f.Db)(ne.ZP.pipelines.useUpdate(null===y||void 0===y?void 0:y.uuid),{onSuccess:function(e){return(0,se.wD)(e,{callback:function(){p()},onErrorCallback:function(e,n){return w({errors:n,response:e})}})}}),ze=(0,r.Z)(Ke,2),Ye=ze[0],We=ze[1].isLoading,qe=(0,f.Db)(ne.ZP.llms.useCreate(),{onSuccess:function(e){return(0,se.wD)(e,{callback:function(e){var n=e.llm;null!==n&&void 0!==n&&n.response&&I&&(null===I||void 0===I||I(null===n||void 0===n?void 0:n.response))},onErrorCallback:function(e,n){return U({errors:n,response:e})}})}}),Ve=(0,r.Z)(qe,2),Xe=Ve[0],Je=(Ve[1].isLoading,(0,c.useMemo)((function(){var e=!(null!==k&&void 0!==k&&k.openai_api_key),n=function(e){null===M||void 0===M||M({header:(0,j.jsx)(b.Z,{mb:B.HN,children:(0,j.jsxs)(J.Z,{children:[(0,j.jsx)(g.ZP,{warning:!0,children:"You need to add an OpenAI API key to your project before you can generate blocks using AI."}),(0,j.jsx)(b.Z,{mt:1,children:(0,j.jsxs)(g.ZP,{warning:!0,children:["Read ",(0,j.jsx)(X.Z,{href:"https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key",openNewWindow:!0,children:"OpenAI\u2019s documentation"})," to get your API key."]})})]})}),onSaveSuccess:function(n){null!==n&&void 0!==n&&n.openai_api_key&&Ye({pipeline:{llm:e}})}})},t={request:{block_uuid:null===o||void 0===o?void 0:o.uuid,pipeline_uuid:null===y||void 0===y?void 0:y.uuid}};return[{label:function(){return"Document block (beta)"},onClick:function(){t.use_case=V.z.GENERATE_DOC_FOR_BLOCK,e?n(t):Ye({pipeline:{llm:t}})},uuid:"Document block"},{label:function(){return"Document pipeline and all blocks (beta)"},onClick:function(){t.use_case=V.z.GENERATE_DOC_FOR_PIPELINE,e?n(t):Ye({pipeline:{llm:t}})},uuid:"Document pipeline and all blocks"},{label:function(){return"Add comments in code (beta)"},onClick:function(){e?n(t):Xe({llm:{request:{block_code:i},use_case:V.z.GENERATE_COMMENT_FOR_CODE}})},uuid:"Add comments in code"}]}),[o,i,Xe,y,k,M,Ye]));return(0,j.jsxs)(h.ZP,{alignItems:"center",children:[oe.uF.QUEUED===s&&(0,j.jsx)($.Z,{color:(Ne||te.Z).content.active,type:"cylon"}),oe.uF.BUSY===s&&(0,j.jsx)($.Z,{color:(Ne||te.Z).content.active}),T&&!Me&&!Be&&(0,j.jsxs)(j.Fragment,{children:[!He&&(0,j.jsx)(ee.Z,{appearBefore:!0,default:!0,label:(0,j.jsxs)(g.ZP,{children:["Run block \xa0 \xa0",(0,j.jsx)(q.Z,{inline:!0,keyTextGroups:[[(0,ae.V5)()?ue.RJ:ue.hE,ue.Lz]],monospace:!0,uuidForKey:me})]}),size:3*B.iI,widthFitContent:!0,children:(0,j.jsx)(v.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){G?T({block:o}):Ie(!0)},children:(0,j.jsx)(R.Z,{color:Le,size:3*B.iI,children:(0,j.jsx)(re.Py,{black:!0,size:1.5*B.iI})})})}),He&&(0,j.jsx)(v.Z,{backgroundColor:Le,beforeIcon:(0,j.jsx)(re.Py,{size:1.5*B.iI}),compact:!0,onClick:function(){G?T({block:o}):Ie(!0)},small:!0,children:z===S.t6.YAML?"Run command":"Compile & preview"}),(0,j.jsx)(Q.Z,{disableEscape:!0,onClickOutside:function(){return Ie(!1)},open:Te,children:(0,j.jsx)(N.Z,{items:[{label:function(){return"Execute block"},onClick:function(){return T({block:o})},uuid:"execute_block"},{label:function(){return"Execute with upstream blocks"},onClick:function(){return T({block:o,runUpstream:!0})},uuid:"execute_upstream"}],onClickCallback:function(){return Ie(!1)},open:Te,parentRef:be,rightOffset:13.25*B.iI,topOffset:4.5*B.iI,uuid:"execute_actions",width:25*B.iI})})]}),Me&&(0,j.jsx)(b.Z,{ml:B.cd,children:(0,j.jsx)(ee.Z,{appearBefore:!0,default:!0,label:(0,j.jsxs)(g.ZP,{children:["Interrupt kernel \xa0 \xa0",(0,j.jsx)(q.Z,{inline:!0,keyTextGroups:[[ue.kA],[ue.kA]],monospace:!0,uuidForKey:me})]}),size:ie.C,widthFitContent:!0,children:(0,j.jsx)(v.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return C()},children:(0,j.jsx)(R.Z,{borderSize:1.5,size:ie.C,children:(0,j.jsx)(re.x8,{size:1*B.iI})})})})}),!m&&S.tf.SCRATCHPAD===o.type&&!Be&&(0,j.jsx)(b.Z,{ml:B.cd,children:(0,j.jsx)(W.Z,{items:Fe,onClickCallback:function(){return ye(!1)},onClickOutside:function(){return ye(!1)},open:Ee,parentRef:he,rightOffset:0,topOffset:4,uuid:"CommandButtons/convert_block",children:(0,j.jsx)(ee.Z,{appearBefore:!0,default:!0,label:(0,j.jsx)(g.ZP,{children:"Convert block"}),size:ie.C,widthFitContent:!0,children:(0,j.jsx)(v.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return ye(!Ee)},ref:he,children:(0,j.jsx)(Y,{size:ie.C})})})})}),!m&&[S.tf.DATA_LOADER,S.tf.TRANSFORMER].includes(o.type)&&!Be&&!Ue&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{ml:B.cd,ref:ve,children:(0,j.jsx)(ee.Z,{appearBefore:!0,default:!0,label:"Add chart",size:2.25*B.iI,widthFitContent:!0,children:(0,j.jsx)(v.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return _e((function(e){return!e}))},children:(0,j.jsx)(re.GQ,{size:2.25*B.iI})})})}),t&&(0,j.jsx)(Q.Z,{disableEscape:!0,onClickOutside:function(){return _e(!1)},open:Oe,children:(0,j.jsx)(H,{addWidget:t,block:o,onClickCallback:function(){return _e(!1)},open:Oe,parentRef:ve,rightOffset:9*B.iI,runBlock:T,topOffset:2*B.iI})})]}),!m&&Qe&&(0,j.jsx)(b.Z,{ml:B.cd,children:(0,j.jsx)(ee.Z,{appearBefore:!0,default:!0,label:O?"Close editor":"Edit",size:ie.C,widthFitContent:!0,children:(0,j.jsx)(v.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return A((function(e){return!e}))},children:O?(0,j.jsx)(re.Jr,{size:ie.C,success:!0}):(0,j.jsx)(re.I8,{size:ie.C})})})}),!m&&S.tf.GLOBAL_DATA_PRODUCT!==(null===o||void 0===o?void 0:o.type)&&(0,j.jsx)("div",{ref:xe,children:(0,j.jsxs)(b.Z,{ml:B.cd,children:[We&&(0,j.jsx)($.Z,{inverted:!0,small:!0}),!We&&(0,j.jsx)(ee.Z,{appearBefore:!0,default:!0,label:(0,j.jsx)(g.ZP,{children:"AI actions"}),size:ie.C,widthFitContent:!0,children:(0,j.jsx)(v.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return De((function(e){return!e}))},children:(0,j.jsx)(re.xq,{default:!0,size:ie.C})})})]})}),!m&&(0,j.jsx)(Q.Z,{disableEscape:!0,onClickOutside:function(){return De(!1)},open:we,children:(0,j.jsx)(N.Z,{items:Je,onClickCallback:function(){return De(!1)},open:we,parentRef:xe,rightOffset:4.75*B.iI,topOffset:2*B.iI,uuid:"FileHeaderMenu/AI_actions"})}),!m&&(0,j.jsx)(b.Z,{ml:B.cd,children:(0,j.jsx)(ee.Z,{appearBefore:!0,default:!0,label:"View and edit settings for this block",size:ie.C,widthFitContent:!0,children:(0,j.jsx)(v.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return null===_||void 0===_?void 0:_(Z.cH.BLOCK_SETTINGS)},children:(0,j.jsx)(re.JG,{default:!0,size:ie.C})})})}),!m&&(0,j.jsx)("div",{ref:ge,children:(0,j.jsx)(b.Z,{ml:B.cd,children:(0,j.jsx)(ee.Z,{appearBefore:!0,default:!0,label:(0,j.jsx)(g.ZP,{children:"More actions"}),size:ie.C,widthFitContent:!0,children:(0,j.jsx)(v.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return Pe((function(e){return!e}))},children:(0,j.jsx)(R.Z,{borderSize:1.5,default:!0,size:ie.C,children:(0,j.jsx)(re.mH,{default:!0,size:B.iI})})})})})}),!m&&(0,j.jsx)(Q.Z,{disableEscape:!0,onClickOutside:function(){return Pe(!1)},open:Ae,children:(0,j.jsx)(N.Z,{items:(0,ce.J8)(o,T,l,D,Be||Ue,{addNewBlock:n,blocksMapping:Ge,fetchFileTree:d,fetchPipeline:p,openSidekickView:_,project:k,savePipelineContent:P,updatePipeline:Ye}),onClickCallback:function(){return Pe(!1)},open:Ae,parentRef:ge,rightOffset:4.75*B.iI,topOffset:2*B.iI,uuid:"FileHeaderMenu/file_items"})})]})},ve=t(15338),he=t(85854),be=t(99236),ge=t(75499),xe=t(69632),je=t(37443),Ce=t(53405);function Oe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function _e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Oe(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Oe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ze,Ee=function(e){var n=e.block,t=e.blockContent,o=e.blocksMapping,r=e.codeEditor,i=e.callbackEl,u=e.onChangeBlock,l=(e.openSidekickView,e.showDataIntegrationModal),a=(n.catalog,n.language),s=n.metadata,d=n.type,f=n.upstream_blocks,p=n.uuid,m=((null===s||void 0===s?void 0:s.data_integration)||{}).name,C=(0,c.useMemo)((function(){return(0,Ce.Uc)(n,{getAll:!0})}),[n]),_=(0,c.useMemo)((function(){return null===C||void 0===C?void 0:C.filter(Ce.Z5)}),[C]),Z=(0,c.useMemo)((function(){return(null===C||void 0===C?void 0:C.length)||0}),[C]),y=(0,c.useMemo)((function(){return(null===_||void 0===_?void 0:_.length)||0}),[_]),k=S.tf.DATA_LOADER===d,T=k?"source":"destination",I=(0,c.useMemo)((function(){var e=[1,1,1,null],o=[{uuid:"Stream"},{center:!0,uuid:"Columns"},{center:!0,uuid:"Sync method"},{uuid:"Parallel"}];return k||(e=(0,E.Hk)(1,1,e),o=(0,E.Hk)({uuid:"Table name"},1,o)),(0,j.jsx)(ge.Z,{columnFlex:e,columns:o,rows:null===_||void 0===_?void 0:_.map((function(e){var o,r,i,c=e||{},s=c.destination_table,d=c.replication_method,f=c.run_in_parallel,p=(c.tap_stream_id,(0,Ce.M$)(e)),m=(0,Ce.Qu)(e),v=(0,Ce.WD)(e),b=(0,Ce.JN)(e),x=b.allColumns,C=b.selectedColumns,O=(null===(o=Object.keys(x||[]))||void 0===o?void 0:o.length)||0,_=(null===(r=Object.keys(C||[]))||void 0===r?void 0:r.length)||0,Z=S.t6.YAML===a&&!_,y=(0,j.jsxs)(X.Z,{danger:Z,monospace:!0,onClick:function(){return l({block:_e(_e({},n),{},{content:t}),defaultMainNavigationTab:p,defaultMainNavigationTabSub:m,defaultSubTab:Z?je.tw.SETTINGS:je.tw.OVERVIEW,onChangeBlock:u})},preventDefault:!0,sameColorAsText:!Z,children:[p," ",Z&&(0,j.jsx)(g.ZP,{inline:!0,default:!0,monospace:!0,children:"will fail if no columns selected"})]},"".concat(v,"-stream"));i=_>=1||S.t6.PYTHON===a?(0,j.jsxs)(g.ZP,{center:!0,default:!0,monospace:!0,children:[_," ",(0,j.jsx)(g.ZP,{inline:!0,monospace:!0,muted:!0,children:"/"})," ",O]}):(0,j.jsx)(g.ZP,{center:!0,danger:!0,children:"No columns selected"});var T=[y,(0,j.jsx)(X.Z,{danger:Z,monospace:!0,onClick:function(){return l({block:_e(_e({},n),{},{content:t}),defaultMainNavigationTab:p,defaultMainNavigationTabSub:m,defaultSubTab:je.tw.SETTINGS,onChangeBlock:u})},preventDefault:!0,sameColorAsText:!Z,children:i},"".concat(v,"-columns")),(0,j.jsx)(g.ZP,{center:!0,default:!0,children:d&&(0,U.vg)(d)},"".concat(v,"-replicationMethod")),(0,j.jsx)(h.ZP,{justifyContent:"flex-end",children:f?(0,j.jsx)(re.Jr,{size:2*B.iI,success:!0}):(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,children:"-"})},"".concat(v,"-runInParallel"))];return k||(T=(0,E.Hk)((0,j.jsx)(g.ZP,{default:!0,monospace:!0,children:s||p},"".concat(v,"-tableName")),1,T)),T}))})}),[n,a,k,l,_]),A=(0,c.useMemo)((function(){var e,t;return(0,Ce.Wi)(null===n||void 0===n||null===(e=n.upstream_blocks)||void 0===e?void 0:e.map((function(e){return null===o||void 0===o?void 0:o[e]})),null===n||void 0===n||null===(t=n.configuration)||void 0===t?void 0:t.data_integration)}),[n,o]);return(0,j.jsxs)(j.Fragment,{children:[S.t6.YAML===a&&(0,j.jsxs)(xe.au,{children:[(0,j.jsx)(ve.Z,{light:!0}),(0,j.jsx)(b.Z,{p:B.cd,children:(0,j.jsxs)(h.ZP,{alignItems:"flex-start",justifyContent:"space-between",children:[(0,j.jsxs)(O.Z,{flex:1,flexDirection:"column",children:[(0,j.jsx)(g.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,uppercase:!0,children:T}),(0,j.jsx)(he.Z,{default:!0,children:m})]}),(0,j.jsxs)(v.Z,{compact:!0,onClick:function(){return l({block:_e(_e({},n),{},{content:t}),defaultMainNavigationTab:je.uK.CONFIGURATION,onChangeBlock:u})},secondary:!0,children:["Configure ",T]})]})}),(0,j.jsx)(ve.Z,{light:!0})]}),S.t6.PYTHON===a&&(0,j.jsxs)(xe.au,{children:[(0,j.jsx)(ve.Z,{light:!0}),(0,j.jsx)(b.Z,{p:B.cd,children:(0,j.jsxs)(h.ZP,{alignItems:"flex-start",justifyContent:"space-between",children:[(0,j.jsxs)(O.Z,{flex:1,flexDirection:"column",children:[(0,j.jsx)(g.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,uppercase:!0,children:T}),(0,j.jsx)(he.Z,{default:!0,children:m})]}),(0,j.jsxs)(v.Z,{compact:!0,onClick:function(){return l({block:_e(_e({},n),{},{content:t}),defaultMainNavigationTab:je.uK.CONFIGURATION,onChangeBlock:u})},secondary:!0,children:["Configure ",T," documentation"]})]})}),(0,j.jsx)(ve.Z,{light:!0}),(null===f||void 0===f?void 0:f.length)>=1&&(0,j.jsx)(b.Z,{p:B.cd,children:(0,j.jsxs)(h.ZP,{alignItems:"flex-start",justifyContent:"space-between",children:[(0,j.jsxs)(O.Z,{flex:4,flexDirection:"column",children:[(0,j.jsx)(g.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,uppercase:!0,children:"Inputs"}),(0,j.jsxs)(b.Z,{mt:1,children:[(null===A||void 0===A?void 0:A.length)>=1&&(0,j.jsx)(g.ZP,{default:!0,children:"The output of these upstream blocks are used as positional arguments for decorated functions."}),!(null!==A&&void 0!==A&&A.length)&&(0,j.jsxs)(g.ZP,{default:!0,children:["There are currently no positional arguments for decorated functions.",(0,j.jsx)("br",{}),"To use the output of 1 or more upstream blocks as positional arguments for decorated functions, add and configure 1 or more inputs."]})]})]}),(0,j.jsx)(b.Z,{mr:B.cd}),(0,j.jsx)(O.Z,{flex:1,justifyContent:"flex-end",children:(0,j.jsx)(v.Z,{compact:!0,onClick:function(){return l({block:_e(_e({},n),{},{content:t}),defaultMainNavigationTab:je.uK.CONFIGURATION,defaultSubTab:je.tw.UPSTREAM_BLOCK_SETTINGS,onChangeBlock:u})},secondary:!0,children:(null===A||void 0===A?void 0:A.length)>=1?"Configure inputs":"Add inputs"})})]})}),(null===A||void 0===A?void 0:A.length)>=1&&(0,j.jsx)(be.Z,{inputsBlocks:A})]}),(0,j.jsxs)(xe.JX,{children:[(0,j.jsx)(b.Z,{p:B.cd,children:(0,j.jsxs)(h.ZP,{alignItems:"center",justifyContent:"space-between",children:[y>=1&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(O.Z,{flex:1,flexDirection:"column",children:(0,j.jsxs)(g.ZP,{bold:!0,default:!0,large:!0,children:[y," ",(0,j.jsx)(g.ZP,{bold:!0,inline:!0,monospace:!0,muted:!0,children:"/"})," ",Z," ",(0,U._6)("stream",Z,!1,!0)," selected"]})}),(0,j.jsx)(b.Z,{mr:1})]}),(0,j.jsxs)(v.Z,{beforeIcon:!y&&(0,j.jsx)(re.Zr,{size:2*B.iI}),compact:y>=1,onClick:function(){return l({block:_e(_e({},n),{},{content:t}),defaultMainNavigationTab:je.uK.STREAMS,onChangeBlock:u})},primary:!y,secondary:y>=1,children:[y>=1&&"Edit streams",!y&&"Set up streams"]})]})}),y>=1&&I,y>=1&&(0,j.jsx)(b.Z,{mb:B.cd})]}),S.t6.PYTHON===a&&(0,j.jsxs)(j.Fragment,{children:[y>=1&&(0,j.jsx)(xe.au,{children:(0,j.jsx)(b.Z,{pb:B.cd,px:B.cd,children:(0,j.jsx)(xe.NJ,{children:(0,j.jsxs)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(O.Z,{children:(0,j.jsx)(re.uy,{size:2*B.iI,warning:!0})}),(0,j.jsx)(b.Z,{mr:B.cd}),(0,j.jsxs)(g.ZP,{muted:!0,children:["The decorated function ",(0,j.jsx)(g.ZP,{inline:!0,monospace:!0,default:!0,children:"@selected_streams"})," and ",(0,j.jsx)(g.ZP,{inline:!0,monospace:!0,default:!0,children:"@catalog"})," will override any stream settings configured for ",(0,j.jsx)(g.ZP,{bold:!0,color:(0,x.qn)(null===n||void 0===n?void 0:n.type,{blockColor:null===n||void 0===n?void 0:n.color}).accent,inline:!0,monospace:!0,children:p}),"."]})]})})})}),(0,j.jsx)(xe.eQ,{children:(0,j.jsx)(b.Z,{pb:B.cd})}),r,i]})]})};!function(e){e.APPEND="append",e.FAIL="fail",e.REPLACE="replace"}(Ze||(Ze={}));var ye,ke=[Ze.APPEND,Ze.FAIL,Ze.REPLACE];!function(e){e.BIGQUERY="bigquery",e.CLICKHOUSE="clickhouse",e.DRUID="druid",e.MYSQL="mysql",e.POSTGRES="postgres",e.REDSHIFT="redshift",e.SNOWFLAKE="snowflake",e.TRINO="trino"}(ye||(ye={}));var Te=t(56747),Ie=t(82359),Se=t(44085),Ae=t(17488),Pe=t(3314);function Re(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function we(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Re(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Re(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var De=function(e){var n=e.block,t=e.blockConfiguration,o=e.blockRefs,r=e.blocks,u=e.updateBlockConfiguration,l=(0,c.useContext)(a.ThemeContext),s=S.t6.R===(null===n||void 0===n?void 0:n.language),d=S.t6.SQL===(null===n||void 0===n?void 0:n.language),f=null===r||void 0===r?void 0:r.find((function(e){var n=e.language;return S.t6.PYTHON===n})),p=(0,c.useMemo)((function(){var e=[null];return d&&f?e.push.apply(e,[null,1]):e.push(1),e}),[f,d]),m=(0,c.useMemo)((function(){var e=[{tooltipMessage:null,uuid:"Variable"},{tooltipMessage:null,uuid:"Block"}];return d&&f&&e.push({tooltipMessage:"Customize the full table name that this block gets created in. Include database, schema, and table name where applicable.",uuid:"Table name"}),e}),[f,d]),v=(0,c.useMemo)((function(){return null===r||void 0===r?void 0:r.map((function(e,n){var r,c=e.color,a=e.language,p=e.type,m=e.uuid,v=(0,x.qn)(p,{blockColor:c,theme:l}).accent,h=S.t6.PYTHON===a;r=d?"{{ df_".concat(n+1," }}"):s?"df".concat(n+1):"data".concat(n>=1?"_".concat(n+1):null);var b=[(0,j.jsx)(g.ZP,{default:!0,monospace:!0,small:!0,children:r},"variable-".concat(m)),(0,j.jsx)(X.Z,{color:v,onClick:function(){var e,n,t=null===o||void 0===o||null===(e=o.current)||void 0===e?void 0:e["".concat(p,"s/").concat(m,".py")];null===t||void 0===t||null===(n=t.current)||void 0===n||n.scrollIntoView()},preventDefault:!0,small:!0,children:(0,j.jsx)(g.ZP,{color:v,monospace:!0,small:!0,children:m})},"block-".concat(m))];if(d){var C="table-name-input-".concat(m),O=(null===t||void 0===t?void 0:t[M.Yf])||{},_=(null===O||void 0===O?void 0:O[m])||{};h?b.push((0,j.jsx)(Ae.Z,{borderless:!0,compact:!0,monospace:!0,onChange:function(e){var n=e.target.value;u((0,i.Z)({},M.Yf,we(we({},O),{},(0,i.Z)({},m,we(we({},_),{},(0,i.Z)({},M.aZ,n))))))},onClick:Pe.j,placeholder:"[database_optional].[schema_optional].[table]",small:!0,value:(null===_||void 0===_?void 0:_[M.aZ])||""},C)):f&&b.push((0,j.jsx)(g.ZP,{italic:!0,muted:!0,small:!0,children:"Table name is defined in upstream block."},C))}return b}))}),[f,t,o,r,s,d,l,u]);return(0,j.jsx)(j.Fragment,{children:(0,j.jsx)(ge.Z,{columnFlex:p,columns:m,compact:!0,noBorder:!0,rows:v,uuid:"CodeBlock/UpstreamBlockSettings/".concat(null===n||void 0===n?void 0:n.uuid)})})},Ne=t(84820),Me=t(98464),Le=t(84438),Be=t(89678),Ue=t(38399),Fe=t(37529),Ge=t(53808),He=t(44375),Qe=t(74052),Ke=t(42041),ze=t(42122),Ye=t(44688);function We(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function qe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?We(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):We(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ve=1e3;function Xe(e,n){var t,u,C,_,y=e.addNewBlock,k=e.addNewBlockMenuOpenIdx,N=e.addWidget,L=e.allBlocks,F=e.allowCodeBlockShortcuts,G=e.autocompleteItems,H=e.block,Q=e.blockIdx,K=e.blockInteractions,z=e.blockRefs,Y=e.blockTemplates,q=e.blocks,V=void 0===q?[]:q,J=e.containerRef,$=e.dataProviders,te=e.defaultValue,ae=void 0===te?"":te,de=e.deleteBlock,fe=e.disableDrag,pe=e.disableShortcuts,he=e.executionState,be=e.extraContent,ge=e.fetchFileTree,xe=e.fetchPipeline,je=e.globalDataProducts,Oe=e.height,_e=e.hideExtraCommandButtons,Re=e.hideExtraConfiguration,we=e.hideHeaderInteractiveInformation,We=e.hideRunButton,Xe=e.interactionsMapping,Je=e.interruptKernel,$e=e.mainContainerRef,en=e.mainContainerWidth,nn=e.messages,tn=void 0===nn?[]:nn,on=e.noDivider,rn=e.onCallbackChange,un=e.onChange,ln=e.onClickAddSingleDBTModel,cn=e.onDrop,an=e.openSidekickView,sn=e.pipeline,dn=e.project,fn=e.runBlock,pn=e.runningBlocks,mn=e.savePipelineContent,vn=e.selected,hn=e.setAddNewBlockMenuOpenIdx,bn=e.setAnyInputFocused,gn=e.setCreatingNewDBTModel,xn=e.setEditingBlock,jn=e.setErrors,Cn=e.setOutputBlocks,On=e.setSelected,_n=e.setSelectedBlock,Zn=e.setSelectedOutputBlock,En=e.setTextareaFocused,yn=e.showBrowseTemplates,kn=e.showConfigureProjectModal,Tn=e.showDataIntegrationModal,In=e.showGlobalDataProducts,Sn=e.showUpdateBlockModal,An=e.textareaFocused,Pn=e.widgets,Rn=(0,c.useContext)(a.ThemeContext),wn=(0,c.useMemo)((function(){var e;return!(null===dn||void 0===dn||null===(e=dn.features)||void 0===e||!e[Ie.d.INTERACTIONS])}),[null===dn||void 0===dn?void 0:dn.features]),Dn=H||{},Nn=Dn.callback_content,Mn=Dn.configuration,Ln=void 0===Mn?{}:Mn,Bn=Dn.color,Un=Dn.error,Fn=Dn.has_callback,Gn=Dn.language,Hn=Dn.name,Qn=Dn.pipelines,Kn=Dn.replicated_block,zn=Dn.type,Yn=Dn.upstream_blocks,Wn=void 0===Yn?[]:Yn,qn=Dn.uuid,Vn=(0,c.useMemo)((function(){return Ln}),[Ln]),Xn=(0,c.useMemo)((function(){var e;return(null===(e=Object.values(Qn||{}))||void 0===e?void 0:e.length)||1}),[Qn]),Jn=(0,c.useMemo)((function(){return null===Vn||void 0===Vn?void 0:Vn.global_data_product}),[Vn]),$n=(0,c.useMemo)((function(){return(0,E.HK)(je||[],(function(e){return e.uuid}))}),[je]),et=(0,c.useState)(!1),nt=et[0],tt=et[1],ot=(0,c.useState)(null),rt=ot[0],it=ot[1],ut=(0,c.useState)(!1),lt=ut[0],ct=ut[1],at=(0,c.useState)(!1),st=at[0],dt=at[1],ft=(0,c.useState)(ae),pt=ft[0],mt=ft[1],vt=(0,c.useState)(null),ht=vt[0],bt=vt[1],gt=(0,c.useState)(ie.C4[0].uuid),xt=gt[0],jt=gt[1],Ct=(0,c.useState)(null),Ot=Ct[0],_t=Ct[1],Zt=sn||{},Et=Zt.type,yt=Zt.uuid,kt=(0,c.useMemo)((function(){return le.qL.STREAMING===Et}),[Et]),Tt=S.tf.DBT===zn,It=S.t6.SQL===Gn,St=S.t6.R===Gn,At=S.tf.MARKDOWN===zn,Pt=(0,c.useMemo)((function(){return(0,Ce.jO)(H,sn)}),[H,sn]),Rt=Vn[M.mW];It&&void 0===Rt&&(Rt=Ve);var wt=(0,c.useState)(qe(qe({},Vn),{},(t={},(0,i.Z)(t,M.cH,Vn[M.cH]),(0,i.Z)(t,M.Sv,Vn[M.Sv]),(0,i.Z)(t,M.sc,Vn[M.sc]),(0,i.Z)(t,M.BD,Vn[M.BD]),(0,i.Z)(t,M.m$,Vn[M.m$]),(0,i.Z)(t,M.Pi,Vn[M.Pi]||{}),(0,i.Z)(t,M.Mv,Vn[M.Mv]),(0,i.Z)(t,M.eW,Vn[M.eW]),(0,i.Z)(t,M.nq,Vn[M.nq]||Ze.APPEND),(0,i.Z)(t,M.mW,Rt),(0,i.Z)(t,M.bk,Vn[M.bk]),(0,i.Z)(t,M.Mi,!!Vn[M.Mi]),t))),Dt=wt[0],Nt=wt[1],Mt=(0,c.useState)(null),Lt=Mt[0],Bt=Mt[1],Ut=(0,c.useState)(At),Ft=Ut[0],Gt=Ut[1],Ht=(0,c.useState)(!1),Qt=Ht[0],Kt=Ht[1],zt=(0,c.useState)(0),Yt=zt[0],Wt=zt[1],qt=(0,c.useState)(null),Vt=qt[0],Xt=qt[1],Jt=(0,c.useState)(null),$t=Jt[0],eo=Jt[1],no=(0,c.useState)(tn),to=no[0],oo=no[1],ro=(0,c.useState)((0,ie.Xy)(H)[0]),io=ro[0],uo=ro[1],lo=(0,s.c)((function(){return{collect:function(e){return{isDragging:!!e.isDragging()}},item:H,type:ie.vT}}),[H]),co=(0,r.Z)(lo,2),ao=co[0],so=co[1],fo=(0,d.L)((function(){return{accept:ie.vT,drop:function(e){return null===cn||void 0===cn?void 0:cn(H,e)}}}),[H]),po=(0,r.Z)(fo,2)[1],mo=(0,c.useMemo)((function(){var e;return(null===H||void 0===H||null===(e=H.metadata)||void 0===e?void 0:e.dbt)||{project:null,projects:{}}}),[H]),vo=(0,c.useMemo)((function(){return mo.projects||{}}),[mo]),ho=(0,c.useMemo)((function(){return mo.project||Dt[M.eW]}),[Dt,mo]),bo=(0,c.useMemo)((function(){return vo[ho]||{target:null,targets:[]}}),[ho,vo]),go=(0,c.useMemo)((function(){return bo.targets||[]}),[bo]),xo=(0,c.useMemo)((function(){return Dt[M.Mv]}),[Dt]),jo=ho?null!==bo&&void 0!==bo&&bo.target?(0,E.sE)(go,(function(e){return e===bo.target})):"Select target":"Select project first",Co=(0,c.useState)(xo&&!(null!==go&&void 0!==go&&go.includes(xo))),Oo=Co[0],_o=Co[1],Zo=(0,c.useState)(null),Eo=Zo[0],yo=Zo[1];(0,c.useEffect)((function(){Nn!==Eo&&yo(Nn)}),[Eo,Nn]);var ko=(0,Me.Z)(H);(0,c.useEffect)((function(){if(JSON.stringify(H)!=JSON.stringify(ko)){var e,n=(0,Qe.Rt)([H]).messages,t=null===n||void 0===n||null===(e=n[zn])||void 0===e?void 0:e[qn];(null===t||void 0===t?void 0:t.length)>=1&&oo(t)}}),[H,zn,qn,ko,oo]);var To=(0,Me.Z)(tn);(0,c.useEffect)((function(){"undefined"!==typeof tn&&tn.length!==(null===To||void 0===To?void 0:To.length)&&oo(tn)}),[tn,To,oo]);var Io=(0,c.useMemo)((function(){var e=new Set;return null===$||void 0===$||$.forEach((function(n){var t=n.profiles;e=new Set([].concat((0,o.Z)(e),(0,o.Z)(t)))})),(0,o.Z)(e)}),[$]),So=(0,c.useMemo)((function(){return"".concat(yt,"/").concat(qn,"/codeCollapsed")}),[yt,qn]),Ao=(0,c.useMemo)((function(){return"".concat(yt,"/").concat(qn,"/outputCollapsed")}),[yt,qn]);(0,c.useEffect)((function(){dt((0,Ge.U2)(So,!1)),Kt((0,Ge.U2)(Ao,!1))}),[So,Ao]);var Po=(0,c.useRef)(null),Ro=(0,c.useMemo)((function(){return(0,E.HK)(V,(function(e){return e.uuid}))}),[V]),wo=(0,c.useMemo)((function(){return!(null===Pn||void 0===Pn||!Pn.find((function(e){return e.upstream_blocks.includes(qn)})))}),[qn,Pn]),Do=(0,c.useCallback)((function(e){var n=e||{},t=n.block,o=n.code,r=n.disableReset,i=n.runDownstream,u=n.runIncompleteUpstream,l=n.runSettings,c=n.runUpstream,a=n.runTests,s=n.variables,d=a;if(null===d||"undefined"===typeof d){var f=(t||{}).type;d=[S.tf.DATA_LOADER,S.tf.DATA_EXPORTER,S.tf.TRANSFORMER].includes(f)}Tt&&ie.Rj!==io&&uo(ie.Rj),null===fn||void 0===fn||fn({block:t,code:o||pt,runDownstream:i||wo,runIncompleteUpstream:u||!1,runSettings:l,runTests:d||!1,runUpstream:c||!1,variables:s||Ot}),r||(Wt(1+Number(Yt)),Xt(null),Kt(!1))}),[pt,wo,Tt,fn,Yt,io,Wt,Xt,uo,Ot]),No=!(null===pn||void 0===pn||!pn.find((function(e){return e.uuid===qn})))||(null===to||void 0===to?void 0:to.length)>=1&&he!==oe.uF.IDLE;(0,c.useEffect)((function(){No&&eo(Number(new Date))}),[No,eo]);var Mo=(0,Me.Z)(he);(0,c.useEffect)((function(){he===oe.uF.IDLE&&he!==Mo&&Xt(Number(new Date))}),[he,Mo,Xt]);var Lo=(0,c.useCallback)((function(e){var n=e.editorRect.top,t=e.position.lineNumberTop;if(null!==$e&&void 0!==$e&&$e.current){var o=$e.current.getBoundingClientRect().height;if(n+t>o){var r=$e.current.scrollTop+(t-o+n);$e.current.scrollTo(0,r)}else if(t+n<Be.aU){var i=$e.current.scrollTop+(t+n-Be.aU);$e.current.scrollTo(0,i)}}}),[$e]),Bo=(0,c.useMemo)((function(){return(0,ce.h5)(to,Lt)}),[Lt,to]),Uo=(0,ce.oI)(Bo),Fo=Uo.hasError,Go=Uo.hasOutput,Ho=(0,c.useMemo)((function(){return Go||(null===to||void 0===to?void 0:to.length)>=1}),[Go,to]),Qo=(0,x.qn)(zn,{blockColor:Bn,theme:Rn}).accent,Ko=(null===Wn||void 0===Wn?void 0:Wn.length)||0,zo=(0,Ce.cU)([H],V)[0],Yo=zo.dynamic,Wo=zo.dynamicUpstreamBlock,qo=zo.reduceOutput,Vo=zo.reduceOutputUpstreamBlock,Xo=(0,c.useMemo)((function(){return(0,ce._o)({block:H,dynamic:Yo,dynamicUpstreamBlock:Wo,hasError:Fo,reduceOutput:qo,reduceOutputUpstreamBlock:Vo,selected:vn})}),[H,Yo,Wo,Fo,qo,Vo,vn]),Jo=Xo.borderColorShareProps,$o=Xo.tags,er=(0,c.useCallback)((function(){vn||(null===bn||void 0===bn||bn(!1),null===On||void 0===On||On(!0))}),[vn,bn,On]),nr=ne.ZP.blocks.pipelines.detail(yt,ie.gM.uuid===(null===io||void 0===io?void 0:io.uuid)||ie.Jt.uuid===(null===io||void 0===io?void 0:io.uuid)?encodeURIComponent(qn):null,{_format:"dbt"},{revalidateOnFocus:!0}),tr=nr.data,or=nr.mutate,rr=(0,c.useMemo)((function(){var e;return(null===tr||void 0===tr||null===(e=tr.block)||void 0===e?void 0:e.metadata)||{}}),[tr]),ir=(0,f.Db)(ne.ZP.blocks.pipelines.useUpdate(yt,qn),{onError:function(e){var n=(0,se.qQ)(e).messages;Bt(n)},onSuccess:function(e){return(0,se.wD)(e,{callback:function(e){xe(),ge(),mt(pt),null!==e&&void 0!==e&&e.block&&_n(null===e||void 0===e?void 0:e.block)},onErrorCallback:function(e,n){return jn({errors:n,response:e})}})}}),ur=(0,r.Z)(ir,1)[0],lr="CodeBlock/".concat(qn),cr=(0,Ye.y)(),ar=cr.registerOnKeyDown,sr=cr.unregisterOnKeyDown;(0,c.useEffect)((function(){return function(){sr(lr)}}),[sr,lr]),ar(lr,(function(e,n){pe&&!F||vn&&!We&&((0,Ke.y)([ue.zX,ue.Uq],n)||(0,Ke.y)([ue.PQ,ue.Uq],n)?Do({block:H}):(0,Ke.y)([ue.XR,ue.Uq],n)&&y&&(e.preventDefault(),y({language:Gn,type:zn,upstream_blocks:[qn]}),Do({block:H})))}),[y,H,We,Do,vn,ur]),(0,c.useEffect)((function(){var e;return $t&&(e=setInterval((function(){return bt(Number(new Date))}),1e3)),ht&&!No&&clearInterval(e),function(){return clearInterval(e)}}),[ht,No,$t]);var dr=(0,c.useCallback)((function(e){var n,t=(n={},(0,i.Z)(n,S.tf.CUSTOM,Object.values(S.Lq).reduce((function(n,t){return(null===e||void 0===e?void 0:e.color)!==t&&n.push({label:function(){return(0,j.jsx)(O.Z,{alignItems:"center",children:(0,j.jsxs)(g.ZP,{noWrapping:!0,children:["Change color to ",(0,j.jsx)(g.ZP,{color:(0,x.qn)(S.tf.CUSTOM,{blockColor:t}).accent,inline:!0,children:t})]})})},onClick:function(){ur({block:qe(qe({},e),{},{color:t})})},uuid:t}),n}),[])),(0,i.Z)(n,S.tf.SCRATCHPAD,(0,o.Z)((0,ce.Ts)(e,V,"block_menu/scratchpad",y)).map((function(e){return qe(qe({},e),{},{onClick:function(){return mn().then((function(){return e.onClick()}))}})}))),n);return t[e.type]}),[y,V,mn,ur]),fr=(0,c.useMemo)((function(){return Kn&&(null===Ro||void 0===Ro?void 0:Ro[Kn])}),[Ro,Kn]),pr=(0,c.useMemo)((function(){if(Kn&&!Pt)return null;if(S.tf.GLOBAL_DATA_PRODUCT===zn){var e=null===$n||void 0===$n?void 0:$n[null===Jn||void 0===Jn?void 0:Jn.uuid];return(0,j.jsxs)(x.y9,{children:[(0,j.jsxs)(b.Z,{mb:B.cd,mt:1,children:[(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"UUID"}),(0,j.jsx)(g.ZP,{monospace:!0,children:null===e||void 0===e?void 0:e.uuid})]}),(0,j.jsxs)(b.Z,{mb:B.cd,children:[(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:(0,U.kC)((null===e||void 0===e?void 0:e.object_type)||"")}),(0,j.jsx)(l(),{as:"/pipelines/".concat(null===e||void 0===e?void 0:e.object_uuid,"/edit"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,j.jsx)(X.Z,{monospace:!0,openNewWindow:!0,children:null===e||void 0===e?void 0:e.object_uuid})})]}),(0,j.jsxs)(b.Z,{mb:1,children:[(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"Override global data product settings"}),(0,j.jsx)(X.Z,{monospace:!0,onClick:function(){return an(Z.cH.BLOCK_SETTINGS)},children:"Customize block settings"})]})]})}var n,t;return Pt&&S.t6.PYTHON!==Gn||(n=(0,j.jsx)(w.Z,{autoHeight:!0,autocompleteProviders:rt,block:H,height:Oe,language:Gn,onChange:function(e){mt(e),null===un||void 0===un||un(e)},onDidChangeCursorPosition:Lo,placeholder:S.tf.DBT===zn&&S.t6.YAML===Gn?"e.g. --select ".concat(ho||"project","/models --exclude ").concat(ho||"project","/models/some_dir"):"Start typing here...",selected:vn,setSelected:On,setTextareaFocused:En,shortcuts:We?[]:[function(e,n){return(0,Fe.Q)(e,(function(){We||Do({block:H,code:n.getValue()})}))}],textareaFocused:An,value:pt,width:"100%"}),t=Fn&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(ve.Z,{}),(0,j.jsxs)(b.Z,{mt:1,children:[(0,j.jsxs)(x.y9,{normalPadding:!0,children:[(0,j.jsx)(g.ZP,{small:!0,children:"Callback block: define @on_success or @on_failure callbacks for this block."}),(0,j.jsxs)(g.ZP,{monospace:!0,muted:!0,small:!0,children:["kwargs",(0,j.jsx)(g.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:" \u2192 "}),"global variables"]})]}),(0,j.jsx)(w.Z,{autoHeight:!0,autocompleteProviders:rt,language:"python",onChange:function(e){yo(e),null===rn||void 0===rn||rn(e)},onDidChangeCursorPosition:Lo,placeholder:"Start typing here...",selected:vn,setSelected:On,setTextareaFocused:En,textareaFocused:An,value:Eo,width:"100%"})]})]})),Pt?(0,j.jsx)(Ee,{block:H,blocksMapping:Ro,blockContent:pt,callbackEl:t,codeEditor:n,onChangeBlock:function(e){return ur({block:e})},openSidekickView:an,savePipelineContent:mn,showDataIntegrationModal:Tn}):(0,j.jsxs)(j.Fragment,{children:[n,t]})}),[rt,H,Gn,zn,Ro,Eo,pt,ho,Jn,$n,Fn,Oe,We,Pt,rn,un,Lo,an,Kn,Do,vn,mt,On,En,An]);(0,c.useEffect)((function(){G&&it({python:(0,Ne.Z)({autocompleteItems:G,block:H,blocks:V,pipeline:sn})})}),[G,H,V,sn]);var mr=(0,c.useMemo)((function(){return Tt?(0,j.jsx)(b.Z,{py:1,children:(0,j.jsx)(A.Z,{onClickTab:function(e){uo(e),ie.gM.uuid!==e.uuid&&ie.Jt.uuid!==e.uuid||or()},selectedTabUUID:null===io||void 0===io?void 0:io.uuid,small:!0,tabs:(0,ie.Xy)(H)})}):null}),[H,or,Tt,io]),vr=(0,c.useMemo)((function(){return(0,j.jsx)(j.Fragment,{children:(0,j.jsx)(D.Z,qe(qe({},Jo),{},{block:H,blockMetadata:rr,buttonTabs:mr,collapsed:Qt,hasOutput:Ho,isInProgress:No,mainContainerWidth:en,messages:Bo,messagesAll:to,openSidekickView:an,pipeline:sn,runCount:Yt,runEndTime:Vt,runStartTime:$t,selected:vn,selectedTab:io,setCollapsed:function(e){Kt((function(){return(0,Ge.t8)(Ao,e),e}))},setErrors:jn,setOutputBlocks:Cn,setSelectedOutputBlock:Zn,setSelectedTab:uo}))})}),[H,rr,Jo,mr,Ho,No,en,to,Bo,an,Qt,Ao,sn,Yt,Vt,$t,vn,io,jn,Cn,Kt,Zn]),hr=(0,c.useCallback)((function(){return ct(!1)}),[]),br=(0,c.useRef)(null),gr=(0,c.useCallback)((function(e){clearTimeout(br.current),Nt((function(n){return qe(qe({},n),e)})),br.current=setTimeout((function(){var n=qe(qe({},Dt),e);("undefined"!==typeof n[M.cH]&&"undefined"!==n[M.sc]||"undefined"!==typeof n[M.Mv]||"undefined"!==typeof n[M.eW]||"undefined"!==typeof n[M.mW])&&mn({block:{configuration:n,uuid:qn}})}),1e3)}),[qn,Dt,mn]),xr=Le.zJ.BIGQUERY===Dt[M.cH]||Le.zJ.SNOWFLAKE===Dt[M.cH],jr=(0,c.useMemo)((function(){return(null===V||void 0===V?void 0:V.length)||0}),[V]),Cr=(0,c.useMemo)((function(){return pt?(0,j.jsx)(Te.Z,{children:pt}):(0,j.jsx)(b.Z,{px:1,children:(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,children:"Double-click to edit"})})}),[pt]);(0,c.useEffect)((function(){At&&Ft&&!vn&&Gt(!1)}),[Ft,At,vn]);var Or=(0,c.useMemo)((function(){return(0,j.jsx)(Ae.Z,{compact:!0,monospace:!0,onBlur:function(){return setTimeout((function(){bn(!1)}),300)},onChange:function(e){bn(!0),gr((0,i.Z)({},M.mW,+e.target.value)),e.preventDefault()},onClick:Pe.j,onFocus:function(){bn(!0)},small:!0,type:"number",value:Dt[M.mW]||"",width:11*B.iI})}),[Dt,bn,gr]),_r=(0,c.useMemo)((function(){if(wn)return null===K||void 0===K?void 0:K.map((function(e,n){return(0,j.jsx)("div",{children:(0,j.jsx)(I.Z,{blockInteraction:e,contained:!0,containerRef:J,containerWidth:en,interaction:null===Xe||void 0===Xe?void 0:Xe[null===e||void 0===e?void 0:e.uuid],setVariables:_t,showVariableUUID:!0,variables:Ot})},"".concat(null===e||void 0===e?void 0:e.uuid,"-").concat(n))}))}),[K,J,Xe,wn,en,_t,Ot]),Zr=(0,c.useMemo)((function(){return wn&&null!==K&&void 0!==K&&K.length?(0,j.jsx)(x.HS,{children:(0,j.jsx)(b.Z,{px:B.cd,children:(0,j.jsx)(A.Z,{noPadding:!0,onClickTab:function(e){var n=e.uuid;return jt(n)},selectedTabUUID:xt,tabs:ie.C4,underlineColor:(0,x.qn)(null===H||void 0===H?void 0:H.type,{blockColor:null===H||void 0===H?void 0:H.color,theme:Rn}).accent,underlineStyle:!0})})}):null}),[H,K,wn,xt,jt,Rn]),Er=(0,c.useMemo)((function(){if(!wn)return null;var e=[],n={};if(null===K||void 0===K||K.forEach((function(t){var o=t.uuid,r=null===Xe||void 0===Xe?void 0:Xe[o],i=null===r||void 0===r?void 0:r.variables;Object.keys(i||{}).forEach((function(t){null!==n&&void 0!==n&&n[t]||(e.push(t),n[t]=!0)}))})),null===e||void 0===e||!e.length)return null;var t=(null===e||void 0===e?void 0:e.length)||0;return(0,j.jsxs)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"Interaction variables:"}),(0,j.jsx)(b.Z,{mr:B.cd}),null===e||void 0===e?void 0:e.map((function(e,n){return(0,j.jsx)(b.Z,{mr:1,children:(0,j.jsxs)(g.ZP,{default:!0,monospace:!0,small:!0,children:[e,t>=2&&n<t-1&&(0,j.jsx)(g.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:","})]})},e)}))]})}),[K,Xe,wn]);return(0,j.jsx)("div",{ref:po,children:(0,j.jsxs)("div",{ref:n,style:{position:"relative",zIndex:Q===k?jr+9:null},children:[(0,j.jsxs)("div",{style:{position:"relative"},children:[(0,j.jsx)(x.nz,qe(qe({},qe(qe({},Jo),ao)),{},{onClick:function(){return er()},ref:fe?null:so,zIndex:jr+1-(Q||0),children:(0,j.jsxs)(h.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,j.jsxs)(O.Z,{alignItems:"center",flex:1,children:[(0,j.jsxs)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(m.Z,{monospace:!0,children:S.tf.GLOBAL_DATA_PRODUCT===(null===H||void 0===H?void 0:H.type)?"GDP":S.dO[Gn]}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(R.Z,{color:Qo,size:1.5*B.iI,square:!0}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(W.Z,{items:dr(H),onClickCallback:hr,onClickOutside:hr,open:lt,parentRef:Po,uuid:"CodeBlock/block_menu",children:(0,j.jsx)(g.ZP,{color:Qo,monospace:!0,noWrapping:!0,children:null===(u=Tt?S.tf.DBT:S.V4[zn])||void 0===u?void 0:u.toUpperCase()})}),!we&&[S.tf.CUSTOM,S.tf.SCRATCHPAD].includes(zn)&&(0,j.jsxs)(j.Fragment,{children:["\xa0",(0,j.jsx)(v.Z,{basic:!0,iconOnly:!0,noPadding:!0,onClick:function(){return ct(!0)},transparent:!0,children:(0,j.jsx)(re.K5,{muted:!0})})]})]}),!we&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{mr:B.cd}),(0,j.jsx)(re.iU,{size:1.5*B.iI}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsxs)(h.ZP,{alignItems:"center",children:[Tt&&S.t6.YAML!==Gn&&(0,j.jsx)(ee.Z,{block:!0,label:(0,He.$1)(H,{fullPath:!0}),size:null,children:(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,children:(0,He.$1)(H)})}),(!Tt||S.t6.YAML===Gn)&&(0,j.jsx)(X.Z,{default:!0,monospace:!0,noWrapping:!0,onClick:function(){return Sn(H,Hn)},preventDefault:!0,sameColorAsText:!0,children:qn})]}),(0,j.jsx)(b.Z,{mr:2}),!S.iZ.includes(zn)&&en>800&&(0,j.jsx)(ee.Z,{appearBefore:!0,block:!0,label:"\n ".concat((0,U._6)("parent block",Ko),". ").concat(0===Ko?"Click to select 1 or more blocks to depend on.":"Edit parent blocks.","\n "),size:null,widthFitContent:Ko>=1,children:(0,j.jsx)(v.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){On(!0),xn({upstreamBlocks:{block:H,values:null===Wn||void 0===Wn?void 0:Wn.map((function(e){return{uuid:e}}))}})},children:(0,j.jsxs)(h.ZP,{alignItems:"center",children:[0===Ko&&(0,j.jsx)(re.Jj,{size:3*B.iI}),Ko>=1&&(0,j.jsx)(re.eV,{size:3*B.iI}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsxs)(g.ZP,{default:!0,monospace:Ko>=1,noWrapping:!0,small:!0,underline:0===Ko,children:[0===Ko&&"Edit parents",Ko>=1&&(0,U._6)("parent",Ko)]})]})})}),Xn>=2&&en>725&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{ml:2}),(0,j.jsx)(ee.Z,{block:!0,label:"This block is used in ".concat(Xn," pipelines."),size:null,widthFitContent:!0,children:(0,j.jsxs)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(re.BG,{size:14}),(0,j.jsx)(b.Z,{ml:1}),(0,j.jsxs)(X.Z,{default:!0,monospace:!0,noWrapping:!0,onClick:function(){return an(Z.cH.BLOCK_SETTINGS)},preventDefault:!0,small:!0,children:[Xn," pipelines"]})]})})]})]})]}),fn&&(0,j.jsx)(me,{addNewBlock:y,addWidget:N,block:H,blockContent:pt,blocks:V,deleteBlock:de,executionState:he,fetchFileTree:ge,fetchPipeline:xe,hideExtraButtons:_e,interruptKernel:Je,isEditingBlock:Ft,openSidekickView:an,pipeline:sn,project:dn,runBlock:We?null:Do,savePipelineContent:mn,setBlockContent:function(e){mt(e),null===un||void 0===un||un(e)},setErrors:jn,setIsEditingBlock:Gt,setOutputCollapsed:Kt,showConfigureProjectModal:kn}),!_e&&(0,j.jsx)(b.Z,{px:1,children:(0,j.jsx)(v.Z,{basic:!0,iconOnly:!0,noPadding:!0,onClick:function(){dt((function(e){return(0,Ge.t8)(So,!e),!e})),st||Kt((function(){return(0,Ge.t8)(Ao,!0),!0}))},transparent:!0,children:st?(0,j.jsx)(re._M,{muted:!0,size:2*B.iI}):(0,j.jsx)(re.Kh,{muted:!0,size:2*B.iI})})})]})})),(0,j.jsxs)(x.Nk,{onClick:function(){return er()},children:[(0,j.jsxs)(x.jv,qe(qe({},Jo),{},{className:vn&&An?"selected":null,hasOutput:!!mr||Ho,lightBackground:At&&!Ft,noPadding:!0,onClick:er,onDoubleClick:function(){At&&!Ft&&Gt(!0)},children:[(0,j.jsx)(x.PB,{}),!Re&&S.tf.DBT===zn&&!st&&(0,j.jsxs)(x.y9,{normalPadding:!0,children:[(0,j.jsxs)(h.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,j.jsxs)(O.Z,{alignItems:"center",children:[S.t6.YAML===Gn&&(0,j.jsx)(Se.Z,{compact:!0,monospace:!0,onBlur:function(){return setTimeout((function(){bn(!1)}),300)},onChange:function(e){var n;gr((n={},(0,i.Z)(n,M.Mv,""),(0,i.Z)(n,M.eW,e.target.value),n)),e.preventDefault()},onClick:Pe.j,onFocus:function(){bn(!0)},placeholder:"Project",small:!0,value:Dt[M.eW]||"",children:Object.keys(vo||{}).map((function(e){return(0,j.jsx)("option",{value:e,children:e},e)}))}),S.t6.YAML!==Gn&&(0,j.jsx)(g.ZP,{monospace:!0,small:!0,children:ho}),(0,j.jsx)(b.Z,{mr:2}),(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"Target"}),(0,j.jsx)("span",{children:"\xa0"}),!Oo&&(0,j.jsx)(Se.Z,{compact:!0,disabled:!ho,monospace:!0,onBlur:function(){return setTimeout((function(){bn(!1)}),300)},onChange:function(e){gr((0,i.Z)({},M.Mv,e.target.value)),e.preventDefault()},onClick:Pe.j,onFocus:function(){bn(!0)},placeholder:jo,small:!0,value:xo||"",children:null===go||void 0===go?void 0:go.map((function(e){return(0,j.jsx)("option",{value:e,children:e},e)}))}),Oo&&(0,j.jsx)(Ae.Z,{compact:!0,monospace:!0,onBlur:function(){return setTimeout((function(){bn(!1)}),300)},onChange:function(e){gr((0,i.Z)({},M.Mv,e.target.value)),e.preventDefault()},onClick:Pe.j,onFocus:function(){bn(!0)},placeholder:ho?(null===bo||void 0===bo?void 0:bo.target)||"Enter target":"Select project first",small:!0,value:xo||"",width:21*B.iI}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(h.ZP,{alignItems:"center",children:(0,j.jsx)(ee.Z,{block:!0,description:(0,j.jsxs)(g.ZP,{default:!0,inline:!0,children:["Manually type the name of the target you want to use in the profile.",(0,j.jsx)("br",{}),"Interpolate environment variables and global variables using the following syntax:",(0,j.jsx)("br",{}),(0,j.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:"{{ env_var('NAME') }}"})," or ",(0,j.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:"{{ variables('NAME') }}"})]}),size:null,widthFitContent:!0,children:(0,j.jsxs)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(P.Z,{checked:Oo,label:(0,j.jsx)(g.ZP,{muted:!0,small:!0,children:"Manually enter target"}),onClick:function(e){(0,Pe.j)(e),_o(!Oo),Oo&&gr((0,i.Z)({},M.Mv,null))}}),(0,j.jsx)("span",{children:"\xa0"}),(0,j.jsx)(re.kI,{muted:!0})]})})})]}),S.t6.YAML!==Gn&&!(null!==mo&&void 0!==mo&&null!==(C=mo.block)&&void 0!==C&&C.snapshot)&&(0,j.jsxs)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(ee.Z,{appearBefore:!0,block:!0,description:(0,j.jsxs)(g.ZP,{default:!0,inline:!0,children:["Limit the number of results that are returned",(0,j.jsx)("br",{}),"when running this block in the notebook.",(0,j.jsx)("br",{}),"This limit won\u2019t affect the number of results",(0,j.jsx)("br",{}),"returned when running the pipeline end-to-end."]}),size:null,widthFitContent:!0,children:(0,j.jsxs)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(re.kI,{muted:!0}),(0,j.jsx)("span",{children:"\xa0"}),(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"Sample limit"}),(0,j.jsx)("span",{children:"\xa0"})]})}),Or,(0,j.jsx)(b.Z,{mr:1})]})]}),S.t6.YAML===Gn&&(0,j.jsx)(b.Z,{mt:1,children:(0,j.jsxs)(h.ZP,{alignItems:"center",children:[(0,j.jsxs)(O.Z,{alignItems:"center",flex:1,children:[(0,j.jsx)(g.ZP,{default:!0,monospace:!0,small:!0,children:"dbt"}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(Ae.Z,{compact:!0,monospace:!0,onBlur:function(){return setTimeout((function(){bn(!1)}),300)},onChange:function(e){gr((0,i.Z)({},M.Pi,qe(qe({},null===Dt||void 0===Dt?void 0:Dt[M.Pi]),{},(0,i.Z)({},M.pA,e.target.value)))),e.preventDefault()},onClick:Pe.j,onFocus:function(){bn(!0)},placeholder:"command",small:!0,value:(null===Dt||void 0===Dt||null===(_=Dt[M.Pi])||void 0===_?void 0:_[M.pA])||"",width:10*B.iI}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(g.ZP,{monospace:!0,small:!0,children:"[type your --select and --exclude syntax below]"}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsxs)(g.ZP,{monospace:!0,muted:!0,small:!0,children:["(paths start from ",(null===Dt||void 0===Dt?void 0:Dt[M.eW])||"project"," folder)"]})]}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(g.ZP,{muted:!0,small:!0,children:(0,j.jsx)(X.Z,{href:"https://docs.getdbt.com/reference/node-selection/syntax#examples",openNewWindow:!0,small:!0,children:"Examples"})}),(0,j.jsx)(b.Z,{mr:1})]})})]}),!Re&&It&&!st&&S.tf.DBT!==zn&&(0,j.jsx)(x.y9,{normalPadding:!0,children:(0,j.jsxs)(h.ZP,{flexWrap:"wrap",style:{marginTop:"-8px"},children:[(0,j.jsxs)(h.ZP,{style:{marginTop:"8px"},children:[(0,j.jsx)(Se.Z,{compact:!0,label:"Connection",onChange:function(e){return gr((0,i.Z)({},M.cH,e.target.value))},onClick:Pe.j,small:!0,value:Dt[M.cH],children:null===$||void 0===$?void 0:$.map((function(e){var n=e.id,t=e.value;return(0,j.jsx)("option",{value:t,children:n},n)}))}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(Se.Z,{compact:!0,label:"Profile",onChange:function(e){return gr((0,i.Z)({},M.sc,e.target.value))},onClick:Pe.j,small:!0,value:Dt[M.sc],children:null===Io||void 0===Io?void 0:Io.map((function(e){return(0,j.jsx)("option",{value:e,children:e},e)}))}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(h.ZP,{alignItems:"center",children:(0,j.jsx)(ee.Z,{block:!0,description:(0,j.jsxs)(g.ZP,{default:!0,inline:!0,children:["If checked, you\u2019ll have to write your own custom",(0,j.jsx)("br",{}),"CREATE TABLE commands and INSERT commands.",(0,j.jsx)("br",{}),"Separate your commands using a semi-colon: ",(0,j.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:";"})]}),size:null,widthFitContent:!0,children:(0,j.jsxs)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(P.Z,{checked:Dt[M.Mi],label:(0,j.jsx)(g.ZP,{muted:!0,small:!0,children:"Use raw SQL"}),onClick:function(e){(0,Pe.j)(e),gr((0,i.Z)({},M.Mi,!Dt[M.Mi]))}}),(0,j.jsx)("span",{children:"\xa0"}),(0,j.jsx)(re.kI,{muted:!0})]})})}),!Dt[M.Mi]&&(0,j.jsxs)(j.Fragment,{children:[xr&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(h.ZP,{alignItems:"center",children:(0,j.jsx)(Ae.Z,{compact:!0,label:"Database",monospace:!0,onBlur:function(){return setTimeout((function(){bn(!1)}),300)},onChange:function(e){gr((0,i.Z)({},M.Sv,e.target.value)),e.preventDefault()},onClick:Pe.j,onFocus:function(){bn(!0)},small:!0,value:Dt[M.Sv],width:10*B.iI})})]}),(0,j.jsx)(b.Z,{mr:1}),![ye.CLICKHOUSE,ye.MYSQL].includes(Dt[M.cH])&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(ee.Z,{block:!0,description:(0,j.jsxs)(g.ZP,{default:!0,inline:!0,children:["Schema that is used when creating a table and inserting values.",(0,j.jsx)("br",{}),"This field is required."]}),size:null,widthFitContent:!0,children:(0,j.jsx)(h.ZP,{alignItems:"center",children:(0,j.jsx)(Ae.Z,{compact:!0,label:"Schema",monospace:!0,onBlur:function(){return setTimeout((function(){bn(!1)}),300)},onChange:function(e){gr((0,i.Z)({},M.BD,e.target.value)),e.preventDefault()},onClick:Pe.j,onFocus:function(){bn(!0)},small:!0,value:Dt[M.BD],width:10*B.iI})})}),(0,j.jsx)(b.Z,{mr:1})]}),(0,j.jsx)(ee.Z,{block:!0,description:(0,j.jsxs)(g.ZP,{default:!0,inline:!0,children:["This value will be used as the table name.",(0,j.jsx)("br",{}),"If blank, the default table name will be:",(0,j.jsx)("br",{}),(0,j.jsxs)(g.ZP,{inline:!0,monospace:!0,children:[yt,"_",qn]}),(0,j.jsx)("br",{}),"This field is optional."]}),size:null,widthFitContent:!0,children:(0,j.jsx)(h.ZP,{alignItems:"center",children:(0,j.jsx)(Ae.Z,{compact:!0,label:"Table (optional)",monospace:!0,onBlur:function(){return setTimeout((function(){bn(!1)}),300)},onChange:function(e){gr((0,i.Z)({},M.m$,e.target.value)),e.preventDefault()},onClick:Pe.j,onFocus:function(){bn(!0)},small:!0,value:Dt[M.m$],width:20*B.iI})})})]}),(0,j.jsx)(b.Z,{mr:1})]}),!Dt[M.Mi]&&(0,j.jsxs)(h.ZP,{alignItems:"center",style:{marginTop:"8px"},children:[(0,j.jsx)(ee.Z,{block:!0,description:(0,j.jsxs)(g.ZP,{default:!0,inline:!0,children:["Limit the number of results that are returned",(0,j.jsx)("br",{}),"when running this block in the notebook.",(0,j.jsx)("br",{}),"This limit won\u2019t affect the number of results",(0,j.jsx)("br",{}),"returned when running the pipeline end-to-end."]}),size:null,widthFitContent:!0,children:(0,j.jsxs)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(re.kI,{muted:!0}),(0,j.jsx)("span",{children:"\xa0"}),(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"Limit"}),(0,j.jsx)("span",{children:"\xa0"})]})}),Or,(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(ee.Z,{autoWidth:!0,block:!0,description:(0,j.jsxs)(g.ZP,{default:!0,inline:!0,children:["How do you want to handle existing data with the same",xr?" database,":""," schema, and table name?",(0,j.jsx)("br",{}),(0,j.jsx)(g.ZP,{bold:!0,inline:!0,monospace:!0,children:"Append"}),": add rows to the existing table.",(0,j.jsx)("br",{}),(0,j.jsx)(g.ZP,{bold:!0,inline:!0,monospace:!0,children:"Replace"}),": delete the existing data.",(0,j.jsx)("br",{}),(0,j.jsx)(g.ZP,{bold:!0,inline:!0,monospace:!0,children:"Fail"}),": raise an error during execution."]}),size:null,widthFitContent:!0,children:(0,j.jsxs)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(re.kI,{muted:!0}),(0,j.jsx)("span",{children:"\xa0"}),(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"Write policy:"}),(0,j.jsx)("span",{children:"\xa0"}),(0,j.jsx)(Se.Z,{compact:!0,label:"strategy",onChange:function(e){return gr((0,i.Z)({},M.nq,e.target.value))},onClick:Pe.j,small:!0,value:Dt[M.nq],children:null===ke||void 0===ke?void 0:ke.map((function(e){return(0,j.jsx)("option",{value:e,children:(0,U.kC)(e)},e)}))})]})}),(0,j.jsx)(b.Z,{mr:1})]}),(null===Dt||void 0===Dt?void 0:Dt[M.cH])===ye.TRINO&&Wn.length>=1&&(0,j.jsxs)(h.ZP,{alignItems:"center",style:{marginTop:"8px"},children:[(0,j.jsx)(ee.Z,{appearBefore:!0,block:!0,description:(0,j.jsxs)(g.ZP,{default:!0,inline:!0,children:["If checked, upstream blocks that aren\u2019t SQL blocks",(0,j.jsx)("br",{}),"will have their data exported into a table that is",(0,j.jsx)("br",{}),"uniquely named upon each block run. For example,",(0,j.jsx)("br",{}),(0,j.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:"[pipeline_uuid]_[block_uuid]_[unique_timestamp]"}),"."]}),size:null,widthFitContent:!0,children:(0,j.jsxs)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(P.Z,{checked:Dt[M.bk],label:(0,j.jsx)(g.ZP,{muted:!0,small:!0,children:"Unique upstream table names"}),onClick:function(e){(0,Pe.j)(e),gr((0,i.Z)({},M.bk,!Dt[M.bk]))}}),(0,j.jsx)("span",{children:"\xa0"}),(0,j.jsx)(re.kI,{muted:!0})]})}),(0,j.jsx)(b.Z,{mr:1})]})]})}),$o.length>=1&&(0,j.jsx)(x.HS,{children:(0,j.jsx)(b.Z,{p:1,children:(0,j.jsx)(h.ZP,{children:$o.map((function(e,n){var t=e.description,o=e.title;return(0,j.jsx)(b.Z,{ml:n>=1?1:0,children:(0,j.jsx)(ee.Z,{block:!0,description:t,size:null,widthFitContent:!0,children:(0,j.jsx)(m.Z,{children:o})})},o)}))})})}),Zr,Wn.length>=1&&!st&&S.f2.includes(zn)&&!kt&&!Kn&&!Pt&&(!xt||xt===ie.zr.uuid)&&(0,j.jsxs)(x.y9,{noMargin:!0,normalPadding:!0,children:[(0,j.jsx)(b.Z,{mr:1,pt:1,children:(0,j.jsxs)(g.ZP,{muted:!0,small:!0,children:[!It&&"Positional arguments for ".concat(St?"":"decorated ","function:"),It&&(0,j.jsxs)(j.Fragment,{children:["The interpolated tables below are available in queries from upstream blocks.",(0,j.jsx)("br",{}),"Example: ",(0,j.jsx)(g.ZP,{inline:!0,monospace:!0,small:!0,children:"SELECT * FROM {{ df_1 }}"})," to insert all rows from ",(0,j.jsx)(g.ZP,{inline:!0,monospace:!0,small:!0,children:null===Wn||void 0===Wn?void 0:Wn[0]})," into a table."]})]})}),(0,j.jsxs)(b.Z,{mt:1,children:[!It&&!St&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(g.ZP,{monospace:!0,muted:!0,small:!0,children:[S.tf.DATA_EXPORTER===zn&&"@data_exporter",S.tf.DATA_LOADER===zn&&"@data_loader",S.tf.TRANSFORMER===zn&&"@transformer",S.tf.CUSTOM===zn&&"@custom"]}),(0,j.jsxs)(g.ZP,{monospace:!0,muted:!0,small:!0,children:["def ",(S.tf.DATA_EXPORTER===zn?"export_data":S.tf.DATA_LOADER===zn&&"load_data")||S.tf.TRANSFORMER===zn&&"transform"||S.tf.CUSTOM===zn&&"transform_custom","(",Wn.map((function(e,n){return n>=1?"data_".concat(n+1):"data"})).join(", "),"):"]})]}),St&&(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)(g.ZP,{monospace:!0,muted:!0,small:!0,children:[S.tf.DATA_EXPORTER===zn?"export_data":S.tf.TRANSFORMER===zn&&"transform","\xa0\u2190 function(",Wn.map((function(e,n){return"df_".concat(n+1)})).join(", "),"):"]})}),It&&(null===Wn||void 0===Wn?void 0:Wn.length)>=1&&(0,j.jsx)(De,{block:H,blockConfiguration:Dt,blockRefs:z,blocks:null===Wn||void 0===Wn?void 0:Wn.map((function(e){return null===Ro||void 0===Ro?void 0:Ro[e]})),updateBlockConfiguration:gr}),!It&&Wn.map((function(e,n){var t=Ro[e],o=(0,x.qn)(null===t||void 0===t?void 0:t.type,{blockColor:null===t||void 0===t?void 0:t.color,theme:Rn}).accent,r="{{ df_".concat(n+1," }}");return(0,j.jsxs)("div",{children:[!It&&!St&&(0,j.jsxs)(g.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:["\xa0\xa0\xa0\xa0data",n>=1?"_".concat(n+1):null]}),It&&(0,j.jsx)(g.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:r}),St&&(0,j.jsxs)(g.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:["\xa0\xa0\xa0\xa0","df".concat(n+1)]})," ",(0,j.jsx)(g.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:"\u2192"})," ",(0,j.jsx)(X.Z,{color:o,onClick:function(){var e,n,o=null===z||void 0===z||null===(e=z.current)||void 0===e?void 0:e["".concat(null===t||void 0===t?void 0:t.type,"s/").concat(null===t||void 0===t?void 0:t.uuid,".py")];null===o||void 0===o||null===(n=o.current)||void 0===n||n.scrollIntoView()},preventDefault:!0,small:!0,children:(0,j.jsx)(g.ZP,{color:o,inline:!0,monospace:!0,small:!0,children:e})})]},e)}))]})]}),(!xt||xt===ie.zr.uuid)&&!st&&Er&&(0,j.jsx)(x.HS,{darkBorder:!0,noBackground:!0,children:(0,j.jsx)(b.Z,{p:1,children:Er})}),ie.aj.uuid===xt&&!st&&(0,j.jsx)(j.Fragment,{children:_r}),!Un&&(!xt||ie.zr.uuid===xt)&&(0,j.jsx)(j.Fragment,{children:st?(0,j.jsx)(b.Z,{p:1,children:(0,j.jsxs)(g.ZP,{monospace:!0,muted:!0,children:["(",(0,U._6)("line",null===pt||void 0===pt?void 0:pt.split(/\r\n|\r|\n/).length)," collapsed)"]})}):!At||Ft?fr&&!Pt?(0,j.jsx)(b.Z,{px:1,children:(0,j.jsxs)(g.ZP,{monospace:!0,muted:!0,children:["Replicated from block ",(0,j.jsx)(X.Z,{color:(0,x.qn)(null===fr||void 0===fr?void 0:fr.type,{blockColor:null===fr||void 0===fr?void 0:fr.color,theme:Rn}).accent,onClick:function(e){var n,t;(0,Pe.j)(e);var o=null===z||void 0===z||null===(n=z.current)||void 0===n?void 0:n["".concat(null===fr||void 0===fr?void 0:fr.type,"s/").concat(null===fr||void 0===fr?void 0:fr.uuid,".py")];null===o||void 0===o||null===(t=o.current)||void 0===t||t.scrollIntoView()},preventDefault:!0,children:(0,j.jsx)(g.ZP,{color:(0,x.qn)(null===fr||void 0===fr?void 0:fr.type,{blockColor:null===fr||void 0===fr?void 0:fr.color,theme:Rn}).accent,inline:!0,monospace:!0,children:null===fr||void 0===fr?void 0:fr.uuid})})]})}):(0,j.jsx)(b.Z,{py:B.cd,children:pr}):Cr}),be&&c.cloneElement(be,{runBlockAndTrack:Do}),Un&&(0,j.jsxs)(b.Z,{p:B.cd,children:[(0,j.jsx)(g.ZP,{bold:!0,danger:!0,children:null===Un||void 0===Un?void 0:Un.error}),(0,j.jsx)(g.ZP,{muted:!0,children:null===Un||void 0===Un?void 0:Un.message})]}),No&&ht&&ht>$t&&(0,j.jsx)(x.HC,{children:(0,j.jsxs)(g.ZP,{muted:!0,children:["".concat(Math.round((ht-$t)/1e3)),"s"]})}),!st&&![S.tf.CALLBACK,S.tf.CONDITIONAL,S.tf.EXTENSION].includes(zn)&&(0,j.jsx)(T,{block:H,blocks:L,openSidekickView:an,pipeline:sn})]})),vr]})]}),!on&&(0,j.jsxs)(x.gE,{additionalZIndex:jr-Q,onMouseEnter:function(){return tt(!0)},onMouseLeave:function(){tt(!1),null===hn||void 0===hn||hn(null)},children:[nt&&y&&(0,j.jsx)(b.Z,{mt:2,mx:2,style:{width:"100%"},children:(0,j.jsx)(p.Z,{addNewBlock:function(e){var n=e.content,t=e.configuration,o=(0,ce.eY)(H,e),r=(0,ce.fA)(sn,H,e).map((function(e){var n=qe({},Ro[e]||{}),t=n.upstream_blocks;return t&&(n.upstream_blocks=t.filter((function(e){return e!==qn}))),n}));return[S.tf.DATA_LOADER,S.tf.TRANSFORMER].includes(zn)&&S.tf.SCRATCHPAD===e.type&&(n="from mage_ai.data_preparation.variable_manager import get_variable\n\n\n df = get_variable('".concat(yt,"', '").concat(qn,"', 'output_0')")),n=(0,Ue.X7)(e,n),S.t6.SQL===Gn&&(t=qe(qe({},(0,ze.GL)(Vn,[M.cH,M.Sv,M.sc,M.BD,M.nq])),t)),S.t6.SQL===e.language&&(n=(0,Ue.SF)(n)),y(qe(qe({},e),{},{configuration:t,content:n,upstream_blocks:o}),r)},blockIdx:Q,blockTemplates:Y,compact:!0,hideCustom:kt,hideDbt:kt,onClickAddSingleDBTModel:ln,pipeline:sn,project:dn,setAddNewBlockMenuOpenIdx:hn,setCreatingNewDBTModel:gn,showBrowseTemplates:yn,showConfigureProjectModal:kn,showGlobalDataProducts:In})}),(0,j.jsx)(x.t1,{className:"block-divider-inner"})]})]})})}var Je=c.forwardRef(Xe)},84820:function(e,n,t){t.d(n,{Z:function(){return h}});var o,r=t(21831),i=t(44425),u=t(82394),l=t(75582),c=t(17717);!function(e){e.DATA_EXPORTER="data_exporter",e.DATA_LOADER="data_loader",e.MAGE_LIBRARY="mage_library",e.TRANSFORMER="transformer",e.USER_LIBRARY="user_library"}(o||(o={}));var a=t(89209);function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var f=t(86735);function p(e,n){var t=e;t.includes("__init__")||t.push("__init__");var o,r=t.length;return(0,f.w6)(r).forEach((function(e,i){if(o)return o;var u=t.slice(0,r-i).join(c.sep);o=n["".concat(u,".py")]})),o}function m(e,n,t){var o,r,i;return((null===(o=t.outputs)||void 0===o||null===(r=o[0])||void 0===r||null===(i=r.sample_data)||void 0===i?void 0:i.columns)||[]).map((function(t){return{label:"".concat(t," column"),kind:e.languages.CompletionItemKind.Variable,insertText:"'".concat(t,"'"),range:n}}))}function v(e,n){var t=e.word.split(""),o=new RegExp(t.reduce((function(e,n,o){var r=t[o+1],i=r?"^".concat(r):"";return e+"".concat(n,"[w ").concat(i,"]*")}),""));return n.reduce((function(e,n){return n.label.match(o)?e.concat(n):e}),[])}function h(e){var n=e.autocompleteItems,t=e.block,u=e.blocks,s=e.pipeline,h=t.type,b=t.upstream_blocks,g=(0,f.HK)(n,(function(e){return e.id}));return function(t){return function(x,j){var C=[],O=x.getValueInRange({endColumn:j.column,endLineNumber:j.lineNumber,startColumn:1,startLineNumber:1}),_=x.getWordUntilPosition(j),Z=_.endColumn,E=_.startColumn,y={endColumn:Z,endLineNumber:j.lineNumber,startColumn:E,startLineNumber:j.lineNumber},k=function(e,n,t){var o=(0,a.Yn)(e),r=(0,a.M4)(e,n),i=o.find((function(e){var n=e.variableName;return r.match(new RegExp(n))}));if(i){var u=i.assignmentValue,l=(0,a.S0)(e)[u];if(l){var c,s=p(l.split(" as ")[0].replace("from ","").replace("import ","").split(" ").reduce((function(e,n){return n.trim()?e.concat(n):e}),[]).join(".").split("."),t),d=(0,a.rW)(l,u);return null===s||void 0===s||null===(c=s.methods_for_class)||void 0===c?void 0:c[d]}}return[]}(O,y,g);if((null===k||void 0===k?void 0:k.length)>=1){var T=v(_,k.map((function(e){return{filterText:e,insertText:e,kind:t.languages.CompletionItemKind.Method,label:e,range:y}})));if(T.length>=1)return{suggestions:T}}var I=function(e,n,t){var o=(0,a.M4)(e,n);if(o=o.match(/([\w_]+)./)){var r=(0,a.S0)(e)[o[1]];if(r){var i=p(r.split(" as ")[0].replace("from ","").replace("import ","").split(" ").reduce((function(e,n){return n.trim()?e.concat(n):e}),[]).join(".").split("."),t);if(null!==i&&void 0!==i&&i.functions)return null===i||void 0===i?void 0:i.functions}}return[]}(O,y,g);if((null===I||void 0===I?void 0:I.length)>=1){var S=v(_,I.map((function(e){return{filterText:e,insertText:e,kind:t.languages.CompletionItemKind.Function,label:e,range:y}})));if(S.length>=1)return{suggestions:S}}if((null===b||void 0===b?void 0:b.length)>=1){var A=new RegExp("\n@".concat(h));O.match(A)&&C.push.apply(C,(0,r.Z)(v(_,function(e,n,t){var o=t.block,r=t.blocks,i=o.upstream_blocks,u=(0,f.HK)(r,(function(e){return e.uuid}));return i.map((function(t,o){var r=u[t].type,i=0===o?"output_0":"args[".concat(o-1,"]");return{label:"df ".concat(t," ").concat(r," block"),kind:e.languages.CompletionItemKind.Variable,documentation:"Variable for ".concat(r," ").concat(t," data."),insertText:i,range:n}}))}(t,y,e))))}if(_.word.match(/i|f/)){var P=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,t=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,u=(arguments.length>2?arguments[2]:void 0).word,s=new Set,f={};e.forEach((function(e){var n=e.group,t=e.id,r=e.imports;if([o.MAGE_LIBRARY,o.USER_LIBRARY].includes(n)){var i=t;i.match(/__init__.py/)&&(i=i.replace(/\/__init__.py/,"")),i=i.split(".py")[0].replaceAll(c.sep,"."),f[i]=e}var u=t.replace(".py","").replace("/__init__","").split(c.sep);if(1===u.length)s.add("import ".concat(u[0]));else if(u.length>=2){var l=u.slice(0,u.length-1).join(".");s.add("from ".concat(l," import ").concat(u[u.length-1]))}r.forEach((function(e){return s.add(e)}))}));var p,m="i"===u,v="f"===u,h=m?"import":v?"from":"",b=(0,a.M4)(n,i);if(m&&b.match(/from/)&&(p=b.match(/from ([A-Za-z0-9_.]+) /)[1]),p&&f[p]){var g=f[p],x=g.classes,j=g.constants,C=g.files,O=g.functions,_=[];return[[j,t.languages.CompletionItemKind.Constant],[x,t.languages.CompletionItemKind.Class],[O,t.languages.CompletionItemKind.Function]].forEach((function(e){var n=(0,l.Z)(e,2),t=n[0],o=n[1];t.forEach((function(e){_.push({filterText:"import ".concat(e),insertText:"import ".concat(e),kind:o,label:e,range:i})}))})),C.forEach((function(e){var n=e.split(c.sep),o=n[n.length-1].split(".py")[0];_.push({filterText:"import ".concat(o),insertText:"import ".concat(o),kind:t.languages.CompletionItemKind.Variable,label:o,range:i})})),_}return(0,r.Z)(s).map((function(e){return{filterText:e,insertText:e,kind:t.languages.CompletionItemKind.File,label:e,range:i}})).concat(Object.entries(f).map((function(e){var n=(0,l.Z)(e,2),o=n[0];return n[1],{filterText:"".concat(h," ").concat(o),insertText:"".concat(h," ").concat(o," "),kind:t.languages.CompletionItemKind.File,label:"".concat(o),range:d({},i)}})))}(n,O,_,t,y,e);C.push.apply(C,(0,r.Z)(P))}if(i.tf.CHART===h||i.tf.SCRATCHPAD===h){var R=[];if(i.tf.CHART===h?b.forEach((function(e,n){R.push({block:u.find((function(n){var t=n.uuid;return e===t})),matchIndex:0,variableName:"df_".concat(n+1)})})):i.tf.SCRATCHPAD===h&&function(e,n){return e.map((function(e){return{block:e,regex:new RegExp("([\\w_]+)[ ]*=[ ]*get_variable\\('".concat(n.uuid,"', '").concat(e.uuid,"', 'output_0'\\)"),"g")}}))}(u,s).forEach((function(e){var n=e.block,t=e.regex,o=O.matchAll(t);(0,r.Z)(o).forEach((function(e){var t=null===e||void 0===e?void 0:e.index,o=null===e||void 0===e?void 0:e[1];o&&R.push({block:n,matchIndex:t,variableName:o})}))})),R.length>=1){var w,D=null===(w=O.split("\n")[j.lineNumber-1])||void 0===w?void 0:w.slice(0,_.startColumn-1);if(D){var N=[];if(R.forEach((function(e){var n=e.block,o=e.matchIndex,r=e.variableName,i=new RegExp("".concat(r,"\\["));D.match(i)&&N.push({items:m(t,y,n),matchIndex:o})})),N.length>=1)return{suggestions:v(_,(0,f.YC)(N,"matchIndex",{ascending:!1})[0].items)}}}1===E&&(i.tf.CHART===h?C.push.apply(C,(0,r.Z)(v(_,b.map((function(e,n){var o="df_".concat(n+1);return{label:"".concat(o," ").concat(e," block"),kind:t.languages.CompletionItemKind.Snippet,insertText:o,range:y}}))))):i.tf.SCRATCHPAD===h&&C.push.apply(C,(0,r.Z)(v(_,function(e,n,t){var o=t.block,r=t.blocks,u=t.pipeline;return r.reduce((function(t,r){var l=r.type,c=r.uuid;return o.uuid!==c&&[i.tf.DATA_LOADER,i.tf.TRANSFORMER].includes(l)?t.concat({label:"df ".concat(c," ").concat(l," block"),kind:e.languages.CompletionItemKind.Snippet,documentation:"Get the data from ".concat(l," block ").concat(c,"."),insertText:"from mage_ai.data_preparation.variable_manager import get_variable\n\n\ndf = get_variable('".concat(u.uuid,"', '").concat(c,"', 'output_0')\n"),range:n}):t}),[])}(t,y,e)))))}var M=new Set;u.concat({content:O}).forEach((function(e){var n=e.content;(0,r.Z)(n.matchAll("([A-Za-z_0-9]+)","g")).forEach((function(e){return M.add(e[1])}))}));var L=(0,r.Z)(M);if(L.length){var B=L.map((function(e){return{filterText:e,insertText:e,kind:t.languages.CompletionItemKind.Variable,label:e,range:y}}));C.push.apply(C,(0,r.Z)(v(_,B)))}return{suggestions:C}}}}},32929:function(e,n,t){t.d(n,{A2:function(){return h},dP:function(){return b},hS:function(){return j},iK:function(){return g},n9:function(){return v},qy:function(){return x}});var o,r=t(26304),i=t(82394),u=t(13507),l=t(44425),c=t(72473),a=t(57653),s=t(55283),d=["uuid"],f=["uuid"];function p(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function m(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?p(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):p(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var v={uuid:"Blocks"},h={uuid:"Pipelines"},b=[v,h],g=(o={},(0,i.Z)(o,l.tf.CALLBACK,c.AQ),(0,i.Z)(o,l.tf.CHART,c.GQ),(0,i.Z)(o,l.tf.CONDITIONAL,c.hW),(0,i.Z)(o,l.tf.CUSTOM,c.VS),(0,i.Z)(o,l.tf.DATA_EXPORTER,c.zS),(0,i.Z)(o,l.tf.DATA_LOADER,c.rH),(0,i.Z)(o,l.tf.DBT,c.xE),(0,i.Z)(o,l.tf.EXTENSION,c.Bf),(0,i.Z)(o,l.tf.MARKDOWN,c.$B),(0,i.Z)(o,l.tf.SENSOR,c.LM),(0,i.Z)(o,l.tf.TRANSFORMER,c.Sv),o),x=[{Icon:c.zQ,uuid:"All templates"}].concat([{uuid:l.tf.DATA_LOADER},{uuid:l.tf.TRANSFORMER},{selectedIconProps:{inverted:!0},uuid:l.tf.DATA_EXPORTER},{uuid:l.tf.SENSOR},{selectedIconProps:{inverted:!0},uuid:l.tf.CUSTOM},{uuid:l.tf.CHART},{selectedIconProps:{inverted:!0},uuid:l.tf.CALLBACK},{selectedIconProps:{inverted:!0},uuid:l.tf.CONDITIONAL},{uuid:l.tf.EXTENSION},{selectedBackgroundColor:null,uuid:l.tf.DBT},{selectedIconProps:{inverted:!0},uuid:l.tf.MARKDOWN}].map((function(e){var n=e.uuid,t=(0,r.Z)(e,d);return m({Icon:g[n],filterTemplates:function(e){return null===e||void 0===e?void 0:e.filter((function(e){return e.block_type===n}))},label:function(){return l.V4[n]},selectedBackgroundColor:function(e){return(0,s.qn)(n,{theme:e}).accent},uuid:n},t)}))),j=[{Icon:c.zQ,uuid:"All templates"}].concat([{Icon:c.X5,uuid:a.qL.PYTHON},{Icon:c.ZG,uuid:a.qL.INTEGRATION},{Icon:u.Z,uuid:a.qL.STREAMING}].map((function(e){var n=e.uuid,t=(0,r.Z)(e,f);return m({filterTemplates:function(e){return null===e||void 0===e?void 0:e.filter((function(e){var t;return(null===e||void 0===e||null===(t=e.pipeline)||void 0===t?void 0:t.type)===n}))},label:function(){return a.G7[n]},uuid:n},t)})))},84649:function(e,n,t){t.d(n,{EN:function(){return y},FX:function(){return k},HS:function(){return C},Nk:function(){return m},Rd:function(){return p},SL:function(){return E},Tj:function(){return Z},UE:function(){return _},Yf:function(){return h},ZG:function(){return s},bC:function(){return v},n5:function(){return f},n8:function(){return O},w5:function(){return j},wj:function(){return g},wl:function(){return b},ze:function(){return x}});var o=t(38626),r=t(44897),i=t(42631),u=t(46684),l=t(70515),c=t(91437),a=t(47041),s=2.5*l.iI,d=40*l.iI,f=10*l.iI,p=o.default.div.withConfig({displayName:"indexstyle__ContainedStyle",componentId:"sc-8sk2qr-0"})([""," overflow:auto;"," "," ",""],a.w5,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).page,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height-f,"px;\n ")}),(function(e){return e.width&&"\n width: ".concat(e.width-f,"px;\n ")})),m=o.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-8sk2qr-1"})(["height:100%;position:relative;"]),v=o.default.div.withConfig({displayName:"indexstyle__NavigationStyle",componentId:"sc-8sk2qr-2"})(["position:fixed;width:","px;z-index:1;"," "," ",""],d,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).panel,";\n border-right: 1px solid ").concat((e.theme.borders||r.Z.borders).light,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height-f,"px;\n ")}),(function(e){return!e.height&&"\n height: 100%;\n "})),h=o.default.div.withConfig({displayName:"indexstyle__TabsStyle",componentId:"sc-8sk2qr-3"})(["padding-bottom:","px;padding-left:","px;padding-right:","px;padding-top:","px;",""],1*l.iI,l.cd*l.iI,l.cd*l.iI,1*l.iI,(function(e){return"\n border-bottom: 1px solid ".concat((e.theme.borders||r.Z.borders).light,";\n ")})),b=o.default.div.withConfig({displayName:"indexstyle__LinksContainerStyle",componentId:"sc-8sk2qr-4"})([""," overflow:auto;position:fixed;width:","px;",""],a.w5,d,(function(e){return"\n height: calc(100% - ".concat(55+(null!==e&&void 0!==e&&e.contained?f:u.Mz)+((null===e||void 0===e?void 0:e.heightOffset)||0),"px);\n ")})),g=o.default.div.withConfig({displayName:"indexstyle__NavLinkStyle",componentId:"sc-8sk2qr-5"})([""," padding-bottom:","px;padding-left:","px;padding-right:","px;padding-top:","px;&:hover{cursor:pointer;}",""],(0,c.eR)(),1*l.iI,l.cd*l.iI,l.cd*l.iI,1*l.iI,(function(e){return e.selected&&"\n background-color: ".concat((e.theme.background||r.Z.background).codeTextarea,";\n ")})),x=o.default.div.withConfig({displayName:"indexstyle__IconStyle",componentId:"sc-8sk2qr-6"})([""," border-radius:","px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],(0,c.eR)(),i.n_,5*l.iI,1.25*l.iI,1.25*l.iI,5*l.iI,(function(e){return!e.backgroundColor&&"\n background-color: ".concat((e.theme.background||r.Z.background).chartBlock,";\n ")}),(function(e){return e.backgroundColor&&"\n background-color: ".concat(e.backgroundColor,";\n ")})),j=o.default.div.withConfig({displayName:"indexstyle__ContentStyle",componentId:"sc-8sk2qr-7"})(["margin-left:","px;"],d),C=o.default.div.withConfig({displayName:"indexstyle__SubheaderStyle",componentId:"sc-8sk2qr-8"})(["padding:","px;",""],l.cd*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).panel,";\n border-bottom: 1px solid ").concat((e.theme.borders||r.Z.borders).light,";\n ")})),O=o.default.div.withConfig({displayName:"indexstyle__CardsStyle",componentId:"sc-8sk2qr-9"})(["display:flex;flex-wrap:wrap;padding:","px;"],.75*l.iI),_=o.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-8sk2qr-10"})(["border-radius:","px;margin:","px;padding:","px;width:","px;&:hover{cursor:pointer;}",""],i.n_,.75*l.iI,2.5*l.iI,50*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).panel,";\n border: 1px solid ").concat((e.theme.background||r.Z.background).chartBlock,";\n box-shadow: ").concat((e.theme.shadow||r.Z.shadow).frame,";\n ")})),Z=o.default.div.withConfig({displayName:"indexstyle__CardTitleStyle",componentId:"sc-8sk2qr-11"})(["height:","px;"],2.5*l.iI),E=o.default.div.withConfig({displayName:"indexstyle__CardDescriptionStyle",componentId:"sc-8sk2qr-12"})(["height:","px;margin-top:","px;"],2.5*l.iI*2,1*l.iI),y=o.default.div.withConfig({displayName:"indexstyle__TagsStyle",componentId:"sc-8sk2qr-13"})(["height:","px;margin-top:","px;overflow:hidden;"],3.5*l.iI,.5*l.iI),k=o.default.div.withConfig({displayName:"indexstyle__BreadcrumbsStyle",componentId:"sc-8sk2qr-14"})(["padding-bottom:","px;padding-top:","px;",""],1*l.iI,1*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).panel,";\n border-bottom: 1px solid ").concat((e.theme.borders||r.Z.borders).light,";\n ")}))},88328:function(e,n,t){t.d(n,{Z:function(){return B}});var o=t(82394),r=t(75582),i=t(12691),u=t.n(i),l=t(21764),c=t(82684),a=t(69864),s=t(34376),d=t(71180),f=t(90299),p=t(44898),m=t(17586),v=t(97618),h=t(55485),b=t(48670),g=t(38276),x=t(30160),j=t(35576),C=t(17488),O=t(62547),_=t(35686),Z=t(94777),E=t(98464),y=t(46684),k={uuid:"Define"},T={uuid:"Document"},I=[k,T],S=t(70515),A=t(11302),P=t(68899),R=t(72619),w=t(23780),D=t(19183),N=t(28598);function M(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function L(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?M(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):M(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var B=function(e){var n=e.defaultTab,t=e.onMutateSuccess,o=e.pipelineUUID,i=e.template,M=e.templateAttributes,B=e.templateUUID,U=(0,D.i)().height,F=(y.Mz,(0,s.useRouter)()),G=(0,w.VI)(null,{},[],{uuid:"CustomTemplates/PipelineTemplateDetail"}),H=(0,r.Z)(G,1)[0],Q=(0,c.useState)(!1),K=Q[0],z=Q[1],Y=(0,c.useState)(!1),W=Y[0],q=Y[1],V=(0,c.useState)(M),X=V[0],J=V[1],$=(0,c.useCallback)((function(e){q(!0),J(e)}),[]),ee=(0,E.Z)(i);(0,c.useEffect)((function(){(null===ee||void 0===ee?void 0:ee.template_uuid)!==(null===i||void 0===i?void 0:i.template_uuid)&&J(i)}),[i,ee]);var ne=_.ZP.pipelines.detail(o).data,te=(0,c.useMemo)((function(){return(null===i||void 0===i?void 0:i.pipeline)||(null===ne||void 0===ne?void 0:ne.pipeline)}),[ne,i]),oe=(0,c.useMemo)((function(){return(null===te||void 0===te?void 0:te.blocks)||[]}),[te]),re=(0,c.useMemo)((function(){return!i&&!B}),[i,B]),ie=(0,c.useState)(n?I.find((function(e){return e.uuid===(null===n||void 0===n?void 0:n.uuid)})):I[0]),ue=ie[0],le=ie[1],ce=(0,c.useMemo)((function(){return!!re&&!(null!==X&&void 0!==X&&X.template_uuid)}),[re,X]),ae=(0,c.useState)(!1),se=ae[0],de=ae[1],fe=(0,c.useState)(re?400:300),pe=fe[0],me=fe[1],ve=(0,a.Db)(_.ZP.custom_templates.useCreate(),{onSuccess:function(e){return(0,R.wD)(e,{callback:function(e){var n=e.custom_template;t&&(null===t||void 0===t||t()),z(!0),setTimeout((function(){F.push("/templates/[...slug]","/templates/".concat(encodeURIComponent(null===n||void 0===n?void 0:n.template_uuid),"?object_type=").concat(p.R))}),1)},onErrorCallback:function(e,n){return H({errors:n,response:e})}})}}),he=(0,r.Z)(ve,2),be=he[0],ge=he[1].isLoading,xe=(0,a.Db)(_.ZP.custom_templates.useUpdate(i?encodeURIComponent(null===i||void 0===i?void 0:i.template_uuid):B&&encodeURIComponent(B),{object_type:p.R}),{onSuccess:function(e){return(0,R.wD)(e,{callback:function(e){var n=e.custom_template;t&&(null===t||void 0===t||t()),null!==i&&void 0!==i&&i.template_uuid&&(null===n||void 0===n?void 0:n.template_uuid)!==(null===i||void 0===i?void 0:i.template_uuid)||B&&(null===n||void 0===n?void 0:n.template_uuid)!==B?F.replace("/templates/[...slug]","/templates/".concat(encodeURIComponent(null===n||void 0===n?void 0:n.template_uuid),"?object_type=").concat(p.R)):(J(n),q(!1),l.Am.success("Template successfully saved.",{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:"custom_pipeline_template"}))},onErrorCallback:function(e,n){return H({errors:n,response:e})}})}}),je=(0,r.Z)(xe,2),Ce=je[0],Oe=je[1].isLoading,_e=(0,c.useCallback)((function(){var e={custom_template:L(L({},X),{},{object_type:p.R})};re?be(L(L({},e),{},{custom_template:L(L({},null===e||void 0===e?void 0:e.custom_template),{},{pipeline_uuid:o})})):Ce(e)}),[be,re,o,X,Ce]),Ze=(0,c.useMemo)((function(){return(0,N.jsxs)(h.ZP,{flexDirection:"column",fullHeight:!0,children:[(0,N.jsx)(A.Yf,{children:(0,N.jsx)(f.Z,{noPadding:!0,onClickTab:function(e){le(e)},selectedTabUUID:null===ue||void 0===ue?void 0:ue.uuid,tabs:I})}),(0,N.jsxs)(v.Z,{flexDirection:"column",children:[k.uuid===(null===ue||void 0===ue?void 0:ue.uuid)&&(0,N.jsxs)(N.Fragment,{children:[o&&(0,N.jsx)(g.Z,{mt:S.cd,px:S.cd,children:(0,N.jsxs)(x.ZP,{default:!0,children:["This pipeline template will be based off the pipeline ",(0,N.jsx)(u(),{as:"/pipelines/".concat(o),href:"/pipelines/[pipeline]",passHref:!0,children:(0,N.jsx)(b.Z,{bold:!0,default:!0,inline:!0,monospace:!0,openNewWindow:!0,children:o})}),"."]})}),(0,N.jsxs)(g.Z,{mt:S.cd,px:S.cd,children:[(0,N.jsxs)(g.Z,{mb:1,children:[(0,N.jsx)(x.ZP,{bold:!0,children:"Template UUID"}),(0,N.jsx)(x.ZP,{muted:!0,small:!0,children:"Unique identifier for custom template. The UUID will also determine where the custom template file is stored in the project. You can use nested folder names in the template\u2019s UUID."})]}),(0,N.jsx)(C.Z,{monospace:!0,onChange:function(e){return $((function(n){return L(L({},n),{},{template_uuid:e.target.value})}))},placeholder:"e.g. some_template_name",primary:!0,setContentOnMount:!0,value:(null===X||void 0===X?void 0:X.template_uuid)||""})]})]}),T.uuid===(null===ue||void 0===ue?void 0:ue.uuid)&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(g.Z,{mt:S.cd,px:S.cd,children:[(0,N.jsxs)(g.Z,{mb:1,children:[(0,N.jsx)(x.ZP,{bold:!0,children:"Name"}),(0,N.jsx)(x.ZP,{muted:!0,small:!0,children:"A human readable name for your template."})]}),(0,N.jsx)(C.Z,{onChange:function(e){return $((function(n){return L(L({},n),{},{name:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===X||void 0===X?void 0:X.name)||""})]}),(0,N.jsx)(g.Z,{mt:S.cd,px:S.cd,children:(0,N.jsx)(j.Z,{label:"Description",onChange:function(e){return $((function(n){return L(L({},n),{},{description:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===X||void 0===X?void 0:X.description)||""})})]})]}),(0,N.jsx)(A.ig,{children:(0,N.jsx)(g.Z,{p:S.cd,children:(0,N.jsx)(h.ZP,{children:(0,N.jsxs)(d.Z,{disabled:ce,fullWidth:!0,loading:ge||Oe,onClick:function(){return _e()},primary:!0,children:[!re&&"Save template",re&&"Create new template"]})})})})]})}),[ce,ge,Oe,re,o,_e,null===ue||void 0===ue?void 0:ue.uuid,$,X]),Ee=(0,Z.Z)({shouldWarn:!K&&W,warningMessage:"You have unsaved changes. Are you sure you want to leave?"}).ConfirmLeaveModal;return(0,N.jsxs)(O.Z,{before:Ze,beforeHidden:se,beforeWidth:pe,leftOffset:P.k1,setBeforeHidden:de,setBeforeWidth:me,children:[(0,N.jsx)(Ee,{}),(0,N.jsx)(m.Z,{blocks:oe,height:U,heightOffset:y.Mz,noStatus:!0,pipeline:te})]})}},11302:function(e,n,t){t.d(n,{Nk:function(){return c},Yf:function(){return s},bC:function(){return a},ig:function(){return d},w5:function(){return f}});var o=t(38626),r=t(44897),i=t(70515),u=t(84649),l=(i.iI,40*i.iI),c=o.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-axgvn9-0"})(["height:100%;position:relative;"]),a=o.default.div.withConfig({displayName:"indexstyle__NavigationStyle",componentId:"sc-axgvn9-1"})(["overflow:auto;position:fixed;width:","px;z-index:1;"," "," ",""],l,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).panel,";\n border-right: 1px solid ").concat((e.theme.borders||r.Z.borders).light,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height-u.n5,"px;\n ")}),(function(e){return!e.height&&"\n height: 100%;\n "})),s=o.default.div.withConfig({displayName:"indexstyle__TabsStyle",componentId:"sc-axgvn9-2"})(["padding-bottom:","px;padding-left:","px;padding-right:","px;padding-top:","px;width:100%;",""],1*i.iI,i.cd*i.iI,i.cd*i.iI,1*i.iI,(function(e){return"\n border-bottom: 1px solid ".concat((e.theme.borders||r.Z.borders).light,";\n ")})),d=o.default.div.withConfig({displayName:"indexstyle__ButtonsStyle",componentId:"sc-axgvn9-3"})(["margin-top:","px;width:100%;",""],i.cd*i.iI,(function(e){return"\n border-top: 1px solid ".concat((e.theme.borders||r.Z.borders).light,";\n ")})),f=o.default.div.withConfig({displayName:"indexstyle__ContentStyle",componentId:"sc-axgvn9-4"})(["margin-left:","px;"],l)},5755:function(e,n,t){t.d(n,{Z:function(){return z}});var o=t(82394),r=t(75582),i=t(56085),u=t(82684),l=t(65701),c=t(1254),a=t(21764),s=t(69864),d=t(34376),f=t(40761),p=t(71180),m=t(90299),v=t(79818),h=t(44898),b=t(97618),g=t(55485),x=t(38276),j=t(44085),C=t(30160),O=t(35576),_=t(17488),Z=t(35686),E=t(94777),y=t(98464),k=t(44425),T=t(11302),I=t(48339),S=t(39643),A={uuid:"Define"},P={uuid:"Document"},R=[A,P],w=t(11498),D=t(70515),N=t(57653),M=t(4383),L=t(72619),B=t(42041),U=t(23780),F=t(44688),G=t(19183),H=t(28598);function Q(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function K(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Q(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Q(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var z=function(e){var n=e.contained,t=e.defaultTab,Q=e.heightOffset,z=e.onCancel,Y=e.onCreateCustomTemplate,W=e.onMutateSuccess,q=e.template,V=e.templateAttributes,X=e.templateUUID,J=(0,G.i)().height,$=(0,d.useRouter)(),ee=(0,U.VI)(null,{},[],{uuid:"CustomTemplates/TemplateDetail"}),ne=(0,r.Z)(ee,1)[0],te=(0,u.useState)(Number(new Date)),oe=te[0],re=te[1],ie=(0,u.useState)(!1),ue=ie[0],le=ie[1],ce=(0,u.useState)(!1),ae=ce[0],se=ce[1],de=(0,u.useState)(t?R.find((function(e){return e.uuid===(null===t||void 0===t?void 0:t.uuid)})):R[0]),fe=de[0],pe=de[1],me=(0,u.useState)(!1),ve=me[0],he=me[1],be=(0,u.useState)(V),ge=be[0],xe=be[1],je=(0,u.useCallback)((function(e){he(!0),xe(e)}),[]),Ce=Z.ZP.custom_templates.detail(!q&&X&&encodeURIComponent(X),{object_type:h.Z}).data,Oe=(0,u.useMemo)((function(){return q||(null===Ce||void 0===Ce?void 0:Ce.custom_template)}),[Ce,q]),_e=(0,y.Z)(Oe);(0,u.useEffect)((function(){(null===_e||void 0===_e?void 0:_e.template_uuid)!==(null===Oe||void 0===Oe?void 0:Oe.template_uuid)&&(re(Number(new Date)),xe(Oe),se(!0))}),[Oe,_e]);var Ze=(0,s.Db)(Z.ZP.custom_templates.useCreate(),{onSuccess:function(e){return(0,L.wD)(e,{callback:function(e){var n=e.custom_template;W&&(null===W||void 0===W||W()),Y?null===Y||void 0===Y||Y(n):(le(!0),setTimeout((function(){$.push("/templates/[...slug]","/templates/".concat(encodeURIComponent(null===n||void 0===n?void 0:n.template_uuid)))}),1))},onErrorCallback:function(e,n){return ne({errors:n,response:e})}})}}),Ee=(0,r.Z)(Ze,2),ye=Ee[0],ke=Ee[1].isLoading,Te=(0,s.Db)(Z.ZP.custom_templates.useUpdate(q?encodeURIComponent(null===q||void 0===q?void 0:q.template_uuid):X&&encodeURIComponent(X),{object_type:h.Z}),{onSuccess:function(e){return(0,L.wD)(e,{callback:function(e){var n=e.custom_template;W&&(null===W||void 0===W||W()),xe(n),he(!1),a.Am.success("Template successfully saved.",{position:a.Am.POSITION.BOTTOM_RIGHT,toastId:"custom_block_template"})},onErrorCallback:function(e,n){return ne({errors:n,response:e})}})}}),Ie=(0,r.Z)(Te,2),Se=Ie[0],Ae=Ie[1].isLoading,Pe=(0,u.useMemo)((function(){return k.tf.MARKDOWN===(null===ge||void 0===ge?void 0:ge.block_type)}),[null===ge||void 0===ge?void 0:ge.block_type]),Re=!q&&!X,we=(0,u.useMemo)((function(){return!!Re&&(!(null!==ge&&void 0!==ge&&ge.template_uuid)||!(null!==ge&&void 0!==ge&&ge.block_type)||!Pe&&!(null!==ge&&void 0!==ge&&ge.language))}),[Pe,Re,ge]),De=Z.ZP.kernels.list({},{refreshInterval:5e3,revalidateOnFocus:!0}),Ne=De.data,Me=De.mutate,Le=null===Ne||void 0===Ne?void 0:Ne.kernels,Be=(null===Le||void 0===Le?void 0:Le.find((function(e){return e.name===N.a_[N.qL.PYTHON]})))||(null===Le||void 0===Le?void 0:Le[0]),Ue=(0,s.Db)(Z.ZP.kernels.useUpdate(null===Be||void 0===Be?void 0:Be.id),{onSuccess:function(e){return(0,L.wD)(e,{callback:function(){return Me()},onErrorCallback:function(e,n){return ne({errors:n,response:e})}})}}),Fe=(0,r.Z)(Ue,1)[0],Ge=(0,u.useCallback)((function(){Fe({kernel:{action_type:"interrupt"}}),We([])}),[Fe]),He=(0,u.useState)({}),Qe=He[0],Ke=He[1],ze=(0,u.useState)([]),Ye=ze[0],We=ze[1],qe=(0,u.useMemo)((function(){return{language:null===ge||void 0===ge?void 0:ge.language,name:null===ge||void 0===ge?void 0:ge.name,type:null===ge||void 0===ge?void 0:ge.block_type,uuid:null===ge||void 0===ge?void 0:ge.template_uuid}}),[ge]),Ve=(0,u.useMemo)((function(){return new f.Z}),[]),Xe=(0,u.useMemo)((function(){return{api_key:w.l,token:Ve.decodedToken.token}}),[Ve]),Je=(0,i.ZP)((0,M.Ib)(),{onClose:function(){return console.log("socketUrlPublish closed")},onMessage:function(e){if(e){var n=JSON.parse(e.data),t=n.execution_state,r=n.uuid;if(!r)return;Ke((function(e){var t=e[r]||[];return K(K({},e),{},(0,o.Z)({},r,t.concat(n)))})),I.uF.BUSY===t?We((function(e){return e.find((function(e){var n=e.uuid;return r===n}))||!qe?e:e.concat(qe)})):I.uF.IDLE===t&&We((function(e){return e.filter((function(e){var n=e.uuid;return r!==n}))}))}},onOpen:function(){return console.log("socketUrlPublish opened")},reconnectAttempts:10,reconnectInterval:3e3,shouldReconnect:function(){return console.log("Attempting to reconnect..."),!0}}).sendMessage,$e=(0,u.useCallback)((function(e){var n=e.block,t=e.code,o=e.ignoreAlreadyRunning,r=e.runDownstream,i=void 0!==r&&r,u=e.runIncompleteUpstream,l=void 0!==u&&u,c=e.runSettings,a=void 0===c?{}:c,s=e.runTests,d=void 0!==s&&s,f=e.runUpstream,p=n.extension_uuid,m=n.upstream_blocks,v=n.uuid;Ye.find((function(e){var n=e.uuid;return v===n}))&&!o||(Je(JSON.stringify(K(K({},Xe),{},{code:t,extension_uuid:p,run_downstream:i,run_incomplete_upstream:l,run_settings:a,run_tests:d,run_upstream:f,type:n.type,upstream_blocks:m,uuid:v}))),Ke((function(e){return delete e[v],e})),We((function(e){return e.find((function(e){var n=e.uuid;return v===n}))?e:e.concat(n)})))}),[Ye,Je,Ke,We,Xe]),en=(0,u.useMemo)((function(){return Ye.reduce((function(e,n,t){return K(K({},e),{},(0,o.Z)({},n.uuid,K(K({},n),{},{priority:t})))}),{})}),[Ye]),nn=(0,u.useMemo)((function(){if(!ae)return(0,H.jsx)("div",{});var e=en[null===qe||void 0===qe?void 0:qe.uuid],n=e?0===e.priority?I.uF.BUSY:I.uF.QUEUED:I.uF.IDLE;return(0,H.jsx)(v.Z,{block:qe,defaultValue:null===ge||void 0===ge?void 0:ge.content,disableDrag:!0,executionState:n,hideExtraCommandButtons:!0,hideExtraConfiguration:!0,hideHeaderInteractiveInformation:!0,interruptKernel:Ge,messages:null===Qe||void 0===Qe?void 0:Qe[null===qe||void 0===qe?void 0:qe.uuid],noDivider:!0,onChange:function(e){return je((function(n){return K(K({},n),{},{content:e})}))},runBlock:$e,runningBlocks:Ye,selected:!0,setErrors:ne,textareaFocused:!0},String(oe))}),[qe,oe,Ge,Qe,ae,$e,Ye,en,je,ne,ge]),tn=(0,u.useCallback)((function(){var e={custom_template:K(K({},ge),{},{language:Pe?k.t6.MARKDOWN:null===ge||void 0===ge?void 0:ge.language,object_type:h.Z})};Re?ye(e):Se(e)}),[ye,Pe,Re,ge,Se]),on="CustomTemplates/TemplateDetail",rn=(0,F.y)(),un=rn.registerOnKeyDown,ln=rn.unregisterOnKeyDown;(0,u.useEffect)((function(){return function(){ln(on)}}),[ln,on]),un(on,(function(e,n){if(ve&&(0,B.y)([S.zX,S.hS],n)){e.preventDefault();"undefined"!==typeof location&&window.confirm("You have changes that are unsaved. Click cancel and save your changes before reloading page.")&&location.reload()}else((0,B.y)([S.zX,S.Um],n)||(0,B.y)([S.PQ,S.Um],n))&&(e.preventDefault(),tn())}),[tn,ve]);var cn=(0,u.useMemo)((function(){return J-Q}),[J,Q]),an=(0,E.Z)({shouldWarn:!ue&&ve,warningMessage:"You have unsaved changes. Are you sure you want to leave?"}).ConfirmLeaveModal;return(0,H.jsxs)(T.Nk,{children:[(0,H.jsx)(an,{}),(0,H.jsx)(T.bC,{height:n?cn:null,children:(0,H.jsxs)(g.ZP,{flexDirection:"column",fullHeight:!0,children:[(0,H.jsx)(T.Yf,{children:(0,H.jsx)(m.Z,{noPadding:!0,onClickTab:function(e){pe(e)},selectedTabUUID:null===fe||void 0===fe?void 0:fe.uuid,tabs:Re?R.slice(0,1):R})}),(0,H.jsxs)(b.Z,{flexDirection:"column",children:[A.uuid===(null===fe||void 0===fe?void 0:fe.uuid)&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(x.Z,{mt:D.cd,px:D.cd,children:[(0,H.jsxs)(x.Z,{mb:1,children:[(0,H.jsx)(C.ZP,{bold:!0,children:"Template UUID"}),(0,H.jsx)(C.ZP,{muted:!0,small:!0,children:"Unique identifier for custom template. The UUID will also determine where the custom template file is stored in the project. You can use nested folder names in the template\u2019s UUID."})]}),(0,H.jsx)(_.Z,{monospace:!0,onChange:function(e){return je((function(n){return K(K({},n),{},{template_uuid:e.target.value})}))},placeholder:"e.g. some_template_name",primary:!0,setContentOnMount:!0,value:(null===ge||void 0===ge?void 0:ge.template_uuid)||""})]}),(0,H.jsx)(x.Z,{mt:D.cd,px:D.cd,children:(0,H.jsx)(j.Z,{label:"Block type",onChange:function(e){return je((function(n){return K(K({},n),{},{block_type:e.target.value,language:k.tf.MARKDOWN===e.target.value?k.t6.MARKDOWN:null===n||void 0===n?void 0:n.language})}))},primary:!0,value:(null===ge||void 0===ge?void 0:ge.block_type)||"",children:Object.values(k.tf).map((function(e){return(0,H.jsx)("option",{value:e,children:k.V4[e]},e)}))})}),!Pe&&(0,H.jsx)(x.Z,{mt:D.cd,px:D.cd,children:(0,H.jsx)(j.Z,{label:"Language",onChange:function(e){return je((function(n){return K(K({},n),{},{language:e.target.value})}))},primary:!0,value:(null===ge||void 0===ge?void 0:ge.language)||"",children:Object.values(k.t6).map((function(e){return(0,H.jsx)("option",{value:e,children:k.LE[e]},e)}))})})]}),P.uuid===(null===fe||void 0===fe?void 0:fe.uuid)&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(x.Z,{mt:D.cd,px:D.cd,children:[(0,H.jsxs)(x.Z,{mb:1,children:[(0,H.jsx)(C.ZP,{bold:!0,children:"Name"}),(0,H.jsx)(C.ZP,{muted:!0,small:!0,children:"A human readable name for your template."})]}),(0,H.jsx)(_.Z,{onChange:function(e){return je((function(n){return K(K({},n),{},{name:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===ge||void 0===ge?void 0:ge.name)||""})]}),(0,H.jsx)(x.Z,{mt:D.cd,px:D.cd,children:(0,H.jsx)(O.Z,{label:"Description",onChange:function(e){return je((function(n){return K(K({},n),{},{description:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===ge||void 0===ge?void 0:ge.description)||""})})]})]}),(0,H.jsx)(T.ig,{children:(0,H.jsx)(x.Z,{p:D.cd,children:(0,H.jsxs)(g.ZP,{children:[(0,H.jsxs)(p.Z,{disabled:we,fullWidth:!0,loading:ke||Ae,onClick:function(){return tn()},primary:!0,children:[!Re&&"Save template",Re&&"Create new template"]}),z&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(x.Z,{mr:1}),(0,H.jsx)(p.Z,{onClick:z,secondary:!0,children:"Cancel"})]})]})})})]})}),(0,H.jsx)(T.w5,{children:(0,H.jsx)(x.Z,{p:D.cd,children:(0,H.jsx)(l.W,{backend:c.PD,children:nn})})})]})}},99236:function(e,n,t){var o=t(55485),r=t(75499),i=t(30160),u=t(72473),l=t(55283),c=t(28598);n.Z=function(e){var n=e.inputsBlocks;return(0,c.jsx)(r.Z,{columnFlex:[null,1,null,1,null],columns:[{uuid:"Position"},{uuid:"Block"},{center:!0,uuid:"Catalog"},{center:!0,uuid:"Streams"},{center:!0,uuid:"Argument shape"}],rows:null===n||void 0===n?void 0:n.map((function(e,n){var t=e.block,r=t.color,a=t.type,s=t.uuid,d=e.input,f=d.catalog,p=d.streams,m=(null===p||void 0===p?void 0:p.length)>=1,v=(0,l.qn)(a,{blockColor:r}).accent;return[(0,c.jsx)(i.ZP,{default:!0,monospace:!0,children:n},"position-".concat(s)),(0,c.jsx)(i.ZP,{color:v,monospace:!0,children:s},"block-".concat(s)),(0,c.jsx)(o.ZP,{justifyContent:"center",children:f?(0,c.jsx)(u.Jr,{success:!0}):(0,c.jsx)(u.x8,{muted:!0})},"catalog-".concat(s)),(0,c.jsxs)(o.ZP,{justifyContent:"center",children:[!m&&(0,c.jsx)(u.x8,{muted:!0},"catalog-".concat(s)),m&&null!==p&&void 0!==p&&p.includes(s)?(0,c.jsx)(u.Jr,{success:!0}):(0,c.jsx)(i.ZP,{center:!0,default:!0,monospace:!0,small:!0,children:null===p||void 0===p?void 0:p.join(", ")})]},"selected-streams-".concat(s)),(0,c.jsxs)(i.ZP,{center:!0,default:!0,monospace:!0,children:[f&&!m&&"Dict",!f&&m&&"Union[Dict, pd.DataFrame]",f&&m&&"Tuple[Union[Dict, pd.DataFrame], Dict]"]},"shape-".concat(s))]}))})}},37443:function(e,n,t){t.d(n,{C0:function(){return m},Pf:function(){return f},TD:function(){return d},mU:function(){return s},oI:function(){return u},tw:function(){return a},uK:function(){return l}});var o,r,i,u,l,c=t(82394);!function(e){e.CHECKBOX="checkbox",e.CUSTOM="custom",e.SELECT="select",e.TOGGLE="toggle"}(u||(u={})),function(e){e.CONFIGURATION="configuration",e.OVERVIEW="overview",e.STREAMS="streams",e.SYNC="sync"}(l||(l={}));var a,s=(o={},(0,c.Z)(o,l.CONFIGURATION,l.CONFIGURATION),(0,c.Z)(o,l.OVERVIEW,l.OVERVIEW),(0,c.Z)(o,l.STREAMS,l.STREAMS),(0,c.Z)(o,l.SYNC,l.SYNC),o),d=(r={},(0,c.Z)(r,l.CONFIGURATION,"Configuration"),(0,c.Z)(r,l.OVERVIEW,"Overview"),(0,c.Z)(r,l.STREAMS,"Streams"),(0,c.Z)(r,l.SYNC,"Sync"),r);!function(e){e.BOOKMARKS="bookmarks",e.CREDENTIALS="credentials",e.OVERVIEW="overview",e.SAMPLE_DATA="sample_data",e.SETTINGS="settings",e.STREAM_CONFLICTS="stream_conflicts",e.UPSTREAM_BLOCK_SETTINGS="upstream_block_settings"}(a||(a={}));var f=(i={},(0,c.Z)(i,l.CONFIGURATION,[{label:function(){return"Credentials"},uuid:a.CREDENTIALS},{label:function(){return"Upstream block settings"},uuid:a.UPSTREAM_BLOCK_SETTINGS}]),(0,c.Z)(i,l.SYNC,[{label:function(){return"Bookmarks"},uuid:a.BOOKMARKS}]),(0,c.Z)(i,l.STREAMS,[]),(0,c.Z)(i,l.OVERVIEW,[]),i),p={label:function(){return"Schema property conflicts"},uuid:a.STREAM_CONFLICTS};function m(e){var n=[{label:function(){return"Overview"},uuid:a.OVERVIEW},{label:function(){return"Schema properties"},uuid:a.SETTINGS}];return null!==e&&void 0!==e&&e.addStreamConflicts&&n.push(p),n.push({label:function(){return"Sample data"},uuid:a.SAMPLE_DATA}),n}},75634:function(e,n,t){t.d(n,{W4:function(){return d},Wx:function(){return s},ZG:function(){return a}});var o=t(38626),r=t(44897),i=t(44425),u=t(42631),l=t(70515),c=t(55283),a=l.cd*l.iI,s=o.default.div.withConfig({displayName:"indexstyle__IconContainerStyle",componentId:"sc-oyfjzc-0"})(["align-items:center;border-radius:","px;border:1px solid transparent;display:flex;justify-content:center;"," "," "," "," "," "," "," "," "," ",""],u.BG,(function(e){return e.border&&"\n border: 1px dotted ".concat((e.theme.content||r.Z.content).active,";\n ")}),(function(e){return e.grey&&"\n background-color: ".concat((0,c.qn)(i.tf.SCRATCHPAD,e).accent,";\n ")}),(function(e){return e.blue&&"\n background-color: ".concat((0,c.qn)(i.tf.DATA_LOADER,e).accent,";\n ")}),(function(e){return e.purple&&"\n background-color: ".concat((0,c.qn)(i.tf.TRANSFORMER,e).accent,";\n ")}),(function(e){return e.sky&&"\n background-color: ".concat((0,c.qn)(i.tf.MARKDOWN,e).accent,";\n ")}),(function(e){return e.teal&&"\n background-color: ".concat((0,c.qn)(i.tf.EXTENSION,e).accent,";\n ")}),(function(e){return e.rose&&"\n background-color: ".concat((0,c.qn)(i.tf.CALLBACK,e).accent,";\n ")}),(function(e){return e.yellow&&"\n background-color: ".concat((0,c.qn)(i.tf.DATA_EXPORTER,e).accent,";\n ")}),(function(e){return!e.compact&&"\n height: ".concat(a+l.iI/2,"px;\n width: ").concat(a+l.iI/2,"px;\n ")}),(function(e){return e.compact&&"\n height: ".concat(a/2+l.iI,"px;\n width: ").concat(a/2+l.iI,"px;\n ")})),d=o.default.div.withConfig({displayName:"indexstyle__ButtonWrapper",componentId:"sc-oyfjzc-1"})(["position:relative;margin-bottom:","px;margin-right:","px;",""],l.iI,l.iI,(function(e){return e.increasedZIndex&&"\n z-index: 3;\n "}))},57271:function(e,n,t){t.d(n,{Z:function(){return ge}});var o=t(82394),r=t(21831),i=t(82684),u=t(75582),l=t(69864),c=t(27277),a=t(2548),s=t(71180),d=t(50724),f=t(97618),p=t(55485),m=t(46732),v=t(49130),h=t(48670),b=t(28598);var g=function(e){var n=e.fill,t=void 0===n?"white":n,o=e.size;return(0,b.jsxs)("svg",{fill:"none",height:o,viewBox:"0 0 20 21",width:o,xmlns:"http://www.w3.org/2000/svg",children:[(0,b.jsx)("g",{clipPath:"url(#clip0_11802_82284)",children:(0,b.jsx)("path",{clipRule:"evenodd",d:"M10 20.0024C15.5228 20.0024 20 15.5253 20 10.0024C20 4.47959 15.5228 0.00244141 10 0.00244141C4.47715 0.00244141 0 4.47959 0 10.0024C0 15.5253 4.47715 20.0024 10 20.0024ZM10 18.5024C11.5782 18.5024 13.0559 18.0723 14.3224 17.323C14.3144 17.3061 14.307 17.2888 14.3002 17.2712L11.5045 10.0024H8.49587L5.70021 17.2712C5.69339 17.2889 5.68596 17.3062 5.67796 17.3231C6.94434 18.0724 8.42195 18.5024 10 18.5024ZM11.6336 6.15938L15.5784 16.416C17.3685 14.8577 18.5 12.5622 18.5 10.0024C18.5 5.30802 14.6944 1.50244 10 1.50244C5.30558 1.50244 1.5 5.30802 1.5 10.0024C1.5 12.5623 2.63162 14.8579 4.4219 16.4163L8.36685 6.15939C8.94212 4.66367 11.0583 4.66367 11.6336 6.15938Z",fill:t,fillRule:"evenodd"})}),(0,b.jsx)("defs",{children:(0,b.jsx)("clipPath",{id:"clip0_11802_82284",children:(0,b.jsx)("rect",{fill:t,height:"20",transform:"translate(0 0.00244141)",width:"20"})})})]})},x=t(65956),j=t(91835),C=t(45373),O=t(63403),_=t(72473);function Z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function E(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Z(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var y,k=function(e){var n=(0,j.Z)({},e),t=(null===n||void 0===n?void 0:n.size)||O.C,o=(0,_.J_)([{clipRule:"evenodd",d:"M15.4697 1.47202C16.3149 0.62684 17.6852 0.62684 18.5304 1.47202C19.3756 2.3172 19.3756 3.6875 18.5304 4.53268L10.7445 12.3186C10.5002 12.5629 10.1891 12.7294 9.85027 12.7972L9.11804 12.9436C7.89353 13.1885 6.81392 12.1089 7.05882 10.8844L7.20527 10.1522C7.27302 9.81337 7.43954 9.50222 7.68384 9.25792L15.4697 1.47202ZM17.4697 2.53268C17.2104 2.27329 16.7898 2.27329 16.5304 2.53268L14.7522 4.31085L15.6916 5.25019L17.4697 3.47202C17.7291 3.21263 17.7291 2.79207 17.4697 2.53268ZM14.6309 6.31085L13.6916 5.37151L8.7445 10.3186C8.7096 10.3535 8.68582 10.3979 8.67614 10.4463L8.52969 11.1786C8.4947 11.3535 8.64893 11.5077 8.82386 11.4727L9.5561 11.3263C9.60449 11.3166 9.64894 11.2928 9.68384 11.2579L14.6309 6.31085Z",fillRule:"evenodd"},{clipRule:"evenodd",d:"M2.12221 16.4212C1.89178 16.7635 1.42775 16.8555 1.08405 16.6264C0.739408 16.3966 0.646278 15.931 0.876042 15.5863L1.50008 16.0023C0.876042 15.5863 0.87632 15.5859 0.876609 15.5855L0.877248 15.5845L0.878742 15.5823L0.882593 15.5766L0.893746 15.5605C0.902714 15.5476 0.914758 15.5306 0.929868 15.51C0.96007 15.4687 1.00264 15.4126 1.05749 15.345C1.16699 15.2102 1.32669 15.0283 1.53609 14.8278C1.95274 14.4289 2.58034 13.9427 3.41428 13.6164C5.14688 12.9384 7.5533 13.0314 10.475 15.4219C13.0533 17.5314 14.8969 17.4384 16.0393 16.9914C16.6428 16.7552 17.109 16.3976 17.4267 16.0934C17.5845 15.9424 17.7021 15.8078 17.7782 15.7142C17.8161 15.6675 17.8434 15.6313 17.8598 15.6089C17.868 15.5977 17.8735 15.5899 17.8762 15.586C17.8769 15.585 17.8774 15.5843 17.8777 15.5838L17.877 15.5849C18.1069 15.2409 18.5717 15.1487 18.9161 15.3783C19.2608 15.6081 19.3539 16.0737 19.1241 16.4184L18.5001 16.0023C19.1241 16.4184 19.1238 16.4188 19.1236 16.4192L19.1229 16.4202L19.1214 16.4224L19.1176 16.4281L19.1064 16.4442C19.0974 16.4571 19.0854 16.4741 19.0703 16.4947C19.0401 16.536 18.9975 16.5921 18.9427 16.6597C18.8332 16.7945 18.6735 16.9764 18.4641 17.1769C18.0474 17.5758 17.4198 18.062 16.5859 18.3883C14.8533 19.0663 12.4469 18.9733 9.52515 16.5828C6.94686 14.4733 5.10328 14.5663 3.96088 15.0133C3.35732 15.2495 2.89117 15.6071 2.57345 15.9113C2.41566 16.0623 2.29802 16.1969 2.22197 16.2905C2.18405 16.3372 2.15679 16.3734 2.14036 16.3958C2.13215 16.407 2.12668 16.4148 2.12396 16.4187C2.12332 16.4196 2.12254 16.4207 2.12221 16.4212ZM2.12221 16.4212C2.1222 16.4212 2.12221 16.4212 2.12221 16.4212V16.4212Z",fillRule:"evenodd"}],{viewBox:"0 0 20 21"});return(0,b.jsxs)(C.ZP,E(E({},n),{},{size:t,viewBox:null,children:[(0,b.jsx)("g",{clipPath:"url(#clip0_11826_796)",id:"Type / Scratchpad",children:(0,b.jsx)("g",{id:"Vector",children:o(E(E({},n),{},{size:t}))})}),(0,b.jsx)("defs",{children:(0,b.jsx)("clipPath",{id:"clip0_11826_796",children:(0,b.jsx)("rect",{fill:"white",height:"20",transform:"translate(0 0.00244141)",width:"20"})})})]}))};!function(e){e.BLOCK_ACTION_OBJECTS="block_action_objects"}(y||(y={}));var T=t(38276),I=t(30160),S=t(17488),A=t(12468),P=t(35686),R=t(44425),w=t(32929),D=t(38626),N=t(44897),M=t(42631),L=t(70515),B=t(47041),U=t(91437),F=L.cd*L.iI,G=D.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1mqygp5-0"})([""," border-radius:","px;"," "," "," "," ",""],(0,U.eR)(),M.n_,(function(e){return"\n background-color: ".concat((e.theme.background||N.Z.background).dashboard,";\n box-shadow: ").concat((e.theme.shadow||N.Z.shadow).frame,";\n ")}),(function(e){return!e.focused&&"\n border: 1px solid ".concat((e.theme.interactive||N.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.focused&&"\n border: 1px solid ".concat((e.theme.interactive||N.Z.interactive).hoverBorder,";\n ")}),(function(e){return!e.compact&&"\n padding-left: ".concat(2.5*L.iI,"px;\n padding-right: ").concat(2.5*L.iI,"px;\n ")}),(function(e){return e.compact&&"\n padding-left: ".concat(1.5*L.iI,"px;\n padding-right: ").concat(1.5*L.iI,"px;\n ")})),H=D.default.div.withConfig({displayName:"indexstyle__DividerStyle",componentId:"sc-1mqygp5-1"})(["height:","px;width:1px;",""],F,(function(e){return"\n background-color: ".concat((e.theme.interactive||N.Z.interactive).defaultBorder,";\n ")})),Q=D.default.div.withConfig({displayName:"indexstyle__ButtonWrapper",componentId:"sc-1mqygp5-2"})(["position:relative;"," "," ",""],(function(e){return e.increasedZIndex&&"\n z-index: 3;\n "}),(function(e){return!e.compact&&"\n margin-bottom: ".concat(2.5*L.iI,"px;\n margin-top: ").concat(2.5*L.iI,"px;\n ")}),(function(e){return e.compact&&"\n margin-bottom: ".concat(1.5*L.iI,"px;\n margin-top: ").concat(1.5*L.iI,"px;\n ")})),K=D.default.div.withConfig({displayName:"indexstyle__TextInputFocusAreaStyle",componentId:"sc-1mqygp5-3"})(["width:100%;&:hover{cursor:text;}"," ",""],(function(e){return!e.compact&&"\n height: ".concat(2.5*L.iI,"px;\n ")}),(function(e){return e.compact&&"\n height: ".concat(1.5*L.iI,"px;\n ")})),z=D.default.div.withConfig({displayName:"indexstyle__SearchStyle",componentId:"sc-1mqygp5-4"})(["position:relative;width:100%;"]),Y=D.default.div.withConfig({displayName:"indexstyle__DropdownStyle",componentId:"sc-1mqygp5-5"})([""," border-radius:","px;max-height:","px;overflow:auto;position:absolute;width:100%;z-index:1;"," ",""],B.w5,M.BG,40*L.iI,(function(e){return"\n background-color: ".concat((e.theme.background||N.Z.background).popup,";\n box-shadow: ").concat((e.theme.shadow||N.Z.shadow).popup,";\n ")}),(function(e){return e.topOffset&&"\n top: ".concat(e.topOffset,"px;\n ")})),W=D.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-1mqygp5-6"})(["align-items:center;display:flex;justify-content:space-between;padding:","px ","px;position:relative;z-index:2;&:hover{cursor:pointer;}",""],1.5*L.iI,2.5*L.iI,(function(e){return e.highlighted&&"\n background-color: ".concat((e.theme.interactive||N.Z.interactive).hoverBackground,";\n ")})),q=t(39643),V=t(78419),X=t(13803),J=t(81728),$=t(53808),ee=t(55283),ne=t(38399),te=t(72619),oe=t(3314),re=t(23780),ie=t(44688);function ue(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function le(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ue(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ue(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ce=function(e){var n,t=e.addNewBlock,o=e.blockIdx,r=e.blockTemplatesByBlockType,j=e.compact,C=e.focused,O=e.itemsDBT,Z=e.pipelineType,E=e.project,D=e.searchTextInputRef,N=e.setAddNewBlockMenuOpenIdx,M=e.setFocused,B=e.showBrowseTemplates,U=e.showConfigureProjectModal,ue=e.showGlobalDataProducts,ce=(0,i.useRef)(null),ae=(0,i.useRef)(null),se=(0,i.useRef)(null),de=(0,i.useRef)(null),fe="undefined"!==typeof D?D:de,pe=(0,i.useMemo)((function(){return"AddNewBlocksV2/".concat(o)}),[o]),me=(0,re.VI)(null,{},[],{uuid:"AddNewBlocksV2/".concat(o)}),ve=(0,u.Z)(me,1)[0],he=(0,i.useState)(null),be=he[0],ge=he[1],xe=(0,i.useState)(!1),je=xe[0],Ce=xe[1],Oe=(0,i.useState)(null),_e=Oe[0],Ze=Oe[1],Ee=(0,i.useState)(null),ye=Ee[0],ke=Ee[1],Te=(0,i.useState)(null),Ie=Te[0],Se=Te[1],Ae=(0,i.useCallback)((function(e){Se(e),(0,$.t8)(V.Ch,e)}),[]);(0,i.useEffect)((function(){if(null===Ie){var e=(0,$.U2)(V.Ch,!1);Ae(e)}}),[Ae,Ie]);var Pe=(0,i.useMemo)((function(){return"undefined"!==typeof C?C:je}),[C,je]),Re=(0,i.useCallback)((function(e){return"undefined"!==typeof M?M(e):Ce(e)}),[M,Ce]),we=(0,ie.y)(),De=we.registerOnKeyDown,Ne=we.unregisterOnKeyDown;(0,i.useEffect)((function(){return function(){return Ne(pe)}}),[Ne,pe]),null===De||void 0===De||De(pe,(function(e,n){var t;Pe&&(n[q.vP]&&(Re(!1),null===fe||void 0===fe||null===(t=fe.current)||void 0===t||t.blur()))}),[Pe,fe]);var Me=(0,i.useCallback)((function(){return ge(null)}),[]),Le=(0,i.useCallback)((function(e){return null===N||void 0===N?void 0:N((function(n){return null===n||be!==e?o:null}))}),[o,be,N]),Be=(0,i.useMemo)((function(){var e,n;return null===(e=(0,ne.hr)(t,R.tf.DATA_LOADER,Z,{blockTemplatesByBlockType:r,v2:!0}))||void 0===e||null===(n=e.find((function(e){return e.uuid==="".concat(R.tf.DATA_LOADER,"/").concat(R.t6.PYTHON)})))||void 0===n?void 0:n.items}),[t,r,Z]),Ue=(0,i.useMemo)((function(){var e,n;return null===(e=(0,ne.hr)(t,R.tf.DATA_LOADER,Z,{blockTemplatesByBlockType:r,dataIntegrationType:X.O.SOURCES,v2:!0}))||void 0===e||null===(n=e.find((function(e){return e.uuid==="".concat(R.tf.DATA_LOADER,"/").concat(X.O.SOURCES)})))||void 0===n?void 0:n.items}),[t,r,Z]),Fe=(0,i.useMemo)((function(){var e,n;return null===(e=(0,ne.hr)(t,R.tf.DATA_EXPORTER,Z,{blockTemplatesByBlockType:r,v2:!0}))||void 0===e||null===(n=e.find((function(e){return e.uuid==="".concat(R.tf.DATA_EXPORTER,"/").concat(R.t6.PYTHON)})))||void 0===n?void 0:n.items}),[t,r,Z]),Ge=(0,i.useMemo)((function(){var e,n;return null===(e=(0,ne.hr)(t,R.tf.DATA_EXPORTER,Z,{blockTemplatesByBlockType:r,dataIntegrationType:X.O.DESTINATIONS,v2:!0}))||void 0===e||null===(n=e.find((function(e){return e.uuid==="".concat(R.tf.DATA_EXPORTER,"/").concat(X.O.DESTINATIONS)})))||void 0===n?void 0:n.items}),[t,r,Z]),He=(0,i.useMemo)((function(){var e,n;return null===(e=(0,ne.hr)(t,R.tf.TRANSFORMER,Z,{blockTemplatesByBlockType:r,v2:!0}))||void 0===e||null===(n=e.find((function(e){return e.uuid==="".concat(R.tf.TRANSFORMER,"/").concat(R.t6.PYTHON)})))||void 0===n?void 0:n.items}),[t,r,Z]),Qe=(0,i.useMemo)((function(){var e,n;return null===(e=(0,ne.hr)(t,R.tf.SENSOR,Z,{blockTemplatesByBlockType:r,v2:!0}))||void 0===e||null===(n=e.find((function(e){return e.uuid==="".concat(R.tf.SENSOR,"/").concat(R.t6.PYTHON)})))||void 0===n?void 0:n.items}),[t,r,Z]),Ke=(0,i.useCallback)((function(e){return[{isGroupingTitle:!0,label:function(){return"SQL"},uuid:"".concat(R.t6.SQL,"/").concat(e,"/group")},{label:function(){return"Base template (generic)"},onClick:function(){t({language:R.t6.SQL,type:e})},uuid:"".concat(R.t6.SQL,"/").concat(e,"/Base template (generic)")},{isGroupingTitle:!0,label:function(){return"R"},uuid:"".concat(R.t6.R,"/").concat(e,"/group")},{label:function(){return"Base template (generic)"},onClick:function(){t({language:R.t6.R,type:e})},uuid:"".concat(R.t6.R,"/").concat(e,"/Base template (generic)")}]}),[t]),ze=(0,i.useMemo)((function(){var e=[{isGroupingTitle:!0,label:function(){return"Python"},uuid:"".concat(R.t6.PYTHON).concat(R.tf.DATA_LOADER,"/group")}].concat(Be).concat(Ke(R.tf.DATA_LOADER));Ue&&e.push.apply(e,[{isGroupingTitle:!0,label:function(){return"Data integrations"},uuid:"".concat(R.tf.DATA_LOADER,"/Data integrations/group")},{items:Ue,label:function(){return(0,J.kC)(X.O.SOURCES)},uuid:"".concat(R.tf.DATA_LOADER,"/Data integrations/").concat(X.O.SOURCES)}]);var n=[{isGroupingTitle:!0,label:function(){return"Python"},uuid:"".concat(R.t6.PYTHON).concat(R.tf.DATA_EXPORTER,"/group")}].concat(Fe).concat(Ke(R.tf.DATA_EXPORTER));return Ge&&n.push.apply(n,[{isGroupingTitle:!0,label:function(){return"Data integrations"},uuid:"".concat(R.tf.DATA_EXPORTER,"/Data integrations/group")},{items:Ge,label:function(){return(0,J.kC)(X.O.DESTINATIONS)},uuid:"".concat(R.tf.DATA_EXPORTER,"/Data integrations/").concat(X.O.DESTINATIONS)}]),[{beforeIcon:(0,b.jsx)(_.rH,{fill:(0,ee.qn)(R.tf.DATA_LOADER).accent,size:F}),items:e,label:function(){return R.V4[R.tf.DATA_LOADER]},uuid:"".concat(R.tf.DATA_LOADER,"/").concat(R.t6.PYTHON)},{beforeIcon:(0,b.jsx)(_.Sv,{fill:(0,ee.qn)(R.tf.TRANSFORMER).accent,size:F}),items:[{isGroupingTitle:!0,label:function(){return"Python"},uuid:"".concat(R.t6.PYTHON).concat(R.tf.TRANSFORMER,"/group")}].concat(He).concat(Ke(R.tf.TRANSFORMER)),label:function(){return R.V4[R.tf.TRANSFORMER]},uuid:"".concat(R.tf.TRANSFORMER,"/").concat(R.t6.PYTHON)},{beforeIcon:(0,b.jsx)(_.zS,{fill:(0,ee.qn)(R.tf.DATA_EXPORTER).accent,size:F}),items:n,label:function(){return R.V4[R.tf.DATA_EXPORTER]},uuid:"".concat(R.tf.DATA_EXPORTER,"/").concat(R.t6.PYTHON)},{beforeIcon:(0,b.jsx)(_.LM,{fill:(0,ee.qn)(R.tf.SENSOR).accent,size:F}),items:[{isGroupingTitle:!0,label:function(){return"Python"},uuid:"".concat(R.t6.PYTHON).concat(R.tf.SENSOR,"/group")}].concat(Qe),label:function(){return R.V4[R.tf.SENSOR]},uuid:"".concat(R.tf.SENSOR,"/").concat(R.t6.PYTHON)},{beforeIcon:(0,b.jsx)(_.xE,{fill:(0,ee.qn)(R.tf.DBT).accent,size:F}),items:O,label:function(){return R.V4[R.tf.DBT]},uuid:R.tf.DBT},{beforeIcon:(0,b.jsx)(_.ie,{size:F}),label:function(){return R.V4[R.tf.GLOBAL_DATA_PRODUCT]},onClick:function(){return ue({addNewBlock:t})},uuid:R.tf.GLOBAL_DATA_PRODUCT},{isGroupingTitle:!0,label:function(){return"Custom templates"},uuid:"custom_templates"},{beforeIcon:(0,b.jsx)(_.zQ,{default:!0,size:F}),label:function(){return"Browse templates"},onClick:function(){return B({addNewBlock:t})},uuid:"browse_templates"},{beforeIcon:(0,b.jsx)(_.o0,{default:!0,size:F}),label:function(){return"Create new template"},onClick:function(){return B({addNew:!0,addNewBlock:t})},uuid:"create_template"}]}),[t,Ke,Fe,Ge,Be,Ue,O,Qe,He,B,ue]),Ye=(0,i.useMemo)((function(){return[{beforeIcon:(0,b.jsx)(_.VS,{default:!0,size:F}),label:function(){return"Python block"},onClick:function(){t({language:R.t6.PYTHON,type:R.tf.CUSTOM})},uuid:"Python"},{beforeIcon:(0,b.jsx)(_.VS,{default:!0,size:F}),label:function(){return"SQL block"},onClick:function(){t({language:R.t6.SQL,type:R.tf.CUSTOM})},uuid:"SQL"},{beforeIcon:(0,b.jsx)(_.VS,{default:!0,size:F}),label:function(){return"R block"},onClick:function(){t({language:R.t6.R,type:R.tf.CUSTOM})},uuid:"R"},{beforeIcon:(0,b.jsx)(k,{default:!0,size:F}),label:function(){return"Scratchpad"},onClick:function(){t({language:R.t6.PYTHON,type:R.tf.SCRATCHPAD})},uuid:"scratchpad"}]}),[t]),We=(0,l.Db)(P.ZP.search_results.useCreate(),{onSuccess:function(e){return(0,te.wD)(e,{callback:function(e){var n=e.search_result;ke(n)},onErrorCallback:function(e,n){return ve({errors:n,response:e})}})}}),qe=(0,u.Z)(We,1)[0],Ve=(0,i.useCallback)((function(e){clearTimeout(se.current);var n=e.target.value;Ze(n),n?se.current=setTimeout((function(){qe({search_result:{pipeline_type:Z,query:n,ratio:70,type:y.BLOCK_ACTION_OBJECTS}})}),500):ke(null)}),[qe,Z,se]),Xe=(0,i.useMemo)((function(){return(null===ye||void 0===ye?void 0:ye.results)||[]}),[ye]),Je=(0,i.useMemo)((function(){var e=null===ye||void 0===ye?void 0:ye.uuid,n=null===Xe||void 0===Xe?void 0:Xe.map((function(n){return{itemObject:n,searchQueries:[e],value:null===n||void 0===n?void 0:n.uuid}}));if(e){var t={itemObject:{description:e,object_type:a.L.GENERATE_BLOCK,title:"Generate block using AI (beta)"},searchQueries:[e],value:"generate_block"};Ie?n.push(t):n.unshift(t)}return n}),[Xe,ye,Ie]),$e=(0,i.useMemo)((function(){return(0,b.jsx)(K,{compact:j,onClick:function(){var e;return null===fe||void 0===fe||null===(e=fe.current)||void 0===e?void 0:e.focus()}})}),[j,fe]),en=(0,i.useMemo)((function(){return!(null===E||void 0===E||!E.openai_api_key)}),[E]);return(0,b.jsx)(d.Z,{onClickOutside:Me,open:!0,children:(0,b.jsx)(G,{compact:j,focused:Pe,children:(0,b.jsxs)(p.ZP,{alignItems:"center",children:[(0,b.jsx)(Q,{compact:j,increasedZIndex:0===be,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:ze,onClickCallback:Me,open:0===be,parentRef:ce,uuid:"button_templates",children:(0,b.jsx)(A.Z,{block:!0,label:"Add a block from a template",size:null,widthFitContent:!0,children:(0,b.jsx)(s.Z,{beforeIcon:(0,b.jsx)(_.zQ,{secondary:0===be,size:F}),noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(e){e.preventDefault(),ge((function(e){return 0===e?null:0})),Le(0)},children:"Templates"})})})}),(0,b.jsx)(T.Z,{mr:3}),(0,b.jsx)(Q,{compact:j,increasedZIndex:1===be,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:Ye,onClickCallback:Me,open:1===be,parentRef:ae,uuid:"button_custom",children:(0,b.jsx)(A.Z,{block:!0,label:"Add a blank custom block or scratchpad block",size:null,widthFitContent:!0,children:(0,b.jsx)(s.Z,{beforeIcon:(0,b.jsx)(_.cW,{secondary:1===be,size:F}),noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(e){e.preventDefault(),ge((function(e){return 1===e?null:1})),Le(1)},children:"Custom"})})})}),(0,b.jsx)(T.Z,{mr:3}),(0,b.jsx)(Q,{compact:j,increasedZIndex:0===be,children:(0,b.jsx)(A.Z,{block:!0,label:"Add a markdown block for documentation",size:null,widthFitContent:!0,children:(0,b.jsx)(s.Z,{beforeIcon:(0,b.jsx)(g,{size:F}),noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(e){e.preventDefault(),t({language:R.t6.MARKDOWN,type:R.tf.MARKDOWN})},children:"Markdown"})})}),(0,b.jsx)(T.Z,{mr:3}),(0,b.jsx)(H,{}),(0,b.jsx)(T.Z,{mr:3}),(0,b.jsxs)(z,{children:[$e,(0,b.jsxs)(p.ZP,{alignItems:"center",fullWidth:!0,children:[(0,b.jsx)(S.Z,{fullWidth:!0,noBackground:!0,noBorder:!0,onBlur:function(){return setTimeout((function(){return Re(!1)}),150)},onChange:Ve,onFocus:function(){return Re(!0)},paddingHorizontal:0,paddingVertical:0,placeholder:"Search for a block...",ref:fe,value:_e||""}),(0,b.jsx)(v.Z,{addPlusSignBetweenKeys:!0,disabled:!0,keyTextGroups:[[q.RJ,q.ZS]]})]}),$e,(0,b.jsx)(Y,{topOffset:(null===fe||void 0===fe||null===(n=fe.current)||void 0===n?void 0:n.getBoundingClientRect().height)+(j?1.5*L.iI:2.5*L.iI),children:(0,b.jsx)(c.Z,{itemGroups:[{items:Pe?Je:[],renderItem:function(e,n){var t=e.itemObject,o=t.block_type,r=t.description,i=t.language,u=t.object_type,l=t.title,c={fill:(0,ee.qn)(o).accent,size:F},s=w.iK[o],d=a.L.GENERATE_BLOCK===u;d&&(s=_.xq,c.default=!1,c.fill=null,c.warning=!0);var p="".concat(l).concat(r?": "+r:"").slice(0,80);return(0,b.jsxs)(W,le(le({},n),{},{onClick:function(e){var t;(0,oe.j)(e),null===n||void 0===n||null===(t=n.onClick)||void 0===t||t.call(n,e)},children:[(0,b.jsxs)(f.Z,{alignItems:"center",flex:1,children:[s&&(0,b.jsx)(s,le({default:!(null!==c&&void 0!==c&&c.fill)},c)),(0,b.jsx)(T.Z,{mr:2}),(0,b.jsx)(I.ZP,{default:!0,overflowWrap:!0,textOverflow:!0,children:p})]}),(0,b.jsx)(T.Z,{mr:1}),(0,b.jsx)(I.ZP,{monospace:!0,muted:!0,uppercase:!0,children:d?"AI":R.dO[i]}),(0,b.jsx)(T.Z,{mr:1}),a.L.BLOCK_FILE===u&&(0,b.jsx)(_.$B,{muted:!0,size:F}),a.L.CUSTOM_BLOCK_TEMPLATE===u&&(0,b.jsx)(_.zQ,{muted:!0,size:F}),a.L.MAGE_TEMPLATE===u&&(0,b.jsx)(_.m1,{muted:!0,size:F}),d&&en&&(0,b.jsx)(_.xq,{muted:!0,size:F}),d&&!en&&(0,b.jsx)(_.uy,{muted:!0,size:F})]}))}}],onSelectItem:function(e){var n=e.itemObject,o=n.object_type;a.L.GENERATE_BLOCK!==o||en?(t({block_action_object:n,require_unique_name:!1}),Ze(null),ke(null)):null===U||void 0===U||U({cancelButtonText:"Set this up later",header:(0,b.jsx)(T.Z,{mb:L.HN,children:(0,b.jsxs)(x.Z,{children:[(0,b.jsx)(I.ZP,{warning:!0,children:"You need to add an OpenAI API key to your project before you can generate blocks using AI."}),(0,b.jsx)(T.Z,{mt:1,children:(0,b.jsxs)(I.ZP,{warning:!0,children:["Read ",(0,b.jsx)(h.Z,{href:"https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key",openNewWindow:!0,children:"OpenAI\u2019s documentation"})," to get your API key."]})})]})}),onCancel:function(){Ae(!0)},onSaveSuccess:function(e){null!==e&&void 0!==e&&e.openai_api_key&&(t({block_action_object:n}),Ze(null),ke(null))}})},uuid:pe})})]})]})})})};var ae=function(e){var n=e.size;return(0,b.jsx)("svg",{fill:"none",height:n,preserveAspectRatio:"xMidYMid",viewBox:"0 0 256 256",width:n,xmlns:"http://www.w3.org/2000/svg",children:(0,b.jsx)("path",{d:"M245.121138,10.6473813 C251.139129,16.4340053 255.074133,24.0723342 256,32.4050489 C256,35.8769778 255.074133,38.1917867 252.990862,42.5895822 C250.907876,46.9873778 225.215147,91.4286933 217.57696,103.696213 C213.179164,110.871609 210.864356,119.435947 210.864356,127.768462 C210.864356,136.3328 213.179164,144.6656 217.57696,151.840996 C225.215147,164.108516 250.907876,208.781084 252.990862,213.179164 C255.074133,217.57696 256,219.659947 256,223.131876 C255.074133,231.464676 251.370667,239.103147 245.352676,244.658347 C239.565938,250.676338 231.927751,254.611342 223.826489,255.305671 C220.35456,255.305671 218.039751,254.379804 213.873493,252.296533 C209.706951,250.213262 164.340053,225.215147 152.072249,217.57696 C151.146382,217.113884 150.220516,216.419556 149.063396,215.95648 L88.4195556,180.079502 C89.8082133,191.652693 94.9006222,202.763093 103.233138,210.864356 C104.853618,212.484551 106.473813,213.873493 108.325547,215.262151 C106.936604,215.95648 105.316409,216.651093 103.927751,217.57696 C91.6599467,225.215147 46.9873778,250.907876 42.5895822,252.990862 C38.1917867,255.074133 36.1085156,256 32.4050489,256 C24.0723342,255.074133 16.4340053,251.370667 10.8788338,245.352676 C4.86075733,239.565938 0.925858133,231.927751 0,223.594951 C0.231464676,220.123022 1.1573248,216.651093 3.00905244,213.641956 C5.09223822,209.24416 30.7848533,164.571307 38.42304,152.303787 C42.82112,145.128391 45.1356444,136.795591 45.1356444,128.231538 C45.1356444,119.6672 42.82112,111.3344 38.42304,104.159004 C30.7848533,91.4286933 4.86075733,46.75584 3.00905244,42.3580444 C1.1573248,39.3489067 0.231464676,35.8769778 0,32.4050489 C0.925858133,24.0723342 4.62930489,16.4340053 10.6473813,10.6473813 C16.4340053,4.62930489 24.0723342,0.925858133 32.4050489,0 C35.8769778,0.231464676 39.3489067,1.1573248 42.5895822,3.00905244 C46.2930489,4.62930489 78.9293511,23.6094009 96.28928,33.7939911 L100.224284,36.1085156 C101.612942,37.0343822 102.770347,37.7287111 103.696213,38.1917867 L105.547947,39.3489067 L167.348907,75.9204978 C165.960249,62.0324978 158.784853,49.3019022 147.674453,40.7378489 C149.063396,40.04352 150.683591,39.3489067 152.072249,38.42304 C164.340053,30.7848533 209.012622,4.86075733 213.410418,3.00905244 C216.419556,1.1573248 219.891484,0.231464676 223.594951,0 C231.696213,0.925858133 239.334684,4.62930489 245.121138,10.6473813 Z M131.240391,144.434062 L144.434062,131.240391 C146.285796,129.388658 146.285796,126.611342 144.434062,124.759609 L131.240391,111.565938 C129.388658,109.714204 126.611342,109.714204 124.759609,111.565938 L111.565938,124.759609 C109.714204,126.611342 109.714204,129.388658 111.565938,131.240391 L124.759609,144.434062 C126.379804,146.054258 129.388658,146.054258 131.240391,144.434062 Z",fill:"#FF694A"})})},se=t(93369),de=t(57653),fe=t(82359),pe=t(8454),me=t(75634),ve=t(5677);function he(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function be(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?he(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):he(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ge=function(e){var n=e.addNewBlock,t=e.blockIdx,o=e.blockTemplates,u=e.compact,l=e.focusedAddNewBlockSearch,c=e.hideCustom,a=e.hideDataExporter,s=(e.hideDataLoader,e.hideDbt),f=e.hideMarkdown,v=e.hideScratchpad,h=e.hideSensor,g=e.hideTransformer,x=e.hideTransformerDataSources,j=e.onClickAddSingleDBTModel,C=e.pipeline,O=e.project,Z=e.searchTextInputRef,E=e.setAddNewBlockMenuOpenIdx,y=e.setCreatingNewDBTModel,k=e.setFocusedAddNewBlockSearch,T=e.showBrowseTemplates,I=e.showConfigureProjectModal,S=e.showGlobalDataProducts,P=(0,i.useState)(null),w=P[0],D=P[1],N=(0,i.useRef)(null),M=(0,i.useRef)(null),B=(0,i.useRef)(null),U=(0,i.useRef)(null),F=(0,i.useRef)(null),G=(0,i.useRef)(null),H=(0,i.useRef)(null),Q={compact:u,inline:!0},K=null===C||void 0===C?void 0:C.type,z=K===de.qL.STREAMING,Y=u?me.ZG/2:me.ZG,W=25*L.iI,q=(0,i.useMemo)((function(){return(0,ne.q_)(ve.c1,pe.qs.COLUMN,n)}),[n]),V=(0,i.useMemo)((function(){return(0,ne.q_)(ve.Wt,pe.qs.ROW,n)}),[n]),X=(0,i.useMemo)((function(){var e=[{label:function(){return"Generic (no template)"},onClick:function(){n({language:R.t6.PYTHON,type:R.tf.TRANSFORMER})},uuid:"generic_transformer_action"},{bold:!0,items:V,label:function(){return"Row actions"},uuid:"row_actions_grouping"},{isGroupingTitle:!0,label:function(){return"Column actions"},uuid:"column_actions_grouping"}].concat((0,r.Z)(q));return x||e.splice(1,0,{bold:!0,items:(0,ne.hr)(n,R.tf.TRANSFORMER,K),label:function(){return"Data sources"},uuid:"data_sources_grouping"}),e}),[n,q,x,K,V]),J=(0,i.useCallback)((function(){return D(null)}),[]),$=(0,i.useCallback)((function(e){return null===E||void 0===E?void 0:E((function(n){return null===n||w!==e?t:null}))}),[t,w,E]),ee=de.qL.PYSPARK===K,te=(0,i.useMemo)((function(){return(0,ne.oM)(o,n)}),[n,o]),oe=(0,i.useMemo)((function(){return(0,ne.hr)(n,R.tf.DATA_LOADER,K,{blockTemplatesByBlockType:te,showBrowseTemplates:T})}),[n,te,K,T]),re=(0,i.useMemo)((function(){return(0,ne.hr)(n,R.tf.DATA_EXPORTER,K,{blockTemplatesByBlockType:te,showBrowseTemplates:T})}),[n,te,K,T]),ie=(0,i.useMemo)((function(){return ee||de.qL.INTEGRATION===K?X:z?[{items:(0,ne.hr)(n,R.tf.TRANSFORMER,K),label:function(){return"Python"},uuid:"transformers/python"}].concat((0,r.Z)((0,ne.hr)(n,R.tf.TRANSFORMER,K,{blockTemplatesByBlockType:te,onlyCustomTemplate:!0,showBrowseTemplates:T}))):[{items:X,label:function(){return"Python"},uuid:"transformers/python_all"}].concat((0,r.Z)((0,ne.qs)(n,R.tf.TRANSFORMER)),(0,r.Z)((0,ne.hr)(n,R.tf.TRANSFORMER,K,{blockTemplatesByBlockType:te,onlyCustomTemplate:!0,showBrowseTemplates:T})))}),[n,X,te,ee,z,K,T]),ue=(0,i.useMemo)((function(){return[{label:function(){return"New model"},onClick:function(){null===y||void 0===y||y(!0),null===j||void 0===j||j(t)},uuid:"dbt/new_model"},{label:function(){return"Single model or snapshot (from file)"},onClick:function(){return null===j||void 0===j?void 0:j(t)},uuid:"dbt/single_model"},{label:function(){return"All models (w/ optional exclusion)"},onClick:function(){return n({configuration:{dbt:{command:"run"}},language:R.t6.YAML,type:R.tf.DBT})},uuid:"dbt/all_models"},{label:function(){return"Generic dbt command"},onClick:function(){return n({configuration:{dbt:{command:null}},language:R.t6.YAML,type:R.tf.DBT})},uuid:"dbt/generic_command"}]}),[n,t,j,y]);return(0,i.useMemo)((function(){var e;return de.qL.PYTHON===K&&!ee&&(null===O||void 0===O||null===(e=O.features)||void 0===e?void 0:e[fe.d.ADD_NEW_BLOCK_V2])}),[ee,K,O])?(0,b.jsx)(ce,{addNewBlock:n,blockIdx:t,blockTemplatesByBlockType:te,compact:u,focused:l,itemsDBT:ue,pipelineType:K,project:O,searchTextInputRef:Z,setAddNewBlockMenuOpenIdx:E,setFocused:k,showBrowseTemplates:T,showConfigureProjectModal:I,showGlobalDataProducts:S}):(0,b.jsx)(p.ZP,{flexWrap:"wrap",inline:!0,children:(0,b.jsx)(d.Z,{onClickOutside:J,open:!0,children:(0,b.jsxs)(p.ZP,{flexWrap:"wrap",children:[!a&&(0,b.jsx)(me.W4,{increasedZIndex:0===w,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:oe,onClickCallback:J,open:0===w,parentRef:N,uuid:"data_loader_button",children:(0,b.jsx)(se.ZP,be(be({},Q),{},{beforeElement:(0,b.jsx)(me.Wx,{blue:!0,compact:u,children:(0,b.jsx)(_.mm,{size:Y})}),onClick:function(e){e.preventDefault(),D((function(e){return 0===e?null:0})),$(0)},uuid:"AddNewBlocks/Data_loader",children:"Data loader"}))})}),!g&&(0,b.jsx)(me.W4,{increasedZIndex:1===w,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:ie,onClickCallback:J,open:1===w,parentRef:M,uuid:"transformer_button",children:(0,b.jsx)(se.ZP,be(be({},Q),{},{beforeElement:(0,b.jsx)(me.Wx,{compact:u,purple:!0,children:(0,b.jsx)(_.mm,{size:Y})}),onClick:function(e){e.preventDefault(),D((function(e){return 1===e?null:1})),$(1)},uuid:"AddNewBlocks/Transformer",children:"Transformer"}))})}),!a&&(0,b.jsx)(me.W4,{increasedZIndex:2===w,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:re,onClickCallback:J,open:2===w,parentRef:B,uuid:"data_exporter_button",children:(0,b.jsx)(se.ZP,be(be({},Q),{},{beforeElement:(0,b.jsx)(me.Wx,{compact:u,yellow:!0,children:(0,b.jsx)(_.mm,{inverted:!0,size:Y})}),onClick:function(e){e.preventDefault(),D((function(e){return 2===e?null:2})),$(2)},uuid:"AddNewBlocks/Data_exporter",children:"Data exporter"}))})}),!s&&(0,b.jsx)(me.W4,{increasedZIndex:3===w,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:[].concat((0,r.Z)(ue),(0,r.Z)((0,ne.hr)(n,R.tf.DBT,K,{blockTemplatesByBlockType:te,onlyCustomTemplate:!0,showBrowseTemplates:T}))),onClickCallback:J,open:3===w,parentRef:U,uuid:"dbt_button",children:(0,b.jsx)(se.ZP,be(be({},Q),{},{beforeElement:(0,b.jsx)(ae,{size:me.ZG*(u?.75:1.25)}),onClick:function(e){e.preventDefault(),D((function(e){return 3===e?null:3})),$(3)},uuid:"AddNewBlocks/DBT",children:"DBT model"}))})}),!c&&(0,b.jsx)(me.W4,{increasedZIndex:4===w,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:[{items:(0,ne.Bd)(n,R.tf.CUSTOM,R.t6.PYTHON),label:function(){return"Python"},uuid:"custom_block_python"},{items:(0,ne.Bd)(n,R.tf.CUSTOM,R.t6.SQL),label:function(){return"SQL"},uuid:"custom_block_sql"}].concat((0,r.Z)((0,ne.hr)(n,R.tf.CUSTOM,K,{blockTemplatesByBlockType:te,onlyCustomTemplate:!0,showBrowseTemplates:T}))),onClickCallback:J,open:4===w,parentRef:F,uuid:"custom_block_button",children:(0,b.jsx)(A.Z,{block:!0,label:"Add a custom code block with a designated color.",maxWidth:W,size:null,children:(0,b.jsx)(se.ZP,be(be({},Q),{},{beforeElement:(0,b.jsx)(me.Wx,{compact:u,grey:!0,children:(0,b.jsx)(_.mm,{inverted:!0,size:Y})}),onClick:function(e){e.preventDefault(),D((function(e){return 4===e?null:4})),$(4)},uuid:"AddNewBlocks/Scratchpad",children:"Custom"}))})})}),!v&&(0,b.jsx)(me.W4,{children:(0,b.jsx)(A.Z,{block:!0,label:"Write experimental code that doesn\u2019t get executed when you run your pipeline.",maxWidth:W,size:null,children:(0,b.jsx)(se.ZP,be(be({},Q),{},{beforeElement:(0,b.jsx)(me.Wx,{border:!0,compact:u,children:(0,b.jsx)(_.mm,{size:Y})}),onClick:function(e){e.preventDefault(),n({type:R.tf.SCRATCHPAD})},uuid:"AddNewBlocks/Scratchpad",children:"Scratchpad"}))})}),!v&&(0,b.jsx)(me.W4,{children:(0,b.jsx)(A.Z,{block:!0,label:"Add a global data product block",maxWidth:W,size:null,children:(0,b.jsx)(se.ZP,be(be({},Q),{},{beforeElement:(0,b.jsx)(me.Wx,{compact:u,children:(0,b.jsx)(_.ie,{size:Y})}),onClick:function(e){e.preventDefault(),S({addNewBlock:n})},uuid:"AddNewBlocks/GlobalDataProducts",children:"Global data product"}))})}),!z&&!h&&(0,b.jsx)(me.W4,{increasedZIndex:6===w,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:[].concat((0,r.Z)((0,ne.hr)(n,R.tf.SENSOR,K)),(0,r.Z)((0,ne.hr)(n,R.tf.SENSOR,K,{blockTemplatesByBlockType:te,onlyCustomTemplate:!0,showBrowseTemplates:T}))),onClickCallback:J,open:6===w,parentRef:G,uuid:"sensor_button",children:(0,b.jsx)(se.ZP,be(be({},Q),{},{beforeElement:(0,b.jsx)(me.Wx,{compact:u,children:(0,b.jsx)(_.LM,{pink:!0,size:me.ZG*(u?.75:1.25)})}),onClick:function(e){e.preventDefault(),D((function(e){return 6===e?null:6})),$(6)},uuid:"AddNewBlocks/Sensor",children:"Sensor"}))})}),!f&&(0,b.jsx)(me.W4,{increasedZIndex:7===w,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:[{label:function(){return"Generic (no template)"},onClick:function(){n({language:R.t6.MARKDOWN,type:R.tf.MARKDOWN})},uuid:"generic_markdown"}].concat((0,r.Z)((0,ne.hr)(n,R.tf.MARKDOWN,K,{blockTemplatesByBlockType:te,onlyCustomTemplate:!0,showBrowseTemplates:T}))),onClickCallback:J,open:7===w,parentRef:H,uuid:"markdown_button",children:(0,b.jsx)(se.ZP,be(be({},Q),{},{beforeElement:(0,b.jsx)(me.Wx,{compact:u,sky:!0,children:(0,b.jsx)(_.mm,{inverted:!0,size:Y})}),onClick:function(e){e.preventDefault(),D((function(e){return 7===e?null:7})),$(7)},uuid:"AddNewBlocks/Markdown",children:"Markdown"}))})})]})})})}},38399:function(e,n,t){t.d(n,{Bd:function(){return E},SF:function(){return y},X7:function(){return k},hr:function(){return O},oM:function(){return C},q_:function(){return Z},qs:function(){return j}});var o=t(21831),r=t(82394),i=t(55485),u=t(30160),l=t(5677),c=t(72473),a=t(44425),s=t(84438),d=t(57653),f=t(81728),p=t(55283),m=t(86735),v=t(28598);function h(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}var b=function(e,n,t){var o=t===d.qL.STREAMING&&(e===a.tf.DATA_LOADER||e===a.tf.DATA_EXPORTER);return(function(e){var n;return e===d.qL.STREAMING?(n={},(0,r.Z)(n,a.tf.DATA_LOADER,[s.ZP.AMAZON_SQS,s.ZP.AZURE_EVENT_HUB,s.ZP.GOOGLE_CLOUD_PUBSUB,s.ZP.INFLUXDB,s.ZP.KAFKA,s.ZP.KINESIS,s.ZP.RABBITMQ]),(0,r.Z)(n,a.tf.DATA_EXPORTER,[s.ZP.AZURE_DATA_LAKE,s.ZP.BIGQUERY,s.ZP.CLICKHOUSE,s.ZP.DUCKDB,s.ZP.DUMMY,s.ZP.ELASTICSEARCH,s.ZP.INFLUXDB,s.ZP.S3,s.ZP.KAFKA,s.ZP.KINESIS,s.ZP.MONGODB,s.ZP.MSSQL,s.ZP.MYSQL,s.ZP.OPENSEARCH,s.ZP.POSTGRES,s.ZP.REDSHIFT,s.ZP.SNOWFLAKE,s.ZP.TRINO]),(0,r.Z)(n,a.tf.TRANSFORMER,[s.ZP.GENERIC]),n):s.cp}(t)[e]||[]).map((function(t){return{indent:e===a.tf.TRANSFORMER,label:function(){return s.MV[t]},onClick:function(){n({config:{data_source:t===s.ZP.GENERIC?null:t},language:o?a.t6.YAML:a.t6.PYTHON,type:e})},uuid:"".concat(e,"/").concat(t)}}))};function g(e,n){return{label:function(){return"SQL"},onClick:function(){return e({language:a.t6.SQL,type:n})},uuid:"".concat(n,"/sql")}}function x(e,n){return{label:function(){return"R"},onClick:function(){return e({language:a.t6.R,type:n})},uuid:"".concat(n,"/r")}}var j=function(e,n){return[g(e,n),x(e,n)]};function C(e,n){var t={};return null===e||void 0===e||e.forEach((function(e){var o=e.block_type,i=e.configuration,u=e.defaults,l=e.description,c=e.groups,a=e.language,s=e.name,d=e.path,f=e.template_type,p=e.template_variables;t[o]||(t[o]={}),t[o][a]||(t[o][a]={items:[],label:function(){return a},uuid:"".concat(o,"/").concat(a)});var m={label:function(){return s},onClick:function(){return n({config:{template_path:d,template_type:f,template_variables:p},configuration:i,defaults:u,language:a,type:o})},tooltip:function(){return l},uuid:d};if((null===c||void 0===c?void 0:c.length)>=1){var v=function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?h(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):h(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}({},t[o][a]),b=[null],g=[v];c.forEach((function(e,n){var t="".concat(o,"/").concat(a,"/").concat(c.slice(0,n+1).join("/")),r=g[n],i=r.items.findIndex((function(e){var n=e.uuid;return t===n})),u=i>=0?r.items[i]:null;u||(u={items:[],label:function(){return e},uuid:t}),b.push(i),g.push(u)})),b.push(-1),g.push(m);var x=g.length;t[o][a]=g.reduce((function(e,n,t){var o=x-t,r=g[o-2],i=g[o-1],u=b[o-1];return r?(u>=0?r.items[u]=i:r.items.push(i),r):i}),{})}else t[o][a].items.push(m)})),t}var O=function(e,n,t,o){var r=o||{},i=r.blockTemplatesByBlockType,u=r.dataIntegrationType,l=r.languages,c=r.onlyCustomTemplate,s=r.showBrowseTemplates,f={};null!==o&&void 0!==o&&o.v2||(f=Object.fromEntries(a.Ut.map((function(n){return[n,b(n,e,t)]}))));var p={label:function(){return"Custom template"},onClick:function(){return s({addNewBlock:e,blockType:n,language:a.t6.SQL})},uuid:"".concat(n,"/custom_template")};if(c)return[p];if(t===d.qL.PYSPARK||t===d.qL.STREAMING)return f[n];if(u&&null!==o&&void 0!==o&&o.v2){var v,h,j=(null===i||void 0===i||null===(v=i[n])||void 0===v||null===(h=v[u])||void 0===h?void 0:h.items)||[];return[{items:(0,m.YC)(j,(function(e){return(0,e.label)()})),uuid:"".concat(n,"/").concat(u)}]}var C,O,_=(null===i||void 0===i||null===(C=i[n])||void 0===C||null===(O=C[a.t6.PYTHON])||void 0===O?void 0:O.items)||[],Z=[{items:(0,m.YC)((f[n]||[]).concat(_),(function(e){return(0,e.label)()})),label:function(){return"Python"},uuid:"".concat(n,"/").concat(a.t6.PYTHON)}];return(!l||null!==l&&void 0!==l&&l.includes(a.t6.SQL))&&Z.push(g(e,n)),(!l||null!==l&&void 0!==l&&l.includes(a.t6.R))&&Z.push(x(e,n)),![a.tf.MARKDOWN,a.tf.SCRATCHPAD].includes(n)&&s&&Z.push(p),Z};function _(e,n,t){return e.map((function(e){return{indent:!0,label:function(){return l.NX[n][e]},onClick:function(){t({config:{action_type:e,axis:n},language:a.t6.PYTHON,type:a.tf.TRANSFORMER})},uuid:"".concat(n,"_").concat(e)}})).sort((function(e,n){return e.label().localeCompare(n.label())}))}function Z(e,n,t){var r=[];return e.forEach((function(e){if(e!==l._G.MISC)r.push({indent:!0,items:_(l.d9[n][e],n,t),label:function(){return e},uuid:"".concat(n,"_grouping_").concat((0,f.RA)(e))});else{var i=_(l.d9[n][e],n,t);r.push.apply(r,(0,o.Z)(i))}})),r}var E=function(e,n,t){return Object.values(a.Lq).map((function(o){return{label:function(){return(0,v.jsxs)(i.ZP,{alignItems:"center",children:[(0,v.jsx)(c.mm,{fill:(0,p.qn)(a.tf.CUSTOM,{blockColor:o}).accent,size:16}),"\xa0",(0,v.jsx)(u.ZP,{children:(0,f.kC)(o)})]})},leftAligned:!0,onClick:function(){e({color:o,language:t,type:n})},uuid:"".concat(t,"_").concat(o)}}))},y=function(e){return"-- Docs: https://docs.mage.ai/guides/sql-blocks\n"+(e||"")};function k(e,n){var t=n;return a.tf.SCRATCHPAD===e.type&&(t='"""\nNOTE: Scratchpad blocks are used only for experimentation and testing out code.\nThe code written here will not be executed as part of the pipeline.\n"""\n'+(n||"")),t}},74052:function(e,n,t){t.d(n,{Dp:function(){return h},OF:function(){return b},Q9:function(){return x},Rt:function(){return p},Rz:function(){return C},h8:function(){return g},k1:function(){return m},uS:function(){return j}});var o=t(21831),r=t(82394),i=t(48339),u=t(53808),l=t(3917),c=t(86735),a=t(81728),s=t(70320);function d(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function f(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?d(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function p(e){var n={},t={};return null===e||void 0===e||e.forEach((function(e){var o=e.content,r=e.outputs,u=e.type,l=e.uuid;(null===r||void 0===r?void 0:r.length)>=1&&(n[l]=r.map((function(e){if("object"===typeof e){var n=e||{},t=n.sample_data,o=n.shape,r=n.text_data,u=n.type;return t?{data:f({shape:o},t),type:u}:r&&(0,a.Pb)(r)?JSON.parse(r):r}return{data:String(e),type:i.Gi.TEXT}}))),t[u]||(t[u]={}),t[u][l]=o})),{content:t,messages:n}}function m(e,n,t){e.forEach((function(e){(0,u.t8)("".concat(t,"/").concat(e.uuid,"/codeCollapsed"),(0,u.Od)("".concat(n,"/").concat(e.uuid,"/codeCollapsed"))),(0,u.t8)("".concat(t,"/").concat(e.uuid,"/outputCollapsed"),(0,u.Od)("".concat(n,"/").concat(e.uuid,"/outputCollapsed")))}))}function v(e){return"".concat(e,"/").concat(u.kP)}function h(e){return(0,u.U2)(v(e),[])}function b(e,n){var t=h(e);t.includes(n)||(0,u.t8)(v(e),[].concat((0,o.Z)(t),[n]))}function g(e,n){var t=h(e).filter((function(e){return e!==n}));(0,u.t8)(v(e),t)}function x(e,n){var t=(0,c.HK)(n,(function(e){return e.uuid}));return e.map((function(e){return t[e]})).filter((function(e){return!!e}))}var j=function(e,n){var t=window.URL.createObjectURL(e),o=document.createElement("a");o.href=t,o.download=n,document.body.appendChild(o),o.click(),o.remove()};function C(e,n){var t,o=(0,s.q)(),r=null===n||void 0===n?void 0:n.isPipelineUpdating,i=null===n||void 0===n?void 0:n.pipelineContentTouched,u=null===n||void 0===n?void 0:n.pipelineLastSaved;if(i)t="Unsaved changes";else if(r)t="Saving changes...";else if(u){var c=(0,l.JX)(Number(u)/1e3);null!==e&&void 0!==e&&e.updated_at&&(c=(0,l.XG)(null===e||void 0===e?void 0:e.updated_at,o)),t="Last saved ".concat(c)}else t="All changes saved";return t}},8454:function(e,n,t){var o,r,i,u;t.d(n,{Q0:function(){return o},qs:function(){return r}}),function(e){e.ADD="add",e.AVERAGE="average",e.CLEAN_COLUMN_NAME="clean_column_name",e.COUNT="count",e.COUNT_DISTINCT="count_distinct",e.CUSTOM="custom",e.DIFF="diff",e.DROP_DUPLICATE="drop_duplicate",e.EXPAND_COLUMN="expand_column",e.EXPLODE="explode",e.FILTER="filter",e.FIRST="first",e.FIX_SYNTAX_ERRORS="fix_syntax_errors",e.GROUP="group",e.IMPUTE="impute",e.JOIN="join",e.LAST="last",e.LIMIT="limit",e.MAX="max",e.MEDIAN="median",e.MIN="min",e.MODE="mode",e.NORMALIZE="normalize",e.REFORMAT="reformat",e.REMOVE="remove",e.REMOVE_OUTLIERS="remove_outliers",e.SCALE="scale",e.SELECT="select",e.SHIFT_DOWN="shift_down",e.SHIFT_UP="shift_up",e.SORT="sort",e.STANDARDIZE="standardize",e.SUM="sum",e.UNION="union",e.UPDATE_TYPE="update_type",e.UPDATE_VALUE="update_value"}(o||(o={})),function(e){e.COLUMN="column",e.ROW="row"}(r||(r={})),function(e){e.NOT_APPLIED="not_applied",e.COMPLETED="completed"}(i||(i={})),function(e){e.FEATURE="feature"}(u||(u={}))},26084:function(e,n,t){var o;t.d(n,{Q:function(){return o}}),function(e){e.CALLBACK="callbacks",e.CONDITIONAL="conditionals"}(o||(o={}))},2548:function(e,n,t){var o;t.d(n,{L:function(){return o}}),function(e){e.BLOCK_FILE="block_file",e.CUSTOM_BLOCK_TEMPLATE="custom_block_template",e.GENERATE_BLOCK="generate_block",e.MAGE_TEMPLATE="mage_template"}(o||(o={}))},13803:function(e,n,t){var o,r;t.d(n,{I:function(){return r},O:function(){return o}}),function(e){e.DESTINATIONS="destinations",e.SOURCES="sources"}(o||(o={})),function(e){e.DATA_INTEGRATION="data_integration"}(r||(r={}))},35058:function(e,n,t){t.d(n,{$1:function(){return h},BD:function(){return j},CK:function(){return D},ED:function(){return c},JJ:function(){return l},JT:function(){return R},MP:function(){return N},Mi:function(){return I},Mv:function(){return O},PG:function(){return s},Pi:function(){return S},R8:function(){return i},Sv:function(){return g},Tv:function(){return P},Yf:function(){return k},Yg:function(){return f},a3:function(){return m},aE:function(){return M},aZ:function(){return T},bE:function(){return d},bk:function(){return y},bn:function(){return L},c0:function(){return B},cH:function(){return b},e:function(){return a},eN:function(){return u},eW:function(){return _},m$:function(){return C},m7:function(){return r},mW:function(){return E},nq:function(){return Z},oV:function(){return o},os:function(){return w},pA:function(){return A},rj:function(){return v},sc:function(){return x},v8:function(){return p}});var o,r="buckets",i="chart_style",u="group_by",l="height",c="index",a="legend_labels",s="limit",d="metrics",f="time_interval",p="width_percentage",m="x",v="y",h="y_sort_order",b="data_provider",g="data_provider_database",x="data_provider_profile",j="data_provider_schema",C="data_provider_table",O="dbt_profile_target",_="dbt_project_name",Z="export_write_policy",E="limit",y="unique_upstream_table_name",k="upstream_block_configuration",T="table_name",I="use_raw_sql",S="dbt",A="command",P=[m,v];!function(e){e.BAR_CHART="bar chart",e.CUSTOM="custom",e.HISTOGRAM="histogram",e.LINE_CHART="line chart",e.PIE_CHART="pie chart",e.TABLE="table",e.TIME_SERIES_BAR_CHART="time series bar chart",e.TIME_SERIES_LINE_CHART="time series line chart"}(o||(o={}));var R,w,D=[o.BAR_CHART,o.HISTOGRAM,o.LINE_CHART,o.PIE_CHART,o.TABLE,o.TIME_SERIES_BAR_CHART,o.TIME_SERIES_LINE_CHART];!function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(R||(R={})),function(e){e.AVERAGE="average",e.COUNT="count",e.COUNT_DISTINCT="count_distinct",e.MAX="max",e.MEDIAN="median",e.MIN="min",e.MODE="mode",e.SUM="sum"}(w||(w={}));var N,M,L=[w.AVERAGE,w.COUNT,w.COUNT_DISTINCT,w.MAX,w.MEDIAN,w.MIN,w.MODE,w.SUM];function B(e){return"".concat(e.aggregation,"(").concat(e.column,")")}!function(e){e.ASCENDING="ascending",e.DESCENDING="descending"}(N||(N={})),function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.MONTH="month",e.ORIGINAL="original",e.SECOND="second",e.WEEK="week",e.YEAR="year"}(M||(M={}))},44898:function(e,n,t){t.d(n,{R:function(){return r},Z:function(){return o}});var o="blocks",r="pipelines"},84438:function(e,n,t){t.d(n,{MV:function(){return c},cp:function(){return a},zJ:function(){return i}});var o,r,i,u=t(82394),l=t(44425);!function(e){e.AMAZON_SQS="amazon_sqs",e.API="api",e.AZURE_BLOB_STORAGE="azure_blob_storage",e.AZURE_DATA_LAKE="azure_data_lake",e.AZURE_EVENT_HUB="azure_event_hub",e.BIGQUERY="bigquery",e.CLICKHOUSE="clickhouse",e.DRUID="druid",e.DUCKDB="duckdb",e.DUMMY="dummy",e.ELASTICSEARCH="elasticsearch",e.FILE="file",e.GENERIC="generic",e.GOOGLE_CLOUD_PUBSUB="google_cloud_pubsub",e.GOOGLE_CLOUD_STORAGE="google_cloud_storage",e.INFLUXDB="influxdb",e.KAFKA="kafka",e.KINESIS="kinesis",e.MONGODB="mongodb",e.MSSQL="mssql",e.MYSQL="mysql",e.OPENSEARCH="opensearch",e.ORACLEDB="oracledb",e.POSTGRES="postgres",e.RABBITMQ="rabbitmq",e.REDSHIFT="redshift",e.S3="s3",e.SNOWFLAKE="snowflake",e.TRINO="trino"}(i||(i={}));var c=(o={},(0,u.Z)(o,i.AMAZON_SQS,"Amazon SQS"),(0,u.Z)(o,i.API,"API"),(0,u.Z)(o,i.AZURE_BLOB_STORAGE,"Azure Blob Storage"),(0,u.Z)(o,i.AZURE_DATA_LAKE,"Azure Data Lake"),(0,u.Z)(o,i.AZURE_EVENT_HUB,"Azure Event Hub"),(0,u.Z)(o,i.BIGQUERY,"Google BigQuery"),(0,u.Z)(o,i.CLICKHOUSE,"ClickHouse"),(0,u.Z)(o,i.DRUID,"Druid"),(0,u.Z)(o,i.DUCKDB,"DuckDB"),(0,u.Z)(o,i.DUMMY,"Dummy"),(0,u.Z)(o,i.ELASTICSEARCH,"ElasticSearch"),(0,u.Z)(o,i.FILE,"Local file"),(0,u.Z)(o,i.GENERIC,"Generic (no template)"),(0,u.Z)(o,i.GOOGLE_CLOUD_PUBSUB,"Google Cloud PubSub"),(0,u.Z)(o,i.GOOGLE_CLOUD_STORAGE,"Google Cloud Storage"),(0,u.Z)(o,i.INFLUXDB,"InfluxDB"),(0,u.Z)(o,i.KAFKA,"Kafka"),(0,u.Z)(o,i.KINESIS,"Kinesis"),(0,u.Z)(o,i.MONGODB,"MongoDB"),(0,u.Z)(o,i.MSSQL,"Microsoft SQL Server"),(0,u.Z)(o,i.MYSQL,"MySQL"),(0,u.Z)(o,i.OPENSEARCH,"OpenSearch"),(0,u.Z)(o,i.ORACLEDB,"OracleDB"),(0,u.Z)(o,i.POSTGRES,"PostgreSQL"),(0,u.Z)(o,i.RABBITMQ,"RabbitMQ"),(0,u.Z)(o,i.REDSHIFT,"Amazon Redshift"),(0,u.Z)(o,i.S3,"Amazon S3"),(0,u.Z)(o,i.SNOWFLAKE,"Snowflake"),(0,u.Z)(o,i.TRINO,"Trino"),o),a=(r={},(0,u.Z)(r,l.tf.DATA_LOADER,[i.GENERIC,i.FILE,i.API,i.AZURE_BLOB_STORAGE,i.BIGQUERY,i.DRUID,i.GOOGLE_CLOUD_STORAGE,i.MYSQL,i.ORACLEDB,i.POSTGRES,i.REDSHIFT,i.S3,i.SNOWFLAKE]),(0,u.Z)(r,l.tf.DATA_EXPORTER,[i.GENERIC,i.FILE,i.S3,i.AZURE_BLOB_STORAGE,i.GOOGLE_CLOUD_STORAGE,i.REDSHIFT,i.BIGQUERY,i.SNOWFLAKE,i.MYSQL,i.POSTGRES]),(0,u.Z)(r,l.tf.TRANSFORMER,[i.REDSHIFT,i.BIGQUERY,i.SNOWFLAKE,i.POSTGRES]),(0,u.Z)(r,l.tf.SENSOR,[i.GENERIC,i.S3,i.GOOGLE_CLOUD_STORAGE,i.REDSHIFT,i.BIGQUERY,i.SNOWFLAKE,i.MYSQL,i.POSTGRES]),r);n.ZP=i},15135:function(e,n,t){t.d(n,{JD:function(){return v},Lu:function(){return i},PF:function(){return f},dT:function(){return u},n6:function(){return a},nB:function(){return m},oy:function(){return p},xF:function(){return d}});var o,r,i,u,l=t(82394),c=t(44425);!function(e){e.CSV="csv",e.JSON="json",e.MD="md",e.PY="py",e.R="r",e.SQL="sql",e.TXT="txt",e.YAML="yaml",e.YML="yml"}(i||(i={})),function(e){e.INIT_PY="__init__.py",e.METADATA_YAML="metadata.yaml",e.REQS_TXT="requirements.txt"}(u||(u={}));var a=[i.PY,i.SQL],s=[i.JSON,i.MD,i.PY,i.R,i.SQL,i.TXT,i.YAML,i.YML],d=new RegExp(s.map((function(e){return".".concat(e,"$")})).join("|")),f=(new RegExp(s.map((function(e){return".".concat(e,"$")})).join("|")),"charts"),p="pipelines",m=(o={},(0,l.Z)(o,i.MD,c.t6.MARKDOWN),(0,l.Z)(o,i.JSON,i.JSON),(0,l.Z)(o,i.PY,c.t6.PYTHON),(0,l.Z)(o,i.R,c.t6.R),(0,l.Z)(o,i.SQL,c.t6.SQL),(0,l.Z)(o,i.TXT,"text"),(0,l.Z)(o,i.YAML,c.t6.YAML),(0,l.Z)(o,i.YML,c.t6.YAML),o),v=(r={},(0,l.Z)(r,c.t6.MARKDOWN,i.MD),(0,l.Z)(r,c.t6.PYTHON,i.PY),(0,l.Z)(r,c.t6.R,i.R),(0,l.Z)(r,c.t6.SQL,i.SQL),(0,l.Z)(r,c.t6.YAML,i.YAML),(0,l.Z)(r,"text",i.TXT),r)},61599:function(e,n,t){t.d(n,{D5:function(){return h},MU:function(){return i},RL:function(){return c},Xv:function(){return a},Zj:function(){return v},_B:function(){return r},eL:function(){return s},fe:function(){return p},ks:function(){return f},th:function(){return m},u7:function(){return d},zS:function(){return u}});var o,r,i,u,l=t(82394);!function(e){e.FULL_TABLE="FULL_TABLE",e.INCREMENTAL="INCREMENTAL",e.LOG_BASED="LOG_BASED"}(r||(r={})),function(e){e.IGNORE="IGNORE",e.UPDATE="UPDATE"}(i||(i={})),function(e){e.DATE_TIME="date-time",e.UUID="uuid"}(u||(u={}));var c,a="datetime",s=(o={},(0,l.Z)(o,u.DATE_TIME,a),(0,l.Z)(o,u.UUID,u.UUID),o);!function(e){e.ARRAY="array",e.BOOLEAN="boolean",e.INTEGER="integer",e.NULL="null",e.NUMBER="number",e.OBJECT="object",e.STRING="string"}(c||(c={}));var d,f,p,m,v,h=[c.ARRAY,c.BOOLEAN,a,c.INTEGER,c.NULL,c.NUMBER,c.OBJECT,c.STRING,u.UUID];!function(e){e.PROPERTIES="properties"}(d||(d={})),function(e){e.AUTOMATIC="automatic",e.AVAILABLE="available",e.UNSUPPORTED="unsupported"}(f||(f={})),function(e){e.FORCED_REPLICATION_METHOD="forced-replication-method",e.KEY_PROPERTIES="table-key-properties",e.REPLICATION_KEYS="valid-replication-keys",e.SCHEMA_NAME="schema-name"}(p||(p={})),function(e){e.AMPLITUDE="amplitude",e.BIGQUERY="bigquery",e.CHARGEBEE="chargebee",e.GOOGLE_ADS="google_ads",e.GOOGLE_SEARCH_CONSOLE="google_search_console",e.GOOGLE_SHEETS="google_sheets",e.INTERCOM="intercom",e.MYSQL="mysql",e.PIPEDRIVE="pipedrive",e.POSTGRESQL="postgresql",e.REDSHIFT="redshift",e.SALESFORCE="salesforce",e.STRIPE="stripe"}(m||(m={})),function(e){e.BIGQUERY="bigquery",e.DELTA_LAKE_S3="delta_lake_s3",e.MYSQL="mysql",e.POSTGRESQL="postgresql",e.SNOWFLAKE="snowflake"}(v||(v={}))},7267:function(e,n,t){var o;t.d(n,{z:function(){return o}}),function(e){e.GENERATE_BLOCK_WITH_DESCRIPTION="generate_block_with_description",e.GENERATE_COMMENT_FOR_CODE="generate_comment_for_code",e.GENERATE_DOC_FOR_BLOCK="generate_doc_for_block",e.GENERATE_DOC_FOR_PIPELINE="generate_doc_for_pipeline",e.GENERATE_PIPELINE_WITH_DESCRIPTION="generate_pipeline_with_description"}(o||(o={}))},57653:function(e,n,t){t.d(n,{$1:function(){return s},G7:function(){return f},LM:function(){return p},Mj:function(){return m},QK:function(){return a},a_:function(){return h},kA:function(){return v},qL:function(){return u},r0:function(){return d}});var o,r,i,u,l=t(82394),c=t(72473);!function(e){e.INTEGRATION="integration",e.PYTHON="python",e.PYSPARK="pyspark",e.STREAMING="streaming"}(u||(u={}));var a,s,d,f=(o={},(0,l.Z)(o,u.INTEGRATION,"Integration"),(0,l.Z)(o,u.PYTHON,"Standard"),(0,l.Z)(o,u.PYSPARK,"PySpark"),(0,l.Z)(o,u.STREAMING,"Streaming"),o),p="all",m=(u.PYTHON,u.INTEGRATION,u.STREAMING,r={},(0,l.Z)(r,p,c.ie),(0,l.Z)(r,u.INTEGRATION,c.YC),(0,l.Z)(r,u.PYTHON,c.El),(0,l.Z)(r,u.STREAMING,c.dB),r);!function(e){e.ACTIVE="active",e.INACTIVE="inactive",e.NO_SCHEDULES="no_schedules",e.RETRY="retry",e.RETRY_INCOMPLETE_BLOCK_RUNS="retry_incomplete_block_runs"}(a||(a={})),function(e){e.GROUP="group_by",e.HISTORY_DAYS="from_history_days",e.STATUS="status[]",e.TAG="tag[]",e.TYPE="type[]"}(s||(s={})),function(e){e.STATUS="status",e.TAG="tag",e.TYPE="type"}(d||(d={}));var v=[a.ACTIVE,a.INACTIVE,a.NO_SCHEDULES],h=(i={},(0,l.Z)(i,u.PYTHON,"python3"),(0,l.Z)(i,u.PYSPARK,"pysparkkernel"),i)},5677:function(e,n,t){t.d(n,{NX:function(){return v},Wt:function(){return m},_G:function(){return c},c1:function(){return p},d9:function(){return f}});var o,r,i,u,l,c,a=t(82394),s=t(8454),d=(s.Q0.AVERAGE,s.Q0.CLEAN_COLUMN_NAME,s.Q0.COUNT,s.Q0.COUNT_DISTINCT,s.Q0.CUSTOM,s.Q0.DIFF,s.Q0.FIRST,s.Q0.FIX_SYNTAX_ERRORS,s.Q0.IMPUTE,s.Q0.LAST,s.Q0.MAX,s.Q0.MEDIAN,s.Q0.MIN,s.Q0.NORMALIZE,s.Q0.REFORMAT,s.Q0.REMOVE,s.Q0.REMOVE_OUTLIERS,s.Q0.SELECT,s.Q0.SHIFT_DOWN,s.Q0.SHIFT_UP,s.Q0.STANDARDIZE,s.Q0.SUM,[s.Q0.DROP_DUPLICATE,s.Q0.FILTER,s.Q0.SORT,s.Q0.REMOVE]);!function(e){e.AGGREGATE="Aggregate",e.FORMATTING="Formatting",e.COLUMN_REMOVAL="Column removal",e.SHIFT_ROWS="Shift rows in a column",e.MISC="Miscellaneous",e.FEATURE_SCALING="Feature Scaling"}(c||(c={}));var f=(r={},(0,a.Z)(r,s.qs.COLUMN,(o={},(0,a.Z)(o,c.AGGREGATE,[s.Q0.AVERAGE,s.Q0.COUNT,s.Q0.COUNT_DISTINCT,s.Q0.FIRST,s.Q0.LAST,s.Q0.MAX,s.Q0.MEDIAN,s.Q0.MIN,s.Q0.SUM]),(0,a.Z)(o,c.FORMATTING,[s.Q0.CLEAN_COLUMN_NAME,s.Q0.FIX_SYNTAX_ERRORS,s.Q0.REFORMAT]),(0,a.Z)(o,c.COLUMN_REMOVAL,[s.Q0.REMOVE,s.Q0.SELECT]),(0,a.Z)(o,c.SHIFT_ROWS,[s.Q0.SHIFT_DOWN,s.Q0.SHIFT_UP]),(0,a.Z)(o,c.MISC,[s.Q0.DIFF,s.Q0.IMPUTE,s.Q0.REMOVE_OUTLIERS]),(0,a.Z)(o,c.FEATURE_SCALING,[s.Q0.NORMALIZE,s.Q0.STANDARDIZE]),o)),(0,a.Z)(r,s.qs.ROW,(0,a.Z)({},c.MISC,[].concat(d))),r),p=Object.keys(f[s.qs.COLUMN]),m=[c.MISC],v=(l={},(0,a.Z)(l,s.qs.COLUMN,(i={},(0,a.Z)(i,s.Q0.ADD,"Add column"),(0,a.Z)(i,s.Q0.AVERAGE,"Aggregate by average value"),(0,a.Z)(i,s.Q0.CLEAN_COLUMN_NAME,"Clean column name"),(0,a.Z)(i,s.Q0.COUNT_DISTINCT,"Aggregate by distinct count"),(0,a.Z)(i,s.Q0.COUNT,"Aggregate by total count"),(0,a.Z)(i,s.Q0.DIFF,"Difference"),(0,a.Z)(i,s.Q0.FIRST,"Aggregate by first value"),(0,a.Z)(i,s.Q0.FIX_SYNTAX_ERRORS,"Fix syntax errors"),(0,a.Z)(i,s.Q0.IMPUTE,"Fill in missing values"),(0,a.Z)(i,s.Q0.NORMALIZE,"Normalize Data"),(0,a.Z)(i,s.Q0.STANDARDIZE,"Standardize Data"),(0,a.Z)(i,s.Q0.LAST,"Aggregate by last value"),(0,a.Z)(i,s.Q0.MAX,"Aggregate by maximum value"),(0,a.Z)(i,s.Q0.MEDIAN,"Aggregate by median value"),(0,a.Z)(i,s.Q0.MIN,"Aggregate by mininum value"),(0,a.Z)(i,s.Q0.REFORMAT,"Reformat"),(0,a.Z)(i,s.Q0.REMOVE_OUTLIERS,"Remove outliers"),(0,a.Z)(i,s.Q0.REMOVE,"Remove column(s)"),(0,a.Z)(i,s.Q0.SELECT,"Keep columns"),(0,a.Z)(i,s.Q0.SHIFT_DOWN,"Shift rows down in a column"),(0,a.Z)(i,s.Q0.SHIFT_UP,"Shift rows up in a column"),(0,a.Z)(i,s.Q0.SUM,"Aggregate by sum of values"),i)),(0,a.Z)(l,s.qs.ROW,(u={},(0,a.Z)(u,s.Q0.DROP_DUPLICATE,"Drop duplicates"),(0,a.Z)(u,s.Q0.FILTER,"Filter"),(0,a.Z)(u,s.Q0.SORT,"Sort"),(0,a.Z)(u,s.Q0.REMOVE,"Remove rows"),u)),l)},46732:function(e,n,t){var o=t(82394),r=t(26304),i=(t(82684),t(50724)),u=t(70374),l=t(28598),c=["children","items","open","onClickCallback","onClickOutside","parentRef","uuid","zIndex"];function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.children,t=e.items,o=e.open,a=e.onClickCallback,d=e.onClickOutside,f=e.parentRef,p=e.uuid,m=e.zIndex,v=(0,r.Z)(e,c),h=(0,l.jsxs)("div",{style:{position:"relative",zIndex:(d?3:2)+(m||0)},children:[(0,l.jsx)("div",{ref:f,children:n}),(0,l.jsx)(u.Z,s(s({},v),{},{items:t,onClickCallback:a,open:o,parentRef:f,uuid:p}))]});return d?(0,l.jsx)(i.Z,{onClickOutside:d,open:!0,children:h}):h}},56747:function(e,n,t){t.d(n,{Z:function(){return g}});var o=t(62369),r=t(54596),i=t(85854),u=t(48670),l=t(30160),c=t(44897),a=t(38626),s=t(95363),d=t(70515),f=t(42631),p=t(61896),m=t(47041),v="0.75em",h=a.default.div.withConfig({displayName:"indexstyle__MarkdownContainer",componentId:"sc-j72mol-0"})(["font-family:",";margin:0 ","px;overflow:auto;"," "," p{margin:0.5em 0;}blockquote{margin:"," 0;padding:","px 0;","}blockquote:before{content:'';font-size:","px;line-height:0.1em;margin-right:0.25em;vertical-align:-0.4em;}blockquote p{display:inline;}pre{border-radius:","px;white-space:pre;margin:"," 0;padding:","px;overflow-x:auto;"," "," span{padding:0;}}ul,ol{margin-bottom:",";padding-left:","px;}li{","}li > input[type='checkbox']{pointer-events:none;}table{"," margin:",";thead{font-family:",";","}th,td{padding:","px ","px;","}}"],s.ry,d.iI,m.w5,(function(e){return"\n color: ".concat((e.theme||c.Z).content.active,";\n ")}),v,d.iI,(function(e){return"\n border-left: ".concat(.5*d.iI,"px solid ").concat((e.theme||c.Z).content.active,";\n ")}),3*d.l4,f.BG,v,d.iI,m.w5,(function(e){return"\n background-color: ".concat((e.theme||c.Z).interactive.defaultBorder,";\n ")}),v,3*d.iI,p.iD,p.iD,v,s.nF,(function(e){return"\n border-bottom: ".concat(f.YF,"px solid ").concat((e.theme||c.Z).content.active,";\n ")}),.5*d.iI,.75*d.iI,(function(e){return"\n border: ".concat(f.YF,"px solid ").concat((e.theme||c.Z).content.muted,";\n ")})),b=t(28598);var g=function(e){var n=e.children;return(0,b.jsx)(h,{children:(0,b.jsx)(o.D,{components:{a:function(e){var n=e.children,t=e.href;return(0,b.jsx)(u.Z,{href:t,inline:!0,openNewWindow:!0,primary:!0,children:n})},code:function(e){var n=e.children;return(0,b.jsx)(l.ZP,{backgroundColor:c.Z.interactive.defaultBorder,inline:!0,monospace:!0,pre:!0,style:{fontSize:"13px"},children:n})},em:function(e){var n=e.children;return(0,b.jsx)(l.ZP,{inline:!0,italic:!0,children:n})},h1:function(e){var n=e.children;return(0,b.jsx)(i.Z,{level:1,children:n})},h2:function(e){var n=e.children;return(0,b.jsx)(i.Z,{level:2,children:n})},h3:function(e){var n=e.children;return(0,b.jsx)(i.Z,{level:3,children:n})},h4:function(e){var n=e.children;return(0,b.jsx)(i.Z,{level:4,children:n})},h5:function(e){var n=e.children;return(0,b.jsx)(i.Z,{level:5,children:n})},p:function(e){var n=e.children;return(0,b.jsx)(l.ZP,{children:n})},strong:function(e){var n=e.children;return(0,b.jsx)(l.ZP,{bold:!0,inline:!0,children:n})}},remarkPlugins:[r.Z],children:n})})}},65956:function(e,n,t){var o=t(38626),r=t(55485),i=t(38276),u=t(30160),l=t(44897),c=t(42631),a=t(47041),s=t(70515),d=t(28598),f=(0,o.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*s.iI,1.5*s.iI,1.5*s.iI),p=o.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],c.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||l.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||l.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||l.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||l.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||l.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),m=o.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],c.n_,c.n_,(function(e){return"\n background-color: ".concat((e.theme.background||l.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||l.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),f,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),v=o.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*s.iI,a.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*s.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),h=o.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],c.M8,c.YF,1.75*s.iI);n.Z=function(e){var n=e.borderless,t=e.children,o=e.containerRef,l=e.contentContainerRef,c=e.dark,a=e.footer,s=e.fullHeight,f=void 0===s||s,b=e.fullWidth,g=void 0===b||b,x=e.header,j=e.headerHeight,C=e.headerIcon,O=e.headerPaddingVertical,_=e.headerTitle,Z=e.maxHeight,E=e.maxWidth,y=e.minWidth,k=e.noPadding,T=e.overflowVisible,I=e.subtitle,S=e.success;return(0,d.jsxs)(p,{borderless:n,dark:c,fullHeight:f,fullWidth:g,maxHeight:Z,maxWidth:E,minWidth:y,overflowVisible:T,ref:o,success:S,children:[(x||_)&&(0,d.jsxs)(m,{headerPaddingVertical:O,height:j,children:[x&&x,_&&(0,d.jsx)(r.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,d.jsxs)(r.ZP,{alignItems:"center",children:[C&&C,(0,d.jsx)(i.Z,{ml:C?1:0,children:(0,d.jsx)(u.ZP,{bold:!0,default:!0,children:_})})]})})]}),(0,d.jsxs)(v,{maxHeight:Z,noPadding:k,overflowVisible:T,ref:l,children:[I&&(0,d.jsx)(i.Z,{mb:2,children:(0,d.jsx)(u.ZP,{default:!0,children:I})}),t]}),a&&(0,d.jsx)(h,{children:a})]})}},35185:function(e,n,t){var o=t(82394),r=t(91835),i=(t(82684),t(38626)),u=t(44897),l=t(42631),c=t(70515),a=t(28598);function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var f=i.default.div.withConfig({displayName:"ProgressBar__ProgressBarContainerStyle",componentId:"sc-10x9ojc-0"})(["border-radius:","px;height:","px;overflow:hidden;position:relative;width:100%;",""],l.BG,.75*c.iI,(function(e){return"\n background-color: ".concat((e.theme.monotone||u.Z.monotone).grey200,";\n ")})),p=i.default.div.withConfig({displayName:"ProgressBar__ProgressBarStyle",componentId:"sc-10x9ojc-1"})(["height:inherit;position:absolute;"," "," "," ",""],(function(e){return!e.danger&&"\n background-color: ".concat((e.theme.progress||u.Z.progress).positive,";\n ")}),(function(e){return e.progress&&"\n width: ".concat(e.progress,"%;\n ")}),(function(e){return e.danger&&"\n background-color: ".concat((e.theme.progress||u.Z.progress).negative,";\n ")}),(function(e){return e.animateProgress&&"\n animation: animate-progress ".concat(e.animateProgress.duration,"ms linear forwards;\n\n @keyframes animate-progress {\n 0% {\n width: ").concat(e.animateProgress.start,"%;\n }\n\n 100% {\n width: ").concat(e.animateProgress.end,"%;\n }\n }\n ")}));n.Z=function(e){var n=(0,r.Z)({},e);return(0,a.jsx)(f,d(d({},n),{},{children:(0,a.jsx)(p,d({},n))}))}},13507:function(e,n,t){var o=t(28598);n.Z=function(e){var n=e.fill,t=void 0===n?"white":n,r=e.size;return(0,o.jsxs)("svg",{fill:"none",height:r,viewBox:"0 0 20 20",width:r,xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsxs)("g",{clipPath:"url(#clip0_11802_82850)",children:[(0,o.jsx)("path",{d:"M15.6276 1.73378C15.97 1.96689 16.022 2.44136 15.7638 2.76532C15.5057 3.08929 15.0355 3.13958 14.69 2.91102C13.3636 2.0334 11.8126 1.54269 10.2126 1.50266C8.36175 1.45636 6.54643 2.01561 5.04253 3.09541C3.53863 4.1752 2.4284 5.71649 1.8806 7.48498C1.40702 9.01387 1.37618 10.6403 1.7837 12.1777C1.88982 12.5781 1.69185 13.0076 1.30237 13.1486C0.912892 13.2896 0.479935 13.0887 0.368517 12.6897C-0.147093 10.8435 -0.122519 8.88224 0.447763 7.04116C1.09223 4.96057 2.39838 3.14729 4.16768 1.87695C5.93697 0.606601 8.07265 -0.0513415 10.2501 0.00312922C12.1769 0.0513296 14.0431 0.655033 15.6276 1.73378Z",fill:t}),(0,o.jsx)("path",{d:"M13.2714 5.89383C13.5295 5.56986 13.4781 5.09341 13.1245 4.87771C12.2306 4.33247 11.2055 4.02828 10.15 4.00188C8.84359 3.9692 7.56218 4.36396 6.50061 5.12617C5.43903 5.88838 4.65534 6.97634 4.26866 8.22469C3.95628 9.23316 3.91679 10.3017 4.14767 11.323C4.23901 11.727 4.67403 11.928 5.06351 11.787C5.45299 11.6461 5.64766 11.216 5.57323 10.8086C5.44361 10.0989 5.48588 9.36461 5.70149 8.66852C5.9915 7.73226 6.57927 6.91628 7.37545 6.34463C8.17164 5.77297 9.13269 5.4769 10.1125 5.50141C10.841 5.51963 11.5503 5.71432 12.1813 6.06401C12.5436 6.26478 13.0133 6.2178 13.2714 5.89383Z",fill:t}),(0,o.jsx)("path",{clipRule:"evenodd",d:"M10 7.5C8.61929 7.5 7.5 8.61929 7.5 10C7.5 11.3807 8.61929 12.5 10 12.5C11.3807 12.5 12.5 11.3807 12.5 10C12.5 8.61929 11.3807 7.5 10 7.5ZM9 10C9 10.5523 9.44772 11 10 11C10.5523 11 11 10.5523 11 10C11 9.44772 10.5523 9 10 9C9.44772 9 9 9.44772 9 10Z",fill:t,fillRule:"evenodd"}),(0,o.jsx)("path",{d:"M6.87554 15.1223C6.52192 14.9066 6.47052 14.4301 6.72863 14.1062C6.98673 13.7822 7.45642 13.7352 7.81872 13.936C8.44971 14.2857 9.15897 14.4804 9.88746 14.4986C10.8673 14.5231 11.8284 14.227 12.6245 13.6554C13.4207 13.0837 14.0085 12.2677 14.2985 11.3315C14.5141 10.6354 14.5564 9.90111 14.4268 9.19144C14.3523 8.78397 14.547 8.35395 14.9365 8.21295C15.326 8.07196 15.761 8.27297 15.8523 8.67699C16.0832 9.69826 16.0437 10.7668 15.7313 11.7753C15.3447 13.0237 14.561 14.1116 13.4994 14.8738C12.4378 15.636 11.1564 16.0308 9.84995 15.9981C8.79455 15.9717 7.76942 15.6675 6.87554 15.1223Z",fill:t}),(0,o.jsx)("path",{d:"M4.23615 17.2347C3.97805 17.5586 4.03001 18.0331 4.37241 18.2662C5.95691 19.345 7.82314 19.9487 9.74992 19.9969C11.9274 20.0513 14.063 19.3934 15.8323 18.1231C17.6016 16.8527 18.9078 15.0394 19.5522 12.9588C20.1225 11.1178 20.1471 9.15647 19.6315 7.31026C19.5201 6.91131 19.0871 6.7104 18.6976 6.85139C18.3082 6.99238 18.1102 7.42188 18.2163 7.82227C18.6238 9.35971 18.593 10.9861 18.1194 12.515C17.5716 14.2835 16.4614 15.8248 14.9575 16.9046C13.4536 17.9844 11.6382 18.5436 9.78743 18.4973C8.18738 18.4573 6.63645 17.9666 5.30996 17.089C4.96451 16.8604 4.49426 16.9107 4.23615 17.2347Z",fill:t})]}),(0,o.jsx)("defs",{children:(0,o.jsx)("clipPath",{id:"clip0_11802_82850",children:(0,o.jsx)("rect",{fill:t,height:"20",width:"20"})})})]})}},94777:function(e,n,t){var o=t(75582),r=t(82684),i=t(34376),u=t(71180),l=t(55485),c=t(65956),a=t(38276),s=t(30160),d=t(89538),f=t(28598);n.Z=function(e){var n=e.shouldWarn,t=e.warningMessage,p=(0,i.useRouter)(),m=(0,r.useState)(!1),v=m[0],h=m[1],b=(0,r.useState)({isModalOpen:!1,nextRoute:null}),g=b[0],x=b[1];(0,r.useEffect)((function(){var e=function(e){if(n)return e.preventDefault(),(e||window.event).returnValue="Are you sure you want to leave?"};return window.addEventListener("beforeunload",e),function(){window.removeEventListener("beforeunload",e)}}),[n]),(0,r.useEffect)((function(){var e=function(e){if(n&&!v)throw x({isModalOpen:!0,nextRoute:e}),p.events.emit("routeChangeError"),"navigation aborted"};p.events.on("routeChangeStart",e);var t=function(){return p.events.off("routeChangeStart",e)};if(v){if(!g.nextRoute)return;return p.push(g.nextRoute),t}return t}),[g,v,p,n]);var j=(0,d.dd)((function(){return(0,f.jsxs)(c.Z,{children:[(0,f.jsx)(s.ZP,{children:t}),(0,f.jsx)(a.Z,{mt:2,children:(0,f.jsxs)(l.ZP,{alignItems:"center",children:[(0,f.jsx)(u.Z,{onClick:function(){return h(!0)},primary:!0,children:"Leave"}),(0,f.jsx)(a.Z,{mr:1}),(0,f.jsx)(u.Z,{onClick:function(){x({isModalOpen:!1,nextRoute:null})},secondary:!0,children:"Cancel"})]})})]})}),{},[t],{background:!0,hideCallback:function(){x({isModalOpen:!1,nextRoute:null})},uuid:"stale_pipeline_message"}),C=(0,o.Z)(j,2),O=C[0],_=C[1];(0,r.useEffect)((function(){g.isModalOpen?O():_()}),[_,g.isModalOpen,O]);return{ConfirmLeaveModal:function(){return(0,f.jsx)("div",{})}}}},53405:function(e,n,t){t.d(n,{$C:function(){return _},AP:function(){return L},I1:function(){return o},JN:function(){return W},KN:function(){return M},Kq:function(){return K},M$:function(){return g},MB:function(){return O},Nf:function(){return w},Qu:function(){return x},RP:function(){return R},UA:function(){return k},Uc:function(){return y},VZ:function(){return U},WD:function(){return j},WE:function(){return z},Wi:function(){return Y},XE:function(){return Z},Z5:function(){return E},bX:function(){return Q},cU:function(){return h},eH:function(){return T},iN:function(){return H},ig:function(){return S},jC:function(){return N},jO:function(){return b},p$:function(){return A},qf:function(){return P},qx:function(){return B},th:function(){return G},wx:function(){return F},zB:function(){return I}});var o,r=t(75582),i=t(82394),u=t(21831),l=t(82684),c=t(44425),a=t(57653),s=t(61599),d=t(86735),f=t(42122);function p(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function m(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?p(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):p(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function v(e,n){return function(e,n,t){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{includeAllNodes:!1},r=(0,d.HK)(t,(function(e){return e.uuid})),i=(o||{}).includeAllNodes,u=[];function l(t){if(t){var o=(t[n]||[]).reduce((function(n,t){return e.uuid===t?n:n.concat(r[t])}),[]);(0===o.length||i&&e.uuid!==t.uuid)&&u.push(t),o.forEach((function(e){l(e)}))}}return l(e),u}(e,"upstream_blocks",n,{includeAllNodes:!0})}function h(e,n){return(0,l.useMemo)((function(){return e.map((function(t){var o=function(e,n){var t=v(e,n),o=t.filter((function(n){var t=n.configuration,o=n.uuid;return(null===t||void 0===t?void 0:t.dynamic)&&o!==(null===e||void 0===e?void 0:e.uuid)})),r=t.filter((function(n){var t=n.configuration,o=n.uuid;return(null===t||void 0===t?void 0:t.reduce_output)&&o!==(null===e||void 0===e?void 0:e.uuid)}));return{dynamicUpstreamBlock:o[0],dynamicUpstreamBlocks:o,reduceOutputUpstreamBlock:r[0],reduceOutputUpstreamBlocks:r}}(t,n),r=o.dynamicUpstreamBlock,i=o.dynamicUpstreamBlocks,u=o.reduceOutputUpstreamBlock,l=o.reduceOutputUpstreamBlocks,c=(t||{}).configuration||{},a=c.dynamic,s=c.reduce_output;return{block:t,blocksToUse:e,dynamic:!!a,dynamicUpstreamBlock:r,dynamicUpstreamBlocks:i,reduceOutput:!!s,reduceOutputUpstreamBlock:u,reduceOutputUpstreamBlocks:l}}))}),[n,null===n||void 0===n?void 0:n.map((function(e){var n=e.configuration;return null===n||void 0===n?void 0:n.dynamic})),null===n||void 0===n?void 0:n.map((function(e){var n=e.configuration;return null===n||void 0===n?void 0:n.reduce_output})),null===n||void 0===n?void 0:n.map((function(e){return e.upstream_blocks}))])}function b(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=e||{},o=t.configuration,r=t.language,i=t.type,u=o||{},l=u.data_integration,s=[c.tf.DATA_LOADER,c.tf.DATA_EXPORTER].includes(i);if(a.qL.PYTHON===(null===n||void 0===n?void 0:n.type)&&s){if(c.t6.YAML===r)return!0;if(c.t6.PYTHON===r&&l)return!0}return!1}function g(e){return(null===e||void 0===e?void 0:e.stream)||(null===e||void 0===e?void 0:e.tap_stream_id)}function x(e){return null===e||void 0===e?void 0:e.parent_stream}function j(e){return[x(e),g(e)].filter((function(e){return e})).join("/")}function C(e){var n;return 0===(null===e||void 0===e||null===(n=e.breadcrumb)||void 0===n?void 0:n.length)}function O(e){var n;return(null===e||void 0===e||null===(n=e.metadata)||void 0===n?void 0:n.find(C))||{breadcrumb:[],metadata:{}}}function _(e,n){var t=(null===n||void 0===n?void 0:n.catalog)||{streams:[]},o=(0,u.Z)((null===t||void 0===t?void 0:t.streams)||[]),r=null===o||void 0===o?void 0:o.findIndex((function(n){return j(n)===j(e)}));return r>=0?o[r]=e:o.push(e),m(m({},n),{},{catalog:m(m({},t),{},{streams:o})})}function Z(e,n){var t,o,r=m({},e);null!==r&&void 0!==r&&r.metadata||(r.metadata=[]);var i=null===r||void 0===r||null===(t=r.metadata)||void 0===t?void 0:t.findIndex(C),u={breadcrumb:[],metadata:{}};i>=0&&(u=O(r)||{breadcrumb:[],metadata:{}});var l=m(m({},u),{},{metadata:m(m({},null===(o=u)||void 0===o?void 0:o.metadata),n)});return i>=0?r.metadata[i]=l:r.metadata.push(l),r}function E(e){var n,t,o=(e||{}).metadata;return null===o||void 0===o||null===(n=o.find(C))||void 0===n||null===(t=n.metadata)||void 0===t?void 0:t.selected}function y(e,n){var t=(n||{}).getAll,o=null===e||void 0===e?void 0:e.catalog,r=(null===o||void 0===o?void 0:o.streams)||[];return t?r:null===r||void 0===r?void 0:r.filter(E)}function k(e,n){var t=n||{},o=t.noParents,r=t.parents,i={noParents:{},parents:{}};return null===e||void 0===e||e.forEach((function(e){var n,t=null===e||void 0===e?void 0:e.parent_stream,u=g(e);t?null!==r&&void 0!==r&&null!==(n=r[t])&&void 0!==n&&n[u]||(i.parents[t]||(i.parents[t]={}),i.parents[t][u]=e):null!==o&&void 0!==o&&o[u]||(i.noParents[u]=e)})),i}function T(e){var n=e||{},t=n.noParents,o=void 0===t?{}:t,r=n.parents,i=void 0===r?{}:r;return Object.values(o||[]).concat(Object.values(i||[]).reduce((function(e,n){return e.concat(Object.values(n))}),[]))}function I(e,n){var t,o,r,i=null===e||void 0===e?void 0:e.parent_stream,u=g(e);return i?null===n||void 0===n||null===(o=n.parents)||void 0===o||null===(r=o[i])||void 0===r?void 0:r[u]:null===n||void 0===n||null===(t=n.noParents)||void 0===t?void 0:t[u]}function S(e,n,t){return!!I(e,n)&&!!I(e,t)}function A(e,n,t){var o=function(e,n){var t,o,i={},u=[],l={};function c(e,n){null!==i&&void 0!==i&&i[e]||(i[e]={}),i[e]=m(m({},null===i||void 0===i?void 0:i[e]),n)}var a=(null===e||void 0===e||null===(t=e.schema)||void 0===t?void 0:t.properties)||{},s=(null===n||void 0===n||null===(o=n.schema)||void 0===o?void 0:o.properties)||{};return Object.entries(a).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],o=n[1],a=null===s||void 0===s?void 0:s[t];if(a){var p=(null===o||void 0===o?void 0:o.type)||[],m=(null===a||void 0===a?void 0:a.type)||[];(0,d.fS)(p,m)||c(t,{type:p});var v=null===o||void 0===o?void 0:o.format;v!==(null===a||void 0===a?void 0:a.format)&&c(t,{format:v});var h=(null===o||void 0===o?void 0:o.anyOf)||{},b=(null===a||void 0===a?void 0:a.anyOf)||{};(0,f.Xy)(h,b)||c(t,{anyOf:h}),null!==i&&void 0!==i&&i[t]&&(l[t]=o)}else u.push(t),l[t]=o})),{newColumnSettings:i,newColumns:u,stream:m(m({},n),{},{schema:m(m({},null===n||void 0===n?void 0:n.schema),{},{properties:m(m(m({},s),l),i)})})}}(I(e,n),I(e,t)),i=o||{},u=i.newColumnSettings,l=i.newColumns;if(!(0,f.Qr)(u||{})||(null===l||void 0===l?void 0:l.length)>=1)return o}function P(e,n){return[].concat((0,u.Z)(Object.values(e||{})),(0,u.Z)(Object.values(n||{}))).every((function(e){return(0,f.Qr)(e)}))}function R(e){var n,t,o=m({},(null===e||void 0===e||null===(n=e.schema)||void 0===n?void 0:n.properties)||{});return null===e||void 0===e||null===(t=e.metadata)||void 0===t||t.forEach((function(e){if(!C(e)){var n,t=null===e||void 0===e||null===(n=e.breadcrumb)||void 0===n?void 0:n.find((function(e){return e!==s.u7.PROPERTIES}));t&&null!==o&&void 0!==o&&o[t]&&(o[t]=m(m({},o[t]),{},{metadata:e}))}})),o}function w(e){var n;return null===e||void 0===e||null===(n=e.metadata)||void 0===n?void 0:n.reduce((function(e,n){if(C(n))return e;var t=D(n);return t&&(e[t]=n),e}),{})}function D(e){var n;return null===e||void 0===e||null===(n=e.breadcrumb)||void 0===n?void 0:n.find((function(e){return e!==s.u7.PROPERTIES}))}function N(e){return{breadcrumb:[s.u7.PROPERTIES,e],metadata:{inclusion:s.ks.AVAILABLE,selected:!0}}}function M(e,n){var t;return m(m({},e),{},{schema:m(m({},null===e||void 0===e?void 0:e.schema),{},{properties:m(m({},null===e||void 0===e||null===(t=e.schema)||void 0===t?void 0:t.properties),n)})})}function L(e,n){var t=O(e),o=m(m({},w(e)),n);return m(m({},e),{},{metadata:[t].concat((0,u.Z)(Object.values(o||{})))})}function B(e,n){var t=n||{},o=t.type,r=t.typesDerived,i=m({},n),l=(0,u.Z)(o),c=(0,u.Z)(r);return null===e||void 0===e||e.forEach((function(e){s.Xv===e?i.format=s.zS.DATE_TIME:s.zS.UUID===e?i.format=s.zS.UUID:(null!==l&&void 0!==l&&l.includes(e)||l.push(e),null!==c&&void 0!==c&&c.includes(e)||c.push(e))})),m(m({},i),{},{type:l,typesDerived:c})}function U(e,n){var t=n||{},o=t.format,r=t.type,i=t.typesDerived,l=m({},n),c=(0,u.Z)(r),a=(0,u.Z)(i);return null===e||void 0===e||e.forEach((function(e){if(o&&s.eL[o]===e)delete l.format;else{var n,t,r,i;if(null!==(n=c)&&void 0!==n&&n.includes(e))c=(0,u.Z)(null===(r=c)||void 0===r?void 0:r.filter((function(n){return n!==e})));if(null!==(t=a)&&void 0!==t&&t.includes(e))a=(0,u.Z)(null===(i=a)||void 0===i?void 0:i.filter((function(n){return n!==e})))}})),m(m({},l),{},{type:c,typesDerived:a})}function F(e,n){var t=n||{},o=t.format,r=t.type,i=void 0===r?[]:r,u=null===i||void 0===i?void 0:i.filter((function(e){var n;return!(null!==(n=[s.Xv,s.zS.UUID])&&void 0!==n&&n.includes(e))}));return s.eL[o]&&(null!==u&&void 0!==u&&u.includes(s.eL[o])||u.push(s.eL[o])),m(m({},n),{},{typesDerived:u,uuid:e})}function G(e){var n=e||{},t=n.noParents,o=n.parents;return[{groupHeader:null,streams:(0,d.YC)(Object.values(t),(function(e){return g(e)}))}].concat((0,u.Z)((0,d.YC)(Object.entries(o),(function(e){return(0,r.Z)(e,1)[0]})).map((function(e){var n=(0,r.Z)(e,2),t=n[0],o=n[1];return{groupHeader:t,streams:(0,d.YC)(Object.values(o),(function(e){return g(e)}))}}))))}function H(e,n,t){var o,r,u=(t||{}).remove,l=g(e||{}),c=x(e||{}),a=m({},n);if(c)u?null===a||void 0===a||(null===(o=a.parents)||void 0===o||(null===(r=o[c])||void 0===r||delete r[l])):a.parents=m(m({},null===a||void 0===a?void 0:a.parents),{},(0,i.Z)({},c,(0,i.Z)({},l,e)));else if(l){var s;if(u)null===a||void 0===a||(null===(s=a.noParents)||void 0===s||delete s[l]);else a.noParents=m(m({},null===a||void 0===a?void 0:a.noParents),{},(0,i.Z)({},l,e))}return a}function Q(e,n){var t=[o.AUTO_ADD_NEW_FIELDS,o.DISABLE_COLUMN_TYPE_CHECK,o.REPLICATION_METHOD,o.RUN_IN_PARALLEL,o.UNIQUE_CONFLICT_METHOD],u=Object.entries(n||{}).reduce((function(e,n){var t=(0,r.Z)(n,2),o=t[0],u=t[1],l=u.selected,c=u.value;return m(m({},e),l?(0,i.Z)({},o,c):{})}),{}),l=m({},e),c=e&&T(e)||[];return null===c||void 0===c||c.forEach((function(e){l=H(function(e){var n,o=m({},e);return null===o||void 0===o||null===(n=o.schema)||void 0===n||n.properties,Object.entries(u||{}).forEach((function(e){var n=(0,r.Z)(e,2),i=n[0],u=n[1];t.includes(i)&&(o[i]=u)})),o}(e),l)})),l}function K(e,n,t){var u=[o.BOOKMARK_PROPERTIES,o.KEY_PROPERTIES,o.PARTITION_KEYS,o.UNIQUE_CONSTRAINTS],l=Object.entries(n||{}).reduce((function(e,n){var t=(0,r.Z)(n,2),o=t[0];return t[1]?e.concat(o):e}),[]),c=Object.entries(t||{}).reduce((function(e,n){var t=(0,r.Z)(n,2),o=t[0],u=t[1],l=u.selected,c=u.value;return m(m({},e),l?(0,i.Z)({},o,c):{})}),{}),a=m({},e),p=e&&T(e)||[];return null===p||void 0===p||p.forEach((function(e){a=H(function(e){var n,t=m({},e),i=(null===t||void 0===t||null===(n=t.schema)||void 0===n?void 0:n.properties)||{},a=w(e);return null===l||void 0===l||l.forEach((function(e){null!==i&&void 0!==i&&i[e]&&Object.entries(c||{}).forEach((function(n){var l=(0,r.Z)(n,2),c=l[0],p=l[1];if(o.PROPERTY_SELECTED===c){var v=(null===a||void 0===a?void 0:a[e])||N(e)||{breadcrumb:[],metadata:{}},h=m(m({},v),{},{metadata:m(m({},null===v||void 0===v?void 0:v.metadata),{},{selected:p})});a[e]=h}else if(u.includes(c)){var b;null!==t&&void 0!==t&&t[c]||(t[c]=[]);var g=null===(b=t[c])||void 0===b?void 0:b.includes(e);p&&!g?t[c].push(e):!p&&g&&(t[c]=(0,d.Od)(t[c],(function(n){return n===e})))}else if(s.D5.includes(c)){var x,j=m({},(null===i||void 0===i?void 0:i[e])||{}),C=(p?B:U)([c],F(e,j)),O=C.anyOf,_=C.format,Z=C.type;null!==t&&void 0!==t&&t.schema||(t.schema={properties:{}}),null!==t&&void 0!==t&&null!==(x=t.schema)&&void 0!==x&&x.properties||(t.schema=m(m({},null===t||void 0===t?void 0:t.schema),{},{properties:{}}));var E=(0,f.hB)({anyOf:O,format:_,type:Z});t.schema.properties[e]=E}}))})),L(t,a)}(e),a)})),a}function z(e){var n,t,o=(null===e||void 0===e||null===(n=e.schema)||void 0===n?void 0:n.properties)||{};return null===e||void 0===e||null===(t=e.metadata)||void 0===t?void 0:t.reduce((function(e,n){var t;if(C(n))return e;if(!(null===n||void 0===n||null===(t=n.metadata)||void 0===t?void 0:t.selected))return e;var r=D(n),u=null===o||void 0===o?void 0:o[r];return m(m({},e),{},(0,i.Z)({},r,m(m({},u),{},{metadata:n,uuid:r})))}),{})}function Y(e,n){var t=(null===n||void 0===n?void 0:n.inputs)||{};return null===e||void 0===e?void 0:e.reduce((function(e,n){var o=null===n||void 0===n?void 0:n.uuid,r=o&&(null===t||void 0===t?void 0:t[o]);return r?e.concat({block:n,input:r}):e}),[])}function W(e){var n,t,o={},i={},u={};return null===e||void 0===e||null===(n=e.metadata)||void 0===n||n.forEach((function(e){if(!C(e)){var n,t=D(e);if(t&&null!==e&&void 0!==e&&e.metadata)u[t]=null===e||void 0===e||null===(n=e.metadata)||void 0===n?void 0:n.selected}})),Object.entries((null===e||void 0===e||null===(t=e.schema)||void 0===t?void 0:t.properties)||{}).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],l=m(m({},n[1]),{},{uuid:t});t in u?null!==u&&void 0!==u&&u[t]&&(i[t]=l):i[t]=l,o[t]=l})),{allColumns:o,selectedColumns:i}}!function(e){e.AUTO_ADD_NEW_FIELDS="auto_add_new_fields",e.BOOKMARK_PROPERTIES="bookmark_properties",e.DISABLE_COLUMN_TYPE_CHECK="disable_column_type_check",e.KEY_PROPERTIES="key_properties",e.PARTITION_KEYS="partition_keys",e.PROPERTY_SELECTED="property_selected",e.REPLICATION_METHOD="replication_method",e.RUN_IN_PARALLEL="run_in_parallel",e.UNIQUE_CONFLICT_METHOD="unique_conflict_method",e.UNIQUE_CONSTRAINTS="unique_constraints"}(o||(o={}))},65044:function(e,n,t){t.d(n,{Gr:function(){return r},Lz:function(){return o},Vc:function(){return u},gr:function(){return i}});var o=/\[__internal_output__\]/,r=/\[__internal_test__\]/,i="[__internal_output__]",u="[__internal_test__]"},58325:function(e,n,t){var o;t.d(n,{V5:function(){return i}}),function(e){e.ANDROID="Android",e.CHROME_OS="ChromeOS",e.IOS="iOS",e.LINUX="Linux",e.MAC="macOS",e.WINDOWS="Windows"}(o||(o={}));var r=o;function i(){return function(){var e,n,t,o,i,u,l,c=r.MAC,a=null===(e=window)||void 0===e||null===(n=e.navigator)||void 0===n?void 0:n.userAgent,s=(null===(t=window)||void 0===t||null===(o=t.navigator)||void 0===o||null===(i=o.userAgentData)||void 0===i?void 0:i.platform)||(null===(u=window)||void 0===u||null===(l=u.navigator)||void 0===l?void 0:l.platform);return s?["macOS","Macintosh","MacIntel","MacPPC","Mac68K"].includes(s)?c=r.MAC:["Win32","Win64","Windows","WinCE"].includes(s)?c=r.WINDOWS:["iPhone","iPad","iPod"].includes(s)&&(c=r.IOS):a&&(a.includes("Macintosh")?c=r.MAC:a.includes("Windows")?c=r.WINDOWS:a.includes("Linux")&&a.includes("X11")?c=r.LINUX:/(iPhone|iPad)/.test(a)?c=r.IOS:a.includes("Android")&&a.includes("Mobi")?c=r.ANDROID:a.includes("CrOS")&&(c=r.CHROME_OS)),c}()===r.MAC}}}]);
|