(function(g,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("mapbox-gl"),require("vue")):typeof define=="function"&&define.amd?define(["exports","mapbox-gl","vue"],E):(g=typeof globalThis<"u"?globalThis:g||self,E(g.VueMapbox={},g.mapboxgl,g.Vue))})(this,function(g,E,n){"use strict";var cn=Object.defineProperty;var un=(g,E,n)=>E in g?cn(g,E,{enumerable:!0,configurable:!0,writable:!0,value:n}):g[E]=n;var $=(g,E,n)=>(un(g,typeof E!="symbol"?E+"":E,n),n);const W={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>e*(2-e),easeInOutQuad:e=>e<.5?2*e*e:-1+(4-2*e)*e,easeInCubic:e=>e*e*e,easeOutCubic:e=>--e*e*e+1,easeInOutCubic:e=>(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)};class xt{constructor(r){$(this,"map");$(this,"chainCameraList",[]);$(this,"animationIndex");$(this,"animationTime");$(this,"lastTime");$(this,"animationFrame");$(this,"currentMapCenter");$(this,"isPlay");this.map=r.map,this.chainCameraList=r.chainCameraList,this.animationIndex=0,this.animationTime=0,this.lastTime=0,this.animationFrame=void 0,this.currentMapCenter=null,this.isPlay=!1}play(){if(!this.map)throw new Error("map is required");this.isPlay||(this.pause(),this.currentMapCenter=this.map.getCenter(),window.requestAnimationFrame(this._frame.bind(this)),this.isPlay=!0)}replay(){this.pause(),this.animationIndex=0,this.animationTime=0,this.lastTime=0,this.animationFrame=void 0,this.currentMapCenter=null,this.play()}pause(){this.animationFrame&&window.cancelAnimationFrame(this.animationFrame),this.isPlay=!1}remove(){this.pause(),this.animationIndex=0,this.animationTime=0,this.lastTime=0,this.animationFrame=void 0,this.currentMapCenter=null,this.isPlay=!1,this.chainCameraList=null,this.map=null}_lerp(r,t,s){if(Array.isArray(r)&&Array.isArray(t)){const i=[0,0];for(let u=0;u=0){const o=this.currentMapCenter;t={lngLat:[o.lng,o.lat],lookAtLngLat:s.lngLat,duration:0,altitude:s.altitude}}else t=this.chainCameraList[this.animationIndex];else t=this.chainCameraList[this.animationIndex-1],s=this.chainCameraList[this.animationIndex];t.altitude=t.altitude||0,t.lngLat=this._lnglatTransform(t.lngLat),t.lookAtLngLat=this._lnglatTransform(t.lookAtLngLat),s.altitude=s.altitude||0,s.lngLat=this._lnglatTransform(s.lngLat),s.lookAtLngLat=this._lnglatTransform(s.lookAtLngLat);const i=s.easing&&W[s.easing]||W.linear,u=this._lerp(t.lngLat,s.lngLat,i(r)),a=this._lerp(t.altitude,s.altitude,i(r)),f=this._lerp(t.lookAtLngLat,s.lookAtLngLat,i(r)),l=this.map.getFreeCameraOptions();l.position=E.MercatorCoordinate.fromLngLat(u,a),l.lookAtPoint(f),this.map.setFreeCameraOptions(l)}_frame(r){this.animationIndex%=this.chainCameraList.length;const t=this.chainCameraList[this.animationIndex];if(this.animationTimet.duration&&(this.animationIndex++,this.animationTime=0),this.animationFrame=window.requestAnimationFrame(this._frame.bind(this))}}function Et({map:e,list:r,autoplay:t=!1}){const s=n.shallowRef();n.watchEffect(l=>{e.value&&!s.value&&(s.value=new xt({map:e.value,chainCameraList:r})),t&&i(),l(f)});function i(){var l;(l=s.value)==null||l.play()}function u(){var l;(l=s.value)==null||l.pause()}function a(){var l;(l=s.value)==null||l.replay()}function f(){var l;(l=s.value)==null||l.remove()}return{play:i,pause:u,replay:a,remove:f}}function Mt(e,r){const t=n.ref(r);n.watchEffect(()=>{e.value&&t.value&&e.value.easeTo(t.value)});function s(i){i&&(t.value=i)}return{easeTo:s}}function Ft(e,r){const t=n.ref();let s=r;n.watchEffect(()=>{e.value&&t.value&&e.value.fitBounds(t.value,s)});function i(u,a){t.value=u,a&&(s=a)}return{setFitBounds:i,bounds:t}}function Tt(e,r){const t=n.ref(r==null?void 0:r.bounds);let s=r;n.watchEffect(()=>{e.value&&t.value&&e.value.cameraForBounds(t.value,s)});function i(u,a){t.value=u,a&&(s=a)}return{cameraForBounds:i,bbox:t}}function Bt(e){const r=n.ref(),t=n.ref();let s,i;function u(a,f,l,o){r.value=a,t.value=f,l&&(s=l),o&&(i=o)}return n.watchEffect(()=>{e.value&&r.value&&t.value&&(i=i??e.value.getBearing(),e.value.fitScreenCoordinates(r.value,t.value,i,s))}),{fitScreenCoordinates:u,p0:r,p1:t}}function jt(e,r){const t=n.ref(r);n.watchEffect(()=>{e.value&&t.value&&e.value.flyTo(t.value)});function s(i){i&&(t.value=i)}return{flyTo:s}}function Rt(e,r){const t=n.ref(r);n.watchEffect(()=>{e.value&&t.value&&e.value.flyTo(t.value)});function s(i){i&&(t.value=i)}return{jumpTo:s}}function kt(e,r){const t=n.ref(r==null?void 0:r.offset),s=n.ref(r);n.watchEffect(()=>{e.value&&s.value&&e.value.panBy(t.value,s.value)});function i(u,a){t.value=u,a&&(s.value=a)}return{panBy:i}}function $t(e,r){const t=n.ref(r==null?void 0:r.lnglat),s=n.ref(r);n.watchEffect(()=>{e.value&&s.value&&e.value.panTo(t.value,s.value)});function i(u,a){t.value=u,a&&(s.value=a)}return{panTo:i}}function Ot(e,r){const t=n.ref(r==null?void 0:r.bearing),s=n.ref(r);n.watchEffect(()=>{e.value&&s.value&&e.value.rotateTo(t.value,s.value)});function i(u,a){t.value=u,a&&(s.value=a)}return{rotateTo:i}}function Nt(e,r){const t=n.ref(r);n.watchEffect(()=>{e.value&&t.value&&e.value.resetNorth(t.value)});function s(i){i&&(t.value=i)}return{resetNorth:s}}function Zt(e,r){const t=n.ref(r);n.watchEffect(()=>{e.value&&t.value&&e.value.resetNorthPitch(t.value)});function s(i){i&&(t.value=i)}return{resetNorthPitch:s}}function At(e,r){const t=n.ref(r);n.watchEffect(()=>{e.value&&t.value&&e.value.snapToNorth(t.value)});function s(i){i&&(t.value=i)}return{snapToNorth:s}}function Ut(e,r){const t=n.ref(r==null?void 0:r.zoom),s=n.ref(r);n.watchEffect(()=>{e.value&&s.value&&e.value.zoomTo(t.value,s.value)});function i(u,a){t.value=u,a&&(s.value=a)}return{zoomTo:i}}function Dt(e,r){const t=n.ref(r);n.watchEffect(()=>{e.value&&t.value&&e.value.zoomIn(t.value)});function s(i){i&&(t.value=i)}return{zoomIn:s}}function Kt(e,r){const t=n.ref(r);n.watchEffect(()=>{e.value&&t.value&&e.value.zoomOut(t.value)});function s(i){i&&(t.value=i)}return{zoomOut:s}}function Q({map:e,position:r="bottom-right",compact:t=!1,customAttribution:s=""}){const i=n.shallowRef(null),u={compact:t,customAttribution:s},a=n.watchEffect(()=>{e.value&&!i.value&&(i.value=new E.AttributionControl(u),e.value.addControl(i.value,r))});function f(){a(),e.value&&i.value&&e.value.removeControl(i.value),i.value=null}return n.onUnmounted(()=>{f()}),f}class Gt{constructor(r){$(this,"container");$(this,"defaultClassName","mapboxgl__custom__control");$(this,"on",{});this.container=document.createElement("div"),this.on=r.on||{},r.el&&this.container.appendChild(r.el),this.container.className=`${this.defaultClassName}${r.className?" "+r.className:""}`}onAdd(r){return this.on.add&&this.on.add(r,this.container),this.container}onRemove(r){var t;this.on.remove&&this.on.remove(r,this.container),this.container&&((t=this.container.parentNode)==null||t.removeChild(this.container)),this.container=null,this.on=null}getDefaultPosition(){return"top-right"}}function X({map:e,container:r,className:t,position:s="top-right",on:i={}}){const u=n.shallowRef(null),a=n.watchEffect(()=>{e.value&&n.unref(r)&&!u.value&&(u.value=new Gt({el:n.unref(r),className:t,on:{add:(l,o)=>{i.add&&i.add(l,o)},remove:(l,o)=>{i.remove&&i.remove(l,o)}}}),e.value.addControl(u.value,s))});function f(){a(),e.value&&u.value&&e.value.removeControl(u.value),u.value=null}return n.onUnmounted(()=>{f()}),f}function Y({map:e,container:r,position:t="bottom-right"}){const s=n.shallowRef(null),i=n.watchEffect(()=>{if(e.value&&!s.value){let a;typeof n.unref(r)=="string"?a=document.querySelector(n.unref(r)):a=n.unref(r),s.value=new E.FullscreenControl({container:a||document.body}),e.value.addControl(s.value,t)}});function u(){i(),e.value&&s.value&&e.value.removeControl(s.value),s.value=null}return n.onUnmounted(()=>{u()}),u}function V({map:e,position:r="bottom-right",options:t={}}){const s=n.shallowRef(null),i=n.watchEffect(()=>{e.value&&!s.value&&(s.value=new E.GeolocateControl(t),e.value.addControl(s.value,r))});function u(){i(),e.value&&s.value&&e.value.removeControl(s.value),s.value=null}return n.onUnmounted(()=>{u()}),u}function ee({map:e,position:r="top-right",showCompass:t=!0,showZoom:s=!0,visualizePitch:i=!1}){const u=n.shallowRef(null),a={showCompass:t,showZoom:s,visualizePitch:i},f=n.watchEffect(()=>{e.value&&!u.value&&(u.value=new E.NavigationControl(a),e.value.addControl(u.value,r))});function l(){f(),e.value&&u.value&&e.value.removeControl(u.value),u.value=null}return n.onUnmounted(()=>{l()}),l}function te({map:e,position:r="bottom-right",maxWidth:t=100,unit:s="metric"}){const i=n.shallowRef(null),u={maxWidth:t,unit:s},a=n.watchEffect(()=>{e.value&&!i.value&&(i.value=new E.ScaleControl(u),e.value.addControl(i.value,r))});function f(){a(),e.value&&i.value&&e.value.removeControl(i.value),i.value=null}return n.onUnmounted(()=>{f()}),f}function Ht({target:e,root:r,onIntersect:t,rootMargin:s="0px",threshold:i=.1}){let u=()=>{};const a=n.ref(null),f=n.watchEffect(()=>{u(),a.value=new IntersectionObserver(t,{root:r?r.value:null,rootMargin:s,threshold:i});const l=e.value;l&&a.value.observe(l),u=()=>{a.value&&(a.value.disconnect(),e.value&&a.value.unobserve(e.value))}});return{observer:a,stop:()=>{u(),f()}}}function O(e){const r=i=>{e.on&&e.on(i)},t=n.watchEffect(i=>{const u=n.unref(e.map),a=n.unref(e.layer);if(u&&a){const f=typeof a=="string"?a:a.id;u.on(e.event,f,r)}i(s)});function s(){const i=n.unref(e.map),u=n.unref(e.layer);if(i&&u){const a=typeof u=="string"?u:u.id;i.off(e.event,a,r)}}return n.onUnmounted(()=>{t()}),{remove:s}}function ne(e){const r=i=>{e.on&&e.on(i)},t=n.watchEffect(i=>{const u=n.unref(e.map);u&&u.on(e.event,r),i(s)});function s(){const i=n.unref(e.map);i&&i.off(e.event,r)}return n.onUnmounted(()=>{t()}),{remove:s}}function k(e,r){const t=n.unref(e);let s=!!(t!=null&&t._loaded);s&&u(!0);function i(){const l=n.unref(e);s&&(s=!1,r.unLoad&&r.unLoad(l))}function u(l=!1){const o=n.unref(e);s&&!l||(s=!0,r.onLoad&&r.onLoad(o))}function a(){const l=n.unref(e);l&&(l.off("styledata",u),l.off("styledataloading",i),l.off("load",u))}const f=n.watchEffect(l=>{const o=n.unref(e);o&&(s?u():o.on("load",u),o.on("styledata",u),o.on("styledataloading",i),l(a))});return n.onUnmounted(()=>{i(),f(),a()}),{clear:a}}const qt="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Jt=(e=21)=>{let r="",t=crypto.getRandomValues(new Uint8Array(e));for(;e--;)r+=qt[t[e]&63];return r};function D(e){return e&&typeof e=="string"?e:Jt()}function T(e,r){return e.style&&e.getSource(r)}function j(e,r){return e.style&&e.getLayer(r)}function oe(e){if(e){if(Array.isArray(e))return e.length>=2&&e[0]!==void 0&&e[1]!==void 0;if(String.prototype.toString.call(e)==="[object Object]")return(e.lng!==void 0||e.lon!==void 0)&&e.lat!==void 0}return!1}function N(e){const{map:r,source:t,type:s,beforeId:i,filter:u=["all"],layout:a={},paint:f={},renderingMode:l="",slot:o="",maxzoom:c=24,minzoom:d=0,id:L,metadata:m={},sourceLayer:y="",register:b}=e,S=D(L),v=n.shallowRef(null),h=n.computed(()=>v.value);n.watch(()=>n.unref(t),x=>{x?z():B()}),k(r,{unLoad:B,onLoad:z});function C(x){const w=n.unref(r);w&&v.value&&j(w,S)&&w.moveLayer(S,x)}function I(x=["all"]){const w=n.unref(r);w&&v.value&&j(w,S)&&w.setFilter(S,x)}function R(x=0,w=24){const _=n.unref(r);_&&v.value&&j(_,S)&&_.setLayerZoomRange(S,x,w)}function H(x,w,_={validate:!0}){const U=n.unref(r);U&&v.value&&j(U,S)&&U.setPaintProperty(S,x,w,_)}function P(x,w,_={validate:!0}){const U=n.unref(r);U&&v.value&&j(U,S)&&U.setLayoutProperty(S,x,w,_)}function z(){const x=n.unref(r),w=n.unref(t);if(x&&w&&!v.value&&!j(x,S)){let _;typeof w=="string"&&(_=w),typeof w=="object"&&(_=w.id?w.id:w.type?w:""),x.addLayer({id:S,type:s,layout:a,paint:f,renderingMode:l,slot:o,source:_,"source-layer":y,maxzoom:c,minzoom:d,filter:u,metadata:m},i),v.value=x.getLayer(S),b==null||b({layerId:S,getLayer:h,removeLayer:B,setBeforeId:C,setFilter:I,setZoomRange:R,setPaintProperty:H,setLayoutProperty:P},x)}}function B(){const x=n.unref(r);v.value=null,x&&j(x,S)&&x.removeLayer(S)}return{layerId:S,getLayer:h,removeLayer:B,setBeforeId:C,setFilter:I,setZoomRange:R,setPaintProperty:H,setLayoutProperty:P}}function M(e,r){return Object.keys(e).reduce((t,s)=>r.includes(s)?{...t,[s]:e[s]}:t,{})}var Z=(e=>(e.Background="background",e.Circle="circle",e.Fill="fill",e.FillExtrusion="fill-extrusion",e.Line="line",e.Raster="raster",e.Symbol="symbol",e.Heatmap="heatmap",e.Hillshade="hillshade",e.Sky="sky",e.Custom="custom",e))(Z||{});const A=["mousedown","mouseup","mouseover","mousemove","click","dblclick","mouseenter","mouseleave","contextmenu","mouseout","touchstart","touchend","touchcancel"],ae=["background-color","background-emissive-strength","background-opacity","background-pattern"],re=["visibility"];function ie(e){const r=Z.Background;e.style=e.style||{};const t=M(e.style,ae),s=M(e.style,re),{setLayoutProperty:i,setPaintProperty:u,...a}=N({map:e.map,source:e.source,type:r,id:e.id,beforeId:e.beforeId,filter:e.filter,layout:s,paint:t,renderingMode:e.renderingMode,slot:e.slot,maxzoom:e.maxzoom,minzoom:e.minzoom,metadata:e.metadata,sourceLayer:e.sourceLayer,register:(l,o)=>{var c;(c=e.register)==null||c.call(e,{...l,setStyle:f},o)}});function f(l={}){Object.keys(l).forEach(o=>{ae.includes(o)&&u(o,l[o],{validate:!1}),re.includes(o)&&i(o,l[o],{validate:!1})})}return{...a,setStyle:f,setLayoutProperty:i,setPaintProperty:u}}const se=["circle-blur","circle-color","circle-emissive-strength","circle-opacity","circle-pitch-alignment","circle-pitch-scale","circle-radius","circle-stroke-color","circle-stroke-opacity","circle-stroke-width","circle-translate","circle-translate-anchor"],le=["circle-sort-key","visibility"];function ce(e){const r=Z.Circle;e.style=e.style||{};const t=M(e.style,se),s=M(e.style,le),{setLayoutProperty:i,setPaintProperty:u,...a}=N({map:e.map,source:e.source,type:r,id:e.id,beforeId:e.beforeId,filter:e.filter,layout:s,paint:t,renderingMode:e.renderingMode,slot:e.slot,maxzoom:e.maxzoom,minzoom:e.minzoom,metadata:e.metadata,sourceLayer:e.sourceLayer,register:(l,o)=>{var c;(c=e.register)==null||c.call(e,{...l,setStyle:f},o)}});function f(l={}){Object.keys(l).forEach(o=>{se.includes(o)&&u(o,l[o],{validate:!1}),le.includes(o)&&i(o,l[o],{validate:!1})})}return{...a,setStyle:f,setLayoutProperty:i,setPaintProperty:u}}function ue({map:e,beforeId:r,customLayer:t}){const s=n.ref(),i=n.shallowRef(null),u=n.computed(()=>i.value);k(e,{unLoad:f,onLoad:a});function a(){const o=n.unref(e),c=n.unref(t);let d=c;typeof c=="function"&&c instanceof Object&&(d=new c),s.value=d.id,o&&s&&!i.value&&!j(o,s.value)&&(o.addLayer(d,r),i.value=o.getLayer(s.value))}function f(){const o=n.unref(e);i.value=null,o&&s.value&&j(o,s.value)&&o.removeLayer(s.value)}function l(o){const c=n.unref(e);c&&s.value&&i.value&&j(c,s.value)&&c.moveLayer(s.value,o)}return{layerId:s,getLayer:u,removeLayer:f,setBeforeId:l}}const fe=["fill-extrusion-ambient-occlusion-ground-attenuation","fill-extrusion-ambient-occlusion-ground-radius","fill-extrusion-ambient-occlusion-wall-radius","fill-extrusion-base","fill-extrusion-color","fill-extrusion-cutoff-fade-range","fill-extrusion-emissive-strength","fill-extrusion-flood-light-color","fill-extrusion-flood-light-ground-attenuation","fill-extrusion-flood-light-ground-radius","fill-extrusion-flood-light-intensity","fill-extrusion-flood-light-wall-radius","fill-extrusion-height","fill-extrusion-opacity","fill-extrusion-pattern","fill-extrusion-rounded-roof","fill-extrusion-translate","fill-extrusion-translate-anchor","fill-extrusion-vertical-gradient","fill-extrusion-vertical-scale"],me=["visibility"];function de(e){const r=Z.FillExtrusion;e.style=e.style||{};const t=M(e.style,fe),s=M(e.style,me),{setLayoutProperty:i,setPaintProperty:u,...a}=N({map:e.map,source:e.source,type:r,id:e.id,beforeId:e.beforeId,filter:e.filter,layout:s,paint:t,renderingMode:e.renderingMode,slot:e.slot,maxzoom:e.maxzoom,minzoom:e.minzoom,metadata:e.metadata,sourceLayer:e.sourceLayer,register:(l,o)=>{var c;(c=e.register)==null||c.call(e,{...l,setStyle:f},o)}});function f(l={}){Object.keys(l).forEach(o=>{fe.includes(o)&&u(o,l[o],{validate:!1}),me.includes(o)&&i(o,l[o],{validate:!1})})}return{...a,setStyle:f,setLayoutProperty:i,setPaintProperty:u}}const he=["fill-antialias","fill-color","fill-emissive-strength","fill-opacity","fill-outline-color","fill-pattern","fill-translate","fill-translate-anchor"],ye=["fill-sort-key","visibility"];function ge(e){const r=Z.Fill;e.style=e.style||{};const t=M(e.style,he),s=M(e.style,ye),{setLayoutProperty:i,setPaintProperty:u,...a}=N({map:e.map,source:e.source,type:r,id:e.id,beforeId:e.beforeId,filter:e.filter,layout:s,paint:t,renderingMode:e.renderingMode,slot:e.slot,maxzoom:e.maxzoom,minzoom:e.minzoom,metadata:e.metadata,sourceLayer:e.sourceLayer,register:(l,o)=>{var c;(c=e.register)==null||c.call(e,{...l,setStyle:f},o)}});function f(l={}){Object.keys(l).forEach(o=>{he.includes(o)&&u(o,l[o],{validate:!1}),ye.includes(o)&&i(o,l[o],{validate:!1})})}return{...a,setStyle:f,setLayoutProperty:i,setPaintProperty:u}}const ve=["heatmap-color","heatmap-intensity","heatmap-opacity","heatmap-radius","heatmap-weight"],Le=["visibility"];function Ce(e){const r=Z.Heatmap;e.style=e.style||{};const t=M(e.style,ve),s=M(e.style,Le),{setLayoutProperty:i,setPaintProperty:u,...a}=N({map:e.map,source:e.source,type:r,id:e.id,beforeId:e.beforeId,filter:e.filter,layout:s,paint:t,renderingMode:e.renderingMode,slot:e.slot,maxzoom:e.maxzoom,minzoom:e.minzoom,metadata:e.metadata,sourceLayer:e.sourceLayer,register:(l,o)=>{var c;(c=e.register)==null||c.call(e,{...l,setStyle:f},o)}});function f(l={}){Object.keys(l).forEach(o=>{ve.includes(o)&&u(o,l[o],{validate:!1}),Le.includes(o)&&i(o,l[o],{validate:!1})})}return{...a,setStyle:f,setLayoutProperty:i,setPaintProperty:u}}const be=["hillshade-accent-color","hillshade-emissive-strength","hillshade-exaggeration","hillshade-highlight-color","hillshade-illumination-anchor","hillshade-illumination-direction","hillshade-shadow-color"],we=["visibility"];function Se(e){const r=Z.Hillshade;e.style=e.style||{};const t=M(e.style,be),s=M(e.style,we),{setLayoutProperty:i,setPaintProperty:u,...a}=N({map:e.map,source:e.source,type:r,id:e.id,beforeId:e.beforeId,filter:e.filter,layout:s,paint:t,renderingMode:e.renderingMode,slot:e.slot,maxzoom:e.maxzoom,minzoom:e.minzoom,metadata:e.metadata,sourceLayer:e.sourceLayer,register:(l,o)=>{var c;(c=e.register)==null||c.call(e,{...l,setStyle:f},o)}});function f(l={}){Object.keys(l).forEach(o=>{be.includes(o)&&u(o,l[o],{validate:!1}),we.includes(o)&&i(o,l[o],{validate:!1})})}return{...a,setStyle:f,setLayoutProperty:i,setPaintProperty:u}}const _e=["line-blur","line-color","line-dasharray","line-emissive-strength","line-gap-width","line-gradient","line-offset","line-opacity","line-pattern","line-translate","line-translate-anchor","line-trim-offset","line-width"],Ie=["line-cap","line-join","line-miter-limit","line-round-limit","line-sort-key","visibility"];function pe(e){const r=Z.Line;e.style=e.style||{};const t=M(e.style,_e),s=M(e.style,Ie),{setLayoutProperty:i,setPaintProperty:u,...a}=N({map:e.map,source:e.source,type:r,id:e.id,beforeId:e.beforeId,filter:e.filter,layout:s,paint:t,renderingMode:e.renderingMode,slot:e.slot,maxzoom:e.maxzoom,minzoom:e.minzoom,metadata:e.metadata,sourceLayer:e.sourceLayer,register:(l,o)=>{var c;(c=e.register)==null||c.call(e,{...l,setStyle:f},o)}});function f(l={}){Object.keys(l).forEach(o=>{_e.includes(o)&&u(o,l[o],{validate:!1}),Ie.includes(o)&&i(o,l[o],{validate:!1})})}return{...a,setStyle:f,setLayoutProperty:i,setPaintProperty:u}}const Pe=["raster-array-band","raster-brightness-max","raster-brightness-min","raster-color","raster-color-mix","raster-color-range","raster-contrast","raster-elevation","raster-emissive-strength","raster-fade-duration","raster-hue-rotate","raster-opacity","raster-resampling","raster-saturation"],ze=["visibility"];function xe(e){const r=Z.Raster;e.style=e.style||{};const t=M(e.style,Pe),s=M(e.style,ze),{setLayoutProperty:i,setPaintProperty:u,...a}=N({map:e.map,source:e.source,type:r,id:e.id,beforeId:e.beforeId,filter:e.filter,layout:s,paint:t,renderingMode:e.renderingMode,slot:e.slot,maxzoom:e.maxzoom,minzoom:e.minzoom,metadata:e.metadata,sourceLayer:e.sourceLayer,register:(l,o)=>{var c;(c=e.register)==null||c.call(e,{...l,setStyle:f},o)}});function f(l={}){Object.keys(l).forEach(o=>{Pe.includes(o)&&u(o,l[o],{validate:!1}),ze.includes(o)&&i(o,l[o],{validate:!1})})}return{...a,setStyle:f,setLayoutProperty:i,setPaintProperty:u}}const Ee=["sky-atmosphere-color","sky-atmosphere-halo-color","sky-atmosphere-sun","sky-atmosphere-sun-intensity","sky-gradient","sky-gradient-center","sky-gradient-radius","sky-opacity","sky-type"],Me=["visibility"];function Fe(e){const r=Z.Sky;e.style=e.style||{};const t=M(e.style,Ee),s=M(e.style,Me),{setLayoutProperty:i,setPaintProperty:u,...a}=N({map:e.map,source:e.source,type:r,id:e.id,beforeId:e.beforeId,filter:e.filter,layout:s,paint:t,renderingMode:e.renderingMode,slot:e.slot,maxzoom:e.maxzoom,minzoom:e.minzoom,metadata:e.metadata,sourceLayer:e.sourceLayer,register:(l,o)=>{var c;(c=e.register)==null||c.call(e,{...l,setStyle:f},o)}});function f(l={}){Object.keys(l).forEach(o=>{Ee.includes(o)&&u(o,l[o],{validate:!1}),Me.includes(o)&&i(o,l[o],{validate:!1})})}return{...a,setStyle:f,setLayoutProperty:i,setPaintProperty:u}}const Te=["icon-color","icon-color-brightness-max","icon-color-brightness-min","icon-color-contrast","icon-color-saturation","icon-emissive-strength","icon-halo-blur","icon-halo-color","icon-halo-width","icon-opacity","icon-translate","icon-translate-anchor","icon-image-cross-fade","text-color","text-emissive-strength","text-halo-blur","text-halo-color","text-halo-width","text-opacity","text-translate","text-translate-anchor"],Be=["icon-allow-overlap","icon-anchor","icon-ignore-placement","icon-image","icon-keep-upright","icon-offset","icon-optional","icon-padding","icon-pitch-alignment","icon-rotate","icon-rotation-alignment","icon-size","icon-text-fit","icon-text-fit-padding","symbol-avoid-edges","symbol-placement","symbol-sort-key","symbol-spacing","symbol-z-elevate","symbol-z-order","text-allow-overlap","text-anchor","text-field","text-font","text-ignore-placement","text-justify","text-keep-upright","text-letter-spacing","text-line-height","text-max-angle","text-max-width","text-offset","text-optional","text-padding","text-pitch-alignment","text-radial-offset","text-rotate","text-rotation-alignment","text-size","text-transform","text-variable-anchor","text-writing-mode","visibility"];function je(e){const r=Z.Symbol;e.style=e.style||{};const t=M(e.style,Te),s=M(e.style,Be),{setLayoutProperty:i,setPaintProperty:u,...a}=N({map:e.map,source:e.source,type:r,id:e.id,beforeId:e.beforeId,filter:e.filter,layout:s,paint:t,renderingMode:e.renderingMode,slot:e.slot,maxzoom:e.maxzoom,minzoom:e.minzoom,metadata:e.metadata,sourceLayer:e.sourceLayer,register:(l,o)=>{var c;(c=e.register)==null||c.call(e,{...l,setStyle:f},o)}});function f(l={}){Object.keys(l).forEach(o=>{Te.includes(o)&&u(o,l[o],{validate:!1}),Be.includes(o)&&i(o,l[o],{validate:!1})})}return{...a,setStyle:f,setLayoutProperty:i,setPaintProperty:u}}const Wt={color:"#ffffff","high-color":"#245cdf","horizon-blend":["interpolate",["linear"],["zoom"],4,.2,7,.1],range:[.5,10],"space-color":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"star-intensity":["interpolate",["linear"],["zoom"],5,.35,6,0]};function Re({map:e,options:r=Wt}){const t=n.ref(r);k(e,{onLoad(){s(t.value)},unLoad(){i()}});function s(u){var a;t.value=u,(a=e.value)==null||a.setFog(t.value)}function i(){var u;(u=e.value)==null||u.setFog(null)}return{setFog:s,removeFog:i}}function ke(e){let r,t;const s=new Promise((l,o)=>{r=l,t=o}),i=n.watchEffect(()=>{n.unref(e.map)&&u(e.image).then(r).catch(t)});async function u(l){const o=n.unref(e.map);if(o)if(typeof l=="string")try{l=await a(l),o.hasImage(e.id)?o.updateImage(e.id,l):o.addImage(e.id,l,e.options),Promise.resolve()}catch(c){Promise.reject(c)}else o.hasImage(e.id)?o.updateImage(e.id,l):o.addImage(e.id,l,e.options),Promise.resolve();else Promise.reject(new Error("Map is not defined"))}function a(l){const o=n.unref(e.map);return new Promise((c,d)=>{if(!o)return d(new Error("Map is not defined"));o.loadImage(l,(L,m)=>{L&&d(L),c(m)})})}function f(){const l=n.unref(e.map);l!=null&&l.hasImage(e.id)&&l.removeImage(e.id),t()}return n.onUnmounted(()=>{f(),i()}),{remove:f,loadImage:a,updateImage:u,loadPromise:s}}const Qt={anchor:"viewport",color:"#ffffff",intensity:.5,position:[1.15,210,30]};function $e({map:e,options:r=Qt}){const t=n.ref(r);k(e,{onLoad(){s(t.value)}});function s(u){const a=n.unref(e);t.value=u,a==null||a.setLight(t.value)}function i(){const u=n.unref(e);u==null||u.setLight({})}return{setLight:s,removeLight:i}}var K=(e=>(e[e.Disposed=-1]="Disposed",e[e.NotLoaded=0]="NotLoaded",e[e.Loading=1]="Loading",e[e.Loaded=2]="Loaded",e[e.Error=3]="Error",e))(K||{});const Oe=["mousedown","mouseup","mouseover","mousemove","preclick","click","dblclick","mouseenter","mouseleave","mouseout","contextmenu","wheel","touchstart","touchend","touchmove","touchcancel","movestart","move","moveend","dragstart","drag","dragend","zoomstart","zoom","zoomend","rotatestart","rotate","rotateend","pitchstart","pitch","pitchend","boxzoomstart","boxzoomend","boxzoomcancel","load","render","idle","error","webglcontextlost","webglcontextrestored","data","styledata","sourcedata","dataloading","styledataloading","sourcedataloading","styleimagemissing"];function Ne(e,r={}){const t=n.shallowRef(null),s=n.ref(K.NotLoaded),{register:i,...u}=r,a=n.ref(u),f=n.watchEffect(()=>{c(),!n.unref(t)&&n.unref(e)&&(o(),f())});function l(){if(!u.center&&!u.bounds){console.warn("center or bounds is not exist");return}o()}function o(){s.value=K.NotLoaded;const w=n.unref(a),_=n.unref(e);if(!_){console.warn("el is not exist");return}t.value=new E.Map({attributionControl:!1,...w,container:_}),s.value=K.Loading,i==null||i(x),t.value.on("load",d),t.value.on("error",L)}function c(){const w=n.unref(t);w&&(w.off("load",d),w.off("error",L),w.remove()),t.value=null}function d(){s.value=K.Loaded}function L(w){console.warn("map error",w)}function m(w){var _;(_=t.value)==null||_.setCenter(w),a.value.center=w}function y(w=0){var _;(_=t.value)==null||_.setBearing(w),a.value.bearing=w}function b(w){var _;(_=t.value)==null||_.setZoom(w),a.value.zoom=w}function S(w){var _;(_=t.value)==null||_.setPitch(w),a.value.pitch=w}function v(w){var _;(_=t.value)==null||_.setStyle(w,{diff:!0}),a.value.style=w}function h(w){var _;(_=t.value)==null||_.setMaxBounds(w),a.value.maxBounds=w}function C(w=60){var _;(_=t.value)==null||_.setMaxPitch(w),a.value.maxPitch=w}function I(w=24){var _;(_=t.value)==null||_.setMaxZoom(w),a.value.maxZoom=w}function R(w=0){var _;(_=t.value)==null||_.setMinPitch(w),a.value.minPitch=w}function H(w=0){var _;(_=t.value)==null||_.setMinZoom(w),a.value.minZoom=w}function P(w={name:"mercator"}){var _;(_=t.value)==null||_.setProjection(w),a.value.projection=w}function z(w=!0){var _;(_=t.value)==null||_.setRenderWorldCopies(w),a.value.renderWorldCopies=w}function B(w){Object.keys(w).forEach(_=>{var zt;const U=w[_];(zt=t.value)==null||zt.setConfig(_,U)}),a.value.config={...w}}const x={getMapInstance:n.computed(()=>t.value),getMapStatus:n.computed(()=>s.value),setRenderWorldCopies:z,setProjection:P,setMinZoom:H,setMinPitch:R,setMaxZoom:I,setMaxPitch:C,setMaxBounds:h,setStyle:v,setPitch:S,setZoom:b,setBearing:y,setCenter:m,setConfig:B};return{initMap:o,removeMap:c,checkInitMap:l,...x}}function Ze({map:e,lnglat:r,popup:t,el:s,options:i={},on:u={}}){const a=n.shallowRef(null);function f(P){var z;(z=u.dragstart)==null||z.call(u,P)}function l(P){var z;(z=u.drag)==null||z.call(u,P)}function o(P){var z;(z=u.dragend)==null||z.call(u,P)}let c=n.unref(t);const d=n.watchEffect(P=>{const z=n.unref(e);z&&!a.value&&(a.value=new E.Marker({...i,element:s==null?void 0:s.value}),oe(r)&&L(r),c&&m(c),a.value.addTo(z),a.value.on("dragstart",f),a.value.on("drag",l),a.value.on("dragend",o)),P(H)});n.watch(()=>n.unref(t),m);function L(P){a.value&&a.value.setLngLat(P)}function m(P){c=P,a.value&&a.value.setPopup(P)}function y(P){a.value&&a.value.setOffset(P)}function b(P){a.value&&a.value.setDraggable(P)}function S(){a.value&&a.value.togglePopup()}function v(){return a.value?a.value.getElement():null}function h(P){a.value&&a.value.setRotation(P)}function C(P){a.value&&a.value.setRotationAlignment(P)}function I(P){a.value&&a.value.setPitchAlignment(P)}function R(P){a.value&&a.value.setOccludedOpacity(P)}function H(){a.value&&(a.value.off("dragstart",f),a.value.off("drag",l),a.value.off("dragend",o),a.value.remove()),a.value=null}return n.onUnmounted(()=>{d(),c=null}),{setLngLat:L,setPopup:m,setOffset:y,setDraggable:b,togglePopup:S,getElement:v,setRotation:h,setRotationAlignment:C,setPitchAlignment:I,setOccludedOpacity:R}}function Ae({map:e,lnglat:r,el:t,show:s=!1,options:i={},on:u={}}){const a=n.shallowRef(null),f=n.computed(()=>a.value),l=n.watchEffect(I=>{n.unref(e)&&(t!=null&&t.value)&&!a.value&&(a.value=new E.Popup({...i}),a.value.setDOMContent(t.value),oe(r)&&d(r),s&&S(),a.value.on("close",c),a.value.on("open",o)),I(()=>{v()})});function o(){var I;a.value&&((I=u.open)==null||I.call(u,a.value))}async function c(){var I;a.value&&(await new Promise(R=>R(!0)),(I=u.close)==null||I.call(u,a.value))}function d(I){a.value&&a.value.setLngLat(I)}function L(I){a.value&&a.value.setOffset(I)}function m(I){a.value&&a.value.addClassName(I)}function y(I){a.value&&a.value.removeClassName(I)}function b(I){a.value&&a.value.setMaxWidth(I)}function S(){const I=n.unref(e);I&&a.value&&!a.value.isOpen()&&a.value.addTo(I)}function v(){C(),h(),a.value=null}function h(){a.value&&a.value.isOpen()&&a.value.remove()}function C(){a.value&&(a.value.off("close",c),a.value.off("open",o))}return n.onUnmounted(()=>{l()}),{getPopup:f,setLngLat:d,setOffset:L,addClassName:m,removeClassName:y,remove:v,show:S,hide:h,setMaxWidth:b}}var G=(e=>(e.Geojson="geojson",e.Vector="vector",e.Raster="raster",e.RasterDem="raster-dem",e.Image="image",e.Video="video",e.Canvas="canvas",e))(G||{});function Xt(){return E.version}function q(){return parseInt(Xt().split(".")[0],10)}function J({map:e,id:r,register:t,url:s,tiles:i,options:u={}}){const a=G.RasterDem,f=D(r),l=n.shallowRef(null),o=n.computed(()=>l.value),c=n.ref(s??""),d=n.ref(i??[]);function L(h){const C=n.unref(e);let I=h.isSourceLoaded;q()===1&&(I=!0),!l.value&&h.sourceId===f&&I&&(l.value=C==null?void 0:C.getSource(f),t==null||t({sourceId:f,getSource:o,setUrl:y,setTiles:b,reload:S},C),C==null||C.off("sourcedata",L))}function m(){const h=n.unref(e);!l.value&&h&&!T(h,f)&&(c.value||d.value.length)&&(h.addSource(f,{...u,type:a,url:c.value,tiles:d.value}),h.on("sourcedata",L))}function y(h=""){if(c.value=h,!l.value){m();return}h&&l.value.setUrl(h)}function b(h){if(d.value=h||[],!l.value){m();return}d.value.length&&l.value.setTiles(h)}function S(){var h;(h=l.value)==null||h.reload()}k(e,{unLoad:v,onLoad:m});function v(){const h=n.unref(e);l.value=null,h&&T(h,f)&&(h.removeSource(f),h.off("sourcedata",L))}return n.onUnmounted(v),{sourceId:f,getSource:o,setUrl:y,setTiles:b,reload:S,removeSource:v}}function Ue(e){const{removeSource:r,sourceId:t,getSource:s,setTiles:i,setUrl:u}=J({map:e.map,id:e.id,url:e.url,tiles:e.tiles,options:e.options}),a=n.watchEffect(()=>{const l=n.unref(e.map);l&&s.value&&l.setTerrain({source:t,exaggeration:e.exaggeration??1})});function f(){const l=n.unref(e.map);l&&l.getTerrain()&&(l==null||l.setTerrain(null)),r()}return n.onUnmounted(()=>{a(),f()}),{removeTerrain:f,setTerrainUrl:u,setTerrainTiles:i}}function De({map:e,id:r,register:t,animate:s=!1,canvas:i,coordinates:u}){const a=G.Canvas,f=D(r),l=n.shallowRef(null),o=n.ref(u),c=n.computed(()=>l.value);k(e,{unLoad:S,onLoad:L});function d(v){const h=n.unref(e);let C=v.isSourceLoaded;q()===1&&(C=!0),!l.value&&v.sourceId===f&&C&&(l.value=h==null?void 0:h.getSource(f),t==null||t({sourceId:f,setPlay:y,getSource:c,setCoordinates:m,getCanvas:b},h),h==null||h.off("sourcedata",d))}function L(){var h;const v=n.unref(e);i||(i=document.createElement("canvas")),!l.value&&v&&i&&((h=o.value)!=null&&h.length)&&(v.addSource(f,{type:a,canvas:i,animate:s,coordinates:o.value}),v.on("sourcedata",d))}function m(v){if(v.length&&(o.value=v),!l.value){L();return}o.value&&l.value.setCoordinates(v)}function y(v){l.value&&(v?l.value.play():l.value.pause())}function b(){var v;return(v=l.value)==null?void 0:v.getCanvas()}function S(){const v=n.unref(e);l.value=null,v&&T(v,f)&&(v.removeSource(f),v.off("sourcedata",d))}return n.onUnmounted(S),{sourceId:f,setPlay:y,getCanvas:b,getSource:c,setCoordinates:m,removeSource:S}}const Yt={type:"FeatureCollection",features:[]};function Ke({map:e,id:r,register:t,options:s={},data:i=Yt}){const u=D(r),a=G.Geojson,f=n.shallowRef(null),l=n.computed(()=>f.value);k(e,{unLoad:L,onLoad:c});function o(m){const y=n.unref(e);let b=m.isSourceLoaded;q()===1&&(b=!0),!f.value&&m.sourceId===u&&b&&(f.value=y==null?void 0:y.getSource(u),t==null||t({sourceId:u,getSource:l,setData:d},y),y==null||y.off("sourcedata",o))}function c(){const m=n.unref(e);m&&!f.value&&!T(m,u)&&(m.addSource(u,{...s,type:a,data:i}),m.on("sourcedata",o))}function d(m){const y=n.unref(e);y&&f.value&&T(y,u)&&m&&f.value.setData(m)}function L(){const m=n.unref(e);f.value=null,m&&T(m,u)&&(m.removeSource(u),m.off("sourcedata",o))}return n.onUnmounted(L),{sourceId:u,getSource:l,setData:d,removeSource:L}}function Ge({map:e,id:r,register:t,url:s,coordinates:i}){const u=G.Image,a=D(r),f=n.shallowRef(null),l=n.computed(()=>f.value),o=n.ref(s),c=n.ref(i);function d(v){const h=n.unref(e);h&&f.value&&T(h,a)&&f.value.updateImage(v)}function L(v){const h=n.unref(e);h&&f.value&&T(h,a)&&v&&f.value.setCoordinates(v)}function m(v){if(o.value=v.url?v.url:"",v.coordinates&&(c.value=v.coordinates),!f.value){b();return}v.url?d(v):v.coordinates&&L(v.coordinates)}function y(v){const h=n.unref(e);let C=v.isSourceLoaded;q()===1&&(C=!0),!f.value&&v.sourceId===a&&C&&(f.value=h==null?void 0:h.getSource(a),t==null||t({sourceId:a,getSource:l,updateSource:m},h),h==null||h.off("sourcedata",y))}function b(){var h;const v=n.unref(e);v&&!f.value&&o.value&&(h=c.value)!=null&&h.length&&!T(v,a)&&(v.addSource(a,{type:u,url:o.value,coordinates:c.value}),v.on("sourcedata",y))}k(e,{unLoad:()=>{S()},onLoad:()=>{b()}});function S(){const v=n.unref(e);f.value=null,v&&T(v,a)&&(v.removeSource(a),v.off("sourcedata",y))}return n.onUnmounted(S),{sourceId:a,getSource:l,updateSource:m,removeSource:S}}function He({map:e,id:r,register:t,url:s,tiles:i,options:u={}}){const a=G.Raster,f=D(r),l=n.shallowRef(null),o=n.computed(()=>l.value),c=n.ref(s??""),d=n.ref(i??[]);function L(h){const C=n.unref(e);let I=h.isSourceLoaded;q()===1&&(I=!0),!l.value&&h.sourceId===f&&I&&(l.value=C==null?void 0:C.getSource(f),t==null||t({sourceId:f,getSource:o,setUrl:y,setTiles:b,reload:S},C),C==null||C.off("sourcedata",L))}function m(){const h=n.unref(e);!l.value&&h&&!T(h,f)&&(c.value||d.value.length)&&(h.addSource(f,{...u,type:a,url:c.value,tiles:d.value}),h.on("sourcedata",L))}function y(h=""){if(c.value=h,!l.value){m();return}h&&l.value.setUrl(h)}function b(h){if(d.value=h||[],!l.value){m();return}d.value.length&&l.value.setTiles(h)}function S(){var h;(h=l.value)==null||h.reload()}k(e,{unLoad:v,onLoad:m});function v(){const h=n.unref(e);l.value=null,h&&T(h,f)&&(h.removeSource(f),h.off("sourcedata",L))}return n.onUnmounted(v),{sourceId:f,getSource:o,setUrl:y,setTiles:b,reload:S,removeSource:v}}function qe({map:e,id:r,register:t,url:s,tiles:i,options:u={}}){const a=G.Vector,f=D(r),l=n.shallowRef(null),o=n.computed(()=>l.value),c=n.ref(s??""),d=n.ref(i??[]);function L(h){const C=n.unref(e);let I=h.isSourceLoaded;q()===1&&(I=!0),!l.value&&h.sourceId===f&&I&&(l.value=C==null?void 0:C.getSource(f),t==null||t({sourceId:f,getSource:o,setUrl:y,setTiles:b,reload:S},C),C==null||C.off("sourcedata",L))}function m(){var C;const h=n.unref(e);!l.value&&h&&!T(h,f)&&(c.value||d.value.length)&&(h.addSource(f,{...u,type:a,url:c.value,tiles:(C=d.value)!=null&&C.length?d.value:[c.value]}),h.on("sourcedata",L))}function y(h=""){if(c.value=h,!l.value){m();return}h&&(l.value.setUrl(h),S())}function b(h){if(d.value=h||[],!l.value){m();return}d.value.length&&(l.value.setTiles(h),S())}function S(){var h;(h=l.value)==null||h.reload()}k(e,{unLoad:v,onLoad:m});function v(){const h=n.unref(e);l.value=null,h&&T(h,f)&&(h.removeSource(f),h.off("sourcedata",L))}return n.onUnmounted(v),{getSource:o,sourceId:f,setUrl:y,setTiles:b,reload:S,removeSource:v}}function Je({map:e,id:r,register:t,urls:s,coordinates:i}){const u=G.Video,a=D(r),f=n.ref(!0),l=n.shallowRef(null),o=n.ref(i),c=n.computed(()=>l.value);function d(h){if(h.length&&(o.value=h),!l.value){m();return}h&&o&&l.value.setCoordinates(h)}function L(h){const C=n.unref(e);let I=h.isSourceLoaded;q()===1&&(I=!0),!l.value&&h.sourceId===a&&I&&(l.value=C==null?void 0:C.getSource(a),t==null||t({sourceId:a,play:f,setPlay:y,tooglePlay:b,getVideo:S,getSource:c,setCoordinates:d},C),C==null||C.off("sourcedata",L))}function m(){var C;const h=n.unref(e);!l.value&&h&&!T(h,a)&&s.length&&((C=o.value)!=null&&C.length)&&(h.addSource(a,{type:u,urls:s,coordinates:o.value}),h.on("sourcedata",L))}function y(h){f.value=h,l.value&&(f.value?l.value.play():l.value.pause())}function b(){y(!f.value)}function S(){var h;return(h=l.value)==null?void 0:h.getVideo()}n.watch(f,h=>{y(h)}),k(e,{unLoad:v,onLoad:m});function v(){const h=n.unref(e);l.value=null,h&&T(h,a)&&(h.removeSource(a),h.off("sourcedata",L))}return n.onUnmounted(v),{sourceId:a,play:f,setPlay:y,tooglePlay:b,getVideo:S,getSource:c,setCoordinates:d,removeSource:v}}function Vt(){const e=n.ref(),r=n.ref(!1),t=n.shallowRef(null),s=n.ref();let i;function u(l){n.unref(r)&&l===n.unref(e)||(e.value=l,r.value=!0,i==null||i.stop(),i=n.effectScope(),i.run(()=>{n.watch(()=>l.getSource.value,o=>{t.value=o,s.value=l.sourceId},{immediate:!0})}))}function a(){const l=n.unref(t);return l||console.warn("useGeoJsonSource: The GeoJSONSource is undefined"),l}const f={sourceId:n.computed(()=>s.value),getSource:n.computed(()=>t.value),setData:l=>{},getClusterExpansionZoom:l=>new Promise((o,c)=>{var d;(d=a())==null||d.getClusterExpansionZoom(l,(L,m)=>{if(L)return c(L);o(m)})}),getClusterChildren:l=>new Promise((o,c)=>{var d;(d=a())==null||d.getClusterChildren(l,(L,m)=>{if(L)return c(L);o(m)})}),getClusterLeaves:(l,o=10,c=0)=>new Promise((d,L)=>{var m;(m=a())==null||m.getClusterLeaves(l,o,c,(y,b)=>{if(y)return L(y);d(b)})})};return[u,f]}function en(){const e=n.ref(),r=n.ref(!1),t=n.shallowRef(null),s=n.shallowRef(null),i=n.ref();let u;function a(o,c){n.unref(r)&&o===n.unref(e)||(e.value=o,t.value=c,r.value=!0,u==null||u.stop(),u=n.effectScope(),u.run(()=>{n.watch(()=>o.getLayer.value,d=>{s.value=d,i.value=d==null?void 0:d.id},{immediate:!0})}))}function f(){const o=n.unref(e);return o||console.warn("useLayer: The Actions is undefined"),o}const l={getLayerId:n.computed(()=>i.value),getLayer:n.computed(()=>s.value),getFilter:()=>{if(t.value&&i.value&&j(t.value,i.value))return t.value.getFilter(i.value)},getLayoutProperty:o=>{if(t.value&&i.value&&j(t.value,i.value))return t.value.getLayoutProperty(i.value,o)},getPaintProperty:o=>{if(t.value&&i.value&&j(t.value,i.value))return t.value.getPaintProperty(i.value,o)},setBeforeId:o=>{var c;(c=f())==null||c.setBeforeId(o)},setFilter:o=>{var c;(c=f())==null||c.setFilter(o)},setPaintProperty:(o,c,d)=>{var L;(L=f())==null||L.setPaintProperty(o,c,d)},setLayoutProperty:(o,c,d)=>{var L;(L=f())==null||L.setLayoutProperty(o,c,d)},setZoomRange:(o,c)=>{var d;(d=f())==null||d.setZoomRange(o,c)},removeLayer:()=>{var o;(o=f())==null||o.removeLayer()},setStyle:o=>{var c;(c=f())==null||c.setStyle(o)}};return[a,l]}function tn(){const e=n.ref(),r=n.ref(!1),t=n.shallowRef(null),s=n.ref(K.NotLoaded);let i;function u(o){n.unref(r)&&o===n.unref(e)||(e.value=o,r.value=!0,i==null||i.stop(),i=n.effectScope(),i.run(()=>{n.watch(()=>o.getMapInstance.value,c=>{t.value=c},{immediate:!0}),n.watch(()=>o.getMapStatus.value,c=>{s.value=c},{immediate:!0})}))}function a(){var c;const o=n.unref((c=e.value)==null?void 0:c.getMapInstance);return o||console.warn("useMapbox: The map is undefined"),o}function f(){const o=n.unref(e);return o||console.warn("useMapbox: The Actions is undefined"),o}const l={getMapInstance:n.computed(()=>t.value),getMapStatus:n.computed(()=>s.value),getContainer:()=>{var o;return(o=a())==null?void 0:o.getContainer()},getCanvasContainer:()=>{var o;return(o=a())==null?void 0:o.getCanvasContainer()},getCanvas:()=>{var o;return(o=a())==null?void 0:o.getCanvas()},getStyle:()=>{var o;return(o=a())==null?void 0:o.getStyle()},getBounds:()=>{var o;return(o=a())==null?void 0:o.getBounds()},getCenter:()=>{var o;return(o=a())==null?void 0:o.getCenter()},getZoom:()=>{var o;return(o=a())==null?void 0:o.getZoom()},getBearing:()=>{var o;return(o=a())==null?void 0:o.getBearing()},getPadding:()=>{var o;return(o=a())==null?void 0:o.getPadding()},getPitch:()=>{var o;return(o=a())==null?void 0:o.getPitch()},getMinZoom:()=>{var o;return(o=a())==null?void 0:o.getMinZoom()},getMaxZoom:()=>{var o;return(o=a())==null?void 0:o.getMaxZoom()},getMinPitch:()=>{var o;return(o=a())==null?void 0:o.getMinPitch()},getMaxPitch:()=>{var o;return(o=a())==null?void 0:o.getMaxPitch()},getFilter:o=>{var c;return(c=a())==null?void 0:c.getFilter(o)},getLayer:o=>{var c;return(c=a())==null?void 0:c.getLayer(o)},getLayoutProperty:(o,c)=>{var d;return(d=a())==null?void 0:d.getLayoutProperty(o,c)},getPaintProperty:(o,c)=>{var d;return(d=a())==null?void 0:d.getPaintProperty(o,c)},getSource:o=>{var c;return(c=a())==null?void 0:c.getSource(o)},project:o=>{var c;return(c=a())==null?void 0:c.project(o)},unproject:o=>{var c;return(c=a())==null?void 0:c.unproject(o)},queryRenderedFeatures:(o,c)=>{var d;return(d=a())==null?void 0:d.queryRenderedFeatures(o,c)},querySourceFeatures:(o,c)=>{var d;return(d=a())==null?void 0:d.querySourceFeatures(o,c)},queryTerrainElevation:(o,c={exaggerated:!0})=>{var d;return(d=a())==null?void 0:d.queryTerrainElevation(o,c)},isStyleLoaded:()=>{var o;return(o=a())==null?void 0:o.isStyleLoaded()},isMoving:()=>{var o;return(o=a())==null?void 0:o.isMoving()},isZooming:()=>{var o;return(o=a())==null?void 0:o.isZooming()},isRotating:()=>{var o;return(o=a())==null?void 0:o.isRotating()},isEasing:()=>{var o;return(o=a())==null?void 0:o.isEasing()},resize:()=>{var o;(o=a())==null||o.resize()},remove:()=>{var o;(o=a())==null||o.remove()},triggerRepaint:()=>{var o;(o=a())==null||o.triggerRepaint()},setFeatureState:(o,c)=>{var d;(d=a())==null||d.setFeatureState(o,c)},removeFeatureState:(o,c)=>{var d;(d=a())==null||d.removeFeatureState(o,c)},getFeatureState:o=>{var c;return(c=a())==null?void 0:c.getFeatureState(o)},setPadding:o=>{var c;o&&((c=a())==null||c.setPadding(o))},setRenderWorldCopies:o=>{var c,d;(d=(c=f())==null?void 0:c.setRenderWorldCopies)==null||d.call(c,o)},setProjection:o=>{var c,d;(d=(c=f())==null?void 0:c.setProjection)==null||d.call(c,o)},setMinZoom:o=>{var c,d;(d=(c=f())==null?void 0:c.setMaxZoom)==null||d.call(c,o)},setMinPitch:o=>{var c,d;(d=(c=f())==null?void 0:c.setMinPitch)==null||d.call(c,o)},setMaxZoom:o=>{var c,d;(d=(c=f())==null?void 0:c.setMaxZoom)==null||d.call(c,o)},setMaxPitch:o=>{var c,d;(d=(c=f())==null?void 0:c.setMaxPitch)==null||d.call(c,o)},setMaxBounds:o=>{var c,d;(d=(c=f())==null?void 0:c.setMaxBounds)==null||d.call(c,o)},setStyle:o=>{var c,d;(d=(c=f())==null?void 0:c.setStyle)==null||d.call(c,o)},setPitch:o=>{var c,d;(d=(c=f())==null?void 0:c.setPitch)==null||d.call(c,o)},setZoom:o=>{var c,d;(d=(c=f())==null?void 0:c.setZoom)==null||d.call(c,o)},setBearing:o=>{var c,d;(d=(c=f())==null?void 0:c.setBearing)==null||d.call(c,o)},setCenter:o=>{var c,d;(d=(c=f())==null?void 0:c.setCenter)==null||d.call(c,o)},setConfig(o){var c,d;(d=(c=f())==null?void 0:c.setConfig)==null||d.call(c,o)}};return[u,l]}const p=Symbol(),F=Symbol();var nn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function on(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var We={exports:{}};(function(e,r){(function(t,s){e.exports=s()})(nn,function(){var t=function(){function s(m){return a.appendChild(m.dom),m}function i(m){for(var y=0;yl+1e3&&(c.update(1e3*o/(m-l),100),l=m,o=0,L)){var y=performance.memory;L.update(y.usedJSHeapSize/1048576,y.jsHeapSizeLimit/1048576)}return m},update:function(){f=this.end()},domElement:a,setMode:i}};return t.Panel=function(s,i,u){var a=1/0,f=0,l=Math.round,o=l(window.devicePixelRatio||1),c=80*o,d=48*o,L=3*o,m=2*o,y=3*o,b=15*o,S=74*o,v=30*o,h=document.createElement("canvas");h.width=c,h.height=d,h.style.cssText="width:80px;height:48px";var C=h.getContext("2d");return C.font="bold "+9*o+"px Helvetica,Arial,sans-serif",C.textBaseline="top",C.fillStyle=u,C.fillRect(0,0,c,d),C.fillStyle=i,C.fillText(s,L,m),C.fillRect(y,b,S,v),C.fillStyle=u,C.globalAlpha=.9,C.fillRect(y,b,S,v),{dom:h,update:function(I,R){a=Math.min(a,I),f=Math.max(f,I),C.fillStyle=u,C.globalAlpha=1,C.fillRect(0,0,c,b),C.fillStyle=i,C.fillText(l(I)+" "+s+" ("+l(a)+"-"+l(f)+")",L,m),C.drawImage(h,y+o,b,S-o,v,y,b,S-o,v),C.fillRect(y+S-o,b,o,v),C.fillStyle=u,C.globalAlpha=.9,C.fillRect(y+S-o,b,o,l((1-I/R)*v))}}},t})})(We);var an=We.exports;const rn=on(an);function sn(e){let r,t;const s=n.watchEffect(()=>{a(),n.unref(e)&&!t&&(i(),s())});function i(){const f=n.unref(e);f&&(t=new rn,t.showPanel(0),f.appendChild(t.dom),r=requestAnimationFrame(u))}function u(){t.begin(),t.end(),r=requestAnimationFrame(u)}function a(){r&&(cancelAnimationFrame(r),r=void 0),t=void 0}return{init:i,remove:a}}const Qe=n.defineComponent({__name:"Mapbox",props:{width:{default:"100%"},height:{default:"100%"},showStats:{type:Boolean,default:!1},options:{default:()=>({})},register:{}},emits:["register","error","load","idle","remove","render","resize","webglcontextlost","webglcontextrestored","dataloading","data","tiledataloading","sourcedataloading","styledataloading","sourcedata","styledata","boxzoomcancel","boxzoomstart","boxzoomend","touchcancel","touchmove","touchend","touchstart","click","contextmenu","dblclick","mousemove","mouseup","mousedown","mouseout","mouseover","movestart","move","moveend","zoomstart","zoom","zoomend","rotatestart","rotate","rotateend","dragstart","drag","dragend","pitchstart","pitch","pitchend","wheel"],setup(e,{emit:r}){const t=e,s=n.ref({}),i=n.computed(()=>({...t.options,...s.value}));function u(z){s.value={...n.unref(i),...z}}const a=r,f=n.ref(),l=n.ref(),o={},{getMapInstance:c,getMapStatus:d,setCenter:L,setBearing:m,setZoom:y,setPitch:b,setStyle:S,setMaxBounds:v,setMaxPitch:h,setMaxZoom:C,setMinPitch:I,setMinZoom:R,setProjection:H,setRenderWorldCopies:P}=Ne(l,{...n.unref(i),register:z=>{var B;(B=t.register)==null||B.call(t,{...z,setMapOptions:u}),a("register",{...z,setMapOptions:u})}});return Oe.map(z=>{ne({map:c,event:z,on:B=>{a(z,B)}})}),n.provide(p,c),t.showStats&&sn(f),n.onUnmounted(()=>{Oe.forEach(z=>{var B;(B=c.value)==null||B.off(z,o[z])})}),n.watch(()=>n.unref(i).center,L),n.watch(()=>n.unref(i).bearing,m),n.watch(()=>n.unref(i).zoom,y),n.watch(()=>n.unref(i).pitch,b),n.watch(()=>n.unref(i).style,S),n.watch(()=>n.unref(i).maxBounds,v),n.watch(()=>n.unref(i).maxPitch,h),n.watch(()=>n.unref(i).maxZoom,C),n.watch(()=>n.unref(i).minPitch,I),n.watch(()=>n.unref(i).minZoom,R),n.watch(()=>n.unref(i).projection,H),n.watch(()=>n.unref(i).renderWorldCopies,P),(z,B)=>(n.openBlock(),n.createElementBlock("div",{class:"mapbox_wrapper",style:n.normalizeStyle({width:t.width,height:t.height})},[n.createElementVNode("div",{ref_key:"mapboxElRef",ref:l,class:"mapbox_container"},null,512),n.unref(d)>=n.unref(K).Loading?n.renderSlot(z.$slots,"beforeLoad",{key:0}):n.createCommentVNode("",!0),n.unref(d)>=n.unref(K).Loaded?n.renderSlot(z.$slots,"default",{key:1}):n.createCommentVNode("",!0),t.showStats?(n.openBlock(),n.createElementBlock("div",{key:2,ref_key:"statsElRef",ref:f,class:"mapbox_stats"},null,512)):n.createCommentVNode("",!0)],4))}}),Xe=n.defineComponent({__name:"CanvasSource",props:{id:{},canvas:{},coordinates:{default:()=>[]},animate:{type:Boolean,default:!0}},setup(e){const r=e,t=n.inject(p,n.ref(null)),{setCoordinates:s,getSource:i}=De({map:t,id:r.id,canvas:r.canvas,animate:r.animate,coordinates:r.coordinates});return n.provide(F,i),n.watch(()=>r.coordinates,s,{deep:!0,immediate:!0}),(u,a)=>n.renderSlot(u.$slots,"default")}}),Ye=n.defineComponent({__name:"GeoJsonSource",props:{id:{},data:{default:()=>({type:"FeatureCollection",features:[]})},options:{default:()=>({})},register:{}},emits:["register"],setup(e,{emit:r}){const t=e,s=r,i=n.inject(p,n.ref(null)),{setData:u,getSource:a}=Ke({map:i,id:t.id,data:t.data,options:t.options,register:f=>{var l;(l=t.register)==null||l.call(t,f),s("register",f)}});return n.provide(F,a),n.watch(()=>t.data,u,{deep:!0,immediate:!0}),(f,l)=>n.renderSlot(f.$slots,"default")}}),Ve=n.defineComponent({__name:"ImageSource",props:{id:{},url:{},coordinates:{default:()=>[]}},setup(e){const r=e,t=n.computed(()=>({url:r.url,coordinates:r.coordinates})),s=n.inject(p);if(s.value){const{updateSource:i,getSource:u}=Ge({map:s,id:r.id,url:r.url,coordinates:r.coordinates});n.provide(F,u),n.watch(t,i,{deep:!0,immediate:!0})}return(i,u)=>n.renderSlot(i.$slots,"default")}}),et=n.defineComponent({__name:"RasterDemSource",props:{url:{},tiles:{},id:{},options:{}},setup(e){const r=e,t=n.inject(p,n.ref(null)),{getSource:s,setTiles:i,setUrl:u}=J({map:t,id:r.id,url:r.url,tiles:r.tiles,options:r.options});return n.provide(F,s),n.watch(()=>r.url,u),n.watch(()=>r.tiles,i,{deep:!0,immediate:!0}),(a,f)=>n.renderSlot(a.$slots,"default")}}),tt=n.defineComponent({__name:"RasterSource",props:{url:{},tiles:{},id:{},options:{}},setup(e){const r=e,t=n.inject(p,n.ref(null)),{getSource:s,setTiles:i,setUrl:u}=He({map:t,id:r.id,url:r.url,tiles:r.tiles,options:r.options});return n.provide(F,s),n.watch(()=>r.url,u),n.watch(()=>r.tiles,i,{deep:!0,immediate:!0}),(a,f)=>n.renderSlot(a.$slots,"default")}}),nt=n.defineComponent({__name:"VectorTileSource",props:{url:{},tiles:{},id:{},options:{}},setup(e){const r=e,t=n.inject(p,n.ref(null)),{getSource:s,setTiles:i,setUrl:u}=qe({map:t,id:r.id,url:r.url,tiles:r.tiles,options:r.options});return n.provide(F,s),n.watch(()=>r.url,u),n.watch(()=>r.tiles,i,{deep:!0,immediate:!0}),(a,f)=>n.renderSlot(a.$slots,"default")}}),ot=n.defineComponent({__name:"VideoSource",props:{id:{},urls:{},coordinates:{default:()=>[]}},setup(e){const r=e,t=n.inject(p,n.ref(null)),{setCoordinates:s,getSource:i}=Je({map:t,id:r.id,urls:r.urls,coordinates:r.coordinates});return n.provide(F,i),n.watch(()=>r.coordinates,s,{deep:!0,immediate:!0}),(u,a)=>n.renderSlot(u.$slots,"default")}}),at=n.defineComponent({__name:"BackgroundLayer",props:{id:{},filter:{},style:{},renderingMode:{},slotName:{},maxzoom:{},minzoom:{},metadata:{},source:{},sourceLayer:{},beforeId:{},visible:{type:Boolean,default:void 0},register:{}},emits:["register","click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","contextmenu","touchstart","touchend","touchcancel"],setup(e,{emit:r}){const t=e,s=r,i=n.inject(F,n.ref(null)),u=n.inject(p,n.ref(null)),a={};t.visible!==void 0&&(a.visibility=t.visible?"visible":"none");const{getLayer:f,setBeforeId:l,setFilter:o,setStyle:c,setZoomRange:d,setLayoutProperty:L}=ie({map:u,source:t.source||i,style:{...t.style,...a},renderingMode:t.renderingMode,slot:t.slotName,filter:t.filter,id:t.id,maxzoom:t.maxzoom,minzoom:t.minzoom,metadata:t.metadata,sourceLayer:t.sourceLayer,register:(m,y)=>{var b;(b=t.register)==null||b.call(t,m,y),s("register",m,y)}});return A.map(m=>{O({map:u,layer:f,event:m,on:y=>{s(m,y)}})}),n.watch(()=>t.filter,o),n.watch(()=>t.style,c),n.watch(()=>t.maxzoom,d),n.watch(()=>t.minzoom,d),n.watch(()=>t.beforeId,l),n.watch(()=>t.visible,m=>{L("visibility",m?"visible":"none")}),(m,y)=>null}}),rt=n.defineComponent({__name:"CircleLayer",props:{id:{},filter:{},style:{},renderingMode:{},slotName:{},maxzoom:{},minzoom:{},metadata:{},source:{},sourceLayer:{},beforeId:{},visible:{type:Boolean,default:void 0},register:{}},emits:["register","click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","contextmenu","touchstart","touchend","touchcancel"],setup(e,{emit:r}){const t=e,s=r,i=n.inject(F,n.ref(null)),u=n.inject(p,n.ref(null)),a={};t.visible!==void 0&&(a.visibility=t.visible?"visible":"none");const{getLayer:f,setBeforeId:l,setFilter:o,setStyle:c,setZoomRange:d,setLayoutProperty:L}=ce({map:u,source:t.source||i,style:{...t.style,...a},renderingMode:t.renderingMode,slot:t.slotName,filter:t.filter,id:t.id,maxzoom:t.maxzoom,minzoom:t.minzoom,metadata:t.metadata,sourceLayer:t.sourceLayer,register:(m,y)=>{var b;(b=t.register)==null||b.call(t,m,y),s("register",m,y)}});return A.map(m=>{O({map:u,layer:f,event:m,on:y=>{s(m,y)}})}),n.watch(()=>t.filter,o),n.watch(()=>t.style,c),n.watch(()=>t.maxzoom,d),n.watch(()=>t.minzoom,d),n.watch(()=>t.beforeId,l),n.watch(()=>t.visible,m=>{L("visibility",m?"visible":"none")}),(m,y)=>null}}),it=n.defineComponent({__name:"CustomLayer",props:{customLayer:{},beforeId:{}},setup(e){const r=e,t=n.inject(p,n.ref(null)),{setBeforeId:s}=ue({map:t,customLayer:r.customLayer});return n.watch(()=>r.beforeId,s),(i,u)=>null}}),st=n.defineComponent({__name:"FillExtrusionLayer",props:{id:{},filter:{},style:{},renderingMode:{},slotName:{},maxzoom:{},minzoom:{},metadata:{},source:{},sourceLayer:{},beforeId:{},visible:{type:Boolean,default:void 0},register:{}},emits:["register","click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","contextmenu","touchstart","touchend","touchcancel"],setup(e,{emit:r}){const t=e,s=r,i=n.inject(F,n.ref(null)),u=n.inject(p,n.ref(null)),a={};t.visible!==void 0&&(a.visibility=t.visible?"visible":"none");const{getLayer:f,setBeforeId:l,setFilter:o,setStyle:c,setZoomRange:d,setLayoutProperty:L}=de({map:u,source:t.source||i,style:{...t.style,...a},renderingMode:t.renderingMode,slot:t.slotName,filter:t.filter,id:t.id,maxzoom:t.maxzoom,minzoom:t.minzoom,metadata:t.metadata,sourceLayer:t.sourceLayer,register:(m,y)=>{var b;(b=t.register)==null||b.call(t,m,y),s("register",m,y)}});return A.map(m=>{O({map:u,layer:f,event:m,on:y=>{s(m,y)}})}),n.watch(()=>t.filter,o),n.watch(()=>t.style,c),n.watch(()=>t.maxzoom,d),n.watch(()=>t.minzoom,d),n.watch(()=>t.beforeId,l),n.watch(()=>t.visible,m=>{L("visibility",m?"visible":"none")}),(m,y)=>null}}),lt=n.defineComponent({__name:"FillLayer",props:{id:{},filter:{},style:{},renderingMode:{},slotName:{},maxzoom:{},minzoom:{},metadata:{},source:{},sourceLayer:{},beforeId:{},visible:{type:Boolean,default:void 0},register:{}},emits:["register","click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","contextmenu","touchstart","touchend","touchcancel"],setup(e,{emit:r}){const t=e,s=r,i=n.inject(F,n.ref(null)),u=n.inject(p,n.ref(null)),a={};t.visible!==void 0&&(a.visibility=t.visible?"visible":"none");const{getLayer:f,setBeforeId:l,setFilter:o,setStyle:c,setZoomRange:d,setLayoutProperty:L}=ge({map:u,source:t.source||i,style:{...t.style,...a},renderingMode:t.renderingMode,slot:t.slotName,filter:t.filter,id:t.id,maxzoom:t.maxzoom,minzoom:t.minzoom,metadata:t.metadata,sourceLayer:t.sourceLayer,register:(m,y)=>{var b;(b=t.register)==null||b.call(t,m,y),s("register",m,y)}});return A.map(m=>{O({map:u,layer:f,event:m,on:y=>{s(m,y)}})}),n.watch(()=>t.filter,o),n.watch(()=>t.style,c),n.watch(()=>t.maxzoom,d),n.watch(()=>t.minzoom,d),n.watch(()=>t.beforeId,l),n.watch(()=>t.visible,m=>{L("visibility",m?"visible":"none")}),(m,y)=>null}}),ct=n.defineComponent({__name:"HeatmapLayer",props:{id:{},filter:{},style:{},renderingMode:{},slotName:{},maxzoom:{},minzoom:{},metadata:{},source:{},sourceLayer:{},beforeId:{},visible:{type:Boolean,default:void 0},register:{}},emits:["register","click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","contextmenu","touchstart","touchend","touchcancel"],setup(e,{emit:r}){const t=e,s=r,i=n.inject(F,n.ref(null)),u=n.inject(p,n.ref(null)),a={};t.visible!==void 0&&(a.visibility=t.visible?"visible":"none");const{getLayer:f,setBeforeId:l,setFilter:o,setStyle:c,setZoomRange:d,setLayoutProperty:L}=Ce({map:u,source:t.source||i,style:{...t.style,...a},renderingMode:t.renderingMode,slot:t.slotName,filter:t.filter,id:t.id,maxzoom:t.maxzoom,minzoom:t.minzoom,metadata:t.metadata,sourceLayer:t.sourceLayer,register:(m,y)=>{var b;(b=t.register)==null||b.call(t,m,y),s("register",m,y)}});return A.map(m=>{O({map:u,layer:f,event:m,on:y=>{s(m,y)}})}),n.watch(()=>t.filter,o),n.watch(()=>t.style,c),n.watch(()=>t.maxzoom,d),n.watch(()=>t.minzoom,d),n.watch(()=>t.beforeId,l),n.watch(()=>t.visible,m=>{L("visibility",m?"visible":"none")}),(m,y)=>null}}),ut=n.defineComponent({__name:"HillshadeLayer",props:{id:{},filter:{},style:{},renderingMode:{},slotName:{},maxzoom:{},minzoom:{},metadata:{},source:{},sourceLayer:{},beforeId:{},visible:{type:Boolean,default:void 0},register:{}},emits:["register","click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","contextmenu","touchstart","touchend","touchcancel"],setup(e,{emit:r}){const t=e,s=r,i=n.inject(F,n.ref(null)),u=n.inject(p,n.ref(null)),a={};t.visible!==void 0&&(a.visibility=t.visible?"visible":"none");const{getLayer:f,setBeforeId:l,setFilter:o,setStyle:c,setZoomRange:d,setLayoutProperty:L}=Se({map:u,source:t.source||i,style:{...t.style,...a},renderingMode:t.renderingMode,slot:t.slotName,filter:t.filter,id:t.id,maxzoom:t.maxzoom,minzoom:t.minzoom,metadata:t.metadata,sourceLayer:t.sourceLayer,register:(m,y)=>{var b;(b=t.register)==null||b.call(t,m,y),s("register",m,y)}});return A.map(m=>{O({map:u,layer:f,event:m,on:y=>{s(m,y)}})}),n.watch(()=>t.filter,o),n.watch(()=>t.style,c),n.watch(()=>t.maxzoom,d),n.watch(()=>t.minzoom,d),n.watch(()=>t.beforeId,l),n.watch(()=>t.visible,m=>{L("visibility",m?"visible":"none")}),(m,y)=>null}}),ft=n.defineComponent({__name:"LineLayer",props:{id:{},filter:{},style:{},renderingMode:{},slotName:{},maxzoom:{},minzoom:{},metadata:{},source:{},sourceLayer:{},beforeId:{},visible:{type:Boolean,default:void 0},register:{}},emits:["register","click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","contextmenu","touchstart","touchend","touchcancel"],setup(e,{emit:r}){const t=e,s=r,i=n.inject(F,n.ref(null)),u=n.inject(p,n.ref(null)),a={};t.visible!==void 0&&(a.visibility=t.visible?"visible":"none");const{getLayer:f,setBeforeId:l,setFilter:o,setStyle:c,setZoomRange:d,setLayoutProperty:L}=pe({map:u,source:t.source||i,style:{...t.style,...a},renderingMode:t.renderingMode,slot:t.slotName,filter:t.filter,id:t.id,maxzoom:t.maxzoom,minzoom:t.minzoom,metadata:t.metadata,sourceLayer:t.sourceLayer,register:(m,y)=>{var b;(b=t.register)==null||b.call(t,m,y),s("register",m,y)}});return A.map(m=>{O({map:u,layer:f,event:m,on:y=>{s(m,y)}})}),n.watch(()=>t.filter,o),n.watch(()=>t.style,c),n.watch(()=>t.maxzoom,d),n.watch(()=>t.minzoom,d),n.watch(()=>t.beforeId,l),n.watch(()=>t.visible,m=>{L("visibility",m?"visible":"none")}),(m,y)=>null}}),mt=n.defineComponent({__name:"RasterLayer",props:{id:{},filter:{},style:{},renderingMode:{},slotName:{},maxzoom:{},minzoom:{},metadata:{},source:{},sourceLayer:{},beforeId:{},visible:{type:Boolean,default:void 0},register:{}},emits:["register","click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","contextmenu","touchstart","touchend","touchcancel"],setup(e,{emit:r}){const t=e,s=r,i=n.inject(F,n.ref(null)),u=n.inject(p,n.ref(null)),a={};t.visible!==void 0&&(a.visibility=t.visible?"visible":"none");const{getLayer:f,setBeforeId:l,setFilter:o,setStyle:c,setZoomRange:d,setLayoutProperty:L}=xe({map:u,source:t.source||i,style:{...t.style,...a},renderingMode:t.renderingMode,slot:t.slotName,filter:t.filter,id:t.id,maxzoom:t.maxzoom,minzoom:t.minzoom,metadata:t.metadata,sourceLayer:t.sourceLayer,register:(m,y)=>{var b;(b=t.register)==null||b.call(t,m,y),s("register",m,y)}});return A.map(m=>{O({map:u,layer:f,event:m,on:y=>{s(m,y)}})}),n.watch(()=>t.filter,o),n.watch(()=>t.style,c),n.watch(()=>t.maxzoom,d),n.watch(()=>t.minzoom,d),n.watch(()=>t.beforeId,l),n.watch(()=>t.visible,m=>{L("visibility",m?"visible":"none")}),(m,y)=>null}}),dt=n.defineComponent({__name:"SkyLayer",props:{id:{},filter:{},style:{},renderingMode:{},slotName:{},maxzoom:{},minzoom:{},metadata:{},source:{},sourceLayer:{},beforeId:{},visible:{type:Boolean,default:void 0},register:{}},emits:["register","click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","contextmenu","touchstart","touchend","touchcancel"],setup(e,{emit:r}){const t=e,s=r,i=n.inject(F,n.ref(null)),u=n.inject(p,n.ref(null)),a={};t.visible!==void 0&&(a.visibility=t.visible?"visible":"none");const{getLayer:f,setBeforeId:l,setFilter:o,setStyle:c,setZoomRange:d,setLayoutProperty:L}=Fe({map:u,source:t.source||i,style:{...t.style,...a},renderingMode:t.renderingMode,slot:t.slotName,filter:t.filter,id:t.id,maxzoom:t.maxzoom,minzoom:t.minzoom,metadata:t.metadata,sourceLayer:t.sourceLayer,register:(m,y)=>{var b;(b=t.register)==null||b.call(t,m,y),s("register",m,y)}});return A.map(m=>{O({map:u,layer:f,event:m,on:y=>{s(m,y)}})}),n.watch(()=>t.filter,o),n.watch(()=>t.style,c),n.watch(()=>t.maxzoom,d),n.watch(()=>t.minzoom,d),n.watch(()=>t.beforeId,l),n.watch(()=>t.visible,m=>{L("visibility",m?"visible":"none")}),(m,y)=>null}}),ht=n.defineComponent({__name:"SymbolLayer",props:{id:{},filter:{},style:{},renderingMode:{},slotName:{},maxzoom:{},minzoom:{},metadata:{},source:{},sourceLayer:{},beforeId:{},visible:{type:Boolean,default:void 0},register:{}},emits:["register","click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","contextmenu","touchstart","touchend","touchcancel"],setup(e,{emit:r}){const t=e,s=r,i=n.inject(F,n.ref(null)),u=n.inject(p,n.ref(null)),a={};t.visible!==void 0&&(a.visibility=t.visible?"visible":"none");const{getLayer:f,setBeforeId:l,setFilter:o,setStyle:c,setZoomRange:d,setLayoutProperty:L}=je({map:u,source:t.source||i,style:{...t.style,...a},renderingMode:t.renderingMode,slot:t.slotName,filter:t.filter,id:t.id,maxzoom:t.maxzoom,minzoom:t.minzoom,metadata:t.metadata,sourceLayer:t.sourceLayer,register:(m,y)=>{var b;(b=t.register)==null||b.call(t,m,y),s("register",m,y)}});return A.map(m=>{O({map:u,layer:f,event:m,on:y=>{s(m,y)}})}),n.watch(()=>t.filter,o),n.watch(()=>t.style,c),n.watch(()=>t.maxzoom,d),n.watch(()=>t.minzoom,d),n.watch(()=>t.beforeId,l),n.watch(()=>t.visible,m=>{L("visibility",m?"visible":"none")}),(m,y)=>null}}),yt=n.defineComponent({__name:"AttributionControl",props:{position:{},compact:{},customAttribution:{}},setup(e){const r=e,t=n.inject(p,n.ref(null));return Q({map:t,...r}),(s,i)=>null}}),gt=n.defineComponent({__name:"CustomControl",props:{position:{},className:{},add:{type:Function},remove:{type:Function}},setup(e){const r=e,t=n.ref(),s=n.inject(p,n.ref(null));return X({map:s,container:t,on:{add:r.add,remove:r.remove},position:r.position,className:r.className}),(i,u)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"customControlElRef",ref:t},[n.renderSlot(i.$slots,"default")],512))}}),vt=n.defineComponent({__name:"FullscreenControl",props:{container:{},position:{}},setup(e){const r=e,t=n.inject(p,n.ref(null));return Y({map:t,...r}),(s,i)=>null}}),Lt=n.defineComponent({__name:"GeolocateControl",props:{position:{},options:{}},setup(e){const r=e,t=n.inject(p,n.ref(null));return V({map:t,...r}),(s,i)=>null}}),Ct=n.defineComponent({__name:"NavigationControl",props:{position:{},showCompass:{type:Boolean,default:!0},showZoom:{type:Boolean,default:!0},visualizePitch:{type:Boolean,default:!1}},setup(e){const r=e,t=n.inject(p,n.ref(null));return ee({map:t,...r}),(s,i)=>null}}),bt=n.defineComponent({__name:"ScaleControl",props:{position:{},maxWidth:{},unit:{}},setup(e){const r=e,t=n.inject(p,n.ref(null));return te({map:t,...r}),(s,i)=>null}}),wt=n.defineComponent({__name:"Marker",props:{lnglat:{},popup:{},options:{default:()=>({})},draggable:{type:Boolean},element:{},offset:{},anchor:{},color:{},clickTolerance:{},rotation:{},rotationAlignment:{},pitchAlignment:{},scale:{},occludedOpacity:{}},emits:["dragstart","drag","dragend"],setup(e,{emit:r}){var o;const t=e,s=r,i=n.useSlots(),u=n.inject(p,n.ref(null)),a=n.ref(),{setDraggable:f,setLngLat:l}=Ze({map:u,el:(o=i.default)!=null&&o.call(i)?a:void 0,lnglat:t.lnglat,popup:t.popup,options:{...t.options,...t.draggable===void 0?{}:{draggable:t.draggable}},on:{dragstart:c=>s("dragstart",c),drag:c=>s("drag",c),dragend:c=>s("dragend",c)}});return n.watch(()=>t.lnglat,c=>{c&&l(c)}),n.watch(()=>t.draggable,f),(c,d)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"markerElRef",ref:a},[n.renderSlot(c.$slots,"default")],512))}}),St=n.defineComponent({__name:"Popup",props:{className:{},lnglat:{},show:{type:Boolean,default:!1},options:{}},emits:["close","open","update:show"],setup(e,{emit:r}){const t=e,s=r,i=n.inject(p,n.ref(null)),u=n.ref(),{setLngLat:a,show:f,hide:l}=Ae({map:i,el:u,lnglat:t.lnglat,show:t.show,options:{...t.options,className:`v__mapbox__popup${t.className?" "+t.className:""}`},on:{open:()=>{s("open"),s("update:show",!0)},close:async()=>{s("close"),s("update:show",!1)}}});return n.watch(()=>t.show,o=>{o?f():l()}),n.watch(()=>t.lnglat,o=>{o&&a(o)}),(o,c)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"popupElRef",ref:u,class:"mapboxgl-popup-content-inner"},[n.renderSlot(o.$slots,"default")],512))}}),_t=n.defineComponent({__name:"Image",props:{images:{default:()=>[]},options:{}},setup(e){const r=e,t=n.ref(!0),s=n.inject(p,n.ref(null));i(r.images);function i(u){const a=u.map(f=>ke({map:s,id:f.id,image:f.image,options:f.options||r.options}).loadPromise);Promise.all(a).finally(()=>{t.value=!1})}return(u,a)=>t.value?n.createCommentVNode("",!0):n.renderSlot(u.$slots,"default",{key:0})}}),It=n.defineComponent({__name:"Fog",props:{options:{}},setup(e){const r=e,t=n.inject(p,n.ref(null)),{setFog:s}=Re({map:t,options:r.options});return n.watch(()=>r.options,i=>{s(i??{})}),(i,u)=>null}}),pt=n.defineComponent({__name:"Light",props:{options:{}},setup(e){const r=e,t=n.inject(p,n.ref(null)),{setLight:s}=$e({map:t,options:r.options});return n.watch(()=>r.options,i=>{s(i??{})}),(i,u)=>null}}),Pt=n.defineComponent({__name:"Terrain",props:{url:{},tiles:{},id:{},options:{},exaggeration:{}},setup(e){const r=e,t=n.inject(p,n.ref(null)),{setTerrainUrl:s,setTerrainTiles:i,removeTerrain:u}=Ue({map:t,exaggeration:r.exaggeration,url:r.url,tiles:r.tiles,options:r.options});return n.onBeforeUnmount(u),n.watch(()=>r.url,a=>{s(a)}),n.watch(()=>r.tiles,a=>{i(a)}),(a,f)=>null}}),ln={install(e,r){r&&r.accessToken&&(E.accessToken=r.accessToken),e.component("Mapbox",Qe),e.component("ImageSource",Ve),e.component("VideoSource",ot),e.component("VectorTileSource",nt),e.component("GeoJsonSource",Ye),e.component("RasterSource",tt),e.component("RasterDemSource",et),e.component("CanvasSource",Xe),e.component("BackgroundLayer",at),e.component("CircleLayer",rt),e.component("CustomLayer",it),e.component("FillExtrusionLayer",st),e.component("FillLayer",lt),e.component("HeatmapLayer",ct),e.component("HillshadeLayer",ut),e.component("LineLayer",ft),e.component("RasterLayer",mt),e.component("SkyLayer",dt),e.component("SymbolLayer",ht),e.component("AttributionControl",yt),e.component("CustomControl",gt),e.component("FullscreenControl",vt),e.component("GeolocateControl",Lt),e.component("NavigationControl",Ct),e.component("ScaleControl",bt),e.component("Marker",wt),e.component("Popup",St),e.component("Image",_t),e.component("Fog",It),e.component("Light",pt),e.component("Terrain",Pt)}};g.AttributionControl=yt,g.BackgroundLayer=at,g.CanvasSource=Xe,g.CircleLayer=rt,g.CustomControl=gt,g.CustomLayer=it,g.FillExtrusionLayer=st,g.FillLayer=lt,g.Fog=It,g.FullscreenControl=vt,g.GeoJsonSource=Ye,g.GeolocateControl=Lt,g.HeatmapLayer=ct,g.HillshadeLayer=ut,g.Image=_t,g.ImageSource=Ve,g.Light=pt,g.LineLayer=ft,g.Mapbox=Qe,g.Marker=wt,g.NavigationControl=Ct,g.Popup=St,g.RasterDemSource=et,g.RasterLayer=mt,g.RasterSource=tt,g.ScaleControl=bt,g.SkyLayer=dt,g.SymbolLayer=ht,g.Terrain=Pt,g.VectorTileSource=nt,g.VideoSource=ot,g.default=ln,g.useAttributionControl=Q,g.useCameraForBounds=Tt,g.useChainCamera=Et,g.useCreateBackgroundLayer=ie,g.useCreateCanvasSource=De,g.useCreateCircleLayer=ce,g.useCreateCustomLayer=ue,g.useCreateFillExtrusionLayer=de,g.useCreateFillLayer=ge,g.useCreateFog=Re,g.useCreateGeoJsonSource=Ke,g.useCreateHeatmapLayer=Ce,g.useCreateHillshadeLayer=Se,g.useCreateImage=ke,g.useCreateImageSource=Ge,g.useCreateLayer=N,g.useCreateLight=$e,g.useCreateLineLayer=pe,g.useCreateMapbox=Ne,g.useCreateMarker=Ze,g.useCreatePopup=Ae,g.useCreateRasterDemSource=J,g.useCreateRasterLayer=xe,g.useCreateRasterSource=He,g.useCreateSkyLayer=Fe,g.useCreateSymbolLayer=je,g.useCreateTerrain=Ue,g.useCreateVectorTileSource=qe,g.useCreateVideoSource=Je,g.useCustomControl=X,g.useEaseTo=Mt,g.useFitBounds=Ft,g.useFitScreenCoordinates=Bt,g.useFlyTo=jt,g.useFullscreenControl=Y,g.useGeoJsonSource=Vt,g.useGeolocateControl=V,g.useIntersectionObserver=Ht,g.useJumpTo=Rt,g.useLayer=en,g.useLayerEventListener=O,g.useMapEventListener=ne,g.useMapReloadEvent=k,g.useMapbox=tn,g.useNavigationControl=ee,g.usePanBy=kt,g.usePanTo=$t,g.useResetNorth=Nt,g.useResetNorthPitch=Zt,g.useRotateTo=Ot,g.useScaleControl=te,g.useSnapToNorth=At,g.useZoomIn=Dt,g.useZoomOut=Kt,g.useZoomTo=Ut,Object.defineProperties(g,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});