@local-logic/maps 0.0.27 → 0.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/{index-DWhC5cZK.js → index--TOrExMa.js} +2 -2
  2. package/dist/index-5JWsWx8g.js +107 -0
  3. package/dist/index-7WiriOPf.js +108 -0
  4. package/dist/{index-DqtKFLcm.js → index-B1UUkU25.js} +2 -2
  5. package/dist/index-B9irDFVS.js +126 -0
  6. package/dist/{index-B1pyYX8E.js → index-BCEeluIN.js} +2 -2
  7. package/dist/{index-DZDCWEAt.js → index-Bn4XgGCE.js} +2 -2
  8. package/dist/{index-C9omoY_W.js → index-Cnab0xsb.js} +2 -2
  9. package/dist/{index-DoUM-dTH.js → index-D5oT0rvy.js} +4 -3
  10. package/dist/{index-C6dKnCta.js → index-DImiFUoC.js} +2 -2
  11. package/dist/{index-DBpXJh_8.js → index-DRdXfLHP.js} +1 -1
  12. package/dist/index.es.js +1 -1
  13. package/dist/index.umd.js +5 -5
  14. package/dist/src/components/Map/Root/BaseMap/Google/index.d.ts.map +1 -1
  15. package/dist/src/components/Map/Root/BaseMap/Mapbox/index.d.ts.map +1 -1
  16. package/dist/src/components/Map/Root/BaseMap/Mapbox/translations.d.ts +33 -0
  17. package/dist/src/components/Map/Root/BaseMap/Mapbox/translations.d.ts.map +1 -0
  18. package/dist/src/components/Map/Root/BaseMap/Maptiler/index.d.ts.map +1 -1
  19. package/dist/src/components/Map/Root/BaseMap/Maptiler/translations.d.ts +57 -0
  20. package/dist/src/components/Map/Root/BaseMap/Maptiler/translations.d.ts.map +1 -0
  21. package/dist/src/components/Map/Root/context.d.ts +1 -0
  22. package/dist/src/components/Map/Root/context.d.ts.map +1 -1
  23. package/dist/src/components/Map/Root/index.d.ts.map +1 -1
  24. package/dist/src/components/Map/Root/types.d.ts +1 -0
  25. package/dist/src/components/Map/Root/types.d.ts.map +1 -1
  26. package/dist/style.css +1 -1
  27. package/dist/{styles-Lnv5-v_D.js → styles-mseP7Fna.js} +1 -1
  28. package/package.json +1 -1
  29. package/dist/index-BfcWqVMc.js +0 -98
  30. package/dist/index-D-wKsZtO.js +0 -69
  31. package/dist/index-k7gr6NRM.js +0 -75
