mage-ai 0.9.50__py3-none-any.whl → 0.9.51__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.

Files changed (144) hide show
  1. mage_ai/api/operations/base.py +11 -2
  2. mage_ai/api/presenters/WorkspacePresenter.py +1 -0
  3. mage_ai/cluster_manager/kubernetes/workload_manager.py +184 -147
  4. mage_ai/cluster_manager/workspace/kubernetes.py +25 -3
  5. mage_ai/data_preparation/executors/block_executor.py +10 -4
  6. mage_ai/data_preparation/models/global_hooks/models.py +9 -3
  7. mage_ai/data_preparation/models/pipeline.py +1 -47
  8. mage_ai/data_preparation/preferences.py +71 -27
  9. mage_ai/data_preparation/templates/custom/python/default.jinja +3 -5
  10. mage_ai/io/postgres.py +1 -0
  11. mage_ai/server/constants.py +1 -1
  12. mage_ai/server/frontend_dist/404.html +2 -2
  13. mage_ai/server/frontend_dist/_next/static/chunks/4138-1ffb2d1ab4fc61f2.js +1 -0
  14. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage-221f6ba4b04367c6.js → frontend_dist/_next/static/chunks/pages/manage-41c56c0ae1c15cb6.js} +1 -1
  15. mage_ai/server/frontend_dist/_next/static/{gxu21gnSyZ-GtqcWCfQmv → z6eg1yN60N6gosbEr2pGr}/_buildManifest.js +1 -1
  16. mage_ai/server/frontend_dist/block-layout.html +2 -2
  17. mage_ai/server/frontend_dist/compute.html +5 -5
  18. mage_ai/server/frontend_dist/files.html +5 -5
  19. mage_ai/server/frontend_dist/global-data-products/[...slug].html +5 -5
  20. mage_ai/server/frontend_dist/global-data-products.html +5 -5
  21. mage_ai/server/frontend_dist/global-hooks/[...slug].html +5 -5
  22. mage_ai/server/frontend_dist/global-hooks.html +5 -5
  23. mage_ai/server/frontend_dist/index.html +2 -2
  24. mage_ai/server/frontend_dist/manage/files.html +5 -5
  25. mage_ai/server/frontend_dist/manage/settings.html +5 -5
  26. mage_ai/server/frontend_dist/manage/users/[user].html +5 -5
  27. mage_ai/server/frontend_dist/manage/users/new.html +5 -5
  28. mage_ai/server/frontend_dist/manage/users.html +5 -5
  29. mage_ai/server/frontend_dist/manage.html +5 -5
  30. mage_ai/server/frontend_dist/oauth.html +4 -4
  31. mage_ai/server/frontend_dist/overview.html +5 -5
  32. mage_ai/server/frontend_dist/pipeline-runs.html +5 -5
  33. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +5 -5
  34. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +5 -5
  35. mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +5 -5
  36. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
  37. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +5 -5
  38. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +5 -5
  39. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +5 -5
  40. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +5 -5
  41. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +5 -5
  42. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +5 -5
  43. mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +5 -5
  44. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +5 -5
  45. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +5 -5
  46. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +5 -5
  47. mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
  48. mage_ai/server/frontend_dist/pipelines.html +5 -5
  49. mage_ai/server/frontend_dist/settings/account/profile.html +5 -5
  50. mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +5 -5
  51. mage_ai/server/frontend_dist/settings/workspace/permissions.html +5 -5
  52. mage_ai/server/frontend_dist/settings/workspace/preferences.html +5 -5
  53. mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +5 -5
  54. mage_ai/server/frontend_dist/settings/workspace/roles.html +5 -5
  55. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +5 -5
  56. mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +5 -5
  57. mage_ai/server/frontend_dist/settings/workspace/users.html +5 -5
  58. mage_ai/server/frontend_dist/settings.html +2 -2
  59. mage_ai/server/frontend_dist/sign-in.html +12 -12
  60. mage_ai/server/frontend_dist/templates/[...slug].html +5 -5
  61. mage_ai/server/frontend_dist/templates.html +5 -5
  62. mage_ai/server/frontend_dist/terminal.html +5 -5
  63. mage_ai/server/frontend_dist/test.html +5 -5
  64. mage_ai/server/frontend_dist/triggers.html +5 -5
  65. mage_ai/server/frontend_dist/version-control.html +5 -5
  66. mage_ai/server/frontend_dist_base_path_template/404.html +2 -2
  67. mage_ai/server/frontend_dist_base_path_template/_next/static/{nkbwVNyttvbUEHU4g3aOV → GkYZIZv7ClhebnBGgTrwO}/_buildManifest.js +1 -1
  68. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1952-0f9a12782f0aaae6.js → 1952-0c8a3cb84da67f53.js} +1 -1
  69. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{2714-68fef54789d7eaeb.js → 2714-1e79e9f2e998b544.js} +1 -1
  70. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{2717-82a714ddff3edf43.js → 2717-e599ab448e3c1b7f.js} +1 -1
  71. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{3437-ed09bb896e50e022.js → 3437-0712d7142aed2c46.js} +1 -1
  72. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4138-1ffb2d1ab4fc61f2.js +1 -0
  73. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{4783-422429203610c318.js → 4783-1a21d9be47574bba.js} +1 -1
  74. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{5896-7b8e36634d7d94eb.js → 5896-14e5a23b1c6a0769.js} +1 -1
  75. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{6285-648f9a732e100b2f.js → 6285-e9b45335bfb9ccaf.js} +1 -1
  76. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{6798-b904395b0c18647b.js → 6798-1ef0247e65215a0f.js} +1 -1
  77. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{976-0a8c2c4d7acd957b.js → 976-18c98af60b76f1a7.js} +1 -1
  78. mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage-221f6ba4b04367c6.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage-41c56c0ae1c15cb6.js} +1 -1
  79. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{edit-0cd2a275eb8b6345.js → edit-285ea9b8083b5f22.js} +1 -1
  80. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/{[run]-e9c1506c0a1f87b6.js → [run]-15deea898d2fa18b.js} +1 -1
  81. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{settings-495e877aa7ed709e.js → settings-6f5a7e367ec63c43.js} +1 -1
  82. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{preferences-f3c29ec53ee35795.js → preferences-b058d0ff37970cd9.js} +1 -1
  83. mage_ai/server/frontend_dist_base_path_template/block-layout.html +2 -2
  84. mage_ai/server/frontend_dist_base_path_template/compute.html +2 -2
  85. mage_ai/server/frontend_dist_base_path_template/files.html +2 -2
  86. mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +2 -2
  87. mage_ai/server/frontend_dist_base_path_template/global-data-products.html +2 -2
  88. mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +2 -2
  89. mage_ai/server/frontend_dist_base_path_template/global-hooks.html +2 -2
  90. mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
  91. mage_ai/server/frontend_dist_base_path_template/manage/files.html +2 -2
  92. mage_ai/server/frontend_dist_base_path_template/manage/settings.html +2 -2
  93. mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +2 -2
  94. mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +2 -2
  95. mage_ai/server/frontend_dist_base_path_template/manage/users.html +2 -2
  96. mage_ai/server/frontend_dist_base_path_template/manage.html +2 -2
  97. mage_ai/server/frontend_dist_base_path_template/oauth.html +2 -2
  98. mage_ai/server/frontend_dist_base_path_template/overview.html +2 -2
  99. mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +2 -2
  100. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  101. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +2 -2
  102. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +2 -2
  103. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
  104. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +2 -2
  105. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  106. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  107. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +2 -2
  108. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +2 -2
  109. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +2 -2
  110. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +2 -2
  111. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +2 -2
  112. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  113. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +2 -2
  114. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
  115. mage_ai/server/frontend_dist_base_path_template/pipelines.html +2 -2
  116. mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +2 -2
  117. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +2 -2
  118. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +2 -2
  119. mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +2 -2
  120. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +2 -2
  121. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +2 -2
  122. mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +2 -2
  123. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +2 -2
  124. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +2 -2
  125. mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
  126. mage_ai/server/frontend_dist_base_path_template/sign-in.html +2 -2
  127. mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +2 -2
  128. mage_ai/server/frontend_dist_base_path_template/templates.html +2 -2
  129. mage_ai/server/frontend_dist_base_path_template/terminal.html +2 -2
  130. mage_ai/server/frontend_dist_base_path_template/test.html +2 -2
  131. mage_ai/server/frontend_dist_base_path_template/triggers.html +2 -2
  132. mage_ai/server/frontend_dist_base_path_template/version-control.html +2 -2
  133. mage_ai/settings/__init__.py +32 -13
  134. mage_ai/tests/cluster_manager/kubernetes/test_workload_manager.py +76 -12
  135. {mage_ai-0.9.50.dist-info → mage_ai-0.9.51.dist-info}/METADATA +1 -1
  136. {mage_ai-0.9.50.dist-info → mage_ai-0.9.51.dist-info}/RECORD +142 -142
  137. mage_ai/server/frontend_dist/_next/static/chunks/4138-a2c37d37dba2f44c.js +0 -1
  138. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4138-a2c37d37dba2f44c.js +0 -1
  139. /mage_ai/server/frontend_dist/_next/static/{gxu21gnSyZ-GtqcWCfQmv → z6eg1yN60N6gosbEr2pGr}/_ssgManifest.js +0 -0
  140. /mage_ai/server/frontend_dist_base_path_template/_next/static/{nkbwVNyttvbUEHU4g3aOV → GkYZIZv7ClhebnBGgTrwO}/_ssgManifest.js +0 -0
  141. {mage_ai-0.9.50.dist-info → mage_ai-0.9.51.dist-info}/LICENSE +0 -0
  142. {mage_ai-0.9.50.dist-info → mage_ai-0.9.51.dist-info}/WHEEL +0 -0
  143. {mage_ai-0.9.50.dist-info → mage_ai-0.9.51.dist-info}/entry_points.txt +0 -0
  144. {mage_ai-0.9.50.dist-info → mage_ai-0.9.51.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1952],{52749:function(e,n,t){var i=t(82394),r=t(82684),o=t(71180),l=t(55485),d=t(93369),c=t(7267),u=t(38276),s=t(30160),a=t(35576),p=t(17488),f=t(72473),h=t(4015),v=t(70515),j=t(81728),m=t(28598);function g(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function x(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,i.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}n.Z=function(e){var n,t,i,g,b=e.createPipeline,Z=e.isLoading,y=e.onClose,P=(0,r.useRef)(null),O=(0,r.useState)(!1),w=O[0],I=O[1],k=(0,r.useState)({name:(0,j.Y6)()}),C=k[0],_=k[1];return(0,r.useEffect)((function(){var e;null===P||void 0===P||null===(e=P.current)||void 0===e||e.focus()}),[]),(0,m.jsxs)(h.Nk,{children:[(0,m.jsx)(h.I5,{children:(0,m.jsx)(l.ZP,{alignItems:"center",justifyContent:"center",children:(0,m.jsx)(f.xq,{size:5*v.iI,warning:!0})})}),(0,m.jsx)(h.gI,{children:(0,m.jsxs)(u.Z,{py:1,children:[(0,m.jsx)(u.Z,{mb:1,children:(0,m.jsx)(s.ZP,{default:!0,children:"New pipeline"})}),(0,m.jsx)(s.ZP,{textOverflow:!0,children:"Using AI"})]})}),(0,m.jsxs)(h.gI,{children:[(0,m.jsx)(s.ZP,{default:!0,children:"Name"}),(0,m.jsx)(p.Z,{alignRight:!0,noBackground:!0,noBorder:!0,onChange:function(e){return _((function(n){return x(x({},n),{},{name:e.target.value})}))},paddingVertical:v.iI,placeholder:"Enter pipeline name...",value:(null===C||void 0===C?void 0:C.name)||""})]}),(0,m.jsx)(h.gI,{children:(0,m.jsxs)(l.ZP,{flexDirection:"column",fullWidth:!0,children:[(0,m.jsx)(u.Z,{mb:2,pt:1,children:(0,m.jsx)(s.ZP,{default:!0,children:"Describe what the pipeline should do"})}),(0,m.jsxs)(u.Z,{pb:1,pr:v.cd,children:[(0,m.jsx)(a.Z,{fullWidth:!0,onChange:function(e){return _((function(n){return x(x({},n),{},{llm:{request:{pipeline_description:e.target.value},use_case:c.z.GENERATE_PIPELINE_WITH_DESCRIPTION}})}))},placeholder:"Type the pipeline purpose...",ref:P,rows:8,value:(null===C||void 0===C||null===(n=C.llm)||void 0===n||null===(t=n.request)||void 0===t?void 0:t.pipeline_description)||""}),(Z||w)&&(0,m.jsx)(u.Z,{mt:1,children:(0,m.jsx)(s.ZP,{warning:!0,children:"Pipeline is being generated using AI based on your description above..."})})]})]})}),(0,m.jsx)(h.$b,{children:(0,m.jsxs)(l.ZP,{fullWidth:!0,children:[(0,m.jsx)(d.ZP,{bold:!0,centerText:!0,disabled:!(null!==C&&void 0!==C&&C.name)||!(null!==C&&void 0!==C&&null!==(i=C.llm)&&void 0!==i&&null!==(g=i.request)&&void 0!==g&&g.pipeline_description),loading:Z||w,onClick:function(){I(!0),b({pipeline:C}).then((function(){return I(!1)}))},primary:!0,tabIndex:0,uuid:"AIControlPanel/CreatePipeline",children:"Create pipeline"}),y&&(0,m.jsx)(u.Z,{ml:1,children:(0,m.jsx)(o.ZP,{onClick:y,tabIndex:0,children:"Cancel"})})]})})]})}},60523:function(e,n,t){var i=t(21831),r=t(82394),o=t(82684),l=t(38626),d=t(34376),c=t(54750),u=t(71180),s=t(90299),a=t(44898),p=t(55485),f=t(88328),h=t(38276),v=t(4190),j=t(48381),m=t(5755),g=t(30160),x=t(35686),b=t(72473),Z=t(84649),y=t(32929),P=t(15610),O=t(19183),w=t(28598);function I(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function k(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?I(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):I(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n,t=e.contained,r=e.defaultLinkUUID,I=e.defaultTab,C=e.objectType,_=e.onClickCustomTemplate,S=e.pipelineUUID,N=e.showAddingNewTemplates,A=e.showBreadcrumbs,E=e.tabs,M=(0,d.useRouter)(),D=(0,o.useContext)(l.ThemeContext),T=(0,O.i)(),B=T.height,R=T.width,U=(0,o.useMemo)((function(){return E||y.dP}),[E]),H=(0,o.useState)(N||!1),q=H[0],L=H[1],z=(0,o.useState)(r?y.qy.find((function(e){return e.uuid===r})):y.qy[0]),F=z[0],W=z[1],G=(0,o.useState)(I?U.find((function(e){return e.uuid===(null===I||void 0===I?void 0:I.uuid)})):U[0]),V=G[0],Y=G[1],X=(0,o.useState)(null),$=X[0],K=X[1],Q=x.ZP.custom_templates.list({object_type:a.Z},{},{pauseFetch:y.n9.uuid!==(null===V||void 0===V?void 0:V.uuid)}),J=Q.data,ee=Q.mutate,ne=(0,o.useMemo)((function(){var e=(null===J||void 0===J?void 0:J.custom_templates)||[];return null!==F&&void 0!==F&&F.filterTemplates?null===F||void 0===F?void 0:F.filterTemplates(e):e}),[J,F]),te=x.ZP.custom_templates.list({object_type:a.R},{},{pauseFetch:y.A2.uuid!==(null===V||void 0===V?void 0:V.uuid)}),ie=te.data,re=te.mutate,oe=(0,o.useMemo)((function(){var e=(null===ie||void 0===ie?void 0:ie.custom_templates)||[];return null!==F&&void 0!==F&&F.filterTemplates?null===F||void 0===F?void 0:F.filterTemplates(e):e}),[ie,F]),le=(0,o.useMemo)((function(){return y.qy.map((function(e){var n=e.Icon,t=e.label,i=e.selectedBackgroundColor,r=e.selectedIconProps,o=e.uuid,l=(null===F||void 0===F?void 0:F.uuid)===o,d=k({size:Z.ZG},l&&r?r:{});return(0,w.jsx)(Z.wj,{onClick:function(){return W(e)},selected:l,children:(0,w.jsxs)(p.ZP,{alignItems:"center",children:[(0,w.jsx)(Z.ze,{backgroundColor:l&&i?i(D):null,children:n?(0,w.jsx)(n,k({},d)):(0,w.jsx)(b.pd,k({},d))}),(0,w.jsx)(g.ZP,{bold:!0,large:!0,children:t?t():o})]})},o)}))}),[F,D]),de=(0,o.useMemo)((function(){return y.hS.map((function(e){var n=e.Icon,t=e.label,i=e.selectedBackgroundColor,r=e.selectedIconProps,o=e.uuid,l=(null===F||void 0===F?void 0:F.uuid)===o,d=k({size:Z.ZG},l&&r?r:{});return(0,w.jsx)(Z.wj,{onClick:function(){return W(e)},selected:l,children:(0,w.jsxs)(p.ZP,{alignItems:"center",children:[(0,w.jsx)(Z.ze,{backgroundColor:l&&i?i(D):null,children:n?(0,w.jsx)(n,k({},d)):(0,w.jsx)(b.pd,k({},d))}),(0,w.jsx)(g.ZP,{bold:!0,large:!0,children:t?t():o})]})},o)}))}),[F,D]),ce=(0,o.useMemo)((function(){return null===ne||void 0===ne?void 0:ne.map((function(e){var n=e.description,t=e.name,r=e.tags,o=e.template_uuid,l=e.user,d=[];return null!==r&&void 0!==r&&r.length?d.push.apply(d,(0,i.Z)(r)):null!==l&&void 0!==l&&l.username&&d.push(null===l||void 0===l?void 0:l.username),(0,w.jsxs)(Z.UE,{onClick:function(){_?_(e):M.push("/templates/[...slug]","/templates/".concat(encodeURIComponent(o)))},children:[(0,w.jsx)(Z.Tj,{children:(0,w.jsx)(g.ZP,{bold:!0,monospace:!0,textOverflow:!0,children:t||o})}),(0,w.jsx)(Z.SL,{children:(0,w.jsx)(g.ZP,{default:!!n,italic:!n,muted:!n,textOverflowLines:2,children:n||"No description"})}),(0,w.jsx)(Z.EN,{children:(null===d||void 0===d?void 0:d.length)>=1&&(0,w.jsx)(j.Z,{tags:null===d||void 0===d?void 0:d.map((function(e){return{uuid:e}}))})})]},o)}))}),[ne,_,M]),ue=(0,o.useMemo)((function(){return null===oe||void 0===oe?void 0:oe.map((function(e){var n=e.description,t=e.name,r=e.tags,o=e.template_uuid,l=e.user,d=[];return null!==r&&void 0!==r&&r.length?d.push.apply(d,(0,i.Z)(r)):null!==l&&void 0!==l&&l.username&&d.push(null===l||void 0===l?void 0:l.username),(0,w.jsxs)(Z.UE,{onClick:function(){_?_(e):M.push("/templates/[...slug]","/templates/".concat(encodeURIComponent(o),"?object_type=").concat(a.R))},children:[(0,w.jsx)(Z.Tj,{children:(0,w.jsx)(g.ZP,{bold:!0,monospace:!0,textOverflow:!0,children:t||o})}),(0,w.jsx)(Z.SL,{children:(0,w.jsx)(g.ZP,{default:!!n,italic:!n,muted:!n,textOverflowLines:2,children:n||"No description"})}),(0,w.jsx)(Z.EN,{children:(null===d||void 0===d?void 0:d.length)>=1&&(0,w.jsx)(j.Z,{tags:null===d||void 0===d?void 0:d.map((function(e){return{uuid:e}}))})})]},o)}))}),[oe,_,M]),se=(0,o.useMemo)((function(){if(!A)return null;var e=[];return q?e.push.apply(e,[{label:function(){return"Templates"},onClick:function(){L(!1)}},{bold:!0,label:function(){return"New custom template"}}]):e.push({label:function(){return"Templates"}}),(0,w.jsx)(Z.FX,{children:(0,w.jsx)(c.Z,{breadcrumbs:e})})}),[q,A]),ae=(0,o.useMemo)((function(){return A?36:0}),[A]),pe=(0,o.useMemo)((function(){return B-ae}),[B,ae]);if(q)return n=a.R===C&&S?(0,w.jsx)(f.Z,{onMutateSuccess:re,pipelineUUID:S,templateAttributes:F&&(null===F||void 0===F?void 0:F.uuid)!==(null===y.qy||void 0===y.qy?void 0:y.qy[0].uuid)?{pipeline_type:null===F||void 0===F?void 0:F.uuid}:null,templateUUID:null===$||void 0===$?void 0:$.template_uuid}):(0,w.jsx)(m.Z,{contained:t,heightOffset:ae,onCreateCustomTemplate:t?function(e){K(e)}:null,onMutateSuccess:ee,templateAttributes:F&&(null===F||void 0===F?void 0:F.uuid)!==(null===y.qy||void 0===y.qy?void 0:y.qy[0].uuid)?{block_type:null===F||void 0===F?void 0:F.uuid}:null,templateUUID:null===$||void 0===$?void 0:$.template_uuid}),t?(0,w.jsxs)(w.Fragment,{children:[A&&se,(0,w.jsx)(Z.Rd,{height:pe,width:R,children:n})]}):n;var fe=(0,w.jsxs)(Z.Nk,{children:[(0,w.jsxs)(Z.bC,{height:t?pe:null,children:[(0,w.jsx)(Z.Yf,{children:(0,w.jsx)(s.Z,{noPadding:!0,onClickTab:function(e){t?Y(e):(0,P.u7)({object_type:y.A2.uuid===e.uuid?a.R:a.Z})},selectedTabUUID:null===V||void 0===V?void 0:V.uuid,tabs:U})}),(0,w.jsxs)(Z.wl,{contained:t,heightOffset:ae,children:[y.n9.uuid===(null===V||void 0===V?void 0:V.uuid)&&le,y.A2.uuid===(null===V||void 0===V?void 0:V.uuid)&&de]})]}),(0,w.jsxs)(Z.w5,{children:[y.n9.uuid===(null===V||void 0===V?void 0:V.uuid)&&(0,w.jsx)(Z.HS,{children:(0,w.jsx)(u.ZP,{beforeIcon:(0,w.jsx)(b.mm,{size:Z.ZG}),onClick:function(){L(!0)},primary:!0,children:"New block template"})}),y.n9.uuid===(null===V||void 0===V?void 0:V.uuid)&&(0,w.jsxs)(w.Fragment,{children:[!J&&(0,w.jsx)(h.Z,{p:2,children:(0,w.jsx)(v.Z,{inverted:!0})}),J&&!(null!==ce&&void 0!==ce&&ce.length)&&(0,w.jsxs)(h.Z,{p:2,children:[(0,w.jsx)(g.ZP,{children:"There are currently no templates matching your search."}),(0,w.jsx)("br",{}),(0,w.jsx)(g.ZP,{children:"Add a new template by clicking the button above."})]}),(null===ce||void 0===ce?void 0:ce.length)>=1&&(0,w.jsx)(Z.n8,{children:ce})]}),y.A2.uuid===(null===V||void 0===V?void 0:V.uuid)&&(0,w.jsxs)(w.Fragment,{children:[!ie&&(0,w.jsx)(h.Z,{p:2,children:(0,w.jsx)(v.Z,{inverted:!0})}),ie&&!(null!==ue&&void 0!==ue&&ue.length)&&(0,w.jsxs)(h.Z,{p:2,children:[(0,w.jsx)(g.ZP,{children:"There are currently no templates matching your search."}),(0,w.jsx)("br",{}),(0,w.jsx)(g.ZP,{children:'Add a new template by right-clicking a pipeline row from the Pipelines page and selecting "Create template".'})]}),(null===ue||void 0===ue?void 0:ue.length)>=1&&(0,w.jsx)(Z.n8,{children:ue})]})]})]});return t?(0,w.jsxs)(w.Fragment,{children:[A&&se,(0,w.jsx)(Z.Rd,{height:pe,width:R,children:fe})]}):fe}},94629:function(e,n,t){t.d(n,{Z:function(){return I}});var i=t(82394),r=t(21831),o=t(82684),l=t(50724),d=t(82555),c=t(97618),u=t(70613),s=t(68487),a=t(68899),p=t(28598);function f(e,n){var t=e.children,i=e.noPadding;return(0,p.jsx)(a.HS,{noPadding:i,ref:n,children:t})}var h=o.forwardRef(f),v=t(62547),j=t(82571),m=t(35686),g=t(98464),x=t(46684),b=t(70515),Z=t(53808),y=t(19183);function P(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function O(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 w(e,n){var t,i=e.addProjectBreadcrumbToCustomBreadcrumbs,f=e.after,P=e.afterHeader,w=e.afterHidden,I=e.afterWidth,k=e.afterWidthOverride,C=e.appendBreadcrumbs,_=e.before,S=e.beforeWidth,N=e.breadcrumbs,A=e.children,E=e.errors,M=e.headerMenuItems,D=e.headerOffset,T=e.hideAfterCompletely,B=e.mainContainerHeader,R=e.navigationItems,U=e.setAfterHidden,H=e.setErrors,q=e.subheaderChildren,L=e.subheaderNoPadding,z=e.title,F=e.uuid,W=(0,y.i)().width,G="dashboard_after_width_".concat(F),V="dashboard_before_width_".concat(F),Y=(0,o.useRef)(null),X=(0,o.useState)(k?I:(0,Z.U2)(G,I)),$=X[0],K=X[1],Q=(0,o.useState)(!1),J=Q[0],ee=Q[1],ne=(0,o.useState)(_?Math.max((0,Z.U2)(V,S),13*b.iI):null),te=ne[0],ie=ne[1],re=(0,o.useState)(!1),oe=re[0],le=re[1],de=(0,o.useState)(null)[1],ce=m.ZP.projects.list({},{revalidateOnFocus:!1}).data,ue=null===ce||void 0===ce?void 0:ce.projects,se={label:function(){var e;return null===ue||void 0===ue||null===(e=ue[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},ae=[];N&&(i&&ae.push(se),ae.push.apply(ae,(0,r.Z)(N))),(null===N||void 0===N||!N.length||C)&&(null===ue||void 0===ue?void 0:ue.length)>=1&&(null!==N&&void 0!==N&&N.length||ae.unshift({bold:!C,label:function(){return z}}),ae.unshift(se)),(0,o.useEffect)((function(){null===Y||void 0===Y||!Y.current||J||oe||null===de||void 0===de||de(Y.current.getBoundingClientRect().width)}),[J,$,oe,te,Y,de,W]),(0,o.useEffect)((function(){J||(0,Z.t8)(G,$)}),[w,J,$,G]),(0,o.useEffect)((function(){oe||(0,Z.t8)(V,te)}),[oe,te,V]);var pe=(0,g.Z)(I);return(0,o.useEffect)((function(){k&&pe!==I&&K(I)}),[k,I,pe]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(u.Z,{title:z}),(0,p.jsx)(s.Z,{breadcrumbs:ae,menuItems:M,project:null===ue||void 0===ue?void 0:ue[0],version:null===ue||void 0===ue||null===(t=ue[0])||void 0===t?void 0:t.version}),(0,p.jsxs)(a.Nk,{ref:n,children:[0!==(null===R||void 0===R?void 0:R.length)&&(0,p.jsx)(a.lm,{showMore:!0,children:(0,p.jsx)(j.Z,{navigationItems:R,showMore:!0})}),(0,p.jsx)(c.Z,{flex:1,flexDirection:"column",children:(0,p.jsxs)(v.Z,{after:f,afterHeader:P,afterHeightOffset:x.Mz,afterHidden:w,afterMousedownActive:J,afterWidth:$,before:_,beforeHeightOffset:x.Mz,beforeMousedownActive:oe,beforeWidth:a.k1+(_?te:0),headerOffset:D,hideAfterCompletely:!U||T,leftOffset:_?a.k1:null,mainContainerHeader:B,mainContainerRef:Y,setAfterHidden:U,setAfterMousedownActive:ee,setAfterWidth:K,setBeforeMousedownActive:le,setBeforeWidth:ie,children:[q&&(0,p.jsx)(h,{noPadding:L,children:q}),A]})})]}),E&&(0,p.jsx)(l.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===H||void 0===H?void 0:H(null)},children:(0,p.jsx)(d.Z,O(O({},E),{},{onClose:function(){return null===H||void 0===H?void 0:H(null)}}))})]})}var I=o.forwardRef(w)},65458:function(e,n,t){t.d(n,{d:function(){return s}});var i=t(13507),r=t(72473),o=t(57653),l=t(70515),d=t(81728),c=t(28598),u=1.5*l.iI,s=function(e,n){var t=[{beforeIcon:(0,c.jsx)(r.X5,{}),label:function(){return"Standard (batch)"},onClick:function(){return e({pipeline:{name:(0,d.Y6)()}})},uuid:"Pipelines/NewPipelineMenu/standard"},{beforeIcon:(0,c.jsx)(r.ZG,{}),label:function(){return"Data integration"},onClick:function(){return e({pipeline:{name:(0,d.Y6)(),type:o.qL.INTEGRATION}})},uuid:"Pipelines/NewPipelineMenu/integration"},{beforeIcon:(0,c.jsx)(i.Z,{size:u}),label:function(){return"Streaming"},onClick:function(){return e({pipeline:{name:(0,d.Y6)(),type:o.qL.STREAMING}})},uuid:"Pipelines/NewPipelineMenu/streaming"}];return null!==n&&void 0!==n&&n.showBrowseTemplates&&t.push({beforeIcon:(0,c.jsx)(r.zQ,{}),label:function(){return"From a template"},onClick:function(){var e;return null===n||void 0===n||null===(e=n.showBrowseTemplates)||void 0===e?void 0:e.call(n)},uuid:"Pipelines/NewPipelineMenu/custom_template"}),null!==n&&void 0!==n&&n.showAIModal&&t.push({beforeIcon:(0,c.jsx)(r.xq,{}),label:function(){return"Using AI (beta)"},onClick:function(){var e;return null===n||void 0===n||null===(e=n.showAIModal)||void 0===e?void 0:e.call(n)},uuid:"Pipelines/NewPipelineMenu/AI_modal"}),t}},4015:function(e,n,t){t.d(n,{$b:function(){return s},I5:function(){return c},Nk:function(){return d},gI:function(){return u}});var i=t(38626),r=t(44897),o=t(42631),l=t(70515),d=i.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-h093u4-0"})([""," ",""],(function(e){return!e.width&&"\n width: ".concat(40*l.iI,"px;\n ")}),(function(e){return e.width&&"\n width: ".concat(e.width,"px;\n ")})),c=i.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-h093u4-1"})(["padding:","px;",""],2.5*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).dashboard,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-top-left-radius: ").concat(o.n_,"px;\n border-top-right-radius: ").concat(o.n_,"px;\n border-top: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n ")})),u=i.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-h093u4-2"})(["align-items:center;justify-content:space-between;",""],(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).dashboard,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-top: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n display: ").concat((null===e||void 0===e?void 0:e.display)||"flex",";\n padding-bottom: ").concat(1*l.iI+((null===e||void 0===e?void 0:e.paddingVerticalAddition)||0),"px;\n padding-left: ").concat(l.cd*l.iI,"px;\n padding-top: ").concat(1*l.iI+((null===e||void 0===e?void 0:e.paddingVerticalAddition)||0),"px;\n ")})),s=i.default.div.withConfig({displayName:"indexstyle__FooterStyle",componentId:"sc-h093u4-3"})(["padding:","px ","px;",""],2.5*l.iI,2*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).panel,";\n border-bottom-left-radius: ").concat(o.n_,"px;\n border-bottom-right-radius: ").concat(o.n_,"px;\n border-bottom: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n ")}))},48381:function(e,n,t){var i=t(82684),r=t(31882),o=t(55485),l=t(30160),d=t(86735),c=t(28598);n.Z=function(e){var n=e.onClickTag,t=e.tags,u=void 0===t?[]:t,s=(0,i.useMemo)((function(){return(null===u||void 0===u?void 0:u.length)||0}),[u]),a=(0,i.useMemo)((function(){return(0,d.YC)(u||[],"uuid")}),[u]);return(0,c.jsx)(o.ZP,{alignItems:"center",flexWrap:"wrap",children:null===a||void 0===a?void 0:a.reduce((function(e,t){return e.push((0,c.jsx)("div",{style:{marginBottom:2,marginRight:s>=2?4:0,marginTop:2},children:(0,c.jsx)(r.Z,{onClick:n?function(){return n(t)}:null,small:!0,children:(0,c.jsx)(l.ZP,{children:t.uuid})})},"tag-".concat(t.uuid))),e}),[])})}},55729:function(e,n,t){t.d(n,{Z:function(){return B}});var i=t(82394),r=t(75582),o=t(82684),l=t(69864),d=t(71180),c=t(15338),u=t(97618),s=t(55485),a=t(85854),p=t(48670),f=t(65956),h=t(82359),v=t(88543),j=t(38276),m=t(30160),g=t(17488),x=t(69650),b=t(12468),Z=t(35686),y=t(38626),P=t(44897),O=t(42631),w=t(70515),I=y.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1b0w59t-0"})(["border-radius:","px;padding:","px;",""],O.n_,w.cd*w.iI,(function(e){return"\n background-color: ".concat((e.theme.background||P.Z.background).codeArea,";\n ")})),k=t(72473),C=t(72191),_=t(70320),S=t(81728),N=t(42122),A=t(72619),E=t(23780),M=t(28598);function D(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function T(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,i.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}var B=function(e){var n,t,y,P=e.cancelButtonText,O=e.contained,D=e.header,B=e.onCancel,R=e.onSaveSuccess,U=(0,E.VI)(null,{},[],{uuid:"settings/workspace/preferences"}),H=(0,r.Z)(U,1)[0],q=(0,o.useState)(null),L=q[0],z=q[1],F=(0,o.useState)(!1),W=F[0],G=F[1],V=Z.ZP.projects.list(),Y=V.data,X=V.mutate,$=(0,o.useMemo)((function(){var e;return null===Y||void 0===Y||null===(e=Y.projects)||void 0===e?void 0:e[0]}),[Y]),K=$||{},Q=K.name,J=K.openai_api_key,ee=K.project_uuid,ne=(0,o.useMemo)((function(){return"demo.mage.ai"===window.location.hostname}),[]);(0,o.useEffect)((function(){L||z($)}),[$,L]);var te=(0,l.Db)(Z.ZP.projects.useUpdate(Q),{onSuccess:function(e){return(0,A.wD)(e,{callback:function(e){var n,t=e.project;X(),z(t),G(!1),(0,_.hY)(null===t||void 0===t||null===(n=t.features)||void 0===n?void 0:n[h.d.LOCAL_TIMEZONE]),R&&(null===R||void 0===R||R(t))},onErrorCallback:function(e,n){return H({errors:n,response:e})}})}}),ie=(0,r.Z)(te,2),re=ie[0],oe=ie[1].isLoading,le=(0,o.useCallback)((function(e){return re({project:e})}),[re]),de=(0,M.jsxs)(M.Fragment,{children:[D,(0,M.jsxs)(f.Z,{noPadding:!0,children:[(0,M.jsxs)(j.Z,{p:w.cd,children:[(0,M.jsx)(j.Z,{mb:1,children:(0,M.jsx)(a.Z,{level:5,children:"Project name"})}),(0,M.jsx)(m.ZP,{default:!0,monospace:!0,children:Q})]}),(0,M.jsx)(c.Z,{light:!0}),(0,M.jsxs)(j.Z,{p:w.cd,children:[(0,M.jsx)(j.Z,{mb:1,children:(0,M.jsx)(a.Z,{level:5,children:"Project UUID"})}),(0,M.jsx)(m.ZP,{default:!!ee,monospace:!0,muted:!ee,children:ee||"Not required"})]}),(0,M.jsx)(c.Z,{light:!0}),(0,M.jsx)(j.Z,{p:w.cd,children:(0,M.jsxs)(s.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,M.jsxs)(u.Z,{flexDirection:"column",children:[(0,M.jsx)(j.Z,{mb:1,children:(0,M.jsx)(a.Z,{level:5,children:"Help improve Mage"})}),(0,M.jsxs)(m.ZP,{default:!0,children:["Please contribute usage statistics to help improve the developer experience for you and everyone in the community. Learn more ",(0,M.jsx)(p.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,children:"here"}),"."]})]}),(0,M.jsx)(j.Z,{mr:w.cd}),(0,M.jsx)(x.Z,{compact:!0,checked:null===L||void 0===L?void 0:L.help_improve_mage,onCheck:function(){return z((function(e){return T(T({},e),{},{help_improve_mage:!(null!==L&&void 0!==L&&L.help_improve_mage)})}))}})]})})]}),(0,M.jsx)(j.Z,{mt:w.HN}),(0,M.jsx)(v.Z,{description:"Global settings that are applied to all pipelines in this project.",title:"Pipeline settings",children:(0,M.jsx)(v.S,{description:"Every time a trigger is created or updated in this pipeline, automatically persist it in code.",title:"Save triggers in code automatically",toggleSwitch:{checked:!(null===L||void 0===L||null===(n=L.pipelines)||void 0===n||null===(t=n.settings)||void 0===t||null===(y=t.triggers)||void 0===y||!y.save_in_code_automatically),onCheck:function(e){return z((function(n){var t,i,r,o,l,d;return T(T({},n),{},{pipelines:T(T({},null===n||void 0===n?void 0:n.pipelines),{},{settings:T(T({},null===n||void 0===n||null===(t=n.pipelines)||void 0===t?void 0:t.settings),{},{triggers:T(T({},null===n||void 0===n||null===(i=n.pipelines)||void 0===i||null===(r=i.settings)||void 0===r?void 0:r.triggers),{},{save_in_code_automatically:e(null===n||void 0===n||null===(o=n.pipelines)||void 0===o||null===(l=o.settings)||void 0===l||null===(d=l.triggers)||void 0===d?void 0:d.save_in_code_automatically)})})})})}))}}})}),(0,M.jsx)(j.Z,{mt:w.HN}),(0,M.jsx)(f.Z,{noPadding:!0,overflowVisible:!0,children:(0,M.jsxs)(j.Z,{p:w.cd,children:[(0,M.jsx)(j.Z,{mb:1,children:(0,M.jsx)(a.Z,{level:5,children:"Features"})}),Object.entries((0,N.gR)(null===L||void 0===L?void 0:L.features,[h.d.GLOBAL_HOOKS])||{}).map((function(e,n){var t=(0,r.Z)(e,2),o=t[0],l=t[1];return(0,M.jsx)(j.Z,{mt:0===n?0:1,children:(0,M.jsxs)(s.ZP,{alignItems:"center",children:[(0,M.jsx)(x.Z,{checked:!!l,compact:!0,onCheck:function(){return z((function(e){return T(T({},e),{},{features:T(T({},null===L||void 0===L?void 0:L.features),{},(0,i.Z)({},o,!l))})}))}}),(0,M.jsx)(j.Z,{mr:w.cd}),(0,M.jsxs)(u.Z,{children:[(0,M.jsx)(m.ZP,{default:!l,monospace:!0,children:(0,S.vg)(o)}),o===h.d.LOCAL_TIMEZONE&&(0,M.jsx)(j.Z,{ml:1,children:(0,M.jsx)(b.Z,T({},_.EB))})]})]})},o)}))]})}),(0,M.jsx)(j.Z,{mt:w.HN}),(0,M.jsx)(f.Z,{noPadding:!0,children:(0,M.jsxs)(j.Z,{p:w.cd,children:[(0,M.jsx)(j.Z,{mb:1,children:(0,M.jsx)(a.Z,{level:5,children:"OpenAI"})}),J&&!W?(0,M.jsxs)(s.ZP,T(T({},s.A0),{},{children:[(0,M.jsx)(m.ZP,{default:!0,monospace:!0,children:"API key: ********"}),(0,M.jsx)(d.ZP,{iconOnly:!0,onClick:function(){return G(!0)},secondary:!0,title:"Edit",children:(0,M.jsx)(k.I8,{size:C.bL})})]})):(0,M.jsx)(g.Z,{disabled:ne,label:ne?"Entering API key is disabled on demo":"API key",monospace:!0,onChange:function(e){return z((function(n){return T(T({},n),{},{openai_api_key:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===L||void 0===L?void 0:L.openai_api_key)||""})]})}),(0,M.jsx)(j.Z,{mt:w.HN}),(0,M.jsxs)(s.ZP,{alignItems:"center",children:[(0,M.jsx)(d.ZP,{loading:oe,onClick:function(){le({features:null===L||void 0===L?void 0:L.features,help_improve_mage:null===L||void 0===L?void 0:L.help_improve_mage,openai_api_key:null===L||void 0===L?void 0:L.openai_api_key,pipelines:null===L||void 0===L?void 0:L.pipelines})},primary:!0,children:"Save project settings"}),B&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(j.Z,{mr:w.cd}),(0,M.jsx)(d.ZP,{onClick:B,secondary:!0,children:P||"Cancel"})]})]})]});return O?(0,M.jsx)(I,{children:de}):de}},88543:function(e,n,t){t.d(n,{S:function(){return Z},Z:function(){return y}});var i=t(82684),r=t(15338),o=t(97618),l=t(55485),d=t(85854),c=t(65956),u=t(82394),s=t(44085),a=t(38276),p=t(30160),f=t(17488),h=t(69650),v=t(72473),j=t(8193),m=t(70515),g=t(28598);function x(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function b(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?x(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):x(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Z=function(e){var n,t=e.children,i=e.description,r=e.invalid,d=e.large,c=void 0===d||d,u=e.selectInput,x=e.textInput,Z=e.title,y=e.toggleSwitch,P=e.warning;return(0,g.jsx)(a.Z,{p:m.cd,children:(0,g.jsxs)(l.ZP,{alignItems:"center",children:[(0,g.jsxs)(l.ZP,{flexDirection:"column",children:[(0,g.jsxs)(p.ZP,{danger:r,default:!0,large:c,warning:P,children:[Z," ",r&&(0,g.jsx)(p.ZP,{danger:!0,inline:!0,large:c,children:"is required"})]}),i&&"string"===typeof i&&(0,g.jsx)(p.ZP,{muted:!0,small:!0,children:i}),i&&"string"!==typeof i&&i]}),(0,g.jsx)(a.Z,{mr:m.cd}),(0,g.jsxs)(o.Z,{flex:1,justifyContent:"flex-end",children:[t,x&&(0,g.jsx)(f.Z,b({afterIcon:(0,g.jsx)(v.I8,{}),afterIconClick:function(e,n){var t;null===n||void 0===n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:j.Z,alignRight:!0,autoComplete:"off",large:c,noBackground:!0,noBorder:!0,fullWidth:!0,paddingHorizontal:0,paddingVertical:0,setContentOnMount:!0},x)),u&&(0,g.jsx)(s.Z,b(b({},u),{},{afterIcon:(0,g.jsx)(v._M,{}),afterIconSize:j.Z,alignRight:!0,autoComplete:"off",large:c,noBackground:!0,noBorder:!0,paddingHorizontal:0,paddingVertical:0,setContentOnMount:!0,children:null===u||void 0===u||null===(n=u.options)||void 0===n?void 0:n.map((function(e){var n=e.label,t=e.value;return(0,g.jsx)("option",{value:t,children:n||t},t)}))})),y&&(0,g.jsx)(h.Z,{checked:!(null===y||void 0===y||!y.checked),compact:!0,onCheck:null===y||void 0===y?void 0:y.onCheck})]})]})})},y=function(e){var n=e.children,t=e.description,u=e.headerChildren,s=e.title;return(0,g.jsxs)(c.Z,{noPadding:!0,children:[(0,g.jsx)(a.Z,{p:m.cd,children:(0,g.jsxs)(l.ZP,{alignItems:"center",children:[(0,g.jsxs)(o.Z,{flex:1,flexDirection:"column",children:[(0,g.jsx)(d.Z,{level:4,children:s}),t&&"string"===typeof t&&(0,g.jsx)(a.Z,{mt:1,children:(0,g.jsx)(p.ZP,{muted:!0,children:t})}),t&&"string"!==typeof t&&t]}),u]})}),i.Children.map(n,(function(e,n){return(0,g.jsxs)("div",{children:[(0,g.jsx)(r.Z,{light:!0}),e]},"".concat(s,"-").concat(n))}))]})}},8193:function(e,n,t){t.d(n,{N:function(){return c},Z:function(){return d}});var i=t(38626),r=t(44897),o=t(42631),l=t(70515),d=2*l.iI,c=i.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1ck7mzt-0"})(["border-radius:","px;padding:","px;",""],o.n_,l.cd*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).codeArea,";\n ")}))}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1952],{52749:function(e,n,t){var i=t(82394),r=t(82684),o=t(71180),l=t(55485),d=t(93369),c=t(7267),u=t(38276),s=t(30160),a=t(35576),p=t(17488),f=t(72473),h=t(4015),v=t(70515),j=t(81728),m=t(28598);function g(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function x(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,i.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}n.Z=function(e){var n,t,i,g,b=e.createPipeline,Z=e.isLoading,y=e.onClose,P=(0,r.useRef)(null),O=(0,r.useState)(!1),w=O[0],I=O[1],k=(0,r.useState)({name:(0,j.Y6)()}),C=k[0],_=k[1];return(0,r.useEffect)((function(){var e;null===P||void 0===P||null===(e=P.current)||void 0===e||e.focus()}),[]),(0,m.jsxs)(h.Nk,{children:[(0,m.jsx)(h.I5,{children:(0,m.jsx)(l.ZP,{alignItems:"center",justifyContent:"center",children:(0,m.jsx)(f.xq,{size:5*v.iI,warning:!0})})}),(0,m.jsx)(h.gI,{children:(0,m.jsxs)(u.Z,{py:1,children:[(0,m.jsx)(u.Z,{mb:1,children:(0,m.jsx)(s.ZP,{default:!0,children:"New pipeline"})}),(0,m.jsx)(s.ZP,{textOverflow:!0,children:"Using AI"})]})}),(0,m.jsxs)(h.gI,{children:[(0,m.jsx)(s.ZP,{default:!0,children:"Name"}),(0,m.jsx)(p.Z,{alignRight:!0,noBackground:!0,noBorder:!0,onChange:function(e){return _((function(n){return x(x({},n),{},{name:e.target.value})}))},paddingVertical:v.iI,placeholder:"Enter pipeline name...",value:(null===C||void 0===C?void 0:C.name)||""})]}),(0,m.jsx)(h.gI,{children:(0,m.jsxs)(l.ZP,{flexDirection:"column",fullWidth:!0,children:[(0,m.jsx)(u.Z,{mb:2,pt:1,children:(0,m.jsx)(s.ZP,{default:!0,children:"Describe what the pipeline should do"})}),(0,m.jsxs)(u.Z,{pb:1,pr:v.cd,children:[(0,m.jsx)(a.Z,{fullWidth:!0,onChange:function(e){return _((function(n){return x(x({},n),{},{llm:{request:{pipeline_description:e.target.value},use_case:c.z.GENERATE_PIPELINE_WITH_DESCRIPTION}})}))},placeholder:"Type the pipeline purpose...",ref:P,rows:8,value:(null===C||void 0===C||null===(n=C.llm)||void 0===n||null===(t=n.request)||void 0===t?void 0:t.pipeline_description)||""}),(Z||w)&&(0,m.jsx)(u.Z,{mt:1,children:(0,m.jsx)(s.ZP,{warning:!0,children:"Pipeline is being generated using AI based on your description above..."})})]})]})}),(0,m.jsx)(h.$b,{children:(0,m.jsxs)(l.ZP,{fullWidth:!0,children:[(0,m.jsx)(d.ZP,{bold:!0,centerText:!0,disabled:!(null!==C&&void 0!==C&&C.name)||!(null!==C&&void 0!==C&&null!==(i=C.llm)&&void 0!==i&&null!==(g=i.request)&&void 0!==g&&g.pipeline_description),loading:Z||w,onClick:function(){I(!0),b({pipeline:C}).then((function(){return I(!1)}))},primary:!0,tabIndex:0,uuid:"AIControlPanel/CreatePipeline",children:"Create pipeline"}),y&&(0,m.jsx)(u.Z,{ml:1,children:(0,m.jsx)(o.ZP,{onClick:y,tabIndex:0,children:"Cancel"})})]})})]})}},60523:function(e,n,t){var i=t(21831),r=t(82394),o=t(82684),l=t(38626),d=t(34376),c=t(54750),u=t(71180),s=t(90299),a=t(44898),p=t(55485),f=t(88328),h=t(38276),v=t(4190),j=t(48381),m=t(5755),g=t(30160),x=t(35686),b=t(72473),Z=t(84649),y=t(32929),P=t(15610),O=t(19183),w=t(28598);function I(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function k(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?I(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):I(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n,t=e.contained,r=e.defaultLinkUUID,I=e.defaultTab,C=e.objectType,_=e.onClickCustomTemplate,S=e.pipelineUUID,N=e.showAddingNewTemplates,A=e.showBreadcrumbs,E=e.tabs,M=(0,d.useRouter)(),D=(0,o.useContext)(l.ThemeContext),T=(0,O.i)(),B=T.height,R=T.width,U=(0,o.useMemo)((function(){return E||y.dP}),[E]),H=(0,o.useState)(N||!1),q=H[0],L=H[1],z=(0,o.useState)(r?y.qy.find((function(e){return e.uuid===r})):y.qy[0]),F=z[0],W=z[1],G=(0,o.useState)(I?U.find((function(e){return e.uuid===(null===I||void 0===I?void 0:I.uuid)})):U[0]),V=G[0],Y=G[1],X=(0,o.useState)(null),$=X[0],K=X[1],Q=x.ZP.custom_templates.list({object_type:a.Z},{},{pauseFetch:y.n9.uuid!==(null===V||void 0===V?void 0:V.uuid)}),J=Q.data,ee=Q.mutate,ne=(0,o.useMemo)((function(){var e=(null===J||void 0===J?void 0:J.custom_templates)||[];return null!==F&&void 0!==F&&F.filterTemplates?null===F||void 0===F?void 0:F.filterTemplates(e):e}),[J,F]),te=x.ZP.custom_templates.list({object_type:a.R},{},{pauseFetch:y.A2.uuid!==(null===V||void 0===V?void 0:V.uuid)}),ie=te.data,re=te.mutate,oe=(0,o.useMemo)((function(){var e=(null===ie||void 0===ie?void 0:ie.custom_templates)||[];return null!==F&&void 0!==F&&F.filterTemplates?null===F||void 0===F?void 0:F.filterTemplates(e):e}),[ie,F]),le=(0,o.useMemo)((function(){return y.qy.map((function(e){var n=e.Icon,t=e.label,i=e.selectedBackgroundColor,r=e.selectedIconProps,o=e.uuid,l=(null===F||void 0===F?void 0:F.uuid)===o,d=k({size:Z.ZG},l&&r?r:{});return(0,w.jsx)(Z.wj,{onClick:function(){return W(e)},selected:l,children:(0,w.jsxs)(p.ZP,{alignItems:"center",children:[(0,w.jsx)(Z.ze,{backgroundColor:l&&i?i(D):null,children:n?(0,w.jsx)(n,k({},d)):(0,w.jsx)(b.pd,k({},d))}),(0,w.jsx)(g.ZP,{bold:!0,large:!0,children:t?t():o})]})},o)}))}),[F,D]),de=(0,o.useMemo)((function(){return y.hS.map((function(e){var n=e.Icon,t=e.label,i=e.selectedBackgroundColor,r=e.selectedIconProps,o=e.uuid,l=(null===F||void 0===F?void 0:F.uuid)===o,d=k({size:Z.ZG},l&&r?r:{});return(0,w.jsx)(Z.wj,{onClick:function(){return W(e)},selected:l,children:(0,w.jsxs)(p.ZP,{alignItems:"center",children:[(0,w.jsx)(Z.ze,{backgroundColor:l&&i?i(D):null,children:n?(0,w.jsx)(n,k({},d)):(0,w.jsx)(b.pd,k({},d))}),(0,w.jsx)(g.ZP,{bold:!0,large:!0,children:t?t():o})]})},o)}))}),[F,D]),ce=(0,o.useMemo)((function(){return null===ne||void 0===ne?void 0:ne.map((function(e){var n=e.description,t=e.name,r=e.tags,o=e.template_uuid,l=e.user,d=[];return null!==r&&void 0!==r&&r.length?d.push.apply(d,(0,i.Z)(r)):null!==l&&void 0!==l&&l.username&&d.push(null===l||void 0===l?void 0:l.username),(0,w.jsxs)(Z.UE,{onClick:function(){_?_(e):M.push("/templates/[...slug]","/templates/".concat(encodeURIComponent(o)))},children:[(0,w.jsx)(Z.Tj,{children:(0,w.jsx)(g.ZP,{bold:!0,monospace:!0,textOverflow:!0,children:t||o})}),(0,w.jsx)(Z.SL,{children:(0,w.jsx)(g.ZP,{default:!!n,italic:!n,muted:!n,textOverflowLines:2,children:n||"No description"})}),(0,w.jsx)(Z.EN,{children:(null===d||void 0===d?void 0:d.length)>=1&&(0,w.jsx)(j.Z,{tags:null===d||void 0===d?void 0:d.map((function(e){return{uuid:e}}))})})]},o)}))}),[ne,_,M]),ue=(0,o.useMemo)((function(){return null===oe||void 0===oe?void 0:oe.map((function(e){var n=e.description,t=e.name,r=e.tags,o=e.template_uuid,l=e.user,d=[];return null!==r&&void 0!==r&&r.length?d.push.apply(d,(0,i.Z)(r)):null!==l&&void 0!==l&&l.username&&d.push(null===l||void 0===l?void 0:l.username),(0,w.jsxs)(Z.UE,{onClick:function(){_?_(e):M.push("/templates/[...slug]","/templates/".concat(encodeURIComponent(o),"?object_type=").concat(a.R))},children:[(0,w.jsx)(Z.Tj,{children:(0,w.jsx)(g.ZP,{bold:!0,monospace:!0,textOverflow:!0,children:t||o})}),(0,w.jsx)(Z.SL,{children:(0,w.jsx)(g.ZP,{default:!!n,italic:!n,muted:!n,textOverflowLines:2,children:n||"No description"})}),(0,w.jsx)(Z.EN,{children:(null===d||void 0===d?void 0:d.length)>=1&&(0,w.jsx)(j.Z,{tags:null===d||void 0===d?void 0:d.map((function(e){return{uuid:e}}))})})]},o)}))}),[oe,_,M]),se=(0,o.useMemo)((function(){if(!A)return null;var e=[];return q?e.push.apply(e,[{label:function(){return"Templates"},onClick:function(){L(!1)}},{bold:!0,label:function(){return"New custom template"}}]):e.push({label:function(){return"Templates"}}),(0,w.jsx)(Z.FX,{children:(0,w.jsx)(c.Z,{breadcrumbs:e})})}),[q,A]),ae=(0,o.useMemo)((function(){return A?36:0}),[A]),pe=(0,o.useMemo)((function(){return B-ae}),[B,ae]);if(q)return n=a.R===C&&S?(0,w.jsx)(f.Z,{onMutateSuccess:re,pipelineUUID:S,templateAttributes:F&&(null===F||void 0===F?void 0:F.uuid)!==(null===y.qy||void 0===y.qy?void 0:y.qy[0].uuid)?{pipeline_type:null===F||void 0===F?void 0:F.uuid}:null,templateUUID:null===$||void 0===$?void 0:$.template_uuid}):(0,w.jsx)(m.Z,{contained:t,heightOffset:ae,onCreateCustomTemplate:t?function(e){K(e)}:null,onMutateSuccess:ee,templateAttributes:F&&(null===F||void 0===F?void 0:F.uuid)!==(null===y.qy||void 0===y.qy?void 0:y.qy[0].uuid)?{block_type:null===F||void 0===F?void 0:F.uuid}:null,templateUUID:null===$||void 0===$?void 0:$.template_uuid}),t?(0,w.jsxs)(w.Fragment,{children:[A&&se,(0,w.jsx)(Z.Rd,{height:pe,width:R,children:n})]}):n;var fe=(0,w.jsxs)(Z.Nk,{children:[(0,w.jsxs)(Z.bC,{height:t?pe:null,children:[(0,w.jsx)(Z.Yf,{children:(0,w.jsx)(s.Z,{noPadding:!0,onClickTab:function(e){t?Y(e):(0,P.u7)({object_type:y.A2.uuid===e.uuid?a.R:a.Z})},selectedTabUUID:null===V||void 0===V?void 0:V.uuid,tabs:U})}),(0,w.jsxs)(Z.wl,{contained:t,heightOffset:ae,children:[y.n9.uuid===(null===V||void 0===V?void 0:V.uuid)&&le,y.A2.uuid===(null===V||void 0===V?void 0:V.uuid)&&de]})]}),(0,w.jsxs)(Z.w5,{children:[y.n9.uuid===(null===V||void 0===V?void 0:V.uuid)&&(0,w.jsx)(Z.HS,{children:(0,w.jsx)(u.ZP,{beforeIcon:(0,w.jsx)(b.mm,{size:Z.ZG}),onClick:function(){L(!0)},primary:!0,children:"New block template"})}),y.n9.uuid===(null===V||void 0===V?void 0:V.uuid)&&(0,w.jsxs)(w.Fragment,{children:[!J&&(0,w.jsx)(h.Z,{p:2,children:(0,w.jsx)(v.Z,{inverted:!0})}),J&&!(null!==ce&&void 0!==ce&&ce.length)&&(0,w.jsxs)(h.Z,{p:2,children:[(0,w.jsx)(g.ZP,{children:"There are currently no templates matching your search."}),(0,w.jsx)("br",{}),(0,w.jsx)(g.ZP,{children:"Add a new template by clicking the button above."})]}),(null===ce||void 0===ce?void 0:ce.length)>=1&&(0,w.jsx)(Z.n8,{children:ce})]}),y.A2.uuid===(null===V||void 0===V?void 0:V.uuid)&&(0,w.jsxs)(w.Fragment,{children:[!ie&&(0,w.jsx)(h.Z,{p:2,children:(0,w.jsx)(v.Z,{inverted:!0})}),ie&&!(null!==ue&&void 0!==ue&&ue.length)&&(0,w.jsxs)(h.Z,{p:2,children:[(0,w.jsx)(g.ZP,{children:"There are currently no templates matching your search."}),(0,w.jsx)("br",{}),(0,w.jsx)(g.ZP,{children:'Add a new template by right-clicking a pipeline row from the Pipelines page and selecting "Create template".'})]}),(null===ue||void 0===ue?void 0:ue.length)>=1&&(0,w.jsx)(Z.n8,{children:ue})]})]})]});return t?(0,w.jsxs)(w.Fragment,{children:[A&&se,(0,w.jsx)(Z.Rd,{height:pe,width:R,children:fe})]}):fe}},94629:function(e,n,t){t.d(n,{Z:function(){return I}});var i=t(82394),r=t(21831),o=t(82684),l=t(50724),d=t(82555),c=t(97618),u=t(70613),s=t(68487),a=t(68899),p=t(28598);function f(e,n){var t=e.children,i=e.noPadding;return(0,p.jsx)(a.HS,{noPadding:i,ref:n,children:t})}var h=o.forwardRef(f),v=t(62547),j=t(82571),m=t(35686),g=t(98464),x=t(46684),b=t(70515),Z=t(53808),y=t(19183);function P(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function O(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 w(e,n){var t,i=e.addProjectBreadcrumbToCustomBreadcrumbs,f=e.after,P=e.afterHeader,w=e.afterHidden,I=e.afterWidth,k=e.afterWidthOverride,C=e.appendBreadcrumbs,_=e.before,S=e.beforeWidth,N=e.breadcrumbs,A=e.children,E=e.errors,M=e.headerMenuItems,D=e.headerOffset,T=e.hideAfterCompletely,B=e.mainContainerHeader,R=e.navigationItems,U=e.setAfterHidden,H=e.setErrors,q=e.subheaderChildren,L=e.subheaderNoPadding,z=e.title,F=e.uuid,W=(0,y.i)().width,G="dashboard_after_width_".concat(F),V="dashboard_before_width_".concat(F),Y=(0,o.useRef)(null),X=(0,o.useState)(k?I:(0,Z.U2)(G,I)),$=X[0],K=X[1],Q=(0,o.useState)(!1),J=Q[0],ee=Q[1],ne=(0,o.useState)(_?Math.max((0,Z.U2)(V,S),13*b.iI):null),te=ne[0],ie=ne[1],re=(0,o.useState)(!1),oe=re[0],le=re[1],de=(0,o.useState)(null)[1],ce=m.ZP.projects.list({},{revalidateOnFocus:!1}).data,ue=null===ce||void 0===ce?void 0:ce.projects,se={label:function(){var e;return null===ue||void 0===ue||null===(e=ue[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},ae=[];N&&(i&&ae.push(se),ae.push.apply(ae,(0,r.Z)(N))),(null===N||void 0===N||!N.length||C)&&(null===ue||void 0===ue?void 0:ue.length)>=1&&(null!==N&&void 0!==N&&N.length||ae.unshift({bold:!C,label:function(){return z}}),ae.unshift(se)),(0,o.useEffect)((function(){null===Y||void 0===Y||!Y.current||J||oe||null===de||void 0===de||de(Y.current.getBoundingClientRect().width)}),[J,$,oe,te,Y,de,W]),(0,o.useEffect)((function(){J||(0,Z.t8)(G,$)}),[w,J,$,G]),(0,o.useEffect)((function(){oe||(0,Z.t8)(V,te)}),[oe,te,V]);var pe=(0,g.Z)(I);return(0,o.useEffect)((function(){k&&pe!==I&&K(I)}),[k,I,pe]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(u.Z,{title:z}),(0,p.jsx)(s.Z,{breadcrumbs:ae,menuItems:M,project:null===ue||void 0===ue?void 0:ue[0],version:null===ue||void 0===ue||null===(t=ue[0])||void 0===t?void 0:t.version}),(0,p.jsxs)(a.Nk,{ref:n,children:[0!==(null===R||void 0===R?void 0:R.length)&&(0,p.jsx)(a.lm,{showMore:!0,children:(0,p.jsx)(j.Z,{navigationItems:R,showMore:!0})}),(0,p.jsx)(c.Z,{flex:1,flexDirection:"column",children:(0,p.jsxs)(v.Z,{after:f,afterHeader:P,afterHeightOffset:x.Mz,afterHidden:w,afterMousedownActive:J,afterWidth:$,before:_,beforeHeightOffset:x.Mz,beforeMousedownActive:oe,beforeWidth:a.k1+(_?te:0),headerOffset:D,hideAfterCompletely:!U||T,leftOffset:_?a.k1:null,mainContainerHeader:B,mainContainerRef:Y,setAfterHidden:U,setAfterMousedownActive:ee,setAfterWidth:K,setBeforeMousedownActive:le,setBeforeWidth:ie,children:[q&&(0,p.jsx)(h,{noPadding:L,children:q}),A]})})]}),E&&(0,p.jsx)(l.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===H||void 0===H?void 0:H(null)},children:(0,p.jsx)(d.Z,O(O({},E),{},{onClose:function(){return null===H||void 0===H?void 0:H(null)}}))})]})}var I=o.forwardRef(w)},65458:function(e,n,t){t.d(n,{d:function(){return s}});var i=t(13507),r=t(72473),o=t(57653),l=t(70515),d=t(81728),c=t(28598),u=1.5*l.iI,s=function(e,n){var t=[{beforeIcon:(0,c.jsx)(r.X5,{}),label:function(){return"Standard (batch)"},onClick:function(){return e({pipeline:{name:(0,d.Y6)()}})},uuid:"Pipelines/NewPipelineMenu/standard"},{beforeIcon:(0,c.jsx)(r.ZG,{}),label:function(){return"Data integration"},onClick:function(){return e({pipeline:{name:(0,d.Y6)(),type:o.qL.INTEGRATION}})},uuid:"Pipelines/NewPipelineMenu/integration"},{beforeIcon:(0,c.jsx)(i.Z,{size:u}),label:function(){return"Streaming"},onClick:function(){return e({pipeline:{name:(0,d.Y6)(),type:o.qL.STREAMING}})},uuid:"Pipelines/NewPipelineMenu/streaming"}];return null!==n&&void 0!==n&&n.showBrowseTemplates&&t.push({beforeIcon:(0,c.jsx)(r.zQ,{}),label:function(){return"From a template"},onClick:function(){var e;return null===n||void 0===n||null===(e=n.showBrowseTemplates)||void 0===e?void 0:e.call(n)},uuid:"Pipelines/NewPipelineMenu/custom_template"}),null!==n&&void 0!==n&&n.showAIModal&&t.push({beforeIcon:(0,c.jsx)(r.xq,{}),label:function(){return"Using AI (beta)"},onClick:function(){var e;return null===n||void 0===n||null===(e=n.showAIModal)||void 0===e?void 0:e.call(n)},uuid:"Pipelines/NewPipelineMenu/AI_modal"}),t}},4015:function(e,n,t){t.d(n,{$b:function(){return s},I5:function(){return c},Nk:function(){return d},gI:function(){return u}});var i=t(38626),r=t(44897),o=t(42631),l=t(70515),d=i.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-h093u4-0"})([""," ",""],(function(e){return!e.width&&"\n width: ".concat(40*l.iI,"px;\n ")}),(function(e){return e.width&&"\n width: ".concat(e.width,"px;\n ")})),c=i.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-h093u4-1"})(["padding:","px;",""],2.5*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).dashboard,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-top-left-radius: ").concat(o.n_,"px;\n border-top-right-radius: ").concat(o.n_,"px;\n border-top: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n ")})),u=i.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-h093u4-2"})(["align-items:center;justify-content:space-between;",""],(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).dashboard,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-top: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n display: ").concat((null===e||void 0===e?void 0:e.display)||"flex",";\n padding-bottom: ").concat(1*l.iI+((null===e||void 0===e?void 0:e.paddingVerticalAddition)||0),"px;\n padding-left: ").concat(l.cd*l.iI,"px;\n padding-top: ").concat(1*l.iI+((null===e||void 0===e?void 0:e.paddingVerticalAddition)||0),"px;\n ")})),s=i.default.div.withConfig({displayName:"indexstyle__FooterStyle",componentId:"sc-h093u4-3"})(["padding:","px ","px;",""],2.5*l.iI,2*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).panel,";\n border-bottom-left-radius: ").concat(o.n_,"px;\n border-bottom-right-radius: ").concat(o.n_,"px;\n border-bottom: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n ")}))},48381:function(e,n,t){var i=t(82684),r=t(31882),o=t(55485),l=t(30160),d=t(86735),c=t(28598);n.Z=function(e){var n=e.onClickTag,t=e.tags,u=void 0===t?[]:t,s=(0,i.useMemo)((function(){return(null===u||void 0===u?void 0:u.length)||0}),[u]),a=(0,i.useMemo)((function(){return(0,d.YC)(u||[],"uuid")}),[u]);return(0,c.jsx)(o.ZP,{alignItems:"center",flexWrap:"wrap",children:null===a||void 0===a?void 0:a.reduce((function(e,t){return e.push((0,c.jsx)("div",{style:{marginBottom:2,marginRight:s>=2?4:0,marginTop:2},children:(0,c.jsx)(r.Z,{onClick:n?function(){return n(t)}:null,small:!0,children:(0,c.jsx)(l.ZP,{children:t.uuid})})},"tag-".concat(t.uuid))),e}),[])})}},55729:function(e,n,t){t.d(n,{Z:function(){return B}});var i=t(82394),r=t(75582),o=t(82684),l=t(69864),d=t(71180),c=t(15338),u=t(97618),s=t(55485),a=t(85854),p=t(48670),f=t(65956),h=t(82359),v=t(57114),j=t(38276),m=t(30160),g=t(17488),x=t(69650),b=t(12468),Z=t(35686),y=t(38626),P=t(44897),O=t(42631),w=t(70515),I=y.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1b0w59t-0"})(["border-radius:","px;padding:","px;",""],O.n_,w.cd*w.iI,(function(e){return"\n background-color: ".concat((e.theme.background||P.Z.background).codeArea,";\n ")})),k=t(72473),C=t(72191),_=t(70320),S=t(81728),N=t(42122),A=t(72619),E=t(23780),M=t(28598);function D(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function T(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,i.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}var B=function(e){var n,t,y,P=e.cancelButtonText,O=e.contained,D=e.header,B=e.onCancel,R=e.onSaveSuccess,U=(0,E.VI)(null,{},[],{uuid:"settings/workspace/preferences"}),H=(0,r.Z)(U,1)[0],q=(0,o.useState)(null),L=q[0],z=q[1],F=(0,o.useState)(!1),W=F[0],G=F[1],V=Z.ZP.projects.list(),Y=V.data,X=V.mutate,$=(0,o.useMemo)((function(){var e;return null===Y||void 0===Y||null===(e=Y.projects)||void 0===e?void 0:e[0]}),[Y]),K=$||{},Q=K.name,J=K.openai_api_key,ee=K.project_uuid,ne=(0,o.useMemo)((function(){return"demo.mage.ai"===window.location.hostname}),[]);(0,o.useEffect)((function(){L||z($)}),[$,L]);var te=(0,l.Db)(Z.ZP.projects.useUpdate(Q),{onSuccess:function(e){return(0,A.wD)(e,{callback:function(e){var n,t=e.project;X(),z(t),G(!1),(0,_.hY)(null===t||void 0===t||null===(n=t.features)||void 0===n?void 0:n[h.d.LOCAL_TIMEZONE]),R&&(null===R||void 0===R||R(t))},onErrorCallback:function(e,n){return H({errors:n,response:e})}})}}),ie=(0,r.Z)(te,2),re=ie[0],oe=ie[1].isLoading,le=(0,o.useCallback)((function(e){return re({project:e})}),[re]),de=(0,M.jsxs)(M.Fragment,{children:[D,(0,M.jsxs)(f.Z,{noPadding:!0,children:[(0,M.jsxs)(j.Z,{p:w.cd,children:[(0,M.jsx)(j.Z,{mb:1,children:(0,M.jsx)(a.Z,{level:5,children:"Project name"})}),(0,M.jsx)(m.ZP,{default:!0,monospace:!0,children:Q})]}),(0,M.jsx)(c.Z,{light:!0}),(0,M.jsxs)(j.Z,{p:w.cd,children:[(0,M.jsx)(j.Z,{mb:1,children:(0,M.jsx)(a.Z,{level:5,children:"Project UUID"})}),(0,M.jsx)(m.ZP,{default:!!ee,monospace:!0,muted:!ee,children:ee||"Not required"})]}),(0,M.jsx)(c.Z,{light:!0}),(0,M.jsx)(j.Z,{p:w.cd,children:(0,M.jsxs)(s.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,M.jsxs)(u.Z,{flexDirection:"column",children:[(0,M.jsx)(j.Z,{mb:1,children:(0,M.jsx)(a.Z,{level:5,children:"Help improve Mage"})}),(0,M.jsxs)(m.ZP,{default:!0,children:["Please contribute usage statistics to help improve the developer experience for you and everyone in the community. Learn more ",(0,M.jsx)(p.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,children:"here"}),"."]})]}),(0,M.jsx)(j.Z,{mr:w.cd}),(0,M.jsx)(x.Z,{compact:!0,checked:null===L||void 0===L?void 0:L.help_improve_mage,onCheck:function(){return z((function(e){return T(T({},e),{},{help_improve_mage:!(null!==L&&void 0!==L&&L.help_improve_mage)})}))}})]})})]}),(0,M.jsx)(j.Z,{mt:w.HN}),(0,M.jsx)(v.Z,{description:"Global settings that are applied to all pipelines in this project.",title:"Pipeline settings",children:(0,M.jsx)(v.S,{description:"Every time a trigger is created or updated in this pipeline, automatically persist it in code.",title:"Save triggers in code automatically",toggleSwitch:{checked:!(null===L||void 0===L||null===(n=L.pipelines)||void 0===n||null===(t=n.settings)||void 0===t||null===(y=t.triggers)||void 0===y||!y.save_in_code_automatically),onCheck:function(e){return z((function(n){var t,i,r,o,l,d;return T(T({},n),{},{pipelines:T(T({},null===n||void 0===n?void 0:n.pipelines),{},{settings:T(T({},null===n||void 0===n||null===(t=n.pipelines)||void 0===t?void 0:t.settings),{},{triggers:T(T({},null===n||void 0===n||null===(i=n.pipelines)||void 0===i||null===(r=i.settings)||void 0===r?void 0:r.triggers),{},{save_in_code_automatically:e(null===n||void 0===n||null===(o=n.pipelines)||void 0===o||null===(l=o.settings)||void 0===l||null===(d=l.triggers)||void 0===d?void 0:d.save_in_code_automatically)})})})})}))}}})}),(0,M.jsx)(j.Z,{mt:w.HN}),(0,M.jsx)(f.Z,{noPadding:!0,overflowVisible:!0,children:(0,M.jsxs)(j.Z,{p:w.cd,children:[(0,M.jsx)(j.Z,{mb:1,children:(0,M.jsx)(a.Z,{level:5,children:"Features"})}),Object.entries((0,N.gR)(null===L||void 0===L?void 0:L.features,[h.d.GLOBAL_HOOKS])||{}).map((function(e,n){var t=(0,r.Z)(e,2),o=t[0],l=t[1];return(0,M.jsx)(j.Z,{mt:0===n?0:1,children:(0,M.jsxs)(s.ZP,{alignItems:"center",children:[(0,M.jsx)(x.Z,{checked:!!l,compact:!0,onCheck:function(){return z((function(e){return T(T({},e),{},{features:T(T({},null===L||void 0===L?void 0:L.features),{},(0,i.Z)({},o,!l))})}))}}),(0,M.jsx)(j.Z,{mr:w.cd}),(0,M.jsxs)(u.Z,{children:[(0,M.jsx)(m.ZP,{default:!l,monospace:!0,children:(0,S.vg)(o)}),o===h.d.LOCAL_TIMEZONE&&(0,M.jsx)(j.Z,{ml:1,children:(0,M.jsx)(b.Z,T({},_.EB))})]})]})},o)}))]})}),(0,M.jsx)(j.Z,{mt:w.HN}),(0,M.jsx)(f.Z,{noPadding:!0,children:(0,M.jsxs)(j.Z,{p:w.cd,children:[(0,M.jsx)(j.Z,{mb:1,children:(0,M.jsx)(a.Z,{level:5,children:"OpenAI"})}),J&&!W?(0,M.jsxs)(s.ZP,T(T({},s.A0),{},{children:[(0,M.jsx)(m.ZP,{default:!0,monospace:!0,children:"API key: ********"}),(0,M.jsx)(d.ZP,{iconOnly:!0,onClick:function(){return G(!0)},secondary:!0,title:"Edit",children:(0,M.jsx)(k.I8,{size:C.bL})})]})):(0,M.jsx)(g.Z,{disabled:ne,label:ne?"Entering API key is disabled on demo":"API key",monospace:!0,onChange:function(e){return z((function(n){return T(T({},n),{},{openai_api_key:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===L||void 0===L?void 0:L.openai_api_key)||""})]})}),(0,M.jsx)(j.Z,{mt:w.HN}),(0,M.jsxs)(s.ZP,{alignItems:"center",children:[(0,M.jsx)(d.ZP,{loading:oe,onClick:function(){le({features:null===L||void 0===L?void 0:L.features,help_improve_mage:null===L||void 0===L?void 0:L.help_improve_mage,openai_api_key:null===L||void 0===L?void 0:L.openai_api_key,pipelines:null===L||void 0===L?void 0:L.pipelines})},primary:!0,children:"Save project settings"}),B&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(j.Z,{mr:w.cd}),(0,M.jsx)(d.ZP,{onClick:B,secondary:!0,children:P||"Cancel"})]})]})]});return O?(0,M.jsx)(I,{children:de}):de}},57114:function(e,n,t){t.d(n,{S:function(){return Z},Z:function(){return y}});var i=t(82684),r=t(15338),o=t(97618),l=t(55485),d=t(85854),c=t(65956),u=t(82394),s=t(44085),a=t(38276),p=t(30160),f=t(17488),h=t(69650),v=t(72473),j=t(8193),m=t(70515),g=t(28598);function x(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function b(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?x(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):x(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Z=function(e){var n,t=e.children,i=e.description,r=e.invalid,d=e.large,c=void 0===d||d,u=e.selectInput,x=e.textInput,Z=e.title,y=e.toggleSwitch,P=e.warning;return(0,g.jsx)(a.Z,{p:m.cd,children:(0,g.jsxs)(l.ZP,{alignItems:"center",children:[(0,g.jsxs)(l.ZP,{flexDirection:"column",children:[(0,g.jsxs)(p.ZP,{danger:r,default:!0,large:c,warning:P,children:[Z," ",r&&(0,g.jsx)(p.ZP,{danger:!0,inline:!0,large:c,children:"is required"})]}),i&&"string"===typeof i&&(0,g.jsx)(p.ZP,{muted:!0,small:!0,children:i}),i&&"string"!==typeof i&&i]}),(0,g.jsx)(a.Z,{mr:m.cd}),(0,g.jsxs)(o.Z,{flex:1,justifyContent:"flex-end",children:[t,x&&(0,g.jsx)(f.Z,b({afterIcon:(0,g.jsx)(v.I8,{}),afterIconClick:function(e,n){var t;null===n||void 0===n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:j.Z,alignRight:!0,autoComplete:"off",large:c,noBackground:!0,noBorder:!0,fullWidth:!0,paddingHorizontal:0,paddingVertical:0,setContentOnMount:!0},x)),u&&(0,g.jsx)(s.Z,b(b({},u),{},{afterIcon:(0,g.jsx)(v._M,{}),afterIconSize:j.Z,alignRight:!0,autoComplete:"off",large:c,noBackground:!0,noBorder:!0,paddingHorizontal:0,paddingVertical:0,setContentOnMount:!0,children:null===u||void 0===u||null===(n=u.options)||void 0===n?void 0:n.map((function(e){var n=e.label,t=e.value;return(0,g.jsx)("option",{value:t,children:n||t},t)}))})),y&&(0,g.jsx)(h.Z,{checked:!(null===y||void 0===y||!y.checked),compact:!0,onCheck:null===y||void 0===y?void 0:y.onCheck})]})]})})},y=function(e){var n=e.children,t=e.description,u=e.headerChildren,s=e.title;return(0,g.jsxs)(c.Z,{noPadding:!0,children:[(0,g.jsx)(a.Z,{p:m.cd,children:(0,g.jsxs)(l.ZP,{alignItems:"center",children:[(0,g.jsxs)(o.Z,{flex:1,flexDirection:"column",children:[(0,g.jsx)(d.Z,{level:4,children:s}),t&&"string"===typeof t&&(0,g.jsx)(a.Z,{mt:1,children:(0,g.jsx)(p.ZP,{muted:!0,children:t})}),t&&"string"!==typeof t&&t]}),u]})}),i.Children.map(n,(function(e,n){return(0,g.jsxs)("div",{children:[(0,g.jsx)(r.Z,{light:!0}),e]},"".concat(s,"-").concat(n))}))]})}},8193:function(e,n,t){t.d(n,{N:function(){return c},Z:function(){return d}});var i=t(38626),r=t(44897),o=t(42631),l=t(70515),d=2*l.iI,c=i.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1ck7mzt-0"})(["border-radius:","px;padding:","px;",""],o.n_,l.cd*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).codeArea,";\n ")}))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2714],{67778:function(e,n,t){t.d(n,{Z:function(){return g}});var r=t(47329),i=t.n(r),l=t(82684),a=t(63588),o=t.n(a),s=t(5237),f=t(29989),u=t(81352),c=t(46119),d=t(38469),p=t(12765),h=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function m(){return m=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},m.apply(this,arguments)}function g(e){var n=e.top,t=void 0===n?0:n,r=e.left,i=void 0===r?0:r,a=e.scale,g=e.width,y=e.stroke,v=void 0===y?"#eaf0f6":y,b=e.strokeWidth,x=void 0===b?1:b,O=e.strokeDasharray,w=e.className,k=e.children,T=e.numTicks,E=void 0===T?10:T,j=e.lineStyle,Z=e.offset,N=e.tickValues,M=function(e,n){if(null==e)return{};var t,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,h),D=null!=N?N:(0,c.Z)(a,E),I=(null!=Z?Z:0)+(0,p.Z)(a)/2,P=D.map((function(e,n){var t,r=(null!=(t=(0,d.Z)(a(e)))?t:0)+I;return{index:n,from:new u.Z({x:0,y:r}),to:new u.Z({x:g,y:r})}}));return l.createElement(f.Z,{className:o()("visx-rows",w),top:t,left:i},k?k({lines:P}):P.map((function(e){var n=e.from,t=e.to,r=e.index;return l.createElement(s.Z,m({key:"row-line-"+r,from:n,to:t,stroke:v,strokeWidth:x,strokeDasharray:O,style:j},M))})))}g.propTypes={tickValues:i().array,width:i().number.isRequired}},12765:function(e,n,t){function r(e){return"bandwidth"in e?e.bandwidth():0}t.d(n,{Z:function(){return r}})},84482:function(e,n,t){t.d(n,{Z:function(){return s}});var r=t(47329),i=t.n(r),l=t(82684),a=["flexDirection","alignItems","margin","display","children"];function o(){return o=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},o.apply(this,arguments)}function s(e){var n=e.flexDirection,t=void 0===n?"row":n,r=e.alignItems,i=void 0===r?"center":r,s=e.margin,f=void 0===s?"0":s,u=e.display,c=void 0===u?"flex":u,d=e.children,p=function(e,n){if(null==e)return{};var t,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,a);return l.createElement("div",o({className:"visx-legend-item",style:{display:c,alignItems:i,flexDirection:t,margin:f}},p),d)}s.propTypes={alignItems:i().string,margin:i().oneOfType([i().string,i().number]),children:i().node,display:i().string}},76771:function(e,n,t){t.d(n,{Z:function(){return s}});var r=t(47329),i=t.n(r),l=t(82684),a=["flex","label","margin","align","children"];function o(){return o=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},o.apply(this,arguments)}function s(e){var n=e.flex,t=void 0===n?"1":n,r=e.label,i=e.margin,s=void 0===i?"5px 0":i,f=e.align,u=void 0===f?"left":f,c=e.children,d=function(e,n){if(null==e)return{};var t,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,a);return l.createElement("div",o({className:"visx-legend-label",style:{justifyContent:u,display:"flex",flex:t,margin:s}},d),c||r)}s.propTypes={align:i().string,label:i().node,flex:i().oneOfType([i().string,i().number]),margin:i().oneOfType([i().string,i().number]),children:i().node}},17066:function(e,n,t){t.d(n,{Z:function(){return j}});var r=t(82684),i=t(47329),l=t.n(i),a=t(63588),o=t.n(a),s=t(84482),f=t(76771);function u(){return u=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},u.apply(this,arguments)}function c(e){var n=e.fill,t=e.width,i=e.height,l=e.style;return r.createElement("div",{style:u({width:t,height:i,background:n},l)})}c.propTypes={fill:l().string,width:l().oneOfType([l().string,l().number]),height:l().oneOfType([l().string,l().number])};var d=t(29989);function p(e){var n=e.fill,t=e.width,i=e.height,l=e.style,a="string"===typeof t||"undefined"===typeof t?0:t,o="string"===typeof i||"undefined"===typeof i?0:i,s=Math.max(a,o),f=s/2;return r.createElement("svg",{width:s,height:s},r.createElement(d.Z,{top:f,left:f},r.createElement("circle",{r:f,fill:n,style:l})))}function h(e){var n=e.fill,t=e.width,i=e.height,l=e.style,a="string"===typeof i||"undefined"===typeof i?0:i,o="number"===typeof(null==l?void 0:l.strokeWidth)?null==l?void 0:l.strokeWidth:2;return r.createElement("svg",{width:t,height:i},r.createElement(d.Z,{top:a/2-o/2},r.createElement("line",{x1:0,x2:t,y1:0,y2:0,stroke:n,strokeWidth:o,style:l})))}function m(){return m=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},m.apply(this,arguments)}p.propTypes={fill:l().string,width:l().oneOfType([l().string,l().number]),height:l().oneOfType([l().string,l().number])},h.propTypes={fill:l().string,width:l().oneOfType([l().string,l().number]),height:l().oneOfType([l().string,l().number])};var g=function(){};function y(){return y=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},y.apply(this,arguments)}function v(e){var n=e.shape,t=void 0===n?c:n,i=e.width,l=e.height,a=e.margin,o=e.label,s=e.item,f=e.itemIndex,u=e.fill,d=e.size,v=e.shapeStyle;return r.createElement("div",{className:"visx-legend-shape",style:{display:"flex",width:d?d(y({},o)):i,height:d?d(y({},o)):l,margin:a}},function(e){var n=e.shape,t=void 0===n?"rect":n,i=e.fill,l=void 0===i?g:i,a=e.size,o=void 0===a?g:a,s=e.width,f=e.height,u=e.label,d=e.item,y=e.itemIndex,v=e.shapeStyle,b=void 0===v?g:v,x={width:s,height:f,item:d,itemIndex:y,label:u,fill:l(m({},u)),size:o(m({},u)),style:b(m({},u))};return"string"===typeof t?"circle"===t?r.createElement(p,x):"line"===t?r.createElement(h,x):r.createElement(c,x):r.isValidElement(t)?r.cloneElement(t,x):t?r.createElement(t,x):null}({shape:t,item:s,itemIndex:f,label:o,width:i,height:l,fill:u,shapeStyle:v}))}function b(e){return e&&"object"===typeof e&&"value"in e&&"undefined"!==typeof e.value?e.value:e}function x(e){return String(b(e))}function O(e){var n=e.scale,t=e.labelFormat;return function(e,r){return{datum:e,index:r,text:""+t(e,r),value:n(e)}}}v.propTypes={itemIndex:l().number.isRequired,margin:l().oneOfType([l().string,l().number]),width:l().oneOfType([l().string,l().number]),height:l().oneOfType([l().string,l().number])};var w=["className","style","scale","shape","domain","fill","size","labelFormat","labelTransform","shapeWidth","shapeHeight","shapeMargin","shapeStyle","labelAlign","labelFlex","labelMargin","itemMargin","direction","itemDirection","legendLabelProps","children"];function k(){return k=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},k.apply(this,arguments)}var T={display:"flex"};function E(e){var n=e.className,t=e.style,i=void 0===t?T:t,l=e.scale,a=e.shape,u=e.domain,c=e.fill,d=void 0===c?x:c,p=e.size,h=void 0===p?x:p,m=e.labelFormat,g=void 0===m?b:m,y=e.labelTransform,E=void 0===y?O:y,j=e.shapeWidth,Z=void 0===j?15:j,N=e.shapeHeight,M=void 0===N?15:N,D=e.shapeMargin,I=void 0===D?"2px 4px 2px 0":D,P=e.shapeStyle,S=e.labelAlign,W=void 0===S?"left":S,F=e.labelFlex,z=void 0===F?"1":F,_=e.labelMargin,R=void 0===_?"0 4px":_,V=e.itemMargin,A=void 0===V?"0":V,C=e.direction,H=void 0===C?"column":C,q=e.itemDirection,L=void 0===q?"row":q,B=e.legendLabelProps,G=e.children,J=function(e,n){if(null==e)return{};var t,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,w),K=u||("domain"in l?l.domain():[]),Q=E({scale:l,labelFormat:g}),U=K.map(Q);return G?r.createElement(r.Fragment,null,G(U)):r.createElement("div",{className:o()("visx-legend",n),style:k({},i,{flexDirection:H})},U.map((function(e,n){return r.createElement(s.Z,k({key:"legend-"+e.text+"-"+n,margin:A,flexDirection:L},J),r.createElement(v,{shape:a,height:M,width:Z,margin:I,item:K[n],itemIndex:n,label:e,fill:d,size:h,shapeStyle:P}),r.createElement(f.Z,k({label:e.text,flex:z,margin:R,align:W},B)))})))}function j(e){return r.createElement(E,e)}E.propTypes={children:l().func,className:l().string,domain:l().array,shapeWidth:l().oneOfType([l().string,l().number]),shapeHeight:l().oneOfType([l().string,l().number]),shapeMargin:l().oneOfType([l().string,l().number]),labelAlign:l().string,labelFlex:l().oneOfType([l().string,l().number]),labelMargin:l().oneOfType([l().string,l().number]),itemMargin:l().oneOfType([l().string,l().number]),fill:l().func,size:l().func,shapeStyle:l().func}},5237:function(e,n,t){n.Z=function(e){var n=e.from,t=void 0===n?{x:0,y:0}:n,a=e.to,s=void 0===a?{x:1,y:1}:a,f=e.fill,u=void 0===f?"transparent":f,c=e.className,d=e.innerRef,p=function(e,n){if(null==e)return{};var t,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,l),h=t.x===s.x||t.y===s.y;return r.default.createElement("line",o({ref:d,className:(0,i.default)("visx-line",c),x1:t.x,y1:t.y,x2:s.x,y2:s.y,fill:u,shapeRendering:h?"crispEdges":"auto"},p))};var r=a(t(82684)),i=a(t(63588)),l=["from","to","fill","className","innerRef"];function a(e){return e&&e.__esModule?e:{default:e}}function o(){return o=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},o.apply(this,arguments)}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2714],{67778:function(e,n,t){t.d(n,{Z:function(){return g}});var r=t(47329),i=t.n(r),l=t(82684),a=t(63588),o=t.n(a),s=t(5237),f=t(29989),u=t(81352),c=t(46119),d=t(88543),p=t(12765),h=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function m(){return m=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},m.apply(this,arguments)}function g(e){var n=e.top,t=void 0===n?0:n,r=e.left,i=void 0===r?0:r,a=e.scale,g=e.width,y=e.stroke,v=void 0===y?"#eaf0f6":y,b=e.strokeWidth,x=void 0===b?1:b,O=e.strokeDasharray,w=e.className,k=e.children,T=e.numTicks,E=void 0===T?10:T,j=e.lineStyle,Z=e.offset,N=e.tickValues,M=function(e,n){if(null==e)return{};var t,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,h),D=null!=N?N:(0,c.Z)(a,E),I=(null!=Z?Z:0)+(0,p.Z)(a)/2,P=D.map((function(e,n){var t,r=(null!=(t=(0,d.Z)(a(e)))?t:0)+I;return{index:n,from:new u.Z({x:0,y:r}),to:new u.Z({x:g,y:r})}}));return l.createElement(f.Z,{className:o()("visx-rows",w),top:t,left:i},k?k({lines:P}):P.map((function(e){var n=e.from,t=e.to,r=e.index;return l.createElement(s.Z,m({key:"row-line-"+r,from:n,to:t,stroke:v,strokeWidth:x,strokeDasharray:O,style:j},M))})))}g.propTypes={tickValues:i().array,width:i().number.isRequired}},12765:function(e,n,t){function r(e){return"bandwidth"in e?e.bandwidth():0}t.d(n,{Z:function(){return r}})},84482:function(e,n,t){t.d(n,{Z:function(){return s}});var r=t(47329),i=t.n(r),l=t(82684),a=["flexDirection","alignItems","margin","display","children"];function o(){return o=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},o.apply(this,arguments)}function s(e){var n=e.flexDirection,t=void 0===n?"row":n,r=e.alignItems,i=void 0===r?"center":r,s=e.margin,f=void 0===s?"0":s,u=e.display,c=void 0===u?"flex":u,d=e.children,p=function(e,n){if(null==e)return{};var t,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,a);return l.createElement("div",o({className:"visx-legend-item",style:{display:c,alignItems:i,flexDirection:t,margin:f}},p),d)}s.propTypes={alignItems:i().string,margin:i().oneOfType([i().string,i().number]),children:i().node,display:i().string}},76771:function(e,n,t){t.d(n,{Z:function(){return s}});var r=t(47329),i=t.n(r),l=t(82684),a=["flex","label","margin","align","children"];function o(){return o=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},o.apply(this,arguments)}function s(e){var n=e.flex,t=void 0===n?"1":n,r=e.label,i=e.margin,s=void 0===i?"5px 0":i,f=e.align,u=void 0===f?"left":f,c=e.children,d=function(e,n){if(null==e)return{};var t,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,a);return l.createElement("div",o({className:"visx-legend-label",style:{justifyContent:u,display:"flex",flex:t,margin:s}},d),c||r)}s.propTypes={align:i().string,label:i().node,flex:i().oneOfType([i().string,i().number]),margin:i().oneOfType([i().string,i().number]),children:i().node}},17066:function(e,n,t){t.d(n,{Z:function(){return j}});var r=t(82684),i=t(47329),l=t.n(i),a=t(63588),o=t.n(a),s=t(84482),f=t(76771);function u(){return u=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},u.apply(this,arguments)}function c(e){var n=e.fill,t=e.width,i=e.height,l=e.style;return r.createElement("div",{style:u({width:t,height:i,background:n},l)})}c.propTypes={fill:l().string,width:l().oneOfType([l().string,l().number]),height:l().oneOfType([l().string,l().number])};var d=t(29989);function p(e){var n=e.fill,t=e.width,i=e.height,l=e.style,a="string"===typeof t||"undefined"===typeof t?0:t,o="string"===typeof i||"undefined"===typeof i?0:i,s=Math.max(a,o),f=s/2;return r.createElement("svg",{width:s,height:s},r.createElement(d.Z,{top:f,left:f},r.createElement("circle",{r:f,fill:n,style:l})))}function h(e){var n=e.fill,t=e.width,i=e.height,l=e.style,a="string"===typeof i||"undefined"===typeof i?0:i,o="number"===typeof(null==l?void 0:l.strokeWidth)?null==l?void 0:l.strokeWidth:2;return r.createElement("svg",{width:t,height:i},r.createElement(d.Z,{top:a/2-o/2},r.createElement("line",{x1:0,x2:t,y1:0,y2:0,stroke:n,strokeWidth:o,style:l})))}function m(){return m=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},m.apply(this,arguments)}p.propTypes={fill:l().string,width:l().oneOfType([l().string,l().number]),height:l().oneOfType([l().string,l().number])},h.propTypes={fill:l().string,width:l().oneOfType([l().string,l().number]),height:l().oneOfType([l().string,l().number])};var g=function(){};function y(){return y=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},y.apply(this,arguments)}function v(e){var n=e.shape,t=void 0===n?c:n,i=e.width,l=e.height,a=e.margin,o=e.label,s=e.item,f=e.itemIndex,u=e.fill,d=e.size,v=e.shapeStyle;return r.createElement("div",{className:"visx-legend-shape",style:{display:"flex",width:d?d(y({},o)):i,height:d?d(y({},o)):l,margin:a}},function(e){var n=e.shape,t=void 0===n?"rect":n,i=e.fill,l=void 0===i?g:i,a=e.size,o=void 0===a?g:a,s=e.width,f=e.height,u=e.label,d=e.item,y=e.itemIndex,v=e.shapeStyle,b=void 0===v?g:v,x={width:s,height:f,item:d,itemIndex:y,label:u,fill:l(m({},u)),size:o(m({},u)),style:b(m({},u))};return"string"===typeof t?"circle"===t?r.createElement(p,x):"line"===t?r.createElement(h,x):r.createElement(c,x):r.isValidElement(t)?r.cloneElement(t,x):t?r.createElement(t,x):null}({shape:t,item:s,itemIndex:f,label:o,width:i,height:l,fill:u,shapeStyle:v}))}function b(e){return e&&"object"===typeof e&&"value"in e&&"undefined"!==typeof e.value?e.value:e}function x(e){return String(b(e))}function O(e){var n=e.scale,t=e.labelFormat;return function(e,r){return{datum:e,index:r,text:""+t(e,r),value:n(e)}}}v.propTypes={itemIndex:l().number.isRequired,margin:l().oneOfType([l().string,l().number]),width:l().oneOfType([l().string,l().number]),height:l().oneOfType([l().string,l().number])};var w=["className","style","scale","shape","domain","fill","size","labelFormat","labelTransform","shapeWidth","shapeHeight","shapeMargin","shapeStyle","labelAlign","labelFlex","labelMargin","itemMargin","direction","itemDirection","legendLabelProps","children"];function k(){return k=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},k.apply(this,arguments)}var T={display:"flex"};function E(e){var n=e.className,t=e.style,i=void 0===t?T:t,l=e.scale,a=e.shape,u=e.domain,c=e.fill,d=void 0===c?x:c,p=e.size,h=void 0===p?x:p,m=e.labelFormat,g=void 0===m?b:m,y=e.labelTransform,E=void 0===y?O:y,j=e.shapeWidth,Z=void 0===j?15:j,N=e.shapeHeight,M=void 0===N?15:N,D=e.shapeMargin,I=void 0===D?"2px 4px 2px 0":D,P=e.shapeStyle,S=e.labelAlign,W=void 0===S?"left":S,F=e.labelFlex,z=void 0===F?"1":F,_=e.labelMargin,R=void 0===_?"0 4px":_,V=e.itemMargin,A=void 0===V?"0":V,C=e.direction,H=void 0===C?"column":C,q=e.itemDirection,L=void 0===q?"row":q,B=e.legendLabelProps,G=e.children,J=function(e,n){if(null==e)return{};var t,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,w),K=u||("domain"in l?l.domain():[]),Q=E({scale:l,labelFormat:g}),U=K.map(Q);return G?r.createElement(r.Fragment,null,G(U)):r.createElement("div",{className:o()("visx-legend",n),style:k({},i,{flexDirection:H})},U.map((function(e,n){return r.createElement(s.Z,k({key:"legend-"+e.text+"-"+n,margin:A,flexDirection:L},J),r.createElement(v,{shape:a,height:M,width:Z,margin:I,item:K[n],itemIndex:n,label:e,fill:d,size:h,shapeStyle:P}),r.createElement(f.Z,k({label:e.text,flex:z,margin:R,align:W},B)))})))}function j(e){return r.createElement(E,e)}E.propTypes={children:l().func,className:l().string,domain:l().array,shapeWidth:l().oneOfType([l().string,l().number]),shapeHeight:l().oneOfType([l().string,l().number]),shapeMargin:l().oneOfType([l().string,l().number]),labelAlign:l().string,labelFlex:l().oneOfType([l().string,l().number]),labelMargin:l().oneOfType([l().string,l().number]),itemMargin:l().oneOfType([l().string,l().number]),fill:l().func,size:l().func,shapeStyle:l().func}},5237:function(e,n,t){n.Z=function(e){var n=e.from,t=void 0===n?{x:0,y:0}:n,a=e.to,s=void 0===a?{x:1,y:1}:a,f=e.fill,u=void 0===f?"transparent":f,c=e.className,d=e.innerRef,p=function(e,n){if(null==e)return{};var t,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,l),h=t.x===s.x||t.y===s.y;return r.default.createElement("line",o({ref:d,className:(0,i.default)("visx-line",c),x1:t.x,y1:t.y,x2:s.x,y2:s.y,fill:u,shapeRendering:h?"crispEdges":"auto"},p))};var r=a(t(82684)),i=a(t(63588)),l=["from","to","fill","className","innerRef"];function a(e){return e&&e.__esModule?e:{default:e}}function o(){return o=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},o.apply(this,arguments)}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2717],{8916:function(e,n,t){t.d(n,{FS:function(){return s},JZ:function(){return p},Tt:function(){return d},e7:function(){return v},wx:function(){return a}});var i=t(75582),r=t(82394),l=t(83784),o=t(30229);function u(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function c(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e){return"string"===typeof e?e:JSON.stringify(e)}function a(e,n){var t,i;return null===e||void 0===e||null===(t=e.find((function(e){var t=e.block;return n(t)})))||void 0===t||null===(i=t.variables)||void 0===i?void 0:i.map((function(e){var n=e.value;return c(c({},e),{},{value:s(n)})}))}function d(e){var n;return null===(n=a(e,(function(e){return e.uuid===l.C})))||void 0===n?void 0:n.reduce((function(e,n){var t=n.uuid,i=n.value;return c(c({},e),{},(0,r.Z)({},t,i))}),{})}function p(e,n){return n===o.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===o.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function v(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,i.Z)(n,2),l=t[0],o=t[1],u=o;try{u=JSON.parse(o)}catch(s){}return c(c({},e),{},(0,r.Z)({},l,u))}),{}):e}},71610:function(e,n,t){var i=t(82394),r=t(75582),l=t(12691),o=t.n(l),u=t(38626),c=t(82684),s=t(32013),a=t(98777),d=t(15338),p=t(48670),v=t(88543),h=t(38276),f=t(4190),m=t(75499),j=t(30160),g=t(35686),x=t(70515),Z=t(30229),b=t(32080),y=t(81728),O=t(3917),P=t(55283),_=t(70320),S=t(28598);function E(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function k(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?E(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):E(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var I={large:!1};n.Z=function(e){var n=e.bookmarkValues,t=e.originalBookmarkValues,l=e.setBookmarkValues,E=e.pipeline,T=(0,c.useContext)(u.ThemeContext),w=(0,_.qB)(),C=(0,c.useState)(null),M=C[0],A=C[1],D=(0,c.useMemo)((function(){return null!==E&&void 0!==E&&E.blocks?(0,b.n)(E):null}),[E]),N=(0,c.useMemo)((function(){return Object.keys(D||{})||[]}),[D]),L=g.ZP.integration_sources.pipelines.list(null===E||void 0===E?void 0:E.uuid,{block_uuid:N},{},{pauseFetch:!(null!==N&&void 0!==N&&N.length)}).data,R=(0,c.useMemo)((function(){return null===L||void 0===L?void 0:L.integration_sources}),[L]);return(0,c.useEffect)((function(){if((null===R||void 0===R?void 0:R.length)>=1&&(!n||!M)){var e={};null===R||void 0===R||R.map((function(n){var t,i=n.block,l=n.streams,o=null===i||void 0===i?void 0:i.uuid;e[o]={},null===(t=Object.entries(l||{}))||void 0===t||t.forEach((function(n){var t,i,l=(0,r.Z)(n,2),u=l[0],c=l[1];e[o][u]=null===c||void 0===c||null===(t=c.state)||void 0===t||null===(i=t.bookmarks)||void 0===i?void 0:i[u]}))})),n||l(e),M||A(e)}}),[n,M,l,A,R]),(0,S.jsxs)(h.Z,{p:x.cd,children:[!L&&(0,S.jsx)(f.Z,{inverted:!0,small:!0}),null===R||void 0===R?void 0:R.map((function(e){var u=e.block,f=e.pipeline_run,g=e.pipeline_schedule,b=e.streams,_=null===u||void 0===u?void 0:u.uuid;return(0,S.jsx)(v.Z,{title:(0,S.jsx)(j.ZP,{color:(0,P.qn)(null===u||void 0===u?void 0:u.type,{blockColor:null===u||void 0===u?void 0:u.color,theme:T}).accent,monospace:!0,children:_}),children:(0,S.jsx)(s.Z,{noBorder:!0,noBoxShadow:!0,children:Object.entries(b||{}).map((function(e){var u,s,b,P,T=(0,r.Z)(e,2),C=T[0],A=T[1],D=A.record,N=A.state,L=(null===N||void 0===N||null===(u=N.bookmarks)||void 0===u?void 0:u[C])||{};return(0,S.jsxs)(a.Z,{noBorderRadius:!0,noPaddingContent:!0,title:(0,S.jsx)(j.ZP,{default:!0,monospace:!0,children:C}),titleXPadding:x.cd*x.iI,titleYPadding:x.cd*x.iI,children:[(0,S.jsx)(v.S,k(k({},I),{},{title:"Last pipeline run started at",children:(0,S.jsx)(j.ZP,{default:!0,monospace:!0,children:(null===f||void 0===f?void 0:f.started_at)&&(0,O.XG)(null===f||void 0===f?void 0:f.started_at,w)})})),(0,S.jsx)(d.Z,{light:!0}),(0,S.jsx)(v.S,k(k({},I),{},{title:"Last pipeline run completed at",children:(0,S.jsx)(j.ZP,{default:!0,monospace:!0,children:(null===f||void 0===f?void 0:f.completed_at)&&(0,O.XG)(null===f||void 0===f?void 0:f.completed_at,w)})})),(0,S.jsx)(d.Z,{light:!0}),(0,S.jsx)(d.Z,{light:!0}),(0,S.jsx)(v.S,k(k({},I),{},{title:"Trigger",children:(0,S.jsx)(o(),{as:"/pipelines/".concat(null===E||void 0===E?void 0:E.uuid,"/triggers/").concat(null===g||void 0===g?void 0:g.id),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,S.jsx)(p.Z,{block:!0,default:!0,openNewWindow:!0,children:(0,S.jsx)(j.ZP,{default:!0,monospace:!0,children:null===g||void 0===g?void 0:g.name})})})})),(0,S.jsx)(d.Z,{light:!0}),(0,S.jsx)(v.S,k(k({},I),{},{title:"Type",children:(0,S.jsx)(j.ZP,{default:!0,monospace:!0,children:(0,y.kC)((null===(s=Z.Z4[null===g||void 0===g?void 0:g.schedule_type])||void 0===s?void 0:s.call(Z.Z4))||"")})})),(0,S.jsx)(d.Z,{light:!0}),(0,S.jsx)(v.S,k(k({},I),{},{title:"Frequency",children:(0,S.jsx)(j.ZP,{default:!0,monospace:!0,children:null===g||void 0===g?void 0:g.schedule_interval})})),(0,S.jsx)(d.Z,{light:!0}),(0,S.jsxs)(h.Z,{p:x.cd,children:[(0,S.jsx)(j.ZP,{bold:!0,large:!0,children:"Bookmark values"}),(0,S.jsx)(h.Z,{mt:1,children:(0,S.jsxs)(j.ZP,{muted:!0,small:!0,children:["Overriding the bookmark values will be applied to all pipeline runs",(0,S.jsx)("br",{}),"for this trigger until there is at least 1 successful pipeline run in this trigger."]})})]}),(0,S.jsx)(d.Z,{light:!0,short:!0}),!(null!==(b=Object.values(L||{}))&&void 0!==b&&b.length)&&(0,S.jsx)(h.Z,{p:x.cd,children:(0,S.jsx)(j.ZP,{muted:!0,children:"There are currently no bookmark values for this stream."})}),Object.entries(L||{}).map((function(e){var o,u,s,a,d,p,h=(0,r.Z)(e,2),f=h[0],m=(h[1],null===n||void 0===n||null===(o=n[_])||void 0===o||null===(u=o[C])||void 0===u?void 0:u[f]),g=(null===t||void 0===t||null===(s=t[_])||void 0===s||null===(a=s[C])||void 0===a||a[f],null===M||void 0===M||null===(d=M[_])||void 0===d||null===(p=d[C])||void 0===p?void 0:p[f]);return(0,c.createElement)(v.S,k(k({},I),{},{title:(0,S.jsx)(j.ZP,{default:!0,monospace:!0,children:f}),description:g&&g!==m&&(0,S.jsxs)(j.ZP,{muted:!0,small:!0,children:["Original bookmark value from the last pipeline run: ",(0,S.jsx)(j.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:g})]}),key:"".concat(_,"-bookmark-values-").concat(f),textInput:{monospace:!0,onChange:function(e){return l((function(t){var r;return k(k({},t),{},(0,i.Z)({},_,k(k({},null===n||void 0===n?void 0:n[_]),{},(0,i.Z)({},C,k(k({},null===n||void 0===n||null===(r=n[_])||void 0===r?void 0:r[C]),{},(0,i.Z)({},f,e.target.value))))))}))},value:String(m||"")}}))})),(0,S.jsx)(d.Z,{light:!0}),(0,c.createElement)(v.S,k(k({},I),{},{title:"Record",description:"The most recently synced record.",key:"block-uuid-".concat(_,"-").concat(C)}),(0,S.jsx)(m.Z,{columnFlex:[1,null],columns:[{uuid:"Column"},{uuid:"Value"}],rows:null===(P=Object.entries(D||{}))||void 0===P?void 0:P.map((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];return[(0,S.jsx)(j.ZP,{default:!0,monospace:!0,children:t},t),(0,S.jsx)(j.ZP,{default:!0,monospace:!0,children:String(i)},"".concat(t,"-").concat(i))]}))}))]})}))})})}))]})}},88785:function(e,n,t){t.d(n,{J:function(){return c},U:function(){return u}});var i=t(38626),r=t(44897),l=t(42631),o=t(70515),u=i.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-m7tlau-0"})(["border-radius:","px;border-style:solid;border-width:2px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],l.TR,14*o.iI,o.cd*o.iI,o.cd*o.iI,40*o.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||r.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||r.Z.interactive).linkPrimary,";\n ")})),c=i.default.div.withConfig({displayName:"indexstyle__DateSelectionContainer",componentId:"sc-m7tlau-1"})(["border-radius:","px;padding:","px;"," "," ",""],l.n_,o.tr,(function(e){return"\n background-color: ".concat((e.theme.interactive||r.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.absolute&&"\n position: absolute;\n z-index: 2;\n right: 0;\n top: ".concat(2.5*o.iI,"px;\n ")}),(function(e){return e.topPosition&&"\n top: -".concat(42*o.iI,"px;\n ")}))},12717:function(e,n,t){t.d(n,{Z:function(){return Ue}});var i=t(21831),r=t(82394),l=t(75582),o=t(12691),u=t.n(o),c=t(82684),s=t(20026),a=t.n(s),d=t(92083),p=t.n(d),v=t(21764),h=t(69864),f=t(34376),m=t(71610),j=t(71180),g=t(90299),x=t(14805),Z=t(70652),b=t(50724),y=t(9134),O=t(39457),P=t(38626),_=t(39867),S=t(55485),E=t(85854),k=t(38276),I=t(75499),T=t(30160),w=t(17488),C=t(12468),M=t(44375),A=t(70515),D=t(55283),N=t(86735),L=t(28598);function R(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function U(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?R(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):R(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var H=function(e){var n=e.blocks,t=e.updateVariables,i=e.variables,l=(0,c.useContext)(P.ThemeContext),o=(0,c.useCallback)((function(e,n){return t((function(){var t=(null===i||void 0===i?void 0:i.__mage_variables)||{},l=(null===t||void 0===t?void 0:t.blocks)||{},o=l[e]||{},u=(null===o||void 0===o?void 0:o.configuration)||{};return U(U({},i),{},{__mage_variables:U(U({},t),{},{blocks:U(U({},l),{},(0,r.Z)({},e,U(U({},o),{},{configuration:U(U({},u),n)})))})})}))}),[t,i]);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(E.Z,{children:"dbt runtime settings"}),(0,L.jsx)(k.Z,{mt:A.Mq,children:(0,L.jsx)(I.Z,{columnFlex:[1,null,null,null],columns:[{uuid:"Block"},{uuid:"Flags"},{uuid:"Prefix"},{uuid:"Suffix"}],compact:!0,rows:null===n||void 0===n?void 0:n.map((function(e){var n,t,r,u=e.type,c=e.uuid,s=(0,M.IU)(e).name,a=(0,D.qn)(u,{blockColor:e.color,theme:l}).accent,d=null===i||void 0===i||null===(n=i.__mage_variables)||void 0===n||null===(t=n.blocks)||void 0===t||null===(r=t[c])||void 0===r?void 0:r.configuration,p=d||{},v=p.prefix,h=p.suffix,f=(null===d||void 0===d?void 0:d.flags)||[],m=!(null===f||void 0===f||!f.includes(M.Dy));return[(0,L.jsx)(C.Z,{block:!0,label:(0,L.jsx)(T.ZP,{monospace:!0,small:!0,children:c}),size:null,widthFitContent:!0,children:(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(_.Z,{color:a,size:1.5*A.iI,square:!0}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsxs)(T.ZP,{monospace:!0,small:!0,children:[v&&(0,L.jsx)(T.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:v}),s,h&&(0,L.jsx)(T.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:h})]})]})},"uuid-".concat(c)),(0,L.jsx)(S.ZP,{alignItems:"center",children:(0,L.jsx)(Z.Z,{checked:m,label:M.Dy,monospace:!0,onClick:function(){return o(c,{flags:m?(0,N.Od)(f,(function(e){return M.Dy===e})):f.concat(M.Dy)})},small:!0})},"flags-".concat(c)),(0,L.jsx)(w.Z,{compact:!0,monospace:!0,onChange:function(e){return o(c,{prefix:e.target.value})},placeholder:"N+, +",small:!0,value:v,width:10*A.iI},"prefix-".concat(c)),(0,L.jsx)(w.Z,{compact:!0,monospace:!0,onChange:function(e){return o(c,{suffix:e.target.value})},placeholder:"+, +N",small:!0,value:h,width:10*A.iI},"suffix-".concat(c))]}))})})]})},F=t(97196),q=t(15338),z=t(97618),B=t(48670),G=t(26304),V=t(44897),W=t(95363),Y=t(61896),K=["children","large","lineHeight","ordered"];function J(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function X(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?J(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):J(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Q=(0,P.css)([""," "," "," "," "," "," "," "," "," ",""],(function(e){return!e.muted&&"\n color: ".concat((e.theme.content||V.Z.content).default,";\n ")}),(function(e){return e.muted&&"\n color: ".concat((e.theme.content||V.Z.content).muted,";\n ")}),(function(e){return e.inverted&&"\n color: ".concat((e.theme.content||V.Z.content).inverted,";\n ")}),(function(e){return e.color&&"\n color: ".concat(e.color,";\n ")}),(function(e){return!e.monospace&&"\n font-family: ".concat(W.ry,";\n ")}),(function(e){return e.monospace&&"\n font-family: ".concat(W.Vp,";\n ")}),(function(e){return e.large&&"\n ".concat(Y.x_,"\n ")}),(function(e){return!e.large&&!e.small&&"\n ".concat(Y.i3,"\n ")}),(function(e){return e.small&&"\n ".concat(Y.J5,"\n ")}),(function(e){return e.lineHeight&&"\n line-height: ".concat(e.lineHeight,"px !important;\n ")})),$=P.default.ul.withConfig({displayName:"List__UnorderedListStyle",componentId:"sc-1f6yhbi-0"})(["",""],Q),ee=P.default.ol.withConfig({displayName:"List__OrderedListStyle",componentId:"sc-1f6yhbi-1"})(["",""],Q),ne=P.default.li.withConfig({displayName:"List__ListItemStyle",componentId:"sc-1f6yhbi-2"})(["",""],(function(e){return e.large&&e.marginTop&&"\n margin-top: ".concat(1*A.iI,"px;\n ")}));var te,ie=function(e){var n=e.children,t=e.large,i=e.lineHeight,r=e.ordered,l=(0,G.Z)(e,K),o=r?ee:$;return(0,L.jsx)(o,X(X({large:t,lineHeight:i},l),{},{children:c.Children.map(n,(function(e,n){var i;return(0,L.jsx)(ne,X(X({large:t,marginTop:n>=1},l),{},{children:c.cloneElement(e)}),(null===(i=e.props)||void 0===i?void 0:i.key)||n)}))}))},re=t(37899),le=t(75457),oe=t(30229),ue=t(57653),ce=t(83784),se=t(82359),ae=t(44085),de=t(81334),pe=t(69650),ve=t(81769),he=t(54193),fe=t(72473),me=t(81728),je=t(16488),ge=t(70320),xe=(te={},(0,r.Z)(te,he.zj.DATE,fe.aw),(0,r.Z)(te,he.zj.DATETIME,fe.Pf),(0,r.Z)(te,he.zj.DICTIONARY,fe.$l),(0,r.Z)(te,he.zj.FLOAT,fe.As),(0,r.Z)(te,he.zj.INTEGER,fe.qZ),(0,r.Z)(te,he.zj.LIST,fe.B4),(0,r.Z)(te,he.zj.STRING,fe.KJ),te);var Ze=function(e){var n,t,i,r=e.containerRef,o=e.date,u=e.interactions,s=e.pipeline,a=e.pipelineInteraction,d=e.pipelineSchedule,p=e.setVariables,v=e.showSummary,h=e.time,f=e.triggerTypes,m=e.variables,j=(0,c.useMemo)((function(){return(0,N.HK)(u||[],(function(e){return e.uuid}))}),[u]),g=(0,c.useMemo)((function(){return(null===s||void 0===s?void 0:s.blocks)||[]}),[s]),x=(0,c.useMemo)((function(){return(null===a||void 0===a?void 0:a.blocks)||{}}),[a]),Z=(0,c.useMemo)((function(){var e=[];null===g||void 0===g||g.length;return null===g||void 0===g||g.map((function(n,t){var i=(n||{uuid:null}).uuid,l=(null===x||void 0===x?void 0:x[i])||[];null===l||void 0===l||l.length;e.push((0,L.jsx)(k.Z,{p:A.cd,children:null===l||void 0===l?void 0:l.map((function(e,n){return(0,L.jsx)(k.Z,{mt:n>=1?2*A.cd:0,children:(0,L.jsx)(ve.Z,{blockInteraction:e,containerRef:r,interaction:null===j||void 0===j?void 0:j[null===e||void 0===e?void 0:e.uuid],setVariables:p,variables:m})},"".concat(null===e||void 0===e?void 0:e.uuid,"-").concat(n))}))}))})),e}),[g,r,j,p,m]),b=(0,ge.qB)(),y=(0,c.useMemo)((function(){return o&&null!==h&&void 0!==h&&h.hour&&null!==h&&void 0!==h&&h.minute?(0,je.XM)(o,h,{convertToUtc:b,includeSeconds:!0,localTimezone:b}):null}),[o,b,h]),O=(0,c.useMemo)((function(){var e=[];null===g||void 0===g||g.length;return null===g||void 0===g||g.map((function(n,t){var i=(n||{uuid:null}).uuid,r=(null===x||void 0===x?void 0:x[i])||[];null===r||void 0===r||r.forEach((function(n,r){var o=null===j||void 0===j?void 0:j[null===n||void 0===n?void 0:n.uuid];Object.entries((null===o||void 0===o?void 0:o.variables)||{}).forEach((function(n,o){var u,c=(0,l.Z)(n,2),s=c[0],a=c[1],d=a.name,p=a.required,v=a.types,h=null===m||void 0===m?void 0:m[s],f="undefined"===typeof h,j=p&&f,g=(null===xe||void 0===xe?void 0:xe[v[0]])||fe.KJ,x=[];"undefined"!==typeof h?h&&Array.isArray(h||[])?null===h||void 0===h||h.forEach((function(e){x.push(e&&"object"===typeof e?x.push(JSON.stringify(e)):x.push(String(e)))})):h&&"object"===typeof h?Object.entries(h||{}).forEach((function(e){var n=(0,l.Z)(e,2),t=n[0];n[1]&&x.push(String(t))})):x.push(String(h)):x.push(h||""),e.push([(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(g,{default:!0,size:1.5*A.iI}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:!0,monospace:!0,children:s})]},"".concat(i,"-").concat(s,"-label-").concat(d,"-").concat(t,"-").concat(r,"-").concat(o)),(0,L.jsx)(k.Z,{py:A.cd,children:(0,L.jsxs)(T.ZP,{danger:j,monospace:!j,muted:f,children:[f&&!j&&"-",j&&"This is required",!f&&!j&&(null===x||void 0===x||null===(u=x.map((function(e){return String(e)})))||void 0===u?void 0:u.join(", "))]})},"".concat(i,"-").concat(s,"-value-").concat(d,"-").concat(h,"-").concat(t,"-").concat(r,"-").concat(o))])}))}))})),(0,L.jsx)(I.Z,{columnFlex:[null,1],rows:e})}),[g,j,m]);return(0,L.jsxs)(L.Fragment,{children:[!v&&Z,v&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(k.Z,{p:A.cd,children:(0,L.jsx)(E.Z,{children:"Settings"})}),(0,L.jsx)(q.Z,{light:!0,short:!0}),(0,L.jsx)(I.Z,{columnFlex:[null,1],rows:[[(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.Bf,{default:!0}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:!0,children:"Trigger type"})]},"trigger_type"),(0,L.jsx)(k.Z,{py:A.cd,children:(0,L.jsx)(T.ZP,{danger:!(null!==d&&void 0!==d&&d.schedule_type),monospace:!0,children:null!==d&&void 0!==d&&d.schedule_type?null===f||void 0===f||null===(n=f.find((function(e){return e.uuid===(null===d||void 0===d?void 0:d.schedule_type)})))||void 0===n||null===(t=n.label)||void 0===t?void 0:t.call(n):"This is required"})},"trigger_type_input")],[(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.KJ,{default:!0}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:!0,children:"Trigger name"})]},"trigger_name"),(0,L.jsx)(k.Z,{py:A.cd,children:(0,L.jsx)(T.ZP,{danger:!(null!==d&&void 0!==d&&d.name),monospace:!0,children:(null===d||void 0===d?void 0:d.name)||"This is required"})},"trigger_name_input")],[(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.KJ,{default:!0}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:!0,children:"Trigger description"})]},"trigger_description"),(0,L.jsx)(k.Z,{py:A.cd,children:(0,L.jsx)(T.ZP,{monospace:!0,muted:!(null!==d&&void 0!==d&&d.description),children:(null===d||void 0===d?void 0:d.description)||"-"})},"trigger_description_input")],[(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.Pf,{default:!0,size:1.5*A.iI}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:!0,children:"Frequency"})]},"frequency"),(0,L.jsx)(k.Z,{py:A.cd,children:(0,L.jsxs)(T.ZP,{danger:!(null!==d&&void 0!==d&&d.schedule_interval),monospace:!0,muted:!(null!==d&&void 0!==d&&d.schedule_interval),children:[(null===d||void 0===d?void 0:d.schedule_interval)&&(0,me.vg)((null===d||void 0===d||null===(i=d.schedule_interval)||void 0===i?void 0:i.substring(1))||""),!(null!==d&&void 0!==d&&d.schedule_interval)&&"This is required"]})},"frequency_input")],[(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.aw,{default:!0,size:1.5*A.iI}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:!0,children:"Start date and time"})]},"start_time"),(0,L.jsx)(k.Z,{py:A.cd,children:(0,L.jsx)(T.ZP,{danger:!y,monospace:!!y,muted:!y,children:y||"This is required"})},"start_time_input")]]}),(0,L.jsx)(k.Z,{p:A.cd,children:(0,L.jsx)(E.Z,{children:"Customize"})}),(0,L.jsx)(q.Z,{light:!0,short:!0}),O]})]})},be=t(35686),ye=t(77417),Oe=t(44425),Pe=t(88785),_e=t(28795),Se={label:function(){return"CUSTOMIZE"},uuid:"customize"},Ee={label:function(){return"SETTINGS"},uuid:"settings"},ke={label:function(){return"REVIEW"},uuid:"review"},Ie=[Ee,Se,ke],Te=t(32080),we=t(22286),Ce=t(79500),Me=t(8916),Ae=t(42122),De=t(72619),Ne=t(3917);function Le(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function Re(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Le(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Le(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ue=function(e){var n=e.creatingWithLimitation,t=e.errors,o=e.fetchPipelineSchedule,s=e.onCancel,d=e.pipeline,P=e.pipelineSchedule,_=e.setErrors,C=e.variables,M=e.useCreateScheduleMutation,R=(0,ye.Z)().project,U=(0,c.useRef)(null),G=(0,f.useRouter)(),V=(0,ge.qB)(),W=null===d||void 0===d?void 0:d.uuid,Y=(0,c.useMemo)((function(){return null===P||void 0===P?void 0:P.id}),[P]),K=(null===d||void 0===d?void 0:d.type)===ue.qL.STREAMING,J=(0,c.useMemo)((function(){var e;return null===P||void 0===P||null===(e=P.variables)||void 0===e?void 0:e[oe.PN]}),[P]),X=(0,c.useState)(J?"string"===typeof J&&(0,me.Pb)(J)?JSON.stringify(J):J:null),Q=X[0],$=X[1],ee=(0,c.useState)([]),ne=ee[0],te=ee[1],ve=(0,c.useState)(!0),he=ve[0],xe=ve[1],Le=(0,c.useState)(!1),Ue=Le[0],He=Le[1],Fe=(0,c.useState)(!1),qe=Fe[0],ze=Fe[1],Be=(0,c.useState)(null),Ge=Be[0],Ve=Be[1],We=(0,c.useState)({}),Ye=We[0],Ke=We[1],Je=(0,c.useState)(null),Xe=Je[0],Qe=Je[1],$e=(0,c.useState)(null),en=$e[0],nn=$e[1],tn=(0,c.useState)(!1),rn=tn[0],ln=tn[1],on=(0,c.useState)(null),un=on[0],cn=on[1],sn=be.ZP.client_pages.detail("pipeline_schedule:create",{"pipeline_schedules[]":[Y],"pipelines[]":[W]},{},{key:"Triggers/Edit/".concat(W,"/").concat(Y),pauseFetch:!W||!Y}).data,an=((0,c.useMemo)((function(){return null===sn||void 0===sn?void 0:sn.client_page}),[sn]),(0,c.useState)(Ie[0].uuid)),dn=an[0],pn=an[1],vn=(0,c.useMemo)((function(){var e;return!(null===R||void 0===R||null===(e=R.features)||void 0===e||!e[se.d.INTERACTIONS])}),[null===R||void 0===R?void 0:R.features]),hn=(0,c.useMemo)((function(){return!Y&&n}),[n,Y]),fn=be.ZP.pipeline_interactions.detail(vn&&W,{filter_for_permissions:1}).data,mn=be.ZP.interactions.pipeline_interactions.list(vn&&W).data,jn=(0,c.useMemo)((function(){return(null===fn||void 0===fn?void 0:fn.pipeline_interaction)||{}}),[fn]),gn=(0,c.useMemo)((function(){return(null===mn||void 0===mn?void 0:mn.interactions)||[]}),[mn]),xn=(0,c.useMemo)((function(){var e;return vn&&(null===(e=Object.keys((null===jn||void 0===jn?void 0:jn.blocks)||{}))||void 0===e?void 0:e.length)>=1}),[vn,jn]),Zn=(0,c.useMemo)((function(){return!!Y&&xn}),[xn,Y]),bn=(0,c.useMemo)((function(){var e,n={};return null===jn||void 0===jn||null===(e=jn.permissions)||void 0===e||e.forEach((function(e){var t=e.triggers;null===t||void 0===t||t.forEach((function(e){var t=e.schedule_interval,i=e.schedule_type;null!==n&&void 0!==n&&n[i]||(n[i]={}),t&&(n[i][t]=!0)}))})),n}),[jn]),yn=(0,c.useMemo)((function(){return(0,Me.wx)(C,(function(e){return e.uuid===ce.C}))}),[C]),On=(0,c.useMemo)((function(){return Xe||{}}),[Xe]),Pn=On.description,_n=On.name,Sn=On.schedule_interval,En=On.schedule_type,kn=On.settings,In=void 0===kn?{}:kn,Tn=On.start_time,wn=On.tags,Cn=On.variables,Mn=void 0===Cn?{}:Cn;(0,c.useEffect)((function(){!Ge&&In&&Ve(In)}),[Ge,In]);var An=(0,c.useState)(null),Dn=An[0],Nn=An[1],Ln=(0,c.useState)({hour:"00",minute:"00"}),Rn=Ln[0],Un=Ln[1],Hn=(0,c.useState)({dayOfMonth:null,dayOfWeek:null,hour:null,minute:null,second:null}),Fn=Hn[0],qn=Hn[1],zn=be.ZP.event_rules.detail(oe.Xm.EVENT===En?"aws":null).data,Bn=(0,c.useMemo)((function(){var e;return(null===zn||void 0===zn||null===(e=zn.event_rule)||void 0===e?void 0:e.rules)||[]}),[zn]),Gn=(0,c.useMemo)((function(){return(0,N.HK)(Bn,(function(e){return e.name}))}),[Bn]),Vn=(0,h.Db)(be.ZP.pipeline_schedules.useUpdate(Y),{onSuccess:function(e){return(0,De.wD)(e,{callback:function(){null===o||void 0===o||o(),G.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(W,"/triggers/").concat(Y))},onErrorCallback:function(e,n){return _({errors:n,response:e})}})}}),Wn=(0,l.Z)(Vn,2),Yn=Wn[0],Kn=Wn[1].isLoading,Jn=(0,c.useMemo)((function(){return Mn||{}}),[Mn]);(0,c.useEffect)((function(){if(Tn){var e=(0,Ce.a)(Tn,{localTimezone:V});Nn(null===e||void 0===e?void 0:e.date),Un(null===e||void 0===e?void 0:e.time);var n=p()(Tn).utc();qn({dayOfMonth:n.date(),dayOfWeek:n.day(),hour:n.hours(),minute:n.minutes(),second:n.seconds()})}else{var t=new Date;Nn(t),Un(V?{hour:(0,Ne.lJ)(String(t.getHours())),minute:(0,Ne.lJ)(String(t.getMinutes()))}:{hour:(0,Ne.lJ)(String(t.getUTCHours())),minute:(0,Ne.lJ)(String(t.getUTCMinutes()))})}}),[V,Tn]),(0,c.useEffect)((function(){Jn&&Object.keys(Jn).length>0&&xe(!0)}),[Jn]),(0,c.useEffect)((function(){Ke(he?null===yn||void 0===yn?void 0:yn.reduce((function(e,n){var t=n.uuid,i=n.value;return Re(Re({},e),{},(0,r.Z)({},t,Jn[t]||i))}),{}):null)}),[yn,he,Jn]);var Xn=(0,c.useMemo)((function(){return(0,je._U)(Sn)}),[Sn]),Qn=(0,c.useMemo)((function(){return Xn&&un?a().toString(un,{throwExceptionOnParseError:!1}):""}),[un,Xn]),$n=(0,c.useMemo)((function(){return null===Qn||void 0===Qn?void 0:Qn.toLowerCase().includes("error")}),[Qn]);(0,c.useEffect)((function(){if(P&&!Xe){if(te(P.event_matchers),(0,je._U)(null===P||void 0===P?void 0:P.schedule_interval)){var e=V?(0,je.lO)(null===P||void 0===P?void 0:P.schedule_interval):null===P||void 0===P?void 0:P.schedule_interval;cn(e),Qe(Re(Re({},P),{},{schedule_interval:"custom"}))}else Qe(K?Re(Re({},P),{},{schedule_interval:oe.U5.ONCE}):P);var n=P.sla;if(n){He(!0);var t=(0,je.gU)(n),i=t.time,r=t.unit;Qe((function(e){return Re(Re({},e),{},{slaAmount:i,slaUnit:r})}))}}}),[V,K,P,Xe,Sn]);var et=(0,c.useMemo)((function(){return!(null===Ge||void 0===Ge||!Ge.landing_time_enabled)}),[Ge]),nt=(0,c.useMemo)((function(){return oe.Xm.TIME!==En||![oe.U5.DAILY,oe.U5.HOURLY,oe.U5.MONTHLY,oe.U5.WEEKLY].includes(Sn)}),[Sn,En]),tt=(0,c.useMemo)((function(){return et&&!nt}),[nt,et]),it=(0,c.useCallback)((function(){var e=Re(Re({},(0,Ae.GL)(Xe,["name","description","schedule_type","tags"])),{},{event_matchers:[],schedule_interval:null,start_time:null,variables:(0,Me.e7)(Re(Re({},Ye),Q?(0,r.Z)({},oe.PN,Q):{}))});if(tt){var n=Fn.dayOfMonth,t=Fn.dayOfWeek,i=Fn.hour,l=Fn.minute,o=Fn.second,u=p()("2023-07-01").utc();(0,me.HW)(n)&&(u=u.date(n)),(0,me.HW)(t)&&(u=u.day(t)),(0,me.HW)(i)&&(u=u.hours(i)),(0,me.HW)(l)&&(u=u.minutes(l)),(0,me.HW)(o)&&(u=u.seconds(o)),e.schedule_interval=Xn?un:Xe.schedule_interval,e.start_time=u.toISOString()}else oe.Xm.EVENT===Xe.schedule_type?e.event_matchers=ne:(e.schedule_interval=Xn?V&&!$n&&un?(0,je.lO)(un,!0):un:Xe.schedule_interval,e.start_time=Dn&&null!==Rn&&void 0!==Rn&&Rn.hour&&null!==Rn&&void 0!==Rn&&Rn.minute?(0,je.XM)(Dn,Rn,{convertToUtc:V,includeSeconds:!0,localTimezone:V}):null);if(Ue){var c=null===Xe||void 0===Xe?void 0:Xe.slaAmount,s=null===Xe||void 0===Xe?void 0:Xe.slaUnit;if(!c||isNaN(c)||!s)return void v.Am.error("Please enter a valid SLA",{position:v.Am.POSITION.BOTTOM_RIGHT,toastId:"sla_error"});e.sla=(0,je.vJ)(c,s)}else null!==P&&void 0!==P&&P.sla&&(e.sla=0);e.settings=Ge,Yn({pipeline_schedule:Re(Re({},e),{},{variables:en||(null===e||void 0===e?void 0:e.variables)})})}),[Q,$n,un,Dn,V,Ue,ne,Xn,Fn,P,Ye,Xe,Ge,tt,Rn,Yn,en]),rt=(0,c.useMemo)((function(){if(null===P||void 0===P||!P.runtime_average)return"Trigger doesn\u2019t have enough history to estimate runtime.";var e=Number(null===P||void 0===P?void 0:P.runtime_average),n=Math.max(Math.floor(e/3600),0),t=Math.max(Math.floor((e-60*n*60)/60),0),i=Math.max(Math.floor(e-(60*n*60+60*t)),0),r=[];return n>=1&&r.push((0,me._6)("hour",n,!0)),t>=1&&r.push((0,me._6)("minute",t,!0)),i>=1&&r.push((0,me._6)("second",i,!0)),r.join(" ")}),[P]),lt=(0,c.useMemo)((function(){if(!tt)return null;var e=[(0,L.jsxs)(k.Z,{mr:1,children:[(0,L.jsx)(k.Z,{mb:1,children:(0,L.jsx)(T.ZP,{bold:!0,default:!0,small:!0,children:"Minute"})}),(0,L.jsxs)(ae.Z,{compact:!0,monospace:!0,onChange:function(e){qn((function(n){return Re(Re({},n),{},{minute:e.target.value})}))},value:(null===Fn||void 0===Fn?void 0:Fn.minute)||"",children:[(0,L.jsx)("option",{value:""}),(0,N.w6)(60).map((function(e,n){return(0,L.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Minute"),(0,L.jsxs)(k.Z,{mr:1,children:[(0,L.jsx)(k.Z,{mb:1,children:(0,L.jsx)(T.ZP,{bold:!0,default:!0,small:!0,children:"Second"})}),(0,L.jsxs)(ae.Z,{compact:!0,monospace:!0,onChange:function(e){qn((function(n){return Re(Re({},n),{},{second:e.target.value})}))},value:(null===Fn||void 0===Fn?void 0:Fn.second)||"",children:[(0,L.jsx)("option",{value:""}),(0,N.w6)(60).map((function(e,n){return(0,L.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Second")];return[oe.U5.DAILY,oe.U5.MONTHLY,oe.U5.WEEKLY].includes(Sn)&&e.unshift((0,L.jsxs)(k.Z,{mr:1,children:[(0,L.jsx)(k.Z,{mb:1,children:(0,L.jsx)(T.ZP,{bold:!0,default:!0,small:!0,children:"Hour"})}),(0,L.jsxs)(ae.Z,{compact:!0,monospace:!0,onChange:function(e){qn((function(n){return Re(Re({},n),{},{hour:e.target.value})}))},value:(null===Fn||void 0===Fn?void 0:Fn.hour)||"",children:[(0,L.jsx)("option",{value:""}),(0,N.w6)(24).map((function(e,n){return(0,L.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Hour")),oe.U5.WEEKLY===Sn?e.unshift((0,L.jsxs)(k.Z,{mr:1,children:[(0,L.jsx)(k.Z,{mb:1,children:(0,L.jsx)(T.ZP,{bold:!0,default:!0,small:!0,children:"Day of the week"})}),(0,L.jsxs)(ae.Z,{compact:!0,monospace:!0,onChange:function(e){qn((function(n){return Re(Re({},n),{},{dayOfWeek:e.target.value})}))},value:(null===Fn||void 0===Fn?void 0:Fn.dayOfWeek)||"",children:[(0,L.jsx)("option",{value:""}),(0,L.jsx)("option",{value:6,children:"Sunday"}),(0,L.jsx)("option",{value:0,children:"Monday"}),(0,L.jsx)("option",{value:1,children:"Tuesday"}),(0,L.jsx)("option",{value:2,children:"Wednesday"}),(0,L.jsx)("option",{value:3,children:"Thursday"}),(0,L.jsx)("option",{value:4,children:"Friday"}),(0,L.jsx)("option",{value:5,children:"Saturday"})]})]},"Day of the week")):oe.U5.MONTHLY===Sn&&e.unshift((0,L.jsxs)(k.Z,{mr:1,children:[(0,L.jsx)(k.Z,{mb:1,children:(0,L.jsx)(T.ZP,{bold:!0,default:!0,small:!0,children:"Day of the month"})}),(0,L.jsxs)(ae.Z,{compact:!0,monospace:!0,onChange:function(e){qn((function(n){return Re(Re({},n),{},{dayOfMonth:e.target.value})}))},value:(null===Fn||void 0===Fn?void 0:Fn.dayOfMonth)||"",children:[(0,L.jsx)("option",{value:""}),(0,N.w6)(31).map((function(e,n){return(0,L.jsx)("option",{value:n+1,children:n+1>=10?String(n+1):"0".concat(n+1)},n+1)}))]})]},"Day of the month")),(0,L.jsx)(S.ZP,{children:e})}),[Fn,Sn,tt]),ot=(0,c.useMemo)((function(){return[(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.KJ,{default:!0}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:!0,children:"Trigger name"})]},"trigger_name"),(0,L.jsx)(w.Z,{monospace:!0,onChange:function(e){e.preventDefault(),Qe((function(n){return Re(Re({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:_n},"trigger_name_input")]}),[_n]),ut=(0,c.useMemo)((function(){return[(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.KJ,{default:!0}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:!0,children:"Trigger description"})]},"trigger_description"),(0,L.jsx)(w.Z,{monospace:!0,onChange:function(e){e.preventDefault(),Qe((function(n){return Re(Re({},n),{},{description:e.target.value})}))},placeholder:"Description",value:Pn},"trigger_description_input")]}),[Pn]),ct=(0,c.useMemo)((function(){var e=[ot,ut,[(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.Pf,{default:!0,size:1.5*A.iI}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:!0,children:"Frequency"})]},"frequency"),(0,L.jsxs)("div",{children:[(0,L.jsxs)(ae.Z,{monospace:!0,onChange:function(e){e.preventDefault();var n=e.target.value;Qe((function(e){return Re(Re({},e),{},{schedule_interval:n})}))},placeholder:"Choose the frequency to run",value:Sn,children:[Object.values(oe.U5).reduce((function(e,n){var t;return!hn||null!==bn&&void 0!==bn&&null!==(t=bn[oe.Xm.TIME])&&void 0!==t&&t[n]?e.concat((0,L.jsx)("option",{value:n,children:n.substring(1)},n)):e}),[]),!hn&&(0,L.jsx)("option",{value:"custom",children:"custom"},"custom")]}),!hn&&(0,L.jsx)(k.Z,{mt:1,p:1,children:(0,L.jsxs)(T.ZP,{muted:!0,small:!0,children:["If you don't see the frequency option you need, select ",(0,L.jsx)(T.ZP,{inline:!0,monospace:!0,small:!0,children:"custom"})," and enter CRON syntax."]})})]},"frequency_input")]];return hn||e.push([(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.rs,{default:!0,size:1.5*A.iI}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:!0,children:"Enable landing time"})]},"frequency"),(0,L.jsxs)("div",{children:[(0,L.jsx)(pe.Z,{checked:et,disabled:nt,onCheck:function(){Ve((function(e){return Re(Re({},e),{},{landing_time_enabled:!et})}))}}),(0,L.jsxs)(k.Z,{mt:1,p:1,children:[nt&&(0,L.jsxs)(T.ZP,{muted:!0,small:!0,children:["In order to enable landing time, the trigger\u2019s frequency must be ",(0,L.jsx)(T.ZP,{inline:!0,monospace:!0,small:!0,children:oe.U5.HOURLY}),", ",(0,L.jsx)(T.ZP,{inline:!0,monospace:!0,small:!0,children:oe.U5.DAILY}),", ",(0,L.jsx)(T.ZP,{inline:!0,monospace:!0,small:!0,children:oe.U5.WEEKLY}),", or ",(0,L.jsx)(T.ZP,{inline:!0,monospace:!0,small:!0,children:oe.U5.MONTHLY}),"."]}),!nt&&(0,L.jsx)(T.ZP,{muted:!0,small:!0,children:"Instead of starting at a specific time, this trigger will schedule pipeline runs at a time where it will finish by the specified time below."})]})]},"frequency_input")]),tt&&e.push([(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.Pf,{default:!0,size:1.5*A.iI}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:!0,children:"Average runtime"})]},"runtime_average"),(0,L.jsx)(S.ZP,{alignItems:"center",style:{minHeight:"".concat(5.75*A.iI,"px")},children:(0,L.jsx)(T.ZP,{monospace:!0,children:rt})},"runtime_average_value")]),e.push([(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.aw,{default:!0,size:1.5*A.iI}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsxs)(T.ZP,{default:!0,children:[tt&&"Pipeline complete by",!tt&&"Start date and time"]})]},"start_time"),tt?lt:(0,L.jsxs)("div",{style:{minHeight:"".concat(5.75*A.iI,"px")},children:[!rn&&(0,L.jsx)(w.Z,{monospace:!0,onClick:function(){return ln((function(e){return!e}))},placeholder:"YYYY-MM-DD HH:MM",value:Dn?(0,je.XM)(Dn,Rn,{localTimezone:V}):""}),(0,L.jsx)("div",{style:{width:"400px"},children:(0,L.jsx)(b.Z,{disableEscape:!0,onClickOutside:function(){return ln(!1)},open:rn,style:{position:"relative"},children:(0,L.jsx)(x.Z,{localTime:V,selectedDate:Dn,selectedTime:Rn,setSelectedDate:Nn,setSelectedTime:Un,topPosition:!0})})})]},"start_time_input")]),K&&e.splice(2,2),Xn&&e.splice(2,0,[(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.EK,{default:!0,size:1.5*A.iI}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:!0,children:"Cron expression"})]},"cron_expression"),(0,L.jsxs)("div",{children:[(0,L.jsx)(w.Z,{monospace:!0,onChange:function(e){e.preventDefault(),cn(e.target.value)},placeholder:"* * * * *",value:un}),(0,L.jsxs)(k.Z,{mt:1,p:1,children:[(0,L.jsx)(T.ZP,{monospace:!0,xsmall:!0,children:"[minute] [hour] [day(month)] [month] [day(week)]"}),(0,L.jsx)(k.Z,{mb:"2px"}),un?(0,L.jsx)(T.ZP,{danger:$n,muted:!0,small:!0,children:$n?"Invalid cron expression. Please check the cron syntax.":(0,L.jsxs)(L.Fragment,{children:['"',Qn,'"']})}):null,V&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(T.ZP,{bold:!0,inline:!0,small:!0,warning:!0,children:"Note:\xa0"}),(0,L.jsxs)(T.ZP,{inline:!0,small:!0,children:["If you have the display_local_timezone setting enabled, the local cron expression above will match your local timezone only",(0,L.jsx)("br",{}),"if the minute and hour values are single values without any special characters, such as the comma, hyphen, or slash.",(0,L.jsx)("br",{}),"You can still use cron expressions with special characters for the minute/hour values, but it will be based in UTC time."]})]})]})]},"cron_expression_input")]),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(k.Z,{mb:2,px:A.cd,children:(0,L.jsx)(E.Z,{children:"Settings"})}),(0,L.jsx)(q.Z,{light:!0,short:!0}),(0,L.jsx)(I.Z,{columnFlex:[null,1],rows:e})]})}),[$n,un,Dn,V,hn,Xn,K,nt,et,lt,bn,Qn,rt,Sn,rn,tt,Rn,ot,ut]),st=(0,c.useCallback)((function(e,n){te((function(t){return Object.entries(n).forEach((function(n){var i=(0,l.Z)(n,2),r=i[0],o=i[1];t[e][r]=o})),(0,i.Z)(t)}))}),[te]),at=(0,c.useMemo)((function(){return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(k.Z,{mb:A.cd,px:A.cd,children:(0,L.jsx)(E.Z,{children:"Settings"})}),(0,L.jsx)(q.Z,{light:!0,short:!0}),(0,L.jsx)(I.Z,{columnFlex:[null,1],rows:[ot,ut]}),(0,L.jsxs)(k.Z,{mb:2,mt:5,px:A.cd,children:[(0,L.jsx)(E.Z,{children:"Events"}),(0,L.jsxs)(T.ZP,{muted:!0,children:["Add 1 or more event that will trigger this pipeline to run.",(0,L.jsx)("br",{}),"If you add more than 1 event, this pipeline will trigger if any of the events are received."]}),(0,L.jsxs)(k.Z,{mt:A.Mq,children:[(0,L.jsx)(T.ZP,{bold:!0,large:!0,children:"AWS events"}),(0,L.jsxs)(T.ZP,{muted:!0,children:["In order to retrieve all the possible AWS events you can trigger your pipeline from,",(0,L.jsx)("br",{}),"you\u2019ll need to set 3 environment variables (",(0,L.jsx)(B.Z,{href:"https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html",openNewWindow:!0,underline:!0,children:"more info here"}),"):"]}),(0,L.jsx)(k.Z,{mt:1,children:(0,L.jsxs)(ie,{monospace:!0,ordered:!0,children:[(0,L.jsx)(T.ZP,{monospace:!0,children:"AWS_REGION_NAME"}),(0,L.jsx)(T.ZP,{monospace:!0,children:"AWS_ACCESS_KEY_ID"}),(0,L.jsx)(T.ZP,{monospace:!0,children:"AWS_SECRET_ACCESS_KEY"})]})})]})]}),(0,L.jsx)(q.Z,{light:!0,short:!0}),(null===ne||void 0===ne?void 0:ne.length)>=1&&(0,L.jsx)(I.Z,{alignTop:!0,columnFlex:[1,1,2,null],columns:[{uuid:"Provider"},{uuid:"Event"},{uuid:"Pattern"},{label:function(){return""},uuid:"delete"}],rows:null===ne||void 0===ne?void 0:ne.map((function(e,n){var t=e.event_type,i=e.name,r=e.pattern,l=e.id||"".concat(t,"-").concat(i,"-").concat(n,"-").concat(JSON.stringify(r)),o=[];return r&&JSON.stringify(r,null,2).split("\n").forEach((function(e){o.push(" ".concat(e))})),[(0,L.jsx)(ae.Z,{monospace:!0,onChange:function(e){return st(n,{event_type:e.target.value})},placeholder:"Event provider",value:t||"",children:F.S5.map((function(e){var n=e.label,t=e.uuid;return(0,L.jsx)("option",{value:t,children:n()},t)}))},"event-provider-".concat(l)),(0,L.jsx)(ae.Z,{monospace:!0,onChange:function(e){var t,i=e.target.value,r=null===(t=Gn[i])||void 0===t?void 0:t.event_pattern;st(n,{name:i,pattern:r?JSON.parse(r):null})},placeholder:"Event name",value:i,children:Bn.map((function(e){var n=e.name;return(0,L.jsx)("option",{value:n,children:n},n)}))},"event-name-".concat(l)),r&&(0,L.jsx)(y.Z,{language:"json",small:!0,source:o.join("\n")}),(0,L.jsx)(j.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return te((function(e){return(0,N.oM)(e,n)}))},children:(0,L.jsx)(fe.rF,{default:!0,size:2*A.iI})},"remove_event")]}))}),(0,L.jsx)(k.Z,{p:A.cd,children:(0,L.jsx)(j.ZP,{beforeIcon:(0,L.jsx)(fe.mm,{size:2*A.iI}),onClick:function(){return te((function(e){return e.concat({})}))},outline:!0,children:"Add event matcher"})})]})}),[ne,Bn,Gn,ot,ut,st]),dt=(0,c.useMemo)((function(){var e=(0,je.M8)(P,qe);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(k.Z,{mb:A.cd,px:A.cd,children:(0,L.jsx)(E.Z,{children:"Settings"})}),(0,L.jsx)(q.Z,{light:!0,short:!0}),(0,L.jsx)(I.Z,{columnFlex:[null,1],rows:[ot,ut]}),(0,L.jsxs)(k.Z,{mb:2,mt:5,px:A.cd,children:[(0,L.jsx)(E.Z,{children:"Endpoint"}),(0,L.jsxs)(T.ZP,{muted:!0,children:["Make a ",(0,L.jsx)(T.ZP,{bold:!0,inline:!0,monospace:!0,children:"POST"})," request to the following endpoint:"]}),(0,L.jsx)(k.Z,{mt:A.Mq,children:(0,L.jsx)(O.Z,{copiedText:e,linkText:e,monospace:!0,withCopyIcon:!0})}),(0,L.jsx)(k.Z,{mt:A.Mq,children:(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(k.Z,{mr:1,children:(0,L.jsx)(pe.Z,{checked:qe,onCheck:function(){return ze(!qe)}})}),(0,L.jsx)(T.ZP,{muted:!0,children:"Show alternative endpoint to pass token in headers"})]})})]}),qe&&(0,L.jsxs)(k.Z,{mb:2,mt:5,px:A.cd,children:[(0,L.jsx)(E.Z,{children:"Headers"}),(0,L.jsx)(T.ZP,{muted:!0,children:"You will need to include the following headers in your request to authenticate with the server."}),(0,L.jsx)(k.Z,{mt:A.Mq,children:(0,L.jsx)(O.Z,{copiedText:"Content-Type: application/json\n Authorization: Bearer ".concat(null===P||void 0===P?void 0:P.token,"\n "),withCopyIcon:!0,children:(0,L.jsx)(y.Z,{language:"json",small:!0,source:"\n Content-Type: application/json\n Authorization: Bearer ".concat(null===P||void 0===P?void 0:P.token,"\n ")})})})]}),(0,L.jsxs)(k.Z,{mb:2,mt:5,px:A.cd,children:[(0,L.jsx)(E.Z,{children:"Payload"}),(0,L.jsx)(T.ZP,{muted:!0,children:"You can optionally include runtime variables in your request payload. These runtime variables are accessible from within each pipeline block."}),(0,L.jsx)(k.Z,{mt:A.Mq,children:(0,L.jsx)(O.Z,{copiedText:'{\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n}\n',withCopyIcon:!0,children:(0,L.jsx)(y.Z,{language:"json",small:!0,source:'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\n'})})})]}),(0,L.jsxs)(k.Z,{mb:2,mt:5,px:A.cd,children:[(0,L.jsx)(E.Z,{children:"Sample cURL command"}),(0,L.jsx)(k.Z,{mt:A.Mq,children:(0,L.jsx)(y.Z,{language:"bash",small:!0,source:qe?"\n curl -X POST ".concat(e," \\\n --header 'Content-Type: application/json' \\\n --header 'Authorization: Bearer ").concat(null===P||void 0===P?void 0:P.token,'\' \\\n --data \'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\'\n '):"\n curl -X POST ".concat(e,' \\\n --header \'Content-Type: application/json\' \\\n --data \'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\'\n')})})]})]})}),[P,ze,ut,ot,qe]),pt=!En||oe.Xm.TIME===En&&!(K&&Dn||!K&&Dn&&Sn)||oe.Xm.EVENT===En&&(!(null!==ne&&void 0!==ne&&ne.length)||!ne.every((function(e){var n=e.event_type,t=e.name;return n&&t}))),vt=(0,c.useMemo)((function(){var e;return(null===d||void 0===d||null===(e=d.blocks)||void 0===e?void 0:e.filter((function(e){var n=e.type;return Oe.tf.DBT===n})))||[]}),[d]),ht=(0,c.useMemo)((function(){return null!==d&&void 0!==d&&d.blocks?(0,Te.n)(d):null}),[d]),ft=(0,c.useMemo)((function(){var e,n;return(0,L.jsxs)(k.Z,{py:A.cd,children:[(0,L.jsxs)(k.Z,{mb:A.HN,px:A.cd,children:[(0,L.jsx)(E.Z,{children:"Run settings"}),(0,L.jsxs)(k.Z,{mt:A.Mq,children:[!K&&(0,L.jsxs)(k.Z,{mb:A.Mq,children:[(0,L.jsx)(T.ZP,{children:"Set a timeout for each run of this trigger (optional)"}),(0,L.jsx)(k.Z,{mb:1}),(0,L.jsx)(w.Z,{label:"Timeout (in seconds)",onChange:function(e){return Ve((function(n){return Re(Re({},n),{},{timeout:e.target.value})}))},primary:!0,setContentOnMount:!0,type:"number",value:null===Ge||void 0===Ge?void 0:Ge.timeout})]}),(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(k.Z,{mr:2,children:(0,L.jsx)(pe.Z,{checked:Ue,onCheck:function(e){He(e),e||Qe((function(e){return Re(Re({},e),{},{slaAmount:0})}))}})}),(0,L.jsx)(T.ZP,{default:!0,monospace:!0,children:"Configure trigger SLA"})]}),Ue&&(0,L.jsx)(I.Z,{columnFlex:[null,1],rows:[[(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.aw,{default:!0,size:1.5*A.iI}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:!0,children:"SLA"})]},"sla_detail"),(0,L.jsxs)(S.ZP,{children:[(0,L.jsx)(z.Z,{flex:1,children:(0,L.jsx)(w.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),Qe((function(n){return Re(Re({},n),{},{slaAmount:e.target.value})}))},placeholder:"Time",value:null===Xe||void 0===Xe?void 0:Xe.slaAmount})}),(0,L.jsx)(z.Z,{flex:1,children:(0,L.jsx)(ae.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),Qe((function(n){return Re(Re({},n),{},{slaUnit:e.target.value})}))},placeholder:"Select time unit",small:!0,value:null===Xe||void 0===Xe?void 0:Xe.slaUnit,children:Object.keys(je.tL).map((function(e){return(0,L.jsx)("option",{value:e,children:"".concat(e,"(s)")},e)}))})})]},"sla_input_detail")]]})]}),(0,L.jsx)(k.Z,{mt:A.Mq,children:(0,L.jsx)(S.ZP,{alignItems:"center",children:(0,L.jsx)(Z.Z,{checked:null===Ge||void 0===Ge?void 0:Ge.allow_blocks_to_fail,label:"Keep running pipeline even if blocks fail",onClick:function(){return Ve((function(e){return Re(Re({},e),{},{allow_blocks_to_fail:!(null!==Ge&&void 0!==Ge&&Ge.allow_blocks_to_fail)})}))}})})}),oe.Xm.TIME===En&&(0,L.jsx)(k.Z,{mt:A.Mq,children:(0,L.jsx)(S.ZP,{alignItems:"center",children:(0,L.jsx)(Z.Z,{checked:null===Ge||void 0===Ge?void 0:Ge.skip_if_previous_running,label:"Skip run if previous run still in progress",onClick:function(){return Ve((function(e){return Re(Re({},e),{},{skip_if_previous_running:!(null!==Ge&&void 0!==Ge&&Ge.skip_if_previous_running)})}))}})})})]}),(0,L.jsxs)(k.Z,{mb:A.HN,children:[(0,L.jsxs)(k.Z,{px:A.cd,children:[(0,L.jsx)(E.Z,{children:"Runtime variables"}),(0,Ae.Qr)(yn)&&(0,L.jsxs)(k.Z,{mt:1,children:[(0,L.jsx)(T.ZP,{default:!0,children:"This pipeline has no runtime variables."}),(0,L.jsx)(u(),{as:"/pipelines/".concat(W,"/edit?sideview=variables"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,L.jsx)(B.Z,{primary:!0,children:"Click here"})})," ",(0,L.jsx)(T.ZP,{default:!0,inline:!0,children:"to add variables to this pipeline."})]})]}),(0,L.jsx)(k.Z,{mt:A.Mq,children:(0,L.jsx)(re.Z,{enableVariablesOverwrite:!0,originalVariables:null===P||void 0===P?void 0:P.variables,runtimeVariables:Ye,setRuntimeVariables:Ke})})]}),ht&&(null===(e=Object.keys(ht||{}))||void 0===e?void 0:e.length)>=1&&(0,L.jsxs)(k.Z,{mb:A.HN,children:[(0,L.jsx)(k.Z,{px:A.cd,children:(0,L.jsx)(E.Z,{children:"Override bookmark values"})}),(0,L.jsx)(m.Z,{bookmarkValues:Q,originalBookmarkValues:null===P||void 0===P||null===(n=P.variables)||void 0===n?void 0:n[oe.PN],pipeline:d,setBookmarkValues:$})]}),(null===vt||void 0===vt?void 0:vt.length)>=1&&(0,L.jsx)(k.Z,{mb:A.HN,children:(0,L.jsx)(H,{blocks:vt,updateVariables:Ke,variables:Re(Re({},Jn),Ye)})})]})}),[ht,Q,vt,Ue,yn,K,he,d,W,Ye,Xe,En,Jn,$,He,xe,Ke,Ge]),mt=be.ZP.tags.list().data,jt=(0,c.useMemo)((function(){return((null===mt||void 0===mt?void 0:mt.tags)||[]).filter((function(e){var n=e.uuid;return!(null!==wn&&void 0!==wn&&wn.includes(n))}))}),[mt,wn]),gt=(0,c.useMemo)((function(){return(0,je.ri)(K)}),[K]),xt=(0,c.useMemo)((function(){return(0,L.jsx)(Ze,{containerRef:U,date:Dn,interactions:gn,pipeline:d,pipelineInteraction:jn,pipelineSchedule:Xe,setVariables:function(e){Qe((function(n){var t=Re({},e((null===n||void 0===n?void 0:n.variables)||{})),i=Re({},t);return null===gn||void 0===gn||gn.forEach((function(e){Object.entries((null===e||void 0===e?void 0:e.variables)||{}).forEach((function(e){var n=(0,l.Z)(e,2),t=n[0],r=n[1].types;i&&t in i&&(i[t]=(0,we.M)(i[t],r))}))})),nn(i),Re(Re({},n),{},{variables:t})}))},showSummary:ke.uuid===dn,time:Rn,triggerTypes:gt,variables:null===Xe||void 0===Xe?void 0:Xe.variables})}),[U,Dn,gn,d,jn,Xe,dn,Qe,nn,Rn,gt]),Zt=(0,c.useMemo)((function(){return oe.fq.ACTIVE===(null===Xe||void 0===Xe?void 0:Xe.status)}),[Xe]),bt=M?null===M||void 0===M?void 0:M((function(e){return G.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(null===d||void 0===d?void 0:d.uuid,"/triggers/").concat(e))})):[null,{isLoading:!1}],yt=(0,l.Z)(bt,2),Ot=yt[0],Pt=yt[1].isLoading,_t=(0,c.useCallback)((function(){null===Ot||void 0===Ot||Ot({pipeline_schedule:Re(Re({},Xe),{},{variables:en||(null===Xe||void 0===Xe?void 0:Xe.variables)})})}),[Ot,en,Xe]),St=(0,c.useMemo)((function(){var e,n;return Y?(e=(0,L.jsx)(j.ZP,{linkProps:{as:"/pipelines/".concat(W,"/triggers/").concat(Y),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel and go back"}),n=(0,L.jsx)(j.ZP,{onClick:it,primary:!0,children:"Save trigger"})):Ee.uuid===dn?(e=(0,L.jsx)(j.ZP,{onClick:function(){return null===s||void 0===s?void 0:s()},secondary:!0,children:"Cancel and go back"}),n=(0,L.jsx)(j.ZP,{afterIcon:(0,L.jsx)(fe.Kw,{}),onClick:function(){return pn(Se.uuid)},primary:!0,children:"Next: Customize"})):Se.uuid===dn?(e=(0,L.jsx)(j.ZP,{beforeIcon:(0,L.jsx)(fe.Hd,{}),onClick:function(){return pn(Ee.uuid)},secondary:!0,children:"Back: Settings"}),n=(0,L.jsx)(j.ZP,{afterIcon:(0,L.jsx)(fe.Kw,{}),onClick:function(){return pn(ke.uuid)},primary:!0,children:"Next: Review"})):ke.uuid===dn&&(e=(0,L.jsx)(j.ZP,{beforeIcon:(0,L.jsx)(fe.Hd,{}),onClick:function(){return pn(Se.uuid)},secondary:!0,children:"Back: Customize"}),n=(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(j.ZP,{beforeIcon:(0,L.jsx)(fe.Bf,{}),loading:Pt,onClick:function(){return _t()},primary:!0,children:Y?"Save trigger":"Create trigger"}),!Y&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(k.Z,{mr:A.cd}),(0,L.jsx)(pe.Z,{checked:Zt,compact:!0,onCheck:function(e){return Qe((function(n){return Re(Re({},n),{},{status:e(Zt)?oe.fq.ACTIVE:oe.fq.INACTIVE})}))}}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:Zt,muted:!Zt,small:!0,children:"Set trigger to be active immediately after creating"})]})]})),(0,L.jsx)(k.Z,{p:A.cd,children:(0,L.jsxs)(S.ZP,{alignItems:"center",children:[e,e&&n&&(0,L.jsx)(k.Z,{mr:A.cd}),n]})})}),[_t,Pt,Zt,s,it,Y,W,dn,pn]),Et=(0,c.useMemo)((function(){var e,n,t,i,r,l,o;return"undefined"===typeof(null===d||void 0===d||null===(e=d.settings)||void 0===e||null===(n=e.triggers)||void 0===n?void 0:n.save_in_code_automatically)?null===R||void 0===R||null===(t=R.pipelines)||void 0===t||null===(i=t.settings)||void 0===i||null===(r=i.triggers)||void 0===r?void 0:r.save_in_code_automatically:null===d||void 0===d||null===(l=d.settings)||void 0===l||null===(o=l.triggers)||void 0===o?void 0:o.save_in_code_automatically}),[d,R]);return(0,L.jsx)(L.Fragment,{children:(0,L.jsx)(le.Z,{after:!hn&&ft,afterHidden:hn,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(W,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return null===P||void 0===P?void 0:P.name},linkProps:{as:"/pipelines/".concat(W,"/triggers/").concat(Y),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],errors:t,pageName:_e.M.TRIGGERS,pipeline:d,setErrors:_,subheader:hn||Zn?(0,L.jsx)(k.Z,{px:A.cd,children:(0,L.jsx)(g.Z,{noPadding:!0,onClickTab:function(e){var n=e.uuid;return pn(n)},regularSizeText:!0,selectedTabUUID:dn,tabs:Ie,underlineColor:(0,D.qn)(Oe.tf.DATA_LOADER).accent,underlineStyle:!0})}):(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(j.ZP,{disabled:pt,loading:Kn,onClick:it,outline:!0,primary:!0,children:"Save changes"}),(0,L.jsx)(k.Z,{mr:A.cd}),(0,L.jsx)(j.ZP,{linkProps:{as:"/pipelines/".concat(W,"/triggers/").concat(Y),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"}),Et&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(k.Z,{mr:A.cd}),(0,L.jsxs)(T.ZP,{default:!0,xsmall:!0,children:["This trigger will automatically be persisted in code.",(0,L.jsx)("br",{}),"To change this behavior, update the ",(0,L.jsx)(u(),{as:"/pipelines/".concat(W,"/settings"),href:"/pipelines/[pipeline]/settings",passHref:!0,children:(0,L.jsx)(B.Z,{openNewWindow:!0,xsmall:!0,children:"pipeline\u2019s settings"})})," or ",(0,L.jsx)(u(),{as:"/settings/workspace/preferences",href:"/settings/workspace/preferences",passHref:!0,children:(0,L.jsx)(B.Z,{openNewWindow:!0,xsmall:!0,children:"project settings"})}),"."]})]})]}),subheaderNoPadding:hn||Zn,title:function(){return null!==P&&void 0!==P&&P.name?"Edit ".concat(null===P||void 0===P?void 0:P.name):"New trigger"},uuid:"triggers/edit",children:(0,L.jsxs)("div",{ref:U,children:[(hn||Zn)&&(0,L.jsx)(q.Z,{light:!0}),(hn||Zn)&&(Se.uuid===dn||ke.uuid===dn)&&xt,(!hn||Ee.uuid===dn)&&(!Zn||Ee.uuid===dn)&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(k.Z,{p:A.cd,children:[(0,L.jsxs)(k.Z,{mb:2,children:[(0,L.jsx)(E.Z,{children:"Trigger type"}),(0,L.jsx)(T.ZP,{muted:!0,children:"How would you like this pipeline to be triggered?"})]}),(0,L.jsx)(S.ZP,{children:gt.reduce((function(e,n){var t=n.label,i=n.description,r=n.uuid,l=En===r,o=En&&!l;return!hn||null!==bn&&void 0!==bn&&bn[r]?e.concat((0,L.jsx)(j.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){oe.Xm.EVENT!==r||null!==ne&&void 0!==ne&&ne.length||te([{}]),Qe((function(e){return Re(Re({},e),{},{schedule_type:r})}))},children:(0,L.jsx)(Pe.U,{selected:l,children:(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(z.Z,{children:(0,L.jsx)("input",{checked:l,type:"radio"})}),(0,L.jsx)(k.Z,{mr:A.cd}),(0,L.jsxs)(z.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,L.jsx)(E.Z,{bold:!0,default:!l&&!o,level:5,muted:!l&&o,children:t()}),(0,L.jsx)(T.ZP,{default:!l&&!o,leftAligned:!0,muted:o,children:i()})]})]})})},r)):e}),[])})]}),(0,L.jsxs)(k.Z,{mt:A.HN,children:[oe.Xm.TIME===En&&ct,oe.Xm.EVENT===En&&at,oe.Xm.API===En&&dt]}),!hn&&(0,L.jsxs)(k.Z,{mt:A.HN,px:A.cd,children:[(0,L.jsxs)(k.Z,{mb:2,children:[(0,L.jsx)(E.Z,{children:"Tags"}),(0,L.jsx)(T.ZP,{muted:!0,children:"Add or remove tags from this trigger."})]}),(0,L.jsx)(de.Z,{removeTag:function(e){Qe((function(n){return Re(Re({},n),{},{tags:null===wn||void 0===wn?void 0:wn.filter((function(n){return n!==e.uuid}))})}))},selectTag:function(e){Qe((function(n){return Re(Re({},n),{},{tags:(0,N.$C)(e.uuid,wn,(function(n){return n===e.uuid}))})}))},selectedTags:null===wn||void 0===wn?void 0:wn.map((function(e){return{uuid:e}})),tags:jt,uuid:"TagsAutocompleteInputField-trigger-".concat(Y)})]})]}),(hn||Zn)&&St]})})})}},37899:function(e,n,t){var i=t(82394),r=t(75582),l=t(82684),o=t(71180),u=t(15338),c=t(97618),s=t(55485),a=t(38276),d=t(75499),p=t(30160),v=t(35576),h=t(17488),f=t(72473),m=t(70515),j=t(42122),g=t(81728),x=t(28598);function Z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function b(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,i.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}n.Z=function(e){e.borderless,e.compact;var n=e.enableVariablesOverwrite,t=e.originalVariables,Z=e.runtimeVariables,y=(e.setEnableVariablesOverwrite,e.setRuntimeVariables),O=(0,l.useState)({}),P=O[0],_=O[1],S=(0,l.useState)(null),E=S[0],k=S[1],I=(0,l.useState)(null),T=I[0],w=I[1];(0,l.useEffect)((function(){var e=Object.entries(Z||{}).reduce((function(e,n){var t=(0,r.Z)(n,2),l=t[0],o=t[1],u=(0,g.Pb)(o)&&"object"===typeof JSON.parse(o)&&!Array.isArray(JSON.parse(o))&&null!==JSON.parse(o);return b(b({},e),{},(0,i.Z)({},l,u))}),{});_(e)}),[]);var C=function(e,n){var t={borderless:!0,key:"variable_uuid_input_".concat(e),monospace:!0,onChange:function(n){n.preventDefault(),y((function(t){return b(b({},t),{},(0,i.Z)({},e,n.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:n};return P[e]?(0,x.jsx)(v.Z,b(b({},t),{},{rows:1,value:n})):(0,x.jsx)(h.Z,b({},t))};return(0,x.jsxs)(x.Fragment,{children:[n&&Z&&Object.entries(Z).length>0&&(0,x.jsx)(d.Z,{columnFlex:[null,1,null],columns:[{uuid:"Variable"},{uuid:"Value"},{label:function(){return""},uuid:"Action"}],rows:Object.entries(Z).map((function(e){var n=(0,r.Z)(e,2),i=n[0],l=n[1];return[(0,x.jsx)(p.ZP,{default:!0,monospace:!0,children:i},"variable_".concat(i)),C(i,l),!(null!==t&&void 0!==t&&t[i])&&(0,x.jsx)(o.ZP,{iconOnly:!0,onClick:function(){y((function(e){return(0,j.gR)(e,[i])}))},children:(0,x.jsx)(f.rF,{default:!0})})]}))}),(0,x.jsx)(a.Z,{p:m.cd,children:(0,x.jsxs)(s.ZP,{alignItems:"center",children:[(0,x.jsx)(c.Z,{flex:1,children:(0,x.jsx)(h.Z,{fullWidth:!0,monospace:!0,onChange:function(e){return k(e.target.value)},placeholder:"New variable UUID",value:E||""})}),(0,x.jsx)(a.Z,{mr:1}),(0,x.jsx)(c.Z,{flex:1,children:(0,x.jsx)(h.Z,{fullWidth:!0,monospace:!0,onChange:function(e){return w(e.target.value)},placeholder:"Variable value",value:T||""})}),(0,x.jsx)(a.Z,{mr:1}),(0,x.jsx)(o.ZP,{beforeIcon:(0,x.jsx)(f.mm,{}),disabled:!E||!T,onClick:function(){y((function(e){return b(b({},e),{},(0,i.Z)({},E,T))})),k(null),w(null)},children:"Add runtime variable"})]})}),(0,x.jsx)(u.Z,{light:!0})]})}},97196:function(e,n,t){t.d(n,{S5:function(){return l},_P:function(){return o}});var i,r=t(86735);!function(e){e.AWS="aws_event"}(i||(i={}));var l=[{label:function(){return"AWS"},uuid:i.AWS}],o=(0,r.HK)(l,(function(e){return e.uuid}))},61599:function(e,n,t){t.d(n,{D5:function(){return j},MU:function(){return o},RL:function(){return s},Xv:function(){return a},Zj:function(){return m},_B:function(){return r},eL:function(){return d},fe:function(){return h},jL:function(){return c},kB:function(){return g},ks:function(){return v},th:function(){return f},u7:function(){return p},zS:function(){return u}});var i,r,l=t(82394);!function(e){e.FULL_TABLE="FULL_TABLE",e.INCREMENTAL="INCREMENTAL",e.LOG_BASED="LOG_BASED"}(r||(r={}));var o,u,c=[r.FULL_TABLE,r.INCREMENTAL];!function(e){e.IGNORE="IGNORE",e.UPDATE="UPDATE"}(o||(o={})),function(e){e.DATE_TIME="date-time",e.UUID="uuid"}(u||(u={}));var s,a="datetime",d=(i={},(0,l.Z)(i,u.DATE_TIME,a),(0,l.Z)(i,u.UUID,u.UUID),i);!function(e){e.ARRAY="array",e.BOOLEAN="boolean",e.INTEGER="integer",e.NULL="null",e.NUMBER="number",e.OBJECT="object",e.STRING="string"}(s||(s={}));var p,v,h,f,m,j=[s.ARRAY,s.BOOLEAN,a,s.INTEGER,s.NULL,s.NUMBER,s.OBJECT,s.STRING,u.UUID];!function(e){e.PROPERTIES="properties"}(p||(p={})),function(e){e.AUTOMATIC="automatic",e.AVAILABLE="available",e.UNSUPPORTED="unsupported"}(v||(v={})),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"}(h||(h={})),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"}(f||(f={})),function(e){e.AMAZON_S3="amazon_s3",e.BIGQUERY="bigquery",e.DELTA_LAKE_S3="delta_lake_s3",e.GOOGLE_CLOUD_STORAGE="google_cloud_storage",e.KAFKA="kafka",e.MYSQL="mysql",e.POSTGRESQL="postgresql",e.SNOWFLAKE="snowflake"}(m||(m={}));var g=[m.AMAZON_S3,m.GOOGLE_CLOUD_STORAGE,m.KAFKA]},83784:function(e,n,t){t.d(n,{C:function(){return i}});var i="global"},14805:function(e,n,t){var i=t(82394),r=t(44495),l=t(55485),o=t(44085),u=t(38276),c=t(30160),s=t(88785),a=t(70515),d=t(86735),p=t(28598);function v(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function h(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?v(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.localTime,t=e.selectedDate,i=e.selectedTime,v=e.setSelectedDate,f=e.setSelectedTime,m=e.topPosition;return(0,p.jsxs)(s.J,{absolute:!0,topPosition:m,children:[(0,p.jsx)(r.ZP,{onChange:v,value:t}),(0,p.jsx)(u.Z,{mb:2}),(0,p.jsxs)(l.ZP,{alignItems:"center",children:[(0,p.jsxs)(c.ZP,{default:!0,large:!0,children:["Time (",n?"Local":"UTC","):"]}),(0,p.jsx)(u.Z,{pr:2}),(0,p.jsx)(o.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{hour:e.target.value})}))},paddingRight:5*a.iI,placeholder:"HH",value:null===i||void 0===i?void 0:i.hour,children:(0,d.m5)(24,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"hour_".concat(e))}))}),(0,p.jsx)(u.Z,{px:1,children:(0,p.jsx)(c.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(o.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{minute:e.target.value})}))},paddingRight:5*a.iI,placeholder:"MM",value:null===i||void 0===i?void 0:i.minute,children:(0,d.m5)(60,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"minute_".concat(e))}))})]})]})}},79500:function(e,n,t){t.d(n,{a:function(){return l}});var i=t(16488),r=t(3917);function l(e,n){var t,l;if(null!==n&&void 0!==n&&n.localTimezone)t=(0,r.n$)(e),l={hour:(0,r.lJ)(String(t.getHours())),minute:(0,r.lJ)(String(t.getMinutes()))};else{var o=e.split(" ")[1];t=(0,i.eI)(e),l={hour:o.substring(0,2),minute:o.substring(3,5)}}return{date:t,time:l}}},9134:function(e,n,t){var i=t(82684),r=t(21124),l=t(68432),o=t(38626),u=t(65292),c=t(44897),s=t(95363),a=t(70515),d=t(28598);n.Z=function(e){var n=e.language,t=e.maxWidth,p=e.showLineNumbers,v=e.small,h=e.source,f=e.wrapLines,m=(0,i.useContext)(o.ThemeContext);function j(e){var i=e.value;return(0,d.jsx)(l.Z,{customStyle:{backgroundColor:(m.background||c.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:s.Vp,fontSize:v?12:14,marginBottom:0,marginTop:0,maxWidth:t,paddingBottom:2*a.iI,paddingTop:2*a.iI},language:n,lineNumberStyle:{color:(m.content||c.Z.content).muted},showLineNumbers:p,style:u._4,useInlineStyles:!0,wrapLines:f,children:i})}return(0,d.jsx)(r.D,{components:{code:function(e){var n=e.children;return(0,d.jsx)(j,{value:n})}},children:h})}},39457:function(e,n,t){var i,r=t(82394),l=(t(82684),t(64866)),o=t(21764),u=t(55485),c=t(48670),s=t(38276),a=t(30160),d=t(12468),p=t(72473),v=t(70515),h=t(28598);function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function m(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,r.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}!function(e){e.LEFT="left",e.RIGHT="right"}(i||(i={})),n.Z=function(e){var n,t=e.children,r=e.copiedText,f=e.iconPosition,j=void 0===f?i.LEFT:f,g=e.inverted,x=e.linkProps,Z=e.linkText,b=e.monospace,y=e.muted,O=e.small,P=e.toastMessage,_=e.withCopyIcon;return t?n=(0,h.jsx)("span",{children:t}):_&&(n=(0,h.jsx)(c.Z,m(m({href:"#",inline:!0,muted:y,preventDefault:!0,sameColorAsText:!0,small:O},x),{},{children:(0,h.jsxs)(u.ZP,{alignItems:"center",children:[j===i.LEFT&&(0,h.jsx)(s.Z,{mr:Z?1:0,children:(0,h.jsx)(u.ZP,{alignItems:"center",children:(0,h.jsx)(p.CK,{inverted:g,muted:y,size:2*v.iI})})}),Z&&(0,h.jsx)(a.ZP,{inverted:g,monospace:b,muted:y,small:O,children:Z}),j===i.RIGHT&&(0,h.jsx)(s.Z,{ml:Z?1:0,children:(0,h.jsx)(u.ZP,{alignItems:"center",children:(0,h.jsx)(p.CK,{inverted:g,muted:y})})})]})}))),(0,h.jsx)(d.Z,{block:!0,label:"Copy",size:null,widthFitContent:!0,children:(0,h.jsx)(l.CopyToClipboard,{onCopy:function(){return o.Am.success(P||"Successfully copied to clipboard.",{position:o.Am.POSITION.BOTTOM_RIGHT,toastId:r})},text:r,children:n})})}},22286:function(e,n,t){t.d(n,{M:function(){return a}});var i=t(82394),r=t(75582),l=t(54193),o=t(81728),u=t(42122);function c(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?c(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function a(e,n){var t,c;if(!n||null===n||void 0===n||!n.length)return e;if(null!==n&&void 0!==n&&n.includes(l.zj.LIST))return((0,u.Kn)(e)?Object.keys(e||{}):[e]).map((function(e){return a(e,null===n||void 0===n?void 0:n.filter((function(e){return l.zj.LIST!==e})))}));if(null!==n&&void 0!==n&&n.includes(l.zj.DICTIONARY)){var d=(0,u.Kn)(e)?e:(0,o.Pb)(e)?JSON.parse(e):e;if((0,u.Kn)(d))return Object.entries(d).reduce((function(e,t){var o=(0,r.Z)(t,2),u=o[0],c=o[1];return s(s({},e),{},(0,i.Z)({},u,a(c,null===n||void 0===n?void 0:n.filter((function(e){return l.zj.DICTIONARY!==e})))))}),{})}if(null!==n&&void 0!==n&&n.includes(l.zj.BOOLEAN)){var p,v;if("boolean"===typeof e)return e;if("true"===(null===(p=String(e))||void 0===p?void 0:p.toLowerCase()))return!0;if("false"===(null===(v=String(e))||void 0===v?void 0:v.toLowerCase()))return!1}return null!==n&&void 0!==n&&null!==(t=n.includes)&&void 0!==t&&t.call(n,l.zj.FLOAT)&&(0,o.HW)(e)?parseFloat(e):null!==n&&void 0!==n&&null!==(c=n.includes)&&void 0!==c&&c.call(n,l.zj.INTEGER)&&(0,o.HW)(e)?parseInt(e):e}},32080:function(e,n,t){t.d(n,{n:function(){return l}});var i=t(44425),r=t(61599);function l(e){var n,t={};return null===e||void 0===e||null===(n=e.blocks)||void 0===n||n.forEach((function(e){var n=e.catalog,l=e.type,o=e.uuid;if(i.tf.DATA_LOADER===l&&null!==n&&void 0!==n&&n.streams){var u,c=null===n||void 0===n||null===(u=n.streams)||void 0===u?void 0:u.filter((function(e){var n=e.replication_method;return r._B.INCREMENTAL===n}));(null===c||void 0===c?void 0:c.length)>=1&&(o in t||(t[o]={block:e,streams:[]}),t[o].streams.push(c))}})),t}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2717],{8916:function(e,n,t){t.d(n,{FS:function(){return s},JZ:function(){return p},Tt:function(){return d},e7:function(){return v},wx:function(){return a}});var i=t(75582),r=t(82394),l=t(83784),o=t(30229);function u(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function c(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e){return"string"===typeof e?e:JSON.stringify(e)}function a(e,n){var t,i;return null===e||void 0===e||null===(t=e.find((function(e){var t=e.block;return n(t)})))||void 0===t||null===(i=t.variables)||void 0===i?void 0:i.map((function(e){var n=e.value;return c(c({},e),{},{value:s(n)})}))}function d(e){var n;return null===(n=a(e,(function(e){return e.uuid===l.C})))||void 0===n?void 0:n.reduce((function(e,n){var t=n.uuid,i=n.value;return c(c({},e),{},(0,r.Z)({},t,i))}),{})}function p(e,n){return n===o.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===o.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function v(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,i.Z)(n,2),l=t[0],o=t[1],u=o;try{u=JSON.parse(o)}catch(s){}return c(c({},e),{},(0,r.Z)({},l,u))}),{}):e}},71610:function(e,n,t){var i=t(82394),r=t(75582),l=t(12691),o=t.n(l),u=t(38626),c=t(82684),s=t(32013),a=t(98777),d=t(15338),p=t(48670),v=t(57114),h=t(38276),f=t(4190),m=t(75499),j=t(30160),g=t(35686),x=t(70515),Z=t(30229),b=t(32080),y=t(81728),O=t(3917),P=t(55283),_=t(70320),S=t(28598);function E(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function k(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?E(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):E(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var I={large:!1};n.Z=function(e){var n=e.bookmarkValues,t=e.originalBookmarkValues,l=e.setBookmarkValues,E=e.pipeline,T=(0,c.useContext)(u.ThemeContext),w=(0,_.qB)(),C=(0,c.useState)(null),M=C[0],A=C[1],D=(0,c.useMemo)((function(){return null!==E&&void 0!==E&&E.blocks?(0,b.n)(E):null}),[E]),N=(0,c.useMemo)((function(){return Object.keys(D||{})||[]}),[D]),L=g.ZP.integration_sources.pipelines.list(null===E||void 0===E?void 0:E.uuid,{block_uuid:N},{},{pauseFetch:!(null!==N&&void 0!==N&&N.length)}).data,R=(0,c.useMemo)((function(){return null===L||void 0===L?void 0:L.integration_sources}),[L]);return(0,c.useEffect)((function(){if((null===R||void 0===R?void 0:R.length)>=1&&(!n||!M)){var e={};null===R||void 0===R||R.map((function(n){var t,i=n.block,l=n.streams,o=null===i||void 0===i?void 0:i.uuid;e[o]={},null===(t=Object.entries(l||{}))||void 0===t||t.forEach((function(n){var t,i,l=(0,r.Z)(n,2),u=l[0],c=l[1];e[o][u]=null===c||void 0===c||null===(t=c.state)||void 0===t||null===(i=t.bookmarks)||void 0===i?void 0:i[u]}))})),n||l(e),M||A(e)}}),[n,M,l,A,R]),(0,S.jsxs)(h.Z,{p:x.cd,children:[!L&&(0,S.jsx)(f.Z,{inverted:!0,small:!0}),null===R||void 0===R?void 0:R.map((function(e){var u=e.block,f=e.pipeline_run,g=e.pipeline_schedule,b=e.streams,_=null===u||void 0===u?void 0:u.uuid;return(0,S.jsx)(v.Z,{title:(0,S.jsx)(j.ZP,{color:(0,P.qn)(null===u||void 0===u?void 0:u.type,{blockColor:null===u||void 0===u?void 0:u.color,theme:T}).accent,monospace:!0,children:_}),children:(0,S.jsx)(s.Z,{noBorder:!0,noBoxShadow:!0,children:Object.entries(b||{}).map((function(e){var u,s,b,P,T=(0,r.Z)(e,2),C=T[0],A=T[1],D=A.record,N=A.state,L=(null===N||void 0===N||null===(u=N.bookmarks)||void 0===u?void 0:u[C])||{};return(0,S.jsxs)(a.Z,{noBorderRadius:!0,noPaddingContent:!0,title:(0,S.jsx)(j.ZP,{default:!0,monospace:!0,children:C}),titleXPadding:x.cd*x.iI,titleYPadding:x.cd*x.iI,children:[(0,S.jsx)(v.S,k(k({},I),{},{title:"Last pipeline run started at",children:(0,S.jsx)(j.ZP,{default:!0,monospace:!0,children:(null===f||void 0===f?void 0:f.started_at)&&(0,O.XG)(null===f||void 0===f?void 0:f.started_at,w)})})),(0,S.jsx)(d.Z,{light:!0}),(0,S.jsx)(v.S,k(k({},I),{},{title:"Last pipeline run completed at",children:(0,S.jsx)(j.ZP,{default:!0,monospace:!0,children:(null===f||void 0===f?void 0:f.completed_at)&&(0,O.XG)(null===f||void 0===f?void 0:f.completed_at,w)})})),(0,S.jsx)(d.Z,{light:!0}),(0,S.jsx)(d.Z,{light:!0}),(0,S.jsx)(v.S,k(k({},I),{},{title:"Trigger",children:(0,S.jsx)(o(),{as:"/pipelines/".concat(null===E||void 0===E?void 0:E.uuid,"/triggers/").concat(null===g||void 0===g?void 0:g.id),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,S.jsx)(p.Z,{block:!0,default:!0,openNewWindow:!0,children:(0,S.jsx)(j.ZP,{default:!0,monospace:!0,children:null===g||void 0===g?void 0:g.name})})})})),(0,S.jsx)(d.Z,{light:!0}),(0,S.jsx)(v.S,k(k({},I),{},{title:"Type",children:(0,S.jsx)(j.ZP,{default:!0,monospace:!0,children:(0,y.kC)((null===(s=Z.Z4[null===g||void 0===g?void 0:g.schedule_type])||void 0===s?void 0:s.call(Z.Z4))||"")})})),(0,S.jsx)(d.Z,{light:!0}),(0,S.jsx)(v.S,k(k({},I),{},{title:"Frequency",children:(0,S.jsx)(j.ZP,{default:!0,monospace:!0,children:null===g||void 0===g?void 0:g.schedule_interval})})),(0,S.jsx)(d.Z,{light:!0}),(0,S.jsxs)(h.Z,{p:x.cd,children:[(0,S.jsx)(j.ZP,{bold:!0,large:!0,children:"Bookmark values"}),(0,S.jsx)(h.Z,{mt:1,children:(0,S.jsxs)(j.ZP,{muted:!0,small:!0,children:["Overriding the bookmark values will be applied to all pipeline runs",(0,S.jsx)("br",{}),"for this trigger until there is at least 1 successful pipeline run in this trigger."]})})]}),(0,S.jsx)(d.Z,{light:!0,short:!0}),!(null!==(b=Object.values(L||{}))&&void 0!==b&&b.length)&&(0,S.jsx)(h.Z,{p:x.cd,children:(0,S.jsx)(j.ZP,{muted:!0,children:"There are currently no bookmark values for this stream."})}),Object.entries(L||{}).map((function(e){var o,u,s,a,d,p,h=(0,r.Z)(e,2),f=h[0],m=(h[1],null===n||void 0===n||null===(o=n[_])||void 0===o||null===(u=o[C])||void 0===u?void 0:u[f]),g=(null===t||void 0===t||null===(s=t[_])||void 0===s||null===(a=s[C])||void 0===a||a[f],null===M||void 0===M||null===(d=M[_])||void 0===d||null===(p=d[C])||void 0===p?void 0:p[f]);return(0,c.createElement)(v.S,k(k({},I),{},{title:(0,S.jsx)(j.ZP,{default:!0,monospace:!0,children:f}),description:g&&g!==m&&(0,S.jsxs)(j.ZP,{muted:!0,small:!0,children:["Original bookmark value from the last pipeline run: ",(0,S.jsx)(j.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:g})]}),key:"".concat(_,"-bookmark-values-").concat(f),textInput:{monospace:!0,onChange:function(e){return l((function(t){var r;return k(k({},t),{},(0,i.Z)({},_,k(k({},null===n||void 0===n?void 0:n[_]),{},(0,i.Z)({},C,k(k({},null===n||void 0===n||null===(r=n[_])||void 0===r?void 0:r[C]),{},(0,i.Z)({},f,e.target.value))))))}))},value:String(m||"")}}))})),(0,S.jsx)(d.Z,{light:!0}),(0,c.createElement)(v.S,k(k({},I),{},{title:"Record",description:"The most recently synced record.",key:"block-uuid-".concat(_,"-").concat(C)}),(0,S.jsx)(m.Z,{columnFlex:[1,null],columns:[{uuid:"Column"},{uuid:"Value"}],rows:null===(P=Object.entries(D||{}))||void 0===P?void 0:P.map((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];return[(0,S.jsx)(j.ZP,{default:!0,monospace:!0,children:t},t),(0,S.jsx)(j.ZP,{default:!0,monospace:!0,children:String(i)},"".concat(t,"-").concat(i))]}))}))]})}))})})}))]})}},88785:function(e,n,t){t.d(n,{J:function(){return c},U:function(){return u}});var i=t(38626),r=t(44897),l=t(42631),o=t(70515),u=i.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-m7tlau-0"})(["border-radius:","px;border-style:solid;border-width:2px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],l.TR,14*o.iI,o.cd*o.iI,o.cd*o.iI,40*o.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||r.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||r.Z.interactive).linkPrimary,";\n ")})),c=i.default.div.withConfig({displayName:"indexstyle__DateSelectionContainer",componentId:"sc-m7tlau-1"})(["border-radius:","px;padding:","px;"," "," ",""],l.n_,o.tr,(function(e){return"\n background-color: ".concat((e.theme.interactive||r.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.absolute&&"\n position: absolute;\n z-index: 2;\n right: 0;\n top: ".concat(2.5*o.iI,"px;\n ")}),(function(e){return e.topPosition&&"\n top: -".concat(42*o.iI,"px;\n ")}))},12717:function(e,n,t){t.d(n,{Z:function(){return Ue}});var i=t(21831),r=t(82394),l=t(75582),o=t(12691),u=t.n(o),c=t(82684),s=t(20026),a=t.n(s),d=t(92083),p=t.n(d),v=t(21764),h=t(69864),f=t(34376),m=t(71610),j=t(71180),g=t(90299),x=t(14805),Z=t(70652),b=t(50724),y=t(9134),O=t(39457),P=t(38626),_=t(39867),S=t(55485),E=t(85854),k=t(38276),I=t(75499),T=t(30160),w=t(17488),C=t(12468),M=t(44375),A=t(70515),D=t(55283),N=t(86735),L=t(28598);function R(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function U(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?R(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):R(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var H=function(e){var n=e.blocks,t=e.updateVariables,i=e.variables,l=(0,c.useContext)(P.ThemeContext),o=(0,c.useCallback)((function(e,n){return t((function(){var t=(null===i||void 0===i?void 0:i.__mage_variables)||{},l=(null===t||void 0===t?void 0:t.blocks)||{},o=l[e]||{},u=(null===o||void 0===o?void 0:o.configuration)||{};return U(U({},i),{},{__mage_variables:U(U({},t),{},{blocks:U(U({},l),{},(0,r.Z)({},e,U(U({},o),{},{configuration:U(U({},u),n)})))})})}))}),[t,i]);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(E.Z,{children:"dbt runtime settings"}),(0,L.jsx)(k.Z,{mt:A.Mq,children:(0,L.jsx)(I.Z,{columnFlex:[1,null,null,null],columns:[{uuid:"Block"},{uuid:"Flags"},{uuid:"Prefix"},{uuid:"Suffix"}],compact:!0,rows:null===n||void 0===n?void 0:n.map((function(e){var n,t,r,u=e.type,c=e.uuid,s=(0,M.IU)(e).name,a=(0,D.qn)(u,{blockColor:e.color,theme:l}).accent,d=null===i||void 0===i||null===(n=i.__mage_variables)||void 0===n||null===(t=n.blocks)||void 0===t||null===(r=t[c])||void 0===r?void 0:r.configuration,p=d||{},v=p.prefix,h=p.suffix,f=(null===d||void 0===d?void 0:d.flags)||[],m=!(null===f||void 0===f||!f.includes(M.Dy));return[(0,L.jsx)(C.Z,{block:!0,label:(0,L.jsx)(T.ZP,{monospace:!0,small:!0,children:c}),size:null,widthFitContent:!0,children:(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(_.Z,{color:a,size:1.5*A.iI,square:!0}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsxs)(T.ZP,{monospace:!0,small:!0,children:[v&&(0,L.jsx)(T.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:v}),s,h&&(0,L.jsx)(T.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:h})]})]})},"uuid-".concat(c)),(0,L.jsx)(S.ZP,{alignItems:"center",children:(0,L.jsx)(Z.Z,{checked:m,label:M.Dy,monospace:!0,onClick:function(){return o(c,{flags:m?(0,N.Od)(f,(function(e){return M.Dy===e})):f.concat(M.Dy)})},small:!0})},"flags-".concat(c)),(0,L.jsx)(w.Z,{compact:!0,monospace:!0,onChange:function(e){return o(c,{prefix:e.target.value})},placeholder:"N+, +",small:!0,value:v,width:10*A.iI},"prefix-".concat(c)),(0,L.jsx)(w.Z,{compact:!0,monospace:!0,onChange:function(e){return o(c,{suffix:e.target.value})},placeholder:"+, +N",small:!0,value:h,width:10*A.iI},"suffix-".concat(c))]}))})})]})},F=t(97196),q=t(15338),z=t(97618),B=t(48670),G=t(26304),V=t(44897),W=t(95363),Y=t(61896),K=["children","large","lineHeight","ordered"];function J(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function X(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?J(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):J(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Q=(0,P.css)([""," "," "," "," "," "," "," "," "," ",""],(function(e){return!e.muted&&"\n color: ".concat((e.theme.content||V.Z.content).default,";\n ")}),(function(e){return e.muted&&"\n color: ".concat((e.theme.content||V.Z.content).muted,";\n ")}),(function(e){return e.inverted&&"\n color: ".concat((e.theme.content||V.Z.content).inverted,";\n ")}),(function(e){return e.color&&"\n color: ".concat(e.color,";\n ")}),(function(e){return!e.monospace&&"\n font-family: ".concat(W.ry,";\n ")}),(function(e){return e.monospace&&"\n font-family: ".concat(W.Vp,";\n ")}),(function(e){return e.large&&"\n ".concat(Y.x_,"\n ")}),(function(e){return!e.large&&!e.small&&"\n ".concat(Y.i3,"\n ")}),(function(e){return e.small&&"\n ".concat(Y.J5,"\n ")}),(function(e){return e.lineHeight&&"\n line-height: ".concat(e.lineHeight,"px !important;\n ")})),$=P.default.ul.withConfig({displayName:"List__UnorderedListStyle",componentId:"sc-1f6yhbi-0"})(["",""],Q),ee=P.default.ol.withConfig({displayName:"List__OrderedListStyle",componentId:"sc-1f6yhbi-1"})(["",""],Q),ne=P.default.li.withConfig({displayName:"List__ListItemStyle",componentId:"sc-1f6yhbi-2"})(["",""],(function(e){return e.large&&e.marginTop&&"\n margin-top: ".concat(1*A.iI,"px;\n ")}));var te,ie=function(e){var n=e.children,t=e.large,i=e.lineHeight,r=e.ordered,l=(0,G.Z)(e,K),o=r?ee:$;return(0,L.jsx)(o,X(X({large:t,lineHeight:i},l),{},{children:c.Children.map(n,(function(e,n){var i;return(0,L.jsx)(ne,X(X({large:t,marginTop:n>=1},l),{},{children:c.cloneElement(e)}),(null===(i=e.props)||void 0===i?void 0:i.key)||n)}))}))},re=t(37899),le=t(75457),oe=t(30229),ue=t(57653),ce=t(83784),se=t(82359),ae=t(44085),de=t(81334),pe=t(69650),ve=t(81769),he=t(54193),fe=t(72473),me=t(81728),je=t(16488),ge=t(70320),xe=(te={},(0,r.Z)(te,he.zj.DATE,fe.aw),(0,r.Z)(te,he.zj.DATETIME,fe.Pf),(0,r.Z)(te,he.zj.DICTIONARY,fe.$l),(0,r.Z)(te,he.zj.FLOAT,fe.As),(0,r.Z)(te,he.zj.INTEGER,fe.qZ),(0,r.Z)(te,he.zj.LIST,fe.B4),(0,r.Z)(te,he.zj.STRING,fe.KJ),te);var Ze=function(e){var n,t,i,r=e.containerRef,o=e.date,u=e.interactions,s=e.pipeline,a=e.pipelineInteraction,d=e.pipelineSchedule,p=e.setVariables,v=e.showSummary,h=e.time,f=e.triggerTypes,m=e.variables,j=(0,c.useMemo)((function(){return(0,N.HK)(u||[],(function(e){return e.uuid}))}),[u]),g=(0,c.useMemo)((function(){return(null===s||void 0===s?void 0:s.blocks)||[]}),[s]),x=(0,c.useMemo)((function(){return(null===a||void 0===a?void 0:a.blocks)||{}}),[a]),Z=(0,c.useMemo)((function(){var e=[];null===g||void 0===g||g.length;return null===g||void 0===g||g.map((function(n,t){var i=(n||{uuid:null}).uuid,l=(null===x||void 0===x?void 0:x[i])||[];null===l||void 0===l||l.length;e.push((0,L.jsx)(k.Z,{p:A.cd,children:null===l||void 0===l?void 0:l.map((function(e,n){return(0,L.jsx)(k.Z,{mt:n>=1?2*A.cd:0,children:(0,L.jsx)(ve.Z,{blockInteraction:e,containerRef:r,interaction:null===j||void 0===j?void 0:j[null===e||void 0===e?void 0:e.uuid],setVariables:p,variables:m})},"".concat(null===e||void 0===e?void 0:e.uuid,"-").concat(n))}))}))})),e}),[g,r,j,p,m]),b=(0,ge.qB)(),y=(0,c.useMemo)((function(){return o&&null!==h&&void 0!==h&&h.hour&&null!==h&&void 0!==h&&h.minute?(0,je.XM)(o,h,{convertToUtc:b,includeSeconds:!0,localTimezone:b}):null}),[o,b,h]),O=(0,c.useMemo)((function(){var e=[];null===g||void 0===g||g.length;return null===g||void 0===g||g.map((function(n,t){var i=(n||{uuid:null}).uuid,r=(null===x||void 0===x?void 0:x[i])||[];null===r||void 0===r||r.forEach((function(n,r){var o=null===j||void 0===j?void 0:j[null===n||void 0===n?void 0:n.uuid];Object.entries((null===o||void 0===o?void 0:o.variables)||{}).forEach((function(n,o){var u,c=(0,l.Z)(n,2),s=c[0],a=c[1],d=a.name,p=a.required,v=a.types,h=null===m||void 0===m?void 0:m[s],f="undefined"===typeof h,j=p&&f,g=(null===xe||void 0===xe?void 0:xe[v[0]])||fe.KJ,x=[];"undefined"!==typeof h?h&&Array.isArray(h||[])?null===h||void 0===h||h.forEach((function(e){x.push(e&&"object"===typeof e?x.push(JSON.stringify(e)):x.push(String(e)))})):h&&"object"===typeof h?Object.entries(h||{}).forEach((function(e){var n=(0,l.Z)(e,2),t=n[0];n[1]&&x.push(String(t))})):x.push(String(h)):x.push(h||""),e.push([(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(g,{default:!0,size:1.5*A.iI}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:!0,monospace:!0,children:s})]},"".concat(i,"-").concat(s,"-label-").concat(d,"-").concat(t,"-").concat(r,"-").concat(o)),(0,L.jsx)(k.Z,{py:A.cd,children:(0,L.jsxs)(T.ZP,{danger:j,monospace:!j,muted:f,children:[f&&!j&&"-",j&&"This is required",!f&&!j&&(null===x||void 0===x||null===(u=x.map((function(e){return String(e)})))||void 0===u?void 0:u.join(", "))]})},"".concat(i,"-").concat(s,"-value-").concat(d,"-").concat(h,"-").concat(t,"-").concat(r,"-").concat(o))])}))}))})),(0,L.jsx)(I.Z,{columnFlex:[null,1],rows:e})}),[g,j,m]);return(0,L.jsxs)(L.Fragment,{children:[!v&&Z,v&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(k.Z,{p:A.cd,children:(0,L.jsx)(E.Z,{children:"Settings"})}),(0,L.jsx)(q.Z,{light:!0,short:!0}),(0,L.jsx)(I.Z,{columnFlex:[null,1],rows:[[(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.Bf,{default:!0}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:!0,children:"Trigger type"})]},"trigger_type"),(0,L.jsx)(k.Z,{py:A.cd,children:(0,L.jsx)(T.ZP,{danger:!(null!==d&&void 0!==d&&d.schedule_type),monospace:!0,children:null!==d&&void 0!==d&&d.schedule_type?null===f||void 0===f||null===(n=f.find((function(e){return e.uuid===(null===d||void 0===d?void 0:d.schedule_type)})))||void 0===n||null===(t=n.label)||void 0===t?void 0:t.call(n):"This is required"})},"trigger_type_input")],[(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.KJ,{default:!0}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:!0,children:"Trigger name"})]},"trigger_name"),(0,L.jsx)(k.Z,{py:A.cd,children:(0,L.jsx)(T.ZP,{danger:!(null!==d&&void 0!==d&&d.name),monospace:!0,children:(null===d||void 0===d?void 0:d.name)||"This is required"})},"trigger_name_input")],[(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.KJ,{default:!0}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:!0,children:"Trigger description"})]},"trigger_description"),(0,L.jsx)(k.Z,{py:A.cd,children:(0,L.jsx)(T.ZP,{monospace:!0,muted:!(null!==d&&void 0!==d&&d.description),children:(null===d||void 0===d?void 0:d.description)||"-"})},"trigger_description_input")],[(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.Pf,{default:!0,size:1.5*A.iI}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:!0,children:"Frequency"})]},"frequency"),(0,L.jsx)(k.Z,{py:A.cd,children:(0,L.jsxs)(T.ZP,{danger:!(null!==d&&void 0!==d&&d.schedule_interval),monospace:!0,muted:!(null!==d&&void 0!==d&&d.schedule_interval),children:[(null===d||void 0===d?void 0:d.schedule_interval)&&(0,me.vg)((null===d||void 0===d||null===(i=d.schedule_interval)||void 0===i?void 0:i.substring(1))||""),!(null!==d&&void 0!==d&&d.schedule_interval)&&"This is required"]})},"frequency_input")],[(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.aw,{default:!0,size:1.5*A.iI}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:!0,children:"Start date and time"})]},"start_time"),(0,L.jsx)(k.Z,{py:A.cd,children:(0,L.jsx)(T.ZP,{danger:!y,monospace:!!y,muted:!y,children:y||"This is required"})},"start_time_input")]]}),(0,L.jsx)(k.Z,{p:A.cd,children:(0,L.jsx)(E.Z,{children:"Customize"})}),(0,L.jsx)(q.Z,{light:!0,short:!0}),O]})]})},be=t(35686),ye=t(77417),Oe=t(44425),Pe=t(88785),_e=t(28795),Se={label:function(){return"CUSTOMIZE"},uuid:"customize"},Ee={label:function(){return"SETTINGS"},uuid:"settings"},ke={label:function(){return"REVIEW"},uuid:"review"},Ie=[Ee,Se,ke],Te=t(32080),we=t(22286),Ce=t(79500),Me=t(8916),Ae=t(42122),De=t(72619),Ne=t(3917);function Le(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function Re(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Le(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Le(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ue=function(e){var n=e.creatingWithLimitation,t=e.errors,o=e.fetchPipelineSchedule,s=e.onCancel,d=e.pipeline,P=e.pipelineSchedule,_=e.setErrors,C=e.variables,M=e.useCreateScheduleMutation,R=(0,ye.Z)().project,U=(0,c.useRef)(null),G=(0,f.useRouter)(),V=(0,ge.qB)(),W=null===d||void 0===d?void 0:d.uuid,Y=(0,c.useMemo)((function(){return null===P||void 0===P?void 0:P.id}),[P]),K=(null===d||void 0===d?void 0:d.type)===ue.qL.STREAMING,J=(0,c.useMemo)((function(){var e;return null===P||void 0===P||null===(e=P.variables)||void 0===e?void 0:e[oe.PN]}),[P]),X=(0,c.useState)(J?"string"===typeof J&&(0,me.Pb)(J)?JSON.stringify(J):J:null),Q=X[0],$=X[1],ee=(0,c.useState)([]),ne=ee[0],te=ee[1],ve=(0,c.useState)(!0),he=ve[0],xe=ve[1],Le=(0,c.useState)(!1),Ue=Le[0],He=Le[1],Fe=(0,c.useState)(!1),qe=Fe[0],ze=Fe[1],Be=(0,c.useState)(null),Ge=Be[0],Ve=Be[1],We=(0,c.useState)({}),Ye=We[0],Ke=We[1],Je=(0,c.useState)(null),Xe=Je[0],Qe=Je[1],$e=(0,c.useState)(null),en=$e[0],nn=$e[1],tn=(0,c.useState)(!1),rn=tn[0],ln=tn[1],on=(0,c.useState)(null),un=on[0],cn=on[1],sn=be.ZP.client_pages.detail("pipeline_schedule:create",{"pipeline_schedules[]":[Y],"pipelines[]":[W]},{},{key:"Triggers/Edit/".concat(W,"/").concat(Y),pauseFetch:!W||!Y}).data,an=((0,c.useMemo)((function(){return null===sn||void 0===sn?void 0:sn.client_page}),[sn]),(0,c.useState)(Ie[0].uuid)),dn=an[0],pn=an[1],vn=(0,c.useMemo)((function(){var e;return!(null===R||void 0===R||null===(e=R.features)||void 0===e||!e[se.d.INTERACTIONS])}),[null===R||void 0===R?void 0:R.features]),hn=(0,c.useMemo)((function(){return!Y&&n}),[n,Y]),fn=be.ZP.pipeline_interactions.detail(vn&&W,{filter_for_permissions:1}).data,mn=be.ZP.interactions.pipeline_interactions.list(vn&&W).data,jn=(0,c.useMemo)((function(){return(null===fn||void 0===fn?void 0:fn.pipeline_interaction)||{}}),[fn]),gn=(0,c.useMemo)((function(){return(null===mn||void 0===mn?void 0:mn.interactions)||[]}),[mn]),xn=(0,c.useMemo)((function(){var e;return vn&&(null===(e=Object.keys((null===jn||void 0===jn?void 0:jn.blocks)||{}))||void 0===e?void 0:e.length)>=1}),[vn,jn]),Zn=(0,c.useMemo)((function(){return!!Y&&xn}),[xn,Y]),bn=(0,c.useMemo)((function(){var e,n={};return null===jn||void 0===jn||null===(e=jn.permissions)||void 0===e||e.forEach((function(e){var t=e.triggers;null===t||void 0===t||t.forEach((function(e){var t=e.schedule_interval,i=e.schedule_type;null!==n&&void 0!==n&&n[i]||(n[i]={}),t&&(n[i][t]=!0)}))})),n}),[jn]),yn=(0,c.useMemo)((function(){return(0,Me.wx)(C,(function(e){return e.uuid===ce.C}))}),[C]),On=(0,c.useMemo)((function(){return Xe||{}}),[Xe]),Pn=On.description,_n=On.name,Sn=On.schedule_interval,En=On.schedule_type,kn=On.settings,In=void 0===kn?{}:kn,Tn=On.start_time,wn=On.tags,Cn=On.variables,Mn=void 0===Cn?{}:Cn;(0,c.useEffect)((function(){!Ge&&In&&Ve(In)}),[Ge,In]);var An=(0,c.useState)(null),Dn=An[0],Nn=An[1],Ln=(0,c.useState)({hour:"00",minute:"00"}),Rn=Ln[0],Un=Ln[1],Hn=(0,c.useState)({dayOfMonth:null,dayOfWeek:null,hour:null,minute:null,second:null}),Fn=Hn[0],qn=Hn[1],zn=be.ZP.event_rules.detail(oe.Xm.EVENT===En?"aws":null).data,Bn=(0,c.useMemo)((function(){var e;return(null===zn||void 0===zn||null===(e=zn.event_rule)||void 0===e?void 0:e.rules)||[]}),[zn]),Gn=(0,c.useMemo)((function(){return(0,N.HK)(Bn,(function(e){return e.name}))}),[Bn]),Vn=(0,h.Db)(be.ZP.pipeline_schedules.useUpdate(Y),{onSuccess:function(e){return(0,De.wD)(e,{callback:function(){null===o||void 0===o||o(),G.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(W,"/triggers/").concat(Y))},onErrorCallback:function(e,n){return _({errors:n,response:e})}})}}),Wn=(0,l.Z)(Vn,2),Yn=Wn[0],Kn=Wn[1].isLoading,Jn=(0,c.useMemo)((function(){return Mn||{}}),[Mn]);(0,c.useEffect)((function(){if(Tn){var e=(0,Ce.a)(Tn,{localTimezone:V});Nn(null===e||void 0===e?void 0:e.date),Un(null===e||void 0===e?void 0:e.time);var n=p()(Tn).utc();qn({dayOfMonth:n.date(),dayOfWeek:n.day(),hour:n.hours(),minute:n.minutes(),second:n.seconds()})}else{var t=new Date;Nn(t),Un(V?{hour:(0,Ne.lJ)(String(t.getHours())),minute:(0,Ne.lJ)(String(t.getMinutes()))}:{hour:(0,Ne.lJ)(String(t.getUTCHours())),minute:(0,Ne.lJ)(String(t.getUTCMinutes()))})}}),[V,Tn]),(0,c.useEffect)((function(){Jn&&Object.keys(Jn).length>0&&xe(!0)}),[Jn]),(0,c.useEffect)((function(){Ke(he?null===yn||void 0===yn?void 0:yn.reduce((function(e,n){var t=n.uuid,i=n.value;return Re(Re({},e),{},(0,r.Z)({},t,Jn[t]||i))}),{}):null)}),[yn,he,Jn]);var Xn=(0,c.useMemo)((function(){return(0,je._U)(Sn)}),[Sn]),Qn=(0,c.useMemo)((function(){return Xn&&un?a().toString(un,{throwExceptionOnParseError:!1}):""}),[un,Xn]),$n=(0,c.useMemo)((function(){return null===Qn||void 0===Qn?void 0:Qn.toLowerCase().includes("error")}),[Qn]);(0,c.useEffect)((function(){if(P&&!Xe){if(te(P.event_matchers),(0,je._U)(null===P||void 0===P?void 0:P.schedule_interval)){var e=V?(0,je.lO)(null===P||void 0===P?void 0:P.schedule_interval):null===P||void 0===P?void 0:P.schedule_interval;cn(e),Qe(Re(Re({},P),{},{schedule_interval:"custom"}))}else Qe(K?Re(Re({},P),{},{schedule_interval:oe.U5.ONCE}):P);var n=P.sla;if(n){He(!0);var t=(0,je.gU)(n),i=t.time,r=t.unit;Qe((function(e){return Re(Re({},e),{},{slaAmount:i,slaUnit:r})}))}}}),[V,K,P,Xe,Sn]);var et=(0,c.useMemo)((function(){return!(null===Ge||void 0===Ge||!Ge.landing_time_enabled)}),[Ge]),nt=(0,c.useMemo)((function(){return oe.Xm.TIME!==En||![oe.U5.DAILY,oe.U5.HOURLY,oe.U5.MONTHLY,oe.U5.WEEKLY].includes(Sn)}),[Sn,En]),tt=(0,c.useMemo)((function(){return et&&!nt}),[nt,et]),it=(0,c.useCallback)((function(){var e=Re(Re({},(0,Ae.GL)(Xe,["name","description","schedule_type","tags"])),{},{event_matchers:[],schedule_interval:null,start_time:null,variables:(0,Me.e7)(Re(Re({},Ye),Q?(0,r.Z)({},oe.PN,Q):{}))});if(tt){var n=Fn.dayOfMonth,t=Fn.dayOfWeek,i=Fn.hour,l=Fn.minute,o=Fn.second,u=p()("2023-07-01").utc();(0,me.HW)(n)&&(u=u.date(n)),(0,me.HW)(t)&&(u=u.day(t)),(0,me.HW)(i)&&(u=u.hours(i)),(0,me.HW)(l)&&(u=u.minutes(l)),(0,me.HW)(o)&&(u=u.seconds(o)),e.schedule_interval=Xn?un:Xe.schedule_interval,e.start_time=u.toISOString()}else oe.Xm.EVENT===Xe.schedule_type?e.event_matchers=ne:(e.schedule_interval=Xn?V&&!$n&&un?(0,je.lO)(un,!0):un:Xe.schedule_interval,e.start_time=Dn&&null!==Rn&&void 0!==Rn&&Rn.hour&&null!==Rn&&void 0!==Rn&&Rn.minute?(0,je.XM)(Dn,Rn,{convertToUtc:V,includeSeconds:!0,localTimezone:V}):null);if(Ue){var c=null===Xe||void 0===Xe?void 0:Xe.slaAmount,s=null===Xe||void 0===Xe?void 0:Xe.slaUnit;if(!c||isNaN(c)||!s)return void v.Am.error("Please enter a valid SLA",{position:v.Am.POSITION.BOTTOM_RIGHT,toastId:"sla_error"});e.sla=(0,je.vJ)(c,s)}else null!==P&&void 0!==P&&P.sla&&(e.sla=0);e.settings=Ge,Yn({pipeline_schedule:Re(Re({},e),{},{variables:en||(null===e||void 0===e?void 0:e.variables)})})}),[Q,$n,un,Dn,V,Ue,ne,Xn,Fn,P,Ye,Xe,Ge,tt,Rn,Yn,en]),rt=(0,c.useMemo)((function(){if(null===P||void 0===P||!P.runtime_average)return"Trigger doesn\u2019t have enough history to estimate runtime.";var e=Number(null===P||void 0===P?void 0:P.runtime_average),n=Math.max(Math.floor(e/3600),0),t=Math.max(Math.floor((e-60*n*60)/60),0),i=Math.max(Math.floor(e-(60*n*60+60*t)),0),r=[];return n>=1&&r.push((0,me._6)("hour",n,!0)),t>=1&&r.push((0,me._6)("minute",t,!0)),i>=1&&r.push((0,me._6)("second",i,!0)),r.join(" ")}),[P]),lt=(0,c.useMemo)((function(){if(!tt)return null;var e=[(0,L.jsxs)(k.Z,{mr:1,children:[(0,L.jsx)(k.Z,{mb:1,children:(0,L.jsx)(T.ZP,{bold:!0,default:!0,small:!0,children:"Minute"})}),(0,L.jsxs)(ae.Z,{compact:!0,monospace:!0,onChange:function(e){qn((function(n){return Re(Re({},n),{},{minute:e.target.value})}))},value:(null===Fn||void 0===Fn?void 0:Fn.minute)||"",children:[(0,L.jsx)("option",{value:""}),(0,N.w6)(60).map((function(e,n){return(0,L.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Minute"),(0,L.jsxs)(k.Z,{mr:1,children:[(0,L.jsx)(k.Z,{mb:1,children:(0,L.jsx)(T.ZP,{bold:!0,default:!0,small:!0,children:"Second"})}),(0,L.jsxs)(ae.Z,{compact:!0,monospace:!0,onChange:function(e){qn((function(n){return Re(Re({},n),{},{second:e.target.value})}))},value:(null===Fn||void 0===Fn?void 0:Fn.second)||"",children:[(0,L.jsx)("option",{value:""}),(0,N.w6)(60).map((function(e,n){return(0,L.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Second")];return[oe.U5.DAILY,oe.U5.MONTHLY,oe.U5.WEEKLY].includes(Sn)&&e.unshift((0,L.jsxs)(k.Z,{mr:1,children:[(0,L.jsx)(k.Z,{mb:1,children:(0,L.jsx)(T.ZP,{bold:!0,default:!0,small:!0,children:"Hour"})}),(0,L.jsxs)(ae.Z,{compact:!0,monospace:!0,onChange:function(e){qn((function(n){return Re(Re({},n),{},{hour:e.target.value})}))},value:(null===Fn||void 0===Fn?void 0:Fn.hour)||"",children:[(0,L.jsx)("option",{value:""}),(0,N.w6)(24).map((function(e,n){return(0,L.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Hour")),oe.U5.WEEKLY===Sn?e.unshift((0,L.jsxs)(k.Z,{mr:1,children:[(0,L.jsx)(k.Z,{mb:1,children:(0,L.jsx)(T.ZP,{bold:!0,default:!0,small:!0,children:"Day of the week"})}),(0,L.jsxs)(ae.Z,{compact:!0,monospace:!0,onChange:function(e){qn((function(n){return Re(Re({},n),{},{dayOfWeek:e.target.value})}))},value:(null===Fn||void 0===Fn?void 0:Fn.dayOfWeek)||"",children:[(0,L.jsx)("option",{value:""}),(0,L.jsx)("option",{value:6,children:"Sunday"}),(0,L.jsx)("option",{value:0,children:"Monday"}),(0,L.jsx)("option",{value:1,children:"Tuesday"}),(0,L.jsx)("option",{value:2,children:"Wednesday"}),(0,L.jsx)("option",{value:3,children:"Thursday"}),(0,L.jsx)("option",{value:4,children:"Friday"}),(0,L.jsx)("option",{value:5,children:"Saturday"})]})]},"Day of the week")):oe.U5.MONTHLY===Sn&&e.unshift((0,L.jsxs)(k.Z,{mr:1,children:[(0,L.jsx)(k.Z,{mb:1,children:(0,L.jsx)(T.ZP,{bold:!0,default:!0,small:!0,children:"Day of the month"})}),(0,L.jsxs)(ae.Z,{compact:!0,monospace:!0,onChange:function(e){qn((function(n){return Re(Re({},n),{},{dayOfMonth:e.target.value})}))},value:(null===Fn||void 0===Fn?void 0:Fn.dayOfMonth)||"",children:[(0,L.jsx)("option",{value:""}),(0,N.w6)(31).map((function(e,n){return(0,L.jsx)("option",{value:n+1,children:n+1>=10?String(n+1):"0".concat(n+1)},n+1)}))]})]},"Day of the month")),(0,L.jsx)(S.ZP,{children:e})}),[Fn,Sn,tt]),ot=(0,c.useMemo)((function(){return[(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.KJ,{default:!0}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:!0,children:"Trigger name"})]},"trigger_name"),(0,L.jsx)(w.Z,{monospace:!0,onChange:function(e){e.preventDefault(),Qe((function(n){return Re(Re({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:_n},"trigger_name_input")]}),[_n]),ut=(0,c.useMemo)((function(){return[(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.KJ,{default:!0}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:!0,children:"Trigger description"})]},"trigger_description"),(0,L.jsx)(w.Z,{monospace:!0,onChange:function(e){e.preventDefault(),Qe((function(n){return Re(Re({},n),{},{description:e.target.value})}))},placeholder:"Description",value:Pn},"trigger_description_input")]}),[Pn]),ct=(0,c.useMemo)((function(){var e=[ot,ut,[(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.Pf,{default:!0,size:1.5*A.iI}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:!0,children:"Frequency"})]},"frequency"),(0,L.jsxs)("div",{children:[(0,L.jsxs)(ae.Z,{monospace:!0,onChange:function(e){e.preventDefault();var n=e.target.value;Qe((function(e){return Re(Re({},e),{},{schedule_interval:n})}))},placeholder:"Choose the frequency to run",value:Sn,children:[Object.values(oe.U5).reduce((function(e,n){var t;return!hn||null!==bn&&void 0!==bn&&null!==(t=bn[oe.Xm.TIME])&&void 0!==t&&t[n]?e.concat((0,L.jsx)("option",{value:n,children:n.substring(1)},n)):e}),[]),!hn&&(0,L.jsx)("option",{value:"custom",children:"custom"},"custom")]}),!hn&&(0,L.jsx)(k.Z,{mt:1,p:1,children:(0,L.jsxs)(T.ZP,{muted:!0,small:!0,children:["If you don't see the frequency option you need, select ",(0,L.jsx)(T.ZP,{inline:!0,monospace:!0,small:!0,children:"custom"})," and enter CRON syntax."]})})]},"frequency_input")]];return hn||e.push([(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.rs,{default:!0,size:1.5*A.iI}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:!0,children:"Enable landing time"})]},"frequency"),(0,L.jsxs)("div",{children:[(0,L.jsx)(pe.Z,{checked:et,disabled:nt,onCheck:function(){Ve((function(e){return Re(Re({},e),{},{landing_time_enabled:!et})}))}}),(0,L.jsxs)(k.Z,{mt:1,p:1,children:[nt&&(0,L.jsxs)(T.ZP,{muted:!0,small:!0,children:["In order to enable landing time, the trigger\u2019s frequency must be ",(0,L.jsx)(T.ZP,{inline:!0,monospace:!0,small:!0,children:oe.U5.HOURLY}),", ",(0,L.jsx)(T.ZP,{inline:!0,monospace:!0,small:!0,children:oe.U5.DAILY}),", ",(0,L.jsx)(T.ZP,{inline:!0,monospace:!0,small:!0,children:oe.U5.WEEKLY}),", or ",(0,L.jsx)(T.ZP,{inline:!0,monospace:!0,small:!0,children:oe.U5.MONTHLY}),"."]}),!nt&&(0,L.jsx)(T.ZP,{muted:!0,small:!0,children:"Instead of starting at a specific time, this trigger will schedule pipeline runs at a time where it will finish by the specified time below."})]})]},"frequency_input")]),tt&&e.push([(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.Pf,{default:!0,size:1.5*A.iI}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:!0,children:"Average runtime"})]},"runtime_average"),(0,L.jsx)(S.ZP,{alignItems:"center",style:{minHeight:"".concat(5.75*A.iI,"px")},children:(0,L.jsx)(T.ZP,{monospace:!0,children:rt})},"runtime_average_value")]),e.push([(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.aw,{default:!0,size:1.5*A.iI}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsxs)(T.ZP,{default:!0,children:[tt&&"Pipeline complete by",!tt&&"Start date and time"]})]},"start_time"),tt?lt:(0,L.jsxs)("div",{style:{minHeight:"".concat(5.75*A.iI,"px")},children:[!rn&&(0,L.jsx)(w.Z,{monospace:!0,onClick:function(){return ln((function(e){return!e}))},placeholder:"YYYY-MM-DD HH:MM",value:Dn?(0,je.XM)(Dn,Rn,{localTimezone:V}):""}),(0,L.jsx)("div",{style:{width:"400px"},children:(0,L.jsx)(b.Z,{disableEscape:!0,onClickOutside:function(){return ln(!1)},open:rn,style:{position:"relative"},children:(0,L.jsx)(x.Z,{localTime:V,selectedDate:Dn,selectedTime:Rn,setSelectedDate:Nn,setSelectedTime:Un,topPosition:!0})})})]},"start_time_input")]),K&&e.splice(2,2),Xn&&e.splice(2,0,[(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.EK,{default:!0,size:1.5*A.iI}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:!0,children:"Cron expression"})]},"cron_expression"),(0,L.jsxs)("div",{children:[(0,L.jsx)(w.Z,{monospace:!0,onChange:function(e){e.preventDefault(),cn(e.target.value)},placeholder:"* * * * *",value:un}),(0,L.jsxs)(k.Z,{mt:1,p:1,children:[(0,L.jsx)(T.ZP,{monospace:!0,xsmall:!0,children:"[minute] [hour] [day(month)] [month] [day(week)]"}),(0,L.jsx)(k.Z,{mb:"2px"}),un?(0,L.jsx)(T.ZP,{danger:$n,muted:!0,small:!0,children:$n?"Invalid cron expression. Please check the cron syntax.":(0,L.jsxs)(L.Fragment,{children:['"',Qn,'"']})}):null,V&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(T.ZP,{bold:!0,inline:!0,small:!0,warning:!0,children:"Note:\xa0"}),(0,L.jsxs)(T.ZP,{inline:!0,small:!0,children:["If you have the display_local_timezone setting enabled, the local cron expression above will match your local timezone only",(0,L.jsx)("br",{}),"if the minute and hour values are single values without any special characters, such as the comma, hyphen, or slash.",(0,L.jsx)("br",{}),"You can still use cron expressions with special characters for the minute/hour values, but it will be based in UTC time."]})]})]})]},"cron_expression_input")]),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(k.Z,{mb:2,px:A.cd,children:(0,L.jsx)(E.Z,{children:"Settings"})}),(0,L.jsx)(q.Z,{light:!0,short:!0}),(0,L.jsx)(I.Z,{columnFlex:[null,1],rows:e})]})}),[$n,un,Dn,V,hn,Xn,K,nt,et,lt,bn,Qn,rt,Sn,rn,tt,Rn,ot,ut]),st=(0,c.useCallback)((function(e,n){te((function(t){return Object.entries(n).forEach((function(n){var i=(0,l.Z)(n,2),r=i[0],o=i[1];t[e][r]=o})),(0,i.Z)(t)}))}),[te]),at=(0,c.useMemo)((function(){return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(k.Z,{mb:A.cd,px:A.cd,children:(0,L.jsx)(E.Z,{children:"Settings"})}),(0,L.jsx)(q.Z,{light:!0,short:!0}),(0,L.jsx)(I.Z,{columnFlex:[null,1],rows:[ot,ut]}),(0,L.jsxs)(k.Z,{mb:2,mt:5,px:A.cd,children:[(0,L.jsx)(E.Z,{children:"Events"}),(0,L.jsxs)(T.ZP,{muted:!0,children:["Add 1 or more event that will trigger this pipeline to run.",(0,L.jsx)("br",{}),"If you add more than 1 event, this pipeline will trigger if any of the events are received."]}),(0,L.jsxs)(k.Z,{mt:A.Mq,children:[(0,L.jsx)(T.ZP,{bold:!0,large:!0,children:"AWS events"}),(0,L.jsxs)(T.ZP,{muted:!0,children:["In order to retrieve all the possible AWS events you can trigger your pipeline from,",(0,L.jsx)("br",{}),"you\u2019ll need to set 3 environment variables (",(0,L.jsx)(B.Z,{href:"https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html",openNewWindow:!0,underline:!0,children:"more info here"}),"):"]}),(0,L.jsx)(k.Z,{mt:1,children:(0,L.jsxs)(ie,{monospace:!0,ordered:!0,children:[(0,L.jsx)(T.ZP,{monospace:!0,children:"AWS_REGION_NAME"}),(0,L.jsx)(T.ZP,{monospace:!0,children:"AWS_ACCESS_KEY_ID"}),(0,L.jsx)(T.ZP,{monospace:!0,children:"AWS_SECRET_ACCESS_KEY"})]})})]})]}),(0,L.jsx)(q.Z,{light:!0,short:!0}),(null===ne||void 0===ne?void 0:ne.length)>=1&&(0,L.jsx)(I.Z,{alignTop:!0,columnFlex:[1,1,2,null],columns:[{uuid:"Provider"},{uuid:"Event"},{uuid:"Pattern"},{label:function(){return""},uuid:"delete"}],rows:null===ne||void 0===ne?void 0:ne.map((function(e,n){var t=e.event_type,i=e.name,r=e.pattern,l=e.id||"".concat(t,"-").concat(i,"-").concat(n,"-").concat(JSON.stringify(r)),o=[];return r&&JSON.stringify(r,null,2).split("\n").forEach((function(e){o.push(" ".concat(e))})),[(0,L.jsx)(ae.Z,{monospace:!0,onChange:function(e){return st(n,{event_type:e.target.value})},placeholder:"Event provider",value:t||"",children:F.S5.map((function(e){var n=e.label,t=e.uuid;return(0,L.jsx)("option",{value:t,children:n()},t)}))},"event-provider-".concat(l)),(0,L.jsx)(ae.Z,{monospace:!0,onChange:function(e){var t,i=e.target.value,r=null===(t=Gn[i])||void 0===t?void 0:t.event_pattern;st(n,{name:i,pattern:r?JSON.parse(r):null})},placeholder:"Event name",value:i,children:Bn.map((function(e){var n=e.name;return(0,L.jsx)("option",{value:n,children:n},n)}))},"event-name-".concat(l)),r&&(0,L.jsx)(y.Z,{language:"json",small:!0,source:o.join("\n")}),(0,L.jsx)(j.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return te((function(e){return(0,N.oM)(e,n)}))},children:(0,L.jsx)(fe.rF,{default:!0,size:2*A.iI})},"remove_event")]}))}),(0,L.jsx)(k.Z,{p:A.cd,children:(0,L.jsx)(j.ZP,{beforeIcon:(0,L.jsx)(fe.mm,{size:2*A.iI}),onClick:function(){return te((function(e){return e.concat({})}))},outline:!0,children:"Add event matcher"})})]})}),[ne,Bn,Gn,ot,ut,st]),dt=(0,c.useMemo)((function(){var e=(0,je.M8)(P,qe);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(k.Z,{mb:A.cd,px:A.cd,children:(0,L.jsx)(E.Z,{children:"Settings"})}),(0,L.jsx)(q.Z,{light:!0,short:!0}),(0,L.jsx)(I.Z,{columnFlex:[null,1],rows:[ot,ut]}),(0,L.jsxs)(k.Z,{mb:2,mt:5,px:A.cd,children:[(0,L.jsx)(E.Z,{children:"Endpoint"}),(0,L.jsxs)(T.ZP,{muted:!0,children:["Make a ",(0,L.jsx)(T.ZP,{bold:!0,inline:!0,monospace:!0,children:"POST"})," request to the following endpoint:"]}),(0,L.jsx)(k.Z,{mt:A.Mq,children:(0,L.jsx)(O.Z,{copiedText:e,linkText:e,monospace:!0,withCopyIcon:!0})}),(0,L.jsx)(k.Z,{mt:A.Mq,children:(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(k.Z,{mr:1,children:(0,L.jsx)(pe.Z,{checked:qe,onCheck:function(){return ze(!qe)}})}),(0,L.jsx)(T.ZP,{muted:!0,children:"Show alternative endpoint to pass token in headers"})]})})]}),qe&&(0,L.jsxs)(k.Z,{mb:2,mt:5,px:A.cd,children:[(0,L.jsx)(E.Z,{children:"Headers"}),(0,L.jsx)(T.ZP,{muted:!0,children:"You will need to include the following headers in your request to authenticate with the server."}),(0,L.jsx)(k.Z,{mt:A.Mq,children:(0,L.jsx)(O.Z,{copiedText:"Content-Type: application/json\n Authorization: Bearer ".concat(null===P||void 0===P?void 0:P.token,"\n "),withCopyIcon:!0,children:(0,L.jsx)(y.Z,{language:"json",small:!0,source:"\n Content-Type: application/json\n Authorization: Bearer ".concat(null===P||void 0===P?void 0:P.token,"\n ")})})})]}),(0,L.jsxs)(k.Z,{mb:2,mt:5,px:A.cd,children:[(0,L.jsx)(E.Z,{children:"Payload"}),(0,L.jsx)(T.ZP,{muted:!0,children:"You can optionally include runtime variables in your request payload. These runtime variables are accessible from within each pipeline block."}),(0,L.jsx)(k.Z,{mt:A.Mq,children:(0,L.jsx)(O.Z,{copiedText:'{\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n}\n',withCopyIcon:!0,children:(0,L.jsx)(y.Z,{language:"json",small:!0,source:'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\n'})})})]}),(0,L.jsxs)(k.Z,{mb:2,mt:5,px:A.cd,children:[(0,L.jsx)(E.Z,{children:"Sample cURL command"}),(0,L.jsx)(k.Z,{mt:A.Mq,children:(0,L.jsx)(y.Z,{language:"bash",small:!0,source:qe?"\n curl -X POST ".concat(e," \\\n --header 'Content-Type: application/json' \\\n --header 'Authorization: Bearer ").concat(null===P||void 0===P?void 0:P.token,'\' \\\n --data \'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\'\n '):"\n curl -X POST ".concat(e,' \\\n --header \'Content-Type: application/json\' \\\n --data \'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\'\n')})})]})]})}),[P,ze,ut,ot,qe]),pt=!En||oe.Xm.TIME===En&&!(K&&Dn||!K&&Dn&&Sn)||oe.Xm.EVENT===En&&(!(null!==ne&&void 0!==ne&&ne.length)||!ne.every((function(e){var n=e.event_type,t=e.name;return n&&t}))),vt=(0,c.useMemo)((function(){var e;return(null===d||void 0===d||null===(e=d.blocks)||void 0===e?void 0:e.filter((function(e){var n=e.type;return Oe.tf.DBT===n})))||[]}),[d]),ht=(0,c.useMemo)((function(){return null!==d&&void 0!==d&&d.blocks?(0,Te.n)(d):null}),[d]),ft=(0,c.useMemo)((function(){var e,n;return(0,L.jsxs)(k.Z,{py:A.cd,children:[(0,L.jsxs)(k.Z,{mb:A.HN,px:A.cd,children:[(0,L.jsx)(E.Z,{children:"Run settings"}),(0,L.jsxs)(k.Z,{mt:A.Mq,children:[!K&&(0,L.jsxs)(k.Z,{mb:A.Mq,children:[(0,L.jsx)(T.ZP,{children:"Set a timeout for each run of this trigger (optional)"}),(0,L.jsx)(k.Z,{mb:1}),(0,L.jsx)(w.Z,{label:"Timeout (in seconds)",onChange:function(e){return Ve((function(n){return Re(Re({},n),{},{timeout:e.target.value})}))},primary:!0,setContentOnMount:!0,type:"number",value:null===Ge||void 0===Ge?void 0:Ge.timeout})]}),(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(k.Z,{mr:2,children:(0,L.jsx)(pe.Z,{checked:Ue,onCheck:function(e){He(e),e||Qe((function(e){return Re(Re({},e),{},{slaAmount:0})}))}})}),(0,L.jsx)(T.ZP,{default:!0,monospace:!0,children:"Configure trigger SLA"})]}),Ue&&(0,L.jsx)(I.Z,{columnFlex:[null,1],rows:[[(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.aw,{default:!0,size:1.5*A.iI}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:!0,children:"SLA"})]},"sla_detail"),(0,L.jsxs)(S.ZP,{children:[(0,L.jsx)(z.Z,{flex:1,children:(0,L.jsx)(w.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),Qe((function(n){return Re(Re({},n),{},{slaAmount:e.target.value})}))},placeholder:"Time",value:null===Xe||void 0===Xe?void 0:Xe.slaAmount})}),(0,L.jsx)(z.Z,{flex:1,children:(0,L.jsx)(ae.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),Qe((function(n){return Re(Re({},n),{},{slaUnit:e.target.value})}))},placeholder:"Select time unit",small:!0,value:null===Xe||void 0===Xe?void 0:Xe.slaUnit,children:Object.keys(je.tL).map((function(e){return(0,L.jsx)("option",{value:e,children:"".concat(e,"(s)")},e)}))})})]},"sla_input_detail")]]})]}),(0,L.jsx)(k.Z,{mt:A.Mq,children:(0,L.jsx)(S.ZP,{alignItems:"center",children:(0,L.jsx)(Z.Z,{checked:null===Ge||void 0===Ge?void 0:Ge.allow_blocks_to_fail,label:"Keep running pipeline even if blocks fail",onClick:function(){return Ve((function(e){return Re(Re({},e),{},{allow_blocks_to_fail:!(null!==Ge&&void 0!==Ge&&Ge.allow_blocks_to_fail)})}))}})})}),oe.Xm.TIME===En&&(0,L.jsx)(k.Z,{mt:A.Mq,children:(0,L.jsx)(S.ZP,{alignItems:"center",children:(0,L.jsx)(Z.Z,{checked:null===Ge||void 0===Ge?void 0:Ge.skip_if_previous_running,label:"Skip run if previous run still in progress",onClick:function(){return Ve((function(e){return Re(Re({},e),{},{skip_if_previous_running:!(null!==Ge&&void 0!==Ge&&Ge.skip_if_previous_running)})}))}})})})]}),(0,L.jsxs)(k.Z,{mb:A.HN,children:[(0,L.jsxs)(k.Z,{px:A.cd,children:[(0,L.jsx)(E.Z,{children:"Runtime variables"}),(0,Ae.Qr)(yn)&&(0,L.jsxs)(k.Z,{mt:1,children:[(0,L.jsx)(T.ZP,{default:!0,children:"This pipeline has no runtime variables."}),(0,L.jsx)(u(),{as:"/pipelines/".concat(W,"/edit?sideview=variables"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,L.jsx)(B.Z,{primary:!0,children:"Click here"})})," ",(0,L.jsx)(T.ZP,{default:!0,inline:!0,children:"to add variables to this pipeline."})]})]}),(0,L.jsx)(k.Z,{mt:A.Mq,children:(0,L.jsx)(re.Z,{enableVariablesOverwrite:!0,originalVariables:null===P||void 0===P?void 0:P.variables,runtimeVariables:Ye,setRuntimeVariables:Ke})})]}),ht&&(null===(e=Object.keys(ht||{}))||void 0===e?void 0:e.length)>=1&&(0,L.jsxs)(k.Z,{mb:A.HN,children:[(0,L.jsx)(k.Z,{px:A.cd,children:(0,L.jsx)(E.Z,{children:"Override bookmark values"})}),(0,L.jsx)(m.Z,{bookmarkValues:Q,originalBookmarkValues:null===P||void 0===P||null===(n=P.variables)||void 0===n?void 0:n[oe.PN],pipeline:d,setBookmarkValues:$})]}),(null===vt||void 0===vt?void 0:vt.length)>=1&&(0,L.jsx)(k.Z,{mb:A.HN,children:(0,L.jsx)(H,{blocks:vt,updateVariables:Ke,variables:Re(Re({},Jn),Ye)})})]})}),[ht,Q,vt,Ue,yn,K,he,d,W,Ye,Xe,En,Jn,$,He,xe,Ke,Ge]),mt=be.ZP.tags.list().data,jt=(0,c.useMemo)((function(){return((null===mt||void 0===mt?void 0:mt.tags)||[]).filter((function(e){var n=e.uuid;return!(null!==wn&&void 0!==wn&&wn.includes(n))}))}),[mt,wn]),gt=(0,c.useMemo)((function(){return(0,je.ri)(K)}),[K]),xt=(0,c.useMemo)((function(){return(0,L.jsx)(Ze,{containerRef:U,date:Dn,interactions:gn,pipeline:d,pipelineInteraction:jn,pipelineSchedule:Xe,setVariables:function(e){Qe((function(n){var t=Re({},e((null===n||void 0===n?void 0:n.variables)||{})),i=Re({},t);return null===gn||void 0===gn||gn.forEach((function(e){Object.entries((null===e||void 0===e?void 0:e.variables)||{}).forEach((function(e){var n=(0,l.Z)(e,2),t=n[0],r=n[1].types;i&&t in i&&(i[t]=(0,we.M)(i[t],r))}))})),nn(i),Re(Re({},n),{},{variables:t})}))},showSummary:ke.uuid===dn,time:Rn,triggerTypes:gt,variables:null===Xe||void 0===Xe?void 0:Xe.variables})}),[U,Dn,gn,d,jn,Xe,dn,Qe,nn,Rn,gt]),Zt=(0,c.useMemo)((function(){return oe.fq.ACTIVE===(null===Xe||void 0===Xe?void 0:Xe.status)}),[Xe]),bt=M?null===M||void 0===M?void 0:M((function(e){return G.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(null===d||void 0===d?void 0:d.uuid,"/triggers/").concat(e))})):[null,{isLoading:!1}],yt=(0,l.Z)(bt,2),Ot=yt[0],Pt=yt[1].isLoading,_t=(0,c.useCallback)((function(){null===Ot||void 0===Ot||Ot({pipeline_schedule:Re(Re({},Xe),{},{variables:en||(null===Xe||void 0===Xe?void 0:Xe.variables)})})}),[Ot,en,Xe]),St=(0,c.useMemo)((function(){var e,n;return Y?(e=(0,L.jsx)(j.ZP,{linkProps:{as:"/pipelines/".concat(W,"/triggers/").concat(Y),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel and go back"}),n=(0,L.jsx)(j.ZP,{onClick:it,primary:!0,children:"Save trigger"})):Ee.uuid===dn?(e=(0,L.jsx)(j.ZP,{onClick:function(){return null===s||void 0===s?void 0:s()},secondary:!0,children:"Cancel and go back"}),n=(0,L.jsx)(j.ZP,{afterIcon:(0,L.jsx)(fe.Kw,{}),onClick:function(){return pn(Se.uuid)},primary:!0,children:"Next: Customize"})):Se.uuid===dn?(e=(0,L.jsx)(j.ZP,{beforeIcon:(0,L.jsx)(fe.Hd,{}),onClick:function(){return pn(Ee.uuid)},secondary:!0,children:"Back: Settings"}),n=(0,L.jsx)(j.ZP,{afterIcon:(0,L.jsx)(fe.Kw,{}),onClick:function(){return pn(ke.uuid)},primary:!0,children:"Next: Review"})):ke.uuid===dn&&(e=(0,L.jsx)(j.ZP,{beforeIcon:(0,L.jsx)(fe.Hd,{}),onClick:function(){return pn(Se.uuid)},secondary:!0,children:"Back: Customize"}),n=(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(j.ZP,{beforeIcon:(0,L.jsx)(fe.Bf,{}),loading:Pt,onClick:function(){return _t()},primary:!0,children:Y?"Save trigger":"Create trigger"}),!Y&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(k.Z,{mr:A.cd}),(0,L.jsx)(pe.Z,{checked:Zt,compact:!0,onCheck:function(e){return Qe((function(n){return Re(Re({},n),{},{status:e(Zt)?oe.fq.ACTIVE:oe.fq.INACTIVE})}))}}),(0,L.jsx)(k.Z,{mr:1}),(0,L.jsx)(T.ZP,{default:Zt,muted:!Zt,small:!0,children:"Set trigger to be active immediately after creating"})]})]})),(0,L.jsx)(k.Z,{p:A.cd,children:(0,L.jsxs)(S.ZP,{alignItems:"center",children:[e,e&&n&&(0,L.jsx)(k.Z,{mr:A.cd}),n]})})}),[_t,Pt,Zt,s,it,Y,W,dn,pn]),Et=(0,c.useMemo)((function(){var e,n,t,i,r,l,o;return"undefined"===typeof(null===d||void 0===d||null===(e=d.settings)||void 0===e||null===(n=e.triggers)||void 0===n?void 0:n.save_in_code_automatically)?null===R||void 0===R||null===(t=R.pipelines)||void 0===t||null===(i=t.settings)||void 0===i||null===(r=i.triggers)||void 0===r?void 0:r.save_in_code_automatically:null===d||void 0===d||null===(l=d.settings)||void 0===l||null===(o=l.triggers)||void 0===o?void 0:o.save_in_code_automatically}),[d,R]);return(0,L.jsx)(L.Fragment,{children:(0,L.jsx)(le.Z,{after:!hn&&ft,afterHidden:hn,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(W,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return null===P||void 0===P?void 0:P.name},linkProps:{as:"/pipelines/".concat(W,"/triggers/").concat(Y),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],errors:t,pageName:_e.M.TRIGGERS,pipeline:d,setErrors:_,subheader:hn||Zn?(0,L.jsx)(k.Z,{px:A.cd,children:(0,L.jsx)(g.Z,{noPadding:!0,onClickTab:function(e){var n=e.uuid;return pn(n)},regularSizeText:!0,selectedTabUUID:dn,tabs:Ie,underlineColor:(0,D.qn)(Oe.tf.DATA_LOADER).accent,underlineStyle:!0})}):(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(j.ZP,{disabled:pt,loading:Kn,onClick:it,outline:!0,primary:!0,children:"Save changes"}),(0,L.jsx)(k.Z,{mr:A.cd}),(0,L.jsx)(j.ZP,{linkProps:{as:"/pipelines/".concat(W,"/triggers/").concat(Y),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"}),Et&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(k.Z,{mr:A.cd}),(0,L.jsxs)(T.ZP,{default:!0,xsmall:!0,children:["This trigger will automatically be persisted in code.",(0,L.jsx)("br",{}),"To change this behavior, update the ",(0,L.jsx)(u(),{as:"/pipelines/".concat(W,"/settings"),href:"/pipelines/[pipeline]/settings",passHref:!0,children:(0,L.jsx)(B.Z,{openNewWindow:!0,xsmall:!0,children:"pipeline\u2019s settings"})})," or ",(0,L.jsx)(u(),{as:"/settings/workspace/preferences",href:"/settings/workspace/preferences",passHref:!0,children:(0,L.jsx)(B.Z,{openNewWindow:!0,xsmall:!0,children:"project settings"})}),"."]})]})]}),subheaderNoPadding:hn||Zn,title:function(){return null!==P&&void 0!==P&&P.name?"Edit ".concat(null===P||void 0===P?void 0:P.name):"New trigger"},uuid:"triggers/edit",children:(0,L.jsxs)("div",{ref:U,children:[(hn||Zn)&&(0,L.jsx)(q.Z,{light:!0}),(hn||Zn)&&(Se.uuid===dn||ke.uuid===dn)&&xt,(!hn||Ee.uuid===dn)&&(!Zn||Ee.uuid===dn)&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(k.Z,{p:A.cd,children:[(0,L.jsxs)(k.Z,{mb:2,children:[(0,L.jsx)(E.Z,{children:"Trigger type"}),(0,L.jsx)(T.ZP,{muted:!0,children:"How would you like this pipeline to be triggered?"})]}),(0,L.jsx)(S.ZP,{children:gt.reduce((function(e,n){var t=n.label,i=n.description,r=n.uuid,l=En===r,o=En&&!l;return!hn||null!==bn&&void 0!==bn&&bn[r]?e.concat((0,L.jsx)(j.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){oe.Xm.EVENT!==r||null!==ne&&void 0!==ne&&ne.length||te([{}]),Qe((function(e){return Re(Re({},e),{},{schedule_type:r})}))},children:(0,L.jsx)(Pe.U,{selected:l,children:(0,L.jsxs)(S.ZP,{alignItems:"center",children:[(0,L.jsx)(z.Z,{children:(0,L.jsx)("input",{checked:l,type:"radio"})}),(0,L.jsx)(k.Z,{mr:A.cd}),(0,L.jsxs)(z.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,L.jsx)(E.Z,{bold:!0,default:!l&&!o,level:5,muted:!l&&o,children:t()}),(0,L.jsx)(T.ZP,{default:!l&&!o,leftAligned:!0,muted:o,children:i()})]})]})})},r)):e}),[])})]}),(0,L.jsxs)(k.Z,{mt:A.HN,children:[oe.Xm.TIME===En&&ct,oe.Xm.EVENT===En&&at,oe.Xm.API===En&&dt]}),!hn&&(0,L.jsxs)(k.Z,{mt:A.HN,px:A.cd,children:[(0,L.jsxs)(k.Z,{mb:2,children:[(0,L.jsx)(E.Z,{children:"Tags"}),(0,L.jsx)(T.ZP,{muted:!0,children:"Add or remove tags from this trigger."})]}),(0,L.jsx)(de.Z,{removeTag:function(e){Qe((function(n){return Re(Re({},n),{},{tags:null===wn||void 0===wn?void 0:wn.filter((function(n){return n!==e.uuid}))})}))},selectTag:function(e){Qe((function(n){return Re(Re({},n),{},{tags:(0,N.$C)(e.uuid,wn,(function(n){return n===e.uuid}))})}))},selectedTags:null===wn||void 0===wn?void 0:wn.map((function(e){return{uuid:e}})),tags:jt,uuid:"TagsAutocompleteInputField-trigger-".concat(Y)})]})]}),(hn||Zn)&&St]})})})}},37899:function(e,n,t){var i=t(82394),r=t(75582),l=t(82684),o=t(71180),u=t(15338),c=t(97618),s=t(55485),a=t(38276),d=t(75499),p=t(30160),v=t(35576),h=t(17488),f=t(72473),m=t(70515),j=t(42122),g=t(81728),x=t(28598);function Z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function b(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,i.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}n.Z=function(e){e.borderless,e.compact;var n=e.enableVariablesOverwrite,t=e.originalVariables,Z=e.runtimeVariables,y=(e.setEnableVariablesOverwrite,e.setRuntimeVariables),O=(0,l.useState)({}),P=O[0],_=O[1],S=(0,l.useState)(null),E=S[0],k=S[1],I=(0,l.useState)(null),T=I[0],w=I[1];(0,l.useEffect)((function(){var e=Object.entries(Z||{}).reduce((function(e,n){var t=(0,r.Z)(n,2),l=t[0],o=t[1],u=(0,g.Pb)(o)&&"object"===typeof JSON.parse(o)&&!Array.isArray(JSON.parse(o))&&null!==JSON.parse(o);return b(b({},e),{},(0,i.Z)({},l,u))}),{});_(e)}),[]);var C=function(e,n){var t={borderless:!0,key:"variable_uuid_input_".concat(e),monospace:!0,onChange:function(n){n.preventDefault(),y((function(t){return b(b({},t),{},(0,i.Z)({},e,n.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:n};return P[e]?(0,x.jsx)(v.Z,b(b({},t),{},{rows:1,value:n})):(0,x.jsx)(h.Z,b({},t))};return(0,x.jsxs)(x.Fragment,{children:[n&&Z&&Object.entries(Z).length>0&&(0,x.jsx)(d.Z,{columnFlex:[null,1,null],columns:[{uuid:"Variable"},{uuid:"Value"},{label:function(){return""},uuid:"Action"}],rows:Object.entries(Z).map((function(e){var n=(0,r.Z)(e,2),i=n[0],l=n[1];return[(0,x.jsx)(p.ZP,{default:!0,monospace:!0,children:i},"variable_".concat(i)),C(i,l),!(null!==t&&void 0!==t&&t[i])&&(0,x.jsx)(o.ZP,{iconOnly:!0,onClick:function(){y((function(e){return(0,j.gR)(e,[i])}))},children:(0,x.jsx)(f.rF,{default:!0})})]}))}),(0,x.jsx)(a.Z,{p:m.cd,children:(0,x.jsxs)(s.ZP,{alignItems:"center",children:[(0,x.jsx)(c.Z,{flex:1,children:(0,x.jsx)(h.Z,{fullWidth:!0,monospace:!0,onChange:function(e){return k(e.target.value)},placeholder:"New variable UUID",value:E||""})}),(0,x.jsx)(a.Z,{mr:1}),(0,x.jsx)(c.Z,{flex:1,children:(0,x.jsx)(h.Z,{fullWidth:!0,monospace:!0,onChange:function(e){return w(e.target.value)},placeholder:"Variable value",value:T||""})}),(0,x.jsx)(a.Z,{mr:1}),(0,x.jsx)(o.ZP,{beforeIcon:(0,x.jsx)(f.mm,{}),disabled:!E||!T,onClick:function(){y((function(e){return b(b({},e),{},(0,i.Z)({},E,T))})),k(null),w(null)},children:"Add runtime variable"})]})}),(0,x.jsx)(u.Z,{light:!0})]})}},97196:function(e,n,t){t.d(n,{S5:function(){return l},_P:function(){return o}});var i,r=t(86735);!function(e){e.AWS="aws_event"}(i||(i={}));var l=[{label:function(){return"AWS"},uuid:i.AWS}],o=(0,r.HK)(l,(function(e){return e.uuid}))},61599:function(e,n,t){t.d(n,{D5:function(){return j},MU:function(){return o},RL:function(){return s},Xv:function(){return a},Zj:function(){return m},_B:function(){return r},eL:function(){return d},fe:function(){return h},jL:function(){return c},kB:function(){return g},ks:function(){return v},th:function(){return f},u7:function(){return p},zS:function(){return u}});var i,r,l=t(82394);!function(e){e.FULL_TABLE="FULL_TABLE",e.INCREMENTAL="INCREMENTAL",e.LOG_BASED="LOG_BASED"}(r||(r={}));var o,u,c=[r.FULL_TABLE,r.INCREMENTAL];!function(e){e.IGNORE="IGNORE",e.UPDATE="UPDATE"}(o||(o={})),function(e){e.DATE_TIME="date-time",e.UUID="uuid"}(u||(u={}));var s,a="datetime",d=(i={},(0,l.Z)(i,u.DATE_TIME,a),(0,l.Z)(i,u.UUID,u.UUID),i);!function(e){e.ARRAY="array",e.BOOLEAN="boolean",e.INTEGER="integer",e.NULL="null",e.NUMBER="number",e.OBJECT="object",e.STRING="string"}(s||(s={}));var p,v,h,f,m,j=[s.ARRAY,s.BOOLEAN,a,s.INTEGER,s.NULL,s.NUMBER,s.OBJECT,s.STRING,u.UUID];!function(e){e.PROPERTIES="properties"}(p||(p={})),function(e){e.AUTOMATIC="automatic",e.AVAILABLE="available",e.UNSUPPORTED="unsupported"}(v||(v={})),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"}(h||(h={})),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"}(f||(f={})),function(e){e.AMAZON_S3="amazon_s3",e.BIGQUERY="bigquery",e.DELTA_LAKE_S3="delta_lake_s3",e.GOOGLE_CLOUD_STORAGE="google_cloud_storage",e.KAFKA="kafka",e.MYSQL="mysql",e.POSTGRESQL="postgresql",e.SNOWFLAKE="snowflake"}(m||(m={}));var g=[m.AMAZON_S3,m.GOOGLE_CLOUD_STORAGE,m.KAFKA]},83784:function(e,n,t){t.d(n,{C:function(){return i}});var i="global"},14805:function(e,n,t){var i=t(82394),r=t(44495),l=t(55485),o=t(44085),u=t(38276),c=t(30160),s=t(88785),a=t(70515),d=t(86735),p=t(28598);function v(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function h(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?v(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.localTime,t=e.selectedDate,i=e.selectedTime,v=e.setSelectedDate,f=e.setSelectedTime,m=e.topPosition;return(0,p.jsxs)(s.J,{absolute:!0,topPosition:m,children:[(0,p.jsx)(r.ZP,{onChange:v,value:t}),(0,p.jsx)(u.Z,{mb:2}),(0,p.jsxs)(l.ZP,{alignItems:"center",children:[(0,p.jsxs)(c.ZP,{default:!0,large:!0,children:["Time (",n?"Local":"UTC","):"]}),(0,p.jsx)(u.Z,{pr:2}),(0,p.jsx)(o.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{hour:e.target.value})}))},paddingRight:5*a.iI,placeholder:"HH",value:null===i||void 0===i?void 0:i.hour,children:(0,d.m5)(24,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"hour_".concat(e))}))}),(0,p.jsx)(u.Z,{px:1,children:(0,p.jsx)(c.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(o.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{minute:e.target.value})}))},paddingRight:5*a.iI,placeholder:"MM",value:null===i||void 0===i?void 0:i.minute,children:(0,d.m5)(60,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"minute_".concat(e))}))})]})]})}},79500:function(e,n,t){t.d(n,{a:function(){return l}});var i=t(16488),r=t(3917);function l(e,n){var t,l;if(null!==n&&void 0!==n&&n.localTimezone)t=(0,r.n$)(e),l={hour:(0,r.lJ)(String(t.getHours())),minute:(0,r.lJ)(String(t.getMinutes()))};else{var o=e.split(" ")[1];t=(0,i.eI)(e),l={hour:o.substring(0,2),minute:o.substring(3,5)}}return{date:t,time:l}}},9134:function(e,n,t){var i=t(82684),r=t(21124),l=t(68432),o=t(38626),u=t(65292),c=t(44897),s=t(95363),a=t(70515),d=t(28598);n.Z=function(e){var n=e.language,t=e.maxWidth,p=e.showLineNumbers,v=e.small,h=e.source,f=e.wrapLines,m=(0,i.useContext)(o.ThemeContext);function j(e){var i=e.value;return(0,d.jsx)(l.Z,{customStyle:{backgroundColor:(m.background||c.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:s.Vp,fontSize:v?12:14,marginBottom:0,marginTop:0,maxWidth:t,paddingBottom:2*a.iI,paddingTop:2*a.iI},language:n,lineNumberStyle:{color:(m.content||c.Z.content).muted},showLineNumbers:p,style:u._4,useInlineStyles:!0,wrapLines:f,children:i})}return(0,d.jsx)(r.D,{components:{code:function(e){var n=e.children;return(0,d.jsx)(j,{value:n})}},children:h})}},39457:function(e,n,t){var i,r=t(82394),l=(t(82684),t(64866)),o=t(21764),u=t(55485),c=t(48670),s=t(38276),a=t(30160),d=t(12468),p=t(72473),v=t(70515),h=t(28598);function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function m(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,r.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}!function(e){e.LEFT="left",e.RIGHT="right"}(i||(i={})),n.Z=function(e){var n,t=e.children,r=e.copiedText,f=e.iconPosition,j=void 0===f?i.LEFT:f,g=e.inverted,x=e.linkProps,Z=e.linkText,b=e.monospace,y=e.muted,O=e.small,P=e.toastMessage,_=e.withCopyIcon;return t?n=(0,h.jsx)("span",{children:t}):_&&(n=(0,h.jsx)(c.Z,m(m({href:"#",inline:!0,muted:y,preventDefault:!0,sameColorAsText:!0,small:O},x),{},{children:(0,h.jsxs)(u.ZP,{alignItems:"center",children:[j===i.LEFT&&(0,h.jsx)(s.Z,{mr:Z?1:0,children:(0,h.jsx)(u.ZP,{alignItems:"center",children:(0,h.jsx)(p.CK,{inverted:g,muted:y,size:2*v.iI})})}),Z&&(0,h.jsx)(a.ZP,{inverted:g,monospace:b,muted:y,small:O,children:Z}),j===i.RIGHT&&(0,h.jsx)(s.Z,{ml:Z?1:0,children:(0,h.jsx)(u.ZP,{alignItems:"center",children:(0,h.jsx)(p.CK,{inverted:g,muted:y})})})]})}))),(0,h.jsx)(d.Z,{block:!0,label:"Copy",size:null,widthFitContent:!0,children:(0,h.jsx)(l.CopyToClipboard,{onCopy:function(){return o.Am.success(P||"Successfully copied to clipboard.",{position:o.Am.POSITION.BOTTOM_RIGHT,toastId:r})},text:r,children:n})})}},22286:function(e,n,t){t.d(n,{M:function(){return a}});var i=t(82394),r=t(75582),l=t(54193),o=t(81728),u=t(42122);function c(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?c(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function a(e,n){var t,c;if(!n||null===n||void 0===n||!n.length)return e;if(null!==n&&void 0!==n&&n.includes(l.zj.LIST))return((0,u.Kn)(e)?Object.keys(e||{}):[e]).map((function(e){return a(e,null===n||void 0===n?void 0:n.filter((function(e){return l.zj.LIST!==e})))}));if(null!==n&&void 0!==n&&n.includes(l.zj.DICTIONARY)){var d=(0,u.Kn)(e)?e:(0,o.Pb)(e)?JSON.parse(e):e;if((0,u.Kn)(d))return Object.entries(d).reduce((function(e,t){var o=(0,r.Z)(t,2),u=o[0],c=o[1];return s(s({},e),{},(0,i.Z)({},u,a(c,null===n||void 0===n?void 0:n.filter((function(e){return l.zj.DICTIONARY!==e})))))}),{})}if(null!==n&&void 0!==n&&n.includes(l.zj.BOOLEAN)){var p,v;if("boolean"===typeof e)return e;if("true"===(null===(p=String(e))||void 0===p?void 0:p.toLowerCase()))return!0;if("false"===(null===(v=String(e))||void 0===v?void 0:v.toLowerCase()))return!1}return null!==n&&void 0!==n&&null!==(t=n.includes)&&void 0!==t&&t.call(n,l.zj.FLOAT)&&(0,o.HW)(e)?parseFloat(e):null!==n&&void 0!==n&&null!==(c=n.includes)&&void 0!==c&&c.call(n,l.zj.INTEGER)&&(0,o.HW)(e)?parseInt(e):e}},32080:function(e,n,t){t.d(n,{n:function(){return l}});var i=t(44425),r=t(61599);function l(e){var n,t={};return null===e||void 0===e||null===(n=e.blocks)||void 0===n||n.forEach((function(e){var n=e.catalog,l=e.type,o=e.uuid;if(i.tf.DATA_LOADER===l&&null!==n&&void 0!==n&&n.streams){var u,c=null===n||void 0===n||null===(u=n.streams)||void 0===u?void 0:u.filter((function(e){var n=e.replication_method;return r._B.INCREMENTAL===n}));(null===c||void 0===c?void 0:c.length)>=1&&(o in t||(t[o]={block:e,streams:[]}),t[o].streams.push(c))}})),t}}}]);