import{a as e,o as t}from"./vendor-QjIDchsK.js";var n,r=e=>n||(n=new t(e,{}).load(),n),i=async t=>{let n=e.parse(t.src.replace(/^[^?]*\?/,``)),i=t.alt.split(`[[:split:]]`);if(!n.key)return;let a=await r(n.key),o=document.createElement(`div`),s=n.size.split(`x`),c=s[0]||null,l=s[1]||null,u=n.center.split(`,`),d=[],f=new a.maps.InfoWindow,p=new a.maps.Map(o,{center:{lat:parseFloat(u[0]),lng:parseFloat(u[1])},zoom:parseInt(n.zoom,10)});o.className=t.className,o.style.width=`${c}px`,o.style.height=`${l}px`,o.style.overflow=`hidden`,t.parentNode.replaceChild(o,t),typeof n.markers==`string`&&(n.markers=[n.markers]),n.markers.forEach(e=>{let t=e.split(`|`),n={icon:null,optAry:[]};if(t.length){for(let e=0;e<t.length;e+=1)if(t[e].indexOf(`icon:`)===0)n.icon={icon:t[e].slice(5),shadow:new a.maps.MarkerImage(`http://maps.google.co.jp/mapfiles/ms/icons/msmarker.shadow.png`,new a.maps.Size(59,32),new a.maps.Point(0,0))};else{let r=t[e].split(`,`);if(!r[0].length)return;n.optAry.push({position:new a.maps.LatLng(parseFloat(r[0]),parseFloat(r[1])),map:p})}d.push(n)}});let m=0;d.forEach(e=>{for(let t=0;t<e.optAry.length;t+=1){let n=e.optAry[t],r=new a.maps.Marker(Object.assign(n,e.icon));i[m]!==void 0&&c>=180&&((e,t)=>{t&&a.maps.event.addListener(e,`click`,()=>{f.setOptions({content:t}),f.open(p,e)})})(r,i[m].replace(/\[\[:quot:\]\]/gim,`"`).replace(/\[\[:lt:\]\]/gim,`<`).replace(/\[\[:gt:\]\]/gim,`>`).replace(/\[\[:amp:\]\]/gim,`&`)),m+=1}})};export{i as default};