mage-ai 0.8.97__py3-none-any.whl → 0.8.99__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 (152) hide show
  1. mage_ai/api/policies/AutocompleteItemPolicy.py +2 -1
  2. mage_ai/api/policies/BasePolicy.py +2 -2
  3. mage_ai/api/policies/BlockTemplatePolicy.py +2 -1
  4. mage_ai/api/policies/ClusterPolicy.py +2 -1
  5. mage_ai/api/policies/DataProviderPolicy.py +2 -1
  6. mage_ai/api/policies/EventRulePolicy.py +2 -1
  7. mage_ai/api/policies/ExtensionOptionPolicy.py +2 -1
  8. mage_ai/api/policies/FileVersionPolicy.py +2 -1
  9. mage_ai/api/policies/GitBranchPolicy.py +9 -0
  10. mage_ai/api/policies/KernelPolicy.py +2 -1
  11. mage_ai/api/policies/LogPolicy.py +2 -2
  12. mage_ai/api/policies/OauthPolicy.py +15 -0
  13. mage_ai/api/policies/OutputPolicy.py +2 -2
  14. mage_ai/api/policies/PipelinePolicy.py +2 -2
  15. mage_ai/api/policies/PipelineRunPolicy.py +2 -2
  16. mage_ai/api/policies/PipelineSchedulePolicy.py +2 -2
  17. mage_ai/api/policies/PullRequestPolicy.py +64 -0
  18. mage_ai/api/policies/SessionPolicy.py +4 -1
  19. mage_ai/api/policies/VariablePolicy.py +2 -2
  20. mage_ai/api/policies/WidgetPolicy.py +2 -2
  21. mage_ai/api/policies/WorkspacePolicy.py +3 -3
  22. mage_ai/api/presenters/PipelinePresenter.py +1 -0
  23. mage_ai/api/presenters/PullRequestPresenter.py +16 -0
  24. mage_ai/api/presenters/StatusPresenter.py +2 -0
  25. mage_ai/api/presenters/SyncPresenter.py +1 -0
  26. mage_ai/api/presenters/WorkspacePresenter.py +2 -0
  27. mage_ai/api/resources/GitBranchResource.py +81 -26
  28. mage_ai/api/resources/OauthResource.py +31 -4
  29. mage_ai/api/resources/PipelineResource.py +8 -1
  30. mage_ai/api/resources/PullRequestResource.py +87 -0
  31. mage_ai/api/resources/RoleResource.py +6 -3
  32. mage_ai/api/resources/SecretResource.py +2 -5
  33. mage_ai/api/resources/SessionResource.py +18 -0
  34. mage_ai/api/resources/StatusResource.py +7 -3
  35. mage_ai/api/resources/UserResource.py +11 -16
  36. mage_ai/api/resources/WorkspaceResource.py +83 -53
  37. mage_ai/authentication/oauth/active_directory.py +17 -0
  38. mage_ai/authentication/oauth/constants.py +9 -0
  39. mage_ai/authentication/oauth/utils.py +2 -1
  40. mage_ai/authentication/oauth2.py +9 -3
  41. mage_ai/cli/main.py +94 -51
  42. mage_ai/cluster_manager/kubernetes/workload_manager.py +141 -45
  43. mage_ai/data_preparation/git/__init__.py +86 -16
  44. mage_ai/data_preparation/git/api.py +175 -0
  45. mage_ai/data_preparation/models/block/dbt/utils/__init__.py +49 -14
  46. mage_ai/data_preparation/models/block/sql/__init__.py +3 -2
  47. mage_ai/data_preparation/models/pipeline.py +4 -1
  48. mage_ai/data_preparation/models/pipelines/integration_pipeline.py +7 -3
  49. mage_ai/data_preparation/preferences.py +4 -2
  50. mage_ai/data_preparation/repo_manager.py +41 -10
  51. mage_ai/data_preparation/shared/secrets.py +5 -6
  52. mage_ai/data_preparation/sync/__init__.py +2 -1
  53. mage_ai/data_preparation/sync/git_sync.py +2 -5
  54. mage_ai/data_preparation/templates/utils.py +2 -0
  55. mage_ai/orchestration/db/models/oauth.py +22 -4
  56. mage_ai/orchestration/pipeline_scheduler.py +19 -8
  57. mage_ai/orchestration/queue/process_queue.py +15 -12
  58. mage_ai/server/api/clusters.py +21 -11
  59. mage_ai/server/constants.py +1 -1
  60. mage_ai/server/frontend_dist/404.html +2 -2
  61. mage_ai/server/frontend_dist/404.html.html +2 -2
  62. mage_ai/server/frontend_dist/_next/static/WRxCTOtmZhTqQws_7OJZD/_buildManifest.js +1 -0
  63. mage_ai/server/frontend_dist/_next/static/chunks/{1286-993725c925c56a98.js → 1286-b90bd4b7f8abfc3a.js} +1 -1
  64. mage_ai/server/frontend_dist/_next/static/chunks/{1424-f475cae42f8a7fca.js → 1424-90c0f66ba2f86b88.js} +1 -1
  65. mage_ai/server/frontend_dist/_next/static/chunks/3883-c95563b9f60ae526.js +1 -0
  66. mage_ai/server/frontend_dist/_next/static/chunks/6694-c8f2a68074420906.js +1 -0
  67. mage_ai/server/frontend_dist/_next/static/chunks/{9350-1ff50f1d7b9ee754.js → 9350-5191c83a8d0cf454.js} +1 -1
  68. mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-3527178abd99bc87.js → _app-171846e16d26855a.js} +1 -1
  69. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-e4e778f8f5e1bf2e.js +1 -0
  70. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-c788c1b127999825.js +1 -0
  71. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-b4650224a19e8fe6.js +1 -0
  72. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/new-931eb719e3fae29c.js +1 -0
  73. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-d3724bde0b186dd9.js +1 -0
  74. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-af11f9cf94024ac0.js +1 -0
  75. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/{[...slug]-3ec5eb9562e4bff4.js → [...slug]-34326db259f922d1.js} +1 -1
  76. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-503ecb7a72257b79.js +1 -0
  77. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/{[run]-7667080098731e30.js → [run]-2994b8ab7862c07b.js} +1 -1
  78. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-7b31b851e2544b42.js +1 -0
  79. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/{[...slug]-e18058e13882b20d.js → [...slug]-4445619d4eabe065.js} +1 -1
  80. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-6854c10d5589d394.js → triggers-b7db0b682fadb840.js} +1 -1
  81. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-ee0931af3abb55b3.js +1 -0
  82. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-f8a59d718751be9a.js +1 -0
  83. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-90f8830890036eb2.js +1 -0
  84. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users-9f82673fc438ea83.js +1 -0
  85. mage_ai/server/frontend_dist/_next/static/chunks/pages/sign-in-a1871b8a537d823c.js +1 -0
  86. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-48859b4e9c846212.js +1 -0
  87. mage_ai/server/frontend_dist/files.html +2 -2
  88. mage_ai/server/frontend_dist/index.html +2 -2
  89. mage_ai/server/frontend_dist/manage/settings.html +24 -0
  90. mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
  91. mage_ai/server/frontend_dist/manage/users/new.html +24 -0
  92. mage_ai/server/frontend_dist/manage/users.html +2 -2
  93. mage_ai/server/frontend_dist/manage.html +2 -2
  94. mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
  95. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  96. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
  97. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
  98. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
  99. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  100. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  101. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
  102. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
  103. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
  104. mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
  105. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
  106. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  107. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
  108. mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
  109. mage_ai/server/frontend_dist/pipelines.html +2 -2
  110. mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
  111. mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
  112. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
  113. mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
  114. mage_ai/server/frontend_dist/settings.html +2 -2
  115. mage_ai/server/frontend_dist/sign-in.html +2 -2
  116. mage_ai/server/frontend_dist/terminal.html +2 -2
  117. mage_ai/server/frontend_dist/test.html +2 -2
  118. mage_ai/server/frontend_dist/triggers.html +2 -2
  119. mage_ai/server/frontend_dist/version-control.html +2 -2
  120. mage_ai/server/scheduler_manager.py +7 -2
  121. mage_ai/server/server.py +37 -3
  122. mage_ai/server/terminal_server.py +2 -2
  123. mage_ai/server/websocket_server.py +6 -2
  124. mage_ai/services/newrelic/__init__.py +21 -0
  125. mage_ai/settings/__init__.py +32 -0
  126. mage_ai/shared/hash.py +2 -0
  127. mage_ai/tests/api/test_utils.py +29 -2
  128. mage_ai/tests/data_preparation/models/test_pipeline.py +5 -0
  129. {mage_ai-0.8.97.dist-info → mage_ai-0.8.99.dist-info}/METADATA +8 -3
  130. {mage_ai-0.8.97.dist-info → mage_ai-0.8.99.dist-info}/RECORD +136 -127
  131. mage_ai/data_preparation/templates/main/projects/__init__.py +0 -0
  132. mage_ai/server/frontend_dist/_next/static/YLZRSrQ0aqtl-GGePfsMB/_buildManifest.js +0 -1
  133. mage_ai/server/frontend_dist/_next/static/chunks/3077-d58f18ed770e5137.js +0 -1
  134. mage_ai/server/frontend_dist/_next/static/chunks/3714-b676173cd4d8d86c.js +0 -1
  135. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-82b5409dac9564f4.js +0 -1
  136. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-bb6aaa23e92a5add.js +0 -1
  137. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-c91ee702a4cd7a6f.js +0 -1
  138. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-7961010cb0fb9abd.js +0 -1
  139. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-7b8ce89f0d717465.js +0 -1
  140. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-5bd17a8f3f3d57ef.js +0 -1
  141. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-7d75e42d5f4936bb.js +0 -1
  142. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-8220c1200472bf70.js +0 -1
  143. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-b602fa9b6ffabd12.js +0 -1
  144. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users-3f9d5800f268a263.js +0 -1
  145. mage_ai/server/frontend_dist/_next/static/chunks/pages/sign-in-2925c2c1b0c5559a.js +0 -1
  146. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-5ffc663cfb0ec81e.js +0 -1
  147. /mage_ai/server/frontend_dist/_next/static/{YLZRSrQ0aqtl-GGePfsMB → WRxCTOtmZhTqQws_7OJZD}/_middlewareManifest.js +0 -0
  148. /mage_ai/server/frontend_dist/_next/static/{YLZRSrQ0aqtl-GGePfsMB → WRxCTOtmZhTqQws_7OJZD}/_ssgManifest.js +0 -0
  149. {mage_ai-0.8.97.dist-info → mage_ai-0.8.99.dist-info}/LICENSE +0 -0
  150. {mage_ai-0.8.97.dist-info → mage_ai-0.8.99.dist-info}/WHEEL +0 -0
  151. {mage_ai-0.8.97.dist-info → mage_ai-0.8.99.dist-info}/entry_points.txt +0 -0
  152. {mage_ai-0.8.97.dist-info → mage_ai-0.8.99.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[244],{59739:function(e,n,t){"use strict";var i=t(56669);function r(){}function u(){}u.resetWarningCache=r,e.exports=function(){function e(e,n,t,r,u,o){if(o!==i){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function n(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:u,resetWarningCache:r};return t.PropTypes=t,t}},47329:function(e,n,t){e.exports=t(59739)()},56669:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},32316:function(e,n,t){"use strict";t.d(n,{Z:function(){return g}});var i=t(82684),r=t(60328),u=t(67971),o=t(882),l=t(86673),s=t(19711),a=t(99994),c=t(38626),d=t(49125),p=t(37391),f=c.default.div.withConfig({displayName:"indexstyle__TabsContainerStyle",componentId:"sc-segf7l-0"})(["padding-left:","px;padding-right:","px;"," "," ",""],d.cd*d.iI,d.cd*d.iI,(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.allowScroll&&"\n overflow: auto;\n "}),p.w5),v=t(66653),h=t(28598);var g=function(e){var n=e.allowScroll,t=e.compact,c=e.contained,p=e.noPadding,g=e.onClickTab,m=e.selectedTabUUID,b=e.small,x=e.tabs,j=(0,i.useMemo)((function(){var e=x.length,n=[];return x.forEach((function(i,c){var p=i.Icon,f=i.IconSelected,x=i.label,j=i.uuid,_=j===m,y=_&&f||p,Z=x?x():j,C=(0,h.jsxs)(u.Z,{alignItems:"center",children:[y&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(y,{default:!_,size:2*d.iI}),(0,h.jsx)(l.Z,{mr:1})]}),(0,h.jsx)(s.ZP,{bold:!0,default:!_,noWrapping:!0,small:!0,children:Z})]});c>=1&&e>=2&&n.push((0,h.jsx)("div",{style:{marginLeft:1.5*d.iI}},"spacing-".concat(j))),_?n.push((0,h.jsx)(o.Z,{backgroundGradient:a.yr,backgroundPanel:!0,borderLess:!0,borderWidth:2,compact:t||b,onClick:function(e){(0,v.j)(e),g(i)},paddingUnitsHorizontal:1.75,paddingUnitsVertical:1.25,small:b,children:C},j)):n.push((0,h.jsx)("div",{style:{padding:2},children:(0,h.jsx)(r.Z,{borderLess:!0,compact:t||b,default:!0,onClick:function(e){(0,v.j)(e),g(i)},outline:!0,small:b,children:C})},"button-tab-".concat(j)))})),n}),[t,g,m,b,x]),_=(0,h.jsx)(u.Z,{alignItems:"center",children:j});return c?_:(0,h.jsx)(f,{allowScroll:n,noPadding:p,children:_})}},21135:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return q}});var i=t(77837),r=t(75582),u=t(82394),o=t(38860),l=t.n(o),s=t(82684),a=t(83455),c=t(34376),d=t(28598);var p=function(e){var n=e.size;return(0,d.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.5 8.5H15.5V3.5H20.5V8.5ZM14 9V3C14 2.44772 14.4477 2 15 2H21C21.5523 2 22 2.44772 22 3V9C22 9.55229 21.5523 10 21 10H15C14.4477 10 14 9.55229 14 9ZM2 5V12.5V14V21.5C2 22.0523 2.44772 22.5 3 22.5H10.5H12H19.5C20.0523 22.5 20.5 22.0523 20.5 21.5V13.5C20.5 12.9477 20.0523 12.5 19.5 12.5H12V5C12 4.44772 11.5523 4 11 4H3C2.44772 4 2 4.44772 2 5ZM10.5 14V21H3.5V14H10.5ZM19 14V21H12V14H19ZM10.5 5.5V12.5H3.5V5.5H10.5Z",fill:"url(#paint0_linear_2842_55048)"}),(0,d.jsx)("defs",{children:(0,d.jsxs)("linearGradient",{id:"paint0_linear_2842_55048",x1:"2",y1:"12.25",x2:"22",y2:"12.25",gradientUnits:"userSpaceOnUse",children:[(0,d.jsx)("stop",{offset:"0.28125",stopColor:"#7D55EC"}),(0,d.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]})})]})},f=t(27125),v=t(60328),h=t(32316),g=t(67971),m=t(38626),b=t(23831),x=m.default.div.withConfig({displayName:"PageSectionHeader",componentId:"sc-1wznrcv-0"})(["left:0;position:sticky;top:0;width:100%;z-index:2;",""],(function(e){return"\n background-color: ".concat(e.backgroundColor||(e.theme.background||b.Z.background).page,";\n border-bottom: 1px solid ").concat((e.theme.borders||b.Z.borders).medium,";\n ")})),j=t(51099),_=t(60547);var y=function(e){var n=e.size;return(0,d.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("g",{"clip-path":"url(#clip0_3007_70027)",children:(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.75 6.6859C1.75 3.95988 3.95988 1.75 6.6859 1.75h.98788c-.23022.41608-.36128.89466-.36128 1.40385s.13106.98777.36128 1.40384h-.71224c-1.32761 0-2.40385 1.07624-2.40385 2.40385 0 1.32761 1.07624 2.40385 2.40385 2.40385H15.609c3.3916 0 6.141 2.74941 6.141 6.14101 0 3.3916-2.7494 6.141-6.141 6.141H9.55584c.23019-.416.36123-.8946.36123-1.4037 0-.5092-.13108-.9879-.36134-1.404H15.609c1.8409 0 3.3333-1.4923 3.3333-3.3333 0-1.8409-1.4924-3.3333-3.3333-3.3333H6.96154C4.08329 12.1731 1.75 9.83979 1.75 6.96154V6.6859zM10.2163.25H6.6859C3.13145.25.25 3.13145.25 6.6859v.27564c0 3.70666 3.00486 6.71156 6.71154 6.71156H15.609c1.0125 0 1.8333.8208 1.8333 1.8333s-.8208 1.8333-1.8333 1.8333H7.01282c-1.60375 0-2.90385 1.3001-2.90385 2.9039 0 1.3248.88713 2.4423 2.09974 2.7911.06039.0173.12158.0328.18352.0463.20007.0436.40785.0665.62099.0665l.02449-.0001H15.609c4.22 0 7.641-3.421 7.641-7.641 0-4.22-3.421-7.64101-7.641-7.64101H6.96154c-.49918 0-.90385-.40467-.90385-.90385 0-.49918.40467-.90385.90385-.90385h3.25636c1.6038 0 2.9039-1.30009 2.9039-2.90384 0-1.60375-1.3001-2.903849-2.9039-2.90385h-.0016zm0 4.30769c-.77528 0-1.4038-.62852-1.4038-1.40384 0-.77505.62808-1.4034 1.403-1.40385h.0017c.7749.00045 1.403.6288 1.403 1.40385 0 .77532-.6285 1.40384-1.4039 1.40384zM7.01282 21.6474c-.10108 0-.19967-.0106-.29469-.0309-.03025-.0065-.06014-.0139-.08963-.0223-.58829-.1673-1.01912-.7086-1.01912-1.3505 0-.7753.62852-1.4039 1.40384-1.4039s1.40385.6286 1.40385 1.4039c0 .7696-.61935 1.3946-1.38683 1.4037h-.01742z",fill:"url(#paint0_linear_3007_70027)"})}),(0,d.jsxs)("defs",{children:[(0,d.jsxs)("linearGradient",{id:"paint0_linear_3007_70027",x1:"11.75",y1:".250001",x2:"11.75",y2:"23.1475",gradientUnits:"userSpaceOnUse",children:[(0,d.jsx)("stop",{offset:".28125",stopColor:"#7D55EC"}),(0,d.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]}),(0,d.jsx)("clipPath",{id:"clip0_3007_70027",children:(0,d.jsx)("path",{fill:"#fff",transform:"matrix(0 1 1 0 0 0)",d:"M0 0h24v24H0z"})})]})]})},Z=t(47409),C=t(97496),w=t(41788),P=t(55378),O=t(86673),k=t(54283),R=t(82531),S=t(56681),H=t(66166),I=t(10503),E=t(33766),M=t(59920),V=t(98781),T=t(66050),N=t(49125),U=t(7715),D=t(96510),z=t(59e3);function L(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function F(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?L(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):L(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var A={Icon:I.mR,IconSelected:y,label:function(){return"Pipeline runs"},uuid:"pipeline_runs"},B={Icon:I.Re,IconSelected:p,label:function(){return"Block runs"},uuid:"block_runs"},G=[A,B];function W(e){var n,t,i=e.pipeline,u=(0,c.useRouter)(),o=(0,s.useState)(null),l=o[0],p=o[1],m=(0,s.useState)(A),b=m[0],y=m[1],w=(0,s.useState)(S.G7[0]),I=w[0],L=w[1],W=(0,s.useState)({}),q=W[0],X=W[1],Y=(0,s.useState)(null),K=Y[0],Q=Y[1],J=(0,s.useMemo)((function(){return A.uuid===(null===b||void 0===b?void 0:b.uuid)}),[null===b||void 0===b?void 0:b.uuid]),$=i.uuid,ee=R.ZP.pipelines.detail($,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,ne=(0,s.useMemo)((function(){return F(F({},null===ee||void 0===ee?void 0:ee.pipeline),{},{uuid:$})}),[ee,$]),te=(0,s.useState)(),ie=te[0],re=te[1],ue=(0,z.iV)(),oe=(0,H.Z)(ue),le=null!==ue&&void 0!==ue&&ue.page?ue.page:0;(0,s.useEffect)((function(){var e=ue.pipeline_run_id,n=ue.status;if(!(0,U.Xy)(ue,oe)){var t=F(F({},oe),ue);e?t.pipeline_run_id=e:t.pipeline_uuid=$,n?t.status=n:delete t.status,Q(t),X({})}}),[$,ue,oe]);var se={_limit:30,_offset:30*le,pipeline_uuid:$},ae=(0,U.gR)(F(F({},K),se),["tab","page"]);J&&(ae=(0,U.gR)(ae,[E.O2]));var ce=R.ZP.block_runs.list(ae,{},{pauseFetch:!K}).data,de=(0,s.useMemo)((function(){return(null===ce||void 0===ce?void 0:ce.block_runs)||[]}),[ce]),pe=F({},se);null!==ue&&void 0!==ue&&ue.status&&(pe.status=ue.status),J||(pe=(0,U.gR)(pe,[E.O2]));var fe=R.ZP.pipeline_runs.list(pe,{refreshInterval:5e3}),ve=fe.data,he=fe.mutate,ge=(0,s.useMemo)((function(){return(null===ve||void 0===ve?void 0:ve.pipeline_runs)||[]}),[ve]),me=(0,s.useMemo)((function(){var e,n;return J?(null===ve||void 0===ve||null===(e=ve.metadata)||void 0===e?void 0:e.count)||[]:(null===ce||void 0===ce||null===(n=ce.metadata)||void 0===n?void 0:n.count)||[]}),[null===ce||void 0===ce||null===(n=ce.metadata)||void 0===n?void 0:n.count,null===ve||void 0===ve||null===(t=ve.metadata)||void 0===t?void 0:t.count,J]),be=(0,s.useMemo)((function(){return ge.some((function(e){var n=e.status;return n===T.V.INITIAL||n===T.V.RUNNING}))}),[ge]),xe=(0,s.useMemo)((function(){return Object.values(q||{}).filter((function(e){return null!==e}))}),[q]),je=(0,a.Db)(R.ZP.pipelines.useUpdate($),{onSuccess:function(e){return(0,D.wD)(e,{callback:function(){X({}),he()},onErrorCallback:function(e,n){return p({errors:n,response:e})}})}}),_e=(0,r.Z)(je,2),ye=_e[0],Ze=_e[1].isLoading,Ce=(0,H.Z)(b);(0,s.useEffect)((function(){var e=ue.tab;e&&y(G.find((function(n){return n.uuid===e})))}),[ue,b,Ce]);var we=(0,s.useMemo)((function(){return(0,d.jsx)(O.Z,{p:2,children:(0,d.jsx)(j.Z,{maxPages:9,onUpdate:function(e){var n=Number(e),t=F(F({},ue),{},{page:n>=0?n:0});u.push("/pipelines/[pipeline]/runs","/pipelines/".concat($,"/runs?").concat((0,z.uM)(t)))},page:Number(le),totalPages:Math.ceil(me/30)})})}),[le,$,ue,u,me]),Pe=(0,s.useMemo)((function(){return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(C.Z,{allowBulkSelect:(null===ne||void 0===ne?void 0:ne.type)!==V.qL.STREAMING,fetchPipelineRuns:he,onClickRow:function(e){return re((function(n){var t=ge[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipelineRuns:ge,selectedRun:ie,selectedRuns:q,setErrors:p,setSelectedRuns:X}),we]})}),[he,we,null===ne||void 0===ne?void 0:ne.type,ge,ie,q]),Oe=(0,s.useMemo)((function(){return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(f.Z,{blockRuns:de,pipeline:ne}),we]})}),[de,we,ne]);return(0,d.jsxs)(_.Z,{afterHidden:J&&!ie,breadcrumbs:[{label:function(){return"Runs"}}],buildSidekick:J?function(e){return(0,S.ZP)(F(F({},e),{},{selectedRun:ie,selectedTab:I,setSelectedTab:L}))}:function(e){return(0,S.ZP)(e)},errors:l,pageName:M.M.RUNS,pipeline:ne,setErrors:p,title:function(e){var n=e.name;return"".concat(n," runs")},uuid:"".concat(M.M.RUNS,"_").concat($),children:[(0,d.jsx)(x,{children:(0,d.jsx)(O.Z,{py:1,children:(0,d.jsxs)(g.Z,{alignItems:"center",children:[be&&J&&(0,d.jsx)(O.Z,{pl:2,children:(0,d.jsx)(v.Z,{danger:!0,loading:Ze,onClick:function(){ye({pipeline:{status:T.V.CANCELLED}})},outline:!0,children:"Cancel running pipeline runs"})}),xe.length>0&&(0,d.jsx)(O.Z,{pl:2,children:(0,d.jsxs)(v.Z,{loading:Ze,onClick:function(){ye({pipeline:{pipeline_runs:xe,status:V.QK.RETRY}})},primary:!0,children:["Retry selected runs (",xe.length,")"]})}),(0,d.jsx)(h.Z,{onClickTab:function(e){var n=e.uuid;Q(null),(0,E.u7)({tab:n},{replaceParams:!0})},selectedTabUUID:null===b||void 0===b?void 0:b.uuid,tabs:G}),J&&(0,d.jsxs)(P.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?(Q(null),(0,E.u7)({tab:A.uuid},{replaceParams:!0})):(0,E.u7)({page:0,status:e.target.value})},paddingRight:4*N.iI,placeholder:"Select run status",value:null===K||void 0===K?void 0:K.status,children:[(0,d.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),Object.values(T.V).map((function(e){return(0,d.jsx)("option",{value:e,children:Z.Do[e]},e)}))]})]})})}),ve||ce?(0,d.jsxs)(d.Fragment,{children:[J&&Pe,B.uuid===(null===b||void 0===b?void 0:b.uuid)&&Oe]}):(0,d.jsx)(O.Z,{m:3,children:(0,d.jsx)(k.Z,{inverted:!0})})]})}W.getInitialProps=function(){var e=(0,i.Z)(l().mark((function e(n){var t;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var q=(0,w.Z)(W)},79897:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/runs",function(){return t(21135)}])}},function(e){e.O(0,[844,7607,4804,1774,9350,1424,1005,7815,547,3714,3752,8312,2786,9774,2888,179],(function(){return n=79897,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6308],{63153:function(e,n,r){"use strict";r.d(n,{Z3:function(){return t},ms:function(){return o},s7:function(){return i}});var t=[{autoComplete:"username",label:"Username",required:!0,uuid:"username"},{autoComplete:"email",disabled:!1,label:"Email",required:!0,type:"email",uuid:"email"}],i="password_current",o=[{autoComplete:"current-password",label:"Current password",type:"password",uuid:i},{autoComplete:"new-password",label:"New password",type:"password",uuid:"password"},{autoComplete:"new-password",label:"Confirm new password",type:"password",uuid:"password_confirmation"}]},20582:function(e,n,r){"use strict";var t=r(82394),i=r(21831),o=r(75582),u=r(21764),c=r(82684),d=r(83455),a=r(60328),s=r(79891),l=r(67971),f=r(87372),p=r(55378),h=r(86673),m=r(82944),v=r(82531),b=r(66166),g=r(63153),w=r(24224),x=r(9736),Z=r(7715),y=r(96510),j=r(28598);function _(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function P(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?_(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}n.Z=function(e){var n=e.disabledFields,r=e.entity,_=void 0===r?"global":r,k=e.entityID,O=e.hideFields,C=e.newUser,I=e.onDeleteSuccess,S=e.onSaveSuccess,E=e.showDelete,T=e.title,D=e.user,H=(0,c.useState)(!0),N=H[0],W=H[1],V=(0,c.useState)({}),q=V[0],A=V[1],M=(0,c.useState)(null),R=M[0],F=M[1],B=((0,x.PR)()||{}).owner,L=v.ZP.roles.list({entity:_,entity_ids:k?[k]:[],limit_roles:!!C},{revalidateOnFocus:!1}),U=L.data,G=(L.mutate,(0,c.useMemo)((function(){return(null===U||void 0===U?void 0:U.roles)||[]}),[null===U||void 0===U?void 0:U.roles])),Q=(0,d.Db)(C?v.ZP.users.useCreate():v.ZP.users.useUpdate(null===D||void 0===D?void 0:D.id),{onSuccess:function(e){return(0,y.wD)(e,{callback:function(e){var n=e.user,r=g.Z3.concat(g.ms).map((function(e){return e.uuid})),t=(0,Z.GL)(n,r);F(t),u.Am.success(C?"New user created successfully.":"User profile successfully updated.",{position:u.Am.POSITION.BOTTOM_RIGHT,toastId:"user-update-success-".concat(n.id)}),null===S||void 0===S||S(t)},onErrorCallback:function(e){var n=e.error,r=n.errors,t=n.exception,i=n.message,o=n.type;u.Am.error((null===r||void 0===r?void 0:r.error)||t||i,{position:u.Am.POSITION.BOTTOM_RIGHT,toastId:o})}})}}),X=(0,o.Z)(Q,2),z=X[0],Y=X[1].isLoading,J=(0,d.Db)(v.ZP.users.useDelete(null===D||void 0===D?void 0:D.id),{onSuccess:function(e){return(0,y.wD)(e,{callback:function(){null===I||void 0===I||I()},onErrorCallback:function(e){var n=e.error,r=n.errors,t=n.message;alert(t),console.log(r)}})}}),K=(0,o.Z)(J,2),$=K[0],ee=K[1].isLoading,ne=O?(0,i.Z)(O):[];C&&ne.push(g.s7);var re=!ne||!ne.includes(g.s7),te=(0,b.Z)(D);(0,c.useEffect)((function(){if(D&&(!R||(null===te||void 0===te?void 0:te.id)!==(null===D||void 0===D?void 0:D.id))){var e=g.Z3.concat(g.ms).map((function(e){return e.uuid}));F((0,Z.GL)(D,e))}null!==R&&void 0!==R&&R.password||null!==R&&void 0!==R&&R.password_confirmation?(null===R||void 0===R?void 0:R.password)!==(null===R||void 0===R?void 0:R.password_confirmation)?A({password_confirmation:"Password confirmation does not match."}):!re||null!==R&&void 0!==R&&R.password_current?A(null):A({password_current:"This field is required."}):null!==R&&void 0!==R&&R.password_current&&re?null!==R&&void 0!==R&&R.password&&null!==R&&void 0!==R&&R.password_confirmation?A(null):A({password:"This field is required.",password_confirmation:"This field is required."}):null!==R&&void 0!==R&&R.password_current||null!==R&&void 0!==R&&R.password||null!==R&&void 0!==R&&R.password_confirmation||A(null)}),[R,re,D,te]);var ie=(0,c.useState)(!1),oe=ie[0],ue=ie[1],ce=(0,c.useMemo)((function(){return(oe?null===R||void 0===R?void 0:R.roles_new:null===D||void 0===D?void 0:D.roles_new)||[]}),[R,oe,D]),de=(0,c.useMemo)((function(){var e=(null===G||void 0===G?void 0:G.map((function(e){return e.id})))||[];return null===ce||void 0===ce?void 0:ce.filter((function(n){var r=n.id;return e.includes(r)}))}),[ce,G]);return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(f.Z,{children:T||"Edit profile"}),(0,j.jsxs)("form",{children:[g.Z3.filter((function(e){var n=e.uuid;return!ne||!ne.includes(n)})).map((function(e){var n=e.autoComplete,r=e.disabled,i=e.label,o=e.required,u=e.type,c=e.uuid;return(0,j.jsx)(h.Z,{mt:2,children:(0,j.jsx)(m.Z,{autoComplete:n,disabled:r&&!C,label:i,onChange:function(e){W(!1),F((function(n){return P(P({},n),{},(0,t.Z)({},c,e.target.value))}))},primary:!0,required:o,setContentOnMount:!0,type:u,value:(null===R||void 0===R?void 0:R[c])||""})},c)})),!(null!==D&&void 0!==D&&D.owner)&&(0,j.jsxs)(h.Z,{mt:2,children:[(0,j.jsx)(p.Z,{disabled:null===n||void 0===n?void 0:n.includes("roles"),label:"Roles",onChange:function(e){var n=(0,w.sE)(G,(function(n){return n.id==e.target.value}));n&&(W(!1),ue(!0),F((function(e){var r={};return(0,w.sE)(ce,(function(e){return e.id==(null===n||void 0===n?void 0:n.id)}))||(r={roles_new:[].concat((0,i.Z)(ce),[n])}),P(P({},e),r)})))},primary:!0,setContentOnMount:!0,children:G.map((function(e){var n=e.id,r=e.name;return(0,j.jsx)("option",{value:n,children:r},r)}))}),(0,j.jsx)(h.Z,{mb:1}),(0,j.jsx)(l.Z,{alignItems:"center",flexWrap:"wrap",children:null===de||void 0===de?void 0:de.map((function(e){var r=e.id,t=e.name;return(0,j.jsx)(h.Z,{mb:1,mr:1,children:(0,j.jsx)(s.Z,{disabled:null===n||void 0===n?void 0:n.includes("roles"),label:t,onClick:function(){W(!1),ue(!0),F((function(e){return P(P({},e),{},{roles_new:(0,w.Od)(ce,(function(e){return e.id===r}))})}))},primary:!0})},"user_roles/".concat(t))}))})]}),(0,j.jsxs)(h.Z,{mt:5,children:[(0,j.jsx)(f.Z,{children:C?"Password":"Change password"}),g.ms.filter((function(e){var n=e.uuid;return!ne||!ne.includes(n)})).map((function(e){var n=e.autoComplete,r=e.disabled,i=e.label,o=e.required,u=e.type,c=e.uuid;return(0,j.jsx)(h.Z,{mt:2,children:(0,j.jsx)(m.Z,{autoComplete:n,disabled:r,label:i,meta:{error:null===q||void 0===q?void 0:q[c],touched:!(null===q||void 0===q||!q[c])},onChange:function(e){W(!1),F((function(n){return P(P({},n),{},(0,t.Z)({},c,e.target.value))}))},primary:!0,required:o,setContentOnMount:!0,type:u,value:(null===R||void 0===R?void 0:R[c])||""})},c)}))]}),(0,j.jsx)(h.Z,{mt:5,children:(0,j.jsxs)(l.Z,{children:[(0,j.jsx)(a.Z,{disabled:N||q&&!(0,Z.Qr)(q),loading:Y,onClick:function(){var e,n=P({},R);"roles_new"in n&&(n.roles_new=null===(e=R.roles_new)||void 0===e?void 0:e.map((function(e){return e.id})));z({user:n})},primary:!0,children:C?"Create new user":"Update user profile"}),E&&B&&(0,j.jsx)(h.Z,{ml:1,children:(0,j.jsx)(a.Z,{danger:!0,loading:ee,onClick:function(){window.confirm("Are you sure you want to delete ".concat(R.username||R.email,"?"))&&$()},children:"Delete user"})})]})})]})]})}},79891:function(e,n,r){"use strict";var t=r(38626),i=r(60328),o=r(67971),u=r(86673),c=r(19711),d=r(23831),a=r(10503),s=r(49125),l=r(31012),f=r(28598),p=t.default.div.withConfig({displayName:"Chip__ChipStyle",componentId:"sc-1ok73g-0"})(["display:inline-block;"," "," "," "," ",""],(function(e){return!e.primary&&"\n background-color: ".concat((e.theme.background||d.Z.background).popup,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.chart||d.Z.chart).primary,";\n ")}),(function(e){return!e.small&&"\n border-radius: ".concat((s.iI+l.Al)/2,"px;\n height: ").concat(1.5*s.iI+l.Al,"px;\n padding: ").concat(s.iI/1.5,"px ").concat(1.25*s.iI,"px;\n ")}),(function(e){return e.small&&"\n border-radius: ".concat((s.iI/2+l.Al)/2,"px;\n height: ").concat(l.Al+s.iI/2+2,"px;\n padding: ").concat(s.iI/4,"px ").concat(s.iI,"px;\n ")}),(function(e){return e.border&&"\n border: 1px solid ".concat((e.theme.content||d.Z.content).muted,";\n ")}));n.Z=function(e){var n=e.border,r=e.children,t=e.disabled,d=e.label,l=e.onClick,h=e.primary,m=e.small;return(0,f.jsx)(p,{border:n,primary:h,small:m,children:(0,f.jsx)(i.Z,{basic:!0,disabled:t,noBackground:!0,noPadding:!0,onClick:l,transparent:!0,children:(0,f.jsxs)(o.Z,{alignItems:"center",children:[r,d&&(0,f.jsx)(c.ZP,{small:m,children:d}),!t&&(0,f.jsx)(u.Z,{ml:1,children:(0,f.jsx)(a.x8,{default:h,muted:!h,size:m?s.iI:1.25*s.iI})})]})})})}},29237:function(e,n,r){"use strict";var t=r(38626),i=r(67971),o=r(86673),u=r(19711),c=r(23831),d=r(73942),a=r(37391),s=r(49125),l=r(28598),f=(0,t.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*s.iI,1.5*s.iI,1.5*s.iI),p=t.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],d.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||c.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||c.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||c.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||c.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||c.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=t.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],d.n_,d.n_,(function(e){return"\n background-color: ".concat((e.theme.background||c.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||c.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),f,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),m=t.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*s.iI,a.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*s.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),v=t.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],d.M8,d.YF,1.75*s.iI);n.Z=function(e){var n=e.borderless,r=e.children,t=e.containerRef,c=e.contentContainerRef,d=e.dark,a=e.footer,s=e.fullHeight,f=void 0===s||s,b=e.fullWidth,g=void 0===b||b,w=e.header,x=e.headerHeight,Z=e.headerIcon,y=e.headerPaddingVertical,j=e.headerTitle,_=e.maxHeight,P=e.maxWidth,k=e.minWidth,O=e.noPadding,C=e.overflowVisible,I=e.subtitle,S=e.success;return(0,l.jsxs)(p,{borderless:n,dark:d,fullHeight:f,fullWidth:g,maxHeight:_,maxWidth:P,minWidth:k,overflowVisible:C,ref:t,success:S,children:[(w||j)&&(0,l.jsxs)(h,{headerPaddingVertical:y,height:x,children:[w&&w,j&&(0,l.jsx)(i.Z,{alignItems:"center",justifyContent:"space-between",children:(0,l.jsxs)(i.Z,{alignItems:"center",children:[Z&&Z,(0,l.jsx)(o.Z,{ml:Z?1:0,children:(0,l.jsx)(u.ZP,{bold:!0,default:!0,children:j})})]})})]}),(0,l.jsxs)(m,{maxHeight:_,noPadding:O,overflowVisible:C,ref:c,children:[I&&(0,l.jsx)(o.Z,{mb:2,children:(0,l.jsx)(u.ZP,{default:!0,children:I})}),r]}),a&&(0,l.jsx)(v,{children:a})]})}},96283:function(e,n,r){"use strict";r.r(n);var t=r(77837),i=r(38860),o=r.n(i),u=r(29237),c=r(41788),d=r(30775),a=r(86673),s=r(20582),l=r(82531),f=r(49125),p=r(79585),h=r(9736),m=r(28598);function v(){var e=((0,h.PR)()||{}).id,n=l.ZP.users.detail(e),r=n.data,t=n.mutate,i=null===r||void 0===r?void 0:r.user;return(0,m.jsx)(d.Z,{uuidItemSelected:p.DQ,uuidWorkspaceSelected:p.tC,children:(0,m.jsx)(a.Z,{p:f.cd,children:(0,m.jsx)(u.Z,{children:(0,m.jsx)(s.Z,{disabledFields:["roles"],onSaveSuccess:t,user:i})})})})}v.getInitialProps=(0,t.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,c.Z)(v)},10736:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/account/profile",function(){return r(96283)}])},80022:function(e,n,r){"use strict";function t(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(n,{Z:function(){return t}})},15544:function(e,n,r){"use strict";function t(e){return t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(e)}r.d(n,{Z:function(){return t}})},99177:function(e,n,r){"use strict";function t(e,n){return t=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},t(e,n)}function i(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&t(e,n)}r.d(n,{Z:function(){return i}})},93189:function(e,n,r){"use strict";r.d(n,{Z:function(){return o}});var t=r(12539),i=r(80022);function o(e,n){if(n&&("object"===t(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}}},function(e){e.O(0,[844,1424,1005,3077,9774,2888,179],(function(){return n=10736,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3853],{76096:function(e,t,n){"use strict";var r=n(82394),i=n(26304),c=(n(82684),n(33591)),o=n(28598),u=["children","fullHeight","gutter","style"];function d(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 s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(e){var t=e.children,n=e.fullHeight,r=e.gutter,d=e.style,l=void 0===d?{}:d,a=(0,i.Z)(e,u),h=s({},l);return r&&(h.paddingLeft=r,h.paddingRight=h.paddingLeft),n&&(h.height="100%"),(0,o.jsx)(c.Col,s(s({},a),{},{style:h,children:t}))}},97361:function(e,t,n){"use strict";var r=n(82394),i=n(26304),c=n(82684),o=n(33591),u=n(28598),d=["children","fullHeight","gutter","justifyContent","style"];function s(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 l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(e){var t=e.children,n=e.fullHeight,r=e.gutter,s=e.justifyContent,a=e.style,h=void 0===a?{}:a,f=(0,i.Z)(e,d),p=l({},h);return r&&(p.marginLeft=-1*r,p.marginRight=p.marginLeft),n&&(p.height="100%"),(0,u.jsx)(o.Row,l(l({},f),{},{justifyContent:s,style:p,children:c.Children.map(t,(function(e,t){return e&&c.cloneElement(e,{gutter:r,key:t})}))}))}},29237:function(e,t,n){"use strict";var r=n(38626),i=n(67971),c=n(86673),o=n(19711),u=n(23831),d=n(73942),s=n(37391),l=n(49125),a=n(28598),h=(0,r.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*l.iI,1.5*l.iI,1.5*l.iI),f=r.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],d.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||u.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||u.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\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 "})),p=r.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],d.n_,d.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 ")}),h,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),g=r.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*l.iI,s.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*l.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),b=r.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],d.M8,d.YF,1.75*l.iI);t.Z=function(e){var t=e.borderless,n=e.children,r=e.containerRef,u=e.contentContainerRef,d=e.dark,s=e.footer,l=e.fullHeight,h=void 0===l||l,m=e.fullWidth,j=void 0===m||m,x=e.header,v=e.headerHeight,y=e.headerIcon,Z=e.headerPaddingVertical,w=e.headerTitle,P=e.maxHeight,O=e.maxWidth,_=e.minWidth,k=e.noPadding,C=e.overflowVisible,H=e.subtitle,I=e.success;return(0,a.jsxs)(f,{borderless:t,dark:d,fullHeight:h,fullWidth:j,maxHeight:P,maxWidth:O,minWidth:_,overflowVisible:C,ref:r,success:I,children:[(x||w)&&(0,a.jsxs)(p,{headerPaddingVertical:Z,height:v,children:[x&&x,w&&(0,a.jsx)(i.Z,{alignItems:"center",justifyContent:"space-between",children:(0,a.jsxs)(i.Z,{alignItems:"center",children:[y&&y,(0,a.jsx)(c.Z,{ml:y?1:0,children:(0,a.jsx)(o.ZP,{bold:!0,default:!0,children:w})})]})})]}),(0,a.jsxs)(g,{maxHeight:P,noPadding:k,overflowVisible:C,ref:u,children:[H&&(0,a.jsx)(c.Z,{mb:2,children:(0,a.jsx)(o.ZP,{default:!0,children:H})}),n]}),s&&(0,a.jsx)(b,{children:s})]})}},42949:function(e,t,n){"use strict";n.r(t);var r=n(77837),i=n(75582),c=n(38860),o=n.n(c),u=n(82684),d=n(83455),s=n(38341),l=n(76096),a=n(34744),h=n(93461),f=n(67971),p=n(87372),g=n(10919),b=n(29237),m=n(41788),j=n(97361),x=n(30775),v=n(86673),y=n(54283),Z=n(19711),w=n(70902),P=n(82531),O=n(11366),_=n(49125),k=n(79585),C=n(91427),H=n(96510),I=n(9728),W=n(28598);function E(){var e=(0,u.useState)(!!(0,C.U2)(O.kY)),t=e[0],n=e[1],r=(0,I.VI)(null,{},[],{uuid:"settings/workspace/preferences"}),c=(0,i.Z)(r,1)[0],o=P.ZP.projects.list(),m=o.data,E=o.mutate,D=(0,u.useMemo)((function(){var e;return null===m||void 0===m||null===(e=m.projects)||void 0===e?void 0:e[0]}),[m])||{},S=D.help_improve_mage,N=D.name,V=D.project_uuid,L=(0,d.Db)(P.ZP.projects.useUpdate(N),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(){E()},onErrorCallback:function(e,t){return c({errors:t,response:e})}})}}),R=(0,i.Z)(L,2),T=R[0],U=R[1].isLoading,Y=(0,u.useCallback)((function(e){return T({project:e})}),[T]);return(0,W.jsx)(x.Z,{uuidItemSelected:k.HY,uuidWorkspaceSelected:k.WH,children:(0,W.jsx)(v.Z,{p:_.cd,children:(0,W.jsx)(j.Z,{justifyContent:"center",children:(0,W.jsx)(l.Z,{xl:8,xxl:6,children:(0,W.jsxs)(b.Z,{noPadding:!0,children:[(0,W.jsxs)(v.Z,{p:_.cd,children:[(0,W.jsx)(v.Z,{mb:1,children:(0,W.jsx)(p.Z,{level:5,children:"Project name"})}),(0,W.jsx)(Z.ZP,{default:!0,monospace:!0,children:N})]}),(0,W.jsx)(a.Z,{light:!0}),(0,W.jsxs)(v.Z,{p:_.cd,children:[(0,W.jsx)(v.Z,{mb:1,children:(0,W.jsx)(p.Z,{level:5,children:"Project UUID"})}),(0,W.jsx)(Z.ZP,{default:!!V,monospace:!0,muted:!V,children:V||"Not required"})]}),(0,W.jsx)(a.Z,{light:!0}),(0,W.jsx)(v.Z,{p:_.cd,children:(0,W.jsxs)(f.Z,{alignItems:"center",justifyContent:"space-between",children:[(0,W.jsxs)(h.Z,{flexDirection:"column",children:[(0,W.jsx)(v.Z,{mb:1,children:(0,W.jsx)(p.Z,{level:5,children:"Help improve Mage"})}),(0,W.jsxs)(Z.ZP,{default:!0,children:["Please contribute usage statistics to help improve the developer experience for you and everyone in the community. Learn more ",(0,W.jsx)(g.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,children:"here"}),"."]})]}),(0,W.jsx)(v.Z,{mr:_.cd}),(0,W.jsx)(w.Z,{checked:S,onCheck:function(){Y({help_improve_mage:!S})}})]})}),(0,W.jsx)(a.Z,{light:!0}),(0,W.jsxs)(v.Z,{p:_.cd,children:[(0,W.jsx)(v.Z,{mb:1,children:(0,W.jsx)(p.Z,{level:5,children:"Automatically generate block names"})}),(0,W.jsx)(f.Z,{alignItems:"center",children:(0,W.jsx)(s.Z,{checked:t,label:"Use randomly generated names for blocks created in the future",onClick:function(){n(!t),(0,C.t8)(O.kY,!t)}})})]}),U&&(0,W.jsx)(v.Z,{p:_.cd,children:(0,W.jsx)(y.Z,{inverted:!0})})]})})})})})}E.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)}))),t.default=(0,m.Z)(E)},11366:function(e,t,n){"use strict";n.d(t,{H8:function(){return i},g6:function(){return c},kY:function(){return r}});var r="automatically_name_blocks",i="pipeline_edit_before_tab_selected",c="pipeline_edit_hidden_blocks"},33323:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/preferences",function(){return n(42949)}])},80022:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return r}})},15544:function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{Z:function(){return r}})},99177:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,{Z:function(){return i}})},93189:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(12539),i=n(80022);function c(e,t){if(t&&("object"===r(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}}},function(e){e.O(0,[844,1424,1005,3077,9774,2888,179],(function(){return t=33323,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2403],{10831:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return H}});var r,i=n(77837),o=n(82394),s=n(75582),u=n(38860),l=n.n(u),c=n(82684),a=n(21764),d=n(83455),p=n(60328),h=n(38341),f=n(67971),y=n(87372),m=n(10919),b=n(41788),j=n(55378),v=n(30775),g=n(86673);!function(e){e.SSH="ssh",e.HTTPS="https"}(r||(r={}));var Z=[{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"}],x=[{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 && echo" in terminal to get base64 encoded public key and paste the result here. The key will be stored as a Mage secret.',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 && echo" instead. The key will be stored as a Mage secret.',type:"password",uuid:"ssh_private_key"}],_=[{autoComplete:"username",label:"Username",required:!0,uuid:"username"},{autoComplete:"email",label:"Email",required:!0,uuid:"email"},{autoComplete:"access_token",label:"Access token",labelDescription:"Add your Git access token to authenticate with your provided username. The access token will be stored as a Mage secret.",required:!0,type:"password",uuid:"access_token"}],w=[{autoComplete:"branch",label:"Branch name",required:!0,uuid:"branch"}],k=n(19711),O=n(82944),C=n(82531),P=n(49125),S=n(79585),T=n(96510),q=n(28598);function M(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 D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function E(){var e=C.ZP.syncs.list().data,t=(0,c.useState)(null),n=t[0],i=t[1],u=(0,c.useState)(null),l=u[0],b=u[1],M=(0,c.useState)(null),E=M[0],H=M[1],I=(0,c.useState)(null),N=I[0],G=I[1];(0,c.useEffect)((function(){if(e){var t,n=null===e||void 0===e||null===(t=e.syncs)||void 0===t?void 0:t[0];b(null===n||void 0===n?void 0:n.user_git_settings),i(n),G(!(null===n||void 0===n||!n.branch))}}),[e]);var A=(0,d.Db)(C.ZP.syncs.useCreate(),{onSuccess:function(e){return(0,T.wD)(e,{callback:function(e){var t=e.sync;t&&(i(t),window.location.reload(),a.Am.success("Sync saved",{position:a.Am.POSITION.BOTTOM_RIGHT,toastId:"data_sync_success"}))},onErrorCallback:function(e){var t=e.error.exception;return H(t)}})}}),R=(0,s.Z)(A,2),F=R[0],U=R[1].isLoading,W=(0,d.Db)(C.ZP.syncs.useUpdate("git"),{onSuccess:function(e){return(0,T.wD)(e,{callback:function(e){e.sync&&a.Am.success("Success!",{position:a.Am.POSITION.BOTTOM_RIGHT,toastId:"data_sync_success"})},onErrorCallback:function(e){var t=e.error.exception;return H(t)}})}}),B=(0,s.Z)(W,2),L=B[0],z=B[1].isLoading,X=(0,c.useMemo)((function(){return(null===n||void 0===n?void 0:n.auth_type)||r.SSH}),[null===n||void 0===n?void 0:n.auth_type]),Y=(0,c.useMemo)((function(){return X===r.HTTPS?_:x}),[X]),J=C.ZP.statuses.list().data,K=(0,c.useMemo)((function(){var e,t;return null===J||void 0===J||null===(e=J.statuses)||void 0===e||null===(t=e[0])||void 0===t?void 0:t.require_user_authentication}),[J]),Q=(0,c.useMemo)((function(){var e=i,t=n;return K&&(e=b,t=l),(0,q.jsx)("form",{children:Y.map((function(n){var r,i=n.autoComplete,s=n.disabled,u=n.label,l=n.labelDescription,c=n.required,a=n.type,d=n.uuid;return(0,q.jsxs)(g.Z,{mt:2,children:[l&&(0,q.jsx)(g.Z,{mb:1,children:(0,q.jsx)(k.ZP,{small:!0,children:l})}),(0,q.jsx)(O.Z,{autoComplete:i,disabled:s,label:u,onChange:function(t){e((function(e){return D(D({},e),{},(0,o.Z)({},d,t.target.value))}))},primary:!0,required:c,setContentOnMount:!0,type:a,value:(null===(r=t)||void 0===r?void 0:r[d])||""})]},d)}))})}),[Y,K,b,i,n,l]);return(0,q.jsx)(v.Z,{uuidItemSelected:S.fF,uuidWorkspaceSelected:S.WH,children:(0,q.jsxs)(g.Z,{p:P.cd,style:{width:"600px"},children:[(0,q.jsx)(y.Z,{children:"Git repository settings"}),(0,q.jsx)(g.Z,{mt:1,children:(0,q.jsx)(k.ZP,{bold:!0,children:"Authentication type"})}),(0,q.jsx)(g.Z,{mt:1,children:(0,q.jsx)(j.Z,{compact:!0,label:"Authentication type",onChange:function(e){var t=e.target.value;i((function(e){return D(D({},e),{},{auth_type:t})}))},value:X,children:Object.entries(r).map((function(e){var t=(0,s.Z)(e,2),n=t[0],r=t[1];return(0,q.jsx)("option",{value:r,children:n},r)}))})}),(0,q.jsx)(g.Z,{mt:P.Mq,children:X===r.SSH&&(0,q.jsxs)(k.ZP,{bold:!0,children:["You will need to ",(0,q.jsx)(m.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,q.jsx)("form",{children:Z.map((function(e){var t=e.autoComplete,r=e.disabled,s=e.label,u=e.labelDescription,l=e.required,c=e.type,a=e.uuid;return(0,q.jsxs)(g.Z,{mt:2,children:[u&&(0,q.jsx)(g.Z,{mb:1,children:(0,q.jsx)(k.ZP,{small:!0,children:u})}),(0,q.jsx)(O.Z,{autoComplete:t,disabled:r,label:s,onChange:function(e){i((function(t){return D(D({},t),{},(0,o.Z)({},a,e.target.value))}))},primary:!0,required:l,setContentOnMount:!0,type:c,value:(null===n||void 0===n?void 0:n[a])||""})]},a)}))}),(0,q.jsx)(g.Z,{mt:P.Mq,children:(0,q.jsxs)(f.Z,{alignItems:"center",children:[(0,q.jsx)(g.Z,{mr:1,children:(0,q.jsx)(h.Z,{checked:!!N,onClick:function(){return G((function(e){var t=!e;return t||i((function(e){return D(D({},e),{},{branch:null,sync_on_pipeline_run:!1})})),t}))}})}),(0,q.jsxs)(k.ZP,{bold:!0,children:["Use ",(0,q.jsx)(m.Z,{bold:!0,href:"https://docs.mage.ai/production/data-sync/git#git-sync",openNewWindow:!0,children:"Git Sync"})," (Click link for more information)"]})]})}),N?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(g.Z,{mt:P.Mq,children:(0,q.jsx)(k.ZP,{bold:!0,children:"Sync with a specified branch when requested or on every trigger run. These settings will be saved at the project level."})}),(0,q.jsx)("form",{children:w.map((function(e){var t=e.autoComplete,r=e.disabled,s=e.label,u=e.required,l=e.type,c=e.uuid;return(0,q.jsx)(g.Z,{mt:2,children:(0,q.jsx)(O.Z,{autoComplete:t,disabled:r,label:s,onChange:function(e){i((function(t){return D(D({},t),{},(0,o.Z)({},c,e.target.value))}))},primary:!0,required:u,setContentOnMount:!0,type:l,value:(null===n||void 0===n?void 0:n[c])||""})},c)}))}),(0,q.jsx)(f.Z,{alignItems:"center",children:(0,q.jsx)(g.Z,{mt:2,children:(0,q.jsx)(h.Z,{checked:null===n||void 0===n?void 0:n.sync_on_pipeline_run,label:"Sync before each trigger run",onClick:function(){i((function(e){return D(D({},e),{},{sync_on_pipeline_run:!(null!==n&&void 0!==n&&n.sync_on_pipeline_run)})}))}})})}),(0,q.jsx)(g.Z,{mt:P.Mq,children:(0,q.jsx)(k.ZP,{bold:!0,children:"Configure the Git authentication credentials that will be used to sync with the specified Git repository."})}),(0,q.jsx)("form",{children:Y.map((function(e){var t=e.autoComplete,r=e.disabled,s=e.label,u=e.labelDescription,l=e.required,c=e.type,a=e.uuid;return(0,q.jsxs)(g.Z,{mt:2,children:[u&&(0,q.jsx)(g.Z,{mb:1,children:(0,q.jsx)(k.ZP,{small:!0,children:u})}),(0,q.jsx)(O.Z,{autoComplete:t,disabled:r,label:s,onChange:function(e){i((function(t){return D(D({},t),{},(0,o.Z)({},a,e.target.value))}))},primary:!0,required:l,setContentOnMount:!0,type:c,value:(null===n||void 0===n?void 0:n[a])||""})]},a)}))})]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(g.Z,{mt:P.Mq,children:(0,q.jsx)(k.ZP,{bold:!0,children:"These fields are required to help Mage configure your Git settings. These settings will be specific to your user."})}),Q]}),(0,q.jsx)(g.Z,{mt:2,children:(0,q.jsx)(p.Z,{loading:U,onClick:function(){return F({sync:D(D({},n),{},{user_git_settings:l})})},primary:!0,children:"Save repository settings"})}),E&&(0,q.jsx)(g.Z,{mt:1,children:(0,q.jsx)(k.ZP,{danger:!0,children:E})}),N&&(0,q.jsxs)(g.Z,{mt:P.HN,children:[(0,q.jsx)(y.Z,{children:"Synchronize code from remote repository"}),(0,q.jsxs)(g.Z,{mt:1,children:[(0,q.jsxs)(k.ZP,{children:["Running the sync from this page will run a one time sync with the remote repository.",(0,q.jsx)("br",{}),"This may ",(0,q.jsx)(k.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,q.jsx)(g.Z,{mt:2}),(0,q.jsxs)(k.ZP,{children:["Reset will tell Mage to try to clone your repository from remote. This will also ",(0,q.jsx)(k.ZP,{bold:!0,danger:!0,inline:!0,children:"overwrite"})," all your local changes and reset any settings you may have configured for your local Git repo. This may be helpful if you are having issues syncing your repository."]})]}),(0,q.jsx)(g.Z,{mt:2,children:(0,q.jsxs)(f.Z,{children:[(0,q.jsx)(p.Z,{loading:z,onClick:function(){return L({sync:{action_type:"sync_data"}})},warning:!0,children:"Synchronize code"}),(0,q.jsx)(g.Z,{ml:2}),(0,q.jsx)(p.Z,{danger:!0,loading:z,onClick:function(){return L({sync:{action_type:"reset"}})},children:"Reset repository"})]})})]})]})})}E.getInitialProps=(0,i.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,b.Z)(E)},37056:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/sync-data",function(){return n(10831)}])},80022:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return r}})},15544:function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{Z:function(){return r}})},99177:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,{Z:function(){return i}})},93189:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(12539),i=n(80022);function o(e,t){if(t&&("object"===r(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}}},function(e){e.O(0,[844,1424,1005,3077,9774,2888,179],(function(){return t=37056,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2287],{63153:function(e,r,n){"use strict";n.d(r,{Z3:function(){return t},ms:function(){return o},s7:function(){return i}});var t=[{autoComplete:"username",label:"Username",required:!0,uuid:"username"},{autoComplete:"email",disabled:!1,label:"Email",required:!0,type:"email",uuid:"email"}],i="password_current",o=[{autoComplete:"current-password",label:"Current password",type:"password",uuid:i},{autoComplete:"new-password",label:"New password",type:"password",uuid:"password"},{autoComplete:"new-password",label:"Confirm new password",type:"password",uuid:"password_confirmation"}]},20582:function(e,r,n){"use strict";var t=n(82394),i=n(21831),o=n(75582),u=n(21764),s=n(82684),l=n(83455),a=n(60328),d=n(79891),c=n(67971),p=n(87372),f=n(55378),v=n(86673),m=n(82944),w=n(82531),b=n(66166),h=n(63153),j=n(24224),y=n(9736),O=n(7715),_=n(96510),Z=n(28598);function g(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function x(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?g(Object(n),!0).forEach((function(r){(0,t.Z)(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}r.Z=function(e){var r=e.disabledFields,n=e.entity,g=void 0===n?"global":n,P=e.entityID,C=e.hideFields,S=e.newUser,k=e.onDeleteSuccess,E=e.onSaveSuccess,I=e.showDelete,D=e.title,A=e.user,T=(0,s.useState)(!0),M=T[0],N=T[1],q=(0,s.useState)({}),R=q[0],F=q[1],U=(0,s.useState)(null),H=U[0],L=U[1],G=((0,y.PR)()||{}).owner,B=w.ZP.roles.list({entity:g,entity_ids:P?[P]:[],limit_roles:!!S},{revalidateOnFocus:!1}),V=B.data,W=(B.mutate,(0,s.useMemo)((function(){return(null===V||void 0===V?void 0:V.roles)||[]}),[null===V||void 0===V?void 0:V.roles])),X=(0,l.Db)(S?w.ZP.users.useCreate():w.ZP.users.useUpdate(null===A||void 0===A?void 0:A.id),{onSuccess:function(e){return(0,_.wD)(e,{callback:function(e){var r=e.user,n=h.Z3.concat(h.ms).map((function(e){return e.uuid})),t=(0,O.GL)(r,n);L(t),u.Am.success(S?"New user created successfully.":"User profile successfully updated.",{position:u.Am.POSITION.BOTTOM_RIGHT,toastId:"user-update-success-".concat(r.id)}),null===E||void 0===E||E(t)},onErrorCallback:function(e){var r=e.error,n=r.errors,t=r.exception,i=r.message,o=r.type;u.Am.error((null===n||void 0===n?void 0:n.error)||t||i,{position:u.Am.POSITION.BOTTOM_RIGHT,toastId:o})}})}}),z=(0,o.Z)(X,2),Q=z[0],J=z[1].isLoading,K=(0,l.Db)(w.ZP.users.useDelete(null===A||void 0===A?void 0:A.id),{onSuccess:function(e){return(0,_.wD)(e,{callback:function(){null===k||void 0===k||k()},onErrorCallback:function(e){var r=e.error,n=r.errors,t=r.message;alert(t),console.log(n)}})}}),Y=(0,o.Z)(K,2),$=Y[0],ee=Y[1].isLoading,re=C?(0,i.Z)(C):[];S&&re.push(h.s7);var ne=!re||!re.includes(h.s7),te=(0,b.Z)(A);(0,s.useEffect)((function(){if(A&&(!H||(null===te||void 0===te?void 0:te.id)!==(null===A||void 0===A?void 0:A.id))){var e=h.Z3.concat(h.ms).map((function(e){return e.uuid}));L((0,O.GL)(A,e))}null!==H&&void 0!==H&&H.password||null!==H&&void 0!==H&&H.password_confirmation?(null===H||void 0===H?void 0:H.password)!==(null===H||void 0===H?void 0:H.password_confirmation)?F({password_confirmation:"Password confirmation does not match."}):!ne||null!==H&&void 0!==H&&H.password_current?F(null):F({password_current:"This field is required."}):null!==H&&void 0!==H&&H.password_current&&ne?null!==H&&void 0!==H&&H.password&&null!==H&&void 0!==H&&H.password_confirmation?F(null):F({password:"This field is required.",password_confirmation:"This field is required."}):null!==H&&void 0!==H&&H.password_current||null!==H&&void 0!==H&&H.password||null!==H&&void 0!==H&&H.password_confirmation||F(null)}),[H,ne,A,te]);var ie=(0,s.useState)(!1),oe=ie[0],ue=ie[1],se=(0,s.useMemo)((function(){return(oe?null===H||void 0===H?void 0:H.roles_new:null===A||void 0===A?void 0:A.roles_new)||[]}),[H,oe,A]),le=(0,s.useMemo)((function(){var e=(null===W||void 0===W?void 0:W.map((function(e){return e.id})))||[];return null===se||void 0===se?void 0:se.filter((function(r){var n=r.id;return e.includes(n)}))}),[se,W]);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(p.Z,{children:D||"Edit profile"}),(0,Z.jsxs)("form",{children:[h.Z3.filter((function(e){var r=e.uuid;return!re||!re.includes(r)})).map((function(e){var r=e.autoComplete,n=e.disabled,i=e.label,o=e.required,u=e.type,s=e.uuid;return(0,Z.jsx)(v.Z,{mt:2,children:(0,Z.jsx)(m.Z,{autoComplete:r,disabled:n&&!S,label:i,onChange:function(e){N(!1),L((function(r){return x(x({},r),{},(0,t.Z)({},s,e.target.value))}))},primary:!0,required:o,setContentOnMount:!0,type:u,value:(null===H||void 0===H?void 0:H[s])||""})},s)})),!(null!==A&&void 0!==A&&A.owner)&&(0,Z.jsxs)(v.Z,{mt:2,children:[(0,Z.jsx)(f.Z,{disabled:null===r||void 0===r?void 0:r.includes("roles"),label:"Roles",onChange:function(e){var r=(0,j.sE)(W,(function(r){return r.id==e.target.value}));r&&(N(!1),ue(!0),L((function(e){var n={};return(0,j.sE)(se,(function(e){return e.id==(null===r||void 0===r?void 0:r.id)}))||(n={roles_new:[].concat((0,i.Z)(se),[r])}),x(x({},e),n)})))},primary:!0,setContentOnMount:!0,children:W.map((function(e){var r=e.id,n=e.name;return(0,Z.jsx)("option",{value:r,children:n},n)}))}),(0,Z.jsx)(v.Z,{mb:1}),(0,Z.jsx)(c.Z,{alignItems:"center",flexWrap:"wrap",children:null===le||void 0===le?void 0:le.map((function(e){var n=e.id,t=e.name;return(0,Z.jsx)(v.Z,{mb:1,mr:1,children:(0,Z.jsx)(d.Z,{disabled:null===r||void 0===r?void 0:r.includes("roles"),label:t,onClick:function(){N(!1),ue(!0),L((function(e){return x(x({},e),{},{roles_new:(0,j.Od)(se,(function(e){return e.id===n}))})}))},primary:!0})},"user_roles/".concat(t))}))})]}),(0,Z.jsxs)(v.Z,{mt:5,children:[(0,Z.jsx)(p.Z,{children:S?"Password":"Change password"}),h.ms.filter((function(e){var r=e.uuid;return!re||!re.includes(r)})).map((function(e){var r=e.autoComplete,n=e.disabled,i=e.label,o=e.required,u=e.type,s=e.uuid;return(0,Z.jsx)(v.Z,{mt:2,children:(0,Z.jsx)(m.Z,{autoComplete:r,disabled:n,label:i,meta:{error:null===R||void 0===R?void 0:R[s],touched:!(null===R||void 0===R||!R[s])},onChange:function(e){N(!1),L((function(r){return x(x({},r),{},(0,t.Z)({},s,e.target.value))}))},primary:!0,required:o,setContentOnMount:!0,type:u,value:(null===H||void 0===H?void 0:H[s])||""})},s)}))]}),(0,Z.jsx)(v.Z,{mt:5,children:(0,Z.jsxs)(c.Z,{children:[(0,Z.jsx)(a.Z,{disabled:M||R&&!(0,O.Qr)(R),loading:J,onClick:function(){var e,r=x({},H);"roles_new"in r&&(r.roles_new=null===(e=H.roles_new)||void 0===e?void 0:e.map((function(e){return e.id})));Q({user:r})},primary:!0,children:S?"Create new user":"Update user profile"}),I&&G&&(0,Z.jsx)(v.Z,{ml:1,children:(0,Z.jsx)(a.Z,{danger:!0,loading:ee,onClick:function(){window.confirm("Are you sure you want to delete ".concat(H.username||H.email,"?"))&&$()},children:"Delete user"})})]})})]})]})}},79891:function(e,r,n){"use strict";var t=n(38626),i=n(60328),o=n(67971),u=n(86673),s=n(19711),l=n(23831),a=n(10503),d=n(49125),c=n(31012),p=n(28598),f=t.default.div.withConfig({displayName:"Chip__ChipStyle",componentId:"sc-1ok73g-0"})(["display:inline-block;"," "," "," "," ",""],(function(e){return!e.primary&&"\n background-color: ".concat((e.theme.background||l.Z.background).popup,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.chart||l.Z.chart).primary,";\n ")}),(function(e){return!e.small&&"\n border-radius: ".concat((d.iI+c.Al)/2,"px;\n height: ").concat(1.5*d.iI+c.Al,"px;\n padding: ").concat(d.iI/1.5,"px ").concat(1.25*d.iI,"px;\n ")}),(function(e){return e.small&&"\n border-radius: ".concat((d.iI/2+c.Al)/2,"px;\n height: ").concat(c.Al+d.iI/2+2,"px;\n padding: ").concat(d.iI/4,"px ").concat(d.iI,"px;\n ")}),(function(e){return e.border&&"\n border: 1px solid ".concat((e.theme.content||l.Z.content).muted,";\n ")}));r.Z=function(e){var r=e.border,n=e.children,t=e.disabled,l=e.label,c=e.onClick,v=e.primary,m=e.small;return(0,p.jsx)(f,{border:r,primary:v,small:m,children:(0,p.jsx)(i.Z,{basic:!0,disabled:t,noBackground:!0,noPadding:!0,onClick:c,transparent:!0,children:(0,p.jsxs)(o.Z,{alignItems:"center",children:[n,l&&(0,p.jsx)(s.ZP,{small:m,children:l}),!t&&(0,p.jsx)(u.Z,{ml:1,children:(0,p.jsx)(a.x8,{default:v,muted:!v,size:m?d.iI:1.25*d.iI})})]})})})}},60921:function(e,r,n){"use strict";n.r(r);var t=n(77837),i=n(82394),o=n(38860),u=n.n(o),s=n(82684),l=n(34376),a=n(60328),d=n(87372),c=n(41788),p=n(30775),f=n(86673),v=n(87815),m=n(19711),w=n(20582),b=n(82531),h=n(66166),j=n(10503),y=n(49125),O=n(79585),_=n(63153),Z=n(9736),g=n(33766),x=n(7715),P=n(59e3),C=n(28598);function S(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function k(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?S(Object(n),!0).forEach((function(r){(0,i.Z)(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function E(){var e=(0,l.useRouter)(),r=(0,Z.PR)()||{},n=r.id,t=r.owner,i=(0,s.useState)(null),o=i[0],u=i[1],c=b.ZP.users.list({},{revalidateOnFocus:!1}),S=c.data,E=c.mutate,I=(0,s.useMemo)((function(){return(null===S||void 0===S?void 0:S.users)||[]}),[null===S||void 0===S?void 0:S.users]),D=b.ZP.users.detail(null===o||void 0===o?void 0:o.user_id,{},{revalidateOnFocus:!1}),A=D.data,T=D.mutate,M=null===A||void 0===A?void 0:A.user,N=(0,P.iV)(),q=(0,h.Z)(N);(0,s.useEffect)((function(){var e=N.add_new_user,r=N.user_id;if(!(0,x.Xy)(N,q)){var n=k(k({},q),N);r?n.user_id=r:delete n.user_id,e?n.add_new_user=e:delete n.add_new_user,u(n)}}),[N,q]);var R=null===o||void 0===o?void 0:o.add_new_user,F=(0,s.useMemo)((function(){return R?(0,C.jsx)(f.Z,{p:y.cd,children:(0,C.jsx)(w.Z,{newUser:!0,onSaveSuccess:function(){(0,g.u7)({add_new_user:null,user_id:null}),E()},title:"Add new user",user:{}})}):M?(0,C.jsx)(f.Z,{p:y.cd,children:(0,C.jsx)(w.Z,{hideFields:[_.s7],onDeleteSuccess:function(){(0,g.u7)({add_new_user:null,user_id:null}),E()},onSaveSuccess:function(){(0,g.u7)({add_new_user:null,user_id:null}),T(),E()},showDelete:!0,title:"Edit user",user:M})}):null}),[T,E,R,M]);return(0,C.jsxs)(p.Z,{after:F,afterHidden:!M&&!R,uuidItemSelected:O.eC,uuidWorkspaceSelected:O.WH,children:[t&&(0,C.jsx)(f.Z,{p:y.cd,children:(0,C.jsx)(a.Z,{beforeIcon:(0,C.jsx)(j.mm,{}),onClick:function(){return(0,g.u7)({add_new_user:1,user_id:null})},primary:!0,children:"Add new user"})}),(0,C.jsx)(f.Z,{p:y.cd,children:(0,C.jsx)(d.Z,{children:"Users"})}),(0,C.jsx)(v.Z,{columnFlex:[1,1,1],columns:[{uuid:"Username"},{uuid:"Email"},{uuid:"Role"}],isSelectedRow:function(e){var r;return(null===(r=I[e])||void 0===r?void 0:r.id)===(null===M||void 0===M?void 0:M.id)},onClickRow:function(r){var t,i=null===(t=I[r])||void 0===t?void 0:t.id;i===n?e.push("/settings/account/profile"):+(null===o||void 0===o?void 0:o.user_id)===i?(0,g.u7)({user_id:null}):(0,g.u7)({add_new_user:null,user_id:i})},rows:I.map((function(e){var r=e.email,n=e.roles_display,t=e.roles_new,i=e.username,o=t||[];return o.sort((function(e,r){return e.id-r.id})),[(0,C.jsx)(m.ZP,{bold:!0,children:i},"username"),(0,C.jsx)(m.ZP,{default:!0,children:r},"email"),(0,C.jsx)(m.ZP,{default:!0,children:o.length>0?o[0].name:n},"roles")]})),uuid:"pipeline-runs"})]})}E.getInitialProps=(0,t.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)}))),r.default=(0,c.Z)(E)},33766:function(e,r,n){"use strict";n.d(r,{O2:function(){return c},g_:function(){return f},u7:function(){return p}});var t=n(75582),i=n(82394),o=n(34376),u=n.n(o),s=n(59e3),l=n(24224);function a(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function d(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?a(Object(n),!0).forEach((function(r){(0,i.Z)(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var c="_offset";function p(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.preserveParams,i=r.pushHistory,o=r.replaceParams,l=(0,s.iV)(),a={};n&&n.forEach((function(e){l[e]&&(a[e]=l[e])}));var c,p=o?a:l;c=window.location.pathname;var f=i?u().push:u().replace,v=d(d({},p),e);Object.entries(e).forEach((function(e){var r=(0,t.Z)(e,2),n=r[0],i=r[1];"undefined"!==typeof i&&null!==i||delete v[n]}));var m=(0,s.uM)(v);m.length>=1&&(m="?".concat(m));var w="".concat(c.split("?")[0]).concat(m);return f(u().router.pathname,w,{shallow:!0})}function f(e,r,n){var i=n.addingMultipleValues,o=n.isList,u=n.itemsPerPage,s=n.pushHistory,a=void 0!==s&&s,f=n.resetLimitParams,v=d({},e);i?Object.entries(r).forEach((function(e){var r=(0,t.Z)(e,2),n=r[0],i=r[1];if(Array.isArray(i)){var o="".concat(n,"[]");v[o]=i.map(String)}})):o?Object.entries(r).forEach((function(e){var r=(0,t.Z)(e,2),n=r[0],i=r[1],o=String(i),u="".concat(n,"[]"),s=v[u];s&&Array.isArray(s)?(s=s.map(String)).includes(o)?v[u]=(0,l.Od)(s,(function(e){return e===o})):v[u]=s.concat(o):v[u]=[o]})):v=d(d({},v),r),f&&(v._limit=u||20,v[c]=0),p(v,{pushHistory:a})}},48673:function(e,r,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/users",function(){return n(60921)}])}},function(e){e.O(0,[844,7607,1424,1005,7815,3077,9774,2888,179],(function(){return r=48673,e(e.s=r);var r}));var r=e.O();_N_E=r}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1312],{76096:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=(t(82684),t(33591)),c=t(28598),l=["children","fullHeight","gutter","style"];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 u(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.fullHeight,r=e.gutter,a=e.style,s=void 0===a?{}:a,f=(0,i.Z)(e,l),d=u({},s);return r&&(d.paddingLeft=r,d.paddingRight=d.paddingLeft),t&&(d.height="100%"),(0,c.jsx)(o.Col,u(u({},f),{},{style:d,children:n}))}},97361:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=t(82684),c=t(33591),l=t(28598),a=["children","fullHeight","gutter","justifyContent","style"];function u(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?u(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.children,t=e.fullHeight,r=e.gutter,u=e.justifyContent,f=e.style,d=void 0===f?{}:f,p=(0,i.Z)(e,a),h=s({},d);return r&&(h.marginLeft=-1*r,h.marginRight=h.marginLeft),t&&(h.height="100%"),(0,l.jsx)(c.Row,s(s({},p),{},{justifyContent:u,style:h,children:o.Children.map(n,(function(e,n){return e&&o.cloneElement(e,{gutter:r,key:n})}))}))}},87372:function(e,n,t){"use strict";var r,i,o,c,l,a,u,s,f=t(82394),d=t(26304),p=t(26653),h=t(38626),g=t(33591),m=t(23831),y=t(2005),b=t(31012),j=t(19711),O=t(49125),w=t(86673),x=t(28598),v=["children","condensed","inline","level","marketing","spacingBelow"];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,f.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 S=(0,h.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," ",""],j.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 "})),C=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 ")})),_=h.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],S,g.media.md(r||(r=(0,p.Z)(["\n ","\n "])),b.aQ),g.media.lg(i||(i=(0,p.Z)(["\n ","\n "])),b.aQ),g.media.xl(o||(o=(0,p.Z)(["\n ","\n "])),b.aQ)),N=h.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],S,b.MJ),k=h.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],S,g.media.xs(c||(c=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*O.iI,7*O.iI),g.media.sm(l||(l=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*O.iI,7*O.iI),g.media.md(a||(a=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*O.iI,7*O.iI),g.media.lg(u||(u=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*O.iI,7*O.iI),g.media.xl(s||(s=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*O.iI,7*O.iI)),z=h.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],S,b.BL),H=h.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],S),I=h.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],S),D=h.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],S),E=h.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],S,(function(e){return 1===e.level&&"\n ".concat(b.MJ,"\n ")}),(function(e){return 2===e.level&&"\n ".concat(b.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 "})),L=function(e){var n,t=e.children,r=e.condensed,i=e.inline,o=e.level,c=e.marketing,l=e.spacingBelow,a=(0,d.Z)(e,v);i?n=E:0===Number(o)?n=_:1===Number(o)?n=c?k:N:2===Number(o)?n=z:3===Number(o)?n=H:4===Number(o)?n=I:5===Number(o)&&(n=D);var u=(0,x.jsxs)(n,Z(Z({},a),{},{level:o,children:[l&&(0,x.jsx)(w.Z,{mb:r?2:3,children:t}),!l&&t]}));return i?u:(0,x.jsx)(C,{children:u})};L.defaultProps={level:3,weightStyle:6},n.Z=L},71208:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Y}});var r=t(77837),i=t(38860),o=t.n(i),c=t(82394),l=t(57384),a=t(41424),u=t(33591),s=t(86673),f=t(49125),d=t(28598);var p=function(e){var n=e.children,t=e.width,r=void 0===t?12:t;return(0,d.jsx)(s.Z,{px:f.zC,children:(0,d.jsx)(u.Row,{children:(0,d.jsx)(u.Col,{lg:r,md:Math.min(12,Math.round(1.5*(12-r))),sm:Math.min(12,Math.round(1.75*(12-r))),xs:12,children:n})})})},h=t(38626),g=t(3055),m=h.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-jcgu5l-0"})(["padding-top:","px;",""],g.Mz,(function(e){return e.fullHeight&&"\n height: calc(100vh);\n "}));function y(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 b(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?y(Object(t),!0).forEach((function(n){(0,c.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):y(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var j=function(e){var n=e.children,t=e.headerProps,r=e.title;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(l.Z,{title:r}),(0,d.jsx)(a.Z,b({},t)),(0,d.jsx)(p,{children:(0,d.jsx)(m,{fullHeight:!0,children:n})})]})},O=t(75582),w=t(82684),x=t(83455),v=t(34376),P=t(35490),Z=t(67971),S=t(87372),C=t(11135),_=t(19711),N=t(82944),k=t(82531),z=t(23831),H=t(73942),I=h.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-641xul-0"})(["border-radius:","px;padding-bottom:","px;padding-left:","px;padding-right:","px;padding-top:","px;width:100%;",""],H.TR,21*f.iI,f.Vj,f.Vj,f.Vj,(function(e){return"\n background-color: ".concat((e.theme.background||z.Z.background).panel,";\n ")})),D=h.default.div.withConfig({displayName:"indexstyle__BackgroundImageStyle",componentId:"sc-641xul-1"})(["border-radius:","px;font-size:0;overflow:hidden;",""],H.D7,(function(e){return e.src&&"\n background-image: url(".concat(e.src,");\n background-size: cover;\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n ")})),E=t(76096),L=t(97361),M=E.Z,R=L.Z,F=t(16115),B=t(7715),T=t(96510),V=t(51504),X=t(59e3),Q=t(9736);function J(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 U(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?J(Object(t),!0).forEach((function(n){(0,c.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):J(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var W="email",q="password";var A=function(e){var n=e.title,t=(0,v.useRouter)(),r=(0,w.useState)(null),i=r[0],o=r[1],l=(0,w.useState)({}),a=l[0],u=l[1],p=(0,x.Db)(k.ZP.sessions.useCreate(),{onSuccess:function(e){return(0,T.wD)(e,{callback:function(e){var n=e.session,r=n.token,i=n.user;(0,Q.av)(i),P.Z.storeToken(r,(function(){var e="/",n=(0,X.iV)(window.location.href);n.redirect_url&&(e="".concat(n.redirect_url,"?").concat((0,X.uM)((0,B.gR)(n,["redirect_url"])))),t.push(e)}))},onErrorCallback:function(e){var n=e.error;o(n)}})}}),h=(0,O.Z)(p,2),g=h[0],m=h[1].isLoading,y=(0,w.useCallback)((function(e){return P.Z.logout((function(){return g(e)}))}),[g]);return(0,d.jsxs)(R,{fullHeight:!0,children:[(0,d.jsx)(M,{lg:6,md:12,children:(0,d.jsx)(Z.Z,{flexDirection:"column",fullHeight:!0,fullWidth:!0,justifyContent:"center",children:(0,d.jsx)(s.Z,{px:{xl:5*f.zC,xs:f.zC},py:f.zC,children:(0,d.jsxs)(I,{children:[(0,d.jsx)(S.Z,{yellow:!0,children:n}),(0,d.jsxs)("form",{children:[(0,d.jsxs)(s.Z,{mt:3,children:[(0,d.jsx)(N.Z,{autoComplete:"username",label:"Email",large:!0,meta:{error:" ",touched:!!i},onChange:function(e){return u((function(n){return U(U({},n),{},(0,c.Z)({},W,e.target.value))}))},primary:!i,value:a.email}),(0,d.jsx)(s.Z,{mt:2,children:(0,d.jsx)(N.Z,{autoComplete:"current-password",label:"Password",large:!0,meta:{error:" ",touched:!!i},onChange:function(e){return u((function(n){return U(U({},n),{},(0,c.Z)({},q,e.target.value))}))},primary:!i,type:"password",value:a.password})})]}),i&&(0,d.jsx)(s.Z,{mt:2,children:(0,d.jsx)(_.ZP,{danger:!0,children:i.message})}),(0,d.jsx)(s.Z,{mt:3,children:(0,d.jsx)(C.ZP,{bold:!0,inline:!0,keyTextGroups:[[F.Lz]],keyboardShortcutValidation:function(e){var n=e.keyMapping;return(0,V.y)([F.Uq],n)},large:!0,loading:m,noHoverUnderline:!0,onClick:function(){return y({session:a})},selected:!0,uuid:"SignForm/action",wind:!0,children:"Sign into Mage"})})]})]})})})}),(0,d.jsx)(M,{hiddenLgDown:!0,lg:6,style:{flex:1},children:(0,d.jsx)(s.Z,{fullHeight:!0,fullWidth:!0,px:f.zC,py:f.zC+8,children:(0,d.jsx)(D,{src:"/images/sessions/abstract.png",children:"Sign in abstract image"})})})]})};function G(){return(0,d.jsx)(j,{title:"Sign in",children:(0,d.jsx)(A,{title:"\ud83d\udc4b Sign in"})})}G.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)})));var Y=G},6821:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/sign-in",function(){return t(71208)}])}},function(e){e.O(0,[844,1424,9774,2888,179],(function(){return n=6821,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2858],{1210:function(e,n,r){"use strict";r.d(n,{Z:function(){return C}});var t=r(82394),o=r(21831),i=r(82684),l=r(47999),c=r(49894),s=r(93461),d=r(57384),a=r(41424),u=r(72454),f=r(28598);function h(e,n){var r=e.children;return(0,f.jsx)(u.HS,{ref:n,children:r})}var m=i.forwardRef(h),v=r(32063),j=r(85019),g=r(82531),x=r(66166),b=r(3055),p=r(49125),Z=r(91427),w=r(24141);function k(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function y(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?k(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var C=function(e){var n,r=e.after,t=e.afterHidden,h=e.afterWidth,k=e.afterWidthOverride,C=e.before,P=e.beforeWidth,_=e.breadcrumbs,O=e.children,I=e.errors,S=e.headerMenuItems,B=e.headerOffset,D=e.mainContainerHeader,M=e.navigationItems,F=e.setErrors,H=e.subheaderChildren,E=e.title,N=e.uuid,A=(0,w.i)().width,U="dashboard_after_width_".concat(N),T="dashboard_before_width_".concat(N),G=(0,i.useRef)(null),R=(0,i.useState)(k?h:(0,Z.U2)(U,h)),V=R[0],L=R[1],z=(0,i.useState)(!1),W=z[0],q=z[1],Q=(0,i.useState)(C?Math.max((0,Z.U2)(T,P),13*p.iI):null),K=Q[0],X=Q[1],Y=(0,i.useState)(!1),J=Y[0],$=Y[1],ee=(0,i.useState)(null)[1],ne=g.ZP.projects.list({},{revalidateOnFocus:!1}).data,re=null===ne||void 0===ne?void 0:ne.projects,te=[];_?te.push.apply(te,(0,o.Z)(_)):(null===re||void 0===re?void 0:re.length)>=1&&te.push.apply(te,[{label:function(){var e;return null===(e=re[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},{bold:!0,label:function(){return E}}]),(0,i.useEffect)((function(){null===G||void 0===G||!G.current||W||J||null===ee||void 0===ee||ee(G.current.getBoundingClientRect().width)}),[W,V,J,K,G,ee,A]),(0,i.useEffect)((function(){W||(0,Z.t8)(U,V)}),[t,W,V,U]),(0,i.useEffect)((function(){J||(0,Z.t8)(T,K)}),[J,K,T]);var oe=(0,x.Z)(h);return(0,i.useEffect)((function(){k&&oe!==h&&L(h)}),[k,h,oe]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(d.Z,{title:E}),(0,f.jsx)(a.Z,{breadcrumbs:te,menuItems:S,project:null===re||void 0===re?void 0:re[0],version:null===re||void 0===re||null===(n=re[0])||void 0===n?void 0:n.version}),(0,f.jsxs)(u.Nk,{children:[0!==(null===M||void 0===M?void 0:M.length)&&(0,f.jsx)(u.lm,{showMore:!0,children:(0,f.jsx)(j.Z,{navigationItems:M,showMore:!0})}),(0,f.jsx)(s.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(v.Z,{after:r,afterHeightOffset:b.Mz,afterHidden:t,afterMousedownActive:W,afterWidth:V,before:C,beforeHeightOffset:b.Mz,beforeMousedownActive:J,beforeWidth:u.k1+(C?K:0),headerOffset:B,hideAfterCompletely:!0,leftOffset:C?u.k1:null,mainContainerHeader:D,mainContainerRef:G,setAfterMousedownActive:q,setAfterWidth:L,setBeforeMousedownActive:$,setBeforeWidth:X,children:[H&&(0,f.jsx)(m,{children:H}),O]})})]}),I&&(0,f.jsx)(l.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===F||void 0===F?void 0:F(null)},children:(0,f.jsx)(c.Z,y(y({},I),{},{onClose:function(){return null===F||void 0===F?void 0:F(null)}}))})]})}},66176:function(e,n,r){"use strict";var t=r(82394),o=r(91835),i=(r(82684),r(38626)),l=r(23831),c=r(73942),s=r(49125),d=r(28598);function a(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function u(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?a(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var f=i.default.div.withConfig({displayName:"ProgressBar__ProgressBarContainerStyle",componentId:"sc-10x9ojc-0"})(["border-radius:","px;height:","px;overflow:hidden;position:relative;width:100%;",""],c.BG,.75*s.iI,(function(e){return"\n background-color: ".concat((e.theme.monotone||l.Z.monotone).grey200,";\n ")})),h=i.default.div.withConfig({displayName:"ProgressBar__ProgressBarStyle",componentId:"sc-10x9ojc-1"})(["height:inherit;position:absolute;"," "," "," ",""],(function(e){return!e.danger&&"\n background-color: ".concat((e.theme.progress||l.Z.progress).positive,";\n ")}),(function(e){return e.progress&&"\n width: ".concat(e.progress,"%;\n ")}),(function(e){return e.danger&&"\n background-color: ".concat((e.theme.progress||l.Z.progress).negative,";\n ")}),(function(e){return e.animateProgress&&"\n animation: animate-progress ".concat(e.animateProgress.duration,"ms linear forwards;\n\n @keyframes animate-progress {\n 0% {\n width: ").concat(e.animateProgress.start,"%;\n }\n\n 100% {\n width: ").concat(e.animateProgress.end,"%;\n }\n }\n ")}));n.Z=function(e){var n=(0,o.Z)({},e);return(0,d.jsx)(f,u(u({},n),{},{children:(0,d.jsx)(h,u({},n))}))}},32316:function(e,n,r){"use strict";r.d(n,{Z:function(){return j}});var t=r(82684),o=r(60328),i=r(67971),l=r(882),c=r(86673),s=r(19711),d=r(99994),a=r(38626),u=r(49125),f=r(37391),h=a.default.div.withConfig({displayName:"indexstyle__TabsContainerStyle",componentId:"sc-segf7l-0"})(["padding-left:","px;padding-right:","px;"," "," ",""],u.cd*u.iI,u.cd*u.iI,(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.allowScroll&&"\n overflow: auto;\n "}),f.w5),m=r(66653),v=r(28598);var j=function(e){var n=e.allowScroll,r=e.compact,a=e.contained,f=e.noPadding,j=e.onClickTab,g=e.selectedTabUUID,x=e.small,b=e.tabs,p=(0,t.useMemo)((function(){var e=b.length,n=[];return b.forEach((function(t,a){var f=t.Icon,h=t.IconSelected,b=t.label,p=t.uuid,Z=p===g,w=Z&&h||f,k=b?b():p,y=(0,v.jsxs)(i.Z,{alignItems:"center",children:[w&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(w,{default:!Z,size:2*u.iI}),(0,v.jsx)(c.Z,{mr:1})]}),(0,v.jsx)(s.ZP,{bold:!0,default:!Z,noWrapping:!0,small:!0,children:k})]});a>=1&&e>=2&&n.push((0,v.jsx)("div",{style:{marginLeft:1.5*u.iI}},"spacing-".concat(p))),Z?n.push((0,v.jsx)(l.Z,{backgroundGradient:d.yr,backgroundPanel:!0,borderLess:!0,borderWidth:2,compact:r||x,onClick:function(e){(0,m.j)(e),j(t)},paddingUnitsHorizontal:1.75,paddingUnitsVertical:1.25,small:x,children:y},p)):n.push((0,v.jsx)("div",{style:{padding:2},children:(0,v.jsx)(o.Z,{borderLess:!0,compact:r||x,default:!0,onClick:function(e){(0,m.j)(e),j(t)},outline:!0,small:x,children:y})},"button-tab-".concat(p)))})),n}),[r,j,g,x,b]),Z=(0,v.jsx)(i.Z,{alignItems:"center",children:p});return a?Z:(0,v.jsx)(h,{allowScroll:n,noPadding:f,children:Z})}},83243:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return be}});var t=r(77837),o=r(38860),i=r.n(o),l=r(41788),c=r(82394),s=r(75582),d=r(54407),a=r.n(d),u=r(82684),f=r(83455),h=r(60328),m=r(34744),v=r(67971),j=r(87372),g=r(55378),x=r(86673),b=r(54283),p=r(19711),Z=r(38435),w=r(82944),k=r(46261),y=r(82531),C=r(10503),P="delete",_="merge",O="pull",I="push",S="rebase",B={uuid:"Branches"},D={uuid:"Files"},M={uuid:"Commit"},F={uuid:"Setup"},H=[F,B,D,M],E=r(49125),N=r(90211),A=r(96510),U=r(28598);var T=function(e){var n=e.branch,r=e.branches,t=e.fetchBranch,o=e.fetchBranches,i=e.showError,l=(0,u.useState)(""),d=l[0],a=l[1],O=(0,u.useState)(null),I=O[0],B=O[1],M=(0,u.useState)(null),H=M[0],T=M[1],G=(0,u.useState)(null),R=G[0],V=G[1],L=(0,u.useState)(""),z=L[0],W=L[1],q=(0,f.Db)(y.ZP.git_branches.useCreate(),{onSuccess:function(e){return(0,A.wD)(e,{callback:function(){t(),o(),W("")},onErrorCallback:function(e,n){return i({errors:n,response:e})}})}}),Q=(0,s.Z)(q,2),K=Q[0],X=Q[1].isLoading,Y=(0,f.Db)(y.ZP.git_branches.useCreate(),{onSuccess:function(e){return(0,A.wD)(e,{callback:function(){t()},onErrorCallback:function(e,n){return i({errors:n,response:e})}})}}),J=(0,s.Z)(Y,2),$=J[0],ee=J[1].isLoading,ne=(0,f.Db)(y.ZP.git_branches.useUpdate(null===n||void 0===n?void 0:n.name),{onSuccess:function(e){return(0,A.wD)(e,{callback:function(e){var n=e.git_branch.progress;t(),a(""),B(""),T(n),V("")},onErrorCallback:function(e,n){return i({errors:n,response:e})}})}}),re=(0,s.Z)(ne,2),te=re[0],oe=re[1].isLoading;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(x.Z,{mb:E.HN,children:[(0,U.jsxs)(j.Z,{children:["Branches",r?" (".concat(null===r||void 0===r?void 0:r.length,")"):""]}),(0,U.jsxs)(x.Z,{mt:E.Mq,children:[(0,U.jsx)(x.Z,{mb:1,children:(0,U.jsx)(p.ZP,{bold:!0,muted:!0,children:"Current branch"})}),(0,U.jsxs)(v.Z,{alignItems:"center",children:[(0,U.jsx)(k.Z,{fullSize:!0,label:"Choose a different branch to switch branches",widthFitContent:!0,children:(0,U.jsx)(g.Z,{beforeIcon:(0,U.jsx)(C.I0,{muted:!1}),beforeIconSize:2*E.iI,monospace:!0,onChange:function(e){return $({git_branch:{name:e.target.value}})},value:null===n||void 0===n?void 0:n.name,children:(null===n||void 0===n?void 0:n.name)&&(null===r||void 0===r?void 0:r.map((function(e){var n=e.name;return(0,U.jsx)("option",{value:n,children:n},n)})))})}),(0,U.jsx)(x.Z,{mr:E.cd}),ee&&(0,U.jsx)(b.Z,{inverted:!0})]})]}),(0,U.jsx)(x.Z,{mt:E.Mq,children:(0,U.jsxs)(v.Z,{alignItems:"center",children:[(0,U.jsx)(w.Z,{label:"New branch name",monospace:!0,onChange:function(e){var n;return W(null===e||void 0===e||null===(n=e.target)||void 0===n?void 0:n.value)},value:z||""}),(0,U.jsx)(x.Z,{mr:1}),(0,U.jsx)(h.Z,{beforeIcon:(0,U.jsx)(C.mm,{size:2*E.iI}),disabled:!z,loading:X,onClick:function(){K({git_branch:{name:z}})},primary:!0,children:"Create new branch"})]})})]}),(0,U.jsxs)(x.Z,{mb:E.HN,children:[(0,U.jsx)(j.Z,{children:"Actions"}),(0,U.jsxs)(x.Z,{mt:E.Mq,children:[(0,U.jsxs)(x.Z,{mb:E.Mq,children:[(0,U.jsx)(x.Z,{mb:1,children:(0,U.jsx)(p.ZP,{bold:!0,muted:!0,children:"Compare branch"})}),(null===n||void 0===n?void 0:n.name)&&(0,U.jsx)(p.ZP,{monospace:!0,children:null===n||void 0===n?void 0:n.name})]}),(0,U.jsxs)(v.Z,{alignItems:"center",children:[(0,U.jsxs)("div",{children:[(0,U.jsx)(x.Z,{mb:1,children:(0,U.jsx)(p.ZP,{bold:!0,muted:!0,children:"Base branch"})}),(0,U.jsx)(g.Z,{beforeIcon:(0,U.jsx)(C.I0,{}),beforeIconSize:1.5*E.iI,monospace:!0,onChange:function(e){return V(e.target.value)},placeholder:"Choose a branch",value:R,children:null===r||void 0===r?void 0:r.map((function(e){var n=e.name;return(0,U.jsx)("option",{value:n,children:n},n)}))})]}),(0,U.jsx)(x.Z,{mr:1}),(0,U.jsxs)("div",{children:[(0,U.jsx)(x.Z,{mb:1,children:(0,U.jsx)(p.ZP,{bold:!0,muted:!0,children:"Action"})}),(0,U.jsxs)(g.Z,{onChange:function(e){return B(e.target.value)},placeholder:"Choose action",value:I||"",children:[(0,U.jsx)("option",{value:_,children:(0,N.vg)(_)}),(0,U.jsx)("option",{value:S,children:(0,N.vg)(S)}),(0,U.jsx)("option",{value:P,children:(0,N.vg)(P)})]})]})]}),I&&[_,S].includes(I)&&(0,U.jsxs)(x.Z,{mt:E.cd,children:[(0,U.jsx)(x.Z,{mb:1,children:(0,U.jsxs)(p.ZP,{bold:!0,muted:!0,children:["Message for ",I]})}),(0,U.jsx)(Z.Z,{monospace:!0,onChange:function(e){return a(e.target.value)},value:d||""})]}),(0,U.jsxs)(x.Z,{mt:E.cd,children:[(0,U.jsx)(h.Z,{beforeIcon:(0,U.jsx)(C.Bf,{size:2*E.iI}),disabled:!I||!R,loading:oe,onClick:function(){(P!==I||"undefined"!==typeof location&&window.confirm("Are you sure you want to delete branch ".concat(R,"?")))&&te({git_branch:(0,c.Z)({action_type:I,message:d},I,{base_branch:R})})},primary:!0,children:I?(0,N.vg)(I):"Execute action"}),H&&(0,U.jsx)(x.Z,{mt:E.cd,children:(0,U.jsx)(p.ZP,{default:!0,monospace:!0,preWrap:!0,children:H})})]})]})]}),(0,U.jsxs)(x.Z,{mb:E.HN,children:[(0,U.jsx)(x.Z,{mb:E.HN,children:(0,U.jsx)(m.Z,{light:!0})}),(0,U.jsxs)(v.Z,{children:[(0,U.jsx)(h.Z,{beforeIcon:(0,U.jsx)(C.Hd,{}),linkProps:{href:"/version-control?tab=".concat(F.uuid)},noBackground:!0,noHoverUnderline:!0,sameColorAsText:!0,children:F.uuid}),(0,U.jsx)(x.Z,{mr:1}),(0,U.jsxs)(h.Z,{afterIcon:(0,U.jsx)(C.Kw,{}),linkProps:{href:"/version-control?tab=".concat(D.uuid)},noHoverUnderline:!0,sameColorAsText:!0,secondary:!0,children:["Next: ",D.uuid]})]})]})]})},G=r(32316),R=r(12691),V=r.n(R),L=r(44182),z=r(25880),W=r(10919),q=r(87815);var Q=function(e){var n=e.branch,r=e.branches,t=e.fetchBranch,o=e.modifiedFiles,i=e.remotes,l=e.setSelectedFilePath,d=e.showError,a=e.stagedFiles,w=(0,u.useState)((null===n||void 0===n?void 0:n.name)||""),k=w[0],P=w[1],_=(0,u.useState)(null),O=_[0],S=_[1],B=(0,u.useState)(null),M=B[0],F=B[1],H=(0,u.useState)(""),T=H[0],G=H[1],R=(0,u.useState)(""),Q=R[0],K=R[1],X=y.ZP.git_branches.detail("with_logs",{_format:"with_logs"}),Y=X.data,J=X.mutate,$=(0,u.useMemo)((function(){var e;return(null===Y||void 0===Y||null===(e=Y.git_branch)||void 0===e?void 0:e.logs)||[]}),[Y]),ee=(0,u.useMemo)((function(){return(0,U.jsx)(q.Z,{columnFlex:[1,1,1],columns:[{uuid:"Author"},{uuid:"Date"},{uuid:"Message"}],rows:$.map((function(e){var n=e.author,r=e.date,t=e.message;return[(0,U.jsx)(p.ZP,{default:!0,monospace:!0,small:!0,children:null===n||void 0===n?void 0:n.name},"author"),(0,U.jsx)(p.ZP,{default:!0,monospace:!0,small:!0,children:r},"date"),(0,U.jsx)(p.ZP,{default:!0,monospace:!0,small:!0,children:t},"message")]})),uuid:"git-branch-logs"})}),[$]),ne=(0,u.useMemo)((function(){return Object.keys(a||{})}),[a]),re=(0,u.useMemo)((function(){return ne.length}),[ne]),te=(0,f.Db)(y.ZP.git_branches.useUpdate(null===n||void 0===n?void 0:n.name),{onSuccess:function(e){return(0,A.wD)(e,{callback:function(){J(),t(),K("")},onErrorCallback:function(e,n){return d({errors:n,response:e})}})}}),oe=(0,s.Z)(te,2),ie=oe[0],le=oe[1].isLoading,ce=(0,f.Db)(y.ZP.git_branches.useUpdate(null===n||void 0===n?void 0:n.name),{onSuccess:function(e){return(0,A.wD)(e,{callback:function(e){var n=e.git_branch,r=n.error,t=n.progress;r?(S(r),F(null)):(J(),P(null),S(null),G(null),F(t))},onErrorCallback:function(e,n){return d({errors:n,response:e})}})}}),se=(0,s.Z)(ce,2),de=se[0],ae=se[1].isLoading;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(x.Z,{mb:E.HN,children:[(0,U.jsx)(x.Z,{mb:E.cd,children:(0,U.jsx)(L.Z,{children:(0,U.jsx)(z.Z,{noPaddingContent:!0,title:re>=1?"Staged files (".concat(re,")"):"No staged files",children:null===ne||void 0===ne?void 0:ne.map((function(e){return(0,U.jsx)(x.Z,{my:1,px:E.cd,children:(0,U.jsxs)(v.Z,{justifyContent:"space-between",children:[(0,U.jsx)(W.Z,{default:!0,monospace:!0,onClick:function(){return l((function(n){return n===e?null:e}))},warning:null===o||void 0===o?void 0:o[e],children:e}),(0,U.jsx)(x.Z,{mr:1}),(null===o||void 0===o?void 0:o[e])&&(0,U.jsxs)(p.ZP,{warning:!0,children:["Modified after ",(0,U.jsx)(V(),{href:"/version-control?tab=".concat(D.uuid),passHref:!0,children:(0,U.jsx)(W.Z,{underline:!0,warning:!0,children:"staging"})})]})]})},e)}))})})}),(0,U.jsx)(Z.Z,{disabled:0===re,label:"Commit message",monospace:!0,onChange:function(e){return K(e.target.value)},value:Q||""}),(0,U.jsx)(x.Z,{mt:E.cd,children:(0,U.jsxs)(v.Z,{alignItems:"center",children:[(0,U.jsxs)(h.Z,{disabled:0===re||!((null===Q||void 0===Q?void 0:Q.length)>=1),loading:le,onClick:function(){ie({git_branch:{action_type:"commit",files:ne,message:Q}})},primary:!0,children:["Commit ",(0,N._6)("file",re,!0)," with message"]}),0===re&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(x.Z,{mr:1}),(0,U.jsxs)(p.ZP,{danger:!0,small:!0,children:["Please ",(0,U.jsx)(V(),{href:"/version-control?tab=".concat(D.uuid),passHref:!0,children:(0,U.jsx)(W.Z,{danger:!0,small:!0,underline:!0,children:"stage"})})," at least 1 file before committing."]})]})]})})]}),(0,U.jsxs)(x.Z,{mb:E.HN,children:[(0,U.jsx)(x.Z,{mb:1,children:(0,U.jsx)(j.Z,{children:(0,N.vg)(I)})}),(0,U.jsxs)(x.Z,{mt:E.Mq,children:[(0,U.jsxs)(v.Z,{children:[(0,U.jsxs)("div",{children:[(0,U.jsx)(x.Z,{mb:1,children:(0,U.jsx)(p.ZP,{bold:!0,muted:!0,children:"Remote"})}),(0,U.jsx)(g.Z,{beforeIcon:(0,U.jsx)(C.VW,{}),beforeIconSize:1.5*E.iI,monospace:!0,onChange:function(e){return G(e.target.value)},placeholder:"Choose remote",value:T||"",children:null===i||void 0===i?void 0:i.map((function(e){var n=e.name;return(0,U.jsx)("option",{value:n,children:n},n)}))})]}),(0,U.jsx)(x.Z,{mr:1}),(0,U.jsxs)("div",{children:[(0,U.jsx)(x.Z,{mb:1,children:(0,U.jsx)(p.ZP,{bold:!0,muted:!0,children:"Branch"})}),(0,U.jsxs)(g.Z,{beforeIcon:(0,U.jsx)(C.I0,{}),beforeIconSize:1.5*E.iI,monospace:!0,onChange:function(e){return P(e.target.value)},placeholder:"Choose branch",value:k||"",children:[(0,U.jsx)("option",{value:""}),null===r||void 0===r?void 0:r.map((function(e){var n=e.name;return(0,U.jsx)("option",{value:n,children:n},n)}))]})]})]}),(0,U.jsx)(x.Z,{mt:E.cd,children:(0,U.jsxs)(h.Z,{beforeIcon:(0,U.jsx)(C.Bf,{size:2*E.iI}),disabled:!T||!k,loading:ae,onClick:function(){F(null),de({git_branch:(0,c.Z)({action_type:I},I,{branch:k,remote:T})})},primary:!0,children:[(0,N.vg)(I)," ",T," ",T&&k]})}),(M||O)&&(0,U.jsx)(x.Z,{mt:E.cd,children:(0,U.jsx)(p.ZP,{danger:!!O,default:!!M,monospace:!0,preWrap:!0,children:M||O})})]})]}),(0,U.jsxs)(x.Z,{mb:E.HN,children:[(0,U.jsx)(x.Z,{mb:1,children:(0,U.jsx)(j.Z,{children:"Logs"})}),(0,U.jsxs)(x.Z,{mt:E.Mq,children:[!Y&&(0,U.jsx)(b.Z,{inverted:!0}),Y&&ee]})]}),(0,U.jsxs)(x.Z,{mb:E.HN,children:[(0,U.jsx)(x.Z,{mb:E.HN,children:(0,U.jsx)(m.Z,{light:!0})}),(0,U.jsx)(v.Z,{children:(0,U.jsx)(h.Z,{beforeIcon:(0,U.jsx)(C.Hd,{}),linkProps:{href:"/version-control?tab=".concat(D.uuid)},noBackground:!0,noHoverUnderline:!0,sameColorAsText:!0,children:D.uuid})})]})]})},K=r(1210),X=r(46299),Y=r(34376),J=r(38341),$=r(93461),ee=r(38626),ne=ee.default.div.withConfig({displayName:"indexstyle__SpacingStyle",componentId:"sc-el09vr-0"})(["margin-top:","px;"],.5*E.iI),re=r(7715);function te(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function oe(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?te(Object(r),!0).forEach((function(n){(0,c.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var ie,le=function(e){var n=e.branch,r=e.fetchBranch,t=e.modifiedFiles,o=e.showError,i=e.stagedFiles,l=e.untrackedFiles,c=(0,Y.useRouter)(),d=(0,u.useState)({}),a=d[0],g=d[1],b=(0,u.useState)({}),Z=b[0],w=b[1],k=(0,u.useMemo)((function(){return Object.keys(t).concat(Object.keys(l)).sort()}),[t,l]),P=(0,u.useMemo)((function(){return Object.keys(i)}),[i]),_=(0,u.useMemo)((function(){return Object.keys(a).length===(null===k||void 0===k?void 0:k.length)}),[a,k]),O=(0,u.useMemo)((function(){return Object.keys(Z).length===(null===P||void 0===P?void 0:P.length)}),[Z,P]),I=(0,u.useMemo)((function(){return{onErrorCallback:function(e,n){return o({errors:n,response:e})}}}),[o]),S=(0,u.useMemo)((function(){return{onSuccess:function(e){return(0,A.wD)(e,oe({callback:function(){r(),g({})}},I))}}}),[r,I]),D=(0,u.useMemo)((function(){return y.ZP.git_branches.useUpdate(null===n||void 0===n?void 0:n.name)}),[n]),F=(0,f.Db)(D,S),H=(0,s.Z)(F,2),N=H[0],T=H[1].isLoading,G=(0,f.Db)(D,S),R=(0,s.Z)(G,2),V=R[0],L=R[1].isLoading,z=(0,f.Db)(D,{onSuccess:function(e){return(0,A.wD)(e,oe({callback:function(){r(),w({})}},I))}}),q=(0,s.Z)(z,2),Q=q[0],K=q[1].isLoading,X=(0,u.useCallback)((function(e,n,r,t,o){var i=(null===e||void 0===e?void 0:e.length)>=1;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(W.Z,{block:!0,noHoverUnderline:!0,onClick:function(){r(o?{}:t)},preventDefault:!0,children:(0,U.jsxs)(v.Z,{alignItems:"center",flexDirection:"row",children:[(0,U.jsx)(J.Z,{checked:i&&o,disabled:!i}),(0,U.jsx)(x.Z,{mr:1}),(0,U.jsx)(p.ZP,{bold:!0,children:i&&o?"Unselect all":"Select all"})]})}),e.map((function(e){return(0,U.jsx)(ne,{children:(0,U.jsx)(W.Z,{block:!0,noHoverUnderline:!0,onClick:function(){return r((function(n){var r=oe({},n);return!(null!==r&&void 0!==r&&r[e])?r[e]=!0:delete r[e],r}))},preventDefault:!0,children:(0,U.jsxs)(v.Z,{alignItems:"center",flexDirection:"row",children:[(0,U.jsx)(J.Z,{checked:!(null===n||void 0===n||!n[e])}),(0,U.jsx)(x.Z,{mr:1}),(0,U.jsx)(p.ZP,{default:!0,monospace:!0,children:e})]})})},e)}))]})}),[]),ee=(0,u.useMemo)((function(){return(0,re.Qr)(a)}),[a]);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(x.Z,{mb:E.HN,children:(0,U.jsxs)(v.Z,{children:[(0,U.jsxs)($.Z,{flex:1,flexDirection:"column",children:[(0,U.jsxs)(j.Z,{children:["Not staged ",(null===k||void 0===k?void 0:k.length)>=1&&"(".concat(null===k||void 0===k?void 0:k.length,")")]}),(0,U.jsx)(x.Z,{my:E.cd,children:(0,U.jsx)(m.Z,{light:!0})}),(0,U.jsx)(x.Z,{mb:E.cd,children:(0,U.jsxs)(v.Z,{flexDirection:"row",children:[(0,U.jsx)(h.Z,{compact:!0,disabled:ee||K||L,loading:T,onClick:function(){N({git_branch:{action_type:"add",files:Object.keys(a)}})},primary:!0,children:"Add files"}),(0,U.jsx)(x.Z,{mr:1}),(0,U.jsx)(h.Z,{compact:!0,disabled:ee||T||K,loading:L,noBackground:!0,onClick:function(){"undefined"!==typeof location&&window.confirm("Are you sure you want to undo all changes in the selected files?")&&V({git_branch:{action_type:"checkout",files:Object.keys(a)}})},children:"Checkout files"})]})}),X(k,a,g,oe(oe({},t),l),_)]}),(0,U.jsx)(x.Z,{mr:E.cd}),(0,U.jsxs)($.Z,{flex:1,flexDirection:"column",children:[(0,U.jsxs)(j.Z,{children:["Staged files ",(null===P||void 0===P?void 0:P.length)>=1&&"(".concat(null===P||void 0===P?void 0:P.length,")")]}),(0,U.jsx)(x.Z,{my:E.cd,children:(0,U.jsx)(m.Z,{light:!0})}),(0,U.jsx)(x.Z,{mb:E.cd,children:(0,U.jsx)(v.Z,{flexDirection:"row",children:(0,U.jsx)(h.Z,{compact:!0,disabled:(0,re.Qr)(Z)||T||L,loading:K,onClick:function(){Q({git_branch:{action_type:"reset",files:Object.keys(Z)}})},secondary:!0,children:"Reset files"})})}),X(P,Z,w,i,O)]})]})}),(0,U.jsxs)(x.Z,{mb:E.HN,children:[(0,U.jsx)(x.Z,{mb:E.HN,children:(0,U.jsx)(m.Z,{light:!0})}),(0,U.jsxs)(v.Z,{children:[(0,U.jsx)(h.Z,{beforeIcon:(0,U.jsx)(C.Hd,{}),linkProps:{href:"/version-control?tab=".concat(B.uuid)},noBackground:!0,noHoverUnderline:!0,sameColorAsText:!0,children:B.uuid}),(0,U.jsx)(x.Z,{mr:1}),(0,U.jsx)(h.Z,{afterIcon:(0,U.jsx)(C.Kw,{}),linkProps:ee?{href:"/version-control?tab=".concat(M.uuid)}:null,noHoverUnderline:!0,onClick:ee?null:function(){N({git_branch:{action_type:"add",files:Object.keys(a)}}).then((function(){c.push("/version-control?tab=".concat(M.uuid))}))},primary:ee,sameColorAsText:!0,secondary:!ee,children:ee?"Next: ".concat(M.uuid):"Add files and go to ".concat(M.uuid)})]})]})]})};!function(e){e.GITHUB="github"}(ie||(ie={}));var ce=r(59e3);var se=function(e){var n=e.branch,r=e.fetchBranch,t=e.loading,o=e.remotes,i=e.showError,l=(0,Y.useRouter)(),c=(0,u.useRef)(null),d=(0,u.useState)(null),a=d[0],Z=d[1],k=(0,u.useState)(null),P=k[0],_=k[1],I=(0,u.useState)(null),S=I[0],D=I[1],M=(0,u.useState)(null),F=M[0],H=M[1],T=(0,u.useState)(null),G=T[0],R=T[1],Q=(0,u.useState)(!1),K=Q[0],X=Q[1],J=(0,u.useState)(null),ee=J[0],ne=J[1],re=(0,u.useState)(""),te=re[0],oe=re[1],le=(0,u.useState)(""),se=le[0],de=le[1],ae=(0,u.useState)(null),ue=ae[0],fe=ae[1];(0,u.useEffect)((function(){var e,r;null!==n&&void 0!==n&&null!==(e=n.sync_config)&&void 0!==e&&e.repo_path&&null===ue&&fe(null===n||void 0===n||null===(r=n.sync_config)||void 0===r?void 0:r.repo_path)}),[n,ue]);var he=(0,u.useMemo)((function(){var e,n;return null===o||void 0===o||null===(e=o.find((function(e){return e.name===G})))||void 0===e||null===(n=e.refs)||void 0===n?void 0:n.map((function(e){return{name:e.name.split("".concat(G,"/"))[1]}}))}),[G,o]),me=(0,f.Db)(y.ZP.syncs.useCreate(),{onSuccess:function(e){return(0,A.wD)(e,{callback:function(){r(),X(!1)},onErrorCallback:function(e,n){return i({errors:n,response:e})}})}}),ve=(0,s.Z)(me,2),je=ve[0],ge=ve[1].isLoading,xe=(0,f.Db)(y.ZP.git_branches.useUpdate(null===n||void 0===n?void 0:n.name),{onSuccess:function(e){return(0,A.wD)(e,{callback:function(e){var n=e.git_branch,t=n.error,o=n.progress;t?(_(t),H(null)):(r(),Z(null),_(null),D(null),H(o),R(null))},onErrorCallback:function(e,n){return i({errors:n,response:e})}})}}),be=(0,s.Z)(xe,2),pe=be[0],Ze=be[1].isLoading,we=(0,f.Db)(y.ZP.git_branches.useUpdate(null===n||void 0===n?void 0:n.name),{onSuccess:function(e){return(0,A.wD)(e,{callback:function(){r(),oe(""),de("")},onErrorCallback:function(e,n){return i({errors:n,response:e})}})}}),ke=(0,s.Z)(we,2),ye=ke[0],Ce=ke[1].isLoading,Pe=(0,f.Db)(y.ZP.git_branches.useUpdate(null===n||void 0===n?void 0:n.name),{onSuccess:function(e){return(0,A.wD)(e,{callback:function(){r(),ne(null)},onErrorCallback:function(e,n){ne(null),i({errors:n,response:e})}})}}),_e=(0,s.Z)(Pe,2),Oe=_e[0],Ie=_e[1].isLoading,Se=y.ZP.oauths.detail(ie.GITHUB,{redirect_uri:encodeURIComponent(window.location.href)}),Be=Se.data,De=Se.mutate,Me=(0,u.useMemo)((function(){return(null===Be||void 0===Be?void 0:Be.oauth)||{}}),[Be]),Fe=(0,f.Db)(y.ZP.oauths.useCreate(),{onSuccess:function(e){return(0,A.wD)(e,{callback:function(){De()},onErrorCallback:function(e,n){i({errors:n,response:e})}})}}),He=(0,s.Z)(Fe,2),Ee=He[0],Ne=He[1].isLoading,Ae=((0,ce.iV)()||{}).access_token;(0,u.useEffect)((function(){!Me||null!==Me&&void 0!==Me&&Me.authenticated||!Ae||Ee({oauth:{provider:ie.GITHUB,token:Ae}})}),[Ae,Ee,Me]);var Ue=(0,u.useMemo)((function(){return null===o||void 0===o?void 0:o.map((function(e){var n=e.name,r=e.refs,t=e.urls;return(0,U.jsxs)(x.Z,{mt:E.Mq,children:[(0,U.jsx)(x.Z,{mb:1,children:(0,U.jsxs)(v.Z,{alignItems:"center",justifyContent:"space-between",children:[(0,U.jsxs)($.Z,{alignItems:"center",children:[(0,U.jsx)(p.ZP,{bold:!0,children:n}),(0,U.jsx)(x.Z,{mx:1,children:(0,U.jsx)(C._Q,{muted:!0})}),null===t||void 0===t?void 0:t.map((function(e){return(0,U.jsx)(x.Z,{mr:1,children:(0,U.jsx)(p.ZP,{default:!0,monospace:!0,small:!0,children:e})},e)}))]}),(0,U.jsx)(x.Z,{mr:1}),(0,U.jsx)(h.Z,{compact:!0,disabled:Ie&&ee!==n,iconOnly:!0,loading:Ie&&ee===n,noBackground:!0,onClick:function(){"undefined"!==typeof location&&window.confirm("Are you sure you want to remove remote ".concat(n,"?"))&&(ne(n),Oe({git_branch:{action_type:"remove_remote",remote:{name:n}}}))},small:!0,title:"Remote remote ".concat(n),children:(0,U.jsx)(C.rF,{})})]})}),(0,U.jsx)(L.Z,{children:(0,U.jsxs)(z.Z,{noPaddingContent:!0,smallTitle:!0,title:"Refs (".concat(null===r||void 0===r?void 0:r.length,")"),children:[0===(null===r||void 0===r?void 0:r.length)&&(0,U.jsx)(x.Z,{p:E.cd,children:(0,U.jsx)(p.ZP,{muted:!0,children:"This remote has no refs."})}),(null===r||void 0===r?void 0:r.length)>=1&&(0,U.jsx)(q.Z,{columnFlex:[1,1,1],columns:[{uuid:"Ref"},{uuid:"Author"},{uuid:"Date"},{uuid:"Message"}],rows:r.map((function(e){var n,r=e.commit,t=e.name;return[(0,U.jsx)(p.ZP,{default:!0,monospace:!0,small:!0,children:t},"ref-name"),(0,U.jsx)(p.ZP,{default:!0,monospace:!0,small:!0,children:null===r||void 0===r||null===(n=r.author)||void 0===n?void 0:n.name},"author"),(0,U.jsx)(p.ZP,{default:!0,monospace:!0,small:!0,children:null===r||void 0===r?void 0:r.date},"date"),(0,U.jsx)(p.ZP,{default:!0,monospace:!0,small:!0,children:null===r||void 0===r?void 0:r.message},"message")]})),uuid:"git-branch-remotes-refs"})]})}),(0,U.jsx)(x.Z,{mt:E.Mq,children:(0,U.jsx)(m.Z,{light:!0})})]},n)}))}),[Ie,ee,o,Oe]);return(0,U.jsxs)(U.Fragment,{children:[Be&&(0,U.jsxs)(x.Z,{mb:E.HN,children:[(null===Me||void 0===Me?void 0:Me.authenticated)&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(h.Z,{beforeIcon:(0,U.jsx)(C.fy,{size:2*E.iI}),disabled:!0,children:"Successfully authenticated with GitHub"}),(0,U.jsx)(x.Z,{mt:1,children:(0,U.jsx)(p.ZP,{muted:!0,children:"You can pull, push, and create pull requests on GitHub."})})]}),!(null!==Me&&void 0!==Me&&Me.authenticated)&&(null===Me||void 0===Me?void 0:Me.url)&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(h.Z,{beforeIcon:(0,U.jsx)(C.fy,{size:2*E.iI}),loading:Ne,onClick:function(){return l.push(null===Me||void 0===Me?void 0:Me.url)},primary:!0,children:"Authenticate with GitHub"}),(0,U.jsx)(x.Z,{mt:1,children:(0,U.jsx)(p.ZP,{muted:!0,children:"Authenticating with GitHub will allow you to pull, push, and create pull requests on GitHub."})})]})]}),(0,U.jsxs)(x.Z,{mb:E.HN,children:[(0,U.jsx)(j.Z,{children:"Setup"}),(0,U.jsxs)(x.Z,{mt:E.Mq,children:[(0,U.jsxs)(x.Z,{mb:1,children:[(0,U.jsx)(p.ZP,{bold:!0,large:!0,children:"Git init directory"}),(0,U.jsxs)(p.ZP,{muted:!0,children:["If the directory below is blank, then the current working directory will be used to initialize git.",(0,U.jsx)("br",{}),"If git hasn\u2019t been initialized in the directory below, Mage will automatically run git init for you."]})]}),(0,U.jsxs)(v.Z,{alignItems:"center",children:[(0,U.jsx)(w.Z,{disabled:!K,label:"Git directory",monospace:!0,onChange:function(e){return fe(e.target.value)},ref:c,value:ue||""}),(0,U.jsx)(x.Z,{mr:1}),K&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(h.Z,{compact:!0,loading:ge,onClick:function(){je({sync:{repo_path:ue}})},primary:!0,small:!0,children:"Save"}),(0,U.jsx)(x.Z,{mr:1}),(0,U.jsx)(W.Z,{onClick:function(){return X(!1)},preventDefault:!0,sameColorAsText:!0,small:!0,children:"Cancel"})]}),!K&&(0,U.jsx)(W.Z,{onClick:function(){X(!0),setTimeout((function(){var e;return null===c||void 0===c||null===(e=c.current)||void 0===e?void 0:e.focus()}),1)},preventDefault:!0,sameColorAsText:!0,small:!0,children:"Edit"})]})]})]}),(0,U.jsxs)(x.Z,{mb:E.HN,children:[(0,U.jsxs)(j.Z,{children:["Remotes",!t&&o?" (".concat(null===o||void 0===o?void 0:o.length,")"):""]}),t&&(0,U.jsx)(x.Z,{mt:E.Mq,children:(0,U.jsx)(b.Z,{inverted:!0})}),!t&&Ue,(0,U.jsx)(x.Z,{mt:E.Mq,children:(0,U.jsxs)(v.Z,{alignItems:"center",children:[(0,U.jsx)(w.Z,{label:"New remote name",monospace:!0,onChange:function(e){var n;return oe(null===e||void 0===e||null===(n=e.target)||void 0===n?void 0:n.value)},value:te||""}),(0,U.jsx)(x.Z,{mr:1}),(0,U.jsx)(w.Z,{label:"Remote URL",monospace:!0,onChange:function(e){var n;return de(null===e||void 0===e||null===(n=e.target)||void 0===n?void 0:n.value)},value:se||""}),(0,U.jsx)(x.Z,{mr:1}),(0,U.jsx)(h.Z,{beforeIcon:(0,U.jsx)(C.mm,{size:2*E.iI}),disabled:!te||!se,loading:Ce,onClick:function(){ye({git_branch:{action_type:"add_remote",remote:{name:te,url:se}}})},primary:!0,children:"Create new remote"})]})})]}),(0,U.jsxs)(x.Z,{mb:E.HN,children:[(0,U.jsx)(j.Z,{children:"Actions"}),(0,U.jsxs)(x.Z,{mt:E.Mq,children:[(0,U.jsxs)(x.Z,{mb:E.Mq,children:[(0,U.jsx)(x.Z,{mb:1,children:(0,U.jsx)(p.ZP,{bold:!0,muted:!0,children:"Current branch"})}),(null===n||void 0===n?void 0:n.name)&&(0,U.jsxs)(v.Z,{alignItems:"center",children:[(0,U.jsx)(p.ZP,{monospace:!0,children:null===n||void 0===n?void 0:n.name}),(0,U.jsx)(x.Z,{mr:E.cd}),(0,U.jsx)(V(),{href:"/version-control?tab=".concat(B.uuid),passHref:!0,children:(0,U.jsx)(W.Z,{small:!0,children:"Switch branch"})})]})]}),(0,U.jsxs)(v.Z,{children:[(0,U.jsx)(g.Z,{onChange:function(e){return D(e.target.value)},placeholder:"Action",value:S||"",children:(0,U.jsx)("option",{value:O,children:(0,N.vg)(O)})}),(0,U.jsx)(x.Z,{mr:1}),(0,U.jsx)(g.Z,{beforeIcon:(0,U.jsx)(C.VW,{}),beforeIconSize:1.5*E.iI,monospace:!0,onChange:function(e){return R(e.target.value)},placeholder:"Remote",value:G||"",children:null===o||void 0===o?void 0:o.map((function(e){var n=e.name;return(0,U.jsx)("option",{value:n,children:n},n)}))}),(0,U.jsx)(x.Z,{mr:1}),(0,U.jsxs)(g.Z,{beforeIcon:(0,U.jsx)(C.I0,{}),beforeIconSize:1.5*E.iI,monospace:!0,onChange:function(e){return Z(e.target.value)},value:a||"",children:[(0,U.jsx)("option",{value:"",children:"All branches"}),null===he||void 0===he?void 0:he.map((function(e){var n=e.name;return(0,U.jsx)("option",{value:n,children:n},n)}))]})]}),(0,U.jsxs)(x.Z,{mt:E.cd,children:[(0,U.jsx)(h.Z,{beforeIcon:(0,U.jsx)(C.Bf,{size:2*E.iI}),disabled:!S||!G,loading:Ze,onClick:function(){H(null),pe({git_branch:{action_type:S,pull:{branch:a,remote:G}}})},primary:!0,children:S?(0,N.vg)(S):"Execute action"}),(F||P)&&(0,U.jsx)(x.Z,{mt:E.cd,children:(0,U.jsx)(p.ZP,{danger:!!P,default:!!F,monospace:!0,preWrap:!0,children:F||P})})]})]})]}),(0,U.jsxs)(x.Z,{mb:E.HN,children:[(0,U.jsx)(x.Z,{mb:E.HN,children:(0,U.jsx)(m.Z,{light:!0})}),(0,U.jsx)(v.Z,{children:(0,U.jsxs)(h.Z,{afterIcon:(0,U.jsx)(C.Kw,{}),linkProps:{href:"/version-control?tab=".concat(B.uuid)},noHoverUnderline:!0,sameColorAsText:!0,secondary:!0,children:["Next: ",B.uuid]})})]})]})},de=r(2005),ae=ee.default.div.withConfig({displayName:"indexstyle__DiffContainerStyle",componentId:"sc-1fo4nus-0"})(["pre{font-family:",";}"],de.Vp),ue={codeFoldGutter:{},content:{},contentText:{},diffAdded:{},diffContainer:{},diffRemoved:{},emptyGutter:{},emptyLine:{},gutter:{},highlightedGutter:{},highlightedLine:{},line:{},lineNumber:{},marker:{},splitView:{},titleBlock:{},variables:{dark:{addedBackground:"#044B53",addedColor:"white",addedGutterBackground:"#034148",addedGutterColor:"#8c8c8c",codeFoldBackground:"#262831",codeFoldContentColor:"#555a7b",codeFoldGutterBackground:"#21232b",diffViewerBackground:"#2e303c",diffViewerColor:"#FFF",diffViewerTitleBackground:"#2f323e",diffViewerTitleBorderColor:"#353846",diffViewerTitleColor:"#555a7b",emptyLineBackground:"#363946",gutterBackground:"#2c2f3a",gutterBackgroundDark:"#262933",gutterColor:"#464c67",highlightBackground:"#2a3967",highlightGutterBackground:"#2d4077",removedBackground:"#632F34",removedColor:"white",removedGutterBackground:"#632b30",removedGutterColor:"#8c8c8c",wordAddedBackground:"#055d67",wordRemovedBackground:"#7d383f"},light:{addedBackground:"#e6ffed",addedColor:"#24292e",addedGutterBackground:"#cdffd8",addedGutterColor:"#212529",codeFoldBackground:"#f1f8ff",codeFoldContentColor:"#212529",codeFoldGutterBackground:"#dbedff",diffViewerBackground:"#fff",diffViewerColor:"212529",diffViewerTitleBackground:"#fafbfc",diffViewerTitleBorderColor:"#eee",diffViewerTitleColor:"#212529",emptyLineBackground:"#fafbfc",gutterBackground:"#f7f7f7",gutterBackgroundDark:"#f3f1f1",gutterColor:"#212529",highlightBackground:"#fffbdd",highlightGutterBackground:"#fff5b1",removedBackground:"#ffeef0",removedColor:"#24292e",removedGutterBackground:"#ffdce0",removedGutterColor:"#212529",wordAddedBackground:"#acf2bd",wordRemovedBackground:"#fdb8c0"}},wordAdded:{},wordDiff:{},wordRemoved:{}},fe=r(32821),he=r(33766),me=r(9728);function ve(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function je(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?ve(Object(r),!0).forEach((function(n){(0,c.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ve(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var ge=function(){var e=(0,u.useRef)(null),n=(0,u.useRef)(null),r=(0,me.VI)(null,{},[],{uuid:"VersionControlPage"}),t=(0,s.Z)(r,1)[0],o=(0,u.useState)(null),i=o[0],l=o[1],f=(0,u.useState)(null),h=f[0],v=f[1],j=(0,u.useState)(H[0]),Z=j[0],w=j[1],C=(0,ce.iV)();(0,u.useEffect)((function(){null!==C&&void 0!==C&&C.tab&&w(H.find((function(e){return e.uuid===(null===C||void 0===C?void 0:C.tab)})))}),[C]);var P=y.ZP.git_branches.list(),_=P.data,O=P.mutate,I=(0,u.useMemo)((function(){return null===_||void 0===_?void 0:_.git_branches}),[_]),S=y.ZP.git_branches.detail("current"),N=S.data,A=S.mutate,R=(0,u.useMemo)((function(){return(null===N||void 0===N?void 0:N.git_branch)||{}}),[N]),V=(0,u.useMemo)((function(){return(null===R||void 0===R?void 0:R.files)||[]}),[R]),L=y.ZP.git_branches.detail("with_remotes",{_format:"with_remotes"}),z=L.data,W=L.mutate,q=(0,u.useMemo)((function(){return null===z||void 0===z?void 0:z.git_branch}),[z]),Y=(0,u.useMemo)((function(){return(null===q||void 0===q?void 0:q.remotes)||[]}),[q]),J=y.ZP.git_files.detail(h?encodeURIComponent(h):null,{base_branch:i}),$=J.data,ee=J.mutate,ne=(0,u.useMemo)((function(){return null===$||void 0===$?void 0:$.git_file}),[$]);(0,u.useEffect)((function(){i&&ee()}),[i,ee]),(0,u.useEffect)((function(){null!==$&&void 0!==$&&$.error&&t({errors:null===$||void 0===$?void 0:$.error,response:$})}),[$,t]);var te=(0,u.useMemo)((function(){var e,n,r;return{modifiedFiles:null===R||void 0===R||null===(e=R.modified_files)||void 0===e?void 0:e.reduce((function(e,n){return je(je({},e),{},(0,c.Z)({},n,!0))}),{}),stagedFiles:null===R||void 0===R||null===(n=R.staged_files)||void 0===n?void 0:n.reduce((function(e,n){return je(je({},e),{},(0,c.Z)({},n,!0))}),{}),untrackedFiles:null===R||void 0===R||null===(r=R.untracked_files)||void 0===r?void 0:r.reduce((function(e,n){return je(je({},e),{},(0,c.Z)({},n,!0))}),{})}}),[R]),oe=te.modifiedFiles,ie=void 0===oe?{}:oe,de=te.stagedFiles,ve=void 0===de?{}:de,ge=te.untrackedFiles,xe=void 0===ge?{}:ge;(0,u.useEffect)((function(){h&&(0,re.Qr)(ie)&&(0,re.Qr)(ve)&&(0,re.Qr)(xe)&&v(null)}),[ie,h,ve,xe]);var be=(0,u.useMemo)((function(){return(null===V||void 0===V?void 0:V.length)>=1?(0,U.jsx)(X.Z,{allowEmptyFolders:!0,disableContextMenu:!0,fetchFileTree:A,files:V,isFileDisabled:function(){return!1},onClickFile:function(e){v((function(r){if(!r||r!==e){var t;if(!i)null===n||void 0===n||null===(t=n.current)||void 0===t||t.focus();return e}return null}))},ref:e,renderAfterContent:function(e){var n,r,t=e.children,o=(null===t||void 0===t?void 0:t.length)>=1,i=(0,fe.a9)(e);o&&(i="".concat(i,"/"));var l={};return null!==ie&&void 0!==ie&&ie[i]?(n="M",r="Modified",l.warning=!0):null!==xe&&void 0!==xe&&xe[i]?(n="U",r="Untracked",l.danger=!0):null!==ve&&void 0!==ve&&ve[i]&&(n="S",r="Staged",l.success=!0),o&&!n?null:(0,U.jsx)(x.Z,{mx:1,children:(0,U.jsx)(k.Z,{appearBefore:!0,label:r,widthFitContent:!0,children:(0,U.jsx)(p.ZP,je(je({},l),{},{monospace:!0,rightAligned:!0,small:!0,children:n}))})})},useRootFolder:!0}):(0,U.jsx)(x.Z,{p:E.cd,children:(0,U.jsx)(p.ZP,{monospace:!0,muted:!0,children:"No files modified"})})}),[i,A,e,V,ie,n,v,ve,xe]),pe=(0,u.useMemo)((function(){return!$||!ne||h&&(null===ne||void 0===ne?void 0:ne.filename)!==h}),[$,ne,h]),Ze=(0,u.useMemo)((function(){if(!h)return null;var e=ne||{},n=e.content,r=e.content_from_base;return(0,U.jsxs)(ae,{children:[!i&&(0,U.jsx)(x.Z,{p:E.cd,children:(0,U.jsx)(p.ZP,{muted:!0,children:"Please select a base branch to see the file diffs."})}),(null===ne||void 0===ne?void 0:ne.error)&&(0,U.jsx)(x.Z,{p:E.cd,children:(0,U.jsx)(p.ZP,{danger:!0,monospace:!0,preWrap:!0,children:null===ne||void 0===ne?void 0:ne.error})}),i&&!(null!==ne&&void 0!==ne&&ne.error)&&(0,U.jsxs)(U.Fragment,{children:[pe&&(0,U.jsx)(x.Z,{p:E.cd,children:(0,U.jsx)(b.Z,{inverted:!0})}),!pe&&(0,U.jsx)(a(),{compareMethod:d.DiffMethod.WORDS,newValue:n||"",oldValue:r||"",renderContent:function(e){return(0,U.jsx)(p.ZP,{monospace:!0,children:e})},splitView:!0,styles:ue,useDarkTheme:!0})]})]})}),[i,ne,pe,h]),we=(0,u.useMemo)((function(){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)("div",{style:{marginBottom:.5*E.iI,marginTop:.5*E.iI},children:(0,U.jsx)(G.Z,{compact:!0,onClickTab:function(e){var n=e.uuid;(0,he.u7)({tab:n})},selectedTabUUID:null===Z||void 0===Z?void 0:Z.uuid,tabs:H})}),(0,U.jsx)(m.Z,{light:!0})]})}),[Z]),ke=(0,u.useMemo)((function(){return(0,U.jsx)(se,{branch:R,fetchBranch:W,loading:!z,remotes:Y,showError:t})}),[R,z,W,Y,t]),ye=(0,u.useMemo)((function(){return(0,U.jsx)(T,{branch:R,branches:I,fetchBranch:A,fetchBranches:O,showError:t})}),[R,I,A,O,t]),Ce=(0,u.useMemo)((function(){return(0,U.jsx)(le,{branch:R,fetchBranch:A,modifiedFiles:ie,showError:t,stagedFiles:ve,untrackedFiles:xe})}),[R,A,ie,t,ve,xe]),Pe=(0,u.useMemo)((function(){return(0,U.jsx)(Q,{branch:R,branches:I,fetchBranch:A,modifiedFiles:ie,remotes:Y,setSelectedFilePath:v,showError:t,stagedFiles:ve})}),[R,I,A,ie,Y,v,t,ve]);return(0,U.jsx)(K.Z,{after:Ze,afterHidden:!h,before:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(x.Z,{p:1,children:(0,U.jsx)(g.Z,{compact:!0,label:"Base branch",onChange:function(e){return l(e.target.value)},ref:n,small:!0,value:i||"",children:null===I||void 0===I?void 0:I.map((function(e){var n=e.name;return(0,U.jsx)("option",{value:n,children:n},n)}))})}),be]}),mainContainerHeader:we,title:"Version control",uuid:"Version control/index",children:(0,U.jsxs)(x.Z,{p:E.cd,children:[!N&&(0,U.jsx)(b.Z,{inverted:!0}),N&&(0,U.jsxs)(U.Fragment,{children:[F.uuid===(null===Z||void 0===Z?void 0:Z.uuid)&&ke,B.uuid===(null===Z||void 0===Z?void 0:Z.uuid)&&ye,D.uuid===(null===Z||void 0===Z?void 0:Z.uuid)&&Ce,M.uuid===(null===Z||void 0===Z?void 0:Z.uuid)&&Pe]})]})})};function xe(){return(0,U.jsx)(ge,{})}xe.getInitialProps=(0,t.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var be=(0,l.Z)(xe)},75302:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/version-control",function(){return r(83243)}])}},function(e){e.O(0,[844,7607,7011,4407,1424,1005,7815,3714,551,9774,2888,179],(function(){return n=75302,e(e.s=n);var n}));var n=e.O();_N_E=n}]);