PageSourceSearch

https://www.weroad.com/_nuxt/CfPCp6F5.js

js weroad.com collected 2026-09-24 10:11:29 UTC 25,618 bytes, 67 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:weroad":!0});var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`81f7575d-ab62-4240-b29d-5ee9299a55c1`,e._sentryDebugIdIdentifier=`sentry-dbid-81f7575d-ab62-4240-b29d-5ee9299a55c1`)}catch{}})();import{n as e}from"./C-YCFWbE.js";import{J as t,R as n,V as r,W as i,Y as a,Yt as o,Zt as s,_t as c,d as l,f as u,kt as d,lt as f,ot as p,p as m,q as h,r as g,u as _,wt as v,x as y,xt as b}from"./BSXR3eMi.js";import{u as x}from"./CSQlDpKi.js";import{h as S}from"./B3KSCJh4.js";import{t as C}from"./Dmf5a-0n2.js";import{t as w}from"./DABLNm_a.js";var T={clickableIcons:!1,streetViewControl:!1,panControlOptions:!1,gestureHandling:`cooperative`,mapTypeControl:!1,zoomControlOptions:{style:`SMALL`},fullscreenControlOptions:{position:9},styles:[{featureType:`all`,elementType:`all`,stylers:[{visibility:`simplified`}]},{featureType:`administrative`,elementType:`labels`,stylers:[{visibility:`off`}]},{featureType:`administrative`,elementType:`labels.text.fill`,stylers:[{color:`#CCCCCC`},{weight:`0.3`}]},{featureType:`administrative.country`,elementType:`all`},{featureType:`administrative.country`,elementType:`labels`,stylers:[{visibility:`on`},{color:`#CCCCCC`},{weight:`0.3`}]},{featureType:`administrative.province`,elementType:`all`,stylers:[{visibility:`off`},{color:`#CCCCCC`},{weight:`0.3`}]},{featureType:`administrative.locality`,elementType:`all`,stylers:[{visibility:`off`}]},{featureType:`administrative.neighborhood`,elementType:`all`,stylers:[{visibility:`off`}]},{featureType:`administrative.land_parcel`,elementType:`all`,stylers:[{visibility:`off`}]},{featureType:`landscape`,elementType:`all`,stylers:[{visibility:`simplified`}]},{featureType:`landscape`,elementType:`geometry.fill`,stylers:[{color:`#f5f5f5`},{visibility:`on`}]},{featureType:`landscape`,elementType:`geometry.stroke`,stylers:[{saturation:`100`}]},{featureType:`landscape.natural`,elementType:`all`,stylers:[{visibility:`on`},{saturation:`-58`}]},{featureType:`landscape.natural.terrain`,elementType:`all`,stylers:[{visibility:`on`},{saturation:`71`},{lightness:`43`}]},{featureType:`landscape.man_made`,elementType:`labels`,stylers:[{visibility:`off`}]},{featureType:`landscape.natural`,elementType:`labels`,stylers:[{visibility:`off`}]},{featureType:`poi`,elementType:`all`,stylers:[{visibility:`off`}]},{featureType:`poi`,elementType:`labels`,stylers:[{visibility:`off`}]},{featureType:`road`,elementType:`all`,stylers:[{saturation:-100},{lightness:50},{visibility:`on`}]},{featureType:`road.highway`,elementType:`all`,stylers:[{visibility:`simplified`}]},{featureType:`road.highway`,elementType:`geometry.fill`,stylers:[{lightness:`10`}]},{featureType:`road.highway`,elementType:`geometry.stroke`},{featureType:`road.highway`,elementType:`labels.text`,stylers:[{saturation:`3`},{lightness:`-56`},{weight:`2.20`}]},{featureType:`road.highway`,elementType:`labels.text.fill`,stylers:[{lightness:`-52`}]},{featureType:`road.highway`,elementType:`labels.text.stroke`,stylers:[{weight:`6.13`}]},{featureType:`road.highway`,elementType:`labels.icon`,stylers:[{lightness:`-10`},{gamma:`0.94`},{weight:`1.24`},{saturation:`-100`},{visibility:`off`}]},{featureType:`road.arterial`,elementType:`geometry`,stylers:[{lightness:`-16`}]},{featureType:`road.arterial`,elementType:`labels.text.fill`,stylers:[{saturation:`-41`},{lightness:`-41`}]},{featureType:`road.arterial`,elementType:`labels.text.stroke`,stylers:[{weight:`5.46`}]},{featureType:`road.arterial`,elementType:`labels.icon`,stylers:[{visibility:`off`}]},{featureType:`road.local`,elementType:`geometry.fill`,stylers:[{weight:`0.72`},{lightness:`-16`}]}
1,{featureType:`road.local`,elementType:`labels.text.fill`,stylers:[{lightness:`-37`}]},{featureType:`transit`,elementType:`all`,stylers:[{visibility:`off`}]},{featureType:`water`,elementType:`all`,stylers:[{color:`#FFFFFF`},{visibility:`on`}]}]};function E(e,t){e.src=t}var D=e=>{var t,n,r,i=`The Google Maps JavaScript API`,a=`google`,o=`importLibrary`,s=document,c=window,l=c[a]||(c[a]={}),u=l.maps||={},d=new Set,f=new URLSearchParams,p=()=>t||=new Promise(async(o,c)=>{for(r in await(n=s.createElement(`script`)),f.set(`libraries`,[...d]+``),e)f.set(r.replace(/[A-Z]/g,e=>`_`+e[0].toLowerCase()),e[r]);f.set(`callback`,a+`.maps.__ib__`),E(n,`https://maps.googleapis.com/maps/api/js?`+f),u.__ib__=o,n.onerror=()=>t=c(Error(i+` could not load.`)),n.nonce=s.querySelector(`script[nonce]`)?.nonce||``,s.head.append(n)});u[o]?console.warn(i+` only loads once. Ignoring:`,e):u[o]=(e,...t)=>d.add(e)&&p().then(()=>u[o](e,...t))},O=e=>`The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(e)}) will be ignored.`,k=e=>`The google.maps.importLibrary() function is already defined, and @googlemaps/js-api-loader will use the existing function instead of overwriting it. The options passed to setOptions (${JSON.stringify(e)}) will be ignored.`,A=!1;function j(e){if(A){O(e);return}N(e),A=!0}async function M(e){if(!window?.google?.maps?.importLibrary)throw Error(`google.maps.importLibrary is not installed.`);return await google.maps.importLibrary(e)}function N(e){let t=!!window.google?.maps?.importLibrary;t&&k(e),t||D(e)}var P=C(y({__name:`_mapLoader`,props:{mapConfig:{default:()=>({})},apiKey:{default:``}},setup(e,{expose:a}){let o=e,s=b(null),l=v(null);function f(e){l.value?.fitBounds(e)}return a({fitBounds:f,map:l}),r(async()=>{j({key:o.apiKey,v:`weekly`});let{Map:e}=await M(`maps`);await M(`marker`),s.value&&(l.value=c(new e(s.value,o.mapConfig)))}),n(()=>{l.value&&=(window.google?.maps?.event?.clearInstanceListeners(l.value),null)}),(e,n)=>(i(),m(`div`,null,[_(`div`,{ref_key:`googleMap`,ref:s,class:`google-map`},null,512),d(l)?t(e.$slots,`default`,{map:d(l)},void 0,!0,0):u(``,!0)]))}}),[[`__scopeId`,`data-v-8b40f507`]]),F=`'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`,I={props:{map:{type:Object,required:!0},marker:{type:Object,required:!0},showLabel:{type:Boolean,default:!1},options:{type:Object,default:()=>({})}},emits:[`ready`,`click`],data(){return{markerObject:null,info:null,labelOverlay:null}},computed:{contentString(){if(this.marker.infoHtml)return this.marker.infoHtml;let{id:e,title:t,img:n,link:r}=this.marker,i=`<h1 class="font-bold" id="title-${e}">${t}</h1>`,a=r?`<a href="${r}" target="_blank" rel="noopener" class="block hover:underline">${i}</a>`:i,o=n?n.thumbnailUrl:null,s=o?`<img class="rounded w-full h-auto block mt-[5px]" src="${o}" alt="${t}" />`:``;return`<div id="content" style="width:200px;">`+a+s+`</div>`},markerOptions(){return{fontSizeStart:40,fontSizeHighlightStart:40,fontSizeHighlight:20,fontSizeDefault:16,fontSizeIntermediate:14,lineLength:30,distanceFromAnchor:18,labelPadding:8,simplePadding:4,minLabelWidth:60,minSimpleWidth:30,...this.options}}},mounted(){if(this.info=c(this.createInfoWindow(this.contentString)),this.markerObject=c(this.createMarker()),this.showLabel&&this.marker.attributes?.markerLabel&&this.marker.attributes?.markerHidden!==!0){let e=this.createSimpleLabel();this.labelOverlay=e?c(e):null}this.$emit(`ready`)},beforeUnmount(){this.labelOverlay&&=(this.labelOverlay.setMap(null),null),this.markerObject&&=(this.markerObject.setMap(null),null),this.info&&=(this.info.close(),null)},methods:{createMarker(){let e={};e.map=this.map;let{Animation:t}=window.google.maps;e.animation=t.DROP,e.position=this.marker.position,e.title=this.marker.title;let{Marker:n,Size:r}=window.google.maps,i=this.marker.attributes?.markerType,a=this.marker.attributes?.markerHidden===!0?null:i,o=a===`highlight`||!1,s=a===`start`||null,c=a===`end`||null,l=a===`start-end`||null,u=a===`intermediate`||!1,d=this.getSvgIcon(a||null),f=this.marker?.attributes&&this.marker?.attributes?.scale?20*this.marker?.attributes?.scale:20;
1e.icon={url:d,scaledSize:new r(f,f),anchor:new window.google.maps.Point(f/2,f/2)},e.zIndex=u?1e3:o||s||c||l?3e3:2e3;let p=new n(e);return this.addEvents(p)},getSvgIcon(e){let t=`<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
2        <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
3          <g id="middle" fill-rule="nonzero">
4            <circle id="Oval" fill-opacity="0.09" fill="#FFFFFF" cx="8" cy="8" r="8"></circle>
5            <circle id="Oval" fill="#000000" cx="8" cy="8" r="4"></circle>
6          </g>
7        </g>
8      </svg>`;switch(e){case`start`:case`start-end`:case`end`:t=`
9          <svg width="56px" height="56px" viewBox="0 0 56 56" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
10              <circle fill="#E65253" cx="28" cy="28" r="28"></circle>
11              <circle fill="#000000" cx="28" cy="28" r="20"></circle>
12          </svg>
13        `;break;case`intermediate`:t=`<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
14          <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
15              <g id="intermediate" fill-rule="nonzero">
16                  <circle id="Oval" fill-opacity="0.09" fill="#FFFFFF" cx="8" cy="8" r="8"></circle>
17                  <circle id="Oval" fill="#E65253" cx="8" cy="8" r="4"></circle>
18                  <circle id="Oval" fill="#FFFFFF" cx="8" cy="8" r="2"></circle>
19              </g>
20          </g>
21      </svg>`}return`data:image/svg+xml;charset=UTF-8,`+encodeURIComponent(t)},addEvents(e){return e.addListener(`click`,()=>{this.$emit(`click`,{id:this.marker.id,position:this.marker.position})}),e},createInfoWindow(e){let{InfoWindow:t}=window.google.maps;return new t({content:e})},openInfo(){this.contentString&&this.info.open(this.map,this.markerObject)},closeInfo(){this.info.close(this.map,this.markerObject)},measureTextWidth(e,t,n=`normal`){this.measureTextWidth._canvas||(this.measureTextWidth._canvas=document.createElement(`canvas`),this.measureTextWidth._context=this.measureTextWidth._canvas.getContext(`2d`));let r=this.measureTextWidth._context;r.font=`${n} ${t}px ${F}`;let i=r.measureText(e);return Math.ceil(i.width)},createSimpleLabel(){let e=this.marker.attributes?.markerLabel,t=this.marker.attributes?.markerHidden;if(!e||t===!0)return null;let{Marker:n}=window.google.maps,r=this.marker.attributes?.markerType,i=t===!0?null:r,a=i===`highlight`||!1,o=i===`start`||null,s=i===`end`||null,c=i===`start-end`||null,l=this.marker.attributes?.markerAlignment||`top`,u=i===`intermediate`||!1,d=a?o||s||c?this.markerOptions.fontSizeHighlightStart||this.markerOptions.fontSizeStart:this.markerOptions.fontSizeHighlight:o||s||c?this.markerOptions.fontSizeStart:u?this.markerOptions.fontSizeIntermediate:this.markerOptions.fontSizeDefault,f=a||o||s||c?`semibold`:u?`400`:`500`,p=a?`white`:u?`#666666`:`#000000`,m=this.marker.position.lat,h=this.marker.position.lng,g=``;if(a||o||s||c){let t=o||s||c?18:7,n=this.measureTextWidth(e,d,`bold`),r=this.markerOptions.labelPadding,i=o&&!a||s&&!a||c&&!a,u=i?8:0,f=Math.max(n+r*2,this.markerOptions.minLabelWidth),p=d+r*1.5+u,m=a?this.markerOptions.lineLength:0,h,_;switch(l){case`top`:h=Math.max(f,t*2)/2,_=p+m+t;break;case`bottom`:h=Math.max(f,t*2)/2,_=t;break;case`left`:h=f+m+t,_=Math.max(p,t*2)/2;break;case`right`:h=t,_=Math.max(p,t*2)/2;break;default:h=Math.max(f,t*2)/2,_=t}let v,y,b,x,S,C,w,T,E,D;switch(l){case`top`:v=Math.max(f,t*2),y=p+m+t*2,b=h,x=_-t,S=v/2,C=p,w=(v-f)/2,T=0,E=v/2,D=i?(p-u)/2+d/3:p/2+d/3;break;case`bottom`:v=Math.max(f,t*2),y=t*2+m+p,b=h,x=_+t,S=v/2,C=t*2+m,w=(v-f)/2,T=t*2+m,E=v/2,D=i?t*2+m+(p-u)/2+d/3:t*2+m+p/2+d/3;break;case`left`:v=f+m+t*2,y=Math.max(p,t*2),b=h-t,x=_,S=f,C=y/2,w=0,T=(y-p)/2,E=f/2,D=i?(y-u)/2+d/3:y/2+d/3;break;case`right`:v=t*2+m+f,y=Math.max(p,t*2),b=h+t,x=_,S=t*2+m,C=y/2,w=t*2+m,T=(y-p)/2,E=t*2+m+f/2,D=i?(y-u)/2+d/3:y/2+d/3;break;default:v=Math.max(f,t*2),y=t*2+m+p,b=h,x=_+t,S=v/2,C=t*2+m,w=(v-f)/2,T=t*2+m,E=v/2,D=i?t*2+m+(p-u)/2+d/3:t*2+m+p/2+d/3}let O=(o||s||c)&&!a,k=a?`#FF4758`:O?`none`:`#000000`,A=a?`#FF4758`:`none`,j=a||O?`none`:`#000000`,M=a||O?`0`:`2`,N=a?`white`:`#000000`,P=a?`#FF4758`:`none`,I=a||O?`none`:`#000000`,L=a||O?`0`:`3`;g=`
22          <svg xmlns="http://www.w3.org/2000/svg" width="${v}" height="${y}" viewBox="0 0 ${v} ${y}">
23            <!-- Connection line -->
24            <line x1="${b}" y1="${x}" x2="${S}" y2="${C}" stroke="${k}" stroke-width="2"/>
25            
26            <!-- Rectangular label -->
27            <rect x="${w}" y="${T}" width="${f}" height="${p}" 
28                  fill="${A}" stroke="${j}" stroke-width="${M}" rx="4"/>
29            
30            <!-- Label text -->
31            <text x="${E}" y="${D}" 
32                  text-anchor="middle" 
33                  font-family="${F}" 
34                  font-size="${d}" 
35                  font-weight="bold" 
36                  fill="${N}">
37              ${e}
38            </text>
39            
40            ${i?`
41            <!-- Secondary text for start/end markers -->
42            <text x="${E}" y="${D+d/2+-2+10/2}" 
43                  text-anchor="middle" 
44                  font-family="${F}" 
45                  font-size="10" 
46                  font-weight="bold" 
47                  fill="#e65253">
48              ${c?`START-END`:o?`START`:`END`}
49            </text>
50            `:``}
51            
52            <!-- Circular background - always centered on marker -->
53            <circle cx="${h}" cy="${_}" r="${t}" 
54                    fill="${P}" stroke="${I}" stroke-width="${L}"/>
55          </svg>
56        `}else{let t=this.measureTextWidth(e,d,f),n=this.markerOptions.simplePadding,r=Math.max(t+n*2,this.markerOptions.minSimpleWidth),i=d+n*1.5;g=`
57          <svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${i}" viewBox="0 0 ${r} ${i}">
58            <text x="${r/2}" y="${i/2+d/3}" 
59                  text-anchor="middle" 
60                  font-family="${F}" 
61                  font-size="${d}" 
62                  font-weight="${f}" 
63                  fill="${p}">
64              ${e}
65            </text>
66          </svg>
67        `}let _,v,y,b;if(a||o||s||c){let t=o||s||c||a&&(o||s||c)?26:7,n=this.measureTextWidth(e,d,`bold`),r=this.markerOptions.labelPadding,i=o&&!a||s&&!a||c&&!a?16:0,u=Math.max(n+r*2,this.markerOptions.minLabelWidth),f=d+r*1.5+i,p=a?this.markerOptions.lineLength:0;switch(l){case`top`:_=Math.max(u,t*2),v=f+p+t*2,y=Math.max(u,t*2)/2,b=f+p+t;break;case`bottom`:_=Math.max(u,t*2),v=t*2+p+f,y=Math.max(u,t*2)/2,b=t;break;case`left`:_=u+p+t*2,v=Math.max(f,t*2),y=u+p+t,b=Math.max(f,t*2)/2;break;case`right`:_=t*2+p+u,v=Math.max(f,t*2),y=t,b=Math.max(f,t*2)/2;break;default:_=Math.max(u,t*2),v=t*2+p+f,y=Math.max(u,t*2)/2,b=t}}else{let t=this.measureTextWidth(e,d,f),n=this.markerOptions.simplePadding;_=Math.max(t+n*2,this.markerOptions.minSimpleWidth),v=d+n*1.5;let r=this.markerOptions.distanceFromAnchor;switch(l){case`top`:y=_/2,b=v+r;break;case`bottom`:y=_/2,b=-r;break;case`left`:y=_+r,b=v/2;break;case`right`:y=-r,b=v/2;break;default:y=_/2,b=-r}}return new n({position:{lat:m,lng:h},map:this.map,icon:{url:`data:image/svg+xml;charset=UTF-8,`+encodeURIComponent(g),anchor:{x:y,y:b},scaledSize:{width:_,height:v}},zIndex:u?900:a||o||s||c?2900:1900,clickable:!1})}},render(){return null}},L={props:{map:{type:Object,required:!0},line:{type:Object,required:!0}},data(){return{interval:null,polylineObject:null}},mounted(){this.polylineObject=c(this.generatePolyline(this.line))},beforeUnmount(){this.interval&&=(clearInterval(this.interval),null),this.polylineObject&&=(this.polylineObject.setMap(null),null)},methods:{generatePolyline(e){let t=e.path.length<=2,n=e.icon&&e.icon.name===`plane`,r=e.icon&&e.icon.name===`boat`,i=e.icon&&e.icon.name===`rail`,a={...this.linePathConfig,strokeWeight:3,strokeOpacity:1,strokeColor:n||r||i?`#AAAAAA00`:`#AAAAAA`};a.map=this.map,a.path=t?this.generateCurvedLine(e.path):e.path,a.zIndex=10;let o=[];t&&n&&(o.push({icon:{path:`M 0,-1 0,1`,strokeWeight:2,strokeOpacity:1,strokeColor:`#AAAAAA`,scale:4},offset:`0`,repeat:`12px`}),a.strokeOpacity=.3),t&&r&&(o.push({icon:{path:`M 0,0 A 1,1 0 0,1 2,0 A 1,1 0 0,1 0,0 Z`,strokeWeight:0,strokeOpacity:0,fillColor:`#AAAAAA`,fillOpacity:1,scale:3},offset:`0`,repeat:`10px`}),a.strokeOpacity=.3),t&&i&&(o.push({icon:{path:`M -2,0 L 2,0 M -2,-6 L -2,6 M 2,-6 L 2,6`,strokeWeight:1,strokeOpacity:1,strokeColor:`#AAAAAA`,fillOpacity:0,scale:1},offset:`0`,repeat:`6px`}),a.strokeOpacity=.2),e.icon&&e.icon.name!==null&&!r&&o.push(...this.generateIcons(e.icon.data,50,.8)),a.icons=o.length>0?o:null;let{Polyline:s}=window.google.maps;return new s(a)},generateCurvedLine(e){let t={lat:e[0].lat,lng:e[0].lng},n={lat:e[1].lat,lng:e[1].lng},r=Math.abs(t.lat-n.lat),i=Math.abs(t.lng-n.lng),a=Math.sqrt(r*r+i*i),o;o=a<1.3?500:Math.min(15,3+a/180*12);let s={lat:(parseFloat(t.lat)+parseFloat(n.lat))/2,lng:(parseFloat(t.lng)+parseFloat(n.lng))/2},c=Math.sqrt(Math.abs(t.lat-n.lat)/o),l=Math.sqrt(Math.abs(t.lng-n.lng)/o);t.lat>n.lat?t.lng>n.lng?(s.lat-=c,s.lng+=l):(s.lat-=c,s.lng-=l):t.lng>n.lng?(s.lat+=c,s.lng+=l):(s.lat+=c,s.lng-=l);let u=[];for(let e=0;e<1;e+=.1){let r=(1-e)**2*t.lat,i=2*(1-e)*e*s.lat,a=e**2*n.lat,o=(1-e)**2*t.lng,c=2*(1-e)*e*s.lng,l=e**2*n.lng;u.push({lat:r+i+a,lng:o+c+l})}return u},generateIcons(e,t,n=1){return[{icon:{...e,scale:n},offset:(t||50)+`%`}]}
67,moveCursor(){let e=(this.line.offset||50)*10,t=1e3,n=!1,r=!1;this.interval=w(function(){e=this.line.icon===`twoWay`&&n?r?(e+1)%t:(e-1)%t:(e+1)%t;let i=100*e/t,a=this.line.icon===`twoWay`?{...this.lineIcon.oneWay,rotation:n?`180`:`0`}:this.lineIcon[this.line.icon],o=this.generateIcons(a,i);this.polylineObject.setOptions({...this.linePathConfig,icons:o}),i===49.9&&!n&&(this.stopCursor(),r=!1),i===0&&this.line.icon===`twoWay`&&(n=!1,r=!0),i===99&&(this.line.icon===`twoWay`?n=!0:e=0)}.bind(this),10)},stopCursor(){clearInterval(this.interval),this.polylineObject.setOptions({...this.linePathConfig,icons:this.generateIcons(this.lineIcon[this.line.icon])})}},render(){return null}},R=y({__name:`_mapCircle`,props:{map:{},circle:{}},setup(e){let t=e,i=null;function a(e){return{center:{lat:parseFloat(String(e.center.latitude)),lng:parseFloat(String(e.center.longitude))},radius:e.radius,strokeColor:e.strokeColor??`#000000`,fillColor:e.fillColor??`#000000`,fillOpacity:e.fillOpacity??.1,strokeOpacity:e.strokeOpacity??.8,strokeWeight:e.strokeWeight??2}}return p(()=>t.circle.center,e=>{i&&e&&i.setCenter({lat:parseFloat(String(e.latitude)),lng:parseFloat(String(e.longitude))})},{deep:!0}),p(()=>t.circle.radius,e=>{i&&i.setRadius(e)}),p(()=>t.circle,e=>{i&&i.setOptions(a(e))},{deep:!0}),r(()=>{let{Circle:e}=window.google.maps;i=c(new e(a(t.circle))),i.setMap(t.map)}),n(()=>{i&&=(i.setMap(null),null)}),()=>{}}}),z=e({default:()=>U}),B={name:`wr-maps`,components:{GoogleMapLoader:P,GoogleMapMarker:I,GoogleMapLine:L,GoogleMapCircle:R},props:{componentId:{type:String,required:!0},settings:{type:Object,default:null},currency:{type:Object,default:null},markers:{type:Array,default:()=>[]},lines:{type:Array,default:()=>[]},height:{type:Number,default:0},inGrid:{type:Boolean,default:!1},markerOptions:{type:Object,default:()=>({})},circles:{type:Array,default:()=>[]},fitMode:{type:String,default:`always`}},emits:[`ready`,`marker-click`],data(){return{infoOpenID:null,center:null,mapConfig:{...T},innerMarkerOptions:this.markerOptions,markerRefreshKey:0,hasFitted:!1}},computed:{googleMapsApiKey(){return this.$config?.public.googleMapsApiKey||!1},generatedMarkers(){return this.generateMarkers(this.markers)},generatedLines(){return this.objectLines(this.lines)}},methods:{generateV4UUID:x,calculateVisibleAreaKm2(){if(!this.$refs.google_map_loader?.map)return 0;let e=this.$refs.google_map_loader.map.getBounds();if(!e)return 0;
67let t=e.getNorthEast(),n=e.getSouthWest(),r=n.lat()*Math.PI/180,i=t.lat()*Math.PI/180,a=n.lng()*Math.PI/180,o=t.lng()*Math.PI/180,s=i-r,c=o-a,l=6371,u=(r+i)/2,d=l*s,f=l*c*Math.cos(u);return Math.abs(d*f)},calculateLabelSizes(){this.calculateVisibleAreaKm2();let e=1;return e=1.1,{fontSizeDefault:Math.round(12*e),fontSizeHighlight:Math.round(14*e),fontSizeHighlightStart:Math.round(14*e),fontSizeStart:Math.round(24*e),fontSizeIntermediate:Math.round(12*e)}},refElement(e){return this.$refs[e]?this.$refs[e][0]:null},markerClicked(e){let{id:t,isSubStage:n=!0}=e;n&&this.$emit(`marker-click`,t),this.refElement(t)&&this.openInfoWindow(t)},openInfoWindow(e){this.infoOpenID!==null&&this.infoOpenID!==e&&this.refElement(this.infoOpenID).closeInfo(),this.refElement(e).openInfo(),this.infoOpenID=e},generateMarkers(e){let t=[];if(e.length===0)return[];let n=new window.google.maps.LatLngBounds;for(let[r,i]of e.entries()){let{latitude:e,longitude:a}=i.coordinate;if(!e||!a)continue;let o={...i,id:i.key?i.key.toString():this.generateV4UUID(),position:{lat:parseFloat(e),lng:parseFloat(a)},isFirst:r===0};n.extend(new window.google.maps.LatLng(parseFloat(e),parseFloat(a))),t.push(o)}if((!n||n.isEmpty())&&(n=new window.google.maps.LatLngBounds,n.extend(new window.google.maps.LatLng(parseFloat(t[0].position.lat),parseFloat(t[0].position.lng)))),this.fitMode===`always`||this.fitMode===`initial`&&!this.hasFitted){if(this.hasFitted=!0,t.length===1&&this.circles.length>0){let e=this.circles[0],t=parseFloat(e.center.latitude),n=parseFloat(e.center.longitude),r=e.radius,i=r/111320,a=r/(111320*Math.cos(t*Math.PI/180)),o=new window.google.maps.LatLngBounds({lat:t-i,lng:n-a},{lat:t+i,lng:n+a});this.$refs.google_map_loader.fitBounds(o)}else t.length===1?(this.$refs.google_map_loader.map?.setCenter(t[0].position),this.$refs.google_map_loader.map?.setZoom(7)):this.$refs.google_map_loader.fitBounds(n);this.$nextTick(()=>{let e=this.$refs.google_map_loader?.map?.getZoom();e>1&&this.$nextTick(()=>{this.$refs.google_map_loader?.map?.setZoom(e-.1)});let t=this.calculateLabelSizes();this.innerMarkerOptions={...this.markerOptions,...t},this.refreshLabels()})}return t},refreshLabels(){this.markerRefreshKey+=1},objectLines(e){let t=[];if(e.length===0)return[];for(let n of e){let e=[];for(let t of n.coordinates){let{latitude:n,longitude:r}=t.coordinate;!n||!r||e.push({lat:parseFloat(n),lng:parseFloat(r)})}t.push({offset:n.offset,icon:n.icon,id:n.key?n.key.toString():this.generateV4UUID(),path:e})}return t}}},V=[`id`];function H(e,t,n,r,c,d){let p=a(`google-map-circle`),v=a(`google-map-line`),y=a(`google-map-marker`),b=a(`google-map-loader`);return i(),m(`section`,{id:n.componentId},[_(`div`,{class:o([n.inGrid?`container`:`w-full`])},[d.googleMapsApiKey?(i(),l(b,{key:0,ref:`google_map_loader`,style:s({height:n.height===0?`100vh`:`${n.height}px`}),"map-config":c.mapConfig,"api-key":d.googleMapsApiKey},{default:f(({map:r})=>[n.circles.length>0?(i(!0),m(g,{key:0},h(n.circles,e=>(i(),l(p,{key:e.id,circle:e,map:r},null,8,[`circle`,`map`]))),128)):u(``,!0),d.generatedLines.length>0?(i(!0),m(g,{key:1},h(d.generatedLines,e=>(i(),l(v,{ref_for:!0,ref:e.id,key:`line-${e.id}`,line:e,map:r},null,8,[`line`,`map`]))),128)):u(``,!0),d.generatedMarkers.length>0?(i(!0),m(g,{key:2},h(d.generatedMarkers,n=>(i(),l(y,{ref_for:!0,ref:n.id,key:`marker-${n.id}-${c.markerRefreshKey}`,marker:n,map:r,"show-label":``,options:c.innerMarkerOptions||{},onClick:d.markerClicked,onReady:t[0]||=t=>e.$emit(`ready`)},null,8,[`marker`,`map`,`options`,`onClick`]))),128)):u(``,!0)]),_:1},8,[`style`,`map-config`,`api-key`])):u(``,!0)],2)],8,V)}var U=Object.assign(C(B,[[`render`,H]]),{__name:`WrMaps`}),W={name:`wr-maps-stages`,components:{wrMaps:U},props:{stages:{type:Array,required:!0},mapOpen:{type:Boolean,default:!1},height:{type:Number,default:0}},emits:[`markerClick`],data(){return{mapsIsReady:!1,markers:[],lines:[],onMapsReady:S(()=>{this.mapsIsReady=!0},600)}},watch:{mapOpen(){this.markers.length===0&&this.loadMap(this.stages)}},created(){this.mapOpen&&this.loadMap(this.stages)},methods:{loadMap(e){let t=[],n=null;for(let[r,i]of e.entries())for(let[e,a]of i.subStages.entries())a.mapMarkerCoordinates&&a.mapMarkerCoordinates.latitude!==null&&a.mapMarkerCoordinates.longitude!==null&&a.mapMarkerCoordinates.longitude!==0&&a.mapMarkerCoordinates.latitude!==0&&((!(`skipPath`in a.attributes)||!a.attributes.skipPath)&&(t.length===0&&(n=a.attributes.lineIcon),t.push({coordinate:a.mapMarkerCoordinates})),(!(`hideMarker`in a.attributes)||!a.attributes.hideMarker)&&this.markers.push({key:a.id,icon:a.attributes.icon||null,attributes:a.attributes||null,coordinate:a.mapMarkerCoordinates,title:a.title,img:a.images[0]}),t.length===2&&(this.lines.push({key:`line_`+r+`_`+e,icon:n,coordinates:t}),n=a.attributes.lineIcon,t=[t[1]]))},openInfoWindow(e,t){let n=w(function(){this.mapsIsReady&&this.$refs.wr_maps_stages&&(this.$refs.wr_maps_stages.markerClicked({id:e.id,position:e.mapMarkerCoordinates,isSubStage:t}),clearInterval(n))}.bind(this),600)}}};function G(e,t,n,r,a,o){let s=U;return n.mapOpen?(i(),l(s,{key:0,ref:`wr_maps_stages`,lines:a.lines,markers:a.markers,"component-id":`wr-maps-stages`,he
67ight:n.height,onReady:a.onMapsReady,onMarkerClick:t[0]||=t=>e.$emit(`markerClick`,t)},null,8,[`lines`,`markers`,`height`,`onReady`])):u(``,!0)}var K=C(W,[[`render`,G]]);export{U as n,z as r,K as t};

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.