1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[835],{9723:t=>{t.exports={tooltip:"Chart_tooltip__bnhJF"}},42835:(t,e,l)=>{"use strict";l.r(e),l.d(e,{default:()=>b});var a=l(95155),n=l(26991),o=l(4471),r=l(68425),i=l(47734),s=l(73697),c=l(23508),d=l(77568),h=l(2821),u=l(12115),f=l(15880),p=l.n(f),x=l(73379);let m=t=>t*Math.PI/180;var y=l(9723),v=l.n(y);let j=t=>{let{active:e,payload:l}=t;if(!e||!l||0===l.length)return;let{distance:n,elevation:o}=null==l?void 0:l[0].payload;return(0,a.jsxs)("div",{className:v().tooltip,children:[(0,a.jsxs)("p",{children:[n," km"]}),(0,a.jsxs)("p",{children:[o," hm"]})]})},b=t=>{let{className:e,color:l,gpxPath:f,onMouseOver:y}=t,b=(t=>{let[e,l]=(0,u.useState)([]);return(0,u.useEffect)(()=>{t&&(async()=>{try{var e;let a=await (0,x.A)(t).get(),n=await a.data,o=new(p());o.parse(n);let r=null==(e=o.tracks)?void 0:e[0],i=(null==r?void 0:r.points)||[],s=0,c=i.map((t,e)=>{if(0===e)return{distance:0,elevation:t.ele,index:e,latitude:t.lat,longitude:t.lon};let l=i[e-1],a="number"==typeof l.lat&&"number"==typeof l.lon&&"number"==typeof t.lat&&"number"==typeof t.lon?((t,e,l,a)=>{let n=m(l-t),o=m(a-e),r=Math.sin(n/2)**2+Math.cos(m(t))*Math.cos(m(l))*Math.sin(o/2)**2;return 2*Math.atan2(Math.sqrt(r),Math.sqrt(1-r))*6371e3/1e3})(l.lat,l.lon,t.lat,t.lon):0;return s+=a,{distance:Number(s.toFixed(3)),elevation:t.ele,index:e,latitude:t.lat,longitude:t.lon}});l(c)}catch(t){}})()},[t]),e})(f);return(0,a.jsx)("div",{className:(0,h.A)(v().chart,e),children:b.length>0&&(0,a.jsx)(n.u,{width:"100%",height:"100%",children:(0,a.jsxs)(o.X,{data:b,margin:{bottom:40},onMouseMove:t=>{let{activePayload:e}=t;if(e&&e.length>0){var l,a;a=null==e||null==(l=e[0])?void 0:l.payload,y&&y(a)}},onMouseLeave:()=>{y&&y(null)},children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:"colorUv",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,a.jsx)("stop",{offset:"0%",stopColor:l,stopOpacity:.8}),(0,a.jsx)("stop",{offset:"100%",stopColor:l,stopOpacity:.05})]})}),(0,a.jsx)(r.d,{fill:"#000000",fillOpacity:.2,strokeDasharray:"3 3"}),(0,a.jsx)(i.W,{dataKey:"distance",tick:{angle:-90,fill:"#fbfff5b2",fontSize:12,textAnchor:"end"},tickFormatter:t=>"".concat(t," km")}),(0,a.jsx)(s.h,{domain:t=>{let[e,l]=t;return[e-10,l+10]},tick:{angle:-45,fill:"#fbfff5b2",fontSize:12,whiteSpace:"nowrap"},tickFormatter:t=>"".concat(t," hm")}),(0,a.jsx)(c.m,{content:j}),(0,a.jsx)(d.G,{dataKey:"elevation",fillOpacity:1,fill:"url(#colorUv)",stroke:l,type:"monotone"})]})})})}}}]);
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.