PageSourceSearch

https://moguwind.pages.dev/assets/myRoutes-pryEk3Sw.js

js moguwind.pages.dev collected 2026-10-03 05:28:00 UTC 1,708 bytes, 1 lines download raw bytes

1function u(t){return t.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&apos;/g,"'").replace(/&#(\d+);/g,(e,r)=>String.fromCharCode(parseInt(r,10))).replace(/&#x([0-9a-f]+);/gi,(e,r)=>String.fromCharCode(parseInt(r,16)))}function w(t){var c;const e=new DOMParser().parseFromString(t,"application/xml");if(e.querySelector("parsererror"))throw new Error("GPX inválido");const n=e.querySelector("trk > name")||e.querySelector("rte > name")||e.querySelector("gpx > metadata > name"),a=u(((c=n==null?void 0:n.textContent)==null?void 0:c.trim())||"Ruta sin nombre"),s=Array.from(e.querySelectorAll("trkpt, rtept"));if(s.length===0)throw new Error("No hay puntos en el GPX");const f=s.map(o=>{const d=parseFloat(o.getAttribute("lat")||""),g=parseFloat(o.getAttribute("lon")||""),l=o.querySelector("ele"),m=l?parseFloat(l.textContent||""):void 0;return{lat:d,lon:g,ele:m}}).filter(o=>!isNaN(o.lat)&&!isNaN(o.lon));return{name:a,points:f}}function h(t,e){if(t.length<=e)return t;const r=(t.length-1)/(e-1),n=[];for(let a=0;a<e;a++)n.push(t[Math.round(a*r)]);return n}const i="mw:my-routes",y=50;function p(){if(typeof window>"u")return[];try{const t=window.localStorage.getItem(i);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e.map(r=>({...r,name:u(r.name)})):[]}catch{return[]}}function S(t){if(!(typeof window>"u"))try{const e=p(),r=e.findIndex(n=>n.id===t.id);for(r>=0&&e.splice(r,1),e.unshift(t);e.length>y;)e.pop();window.localStorage.setItem(i,JSON.stringify(e))}catch{}}function N(t){if(!(typeof window>"u"))try{const e=p().filter(r=>r.id!==t);window.localStorage.setItem(i,JSON.stringify(e))}catch{}}export{N as a,p as g,w as p,h as r,S as s};

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.