PageSourceSearch

https://skyflo.ai/_next/static/chunks/9015.9861b48c312a2ada.js

js skyflo.ai collected 2026-10-04 12:37:48 UTC 40,346 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9015],{19015:(e,t,a)=>{a.r(t),a.d(t,{default:()=>Q});var n=a(95155),o=a(12115),r=a(85339),l=a(47047),i=a(30258),s=a(17224),u=a(5661),c=a(6164),h=a(67475);let f=e=>{let t=Math.min(1,Math.max(0,e));return t*t*t*(t*(6*t-15)+10)},p=-(-1.8*Math.tan(-.3)),m=Math.tan(.15)*(.29552020666133955*p+-1.7196056804260909),d=[{z:-.3,scale:1.045,opacity:.76,color:"#123b68",emissive:"#0d5794",emissiveIntensity:.22,patternGain:.46,hoverRetreat:.018},{z:-.53,scale:1.09,opacity:.52,color:"#0c294f",emissive:"#0b3e72",emissiveIntensity:.16,patternGain:.24,hoverRetreat:.032},{z:-.77,scale:1.135,opacity:.32,color:"#081931",emissive:"#092e59",emissiveIntensity:.12,patternGain:.11,hoverRetreat:.046}],v=new r.Pq0(-.66,.52,.54).normalize(),g={rimTop:"#8be8ff",rimBottom:"#4b82f0",faceTop:"#3ab8e7",faceBottom:"#285bc5",spillTop:"#68d8ff",spillBottom:"#4a78ee",core:"#42b6f2",cool:"#173f7f"},w={violet:"#8168ff",blue:"#29b8ff",core:"#b9a8ff"};function y(e){return e.transparent=!0,e.depthWrite=!1,e.blending=r.bCz,e.blendEquation=r.gO9,e.blendSrc=r.qad,e.blendDst=r.qad,e.blendEquationAlpha=r.gO9,e.blendSrcAlpha=r.qad,e.blendDstAlpha=r.qad,e}function x(e,t){e.onBeforeCompile=e=>{Object.assign(e.uniforms,t),e.vertexShader=e.vertexShader.replace("#include <common>","#include <common>\nvarying vec3 vHeroPos;\nvarying vec3 vHeroNormal;").replace("#include <beginnormal_vertex>","#include <beginnormal_vertex>\nvHeroNormal = normalize(mat3(modelMatrix) * objectNormal);").replace("#include <begin_vertex>","#include <begin_vertex>\nvHeroPos = (modelMatrix * vec4(transformed, 1.0)).xyz;"),e.fragmentShader=e.fragmentShader.replace("#include <common>","#include <common>\nuniform vec3 uRimTop;\nuniform vec3 uRimBottom;\nuniform vec3 uSheenColor;\nuniform vec3 uFaceTop;\nuniform vec3 uFaceBottom;\nuniform vec3 uRimDir;\nuniform float uRimGain;\nuniform float uFaceGain;\nuniform float uSweepY;\nuniform float uSweepGain;\nuniform vec3 uPatternColor;\nuniform vec3 uPatternWash;\nuniform float uPatternDepthGain;\nuniform vec3 uPatternHoverOrigin;\nuniform float uPatternHoverGain;\nuniform float uPatternPulseGain;\nuniform float uPatternAutoReveal;\nuniform float uRageOuter;\nuniform float uRageCore;\nuniform float uRagePulse;\nuniform vec3 uRageViolet;\nuniform vec3 uRageBlue;\nuniform vec3 uPatternBfsOrigins[25];\nuniform float uPatternBfsSteps[25];\nuniform float uPatternBfsGains[25];\nuniform float uPatternBfsTimes[25];\nvarying vec3 vHeroPos;\nvarying vec3 vHeroNormal;\nfloat heroHash21(vec2 p) {\n  p = fract(p * vec2(127.13, 311.71));\n  p += dot(p, p + 41.32);\n  return fract(p.x * p.y);\n}\nvec2 heroBfsWave(\n  vec2 hexPoint,\n  vec2 hexCenter,\n  vec2 hexSize,\n  float cellSeed,\n  vec3 origin,\n  float bfsStep,\n  float bfsGain,\n  float bfsTime\n) {\n  vec2 bfsPoint = origin.xy * 7.2;\n  vec2 bfsA = mod(bfsPoint, hexSize) - hexSize * 0.5;\n  vec2 bfsB = mod(bfsPoint - hexSize * 0.5, hexSize) - hexSize * 0.5;\n  vec2 bfsCell = dot(bfsA, bfsA) < dot(bfsB, bfsB) ? bfsA : bfsB;\n  vec2 bfsCenter = bfsPoint - bfsCell;\n  vec2 centreDelta = hexCenter - bfsCenter;\n  float axialR = centreDelta.y / 0.8660254;\n  float axialQ = centreDelta.x - axialR * 0.5;\n  float axialS = -axialQ - axialR;\n  float graphDistance = floor(max(abs(axialQ), max(abs(axialR), abs(axialS))) + 0.5);\n  float frontier = exp(-pow((graphDistance - bfsStep) / 0.52, 2.0));\n\n  float packetA = exp(-pow(\n    (fract(hexPoint.x * 0.46 - bfsTime * 1.7 + cellSeed) - 0.5) / 0.105,\n    2.0\n  ));\n  float packetB = exp(-pow(\n    (fract(dot(hexPoint, vec2(0.5, 0.8660254)) * 0.46 - bfsTime * 1.45 + cellSeed * 0.73) - 0.5) / 0.105,\n    2.0\n  ));\n  float packetC = exp(-pow(\n    (fract(dot(hexPoint, vec2(-0.5, 0.8660254)) * 0.46 - bfsTime * 1.58 + cellSeed * 1.17) - 0.5) / 0.105,\n    2.0\n  ));\n  return vec2(\n    frontier,\n    max(packetA, max(packetB, packetC)) * frontier\n  ) * bfsGain;\n}").replace("#include <tonemapping_fragment>","{\n  vec3 heroN = normalize(vHeroNormal);\n  vec3 heroV = normalize(cameraPosition - vHeroPos);\n  float fres = pow(1.0 - clamp(dot(heroN, heroV), 0.0, 1.0), 3.0);\n  // The icon's gradient, in world space across the whole assembly: cyan at the\n  // crown, royal blue at the base. Keyed to Y rather than to the module index\n  // so the ramp is continuous through the seams between plates.\n  float grad = smoothstep(-1.55, 1.45, vHeroPos.y);\n  vec3 rimColor = mix(uRimBottom, uRimTop, grad);\n  vec3 faceTint = mix(uFaceBottom, uFaceTop, grad);\n  // Biased to the key: the left of every plate burns, the right stays dim.\n  float towardKey = clamp(dot(heroN, uRimDir) * 0.5 + 0.5, 0.0, 1.0);
1\n  float bias = 0.14 + 0.86 * towardKey * towardKey;\n  // A thin specular streak along flanks square to the key; the machined edge.\n  float flank = 1.0 - smoothstep(0.18, 0.62, abs(heroN.z));\n  float edge = pow(max(dot(heroN, uRimDir), 0.0), 4.0) * flank;\n  // A directional-light edge is uniform along a straight flank, which reads\n  // as a decal. Falling the term off across the object, along the key axis,\n  // is what a real area light at finite distance would do: the upper-left of\n  // the assembly burns and the lower-right recedes.\n  float across = uRimDir.x * vHeroPos.x + uRimDir.y * vHeroPos.y;\n  float falloff = clamp(0.55 + 0.24 * across, 0.14, 1.1);\n  float edgeLight = (fres * bias + edge * 1.35) * falloff;\n\n  // A soft coated-metal reflection across the broad front caps. The old\n  // material left these faces almost perfectly flat; this restrained diagonal\n  // wash gives them depth without painting a gradient over the geometry.\n  float front = smoothstep(0.68, 0.96, abs(heroN.z));\n  // A compact ice-white glint lives on the bevel/fresnel response. It barely\n  // touches the broad cap, so a random event reads as an edge twinkle instead\n  // of a light bar sweeping across the whole block.\n  float sweepDelta = vHeroPos.y - uSweepY;\n  float sheenCore = exp(-pow(sweepDelta * 7.2, 2.0));\n  float sheenSkirt = exp(-pow(sweepDelta * 2.65, 2.0));\n  float sheenBand = (sheenCore * 0.82 + sheenSkirt * 0.18) * uSweepGain;\n  float sheenLight = sheenBand * falloff * (0.035 * front + fres * 0.86 + edge * 1.08);\n  float diagonal = clamp(0.52 + vHeroPos.y * 0.12 - vHeroPos.x * 0.075, 0.08, 0.92);\n  float inner = exp(-dot(vHeroPos.xy / vec2(1.55, 1.8), vHeroPos.xy / vec2(1.55, 1.8)));\n  float faceLight = front * uFaceGain * (0.12 + diagonal * 0.16 + inner * 0.08);\n\n  // A single narrow bar of reflected light drawn across the caps, square to\n  // the key. Polished metal shows the *shape* of its source; the environment's\n  // bright bar is what this is, and putting it on the front faces explicitly\n  // is cheaper and steadier than relying on the cube to land it there.\n  float barPos = vHeroPos.x * 0.72 + vHeroPos.y * 0.69;\n  float bar = exp(-pow((barPos - 0.24) * 3.1, 2.0)) * front;\n\n  // A fine pointy-hex lattice, generated in world space so it remains one\n  // continuous technical surface across the whole assembled mark. It is\n  // restricted to the broad caps; bevels and flanks remain clean metal.\n  vec2 hexSize = vec2(1.0, 1.7320508);\n  vec2 hexPoint = vHeroPos.xy * 7.2;\n  vec2 hexA = mod(hexPoint, hexSize) - hexSize * 0.5;\n  vec2 hexB = mod(hexPoint - hexSize * 0.5, hexSize) - hexSize * 0.5;\n  vec2 hexCell = dot(hexA, hexA) < dot(hexB, hexB) ? hexA : hexB;\n  float hexDistance = 0.5 - max(\n    dot(abs(hexCell), normalize(vec2(1.0, 1.7320508))),\n    abs(hexCell.x)\n  );\n  float hexLine = 1.0 - smoothstep(0.0, 0.035, abs(hexDistance));\n  vec2 hexCenter = hexPoint - hexCell;\n  // Cell-locked ignition. The old smooth radial mask brightened fragments all\n  // over a plate at once, so the eye saw a wash rather than a charging lattice.\n  // Resolving distance from each hex's centre makes complete cells switch on in\n  // visible rings: the perimeter sweeps through two rows, pauses, then the\n  // remaining inner cells follow the frontier into the core.\n  float rageCellRadius = length(hexCenter / vec2(8.5, 10.8));\n  float rageOuterFrontier = mix(1.03, 0.46, uRageOuter);\n  float rageCoreFrontier = mix(0.46, -0.05, uRageCore);\n  float rageOuterCells =\n    smoothstep(rageOuterFrontier - 0.028, rageOuterFrontier + 0.028, rageCellRadius) *\n    smoothstep(0.0, 0.08, uRageOuter);\n  float rageCoreBand = 1.0 - smoothstep(0.46, 0.52, rageCellRadius);\n  float rageCoreCells = rageCoreBand *\n    smoothstep(rageCoreFrontier - 0.028, rageCoreFrontier + 0.028, rageCellRadius) *\n    smoothstep(0.0, 0.08, uRageCore);\n  float rageEnergy = clamp(rageOuterCells + rageCoreCells, 0.0, 1.0);\n  float rageFrontier =\n      exp(-pow((rageCellRadius - rageOuterFrontier) / 0.045, 2.0)) *\n        smoothstep(0.0, 0.08, uRageOuter) * (1.0 - uRageOuter * 0.72)\n    + exp(-pow((rageCellRadius - rageCoreFrontier) / 0.045, 2.0)) *\n        rageCoreBand * smoothstep(0.0, 0.08, uRageCore) * (1.0 - uRageCore * 0.72);\n  // Hover reveals one soft patch shared by every physical layer.\n  float hoverDistance = length(vHeroPos.xy - uPatternHoverOrigin.xy);
1\n  float hoverReveal =\n    (1.0 - smoothstep(0.34, 0.7, hoverDistance)) * uPatternHoverGain;\n\n  // Click traversal. Each click gets an independent slot and leaves no settled\n  // lattice behind; the dim pattern remains a hover-only affordance.\n  float cellSeed = heroHash21(hexCenter + vec2(17.3, 41.7));\n  vec2 bfs = vec2(0.0);\n  #pragma unroll_loop_start\n  for ( int i = 0; i < 25; i ++ ) {\n    if (uPatternBfsGains[i] > 0.0001) {\n      bfs += heroBfsWave(\n        hexPoint,\n        hexCenter,\n        hexSize,\n        cellSeed,\n        uPatternBfsOrigins[i],\n        uPatternBfsSteps[i],\n        uPatternBfsGains[i],\n        uPatternBfsTimes[i]\n      );\n    }\n  }\n  #pragma unroll_loop_end\n  float bfsFrontier = bfs.x;\n  float bfsPackets = bfs.y;\n  bfsPackets = min(bfsPackets, 1.55) * hexLine;\n  float patternMask = front * clamp(\n    hoverReveal + uPatternAutoReveal + bfsFrontier * 0.5 + rageEnergy,\n    0.0,\n    1.0\n  );\n  float patternLight = hexLine * (0.2 + diagonal * 0.13 + fres * 0.08);\n  // Every third heartbeat reveals the lattice itself while also lifting any\n  // hover patch already under the pointer. Both fields live in world space, so\n  // the pattern stays attached to the physical caps as the assembly turns.\n  float patternPulseMask = front * clamp(\n    hoverReveal * uPatternPulseGain + uPatternAutoReveal * 0.45,\n    0.0,\n    1.0\n  );\n  float patternPulseLight =\n    hexLine * (0.13 + diagonal * 0.09 + fres * 0.07) * patternPulseMask;\n  vec3 rageColor = mix(\n    uRageViolet,\n    uRageBlue,\n    clamp(rageCoreBand * uRageCore + diagonal * 0.18, 0.0, 1.0)\n  );\n  float rageLattice =\n    front * (rageEnergy + rageFrontier * 0.62) *\n    (hexLine * (0.7 + fres * 0.4) + 0.052) *\n    (0.72 + uRagePulse * 0.76);\n\n  gl_FragColor.rgb +=\n      edgeLight * rimColor * uRimGain\n    + uSheenColor * sheenLight\n    + faceTint * faceLight\n    + mix(rimColor, uSheenColor, 0.5) * bar * uFaceGain * 0.5\n    + uPatternWash * patternMask * 0.18 * uPatternDepthGain\n    + uPatternColor * patternMask * patternLight * uPatternDepthGain\n    + uPatternWash * patternPulseMask * 0.065 * uPatternDepthGain\n    + uPatternColor * patternPulseLight * uPatternDepthGain\n    + uPatternColor * front * bfsPackets * 1.35 * uPatternDepthGain\n    + rageColor * rageLattice * uPatternDepthGain;\n}\n#include <tonemapping_fragment>")},e.customProgramCacheKey=()=>"skyflo-hero-module-hex-bfs-rage-rings-v9"}let b="\nvarying vec3 vNormalW;\nvarying vec3 vPosW;\nvoid main() {\n  vNormalW = normalize(mat3(modelMatrix) * normal);\n  vec4 wp = modelMatrix * vec4(position, 1.0);\n  vPosW = wp.xyz;\n  gl_Position = projectionMatrix * viewMatrix * wp;\n}",P="\nuniform vec3 uColor;\nuniform vec3 uDir;\nuniform float uGain;\nuniform float uOpacity;\nvarying vec3 vNormalW;\nvarying vec3 vPosW;\nvoid main() {\n  vec3 N = normalize(vNormalW);\n  vec3 V = normalize(cameraPosition - vPosW);\n  float fres = pow(1.0 - clamp(dot(N, V), 0.0, 1.0), 2.6);\n  float towardKey = clamp(dot(N, uDir) * 0.5 + 0.5, 0.0, 1.0);\n  float falloff = clamp(0.5 + 0.26 * (uDir.x * vPosW.x + uDir.y * vPosW.y), 0.1, 1.1);\n  vec3 col = uColor * fres * (0.2 + 1.05 * towardKey) * falloff * uGain * uOpacity;\n  gl_FragColor = vec4(col, max(max(col.r, col.g), col.b));\n}",R=e=>Math.min(1,Math.max(0,e)),C=e=>1-Math.pow(1-R(e),3),S=e=>{let t=R(e);return t*t*t*(t*(6*t-15)+10)},M=e=>Math.sin(R(e)*Math.PI);function B(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=(a,n)=>{let o=(e-a-t)/n;if(o<=0||o>=1)return 0;let r=Math.sin(o*Math.PI);return r*r};return Math.min(1,a(.055,.15)+.52*a(.245,.115))}function G(e,t,a){let n=[];for(let o=0;o<h.dd.length;o++){let[l,i]=h.dd[o],[s,u]=h.dd[(o+1)%h.dd.length],c=new r.Pq0(l*e,i*e,t),f=new r.Pq0(s*e,u*e,t);n.push(c.clone().lerp(f,a),f.clone().lerp(c,a))}return new r.LoY().setFromPoints(n)}let j={upper:.8,lower:.52},A={upper:.22,lower:.15},z=2*Math.PI,k=h.nr/2,H={midChevron:0,topCap:.018,upperRight:.036,lowerRight:.054,bottomChevron:.072,lowerLeft:.09,upperLeft:.108},D=h.zs.map(e=>(e.points.reduce((e,t)=>
1e+t[1],0)/e.points.length+h.FB[e.id].spread[1])*h.xE),F=h.zs.map(e=>{let t=e.points.map(t=>(t[1]+h.FB[e.id].spread[1])*h.xE);return{min:Math.min(...t)-.16,max:Math.max(...t)+.16}}),O={influence:0,outerCharge:0,coreCharge:0,charged:0,pulse:0,done:!1};function T(e){let{reducedMotion:t,lite:a,pointerRef:i,activationPointerRef:s,dragRef:u,activationSeq:T,onReady:E}=e,L=(0,l.A)(e=>e.invalidate),Q=(0,o.useRef)(null),q=(0,o.useRef)(null),I=(0,o.useRef)(null),Y=(0,o.useRef)([]),_=(0,o.useRef)([]),W=(0,o.useRef)([]),N=(0,o.useRef)(null),V=(0,o.useRef)(null),K=(0,o.useRef)(null),U=(0,o.useCallback)(e=>{Q.current=e,e&&e.rotation.set(.15,t?-.3:0,0)},[t]),J=(0,o.useRef)(0),$=(0,o.useRef)(!1),X=(0,o.useRef)(0),Z=(0,o.useRef)(0),ee=(0,o.useRef)(1),et=(0,o.useRef)({yaw:0,pitch:0}),ea=(0,o.useRef)(!1),en=(0,o.useRef)(T),eo=(0,o.useRef)({active:!1,startedAt:-1/0,clicks:{count:0,startedAt:-1/0,lastAt:-1/0}}),er=(0,o.useRef)([]),el=(0,o.useRef)({waves:Array.from({length:25},()=>({active:!1,startedAt:-1/0,origin:new r.Pq0})),nextSlot:0}),ei=(0,o.useRef)({steps:new Float32Array(25),gains:new Float32Array(25),times:new Float32Array(25)}),es=(0,o.useRef)({nextAt:1.15+3.8,lastModule:-1,passes:[]}),eu=(0,o.useMemo)(()=>(function(){let e=document.createElement("canvas");e.width=256,e.height=256;let t=e.getContext("2d"),a=t.createRadialGradient(128,128,0,128,128,128);a.addColorStop(0,"rgba(255,255,255,0.96)"),a.addColorStop(.14,"rgba(255,255,255,0.52)"),a.addColorStop(.34,"rgba(255,255,255,0.16)"),a.addColorStop(.68,"rgba(255,255,255,0.025)"),a.addColorStop(1,"rgba(255,255,255,0)"),t.fillStyle=a,t.fillRect(0,0,256,256);let n=new r.GOR(e);
1return n.colorSpace=r.er$,n})(),[]),ec=(0,o.useMemo)(()=>h.zs.map(e=>{let t=h.FB[e.id],a=new r.ypk;e.points.forEach((e,t)=>{let[n,o]=e;0===t?a.moveTo(n,o):a.lineTo(n,o)}),a.closePath();let n=new r.QCA(a,{depth:t.depth,bevelThickness:.0125,bevelSize:.0145,bevelEnabled:!0,bevelOffset:0,bevelSegments:3,curveSegments:4});return n.translate(0,0,-t.depth/2),n.computeVertexNormals(),n}),[]),eh=(0,o.useMemo)(()=>h.zs.map(e=>{let t=new r.ypk;e.points.forEach((e,a)=>{let[n,o]=e;0===a?t.moveTo(n,o):t.lineTo(n,o)}),t.closePath();let a=new r.QCA(t,{depth:.052,bevelThickness:.006,bevelSize:.008,bevelEnabled:!0,bevelSegments:1,curveSegments:2});return a.translate(0,0,-.026),a.computeVertexNormals(),a}),[]),ef=(0,o.useMemo)(()=>h.zs.map((e,t)=>{let a="upper"===e.tone,n={uRimTop:{value:new r.Q1f(g.rimTop)},uRimBottom:{value:new r.Q1f(g.rimBottom)},uSheenColor:{value:new r.Q1f(a?"#f0fbff":"#c9ddff")},uFaceTop:{value:new r.Q1f(g.faceTop)},uFaceBottom:{value:new r.Q1f(g.faceBottom)},uRimDir:{value:v.clone()},uRimGain:{value:0},uFaceGain:{value:A[e.tone]},uSweepY:{value:D[t]},uSweepGain:{value:0},uPatternColor:{value:new r.Q1f(a?"#82ddff":"#5b9df7")},uPatternWash:{value:new r.Q1f(a?"#174d79":"#162f69")},uPatternDepthGain:{value:1},uPatternHoverOrigin:{value:new r.Pq0},uPatternHoverGain:{value:0},uPatternPulseGain:{value:0},uPatternAutoReveal:{value:0},uRageOuter:{value:0},uRageCore:{value:0},uRagePulse:{value:0},uRageViolet:{value:new r.Q1f(w.violet)},uRageBlue:{value:new r.Q1f(w.blue)},uPatternBfsOrigins:{value:Array.from({length:25},()=>new r.Pq0)},uPatternBfsSteps:{value:new Float32Array(25)},uPatternBfsGains:{value:new Float32Array(25)},uPatternBfsTimes:{value:new Float32Array(25)}},o=new r.uSd({color:new r.Q1f(a?"#319fd5":"#244fba"),metalness:.94,roughness:a?.16:.22,clearcoat:.62,clearcoatRoughness:.08,envMapIntensity:a?1.5:1.25,transparent:!0,opacity:0});return o.premultipliedAlpha=!0,x(o,n),o.userData.hero=n,o}),[]),ep=(0,o.useMemo)(()=>({upper:y(new r.BKk({vertexShader:b,fragmentShader:P,uniforms:{uColor:{value:new r.Q1f(g.spillTop)},uDir:{value:v.clone()},uGain:{value:.2},uOpacity:{value:0}}})),lower:y(new r.BKk({vertexShader:b,fragmentShader:P,uniforms:{uColor:{value:new r.Q1f(g.spillBottom)},uDir:{value:v.clone()},uGain:{value:.12},uOpacity:{value:0}}}))}),[]),em=(0,o.useMemo)(()=>d.map((e,t)=>{let a={uRimTop:{value:new r.Q1f("#63caf8")},uRimBottom:{value:new r.Q1f("#3b72d4")},uSheenColor:{value:new r.Q1f("#a9e5ff")},uFaceTop:{value:new r.Q1f("#174f78")},uFaceBottom:{value:new r.Q1f("#102c5c")},uRimDir:{value:v.clone()},uRimGain:{value:.1-.02*t},uFaceGain:{value:.035},uSweepY:{value:0},uSweepGain:{value:0},uPatternColor:{value:new r.Q1f(0===t?"#6fcfff":"#458ee6")},uPatternWash:{value:new r.Q1f("#123668")},uPatternDepthGain:{value:e.patternGain},uPatternHoverOrigin:{value:new r.Pq0},uPatternHoverGain:{value:0},uPatternPulseGain:{value:0},uPatternAutoReveal:{value:0},uRageOuter:{value:0},uRageCore:{value:0},uRagePulse:{value:0},uRageViolet:{value:new r.Q1f(w.violet)},uRageBlue:{value:new r.Q1f(w.blue)},uPatternBfsOrigins:{value:Array.from({length:25},()=>new r.Pq0)},uPatternBfsSteps:{value:new Float32Array(25)},uPatternBfsGains:{value:new Float32Array(25)},uPatternBfsTimes:{value:new Float32Array(25)}},n=new r._4j({color:new r.Q1f(e.color),emissive:new r.Q1f(e.emissive),emissiveIntensity:e.emissiveIntensity,metalness:.82,roughness:.3,transparent:!0,opacity:0,depthWrite:!1});return x(n,a),n.userData.hero=a,n}),[]),ed=(0,o.useMemo)(()=>[...ef,...em],[ef,em]),ev=(0,o.useMemo)(()=>h.zs.map(e=>{let t=0,a=0;for(let[n,o]of e.points)t+=n,a+=o;let n=e.points.length;return new r.Pq0(-(t/n*.018999999999999906),-(a/n*.018999999999999906),0)}),[]),eg=(0,o.useMemo)(()=>h.zs.map(e=>{let t=0,a=0;for(let[n,o]of e.points)t+=n,a+=o;let n=e.points.length,o=new r.I9Y(t/n,a/n);return o.lengthSq()>1e-6?o.normalize():new r.I9Y(0,1)}),[]),ew=(0,o.useMemo)(()=>y(new r.BKk({vertexShader:"\nvarying vec2 vUv;\nvoid main() {\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}",fragmentShader:"\nuniform vec2 uSize;\nuniform vec2 uResolution;\nuniform vec2 uHalo;\nuniform vec2 uAtmos;\nuniform vec2 uRayOrigin;\nuniform vec3 uRayAngle;\nuniform float uHaloGain;\nuniform float uHaloScale;\nuniform float uAtmosGain;\nuniform float uRayGain;\nuniform float uRageGlow;\nuniform float uRagePulse;\nuniform float uTime;
1\nuniform float uLoopPhase;\nuniform vec3 uCore;\nuniform vec3 uCool;\nuniform vec3 uRageViolet;\nuniform vec3 uRageBlue;\nuniform float uBeams;\nvarying vec2 vUv;\n\nfloat hash21(vec2 p) {\n  p = fract(p * vec2(127.13, 311.71));\n  p += dot(p, p + 41.32);\n  return fract(p.x * p.y);\n}\n\n/* Value noise on a quintic fade. The fade matters: with a cubic one the\n   second derivative jumps at every lattice line, and on a gradient this shallow\n   that shows up as faint creases sliding through the glow. */\nfloat vnoise(vec2 p) {\n  vec2 i = floor(p);\n  vec2 f = fract(p);\n  vec2 u = f * f * f * (f * (f * 6.0 - 15.0) + 10.0);\n  return mix(\n    mix(hash21(i), hash21(i + vec2(1.0, 0.0)), u.x),\n    mix(hash21(i + vec2(0.0, 1.0)), hash21(i + vec2(1.0, 1.0)), u.x),\n    u.y\n  );\n}\n\n/* Three octaves: enough that the light has weather in it, few enough that\n   nothing in it reads as a texture. */\nfloat fbm(vec2 p) {\n  return 0.56 * vnoise(p)\n       + 0.28 * vnoise(p * 2.07 + 13.7)\n       + 0.16 * vnoise(p * 4.19 + 41.3);\n}\n\n/* One beam: gaussian across the fan, and a falloff along it that starts soft\n   at the source so there is no hot point where the rays are born. */\nfloat beam(float ang, float dist, float center, float width, float reach) {\n  float a = ang - center;\n  a -= 6.2831853 * floor((a + 3.14159265) / 6.2831853);\n  float across = exp(-(a * a) / (width * width));\n  float along = smoothstep(0.0, 1.45, dist) * exp(-dist * reach);\n  return across * along;\n}\n\nvoid main() {\n  vec2 p = (vUv - 0.5) * uSize;\n\n  /* The cloud. Two fields at different scales drifting on unrelated headings;\n     everything below is modulated by it, which is what makes the light read as\n     something moving through a volume rather than four gaussians being faded.\n     Amplitudes are deliberately shallow; this should never be findable as a\n     shape, only as the reason the glow is never quite the same twice. */\n  vec2 loopDriftA = vec2(cos(uLoopPhase), sin(uLoopPhase));\n  vec2 loopDriftB = vec2(cos(uLoopPhase * 2.0 + 1.7), sin(uLoopPhase * 2.0 + 1.7));\n  float cloud = mix(\n    fbm(p * 0.40 + loopDriftA * 0.31),\n    fbm(p * 0.25 + loopDriftB * 0.22 + vec2(7.3, 3.1)),\n    0.5\n  );\n\n  /* 1 \xb7 the halo. Tight enough to sit behind the kernel and the central\n     channel rather than behind the whole assembly; it should read as the\n     core throwing light onto what is around it. A second, much wider skirt\n     shares its centre: one gaussian falls off too fast to reach the copy\n     column, and the pair gives a core with a long tail, which is what a real\n     bloom does and what keeps the falloff from closing into a visible ring. */\n  vec2 d1 = (p - uHalo) / (vec2(0.84, 0.73) * uHaloScale);\n  vec2 d1b = (p - uHalo) / (vec2(1.95, 1.66) * uHaloScale);\n  float halo = (exp(-dot(d1, d1) * 1.44) * 0.84 + exp(-dot(d1b, d1b)) * 0.30)\n             * (0.88 + 0.26 * cloud);\n\n  /* 2 \xb7 the wide falloff, which is the only layer allowed to be shapeless. */\n  vec2 d2 = (p - uAtmos) / vec2(2.68, 2.18);\n  float atmos = exp(-dot(d2, d2) * 0.9) * (0.68 + 0.60 * cloud);\n\n  /* 3 \xb7 the beams. */\n  vec2 r = p - uRayOrigin;\n  float dist = length(r);\n  float ang = atan(r.y, r.x);\n  float rays =\n      beam(ang, dist, uRayAngle.x, 0.115, 0.21) * 0.52\n    + beam(ang, dist, uRayAngle.y, 0.078, 0.17) * 0.88\n    + beam(ang, dist, uRayAngle.z, 0.098, 0.25) * 0.42;\n  // Density along the beams, from the same cloud: they thin and thicken as it\n  // passes through them, which is the difference between light through air and\n  // three drawn wedges.\n  rays *= 0.74 + 0.52 * cloud;\n\n  /* Held down across the assembly itself. Beams are at their strongest where\n     they clear the silhouette; over the mark they drop to a third, so the\n     channels between the plates catch light without the object's dark faces\n     losing the contrast that gives them their form. Light behind the mark,\n     not fog in front of it. */\n  rays *= mix(0.34, 1.0, smoothstep(0.85, 2.05, length(p - vec2(0.0, 0.05))));\n\n  /* Charged-state light, deliberately not a blast. Two offset, soft lobes sit\n     behind the vector: cyan concentrates in the channel while violet forms a\n     longer lower-left skirt. Their shared pulse is shallow, so the atmosphere\n     breathes with the metal without turning into a flashing disc or ring. */\n  vec2 rageBlueD = (p - uHalo - vec2(0.1, 0.08)) / vec2(0.92, 1.14);\n  vec2 rageVioletD = (p - uHalo + vec2(0.24, 0.18)) / vec2(1.58, 1.34);\n  float rageBlueGlow = exp(-dot(rageBlueD, rageBlueD) * 1.18);\n  float rageVioletGlow = exp(-dot(rageVioletD, rageVioletD) * 0.92);\n  float rageBreath = mix(0.78, 1.08, uRagePulse);\n  vec3 rageGlow =\n      uRageBlue * rageBlueGlow * 0.34\n    + uRageViolet * rageVioletGlow * 0.24;\n\n  /* Border mask, in both spaces. The quad term shapes the light; the frame\n     term is the guarantee. Its ramp starts far enough in that it only ever\n     touches levels already close to black, so it removes the seam without\n     taking any visible width off the glow. */\n  vec2 n = abs(vUv * 2.0 - 1.0);\n  vec2 f = abs(gl_FragCoord.xy / uResolution * 2.0 - 1.0);\n  float edge =\n      (1.0 - smoothstep(0.48, 0.99, n.x)) *\n      (1.0 - smoothstep(0.48, 0.99, n.y)) *\n      (1.0 - smoothstep(0.74, 1.0, f.x)) *\n      (1.0 - smoothstep(0.74, 1.0, f.y));\n\n  vec3 col =\n      uCore * halo * uHaloGain\n    + uCool * atmos * uAtmosGain\n    + mix(uCool, uCore, 0.42) * rays * uRayGain * uBeams\n    + rageGlow * uRageGlow * rageBreath;\n  col *= edge;
1\n\n  /* Dither. These gradients cover a thousand pixels while moving through\n     three or four 8-bit steps, which is the textbook case for banding: without\n     this the halo closes in visible contour rings. Half an LSB of white noise\n     before the write breaks the quantisation and costs one hash. */\n  col += (hash21(gl_FragCoord.xy + fract(uTime)) - 0.5) * (1.4 / 255.0) * edge;\n  col = max(col, vec3(0.0));\n\n  gl_FragColor = vec4(col, max(max(col.r, col.g), col.b));\n}",uniforms:{uSize:{value:new r.I9Y(7.8,6.4)},uResolution:{value:new r.I9Y(1,1)},uHalo:{value:new r.I9Y(p,m)},uAtmos:{value:new r.I9Y(p,m)},uRayOrigin:{value:new r.I9Y(-.62,1.42)},uRayAngle:{value:new r.Pq0(-1.02,-.66,-.3)},uHaloGain:{value:0},uHaloScale:{value:1},uAtmosGain:{value:0},uRayGain:{value:0},uRageGlow:{value:0},uRagePulse:{value:0},uTime:{value:0},uLoopPhase:{value:0},uCore:{value:new r.Q1f(g.core)},uCool:{value:new r.Q1f(g.cool)},uRageViolet:{value:new r.Q1f(w.violet)},uRageBlue:{value:new r.Q1f(w.blue)},uBeams:{value:a?.72:1}},depthTest:!0,depthWrite:!1})),[a]),ey=(0,o.useMemo)(()=>[{geometry:G(1.42*h.xE,-1,.15),opacity:.5},{geometry:G(1.19*h.xE,-.52,.36),opacity:.28}],[]),ex=(0,o.useMemo)(()=>ey.map(e=>new r.mrM({color:new r.Q1f(h.C3.active),transparent:!0,opacity:0,depthWrite:!1,userData:{rest:e.opacity}})),[ey]),eb=(0,o.useMemo)(()=>({coreHalo:function(e,t){let a=new r.RoJ({map:e,color:new r.Q1f(t),opacity:0,transparent:!0,depthWrite:!1});return a.blending=r.bCz,a.blendEquation=r.gO9,a.blendSrc=r.ie2,a.blendDst=r.qad,a.blendEquationAlpha=r.gO9,a.blendSrcAlpha=r.qad,a.blendDstAlpha=r.qad,a}(eu,h.C3.highlight)}),[eu]);(0,o.useEffect)(()=>()=>{eu.dispose(),ec.forEach(e=>e.dispose()),eh.forEach(e=>e.dispose()),ef.forEach(e=>e.dispose()),em.forEach(e=>e.dispose()),ep.upper.dispose(),ep.lower.dispose(),ey.forEach(e=>e.geometry.dispose()),ex.forEach(e=>e.dispose()),eb.coreHalo.dispose(),ew.dispose()},[ew,ex,ey,eu,ec,ef,ep,eh,em,eb]),(0,o.useEffect)(()=>{if(!t)return;J.current=1.15,ef.forEach((e,t)=>{e.opacity=1,e.userData.hero.uRimGain.value=j[h.zs[t].tone]}),em.forEach((e,t)=>{e.opacity=d[t].opacity}),N.current&&(N.current.intensity=2.35),ep.upper.uniforms.uOpacity.value=1,ep.lower.uniforms.uOpacity.value=1,ex.forEach(e=>{e.opacity=e.userData.rest}),eb.coreHalo.opacity=.28;let e=ew.uniforms;e.uHaloGain.value=.33,e.uHaloScale.value=1,e.uAtmosGain.value=.13,e.uRayGain.value=.19,e.uTime.value=11.5,L()},[ew,ex,L,ef,t,ep,em,eb]),(0,o.useEffect)(()=>{L()},[T,L]);let eP=(0,o.useMemo)(()=>({pointer:new r.I9Y,hoverPoint:new r.Pq0,normalCore:new r.Q1f(h.C3.highlight),rageCore:new r.Q1f(w.core),normalLight:new r.Q1f(h.C3.active),rageLight:new r.Q1f(w.violet)}),[]);return(0,l.C)((e,n)=>{let o=Q.current,l=q.current;if(!o||!l)return;let p=Math.min(n,.05);$.current||($.current=!0,E());let{width:m,height:v}=e.viewport,g=Math.min(1,m/5.1,v/(a?4.3:4.15));e.gl.getDrawingBufferSize(ew.uniforms.uResolution.value);let w=i.current,y=u.current,x=!a&&!t&&w.inside&&!y.active;X.current=r.cj9.damp(X.current,+!!x,3.2,p);let b=X.current,P=eo.current,G=O;P.active&&(G=function(e){let t=1-f((e-4.9)/1.1799999999999997),a=f(e/.82)*t,n=f((e-.86)/.86)*t,o=f((e-1.82)/.8)*t,r=Math.max(0,e-.86),l=1.65*Math.min(r,1.7600000000000002),i=.55*Math.max(0,r-1.7600000000000002);return{influence:a,outerCharge:n,coreCharge:o,charged:Math.min(1,.54*n+.68*o),pulse:f(r/.24)*t*(.56+.44*Math.pow(Math.sin((l+i)*Math.PI),2)),done:e>=6.08}}(J.current-P.startedAt)).done&&(P.active=!1);let L=b*(1-G.influence);if(P.active&&(y.active=!1),!y.active){y.velocityYaw+=(-6.8*y.velocityYaw-3.4*3.4*y.yaw)*p,y.velocityPitch+=(-6.8*y.velocityPitch-3.4*3.4*y.pitch)*p;let e=(0,c.T5)(y.yaw+y.velocityYaw*p),t=(0,c.oz)(y.pitch+y.velocityPitch*p);e===y.yaw&&(y.velocityYaw=0),t===y.pitch&&(y.velocityPitch=0),y.yaw=e,y.pitch=t,2e-4>Math.abs(y.yaw)&&.002>Math.abs(y.velocityYaw)&&(y.yaw=0,y.velocityYaw=0),2e-4>Math.abs(y.pitch)&&.002>Math.abs(y.velocityPitch)&&(y.pitch=0,y.velocityPitch=0)}Z.current=r.cj9.damp(Z.current,+!!y.active,4.5,p);let K=Z.current,U=L*(1-K),eu=(0,c.y9)(y);ee.current=r.cj9.damp(ee.current,r.cj9.lerp(r.cj9.lerp(1,.93,eu),.91,G.influence),7,p),o.scale.setScalar(g*ee.current);let ec=-.3+y.yaw+.055*w.x*U,eh=.15+y.pitch-.022*w.y*U,ev=r.cj9.lerp(ec,0,G.influence),ey=r.cj9.lerp(eh,0,G.influence),eR=Math.max(K,Math.min(1,40*eu)),eC=Math.max(r.cj9.lerp(2.4,14,eR),5.8*G.influence);o.rotation.y=r.cj9.damp(o.rotation.y,ev,eC,p),o.rotation.x=r.cj9.damp(o.rotation.x,ey,eC,p),et.current.yaw=r.cj9.damp(et.current.yaw,y.yaw,eC,p),et.current.pitch=r.cj9.damp(et.current.pitch,y.pitch,eC,p),o.rotation.z=r.cj9.damp(o.rotation.z,.004*w.x*U*(1-G.influence),Math.max(2.4,5.8*G.influence),p),o.position.x=r.cj9.damp(o.position.x,0,2,p),o.position.y=r.cj9.damp(o.position.y,0,2,p);let eS=!1,eM=T!==en.current;if(x||eM){let t=eM?s.current:w;eP.pointer.set(t.x,-t.y),e.raycaster.setFromCamera(eP.pointer,e.camera);let a=h.zs.length*(d.length+1),n=W.current.filter(e=>null!==e);if(n.length===a){let t=er.current;t.length=0,e.raycaster.intersectObjects(n,!1,t);let a=t[0];a&&(eS=!0,eP.hoverPoint.copy(a.point))}}if(ea.current=eS,eM){let e=Math.max(1,T-en.current);if(en.current=T,eS){let a=el.current;for(let n=0;n<e;n++){let e=a.nextSlot,n=a.waves[e];n.active=!0,n.startedAt=J.current,n.origin.copy(eP.hoverPoint),a.nextSlot=(e+1)%25,!t&&!P.active&&function(e,t){let a=t-e.lastAt<=.72,n=t-e.startedAt<=4.6;return 0!==e.count&&a&&n?e.count+=1:(e.count=1,e.startedAt=t),e.lastAt=t,!(e.count<9)&&(e.count=0,e.startedAt=-1/0,e.lastAt=-1/0,!0)}(P.clicks,J.current)&&(P.active=!0,P.startedAt=J.current,y.active=!1,y.velocityYaw=0,y.velocityPitch=0)}}}I.current&&(I.current.position.x=r.cj9.damp(I.current.position.x,x?-(.08*w.x):0,4,p),I.current.position.y=r.cj9.damp(I.current.position.y,x?-(.06*w.y):0,4,p));for(let e=0;e<d.length;e++){let t=Y.current[e];if(!t)continue;let a=d[e];t.position.z=r.cj9.damp(t.position.z,a.z-L*a.hoverRetreat,2.4,p);let n=a.scale+.003*L*(e+1);t.scale.x=r.cj9.damp(t.scale.x,n,2.4,p),t.scale.y=r.cj9.damp(t.scale.y,n,2.4,p)}if(t)return;J.current+=p;
1let eB=J.current,eG=C(eB/.58),ej=Math.max(eB-1.15,0)%h.nr,eA=ej/h.nr*z,ez=Math.max(eB-1.15,0),ek=Math.floor(ez/k),eH=ez%k/k,eD=B(eH),eF=h.zs.map(e=>B(eH,H[e.id])),eO=(ek+1)%3==0;for(let e=0;e<h.zs.length;e++){let t=_.current[e];if(!t)continue;let a=h.zs[e],n=h.FB[a.id],[o,r,l]=a.explode,i=S((eB-.038*e)/.88),s=C((eB-.024*e)/.52),u=1-i,c=.0055*Math.sin(eA+1.31*e),f=eg[e];t.position.set(n.spread[0]+f.x*L*.035+o*u*.55,n.spread[1]+f.y*L*.035+r*u*.55,n.z+l*u*.5+c+.03*L*(e<3?1:-.5)),t.rotation.z=l*u*.16,ef[e].opacity=s}ep.upper.uniforms.uOpacity.value=eG,ep.lower.uniforms.uOpacity.value=eG,em.forEach((e,t)=>{let a=d[t];e.opacity=a.opacity*eG,e.emissiveIntensity=a.emissiveIntensity*r.cj9.lerp(.92,1.08,eD)});for(let e=0;e<ex.length;e++){let t=ex[e];t.opacity=t.userData.rest*C((eB-.3)/.7)}let eT=Math.min(Math.floor(ej/h._3),h.Cv.length-1),eE=(ej-eT*h._3)/h._3,eL=h.Cv[eT].key,eQ=eB>=1.15,eq=eQ?M(eE)*("delegate"===eL?.32:.62):0,eI=null;eQ&&"delegate"===eL&&(eI=h.zs.map(e=>{let t=(1.35*eE-.1*h.De.indexOf(e.id))/.34;return t>0&&t<1?.62*M(t):0}));let eY=es.current,e_=!eO&&eH>.52&&eH<.8;if(eB>=eY.nextAt&&e_){let e=r.cj9.randInt(0,h.zs.length-1);e===eY.lastModule&&(e=(e+1)%h.zs.length),eY.lastModule=e;let t=F[e],a=r.cj9.lerp(t.min,t.max,r.cj9.randFloat(.16,.84));eY.passes.push({module:e,startedAt:eB,duration:r.cj9.randFloat(.68,.96),intensity:r.cj9.randFloat(.36,.48),fromY:a-.035,toY:a+.035}),eY.nextAt=eB+r.cj9.randFloat(4.8,8.2)}else eB>=eY.nextAt&&(eY.nextAt=eB+.22);let eW=h.zs.map(()=>0),eN=[...D];eY.passes=eY.passes.filter(e=>{let t=eB-e.startedAt;if(t<0)return!0;if(t>=e.duration)return!1;let a=R(t/e.duration),n=S(a/.22)*(1-S((a-.58)/.42)),o=e.intensity*n,l=eW[e.module],i=Math.min(.58,l+o);if(i>0){let t=r.cj9.lerp(e.fromY,e.toY,S(a));eN[e.module]=(eN[e.module]*l+t*o)/Math.max(l+o,1e-4)}return eW[e.module]=i,!0});for(let e=0;e<eW.length;e++){let t=S(eF[e]/.58);eW[e]*=1-t}let eV=el.current,eK=ei.current.steps,eU=ei.current.gains,eJ=ei.current.times;eK.fill(0),eU.fill(0),eJ.fill(0),eV.waves.forEach((e,t)=>{if(!e.active)return;let a=Math.max(eB-e.startedAt,0);if(a>3.27){e.active=!1;return}eK[t]=r.cj9.lerp(0,26,S(a/3.15)),eU[t]=S(a/.12),eJ[t]=Math.min(a,3.15)});let e$=ea.current;for(let e=0;e<ef.length;e++){let t=ef[e].userData.hero,a=h.zs[e],n=a.tone,o=j[n],l="midChevron"===a.id?G.coreCharge:G.outerCharge,i=o+.42*eq+(eI?eI[e]:0)+r.cj9.lerp(-.03,.21,eF[e])+.1*L+.035*!!e$+l*(.54+.62*G.pulse);t.uRimGain.value=r.cj9.damp(t.uRimGain.value,i*eG,7,p),t.uFaceGain.value=r.cj9.damp(t.uFaceGain.value,(A[n]+.065*eF[e]+l*(.11+.11*G.pulse))*eG,7,p),t.uSweepY.value=r.cj9.damp(t.uSweepY.value,eN[e],18,p),t.uSweepGain.value=r.cj9.damp(t.uSweepGain.value,eW[e]*eG,eW[e]>t.uSweepGain.value?18:12,p)}ed.forEach((e,t)=>{let a=e.userData.hero,n=a.uPatternHoverOrigin.value;e$&&n.lerp(eP.hoverPoint,1-Math.exp(-18*p)),a.uPatternHoverGain.value=r.cj9.damp(a.uPatternHoverGain.value,e$?eG:0,e$?13:7,p);let o=t<eF.length?eF[t]:.55*eD,l=eO?Math.pow(o,1.2):0;a.uPatternPulseGain.value=l*eG,a.uPatternAutoReveal.value=(t<eF.length?.72*l:0)*eG;let i=t<eF.length?1:.42;a.uRageOuter.value=G.outerCharge*i*eG,a.uRageCore.value=G.coreCharge*i*eG,a.uRagePulse.value=G.pulse*i*eG;let s=a.uPatternBfsOrigins.value;eV.waves.forEach((e,t)=>{e.active&&s[t].copy(e.origin)});let u=a.uPatternBfsSteps.value,c=a.uPatternBfsGains.value,h=a.uPatternBfsTimes.value;for(let e=0;e<25;e++)u[e]=eK[e],c[e]=eU[e]*eG,h[e]=eJ[e]});let eX=r.cj9.lerp(.9,1.16,eD);ep.upper.uniforms.uGain.value=(.2+.13*eq+G.charged*(.28+.42*G.pulse))*eX,ep.lower.uniforms.uGain.value=(.12+.09*eq+G.charged*(.22+.34*G.pulse))*eX;let eZ=C((eB-.828)/.75)*(.55+.45*eq+.18*L),e0=r.cj9.lerp(.95,1.08,eD);N.current&&(N.current.color.lerpColors(eP.normalLight,eP.rageLight,.86*G.coreCharge),N.current.intensity=(1.25+2.15*eZ+G.coreCharge*(2.35+2.25*G.pulse))*e0),V.current&&(eb.coreHalo.color.lerpColors(eP.normalCore,eP.rageCore,.9*G.coreCharge),eb.coreHalo.opacity=(.14+.26*eZ+G.coreCharge*(.18+.2*G.pulse))*e0*eG,V.current.scale.setScalar((.76+.1*eZ+G.coreCharge*(.07+.055*G.pulse))*r.cj9.lerp(.97,1.055,eD)));let e1=ew.uniforms;e1.uTime.value=eB,e1.uLoopPhase.value=eA,e1.uRageGlow.value=G.charged,e1.uRagePulse.value=G.pulse;let e2=r.cj9.lerp(-.3+et.current.yaw,0,G.influence),e5=r.cj9.lerp(.15+et.current.pitch,0,G.influence),e3=-(-1.8*Math.tan(e2)),e9=Math.tan(e5)*(-Math.sin(e2)*e3+-1.8*Math.cos(e2));e1.uHalo.value.set(e3,e9),e1.uAtmos.value.set(e3,e9);let e4=.026*Math.sin(eA)+(x?.016*w.x:0),e8=e1.uRayAngle.value;e8.x=r.cj9.damp(e8.x,-1.02+e4+.018*Math.sin(2*eA+.6),.7,p),e8.y=r.cj9.damp(e8.y,-.66+e4,.7,p),e8.z=r.cj9.damp(e8.z,-.3+e4-.02*Math.cos(2*eA+1.1),.7,p),e1.uHaloGain.value=(.33*r.cj9.lerp(.84,1.24,eD)+.11*eq+.035*L)*eG,e1.uHaloScale.value=r.cj9.lerp(.96,1.08,eD),e1.uAtmosGain.value=.13*r.cj9.lerp(.94,1.08,eD)*(1+.035*Math.sin(eA+2.1))*eG,e1.uRayGain.value=(.19*(1+.045*Math.sin(2*eA+.8))+.035*eq)*eG}),(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("group",{ref:U,children:[(0,n.jsx)("mesh",{ref:K,material:ew,position:[0,0,-1.8],renderOrder:-20,frustumCulled:!1,children:(0,n.jsx)("planeGeometry",{args:[7.8,6.4]})}),(0,n.jsx)("group",{ref:I,children:ey.map((e,t)=>(0,n.jsx)("lineSegments",{geometry:e.geometry,material:ex[t]},t))}),(0,n.jsxs)("group",{ref:q,scale:h.xE,children:[d.map((e,t)=>(0,n.jsx)("group",{ref:e=>{Y.current[t]=e},position:[0,0,e.z],scale:[e.scale,e.scale,1],children:h.zs.map((e,a)=>(0,n.jsx)("mesh",{ref:e=>{W.current[h.zs.length+t*h.zs.length+a]=e},geometry:eh[a],material:em[t],position:[h.FB[e.id].spread[0],h.FB[e.id].spread[1],0],renderOrder:-1-t},e.id))},e.z)),h.zs.map((e,t)=>(0,n.jsxs)("group",{ref:e=>{_.current[t]=e},position:[h.FB[e.id].spread[0],h.FB[e.id].spread[1],h.FB[e.id].z],children:[(0,n.jsx)("mesh",{ref:e=>{W.current[t]=e},geometry:ec[t],material:ef[t],castShadow:!a,receiveShadow:!a}),(0,n.jsx)("mesh",{geometry:ec[t],material:ep[e.tone],position:ev[t],scale:1.019,renderOrder:2})]},e.id)),(0,n.jsx)("sprite",{ref:V,material:eb.coreHalo,position:[0,.05,-.02],scale:[.84,.84,1]}),(0,n.jsx)("pointLight",{ref:N,position:[0,-.03,.24],color:h.C3.active,intensity:0,distance:1.38,decay:2.2})]})]})})}function E(e){let{lite:t}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("ambientLight",{intensity:.12,color:"#16304c"}),(0,n.jsx)("directionalLight",{position:[-5.5,4.4,4.6],intensity:1.9,color:"#e2eeff",castShadow:!t,"shadow-mapSize":[1024,1024],"shadow-bias":-.0016,"shadow-normalBias":.02,"shadow-camera-near":1,"shadow-camera-far":18,"shadow-camera-left":-3.6,"shadow-camera-right":3.6,"shadow-camera-top":3.2,"shadow-camera-bottom":-3.2}),(0,n.jsx)("directionalLight",{position:[4.6,.8,-3.8],intensity:1.05,color:"#3a93ee"}),(0,n.jsx)("directionalLight",{position:[-3.4,-3.8,-2.4],intensity:.5,color:"#6a4bc4"}),(0,n.jsxs)(s.OH,{resolution:256,frames:1,children:[(0,n.jsx)(u.O,{form:"rect",intensity:1.75,color:"#dcecff",position:[-4,3,4],scale:[7,7,1],target:[0,0,0]}),(0,n.jsx)(u.O,{form:"rect",intensity:4.6,color:"#eef7ff",position:[-1.6,4.6,2.4],rotation:[Math.PI/2,0,.42],scale:[.5,9,1],target:[0,0,0]}),(0,n.jsx)(u.O,{form:"rect",intensity:2.2,color:"#8fd8ff",position:[3.4,2.2,2.8],rotation:[0,-Math.PI/2.6,.9],scale:[.42,7,1],target:[0,0,0]}),(0,n.jsx)(u.O,{form:"rect",intensity:1.35,color:"#2f8ce8",position:[5,.5,1.5],scale:[2,7,1],target:[0,0,0]}),(0,n.jsx)(u.O,{form:"rect",intensity:.8,color:"#6748c9",position:[-4.2,-3,1.2],scale:[5,4,1],target:[0,0,0]}),(0,n.jsx)(u.O,{form:"rect",intensity:.5,color:"#10294c",position:[0,-4.5,2],scale:[8,4,1],target:[0,0,0]}),(0,n.jsx)(u.O,{form:"rect",intensity:.85,color:"#a6c8f2",position:[-2.4,1.6,5.5],scale:[6,5,1],target:[0,0,0]})]})]})}function L(){let e=(0,l.z)(),t=(0,l.A)(e=>e.size),a=(0,o.useCallback)(()=>{let{gl:t,size:a,setSize:n,invalidate:o}=e.getState(),r=t.domElement.parentElement;if(!r)return;let{width:l,height:i,top:s,left:u}=r.getBoundingClientRect();!(l<=0)&&!(i<=0)&&(.5>Math.abs(l-a.width)&&.5>Math.abs(i-a.height)||(n(l,i,s,u),o()))},[e]);return(0,o.useEffect)(()=>{a()},[a,t]),(0,o.useEffect)(()=>{let t=e.getState().gl.domElement.parentElement,n=t&&new ResizeObserver(a);return n&&n.observe(t),window.addEventListener("resize",a),document.addEventListener("visibilitychange",a),()=>{n&&n.disconnect(),window.removeEventListener("resize",a),document.removeEventListener("visibilitychange",a)}},[e,a]),null}function Q(e){let{reducedMotion:t,active:a,lite:l,onReady:s}=e,[u,c]=(0,o.useState)(!1),[h,f]=(0,o.useState)(1),p=(0,o.useCallback)(()=>{c(!0),s()},[s]);return(0,o.useEffect)(()=>{let e,t;if(!l)return void f(1);if(!u)return;let a=!1,n=[],o=()=>
1{if(a)return;let e=Math.min(window.devicePixelRatio||1,2);e<=1||[.36,.7,1].forEach((t,o)=>{n.push(window.setTimeout(()=>{a||f(1+(e-1)*t)},140*o))})},r=window;return r.requestIdleCallback?e=r.requestIdleCallback(o,{timeout:700}):t=window.setTimeout(o,280),()=>{var o;a=!0,n.forEach(e=>window.clearTimeout(e)),void 0!==e&&(null==(o=r.cancelIdleCallback)||o.call(r,e)),void 0!==t&&window.clearTimeout(t)}},[u,l]),(0,n.jsxs)(i.Hl,{frameloop:t?"demand":a?"always":"never",shadows:!l,dpr:l?h:[1,1.75],camera:{position:[0,0,9.6],fov:26,near:.5,far:40},gl:{antialias:!0,alpha:!0,powerPreference:"high-performance",stencil:!1,depth:!0},style:{touchAction:"pan-y",pointerEvents:"none"},onCreated:e=>{let{gl:t}=e;t.setClearColor(0,0),t.toneMapping=r.FV,t.toneMappingExposure=1.04,l||(t.shadowMap.type=r.Wk7)},children:[(0,n.jsx)(L,{}),(0,n.jsx)(E,{lite:l}),(0,n.jsx)(T,{...e,onReady:p})]})}}}]);

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.