@uptimizr/dashboard 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/out/404.html +1 -1
  2. package/out/__next.__PAGE__.txt +2 -2
  3. package/out/__next._full.txt +2 -2
  4. package/out/__next._head.txt +1 -1
  5. package/out/__next._index.txt +1 -1
  6. package/out/__next._tree.txt +1 -1
  7. package/out/_next/static/chunks/0k9-8s-jof_gw.js +1 -0
  8. package/out/_next/static/chunks/{35f-9p5adh1sc.js → 13oqt2aoms4f6.js} +1 -1
  9. package/out/_next/static/chunks/259xlbe69b9tc.js +1 -0
  10. package/out/_next/static/chunks/34rcp8qrbp522.js +3 -0
  11. package/out/_next/static/chunks/38wksra3d_k-4.js +1 -0
  12. package/out/_next/static/chunks/3l6t8b3addlw7.js +1 -0
  13. package/out/_next/static/chunks/413o2v11bygt5.js +1 -0
  14. package/out/_not-found/__next._full.txt +1 -1
  15. package/out/_not-found/__next._head.txt +1 -1
  16. package/out/_not-found/__next._index.txt +1 -1
  17. package/out/_not-found/__next._not-found.__PAGE__.txt +1 -1
  18. package/out/_not-found/__next._not-found.txt +1 -1
  19. package/out/_not-found/__next._tree.txt +1 -1
  20. package/out/_not-found.html +1 -1
  21. package/out/_not-found.txt +1 -1
  22. package/out/index.html +1 -1
  23. package/out/index.txt +2 -2
  24. package/package.json +3 -3
  25. package/out/_next/static/chunks/0hol9-rsh00k6.js +0 -3
  26. package/out/_next/static/chunks/0ljf5zpstyrg7.js +0 -1
  27. package/out/_next/static/chunks/1i89ao_sm6o4o.js +0 -1
  28. package/out/_next/static/chunks/2_hgfg-cjqw1-.js +0 -1
  29. package/out/_next/static/chunks/39ojyykom0z2r.js +0 -1
  30. package/out/_next/static/chunks/3jha6wlqw8459.js +0 -1
  31. /package/out/_next/static/{W_AwLgpmWJNo9qUUBPat3 → M5esRfAVlWSeBcfLV_jVr}/_buildManifest.js +0 -0
  32. /package/out/_next/static/{W_AwLgpmWJNo9qUUBPat3 → M5esRfAVlWSeBcfLV_jVr}/_clientMiddlewareManifest.js +0 -0
  33. /package/out/_next/static/{W_AwLgpmWJNo9qUUBPat3 → M5esRfAVlWSeBcfLV_jVr}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,2348,2413,t=>{"use strict";let e=1/1.2;t.s(["ZOOM_IN_FACTOR",0,e,"ZOOM_OUT_FACTOR",0,1.2,"attachDoubleClickFocus",0,function(t,e,s){let a=()=>{let e=t.pick(t.pointerX,t.pointerY);e?.hit&&e.pickedPoint&&s.setTarget(e.pickedPoint)};return e.addEventListener("dblclick",a),()=>e.removeEventListener("dblclick",a)},"disableWheelZoom",0,function(t){t.inputs.removeByType("ArcRotateCameraMouseWheelInput")},"resetFocus",0,function(t,e){t.setTarget(e.target),t.alpha=e.alpha,t.beta=e.beta,t.radius=e.radius},"stepZoom",0,function(t,e){let s=t.lowerRadiusLimit??.01,a=t.upperRadiusLimit??1/0;t.radius=Math.min(a,Math.max(s,t.radius*e))}],2348);var s=t.i(28100);t.s(["ZoomButtons",0,function({onZoom:t,onReset:a}){let n="grid h-8 w-8 place-items-center rounded-md border border-edge bg-ink/80 text-lg leading-none text-fg backdrop-blur transition hover:bg-ink hover:text-white";return(0,s.jsxs)("div",{className:"absolute right-3 top-3 flex flex-col gap-1",children:[(0,s.jsx)("button",{type:"button","aria-label":"Zoom in",className:n,onClick:()=>t(e),children:"+"}),(0,s.jsx)("button",{type:"button","aria-label":"Zoom out",className:n,onClick:()=>t(1.2),children:"−"}),a?(0,s.jsx)("button",{type:"button","aria-label":"Reset camera focus to center",title:"Reset focus to center",className:n,onClick:a,children:(0,s.jsxs)("svg",{viewBox:"0 0 16 16",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round","aria-hidden":"true",children:[(0,s.jsx)("circle",{cx:"8",cy:"8",r:"3"}),(0,s.jsx)("path",{d:"M8 1v2.5M8 12.5V15M1 8h2.5M12.5 8H15"})]})}):null]})}],2413)},25476,t=>{"use strict";t.s(["attachMeshHover",0,function(t,e,s){let a=0,n=null,i=e=>{let i=e.offsetX,c=e.offsetY;a||(a=requestAnimationFrame(()=>{var e,r;let h;a=0;let l=t.pick(i,c,t=>t.isPickable&&t.isEnabled()),o=l?.pickedMesh?(e=l.pickedMesh,r=l.thinInstanceIndex??-1,(h=e.metadata)?r>=0&&h.hoverLabels?h.hoverLabels[r]??null:h.hoverLabel??null:null):null;o?s({label:o,x:i,y:c}):null!==n&&s(null),n=o}))},c=()=>{a&&(cancelAnimationFrame(a),a=0),null!==n&&(n=null,s(null))};return e.addEventListener("pointermove",i),e.addEventListener("pointerleave",c),()=>{e.removeEventListener("pointermove",i),e.removeEventListener("pointerleave",c),a&&cancelAnimationFrame(a)}}])},48939,t=>{"use strict";var e=t.i(28100),s=t.i(11623);function a(t){return Number.isNaN(t)||t<0?0:t>1?1:t}function n(t){let e=a(t),s=[[0,.1,.9],[0,.85,1],[.1,.9,.2],[1,.85,0],[1,.15,0],[1,1,1]],n=s.length-1,i=e*n,c=Math.min(Math.floor(i),n-1),r=i-c,h=s[c],l=s[c+1];return h&&l?[h[0]+(l[0]-h[0])*r,h[1]+(l[1]-h[1])*r,h[2]+(l[2]-h[2])*r]:[1,1,1]}var i=t.i(56054),c=t.i(2348),r=t.i(25476),h=t.i(18637),l=t.i(2413);t.s(["CameraDome3DView",0,function({bins:o,gridSize:u}){let d=(0,s.useRef)(null),m=(0,s.useRef)(null),j=(0,s.useRef)(null),[k,p]=(0,s.useState)("loading"),[v,g]=(0,s.useState)(null),[b,f]=(0,s.useState)("markers"),[w,x]=(0,s.useState)(null);return(0,s.useEffect)(()=>{let e=d.current;if(!e)return;if(0===o.length)return void p("empty");let s=!1,h=null;return p("loading"),g(null),(async()=>{try{let[{Engine:l},{Scene:d},{ArcRotateCamera:k},{HemisphericLight:v},{Vector3:g,Color3:f,Color4:w,Matrix:M},{MeshBuilder:y},{StandardMaterial:z},{Mesh:q},{DynamicTexture:P}]=await Promise.all([t.A(3905),t.A(94432),t.A(59694),t.A(88004),t.A(27940),t.A(27124),t.A(14074),t.A(2213),t.A(15002),t.A(35983),t.A(18561)]);if(s)return;let _=new l(e,!0,{preserveDrawingBuffer:!1}),C=new d(_);C.clearColor=new w(.04,.05,.07,1);let I=g.Zero(),L=new k("dome-cam",Math.PI/3,Math.PI/2.4,3.6,I,C);L.attachControl(e,!0),L.lowerRadiusLimit=1.6,L.upperRadiusLimit=8,(0,c.disableWheelZoom)(L),m.current=L,j.current={target:I,alpha:L.alpha,beta:L.beta,radius:L.radius},new v("dome-light",new g(.3,1,.2),C);let A=y.CreateSphere("dome",{diameter:2,segments:20},C),B=new z("dome-mat",C);B.wireframe=!0,B.disableLighting=!0,B.emissiveColor=new f(.16,.2,.28),B.alpha=.5,A.material=B,A.isPickable=!1;let R=[];for(let t=0;t<=64;t++){let e=t/64*Math.PI*2;R.push(new g(Math.cos(e),0,Math.sin(e)))}let S=y.CreateLines("dome-horizon",{points:R},C);S.color=new f(.3,.36,.46),S.isPickable=!1;let F=y.CreateLines("dome-forward",{points:[g.Zero(),new g(1.25,0,0)]},C);F.color=new f(.4,.7,.95),F.isPickable=!1;let E=o.reduce((t,e)=>Math.max(t,e.count),1),N=u>0?u:1;if("markers"===b){let t=y.CreateBox("dome-marker",{size:1},C),e=new z("dome-marker-mat",C);e.disableLighting=!0,e.emissiveColor=f.White(),e.specularColor=new f(0,0,0),t.material=e,t.isPickable=!0,t.thinInstanceEnablePicking=!0;let s=o.length,a=new Float32Array(16*s),n=new Float32Array(4*s),c=Array(s);for(let t=0;t<s;t++){let e=o[t],s=(e.azimuth_bin+.5)/N*Math.PI*2-Math.PI,r=(e.elevation_bin+.5)/N*Math.PI-Math.PI/2,h=Math.cos(r),l=h*Math.cos(s),u=Math.sin(r),d=h*Math.sin(s),m=e.count/E,j=.03+.12*m;M.Scaling(j,j,j).multiply(M.Translation(l,u,d)).copyToArray(a,16*t);let[k,p,v]=(0,i.heatRgb)(m);n[4*t]=k,n[4*t+1]=p,n[4*t+2]=v,n[4*t+3]=1,c[t]=`dir (${e.azimuth_bin}, ${e.elevation_bin}) \xb7 ${e.count}`}t.thinInstanceSetBuffer("matrix",a,16,!0),t.thinInstanceSetBuffer("color",n,4,!0),t.metadata={hoverLabels:c}}else{let t=function(t,e={}){let s=void 0!==e.width&&e.width>0?Math.floor(e.width):256,i=void 0!==e.height&&e.height>0?Math.floor(e.height):Math.max(1,Math.floor(s/2)),c=e.colorRamp??n,r=void 0!==e.blurBins&&e.blurBins>0?e.blurBins:1.5,h=a(e.alphaFloor??0),l=a(e.opacity??1),o=t.gridSize>0?t.gridSize:1,u=new Uint8ClampedArray(s*i*4),d=t.bins.filter(t=>t.count>0);if(0===d.length)return{width:s,height:i,rgba:u};let m=Math.max(1e-4,Math.PI/o*r),j=2*m*m,k=Math.cos(Math.min(Math.PI,3*m)),p=d.map(t=>{var e,s;let a,[n,i]=(e=t.azimuthBin,s=t.elevationBin,[(e+.5)/o*Math.PI*2-Math.PI,(s+.5)/o*Math.PI-Math.PI/2]);return[(a=Math.cos(i))*Math.cos(n),Math.sin(i),a*Math.sin(n)]}),v=new Float32Array(s*i),g=0;for(let t=0;t<i;t++){let e=Math.PI/2-(t+.5)/i*Math.PI,a=Math.cos(e),n=Math.sin(e);for(let e=0;e<s;e++){let i=(e+.5)/s*Math.PI*2-Math.PI,c=a*Math.cos(i),r=a*Math.sin(i),h=0;for(let t=0;t<d.length;t++){let e=p[t],s=c*e[0]+n*e[1]+r*e[2];if(s<k)continue;let a=Math.acos(s>1?1:s<-1?-1:s);h+=d[t].count*Math.exp(-(a*a)/j)}v[t*s+e]=h,h>g&&(g=h)}}if(g<=0)return{width:s,height:i,rgba:u};for(let t=0;t<v.length;t++){let e=a(v[t]/g),[s,n,i]=c(e),r=(h+(1-h)*e)*l,o=4*t;u[o]=Math.round(255*s),u[o+1]=Math.round(255*n),u[o+2]=Math.round(255*i),u[o+3]=Math.round(255*a(r))}return{width:s,height:i,rgba:u}}({bins:o.map(t=>({azimuthBin:t.azimuth_bin,elevationBin:t.elevation_bin,count:t.count})),gridSize:N},{width:256,blurBins:1.5,opacity:.95}),e=new P("dome-skytex",{width:t.width,height:t.height},C,!1);e.hasAlpha=!0;let s=e.getContext(),i=s.createImageData(t.width,t.height);i.data.set(t.rgba),s.putImageData(i,0,0),e.update();let c=y.CreateSphere("dome-sky",{diameter:2,segments:48,sideOrientation:q.DOUBLESIDE},C),r=new z("dome-sky-mat",C);r.disableLighting=!0,r.emissiveColor=f.White(),r.diffuseColor=new f(0,0,0),r.specularColor=new f(0,0,0),r.emissiveTexture=e,r.opacityTexture=e,r.backFaceCulling=!1,c.material=r,c.isPickable=!1}_.runRenderLoop(()=>C.render());let T=()=>_.resize();window.addEventListener("resize",T);let Z=(0,r.attachMeshHover)(C,e,x),D=(0,c.attachDoubleClickFocus)(C,e,L);p("ready"),h=()=>{window.removeEventListener("resize",T),Z(),D(),x(null),m.current=null,j.current=null,C.dispose(),_.dispose()}}catch(t){if(s)return;p("error"),g(t instanceof Error?t.message:"Failed to render dome.")}})(),()=>{s=!0,h?.()}},[o,u,b]),(0,e.jsxs)("div",{className:"relative",children:[(0,e.jsx)("canvas",{ref:d,className:"aspect-video w-full rounded-lg border border-edge bg-ink"}),w?(0,e.jsx)("div",{className:"pointer-events-none absolute z-10 max-w-[16rem] truncate rounded border border-edge bg-ink/90 px-1.5 py-0.5 text-xs text-white shadow backdrop-blur",style:{left:w.x+12,top:w.y+12},children:w.label}):null,"ready"===k?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"absolute left-3 top-3 flex overflow-hidden rounded-md border border-edge bg-ink/80 text-xs backdrop-blur",children:["markers","skydome"].map(t=>(0,e.jsx)("button",{type:"button",onClick:()=>f(t),className:`px-2.5 py-1 ${b===t?"bg-fg/15 font-medium text-white":"text-fg-muted hover:text-fg"}`,children:"markers"===t?"Markers":"Skydome"},t))}),(0,e.jsx)(l.ZoomButtons,{onZoom:t=>m.current&&(0,c.stepZoom)(m.current,t),onReset:()=>m.current&&j.current&&(0,c.resetFocus)(m.current,j.current)}),(0,e.jsx)(h.HeatLegend,{title:"Gaze density",lowLabel:"rarely",highLabel:"most-viewed",note:"markers"===b?"Each marker is a look-direction (camera forward). Blue line = forward, ring = horizon. Color & size scale with how often that direction was viewed.":"Continuous equirectangular heat field: the same gaze bins splatted into a smooth thermal texture wrapped on the dome. The in-scene SDK overlay (showGazeSkydome) renders this inward so you can stand inside it in WebXR."})]}):(0,e.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center text-sm text-fg-muted",children:"loading"===k?"Rendering…":"empty"===k?"No camera samples in range.":"error"===k?v??"Dome unavailable.":null})]})}],48939)},3905,t=>{t.v(e=>Promise.all(["static/chunks/3pdpaqzwhhijn.js","static/chunks/08bm3ye5govev.js","static/chunks/0g6u34xkzrpjn.js","static/chunks/25ctnyh7njp-d.js","static/chunks/2gh4z57fem0_v.js","static/chunks/3vaho-xrtuchd.js","static/chunks/0g7p8zp2kxve5.js"].map(e=>t.l(e))).then(()=>e(66232)))},94432,t=>{t.v(e=>Promise.all(["static/chunks/2kje_jvmwsvwo.js","static/chunks/1j--a56ji33_x.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/2npk7tr63h7rl.js","static/chunks/3vaho-xrtuchd.js","static/chunks/3g_h_00xs9u59.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/25ctnyh7njp-d.js","static/chunks/1vpcaaf-0dn7q.js"].map(e=>t.l(e))).then(()=>e(92494)))},59694,t=>{t.v(e=>Promise.all(["static/chunks/1j--a56ji33_x.js","static/chunks/0oap0o8a8a_cl.js","static/chunks/0f_nv15a8q415.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/245h82k-g1nxr.js","static/chunks/3ovd8o_usay7j.js","static/chunks/3vaho-xrtuchd.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/25ctnyh7njp-d.js","static/chunks/2npk7tr63h7rl.js","static/chunks/3pyggl13glbdc.js"].map(e=>t.l(e))).then(()=>e(67186)))},88004,t=>{t.v(e=>Promise.all(["static/chunks/2p8dbh81chhon.js","static/chunks/1oara6fkfvgs3.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/25ctnyh7njp-d.js","static/chunks/3pdpaqzwhhijn.js"].map(e=>t.l(e))).then(()=>e(15768)))},27940,t=>{t.v(e=>Promise.all(["static/chunks/0w0sx062qmcsh.js","static/chunks/25ctnyh7njp-d.js","static/chunks/3pdpaqzwhhijn.js"].map(e=>t.l(e))).then(()=>e(23235)))},27124,t=>{t.v(e=>Promise.all(["static/chunks/1par9m038tiov.js","static/chunks/1j--a56ji33_x.js","static/chunks/2j-sax2xfdv7l.js","static/chunks/340pg0qkv5tqq.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/0gwa154w_0wuh.js","static/chunks/0oap0o8a8a_cl.js","static/chunks/0f_nv15a8q415.js","static/chunks/3vaho-xrtuchd.js","static/chunks/3pyggl13glbdc.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/3g_h_00xs9u59.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/25ctnyh7njp-d.js","static/chunks/2npk7tr63h7rl.js","static/chunks/01aeari2x_tlz.js"].map(e=>t.l(e))).then(()=>e(70928)))},14074,t=>{t.v(e=>Promise.all(["static/chunks/1zcrrq1fx8g2y.js","static/chunks/1tdg_eolxlcdl.js","static/chunks/1j--a56ji33_x.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/0vddljjnmozzx.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/3vaho-xrtuchd.js","static/chunks/0f_nv15a8q415.js","static/chunks/3g_h_00xs9u59.js","static/chunks/2npk7tr63h7rl.js","static/chunks/25ctnyh7njp-d.js"].map(e=>t.l(e))).then(()=>e(87566)))},2213,t=>{t.v(e=>Promise.all(["static/chunks/3wqs57qehored.js","static/chunks/1j--a56ji33_x.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/2npk7tr63h7rl.js","static/chunks/1vkww9l6lgqag.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/0f_nv15a8q415.js","static/chunks/3pyggl13glbdc.js","static/chunks/3vaho-xrtuchd.js","static/chunks/25ctnyh7njp-d.js","static/chunks/3pdpaqzwhhijn.js"].map(e=>t.l(e))).then(()=>e(95758)))},15002,t=>{t.v(e=>Promise.all(["static/chunks/34gp3hvr3j6um.js","static/chunks/0x6i6e6863tir.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/3vaho-xrtuchd.js","static/chunks/2gh4z57fem0_v.js","static/chunks/25ctnyh7njp-d.js","static/chunks/28ycc-1519hl2.js"].map(e=>t.l(e))).then(()=>e(95729)))},35983,t=>{t.v(e=>Promise.all(["static/chunks/4227p7752rnny.js","static/chunks/1j--a56ji33_x.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/2npk7tr63h7rl.js","static/chunks/1vkww9l6lgqag.js","static/chunks/25ctnyh7njp-d.js","static/chunks/0f_nv15a8q415.js","static/chunks/3vaho-xrtuchd.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/3pyggl13glbdc.js","static/chunks/3pdpaqzwhhijn.js"].map(e=>t.l(e))).then(()=>e(50608)))},18561,t=>{t.v(e=>Promise.all(["static/chunks/1j--a56ji33_x.js","static/chunks/1vkww9l6lgqag.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/2npk7tr63h7rl.js","static/chunks/117ys3lltfmcu.js","static/chunks/25ctnyh7njp-d.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/3g_h_00xs9u59.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/3vaho-xrtuchd.js"].map(e=>t.l(e))).then(()=>e(85106)))}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,2348,2413,e=>{"use strict";let t=1/1.2;e.s(["ZOOM_IN_FACTOR",0,t,"ZOOM_OUT_FACTOR",0,1.2,"attachDoubleClickFocus",0,function(e,t,n){let a=()=>{let t=e.pick(e.pointerX,e.pointerY);t?.hit&&t.pickedPoint&&n.setTarget(t.pickedPoint)};return t.addEventListener("dblclick",a),()=>t.removeEventListener("dblclick",a)},"disableWheelZoom",0,function(e){e.inputs.removeByType("ArcRotateCameraMouseWheelInput")},"resetFocus",0,function(e,t){e.setTarget(t.target),e.alpha=t.alpha,e.beta=t.beta,e.radius=t.radius},"stepZoom",0,function(e,t){let n=e.lowerRadiusLimit??.01,a=e.upperRadiusLimit??1/0;e.radius=Math.min(a,Math.max(n,e.radius*t))}],2348);var n=e.i(28100);e.s(["ZoomButtons",0,function({onZoom:e,onReset:a}){let s="grid h-8 w-8 place-items-center rounded-md border border-edge bg-ink/80 text-lg leading-none text-fg backdrop-blur transition hover:bg-ink hover:text-white";return(0,n.jsxs)("div",{className:"absolute right-3 top-3 flex flex-col gap-1",children:[(0,n.jsx)("button",{type:"button","aria-label":"Zoom in",className:s,onClick:()=>e(t),children:"+"}),(0,n.jsx)("button",{type:"button","aria-label":"Zoom out",className:s,onClick:()=>e(1.2),children:"−"}),a?(0,n.jsx)("button",{type:"button","aria-label":"Reset camera focus to center",title:"Reset focus to center",className:s,onClick:a,children:(0,n.jsxs)("svg",{viewBox:"0 0 16 16",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round","aria-hidden":"true",children:[(0,n.jsx)("circle",{cx:"8",cy:"8",r:"3"}),(0,n.jsx)("path",{d:"M8 1v2.5M8 12.5V15M1 8h2.5M12.5 8H15"})]})}):null]})}],2413)},25476,e=>{"use strict";e.s(["attachMeshHover",0,function(e,t,n){let a=0,s=null,i=t=>{let i=t.offsetX,l=t.offsetY;a||(a=requestAnimationFrame(()=>{var t,o;let r;a=0;let c=e.pick(i,l,e=>e.isPickable&&e.isEnabled()),u=c?.pickedMesh?(t=c.pickedMesh,o=c.thinInstanceIndex??-1,(r=t.metadata)?o>=0&&r.hoverLabels?r.hoverLabels[o]??null:r.hoverLabel??null:null):null;u?n({label:u,x:i,y:l}):null!==s&&n(null),s=u}))},l=()=>{a&&(cancelAnimationFrame(a),a=0),null!==s&&(s=null,n(null))};return t.addEventListener("pointermove",i),t.addEventListener("pointerleave",l),()=>{t.removeEventListener("pointermove",i),t.removeEventListener("pointerleave",l),a&&cancelAnimationFrame(a)}}])},19399,e=>{"use strict";var t=e.i(28100),n=e.i(11623),a=e.i(20880);let s="__other_sp__",i="__other_mesh__";function l(e){return`${e[0]}|${e[1]}|${e[2]}`}function o(e,t){return t<=1?0:1.4-e/(t-1)*2.8}var r=e.i(56054),c=e.i(2348),u=e.i(25476),h=e.i(18637),d=e.i(2413);let m="__all__",p={maxStandpoints:6,maxMeshes:10,maxRibbons:70};function b(e,t){return`${e}|${t}`}function g({label:e,value:n,onChange:a,allLabel:s,options:i}){return(0,t.jsxs)("label",{className:"flex items-center gap-1.5 rounded-md border border-edge bg-ink/80 px-2 py-1 text-xs text-fg backdrop-blur",children:[(0,t.jsx)("span",{className:"font-medium text-fg-muted",children:e}),(0,t.jsxs)("select",{className:"max-w-[12rem] bg-transparent text-white outline-none",value:n,onChange:e=>a(e.target.value),children:[(0,t.jsx)("option",{value:m,children:s}),i.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))]})]})}function f({active:e,onClick:n,children:a,disabled:s=!1,title:i}){return(0,t.jsx)("button",{type:"button",onClick:n,disabled:s,title:i,className:`rounded px-2 py-0.5 font-medium transition ${s?"cursor-not-allowed text-fg-muted/40":e?"bg-amber text-ink":"text-fg-muted hover:text-fg"}`,children:a})}function v({standpoints:e,proxyMeshes:a,selectedKey:s,onSelect:i}){let l=(0,n.useRef)(null),o=(0,n.useMemo)(()=>e.filter(e=>e.origin),[e]),r=(0,n.useMemo)(()=>{let e=1/0,t=-1/0,n=1/0,s=-1/0,i=(a,i)=>{e=Math.min(e,a),t=Math.max(t,a),n=Math.min(n,i),s=Math.max(s,i)};for(let e of a)i(e.aabb[0],e.aabb[2]),i(e.aabb[3],e.aabb[5]);for(let e of o)i(e.origin[0],e.origin[2]);return Number.isFinite(e)?(t-e<.001&&(e-=1,t+=1),s-n<.001&&(n-=1,s+=1),{minX:e,maxX:t,minZ:n,maxZ:s}):{minX:-1,maxX:1,minZ:-1,maxZ:1}},[a,o]),c=(0,n.useMemo)(()=>{let e=Math.min(134/(r.maxX-r.minX),94/(r.maxZ-r.minZ));return(t,n)=>[8+(t-r.minX)*e,8+(n-r.minZ)*e]},[r]),u=(0,n.useMemo)(()=>o.reduce((e,t)=>Math.max(e,t.count),1),[o]);return(0,n.useEffect)(()=>{let e=l.current,t=e?.getContext("2d");if(!t)return;let n=window.devicePixelRatio||1;for(let s of(e.width=150*n,e.height=110*n,t.setTransform(n,0,0,n,0,0),t.clearRect(0,0,150,110),t.fillStyle="rgba(8,10,14,0.85)",t.fillRect(0,0,150,110),t.strokeStyle="rgba(120,140,170,0.35)",t.lineWidth=1,a)){let[e,n]=c(s.aabb[0],s.aabb[2]),[a,i]=c(s.aabb[3],s.aabb[5]);t.strokeRect(Math.min(e,a),Math.min(n,i),Math.abs(a-e),Math.abs(i-n))}for(let e of o){let[n,a]=c(e.origin[0],e.origin[2]),i=2+e.count/u*4,l=e.key===s;t.beginPath(),t.arc(n,a,i,0,2*Math.PI),t.fillStyle=l?"rgba(242,115,242,1)":"rgba(242,115,242,0.55)",t.fill(),l&&(t.beginPath(),t.arc(n,a,i+2.5,0,2*Math.PI),t.strokeStyle="rgba(255,255,255,0.9)",t.lineWidth=1.5,t.stroke())}},[a,o,c,u,s]),(0,t.jsxs)("div",{className:"absolute right-3 top-3 rounded-md border border-edge bg-ink/80 p-1 backdrop-blur",children:[(0,t.jsx)("div",{className:"px-1 pb-0.5 text-[10px] font-medium text-fg-muted",children:"Standpoints (top view)"}),(0,t.jsx)("canvas",{ref:l,className:"h-27.5 w-37.5 cursor-pointer rounded",onClick:e=>{let t=l.current;if(!t||0===o.length)return;let n=t.getBoundingClientRect(),a=(e.clientX-n.left)/n.width*150,s=(e.clientY-n.top)/n.height*110,r=null,u=1/0;for(let e of o){let[t,n]=c(e.origin[0],e.origin[2]),i=(t-a)**2+(n-s)**2;i<u&&(u=i,r=e)}r&&u<=196&&i(r.key)}})]})}e.s(["FlowSankey3DView",0,function({links:x,gridSize:k,proxyMeshes:w=[],maxLinks:j=80,baseUrl:z,apiKey:M,flowQuery:y,hasFirstPerson:_=!1}){let $=(0,n.useRef)(null),I=(0,n.useRef)(null),C=(0,n.useRef)(null),[P,B]=(0,n.useState)("loading"),[L,S]=(0,n.useState)(null),[A,q]=(0,n.useState)(m),[R,E]=(0,n.useState)(m),[N,O]=(0,n.useState)(m),[Z,F]=(0,n.useState)("aggregate"),[T,V]=(0,n.useState)(null),[W,X]=(0,n.useState)("all"),[D,H]=(0,n.useState)(x),U=!!(z&&y),K=(0,n.useMemo)(()=>y?JSON.stringify(y):"",[y]),Y=(0,n.useRef)(!1);(0,n.useEffect)(()=>{!Y.current&&_&&(X("first-person"),Y.current=!0)},[_]),(0,n.useEffect)(()=>{_&&"viewer"===W&&X("first-person")},[_,W]),(0,n.useEffect)(()=>{U||H(x)},[x,U]),(0,n.useEffect)(()=>{if(!z||!y)return;let e=!1,t=new a.CollectorApi(z,M??""),n="all"===W?void 0:W;return t.flowHeatmap({...y,bins:k,limit:400,groupByOrigin:!0,cameraMode:n}).then(t=>{e||H(t)}).catch(()=>{e||H([])}),()=>{e=!0}},[z,M,K,W,k]);let G=(0,n.useMemo)(()=>{let e=new Map;for(let t of D){if(!t.originVoxel)continue;let n=l(t.originVoxel),a=t.origin,s=e.get(n);s?(s.count+=t.count,a&&(s.ox+=a[0]*t.count,s.oy+=a[1]*t.count,s.oz+=a[2]*t.count,s.wsum+=t.count)):e.set(n,{key:n,voxel:t.originVoxel,count:t.count,ox:a?a[0]*t.count:0,oy:a?a[1]*t.count:0,oz:a?a[2]*t.count:0,wsum:a?t.count:0})}return[...e.values()].map(e=>({key:e.key,voxel:e.voxel,count:e.count,origin:e.wsum>0?[e.ox/e.wsum,e.oy/e.wsum,e.oz/e.wsum]:void 0})).sort((e,t)=>t.count-e.count)},[D]),J=G.length>0,Q=(0,n.useMemo)(()=>N===m?null:G.find(e=>e.key===N)??null,[G,N]),ee=(0,n.useMemo)(()=>(function(e,t,n,a){let r=e.filter(e=>e.originVoxel);if(0===r.length)return{standpoints:[],gazes:[],meshes:[],ribbons:[],maxCount:1};let c=t.slice(0,Math.max(1,a.maxStandpoints)),u=new Set(c.map(e=>e.key)),h=e=>{let t=e.originVoxel?l(e.originVoxel):s;return u.has(t)?t:s},d=new Map;for(let e of r)d.set(e.mesh,(d.get(e.mesh)??0)+e.count);let m=new Set([...d.entries()].sort((e,t)=>t[1]-e[1]).slice(0,Math.max(1,a.maxMeshes)).map(([e])=>e)),p=e=>m.has(e)?e:i,b=new Map;for(let e of r){let t=h(e),n=p(e.mesh),a=`${t}|${e.azimuth_bin}|${e.elevation_bin}|${n}`,s=b.get(a);s?s.count+=e.count:b.set(a,{standpointId:t,gazeId:`${t}|${e.azimuth_bin}|${e.elevation_bin}`,meshId:n,azimuthBin:e.azimuth_bin,elevationBin:e.elevation_bin,count:e.count})}let g=[...b.values()].sort((e,t)=>t.count-e.count),f=g.slice(0,Math.max(1,a.maxRibbons)),v=g.slice(Math.max(1,a.maxRibbons));if(v.length>0){let e=new Map(f.map(e=>[`${e.standpointId}|${e.azimuthBin}|${e.elevationBin}|${i}`,e]));for(let t of v){let n=`${t.standpointId}|${t.azimuthBin}|${t.elevationBin}|${i}`,a=e.get(n);if(a)a.count+=t.count;else{let a={standpointId:t.standpointId,gazeId:t.gazeId,meshId:i,azimuthBin:t.azimuthBin,elevationBin:t.elevationBin,count:t.count};e.set(n,a),f.push(a)}}}let x=new Set(f.map(e=>e.standpointId)),k=new Set(f.map(e=>e.meshId)),w=[...c.filter(e=>x.has(e.key)).map(e=>e.key),...x.has(s)?[s]:[]],j=w.map((e,t)=>{let n=c.find(t=>t.key===e),a=f.filter(t=>t.standpointId===e).reduce((e,t)=>e+t.count,0);return{id:e,kind:"standpoint",pos:[-2.6,o(t,w.length),0],count:a,label:n?`[${n.voxel[0]}, ${n.voxel[1]}, ${n.voxel[2]}]`:"Other standpoints",isOther:e===s}}),z=new Map(j.map(e=>[e.id,e.pos[1]])),M=new Map;for(let e of f)M.set(e.meshId,(M.get(e.meshId)??0)+e.count);let y=[...k].sort((e,t)=>(M.get(t)??0)-(M.get(e)??0));y.sort((e,t)=>(e===i)-(t===i));let _=y.map((e,t)=>({id:e,kind:"mesh",pos:[2.6,o(t,y.length),0],count:M.get(e)??0,label:e===i?"Other meshes":e,isOther:e===i})),$=new Map;for(let e of f){let t=$.get(e.gazeId);t?t.count+=e.count:$.set(e.gazeId,{az:e.azimuthBin,el:e.elevationBin,sp:e.standpointId,count:e.count})}let I=[...$.entries()].map(([e,t])=>{let a=z.get(t.sp)??0,s=(t.az+.5)/n-.5;return{id:e,kind:"gaze",pos:[0,a+((t.el+.5)/n-.5)*.85,1.6*s],count:t.count,label:`(${t.az}, ${t.el})`,isOther:!1}}),C=f.reduce((e,t)=>Math.max(e,t.count),1);return{standpoints:j,gazes:I,meshes:_,ribbons:f,maxCount:C}})(D,G,k,p),[D,G,k]),et="twostage"===Z&&J;(0,n.useEffect)(()=>{"twostage"!==Z||J||F("aggregate")},[Z,J]);let en=(0,n.useMemo)(()=>{if(N!==m&&J)return D.filter(e=>e.originVoxel&&l(e.originVoxel)===N);if(!J)return D;let e=new Map;for(let t of D){let n=`${t.azimuth_bin}|${t.elevation_bin}|${t.mesh}`,a=e.get(n);a?a.count+=t.count:e.set(n,{azimuth_bin:t.azimuth_bin,elevation_bin:t.elevation_bin,mesh:t.mesh,count:t.count})}return[...e.values()]},[D,N,J]),ea=(0,n.useMemo)(()=>[...en].sort((e,t)=>t.count-e.count).slice(0,Math.max(1,j)),[en,j]),es=(0,n.useMemo)(()=>{let e=new Map;for(let t of ea)e.set(t.mesh,(e.get(t.mesh)??0)+t.count);return[...e.entries()].sort((e,t)=>t[1]-e[1])},[ea]),ei=(0,n.useMemo)(()=>{let e=new Map;for(let t of ea){let n=b(t.azimuth_bin,t.elevation_bin),a=e.get(n);a?a.count+=t.count:e.set(n,{azimuthBin:t.azimuth_bin,elevationBin:t.elevation_bin,count:t.count})}return[...e.values()].sort((e,t)=>t.count-e.count)},[ea]);(0,n.useEffect)(()=>{!et&&A!==m&&(es.some(([e])=>e===A)||q(m))},[et,A,es]),(0,n.useEffect)(()=>{!et&&R!==m&&(ei.some(e=>b(e.azimuthBin,e.elevationBin)===R)||E(m))},[et,R,ei]),(0,n.useEffect)(()=>{!et&&N!==m&&(G.some(e=>e.key===N)||O(m))},[et,N,G]),(0,n.useEffect)(()=>{q(m),E(m),O(m)},[Z]);let el=(0,n.useMemo)(()=>et?ee.ribbons.filter(e=>{let t=N===m||e.standpointId===N,n=R===m||b(e.azimuthBin,e.elevationBin)===R,a=A===m||e.meshId===A;return t&&n&&a}).length:ea.filter(e=>{let t=R===m||b(e.azimuth_bin,e.elevation_bin)===R,n=A===m||e.mesh===A;return t&&n}).length,[et,ee,ea,A,R,N]),eo=et?ee.ribbons.length:ea.length,er=(0,n.useMemo)(()=>et?ee.standpoints.map(e=>({value:e.id,label:`${e.label} \xb7 ${e.count}`})):G.slice(0,24).map(e=>({value:e.key,label:`[${e.voxel[0]}, ${e.voxel[1]}, ${e.voxel[2]}] \xb7 ${e.count}`})),[et,ee,G]),ec=(0,n.useMemo)(()=>{if(et){let e=new Map;for(let t of ee.ribbons){let n=b(t.azimuthBin,t.elevationBin),a=e.get(n);a?a.count+=t.count:e.set(n,{az:t.azimuthBin,el:t.elevationBin,count:t.count})}return[...e.values()].sort((e,t)=>t.count-e.count).map(e=>({value:b(e.az,e.el),label:`(${e.az}, ${e.el}) \xb7 ${e.count}`}))}return ei.map(e=>({value:b(e.azimuthBin,e.elevationBin),label:`(${e.azimuthBin}, ${e.elevationBin}) \xb7 ${e.count}`}))},[et,ee,ei]),eu=(0,n.useMemo)(()=>et?ee.meshes.map(e=>({value:e.id,label:`${e.label} \xb7 ${e.count}`})):es.map(([e,t])=>({value:e,label:`${e} \xb7 ${t}`})),[et,ee,es]);return(0,n.useEffect)(()=>{let t=$.current;if(!t||et)return;if(0===ea.length)return void B("empty");let n=!1,a=null;return B("loading"),S(null),(async()=>{try{let[{Engine:s},{Scene:i},{ArcRotateCamera:l},{HemisphericLight:o},{Vector3:h,Color3:d,Color4:p},{MeshBuilder:g},{StandardMaterial:f}]=await Promise.all([e.A(3905),e.A(94432),e.A(59694),e.A(88004),e.A(27940),e.A(27124),e.A(14074),e.A(18561)]);if(n)return;let v=new s(t,!0,{preserveDrawingBuffer:!1}),x=new i(v);x.clearColor=new p(.04,.05,.07,1);let j=new Map;for(let e of w)j.set(e.name,function(e){let t=e.aabb;return[(t[0]+t[3])/2,(t[1]+t[4])/2,(t[2]+t[5])/2]}(e));let z=new Map,M=es.map(([e])=>e).filter(e=>!j.has(e));for(let e=0;e<M.length;e++){let t=M[e],n=function(e){let t=0;for(let n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Math.abs(t)}(t),a=e/Math.max(1,M.length)*Math.PI*2+n%100/100*.35;z.set(t,[2.2*Math.cos(a),-.35+(n%7-3)*.06,2.2*Math.sin(a)])}for(let[e,t]of j.entries())z.set(e,t);let y=0,_=0,$=0,P=0;for(let e of z.values())y+=e[0],_+=e[1],$+=e[2],P++;let L=new h(y/Math.max(1,P),_/Math.max(1,P),$/Math.max(1,P)),S=1.8;for(let e of z.values()){let t=e[0]-L.x,n=e[1]-L.y,a=e[2]-L.z;S=Math.max(S,Math.sqrt(t*t+n*n+a*a))}let q=.75*S+1,E=Math.max(1,S/1.8),N=ea.reduce((e,t)=>Math.max(e,t.count),1),O=new f("flow-source-node",x);O.disableLighting=!0,O.emissiveColor=new d(.45,.75,1);let Z=new f("flow-target-node",x);Z.disableLighting=!0,Z.emissiveColor=new d(1,.82,.42);let F=new Set,T=new Set,W=e=>{let t=R===m||b(e.azimuth_bin,e.elevation_bin)===R,n=A===m||e.mesh===A;return t&&n},X=new Set,D=new Set;for(let e of ea)W(e)&&(X.add(b(e.azimuth_bin,e.elevation_bin)),D.add(e.mesh));for(let e of ea){let t=`${e.azimuth_bin}|${e.elevation_bin}`,n=z.get(e.mesh);if(!n)continue;let a=W(e),s=(e.azimuth_bin+.5)/k*Math.PI*2-Math.PI,i=(e.elevation_bin+.5)/k*Math.PI-Math.PI/2,l=Math.cos(i),o=l*Math.cos(s),c=Math.sin(i),u=l*Math.sin(s),p=new h(L.x+o*q,L.y+c*q,L.z+u*q),b=new h(n[0],n[1],n[2]);if(!F.has(t)){let e=g.CreateSphere(`flow-src-${t}`,{diameter:.12*E,segments:6},x);e.position=p;let n=O.clone(`flow-src-mat-${t}`);n.alpha=X.has(t)||A===m&&R===m?1:.22,e.material=n,e.isPickable=!1,F.add(t)}if(!T.has(e.mesh)){let t=g.CreateSphere(`flow-target-${e.mesh}`,{diameter:.2*E,segments:7},x);t.position=b;let n=Z.clone(`flow-target-mat-${e.mesh}`);n.alpha=D.has(e.mesh)||A===m&&R===m?1:.22,t.material=n,t.isPickable=!0,t.metadata={hoverLabel:e.mesh},T.add(e.mesh)}let v=p.add(b).scale(.5),w=v.subtract(L),j=Math.sqrt(w.x*w.x+w.y*w.y+w.z*w.z),M=j>1e-6?w.x/j:0,y=j>1e-6?w.y/j:1,_=j>1e-6?w.z/j:0,$=(.35+e.count/N*.75)*E,I=new h(v.x+M*$,v.y+y*$+.12*E,v.z+_*$),C=[];for(let e=0;e<=18;e++){let t=e/18,n=1-t;C.push(new h(n*n*p.x+2*n*t*I.x+t*t*b.x,n*n*p.y+2*n*t*I.y+t*t*b.y,n*n*p.z+2*n*t*I.z+t*t*b.z))}let P=e.count/N,[B,S,V]=(0,r.heatRgb)(P),H=g.CreateTube(`flow-link-${e.mesh}-${t}`,{path:C,radius:(a?1:.4)*(.012+.04*P)*E,tessellation:8,cap:0,sideOrientation:0},x),U=new f(`flow-link-mat-${e.mesh}-${t}`,x);U.disableLighting=!0,U.emissiveColor=new d(B,S,V),U.alpha=a?.35+.65*P:.08,H.material=U,H.isPickable=!0,H.metadata={hoverLabel:e.mesh}}let H=new l("flow-cam",Math.PI/4,Math.PI/3,3.4*S,L,x);H.attachControl(t,!0),(0,c.disableWheelZoom)(H),I.current=H,C.current={target:L,alpha:H.alpha,beta:H.beta,radius:H.radius},new o("flow-light",new h(.3,1,.2),x);let U=g.CreateSphere("flow-source-dome",{diameter:2*q,segments:20},x);U.position=L;let K=new f("flow-source-dome-mat",x);K.wireframe=!0,K.disableLighting=!0,K.emissiveColor=new d(.16,.2,.28),K.alpha=.35,U.material=K,U.isPickable=!1;let Y=Q?.origin;if(Y){let e=new h(Y[0],Y[1],Y[2]),t=g.CreateSphere("flow-standpoint",{diameter:.26*E,segments:10},x);t.position=e;let n=new f("flow-standpoint-mat",x);n.disableLighting=!0,n.emissiveColor=new d(.95,.45,.95),t.material=n,t.isPickable=!1;let a=g.CreateLines("flow-standpoint-stem",{points:[e,new h(e.x,L.y,e.z)]},x);a.color=new d(.95,.45,.95),a.isPickable=!1}v.runRenderLoop(()=>x.render());let G=()=>v.resize();window.addEventListener("resize",G);let J=(0,u.attachMeshHover)(x,t,V),ee=(0,c.attachDoubleClickFocus)(x,t,H);B("ready"),a=()=>{window.removeEventListener("resize",G),J(),ee(),V(null),I.current=null,C.current=null,x.dispose(),v.dispose()}}catch(e){if(n)return;B("error"),S(e instanceof Error?e.message:"Failed to render flow links.")}})(),()=>{n=!0,a?.()}},[ea,k,w,A,R,Q,et]),(0,n.useEffect)(()=>{let t=$.current;if(!t||!et)return;if(0===ee.ribbons.length)return void B("empty");let n=!1,a=null;return B("loading"),S(null),(async()=>{try{let[{Engine:s},{Scene:i},{ArcRotateCamera:l},{HemisphericLight:o},{Vector3:h,Color3:d,Color4:p},{MeshBuilder:g},{StandardMaterial:f}]=await Promise.all([e.A(3905),e.A(94432),e.A(59694),e.A(88004),e.A(27940),e.A(27124),e.A(14074),e.A(18561)]);if(n)return;let v=new s(t,!0,{preserveDrawingBuffer:!1}),x=new i(v);x.clearColor=new p(.04,.05,.07,1);let k=e=>{let t=N===m||e.standpointId===N,n=R===m||b(e.azimuthBin,e.elevationBin)===R,a=A===m||e.meshId===A;return t&&n&&a},w=N!==m||R!==m||A!==m,j=new Set;for(let e of ee.ribbons)k(e)&&(j.add(e.standpointId),j.add(e.gazeId),j.add(e.meshId));let z={standpoint:[.95,.45,.95],gaze:[.45,.75,1],mesh:[1,.82,.42]},M={standpoint:.26,gaze:.13,mesh:.22},y=[...ee.standpoints,...ee.gazes,...ee.meshes],_=new Map(y.map(e=>[e.id,e.pos])),$=new Map(y.map(e=>[e.id,e.label]));for(let e of y){let t=g.CreateSphere(`ts-node-${e.kind}-${e.id}`,{diameter:M[e.kind],segments:8},x);t.position=new h(e.pos[0],e.pos[1],e.pos[2]);let n=new f(`ts-node-mat-${e.kind}-${e.id}`,x);n.disableLighting=!0;let[a,s,i]=z[e.kind];n.emissiveColor=new d(a,s,i),n.alpha=!w||j.has(e.id)?1:.2,t.material=n,t.isPickable=!0,t.metadata={hoverLabel:e.label}}let P=(e,t,n)=>{let a=e[0],s=e[1],i=e[2],l=t[0],o=t[1],r=t[2],c=[(a+l)/2,(s+o)/2+n,(i+r)/2],u=[];for(let e=0;e<=12;e++){let t=e/12,n=1-t;u.push(new h(n*n*a+2*n*t*c[0]+t*t*l,n*n*s+2*n*t*c[1]+t*t*o,n*n*i+2*n*t*c[2]+t*t*r))}return u};for(let e of ee.ribbons){let t=_.get(e.standpointId),n=_.get(e.gazeId),a=_.get(e.meshId);if(!t||!n||!a)continue;let s=e.count/ee.maxCount,i=.18+.5*s,l=[...P(t,n,i),...P(n,a,i).slice(1)],o=k(e),[c,u,h]=(0,r.heatRgb)(s),m=g.CreateTube(`ts-link-${e.standpointId}-${e.gazeId}-${e.meshId}`,{path:l,radius:(o?1:.4)*(.012+.04*s),tessellation:8,cap:0,sideOrientation:0},x),p=new f(`ts-link-mat-${e.standpointId}-${e.gazeId}-${e.meshId}`,x);p.disableLighting=!0,p.emissiveColor=new d(c,u,h),p.alpha=o?.35+.65*s:w?.06:.18,m.material=p,m.isPickable=!0,m.metadata={hoverLabel:$.get(e.meshId)??e.meshId}}let L=h.Zero(),S=new l("ts-cam",Math.PI/2,Math.PI/2.4,8.5,L,x);S.attachControl(t,!0),(0,c.disableWheelZoom)(S),I.current=S,C.current={target:L,alpha:S.alpha,beta:S.beta,radius:S.radius},new o("ts-light",new h(.3,1,.2),x),v.runRenderLoop(()=>x.render());let q=()=>v.resize();window.addEventListener("resize",q);let E=(0,u.attachMeshHover)(x,t,V),O=(0,c.attachDoubleClickFocus)(x,t,S);B("ready"),a=()=>{window.removeEventListener("resize",q),E(),O(),V(null),I.current=null,C.current=null,x.dispose(),v.dispose()}}catch(e){if(n)return;B("error"),S(e instanceof Error?e.message:"Failed to render flow links.")}})(),()=>{n=!0,a?.()}},[et,ee,N,R,A]),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("canvas",{ref:$,className:"aspect-video w-full rounded-lg border border-edge bg-ink"}),T?(0,t.jsx)("div",{className:"pointer-events-none absolute z-10 max-w-[16rem] truncate rounded border border-edge bg-ink/90 px-1.5 py-0.5 text-xs text-white shadow backdrop-blur",style:{left:T.x+12,top:T.y+12},children:T.label}):null,"ready"===P?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"absolute left-3 top-3 flex flex-wrap gap-2",children:[J?(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-md border border-edge bg-ink/80 p-0.5 text-xs backdrop-blur",children:[(0,t.jsx)(f,{active:!et,onClick:()=>F("aggregate"),children:"Aggregate"}),(0,t.jsx)(f,{active:et,onClick:()=>F("twostage"),children:"Two-stage"})]}):null,U?(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-md border border-edge bg-ink/80 p-0.5 text-xs backdrop-blur",children:[(0,t.jsx)(f,{active:"first-person"===W,onClick:()=>X("first-person"),children:"Walk"}),(0,t.jsx)(f,{active:"viewer"===W,onClick:()=>X("viewer"),disabled:_,title:_?"Orbit (viewer) flow isn't available for walkable scenes":void 0,children:"Orbit"}),(0,t.jsx)(f,{active:"all"===W,onClick:()=>X("all"),children:"All"})]}):null,J?(0,t.jsx)(g,{label:"Standpoint",value:N,onChange:O,allLabel:"All standpoints",options:er}):null,(0,t.jsx)(g,{label:et?"Gaze":"Source",value:R,onChange:E,allLabel:et?"All gaze sectors":"All sources",options:ec}),(0,t.jsx)(g,{label:"Mesh",value:A,onChange:q,allLabel:"All meshes",options:eu})]}),et?(0,t.jsx)(v,{standpoints:G,proxyMeshes:w,selectedKey:N,onSelect:e=>O(t=>t===e?m:e)}):null,(0,t.jsxs)("div",{className:"pointer-events-none absolute bottom-3 right-3 flex max-w-[20rem] flex-col items-end gap-2",children:[U&&!_?(0,t.jsxs)("div",{className:"rounded-md border border-edge bg-ink/80 px-2 py-1 text-xs text-fg-muted backdrop-blur",children:["Orbit-dominated scene — viewer ",(0,t.jsx)("em",{children:"position"})," adds little here. Use the"," ",(0,t.jsx)("strong",{children:"View dome"})," (§7.5) above for where viewers looked."]}):null,(0,t.jsxs)("div",{className:"rounded-md border border-edge bg-ink/80 px-2 py-1 text-xs text-fg backdrop-blur",children:["Active links: ",el,"/",eo]})]}),(0,t.jsx)(d.ZoomButtons,{onZoom:e=>I.current&&(0,c.stepZoom)(I.current,e),onReset:()=>I.current&&C.current&&(0,c.resetFocus)(I.current,C.current)}),(0,t.jsx)(h.HeatLegend,{title:"Flow volume",lowLabel:"fewer links",highLabel:"dominant links",note:et?"Three columns: standpoint → gaze sector → mesh. Top standpoints/meshes are kept; the tail folds into an “Other” node. Pick a standpoint (or click the minimap), gaze sector, or mesh to emphasize matching ribbons.":"Each arc aggregates clicks from one camera-direction bin to a mesh. Pick a source or mesh to emphasize matching links and dim the rest."})]}):(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center text-sm text-fg-muted",children:"loading"===P?"Rendering…":"empty"===P?"No aggregate flow links in range.":"error"===P?L??"Flow view unavailable.":null})]})}],19399)},3905,e=>{e.v(t=>Promise.all(["static/chunks/3pdpaqzwhhijn.js","static/chunks/08bm3ye5govev.js","static/chunks/0g6u34xkzrpjn.js","static/chunks/25ctnyh7njp-d.js","static/chunks/2gh4z57fem0_v.js","static/chunks/3vaho-xrtuchd.js","static/chunks/0g7p8zp2kxve5.js"].map(t=>e.l(t))).then(()=>t(66232)))},94432,e=>{e.v(t=>Promise.all(["static/chunks/2kje_jvmwsvwo.js","static/chunks/1j--a56ji33_x.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/2npk7tr63h7rl.js","static/chunks/3vaho-xrtuchd.js","static/chunks/3g_h_00xs9u59.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/25ctnyh7njp-d.js","static/chunks/1vpcaaf-0dn7q.js"].map(t=>e.l(t))).then(()=>t(92494)))},59694,e=>{e.v(t=>Promise.all(["static/chunks/1j--a56ji33_x.js","static/chunks/0oap0o8a8a_cl.js","static/chunks/0f_nv15a8q415.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/245h82k-g1nxr.js","static/chunks/3ovd8o_usay7j.js","static/chunks/3vaho-xrtuchd.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/25ctnyh7njp-d.js","static/chunks/2npk7tr63h7rl.js","static/chunks/3pyggl13glbdc.js"].map(t=>e.l(t))).then(()=>t(67186)))},88004,e=>{e.v(t=>Promise.all(["static/chunks/2p8dbh81chhon.js","static/chunks/1oara6fkfvgs3.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/25ctnyh7njp-d.js","static/chunks/3pdpaqzwhhijn.js"].map(t=>e.l(t))).then(()=>t(15768)))},27940,e=>{e.v(t=>Promise.all(["static/chunks/0w0sx062qmcsh.js","static/chunks/25ctnyh7njp-d.js","static/chunks/3pdpaqzwhhijn.js"].map(t=>e.l(t))).then(()=>t(23235)))},27124,e=>{e.v(t=>Promise.all(["static/chunks/1par9m038tiov.js","static/chunks/1j--a56ji33_x.js","static/chunks/2j-sax2xfdv7l.js","static/chunks/340pg0qkv5tqq.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/0gwa154w_0wuh.js","static/chunks/0oap0o8a8a_cl.js","static/chunks/0f_nv15a8q415.js","static/chunks/3vaho-xrtuchd.js","static/chunks/3pyggl13glbdc.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/3g_h_00xs9u59.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/25ctnyh7njp-d.js","static/chunks/2npk7tr63h7rl.js","static/chunks/01aeari2x_tlz.js"].map(t=>e.l(t))).then(()=>t(70928)))},14074,e=>{e.v(t=>Promise.all(["static/chunks/1zcrrq1fx8g2y.js","static/chunks/1tdg_eolxlcdl.js","static/chunks/1j--a56ji33_x.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/0vddljjnmozzx.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/3vaho-xrtuchd.js","static/chunks/0f_nv15a8q415.js","static/chunks/3g_h_00xs9u59.js","static/chunks/2npk7tr63h7rl.js","static/chunks/25ctnyh7njp-d.js"].map(t=>e.l(t))).then(()=>t(87566)))},18561,e=>{e.v(t=>Promise.all(["static/chunks/1j--a56ji33_x.js","static/chunks/1vkww9l6lgqag.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/2npk7tr63h7rl.js","static/chunks/117ys3lltfmcu.js","static/chunks/25ctnyh7njp-d.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/3g_h_00xs9u59.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/3vaho-xrtuchd.js"].map(t=>e.l(t))).then(()=>t(85106)))}]);