package/dist/index.umd.js CHANGED
@@ -1,9 +1,9 @@
1
- (function(D,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react/jsx-runtime"),require("react"),require("@vis.gl/react-google-maps"),require("@phosphor-icons/react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","@vis.gl/react-google-maps","@phosphor-icons/react","react-dom"],g):(D=typeof globalThis<"u"?globalThis:D||self,g(D.LocalLogicMaps={},D.jsxRuntime,D.React,D.ReactGoogleMaps,D.PhosphorIcons,D.ReactDOM))})(this,function(D,g,c,U,ke,Ce){"use strict";function bo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const z=bo(c),st=c.createContext({}),O=()=>c.useContext(st),I={zoom:14,pitch:0,bearing:0,cooperativeGestures:!1},ge={maptiler:"600d69cb-288d-445e-9839-3dfe4d76b31a",mapbox:"locallogic/cmb9nz9kb011501ru8drq8fqf",google:"a7ff20eb973126bb"},ye={top:10,bottom:10,left:10,right:10},at=10,vo=22,be=10,wo=30,_o=60,le=15,ve=[-180,-85.0511,180,85.0511],xo="w-full h-full relative overflow-hidden",Mo=c.lazy(()=>Promise.resolve().then(()=>An)),ko=c.lazy(()=>Promise.resolve().then(()=>In)),Co=c.lazy(()=>Promise.resolve().then(()=>vr)),So=c.lazy(()=>Promise.resolve().then(()=>_r)),Eo=({children:e})=>{const{mapProvider:t,center:o,zoom:n=I.zoom,pitch:r=I.pitch,bearing:i=I.bearing,cooperativeGestures:s=I.cooperativeGestures,zoomPosition:l}=O(),[a]=c.useState(n),u=c.useMemo(()=>{switch(t?.name){case"maptiler":return Mo;case"google":return ko;case"mapbox":return Co;default:return So}},[t]);return g.jsx("div",{className:xo,"data-testid":"base-map","data-map-provider-name":t?.name,"data-map-provider-theme":t?.theme||ge[t?.name]||ge.maptiler,"data-initial-zoom":a,"data-pitch":r,"data-bearing":i,"data-cooperative-gestures":s,"data-zoom-position":l,"data-center-latitude":o.latitude,"data-center-longitude":o.longitude,children:g.jsx(u,{children:e})})},Lo=c.lazy(()=>Promise.resolve().then(()=>ti)),Po=c.lazy(()=>Promise.resolve().then(()=>ni)),zo=c.lazy(()=>Promise.resolve().then(()=>ii));function To(e){const{mapProvider:t}=O(),o=c.useMemo(()=>{switch(t?.name){case"maptiler":return Lo;case"google":return Po;case"mapbox":return zo;default:return null}},[t]);return o?g.jsx(o,{...e}):null}function lt(e,t,o={}){const n={type:"Feature"};return(o.id===0||o.id)&&(n.id=o.id),o.bbox&&(n.bbox=o.bbox),n.properties=t||{},n.geometry=e,n}function Ao(e,t,o={}){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!ct(e[0])||!ct(e[1]))throw new Error("coordinates must contain numbers");return lt({type:"Point",coordinates:e},t,o)}function Fe(e,t,o={}){return lt({type:"MultiPoint",coordinates:e},t,o)}function ct(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}const ut=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],je=1,we=8;class Ue{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[o,n]=new Uint8Array(t,0,2);if(o!==219)throw new Error("Data does not appear to be in a KDBush format.");const r=n>>4;if(r!==je)throw new Error(`Got v${r} data when expected v${je}.`);const i=ut[n&15];if(!i)throw new Error("Unrecognized array type.");const[s]=new Uint16Array(t,2,1),[l]=new Uint32Array(t,4,1);return new Ue(l,s,i,t)}constructor(t,o=64,n=Float64Array,r){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+o,2),65535),this.ArrayType=n,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const i=ut.indexOf(this.ArrayType),s=t*2*this.ArrayType.BYTES_PER_ELEMENT,l=t*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-l%8)%8;if(i<0)throw new Error(`Unexpected typed array class: ${n}.`);r&&r instanceof ArrayBuffer?(this.data=r,this.ids=new this.IndexArrayType(this.data,we,t),this.coords=new this.ArrayType(this.data,we+l+a,t*2),this._pos=t*2,this._finished=!0):(this.data=new ArrayBuffer(we+s+l+a),this.ids=new this.IndexArrayType(this.data,we,t),this.coords=new this.ArrayType(this.data,we+l+a,t*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(je<<4)+i]),new Uint16Array(this.data,2,1)[0]=o,new Uint32Array(this.data,4,1)[0]=t)}add(t,o){const n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=t,this.coords[this._pos++]=o,n}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return Be(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,o,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:s,nodeSize:l}=this,a=[0,i.length-1,0],u=[];for(;a.length;){const f=a.pop()||0,d=a.pop()||0,m=a.pop()||0;if(d-m<=l){for(let h=m;h<=d;h++){const v=s[2*h],L=s[2*h+1];v>=t&&v<=n&&L>=o&&L<=r&&u.push(i[h])}continue}const p=m+d>>1,w=s[2*p],x=s[2*p+1];w>=t&&w<=n&&x>=o&&x<=r&&u.push(i[p]),(f===0?t<=w:o<=x)&&(a.push(m),a.push(p-1),a.push(1-f)),(f===0?n>=w:r>=x)&&(a.push(p+1),a.push(d),a.push(1-f))}return u}within(t,o,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:r,coords:i,nodeSize:s}=this,l=[0,r.length-1,0],a=[],u=n*n;for(;l.length;){const f=l.pop()||0,d=l.pop()||0,m=l.pop()||0;if(d-m<=s){for(let h=m;h<=d;h++)ft(i[2*h],i[2*h+1],t,o)<=u&&a.push(r[h]);continue}const p=m+d>>1,w=i[2*p],x=i[2*p+1];ft(w,x,t,o)<=u&&a.push(r[p]),(f===0?t-n<=w:o-n<=x)&&(l.push(m),l.push(p-1),l.push(1-f)),(f===0?t+n>=w:o+n>=x)&&(l.push(p+1),l.push(d),l.push(1-f))}return a}}function Be(e,t,o,n,r,i){if(r-n<=o)return;const s=n+r>>1;dt(e,t,s,n,r,i),Be(e,t,o,n,s-1,1-i),Be(e,t,o,s+1,r,1-i)}function dt(e,t,o,n,r,i){for(;r>n;){if(r-n>600){const u=r-n+1,f=o-n+1,d=Math.log(u),m=.5*Math.exp(2*d/3),p=.5*Math.sqrt(d*m*(u-m)/u)*(f-u/2<0?-1:1),w=Math.max(n,Math.floor(o-f*m/u+p)),x=Math.min(r,Math.floor(o+(u-f)*m/u+p));dt(e,t,o,w,x,i)}const s=t[2*o+i];let l=n,a=r;for(_e(e,t,n,o),t[2*r+i]>s&&_e(e,t,n,r);l<a;){for(_e(e,t,l,a),l++,a--;t[2*l+i]<s;)l++;for(;t[2*a+i]>s;)a--}t[2*n+i]===s?_e(e,t,n,a):(a++,_e(e,t,a,r)),a<=o&&(n=a+1),o<=a&&(r=a-1)}}function _e(e,t,o,n){Ze(e,o,n),Ze(t,2*o,2*n),Ze(t,2*o+1,2*n+1)}function Ze(e,t,o){const n=e[t];e[t]=e[o],e[o]=n}function ft(e,t,o,n){const r=e-o,i=t-n;return r*r+i*i}const Oo={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},mt=Math.fround||(e=>t=>(e[0]=+t,e[0]))(new Float32Array(1)),ee=2,J=3,De=4,Y=5,pt=6;class $o{constructor(t){this.options=Object.assign(Object.create(Oo),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:o,minZoom:n,maxZoom:r}=this.options;o&&console.time("total time");const i=`prepare ${t.length} points`;o&&console.time(i),this.points=t;const s=[];for(let a=0;a<t.length;a++){const u=t[a];if(!u.geometry)continue;const[f,d]=u.geometry.coordinates,m=mt(Se(f)),p=mt(Ee(d));s.push(m,p,1/0,a,-1,1),this.options.reduce&&s.push(0)}let l=this.trees[r+1]=this._createTree(s);o&&console.timeEnd(i);for(let a=r;a>=n;a--){const u=+Date.now();l=this.trees[a]=this._createTree(this._cluster(l,a)),o&&console.log("z%d: %d clusters in %dms",a,l.numItems,+Date.now()-u)}return o&&console.timeEnd("total time"),this}getClusters(t,o){let n=((t[0]+180)%360+360)%360-180;const r=Math.max(-90,Math.min(90,t[1]));let i=t[2]===180?180:((t[2]+180)%360+360)%360-180;const s=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)n=-180,i=180;else if(n>i){const d=this.getClusters([n,r,180,s],o),m=this.getClusters([-180,r,i,s],o);return d.concat(m)}const l=this.trees[this._limitZoom(o)],a=l.range(Se(n),Ee(s),Se(i),Ee(r)),u=l.data,f=[];for(const d of a){const m=this.stride*d;f.push(u[m+Y]>1?ht(u,m,this.clusterProps):this.points[u[m+J]])}return f}getChildren(t){const o=this._getOriginId(t),n=this._getOriginZoom(t),r="No cluster with the specified id.",i=this.trees[n];if(!i)throw new Error(r);const s=i.data;if(o*this.stride>=s.length)throw new Error(r);const l=this.options.radius/(this.options.extent*Math.pow(2,n-1)),a=s[o*this.stride],u=s[o*this.stride+1],f=i.within(a,u,l),d=[];for(const m of f){const p=m*this.stride;s[p+De]===t&&d.push(s[p+Y]>1?ht(s,p,this.clusterProps):this.points[s[p+J]])}if(d.length===0)throw new Error(r);return d}getLeaves(t,o,n){o=o||10,n=n||0;const r=[];return this._appendLeaves(r,t,o,n,0),r}getTile(t,o,n){const r=this.trees[this._limitZoom(t)],i=Math.pow(2,t),{extent:s,radius:l}=this.options,a=l/s,u=(n-a)/i,f=(n+1+a)/i,d={features:[]};return this._addTileFeatures(r.range((o-a)/i,u,(o+1+a)/i,f),r.data,o,n,i,d),o===0&&this._addTileFeatures(r.range(1-a/i,u,1,f),r.data,i,n,i,d),o===i-1&&this._addTileFeatures(r.range(0,u,a/i,f),r.data,-1,n,i,d),d.features.length?d:null}getClusterExpansionZoom(t){let o=this._getOriginZoom(t)-1;for(;o<=this.options.maxZoom;){const n=this.getChildren(t);if(o++,n.length!==1)break;t=n[0].properties.cluster_id}return o}_appendLeaves(t,o,n,r,i){const s=this.getChildren(o);for(const l of s){const a=l.properties;if(a&&a.cluster?i+a.point_count<=r?i+=a.point_count:i=this._appendLeaves(t,a.cluster_id,n,r,i):i<r?i++:t.push(l),t.length===n)break}return i}_createTree(t){const o=new Ue(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let n=0;n<t.length;n+=this.stride)o.add(t[n],t[n+1]);return o.finish(),o.data=t,o}_addTileFeatures(t,o,n,r,i,s){for(const l of t){const a=l*this.stride,u=o[a+Y]>1;let f,d,m;if(u)f=gt(o,a,this.clusterProps),d=o[a],m=o[a+1];else{const x=this.points[o[a+J]];f=x.properties;const[h,v]=x.geometry.coordinates;d=Se(h),m=Ee(v)}const p={type:1,geometry:[[Math.round(this.options.extent*(d*i-n)),Math.round(this.options.extent*(m*i-r))]],tags:f};let w;u||this.options.generateId?w=o[a+J]:w=this.points[o[a+J]].id,w!==void 0&&(p.id=w),s.features.push(p)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,o){const{radius:n,extent:r,reduce:i,minPoints:s}=this.options,l=n/(r*Math.pow(2,o)),a=t.data,u=[],f=this.stride;for(let d=0;d<a.length;d+=f){if(a[d+ee]<=o)continue;a[d+ee]=o;const m=a[d],p=a[d+1],w=t.within(a[d],a[d+1],l),x=a[d+Y];let h=x;for(const v of w){const L=v*f;a[L+ee]>o&&(h+=a[L+Y])}if(h>x&&h>=s){let v=m*x,L=p*x,_,k=-1;const C=((d/f|0)<<5)+(o+1)+this.points.length;for(const P of w){const A=P*f;if(a[A+ee]<=o)continue;a[A+ee]=o;const M=a[A+Y];v+=a[A]*M,L+=a[A+1]*M,a[A+De]=C,i&&(_||(_=this._map(a,d,!0),k=this.clusterProps.length,this.clusterProps.push(_)),i(_,this._map(a,A)))}a[d+De]=C,u.push(v/h,L/h,1/0,C,-1,h),i&&u.push(k)}else{for(let v=0;v<f;v++)u.push(a[d+v]);if(h>1)for(const v of w){const L=v*f;if(!(a[L+ee]<=o)){a[L+ee]=o;for(let _=0;_<f;_++)u.push(a[L+_])}}}}return u}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,o,n){if(t[o+Y]>1){const s=this.clusterProps[t[o+pt]];return n?Object.assign({},s):s}const r=this.points[t[o+J]].properties,i=this.options.map(r);return n&&i===r?Object.assign({},i):i}}function ht(e,t,o){return{type:"Feature",id:e[t+J],properties:gt(e,t,o),geometry:{type:"Point",coordinates:[No(e[t]),Io(e[t+1])]}}}function gt(e,t,o){const n=e[t+Y],r=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?`${Math.round(n/100)/10}k`:n,i=e[t+pt],s=i===-1?{}:Object.assign({},o[i]);return Object.assign(s,{cluster:!0,cluster_id:e[t+J],point_count:n,point_count_abbreviated:r})}function Se(e){return e/360+.5}function Ee(e){const t=Math.sin(e*Math.PI/180),o=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return o<0?0:o>1?1:o}function No(e){return(e-.5)*360}function Io(e){const t=(180-e*360)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}var yt=Object.prototype.hasOwnProperty;function bt(e,t,o){for(o of e.keys())if(te(o,t))return o}function te(e,t){var o,n,r;if(e===t)return!0;if(e&&t&&(o=e.constructor)===t.constructor){if(o===Date)return e.getTime()===t.getTime();if(o===RegExp)return e.toString()===t.toString();if(o===Array){if((n=e.length)===t.length)for(;n--&&te(e[n],t[n]););return n===-1}if(o===Set){if(e.size!==t.size)return!1;for(n of e)if(r=n,r&&typeof r=="object"&&(r=bt(t,r),!r)||!t.has(r))return!1;return!0}if(o===Map){if(e.size!==t.size)return!1;for(n of e)if(r=n[0],r&&typeof r=="object"&&(r=bt(t,r),!r)||!te(n[1],t.get(r)))return!1;return!0}if(o===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(o===DataView){if((n=e.byteLength)===t.byteLength)for(;n--&&e.getInt8(n)===t.getInt8(n););return n===-1}if(ArrayBuffer.isView(e)){if((n=e.byteLength)===t.byteLength)for(;n--&&e[n]===t[n];);return n===-1}if(!o||typeof e=="object"){n=0;for(o in e)if(yt.call(e,o)&&++n&&!yt.call(t,o)||!(o in t)||!te(e[o],t[o]))return!1;return Object.keys(t).length===n}}return e!==e&&t!==t}function Fo(e){var t=z.useRef(e),o=z.useRef(0);return te(e,t.current)||(t.current=e,o.current+=1),z.useMemo(function(){return t.current},[o.current])}function jo(e,t){return z.useEffect(e,Fo(t))}var Uo=function(t){var o=t.points,n=t.bounds,r=t.zoom,i=t.options,s=t.disableRefresh,l=c.useRef(),a=c.useRef(),u=c.useState([]),f=u[0],d=u[1],m=Math.round(r);return jo(function(){s!==!0&&((!l.current||!te(a.current,o)||!te(l.current.options,i))&&(l.current=new $o(i),l.current.load(o)),n&&d(l.current.getClusters(n,m)),a.current=o)},[o,n,m,i,s]),{clusters:f,supercluster:l.current}};const Bo=c.lazy(()=>Promise.resolve().then(()=>li)),Zo=c.lazy(()=>Promise.resolve().then(()=>ui)),Do=c.lazy(()=>Promise.resolve().then(()=>fi));function Go({markers:e,onClick:t,...o}){const{mapProvider:n,activeMarker:r,center:i,zoom:s,setMarkerPoints:l,setClusterPoints:a}=O();c.useEffect(()=>{let h=[[i.longitude,i.latitude]];e.length>0&&(h=h.concat(e.map(v=>[v.longitude,v.latitude]))),l(h)},[e,i]);const u=c.useMemo(()=>({points:e.map(h=>Ao([h.longitude,h.latitude],h)),bounds:ve,zoom:s,options:{radius:n.name==="google"&&s>at?_o:wo,minZoom:at,maxZoom:vo}}),[e,n,s]),{clusters:f,supercluster:d}=Uo(u),m=c.useRef("");c.useEffect(()=>{const h=JSON.stringify(f.map(v=>({coords:v.geometry.coordinates,props:v.properties})));h!==m.current&&(a(f),m.current=h)},[f,a]);const p=h=>{if(!("properties"in h))throw new Error("Cluster does not have properties");if(h.properties?.cluster&&typeof h.properties?.cluster_id=="number"){t?.({id:`${h.properties.cluster_id}`,latitude:h.geometry.coordinates[1],longitude:h.geometry.coordinates[0],markers:d?.getLeaves(h.properties.cluster_id)?.map(v=>v.properties)??[]});return}t?.({id:h.properties.id,latitude:h.properties.latitude,longitude:h.properties.longitude,markers:[h.properties]})},w=h=>{if(!d||!r)return!1;if(r.id===`${h}`)return!0;try{return d.getLeaves(h)?.find(v=>v.properties.id===r.id)!==void 0}catch{return!1}},x=c.useMemo(()=>{switch(n?.name){case"maptiler":return Bo;case"google":return Zo;case"mapbox":return Do;default:return null}},[n]);return x?g.jsx(x,{clusters:f,onClick:p,doesSuperclusterContainActiveMarker:w,...o}):null}const Vo=c.lazy(()=>Promise.resolve().then(()=>pi)),Wo=c.lazy(()=>Promise.resolve().then(()=>gi)),Ho=c.lazy(()=>Promise.resolve().then(()=>bi));function qo({children:e,anchor:t="bottom",...o}){const{mapProvider:n}=O(),r=c.useMemo(()=>{switch(n?.name){case"maptiler":return Vo;case"google":return Wo;case"mapbox":return Ho;default:return null}},[n]);return r?g.jsx(r,{...o,anchor:t,children:e}):null}const Ko=c.lazy(()=>Promise.resolve().then(()=>wi)),Jo=c.lazy(()=>Promise.resolve().then(()=>xi)),Yo=c.lazy(()=>Promise.resolve().then(()=>ki));function Qo(e){const{mapProvider:t}=O(),o=c.useMemo(()=>{switch(t?.name){case"maptiler":return Ko;case"google":return Jo;case"mapbox":return Yo;default:return null}},[t]);return o?g.jsx(o,{...e}):null}function Xo(e){const[t,o]=c.useState([]),[n,r]=c.useState([]),[i,s]=c.useState(e.zoom||I.zoom);return g.jsx(st.Provider,{value:{...e,mapPadding:e.mapPadding||ye,markerPoints:t,setMarkerPoints:o,clusterPoints:n,setClusterPoints:r,zoom:i,setZoom:s},children:e.children})}const Ro=Object.freeze(Object.defineProperty({__proto__:null,BaseMap:Eo,CenterPin:To,Layers:Qo,Markers:Go,Popup:qo,Root:Xo},Symbol.toStringTag,{value:"Module"})),vt=z.createContext(null);function wt(){const e=c.useContext(vt)?.maps,t=c.useContext(oe);return c.useMemo(()=>({...e,current:t?.map}),[e,t])}function en(e,t){const o=Array.isArray(e)?e[0]:e?e.x:0,n=Array.isArray(e)?e[1]:e?e.y:0,r=Array.isArray(t)?t[0]:t?t.x:0,i=Array.isArray(t)?t[1]:t?t.y:0;return o===r&&n===i}function j(e,t){if(e===t)return!0;if(!e||!t)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(!j(e[o],t[o]))return!1;return!0}else if(Array.isArray(t))return!1;if(typeof e=="object"&&typeof t=="object"){const o=Object.keys(e),n=Object.keys(t);if(o.length!==n.length)return!1;for(const r of o)if(!t.hasOwnProperty(r)||!j(e[r],t[r]))return!1;return!0}return!1}function _t(e){return{longitude:e.center.lng,latitude:e.center.lat,zoom:e.zoom,pitch:e.pitch,bearing:e.bearing,padding:e.padding}}function xt(e,t){const o=t.viewState||t,n={};if("longitude"in o&&"latitude"in o&&(o.longitude!==e.center.lng||o.latitude!==e.center.lat)){const r=e.center.constructor;n.center=new r(o.longitude,o.latitude)}return"zoom"in o&&o.zoom!==e.zoom&&(n.zoom=o.zoom),"bearing"in o&&o.bearing!==e.bearing&&(n.bearing=o.bearing),"pitch"in o&&o.pitch!==e.pitch&&(n.pitch=o.pitch),o.padding&&e.padding&&!j(o.padding,e.padding)&&(n.padding=o.padding),n}const tn=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Mt(e){if(!e)return null;if(typeof e=="string"||("toJS"in e&&(e=e.toJS()),!e.layers))return e;const t={};for(const n of e.layers)t[n.id]=n;const o=e.layers.map(n=>{let r=null;"interactive"in n&&(r=Object.assign({},n),delete r.interactive);const i=t[n.ref];if(i){r=r||Object.assign({},n),delete r.ref;for(const s of tn)s in i&&(r[s]=i[s])}return r||n});return{...e,layers:o}}const kt={version:8,sources:{},layers:[]},Ct={mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",click:"onClick",dblclick:"onDblClick",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mouseout:"onMouseOut",contextmenu:"onContextMenu",touchstart:"onTouchStart",touchend:"onTouchEnd",touchmove:"onTouchMove",touchcancel:"onTouchCancel"},St={movestart:"onMoveStart",move:"onMove",moveend:"onMoveEnd",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",zoomstart:"onZoomStart",zoom:"onZoom",zoomend:"onZoomEnd",rotatestart:"onRotateStart",rotate:"onRotate",rotateend:"onRotateEnd",pitchstart:"onPitchStart",pitch:"onPitch",pitchend:"onPitchEnd"},Et={wheel:"onWheel",boxzoomstart:"onBoxZoomStart",boxzoomend:"onBoxZoomEnd",boxzoomcancel:"onBoxZoomCancel",resize:"onResize",load:"onLoad",render:"onRender",idle:"onIdle",remove:"onRemove",data:"onData",styledata:"onStyleData",sourcedata:"onSourceData",error:"onError"},on=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],nn=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class ce{constructor(t,o,n){this._map=null,this._internalUpdate=!1,this._hoveredFeatures=null,this._propsedCameraUpdate=null,this._styleComponents={},this._onEvent=r=>{const i=this.props[Et[r.type]];i?i(r):r.type==="error"&&console.error(r.error)},this._onCameraEvent=r=>{if(this._internalUpdate)return;r.viewState=this._propsedCameraUpdate||_t(this._map.transform);const i=this.props[St[r.type]];i&&i(r)},this._onCameraUpdate=r=>this._internalUpdate?r:(this._propsedCameraUpdate=_t(r),xt(r,this.props)),this._onPointerEvent=r=>{(r.type==="mousemove"||r.type==="mouseout")&&this._updateHover(r);const i=this.props[Ct[r.type]];i&&(this.props.interactiveLayerIds&&r.type!=="mouseover"&&r.type!=="mouseout"&&(r.features=this._hoveredFeatures||this._queryRenderedFeatures(r.point)),i(r),delete r.features)},this._MapClass=t,this.props=o,this._initialize(n)}get map(){return this._map}setProps(t){const o=this.props;this.props=t;const n=this._updateSettings(t,o),r=this._updateSize(t),i=this._updateViewState(t);this._updateStyle(t,o),this._updateStyleComponents(t),this._updateHandlers(t,o),(n||r||i&&!this._map.isMoving())&&this.redraw()}static reuse(t,o){const n=ce.savedMaps.pop();if(!n)return null;const r=n.map,i=r.getContainer();for(o.className=i.className;i.childNodes.length>0;)o.appendChild(i.childNodes[0]);r._container=o;const s=r._resizeObserver;s&&(s.disconnect(),s.observe(o)),n.setProps({...t,styleDiffing:!1}),r.resize();const{initialViewState:l}=t;return l&&(l.bounds?r.fitBounds(l.bounds,{...l.fitBoundsOptions,duration:0}):n._updateViewState(l)),r.isStyleLoaded()?r.fire("load"):r.once("style.load",()=>r.fire("load")),r._update(),n}_initialize(t){const{props:o}=this,{mapStyle:n=kt}=o,r={...o,...o.initialViewState,container:t,style:Mt(n)},i=r.initialViewState||r.viewState||r;if(Object.assign(r,{center:[i.longitude||0,i.latitude||0],zoom:i.zoom||0,pitch:i.pitch||0,bearing:i.bearing||0}),o.gl){const l=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=l,o.gl)}const s=new this._MapClass(r);i.padding&&s.setPadding(i.padding),o.cursor&&(s.getCanvas().style.cursor=o.cursor),s.transformCameraUpdate=this._onCameraUpdate,s.on("style.load",()=>{this._styleComponents={light:s.getLight(),sky:s.getSky(),projection:s.getProjection?.(),terrain:s.getTerrain()},this._updateStyleComponents(this.props)}),s.on("sourcedata",()=>{this._updateStyleComponents(this.props)});for(const l in Ct)s.on(l,this._onPointerEvent);for(const l in St)s.on(l,this._onCameraEvent);for(const l in Et)s.on(l,this._onEvent);this._map=s}recycle(){this.map.getContainer().querySelector("[mapboxgl-children]")?.remove(),ce.savedMaps.push(this)}destroy(){this._map.remove()}redraw(){const t=this._map;t.style&&(t._frame&&(t._frame.cancel(),t._frame=null),t._render())}_updateSize(t){const{viewState:o}=t;if(o){const n=this._map;if(o.width!==n.transform.width||o.height!==n.transform.height)return n.resize(),!0}return!1}_updateViewState(t){const o=this._map,n=o.transform;if(!o.isMoving()){const i=xt(n,t);if(Object.keys(i).length>0)return this._internalUpdate=!0,o.jumpTo(i),this._internalUpdate=!1,!0}return!1}_updateSettings(t,o){const n=this._map;let r=!1;for(const i of on)i in t&&!j(t[i],o[i])&&(r=!0,n[`set${i[0].toUpperCase()}${i.slice(1)}`]?.call(n,t[i]));return r}_updateStyle(t,o){if(t.cursor!==o.cursor&&(this._map.getCanvas().style.cursor=t.cursor||""),t.mapStyle!==o.mapStyle){const{mapStyle:n=kt,styleDiffing:r=!0}=t,i={diff:r};"localIdeographFontFamily"in t&&(i.localIdeographFontFamily=t.localIdeographFontFamily),this._map.setStyle(Mt(n),i)}}_updateStyleComponents({light:t,projection:o,sky:n,terrain:r}){const i=this._map,s=this._styleComponents;i.style._loaded&&(t&&!j(t,s.light)&&(s.light=t,i.setLight(t)),o&&!j(o,s.projection)&&o!==s.projection?.type&&(s.projection=typeof o=="string"?{type:o}:o,i.setProjection?.(s.projection)),n&&!j(n,s.sky)&&(s.sky=n,i.setSky(n)),r!==void 0&&!j(r,s.terrain)&&(!r||i.getSource(r.source))&&(s.terrain=r,i.setTerrain(r)))}_updateHandlers(t,o){const n=this._map;for(const r of nn){const i=t[r]??!0,s=o[r]??!0;j(i,s)||(i?n[r].enable(i):n[r].disable())}}_queryRenderedFeatures(t){const o=this._map,{interactiveLayerIds:n=[]}=this.props;try{return o.queryRenderedFeatures(t,{layers:n.filter(o.getLayer.bind(o))})}catch{return[]}}_updateHover(t){const{props:o}=this;if(o.interactiveLayerIds&&(o.onMouseMove||o.onMouseEnter||o.onMouseLeave)){const r=t.type,i=this._hoveredFeatures?.length>0,s=this._queryRenderedFeatures(t.point),l=s.length>0;!l&&i&&(t.type="mouseleave",this._onPointerEvent(t)),this._hoveredFeatures=s,l&&!i&&(t.type="mouseenter",this._onPointerEvent(t)),t.type=r}else this._hoveredFeatures=null}}ce.savedMaps=[];const rn=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"];function sn(e){if(!e)return null;const t=e.map,o={getMap:()=>t};for(const n of an(t))!(n in o)&&!rn.includes(n)&&(o[n]=t[n].bind(t));return o}function an(e){const t=new Set;let o=e;for(;o;){for(const n of Object.getOwnPropertyNames(o))n[0]!=="_"&&typeof e[n]=="function"&&n!=="fire"&&n!=="setEventedParent"&&t.add(n);o=Object.getPrototypeOf(o)}return Array.from(t)}const ln=typeof document<"u"?c.useLayoutEffect:c.useEffect;function cn(e,t){const{RTLTextPlugin:o,maxParallelImageRequests:n,workerCount:r,workerUrl:i}=t;if(o&&e.getRTLTextPluginStatus&&e.getRTLTextPluginStatus()==="unavailable"){const{pluginUrl:s,lazy:l=!0}=typeof o=="string"?{pluginUrl:o}:o;e.setRTLTextPlugin(s,a=>{a&&console.error(a)},l)}n!==void 0&&e.setMaxParallelImageRequests(n),r!==void 0&&e.setWorkerCount(r),i!==void 0&&e.setWorkerUrl(i)}const oe=z.createContext(null);function un(e,t){const o=c.useContext(vt),[n,r]=c.useState(null),i=c.useRef(),{current:s}=c.useRef({mapLib:null,map:null});c.useEffect(()=>{const u=e.mapLib;let f=!0,d;return Promise.resolve(u||import("maplibre-gl")).then(m=>{if(!f)return;if(!m)throw new Error("Invalid mapLib");const p="Map"in m?m:m.default;if(!p.Map)throw new Error("Invalid mapLib");cn(p,e),e.reuseMaps&&(d=ce.reuse(e,i.current)),d||(d=new ce(p.Map,e,i.current)),s.map=sn(d),s.mapLib=p,r(d),o?.onMapMount(s.map,e.id)}).catch(m=>{const{onError:p}=e;p?p({type:"error",target:null,originalEvent:null,error:m}):console.error(m)}),()=>{f=!1,d&&(o?.onMapUnmount(e.id),e.reuseMaps?d.recycle():d.destroy())}},[]),ln(()=>{n&&n.setProps(e)}),c.useImperativeHandle(t,()=>s.map,[n]);const l=c.useMemo(()=>({position:"relative",width:"100%",height:"100%",...e.style}),[e.style]),a={height:"100%"};return z.createElement("div",{id:e.id,ref:i,style:l},n&&z.createElement(oe.Provider,{value:s},z.createElement("div",{"mapboxgl-children":"",style:a},e.children)))}const dn=z.forwardRef(un),fn=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function V(e,t){if(!e||!t)return;const o=e.style;for(const n in t){const r=t[n];Number.isFinite(r)&&!fn.test(n)?o[n]=`${r}px`:o[n]=r}}function Lt(e,t){if(e===t)return null;const o=Pt(e),n=Pt(t),r=[];for(const i of n)o.has(i)||r.push(i);for(const i of o)n.has(i)||r.push(i);return r.length===0?null:r}function Pt(e){return new Set(e?e.trim().split(/\s+/):[])}const zt=c.memo(c.forwardRef((e,t)=>{const{map:o,mapLib:n}=c.useContext(oe),r=c.useRef({props:e}),i=c.useMemo(()=>{let v=!1;z.Children.forEach(e.children,k=>{k&&(v=!0)});const L={...e,element:v?document.createElement("div"):void 0},_=new n.Marker(L);return _.setLngLat([e.longitude,e.latitude]),_.getElement().addEventListener("click",k=>{r.current.props.onClick?.({type:"click",target:_,originalEvent:k})}),_.on("dragstart",k=>{const C=k;C.lngLat=i.getLngLat(),r.current.props.onDragStart?.(C)}),_.on("drag",k=>{const C=k;C.lngLat=i.getLngLat(),r.current.props.onDrag?.(C)}),_.on("dragend",k=>{const C=k;C.lngLat=i.getLngLat(),r.current.props.onDragEnd?.(C)}),_},[]);c.useEffect(()=>(i.addTo(o.getMap()),()=>{i.remove()}),[]);const{longitude:s,latitude:l,offset:a,style:u,draggable:f=!1,popup:d=null,rotation:m=0,rotationAlignment:p="auto",pitchAlignment:w="auto"}=e;c.useEffect(()=>{V(i.getElement(),u)},[u]),c.useImperativeHandle(t,()=>i,[]);const x=r.current.props;(i.getLngLat().lng!==s||i.getLngLat().lat!==l)&&i.setLngLat([s,l]),a&&!en(i.getOffset(),a)&&i.setOffset(a),i.isDraggable()!==f&&i.setDraggable(f),i.getRotation()!==m&&i.setRotation(m),i.getRotationAlignment()!==p&&i.setRotationAlignment(p),i.getPitchAlignment()!==w&&i.setPitchAlignment(w),i.getPopup()!==d&&i.setPopup(d);const h=Lt(x.className,e.className);if(h)for(const v of h)i.toggleClassName(v);return r.current.props=e,Ce.createPortal(e.children,i.getElement())})),mn=c.memo(c.forwardRef((e,t)=>{const{map:o,mapLib:n}=c.useContext(oe),r=c.useMemo(()=>document.createElement("div"),[]),i=c.useRef({props:e}),s=c.useMemo(()=>{const l={...e},a=new n.Popup(l);return a.setLngLat([e.longitude,e.latitude]),a.once("open",u=>{i.current.props.onOpen?.(u)}),a},[]);if(c.useEffect(()=>{const l=a=>{i.current.props.onClose?.(a)};return s.on("close",l),s.setDOMContent(r).addTo(o.getMap()),()=>{s.off("close",l),s.isOpen()&&s.remove()}},[]),c.useEffect(()=>{V(s.getElement(),e.style)},[e.style]),c.useImperativeHandle(t,()=>s,[]),s.isOpen()){const l=i.current.props;(s.getLngLat().lng!==e.longitude||s.getLngLat().lat!==e.latitude)&&s.setLngLat([e.longitude,e.latitude]),e.offset&&!j(l.offset,e.offset)&&s.setOffset(e.offset),(l.anchor!==e.anchor||l.maxWidth!==e.maxWidth)&&(s.options.anchor=e.anchor,s.setMaxWidth(e.maxWidth));const a=Lt(l.className,e.className);if(a)for(const u of a)s.toggleClassName(u);i.current.props=e}return Ce.createPortal(e.children,r)}));function ne(e,t,o,n){const r=c.useContext(oe),i=c.useMemo(()=>e(r),[]);return c.useEffect(()=>{const s=t,l=null,a=typeof t=="function"?t:null,{map:u}=r;return u.hasControl(i)||(u.addControl(i,s?.position),l&&l(r)),()=>{a&&a(r),u.hasControl(i)&&u.removeControl(i)}},[]),i}function pn(e){const t=ne(({mapLib:o})=>new o.AttributionControl(e),{position:e.position});return c.useEffect(()=>{V(t._container,e.style)},[e.style]),null}c.memo(pn);function hn(e){const t=ne(({mapLib:o})=>new o.FullscreenControl({container:e.containerId&&document.getElementById(e.containerId)}),{position:e.position});return c.useEffect(()=>{V(t._controlContainer,e.style)},[e.style]),null}c.memo(hn);function gn(e,t){const o=c.useRef({props:e}),n=ne(({mapLib:r})=>{const i=new r.GeolocateControl(e),s=i._setupUI;return i._setupUI=()=>{i._container.hasChildNodes()||s()},i.on("geolocate",l=>{o.current.props.onGeolocate?.(l)}),i.on("error",l=>{o.current.props.onError?.(l)}),i.on("outofmaxbounds",l=>{o.current.props.onOutOfMaxBounds?.(l)}),i.on("trackuserlocationstart",l=>{o.current.props.onTrackUserLocationStart?.(l)}),i.on("trackuserlocationend",l=>{o.current.props.onTrackUserLocationEnd?.(l)}),i},{position:e.position});return o.current.props=e,c.useImperativeHandle(t,()=>n,[]),c.useEffect(()=>{V(n._container,e.style)},[e.style]),null}c.memo(c.forwardRef(gn));function yn(e){const t=ne(({mapLib:o})=>new o.NavigationControl(e),{position:e.position});return c.useEffect(()=>{V(t._container,e.style)},[e.style]),null}const bn=c.memo(yn);function vn(e){const t=ne(({mapLib:i})=>new i.ScaleControl(e),{position:e.position}),o=c.useRef(e),n=o.current;o.current=e;const{style:r}=e;return e.maxWidth!==void 0&&e.maxWidth!==n.maxWidth&&(t.options.maxWidth=e.maxWidth),e.unit!==void 0&&e.unit!==n.unit&&t.setUnit(e.unit),c.useEffect(()=>{V(t._container,r)},[r]),null}c.memo(vn);function wn(e){const t=ne(({mapLib:o})=>new o.TerrainControl(e),{position:e.position});return c.useEffect(()=>{V(t._container,e.style)},[e.style]),null}c.memo(wn);function _n(e){const t=ne(({mapLib:o})=>new o.LogoControl(e),{position:e.position});return c.useEffect(()=>{V(t._container,e.style)},[e.style]),null}c.memo(_n);function Le(e,t){if(!e)throw new Error(t)}let xn=0;function Mn(e,t,o){if(e.style&&e.style._loaded){const n={...o};return delete n.id,delete n.children,e.addSource(t,n),e.getSource(t)}return null}function kn(e,t,o){Le(t.id===o.id,"source id changed"),Le(t.type===o.type,"source type changed");let n="",r=0;for(const s in t)s!=="children"&&s!=="id"&&!j(o[s],t[s])&&(n=s,r++);if(!r)return;const i=t.type;if(i==="geojson")e.setData(t.data);else if(i==="image")e.updateImage({url:t.url,coordinates:t.coordinates});else switch(n){case"coordinates":e.setCoordinates?.(t.coordinates);break;case"url":e.setUrl?.(t.url);break;case"tiles":e.setTiles?.(t.tiles);break;default:console.warn(`Unable to update <Source> prop: ${n}`)}}function Cn(e){const t=c.useContext(oe).map.getMap(),o=c.useRef(e),[,n]=c.useState(0),r=c.useMemo(()=>e.id||`jsx-source-${xn++}`,[]);c.useEffect(()=>{if(t){const s=()=>setTimeout(()=>n(l=>l+1),0);return t.on("styledata",s),s(),()=>{if(t.off("styledata",s),t.style&&t.style._loaded&&t.getSource(r)){const l=t.getStyle()?.layers;if(l)for(const a of l)a.source===r&&t.removeLayer(a.id);t.removeSource(r)}}}},[t]);let i=t&&t.style&&t.getSource(r);return i?kn(i,e,o.current):i=Mn(t,r,e),o.current=e,i&&z.Children.map(e.children,s=>s&&c.cloneElement(s,{source:r}))||null}function Sn(e,t,o,n){if(Le(o.id===n.id,"layer id changed"),Le(o.type===n.type,"layer type changed"),o.type==="custom"||n.type==="custom")return;const{layout:r={},paint:i={},filter:s,minzoom:l,maxzoom:a,beforeId:u}=o;if(u!==n.beforeId&&e.moveLayer(t,u),r!==n.layout){const f=n.layout||{};for(const d in r)j(r[d],f[d])||e.setLayoutProperty(t,d,r[d]);for(const d in f)r.hasOwnProperty(d)||e.setLayoutProperty(t,d,void 0)}if(i!==n.paint){const f=n.paint||{};for(const d in i)j(i[d],f[d])||e.setPaintProperty(t,d,i[d]);for(const d in f)i.hasOwnProperty(d)||e.setPaintProperty(t,d,void 0)}j(s,n.filter)||e.setFilter(t,s),(l!==n.minzoom||a!==n.maxzoom)&&e.setLayerZoomRange(t,l,a)}function En(e,t,o){if(e.style&&e.style._loaded&&(!("source"in o)||e.getSource(o.source))){const n={...o,id:t};delete n.beforeId,e.addLayer(n,o.beforeId)}}let Ln=0;function Tt(e){const t=c.useContext(oe).map.getMap(),o=c.useRef(e),[,n]=c.useState(0),r=c.useMemo(()=>e.id||`jsx-layer-${Ln++}`,[]);if(c.useEffect(()=>{if(t){const s=()=>n(l=>l+1);return t.on("styledata",s),s(),()=>{t.off("styledata",s),t.style&&t.style._loaded&&t.getLayer(r)&&t.removeLayer(r)}}},[t]),t&&t.style&&t.getLayer(r))try{Sn(t,r,e,o.current)}catch(s){console.warn(s)}else En(t,r,e);return o.current=e,null}function At(e,t,o){if(e!==null)for(var n,r,i,s,l,a,u,f=0,d=0,m,p=e.type,w=p==="FeatureCollection",x=p==="Feature",h=w?e.features.length:1,v=0;v<h;v++){u=w?e.features[v].geometry:x?e.geometry:e,m=u?u.type==="GeometryCollection":!1,l=m?u.geometries.length:1;for(var L=0;L<l;L++){var _=0,k=0;if(s=m?u.geometries[L]:u,s!==null){a=s.coordinates;var C=s.type;switch(f=0,C){case null:break;case"Point":if(t(a,d,v,_,k)===!1)return!1;d++,_++;break;case"LineString":case"MultiPoint":for(n=0;n<a.length;n++){if(t(a[n],d,v,_,k)===!1)return!1;d++,C==="MultiPoint"&&_++}C==="LineString"&&_++;break;case"Polygon":case"MultiLineString":for(n=0;n<a.length;n++){for(r=0;r<a[n].length-f;r++){if(t(a[n][r],d,v,_,k)===!1)return!1;d++}C==="MultiLineString"&&_++,C==="Polygon"&&k++}C==="Polygon"&&_++;break;case"MultiPolygon":for(n=0;n<a.length;n++){for(k=0,r=0;r<a[n].length;r++){for(i=0;i<a[n][r].length-f;i++){if(t(a[n][r][i],d,v,_,k)===!1)return!1;d++}k++}_++}break;case"GeometryCollection":for(n=0;n<s.geometries.length;n++)if(At(s.geometries[n],t)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Pn(e,t={}){if(e.bbox!=null&&t.recompute!==!0)return e.bbox;const o=[1/0,1/0,-1/0,-1/0];return At(e,n=>{o[0]>n[0]&&(o[0]=n[0]),o[1]>n[1]&&(o[1]=n[1]),o[2]<n[0]&&(o[2]=n[0]),o[3]<n[1]&&(o[3]=n[1])}),o}var Ge=Pn;const zn=()=>{const{current:e}=wt(),{markerPoints:t,setZoom:o,mapPadding:n}=O(),[r,i]=c.useState(void 0),s=c.useRef(void 0),l=c.useCallback(()=>{e&&o(e.getZoom())},[e,o]);return c.useEffect(()=>(l(),e?.on("zoom",l),()=>{e?.off("zoom",l)}),[e,l]),c.useEffect(()=>{if(!e||typeof t>"u"||t.length===0)return;const a=Ge(Fe(t));(!s.current||!a.every((u,f)=>u===s.current?.[f]))&&(s.current=a,i(a))},[e,t]),c.useEffect(()=>{if(!e||typeof r>"u")return;const[a,u,f,d]=r,m=(f-a)*.05||.001,p=(d-u)*.05||.001;e.fitBounds([[a-m,u-p],[f+m,d+p]],{padding:n,maxZoom:17,duration:700})},[e,r,n]),null};function Tn({children:e}){const{mapProvider:t,center:o,zoom:n=I.zoom,minZoom:r,maxZoom:i,pitch:s=I.pitch,bearing:l=I.bearing,cooperativeGestures:a=I.cooperativeGestures,zoomPosition:u}=O();return t.name!=="maptiler"?null:g.jsxs(dn,{initialViewState:{...o,zoom:n,pitch:s,bearing:l},cooperativeGestures:a,minZoom:r,maxZoom:i,mapStyle:`https://api.maptiler.com/maps/${t.theme||ge.maptiler}/style.json?key=${t.apiKey}`,children:[g.jsx(zn,{}),u&&g.jsx(bn,{position:u}),e]})}const An=Object.freeze(Object.defineProperty({__proto__:null,default:Tn},Symbol.toStringTag,{value:"Module"})),On={"top-left":U.ControlPosition.LEFT_TOP,"top-right":U.ControlPosition.RIGHT_TOP,"bottom-left":U.ControlPosition.LEFT_BOTTOM,"bottom-right":U.ControlPosition.RIGHT_BOTTOM},$n=({isMapLoaded:e})=>{const t=U.useMap(),{markerPoints:o,setZoom:n,mapPadding:r}=O(),[i,s]=c.useState(void 0),l=c.useRef(void 0),a=c.useCallback(()=>{if(!t)return;const u=t.getZoom();typeof u<"u"&&n(u+1)},[t,n]);return c.useEffect(()=>{a();const u=t?.addListener("zoom_changed",a);return()=>{u?.remove()}},[t,a]),c.useEffect(()=>{if(!t||typeof o>"u"||o.length===0)return;const u=Ge(Fe(o));(!l.current||!u.every((f,d)=>f===l.current?.[d]))&&(l.current=u,s(u))},[t,o]),c.useEffect(()=>{if(!t||typeof i>"u")return;const[u,f,d,m]=i,p=(d-u)*.05||.001,w=(m-f)*.05||.001;t.fitBounds({south:f-w,west:u-p,north:m+w,east:d+p},r)},[e,t,i,r]),null};function Nn({children:e}){const[t,o]=c.useState(!1),{mapProvider:n,center:r,zoom:i=I.zoom,minZoom:s,maxZoom:l,pitch:a=I.pitch,bearing:u=I.bearing,cooperativeGestures:f=I.cooperativeGestures,zoomPosition:d}=O();if(n.name!=="google")return null;const m=()=>{o(!0)};return g.jsxs(U.APIProvider,{apiKey:n.apiKey,children:[g.jsx($n,{isMapLoaded:t}),g.jsx(U.Map,{mapId:n.theme||ge.google,defaultCenter:{lat:r.latitude,lng:r.longitude},defaultBounds:{north:ve[3],south:ve[1],east:ve[2],west:ve[0]},defaultZoom:i+1,defaultTilt:a,defaultHeading:u,gestureHandling:f?"cooperative":"greedy",streetViewControl:!1,fullscreenControl:!1,clickableIcons:!1,mapTypeControl:!1,zoomControlOptions:{position:d&&On[d]},minZoom:typeof s=="number"?s+1:void 0,maxZoom:typeof l=="number"?l+1:void 0,onTilesLoaded:m,children:e})]})}const In=Object.freeze(Object.defineProperty({__proto__:null,default:Nn},Symbol.toStringTag,{value:"Module"})),Ot=z.createContext(null);function $t(){const e=c.useContext(Ot)?.maps,t=c.useContext(re);return c.useMemo(()=>({...e,current:t?.map}),[e,t])}function Fn(e){return{longitude:e.center.lng,latitude:e.center.lat,zoom:e._seaLevelZoom??e.zoom,pitch:e.pitch,bearing:e.bearing,padding:e.padding,elevation:e._centerAltitude}}function jn(e){return Number.isFinite(e.longitude)||Number.isFinite(e.latitude)||Number.isFinite(e.zoom)||Number.isFinite(e.pitch)||Number.isFinite(e.bearing)}function Un(e,t){return!!(Number.isFinite(t.longitude)&&e.center.lng!==t.longitude||Number.isFinite(t.latitude)&&e.center.lat!==t.latitude||Number.isFinite(t.bearing)&&e.bearing!==t.bearing||Number.isFinite(t.pitch)&&e.pitch!==t.pitch||Number.isFinite(t.zoom)&&(e._seaLevelZoom??e.zoom)!==t.zoom||t.padding&&!e.isPaddingEqual(t.padding))}function Nt(){}function Bn(e,t){const o=e._constrain,n=e._calcMatrices;if(e._constrain=Nt,e._calcMatrices=Nt,Number.isFinite(t.bearing)&&(e.bearing=t.bearing),Number.isFinite(t.pitch)&&(e.pitch=t.pitch),t.padding&&!e.isPaddingEqual(t.padding)&&(e.padding=t.padding),Number.isFinite(t.longitude)||Number.isFinite(t.latitude)){const r=e.center;e._center=new r.constructor(t.longitude??r.lng,t.latitude??r.lat)}if(Number.isFinite(t.zoom))if(e._centerAltitude=t.elevation??0,e.elevation){e._seaLevelZoom=t.zoom;const r=e.pixelsPerMeter/e.worldSize*e._centerAltitude,i=e._mercatorZfromZoom(t.zoom),s=e._mercatorZfromZoom(e._maxZoom),l=Math.max(i-r,s);e._setZoom(e._zoomFromMercatorZ(l))}else e._seaLevelZoom=null,e.zoom=t.zoom;e._constrain=o,e._calcMatrices=n,e._unmodified||(e._constrain(),e._calcMatrices())}const Zn=new Set(["_calcMatrices","_calcFogMatrices","_updateCameraState","_updateSeaLevelZoom"]);function Dn(e){let t=!1,o={};const n=e;let r=null;const i={get(s,l){return l==="$reactViewState"?o:l==="$proposedTransform"?r:l==="$internalUpdate"?t:l==="_setZoom"?a=>{t&&r?.[l](a),Number.isFinite(o.zoom)||n[l](a)}:(t&&l==="_translateCameraConstrained"&&jn(o)&&(r=r||n.clone()),Zn.has(l)?function(...a){r?.[l](...a),n[l](...a)}:t&&r?r[l]:n[l])},set(s,l,a){if(l==="$reactViewState")return o=a,Bn(n,o),!0;if(l==="$proposedTransform")return r=a,!0;if(l==="$internalUpdate")return t=a,!0;let u=a;return l==="center"||l==="_center"?(Number.isFinite(o.longitude)||Number.isFinite(o.latitude))&&(u=new a.constructor(o.longitude??a.lng,o.latitude??a.lat)):l==="zoom"||l==="_zoom"||l==="_seaLevelZoom"?Number.isFinite(o.zoom)&&(u=n[l]):l==="_centerAltitude"?Number.isFinite(o.elevation)&&(u=n[l]):l==="pitch"||l==="_pitch"?Number.isFinite(o.pitch)&&(u=n[l]):(l==="bearing"||l==="rotation"||l==="angle")&&Number.isFinite(o.bearing)&&(u=n[l]),t&&u!==a&&(r=r||n.clone()),t&&r&&(r[l]=a),n[l]=u,!0}};return new Proxy(e,i)}const Gn=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function It(e){if(!e)return null;if(typeof e=="string"||("toJS"in e&&(e=e.toJS()),!e.layers))return e;const t={};for(const n of e.layers)t[n.id]=n;const o=e.layers.map(n=>{let r=null;"interactive"in n&&(r=Object.assign({},n),delete r.interactive);const i=t[n.ref];if(i){r=r||Object.assign({},n),delete r.ref;for(const s of Gn)s in i&&(r[s]=i[s])}return r||n});return{...e,layers:o}}function Vn(e,t){const o=Array.isArray(e)?e[0]:e?e.x:0,n=Array.isArray(e)?e[1]:e?e.y:0,r=Array.isArray(t)?t[0]:t?t.x:0,i=Array.isArray(t)?t[1]:t?t.y:0;return o===r&&n===i}function Z(e,t){if(e===t)return!0;if(!e||!t)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(!Z(e[o],t[o]))return!1;return!0}else if(Array.isArray(t))return!1;if(typeof e=="object"&&typeof t=="object"){const o=Object.keys(e),n=Object.keys(t);if(o.length!==n.length)return!1;for(const r of o)if(!t.hasOwnProperty(r)||!Z(e[r],t[r]))return!1;return!0}return!1}const Ft={version:8,sources:{},layers:[]},jt={mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",click:"onClick",dblclick:"onDblClick",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mouseout:"onMouseOut",contextmenu:"onContextMenu",touchstart:"onTouchStart",touchend:"onTouchEnd",touchmove:"onTouchMove",touchcancel:"onTouchCancel"},Ut={movestart:"onMoveStart",move:"onMove",moveend:"onMoveEnd",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",zoomstart:"onZoomStart",zoom:"onZoom",zoomend:"onZoomEnd",rotatestart:"onRotateStart",rotate:"onRotate",rotateend:"onRotateEnd",pitchstart:"onPitchStart",pitch:"onPitch",pitchend:"onPitchEnd"},Bt={wheel:"onWheel",boxzoomstart:"onBoxZoomStart",boxzoomend:"onBoxZoomEnd",boxzoomcancel:"onBoxZoomCancel",resize:"onResize",load:"onLoad",render:"onRender",idle:"onIdle",remove:"onRemove",data:"onData",styledata:"onStyleData",sourcedata:"onSourceData",error:"onError"},Wn=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],Hn=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class ue{constructor(t,o,n){this._map=null,this._internalUpdate=!1,this._inRender=!1,this._hoveredFeatures=null,this._deferredEvents={move:!1,zoom:!1,pitch:!1,rotate:!1},this._onEvent=r=>{const i=this.props[Bt[r.type]];i?i(r):r.type==="error"&&console.error(r.error)},this._onPointerEvent=r=>{(r.type==="mousemove"||r.type==="mouseout")&&this._updateHover(r);const i=this.props[jt[r.type]];i&&(this.props.interactiveLayerIds&&r.type!=="mouseover"&&r.type!=="mouseout"&&(r.features=this._hoveredFeatures||this._queryRenderedFeatures(r.point)),i(r),delete r.features)},this._onCameraEvent=r=>{if(!this._internalUpdate){const i=this.props[Ut[r.type]],s=this._proxyTransform;i&&(r.viewState=Fn(s.$proposedTransform??s),i(r)),r.type==="moveend"&&(s.$proposedTransform=null)}r.type in this._deferredEvents&&(this._deferredEvents[r.type]=!1)},this._MapClass=t,this.props=o,this._initialize(n)}get map(){return this._map}get transform(){return this._map.transform}setProps(t){const o=this.props;this.props=t;const n=this._updateSettings(t,o);n&&this._createProxyTransform(this._map);const r=this._updateSize(t),i=this._updateViewState(t,!0);this._updateStyle(t,o),this._updateStyleComponents(t,o),this._updateHandlers(t,o),(n||r||i&&!this._map.isMoving())&&this.redraw()}static reuse(t,o){const n=ue.savedMaps.pop();if(!n)return null;const r=n.map,i=r.getContainer();for(o.className=i.className;i.childNodes.length>0;)o.appendChild(i.childNodes[0]);r._container=o,n.setProps({...t,styleDiffing:!1}),r.resize();const{initialViewState:s}=t;return s&&(s.bounds?r.fitBounds(s.bounds,{...s.fitBoundsOptions,duration:0}):n._updateViewState(s,!1)),r.isStyleLoaded()?r.fire("load"):r.once("styledata",()=>r.fire("load")),r._update(),n}_initialize(t){const{props:o}=this,{mapStyle:n=Ft}=o,r={...o,...o.initialViewState,accessToken:o.mapboxAccessToken||qn()||null,container:t,style:It(n)},i=r.initialViewState||r.viewState||r;if(Object.assign(r,{center:[i.longitude||0,i.latitude||0],zoom:i.zoom||0,pitch:i.pitch||0,bearing:i.bearing||0}),o.gl){const d=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=d,o.gl)}const s=new this._MapClass(r);i.padding&&s.setPadding(i.padding),o.cursor&&(s.getCanvas().style.cursor=o.cursor),this._createProxyTransform(s);const l=s._render;s._render=d=>{this._inRender=!0,l.call(s,d),this._inRender=!1};const a=s._renderTaskQueue.run;s._renderTaskQueue.run=d=>{this._proxyTransform.$internalUpdate=!0,a.call(s._renderTaskQueue,d),this._proxyTransform.$internalUpdate=!1,this._fireDefferedEvents()};const u=s.jumpTo;s.jumpTo=(...d)=>(this._proxyTransform.$internalUpdate=!0,u.apply(s,d),this._proxyTransform.$internalUpdate=!1,s);const f=s.fire;s.fire=this._fireEvent.bind(this,f),s.on("styledata",()=>{this._updateStyleComponents(this.props,{})}),s.on("sourcedata",()=>{this._updateStyleComponents(this.props,{})});for(const d in jt)s.on(d,this._onPointerEvent);for(const d in Ut)s.on(d,this._onCameraEvent);for(const d in Bt)s.on(d,this._onEvent);this._map=s}recycle(){this.map.getContainer().querySelector("[mapboxgl-children]")?.remove(),ue.savedMaps.push(this)}destroy(){this._map.remove()}redraw(){const t=this._map;!this._inRender&&t.style&&(t._frame&&(t._frame.cancel(),t._frame=null),t._render())}_createProxyTransform(t){const o=Dn(t.transform);t.transform=o,t.painter.transform=o,this._proxyTransform=o}_updateSize(t){const{viewState:o}=t;if(o){const n=this._map;if(o.width!==n.transform.width||o.height!==n.transform.height)return n.resize(),!0}return!1}_updateViewState(t,o){const n=t.viewState||t,r=this._proxyTransform,{zoom:i,pitch:s,bearing:l}=r,a=Un(this._proxyTransform,n);if(r.$reactViewState=n,a&&o){const u=this._deferredEvents;u.move=!0,u.zoom||(u.zoom=i!==r.zoom),u.rotate||(u.rotate=l!==r.bearing),u.pitch||(u.pitch=s!==r.pitch)}return a}_updateSettings(t,o){const n=this._map;let r=!1;for(const i of Wn)i in t&&!Z(t[i],o[i])&&(r=!0,n[`set${i[0].toUpperCase()}${i.slice(1)}`]?.call(n,t[i]));return r}_updateStyle(t,o){if(t.cursor!==o.cursor&&(this._map.getCanvas().style.cursor=t.cursor||""),t.mapStyle!==o.mapStyle){const{mapStyle:n=Ft,styleDiffing:r=!0}=t,i={diff:r};return"localIdeographFontFamily"in t&&(i.localIdeographFontFamily=t.localIdeographFontFamily),this._map.setStyle(It(n),i),!0}return!1}_updateStyleComponents(t,o){const n=this._map;let r=!1;return n.isStyleLoaded()&&("light"in t&&n.setLight&&!Z(t.light,o.light)&&(r=!0,n.setLight(t.light)),"fog"in t&&n.setFog&&!Z(t.fog,o.fog)&&(r=!0,n.setFog(t.fog)),"terrain"in t&&n.setTerrain&&!Z(t.terrain,o.terrain)&&(!t.terrain||n.getSource(t.terrain.source))&&(r=!0,n.setTerrain(t.terrain))),r}_updateHandlers(t,o){const n=this._map;let r=!1;for(const i of Hn){const s=t[i]??!0,l=o[i]??!0;Z(s,l)||(r=!0,s?n[i].enable(s):n[i].disable())}return r}_queryRenderedFeatures(t){const o=this._map,{interactiveLayerIds:n=[]}=this.props;try{return o.queryRenderedFeatures(t,{layers:n.filter(o.getLayer.bind(o))})}catch{return[]}}_updateHover(t){const{props:o}=this;if(o.interactiveLayerIds&&(o.onMouseMove||o.onMouseEnter||o.onMouseLeave)){const r=t.type,i=this._hoveredFeatures?.length>0,s=this._queryRenderedFeatures(t.point),l=s.length>0;!l&&i&&(t.type="mouseleave",this._onPointerEvent(t)),this._hoveredFeatures=s,l&&!i&&(t.type="mouseenter",this._onPointerEvent(t)),t.type=r}else this._hoveredFeatures=null}_fireEvent(t,o,n){const r=this._map,i=this._proxyTransform,s=i.$internalUpdate;try{i.$internalUpdate=!1,t.call(r,o,n)}finally{i.$internalUpdate=s}return r}_fireDefferedEvents(){const t=this._map;this._internalUpdate=!0;for(const o in this._deferredEvents)this._deferredEvents[o]&&t.fire(o);this._internalUpdate=!1}}ue.savedMaps=[];function qn(){let e=null;if(typeof location<"u"){const t=/access_token=([^&\/]*)/.exec(location.search);e=t&&t[1]}try{e=e||process.env.MapboxAccessToken}catch{}try{e=e||process.env.REACT_APP_MAPBOX_ACCESS_TOKEN}catch{}return e}const Kn=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"];function Jn(e){if(!e)return null;const t=e.map,o={getMap:()=>t,getCenter:()=>e.transform.center,getZoom:()=>e.transform.zoom,getBearing:()=>e.transform.bearing,getPitch:()=>e.transform.pitch,getPadding:()=>e.transform.padding,getBounds:()=>e.transform.getBounds(),project:n=>{const r=t.transform;t.transform=e.transform;const i=t.project(n);return t.transform=r,i},unproject:n=>{const r=t.transform;t.transform=e.transform;const i=t.unproject(n);return t.transform=r,i},queryTerrainElevation:(n,r)=>{const i=t.transform;t.transform=e.transform;const s=t.queryTerrainElevation(n,r);return t.transform=i,s},queryRenderedFeatures:(n,r)=>{const i=t.transform;t.transform=e.transform;const s=t.queryRenderedFeatures(n,r);return t.transform=i,s}};for(const n of Yn(t))!(n in o)&&!Kn.includes(n)&&(o[n]=t[n].bind(t));return o}function Yn(e){const t=new Set;let o=e;for(;o;){for(const n of Object.getOwnPropertyNames(o))n[0]!=="_"&&typeof e[n]=="function"&&n!=="fire"&&n!=="setEventedParent"&&t.add(n);o=Object.getPrototypeOf(o)}return Array.from(t)}const Qn=typeof document<"u"?c.useLayoutEffect:c.useEffect,Xn=["baseApiUrl","maxParallelImageRequests","workerClass","workerCount","workerUrl"];function Rn(e,t){for(const n of Xn)n in t&&(e[n]=t[n]);const{RTLTextPlugin:o="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.js"}=t;o&&e.getRTLTextPluginStatus&&e.getRTLTextPluginStatus()==="unavailable"&&e.setRTLTextPlugin(o,n=>{n&&console.error(n)},!0)}const re=z.createContext(null);function er(e,t){const o=c.useContext(Ot),[n,r]=c.useState(null),i=c.useRef(),{current:s}=c.useRef({mapLib:null,map:null});c.useEffect(()=>{const u=e.mapLib;let f=!0,d;return Promise.resolve(u||import("mapbox-gl")).then(m=>{if(!f)return;if(!m)throw new Error("Invalid mapLib");const p="Map"in m?m:m.default;if(!p.Map)throw new Error("Invalid mapLib");Rn(p,e),e.reuseMaps&&(d=ue.reuse(e,i.current)),d||(d=new ue(p.Map,e,i.current)),s.map=Jn(d),s.mapLib=p,r(d),o?.onMapMount(s.map,e.id)}).catch(m=>{const{onError:p}=e;p?p({type:"error",target:null,error:m}):console.error(m)}),()=>{f=!1,d&&(o?.onMapUnmount(e.id),e.reuseMaps?d.recycle():d.destroy())}},[]),Qn(()=>{n&&n.setProps(e)}),c.useImperativeHandle(t,()=>s.map,[n]);const l=c.useMemo(()=>({position:"relative",width:"100%",height:"100%",...e.style}),[e.style]),a={height:"100%"};return z.createElement("div",{id:e.id,ref:i,style:l},n&&z.createElement(re.Provider,{value:s},z.createElement("div",{"mapboxgl-children":"",style:a},e.children)))}const tr=z.forwardRef(er),or=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function ie(e,t){if(!e||!t)return;const o=e.style;for(const n in t){const r=t[n];Number.isFinite(r)&&!or.test(n)?o[n]=`${r}px`:o[n]=r}}function Zt(e,t){if(e===t)return null;const o=Dt(e),n=Dt(t),r=[];for(const i of n)o.has(i)||r.push(i);for(const i of o)n.has(i)||r.push(i);return r.length===0?null:r}function Dt(e){return new Set(e?e.trim().split(/\s+/):[])}const Gt=c.memo(c.forwardRef((e,t)=>{const{map:o,mapLib:n}=c.useContext(re),r=c.useRef({props:e}),i=c.useMemo(()=>{let v=!1;z.Children.forEach(e.children,k=>{k&&(v=!0)});const L={...e,element:v?document.createElement("div"):null},_=new n.Marker(L);return _.setLngLat([e.longitude,e.latitude]),_.getElement().addEventListener("click",k=>{r.current.props.onClick?.({type:"click",target:_,originalEvent:k})}),_.on("dragstart",k=>{const C=k;C.lngLat=i.getLngLat(),r.current.props.onDragStart?.(C)}),_.on("drag",k=>{const C=k;C.lngLat=i.getLngLat(),r.current.props.onDrag?.(C)}),_.on("dragend",k=>{const C=k;C.lngLat=i.getLngLat(),r.current.props.onDragEnd?.(C)}),_},[]);c.useEffect(()=>(i.addTo(o.getMap()),()=>{i.remove()}),[]);const{longitude:s,latitude:l,offset:a,style:u,draggable:f=!1,popup:d=null,rotation:m=0,rotationAlignment:p="auto",pitchAlignment:w="auto"}=e;c.useEffect(()=>{ie(i.getElement(),u)},[u]),c.useImperativeHandle(t,()=>i,[]);const x=r.current.props;(i.getLngLat().lng!==s||i.getLngLat().lat!==l)&&i.setLngLat([s,l]),a&&!Vn(i.getOffset(),a)&&i.setOffset(a),i.isDraggable()!==f&&i.setDraggable(f),i.getRotation()!==m&&i.setRotation(m),i.getRotationAlignment()!==p&&i.setRotationAlignment(p),i.getPitchAlignment()!==w&&i.setPitchAlignment(w),i.getPopup()!==d&&i.setPopup(d);const h=Zt(x.className,e.className);if(h)for(const v of h)i.toggleClassName(v);return r.current.props=e,Ce.createPortal(e.children,i.getElement())})),nr=c.memo(c.forwardRef((e,t)=>{const{map:o,mapLib:n}=c.useContext(re),r=c.useMemo(()=>document.createElement("div"),[]),i=c.useRef({props:e}),s=c.useMemo(()=>{const l={...e},a=new n.Popup(l);return a.setLngLat([e.longitude,e.latitude]),a.once("open",u=>{i.current.props.onOpen?.(u)}),a},[]);if(c.useEffect(()=>{const l=a=>{i.current.props.onClose?.(a)};return s.on("close",l),s.setDOMContent(r).addTo(o.getMap()),()=>{s.off("close",l),s.isOpen()&&s.remove()}},[]),c.useEffect(()=>{ie(s.getElement(),e.style)},[e.style]),c.useImperativeHandle(t,()=>s,[]),s.isOpen()){const l=i.current.props;(s.getLngLat().lng!==e.longitude||s.getLngLat().lat!==e.latitude)&&s.setLngLat([e.longitude,e.latitude]),e.offset&&!Z(l.offset,e.offset)&&(s.options.anchor=e.anchor,s.setOffset(e.offset)),(l.anchor!==e.anchor||l.maxWidth!==e.maxWidth)&&s.setMaxWidth(e.maxWidth);const a=Zt(l.className,e.className);if(a)for(const u of a)s.toggleClassName(u);i.current.props=e}return Ce.createPortal(e.children,r)}));function xe(e,t,o,n){const r=c.useContext(re),i=c.useMemo(()=>e(r),[]);return c.useEffect(()=>{const s=t,l=null,a=typeof t=="function"?t:null,{map:u}=r;return u.hasControl(i)||(u.addControl(i,s?.position),l&&l(r)),()=>{a&&a(r),u.hasControl(i)&&u.removeControl(i)}},[]),i}function rr(e){const t=xe(({mapLib:o})=>new o.AttributionControl(e),{position:e.position});return c.useEffect(()=>{ie(t._container,e.style)},[e.style]),null}c.memo(rr);function ir(e){const t=xe(({mapLib:o})=>new o.FullscreenControl({container:e.containerId&&document.getElementById(e.containerId)}),{position:e.position});return c.useEffect(()=>{ie(t._controlContainer,e.style)},[e.style]),null}c.memo(ir);function sr(e,t){const o=c.useRef({props:e}),n=xe(({mapLib:r})=>{const i=new r.GeolocateControl(e),s=i._setupUI.bind(i);return i._setupUI=l=>{i._container.hasChildNodes()||s(l)},i.on("geolocate",l=>{o.current.props.onGeolocate?.(l)}),i.on("error",l=>{o.current.props.onError?.(l)}),i.on("outofmaxbounds",l=>{o.current.props.onOutOfMaxBounds?.(l)}),i.on("trackuserlocationstart",l=>{o.current.props.onTrackUserLocationStart?.(l)}),i.on("trackuserlocationend",l=>{o.current.props.onTrackUserLocationEnd?.(l)}),i},{position:e.position});return o.current.props=e,c.useImperativeHandle(t,()=>n,[]),c.useEffect(()=>{ie(n._container,e.style)},[e.style]),null}c.memo(c.forwardRef(sr));function ar(e){const t=xe(({mapLib:o})=>new o.NavigationControl(e),{position:e.position});return c.useEffect(()=>{ie(t._container,e.style)},[e.style]),null}const lr=c.memo(ar);function cr(e){const t=xe(({mapLib:i})=>new i.ScaleControl(e),{position:e.position}),o=c.useRef(e),n=o.current;o.current=e;const{style:r}=e;return e.maxWidth!==void 0&&e.maxWidth!==n.maxWidth&&(t.options.maxWidth=e.maxWidth),e.unit!==void 0&&e.unit!==n.unit&&t.setUnit(e.unit),c.useEffect(()=>{ie(t._container,r)},[r]),null}c.memo(cr);function Pe(e,t){if(!e)throw new Error(t)}let ur=0;function dr(e,t,o){if(e.style&&e.style._loaded){const n={...o};return delete n.id,delete n.children,e.addSource(t,n),e.getSource(t)}return null}function fr(e,t,o){Pe(t.id===o.id,"source id changed"),Pe(t.type===o.type,"source type changed");let n="",r=0;for(const s in t)s!=="children"&&s!=="id"&&!Z(o[s],t[s])&&(n=s,r++);if(!r)return;const i=t.type;i==="geojson"?e.setData(t.data):i==="image"?e.updateImage({url:t.url,coordinates:t.coordinates}):"setCoordinates"in e&&r===1&&n==="coordinates"?e.setCoordinates(t.coordinates):"setUrl"in e&&n==="url"?e.setUrl(t.url):"setTiles"in e&&n==="tiles"?e.setTiles(t.tiles):console.warn(`Unable to update <Source> prop: ${n}`)}function mr(e){const t=c.useContext(re).map.getMap(),o=c.useRef(e),[,n]=c.useState(0),r=c.useMemo(()=>e.id||`jsx-source-${ur++}`,[]);c.useEffect(()=>{if(t){const s=()=>setTimeout(()=>n(l=>l+1),0);return t.on("styledata",s),s(),()=>{if(t.off("styledata",s),t.style&&t.style._loaded&&t.getSource(r)){const l=t.getStyle()?.layers;if(l)for(const a of l)a.source===r&&t.removeLayer(a.id);t.removeSource(r)}}}},[t]);let i=t&&t.style&&t.getSource(r);return i?fr(i,e,o.current):i=dr(t,r,e),o.current=e,i&&z.Children.map(e.children,s=>s&&c.cloneElement(s,{source:r}))||null}function pr(e,t,o,n){if(Pe(o.id===n.id,"layer id changed"),Pe(o.type===n.type,"layer type changed"),o.type==="custom"||n.type==="custom")return;const{layout:r={},paint:i={},filter:s,minzoom:l,maxzoom:a,beforeId:u}=o;if(u!==n.beforeId&&e.moveLayer(t,u),r!==n.layout){const f=n.layout||{};for(const d in r)Z(r[d],f[d])||e.setLayoutProperty(t,d,r[d]);for(const d in f)r.hasOwnProperty(d)||e.setLayoutProperty(t,d,void 0)}if(i!==n.paint){const f=n.paint||{};for(const d in i)Z(i[d],f[d])||e.setPaintProperty(t,d,i[d]);for(const d in f)i.hasOwnProperty(d)||e.setPaintProperty(t,d,void 0)}Z(s,n.filter)||e.setFilter(t,s),(l!==n.minzoom||a!==n.maxzoom)&&e.setLayerZoomRange(t,l,a)}function hr(e,t,o){if(e.style&&e.style._loaded&&(!("source"in o)||e.getSource(o.source))){const n={...o,id:t};delete n.beforeId,e.addLayer(n,o.beforeId)}}let gr=0;function Vt(e){const t=c.useContext(re).map.getMap(),o=c.useRef(e),[,n]=c.useState(0),r=c.useMemo(()=>e.id||`jsx-layer-${gr++}`,[]);if(c.useEffect(()=>{if(t){const s=()=>n(l=>l+1);return t.on("styledata",s),s(),()=>{t.off("styledata",s),t.style&&t.style._loaded&&t.getLayer(r)&&t.removeLayer(r)}}},[t]),t&&t.style&&t.getLayer(r))try{pr(t,r,e,o.current)}catch(s){console.warn(s)}else hr(t,r,e);return o.current=e,null}const yr=()=>{const{current:e}=$t(),{markerPoints:t,setZoom:o,mapPadding:n}=O(),[r,i]=c.useState(void 0),s=c.useRef(void 0),l=c.useCallback(()=>{e&&o(e.getZoom())},[e,o]);return c.useEffect(()=>(l(),e?.on("zoom",l),()=>{e?.off("zoom",l)}),[e,l]),c.useEffect(()=>{if(!e||typeof t>"u"||t.length===0)return;const a=Ge(Fe(t));(!s.current||!a.every((u,f)=>u===s.current?.[f]))&&(s.current=a,i(a))},[e,t]),c.useEffect(()=>{if(!e||typeof r>"u")return;const[a,u,f,d]=r,m=(f-a)*.05||.001,p=(d-u)*.05||.001;e.fitBounds([[a-m,u-p],[f+m,d+p]],{retainPadding:!1,padding:n,maxZoom:17,duration:700})},[e,r,n]),null};function br({children:e}){const{mapProvider:t,center:o,zoom:n=I.zoom,minZoom:r,maxZoom:i,pitch:s=I.pitch,bearing:l=I.bearing,cooperativeGestures:a=I.cooperativeGestures,zoomPosition:u}=O();return t.name!=="mapbox"?null:g.jsxs(tr,{mapboxAccessToken:t.apiKey,initialViewState:{...o,zoom:n,pitch:s,bearing:l},cooperativeGestures:a,minZoom:r,maxZoom:i,mapStyle:`mapbox://styles/${t.theme||ge.mapbox}`,interactiveLayerIds:["road-label","waterway-label"],children:[g.jsx(yr,{}),u&&g.jsx(lr,{position:u}),e]})}const vr=Object.freeze(Object.defineProperty({__proto__:null,default:br},Symbol.toStringTag,{value:"Module"}));function wr(){return g.jsx("div",{children:"Invalid map provider"})}const _r=Object.freeze(Object.defineProperty({__proto__:null,default:wr},Symbol.toStringTag,{value:"Module"})),Ve="-",xr=e=>{const t=kr(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{const l=s.split(Ve);return l[0]===""&&l.length!==1&&l.shift(),Wt(l,t)||Mr(s)},getConflictingClassGroupIds:(s,l)=>{const a=o[s]||[];return l&&n[s]?[...a,...n[s]]:a}}},Wt=(e,t)=>{if(e.length===0)return t.classGroupId;const o=e[0],n=t.nextPart.get(o),r=n?Wt(e.slice(1),n):void 0;if(r)return r;if(t.validators.length===0)return;const i=e.join(Ve);return t.validators.find(({validator:s})=>s(i))?.classGroupId},Ht=/^\[(.+)\]$/,Mr=e=>{if(Ht.test(e)){const t=Ht.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},kr=e=>{const{theme:t,classGroups:o}=e,n={nextPart:new Map,validators:[]};for(const r in o)We(o[r],n,r,t);return n},We=(e,t,o,n)=>{e.forEach(r=>{if(typeof r=="string"){const i=r===""?t:qt(t,r);i.classGroupId=o;return}if(typeof r=="function"){if(Cr(r)){We(r(n),t,o,n);return}t.validators.push({validator:r,classGroupId:o});return}Object.entries(r).forEach(([i,s])=>{We(s,qt(t,i),o,n)})})},qt=(e,t)=>{let o=e;return t.split(Ve).forEach(n=>{o.nextPart.has(n)||o.nextPart.set(n,{nextPart:new Map,validators:[]}),o=o.nextPart.get(n)}),o},Cr=e=>e.isThemeGetter,Sr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,n=new Map;const r=(i,s)=>{o.set(i,s),t++,t>e&&(t=0,n=o,o=new Map)};return{get(i){let s=o.get(i);if(s!==void 0)return s;if((s=n.get(i))!==void 0)return r(i,s),s},set(i,s){o.has(i)?o.set(i,s):r(i,s)}}},He="!",qe=":",Er=qe.length,Lr=e=>{const{prefix:t,experimentalParseClassName:o}=e;let n=r=>{const i=[];let s=0,l=0,a=0,u;for(let w=0;w<r.length;w++){let x=r[w];if(s===0&&l===0){if(x===qe){i.push(r.slice(a,w)),a=w+Er;continue}if(x==="/"){u=w;continue}}x==="["?s++:x==="]"?s--:x==="("?l++:x===")"&&l--}const f=i.length===0?r:r.substring(a),d=Pr(f),m=d!==f,p=u&&u>a?u-a:void 0;return{modifiers:i,hasImportantModifier:m,baseClassName:d,maybePostfixModifierPosition:p}};if(t){const r=t+qe,i=n;n=s=>s.startsWith(r)?i(s.substring(r.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(o){const r=n;n=i=>o({className:i,parseClassName:r})}return n},Pr=e=>e.endsWith(He)?e.substring(0,e.length-1):e.startsWith(He)?e.substring(1):e,zr=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const r=[];let i=[];return n.forEach(s=>{s[0]==="["||t[s]?(r.push(...i.sort(),s),i=[]):i.push(s)}),r.push(...i.sort()),r}},Tr=e=>({cache:Sr(e.cacheSize),parseClassName:Lr(e),sortModifiers:zr(e),...xr(e)}),Ar=/\s+/,Or=(e,t)=>{const{parseClassName:o,getClassGroupId:n,getConflictingClassGroupIds:r,sortModifiers:i}=t,s=[],l=e.trim().split(Ar);let a="";for(let u=l.length-1;u>=0;u-=1){const f=l[u],{isExternal:d,modifiers:m,hasImportantModifier:p,baseClassName:w,maybePostfixModifierPosition:x}=o(f);if(d){a=f+(a.length>0?" "+a:a);continue}let h=!!x,v=n(h?w.substring(0,x):w);if(!v){if(!h){a=f+(a.length>0?" "+a:a);continue}if(v=n(w),!v){a=f+(a.length>0?" "+a:a);continue}h=!1}const L=i(m).join(":"),_=p?L+He:L,k=_+v;if(s.includes(k))continue;s.push(k);const C=r(v,h);for(let P=0;P<C.length;++P){const A=C[P];s.push(_+A)}a=f+(a.length>0?" "+a:a)}return a};function $r(){let e=0,t,o,n="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Kt(t))&&(n&&(n+=" "),n+=o);return n}const Kt=e=>{if(typeof e=="string")return e;let t,o="";for(let n=0;n<e.length;n++)e[n]&&(t=Kt(e[n]))&&(o&&(o+=" "),o+=t);return o};function Nr(e,...t){let o,n,r,i=s;function s(a){const u=t.reduce((f,d)=>d(f),e());return o=Tr(u),n=o.cache.get,r=o.cache.set,i=l,l(a)}function l(a){const u=n(a);if(u)return u;const f=Or(a,o);return r(a,f),f}return function(){return i($r.apply(null,arguments))}}const T=e=>{const t=o=>o[e]||[];return t.isThemeGetter=!0,t},Jt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Yt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ir=/^\d+\/\d+$/,Fr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,jr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ur=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Br=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Zr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,de=e=>Ir.test(e),E=e=>!!e&&!Number.isNaN(Number(e)),Q=e=>!!e&&Number.isInteger(Number(e)),Ke=e=>e.endsWith("%")&&E(e.slice(0,-1)),W=e=>Fr.test(e),Dr=()=>!0,Gr=e=>jr.test(e)&&!Ur.test(e),Qt=()=>!1,Vr=e=>Br.test(e),Wr=e=>Zr.test(e),Hr=e=>!y(e)&&!b(e),qr=e=>fe(e,oo,Qt),y=e=>Jt.test(e),se=e=>fe(e,no,Gr),Je=e=>fe(e,Xr,E),Xt=e=>fe(e,eo,Qt),Kr=e=>fe(e,to,Wr),ze=e=>fe(e,ro,Vr),b=e=>Yt.test(e),Me=e=>me(e,no),Jr=e=>me(e,Rr),Rt=e=>me(e,eo),Yr=e=>me(e,oo),Qr=e=>me(e,to),Te=e=>me(e,ro,!0),fe=(e,t,o)=>{const n=Jt.exec(e);return n?n[1]?t(n[1]):o(n[2]):!1},me=(e,t,o=!1)=>{const n=Yt.exec(e);return n?n[1]?t(n[1]):o:!1},eo=e=>e==="position"||e==="percentage",to=e=>e==="image"||e==="url",oo=e=>e==="length"||e==="size"||e==="bg-size",no=e=>e==="length",Xr=e=>e==="number",Rr=e=>e==="family-name",ro=e=>e==="shadow",Ye=Nr(()=>{const e=T("color"),t=T("font"),o=T("text"),n=T("font-weight"),r=T("tracking"),i=T("leading"),s=T("breakpoint"),l=T("container"),a=T("spacing"),u=T("radius"),f=T("shadow"),d=T("inset-shadow"),m=T("text-shadow"),p=T("drop-shadow"),w=T("blur"),x=T("perspective"),h=T("aspect"),v=T("ease"),L=T("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...k(),b,y],P=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],M=()=>[b,y,a],$=()=>[de,"full","auto",...M()],X=()=>[Q,"none","subgrid",b,y],R=()=>["auto",{span:["full",Q,b,y]},Q,b,y],G=()=>[Q,"auto",b,y],H=()=>["auto","min","max","fr",b,y],q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],he=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...M()],ae=()=>[de,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],S=()=>[e,b,y],mo=()=>[...k(),Rt,Xt,{position:[b,y]}],po=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ho=()=>["auto","cover","contain",Yr,qr,{size:[b,y]}],rt=()=>[Ke,Me,se],F=()=>["","none","full",u,b,y],B=()=>["",E,Me,se],Oe=()=>["solid","dashed","dotted","double"],go=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>[E,Ke,Rt,Xt],yo=()=>["","none",w,b,y],$e=()=>["none",E,b,y],Ne=()=>["none",E,b,y],it=()=>[E,b,y],Ie=()=>[de,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[W],breakpoint:[W],color:[Dr],container:[W],"drop-shadow":[W],ease:["in","out","in-out"],font:[Hr],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[W],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[W],shadow:[W],spacing:["px",E],text:[W],"text-shadow":[W],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",de,y,b,h]}],container:["container"],columns:[{columns:[E,y,b,l]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{start:$()}],end:[{end:$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[Q,"auto",b,y]}],basis:[{basis:[de,"full","auto",l,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[E,de,"auto","initial","none",y]}],grow:[{grow:["",E,b,y]}],shrink:[{shrink:["",E,b,y]}],order:[{order:[Q,"first","last","none",b,y]}],"grid-cols":[{"grid-cols":X()}],"col-start-end":[{col:R()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":X()}],"row-start-end":[{row:R()}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...q(),"normal"]}],"justify-items":[{"justify-items":[...he(),"normal"]}],"justify-self":[{"justify-self":["auto",...he()]}],"align-content":[{content:["normal",...q()]}],"align-items":[{items:[...he(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...he(),{baseline:["","last"]}]}],"place-content":[{"place-content":q()}],"place-items":[{"place-items":[...he(),"baseline"]}],"place-self":[{"place-self":["auto",...he()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:ae()}],w:[{w:[l,"screen",...ae()]}],"min-w":[{"min-w":[l,"screen","none",...ae()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[s]},...ae()]}],h:[{h:["screen","lh",...ae()]}],"min-h":[{"min-h":["screen","lh","none",...ae()]}],"max-h":[{"max-h":["screen","lh",...ae()]}],"font-size":[{text:["base",o,Me,se]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,b,Je]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ke,y]}],"font-family":[{font:[Jr,y,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,b,y]}],"line-clamp":[{"line-clamp":[E,"none",b,Je]}],leading:[{leading:[i,...M()]}],"list-image":[{"list-image":["none",b,y]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",b,y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:S()}],"text-color":[{text:S()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[E,"from-font","auto",b,se]}],"text-decoration-color":[{decoration:S()}],"underline-offset":[{"underline-offset":[E,"auto",b,y]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",b,y]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",b,y]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:mo()}],"bg-repeat":[{bg:po()}],"bg-size":[{bg:ho()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Q,b,y],radial:["",b,y],conic:[Q,b,y]},Qr,Kr]}],"bg-color":[{bg:S()}],"gradient-from-pos":[{from:rt()}],"gradient-via-pos":[{via:rt()}],"gradient-to-pos":[{to:rt()}],"gradient-from":[{from:S()}],"gradient-via":[{via:S()}],"gradient-to":[{to:S()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":B()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Oe(),"hidden","none"]}],"divide-style":[{divide:[...Oe(),"hidden","none"]}],"border-color":[{border:S()}],"border-color-x":[{"border-x":S()}],"border-color-y":[{"border-y":S()}],"border-color-s":[{"border-s":S()}],"border-color-e":[{"border-e":S()}],"border-color-t":[{"border-t":S()}],"border-color-r":[{"border-r":S()}],"border-color-b":[{"border-b":S()}],"border-color-l":[{"border-l":S()}],"divide-color":[{divide:S()}],"outline-style":[{outline:[...Oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[E,b,y]}],"outline-w":[{outline:["",E,Me,se]}],"outline-color":[{outline:S()}],shadow:[{shadow:["","none",f,Te,ze]}],"shadow-color":[{shadow:S()}],"inset-shadow":[{"inset-shadow":["none",d,Te,ze]}],"inset-shadow-color":[{"inset-shadow":S()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:S()}],"ring-offset-w":[{"ring-offset":[E,se]}],"ring-offset-color":[{"ring-offset":S()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":S()}],"text-shadow":[{"text-shadow":["none",m,Te,ze]}],"text-shadow-color":[{"text-shadow":S()}],opacity:[{opacity:[E,b,y]}],"mix-blend":[{"mix-blend":[...go(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":go()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[E]}],"mask-image-linear-from-pos":[{"mask-linear-from":N()}],"mask-image-linear-to-pos":[{"mask-linear-to":N()}],"mask-image-linear-from-color":[{"mask-linear-from":S()}],"mask-image-linear-to-color":[{"mask-linear-to":S()}],"mask-image-t-from-pos":[{"mask-t-from":N()}],"mask-image-t-to-pos":[{"mask-t-to":N()}],"mask-image-t-from-color":[{"mask-t-from":S()}],"mask-image-t-to-color":[{"mask-t-to":S()}],"mask-image-r-from-pos":[{"mask-r-from":N()}],"mask-image-r-to-pos":[{"mask-r-to":N()}],"mask-image-r-from-color":[{"mask-r-from":S()}],"mask-image-r-to-color":[{"mask-r-to":S()}],"mask-image-b-from-pos":[{"mask-b-from":N()}],"mask-image-b-to-pos":[{"mask-b-to":N()}],"mask-image-b-from-color":[{"mask-b-from":S()}],"mask-image-b-to-color":[{"mask-b-to":S()}],"mask-image-l-from-pos":[{"mask-l-from":N()}],"mask-image-l-to-pos":[{"mask-l-to":N()}],"mask-image-l-from-color":[{"mask-l-from":S()}],"mask-image-l-to-color":[{"mask-l-to":S()}],"mask-image-x-from-pos":[{"mask-x-from":N()}],"mask-image-x-to-pos":[{"mask-x-to":N()}],"mask-image-x-from-color":[{"mask-x-from":S()}],"mask-image-x-to-color":[{"mask-x-to":S()}],"mask-image-y-from-pos":[{"mask-y-from":N()}],"mask-image-y-to-pos":[{"mask-y-to":N()}],"mask-image-y-from-color":[{"mask-y-from":S()}],"mask-image-y-to-color":[{"mask-y-to":S()}],"mask-image-radial":[{"mask-radial":[b,y]}],"mask-image-radial-from-pos":[{"mask-radial-from":N()}],"mask-image-radial-to-pos":[{"mask-radial-to":N()}],"mask-image-radial-from-color":[{"mask-radial-from":S()}],"mask-image-radial-to-color":[{"mask-radial-to":S()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[E]}],"mask-image-conic-from-pos":[{"mask-conic-from":N()}],"mask-image-conic-to-pos":[{"mask-conic-to":N()}],"mask-image-conic-from-color":[{"mask-conic-from":S()}],"mask-image-conic-to-color":[{"mask-conic-to":S()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:mo()}],"mask-repeat":[{mask:po()}],"mask-size":[{mask:ho()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",b,y]}],filter:[{filter:["","none",b,y]}],blur:[{blur:yo()}],brightness:[{brightness:[E,b,y]}],contrast:[{contrast:[E,b,y]}],"drop-shadow":[{"drop-shadow":["","none",p,Te,ze]}],"drop-shadow-color":[{"drop-shadow":S()}],grayscale:[{grayscale:["",E,b,y]}],"hue-rotate":[{"hue-rotate":[E,b,y]}],invert:[{invert:["",E,b,y]}],saturate:[{saturate:[E,b,y]}],sepia:[{sepia:["",E,b,y]}],"backdrop-filter":[{"backdrop-filter":["","none",b,y]}],"backdrop-blur":[{"backdrop-blur":yo()}],"backdrop-brightness":[{"backdrop-brightness":[E,b,y]}],"backdrop-contrast":[{"backdrop-contrast":[E,b,y]}],"backdrop-grayscale":[{"backdrop-grayscale":["",E,b,y]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[E,b,y]}],"backdrop-invert":[{"backdrop-invert":["",E,b,y]}],"backdrop-opacity":[{"backdrop-opacity":[E,b,y]}],"backdrop-saturate":[{"backdrop-saturate":[E,b,y]}],"backdrop-sepia":[{"backdrop-sepia":["",E,b,y]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",b,y]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[E,"initial",b,y]}],ease:[{ease:["linear","initial",v,b,y]}],delay:[{delay:[E,b,y]}],animate:[{animate:["none",L,b,y]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,b,y]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:$e()}],"rotate-x":[{"rotate-x":$e()}],"rotate-y":[{"rotate-y":$e()}],"rotate-z":[{"rotate-z":$e()}],scale:[{scale:Ne()}],"scale-x":[{"scale-x":Ne()}],"scale-y":[{"scale-y":Ne()}],"scale-z":[{"scale-z":Ne()}],"scale-3d":["scale-3d"],skew:[{skew:it()}],"skew-x":[{"skew-x":it()}],"skew-y":[{"skew-y":it()}],transform:[{transform:[b,y,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ie()}],"translate-x":[{"translate-x":Ie()}],"translate-y":[{"translate-y":Ie()}],"translate-z":[{"translate-z":Ie()}],"translate-none":["translate-none"],accent:[{accent:S()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:S()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",b,y]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",b,y]}],fill:[{fill:["none",...S()]}],"stroke-w":[{stroke:[E,Me,se,Je]}],stroke:[{stroke:["none",...S()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),Qe=e=>z.createElement("svg",{width:34,height:41,viewBox:"0 0 34 41",fill:"inherit",xmlns:"http://www.w3.org/2000/svg",...e},z.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17 0C26.3888 0 34 7.61116 34 17C34 24.1987 29.5256 30.3524 23.2061 32.8316L17.9683 39.991C17.8591 40.1409 17.7141 40.2632 17.5456 40.3476C17.377 40.4321 17.1899 40.4762 17 40.4762C16.8101 40.4762 16.623 40.4321 16.4544 40.3476C16.2859 40.2632 16.1409 40.1409 16.0317 39.991L10.7939 32.8316C4.47445 30.3524 0 24.1987 0 17C0 7.61116 7.61116 0 17 0Z",fill:"currentColor"})),Xe=`
1
+ (function(D,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("react/jsx-runtime"),require("react"),require("@vis.gl/react-google-maps"),require("@phosphor-icons/react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","@vis.gl/react-google-maps","@phosphor-icons/react","react-dom"],h):(D=typeof globalThis<"u"?globalThis:D||self,h(D.LocalLogicMaps={},D.jsxRuntime,D.React,D.ReactGoogleMaps,D.PhosphorIcons,D.ReactDOM))})(this,function(D,h,c,U,Me,ke){"use strict";function bo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const z=bo(c),st=c.createContext({}),O=()=>c.useContext(st),F={zoom:14,pitch:0,bearing:0,cooperativeGestures:!1},he={maptiler:"600d69cb-288d-445e-9839-3dfe4d76b31a",mapbox:"locallogic/cmb9nz9kb011501ru8drq8fqf",google:"a7ff20eb973126bb"},ye={top:10,bottom:10,left:10,right:10},at=10,vo=22,be=10,wo=30,xo=60,le=15,ve=[-180,-85.0511,180,85.0511],Co="w-full h-full relative overflow-hidden",_o=c.lazy(()=>Promise.resolve().then(()=>On)),Mo=c.lazy(()=>Promise.resolve().then(()=>In)),ko=c.lazy(()=>Promise.resolve().then(()=>xr)),So=c.lazy(()=>Promise.resolve().then(()=>_r)),Eo=({children:e})=>{const{mapProvider:t,center:o,zoom:n=F.zoom,pitch:r=F.pitch,bearing:i=F.bearing,cooperativeGestures:s=F.cooperativeGestures,zoomPosition:l}=O(),[a]=c.useState(n),u=c.useMemo(()=>{switch(t?.name){case"maptiler":return _o;case"google":return Mo;case"mapbox":return ko;default:return So}},[t]);return h.jsx("div",{className:Co,"data-testid":"base-map","data-map-provider-name":t?.name,"data-map-provider-theme":t?.theme||he[t?.name]||he.maptiler,"data-initial-zoom":a,"data-pitch":r,"data-bearing":i,"data-cooperative-gestures":s,"data-zoom-position":l,"data-center-latitude":o.latitude,"data-center-longitude":o.longitude,children:h.jsx(u,{children:e})})},Lo=c.lazy(()=>Promise.resolve().then(()=>ni)),Po=c.lazy(()=>Promise.resolve().then(()=>ii)),zo=c.lazy(()=>Promise.resolve().then(()=>ai));function To(e){const{mapProvider:t}=O(),o=c.useMemo(()=>{switch(t?.name){case"maptiler":return Lo;case"google":return Po;case"mapbox":return zo;default:return null}},[t]);return o?h.jsx(o,{...e}):null}function lt(e,t,o={}){const n={type:"Feature"};return(o.id===0||o.id)&&(n.id=o.id),o.bbox&&(n.bbox=o.bbox),n.properties=t||{},n.geometry=e,n}function Ao(e,t,o={}){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!ct(e[0])||!ct(e[1]))throw new Error("coordinates must contain numbers");return lt({type:"Point",coordinates:e},t,o)}function Ie(e,t,o={}){return lt({type:"MultiPoint",coordinates:e},t,o)}function ct(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}const ut=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Ze=1,we=8;class Ue{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[o,n]=new Uint8Array(t,0,2);if(o!==219)throw new Error("Data does not appear to be in a KDBush format.");const r=n>>4;if(r!==Ze)throw new Error(`Got v${r} data when expected v${Ze}.`);const i=ut[n&15];if(!i)throw new Error("Unrecognized array type.");const[s]=new Uint16Array(t,2,1),[l]=new Uint32Array(t,4,1);return new Ue(l,s,i,t)}constructor(t,o=64,n=Float64Array,r){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+o,2),65535),this.ArrayType=n,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const i=ut.indexOf(this.ArrayType),s=t*2*this.ArrayType.BYTES_PER_ELEMENT,l=t*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-l%8)%8;if(i<0)throw new Error(`Unexpected typed array class: ${n}.`);r&&r instanceof ArrayBuffer?(this.data=r,this.ids=new this.IndexArrayType(this.data,we,t),this.coords=new this.ArrayType(this.data,we+l+a,t*2),this._pos=t*2,this._finished=!0):(this.data=new ArrayBuffer(we+s+l+a),this.ids=new this.IndexArrayType(this.data,we,t),this.coords=new this.ArrayType(this.data,we+l+a,t*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(Ze<<4)+i]),new Uint16Array(this.data,2,1)[0]=o,new Uint32Array(this.data,4,1)[0]=t)}add(t,o){const n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=t,this.coords[this._pos++]=o,n}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return je(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,o,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:s,nodeSize:l}=this,a=[0,i.length-1,0],u=[];for(;a.length;){const f=a.pop()||0,d=a.pop()||0,m=a.pop()||0;if(d-m<=l){for(let g=m;g<=d;g++){const y=s[2*g],L=s[2*g+1];y>=t&&y<=n&&L>=o&&L<=r&&u.push(i[g])}continue}const p=m+d>>1,w=s[2*p],C=s[2*p+1];w>=t&&w<=n&&C>=o&&C<=r&&u.push(i[p]),(f===0?t<=w:o<=C)&&(a.push(m),a.push(p-1),a.push(1-f)),(f===0?n>=w:r>=C)&&(a.push(p+1),a.push(d),a.push(1-f))}return u}within(t,o,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:r,coords:i,nodeSize:s}=this,l=[0,r.length-1,0],a=[],u=n*n;for(;l.length;){const f=l.pop()||0,d=l.pop()||0,m=l.pop()||0;if(d-m<=s){for(let g=m;g<=d;g++)ft(i[2*g],i[2*g+1],t,o)<=u&&a.push(r[g]);continue}const p=m+d>>1,w=i[2*p],C=i[2*p+1];ft(w,C,t,o)<=u&&a.push(r[p]),(f===0?t-n<=w:o-n<=C)&&(l.push(m),l.push(p-1),l.push(1-f)),(f===0?t+n>=w:o+n>=C)&&(l.push(p+1),l.push(d),l.push(1-f))}return a}}function je(e,t,o,n,r,i){if(r-n<=o)return;const s=n+r>>1;dt(e,t,s,n,r,i),je(e,t,o,n,s-1,1-i),je(e,t,o,s+1,r,1-i)}function dt(e,t,o,n,r,i){for(;r>n;){if(r-n>600){const u=r-n+1,f=o-n+1,d=Math.log(u),m=.5*Math.exp(2*d/3),p=.5*Math.sqrt(d*m*(u-m)/u)*(f-u/2<0?-1:1),w=Math.max(n,Math.floor(o-f*m/u+p)),C=Math.min(r,Math.floor(o+(u-f)*m/u+p));dt(e,t,o,w,C,i)}const s=t[2*o+i];let l=n,a=r;for(xe(e,t,n,o),t[2*r+i]>s&&xe(e,t,n,r);l<a;){for(xe(e,t,l,a),l++,a--;t[2*l+i]<s;)l++;for(;t[2*a+i]>s;)a--}t[2*n+i]===s?xe(e,t,n,a):(a++,xe(e,t,a,r)),a<=o&&(n=a+1),o<=a&&(r=a-1)}}function xe(e,t,o,n){Be(e,o,n),Be(t,2*o,2*n),Be(t,2*o+1,2*n+1)}function Be(e,t,o){const n=e[t];e[t]=e[o],e[o]=n}function ft(e,t,o,n){const r=e-o,i=t-n;return r*r+i*i}const Oo={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},mt=Math.fround||(e=>t=>(e[0]=+t,e[0]))(new Float32Array(1)),ee=2,J=3,De=4,Y=5,pt=6;class $o{constructor(t){this.options=Object.assign(Object.create(Oo),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:o,minZoom:n,maxZoom:r}=this.options;o&&console.time("total time");const i=`prepare ${t.length} points`;o&&console.time(i),this.points=t;const s=[];for(let a=0;a<t.length;a++){const u=t[a];if(!u.geometry)continue;const[f,d]=u.geometry.coordinates,m=mt(Se(f)),p=mt(Ee(d));s.push(m,p,1/0,a,-1,1),this.options.reduce&&s.push(0)}let l=this.trees[r+1]=this._createTree(s);o&&console.timeEnd(i);for(let a=r;a>=n;a--){const u=+Date.now();l=this.trees[a]=this._createTree(this._cluster(l,a)),o&&console.log("z%d: %d clusters in %dms",a,l.numItems,+Date.now()-u)}return o&&console.timeEnd("total time"),this}getClusters(t,o){let n=((t[0]+180)%360+360)%360-180;const r=Math.max(-90,Math.min(90,t[1]));let i=t[2]===180?180:((t[2]+180)%360+360)%360-180;const s=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)n=-180,i=180;else if(n>i){const d=this.getClusters([n,r,180,s],o),m=this.getClusters([-180,r,i,s],o);return d.concat(m)}const l=this.trees[this._limitZoom(o)],a=l.range(Se(n),Ee(s),Se(i),Ee(r)),u=l.data,f=[];for(const d of a){const m=this.stride*d;f.push(u[m+Y]>1?gt(u,m,this.clusterProps):this.points[u[m+J]])}return f}getChildren(t){const o=this._getOriginId(t),n=this._getOriginZoom(t),r="No cluster with the specified id.",i=this.trees[n];if(!i)throw new Error(r);const s=i.data;if(o*this.stride>=s.length)throw new Error(r);const l=this.options.radius/(this.options.extent*Math.pow(2,n-1)),a=s[o*this.stride],u=s[o*this.stride+1],f=i.within(a,u,l),d=[];for(const m of f){const p=m*this.stride;s[p+De]===t&&d.push(s[p+Y]>1?gt(s,p,this.clusterProps):this.points[s[p+J]])}if(d.length===0)throw new Error(r);return d}getLeaves(t,o,n){o=o||10,n=n||0;const r=[];return this._appendLeaves(r,t,o,n,0),r}getTile(t,o,n){const r=this.trees[this._limitZoom(t)],i=Math.pow(2,t),{extent:s,radius:l}=this.options,a=l/s,u=(n-a)/i,f=(n+1+a)/i,d={features:[]};return this._addTileFeatures(r.range((o-a)/i,u,(o+1+a)/i,f),r.data,o,n,i,d),o===0&&this._addTileFeatures(r.range(1-a/i,u,1,f),r.data,i,n,i,d),o===i-1&&this._addTileFeatures(r.range(0,u,a/i,f),r.data,-1,n,i,d),d.features.length?d:null}getClusterExpansionZoom(t){let o=this._getOriginZoom(t)-1;for(;o<=this.options.maxZoom;){const n=this.getChildren(t);if(o++,n.length!==1)break;t=n[0].properties.cluster_id}return o}_appendLeaves(t,o,n,r,i){const s=this.getChildren(o);for(const l of s){const a=l.properties;if(a&&a.cluster?i+a.point_count<=r?i+=a.point_count:i=this._appendLeaves(t,a.cluster_id,n,r,i):i<r?i++:t.push(l),t.length===n)break}return i}_createTree(t){const o=new Ue(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let n=0;n<t.length;n+=this.stride)o.add(t[n],t[n+1]);return o.finish(),o.data=t,o}_addTileFeatures(t,o,n,r,i,s){for(const l of t){const a=l*this.stride,u=o[a+Y]>1;let f,d,m;if(u)f=ht(o,a,this.clusterProps),d=o[a],m=o[a+1];else{const C=this.points[o[a+J]];f=C.properties;const[g,y]=C.geometry.coordinates;d=Se(g),m=Ee(y)}const p={type:1,geometry:[[Math.round(this.options.extent*(d*i-n)),Math.round(this.options.extent*(m*i-r))]],tags:f};let w;u||this.options.generateId?w=o[a+J]:w=this.points[o[a+J]].id,w!==void 0&&(p.id=w),s.features.push(p)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,o){const{radius:n,extent:r,reduce:i,minPoints:s}=this.options,l=n/(r*Math.pow(2,o)),a=t.data,u=[],f=this.stride;for(let d=0;d<a.length;d+=f){if(a[d+ee]<=o)continue;a[d+ee]=o;const m=a[d],p=a[d+1],w=t.within(a[d],a[d+1],l),C=a[d+Y];let g=C;for(const y of w){const L=y*f;a[L+ee]>o&&(g+=a[L+Y])}if(g>C&&g>=s){let y=m*C,L=p*C,x,M=-1;const k=((d/f|0)<<5)+(o+1)+this.points.length;for(const P of w){const A=P*f;if(a[A+ee]<=o)continue;a[A+ee]=o;const _=a[A+Y];y+=a[A]*_,L+=a[A+1]*_,a[A+De]=k,i&&(x||(x=this._map(a,d,!0),M=this.clusterProps.length,this.clusterProps.push(x)),i(x,this._map(a,A)))}a[d+De]=k,u.push(y/g,L/g,1/0,k,-1,g),i&&u.push(M)}else{for(let y=0;y<f;y++)u.push(a[d+y]);if(g>1)for(const y of w){const L=y*f;if(!(a[L+ee]<=o)){a[L+ee]=o;for(let x=0;x<f;x++)u.push(a[L+x])}}}}return u}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,o,n){if(t[o+Y]>1){const s=this.clusterProps[t[o+pt]];return n?Object.assign({},s):s}const r=this.points[t[o+J]].properties,i=this.options.map(r);return n&&i===r?Object.assign({},i):i}}function gt(e,t,o){return{type:"Feature",id:e[t+J],properties:ht(e,t,o),geometry:{type:"Point",coordinates:[No(e[t]),Fo(e[t+1])]}}}function ht(e,t,o){const n=e[t+Y],r=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?`${Math.round(n/100)/10}k`:n,i=e[t+pt],s=i===-1?{}:Object.assign({},o[i]);return Object.assign(s,{cluster:!0,cluster_id:e[t+J],point_count:n,point_count_abbreviated:r})}function Se(e){return e/360+.5}function Ee(e){const t=Math.sin(e*Math.PI/180),o=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return o<0?0:o>1?1:o}function No(e){return(e-.5)*360}function Fo(e){const t=(180-e*360)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}var yt=Object.prototype.hasOwnProperty;function bt(e,t,o){for(o of e.keys())if(te(o,t))return o}function te(e,t){var o,n,r;if(e===t)return!0;if(e&&t&&(o=e.constructor)===t.constructor){if(o===Date)return e.getTime()===t.getTime();if(o===RegExp)return e.toString()===t.toString();if(o===Array){if((n=e.length)===t.length)for(;n--&&te(e[n],t[n]););return n===-1}if(o===Set){if(e.size!==t.size)return!1;for(n of e)if(r=n,r&&typeof r=="object"&&(r=bt(t,r),!r)||!t.has(r))return!1;return!0}if(o===Map){if(e.size!==t.size)return!1;for(n of e)if(r=n[0],r&&typeof r=="object"&&(r=bt(t,r),!r)||!te(n[1],t.get(r)))return!1;return!0}if(o===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(o===DataView){if((n=e.byteLength)===t.byteLength)for(;n--&&e.getInt8(n)===t.getInt8(n););return n===-1}if(ArrayBuffer.isView(e)){if((n=e.byteLength)===t.byteLength)for(;n--&&e[n]===t[n];);return n===-1}if(!o||typeof e=="object"){n=0;for(o in e)if(yt.call(e,o)&&++n&&!yt.call(t,o)||!(o in t)||!te(e[o],t[o]))return!1;return Object.keys(t).length===n}}return e!==e&&t!==t}function Io(e){var t=z.useRef(e),o=z.useRef(0);return te(e,t.current)||(t.current=e,o.current+=1),z.useMemo(function(){return t.current},[o.current])}function Zo(e,t){return z.useEffect(e,Io(t))}var Uo=function(t){var o=t.points,n=t.bounds,r=t.zoom,i=t.options,s=t.disableRefresh,l=c.useRef(),a=c.useRef(),u=c.useState([]),f=u[0],d=u[1],m=Math.round(r);return Zo(function(){s!==!0&&((!l.current||!te(a.current,o)||!te(l.current.options,i))&&(l.current=new $o(i),l.current.load(o)),n&&d(l.current.getClusters(n,m)),a.current=o)},[o,n,m,i,s]),{clusters:f,supercluster:l.current}};const jo=c.lazy(()=>Promise.resolve().then(()=>ui)),Bo=c.lazy(()=>Promise.resolve().then(()=>fi)),Do=c.lazy(()=>Promise.resolve().then(()=>pi));function Go({markers:e,onClick:t,...o}){const{mapProvider:n,activeMarker:r,center:i,zoom:s,setMarkerPoints:l,setClusterPoints:a}=O();c.useEffect(()=>{let g=[[i.longitude,i.latitude]];e.length>0&&(g=g.concat(e.map(y=>[y.longitude,y.latitude]))),l(g)},[e,i]);const u=c.useMemo(()=>({points:e.map(g=>Ao([g.longitude,g.latitude],g)),bounds:ve,zoom:s,options:{radius:n.name==="google"&&s>at?xo:wo,minZoom:at,maxZoom:vo}}),[e,n,s]),{clusters:f,supercluster:d}=Uo(u),m=c.useRef("");c.useEffect(()=>{const g=JSON.stringify(f.map(y=>({coords:y.geometry.coordinates,props:y.properties})));g!==m.current&&(a(f),m.current=g)},[f,a]);const p=g=>{if(!("properties"in g))throw new Error("Cluster does not have properties");if(g.properties?.cluster&&typeof g.properties?.cluster_id=="number"){t?.({id:`${g.properties.cluster_id}`,latitude:g.geometry.coordinates[1],longitude:g.geometry.coordinates[0],markers:d?.getLeaves(g.properties.cluster_id)?.map(y=>y.properties)??[]});return}t?.({id:g.properties.id,latitude:g.properties.latitude,longitude:g.properties.longitude,markers:[g.properties]})},w=g=>{if(!d||!r)return!1;if(r.id===`${g}`)return!0;try{return d.getLeaves(g)?.find(y=>y.properties.id===r.id)!==void 0}catch{return!1}},C=c.useMemo(()=>{switch(n?.name){case"maptiler":return jo;case"google":return Bo;case"mapbox":return Do;default:return null}},[n]);return C?h.jsx(C,{clusters:f,onClick:p,doesSuperclusterContainActiveMarker:w,...o}):null}const Ho=c.lazy(()=>Promise.resolve().then(()=>hi)),Wo=c.lazy(()=>Promise.resolve().then(()=>bi)),Vo=c.lazy(()=>Promise.resolve().then(()=>wi));function qo({children:e,anchor:t="bottom",...o}){const{mapProvider:n}=O(),r=c.useMemo(()=>{switch(n?.name){case"maptiler":return Ho;case"google":return Wo;case"mapbox":return Vo;default:return null}},[n]);return r?h.jsx(r,{...o,anchor:t,children:e}):null}const Ko=c.lazy(()=>Promise.resolve().then(()=>Ci)),Jo=c.lazy(()=>Promise.resolve().then(()=>Mi)),Yo=c.lazy(()=>Promise.resolve().then(()=>Si));function Qo(e){const{mapProvider:t}=O(),o=c.useMemo(()=>{switch(t?.name){case"maptiler":return Ko;case"google":return Jo;case"mapbox":return Yo;default:return null}},[t]);return o?h.jsx(o,{...e}):null}function Xo(e){const[t,o]=c.useState([]),[n,r]=c.useState([]),[i,s]=c.useState(e.zoom||F.zoom);return h.jsx(st.Provider,{value:{...e,locale:e.locale||"en",mapPadding:e.mapPadding||ye,markerPoints:t,setMarkerPoints:o,clusterPoints:n,setClusterPoints:r,zoom:i,setZoom:s},children:e.children})}const Ro=Object.freeze(Object.defineProperty({__proto__:null,BaseMap:Eo,CenterPin:To,Layers:Qo,Markers:Go,Popup:qo,Root:Xo},Symbol.toStringTag,{value:"Module"})),vt=z.createContext(null);function wt(){const e=c.useContext(vt)?.maps,t=c.useContext(oe);return c.useMemo(()=>({...e,current:t?.map}),[e,t])}function en(e,t){const o=Array.isArray(e)?e[0]:e?e.x:0,n=Array.isArray(e)?e[1]:e?e.y:0,r=Array.isArray(t)?t[0]:t?t.x:0,i=Array.isArray(t)?t[1]:t?t.y:0;return o===r&&n===i}function Z(e,t){if(e===t)return!0;if(!e||!t)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(!Z(e[o],t[o]))return!1;return!0}else if(Array.isArray(t))return!1;if(typeof e=="object"&&typeof t=="object"){const o=Object.keys(e),n=Object.keys(t);if(o.length!==n.length)return!1;for(const r of o)if(!t.hasOwnProperty(r)||!Z(e[r],t[r]))return!1;return!0}return!1}function xt(e){return{longitude:e.center.lng,latitude:e.center.lat,zoom:e.zoom,pitch:e.pitch,bearing:e.bearing,padding:e.padding}}function Ct(e,t){const o=t.viewState||t,n={};if("longitude"in o&&"latitude"in o&&(o.longitude!==e.center.lng||o.latitude!==e.center.lat)){const r=e.center.constructor;n.center=new r(o.longitude,o.latitude)}return"zoom"in o&&o.zoom!==e.zoom&&(n.zoom=o.zoom),"bearing"in o&&o.bearing!==e.bearing&&(n.bearing=o.bearing),"pitch"in o&&o.pitch!==e.pitch&&(n.pitch=o.pitch),o.padding&&e.padding&&!Z(o.padding,e.padding)&&(n.padding=o.padding),n}const tn=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function _t(e){if(!e)return null;if(typeof e=="string"||("toJS"in e&&(e=e.toJS()),!e.layers))return e;const t={};for(const n of e.layers)t[n.id]=n;const o=e.layers.map(n=>{let r=null;"interactive"in n&&(r=Object.assign({},n),delete r.interactive);const i=t[n.ref];if(i){r=r||Object.assign({},n),delete r.ref;for(const s of tn)s in i&&(r[s]=i[s])}return r||n});return{...e,layers:o}}const Mt={version:8,sources:{},layers:[]},kt={mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",click:"onClick",dblclick:"onDblClick",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mouseout:"onMouseOut",contextmenu:"onContextMenu",touchstart:"onTouchStart",touchend:"onTouchEnd",touchmove:"onTouchMove",touchcancel:"onTouchCancel"},St={movestart:"onMoveStart",move:"onMove",moveend:"onMoveEnd",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",zoomstart:"onZoomStart",zoom:"onZoom",zoomend:"onZoomEnd",rotatestart:"onRotateStart",rotate:"onRotate",rotateend:"onRotateEnd",pitchstart:"onPitchStart",pitch:"onPitch",pitchend:"onPitchEnd"},Et={wheel:"onWheel",boxzoomstart:"onBoxZoomStart",boxzoomend:"onBoxZoomEnd",boxzoomcancel:"onBoxZoomCancel",resize:"onResize",load:"onLoad",render:"onRender",idle:"onIdle",remove:"onRemove",data:"onData",styledata:"onStyleData",sourcedata:"onSourceData",error:"onError"},on=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],nn=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class ce{constructor(t,o,n){this._map=null,this._internalUpdate=!1,this._hoveredFeatures=null,this._propsedCameraUpdate=null,this._styleComponents={},this._onEvent=r=>{const i=this.props[Et[r.type]];i?i(r):r.type==="error"&&console.error(r.error)},this._onCameraEvent=r=>{if(this._internalUpdate)return;r.viewState=this._propsedCameraUpdate||xt(this._map.transform);const i=this.props[St[r.type]];i&&i(r)},this._onCameraUpdate=r=>this._internalUpdate?r:(this._propsedCameraUpdate=xt(r),Ct(r,this.props)),this._onPointerEvent=r=>{(r.type==="mousemove"||r.type==="mouseout")&&this._updateHover(r);const i=this.props[kt[r.type]];i&&(this.props.interactiveLayerIds&&r.type!=="mouseover"&&r.type!=="mouseout"&&(r.features=this._hoveredFeatures||this._queryRenderedFeatures(r.point)),i(r),delete r.features)},this._MapClass=t,this.props=o,this._initialize(n)}get map(){return this._map}setProps(t){const o=this.props;this.props=t;const n=this._updateSettings(t,o),r=this._updateSize(t),i=this._updateViewState(t);this._updateStyle(t,o),this._updateStyleComponents(t),this._updateHandlers(t,o),(n||r||i&&!this._map.isMoving())&&this.redraw()}static reuse(t,o){const n=ce.savedMaps.pop();if(!n)return null;const r=n.map,i=r.getContainer();for(o.className=i.className;i.childNodes.length>0;)o.appendChild(i.childNodes[0]);r._container=o;const s=r._resizeObserver;s&&(s.disconnect(),s.observe(o)),n.setProps({...t,styleDiffing:!1}),r.resize();const{initialViewState:l}=t;return l&&(l.bounds?r.fitBounds(l.bounds,{...l.fitBoundsOptions,duration:0}):n._updateViewState(l)),r.isStyleLoaded()?r.fire("load"):r.once("style.load",()=>r.fire("load")),r._update(),n}_initialize(t){const{props:o}=this,{mapStyle:n=Mt}=o,r={...o,...o.initialViewState,container:t,style:_t(n)},i=r.initialViewState||r.viewState||r;if(Object.assign(r,{center:[i.longitude||0,i.latitude||0],zoom:i.zoom||0,pitch:i.pitch||0,bearing:i.bearing||0}),o.gl){const l=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=l,o.gl)}const s=new this._MapClass(r);i.padding&&s.setPadding(i.padding),o.cursor&&(s.getCanvas().style.cursor=o.cursor),s.transformCameraUpdate=this._onCameraUpdate,s.on("style.load",()=>{this._styleComponents={light:s.getLight(),sky:s.getSky(),projection:s.getProjection?.(),terrain:s.getTerrain()},this._updateStyleComponents(this.props)}),s.on("sourcedata",()=>{this._updateStyleComponents(this.props)});for(const l in kt)s.on(l,this._onPointerEvent);for(const l in St)s.on(l,this._onCameraEvent);for(const l in Et)s.on(l,this._onEvent);this._map=s}recycle(){this.map.getContainer().querySelector("[mapboxgl-children]")?.remove(),ce.savedMaps.push(this)}destroy(){this._map.remove()}redraw(){const t=this._map;t.style&&(t._frame&&(t._frame.cancel(),t._frame=null),t._render())}_updateSize(t){const{viewState:o}=t;if(o){const n=this._map;if(o.width!==n.transform.width||o.height!==n.transform.height)return n.resize(),!0}return!1}_updateViewState(t){const o=this._map,n=o.transform;if(!o.isMoving()){const i=Ct(n,t);if(Object.keys(i).length>0)return this._internalUpdate=!0,o.jumpTo(i),this._internalUpdate=!1,!0}return!1}_updateSettings(t,o){const n=this._map;let r=!1;for(const i of on)i in t&&!Z(t[i],o[i])&&(r=!0,n[`set${i[0].toUpperCase()}${i.slice(1)}`]?.call(n,t[i]));return r}_updateStyle(t,o){if(t.cursor!==o.cursor&&(this._map.getCanvas().style.cursor=t.cursor||""),t.mapStyle!==o.mapStyle){const{mapStyle:n=Mt,styleDiffing:r=!0}=t,i={diff:r};"localIdeographFontFamily"in t&&(i.localIdeographFontFamily=t.localIdeographFontFamily),this._map.setStyle(_t(n),i)}}_updateStyleComponents({light:t,projection:o,sky:n,terrain:r}){const i=this._map,s=this._styleComponents;i.style._loaded&&(t&&!Z(t,s.light)&&(s.light=t,i.setLight(t)),o&&!Z(o,s.projection)&&o!==s.projection?.type&&(s.projection=typeof o=="string"?{type:o}:o,i.setProjection?.(s.projection)),n&&!Z(n,s.sky)&&(s.sky=n,i.setSky(n)),r!==void 0&&!Z(r,s.terrain)&&(!r||i.getSource(r.source))&&(s.terrain=r,i.setTerrain(r)))}_updateHandlers(t,o){const n=this._map;for(const r of nn){const i=t[r]??!0,s=o[r]??!0;Z(i,s)||(i?n[r].enable(i):n[r].disable())}}_queryRenderedFeatures(t){const o=this._map,{interactiveLayerIds:n=[]}=this.props;try{return o.queryRenderedFeatures(t,{layers:n.filter(o.getLayer.bind(o))})}catch{return[]}}_updateHover(t){const{props:o}=this;if(o.interactiveLayerIds&&(o.onMouseMove||o.onMouseEnter||o.onMouseLeave)){const r=t.type,i=this._hoveredFeatures?.length>0,s=this._queryRenderedFeatures(t.point),l=s.length>0;!l&&i&&(t.type="mouseleave",this._onPointerEvent(t)),this._hoveredFeatures=s,l&&!i&&(t.type="mouseenter",this._onPointerEvent(t)),t.type=r}else this._hoveredFeatures=null}}ce.savedMaps=[];const rn=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"];function sn(e){if(!e)return null;const t=e.map,o={getMap:()=>t};for(const n of an(t))!(n in o)&&!rn.includes(n)&&(o[n]=t[n].bind(t));return o}function an(e){const t=new Set;let o=e;for(;o;){for(const n of Object.getOwnPropertyNames(o))n[0]!=="_"&&typeof e[n]=="function"&&n!=="fire"&&n!=="setEventedParent"&&t.add(n);o=Object.getPrototypeOf(o)}return Array.from(t)}const ln=typeof document<"u"?c.useLayoutEffect:c.useEffect;function cn(e,t){const{RTLTextPlugin:o,maxParallelImageRequests:n,workerCount:r,workerUrl:i}=t;if(o&&e.getRTLTextPluginStatus&&e.getRTLTextPluginStatus()==="unavailable"){const{pluginUrl:s,lazy:l=!0}=typeof o=="string"?{pluginUrl:o}:o;e.setRTLTextPlugin(s,a=>{a&&console.error(a)},l)}n!==void 0&&e.setMaxParallelImageRequests(n),r!==void 0&&e.setWorkerCount(r),i!==void 0&&e.setWorkerUrl(i)}const oe=z.createContext(null);function un(e,t){const o=c.useContext(vt),[n,r]=c.useState(null),i=c.useRef(),{current:s}=c.useRef({mapLib:null,map:null});c.useEffect(()=>{const u=e.mapLib;let f=!0,d;return Promise.resolve(u||import("maplibre-gl")).then(m=>{if(!f)return;if(!m)throw new Error("Invalid mapLib");const p="Map"in m?m:m.default;if(!p.Map)throw new Error("Invalid mapLib");cn(p,e),e.reuseMaps&&(d=ce.reuse(e,i.current)),d||(d=new ce(p.Map,e,i.current)),s.map=sn(d),s.mapLib=p,r(d),o?.onMapMount(s.map,e.id)}).catch(m=>{const{onError:p}=e;p?p({type:"error",target:null,originalEvent:null,error:m}):console.error(m)}),()=>{f=!1,d&&(o?.onMapUnmount(e.id),e.reuseMaps?d.recycle():d.destroy())}},[]),ln(()=>{n&&n.setProps(e)}),c.useImperativeHandle(t,()=>s.map,[n]);const l=c.useMemo(()=>({position:"relative",width:"100%",height:"100%",...e.style}),[e.style]),a={height:"100%"};return z.createElement("div",{id:e.id,ref:i,style:l},n&&z.createElement(oe.Provider,{value:s},z.createElement("div",{"mapboxgl-children":"",style:a},e.children)))}const dn=z.forwardRef(un),fn=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function H(e,t){if(!e||!t)return;const o=e.style;for(const n in t){const r=t[n];Number.isFinite(r)&&!fn.test(n)?o[n]=`${r}px`:o[n]=r}}function Lt(e,t){if(e===t)return null;const o=Pt(e),n=Pt(t),r=[];for(const i of n)o.has(i)||r.push(i);for(const i of o)n.has(i)||r.push(i);return r.length===0?null:r}function Pt(e){return new Set(e?e.trim().split(/\s+/):[])}const zt=c.memo(c.forwardRef((e,t)=>{const{map:o,mapLib:n}=c.useContext(oe),r=c.useRef({props:e}),i=c.useMemo(()=>{let y=!1;z.Children.forEach(e.children,M=>{M&&(y=!0)});const L={...e,element:y?document.createElement("div"):void 0},x=new n.Marker(L);return x.setLngLat([e.longitude,e.latitude]),x.getElement().addEventListener("click",M=>{r.current.props.onClick?.({type:"click",target:x,originalEvent:M})}),x.on("dragstart",M=>{const k=M;k.lngLat=i.getLngLat(),r.current.props.onDragStart?.(k)}),x.on("drag",M=>{const k=M;k.lngLat=i.getLngLat(),r.current.props.onDrag?.(k)}),x.on("dragend",M=>{const k=M;k.lngLat=i.getLngLat(),r.current.props.onDragEnd?.(k)}),x},[]);c.useEffect(()=>(i.addTo(o.getMap()),()=>{i.remove()}),[]);const{longitude:s,latitude:l,offset:a,style:u,draggable:f=!1,popup:d=null,rotation:m=0,rotationAlignment:p="auto",pitchAlignment:w="auto"}=e;c.useEffect(()=>{H(i.getElement(),u)},[u]),c.useImperativeHandle(t,()=>i,[]);const C=r.current.props;(i.getLngLat().lng!==s||i.getLngLat().lat!==l)&&i.setLngLat([s,l]),a&&!en(i.getOffset(),a)&&i.setOffset(a),i.isDraggable()!==f&&i.setDraggable(f),i.getRotation()!==m&&i.setRotation(m),i.getRotationAlignment()!==p&&i.setRotationAlignment(p),i.getPitchAlignment()!==w&&i.setPitchAlignment(w),i.getPopup()!==d&&i.setPopup(d);const g=Lt(C.className,e.className);if(g)for(const y of g)i.toggleClassName(y);return r.current.props=e,ke.createPortal(e.children,i.getElement())})),mn=c.memo(c.forwardRef((e,t)=>{const{map:o,mapLib:n}=c.useContext(oe),r=c.useMemo(()=>document.createElement("div"),[]),i=c.useRef({props:e}),s=c.useMemo(()=>{const l={...e},a=new n.Popup(l);return a.setLngLat([e.longitude,e.latitude]),a.once("open",u=>{i.current.props.onOpen?.(u)}),a},[]);if(c.useEffect(()=>{const l=a=>{i.current.props.onClose?.(a)};return s.on("close",l),s.setDOMContent(r).addTo(o.getMap()),()=>{s.off("close",l),s.isOpen()&&s.remove()}},[]),c.useEffect(()=>{H(s.getElement(),e.style)},[e.style]),c.useImperativeHandle(t,()=>s,[]),s.isOpen()){const l=i.current.props;(s.getLngLat().lng!==e.longitude||s.getLngLat().lat!==e.latitude)&&s.setLngLat([e.longitude,e.latitude]),e.offset&&!Z(l.offset,e.offset)&&s.setOffset(e.offset),(l.anchor!==e.anchor||l.maxWidth!==e.maxWidth)&&(s.options.anchor=e.anchor,s.setMaxWidth(e.maxWidth));const a=Lt(l.className,e.className);if(a)for(const u of a)s.toggleClassName(u);i.current.props=e}return ke.createPortal(e.children,r)}));function ne(e,t,o,n){const r=c.useContext(oe),i=c.useMemo(()=>e(r),[]);return c.useEffect(()=>{const s=t,l=null,a=typeof t=="function"?t:null,{map:u}=r;return u.hasControl(i)||(u.addControl(i,s?.position),l&&l(r)),()=>{a&&a(r),u.hasControl(i)&&u.removeControl(i)}},[]),i}function pn(e){const t=ne(({mapLib:o})=>new o.AttributionControl(e),{position:e.position});return c.useEffect(()=>{H(t._container,e.style)},[e.style]),null}c.memo(pn);function gn(e){const t=ne(({mapLib:o})=>new o.FullscreenControl({container:e.containerId&&document.getElementById(e.containerId)}),{position:e.position});return c.useEffect(()=>{H(t._controlContainer,e.style)},[e.style]),null}c.memo(gn);function hn(e,t){const o=c.useRef({props:e}),n=ne(({mapLib:r})=>{const i=new r.GeolocateControl(e),s=i._setupUI;return i._setupUI=()=>{i._container.hasChildNodes()||s()},i.on("geolocate",l=>{o.current.props.onGeolocate?.(l)}),i.on("error",l=>{o.current.props.onError?.(l)}),i.on("outofmaxbounds",l=>{o.current.props.onOutOfMaxBounds?.(l)}),i.on("trackuserlocationstart",l=>{o.current.props.onTrackUserLocationStart?.(l)}),i.on("trackuserlocationend",l=>{o.current.props.onTrackUserLocationEnd?.(l)}),i},{position:e.position});return o.current.props=e,c.useImperativeHandle(t,()=>n,[]),c.useEffect(()=>{H(n._container,e.style)},[e.style]),null}c.memo(c.forwardRef(hn));function yn(e){const t=ne(({mapLib:o})=>new o.NavigationControl(e),{position:e.position});return c.useEffect(()=>{H(t._container,e.style)},[e.style]),null}const bn=c.memo(yn);function vn(e){const t=ne(({mapLib:i})=>new i.ScaleControl(e),{position:e.position}),o=c.useRef(e),n=o.current;o.current=e;const{style:r}=e;return e.maxWidth!==void 0&&e.maxWidth!==n.maxWidth&&(t.options.maxWidth=e.maxWidth),e.unit!==void 0&&e.unit!==n.unit&&t.setUnit(e.unit),c.useEffect(()=>{H(t._container,r)},[r]),null}c.memo(vn);function wn(e){const t=ne(({mapLib:o})=>new o.TerrainControl(e),{position:e.position});return c.useEffect(()=>{H(t._container,e.style)},[e.style]),null}c.memo(wn);function xn(e){const t=ne(({mapLib:o})=>new o.LogoControl(e),{position:e.position});return c.useEffect(()=>{H(t._container,e.style)},[e.style]),null}c.memo(xn);function Le(e,t){if(!e)throw new Error(t)}let Cn=0;function _n(e,t,o){if(e.style&&e.style._loaded){const n={...o};return delete n.id,delete n.children,e.addSource(t,n),e.getSource(t)}return null}function Mn(e,t,o){Le(t.id===o.id,"source id changed"),Le(t.type===o.type,"source type changed");let n="",r=0;for(const s in t)s!=="children"&&s!=="id"&&!Z(o[s],t[s])&&(n=s,r++);if(!r)return;const i=t.type;if(i==="geojson")e.setData(t.data);else if(i==="image")e.updateImage({url:t.url,coordinates:t.coordinates});else switch(n){case"coordinates":e.setCoordinates?.(t.coordinates);break;case"url":e.setUrl?.(t.url);break;case"tiles":e.setTiles?.(t.tiles);break;default:console.warn(`Unable to update <Source> prop: ${n}`)}}function kn(e){const t=c.useContext(oe).map.getMap(),o=c.useRef(e),[,n]=c.useState(0),r=c.useMemo(()=>e.id||`jsx-source-${Cn++}`,[]);c.useEffect(()=>{if(t){const s=()=>setTimeout(()=>n(l=>l+1),0);return t.on("styledata",s),s(),()=>{if(t.off("styledata",s),t.style&&t.style._loaded&&t.getSource(r)){const l=t.getStyle()?.layers;if(l)for(const a of l)a.source===r&&t.removeLayer(a.id);t.removeSource(r)}}}},[t]);let i=t&&t.style&&t.getSource(r);return i?Mn(i,e,o.current):i=_n(t,r,e),o.current=e,i&&z.Children.map(e.children,s=>s&&c.cloneElement(s,{source:r}))||null}function Sn(e,t,o,n){if(Le(o.id===n.id,"layer id changed"),Le(o.type===n.type,"layer type changed"),o.type==="custom"||n.type==="custom")return;const{layout:r={},paint:i={},filter:s,minzoom:l,maxzoom:a,beforeId:u}=o;if(u!==n.beforeId&&e.moveLayer(t,u),r!==n.layout){const f=n.layout||{};for(const d in r)Z(r[d],f[d])||e.setLayoutProperty(t,d,r[d]);for(const d in f)r.hasOwnProperty(d)||e.setLayoutProperty(t,d,void 0)}if(i!==n.paint){const f=n.paint||{};for(const d in i)Z(i[d],f[d])||e.setPaintProperty(t,d,i[d]);for(const d in f)i.hasOwnProperty(d)||e.setPaintProperty(t,d,void 0)}Z(s,n.filter)||e.setFilter(t,s),(l!==n.minzoom||a!==n.maxzoom)&&e.setLayerZoomRange(t,l,a)}function En(e,t,o){if(e.style&&e.style._loaded&&(!("source"in o)||e.getSource(o.source))){const n={...o,id:t};delete n.beforeId,e.addLayer(n,o.beforeId)}}let Ln=0;function Tt(e){const t=c.useContext(oe).map.getMap(),o=c.useRef(e),[,n]=c.useState(0),r=c.useMemo(()=>e.id||`jsx-layer-${Ln++}`,[]);if(c.useEffect(()=>{if(t){const s=()=>n(l=>l+1);return t.on("styledata",s),s(),()=>{t.off("styledata",s),t.style&&t.style._loaded&&t.getLayer(r)&&t.removeLayer(r)}}},[t]),t&&t.style&&t.getLayer(r))try{Sn(t,r,e,o.current)}catch(s){console.warn(s)}else En(t,r,e);return o.current=e,null}function At(e,t,o){if(e!==null)for(var n,r,i,s,l,a,u,f=0,d=0,m,p=e.type,w=p==="FeatureCollection",C=p==="Feature",g=w?e.features.length:1,y=0;y<g;y++){u=w?e.features[y].geometry:C?e.geometry:e,m=u?u.type==="GeometryCollection":!1,l=m?u.geometries.length:1;for(var L=0;L<l;L++){var x=0,M=0;if(s=m?u.geometries[L]:u,s!==null){a=s.coordinates;var k=s.type;switch(f=0,k){case null:break;case"Point":if(t(a,d,y,x,M)===!1)return!1;d++,x++;break;case"LineString":case"MultiPoint":for(n=0;n<a.length;n++){if(t(a[n],d,y,x,M)===!1)return!1;d++,k==="MultiPoint"&&x++}k==="LineString"&&x++;break;case"Polygon":case"MultiLineString":for(n=0;n<a.length;n++){for(r=0;r<a[n].length-f;r++){if(t(a[n][r],d,y,x,M)===!1)return!1;d++}k==="MultiLineString"&&x++,k==="Polygon"&&M++}k==="Polygon"&&x++;break;case"MultiPolygon":for(n=0;n<a.length;n++){for(M=0,r=0;r<a[n].length;r++){for(i=0;i<a[n][r].length-f;i++){if(t(a[n][r][i],d,y,x,M)===!1)return!1;d++}M++}x++}break;case"GeometryCollection":for(n=0;n<s.geometries.length;n++)if(At(s.geometries[n],t)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Pn(e,t={}){if(e.bbox!=null&&t.recompute!==!0)return e.bbox;const o=[1/0,1/0,-1/0,-1/0];return At(e,n=>{o[0]>n[0]&&(o[0]=n[0]),o[1]>n[1]&&(o[1]=n[1]),o[2]<n[0]&&(o[2]=n[0]),o[3]<n[1]&&(o[3]=n[1])}),o}var Ge=Pn;const zn={en:{"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},fr:{"AttributionControl.ToggleAttribution":"Afficher/Masquer l’attribution","AttributionControl.MapFeedback":"Retour sur la carte","FullscreenControl.Enter":"Passer en plein écran","FullscreenControl.Exit":"Quitter le plein écran","GeolocateControl.FindMyLocation":"Trouver ma position","GeolocateControl.LocationNotAvailable":"Position non disponible","LogoControl.Title":"Logo MapLibre","Map.Title":"Carte","Marker.Title":"Marqueur de carte","NavigationControl.ResetBearing":"Réinitialiser l’orientation au nord","NavigationControl.ZoomIn":"Zoomer","NavigationControl.ZoomOut":"Dézoomer","Popup.Close":"Fermer la fenêtre","ScaleControl.Feet":"pi","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"mn","GlobeControl.Enable":"Activer le globe","GlobeControl.Disable":"Désactiver le globe","TerrainControl.Enable":"Activer le relief","TerrainControl.Disable":"Désactiver le relief","CooperativeGesturesHandler.WindowsHelpText":"Utilisez Ctrl + défilement pour zoomer sur la carte","CooperativeGesturesHandler.MacHelpText":"Utilisez ⌘ + défilement pour zoomer sur la carte","CooperativeGesturesHandler.MobileHelpText":"Utilisez deux doigts pour déplacer la carte"}},Tn=()=>{const{current:e}=wt(),{markerPoints:t,setZoom:o,mapPadding:n}=O(),[r,i]=c.useState(void 0),s=c.useRef(void 0),l=c.useCallback(()=>{e&&o(e.getZoom())},[e,o]);return c.useEffect(()=>(l(),e?.on("zoom",l),()=>{e?.off("zoom",l)}),[e,l]),c.useEffect(()=>{if(!e||typeof t>"u"||t.length===0)return;const a=Ge(Ie(t));(!s.current||!a.every((u,f)=>u===s.current?.[f]))&&(s.current=a,i(a))},[e,t]),c.useEffect(()=>{if(!e||typeof r>"u")return;const[a,u,f,d]=r,m=(f-a)*.05||.001,p=(d-u)*.05||.001;e.fitBounds([[a-m,u-p],[f+m,d+p]],{padding:n,maxZoom:17,duration:700})},[e,r,n]),null};function An({children:e}){const{mapProvider:t,locale:o,center:n,zoom:r=F.zoom,minZoom:i,maxZoom:s,pitch:l=F.pitch,bearing:a=F.bearing,cooperativeGestures:u=F.cooperativeGestures,zoomPosition:f}=O();return t.name!=="maptiler"?null:h.jsxs(dn,{initialViewState:{...n,zoom:r,pitch:l,bearing:a},cooperativeGestures:u,minZoom:i,maxZoom:s,mapStyle:`https://api.maptiler.com/maps/${t.theme||he.maptiler}/style.json?key=${t.apiKey}`,locale:zn[o],children:[h.jsx(Tn,{}),f&&h.jsx(bn,{position:f}),e]})}const On=Object.freeze(Object.defineProperty({__proto__:null,default:An},Symbol.toStringTag,{value:"Module"})),$n={"top-left":U.ControlPosition.LEFT_TOP,"top-right":U.ControlPosition.RIGHT_TOP,"bottom-left":U.ControlPosition.LEFT_BOTTOM,"bottom-right":U.ControlPosition.RIGHT_BOTTOM},Nn=({isMapLoaded:e})=>{const t=U.useMap(),{markerPoints:o,setZoom:n,mapPadding:r}=O(),[i,s]=c.useState(void 0),l=c.useRef(void 0),a=c.useCallback(()=>{if(!t)return;const u=t.getZoom();typeof u<"u"&&n(u+1)},[t,n]);return c.useEffect(()=>{a();const u=t?.addListener("zoom_changed",a);return()=>{u?.remove()}},[t,a]),c.useEffect(()=>{if(!t||typeof o>"u"||o.length===0)return;const u=Ge(Ie(o));(!l.current||!u.every((f,d)=>f===l.current?.[d]))&&(l.current=u,s(u))},[t,o]),c.useEffect(()=>{if(!t||typeof i>"u")return;const[u,f,d,m]=i,p=(d-u)*.05||.001,w=(m-f)*.05||.001;t.fitBounds({south:f-w,west:u-p,north:m+w,east:d+p},r)},[e,t,i,r]),null};function Fn({children:e}){const[t,o]=c.useState(!1),[n,r]=c.useState(!1),{mapProvider:i,mapPadding:s,locale:l,center:a,zoom:u=F.zoom,minZoom:f,maxZoom:d,pitch:m=F.pitch,bearing:p=F.bearing,cooperativeGestures:w=F.cooperativeGestures,zoomPosition:C}=O();if(c.useEffect(()=>{if(!n)return;const L=document.querySelector(".gm-style-moc");L&&s&&(L.style.paddingLeft=`${s.left}px`,L.style.paddingRight=`${s.right}px`)},[n,s?.left,s?.right]),i.name!=="google")return null;const g=()=>{o(!0)},y=()=>{r(!0)};return h.jsx(U.APIProvider,{apiKey:i.apiKey,language:l,onLoad:g,children:t&&h.jsxs(h.Fragment,{children:[h.jsx(Nn,{isMapLoaded:n}),h.jsx(U.Map,{mapId:i.theme||he.google,defaultCenter:{lat:a.latitude,lng:a.longitude},defaultBounds:{north:ve[3],south:ve[1],east:ve[2],west:ve[0]},defaultZoom:u+1,defaultTilt:m,defaultHeading:p,gestureHandling:w?"cooperative":"greedy",streetViewControl:!1,fullscreenControl:!1,clickableIcons:!1,mapTypeControl:!1,zoomControlOptions:{position:C&&$n[C]},minZoom:typeof f=="number"?f+1:void 0,maxZoom:typeof d=="number"?d+1:void 0,onTilesLoaded:y,children:e})]})})}const In=Object.freeze(Object.defineProperty({__proto__:null,default:Fn},Symbol.toStringTag,{value:"Module"})),Ot=z.createContext(null);function $t(){const e=c.useContext(Ot)?.maps,t=c.useContext(re);return c.useMemo(()=>({...e,current:t?.map}),[e,t])}function Zn(e){return{longitude:e.center.lng,latitude:e.center.lat,zoom:e._seaLevelZoom??e.zoom,pitch:e.pitch,bearing:e.bearing,padding:e.padding,elevation:e._centerAltitude}}function Un(e){return Number.isFinite(e.longitude)||Number.isFinite(e.latitude)||Number.isFinite(e.zoom)||Number.isFinite(e.pitch)||Number.isFinite(e.bearing)}function jn(e,t){return!!(Number.isFinite(t.longitude)&&e.center.lng!==t.longitude||Number.isFinite(t.latitude)&&e.center.lat!==t.latitude||Number.isFinite(t.bearing)&&e.bearing!==t.bearing||Number.isFinite(t.pitch)&&e.pitch!==t.pitch||Number.isFinite(t.zoom)&&(e._seaLevelZoom??e.zoom)!==t.zoom||t.padding&&!e.isPaddingEqual(t.padding))}function Nt(){}function Bn(e,t){const o=e._constrain,n=e._calcMatrices;if(e._constrain=Nt,e._calcMatrices=Nt,Number.isFinite(t.bearing)&&(e.bearing=t.bearing),Number.isFinite(t.pitch)&&(e.pitch=t.pitch),t.padding&&!e.isPaddingEqual(t.padding)&&(e.padding=t.padding),Number.isFinite(t.longitude)||Number.isFinite(t.latitude)){const r=e.center;e._center=new r.constructor(t.longitude??r.lng,t.latitude??r.lat)}if(Number.isFinite(t.zoom))if(e._centerAltitude=t.elevation??0,e.elevation){e._seaLevelZoom=t.zoom;const r=e.pixelsPerMeter/e.worldSize*e._centerAltitude,i=e._mercatorZfromZoom(t.zoom),s=e._mercatorZfromZoom(e._maxZoom),l=Math.max(i-r,s);e._setZoom(e._zoomFromMercatorZ(l))}else e._seaLevelZoom=null,e.zoom=t.zoom;e._constrain=o,e._calcMatrices=n,e._unmodified||(e._constrain(),e._calcMatrices())}const Dn=new Set(["_calcMatrices","_calcFogMatrices","_updateCameraState","_updateSeaLevelZoom"]);function Gn(e){let t=!1,o={};const n=e;let r=null;const i={get(s,l){return l==="$reactViewState"?o:l==="$proposedTransform"?r:l==="$internalUpdate"?t:l==="_setZoom"?a=>{t&&r?.[l](a),Number.isFinite(o.zoom)||n[l](a)}:(t&&l==="_translateCameraConstrained"&&Un(o)&&(r=r||n.clone()),Dn.has(l)?function(...a){r?.[l](...a),n[l](...a)}:t&&r?r[l]:n[l])},set(s,l,a){if(l==="$reactViewState")return o=a,Bn(n,o),!0;if(l==="$proposedTransform")return r=a,!0;if(l==="$internalUpdate")return t=a,!0;let u=a;return l==="center"||l==="_center"?(Number.isFinite(o.longitude)||Number.isFinite(o.latitude))&&(u=new a.constructor(o.longitude??a.lng,o.latitude??a.lat)):l==="zoom"||l==="_zoom"||l==="_seaLevelZoom"?Number.isFinite(o.zoom)&&(u=n[l]):l==="_centerAltitude"?Number.isFinite(o.elevation)&&(u=n[l]):l==="pitch"||l==="_pitch"?Number.isFinite(o.pitch)&&(u=n[l]):(l==="bearing"||l==="rotation"||l==="angle")&&Number.isFinite(o.bearing)&&(u=n[l]),t&&u!==a&&(r=r||n.clone()),t&&r&&(r[l]=a),n[l]=u,!0}};return new Proxy(e,i)}const Hn=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Ft(e){if(!e)return null;if(typeof e=="string"||("toJS"in e&&(e=e.toJS()),!e.layers))return e;const t={};for(const n of e.layers)t[n.id]=n;const o=e.layers.map(n=>{let r=null;"interactive"in n&&(r=Object.assign({},n),delete r.interactive);const i=t[n.ref];if(i){r=r||Object.assign({},n),delete r.ref;for(const s of Hn)s in i&&(r[s]=i[s])}return r||n});return{...e,layers:o}}function Wn(e,t){const o=Array.isArray(e)?e[0]:e?e.x:0,n=Array.isArray(e)?e[1]:e?e.y:0,r=Array.isArray(t)?t[0]:t?t.x:0,i=Array.isArray(t)?t[1]:t?t.y:0;return o===r&&n===i}function B(e,t){if(e===t)return!0;if(!e||!t)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(!B(e[o],t[o]))return!1;return!0}else if(Array.isArray(t))return!1;if(typeof e=="object"&&typeof t=="object"){const o=Object.keys(e),n=Object.keys(t);if(o.length!==n.length)return!1;for(const r of o)if(!t.hasOwnProperty(r)||!B(e[r],t[r]))return!1;return!0}return!1}const It={version:8,sources:{},layers:[]},Zt={mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",click:"onClick",dblclick:"onDblClick",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mouseout:"onMouseOut",contextmenu:"onContextMenu",touchstart:"onTouchStart",touchend:"onTouchEnd",touchmove:"onTouchMove",touchcancel:"onTouchCancel"},Ut={movestart:"onMoveStart",move:"onMove",moveend:"onMoveEnd",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",zoomstart:"onZoomStart",zoom:"onZoom",zoomend:"onZoomEnd",rotatestart:"onRotateStart",rotate:"onRotate",rotateend:"onRotateEnd",pitchstart:"onPitchStart",pitch:"onPitch",pitchend:"onPitchEnd"},jt={wheel:"onWheel",boxzoomstart:"onBoxZoomStart",boxzoomend:"onBoxZoomEnd",boxzoomcancel:"onBoxZoomCancel",resize:"onResize",load:"onLoad",render:"onRender",idle:"onIdle",remove:"onRemove",data:"onData",styledata:"onStyleData",sourcedata:"onSourceData",error:"onError"},Vn=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],qn=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class ue{constructor(t,o,n){this._map=null,this._internalUpdate=!1,this._inRender=!1,this._hoveredFeatures=null,this._deferredEvents={move:!1,zoom:!1,pitch:!1,rotate:!1},this._onEvent=r=>{const i=this.props[jt[r.type]];i?i(r):r.type==="error"&&console.error(r.error)},this._onPointerEvent=r=>{(r.type==="mousemove"||r.type==="mouseout")&&this._updateHover(r);const i=this.props[Zt[r.type]];i&&(this.props.interactiveLayerIds&&r.type!=="mouseover"&&r.type!=="mouseout"&&(r.features=this._hoveredFeatures||this._queryRenderedFeatures(r.point)),i(r),delete r.features)},this._onCameraEvent=r=>{if(!this._internalUpdate){const i=this.props[Ut[r.type]],s=this._proxyTransform;i&&(r.viewState=Zn(s.$proposedTransform??s),i(r)),r.type==="moveend"&&(s.$proposedTransform=null)}r.type in this._deferredEvents&&(this._deferredEvents[r.type]=!1)},this._MapClass=t,this.props=o,this._initialize(n)}get map(){return this._map}get transform(){return this._map.transform}setProps(t){const o=this.props;this.props=t;const n=this._updateSettings(t,o);n&&this._createProxyTransform(this._map);const r=this._updateSize(t),i=this._updateViewState(t,!0);this._updateStyle(t,o),this._updateStyleComponents(t,o),this._updateHandlers(t,o),(n||r||i&&!this._map.isMoving())&&this.redraw()}static reuse(t,o){const n=ue.savedMaps.pop();if(!n)return null;const r=n.map,i=r.getContainer();for(o.className=i.className;i.childNodes.length>0;)o.appendChild(i.childNodes[0]);r._container=o,n.setProps({...t,styleDiffing:!1}),r.resize();const{initialViewState:s}=t;return s&&(s.bounds?r.fitBounds(s.bounds,{...s.fitBoundsOptions,duration:0}):n._updateViewState(s,!1)),r.isStyleLoaded()?r.fire("load"):r.once("styledata",()=>r.fire("load")),r._update(),n}_initialize(t){const{props:o}=this,{mapStyle:n=It}=o,r={...o,...o.initialViewState,accessToken:o.mapboxAccessToken||Kn()||null,container:t,style:Ft(n)},i=r.initialViewState||r.viewState||r;if(Object.assign(r,{center:[i.longitude||0,i.latitude||0],zoom:i.zoom||0,pitch:i.pitch||0,bearing:i.bearing||0}),o.gl){const d=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=d,o.gl)}const s=new this._MapClass(r);i.padding&&s.setPadding(i.padding),o.cursor&&(s.getCanvas().style.cursor=o.cursor),this._createProxyTransform(s);const l=s._render;s._render=d=>{this._inRender=!0,l.call(s,d),this._inRender=!1};const a=s._renderTaskQueue.run;s._renderTaskQueue.run=d=>{this._proxyTransform.$internalUpdate=!0,a.call(s._renderTaskQueue,d),this._proxyTransform.$internalUpdate=!1,this._fireDefferedEvents()};const u=s.jumpTo;s.jumpTo=(...d)=>(this._proxyTransform.$internalUpdate=!0,u.apply(s,d),this._proxyTransform.$internalUpdate=!1,s);const f=s.fire;s.fire=this._fireEvent.bind(this,f),s.on("styledata",()=>{this._updateStyleComponents(this.props,{})}),s.on("sourcedata",()=>{this._updateStyleComponents(this.props,{})});for(const d in Zt)s.on(d,this._onPointerEvent);for(const d in Ut)s.on(d,this._onCameraEvent);for(const d in jt)s.on(d,this._onEvent);this._map=s}recycle(){this.map.getContainer().querySelector("[mapboxgl-children]")?.remove(),ue.savedMaps.push(this)}destroy(){this._map.remove()}redraw(){const t=this._map;!this._inRender&&t.style&&(t._frame&&(t._frame.cancel(),t._frame=null),t._render())}_createProxyTransform(t){const o=Gn(t.transform);t.transform=o,t.painter.transform=o,this._proxyTransform=o}_updateSize(t){const{viewState:o}=t;if(o){const n=this._map;if(o.width!==n.transform.width||o.height!==n.transform.height)return n.resize(),!0}return!1}_updateViewState(t,o){const n=t.viewState||t,r=this._proxyTransform,{zoom:i,pitch:s,bearing:l}=r,a=jn(this._proxyTransform,n);if(r.$reactViewState=n,a&&o){const u=this._deferredEvents;u.move=!0,u.zoom||(u.zoom=i!==r.zoom),u.rotate||(u.rotate=l!==r.bearing),u.pitch||(u.pitch=s!==r.pitch)}return a}_updateSettings(t,o){const n=this._map;let r=!1;for(const i of Vn)i in t&&!B(t[i],o[i])&&(r=!0,n[`set${i[0].toUpperCase()}${i.slice(1)}`]?.call(n,t[i]));return r}_updateStyle(t,o){if(t.cursor!==o.cursor&&(this._map.getCanvas().style.cursor=t.cursor||""),t.mapStyle!==o.mapStyle){const{mapStyle:n=It,styleDiffing:r=!0}=t,i={diff:r};return"localIdeographFontFamily"in t&&(i.localIdeographFontFamily=t.localIdeographFontFamily),this._map.setStyle(Ft(n),i),!0}return!1}_updateStyleComponents(t,o){const n=this._map;let r=!1;return n.isStyleLoaded()&&("light"in t&&n.setLight&&!B(t.light,o.light)&&(r=!0,n.setLight(t.light)),"fog"in t&&n.setFog&&!B(t.fog,o.fog)&&(r=!0,n.setFog(t.fog)),"terrain"in t&&n.setTerrain&&!B(t.terrain,o.terrain)&&(!t.terrain||n.getSource(t.terrain.source))&&(r=!0,n.setTerrain(t.terrain))),r}_updateHandlers(t,o){const n=this._map;let r=!1;for(const i of qn){const s=t[i]??!0,l=o[i]??!0;B(s,l)||(r=!0,s?n[i].enable(s):n[i].disable())}return r}_queryRenderedFeatures(t){const o=this._map,{interactiveLayerIds:n=[]}=this.props;try{return o.queryRenderedFeatures(t,{layers:n.filter(o.getLayer.bind(o))})}catch{return[]}}_updateHover(t){const{props:o}=this;if(o.interactiveLayerIds&&(o.onMouseMove||o.onMouseEnter||o.onMouseLeave)){const r=t.type,i=this._hoveredFeatures?.length>0,s=this._queryRenderedFeatures(t.point),l=s.length>0;!l&&i&&(t.type="mouseleave",this._onPointerEvent(t)),this._hoveredFeatures=s,l&&!i&&(t.type="mouseenter",this._onPointerEvent(t)),t.type=r}else this._hoveredFeatures=null}_fireEvent(t,o,n){const r=this._map,i=this._proxyTransform,s=i.$internalUpdate;try{i.$internalUpdate=!1,t.call(r,o,n)}finally{i.$internalUpdate=s}return r}_fireDefferedEvents(){const t=this._map;this._internalUpdate=!0;for(const o in this._deferredEvents)this._deferredEvents[o]&&t.fire(o);this._internalUpdate=!1}}ue.savedMaps=[];function Kn(){let e=null;if(typeof location<"u"){const t=/access_token=([^&\/]*)/.exec(location.search);e=t&&t[1]}try{e=e||process.env.MapboxAccessToken}catch{}try{e=e||process.env.REACT_APP_MAPBOX_ACCESS_TOKEN}catch{}return e}const Jn=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"];function Yn(e){if(!e)return null;const t=e.map,o={getMap:()=>t,getCenter:()=>e.transform.center,getZoom:()=>e.transform.zoom,getBearing:()=>e.transform.bearing,getPitch:()=>e.transform.pitch,getPadding:()=>e.transform.padding,getBounds:()=>e.transform.getBounds(),project:n=>{const r=t.transform;t.transform=e.transform;const i=t.project(n);return t.transform=r,i},unproject:n=>{const r=t.transform;t.transform=e.transform;const i=t.unproject(n);return t.transform=r,i},queryTerrainElevation:(n,r)=>{const i=t.transform;t.transform=e.transform;const s=t.queryTerrainElevation(n,r);return t.transform=i,s},queryRenderedFeatures:(n,r)=>{const i=t.transform;t.transform=e.transform;const s=t.queryRenderedFeatures(n,r);return t.transform=i,s}};for(const n of Qn(t))!(n in o)&&!Jn.includes(n)&&(o[n]=t[n].bind(t));return o}function Qn(e){const t=new Set;let o=e;for(;o;){for(const n of Object.getOwnPropertyNames(o))n[0]!=="_"&&typeof e[n]=="function"&&n!=="fire"&&n!=="setEventedParent"&&t.add(n);o=Object.getPrototypeOf(o)}return Array.from(t)}const Xn=typeof document<"u"?c.useLayoutEffect:c.useEffect,Rn=["baseApiUrl","maxParallelImageRequests","workerClass","workerCount","workerUrl"];function er(e,t){for(const n of Rn)n in t&&(e[n]=t[n]);const{RTLTextPlugin:o="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.js"}=t;o&&e.getRTLTextPluginStatus&&e.getRTLTextPluginStatus()==="unavailable"&&e.setRTLTextPlugin(o,n=>{n&&console.error(n)},!0)}const re=z.createContext(null);function tr(e,t){const o=c.useContext(Ot),[n,r]=c.useState(null),i=c.useRef(),{current:s}=c.useRef({mapLib:null,map:null});c.useEffect(()=>{const u=e.mapLib;let f=!0,d;return Promise.resolve(u||import("mapbox-gl")).then(m=>{if(!f)return;if(!m)throw new Error("Invalid mapLib");const p="Map"in m?m:m.default;if(!p.Map)throw new Error("Invalid mapLib");er(p,e),e.reuseMaps&&(d=ue.reuse(e,i.current)),d||(d=new ue(p.Map,e,i.current)),s.map=Yn(d),s.mapLib=p,r(d),o?.onMapMount(s.map,e.id)}).catch(m=>{const{onError:p}=e;p?p({type:"error",target:null,error:m}):console.error(m)}),()=>{f=!1,d&&(o?.onMapUnmount(e.id),e.reuseMaps?d.recycle():d.destroy())}},[]),Xn(()=>{n&&n.setProps(e)}),c.useImperativeHandle(t,()=>s.map,[n]);const l=c.useMemo(()=>({position:"relative",width:"100%",height:"100%",...e.style}),[e.style]),a={height:"100%"};return z.createElement("div",{id:e.id,ref:i,style:l},n&&z.createElement(re.Provider,{value:s},z.createElement("div",{"mapboxgl-children":"",style:a},e.children)))}const or=z.forwardRef(tr),nr=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function ie(e,t){if(!e||!t)return;const o=e.style;for(const n in t){const r=t[n];Number.isFinite(r)&&!nr.test(n)?o[n]=`${r}px`:o[n]=r}}function Bt(e,t){if(e===t)return null;const o=Dt(e),n=Dt(t),r=[];for(const i of n)o.has(i)||r.push(i);for(const i of o)n.has(i)||r.push(i);return r.length===0?null:r}function Dt(e){return new Set(e?e.trim().split(/\s+/):[])}const Gt=c.memo(c.forwardRef((e,t)=>{const{map:o,mapLib:n}=c.useContext(re),r=c.useRef({props:e}),i=c.useMemo(()=>{let y=!1;z.Children.forEach(e.children,M=>{M&&(y=!0)});const L={...e,element:y?document.createElement("div"):null},x=new n.Marker(L);return x.setLngLat([e.longitude,e.latitude]),x.getElement().addEventListener("click",M=>{r.current.props.onClick?.({type:"click",target:x,originalEvent:M})}),x.on("dragstart",M=>{const k=M;k.lngLat=i.getLngLat(),r.current.props.onDragStart?.(k)}),x.on("drag",M=>{const k=M;k.lngLat=i.getLngLat(),r.current.props.onDrag?.(k)}),x.on("dragend",M=>{const k=M;k.lngLat=i.getLngLat(),r.current.props.onDragEnd?.(k)}),x},[]);c.useEffect(()=>(i.addTo(o.getMap()),()=>{i.remove()}),[]);const{longitude:s,latitude:l,offset:a,style:u,draggable:f=!1,popup:d=null,rotation:m=0,rotationAlignment:p="auto",pitchAlignment:w="auto"}=e;c.useEffect(()=>{ie(i.getElement(),u)},[u]),c.useImperativeHandle(t,()=>i,[]);const C=r.current.props;(i.getLngLat().lng!==s||i.getLngLat().lat!==l)&&i.setLngLat([s,l]),a&&!Wn(i.getOffset(),a)&&i.setOffset(a),i.isDraggable()!==f&&i.setDraggable(f),i.getRotation()!==m&&i.setRotation(m),i.getRotationAlignment()!==p&&i.setRotationAlignment(p),i.getPitchAlignment()!==w&&i.setPitchAlignment(w),i.getPopup()!==d&&i.setPopup(d);const g=Bt(C.className,e.className);if(g)for(const y of g)i.toggleClassName(y);return r.current.props=e,ke.createPortal(e.children,i.getElement())})),rr=c.memo(c.forwardRef((e,t)=>{const{map:o,mapLib:n}=c.useContext(re),r=c.useMemo(()=>document.createElement("div"),[]),i=c.useRef({props:e}),s=c.useMemo(()=>{const l={...e},a=new n.Popup(l);return a.setLngLat([e.longitude,e.latitude]),a.once("open",u=>{i.current.props.onOpen?.(u)}),a},[]);if(c.useEffect(()=>{const l=a=>{i.current.props.onClose?.(a)};return s.on("close",l),s.setDOMContent(r).addTo(o.getMap()),()=>{s.off("close",l),s.isOpen()&&s.remove()}},[]),c.useEffect(()=>{ie(s.getElement(),e.style)},[e.style]),c.useImperativeHandle(t,()=>s,[]),s.isOpen()){const l=i.current.props;(s.getLngLat().lng!==e.longitude||s.getLngLat().lat!==e.latitude)&&s.setLngLat([e.longitude,e.latitude]),e.offset&&!B(l.offset,e.offset)&&(s.options.anchor=e.anchor,s.setOffset(e.offset)),(l.anchor!==e.anchor||l.maxWidth!==e.maxWidth)&&s.setMaxWidth(e.maxWidth);const a=Bt(l.className,e.className);if(a)for(const u of a)s.toggleClassName(u);i.current.props=e}return ke.createPortal(e.children,r)}));function Ce(e,t,o,n){const r=c.useContext(re),i=c.useMemo(()=>e(r),[]);return c.useEffect(()=>{const s=t,l=null,a=typeof t=="function"?t:null,{map:u}=r;return u.hasControl(i)||(u.addControl(i,s?.position),l&&l(r)),()=>{a&&a(r),u.hasControl(i)&&u.removeControl(i)}},[]),i}function ir(e){const t=Ce(({mapLib:o})=>new o.AttributionControl(e),{position:e.position});return c.useEffect(()=>{ie(t._container,e.style)},[e.style]),null}c.memo(ir);function sr(e){const t=Ce(({mapLib:o})=>new o.FullscreenControl({container:e.containerId&&document.getElementById(e.containerId)}),{position:e.position});return c.useEffect(()=>{ie(t._controlContainer,e.style)},[e.style]),null}c.memo(sr);function ar(e,t){const o=c.useRef({props:e}),n=Ce(({mapLib:r})=>{const i=new r.GeolocateControl(e),s=i._setupUI.bind(i);return i._setupUI=l=>{i._container.hasChildNodes()||s(l)},i.on("geolocate",l=>{o.current.props.onGeolocate?.(l)}),i.on("error",l=>{o.current.props.onError?.(l)}),i.on("outofmaxbounds",l=>{o.current.props.onOutOfMaxBounds?.(l)}),i.on("trackuserlocationstart",l=>{o.current.props.onTrackUserLocationStart?.(l)}),i.on("trackuserlocationend",l=>{o.current.props.onTrackUserLocationEnd?.(l)}),i},{position:e.position});return o.current.props=e,c.useImperativeHandle(t,()=>n,[]),c.useEffect(()=>{ie(n._container,e.style)},[e.style]),null}c.memo(c.forwardRef(ar));function lr(e){const t=Ce(({mapLib:o})=>new o.NavigationControl(e),{position:e.position});return c.useEffect(()=>{ie(t._container,e.style)},[e.style]),null}const cr=c.memo(lr);function ur(e){const t=Ce(({mapLib:i})=>new i.ScaleControl(e),{position:e.position}),o=c.useRef(e),n=o.current;o.current=e;const{style:r}=e;return e.maxWidth!==void 0&&e.maxWidth!==n.maxWidth&&(t.options.maxWidth=e.maxWidth),e.unit!==void 0&&e.unit!==n.unit&&t.setUnit(e.unit),c.useEffect(()=>{ie(t._container,r)},[r]),null}c.memo(ur);function Pe(e,t){if(!e)throw new Error(t)}let dr=0;function fr(e,t,o){if(e.style&&e.style._loaded){const n={...o};return delete n.id,delete n.children,e.addSource(t,n),e.getSource(t)}return null}function mr(e,t,o){Pe(t.id===o.id,"source id changed"),Pe(t.type===o.type,"source type changed");let n="",r=0;for(const s in t)s!=="children"&&s!=="id"&&!B(o[s],t[s])&&(n=s,r++);if(!r)return;const i=t.type;i==="geojson"?e.setData(t.data):i==="image"?e.updateImage({url:t.url,coordinates:t.coordinates}):"setCoordinates"in e&&r===1&&n==="coordinates"?e.setCoordinates(t.coordinates):"setUrl"in e&&n==="url"?e.setUrl(t.url):"setTiles"in e&&n==="tiles"?e.setTiles(t.tiles):console.warn(`Unable to update <Source> prop: ${n}`)}function pr(e){const t=c.useContext(re).map.getMap(),o=c.useRef(e),[,n]=c.useState(0),r=c.useMemo(()=>e.id||`jsx-source-${dr++}`,[]);c.useEffect(()=>{if(t){const s=()=>setTimeout(()=>n(l=>l+1),0);return t.on("styledata",s),s(),()=>{if(t.off("styledata",s),t.style&&t.style._loaded&&t.getSource(r)){const l=t.getStyle()?.layers;if(l)for(const a of l)a.source===r&&t.removeLayer(a.id);t.removeSource(r)}}}},[t]);let i=t&&t.style&&t.getSource(r);return i?mr(i,e,o.current):i=fr(t,r,e),o.current=e,i&&z.Children.map(e.children,s=>s&&c.cloneElement(s,{source:r}))||null}function gr(e,t,o,n){if(Pe(o.id===n.id,"layer id changed"),Pe(o.type===n.type,"layer type changed"),o.type==="custom"||n.type==="custom")return;const{layout:r={},paint:i={},filter:s,minzoom:l,maxzoom:a,beforeId:u}=o;if(u!==n.beforeId&&e.moveLayer(t,u),r!==n.layout){const f=n.layout||{};for(const d in r)B(r[d],f[d])||e.setLayoutProperty(t,d,r[d]);for(const d in f)r.hasOwnProperty(d)||e.setLayoutProperty(t,d,void 0)}if(i!==n.paint){const f=n.paint||{};for(const d in i)B(i[d],f[d])||e.setPaintProperty(t,d,i[d]);for(const d in f)i.hasOwnProperty(d)||e.setPaintProperty(t,d,void 0)}B(s,n.filter)||e.setFilter(t,s),(l!==n.minzoom||a!==n.maxzoom)&&e.setLayerZoomRange(t,l,a)}function hr(e,t,o){if(e.style&&e.style._loaded&&(!("source"in o)||e.getSource(o.source))){const n={...o,id:t};delete n.beforeId,e.addLayer(n,o.beforeId)}}let yr=0;function Ht(e){const t=c.useContext(re).map.getMap(),o=c.useRef(e),[,n]=c.useState(0),r=c.useMemo(()=>e.id||`jsx-layer-${yr++}`,[]);if(c.useEffect(()=>{if(t){const s=()=>n(l=>l+1);return t.on("styledata",s),s(),()=>{t.off("styledata",s),t.style&&t.style._loaded&&t.getLayer(r)&&t.removeLayer(r)}}},[t]),t&&t.style&&t.getLayer(r))try{gr(t,r,e,o.current)}catch(s){console.warn(s)}else hr(t,r,e);return o.current=e,null}const br={en:{"AttributionControl.ToggleAttribution":"Toggle attribution","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox homepage","Map.Title":"Map","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScrollZoomBlocker.CtrlMessage":"Use ctrl + scroll to zoom the map","ScrollZoomBlocker.CmdMessage":"Use ⌘ + scroll to zoom the map","TouchPanBlocker.Message":"Use two fingers to move the map"},fr:{"AttributionControl.ToggleAttribution":"Afficher/Masquer l’attribution","FullscreenControl.Enter":"Passer en plein écran","FullscreenControl.Exit":"Quitter le plein écran","GeolocateControl.FindMyLocation":"Trouver ma position","GeolocateControl.LocationNotAvailable":"Position non disponible","LogoControl.Title":"Page d’accueil Mapbox","Map.Title":"Carte","NavigationControl.ResetBearing":"Réinitialiser l’orientation au nord","NavigationControl.ZoomIn":"Zoomer","NavigationControl.ZoomOut":"Dézoomer","ScrollZoomBlocker.CtrlMessage":"Utilisez ctrl + défilement pour zoomer sur la carte","ScrollZoomBlocker.CmdMessage":"Utilisez ⌘ + défilement pour zoomer sur la carte","TouchPanBlocker.Message":"Utilisez deux doigts pour déplacer la carte"}},vr=()=>{const{current:e}=$t(),{markerPoints:t,setZoom:o,mapPadding:n}=O(),[r,i]=c.useState(void 0),s=c.useRef(void 0),l=c.useCallback(()=>{e&&o(e.getZoom())},[e,o]);return c.useEffect(()=>(l(),e?.on("zoom",l),()=>{e?.off("zoom",l)}),[e,l]),c.useEffect(()=>{if(!e||typeof t>"u"||t.length===0)return;const a=Ge(Ie(t));(!s.current||!a.every((u,f)=>u===s.current?.[f]))&&(s.current=a,i(a))},[e,t]),c.useEffect(()=>{if(!e||typeof r>"u")return;const[a,u,f,d]=r,m=(f-a)*.05||.001,p=(d-u)*.05||.001;e.fitBounds([[a-m,u-p],[f+m,d+p]],{retainPadding:!1,padding:n,maxZoom:17,duration:700})},[e,r,n]),null};function wr({children:e}){const{mapProvider:t,locale:o,center:n,zoom:r=F.zoom,minZoom:i,maxZoom:s,pitch:l=F.pitch,bearing:a=F.bearing,cooperativeGestures:u=F.cooperativeGestures,zoomPosition:f}=O();return t.name!=="mapbox"?null:h.jsxs(or,{mapboxAccessToken:t.apiKey,initialViewState:{...n,zoom:r,pitch:l,bearing:a},cooperativeGestures:u,minZoom:i,maxZoom:s,mapStyle:`mapbox://styles/${t.theme||he.mapbox}`,interactiveLayerIds:["road-label","waterway-label"],locale:br[o],children:[h.jsx(vr,{}),f&&h.jsx(cr,{position:f}),e]})}const xr=Object.freeze(Object.defineProperty({__proto__:null,default:wr},Symbol.toStringTag,{value:"Module"}));function Cr(){return h.jsx("div",{children:"Invalid map provider"})}const _r=Object.freeze(Object.defineProperty({__proto__:null,default:Cr},Symbol.toStringTag,{value:"Module"})),He="-",Mr=e=>{const t=Sr(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{const l=s.split(He);return l[0]===""&&l.length!==1&&l.shift(),Wt(l,t)||kr(s)},getConflictingClassGroupIds:(s,l)=>{const a=o[s]||[];return l&&n[s]?[...a,...n[s]]:a}}},Wt=(e,t)=>{if(e.length===0)return t.classGroupId;const o=e[0],n=t.nextPart.get(o),r=n?Wt(e.slice(1),n):void 0;if(r)return r;if(t.validators.length===0)return;const i=e.join(He);return t.validators.find(({validator:s})=>s(i))?.classGroupId},Vt=/^\[(.+)\]$/,kr=e=>{if(Vt.test(e)){const t=Vt.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},Sr=e=>{const{theme:t,classGroups:o}=e,n={nextPart:new Map,validators:[]};for(const r in o)We(o[r],n,r,t);return n},We=(e,t,o,n)=>{e.forEach(r=>{if(typeof r=="string"){const i=r===""?t:qt(t,r);i.classGroupId=o;return}if(typeof r=="function"){if(Er(r)){We(r(n),t,o,n);return}t.validators.push({validator:r,classGroupId:o});return}Object.entries(r).forEach(([i,s])=>{We(s,qt(t,i),o,n)})})},qt=(e,t)=>{let o=e;return t.split(He).forEach(n=>{o.nextPart.has(n)||o.nextPart.set(n,{nextPart:new Map,validators:[]}),o=o.nextPart.get(n)}),o},Er=e=>e.isThemeGetter,Lr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,n=new Map;const r=(i,s)=>{o.set(i,s),t++,t>e&&(t=0,n=o,o=new Map)};return{get(i){let s=o.get(i);if(s!==void 0)return s;if((s=n.get(i))!==void 0)return r(i,s),s},set(i,s){o.has(i)?o.set(i,s):r(i,s)}}},Ve="!",qe=":",Pr=qe.length,zr=e=>{const{prefix:t,experimentalParseClassName:o}=e;let n=r=>{const i=[];let s=0,l=0,a=0,u;for(let w=0;w<r.length;w++){let C=r[w];if(s===0&&l===0){if(C===qe){i.push(r.slice(a,w)),a=w+Pr;continue}if(C==="/"){u=w;continue}}C==="["?s++:C==="]"?s--:C==="("?l++:C===")"&&l--}const f=i.length===0?r:r.substring(a),d=Tr(f),m=d!==f,p=u&&u>a?u-a:void 0;return{modifiers:i,hasImportantModifier:m,baseClassName:d,maybePostfixModifierPosition:p}};if(t){const r=t+qe,i=n;n=s=>s.startsWith(r)?i(s.substring(r.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(o){const r=n;n=i=>o({className:i,parseClassName:r})}return n},Tr=e=>e.endsWith(Ve)?e.substring(0,e.length-1):e.startsWith(Ve)?e.substring(1):e,Ar=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const r=[];let i=[];return n.forEach(s=>{s[0]==="["||t[s]?(r.push(...i.sort(),s),i=[]):i.push(s)}),r.push(...i.sort()),r}},Or=e=>({cache:Lr(e.cacheSize),parseClassName:zr(e),sortModifiers:Ar(e),...Mr(e)}),$r=/\s+/,Nr=(e,t)=>{const{parseClassName:o,getClassGroupId:n,getConflictingClassGroupIds:r,sortModifiers:i}=t,s=[],l=e.trim().split($r);let a="";for(let u=l.length-1;u>=0;u-=1){const f=l[u],{isExternal:d,modifiers:m,hasImportantModifier:p,baseClassName:w,maybePostfixModifierPosition:C}=o(f);if(d){a=f+(a.length>0?" "+a:a);continue}let g=!!C,y=n(g?w.substring(0,C):w);if(!y){if(!g){a=f+(a.length>0?" "+a:a);continue}if(y=n(w),!y){a=f+(a.length>0?" "+a:a);continue}g=!1}const L=i(m).join(":"),x=p?L+Ve:L,M=x+y;if(s.includes(M))continue;s.push(M);const k=r(y,g);for(let P=0;P<k.length;++P){const A=k[P];s.push(x+A)}a=f+(a.length>0?" "+a:a)}return a};function Fr(){let e=0,t,o,n="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Kt(t))&&(n&&(n+=" "),n+=o);return n}const Kt=e=>{if(typeof e=="string")return e;let t,o="";for(let n=0;n<e.length;n++)e[n]&&(t=Kt(e[n]))&&(o&&(o+=" "),o+=t);return o};function Ir(e,...t){let o,n,r,i=s;function s(a){const u=t.reduce((f,d)=>d(f),e());return o=Or(u),n=o.cache.get,r=o.cache.set,i=l,l(a)}function l(a){const u=n(a);if(u)return u;const f=Nr(a,o);return r(a,f),f}return function(){return i(Fr.apply(null,arguments))}}const T=e=>{const t=o=>o[e]||[];return t.isThemeGetter=!0,t},Jt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Yt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Zr=/^\d+\/\d+$/,Ur=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,jr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Br=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Dr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Gr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,de=e=>Zr.test(e),E=e=>!!e&&!Number.isNaN(Number(e)),Q=e=>!!e&&Number.isInteger(Number(e)),Ke=e=>e.endsWith("%")&&E(e.slice(0,-1)),W=e=>Ur.test(e),Hr=()=>!0,Wr=e=>jr.test(e)&&!Br.test(e),Qt=()=>!1,Vr=e=>Dr.test(e),qr=e=>Gr.test(e),Kr=e=>!b(e)&&!v(e),Jr=e=>fe(e,oo,Qt),b=e=>Jt.test(e),se=e=>fe(e,no,Wr),Je=e=>fe(e,ei,E),Xt=e=>fe(e,eo,Qt),Yr=e=>fe(e,to,qr),ze=e=>fe(e,ro,Vr),v=e=>Yt.test(e),_e=e=>me(e,no),Qr=e=>me(e,ti),Rt=e=>me(e,eo),Xr=e=>me(e,oo),Rr=e=>me(e,to),Te=e=>me(e,ro,!0),fe=(e,t,o)=>{const n=Jt.exec(e);return n?n[1]?t(n[1]):o(n[2]):!1},me=(e,t,o=!1)=>{const n=Yt.exec(e);return n?n[1]?t(n[1]):o:!1},eo=e=>e==="position"||e==="percentage",to=e=>e==="image"||e==="url",oo=e=>e==="length"||e==="size"||e==="bg-size",no=e=>e==="length",ei=e=>e==="number",ti=e=>e==="family-name",ro=e=>e==="shadow",Ye=Ir(()=>{const e=T("color"),t=T("font"),o=T("text"),n=T("font-weight"),r=T("tracking"),i=T("leading"),s=T("breakpoint"),l=T("container"),a=T("spacing"),u=T("radius"),f=T("shadow"),d=T("inset-shadow"),m=T("text-shadow"),p=T("drop-shadow"),w=T("blur"),C=T("perspective"),g=T("aspect"),y=T("ease"),L=T("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...M(),v,b],P=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],_=()=>[v,b,a],$=()=>[de,"full","auto",..._()],X=()=>[Q,"none","subgrid",v,b],R=()=>["auto",{span:["full",Q,v,b]},Q,v,b],G=()=>[Q,"auto",v,b],V=()=>["auto","min","max","fr",v,b],q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ge=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",..._()],ae=()=>[de,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",..._()],S=()=>[e,v,b],mo=()=>[...M(),Rt,Xt,{position:[v,b]}],po=()=>["no-repeat",{repeat:["","x","y","space","round"]}],go=()=>["auto","cover","contain",Xr,Jr,{size:[v,b]}],rt=()=>[Ke,_e,se],I=()=>["","none","full",u,v,b],j=()=>["",E,_e,se],Oe=()=>["solid","dashed","dotted","double"],ho=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>[E,Ke,Rt,Xt],yo=()=>["","none",w,v,b],$e=()=>["none",E,v,b],Ne=()=>["none",E,v,b],it=()=>[E,v,b],Fe=()=>[de,"full",..._()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[W],breakpoint:[W],color:[Hr],container:[W],"drop-shadow":[W],ease:["in","out","in-out"],font:[Kr],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[W],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[W],shadow:[W],spacing:["px",E],text:[W],"text-shadow":[W],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",de,b,v,g]}],container:["container"],columns:[{columns:[E,b,v,l]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{start:$()}],end:[{end:$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[Q,"auto",v,b]}],basis:[{basis:[de,"full","auto",l,..._()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[E,de,"auto","initial","none",b]}],grow:[{grow:["",E,v,b]}],shrink:[{shrink:["",E,v,b]}],order:[{order:[Q,"first","last","none",v,b]}],"grid-cols":[{"grid-cols":X()}],"col-start-end":[{col:R()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":X()}],"row-start-end":[{row:R()}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":V()}],"auto-rows":[{"auto-rows":V()}],gap:[{gap:_()}],"gap-x":[{"gap-x":_()}],"gap-y":[{"gap-y":_()}],"justify-content":[{justify:[...q(),"normal"]}],"justify-items":[{"justify-items":[...ge(),"normal"]}],"justify-self":[{"justify-self":["auto",...ge()]}],"align-content":[{content:["normal",...q()]}],"align-items":[{items:[...ge(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ge(),{baseline:["","last"]}]}],"place-content":[{"place-content":q()}],"place-items":[{"place-items":[...ge(),"baseline"]}],"place-self":[{"place-self":["auto",...ge()]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":_()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":_()}],"space-y-reverse":["space-y-reverse"],size:[{size:ae()}],w:[{w:[l,"screen",...ae()]}],"min-w":[{"min-w":[l,"screen","none",...ae()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[s]},...ae()]}],h:[{h:["screen","lh",...ae()]}],"min-h":[{"min-h":["screen","lh","none",...ae()]}],"max-h":[{"max-h":["screen","lh",...ae()]}],"font-size":[{text:["base",o,_e,se]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,v,Je]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ke,b]}],"font-family":[{font:[Qr,b,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,v,b]}],"line-clamp":[{"line-clamp":[E,"none",v,Je]}],leading:[{leading:[i,..._()]}],"list-image":[{"list-image":["none",v,b]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",v,b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:S()}],"text-color":[{text:S()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[E,"from-font","auto",v,se]}],"text-decoration-color":[{decoration:S()}],"underline-offset":[{"underline-offset":[E,"auto",v,b]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",v,b]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",v,b]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:mo()}],"bg-repeat":[{bg:po()}],"bg-size":[{bg:go()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Q,v,b],radial:["",v,b],conic:[Q,v,b]},Rr,Yr]}],"bg-color":[{bg:S()}],"gradient-from-pos":[{from:rt()}],"gradient-via-pos":[{via:rt()}],"gradient-to-pos":[{to:rt()}],"gradient-from":[{from:S()}],"gradient-via":[{via:S()}],"gradient-to":[{to:S()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:j()}],"border-w-x":[{"border-x":j()}],"border-w-y":[{"border-y":j()}],"border-w-s":[{"border-s":j()}],"border-w-e":[{"border-e":j()}],"border-w-t":[{"border-t":j()}],"border-w-r":[{"border-r":j()}],"border-w-b":[{"border-b":j()}],"border-w-l":[{"border-l":j()}],"divide-x":[{"divide-x":j()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":j()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Oe(),"hidden","none"]}],"divide-style":[{divide:[...Oe(),"hidden","none"]}],"border-color":[{border:S()}],"border-color-x":[{"border-x":S()}],"border-color-y":[{"border-y":S()}],"border-color-s":[{"border-s":S()}],"border-color-e":[{"border-e":S()}],"border-color-t":[{"border-t":S()}],"border-color-r":[{"border-r":S()}],"border-color-b":[{"border-b":S()}],"border-color-l":[{"border-l":S()}],"divide-color":[{divide:S()}],"outline-style":[{outline:[...Oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[E,v,b]}],"outline-w":[{outline:["",E,_e,se]}],"outline-color":[{outline:S()}],shadow:[{shadow:["","none",f,Te,ze]}],"shadow-color":[{shadow:S()}],"inset-shadow":[{"inset-shadow":["none",d,Te,ze]}],"inset-shadow-color":[{"inset-shadow":S()}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:S()}],"ring-offset-w":[{"ring-offset":[E,se]}],"ring-offset-color":[{"ring-offset":S()}],"inset-ring-w":[{"inset-ring":j()}],"inset-ring-color":[{"inset-ring":S()}],"text-shadow":[{"text-shadow":["none",m,Te,ze]}],"text-shadow-color":[{"text-shadow":S()}],opacity:[{opacity:[E,v,b]}],"mix-blend":[{"mix-blend":[...ho(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ho()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[E]}],"mask-image-linear-from-pos":[{"mask-linear-from":N()}],"mask-image-linear-to-pos":[{"mask-linear-to":N()}],"mask-image-linear-from-color":[{"mask-linear-from":S()}],"mask-image-linear-to-color":[{"mask-linear-to":S()}],"mask-image-t-from-pos":[{"mask-t-from":N()}],"mask-image-t-to-pos":[{"mask-t-to":N()}],"mask-image-t-from-color":[{"mask-t-from":S()}],"mask-image-t-to-color":[{"mask-t-to":S()}],"mask-image-r-from-pos":[{"mask-r-from":N()}],"mask-image-r-to-pos":[{"mask-r-to":N()}],"mask-image-r-from-color":[{"mask-r-from":S()}],"mask-image-r-to-color":[{"mask-r-to":S()}],"mask-image-b-from-pos":[{"mask-b-from":N()}],"mask-image-b-to-pos":[{"mask-b-to":N()}],"mask-image-b-from-color":[{"mask-b-from":S()}],"mask-image-b-to-color":[{"mask-b-to":S()}],"mask-image-l-from-pos":[{"mask-l-from":N()}],"mask-image-l-to-pos":[{"mask-l-to":N()}],"mask-image-l-from-color":[{"mask-l-from":S()}],"mask-image-l-to-color":[{"mask-l-to":S()}],"mask-image-x-from-pos":[{"mask-x-from":N()}],"mask-image-x-to-pos":[{"mask-x-to":N()}],"mask-image-x-from-color":[{"mask-x-from":S()}],"mask-image-x-to-color":[{"mask-x-to":S()}],"mask-image-y-from-pos":[{"mask-y-from":N()}],"mask-image-y-to-pos":[{"mask-y-to":N()}],"mask-image-y-from-color":[{"mask-y-from":S()}],"mask-image-y-to-color":[{"mask-y-to":S()}],"mask-image-radial":[{"mask-radial":[v,b]}],"mask-image-radial-from-pos":[{"mask-radial-from":N()}],"mask-image-radial-to-pos":[{"mask-radial-to":N()}],"mask-image-radial-from-color":[{"mask-radial-from":S()}],"mask-image-radial-to-color":[{"mask-radial-to":S()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":M()}],"mask-image-conic-pos":[{"mask-conic":[E]}],"mask-image-conic-from-pos":[{"mask-conic-from":N()}],"mask-image-conic-to-pos":[{"mask-conic-to":N()}],"mask-image-conic-from-color":[{"mask-conic-from":S()}],"mask-image-conic-to-color":[{"mask-conic-to":S()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:mo()}],"mask-repeat":[{mask:po()}],"mask-size":[{mask:go()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",v,b]}],filter:[{filter:["","none",v,b]}],blur:[{blur:yo()}],brightness:[{brightness:[E,v,b]}],contrast:[{contrast:[E,v,b]}],"drop-shadow":[{"drop-shadow":["","none",p,Te,ze]}],"drop-shadow-color":[{"drop-shadow":S()}],grayscale:[{grayscale:["",E,v,b]}],"hue-rotate":[{"hue-rotate":[E,v,b]}],invert:[{invert:["",E,v,b]}],saturate:[{saturate:[E,v,b]}],sepia:[{sepia:["",E,v,b]}],"backdrop-filter":[{"backdrop-filter":["","none",v,b]}],"backdrop-blur":[{"backdrop-blur":yo()}],"backdrop-brightness":[{"backdrop-brightness":[E,v,b]}],"backdrop-contrast":[{"backdrop-contrast":[E,v,b]}],"backdrop-grayscale":[{"backdrop-grayscale":["",E,v,b]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[E,v,b]}],"backdrop-invert":[{"backdrop-invert":["",E,v,b]}],"backdrop-opacity":[{"backdrop-opacity":[E,v,b]}],"backdrop-saturate":[{"backdrop-saturate":[E,v,b]}],"backdrop-sepia":[{"backdrop-sepia":["",E,v,b]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":_()}],"border-spacing-x":[{"border-spacing-x":_()}],"border-spacing-y":[{"border-spacing-y":_()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",v,b]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[E,"initial",v,b]}],ease:[{ease:["linear","initial",y,v,b]}],delay:[{delay:[E,v,b]}],animate:[{animate:["none",L,v,b]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,v,b]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:$e()}],"rotate-x":[{"rotate-x":$e()}],"rotate-y":[{"rotate-y":$e()}],"rotate-z":[{"rotate-z":$e()}],scale:[{scale:Ne()}],"scale-x":[{"scale-x":Ne()}],"scale-y":[{"scale-y":Ne()}],"scale-z":[{"scale-z":Ne()}],"scale-3d":["scale-3d"],skew:[{skew:it()}],"skew-x":[{"skew-x":it()}],"skew-y":[{"skew-y":it()}],transform:[{transform:[v,b,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Fe()}],"translate-x":[{"translate-x":Fe()}],"translate-y":[{"translate-y":Fe()}],"translate-z":[{"translate-z":Fe()}],"translate-none":["translate-none"],accent:[{accent:S()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:S()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",v,b]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",v,b]}],fill:[{fill:["none",...S()]}],"stroke-w":[{stroke:[E,_e,se,Je]}],stroke:[{stroke:["none",...S()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),Qe=e=>z.createElement("svg",{width:34,height:41,viewBox:"0 0 34 41",fill:"inherit",xmlns:"http://www.w3.org/2000/svg",...e},z.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17 0C26.3888 0 34 7.61116 34 17C34 24.1987 29.5256 30.3524 23.2061 32.8316L17.9683 39.991C17.8591 40.1409 17.7141 40.2632 17.5456 40.3476C17.377 40.4321 17.1899 40.4762 17 40.4762C16.8101 40.4762 16.623 40.4321 16.4544 40.3476C16.2859 40.2632 16.1409 40.1409 16.0317 39.991L10.7939 32.8316C4.47445 30.3524 0 24.1987 0 17C0 7.61116 7.61116 0 17 0Z",fill:"currentColor"})),Xe=`
2
2
  relative flex items-center justify-center z-10 w-fit
3
3
  `,Re="text-primary-100",et=`
4
4
  w-5 h-5 fill-base-white
5
5
  absolute top-1.5 left-1/2 transform -translate-x-1/2
6
- `;function ei({marker:e,className:t}){return g.jsxs(zt,{anchor:"bottom",longitude:e.longitude,latitude:e.latitude,className:Ye(Xe.trim(),t),children:[g.jsx("span",{id:"center-pin-background",className:Re,children:g.jsx(Qe,{})}),g.jsx(ke.HouseLineIcon,{id:"center-pin-icon",className:et})]},`center-pin-marker-${e.longitude}-${e.latitude}`)}const ti=Object.freeze(Object.defineProperty({__proto__:null,default:ei},Symbol.toStringTag,{value:"Module"}));function oi({marker:e,className:t}){return g.jsxs(U.AdvancedMarker,{position:{lat:e.latitude,lng:e.longitude},className:Ye(Xe.trim(),t),zIndex:10,children:[g.jsx("span",{id:"center-pin-background",className:Re,children:g.jsx(Qe,{})}),g.jsx(ke.HouseLineIcon,{id:"center-pin-icon",className:et})]},`center-pin-marker-${e.longitude}-${e.latitude}`)}const ni=Object.freeze(Object.defineProperty({__proto__:null,default:oi},Symbol.toStringTag,{value:"Module"}));function ri({marker:e,className:t}){return g.jsxs(Gt,{anchor:"bottom",longitude:e.longitude,latitude:e.latitude,className:Ye(Xe.trim(),t),children:[g.jsx("span",{id:"center-pin-background",className:Re,children:g.jsx(Qe,{})}),g.jsx(ke.HouseLineIcon,{id:"center-pin-icon",className:et})]},`center-pin-marker-${e.longitude}-${e.latitude}`)}const ii=Object.freeze(Object.defineProperty({__proto__:null,default:ri},Symbol.toStringTag,{value:"Module"})),pe=`
6
+ `;function oi({marker:e,className:t}){return h.jsxs(zt,{anchor:"bottom",longitude:e.longitude,latitude:e.latitude,className:Ye(Xe.trim(),t),children:[h.jsx("span",{id:"center-pin-background",className:Re,children:h.jsx(Qe,{})}),h.jsx(Me.HouseLineIcon,{id:"center-pin-icon",className:et})]},`center-pin-marker-${e.longitude}-${e.latitude}`)}const ni=Object.freeze(Object.defineProperty({__proto__:null,default:oi},Symbol.toStringTag,{value:"Module"}));function ri({marker:e,className:t}){return h.jsxs(U.AdvancedMarker,{position:{lat:e.latitude,lng:e.longitude},className:Ye(Xe.trim(),t),zIndex:10,children:[h.jsx("span",{id:"center-pin-background",className:Re,children:h.jsx(Qe,{})}),h.jsx(Me.HouseLineIcon,{id:"center-pin-icon",className:et})]},`center-pin-marker-${e.longitude}-${e.latitude}`)}const ii=Object.freeze(Object.defineProperty({__proto__:null,default:ri},Symbol.toStringTag,{value:"Module"}));function si({marker:e,className:t}){return h.jsxs(Gt,{anchor:"bottom",longitude:e.longitude,latitude:e.latitude,className:Ye(Xe.trim(),t),children:[h.jsx("span",{id:"center-pin-background",className:Re,children:h.jsx(Qe,{})}),h.jsx(Me.HouseLineIcon,{id:"center-pin-icon",className:et})]},`center-pin-marker-${e.longitude}-${e.latitude}`)}const ai=Object.freeze(Object.defineProperty({__proto__:null,default:si},Symbol.toStringTag,{value:"Module"})),pe=`
7
7
  group/marker cursor-pointer rounded-full
8
8
  relative h-7 w-7 flex items-center justify-center
9
9
  text-base-white ring-1 ring-inset
@@ -28,11 +28,11 @@
28
28
  group-data-[is-zoomed-out=true]/marker:hidden
29
29
 
30
30
  group-data-[is-active=true]/marker:fill-[var(--background,theme(colors.base.white))]
31
- `;function Ae({icon:e}){return typeof e<"u"?g.jsx(e,{className:io}):g.jsx(ke.MapPinIcon,{className:io})}const si=`
31
+ `;function Ae({icon:e}){return typeof e<"u"?h.jsx(e,{className:io}):h.jsx(Me.MapPinIcon,{className:io})}const li=`
32
32
  relative flex
33
33
  `,so=`
34
34
  -ml-6 -z-10 last:-z-20
35
- `;function tt({isActive:e=!1,colors:t,icon:o}){const{zoom:n,mapProvider:r}=O(),i=c.useMemo(()=>r.name==="google"?n-1<be+1:n<be,[n,r]);return g.jsxs("div",{className:si,style:{"--background":t?.background,"--fill":t?.fill},children:[g.jsx("div",{className:pe,"data-is-zoomed-out":i,"data-is-active":e,children:g.jsx(Ae,{icon:o})}),!i&&g.jsxs(g.Fragment,{children:[g.jsx("div",{className:`${pe} ${so}`}),g.jsx("div",{className:`${pe} ${so}`})]})]})}function ai({clusters:e,colors:t,clusterIcon:o,onClick:n,doesSuperclusterContainActiveMarker:r}){const{activeMarker:i,zoom:s}=O(),l=a=>u=>{u.originalEvent.stopPropagation(),!a.properties.disableClick&&n?.(a)};return e?.map((a,u)=>{const f=a.geometry.coordinates[0],d=a.geometry.coordinates[1];return g.jsxs(zt,{anchor:"bottom",longitude:f,latitude:d,onClick:l(a),children:[a.properties.cluster&&a.properties.cluster_id&&g.jsx(tt,{colors:t,icon:o,isActive:r(a.properties.cluster_id)}),!a.properties.cluster&&g.jsx("div",{className:pe,style:a.properties.defaultColor?{}:{"--background":t?.background,"--fill":t?.fill},"data-is-cluster":!!a.properties.cluster,"data-is-zoomed-out":s<be,"data-is-active":i?.id===a.properties.id,children:g.jsx(Ae,{icon:a.properties.icon})})]},`map-marker-${f}-${d}-${u}`)})}const li=Object.freeze(Object.defineProperty({__proto__:null,default:ai},Symbol.toStringTag,{value:"Module"}));function ci({clusters:e,colors:t,clusterIcon:o,onClick:n,doesSuperclusterContainActiveMarker:r}){U.useMap();const{activeMarker:i,zoom:s}=O(),l=a=>()=>{a.properties.disableClick||n?.(a)};return e?.map((a,u)=>{const f=a.geometry.coordinates[0],d=a.geometry.coordinates[1];return g.jsxs(U.AdvancedMarker,{position:{lat:d,lng:f},onClick:l(a),children:[a.properties.cluster&&g.jsx(tt,{colors:t,icon:o,isActive:r(a.properties.cluster_id)}),!a.properties.cluster&&g.jsx("div",{className:pe,style:a.properties.defaultColor?{}:{"--background":t?.background,"--fill":t?.fill},"data-is-cluster":!!a.properties.cluster,"data-is-zoomed-out":s-1<be+1,"data-is-active":i?.id===a.properties.id,children:g.jsx(Ae,{icon:a.properties.icon})})]},`map-marker-${f}-${d}-${u}`)})}const ui=Object.freeze(Object.defineProperty({__proto__:null,default:ci},Symbol.toStringTag,{value:"Module"}));function di({clusters:e,colors:t,clusterIcon:o,onClick:n,doesSuperclusterContainActiveMarker:r}){const{activeMarker:i,zoom:s}=O(),l=a=>u=>{u.originalEvent.stopPropagation(),!a.properties.disableClick&&n?.(a)};return e?.map((a,u)=>{const f=a.geometry.coordinates[0],d=a.geometry.coordinates[1];return g.jsxs(Gt,{anchor:"bottom",longitude:f,latitude:d,onClick:l(a),children:[a.properties.cluster&&g.jsx(tt,{colors:t,icon:o,isActive:r(a.properties.cluster_id)}),!a.properties.cluster&&g.jsx("div",{className:pe,style:a.properties.defaultColor?{}:{"--background":t?.background,"--fill":t?.fill},"data-is-cluster":!!a.properties.cluster,"data-is-zoomed-out":s<be,"data-is-active":i?.id===a.properties.id,children:g.jsx(Ae,{icon:a.properties.icon})})]},`map-marker-${f}-${d}-${u}`)})}const fi=Object.freeze(Object.defineProperty({__proto__:null,default:di},Symbol.toStringTag,{value:"Module"}));function ot(e,t,o,n,r,i){const s={left:r.left||ye.left,right:r.right||ye.right,top:r.top||ye.top,bottom:r.bottom||ye.bottom},l=n.top||0,a=n.left||0,u={top:e.top-l,bottom:e.bottom-l,left:e.left-a,right:e.right-a,width:e.width,height:e.height},f={top:u.top>=s.top,left:u.left>=s.left,bottom:u.bottom<=n.height-s.bottom,right:u.right<=n.width-s.right};if(!!Object.values(f).includes(!1)){let m=0,p=0;f.top?f.bottom||(m=n.height-s.bottom-u.bottom):m=s.top-u.top,f.left?f.right||(p=n.width-s.right-u.right):p=s.left-u.left,i({longitude:t.longitude-p/n.width*(o.right-o.left),latitude:t.latitude+m/n.height*(o.top-o.bottom)})}}const nt=`
35
+ `;function tt({isActive:e=!1,colors:t,icon:o}){const{zoom:n,mapProvider:r}=O(),i=c.useMemo(()=>r.name==="google"?n-1<be+1:n<be,[n,r]);return h.jsxs("div",{className:li,style:{"--background":t?.background,"--fill":t?.fill},children:[h.jsx("div",{className:pe,"data-is-zoomed-out":i,"data-is-active":e,children:h.jsx(Ae,{icon:o})}),!i&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:`${pe} ${so}`}),h.jsx("div",{className:`${pe} ${so}`})]})]})}function ci({clusters:e,colors:t,clusterIcon:o,onClick:n,doesSuperclusterContainActiveMarker:r}){const{activeMarker:i,zoom:s}=O(),l=a=>u=>{u.originalEvent.stopPropagation(),!a.properties.disableClick&&n?.(a)};return e?.map((a,u)=>{const f=a.geometry.coordinates[0],d=a.geometry.coordinates[1];return h.jsxs(zt,{anchor:"bottom",longitude:f,latitude:d,onClick:l(a),children:[a.properties.cluster&&a.properties.cluster_id&&h.jsx(tt,{colors:t,icon:o,isActive:r(a.properties.cluster_id)}),!a.properties.cluster&&h.jsx("div",{className:pe,style:a.properties.defaultColor?{}:{"--background":t?.background,"--fill":t?.fill},"data-is-cluster":!!a.properties.cluster,"data-is-zoomed-out":s<be,"data-is-active":i?.id===a.properties.id,children:h.jsx(Ae,{icon:a.properties.icon})})]},`map-marker-${f}-${d}-${u}`)})}const ui=Object.freeze(Object.defineProperty({__proto__:null,default:ci},Symbol.toStringTag,{value:"Module"}));function di({clusters:e,colors:t,clusterIcon:o,onClick:n,doesSuperclusterContainActiveMarker:r}){U.useMap();const{activeMarker:i,zoom:s}=O(),l=a=>()=>{a.properties.disableClick||n?.(a)};return e?.map((a,u)=>{const f=a.geometry.coordinates[0],d=a.geometry.coordinates[1];return h.jsxs(U.AdvancedMarker,{position:{lat:d,lng:f},onClick:l(a),children:[a.properties.cluster&&h.jsx(tt,{colors:t,icon:o,isActive:r(a.properties.cluster_id)}),!a.properties.cluster&&h.jsx("div",{className:pe,style:a.properties.defaultColor?{}:{"--background":t?.background,"--fill":t?.fill},"data-is-cluster":!!a.properties.cluster,"data-is-zoomed-out":s-1<be+1,"data-is-active":i?.id===a.properties.id,children:h.jsx(Ae,{icon:a.properties.icon})})]},`map-marker-${f}-${d}-${u}`)})}const fi=Object.freeze(Object.defineProperty({__proto__:null,default:di},Symbol.toStringTag,{value:"Module"}));function mi({clusters:e,colors:t,clusterIcon:o,onClick:n,doesSuperclusterContainActiveMarker:r}){const{activeMarker:i,zoom:s}=O(),l=a=>u=>{u.originalEvent.stopPropagation(),!a.properties.disableClick&&n?.(a)};return e?.map((a,u)=>{const f=a.geometry.coordinates[0],d=a.geometry.coordinates[1];return h.jsxs(Gt,{anchor:"bottom",longitude:f,latitude:d,onClick:l(a),children:[a.properties.cluster&&h.jsx(tt,{colors:t,icon:o,isActive:r(a.properties.cluster_id)}),!a.properties.cluster&&h.jsx("div",{className:pe,style:a.properties.defaultColor?{}:{"--background":t?.background,"--fill":t?.fill},"data-is-cluster":!!a.properties.cluster,"data-is-zoomed-out":s<be,"data-is-active":i?.id===a.properties.id,children:h.jsx(Ae,{icon:a.properties.icon})})]},`map-marker-${f}-${d}-${u}`)})}const pi=Object.freeze(Object.defineProperty({__proto__:null,default:mi},Symbol.toStringTag,{value:"Module"}));function ot(e,t,o,n,r,i){const s={left:r.left||ye.left,right:r.right||ye.right,top:r.top||ye.top,bottom:r.bottom||ye.bottom},l=n.top||0,a=n.left||0,u={top:e.top-l,bottom:e.bottom-l,left:e.left-a,right:e.right-a,width:e.width,height:e.height},f={top:u.top>=s.top,left:u.left>=s.left,bottom:u.bottom<=n.height-s.bottom,right:u.right<=n.width-s.right};if(!!Object.values(f).includes(!1)){let m=0,p=0;f.top?f.bottom||(m=n.height-s.bottom-u.bottom):m=s.top-u.top,f.left?f.right||(p=n.width-s.right-u.right):p=s.left-u.left,i({longitude:t.longitude-p/n.width*(o.right-o.left),latitude:t.latitude+m/n.height*(o.top-o.bottom)})}}const nt=`
36
36
  bg-base-white border border-primary-100 w-auto overflow-hidden
37
37
  rounded-lg shadow-sm
38
- `;function mi({latitude:e,longitude:t,anchor:o,offset:n=[0,-35],onClose:r,children:i}){const s=c.useRef(null),{current:l}=wt(),{activeMarker:a,clusterPoints:u,mapPadding:f}=O(),d=c.useRef(u),m=c.useRef(a);return c.useEffect(()=>{const p=d.current!==u,w=m.current===a;p&&w&&typeof a<"u"&&r?.(),d.current=u,m.current=a},[u,a,r]),c.useEffect(()=>{const p=s?.current;let w={width:0,height:0};const x=()=>{if(!l||!p||typeof a>"u")return;const _=l.getBounds(),k=l.getCenter(),C=l.getCanvas(),P=p.getElement()?.getBoundingClientRect();if(!_||!P)return;const A=Math.abs(P.width-w.width),M=Math.abs(P.height-w.height);if(w.width!==0&&A<le&&M<le)return;w={width:P.width,height:P.height};const $=C.getBoundingClientRect(),X={width:C.clientWidth,height:C.clientHeight,top:$.top,left:$.left},R={latitude:k.lat,longitude:k.lng},G={left:_.getWest(),right:_.getEast(),top:_.getNorth(),bottom:_.getSouth()},H={left:f.left||0,right:f.right||0,top:f.top||0,bottom:f.bottom||0};ot(P,R,G,X,H,q=>{l.easeTo({center:[q.longitude,q.latitude],duration:500})})};let h;const v=new ResizeObserver(()=>{h&&clearTimeout(h),h=window.setTimeout(()=>{x()},100)}),L=p?.getElement();return L&&v.observe(L),()=>{h&&clearTimeout(h),v.disconnect()}},[l,s,a,f.top,f.bottom,f.left,f.right]),typeof e>"u"||typeof t>"u"?null:g.jsx(mn,{ref:s,className:"maplibre-popup",focusAfterOpen:!0,latitude:e,longitude:t,anchor:o,offset:n,onClose:r,closeButton:!1,children:g.jsx("div",{className:nt,children:i})})}const pi=Object.freeze(Object.defineProperty({__proto__:null,default:mi},Symbol.toStringTag,{value:"Module"}));function hi({latitude:e,longitude:t,offset:o=[0,-25],onClose:n,children:r}){const[i,s]=c.useState(null),l=U.useMap(),{mapPadding:a,activeMarker:u,clusterPoints:f}=O(),d=c.useRef(f),m=c.useRef(u),p=c.useCallback(x=>{s(x)},[]);c.useEffect(()=>{const x=d.current!==f,h=m.current===u;x&&h&&typeof u<"u"&&n?.(),d.current=f,m.current=u},[f,u,n]),c.useEffect(()=>{let x={width:0,height:0};const h=()=>{if(!l||!i||typeof u>"u")return;const _=l.getBounds(),k=l.getCenter(),C=l.getDiv(),P=i?.getBoundingClientRect();if(!_||!k||!P)return;const A=Math.abs(P.width-x.width),M=Math.abs(P.height-x.height);if(x.width!==0&&A<le&&M<le)return;x={width:P.width,height:P.height};const $=C.getBoundingClientRect(),X={width:C.clientWidth,height:C.clientHeight,top:$.top,left:$.left},R={latitude:k.lat(),longitude:k.lng()},G={left:_.getSouthWest().lng(),right:_.getNorthEast().lng(),top:_.getNorthEast().lat(),bottom:_.getSouthWest().lat()};ot(P,R,G,X,a,H=>{l.panTo(new google.maps.LatLng(H.latitude,H.longitude))})};let v;const L=new ResizeObserver(()=>{v&&clearTimeout(v),v=window.setTimeout(()=>{h()},100)});return i&&L.observe(i),()=>{v&&clearTimeout(v),L.disconnect()}},[l,i,u,a.top,a.bottom,a.left,a.right]),c.useEffect(()=>{if(!l)return;const x=l.addListener("click",()=>{n?.()});return()=>{x.remove()}},[l]);const w=c.useMemo(()=>Array.isArray(o)?[o[0],o[1]]:[o,o],[o]);return typeof e>"u"||typeof t>"u"?null:g.jsx(U.InfoWindow,{shouldFocus:!0,disableAutoPan:!0,position:{lat:e,lng:t},pixelOffset:w,children:g.jsx("div",{ref:p,className:nt,children:r})})}const gi=Object.freeze(Object.defineProperty({__proto__:null,default:hi},Symbol.toStringTag,{value:"Module"}));function yi({latitude:e,longitude:t,anchor:o,offset:n=[0,-35],onClose:r,children:i}){const s=c.useRef(null),{current:l}=$t(),{activeMarker:a,clusterPoints:u,mapPadding:f}=O(),d=c.useRef(u),m=c.useRef(a);return c.useEffect(()=>{const p=d.current!==u,w=m.current===a;p&&w&&typeof a<"u"&&r?.(),d.current=u,m.current=a},[u,a,r]),c.useEffect(()=>{const p=s?.current;let w={width:0,height:0};const x=()=>{if(!l||!p||typeof a>"u")return;const _=l.getBounds(),k=l.getCenter(),C=l.getCanvas(),P=p.getElement()?.getBoundingClientRect();if(!_||!P)return;const A=Math.abs(P.width-w.width),M=Math.abs(P.height-w.height);if(w.width!==0&&A<le&&M<le)return;w={width:P.width,height:P.height};const $=C.getBoundingClientRect(),X={width:C.clientWidth,height:C.clientHeight,top:$.top,left:$.left},R={latitude:k.lat,longitude:k.lng},G={left:_.getWest(),right:_.getEast(),top:_.getNorth(),bottom:_.getSouth()},H={left:f.left||0,right:f.right||0,top:f.top||0,bottom:f.bottom||0};ot(P,R,G,X,H,q=>{l.easeTo({center:[q.longitude,q.latitude],duration:500})})};let h;const v=new ResizeObserver(()=>{h&&clearTimeout(h),h=window.setTimeout(()=>{x()},100)}),L=p?.getElement();return L&&v.observe(L),()=>{h&&clearTimeout(h),v.disconnect()}},[l,s,a,f.top,f.bottom,f.left,f.right]),typeof e>"u"||typeof t>"u"?null:g.jsx(nr,{ref:s,className:"mapbox-popup",focusAfterOpen:!0,latitude:e,longitude:t,anchor:o,offset:n,onClose:r,closeButton:!1,children:g.jsx("div",{className:nt,children:i})})}const bi=Object.freeze(Object.defineProperty({__proto__:null,default:yi},Symbol.toStringTag,{value:"Module"}));function ao(e=[],t="MultiPolygon"){const o=i=>Object.values(i).map(s=>Array.isArray(s[0])?o(s):[s[1],s[0]]),n=o(e);return{type:"FeatureCollection",features:[{type:"Feature",geometry:{type:t,coordinates:n}}]}}function lo(e=[]){const t=n=>Object.values(n).map(r=>Array.isArray(r[0])?t(r.flat()):{lat:r[0],lng:r[1]});return t(e)}function co(e,t,o){switch(e){case"fill":return{"fill-color":t,"fill-opacity":.25};case"line":return{"line-color":t,"line-width":o==="LineString"?6:2};default:return{}}}function vi({sources:e}){const t=c.useMemo(()=>!Array.isArray(e)||e.length===0?[]:e.map(o=>({...o,geoJson:o.geometry?ao(o.geometry,o.type):null})),[e]);return t?.length===0?null:g.jsx(g.Fragment,{children:t?.map(o=>g.jsx("div",{children:o.geoJson&&g.jsx(Cn,{id:o.key,type:"geojson",data:o.geoJson,children:o.layer&&(Array.isArray(o.layer)?o.layer.map((n,r)=>g.jsx(Tt,{id:`${o.key}-${r}`,type:n.type,paint:co(n.type,n.color,o.type)},`${o.key}-${r}`)):g.jsx(Tt,{id:o.key,type:o.layer.type,paint:co(o.layer.type,o.layer.color,o.type)}))},o.key)},o.key))})}const wi=Object.freeze(Object.defineProperty({__proto__:null,default:vi},Symbol.toStringTag,{value:"Module"}));function uo(e,t,o){switch(e){case"fill":return{fillColor:t,fillOpacity:.25};case"line":return{strokeColor:t,strokeWeight:o==="LineString"?6:2};default:return{}}}function _i({sources:e}){const[t,o]=c.useState(null),[n,r]=c.useState([]),i=c.useContext(U.GoogleMapsContext);return c.useEffect(()=>{i&&o(i.map)},[i]),c.useEffect(()=>{if(n.forEach(l=>{l?.setMap(null)}),!t||typeof e>"u"||e.length===0)return;const s=e.map(l=>{const a={type:l.type||"MultiPolygon",clickable:!1};if(Array.isArray(l.layer))l.layer.forEach(f=>{const d=uo(f.type,f.color,l.type);Object.assign(a,d)});else{const f=uo(l.layer.type,l.layer.color,l.type);Object.assign(a,f)}let u;return l.type==="LineString"?u=new google.maps.Polyline({strokeWeight:6,path:lo(l.geometry),...a}):u=new google.maps.Polygon({strokeWeight:0,fillOpacity:0,paths:lo(l.geometry),...a}),u.setMap(t),u});return r(s),s.forEach(l=>{l.setMap(t)}),()=>{s.forEach(l=>{l?.setMap(null)})}},[t,e]),g.jsx(g.Fragment,{})}const xi=Object.freeze(Object.defineProperty({__proto__:null,default:_i},Symbol.toStringTag,{value:"Module"}));function fo(e,t,o){switch(e){case"fill":return{"fill-color":t,"fill-opacity":.25};case"line":return{"line-color":t,"line-width":o==="LineString"?6:2};default:return{}}}function Mi({sources:e}){const t=c.useMemo(()=>!Array.isArray(e)||e.length===0?[]:e.map(o=>({...o,geoJson:o.geometry?ao(o.geometry,o.type):null})),[e]);return t?.length===0?null:g.jsx(g.Fragment,{children:t?.map(o=>g.jsx("div",{children:o.geoJson&&g.jsx(mr,{id:o.key,type:"geojson",data:o.geoJson,children:o.layer&&(Array.isArray(o.layer)?o.layer.map((n,r)=>g.jsx(Vt,{id:`${o.key}-${r}`,type:n.type,paint:fo(n.type,n.color,o.type)},`${o.key}-${r}`)):g.jsx(Vt,{id:o.key,type:o.layer.type,paint:fo(o.layer.type,o.layer.color,o.type)}))},o.key)},o.key))})}const ki=Object.freeze(Object.defineProperty({__proto__:null,default:Mi},Symbol.toStringTag,{value:"Module"}));D.LocalLogicMap=Ro,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})});
38
+ `;function gi({latitude:e,longitude:t,anchor:o,offset:n=[0,-35],onClose:r,children:i}){const s=c.useRef(null),{current:l}=wt(),{activeMarker:a,clusterPoints:u,mapPadding:f}=O(),d=c.useRef(u),m=c.useRef(a);return c.useEffect(()=>{const p=d.current!==u,w=m.current===a;p&&w&&typeof a<"u"&&r?.(),d.current=u,m.current=a},[u,a,r]),c.useEffect(()=>{const p=s?.current;let w={width:0,height:0};const C=()=>{if(!l||!p||typeof a>"u")return;const x=l.getBounds(),M=l.getCenter(),k=l.getCanvas(),P=p.getElement()?.getBoundingClientRect();if(!x||!P)return;const A=Math.abs(P.width-w.width),_=Math.abs(P.height-w.height);if(w.width!==0&&A<le&&_<le)return;w={width:P.width,height:P.height};const $=k.getBoundingClientRect(),X={width:k.clientWidth,height:k.clientHeight,top:$.top,left:$.left},R={latitude:M.lat,longitude:M.lng},G={left:x.getWest(),right:x.getEast(),top:x.getNorth(),bottom:x.getSouth()},V={left:f.left||0,right:f.right||0,top:f.top||0,bottom:f.bottom||0};ot(P,R,G,X,V,q=>{l.easeTo({center:[q.longitude,q.latitude],duration:500})})};let g;const y=new ResizeObserver(()=>{g&&clearTimeout(g),g=window.setTimeout(()=>{C()},100)}),L=p?.getElement();return L&&y.observe(L),()=>{g&&clearTimeout(g),y.disconnect()}},[l,s,a,f.top,f.bottom,f.left,f.right]),typeof e>"u"||typeof t>"u"?null:h.jsx(mn,{ref:s,className:"maplibre-popup",focusAfterOpen:!0,latitude:e,longitude:t,anchor:o,offset:n,onClose:r,closeButton:!1,children:h.jsx("div",{className:nt,children:i})})}const hi=Object.freeze(Object.defineProperty({__proto__:null,default:gi},Symbol.toStringTag,{value:"Module"}));function yi({latitude:e,longitude:t,offset:o=[0,-25],onClose:n,children:r}){const[i,s]=c.useState(null),l=U.useMap(),{mapPadding:a,activeMarker:u,clusterPoints:f}=O(),d=c.useRef(f),m=c.useRef(u),p=c.useCallback(C=>{s(C)},[]);c.useEffect(()=>{const C=d.current!==f,g=m.current===u;C&&g&&typeof u<"u"&&n?.(),d.current=f,m.current=u},[f,u,n]),c.useEffect(()=>{let C={width:0,height:0};const g=()=>{if(!l||!i||typeof u>"u")return;const x=l.getBounds(),M=l.getCenter(),k=l.getDiv(),P=i?.getBoundingClientRect();if(!x||!M||!P)return;const A=Math.abs(P.width-C.width),_=Math.abs(P.height-C.height);if(C.width!==0&&A<le&&_<le)return;C={width:P.width,height:P.height};const $=k.getBoundingClientRect(),X={width:k.clientWidth,height:k.clientHeight,top:$.top,left:$.left},R={latitude:M.lat(),longitude:M.lng()},G={left:x.getSouthWest().lng(),right:x.getNorthEast().lng(),top:x.getNorthEast().lat(),bottom:x.getSouthWest().lat()};ot(P,R,G,X,a,V=>{l.panTo(new google.maps.LatLng(V.latitude,V.longitude))})};let y;const L=new ResizeObserver(()=>{y&&clearTimeout(y),y=window.setTimeout(()=>{g()},100)});return i&&L.observe(i),()=>{y&&clearTimeout(y),L.disconnect()}},[l,i,u,a.top,a.bottom,a.left,a.right]),c.useEffect(()=>{if(!l)return;const C=l.addListener("click",()=>{n?.()});return()=>{C.remove()}},[l]);const w=c.useMemo(()=>Array.isArray(o)?[o[0],o[1]]:[o,o],[o]);return typeof e>"u"||typeof t>"u"?null:h.jsx(U.InfoWindow,{shouldFocus:!0,disableAutoPan:!0,position:{lat:e,lng:t},pixelOffset:w,children:h.jsx("div",{ref:p,className:nt,children:r})})}const bi=Object.freeze(Object.defineProperty({__proto__:null,default:yi},Symbol.toStringTag,{value:"Module"}));function vi({latitude:e,longitude:t,anchor:o,offset:n=[0,-35],onClose:r,children:i}){const s=c.useRef(null),{current:l}=$t(),{activeMarker:a,clusterPoints:u,mapPadding:f}=O(),d=c.useRef(u),m=c.useRef(a);return c.useEffect(()=>{const p=d.current!==u,w=m.current===a;p&&w&&typeof a<"u"&&r?.(),d.current=u,m.current=a},[u,a,r]),c.useEffect(()=>{const p=s?.current;let w={width:0,height:0};const C=()=>{if(!l||!p||typeof a>"u")return;const x=l.getBounds(),M=l.getCenter(),k=l.getCanvas(),P=p.getElement()?.getBoundingClientRect();if(!x||!P)return;const A=Math.abs(P.width-w.width),_=Math.abs(P.height-w.height);if(w.width!==0&&A<le&&_<le)return;w={width:P.width,height:P.height};const $=k.getBoundingClientRect(),X={width:k.clientWidth,height:k.clientHeight,top:$.top,left:$.left},R={latitude:M.lat,longitude:M.lng},G={left:x.getWest(),right:x.getEast(),top:x.getNorth(),bottom:x.getSouth()},V={left:f.left||0,right:f.right||0,top:f.top||0,bottom:f.bottom||0};ot(P,R,G,X,V,q=>{l.easeTo({center:[q.longitude,q.latitude],duration:500})})};let g;const y=new ResizeObserver(()=>{g&&clearTimeout(g),g=window.setTimeout(()=>{C()},100)}),L=p?.getElement();return L&&y.observe(L),()=>{g&&clearTimeout(g),y.disconnect()}},[l,s,a,f.top,f.bottom,f.left,f.right]),typeof e>"u"||typeof t>"u"?null:h.jsx(rr,{ref:s,className:"mapbox-popup",focusAfterOpen:!0,latitude:e,longitude:t,anchor:o,offset:n,onClose:r,closeButton:!1,children:h.jsx("div",{className:nt,children:i})})}const wi=Object.freeze(Object.defineProperty({__proto__:null,default:vi},Symbol.toStringTag,{value:"Module"}));function ao(e=[],t="MultiPolygon"){const o=i=>Object.values(i).map(s=>Array.isArray(s[0])?o(s):[s[1],s[0]]),n=o(e);return{type:"FeatureCollection",features:[{type:"Feature",geometry:{type:t,coordinates:n}}]}}function lo(e=[]){const t=n=>Object.values(n).map(r=>Array.isArray(r[0])?t(r.flat()):{lat:r[0],lng:r[1]});return t(e)}function co(e,t,o){switch(e){case"fill":return{"fill-color":t,"fill-opacity":.25};case"line":return{"line-color":t,"line-width":o==="LineString"?6:2};default:return{}}}function xi({sources:e}){const t=c.useMemo(()=>!Array.isArray(e)||e.length===0?[]:e.map(o=>({...o,geoJson:o.geometry?ao(o.geometry,o.type):null})),[e]);return t?.length===0?null:h.jsx(h.Fragment,{children:t?.map(o=>h.jsx("div",{children:o.geoJson&&h.jsx(kn,{id:o.key,type:"geojson",data:o.geoJson,children:o.layer&&(Array.isArray(o.layer)?o.layer.map((n,r)=>h.jsx(Tt,{id:`${o.key}-${r}`,type:n.type,paint:co(n.type,n.color,o.type)},`${o.key}-${r}`)):h.jsx(Tt,{id:o.key,type:o.layer.type,paint:co(o.layer.type,o.layer.color,o.type)}))},o.key)},o.key))})}const Ci=Object.freeze(Object.defineProperty({__proto__:null,default:xi},Symbol.toStringTag,{value:"Module"}));function uo(e,t,o){switch(e){case"fill":return{fillColor:t,fillOpacity:.25};case"line":return{strokeColor:t,strokeWeight:o==="LineString"?6:2};default:return{}}}function _i({sources:e}){const[t,o]=c.useState(null),[n,r]=c.useState([]),i=c.useContext(U.GoogleMapsContext);return c.useEffect(()=>{i&&o(i.map)},[i]),c.useEffect(()=>{if(n.forEach(l=>{l?.setMap(null)}),!t||typeof e>"u"||e.length===0)return;const s=e.map(l=>{const a={type:l.type||"MultiPolygon",clickable:!1};if(Array.isArray(l.layer))l.layer.forEach(f=>{const d=uo(f.type,f.color,l.type);Object.assign(a,d)});else{const f=uo(l.layer.type,l.layer.color,l.type);Object.assign(a,f)}let u;return l.type==="LineString"?u=new google.maps.Polyline({strokeWeight:6,path:lo(l.geometry),...a}):u=new google.maps.Polygon({strokeWeight:0,fillOpacity:0,paths:lo(l.geometry),...a}),u.setMap(t),u});return r(s),s.forEach(l=>{l.setMap(t)}),()=>{s.forEach(l=>{l?.setMap(null)})}},[t,e]),h.jsx(h.Fragment,{})}const Mi=Object.freeze(Object.defineProperty({__proto__:null,default:_i},Symbol.toStringTag,{value:"Module"}));function fo(e,t,o){switch(e){case"fill":return{"fill-color":t,"fill-opacity":.25};case"line":return{"line-color":t,"line-width":o==="LineString"?6:2};default:return{}}}function ki({sources:e}){const t=c.useMemo(()=>!Array.isArray(e)||e.length===0?[]:e.map(o=>({...o,geoJson:o.geometry?ao(o.geometry,o.type):null})),[e]);return t?.length===0?null:h.jsx(h.Fragment,{children:t?.map(o=>h.jsx("div",{children:o.geoJson&&h.jsx(pr,{id:o.key,type:"geojson",data:o.geoJson,children:o.layer&&(Array.isArray(o.layer)?o.layer.map((n,r)=>h.jsx(Ht,{id:`${o.key}-${r}`,type:n.type,paint:fo(n.type,n.color,o.type)},`${o.key}-${r}`)):h.jsx(Ht,{id:o.key,type:o.layer.type,paint:fo(o.layer.type,o.layer.color,o.type)}))},o.key)},o.key))})}const Si=Object.freeze(Object.defineProperty({__proto__:null,default:ki},Symbol.toStringTag,{value:"Module"}));D.LocalLogicMap=Ro,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})});