mage-ai 0.8.37__py3-none-any.whl → 0.8.39__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 (91) hide show
  1. mage_ai/api/logging.py +2 -2
  2. mage_ai/api/resources/PipelineRunResource.py +6 -3
  3. mage_ai/data_integrations/sources/constants.py +1 -0
  4. mage_ai/data_preparation/models/block/dbt/__init__.py +20 -0
  5. mage_ai/data_preparation/models/block/dbt/utils/__init__.py +4 -1
  6. mage_ai/data_preparation/models/pipeline.py +10 -1
  7. mage_ai/io/base.py +2 -2
  8. mage_ai/io/constants.py +3 -0
  9. mage_ai/io/export_utils.py +14 -1
  10. mage_ai/io/mssql.py +5 -2
  11. mage_ai/io/mysql.py +7 -3
  12. mage_ai/io/postgres.py +64 -21
  13. mage_ai/io/sql.py +35 -6
  14. mage_ai/io/trino.py +7 -3
  15. mage_ai/orchestration/pipeline_scheduler.py +37 -27
  16. mage_ai/server/active_kernel.py +6 -3
  17. mage_ai/server/api/clusters.py +4 -1
  18. mage_ai/server/api/integration_sources.py +5 -2
  19. mage_ai/server/client/mage.py +2 -2
  20. mage_ai/server/constants.py +1 -1
  21. mage_ai/server/data/base.py +2 -2
  22. mage_ai/server/data/models.py +2 -2
  23. mage_ai/server/frontend_dist/404.html +2 -2
  24. mage_ai/server/frontend_dist/404.html.html +2 -2
  25. mage_ai/server/frontend_dist/_next/static/chunks/{2626-905774aafeb2c600.js → 2626-e7fa4f83f8214c97.js} +1 -1
  26. mage_ai/server/frontend_dist/_next/static/chunks/4178-9103014b7dae3c49.js +1 -0
  27. mage_ai/server/frontend_dist/_next/static/chunks/{4538-8a3c3e47be976ede.js → 4538-347283088b83c6bf.js} +1 -1
  28. mage_ai/server/frontend_dist/_next/static/chunks/5141-ddf4ba0a362d6f34.js +1 -0
  29. mage_ai/server/frontend_dist/_next/static/chunks/{5477-793cd2120261d023.js → 5477-b439f211b6146a11.js} +1 -1
  30. mage_ai/server/frontend_dist/_next/static/chunks/{5872-103815a4a043489b.js → 5872-1767c45ee6690ae5.js} +1 -1
  31. mage_ai/server/frontend_dist/_next/static/chunks/{5896-f84e336fb8877027.js → 5896-10a676bcc86978cc.js} +1 -1
  32. mage_ai/server/frontend_dist/_next/static/chunks/{7400-365cb7888b6db7d9.js → 7400-f4db9b5d41f67f75.js} +1 -1
  33. mage_ai/server/frontend_dist/_next/static/chunks/{9386-fb899ca8ecc2a350.js → 9386-d4cc11bab74eec8d.js} +1 -1
  34. mage_ai/server/frontend_dist/_next/static/chunks/{9832-c8b8970bb522f302.js → 9832-f97919376d52e3bf.js} +1 -1
  35. mage_ai/server/frontend_dist/_next/static/chunks/pages/{manage-9e5f315db570ac77.js → manage-3046bc53d24917c7.js} +1 -1
  36. mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipeline-runs-79e10a783afec3df.js → pipeline-runs-e64ba4e8b2bfe73c.js} +1 -1
  37. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-017f6a2de38f8658.js +1 -0
  38. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{syncs-1767a2f57f887ef7.js → syncs-e1271453ed0c8d6e.js} +1 -1
  39. mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipelines-52c3ee3817e5554b.js → pipelines-7446a70bdd8381a5.js} +1 -1
  40. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{preferences-a23b61bab04a16f3.js → preferences-997acba85f777259.js} +1 -1
  41. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{sync-data-de28e502102defde.js → sync-data-8c903140c99e487c.js} +1 -1
  42. mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-6c0ea500b3bc6b61.js +1 -0
  43. mage_ai/server/frontend_dist/_next/static/chunks/pages/{triggers-8a2169d30b643ae7.js → triggers-783b9526167f1249.js} +1 -1
  44. mage_ai/server/frontend_dist/_next/static/{23nXkA2GRjJCZDwY3kuKd → ngCg1gM6urg83y2nV5KHK}/_buildManifest.js +1 -1
  45. mage_ai/server/frontend_dist/index.html +2 -2
  46. mage_ai/server/frontend_dist/manage.html +2 -2
  47. mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
  48. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  49. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
  50. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
  51. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
  52. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  53. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  54. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
  55. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
  56. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
  57. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
  58. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  59. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
  60. mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
  61. mage_ai/server/frontend_dist/pipelines.html +2 -2
  62. mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
  63. mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
  64. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
  65. mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
  66. mage_ai/server/frontend_dist/settings.html +2 -2
  67. mage_ai/server/frontend_dist/sign-in.html +2 -2
  68. mage_ai/server/frontend_dist/terminal.html +2 -2
  69. mage_ai/server/frontend_dist/test.html +2 -2
  70. mage_ai/server/frontend_dist/triggers.html +2 -2
  71. mage_ai/server/logger.py +16 -0
  72. mage_ai/server/scheduler_manager.py +8 -4
  73. mage_ai/server/server.py +7 -14
  74. mage_ai/server/subscriber.py +6 -3
  75. mage_ai/server/terminal_server.py +65 -0
  76. mage_ai/server/utils/frontend_renderer.py +3 -2
  77. mage_ai/server/websocket_server.py +4 -1
  78. mage_ai/settings/__init__.py +2 -0
  79. mage_ai/shared/logger.py +4 -0
  80. {mage_ai-0.8.37.dist-info → mage_ai-0.8.39.dist-info}/METADATA +1 -1
  81. {mage_ai-0.8.37.dist-info → mage_ai-0.8.39.dist-info}/RECORD +87 -85
  82. mage_ai/server/frontend_dist/_next/static/chunks/4178-e17f37d21253b832.js +0 -1
  83. mage_ai/server/frontend_dist/_next/static/chunks/5141-2ae9eae00ec2cdfa.js +0 -1
  84. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-6a52671f1853e1a5.js +0 -1
  85. mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-9c21edae8f1b6737.js +0 -1
  86. /mage_ai/server/frontend_dist/_next/static/{23nXkA2GRjJCZDwY3kuKd → ngCg1gM6urg83y2nV5KHK}/_middlewareManifest.js +0 -0
  87. /mage_ai/server/frontend_dist/_next/static/{23nXkA2GRjJCZDwY3kuKd → ngCg1gM6urg83y2nV5KHK}/_ssgManifest.js +0 -0
  88. {mage_ai-0.8.37.dist-info → mage_ai-0.8.39.dist-info}/LICENSE +0 -0
  89. {mage_ai-0.8.37.dist-info → mage_ai-0.8.39.dist-info}/WHEEL +0 -0
  90. {mage_ai-0.8.37.dist-info → mage_ai-0.8.39.dist-info}/entry_points.txt +0 -0
  91. {mage_ai-0.8.37.dist-info → mage_ai-0.8.39.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7803],{66050:function(n,e,r){"use strict";var t;r.d(e,{V:function(){return t}}),function(n){n.CANCELLED="cancelled",n.COMPLETED="completed",n.FAILED="failed",n.INITIAL="initial",n.RUNNING="running"}(t||(t={}))},47409:function(n,e,r){"use strict";r.d(e,{D:function(){return l},V:function(){return i}});var t,o=r(82394),i=r(66050).V,l=(t={},(0,o.Z)(t,i.CANCELLED,"Cancelled"),(0,o.Z)(t,i.COMPLETED,"Done"),(0,o.Z)(t,i.FAILED,"Failed"),(0,o.Z)(t,i.INITIAL,"Ready"),(0,o.Z)(t,i.RUNNING,"Running"),t)},89745:function(n,e,r){"use strict";r.r(e),r.d(e,{default:function(){return ln}});var t=r(77837),o=r(38860),i=r.n(o),l=r(82684),c=r(2626),u=r(41788),s=r(75582),a=r(82394),d=r(93461),f=r(67971),v=r(87372),m=r(47409),p=r(86673),h=r(54283),j=r(19711),x=r(23831),b=r(10503),Z=r(9518),g=r(73942),y=r(2005),_=r(49125),I=r(31012),k=Z.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-15svh8z-0"})(["border-radius:","px;margin:","px;overflow:hidden;"," "," "," "," "," "," &:hover{"," "," "," "," ","}"],g.n_,_.cd*_.iI,(function(n){return"\n background-color: ".concat((n.theme.background||x.Z.background).panel,";\n border: 1px solid ").concat((n.theme.borders||x.Z.borders).dark,";\n\n &:hover {\n cursor: pointer;\n }\n ")}),(function(n){return n.selected&&n.danger&&"\n border-color: ".concat((n.theme.accent||x.Z.accent).negative,";\n ")}),(function(n){return n.selected&&n.primary&&"\n border-color: ".concat((n.theme.interactive||x.Z.interactive).linkPrimary,";\n ")}),(function(n){return n.selected&&n.default&&"\n border-color: ".concat((n.theme.interactive||x.Z.interactive).focusBackground,";\n ")}),(function(n){return n.selected&&n.success&&"\n border-color: ".concat((n.theme.background||x.Z.background).success,";\n ")}),(function(n){return n.selected&&n.warning&&"\n border-color: ".concat((n.theme.accent||x.Z.accent).warning,";\n ")}),(function(n){return n.danger&&"\n border-color: ".concat((n.theme.accent||x.Z.accent).negative,";\n ")}),(function(n){return n.primary&&"\n border-color: ".concat((n.theme.interactive||x.Z.interactive).linkPrimary,";\n ")}),(function(n){return n.default&&"\n border-color: ".concat((n.theme.interactive||x.Z.interactive).focusBackground,";\n ")}),(function(n){return n.success&&"\n border-color: ".concat((n.theme.background||x.Z.background).success,";\n ")}),(function(n){return n.warning&&"\n border-color: ".concat((n.theme.accent||x.Z.accent).warning,";\n ")})),P=(0,Z.css)([""," "," "," "," ",""],(function(n){return n.danger&&"\n background-color: ".concat((n.theme.accent||x.Z.accent).negative,";\n ")}),(function(n){return n.primary&&"\n background-color: ".concat((n.theme.interactive||x.Z.interactive).linkPrimary,";\n ")}),(function(n){return n.default&&"\n background-color: ".concat((n.theme.interactive||x.Z.interactive).defaultBackground,";\n ")}),(function(n){return n.success&&"\n background-color: ".concat((n.theme.background||x.Z.background).success,";\n ")}),(function(n){return n.warning&&"\n background-color: ".concat((n.theme.accent||x.Z.accent).warning,";\n ")})),N=Z.default.div.withConfig({displayName:"indexstyle__StatusStyle",componentId:"sc-15svh8z-1"})([""," ",";border-radius:","px;display:inline-block;font-family:",";padding:6px;"," "," "," "," "," ",""],P,I.iD,g.D7,y.ry,(function(n){return n.danger&&"\n color: ".concat((n.theme.content||x.Z.content).active,";\n ")}),(function(n){return n.primary&&"\n color: ".concat((n.theme.content||x.Z.content).active,";\n ")}),(function(n){return(n.default||n.success)&&"\n "}),(function(n){return n.default&&"\n color: ".concat((n.theme.content||x.Z.content).default,";\n ")}),(function(n){return n.success&&"\n color: ".concat((n.theme.content||x.Z.content).inverted,";\n ")}),(function(n){return n.warning&&"\n color: ".concat((n.theme.content||x.Z.content).inverted,";\n ")})),E=Z.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-15svh8z-2"})([""," display:flex;height:auto;width:3px;",""],P,(function(n){return n.default&&"\n background-color: ".concat((n.theme.interactive||x.Z.interactive).focusBackground,";\n ")})),O=r(90211),w=r(92083),M=r.n(w),S=r(66050),C=r(24224);function L(n){var e;return Object.keys((null===n||void 0===n||null===(e=n.metrics)||void 0===e?void 0:e.blocks)||{}).sort()}function V(n){var e,r,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=null,i=null,l=null,c=null,u={},a=(null===n||void 0===n?void 0:n.block_runs)||[],d=(null===n||void 0===n||null===(e=n.metrics)||void 0===e?void 0:e.blocks)||{},f=(null===n||void 0===n||null===(r=n.metrics)||void 0===r?void 0:r.pipeline)||{},v=A(n);return Object.entries(d).forEach((function(n){var e,r=(0,s.Z)(n,2),a=r[0],d=r[1];if(!t||t===a){var m,p=d||{},h=p.destinations,j=void 0===h?{records_affected:null,records_inserted:null,records_updated:null}:h,x=p.sources,b=void 0===x?{records:null}:x,Z=v[a]||[];if(t&&t===a&&Z.every((function(n){var e=n.status;return S.V.COMPLETED===e}))&&null===o&&(o=0),null!==f&&void 0!==f&&null!==(e=f[a])&&void 0!==e&&e.record_counts)null===o&&(o=0),o+=Number(null===f||void 0===f||null===(m=f[a])||void 0===m?void 0:m.record_counts);else null!==b&&void 0!==b&&b.records&&(null===o&&(o=0),o+=Number(b.records));null!==j&&void 0!==j&&j.records_updated?(null===l&&(l=0),l+=Number(j.records_updated),null===c&&(c=0),c+=Number(j.records_updated)):null!==j&&void 0!==j&&j.records_inserted?(null===l&&(l=0),l+=Number(j.records_inserted),null===i&&(i=0),i+=Number(j.records_inserted)):null!==j&&void 0!==j&&j.records_affected&&(null===l&&(l=0),l+=Number(j.records_affected)),["destinations","sources"].forEach((function(n){var e=d[n]||{};null!==e&&void 0!==e&&e.error&&(u[a]||(u[a]={}),u[a][n]={error:null===e||void 0===e?void 0:e.error,errors:null===e||void 0===e?void 0:e.errors,message:null===e||void 0===e?void 0:e.message})}))}})),null===a||void 0===a||a.forEach((function(n){var e=n.block_uuid,r=n.metrics,t=n.status;if(S.V.FAILED===t&&null!==r&&void 0!==r&&r.error&&e){var o=e.split(":"),i=(0,s.Z)(o,3),l=(i[0],i[1]);i[2];u[l]||(u[l]={}),u[l][""]=r.error}})),{errors:u,records:o,recordsInserted:i,recordsProcessed:l,recordsUpdated:c}}function A(n){var e=n.block_runs,r={};return null===e||void 0===e||e.forEach((function(n){var e=n.block_uuid.split(":"),t=(0,s.Z)(e,3),o=(t[0],t[1]);t[2];r[o]||(r[o]=[]),r[o].push(n)})),r}function D(n){var e=A(n),r={};return Object.entries(e).forEach((function(n){var e=(0,s.Z)(n,2),t=e[0],o=e[1],i=o.filter((function(n){var e=n.status;return S.V.COMPLETED===e})),l=i.map((function(n){var e=n.completed_at,r=n.started_at,t=M().utc(e),o=M().utc(r);return t.diff(o,"second")})),c=i.length,u=o.length;r[t]={completed:c,runtime:l.length>=1?(0,C.Sm)(l)/l.length:null,total:u}})),r}function T(n){var e=n.block_runs,r=(null===e||void 0===e?void 0:e.length)||1,t=function(n){var e=(null===n||void 0===n?void 0:n.block_runs)||[];return null===e||void 0===e?void 0:e.filter((function(n){var e=n.status;return S.V.COMPLETED===e}))}(n).length||0;return t/r}function R(n){var e=n.completed_at,r=n.block_runs,t=void 0===r?[]:r,o=n.status;if(null===t||void 0===t||!t.length)return 0;var i=M().utc();if(e)i=M().utc(e);else if([m.V.CANCELLED,m.V.FAILED].includes(o)){var l=(0,C.YC)(t,(function(n){return n.started_at}),{ascending:!1})[0];i=M().utc(l.updated_at)}var c=M().utc(n.created_at);return i.diff(c,"second")}function U(n,e){var r,t,o,i,l,c=A(n),u=D(n),s=(null===n||void 0===n?void 0:n.metrics)||{blocks:null,pipeline:null},a=s.blocks||{},d=s.pipeline||{},f=(a[e],d[e],u[e]||{completed:null,total:null}),v=f.completed,m=f.total,p=v&&m?v/m:0,h=c[e]||[],j=h.every((function(n){var e=n.status;return S.V.COMPLETED===e})),x=(0,C.YC)(h,(function(n){return n.updated_at}),{ascending:!1})[0],b=null===(r=(0,C.YC)(h,(function(n){return n.started_at}),{ascending:!0})[0])||void 0===r?void 0:r.started_at;j?t=null===(l=(0,C.YC)(h,(function(n){return n.completed_at}),{ascending:!1})[0])||void 0===l?void 0:l.completed_at:x&&(i=null===x||void 0===x?void 0:x.updated_at);var Z=j?M().utc(t||i):M().utc(),g=M().utc(b);return{completed:v,completedAt:t,done:j,progress:p,runtime:o=Z.diff(g,"second"),startedAt:b,status:null===x||void 0===x?void 0:x.status,timeText:(0,O.zf)(o),total:m,updatedAt:i}}var F=r(28598);function G(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function z(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?G(Object(r),!0).forEach((function(e){(0,a.Z)(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):G(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var B=function(n){var e=n.onSelect,r=n.pipelineRun,t=n.selected,o=(r.block_runs,r.created_at),i=r.status,c=(0,l.useMemo)((function(){return(null===r||void 0===r?void 0:r.metrics)||{blocks:{},destination:null,pipeline:{},source:null}}),[r]),u=((0,l.useMemo)((function(){return c.blocks||{}}),[c]),(0,l.useMemo)((function(){return c.pipeline||{}}),[c])),a=c.destination,Z=c.source,g=(0,l.useMemo)((function(){return Object.keys(u).length}),[u]),y=(0,l.useMemo)((function(){return V(r)}),[r]),I=y.errors,P=y.records,w=y.recordsProcessed,M=(0,l.useMemo)((function(){return T(r)}),[r]),S=(0,l.useMemo)((function(){return[m.V.COMPLETED].includes(i)}),[i]),C=(0,l.useMemo)((function(){return{danger:m.V.FAILED===i,default:m.V.INITIAL===i,primary:m.V.RUNNING===i,success:S,warning:m.V.CANCELLED===i}}),[S,i]),L=(0,l.useMemo)((function(){if(r){var n=R(r);return(0,O.zf)(n)}}),[r]);return(0,F.jsx)(k,z(z({},C),{},{onClick:function(){return e(t?null:r.id)},selected:t,children:(0,F.jsxs)(f.Z,{fullHeight:!0,justifyContent:"space-between",children:[(0,F.jsx)(E,z({},C)),(0,F.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,F.jsxs)(p.Z,{ml:3,py:3,children:[(0,F.jsx)(v.Z,{bold:!0,level:5,monospace:!0,children:o}),(0,F.jsx)(p.Z,{fullWidth:!1,mt:2,children:(0,F.jsx)(N,z(z({},C),{},{children:(0,F.jsxs)(f.Z,{alignItems:"center",children:[S&&(0,F.jsx)(b.Jr,{inverted:!0,size:2*_.iI}),[m.V.INITIAL,m.V.RUNNING].includes(i)&&(0,F.jsx)(h.Z,{color:m.V.INITIAL!==i?x.Z.monotone.white:null,inverted:m.V.INITIAL===i,small:!0}),"\xa0",m.V.RUNNING===i&&(0,F.jsxs)(F.Fragment,{children:["\xa0",Math.round(100*M),"%"]}),![m.V.INITIAL,m.V.RUNNING].includes(i)&&m.D[i],m.V.INITIAL===i&&"Starting"]})}))}),Object.values(I).length>=1&&(0,F.jsx)(p.Z,{mt:1,children:Object.entries(I).map((function(n,e){var r=(0,s.Z)(n,2),t=r[0];r[1];return(0,F.jsxs)(j.ZP,{monospace:!0,muted:!0,small:!0,children:[t," stream failed"]},t)}))})]})}),(0,F.jsxs)(d.Z,{flex:1,children:[(0,F.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,F.jsxs)(p.Z,{ml:3,py:3,children:[(0,F.jsxs)(p.Z,{mb:1,children:[(0,F.jsx)(j.ZP,{bold:!0,muted:!0,small:!0,children:"Rows processed"}),(0,F.jsx)(j.ZP,{monospace:!0,children:w>=1?(0,O.x6)(w):"-"})]}),(0,F.jsxs)(p.Z,{mb:1,children:[(0,F.jsx)(j.ZP,{bold:!0,muted:!0,small:!0,children:"Rows remaining"}),(0,F.jsx)(j.ZP,{monospace:!0,children:P>=1&&P>=w?(0,O.x6)(P-w):"-"})]}),m.V.RUNNING!==i&&(0,F.jsxs)(p.Z,{mb:1,children:[(0,F.jsx)(j.ZP,{bold:!0,muted:!0,small:!0,children:"Runtime"}),(0,F.jsx)(j.ZP,{monospace:!0,children:L})]})]})}),(0,F.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,F.jsxs)(p.Z,{ml:3,py:3,children:[(0,F.jsxs)(p.Z,{mb:1,children:[(0,F.jsx)(j.ZP,{bold:!0,muted:!0,small:!0,children:"Source"}),(0,F.jsx)(j.ZP,{monospace:!0,children:Z||"-"})]}),(0,F.jsxs)(p.Z,{mb:1,children:[(0,F.jsx)(j.ZP,{bold:!0,muted:!0,small:!0,children:"Destination"}),(0,F.jsx)(j.ZP,{monospace:!0,children:a||"-"})]}),(0,F.jsxs)(p.Z,{mb:1,children:[(0,F.jsx)(j.ZP,{bold:!0,muted:!0,small:!0,children:"Streams"}),(0,F.jsx)(j.ZP,{monospace:!0,children:g>=1?(0,O.x6)(g):"-"})]})]})})]})]})}))},Y=r(89565),H=r.n(Y),W=r(34376),J=r(60328),X=r(10919),q=r(58180),K=Z.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-1thr560-0"})(["display:flex;flex:1;"," "," ",""],(function(n){return n.even&&n.fill&&"\n background-color: ".concat((n.theme.accent||x.Z.accent).cyan,";\n ")}),(function(n){return n.even&&!n.fill&&"\n background-color: ".concat((n.theme.accent||x.Z.accent).cyanTransparent,";\n ")}),(function(n){return"\n height: ".concat((n.small?1:2)*_.iI,"px;\n ")})),Q=r(66653);var $=function(n){var e=n.onClickRow,r=n.pipelineRun,t=n.selectedStream,o=(0,W.useRouter)(),i=(0,l.useState)(null),c=i[0],u=i[1],a=(0,l.useState)(null),d=a[0],h=a[1],x=(0,l.useMemo)((function(){return r?A(r):{}}),[r]),Z=(0,l.useMemo)((function(){return r?D(r):{}}),[r]),g=(0,l.useMemo)((function(){var n=0,e=[],r=[];if(Object.entries(Z).forEach((function(t){var o=(0,s.Z)(t,2),i=(o[0],o[1]),l=i.completed,c=i.runtime,u=i.total;null===c?r.push(i):(e.push(c),n+=c*(u-l))})),0===e.length)return null;var t=(0,C.Sm)(e)/e.length;return r.forEach((function(e){var r=e.completed,o=e.total;n+=t*(o-r)})),n}),[Z]),y=(0,l.useMemo)((function(){return t?Z[t]:null}),[Z,t]),I=(0,l.useMemo)((function(){if(t&&Z){var n=Z[t]||{},e=n.completed,o=n.total;if(o>=1)return e/o}else if(r)return T(r);return 0}),[y,r,t]),k=(0,l.useMemo)((function(){return(0,F.jsx)(f.Z,{children:(0,C.w6)(101).map((function(n,e){return(0,F.jsx)(K,{even:e%2===0,fill:I>0&&Math.round(100*I)>=e},e)}))})}),[I]),P=(0,l.useMemo)((function(){if(t){var n=x[t]||[],e=n.every((function(n){var e=n.status;return S.V.COMPLETED===e})),o=(0,C.YC)(n,(function(n){return n.updated_at}),{ascending:!1})[0],i=null===o||void 0===o?void 0:o.status,l=y||{},c=l.completed,u=l.runtime,s=l.total;if(e)return"Sync complete for ".concat(t);if([S.V.CANCELLED,S.V.FAILED].includes(i))return m.D[i];if(u&&s>=1){var a=Math.ceil(u*(s-c)/60);return"".concat((0,O._6)("minute",a,!0)," to completion")}return"Estimating time remaining for stream..."}if(m.V.COMPLETED===(null===r||void 0===r?void 0:r.status))return"Sync complete";if(r){if([m.V.CANCELLED,m.V.FAILED].includes(null===r||void 0===r?void 0:r.status))return m.D[null===r||void 0===r?void 0:r.status];if(m.V.INITIAL===(null===r||void 0===r?void 0:r.status))return"Initializing sync (this can take several minutes)";if(null===g)return"Estimating time remaining...";var d=Math.ceil(g/60);return"".concat((0,O._6)("minute",d,!0)," to completion")}return"Select a sync"}),[x,g,y,r,t]),N=(0,l.useMemo)((function(){return r&&t?U(r,t):{completed:null,completedAt:null,done:null,progress:null,runtime:null,startedAt:null,status:null,timeText:null,total:null,updatedAt:null}}),[r,t]);(0,l.useEffect)((function(){var n;if(r){var e=R(r);u(e),n=setInterval((function(){return u((function(n){return n+1}))}),1e3)}return function(){return clearInterval(n)}}),[r]),(0,l.useEffect)((function(){var n;if(r&&t&&N){var e=(null===N||void 0===N?void 0:N.runtime)||0;h(e),n=setInterval((function(){return h((function(n){return n+1}))}),1e3)}return function(){return clearInterval(n)}}),[r,t,N]);var E=(0,l.useMemo)((function(){if(r){if(t)return null===N||void 0===N?void 0:N.timeText;var n=R(r);return(0,O.zf)(n)}}),[r,t,N]),w=(0,l.useMemo)((function(){var n=Math.floor(c%86400/3600),e=Math.floor(c%3600/60),r=Math.floor(c%60/1);return[n>=10?String(n):"0".concat(n),e>=10?String(e):"0".concat(e),r>=10?String(r):"0".concat(r)].join(":")}),[c]),M=(0,l.useMemo)((function(){var n=Math.floor(d%86400/3600),e=Math.floor(d%3600/60),r=Math.floor(d%60/1);return[n>=10?String(n):"0".concat(n),e>=10?String(e):"0".concat(e),r>=10?String(r):"0".concat(r)].join(":")}),[d]),G=(0,l.useMemo)((function(){return r?V(r):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[r]),z=G.errors,B=G.records,Y=G.recordsInserted,$=G.recordsProcessed,nn=G.recordsUpdated,en=(0,l.useMemo)((function(){return r&&t?V(r,t):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[r,t]),rn=(0,l.useMemo)((function(){var n=t?null===en||void 0===en?void 0:en.records:B,e=t?null===en||void 0===en?void 0:en.recordsInserted:Y,r=t?null===en||void 0===en?void 0:en.recordsProcessed:$,o=t?null===en||void 0===en?void 0:en.recordsUpdated:nn,i=[{label:"Rows fetched",value:null===n?"-":(0,O.x6)(n)}];return null===e&&null===o?i.push({label:"Rows processed",value:null===r?"-":(0,O.x6)(r)}):null!==e?i.push({label:"Rows inserted",value:(0,O.x6)(e)}):null!==o&&i.push({label:"Rows updated",value:(0,O.x6)(o)}),i.map((function(n){var e=n.label,r=n.value;return(0,F.jsxs)("div",{children:[(0,F.jsx)(j.ZP,{bold:!0,large:!0,muted:!0,children:e}),(0,F.jsx)(j.ZP,{headline:!0,children:r})]},e)}))}),[B,en,Y,$,nn,E,w,status]),tn=(0,l.useMemo)((function(){if(!r)return(0,F.jsx)("div",{});var n=L(r);return(0,F.jsx)(q.Z,{columnFlex:[null,null,null,null,null,null],columns:[{uuid:"Stream"},{uuid:"Start"},{uuid:"End"},{uuid:"Time"},{uuid:"Progress"},{uuid:"Logs"}],isSelectedRow:function(e){return t&&t===n[e]},onClickRow:e,rows:n.map((function(n){var e=U(r,n),t=(e.completed,e.completedAt),i=e.done,l=e.progress,c=e.startedAt,u=e.status,s=e.timeText,a=(e.total,!!z[n]);return[(0,F.jsx)(j.ZP,{danger:a,default:!a,monospace:!0,children:n},"stream"),(0,F.jsx)(j.ZP,{default:!0,monospace:!0,children:c?c.split(".")[0]:"-"},"started_at"),(0,F.jsx)(j.ZP,{default:!0,monospace:!0,children:t?t.split(".")[0]:"-"},"completed_at"),(0,F.jsx)(j.ZP,{default:!0,children:[S.V.INITIAL,S.V.RUNNING].includes(u)?"-":s},"runtime"),(0,F.jsxs)("div",{children:[i&&(0,F.jsx)(b.Jr,{default:!0,size:2*_.iI}),!i&&(0,F.jsx)(f.Z,{children:(0,C.w6)(51).map((function(n,e){return(0,F.jsx)(K,{fill:l>0&&Math.round(50*l)>=e,even:e%2===0,small:!0},e)}))})]},"progress"),(0,F.jsx)(J.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(n){o.push("/pipelines/".concat(r.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(r.id)),(0,Q.j)(n)},children:(0,F.jsx)(b.B4,{default:!0,size:2*_.iI})},"logs")]})),uuid:"".concat(null===r||void 0===r?void 0:r.id,"-streams-table")})}),[z,Z,r,t]),on=(0,l.useMemo)((function(){var n,e,o,i,l,c,u,a;if(r&&t){var d=(null===r||void 0===r?void 0:r.metrics)||{blocks:null,destination:null,pipeline:null,source:null},f=null===d||void 0===d||null===(n=d.pipeline)||void 0===n||null===(e=n[t])||void 0===e||null===(o=e.bookmarks)||void 0===o?void 0:o[t],v=null===d||void 0===d||null===(i=d.blocks)||void 0===i||null===(l=i[t])||void 0===l||null===(c=l.destinations)||void 0===c||null===(u=c.state)||void 0===u||null===(a=u.bookmarks)||void 0===a?void 0:a[t];if(f||v){var m=Array.from(new Set(Object.keys(f||{}).concat(Object.keys(v||{})))).sort(),p=[];m.forEach((function(n){var e=[(0,F.jsx)(j.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:n},n)];[f,v].forEach((function(r,t){r&&e.push((0,F.jsx)(j.ZP,{monospace:!0,small:!0,children:r[n]},"".concat(n,"-").concat(t)))})),p.push(e)}));var h=[{label:function(){return""},uuid:"column"}];return[[null===d||void 0===d?void 0:d.source,"source",f],[null===d||void 0===d?void 0:d.destination,"destination",v]].forEach((function(n){var e=(0,s.Z)(n,3),r=e[0],t=e[1];e[2]&&h.push({uuid:"".concat(r," (").concat(t,")")})})),(0,F.jsx)(q.Z,{columnFlex:[null,1,1],columns:h,rows:p,uuid:"".concat(t,"-bookmark-table")})}}}),[r,t]),ln=(0,l.useMemo)((function(){var n,e,o,i,l,c;if(r&&t){var u=(null===r||void 0===r?void 0:r.metrics)||{blocks:null,destination:null,pipeline:null,source:null},a=null===u||void 0===u||null===(n=u.blocks)||void 0===n||null===(e=n[t])||void 0===e||null===(o=e.sources)||void 0===o?void 0:o.record,d=null===u||void 0===u||null===(i=u.blocks)||void 0===i||null===(l=i[t])||void 0===l||null===(c=l.destinations)||void 0===c?void 0:c.record;if(a||d){var f=Object.keys(d||a||{}).sort(),v=[];f.forEach((function(n){var e=[(0,F.jsx)(j.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:n},n)];[a,d].forEach((function(r,t){if(r){var o=r[n],i="object"===typeof o;e.push((0,F.jsxs)(j.ZP,{monospace:!0,small:!0,textOverflow:!0,whiteSpaceNormal:!0,wordBreak:!0,children:[i&&(0,F.jsx)("pre",{children:JSON.stringify(o,null,2)}),!i&&o]},"".concat(n,"-").concat(t)))}})),v.push(e)}));var m=[{label:function(){return""},uuid:"column"}];return[[null===u||void 0===u?void 0:u.source,"source",a],[null===u||void 0===u?void 0:u.destination,"destination",d]].forEach((function(n){var e=(0,s.Z)(n,3),r=e[0],t=e[1];e[2]&&m.push({uuid:"".concat(r," (").concat(t,")")})})),(0,F.jsx)(q.Z,{columnFlex:[null,1,1],columns:m,rows:v.map((function(n){return n.map((function(n){return(0,F.jsx)(j.ZP,{default:!0,monospace:!0,children:n},n)}))})),uuid:"".concat(t,"-bookmark-table")})}}}),[r,t]),cn=(0,l.useMemo)((function(){var n,e,o,i,l,c,u=null===r||void 0===r||null===(n=r.metrics)||void 0===n||null===(e=n.blocks)||void 0===e?void 0:e[t];return(null===u||void 0===u||null===(o=u.sources)||void 0===o||null===(i=o.block_tags)||void 0===i?void 0:i.destination_table)||(null===u||void 0===u||null===(l=u.destinations)||void 0===l||null===(c=l.block_tags)||void 0===c?void 0:c.destination_table)}),[r,t]);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(p.Z,{p:3,children:[t&&(0,F.jsx)(p.Z,{mb:3,children:(0,F.jsxs)(f.Z,{alignItems:"center",children:[(0,F.jsx)(X.Z,{block:!0,onClick:function(){return o.push("/pipelines/".concat(r.pipeline_uuid,"/syncs?pipeline_run_id=").concat(r.id))},preventDefault:!0,children:(0,F.jsxs)(f.Z,{alignItems:"center",children:[(0,F.jsx)(b.Xd,{default:!0,size:1.5*_.iI}),(0,F.jsx)(p.Z,{mr:1}),(0,F.jsx)(j.ZP,{default:!0,children:"Syncs"})]})}),(0,F.jsx)(p.Z,{mx:1,children:(0,F.jsx)(j.ZP,{default:!0,monospace:!0,children:"/"})}),(0,F.jsx)(j.ZP,{bold:!0,monospace:!0,children:t})]})}),(0,F.jsxs)(f.Z,{alignItems:"center",justifyContent:"space-between",children:[(0,F.jsx)(p.Z,{mr:2,my:1,children:(0,F.jsx)(v.Z,{level:5,muted:!r,children:P})}),r&&(0,F.jsx)(J.Z,{onClick:function(){return o.push("/pipelines/".concat(r.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(r.id))},small:!0,children:"Logs"})]}),(0,F.jsx)(p.Z,{mt:2,children:k}),r&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(p.Z,{mt:3,children:(0,F.jsxs)(f.Z,{justifyContent:"space-between",children:[(0,F.jsxs)("div",{children:[(0,F.jsx)(j.ZP,{bold:!0,large:!0,muted:!0,children:"Runtime"}),(0,F.jsxs)(j.ZP,{headline:!0,children:[t&&[S.V.INITIAL,S.V.RUNNING].includes(null===N||void 0===N?void 0:N.status)&&M,t&&![S.V.INITIAL,S.V.RUNNING].includes(null===N||void 0===N?void 0:N.status)&&(null===N||void 0===N?void 0:N.timeText),!t&&[m.V.INITIAL,m.V.RUNNING].includes(null===r||void 0===r?void 0:r.status)&&w,!t&&![m.V.INITIAL,m.V.RUNNING].includes(null===r||void 0===r?void 0:r.status)&&E]})]}),rn]})}),Object.values(z).length>=1&&(0,F.jsxs)(p.Z,{mt:3,children:[(0,F.jsx)(v.Z,{level:5,muted:!0,children:"Errors"}),Object.entries(z).map((function(n,e){var r=(0,s.Z)(n,2),o=r[0],i=r[1];return(!t||t===o)&&(0,F.jsx)(p.Z,{mt:e>=1?1:0,children:Object.entries(i).map((function(n){var e=(0,s.Z)(n,2),r=e[0],t=e[1],i=t.error,l=t.errors,c=t.message,u=Array.isArray(i)?i.join(" "):i;return(0,F.jsxs)("div",{children:[(0,F.jsx)(p.Z,{mb:c||(null===l||void 0===l?void 0:l.length)>=1?2:0,children:(0,F.jsxs)(j.ZP,{monospace:!0,preWrap:!0,textOverflow:!0,children:[o,!!r&&(0,F.jsxs)(j.ZP,{inline:!0,monospace:!0,muted:!0,children:["\xa0(",r,")"]}),": ",(0,F.jsx)(j.ZP,{default:!0,inline:!0,monospace:!0,children:u&&(0,F.jsx)(H(),{children:u})})]})}),(0,F.jsx)(j.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:c}),l.map((function(n){return(0,F.jsx)(j.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:n},n)}))]},"".concat(o,"-").concat(r))}))},o)}))]})]})]}),r&&!t&&(0,F.jsx)(p.Z,{my:3,children:tn}),r&&t&&(0,F.jsxs)(F.Fragment,{children:[cn&&(0,F.jsx)(p.Z,{my:3,children:(0,F.jsxs)(p.Z,{px:3,children:[(0,F.jsx)(v.Z,{level:5,children:"Table name"}),(0,F.jsx)(p.Z,{mt:1,children:(0,F.jsx)(j.ZP,{default:!0,monospace:!0,children:cn})})]})}),on&&(0,F.jsxs)(p.Z,{my:3,children:[(0,F.jsx)(p.Z,{px:3,children:(0,F.jsx)(v.Z,{level:5,children:"Bookmarks"})}),(0,F.jsx)(p.Z,{px:1,children:on})]}),ln&&(0,F.jsxs)(p.Z,{my:3,children:[(0,F.jsx)(p.Z,{px:3,children:(0,F.jsx)(v.Z,{level:5,children:"Sample row"})}),(0,F.jsx)(p.Z,{px:1,children:ln})]})]})]})},nn=r(82531),en=r(59920),rn=r(33766),tn=r(59e3);function on(n){var e=n.pipeline,r=e.uuid,t=nn.ZP.pipeline_runs.list({_limit:20,_offset:0,pipeline_uuid:r},{refreshInterval:5e3}),o=t.data,i=(t.mutate,(0,l.useMemo)((function(){return(null===o||void 0===o?void 0:o.pipeline_runs)||[]}),[o])),u=(0,tn.iV)(),s=(0,l.useState)(null),a=s[0],d=s[1],f=(0,l.useState)(null),v=f[0],m=f[1];(0,l.useEffect)((function(){null!==u&&void 0!==u&&u.pipeline_run_id?m(null===i||void 0===i?void 0:i.find((function(n){return n.id===Number(u.pipeline_run_id)}))):v&&m(null),null!==u&&void 0!==u&&u.stream?d(u.stream):a&&d(null)}),[i,u,v,a]);var p=(0,l.useCallback)((function(){var n=v?L(v):[];return(0,F.jsx)($,{onClickRow:function(e){var r=n[e];(0,rn.u7)({stream:a===r?null:r})},pipelineRun:v,selectedStream:a})}),[v,a]),h=(0,l.useMemo)((function(){var n="/pipelines/".concat(r,"/syncs");v&&(n="".concat(n,"?pipeline_run_id=").concat(v.id));var e=[{label:function(){return"Syncs"},linkProps:a?{as:n,href:"/pipelines/[pipeline]/syncs"}:null}];return a&&e.push({label:function(){return a}}),e}),[v,a]);return(0,F.jsx)(c.Z,{breadcrumbs:h,buildSidekick:p,pageName:en.M.SYNCS,pipeline:e,title:function(n){var e=n.name;return"".concat(e," syncs")},uuid:"".concat(en.M.SYNCS,"_").concat(r),children:i.map((function(n){var e=(null===v||void 0===v?void 0:v.id)===n.id;return(0,F.jsx)(B,{onSelect:function(n){return(0,rn.u7)({pipeline_run_id:n,stream:null})},pipelineRun:n,selected:e},n.id)}))})}on.getInitialProps=function(){var n=(0,t.Z)(i().mark((function n(e){var r;return i().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.query.pipeline,n.abrupt("return",{pipeline:{uuid:r}});case 2:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}();var ln=(0,u.Z)(on)},33766:function(n,e,r){"use strict";r.d(e,{g_:function(){return f},u7:function(){return d}});var t=r(75582),o=r(82394),i=r(34376),l=r.n(i),c=r(59e3),u=r(24224);function s(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function a(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){(0,o.Z)(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function d(n){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.replaceParams,i=r.pushHistory,u=o?{}:(0,c.iV)();e=window.location.pathname;var s=i?l().push:l().replace,d=a(a({},u),n);Object.entries(n).forEach((function(n){var e=(0,t.Z)(n,2),r=e[0],o=e[1];"undefined"!==typeof o&&null!==o||delete d[r]}));var f=(0,c.uM)(d);f.length>=1&&(f="?".concat(f));var v="".concat(e.split("?")[0]).concat(f);return s(l().router.pathname,v,{shallow:!0})}function f(n,e,r){var o=r.addingMultipleValues,i=r.isList,l=r.itemsPerPage,c=r.pushHistory,s=void 0!==c&&c,f=r.resetLimitParams,v=a({},n);o?Object.entries(e).forEach((function(n){var e=(0,t.Z)(n,2),r=e[0],o=e[1];if(Array.isArray(o)){var i="".concat(r,"[]");v[i]=o.map(String)}})):i?Object.entries(e).forEach((function(n){var e=(0,t.Z)(n,2),r=e[0],o=e[1],i=String(o),l="".concat(r,"[]"),c=v[l];c&&Array.isArray(c)?(c=c.map(String)).includes(i)?v[l]=(0,u.Od)(c,(function(n){return n===i})):v[l]=c.concat(i):v[l]=[i]})):v=a(a({},v),e),f&&(v._limit=l||20,v._offset=0),d(v,{pushHistory:s})}},59416:function(n,e,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/syncs",function(){return r(89745)}])}},function(n){n.O(0,[3850,2083,9565,2344,9386,6166,8180,2626,9774,2888,179],(function(){return e=59416,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7803],{66050:function(n,e,r){"use strict";var t;r.d(e,{V:function(){return t}}),function(n){n.CANCELLED="cancelled",n.COMPLETED="completed",n.FAILED="failed",n.INITIAL="initial",n.RUNNING="running"}(t||(t={}))},47409:function(n,e,r){"use strict";r.d(e,{D:function(){return l},V:function(){return i}});var t,o=r(82394),i=r(66050).V,l=(t={},(0,o.Z)(t,i.CANCELLED,"Cancelled"),(0,o.Z)(t,i.COMPLETED,"Done"),(0,o.Z)(t,i.FAILED,"Failed"),(0,o.Z)(t,i.INITIAL,"Ready"),(0,o.Z)(t,i.RUNNING,"Running"),t)},89745:function(n,e,r){"use strict";r.r(e),r.d(e,{default:function(){return ln}});var t=r(77837),o=r(38860),i=r.n(o),l=r(82684),c=r(2626),u=r(41788),s=r(75582),d=r(82394),a=r(93461),f=r(67971),v=r(87372),m=r(47409),p=r(86673),h=r(54283),j=r(19711),x=r(23831),b=r(10503),Z=r(9518),g=r(73942),y=r(2005),_=r(49125),I=r(31012),k=Z.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-15svh8z-0"})(["border-radius:","px;margin:","px;overflow:hidden;"," "," "," "," "," "," &:hover{"," "," "," "," ","}"],g.n_,_.cd*_.iI,(function(n){return"\n background-color: ".concat((n.theme.background||x.Z.background).panel,";\n border: 1px solid ").concat((n.theme.borders||x.Z.borders).dark,";\n\n &:hover {\n cursor: pointer;\n }\n ")}),(function(n){return n.selected&&n.danger&&"\n border-color: ".concat((n.theme.accent||x.Z.accent).negative,";\n ")}),(function(n){return n.selected&&n.primary&&"\n border-color: ".concat((n.theme.interactive||x.Z.interactive).linkPrimary,";\n ")}),(function(n){return n.selected&&n.default&&"\n border-color: ".concat((n.theme.interactive||x.Z.interactive).focusBackground,";\n ")}),(function(n){return n.selected&&n.success&&"\n border-color: ".concat((n.theme.background||x.Z.background).success,";\n ")}),(function(n){return n.selected&&n.warning&&"\n border-color: ".concat((n.theme.accent||x.Z.accent).warning,";\n ")}),(function(n){return n.danger&&"\n border-color: ".concat((n.theme.accent||x.Z.accent).negative,";\n ")}),(function(n){return n.primary&&"\n border-color: ".concat((n.theme.interactive||x.Z.interactive).linkPrimary,";\n ")}),(function(n){return n.default&&"\n border-color: ".concat((n.theme.interactive||x.Z.interactive).focusBackground,";\n ")}),(function(n){return n.success&&"\n border-color: ".concat((n.theme.background||x.Z.background).success,";\n ")}),(function(n){return n.warning&&"\n border-color: ".concat((n.theme.accent||x.Z.accent).warning,";\n ")})),P=(0,Z.css)([""," "," "," "," ",""],(function(n){return n.danger&&"\n background-color: ".concat((n.theme.accent||x.Z.accent).negative,";\n ")}),(function(n){return n.primary&&"\n background-color: ".concat((n.theme.interactive||x.Z.interactive).linkPrimary,";\n ")}),(function(n){return n.default&&"\n background-color: ".concat((n.theme.interactive||x.Z.interactive).defaultBackground,";\n ")}),(function(n){return n.success&&"\n background-color: ".concat((n.theme.background||x.Z.background).success,";\n ")}),(function(n){return n.warning&&"\n background-color: ".concat((n.theme.accent||x.Z.accent).warning,";\n ")})),N=Z.default.div.withConfig({displayName:"indexstyle__StatusStyle",componentId:"sc-15svh8z-1"})([""," ",";border-radius:","px;display:inline-block;font-family:",";padding:6px;"," "," "," "," "," ",""],P,I.iD,g.D7,y.ry,(function(n){return n.danger&&"\n color: ".concat((n.theme.content||x.Z.content).active,";\n ")}),(function(n){return n.primary&&"\n color: ".concat((n.theme.content||x.Z.content).active,";\n ")}),(function(n){return(n.default||n.success)&&"\n "}),(function(n){return n.default&&"\n color: ".concat((n.theme.content||x.Z.content).default,";\n ")}),(function(n){return n.success&&"\n color: ".concat((n.theme.content||x.Z.content).inverted,";\n ")}),(function(n){return n.warning&&"\n color: ".concat((n.theme.content||x.Z.content).inverted,";\n ")})),E=Z.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-15svh8z-2"})([""," display:flex;height:auto;width:3px;",""],P,(function(n){return n.default&&"\n background-color: ".concat((n.theme.interactive||x.Z.interactive).focusBackground,";\n ")})),O=r(90211),w=r(92083),M=r.n(w),S=r(66050),C=r(24224);function L(n){var e;return Object.keys((null===n||void 0===n||null===(e=n.metrics)||void 0===e?void 0:e.blocks)||{}).sort()}function V(n){var e,r,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=null,i=null,l=null,c=null,u={},d=(null===n||void 0===n?void 0:n.block_runs)||[],a=(null===n||void 0===n||null===(e=n.metrics)||void 0===e?void 0:e.blocks)||{},f=(null===n||void 0===n||null===(r=n.metrics)||void 0===r?void 0:r.pipeline)||{},v=A(n);return Object.entries(a).forEach((function(n){var e,r=(0,s.Z)(n,2),d=r[0],a=r[1];if(!t||t===d){var m,p=a||{},h=p.destinations,j=void 0===h?{records_affected:null,records_inserted:null,records_updated:null}:h,x=p.sources,b=void 0===x?{records:null}:x,Z=v[d]||[];if(t&&t===d&&Z.every((function(n){var e=n.status;return S.V.COMPLETED===e}))&&null===o&&(o=0),null!==f&&void 0!==f&&null!==(e=f[d])&&void 0!==e&&e.record_counts)null===o&&(o=0),o+=Number(null===f||void 0===f||null===(m=f[d])||void 0===m?void 0:m.record_counts);else null!==b&&void 0!==b&&b.records&&(null===o&&(o=0),o+=Number(b.records));null!==j&&void 0!==j&&j.records_updated?(null===l&&(l=0),l+=Number(j.records_updated),null===c&&(c=0),c+=Number(j.records_updated)):null!==j&&void 0!==j&&j.records_inserted?(null===l&&(l=0),l+=Number(j.records_inserted),null===i&&(i=0),i+=Number(j.records_inserted)):null!==j&&void 0!==j&&j.records_affected&&(null===l&&(l=0),l+=Number(j.records_affected)),["destinations","sources"].forEach((function(n){var e=a[n]||{};null!==e&&void 0!==e&&e.error&&(u[d]||(u[d]={}),u[d][n]={error:null===e||void 0===e?void 0:e.error,errors:null===e||void 0===e?void 0:e.errors,message:null===e||void 0===e?void 0:e.message})}))}})),null===d||void 0===d||d.forEach((function(n){var e=n.block_uuid,r=n.metrics,t=n.status;if(S.V.FAILED===t&&null!==r&&void 0!==r&&r.error&&e){var o=e.split(":"),i=(0,s.Z)(o,3),l=(i[0],i[1]);i[2];u[l]||(u[l]={}),u[l][""]=r.error}})),{errors:u,records:o,recordsInserted:i,recordsProcessed:l,recordsUpdated:c}}function A(n){var e=n.block_runs,r={};return null===e||void 0===e||e.forEach((function(n){var e=n.block_uuid.split(":"),t=(0,s.Z)(e,3),o=(t[0],t[1]);t[2];r[o]||(r[o]=[]),r[o].push(n)})),r}function D(n){var e=A(n),r={};return Object.entries(e).forEach((function(n){var e=(0,s.Z)(n,2),t=e[0],o=e[1],i=o.filter((function(n){var e=n.status;return S.V.COMPLETED===e})),l=i.map((function(n){var e=n.completed_at,r=n.started_at,t=M().utc(e),o=M().utc(r);return t.diff(o,"second")})),c=i.length,u=o.length;r[t]={completed:c,runtime:l.length>=1?(0,C.Sm)(l)/l.length:null,total:u}})),r}function T(n){var e=n.block_runs,r=(null===e||void 0===e?void 0:e.length)||1,t=function(n){var e=(null===n||void 0===n?void 0:n.block_runs)||[];return null===e||void 0===e?void 0:e.filter((function(n){var e=n.status;return S.V.COMPLETED===e}))}(n).length||0;return t/r}function R(n){var e=n.completed_at,r=n.block_runs,t=void 0===r?[]:r,o=n.status;if(null===t||void 0===t||!t.length)return 0;var i=M().utc();if(e)i=M().utc(e);else if([m.V.CANCELLED,m.V.FAILED].includes(o)){var l=(0,C.YC)(t,(function(n){return n.started_at}),{ascending:!1})[0];i=M().utc(l.updated_at)}var c=M().utc(n.created_at);return i.diff(c,"second")}function U(n,e){var r,t,o,i,l,c=A(n),u=D(n),s=(null===n||void 0===n?void 0:n.metrics)||{blocks:null,pipeline:null},d=s.blocks||{},a=s.pipeline||{},f=(d[e],a[e],u[e]||{completed:null,total:null}),v=f.completed,m=f.total,p=v&&m?v/m:0,h=c[e]||[],j=h.every((function(n){var e=n.status;return S.V.COMPLETED===e})),x=(0,C.YC)(h,(function(n){return n.updated_at}),{ascending:!1})[0],b=null===(r=(0,C.YC)(h,(function(n){return n.started_at}),{ascending:!0})[0])||void 0===r?void 0:r.started_at;j?t=null===(l=(0,C.YC)(h,(function(n){return n.completed_at}),{ascending:!1})[0])||void 0===l?void 0:l.completed_at:x&&(i=null===x||void 0===x?void 0:x.updated_at);var Z=j?M().utc(t||i):M().utc(),g=M().utc(b);return{completed:v,completedAt:t,done:j,progress:p,runtime:o=Z.diff(g,"second"),startedAt:b,status:null===x||void 0===x?void 0:x.status,timeText:(0,O.zf)(o),total:m,updatedAt:i}}var F=r(28598);function G(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function z(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?G(Object(r),!0).forEach((function(e){(0,d.Z)(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):G(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var B=function(n){var e=n.onSelect,r=n.pipelineRun,t=n.selected,o=(r.block_runs,r.created_at),i=r.status,c=(0,l.useMemo)((function(){return(null===r||void 0===r?void 0:r.metrics)||{blocks:{},destination:null,pipeline:{},source:null}}),[r]),u=((0,l.useMemo)((function(){return c.blocks||{}}),[c]),(0,l.useMemo)((function(){return c.pipeline||{}}),[c])),d=c.destination,Z=c.source,g=(0,l.useMemo)((function(){return Object.keys(u).length}),[u]),y=(0,l.useMemo)((function(){return V(r)}),[r]),I=y.errors,P=y.records,w=y.recordsProcessed,M=(0,l.useMemo)((function(){return T(r)}),[r]),S=(0,l.useMemo)((function(){return[m.V.COMPLETED].includes(i)}),[i]),C=(0,l.useMemo)((function(){return{danger:m.V.FAILED===i,default:m.V.INITIAL===i,primary:m.V.RUNNING===i,success:S,warning:m.V.CANCELLED===i}}),[S,i]),L=(0,l.useMemo)((function(){if(r){var n=R(r);return(0,O.zf)(n)}}),[r]);return(0,F.jsx)(k,z(z({},C),{},{onClick:function(){return e(t?null:r.id)},selected:t,children:(0,F.jsxs)(f.Z,{fullHeight:!0,justifyContent:"space-between",children:[(0,F.jsx)(E,z({},C)),(0,F.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,F.jsxs)(p.Z,{ml:3,py:3,children:[(0,F.jsx)(v.Z,{bold:!0,level:5,monospace:!0,children:o}),(0,F.jsx)(p.Z,{fullWidth:!1,mt:2,children:(0,F.jsx)(N,z(z({},C),{},{children:(0,F.jsxs)(f.Z,{alignItems:"center",children:[S&&(0,F.jsx)(b.Jr,{inverted:!0,size:2*_.iI}),[m.V.INITIAL,m.V.RUNNING].includes(i)&&(0,F.jsx)(h.Z,{color:m.V.INITIAL!==i?x.Z.monotone.white:null,inverted:m.V.INITIAL===i,small:!0}),"\xa0",m.V.RUNNING===i&&(0,F.jsxs)(F.Fragment,{children:["\xa0",Math.round(100*M),"%"]}),![m.V.INITIAL,m.V.RUNNING].includes(i)&&m.D[i],m.V.INITIAL===i&&"Starting"]})}))}),Object.values(I).length>=1&&(0,F.jsx)(p.Z,{mt:1,children:Object.entries(I).map((function(n,e){var r=(0,s.Z)(n,2),t=r[0];r[1];return(0,F.jsxs)(j.ZP,{monospace:!0,muted:!0,small:!0,children:[t," stream failed"]},t)}))})]})}),(0,F.jsxs)(a.Z,{flex:1,children:[(0,F.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,F.jsxs)(p.Z,{ml:3,py:3,children:[(0,F.jsxs)(p.Z,{mb:1,children:[(0,F.jsx)(j.ZP,{bold:!0,muted:!0,small:!0,children:"Rows processed"}),(0,F.jsx)(j.ZP,{monospace:!0,children:w>=1?(0,O.x6)(w):"-"})]}),(0,F.jsxs)(p.Z,{mb:1,children:[(0,F.jsx)(j.ZP,{bold:!0,muted:!0,small:!0,children:"Rows remaining"}),(0,F.jsx)(j.ZP,{monospace:!0,children:P>=1&&P>=w?(0,O.x6)(P-w):"-"})]}),m.V.RUNNING!==i&&(0,F.jsxs)(p.Z,{mb:1,children:[(0,F.jsx)(j.ZP,{bold:!0,muted:!0,small:!0,children:"Runtime"}),(0,F.jsx)(j.ZP,{monospace:!0,children:L})]})]})}),(0,F.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,F.jsxs)(p.Z,{ml:3,py:3,children:[(0,F.jsxs)(p.Z,{mb:1,children:[(0,F.jsx)(j.ZP,{bold:!0,muted:!0,small:!0,children:"Source"}),(0,F.jsx)(j.ZP,{monospace:!0,children:Z||"-"})]}),(0,F.jsxs)(p.Z,{mb:1,children:[(0,F.jsx)(j.ZP,{bold:!0,muted:!0,small:!0,children:"Destination"}),(0,F.jsx)(j.ZP,{monospace:!0,children:d||"-"})]}),(0,F.jsxs)(p.Z,{mb:1,children:[(0,F.jsx)(j.ZP,{bold:!0,muted:!0,small:!0,children:"Streams"}),(0,F.jsx)(j.ZP,{monospace:!0,children:g>=1?(0,O.x6)(g):"-"})]})]})})]})]})}))},Y=r(89565),H=r.n(Y),W=r(34376),J=r(60328),X=r(10919),q=r(58180),K=Z.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-1thr560-0"})(["display:flex;flex:1;"," "," ",""],(function(n){return n.even&&n.fill&&"\n background-color: ".concat((n.theme.accent||x.Z.accent).cyan,";\n ")}),(function(n){return n.even&&!n.fill&&"\n background-color: ".concat((n.theme.accent||x.Z.accent).cyanTransparent,";\n ")}),(function(n){return"\n height: ".concat((n.small?1:2)*_.iI,"px;\n ")})),Q=r(66653);var $=function(n){var e=n.onClickRow,r=n.pipelineRun,t=n.selectedStream,o=(0,W.useRouter)(),i=(0,l.useState)(null),c=i[0],u=i[1],d=(0,l.useState)(null),a=d[0],h=d[1],x=(0,l.useMemo)((function(){return r?A(r):{}}),[r]),Z=(0,l.useMemo)((function(){return r?D(r):{}}),[r]),g=(0,l.useMemo)((function(){var n=0,e=[],r=[];if(Object.entries(Z).forEach((function(t){var o=(0,s.Z)(t,2),i=(o[0],o[1]),l=i.completed,c=i.runtime,u=i.total;null===c?r.push(i):(e.push(c),n+=c*(u-l))})),0===e.length)return null;var t=(0,C.Sm)(e)/e.length;return r.forEach((function(e){var r=e.completed,o=e.total;n+=t*(o-r)})),n}),[Z]),y=(0,l.useMemo)((function(){return t?Z[t]:null}),[Z,t]),I=(0,l.useMemo)((function(){if(t&&Z){var n=Z[t]||{},e=n.completed,o=n.total;if(o>=1)return e/o}else if(r)return T(r);return 0}),[y,r,t]),k=(0,l.useMemo)((function(){return(0,F.jsx)(f.Z,{children:(0,C.w6)(101).map((function(n,e){return(0,F.jsx)(K,{even:e%2===0,fill:I>0&&Math.round(100*I)>=e},e)}))})}),[I]),P=(0,l.useMemo)((function(){if(t){var n=x[t]||[],e=n.every((function(n){var e=n.status;return S.V.COMPLETED===e})),o=(0,C.YC)(n,(function(n){return n.updated_at}),{ascending:!1})[0],i=null===o||void 0===o?void 0:o.status,l=y||{},c=l.completed,u=l.runtime,s=l.total;if(e)return"Sync complete for ".concat(t);if([S.V.CANCELLED,S.V.FAILED].includes(i))return m.D[i];if(u&&s>=1){var d=Math.ceil(u*(s-c)/60);return"".concat((0,O._6)("minute",d,!0)," to completion")}return"Estimating time remaining for stream..."}if(m.V.COMPLETED===(null===r||void 0===r?void 0:r.status))return"Sync complete";if(r){if([m.V.CANCELLED,m.V.FAILED].includes(null===r||void 0===r?void 0:r.status))return m.D[null===r||void 0===r?void 0:r.status];if(m.V.INITIAL===(null===r||void 0===r?void 0:r.status))return"Initializing sync (this can take several minutes)";if(null===g)return"Estimating time remaining...";var a=Math.ceil(g/60);return"".concat((0,O._6)("minute",a,!0)," to completion")}return"Select a sync"}),[x,g,y,r,t]),N=(0,l.useMemo)((function(){return r&&t?U(r,t):{completed:null,completedAt:null,done:null,progress:null,runtime:null,startedAt:null,status:null,timeText:null,total:null,updatedAt:null}}),[r,t]);(0,l.useEffect)((function(){var n;if(r){var e=R(r);u(e),n=setInterval((function(){return u((function(n){return n+1}))}),1e3)}return function(){return clearInterval(n)}}),[r]),(0,l.useEffect)((function(){var n;if(r&&t&&N){var e=(null===N||void 0===N?void 0:N.runtime)||0;h(e),n=setInterval((function(){return h((function(n){return n+1}))}),1e3)}return function(){return clearInterval(n)}}),[r,t,N]);var E=(0,l.useMemo)((function(){if(r){if(t)return null===N||void 0===N?void 0:N.timeText;var n=R(r);return(0,O.zf)(n)}}),[r,t,N]),w=(0,l.useMemo)((function(){var n=Math.floor(c%86400/3600),e=Math.floor(c%3600/60),r=Math.floor(c%60/1);return[n>=10?String(n):"0".concat(n),e>=10?String(e):"0".concat(e),r>=10?String(r):"0".concat(r)].join(":")}),[c]),M=(0,l.useMemo)((function(){var n=Math.floor(a%86400/3600),e=Math.floor(a%3600/60),r=Math.floor(a%60/1);return[n>=10?String(n):"0".concat(n),e>=10?String(e):"0".concat(e),r>=10?String(r):"0".concat(r)].join(":")}),[a]),G=(0,l.useMemo)((function(){return r?V(r):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[r]),z=G.errors,B=G.records,Y=G.recordsInserted,$=G.recordsProcessed,nn=G.recordsUpdated,en=(0,l.useMemo)((function(){return r&&t?V(r,t):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[r,t]),rn=(0,l.useMemo)((function(){var n=t?null===en||void 0===en?void 0:en.records:B,e=t?null===en||void 0===en?void 0:en.recordsInserted:Y,r=t?null===en||void 0===en?void 0:en.recordsProcessed:$,o=t?null===en||void 0===en?void 0:en.recordsUpdated:nn,i=[{label:"Rows fetched",value:null===n?"-":(0,O.x6)(n)}];return null===e&&null===o?i.push({label:"Rows processed",value:null===r?"-":(0,O.x6)(r)}):null!==e?i.push({label:"Rows inserted",value:(0,O.x6)(e)}):null!==o&&i.push({label:"Rows updated",value:(0,O.x6)(o)}),i.map((function(n){var e=n.label,r=n.value;return(0,F.jsxs)("div",{children:[(0,F.jsx)(j.ZP,{bold:!0,large:!0,muted:!0,children:e}),(0,F.jsx)(j.ZP,{headline:!0,children:r})]},e)}))}),[B,en,Y,$,nn,E,w,status]),tn=(0,l.useMemo)((function(){if(!r)return(0,F.jsx)("div",{});var n=L(r);return(0,F.jsx)(q.Z,{columnFlex:[null,null,null,null,null,null],columns:[{uuid:"Stream"},{uuid:"Start"},{uuid:"End"},{uuid:"Time"},{uuid:"Progress"},{uuid:"Logs"}],isSelectedRow:function(e){return t&&t===n[e]},onClickRow:e,rows:n.map((function(n){var e=U(r,n),t=(e.completed,e.completedAt),i=e.done,l=e.progress,c=e.startedAt,u=e.status,s=e.timeText,d=(e.total,!!z[n]);return[(0,F.jsx)(j.ZP,{danger:d,default:!d,monospace:!0,children:n},"stream"),(0,F.jsx)(j.ZP,{default:!0,monospace:!0,children:c?c.split(".")[0]:"-"},"started_at"),(0,F.jsx)(j.ZP,{default:!0,monospace:!0,children:t?t.split(".")[0]:"-"},"completed_at"),(0,F.jsx)(j.ZP,{default:!0,children:[S.V.INITIAL,S.V.RUNNING].includes(u)?"-":s},"runtime"),(0,F.jsxs)("div",{children:[i&&(0,F.jsx)(b.Jr,{default:!0,size:2*_.iI}),!i&&(0,F.jsx)(f.Z,{children:(0,C.w6)(51).map((function(n,e){return(0,F.jsx)(K,{fill:l>0&&Math.round(50*l)>=e,even:e%2===0,small:!0},e)}))})]},"progress"),(0,F.jsx)(J.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(n){o.push("/pipelines/".concat(r.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(r.id)),(0,Q.j)(n)},children:(0,F.jsx)(b.B4,{default:!0,size:2*_.iI})},"logs")]})),uuid:"".concat(null===r||void 0===r?void 0:r.id,"-streams-table")})}),[z,Z,r,t]),on=(0,l.useMemo)((function(){var n,e,o,i,l,c,u,d;if(r&&t){var a=(null===r||void 0===r?void 0:r.metrics)||{blocks:null,destination:null,pipeline:null,source:null},f=null===a||void 0===a||null===(n=a.pipeline)||void 0===n||null===(e=n[t])||void 0===e||null===(o=e.bookmarks)||void 0===o?void 0:o[t],v=null===a||void 0===a||null===(i=a.blocks)||void 0===i||null===(l=i[t])||void 0===l||null===(c=l.destinations)||void 0===c||null===(u=c.state)||void 0===u||null===(d=u.bookmarks)||void 0===d?void 0:d[t];if(f||v){var m=Array.from(new Set(Object.keys(f||{}).concat(Object.keys(v||{})))).sort(),p=[];m.forEach((function(n){var e=[(0,F.jsx)(j.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:n},n)];[f,v].forEach((function(r,t){r&&e.push((0,F.jsx)(j.ZP,{monospace:!0,small:!0,children:r[n]},"".concat(n,"-").concat(t)))})),p.push(e)}));var h=[{label:function(){return""},uuid:"column"}];return[[null===a||void 0===a?void 0:a.source,"source",f],[null===a||void 0===a?void 0:a.destination,"destination",v]].forEach((function(n){var e=(0,s.Z)(n,3),r=e[0],t=e[1];e[2]&&h.push({uuid:"".concat(r," (").concat(t,")")})})),(0,F.jsx)(q.Z,{columnFlex:[null,1,1],columns:h,rows:p,uuid:"".concat(t,"-bookmark-table")})}}}),[r,t]),ln=(0,l.useMemo)((function(){var n,e,o,i,l,c;if(r&&t){var u=(null===r||void 0===r?void 0:r.metrics)||{blocks:null,destination:null,pipeline:null,source:null},d=null===u||void 0===u||null===(n=u.blocks)||void 0===n||null===(e=n[t])||void 0===e||null===(o=e.sources)||void 0===o?void 0:o.record,a=null===u||void 0===u||null===(i=u.blocks)||void 0===i||null===(l=i[t])||void 0===l||null===(c=l.destinations)||void 0===c?void 0:c.record;if(d||a){var f=Object.keys(a||d||{}).sort(),v=[];f.forEach((function(n){var e=[(0,F.jsx)(j.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:n},n)];[d,a].forEach((function(r,t){if(r){var o=r[n],i="object"===typeof o;e.push((0,F.jsxs)(j.ZP,{monospace:!0,small:!0,textOverflow:!0,whiteSpaceNormal:!0,wordBreak:!0,children:[i&&(0,F.jsx)("pre",{children:JSON.stringify(o,null,2)}),!i&&o]},"".concat(n,"-").concat(t)))}})),v.push(e)}));var m=[{label:function(){return""},uuid:"column"}];return[[null===u||void 0===u?void 0:u.source,"source",d],[null===u||void 0===u?void 0:u.destination,"destination",a]].forEach((function(n){var e=(0,s.Z)(n,3),r=e[0],t=e[1];e[2]&&m.push({uuid:"".concat(r," (").concat(t,")")})})),(0,F.jsx)(q.Z,{columnFlex:[null,1,1],columns:m,rows:v.map((function(n){return n.map((function(n){return(0,F.jsx)(j.ZP,{default:!0,monospace:!0,children:n},n)}))})),uuid:"".concat(t,"-bookmark-table")})}}}),[r,t]),cn=(0,l.useMemo)((function(){var n,e,o,i,l,c,u=null===r||void 0===r||null===(n=r.metrics)||void 0===n||null===(e=n.blocks)||void 0===e?void 0:e[t];return(null===u||void 0===u||null===(o=u.sources)||void 0===o||null===(i=o.block_tags)||void 0===i?void 0:i.destination_table)||(null===u||void 0===u||null===(l=u.destinations)||void 0===l||null===(c=l.block_tags)||void 0===c?void 0:c.destination_table)}),[r,t]);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(p.Z,{p:3,children:[t&&(0,F.jsx)(p.Z,{mb:3,children:(0,F.jsxs)(f.Z,{alignItems:"center",children:[(0,F.jsx)(X.Z,{block:!0,onClick:function(){return o.push("/pipelines/".concat(r.pipeline_uuid,"/syncs?pipeline_run_id=").concat(r.id))},preventDefault:!0,children:(0,F.jsxs)(f.Z,{alignItems:"center",children:[(0,F.jsx)(b.Xd,{default:!0,size:1.5*_.iI}),(0,F.jsx)(p.Z,{mr:1}),(0,F.jsx)(j.ZP,{default:!0,children:"Syncs"})]})}),(0,F.jsx)(p.Z,{mx:1,children:(0,F.jsx)(j.ZP,{default:!0,monospace:!0,children:"/"})}),(0,F.jsx)(j.ZP,{bold:!0,monospace:!0,children:t})]})}),(0,F.jsxs)(f.Z,{alignItems:"center",justifyContent:"space-between",children:[(0,F.jsx)(p.Z,{mr:2,my:1,children:(0,F.jsx)(v.Z,{level:5,muted:!r,children:P})}),r&&(0,F.jsx)(J.Z,{onClick:function(){return o.push("/pipelines/".concat(r.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(r.id))},small:!0,children:"Logs"})]}),(0,F.jsx)(p.Z,{mt:2,children:k}),r&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(p.Z,{mt:3,children:(0,F.jsxs)(f.Z,{justifyContent:"space-between",children:[(0,F.jsxs)("div",{children:[(0,F.jsx)(j.ZP,{bold:!0,large:!0,muted:!0,children:"Runtime"}),(0,F.jsxs)(j.ZP,{headline:!0,children:[t&&[S.V.INITIAL,S.V.RUNNING].includes(null===N||void 0===N?void 0:N.status)&&M,t&&![S.V.INITIAL,S.V.RUNNING].includes(null===N||void 0===N?void 0:N.status)&&(null===N||void 0===N?void 0:N.timeText),!t&&[m.V.INITIAL,m.V.RUNNING].includes(null===r||void 0===r?void 0:r.status)&&w,!t&&![m.V.INITIAL,m.V.RUNNING].includes(null===r||void 0===r?void 0:r.status)&&E]})]}),rn]})}),Object.values(z).length>=1&&(0,F.jsxs)(p.Z,{mt:3,children:[(0,F.jsx)(v.Z,{level:5,muted:!0,children:"Errors"}),Object.entries(z).map((function(n,e){var r=(0,s.Z)(n,2),o=r[0],i=r[1];return(!t||t===o)&&(0,F.jsx)(p.Z,{mt:e>=1?1:0,children:Object.entries(i).map((function(n){var e=(0,s.Z)(n,2),r=e[0],t=e[1],i=t.error,l=t.errors,c=t.message,u=Array.isArray(i)?i.join(" "):i;return(0,F.jsxs)("div",{children:[(0,F.jsx)(p.Z,{mb:c||(null===l||void 0===l?void 0:l.length)>=1?2:0,children:(0,F.jsxs)(j.ZP,{monospace:!0,preWrap:!0,textOverflow:!0,children:[o,!!r&&(0,F.jsxs)(j.ZP,{inline:!0,monospace:!0,muted:!0,children:["\xa0(",r,")"]}),": ",(0,F.jsx)(j.ZP,{default:!0,inline:!0,monospace:!0,children:u&&(0,F.jsx)(H(),{children:u})})]})}),(0,F.jsx)(j.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:c}),l.map((function(n){return(0,F.jsx)(j.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:n},n)}))]},"".concat(o,"-").concat(r))}))},o)}))]})]})]}),r&&!t&&(0,F.jsx)(p.Z,{my:3,children:tn}),r&&t&&(0,F.jsxs)(F.Fragment,{children:[cn&&(0,F.jsx)(p.Z,{my:3,children:(0,F.jsxs)(p.Z,{px:3,children:[(0,F.jsx)(v.Z,{level:5,children:"Table name"}),(0,F.jsx)(p.Z,{mt:1,children:(0,F.jsx)(j.ZP,{default:!0,monospace:!0,children:cn})})]})}),on&&(0,F.jsxs)(p.Z,{my:3,children:[(0,F.jsx)(p.Z,{px:3,children:(0,F.jsx)(v.Z,{level:5,children:"Bookmarks"})}),(0,F.jsx)(p.Z,{px:1,children:on})]}),ln&&(0,F.jsxs)(p.Z,{my:3,children:[(0,F.jsx)(p.Z,{px:3,children:(0,F.jsx)(v.Z,{level:5,children:"Sample row"})}),(0,F.jsx)(p.Z,{px:1,children:ln})]})]})]})},nn=r(82531),en=r(59920),rn=r(33766),tn=r(59e3);function on(n){var e=n.pipeline,r=e.uuid,t=nn.ZP.pipeline_runs.list({_limit:20,_offset:0,pipeline_uuid:r},{refreshInterval:5e3}).data,o=(0,l.useMemo)((function(){return(null===t||void 0===t?void 0:t.pipeline_runs)||[]}),[t]),i=(0,tn.iV)(),u=(0,l.useState)(null),s=u[0],d=u[1],a=(0,l.useState)(null),f=a[0],v=a[1];(0,l.useEffect)((function(){null!==i&&void 0!==i&&i.pipeline_run_id?v(null===o||void 0===o?void 0:o.find((function(n){return n.id===Number(i.pipeline_run_id)}))):f&&v(null),null!==i&&void 0!==i&&i.stream?d(i.stream):s&&d(null)}),[o,i,f,s]);var m=(0,l.useCallback)((function(){var n=f?L(f):[];return(0,F.jsx)($,{onClickRow:function(e){var r=n[e];(0,rn.u7)({stream:s===r?null:r})},pipelineRun:f,selectedStream:s})}),[f,s]),p=(0,l.useMemo)((function(){var n="/pipelines/".concat(r,"/syncs");f&&(n="".concat(n,"?pipeline_run_id=").concat(f.id));var e=[{label:function(){return"Syncs"},linkProps:s?{as:n,href:"/pipelines/[pipeline]/syncs"}:null}];return s&&e.push({label:function(){return s}}),e}),[r,f,s]);return(0,F.jsx)(c.Z,{breadcrumbs:p,buildSidekick:m,pageName:en.M.SYNCS,pipeline:e,title:function(n){var e=n.name;return"".concat(e," syncs")},uuid:"".concat(en.M.SYNCS,"_").concat(r),children:o.map((function(n){var e=(null===f||void 0===f?void 0:f.id)===n.id;return(0,F.jsx)(B,{onSelect:function(n){return(0,rn.u7)({pipeline_run_id:n,stream:null})},pipelineRun:n,selected:e},n.id)}))})}on.getInitialProps=function(){var n=(0,t.Z)(i().mark((function n(e){var r;return i().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.query.pipeline,n.abrupt("return",{pipeline:{uuid:r}});case 2:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}();var ln=(0,u.Z)(on)},33766:function(n,e,r){"use strict";r.d(e,{g_:function(){return f},u7:function(){return a}});var t=r(75582),o=r(82394),i=r(34376),l=r.n(i),c=r(59e3),u=r(24224);function s(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function d(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){(0,o.Z)(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function a(n){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.replaceParams,i=r.pushHistory,u=o?{}:(0,c.iV)();e=window.location.pathname;var s=i?l().push:l().replace,a=d(d({},u),n);Object.entries(n).forEach((function(n){var e=(0,t.Z)(n,2),r=e[0],o=e[1];"undefined"!==typeof o&&null!==o||delete a[r]}));var f=(0,c.uM)(a);f.length>=1&&(f="?".concat(f));var v="".concat(e.split("?")[0]).concat(f);return s(l().router.pathname,v,{shallow:!0})}function f(n,e,r){var o=r.addingMultipleValues,i=r.isList,l=r.itemsPerPage,c=r.pushHistory,s=void 0!==c&&c,f=r.resetLimitParams,v=d({},n);o?Object.entries(e).forEach((function(n){var e=(0,t.Z)(n,2),r=e[0],o=e[1];if(Array.isArray(o)){var i="".concat(r,"[]");v[i]=o.map(String)}})):i?Object.entries(e).forEach((function(n){var e=(0,t.Z)(n,2),r=e[0],o=e[1],i=String(o),l="".concat(r,"[]"),c=v[l];c&&Array.isArray(c)?(c=c.map(String)).includes(i)?v[l]=(0,u.Od)(c,(function(n){return n===i})):v[l]=c.concat(i):v[l]=[i]})):v=d(d({},v),e),f&&(v._limit=l||20,v._offset=0),a(v,{pushHistory:s})}},59416:function(n,e,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/syncs",function(){return r(89745)}])}},function(n){n.O(0,[3850,2083,9565,2344,9386,6166,8180,2626,9774,2888,179],(function(){return e=59416,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1221],{1210:function(e,n,t){"use strict";t.d(n,{Z:function(){return E}});var r=t(82394),i=t(21831),o=t(82684),c=t(47999),u=t(28358),l=t(93461),a=t(57384),d=t(12344),s=t(72454),p=t(28598);function f(e,n){var t=e.children;return(0,p.jsx)(s.HS,{ref:n,children:t})}var h=o.forwardRef(f),b=t(32063),g=t(15270),v=t(82531),m=t(66166),O=t(3055),j=t(49125),x=t(91427),y=t(24141);function P(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Z(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,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var E=function(e){var n,t=e.after,r=e.afterHidden,f=e.afterWidth,P=e.afterWidthOverride,E=e.before,w=e.beforeWidth,k=e.breadcrumbs,C=e.children,T=e.errors,S=e.headerMenuItems,A=e.navigationItems,R=e.setErrors,D=e.subheaderChildren,I=e.title,_=e.uuid,N=(0,y.i)().width,M="dashboard_after_width_".concat(_),L="dashboard_before_width_".concat(_),H=(0,o.useRef)(null),B=(0,o.useState)(P?f:(0,x.U2)(M,f)),Y=B[0],V=B[1],U=(0,o.useState)(!1),W=U[0],F=U[1],G=(0,o.useState)(E?Math.max((0,x.U2)(L,w),13*j.iI):null),X=G[0],q=G[1],z=(0,o.useState)(!1),K=z[0],Q=z[1],$=(0,o.useState)(null)[1],J=v.ZP.projects.list({},{revalidateOnFocus:!1}).data,ee=null===J||void 0===J?void 0:J.projects,ne=[];k?ne.push.apply(ne,(0,i.Z)(k)):(null===ee||void 0===ee?void 0:ee.length)>=1&&ne.push.apply(ne,[{label:function(){var e;return null===(e=ee[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},{bold:!0,label:function(){return I}}]),(0,o.useEffect)((function(){null===H||void 0===H||!H.current||W||K||null===$||void 0===$||$(H.current.getBoundingClientRect().width)}),[W,Y,K,X,H,$,N]),(0,o.useEffect)((function(){W||(0,x.t8)(M,Y)}),[r,W,Y,M]),(0,o.useEffect)((function(){K||(0,x.t8)(L,X)}),[K,X,L]);var te=(0,m.Z)(f);return(0,o.useEffect)((function(){P&&te!==f&&V(f)}),[P,f,te]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(a.Z,{title:I}),(0,p.jsx)(d.Z,{breadcrumbs:ne,menuItems:S,project:null===ee||void 0===ee?void 0:ee[0],version:null===ee||void 0===ee||null===(n=ee[0])||void 0===n?void 0:n.version}),(0,p.jsxs)(s.Nk,{children:[0!==(null===A||void 0===A?void 0:A.length)&&(0,p.jsx)(s.lm,{children:(0,p.jsx)(g.Z,{navigationItems:A})}),(0,p.jsx)(l.Z,{flex:1,flexDirection:"column",children:(0,p.jsxs)(b.Z,{after:t,afterHeightOffset:O.Mz,afterHidden:r,afterMousedownActive:W,afterWidth:Y,before:E,beforeHeightOffset:O.Mz,beforeMousedownActive:K,beforeWidth:s.k1+(E?X:0),hideAfterCompletely:!0,leftOffset:E?s.k1:null,mainContainerRef:H,setAfterMousedownActive:F,setAfterWidth:V,setBeforeMousedownActive:Q,setBeforeWidth:q,children:[D&&(0,p.jsx)(h,{children:D}),C]})})]}),T&&(0,p.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===R||void 0===R?void 0:R(null)},children:(0,p.jsx)(u.Z,Z(Z({},T),{},{onClose:function(){return null===R||void 0===R?void 0:R(null)}}))})]})}},86422:function(e,n,t){"use strict";t.d(n,{$W:function(){return p},DA:function(){return s},HX:function(){return b},J8:function(){return h},Lq:function(){return a},Qj:function(){return g},Ut:function(){return j},V4:function(){return O},VZ:function(){return f},dO:function(){return d},f2:function(){return m},iZ:function(){return v},t6:function(){return c},tf:function(){return l}});var r,i,o,c,u=t(82394);!function(e){e.PYTHON="python",e.R="r",e.SQL="sql",e.YAML="yaml"}(c||(c={}));var l,a,d=(r={},(0,u.Z)(r,c.PYTHON,"PY"),(0,u.Z)(r,c.R,"R"),(0,u.Z)(r,c.SQL,"SQL"),(0,u.Z)(r,c.YAML,"YAML"),r);!function(e){e.CHART="chart",e.CUSTOM="custom",e.DATA_EXPORTER="data_exporter",e.DATA_LOADER="data_loader",e.DBT="dbt",e.EXTENSION="extension",e.SCRATCHPAD="scratchpad",e.SENSOR="sensor",e.TRANSFORMER="transformer"}(l||(l={})),function(e){e.BLUE="blue",e.GREY="grey",e.PINK="pink",e.PURPLE="purple",e.TEAL="teal",e.YELLOW="yellow"}(a||(a={}));var s,p=[l.CHART,l.CUSTOM,l.DATA_EXPORTER,l.DATA_LOADER,l.SCRATCHPAD,l.SENSOR,l.TRANSFORMER],f=[l.DATA_EXPORTER,l.DATA_LOADER],h=[l.DATA_EXPORTER,l.DATA_LOADER,l.TRANSFORMER],b=[l.DATA_EXPORTER,l.DATA_LOADER,l.DBT,l.TRANSFORMER],g=[l.CHART,l.SCRATCHPAD,l.SENSOR],v=[l.EXTENSION,l.SCRATCHPAD];!function(e){e.EXECUTED="executed",e.FAILED="failed",e.NOT_EXECUTED="not_executed",e.UPDATED="updated"}(s||(s={}));var m=[l.CUSTOM,l.DATA_EXPORTER,l.TRANSFORMER],O=(i={},(0,u.Z)(i,l.CUSTOM,"Custom"),(0,u.Z)(i,l.DATA_EXPORTER,"Data exporter"),(0,u.Z)(i,l.DATA_LOADER,"Data loader"),(0,u.Z)(i,l.EXTENSION,"Extension"),(0,u.Z)(i,l.SCRATCHPAD,"Scratchpad"),(0,u.Z)(i,l.SENSOR,"Sensor"),(0,u.Z)(i,l.TRANSFORMER,"Transformer"),i),j=[l.DATA_LOADER,l.TRANSFORMER,l.DATA_EXPORTER,l.SENSOR];o={},(0,u.Z)(o,l.DATA_EXPORTER,"DE"),(0,u.Z)(o,l.DATA_LOADER,"DL"),(0,u.Z)(o,l.SCRATCHPAD,"SP"),(0,u.Z)(o,l.SENSOR,"SR"),(0,u.Z)(o,l.TRANSFORMER,"TF")},93348:function(e,n,t){"use strict";t.d(n,{TR:function(){return s},U5:function(){return l},Xm:function(){return o},Z4:function(){return d},fq:function(){return u},kJ:function(){return a}});var r,i,o,c=t(82394);!function(e){e.API="api",e.EVENT="event",e.TIME="time"}(o||(o={}));var u,l,a,d=(r={},(0,c.Z)(r,o.API,(function(){return"API"})),(0,c.Z)(r,o.EVENT,(function(){return"event"})),(0,c.Z)(r,o.TIME,(function(){return"schedule"})),r);!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(u||(u={})),function(e){e.ONCE="@once",e.HOURLY="@hourly",e.DAILY="@daily",e.WEEKLY="@weekly",e.MONTHLY="@monthly"}(l||(l={})),function(e){e.CREATED_AT="created_at",e.NAME="name",e.PIPELINE="pipeline_uuid",e.STATUS="status",e.TYPE="schedule_type"}(a||(a={}));var s=(i={},(0,c.Z)(i,a.CREATED_AT,"Created at"),(0,c.Z)(i,a.NAME,"Name"),(0,c.Z)(i,a.PIPELINE,"Pipeline"),(0,c.Z)(i,a.STATUS,"Status"),(0,c.Z)(i,a.TYPE,"Type"),i)},98781:function(e,n,t){"use strict";t.d(n,{$1:function(){return l},G7:function(){return d},QK:function(){return u},a_:function(){return s},qL:function(){return o},r0:function(){return a}});var r,i,o,c=t(82394);!function(e){e.INTEGRATION="integration",e.PYTHON="python",e.PYSPARK="pyspark",e.STREAMING="streaming"}(o||(o={}));var u,l,a,d=(r={},(0,c.Z)(r,o.INTEGRATION,"Integration"),(0,c.Z)(r,o.PYTHON,"Standard"),(0,c.Z)(r,o.PYSPARK,"PySpark"),(0,c.Z)(r,o.STREAMING,"Streaming"),r);!function(e){e.ACTIVE="active",e.INACTIVE="inactive",e.NO_SCHEDULES="no_schedules"}(u||(u={})),function(e){e.GROUP="group_by",e.STATUS="status[]",e.TYPE="type[]"}(l||(l={})),function(e){e.STATUS="status",e.TYPE="type"}(a||(a={}));var s=(i={},(0,c.Z)(i,o.PYTHON,"python3"),(0,c.Z)(i,o.PYSPARK,"pysparkkernel"),i)},18283:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=(t(82684),t(9518)),c=t(23831),u=t(73942),l=t(2005),a=t(49125),d=t(31012),s=t(28598),p=["children"];function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function h(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}var b=o.default.p.withConfig({displayName:"Badge__BadgeStyle",componentId:"sc-tfqsp0-0"})(["border-radius:","px;display:inline;font-family:",";margin:0;",";"," ",";",";"," "," "," "," ",""],u.BG,l.ry,d.iD,(function(e){return e.small&&"\n ".concat(d.HC,";\n ")}),(function(e){return!e.regular&&"\n padding: 2px 4px;\n "}),(function(e){return e.regular&&"\n padding: ".concat(1*a.iI,"px ").concat(1.25*a.iI,"px;\n ")}),(function(e){return e.noVerticalPadding&&"\n padding-bottom: 0;\n padding-top: 0;\n "}),(function(e){return!e.disabled&&"\n background-color: ".concat((e.theme||c.Z).background.row,";\n color: ").concat((e.theme||c.Z).content.muted,";\n ")}),(function(e){return e.cyan&&"\n background-color: ".concat((e.theme||c.Z).accent.cyan,";\n color: ").concat((e.theme||c.Z).monotone.black,";\n ")}),(function(e){return e.disabled&&"\n background-color: ".concat((e.theme||c.Z).feature.disabled,";\n color: ").concat((e.theme||c.Z).content.disabled,";\n ")}),(function(e){return e.quantifier&&"\n border-radius: 34px;\n line-height: 10px;\n padding: 4px 6px;\n "}));n.Z=function(e){var n=e.children,t=(0,i.Z)(e,p);return(0,s.jsx)(b,h(h({},t),{},{children:n}))}},30264:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=(t(82684),t(47999)),c=t(62084),u=t(28598),l=["children","items","open","onClickCallback","onClickOutside","parentRef","uuid"];function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.children,t=e.items,r=e.open,a=e.onClickCallback,s=e.onClickOutside,p=e.parentRef,f=e.uuid,h=(0,i.Z)(e,l),b=(0,u.jsxs)("div",{style:{position:"relative",zIndex:s?3:2},children:[(0,u.jsx)("div",{ref:p,children:n}),(0,u.jsx)(c.Z,d(d({},h),{},{items:t,onClickCallback:a,open:r,parentRef:p,uuid:f}))]});return s?(0,u.jsx)(o.Z,{onClickOutside:s,open:!0,children:b}):b}},29237:function(e,n,t){"use strict";var r=t(9518),i=t(67971),o=t(86673),c=t(19711),u=t(23831),l=t(73942),a=t(37391),d=t(49125),s=t(28598),p=(0,r.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*d.iI,1.5*d.iI,1.5*d.iI),f=r.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," ",""],l.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return"\n border: 1px solid ".concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return!e.dark&&"\n background-color: ".concat((e.theme.background||u.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||u.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),h=r.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],l.n_,l.n_,(function(e){return"\n background-color: ".concat((e.theme.background||u.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),p,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),b=r.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*d.iI,a.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*d.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),g=r.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],l.M8,l.YF,1.75*d.iI);n.Z=function(e){var n=e.borderless,t=e.children,r=e.containerRef,u=e.contentContainerRef,l=e.dark,a=e.footer,d=e.fullHeight,p=void 0===d||d,v=e.fullWidth,m=void 0===v||v,O=e.header,j=e.headerHeight,x=e.headerIcon,y=e.headerPaddingVertical,P=e.headerTitle,Z=e.maxHeight,E=e.maxWidth,w=e.minWidth,k=e.noPadding,C=e.overflowVisible,T=e.subtitle;return(0,s.jsxs)(f,{borderless:n,dark:l,fullHeight:p,fullWidth:m,maxHeight:Z,maxWidth:E,minWidth:w,overflowVisible:C,ref:r,children:[(O||P)&&(0,s.jsxs)(h,{headerPaddingVertical:y,height:j,children:[O&&O,P&&(0,s.jsx)(i.Z,{alignItems:"center",justifyContent:"space-between",children:(0,s.jsxs)(i.Z,{alignItems:"center",children:[x&&x,(0,s.jsx)(o.Z,{ml:x?1:0,children:(0,s.jsx)(c.ZP,{bold:!0,default:!0,children:P})})]})})]}),(0,s.jsxs)(b,{maxHeight:Z,noPadding:k,overflowVisible:C,ref:u,children:[T&&(0,s.jsx)(o.Z,{mb:2,children:(0,s.jsx)(c.ZP,{default:!0,children:T})}),t]}),a&&(0,s.jsx)(g,{children:a})]})}},38435:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=t(82684),c=t(9518),u=t(69898),l=t(28598),a=["rows"];function d(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?d(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var p=c.default.textarea.withConfig({displayName:"TextArea__TextInputStyle",componentId:"sc-112wx63-0"})(["",""],u.p),f=function(e,n){var t=e.rows,r=void 0===t?3:t,o=(0,i.Z)(e,a);return(0,l.jsx)(u.Z,s(s({},o),{},{input:(0,l.jsx)(p,s({rows:r},o)),ref:n}))};n.Z=o.forwardRef(f)},70902:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=t(82684),c=t(9518),u=t(69898),l=t(23831),a=t(28598),d=["checked","disabled","onCheck"];function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function p(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var f=c.default.label.withConfig({displayName:"ToggleSwitch__ToggleSwitchStyle",componentId:"sc-179r5zs-0"})([""," position:relative;display:inline-block;width:","px;min-width:","px;height:",'px;& input[type="checkbox"]{display:none;}& span{position:absolute;cursor:',";background-color:",";border-radius:13px;",';top:0;right:0;bottom:0;left:0;transition:background-color 0.2s ease;}& span::before{position:absolute;content:"";left:2px;top:2px;width:22px;height:22px;background-color:#787A85;border-radius:50%;transition:transform 0.3s ease;}& input[type="checkbox"]:checked + span::before{transform:translateX(20px);}',""],u.p,46,46,26,(function(e){return e.disabled?"not-allowed":"pointer"}),(function(e){return e.disabled?l.Z.monotone.white:l.Z.monotone.black}),(function(e){return e.disabled&&"border: 1px solid ".concat(l.Z.monotone.grey200)}),(function(e){return!e.disabled&&'\n & input[type="checkbox"]:checked + span {\n background-color: #6AA1E0;\n }\n\n & input[type="checkbox"]:checked + span::before {\n background-color: '.concat(l.Z.monotone.white,";\n }\n ")})),h=function(e,n){var t=e.checked,r=e.disabled,o=e.onCheck,c=(0,i.Z)(e,d);return(0,a.jsx)(u.Z,p(p({},c),{},{disabled:r,input:(0,a.jsxs)(f,p(p({},c),{},{disabled:r,noBackground:!0,noBorder:!0,children:[(0,a.jsx)("input",{checked:t,type:"checkbox"}),(0,a.jsx)("span",{onClick:r?null:function(){return null===o||void 0===o?void 0:o((function(e){return!e}))}})]})),noBackground:!0,ref:n}))};n.Z=o.forwardRef(h)},46614:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return we}});var r=t(77837),i=t(75582),o=t(82394),c=t(38860),u=t.n(c),l=t(12691),a=t.n(l),d=t(83455),s=t(82684),p=t(34376),f=t(60328),h=t(1210),b=t(93461),g=t(67971),v=t(11135),m=t(29237),O=t(86673),j=t(19711),x=t(38435),y=t(82944),P=t(28598);var Z=function(e){var n=e.description,t=e.isLoading,r=e.maxWidth,i=e.minWidth,o=e.noEmptyValue,c=e.onClose,u=e.onSave,l=e.textArea,a=e.title,d=e.value,p=(0,s.useRef)(null),h=(0,s.useState)(d),b=h[0],Z=h[1],E=l?x.Z:y.Z;return(0,s.useEffect)((function(){var e;null===p||void 0===p||null===(e=p.current)||void 0===e||e.focus()}),[]),(0,P.jsxs)(m.Z,{maxWidth:r,minWidth:i,children:[(0,P.jsx)(j.ZP,{bold:!0,children:a}),(0,P.jsx)(O.Z,{mt:1,children:(0,P.jsx)(E,{monospace:!0,onChange:function(e){return Z(e.target.value)},ref:p,rows:l?7:null,value:b})}),n&&(0,P.jsx)(O.Z,{mt:2,children:(0,P.jsx)(j.ZP,{muted:!0,small:!0,children:n})}),(0,P.jsx)(O.Z,{mt:3,children:(0,P.jsxs)(g.Z,{children:[(0,P.jsx)(v.ZP,{bold:!0,inline:!0,loading:t,onClick:function(){b===d||o&&!b?c():u(b)},outline:!0,primary:!0,uuid:"Inputs/InputModal/SaveInput",children:"Save"}),(0,P.jsx)(O.Z,{ml:1}),(0,P.jsx)(f.Z,{onClick:c,children:"Cancel"})]})})]})},E=t(10919),w=t(98781),k=t(41788),C=t(54283),T=t(58180),S=t(18283),A=t(47999),R=t(30264),D=t(62609),I=t(70902),_=t(9518),N=t(23831),M=t(73942),L=t(37391),H=t(49125),B=74*H.iI,Y=48*H.iI,V=_.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-18n432u-0"})(["position:absolute;border-radius:","px;overflow:hidden;width:","px;display:none;"," "," "," "," ",""],M.n_,B,(function(e){return"\n background-color: ".concat((e.theme||N.Z).background.panel,";\n border: ").concat(M.mP,"px ").concat(M.M8," ").concat((e.theme||N.Z).interactive.defaultBackground,";\n box-shadow: ").concat((e.theme.shadow||N.Z.shadow).window,";\n ")}),(function(e){return e.display&&"\n display: block;\n "}),(function(e){return e.compact&&"\n width: ".concat(.75*B,"px;\n ")}),(function(e){return"undefined"!==typeof e.left&&"\n left: ".concat(e.left,"px;\n ")}),(function(e){return"undefined"!==typeof e.top&&"\n top: ".concat(e.top,"px;\n ")})),U=_.default.div.withConfig({displayName:"indexstyle__MainStyle",componentId:"sc-18n432u-1"})(["display:flex;border-radius:","px;overflow:hidden;height:","px;"," ",""],M.n_,Y,(function(e){return"\n background-color: ".concat((e.theme||N.Z).background.content,";\n border: ").concat(M.YF,"px ").concat(M.M8," ").concat((e.theme||N.Z).interactive.defaultBackground,";\n ")}),(function(e){return e.compact&&"\n height: ".concat(Y/2,"px;\n ")})),W=_.default.aside.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-18n432u-2"})(["width:100%;overflow:auto;"," ",""],L.w5,(function(e){return"\n border-right: ".concat(M.YF,"px ").concat(M.M8," ").concat((e.theme||N.Z).background.panel,";\n ")})),F=_.default.div.withConfig({displayName:"indexstyle__ContentStyle",componentId:"sc-18n432u-3"})(["width:100%;overflow:auto;",""],L.w5),G=(0,_.css)(["display:flex;align-items:center;justify-content:space-between;padding:","px ","px;"],H.iI,2*H.iI),X=_.default.div.withConfig({displayName:"indexstyle__OptionStyle",componentId:"sc-18n432u-4"})([""," padding-top:","px;padding-bottom:","px;&:hover{cursor:pointer;","}",""],G,1.5*H.iI,1.5*H.iI,(function(e){return"\n background-color: ".concat((e.theme||N.Z).monotone.black,";\n ")}),(function(e){return e.highlighted&&"\n background-color: ".concat((e.theme||N.Z).monotone.black,";\n ")})),q=_.default.div.withConfig({displayName:"indexstyle__ToggleValueStyle",componentId:"sc-18n432u-5"})([""," ",""],G,(function(e){return"\n border-bottom: ".concat(M.YF,"px ").concat(M.M8," ").concat((e.theme||N.Z).borders.medium2,";\n ")})),z=t(10503),K=t(33766),Q=t(90211);function $(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function J(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?$(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ee,ne=function(e){var n,t,r,c=e.children,u=e.compact,l=e.onClickCallback,a=e.onClickOutside,d=e.onSecondaryClick,p=e.open,h=e.options,v=void 0===h?{}:h,m=e.parentRef,x=e.query,y=e.setOpen,Z=e.toggleValueMapping,E=(0,s.useState)(null),w=E[0],k=E[1],C=(0,s.useState)(v),T=C[0],S=C[1];(0,s.useEffect)((function(){S(v)}),[v]);var R=((null===m||void 0===m||null===(n=m.current)||void 0===n||null===(t=n.getBoundingClientRect)||void 0===t?void 0:t.call(n))||{}).top,D=void 0===R?0:R,_=Object.keys(v);return(0,P.jsxs)(A.Z,{onClickOutside:a,open:!0,children:[(0,P.jsx)("div",{ref:m,children:c}),(0,P.jsxs)(V,{compact:u,display:p,top:D-5,children:[(0,P.jsxs)(U,{compact:u,children:[(0,P.jsx)(b.Z,{flex:"1",children:(0,P.jsx)(W,{children:_.map((function(e){return(0,P.jsxs)(X,{highlighted:w===e,onMouseEnter:function(){return k(e)},children:[(0,P.jsx)(j.ZP,{children:(0,Q.kC)(e)}),(0,P.jsx)(z._Q,{})]},e)}))})}),(0,P.jsx)(b.Z,{flex:"2",children:(0,P.jsx)(F,{children:w&&Object.entries((null===(r=T||v)||void 0===r?void 0:r[w])||{}).map((function(e){var n=(0,i.Z)(e,2),t=n[0],r=n[1];return(0,P.jsxs)(q,{children:[(0,P.jsx)(j.ZP,{children:(null===Z||void 0===Z?void 0:Z[t])||(0,Q.J3)((0,Q.kC)(t))}),(0,P.jsx)(I.Z,{checked:r,onCheck:function(){return S((function(e){return J(J({},e),{},(0,o.Z)({},w,J(J({},null===e||void 0===e?void 0:e[w]),{},(0,o.Z)({},t,!r))))}))}})]},t)}))})})]}),(0,P.jsx)(O.Z,{m:1,children:(0,P.jsxs)(g.Z,{children:[(0,P.jsx)(f.Z,{onClick:function(){var e=Object.entries(T).reduce((function(e,n){var t=(0,i.Z)(n,2),r=t[0],o=t[1],c=[];return Object.entries(o).forEach((function(e){var n=(0,i.Z)(e,2),t=n[0];return n[1]&&c.push(t)})),e[r]=c,e}),{});null===l||void 0===l||l(),(0,K.g_)(x,e,{addingMultipleValues:!0,pushHistory:!0})},secondary:!0,children:"Apply"}),(0,P.jsx)(O.Z,{mr:1}),(0,P.jsx)(f.Z,{noBackground:!0,onClick:function(){y(!1),null===d||void 0===d||d()},children:"Defaults"})]})})]})]})},te=t(46261),re=t(99994),ie="".concat(1.5*H.iI,"px"),oe=40*H.iI,ce={bold:!0,greyBorder:!0,paddingBottom:9,paddingTop:9};!function(e){e[e.SECONDARY=1]="SECONDARY",e[e.DELETE=2]="DELETE"}(ee||(ee={}));var ue={autoHide:!0,size:null,widthFitContent:!0},le=t(7715),ae=t(9736);function de(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function se(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?de(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):de(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var pe=function(e){var n=e.addButtonProps,t=e.deleteRowProps,r=e.filterOptions,o=void 0===r?{}:r,c=e.filterValueLabelMapping,u=e.groupButtonProps,l=e.moreActionsMenuItems,a=e.query,d=void 0===a?{}:a,f=e.searchProps,h=e.secondaryActionButtonProps,m=e.selectedRowId,x=e.setSelectedRow,Z=(0,ae.Ct)(),E=(0,p.useRouter)(),w=(0,s.useRef)(null),k=(0,s.useRef)(null),C=(0,s.useRef)(null),T=(0,s.useRef)(null),I=(0,s.useRef)(null),_=(0,s.useState)(!1),N=_[0],L=_[1],B=(0,s.useState)(!1),Y=B[0],V=B[1],U=(0,s.useState)(!1),W=U[0],F=U[1],G=(0,s.useState)(!1),X=G[0],q=G[1],K=(0,s.useState)(null),Q=K[0],$=K[1],J=!m,de=(0,s.useCallback)((function(){return L(!1)}),[]),pe=(0,s.useCallback)((function(){return V(!1)}),[]),fe=(0,s.useCallback)((function(){return F(!1)}),[]),he=(0,s.useCallback)((function(){return q(null)}),[]),be=(0,s.useCallback)((function(){return $(null)}),[]),ge=h||{},ve=ge.Icon,me=ge.confirmationDescription,Oe=ge.confirmationMessage,je=ge.isLoading,xe=ge.label,ye=ge.onClick,Pe=ge.openConfirmationDialogue,Ze=ge.tooltip,Ee=t||{},we=Ee.confirmationMessage,ke=Ee.isLoading,Ce=Ee.item,Te=Ee.onDelete,Se=f||{},Ae=Se.placeholder,Re=Se.onChange,De=Se.value,Ie=(0,s.useMemo)((function(){return Object.entries(o).reduce((function(e,n){var t=(0,i.Z)(n,2),r=t[0],o=t[1];return e[r]={},o.forEach((function(n){var t,i=(null===(t=d["".concat(r,"[]")])||void 0===t?void 0:t.includes(n))||!1;e[r][n]=i})),e}),{})}),[o,d]),_e=n||{},Ne=_e.label,Me=_e.menuItems,Le=_e.isLoading,He=(0,s.useMemo)((function(){return(0,P.jsx)(R.Z,{disableKeyboardShortcuts:!0,items:Me,onClickCallback:de,onClickOutside:de,open:N,parentRef:w,roundedStyle:!0,topOffset:1,uuid:"Table/Toolbar/NewItemMenu",children:(0,P.jsx)(v.ZP,se(se({},ce),{},{background:re.eW,beforeElement:(0,P.jsx)(z.mm,{size:2.5*H.iI}),loading:Le,onClick:function(e){e.preventDefault(),L((function(e){return!e}))},uuid:"Table/Toolbar/AddButton",children:Ne}))})}),[Ne,Me,N,de,Le]),Be=(0,s.useMemo)((function(){return(0,le.dw)(Ie)}),[Ie]),Ye=(0,s.useMemo)((function(){return(0,P.jsx)(ne,{compact:!0,onClickCallback:pe,onClickOutside:pe,onSecondaryClick:function(){return E.push("/pipelines")},open:Y,options:Ie,parentRef:k,query:d,setOpen:V,toggleValueMapping:c,children:(0,P.jsx)(v.ZP,se(se({},ce),{},{afterElement:Be>0?(0,P.jsx)(S.Z,{cyan:!0,noVerticalPadding:!0,children:(0,P.jsx)(j.ZP,{bold:!0,inverted:!0,children:Be})}):null,beforeElement:(0,P.jsx)(z.wn,{size:2*H.iI}),onClick:function(){return V((function(e){return!e}))},uuid:"Table/Toolbar/FilterButton",children:"Filter"}))})}),[pe,Y,Ie,c,Be,d,E]),Ve=u||{},Ue=Ve.groupByLabel,We=Ve.menuItems,Fe=(0,s.useMemo)((function(){return(0,P.jsx)(R.Z,{disableKeyboardShortcuts:!0,items:We,onClickCallback:fe,onClickOutside:fe,open:W,parentRef:C,roundedStyle:!0,topOffset:1,uuid:"Table/Toolbar/GroupMenu",children:(0,P.jsx)(v.ZP,se(se({},ce),{},{beforeElement:(0,P.jsx)(z.ZA,{size:2.5*H.iI}),onClick:function(){F((function(e){return!e}))},uuid:"Table/Toolbar/GroupButton",children:Ue?"Grouped by ".concat(Ue):"Group"}))})}),[fe,W,We]),Ge=(0,s.useMemo)((function(){return(0,P.jsx)(R.Z,{disableKeyboardShortcuts:!0,items:l,onClickCallback:he,onClickOutside:he,open:X,parentRef:T,roundedStyle:!0,topOffset:1,uuid:"Table/Toolbar/MoreActionsMenu",children:(0,P.jsx)(te.Z,se(se({},ue),{},{label:"More actions",children:(0,P.jsx)(v.ZP,{Icon:z.mH,bold:!0,disabled:J,greyBorder:!0,onClick:function(){return q((function(e){return!e}))},smallIcon:!0,uuid:"Table/Toolbar/MoreActionsButton"})}))})}),[he,J,X,l]);return(0,P.jsxs)(g.Z,{alignItems:"center",children:[He,(0,P.jsx)(O.Z,{mr:ie}),Ye,(null===We||void 0===We?void 0:We.length)>0&&(0,P.jsx)(O.Z,{ml:ie,children:Fe}),!Z&&ye&&(0,P.jsxs)(O.Z,{ml:ie,children:[(0,P.jsx)(te.Z,se(se({},ue),{},{label:Ze,children:(0,P.jsx)(v.ZP,{Icon:!je&&ve,bold:!0,disabled:J,greyBorder:!0,loading:je,onClick:Pe?function(){return $(ee.SECONDARY)}:ye,smallIcon:!0,uuid:"Table/Toolbar/SecondaryActionButton",children:xe})})),(0,P.jsx)(A.Z,{onClickOutside:be,open:Q===ee.SECONDARY,children:(0,P.jsx)(D.Z,{onCancel:be,onClick:function(){ye(),be(),x(null)},subtitle:me,title:Oe,top:58,width:oe})})]}),!Z&&Te&&(0,P.jsxs)(O.Z,{ml:ie,children:[(0,P.jsx)(te.Z,se(se({},ue),{},{label:"Delete ".concat(Ce),children:(0,P.jsx)(v.ZP,{Icon:!ke&&z.rF,bold:!0,disabled:J,greyBorder:!0,loading:ke,onClick:function(){return $(ee.DELETE)},smallIcon:!0,uuid:"Table/Toolbar/DeleteButton"})})),(0,P.jsx)(A.Z,{onClickOutside:be,open:Q===ee.DELETE,children:(0,P.jsx)(D.Z,{danger:!0,onCancel:be,onClick:function(){Te(m),be(),x(null)},subtitle:we,title:"Are you sure you want to delete the ".concat(Ce," ").concat(m,"?"),top:58,width:oe})})]}),!Z&&(null===l||void 0===l?void 0:l.length)>0&&(0,P.jsx)(O.Z,{ml:ie,children:Ge}),Re&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(O.Z,{ml:ie}),(0,P.jsx)(b.Z,{flex:1,children:(0,P.jsx)(y.Z,{afterIcon:De?(0,P.jsx)(z.x8,{}):null,afterIconClick:function(){var e;Re(""),null===I||void 0===I||null===(e=I.current)||void 0===e||e.focus()},afterIconSize:1.5*H.iI,beforeIcon:(0,P.jsx)(z.HN,{}),borderRadius:M.n_,defaultColor:!0,fullWidth:!0,greyBorder:!0,maxWidth:60*H.iI,onChange:function(e){return Re(e.target.value)},paddingVertical:9,placeholder:Ae||null,ref:I,value:De})})]})]})},fe=t(82531),he=t(86422),be=t(93348),ge=t(3055),ve=t(45838),me=t(59e3),Oe=t(96510),je=t(66653),xe=t(83608);function ye(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Pe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ye(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ye(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ze={borderRadius:M.BG,iconOnly:!0,noBackground:!0,noBorder:!0,outline:!0,padding:"4px"};function Ee(){var e=(0,p.useRouter)(),n=(0,s.useState)(null),t=n[0],r=n[1],c=(0,s.useState)(null),u=c[0],l=c[1],g=(0,s.useState)({}),v=g[0],m=g[1],x=(0,s.useState)(null),y=x[0],k=x[1],S=(0,me.iV)(),A=(0,me.DQ)(S,[w.$1.STATUS,w.$1.TYPE]),R=null===S||void 0===S?void 0:S[w.$1.GROUP],D=fe.ZP.pipelines.list(Pe(Pe({},A),{},{include_schedules:1})),I=D.data,_=D.mutate,M=(0,s.useMemo)((function(){var e=(null===I||void 0===I?void 0:I.pipelines)||[];if(u){var n=u.toLowerCase();e=e.filter((function(e){var t=e.name,r=e.description,i=e.uuid;return(null===t||void 0===t?void 0:t.toLowerCase().includes(n))||(null===i||void 0===i?void 0:i.toLowerCase().includes(n))||(null===r||void 0===r?void 0:r.toLowerCase().includes(n))}))}return e}),[null===I||void 0===I?void 0:I.pipelines,u]),L=function(e){return(0,d.Db)(fe.ZP.pipelines.useCreate(),{onSuccess:function(n){return(0,Oe.wD)(n,{callback:function(n){var t=n.pipeline.uuid;null===e||void 0===e||e(t)},onErrorCallback:function(e,n){return k({errors:n,response:e})}})}})},B=L((function(n){return e.push("/pipelines/[pipeline]/edit","/pipelines/".concat(n,"/edit"))})),Y=(0,i.Z)(B,2),V=Y[0],U=Y[1].isLoading,W=L((function(){return null===_||void 0===_?void 0:_()})),F=(0,i.Z)(W,2),G=F[0],X=F[1].isLoading,q=(0,d.Db)((function(e){return fe.ZP.pipelines.useUpdate(e.uuid)({pipeline:e})}),{onSuccess:function(e){return(0,Oe.wD)(e,{callback:function(e){var n=e.pipeline.uuid;m((function(e){return Pe(Pe({},e),{},(0,o.Z)({},n,!1))})),_(),null===le||void 0===le||le(),r(null)},onErrorCallback:function(e,n){var t,r=null===e||void 0===e||null===(t=e.url_parameters)||void 0===t?void 0:t.pk;m((function(e){return Pe(Pe({},e),{},(0,o.Z)({},r,!1))})),k({errors:n,response:e})}})}}),$=(0,i.Z)(q,2),J=$[0],ee=$[1].isLoading,ne=(0,d.Db)((function(e){return fe.ZP.pipelines.useDelete(e)()}),{onSuccess:function(e){return(0,Oe.wD)(e,{callback:function(){null===_||void 0===_||_()},onErrorCallback:function(e,n){return k({errors:n,response:e})}})}}),te=(0,i.Z)(ne,2),re=te[0],ie=te[1].isLoading,oe=(0,xe.dd)((function(e){var n=e.pipelineDescription,r=e.pipelineName;return(0,P.jsx)(Z,{isLoading:ee,minWidth:55*H.iI,noEmptyValue:!!r,onClose:le,onSave:function(e){if(t){var n=t.uuid,i={uuid:n};r?i.name=e:i.description=e,m((function(e){return Pe(Pe({},e),{},(0,o.Z)({},n,!0))})),J(i)}},textArea:!r,title:r?"Rename pipeline":"Edit description",value:r||n})}),{},[ee,t],{background:!0,uuid:"rename_pipeline_and_save"}),ce=(0,i.Z)(oe,2),ue=ce[0],le=ce[1],ae=(0,s.useMemo)((function(){return(0,P.jsx)(pe,{addButtonProps:{isLoading:U,label:"New",menuItems:[{label:function(){return"Standard (batch)"},onClick:function(){return V({pipeline:{name:(0,Q.Y6)()}})},uuid:"Pipelines/NewPipelineMenu/standard"},{label:function(){return"Data integration"},onClick:function(){return V({pipeline:{name:(0,Q.Y6)(),type:w.qL.INTEGRATION}})},uuid:"Pipelines/NewPipelineMenu/integration"},{label:function(){return"Streaming"},onClick:function(){return V({pipeline:{name:(0,Q.Y6)(),type:w.qL.STREAMING}})},uuid:"Pipelines/NewPipelineMenu/streaming"}]},deleteRowProps:{confirmationMessage:"This is irreversible and will immediately delete everything associated with the pipeline, including its blocks, triggers, runs, logs, and history.",isLoading:ie,item:"pipeline",onDelete:function(){return re(null===t||void 0===t?void 0:t.uuid)}},filterOptions:{status:Object.values(w.QK),type:Object.values(w.qL)},filterValueLabelMapping:w.G7,groupButtonProps:{groupByLabel:R,menuItems:[{beforeIcon:(0,P.jsx)(z.Jr,{fill:R===w.r0.STATUS?N.Z.content.default:N.Z.interactive.transparent,size:2*H.iI}),label:function(){return(0,Q.kC)(w.r0.STATUS)},onClick:function(){return(0,K.u7)((0,o.Z)({},w.$1.GROUP,R===w.r0.STATUS?null:w.r0.STATUS),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Status"},{beforeIcon:(0,P.jsx)(z.Jr,{fill:R===w.r0.TYPE?N.Z.content.default:N.Z.interactive.transparent,size:2*H.iI}),label:function(){return(0,Q.kC)(w.r0.TYPE)},onClick:function(){return(0,K.u7)((0,o.Z)({},w.$1.GROUP,R===w.r0.TYPE?null:w.r0.TYPE),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Type"}]},moreActionsMenuItems:[{label:function(){return"Rename pipeline"},onClick:function(){return ue({pipelineName:null===t||void 0===t?void 0:t.name})},uuid:"Pipelines/MoreActionsMenu/Rename"},{label:function(){return"Edit description"},onClick:function(){return ue({pipelineDescription:null===t||void 0===t?void 0:t.description})},uuid:"Pipelines/MoreActionsMenu/EditDescription"}],query:A,searchProps:{onChange:l,value:u},secondaryActionButtonProps:{Icon:z.oX,confirmationDescription:"Cloning the selected pipeline will create a new pipeline with the same configuration and code blocks. The blocks use the same block files as the original pipeline. Pipeline triggers, runs, backfills, and logs are not copied over to the new pipeline.",confirmationMessage:"Do you want to clone the pipeline ".concat(null===t||void 0===t?void 0:t.uuid,"?"),isLoading:X,onClick:function(){return G({pipeline:{clone_pipeline_uuid:null===t||void 0===t?void 0:t.uuid}})},openConfirmationDialogue:!0,tooltip:"Clone pipeline"},selectedRowId:null===t||void 0===t?void 0:t.uuid,setSelectedRow:r})}),[G,V,re,R,X,U,ie,A,u,null===t||void 0===t?void 0:t.description,null===t||void 0===t?void 0:t.name,null===t||void 0===t?void 0:t.uuid,ue]);return(0,P.jsx)(h.Z,{errors:y,setErrors:k,subheaderChildren:ae,title:"Pipelines",uuid:"pipelines/index",children:0===(null===M||void 0===M?void 0:M.length)?(0,P.jsx)(O.Z,{px:3,py:1,children:I?(0,P.jsx)(j.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No pipelines available"}):(0,P.jsx)(C.Z,{inverted:!0,large:!0})}):(0,P.jsx)(ve.cl,{includePadding:!!R,maxHeight:"calc(100vh - ".concat(ge.Mz+74,"px)"),children:(0,P.jsx)(T.Z,{columnFlex:[null,1,3,4,1,1,1,null],columns:[{label:function(){return""},uuid:"action"},{uuid:(0,Q.kC)(w.r0.STATUS)},{uuid:"Name"},{uuid:"Description"},{uuid:(0,Q.kC)(w.r0.TYPE)},{uuid:"Blocks"},{uuid:"Triggers"},{center:!0,uuid:"Actions"}],grouping:{column:(0,Q.kC)(R),columnIndex:R===w.r0.STATUS?1:R===w.r0.TYPE?4:null,values:R===w.r0.STATUS?Object.values(w.QK).map((function(e){return(0,Q.J3)(e)})):R===w.r0.TYPE?Object.values(w.qL).map((function(e){return w.G7[e]})):[]},isSelectedRow:function(e){var n;return(null===(n=M[e])||void 0===n?void 0:n.uuid)===(null===t||void 0===t?void 0:t.uuid)},onClickRow:function(e){return r((function(n){var t=M[e];return(null===n||void 0===n?void 0:n.uuid)!==(null===t||void 0===t?void 0:t.uuid)?t:null}))},onDoubleClickRow:function(n){e.push("/pipelines/[pipeline]","/pipelines/".concat(M[n].uuid))},rows:M.map((function(n,t){var r=n.blocks,i=n.description,c=n.schedules,u=n.type,l=n.uuid,d=r.filter((function(e){var n=e.type;return he.tf.SCRATCHPAD!==n})).length,s=c.length,p=c.find((function(e){var n=e.status;return be.fq.ACTIVE===n}));return[s>=1||v[l]?(0,P.jsx)(f.Z,{iconOnly:!0,loading:!!v[l],noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(e){(0,je.j)(e),m((function(e){return Pe(Pe({},e),{},(0,o.Z)({},l,!0))})),J(Pe(Pe({},n),{},{status:p?be.fq.INACTIVE:be.fq.ACTIVE}))},children:p?(0,P.jsx)(z.dz,{muted:!0,size:2*H.iI}):(0,P.jsx)(z.Py,{default:!0,size:2*H.iI})}):null,(0,P.jsx)(j.ZP,{default:!p,monospace:!0,success:!!p,children:p?be.fq.ACTIVE:s>=1?be.fq.INACTIVE:"no schedules"},"pipeline_status_".concat(t)),(0,P.jsx)(a(),{as:"/pipelines/".concat(l),href:"/pipelines/[pipeline]",passHref:!0,children:(0,P.jsx)(E.Z,{sameColorAsText:!0,children:l})},"pipeline_name_".concat(t)),(0,P.jsx)(j.ZP,{default:!0,title:i,width:90*H.iI,children:i},"pipeline_description_".concat(t)),(0,P.jsx)(j.ZP,{children:w.G7[u]},"pipeline_type_".concat(t)),(0,P.jsx)(j.ZP,{default:0===d,monospace:!0,children:d},"pipeline_block_count_".concat(t)),(0,P.jsx)(j.ZP,{default:0===s,monospace:!0,children:s},"pipeline_trigger_count_".concat(t)),(0,P.jsxs)(b.Z,{flex:1,justifyContent:"flex-end",children:[(0,P.jsx)(f.Z,Pe(Pe({},Ze),{},{onClick:function(){e.push("/pipelines/[pipeline]","/pipelines/".concat(l))},title:"Detail",children:(0,P.jsx)(z.UY,{default:!0,size:2*H.iI})})),(0,P.jsx)(O.Z,{mr:1}),(0,P.jsx)(f.Z,Pe(Pe({},Ze),{},{onClick:function(){e.push("/pipelines/[pipeline]/logs","/pipelines/".concat(l,"/logs"))},title:"Logs",children:(0,P.jsx)(z.$B,{default:!0,size:2*H.iI})}))]},"chevron_icon_".concat(t))]})),stickyHeader:!0})})})}Ee.getInitialProps=(0,r.Z)(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var we=(0,k.Z)(Ee)},33766:function(e,n,t){"use strict";t.d(n,{g_:function(){return p},u7:function(){return s}});var r=t(75582),i=t(82394),o=t(34376),c=t.n(o),u=t(59e3),l=t(24224);function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e){var n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.replaceParams,o=t.pushHistory,l=i?{}:(0,u.iV)();n=window.location.pathname;var a=o?c().push:c().replace,s=d(d({},l),e);Object.entries(e).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];"undefined"!==typeof i&&null!==i||delete s[t]}));var p=(0,u.uM)(s);p.length>=1&&(p="?".concat(p));var f="".concat(n.split("?")[0]).concat(p);return a(c().router.pathname,f,{shallow:!0})}function p(e,n,t){var i=t.addingMultipleValues,o=t.isList,c=t.itemsPerPage,u=t.pushHistory,a=void 0!==u&&u,p=t.resetLimitParams,f=d({},e);i?Object.entries(n).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];if(Array.isArray(i)){var o="".concat(t,"[]");f[o]=i.map(String)}})):o?Object.entries(n).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1],o=String(i),c="".concat(t,"[]"),u=f[c];u&&Array.isArray(u)?(u=u.map(String)).includes(o)?f[c]=(0,l.Od)(u,(function(e){return e===o})):f[c]=u.concat(o):f[c]=[o]})):f=d(d({},f),n),p&&(f._limit=c||20,f._offset=0),s(f,{pushHistory:a})}},79274:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines",function(){return t(46614)}])}},function(e){e.O(0,[3850,2083,2344,9386,6166,8180,9774,2888,179],(function(){return n=79274,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1221],{1210:function(e,n,t){"use strict";t.d(n,{Z:function(){return E}});var r=t(82394),i=t(21831),o=t(82684),c=t(47999),u=t(49894),l=t(93461),a=t(57384),d=t(12344),s=t(72454),p=t(28598);function f(e,n){var t=e.children;return(0,p.jsx)(s.HS,{ref:n,children:t})}var h=o.forwardRef(f),b=t(32063),g=t(15270),v=t(82531),m=t(66166),O=t(3055),j=t(49125),x=t(91427),y=t(24141);function P(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Z(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,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var E=function(e){var n,t=e.after,r=e.afterHidden,f=e.afterWidth,P=e.afterWidthOverride,E=e.before,w=e.beforeWidth,k=e.breadcrumbs,C=e.children,T=e.errors,S=e.headerMenuItems,A=e.navigationItems,R=e.setErrors,D=e.subheaderChildren,I=e.title,_=e.uuid,N=(0,y.i)().width,M="dashboard_after_width_".concat(_),L="dashboard_before_width_".concat(_),H=(0,o.useRef)(null),B=(0,o.useState)(P?f:(0,x.U2)(M,f)),Y=B[0],V=B[1],U=(0,o.useState)(!1),W=U[0],F=U[1],G=(0,o.useState)(E?Math.max((0,x.U2)(L,w),13*j.iI):null),X=G[0],q=G[1],z=(0,o.useState)(!1),K=z[0],Q=z[1],$=(0,o.useState)(null)[1],J=v.ZP.projects.list({},{revalidateOnFocus:!1}).data,ee=null===J||void 0===J?void 0:J.projects,ne=[];k?ne.push.apply(ne,(0,i.Z)(k)):(null===ee||void 0===ee?void 0:ee.length)>=1&&ne.push.apply(ne,[{label:function(){var e;return null===(e=ee[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},{bold:!0,label:function(){return I}}]),(0,o.useEffect)((function(){null===H||void 0===H||!H.current||W||K||null===$||void 0===$||$(H.current.getBoundingClientRect().width)}),[W,Y,K,X,H,$,N]),(0,o.useEffect)((function(){W||(0,x.t8)(M,Y)}),[r,W,Y,M]),(0,o.useEffect)((function(){K||(0,x.t8)(L,X)}),[K,X,L]);var te=(0,m.Z)(f);return(0,o.useEffect)((function(){P&&te!==f&&V(f)}),[P,f,te]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(a.Z,{title:I}),(0,p.jsx)(d.Z,{breadcrumbs:ne,menuItems:S,project:null===ee||void 0===ee?void 0:ee[0],version:null===ee||void 0===ee||null===(n=ee[0])||void 0===n?void 0:n.version}),(0,p.jsxs)(s.Nk,{children:[0!==(null===A||void 0===A?void 0:A.length)&&(0,p.jsx)(s.lm,{children:(0,p.jsx)(g.Z,{navigationItems:A})}),(0,p.jsx)(l.Z,{flex:1,flexDirection:"column",children:(0,p.jsxs)(b.Z,{after:t,afterHeightOffset:O.Mz,afterHidden:r,afterMousedownActive:W,afterWidth:Y,before:E,beforeHeightOffset:O.Mz,beforeMousedownActive:K,beforeWidth:s.k1+(E?X:0),hideAfterCompletely:!0,leftOffset:E?s.k1:null,mainContainerRef:H,setAfterMousedownActive:F,setAfterWidth:V,setBeforeMousedownActive:Q,setBeforeWidth:q,children:[D&&(0,p.jsx)(h,{children:D}),C]})})]}),T&&(0,p.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===R||void 0===R?void 0:R(null)},children:(0,p.jsx)(u.Z,Z(Z({},T),{},{onClose:function(){return null===R||void 0===R?void 0:R(null)}}))})]})}},86422:function(e,n,t){"use strict";t.d(n,{$W:function(){return p},DA:function(){return s},HX:function(){return b},J8:function(){return h},Lq:function(){return a},Qj:function(){return g},Ut:function(){return j},V4:function(){return O},VZ:function(){return f},dO:function(){return d},f2:function(){return m},iZ:function(){return v},t6:function(){return c},tf:function(){return l}});var r,i,o,c,u=t(82394);!function(e){e.PYTHON="python",e.R="r",e.SQL="sql",e.YAML="yaml"}(c||(c={}));var l,a,d=(r={},(0,u.Z)(r,c.PYTHON,"PY"),(0,u.Z)(r,c.R,"R"),(0,u.Z)(r,c.SQL,"SQL"),(0,u.Z)(r,c.YAML,"YAML"),r);!function(e){e.CHART="chart",e.CUSTOM="custom",e.DATA_EXPORTER="data_exporter",e.DATA_LOADER="data_loader",e.DBT="dbt",e.EXTENSION="extension",e.SCRATCHPAD="scratchpad",e.SENSOR="sensor",e.TRANSFORMER="transformer"}(l||(l={})),function(e){e.BLUE="blue",e.GREY="grey",e.PINK="pink",e.PURPLE="purple",e.TEAL="teal",e.YELLOW="yellow"}(a||(a={}));var s,p=[l.CHART,l.CUSTOM,l.DATA_EXPORTER,l.DATA_LOADER,l.SCRATCHPAD,l.SENSOR,l.TRANSFORMER],f=[l.DATA_EXPORTER,l.DATA_LOADER],h=[l.DATA_EXPORTER,l.DATA_LOADER,l.TRANSFORMER],b=[l.DATA_EXPORTER,l.DATA_LOADER,l.DBT,l.TRANSFORMER],g=[l.CHART,l.SCRATCHPAD,l.SENSOR],v=[l.EXTENSION,l.SCRATCHPAD];!function(e){e.EXECUTED="executed",e.FAILED="failed",e.NOT_EXECUTED="not_executed",e.UPDATED="updated"}(s||(s={}));var m=[l.CUSTOM,l.DATA_EXPORTER,l.TRANSFORMER],O=(i={},(0,u.Z)(i,l.CUSTOM,"Custom"),(0,u.Z)(i,l.DATA_EXPORTER,"Data exporter"),(0,u.Z)(i,l.DATA_LOADER,"Data loader"),(0,u.Z)(i,l.EXTENSION,"Extension"),(0,u.Z)(i,l.SCRATCHPAD,"Scratchpad"),(0,u.Z)(i,l.SENSOR,"Sensor"),(0,u.Z)(i,l.TRANSFORMER,"Transformer"),i),j=[l.DATA_LOADER,l.TRANSFORMER,l.DATA_EXPORTER,l.SENSOR];o={},(0,u.Z)(o,l.DATA_EXPORTER,"DE"),(0,u.Z)(o,l.DATA_LOADER,"DL"),(0,u.Z)(o,l.SCRATCHPAD,"SP"),(0,u.Z)(o,l.SENSOR,"SR"),(0,u.Z)(o,l.TRANSFORMER,"TF")},93348:function(e,n,t){"use strict";t.d(n,{TR:function(){return s},U5:function(){return l},Xm:function(){return o},Z4:function(){return d},fq:function(){return u},kJ:function(){return a}});var r,i,o,c=t(82394);!function(e){e.API="api",e.EVENT="event",e.TIME="time"}(o||(o={}));var u,l,a,d=(r={},(0,c.Z)(r,o.API,(function(){return"API"})),(0,c.Z)(r,o.EVENT,(function(){return"event"})),(0,c.Z)(r,o.TIME,(function(){return"schedule"})),r);!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(u||(u={})),function(e){e.ONCE="@once",e.HOURLY="@hourly",e.DAILY="@daily",e.WEEKLY="@weekly",e.MONTHLY="@monthly"}(l||(l={})),function(e){e.CREATED_AT="created_at",e.NAME="name",e.PIPELINE="pipeline_uuid",e.STATUS="status",e.TYPE="schedule_type"}(a||(a={}));var s=(i={},(0,c.Z)(i,a.CREATED_AT,"Created at"),(0,c.Z)(i,a.NAME,"Name"),(0,c.Z)(i,a.PIPELINE,"Pipeline"),(0,c.Z)(i,a.STATUS,"Status"),(0,c.Z)(i,a.TYPE,"Type"),i)},98781:function(e,n,t){"use strict";t.d(n,{$1:function(){return l},G7:function(){return d},QK:function(){return u},a_:function(){return s},qL:function(){return o},r0:function(){return a}});var r,i,o,c=t(82394);!function(e){e.INTEGRATION="integration",e.PYTHON="python",e.PYSPARK="pyspark",e.STREAMING="streaming"}(o||(o={}));var u,l,a,d=(r={},(0,c.Z)(r,o.INTEGRATION,"Integration"),(0,c.Z)(r,o.PYTHON,"Standard"),(0,c.Z)(r,o.PYSPARK,"PySpark"),(0,c.Z)(r,o.STREAMING,"Streaming"),r);!function(e){e.ACTIVE="active",e.INACTIVE="inactive",e.NO_SCHEDULES="no_schedules"}(u||(u={})),function(e){e.GROUP="group_by",e.STATUS="status[]",e.TYPE="type[]"}(l||(l={})),function(e){e.STATUS="status",e.TYPE="type"}(a||(a={}));var s=(i={},(0,c.Z)(i,o.PYTHON,"python3"),(0,c.Z)(i,o.PYSPARK,"pysparkkernel"),i)},18283:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=(t(82684),t(9518)),c=t(23831),u=t(73942),l=t(2005),a=t(49125),d=t(31012),s=t(28598),p=["children"];function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function h(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}var b=o.default.p.withConfig({displayName:"Badge__BadgeStyle",componentId:"sc-tfqsp0-0"})(["border-radius:","px;display:inline;font-family:",";margin:0;",";"," ",";",";"," "," "," "," ",""],u.BG,l.ry,d.iD,(function(e){return e.small&&"\n ".concat(d.HC,";\n ")}),(function(e){return!e.regular&&"\n padding: 2px 4px;\n "}),(function(e){return e.regular&&"\n padding: ".concat(1*a.iI,"px ").concat(1.25*a.iI,"px;\n ")}),(function(e){return e.noVerticalPadding&&"\n padding-bottom: 0;\n padding-top: 0;\n "}),(function(e){return!e.disabled&&"\n background-color: ".concat((e.theme||c.Z).background.row,";\n color: ").concat((e.theme||c.Z).content.muted,";\n ")}),(function(e){return e.cyan&&"\n background-color: ".concat((e.theme||c.Z).accent.cyan,";\n color: ").concat((e.theme||c.Z).monotone.black,";\n ")}),(function(e){return e.disabled&&"\n background-color: ".concat((e.theme||c.Z).feature.disabled,";\n color: ").concat((e.theme||c.Z).content.disabled,";\n ")}),(function(e){return e.quantifier&&"\n border-radius: 34px;\n line-height: 10px;\n padding: 4px 6px;\n "}));n.Z=function(e){var n=e.children,t=(0,i.Z)(e,p);return(0,s.jsx)(b,h(h({},t),{},{children:n}))}},30264:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=(t(82684),t(47999)),c=t(62084),u=t(28598),l=["children","items","open","onClickCallback","onClickOutside","parentRef","uuid"];function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.children,t=e.items,r=e.open,a=e.onClickCallback,s=e.onClickOutside,p=e.parentRef,f=e.uuid,h=(0,i.Z)(e,l),b=(0,u.jsxs)("div",{style:{position:"relative",zIndex:s?3:2},children:[(0,u.jsx)("div",{ref:p,children:n}),(0,u.jsx)(c.Z,d(d({},h),{},{items:t,onClickCallback:a,open:r,parentRef:p,uuid:f}))]});return s?(0,u.jsx)(o.Z,{onClickOutside:s,open:!0,children:b}):b}},29237:function(e,n,t){"use strict";var r=t(9518),i=t(67971),o=t(86673),c=t(19711),u=t(23831),l=t(73942),a=t(37391),d=t(49125),s=t(28598),p=(0,r.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*d.iI,1.5*d.iI,1.5*d.iI),f=r.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," ",""],l.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return"\n border: 1px solid ".concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return!e.dark&&"\n background-color: ".concat((e.theme.background||u.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||u.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),h=r.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],l.n_,l.n_,(function(e){return"\n background-color: ".concat((e.theme.background||u.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),p,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),b=r.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*d.iI,a.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*d.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),g=r.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],l.M8,l.YF,1.75*d.iI);n.Z=function(e){var n=e.borderless,t=e.children,r=e.containerRef,u=e.contentContainerRef,l=e.dark,a=e.footer,d=e.fullHeight,p=void 0===d||d,v=e.fullWidth,m=void 0===v||v,O=e.header,j=e.headerHeight,x=e.headerIcon,y=e.headerPaddingVertical,P=e.headerTitle,Z=e.maxHeight,E=e.maxWidth,w=e.minWidth,k=e.noPadding,C=e.overflowVisible,T=e.subtitle;return(0,s.jsxs)(f,{borderless:n,dark:l,fullHeight:p,fullWidth:m,maxHeight:Z,maxWidth:E,minWidth:w,overflowVisible:C,ref:r,children:[(O||P)&&(0,s.jsxs)(h,{headerPaddingVertical:y,height:j,children:[O&&O,P&&(0,s.jsx)(i.Z,{alignItems:"center",justifyContent:"space-between",children:(0,s.jsxs)(i.Z,{alignItems:"center",children:[x&&x,(0,s.jsx)(o.Z,{ml:x?1:0,children:(0,s.jsx)(c.ZP,{bold:!0,default:!0,children:P})})]})})]}),(0,s.jsxs)(b,{maxHeight:Z,noPadding:k,overflowVisible:C,ref:u,children:[T&&(0,s.jsx)(o.Z,{mb:2,children:(0,s.jsx)(c.ZP,{default:!0,children:T})}),t]}),a&&(0,s.jsx)(g,{children:a})]})}},38435:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=t(82684),c=t(9518),u=t(69898),l=t(28598),a=["rows"];function d(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?d(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var p=c.default.textarea.withConfig({displayName:"TextArea__TextInputStyle",componentId:"sc-112wx63-0"})(["",""],u.p),f=function(e,n){var t=e.rows,r=void 0===t?3:t,o=(0,i.Z)(e,a);return(0,l.jsx)(u.Z,s(s({},o),{},{input:(0,l.jsx)(p,s({rows:r},o)),ref:n}))};n.Z=o.forwardRef(f)},70902:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=t(82684),c=t(9518),u=t(69898),l=t(23831),a=t(28598),d=["checked","disabled","onCheck"];function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function p(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var f=c.default.label.withConfig({displayName:"ToggleSwitch__ToggleSwitchStyle",componentId:"sc-179r5zs-0"})([""," position:relative;display:inline-block;width:","px;min-width:","px;height:",'px;& input[type="checkbox"]{display:none;}& span{position:absolute;cursor:',";background-color:",";border-radius:13px;",';top:0;right:0;bottom:0;left:0;transition:background-color 0.2s ease;}& span::before{position:absolute;content:"";left:2px;top:2px;width:22px;height:22px;background-color:#787A85;border-radius:50%;transition:transform 0.3s ease;}& input[type="checkbox"]:checked + span::before{transform:translateX(20px);}',""],u.p,46,46,26,(function(e){return e.disabled?"not-allowed":"pointer"}),(function(e){return e.disabled?l.Z.monotone.white:l.Z.monotone.black}),(function(e){return e.disabled&&"border: 1px solid ".concat(l.Z.monotone.grey200)}),(function(e){return!e.disabled&&'\n & input[type="checkbox"]:checked + span {\n background-color: #6AA1E0;\n }\n\n & input[type="checkbox"]:checked + span::before {\n background-color: '.concat(l.Z.monotone.white,";\n }\n ")})),h=function(e,n){var t=e.checked,r=e.disabled,o=e.onCheck,c=(0,i.Z)(e,d);return(0,a.jsx)(u.Z,p(p({},c),{},{disabled:r,input:(0,a.jsxs)(f,p(p({},c),{},{disabled:r,noBackground:!0,noBorder:!0,children:[(0,a.jsx)("input",{checked:t,type:"checkbox"}),(0,a.jsx)("span",{onClick:r?null:function(){return null===o||void 0===o?void 0:o((function(e){return!e}))}})]})),noBackground:!0,ref:n}))};n.Z=o.forwardRef(h)},46614:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return we}});var r=t(77837),i=t(75582),o=t(82394),c=t(38860),u=t.n(c),l=t(12691),a=t.n(l),d=t(83455),s=t(82684),p=t(34376),f=t(60328),h=t(1210),b=t(93461),g=t(67971),v=t(11135),m=t(29237),O=t(86673),j=t(19711),x=t(38435),y=t(82944),P=t(28598);var Z=function(e){var n=e.description,t=e.isLoading,r=e.maxWidth,i=e.minWidth,o=e.noEmptyValue,c=e.onClose,u=e.onSave,l=e.textArea,a=e.title,d=e.value,p=(0,s.useRef)(null),h=(0,s.useState)(d),b=h[0],Z=h[1],E=l?x.Z:y.Z;return(0,s.useEffect)((function(){var e;null===p||void 0===p||null===(e=p.current)||void 0===e||e.focus()}),[]),(0,P.jsxs)(m.Z,{maxWidth:r,minWidth:i,children:[(0,P.jsx)(j.ZP,{bold:!0,children:a}),(0,P.jsx)(O.Z,{mt:1,children:(0,P.jsx)(E,{monospace:!0,onChange:function(e){return Z(e.target.value)},ref:p,rows:l?7:null,value:b})}),n&&(0,P.jsx)(O.Z,{mt:2,children:(0,P.jsx)(j.ZP,{muted:!0,small:!0,children:n})}),(0,P.jsx)(O.Z,{mt:3,children:(0,P.jsxs)(g.Z,{children:[(0,P.jsx)(v.ZP,{bold:!0,inline:!0,loading:t,onClick:function(){b===d||o&&!b?c():u(b)},outline:!0,primary:!0,uuid:"Inputs/InputModal/SaveInput",children:"Save"}),(0,P.jsx)(O.Z,{ml:1}),(0,P.jsx)(f.Z,{onClick:c,children:"Cancel"})]})})]})},E=t(10919),w=t(98781),k=t(41788),C=t(54283),T=t(58180),S=t(18283),A=t(47999),R=t(30264),D=t(62609),I=t(70902),_=t(9518),N=t(23831),M=t(73942),L=t(37391),H=t(49125),B=74*H.iI,Y=48*H.iI,V=_.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-18n432u-0"})(["position:absolute;border-radius:","px;overflow:hidden;width:","px;display:none;"," "," "," "," ",""],M.n_,B,(function(e){return"\n background-color: ".concat((e.theme||N.Z).background.panel,";\n border: ").concat(M.mP,"px ").concat(M.M8," ").concat((e.theme||N.Z).interactive.defaultBackground,";\n box-shadow: ").concat((e.theme.shadow||N.Z.shadow).window,";\n ")}),(function(e){return e.display&&"\n display: block;\n "}),(function(e){return e.compact&&"\n width: ".concat(.75*B,"px;\n ")}),(function(e){return"undefined"!==typeof e.left&&"\n left: ".concat(e.left,"px;\n ")}),(function(e){return"undefined"!==typeof e.top&&"\n top: ".concat(e.top,"px;\n ")})),U=_.default.div.withConfig({displayName:"indexstyle__MainStyle",componentId:"sc-18n432u-1"})(["display:flex;border-radius:","px;overflow:hidden;height:","px;"," ",""],M.n_,Y,(function(e){return"\n background-color: ".concat((e.theme||N.Z).background.content,";\n border: ").concat(M.YF,"px ").concat(M.M8," ").concat((e.theme||N.Z).interactive.defaultBackground,";\n ")}),(function(e){return e.compact&&"\n height: ".concat(Y/2,"px;\n ")})),W=_.default.aside.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-18n432u-2"})(["width:100%;overflow:auto;"," ",""],L.w5,(function(e){return"\n border-right: ".concat(M.YF,"px ").concat(M.M8," ").concat((e.theme||N.Z).background.panel,";\n ")})),F=_.default.div.withConfig({displayName:"indexstyle__ContentStyle",componentId:"sc-18n432u-3"})(["width:100%;overflow:auto;",""],L.w5),G=(0,_.css)(["display:flex;align-items:center;justify-content:space-between;padding:","px ","px;"],H.iI,2*H.iI),X=_.default.div.withConfig({displayName:"indexstyle__OptionStyle",componentId:"sc-18n432u-4"})([""," padding-top:","px;padding-bottom:","px;&:hover{cursor:pointer;","}",""],G,1.5*H.iI,1.5*H.iI,(function(e){return"\n background-color: ".concat((e.theme||N.Z).monotone.black,";\n ")}),(function(e){return e.highlighted&&"\n background-color: ".concat((e.theme||N.Z).monotone.black,";\n ")})),q=_.default.div.withConfig({displayName:"indexstyle__ToggleValueStyle",componentId:"sc-18n432u-5"})([""," ",""],G,(function(e){return"\n border-bottom: ".concat(M.YF,"px ").concat(M.M8," ").concat((e.theme||N.Z).borders.medium2,";\n ")})),z=t(10503),K=t(33766),Q=t(90211);function $(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function J(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?$(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ee,ne=function(e){var n,t,r,c=e.children,u=e.compact,l=e.onClickCallback,a=e.onClickOutside,d=e.onSecondaryClick,p=e.open,h=e.options,v=void 0===h?{}:h,m=e.parentRef,x=e.query,y=e.setOpen,Z=e.toggleValueMapping,E=(0,s.useState)(null),w=E[0],k=E[1],C=(0,s.useState)(v),T=C[0],S=C[1];(0,s.useEffect)((function(){S(v)}),[v]);var R=((null===m||void 0===m||null===(n=m.current)||void 0===n||null===(t=n.getBoundingClientRect)||void 0===t?void 0:t.call(n))||{}).top,D=void 0===R?0:R,_=Object.keys(v);return(0,P.jsxs)(A.Z,{onClickOutside:a,open:!0,children:[(0,P.jsx)("div",{ref:m,children:c}),(0,P.jsxs)(V,{compact:u,display:p,top:D-5,children:[(0,P.jsxs)(U,{compact:u,children:[(0,P.jsx)(b.Z,{flex:"1",children:(0,P.jsx)(W,{children:_.map((function(e){return(0,P.jsxs)(X,{highlighted:w===e,onMouseEnter:function(){return k(e)},children:[(0,P.jsx)(j.ZP,{children:(0,Q.kC)(e)}),(0,P.jsx)(z._Q,{})]},e)}))})}),(0,P.jsx)(b.Z,{flex:"2",children:(0,P.jsx)(F,{children:w&&Object.entries((null===(r=T||v)||void 0===r?void 0:r[w])||{}).map((function(e){var n=(0,i.Z)(e,2),t=n[0],r=n[1];return(0,P.jsxs)(q,{children:[(0,P.jsx)(j.ZP,{children:(null===Z||void 0===Z?void 0:Z[t])||(0,Q.J3)((0,Q.kC)(t))}),(0,P.jsx)(I.Z,{checked:r,onCheck:function(){return S((function(e){return J(J({},e),{},(0,o.Z)({},w,J(J({},null===e||void 0===e?void 0:e[w]),{},(0,o.Z)({},t,!r))))}))}})]},t)}))})})]}),(0,P.jsx)(O.Z,{m:1,children:(0,P.jsxs)(g.Z,{children:[(0,P.jsx)(f.Z,{onClick:function(){var e=Object.entries(T).reduce((function(e,n){var t=(0,i.Z)(n,2),r=t[0],o=t[1],c=[];return Object.entries(o).forEach((function(e){var n=(0,i.Z)(e,2),t=n[0];return n[1]&&c.push(t)})),e[r]=c,e}),{});null===l||void 0===l||l(),(0,K.g_)(x,e,{addingMultipleValues:!0,pushHistory:!0})},secondary:!0,children:"Apply"}),(0,P.jsx)(O.Z,{mr:1}),(0,P.jsx)(f.Z,{noBackground:!0,onClick:function(){y(!1),null===d||void 0===d||d()},children:"Defaults"})]})})]})]})},te=t(46261),re=t(99994),ie="".concat(1.5*H.iI,"px"),oe=40*H.iI,ce={bold:!0,greyBorder:!0,paddingBottom:9,paddingTop:9};!function(e){e[e.SECONDARY=1]="SECONDARY",e[e.DELETE=2]="DELETE"}(ee||(ee={}));var ue={autoHide:!0,size:null,widthFitContent:!0},le=t(7715),ae=t(9736);function de(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function se(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?de(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):de(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var pe=function(e){var n=e.addButtonProps,t=e.deleteRowProps,r=e.filterOptions,o=void 0===r?{}:r,c=e.filterValueLabelMapping,u=e.groupButtonProps,l=e.moreActionsMenuItems,a=e.query,d=void 0===a?{}:a,f=e.searchProps,h=e.secondaryActionButtonProps,m=e.selectedRowId,x=e.setSelectedRow,Z=(0,ae.Ct)(),E=(0,p.useRouter)(),w=(0,s.useRef)(null),k=(0,s.useRef)(null),C=(0,s.useRef)(null),T=(0,s.useRef)(null),I=(0,s.useRef)(null),_=(0,s.useState)(!1),N=_[0],L=_[1],B=(0,s.useState)(!1),Y=B[0],V=B[1],U=(0,s.useState)(!1),W=U[0],F=U[1],G=(0,s.useState)(!1),X=G[0],q=G[1],K=(0,s.useState)(null),Q=K[0],$=K[1],J=!m,de=(0,s.useCallback)((function(){return L(!1)}),[]),pe=(0,s.useCallback)((function(){return V(!1)}),[]),fe=(0,s.useCallback)((function(){return F(!1)}),[]),he=(0,s.useCallback)((function(){return q(null)}),[]),be=(0,s.useCallback)((function(){return $(null)}),[]),ge=h||{},ve=ge.Icon,me=ge.confirmationDescription,Oe=ge.confirmationMessage,je=ge.isLoading,xe=ge.label,ye=ge.onClick,Pe=ge.openConfirmationDialogue,Ze=ge.tooltip,Ee=t||{},we=Ee.confirmationMessage,ke=Ee.isLoading,Ce=Ee.item,Te=Ee.onDelete,Se=f||{},Ae=Se.placeholder,Re=Se.onChange,De=Se.value,Ie=(0,s.useMemo)((function(){return Object.entries(o).reduce((function(e,n){var t=(0,i.Z)(n,2),r=t[0],o=t[1];return e[r]={},o.forEach((function(n){var t,i=(null===(t=d["".concat(r,"[]")])||void 0===t?void 0:t.includes(n))||!1;e[r][n]=i})),e}),{})}),[o,d]),_e=n||{},Ne=_e.label,Me=_e.menuItems,Le=_e.isLoading,He=(0,s.useMemo)((function(){return(0,P.jsx)(R.Z,{disableKeyboardShortcuts:!0,items:Me,onClickCallback:de,onClickOutside:de,open:N,parentRef:w,roundedStyle:!0,topOffset:1,uuid:"Table/Toolbar/NewItemMenu",children:(0,P.jsx)(v.ZP,se(se({},ce),{},{background:re.eW,beforeElement:(0,P.jsx)(z.mm,{size:2.5*H.iI}),loading:Le,onClick:function(e){e.preventDefault(),L((function(e){return!e}))},uuid:"Table/Toolbar/AddButton",children:Ne}))})}),[Ne,Me,N,de,Le]),Be=(0,s.useMemo)((function(){return(0,le.dw)(Ie)}),[Ie]),Ye=(0,s.useMemo)((function(){return(0,P.jsx)(ne,{compact:!0,onClickCallback:pe,onClickOutside:pe,onSecondaryClick:function(){return E.push("/pipelines")},open:Y,options:Ie,parentRef:k,query:d,setOpen:V,toggleValueMapping:c,children:(0,P.jsx)(v.ZP,se(se({},ce),{},{afterElement:Be>0?(0,P.jsx)(S.Z,{cyan:!0,noVerticalPadding:!0,children:(0,P.jsx)(j.ZP,{bold:!0,inverted:!0,children:Be})}):null,beforeElement:(0,P.jsx)(z.wn,{size:2*H.iI}),onClick:function(){return V((function(e){return!e}))},uuid:"Table/Toolbar/FilterButton",children:"Filter"}))})}),[pe,Y,Ie,c,Be,d,E]),Ve=u||{},Ue=Ve.groupByLabel,We=Ve.menuItems,Fe=(0,s.useMemo)((function(){return(0,P.jsx)(R.Z,{disableKeyboardShortcuts:!0,items:We,onClickCallback:fe,onClickOutside:fe,open:W,parentRef:C,roundedStyle:!0,topOffset:1,uuid:"Table/Toolbar/GroupMenu",children:(0,P.jsx)(v.ZP,se(se({},ce),{},{beforeElement:(0,P.jsx)(z.ZA,{size:2.5*H.iI}),onClick:function(){F((function(e){return!e}))},uuid:"Table/Toolbar/GroupButton",children:Ue?"Grouped by ".concat(Ue):"Group"}))})}),[fe,W,We]),Ge=(0,s.useMemo)((function(){return(0,P.jsx)(R.Z,{disableKeyboardShortcuts:!0,items:l,onClickCallback:he,onClickOutside:he,open:X,parentRef:T,roundedStyle:!0,topOffset:1,uuid:"Table/Toolbar/MoreActionsMenu",children:(0,P.jsx)(te.Z,se(se({},ue),{},{label:"More actions",children:(0,P.jsx)(v.ZP,{Icon:z.mH,bold:!0,disabled:J,greyBorder:!0,onClick:function(){return q((function(e){return!e}))},smallIcon:!0,uuid:"Table/Toolbar/MoreActionsButton"})}))})}),[he,J,X,l]);return(0,P.jsxs)(g.Z,{alignItems:"center",children:[He,(0,P.jsx)(O.Z,{mr:ie}),Ye,(null===We||void 0===We?void 0:We.length)>0&&(0,P.jsx)(O.Z,{ml:ie,children:Fe}),!Z&&ye&&(0,P.jsxs)(O.Z,{ml:ie,children:[(0,P.jsx)(te.Z,se(se({},ue),{},{label:Ze,children:(0,P.jsx)(v.ZP,{Icon:!je&&ve,bold:!0,disabled:J,greyBorder:!0,loading:je,onClick:Pe?function(){return $(ee.SECONDARY)}:ye,smallIcon:!0,uuid:"Table/Toolbar/SecondaryActionButton",children:xe})})),(0,P.jsx)(A.Z,{onClickOutside:be,open:Q===ee.SECONDARY,children:(0,P.jsx)(D.Z,{onCancel:be,onClick:function(){ye(),be(),x(null)},subtitle:me,title:Oe,top:58,width:oe})})]}),!Z&&Te&&(0,P.jsxs)(O.Z,{ml:ie,children:[(0,P.jsx)(te.Z,se(se({},ue),{},{label:"Delete ".concat(Ce),children:(0,P.jsx)(v.ZP,{Icon:!ke&&z.rF,bold:!0,disabled:J,greyBorder:!0,loading:ke,onClick:function(){return $(ee.DELETE)},smallIcon:!0,uuid:"Table/Toolbar/DeleteButton"})})),(0,P.jsx)(A.Z,{onClickOutside:be,open:Q===ee.DELETE,children:(0,P.jsx)(D.Z,{danger:!0,onCancel:be,onClick:function(){Te(m),be(),x(null)},subtitle:we,title:"Are you sure you want to delete the ".concat(Ce," ").concat(m,"?"),top:58,width:oe})})]}),!Z&&(null===l||void 0===l?void 0:l.length)>0&&(0,P.jsx)(O.Z,{ml:ie,children:Ge}),Re&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(O.Z,{ml:ie}),(0,P.jsx)(b.Z,{flex:1,children:(0,P.jsx)(y.Z,{afterIcon:De?(0,P.jsx)(z.x8,{}):null,afterIconClick:function(){var e;Re(""),null===I||void 0===I||null===(e=I.current)||void 0===e||e.focus()},afterIconSize:1.5*H.iI,beforeIcon:(0,P.jsx)(z.HN,{}),borderRadius:M.n_,defaultColor:!0,fullWidth:!0,greyBorder:!0,maxWidth:60*H.iI,onChange:function(e){return Re(e.target.value)},paddingVertical:9,placeholder:Ae||null,ref:I,value:De})})]})]})},fe=t(82531),he=t(86422),be=t(93348),ge=t(3055),ve=t(45838),me=t(59e3),Oe=t(96510),je=t(66653),xe=t(83608);function ye(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Pe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ye(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ye(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ze={borderRadius:M.BG,iconOnly:!0,noBackground:!0,noBorder:!0,outline:!0,padding:"4px"};function Ee(){var e=(0,p.useRouter)(),n=(0,s.useState)(null),t=n[0],r=n[1],c=(0,s.useState)(null),u=c[0],l=c[1],g=(0,s.useState)({}),v=g[0],m=g[1],x=(0,s.useState)(null),y=x[0],k=x[1],S=(0,me.iV)(),A=(0,me.DQ)(S,[w.$1.STATUS,w.$1.TYPE]),R=null===S||void 0===S?void 0:S[w.$1.GROUP],D=fe.ZP.pipelines.list(Pe(Pe({},A),{},{include_schedules:1})),I=D.data,_=D.mutate,M=(0,s.useMemo)((function(){var e=(null===I||void 0===I?void 0:I.pipelines)||[];if(u){var n=u.toLowerCase();e=e.filter((function(e){var t=e.name,r=e.description,i=e.uuid;return(null===t||void 0===t?void 0:t.toLowerCase().includes(n))||(null===i||void 0===i?void 0:i.toLowerCase().includes(n))||(null===r||void 0===r?void 0:r.toLowerCase().includes(n))}))}return e}),[null===I||void 0===I?void 0:I.pipelines,u]),L=function(e){return(0,d.Db)(fe.ZP.pipelines.useCreate(),{onSuccess:function(n){return(0,Oe.wD)(n,{callback:function(n){var t=n.pipeline.uuid;null===e||void 0===e||e(t)},onErrorCallback:function(e,n){return k({errors:n,response:e})}})}})},B=L((function(n){return e.push("/pipelines/[pipeline]/edit","/pipelines/".concat(n,"/edit"))})),Y=(0,i.Z)(B,2),V=Y[0],U=Y[1].isLoading,W=L((function(){return null===_||void 0===_?void 0:_()})),F=(0,i.Z)(W,2),G=F[0],X=F[1].isLoading,q=(0,d.Db)((function(e){return fe.ZP.pipelines.useUpdate(e.uuid)({pipeline:e})}),{onSuccess:function(e){return(0,Oe.wD)(e,{callback:function(e){var n=e.pipeline.uuid;m((function(e){return Pe(Pe({},e),{},(0,o.Z)({},n,!1))})),_(),null===le||void 0===le||le(),r(null)},onErrorCallback:function(e,n){var t,r=null===e||void 0===e||null===(t=e.url_parameters)||void 0===t?void 0:t.pk;m((function(e){return Pe(Pe({},e),{},(0,o.Z)({},r,!1))})),k({errors:n,response:e})}})}}),$=(0,i.Z)(q,2),J=$[0],ee=$[1].isLoading,ne=(0,d.Db)((function(e){return fe.ZP.pipelines.useDelete(e)()}),{onSuccess:function(e){return(0,Oe.wD)(e,{callback:function(){null===_||void 0===_||_()},onErrorCallback:function(e,n){return k({errors:n,response:e})}})}}),te=(0,i.Z)(ne,2),re=te[0],ie=te[1].isLoading,oe=(0,xe.dd)((function(e){var n=e.pipelineDescription,r=e.pipelineName;return(0,P.jsx)(Z,{isLoading:ee,minWidth:55*H.iI,noEmptyValue:!!r,onClose:le,onSave:function(e){if(t){var n=t.uuid,i={uuid:n};r?i.name=e:i.description=e,m((function(e){return Pe(Pe({},e),{},(0,o.Z)({},n,!0))})),J(i)}},textArea:!r,title:r?"Rename pipeline":"Edit description",value:r||n})}),{},[ee,t],{background:!0,uuid:"rename_pipeline_and_save"}),ce=(0,i.Z)(oe,2),ue=ce[0],le=ce[1],ae=(0,s.useMemo)((function(){return(0,P.jsx)(pe,{addButtonProps:{isLoading:U,label:"New",menuItems:[{label:function(){return"Standard (batch)"},onClick:function(){return V({pipeline:{name:(0,Q.Y6)()}})},uuid:"Pipelines/NewPipelineMenu/standard"},{label:function(){return"Data integration"},onClick:function(){return V({pipeline:{name:(0,Q.Y6)(),type:w.qL.INTEGRATION}})},uuid:"Pipelines/NewPipelineMenu/integration"},{label:function(){return"Streaming"},onClick:function(){return V({pipeline:{name:(0,Q.Y6)(),type:w.qL.STREAMING}})},uuid:"Pipelines/NewPipelineMenu/streaming"}]},deleteRowProps:{confirmationMessage:"This is irreversible and will immediately delete everything associated with the pipeline, including its blocks, triggers, runs, logs, and history.",isLoading:ie,item:"pipeline",onDelete:function(){return re(null===t||void 0===t?void 0:t.uuid)}},filterOptions:{status:Object.values(w.QK),type:Object.values(w.qL)},filterValueLabelMapping:w.G7,groupButtonProps:{groupByLabel:R,menuItems:[{beforeIcon:(0,P.jsx)(z.Jr,{fill:R===w.r0.STATUS?N.Z.content.default:N.Z.interactive.transparent,size:2*H.iI}),label:function(){return(0,Q.kC)(w.r0.STATUS)},onClick:function(){return(0,K.u7)((0,o.Z)({},w.$1.GROUP,R===w.r0.STATUS?null:w.r0.STATUS),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Status"},{beforeIcon:(0,P.jsx)(z.Jr,{fill:R===w.r0.TYPE?N.Z.content.default:N.Z.interactive.transparent,size:2*H.iI}),label:function(){return(0,Q.kC)(w.r0.TYPE)},onClick:function(){return(0,K.u7)((0,o.Z)({},w.$1.GROUP,R===w.r0.TYPE?null:w.r0.TYPE),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Type"}]},moreActionsMenuItems:[{label:function(){return"Rename pipeline"},onClick:function(){return ue({pipelineName:null===t||void 0===t?void 0:t.name})},uuid:"Pipelines/MoreActionsMenu/Rename"},{label:function(){return"Edit description"},onClick:function(){return ue({pipelineDescription:null===t||void 0===t?void 0:t.description})},uuid:"Pipelines/MoreActionsMenu/EditDescription"}],query:A,searchProps:{onChange:l,value:u},secondaryActionButtonProps:{Icon:z.oX,confirmationDescription:"Cloning the selected pipeline will create a new pipeline with the same configuration and code blocks. The blocks use the same block files as the original pipeline. Pipeline triggers, runs, backfills, and logs are not copied over to the new pipeline.",confirmationMessage:"Do you want to clone the pipeline ".concat(null===t||void 0===t?void 0:t.uuid,"?"),isLoading:X,onClick:function(){return G({pipeline:{clone_pipeline_uuid:null===t||void 0===t?void 0:t.uuid}})},openConfirmationDialogue:!0,tooltip:"Clone pipeline"},selectedRowId:null===t||void 0===t?void 0:t.uuid,setSelectedRow:r})}),[G,V,re,R,X,U,ie,A,u,null===t||void 0===t?void 0:t.description,null===t||void 0===t?void 0:t.name,null===t||void 0===t?void 0:t.uuid,ue]);return(0,P.jsx)(h.Z,{errors:y,setErrors:k,subheaderChildren:ae,title:"Pipelines",uuid:"pipelines/index",children:0===(null===M||void 0===M?void 0:M.length)?(0,P.jsx)(O.Z,{px:3,py:1,children:I?(0,P.jsx)(j.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No pipelines available"}):(0,P.jsx)(C.Z,{inverted:!0,large:!0})}):(0,P.jsx)(ve.cl,{includePadding:!!R,maxHeight:"calc(100vh - ".concat(ge.Mz+74,"px)"),children:(0,P.jsx)(T.Z,{columnFlex:[null,1,3,4,1,1,1,null],columns:[{label:function(){return""},uuid:"action"},{uuid:(0,Q.kC)(w.r0.STATUS)},{uuid:"Name"},{uuid:"Description"},{uuid:(0,Q.kC)(w.r0.TYPE)},{uuid:"Blocks"},{uuid:"Triggers"},{center:!0,uuid:"Actions"}],grouping:{column:(0,Q.kC)(R),columnIndex:R===w.r0.STATUS?1:R===w.r0.TYPE?4:null,values:R===w.r0.STATUS?Object.values(w.QK).map((function(e){return(0,Q.J3)(e)})):R===w.r0.TYPE?Object.values(w.qL).map((function(e){return w.G7[e]})):[]},isSelectedRow:function(e){var n;return(null===(n=M[e])||void 0===n?void 0:n.uuid)===(null===t||void 0===t?void 0:t.uuid)},onClickRow:function(e){return r((function(n){var t=M[e];return(null===n||void 0===n?void 0:n.uuid)!==(null===t||void 0===t?void 0:t.uuid)?t:null}))},onDoubleClickRow:function(n){e.push("/pipelines/[pipeline]","/pipelines/".concat(M[n].uuid))},rows:M.map((function(n,t){var r=n.blocks,i=n.description,c=n.schedules,u=n.type,l=n.uuid,d=r.filter((function(e){var n=e.type;return he.tf.SCRATCHPAD!==n})).length,s=c.length,p=c.find((function(e){var n=e.status;return be.fq.ACTIVE===n}));return[s>=1||v[l]?(0,P.jsx)(f.Z,{iconOnly:!0,loading:!!v[l],noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(e){(0,je.j)(e),m((function(e){return Pe(Pe({},e),{},(0,o.Z)({},l,!0))})),J(Pe(Pe({},n),{},{status:p?be.fq.INACTIVE:be.fq.ACTIVE}))},children:p?(0,P.jsx)(z.dz,{muted:!0,size:2*H.iI}):(0,P.jsx)(z.Py,{default:!0,size:2*H.iI})}):null,(0,P.jsx)(j.ZP,{default:!p,monospace:!0,success:!!p,children:p?be.fq.ACTIVE:s>=1?be.fq.INACTIVE:"no schedules"},"pipeline_status_".concat(t)),(0,P.jsx)(a(),{as:"/pipelines/".concat(l),href:"/pipelines/[pipeline]",passHref:!0,children:(0,P.jsx)(E.Z,{sameColorAsText:!0,children:l})},"pipeline_name_".concat(t)),(0,P.jsx)(j.ZP,{default:!0,title:i,width:90*H.iI,children:i},"pipeline_description_".concat(t)),(0,P.jsx)(j.ZP,{children:w.G7[u]},"pipeline_type_".concat(t)),(0,P.jsx)(j.ZP,{default:0===d,monospace:!0,children:d},"pipeline_block_count_".concat(t)),(0,P.jsx)(j.ZP,{default:0===s,monospace:!0,children:s},"pipeline_trigger_count_".concat(t)),(0,P.jsxs)(b.Z,{flex:1,justifyContent:"flex-end",children:[(0,P.jsx)(f.Z,Pe(Pe({},Ze),{},{onClick:function(){e.push("/pipelines/[pipeline]","/pipelines/".concat(l))},title:"Detail",children:(0,P.jsx)(z.UY,{default:!0,size:2*H.iI})})),(0,P.jsx)(O.Z,{mr:1}),(0,P.jsx)(f.Z,Pe(Pe({},Ze),{},{onClick:function(){e.push("/pipelines/[pipeline]/logs","/pipelines/".concat(l,"/logs"))},title:"Logs",children:(0,P.jsx)(z.$B,{default:!0,size:2*H.iI})}))]},"chevron_icon_".concat(t))]})),stickyHeader:!0})})})}Ee.getInitialProps=(0,r.Z)(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var we=(0,k.Z)(Ee)},33766:function(e,n,t){"use strict";t.d(n,{g_:function(){return p},u7:function(){return s}});var r=t(75582),i=t(82394),o=t(34376),c=t.n(o),u=t(59e3),l=t(24224);function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e){var n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.replaceParams,o=t.pushHistory,l=i?{}:(0,u.iV)();n=window.location.pathname;var a=o?c().push:c().replace,s=d(d({},l),e);Object.entries(e).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];"undefined"!==typeof i&&null!==i||delete s[t]}));var p=(0,u.uM)(s);p.length>=1&&(p="?".concat(p));var f="".concat(n.split("?")[0]).concat(p);return a(c().router.pathname,f,{shallow:!0})}function p(e,n,t){var i=t.addingMultipleValues,o=t.isList,c=t.itemsPerPage,u=t.pushHistory,a=void 0!==u&&u,p=t.resetLimitParams,f=d({},e);i?Object.entries(n).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];if(Array.isArray(i)){var o="".concat(t,"[]");f[o]=i.map(String)}})):o?Object.entries(n).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1],o=String(i),c="".concat(t,"[]"),u=f[c];u&&Array.isArray(u)?(u=u.map(String)).includes(o)?f[c]=(0,l.Od)(u,(function(e){return e===o})):f[c]=u.concat(o):f[c]=[o]})):f=d(d({},f),n),p&&(f._limit=c||20,f._offset=0),s(f,{pushHistory:a})}},79274:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines",function(){return t(46614)}])}},function(e){e.O(0,[3850,2083,2344,9386,6166,8180,9774,2888,179],(function(){return n=79274,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3853],{1210:function(e,n,t){"use strict";t.d(n,{Z:function(){return Z}});var r=t(82394),i=t(21831),o=t(82684),c=t(47999),l=t(28358),u=t(93461),d=t(57384),s=t(12344),a=t(72454),f=t(28598);function p(e,n){var t=e.children;return(0,f.jsx)(a.HS,{ref:n,children:t})}var h=o.forwardRef(p),b=t(32063),v=t(15270),m=t(82531),g=t(66166),x=t(3055),j=t(49125),k=t(91427),y=t(24141);function O(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function w(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?O(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Z=function(e){var n,t=e.after,r=e.afterHidden,p=e.afterWidth,O=e.afterWidthOverride,Z=e.before,P=e.beforeWidth,C=e.breadcrumbs,_=e.children,I=e.errors,S=e.headerMenuItems,D=e.navigationItems,E=e.setErrors,W=e.subheaderChildren,M=e.title,H=e.uuid,N=(0,y.i)().width,A="dashboard_after_width_".concat(H),q="dashboard_before_width_".concat(H),T=(0,o.useRef)(null),B=(0,o.useState)(O?p:(0,k.U2)(A,p)),R=B[0],F=B[1],U=(0,o.useState)(!1),Y=U[0],z=U[1],G=(0,o.useState)(Z?Math.max((0,k.U2)(q,P),13*j.iI):null),X=G[0],J=G[1],L=(0,o.useState)(!1),Q=L[0],V=L[1],K=(0,o.useState)(null)[1],$=m.ZP.projects.list({},{revalidateOnFocus:!1}).data,ee=null===$||void 0===$?void 0:$.projects,ne=[];C?ne.push.apply(ne,(0,i.Z)(C)):(null===ee||void 0===ee?void 0:ee.length)>=1&&ne.push.apply(ne,[{label:function(){var e;return null===(e=ee[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},{bold:!0,label:function(){return M}}]),(0,o.useEffect)((function(){null===T||void 0===T||!T.current||Y||Q||null===K||void 0===K||K(T.current.getBoundingClientRect().width)}),[Y,R,Q,X,T,K,N]),(0,o.useEffect)((function(){Y||(0,k.t8)(A,R)}),[r,Y,R,A]),(0,o.useEffect)((function(){Q||(0,k.t8)(q,X)}),[Q,X,q]);var te=(0,g.Z)(p);return(0,o.useEffect)((function(){O&&te!==p&&F(p)}),[O,p,te]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(d.Z,{title:M}),(0,f.jsx)(s.Z,{breadcrumbs:ne,menuItems:S,project:null===ee||void 0===ee?void 0:ee[0],version:null===ee||void 0===ee||null===(n=ee[0])||void 0===n?void 0:n.version}),(0,f.jsxs)(a.Nk,{children:[0!==(null===D||void 0===D?void 0:D.length)&&(0,f.jsx)(a.lm,{children:(0,f.jsx)(v.Z,{navigationItems:D})}),(0,f.jsx)(u.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(b.Z,{after:t,afterHeightOffset:x.Mz,afterHidden:r,afterMousedownActive:Y,afterWidth:R,before:Z,beforeHeightOffset:x.Mz,beforeMousedownActive:Q,beforeWidth:a.k1+(Z?X:0),hideAfterCompletely:!0,leftOffset:Z?a.k1:null,mainContainerRef:T,setAfterMousedownActive:z,setAfterWidth:F,setBeforeMousedownActive:V,setBeforeWidth:J,children:[W&&(0,f.jsx)(h,{children:W}),_]})})]}),I&&(0,f.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===E||void 0===E?void 0:E(null)},children:(0,f.jsx)(l.Z,w(w({},I),{},{onClose:function(){return null===E||void 0===E?void 0:E(null)}}))})]})}},2850:function(e,n,t){"use strict";t.d(n,{M:function(){return l},W:function(){return c}});var r=t(9518),i=t(23831),o=t(3055),c=34*t(49125).iI,l=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);",""],o.Mz,(function(e){return"\n border-left: 1px solid ".concat((e.theme.borders||i.Z.borders).medium,";\n ")}))},79585:function(e,n,t){"use strict";t.d(n,{DQ:function(){return s},HY:function(){return c},SA:function(){return a},WH:function(){return o},eC:function(){return u},fF:function(){return l},tC:function(){return d}});var r=t(81132),i=t(9736),o="Workspace",c="Preferences",l="Git settings",u="Users",d="Account",s="Profile",a=function(e){var n=e.owner,t=e.roles,a=[{linkProps:{href:"/settings/workspace/preferences"},uuid:c}];n&&a.push({linkProps:{href:"/settings/workspace/users"},uuid:u}),(!(0,i.YB)()||t<=r.No.EDITOR)&&a.push({linkProps:{href:"/settings/workspace/sync-data"},uuid:l});var f=[{items:a,uuid:o}];return(0,i.YB)()?f.concat([{items:[{linkProps:{href:"/settings/account/profile"},uuid:s}],uuid:d}]):f}},30775:function(e,n,t){"use strict";t.d(n,{Z:function(){return w}});var r=t(1210),i=t(82394),o=t(12691),c=t.n(o),l=t(10919),u=t(86673),d=t(19711),s=t(9518),a=t(23831),f=t(49125),p=t(90880),h=(f.iI,s.default.div.withConfig({displayName:"indexstyle__SectionTitleStyle",componentId:"sc-1y8dyue-0"})(["padding:","px ","px;"],1*f.iI,2.5*f.iI)),b=s.default.div.withConfig({displayName:"indexstyle__ItemStyle",componentId:"sc-1y8dyue-1"})([""," padding:","px ","px;"," ",""],(0,p.eR)(),1.5*f.iI,2.5*f.iI,(function(e){return!e.selected&&"\n &:hover {\n background-color: ".concat((e.theme.background||a.Z.background).codeArea,";\n }\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.background||a.Z.background).codeTextarea,";\n ")})),v=t(28598),m=t(82684);function g(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}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}var j=function(e){var n=e.isItemSelected,t=e.sections;return(0,v.jsx)(u.Z,{py:f.Gg,children:null===t||void 0===t?void 0:t.map((function(e){var t=e.items,r=e.title,i=e.uuid;return(0,v.jsxs)(u.Z,{children:[(0,v.jsx)(h,{children:(0,v.jsx)(d.ZP,{bold:!0,muted:!0,small:!0,uppercase:!0,children:r?r():i})}),null===t||void 0===t?void 0:t.map((function(e){var t=e.label,r=e.linkProps,o=e.onClick,u=e.uuid,d=t?t():u,s=(0,v.jsx)(b,{selected:null===n||void 0===n?void 0:n(x(x({},e),{},{uuidWorkspace:i})),children:d});return r?(0,m.createElement)(c(),x(x({},r),{},{key:u,passHref:!0}),(0,v.jsx)(l.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,sameColorAsText:!0,children:s})):(0,v.jsx)(l.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,onClick:o,preventDefault:!0,sameColorAsText:!0,children:s},u)}))]},i)}))})},k=t(2850),y=t(79585),O=t(9736);var w=function(e){var n=e.after,t=e.afterHidden,i=e.children,o=e.uuidItemSelected,c=e.uuidWorkspaceSelected,l=(0,O.PR)()||{};return(0,v.jsx)(r.Z,{after:n,afterHidden:!n||t,afterWidth:n?50*f.iI:0,afterWidthOverride:!0,before:(0,v.jsx)(k.M,{children:(0,v.jsx)(j,{isItemSelected:function(e){var n=e.uuid,t=e.uuidWorkspace;return c===t&&o===n},sections:(0,y.SA)(l)})}),beforeWidth:k.W,title:"Settings",uuid:"settings/index",children:i})}},38341:function(e,n,t){"use strict";var r=t(21831),i=t(82394),o=t(26304),c=(t(82684),t(9518)),l=t(67971),u=t(86673),d=t(19711),s=t(23831),a=t(10503),f=t(73942),p=t(49125),h=t(28598),b=["beforeIcon","checked","disabled","errorMessage","label","labelDescription","large","meta","monospace","onClick","required","small","warning","xsmall"];function v(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function m(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}var g=c.default.div.withConfig({displayName:"Checkbox__CheckboxContainer",componentId:"sc-ujqx42-0"})(["display:inline-block;vertical-align:middle;cursor:pointer;"]),x=c.default.div.withConfig({displayName:"Checkbox__ErrorContainer",componentId:"sc-ujqx42-1"})(["margin-top:4px;"]),j=c.default.input.withConfig({displayName:"Checkbox__HiddenCheckbox",componentId:"sc-ujqx42-2"})(["border:0;clip:rect(0 0 0 0);clippath:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px;",""],(function(e){return e.notClickable&&"\n background-color: ".concat((e.theme.content||s.Z.content).disabled,"\n border-color: ").concat((e.theme.content||s.Z.content).disabled,"\n\n &:hover {\n cursor: not-allowed;\n }\n ")})),k=c.default.div.withConfig({displayName:"Checkbox__StyledCheckbox",componentId:"sc-ujqx42-3"})(["border-radius:","px;height:","px;transition:all 150ms;width:","px;svg{position:relative;visibility:",";}"," "," "," "," input[disabled]{cursor:default;}"," ",""],.5*p.iI,2*p.iI,2*p.iI,(function(e){return e.checked||e.required?"visible":"hidden"}),(function(e){return e.large&&"\n svg {\n left: -4px;\n top: -8px;\n }\n "}),(function(e){return!e.checked&&"\n background-color: ".concat((e.theme.background||s.Z.background).popup,";\n border: ").concat(f.PV,"px ").concat(f.M8," ").concat((e.theme.content||s.Z.content).muted,";\n ")}),(function(e){return e.checked&&"\n background-color: ".concat((e.theme.interactive||s.Z.interactive).checked,";\n border: ").concat(f.YF,"px ").concat(f.M8," transparent;\n ")}),(function(e){return e.required&&"\n background-color: ".concat((e.theme.content||s.Z.content).disabled,";\n border: ").concat(f.YF,"px ").concat(f.M8," transparent;\n ")}),(function(e){return e.disabled&&"\n background-color: ".concat((e.theme.content||s.Z.content).disabled,";\n border-color: ").concat((e.theme.content||s.Z.content).disabled,";\n\n &:hover {\n cursor: not-allowed;\n }\n ")}),(function(e){return e.warning&&"\n background-color: ".concat((e.theme.accent||s.Z.accent).warning,";\n border-color: ").concat((e.theme.interactive||s.Z.interactive).defaultBorder,"\n ")})),y=c.default.label.withConfig({displayName:"Checkbox__LabelStyle",componentId:"sc-ujqx42-4"})(["-ms-flex-direction:column;align-items:center;display:flex;flex-direction:column;flex-direction:row;&:hover{cursor:pointer;}"]);n.Z=function(e){var n=e.beforeIcon,t=e.checked,i=e.disabled,c=e.errorMessage,s=e.label,f=e.labelDescription,v=e.large,O=e.meta,w=e.monospace,Z=void 0!==w&&w,P=e.onClick,C=e.required,_=e.small,I=void 0!==_&&_,S=e.warning,D=e.xsmall,E=void 0!==D&&D,W=(0,o.Z)(e,b),M=S||!!(c||O&&O.touched&&O.error);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(y,{onClick:function(e){e.preventDefault(),P&&P(e)},children:[(0,h.jsxs)(g,{children:[(0,h.jsx)(j,m(m({},W),{},{disabled:i?"disabled":void 0,notClickable:i})),(0,h.jsx)(k,{checked:t,disabled:i,large:v,required:C,warning:M,children:(0,h.jsx)(a.Jr,{size:p.iI*(v?3:2)})})]}),n&&(0,h.jsx)(u.Z,{ml:1,children:(0,h.jsx)(l.Z,{children:n})}),s&&(0,h.jsxs)(u.Z,{pl:1,children:["string"===typeof s&&(0,h.jsx)(d.ZP,{disabled:i,lineThrough:i,monospace:Z,small:I,xsmall:E,children:s}),"string"!==typeof s&&s,f&&(0,h.jsx)(d.ZP,{muted:!0,small:!0,children:f})]})]}),(c||O&&O.touched&&O.error)&&(0,h.jsx)(x,{children:(0,h.jsx)(d.ZP,{small:!0,warning:!0,children:c?(0,r.Z)(c):O.error})})]})}},42949:function(e,n,t){"use strict";t.r(n);var r=t(77837),i=t(38860),o=t.n(i),c=t(82684),l=t(38341),u=t(67971),d=t(41788),s=t(30775),a=t(86673),f=t(11366),p=t(49125),h=t(79585),b=t(91427),v=t(28598);function m(){var e=(0,c.useState)(!!(0,b.U2)(f.k)),n=e[0],t=e[1];return(0,v.jsx)(s.Z,{uuidItemSelected:h.HY,uuidWorkspaceSelected:h.WH,children:(0,v.jsx)(a.Z,{p:p.cd,children:(0,v.jsx)(u.Z,{alignItems:"center",children:(0,v.jsx)(l.Z,{checked:n,label:"Automatically use randomly generated name for blocks created in the future",onClick:function(){t(!n),(0,b.t8)(f.k,!n)}})})})})}m.getInitialProps=(0,r.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,d.Z)(m)},11366:function(e,n,t){"use strict";t.d(n,{k:function(){return r}});var r="automatically_name_blocks"},33323:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/preferences",function(){return t(42949)}])}},function(e){e.O(0,[3850,2344,9386,9774,2888,179],(function(){return n=33323,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3853],{1210:function(e,n,t){"use strict";t.d(n,{Z:function(){return Z}});var r=t(82394),i=t(21831),o=t(82684),c=t(47999),l=t(49894),u=t(93461),d=t(57384),s=t(12344),a=t(72454),f=t(28598);function p(e,n){var t=e.children;return(0,f.jsx)(a.HS,{ref:n,children:t})}var h=o.forwardRef(p),b=t(32063),v=t(15270),m=t(82531),g=t(66166),x=t(3055),j=t(49125),k=t(91427),y=t(24141);function O(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function w(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?O(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Z=function(e){var n,t=e.after,r=e.afterHidden,p=e.afterWidth,O=e.afterWidthOverride,Z=e.before,P=e.beforeWidth,C=e.breadcrumbs,_=e.children,I=e.errors,S=e.headerMenuItems,D=e.navigationItems,E=e.setErrors,W=e.subheaderChildren,M=e.title,H=e.uuid,N=(0,y.i)().width,A="dashboard_after_width_".concat(H),q="dashboard_before_width_".concat(H),T=(0,o.useRef)(null),B=(0,o.useState)(O?p:(0,k.U2)(A,p)),R=B[0],F=B[1],U=(0,o.useState)(!1),Y=U[0],z=U[1],G=(0,o.useState)(Z?Math.max((0,k.U2)(q,P),13*j.iI):null),X=G[0],J=G[1],L=(0,o.useState)(!1),Q=L[0],V=L[1],K=(0,o.useState)(null)[1],$=m.ZP.projects.list({},{revalidateOnFocus:!1}).data,ee=null===$||void 0===$?void 0:$.projects,ne=[];C?ne.push.apply(ne,(0,i.Z)(C)):(null===ee||void 0===ee?void 0:ee.length)>=1&&ne.push.apply(ne,[{label:function(){var e;return null===(e=ee[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},{bold:!0,label:function(){return M}}]),(0,o.useEffect)((function(){null===T||void 0===T||!T.current||Y||Q||null===K||void 0===K||K(T.current.getBoundingClientRect().width)}),[Y,R,Q,X,T,K,N]),(0,o.useEffect)((function(){Y||(0,k.t8)(A,R)}),[r,Y,R,A]),(0,o.useEffect)((function(){Q||(0,k.t8)(q,X)}),[Q,X,q]);var te=(0,g.Z)(p);return(0,o.useEffect)((function(){O&&te!==p&&F(p)}),[O,p,te]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(d.Z,{title:M}),(0,f.jsx)(s.Z,{breadcrumbs:ne,menuItems:S,project:null===ee||void 0===ee?void 0:ee[0],version:null===ee||void 0===ee||null===(n=ee[0])||void 0===n?void 0:n.version}),(0,f.jsxs)(a.Nk,{children:[0!==(null===D||void 0===D?void 0:D.length)&&(0,f.jsx)(a.lm,{children:(0,f.jsx)(v.Z,{navigationItems:D})}),(0,f.jsx)(u.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(b.Z,{after:t,afterHeightOffset:x.Mz,afterHidden:r,afterMousedownActive:Y,afterWidth:R,before:Z,beforeHeightOffset:x.Mz,beforeMousedownActive:Q,beforeWidth:a.k1+(Z?X:0),hideAfterCompletely:!0,leftOffset:Z?a.k1:null,mainContainerRef:T,setAfterMousedownActive:z,setAfterWidth:F,setBeforeMousedownActive:V,setBeforeWidth:J,children:[W&&(0,f.jsx)(h,{children:W}),_]})})]}),I&&(0,f.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===E||void 0===E?void 0:E(null)},children:(0,f.jsx)(l.Z,w(w({},I),{},{onClose:function(){return null===E||void 0===E?void 0:E(null)}}))})]})}},2850:function(e,n,t){"use strict";t.d(n,{M:function(){return l},W:function(){return c}});var r=t(9518),i=t(23831),o=t(3055),c=34*t(49125).iI,l=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);",""],o.Mz,(function(e){return"\n border-left: 1px solid ".concat((e.theme.borders||i.Z.borders).medium,";\n ")}))},79585:function(e,n,t){"use strict";t.d(n,{DQ:function(){return s},HY:function(){return c},SA:function(){return a},WH:function(){return o},eC:function(){return u},fF:function(){return l},tC:function(){return d}});var r=t(81132),i=t(9736),o="Workspace",c="Preferences",l="Git settings",u="Users",d="Account",s="Profile",a=function(e){var n=e.owner,t=e.roles,a=[{linkProps:{href:"/settings/workspace/preferences"},uuid:c}];n&&a.push({linkProps:{href:"/settings/workspace/users"},uuid:u}),(!(0,i.YB)()||t<=r.No.EDITOR)&&a.push({linkProps:{href:"/settings/workspace/sync-data"},uuid:l});var f=[{items:a,uuid:o}];return(0,i.YB)()?f.concat([{items:[{linkProps:{href:"/settings/account/profile"},uuid:s}],uuid:d}]):f}},30775:function(e,n,t){"use strict";t.d(n,{Z:function(){return w}});var r=t(1210),i=t(82394),o=t(12691),c=t.n(o),l=t(10919),u=t(86673),d=t(19711),s=t(9518),a=t(23831),f=t(49125),p=t(90880),h=(f.iI,s.default.div.withConfig({displayName:"indexstyle__SectionTitleStyle",componentId:"sc-1y8dyue-0"})(["padding:","px ","px;"],1*f.iI,2.5*f.iI)),b=s.default.div.withConfig({displayName:"indexstyle__ItemStyle",componentId:"sc-1y8dyue-1"})([""," padding:","px ","px;"," ",""],(0,p.eR)(),1.5*f.iI,2.5*f.iI,(function(e){return!e.selected&&"\n &:hover {\n background-color: ".concat((e.theme.background||a.Z.background).codeArea,";\n }\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.background||a.Z.background).codeTextarea,";\n ")})),v=t(28598),m=t(82684);function g(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}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}var j=function(e){var n=e.isItemSelected,t=e.sections;return(0,v.jsx)(u.Z,{py:f.Gg,children:null===t||void 0===t?void 0:t.map((function(e){var t=e.items,r=e.title,i=e.uuid;return(0,v.jsxs)(u.Z,{children:[(0,v.jsx)(h,{children:(0,v.jsx)(d.ZP,{bold:!0,muted:!0,small:!0,uppercase:!0,children:r?r():i})}),null===t||void 0===t?void 0:t.map((function(e){var t=e.label,r=e.linkProps,o=e.onClick,u=e.uuid,d=t?t():u,s=(0,v.jsx)(b,{selected:null===n||void 0===n?void 0:n(x(x({},e),{},{uuidWorkspace:i})),children:d});return r?(0,m.createElement)(c(),x(x({},r),{},{key:u,passHref:!0}),(0,v.jsx)(l.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,sameColorAsText:!0,children:s})):(0,v.jsx)(l.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,onClick:o,preventDefault:!0,sameColorAsText:!0,children:s},u)}))]},i)}))})},k=t(2850),y=t(79585),O=t(9736);var w=function(e){var n=e.after,t=e.afterHidden,i=e.children,o=e.uuidItemSelected,c=e.uuidWorkspaceSelected,l=(0,O.PR)()||{};return(0,v.jsx)(r.Z,{after:n,afterHidden:!n||t,afterWidth:n?50*f.iI:0,afterWidthOverride:!0,before:(0,v.jsx)(k.M,{children:(0,v.jsx)(j,{isItemSelected:function(e){var n=e.uuid,t=e.uuidWorkspace;return c===t&&o===n},sections:(0,y.SA)(l)})}),beforeWidth:k.W,title:"Settings",uuid:"settings/index",children:i})}},38341:function(e,n,t){"use strict";var r=t(21831),i=t(82394),o=t(26304),c=(t(82684),t(9518)),l=t(67971),u=t(86673),d=t(19711),s=t(23831),a=t(10503),f=t(73942),p=t(49125),h=t(28598),b=["beforeIcon","checked","disabled","errorMessage","label","labelDescription","large","meta","monospace","onClick","required","small","warning","xsmall"];function v(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function m(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}var g=c.default.div.withConfig({displayName:"Checkbox__CheckboxContainer",componentId:"sc-ujqx42-0"})(["display:inline-block;vertical-align:middle;cursor:pointer;"]),x=c.default.div.withConfig({displayName:"Checkbox__ErrorContainer",componentId:"sc-ujqx42-1"})(["margin-top:4px;"]),j=c.default.input.withConfig({displayName:"Checkbox__HiddenCheckbox",componentId:"sc-ujqx42-2"})(["border:0;clip:rect(0 0 0 0);clippath:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px;",""],(function(e){return e.notClickable&&"\n background-color: ".concat((e.theme.content||s.Z.content).disabled,"\n border-color: ").concat((e.theme.content||s.Z.content).disabled,"\n\n &:hover {\n cursor: not-allowed;\n }\n ")})),k=c.default.div.withConfig({displayName:"Checkbox__StyledCheckbox",componentId:"sc-ujqx42-3"})(["border-radius:","px;height:","px;transition:all 150ms;width:","px;svg{position:relative;visibility:",";}"," "," "," "," input[disabled]{cursor:default;}"," ",""],.5*p.iI,2*p.iI,2*p.iI,(function(e){return e.checked||e.required?"visible":"hidden"}),(function(e){return e.large&&"\n svg {\n left: -4px;\n top: -8px;\n }\n "}),(function(e){return!e.checked&&"\n background-color: ".concat((e.theme.background||s.Z.background).popup,";\n border: ").concat(f.PV,"px ").concat(f.M8," ").concat((e.theme.content||s.Z.content).muted,";\n ")}),(function(e){return e.checked&&"\n background-color: ".concat((e.theme.interactive||s.Z.interactive).checked,";\n border: ").concat(f.YF,"px ").concat(f.M8," transparent;\n ")}),(function(e){return e.required&&"\n background-color: ".concat((e.theme.content||s.Z.content).disabled,";\n border: ").concat(f.YF,"px ").concat(f.M8," transparent;\n ")}),(function(e){return e.disabled&&"\n background-color: ".concat((e.theme.content||s.Z.content).disabled,";\n border-color: ").concat((e.theme.content||s.Z.content).disabled,";\n\n &:hover {\n cursor: not-allowed;\n }\n ")}),(function(e){return e.warning&&"\n background-color: ".concat((e.theme.accent||s.Z.accent).warning,";\n border-color: ").concat((e.theme.interactive||s.Z.interactive).defaultBorder,"\n ")})),y=c.default.label.withConfig({displayName:"Checkbox__LabelStyle",componentId:"sc-ujqx42-4"})(["-ms-flex-direction:column;align-items:center;display:flex;flex-direction:column;flex-direction:row;&:hover{cursor:pointer;}"]);n.Z=function(e){var n=e.beforeIcon,t=e.checked,i=e.disabled,c=e.errorMessage,s=e.label,f=e.labelDescription,v=e.large,O=e.meta,w=e.monospace,Z=void 0!==w&&w,P=e.onClick,C=e.required,_=e.small,I=void 0!==_&&_,S=e.warning,D=e.xsmall,E=void 0!==D&&D,W=(0,o.Z)(e,b),M=S||!!(c||O&&O.touched&&O.error);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(y,{onClick:function(e){e.preventDefault(),P&&P(e)},children:[(0,h.jsxs)(g,{children:[(0,h.jsx)(j,m(m({},W),{},{disabled:i?"disabled":void 0,notClickable:i})),(0,h.jsx)(k,{checked:t,disabled:i,large:v,required:C,warning:M,children:(0,h.jsx)(a.Jr,{size:p.iI*(v?3:2)})})]}),n&&(0,h.jsx)(u.Z,{ml:1,children:(0,h.jsx)(l.Z,{children:n})}),s&&(0,h.jsxs)(u.Z,{pl:1,children:["string"===typeof s&&(0,h.jsx)(d.ZP,{disabled:i,lineThrough:i,monospace:Z,small:I,xsmall:E,children:s}),"string"!==typeof s&&s,f&&(0,h.jsx)(d.ZP,{muted:!0,small:!0,children:f})]})]}),(c||O&&O.touched&&O.error)&&(0,h.jsx)(x,{children:(0,h.jsx)(d.ZP,{small:!0,warning:!0,children:c?(0,r.Z)(c):O.error})})]})}},42949:function(e,n,t){"use strict";t.r(n);var r=t(77837),i=t(38860),o=t.n(i),c=t(82684),l=t(38341),u=t(67971),d=t(41788),s=t(30775),a=t(86673),f=t(11366),p=t(49125),h=t(79585),b=t(91427),v=t(28598);function m(){var e=(0,c.useState)(!!(0,b.U2)(f.k)),n=e[0],t=e[1];return(0,v.jsx)(s.Z,{uuidItemSelected:h.HY,uuidWorkspaceSelected:h.WH,children:(0,v.jsx)(a.Z,{p:p.cd,children:(0,v.jsx)(u.Z,{alignItems:"center",children:(0,v.jsx)(l.Z,{checked:n,label:"Automatically use randomly generated name for blocks created in the future",onClick:function(){t(!n),(0,b.t8)(f.k,!n)}})})})})}m.getInitialProps=(0,r.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,d.Z)(m)},11366:function(e,n,t){"use strict";t.d(n,{k:function(){return r}});var r="automatically_name_blocks"},33323:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/preferences",function(){return t(42949)}])}},function(e){e.O(0,[3850,2344,9386,9774,2888,179],(function(){return n=33323,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2403],{1210:function(e,n,t){"use strict";t.d(n,{Z:function(){return Z}});var r=t(82394),i=t(21831),o=t(82684),c=t(47999),l=t(28358),a=t(93461),s=t(57384),u=t(12344),d=t(72454),p=t(28598);function f(e,n){var t=e.children;return(0,p.jsx)(d.HS,{ref:n,children:t})}var h=o.forwardRef(f),b=t(32063),m=t(15270),y=t(82531),g=t(66166),x=t(3055),v=t(49125),j=t(91427),w=t(24141);function O(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function k(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?O(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Z=function(e){var n,t=e.after,r=e.afterHidden,f=e.afterWidth,O=e.afterWidthOverride,Z=e.before,_=e.beforeWidth,P=e.breadcrumbs,C=e.children,S=e.errors,I=e.headerMenuItems,N=e.navigationItems,D=e.setErrors,H=e.subheaderChildren,E=e.title,M=e.uuid,z=(0,w.i)().width,T="dashboard_after_width_".concat(M),A="dashboard_before_width_".concat(M),W=(0,o.useRef)(null),q=(0,o.useState)(O?f:(0,j.U2)(T,f)),B=q[0],F=q[1],R=(0,o.useState)(!1),L=R[0],U=R[1],Y=(0,o.useState)(Z?Math.max((0,j.U2)(A,_),13*v.iI):null),G=Y[0],X=Y[1],Q=(0,o.useState)(!1),J=Q[0],V=Q[1],K=(0,o.useState)(null)[1],$=y.ZP.projects.list({},{revalidateOnFocus:!1}).data,ee=null===$||void 0===$?void 0:$.projects,ne=[];P?ne.push.apply(ne,(0,i.Z)(P)):(null===ee||void 0===ee?void 0:ee.length)>=1&&ne.push.apply(ne,[{label:function(){var e;return null===(e=ee[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},{bold:!0,label:function(){return E}}]),(0,o.useEffect)((function(){null===W||void 0===W||!W.current||L||J||null===K||void 0===K||K(W.current.getBoundingClientRect().width)}),[L,B,J,G,W,K,z]),(0,o.useEffect)((function(){L||(0,j.t8)(T,B)}),[r,L,B,T]),(0,o.useEffect)((function(){J||(0,j.t8)(A,G)}),[J,G,A]);var te=(0,g.Z)(f);return(0,o.useEffect)((function(){O&&te!==f&&F(f)}),[O,f,te]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(s.Z,{title:E}),(0,p.jsx)(u.Z,{breadcrumbs:ne,menuItems:I,project:null===ee||void 0===ee?void 0:ee[0],version:null===ee||void 0===ee||null===(n=ee[0])||void 0===n?void 0:n.version}),(0,p.jsxs)(d.Nk,{children:[0!==(null===N||void 0===N?void 0:N.length)&&(0,p.jsx)(d.lm,{children:(0,p.jsx)(m.Z,{navigationItems:N})}),(0,p.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,p.jsxs)(b.Z,{after:t,afterHeightOffset:x.Mz,afterHidden:r,afterMousedownActive:L,afterWidth:B,before:Z,beforeHeightOffset:x.Mz,beforeMousedownActive:J,beforeWidth:d.k1+(Z?G:0),hideAfterCompletely:!0,leftOffset:Z?d.k1:null,mainContainerRef:W,setAfterMousedownActive:U,setAfterWidth:F,setBeforeMousedownActive:V,setBeforeWidth:X,children:[H&&(0,p.jsx)(h,{children:H}),C]})})]}),S&&(0,p.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===D||void 0===D?void 0:D(null)},children:(0,p.jsx)(l.Z,k(k({},S),{},{onClose:function(){return null===D||void 0===D?void 0:D(null)}}))})]})}},2850:function(e,n,t){"use strict";t.d(n,{M:function(){return l},W:function(){return c}});var r=t(9518),i=t(23831),o=t(3055),c=34*t(49125).iI,l=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);",""],o.Mz,(function(e){return"\n border-left: 1px solid ".concat((e.theme.borders||i.Z.borders).medium,";\n ")}))},79585:function(e,n,t){"use strict";t.d(n,{DQ:function(){return u},HY:function(){return c},SA:function(){return d},WH:function(){return o},eC:function(){return a},fF:function(){return l},tC:function(){return s}});var r=t(81132),i=t(9736),o="Workspace",c="Preferences",l="Git settings",a="Users",s="Account",u="Profile",d=function(e){var n=e.owner,t=e.roles,d=[{linkProps:{href:"/settings/workspace/preferences"},uuid:c}];n&&d.push({linkProps:{href:"/settings/workspace/users"},uuid:a}),(!(0,i.YB)()||t<=r.No.EDITOR)&&d.push({linkProps:{href:"/settings/workspace/sync-data"},uuid:l});var p=[{items:d,uuid:o}];return(0,i.YB)()?p.concat([{items:[{linkProps:{href:"/settings/account/profile"},uuid:u}],uuid:s}]):p}},30775:function(e,n,t){"use strict";t.d(n,{Z:function(){return k}});var r=t(1210),i=t(82394),o=t(12691),c=t.n(o),l=t(10919),a=t(86673),s=t(19711),u=t(9518),d=t(23831),p=t(49125),f=t(90880),h=(p.iI,u.default.div.withConfig({displayName:"indexstyle__SectionTitleStyle",componentId:"sc-1y8dyue-0"})(["padding:","px ","px;"],1*p.iI,2.5*p.iI)),b=u.default.div.withConfig({displayName:"indexstyle__ItemStyle",componentId:"sc-1y8dyue-1"})([""," padding:","px ","px;"," ",""],(0,f.eR)(),1.5*p.iI,2.5*p.iI,(function(e){return!e.selected&&"\n &:hover {\n background-color: ".concat((e.theme.background||d.Z.background).codeArea,";\n }\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.background||d.Z.background).codeTextarea,";\n ")})),m=t(28598),y=t(82684);function g(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}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}var v=function(e){var n=e.isItemSelected,t=e.sections;return(0,m.jsx)(a.Z,{py:p.Gg,children:null===t||void 0===t?void 0:t.map((function(e){var t=e.items,r=e.title,i=e.uuid;return(0,m.jsxs)(a.Z,{children:[(0,m.jsx)(h,{children:(0,m.jsx)(s.ZP,{bold:!0,muted:!0,small:!0,uppercase:!0,children:r?r():i})}),null===t||void 0===t?void 0:t.map((function(e){var t=e.label,r=e.linkProps,o=e.onClick,a=e.uuid,s=t?t():a,u=(0,m.jsx)(b,{selected:null===n||void 0===n?void 0:n(x(x({},e),{},{uuidWorkspace:i})),children:s});return r?(0,y.createElement)(c(),x(x({},r),{},{key:a,passHref:!0}),(0,m.jsx)(l.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,sameColorAsText:!0,children:u})):(0,m.jsx)(l.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,onClick:o,preventDefault:!0,sameColorAsText:!0,children:u},a)}))]},i)}))})},j=t(2850),w=t(79585),O=t(9736);var k=function(e){var n=e.after,t=e.afterHidden,i=e.children,o=e.uuidItemSelected,c=e.uuidWorkspaceSelected,l=(0,O.PR)()||{};return(0,m.jsx)(r.Z,{after:n,afterHidden:!n||t,afterWidth:n?50*p.iI:0,afterWidthOverride:!0,before:(0,m.jsx)(j.M,{children:(0,m.jsx)(v,{isItemSelected:function(e){var n=e.uuid,t=e.uuidWorkspace;return c===t&&o===n},sections:(0,w.SA)(l)})}),beforeWidth:j.W,title:"Settings",uuid:"settings/index",children:i})}},38341:function(e,n,t){"use strict";var r=t(21831),i=t(82394),o=t(26304),c=(t(82684),t(9518)),l=t(67971),a=t(86673),s=t(19711),u=t(23831),d=t(10503),p=t(73942),f=t(49125),h=t(28598),b=["beforeIcon","checked","disabled","errorMessage","label","labelDescription","large","meta","monospace","onClick","required","small","warning","xsmall"];function m(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function y(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?m(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var g=c.default.div.withConfig({displayName:"Checkbox__CheckboxContainer",componentId:"sc-ujqx42-0"})(["display:inline-block;vertical-align:middle;cursor:pointer;"]),x=c.default.div.withConfig({displayName:"Checkbox__ErrorContainer",componentId:"sc-ujqx42-1"})(["margin-top:4px;"]),v=c.default.input.withConfig({displayName:"Checkbox__HiddenCheckbox",componentId:"sc-ujqx42-2"})(["border:0;clip:rect(0 0 0 0);clippath:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px;",""],(function(e){return e.notClickable&&"\n background-color: ".concat((e.theme.content||u.Z.content).disabled,"\n border-color: ").concat((e.theme.content||u.Z.content).disabled,"\n\n &:hover {\n cursor: not-allowed;\n }\n ")})),j=c.default.div.withConfig({displayName:"Checkbox__StyledCheckbox",componentId:"sc-ujqx42-3"})(["border-radius:","px;height:","px;transition:all 150ms;width:","px;svg{position:relative;visibility:",";}"," "," "," "," input[disabled]{cursor:default;}"," ",""],.5*f.iI,2*f.iI,2*f.iI,(function(e){return e.checked||e.required?"visible":"hidden"}),(function(e){return e.large&&"\n svg {\n left: -4px;\n top: -8px;\n }\n "}),(function(e){return!e.checked&&"\n background-color: ".concat((e.theme.background||u.Z.background).popup,";\n border: ").concat(p.PV,"px ").concat(p.M8," ").concat((e.theme.content||u.Z.content).muted,";\n ")}),(function(e){return e.checked&&"\n background-color: ".concat((e.theme.interactive||u.Z.interactive).checked,";\n border: ").concat(p.YF,"px ").concat(p.M8," transparent;\n ")}),(function(e){return e.required&&"\n background-color: ".concat((e.theme.content||u.Z.content).disabled,";\n border: ").concat(p.YF,"px ").concat(p.M8," transparent;\n ")}),(function(e){return e.disabled&&"\n background-color: ".concat((e.theme.content||u.Z.content).disabled,";\n border-color: ").concat((e.theme.content||u.Z.content).disabled,";\n\n &:hover {\n cursor: not-allowed;\n }\n ")}),(function(e){return e.warning&&"\n background-color: ".concat((e.theme.accent||u.Z.accent).warning,";\n border-color: ").concat((e.theme.interactive||u.Z.interactive).defaultBorder,"\n ")})),w=c.default.label.withConfig({displayName:"Checkbox__LabelStyle",componentId:"sc-ujqx42-4"})(["-ms-flex-direction:column;align-items:center;display:flex;flex-direction:column;flex-direction:row;&:hover{cursor:pointer;}"]);n.Z=function(e){var n=e.beforeIcon,t=e.checked,i=e.disabled,c=e.errorMessage,u=e.label,p=e.labelDescription,m=e.large,O=e.meta,k=e.monospace,Z=void 0!==k&&k,_=e.onClick,P=e.required,C=e.small,S=void 0!==C&&C,I=e.warning,N=e.xsmall,D=void 0!==N&&N,H=(0,o.Z)(e,b),E=I||!!(c||O&&O.touched&&O.error);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(w,{onClick:function(e){e.preventDefault(),_&&_(e)},children:[(0,h.jsxs)(g,{children:[(0,h.jsx)(v,y(y({},H),{},{disabled:i?"disabled":void 0,notClickable:i})),(0,h.jsx)(j,{checked:t,disabled:i,large:m,required:P,warning:E,children:(0,h.jsx)(d.Jr,{size:f.iI*(m?3:2)})})]}),n&&(0,h.jsx)(a.Z,{ml:1,children:(0,h.jsx)(l.Z,{children:n})}),u&&(0,h.jsxs)(a.Z,{pl:1,children:["string"===typeof u&&(0,h.jsx)(s.ZP,{disabled:i,lineThrough:i,monospace:Z,small:S,xsmall:D,children:u}),"string"!==typeof u&&u,p&&(0,h.jsx)(s.ZP,{muted:!0,small:!0,children:p})]})]}),(c||O&&O.touched&&O.error)&&(0,h.jsx)(x,{children:(0,h.jsx)(s.ZP,{small:!0,warning:!0,children:c?(0,r.Z)(c):O.error})})]})}},87372:function(e,n,t){"use strict";var r,i,o,c,l,a,s,u,d=t(82394),p=t(26304),f=t(26653),h=t(9518),b=t(33591),m=t(23831),y=t(2005),g=t(31012),x=t(19711),v=t(49125),j=t(86673),w=t(28598),O=["children","condensed","inline","level","marketing","spacingBelow"];function k(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Z(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?k(Object(t),!0).forEach((function(n){(0,d.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var _=(0,h.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," ",""],x.IH,(function(e){return e.color&&"\n color: ".concat(e.color,"\n ")}),(function(e){return e.yellow&&"\n color: ".concat((e.theme.accent||m.Z.accent).yellow,";\n ")}),(function(e){return e.center&&"\n text-align: center;\n "}),(function(e){return!e.monospace&&0===Number(e.weightStyle)&&"\n font-family: ".concat(y.iI,";\n ")}),(function(e){return!e.monospace&&1===Number(e.weightStyle)&&"\n font-family: ".concat(y.LX,";\n ")}),(function(e){return!e.monospace&&2===Number(e.weightStyle)&&"\n font-family: ".concat(y.LX,";\n ")}),(function(e){return!e.monospace&&3===Number(e.weightStyle)&&"\n font-family: ".concat(y.ry,";\n ")}),(function(e){return!e.monospace&&4===Number(e.weightStyle)&&"\n font-family: ".concat(y.YC,";\n ")}),(function(e){return!e.monospace&&5===Number(e.weightStyle)&&"\n font-family: ".concat(y.nF,";\n ")}),(function(e){return!e.monospace&&(6===Number(e.weightStyle)||e.bold)&&"\n font-family: ".concat(y.nF,";\n ")}),(function(e){return!e.monospace&&7===Number(e.weightStyle)&&"\n font-family: ".concat(y.nF,";\n ")}),(function(e){return!e.monospace&&8===Number(e.weightStyle)&&"\n font-family: ".concat(y.nF,";\n ")}),(function(e){return e.lineHeightAuto&&"\n line-height: normal !important;\n "})),P=h.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(e){return"\n color: ".concat((e.theme.content||m.Z.content).active,";\n ")})),C=h.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],_,b.media.md(r||(r=(0,f.Z)(["\n ","\n "])),g.aQ),b.media.lg(i||(i=(0,f.Z)(["\n ","\n "])),g.aQ),b.media.xl(o||(o=(0,f.Z)(["\n ","\n "])),g.aQ)),S=h.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],_,g.MJ),I=h.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],_,b.media.xs(c||(c=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*v.iI,7*v.iI),b.media.sm(l||(l=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*v.iI,7*v.iI),b.media.md(a||(a=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*v.iI,7*v.iI),b.media.lg(s||(s=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*v.iI,7*v.iI),b.media.xl(u||(u=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*v.iI,7*v.iI)),N=h.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],_,g.BL),D=h.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],_),H=h.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],_),E=h.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],_),M=h.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],_,(function(e){return 1===e.level&&"\n ".concat(g.MJ,"\n ")}),(function(e){return 2===e.level&&"\n ".concat(g.BL,"\n ")}),(function(e){return 3===e.level&&"\n font-size: 24px;\n line-height: 32px;\n "}),(function(e){return 4===e.level&&"\n font-size: 20px;\n line-height: 28px;\n "})),z=function(e){var n,t=e.children,r=e.condensed,i=e.inline,o=e.level,c=e.marketing,l=e.spacingBelow,a=(0,p.Z)(e,O);i?n=M:0===Number(o)?n=C:1===Number(o)?n=c?I:S:2===Number(o)?n=N:3===Number(o)?n=D:4===Number(o)?n=H:5===Number(o)&&(n=E);var s=(0,w.jsxs)(n,Z(Z({},a),{},{level:o,children:[l&&(0,w.jsx)(j.Z,{mb:r?2:3,children:t}),!l&&t]}));return i?s:(0,w.jsx)(P,{children:s})};z.defaultProps={level:3,weightStyle:6},n.Z=z},70902:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=t(82684),c=t(9518),l=t(69898),a=t(23831),s=t(28598),u=["checked","disabled","onCheck"];function d(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function p(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?d(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var f=c.default.label.withConfig({displayName:"ToggleSwitch__ToggleSwitchStyle",componentId:"sc-179r5zs-0"})([""," position:relative;display:inline-block;width:","px;min-width:","px;height:",'px;& input[type="checkbox"]{display:none;}& span{position:absolute;cursor:',";background-color:",";border-radius:13px;",';top:0;right:0;bottom:0;left:0;transition:background-color 0.2s ease;}& span::before{position:absolute;content:"";left:2px;top:2px;width:22px;height:22px;background-color:#787A85;border-radius:50%;transition:transform 0.3s ease;}& input[type="checkbox"]:checked + span::before{transform:translateX(20px);}',""],l.p,46,46,26,(function(e){return e.disabled?"not-allowed":"pointer"}),(function(e){return e.disabled?a.Z.monotone.white:a.Z.monotone.black}),(function(e){return e.disabled&&"border: 1px solid ".concat(a.Z.monotone.grey200)}),(function(e){return!e.disabled&&'\n & input[type="checkbox"]:checked + span {\n background-color: #6AA1E0;\n }\n\n & input[type="checkbox"]:checked + span::before {\n background-color: '.concat(a.Z.monotone.white,";\n }\n ")})),h=function(e,n){var t=e.checked,r=e.disabled,o=e.onCheck,c=(0,i.Z)(e,u);return(0,s.jsx)(l.Z,p(p({},c),{},{disabled:r,input:(0,s.jsxs)(f,p(p({},c),{},{disabled:r,noBackground:!0,noBorder:!0,children:[(0,s.jsx)("input",{checked:t,type:"checkbox"}),(0,s.jsx)("span",{onClick:r?null:function(){return null===o||void 0===o?void 0:o((function(e){return!e}))}})]})),noBackground:!0,ref:n}))};n.Z=o.forwardRef(h)},10831:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return H}});var r=t(77837),i=t(82394),o=t(75582),c=t(38860),l=t.n(c),a=t(82684),s=t(21764),u=t(83455),d=t(60328),p=t(38341),f=t(67971),h=t(87372),b=t(10919),m=t(41788),y=t(30775),g=t(86673),x=[{autoComplete:"remote_repo_link",label:"Remote repo url",required:!0,uuid:"remote_repo_link"},{autoComplete:"repo_path",label:"Local directory path",labelDescription:"Defaults to Python's os.getcwd() if omitted. Mage will create this local directory if it doesn't already exist.",uuid:"repo_path"}],v=[{autoComplete:"username",label:"Username",uuid:"username"},{autoComplete:"email",label:"Email",uuid:"email"},{autoComplete:"ssh_public_key",label:"SSH public key in base64",labelDescription:'Run "cat ~/.ssh/id_rsa.pub | base64 | tr -d \\\\n" in terminal to get base64 encoded public key and paste the result here. The public key will be stored as a Mage secret named "mage_git_ssh_public_key_b64".',type:"password",uuid:"ssh_public_key"},{autoComplete:"ssh_private_key",label:"SSH private key in base64",labelDescription:'Follow same steps as the public key, but run "cat ~/.ssh/id_rsa | base64 | tr -d \\\\n" instead. The private key will be stored as a Mage secret named "mage_git_ssh_private_key_b64".',type:"password",uuid:"ssh_private_key"}],j=[{autoComplete:"branch",label:"Branch name",required:!0,uuid:"branch"}],w=t(19711),O=t(82944),k=t(70902),Z=t(82531),_=t(49125),P=t(79585),C=t(96510),S=t(28598);function I(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function N(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,i.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}function D(){var e=Z.ZP.syncs.list().data,n=(0,a.useState)(null),t=n[0],r=n[1],c=(0,a.useState)(null),l=c[0],m=c[1],I=(0,a.useState)(null),D=I[0],H=I[1];(0,a.useEffect)((function(){if(e){var n,t=null===e||void 0===e||null===(n=e.syncs)||void 0===n?void 0:n[0];r(t),H(!(null===t||void 0===t||!t.branch))}}),[e]);var E=(0,u.Db)(Z.ZP.syncs.useCreate(),{onSuccess:function(e){return(0,C.wD)(e,{callback:function(e){var n=e.sync;n&&(r(n),window.location.reload(),s.Am.success("Sync saved",{position:s.Am.POSITION.BOTTOM_RIGHT,toastId:"data_sync_success"}))},onErrorCallback:function(e){var n=e.error,t=n.exception;n.message;return m(t)}})}}),M=(0,o.Z)(E,2),z=M[0],T=M[1].isLoading,A=(0,u.Db)(Z.ZP.syncs.useUpdate("git"),{onSuccess:function(e){return(0,C.wD)(e,{callback:function(e){e.sync&&s.Am.success("Data synced!",{position:s.Am.POSITION.BOTTOM_RIGHT,toastId:"data_sync_success"})},onErrorCallback:function(e){var n=e.error,t=n.exception;n.message;return m(t)}})}}),W=(0,o.Z)(A,2),q=W[0],B=W[1].isLoading;return(0,S.jsx)(y.Z,{uuidItemSelected:P.fF,uuidWorkspaceSelected:P.WH,children:(0,S.jsxs)(g.Z,{p:_.cd,style:{width:"600px"},children:[(0,S.jsx)(h.Z,{children:"Git repository settings"}),(0,S.jsx)(g.Z,{mt:1,children:(0,S.jsxs)(w.ZP,{bold:!0,children:["You can enable the Git integration by supplying the url for your remote repository. ",(0,S.jsxs)(w.ZP,{bold:!0,inline:!0,children:["You will need to ",(0,S.jsx)(b.Z,{href:"https://docs.mage.ai/developing-in-the-cloud/setting-up-git",openNewWindow:!0,children:"set up your SSH key"})," if you have not done so already."]})]})}),(0,S.jsx)("form",{children:x.map((function(e){var n=e.autoComplete,o=e.disabled,c=e.label,l=e.labelDescription,a=e.required,s=e.type,u=e.uuid;return(0,S.jsxs)(g.Z,{mt:2,children:[l&&(0,S.jsx)(g.Z,{mb:1,children:(0,S.jsx)(w.ZP,{small:!0,children:l})}),(0,S.jsx)(O.Z,{autoComplete:n,disabled:o,label:c,onChange:function(e){r((function(n){return N(N({},n),{},(0,i.Z)({},u,e.target.value))}))},primary:!0,required:a,setContentOnMount:!0,type:s,value:(null===t||void 0===t?void 0:t[u])||""})]},u)}))}),(0,S.jsx)(g.Z,{mt:_.Mq,children:(0,S.jsx)(w.ZP,{bold:!0,children:"(OPTIONAL, BUT RECOMMENDED) Filling out these fields will allow Mage to recover your Git settings if they get reset."})}),(0,S.jsx)("form",{children:v.map((function(e){var n=e.autoComplete,o=e.disabled,c=e.label,l=e.labelDescription,a=e.required,s=e.type,u=e.uuid;return(0,S.jsxs)(g.Z,{mt:2,children:[l&&(0,S.jsx)(g.Z,{mb:1,children:(0,S.jsx)(w.ZP,{small:!0,children:l})}),(0,S.jsx)(O.Z,{autoComplete:n,disabled:o,label:c,onChange:function(e){r((function(n){return N(N({},n),{},(0,i.Z)({},u,e.target.value))}))},primary:!0,required:a,setContentOnMount:!0,type:s,value:(null===t||void 0===t?void 0:t[u])||""})]},u)}))}),(0,S.jsx)(g.Z,{mt:_.Mq,children:(0,S.jsxs)(f.Z,{alignItems:"center",children:[(0,S.jsx)(g.Z,{mr:2,children:(0,S.jsx)(k.Z,{checked:!!D,onCheck:function(){return H((function(e){var n=!e;return n||r((function(e){return N(N({},e),{},{branch:null,sync_on_pipeline_run:!1})})),n}))}})}),(0,S.jsxs)(w.ZP,{bold:!0,large:!0,children:["Use ",(0,S.jsx)(b.Z,{bold:!0,href:"https://docs.mage.ai/production/data-sync/git#git-sync",large:!0,openNewWindow:!0,children:"Git Sync"})]})]})}),D&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(g.Z,{mt:1,children:(0,S.jsx)(w.ZP,{bold:!0,children:"(OPTIONAL) You can also set up your project to only sync with a specified branch."})}),(0,S.jsx)("form",{children:j.map((function(e){var n=e.autoComplete,o=e.disabled,c=e.label,l=e.required,a=e.type,s=e.uuid;return(0,S.jsx)(g.Z,{mt:2,children:(0,S.jsx)(O.Z,{autoComplete:n,disabled:o,label:c,onChange:function(e){r((function(n){return N(N({},n),{},(0,i.Z)({},s,e.target.value))}))},primary:!0,required:l,setContentOnMount:!0,type:a,value:(null===t||void 0===t?void 0:t[s])||""})},s)}))}),(0,S.jsx)(f.Z,{alignItems:"center",children:(0,S.jsx)(g.Z,{mt:2,children:(0,S.jsx)(p.Z,{checked:null===t||void 0===t?void 0:t.sync_on_pipeline_run,label:"Sync before each trigger run",onClick:function(){r((function(e){return N(N({},e),{},{sync_on_pipeline_run:!(null!==t&&void 0!==t&&t.sync_on_pipeline_run)})}))}})})})]}),(0,S.jsx)(g.Z,{mt:2,children:(0,S.jsx)(d.Z,{loading:T,onClick:function(){return z({sync:t})},primary:!0,children:"Save repository settings"})}),l&&(0,S.jsx)(g.Z,{mt:1,children:(0,S.jsx)(w.ZP,{danger:!0,children:l})}),D&&(0,S.jsxs)(g.Z,{mt:_.HN,children:[(0,S.jsx)(h.Z,{children:"Synchronize code from remote repository"}),(0,S.jsx)(g.Z,{mt:1,children:(0,S.jsxs)(w.ZP,{children:["Running the sync from this page will run a one time sync with the remote repository.",(0,S.jsx)("br",{}),"This may ",(0,S.jsx)(w.ZP,{bold:!0,danger:!0,inline:!0,children:"overwrite"})," your existing data, so make sure you\u2019ve committed or backed up your current changes."]})}),(0,S.jsx)(g.Z,{mt:2,children:(0,S.jsx)(d.Z,{danger:!0,loading:B,onClick:function(){return q({sync:{action_type:"sync_data"}})},children:"Synchronize code"})})]})]})})}D.getInitialProps=(0,r.Z)(l().mark((function e(){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var H=(0,m.Z)(D)},37056:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/sync-data",function(){return t(10831)}])}},function(e){e.O(0,[3850,2344,9386,9774,2888,179],(function(){return n=37056,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2403],{1210:function(e,n,t){"use strict";t.d(n,{Z:function(){return Z}});var r=t(82394),i=t(21831),o=t(82684),c=t(47999),l=t(49894),a=t(93461),s=t(57384),u=t(12344),d=t(72454),p=t(28598);function f(e,n){var t=e.children;return(0,p.jsx)(d.HS,{ref:n,children:t})}var h=o.forwardRef(f),b=t(32063),m=t(15270),y=t(82531),g=t(66166),x=t(3055),v=t(49125),j=t(91427),w=t(24141);function O(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function k(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?O(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Z=function(e){var n,t=e.after,r=e.afterHidden,f=e.afterWidth,O=e.afterWidthOverride,Z=e.before,_=e.beforeWidth,P=e.breadcrumbs,C=e.children,S=e.errors,I=e.headerMenuItems,N=e.navigationItems,D=e.setErrors,H=e.subheaderChildren,E=e.title,M=e.uuid,z=(0,w.i)().width,T="dashboard_after_width_".concat(M),A="dashboard_before_width_".concat(M),W=(0,o.useRef)(null),q=(0,o.useState)(O?f:(0,j.U2)(T,f)),B=q[0],F=q[1],R=(0,o.useState)(!1),L=R[0],U=R[1],Y=(0,o.useState)(Z?Math.max((0,j.U2)(A,_),13*v.iI):null),G=Y[0],X=Y[1],Q=(0,o.useState)(!1),J=Q[0],V=Q[1],K=(0,o.useState)(null)[1],$=y.ZP.projects.list({},{revalidateOnFocus:!1}).data,ee=null===$||void 0===$?void 0:$.projects,ne=[];P?ne.push.apply(ne,(0,i.Z)(P)):(null===ee||void 0===ee?void 0:ee.length)>=1&&ne.push.apply(ne,[{label:function(){var e;return null===(e=ee[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},{bold:!0,label:function(){return E}}]),(0,o.useEffect)((function(){null===W||void 0===W||!W.current||L||J||null===K||void 0===K||K(W.current.getBoundingClientRect().width)}),[L,B,J,G,W,K,z]),(0,o.useEffect)((function(){L||(0,j.t8)(T,B)}),[r,L,B,T]),(0,o.useEffect)((function(){J||(0,j.t8)(A,G)}),[J,G,A]);var te=(0,g.Z)(f);return(0,o.useEffect)((function(){O&&te!==f&&F(f)}),[O,f,te]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(s.Z,{title:E}),(0,p.jsx)(u.Z,{breadcrumbs:ne,menuItems:I,project:null===ee||void 0===ee?void 0:ee[0],version:null===ee||void 0===ee||null===(n=ee[0])||void 0===n?void 0:n.version}),(0,p.jsxs)(d.Nk,{children:[0!==(null===N||void 0===N?void 0:N.length)&&(0,p.jsx)(d.lm,{children:(0,p.jsx)(m.Z,{navigationItems:N})}),(0,p.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,p.jsxs)(b.Z,{after:t,afterHeightOffset:x.Mz,afterHidden:r,afterMousedownActive:L,afterWidth:B,before:Z,beforeHeightOffset:x.Mz,beforeMousedownActive:J,beforeWidth:d.k1+(Z?G:0),hideAfterCompletely:!0,leftOffset:Z?d.k1:null,mainContainerRef:W,setAfterMousedownActive:U,setAfterWidth:F,setBeforeMousedownActive:V,setBeforeWidth:X,children:[H&&(0,p.jsx)(h,{children:H}),C]})})]}),S&&(0,p.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===D||void 0===D?void 0:D(null)},children:(0,p.jsx)(l.Z,k(k({},S),{},{onClose:function(){return null===D||void 0===D?void 0:D(null)}}))})]})}},2850:function(e,n,t){"use strict";t.d(n,{M:function(){return l},W:function(){return c}});var r=t(9518),i=t(23831),o=t(3055),c=34*t(49125).iI,l=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);",""],o.Mz,(function(e){return"\n border-left: 1px solid ".concat((e.theme.borders||i.Z.borders).medium,";\n ")}))},79585:function(e,n,t){"use strict";t.d(n,{DQ:function(){return u},HY:function(){return c},SA:function(){return d},WH:function(){return o},eC:function(){return a},fF:function(){return l},tC:function(){return s}});var r=t(81132),i=t(9736),o="Workspace",c="Preferences",l="Git settings",a="Users",s="Account",u="Profile",d=function(e){var n=e.owner,t=e.roles,d=[{linkProps:{href:"/settings/workspace/preferences"},uuid:c}];n&&d.push({linkProps:{href:"/settings/workspace/users"},uuid:a}),(!(0,i.YB)()||t<=r.No.EDITOR)&&d.push({linkProps:{href:"/settings/workspace/sync-data"},uuid:l});var p=[{items:d,uuid:o}];return(0,i.YB)()?p.concat([{items:[{linkProps:{href:"/settings/account/profile"},uuid:u}],uuid:s}]):p}},30775:function(e,n,t){"use strict";t.d(n,{Z:function(){return k}});var r=t(1210),i=t(82394),o=t(12691),c=t.n(o),l=t(10919),a=t(86673),s=t(19711),u=t(9518),d=t(23831),p=t(49125),f=t(90880),h=(p.iI,u.default.div.withConfig({displayName:"indexstyle__SectionTitleStyle",componentId:"sc-1y8dyue-0"})(["padding:","px ","px;"],1*p.iI,2.5*p.iI)),b=u.default.div.withConfig({displayName:"indexstyle__ItemStyle",componentId:"sc-1y8dyue-1"})([""," padding:","px ","px;"," ",""],(0,f.eR)(),1.5*p.iI,2.5*p.iI,(function(e){return!e.selected&&"\n &:hover {\n background-color: ".concat((e.theme.background||d.Z.background).codeArea,";\n }\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.background||d.Z.background).codeTextarea,";\n ")})),m=t(28598),y=t(82684);function g(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}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}var v=function(e){var n=e.isItemSelected,t=e.sections;return(0,m.jsx)(a.Z,{py:p.Gg,children:null===t||void 0===t?void 0:t.map((function(e){var t=e.items,r=e.title,i=e.uuid;return(0,m.jsxs)(a.Z,{children:[(0,m.jsx)(h,{children:(0,m.jsx)(s.ZP,{bold:!0,muted:!0,small:!0,uppercase:!0,children:r?r():i})}),null===t||void 0===t?void 0:t.map((function(e){var t=e.label,r=e.linkProps,o=e.onClick,a=e.uuid,s=t?t():a,u=(0,m.jsx)(b,{selected:null===n||void 0===n?void 0:n(x(x({},e),{},{uuidWorkspace:i})),children:s});return r?(0,y.createElement)(c(),x(x({},r),{},{key:a,passHref:!0}),(0,m.jsx)(l.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,sameColorAsText:!0,children:u})):(0,m.jsx)(l.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,onClick:o,preventDefault:!0,sameColorAsText:!0,children:u},a)}))]},i)}))})},j=t(2850),w=t(79585),O=t(9736);var k=function(e){var n=e.after,t=e.afterHidden,i=e.children,o=e.uuidItemSelected,c=e.uuidWorkspaceSelected,l=(0,O.PR)()||{};return(0,m.jsx)(r.Z,{after:n,afterHidden:!n||t,afterWidth:n?50*p.iI:0,afterWidthOverride:!0,before:(0,m.jsx)(j.M,{children:(0,m.jsx)(v,{isItemSelected:function(e){var n=e.uuid,t=e.uuidWorkspace;return c===t&&o===n},sections:(0,w.SA)(l)})}),beforeWidth:j.W,title:"Settings",uuid:"settings/index",children:i})}},38341:function(e,n,t){"use strict";var r=t(21831),i=t(82394),o=t(26304),c=(t(82684),t(9518)),l=t(67971),a=t(86673),s=t(19711),u=t(23831),d=t(10503),p=t(73942),f=t(49125),h=t(28598),b=["beforeIcon","checked","disabled","errorMessage","label","labelDescription","large","meta","monospace","onClick","required","small","warning","xsmall"];function m(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function y(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?m(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var g=c.default.div.withConfig({displayName:"Checkbox__CheckboxContainer",componentId:"sc-ujqx42-0"})(["display:inline-block;vertical-align:middle;cursor:pointer;"]),x=c.default.div.withConfig({displayName:"Checkbox__ErrorContainer",componentId:"sc-ujqx42-1"})(["margin-top:4px;"]),v=c.default.input.withConfig({displayName:"Checkbox__HiddenCheckbox",componentId:"sc-ujqx42-2"})(["border:0;clip:rect(0 0 0 0);clippath:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px;",""],(function(e){return e.notClickable&&"\n background-color: ".concat((e.theme.content||u.Z.content).disabled,"\n border-color: ").concat((e.theme.content||u.Z.content).disabled,"\n\n &:hover {\n cursor: not-allowed;\n }\n ")})),j=c.default.div.withConfig({displayName:"Checkbox__StyledCheckbox",componentId:"sc-ujqx42-3"})(["border-radius:","px;height:","px;transition:all 150ms;width:","px;svg{position:relative;visibility:",";}"," "," "," "," input[disabled]{cursor:default;}"," ",""],.5*f.iI,2*f.iI,2*f.iI,(function(e){return e.checked||e.required?"visible":"hidden"}),(function(e){return e.large&&"\n svg {\n left: -4px;\n top: -8px;\n }\n "}),(function(e){return!e.checked&&"\n background-color: ".concat((e.theme.background||u.Z.background).popup,";\n border: ").concat(p.PV,"px ").concat(p.M8," ").concat((e.theme.content||u.Z.content).muted,";\n ")}),(function(e){return e.checked&&"\n background-color: ".concat((e.theme.interactive||u.Z.interactive).checked,";\n border: ").concat(p.YF,"px ").concat(p.M8," transparent;\n ")}),(function(e){return e.required&&"\n background-color: ".concat((e.theme.content||u.Z.content).disabled,";\n border: ").concat(p.YF,"px ").concat(p.M8," transparent;\n ")}),(function(e){return e.disabled&&"\n background-color: ".concat((e.theme.content||u.Z.content).disabled,";\n border-color: ").concat((e.theme.content||u.Z.content).disabled,";\n\n &:hover {\n cursor: not-allowed;\n }\n ")}),(function(e){return e.warning&&"\n background-color: ".concat((e.theme.accent||u.Z.accent).warning,";\n border-color: ").concat((e.theme.interactive||u.Z.interactive).defaultBorder,"\n ")})),w=c.default.label.withConfig({displayName:"Checkbox__LabelStyle",componentId:"sc-ujqx42-4"})(["-ms-flex-direction:column;align-items:center;display:flex;flex-direction:column;flex-direction:row;&:hover{cursor:pointer;}"]);n.Z=function(e){var n=e.beforeIcon,t=e.checked,i=e.disabled,c=e.errorMessage,u=e.label,p=e.labelDescription,m=e.large,O=e.meta,k=e.monospace,Z=void 0!==k&&k,_=e.onClick,P=e.required,C=e.small,S=void 0!==C&&C,I=e.warning,N=e.xsmall,D=void 0!==N&&N,H=(0,o.Z)(e,b),E=I||!!(c||O&&O.touched&&O.error);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(w,{onClick:function(e){e.preventDefault(),_&&_(e)},children:[(0,h.jsxs)(g,{children:[(0,h.jsx)(v,y(y({},H),{},{disabled:i?"disabled":void 0,notClickable:i})),(0,h.jsx)(j,{checked:t,disabled:i,large:m,required:P,warning:E,children:(0,h.jsx)(d.Jr,{size:f.iI*(m?3:2)})})]}),n&&(0,h.jsx)(a.Z,{ml:1,children:(0,h.jsx)(l.Z,{children:n})}),u&&(0,h.jsxs)(a.Z,{pl:1,children:["string"===typeof u&&(0,h.jsx)(s.ZP,{disabled:i,lineThrough:i,monospace:Z,small:S,xsmall:D,children:u}),"string"!==typeof u&&u,p&&(0,h.jsx)(s.ZP,{muted:!0,small:!0,children:p})]})]}),(c||O&&O.touched&&O.error)&&(0,h.jsx)(x,{children:(0,h.jsx)(s.ZP,{small:!0,warning:!0,children:c?(0,r.Z)(c):O.error})})]})}},87372:function(e,n,t){"use strict";var r,i,o,c,l,a,s,u,d=t(82394),p=t(26304),f=t(26653),h=t(9518),b=t(33591),m=t(23831),y=t(2005),g=t(31012),x=t(19711),v=t(49125),j=t(86673),w=t(28598),O=["children","condensed","inline","level","marketing","spacingBelow"];function k(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Z(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?k(Object(t),!0).forEach((function(n){(0,d.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var _=(0,h.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," ",""],x.IH,(function(e){return e.color&&"\n color: ".concat(e.color,"\n ")}),(function(e){return e.yellow&&"\n color: ".concat((e.theme.accent||m.Z.accent).yellow,";\n ")}),(function(e){return e.center&&"\n text-align: center;\n "}),(function(e){return!e.monospace&&0===Number(e.weightStyle)&&"\n font-family: ".concat(y.iI,";\n ")}),(function(e){return!e.monospace&&1===Number(e.weightStyle)&&"\n font-family: ".concat(y.LX,";\n ")}),(function(e){return!e.monospace&&2===Number(e.weightStyle)&&"\n font-family: ".concat(y.LX,";\n ")}),(function(e){return!e.monospace&&3===Number(e.weightStyle)&&"\n font-family: ".concat(y.ry,";\n ")}),(function(e){return!e.monospace&&4===Number(e.weightStyle)&&"\n font-family: ".concat(y.YC,";\n ")}),(function(e){return!e.monospace&&5===Number(e.weightStyle)&&"\n font-family: ".concat(y.nF,";\n ")}),(function(e){return!e.monospace&&(6===Number(e.weightStyle)||e.bold)&&"\n font-family: ".concat(y.nF,";\n ")}),(function(e){return!e.monospace&&7===Number(e.weightStyle)&&"\n font-family: ".concat(y.nF,";\n ")}),(function(e){return!e.monospace&&8===Number(e.weightStyle)&&"\n font-family: ".concat(y.nF,";\n ")}),(function(e){return e.lineHeightAuto&&"\n line-height: normal !important;\n "})),P=h.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(e){return"\n color: ".concat((e.theme.content||m.Z.content).active,";\n ")})),C=h.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],_,b.media.md(r||(r=(0,f.Z)(["\n ","\n "])),g.aQ),b.media.lg(i||(i=(0,f.Z)(["\n ","\n "])),g.aQ),b.media.xl(o||(o=(0,f.Z)(["\n ","\n "])),g.aQ)),S=h.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],_,g.MJ),I=h.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],_,b.media.xs(c||(c=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*v.iI,7*v.iI),b.media.sm(l||(l=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*v.iI,7*v.iI),b.media.md(a||(a=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*v.iI,7*v.iI),b.media.lg(s||(s=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*v.iI,7*v.iI),b.media.xl(u||(u=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*v.iI,7*v.iI)),N=h.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],_,g.BL),D=h.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],_),H=h.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],_),E=h.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],_),M=h.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],_,(function(e){return 1===e.level&&"\n ".concat(g.MJ,"\n ")}),(function(e){return 2===e.level&&"\n ".concat(g.BL,"\n ")}),(function(e){return 3===e.level&&"\n font-size: 24px;\n line-height: 32px;\n "}),(function(e){return 4===e.level&&"\n font-size: 20px;\n line-height: 28px;\n "})),z=function(e){var n,t=e.children,r=e.condensed,i=e.inline,o=e.level,c=e.marketing,l=e.spacingBelow,a=(0,p.Z)(e,O);i?n=M:0===Number(o)?n=C:1===Number(o)?n=c?I:S:2===Number(o)?n=N:3===Number(o)?n=D:4===Number(o)?n=H:5===Number(o)&&(n=E);var s=(0,w.jsxs)(n,Z(Z({},a),{},{level:o,children:[l&&(0,w.jsx)(j.Z,{mb:r?2:3,children:t}),!l&&t]}));return i?s:(0,w.jsx)(P,{children:s})};z.defaultProps={level:3,weightStyle:6},n.Z=z},70902:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=t(82684),c=t(9518),l=t(69898),a=t(23831),s=t(28598),u=["checked","disabled","onCheck"];function d(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function p(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?d(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var f=c.default.label.withConfig({displayName:"ToggleSwitch__ToggleSwitchStyle",componentId:"sc-179r5zs-0"})([""," position:relative;display:inline-block;width:","px;min-width:","px;height:",'px;& input[type="checkbox"]{display:none;}& span{position:absolute;cursor:',";background-color:",";border-radius:13px;",';top:0;right:0;bottom:0;left:0;transition:background-color 0.2s ease;}& span::before{position:absolute;content:"";left:2px;top:2px;width:22px;height:22px;background-color:#787A85;border-radius:50%;transition:transform 0.3s ease;}& input[type="checkbox"]:checked + span::before{transform:translateX(20px);}',""],l.p,46,46,26,(function(e){return e.disabled?"not-allowed":"pointer"}),(function(e){return e.disabled?a.Z.monotone.white:a.Z.monotone.black}),(function(e){return e.disabled&&"border: 1px solid ".concat(a.Z.monotone.grey200)}),(function(e){return!e.disabled&&'\n & input[type="checkbox"]:checked + span {\n background-color: #6AA1E0;\n }\n\n & input[type="checkbox"]:checked + span::before {\n background-color: '.concat(a.Z.monotone.white,";\n }\n ")})),h=function(e,n){var t=e.checked,r=e.disabled,o=e.onCheck,c=(0,i.Z)(e,u);return(0,s.jsx)(l.Z,p(p({},c),{},{disabled:r,input:(0,s.jsxs)(f,p(p({},c),{},{disabled:r,noBackground:!0,noBorder:!0,children:[(0,s.jsx)("input",{checked:t,type:"checkbox"}),(0,s.jsx)("span",{onClick:r?null:function(){return null===o||void 0===o?void 0:o((function(e){return!e}))}})]})),noBackground:!0,ref:n}))};n.Z=o.forwardRef(h)},10831:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return H}});var r=t(77837),i=t(82394),o=t(75582),c=t(38860),l=t.n(c),a=t(82684),s=t(21764),u=t(83455),d=t(60328),p=t(38341),f=t(67971),h=t(87372),b=t(10919),m=t(41788),y=t(30775),g=t(86673),x=[{autoComplete:"remote_repo_link",label:"Remote repo url",required:!0,uuid:"remote_repo_link"},{autoComplete:"repo_path",label:"Local directory path",labelDescription:"Defaults to Python's os.getcwd() if omitted. Mage will create this local directory if it doesn't already exist.",uuid:"repo_path"}],v=[{autoComplete:"username",label:"Username",uuid:"username"},{autoComplete:"email",label:"Email",uuid:"email"},{autoComplete:"ssh_public_key",label:"SSH public key in base64",labelDescription:'Run "cat ~/.ssh/id_rsa.pub | base64 | tr -d \\\\n" in terminal to get base64 encoded public key and paste the result here. The public key will be stored as a Mage secret named "mage_git_ssh_public_key_b64".',type:"password",uuid:"ssh_public_key"},{autoComplete:"ssh_private_key",label:"SSH private key in base64",labelDescription:'Follow same steps as the public key, but run "cat ~/.ssh/id_rsa | base64 | tr -d \\\\n" instead. The private key will be stored as a Mage secret named "mage_git_ssh_private_key_b64".',type:"password",uuid:"ssh_private_key"}],j=[{autoComplete:"branch",label:"Branch name",required:!0,uuid:"branch"}],w=t(19711),O=t(82944),k=t(70902),Z=t(82531),_=t(49125),P=t(79585),C=t(96510),S=t(28598);function I(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function N(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,i.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}function D(){var e=Z.ZP.syncs.list().data,n=(0,a.useState)(null),t=n[0],r=n[1],c=(0,a.useState)(null),l=c[0],m=c[1],I=(0,a.useState)(null),D=I[0],H=I[1];(0,a.useEffect)((function(){if(e){var n,t=null===e||void 0===e||null===(n=e.syncs)||void 0===n?void 0:n[0];r(t),H(!(null===t||void 0===t||!t.branch))}}),[e]);var E=(0,u.Db)(Z.ZP.syncs.useCreate(),{onSuccess:function(e){return(0,C.wD)(e,{callback:function(e){var n=e.sync;n&&(r(n),window.location.reload(),s.Am.success("Sync saved",{position:s.Am.POSITION.BOTTOM_RIGHT,toastId:"data_sync_success"}))},onErrorCallback:function(e){var n=e.error,t=n.exception;n.message;return m(t)}})}}),M=(0,o.Z)(E,2),z=M[0],T=M[1].isLoading,A=(0,u.Db)(Z.ZP.syncs.useUpdate("git"),{onSuccess:function(e){return(0,C.wD)(e,{callback:function(e){e.sync&&s.Am.success("Data synced!",{position:s.Am.POSITION.BOTTOM_RIGHT,toastId:"data_sync_success"})},onErrorCallback:function(e){var n=e.error,t=n.exception;n.message;return m(t)}})}}),W=(0,o.Z)(A,2),q=W[0],B=W[1].isLoading;return(0,S.jsx)(y.Z,{uuidItemSelected:P.fF,uuidWorkspaceSelected:P.WH,children:(0,S.jsxs)(g.Z,{p:_.cd,style:{width:"600px"},children:[(0,S.jsx)(h.Z,{children:"Git repository settings"}),(0,S.jsx)(g.Z,{mt:1,children:(0,S.jsxs)(w.ZP,{bold:!0,children:["You can enable the Git integration by supplying the url for your remote repository. ",(0,S.jsxs)(w.ZP,{bold:!0,inline:!0,children:["You will need to ",(0,S.jsx)(b.Z,{href:"https://docs.mage.ai/developing-in-the-cloud/setting-up-git",openNewWindow:!0,children:"set up your SSH key"})," if you have not done so already."]})]})}),(0,S.jsx)("form",{children:x.map((function(e){var n=e.autoComplete,o=e.disabled,c=e.label,l=e.labelDescription,a=e.required,s=e.type,u=e.uuid;return(0,S.jsxs)(g.Z,{mt:2,children:[l&&(0,S.jsx)(g.Z,{mb:1,children:(0,S.jsx)(w.ZP,{small:!0,children:l})}),(0,S.jsx)(O.Z,{autoComplete:n,disabled:o,label:c,onChange:function(e){r((function(n){return N(N({},n),{},(0,i.Z)({},u,e.target.value))}))},primary:!0,required:a,setContentOnMount:!0,type:s,value:(null===t||void 0===t?void 0:t[u])||""})]},u)}))}),(0,S.jsx)(g.Z,{mt:_.Mq,children:(0,S.jsx)(w.ZP,{bold:!0,children:"(OPTIONAL, BUT RECOMMENDED) Filling out these fields will allow Mage to recover your Git settings if they get reset."})}),(0,S.jsx)("form",{children:v.map((function(e){var n=e.autoComplete,o=e.disabled,c=e.label,l=e.labelDescription,a=e.required,s=e.type,u=e.uuid;return(0,S.jsxs)(g.Z,{mt:2,children:[l&&(0,S.jsx)(g.Z,{mb:1,children:(0,S.jsx)(w.ZP,{small:!0,children:l})}),(0,S.jsx)(O.Z,{autoComplete:n,disabled:o,label:c,onChange:function(e){r((function(n){return N(N({},n),{},(0,i.Z)({},u,e.target.value))}))},primary:!0,required:a,setContentOnMount:!0,type:s,value:(null===t||void 0===t?void 0:t[u])||""})]},u)}))}),(0,S.jsx)(g.Z,{mt:_.Mq,children:(0,S.jsxs)(f.Z,{alignItems:"center",children:[(0,S.jsx)(g.Z,{mr:2,children:(0,S.jsx)(k.Z,{checked:!!D,onCheck:function(){return H((function(e){var n=!e;return n||r((function(e){return N(N({},e),{},{branch:null,sync_on_pipeline_run:!1})})),n}))}})}),(0,S.jsxs)(w.ZP,{bold:!0,large:!0,children:["Use ",(0,S.jsx)(b.Z,{bold:!0,href:"https://docs.mage.ai/production/data-sync/git#git-sync",large:!0,openNewWindow:!0,children:"Git Sync"})]})]})}),D&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(g.Z,{mt:1,children:(0,S.jsx)(w.ZP,{bold:!0,children:"(OPTIONAL) You can also set up your project to only sync with a specified branch."})}),(0,S.jsx)("form",{children:j.map((function(e){var n=e.autoComplete,o=e.disabled,c=e.label,l=e.required,a=e.type,s=e.uuid;return(0,S.jsx)(g.Z,{mt:2,children:(0,S.jsx)(O.Z,{autoComplete:n,disabled:o,label:c,onChange:function(e){r((function(n){return N(N({},n),{},(0,i.Z)({},s,e.target.value))}))},primary:!0,required:l,setContentOnMount:!0,type:a,value:(null===t||void 0===t?void 0:t[s])||""})},s)}))}),(0,S.jsx)(f.Z,{alignItems:"center",children:(0,S.jsx)(g.Z,{mt:2,children:(0,S.jsx)(p.Z,{checked:null===t||void 0===t?void 0:t.sync_on_pipeline_run,label:"Sync before each trigger run",onClick:function(){r((function(e){return N(N({},e),{},{sync_on_pipeline_run:!(null!==t&&void 0!==t&&t.sync_on_pipeline_run)})}))}})})})]}),(0,S.jsx)(g.Z,{mt:2,children:(0,S.jsx)(d.Z,{loading:T,onClick:function(){return z({sync:t})},primary:!0,children:"Save repository settings"})}),l&&(0,S.jsx)(g.Z,{mt:1,children:(0,S.jsx)(w.ZP,{danger:!0,children:l})}),D&&(0,S.jsxs)(g.Z,{mt:_.HN,children:[(0,S.jsx)(h.Z,{children:"Synchronize code from remote repository"}),(0,S.jsx)(g.Z,{mt:1,children:(0,S.jsxs)(w.ZP,{children:["Running the sync from this page will run a one time sync with the remote repository.",(0,S.jsx)("br",{}),"This may ",(0,S.jsx)(w.ZP,{bold:!0,danger:!0,inline:!0,children:"overwrite"})," your existing data, so make sure you\u2019ve committed or backed up your current changes."]})}),(0,S.jsx)(g.Z,{mt:2,children:(0,S.jsx)(d.Z,{danger:!0,loading:B,onClick:function(){return q({sync:{action_type:"sync_data"}})},children:"Synchronize code"})})]})]})})}D.getInitialProps=(0,r.Z)(l().mark((function e(){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var H=(0,m.Z)(D)},37056:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/sync-data",function(){return t(10831)}])}},function(e){e.O(0,[3850,2344,9386,9774,2888,179],(function(){return n=37056,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4841],{1210:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var r=n(82394),i=n(21831),o=n(82684),u=n(47999),s=n(49894),l=n(93461),c=n(57384),a=n(12344),f=n(72454),d=n(28598);function h(e,t){var n=e.children;return(0,d.jsx)(f.HS,{ref:t,children:n})}var v=o.forwardRef(h),p=n(32063),b=n(15270),j=n(82531),O=n(66166),m=n(3055),w=n(49125),g=n(91427),_=n(24141);function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var x=function(e){var t,n=e.after,r=e.afterHidden,h=e.afterWidth,k=e.afterWidthOverride,x=e.before,y=e.beforeWidth,P=e.breadcrumbs,M=e.children,E=e.errors,C=e.headerMenuItems,S=e.navigationItems,A=e.setErrors,D=e.subheaderChildren,I=e.title,N=e.uuid,W=(0,_.i)().width,H="dashboard_after_width_".concat(N),R="dashboard_before_width_".concat(N),T=(0,o.useRef)(null),B=(0,o.useState)(k?h:(0,g.U2)(H,h)),U=B[0],q=B[1],z=(0,o.useState)(!1),F=z[0],X=z[1],K=(0,o.useState)(x?Math.max((0,g.U2)(R,y),13*w.iI):null),L=K[0],Y=K[1],G=(0,o.useState)(!1),J=G[0],Q=G[1],V=(0,o.useState)(null)[1],$=j.ZP.projects.list({},{revalidateOnFocus:!1}).data,ee=null===$||void 0===$?void 0:$.projects,te=[];P?te.push.apply(te,(0,i.Z)(P)):(null===ee||void 0===ee?void 0:ee.length)>=1&&te.push.apply(te,[{label:function(){var e;return null===(e=ee[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},{bold:!0,label:function(){return I}}]),(0,o.useEffect)((function(){null===T||void 0===T||!T.current||F||J||null===V||void 0===V||V(T.current.getBoundingClientRect().width)}),[F,U,J,L,T,V,W]),(0,o.useEffect)((function(){F||(0,g.t8)(H,U)}),[r,F,U,H]),(0,o.useEffect)((function(){J||(0,g.t8)(R,L)}),[J,L,R]);var ne=(0,O.Z)(h);return(0,o.useEffect)((function(){k&&ne!==h&&q(h)}),[k,h,ne]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(c.Z,{title:I}),(0,d.jsx)(a.Z,{breadcrumbs:te,menuItems:C,project:null===ee||void 0===ee?void 0:ee[0],version:null===ee||void 0===ee||null===(t=ee[0])||void 0===t?void 0:t.version}),(0,d.jsxs)(f.Nk,{children:[0!==(null===S||void 0===S?void 0:S.length)&&(0,d.jsx)(f.lm,{children:(0,d.jsx)(b.Z,{navigationItems:S})}),(0,d.jsx)(l.Z,{flex:1,flexDirection:"column",children:(0,d.jsxs)(p.Z,{after:n,afterHeightOffset:m.Mz,afterHidden:r,afterMousedownActive:F,afterWidth:U,before:x,beforeHeightOffset:m.Mz,beforeMousedownActive:J,beforeWidth:f.k1+(x?L:0),hideAfterCompletely:!0,leftOffset:x?f.k1:null,mainContainerRef:T,setAfterMousedownActive:X,setAfterWidth:q,setBeforeMousedownActive:Q,setBeforeWidth:Y,children:[D&&(0,d.jsx)(v,{children:D}),M]})})]}),E&&(0,d.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===A||void 0===A?void 0:A(null)},children:(0,d.jsx)(s.Z,Z(Z({},E),{},{onClose:function(){return null===A||void 0===A?void 0:A(null)}}))})]})}},72433:function(e,t,n){"use strict";n.r(t);var r=n(77837),i=n(75582),o=n(38860),u=n.n(o),s=n(82684),l=n(56085),c=n(83455),a=n(35490),f=n(1210),d=n(41788),h=n(33699),v=n(82531),p=n(94353),b=n(98781),j=n(28799),O=n(96510),m=n(28598);function w(){var e=(0,c.Db)(v.ZP.kernels.useUpdate(b.a_[b.qL.PYTHON]),{onSuccess:function(e){return(0,O.wD)(e,{onErrorCallback:function(e,t){console.log(e),alert(t)}})}}),t=(0,i.Z)(e,1)[0],n=(0,s.useCallback)((function(){return t({kernel:{action_type:"interrupt"}})}),[t]),r=(0,s.useMemo)((function(){return new a.Z}),[]),o=(0,s.useMemo)((function(){return{api_key:p.l,token:r.decodedToken.token}}),[r]),u=(0,l.ZP)((0,j.Ib)("terminal"),{shouldReconnect:function(){return!0},queryParams:o}),d=u.lastMessage,w=u.sendMessage;return(0,m.jsx)(f.Z,{title:"Terminal",uuid:"terminal/index",children:(0,m.jsx)(h.Z,{interruptKernel:n,lastMessage:d,sendMessage:w})})}w.getInitialProps=(0,r.Z)(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),t.default=(0,d.Z)(w)},27271:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/terminal",function(){return n(72433)}])}},function(e){e.O(0,[3850,9565,6085,2344,9386,5141,9774,2888,179],(function(){return t=27271,e(e.s=t);var t}));var t=e.O();_N_E=t}]);