PageSourceSearch

https://bsidesindore.in/assets/World-L0pjWoPh.js

js bsidesindore.in collected 2026-10-07 18:33:02 UTC 56,883 bytes, 87 lines download raw bytes

1var xe=Object.defineProperty;var Se=(r,e,t)=>e in r?xe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var v=(r,e,t)=>Se(r,typeof e!="symbol"?e+"":e,t);import{j as o,u as pe,b as ge,d as Ee,O as Te,C as Me}from"./vendor-r3f-BGuYPAQ8.js";import{r as l,a as ce,f as Ae}from"./vendor-react-atvCNCR5.js";import{F as Ce,m as ke,d as J,n as re,o as Ie,p as ue,D as Le,q as Pe}from"./vendor-three-CGYCzd_n.js";import{u as z,a as ye,J as Re,A as je,T as De,C as ze,E as Fe,b as Ne}from"./index-Bw1Ny68o.js";import"./vendor-ui-BwOwFJfq.js";class $e{constructor(){v(this,"isMonitoring",!1);v(this,"panel",null);v(this,"history",[]);v(this,"fps",0);v(this,"frameCount",0);v(this,"lastFrameTime",0);v(this,"frameDrops",0);v(this,"rafId",null);v(this,"collapsed",!0);v(this,"activeTab","perf");v(this,"screenLogs",new Map);v(this,"sceneStartedAt",0);v(this,"activeIssues",new Set);v(this,"sessionId",`bsi-${Date.now()}`)}startMonitoring(e){if(this.isMonitoring)return;this.isMonitoring=!0,this.sceneStartedAt=Date.now(),this.loadScreenLogFromStorage(),this.createPanel(),this.startFPS(),this.registerKeyShortcut();const t=()=>{if(!this.isMonitoring)return;const s=this.capture(e);this.history.push(s),this.history.length>60&&this.history.shift(),this.detectIssues(s),this.render(s),setTimeout(t,1e3)};t()}stopMonitoring(){this.isMonitoring=!1,this.rafId!==null&&cancelAnimationFrame(this.rafId),this.panel&&(document.body.removeChild(this.panel),this.panel=null)}show(){this.panel&&(this.panel.style.display="block")}hide(){this.panel&&(this.panel.style.display="none")}toggle(){this.panel&&(this.panel.style.display=this.panel.style.display==="none"?"block":"none")}logScreenEvent(e,t,s){const i=this.screenLogs.get(e)??[];i.push({t:Date.now(),status:t,msg:s}),this.screenLogs.set(e,i),t==="timeout"&&this.activeIssues.add("VIDEO_TIMEOUT"),t==="error"&&this.activeIssues.add("VIDEO_ERROR"),t==="fallback"&&this.activeIssues.add("VIDEO_FALLBACK"),this.saveScreenLogToStorage(),this.isMonitoring&&this.history.length>0&&this.render(this.history[this.history.length-1])}downloadLogs(){const e=[...this.screenLogs.values()].filter(c=>c.some(n=>n.status==="loaded")).length,t={session:this.sessionId,exportedAt:new Date().toISOString(),device:{width:window.innerWidth,height:window.innerHeight,pixelRatio:window.devicePixelRatio,userAgent:navigator.userAgent,deviceMemory:navigator.deviceMemory??"unknown",hardwareConcurrency:navigator.hardwareConcurrency,connection:navigator.connection?.effectiveType??"unknown"},summary:{screensTotal:this.screenLogs.size,screensLoaded:e,screensFailed:[...this.screenLogs.values()].filter(c=>c.some(n=>n.status==="error"||n.status==="timeout")).length,activeIssues:[...this.activeIssues],uptimeSeconds:Math.round((Date.now()-this.sceneStartedAt)/1e3)},screens:Object.fromEntries([...this.screenLogs.entries()].map(([c,n])=>[c,n.map(h=>({...h,elapsed:`${((h.t-this.sceneStartedAt)/1e3).toFixed(2)}s`,time:new Date(h.t).toISOString()}))])),perfHistory:this.history.slice(-20)},s=new Blob([JSON.stringify(t,null,2)],{type:"application/json"}),i=URL.createObjectURL(s),a=document.createElement("a");a.href=i,a.download=`bsidesindore-debug-${Date.now()}.json`,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)}clearLogs(){this.screenLogs.clear(),this.activeIssues.clear(),this.history=[],this.frameDrops=0;try{localStorage.removeItem("bsi-screen-log")}catch{}this.isMonitoring&&this.panel&&this.render(this.capture({children:[]}))}getScreenStatus(){const e={};return this.screenLogs.forEach((t,s)=>{e[s]={latestStatus:t[t.length-1]?.status??"pending",events:t.length}}),e}exportData(){this.downloadLogs()}saveScreenLogToStorage(){try{const e=Object.fromEntries(this.screenLogs);localStorage.setItem("bsi-screen-log",JSON.stringify(e))}catch{}}loadScreenLogFromStorage(){try{const e=localStorage.getItem("bsi-screen-log");if(!e)return;const t=JSON.parse(e);Object.entries(t).forEach(([s,i])=>{this.screenLogs.set(s,i)})}catch{}}detectIssues(e){const t=Date.now()-this.sceneStartedAt;t>8e3&&!e.cyberCityMounted&&this.activeIssues.add("WEBGL_INIT_SLOW");const s=[...this.screenLogs.values()].filter(i=>i.some(a=>a.status==="loaded")).length;t>12e3&&s===0&&this.activeIssues.add("SCREENS_NOT_LOADING"),e.fps<15&&e.fps>0&&this.activeIssues.add("LOW_FPS")}startFPS(){const e=t=>{this.isMonitoring&&(this.frameCount++,t-this.lastFrameTime>=1e3&&(this.fps=Math.round(this.frameCount*1e3/(t-this.lastFrameTime)),this.fps<30&&this.frameDrops++,this.frameCount=0,this.lastFrameTime=t),this.rafId=requestAnimationFrame(e))};this.rafId=requestAnimationFrame(e)}capture(e){const t=e.children??[],s=performance.memory,i=window.innerWidth,a=window.innerHeight;
1let c=!1;try{const n=document.createElement("canvas");c=!!(n.getContext("webgl")||n.getContext("experimental-webgl"))}catch{}return{timestamp:Date.now(),fps:this.fps,memoryMB:s?Math.round(s.usedJSHeapSize/1024/1024):0,frameDrops:this.frameDrops,sceneChildren:t.length,visibleObjects:t.filter(n=>n.visible).length,lights:t.filter(n=>/Light/.test(n.type)).length,meshes:t.filter(n=>n.type==="Mesh").length,groups:t.filter(n=>n.type==="Group").length,deviceType:i<768?"mobile":i<1024?"tablet":"desktop",deviceWidth:i,deviceHeight:a,pixelRatio:window.devicePixelRatio||1,webgl:c,cyberCityMounted:!!window.cyberCityMounted}}getScreenStatusIcon(e){if(!e.length)return"⌛";switch(e[e.length-1].status){case"loaded":return"✅";case"loading":return"⏳";case"error":return"❌";case"timeout":return"⏸";case"fallback":return"🔲";default:return"⌛"}}getScreenElapsed(e){if(!e.length)return"";const t=e[0].t,s=e[e.length-1];return s.status==="loaded"?`${((s.t-t)/1e3).toFixed(1)}s`:""}render(e){if(!this.panel)return;const t=e.fps>=50?"#00ff41":e.fps>=30?"#ffff00":"#ff4444",s=e.memoryMB<150?"#00ff41":e.memoryMB<300?"#ffff00":"#ff4444",i=e.cyberCityMounted&&e.sceneChildren>0,a=this.activeIssues.size,c=[...this.screenLogs.values()].filter(M=>M.some(y=>y.status==="loaded")).length,n=this.screenLogs.size,h=(M,y,H="#ccc")=>`<div style="display:flex;justify-content:space-between;gap:12px;padding:2px 0;border-bottom:1px solid rgba(0,255,65,0.07)">
2        <span style="color:#888;font-size:10px">${M}</span>
3        <span style="color:${H};font-size:10px;font-weight:bold">${y}</span>
4      </div>`,C=a>0?`<div style="margin-top:6px;padding:4px 6px;background:rgba(255,68,68,0.1);border:1px solid rgba(255,68,68,0.3);border-radius:3px">
5          <div style="color:#ff4444;font-size:9px;font-weight:bold;margin-bottom:3px">⚠ ACTIVE ISSUES</div>
6          ${[...this.activeIssues].map(M=>`<div style="color:#ff8888;font-size:9px">• ${M}</div>`).join("")}
7        </div>`:"",p=`
8      <div id="dbg-header" style="display:flex;align-items:center;justify-content:space-between;cursor:pointer;margin-bottom:${this.collapsed?0:8}px;padding-bottom:${this.collapsed?0:6}px;border-bottom:${this.collapsed?"none":"1px solid rgba(0,255,65,0.2)"}">
9        <span style="color:#00ff41;font-weight:bold;font-size:11px">
10          ◉ ${e.deviceType.toUpperCase()} &nbsp;
11          <span style="color:${t}">${e.fps} FPS</span>
12          ${a>0?` &nbsp;<span style="color:#ff4444">⚠${a}</span>`:""}
13          ${i?"":' &nbsp;<span style="color:#ffff00">⚠</span>'}
14        </span>
15        <span style="color:#555;font-size:10px">${this.collapsed?"▼":"▲"}</span>
16      </div>`;let x="";if(!this.collapsed){const M=`
17        <div style="display:flex;gap:4px;margin-bottom:8px">
18          <button id="dbg-tab-perf" style="flex:1;padding:3px;font-size:9px;font-family:monospace;cursor:pointer;border-radius:3px;
19            background:${this.activeTab==="perf"?"rgba(0,255,65,0.2)":"transparent"};
20            border:1px solid ${this.activeTab==="perf"?"rgba(0,255,65,0.5)":"rgba(0,255,65,0.2)"};
21            color:${this.activeTab==="perf"?"#00ff41":"#555"}">PERF</button>
22          <button id="dbg-tab-screens" style="flex:1;padding:3px;font-size:9px;font-family:monospace;cursor:pointer;border-radius:3px;
23            background:${this.activeTab==="screens"?"rgba(0,255,65,0.2)":"transparent"};
24            border:1px solid ${this.activeTab==="screens"?"rgba(0,255,65,0.5)":"rgba(0,255,65,0.2)"};
25            color:${this.activeTab==="screens"?"#00ff41":"#555"}">SCREENS ${n>0?`${c}/${n}`:""}</button>
26        </div>`;let y="";this.activeTab==="perf"?y=`
27          ${h("Device",`${e.deviceWidth}×${e.deviceHeight} @${e.pixelRatio.toFixed(1)}x`)}
28          ${h("FPS",String(e.fps),t)}
29          ${h("Memory",e.memoryMB?`${e.memoryMB} MB`:"—",s)}
30          ${h("Frame Drops",String(e.frameDrops),e.frameDrops>0?"#ffff00":"#00ff41")}
31          ${h("WebGL",e.webgl?"YES":"NO",e.webgl?"#00ff41":"#ff4444")}
32          <div style="margin-top:6px;margin-bottom:4px;color:#555;font-size:9px;text-transform:uppercase;letter-spacing:1px">Scene Objects</div>
33          ${h("Children",String(e.sceneChildren),i?"#00ff41":"#ff4444")}
34          ${h("Visible",String(e.visibleObjects))}
35          ${h("Lights",String(e.lights),e.lights>0?"#00ff41":"#ffff00")}
36          ${h("Meshes",String(e.meshes))}
37          ${h("CyberCity",e.cyberCityMounted?"MOUNTED":"PENDING",e.cyberCityMounted?"#00ff41":"#ffff00")}
38          ${C}`:y=`
39          <div style="max-height:200px;overflow-y:auto">${["center","shocked-david-martinez","poha-front-left","rajwada-front-right","left-main","right-main","left-square","right-square","right-medium","tall-center","portrait-left","large-background","right-large","right-wide"].map(O=>{const k=this.screenLogs.get(O)??[],_=this.getScreenStatusIcon(k),w=this.getScreenElapsed(k),S=k[k.length-1],I=S?.status==="loaded"?"#00ff41":S?.status==="loading"?"#ffff00":S?.status==="error"||S?.status==="timeout"?"#ff4444":S?.status==="fallback"?"#ff8800":"#555",R=O.length>14?O.substring(0,13)+"…":O;return`<div style="display:flex;justify-content:space-between;align-items:center;padding:1px 0;border-bottom:1px solid rgba(0,255,65,0.05)">
40            <span style="color:#888;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:120px">${_} ${R}</span>
41            <span style="color:${I};font-size:9px;white-space:nowrap">${w||(S?.status??"pending")}</span>
42          </div>`}).join("")}</div>
43          <div style="margin-top:4px;color:#555;font-size:9px">
44            ✅loaded ⏳loading ❌error ⏸timeout 🔲fallback ⌛pending
45          </div>`,x=`<div>
46        ${M}
47        ${y}
48        <div style="margin-top:8px;display:flex;gap:6px">
49          <button id="dbg-download" style="flex:1;background:rgba(0,255,65,0.1);border:1px solid rgba(0,255,65,0.3);color:#00ff41;font-size:9px;padding:3px;cursor:pointer;font-family:monospace">DOWNLOAD</button>
50          <button id="dbg-clear" style="flex:1;background:rgba(255,170,0,0.1);border:1px solid rgba(255,170,0,0.3);color:#ffaa00;font-size:9px;padding:3px;cursor:pointer;font-family:monospace">CLEAR</button>
51          <button id="dbg-hide" style="flex:1;background:rgba(255,68,68,0.1);border:1px solid rgba(255,68,68,0.3);color:#ff4444;font-size:9px;padding:3px;cursor:pointer;font-family:monospace">HIDE</button>
52        </div>
53      </div>`}this.panel.innerHTML=p+x;const E=document.getElementById("dbg-header");E&&(E.onclick=()=>{this.collapsed=!this.collapsed,this.history.length>0&&this.render(this.history[this.history.length-1])});const P=document.getElementById("dbg-tab-perf");P&&(P.onclick=M=>{M.stopPropagation(),this.activeTab="perf",this.render(e)});const V=document.getElementById("dbg-tab-screens");V&&(V.onclick=M=>{M.stopPropagation(),this.activeTab="screens",this.render(e)});const N=document.getElementById("dbg-download");N&&(N.onclick=M=>{M.stopPropagation(),this.downloadLogs()});const B=document.getElementById("dbg-clear");B&&(B.onclick=M=>{M.stopPropagation(),this.clearLogs()});const F=document.getElementById("dbg-hide");F&&(F.onclick=M=>{M.stopPropagation(),this.hide()})}createPanel(){if(this.panel)return;this.panel=document.createElement("div"),this.panel.id="scene-debugger";const e=window.innerWidth<768;this.panel.style.cssText=`
54      position: fixed;
55      ${e?"bottom: 16px; left: 10px;":"top: 10px; right: 10px;"}
56      background: rgba(0, 0, 0, 0.92);
57      border: 1px solid rgba(0, 255, 65, 0.5);
58      border-radius: 6px;
59      box-shadow: 0 0 16px rgba(0, 255, 65, 0.15);
60      font-family: 'Courier New', monospace;
61      padding: 8px 10px;
62      z-index: 10000;
63      min-width: ${e?"160px":"220px"};
64      max-width: ${e?"200px":"260px"};
65      backdrop-filter: blur(4px);
66      user-select: none;
67    `,document.body.appendChild(this.panel)}registerKeyShortcut(){window.addEventListener("keydown",e=>{e.ctrlKey&&e.shiftKey&&e.key==="D"&&(e.preventDefault(),this.toggle())})}}const G=new $e;window.toggleDebugger=()=>G.toggle();window.downloadDebugLogs=()=>G.downloadLogs();window.exportDebugData=()=>G.downloadLogs();window.clearDebugLogs=()=>G.clearLogs();window.getScreenStatus=()=>G.getScreenStatus();window.hideDebugger=()=>G.hide();window.forceShowDebugger=()=>G.show();window.refreshDebugger=()=>{};window.checkScreensNow=()=>{G.getScreenStatus()};const Q=new Set,he={normal:99,elevated:8,critical:5},W=({id:r,position:e,size:t,rotation:s=[0,0,0],backgroundColor:i,text:a,gifUrl:c,caption:n,opacity:h=1,emissiveIntensity:C=.3,loadDelay:p=0,onScreenClick:x})=>{const E=l.useRef(null),P=l.useRef(null),[V,N]=l.useState(0),[B,F]=l.useState(null),M=l.useRef(null),y=l.useRef(null),{camera:H}=pe(),Y=l.useRef(!0),O=l.useRef(0),k=l.useRef(new Ce),_=l.useRef(new ke);l.useEffect(()=>{M.current=B},[B]);const w=z(d=>d.worldIsActive),S=z(d=>d.memoryPressure),I=S==="critical"?15:S==="elevated"?20:30,R=S==="critical"?1:S==="elevated"?2:3,ee=S==="critical"?8:S==="elevated"?6:4;l.useEffect(()=>{!y.current||!(y.current instanceof HTMLVideoElement)||(w?(Y.current=!1,O.current=0):(y.current.pause(),y.current.load()))},[w]),l.useEffect(()=>{if(!c)return;let d=null,u=null,g=null;const j=r??c??"unknown",L=(D="fallback")=>{G.logScreenEvent(j,D==="timeout"?"timeout":"fallback",D);const b=document.createElement("canvas");b.width=256,b.height=256;const m=b.getContext("2d");if(m){m.fillStyle=i,m.fillRect(0,0,b.width,b.height),m.fillStyle="rgba(0, 255, 255, 0.8)",m.font="bold 24px monospace",m.textAlign="center",m.textBaseline="middle",m.fillText("BSides",b.width/2,b.height/2-15),m.fillText("Indore",b.width/2,b.height/2+15);const f=new re(b);f.needsUpdate=!0,F(f)}},U=()=>
67{if(G.logScreenEvent(j,"loading",c),c.endsWith(".mp4")||c.endsWith(".webm")){let b=c.startsWith("./")?c.substring(2):c;b.startsWith("/")||(b=`/${b}`),u=document.createElement("video"),u.src=b,u.crossOrigin="anonymous",u.loop=!0,u.muted=!0,u.playsInline=!0,u.autoplay=!1,u.preload="metadata",u.setAttribute("webkit-playsinline","true"),u.controls=!1,y.current=u,g=setTimeout(()=>L("timeout"),8e3);const m=()=>{g&&clearTimeout(g),G.logScreenEvent(j,"error",c),L("error")},f=()=>{if(g&&clearTimeout(g),G.logScreenEvent(j,"loaded",c),z.getState().worldIsActive){const A=z.getState().memoryPressure,X=he[A]??99;Q.size<X?(u.play().catch(()=>{}),Q.add(u),u.addEventListener("pause",()=>Q.delete(u),{once:!0})):u.pause()}const T=new Ie(u);T.minFilter=ue,T.magFilter=ue,T.generateMipmaps=!1,T.needsUpdate=!0,F(T)};u.addEventListener("canplay",f,{once:!0}),u.addEventListener("error",m),u.load(),z.getState().worldIsActive&&u.play().catch(()=>{})}else{const b=new Image;b.crossOrigin="anonymous",b.onload=()=>{const m=document.createElement("canvas"),f=t[0]/t[1],T=512;m.width=f>=1?T:Math.round(T*f),m.height=f>=1?Math.round(T/f):T;const A=m.getContext("2d");if(A){A.fillStyle=i,A.fillRect(0,0,m.width,m.height);const X=n?m.height*.16:0,Z=m.height-X,ne=b.width/b.height,be=m.width/Z;let te,se;if(ne>be?(te=m.width,se=m.width/ne):(se=Z,te=Z*ne),A.drawImage(b,(m.width-te)/2,(Z-se)/2,te,se),n){A.fillStyle="rgba(10,14,20,0.92)",A.fillRect(0,Z,m.width,X),A.fillStyle="#ffffff",A.textAlign="center",A.textBaseline="middle";const de=n.toUpperCase().split("").join(" ");let ie=Math.round(X*.4);const ve=m.width*.92;for(A.font=`bold ${ie}px Arial, sans-serif`;ie>8&&A.measureText(de).width>ve;)ie-=1,A.font=`bold ${ie}px Arial, sans-serif`;A.fillText(de,m.width/2,Z+X/2)}const le=new re(m);le.needsUpdate=!0,F(le)}},b.onerror=L,b.src=c,y.current=b}};return p>0?d=setTimeout(U,p):U(),()=>{d&&clearTimeout(d),g&&clearTimeout(g),y.current instanceof HTMLVideoElement&&(y.current.pause(),y.current.src=""),y.current=null,M.current?.dispose()}},[c,p]);const K=d=>{if(!a)return null;const u=document.createElement("canvas");u.width=1024,u.height=1024;const g=u.getContext("2d");if(g.fillStyle="#000000",g.fillRect(0,0,u.width,u.height),d){const D=g.getImageData(0,0,u.width,u.height),b=D.data;for(let m=0;m<b.length;m+=4)if(Math.random()>.98){const f=(Math.random()-.5)*60;b[m]+=f,b[m+1]+=f,b[m+2]+=f}g.putImageData(D,0,0)}g.fillStyle="rgba(0, 0, 0, 0.1)";for(let D=0;D<u.height;D+=3)g.fillRect(0,D,u.width,1);g.font="bold 32px monospace",g.textAlign="left";const j=a.split(`
68`);let L=100;j.forEach(D=>
68{g.fillStyle="#ffffff",g.fillText(D,50,L),d&&Math.random()>.6&&(g.fillStyle="rgba(255, 0, 0, 0.5)",g.fillText(D,52+Math.random()*6,L+Math.random()*3),g.fillStyle="rgba(0, 255, 255, 0.5)",g.fillText(D,48-Math.random()*6,L-Math.random()*3)),d&&Math.random()>.7&&(g.fillStyle="rgba(255, 255, 255, 0.3)",g.fillRect(0,L-10,u.width,2)),L+=40});const U=new re(u);return U.needsUpdate=!0,U},q=l.useRef(0);return ge((d,u)=>{if(!P.current)return;if(q.current++,E.current&&q.current%I===0)if(_.current.multiplyMatrices(H.projectionMatrix,H.matrixWorldInverse),k.current.setFromProjectionMatrix(_.current),k.current.intersectsObject(E.current)){if(O.current=0,!Y.current&&(Y.current=!0,y.current instanceof HTMLVideoElement&&y.current.paused)){const L=he[S]??99;if(Q.size<L){y.current.play().catch(()=>{});const U=y.current;Q.add(U),U.addEventListener("pause",()=>Q.delete(U),{once:!0})}}}else O.current++,Y.current&&O.current>=R&&(Y.current=!1,y.current instanceof HTMLVideoElement&&!y.current.paused&&(y.current.pause(),y.current.load()));B&&Y.current&&y.current instanceof HTMLVideoElement&&y.current.readyState>=2&&q.current%ee===0&&(B.needsUpdate=!0);const g=P.current.material;if(!c&&a&&q.current%5===0){const j=z.getState().playerPosition,L=new J(...j),U=new J(...e),D=L.distanceTo(U),b=Math.max(0,Math.min(1,(D-3)/12));if(g.emissiveIntensity=.05+b*.35,Math.random()>.998){N(.3);const m=K(!0);m&&(g.map=m,g.needsUpdate=!0)}else if(V>0&&(N(V-u),V<=0)){const m=K(!1);m&&(g.map=m,g.needsUpdate=!0)}}}),o.jsxs("group",{position:e,rotation:s,children:[o.jsxs("mesh",{ref:E,children:[o.jsx("boxGeometry",{args:[t[0],t[1],.15]}),o.jsx("meshStandardMaterial",{color:"#1a1a1a",metalness:.8,roughness:.2})]}),c&&B?o.jsxs("mesh",{ref:P,position:[0,0,.08],onClick:x?d=>{d.stopPropagation(),x()}:void 0,onPointerOver:x?()=>{document.body.style.cursor="pointer"}:void 0,onPointerOut:x?()=>{document.body.style.cursor="auto"}:void 0,children:[o.jsx("planeGeometry",{args:[t[0]*.92,t[1]*.92]}),o.jsx("meshBasicMaterial",{map:B,transparent:h<1,opacity:h}),C>.3&&o.jsx("pointLight",{position:[0,0,1],color:"#ffffff",intensity:C,distance:t[0]})]}):a?o.jsxs("mesh",{ref:P,position:[0,0,.08],children:[o.jsx("planeGeometry",{args:[t[0]*.92,t[1]*.92]}),o.jsx("meshStandardMaterial",{map:K(!1),emissive:"#ffffff",emissiveIntensity:.1})]}):o.jsxs("mesh",{position:[0,0,.08],children:[o.jsx("planeGeometry",{args:[t[0]*.92,t[1]*.92]}),o.jsx("meshStandardMaterial",{color:"#000000",emissive:i,emissiveIntensity:.2})]}),o.jsx("pointLight",{position:[0,0,.3],color:i,intensity:1,distance:t[0]+t[1],decay:2})]})},Be=()=>{const r=window.innerWidth<768,e=window.innerWidth>=768&&window.innerWidth<1024,s=navigator.deviceMemory??8,i=r?10:s<=4?8:e?13:14,a=x=>`/webmdown/${x}`,c=r?[5,3.5]:[7,4.5],n=[{id:"center",priority:1},{id:"shocked-david-martinez",priority:1,file:"shocked-david-martinez.webm"},{id:"poha-front-left",priority:1,file:"poha.webm"},{id:"rajwada-front-right",priority:1,file:"rajwada.webm"},{id:"left-main",priority:2,file:"11.webm"},{id:"tall-center",priority:3,file:"10e3d59f2b9830195b21206615bcadd6.webm"},{id:"portrait-left",priority:3,file:"dfbbdae03677c439c33a59d6c0f5d1c8.webm"},{id:"right-wide",priority:3,file:"9.webm"},{id:"right-large",priority:3,file:"14.webm"},{id:"large-background",priority:4,file:"night-city-cyberpunk.webm"}],C=(()=>{let x=1;return r||e?x=3:x=4,n.filter(P=>P.priority<=x).slice(0,i)})(),p=x=>C.some(E=>E.id===x);return o.jsxs("group",{children:[o.jsx(W,{id:"center",position:[0,3.5,-12],size:c,rotation:[0,0,0],backgroundColor:"#0A1F2E",gifUrl:a("22-1.webm"),opacity:1}),p("poha-front-left")&&o.jsx(W,{id:"poha-front-left",position:r?[-5,2,-10]:[-12,1.5,-8],size:[4,3],rotation:r?[0,0,0]:[0,Math.PI/8,0],backgroundColor:"#FF6B35",gifUrl:a("poha.webm"),opacity:.95,emissiveIntensity:.6}),p("rajwada-front-right")&&o.jsx(W,{id:"rajwada-front-right",position:r?[9,2,-9]:[12,1.5,-8],size:[4,3],rotation:r?[0,0,0]:[0,-Math.PI/8,0],backgroundColor:"#8B4513",gifUrl:a("rajwada.webm"),opacity:.95,emissiveIntensity:.6}),p("left-main")&&o.jsx(W,{id:"left-main",position:[-20,3,8],size:[14,8],rotation:[0,Math.PI/2,0],backgroundColor:"#2A1A4A",gifUrl:a("11.webm"),op
68acity:.8,loadDelay:600}),o.jsx(W,{id:"left-square",position:r?[-8,4,-11]:[-18,6,-4],size:[5,5],rotation:r?[0,0,0]:[0,Math.PI/2,0],backgroundColor:"#0A1F2E",gifUrl:"/company-logos/altered-security-screen.png",opacity:1,loadDelay:800,onScreenClick:()=>window.open("https://www.alteredsecurity.com","_blank","noopener,noreferrer")}),o.jsx(W,{id:"right-square",position:r?[13,4,-10]:[18,7,10],size:[4,4],rotation:r?[0,0,0]:[0,-Math.PI/2,0],backgroundColor:"#0A1F2E",gifUrl:"/company-logos/ctf7-screen.png",opacity:1,loadDelay:700,onScreenClick:()=>window.open("https://ctf7.com/","_blank","noopener,noreferrer")}),o.jsx(W,{id:"right-square-lower",position:r?[15,4,-10]:[18,3,8],size:[3,3],rotation:r?[0,0,0]:[0,-Math.PI/2,0],backgroundColor:"#0A1F2E",gifUrl:"/media/sponsors/vigilops.png",caption:"Community Support Sponsor",opacity:1,loadDelay:750,onScreenClick:()=>window.open("https://vigilops.com/","_blank","noopener,noreferrer")}),o.jsx(W,{id:"right-medium",position:r?[13,1.5,-10]:[18,3.5,-3],size:[8,5],rotation:r?[0,0,0]:[0,-Math.PI/2,0],backgroundColor:"#0A1F2E",gifUrl:"/company-logos/taxation-investment.png",opacity:1,loadDelay:900,onScreenClick:()=>window.open("https://www.linkedin.com/company/taxation-and-investment/about/","_blank","noopener,noreferrer")}),p("right-large")&&o.jsx(W,{id:"right-large",position:[35,8,8],size:[36,20],rotation:[0,-Math.PI/2,0],backgroundColor:"#1A2A3A",gifUrl:a("14.webm"),opacity:.72,loadDelay:3e3}),p("right-wide")&&o.jsx(W,{id:"right-wide",position:[22,2,-12],size:[10,3],rotation:[0,-Math.PI/2,0],backgroundColor:"#2E1A3A",gifUrl:a("9.webm"),opacity:.8,loadDelay:1200}),p("tall-center")&&o.jsx(W,{id:"tall-center",position:[-12,5,-14],size:[10,12],rotation:[0,0,0],backgroundColor:"#1A4A3A",gifUrl:a("10e3d59f2b9830195b21206615bcadd6.webm"),opacity:.75,loadDelay:1400}),p("portrait-left")&&o.jsx(W,{id:"portrait-left",position:[-6.5,3.5,-12],size:[3,9],rotation:[0,0,0],backgroundColor:"#4A1A5C",gifUrl:a("dfbbdae03677c439c33a59d6c0f5d1c8.webm"),opacity:.75,emissiveIntensity:.6,loadDelay:1600}),o.jsx(W,{id:"right-main",position:[9,3.5,-12],size:[8,5],rotation:[0,0,0],backgroundColor:"#FFFFFF",gifUrl:"/media/past-sponsors/cloudsek.webp",caption:"Lanyard Sponsor",opacity:1,loadDelay:500,onScreenClick:()=>window.open("https://cloudsek.com","_blank","noopener,noreferrer")}),p("large-background")&&o.jsx(W,{id:"large-background",position:[-41,8,-5],size:[48,27],rotation:[0,Math.PI/2,0],backgroundColor:"#1A2A3A",gifUrl:a("night-city-cyberpunk.webm"),opacity:.7,loadDelay:5e3}),p("shocked-david-martinez")&&o.jsx(W,{id:"shocked-david-martinez",position:[0,8,-35],size:[96,72],rotation:[0,0,0],backgroundColor:"#3A2A4A",gifUrl:a("shocked-david-martinez.webm"),opacity:.72,emissiveIntensity:.7,loadDelay:4e3})]})},Oe=()=>{const r=Ee("/bsindorelogo-wobg.png");return o.jsxs("mesh",{position:[0,12,-16],children:[o.jsx("planeGeometry",{args:[14,6.84]}),o.jsx("meshStandardMaterial",{map:r,transparent:!0,alphaTest:.05,side:Le,emissive:new Pe("#22d3ee"),emissiveMap:r,emissiveIntensity:.08,depthWrite:!1})]})},Ue=()=>o.jsxs(o.Fragment,{children:[o.jsx("color",{attach:"background",args:["#080c14"]}),o.jsxs("mesh",{rotation:[-Math.PI/2,0,0],position:[0,0,0],children:[o.jsx("planeGeometry",{args:[150,150]}),o.jsx("meshStandardMaterial",{color:"#1e1e2e",metalness:.4,roughness:.7})]}),o.jsx("gridHelper",{args:[100,20,"#5A6A7A","#3A4A5A"],position:[0,.02,0]}),o.jsx(Oe,{}),o.jsx(Be,{}),o.jsx("ambientLight",{intensity:1.2}),o.jsx("directionalLight",{position:[10,20,10],intensity:1.2,color:"#ffffff",castShadow:!0}),o.jsx("pointLight",{position:[0,15,0],intensity:1.5,color:"#ffffff",distance:60,decay:1.5}),o.jsx("pointLight",{position:[-20,10,0],intensity:.8,color:"#4A9FFF",distance:40,decay:2}),o.jsx("pointLight",{position:[20,10,0],intensity:.8,color:"#FF6B4A",distance:40,decay:2}),o.jsx("fog",{attach:"fog",args:["#1A1A2A",40,120]})]}),We=({locked:r=!1,lockTarget:e=null,lookAtTarget:t=null,freeMode:s=!1,isActive:i=!0})=>{const a=l.useRef(new J(0,5,10)),{camera:c}=pe(),n=z(w=>w.playerPosition),h=z(w=>w.cameraAngle),C=z(w=>w.cameraElevation),p=z(w=>w.cameraDistance),x=z(w=>w.setCameraAngle),E=z(w=>w.setCameraElevation),P=z(w=>w.setCameraDistance);z(w=>w.mouseClickRotation);const V=l.useRef(!1),N=l.useRef({x:0,y:0}),B=l.useRef(!1),F=l.useRef({x:0,y:0}),M=l.useRef(0),y=l.useRef(new Set),H=.5,Y=l.useRef(null),O=l.useRef(h),k=l.useRef(C),_=l.useRef(p);return l.useEffect(()=>{O.current=h},[h]),l.useEffect(()=>{k.current=C},[C]),l.useEffect(()=>{_.current=p},[p]),l.useEffect(()=>{if(!i||r||s)return;const w=d=>{d.button===0&&(V.current=!0,N.current={x:d.clientX,y:d.clientY})},S=()=>{V.current=!1},I=d=>{if(V.current){const u=d.clientX-N.current.x,g=d.clientY-N.current.y,j=O.current-u*.005,L=Math.max(-Math.PI/2,Math.min(Math.PI/2,j));x(L),E(k.current+g*.003),N.current={x:d.clientX,y:d.clientY}}},R=d=>{if(z.getState().activeSection)return;d.preventDefault();const u=d.deltaY*.005;P(_.current+u)},ee=d=>{if(d.touches.length===1)B.current=!0,F.current={x:d.touches[0].clientX,y:d.touches[0].clientY};else if(d.touches.length===2){const u=d.touches[0].clientX-d.touches[1].clientX,g=d.touches[0].clientY-d.touches[1].clientY;M.current=Math.sqrt(u*u+g*g)}},K=d=>
68{if(!z.getState().activeSection){if(d.preventDefault(),d.touches.length===1&&B.current){const u=d.touches[0].clientX-F.current.x,g=d.touches[0].clientY-F.current.y,j=O.current-u*.008,L=Math.max(-Math.PI/2,Math.min(Math.PI/2,j));x(L),E(k.current+g*.005),F.current={x:d.touches[0].clientX,y:d.touches[0].clientY}}else if(d.touches.length===2){const u=d.touches[0].clientX-d.touches[1].clientX,g=d.touches[0].clientY-d.touches[1].clientY,j=Math.sqrt(u*u+g*g),L=(M.current-j)*.02;P(_.current+L),M.current=j}}},q=()=>{B.current=!1};return window.addEventListener("mousedown",w),window.addEventListener("mouseup",S),window.addEventListener("mousemove",I),window.addEventListener("wheel",R,{passive:!1}),window.addEventListener("touchstart",ee,{passive:!1}),window.addEventListener("touchmove",K,{passive:!1}),window.addEventListener("touchend",q),()=>{window.removeEventListener("mousedown",w),window.removeEventListener("mouseup",S),window.removeEventListener("mousemove",I),window.removeEventListener("wheel",R),window.removeEventListener("touchstart",ee),window.removeEventListener("touchmove",K),window.removeEventListener("touchend",q)}},[i,r,s]),ge(()=>{if(s&&Y.current){const w=Y.current,S=new J,I=new J;c.getWorldDirection(S),S.y=0,S.normalize(),I.crossVectors(S,c.up).normalize();const R=new J;y.current.has("w")&&R.addScaledVector(S,H),y.current.has("s")&&R.addScaledVector(S,-H),y.current.has("a")&&R.addScaledVector(I,-H),y.current.has("d")&&R.addScaledVector(I,H),y.current.has("q")&&(R.y-=H*.5),y.current.has("e")&&(R.y+=H*.5),c.position.add(R),w.target.add(R);return}if(r&&e){c.position.lerp(new J(e[0],e[1],e[2]),.05);const w=t||[0,3.5,-12];c.lookAt(w[0],w[1],w[2])}else{const w=n[0]+Math.sin(h)*p,S=n[1]+C*p,I=n[2]+Math.cos(h)*p;c.position.lerp(new J(w,S,I),.1),c.lookAt(n[0],n[1]+1,n[2])}}),l.useEffect(()=>{if(!s)return;const w=I=>{const R=I.key.toLowerCase();["w","a","s","d","q","e"].includes(R)&&y.current.add(R)},S=I=>{const R=I.key.toLowerCase();y.current.delete(R)};return window.addEventListener("keydown",w),window.addEventListener("keyup",S),()=>{window.removeEventListener("keydown",w),window.removeEventListener("keyup",S),y.current.clear()}},[s]),l.useEffect(()=>{!s&&c&&c.position.copy(a.current)},[s,c]),s?o.jsx(Te,{ref:Y,enableDamping:!0,dampingFactor:.05}):null},Ve="WASD to move · Mouse to look · Click screens to explore",He=({showWelcomeTip:r=!0})=>{const{isMobile:e}=ye(),[t,s]=l.useState(!0);return l.useEffect(()=>{const i=setTimeout(()=>s(!1),5e3);return()=>clearTimeout(i)},[]),ce.createPortal(o.jsxs("div",{className:"fixed inset-0 pointer-events-none z-[599]",children:[t&&r&&!e&&o.jsx("div",{className:"absolute top-20 left-1/2 transform -translate-x-1/2 pointer-events-none",children:o.jsx("div",{className:"bg-black/70 border border-cyan-400/40 rounded px-4 py-2",children:o.jsx("span",{className:"text-cyan-400/80 text-xs font-mono tracking-widest",children:Ve})})}),o.jsx(Re,{}),o.jsx("div",{className:"absolute inset-0 pointer-events-none opacity-10",children:o.jsx("div",{className:"w-full h-full",style:{backgroundImage:"repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(216,90,60,0.1) 2px, rgba(216,90,60,0.1) 4px)"}})})]}),document.body)},Xe=({text:r,show:e,duration:t=2e3})=>{const[s,i]=l.useState(!1);return l.useEffect(()=>{if(e){i(!0);const a=setTimeout(()=>{i(!1)},t);return()=>clearTimeout(a)}},[e,t]),s?o.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center pointer-events-none",children:[o.jsx("div",{className:"text-4xl font-black text-white tracking-widest uppercase animate-pulse",style:{fontFamily:'Impact, "Arial Black", sans-serif',textShadow:"0 0 20px rgba(255,255,255,0.8)",animation:"fadeInOut 2s ease-in-out"},children:r}),o.jsx("style",{children:`
69        @keyframes fadeInOut {
70          0% { opacity: 0; transform: scale(0.8); }
71          20% { opacity: 1; transform: scale(1); }
72          80% { opacity: 1; transform: scale(1); }
73          100% { opacity: 0; transform: scale(1.1); }
74        }
75      `})]}):null},Ye=({progress:r,stage:e,isVisible:t})=>{const[s,i]=l.useState("");return l.useEffect(()=>{const a=setInterval(()=>{i(c=>c.length>=3?"":c+".")},500);return()=>clearInterval(a)},[]),t?o.jsxs("div",{className:"fixed inset-0 bg-black z-50 flex items-center justify-center",children:[o.jsxs("div",{className:"text-center max-w-md mx-auto px-6",children:[o.jsxs("div",{className:"mb-8",children:[o.jsx("h1",{className:"text-4xl md:text-6xl font-black text-cyan-400 mb-2 tracking-wider",children:"BSIDES"}),o.jsx("h2",{className:"text-2xl md:text-3xl font-black text-white tracking-widest",children:"INDORE"})]}),o.jsxs("div",{className:"mb-6",children:[o.jsx("div",{className:"w-full bg-gray-800 rounded-full h-3 mb-2 overflow-hidden",children:o.jsx("div",{className:"h-full bg-gradient-to-r from-cyan-500 to-cyan-300 rounded-full transition-all duration-300 ease-out relative",style:{width:`${Math.max(5,r)}%`},children:o.jsx("div",{className:"absolute inset-0 bg-white/20 animate-pulse"})})}),o.jsxs("div",{className:"text-cyan-400 text-sm font-mono",children:[Math.round(r),"% COMPLETE"]})]}),o.jsxs("div",{className:"text-white font-mono text-lg mb-4",children:[o.jsx("span",{className:"text-cyan-400",children:">"})," ",e,s]}),o.jsx("div",{className:"flex justify-center space-x-1 mb-6",children:[...Array(8)].map((a,c)=>o.jsx("div",{className:"w-1 bg-cyan-400 animate-pulse",style:{height:`${Math.random()*20+10}px`,animationDelay:`${c*.1}s`,animationDuration:"1s"}},c))}),o.jsxs("div",{className:"text-gray-400 text-sm font-mono",children:[o.jsx("p",{children:"// INITIALIZING CYBER MATRIX"}),o.jsx("p",{children:"// LOADING 3D ASSETS & SHADERS"}),o.jsx("p",{children:"// PREPARING VIRTUAL ENVIRONMENT"})]})]}),o.jsx("div",{className:"absolute inset-0 pointer-events-none opacity-20",children:o.jsx("div",{className:"w-full h-full",style:{backgroundImage:"repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,255,255,0.1) 2px, rgba(0,255,255,0.1) 4px)"}})})]}):null};class Ge{constructor(){v(this,"loadedAssets",new Set);v(this,"loadingAssets",new Map);v(this,"instantAssets",[]);v(this,"criticalAssets",[]);v(this,"deferredAssets",[]);v(this,"deviceCapabilities");this.detectDeviceCapabilities(),this.initializeAssetPriorities()}detectDeviceCapabilities(){const e=/Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),t=navigator.deviceMemory||4,s=navigator.hardwareConcurrency||4,i=navigator.connection;this.deviceCapabilities={isMobile:e,isLowEnd:t<=2||s<=2||e,isVeryLowEnd:t<=1||s<=1,isSlowConnection:i?.effectiveType==="2g"||i?.effectiveType==="slow-2g"||i?.saveData,memory:t,cores:s}}initializeAssetPriorities(){const{isMobile:e,isLowEnd:t,isVeryLowEnd:s}=this.deviceCapabilities;this.instantAssets=[{url:"./bsindorelogo-wobg.png",priority:"instant",type:"image",size:"small"}],this.criticalAssets=e||t||s?[]:[{url:"./webmdown/22-1.webm",priority:"critical",type:"video",size:"medium"},{url:"./webmdown/6.webm",priority:"critical",type:"video",size:"small"}],s?this.deferredAssets=[{url:"./webmdown/11.webm",priority:"high",type:"video",size:"small"},{url:"./webmdown/15.webm",priority:"high",type:"video",size:"small"}]:t||e?this.deferredAssets=[{url:"./webmdown/11.webm",priority:"high",type:"video",size:"small"},{url:"./webmdown/15.webm",priority:"high",type:"video",size:"small"},{url:"./webmdown/14.webm",priority:"medium",type:"video",size:"medium"},{url:"./webmdown/9.webm",priority:"medium",type:"video",size:"small"},{url:"./webmdown/poha.webm",priority:"low",type:"video",size:"small"},{url:"./webmdown/rajwada.webm",priority:"low",type:"video",size:"small"}]:this.deferredAssets=[{url:"./webmdown/11.webm",priority:"high",type:"video",size:"small"},{url:"./webmdown/15.webm",priority:"high",type:"video",size:"small"},{url:"./webmdown/14.webm",priority:"high",type:"video",size:"medium"},{url:"./webmdown/9.webm",priority:"high",type:"video",size:"small"},{url:"./webmdown/icegif-2.webm",priority:"medium",type:"video",size:"medium"},{url:"./webmdown/night-city-cyberpunk.webm",priority:"medium",type:"video",size:"medium"},{url:"./webmdown/dfbbdae03677c439c33a59d6c0f5d1c8.webm",priority:"medium",type:"video",size:"small"},{url:"./webmdown/10e3d59f2b9830195b21206615bcadd6.webm",priority:"medium",type:"video",size:"small"},{url:"./webmdown/poha.webm",priority:"low",type:"video",size:"small"},{url:"./webmdown/rajwada.webm",priority:"low",type:"video",size:"small"}]}async preloadInstantAssets(){const e=performance.now(),t=this.instantAssets.map(s=>this.loadAsset(s,!0,300));try{await Promise.allSettled(t);const s=performance.now()-e}catch{}}async preloadCriticalAssets(){const e=performance.now();await this.preloadInstantAssets();const t=this.criticalAssets.map(s=>this.loadAsset(s,!0,800));try{const s=await Promise.allSettled(t),i=s.filter(n=>n.status==="fulfilled").length,a=s.filter(n=>n.status==="rejected").length,c=performance.now()-e;window.criticalAssetsReady=!0}catch{window.criticalAssetsReady=!0}}startDeferredLoading(){if(this.deviceCapabilities.isVeryLowEnd||this.deviceCapabilities.isSlowConnection)return;const e=this.deferredAssets.filter(i=>i.priority==="high"),t=this.deferredAssets.filter(i=>i.priority==="medium"),s=this.deferredAssets.filter(i=>i.priority==="low");setTimeout(()=>this.loadAssetBatch(e,"high"),1e3),setTimeout(()=>this.loadAssetBatch(t,"medium"),3e3),setTimeout(()=>this.loadAssetBatch(s,"low"),8e3)}async loadAssetBatch(e,t){const{isMobile:s,isLowEnd:i}=this.deviceCapabilities,a=i||s?1:t==="high"?2:1,c=i?1e3:s?800:t==="high"?400:600;for(let n=0;n<e.length;n+=a){const C=e.slice(n,n+a).map(p=>this.loadAsset(p,!1));try{await Promise.allSettled(C),n+a<e.length&&await new Promise(p=>setTimeout(p,c))}catch{}}}async loadAsset(e,t,s){if(this.loadedAssets.has(e.url))return;if(this.loadingAssets.has(e.url))return this.loadingAssets.get(e.url);const i=this.performAssetLoad(e,t,s);this.loadingAssets.set(e.url,i);try{await i,this.loadedAssets.add(e.url),this.loadingAssets.delete(e.url)}catch(a){if(this.loadingAssets.delete(e.url),t)return;throw a}}async performAssetLoad(e,t,s){return new Promise((i,a)=>{const c=s||(t?2e3:15e3);if(e.type==="video"){const n=document.createElement("video");
75n.src=e.url,n.crossOrigin="anonymous",n.muted=!0,n.playsInline=!0,n.preload=t?"metadata":"none";const{isLowEnd:h,isMobile:C}=this.deviceCapabilities;e.size==="small"||h?(n.width=320,n.height=240):e.size==="medium"||C?(n.width=640,n.height=480):(n.width=854,n.height=480);const p=()=>{n.removeEventListener("loadedmetadata",x),n.removeEventListener("error",E)},x=()=>{p(),t&&typeof window.assetsLoaded<"u"&&(window.assetsLoaded=(window.assetsLoaded||0)+1),i()},E=()=>{p(),t?i():a(new Error(`Failed to load video: ${e.url}`))};n.addEventListener("loadedmetadata",x),n.addEventListener("error",E),setTimeout(()=>{this.loadedAssets.has(e.url)||(p(),t?i():a(new Error(`Timeout loading: ${e.url}`)))},c)}else if(e.type==="image"){const n=new Image;n.crossOrigin="anonymous";const h=()=>{n.onload=null,n.onerror=null};n.onload=()=>{h(),t&&typeof window.assetsLoaded<"u"&&(window.assetsLoaded=(window.assetsLoaded||0)+1),i()},n.onerror=()=>{h(),t?i():a(new Error(`Failed to load image: ${e.url}`))},n.src=e.url,setTimeout(()=>{this.loadedAssets.has(e.url)||(h(),t?i():a(new Error(`Timeout loading: ${e.url}`)))},c)}})}isAssetLoaded(e){return this.loadedAssets.has(e)}getCriticalLoadingProgress(){const e=this.instantAssets.length+this.criticalAssets.length,s=this.instantAssets.concat(this.criticalAssets).filter(i=>this.loadedAssets.has(i.url)).length/e*100;return Math.min(s,100)}getTotalLoadingProgress(){const e=this.instantAssets.length+this.criticalAssets.length+this.deferredAssets.length,s=this.instantAssets.concat(this.criticalAssets,this.deferredAssets).filter(i=>this.loadedAssets.has(i.url)).length/e*100;return Math.min(s,100)}}const oe=new Ge;typeof window<"u"&&(window.assetPreloader=oe);class _e{constructor(){v(this,"metrics",{loadingStartTime:0,assetsLoadedCount:0,totalAssets:6,worldInitialized:!1,canvasReady:!1,firstFrameRendered:!1});v(this,"milestones",[])}startLoading(){this.metrics.loadingStartTime=performance.now(),this.addMilestone("Loading Started")}addMilestone(e){const t=performance.now();this.milestones.push({name:e,time:t}),this.metrics.loadingStartTime>0&&t-this.metrics.loadingStartTime}trackAssetLoaded(e){this.metrics.assetsLoadedCount++,this.metrics.assetsLoadedCount/this.metrics.totalAssets*100}markWorldInitialized(){this.metrics.worldInitialized=!0,this.addMilestone("3D World Initialized")}markCanvasReady(){this.metrics.canvasReady=!0,this.addMilestone("Canvas Ready")}markFirstFrameRendered(){this.metrics.firstFrameRendered=!0,this.addMilestone("First Frame Rendered"),this.generateReport()}isFullyLoaded(){const e=Math.min(this.metrics.totalAssets*.8,5);return this.metrics.assetsLoadedCount>=e&&this.metrics.worldInitialized&&this.metrics.canvasReady&&this.metrics.firstFrameRendered}getLoadingProgress(){const e=this.metrics.assetsLoadedCount/this.metrics.totalAssets*50,t=this.metrics.worldInitialized?30:0,s=this.metrics.canvasReady?20:0;return Math.min(100,e+t+s)}generateReport(){performance.now()-this.metrics.loadingStartTime,this.milestones.forEach((e,t)=>{e.time-this.metrics.loadingStartTime,t>0&&e.time-this.milestones[t-1].time})}getDeviceCapabilities(){const e=navigator.deviceMemory||4,t=navigator.hardwareConcurrency||4,s=/Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);let i="medium";return s||e<=2||t<=2?i="low":e>=8&&t>=8&&(i="high"),{memory:e,cores:t,isMobile:s,tier:i,recommendations:{maxScreens:i==="low"?8:i==="medium"?15:21,videoQuality:i==="low"?"low":i==="medium"?"medium":"high",enableReflections:i!=="low",enableShadows:i==="high",pixelRatio:i==="low"?1:i==="medium"?1.5:2}}}}const $=new _e;typeof window<"u"&&(window.performanceMonitor=$);const me="bsi-assets-cached",qe=()=>{const r=localStorage.getItem(me)==="1",[e,t]=l.useState({preloadProgress:r?100:0,assetsReady:r,canTransition:r,isCachedVisit:r}),[s,i]=l.useState(!1);l.useEffect(()=>{let n=!0,h;return(async()=>{$.startLoading(),h=setInterval(()=>{if(!n)return;const p=Math.min(Math.round(oe.getCriticalLoadingProgress()),100);t(x=>({...x,preloadProgress:p,canTransition:x.canTransition||p>=60}))},50);try{await oe.preloadCriticalAssets(),n&&(t({preloadProgress:100,assetsReady:!0,canTransition:!0,isCachedVisit:r}),$.addMilestone("Critical Assets Ready"),localStorage.setItem(me,"1"))}catch{n&&t({preloadProgress:80,assetsReady:!0,canTransition:!0,isCachedVisit:r})}})(),()=>{n=!1,h&&clearInterval(h)}},[]);const a=l.useCallback(n=>{if(e.canTransition||e.assetsReady)setTimeout(n,50);else{const h=()=>{e.canTransition||e.assetsReady?n():setTimeout(h,25)};setTimeout(()=>{n()},1e3),h()}},[e.canTransition,e.assetsReady]),c=l.useCallback(()=>{s||(i(!0),oe.startDeferredLoading())},[s]);return{...e,triggerTransition:a,startDeferredLoading:c}},Je=()=>{const r=navigator.userAgent,e=/Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(r),t="ontouchstart"in window||navigator.maxTouchPoints>0,s=window.innerWidth<768,i=s,a=e||t&&s,c=document.createElement("canvas"),n=c.getContext("webgl2")||c.getContext("webgl"),h=!!c.getContext("webgl2");let C=2048;n&&(C=n.getParameter(n.MAX_TEXTURE_SIZE));const p=navigator.deviceMemory||4,x=navigator.hardwareConcurrency||4,E=window.devicePixelRatio||1,V=navigator.connection?.effectiveType||"unknown";return{isMobile:i,isActualMobile:a,supportsWebGL2:h,maxTextureSize:C,availableMemory:p,hardwareConcurrency:x,devicePixelRatio:E,touchSupport:t,orientationSupport:"orientation"in window,connectionType:V}};class Ke{constructor(e){v(this,"config");
75v(this,"deviceCapabilities");v(this,"performanceMetrics");this.config={enableTouchSanitization:!0,enableFallbackMode:!0,performanceThresholds:{maxResponseTime:100,minFrameRate:30,maxMemoryUsage:512,thermalThrottleTemp:80},debugMode:!0,...e},this.deviceCapabilities=Je(),this.performanceMetrics={frameRate:60,memoryUsage:0,touchResponseTime:0,lastFrameTime:performance.now()},this.logDeviceInfo()}logDeviceInfo(){this.config.debugMode}measureFrameRate(){const e=performance.now(),t=e-this.performanceMetrics.lastFrameTime;return this.performanceMetrics.lastFrameTime=e,t>0&&(this.performanceMetrics.frameRate=1e3/t),this.performanceMetrics.frameRate}measureTouchResponse(e){const t=performance.now()-e;return this.performanceMetrics.touchResponseTime=t,t>this.config.performanceThresholds.maxResponseTime&&this.logPerformanceIssue("Touch response time exceeded",{responseTime:t,threshold:this.config.performanceThresholds.maxResponseTime}),t}checkMemoryUsage(){if("memory"in performance){const e=performance.memory;this.performanceMetrics.memoryUsage=e.usedJSHeapSize/(1024*1024),this.performanceMetrics.memoryUsage>this.config.performanceThresholds.maxMemoryUsage&&this.logPerformanceIssue("Memory usage exceeded",{memoryUsage:this.performanceMetrics.memoryUsage,threshold:this.config.performanceThresholds.maxMemoryUsage})}return this.performanceMetrics.memoryUsage}logPerformanceIssue(e,t){this.config.debugMode}getDeviceCapabilities(){return this.deviceCapabilities}getPerformanceMetrics(){return{...this.performanceMetrics,deviceCapabilities:this.deviceCapabilities}}}const ae=new Ke,Ze=(r,e,t)=>({errorType:r,timestamp:Date.now(),deviceInfo:ae.getDeviceCapabilities(),stackTrace:e.stack||e.message,userAgent:navigator.userAgent,additionalContext:t||{}});class Qe{constructor(e=!0){v(this,"state");v(this,"eventListeners");v(this,"lastTouchTime",0);v(this,"touchStartDistance",0);v(this,"debugMode");v(this,"worldActive",!0);this.debugMode=e,this.state={isActive:!1,lastPosition:{x:0,y:0},gestureType:"none",touchStartTime:0,touchCount:0},this.eventListeners=new Map,this.initialize()}initialize(){if(this.debugMode,!ae.getDeviceCapabilities().touchSupport){this.debugMode;return}this.setupTouchEventListeners()}setupTouchEventListeners(){const e=i=>this.handleTouchStart(i),t=i=>this.handleTouchMove(i),s=i=>this.handleTouchEnd(i);this.eventListeners.set("touchstart",[e]),this.eventListeners.set("touchmove",[t]),this.eventListeners.set("touchend",[s]),document.addEventListener("touchstart",e,{passive:!1}),document.addEventListener("touchmove",t,{passive:!1}),document.addEventListener("touchend",s,{passive:!1}),this.debugMode}handleTouchStart(e){const t=performance.now();if(this.state.touchStartTime=t,this.state.isActive=!0,this.state.touchCount=e.touches.length,e.touches.length===1){const s=e.touches[0];this.state.lastPosition={x:s.clientX,y:s.clientY},this.state.gestureType="tap",this.debugMode}else if(e.touches.length===2){const s=e.touches[0],i=e.touches[1],a=s.clientX-i.clientX,c=s.clientY-i.clientY;this.touchStartDistance=Math.sqrt(a*a+c*c),this.state.gestureType="pinch",this.debugMode}}setWorldActive(e){this.worldActive=e}handleTouchMove(e){if(this.state.isActive&&this.worldActive){if(e.preventDefault(),e.touches.length===1&&this.state.gestureType!=="pinch"){const t=e.touches[0],s=Math.abs(t.clientX-this.state.lastPosition.x),i=Math.abs(t.clientY-this.state.lastPosition.y);(s>5||i>5)&&(this.state.gestureType="pan"),this.state.lastPosition={x:t.clientX,y:t.clientY}}else if(e.touches.length===2){const t=e.touches[0],s=e.touches[1],i=t.clientX-s.clientX,a=t.clientY-s.clientY,n=Math.sqrt(i*i+a*a)-this.touchStartDistance;this.debugMode&&Math.abs(n)>10}}}handleTouchEnd(e){if(!this.state.isActive)return;performance.now()-this.state.touchStartTime,ae.measureTouchResponse(this.state.touchStartTime),this.debugMode,this.state.isActive=!1,this.state.gestureType="none",this.state.touchCount=0}sanitizeTouch(e){try{const t=[],s=[];for(let i=0;i<e.touches.length;i++){const a=e.touches[i];this.isValidTouchCoordinate(a.clientX,a.clientY)?(t.push(a),s.push({x:a.clientX,y:a.clientY})):this.debugMode}return{originalEvent:e,sanitizedTouches:t,coordinates:s,isValid:t.length>0,gestureType:this.state.gestureType}}catch(t){return Ze("TOUCH_INPUT_FAILURE",t,{event:e}),{originalEvent:e,sanitizedTouches:[],coordinates:[],isValid:!1,gestureType:"none"}}}isValidTouchCoordinate(e,t){const s={width:window.innerWidth,height:window.innerHeight};return e>=0&&e<=s.width&&t>=0&&t<=s.height&&!isNaN(e)&&!isNaN(t)&&isFinite(e)&&isFinite(t)}
75handleMultiTouch(e){return e.length>2?(this.debugMode,!1):!0}getTouchState(){return{...this.state}}cleanup(){this.debugMode,this.eventListeners.forEach((e,t)=>{e.forEach(s=>{document.removeEventListener(t,s)})}),this.state={isActive:!1,lastPosition:{x:0,y:0},gestureType:"none",touchStartTime:0,touchCount:0},this.eventListeners.clear()}}const fe=new Qe;class et{constructor(){v(this,"portalRoot",null);v(this,"activePortals",new Map);v(this,"config");this.config={scrollButtonStyle:{borderColor:"#00FFFF",backgroundColor:"rgba(0, 0, 0, 0.8)",glowShadow:"0 0 20px rgba(0, 255, 255, 0.6), inset 0 0 10px rgba(0, 255, 255, 0.1)"},portalSettings:{zIndex:9999,position:"fixed",isolation:!0},responsiveBreakpoints:{mobile:768,tablet:1024,desktop:1200}},this.initializePortalRoot()}initializePortalRoot(){this.portalRoot=document.getElementById("mobile-ui-portal"),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.id="mobile-ui-portal",this.portalRoot.style.cssText=`
76        position: fixed;
77        top: 0;
78        left: 0;
79        width: 100%;
80        height: 100%;
81        pointer-events: none;
82        z-index: ${this.config.portalSettings.zIndex};
83      `,document.body.appendChild(this.portalRoot))}createPortalElement(e,t){this.portalRoot||this.initializePortalRoot();let s=this.activePortals.get(e);return s||(s=document.createElement("div"),s.id=`mobile-portal-${e}`,s.style.cssText=`
84        position: absolute;
85        pointer-events: auto;
86        z-index: ${this.config.portalSettings.zIndex+1};
87      `,this.portalRoot.appendChild(s),this.activePortals.set(e,s)),ce.createPortal(t,s)}removePortalElement(e){const t=this.activePortals.get(e);t&&this.portalRoot&&(this.portalRoot.removeChild(t),this.activePortals.delete(e))}applyMobileStyles(e){window.innerWidth<this.config.responsiveBreakpoints.mobile&&(e.style.border=`2px solid ${this.config.scrollButtonStyle.borderColor}`,e.style.backgroundColor=this.config.scrollButtonStyle.backgroundColor,e.style.boxShadow=this.config.scrollButtonStyle.glowShadow,e.style.backdropFilter="blur(4px)")}manageMobileScrollButtons(){}handleViewportChanges(){const e=()=>{const t=window.innerWidth<this.config.responsiveBreakpoints.mobile;this.portalRoot&&(this.portalRoot.style.display="block"),this.activePortals.forEach((s,i)=>{const a=new CustomEvent("viewportChange",{detail:{isMobile:t,width:window.innerWidth,height:window.innerHeight}});s.dispatchEvent(a)})};window.addEventListener("resize",e),window.addEventListener("orientationchange",e),e()}cleanup(){this.activePortals.forEach((e,t)=>{this.removePortalElement(t)}),this.portalRoot&&document.body.contains(this.portalRoot)&&(document.body.removeChild(this.portalRoot),this.portalRoot=null)}isMobile(){return window.innerWidth<this.config.responsiveBreakpoints.mobile}isTablet(){const e=window.innerWidth;return e>=this.config.responsiveBreakpoints.mobile&&e<this.config.responsiveBreakpoints.desktop}getDeviceType(){const e=window.innerWidth;return e<this.config.responsiveBreakpoints.mobile?"mobile":e<this.config.responsiveBreakpoints.desktop?"tablet":"desktop"}}const we=new et;typeof window<"u"&&we.handleViewportChanges();const tt=()=>{const r=z(i=>i.setMemoryPressure),e=z(i=>i.worldIsActive),t=l.useRef(0),s=l.useRef(0);return l.useEffect(()=>{if(!e){r("normal"),t.current=0,s.current=0;return}s.current=Date.now();const i=setInterval(()=>{const a=(Date.now()-s.current)/6e4;let c="normal";if(a>5?c="critical":a>2&&(c="elevated"),"memory"in performance){const C=performance.memory.usedJSHeapSize/1048576,p=t.current;if(p>0){const x=(C-p)/15*60;x>150?c="critical":x>50&&c!=="critical"&&(c="elevated")}t.current=C}const n={normal:0,elevated:1,critical:2};z.setState(h=>n[c]>n[h.memoryPressure]?{memoryPressure:c}:{})},15e3);return()=>clearInterval(i)},[e,r]),null},ct=({isActive:r=!0})=>{const e=l.useRef(null),[t,s]=Ae(),[i,a]=l.useState(!0),[c,n]=l.useState(!1),[h,C]=l.useState(null),[p,x]=l.useState(null),[E,P]=l.useState(null),[V,N]=l.useState(""),[B,F]=l.useState(!1),[M]=l.useState(!1),[y]=l.useState(100),[H]=l.useState("READY"),[Y,O]=l.useState(!1),{isMobile:k,isTablet:_}=ye(),{setIsLoaded:w,setThreeJsReady:S,setExperienceStarted:I,setWorldIsActive:R}=z(),{assetsReady:ee,preloadProgress:K,isCachedVisit:q,startDeferredLoading:d}=qe(),[u,g]=l.useState(!1);l.useEffect(()=>{I(!0),$.addMilestone("Experience Started"),$.markWorldInitialized()},[]),l.useEffect(()=>{!i||u||(g(!0),d())},[i,u,d]),l.useEffect(()=>($.startLoading(),w(!0),S(!0),$.markFirstFrameRendered(),()=>{k&&(fe.cleanup(),we.cleanup())}),[w,k]),l.useEffect(()=>{if(!M){const f=setTimeout(()=>{S(!0),$.markCanvasReady()},1e3);return()=>clearTimeout(f)}},[M,S]),l.useEffect(()=>{if(R(r&&E===null),!r){P(null),n(!1),C(null),x(null);return}P(null),n(!1),C(null),x(null)},[r,E]),l.useEffect(()=>{t.get("about")==="true"?(a(!0),j(!0),s({})):t.get("team")==="true"?(a(!0),U(!0),s({})):t.get("community")==="true"?(a(!0),D(!0),s({})):t.get("events")==="true"?(a(!0),L(!0),s({})):t.get("contact")==="true"&&(a(!0),b(!0),s({}))},[t,s]);const j=(f=!1)=>{f||(N("ENTERING ABOUT SECTION..."),F(!0)),n(!1),P("about"),I(!0),$.addMilestone("About Section Entered")},L=(f=!1)=>{f||(N("LOADING EVENTS DATA..."),F(!0)),n(!1),P("events"),I(!0),$.addMilestone("Events Section Entered")},U=(f=!1)=>{f||(N("ENTERING CORE TEAM ROOM..."),F(!0)),n(!1),P("team"),I(!0),$.addMilestone("Team Section Entered")},D=(f=!1)=>{f||(N("ACCESSING COMMUNITY WALL..."),F(!0)),n(!1),P("community"),I(!0),$.addMilestone("Community Section Entered")},b=(f=!1)=>{f||(N("OPENING CONTACT INTERFACE..."),F(!0)),n(!1),P("contact"),I(!0),$.addMilestone("Contact Section Entered")},m=()=>{N("RETURNING TO HOME..."),F(!0),n(!1),C(null),x(null),P(null),$.addMilestone("Returned to Home")};return l.useEffect(()=>{const f=T=>{if(!(document.activeElement?.tagName==="INPUT"||document.activeElement?.tagName==="TEXTAREA"))switch(T.key){case"1":j();break;case"2":U();break;case"3":D();break;case"4":L();break;case"5":b();break;case"h":case"H":m();break;case"Escape":m();break}};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[]),l.useEffect(()=>{fe.setWorldActive(r)},[r]),l.useEffect(()=>{if(r){if(document.body.style.overflow="hidden",document.body.style.touchAction="none",document.documentElement.style.overflow="hidden",document.documentElement.style.touchAction="none",k){document.body.style.position="fixed",document.body.style.width="100%",document.body.style.height="100%";let f=document.querySelector('meta[name="viewport"]');f||(f=document.createElement("meta"),f.setAttribute("name","viewport"),document.head.appendChild(f)),f.setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no")}return()=>{document.body.style.overflow="",document.body.style.touchAction="",document.body.style.position="",document.body.style.width="",document.body.style.height="",document.documentElement.style.overflow="",document.documentElement.style.touchAction=""}}},[k,r]),l.useEffect(()=>{const f=r?"auto":"none",T=e.current;T&&(T.style.pointerEvents=f,T.parentElement&&(T.parentElement.style.pointerEvents=f));const A=document.querySelector("#root canvas");A&&(A.style.pointerEvents=f,A.parentElement&&(A.parentElement.style.pointerEvents=f));const X=document.getElementById("scene-debugger");X&&(X.style.display=r?"":"none")},[r]),l.useEffect(()=>{if(!r)return;const f=T=>{const A=e.current;A&&(A.style.pointerEvents=T,A.parentElement&&(A.parentElement.style.pointerEvents=T));const X=document.querySelector("#root canvas");X&&(X.style.pointerEvents=T,X.parentElement&&(X.parentElement.style.pointerEvents=T))};E?(f("none"),document.body.style.touchAction="pan-y",document.documentElement.style.touchAction="pan-y",document.body.style.position="",document.body.style.height="",document.body.style.overflow="",document.documentElement.style.overflow=""):(f("auto"),document.body.style.touchAction="none",document.documentElement.style.touchAction="none",k&&(document.body.style.position="fixed",document.body.style.width="100%",document.body.style.height="100%"),document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden")},[E,r,k]),o.jsxs("div",{style:{width:"100%",height:"100vh",backgroundColor:"#000",overflow:"hidden",position:"fixed",top:0,left:0,touchAction:r&&!E?"none":"auto"},children:[o.jsx(Ye,{progress:y,stage:H,isVisible:M}),o.jsx(Me,{camera:{position:k?[0,4,8]:[0,5,10],fov:k?85:75},shadows:!k,gl:{antialias:!k,alpha:!1,powerPreference:"high-performance",stencil:!1,depth:!0},dpr:k?[1,1.5]:[1,2],performance:{min:.5},frameloop:r&&!E?"always":"never",style:{pointerEvents:r&&!E?"auto":"none",background:"#080c14"},onCreated:({scene:f,gl:T})=>
87{if(T.setClearColor("#080c14",1),e.current=T.domElement,T.domElement.style.pointerEvents=r?"auto":"none",!r){const A=document.getElementById("scene-debugger");A&&(A.style.display="none")}T.setPixelRatio(k?Math.min(window.devicePixelRatio,1.5):Math.min(window.devicePixelRatio,2)),T.outputColorSpace="srgb",k&&(T.setSize(window.innerWidth,window.innerHeight,!1),T.shadowMap.enabled=!1),setTimeout(()=>{$.trackAssetLoaded("3D Scene"),$.trackAssetLoaded("WebGL Context"),setTimeout(()=>{O(!0)},200)},100)},children:o.jsxs(l.Suspense,{fallback:null,children:[o.jsx(We,{locked:c,lockTarget:h,lookAtTarget:p,isActive:r}),o.jsx(tt,{}),o.jsx(Ue,{})]})}),E&&i&&ce.createPortal(o.jsxs("div",{className:"bsi-section-overlay",style:{position:"fixed",inset:0,zIndex:500,background:"#080c14",overflowY:"auto",touchAction:"pan-y",WebkitOverflowScrolling:"touch"},children:[o.jsx("div",{style:{position:"fixed",inset:0,zIndex:0,pointerEvents:"none",backgroundImage:"linear-gradient(rgba(34,211,238,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(34,211,238,0.04) 1px, transparent 1px)",backgroundSize:"56px 56px"}}),o.jsxs("div",{style:{position:"relative",zIndex:1,paddingTop:"5rem"},children:[E==="about"&&o.jsx(je,{}),E==="team"&&o.jsx(De,{}),E==="community"&&o.jsx(ze,{}),E==="events"&&o.jsx(Fe,{}),E==="contact"&&o.jsx(Ne,{})]})]},E),document.body),i&&r&&o.jsx(He,{onAboutClick:j,onTeamClick:U,onCommunityClick:D,onEventsClick:L,onContactClick:b,onHomeClick:m}),o.jsx(Xe,{text:V,show:B,duration:2e3})]})};export{ct as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.