"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[122],{95122:function(e,t,s){s.r(t);var i=s(57437),l=s(2265),a=s(42008),n=s(5778),o=s(81810);t.default=e=>{let{embeddings:t}=e,[s,u]=(0,l.useState)([]);return(0,l.useEffect)(()=>{let e=[],s=[],i=[],l=[],a=[];if(t.length>=6){let u=new n.u({nComponents:3,nNeighbors:3,minDist:.1,spread:1});u.fit(t.map(e=>e.embedding));let h=u.getEmbedding();console.log("Computed Points",h),h.forEach((n,u)=>{e.push(n[0]),s.push(n[1]),i.push(n[2]),l.push(t[u].text);let h=o.Q[t[u].modelName],r=o.m[h];a.push(r)})}u([{x:e,y:s,z:i,text:l.map((e,s)=>"".concat(t[s].modelName.slice(0,100),": ").concat(e.slice(0,100))),mode:"markers",marker:{size:5,color:a},type:"scatter3d"}])},[t]),(0,i.jsx)("div",{style:{position:"relative",width:"100vw",height:"100vh"},children:(0,i.jsx)(a.Z,{data:s,layout:{autosize:!0,title:"Clusters",scene:{xaxis:{title:"X Axis"},yaxis:{title:"Y Axis"},zaxis:{title:"Z Axis"}}},useResizeHandler:!0,style:{width:"100%",height:"100%"}})})}}}]);