"use strict";(self.webpackChunk_dagster_io_dagit_app=self.webpackChunk_dagster_io_dagit_app||[]).push([[488],{51664:function(n,t,e){e.d(t,{R:function(){return i}});var i=function(n){return"result"!==n.solid.name?"".concat(n.solid.name,":").concat(n.definition.name):n.solid.name}},85488:function(n,t,e){e.r(t),e.d(t,{layoutOpGraph:function(){return f},layoutOp:function(){return s}});e(59019);var i=e(83975),o=e(51664),r=52,u=26,a=13,h=70;function d(n){var t={};return n.forEach((function(n){return n.forEach((function(n){return t[(0,o.R)(n)]=n}))})),Object.values(t)}function f(n,t){var e=new i.graphlib.Graph,o=0,r=100,f=100;t&&(o=Math.max(t.inputs.length,t.outputs.length)*u,r=(f=140)+o),e.setGraph({rankdir:"TB",marginx:f,marginy:r}),e.setDefaultEdgeLabel((function(){return{}}));var p=[],g={};n.forEach((function(n){g[n.name]=!0})),n.forEach((function(n){var t=s(n,{x:0,y:0});e.setNode(n.name,{width:t.bounds.width,height:t.bounds.height}),n.inputs.forEach((function(t){t.dependsOn.forEach((function(i){g[i.solid.name]&&g[n.name]&&(e.setEdge({v:i.solid.name,w:n.name},{weight:1}),p.push({from:{point:{x:0,y:0},opName:i.solid.name,edgeName:i.definition.name},to:{point:{x:0,y:0},opName:n.name,edgeName:t.definition.name}}))}))}))})),i.layout(e);var l={},m={};e.nodes().forEach((function(n){var t=e.node(n);t&&(m[n]=t)}));var y=0,x=0;Object.keys(m).forEach((function(t){var e=m[t],i=n.find((function(n){return n.name===t}));if(i){var o=e.x-e.width/2,r=e.y-e.height/2;l[t]=s(i,{x:o,y:r}),y=Math.max(y,o+e.width),x=Math.max(x,r+e.height)}})),e.edges().forEach((function(n){var t=p.find((function(t){return t.from.opName===n.v&&t.to.opName===n.w})),i=e.edge(n).points;t&&(t.from.point=i[0],t.to.point=i[i.length-1])}));var v={edges:p,nodes:l,width:y+f,height:x+r,parent:null};return t&&(v.parent=function(n,t,e){var i={invocationBoundingBox:{x:1,y:1,width:n.width-1,height:n.height-1},bounds:{x:h,y:h+e,width:n.width-140,height:n.height-2*(h+e)},mappingLeftEdge:50,mappingLeftSpacing:10,inputs:{},outputs:{},dependsOn:c(d(t.inputs.map((function(n){return n.dependsOn}))),-50,n.width),dependedBy:c(d(t.outputs.map((function(n){return n.dependedBy}))),n.height+50,n.width)},o=i.bounds.y+i.bounds.height;return t.inputs.forEach((function(n,t){i.inputs[n.definition.name]={layout:{x:i.bounds.x,y:i.bounds.y-t*u-u,width:0,height:u},port:{x:i.bounds.x+a,y:i.bounds.y-t*u-13}}})),t.outputs.forEach((function(n,t){i.outputs[n.definition.name]={layout:{x:i.bounds.x,y:o+t*u,width:0,height:u},port:{x:i.bounds.x+a,y:o+t*u+13}}})),i}(v,t,o)),v}function c(n,t,e){var i=e-166,r=Math.max(200,i/n.length),u=83+Math.min(0,(i-n.length*r)/2),a=r<300?20:0,h={};return n.forEach((function(n,e){var i=1-e%2*2;h[(0,o.R)(n)]={x:u+e*r,y:t+a*i}})),h}function s(n,t){var e=t.y,i={},o=function(n,i){var o=(370-35*i)/2,r=t.x+35*n+o;return{port:{x:r+a,y:e+13},layout:{x:r,y:e,width:35,height:u}}},h=function(){var n={port:{x:t.x+a,y:e+13},layout:{x:t.x,y:e,width:0,height:u}};return e+=u,n};n.inputs.forEach((function(t,e){i[t.definition.name]=n.inputs.length>4?o(e,n.inputs.length):h()})),n.inputs.length>4&&(e+=u);var d={x:t.x,y:Math.max(t.y,e-0),width:370,height:52};e+=r,n.definition.assetNodes.length&&n.definition.description&&(d.height+=22,e+=22);var f={};return n.outputs.forEach((function(t,e){f[t.definition.name]=n.outputs.length>4?o(e,n.outputs.length):h()})),n.outputs.length>4&&(e+=u),{bounds:{x:t.x-5,y:t.y-5,width:380,height:e-t.y+10},op:d,inputs:i,outputs:f}}},51844:function(n,t,e){function i(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,i=new Array(t);e<t;e++)i[e]=n[e];return i}e.d(t,{Z:function(){return i}})},28077:function(n,t,e){function i(n){if("undefined"!==typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}e.d(t,{Z:function(){return i}})},59019:function(n,t,e){e.d(t,{Z:function(){return u}});var i=e(51844);var o=e(28077),r=e(5693);function u(n){return function(n){if(Array.isArray(n))return(0,i.Z)(n)}(n)||(0,o.Z)(n)||(0,r.Z)(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},5693:function(n,t,e){e.d(t,{Z:function(){return o}});var i=e(51844);function o(n,t){if(n){if("string"===typeof n)return(0,i.Z)(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?(0,i.Z)(n,t):void 0}}}}]);
//# sourceMappingURL=488.7d8dcc7e.chunk.js.map