PageSourceSearch

https://www.volumn.ai/_next/static/chunks/39740.3290e1c28c65212b.js

js volumn.ai collected 2026-10-01 16:18:52 UTC 14,624 bytes, 1 lines download raw bytes

vendor: 4,518 bytes, line 1
1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39740],{39740:(e,t,i)=>{i.r(t),i.d(t,{Globe:()=>j});var r=i(53757),a=["x","y","z"],o=function(e){Object.assign(this,{uniforms:{},geometry:{vertices:[{x:0,y:0,z:0}]},mode:0,modifiers:{},attributes:[],multiplier:1,buffers:[]}),Object.assign(this,e),this.prepareProgram(),this.prepareUniforms(),this.prepareAttributes()};o.prototype.compileShader=function(e,t){var i=this.gl.createShader(e);return this.gl.shaderSource(i,t),this.gl.compileShader(i),i},o.prototype.prepareProgram=function(){var e=this.gl,t=this.vertex,i=this.fragment,r=e.createProgram();e.attachShader(r,this.compileShader(35633,t)),e.attachShader(r,this.compileShader(35632,i)),e.linkProgram(r),e.useProgram(r),this.program=r},o.prototype.prepareUniforms=function(){for(var e=Object.keys(this.uniforms),t=0;t<e.length;t+=1){var i=this.gl.getUniformLocation(this.program,e[t]);this.uniforms[e[t]].location=i}},o.prototype.prepareAttributes=function(){void 0!==this.geometry.vertices&&this.attributes.push({name:"aPosition",size:3}),void 0!==this.geometry.normal&&this.attributes.push({name:"aNormal",size:3}),this.attributeKeys=[];for(var e=0;e<this.attributes.length;e+=1)this.attributeKeys.push(this.attributes[e].name),this.prepareAttribute(this.attributes[e])},o.prototype.prepareAttribute=function(e){for(var t=this.geometry,i=this.multiplier,r=t.vertices,o=t.normal,n=new Float32Array(i*r.length*e.size),s=0;s<i;s+=1)for(var l=e.data&&e.data(s,i),c=s*r.length*e.size,f=0;f<r.length;f+=1)for(var u=0;u<e.size;u+=1){var h=this.modifiers[e.name];n[c]=void 0!==h?h(l,f,u,this):"aPosition"===e.name?r[f][a[u]]:"aNormal"===e.name?o[f][a[u]]:l[u],c+=1}this.attributes[this.attributeKeys.indexOf(e.name)].data=n,this.prepareBuffer(this.attributes[this.attributeKeys.indexOf(e.name)])},o.prototype.prepareBuffer=function(e){var t=e.data,i=e.name,r=e.size,a=this.gl.createBuffer();this.gl.bindBuffer(34962,a),this.gl.bufferData(34962,t,35044);var o=this.gl.getAttribLocation(this.program,i);this.gl.enableVertexAttribArray(o),this.gl.vertexAttribPointer(o,r,5126,!1,0,0),this.buffers[this.attributeKeys.indexOf(e.name)]={buffer:a,location:o,size:r}},o.prototype.render=function(e){var t=this,i=this.uniforms,r=this.multiplier,a=this.gl;a.useProgram(this.program);for(var o=0;o<this.buffers.length;o+=1){var n=this.buffers[o],s=n.location,l=n.buffer,c=n.size;a.enableVertexAttribArray(s),a.bindBuffer(34962,l),a.vertexAttribPointer(s,c,5126,!1,0,0)}Object.keys(e).forEach(function(t){i[t].value=e[t].value}),Object.keys(i).forEach(function(e){var r=i[e];t.uniformMap[r.type](r.location,r.value)}),a.drawArrays(this.mode,0,r*this.geometry.vertices.length),this.onRender&&this.onRender(this)},o.prototype.destroy=function(){for(var e=0;e<this.buffers.length;e+=1)this.gl.deleteBuffer(this.buffers[e].buffer);this.gl.deleteProgram(this.program),this.gl=null};var n=function(e){var t=this,i=e||{},r=i.canvas;void 0===r&&(r=document.querySelector("canvas"));var a=i.context;void 0===a&&(a={});var o=i.contextType;void 0===o&&(o="experimental-webgl");var n=i.settings;void 0===n&&(n={});var s=r.getContext(o,Object.assign({alpha:!1,antialias:!1},a));Object.assign(this,{gl:s,canvas:r,uniforms:{},instances:new Map,shouldRender:!0}),Object.assign(this,{devicePixelRatio:1,clearColor:[1,1,1,1],position:{x:0,y:0,z:2},clip:[.001,100]}),Object.assign(this,n),this.uniformMap={float:function(e,t){return s.uniform1f(e,t)},vec2:function(e,t){return s.uniform2fv(e,t)},vec3:function(e,t){return s.uniform3fv(e,t)},vec4:function(e,t){return s.uniform4fv(e,t)},mat2:function(e,t){return s.uniformMatrix2fv(e,!1,t)},mat3:function(e,t){return s.uniformMatrix3fv(e,!1,t)},mat4:function(e,t){return s.uniformMatrix4fv(e,!1,t)}},s.enable(s.DEPTH_TEST),s.depthFunc(s.LEQUAL),!1===s.getContextAttributes().alpha&&(s.clearColor.apply(s,this.clearColor),s.clearDepth(1)),this.onSetup&&this.onSetup(s),window.addEventListener("resize",function(){return t.resize()}),this.resize(),this.render()};n.prototype.resize=function(){var e=this.gl,t=this.canvas,i=this.devicePixelRatio,r=this.position;t.width=t.clientWidth*i,t.height=t.clientHeight*i;var a=e.drawingBufferWidth,o=e.drawingBufferHeight,n=a/o;e.viewport(0,0,a,o);var s=Math.tan(Math.PI/180*22.5),l=[1,0,0,0,0,1,0,0,0,0,1,0,r.x,r.y,-((n<1?1:n)*r.z),1];this.uniforms.uProjectionMatrix={type:"mat4",value:[.5/s,0,0,0,0,n/s*.5,0,0,0,0,-(this.clip[1]+this.clip[0])/(this.clip[1]-this.clip[0]),-1,0,0,-2*this.clip[1]*(this.clip[0]/(this.clip[1]-this.clip[0])),0]}
1,this.uniforms.uViewMatrix={type:"mat4",value:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},this.uniforms.uModelMatrix={type:"mat4",value:l}},n.prototype.toggle=function(e){e!==this.shouldRender&&(this.shouldRender=void 0!==e?e:!this.shouldRender,this.shouldRender&&this.render())},n.prototype.render=function(){var e=this;this.gl.clear(16640),this.instances.forEach(function(t){t.render(e.uniforms)}),this.onRender&&this.onRender(this),this.shouldRender&&requestAnimationFrame(function(){return e.render()})},n.prototype.add=function(e,t){void 0===t&&(t={uniforms:{}}),void 0===t.uniforms&&(t.uniforms={}),Object.assign(t.uniforms,JSON.parse(JSON.stringify(this.uniforms))),Object.assign(t,{gl:this.gl,uniformMap:this.uniformMap});var i=new o(t);return this.instances.set(e,i),i},n.prototype.remove=function(e){var t=this.instances.get(e);void 0!==t&&(t.destroy(),this.instances.delete(e))},n.prototype.destroy=function(){var e=this;this.instances.forEach(function(t,i){t.destroy(),e.instances.delete(i)}),this.toggle(!1)};var s="theta",l="mapSamples",c="mapBrightness",f="baseColor",u="markerColor",h="glowColor",d="markers",m="diffuse",p="devicePixelRatio",v="dark",g="offset",b="scale",y="opacity",A="mapBaseBrightness",x={phi:"z",[s]:"A",[l]:"k",[c]:"D",[f]:"S",[u]:"T",[h]:"y",[m]:"E",[v]:"F",[g]:"x",[b]:"B",[y]:"U",[A]:"G"},{PI:w,sin:z,cos:E,sqrt:C,atan2:M,floor:R,max:k,pow:P,log2:B}=Math,S=(e,t)=>[].concat(...e.map(e=>{let[i,r]=e.location;i=i*w/180,r=r*w/180-w;let a=E(i);return[...((e,t)=>{let i=[e[0],e[2],e[1]],r=1/t,a=P(1.618033988749895,k(2,R(.7202100452062783*B(2.23606797749979*t*w*(1-i[2]*i[2])))))/2.23606797749979,o=[R(a+.5),R(1.618033988749895*a+.5)],n=[(o[0]+1)*.618033988749895%1*6.283185307179586-3.8832220774509327,(o[1]+1)*.618033988749895%1*6.283185307179586-3.8832220774509327],s=[-2*o[0],-2*o[1]],l=[M(i[1],i[0]),i[2]-1],c=n[0]*s[1]-s[0]*n[1],f=[R((s[1]*l[0]-n[1]*(l[1]*t+1))/c),R((-s[0]*l[0]+n[0]*(l[1]*t+1))/c)],u=w,h=[0,0,0];for(let e=0;e<4;e++){let a=o[0]*(f[0]+e%2)+o[1]*(f[1]+R(.5*e));if(a>t)continue;let n=.618033988749895*a%1*6.283185307179586,s=1-2*a*r,l=C(1-s*s),c=[E(n)*l,z(n)*l,s],d=C((i[0]-c[0])**2+(i[1]-c[1])**2+(i[2]-c[2])**2);d<u&&(u=d,h=c)}return[h[0],h[2],h[1]]})([-a*E(r),z(i),a*z(r)],t),e.size,...e.color?[...e.color,1]:[0,0,0,0]]}),[0,0,0,0,0,0,0,0]),D=i(24361),F=i(37975);let T={width:800,height:800,onRender:()=>{},devicePixelRatio:2,phi:0,theta:.3,dark:0,diffuse:.4,mapSamples:16e3,mapBrightness:1.2,baseColor:[1,1,1],markerColor:[251/255,100/255,21/255],glowColor:[1,1,1],markers:[{location:[14.5995,120.9842],size:.03},{location:[19.076,72.8777],size:.1},{location:[23.8103,90.4125],size:.05},{location:[30.0444,31.2357],size:.07},{location:[39.9042,116.4074],size:.08},{location:[-23.5505,-46.6333],size:.1},{location:[19.4326,-99.1332],size:.1},{location:[40.7128,-74.006],size:.1},{location:[34.6937,135.5022],size:.05},{location:[41.0082,28.9784],size:.06}]},U={dark:1,diffuse:1,mapBrightness:.85,baseColor:[26/255,34/255,52/255],glowColor:[16/255,24/255,40/255],markerColor:[59/255,130/255,246/255]};function j(e){let{className:t,config:i,theme:a="light"}=e,o=(0,D.useRef)(null),w=(0,D.useRef)(null),z=(0,D.useRef)(0),E=(0,D.useRef)(0),C=(0,D.useRef)(0),[M,R]=(0,D.useState)(0),k=e=>{w.current=e,o.current&&(o.current.style.cursor=null===e?"grab":"grabbing")},P=e=>{if(null===w.current)return;let t=e-w.current;z.current=t,R(t/200)},B=(0,D.useCallback)(e=>{null===w.current&&(E.current+=.005),e.phi=E.current+M,e.width=2*C.current,e.height=2*C.current},[M]),j=(0,D.useCallback)(()=>{o.current&&(C.current=o.current.offsetWidth)},[]),O=(0,D.useMemo)(()=>{let e="dark"===a?U:{};return{...T,...e,...i}},[i,a]);return(0,D.useEffect)(()=>{var e,t;let i,r,a;if(window.addEventListener("resize",j),j(),!o.current)return()=>{window.removeEventListener("resize",j)};let w=(e=o.current,t={...O,width:2*C.current,height:2*C.current,onRender:B},i=(e,i,r)=>({type:e,value:void 0===t[i]?r:t[i]}),r=e.getContext("webgl2")?"webgl2":e.getContext("webgl")?"webgl":"experimental-webgl",(a=new n({canvas:e,contextType:r,context:{alpha:!0,stencil:!1,antialias:!0,depth:!1,preserveDrawingBuffer:!1,...t.context},settings:{[p]:t[p]||1,onSetup:e=>{let t=e.RGB,i=e.UNSIGNED_BYTE,r=e.TEXTURE_2D,a=e.createTexture();e.bindTexture(r,a),e.texImage2D(r,0,t,1,1,0,t,i,new Uint8Array([0,0,0,0]));let o=new Image;o.onload=()=>{e.bindTexture(r,a),e.texImage2D(r,0,t,t,i,o),e.generateMipmap(r);let n=e.getParameter(e.CURRENT_PROGRAM),s=e.getUniformLocation(n,"H");e.texParameteri(r,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(r,e.TEXTURE_MAG_FILTER,e.NEAREST),e.uniform1i(s,0)},o.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAACAAQAAAADMzoqnAAAAAXNSR0IArs4c6QAABA5JREFUeNrV179uHEUAx/Hf3JpbF+E2VASBsmVKTBcpKJs3SMEDcDwBiVJAAewYEBUivIHT0uUBIt0YCovKD0CRjUC4QfHYh8hYXu+P25vZ2Zm9c66gMd/GJ/tz82d3bk8GN4SrByYF2366FNTACIAkivVAAazQdnf3MvAlbNUQfOPAdQDvSAimMWhwy4I2g4SU+Kp04ISLpPBAKLxPyic3O/CCi+Y7rUJbio
1dcpDOFY7CgxCEXmdYD2EYK2s5lApOx5pEDDYCUwM1XdJUwBV11QQMg59kePSCaPAASQMEL2hwo6TJFgxpg+TgC2ymXPbuvc40awr3D1QCFfbH9kcoqAOkZozpQo0aqAGQRKCog/+tjkgbNFEtg2FffBvBGlSxHoAaAa1u6X4PBAwDiR8FFsrQgeUhfJTSALaB9jy5NCybJPn1SVFiWk7ywN+KzhH1aKAuydhGkbEF4lWohLXDXavlyFgHY7LBnLRdlAP6BS5Cc8RfVDXbkwN/oIvmY+6obbNeBP0JwTuMGu9gTzy1Q4RS/cWpfzszeYwd+CAFrtBW/Hur0gLbJGlD+/OjVwe/drfBxkbbg63dndEDfiEBlAd7ac0BPe1D6Jd8dfbLH+RI0OzseFB5s01/M+gMdAeluLOCAuaUA9Lezo/vSgXoCX9rtEiXnp7Q1W/CNyWcd8DXoS6jH/YZ5vAJEWY2dXFQe2TUgaFaNejCzJ98g6HnlVrsE58sDcYqg+9XY75fPqdoh/kRQWiXKg8MWlJQxUFMPjqnyujhFBE7UxIMjyszk0QwQlFsezImsyvUYYYVED2pk6m0Tg8T04Fwjk2kdAwSACqlM6gRRt3vQYAFGX0Ah7Ebx1H+MDRI5ui0QldH4j7FGcm90XdxD2Jg1AOEAVAKhEFXSn4cKUELurIAKwJ3MArypPscQaLhJFICJ0ohjDySAdH8AhDtCiTuMycH8CXzhH9jUACAO5uMhoAwA5i+T6WAKmmAqnLy80wxHqIPFYpqCwxGaYLt4Dyievg5kEoVEUAhs6pqKgFtDQYOuaXypaWKQfIuwwoGSZgfLsu/XAtI8cGN+h7Cc1A5oLOMhwlIPXuhu48AIvsSBkvtV9wsJRKCyYLfq5lTrQMFd1a262oqBck9K1V0YjQg0iEYYgpS1A9GlXQV5cykwm4A7BzVsxQqo7E+zCegO7Ma7yKgsuOcfKbMBwLC8wvVNYDsANYalEpOAa6zpWjTeMKGwEwC1CiQewJc5EKfgy7GmRAZA4vUVGwE2dPM/g0xuAInE/yG5aZ8ISxWGfYigUVbdyBElTHh2uCwGdfCkOLGgQVBh3Ewp+/QK4CDlR5Ws/Zf7yhCf8pH7vinWAvoVCQ6zz0NX5V/6GkAVV+2/5qsJ/gU8bsxpM8IeAQAAAABJRU5ErkJggg=="}}})).add("",{vertex:"attribute vec3 aPosition;uniform mat4 uProjectionMatrix;uniform mat4 uModelMatrix;uniform mat4 uViewMatrix;void main(){gl_Position=uProjectionMatrix*uModelMatrix*uViewMatrix*vec4(aPosition,1.);}",fragment:"precision highp float;uniform vec2 w,x;uniform vec3 S,T,y;uniform vec4 u[64*2];uniform float z,A,k,B,C,D,E,F,U,G;uniform sampler2D H;float I=1./k;mat3 J(float a,float b){float c=cos(a),d=cos(b),e=sin(a),f=sin(b);return mat3(d,f*e,-f*c,0.,c,e,f,d*-e,d*c);}vec3 K(vec3 c,out float v){c=c.xzy;float p=max(2.,floor(log2(2.236068*k*3.141593*(1.-c.z*c.z))*.72021));vec2 g=floor(pow(1.618034,p)/2.236068*vec2(1,1.618034)+.5),d=fract((g+1.)*.618034)*6.283185-3.883222,e=-2.*g,f=vec2(atan(c.y,c.x),c.z-1.),q=floor(vec2(e.y*f.x-d.y*(f.y*k+1.),-e.x*f.x+d.x*(f.y*k+1.))/(d.x*e.y-e.x*d.y));float n=3.141593;vec3 r;for(float h=0.;h<4.;h+=1.){vec2 s=vec2(mod(h,2.),floor(h*.5));float j=dot(g,q+s);if(j>k)continue;float a=j,b=0.;if(a>=524288.)a-=524288.,b+=.803894;if(a>=262144.)a-=262144.,b+=.901947;if(a>=131072.)a-=131072.,b+=.950973;if(a>=65536.)a-=65536.,b+=.475487;if(a>=32768.)a-=32768.,b+=.737743;if(a>=16384.)a-=16384.,b+=.868872;if(a>=8192.)a-=8192.,b+=.934436;if(a>=4096.)a-=4096.,b+=.467218;if(a>=2048.)a-=2048.,b+=.733609;if(a>=1024.)a-=1024.,b+=.866804;if(a>=512.)a-=512.,b+=.433402;if(a>=256.)a-=256.,b+=.216701;if(a>=128.)a-=128.,b+=.108351;if(a>=64.)a-=64.,b+=.554175;if(a>=32.)a-=32.,b+=.777088;if(a>=16.)a-=16.,b+=.888544;if(a>=8.)a-=8.,b+=.944272;if(a>=4.)a-=4.,b+=.472136;if(a>=2.)a-=2.,b+=.236068;if(a>=1.)a-=1.,b+=.618034;float l=fract(b)*6.283185,i=1.-2.*j*I,m=sqrt(1.-i*i);vec3 o=vec3(cos(l)*m,sin(l)*m,i);float t=length(c-o);if(t<n)n=t,r=o;}v=n;return r.xzy;}void main(){vec2 f=1./w,a=(gl_FragCoord.xy*f*2.-1.)/B-x*vec2(1,-1)*f;a.x*=w.x*f.y;float c=dot(a,a);vec4 t=vec4(0);float j=0.;int V=int(C);if(c<=.64){float b;vec4 e=vec4(0);vec3 v=vec3(0,0,1),l=normalize(vec3(a,sqrt(.64-c)));mat3 L=J(A,z);float g=dot(l,v);vec3 m=l*L,h=K(m,b);float n=asin(h.y),i=acos(-h.x/cos(n));i=h.z<0.?-i:i;float M=max(texture2D(H,vec2(i*.5/3.141593,-(n/3.141593+.5))).x,G),N=smoothstep(8e-3,0.,b),o=pow(g,E)*D,p=M*N*o,W=mix((1.-p)*pow(g,.4),p,F)+.1;e+=vec4(S*W,1.);float X=0.;for(int d=0;d<128;d+=2){if(d>=V)break;vec4 q=u[d],O=u[d+1];vec3 P=q.xyz;float r=q.w;vec3 Y=P-m;b=length(Y);if(b<r){float Q=r*.5,s=smoothstep(Q,0.,b);X+=s,e.xyz=O.w>.5?mix(e.xyz,O.xyz,s*o):mix(e.xyz,T,s*o);}}e.xyz+=pow(1.-g,4.)*y,t+=e*(1.+U)*.5,j=pow(dot(normalize(vec3(-a,sqrt(1.-c))),vec3(0,0,1)),4.)*smoothstep(0.,1.,.2/(c-.64));}else{float R=sqrt(.2/(c-.64));j=smoothstep(.5,1.,R/(R+1.));}gl_FragColor=t+vec4(j*y,j);}",uniforms:{w:{type:"vec2",value:[t.width,t.height]},z:i("float","phi"),A:i("float",s),k:i("float",l),D:i("float",c),G:i("float",A),S:i("vec3",f),T:i("vec3",u),E:i("float",m),y:i("vec3",h),F:i("float",v),u:{type:"vec4",value:S(t[d],t[l])},C:{type:"float",value:2*t[d].length}
1,x:i("vec2",g,[0,0]),B:i("float",b,1),U:i("float",y,1)},mode:4,geometry:{vertices:[{x:-100,y:100,z:0},{x:-100,y:-100,z:0},{x:100,y:100,z:0},{x:100,y:-100,z:0},{x:-100,y:-100,z:0},{x:100,y:100,z:0}]},onRender:({uniforms:e})=>{let i={};if(t.onRender){for(let r in i=t.onRender(i)||i,x)void 0!==i[r]&&(e[x[r]].value=i[r]);if(void 0!==i[d]){let t=void 0!==i[l]?i[l]:e.k.value;e.u.value=S(i[d],t),e.C.value=i[d].length}i.width&&i.height&&(e.w.value=[i.width,i.height]),void 0!==i[l]&&(e.u.value=S(i[d]||t[d],i[l]))}}}),a),z=window.requestAnimationFrame(()=>{o.current&&(o.current.style.opacity="1")});return()=>{window.cancelAnimationFrame(z),w.destroy(),window.removeEventListener("resize",j)}},[B,j,O]),(0,r.jsx)("div",{className:(0,F.cn)("absolute inset-0 mx-auto aspect-square w-full max-w-[560px]",t),children:(0,r.jsx)("canvas",{ref:o,className:"size-full opacity-0 transition-opacity duration-500 [contain:layout_paint_size]",onPointerDown:e=>k(e.clientX-z.current),onPointerUp:()=>k(null),onPointerOut:()=>k(null),onMouseMove:e=>P(e.clientX),onTouchMove:e=>{e.touches[0]&&P(e.touches[0].clientX)}})})}}}]);

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.