1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2039],{2039:function(a,b,c){"use strict";c.d(b,{T:function(){return _}});var d=c(85893),e=c(67294),f=c(45697),g=c.n(f),h=c(4960),i=c(84827),j=c(94184),k=c.n(j),l=c(41033),m=c(85769),n=c(49637),o=c(6493),p=c(12658),q=c(3921),r=c(11924),s=c(69891),t=c(84033),u=c(2848),v=c(2534),w=c(26511),x=c(37014),y=c(62880),z=c(32407),A=c(90034),B=c(7704),C=c(91293),D=c(15593),E=c(17282),F=c(75730),G=c(27006),H=c(51438),I=c(29815),J=c(44532),K=c(11052),L=c(69542),M=c(97163),N=c(3811),O=function a(){var b=arguments.length>0&& void 0!==arguments[0]?arguments[0]:1,c=arguments.length>1&& void 0!==arguments[1]?arguments[1]:32,d=arguments.length>2&& void 0!==arguments[2]?arguments[2]:16,e=arguments.length>3&& void 0!==arguments[3]?arguments[3]:0,f=arguments.length>4&& void 0!==arguments[4]?arguments[4]:2*Math.PI,g=arguments.length>5&& void 0!==arguments[5]?arguments[5]:0,h=arguments.length>6&& void 0!==arguments[6]?arguments[6]:Math.PI;(0,H.Z)(this,a),c=Math.max(3,Math.floor(c)),d=Math.max(2,Math.floor(d));for(var i=Math.min(g+h,Math.PI),j=0,k=[],l=new J.P,m=new J.P,n=new K.T,o=[],p=[],q=[],r=[],s=[],t=[],v=0;v<=d;v++){var w=[],x=v/d,y=0;L.seededRandom(13333337),0===v&&0===g?y=.5/c:v===d&&i===Math.PI&&(y=-0.5/c);for(var z=0;z<=c;z++){var A,B=z/c;l.x=-b*Math.cos(e+B*f)*Math.sin(g+x*h),l.y=b*Math.cos(g+x*h),l.z=b*Math.sin(e+B*f)*Math.sin(g+x*h),p.push(l.x,l.y,l.z),n.position.copy(l);var C=Math.random();t.push(C),n.scale.setScalar(C),m.copy(l).normalize(),n.lookAt(0,0,0),n.rotateY(Math.PI),q.push(m.x,m.y,m.z),n.updateMatrix();var D=n.matrix.toArray();(A=r).push.apply(A,(0,I.Z)(D)),s.push(B+y,1-x),w.push(j++)}k.push(w)}for(var E=0;E<d;E++)for(var F=0;F<c;F++){var G=k[E][F+1],O=k[E][F],P=k[E+1][F],Q=k[E+1][F+1];(0!==E||g>0)&&o.push(G,O,Q),(E!==d-1||i<Math.PI)&&o.push(O,P,Q)}var R=new M.L;return R.copy(new u.B(.5,.5)),R.instanceCount=p.length/3,R.setAttribute("inst_position",new N.l(new Float32Array(p),3)),R.setAttribute("inst_normal",new N.l(new Float32Array(q),3)),R.setAttribute("inst_matrix",new N.l(new Float32Array(r),16)),R.setAttribute("inst_uv",new N.l(new Float32Array(s),2)),R.setAttribute("inst_size",new N.l(new Float32Array(t),1)),R};(0,v.e)({Mesh:q.K});var P=e.memo(function(a){var b=a.radius,c=void 0===b?16:b,f=a.widthSegment,g=void 0===f?200:f,h=a.heightSegment,i=void 0===h?200:h,j=a.eachScale,k=void 0===j?.5:j,l=a.eachRandomnesss,n=void 0===l?.5:l,o=a.pulseSpeed,p=void 0===o?1:o,q=a.pulseAmp,r=void 0===q?1:q,s=a.pulseUV,t=void 0===s?1:s,u=a.colors,w=void 0===u?[]:u,x=a.particleTexture,y=void 0===x?new D.x:x,z=(0,m.m)("/textures/128_earth_specular_map-invert-displace.png"),A=(0,e.useMemo)(function(){return new O(c,g,i)},[c,g,i]);(0,e.useEffect)(function(){return function(){A.dispose()}},[A]);var B=(0,e.useMemo)(function(){return{particleTexture:{value:y},displacement:{value:z},pulseSpeed:{value:p},pulseAmp:{value:r},pulseUV:{value:t},eachScale:{value:k},eachRandomnesss:{value:n},color0:{value:new E.I(w[0])},color1:{value:new E.I(w[1])},color2:{value:new E.I(w[2])},color3:{value:new E.I(w[3])},time:{value:0}}},[y,z,k,t,r,p,w,n]);(0,v.x)(function(a,b){B.time.value+=b});var C=(0,e.useMemo)(function(){return new F.j({uniforms:B,transparent:!0,depthWrite:!1,side:G.Wl3,vertexShader:"\n #include <common>\n\n #define PIE 3.14159265;\n\n mat3 calcLookAtMatrix(vec3 origin, vec3 target, float roll) {\n vec3 rr = vec3(sin(roll), cos(roll), 0.0);\n vec3 ww = normalize(target - origin);\n vec3 uu = normalize(cross(ww, rr));\n vec3 vv = normalize(cross(uu, ww));\n\n return mat3(uu, vv, ww);\n }\n\n uniform float time;\n uniform float radius;\n\n uniform sampler2D displacement;\n // uniform sampler2D dayMap;\n\n attribute vec3 inst_position;\n attribute vec3 inst_normal;\n attribute vec2 inst_uv;\n attribute mat4 inst_matrix;\n attribute float inst_size;\n\n varying float v_inst_size;\n varying vec2 vUv;\n varying float vHidden;\n\n uniform float eachRandomnesss;\n uniform float eachScale;\n uniform float pulseUV;\n uniform float pulseSpeed;\n uniform float pulseAmp;\n\n void main (void) {\n vUv = uv;\n\n vec4 displacementData = texture2D(displacement, inst_uv);
1\n\n vec4 vert = vec4(position, 1.0);\n\n v_inst_size = inst_size;\n\n vec4 mvPosition = modelViewMatrix * inst_matrix * vec4( 0, 0, 0, 1. );\n\n mvPosition.xyz += vert.xyz * (inst_size * eachRandomnesss + eachScale);\n\n // TODO: really need to optimize above\n\n vHidden = 1.0;\n if (displacementData.r <= 0.1) {\n vHidden = 0.0;\n }\n\n gl_Position = projectionMatrix * mvPosition;\n }\n ",fragmentShader:"\n varying float v_inst_size;\n varying vec2 vUv;\n varying float vHidden;\n\n uniform sampler2D particleTexture;\n uniform vec3 color0;\n uniform vec3 color1;\n uniform vec3 color2;\n uniform vec3 color3;\n\n void main (void) {\n\n float alpha = texture2D(particleTexture, vUv).r;\n\n if (v_inst_size >= 0.75) {\n gl_FragColor = vec4(color0, alpha);\n } else if (v_inst_size >= 0.5) {\n gl_FragColor = vec4(color1, alpha);\n } else if (v_inst_size >= 0.25) {\n gl_FragColor = vec4(color2, alpha);\n } else {\n gl_FragColor = vec4(color3, alpha);\n }\n gl_FragColor.rgb *= 1.4;\n gl_FragColor *= vHidden;\n }\n "})},[B]);return(0,d.jsx)(d.Fragment,{children:A&&C&&(0,d.jsx)("mesh",{args:[A,C],userData:{enableBloom:!0},frustumCulled:!1,renderOrder:2})})});P.displayName="ParsC";var Q=c(90612),R=c(84710),S=c(34395),T=c(41499),U=c(61351),V=c(43163),W=c(27931);function X(a){var b=a.children,c=a.radius,f=void 0===c?16:c,g=a.coord,h=void 0===g?{lat:0,lng:0}:g,i=a.markerTexture,j=void 0===i?new D.x:i,k=a.showMarker,l=(0,e.useRef)(),m=(0,e.useRef)();return(0,e.useEffect)(function(){var a=l.current,b=h.lat,c=h.lng,d=b*Math.PI/180,e=(270-c)*Math.PI/180,g=new U.U(d/2,e,0,"XYZ"),i=new V._().copy(a.quaternion),j=new V._().setFromEuler(g),k=new V._,n=new W.$;n.set(16,d,e);var o=Math.PI/2;return m.current.position.set(f*Math.sin(d+o)*Math.cos(e+o),f*Math.cos(d-o),f*Math.sin(d+o)*Math.sin(e+o)),(0,Q.j)({from:0,to:100,duration:1e3,ease:R.mZ,onUpdate:function(b){k.slerpQuaternions(i,j,b/100),a.quaternion.copy(k),a.updateMatrix()}}),function(){}},[h,f]),(0,d.jsxs)("group",{ref:l,children:[b,(0,d.jsx)("sprite",{ref:m,renderOrder:3,scale:2,position:[0,0,f],visible:void 0===k||k,children:(0,d.jsx)("spriteMaterial",{transparent:!0,depthWrite:!0,depthTest:!0,alphaMap:j,color:"#fff"})})]})}(0,v.e)({Group:p.Z,Sprite:S.j,SpriteMaterial:T.x});var Y=c(93288),Z=c.n(Y);(0,v.e)({Group:p.Z,Mesh:q.K,MeshMatcapMaterial:r.k,SphereGeometry:s.x,MeshBasicMaterial:t.v,PlaneBufferGeometry:u.B});var $={className:g().string,autoRotate:g().bool,autoRotateSpeed:g().number,parentRef:g().oneOfType([g().func,g().shape({current:g().any})]),locationCoord:g().shape({lat:g().number,lng:g().number}),showMarker:g().bool,stats:g().bool};function _(a){var b=a.className,c=a.locationCoord,f=a.parentRef,g=a.showMarker,j=a.stats,m=k()(Z().Globe,b),n=(0,z.Z)(function(a){return a.windowSize}),o=(0,y.Z)(function(a){return a.layoutRef});(0,e.useEffect)(function(){var a=function(a){var b=a.target;if(f.current){var c=f.current.clientHeight-b.clientHeight;p.set(Math.min(b.scrollTop,c)/c)}},b=o.current;if(b&&(null==f?void 0:f.current))return b.addEventListener("scroll",a),function(){b.removeEventListener("scroll",a)}},[f,o,n]);var p=(0,h.c)(0),q=(0,i.H)(p,[0,1.2],[5,80]),r=(0,i.H)(p,[0,1],[10,0]),s=(0,i.H)(p,[0,1],[80,100]),t=(0,i.H)(p,[0,1],[.3,.8]),u=(0,B.Z)(function(a){return a.performanceTier});return(0,d.jsx)("div",{className:m,children:(0,d.jsxs)(w.Z,{controls:!1,children:[j&&(0,d.jsx)(l.j,{}),(0,d.jsx)(x.A,{makeDefault:!0,fov:25,near:2,far:2e3,"rotation-y":t,position:[q,r,s]}),(0,d.jsx)(ab,{locationCoord:c,showMarker:g}),u>1&&(0,d.jsx)(A.Z,{intensity:8,multisampling:u<4?C._w.lowRes:C._w.highRes})]})})}_.propTypes=$,_.defaultProps={className:"",autoRotate:!1,autoRotateSpeed:.3,locationCoord:{lat:43.598538454109324,lng:-79.58815445595137},showMarker:!0,stats:!1};var aa={earthColor:"#02067c",bgColor:"#030222",colorA:"#0026ff",colorB:"#53d4ff",colorC:"#3853ff",colorD:"#704de8",widthSegment:200,heightSegment:200,eachScale:.5,eachRandomnesss:.1,pulseSpeed:.1,pulseAmp:1,pulseUV:1};function ab(a){var b=a.locationCoord,c=a.showMarker,f=(0,m.m)("/textures/glow_particle.png"),g=(0,m.m)("/textures/globe-matcap-256px.png");return(0,d.jsx)(e.Suspense,{fallback:null,children:(0,d.jsxs)("group",{rotation:[0,0,0],children:[(0,d.jsx)(n.V,{children:(0,d.jsx)(o.JO,{scale:90,children:(0,d.jsx)("meshBasicMaterial",{transparent:!0,opacity:.8,alphaMap:f,color:"#1c26b6",depthTest:!1,depthWrite:!1})})}),(0,d.jsxs)(X,{coord:b,radius:15.8,markerTexture:f,showMarker:c,children:[(0,d.jsxs)("mesh",{renderOrder:1,scale:15.5,children:[(0,d.jsx)("sphereGeometry",{args:[1,32,32]}),(0,d.jsx)("meshMatcapMaterial",{matcap:g,transparent:!0,toneMapped:!1,color:"#1214B0"})]}),(0,d.jsx)(P,{colors:[aa.colorA,aa.colorB,aa.colorC,aa.colorD],radius:15.6,eachScale:aa.eachScale,eachRandomnesss:aa.eachRandomnesss,pulseSpeed:aa.pulseSpeed,pulseAmp:aa.pulseAmp,pulseUV:aa.pulseUV,widthSegment:aa.widthSegment,heightSegment:aa.heightSegment,particleTexture:f})]})]})})}},37014:function(a,b,c){"use strict";c.d(b,{A:function(){return o}});var d=c(26042),e=c(99534),f=c(85893),g=c(67294),h=c(2534),i=c(35878),j=c(56831),k=c(45697),l=c.n(k),m=c(92096);(0,h.e)({PerspectiveCamera:m.c});var n={makeDefault:l().bool,syncDom:l().bool},o=(0,g.forwardRef)(function(a,b){var c=a.makeDefault,k=a.syncDom,l=(0,e.Z)(a,["makeDefault","syncDom"]),m=(0,h.w)(function(a){return a.set}),n=(0,h.w)(function(a){return a.camera}),o=(0,h.w)(function(a){return a.size}),p=(0,g.useRef)();return(0,g.useLayoutEffect)(function(){var a=p.current;a&&(a.aspect=o.width/o.height,k&&(a.fov=2*Math.atan(o.width/a.aspect/(2*a.position.z))*(180/Math.PI)),a.updateProjectionMatrix())},[o,k]),(0,g.useLayoutEffect)(function(){if(c&&p.current){var a=n;return m(function(){return{camera:p.current}}),function(){return m(function(){return{camera:a}})}}},[n,p,c,m]),(0,f.jsx)(j.E.perspectiveCamera,(0,d.Z)({transition:{duration:2,ease:"easeInOut",type:"tween"},ref:(0,i.Z)([p,b])},l))});o.displayName="MotionPerspectiveCamera",o.propTypes=n,o.defaultProps={makeDefault:!1,syncDom:!1}},93288:function(a){a.exports={SplitParent:"Globe_SplitParent__ctaGr",SplitParentFade:"Globe_SplitParentFade__VnFAW",SplitChild:"Globe_SplitChild__weFrb",SplitChildFade:"Globe_SplitChildFade__n7Kqm",unknown__pt__mark__blue:"Globe_unknown__pt__mark__blue__9VqFn",Globe:"Globe_Globe__2oQX0",wrappedUnderline:"Globe_wrappedUnderline__5nq4S"}}}])
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.