1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/chunks/StateMap.CxoxhjuC.js","js/chunks/lazy-module.BLQhUfc3.js","js/chunks/isSymbol.IFp43oYL.js","js/chunks/leaflet-src.y1NbNate.js","js/chunks/isEmpty.CyDLGFZ5.js","js/chunks/isTypedArray.Bhi_7Pm7.js","js/chunks/get.DkCZJr5P.js","js/chunks/_Set.CgIZ59wu.js","js/chunks/leaflet-gesture-handling.min.CQ1HnegI.js","js/chunks/Leaflet.Baidu.DzdnKnhU.js","js/chunks/polyline.BRTkxxFJ.js","js/chunks/_plugin-vue2_normalizer.yT5ADOs5.js","js/chunks/LPolyline.LF7VP_Yt.js","js/chunks/LTileLayer.DeqIuYit.js","js/chunks/LControl.DI3hSgF4.js","js/chunks/LMarker.B0mcUa-t.js","js/chunks/LMap.DA78MrYm.js","js/chunks/vuex.esm.browser.BAP_NJLq.js","js/chunks/index.TYL-8KL6.js","assets/StateMap.CkIDOgli.css","assets/leaflet.BcQiFM8-.css","assets/leaflet-gesture-handling.DWaYVQ7D.css"])))=>i.map(i=>d[i]); 2import{_ as o}from"./lazy-module.BLQhUfc3.js";import{mapActions as l}from"./vuex.esm.browser.BAP_NJLq.js";import c from"./index.TYL-8KL6.js";import{n as r}from"./_plugin-vue2_normalizer.yT5ADOs5.js";import"./isSymbol.IFp43oYL.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"v3.306.0"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="88d7f89f-712a-4439-8e9e-356dc14ad269",e._sentryDebugIdIdentifier="sentry-dbid-88d7f89f-712a-4439-8e9e-356dc14ad269")}catch{}})();const p=()=>o(()=>import("./StateMap.CxoxhjuC.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),d={name:"LocationMatrix",components:{StateMap:p},props:["lat","lng","marker","type","modelId","translates","provider","canGestureHandling"],data(){return{types:{},walkTypes:{},driveTypes:{},places:[],loading:!1,typeSelected:null,placesSelected:null,metric:"km",mode:"Driving",center:null,markerLatLng:null,mapObject:null,locale:window.locale,isShowTypeOptions:!1,isShowTravelOptions:!1}},beforeCreate(){const e=this.$store;e&&e.state&&e.state.map||e.registerModule("map",c)},beforeMount(){this.fetchLocationMatrix()},mounted(){this.setLatLngZoom({lat:this.lat,lng:this.lng,zoom:14})},watch:{typeSelected:function(){this.placesSelected=null}},computed:{intProvider(){return parseInt(this.provider)},currentList:function(){return this.places.filter(e=>e.category_clean_name===this.typeSelected).filter(e=>e.distance_type==(this.mode==="Walking"?0:1)).sort((e,t)=>e.distance_value-t.distance_value)},modeDisplay(){const{translates:e={},mode:t}=this;return{Driving:e.drivingTxt,Walking:e.walkingTxt}[t]||e.drivingTxt},selectedType(){const{mode:e,walkTypes:t,driveTypes:s}=this;return e==="Walking"?t:s}},methods:{...l("map",["setLatLngZoom","setLocationMatrix"]),changeMetric(e){this.metric=e},centerUpdate(e){this.center=e},onPlaceClick(e){this.placesSelected=e,this.direction()},direction(){const e=this.places.find(t=>t.place_id===this.placesSelected&&t.distance_type==(this.mode==="Walking"?0:1));this.setLocationMatrix({locationMatrix:e.direction})},onCloseTypeOptionsModal(){this.isShowTypeOptions=!1},onCloseTravelOptionsModal(){this.isShowTravelOptions=!1},onTypeShowOptions(){this.isShowTypeOptions=!0},onTravelShowOptions(){this.isShowTravelOptions=!0},onTypeClick(e){this.typeSelected=e,this.onCloseTypeOptionsModal()},onModeClick(e){this.mode=e,this.updateToAvailabeType(),this.onCloseTravelOptionsModal()},fetchLocationMatrix(){this.loading=!0,axios.get(`${window.url}api/location-matrix?type=${this.type}&id=${this.modelId}`).then(e=>{const{result:t,types:s}=e.data;this.loading=!1,this.types=s,this.walkTypes=this.createTypes(0,t,s),this.driveTypes=this.createTypes(1,t,s),this.initTapAndType(),this.places=t}).catch(e=>{this.loading=!1,console.error(e)})},createTypes(e,t,s){return[...new Set(t.filter(i=>i.distance_type==e).map(i=>i.category_clean_name))].reduce((i,a)=>({...i,[a]:s[a]}),{})},initTapAndType(){const{walkTypes:e,driveTypes:t,mode:s}=this;if(s==="Driving"&&Object.keys(t).length){const i=Object.keys(t);this.typeSelected=i[0]}else if(Object.keys(e).length){const i=Object.keys(e);this.typeSelected=i[0],this.mode="Walking"}},updateToAvailabeType(){const{walkTypes:e,driveTypes:t,mode:s,typeSelected:i}=this,a=s==="Driving"?t:e;
2Object.keys(a).includes(i)||(this.typeSelected=Object.keys(a)[0])}}};var m=function(){var t=this,s=t._self._c;return s("div",[s("div",{staticClass:"this-item this-map this-map--location-matrix"},[s("state-map",{style:{width:"100%"},attrs:{"can-drag":!1,"satellite-text":t.translates.satellite,"can-gesture-handling":t.canGestureHandling}}),t._m(0)],1),t.loading||this.places.length>0?s("div",{staticClass:"location-matrix scrollbar-style"},[t.loading?s("loading-animation"):[s("div",{directives:[{name:"show",rawName:"v-show",value:t.isShowTypeOptions||t.isShowTravelOptions,expression:"isShowTypeOptions || isShowTravelOptions"}],staticClass:"options-mask",staticStyle:{display:"none"}}),s("div",{staticClass:"select-type-location"},[s("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.onCloseTypeOptionsModal,expression:"onCloseTypeOptionsModal"}],staticClass:"select-type-location__item",class:{open:t.isShowTypeOptions},on:{click:t.onTypeShowOptions}},[t.typeSelected!==null?[s("span",{staticClass:"select-type-location__item__span"},[s("img",{attrs:{src:`/images/icon/map-place/${t.typeSelected}.png`,width:"20",height:"20",alt:""}}),t._v(" "+t._s(t.types[t.typeSelected])+" ")])]:t._e(),s("i",{staticClass:"select-type-location-arrow"}),s("ul",{staticClass:"dropdown-location scrollbar-style"},t._l(t.selectedType,function(i,a){return s("li",{key:a,staticClass:"dropdown-location__item",on:{click:function(n){return n.stopPropagation(),t.onTypeClick(a)}}},[s("img",{attrs:{src:`/images/icon/map-place/${a}.png`,width:"20",height:"20",alt:i}}),t._v(" "+t._s(i)+" ")])}),0)],2),s("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.onCloseTravelOptionsModal,expression:"onCloseTravelOptionsModal"}],staticClass:"select-type-location__item",class:{open:t.isShowTravelOptions},on:{click:t.onTravelShowOptions}},[s("span",{staticClass:"select-type-location__item__span"},[s("img",{staticClass:"opacity-5",attrs:{src:`/images/icon/map-place/${t.mode.toLocaleLowerCase()}.svg`,alt:"",width:"17",height:"17"}}),t._v(" "+t._s(t.modeDisplay)+" ")]),s("i",{staticClass:"select-type-location-arrow"}),s("ul",{staticClass:"dropdown-location scrollbar-style"},[s("li",{staticClass:"dropdown-location__item",on:{click:function(i){return i.stopPropagation(),t.onModeClick("Driving")}}},[s("img",{staticClass:"opacity-5",attrs:{src:"/images/icon/map-place/driving.svg",alt:"",width:"17",height:"17"}}),t._v(" "+t._s(t.translates.drivingTxt)+" ")]),s("li",{staticClass:"dropdown-location__item",on:{click:function(i){return i.stopPropagation(),t.onModeClick("Walking")}}},[s("img",{staticClass:"opacity-5",attrs:{src:"/images/icon/map-place/walking.svg",alt:"",width:"17",height:"17"}}),t._v(" "+t._s(t.translates.walkingTxt)+" ")])])])]),s("div",{staticClass:"select-distance"},[s("div",{staticClass:"select-distance__item",class:{active:t.metric==="km"},on:{click:function(i){return t.changeMetric("km")}}},[t._v(t._s(t.translates.kilometersTxt))]),s("div",{staticClass:"select-distance__item",class:{active:t.metric==="m"},on:{click:function(i){return t.changeMetric("m")}}},[t._v(t._s(t.translates.milesTxt))])]),s("div",{staticClass:"scroll-select-location scrollbar-style"},[s("ul",{staticClass:"select-location"},t._l(t.currentList,function(i,a){return s("li",{key:a,staticClass:"select-location__item",class:{active:i.place_id===t.placesSelected},on:{click:function(n){return t.onPlaceClick(i.place_id)}}},[t._v(t._s(i.name)+" "),s("small",{staticClass:"select-location__item__small"},[t._v(" "+t._s((i.distance_value/(t.metric==="km"?1e3:1609.344)*10/10).toFixed(1))+" "+t._s(t.metric==="km"?t.translates.kilometersTxt:t.translates.milesTxt)+" / "+t._s(i.duration_text)+" "+t._s(t.translates.byTxt)+" "+t._s(t.mode==="Driving"?t.translates.drivingTxt:t.translates.walkingTxt)+" ")])])}),0)])]],2):t._e()])},h=[function(){var e=this,t=e._self._c;return t("div",{staticClass:"wrapper-loader-map"},[t("div",{staticClass:"swiper-lazy-preloader"})])}],_=r(d,m,h,!1,null,null);const f=_.exports;export{f as default};
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.