mage-ai 0.9.7__py3-none-any.whl → 0.9.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mage-ai might be problematic. Click here for more details.
- mage_ai/ai/constants.py +1 -0
- mage_ai/ai/generator.py +6 -0
- mage_ai/ai/{gen_doc_for_pipeline.py → generator_cmds.py} +5 -0
- mage_ai/ai/llm_pipeline_wizard.py +108 -3
- mage_ai/api/policies/BlockPolicy.py +1 -0
- mage_ai/api/policies/BlockTemplatePolicy.py +9 -0
- mage_ai/api/policies/LlmPolicy.py +3 -2
- mage_ai/api/policies/OauthAccessTokenPolicy.py +31 -0
- mage_ai/api/policies/PipelinePolicy.py +1 -0
- mage_ai/api/policies/ProjectPolicy.py +9 -0
- mage_ai/api/policies/SearchResultPolicy.py +32 -0
- mage_ai/api/policies/VariablePolicy.py +8 -0
- mage_ai/api/presenters/BlockTemplatePresenter.py +1 -0
- mage_ai/api/presenters/OauthAccessTokenPresenter.py +9 -0
- mage_ai/api/presenters/ProjectPresenter.py +2 -0
- mage_ai/api/presenters/SearchResultPresenter.py +73 -0
- mage_ai/api/resources/BlockResource.py +43 -4
- mage_ai/api/resources/BlockTemplateResource.py +15 -2
- mage_ai/api/resources/CustomTemplateResource.py +15 -3
- mage_ai/api/resources/FileContentResource.py +8 -1
- mage_ai/api/resources/FileResource.py +22 -2
- mage_ai/api/resources/OauthAccessTokenResource.py +24 -0
- mage_ai/api/resources/PipelineResource.py +70 -2
- mage_ai/api/resources/ProjectResource.py +15 -1
- mage_ai/api/resources/SearchResultResource.py +68 -0
- mage_ai/api/resources/VariableResource.py +25 -14
- mage_ai/cache/base.py +3 -0
- mage_ai/cache/block_action_object/__init__.py +282 -0
- mage_ai/cache/block_action_object/constants.py +4 -0
- mage_ai/cache/constants.py +1 -0
- mage_ai/data_integrations/destinations/constants.py +2 -0
- mage_ai/data_preparation/executors/k8s_pipeline_executor.py +1 -1
- mage_ai/data_preparation/models/block/__init__.py +20 -1
- mage_ai/data_preparation/models/block/dbt/utils/__init__.py +1 -0
- mage_ai/data_preparation/models/custom_templates/custom_block_template.py +8 -3
- mage_ai/data_preparation/models/custom_templates/utils.py +6 -3
- mage_ai/data_preparation/models/file.py +3 -0
- mage_ai/data_preparation/models/pipeline.py +10 -1
- mage_ai/data_preparation/models/{project.py → project/__init__.py} +17 -0
- mage_ai/data_preparation/models/project/constants.py +5 -0
- mage_ai/data_preparation/repo_manager.py +9 -6
- mage_ai/data_preparation/templates/constants.py +478 -1
- mage_ai/data_preparation/templates/template.py +9 -1
- mage_ai/orchestration/backfills/service.py +20 -1
- mage_ai/orchestration/db/__init__.py +25 -0
- mage_ai/orchestration/db/models/schedules.py +20 -1
- mage_ai/orchestration/pipeline_scheduler.py +23 -0
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +2 -2
- mage_ai/server/frontend_dist/404.html.html +2 -2
- mage_ai/server/frontend_dist/_next/static/OwvTROmputQCA1Z9HEGDv/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{1005-ce36fe7ed460d006.js → 1005-16c1a6678de5311e.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1424-e22139f33196c5c1.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1484-a76b2c31e4808379.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2485-b569baad92049d6b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{2786-d8b593e5d7c42665.js → 2786-acce6ea0d9b4898e.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3654-573457b62efff6e2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3881-0eb04f7f7a244347.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{4317-b112fe7bb532b998.js → 4317-3fe63fc9401685d6.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{4822-52d9d661b6bd1ae9.js → 4822-045cc7cdd7c95163.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{547-14029bdacc0ed267.js → 547-4ad2cdae967055b6.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6299-cf188c1b7a1bc33c.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{7815-6dc55b5fd5d1f48a.js → 7815-fbd99c8f259d9e8b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{8312-cdc4d6c3b9f53099.js → 8312-c88a3b1012e5448b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{8952-492bf0e29d215ddd.js → 8952-e94a7334fcd5c68b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9055-d0d25298cb5f4e45.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-c7557dc9e725825e.js → _app-fa38a24707c76411.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/files-b9dac983c75798f2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{settings-17bb362b9683079c.js → settings-453aaa7bf78f8101.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/{[user]-bfa53c0ee79920a0.js → [user]-3b502aa6d1a04cad.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/{new-2f7e6bf8e2a37380.js → new-dd41d718cbb5990c.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-ec748f838b7b8fad.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-bcc24120f5911f76.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{overview-8ffbc4b0e8a43266.js → overview-6f20b9e9cbec91d6.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/{[...slug]-373f6b8c9161e819.js → [...slug]-55212dfc15881ef2.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{backfills-226bf0c5c1bfe004.js → backfills-6b4a82cd0516e121.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-0705c99df236ec8a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{logs-4ade07836fd577c9.js → logs-c294f5d74bd2d50f.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-fd9eb711e89425e9.js → monitors-1b9e4abc54842cdf.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{runs-027666ed18d3151e.js → runs-17ebe87e94242ae5.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-48b60ca236a26818.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{syncs-de58e6b91e5e4552.js → syncs-5153f4665aaf8b17.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/{[...slug]-432843576e1ed09e.js → [...slug]-1306e85191f6b47c.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-ae31b1d0d8a4634d.js → triggers-2e731d343a26d46a.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-0fab737dbc9074fc.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-b2354688508b0755.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-a4f01b5c429757cc.js → users-6522c963087f18e8.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{sign-in-1140f8ee7e89381a.js → sign-in-7dcd1257ca9660bb.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/templates/{[...slug]-f59b3f04c5a49351.js → [...slug]-78a07e7fe8973811.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{templates-dbb209ce131390a9.js → templates-19df643f52679d5a.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-a1cf445565b68809.js +1 -0
- mage_ai/server/frontend_dist/files.html +2 -2
- mage_ai/server/frontend_dist/index.html +2 -2
- mage_ai/server/frontend_dist/manage/settings.html +2 -2
- mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
- mage_ai/server/frontend_dist/manage/users/new.html +2 -2
- mage_ai/server/frontend_dist/manage/users.html +2 -2
- mage_ai/server/frontend_dist/manage.html +2 -2
- mage_ai/server/frontend_dist/overview.html +2 -2
- mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist/pipelines.html +2 -2
- mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
- mage_ai/server/frontend_dist/settings.html +2 -2
- mage_ai/server/frontend_dist/sign-in.html +16 -16
- mage_ai/server/frontend_dist/templates/[...slug].html +2 -2
- mage_ai/server/frontend_dist/templates.html +2 -2
- mage_ai/server/frontend_dist/terminal.html +2 -2
- mage_ai/server/frontend_dist/test.html +2 -2
- mage_ai/server/frontend_dist/triggers.html +2 -2
- mage_ai/server/frontend_dist/version-control.html +2 -2
- mage_ai/server/server.py +5 -0
- mage_ai/server/websocket_server.py +1 -0
- mage_ai/services/search/__init__.py +0 -0
- mage_ai/services/search/block_action_objects.py +33 -0
- mage_ai/services/search/constants.py +1 -0
- mage_ai/shared/array.py +7 -0
- mage_ai/shared/parsers.py +11 -2
- mage_ai/tests/shared/test_parsers.py +73 -0
- mage_ai/usage_statistics/constants.py +1 -0
- mage_ai/usage_statistics/logger.py +19 -1
- {mage_ai-0.9.7.dist-info → mage_ai-0.9.9.dist-info}/METADATA +9 -7
- {mage_ai-0.9.7.dist-info → mage_ai-0.9.9.dist-info}/RECORD +145 -132
- mage_ai/server/frontend_dist/_next/static/chunks/1424-de97c5aa0477894b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1484-c9d6bc33227070dd.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2485-86c97f516c1abb9f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3215-c2f5f19b650f9a50.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3654-bff4740b63cf280c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3881-7f121dbbe6e273cd.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6299-97f283be01adf6a8.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/files-daf49c7c6f7e70f8.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-1f6cb7656299cbd1.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-4894eabb442a039c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-a9bd86bee73b5762.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-cf51793c2112915c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-f1131ffe0d2a4a06.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-170943ca00445486.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-2ecda1f1437013f2.js +0 -1
- mage_ai/server/frontend_dist/_next/static/tMZjCwLa1LRYRzhFRdKNf/_buildManifest.js +0 -1
- /mage_ai/server/frontend_dist/_next/static/{tMZjCwLa1LRYRzhFRdKNf → OwvTROmputQCA1Z9HEGDv}/_middlewareManifest.js +0 -0
- /mage_ai/server/frontend_dist/_next/static/{tMZjCwLa1LRYRzhFRdKNf → OwvTROmputQCA1Z9HEGDv}/_ssgManifest.js +0 -0
- {mage_ai-0.9.7.dist-info → mage_ai-0.9.9.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.7.dist-info → mage_ai-0.9.9.dist-info}/WHEEL +0 -0
- {mage_ai-0.9.7.dist-info → mage_ai-0.9.9.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.7.dist-info → mage_ai-0.9.9.dist-info}/top_level.txt +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7803],{17717:function(e,n,t){var r=t(554);!function(){"use strict";var n={977:function(e){function n(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function t(e,n){for(var t,r="",i=0,o=-1,l=0,c=0;c<=e.length;++c){if(c<e.length)t=e.charCodeAt(c);else{if(47===t)break;t=47}if(47===t){if(o===c-1||1===l);else if(o!==c-1&&2===l){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var u=r.lastIndexOf("/");if(u!==r.length-1){-1===u?(r="",i=0):i=(r=r.slice(0,u)).length-1-r.lastIndexOf("/"),o=c,l=0;continue}}else if(2===r.length||1===r.length){r="",i=0,o=c,l=0;continue}n&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(o+1,c):r=e.slice(o+1,c),i=c-o-1;o=c,l=0}else 46===t&&-1!==l?++l:l=-1}return r}var i={resolve:function(){for(var e,i="",o=!1,l=arguments.length-1;l>=-1&&!o;l--){var c;l>=0?c=arguments[l]:(void 0===e&&(e=r.cwd()),c=e),n(c),0!==c.length&&(i=c+"/"+i,o=47===c.charCodeAt(0))}return i=t(i,!o),o?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(n(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=t(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return n(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var r=arguments[t];n(r),r.length>0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":i.normalize(e)},relative:function(e,t){if(n(e),n(t),e===t)return"";if((e=i.resolve(e))===(t=i.resolve(t)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var o=e.length,l=o-r,c=1;c<t.length&&47===t.charCodeAt(c);++c);for(var u=t.length-c,a=l<u?l:u,s=-1,d=0;d<=a;++d){if(d===a){if(u>a){if(47===t.charCodeAt(c+d))return t.slice(c+d+1);if(0===d)return t.slice(c+d)}else l>a&&(47===e.charCodeAt(r+d)?s=d:0===d&&(s=0));break}var f=e.charCodeAt(r+d);if(f!==t.charCodeAt(c+d))break;47===f&&(s=d)}var m="";for(d=r+s+1;d<=o;++d)d!==o&&47!==e.charCodeAt(d)||(0===m.length?m+="..":m+="/..");return m.length>0?m+t.slice(c+s):(c+=s,47===t.charCodeAt(c)&&++c,t.slice(c))},_makeLong:function(e){return e},dirname:function(e){if(n(e),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,i=-1,o=!0,l=e.length-1;l>=1;--l)if(47===(t=e.charCodeAt(l))){if(!o){i=l;break}}else o=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,t){if(void 0!==t&&"string"!==typeof t)throw new TypeError('"ext" argument must be a string');n(e);var r,i=0,o=-1,l=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var c=t.length-1,u=-1;for(r=e.length-1;r>=0;--r){var a=e.charCodeAt(r);if(47===a){if(!l){i=r+1;break}}else-1===u&&(l=!1,u=r+1),c>=0&&(a===t.charCodeAt(c)?-1===--c&&(o=r):(c=-1,o=u))}return i===o?o=u:-1===o&&(o=e.length),e.slice(i,o)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!l){i=r+1;break}}else-1===o&&(l=!1,o=r+1);return-1===o?"":e.slice(i,o)},extname:function(e){n(e);for(var t=-1,r=0,i=-1,o=!0,l=0,c=e.length-1;c>=0;--c){var u=e.charCodeAt(c);if(47!==u)-1===i&&(o=!1,i=c+1),46===u?-1===t?t=c:1!==l&&(l=1):-1!==t&&(l=-1);else if(!o){r=c+1;break}}return-1===t||-1===i||0===l||1===l&&t===i-1&&t===r+1?"":e.slice(t,i)},format:function(e){if(null===e||"object"!==typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,n){var t=n.dir||n.root,r=n.base||(n.name||"")+(n.ext||"");return t?t===n.root?t+r:t+e+r:r}("/",e)},parse:function(e){n(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var r,i=e.charCodeAt(0),o=47===i;o?(t.root="/",r=1):r=0;for(var l=-1,c=0,u=-1,a=!0,s=e.length-1,d=0;s>=r;--s)if(47!==(i=e.charCodeAt(s)))-1===u&&(a=!1,u=s+1),46===i?-1===l?l=s:1!==d&&(d=1):-1!==l&&(d=-1);else if(!a){c=s+1;break}return-1===l||-1===u||0===d||1===d&&l===u-1&&l===c+1?-1!==u&&(t.base=t.name=0===c&&o?e.slice(1,u):e.slice(c,u)):(0===c&&o?(t.name=e.slice(1,l),t.base=e.slice(1,u)):(t.name=e.slice(c,l),t.base=e.slice(c,u)),t.ext=e.slice(l,u)),c>0?t.dir=e.slice(0,c-1):o&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i}},t={};function i(e){var r=t[e];if(void 0!==r)return r.exports;var o=t[e]={exports:{}},l=!0;try{n[e](o,o.exports,i),l=!1}finally{l&&delete t[e]}return o.exports}i.ab="//";var o=i(977);e.exports=o}()},66050:function(e,n,t){"use strict";var r;t.d(n,{V:function(){return r}}),function(e){e.CANCELLED="cancelled",e.COMPLETED="completed",e.FAILED="failed",e.INITIAL="initial",e.RUNNING="running",e.UPSTREAM_FAILED="upstream_failed",e.CONDITION_FAILED="condition_failed"}(r||(r={}))},47409:function(e,n,t){"use strict";t.d(n,{Az:function(){return u},BF:function(){return c},Do:function(){return s},IK:function(){return l},VO:function(){return o},sZ:function(){return a}});var r,i=t(82394),o=t(66050).V,l=[o.FAILED,o.COMPLETED,o.RUNNING,o.CANCELLED,o.INITIAL],c=[o.INITIAL,o.RUNNING],u=[o.CANCELLED,o.COMPLETED,o.FAILED],a="__mage_variables",s=(r={},(0,i.Z)(r,o.CANCELLED,"Cancelled"),(0,i.Z)(r,o.COMPLETED,"Done"),(0,i.Z)(r,o.FAILED,"Failed"),(0,i.Z)(r,o.INITIAL,"Ready"),(0,i.Z)(r,o.RUNNING,"Running"),r)},98781:function(e,n,t){"use strict";t.d(n,{$1:function(){return s},G7:function(){return f},LM:function(){return m},Mj:function(){return p},QK:function(){return a},a_:function(){return v},qL:function(){return l},r0:function(){return d}});var r,i,o,l,c=t(82394),u=t(10503);!function(e){e.INTEGRATION="integration",e.PYTHON="python",e.PYSPARK="pyspark",e.STREAMING="streaming"}(l||(l={}));var a,s,d,f=(r={},(0,c.Z)(r,l.INTEGRATION,"Integration"),(0,c.Z)(r,l.PYTHON,"Standard"),(0,c.Z)(r,l.PYSPARK,"PySpark"),(0,c.Z)(r,l.STREAMING,"Streaming"),r),m="all",p=(l.PYTHON,l.INTEGRATION,l.STREAMING,i={},(0,c.Z)(i,m,u.ie),(0,c.Z)(i,l.INTEGRATION,u.YC),(0,c.Z)(i,l.PYTHON,u.El),(0,c.Z)(i,l.STREAMING,u.dB),i);!function(e){e.ACTIVE="active",e.INACTIVE="inactive",e.NO_SCHEDULES="no_schedules",e.RETRY="retry"}(a||(a={})),function(e){e.GROUP="group_by",e.STATUS="status[]",e.TAG="tag[]",e.TYPE="type[]"}(s||(s={})),function(e){e.STATUS="status",e.TAG="tag",e.TYPE="type"}(d||(d={}));var v=(o={},(0,c.Z)(o,l.PYTHON,"python3"),(0,c.Z)(o,l.PYSPARK,"pysparkkernel"),o)},87372:function(e,n,t){"use strict";var r,i,o,l,c,u,a,s,d=t(82394),f=t(26304),m=t(26653),p=t(38626),v=t(33591),h=t(23831),g=t(2005),b=t(31012),x=t(19711),j=t(49125),y=t(86673),Z=t(28598),I=["children","condensed","inline","level","marketing","spacingBelow"];function N(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function w(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?N(Object(t),!0).forEach((function(n){(0,d.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):N(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var O=(0,p.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," ",""],x.IH,(function(e){return e.color&&"\n color: ".concat(e.color,"\n ")}),(function(e){return e.yellow&&"\n color: ".concat((e.theme.accent||h.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(g.iI,";\n ")}),(function(e){return!e.monospace&&1===Number(e.weightStyle)&&"\n font-family: ".concat(g.LX,";\n ")}),(function(e){return!e.monospace&&2===Number(e.weightStyle)&&"\n font-family: ".concat(g.LX,";\n ")}),(function(e){return!e.monospace&&3===Number(e.weightStyle)&&"\n font-family: ".concat(g.ry,";\n ")}),(function(e){return!e.monospace&&4===Number(e.weightStyle)&&"\n font-family: ".concat(g.YC,";\n ")}),(function(e){return!e.monospace&&5===Number(e.weightStyle)&&"\n font-family: ".concat(g.nF,";\n ")}),(function(e){return!e.monospace&&(6===Number(e.weightStyle)||e.bold)&&"\n font-family: ".concat(g.nF,";\n ")}),(function(e){return!e.monospace&&7===Number(e.weightStyle)&&"\n font-family: ".concat(g.nF,";\n ")}),(function(e){return!e.monospace&&8===Number(e.weightStyle)&&"\n font-family: ".concat(g.nF,";\n ")}),(function(e){return e.lineHeightAuto&&"\n line-height: normal !important;\n "})),_=p.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(e){return"\n color: ".concat((e.theme.content||h.Z.content).active,";\n ")})),k=p.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],O,v.media.md(r||(r=(0,m.Z)(["\n ","\n "])),b.aQ),v.media.lg(i||(i=(0,m.Z)(["\n ","\n "])),b.aQ),v.media.xl(o||(o=(0,m.Z)(["\n ","\n "])),b.aQ)),P=p.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],O,b.MJ),E=p.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],O,v.media.xs(l||(l=(0,m.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*j.iI,7*j.iI),v.media.sm(c||(c=(0,m.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*j.iI,7*j.iI),v.media.md(u||(u=(0,m.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*j.iI,7*j.iI),v.media.lg(a||(a=(0,m.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*j.iI,7*j.iI),v.media.xl(s||(s=(0,m.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*j.iI,7*j.iI)),A=p.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],O,b.BL),C=p.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],O),S=p.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],O),T=p.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],O),L=p.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],O,(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 "})),M=function(e){var n,t=e.children,r=e.condensed,i=e.inline,o=e.level,l=e.marketing,c=e.spacingBelow,u=(0,f.Z)(e,I);i?n=L:0===Number(o)?n=k:1===Number(o)?n=l?E:P:2===Number(o)?n=A:3===Number(o)?n=C:4===Number(o)?n=S:5===Number(o)&&(n=T);var a=(0,Z.jsxs)(n,w(w({},u),{},{level:o,children:[c&&(0,Z.jsx)(y.Z,{mb:r?2:3,children:t}),!c&&t]}));return i?a:(0,Z.jsx)(_,{children:a})};M.defaultProps={level:3,weightStyle:6},n.Z=M},89745:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return oe}});var r=t(77837),i=t(38860),o=t.n(i),l=t(82684),c=t(60547),u=t(41788),a=t(75582),s=t(82394),d=t(93461),f=t(67971),m=t(87372),p=t(47409),v=t(86673),h=t(54283),g=t(19711),b=t(23831),x=t(10503),j=t(38626),y=t(73942),Z=t(2005),I=t(49125),N=t(31012),w=j.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-15svh8z-0"})(["border-radius:","px;margin:","px;overflow:hidden;"," "," "," "," "," "," &:hover{"," "," "," "," ","}"],y.n_,I.cd*I.iI,(function(e){return"\n background-color: ".concat((e.theme.background||b.Z.background).panel,";\n border: 1px solid ").concat((e.theme.borders||b.Z.borders).dark,";\n\n &:hover {\n cursor: pointer;\n }\n ")}),(function(e){return e.selected&&e.danger&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).negative,";\n ")}),(function(e){return e.selected&&e.primary&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.selected&&e.default&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).focusBackground,";\n ")}),(function(e){return e.selected&&e.success&&"\n border-color: ".concat((e.theme.background||b.Z.background).success,";\n ")}),(function(e){return e.selected&&e.warning&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).warning,";\n ")}),(function(e){return e.danger&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).negative,";\n ")}),(function(e){return e.primary&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.default&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).focusBackground,";\n ")}),(function(e){return e.success&&"\n border-color: ".concat((e.theme.background||b.Z.background).success,";\n ")}),(function(e){return e.warning&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).warning,";\n ")})),O=(0,j.css)([""," "," "," "," ",""],(function(e){return e.danger&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).negative,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.default&&"\n background-color: ".concat((e.theme.interactive||b.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||b.Z.background).success,";\n ")}),(function(e){return e.warning&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).warning,";\n ")})),_=j.default.div.withConfig({displayName:"indexstyle__StatusStyle",componentId:"sc-15svh8z-1"})([""," ",";border-radius:","px;display:inline-block;font-family:",";padding:6px;"," "," "," "," "," ",""],O,N.iD,y.D7,Z.ry,(function(e){return e.danger&&"\n color: ".concat((e.theme.content||b.Z.content).active,";\n ")}),(function(e){return e.primary&&"\n color: ".concat((e.theme.content||b.Z.content).active,";\n ")}),(function(e){return(e.default||e.success)&&"\n "}),(function(e){return e.default&&"\n color: ".concat((e.theme.content||b.Z.content).default,";\n ")}),(function(e){return e.success&&"\n color: ".concat((e.theme.content||b.Z.content).inverted,";\n ")}),(function(e){return e.warning&&"\n color: ".concat((e.theme.content||b.Z.content).inverted,";\n ")})),k=j.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-15svh8z-2"})([""," display:flex;height:auto;width:3px;",""],O,(function(e){return e.default&&"\n background-color: ".concat((e.theme.interactive||b.Z.interactive).focusBackground,";\n ")})),P=t(90211),E=t(92083),A=t.n(E),C=t(66050),S=t(24224);function T(e){var n;return Object.keys((null===e||void 0===e||null===(n=e.metrics)||void 0===n?void 0:n.blocks)||{}).sort()}function L(e){var n,t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=null,o=null,l=null,c=null,u={},s=(null===e||void 0===e?void 0:e.block_runs)||[],d=(null===e||void 0===e||null===(n=e.metrics)||void 0===n?void 0:n.blocks)||{},f=(null===e||void 0===e||null===(t=e.metrics)||void 0===t?void 0:t.pipeline)||{},m=M(e);return Object.entries(d).forEach((function(e){var n,t=(0,a.Z)(e,2),s=t[0],d=t[1];if(!r||r===s){var p,v=d||{},h=v.destinations,g=void 0===h?{records_affected:null,records_inserted:null,records_updated:null}:h,b=v.sources,x=void 0===b?{records:null}:b,j=m[s]||[];if(r&&r===s&&j.every((function(e){var n=e.status;return C.V.COMPLETED===n}))&&null===i&&(i=0),null!==f&&void 0!==f&&null!==(n=f[s])&&void 0!==n&&n.record_counts)null===i&&(i=0),i+=Number(null===f||void 0===f||null===(p=f[s])||void 0===p?void 0:p.record_counts);else null!==x&&void 0!==x&&x.records&&(null===i&&(i=0),i+=Number(x.records));null!==g&&void 0!==g&&g.records_updated?(null===l&&(l=0),l+=Number(g.records_updated),null===c&&(c=0),c+=Number(g.records_updated)):null!==g&&void 0!==g&&g.records_inserted?(null===l&&(l=0),l+=Number(g.records_inserted),null===o&&(o=0),o+=Number(g.records_inserted)):null!==g&&void 0!==g&&g.records_affected&&(null===l&&(l=0),l+=Number(g.records_affected)),["destinations","sources"].forEach((function(e){var n=d[e]||{};null!==n&&void 0!==n&&n.error&&(u[s]||(u[s]={}),u[s][e]={error:null===n||void 0===n?void 0:n.error,errors:null===n||void 0===n?void 0:n.errors,message:null===n||void 0===n?void 0:n.message})}))}})),null===s||void 0===s||s.forEach((function(e){var n=e.block_uuid,t=e.metrics,r=e.status;if(C.V.FAILED===r&&null!==t&&void 0!==t&&t.error&&n){var i=n.split(":"),o=(0,a.Z)(i,3),l=(o[0],o[1]);o[2];u[l]||(u[l]={}),u[l][""]=t.error}})),{errors:u,records:i,recordsInserted:o,recordsProcessed:l,recordsUpdated:c}}function M(e){var n=e.block_runs,t={};return null===n||void 0===n||n.forEach((function(e){var n=e.block_uuid.split(":"),r=(0,a.Z)(n,3),i=(r[0],r[1]);r[2];t[i]||(t[i]=[]),t[i].push(e)})),t}function D(e){var n=M(e),t={};return Object.entries(n).forEach((function(e){var n=(0,a.Z)(e,2),r=n[0],i=n[1],o=i.filter((function(e){var n=e.status;return C.V.COMPLETED===n})),l=o.map((function(e){var n=e.completed_at,t=e.started_at,r=A().utc(n),i=A().utc(t);return r.diff(i,"second")})),c=o.length,u=i.length;t[r]={completed:c,runtime:l.length>=1?(0,S.Sm)(l)/l.length:null,total:u}})),t}function R(e){var n=e.block_runs,t=(null===n||void 0===n?void 0:n.length)||1,r=function(e){var n=(null===e||void 0===e?void 0:e.block_runs)||[];return null===n||void 0===n?void 0:n.filter((function(e){var n=e.status;return C.V.COMPLETED===n}))}(e).length||0;return r/t}function V(e){var n=e.completed_at,t=e.block_runs,r=void 0===t?[]:t,i=e.status;if(null===r||void 0===r||!r.length)return 0;var o=A().utc();if(n)o=A().utc(n);else if([p.VO.CANCELLED,p.VO.FAILED].includes(i)){var l=(0,S.YC)(r,(function(e){return e.started_at}),{ascending:!1})[0];o=A().utc(l.updated_at)}var c=A().utc(e.created_at);return o.diff(c,"second")}function z(e,n){var t,r,i,o,l,c=M(e),u=D(e),a=(null===e||void 0===e?void 0:e.metrics)||{blocks:null,pipeline:null},s=a.blocks||{},d=a.pipeline||{},f=(s[n],d[n],u[n]||{completed:null,total:null}),m=f.completed,p=f.total,v=m&&p?m/p:0,h=c[n]||[],g=h.every((function(e){var n=e.status;return C.V.COMPLETED===n})),b=(0,S.YC)(h,(function(e){return e.updated_at}),{ascending:!1})[0],x=null===(t=(0,S.YC)(h,(function(e){return e.started_at}),{ascending:!0})[0])||void 0===t?void 0:t.started_at;g?r=null===(l=(0,S.YC)(h,(function(e){return e.completed_at}),{ascending:!1})[0])||void 0===l?void 0:l.completed_at:b&&(o=null===b||void 0===b?void 0:b.updated_at);var j=g?A().utc(r||o):A().utc(),y=A().utc(x);return{completed:m,completedAt:r,done:g,progress:v,runtime:i=j.diff(y,"second"),startedAt:x,status:null===b||void 0===b?void 0:b.status,timeText:(0,P.zf)(i),total:p,updatedAt:o}}var H=t(28598);function G(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function U(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?G(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):G(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var F=function(e){var n=e.onSelect,t=e.pipelineRun,r=e.selected,i=(t.block_runs,t.created_at),o=t.status,c=(0,l.useMemo)((function(){return(null===t||void 0===t?void 0:t.metrics)||{blocks:{},destination:null,pipeline:{},source:null}}),[t]),u=((0,l.useMemo)((function(){return c.blocks||{}}),[c]),(0,l.useMemo)((function(){return c.pipeline||{}}),[c])),s=c.destination,j=c.source,y=(0,l.useMemo)((function(){return Object.keys(u).length}),[u]),Z=(0,l.useMemo)((function(){return L(t)}),[t]),N=Z.errors,O=Z.records,E=Z.recordsProcessed,A=(0,l.useMemo)((function(){return R(t)}),[t]),C=(0,l.useMemo)((function(){return[p.VO.COMPLETED].includes(o)}),[o]),S=(0,l.useMemo)((function(){return{danger:p.VO.FAILED===o,default:p.VO.INITIAL===o,primary:p.VO.RUNNING===o,success:C,warning:p.VO.CANCELLED===o}}),[C,o]),T=(0,l.useMemo)((function(){if(t){var e=V(t);return(0,P.zf)(e)}}),[t]);return(0,H.jsx)(w,U(U({},S),{},{onClick:function(){return n(r?null:t.id)},selected:r,children:(0,H.jsxs)(f.Z,{fullHeight:!0,justifyContent:"space-between",children:[(0,H.jsx)(k,U({},S)),(0,H.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,H.jsxs)(v.Z,{ml:3,py:3,children:[(0,H.jsx)(m.Z,{bold:!0,level:5,monospace:!0,children:i}),(0,H.jsx)(v.Z,{fullWidth:!1,mt:2,children:(0,H.jsx)(_,U(U({},S),{},{children:(0,H.jsxs)(f.Z,{alignItems:"center",children:[C&&(0,H.jsx)(x.Jr,{inverted:!0,size:2*I.iI}),[p.VO.INITIAL,p.VO.RUNNING].includes(o)&&(0,H.jsx)(h.Z,{color:p.VO.INITIAL!==o?b.Z.monotone.white:null,inverted:p.VO.INITIAL===o,small:!0}),"\xa0",p.VO.RUNNING===o&&(0,H.jsxs)(H.Fragment,{children:["\xa0",Math.round(100*A),"%"]}),![p.VO.INITIAL,p.VO.RUNNING].includes(o)&&p.Do[o],p.VO.INITIAL===o&&"Starting"]})}))}),Object.values(N).length>=1&&(0,H.jsx)(v.Z,{mt:1,children:Object.entries(N).map((function(e,n){var t=(0,a.Z)(e,2),r=t[0];t[1];return(0,H.jsxs)(g.ZP,{monospace:!0,muted:!0,small:!0,children:[r," stream failed"]},r)}))})]})}),(0,H.jsxs)(d.Z,{flex:1,children:[(0,H.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,H.jsxs)(v.Z,{ml:3,py:3,children:[(0,H.jsxs)(v.Z,{mb:1,children:[(0,H.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Rows processed"}),(0,H.jsx)(g.ZP,{monospace:!0,children:E>=1?(0,P.x6)(E):"-"})]}),(0,H.jsxs)(v.Z,{mb:1,children:[(0,H.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Rows remaining"}),(0,H.jsx)(g.ZP,{monospace:!0,children:O>=1&&O>=E?(0,P.x6)(O-E):"-"})]}),p.VO.RUNNING!==o&&(0,H.jsxs)(v.Z,{mb:1,children:[(0,H.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Runtime"}),(0,H.jsx)(g.ZP,{monospace:!0,children:T})]})]})}),(0,H.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,H.jsxs)(v.Z,{ml:3,py:3,children:[(0,H.jsxs)(v.Z,{mb:1,children:[(0,H.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Source"}),(0,H.jsx)(g.ZP,{monospace:!0,children:j||"-"})]}),(0,H.jsxs)(v.Z,{mb:1,children:[(0,H.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Destination"}),(0,H.jsx)(g.ZP,{monospace:!0,children:s||"-"})]}),(0,H.jsxs)(v.Z,{mb:1,children:[(0,H.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Streams"}),(0,H.jsx)(g.ZP,{monospace:!0,children:y>=1?(0,P.x6)(y):"-"})]})]})})]})]})}))},Y=t(89565),B=t.n(Y),J=t(34376),W=t(60328),X=t(10919),K=t(87815),Q=j.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-1thr560-0"})(["display:flex;flex:1;"," "," ",""],(function(e){return e.even&&e.fill&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).cyan,";\n ")}),(function(e){return e.even&&!e.fill&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).cyanTransparent,";\n ")}),(function(e){return"\n height: ".concat((e.small?1:2)*I.iI,"px;\n ")})),q=t(66653);var $=function(e){var n=e.onClickRow,t=e.pipelineRun,r=e.selectedStream,i=(0,J.useRouter)(),o=(0,l.useState)(null),c=o[0],u=o[1],s=(0,l.useState)(null),d=s[0],h=s[1],b=(0,l.useMemo)((function(){return t?M(t):{}}),[t]),j=(0,l.useMemo)((function(){return t?D(t):{}}),[t]),y=(0,l.useMemo)((function(){var e=0,n=[],t=[];if(Object.entries(j).forEach((function(r){var i=(0,a.Z)(r,2),o=(i[0],i[1]),l=o.completed,c=o.runtime,u=o.total;null===c?t.push(o):(n.push(c),e+=c*(u-l))})),0===n.length)return null;var r=(0,S.Sm)(n)/n.length;return t.forEach((function(n){var t=n.completed,i=n.total;e+=r*(i-t)})),e}),[j]),Z=(0,l.useMemo)((function(){return r?j[r]:null}),[j,r]),N=(0,l.useMemo)((function(){if(r&&j){var e=j[r]||{},n=e.completed,i=e.total;if(i>=1)return n/i}else if(t)return R(t);return 0}),[Z,t,r]),w=(0,l.useMemo)((function(){return(0,H.jsx)(f.Z,{children:(0,S.w6)(101).map((function(e,n){return(0,H.jsx)(Q,{even:n%2===0,fill:N>0&&Math.round(100*N)>=n},n)}))})}),[N]),O=(0,l.useMemo)((function(){if(r){var e=b[r]||[],n=e.every((function(e){var n=e.status;return C.V.COMPLETED===n})),i=(0,S.YC)(e,(function(e){return e.updated_at}),{ascending:!1})[0],o=null===i||void 0===i?void 0:i.status,l=Z||{},c=l.completed,u=l.runtime,a=l.total;if(n)return"Sync complete for ".concat(r);if([C.V.CANCELLED,C.V.FAILED].includes(o))return p.Do[o];if(u&&a>=1){var s=Math.ceil(u*(a-c)/60);return"".concat((0,P._6)("minute",s,!0)," to completion")}return"Estimating time remaining for stream..."}if(p.VO.COMPLETED===(null===t||void 0===t?void 0:t.status))return"Sync complete";if(t){if([p.VO.CANCELLED,p.VO.FAILED].includes(null===t||void 0===t?void 0:t.status))return p.Do[null===t||void 0===t?void 0:t.status];if(p.VO.INITIAL===(null===t||void 0===t?void 0:t.status))return"Initializing sync (this can take several minutes)";if(null===y)return"Estimating time remaining...";var d=Math.ceil(y/60);return"".concat((0,P._6)("minute",d,!0)," to completion")}return"Select a sync"}),[b,y,Z,t,r]),_=(0,l.useMemo)((function(){return t&&r?z(t,r):{completed:null,completedAt:null,done:null,progress:null,runtime:null,startedAt:null,status:null,timeText:null,total:null,updatedAt:null}}),[t,r]);(0,l.useEffect)((function(){var e;if(t){var n=V(t);u(n),e=setInterval((function(){return u((function(e){return e+1}))}),1e3)}return function(){return clearInterval(e)}}),[t]),(0,l.useEffect)((function(){var e;if(t&&r&&_){var n=(null===_||void 0===_?void 0:_.runtime)||0;h(n),e=setInterval((function(){return h((function(e){return e+1}))}),1e3)}return function(){return clearInterval(e)}}),[t,r,_]);var k=(0,l.useMemo)((function(){if(t){if(r)return null===_||void 0===_?void 0:_.timeText;var e=V(t);return(0,P.zf)(e)}}),[t,r,_]),E=(0,l.useMemo)((function(){var e=Math.floor(c%86400/3600),n=Math.floor(c%3600/60),t=Math.floor(c%60/1);return[e>=10?String(e):"0".concat(e),n>=10?String(n):"0".concat(n),t>=10?String(t):"0".concat(t)].join(":")}),[c]),A=(0,l.useMemo)((function(){var e=Math.floor(d%86400/3600),n=Math.floor(d%3600/60),t=Math.floor(d%60/1);return[e>=10?String(e):"0".concat(e),n>=10?String(n):"0".concat(n),t>=10?String(t):"0".concat(t)].join(":")}),[d]),G=(0,l.useMemo)((function(){return t?L(t):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[t]),U=G.errors,F=G.records,Y=G.recordsInserted,$=G.recordsProcessed,ee=G.recordsUpdated,ne=(0,l.useMemo)((function(){return t&&r?L(t,r):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[t,r]),te=(0,l.useMemo)((function(){var e=r?null===ne||void 0===ne?void 0:ne.records:F,n=r?null===ne||void 0===ne?void 0:ne.recordsInserted:Y,t=r?null===ne||void 0===ne?void 0:ne.recordsProcessed:$,i=r?null===ne||void 0===ne?void 0:ne.recordsUpdated:ee,o=[{label:"Rows fetched",value:null===e?"-":(0,P.x6)(e)}];return null===n&&null===i?o.push({label:"Rows processed",value:null===t?"-":(0,P.x6)(t)}):null!==n?o.push({label:"Rows inserted",value:(0,P.x6)(n)}):null!==i&&o.push({label:"Rows updated",value:(0,P.x6)(i)}),o.map((function(e){var n=e.label,t=e.value;return(0,H.jsxs)("div",{children:[(0,H.jsx)(g.ZP,{bold:!0,large:!0,muted:!0,children:n}),(0,H.jsx)(g.ZP,{headline:!0,children:t})]},n)}))}),[F,ne,Y,$,ee,k,E,status]),re=(0,l.useMemo)((function(){if(!t)return(0,H.jsx)("div",{});var e=T(t);return(0,H.jsx)(K.Z,{columnFlex:[null,null,null,null,null,null],columns:[{uuid:"Stream"},{uuid:"Start"},{uuid:"End"},{uuid:"Time"},{uuid:"Progress"},{uuid:"Logs"}],isSelectedRow:function(n){return r&&r===e[n]},onClickRow:n,rows:e.map((function(e){var n=z(t,e),r=(n.completed,n.completedAt),o=n.done,l=n.progress,c=n.startedAt,u=n.status,a=n.timeText,s=(n.total,!!U[e]);return[(0,H.jsx)(g.ZP,{danger:s,default:!s,monospace:!0,children:e},"stream"),(0,H.jsx)(g.ZP,{default:!0,monospace:!0,children:c?c.split(".")[0]:"-"},"started_at"),(0,H.jsx)(g.ZP,{default:!0,monospace:!0,children:r?r.split(".")[0]:"-"},"completed_at"),(0,H.jsx)(g.ZP,{default:!0,children:[C.V.INITIAL,C.V.RUNNING].includes(u)?"-":a},"runtime"),(0,H.jsxs)("div",{children:[o&&(0,H.jsx)(x.Jr,{default:!0,size:2*I.iI}),!o&&(0,H.jsx)(f.Z,{children:(0,S.w6)(51).map((function(e,n){return(0,H.jsx)(Q,{fill:l>0&&Math.round(50*l)>=n,even:n%2===0,small:!0},n)}))})]},"progress"),(0,H.jsx)(W.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(e){i.push("/pipelines/".concat(t.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(t.id)),(0,q.j)(e)},children:(0,H.jsx)(x.B4,{default:!0,size:2*I.iI})},"logs")]})),uuid:"".concat(null===t||void 0===t?void 0:t.id,"-streams-table")})}),[U,j,t,r]),ie=(0,l.useMemo)((function(){var e,n,i,o,l,c,u,s;if(t&&r){var d=(null===t||void 0===t?void 0:t.metrics)||{blocks:null,destination:null,pipeline:null,source:null},f=null===d||void 0===d||null===(e=d.pipeline)||void 0===e||null===(n=e[r])||void 0===n||null===(i=n.bookmarks)||void 0===i?void 0:i[r],m=null===d||void 0===d||null===(o=d.blocks)||void 0===o||null===(l=o[r])||void 0===l||null===(c=l.destinations)||void 0===c||null===(u=c.state)||void 0===u||null===(s=u.bookmarks)||void 0===s?void 0:s[r];if(f||m){var p=Array.from(new Set(Object.keys(f||{}).concat(Object.keys(m||{})))).sort(),v=[];p.forEach((function(e){var n=[(0,H.jsx)(g.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:e},e)];[f,m].forEach((function(t,r){t&&n.push((0,H.jsx)(g.ZP,{monospace:!0,small:!0,children:t[e]},"".concat(e,"-").concat(r)))})),v.push(n)}));var h=[{label:function(){return""},uuid:"column"}];return[[null===d||void 0===d?void 0:d.source,"source",f],[null===d||void 0===d?void 0:d.destination,"destination",m]].forEach((function(e){var n=(0,a.Z)(e,3),t=n[0],r=n[1];n[2]&&h.push({uuid:"".concat(t," (").concat(r,")")})})),(0,H.jsx)(K.Z,{columnFlex:[null,1,1],columns:h,rows:v,uuid:"".concat(r,"-bookmark-table")})}}}),[t,r]),oe=(0,l.useMemo)((function(){var e,n,i,o,l,c;if(t&&r){var u=(null===t||void 0===t?void 0:t.metrics)||{blocks:null,destination:null,pipeline:null,source:null},s=null===u||void 0===u||null===(e=u.blocks)||void 0===e||null===(n=e[r])||void 0===n||null===(i=n.sources)||void 0===i?void 0:i.record,d=null===u||void 0===u||null===(o=u.blocks)||void 0===o||null===(l=o[r])||void 0===l||null===(c=l.destinations)||void 0===c?void 0:c.record;if(s||d){var f=Object.keys(d||s||{}).sort(),m=[];f.forEach((function(e){var n=[(0,H.jsx)(g.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:e},e)];[s,d].forEach((function(t,r){if(t){var i=t[e],o="object"===typeof i;n.push((0,H.jsxs)(g.ZP,{monospace:!0,small:!0,textOverflow:!0,whiteSpaceNormal:!0,wordBreak:!0,children:[o&&(0,H.jsx)("pre",{children:JSON.stringify(i,null,2)}),!o&&i]},"".concat(e,"-").concat(r)))}})),m.push(n)}));var p=[{label:function(){return""},uuid:"column"}];return[[null===u||void 0===u?void 0:u.source,"source",s],[null===u||void 0===u?void 0:u.destination,"destination",d]].forEach((function(e){var n=(0,a.Z)(e,3),t=n[0],r=n[1];n[2]&&p.push({uuid:"".concat(t," (").concat(r,")")})})),(0,H.jsx)(K.Z,{columnFlex:[null,1,1],columns:p,rows:m.map((function(e){return e.map((function(e){return(0,H.jsx)(g.ZP,{default:!0,monospace:!0,children:e},e)}))})),uuid:"".concat(r,"-bookmark-table")})}}}),[t,r]),le=(0,l.useMemo)((function(){var e,n,i,o,l,c,u=null===t||void 0===t||null===(e=t.metrics)||void 0===e||null===(n=e.blocks)||void 0===n?void 0:n[r];return(null===u||void 0===u||null===(i=u.sources)||void 0===i||null===(o=i.block_tags)||void 0===o?void 0:o.destination_table)||(null===u||void 0===u||null===(l=u.destinations)||void 0===l||null===(c=l.block_tags)||void 0===c?void 0:c.destination_table)}),[t,r]);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(v.Z,{p:3,children:[r&&(0,H.jsx)(v.Z,{mb:3,children:(0,H.jsxs)(f.Z,{alignItems:"center",children:[(0,H.jsx)(X.Z,{block:!0,onClick:function(){return i.push("/pipelines/".concat(t.pipeline_uuid,"/syncs?pipeline_run_id=").concat(t.id))},preventDefault:!0,children:(0,H.jsxs)(f.Z,{alignItems:"center",children:[(0,H.jsx)(x.Xd,{default:!0,size:1.5*I.iI}),(0,H.jsx)(v.Z,{mr:1}),(0,H.jsx)(g.ZP,{default:!0,children:"Syncs"})]})}),(0,H.jsx)(v.Z,{mx:1,children:(0,H.jsx)(g.ZP,{default:!0,monospace:!0,children:"/"})}),(0,H.jsx)(g.ZP,{bold:!0,monospace:!0,children:r})]})}),(0,H.jsxs)(f.Z,{alignItems:"center",justifyContent:"space-between",children:[(0,H.jsx)(v.Z,{mr:2,my:1,children:(0,H.jsx)(m.Z,{level:5,muted:!t,children:O})}),t&&(0,H.jsx)(W.Z,{onClick:function(){return i.push("/pipelines/".concat(t.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(t.id))},small:!0,children:"Logs"})]}),(0,H.jsx)(v.Z,{mt:2,children:w}),t&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(v.Z,{mt:3,children:(0,H.jsxs)(f.Z,{justifyContent:"space-between",children:[(0,H.jsxs)("div",{children:[(0,H.jsx)(g.ZP,{bold:!0,large:!0,muted:!0,children:"Runtime"}),(0,H.jsxs)(g.ZP,{headline:!0,children:[r&&[C.V.INITIAL,C.V.RUNNING].includes(null===_||void 0===_?void 0:_.status)&&A,r&&![C.V.INITIAL,C.V.RUNNING].includes(null===_||void 0===_?void 0:_.status)&&(null===_||void 0===_?void 0:_.timeText),!r&&[p.VO.INITIAL,p.VO.RUNNING].includes(null===t||void 0===t?void 0:t.status)&&E,!r&&![p.VO.INITIAL,p.VO.RUNNING].includes(null===t||void 0===t?void 0:t.status)&&k]})]}),te]})}),Object.values(U).length>=1&&(0,H.jsxs)(v.Z,{mt:3,children:[(0,H.jsx)(m.Z,{level:5,muted:!0,children:"Errors"}),Object.entries(U).map((function(e,n){var t=(0,a.Z)(e,2),i=t[0],o=t[1];return(!r||r===i)&&(0,H.jsx)(v.Z,{mt:n>=1?1:0,children:Object.entries(o).map((function(e){var n=(0,a.Z)(e,2),t=n[0],r=n[1],o=r.error,l=r.errors,c=r.message,u=Array.isArray(o)?o.join(" "):o;return(0,H.jsxs)("div",{children:[(0,H.jsx)(v.Z,{mb:c||(null===l||void 0===l?void 0:l.length)>=1?2:0,children:(0,H.jsxs)(g.ZP,{monospace:!0,preWrap:!0,textOverflow:!0,children:[i,!!t&&(0,H.jsxs)(g.ZP,{inline:!0,monospace:!0,muted:!0,children:["\xa0(",t,")"]}),": ",(0,H.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:u&&(0,H.jsx)(B(),{children:u})})]})}),(0,H.jsx)(g.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:c}),l.map((function(e){return(0,H.jsx)(g.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))]},"".concat(i,"-").concat(t))}))},i)}))]})]})]}),t&&!r&&(0,H.jsx)(v.Z,{my:3,children:re}),t&&r&&(0,H.jsxs)(H.Fragment,{children:[le&&(0,H.jsx)(v.Z,{my:3,children:(0,H.jsxs)(v.Z,{px:3,children:[(0,H.jsx)(m.Z,{level:5,children:"Table name"}),(0,H.jsx)(v.Z,{mt:1,children:(0,H.jsx)(g.ZP,{default:!0,monospace:!0,children:le})})]})}),ie&&(0,H.jsxs)(v.Z,{my:3,children:[(0,H.jsx)(v.Z,{px:3,children:(0,H.jsx)(m.Z,{level:5,children:"Bookmarks"})}),(0,H.jsx)(v.Z,{px:1,children:ie})]}),oe&&(0,H.jsxs)(v.Z,{my:3,children:[(0,H.jsx)(v.Z,{px:3,children:(0,H.jsx)(m.Z,{level:5,children:"Sample row"})}),(0,H.jsx)(v.Z,{px:1,children:oe})]})]})]})},ee=t(82531),ne=t(59920),te=t(33766),re=t(59e3);function ie(e){var n=e.pipeline,t=n.uuid,r=ee.ZP.pipeline_runs.list({_limit:20,_offset:0,pipeline_uuid:t},{refreshInterval:5e3}).data,i=(0,l.useMemo)((function(){return(null===r||void 0===r?void 0:r.pipeline_runs)||[]}),[r]),o=(0,re.iV)(),u=(0,l.useState)(null),a=u[0],s=u[1],d=(0,l.useState)(null),f=d[0],m=d[1],p=(0,l.useState)(null),v=p[0],h=p[1];(0,l.useEffect)((function(){null!==o&&void 0!==o&&o.pipeline_run_id?h(null===i||void 0===i?void 0:i.find((function(e){return e.id===Number(o.pipeline_run_id)}))):v&&h(null),null!==o&&void 0!==o&&o.stream?m(o.stream):f&&m(null)}),[i,o,v,f]);var g=(0,l.useCallback)((function(){var e=v?T(v):[];return(0,H.jsx)($,{onClickRow:function(n){var t=e[n];(0,te.u7)({stream:f===t?null:t})},pipelineRun:v,selectedStream:f})}),[v,f]),b=(0,l.useMemo)((function(){var e="/pipelines/".concat(t,"/syncs");v&&(e="".concat(e,"?pipeline_run_id=").concat(v.id));var n=[{label:function(){return"Syncs"},linkProps:f?{as:e,href:"/pipelines/[pipeline]/syncs"}:null}];return f&&n.push({label:function(){return f}}),n}),[t,v,f]);return(0,H.jsx)(c.Z,{breadcrumbs:b,buildSidekick:g,errors:a,pageName:ne.M.SYNCS,pipeline:n,setErrors:s,title:function(e){var n=e.name;return"".concat(n," syncs")},uuid:"".concat(ne.M.SYNCS,"_").concat(t),children:i.map((function(e){var n=(null===v||void 0===v?void 0:v.id)===e.id;return(0,H.jsx)(F,{onSelect:function(e){return(0,te.u7)({pipeline_run_id:e,stream:null})},pipelineRun:e,selected:n},e.id)}))})}ie.getInitialProps=function(){var e=(0,r.Z)(o().mark((function e(n){var t;return o().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 oe=(0,u.Z)(ie)},33766:function(e,n,t){"use strict";t.d(n,{O2:function(){return d},g_:function(){return m},u7:function(){return f}});var r=t(75582),i=t(82394),o=t(34376),l=t.n(o),c=t(59e3),u=t(24224);function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var d="_offset";function f(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.preserveParams,i=n.pushHistory,o=n.replaceParams,u=(0,c.iV)(),a={};t&&t.forEach((function(e){u[e]&&(a[e]=u[e])}));var d,f=o?a:u;d=window.location.pathname;var m=i?l().push:l().replace,p=s(s({},f),e);Object.entries(e).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];"undefined"!==typeof i&&null!==i||delete p[t]}));var v=(0,c.uM)(p);v.length>=1&&(v="?".concat(v));var h="".concat(d.split("?")[0]).concat(v);return m(l().router.pathname,h,{shallow:!0})}function m(e,n,t){var i=t.addingMultipleValues,o=t.isList,l=t.itemsPerPage,c=t.pushHistory,a=void 0!==c&&c,m=t.resetLimitParams,p=s({},e);i?Object.entries(n).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];if(Array.isArray(i)){var o="".concat(t,"[]");p[o]=i.map(String)}})):o?Object.entries(n).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1],o=String(i),l="".concat(t,"[]"),c=p[l];c&&Array.isArray(c)?(c=c.map(String)).includes(o)?p[l]=(0,u.Od)(c,(function(e){return e===o})):p[l]=c.concat(o):p[l]=[o]})):p=s(s({},p),n),m&&(p._limit=l||20,p[d]=0),f(p,{pushHistory:a})}},90211:function(e,n,t){"use strict";t.d(n,{RA:function(){return s},kC:function(){return d},vg:function(){return b},kE:function(){return I},Mp:function(){return f},Pb:function(){return u},HW:function(){return j},wX:function(){return m},x6:function(){return p},_6:function(){return v},zf:function(){return x},Y6:function(){return Z},wE:function(){return N},J3:function(){return h},We:function(){return a},QV:function(){return y},C5:function(){return g}});var r=t(75582),i=t(17717),o=["aged","ancient","autumn","billowing","bitter","black","blue","bold","broken","cold","cool","crimson","damp","dark","dawn","delicate","divine","dry","empty","falling","floral","fragrant","frosty","green","hidden","holy","icy","late","lingering","little","lively","long","misty","morning","muddy","nameless","old","patient","polished","proud","purple","quiet","red","restless","rough","shy","silent","small","snowy","solitary","sparkling","spring","still","summer","throbbing","twilight","wandering","weathered","white","wild","winter","wispy","withered","young"],l=(t(92083),["bird","breeze","brook","bush","butterfly","cherry","cloud","darkness","dawn","dew","dream","dust","feather","field","fire","firefly","flower","fog","forest","frog","frost","glade","glitter","grass","haze","hill","lake","leaf","meadow","moon","morning","mountain","night","paper","pine","pond","rain","resonance","river","sea","shadow","shape","silence","sky","smoke","snow","snowflake","sound","star","sun","sun","sunset","surf","thunder","tree","violet","voice","water","water","waterfall","wave","wildflower","wind","wood"]),c=t(24224);function u(e){if(!e)return!1;try{JSON.parse(e)}catch(n){return!1}return!0}function a(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_";return e.split(" ").join(n)}function s(e){return e.split(" ").join("_")}function d(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return String((new Date).getTime()*e)}function m(e){return e.charAt(0).toLowerCase()+e.slice(1)}function p(e){if(null===e||"undefined"===typeof e)return"";var n=e.toString().split("."),t=(0,r.Z)(n,2),i=t[0],o=t[1],l=i.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");return o?"".concat(l,".").concat(o):l}function v(e,n){var t,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=n,o=void 0!==i&&null!==i;if(o||(i=2),1===i)t=e;else{var l=e.length,c=e[l-1];t="y"===c&&"day"!==e?"".concat(e.slice(0,l-1),"ies"):"".concat(e,"s"===c?"es":"s")}if(o){var u=r?p(i):i;return"".concat(u," ").concat(t)}return t}function h(e){return null===e||void 0===e?void 0:e.replace(/_/g," ")}function g(e){var n=e.length;return"ies"===e.slice(n-3,n)?"".concat(e.slice(0,n-3),"y"):"es"===e.slice(n-2,n)&&"ces"!==e.slice(n-3,n)?e.slice(0,n-2):e.slice(0,n-1)}function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return d(h(e.toLowerCase()))}function x(e){var n,t=[["second",60],["minute",60],["hour",24],["day",7],["week",4],["month",12],["year",null]];return t.forEach((function(i,o){if(!n){var l=(0,r.Z)(i,2),c=l[0],u=l[1],a=t.slice(0,o).reduce((function(e,n){return e*Number(n[1])}),1);e<Number(u)*a&&(n=v(c,Math.round(e/a)))}})),n}function j(e){return!isNaN(e)}function y(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,t=Math.pow(10,n);return Math.round((e||0)*t)/t}function Z(){return"".concat((0,c.mp)(o)," ").concat((0,c.mp)(l))}function I(e){return null===e||void 0===e?void 0:e.toLowerCase().replace(/\W+/g,"_")}function N(e){var n,t=e.split(i.sep),r=t[t.length-1].split(".");return n=1===r.length?r[0]:r.slice(0,-1).join("."),t.slice(0,t.length-1).concat(n).join(i.sep)}},59416:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/syncs",function(){return t(89745)}])}},function(e){e.O(0,[844,9902,1424,1005,7815,547,9774,2888,179],(function(){return n=59416,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7803],{17717:function(e,n,t){var r=t(554);!function(){"use strict";var n={977:function(e){function n(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function t(e,n){for(var t,r="",i=0,o=-1,l=0,c=0;c<=e.length;++c){if(c<e.length)t=e.charCodeAt(c);else{if(47===t)break;t=47}if(47===t){if(o===c-1||1===l);else if(o!==c-1&&2===l){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var u=r.lastIndexOf("/");if(u!==r.length-1){-1===u?(r="",i=0):i=(r=r.slice(0,u)).length-1-r.lastIndexOf("/"),o=c,l=0;continue}}else if(2===r.length||1===r.length){r="",i=0,o=c,l=0;continue}n&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(o+1,c):r=e.slice(o+1,c),i=c-o-1;o=c,l=0}else 46===t&&-1!==l?++l:l=-1}return r}var i={resolve:function(){for(var e,i="",o=!1,l=arguments.length-1;l>=-1&&!o;l--){var c;l>=0?c=arguments[l]:(void 0===e&&(e=r.cwd()),c=e),n(c),0!==c.length&&(i=c+"/"+i,o=47===c.charCodeAt(0))}return i=t(i,!o),o?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(n(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=t(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return n(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var r=arguments[t];n(r),r.length>0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":i.normalize(e)},relative:function(e,t){if(n(e),n(t),e===t)return"";if((e=i.resolve(e))===(t=i.resolve(t)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var o=e.length,l=o-r,c=1;c<t.length&&47===t.charCodeAt(c);++c);for(var u=t.length-c,a=l<u?l:u,s=-1,d=0;d<=a;++d){if(d===a){if(u>a){if(47===t.charCodeAt(c+d))return t.slice(c+d+1);if(0===d)return t.slice(c+d)}else l>a&&(47===e.charCodeAt(r+d)?s=d:0===d&&(s=0));break}var f=e.charCodeAt(r+d);if(f!==t.charCodeAt(c+d))break;47===f&&(s=d)}var m="";for(d=r+s+1;d<=o;++d)d!==o&&47!==e.charCodeAt(d)||(0===m.length?m+="..":m+="/..");return m.length>0?m+t.slice(c+s):(c+=s,47===t.charCodeAt(c)&&++c,t.slice(c))},_makeLong:function(e){return e},dirname:function(e){if(n(e),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,i=-1,o=!0,l=e.length-1;l>=1;--l)if(47===(t=e.charCodeAt(l))){if(!o){i=l;break}}else o=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,t){if(void 0!==t&&"string"!==typeof t)throw new TypeError('"ext" argument must be a string');n(e);var r,i=0,o=-1,l=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var c=t.length-1,u=-1;for(r=e.length-1;r>=0;--r){var a=e.charCodeAt(r);if(47===a){if(!l){i=r+1;break}}else-1===u&&(l=!1,u=r+1),c>=0&&(a===t.charCodeAt(c)?-1===--c&&(o=r):(c=-1,o=u))}return i===o?o=u:-1===o&&(o=e.length),e.slice(i,o)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!l){i=r+1;break}}else-1===o&&(l=!1,o=r+1);return-1===o?"":e.slice(i,o)},extname:function(e){n(e);for(var t=-1,r=0,i=-1,o=!0,l=0,c=e.length-1;c>=0;--c){var u=e.charCodeAt(c);if(47!==u)-1===i&&(o=!1,i=c+1),46===u?-1===t?t=c:1!==l&&(l=1):-1!==t&&(l=-1);else if(!o){r=c+1;break}}return-1===t||-1===i||0===l||1===l&&t===i-1&&t===r+1?"":e.slice(t,i)},format:function(e){if(null===e||"object"!==typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,n){var t=n.dir||n.root,r=n.base||(n.name||"")+(n.ext||"");return t?t===n.root?t+r:t+e+r:r}("/",e)},parse:function(e){n(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var r,i=e.charCodeAt(0),o=47===i;o?(t.root="/",r=1):r=0;for(var l=-1,c=0,u=-1,a=!0,s=e.length-1,d=0;s>=r;--s)if(47!==(i=e.charCodeAt(s)))-1===u&&(a=!1,u=s+1),46===i?-1===l?l=s:1!==d&&(d=1):-1!==l&&(d=-1);else if(!a){c=s+1;break}return-1===l||-1===u||0===d||1===d&&l===u-1&&l===c+1?-1!==u&&(t.base=t.name=0===c&&o?e.slice(1,u):e.slice(c,u)):(0===c&&o?(t.name=e.slice(1,l),t.base=e.slice(1,u)):(t.name=e.slice(c,l),t.base=e.slice(c,u)),t.ext=e.slice(l,u)),c>0?t.dir=e.slice(0,c-1):o&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i}},t={};function i(e){var r=t[e];if(void 0!==r)return r.exports;var o=t[e]={exports:{}},l=!0;try{n[e](o,o.exports,i),l=!1}finally{l&&delete t[e]}return o.exports}i.ab="//";var o=i(977);e.exports=o}()},66050:function(e,n,t){"use strict";var r;t.d(n,{V:function(){return r}}),function(e){e.CANCELLED="cancelled",e.COMPLETED="completed",e.FAILED="failed",e.INITIAL="initial",e.RUNNING="running",e.UPSTREAM_FAILED="upstream_failed",e.CONDITION_FAILED="condition_failed"}(r||(r={}))},47409:function(e,n,t){"use strict";t.d(n,{Az:function(){return u},BF:function(){return c},Do:function(){return s},IK:function(){return l},VO:function(){return o},sZ:function(){return a}});var r,i=t(82394),o=t(66050).V,l=[o.FAILED,o.COMPLETED,o.RUNNING,o.CANCELLED,o.INITIAL],c=[o.INITIAL,o.RUNNING],u=[o.CANCELLED,o.COMPLETED,o.FAILED],a="__mage_variables",s=(r={},(0,i.Z)(r,o.CANCELLED,"Cancelled"),(0,i.Z)(r,o.COMPLETED,"Done"),(0,i.Z)(r,o.FAILED,"Failed"),(0,i.Z)(r,o.INITIAL,"Ready"),(0,i.Z)(r,o.RUNNING,"Running"),r)},98781:function(e,n,t){"use strict";t.d(n,{$1:function(){return s},G7:function(){return f},LM:function(){return m},Mj:function(){return p},QK:function(){return a},a_:function(){return v},qL:function(){return l},r0:function(){return d}});var r,i,o,l,c=t(82394),u=t(22341);!function(e){e.INTEGRATION="integration",e.PYTHON="python",e.PYSPARK="pyspark",e.STREAMING="streaming"}(l||(l={}));var a,s,d,f=(r={},(0,c.Z)(r,l.INTEGRATION,"Integration"),(0,c.Z)(r,l.PYTHON,"Standard"),(0,c.Z)(r,l.PYSPARK,"PySpark"),(0,c.Z)(r,l.STREAMING,"Streaming"),r),m="all",p=(l.PYTHON,l.INTEGRATION,l.STREAMING,i={},(0,c.Z)(i,m,u.ie),(0,c.Z)(i,l.INTEGRATION,u.YC),(0,c.Z)(i,l.PYTHON,u.El),(0,c.Z)(i,l.STREAMING,u.dB),i);!function(e){e.ACTIVE="active",e.INACTIVE="inactive",e.NO_SCHEDULES="no_schedules",e.RETRY="retry"}(a||(a={})),function(e){e.GROUP="group_by",e.STATUS="status[]",e.TAG="tag[]",e.TYPE="type[]"}(s||(s={})),function(e){e.STATUS="status",e.TAG="tag",e.TYPE="type"}(d||(d={}));var v=(o={},(0,c.Z)(o,l.PYTHON,"python3"),(0,c.Z)(o,l.PYSPARK,"pysparkkernel"),o)},87372:function(e,n,t){"use strict";var r,i,o,l,c,u,a,s,d=t(82394),f=t(26304),m=t(26653),p=t(38626),v=t(33591),h=t(23831),g=t(2005),b=t(31012),x=t(19711),j=t(49125),y=t(86673),Z=t(28598),I=["children","condensed","inline","level","marketing","spacingBelow"];function N(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function w(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?N(Object(t),!0).forEach((function(n){(0,d.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):N(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var O=(0,p.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," ",""],x.IH,(function(e){return e.color&&"\n color: ".concat(e.color,"\n ")}),(function(e){return e.yellow&&"\n color: ".concat((e.theme.accent||h.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(g.iI,";\n ")}),(function(e){return!e.monospace&&1===Number(e.weightStyle)&&"\n font-family: ".concat(g.LX,";\n ")}),(function(e){return!e.monospace&&2===Number(e.weightStyle)&&"\n font-family: ".concat(g.LX,";\n ")}),(function(e){return!e.monospace&&3===Number(e.weightStyle)&&"\n font-family: ".concat(g.ry,";\n ")}),(function(e){return!e.monospace&&4===Number(e.weightStyle)&&"\n font-family: ".concat(g.YC,";\n ")}),(function(e){return!e.monospace&&5===Number(e.weightStyle)&&"\n font-family: ".concat(g.nF,";\n ")}),(function(e){return!e.monospace&&(6===Number(e.weightStyle)||e.bold)&&"\n font-family: ".concat(g.nF,";\n ")}),(function(e){return!e.monospace&&7===Number(e.weightStyle)&&"\n font-family: ".concat(g.nF,";\n ")}),(function(e){return!e.monospace&&8===Number(e.weightStyle)&&"\n font-family: ".concat(g.nF,";\n ")}),(function(e){return e.lineHeightAuto&&"\n line-height: normal !important;\n "})),_=p.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(e){return"\n color: ".concat((e.theme.content||h.Z.content).active,";\n ")})),k=p.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],O,v.media.md(r||(r=(0,m.Z)(["\n ","\n "])),b.aQ),v.media.lg(i||(i=(0,m.Z)(["\n ","\n "])),b.aQ),v.media.xl(o||(o=(0,m.Z)(["\n ","\n "])),b.aQ)),P=p.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],O,b.MJ),E=p.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],O,v.media.xs(l||(l=(0,m.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*j.iI,7*j.iI),v.media.sm(c||(c=(0,m.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*j.iI,7*j.iI),v.media.md(u||(u=(0,m.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*j.iI,7*j.iI),v.media.lg(a||(a=(0,m.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*j.iI,7*j.iI),v.media.xl(s||(s=(0,m.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*j.iI,7*j.iI)),A=p.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],O,b.BL),C=p.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],O),S=p.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],O),T=p.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],O),L=p.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],O,(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 "})),M=function(e){var n,t=e.children,r=e.condensed,i=e.inline,o=e.level,l=e.marketing,c=e.spacingBelow,u=(0,f.Z)(e,I);i?n=L:0===Number(o)?n=k:1===Number(o)?n=l?E:P:2===Number(o)?n=A:3===Number(o)?n=C:4===Number(o)?n=S:5===Number(o)&&(n=T);var a=(0,Z.jsxs)(n,w(w({},u),{},{level:o,children:[c&&(0,Z.jsx)(y.Z,{mb:r?2:3,children:t}),!c&&t]}));return i?a:(0,Z.jsx)(_,{children:a})};M.defaultProps={level:3,weightStyle:6},n.Z=M},89745:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return oe}});var r=t(77837),i=t(38860),o=t.n(i),l=t(82684),c=t(60547),u=t(41788),a=t(75582),s=t(82394),d=t(93461),f=t(67971),m=t(87372),p=t(47409),v=t(86673),h=t(54283),g=t(19711),b=t(23831),x=t(22341),j=t(38626),y=t(73942),Z=t(2005),I=t(49125),N=t(31012),w=j.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-15svh8z-0"})(["border-radius:","px;margin:","px;overflow:hidden;"," "," "," "," "," "," &:hover{"," "," "," "," ","}"],y.n_,I.cd*I.iI,(function(e){return"\n background-color: ".concat((e.theme.background||b.Z.background).panel,";\n border: 1px solid ").concat((e.theme.borders||b.Z.borders).dark,";\n\n &:hover {\n cursor: pointer;\n }\n ")}),(function(e){return e.selected&&e.danger&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).negative,";\n ")}),(function(e){return e.selected&&e.primary&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.selected&&e.default&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).focusBackground,";\n ")}),(function(e){return e.selected&&e.success&&"\n border-color: ".concat((e.theme.background||b.Z.background).success,";\n ")}),(function(e){return e.selected&&e.warning&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).warning,";\n ")}),(function(e){return e.danger&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).negative,";\n ")}),(function(e){return e.primary&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.default&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).focusBackground,";\n ")}),(function(e){return e.success&&"\n border-color: ".concat((e.theme.background||b.Z.background).success,";\n ")}),(function(e){return e.warning&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).warning,";\n ")})),O=(0,j.css)([""," "," "," "," ",""],(function(e){return e.danger&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).negative,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.default&&"\n background-color: ".concat((e.theme.interactive||b.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||b.Z.background).success,";\n ")}),(function(e){return e.warning&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).warning,";\n ")})),_=j.default.div.withConfig({displayName:"indexstyle__StatusStyle",componentId:"sc-15svh8z-1"})([""," ",";border-radius:","px;display:inline-block;font-family:",";padding:6px;"," "," "," "," "," ",""],O,N.iD,y.D7,Z.ry,(function(e){return e.danger&&"\n color: ".concat((e.theme.content||b.Z.content).active,";\n ")}),(function(e){return e.primary&&"\n color: ".concat((e.theme.content||b.Z.content).active,";\n ")}),(function(e){return(e.default||e.success)&&"\n "}),(function(e){return e.default&&"\n color: ".concat((e.theme.content||b.Z.content).default,";\n ")}),(function(e){return e.success&&"\n color: ".concat((e.theme.content||b.Z.content).inverted,";\n ")}),(function(e){return e.warning&&"\n color: ".concat((e.theme.content||b.Z.content).inverted,";\n ")})),k=j.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-15svh8z-2"})([""," display:flex;height:auto;width:3px;",""],O,(function(e){return e.default&&"\n background-color: ".concat((e.theme.interactive||b.Z.interactive).focusBackground,";\n ")})),P=t(90211),E=t(92083),A=t.n(E),C=t(66050),S=t(24224);function T(e){var n;return Object.keys((null===e||void 0===e||null===(n=e.metrics)||void 0===n?void 0:n.blocks)||{}).sort()}function L(e){var n,t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=null,o=null,l=null,c=null,u={},s=(null===e||void 0===e?void 0:e.block_runs)||[],d=(null===e||void 0===e||null===(n=e.metrics)||void 0===n?void 0:n.blocks)||{},f=(null===e||void 0===e||null===(t=e.metrics)||void 0===t?void 0:t.pipeline)||{},m=M(e);return Object.entries(d).forEach((function(e){var n,t=(0,a.Z)(e,2),s=t[0],d=t[1];if(!r||r===s){var p,v=d||{},h=v.destinations,g=void 0===h?{records_affected:null,records_inserted:null,records_updated:null}:h,b=v.sources,x=void 0===b?{records:null}:b,j=m[s]||[];if(r&&r===s&&j.every((function(e){var n=e.status;return C.V.COMPLETED===n}))&&null===i&&(i=0),null!==f&&void 0!==f&&null!==(n=f[s])&&void 0!==n&&n.record_counts)null===i&&(i=0),i+=Number(null===f||void 0===f||null===(p=f[s])||void 0===p?void 0:p.record_counts);else null!==x&&void 0!==x&&x.records&&(null===i&&(i=0),i+=Number(x.records));null!==g&&void 0!==g&&g.records_updated?(null===l&&(l=0),l+=Number(g.records_updated),null===c&&(c=0),c+=Number(g.records_updated)):null!==g&&void 0!==g&&g.records_inserted?(null===l&&(l=0),l+=Number(g.records_inserted),null===o&&(o=0),o+=Number(g.records_inserted)):null!==g&&void 0!==g&&g.records_affected&&(null===l&&(l=0),l+=Number(g.records_affected)),["destinations","sources"].forEach((function(e){var n=d[e]||{};null!==n&&void 0!==n&&n.error&&(u[s]||(u[s]={}),u[s][e]={error:null===n||void 0===n?void 0:n.error,errors:null===n||void 0===n?void 0:n.errors,message:null===n||void 0===n?void 0:n.message})}))}})),null===s||void 0===s||s.forEach((function(e){var n=e.block_uuid,t=e.metrics,r=e.status;if(C.V.FAILED===r&&null!==t&&void 0!==t&&t.error&&n){var i=n.split(":"),o=(0,a.Z)(i,3),l=(o[0],o[1]);o[2];u[l]||(u[l]={}),u[l][""]=t.error}})),{errors:u,records:i,recordsInserted:o,recordsProcessed:l,recordsUpdated:c}}function M(e){var n=e.block_runs,t={};return null===n||void 0===n||n.forEach((function(e){var n=e.block_uuid.split(":"),r=(0,a.Z)(n,3),i=(r[0],r[1]);r[2];t[i]||(t[i]=[]),t[i].push(e)})),t}function D(e){var n=M(e),t={};return Object.entries(n).forEach((function(e){var n=(0,a.Z)(e,2),r=n[0],i=n[1],o=i.filter((function(e){var n=e.status;return C.V.COMPLETED===n})),l=o.map((function(e){var n=e.completed_at,t=e.started_at,r=A().utc(n),i=A().utc(t);return r.diff(i,"second")})),c=o.length,u=i.length;t[r]={completed:c,runtime:l.length>=1?(0,S.Sm)(l)/l.length:null,total:u}})),t}function R(e){var n=e.block_runs,t=(null===n||void 0===n?void 0:n.length)||1,r=function(e){var n=(null===e||void 0===e?void 0:e.block_runs)||[];return null===n||void 0===n?void 0:n.filter((function(e){var n=e.status;return C.V.COMPLETED===n}))}(e).length||0;return r/t}function V(e){var n=e.completed_at,t=e.block_runs,r=void 0===t?[]:t,i=e.status;if(null===r||void 0===r||!r.length)return 0;var o=A().utc();if(n)o=A().utc(n);else if([p.VO.CANCELLED,p.VO.FAILED].includes(i)){var l=(0,S.YC)(r,(function(e){return e.started_at}),{ascending:!1})[0];o=A().utc(l.updated_at)}var c=A().utc(e.created_at);return o.diff(c,"second")}function z(e,n){var t,r,i,o,l,c=M(e),u=D(e),a=(null===e||void 0===e?void 0:e.metrics)||{blocks:null,pipeline:null},s=a.blocks||{},d=a.pipeline||{},f=(s[n],d[n],u[n]||{completed:null,total:null}),m=f.completed,p=f.total,v=m&&p?m/p:0,h=c[n]||[],g=h.every((function(e){var n=e.status;return C.V.COMPLETED===n})),b=(0,S.YC)(h,(function(e){return e.updated_at}),{ascending:!1})[0],x=null===(t=(0,S.YC)(h,(function(e){return e.started_at}),{ascending:!0})[0])||void 0===t?void 0:t.started_at;g?r=null===(l=(0,S.YC)(h,(function(e){return e.completed_at}),{ascending:!1})[0])||void 0===l?void 0:l.completed_at:b&&(o=null===b||void 0===b?void 0:b.updated_at);var j=g?A().utc(r||o):A().utc(),y=A().utc(x);return{completed:m,completedAt:r,done:g,progress:v,runtime:i=j.diff(y,"second"),startedAt:x,status:null===b||void 0===b?void 0:b.status,timeText:(0,P.zf)(i),total:p,updatedAt:o}}var H=t(28598);function G(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function U(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?G(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):G(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var F=function(e){var n=e.onSelect,t=e.pipelineRun,r=e.selected,i=(t.block_runs,t.created_at),o=t.status,c=(0,l.useMemo)((function(){return(null===t||void 0===t?void 0:t.metrics)||{blocks:{},destination:null,pipeline:{},source:null}}),[t]),u=((0,l.useMemo)((function(){return c.blocks||{}}),[c]),(0,l.useMemo)((function(){return c.pipeline||{}}),[c])),s=c.destination,j=c.source,y=(0,l.useMemo)((function(){return Object.keys(u).length}),[u]),Z=(0,l.useMemo)((function(){return L(t)}),[t]),N=Z.errors,O=Z.records,E=Z.recordsProcessed,A=(0,l.useMemo)((function(){return R(t)}),[t]),C=(0,l.useMemo)((function(){return[p.VO.COMPLETED].includes(o)}),[o]),S=(0,l.useMemo)((function(){return{danger:p.VO.FAILED===o,default:p.VO.INITIAL===o,primary:p.VO.RUNNING===o,success:C,warning:p.VO.CANCELLED===o}}),[C,o]),T=(0,l.useMemo)((function(){if(t){var e=V(t);return(0,P.zf)(e)}}),[t]);return(0,H.jsx)(w,U(U({},S),{},{onClick:function(){return n(r?null:t.id)},selected:r,children:(0,H.jsxs)(f.Z,{fullHeight:!0,justifyContent:"space-between",children:[(0,H.jsx)(k,U({},S)),(0,H.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,H.jsxs)(v.Z,{ml:3,py:3,children:[(0,H.jsx)(m.Z,{bold:!0,level:5,monospace:!0,children:i}),(0,H.jsx)(v.Z,{fullWidth:!1,mt:2,children:(0,H.jsx)(_,U(U({},S),{},{children:(0,H.jsxs)(f.Z,{alignItems:"center",children:[C&&(0,H.jsx)(x.Jr,{inverted:!0,size:2*I.iI}),[p.VO.INITIAL,p.VO.RUNNING].includes(o)&&(0,H.jsx)(h.Z,{color:p.VO.INITIAL!==o?b.Z.monotone.white:null,inverted:p.VO.INITIAL===o,small:!0}),"\xa0",p.VO.RUNNING===o&&(0,H.jsxs)(H.Fragment,{children:["\xa0",Math.round(100*A),"%"]}),![p.VO.INITIAL,p.VO.RUNNING].includes(o)&&p.Do[o],p.VO.INITIAL===o&&"Starting"]})}))}),Object.values(N).length>=1&&(0,H.jsx)(v.Z,{mt:1,children:Object.entries(N).map((function(e,n){var t=(0,a.Z)(e,2),r=t[0];t[1];return(0,H.jsxs)(g.ZP,{monospace:!0,muted:!0,small:!0,children:[r," stream failed"]},r)}))})]})}),(0,H.jsxs)(d.Z,{flex:1,children:[(0,H.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,H.jsxs)(v.Z,{ml:3,py:3,children:[(0,H.jsxs)(v.Z,{mb:1,children:[(0,H.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Rows processed"}),(0,H.jsx)(g.ZP,{monospace:!0,children:E>=1?(0,P.x6)(E):"-"})]}),(0,H.jsxs)(v.Z,{mb:1,children:[(0,H.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Rows remaining"}),(0,H.jsx)(g.ZP,{monospace:!0,children:O>=1&&O>=E?(0,P.x6)(O-E):"-"})]}),p.VO.RUNNING!==o&&(0,H.jsxs)(v.Z,{mb:1,children:[(0,H.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Runtime"}),(0,H.jsx)(g.ZP,{monospace:!0,children:T})]})]})}),(0,H.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,H.jsxs)(v.Z,{ml:3,py:3,children:[(0,H.jsxs)(v.Z,{mb:1,children:[(0,H.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Source"}),(0,H.jsx)(g.ZP,{monospace:!0,children:j||"-"})]}),(0,H.jsxs)(v.Z,{mb:1,children:[(0,H.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Destination"}),(0,H.jsx)(g.ZP,{monospace:!0,children:s||"-"})]}),(0,H.jsxs)(v.Z,{mb:1,children:[(0,H.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Streams"}),(0,H.jsx)(g.ZP,{monospace:!0,children:y>=1?(0,P.x6)(y):"-"})]})]})})]})]})}))},Y=t(89565),B=t.n(Y),J=t(34376),W=t(60328),X=t(10919),K=t(87815),Q=j.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-1thr560-0"})(["display:flex;flex:1;"," "," ",""],(function(e){return e.even&&e.fill&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).cyan,";\n ")}),(function(e){return e.even&&!e.fill&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).cyanTransparent,";\n ")}),(function(e){return"\n height: ".concat((e.small?1:2)*I.iI,"px;\n ")})),q=t(66653);var $=function(e){var n=e.onClickRow,t=e.pipelineRun,r=e.selectedStream,i=(0,J.useRouter)(),o=(0,l.useState)(null),c=o[0],u=o[1],s=(0,l.useState)(null),d=s[0],h=s[1],b=(0,l.useMemo)((function(){return t?M(t):{}}),[t]),j=(0,l.useMemo)((function(){return t?D(t):{}}),[t]),y=(0,l.useMemo)((function(){var e=0,n=[],t=[];if(Object.entries(j).forEach((function(r){var i=(0,a.Z)(r,2),o=(i[0],i[1]),l=o.completed,c=o.runtime,u=o.total;null===c?t.push(o):(n.push(c),e+=c*(u-l))})),0===n.length)return null;var r=(0,S.Sm)(n)/n.length;return t.forEach((function(n){var t=n.completed,i=n.total;e+=r*(i-t)})),e}),[j]),Z=(0,l.useMemo)((function(){return r?j[r]:null}),[j,r]),N=(0,l.useMemo)((function(){if(r&&j){var e=j[r]||{},n=e.completed,i=e.total;if(i>=1)return n/i}else if(t)return R(t);return 0}),[Z,t,r]),w=(0,l.useMemo)((function(){return(0,H.jsx)(f.Z,{children:(0,S.w6)(101).map((function(e,n){return(0,H.jsx)(Q,{even:n%2===0,fill:N>0&&Math.round(100*N)>=n},n)}))})}),[N]),O=(0,l.useMemo)((function(){if(r){var e=b[r]||[],n=e.every((function(e){var n=e.status;return C.V.COMPLETED===n})),i=(0,S.YC)(e,(function(e){return e.updated_at}),{ascending:!1})[0],o=null===i||void 0===i?void 0:i.status,l=Z||{},c=l.completed,u=l.runtime,a=l.total;if(n)return"Sync complete for ".concat(r);if([C.V.CANCELLED,C.V.FAILED].includes(o))return p.Do[o];if(u&&a>=1){var s=Math.ceil(u*(a-c)/60);return"".concat((0,P._6)("minute",s,!0)," to completion")}return"Estimating time remaining for stream..."}if(p.VO.COMPLETED===(null===t||void 0===t?void 0:t.status))return"Sync complete";if(t){if([p.VO.CANCELLED,p.VO.FAILED].includes(null===t||void 0===t?void 0:t.status))return p.Do[null===t||void 0===t?void 0:t.status];if(p.VO.INITIAL===(null===t||void 0===t?void 0:t.status))return"Initializing sync (this can take several minutes)";if(null===y)return"Estimating time remaining...";var d=Math.ceil(y/60);return"".concat((0,P._6)("minute",d,!0)," to completion")}return"Select a sync"}),[b,y,Z,t,r]),_=(0,l.useMemo)((function(){return t&&r?z(t,r):{completed:null,completedAt:null,done:null,progress:null,runtime:null,startedAt:null,status:null,timeText:null,total:null,updatedAt:null}}),[t,r]);(0,l.useEffect)((function(){var e;if(t){var n=V(t);u(n),e=setInterval((function(){return u((function(e){return e+1}))}),1e3)}return function(){return clearInterval(e)}}),[t]),(0,l.useEffect)((function(){var e;if(t&&r&&_){var n=(null===_||void 0===_?void 0:_.runtime)||0;h(n),e=setInterval((function(){return h((function(e){return e+1}))}),1e3)}return function(){return clearInterval(e)}}),[t,r,_]);var k=(0,l.useMemo)((function(){if(t){if(r)return null===_||void 0===_?void 0:_.timeText;var e=V(t);return(0,P.zf)(e)}}),[t,r,_]),E=(0,l.useMemo)((function(){var e=Math.floor(c%86400/3600),n=Math.floor(c%3600/60),t=Math.floor(c%60/1);return[e>=10?String(e):"0".concat(e),n>=10?String(n):"0".concat(n),t>=10?String(t):"0".concat(t)].join(":")}),[c]),A=(0,l.useMemo)((function(){var e=Math.floor(d%86400/3600),n=Math.floor(d%3600/60),t=Math.floor(d%60/1);return[e>=10?String(e):"0".concat(e),n>=10?String(n):"0".concat(n),t>=10?String(t):"0".concat(t)].join(":")}),[d]),G=(0,l.useMemo)((function(){return t?L(t):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[t]),U=G.errors,F=G.records,Y=G.recordsInserted,$=G.recordsProcessed,ee=G.recordsUpdated,ne=(0,l.useMemo)((function(){return t&&r?L(t,r):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[t,r]),te=(0,l.useMemo)((function(){var e=r?null===ne||void 0===ne?void 0:ne.records:F,n=r?null===ne||void 0===ne?void 0:ne.recordsInserted:Y,t=r?null===ne||void 0===ne?void 0:ne.recordsProcessed:$,i=r?null===ne||void 0===ne?void 0:ne.recordsUpdated:ee,o=[{label:"Rows fetched",value:null===e?"-":(0,P.x6)(e)}];return null===n&&null===i?o.push({label:"Rows processed",value:null===t?"-":(0,P.x6)(t)}):null!==n?o.push({label:"Rows inserted",value:(0,P.x6)(n)}):null!==i&&o.push({label:"Rows updated",value:(0,P.x6)(i)}),o.map((function(e){var n=e.label,t=e.value;return(0,H.jsxs)("div",{children:[(0,H.jsx)(g.ZP,{bold:!0,large:!0,muted:!0,children:n}),(0,H.jsx)(g.ZP,{headline:!0,children:t})]},n)}))}),[F,ne,Y,$,ee,k,E,status]),re=(0,l.useMemo)((function(){if(!t)return(0,H.jsx)("div",{});var e=T(t);return(0,H.jsx)(K.Z,{columnFlex:[null,null,null,null,null,null],columns:[{uuid:"Stream"},{uuid:"Start"},{uuid:"End"},{uuid:"Time"},{uuid:"Progress"},{uuid:"Logs"}],isSelectedRow:function(n){return r&&r===e[n]},onClickRow:n,rows:e.map((function(e){var n=z(t,e),r=(n.completed,n.completedAt),o=n.done,l=n.progress,c=n.startedAt,u=n.status,a=n.timeText,s=(n.total,!!U[e]);return[(0,H.jsx)(g.ZP,{danger:s,default:!s,monospace:!0,children:e},"stream"),(0,H.jsx)(g.ZP,{default:!0,monospace:!0,children:c?c.split(".")[0]:"-"},"started_at"),(0,H.jsx)(g.ZP,{default:!0,monospace:!0,children:r?r.split(".")[0]:"-"},"completed_at"),(0,H.jsx)(g.ZP,{default:!0,children:[C.V.INITIAL,C.V.RUNNING].includes(u)?"-":a},"runtime"),(0,H.jsxs)("div",{children:[o&&(0,H.jsx)(x.Jr,{default:!0,size:2*I.iI}),!o&&(0,H.jsx)(f.Z,{children:(0,S.w6)(51).map((function(e,n){return(0,H.jsx)(Q,{fill:l>0&&Math.round(50*l)>=n,even:n%2===0,small:!0},n)}))})]},"progress"),(0,H.jsx)(W.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(e){i.push("/pipelines/".concat(t.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(t.id)),(0,q.j)(e)},children:(0,H.jsx)(x.B4,{default:!0,size:2*I.iI})},"logs")]})),uuid:"".concat(null===t||void 0===t?void 0:t.id,"-streams-table")})}),[U,j,t,r]),ie=(0,l.useMemo)((function(){var e,n,i,o,l,c,u,s;if(t&&r){var d=(null===t||void 0===t?void 0:t.metrics)||{blocks:null,destination:null,pipeline:null,source:null},f=null===d||void 0===d||null===(e=d.pipeline)||void 0===e||null===(n=e[r])||void 0===n||null===(i=n.bookmarks)||void 0===i?void 0:i[r],m=null===d||void 0===d||null===(o=d.blocks)||void 0===o||null===(l=o[r])||void 0===l||null===(c=l.destinations)||void 0===c||null===(u=c.state)||void 0===u||null===(s=u.bookmarks)||void 0===s?void 0:s[r];if(f||m){var p=Array.from(new Set(Object.keys(f||{}).concat(Object.keys(m||{})))).sort(),v=[];p.forEach((function(e){var n=[(0,H.jsx)(g.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:e},e)];[f,m].forEach((function(t,r){t&&n.push((0,H.jsx)(g.ZP,{monospace:!0,small:!0,children:t[e]},"".concat(e,"-").concat(r)))})),v.push(n)}));var h=[{label:function(){return""},uuid:"column"}];return[[null===d||void 0===d?void 0:d.source,"source",f],[null===d||void 0===d?void 0:d.destination,"destination",m]].forEach((function(e){var n=(0,a.Z)(e,3),t=n[0],r=n[1];n[2]&&h.push({uuid:"".concat(t," (").concat(r,")")})})),(0,H.jsx)(K.Z,{columnFlex:[null,1,1],columns:h,rows:v,uuid:"".concat(r,"-bookmark-table")})}}}),[t,r]),oe=(0,l.useMemo)((function(){var e,n,i,o,l,c;if(t&&r){var u=(null===t||void 0===t?void 0:t.metrics)||{blocks:null,destination:null,pipeline:null,source:null},s=null===u||void 0===u||null===(e=u.blocks)||void 0===e||null===(n=e[r])||void 0===n||null===(i=n.sources)||void 0===i?void 0:i.record,d=null===u||void 0===u||null===(o=u.blocks)||void 0===o||null===(l=o[r])||void 0===l||null===(c=l.destinations)||void 0===c?void 0:c.record;if(s||d){var f=Object.keys(d||s||{}).sort(),m=[];f.forEach((function(e){var n=[(0,H.jsx)(g.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:e},e)];[s,d].forEach((function(t,r){if(t){var i=t[e],o="object"===typeof i;n.push((0,H.jsxs)(g.ZP,{monospace:!0,small:!0,textOverflow:!0,whiteSpaceNormal:!0,wordBreak:!0,children:[o&&(0,H.jsx)("pre",{children:JSON.stringify(i,null,2)}),!o&&i]},"".concat(e,"-").concat(r)))}})),m.push(n)}));var p=[{label:function(){return""},uuid:"column"}];return[[null===u||void 0===u?void 0:u.source,"source",s],[null===u||void 0===u?void 0:u.destination,"destination",d]].forEach((function(e){var n=(0,a.Z)(e,3),t=n[0],r=n[1];n[2]&&p.push({uuid:"".concat(t," (").concat(r,")")})})),(0,H.jsx)(K.Z,{columnFlex:[null,1,1],columns:p,rows:m.map((function(e){return e.map((function(e){return(0,H.jsx)(g.ZP,{default:!0,monospace:!0,children:e},e)}))})),uuid:"".concat(r,"-bookmark-table")})}}}),[t,r]),le=(0,l.useMemo)((function(){var e,n,i,o,l,c,u=null===t||void 0===t||null===(e=t.metrics)||void 0===e||null===(n=e.blocks)||void 0===n?void 0:n[r];return(null===u||void 0===u||null===(i=u.sources)||void 0===i||null===(o=i.block_tags)||void 0===o?void 0:o.destination_table)||(null===u||void 0===u||null===(l=u.destinations)||void 0===l||null===(c=l.block_tags)||void 0===c?void 0:c.destination_table)}),[t,r]);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(v.Z,{p:3,children:[r&&(0,H.jsx)(v.Z,{mb:3,children:(0,H.jsxs)(f.Z,{alignItems:"center",children:[(0,H.jsx)(X.Z,{block:!0,onClick:function(){return i.push("/pipelines/".concat(t.pipeline_uuid,"/syncs?pipeline_run_id=").concat(t.id))},preventDefault:!0,children:(0,H.jsxs)(f.Z,{alignItems:"center",children:[(0,H.jsx)(x.Xd,{default:!0,size:1.5*I.iI}),(0,H.jsx)(v.Z,{mr:1}),(0,H.jsx)(g.ZP,{default:!0,children:"Syncs"})]})}),(0,H.jsx)(v.Z,{mx:1,children:(0,H.jsx)(g.ZP,{default:!0,monospace:!0,children:"/"})}),(0,H.jsx)(g.ZP,{bold:!0,monospace:!0,children:r})]})}),(0,H.jsxs)(f.Z,{alignItems:"center",justifyContent:"space-between",children:[(0,H.jsx)(v.Z,{mr:2,my:1,children:(0,H.jsx)(m.Z,{level:5,muted:!t,children:O})}),t&&(0,H.jsx)(W.Z,{onClick:function(){return i.push("/pipelines/".concat(t.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(t.id))},small:!0,children:"Logs"})]}),(0,H.jsx)(v.Z,{mt:2,children:w}),t&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(v.Z,{mt:3,children:(0,H.jsxs)(f.Z,{justifyContent:"space-between",children:[(0,H.jsxs)("div",{children:[(0,H.jsx)(g.ZP,{bold:!0,large:!0,muted:!0,children:"Runtime"}),(0,H.jsxs)(g.ZP,{headline:!0,children:[r&&[C.V.INITIAL,C.V.RUNNING].includes(null===_||void 0===_?void 0:_.status)&&A,r&&![C.V.INITIAL,C.V.RUNNING].includes(null===_||void 0===_?void 0:_.status)&&(null===_||void 0===_?void 0:_.timeText),!r&&[p.VO.INITIAL,p.VO.RUNNING].includes(null===t||void 0===t?void 0:t.status)&&E,!r&&![p.VO.INITIAL,p.VO.RUNNING].includes(null===t||void 0===t?void 0:t.status)&&k]})]}),te]})}),Object.values(U).length>=1&&(0,H.jsxs)(v.Z,{mt:3,children:[(0,H.jsx)(m.Z,{level:5,muted:!0,children:"Errors"}),Object.entries(U).map((function(e,n){var t=(0,a.Z)(e,2),i=t[0],o=t[1];return(!r||r===i)&&(0,H.jsx)(v.Z,{mt:n>=1?1:0,children:Object.entries(o).map((function(e){var n=(0,a.Z)(e,2),t=n[0],r=n[1],o=r.error,l=r.errors,c=r.message,u=Array.isArray(o)?o.join(" "):o;return(0,H.jsxs)("div",{children:[(0,H.jsx)(v.Z,{mb:c||(null===l||void 0===l?void 0:l.length)>=1?2:0,children:(0,H.jsxs)(g.ZP,{monospace:!0,preWrap:!0,textOverflow:!0,children:[i,!!t&&(0,H.jsxs)(g.ZP,{inline:!0,monospace:!0,muted:!0,children:["\xa0(",t,")"]}),": ",(0,H.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:u&&(0,H.jsx)(B(),{children:u})})]})}),(0,H.jsx)(g.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:c}),l.map((function(e){return(0,H.jsx)(g.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))]},"".concat(i,"-").concat(t))}))},i)}))]})]})]}),t&&!r&&(0,H.jsx)(v.Z,{my:3,children:re}),t&&r&&(0,H.jsxs)(H.Fragment,{children:[le&&(0,H.jsx)(v.Z,{my:3,children:(0,H.jsxs)(v.Z,{px:3,children:[(0,H.jsx)(m.Z,{level:5,children:"Table name"}),(0,H.jsx)(v.Z,{mt:1,children:(0,H.jsx)(g.ZP,{default:!0,monospace:!0,children:le})})]})}),ie&&(0,H.jsxs)(v.Z,{my:3,children:[(0,H.jsx)(v.Z,{px:3,children:(0,H.jsx)(m.Z,{level:5,children:"Bookmarks"})}),(0,H.jsx)(v.Z,{px:1,children:ie})]}),oe&&(0,H.jsxs)(v.Z,{my:3,children:[(0,H.jsx)(v.Z,{px:3,children:(0,H.jsx)(m.Z,{level:5,children:"Sample row"})}),(0,H.jsx)(v.Z,{px:1,children:oe})]})]})]})},ee=t(82531),ne=t(59920),te=t(33766),re=t(59e3);function ie(e){var n=e.pipeline,t=n.uuid,r=ee.ZP.pipeline_runs.list({_limit:20,_offset:0,pipeline_uuid:t},{refreshInterval:5e3}).data,i=(0,l.useMemo)((function(){return(null===r||void 0===r?void 0:r.pipeline_runs)||[]}),[r]),o=(0,re.iV)(),u=(0,l.useState)(null),a=u[0],s=u[1],d=(0,l.useState)(null),f=d[0],m=d[1],p=(0,l.useState)(null),v=p[0],h=p[1];(0,l.useEffect)((function(){null!==o&&void 0!==o&&o.pipeline_run_id?h(null===i||void 0===i?void 0:i.find((function(e){return e.id===Number(o.pipeline_run_id)}))):v&&h(null),null!==o&&void 0!==o&&o.stream?m(o.stream):f&&m(null)}),[i,o,v,f]);var g=(0,l.useCallback)((function(){var e=v?T(v):[];return(0,H.jsx)($,{onClickRow:function(n){var t=e[n];(0,te.u7)({stream:f===t?null:t})},pipelineRun:v,selectedStream:f})}),[v,f]),b=(0,l.useMemo)((function(){var e="/pipelines/".concat(t,"/syncs");v&&(e="".concat(e,"?pipeline_run_id=").concat(v.id));var n=[{label:function(){return"Syncs"},linkProps:f?{as:e,href:"/pipelines/[pipeline]/syncs"}:null}];return f&&n.push({label:function(){return f}}),n}),[t,v,f]);return(0,H.jsx)(c.Z,{breadcrumbs:b,buildSidekick:g,errors:a,pageName:ne.M.SYNCS,pipeline:n,setErrors:s,title:function(e){var n=e.name;return"".concat(n," syncs")},uuid:"".concat(ne.M.SYNCS,"_").concat(t),children:i.map((function(e){var n=(null===v||void 0===v?void 0:v.id)===e.id;return(0,H.jsx)(F,{onSelect:function(e){return(0,te.u7)({pipeline_run_id:e,stream:null})},pipelineRun:e,selected:n},e.id)}))})}ie.getInitialProps=function(){var e=(0,r.Z)(o().mark((function e(n){var t;return o().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 oe=(0,u.Z)(ie)},33766:function(e,n,t){"use strict";t.d(n,{O2:function(){return d},g_:function(){return m},u7:function(){return f}});var r=t(75582),i=t(82394),o=t(34376),l=t.n(o),c=t(59e3),u=t(24224);function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var d="_offset";function f(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.preserveParams,i=n.pushHistory,o=n.replaceParams,u=(0,c.iV)(),a={};t&&t.forEach((function(e){u[e]&&(a[e]=u[e])}));var d,f=o?a:u;d=window.location.pathname;var m=i?l().push:l().replace,p=s(s({},f),e);Object.entries(e).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];"undefined"!==typeof i&&null!==i||delete p[t]}));var v=(0,c.uM)(p);v.length>=1&&(v="?".concat(v));var h="".concat(d.split("?")[0]).concat(v);return m(l().router.pathname,h,{shallow:!0})}function m(e,n,t){var i=t.addingMultipleValues,o=t.isList,l=t.itemsPerPage,c=t.pushHistory,a=void 0!==c&&c,m=t.resetLimitParams,p=s({},e);i?Object.entries(n).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];if(Array.isArray(i)){var o="".concat(t,"[]");p[o]=i.map(String)}})):o?Object.entries(n).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1],o=String(i),l="".concat(t,"[]"),c=p[l];c&&Array.isArray(c)?(c=c.map(String)).includes(o)?p[l]=(0,u.Od)(c,(function(e){return e===o})):p[l]=c.concat(o):p[l]=[o]})):p=s(s({},p),n),m&&(p._limit=l||20,p[d]=0),f(p,{pushHistory:a})}},90211:function(e,n,t){"use strict";t.d(n,{RA:function(){return s},kC:function(){return d},vg:function(){return b},kE:function(){return I},Mp:function(){return f},Pb:function(){return u},HW:function(){return j},wX:function(){return m},x6:function(){return p},_6:function(){return v},zf:function(){return x},Y6:function(){return Z},wE:function(){return N},J3:function(){return h},We:function(){return a},QV:function(){return y},C5:function(){return g}});var r=t(75582),i=t(17717),o=["aged","ancient","autumn","billowing","bitter","black","blue","bold","broken","cold","cool","crimson","damp","dark","dawn","delicate","divine","dry","empty","falling","floral","fragrant","frosty","green","hidden","holy","icy","late","lingering","little","lively","long","misty","morning","muddy","nameless","old","patient","polished","proud","purple","quiet","red","restless","rough","shy","silent","small","snowy","solitary","sparkling","spring","still","summer","throbbing","twilight","wandering","weathered","white","wild","winter","wispy","withered","young"],l=(t(92083),["bird","breeze","brook","bush","butterfly","cherry","cloud","darkness","dawn","dew","dream","dust","feather","field","fire","firefly","flower","fog","forest","frog","frost","glade","glitter","grass","haze","hill","lake","leaf","meadow","moon","morning","mountain","night","paper","pine","pond","rain","resonance","river","sea","shadow","shape","silence","sky","smoke","snow","snowflake","sound","star","sun","sun","sunset","surf","thunder","tree","violet","voice","water","water","waterfall","wave","wildflower","wind","wood"]),c=t(24224);function u(e){if(!e)return!1;try{JSON.parse(e)}catch(n){return!1}return!0}function a(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_";return e.split(" ").join(n)}function s(e){return e.split(" ").join("_")}function d(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return String((new Date).getTime()*e)}function m(e){return e.charAt(0).toLowerCase()+e.slice(1)}function p(e){if(null===e||"undefined"===typeof e)return"";var n=e.toString().split("."),t=(0,r.Z)(n,2),i=t[0],o=t[1],l=i.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");return o?"".concat(l,".").concat(o):l}function v(e,n){var t,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=n,o=void 0!==i&&null!==i;if(o||(i=2),1===i)t=e;else{var l=e.length,c=e[l-1];t="y"===c&&"day"!==e?"".concat(e.slice(0,l-1),"ies"):"".concat(e,"s"===c?"es":"s")}if(o){var u=r?p(i):i;return"".concat(u," ").concat(t)}return t}function h(e){return null===e||void 0===e?void 0:e.replace(/_/g," ")}function g(e){var n=e.length;return"ies"===e.slice(n-3,n)?"".concat(e.slice(0,n-3),"y"):"es"===e.slice(n-2,n)&&"ces"!==e.slice(n-3,n)?e.slice(0,n-2):e.slice(0,n-1)}function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return d(h(e.toLowerCase()))}function x(e){var n,t=[["second",60],["minute",60],["hour",24],["day",7],["week",4],["month",12],["year",null]];return t.forEach((function(i,o){if(!n){var l=(0,r.Z)(i,2),c=l[0],u=l[1],a=t.slice(0,o).reduce((function(e,n){return e*Number(n[1])}),1);e<Number(u)*a&&(n=v(c,Math.round(e/a)))}})),n}function j(e){return!isNaN(e)}function y(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,t=Math.pow(10,n);return Math.round((e||0)*t)/t}function Z(){return"".concat((0,c.mp)(o)," ").concat((0,c.mp)(l))}function I(e){return null===e||void 0===e?void 0:e.toLowerCase().replace(/\W+/g,"_")}function N(e){var n,t=e.split(i.sep),r=t[t.length-1].split(".");return n=1===r.length?r[0]:r.slice(0,-1).join("."),t.slice(0,t.length-1).concat(n).join(i.sep)}},59416:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/syncs",function(){return t(89745)}])}},function(e){e.O(0,[844,9902,1424,1005,7815,547,9774,2888,179],(function(){return n=59416,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[643],{90659:function(e,n,t){"use strict";var r=t(67403),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,n){var t,o,l,c,s,u,a=!1;n||(n={}),t=n.debug||!1;try{if(l=r(),c=document.createRange(),s=document.getSelection(),(u=document.createElement("span")).textContent=e,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",(function(r){if(r.stopPropagation(),n.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=i[n.format]||i.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(n.format,e);n.onCopy&&(r.preventDefault(),n.onCopy(r.clipboardData))})),document.body.appendChild(u),c.selectNodeContents(u),s.addRange(c),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");a=!0}catch(d){t&&console.error("unable to copy using execCommand: ",d),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(n.format||"text",e),n.onCopy&&n.onCopy(window.clipboardData),a=!0}catch(d){t&&console.error("unable to copy using clipboardData: ",d),t&&console.error("falling back to prompt"),o=function(e){var n=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,n)}("message"in n?n.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,e)}}finally{s&&("function"==typeof s.removeRange?s.removeRange(c):s.removeAllRanges()),u&&document.body.removeChild(u),l()}return a}},11984:function(e,n,t){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(n,"__esModule",{value:!0}),n.CopyToClipboard=void 0;var i=c(t(82684)),o=c(t(90659)),l=["text","onCopy","options","children"];function c(e){return e&&e.__esModule?e:{default:e}}function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){j(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function a(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function d(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function p(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,n){return f=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},f(e,n)}function h(e){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,r=g(e);if(n){var i=g(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return m(this,t)}}function m(e,n){if(n&&("object"===r(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function j(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var x=function(e){!function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&f(e,n)}(s,e);var n,t,r,c=h(s);function s(){var e;d(this,s);for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return j(v(e=c.call.apply(c,[this].concat(t))),"onClick",(function(n){var t=e.props,r=t.text,l=t.onCopy,c=t.children,s=t.options,u=i.default.Children.only(c),a=(0,o.default)(r,s);l&&l(r,a),u&&u.props&&"function"===typeof u.props.onClick&&u.props.onClick(n)})),e}return n=s,(t=[{key:"render",value:function(){var e=this.props,n=(e.text,e.onCopy,e.options,e.children),t=a(e,l),r=i.default.Children.only(n);return i.default.cloneElement(r,u(u({},t),{},{onClick:this.onClick}))}}])&&p(n.prototype,t),r&&p(n,r),Object.defineProperty(n,"prototype",{writable:!1}),s}(i.default.PureComponent);n.CopyToClipboard=x,j(x,"defaultProps",{onCopy:void 0,options:void 0})},64866:function(e,n,t){"use strict";var r=t(11984).CopyToClipboard;r.CopyToClipboard=r,e.exports=r},67403:function(e){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var n=document.activeElement,t=[],r=0;r<e.rangeCount;r++)t.push(e.getRangeAt(r));switch(n.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":n.blur();break;default:n=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||t.forEach((function(n){e.addRange(n)})),n&&n.focus()}}},70543:function(e,n,t){"use strict";t.d(n,{IY:function(){return o},Jf:function(){return i},NR:function(){return l},b7:function(){return r}});var r="edit",i={uuid:"All files"},o={uuid:"Files in pipeline"},l=[i,o]},2850:function(e,n,t){"use strict";t.d(n,{M:function(){return l},W:function(){return o}});var r=t(38626),i=t(3055),o=34*t(49125).iI,l=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],i.Mz)},56681:function(e,n,t){"use strict";t.d(n,{G7:function(){return Z},ZP:function(){return O},u$:function(){return x}});var r=t(75582),i=t(82394),o=t(26304),l=t(32316),c=t(22673),s=t(48952),u=t(86673),a=t(19711),d=t(87815),p=t(49125),f=t(19395),h=t(7715),m=t(28598),v=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function g(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function j(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?g(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var x=76,b={uuid:"Run details"},y={uuid:"Dependency tree"},Z=[y,b];function O(e){var n=e.height,t=e.heightOffset,i=e.pipeline,g=e.selectedRun,O=e.selectedTab,_=e.setSelectedTab,P=j({},(0,o.Z)(e,v));g?P.blockStatus=(0,f.IJ)(null===g||void 0===g?void 0:g.block_runs):P.noStatus=!0;var w=(0,h.Kn)(null===g||void 0===g?void 0:g.variables)?j({},null===g||void 0===g?void 0:g.variables):(null===g||void 0===g?void 0:g.variables)||{},S=null===g||void 0===g?void 0:g.event_variables;if(S&&(0,h.Kn)(S)&&!(0,h.Qr)(S))if((0,h.Kn)(w)&&w.hasOwnProperty("event")){var I=(0,h.Kn)(w.event)?w.event:{};w.event=j(j({},I),S)}else w.event=j({},S);var C=[];w&&JSON.stringify(w,null,2).split("\n").forEach((function(e){C.push(" ".concat(e))}));var k=g&&[["Run ID",null===g||void 0===g?void 0:g.id],["Variables",(0,m.jsx)(c.Z,{language:"json",small:!0,source:C.join("\n")},"variable_value")]],E=g&&(0,m.jsx)(u.Z,{pb:p.cd,px:p.cd,children:(0,m.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:k.map((function(e,n){var t=(0,r.Z)(e,2),i=t[0],o=t[1];return[(0,m.jsx)(a.ZP,{monospace:!0,muted:!0,children:i},"key_".concat(n)),(0,m.jsx)(a.ZP,{monospace:!0,textOverflow:!0,children:o},"val_".concat(n))]})),uuid:"LogDetail"})}),T=O&&_;return(0,m.jsxs)(m.Fragment,{children:[T&&(0,m.jsx)(u.Z,{py:p.cd,children:(0,m.jsx)(l.Z,{onClickTab:_,selectedTabUUID:null===O||void 0===O?void 0:O.uuid,tabs:Z})}),(!T||y.uuid===(null===O||void 0===O?void 0:O.uuid))&&(0,m.jsx)(s.Z,j(j({},P),{},{height:n,heightOffset:(t||0)+(T?x:0),pipeline:i})),b.uuid===(null===O||void 0===O?void 0:O.uuid)&&E]})}},58122:function(e,n,t){"use strict";t.d(n,{FS:function(){return s},JZ:function(){return a},e7:function(){return d},wx:function(){return u}});var r=t(75582),i=t(82394),o=t(93348);function l(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 c(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,i.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}function s(e){return"string"===typeof e?e:JSON.stringify(e)}function u(e,n){var t,r;return null===e||void 0===e||null===(t=e.find((function(e){var t=e.block;return n(t)})))||void 0===t||null===(r=t.variables)||void 0===r?void 0:r.map((function(e){var n=e.value;return c(c({},e),{},{value:s(n)})}))}function a(e,n){return n===o.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===o.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function d(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,r.Z)(n,2),o=t[0],l=t[1],s=l;try{s=JSON.parse(l)}catch(u){}return c(c({},e),{},(0,i.Z)({},o,s))}),{}):e}},18025:function(e,n,t){"use strict";t.d(n,{J:function(){return s},U:function(){return c}});var r=t(38626),i=t(23831),o=t(73942),l=t(49125),c=r.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-m7tlau-0"})(["border-radius:","px;border-style:solid;border-width:2px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],o.TR,14*l.iI,l.cd*l.iI,l.cd*l.iI,40*l.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||i.Z.interactive).linkPrimary,";\n ")})),s=r.default.div.withConfig({displayName:"indexstyle__DateSelectionContainer",componentId:"sc-m7tlau-1"})(["border-radius:","px;padding:","px;"," "," ",""],o.n_,l.tr,(function(e){return"\n background-color: ".concat((e.theme.interactive||i.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.absolute&&"\n position: absolute;\n z-index: 2;\n right: 0;\n top: ".concat(2.5*l.iI,"px;\n ")}),(function(e){return e.topPosition&&"\n top: -".concat(42*l.iI,"px;\n ")}))},52769:function(e,n,t){"use strict";t.d(n,{C:function(){return r}});var r="global"},2713:function(e,n,t){"use strict";var r=t(82394),i=t(44495),o=t(67971),l=t(55378),c=t(86673),s=t(19711),u=t(18025),a=t(49125),d=t(24224),p=t(28598);function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function h(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.selectedDate,t=e.selectedTime,r=e.setSelectedDate,f=e.setSelectedTime,m=e.topPosition;return(0,p.jsxs)(u.J,{absolute:!0,topPosition:m,children:[(0,p.jsx)(i.ZP,{onChange:r,value:n}),(0,p.jsx)(c.Z,{mb:2}),(0,p.jsxs)(o.Z,{alignItems:"center",children:[(0,p.jsx)(s.ZP,{default:!0,large:!0,children:"Time (UTC):"}),(0,p.jsx)(c.Z,{pr:2}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{hour:e.target.value})}))},paddingRight:5*a.iI,placeholder:"HH",value:null===t||void 0===t?void 0:t.hour,children:(0,d.m5)(24,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"hour_".concat(e))}))}),(0,p.jsx)(c.Z,{px:1,children:(0,p.jsx)(s.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{minute:e.target.value})}))},paddingRight:5*a.iI,placeholder:"MM",value:null===t||void 0===t?void 0:t.minute,children:(0,d.m5)(60,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"minute_".concat(e))}))})]})]})}},22673:function(e,n,t){"use strict";var r=t(82684),i=t(68792),o=t(31811),l=t(38626),c=t(65292),s=t(23831),u=t(2005),a=t(49125),d=t(28598);n.Z=function(e){var n=e.language,t=e.maxWidth,p=e.showLineNumbers,f=e.small,h=e.source,m=e.wrapLines,v=(0,r.useContext)(l.ThemeContext);function g(e){var r=e.value;return(0,d.jsx)(o.Z,{customStyle:{backgroundColor:(v.background||s.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:u.Vp,fontSize:f?12:14,marginBottom:0,marginTop:0,maxWidth:t,paddingBottom:2*a.iI,paddingTop:2*a.iI},language:n,lineNumberStyle:{color:(v.content||s.Z.content).muted},showLineNumbers:p,style:c._4,useInlineStyles:!0,wrapLines:m,children:r})}return(0,d.jsx)(i.D,{components:{code:function(e){var n=e.children;return(0,d.jsx)(g,{value:n})}},children:h})}},65730:function(e,n,t){"use strict";var r,i=t(82394),o=(t(82684),t(64866)),l=t(21764),c=t(67971),s=t(10919),u=t(86673),a=t(19711),d=t(46261),p=t(10503),f=t(49125),h=t(28598);function m(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function v(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?m(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}!function(e){e.LEFT="left",e.RIGHT="right"}(r||(r={})),n.Z=function(e){var n,t=e.children,i=e.copiedText,m=e.iconPosition,g=void 0===m?r.LEFT:m,j=e.inverted,x=e.linkProps,b=e.linkText,y=e.monospace,Z=e.muted,O=e.small,_=e.toastMessage,P=e.withCopyIcon;return t?n=(0,h.jsx)("span",{children:t}):P&&(n=(0,h.jsx)(s.Z,v(v({href:"#",inline:!0,muted:Z,preventDefault:!0,sameColorAsText:!0,small:O},x),{},{children:(0,h.jsxs)(c.Z,{alignItems:"center",children:[g===r.LEFT&&(0,h.jsx)(u.Z,{mr:b?1:0,children:(0,h.jsx)(c.Z,{alignItems:"center",children:(0,h.jsx)(p.CK,{inverted:j,muted:Z,size:2*f.iI})})}),b&&(0,h.jsx)(a.ZP,{inverted:j,monospace:y,muted:Z,small:O,children:b}),g===r.RIGHT&&(0,h.jsx)(u.Z,{ml:b?1:0,children:(0,h.jsx)(c.Z,{alignItems:"center",children:(0,h.jsx)(p.CK,{inverted:j,muted:Z})})})]})}))),(0,h.jsx)(d.Z,{block:!0,label:"Copy",size:null,widthFitContent:!0,children:(0,h.jsx)(o.CopyToClipboard,{onCopy:function(){return l.Am.success(_||"Successfully copied to clipboard.",{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:i})},text:i,children:n})})}},32316:function(e,n,t){"use strict";t.d(n,{Z:function(){return v}});var r=t(82684),i=t(60328),o=t(67971),l=t(882),c=t(86673),s=t(19711),u=t(99994),a=t(38626),d=t(49125),p=t(37391),f=a.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),h=t(66653),m=t(28598);var v=function(e){var n=e.allowScroll,t=e.compact,a=e.contained,p=e.noPadding,v=e.onClickTab,g=e.regularSizeText,j=e.selectedTabUUID,x=e.small,b=e.tabs,y=(0,r.useMemo)((function(){var e=b.length,n=[];return b.forEach((function(r,a){var p=r.Icon,f=r.IconSelected,b=r.label,y=r.uuid,Z=y===j,O=Z&&f||p,_=b?b():y,P=(0,m.jsxs)(o.Z,{alignItems:"center",children:[O&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(O,{default:!Z,size:2*d.iI}),(0,m.jsx)(c.Z,{mr:1})]}),(0,m.jsx)(s.ZP,{bold:!0,default:!Z,noWrapping:!0,small:!g,children:_})]});a>=1&&e>=2&&n.push((0,m.jsx)("div",{style:{marginLeft:1.5*d.iI}},"spacing-".concat(y))),Z?n.push((0,m.jsx)(l.Z,{backgroundGradient:u.yr,backgroundPanel:!0,borderLess:!0,borderWidth:2,compact:t||x,onClick:function(e){(0,h.j)(e),v(r)},paddingUnitsHorizontal:1.75,paddingUnitsVertical:1.25,small:x,children:P},y)):n.push((0,m.jsx)("div",{style:{padding:2},children:(0,m.jsx)(i.Z,{borderLess:!0,compact:t||x,default:!0,onClick:function(e){(0,h.j)(e),v(r)},outline:!0,small:x,children:P})},"button-tab-".concat(y)))})),n}),[t,v,j,x,b]),Z=(0,m.jsx)(o.Z,{alignItems:"center",children:y});return a?Z:(0,m.jsx)(f,{allowScroll:n,noPadding:p,children:Z})}},70422:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Ue}});var r,i=t(75582),o=t(77837),l=t(82394),c=t(38860),s=t.n(c),u=t(82684),a=t(83455),d=t(34376),p=t(60328),f=t(34744),h=t(67971),m=t(87372),v=t(10919),g=t(51099),j=t(60547),x=t(97496),b=t(47409),y=t(93348),Z=t(52769),O=t(55378),_=t(86673),P=t(54283),w=t(87815),S=t(19711),I=t(46261),C=t(82531),k=t(56681),E=t(2850),T=t(86422),D=t(10503),N=t(49125),M=t(59920),R=t(24224);!function(e){e.AWS="aws_event"}(r||(r={}));var A=[{label:function(){return"AWS"},uuid:r.AWS}],U=(0,R.HK)(A,(function(e){return e.uuid})),F=t(66050),H=t(58122),z=t(19395),L=t(25958),q=t(33766),V=t(7715),W=t(9736),X=t(96510),J=t(66653),B=t(59e3),K=t(28598);function G(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Y(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?G(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):G(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Q=function(e){var n=e.errors,t=e.fetchPipelineSchedule,r=e.pipeline,o=e.pipelineSchedule,l=e.setErrors,c=e.variables,s=(0,d.useRouter)(),A=(0,W.Ct)(),G=(r||{}).uuid,Q=o||{},$=Q.id,ee=Q.event_matchers,ne=Q.name,te=Q.schedule_interval,re=Q.schedule_type,ie=Q.settings,oe=Q.sla,le=Q.start_time,ce=Q.status,se=Q.variables,ue=void 0===se?{}:se,ae=(0,B.iV)(),de={_limit:30,_offset:30*(null!==ae&&void 0!==ae&&ae.page?ae.page:0)};null!==ae&&void 0!==ae&&ae.status&&(de.status=ae.status);var pe=C.ZP.pipeline_runs.pipeline_schedules.list($,de,{refreshInterval:3e3,revalidateOnFocus:!0}),fe=pe.data,he=pe.mutate,me=(0,u.useMemo)((function(){return(null===fe||void 0===fe?void 0:fe.pipeline_runs)||[]}),[fe]),ve=(0,u.useMemo)((function(){var e;return(null===fe||void 0===fe||null===(e=fe.metadata)||void 0===e?void 0:e.count)||[]}),[fe]),ge=(0,u.useState)(null),je=ge[0],xe=ge[1],be=(0,u.useMemo)((function(){var e=null!==ae&&void 0!==ae&&ae.page?ae.page:0;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(x.Z,{fetchPipelineRuns:he,onClickRow:function(e){return xe((function(n){var t=me[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipelineRuns:me,selectedRun:je,setErrors:l}),(0,K.jsx)(_.Z,{p:2,children:(0,K.jsx)(g.Z,{maxPages:9,onUpdate:function(e){var n=Number(e),t=Y(Y({},ae),{},{page:n>=0?n:0});s.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(G,"/triggers/").concat($,"?").concat((0,B.uM)(t)))},page:Number(e),totalPages:Math.ceil(ve/30)})})]})}),[he,me,$,G,ae,s,je,l,ve]),ye=(0,u.useState)(k.G7[0]),Ze=ye[0],Oe=ye[1],_e=(0,a.Db)((function(e){return C.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:(0,V.gR)(e,["id"])})}),{onSuccess:function(e){return(0,X.wD)(e,{callback:function(){t()},onErrorCallback:function(e,n){return l({errors:n,response:e})}})}}),Pe=(0,i.Z)(_e,2),we=Pe[0],Se=Pe[1].isLoading,Ie=C.ZP.pipeline_triggers.pipelines.list(G),Ce=Ie.data,ke=Ie.mutate,Ee=(0,u.useMemo)((function(){return(0,R.HK)((null===Ce||void 0===Ce?void 0:Ce.pipeline_triggers)||[],(function(e){return e.name}))}),[Ce]),Te=(0,u.useMemo)((function(){return!(null===Ee||void 0===Ee||!Ee[null===o||void 0===o?void 0:o.name])}),[o,Ee]),De=(0,a.Db)(C.ZP.pipeline_triggers.pipelines.useCreate(G),{onSuccess:function(e){return(0,X.wD)(e,{callback:function(){ke()},onErrorCallback:function(e,n){return l({errors:n,response:e})}})}}),Ne=(0,i.Z)(De,2),Me=Ne[0],Re=Ne[1].isLoading,Ae=(0,u.useMemo)((function(){return y.fq.ACTIVE===ce}),[ce]),Ue=(0,u.useMemo)((function(){var e,n,t={default:!0,size:1.5*N.iI},r=[[(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(D.VW,Y({},t)),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"Trigger type"})]},"trigger_type_label"),(0,K.jsx)(S.ZP,{monospace:!0,children:null===(e=y.Z4[re])||void 0===e?void 0:e.call(y.Z4)},"trigger_type")],[(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(D.rs,Y({},t)),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"Status"})]},"trigger_status_label"),(0,K.jsx)(S.ZP,{danger:!Ae,monospace:!0,success:Ae,children:ce},"trigger_status")]];if(oe){var i=(0,z.gU)(oe),o=i.time,l=i.unit,c=1===o?l:"".concat(l,"s");r.push([(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(D.kI,Y({},t)),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"SLA"})]},"trigger_sla_label"),(0,K.jsx)(S.ZP,{monospace:!0,children:"".concat(o," ").concat(c)},"trigger_sla")])}(te&&r.push([(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(D.Pf,Y({},t)),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"Frequency"})]},"trigger_frequency_label"),(0,K.jsx)(S.ZP,{monospace:!0,children:te.replace("@","")},"trigger_frequency")]),le&&r.push([(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(D.aw,Y({},t)),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"Start date"})]},"trigger_start_date_label"),(0,K.jsx)(S.ZP,{monospace:!0,children:le},"trigger_start_date")]),null!==ie&&void 0!==ie&&ie.skip_if_previous_running)&&r.push([(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(I.Z,{default:!0,label:"Skip current run if any previous runs are still in progress",size:1.5*N.iI,widthFitContent:!0}),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"Skip if running"})]},"trigger_skip_if_running"),(0,K.jsx)(S.ZP,{monospace:!0,children:null===(n=ie.skip_if_previous_running)||void 0===n?void 0:n.toString()},"trigger_skip_if_running_label")]);return null!==ie&&void 0!==ie&&ie.allow_blocks_to_fail&&r.push([(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(I.Z,{default:!0,label:"Trigger runs will continue running blocks if other unrelated blocks fail",size:1.5*N.iI,widthFitContent:!0}),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"Allow blocks to fail"})]},"trigger_allow_blocks_to_fail"),(0,K.jsx)(S.ZP,{monospace:!0,children:ie.allow_blocks_to_fail.toString()},"trigger_allow_blocks_to_fail_label")]),(0,K.jsx)(w.Z,{columnFlex:[null,1],rows:r})}),[Ae,te,re,ie,oe,le,ce]),Fe=(0,u.useMemo)((function(){return ue||{}}),[ue]),He=(0,u.useMemo)((function(){var e,n=[];return(0,V.Qr)(Fe)?n=(0,H.wx)(c,(function(e){return e.uuid===Z.C})):Object.entries(Fe).forEach((function(e){var t=(0,i.Z)(e,2),r=t[0],o=t[1];b.sZ!==r&&n.push({uuid:r,value:(0,H.FS)(o)})})),"undefined"!==typeof(n=(0,H.JZ)(n||[],re))&&null!==(e=n)&&void 0!==e&&e.length?(0,K.jsx)(w.Z,{columnFlex:[null,1],rows:n.map((function(e){var n=e.uuid,t=e.value;return[(0,K.jsx)(S.ZP,{default:!0,monospace:!0,small:!0,children:n},"settings_variable_label_".concat(n)),(0,K.jsx)(S.ZP,{monospace:!0,small:!0,children:t},"settings_variable_".concat(n))]}))}):null}),[re,Fe,c]),ze=(0,u.useMemo)((function(){var e,n,t=[],i=null===Fe||void 0===Fe||null===(e=Fe[b.sZ])||void 0===e?void 0:e.blocks;return null===r||void 0===r||null===(n=r.blocks)||void 0===n||n.forEach((function(e){var n=e.type,r=e.uuid;if(T.tf.DBT===n){var o,l=(null===i||void 0===i||null===(o=i[r])||void 0===o?void 0:o.configuration)||{},c=l.flags,s=l.prefix,u=l.suffix,a=(0,L.IU)(e).name;(c||s||u)&&t.push({flags:c,prefix:s,suffix:u,uuid:a})}})),"undefined"!==typeof t&&null!==t&&void 0!==t&&t.length?(0,K.jsx)(w.Z,{columnFlex:[1,null],rows:t.map((function(e){var n=e.flags,t=e.prefix,r=e.suffix,i=e.uuid;return[(0,K.jsxs)(S.ZP,{monospace:!0,small:!0,children:[t&&(0,K.jsx)(S.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:t}),i,r&&(0,K.jsx)(S.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:r})]},"settings_variable_label_".concat(i)),(0,K.jsx)(S.ZP,{monospace:!0,muted:!0,small:!0,children:n&&n.join(", ")},"settings_variable_".concat(i))]}))}):null}),[r,Fe]),Le=(0,u.useMemo)((function(){return(0,K.jsx)(w.Z,{columnFlex:[null,1],columns:[{uuid:"Provider"},{uuid:"Event"}],rows:null===ee||void 0===ee?void 0:ee.map((function(e,n){var t=e.event_type,r=e.name;return[(0,K.jsx)(S.ZP,{default:!0,monospace:!0,children:U[t].label()},"".concat(t,"_").concat(n,"_label")),(0,K.jsx)(S.ZP,{monospace:!0,children:r},"".concat(t,"_").concat(n,"_name"))]}))})}),[ee]);return(0,K.jsxs)(j.Z,{afterHidden:!je,before:(0,K.jsxs)(E.M,{children:[(0,K.jsxs)(_.Z,{mb:N.HN,pt:N.cd,px:N.cd,children:[(0,K.jsxs)(_.Z,{mb:N.cd,children:[y.Xm.TIME===re&&(0,K.jsx)(D.kO,{size:5*N.iI}),y.Xm.EVENT===re&&(0,K.jsx)(D.Jp,{size:5*N.iI}),y.Xm.API===re&&(0,K.jsx)(D.Bf,{size:5*N.iI}),!re&&(0,K.jsx)(D.VW,{size:5*N.iI})]}),(0,K.jsx)(m.Z,{children:ne})]}),(0,K.jsx)(_.Z,{px:N.cd,children:(0,K.jsx)(m.Z,{level:5,children:"Settings"})}),(0,K.jsx)(f.Z,{light:!0,mt:1,short:!0}),Ue,(null===ee||void 0===ee?void 0:ee.length)>=1&&(0,K.jsxs)(_.Z,{my:N.HN,children:[(0,K.jsx)(_.Z,{px:N.cd,children:(0,K.jsx)(m.Z,{level:5,children:"Events"})}),(0,K.jsx)(f.Z,{light:!0,mt:1,short:!0}),Le]}),He&&(0,K.jsxs)(_.Z,{my:N.HN,children:[(0,K.jsx)(_.Z,{px:N.cd,children:(0,K.jsx)(m.Z,{level:5,children:"Runtime variables"})}),(0,K.jsx)(f.Z,{light:!0,mt:1,short:!0}),He]}),ze&&(0,K.jsxs)(_.Z,{my:N.HN,children:[(0,K.jsx)(_.Z,{px:N.cd,children:(0,K.jsx)(m.Z,{level:5,children:"dbt runtime settings"})}),(0,K.jsx)(f.Z,{light:!0,mt:1,short:!0}),ze]}),(0,K.jsx)(_.Z,{my:N.HN,children:(0,K.jsxs)(_.Z,{px:N.cd,children:[(0,K.jsxs)(m.Z,{level:5,children:[Te&&"Trigger exists in code",!Te&&"Store trigger in code"]}),(0,K.jsx)(_.Z,{mt:1,children:(0,K.jsxs)(S.ZP,{default:!0,children:["Save or update the trigger and its settings in the pipeline\u2019s metadata and version control the trigger using Git. For more information, please read the ",(0,K.jsx)(v.Z,{href:"https://docs.mage.ai/guides/triggers/configure-triggers-in-code",openNewWindow:!0,children:"documentation"}),"."]})}),(0,K.jsxs)(_.Z,{mt:N.cd,children:[!Ce&&(0,K.jsx)(P.Z,{inverted:!0}),Ce&&(0,K.jsxs)(p.Z,{disabled:!(null!==o&&void 0!==o&&o.id),loading:Re,onClick:function(){Me({pipeline_trigger:{pipeline_schedule_id:null===o||void 0===o?void 0:o.id}})},secondary:!0,children:[Te&&"Update trigger in code",!Te&&"Save trigger in code"]})]})]})})]}),beforeWidth:E.W,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(G,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return ne},linkProps:{as:"/pipelines/".concat(G,"/triggers/").concat($),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],buildSidekick:function(e){return(0,k.ZP)(Y(Y({},e),{},{selectedRun:je,selectedTab:Ze,setSelectedTab:Oe}))},errors:n,pageName:M.M.TRIGGERS,pipeline:r,setErrors:l,subheader:(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(p.Z,{beforeIcon:Ae?(0,K.jsx)(D.dz,{size:2*N.iI}):(0,K.jsx)(D.Py,{inverted:!A,size:2*N.iI}),danger:Ae&&!A,loading:Se,onClick:function(e){(0,J.j)(e),we({id:$,status:Ae?y.fq.INACTIVE:y.fq.ACTIVE})},outline:!0,success:!Ae&&!A,children:Ae?"Pause trigger":"Start trigger"}),(0,K.jsx)(_.Z,{mr:N.cd}),!A&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(p.Z,{linkProps:{as:"/pipelines/".concat(G,"/triggers/").concat($,"/edit"),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Edit trigger"}),(0,K.jsx)(_.Z,{mr:N.cd})]}),(0,K.jsxs)(O.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?s.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(G,"/triggers/").concat($)):(0,q.u7)({page:0,status:e.target.value})},paddingRight:4*N.iI,placeholder:"Select run status",value:(null===ae||void 0===ae?void 0:ae.status)||"all",children:[(0,K.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),Object.values(F.V).map((function(e){return(0,K.jsx)("option",{value:e,children:b.Do[e]},e)}))]})]}),title:function(){return ne},uuid:"triggers/detail",children:[(0,K.jsx)(_.Z,{mt:N.cd,px:N.cd,children:(0,K.jsx)(m.Z,{level:5,children:"Runs for this trigger"})}),(0,K.jsx)(f.Z,{light:!0,mt:N.cd,short:!0}),be]})},$=t(21831),ee=t(21764),ne=t(2713),te=t(38341),re=t(47999),ie=t(22673),oe=t(65730),le=t(38626),ce=t(16634),se=t(82944),ue=t(44162);function ae(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 de(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ae(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ae(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var pe=function(e){var n=e.blocks,t=e.updateVariables,r=e.variables,i=(0,u.useContext)(le.ThemeContext),o=(0,u.useCallback)((function(e,n){return t((function(){var t=(null===r||void 0===r?void 0:r.__mage_variables)||{},i=(null===t||void 0===t?void 0:t.blocks)||{},o=i[e]||{},c=(null===o||void 0===o?void 0:o.configuration)||{};return de(de({},r),{},{__mage_variables:de(de({},t),{},{blocks:de(de({},i),{},(0,l.Z)({},e,de(de({},o),{},{configuration:de(de({},c),n)})))})})}))}),[t,r]);return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(m.Z,{children:"dbt runtime settings"}),(0,K.jsx)(_.Z,{mt:N.Mq,children:(0,K.jsx)(w.Z,{columnFlex:[1,null,null,null],columns:[{uuid:"Block"},{uuid:"Flags"},{uuid:"Prefix"},{uuid:"Suffix"}],compact:!0,rows:null===n||void 0===n?void 0:n.map((function(e){var n,t,l,c=e.type,s=e.uuid,u=(0,L.IU)(e).name,a=(0,ue.qn)(c,{blockColor:e.color,theme:i}).accent,d=null===r||void 0===r||null===(n=r.__mage_variables)||void 0===n||null===(t=n.blocks)||void 0===t||null===(l=t[s])||void 0===l?void 0:l.configuration,p=d||{},f=p.prefix,m=p.suffix,v=(null===d||void 0===d?void 0:d.flags)||[],g=!(null===v||void 0===v||!v.includes(L.Dy));return[(0,K.jsx)(I.Z,{block:!0,label:(0,K.jsx)(S.ZP,{monospace:!0,small:!0,children:s}),size:null,widthFitContent:!0,children:(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(ce.Z,{color:a,size:1.5*N.iI,square:!0}),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsxs)(S.ZP,{monospace:!0,small:!0,children:[f&&(0,K.jsx)(S.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:f}),u,m&&(0,K.jsx)(S.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:m})]})]})},"uuid-".concat(s)),(0,K.jsx)(h.Z,{alignItems:"center",children:(0,K.jsx)(te.Z,{checked:g,label:L.Dy,monospace:!0,onClick:function(){return o(s,{flags:g?(0,R.Od)(v,(function(e){return L.Dy===e})):v.concat(L.Dy)})},small:!0})},"flags-".concat(s)),(0,K.jsx)(se.Z,{compact:!0,monospace:!0,onChange:function(e){return o(s,{prefix:e.target.value})},placeholder:"N+, +",small:!0,value:f,width:10*N.iI},"prefix-".concat(s)),(0,K.jsx)(se.Z,{compact:!0,monospace:!0,onChange:function(e){return o(s,{suffix:e.target.value})},placeholder:"+, +N",small:!0,value:m,width:10*N.iI},"suffix-".concat(s))]}))})})]})},fe=t(93461),he=t(26304),me=t(23831),ve=t(2005),ge=t(31012),je=["children","large","lineHeight","ordered"];function xe(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 be(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?xe(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ye=(0,le.css)([""," "," "," "," "," "," "," "," "," ",""],(function(e){return!e.muted&&"\n color: ".concat((e.theme.content||me.Z.content).default,";\n ")}),(function(e){return e.muted&&"\n color: ".concat((e.theme.content||me.Z.content).muted,";\n ")}),(function(e){return e.inverted&&"\n color: ".concat((e.theme.content||me.Z.content).inverted,";\n ")}),(function(e){return e.color&&"\n color: ".concat(e.color,";\n ")}),(function(e){return!e.monospace&&"\n font-family: ".concat(ve.ry,";\n ")}),(function(e){return e.monospace&&"\n font-family: ".concat(ve.Vp,";\n ")}),(function(e){return e.large&&"\n ".concat(ge.x_,"\n ")}),(function(e){return!e.large&&!e.small&&"\n ".concat(ge.i3,"\n ")}),(function(e){return e.small&&"\n ".concat(ge.J5,"\n ")}),(function(e){return e.lineHeight&&"\n line-height: ".concat(e.lineHeight,"px !important;\n ")})),Ze=le.default.ul.withConfig({displayName:"List__UnorderedListStyle",componentId:"sc-1f6yhbi-0"})(["",""],ye),Oe=le.default.ol.withConfig({displayName:"List__OrderedListStyle",componentId:"sc-1f6yhbi-1"})(["",""],ye),_e=le.default.li.withConfig({displayName:"List__ListItemStyle",componentId:"sc-1f6yhbi-2"})(["",""],(function(e){return e.large&&e.marginTop&&"\n margin-top: ".concat(1*N.iI,"px;\n ")}));var Pe=function(e){var n=e.children,t=e.large,r=e.lineHeight,i=e.ordered,o=(0,he.Z)(e,je),l=i?Oe:Ze;return(0,K.jsx)(l,be(be({large:t,lineHeight:r},o),{},{children:u.Children.map(n,(function(e,n){var r;return(0,K.jsx)(_e,be(be({large:t,marginTop:n>=1},o),{},{children:u.cloneElement(e)}),(null===(r=e.props)||void 0===r?void 0:r.key)||n)}))}))},we=t(98781),Se=t(70902),Ie=t(18025);function Ce(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 ke(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ce(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ce(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ee=function(e){var n=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:y.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:y.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:y.Xm.API}];return e?n.slice(0,1):n};var Te=function(e){var n=e.errors,t=e.fetchPipelineSchedule,r=e.pipeline,o=e.pipelineSchedule,c=e.setErrors,s=e.variables,g=(0,d.useRouter)(),x=null===r||void 0===r?void 0:r.uuid,P=null===o||void 0===o?void 0:o.id,I=(null===r||void 0===r?void 0:r.type)===we.qL.STREAMING,k=(0,u.useState)([]),E=k[0],U=k[1],F=(0,u.useState)(!1),L=F[0],q=F[1],W=(0,u.useState)(!1),J=W[0],B=W[1],G=(0,u.useState)(),Y=G[0],Q=G[1],le=(0,u.useState)({}),ce=le[0],ue=le[1],ae=(0,u.useState)(null),de=ae[0],he=ae[1],me=(0,u.useState)(!1),ve=me[0],ge=me[1],je=(0,u.useState)(null),xe=je[0],be=je[1],ye=(0,u.useMemo)((function(){return(0,H.wx)(s,(function(e){return e.uuid===Z.C}))}),[s]),Ze=de||{},Oe=Ze.name,_e=Ze.schedule_interval,Ce=Ze.schedule_type,Te=Ze.settings,De=void 0===Te?{}:Te,Ne=(Ze.sla,Ze.start_time),Me=Ze.variables,Re=void 0===Me?{}:Me;(0,u.useEffect)((function(){De&&Q(De)}),[De]);var Ae=(0,u.useState)(null),Ue=Ae[0],Fe=Ae[1],He=(0,u.useState)({hour:"00",minute:"00"}),ze=He[0],Le=He[1],qe=C.ZP.event_rules.detail(y.Xm.EVENT===Ce?"aws":null).data,Ve=(0,u.useMemo)((function(){var e;return(null===qe||void 0===qe||null===(e=qe.event_rule)||void 0===e?void 0:e.rules)||[]}),[qe]),We=(0,u.useMemo)((function(){return(0,R.HK)(Ve,(function(e){return e.name}))}),[Ve]),Xe=(0,a.Db)(C.ZP.pipeline_schedules.useUpdate(P),{onSuccess:function(e){return(0,X.wD)(e,{callback:function(){t(),g.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(x,"/triggers/").concat(P))},onErrorCallback:function(e,n){return c({errors:n,response:e})}})}}),Je=(0,i.Z)(Xe,2),Be=Je[0],Ke=Je[1].isLoading,Ge=(0,u.useMemo)((function(){return Re||{}}),[Re]);(0,u.useEffect)((function(){if(Ne){var e=Ne.split(" ")[1];Fe((0,z.eI)(Ne)),Le({hour:e.substring(0,2),minute:e.substring(3,5)})}else{var n=new Date;Fe(n),Le({hour:String(n.getUTCHours()).padStart(2,"0"),minute:String(n.getUTCMinutes()).padStart(2,"0")})}}),[Ne]),(0,u.useEffect)((function(){Ge&&Object.keys(Ge).length>0&&q(!0)}),[Ge]),(0,u.useEffect)((function(){ue(L?null===ye||void 0===ye?void 0:ye.reduce((function(e,n){var t=n.uuid,r=n.value;return ke(ke({},e),{},(0,l.Z)({},t,Ge[t]||r))}),{}):null)}),[ye,L,Ge]);var Ye=(0,u.useMemo)((function(){return _e&&!Object.values(y.U5).includes(_e)}),[_e]);(0,u.useEffect)((function(){if(o&&!de){U(o.event_matchers),(null===o||void 0===o?void 0:o.schedule_interval)&&!Object.values(y.U5).includes(null===o||void 0===o?void 0:o.schedule_interval)?(be(null===o||void 0===o?void 0:o.schedule_interval),he(ke(ke({},o),{},{schedule_interval:"custom"}))):he(I?ke(ke({},o),{},{schedule_interval:y.U5.ONCE}):o);var e=o.sla;if(e){B(!0);var n=(0,z.gU)(e),t=n.time,r=n.unit;he((function(e){return ke(ke({},e),{},{slaAmount:t,slaUnit:r})}))}}}),[I,o,de,_e]);var Qe=(0,u.useCallback)((function(){var e=ke(ke({},(0,V.GL)(de,["name","schedule_type"])),{},{event_matchers:[],schedule_interval:null,start_time:null,variables:(0,H.e7)(ce)});if(y.Xm.EVENT===de.schedule_type?e.event_matchers=E:(e.schedule_interval=Ye?xe:de.schedule_interval,e.start_time=Ue&&null!==ze&&void 0!==ze&&ze.hour&&null!==ze&&void 0!==ze&&ze.minute?"".concat(Ue.toISOString().split("T")[0]," ").concat(null===ze||void 0===ze?void 0:ze.hour,":").concat(null===ze||void 0===ze?void 0:ze.minute,":00"):null),J){var n=null===de||void 0===de?void 0:de.slaAmount,t=null===de||void 0===de?void 0:de.slaUnit;if(!n||isNaN(n)||!t)return void ee.Am.error("Please enter a valid SLA",{position:ee.Am.POSITION.BOTTOM_RIGHT,toastId:"sla_error"});e.sla=(0,z.vJ)(n,t)}else null!==o&&void 0!==o&&o.sla&&(e.sla=0);e.settings=Y,Be({pipeline_schedule:e})}),[xe,Ue,J,E,Ye,o,ce,de,Y,ze,Be]),$e=(0,u.useMemo)((function(){var e=[[(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(D.KJ,{default:!0,size:1.5*N.iI}),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_detail"),(0,K.jsx)(se.Z,{monospace:!0,onChange:function(e){e.preventDefault(),he((function(n){return ke(ke({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:Oe},"trigger_name_input_detail")],[(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(D.Pf,{default:!0,size:1.5*N.iI}),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"Frequency"})]},"frequency"),(0,K.jsxs)("div",{children:[(0,K.jsxs)(O.Z,{monospace:!0,onChange:function(e){e.preventDefault();var n=e.target.value;he((function(e){return ke(ke({},e),{},{schedule_interval:n})}))},placeholder:"Choose the frequency to run",value:_e,children:[Object.values(y.U5).map((function(e){return(0,K.jsx)("option",{value:e,children:e.substring(1)},e)})),(0,K.jsx)("option",{value:"custom",children:"custom"},"custom")]}),(0,K.jsx)(_.Z,{mt:1,p:1,children:(0,K.jsxs)(S.ZP,{muted:!0,small:!0,children:["If you don\u2019t see the frequency option you need, select ",(0,K.jsx)(S.ZP,{inline:!0,monospace:!0,small:!0,children:"custom"})," and enter CRON syntax."]})})]},"frequency_input")],[(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(D.aw,{default:!0,size:1.5*N.iI}),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"Start date and time"})]},"start_time"),(0,K.jsxs)("div",{style:{minHeight:"".concat(5.75*N.iI,"px")},children:[!ve&&(0,K.jsx)(se.Z,{monospace:!0,onClick:function(){return ge((function(e){return!e}))},placeholder:"YYYY-MM-DD HH:MM",value:Ue?"".concat(Ue.toISOString().split("T")[0]," ").concat(null===ze||void 0===ze?void 0:ze.hour,":").concat(null===ze||void 0===ze?void 0:ze.minute):""}),(0,K.jsx)("div",{style:{width:"400px"},children:(0,K.jsx)(re.Z,{disableEscape:!0,onClickOutside:function(){return ge(!1)},open:ve,style:{position:"relative"},children:(0,K.jsx)(ne.Z,{selectedDate:Ue,selectedTime:ze,setSelectedDate:Fe,setSelectedTime:Le,topPosition:!0})})})]},"start_time_input")]];return I&&e.splice(1,1),Ye&&e.splice(2,0,[(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(D.EK,{default:!0,size:1.5*N.iI}),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"Cron expression"})]},"cron_expression"),(0,K.jsxs)("div",{children:[(0,K.jsx)(se.Z,{monospace:!0,onChange:function(e){e.preventDefault(),be(e.target.value)},placeholder:"* * * * *",value:xe}),(0,K.jsxs)(_.Z,{mt:1,p:1,children:[(0,K.jsxs)(S.ZP,{muted:!0,small:!0,children:["If you want this pipeline to trigger every 1 minute, the CRON syntax is ",(0,K.jsx)(S.ZP,{inline:!0,monospace:!0,small:!0,children:"*/1 * * * *"}),"."]}),(0,K.jsxs)(S.ZP,{muted:!0,small:!0,children:["For more CRON syntax examples, check out this ",(0,K.jsx)(v.Z,{href:"https://crontab.guru/",openNewWindow:!0,small:!0,children:"resource"}),"."]})]})]},"cron_expression_input")]),(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(_.Z,{mb:2,px:N.cd,children:(0,K.jsx)(m.Z,{children:"Settings"})}),(0,K.jsx)(f.Z,{light:!0,short:!0}),(0,K.jsx)(w.Z,{columnFlex:[null,1],rows:e})]})}),[xe,Ue,Ye,I,Oe,_e,ve,ze]),en=(0,u.useCallback)((function(e,n){U((function(t){return Object.entries(n).forEach((function(n){var r=(0,i.Z)(n,2),o=r[0],l=r[1];t[e][o]=l})),(0,$.Z)(t)}))}),[U]),nn=(0,u.useMemo)((function(){return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(_.Z,{mb:N.cd,px:N.cd,children:(0,K.jsx)(m.Z,{children:"Settings"})}),(0,K.jsx)(f.Z,{light:!0,short:!0}),(0,K.jsx)(w.Z,{columnFlex:[null,1],rows:[[(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(D.KJ,{default:!0,size:1.5*N.iI}),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_event"),(0,K.jsx)(se.Z,{monospace:!0,onChange:function(e){e.preventDefault(),he((function(n){return ke(ke({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:Oe},"trigger_name_input_event")]]}),(0,K.jsxs)(_.Z,{mb:2,mt:5,px:N.cd,children:[(0,K.jsx)(m.Z,{children:"Events"}),(0,K.jsxs)(S.ZP,{muted:!0,children:["Add 1 or more event that will trigger this pipeline to run.",(0,K.jsx)("br",{}),"If you add more than 1 event, this pipeline will trigger if any of the events are received."]}),(0,K.jsxs)(_.Z,{mt:N.Mq,children:[(0,K.jsx)(S.ZP,{bold:!0,large:!0,children:"AWS events"}),(0,K.jsxs)(S.ZP,{muted:!0,children:["In order to retrieve all the possible AWS events you can trigger your pipeline from,",(0,K.jsx)("br",{}),"you\u2019ll need to set 3 environment variables (",(0,K.jsx)(v.Z,{href:"https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html",openNewWindow:!0,underline:!0,children:"more info here"}),"):"]}),(0,K.jsx)(_.Z,{mt:1,children:(0,K.jsxs)(Pe,{monospace:!0,ordered:!0,children:[(0,K.jsx)(S.ZP,{monospace:!0,children:"AWS_REGION_NAME"}),(0,K.jsx)(S.ZP,{monospace:!0,children:"AWS_ACCESS_KEY_ID"}),(0,K.jsx)(S.ZP,{monospace:!0,children:"AWS_SECRET_ACCESS_KEY"})]})})]})]}),(0,K.jsx)(f.Z,{light:!0,short:!0}),(null===E||void 0===E?void 0:E.length)>=1&&(0,K.jsx)(w.Z,{alignTop:!0,columnFlex:[1,1,2,null],columns:[{uuid:"Provider"},{uuid:"Event"},{uuid:"Pattern"},{label:function(){return""},uuid:"delete"}],rows:null===E||void 0===E?void 0:E.map((function(e,n){var t=e.event_type,r=e.name,i=e.pattern,o=e.id||"".concat(t,"-").concat(r,"-").concat(n,"-").concat(JSON.stringify(i)),l=[];return i&&JSON.stringify(i,null,2).split("\n").forEach((function(e){l.push(" ".concat(e))})),[(0,K.jsx)(O.Z,{monospace:!0,onChange:function(e){return en(n,{event_type:e.target.value})},placeholder:"Event provider",value:t||"",children:A.map((function(e){var n=e.label,t=e.uuid;return(0,K.jsx)("option",{value:t,children:n()},t)}))},"event-provider-".concat(o)),(0,K.jsx)(O.Z,{monospace:!0,onChange:function(e){var t,r=e.target.value,i=null===(t=We[r])||void 0===t?void 0:t.event_pattern;en(n,{name:r,pattern:i?JSON.parse(i):null})},placeholder:"Event name",value:r,children:Ve.map((function(e){var n=e.name;return(0,K.jsx)("option",{value:n,children:n},n)}))},"event-name-".concat(o)),i&&(0,K.jsx)(ie.Z,{language:"json",small:!0,source:l.join("\n")}),(0,K.jsx)(p.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return U((function(e){return(0,R.oM)(e,n)}))},children:(0,K.jsx)(D.rF,{default:!0,size:2*N.iI})},"remove_event")]}))}),(0,K.jsx)(_.Z,{p:N.cd,children:(0,K.jsx)(p.Z,{beforeIcon:(0,K.jsx)(D.mm,{size:2*N.iI}),onClick:function(){return U((function(e){return e.concat({})}))},outline:!0,children:"Add event matcher"})})]})}),[E,Ve,We,Oe,en]),tn=!0,rn=(0,u.useMemo)((function(){var e,n="";return n="".concat(window.origin,"/api/pipeline_schedules/").concat(null===o||void 0===o?void 0:o.id,"/pipeline_runs"),null!==o&&void 0!==o&&o.token&&(n="".concat(n,"/").concat(o.token)),(e=window.location.port)&&(n=n.replace(e,"6789")),(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(_.Z,{mb:N.cd,px:N.cd,children:(0,K.jsx)(m.Z,{children:"Settings"})}),(0,K.jsx)(f.Z,{light:!0,short:!0}),(0,K.jsx)(w.Z,{columnFlex:[null,1],rows:[[(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(D.KJ,{default:!0,size:1.5*N.iI}),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_api"),(0,K.jsx)(se.Z,{monospace:!0,onChange:function(e){e.preventDefault(),he((function(n){return ke(ke({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:Oe},"trigger_name_input_api")]]}),(0,K.jsxs)(_.Z,{mb:2,mt:5,px:N.cd,children:[(0,K.jsx)(m.Z,{children:"Endpoint"}),(0,K.jsxs)(S.ZP,{muted:!0,children:["Make a ",(0,K.jsx)(S.ZP,{bold:!0,inline:!0,monospace:!0,children:"POST"})," request to the following endpoint:"]}),(0,K.jsx)(_.Z,{mt:N.Mq,children:(0,K.jsx)(oe.Z,{copiedText:n,linkText:n,monospace:!0,withCopyIcon:!0})})]}),(0,K.jsxs)(_.Z,{mb:2,mt:5,px:N.cd,children:[(0,K.jsx)(m.Z,{children:"Payload"}),(0,K.jsx)(S.ZP,{muted:!0,children:"You can optionally include runtime variables in your request payload. These runtime variables are accessible from within each pipeline block."}),(0,K.jsx)(_.Z,{mt:N.Mq,children:(0,K.jsx)(oe.Z,{withCopyIcon:!0,copiedText:'{\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n}\n',children:(0,K.jsx)(ie.Z,{language:"json",small:!0,source:'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\n'})})})]}),(0,K.jsxs)(_.Z,{mb:2,mt:5,px:N.cd,children:[(0,K.jsx)(m.Z,{children:"Sample cURL command"}),(0,K.jsx)(_.Z,{mt:N.Mq,children:(0,K.jsx)(ie.Z,{language:"bash",small:!0,source:"\n curl -X POST ".concat(n,' \\\n --header \'Content-Type: application/json\' \\\n --data \'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\'\n')})})]})]})}),[Oe,o,tn]),on=!Ce||y.Xm.TIME===Ce&&!(I&&Ue||!I&&Ue&&_e)||y.Xm.EVENT===Ce&&(!(null!==E&&void 0!==E&&E.length)||!E.every((function(e){var n=e.event_type,t=e.name;return n&&t}))),ln=(0,u.useMemo)((function(){var e;return(null===r||void 0===r||null===(e=r.blocks)||void 0===e?void 0:e.filter((function(e){var n=e.type;return T.tf.DBT===n})))||[]}),[r]),cn=(0,u.useMemo)((function(){return(0,K.jsxs)(_.Z,{p:N.cd,children:[(0,K.jsxs)(_.Z,{mb:N.HN,children:[(0,K.jsx)(m.Z,{children:"Pipeline run settings"}),(0,K.jsx)(_.Z,{mt:N.Mq,children:(0,K.jsx)(h.Z,{alignItems:"center",children:(0,K.jsx)(te.Z,{checked:null===Y||void 0===Y?void 0:Y.allow_blocks_to_fail,label:"Keep running pipeline even if blocks fail",onClick:function(){return Q((function(e){return ke(ke({},e),{},{allow_blocks_to_fail:!(null!==Y&&void 0!==Y&&Y.allow_blocks_to_fail)})}))}})})}),y.Xm.TIME===Ce&&(0,K.jsx)(_.Z,{mt:N.Mq,children:(0,K.jsx)(h.Z,{alignItems:"center",children:(0,K.jsx)(te.Z,{checked:null===Y||void 0===Y?void 0:Y.skip_if_previous_running,label:"Skip run if previous run still in progress",onClick:function(){return Q((function(e){return ke(ke({},e),{},{skip_if_previous_running:!(null!==Y&&void 0!==Y&&Y.skip_if_previous_running)})}))}})})}),(0,K.jsxs)(_.Z,{mt:N.Mq,children:[(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(_.Z,{mr:2,children:(0,K.jsx)(Se.Z,{checked:J,onCheck:function(e){B(e),e||he((function(e){return ke(ke({},e),{},{slaAmount:0})}))}})}),(0,K.jsx)(S.ZP,{default:!0,monospace:!0,children:"Configure trigger SLA"})]}),J&&(0,K.jsx)(w.Z,{columnFlex:[null,1],rows:[[(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(D.aw,{default:!0,size:1.5*N.iI}),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"SLA"})]},"sla_detail"),(0,K.jsxs)(h.Z,{children:[(0,K.jsx)(fe.Z,{flex:1,children:(0,K.jsx)(se.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),he((function(n){return ke(ke({},n),{},{slaAmount:e.target.value})}))},placeholder:"Time",value:null===de||void 0===de?void 0:de.slaAmount})}),(0,K.jsx)(fe.Z,{flex:1,children:(0,K.jsx)(O.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),he((function(n){return ke(ke({},n),{},{slaUnit:e.target.value})}))},placeholder:"Select time unit",small:!0,value:null===de||void 0===de?void 0:de.slaUnit,children:Object.keys(z.tL).map((function(e){return(0,K.jsx)("option",{value:e,children:"".concat(e,"(s)")},e)}))})})]},"sla_input_detail")]]})]})]}),(0,K.jsxs)(_.Z,{mb:N.HN,children:[(0,K.jsx)(m.Z,{children:"Runtime variables"}),!(0,V.Qr)(ye)&&(0,K.jsxs)(_.Z,{mt:N.Mq,children:[(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(_.Z,{mr:2,children:(0,K.jsx)(Se.Z,{checked:L,onCheck:q})}),(0,K.jsx)(S.ZP,{monospace:!0,muted:!0,children:"Overwrite global variables"})]}),L&&ce&&Object.entries(ce).length>0&&(0,K.jsx)(_.Z,{mt:1,children:(0,K.jsx)(w.Z,{columnFlex:[null,1],columns:[{uuid:"Variable"},{uuid:"Value"}],rows:Object.entries(ce).reduce((function(e,n){var t=(0,i.Z)(n,2),r=t[0],o=t[1];return b.sZ===r?e:e.concat([[(0,K.jsx)(S.ZP,{default:!0,monospace:!0,children:r},"variable_".concat(r)),(0,K.jsx)(se.Z,{borderless:!0,monospace:!0,onChange:function(e){e.preventDefault(),ue((function(n){return ke(ke({},n),{},(0,l.Z)({},r,e.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:o},"variable_uuid_input_".concat(r))]])}),[])})})]})]}),(null===ln||void 0===ln?void 0:ln.length)>=1&&(0,K.jsx)(_.Z,{mb:N.HN,children:(0,K.jsx)(pe,{blocks:ln,updateVariables:ue,variables:ke(ke({},Ge),ce)})})]})}),[ln,J,ye,L,ce,de,Ce,Ge,B,q,ue,Y]);return(0,K.jsx)(K.Fragment,{children:(0,K.jsxs)(j.Z,{after:cn,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(x,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return null===o||void 0===o?void 0:o.name},linkProps:{as:"/pipelines/".concat(x,"/triggers/").concat(P),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],errors:n,pageName:M.M.TRIGGERS,pipeline:r,setErrors:c,subheader:(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(p.Z,{disabled:on,loading:Ke,onClick:Qe,outline:!0,primary:!0,children:"Save changes"}),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(p.Z,{linkProps:{href:"/pipelines/[pipeline]/triggers/[...slug]",as:"/pipelines/".concat(x,"/triggers/").concat(P)},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"})]}),title:function(){return"Edit ".concat(null===o||void 0===o?void 0:o.name)},uuid:"triggers/edit",children:[(0,K.jsxs)(_.Z,{p:N.cd,children:[(0,K.jsxs)(_.Z,{mb:2,children:[(0,K.jsx)(m.Z,{children:"Trigger type"}),(0,K.jsx)(S.ZP,{muted:!0,children:"How would you like this pipeline to be triggered?"})]}),(0,K.jsx)(h.Z,{children:Ee(I).map((function(e){var n=e.label,t=e.description,r=e.uuid,i=Ce===r,o=Ce&&!i;return(0,K.jsx)(p.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){y.Xm.EVENT!==r||null!==E&&void 0!==E&&E.length||U([{}]),he((function(e){return ke(ke({},e),{},{schedule_type:r})}))},children:(0,K.jsx)(Ie.U,{selected:i,children:(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(fe.Z,{children:(0,K.jsx)("input",{checked:i,type:"radio"})}),(0,K.jsx)(_.Z,{mr:N.cd}),(0,K.jsxs)(fe.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,K.jsx)(m.Z,{bold:!0,default:!i&&!o,level:5,muted:!i&&o,children:n()}),(0,K.jsx)(S.ZP,{default:!i&&!o,leftAligned:!0,muted:o,children:t()})]})]})})},r)}))})]}),(0,K.jsxs)(_.Z,{mt:5,children:[y.Xm.TIME===Ce&&$e,y.Xm.EVENT===Ce&&nn,y.Xm.API===Ce&&rn]})]})})},De=t(41788),Ne=t(70543);function Me(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 Re(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Me(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Me(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function Ae(e){var n=e.pipelineScheduleId,t=e.pipelineUUID,r=e.subpath,i=(0,u.useState)(null),o=i[0],l=i[1],c=C.ZP.variables.pipelines.list(t,{},{revalidateOnFocus:!1}).data,s=null===c||void 0===c?void 0:c.variables,a=C.ZP.pipeline_schedules.detail(n),d=a.data,p=a.mutate,f=null===d||void 0===d?void 0:d.pipeline_schedule,h=C.ZP.pipelines.detail(t,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,m=Re(Re({},null===h||void 0===h?void 0:h.pipeline),{},{uuid:t});return Ne.b7===r?(0,K.jsx)(Te,{errors:o,fetchPipelineSchedule:p,pipeline:m,pipelineSchedule:f,setErrors:l,variables:s}):(0,K.jsx)(Q,{errors:o,fetchPipelineSchedule:p,pipeline:m,pipelineSchedule:f,setErrors:l,variables:s})}Ae.getInitialProps=function(){var e=(0,o.Z)(s().mark((function e(n){var t,r,o,l,c,u;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.query,r=t.pipeline,o=t.slug,!Array.isArray(o)){e.next=4;break}return l=(0,i.Z)(o,2),c=l[0],u=l[1],e.abrupt("return",{pipelineScheduleId:c,pipelineUUID:r,subpath:u});case 4:return e.abrupt("return",{pipelineUUID:r});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var Ue=(0,De.Z)(Ae)},95488:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers/[...slug]",function(){return t(70422)}])}},function(e){e.O(0,[844,9902,426,1774,8792,7849,4495,1424,1005,7815,3654,547,8952,8312,9774,2888,179],(function(){return n=95488,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[643],{90659:function(e,n,t){"use strict";var r=t(67403),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,n){var t,o,l,c,s,u,a=!1;n||(n={}),t=n.debug||!1;try{if(l=r(),c=document.createRange(),s=document.getSelection(),(u=document.createElement("span")).textContent=e,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",(function(r){if(r.stopPropagation(),n.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=i[n.format]||i.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(n.format,e);n.onCopy&&(r.preventDefault(),n.onCopy(r.clipboardData))})),document.body.appendChild(u),c.selectNodeContents(u),s.addRange(c),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");a=!0}catch(d){t&&console.error("unable to copy using execCommand: ",d),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(n.format||"text",e),n.onCopy&&n.onCopy(window.clipboardData),a=!0}catch(d){t&&console.error("unable to copy using clipboardData: ",d),t&&console.error("falling back to prompt"),o=function(e){var n=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,n)}("message"in n?n.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,e)}}finally{s&&("function"==typeof s.removeRange?s.removeRange(c):s.removeAllRanges()),u&&document.body.removeChild(u),l()}return a}},11984:function(e,n,t){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(n,"__esModule",{value:!0}),n.CopyToClipboard=void 0;var i=c(t(82684)),o=c(t(90659)),l=["text","onCopy","options","children"];function c(e){return e&&e.__esModule?e:{default:e}}function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){j(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function a(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function d(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function p(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,n){return f=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},f(e,n)}function h(e){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,r=g(e);if(n){var i=g(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return m(this,t)}}function m(e,n){if(n&&("object"===r(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function j(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var x=function(e){!function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&f(e,n)}(s,e);var n,t,r,c=h(s);function s(){var e;d(this,s);for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return j(v(e=c.call.apply(c,[this].concat(t))),"onClick",(function(n){var t=e.props,r=t.text,l=t.onCopy,c=t.children,s=t.options,u=i.default.Children.only(c),a=(0,o.default)(r,s);l&&l(r,a),u&&u.props&&"function"===typeof u.props.onClick&&u.props.onClick(n)})),e}return n=s,(t=[{key:"render",value:function(){var e=this.props,n=(e.text,e.onCopy,e.options,e.children),t=a(e,l),r=i.default.Children.only(n);return i.default.cloneElement(r,u(u({},t),{},{onClick:this.onClick}))}}])&&p(n.prototype,t),r&&p(n,r),Object.defineProperty(n,"prototype",{writable:!1}),s}(i.default.PureComponent);n.CopyToClipboard=x,j(x,"defaultProps",{onCopy:void 0,options:void 0})},64866:function(e,n,t){"use strict";var r=t(11984).CopyToClipboard;r.CopyToClipboard=r,e.exports=r},67403:function(e){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var n=document.activeElement,t=[],r=0;r<e.rangeCount;r++)t.push(e.getRangeAt(r));switch(n.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":n.blur();break;default:n=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||t.forEach((function(n){e.addRange(n)})),n&&n.focus()}}},70543:function(e,n,t){"use strict";t.d(n,{IY:function(){return o},Jf:function(){return i},NR:function(){return l},b7:function(){return r}});var r="edit",i={uuid:"All files"},o={uuid:"Files in pipeline"},l=[i,o]},2850:function(e,n,t){"use strict";t.d(n,{M:function(){return l},W:function(){return o}});var r=t(38626),i=t(3055),o=34*t(49125).iI,l=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],i.Mz)},56681:function(e,n,t){"use strict";t.d(n,{G7:function(){return Z},ZP:function(){return O},u$:function(){return x}});var r=t(75582),i=t(82394),o=t(26304),l=t(32316),c=t(22673),s=t(48952),u=t(86673),a=t(19711),d=t(87815),p=t(49125),f=t(19395),h=t(7715),m=t(28598),v=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function g(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function j(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?g(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var x=76,b={uuid:"Run details"},y={uuid:"Dependency tree"},Z=[y,b];function O(e){var n=e.height,t=e.heightOffset,i=e.pipeline,g=e.selectedRun,O=e.selectedTab,_=e.setSelectedTab,P=j({},(0,o.Z)(e,v));g?P.blockStatus=(0,f.IJ)(null===g||void 0===g?void 0:g.block_runs):P.noStatus=!0;var w=(0,h.Kn)(null===g||void 0===g?void 0:g.variables)?j({},null===g||void 0===g?void 0:g.variables):(null===g||void 0===g?void 0:g.variables)||{},S=null===g||void 0===g?void 0:g.event_variables;if(S&&(0,h.Kn)(S)&&!(0,h.Qr)(S))if((0,h.Kn)(w)&&w.hasOwnProperty("event")){var I=(0,h.Kn)(w.event)?w.event:{};w.event=j(j({},I),S)}else w.event=j({},S);var C=[];w&&JSON.stringify(w,null,2).split("\n").forEach((function(e){C.push(" ".concat(e))}));var k=g&&[["Run ID",null===g||void 0===g?void 0:g.id],["Variables",(0,m.jsx)(c.Z,{language:"json",small:!0,source:C.join("\n")},"variable_value")]],E=g&&(0,m.jsx)(u.Z,{pb:p.cd,px:p.cd,children:(0,m.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:k.map((function(e,n){var t=(0,r.Z)(e,2),i=t[0],o=t[1];return[(0,m.jsx)(a.ZP,{monospace:!0,muted:!0,children:i},"key_".concat(n)),(0,m.jsx)(a.ZP,{monospace:!0,textOverflow:!0,children:o},"val_".concat(n))]})),uuid:"LogDetail"})}),T=O&&_;return(0,m.jsxs)(m.Fragment,{children:[T&&(0,m.jsx)(u.Z,{py:p.cd,children:(0,m.jsx)(l.Z,{onClickTab:_,selectedTabUUID:null===O||void 0===O?void 0:O.uuid,tabs:Z})}),(!T||y.uuid===(null===O||void 0===O?void 0:O.uuid))&&(0,m.jsx)(s.Z,j(j({},P),{},{height:n,heightOffset:(t||0)+(T?x:0),pipeline:i})),b.uuid===(null===O||void 0===O?void 0:O.uuid)&&E]})}},58122:function(e,n,t){"use strict";t.d(n,{FS:function(){return s},JZ:function(){return a},e7:function(){return d},wx:function(){return u}});var r=t(75582),i=t(82394),o=t(93348);function l(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 c(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,i.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}function s(e){return"string"===typeof e?e:JSON.stringify(e)}function u(e,n){var t,r;return null===e||void 0===e||null===(t=e.find((function(e){var t=e.block;return n(t)})))||void 0===t||null===(r=t.variables)||void 0===r?void 0:r.map((function(e){var n=e.value;return c(c({},e),{},{value:s(n)})}))}function a(e,n){return n===o.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===o.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function d(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,r.Z)(n,2),o=t[0],l=t[1],s=l;try{s=JSON.parse(l)}catch(u){}return c(c({},e),{},(0,i.Z)({},o,s))}),{}):e}},18025:function(e,n,t){"use strict";t.d(n,{J:function(){return s},U:function(){return c}});var r=t(38626),i=t(23831),o=t(73942),l=t(49125),c=r.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-m7tlau-0"})(["border-radius:","px;border-style:solid;border-width:2px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],o.TR,14*l.iI,l.cd*l.iI,l.cd*l.iI,40*l.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||i.Z.interactive).linkPrimary,";\n ")})),s=r.default.div.withConfig({displayName:"indexstyle__DateSelectionContainer",componentId:"sc-m7tlau-1"})(["border-radius:","px;padding:","px;"," "," ",""],o.n_,l.tr,(function(e){return"\n background-color: ".concat((e.theme.interactive||i.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.absolute&&"\n position: absolute;\n z-index: 2;\n right: 0;\n top: ".concat(2.5*l.iI,"px;\n ")}),(function(e){return e.topPosition&&"\n top: -".concat(42*l.iI,"px;\n ")}))},52769:function(e,n,t){"use strict";t.d(n,{C:function(){return r}});var r="global"},2713:function(e,n,t){"use strict";var r=t(82394),i=t(44495),o=t(67971),l=t(55378),c=t(86673),s=t(19711),u=t(18025),a=t(49125),d=t(24224),p=t(28598);function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function h(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.selectedDate,t=e.selectedTime,r=e.setSelectedDate,f=e.setSelectedTime,m=e.topPosition;return(0,p.jsxs)(u.J,{absolute:!0,topPosition:m,children:[(0,p.jsx)(i.ZP,{onChange:r,value:n}),(0,p.jsx)(c.Z,{mb:2}),(0,p.jsxs)(o.Z,{alignItems:"center",children:[(0,p.jsx)(s.ZP,{default:!0,large:!0,children:"Time (UTC):"}),(0,p.jsx)(c.Z,{pr:2}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{hour:e.target.value})}))},paddingRight:5*a.iI,placeholder:"HH",value:null===t||void 0===t?void 0:t.hour,children:(0,d.m5)(24,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"hour_".concat(e))}))}),(0,p.jsx)(c.Z,{px:1,children:(0,p.jsx)(s.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{minute:e.target.value})}))},paddingRight:5*a.iI,placeholder:"MM",value:null===t||void 0===t?void 0:t.minute,children:(0,d.m5)(60,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"minute_".concat(e))}))})]})]})}},22673:function(e,n,t){"use strict";var r=t(82684),i=t(68792),o=t(31811),l=t(38626),c=t(65292),s=t(23831),u=t(2005),a=t(49125),d=t(28598);n.Z=function(e){var n=e.language,t=e.maxWidth,p=e.showLineNumbers,f=e.small,h=e.source,m=e.wrapLines,v=(0,r.useContext)(l.ThemeContext);function g(e){var r=e.value;return(0,d.jsx)(o.Z,{customStyle:{backgroundColor:(v.background||s.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:u.Vp,fontSize:f?12:14,marginBottom:0,marginTop:0,maxWidth:t,paddingBottom:2*a.iI,paddingTop:2*a.iI},language:n,lineNumberStyle:{color:(v.content||s.Z.content).muted},showLineNumbers:p,style:c._4,useInlineStyles:!0,wrapLines:m,children:r})}return(0,d.jsx)(i.D,{components:{code:function(e){var n=e.children;return(0,d.jsx)(g,{value:n})}},children:h})}},65730:function(e,n,t){"use strict";var r,i=t(82394),o=(t(82684),t(64866)),l=t(21764),c=t(67971),s=t(10919),u=t(86673),a=t(19711),d=t(46261),p=t(22341),f=t(49125),h=t(28598);function m(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function v(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?m(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}!function(e){e.LEFT="left",e.RIGHT="right"}(r||(r={})),n.Z=function(e){var n,t=e.children,i=e.copiedText,m=e.iconPosition,g=void 0===m?r.LEFT:m,j=e.inverted,x=e.linkProps,b=e.linkText,y=e.monospace,Z=e.muted,O=e.small,_=e.toastMessage,P=e.withCopyIcon;return t?n=(0,h.jsx)("span",{children:t}):P&&(n=(0,h.jsx)(s.Z,v(v({href:"#",inline:!0,muted:Z,preventDefault:!0,sameColorAsText:!0,small:O},x),{},{children:(0,h.jsxs)(c.Z,{alignItems:"center",children:[g===r.LEFT&&(0,h.jsx)(u.Z,{mr:b?1:0,children:(0,h.jsx)(c.Z,{alignItems:"center",children:(0,h.jsx)(p.CK,{inverted:j,muted:Z,size:2*f.iI})})}),b&&(0,h.jsx)(a.ZP,{inverted:j,monospace:y,muted:Z,small:O,children:b}),g===r.RIGHT&&(0,h.jsx)(u.Z,{ml:b?1:0,children:(0,h.jsx)(c.Z,{alignItems:"center",children:(0,h.jsx)(p.CK,{inverted:j,muted:Z})})})]})}))),(0,h.jsx)(d.Z,{block:!0,label:"Copy",size:null,widthFitContent:!0,children:(0,h.jsx)(o.CopyToClipboard,{onCopy:function(){return l.Am.success(_||"Successfully copied to clipboard.",{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:i})},text:i,children:n})})}},32316:function(e,n,t){"use strict";t.d(n,{Z:function(){return v}});var r=t(82684),i=t(60328),o=t(67971),l=t(882),c=t(86673),s=t(19711),u=t(99994),a=t(38626),d=t(49125),p=t(37391),f=a.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),h=t(66653),m=t(28598);var v=function(e){var n=e.allowScroll,t=e.compact,a=e.contained,p=e.noPadding,v=e.onClickTab,g=e.regularSizeText,j=e.selectedTabUUID,x=e.small,b=e.tabs,y=(0,r.useMemo)((function(){var e=b.length,n=[];return b.forEach((function(r,a){var p=r.Icon,f=r.IconSelected,b=r.label,y=r.uuid,Z=y===j,O=Z&&f||p,_=b?b():y,P=(0,m.jsxs)(o.Z,{alignItems:"center",children:[O&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(O,{default:!Z,size:2*d.iI}),(0,m.jsx)(c.Z,{mr:1})]}),(0,m.jsx)(s.ZP,{bold:!0,default:!Z,noWrapping:!0,small:!g,children:_})]});a>=1&&e>=2&&n.push((0,m.jsx)("div",{style:{marginLeft:1.5*d.iI}},"spacing-".concat(y))),Z?n.push((0,m.jsx)(l.Z,{backgroundGradient:u.yr,backgroundPanel:!0,borderLess:!0,borderWidth:2,compact:t||x,onClick:function(e){(0,h.j)(e),v(r)},paddingUnitsHorizontal:1.75,paddingUnitsVertical:1.25,small:x,children:P},y)):n.push((0,m.jsx)("div",{style:{padding:2},children:(0,m.jsx)(i.Z,{borderLess:!0,compact:t||x,default:!0,onClick:function(e){(0,h.j)(e),v(r)},outline:!0,small:x,children:P})},"button-tab-".concat(y)))})),n}),[t,v,j,x,b]),Z=(0,m.jsx)(o.Z,{alignItems:"center",children:y});return a?Z:(0,m.jsx)(f,{allowScroll:n,noPadding:p,children:Z})}},70422:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Ue}});var r,i=t(75582),o=t(77837),l=t(82394),c=t(38860),s=t.n(c),u=t(82684),a=t(83455),d=t(34376),p=t(60328),f=t(34744),h=t(67971),m=t(87372),v=t(10919),g=t(51099),j=t(60547),x=t(97496),b=t(47409),y=t(93348),Z=t(52769),O=t(55378),_=t(86673),P=t(54283),w=t(87815),S=t(19711),I=t(46261),C=t(82531),k=t(56681),E=t(2850),T=t(86422),D=t(22341),N=t(49125),M=t(59920),R=t(24224);!function(e){e.AWS="aws_event"}(r||(r={}));var A=[{label:function(){return"AWS"},uuid:r.AWS}],U=(0,R.HK)(A,(function(e){return e.uuid})),F=t(66050),H=t(58122),z=t(19395),L=t(25958),q=t(33766),V=t(7715),W=t(9736),X=t(96510),J=t(66653),B=t(59e3),K=t(28598);function G(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Y(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?G(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):G(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Q=function(e){var n=e.errors,t=e.fetchPipelineSchedule,r=e.pipeline,o=e.pipelineSchedule,l=e.setErrors,c=e.variables,s=(0,d.useRouter)(),A=(0,W.Ct)(),G=(r||{}).uuid,Q=o||{},$=Q.id,ee=Q.event_matchers,ne=Q.name,te=Q.schedule_interval,re=Q.schedule_type,ie=Q.settings,oe=Q.sla,le=Q.start_time,ce=Q.status,se=Q.variables,ue=void 0===se?{}:se,ae=(0,B.iV)(),de={_limit:30,_offset:30*(null!==ae&&void 0!==ae&&ae.page?ae.page:0)};null!==ae&&void 0!==ae&&ae.status&&(de.status=ae.status);var pe=C.ZP.pipeline_runs.pipeline_schedules.list($,de,{refreshInterval:3e3,revalidateOnFocus:!0}),fe=pe.data,he=pe.mutate,me=(0,u.useMemo)((function(){return(null===fe||void 0===fe?void 0:fe.pipeline_runs)||[]}),[fe]),ve=(0,u.useMemo)((function(){var e;return(null===fe||void 0===fe||null===(e=fe.metadata)||void 0===e?void 0:e.count)||[]}),[fe]),ge=(0,u.useState)(null),je=ge[0],xe=ge[1],be=(0,u.useMemo)((function(){var e=null!==ae&&void 0!==ae&&ae.page?ae.page:0;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(x.Z,{fetchPipelineRuns:he,onClickRow:function(e){return xe((function(n){var t=me[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipelineRuns:me,selectedRun:je,setErrors:l}),(0,K.jsx)(_.Z,{p:2,children:(0,K.jsx)(g.Z,{maxPages:9,onUpdate:function(e){var n=Number(e),t=Y(Y({},ae),{},{page:n>=0?n:0});s.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(G,"/triggers/").concat($,"?").concat((0,B.uM)(t)))},page:Number(e),totalPages:Math.ceil(ve/30)})})]})}),[he,me,$,G,ae,s,je,l,ve]),ye=(0,u.useState)(k.G7[0]),Ze=ye[0],Oe=ye[1],_e=(0,a.Db)((function(e){return C.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:(0,V.gR)(e,["id"])})}),{onSuccess:function(e){return(0,X.wD)(e,{callback:function(){t()},onErrorCallback:function(e,n){return l({errors:n,response:e})}})}}),Pe=(0,i.Z)(_e,2),we=Pe[0],Se=Pe[1].isLoading,Ie=C.ZP.pipeline_triggers.pipelines.list(G),Ce=Ie.data,ke=Ie.mutate,Ee=(0,u.useMemo)((function(){return(0,R.HK)((null===Ce||void 0===Ce?void 0:Ce.pipeline_triggers)||[],(function(e){return e.name}))}),[Ce]),Te=(0,u.useMemo)((function(){return!(null===Ee||void 0===Ee||!Ee[null===o||void 0===o?void 0:o.name])}),[o,Ee]),De=(0,a.Db)(C.ZP.pipeline_triggers.pipelines.useCreate(G),{onSuccess:function(e){return(0,X.wD)(e,{callback:function(){ke()},onErrorCallback:function(e,n){return l({errors:n,response:e})}})}}),Ne=(0,i.Z)(De,2),Me=Ne[0],Re=Ne[1].isLoading,Ae=(0,u.useMemo)((function(){return y.fq.ACTIVE===ce}),[ce]),Ue=(0,u.useMemo)((function(){var e,n,t={default:!0,size:1.5*N.iI},r=[[(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(D.VW,Y({},t)),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"Trigger type"})]},"trigger_type_label"),(0,K.jsx)(S.ZP,{monospace:!0,children:null===(e=y.Z4[re])||void 0===e?void 0:e.call(y.Z4)},"trigger_type")],[(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(D.rs,Y({},t)),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"Status"})]},"trigger_status_label"),(0,K.jsx)(S.ZP,{danger:!Ae,monospace:!0,success:Ae,children:ce},"trigger_status")]];if(oe){var i=(0,z.gU)(oe),o=i.time,l=i.unit,c=1===o?l:"".concat(l,"s");r.push([(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(D.kI,Y({},t)),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"SLA"})]},"trigger_sla_label"),(0,K.jsx)(S.ZP,{monospace:!0,children:"".concat(o," ").concat(c)},"trigger_sla")])}(te&&r.push([(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(D.Pf,Y({},t)),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"Frequency"})]},"trigger_frequency_label"),(0,K.jsx)(S.ZP,{monospace:!0,children:te.replace("@","")},"trigger_frequency")]),le&&r.push([(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(D.aw,Y({},t)),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"Start date"})]},"trigger_start_date_label"),(0,K.jsx)(S.ZP,{monospace:!0,children:le},"trigger_start_date")]),null!==ie&&void 0!==ie&&ie.skip_if_previous_running)&&r.push([(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(I.Z,{default:!0,label:"Skip current run if any previous runs are still in progress",size:1.5*N.iI,widthFitContent:!0}),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"Skip if running"})]},"trigger_skip_if_running"),(0,K.jsx)(S.ZP,{monospace:!0,children:null===(n=ie.skip_if_previous_running)||void 0===n?void 0:n.toString()},"trigger_skip_if_running_label")]);return null!==ie&&void 0!==ie&&ie.allow_blocks_to_fail&&r.push([(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(I.Z,{default:!0,label:"Trigger runs will continue running blocks if other unrelated blocks fail",size:1.5*N.iI,widthFitContent:!0}),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"Allow blocks to fail"})]},"trigger_allow_blocks_to_fail"),(0,K.jsx)(S.ZP,{monospace:!0,children:ie.allow_blocks_to_fail.toString()},"trigger_allow_blocks_to_fail_label")]),(0,K.jsx)(w.Z,{columnFlex:[null,1],rows:r})}),[Ae,te,re,ie,oe,le,ce]),Fe=(0,u.useMemo)((function(){return ue||{}}),[ue]),He=(0,u.useMemo)((function(){var e,n=[];return(0,V.Qr)(Fe)?n=(0,H.wx)(c,(function(e){return e.uuid===Z.C})):Object.entries(Fe).forEach((function(e){var t=(0,i.Z)(e,2),r=t[0],o=t[1];b.sZ!==r&&n.push({uuid:r,value:(0,H.FS)(o)})})),"undefined"!==typeof(n=(0,H.JZ)(n||[],re))&&null!==(e=n)&&void 0!==e&&e.length?(0,K.jsx)(w.Z,{columnFlex:[null,1],rows:n.map((function(e){var n=e.uuid,t=e.value;return[(0,K.jsx)(S.ZP,{default:!0,monospace:!0,small:!0,children:n},"settings_variable_label_".concat(n)),(0,K.jsx)(S.ZP,{monospace:!0,small:!0,children:t},"settings_variable_".concat(n))]}))}):null}),[re,Fe,c]),ze=(0,u.useMemo)((function(){var e,n,t=[],i=null===Fe||void 0===Fe||null===(e=Fe[b.sZ])||void 0===e?void 0:e.blocks;return null===r||void 0===r||null===(n=r.blocks)||void 0===n||n.forEach((function(e){var n=e.type,r=e.uuid;if(T.tf.DBT===n){var o,l=(null===i||void 0===i||null===(o=i[r])||void 0===o?void 0:o.configuration)||{},c=l.flags,s=l.prefix,u=l.suffix,a=(0,L.IU)(e).name;(c||s||u)&&t.push({flags:c,prefix:s,suffix:u,uuid:a})}})),"undefined"!==typeof t&&null!==t&&void 0!==t&&t.length?(0,K.jsx)(w.Z,{columnFlex:[1,null],rows:t.map((function(e){var n=e.flags,t=e.prefix,r=e.suffix,i=e.uuid;return[(0,K.jsxs)(S.ZP,{monospace:!0,small:!0,children:[t&&(0,K.jsx)(S.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:t}),i,r&&(0,K.jsx)(S.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:r})]},"settings_variable_label_".concat(i)),(0,K.jsx)(S.ZP,{monospace:!0,muted:!0,small:!0,children:n&&n.join(", ")},"settings_variable_".concat(i))]}))}):null}),[r,Fe]),Le=(0,u.useMemo)((function(){return(0,K.jsx)(w.Z,{columnFlex:[null,1],columns:[{uuid:"Provider"},{uuid:"Event"}],rows:null===ee||void 0===ee?void 0:ee.map((function(e,n){var t=e.event_type,r=e.name;return[(0,K.jsx)(S.ZP,{default:!0,monospace:!0,children:U[t].label()},"".concat(t,"_").concat(n,"_label")),(0,K.jsx)(S.ZP,{monospace:!0,children:r},"".concat(t,"_").concat(n,"_name"))]}))})}),[ee]);return(0,K.jsxs)(j.Z,{afterHidden:!je,before:(0,K.jsxs)(E.M,{children:[(0,K.jsxs)(_.Z,{mb:N.HN,pt:N.cd,px:N.cd,children:[(0,K.jsxs)(_.Z,{mb:N.cd,children:[y.Xm.TIME===re&&(0,K.jsx)(D.kO,{size:5*N.iI}),y.Xm.EVENT===re&&(0,K.jsx)(D.Jp,{size:5*N.iI}),y.Xm.API===re&&(0,K.jsx)(D.Bf,{size:5*N.iI}),!re&&(0,K.jsx)(D.VW,{size:5*N.iI})]}),(0,K.jsx)(m.Z,{children:ne})]}),(0,K.jsx)(_.Z,{px:N.cd,children:(0,K.jsx)(m.Z,{level:5,children:"Settings"})}),(0,K.jsx)(f.Z,{light:!0,mt:1,short:!0}),Ue,(null===ee||void 0===ee?void 0:ee.length)>=1&&(0,K.jsxs)(_.Z,{my:N.HN,children:[(0,K.jsx)(_.Z,{px:N.cd,children:(0,K.jsx)(m.Z,{level:5,children:"Events"})}),(0,K.jsx)(f.Z,{light:!0,mt:1,short:!0}),Le]}),He&&(0,K.jsxs)(_.Z,{my:N.HN,children:[(0,K.jsx)(_.Z,{px:N.cd,children:(0,K.jsx)(m.Z,{level:5,children:"Runtime variables"})}),(0,K.jsx)(f.Z,{light:!0,mt:1,short:!0}),He]}),ze&&(0,K.jsxs)(_.Z,{my:N.HN,children:[(0,K.jsx)(_.Z,{px:N.cd,children:(0,K.jsx)(m.Z,{level:5,children:"dbt runtime settings"})}),(0,K.jsx)(f.Z,{light:!0,mt:1,short:!0}),ze]}),(0,K.jsx)(_.Z,{my:N.HN,children:(0,K.jsxs)(_.Z,{px:N.cd,children:[(0,K.jsxs)(m.Z,{level:5,children:[Te&&"Trigger exists in code",!Te&&"Store trigger in code"]}),(0,K.jsx)(_.Z,{mt:1,children:(0,K.jsxs)(S.ZP,{default:!0,children:["Save or update the trigger and its settings in the pipeline\u2019s metadata and version control the trigger using Git. For more information, please read the ",(0,K.jsx)(v.Z,{href:"https://docs.mage.ai/guides/triggers/configure-triggers-in-code",openNewWindow:!0,children:"documentation"}),"."]})}),(0,K.jsxs)(_.Z,{mt:N.cd,children:[!Ce&&(0,K.jsx)(P.Z,{inverted:!0}),Ce&&(0,K.jsxs)(p.Z,{disabled:!(null!==o&&void 0!==o&&o.id),loading:Re,onClick:function(){Me({pipeline_trigger:{pipeline_schedule_id:null===o||void 0===o?void 0:o.id}})},secondary:!0,children:[Te&&"Update trigger in code",!Te&&"Save trigger in code"]})]})]})})]}),beforeWidth:E.W,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(G,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return ne},linkProps:{as:"/pipelines/".concat(G,"/triggers/").concat($),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],buildSidekick:function(e){return(0,k.ZP)(Y(Y({},e),{},{selectedRun:je,selectedTab:Ze,setSelectedTab:Oe}))},errors:n,pageName:M.M.TRIGGERS,pipeline:r,setErrors:l,subheader:(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(p.Z,{beforeIcon:Ae?(0,K.jsx)(D.dz,{size:2*N.iI}):(0,K.jsx)(D.Py,{inverted:!A,size:2*N.iI}),danger:Ae&&!A,loading:Se,onClick:function(e){(0,J.j)(e),we({id:$,status:Ae?y.fq.INACTIVE:y.fq.ACTIVE})},outline:!0,success:!Ae&&!A,children:Ae?"Pause trigger":"Start trigger"}),(0,K.jsx)(_.Z,{mr:N.cd}),!A&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(p.Z,{linkProps:{as:"/pipelines/".concat(G,"/triggers/").concat($,"/edit"),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Edit trigger"}),(0,K.jsx)(_.Z,{mr:N.cd})]}),(0,K.jsxs)(O.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?s.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(G,"/triggers/").concat($)):(0,q.u7)({page:0,status:e.target.value})},paddingRight:4*N.iI,placeholder:"Select run status",value:(null===ae||void 0===ae?void 0:ae.status)||"all",children:[(0,K.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),Object.values(F.V).map((function(e){return(0,K.jsx)("option",{value:e,children:b.Do[e]},e)}))]})]}),title:function(){return ne},uuid:"triggers/detail",children:[(0,K.jsx)(_.Z,{mt:N.cd,px:N.cd,children:(0,K.jsx)(m.Z,{level:5,children:"Runs for this trigger"})}),(0,K.jsx)(f.Z,{light:!0,mt:N.cd,short:!0}),be]})},$=t(21831),ee=t(21764),ne=t(2713),te=t(38341),re=t(47999),ie=t(22673),oe=t(65730),le=t(38626),ce=t(16634),se=t(82944),ue=t(44162);function ae(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 de(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ae(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ae(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var pe=function(e){var n=e.blocks,t=e.updateVariables,r=e.variables,i=(0,u.useContext)(le.ThemeContext),o=(0,u.useCallback)((function(e,n){return t((function(){var t=(null===r||void 0===r?void 0:r.__mage_variables)||{},i=(null===t||void 0===t?void 0:t.blocks)||{},o=i[e]||{},c=(null===o||void 0===o?void 0:o.configuration)||{};return de(de({},r),{},{__mage_variables:de(de({},t),{},{blocks:de(de({},i),{},(0,l.Z)({},e,de(de({},o),{},{configuration:de(de({},c),n)})))})})}))}),[t,r]);return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(m.Z,{children:"dbt runtime settings"}),(0,K.jsx)(_.Z,{mt:N.Mq,children:(0,K.jsx)(w.Z,{columnFlex:[1,null,null,null],columns:[{uuid:"Block"},{uuid:"Flags"},{uuid:"Prefix"},{uuid:"Suffix"}],compact:!0,rows:null===n||void 0===n?void 0:n.map((function(e){var n,t,l,c=e.type,s=e.uuid,u=(0,L.IU)(e).name,a=(0,ue.qn)(c,{blockColor:e.color,theme:i}).accent,d=null===r||void 0===r||null===(n=r.__mage_variables)||void 0===n||null===(t=n.blocks)||void 0===t||null===(l=t[s])||void 0===l?void 0:l.configuration,p=d||{},f=p.prefix,m=p.suffix,v=(null===d||void 0===d?void 0:d.flags)||[],g=!(null===v||void 0===v||!v.includes(L.Dy));return[(0,K.jsx)(I.Z,{block:!0,label:(0,K.jsx)(S.ZP,{monospace:!0,small:!0,children:s}),size:null,widthFitContent:!0,children:(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(ce.Z,{color:a,size:1.5*N.iI,square:!0}),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsxs)(S.ZP,{monospace:!0,small:!0,children:[f&&(0,K.jsx)(S.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:f}),u,m&&(0,K.jsx)(S.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:m})]})]})},"uuid-".concat(s)),(0,K.jsx)(h.Z,{alignItems:"center",children:(0,K.jsx)(te.Z,{checked:g,label:L.Dy,monospace:!0,onClick:function(){return o(s,{flags:g?(0,R.Od)(v,(function(e){return L.Dy===e})):v.concat(L.Dy)})},small:!0})},"flags-".concat(s)),(0,K.jsx)(se.Z,{compact:!0,monospace:!0,onChange:function(e){return o(s,{prefix:e.target.value})},placeholder:"N+, +",small:!0,value:f,width:10*N.iI},"prefix-".concat(s)),(0,K.jsx)(se.Z,{compact:!0,monospace:!0,onChange:function(e){return o(s,{suffix:e.target.value})},placeholder:"+, +N",small:!0,value:m,width:10*N.iI},"suffix-".concat(s))]}))})})]})},fe=t(93461),he=t(26304),me=t(23831),ve=t(2005),ge=t(31012),je=["children","large","lineHeight","ordered"];function xe(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 be(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?xe(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ye=(0,le.css)([""," "," "," "," "," "," "," "," "," ",""],(function(e){return!e.muted&&"\n color: ".concat((e.theme.content||me.Z.content).default,";\n ")}),(function(e){return e.muted&&"\n color: ".concat((e.theme.content||me.Z.content).muted,";\n ")}),(function(e){return e.inverted&&"\n color: ".concat((e.theme.content||me.Z.content).inverted,";\n ")}),(function(e){return e.color&&"\n color: ".concat(e.color,";\n ")}),(function(e){return!e.monospace&&"\n font-family: ".concat(ve.ry,";\n ")}),(function(e){return e.monospace&&"\n font-family: ".concat(ve.Vp,";\n ")}),(function(e){return e.large&&"\n ".concat(ge.x_,"\n ")}),(function(e){return!e.large&&!e.small&&"\n ".concat(ge.i3,"\n ")}),(function(e){return e.small&&"\n ".concat(ge.J5,"\n ")}),(function(e){return e.lineHeight&&"\n line-height: ".concat(e.lineHeight,"px !important;\n ")})),Ze=le.default.ul.withConfig({displayName:"List__UnorderedListStyle",componentId:"sc-1f6yhbi-0"})(["",""],ye),Oe=le.default.ol.withConfig({displayName:"List__OrderedListStyle",componentId:"sc-1f6yhbi-1"})(["",""],ye),_e=le.default.li.withConfig({displayName:"List__ListItemStyle",componentId:"sc-1f6yhbi-2"})(["",""],(function(e){return e.large&&e.marginTop&&"\n margin-top: ".concat(1*N.iI,"px;\n ")}));var Pe=function(e){var n=e.children,t=e.large,r=e.lineHeight,i=e.ordered,o=(0,he.Z)(e,je),l=i?Oe:Ze;return(0,K.jsx)(l,be(be({large:t,lineHeight:r},o),{},{children:u.Children.map(n,(function(e,n){var r;return(0,K.jsx)(_e,be(be({large:t,marginTop:n>=1},o),{},{children:u.cloneElement(e)}),(null===(r=e.props)||void 0===r?void 0:r.key)||n)}))}))},we=t(98781),Se=t(70902),Ie=t(18025);function Ce(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 ke(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ce(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ce(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ee=function(e){var n=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:y.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:y.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:y.Xm.API}];return e?n.slice(0,1):n};var Te=function(e){var n=e.errors,t=e.fetchPipelineSchedule,r=e.pipeline,o=e.pipelineSchedule,c=e.setErrors,s=e.variables,g=(0,d.useRouter)(),x=null===r||void 0===r?void 0:r.uuid,P=null===o||void 0===o?void 0:o.id,I=(null===r||void 0===r?void 0:r.type)===we.qL.STREAMING,k=(0,u.useState)([]),E=k[0],U=k[1],F=(0,u.useState)(!1),L=F[0],q=F[1],W=(0,u.useState)(!1),J=W[0],B=W[1],G=(0,u.useState)(),Y=G[0],Q=G[1],le=(0,u.useState)({}),ce=le[0],ue=le[1],ae=(0,u.useState)(null),de=ae[0],he=ae[1],me=(0,u.useState)(!1),ve=me[0],ge=me[1],je=(0,u.useState)(null),xe=je[0],be=je[1],ye=(0,u.useMemo)((function(){return(0,H.wx)(s,(function(e){return e.uuid===Z.C}))}),[s]),Ze=de||{},Oe=Ze.name,_e=Ze.schedule_interval,Ce=Ze.schedule_type,Te=Ze.settings,De=void 0===Te?{}:Te,Ne=(Ze.sla,Ze.start_time),Me=Ze.variables,Re=void 0===Me?{}:Me;(0,u.useEffect)((function(){De&&Q(De)}),[De]);var Ae=(0,u.useState)(null),Ue=Ae[0],Fe=Ae[1],He=(0,u.useState)({hour:"00",minute:"00"}),ze=He[0],Le=He[1],qe=C.ZP.event_rules.detail(y.Xm.EVENT===Ce?"aws":null).data,Ve=(0,u.useMemo)((function(){var e;return(null===qe||void 0===qe||null===(e=qe.event_rule)||void 0===e?void 0:e.rules)||[]}),[qe]),We=(0,u.useMemo)((function(){return(0,R.HK)(Ve,(function(e){return e.name}))}),[Ve]),Xe=(0,a.Db)(C.ZP.pipeline_schedules.useUpdate(P),{onSuccess:function(e){return(0,X.wD)(e,{callback:function(){t(),g.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(x,"/triggers/").concat(P))},onErrorCallback:function(e,n){return c({errors:n,response:e})}})}}),Je=(0,i.Z)(Xe,2),Be=Je[0],Ke=Je[1].isLoading,Ge=(0,u.useMemo)((function(){return Re||{}}),[Re]);(0,u.useEffect)((function(){if(Ne){var e=Ne.split(" ")[1];Fe((0,z.eI)(Ne)),Le({hour:e.substring(0,2),minute:e.substring(3,5)})}else{var n=new Date;Fe(n),Le({hour:String(n.getUTCHours()).padStart(2,"0"),minute:String(n.getUTCMinutes()).padStart(2,"0")})}}),[Ne]),(0,u.useEffect)((function(){Ge&&Object.keys(Ge).length>0&&q(!0)}),[Ge]),(0,u.useEffect)((function(){ue(L?null===ye||void 0===ye?void 0:ye.reduce((function(e,n){var t=n.uuid,r=n.value;return ke(ke({},e),{},(0,l.Z)({},t,Ge[t]||r))}),{}):null)}),[ye,L,Ge]);var Ye=(0,u.useMemo)((function(){return _e&&!Object.values(y.U5).includes(_e)}),[_e]);(0,u.useEffect)((function(){if(o&&!de){U(o.event_matchers),(null===o||void 0===o?void 0:o.schedule_interval)&&!Object.values(y.U5).includes(null===o||void 0===o?void 0:o.schedule_interval)?(be(null===o||void 0===o?void 0:o.schedule_interval),he(ke(ke({},o),{},{schedule_interval:"custom"}))):he(I?ke(ke({},o),{},{schedule_interval:y.U5.ONCE}):o);var e=o.sla;if(e){B(!0);var n=(0,z.gU)(e),t=n.time,r=n.unit;he((function(e){return ke(ke({},e),{},{slaAmount:t,slaUnit:r})}))}}}),[I,o,de,_e]);var Qe=(0,u.useCallback)((function(){var e=ke(ke({},(0,V.GL)(de,["name","schedule_type"])),{},{event_matchers:[],schedule_interval:null,start_time:null,variables:(0,H.e7)(ce)});if(y.Xm.EVENT===de.schedule_type?e.event_matchers=E:(e.schedule_interval=Ye?xe:de.schedule_interval,e.start_time=Ue&&null!==ze&&void 0!==ze&&ze.hour&&null!==ze&&void 0!==ze&&ze.minute?"".concat(Ue.toISOString().split("T")[0]," ").concat(null===ze||void 0===ze?void 0:ze.hour,":").concat(null===ze||void 0===ze?void 0:ze.minute,":00"):null),J){var n=null===de||void 0===de?void 0:de.slaAmount,t=null===de||void 0===de?void 0:de.slaUnit;if(!n||isNaN(n)||!t)return void ee.Am.error("Please enter a valid SLA",{position:ee.Am.POSITION.BOTTOM_RIGHT,toastId:"sla_error"});e.sla=(0,z.vJ)(n,t)}else null!==o&&void 0!==o&&o.sla&&(e.sla=0);e.settings=Y,Be({pipeline_schedule:e})}),[xe,Ue,J,E,Ye,o,ce,de,Y,ze,Be]),$e=(0,u.useMemo)((function(){var e=[[(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(D.KJ,{default:!0,size:1.5*N.iI}),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_detail"),(0,K.jsx)(se.Z,{monospace:!0,onChange:function(e){e.preventDefault(),he((function(n){return ke(ke({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:Oe},"trigger_name_input_detail")],[(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(D.Pf,{default:!0,size:1.5*N.iI}),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"Frequency"})]},"frequency"),(0,K.jsxs)("div",{children:[(0,K.jsxs)(O.Z,{monospace:!0,onChange:function(e){e.preventDefault();var n=e.target.value;he((function(e){return ke(ke({},e),{},{schedule_interval:n})}))},placeholder:"Choose the frequency to run",value:_e,children:[Object.values(y.U5).map((function(e){return(0,K.jsx)("option",{value:e,children:e.substring(1)},e)})),(0,K.jsx)("option",{value:"custom",children:"custom"},"custom")]}),(0,K.jsx)(_.Z,{mt:1,p:1,children:(0,K.jsxs)(S.ZP,{muted:!0,small:!0,children:["If you don\u2019t see the frequency option you need, select ",(0,K.jsx)(S.ZP,{inline:!0,monospace:!0,small:!0,children:"custom"})," and enter CRON syntax."]})})]},"frequency_input")],[(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(D.aw,{default:!0,size:1.5*N.iI}),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"Start date and time"})]},"start_time"),(0,K.jsxs)("div",{style:{minHeight:"".concat(5.75*N.iI,"px")},children:[!ve&&(0,K.jsx)(se.Z,{monospace:!0,onClick:function(){return ge((function(e){return!e}))},placeholder:"YYYY-MM-DD HH:MM",value:Ue?"".concat(Ue.toISOString().split("T")[0]," ").concat(null===ze||void 0===ze?void 0:ze.hour,":").concat(null===ze||void 0===ze?void 0:ze.minute):""}),(0,K.jsx)("div",{style:{width:"400px"},children:(0,K.jsx)(re.Z,{disableEscape:!0,onClickOutside:function(){return ge(!1)},open:ve,style:{position:"relative"},children:(0,K.jsx)(ne.Z,{selectedDate:Ue,selectedTime:ze,setSelectedDate:Fe,setSelectedTime:Le,topPosition:!0})})})]},"start_time_input")]];return I&&e.splice(1,1),Ye&&e.splice(2,0,[(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(D.EK,{default:!0,size:1.5*N.iI}),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"Cron expression"})]},"cron_expression"),(0,K.jsxs)("div",{children:[(0,K.jsx)(se.Z,{monospace:!0,onChange:function(e){e.preventDefault(),be(e.target.value)},placeholder:"* * * * *",value:xe}),(0,K.jsxs)(_.Z,{mt:1,p:1,children:[(0,K.jsxs)(S.ZP,{muted:!0,small:!0,children:["If you want this pipeline to trigger every 1 minute, the CRON syntax is ",(0,K.jsx)(S.ZP,{inline:!0,monospace:!0,small:!0,children:"*/1 * * * *"}),"."]}),(0,K.jsxs)(S.ZP,{muted:!0,small:!0,children:["For more CRON syntax examples, check out this ",(0,K.jsx)(v.Z,{href:"https://crontab.guru/",openNewWindow:!0,small:!0,children:"resource"}),"."]})]})]},"cron_expression_input")]),(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(_.Z,{mb:2,px:N.cd,children:(0,K.jsx)(m.Z,{children:"Settings"})}),(0,K.jsx)(f.Z,{light:!0,short:!0}),(0,K.jsx)(w.Z,{columnFlex:[null,1],rows:e})]})}),[xe,Ue,Ye,I,Oe,_e,ve,ze]),en=(0,u.useCallback)((function(e,n){U((function(t){return Object.entries(n).forEach((function(n){var r=(0,i.Z)(n,2),o=r[0],l=r[1];t[e][o]=l})),(0,$.Z)(t)}))}),[U]),nn=(0,u.useMemo)((function(){return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(_.Z,{mb:N.cd,px:N.cd,children:(0,K.jsx)(m.Z,{children:"Settings"})}),(0,K.jsx)(f.Z,{light:!0,short:!0}),(0,K.jsx)(w.Z,{columnFlex:[null,1],rows:[[(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(D.KJ,{default:!0,size:1.5*N.iI}),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_event"),(0,K.jsx)(se.Z,{monospace:!0,onChange:function(e){e.preventDefault(),he((function(n){return ke(ke({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:Oe},"trigger_name_input_event")]]}),(0,K.jsxs)(_.Z,{mb:2,mt:5,px:N.cd,children:[(0,K.jsx)(m.Z,{children:"Events"}),(0,K.jsxs)(S.ZP,{muted:!0,children:["Add 1 or more event that will trigger this pipeline to run.",(0,K.jsx)("br",{}),"If you add more than 1 event, this pipeline will trigger if any of the events are received."]}),(0,K.jsxs)(_.Z,{mt:N.Mq,children:[(0,K.jsx)(S.ZP,{bold:!0,large:!0,children:"AWS events"}),(0,K.jsxs)(S.ZP,{muted:!0,children:["In order to retrieve all the possible AWS events you can trigger your pipeline from,",(0,K.jsx)("br",{}),"you\u2019ll need to set 3 environment variables (",(0,K.jsx)(v.Z,{href:"https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html",openNewWindow:!0,underline:!0,children:"more info here"}),"):"]}),(0,K.jsx)(_.Z,{mt:1,children:(0,K.jsxs)(Pe,{monospace:!0,ordered:!0,children:[(0,K.jsx)(S.ZP,{monospace:!0,children:"AWS_REGION_NAME"}),(0,K.jsx)(S.ZP,{monospace:!0,children:"AWS_ACCESS_KEY_ID"}),(0,K.jsx)(S.ZP,{monospace:!0,children:"AWS_SECRET_ACCESS_KEY"})]})})]})]}),(0,K.jsx)(f.Z,{light:!0,short:!0}),(null===E||void 0===E?void 0:E.length)>=1&&(0,K.jsx)(w.Z,{alignTop:!0,columnFlex:[1,1,2,null],columns:[{uuid:"Provider"},{uuid:"Event"},{uuid:"Pattern"},{label:function(){return""},uuid:"delete"}],rows:null===E||void 0===E?void 0:E.map((function(e,n){var t=e.event_type,r=e.name,i=e.pattern,o=e.id||"".concat(t,"-").concat(r,"-").concat(n,"-").concat(JSON.stringify(i)),l=[];return i&&JSON.stringify(i,null,2).split("\n").forEach((function(e){l.push(" ".concat(e))})),[(0,K.jsx)(O.Z,{monospace:!0,onChange:function(e){return en(n,{event_type:e.target.value})},placeholder:"Event provider",value:t||"",children:A.map((function(e){var n=e.label,t=e.uuid;return(0,K.jsx)("option",{value:t,children:n()},t)}))},"event-provider-".concat(o)),(0,K.jsx)(O.Z,{monospace:!0,onChange:function(e){var t,r=e.target.value,i=null===(t=We[r])||void 0===t?void 0:t.event_pattern;en(n,{name:r,pattern:i?JSON.parse(i):null})},placeholder:"Event name",value:r,children:Ve.map((function(e){var n=e.name;return(0,K.jsx)("option",{value:n,children:n},n)}))},"event-name-".concat(o)),i&&(0,K.jsx)(ie.Z,{language:"json",small:!0,source:l.join("\n")}),(0,K.jsx)(p.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return U((function(e){return(0,R.oM)(e,n)}))},children:(0,K.jsx)(D.rF,{default:!0,size:2*N.iI})},"remove_event")]}))}),(0,K.jsx)(_.Z,{p:N.cd,children:(0,K.jsx)(p.Z,{beforeIcon:(0,K.jsx)(D.mm,{size:2*N.iI}),onClick:function(){return U((function(e){return e.concat({})}))},outline:!0,children:"Add event matcher"})})]})}),[E,Ve,We,Oe,en]),tn=!0,rn=(0,u.useMemo)((function(){var e,n="";return n="".concat(window.origin,"/api/pipeline_schedules/").concat(null===o||void 0===o?void 0:o.id,"/pipeline_runs"),null!==o&&void 0!==o&&o.token&&(n="".concat(n,"/").concat(o.token)),(e=window.location.port)&&(n=n.replace(e,"6789")),(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(_.Z,{mb:N.cd,px:N.cd,children:(0,K.jsx)(m.Z,{children:"Settings"})}),(0,K.jsx)(f.Z,{light:!0,short:!0}),(0,K.jsx)(w.Z,{columnFlex:[null,1],rows:[[(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(D.KJ,{default:!0,size:1.5*N.iI}),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_api"),(0,K.jsx)(se.Z,{monospace:!0,onChange:function(e){e.preventDefault(),he((function(n){return ke(ke({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:Oe},"trigger_name_input_api")]]}),(0,K.jsxs)(_.Z,{mb:2,mt:5,px:N.cd,children:[(0,K.jsx)(m.Z,{children:"Endpoint"}),(0,K.jsxs)(S.ZP,{muted:!0,children:["Make a ",(0,K.jsx)(S.ZP,{bold:!0,inline:!0,monospace:!0,children:"POST"})," request to the following endpoint:"]}),(0,K.jsx)(_.Z,{mt:N.Mq,children:(0,K.jsx)(oe.Z,{copiedText:n,linkText:n,monospace:!0,withCopyIcon:!0})})]}),(0,K.jsxs)(_.Z,{mb:2,mt:5,px:N.cd,children:[(0,K.jsx)(m.Z,{children:"Payload"}),(0,K.jsx)(S.ZP,{muted:!0,children:"You can optionally include runtime variables in your request payload. These runtime variables are accessible from within each pipeline block."}),(0,K.jsx)(_.Z,{mt:N.Mq,children:(0,K.jsx)(oe.Z,{withCopyIcon:!0,copiedText:'{\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n}\n',children:(0,K.jsx)(ie.Z,{language:"json",small:!0,source:'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\n'})})})]}),(0,K.jsxs)(_.Z,{mb:2,mt:5,px:N.cd,children:[(0,K.jsx)(m.Z,{children:"Sample cURL command"}),(0,K.jsx)(_.Z,{mt:N.Mq,children:(0,K.jsx)(ie.Z,{language:"bash",small:!0,source:"\n curl -X POST ".concat(n,' \\\n --header \'Content-Type: application/json\' \\\n --data \'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\'\n')})})]})]})}),[Oe,o,tn]),on=!Ce||y.Xm.TIME===Ce&&!(I&&Ue||!I&&Ue&&_e)||y.Xm.EVENT===Ce&&(!(null!==E&&void 0!==E&&E.length)||!E.every((function(e){var n=e.event_type,t=e.name;return n&&t}))),ln=(0,u.useMemo)((function(){var e;return(null===r||void 0===r||null===(e=r.blocks)||void 0===e?void 0:e.filter((function(e){var n=e.type;return T.tf.DBT===n})))||[]}),[r]),cn=(0,u.useMemo)((function(){return(0,K.jsxs)(_.Z,{p:N.cd,children:[(0,K.jsxs)(_.Z,{mb:N.HN,children:[(0,K.jsx)(m.Z,{children:"Pipeline run settings"}),(0,K.jsx)(_.Z,{mt:N.Mq,children:(0,K.jsx)(h.Z,{alignItems:"center",children:(0,K.jsx)(te.Z,{checked:null===Y||void 0===Y?void 0:Y.allow_blocks_to_fail,label:"Keep running pipeline even if blocks fail",onClick:function(){return Q((function(e){return ke(ke({},e),{},{allow_blocks_to_fail:!(null!==Y&&void 0!==Y&&Y.allow_blocks_to_fail)})}))}})})}),y.Xm.TIME===Ce&&(0,K.jsx)(_.Z,{mt:N.Mq,children:(0,K.jsx)(h.Z,{alignItems:"center",children:(0,K.jsx)(te.Z,{checked:null===Y||void 0===Y?void 0:Y.skip_if_previous_running,label:"Skip run if previous run still in progress",onClick:function(){return Q((function(e){return ke(ke({},e),{},{skip_if_previous_running:!(null!==Y&&void 0!==Y&&Y.skip_if_previous_running)})}))}})})}),(0,K.jsxs)(_.Z,{mt:N.Mq,children:[(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(_.Z,{mr:2,children:(0,K.jsx)(Se.Z,{checked:J,onCheck:function(e){B(e),e||he((function(e){return ke(ke({},e),{},{slaAmount:0})}))}})}),(0,K.jsx)(S.ZP,{default:!0,monospace:!0,children:"Configure trigger SLA"})]}),J&&(0,K.jsx)(w.Z,{columnFlex:[null,1],rows:[[(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(D.aw,{default:!0,size:1.5*N.iI}),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(S.ZP,{default:!0,children:"SLA"})]},"sla_detail"),(0,K.jsxs)(h.Z,{children:[(0,K.jsx)(fe.Z,{flex:1,children:(0,K.jsx)(se.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),he((function(n){return ke(ke({},n),{},{slaAmount:e.target.value})}))},placeholder:"Time",value:null===de||void 0===de?void 0:de.slaAmount})}),(0,K.jsx)(fe.Z,{flex:1,children:(0,K.jsx)(O.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),he((function(n){return ke(ke({},n),{},{slaUnit:e.target.value})}))},placeholder:"Select time unit",small:!0,value:null===de||void 0===de?void 0:de.slaUnit,children:Object.keys(z.tL).map((function(e){return(0,K.jsx)("option",{value:e,children:"".concat(e,"(s)")},e)}))})})]},"sla_input_detail")]]})]})]}),(0,K.jsxs)(_.Z,{mb:N.HN,children:[(0,K.jsx)(m.Z,{children:"Runtime variables"}),!(0,V.Qr)(ye)&&(0,K.jsxs)(_.Z,{mt:N.Mq,children:[(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(_.Z,{mr:2,children:(0,K.jsx)(Se.Z,{checked:L,onCheck:q})}),(0,K.jsx)(S.ZP,{monospace:!0,muted:!0,children:"Overwrite global variables"})]}),L&&ce&&Object.entries(ce).length>0&&(0,K.jsx)(_.Z,{mt:1,children:(0,K.jsx)(w.Z,{columnFlex:[null,1],columns:[{uuid:"Variable"},{uuid:"Value"}],rows:Object.entries(ce).reduce((function(e,n){var t=(0,i.Z)(n,2),r=t[0],o=t[1];return b.sZ===r?e:e.concat([[(0,K.jsx)(S.ZP,{default:!0,monospace:!0,children:r},"variable_".concat(r)),(0,K.jsx)(se.Z,{borderless:!0,monospace:!0,onChange:function(e){e.preventDefault(),ue((function(n){return ke(ke({},n),{},(0,l.Z)({},r,e.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:o},"variable_uuid_input_".concat(r))]])}),[])})})]})]}),(null===ln||void 0===ln?void 0:ln.length)>=1&&(0,K.jsx)(_.Z,{mb:N.HN,children:(0,K.jsx)(pe,{blocks:ln,updateVariables:ue,variables:ke(ke({},Ge),ce)})})]})}),[ln,J,ye,L,ce,de,Ce,Ge,B,q,ue,Y]);return(0,K.jsx)(K.Fragment,{children:(0,K.jsxs)(j.Z,{after:cn,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(x,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return null===o||void 0===o?void 0:o.name},linkProps:{as:"/pipelines/".concat(x,"/triggers/").concat(P),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],errors:n,pageName:M.M.TRIGGERS,pipeline:r,setErrors:c,subheader:(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(p.Z,{disabled:on,loading:Ke,onClick:Qe,outline:!0,primary:!0,children:"Save changes"}),(0,K.jsx)(_.Z,{mr:1}),(0,K.jsx)(p.Z,{linkProps:{href:"/pipelines/[pipeline]/triggers/[...slug]",as:"/pipelines/".concat(x,"/triggers/").concat(P)},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"})]}),title:function(){return"Edit ".concat(null===o||void 0===o?void 0:o.name)},uuid:"triggers/edit",children:[(0,K.jsxs)(_.Z,{p:N.cd,children:[(0,K.jsxs)(_.Z,{mb:2,children:[(0,K.jsx)(m.Z,{children:"Trigger type"}),(0,K.jsx)(S.ZP,{muted:!0,children:"How would you like this pipeline to be triggered?"})]}),(0,K.jsx)(h.Z,{children:Ee(I).map((function(e){var n=e.label,t=e.description,r=e.uuid,i=Ce===r,o=Ce&&!i;return(0,K.jsx)(p.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){y.Xm.EVENT!==r||null!==E&&void 0!==E&&E.length||U([{}]),he((function(e){return ke(ke({},e),{},{schedule_type:r})}))},children:(0,K.jsx)(Ie.U,{selected:i,children:(0,K.jsxs)(h.Z,{alignItems:"center",children:[(0,K.jsx)(fe.Z,{children:(0,K.jsx)("input",{checked:i,type:"radio"})}),(0,K.jsx)(_.Z,{mr:N.cd}),(0,K.jsxs)(fe.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,K.jsx)(m.Z,{bold:!0,default:!i&&!o,level:5,muted:!i&&o,children:n()}),(0,K.jsx)(S.ZP,{default:!i&&!o,leftAligned:!0,muted:o,children:t()})]})]})})},r)}))})]}),(0,K.jsxs)(_.Z,{mt:5,children:[y.Xm.TIME===Ce&&$e,y.Xm.EVENT===Ce&&nn,y.Xm.API===Ce&&rn]})]})})},De=t(41788),Ne=t(70543);function Me(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 Re(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Me(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Me(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function Ae(e){var n=e.pipelineScheduleId,t=e.pipelineUUID,r=e.subpath,i=(0,u.useState)(null),o=i[0],l=i[1],c=C.ZP.variables.pipelines.list(t,{},{revalidateOnFocus:!1}).data,s=null===c||void 0===c?void 0:c.variables,a=C.ZP.pipeline_schedules.detail(n),d=a.data,p=a.mutate,f=null===d||void 0===d?void 0:d.pipeline_schedule,h=C.ZP.pipelines.detail(t,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,m=Re(Re({},null===h||void 0===h?void 0:h.pipeline),{},{uuid:t});return Ne.b7===r?(0,K.jsx)(Te,{errors:o,fetchPipelineSchedule:p,pipeline:m,pipelineSchedule:f,setErrors:l,variables:s}):(0,K.jsx)(Q,{errors:o,fetchPipelineSchedule:p,pipeline:m,pipelineSchedule:f,setErrors:l,variables:s})}Ae.getInitialProps=function(){var e=(0,o.Z)(s().mark((function e(n){var t,r,o,l,c,u;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.query,r=t.pipeline,o=t.slug,!Array.isArray(o)){e.next=4;break}return l=(0,i.Z)(o,2),c=l[0],u=l[1],e.abrupt("return",{pipelineScheduleId:c,pipelineUUID:r,subpath:u});case 4:return e.abrupt("return",{pipelineUUID:r});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var Ue=(0,De.Z)(Ae)},95488:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers/[...slug]",function(){return t(70422)}])}},function(e){e.O(0,[844,9902,426,1774,8792,7849,4495,1424,1005,7815,3654,547,8952,8312,9774,2888,179],(function(){return n=95488,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|