1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5da30b8b-5c38-485b-85e1-c5d1dcebbee0",e._sentryDebugIdIdentifier="sentry-dbid-5da30b8b-5c38-485b-85e1-c5d1dcebbee0")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2617],{89897:function(e,t,n){var i=n(35944),a=n(67294);t.Z=e=>{let{onFileSelected:t,trigger:n,onDialogOpened:r,accept:l,multiple:o=!0}=e,s=(0,a.useRef)(null);return(0,a.useEffect)(()=>{n&&s.current&&(s.current.click(),r&&r())},[n,r]),(0,i.tZ)(i.HY,{children:(0,i.tZ)("input",{type:"file",ref:s,style:{display:"none"},onChange:e=>{let n=e.target.files;if(n&&n.length){let e=Array.from(n);t(e)}e.target.value=""},accept:l||".gpx, .kml, .kmz, application/gpx, application/gpx+xml, application/octet-stream, application/vnd.google-earth.kml+xml, application/vnd.google-earth.kmz, application/xml",multiple:o})})}},42617:function(e,t,n){n.d(t,{Z:function(){return P}});var i=n(35944),a=n(67294),r=n(61730),l=n(42293),o=n(65582),s=n(10155),c=n(5616),u=n(93946),p=n(11057),d=n(18972),h=n(15861),g=n(69661),m=n(21023),v=n(28201),f=n(45111),Z=n(76638),x=n(25675),A=n.n(x),b=n(11163),w=n(46670),y=n(67421),k=n(20377),I=n(51177),M=n(43575),S=n(52141),R={src:"/_next/static/media/trailmap-logo.0c9a4a8c.png",height:160,width:824,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAACCAMAAABSSm3fAAAAFVBMVEU4PUQ4PUY4PUU5WzRFdiJQeCg5PEb8IGExAAAAB3RSTlNbZUU1JBNMWqi0QwAAAAlwSFlzAAALEwAACxMBAJqcGAAAABpJREFUeJxjYGZhZGJkYGNiYGFlZmBkYGQEAAFvACPgsmPeAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:2},C=n(89897),E=n(77688),G=n(54181),B=n(12614),U=n(48750),z=n(1229),D=n(44347),L=n(80087),F=n(16281),O=n(27446),i18n_LanguageSwitcher=e=>{var t;let{color:n="black"}=e,{t:a,i18n:r}=(0,y.$G)(),l=(0,O.U)(),o=(0,M.o_)({variant:"popover",popupId:"languageMenu"}),s=null!==(t=(0,F.G7)(r.language))&&void 0!==t?t:F.ZW;return(0,i.BX)(i.HY,{children:[(0,i.BX)(u.Z,{...(0,M.vW)(o),"aria-label":a("common.changeLanguage"),sx:{color:n,px:.5},"data-sentry-element":"IconButton","data-sentry-source-file":"LanguageSwitcher.tsx",children:[(0,i.tZ)(L.Z,{sx:{fontSize:24},"data-sentry-element":"LanguageIcon","data-sentry-source-file":"LanguageSwitcher.tsx"}),(0,i.tZ)(h.Z,{sx:{ml:.25,fontSize:"0.85rem",fontWeight:500},"data-sentry-element":"Typography","data-sentry-source-file":"LanguageSwitcher.tsx",children:F.dy[s]}),(0,i.tZ)(f.Z,{sx:{fontSize:18,ml:-.25},"data-sentry-element":"ArrowDropDownIcon","data-sentry-source-file":"LanguageSwitcher.tsx"})]}
1),(0,i.tZ)(D.Z,{...(0,M.wK)(o),container:document.getElementsByClassName("FullScreen")[0]||document.body,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},"data-sentry-element":"Menu","data-sentry-source-file":"LanguageSwitcher.tsx",children:F.lE.map(e=>(0,i.tZ)(d.Z,{selected:e===s,onClick:()=>{l(e),o.close()},children:(0,i.BX)(c.Z,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:120},children:[(0,i.tZ)(h.Z,{sx:{fontWeight:600,width:28},children:F.dy[e]}),(0,i.tZ)(h.Z,{children:F.tK[e]})]})},e))})]})},_=n(50144);let getUserInitials=e=>{var t,n,i,a;if(!(null==e?void 0:e.trim()))return"";let r=e.trim().split(/\s+/),l=null!==(i=null===(t=r[0])||void 0===t?void 0:t[0])&&void 0!==i?i:"",o=null!==(a=null===(n=r[1])||void 0===n?void 0:n[0])&&void 0!==a?a:"";return(l+o).toUpperCase()},N=(0,w.Pi)(e=>{var t,n,x;let{routeId:w,routeEditor:D}=e,{t:L}=(0,y.$G)(),F=(0,_.G)(),O=(0,G.cr)(G.dF),N=(0,a.useRef)(null),P=(0,b.useRouter)(),H=(0,S.lM)(),Y=(0,S.LZ)(),T=(0,S.yc)(),[W,X]=(0,a.useState)(!1),J=(0,r.Z)("(max-width:800px)"),K=(0,r.Z)("(max-width:950px)"),Q=T.isPhone,V=(0,S.HB)(),q=(0,E.Z)(()=>P.push("/geoitems")),{enqueueSnackbar:j}=(0,k.Ds)(),$=(0,S.i)(),ee=$.waypoints.length<1,et=(0,M.o_)({variant:"popover",popupId:"userMenu"}),en=(0,M.o_)({variant:"popover",popupId:"routesMenu"}),ei=(0,M.o_)({variant:"popover",popupId:"geoitemsMenu"}),ea=(0,M.o_)({variant:"popover",popupId:"supportMenu"}),er=(0,M.o_)({variant:"popover",popupId:"mapsMenu"}),handleRouteModeActivation=()=>{let e=w;if(w){let t=(0,z.g)(e,!0);P.replace(t,"/",{shallow:!0})}else{e=$.id;let t=(0,z.g)(e,!0);P.push(t,"/",{shallow:!0}),setTimeout(()=>{P.push(t,"/",{shallow:!0})},100)}},el=[{title:L("nav.routeLibrary"),href:"/routes/"},{title:L("nav.showRoutesOnMap"),action:()=>{"/"!==P.pathname&&P.push("/"),V.setRouteFilterControlOpen(!0)}},{title:L("nav.collections"),href:"/collections/"}],eo=null!=D?{title:D?L("nav.stopRouteEditor"):ee?L("nav.createRoute"):L("nav.editRoute"),action:()=>{if(D){if(void 0!==w){$.closeRouteDrawer();let e=(0,z.g)(w,!1);P.replace(e,"/",{shallow:!0})}}else handleRouteModeActivation()}}:null,es=eo?[eo,...el]:[...el];(0,G.cr)(G.iK)&&es.push({title:$.useGHRouting?L("nav.switchRoutingOld"):L("nav.switchRoutingNew"),action:()=>$.setUseGHRouting(!$.useGHRouting)});let ec=[{title:L("nav.openFile"),action:()=>X(!0)},{title:L("nav.tracksAndStrava"),action:q},{title:L("nav.clearTracks"),action:()=>Y.clearGeoitems()}],eu=[{title:L("nav.mapsForApps"),href:"/maps/apps"},{title:L("nav.ownRasterMaps"),href:"/maps/"},{title:L("nav.readyRoutes"),href:"https://reittikone.fi",external:!0}];(null==H?void 0:null===(t=H.userData)||void 0===t?void 0:t.isOSMMapper)&&eu.push({title:L("nav.mapping"),href:"/mapper"}),(!T.vectorMapsEnabled||O)&&eu.push({title:T.vectorMapsEnabled?L("nav.oldMapEngine"):L("nav.newMapEngine"),action:()=>{T.setVectorMapsEnabled(!T.vectorMapsEnabled),P.replace(P.asPath)}});let ep=[{title:L("nav.mapLegend"),action:()=>{"/"!==P.pathname&&P.push("/"),T.setMapInfoDialogOpen(!0)}},{title:L("nav.quickGuide"),action:()=>{"/"!==P.pathname&&P.push("/"),H.setQuickTourDialogOpen(!0)}},{title:L("nav.userGuide"),href:"/support/support-site?url="+F("/support")},{title:L("nav.supportSite"),href:"/support/support-site?url="+F("/")}],ed=[{id:"routes",title:L("nav.routes"),menu:es},{id:"tracks",title:L("nav.tracks"),menu:ec},K||!(0,G.cr)(G.kL)?void 0:{id:"places",title:L("nav.places"),href:"/places"},{id:"maps",title:L("nav.maps"),menu:eu},{id:"info",title:L("nav.info"),menu:ep}].filter(e=>void 0!==e),eh=[{title:L("nav.settings"),action:()=>P.push("/users/settings")},{title:L("nav.logOut"),action:()=>void H.logOut().then(()=>{j(L("auth.loggedOut"),{variant:"success"}),P.push("/")})}],[eg,em]=a.useState(null),handleCloseNavMenu=()=>{em(null)};return(0,i.BX)(i.HY,{children:[Q?(0,i.tZ)(B.Gm,{}):(0,i.tZ)(l.Z,{ref:N,position:"fixed",elevation:1,sx:{backgroundColor:"white",height:"56.5px",zIndex:e=>e.zIndex.drawer+1},onTouchStart:e=>{e.stopPropagation(),e.preventDefault()},onTouchMove:e=>{e.stopPropagation(),e.preventDefault()},children:(0,i.tZ)(o.Z,{maxWidth:"xl",children:(0,i.BX)(s.Z,{disableGutters:!0,sx:{minHeight:"56.5px",pt:0},children:[(0,i.tZ)(c.Z,{sx:{mt:-.5,pt:0,position:"relative",width:"166px",height:"32px","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"},marginRight:{"@media (min-width:600px) and (max-width: 679px)":{marginRight:"12px"},"@media (min-width:680px) and (max-width: 899px)":{marginRight:"60px"},md:"120px"},display:{xs:"none",sm:"block"},cursor:"pointer"},children:(0,i.tZ)(A(),{src:R,alt:"logo",width:166,priority:!0,unoptimized:!0,style:{objectFit:"cover"},onClick:()=>P.push("/")})}),(0,i.BX)(c.Z,{sx:{flexGrow:1,display:{xs:"none",sm:"flex"}},children:[(0,i.tZ)(u.Z,{sx:{mt:-.5},onClick:()=>{P.push("/")},children:(0,i.tZ)(Z.Z,{sx:{fontSize:28}})}),ed.map(e=>{if(!e)return null;if(!e.menu)return(0,i.tZ)(p.Z,{onClick:()=>{handleCloseNavMenu(),Array.isArray(e.href)?P.push(e.href[0],e.href[1]):P.push(e.href)},sx:{mt:1,mb:1.5,color:"black",display:"block"},children:e.title},null==e?void 0:e.id);{let t="routes"===e.id?en:"tracks"===e.id?ei:"maps"===e.id?er:ea;return(0,i.BX)(a.Fragment,{children:[(0,i.tZ)(p.Z,{...(0,M.b8)(t),sx:{mt:1,mb:1.5,color:"black",display:"flex",flexDirection:"row",alignItems:"center","& .MuiButton-endIcon":{marginLeft:"-1px"}},endIcon:(0,i.tZ)(f.Z,{}),children:e.title}),(0,i.tZ)(I.Z,{container:document.getElementsByClassName("FullScreen")[0]||document.body,...(0,M.wK)(t),anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:e.menu.map(e=>(0,i.tZ)(d.Z,{onClick:()=>{t.close(),(null==e?void 0:e.action)&&e.action(),(null==e?void 0:e.href)&&(e.external?window.open(e.href,"_blank","noopener,noreferrer"):P.push(e.href))},children:(0,i.tZ)(h.Z,{textAlign:"center",children:e.title})},e.title))})]},e.id)}})]}),(0,i.tZ)(c.Z,{sx:{flexGrow:0,mr:3,display:{xs:"none",sm:"flex"},alignItems:"center"},children:(0,i.tZ)(i18n_LanguageSwitcher,{})}),(0,i.tZ)(U.i,{children:(0,i.tZ)(c.Z,{sx:{flexGrow:0},children:H.isLoggedIn?(0,i.BX)(i.HY,{children:[(0,i.tZ)(u.Z,{...(0,M.b8)(et),sx:{p:0,mt:1,mb:1.5},children:getUserInitials(null===(n=H.userData)||void 0===n?void 0:n.userName)?(0,i.tZ)(g.Z,{sx:{bgcolor:"primary.main",width:36,height:36,fontSize:"1rem"},children:getUserInitials(null===(x=H.userData)||void 0===x?void 0:x.userName)}):(0,i.tZ)(v.Z,{fontSize:"large"})}),(0,i.tZ)(I.Z,{container:document.getElementsByClassName("FullScreen")[0]||document.body,...(0,M.wK)(et),anch
1orOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:eh.map(e=>(0,i.tZ)(d.Z,{onClick:()=>{et.close(),e.action()},children:(0,i.tZ)(h.Z,{textAlign:"center",children:e.title})},e.title))})]}):(0,i.tZ)(m.Z,{title:L("auth.signInRegister"),children:(0,i.tZ)(p.Z,{onClick:()=>P.push("/users/sign-in"),variant:"contained",children:J?L("auth.signIn"):L("auth.signInRegister")})})})})]})})}),(0,i.tZ)(C.Z,{onFileSelected:e=>{e&&(Y.importFiles(e),P.push("/"))},trigger:W,onDialogOpened:()=>X(!1)}),!Q&&(0,i.tZ)(c.Z,{sx:{height:"56px"}})]})});var P=N},48750:function(e,t,n){n.d(t,{i:function(){return o}});var i=n(35944);n(67294);var a=n(46670),r=n(52141),l=n(82608);let o=(0,a.Pi)(e=>{let{children:t}=e,n=(0,r.lM)(),a=n.isUserInitialized;return a?(0,i.tZ)(i.HY,{children:t}):(0,i.tZ)(l.T,{open:!0})})},77688:function(e,t,n){var i=n(52141);t.Z=e=>{let t=(0,i.lM)();return()=>{t.isLoggedIn?e():t.setIsNotLoggedInDialogOpen(!0)}}},1229:function(e,t,n){n.d(t,{g:function(){return getRouteUrl}});var i=n(49578);function getRouteUrl(e,t){return e?"/?route=".concat(e,"&edit=").concat(t.toString()):"/?route=".concat(i.Ui,"&edit=").concat(t.toString())}}}]);
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.