1import{_ as x}from"./DLYQzvpy.js";import{d as k,i as B,w as I,B as R,ay as S,H as z,r as d,c as M,n as a,p as n,f as o,I as u,a7 as f,b as T,a4 as $,o as E,t as r}from"./CfCSDzJf.js";import{u as O}from"./CyQiFHbn.js";const N=k({__name:"Map",props:{settings:{},results:{default:()=>[]},fieldsToShow:{},display:{default:"block"},isInteractiveMap:{type:Boolean,default:!1}},emits:["geocoder:result"],async setup(i,{expose:w,emit:y}){let l,g;const s=i,p=d(),b=d(),m=B(),v={container:p,option:`Main/${s.display}`,style:"/map/styles/ign.json",center:[m.siteBuilderInfos?.coordinates?.longitude,m.siteBuilderInfos?.coordinates?.latitude],primary_color:m.siteBuilderInfos?.colors?.cim_primary_color?.hexa,zoom:8,minZoom:5,maxZoom:17,antialias:!0},e=([l,g]=I(()=>O(p,v,s.settings??{},()=>{e.map.value.on("geocoder:result",t=>{C("geocoder:result",t)}),h(s.results)},b)),l=await l,g(),l),h=t=>{e.clearAll();const c=e.prepareResults(o(t),"displayListPopin","","",`modal_multi_${s.settings?.settings?.content_element}`);c.length>0&&(e.addFeatures(c),e.fitBounds())};R(async()=>{await e.create(),S(()=>s.results,()=>{h(s.results)},{immediate:!0})}),z(()=>{e.destroy()});const C=y;return w({mapInstance:d(e.map),isClusterOpen:e.data.isClusterOpen,maplibre:e}),(t,c)=>{const _=x;return E(),M("div",$(t.$attrs,{class:o(r)({height:"100%"})}),[a("div",{class:n(o(r)({position:"relative",height:"100%",display:"flex",flexDir:"column","& .maplibregl-popup-cluster":{maxWidth:{base:"100% !important",md:"54.5rem !important"},transform:"none !important",zIndex:5,height:{base:"100%",smOnly:"75%"},position:"absolute",bottom:0,left:0,width:{base:"100%",md:"54.5rem"},"& .maplibregl-map":{marginBottom:"3rem"},"& .maplibregl-popup-tip":{display:"none"},"& .maplibregl-popup-content":{padding:0,height:"100%"},"& .maplibregl-popup-close-button":{top:{base:"0.5rem",md:"1rem"},right:{base:"0.5rem",sm:"2rem"},position:"absolute",bgColor:"black",width:"3.5rem",height:"3.5rem",borderRadius:"50%",color:"transparent",border:"{borders.sm} transparent",_before:{content:"''",position:"absolute",top:"50%",left:"50%",width:"2rem",height:"2rem",maskImage:"url(~/assets/img/svg/btn/close.svg)",bgColor:"{colors.white}",maskPosition:"center center",maskSize:"contain",maskRepeat:"no-repeat",transform:"translate(-50%, -50%)",borderRadius:"inherit",transition:"{easings.global}"},_hover:{bgColor:"white",borderColor:"black",_before:{bgColor:"black"}}}},"& .maplibregl-popup:not(.maplibregl-popup-hover)":{pointerEvents:"all!"},"& .maplibregl-popup-hover, & .maplibregl-popup-hover *":{pointerEvents:"none!"},"& .maplibregl-popup:not(.maplibregl-popup-cluster)":{"& p":{fontSize:{base:"1.3em",md:"1.5em"},marginBottom:0,lineHeight:1.2},"& .maplibregl-popup-tip":{borderBottomColor:{base:"{colors.primary}!"}},"& .maplibregl-popup-content":{padding:"0.5rem",backgroundColor:{base:"{colors.primary}!"},color:{base:"white!"},textAlign:"center!"}},"& .maplibregl-ctrl-top-left":{left:"0.5rem!",top:"0.5rem!",width:"100%",maxWidth:"30rem","& .mapboxgl-ctrl-generic-geocoder":{pointerEvents:"all!","& input[type=text]":{bgColor:"white"},"& .suggestions-wrapper":{maxHeight:"20rem !important",overflow:"auto",bgColor:"{colors.white}",border:"{borders.sm} {colors.black}",borderTop:0,borderRadius:"0 0 {radii.sm} {radii.sm}","& .suggestions":{marginBottom:0,"& > li":{fontSize:"sm","& > a":{display:"block",padding:"0.5rem 1rem",borderBottom:"{borders.sm} {colors.lightGray}",transition:"{easings.global}",cursor:"pointer",outline:"none",_last:{border:"none"},"&:not([data-state=checked]):hover":{bgColor:"{colors.primary}",color:"white"}}}}}}},"& .maplibregl-control-container":{"& .maplibregl-ctrl-bottom-right":{pointerEvents:"none",position:"absolute",zIndex:"2",bottom:0,right:0},"& .mapboxgl-ctrl-generic-geocoder":{position:"absolute",top:0,width:"100%"},"& .suggestions-wrapper":{bgColor:"fourth",borderRadius:"1rem"},"& .suggestions":{"& li":{padding:"1rem 1.5rem",_hover:{bgColor:"primary",color:"white",cursor:"pointer","& a":{color:"white"}}}},"& .maplibregl-ctrl-attrib":{backgroundColor:"hsla(0, 0%, 100%, .5)",margin:0,padding:"0 5px","& summary":{appearance:"none",listStyle:"none"}}}}))},[a("div",{ref_key:"mapContainer",ref:p,class:n([i.isInteractiveMap?o(r)({flex:"auto",position:"absolute",width:"100%",height:"100%"}):o(r)({height:"60rem"})])},null,2)],2),a("div",{ref_key:"clusterResultsRef",ref:b,class:n([o(r)({bgColor:"{colors.white}",height:"100%",overflow:"auto",border:"{borders.sm} {colors.lightGray}",display:"flex",flexDir:"column",position:"relative"}),o(e)?.data.isClusterOpen?o(r)({animation:"listResultsSwipeIn ease-in-out .1s forwards"}):null])},[a("p",{class:n(o(r)({padding:{base:"1rem 2rem",md:"1rem 5rem"},marginBottom:0,fontWeight:600}))},[a("span",null,[a("span",null,u(o(e)?.data.popupItems.value.length||i.results.length),1),f(" "+u(t.$t("search.filters.results")),1)]),f(" "+u(t.$t("search.map.inTheZone")),1)],2),T(_,{results:o(e)?.data.popupItems.value||[],"fields-to-show":i.fieldsToShow},null,8,["results","fields-to-show"])],2)],16)}}});
1export{N as _};
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.