(self.webpackChunk_mlflow_mlflow=self.webpackChunk_mlflow_mlflow||[]).push([[4139],{11825:function(e,t,n){"use strict";n.d(t,{H:function(){return c},W:function(){return l}});var i=n(46709),r=n(34499);const o={paper_bgcolor:"white",plot_bgcolor:"white"},s={width:1200,height:600},a={displaylogo:!1,modeBarButtonsToRemove:["toImage"]},l=(e,t)=>(n,i)=>(0,r.downloadImage)({data:e,layout:{...t,...o},config:a},{...s,format:n,filename:i}),c=()=>{const e=(0,i.useRef)(null),[t,n]=(0,i.useState)(null),r=(0,i.useCallback)((t=>{e.current=t,n((t=>t||((t,n)=>{var i;return null===(i=e.current)||void 0===i?void 0:i.call(e,t,n)})))}),[]);return[t,r]}},12479:function(e,t,n){"use strict";n.d(t,{l:function(){return g}});var i=n(76118),r=n(46709);const o=/\$\{([^}]+)\}/g;var s=function(e){return e.ADD="+",e.SUBTRACT="-",e.MULTIPLY="*",e.DIVIDE="/",e.POWER="^",e.NEGATIVE_SIGN="_",e.POSITIVE_SIGN="|",e}(s||{}),a=function(e){return e.OPEN="(",e.CLOSE=")",e}(a||{}),l=function(e){return e.OPEN="{",e.CLOSE="}",e}(l||{});const c={[s.ADD]:1,[s.SUBTRACT]:1,[s.MULTIPLY]:2,[s.DIVIDE]:2,[s.POWER]:3,[s.NEGATIVE_SIGN]:4,[s.POSITIVE_SIGN]:4},d=e=>"string"===typeof e&&[s.ADD,s.SUBTRACT,s.MULTIPLY,s.DIVIDE,s.POWER].includes(e),u=e=>"string"===typeof e&&[s.NEGATIVE_SIGN,s.POSITIVE_SIGN].includes(e),p=e=>e.slice(2,-1),h=(e,t)=>{const n=e.pop();if(void 0===n)throw new Error("Invalid expression: stack is empty");if(d(n)){if(t[t.length-1]<2)throw new Error("Invalid expression: Stack has binary operator without enough operands");t[t.length-1]--}else{if(!u(n))throw new Error("Invalid expression: Stack has invalid elements");if(t[t.length-1]<1)throw new Error("Invalid expression: Stack has unary operator without enough operands")}return n},m=(e,t,n)=>{for(;e.length>0&&u((0,i.last)(e));)t.push(h(e,n))},g=()=>({compileExpression:(0,r.useCallback)(((e,t)=>{try{const n=e.replace(o,"");if(!/^[0-9+\-*/().\s^]*$/.test(n))return;const{expression:r,variables:g}=(e=>{const t=e.match(o);if(!t)return{expression:e,variables:[]};const n=(0,i.uniq)(t),r={};return n.forEach(((e,t)=>{r[e]=`\${${t}}`})),{expression:e.replace(o,(e=>e in r?r[e]:e)),variables:n.map(p)}})(e);for(const e of g)if(!t.includes(e))return;const v=r.replace(/\s/g,""),f=(e=>{const t=[],n=[],r=[0],o=()=>{r[r.length-1]++};for(let g=0;g<e.length;g++){let v=e[g];const f=0===g||d(e[g-1])||e[g-1]===a.OPEN;if(v===s.SUBTRACT&&f?v=s.NEGATIVE_SIGN:v===s.ADD&&f&&(v=s.POSITIVE_SIGN),"$"===v){let i="";if(g+1>=e.length||e[g+1]!==l.OPEN)throw new Error("Invalid expression: Variable must be followed by {");for(g++;g+1<e.length&&e[g+1]!==l.CLOSE;)i+=e[++g];g++,n.push(i),o(),m(t,n,r)}else if(/\d/.test(v)||"."===v){let i=v;for(;g+1<e.length&&(/\d/.test(e[g+1])||"."===e[g+1]);)i+=e[++g];const s=i.match(/\./g);if(s&&s.length>1)throw new Error("Invalid expression: Number has multiple decimal points");const a=parseFloat(i);o(),n.push(a),m(t,n,r)}else if(u(v))t.push(v);else if(d(v)){if(0===n.length)throw new Error("Invalid expression: Binary operator without operands");for(;t.length>0&&d((0,i.last)(t))&&(p=(0,i.last)(t),c[p]>c[v]||(0,i.last)(t)===v&&v!==s.POWER);)n.push(h(t,r));t.push(v)}else if(v===a.OPEN)t.push(v),r.push(0);else{if(v!==a.CLOSE)throw new Error("Invalid expression: Unknown character in expression");for(;t.length>0&&(0,i.last)(t)!==a.OPEN;)n.push(h(t,r));if(t.pop()!==a.OPEN)throw new Error("Invalid expression: Parenthesis mismatch");if(1!==r[r.length-1])throw new Error("Invalid expression: Parenthesis does not have exactly one operand");r.pop(),o(),m(t,n,r)}}for(var p;t.length>0;)n.push(h(t,r));if(1!==r.length||1!==r[0])throw new Error("Invalid expression: Invalid number of operands");return n})(v.replace(o,(e=>{const t=parseInt(e.slice(2,-1),10);return`\${${g[t]}}`})));return{rpn:f,variables:g,expression:e}}catch(n){return}}),[]),evaluateExpression:(e,t)=>{if(void 0!==e)try{return(e=>{const t=[];if(e.forEach((e=>{if("number"!==typeof e)if(u(e)){const n=t.pop();if("number"!==typeof n)throw new Error("Invalid expression: Unary operator without operand");switch(e){case s.NEGATIVE_SIGN:t.push(-n);break;case s.POSITIVE_SIGN:t.push(n)}}else{if(!d(e))throw new Error("Invalid expression: Unknown token in expression");{const n=t.pop(),i=t.pop();if("number"!==typeof i||"number"!==typeof n)throw new Error("Invalid expression: Binary operator without enough operands");switch(e){case s.ADD:t.push(i+n);break;case s.SUBTRACT:t.push(i-n);break;case s.MULTIPLY:t.push(i*n);break;case s.DIVIDE:t.push(i/n);break;case s.POWER:t.push(Math.pow(i,n))}}}else t.push(e)})),1!==t.length||"number"!==typeof t[0])throw new Error("Invalid expression: Invalid expression result");return t[0]})(e.rpn.map((n=>"string"===typeof n&&e.variables.includes(n)?t[n]:n)))}catch(n){return}}})},12760:function(e,t,n){"use strict";n.d(t,{S:function(){return m}});var i=n(76118),r=n(46709),o=n(56530),s=n(53274),a=n(42506),l=n(55274),c=n(11522),d=n(31655),u=n(81641),p=n(7655);const h=u.J1`
  query GetMetricHistoryBulkInterval($data: MlflowGetMetricHistoryBulkIntervalInput!)
  @component(name: "MLflow.ExperimentRunTracking") {
    mlflowGetMetricHistoryBulkInterval(input: $data) {
      __typename
      metrics {
        timestamp
        step
        runId
        key
        value
      }
      apiError {
        code
        message
      }
    }
  }
`,m=e=>{const{metricKeys:t,enabled:n,autoRefreshEnabled:m,runUuids:g}=e,v=(0,d.X1)()&&1===t.length&&g.length<=100,f=(e=>{const{metricKeys:t,runUuids:n,enabled:d,maxResults:u,range:p,autoRefreshEnabled:h}=e,m=(0,o.wA)(),{resultsByRunUuid:g,isLoading:v,isRefreshing:f}=(0,o.d4)((e=>{const r=(0,s.Cx)(p);let o=!1,a=!1;const l=n.map((n=>{const i=t.reduce(((t,i)=>{var s,l;const c=null===(s=e.entities.sampledMetricsByRunUuid[n])||void 0===s||null===(l=s[i])||void 0===l?void 0:l[r];return c?(a=a||Boolean(c.loading),o=o||Boolean(c.refreshing),t[i]=c,t):t}),{});return{runUuid:n,...i}}));return{isLoading:a,isRefreshing:o,resultsByRunUuid:(0,i.keyBy)(l,"runUuid")}}),((e,t)=>(0,i.isEqual)(e.resultsByRunUuid,t.resultsByRunUuid)&&e.isLoading===t.isLoading&&e.isRefreshing===t.isRefreshing)),y=(0,r.useCallback)((()=>{t.forEach((e=>{(0,i.chunk)(n,100).forEach((t=>{const n=(0,a.H)(t,e,u,p,"all");m(n)}))}))}),[m,u,n,t,p]),x=(0,r.useRef)(void 0),b=(0,r.useRef)(h&&e.enabled);b.current=h&&e.enabled;const M=(0,r.useMemo)((()=>n.join(",")),[n]);return(0,r.useEffect)((()=>{d&&!h&&t.forEach((e=>{(0,i.chunk)(n,100).forEach((t=>{const n=(0,a.H)(t,e,u,p);m(n)}))}))}),[m,u,n,t,p,d,h]),(0,r.useEffect)((()=>{let e=!1;if(!d||!h)return;const n=async(e=!1)=>{const n=M.split(",").filter((e=>""!==e));await Promise.all(t.map((async t=>Promise.all((0,i.chunk)(n,100).map((async n=>m((0,a.H)(n,t,u,p,e?"auto":void 0))))))))},r=async()=>{if(b.current&&!e){try{await n(!0)}catch(t){c.A.logErrorAndNotifyUser(t)}clearTimeout(x.current),b.current&&!e&&(x.current=window.setTimeout(r,l.ZT))}};return n().then(r),()=>{e=!0,clearTimeout(x.current)}}),[m,u,M,t,p,d,h]),{isLoading:v,isRefreshing:f,resultsByRunUuid:g,refresh:y}})({...e,enabled:n&&!v,autoRefreshEnabled:m&&!v}),y=(({metricKey:e,runUuids:t,autoRefreshEnabled:n,enabled:o,maxResults:s=320,range:a})=>{var d,m,g;const v=(0,p.A)(),{data:f,refetch:y,startPolling:x,stopPolling:b,networkStatus:M,error:C}=(0,u.IT)(h,{skip:!o,notifyOnNetworkStatusChange:!0,pollInterval:n?l.ZT:void 0,onCompleted(e){var t,n,i,r;"RESOURCE_DOES_NOT_EXIST"===(null===(t=e.mlflowGetMetricHistoryBulkInterval)||void 0===t||null===(n=t.apiError)||void 0===n?void 0:n.code)?c.A.displayGlobalErrorNotification(v.formatMessage({id:"hm9IM7",defaultMessage:"Requested resource does not exist"})):null!==(i=e.mlflowGetMetricHistoryBulkInterval)&&void 0!==i&&null!==(r=i.apiError)&&void 0!==r&&r.message&&c.A.logErrorAndNotifyUser(new Error(e.mlflowGetMetricHistoryBulkInterval.apiError.message))},variables:{data:{runIds:t,metricKey:e,startStep:null!==(d=null===a||void 0===a?void 0:a[0])&&void 0!==d?d:null,endStep:null!==(m=null===a||void 0===a?void 0:a[1])&&void 0!==m?m:null,maxResults:s}}});return(0,r.useEffect)((()=>{n?x(l.ZT):b()}),[n,x,b]),{resultsByRunUuid:(0,r.useMemo)((()=>{if(f){var n;const r=null===f||void 0===f||null===(n=f.mlflowGetMetricHistoryBulkInterval)||void 0===n?void 0:n.metrics,o=(0,i.groupBy)(r,"runId");return(0,i.keyBy)(t.map((t=>{var n;return{runUuid:t,[e]:{metricsHistory:null===(n=o[t])||void 0===n?void 0:n.map((({key:e,step:t,timestamp:n,value:i})=>({key:null!==e&&void 0!==e?e:void 0,step:Number(t),timestamp:Number(n),value:null!==i&&void 0!==i?i:void 0})))}}})),"runUuid")}return{}}),[f,e,t]),isLoading:M===u.pT.loading||M===u.pT.setVariables,isRefreshing:M===u.pT.poll,refresh:y,error:C,apiError:null===f||void 0===f||null===(g=f.mlflowGetMetricHistoryBulkInterval)||void 0===g?void 0:g.apiError}})({...e,metricKey:t[0],enabled:n&&v,autoRefreshEnabled:m&&v});return v?y:f}},18756:function(e,t,n){"use strict";n.d(t,{G:function(){return v}});var i=n(68248),r=n(76118),o=n(46709),s=n(44707),a=n(77680),l=n(7655),c=n(53274),d=n(27757),u=n(31655),p=n(73408);const h=({value:e})=>(0,p.FD)(p.FK,{children:[(0,p.Y)(a.XU,{value:e,year:"numeric"}),"-",(0,p.Y)(a.XU,{value:e,month:"2-digit"}),"-",(0,p.Y)(a.XU,{value:e,day:"2-digit"})," ",(0,p.Y)(a.ib,{value:e,hour:"numeric",hourCycle:"h24"}),":",(0,p.Y)(a.ib,{value:e,minute:"2-digit"}),":",(0,p.Y)(a.ib,{value:e,second:"2-digit",fractionalSecondDigits:3})]}),m=({value:e})=>(0,p.FD)(p.FK,{children:[(0,p.Y)(a.ib,{value:e,hour:"2-digit",hourCycle:"h23"}),":",(0,p.Y)(a.ib,{value:e,minute:"2-digit"}),":",(0,p.Y)(a.ib,{value:e,second:"2-digit",fractionalSecondDigits:3})]});var g={name:"1efi8gv",styles:"font-weight:bold"};const v=({hoverData:e})=>{const{tooltipLegendItems:t,hoveredDataPoint:n,xValue:a,xAxisKeyLabel:v}=e,{traceUuid:f,metricEntity:y}=n||{},x=(0,l.A)(),{theme:b}=(0,d.u)(),M=`${f}.${null===y||void 0===y?void 0:y.key}`,C=e.xAxisKey===c.fj.METRIC?v:x.formatMessage((0,c.fw)(e.xAxisKey));return t?(0,p.FD)("div",{children:[!(0,r.isUndefined)(a)&&(0,p.FD)("div",{css:(0,i.AH)({marginBottom:b.spacing.xs},""),children:[(0,p.Y)("span",{css:g,children:C})," ",e.xAxisKey===c.fj.TIME?(0,p.Y)(h,{value:a}):(0,u.v$)()&&e.xAxisKey===c.fj.TIME_RELATIVE?(0,p.Y)(m,{value:a}):a]}),(0,p.Y)("div",{css:(0,i.AH)({display:"grid",gridTemplateColumns:`${b.general.iconSize}px auto auto`,columnGap:b.spacing.sm,rowGap:b.spacing.sm/4,alignItems:"center"},""),children:t.map((({displayName:e,color:t,uuid:n,value:a,dashStyle:l})=>(0,p.FD)(o.Fragment,{children:[(0,p.Y)(s.Y,{color:t||"transparent",dashStyle:l}),(0,p.Y)("div",{css:(0,i.AH)({marginRight:b.spacing.md,fontSize:b.typography.fontSizeSm,color:M===n?"unset":b.colors.textPlaceholder},""),children:e}),(0,p.Y)("div",{children:!(0,r.isUndefined)(a)&&(0,p.Y)("span",{css:(0,i.AH)({fontWeight:M===n?"bold":"normal",color:M===n?"unset":b.colors.textPlaceholder},""),children:a})})]},n)))})]}):null}},19398:function(e,t,n){"use strict";n.d(t,{i:function(){return xe}});var i=n(46709),r=n(86133),o=n(95119),s=n(53274),a=n(95368),l=n(35286),c=n(32158),d=n(12760),u=n(76118),p=n(31655);const h=(e,t,n,i)=>{const r=(0,u.compact)(t.map((t=>{var r;const o=null===(r=e[t])||void 0===r?void 0:r[n];return o?((e,t,n=!0)=>{const i=(0,u.orderBy)((0,u.compact)((0,u.values)(e).map((({metricsHistory:e})=>e)).flat()),"timestamp");if(i.length<2)return;const r=new Date(t[0]).valueOf(),o=new Date(t[1]).valueOf();let s=n?(0,u.first)(i):void 0;for(let l=0;l<i.length;l++){const e=i[l];if(e.timestamp>r){s=i[l-1]||e;break}}let a=n?(0,u.last)(i):void 0;for(let l=i.length-1;l>=0;l--){const e=i[l];if(e.timestamp<o){a=i[l+1]||e;break}}return(0,u.isUndefined)(s)||(0,u.isUndefined)(a)?void 0:[s.step,a.step]})(o,i,!1):void 0}))),o=(0,u.min)(r.map((([e])=>e))),s=(0,u.max)(r.map((([,e])=>e)));if(!(0,u.isUndefined)(o)&&!(0,u.isUndefined)(s))return[o,s]},m=(e,t,n,i=1e3)=>{const r=(0,u.compact)(t.map((t=>{var r;const o=e[t];if(!o)return null;const{runUuid:s,...a}=o,l=(0,u.values)(a).flatMap((e=>{var t;return null!==(t=e.metricsHistory)&&void 0!==t?t:[]})),c=(null===(r=(0,u.minBy)(l,"timestamp"))||void 0===r?void 0:r.timestamp)||0;return[n[0]*i+c,n[1]*i+c]}))),o=(0,u.min)(r.map((([e])=>e))),s=(0,u.max)(r.map((([,e])=>e)));if(!(0,u.isUndefined)(o)&&!(0,u.isUndefined)(s))return[o,s]};var g=n(56530);var v=n(30197),f=n(11825),y=n(90142),x=n(84334),b=n(92924),M=n(73408);const C=e=>{if((0,p.Iq)()&&e.yAxisKey===r.Kb.EXPRESSION){var t;const n=(null===(t=e.yAxisExpressions)||void 0===t?void 0:t.map((e=>e.expression)))||[];return(null===n||void 0===n?void 0:n.join(" vs "))||""}return e.selectedMetricKeys&&0!==e.selectedMetricKeys.length?e.selectedMetricKeys.join(" vs "):e.metricKey},w=["png","svg","csv","csv-full"],E=({config:e,chartRunData:t,onDelete:n,onEdit:o,onDownloadFullMetricHistoryCsv:E,groupBy:I,fullScreen:k,setFullScreenChart:R,autoRefreshEnabled:A,hideEmptyCharts:D,globalLineChartConfig:T,isInViewport:Y,isInViewportDeferred:_,positionInSection:U,...N})=>{var L;const{xAxisKey:H,selectedXAxisMetricKey:K,lineSmoothness:P}=(0,b.x)(e,T),F=(0,i.useCallback)((()=>{null===R||void 0===R||R({config:e,title:C(e),subtitle:null})}),[e,R]),B=(0,i.useMemo)((()=>t.filter((({hidden:e})=>!e)).reverse()),[t]),O=(0,i.useMemo)((()=>B.some((e=>e.groupParentInfo))),[B]),z=(0,i.useMemo)((()=>{var t;const n=null!==(t=e.selectedMetricKeys)&&void 0!==t?t:[e.metricKey],i=B.flatMap((({metrics:e})=>Object.keys(e)));return 0===(0,u.intersection)(n,(0,u.uniq)(i)).length}),[e,B]),j=(0,i.useMemo)((()=>{if(O){return[...(0,u.compact)(B.map((e=>e.groupParentInfo))).flatMap((e=>e.runUuids)),...(0,u.compact)(B.filter((e=>!e.groupParentInfo&&!e.belongsToGroup)).map((e=>{var t;return null===(t=e.runInfo)||void 0===t?void 0:t.runUuid})))]}return(0,u.compact)(B.map((e=>{var t;return null===(t=e.runInfo)||void 0===t?void 0:t.runUuid})))}),[B,O]),V=(0,i.useMemo)((()=>{const t=(e=>{var t;const n=[e.metricKey];var i;if(!(0,p.Iq)()||e.yAxisKey!==r.Kb.EXPRESSION)return null!==(i=e.selectedMetricKeys)&&void 0!==i?i:n;const o=null===(t=e.yAxisExpressions)||void 0===t?void 0:t.reduce(((e,t)=>(t.variables.forEach((t=>e.add(t))),e)),new Set);return void 0===o?n:Array.from(o)})(e),n=K?[K]:[];return t.concat(n)}),[e,K]),{setTooltip:W,resetTooltip:G,destroyTooltip:$,selectedRunUuid:X}=(0,l.uN)(e,l.QS.MultipleTracesWithScanline),q=k||Y,J=k||_,{aggregateFunction:Q}=I||{},Z=(0,g.d4)((e=>(0,u.pick)(e.entities.sampledMetricsByRunUuid,j)),g.bN),[ee,te]=(0,i.useState)((()=>{if(e.range&&!(0,u.isUndefined)(e.range.yMin)&&!(0,u.isUndefined)(e.range.yMax))return[e.range.yMin,e.range.yMax]})),{setOffsetTimestamp:ne,stepRange:ie,xRangeLocal:re,setXRangeLocal:oe}=((e,t,n,r,o,a="linear")=>{const[l,c]=(0,i.useState)((()=>{if(e.range&&!(0,u.isUndefined)(e.range.xMin)&&!(0,u.isUndefined)(e.range.xMax))return[e.range.xMin,e.range.xMax]})),[d,p]=(0,i.useState)(void 0);return{setOffsetTimestamp:p,stepRange:(0,i.useMemo)((()=>{if(l){if(t===s.fj.TIME&&(0,u.isString)(l[0])&&(0,u.isString)(l[1]))return h(r,o,n,l);if(t===s.fj.TIME_RELATIVE&&d&&(0,u.isNumber)(l[0])&&(0,u.isNumber)(l[1]))return h(r,o,n,d);if(t===s.fj.STEP&&(0,u.isNumber)(l[0])&&(0,u.isNumber)(l[1])){const e=Math.floor("log"===a?10**l[0]:l[0]),t=Math.ceil("log"===a?10**l[1]:l[1]);return e&&t?[e-1,t+1]:void 0}}}),[t,n,l,r,o,d,a]),xRangeLocal:l,setXRangeLocal:c}})(e,H,e.metricKey,Z,j,H===s.fj.STEP?e.xAxisScaleType:"linear"),{resultsByRunUuid:se,isLoading:ae,isRefreshing:le}=(0,d.S)({runUuids:j,metricKeys:V,enabled:J,maxResults:320,range:ie,autoRefreshEnabled:A});(0,i.useEffect)((()=>{$()}),[$,ae]);const ce=(0,i.useMemo)((()=>B.map((t=>{const n=V.reduce(((n,i)=>{var r,o;const a=null===(r=se[t.uuid])||void 0===r||null===(o=r[i])||void 0===o?void 0:o.metricsHistory;return a&&(n[i]=e.ignoreOutliers?(0,s.c1)(a):a),n}),{});return{...t,metricsHistory:n}}))),[V,se,B,e.ignoreOutliers]),de=(0,v.B)({enabled:O,ungroupedRunsData:ce,metricKeys:V,sampledDataResultsByRunUuid:se,aggregateFunction:Q,selectedXAxisMetricKey:H===s.fj.METRIC?K:void 0,ignoreOutliers:null!==(L=e.ignoreOutliers)&&void 0!==L&&L}),ue=O?de:ce,[pe,he]=(0,f.H)(),me=q,ge=ae||!J,ve=(0,M.Y)("div",{css:[S.lineChartCardWrapper,{height:k?"100%":void 0},""],children:me?ge?(0,M.Y)(c.Us,{}):(0,M.Y)(a.h,{runsData:ue,metricKey:e.metricKey,selectedMetricKeys:e.selectedMetricKeys,scaleType:e.scaleType,xAxisKey:H,xAxisScaleType:e.xAxisScaleType,yAxisKey:e.yAxisKey,yAxisExpressions:e.yAxisExpressions,selectedXAxisMetricKey:K,lineSmoothness:P,useDefaultHoverBox:!1,onHover:W,onUnhover:G,selectedRunUuid:X,onUpdate:({layout:e})=>{if(!k){let t=null===ee||void 0===ee?void 0:ee[0],n=null===ee||void 0===ee?void 0:ee[1],i=null===re||void 0===re?void 0:re[0],r=null===re||void 0===re?void 0:re[1];const{autorange:o,range:a}=e.yaxis||{};!(0,u.isEqual)(o?[void 0,void 0]:a,[t,n])&&$(),o?(t=void 0,n=void 0):a&&(t=a[0],n=a[1]);const{autorange:l,range:c}=e.xaxis||{};if(l)i=void 0,r=void 0;else if(c){const e=(0,u.compact)(B.map((({runInfo:e})=>null===e||void 0===e?void 0:e.runUuid))),t=B.flatMap((({groupParentInfo:e})=>{var t;return null!==(t=null===e||void 0===e?void 0:e.runUuids)&&void 0!==t?t:[]}));if((0,p.v$)()||H!==s.fj.TIME_RELATIVE)if(H===s.fj.TIME_RELATIVE_HOURS){const n=m(se,[...e,...t],c,36e5);ne([...n])}else ne(void 0);else{const n=m(se,[...e,...t],c);ne([...n])}i=c[0],r=c[1]}(0,u.isEqual)({xMin:null===re||void 0===re?void 0:re[0],xMax:null===re||void 0===re?void 0:re[1],yMin:null===ee||void 0===ee?void 0:ee[0],yMax:null===ee||void 0===ee?void 0:ee[1]},{xMin:i,xMax:r,yMin:t,yMax:n})||(oe((0,u.isUndefined)(i)||(0,u.isUndefined)(r)?void 0:[i,r]),te((0,u.isUndefined)(t)||(0,u.isUndefined)(n)?void 0:[t,n]))}},xRange:re,yRange:ee,fullScreen:k,displayPoints:e.displayPoints,onSetDownloadHandler:he,positionInSection:null!==U&&void 0!==U?U:0}):null}),fe=(0,i.useCallback)((t=>{var n,i;const r=null!==(n=null===(i=e.selectedMetricKeys)||void 0===i?void 0:i.join("-"))&&void 0!==n?n:e.metricKey;if("csv-full"!==t)"csv"!==t?null===pe||void 0===pe||pe(t,r):(0,y.Fz)(ue,e.selectedMetricKeys||[e.metricKey],r);else{const t=[...(0,u.compact)(ue.map((e=>{var t;return null===(t=e.runInfo)||void 0===t?void 0:t.runUuid}))),...(0,u.compact)(ue.filter((({groupParentInfo:e})=>e)).flatMap((e=>{var t;return null===(t=e.groupParentInfo)||void 0===t?void 0:t.runUuids})))];null===E||void 0===E||E(t,e.selectedMetricKeys||[e.metricKey])}}),[ue,e,pe,E]);return D&&z?null:k?ve:(0,M.Y)(c.Ox,{onEdit:o,onDelete:n,title:C(e),uuid:e.uuid,dragGroupKey:c.cN.GENERAL_AREA,supportedDownloadFormats:w,onClickDownload:fe,toggleFullScreenChart:z?void 0:F,isRefreshing:le,isHidden:!q,...N,children:z?(0,M.Y)(x.u,{}):ve})},S={lineChartCardWrapper:{overflow:"hidden"}};var I=n(68248),k=n(79804),R=n(27757),A=n(27299);var D={name:"1wcfv52",styles:"margin-right:0"},T={name:"1wcfv52",styles:"margin-right:0"};const Y=({config:e,chartRunData:t,onDelete:n,onEdit:r,fullScreen:o,setFullScreenChart:s,hideEmptyCharts:a,isInViewport:d,...p})=>{const{theme:h}=(0,R.u)(),m=e.xaxis.datasetName||e.yaxis.datasetName?(0,M.FD)("div",{css:(0,I.AH)({flex:1,display:"flex",alignItems:"center",overflow:"hidden",gap:h.spacing.xs},""),children:[(0,M.FD)(R.T.Text,{title:e.xaxis.key,ellipsis:!0,bold:!0,children:[e.xaxis.datasetName&&(0,M.FD)(M.FK,{children:[(0,M.Y)(A.Tag,{componentId:"mlflow.charts.scatter_card_title.dataset_tag",css:D,children:e.xaxis.datasetName})," "]}),e.xaxis.key]}),(0,M.Y)(R.T.Text,{children:"vs"}),(0,M.FD)(R.T.Text,{title:e.xaxis.key,ellipsis:!0,bold:!0,children:[e.yaxis.datasetName&&(0,M.FD)(M.FK,{children:[(0,M.Y)(A.Tag,{componentId:"mlflow.charts.scatter_card_title.dataset_tag",css:T,children:e.yaxis.datasetName})," "]}),e.yaxis.key]})]}):`${e.xaxis.key} vs. ${e.yaxis.key}`,g=(0,i.useMemo)((()=>t.filter((({hidden:e})=>!e))),[t]),v=(0,i.useMemo)((()=>{var t,n;const i=[null!==(t=e.xaxis.dataAccessKey)&&void 0!==t?t:e.xaxis.key,null!==(n=e.yaxis.dataAccessKey)&&void 0!==n?n:e.yaxis.key],r=g.flatMap((({metrics:e})=>Object.keys(e)));return 0===(0,u.intersection)(i,(0,u.uniq)(r)).length}),[e,g]),{setTooltip:b,resetTooltip:C,selectedRunUuid:w}=(0,l.uN)(e),E=o||d,[S,Y]=(0,f.H)(),U=(0,M.Y)("div",{css:[_.scatterChartCardWrapper,{height:o?"100%":void 0},""],children:E?(0,M.Y)(k.i,{runsData:g,xAxis:e.xaxis,yAxis:e.yaxis,onHover:b,onUnhover:C,useDefaultHoverBox:!1,selectedRunUuid:w,onSetDownloadHandler:Y}):null});return a&&v?null:o?U:(0,M.Y)(c.Ox,{onEdit:r,onDelete:n,title:m,uuid:e.uuid,dragGroupKey:c.cN.GENERAL_AREA,toggleFullScreenChart:v?void 0:()=>{null===s||void 0===s||s({config:e,title:m,subtitle:null})},supportedDownloadFormats:["png","svg","csv"],onClickDownload:t=>{const n=[e.xaxis.key,e.yaxis.key].join("-");if("csv"!==t&&"csv-full"!==t)null===S||void 0===S||S(t,n);else{const t=[],i=[];for(const n of["xaxis","yaxis"])"PARAM"===e[n].type?t.push(e[n].key):i.push(e[n].key);(0,y.LL)(g,i,t,n)}},...p,children:v?(0,M.Y)(x.u,{}):U})},_={scatterChartCardWrapper:{overflow:"hidden"}};var U=n(99436);const N=({config:e,chartRunData:t,onDelete:n,onEdit:r,fullScreen:o,setFullScreenChart:s,hideEmptyCharts:a,...d})=>{const p=`${e.xaxis.key} vs. ${e.yaxis.key} vs. ${e.zaxis.key}`,h=(0,i.useMemo)((()=>t.filter((({hidden:e})=>!e))),[t]),m=(0,i.useMemo)((()=>{const t=[e.xaxis.key,e.yaxis.key,e.zaxis.key],n=h.flatMap((({metrics:e})=>Object.keys(e)));return 0===(0,u.intersection)(t,(0,u.uniq)(n)).length}),[e,h]),{setTooltip:g,resetTooltip:v,selectedRunUuid:b}=(0,l.uN)(e),[C,w]=(0,f.H)(),E=(0,M.Y)("div",{css:[L.contourChartCardWrapper,{height:o?"100%":void 0},""],children:(0,M.Y)(U.a,{runsData:h,xAxis:e.xaxis,yAxis:e.yaxis,zAxis:e.zaxis,useDefaultHoverBox:!1,onHover:g,onUnhover:v,selectedRunUuid:b,onSetDownloadHandler:w})});return a&&m?null:o?E:(0,M.Y)(c.Ox,{onEdit:r,onDelete:n,title:p,uuid:e.uuid,dragGroupKey:c.cN.GENERAL_AREA,toggleFullScreenChart:m?void 0:()=>{null===s||void 0===s||s({config:e,title:p,subtitle:null})},supportedDownloadFormats:["png","svg","csv"],onClickDownload:t=>{const n=[e.xaxis.key,e.yaxis.key,e.zaxis.key].join("-");if("csv"!==t&&"csv-full"!==t)null===C||void 0===C||C(t,n);else{const t=[],i=[];for(const n of["xaxis","yaxis","zaxis"])"PARAM"===e[n].type?t.push(e[n].key):i.push(e[n].key);(0,y.LL)(h,i,t,n)}},...d,children:m?(0,M.Y)(x.u,{}):E})},L={contourChartCardWrapper:{overflow:"hidden"}};var H,K,P,F;function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},B.apply(null,arguments)}function O({title:e,titleId:t,...n},r){return i.createElement("svg",B({width:80,height:42,viewBox:"0 0 80 42",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t},n),e?i.createElement("title",{id:t},e):null,H||(H=i.createElement("path",{d:"M1.28418 2.34094L39.4998 17.0908L76.3746 7.87216",stroke:"#CF797B",strokeLinecap:"round"})),K||(K=i.createElement("path",{d:"M1.95459 20.443L40.1702 25.1361L77.045 21.1134M1.95459 36.5338L40.1702 35.1929L77.045 25.1361",stroke:"#A88E6F",strokeLinecap:"round"})),P||(P=i.createElement("g",{opacity:.8},i.createElement("path",{d:"M1.28418 1V40.3341",stroke:"#338ECC",strokeLinecap:"round"}),i.createElement("path",{d:"M40.6189 2.07251V39.9763",stroke:"#338ECC",strokeLinecap:"round"}),i.createElement("path",{d:"M77.7156 2.07251V39.9763",stroke:"url(#paint0_linear_2781_406689)",strokeWidth:4,strokeLinecap:"square"}))),F||(F=i.createElement("defs",null,i.createElement("linearGradient",{id:"paint0_linear_2781_406689",x1:78.2156,y1:2.07251,x2:78.2156,y2:39.9763,gradientUnits:"userSpaceOnUse"},i.createElement("stop",{stopColor:"#D04F5E"}),i.createElement("stop",{offset:1,stopColor:"#4D9734"})))))}const z=i.forwardRef(O);n.p;var j=n(21078),V=n(91270),W=n(40724),G=n(52572);var $={name:"1neqb0a",styles:"display:flex;flex:1;justify-content:center;align-items:center"},X={name:"10zh1lj",styles:"display:flex;flex-direction:column;align-items:center;max-width:360px"};const q=({onEdit:e})=>{const{theme:t}=(0,R.u)();return(0,M.Y)("div",{css:$,children:(0,M.FD)("div",{css:X,children:[(0,M.Y)(z,{}),(0,M.Y)(R.T.Title,{css:(0,I.AH)({marginTop:t.spacing.md},""),color:"secondary",level:3,children:(0,M.Y)(W.A,{id:"VPU43C",defaultMessage:"Compare parameter importance"})}),(0,M.Y)(R.T.Text,{css:(0,I.AH)({marginBottom:t.spacing.md},""),color:"secondary",children:(0,M.Y)(W.A,{id:"V9FtFz",defaultMessage:"Use the parallel coordinates chart to compare how various parameters in model affect your model metrics."})}),(0,M.Y)(R.B,{componentId:"mlflow.charts.parallel_coords_chart_configure_button",type:"primary",onClick:e,children:(0,M.Y)(W.A,{id:"ga32oj",defaultMessage:"Configure chart"})})]})})};var J={name:"1neqb0a",styles:"display:flex;flex:1;justify-content:center;align-items:center"},Q={name:"10zh1lj",styles:"display:flex;flex-direction:column;align-items:center;max-width:360px"};const Z=()=>{const{theme:e}=(0,R.u)();return(0,M.Y)("div",{css:J,children:(0,M.FD)("div",{css:Q,children:[(0,M.Y)(z,{}),(0,M.Y)(R.T.Title,{css:(0,I.AH)({marginTop:e.spacing.md,textAlign:"center"},""),color:"secondary",level:3,children:(0,M.Y)(W.A,{id:"glxGz2",defaultMessage:"Parallel coordinates chart does not support aggregated string values."})}),(0,M.Y)(R.T.Text,{css:(0,I.AH)({marginBottom:e.spacing.md},""),color:"secondary",children:(0,M.Y)(W.A,{id:"QPC4hV",defaultMessage:"Use other parameters or disable run grouping to continue."})})]})})};var ee={name:"82a6rk",styles:"flex:1"};const te=({config:e,chartRunData:t,onDelete:n,onEdit:r,groupBy:o,fullScreen:s,setFullScreenChart:a,hideEmptyCharts:d,isInViewport:u,...p})=>{const h=(0,G.e)(),m=(0,i.useMemo)((()=>null!==e&&void 0!==e&&e.showAllRuns?t:null===t||void 0===t?void 0:t.filter((({hidden:e})=>!e))),[t,null===e||void 0===e?void 0:e.showAllRuns]),g=(0,i.useMemo)((()=>{var t;return null===(t=e.selectedParams)||void 0===t?void 0:t.some((e=>null===m||void 0===m?void 0:m.some((t=>{var n;return isNaN(Number(null===(n=t.params[e])||void 0===n?void 0:n.value))}))),[e.selectedParams,m])}),[e.selectedParams,m]),v=(0,i.useCallback)((t=>{h((n=>{var i;const r=null===(i=n.compareRunCharts)||void 0===i?void 0:i.map((n=>{if(n.uuid===e.uuid){return{...n,showAllRuns:t}}return n}));return{...n,compareRunCharts:r}}))}),[e.uuid,h]),[f,b]=(0,i.useMemo)((()=>{const t=(0,V.ad)(e);return[t,t?(0,V.fM)(m,e.selectedParams,e.selectedMetrics):[]]}),[e,m]),C=(0,i.useMemo)((()=>0===b.length),[b]),w=s||u,{setTooltip:E,resetTooltip:S,selectedRunUuid:I,closeContextMenu:k}=(0,l.uN)(e),R=g&&o,D=f&&!R,T=(0,M.Y)(M.FK,{children:e.showAllRuns?(0,M.Y)(W.A,{id:"oY+vPi",defaultMessage:"Showing all runs"}):(0,M.Y)(W.A,{id:"1hI96w",defaultMessage:"Showing only visible runs"})}),Y=(0,M.Y)(M.FK,{children:f?R?(0,M.Y)(Z,{}):0===b.length?(0,M.Y)(x.u,{}):(0,M.Y)("div",{css:[ne.parallelChartCardWrapper,{height:s?"100%":void 0},""],children:w?(0,M.Y)(j.A,{data:b,selectedParams:e.selectedParams,selectedMetrics:e.selectedMetrics,onHover:E,onUnhover:S,axesRotateThreshold:8,selectedRunUuid:I,closeContextMenu:k,fallback:(0,M.Y)(c.Us,{css:ee})}):null}):(0,M.Y)(q,{onEdit:r})});if(s)return Y;if(d&&C)return null;const _=f&&!R&&!C;return(0,M.Y)(c.Ox,{onEdit:r,onDelete:n,title:"Parallel Coordinates",subtitle:D?T:null,uuid:e.uuid,tooltip:(0,M.Y)(W.A,{id:"XvzXs3",defaultMessage:"The parallel coordinates chart shows runs with columns that are either numbers or strings. If a column has string entries, the runs corresponding to the 30 most recent unique values will be shown. Only runs with all relevant metrics and/or parameters will be displayed."}),dragGroupKey:c.cN.PARALLEL_CHARTS_AREA,toggleFullScreenChart:_?()=>{null===a||void 0===a||a({config:e,title:"Parallel Coordinates",subtitle:D?T:null})}:void 0,additionalMenuContent:(0,M.FD)(M.FK,{children:[(0,M.Y)(A.DropdownMenu.Separator,{}),(0,M.FD)(A.DropdownMenu.CheckboxItem,{componentId:"codegen_mlflow_app_src_experiment-tracking_components_runs-charts_components_cards_runschartsparallelchartcard.tsx_293",checked:!e.showAllRuns,onClick:()=>v(!1),children:[(0,M.Y)(A.DropdownMenu.ItemIndicator,{}),(0,M.Y)(W.A,{id:"d8I3cy",defaultMessage:"Show only visible"})]}),(0,M.FD)(A.DropdownMenu.CheckboxItem,{componentId:"codegen_mlflow_app_src_experiment-tracking_components_runs-charts_components_cards_runschartsparallelchartcard.tsx_300",checked:e.showAllRuns,onClick:()=>v(!0),children:[(0,M.Y)(A.DropdownMenu.ItemIndicator,{}),(0,M.Y)(W.A,{id:"e7K2T3",defaultMessage:"Show all runs"})]})]}),supportedDownloadFormats:["csv"],onClickDownload:t=>{const n=[...e.selectedMetrics,...e.selectedParams].join("-");"csv"===t&&(0,y.LL)(m,e.selectedMetrics,e.selectedParams,n)},...p,children:Y})},ne={parallelChartCardWrapper:{display:"flex",overflow:"hidden",cursor:"pointer"}};var ie=n(95379),re=n(7655),oe=n(98751);var se={name:"1neqb0a",styles:"display:flex;flex:1;justify-content:center;align-items:center"},ae={name:"10zh1lj",styles:"display:flex;flex-direction:column;align-items:center;max-width:360px"};const le=({onEdit:e})=>{const{theme:t}=(0,R.u)();return(0,M.Y)("div",{css:se,children:(0,M.FD)("div",{css:ae,children:[(0,M.Y)(R.T.Title,{css:(0,I.AH)({marginTop:t.spacing.md},""),color:"secondary",level:3,children:(0,M.Y)(W.A,{id:"RCjxf0",defaultMessage:"Compare runs"})}),(0,M.Y)(R.T.Text,{css:(0,I.AH)({marginBottom:t.spacing.md},""),color:"secondary",children:(0,M.Y)(W.A,{id:"sblqXA",defaultMessage:"Use the runs difference view to compare model and system metrics, parameters, attributes, and tags across runs."})}),(0,M.Y)(R.B,{componentId:"mlflow.charts.difference_chart_configure_button",type:"primary",onClick:e,children:(0,M.Y)(W.A,{id:"NDEhn/",defaultMessage:"Configure chart"})})]})})},ce=({config:e,chartRunData:t,onDelete:n,onEdit:o,groupBy:s,fullScreen:a,setFullScreenChart:l,hideEmptyCharts:d,...u})=>{const[p,h]=(0,i.useMemo)((()=>{var n;return[Boolean(null===(n=e.compareGroups)||void 0===n?void 0:n.length),t.filter((({hidden:e})=>!e)).reverse()]}),[t,e]),m=(0,i.useMemo)((()=>!p),[p]),g=(0,ie.Ez)(),v=(0,i.useCallback)((()=>{g({...e,showChangeFromBaseline:!e.showChangeFromBaseline})}),[e,g]),f=(0,i.useCallback)((()=>{g({...e,showDifferencesOnly:!e.showDifferencesOnly})}),[e,g]),{formatMessage:y}=(0,re.A)(),x=(0,M.Y)(M.FK,{children:p?(0,M.Y)(oe.I,{previewData:h,groupBy:s,cardConfig:e,setCardConfig:t=>{g(t(e))}}):(0,M.Y)(le,{onEdit:o})});let b;return s&&r.Nf.some((t=>e.compareGroups.includes(t)))&&(b=y({id:"csNr/8",defaultMessage:"Disable grouped runs to compare parameters, tag, or attributes"})),a?x:d&&m?null:(0,M.Y)(c.Ox,{onEdit:o,onDelete:n,title:e.chartName,uuid:e.uuid,dragGroupKey:c.cN.GENERAL_AREA,toggleFullScreenChart:()=>{null===l||void 0===l||l({config:e,title:e.chartName,subtitle:null})},toggles:[{toggleLabel:y({id:"4tpkvx",defaultMessage:"Show change from baseline"}),currentToggle:e.showChangeFromBaseline,setToggle:v},{toggleLabel:y({id:"e7GTKi",defaultMessage:"Show differences only"}),currentToggle:e.showDifferencesOnly,setToggle:f}],tooltip:b,...u,children:x})};var de=n(21515),ue=n(51254),pe=n(44105),he=n(27476);var me={name:"1tc6xju",styles:"flex:1;overflow:auto"},ge={name:"82a6rk",styles:"flex:1"},ve={name:"1hfe3dm",styles:'&[data-orientation="horizontal"]{width:auto;}'};const fe=({config:e,chartRunData:t,onDelete:n,onEdit:r,groupBy:o,fullScreen:s,setFullScreenChart:a,...l})=>{const{theme:d}=(0,R.u)(),u=(0,i.useRef)(null),[p,h]=(0,i.useState)(0),[m,g]=(0,i.useState)(e),v=(0,ie.Ez)(),f=(0,i.useCallback)((t=>{e.step!==t&&v({...e,step:t})}),[e,v]),y=(0,i.useCallback)((e=>{g((t=>t.step===e?t:{...t,step:e}))}),[]),x=1===e.imageKeys.length?e.imageKeys[0]:pe._g,b=(0,i.useMemo)((()=>t.filter((({hidden:e})=>!e)).reverse()),[t]),C=(0,i.useCallback)((t=>{v(t(e))}),[e,v]),{stepMarks:w,maxMark:E,minMark:S}=(0,ue._)({data:b,selectedImageKeys:e.imageKeys||[]}),k=Object.keys(w).length;(0,i.useEffect)((()=>{1===k&&m.step!==S&&(f(S),y(S))}),[S,k,m.step,f,y]);const A=b.filter((e=>e.tags[pe.Cr])).length>pe.Lf,D=(0,M.FD)("div",{css:(0,I.AH)({display:"flex",flexDirection:"column",height:s?"100%":void 0,width:"100%",overflow:"hidden",marginTop:d.spacing.sm,gap:d.spacing.md},""),children:[(0,M.Y)("div",{ref:u,css:me,children:(0,M.Y)(de.f,{previewData:b,groupBy:o,cardConfig:m,setCardConfig:C})}),(0,M.Y)("div",{css:(0,I.AH)({justifyContent:"center",alignItems:"center",display:"inline-flex",gap:d.spacing.md},""),children:(0,M.Y)("div",{css:ge,children:(0,M.Y)(he.o,{value:m.step,onChange:y,max:E,min:S,marks:w,disabled:Object.keys(w).length<=1,onAfterChange:f,css:ve})})})]});if(s)return D;const T=D;return(0,M.Y)(c.Ox,{onEdit:r,onDelete:n,title:x,subtitle:A&&`Displaying images from first ${pe.Lf} runs`,uuid:e.uuid,dragGroupKey:c.cN.GENERAL_AREA,toggleFullScreenChart:()=>{null===a||void 0===a||a({config:e,title:x,subtitle:null})},...l,children:T})},ye=({cardConfig:e,chartRunData:t,index:n,sectionIndex:s,onStartEditChart:a,onRemoveChart:l,setFullScreenChart:c,groupBy:d,fullScreen:u,canMoveDown:p,canMoveUp:h,canMoveToTop:m,canMoveToBottom:g,previousChartUuid:v,nextChartUuid:f,firstChartUuid:y,lastChartUuid:x,onReorderWith:b,autoRefreshEnabled:C,onDownloadFullMetricHistoryCsv:w,hideEmptyCharts:S,globalLineChartConfig:I,height:k,isInViewport:R,isInViewportDeferred:A})=>{const D=(0,i.useMemo)((()=>({onReorderWith:b,canMoveDown:p,canMoveUp:h,previousChartUuid:v,nextChartUuid:f,canMoveToTop:m,canMoveToBottom:g,firstChartUuid:y,lastChartUuid:x})),[b,p,h,v,f,m,g,y,x]),T=(0,i.useMemo)((()=>({onEdit:()=>a(e),onDelete:()=>l(e),setFullScreenChart:c})),[a,l,c,e]),_=(0,i.useMemo)((()=>({fullScreen:u,autoRefreshEnabled:C,groupBy:d,hideEmptyCharts:S,height:k,isInViewport:R,isInViewportDeferred:A,...T,...D})),[u,C,d,T,D,S,k,R,A]),U=(0,i.useMemo)((()=>t.filter((({hidden:e})=>!e)).reverse()),[t]);return e.type===r.zL.PARALLEL?(0,M.Y)(te,{config:e,chartRunData:t,..._}):e.type===r.zL.DIFFERENCE?(0,M.Y)(ce,{config:e,chartRunData:t,..._}):e.type===r.zL.IMAGE?(0,M.Y)(fe,{config:e,chartRunData:t,..._}):e.type===r.zL.BAR?(0,M.Y)(o.X,{config:e,chartRunData:U,..._}):e.type===r.zL.LINE?(0,M.Y)(E,{config:e,chartRunData:U,onDownloadFullMetricHistoryCsv:w,globalLineChartConfig:I,positionInSection:n,..._}):e.type===r.zL.SCATTER?(0,M.Y)(Y,{config:e,chartRunData:U,..._}):e.type===r.zL.CONTOUR?(0,M.Y)(N,{config:e,chartRunData:U,..._}):null},xe=(0,i.memo)(ye)},21078:function(e,t,n){"use strict";var i=n(27299),r=n(46709),o=n(73408);const s=r.lazy((()=>Promise.all([n.e(4036),n.e(2476)]).then(n.bind(n,43623))));t.A=({fallback:e,...t})=>(0,o.Y)(r.Suspense,{fallback:null!==e&&void 0!==e?e:(0,o.Y)(i.LegacySkeleton,{}),children:(0,o.Y)(s,{...t})})},21515:function(e,t,n){"use strict";n.d(t,{f:function(){return v}});var i=n(68248),r=n(27757),o=n(79081),s=n(67063),a=n(53868),l=n(73408);const c=({previewData:e,cardConfig:t})=>{const{theme:n}=(0,r.u)(),c=e.filter((e=>{const n=e.images[t.imageKeys[0]];return n&&Object.keys(n).length>0}));return 0===c.length?(0,l.Y)(a.mQ,{}):(0,l.Y)("div",{css:(0,i.AH)({display:"flex",justifyContent:"flex-start",flexWrap:"wrap",gap:n.spacing.xs},""),children:c.map((e=>{const r=Object.values(e.images[t.imageKeys[0]]).reduce(((e,t)=>(void 0!==t.step&&(e[t.step]=t),e)),{});return(0,l.FD)("div",{css:(0,i.AH)({border:"1px solid transparent",borderRadius:n.borders.borderRadiusSm,padding:n.spacing.sm,"&:hover":{border:`1px solid ${n.colors.border}`,backgroundColor:n.colors.tableBackgroundUnselectedHover}},""),children:[(0,l.Y)(o.T,{content:e.displayName,componentId:"mlflow.charts.image-plot.run-name-tooltip",children:(0,l.FD)("div",{css:(0,i.AH)({height:n.typography.lineHeightMd,overflow:"hidden",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",gap:n.spacing.sm},""),children:[(0,l.Y)(s.E,{color:e.color}),e.displayName]})}),(0,l.Y)(a.Rn,{step:t.step,metadataByStep:r,runUuid:e.uuid},e.uuid)]},e.uuid)}))})};var d=n(27299),u=n(40724);var p={name:"1kzq5ms",styles:"height:100%;width:100%"};const h=({previewData:e,cardConfig:t})=>{const{theme:n}=(0,r.u)(),c=e.filter((e=>0!==Object.keys(e.images).length));return 0===c.length?(0,l.Y)(a.mQ,{}):(0,l.Y)("div",{css:p,children:(0,l.FD)(d.Table,{grid:!0,scrollable:!0,children:[(0,l.FD)(d.TableRow,{isHeader:!0,children:[(0,l.Y)(d.TableHeader,{componentId:"codegen_mlflow_app_src_experiment-tracking_components_runs-charts_components_charts_imagegridmultiplekeyplot.tsx_44",css:(0,i.AH)({minWidth:a.Mc+n.spacing.md},""),children:(0,l.Y)(u.A,{id:"IdxSB8",defaultMessage:"images"})}),c.map((e=>(0,l.Y)(d.TableHeader,{componentId:"codegen_mlflow_app_src_experiment-tracking_components_runs-charts_components_charts_imagegridmultiplekeyplot.tsx_52",css:(0,i.AH)({minWidth:a.Mc+n.spacing.md},""),children:(0,l.Y)(o.T,{content:e.displayName,componentId:"mlflow.charts.image-plot.run-name-tooltip",children:(0,l.FD)("div",{css:(0,i.AH)({height:n.typography.lineHeightMd,whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",margin:"auto",gap:n.spacing.sm,fontWeight:"normal"},""),children:[(0,l.Y)(s.E,{color:e.color}),e.displayName]})})},e.uuid)))]}),t.imageKeys.map((e=>(0,l.FD)(d.TableRow,{children:[(0,l.Y)(d.TableCell,{css:(0,i.AH)({minWidth:a.Mc+n.spacing.md},""),children:(0,l.Y)("div",{style:{whiteSpace:"normal"},children:e})}),c.map((r=>{if(r.images[e]&&Object.keys(r.images[e]).length>0){const o=Object.values(r.images[e]).reduce(((e,t)=>(void 0!==t.step&&(e[t.step]=t),e)),{});return(0,l.Y)(d.TableCell,{css:(0,i.AH)({minWidth:a.Mc+n.spacing.md,"&:hover":{backgroundColor:n.colors.tableBackgroundUnselectedHover}},""),children:(0,l.Y)(a.Rn,{metadataByStep:o,step:t.step,runUuid:r.uuid})},r.uuid)}return(0,l.Y)(d.TableCell,{css:(0,i.AH)({minWidth:a.Mc+n.spacing.md},"")},r.uuid)}))]},e)))]})})};var m=n(44105);var g={name:"r3950p",styles:"flex:1;display:flex;justify-content:center;align-items:center"};const v=({previewData:e,cardConfig:t,groupBy:n,setCardConfig:i})=>{const r=e.some((e=>Boolean(e.tags[m.Cr]))),o=e.filter((e=>e.tags[m.Cr])).slice(-m.Lf);return r?1===t.imageKeys.length?(0,l.Y)(c,{previewData:o,cardConfig:t}):t.imageKeys.length>1?(0,l.Y)(h,{previewData:o,cardConfig:t}):null:(0,l.Y)("div",{css:g,children:(0,l.Y)(d.Empty,{title:(0,l.Y)(u.A,{id:"ez06Dt",defaultMessage:"No images found"}),description:(0,l.Y)(u.A,{id:"E5Ruk+",defaultMessage:"No logged images found in the currently visible runs"})})})}},27476:function(e,t,n){"use strict";n.d(t,{o:function(){return h}});var i=n(68248),r=n(27757),o=n(27299),s=n(66916),a=n(76118),l=n(46709),c=n(73408);const d=(e,t,n)=>(0,a.keys)(e).reduce(((e,n)=>Math.abs(Number(n)-t)<Math.abs(e-t)?Number(n):Number(e)),n),u=(e,t,n)=>"down"===n?Math.max(...Object.keys(e).filter((e=>Number(e)<t)).map(Number)):Math.min(...Object.keys(e).filter((e=>Number(e)>t)).map(Number));var p={name:"b9l38d",styles:"width:min-content"};const h=({max:e=1,min:t=0,step:n,marks:h,value:m,onChange:g,disabled:v,onAfterChange:f,componentId:y,className:x})=>{const{theme:b}=(0,r.u)(),M=!(0,a.isEmpty)(h),C=M&&Object.keys(h).length<10,[w,E]=(0,l.useState)(void 0);return(0,c.FD)("div",{css:(0,i.AH)({display:"flex",height:b.general.heightSm,gap:b.spacing.md,alignItems:"center"},""),children:[(0,c.FD)(o.Slider.Root,{disabled:v,css:(0,i.AH)({flex:1,position:"relative","span:last-child":{zIndex:2}},""),className:x,min:t,max:e,value:[null!==m&&void 0!==m?m:0],onValueCommit:([e])=>null===f||void 0===f?void 0:f(e),onKeyDown:e=>{if(M&&(e.preventDefault(),["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(e.key))){const t=u(h,null!==m&&void 0!==m?m:0,"ArrowLeft"===e.key||"ArrowDown"===e.key?"down":"up");null===f||void 0===f||f(t),g(t)}},onValueChange:([e])=>{g(M?d(h,e,null!==m&&void 0!==m?m:0):e)},step:null!==n&&void 0!==n?n:void 0,children:[C&&(0,c.Y)("div",{css:(0,i.AH)({position:"absolute",inset:0,marginRight:14},""),children:(0,a.keys)(h).map((n=>(0,c.Y)("div",{css:(0,i.AH)({position:"absolute",zIndex:1,top:0,right:0,bottom:0,marginLeft:-1.5,marginTop:6,pointerEvents:"none",borderRadius:"100%",backgroundColor:b.colors.actionPrimaryBackgroundDefault,height:8,width:8,opacity:.5},""),style:{left:Number(n)/(e-t)*100+"%"}},n)))}),(0,c.Y)(o.Slider.Track,{className:"TRACK",children:(0,c.Y)(o.Slider.Range,{})}),(0,c.Y)(o.Slider.Thumb,{css:(0,i.AH)({position:"relative",height:14,width:14},"")})]}),(0,c.Y)(s.I,{componentId:null!==y&&void 0!==y?y:"mlflow.experiment_tracking.common.line_smooth_slider",type:"number",disabled:v,min:t,max:e,css:p,step:n,value:null!==w&&void 0!==w?w:m,onBlur:()=>{(0,a.isUndefined)(w)||(M?(null===f||void 0===f||f(d(h,w,null!==m&&void 0!==m?m:0)),g(d(h,w,null!==m&&void 0!==m?m:0))):(null===f||void 0===f||f((0,a.clamp)(w,t,e)),g((0,a.clamp)(w,t,e))),E(void 0))},onChange:({target:n,nativeEvent:i})=>{if(i instanceof InputEvent)E(Number(n.value));else if(M){const e=u(h,null!==m&&void 0!==m?m:0,Number(n.value)<Number(m)?"down":"up");g(e)}else g((0,a.clamp)(Number(n.value),t,e))}})]})}},30197:function(e,t,n){"use strict";n.d(t,{B:function(){return c}});var i=n(46709),r=n(59930),o=n.n(r),s=n(53274),a=n(18585),l=n(76118);const c=({ungroupedRunsData:e,enabled:t,aggregateFunction:n,metricKeys:r,sampledDataResultsByRunUuid:c,selectedXAxisMetricKey:d,ignoreOutliers:u})=>(0,i.useMemo)((()=>{if(!t||!n)return e;return[...e.filter((({groupParentInfo:e})=>e)).map((e=>{const t={};r.forEach((n=>{var i;o()(e.groupParentInfo,"groupParentInfo should be defined");const r=null!==(i=e.groupParentInfo.runUuidsForAggregation)&&void 0!==i?i:e.groupParentInfo.runUuids;let p;if((0,l.isNil)(d)){const e=(0,l.compact)(r.flatMap((e=>{var t,i;const r=null===(t=c[e])||void 0===t||null===(i=t[n])||void 0===i?void 0:i.metricsHistory;return u?r?(0,s.c1)(r):void 0:r}))),t=(0,l.uniq)(e.map((e=>e.step))).sort(((e,t)=>e-t));p=(0,a.yu)(t,n,e)}else p=(0,a.nN)((0,l.pick)(c,r),n,d,u);t[n]=p}));const i=r.reduce(((e,i)=>{const r=t[i][n];return r&&r.length>0&&(e[i]=r),e}),{});return{...e,metricsHistory:i,aggregatedMetricsHistory:t}})),...e.filter((({belongsToGroup:e})=>!1===e))]}),[r,c,e,t,n,d,u])},32158:function(e,t,n){"use strict";n.d(t,{H8:function(){return u},Ox:function(){return b},Us:function(){return C},b7:function(){return p},cN:function(){return h},rZ:function(){return d}});var i=n(68248),r=n(27757),o=n(27299),s=n(46709),a=n(40724),l=n(76118),c=n(73408);const d="mlflow-charts-drag-handle",u="--drag-transform",p=`var(${u})`;let h=function(e){return e.PARALLEL_CHARTS_AREA="PARALLEL_CHARTS_AREA",e.GENERAL_AREA="GENERAL_AREA",e}({});var m={name:"andpxo",styles:"display:flex;overflow:hidden"},g={name:"19mhjsb",styles:"overflow:hidden;flex:1;flex-shrink:1"},v={name:"ucb1au",styles:"overflow:hidden;white-space:nowrap;text-overflow:ellipsis"},f={name:"1989ovb",styles:"vertical-align:middle"};const y=({title:e,subtitle:t,onDelete:n,onEdit:u,children:p,uuid:h,dragGroupKey:y,tooltip:b="",onReorderWith:M=l.noop,canMoveDown:C,canMoveUp:w,canMoveToTop:E,canMoveToBottom:S,previousChartUuid:I,nextChartUuid:k,firstChartUuid:R,lastChartUuid:A,additionalMenuContent:D,toggleFullScreenChart:T,toggles:Y,supportedDownloadFormats:_=[],onClickDownload:U,isHidden:N,height:L,isRefreshing:H=!1})=>{const{theme:K}=(0,r.u)(),P=(0,s.useCallback)((()=>M(h||"",I||"")),[M,h,I]),F=(0,s.useCallback)((()=>M(h||"",k||"")),[M,h,k]),B=(0,s.useCallback)((()=>M(h||"",R||"")),[M,h,R]),O=(0,s.useCallback)((()=>M(h||"",A||"")),[M,h,A]),z=s.isValidElement(e);return(0,c.FD)("div",{css:(0,i.AH)({height:null!==L&&void 0!==L?L:360,overflow:"hidden",display:"grid",gridTemplateRows:"auto 1fr",backgroundColor:K.colors.backgroundPrimary,padding:12,paddingBottom:K.spacing.sm,border:`1px solid ${K.colors.border}`,borderRadius:K.general.borderRadiusBase,transition:"opacity 0.12s",position:"relative"},""),"data-testid":"experiment-view-compare-runs-card",children:[(0,c.FD)("div",{css:m,children:[(0,c.Y)("div",{"data-testid":"experiment-view-compare-runs-card-drag-handle",css:(0,i.AH)({marginTop:z?K.spacing.sm:K.spacing.xs,marginRight:K.spacing.sm,cursor:"grab"},""),className:d,children:(0,c.Y)(o.DragIcon,{})}),z?e:(0,c.FD)("div",{css:g,children:[(0,c.Y)(r.T.Title,{title:String(e),level:4,withoutMargins:!0,css:v,children:e}),t&&(0,c.Y)("span",{css:x.subtitle(K),children:t}),b&&(0,c.Y)(o.LegacyInfoTooltip,{css:f,title:b})]}),H&&(0,c.Y)("div",{css:(0,i.AH)({width:K.general.heightSm,height:K.general.heightSm,display:"flex",alignItems:"center",justifyContent:"center"},""),children:(0,c.Y)(r.S,{})}),Y&&(0,c.Y)("div",{css:(0,i.AH)({display:"flex",padding:`0px ${K.spacing.lg}px`,gap:K.spacing.md,alignItems:"flex-start"},""),children:Y.map((e=>(0,c.Y)(o.Switch,{componentId:"codegen_mlflow_app_src_experiment-tracking_components_runs-charts_components_cards_chartcard.common.tsx_262",checked:e.currentToggle,onChange:e.setToggle,label:e.toggleLabel},e.toggleLabel)))}),(0,c.Y)(r.B,{componentId:"fullscreen_button_chartcard",icon:(0,c.Y)(o.FullscreenIcon,{}),onClick:T,disabled:!T}),(0,c.FD)(o.DropdownMenu.Root,{modal:!1,children:[(0,c.Y)(o.DropdownMenu.Trigger,{asChild:!0,children:(0,c.Y)(r.B,{componentId:"codegen_mlflow_app_src_experiment-tracking_components_runs-compare_cards_chartcard.common.tsx_158",type:"tertiary",icon:(0,c.Y)(o.OverflowIcon,{}),"data-testid":"experiment-view-compare-runs-card-menu"})}),(0,c.FD)(o.DropdownMenu.Content,{align:"end",minWidth:100,children:[(0,c.Y)(o.DropdownMenu.Item,{componentId:"codegen_mlflow_app_src_experiment-tracking_components_runs-charts_components_cards_chartcard.common.tsx_288",onClick:u,"data-testid":"experiment-view-compare-runs-card-edit",children:"Configure"}),(0,c.Y)(o.DropdownMenu.Item,{componentId:"codegen_mlflow_app_src_experiment-tracking_components_runs-charts_components_cards_chartcard.common.tsx_291",onClick:n,"data-testid":"experiment-view-compare-runs-card-delete",children:"Delete"}),_.length>0&&U&&(0,c.FD)(c.FK,{children:[(0,c.Y)(o.DropdownMenu.Separator,{}),_.includes("csv")&&(0,c.Y)(o.DropdownMenu.Item,{componentId:"codegen_mlflow_app_src_experiment-tracking_components_runs-charts_components_cards_chartcard.common.tsx_298",onClick:()=>U("csv"),children:(0,c.Y)(a.A,{id:"5YOBk/",defaultMessage:"Export as CSV"})}),_.includes("svg")&&(0,c.Y)(o.DropdownMenu.Item,{componentId:"codegen_mlflow_app_src_experiment-tracking_components_runs-charts_components_cards_chartcard.common.tsx_316",onClick:()=>U("svg"),children:(0,c.Y)(a.A,{id:"LiW/yM",defaultMessage:"Download as SVG"})}),_.includes("png")&&(0,c.Y)(o.DropdownMenu.Item,{componentId:"codegen_mlflow_app_src_experiment-tracking_components_runs-charts_components_cards_chartcard.common.tsx_324",onClick:()=>U("png"),children:(0,c.Y)(a.A,{id:"s5ygFF",defaultMessage:"Download as PNG"})})]}),(0,c.Y)(o.DropdownMenu.Separator,{}),(0,c.Y)(o.DropdownMenu.Item,{componentId:"codegen_mlflow_app_src_experiment-tracking_components_runs-charts_components_cards_chartcard.common.tsx_334",disabled:!E,onClick:B,"data-testid":"experiment-view-compare-runs-move-to-top",children:(0,c.Y)(a.A,{id:"LajLDb",defaultMessage:"Move to top"})}),(0,c.Y)(o.DropdownMenu.Item,{componentId:"codegen_mlflow_app_src_experiment-tracking_components_runs-charts_components_cards_chartcard.common.tsx_340",disabled:!w,onClick:P,"data-testid":"experiment-view-compare-runs-move-up",children:(0,c.Y)(a.A,{id:"IAyAgH",defaultMessage:"Move up"})}),(0,c.Y)(o.DropdownMenu.Item,{componentId:"codegen_mlflow_app_src_experiment-tracking_components_runs-charts_components_cards_chartcard.common.tsx_344",disabled:!C,onClick:F,"data-testid":"experiment-view-compare-runs-move-down",children:(0,c.Y)(a.A,{id:"Z6kodo",defaultMessage:"Move down"})}),D,(0,c.Y)(o.DropdownMenu.Item,{componentId:"codegen_mlflow_app_src_experiment-tracking_components_runs-charts_components_cards_chartcard.common.tsx_350",disabled:!S,onClick:O,"data-testid":"experiment-view-compare-runs-move-to-bottom",children:(0,c.Y)(a.A,{id:"7Uj0KJ",defaultMessage:"Move to bottom"})})]})]})]}),p]})},x={chartEntry:e=>({height:360,overflow:"hidden",display:"grid",gridTemplateRows:"auto 1fr",backgroundColor:e.colors.backgroundPrimary,padding:e.spacing.md,border:`1px solid ${e.colors.border}`,borderRadius:e.general.borderRadiusBase}),chartComponentWrapper:()=>({overflow:"hidden"}),subtitle:e=>({color:e.colors.textSecondary,fontSize:11,marginRight:4,verticalAlign:"middle"})},b=(0,s.memo)(y);var M={name:"cgzj3x",styles:"display:flex;height:100%;justify-content:center;align-items:center"};const C=(0,s.forwardRef)((({className:e,style:t},n)=>(0,c.Y)("div",{css:M,className:e,style:t,ref:n,children:(0,c.Y)(r.S,{})})))},35286:function(e,t,n){"use strict";n.d(t,{QS:function(){return a},W:function(){return h},bL:function(){return d},uN:function(){return m}});var i=n(46709),r=n(64865),o=n(77684),s=n(73408);let a=function(e){return e[e.Simple=1]="Simple",e[e.MultipleTracesWithScanline=2]="MultipleTracesWithScanline",e}({});const l=i.createContext(null);let c=function(e){return e[e.HIDDEN=0]="HIDDEN",e[e.HOVER=1]="HOVER",e[e.VISIBLE=2]="VISIBLE",e}({});const d=e=>e&&"tooltipLegendItems"in e,u=e=>{if(null===e||!(e instanceof Element))return null;if(e instanceof HTMLElement)return e;let t=e;for(;t&&!(t instanceof HTMLElement);)t=t.parentElement;return t};var p={name:"13udsys",styles:"height:100%"};const h=({className:e,children:t,contextData:n,component:o,hoverOnly:d=!1})=>{const h=(0,i.useRef)(null),m=(0,i.useRef)(null),v=(0,i.useRef)({x:0,y:0}),f=(0,i.useRef)({x:0,y:0}),[y,x]=(0,i.useState)(a.Simple),[b,M]=(0,i.useState)(c.HIDDEN),[C,w]=(0,i.useState)(null),[E,S]=(0,i.useState)(""),[I,k]=(0,i.useState)(null),R=(0,i.useRef)(null),A=(0,i.useRef)(b),D=(0,i.useRef)(E),T=(0,i.useRef)(C),Y=(0,i.useRef)(I),{highlightDataTrace:_}=(0,r.ZY)(),U=(0,i.useCallback)(((e=!1)=>{if(!m.current||!h.current)return;let t=y===a.MultipleTracesWithScanline?f.current.x:v.current.x,n=v.current.y;const i=m.current,r=h.current.getBoundingClientRect();y===a.MultipleTracesWithScanline&&(t-=r.x,n-=r.y),m.current.style.left="0px",m.current.style.top="0px",m.current.style.transform=`translate3d(${t+1}px, ${n+1}px, 0)`;const o=()=>{const e=i.getBoundingClientRect();t+e.width>=r.width&&(t-=e.width),n+e.height>=r.height&&(n-=e.height),i.style.transform=`translate3d(${t+1}px, ${n+1}px, 0)`};e?requestAnimationFrame(o):o()}),[y]);(0,i.useEffect)((()=>{A.current=b}),[b]);const N=(0,i.useCallback)(((e,t)=>{var n;const i=e.getBoundingClientRect(),r=(null===(n=h.current)||void 0===n?void 0:n.getBoundingClientRect())||{left:0,top:0};return{x:t.offsetX+(i.left-r.left),y:t.offsetY+(i.top-r.top)}}),[]),L=(0,i.useCallback)((e=>{if(A.current===c.HOVER&&m.current&&h.current){R.current=null;const t=u(e.target);t&&(v.current=N(t,e.nativeEvent),U())}}),[U,N]),H=(0,i.useCallback)(((e,t,n,i,r)=>{var o;D.current=e,T.current=n,Y.current=r,A.current!==c.VISIBLE&&(w(n),!e&&null!==(o=R.current)&&void 0!==o&&o.runUuid||(t===a.MultipleTracesWithScanline&&(f.current.x=(null===i||void 0===i?void 0:i.x)||0),x(t),S((t=>(r&&k(r),A.current===c.HIDDEN||A.current===c.HOVER&&e!==t?(M(c.HOVER),e):t)))))}),[]),K=(0,i.useCallback)((e=>{d||0===e.button&&D.current&&(R.current={x:e.pageX,y:e.pageY,runUuid:D.current})}),[d]),P=(0,i.useCallback)((e=>{if(d)return;if(R.current&&(()=>{var t;return(null===(t=R.current)||void 0===t?void 0:t.runUuid)&&Math.abs(e.pageX-R.current.x)<5&&Math.abs(e.pageY-R.current.y)<5})()){if(A.current===c.VISIBLE){S(R.current.runUuid),k(Y.current);const t=u(e.nativeEvent.target);t&&(v.current=N(t,e.nativeEvent),U(!0))}else M(c.VISIBLE),U(!0);e.stopPropagation()}R.current=null}),[U,d,N]),F=(0,i.useCallback)((()=>M(c.HIDDEN)),[]);(0,i.useLayoutEffect)((()=>{if(!h.current)return;const e=h.current.getRootNode(),t=e=>{var t;if(A.current!==c.VISIBLE)return;const n=u(e.target);if(!n)return;n instanceof HTMLElement&&(null===m||void 0===m?void 0:m.current)instanceof HTMLElement&&m.current.contains(n)||null!==(t=R.current)&&void 0!==t&&t.runUuid||M(c.HIDDEN)};return e.addEventListener("click",t,{capture:!0}),()=>{e.removeEventListener("click",t,{capture:!0})}}),[N,U]);const B=(0,i.useCallback)((()=>{var e;D.current="",null!==(e=R.current)&&void 0!==e&&e.runUuid||A.current===c.VISIBLE||(S(""),M(c.HIDDEN))}),[]),O=(0,i.useCallback)(((e=!1)=>{D.current="",S(""),M(c.HIDDEN)}),[]),z=(0,i.useMemo)((()=>b!==c.VISIBLE?null:E),[b,E]);(0,i.useEffect)((()=>_(z,{source:r.WF.CHART,shouldBlock:Boolean(z)})),[_,z]);const j=(0,i.useMemo)((()=>({updateTooltip:H,resetTooltip:B,destroyTooltip:O,selectedRunUuid:z,closeContextMenu:F})),[H,B,O,z,F]),V=b!==c.HIDDEN&&(y===a.MultipleTracesWithScanline||""!==E);return(0,s.FD)(l.Provider,{value:j,children:[(0,s.Y)("div",{onMouseMove:L,onMouseDownCapture:K,onClickCapture:P,css:p,children:t}),(0,s.Y)("div",{css:g.contextMenuContainer,className:e,ref:h,children:V&&(0,s.Y)("div",{ref:m,css:g.contextMenuWrapper,"data-testid":"tooltip-container",style:{userSelect:b===c.HOVER?"none":"unset",pointerEvents:b===c.HOVER?"none":"all"},children:(0,s.Y)(o,{runUuid:E,hoverData:I,chartData:C,contextData:n,isHovering:b===c.HOVER,closeContextMenu:F,mode:y})})})]})},m=(e,t=a.Simple)=>{const n=(0,i.useContext)(l);if(!n)throw new Error("You must invoke useRunsChartsTooltip() in a component being ancestor of <RunsChartsTooltipWrapper />!");const{updateTooltip:o,resetTooltip:s,selectedRunUuid:c,closeContextMenu:d,destroyTooltip:u}=n,{highlightDataTrace:p}=(0,r.ZY)();return{setTooltip:(0,i.useCallback)(((n="",i,s)=>{o(n,t,e,i,s),p(n,{source:r.WF.CHART})}),[o,e,t,p]),resetTooltip:(0,i.useCallback)((()=>{s(),p(null)}),[s,p]),selectedRunUuid:c,closeContextMenu:d,destroyTooltip:u}},g={contextMenuContainer:{overflow:"hidden",top:0,left:0,width:"100%",height:"100%",position:"fixed",pointerEvents:"none",zIndex:o.K.TOOLTIP_CONTAINER},contextMenuWrapper:e=>({zIndex:o.K.TOOLTIP,position:"absolute",padding:e.spacing.sm,backgroundColor:e.colors.backgroundPrimary,border:`1px solid ${e.colors.border}`,left:-999,top:-999,borderRadius:e.general.borderRadiusBase,boxShadow:e.general.shadowLow}),overlayElement:()=>({"&::after":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"transparent"}})}},42571:function(e,t,n){"use strict";n.d(t,{l:function(){return r}});var i=n(46709);const r=e=>{const t=(0,i.useRef)(e);return(0,i.useEffect)((()=>{t.current=e}),[e]),e=>{t.current(e)}}},44707:function(e,t,n){"use strict";n.d(t,{Y:function(){return l}});var i=n(68248),r=n(27757),o=(n(46709),n(73408));var s={name:"aj4kza",styles:"white-space:nowrap;text-overflow:ellipsis;overflow:hidden"};const a=({label:e,color:t,dashStyle:n})=>{const{theme:a}=(0,r.u)();return(0,o.FD)("div",{css:(0,i.AH)({display:"flex",alignItems:"center",textOverflow:"ellipsis",flexShrink:0,marginRight:a.spacing.md,maxWidth:"100%"},""),children:[(0,o.Y)(l,{color:t,dashStyle:n}),(0,o.Y)(r.T.Text,{color:"secondary",size:"sm",css:s,children:e})]})},l=({color:e,dashStyle:t})=>{const{theme:n}=(0,r.u)(),s=t?(e=>{switch(e){case"dot":return"3";case"dash":return"6, 3";case"longdash":return"9, 3";case"dashdot":return"6, 3, 3, 3";case"longdashdot":return"9, 3, 3, 3";default:return""}})(t):void 0,a=n.typography.fontSizeSm/2;return(0,o.Y)("svg",{css:(0,i.AH)({height:n.typography.fontSizeSm,width:24,marginRight:n.spacing.xs,flexShrink:0},""),children:(0,o.Y)("path",{d:`M0,${a}h24`,style:{strokeWidth:3,stroke:e,strokeDasharray:s}})})};t.A=({labelData:e,height:t,fullScreen:n})=>{const{theme:s}=(0,r.u)();return(0,o.Y)("div",{css:(0,i.AH)({display:"flex",flexWrap:"wrap",height:t,alignContent:n?"flex-start":"normal",gap:n?s.spacing.sm:0,overflowY:"auto",overflowX:"hidden",marginTop:n?s.spacing.lg:s.spacing.sm},""),children:e.map((e=>(0,o.Y)(a,{...e},e.uuid&&e.metricKey?`${e.uuid}-${e.metricKey}`:e.label)))})}},47790:function(){},51254:function(e,t,n){"use strict";n.d(t,{_:function(){return i}});const i=({data:e,selectedImageKeys:t})=>{const n=e.reduce(((e,n)=>{for(const i of Object.keys(n.images))if(null!==t&&void 0!==t&&t.includes(i)){const t=n.images[i];for(const n of Object.values(t))void 0!==n.step&&(e[n.step]={style:{display:"none"},label:""})}return e}),{});return{stepMarks:n,maxMark:Math.max(...Object.keys(n).map(Number)),minMark:Math.min(...Object.keys(n).map(Number))}}},52572:function(e,t,n){"use strict";n.d(t,{e:function(){return a},i:function(){return s}});var i=n(46709),r=n(73408);const o=i.createContext((e=>e)),s=({children:e,setUIState:t})=>(0,r.Y)(o.Provider,{value:t,children:e}),a=()=>i.useContext(o)},55840:function(e,t,n){"use strict";n.d(t,{z:function(){return l}});var i=n(98022),r=n.n(i),o=n(46709),s=n(91105),a=n(11522);const l=()=>{const e=(0,s.g)(),t=(0,s.zy)(),n=(0,o.useMemo)((()=>decodeURIComponent(t.search)),[t.search]),i=(0,o.useMemo)((()=>{const e=r().parse(n.substring(1));if(e.experiments){const t=e.experiments;return(null===t||void 0===t?void 0:t.toString())||""}return""}),[n]);return(0,o.useMemo)((()=>{if(null!==e&&void 0!==e&&e.experimentId)return[null===e||void 0===e?void 0:e.experimentId];if(i)try{return JSON.parse(i)}catch{return a.A.logErrorAndNotifyUser(`Could not parse experiment query parameter ${i}`),""}return[]}),[i,null===e||void 0===e?void 0:e.experimentId])}},57864:function(e,t,n){"use strict";n.d(t,{_:function(){return d}});var i=n(68248),r=n(27757),o=n(79081),s=n(35286),a=n(19398),l=n(73408);var c={name:"1fttcpj",styles:"display:flex;flex-direction:column"};const d=({chartData:e,isMetricHistoryLoading:t=!1,groupBy:n,fullScreenChart:d,onCancel:u,tooltipContextValue:p,tooltipComponent:h,autoRefreshEnabled:m,globalLineChartConfig:g})=>{const{theme:v,getPrefixedClassName:f}=(0,r.u)();return d?(0,l.Y)(o.d,{componentId:"codegen_mlflow_app_src_experiment-tracking_components_runs-charts_components_runschartsfullscreenmodal.tsx_53",visible:!0,onCancel:u,title:(0,l.FD)("div",{css:c,children:[d.title,(0,l.Y)("span",{css:(0,i.AH)({color:v.colors.textSecondary,fontSize:v.typography.fontSizeSm,marginRight:v.spacing.xs},""),children:d.subtitle})]}),footer:null,verticalSizing:"maxed_out",dangerouslySetAntdProps:{width:"95%"},css:(0,i.AH)({[`.${f("modal-body")}`]:{flex:1}},""),children:(0,l.Y)(s.W,{contextData:p,component:h,children:(0,l.Y)(a.i,{canMoveToTop:!1,canMoveToBottom:!1,firstChartUuid:void 0,lastChartUuid:void 0,cardConfig:d.config,chartRunData:e,groupBy:n,index:0,sectionIndex:0,fullScreen:!0,autoRefreshEnabled:m,globalLineChartConfig:g,onRemoveChart:()=>{},onReorderCharts:()=>{},onStartEditChart:()=>{},setFullScreenChart:()=>{},canMoveDown:!1,canMoveUp:!1,onMoveDown:()=>{},onMoveUp:()=>{},onReorderWith:()=>{}})})}):null}},61886:function(e,t,n){"use strict";n.d(t,{PK:function(){return V},Ay:function(){return q}});var i=n(68248),r=n(46709),o=n(56530),s=n(11522),a=n(74264),l=n(5690),c=n(76118),d=n(40072),u=n(96267),p=n(84173),h=n(27299),m=n(73408);function g({columns:e,values:t,styles:n={},testId:i,scroll:r}){return(0,m.Y)(h.LegacyTable,{className:"mlflow-html-table-view","data-testid":i,dataSource:t,columns:e,scroll:r,size:"middle",pagination:!1,style:n})}var v=n(76400),f=n(91105),y=n(60284);class x extends r.Component{render(){const{runUuids:e}=this.props;return(0,m.Y)("div",{className:"metrics-summary",children:e.length>1?this.renderMetricTables():this.renderRunTable(e[0])})}renderRunTable(e){const{metricKeys:t,latestMetrics:n,minMetrics:i,maxMetrics:r,intl:o}=this.props,s=[{title:o.formatMessage({id:"YINJEO",defaultMessage:"Metric"}),dataIndex:"metricKey",sorter:(e,t)=>e.metricKey<t.metricKey?-1:e.metricKey>t.metricKey?1:0,width:350},...this.dataColumns()];return 0===t.length?null:(0,m.Y)(g,{columns:s,values:M(e,t,n,i,r,o),scroll:{y:300}})}renderMetricTables(){const{runExperimentIds:e,runUuids:t,runDisplayNames:n,metricKeys:i,latestMetrics:o,minMetrics:s,maxMetrics:a,intl:l}=this.props,c=[{title:l.formatMessage({id:"d1Ou4x",defaultMessage:"Run"}),dataIndex:"runLink",sorter:(e,t)=>e.runName<t.runName?-1:e.runName>t.runName?1:0,width:350},...this.dataColumns()];return i.map((i=>(0,m.FD)(r.Fragment,{children:[(0,m.Y)("h1",{children:i}),(0,m.Y)(g,{columns:c,values:b(i,e,t,n,o,s,a,l),scroll:{y:300}})]},i)))}dataColumns(){return[{title:this.props.intl.formatMessage({id:"umeTwG",defaultMessage:"Latest"}),dataIndex:"latestFormatted",sorter:(e,t)=>e.latestValue-t.latestValue,width:200,ellipsis:!0},{title:this.props.intl.formatMessage({id:"iQzwqe",defaultMessage:"Min"}),dataIndex:"minFormatted",sorter:(e,t)=>e.minValue-t.minValue,width:200,ellipsis:!0},{title:this.props.intl.formatMessage({id:"+hkg/y",defaultMessage:"Max"}),dataIndex:"maxFormatted",sorter:(e,t)=>e.maxValue-t.maxValue,width:200,ellipsis:!0}]}}const b=(e,t,n,i,r,o,s,a)=>n.map(((n,l)=>{const c=i[l];return{runName:c,runLink:(0,m.Y)(f.N_,{to:y.Ay.getRunPageRoute(t[n]||"",n),children:c}),key:n,...S(n,e,r,o,s,a)}})),M=(e,t,n,i,r,o)=>t.map((t=>({metricKey:t,key:t,...S(e,t,n,i,r,o)})));var C={name:"nkt64x",styles:"margin-right:10px"},w={name:"nkt64x",styles:"margin-right:10px"},E={name:"nkt64x",styles:"margin-right:10px"};const S=(e,t,n,i,r,o)=>{const s=I(n,e,t),a=I(i,e,t),l=I(r,e,t),c=k(s),d=k(a),u=k(l);return{latestFormatted:(0,m.Y)("span",{title:c,css:C,children:R(s,o)}),minFormatted:(0,m.Y)("span",{title:d,css:w,children:R(a,o)}),maxFormatted:(0,m.Y)("span",{title:u,css:E,children:R(l,o)}),latestValue:c,minValue:d,maxValue:u}},I=(e,t,n)=>e[t]&&e[t][n],k=e=>e&&e.value,R=(e,t)=>void 0===e?"":t.formatMessage({id:"eQgPEi",defaultMessage:"{value} (step={step})"},{value:e.value,step:e.step}),A=(0,p.Ay)(x);var D=(0,o.Ng)(((e,t)=>{const{runUuids:n}=t,i={},r={},o={},s={};return n.forEach((t=>{const n=(0,d.K4)(t,e);i[t]=n&&n.experimentId,r[t]=(0,v.d0)(t,e),o[t]=(0,v.qP)(t,e),s[t]=(0,v.KQ)(t,e)})),{runExperimentIds:i,latestMetrics:r,minMetrics:o,maxMetrics:s}}))(A),T=n(98022),Y=n.n(T),_=n(2560),U=n(43233),N=n(97760),L=n(27757),H=n(55274),K=n(19398),P=n(86133),F=n(53274),B=n(35286),O=n(94119),z=n(57864),j=n(22131);const V="line",W=2*H.ZT,G=e=>{switch(Array.isArray(e)?e[0]:e||"step"){case"step":default:return F.fj.STEP;case"wall":return F.fj.TIME;case"relative":return F.fj.TIME_RELATIVE}};class $ extends r.Component{constructor(e){super(e),this._isMounted=!1,this.intervalId=void 0,this.loadMetricHistoryPromise=void 0,this.xAxisType=void 0,this.onFocus=()=>{this.setState({focused:!0})},this.onBlur=()=>{this.setState({focused:!1})},this.clearEventListeners=()=>{window.removeEventListener("focus",this.onFocus),window.removeEventListener("blur",this.onBlur)},this.clearInterval=()=>{clearInterval(this.intervalId),this.intervalId=null},this.allRunsCompleted=()=>this.props.completedRunUuids.length===this.props.runUuids.length,this.isHangingRunUuid=e=>{const t=this.props.latestMetricsByRunUuid[e];if(!t)return!1;const n=Object.values(t).map((({timestamp:e})=>e)),i=Math.max(...n);return(new Date).getTime()-i>6048e5},this.getActiveRunUuids=()=>{const{completedRunUuids:e,runUuids:t}=this.props;return(0,c.difference)(t,e).filter((0,c.negate)(this.isHangingRunUuid))},this.shouldPoll=()=>!(this.allRunsCompleted()||0===this.getActiveRunUuids().length),this.updateUrlState=e=>{const{runUuids:t,metricKey:n,location:i,navigate:r}=this.props,o=JSON.parse(Y().parse(i.search).experiments),s={...this.getUrlState(),...e},{selectedXAxis:a,selectedMetricKeys:l,showPoint:c,yAxisLogScale:d,lineSmoothness:u,layout:p,deselectedCurves:h,lastLinearYAxisRange:m}=s;r(y.Ay.getMetricPageRoute(t,n,o,l,p,a,d,u,c,h,m),{replace:!0})},this.loadMetricHistory=(e,t)=>{this.setState({loading:!0});const n=e.flatMap((e=>t.map((t=>({runUuid:e,metricKey:t}))))).filter((({runUuid:e,metricKey:t})=>this.props.latestMetricsByRunUuid[e].hasOwnProperty(t))).map((async({runUuid:e,metricKey:t})=>{const n=[],i=(0,U.yk)();n.push(i);let r=(await this.props.getMetricHistoryApi(e,t,25e3,void 0,i)).value.next_page_token;for(;r;){const i=(0,U.yk)();n.push(i);r=(await this.props.getMetricHistoryApi(e,t,25e3,r,i)).value.next_page_token}return{requestIds:n,success:!0}}));return this.loadMetricHistoryPromise=Promise.all(n).then((e=>(this._isMounted&&this.setState({loading:!1}),e.flatMap((({requestIds:e})=>e))))),this.loadMetricHistoryPromise},this.loadRuns=e=>{const t=[];return e.forEach((e=>{const n=(0,U.yk)();this.props.getRunApi(e),t.push(n)})),t},this.getMetrics=()=>{const e=this.getUrlState(),t=new Set(e.selectedMetricKeys),{selectedXAxis:n}=e,{metricsWithRunInfoAndHistory:i}=this.props,r=i.filter((e=>t.has(e.metricKey)));return r.forEach((e=>{const t=n===u.c1&&e.history[0]&&(0,c.isNumber)(e.history[0].step);e.history.sort(t?s.A.compareByStepAndTimestamp:s.A.compareByTimestamp)})),r},this.handleYAxisLogScaleChange=e=>{const t=this.getUrlState(),n=(0,c.cloneDeep)(t.layout),i=e?"log":"linear";if(!e&&t.lastLinearYAxisRange&&t.lastLinearYAxisRange.length>0)return n.yaxis={type:"linear",range:t.lastLinearYAxisRange},void this.updateUrlState({layout:n,lastLinearYAxisRange:[],yAxisLogScale:e});if(!t.layout.yaxis||!t.layout.yaxis.range)return n.yaxis={type:i,autorange:!0,..."log"===i?{exponentformat:"e"}:{}},void this.updateUrlState({layout:n,lastLinearYAxisRange:[],yAxisLogScale:e});let r=[];const o=t.layout.yaxis.range;e?o[0]<=0?(r=o,n.yaxis={type:"log",autorange:!0,exponentformat:"e"}):n.yaxis={type:"log",range:[Math.log(o[0])/Math.log(10),Math.log(o[1])/Math.log(10)],exponentformat:"e"}:n.yaxis={type:"linear",range:[Math.pow(10,o[0]),Math.pow(10,o[1])]},this.updateUrlState({layout:n,lastLinearYAxisRange:r})},this.handleXAxisChange=e=>{const t=this.getUrlState(),n=G(e.target.value),i={...t.layout,xaxis:{autorange:!0,type:n}};this.xAxisType=n,this.updateUrlState({selectedXAxis:e.target.value,layout:i})},this.handleDownloadCsv=async()=>{const{loading:e}=this.state;if(!e){const e=this.getUrlState().selectedMetricKeys||[];this.loadMetricHistoryPromise=this.loadMetricHistory(this.props.runUuids,e)}await this.loadMetricHistoryPromise;const t=this.getUrlState(),n=new Set(t.selectedMetricKeys),i=(e=>{const t=["run_id",...Object.keys(e[0].history[0])],n=e.flatMap((({runUuid:e,history:t})=>t.map((t=>[e,...Object.values(t)]))));return[t].concat(n).map((e=>e.join(","))).join("\n")})(this.props.metricsWithRunInfoAndHistory.filter((e=>n.has(e.metricKey)))),r=new Blob([i],{type:"application/csv;charset=utf-8"});(0,N.saveAs)(r,"metrics.csv")},this.handleMetricsSelectChange=e=>{const t=this.getUrlState().selectedMetricKeys||[],n=e.filter((e=>!t.includes(e)));this.updateUrlState({selectedMetricKeys:e}),this.loadMetricHistory(this.props.runUuids,n).then((e=>{this.setState({loading:!1}),this.setState((t=>({historyRequestIds:[...t.historyRequestIds,...e]})))}))},this.handleShowPointChange=e=>this.updateUrlState({showPoint:e}),this.handleLineSmoothChange=e=>this.updateUrlState({lineSmoothness:e}),this.getCardConfig=()=>{const{metricKey:e}=this.props,t=this.getUrlState(),n=this.getMetrics(),i=$.predictRunChartsCardChartType(n),r={...P.i$.getEmptyChartCardByType(i,!1,(0,U.yk)()),metricKey:e,selectedMetricKeys:t.selectedMetricKeys&&t.selectedMetricKeys.length>0?t.selectedMetricKeys:[e],xAxisKey:G(t.selectedXAxis),yAxisKey:P.Kb.METRIC,scaleType:t.yAxisLogScale?"log":"linear",displayPoints:t.showPoint,lineSmoothness:t.lineSmoothness};var o,s,a,l,c,d,u,p;i===P.zL.LINE&&t.layout&&Object.keys(t.layout).length>0&&(r.range={xMin:null===(o=t.layout.xaxis)||void 0===o||null===(s=o.range)||void 0===s?void 0:s[0],xMax:null===(a=t.layout.xaxis)||void 0===a||null===(l=a.range)||void 0===l?void 0:l[1],yMin:null===(c=t.layout.yaxis)||void 0===c||null===(d=c.range)||void 0===d?void 0:d[0],yMax:null===(u=t.layout.yaxis)||void 0===u||null===(p=u.range)||void 0===p?void 0:p[1]});return r},this.getChartRunData=()=>{const{runUuids:e,metricKey:t,runInfos:n,runNames:i,runDisplayNames:r}=this.props,o=this.getUrlState(),s=(o.selectedMetricKeys&&o.selectedMetricKeys.length>0?o.selectedMetricKeys:[t]).reduce(((e,t)=>(e[t]={},e)),{});return e.map(((e,t)=>({uuid:e,runInfo:null===n||void 0===n?void 0:n[t],metrics:s,params:{},tags:{},datasets:[],images:{},hidden:!1,color:(0,j.T6)(e),displayName:(null===i||void 0===i?void 0:i[t])||(null===r||void 0===r?void 0:r[t])||e})))},this.getGlobalLineChartConfig=()=>{const{lineSmoothness:e,selectedXAxis:t}=this.getUrlState();return{lineSmoothness:e,xAxisKey:G(t),selectedXAxisMetricKey:void 0}},this.getTooltipContextValue=()=>({runs:this.getChartRunData()}),this.setFullScreenChart=e=>{this.setState({fullScreenChart:e})},this.state={historyRequestIds:[],focused:!0,loading:!1,fullScreenChart:void 0},this.intervalId=null,this.loadMetricHistoryPromise=null,this.xAxisType=null}componentDidMount(){this._isMounted=!0,this.loadMetricHistory(this.props.runUuids,this.getUrlState().selectedMetricKeys),this.shouldPoll()&&(window.addEventListener("blur",this.onBlur),window.addEventListener("focus",this.onFocus),this.intervalId=setInterval((()=>{if(this.state.focused){const e=this.getActiveRunUuids();this.loadMetricHistory(e,this.getUrlState().selectedMetricKeys),this.loadRuns(e),this.shouldPoll()||(this.clearEventListeners(),this.clearInterval())}}),W))}componentWillUnmount(){this._isMounted=!1,this.clearEventListeners(),this.clearInterval()}getUrlState(){return s.A.getMetricPlotStateFromUrl(this.props.location.search)}static predictChartType(e){return e&&e.length&&(0,c.every)(e,(e=>e.history&&1===e.history.length))?"bar":V}static predictRunChartsCardChartType(e){return"bar"===$.predictChartType(e)?P.zL.BAR:P.zL.LINE}getAxisType(){const e=this.getUrlState();return e.layout&&e.layout.yaxis&&"log"===e.layout.yaxis.type?"log":"linear"}render(){const{runUuids:e,runDisplayNames:t,distinctMetricKeys:n}=this.props,{loading:r,historyRequestIds:o}=this.state,s=this.getUrlState(),{showPoint:l,selectedXAxis:c,selectedMetricKeys:d,lineSmoothness:p}=s,h="log"===this.getAxisType(),g=this.getMetrics(),v=$.predictChartType(g);return(0,m.FD)("div",{className:"mlflow-metrics-plot-container",children:[(0,m.Y)(u.jC,{numRuns:this.props.runUuids.length,numCompletedRuns:this.props.completedRunUuids.length,distinctMetricKeys:n,selectedXAxis:c,selectedMetricKeys:d,handleXAxisChange:this.handleXAxisChange,handleMetricsSelectChange:this.handleMetricsSelectChange,handleShowPointChange:this.handleShowPointChange,handleYAxisLogScaleChange:this.handleYAxisLogScaleChange,handleLineSmoothChange:this.handleLineSmoothChange,chartType:v,lineSmoothness:p,yAxisLogScale:h,showPoint:l,handleDownloadCsv:this.handleDownloadCsv,disableSmoothnessControl:this.props.containsInfinities}),(0,m.Y)("div",{className:"metrics-plot-data",children:(0,m.FD)(a.Ay,{requestIds:o,shouldOptimisticallyRender:0===o.length,children:[(0,m.Y)(L.S,{size:"large",css:(0,i.AH)({visibility:r?"visible":"hidden"},"")}),(0,m.Y)(B.W,{contextData:this.getTooltipContextValue(),component:O.X,children:(0,m.Y)(K.i,{cardConfig:this.getCardConfig(),chartRunData:this.getChartRunData(),onStartEditChart:()=>{},onRemoveChart:()=>{},onDownloadFullMetricHistoryCsv:()=>{},index:0,groupBy:null,fullScreen:!1,autoRefreshEnabled:this.shouldPoll(),hideEmptyCharts:!1,globalLineChartConfig:this.getGlobalLineChartConfig(),isInViewport:!0,isInViewportDeferred:!0,setFullScreenChart:this.setFullScreenChart,onReorderWith:()=>{},canMoveUp:!1,canMoveDown:!1,canMoveToTop:!1,canMoveToBottom:!1},e.join()+this.xAxisType)}),(0,m.Y)(z._,{fullScreenChart:this.state.fullScreenChart,onCancel:()=>this.setFullScreenChart(void 0),chartData:this.getChartRunData(),tooltipContextValue:this.getTooltipContextValue(),tooltipComponent:O.X,autoRefreshEnabled:this.shouldPoll(),groupBy:null}),(0,m.Y)(D,{runUuids:e,runDisplayNames:t,metricKeys:d})]})})]})}}$.defaultProps={containsInfinities:!1};const X={getMetricHistoryApi:l.Ly,getRunApi:l.aO};var q=(0,_.h)((0,o.Ng)(((e,t)=>{const{runUuids:n}=t,i=n.filter((t=>"RUNNING"!==(0,d.K4)(t,e).status)),{latestMetricsByRunUuid:r,metricsByRunUuid:o}=e.entities,a=(0,c.flatMap)(n,(e=>{const t=r[e];return t?Object.keys(t):[]})),l=[...new Set(a)].sort(),u=[];let p=!1;const h=(0,c.flatMap)(n,(t=>{const n=s.A.getRunDisplayName((0,d.K4)(t,e),t);u.push(n);const i=o[t];return i?Object.keys(i).map((e=>{const r=i[e].map((e=>(0,H.rj)(e)));return r.some((({value:e})=>"number"===typeof e&&!isNaN(e)&&!isFinite(e)))&&(p=!0),{metricKey:e,history:r,runUuid:t,runDisplayName:n}})):[]})),m=n.map((t=>(0,d.K4)(t,e))),g=m.map(((e,t)=>s.A.getRunDisplayName(e,n[t])));return{runDisplayNames:u,latestMetricsByRunUuid:r,distinctMetricKeys:l,metricsWithRunInfoAndHistory:h,completedRunUuids:i,containsInfinities:p,runInfos:m,runNames:g}}),X)($))},63779:function(){},64368:function(e,t,n){"use strict";n.d(t,{W:function(){return l}});var i=n(46709),r=n(27299),o=n(22544),s=n(73408);const a=i.lazy((()=>n.e(5839).then(n.bind(n,75839)))),l=({fallback:e,...t})=>(0,s.Y)(o.g,{children:(0,s.Y)(i.Suspense,{fallback:null!==e&&void 0!==e?e:(0,s.Y)(r.LegacySkeleton,{active:!0}),children:(0,s.Y)(a,{...t})})})},64865:function(e,t,n){"use strict";n.d(t,{Co:function(){return h},Iq:function(){return a},PQ:function(){return l},WF:function(){return u},ZY:function(){return m},nD:function(){return c},pO:function(){return d}});var i=n(76118),r=n(46709),o=n(31655);const s=(e,t)=>(n,i,r,o=0)=>{var s,a;const l=-1===i&&-1===r;var c,d,u,p;(null===(s=n.querySelector(".is-hover-highlight"))||void 0===s||s.classList.remove("is-hover-highlight"),i>-1)&&(null===(c=n.querySelectorAll(e)[i])||void 0===c||c.classList.add("is-hover-highlight"));(null===(a=n.querySelector(".is-selection-highlight"))||void 0===a||a.classList.remove("is-selection-highlight"),r>-1)&&(null===(d=n.querySelectorAll(e)[r])||void 0===d||d.classList.add("is-selection-highlight"));if(o>0){const t=r>-1?r-o:i>-1?i-o:-1;n.querySelectorAll(e).forEach(((e,n)=>{e.classList.toggle("is-band",n>=0&&n<o),e.classList.toggle("is-band-highlighted",n===t)}))}else n.querySelectorAll(e).forEach((e=>e.classList.remove("is-band")));l?null===(u=n.querySelector(t))||void 0===u||u.classList.remove("is-highlight"):null===(p=n.querySelector(t))||void 0===p||p.classList.add("is-highlight")},a=s("svg .trace.bars g.point",".trace.bars"),l=s("svg .scatterlayer g.trace",".scatterlayer"),c=s("svg .scatterlayer path.point",".trace.scatter"),d=(e,t,n,s,a=0)=>{const l=(0,r.useRef)(n);l.current=n;const c=(0,r.useMemo)((()=>e&&t?n.findIndex((({uuid:e})=>e===t)):-1),[n,e,t]),[d,u]=(0,r.useState)(-1),{onHighlightChange:p}=m();(0,r.useEffect)((()=>{(0,o.GA)()||e&&s(e,d,c,a)}),[s,e,c,d,a]),(0,r.useEffect)((()=>{(0,o.GA)()&&e&&s(e,-1,c,a)}),[s,e,c,a]);const h=(0,r.useRef)(c);h.current=c;const g=(0,r.useCallback)((t=>{if(!e)return;const n=l.current.findIndex((({uuid:e})=>e===t));s(e,n,h.current,a)}),[s,e,a]);return(0,r.useEffect)((()=>p(g)),[p,g]),{selectedTraceIndex:c,hoveredPointIndex:d,setHoveredPointIndex:(0,o.GA)()?i.noop:u}};let u=function(e){return e[e.NONE=0]="NONE",e[e.CHART=1]="CHART",e[e.TABLE=2]="TABLE",e}({});const p=(0,r.createContext)({highlightDataTrace:()=>{},onHighlightChange:()=>()=>{}}),h=({children:e})=>{const t=(0,r.useRef)([]),n=(0,r.useRef)(!1),s=(0,r.useMemo)((()=>{if(!(0,o.GA)())return{highlightDataTrace:()=>{},onHighlightChange:()=>()=>{}};return{highlightDataTrace:(e,{shouldBlock:r,source:o}={})=>{if((0,i.isUndefined)(r)){if(n.current)return}else n.current=r;((e,n)=>{for(const i of t.current)i(e,n)})(e,o)},onHighlightChange:e=>(t.current.push(e),()=>{t.current=t.current.filter((t=>t!==e))})}}),[]);return(0,r.createElement)(p.Provider,{value:s},e)},m=()=>(0,r.useContext)(p)},77199:function(){},77684:function(e,t,n){"use strict";n.d(t,{K:function(){return i}});const i={CARD_PREVIEW:1,CARD_DRAGGED:2,TOOLTIP_CONTAINER:3,SEARCH_BAR:3,TOOLTIP:4}},79804:function(e,t,n){"use strict";n.d(t,{i:function(){return g}});var i=n(27757),r=n(76118),o=n(46709),s=n(64368),a=n(42571),l=n(64865),c=n(53274),d=n(87974),u=n(11825),p=n(32158),h=n(73408);const m={displaylogo:!1,scrollZoom:!1,modeBarButtonsToRemove:["toImage"]},g=o.memo((({runsData:e,xAxis:t,yAxis:n,markerSize:g=10,className:v,margin:f=c.am,onUpdate:y,onHover:x,onUnhover:b,width:M,height:C,useDefaultHoverBox:w=!0,selectedRunUuid:E,onSetDownloadHandler:S})=>{const{theme:I}=(0,i.u)(),{layoutHeight:k,layoutWidth:R,setContainerDiv:A,containerDiv:D,isDynamicSizeSupported:T}=(0,c.xN)(),Y=(0,o.useMemo)((()=>{const i=[],o=[],s=[],a=[];for(const c of e){var l,d,u,p;const{runInfo:e,metrics:h,params:m,color:g,uuid:v,displayName:f}=c,{runUuid:y,runName:x}=e||{},b="METRIC"===t.type?h:m,M="METRIC"===n.type?h:m,C=null===b||void 0===b||null===(l=b[null!==(d=t.dataAccessKey)&&void 0!==d?d:t.key])||void 0===l?void 0:l.value,w=null===M||void 0===M||null===(u=M[null!==(p=n.dataAccessKey)&&void 0!==p?p:n.key])||void 0===u?void 0:u.value;(0,r.isNil)(C)||(0,r.isNil)(w)||(i.push(C),o.push(w),s.push(g||I.colors.primary),y?a.push([y,x||y]):a.push([v,f]))}return[{x:i,y:o,customdata:a,text:e.map((({displayName:e})=>e)),hovertemplate:w?"<b>%{customdata[1]}:</b><br><b>%{xaxis.title.text}:</b> %{x:.2f}<br><b>%{yaxis.title.text}:</b> %{y:.2f}<br><extra></extra>":void 0,hoverinfo:w?void 0:"none",hoverlabel:w?c.rv:void 0,type:"scatter",mode:"markers",textposition:"bottom center",marker:{size:g,color:s}}]}),[e,t,n,I,g,w]),_=(0,o.useMemo)((()=>(0,c.y)(I)),[I]),[U,N]=(0,o.useState)({width:M||R,height:C||k,margin:f,xaxis:{title:t.key,tickfont:{size:11,color:I.colors.textSecondary}},yaxis:{title:n.key,tickfont:{size:11,color:I.colors.textSecondary}},template:{layout:_}});(0,o.useEffect)((()=>{N((e=>{const i={...e,width:M||R,height:C||k,margin:f};return i.xaxis&&(i.xaxis.title=t.key),i.yaxis&&(i.yaxis.title=n.key),i}))}),[R,k,f,t.key,n.key,M,C]);const{setHoveredPointIndex:L}=(0,l.pO)(D,E,e,l.nD),H=(0,o.useCallback)((({points:e})=>{var t,n,i,r;const o=null===(t=e[0])||void 0===t||null===(n=t.customdata)||void 0===n?void 0:n[0];L(null!==(i=null===(r=e[0])||void 0===r?void 0:r.pointIndex)&&void 0!==i?i:-1),o&&(null===x||void 0===x||x(o,void 0,{}))}),[x,L]),K=(0,o.useCallback)((()=>{null===b||void 0===b||b(),L(-1)}),[b,L]),P=(0,a.l)(H),F=(0,o.useMemo)((()=>(0,c.eY)(e)),[e]);(0,o.useEffect)((()=>{const e=Y.map((e=>({...e,mode:"text+markers"})));null===S||void 0===S||S((0,u.W)(e,U))}),[U,S,Y]);const B=(0,h.Y)("div",{css:[c.gz.chartWrapper(I),c.gz.scatterChartHighlightStyles,""],className:v,ref:A,children:(0,h.Y)(s.W,{data:Y,useResizeHandler:!T,css:c.gz.chart(I),layout:U,config:m,onUpdate:y,onHover:P,onUnhover:K,fallback:(0,h.Y)(p.Us,{})})});return(0,h.Y)(d.A,{labelData:F,children:B})}))},84334:function(e,t,n){"use strict";n.d(t,{u:function(){return d}});var i=n(68248),r=n(27757),o=n(27299),s=n(52572),a=n(46709),l=n(40724),c=n(73408);const d=()=>{const e=(0,s.e)(),{theme:t}=(0,r.u)(),n=(0,a.useCallback)((()=>{e((e=>({...e,hideEmptyCharts:!0})))}),[e]);return(0,c.Y)("div",{css:(0,i.AH)({flex:1,display:"flex",alignItems:"center",justifyContent:"center",paddingLeft:t.spacing.lg,paddingRight:t.spacing.lg},""),children:(0,c.Y)(o.Empty,{description:(0,c.Y)(l.A,{id:"VAUHXW",defaultMessage:"No chart data available for the currently visible runs. Select other runs or <link>hide empty charts.</link>",values:{link:e=>(0,c.Y)(r.T.Link,{componentId:"codegen_mlflow_app_src_experiment-tracking_components_runs-charts_components_runschartsnodatafoundindicator.tsx_31",onClick:n,children:e})}}),image:(0,c.Y)(o.NoIcon,{})})})}},87974:function(e,t,n){"use strict";var i=n(68248),r=(n(46709),n(44707)),o=n(27757),s=n(73408);t.A=({labelData:e,fullScreen:t,children:n})=>{const{theme:a}=(0,o.u)(),l=t?100:32,c=t?a.spacing.lg:a.spacing.md;return(0,s.FD)(s.FK,{children:[(0,s.Y)("div",{css:(0,i.AH)({height:`calc(100% - ${l+c}px)`},""),children:n}),(0,s.Y)(r.A,{labelData:e,height:l,fullScreen:t})]})}},89712:function(e,t,n){"use strict";n.d(t,{u:function(){return v}});var i=n(27757),r=n(46709),o=n(7655),s=n(64368),a=n(42571),l=n(64865),c=n(53274),d=n(87974),u=n(11825),p=n(86575),h=n(32158),m=n(73408);const g={displaylogo:!1,scrollZoom:!1,doubleClick:"autosize",showTips:!1,modeBarButtonsToRemove:["toImage"]},v=r.memo((({runsData:e,metricKey:t,className:n,margin:v=c.am,onUpdate:y,onHover:x,onUnhover:b,barWidth:M=3/4,width:C,height:w,displayRunNames:E=!0,useDefaultHoverBox:S=!0,displayMetricKey:I=!0,selectedRunUuid:k,onSetDownloadHandler:R})=>{var A,D;const T=(0,r.useMemo)((()=>{const n=e.map((e=>e.uuid)),i=e.map((({displayName:e})=>e)),r=e.map((e=>{var n;return(0,c.jn)(null===(n=e.metrics[t])||void 0===n?void 0:n.value)})),o=e.map((e=>{var n;const i=p.g[t];var r;return i?i.valueFormatter({value:null===(r=e.metrics[t])||void 0===r?void 0:r.value}):((e,t=2)=>"number"===typeof e?e.toFixed(t):e)(null===(n=e.metrics[t])||void 0===n?void 0:n.value)})),s=e.map((e=>e.color));return[{y:n,x:r,names:i,text:o,textposition:r.map((e=>0===e?"outside":"auto")),textfont:{size:11},metrics:e.map((e=>e.metrics[t])),type:"bar",hovertemplate:S?"%{label}<extra></extra>":void 0,hoverinfo:S?"y":"none",hoverlabel:S?c.rv:void 0,width:M,orientation:"h",marker:{color:s}}]}),[e,t,M,S]),{layoutHeight:Y,layoutWidth:_,setContainerDiv:U,containerDiv:N,isDynamicSizeSupported:L}=(0,c.xN)(),{formatMessage:H}=(0,o.A)(),{theme:K}=(0,i.u)(),P=(0,r.useMemo)((()=>(0,c.y)(K)),[K]),[F,B]=(0,r.useState)({width:C||_,height:w||Y,hovermode:"y",margin:v,xaxis:{title:I?t:void 0,tickfont:{size:11,color:K.colors.textSecondary},tickformat:null!==(A=null===(D=p.g[t])||void 0===D?void 0:D.chartAxisTickFormat)&&void 0!==A?A:void 0},yaxis:{showticklabels:E,title:E?H({id:"+hQ+de",defaultMessage:"Run name"}):void 0,tickfont:{size:11,color:K.colors.textSecondary},fixedrange:!0},template:{layout:P}});(0,r.useEffect)((()=>{B((e=>({...e,width:C||_,height:w||Y,margin:v,xaxis:{...e.xaxis,title:I?t:void 0}})))}),[_,Y,v,t,C,w,I]);const{setHoveredPointIndex:O}=(0,l.pO)(N,k,e,l.Iq),z=(0,r.useCallback)((({points:e,event:t})=>{var n,i,r,o;const s=null===(n=e[0].data)||void 0===n?void 0:n.metrics[e[0].pointIndex];O(null!==(i=null===(r=e[0])||void 0===r?void 0:r.pointIndex)&&void 0!==i?i:-1);const a={xValue:e[0].x,yValue:e[0].value,index:e[0].pointIndex,metricEntity:s},l=null===(o=e[0])||void 0===o?void 0:o.label;l&&(null===x||void 0===x||x(l,t,a))}),[x,O]),j=(0,r.useCallback)((()=>{null===b||void 0===b||b(),O(-1)}),[b,O]),V=(0,a.l)(z),W=(0,r.useMemo)((()=>(0,c.eY)(e)),[e]);(0,r.useEffect)((()=>{const e={...F,yaxis:{...F.yaxis,showticklabels:!0,automargin:!0}},t=T.map((e=>({...e,y:e.names})));null===R||void 0===R||R((0,u.W)(t,e))}),[F,R,T]);const G=(0,m.Y)("div",{css:[c.gz.chartWrapper(K),f.highlightStyles,""],className:n,ref:U,children:(0,m.Y)(s.W,{data:T,useResizeHandler:!L,css:c.gz.chart(K),onUpdate:y,layout:F,config:g,onHover:V,onUnhover:j,fallback:(0,m.Y)(h.Us,{})})});return(0,m.Y)(d.A,{labelData:W,children:G})})),f={highlightStyles:{".trace.bars g.point path":{transition:"var(--trace-transition)"},".trace.bars.is-highlight g.point path":{opacity:"var(--trace-opacity-dimmed-high) !important"},".trace.bars g.point.is-hover-highlight path":{opacity:"var(--trace-opacity-highlighted) !important"},".trace.bars g.point.is-selection-highlight path":{opacity:"var(--trace-opacity-highlighted) !important",stroke:"var(--trace-stroke-color)",strokeWidth:"var(--trace-stroke-width) !important"}}}},92924:function(e,t,n){"use strict";n.d(t,{x:function(){return s}});var i=n(76118),r=n(46709),o=n(53274);const s=(e,t)=>(0,r.useMemo)((()=>{const n=(0,i.pick)(e,["xAxisKey","selectedXAxisMetricKey","lineSmoothness"]);if(!t)return n;const r=t.xAxisKey;if(e.useGlobalLineSmoothing&&!(0,i.isUndefined)(t.lineSmoothness)&&(n.lineSmoothness=t.lineSmoothness),!(0,i.isUndefined)(r)&&e.useGlobalXaxisKey){n.xAxisKey=r;const e=null===t||void 0===t?void 0:t.selectedXAxisMetricKey;r===o.fj.METRIC&&e&&(n.selectedXAxisMetricKey=e)}return n}),[e,t])},94119:function(e,t,n){"use strict";n.d(t,{X:function(){return b}});var i=n(76118),r=n(27757),o=n(79081),s=n(27299),a=n(40724),l=n(91105),c=n(60284),d=n(55840),u=n(53274),p=n(35286),h=n(86133),m=n(18756),g=n(31655),v=n(86575),f=n(73408);const y=(e,t,n)=>{var r,o;const{metricKey:s,xAxisKey:a}=e,l=(null===n||void 0===n||null===(r=n.metricEntity)||void 0===r?void 0:r.key)||s,c=null!==(o=null===n||void 0===n?void 0:n.yValue)&&void 0!==o?o:null===t||void 0===t?void 0:t.metrics[l].value;if((0,i.isNil)(c))return null;const d=((e,t)=>{var n,i,r;return t===u.fj.METRIC?null!==(n=null===e||void 0===e?void 0:e.xValue)&&void 0!==n?n:"":(0,g.v$)()&&t===u.fj.TIME_RELATIVE?"number"===typeof(r=null!==(i=null===e||void 0===e?void 0:e.xValue)&&void 0!==i?i:"")?r:r.split(" ")[1]||"00:00:00":null===e||void 0===e?void 0:e.xValue})(n,a);return(0,f.FD)(f.FK,{children:[n&&(0,f.FD)("div",{css:M.value,children:[(0,f.FD)("strong",{children:[n.label,":"]})," ",d]}),(0,f.FD)("div",{css:M.value,children:[(0,f.FD)("strong",{children:[l,":"]})," ",c]})]})},x=({activeRun:e,cardConfig:t,isHovering:n,hoverData:i})=>t.type===h.zL.BAR?((e,t)=>{var n,i;const{metricKey:r,dataAccessKey:o}=e,s=null!==o&&void 0!==o?o:r,a=null===t||void 0===t?void 0:t.metrics[s];if(!a)return null;const l=v.g[a.key],c=null!==(n=null===l||void 0===l?void 0:l.displayName)&&void 0!==n?n:a.key,d=null!==(i=null===l||void 0===l?void 0:l.valueFormatter({value:a.value}))&&void 0!==i?i:a.value;return(0,f.FD)("div",{css:M.value,children:[(0,f.FD)("strong",{children:[c,":"]})," ",d]})})(t,e):t.type===h.zL.SCATTER?((e,t)=>{var n,i,r,o,s,a;const{xaxis:l,yaxis:c}=e,d=null!==(n=l.dataAccessKey)&&void 0!==n?n:l.key,u=null!==(i=l.dataAccessKey)&&void 0!==i?i:c.key,p=l.key,h=c.key,m="METRIC"===l.type?null===(r=t.metrics[d])||void 0===r?void 0:r.value:null===(o=t.params[d])||void 0===o?void 0:o.value,g="METRIC"===c.type?null===(s=t.metrics[u])||void 0===s?void 0:s.value:null===(a=t.params[u])||void 0===a?void 0:a.value;return(0,f.FD)(f.FK,{children:[m&&(0,f.FD)("div",{css:M.value,children:[(0,f.FD)("strong",{children:["X (",p,"):"]})," ",m]}),g&&(0,f.FD)("div",{css:M.value,children:[(0,f.FD)("strong",{children:["Y (",h,"):"]})," ",g]})]})})(t,e):t.type===h.zL.CONTOUR?((e,t)=>{var n,i,r,o,s,a;const{xaxis:l,yaxis:c,zaxis:d}=e,u=l.key,p=c.key,h=d.key,m="METRIC"===l.type?null===(n=t.metrics[u])||void 0===n?void 0:n.value:null===(i=t.params[u])||void 0===i?void 0:i.value,g="METRIC"===c.type?null===(r=t.metrics[p])||void 0===r?void 0:r.value:null===(o=t.params[p])||void 0===o?void 0:o.value,v="METRIC"===d.type?null===(s=t.metrics[h])||void 0===s?void 0:s.value:null===(a=t.params[h])||void 0===a?void 0:a.value;return(0,f.FD)(f.FK,{children:[(0,f.FD)("div",{css:M.value,children:[(0,f.FD)("strong",{children:["X (",u,"):"]})," ",m]}),(0,f.FD)("div",{css:M.value,children:[(0,f.FD)("strong",{children:["Y (",p,"):"]})," ",g]}),(0,f.FD)("div",{css:M.value,children:[(0,f.FD)("strong",{children:["Z (",h,"):"]})," ",v]})]})})(t,e):t.type===h.zL.LINE?y(t,e,i):t.type===h.zL.PARALLEL?((e,t,n)=>{const{selectedParams:i,selectedMetrics:r}=e,o=i.map((e=>{const n=null===t||void 0===t?void 0:t.params[e];return!n||(0,f.FD)("div",{children:[(0,f.FD)("strong",{children:[n.key,":"]})," ",n.value]},e)})),s=r.map((e=>{const n=null===t||void 0===t?void 0:t.metrics[e];return!n||(0,f.FD)("div",{children:[(0,f.FD)("strong",{children:[n.key,":"]})," ",n.value]},e)}));return n?(0,f.FD)(f.FK,{children:[o.slice(0,3),(o.length>3||s.length>1)&&(0,f.Y)("div",{children:"..."}),s[s.length-1]]}):(0,f.FD)(f.FK,{children:[o,s]})})(t,e,n):null,b=({closeContextMenu:e,contextData:t,hoverData:n,chartData:i,runUuid:u,isHovering:h,mode:g})=>{var v;const{runs:y,onTogglePin:b,onHideRun:C,getDataTraceLink:w}=t,[E]=(0,d.z)(),S=null===y||void 0===y?void 0:y.find((e=>e.uuid===u));if((0,p.bL)(n)&&g===p.QS.MultipleTracesWithScanline&&h)return(0,f.Y)(m.G,{hoverData:n});const I=(0,p.bL)(n)?n.hoveredDataPoint:n;if(!S)return null;const k=S.displayName||S.uuid,R=null!==I&&void 0!==I&&I.metricEntity?` (${I.metricEntity.key})`:"";return(0,f.FD)("div",{children:[(0,f.FD)("div",{css:M.contentWrapper,children:[(0,f.FD)("div",{css:M.header,children:[(0,f.Y)("div",{css:M.colorPill,style:{backgroundColor:S.color}}),S.groupParentInfo?(0,f.Y)(r.T.Text,{children:k+R}):(0,f.Y)(l.N_,{to:null!==(v=null===w||void 0===w?void 0:w(E,u))&&void 0!==v?v:c.Ay.getRunPageRoute(E,u),target:"_blank",css:M.runLink,onClick:e,children:k+R})]}),!h&&(0,f.Y)(r.B,{componentId:"codegen_mlflow_app_src_experiment-tracking_components_runs-compare_runscomparetooltipbody.tsx_259",size:"small",onClick:e,icon:(0,f.Y)(r.C,{})})]}),(0,f.Y)(x,{isHovering:h,activeRun:S,cardConfig:i,hoverData:I}),(0,f.FD)("div",{css:M.actionsWrapper,children:[S.pinnable&&b&&(0,f.Y)(o.T,{componentId:"mlflow.runs_chart.tooltip.pin_run",content:S.pinned?(0,f.Y)(a.A,{id:"ugm2f6",defaultMessage:"Unpin run"}):(0,f.Y)(a.A,{id:"58xhem",defaultMessage:"Click to pin the run"}),side:"bottom",children:(0,f.Y)(r.B,{componentId:"codegen_mlflow_app_src_experiment-tracking_components_runs-compare_runscomparetooltipbody.tsx_282",size:"small",onClick:()=>{b(u),e()},icon:S.pinned?(0,f.Y)(s.PinFillIcon,{}):(0,f.Y)(s.PinIcon,{})})}),C&&(0,f.Y)(o.T,{componentId:"mlflow.runs_chart.tooltip.hide_run",content:(0,f.Y)(a.A,{id:"eE5VIF",defaultMessage:"Click to hide the run"}),side:"bottom",children:(0,f.Y)(r.B,{componentId:"codegen_mlflow_app_src_experiment-tracking_components_runs-compare_runscomparetooltipbody.tsx_302","data-testid":"experiment-view-compare-runs-tooltip-visibility-button",size:"small",onClick:()=>{C(u),e()},icon:(0,f.Y)(s.VisibleIcon,{})})})]})]})},M={runLink:e=>({color:e.colors.primary,"&:hover":{}}),actionsWrapper:{marginTop:8,display:"flex",gap:8,alignItems:"center"},header:{display:"flex",gap:8,alignItems:"center"},value:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},contentWrapper:{display:"flex",gap:8,alignItems:"center",marginBottom:12,justifyContent:"space-between",height:24},colorPill:{width:12,height:12,borderRadius:"100%"}}},95119:function(e,t,n){"use strict";n.d(t,{J:function(){return m},X:function(){return f}});var i=n(46709),r=n(89712),o=n(35286),s=n(32158),a=n(11825),l=n(90142),c=n(86575),d=n(84334),u=n(27757),p=n(27299),h=n(73408);const m={t:24,b:48,r:0,l:4,pad:0};var g={name:"uxy5jl",styles:"flex:1;display:flex;align-items:center;overflow:hidden"},v={name:"1wcfv52",styles:"margin-right:0"};const f=({config:e,chartRunData:t,onDelete:n,onEdit:f,fullScreen:x,setFullScreenChart:b,hideEmptyCharts:M,isInViewport:C,...w})=>{var E;const S=null!==(E=e.dataAccessKey)&&void 0!==E?E:e.metricKey,I=(0,i.useMemo)((()=>t.filter((({hidden:e,metrics:t})=>!e&&t[S]))),[t,S]),k=(0,i.useMemo)((()=>!I.flatMap((({metrics:e})=>Object.keys(e))).includes(S)),[S,I]),{setTooltip:R,resetTooltip:A,selectedRunUuid:D}=(0,o.uN)(e),T=x||C,[Y,_]=(0,a.H)(),U=(0,h.Y)("div",{css:[y.barChartCardWrapper,{height:x?"100%":void 0},""],children:T?(0,h.Y)(r.u,{runsData:I,metricKey:S,displayRunNames:!1,displayMetricKey:!1,useDefaultHoverBox:!1,margin:m,onHover:R,onUnhover:A,selectedRunUuid:D,onSetDownloadHandler:_}):null});if(x)return U;if(M&&k)return null;const N=e.datasetName?(0,h.Y)("div",{css:g,children:(0,h.FD)(u.T.Text,{title:e.metricKey,ellipsis:!0,bold:!0,children:[(0,h.Y)(p.Tag,{componentId:"mlflow.charts.bar_card_title.dataset_tag",css:v,children:e.datasetName})," ",e.metricKey]})}):null!==(L=null!==(H=null===(K=c.g[e.metricKey])||void 0===K?void 0:K.displayName)&&void 0!==H?H:e.displayName)&&void 0!==L?L:e.metricKey;var L,H,K;return(0,h.Y)(s.Ox,{onEdit:f,onDelete:n,title:N,uuid:e.uuid,dragGroupKey:s.cN.GENERAL_AREA,toggleFullScreenChart:k?void 0:()=>{var t,n;null===b||void 0===b||b({config:e,title:null!==(t=null===(n=c.g[e.metricKey])||void 0===n?void 0:n.displayName)&&void 0!==t?t:e.metricKey,subtitle:null})},supportedDownloadFormats:["png","svg","csv"],onClickDownload:t=>{if("csv"!==t&&"csv-full"!==t)null===Y||void 0===Y||Y(t,e.metricKey);else{const t=[...I].reverse();(0,l.LL)(t,[e.metricKey],[],e.metricKey)}},...w,children:k?(0,h.Y)(d.u,{}):U})},y={barChartCardWrapper:{overflow:"hidden"}}},95368:function(e,t,n){"use strict";n.d(t,{h:function(){return T}});var i=n(27757),r=n(76118),o=n(46709),s=n(7655),a=n(64368),l=n(42571),c=n(64865),d=n(53274),u=n(96267);const p=(e,t)=>{if(t<=1||!e||e.length<=1||e.every((t=>t===e[0])))return e;const n=t/(u.W0+1),i=[];let r=0;for(let o=0;o<e.length;o++)if(isNaN(e[o]))i.push(e[o]);else{r=r*n+(1-n)*e[o];const t=r/(1-Math.pow(n,o+1));i.push(t)}return i};var h=n(87974),m=n(31655),g=n(68248),v=n(73408);const f=".main-svg .draglayer .nsewdrag",y=e=>{var t;const n=(0,r.isString)(e)&&(null===(t=e.match(/[0-9]{2}:[0-9]{2}:[0-9]{2}\.([0-9]+)/))||void 0===t?void 0:t[1]);return n?1e3*Number(`0.${n}`)%1:0};var x=n(11825),b=n(44105),M=n(86133),C=n(12479);const w=(e,t)=>t===d.fj.STEP?e.step:t===d.fj.TIME||t===d.fj.TIME_RELATIVE?e.timestamp:null;var E=n(32158);const S=({runEntry:e,metricKey:t,xAxisKey:n,selectedXAxisMetricKey:i,useDefaultHoverBox:o,lineSmoothness:s,lineShape:a,lineDash:l,displayPoints:c,displayOriginalLine:u,xAxisScaleType:h,expression:m,evaluateExpression:g})=>{var v,f,y,x,b;if(!e.metricsHistory)return{};let M,C,E=[];if(m&&g)E=(({expression:e,runEntry:t,evaluateExpression:n,xAxisKey:i})=>{const o=e.variables.map((e=>{var n;const r=null===(n=t.metricsHistory)||void 0===n?void 0:n[e];return void 0!==r?r.flatMap((e=>{const t=w(e,i);return null!==t?[t]:[]})):[]})),s=(0,r.intersection)(...o);return s.sort(((e,t)=>e-t)),s.flatMap((r=>{const o=e.variables.reduce(((e,n)=>{var o,s;const a=null===(o=t.metricsHistory)||void 0===o?void 0:o[n],l=null===a||void 0===a||null===(s=a.find((e=>w(e,i)===r)))||void 0===s?void 0:s.value;return void 0!==l&&(e[n]=l),e}),{}),s=n(e,o);return void 0!==s?[{value:s,key:e.expression,...i===d.fj.STEP||i===d.fj.METRIC?{step:r,timestamp:0}:{timestamp:r,step:0}}]:[]}))})({expression:m,runEntry:e,evaluateExpression:g,xAxisKey:n});else{if(void 0===t)return{};var S;E=null===(S=e.metricsHistory[t])||void 0===S?void 0:S.sort(((e,t)=>n===d.fj.STEP?e.step-t.step:e.timestamp-t.timestamp))}if(n===d.fj.METRIC){var k,T;const t=new Set((null!==(k=E)&&void 0!==k?k:[]).map((({step:e})=>e))),n=D(t,e.metricsHistory[i]),r=n.map((({step:e})=>e)),o=new Set(r),s=I(null!==(T=E)&&void 0!==T?T:[],r).filter((({step:e})=>o.has(e)));M=n.map((({value:e})=>e)),C=s.map((({value:e})=>(0,d.jn)(e)))}else{var Y;if(M=A(E,n),C=null===(Y=E)||void 0===Y?void 0:Y.map((({value:e})=>(0,d.jn)(e))),"log"===h){const e=M.findIndex((e=>e>0));-1!==e&&(M=M.slice(e),C=C.slice(e))}}const _=(0,d.fH)(M)?"linear":a,U=!u&&(null!==c&&void 0!==c?c:M.length<60),N=1===(null===(v=C)||void 0===v?void 0:v.length),L=u?"skip":o?void 0:"none";return{uuid:e.uuid,name:(null===(f=e.runInfo)||void 0===f?void 0:f.runName)||"",x:M,y:p(null!==(y=C)&&void 0!==y?y:[],u?0:s),metricHistory:E,metricKey:t||(null===m||void 0===m?void 0:m.expression),hovertext:(null===(x=e.runInfo)||void 0===x?void 0:x.runName)||"",text:"x",textposition:"outside",textfont:{size:11},mode:N||U?"lines+markers":"lines",hovertemplate:o?R((null===(b=e.runInfo)||void 0===b?void 0:b.runName)||""):void 0,hoverinfo:L,hoverlabel:o?d.rv:void 0,type:"scatter",line:{dash:l,shape:_},marker:{color:u?(0,d.FI)(e.color,.15):e.color}}},I=(e,t)=>{const n=t.reduce(((e,t,n)=>(e[t]=n,e)),{});return e.slice().sort(((e,t)=>{var i,r;return(null!==(i=n[e.step])&&void 0!==i?i:1/0)-(null!==(r=n[t.step])&&void 0!==r?r:1/0)}))},k={displaylogo:!1,doubleClick:"autosize",scrollZoom:!1,modeBarButtonsToRemove:["toImage"]},R=e=>`<b>${e}</b>:<br><b>%{xaxis.title.text}:</b> %{x}<br><b>%{yaxis.title.text}:</b> %{y:.2f}<br><extra></extra>`,A=(e,t)=>{if(!e)return[];if(t===d.fj.TIME_RELATIVE){const{timestamp:t}=(0,r.minBy)(e,"timestamp")||{};return t?(0,m.v$)()?e.map((({timestamp:e})=>e-t+b.$V)):e.map((({timestamp:e})=>(e-t)/1e3)):e.map((({step:e})=>e))}if((0,m.v$)()&&t===d.fj.TIME_RELATIVE_HOURS){const{timestamp:t}=(0,r.minBy)(e,"timestamp")||{};if(t)return e.map((({timestamp:e})=>(e-t)/b.uv))}else if(t===d.fj.TIME)return e.map((({timestamp:e})=>e));return e.map((({step:e})=>e))},D=(e,t)=>t?t.filter((t=>e.has(t.step))).map((e=>({value:(0,d.jn)(e.value),step:e.step}))).sort(((e,t)=>Number(e.value)-Number(t.value))):[],T=o.memo((({runsData:e,metricKey:t,selectedMetricKeys:n,scaleType:u="linear",xAxisScaleType:p="linear",xAxisKey:w=d.fj.STEP,yAxisKey:R=M.Kb.METRIC,yAxisExpressions:T=[],selectedXAxisMetricKey:_="",lineSmoothness:U=70,className:N,margin:L=d.am,lineShape:H="linear",onUpdate:K,onHover:P,onUnhover:F,width:B,height:O,useDefaultHoverBox:z=!0,selectedRunUuid:j,xRange:V,yRange:W,lockXAxisZoom:G,fullScreen:$,displayPoints:X,onSetDownloadHandler:q,positionInSection:J=0})=>{const{theme:Q}=(0,i.u)(),{evaluateExpression:Z}=(0,C.l)(),ee=(0,o.useMemo)((()=>{let i=w;if((0,m.v$)()&&w===d.fj.TIME_RELATIVE){const o=n||[t];let s=0;e.forEach((e=>{const t=e.metricsHistory;t&&o.forEach((e=>{if(t[e]){const{timestamp:n}=(0,r.minBy)(t[e],"timestamp")||{},{timestamp:i}=(0,r.maxBy)(t[e],"timestamp")||{};if(i&&n){const e=i-n;s=Math.max(s,e)}}}))})),s>=b.B5&&(i=d.fj.TIME_RELATIVE_HOURS)}return i}),[e,n,t,w]),te=e=>{const t=S(e),n={...e,lineSmoothness:0,useDefaultHoverBox:!1,displayPoints:!1,displayOriginalLine:!0};return[t,S(n)]},ne=(0,o.useMemo)((()=>{const i=null!==n&&void 0!==n?n:[t];return e.map((e=>(0,m.Iq)()&&w!==d.fj.METRIC&&R===M.Kb.EXPRESSION?T.flatMap(((t,n)=>te({runEntry:e,expression:t,xAxisKey:ee,selectedXAxisMetricKey:_,useDefaultHoverBox:z,lineSmoothness:U,lineShape:H,lineDash:d.J2[n%d.J2.length],displayPoints:X,xAxisScaleType:p,evaluateExpression:Z}))):i.filter((t=>{var n;return!(0,r.isEmpty)(null===(n=e.metricsHistory)||void 0===n?void 0:n[t])})).flatMap(((t,n)=>te({runEntry:e,metricKey:t,xAxisKey:ee,selectedXAxisMetricKey:_,useDefaultHoverBox:z,lineSmoothness:U,lineShape:H,lineDash:d.J2[n%d.J2.length],displayPoints:X,xAxisScaleType:p}))))).flat()}),[e,H,ee,U,t,z,n,_,X,p,R,T,Z,w]),ie=(0,o.useMemo)((()=>{const i=null!==n&&void 0!==n?n:[t];return e.filter((({groupParentInfo:e})=>e)).flatMap((e=>i.map((t=>(({runEntry:e,metricKey:t,lineShape:n,xAxisKey:i,selectedXAxisMetricKey:o,xAxisScaleType:s})=>{var a;if(!e.aggregatedMetricsHistory)return{};const{max:l,min:c}=e.aggregatedMetricsHistory[t];let u,p,h,m;if(i===d.fj.METRIC){if(!e.metricsHistory)return{};const t=new Set(l.map((({step:e})=>e))),n=D(t,e.metricsHistory[o]),i=n.map((e=>e.step)),r=new Set(i),s=n.map((e=>e.value));h=I(c,i).filter((({step:e})=>r.has(e))).map((({value:e})=>(0,d.jn)(e))).reverse(),m=I(l,i).filter((({step:e})=>r.has(e))).map((({value:e})=>(0,d.jn)(e))),u=s.slice().reverse(),p=s}else{const e=c.slice().reverse();if(u=A(e,i),p=A(l,i),h=e.map((({value:e})=>(0,d.jn)(e))),m=l.map((({value:e})=>(0,d.jn)(e))),"log"===s){const e=p.findIndex((e=>(0,r.isNumber)(e)&&e>0)),t=u.length-u.findIndex((e=>(0,r.isNumber)(e)&&e>0));-1!==e&&-1!==t&&(p=p.slice(e),m=m.slice(e),u=u.slice(0,t-1),h=h.slice(0,t-1))}}const g=[...u,null,...p],v=[...h,null,...m];return{name:(null===(a=e.runInfo)||void 0===a?void 0:a.runName)||"",x:g,y:v,fillcolor:(0,d.FI)(e.color,.2),hovertemplate:void 0,hoverlabel:void 0,hoverinfo:"skip",line:{color:"transparent",shape:n},fill:"tozeroy",type:"scatter"}})({runEntry:e,metricKey:t,lineShape:H,xAxisKey:ee,selectedXAxisMetricKey:_,xAxisScaleType:p})))))}),[H,t,e,n,ee,_,p]),re=(0,o.useMemo)((()=>[...ie,...ne]),[ne,ie]),{layoutHeight:oe,layoutWidth:se,setContainerDiv:ae,containerDiv:le,isDynamicSizeSupported:ce}=(0,d.xN)(),{formatMessage:de}=(0,s.A)(),{setHoveredPointIndex:ue}=(0,c.pO)(le,j,re,c.PQ,ie.length),pe=((e,t,n)=>e===d.fj.TIME||(0,m.v$)()&&n===d.fj.TIME_RELATIVE?"date":e===d.fj.STEP&&"log"===t?"log":"linear")(w,p,ee),he=(0,o.useMemo)((()=>ee===d.fj.METRIC?_:de((0,d.fw)(ee))),[de,ee,_]),me=(0,o.useMemo)((()=>({tickfont:{size:11,color:Q.colors.textSecondary},type:"log"===u?"log":"linear",fixedrange:G,range:W,autorange:void 0===W,tickformat:"f"})),[u,G,Q,W]),ge=(0,o.useMemo)((()=>({title:he,tickfont:{size:11,color:Q.colors.textSecondary},range:V,autorange:void 0===V,type:pe})),[Q,he,V,pe]),[ve,fe]=(0,o.useState)({width:B||se,height:O||oe,margin:L,xaxis:ge,yaxis:me,showlegend:!1});(0,o.useEffect)((()=>{fe((e=>{const t={...e,width:B||se,height:O||oe,margin:L,yaxis:me,xaxis:{...e.xaxis,...ge},showlegend:!1};return(0,r.isEqual)(t,e)?e:t}))}),[se,oe,L,ge,me,B,O,he]);const ye=(0,o.useMemo)((()=>((null===n||void 0===n?void 0:n.length)||0)>1),[n]),xe=(0,o.useCallback)((()=>{null===F||void 0===F||F(),ue(-1)}),[F,ue]),be=(0,o.useMemo)((()=>(0,d.y)(Q)),[Q]),Me=ve;Me.xaxis&&(Me.xaxis.title=he,Me.xaxis.type=pe,V&&(Me.xaxis.range=V),Me.xaxis.automargin=!0,Me.xaxis.tickformat=(0,m.v$)()&&ee===d.fj.TIME_RELATIVE?"%H:%M:%S":void 0),Me.template={layout:be},Me.yaxis&&W&&(Me.yaxis.range=W,Me.yaxis.automargin=!0,Me.yaxis.tickformat="f");const Ce=(0,o.useMemo)((()=>(0,d.Ct)(e,n,t,R,T)),[e,n,t,R,T]),{scanlineElement:we,initHandler:Ee,updateHandler:Se,onPointHover:Ie,onPointUnhover:ke}=(({onUnhover:e,onHover:t,runsData:n,plotData:i,legendLabelData:s,containsMultipleMetricKeys:a,xAxisKeyLabel:l,xAxisKey:c,disabled:d=!1,setHoveredPointIndex:u,xAxisScaleType:p="linear",positionInSection:h=0})=>{const m=(0,o.useRef)({containerLeftPixels:0,plotWidthPixels:0,plotOffsetPixels:0,lowerBoundValue:0,valueRange:0,mainContainer:null,dragLayer:null,initialized:!1}),x=(0,o.useRef)(null),b=(0,o.useRef)(void 0),M=(0,o.useMemo)((()=>(0,r.uniq)(i.map((({x:e})=>e)).flat())),[i]),[C,w]=(0,o.useState)(null),E=(0,o.useRef)(void 0),S=(0,o.useRef)(s),I=(0,o.useRef)(n),k=(0,o.useRef)(i),R=(0,o.useRef)(M),A=(0,o.useRef)(C);S.current=s,I.current=n,k.current=i,R.current=M,A.current=C;const D=(0,o.useCallback)((e=>{var t,n,i,o,s,a;const l=null===(t=e.layout.xaxis)||void 0===t||null===(n=t.range)||void 0===n?void 0:n[0],c=null===(i=e.layout.xaxis)||void 0===i||null===(o=i.range)||void 0===o?void 0:o[1];let d=(0,r.isNumber)(l)?l:new Date(null!==l&&void 0!==l?l:0).getTime(),u=(0,r.isNumber)(c)?c:new Date(null!==c&&void 0!==c?c:0).getTime();d+=y(l),u+=y(c),m.current.lowerBoundValue=null!==(s=d)&&void 0!==s?s:0,m.current.valueRange=(null!==(a=u)&&void 0!==a?a:0)-m.current.lowerBoundValue}),[]),T=(0,o.useCallback)((()=>{const{mainContainer:e,dragLayer:t}=m.current;if(e&&t){const n=e.getBoundingClientRect(),i=t.getBoundingClientRect();m.current.containerLeftPixels=n.x,m.current.plotWidthPixels=i.width,m.current.plotOffsetPixels=i.x-n.x,m.current.initialized=i.width>0}}),[]),Y=(0,o.useCallback)(((e,t)=>{D(e);const n=t.querySelector(".main-svg"),i=t.querySelector(f);m.current.mainContainer=n,m.current.dragLayer=i,T()}),[D,T]),_=(0,o.useCallback)(((e,t)=>{w({figure:e,graphDiv:t}),Y(e,t)}),[Y]);(0,o.useEffect)((()=>{requestAnimationFrame((()=>{A.current&&Y(A.current.figure,A.current.graphDiv)}))}),[h,Y]);const U=(0,o.useCallback)((t=>{t.relatedTarget instanceof Element&&t.relatedTarget.classList.contains("dragcover")||(null===e||void 0===e||e(),x.current&&(x.current.style.display="none"))}),[e]),N=(0,o.useCallback)((({points:e})=>{var t,n;const i=e[0],r=null===i||void 0===i?void 0:i.data;if(u(null!==(t=null===i||void 0===i?void 0:i.curveNumber)&&void 0!==t?t:-1),!r)return;const o=null===(n=r.metricHistory)||void 0===n?void 0:n[i.pointIndex],s={xValue:i.x,yValue:i.y,metricEntity:o,index:i.pointIndex,label:l,traceUuid:r.uuid};b.current=s}),[l,u]),L=(0,o.useCallback)((()=>{b.current=void 0,u(-1)}),[u]),H=(0,o.useCallback)((e=>{const t=m.current,n=(e-t.plotOffsetPixels-t.containerLeftPixels)/t.plotWidthPixels;let i=t.lowerBoundValue+t.valueRange*n;return"log"===p&&(i=10**i),R.current.reduce(((e,t)=>Math.abs(t-i)<Math.abs(e-i)?t:e),R.current[0])}),[p]);(0,o.useEffect)((()=>{if(d)return;if(!C)return;D(C.figure);const e=C.graphDiv.querySelector(f),n=(0,r.throttle)((e=>{m.current.initialized||T();const t=H(e.clientX),n=S.current.map((e=>{var n,i;const o=I.current.find((({uuid:t})=>t===e.uuid)),s=k.current.find((({uuid:t,metricKey:n})=>t===e.uuid&&(!e.metricKey||e.metricKey===n)));if(!s)return;const l=a?e.label:null===o||void 0===o?void 0:o.displayName,c=null===(n=s.x)||void 0===n?void 0:n.indexOf(t);if((0,r.isUndefined)(c)||-1===c)return;const d=null===(i=s.y)||void 0===i?void 0:i[c];return{displayName:l||"",value:(0,r.isNumber)(d)?d:void 0,color:null===e||void 0===e?void 0:e.color,dashStyle:null===e||void 0===e?void 0:e.dashStyle,uuid:e.metricKey?`${e.uuid}.${e.metricKey}`:`${e.uuid}`}}));E.current={tooltipLegendItems:(0,r.orderBy)((0,r.compact)(n),"value","desc"),hoveredDataPoint:null===b||void 0===b?void 0:b.current,xValue:t,xAxisKey:c,xAxisKeyLabel:l}}),50,{leading:!0}),i=(0,r.throttle)(T,50),o=e=>{var n,i;if(!E.current)return;const r=m.current,o=H(e.clientX),s=(("log"===p?Math.log10(o):o)-r.lowerBoundValue)/r.valueRange*r.plotWidthPixels;x.current&&(x.current.style.display="block",x.current.style.left=`${r.plotOffsetPixels+s}px`),null===t||void 0===t||t((null===(n=E.current)||void 0===n||null===(i=n.hoveredDataPoint)||void 0===i?void 0:i.traceUuid)||"",{x:r.containerLeftPixels+r.plotOffsetPixels+s,y:e.clientY,originalEvent:e},E.current)};return e?(e.addEventListener("pointermove",n),e.addEventListener("pointermove",o),window.addEventListener("resize",i),e.addEventListener("pointerleave",U),()=>{e.removeEventListener("pointermove",n),e.removeEventListener("pointermove",o),e.removeEventListener("pointerleave",U),window.removeEventListener("resize",i)}):()=>{}}),[U,C,D,t,a,b,d,c,l,p,H,T]);const K=d?null:(0,v.Y)("div",{css:(0,g.AH)({top:0,width:0,borderLeft:"1px dashed rgba(0,0,0,0.5)",height:"100%",position:"absolute",pointerEvents:"none"},""),ref:x,style:{display:"none"}});return{updateHandler:Y,initHandler:_,scanlineElement:K,onPointHover:N,onPointUnhover:L}})({legendLabelData:Ce,plotData:ne,runsData:e,containsMultipleMetricKeys:ye,onHover:P,onUnhover:xe,xAxisKeyLabel:he,xAxisKey:ee,xAxisScaleType:w===d.fj.STEP?p:"linear",setHoveredPointIndex:ue,positionInSection:J}),Re=(0,l.l)(Ie);(0,o.useEffect)((()=>{const e=((null===n||void 0===n?void 0:n.length)||0)>1?re.map((e=>e.metricKey?{...e,name:`${e.name} (${e.metricKey})`}:e)):re,t={...ve,showlegend:!0,legend:{orientation:"h"}};null===q||void 0===q||q((0,x.W)(e,t))}),[ve,q,re,null===n||void 0===n?void 0:n.length]);const Ae=(0,v.FD)("div",{css:[d.gz.chartWrapper(Q),Y.highlightStyles,""],className:N,ref:ae,children:[(0,v.Y)(a.W,{data:re,useResizeHandler:!ce,css:d.gz.chart(Q),onUpdate:(e,t)=>{Se(e,t),null===K||void 0===K||K(e,t)},layout:Me,config:k,onHover:Re,onUnhover:ke,onInitialized:Ee,fallback:(0,v.Y)(E.Us,{})}),we]});return(0,v.Y)(h.A,{labelData:Ce,fullScreen:$,children:Ae})})),Y={highlightStyles:{".scatterlayer g.trace":{transition:"var(--trace-transition)"},".scatterlayer.is-highlight g.trace:not(.is-band)":{opacity:"var(--trace-opacity-dimmed-low) !important"},".scatterlayer g.trace.is-hover-highlight:not(.is-band)":{opacity:"var(--trace-opacity-highlighted) !important"},".scatterlayer g.trace.is-selection-highlight:not(.is-band)":{opacity:"var(--trace-opacity-highlighted) !important"},".scatterlayer g.trace.is-selection-highlight path.point":{stroke:"var(--trace-stroke-color)",strokeWidth:"var(--trace-stroke-width) !important"},".scatterlayer.is-highlight g.trace.is-band:not(.is-band-highlighted)":{opacity:"var(--trace-opacity-dimmed) !important"}}}},95379:function(e,t,n){"use strict";n.d(t,{Ez:function(){return u},KP:function(){return h},cA:function(){return p},g_:function(){return c},iO:function(){return d},oB:function(){return l}});var i=n(46709),r=n(86133),o=n(43233),s=n(73408);const a=i.createContext((()=>{})),l=({children:e,updateChartsUIState:t})=>(0,s.Y)(a.Provider,{value:t,children:e}),c=()=>i.useContext(a),d=()=>{const e=c();return(0,i.useCallback)(((t,n)=>{e((e=>{var i,r;const o=null===(i=e.compareRunCharts)||void 0===i?void 0:i.slice(),s=null===(r=e.compareRunSections)||void 0===r?void 0:r.slice();if(!o||!s)return e;const a=o.findIndex((e=>e.uuid===t)),l=o.findIndex((e=>e.uuid===n));if(a<0||l<0)return e;const c=o[a],d=o[l],u=d.metricSectionId===c.metricSectionId,p=s.findIndex((e=>e.uuid===c.metricSectionId)),h=s.findIndex((e=>e.uuid===d.metricSectionId));s.splice(p,1,{...s[p],isReordered:!0}),s.splice(h,1,{...s[h],isReordered:!0});const m={...c};return m.metricSectionId=d.metricSectionId,o.splice(a,1),u?o.splice(l,0,m):o.splice(o.findIndex((e=>e.uuid===n)),0,m),{...e,compareRunCharts:o,compareRunSections:s}}))}),[e])},u=()=>{const e=c();return(0,i.useCallback)((t=>{const n=r.i$.serialize({...t,uuid:(0,o.yk)()});t.uuid?e((e=>{var i;return{...e,compareRunCharts:null===(i=e.compareRunCharts)||void 0===i?void 0:i.map((e=>e.uuid===t.uuid?{...n,uuid:e.uuid}:e))}})):e((e=>({...e,compareRunCharts:e.compareRunCharts&&[...e.compareRunCharts,n]})))}),[e])},p=()=>{const e=c();return(0,i.useCallback)(((t,n)=>{e((e=>{var i,r;const o=null===(i=e.compareRunCharts)||void 0===i?void 0:i.slice(),s=null===(r=e.compareRunSections)||void 0===r?void 0:r.slice();if(!o||!s)return e;const a=o.findIndex((e=>e.uuid===t));if(a<0)return e;const l=o[a],c={...l};c.metricSectionId=n;const d=s.findIndex((e=>e.uuid===l.metricSectionId)),u=s.findIndex((e=>e.uuid===n));return s.splice(d,1,{...s[d],isReordered:!0}),s.splice(u,1,{...s[u],isReordered:!0}),o.splice(a,1),o.push(c),{...e,compareRunCharts:o,compareRunSections:s}}))}),[e])},h=()=>{const e=c();return(0,i.useCallback)((t=>{e((e=>{var n,i;return{...e,compareRunCharts:t.isGenerated?null===(n=e.compareRunCharts)||void 0===n?void 0:n.map((e=>e.uuid===t.uuid?{...e,deleted:!0}:e)):null===(i=e.compareRunCharts)||void 0===i?void 0:i.filter((e=>e.uuid!==t.uuid))}}))}),[e])}},96267:function(e,t,n){"use strict";n.d(t,{W0:function(){return f},jC:function(){return M},c1:function(){return v}});var i=n(46709),r=n(27299),o=n(79081),s=n(27757),a=n(73408);const l=e=>(0,a.FD)("div",{css:c.wrapper,className:e.className,children:[(0,a.Y)("div",{css:c.track,children:(0,a.Y)("div",{css:c.progressTrack,style:{width:`${e.percent}%`}})}),e.format(e.percent)]}),c={wrapper:e=>({display:"flex",alignItems:"center",gap:e.spacing.sm}),track:e=>({backgroundColor:e.colors.backgroundSecondary,height:e.spacing.sm,flex:1,borderRadius:e.spacing.sm}),progressTrack:e=>({backgroundColor:e.colors.primary,height:e.spacing.sm,borderRadius:e.spacing.sm})};var d=n(61886),u=n(55274),p=n(40724),h=n(84173),m=n(27476);const g=r.Radio.Group,v="step",f=100;var y={name:"1vuhrro",styles:"text-align:justify;text-align-last:left"};class x extends i.Component{constructor(...e){super(...e),this.handleMetricsSelectFilterChange=(e,t)=>t.props.title.toUpperCase().includes(e.toUpperCase()),this.getAllMetricKeys=()=>{const{distinctMetricKeys:e}=this.props;return e.map((e=>({title:e,value:e,key:e})))}}render(){const{chartType:e,yAxisLogScale:t,lineSmoothness:n,showPoint:i,numRuns:c,numCompletedRuns:h,disableSmoothnessControl:x}=this.props,M=(0,a.Y)(p.A,{id:"0gIYIc",defaultMessage:'Make the line between points "smoother" based on Exponential Moving Average. Smoothing can be useful for displaying the overall trend when the logging frequency is high.'}),C=(0,a.Y)(p.A,{id:"UEDu0c",defaultMessage:"MLflow UI automatically fetches metric histories for active runs and updates the metrics plot with a {interval} second interval.",values:{interval:Math.round(u.ZT/1e3)}});return(0,a.FD)("div",{className:"plot-controls",css:[b.controlsWrapper,e===d.PK&&b.centeredControlsWrapper,""],children:[e===d.PK?(0,a.FD)("div",{children:[(0,a.Y)("div",{className:"inline-control",children:(0,a.FD)("div",{className:"control-label",children:[(0,a.Y)(p.A,{id:"nEoTsR",defaultMessage:"Completed Runs"})," ",(0,a.Y)(o.T,{componentId:"mlflow.experiment-tracking.metrics-plot-controls.reset",content:C,children:(0,a.Y)("span",{children:(0,a.Y)(r.QuestionMarkIcon,{})})}),(0,a.Y)(l,{percent:Math.round(100*h/c),format:()=>`${h}/${c}`})]})}),(0,a.FD)("div",{className:"inline-control",children:[(0,a.Y)("div",{className:"control-label",children:(0,a.Y)(p.A,{id:"yzxYIm",defaultMessage:"Points:"})}),(0,a.Y)(r.Switch,{componentId:"codegen_mlflow_app_src_experiment-tracking_components_metricsplotcontrols.tsx_120","data-testid":"show-point-toggle",defaultChecked:i,onChange:this.props.handleShowPointChange})]}),!x&&(0,a.FD)("div",{className:"block-control",children:[(0,a.FD)("div",{className:"control-label",children:[(0,a.Y)(p.A,{id:"T4eipT",defaultMessage:"Line Smoothness"})," ",(0,a.Y)(o.T,{componentId:"mlflow.experiment-tracking.metrics-plot-controls.save",content:M,children:(0,a.Y)("span",{children:(0,a.Y)(r.QuestionMarkIcon,{})})})]}),(0,a.Y)(m.o,{"data-testid":"smoothness-toggle",min:1,max:f,onChange:this.props.handleLineSmoothChange,value:n})]}),(0,a.FD)("div",{className:"block-control",children:[(0,a.Y)("div",{className:"control-label",children:(0,a.Y)(p.A,{id:"L26D19",defaultMessage:"X-axis:"})}),(0,a.FD)(g,{componentId:"codegen_mlflow_app_src_experiment-tracking_components_metricsplotcontrols.tsx_154",name:"metrics-plot-x-axis-radio-group",css:b.xAxisControls,onChange:this.props.handleXAxisChange,value:this.props.selectedXAxis,children:[(0,a.Y)(r.Radio,{value:v,"data-testid":"x-axis-radio",children:(0,a.Y)(p.A,{id:"nQoUED",defaultMessage:"Step"})}),(0,a.Y)(r.Radio,{value:"wall","data-testid":"x-axis-radio",children:(0,a.Y)(p.A,{id:"8flziy",defaultMessage:"Time (Wall)"})}),(0,a.Y)(r.Radio,{value:"relative","data-testid":"x-axis-radio",children:(0,a.Y)(p.A,{id:"aNnPar",defaultMessage:"Time (Relative)"})})]})]})]}):null,(0,a.FD)("div",{className:"block-control",children:[(0,a.Y)("div",{className:"control-label",children:(0,a.Y)(p.A,{id:"QC5Vjq",defaultMessage:"Y-axis:"})}),(0,a.Y)(r.LegacySelect,{placeholder:this.props.intl.formatMessage({id:"aXw0NO",defaultMessage:"Please select metric"}),value:this.props.selectedMetricKeys,onChange:this.props.handleMetricsSelectChange,mode:"multiple",css:b.axisSelector,children:this.getAllMetricKeys().map((e=>(0,a.Y)(r.LegacySelect.Option,{value:e.value,children:e.title},e.key)))})]}),(0,a.FD)("div",{className:"inline-control",children:[(0,a.Y)("div",{className:"control-label",children:(0,a.Y)(p.A,{id:"HGG+BI",defaultMessage:"Y-axis Log Scale:"})}),(0,a.Y)(r.Switch,{componentId:"codegen_mlflow_app_src_experiment-tracking_components_metricsplotcontrols.tsx_220",defaultChecked:t,onChange:this.props.handleYAxisLogScaleChange})]}),(0,a.Y)("div",{className:"inline-control",children:(0,a.FD)(s.B,{componentId:"codegen_mlflow_app_src_experiment-tracking_components_metricsplotcontrols.tsx_222",css:y,onClick:this.props.handleDownloadCsv,children:[(0,a.Y)(p.A,{id:"3S3Ah4",defaultMessage:"Download data"}),(0,a.Y)("i",{className:"fa fa-download"})]})})]})}}x.defaultProps={disableSmoothnessControl:!1};const b={xAxisControls:e=>({label:{marginTop:e.spacing.xs,marginBottom:e.spacing.xs}}),controlsWrapper:{minWidth:"20%",maxWidth:"30%"},axisSelector:{width:"100%"},centeredControlsWrapper:{justifyContent:"center"}},M=(0,h.Ay)(x)},98751:function(e,t,n){"use strict";n.d(t,{I:function(){return U}});var i=n(68248),r=n(76256),o=n(27757),s=n(27299),a=n(90061),l=n(43617),c=n(49460),d=n(46709),u=n(7655),p=n(86133),h=n(44105),m=n(11522);const g="-",v=(e,t=2)=>{if("number"===typeof e)return e.toFixed(t);if("string"===typeof e)return e;try{return JSON.stringify(e)}catch{return g}};let f=function(e){return e[e.POSITIVE=0]="POSITIVE",e[e.NEGATIVE=1]="NEGATIVE",e[e.SAME=2]="SAME",e}({});const y=(e,t)=>e!==g&&t!==g&&(typeof e!==typeof t||("number"===typeof e&&"number"===typeof t?Math.abs(e-t)>1e-6:"string"===typeof e&&"string"===typeof t&&e!==t)),x="expand",b="headingColumn",M=e=>{const t=(e,n)=>Object.keys(n).map((i=>{if("boolean"===typeof n[i]){let t={key:i,[b]:i};return Object.keys(e).forEach((n=>{var r;const o=null===(r=e[n])||void 0===r?void 0:r[i];t={...t,[n]:void 0===o?g:o}})),t}const r={};return Object.keys(e).forEach((t=>{var n;r[t]=null===(n=e[t])||void 0===n?void 0:n[i]})),{key:i,[b]:i,children:t(r,n[i])}}));return e.map((e=>{let n,i=!0;const r={};if(Object.keys(e).forEach((t=>{if(t!==b&&e[t]!==g){const o=(e=>{try{const t=JSON.parse(e);return null===t||"object"!==typeof t||Array.isArray(t)||0===Object.keys(t).length?null:t}catch(t){return null}})(e[t]);if(r[t]=o,null===o)i=!1;else{const e=((e,t)=>{if(void 0!==e&&0===Object.keys(e).length)return null;if(void 0!==t&&0===Object.keys(t).length)return null;const n={},i=(e,t)=>{for(const n in t)e.hasOwnProperty(n)&&!e[n]||("object"!==typeof t[n]||null===t[n]||Array.isArray(t[n])?t[n]===g?e[n]=!0:e[n]=!1:(e[n]=e[n]||{},i(e[n],t[n])))};return void 0!==e&&i(n,e),void 0!==t&&i(n,t),n})(n,o);null===e?i=!1:n=e}}})),!i||void 0===n)return e;try{return{[b]:e[b],children:t(r,n),key:e[b]}}catch{return e}}))};var C=n(73408);var w={name:"ti75j2",styles:"margin:0"};const E=({label:e,direction:t})=>{const{theme:n}=(0,o.u)();let r,a=null;switch(t){case f.NEGATIVE:r="error",a=(0,C.Y)(s.ArrowDownIcon,{color:"danger","data-testid":"negative-cell-direction"});break;case f.POSITIVE:r="success",a=(0,C.Y)(s.ArrowUpIcon,{color:"success","data-testid":"positive-cell-direction"});break;case f.SAME:r="info",a=(0,C.Y)(s.DashIcon,{css:(0,i.AH)({color:n.colors.textSecondary},""),"data-testid":"same-cell-direction"})}return(0,C.FD)("div",{css:(0,i.AH)({display:"inline-flex",backgroundColor:n.colors.actionDisabledBackground,padding:`${n.spacing.xs/2}px ${n.spacing.xs}px`,fontSize:n.typography.fontSizeSm,borderRadius:n.borders.borderRadiusSm,userSelect:"none",gap:n.spacing.xs,alignItems:"center",svg:{width:n.typography.fontSizeSm,height:n.typography.fontSizeSm},overflow:"hidden"},""),children:[(0,C.Y)(o.T.Text,{size:"sm",color:r,css:w,ellipsis:!0,children:e}),a]})},S=({getValue:e,row:{original:t},column:{columnDef:n}})=>{var r;const{theme:s}=(0,o.u)(),{isBaseline:a,baselineColumnUuid:l,showChangeFromBaseline:c}=null!==(r=n.meta)&&void 0!==r?r:{},d=e();if(a)return v(e());if(void 0===d)return null;const u=l?((e,t)=>{if("number"===typeof e&&"number"===typeof t){const n=e-t;return 0===n?{label:v(n).toString(),direction:f.SAME}:n>0?{label:`+${v(n)}`,direction:f.POSITIVE}:{label:v(n).toString(),direction:f.NEGATIVE}}})(d,t[l]):null;return(0,C.FD)("span",{css:(0,i.AH)({display:"inline-flex",overflow:"hidden",gap:s.spacing.sm,alignItems:"center"},""),children:[(0,C.Y)(o.T.Text,{ellipsis:!0,children:v(d)}),u&&c&&(0,C.Y)(E,{label:u.label,direction:u.direction})]})};var I=n(67063),k=n(40724);var R={name:"82a6rk",styles:"flex:1"};const A=({column:{columnDef:e}})=>{var t,n;const{theme:r}=(0,o.u)(),a=null===(t=e.meta)||void 0===t?void 0:t.traceData,l=null===(n=e.meta)||void 0===n?void 0:n.updateBaselineColumnUuid;return a?(0,C.FD)("div",{css:(0,i.AH)({flex:1,display:"inline-flex",overflow:"hidden",alignItems:"center",gap:r.spacing.xs,fontWeight:"normal"},""),children:[(0,C.Y)(I.E,{color:a.color})," ",(0,C.Y)(o.T.Text,{ellipsis:!0,children:null===a||void 0===a?void 0:a.displayName}),(0,C.Y)("div",{css:R}),(0,C.FD)(s.DropdownMenu.Root,{children:[(0,C.Y)(s.DropdownMenu.Trigger,{asChild:!0,children:(0,C.Y)(o.B,{type:"link",size:"small",componentId:"mlflow.charts.difference_plot.overflow_menu.trigger",icon:(0,C.Y)(s.OverflowIcon,{})})}),(0,C.Y)(s.DropdownMenu.Content,{children:(0,C.Y)(s.DropdownMenu.Item,{componentId:"mlflow.charts.difference_plot.overflow_menu.set_as_baseline",onClick:()=>null===l||void 0===l?void 0:l(a.uuid),children:(0,C.Y)(k.A,{id:"wxq/qM",defaultMessage:"Set as baseline"})})})]})]}):null};const D=({row:e,toggleExpand:t})=>e.getCanExpand()&&t?(0,C.Y)(o.B,{componentId:"mlflow.charts.difference_plot.expand_button",size:"small",type:"link",onClick:()=>t(e),icon:e.getIsExpanded()?(0,C.Y)(s.ChevronDownIcon,{}):(0,C.Y)(o.o,{})}):null;var T={name:"1djur21",styles:"flex:1;overflow-x:scroll;height:100%"},Y={name:"77ql30",styles:"position:sticky;top:0;z-index:101"},_={name:"1bh2wf5",styles:"width:auto;position:absolute;top:0"};const U=({previewData:e,cardConfig:t,groupBy:n,setCardConfig:v})=>{const{formatMessage:f}=(0,u.A)(),{theme:w}=(0,o.u)(),{modelMetrics:E,systemMetrics:I,parameters:k,tags:R,attributes:U}=(0,d.useMemo)((()=>((e,t,n,i)=>{const r=(i,r,o)=>Array.from(new Set(e.flatMap((e=>r(e))))).filter((e=>i(e))).sort().flatMap((i=>{const r={};let s=!1;return e.forEach(((t,n)=>{if(r[t.uuid]=o(t)[i]?o(t)[i].value:g,n>0){const i=e[n-1];y(r[i.uuid],r[t.uuid])&&(s=!0)}})),t.showDifferencesOnly&&!s?[]:[{[n]:i,...r}]})),o=r((e=>!e.startsWith(h.qt)),(e=>Object.keys(e.metrics)),(e=>e.metrics)),s=r((e=>e.startsWith(h.qt)),(e=>Object.keys(e.metrics)),(e=>e.metrics));return i?{modelMetrics:o,systemMetrics:s,parameters:[],tags:[],attributes:[]}:{modelMetrics:o,systemMetrics:s,parameters:r((()=>!0),(e=>Object.keys(e.params)),(e=>e.params)),tags:r((()=>!0),(e=>m.A.getVisibleTagValues(e.tags).map((([e])=>e))),(e=>e.tags)),attributes:[p.rJ.USER,p.rJ.SOURCE,p.rJ.VERSION,p.rJ.MODELS].flatMap((i=>{const r={};let o=!1;return e.forEach(((t,n)=>{if(i===p.rJ.USER){var s;const e=m.A.getUser(null!==(s=t.runInfo)&&void 0!==s?s:{},t.tags);r[t.uuid]=e}else if(i===p.rJ.SOURCE){const e=m.A.getSourceName(t.tags);r[t.uuid]=e}else if(i===p.rJ.VERSION){const e=m.A.getSourceVersion(t.tags);r[t.uuid]=e}else{const e=m.A.getLoggedModelsFromTags(t.tags);r[t.uuid]=e.join(",")}if(n>0){const i=e[n-1];y(r[i.uuid],r[t.uuid])&&(o=!0)}})),t.showDifferencesOnly&&!o?[]:[{[n]:i,...r}]}))}})(e,t,b,n)),[e,t,n]),{baselineColumn:N,nonBaselineColumns:L}=(0,d.useMemo)((()=>{const n=e.slice().reverse();let i=n.find((e=>e.uuid===t.baselineColumnUuid));void 0===i&&n.length>0&&(i=n[0]);const r=n.filter((e=>void 0===i||e.uuid!==i.uuid));return{baselineColumn:i,nonBaselineColumns:r}}),[e,t.baselineColumnUuid]),H=(0,d.useCallback)((e=>{null===v||void 0===v||v((t=>({...t,baselineColumnUuid:e})))}),[v]),K=(0,d.useMemo)((()=>t.compareGroups.reduce(((e,t)=>{switch(t){case p.K8.MODEL_METRICS:e.push({[b]:f({id:"d8OeBh",defaultMessage:"Model Metrics"}),children:[...E],key:"modelMetrics"});break;case p.K8.SYSTEM_METRICS:e.push({[b]:f({id:"CDOfWP",defaultMessage:"System Metrics"}),children:[...I],key:"systemMetrics"});break;case p.K8.PARAMETERS:e.push({[b]:f({id:"28Dnzz",defaultMessage:"Parameters"}),children:M(k),key:"parameters"});break;case p.K8.ATTRIBUTES:e.push({[b]:f({id:"MBNIRk",defaultMessage:"Attributes"}),children:[...U],key:"attributes"});break;case p.K8.TAGS:e.push({[b]:f({id:"7mgmG6",defaultMessage:"Tags"}),children:[...R],key:"tags"})}return e}),[])),[E,I,k,R,U,t.compareGroups,f]),P=(0,d.useMemo)((()=>[{id:x,cell:D,size:32,enableResizing:!1},{accessorKey:b,size:150,header:f({id:"c5AQYh",defaultMessage:"Compare by"}),id:b,enableResizing:!0},...[N,...L].map(((e,n)=>{var i;return{accessorKey:null===e||void 0===e?void 0:e.uuid,size:200,enableResizing:!0,meta:{traceData:e,updateBaselineColumnUuid:H,showChangeFromBaseline:t.showChangeFromBaseline,isBaseline:e===N,baselineColumnUuid:null===N||void 0===N?void 0:N.uuid},id:null!==(i=null===e||void 0===e?void 0:e.uuid)&&void 0!==i?i:n.toString(),header:A,cell:S}}))]),[f,N,L,H,t.showChangeFromBaseline]),[F,B]=(0,d.useState)({modelMetrics:!0,systemMetrics:!0,parameters:!0,attributes:!0,tags:!0}),O=(0,r.L)("mlflow/server/js/src/experiment-tracking/components/runs-charts/components/charts/DifferenceViewPlot.tsx",{columns:P,data:K,getCoreRowModel:(0,a.HT)(),getExpandedRowModel:(0,a.D0)(),columnResizeMode:"onChange",enableExpanding:!0,getSubRows:e=>e.children,getRowId:e=>e.key,getRowCanExpand:e=>Boolean(e.subRows.length),state:{expanded:F,columnPinning:{left:[x,b]}}}),z=(0,d.useRef)(null),j=(0,d.useCallback)((e=>{const t=e.original.key;B((n=>({...n,[t]:!e.getIsExpanded()})))}),[]),{getVirtualItems:V,getTotalSize:W}=(0,c.Te)({count:O.getExpandedRowModel().rows.length,getScrollElement:()=>z.current,estimateSize:()=>33,paddingStart:37}),G=O.getExpandedRowModel().rows;return(0,C.Y)("div",{css:T,ref:z,children:(0,C.FD)(s.Table,{css:(0,i.AH)({width:O.getTotalSize(),position:"relative"},""),children:[(0,C.Y)(s.TableRow,{isHeader:!0,css:Y,children:O.getLeafHeaders().map(((e,t)=>{const n=e.column.getIsPinned();return(0,C.Y)(s.TableHeader,{header:e,column:e.column,setColumnSizing:O.setColumnSizing,componentId:"mlflow.charts.difference_plot.header",multiline:!1,style:{left:"left"===n?`${e.column.getStart("left")}px`:void 0,position:n?"sticky":"relative",width:e.column.getSize(),flexBasis:e.column.getSize(),zIndex:n?100:0},wrapContent:!1,children:(0,l.Kv)(e.column.columnDef.header,e.getContext())},e.id)}))}),(0,C.Y)("div",{css:(0,i.AH)({height:W()},""),children:V().map((({index:e,start:t,size:n})=>{const i=G[e];return(0,C.Y)(s.TableRow,{css:_,style:{transform:`translateY(${t}px)`,height:n},children:i.getVisibleCells().map(((e,t)=>{const n=e.column.getIsPinned(),r=e.column.columnDef.id===b;return(0,C.Y)(s.TableCell,{style:{left:"left"===n?`${e.column.getStart("left")}px`:void 0,position:n?"sticky":"relative",width:e.column.getSize(),zIndex:n?100:0,flexBasis:e.column.getSize()},css:[{backgroundColor:n?w.colors.backgroundPrimary:void 0},r&&{borderRight:`1px solid ${w.colors.border}`},r&&{paddingLeft:i.depth*w.spacing.lg},""],wrapContent:!1,children:(0,l.Kv)(e.column.columnDef.cell,{...e.getContext(),toggleExpand:j})},e.id)}))},i.id+e)}))})]})})}},99436:function(e,t,n){"use strict";n.d(t,{a:function(){return v}});var i=n(27757),r=n(76118),o=n(46709),s=n(64368),a=n(42571),l=n(64865),c=n(53274),d=n(87974),u=n(11825),p=n(32158),h=n(73408);const m={displaylogo:!1,scrollZoom:!1,modeBarButtonsToRemove:["toImage"]},g=[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],v=o.memo((({runsData:e,xAxis:t,yAxis:n,zAxis:v,markerSize:f=10,className:y,reverseScale:x,margin:b=c.AQ,colorScale:M=g,onUpdate:C,onHover:w,onUnhover:E,width:S,height:I,useDefaultHoverBox:k=!0,selectedRunUuid:R,onSetDownloadHandler:A})=>{const{theme:D}=(0,i.u)(),{layoutHeight:T,layoutWidth:Y,setContainerDiv:_,containerDiv:U,isDynamicSizeSupported:N}=(0,c.xN)(),L=(0,o.useMemo)((()=>{const i=[],o=[],s=[],a=[],l=[];for(const c of e){var d,u,p;const{metrics:e,params:h,color:m,uuid:g,displayName:f}=c,y="METRIC"===t.type?e:h,x="METRIC"===n.type?e:h,b="METRIC"===v.type?e:h,M=null===y||void 0===y||null===(d=y[t.key])||void 0===d?void 0:d.value,C=null===x||void 0===x||null===(u=x[n.key])||void 0===u?void 0:u.value,w=null===b||void 0===b||null===(p=b[v.key])||void 0===p?void 0:p.value;(0,r.isNil)(M)||(0,r.isNil)(C)||(0,r.isNil)(w)||(i.push(M),o.push(C),s.push(w),a.push(m||D.colors.primary),l.push([g,f||g,w]))}const h=[{x:i,y:o,customdata:l,text:e.map((({displayName:e})=>e)),hovertemplate:k?(m=v.key,`<b>%{customdata[1]}:</b><br><b>%{xaxis.title.text}:</b> %{x:.2f}<br><b>%{yaxis.title.text}:</b> %{y:.2f}<br><b>${m}:</b> %{customdata[2]:.2f}<extra></extra>`):void 0,hoverinfo:k?void 0:"none",hoverlabel:k?c.rv:void 0,type:"scatter",mode:"markers",textposition:"bottom center",marker:{size:f,color:a,line:{color:"black",width:1}}}];var m;return e.length>1&&h.unshift({x:i,y:o,z:s,type:"contour",connectgaps:!0,hoverinfo:"none",contours:{coloring:"heatmap"},colorscale:M,reversescale:x,colorbar:{tickfont:{size:11,color:D.colors.textSecondary,family:""}}}),h}),[M,x,f,e,t.type,t.key,n.type,n.key,v.type,v.key,D.colors.primary,D.colors.textSecondary,k]),H=(0,o.useMemo)((()=>(0,c.y)(D)),[D]),[K,P]=(0,o.useState)({width:S||Y,height:I||T,margin:b,xaxis:{title:t.key,tickfont:{size:11,color:D.colors.textSecondary}},yaxis:{ticks:"inside",title:{standoff:32,text:n.key},tickfont:{size:11,color:D.colors.textSecondary}},template:{layout:H}});(0,o.useEffect)((()=>{P((e=>{const i={...e,width:S||Y,height:I||T,margin:b};return i.xaxis&&(i.xaxis.title=t.key),i.yaxis&&(i.yaxis.title={standoff:32,text:n.key}),i}))}),[Y,T,b,t.key,n.key,S,I]);const{setHoveredPointIndex:F}=(0,l.pO)(U,R,e,l.nD),B=(0,o.useCallback)((({points:e})=>{var t,n;const i=e.find((({curveNumber:e})=>1===e));if(F(null!==(t=null===i||void 0===i?void 0:i.pointIndex)&&void 0!==t?t:-1),!i)return;const r=null===i||void 0===i||null===(n=i.customdata)||void 0===n?void 0:n[0];r&&(null===w||void 0===w||w(r))}),[w,F]),O=(0,o.useCallback)((()=>{null===E||void 0===E||E(),F(-1)}),[E,F]),z=(0,a.l)(B),j=(0,o.useMemo)((()=>(0,c.eY)(e)),[e]);(0,o.useEffect)((()=>{const e=L.map((e=>({...e,mode:"text+markers"})));null===A||void 0===A||A((0,u.W)(e,K))}),[K,A,L]);const V=(0,h.Y)("div",{css:[c.gz.chartWrapper(D),c.gz.scatterChartHighlightStyles,""],className:y,ref:_,children:(0,h.Y)(s.W,{data:L,useResizeHandler:!N,css:c.gz.chart(D),onUpdate:C,layout:K,config:m,onHover:z,onUnhover:O,fallback:(0,h.Y)(p.Us,{})})});return(0,h.Y)(d.A,{labelData:j,children:V})}))}}]);