@carto/ps-react-maps 1.3.1-alpha.2 → 1.3.1-alpha.4

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.
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react");var K=(r=>(r.Roadmap="roadmap",r.Satellite="satellite",r.Hybrid="hybrid",r))(K||{}),Ue=(r=>(r.DarkMatter="dark-matter",r.Positron="positron",r.Voyager="voyager",r))(Ue||{});const J={positron:"https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",voyager:"https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json","dark-matter":"https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"};var Be=(r=>(r.Maplibre="maplibre",r.GoogleMaps="google-maps",r))(Be||{});const Tr={positron:{url:J.positron,type:"maplibre"},voyager:{url:J.voyager,type:"maplibre"},"dark-matter":{url:J["dark-matter"],type:"maplibre"},roadmap:{type:"google-maps"},satellite:{type:"google-maps"},hybrid:{type:"google-maps"}},B=()=>{throw new Error("You forgot to wrap your component in <MapProvider>.")},$={state:{maps:{}},references:{current:{}},actions:{setViewState:B,setBasemap:B,setResize:B,setZoom:B,setLoaded:B}},ue=C.createContext($.state),ce=C.createContext($.references),le=C.createContext($.actions);var k=(r=>(r.SetViewState="SetViewState",r.SetBasemap="SetBasemap",r.SetResize="SetResize",r.SetZoom="SetZoom",r.SetLoaded="SetLoaded",r))(k||{});function Ve(r,{type:s,payload:d}){return{SetViewState:()=>{const{id:o,viewState:y}=d,l={...r.maps};return l[o]={...r.maps[o],viewState:y},{...r,maps:l}},SetResize:()=>{const{id:o,width:y,height:l}=d,E={...r.maps};return E[o]={...r.maps[o],viewState:{...r.maps[o].viewState,width:y,height:l}},{...r,maps:E}},SetBasemap:()=>{const{id:o,basemap:y}=d,l={...r.maps},{basemap:E}=l[o],u=Object.values(K).includes(E),R=Object.values(K).includes(y),g=u===R;return l[o]={...r.maps[o],basemap:y,isLoaded:g},{...r,maps:l}},SetZoom:()=>{const{id:o,zoom:y}=d,l={...r.maps};return l[o]={...r.maps[o],viewState:{...r.maps[o].viewState,zoom:y}},{...r,maps:l}},SetLoaded:()=>{const{id:o,value:y}=d,l={...r.maps};return l[o]={...r.maps[o],isLoaded:y},{...r,maps:l}}}[s]?.()??r}function Ye(r){return C.useContext(ue).maps[r]}function fe(r){const s=C.useContext(ce),{instanceRef:d,overlayRef:_}=s.current[r],o=()=>{const R=d?.current;return R?.deck||R?._deck},y=()=>_?.current,l=()=>o()._getViewState(),E=R=>o()?.getViewports(R);return{instanceRef:d,overlayRef:_,getDeckInstance:o,getOverlayInstance:y,getViewState:l,getViewport:(R=0,g)=>E(g)?.[R],getViewports:E}}function $e(r){const{setBasemap:s,setResize:d,setViewState:_,setZoom:o,setLoaded:y}=C.useContext(le),{getViewport:l}=fe(r);return{setBasemap:u=>s(u,r),setResize:u=>d(u,r),setViewState:u=>_(u,r),setZoom:u=>o(u,r),setLoaded:u=>y(u,r),fitBounds:(u,{boundsOptions:R,viewStateOptions:g}={})=>{const T=l(),{latitude:x,longitude:p,zoom:v}=T.fitBounds(u,R);_({...g,latitude:x,longitude:p,zoom:v},r)}}}function wr(r){return Ye(r)}function xr(r){return fe(r)}function Pr(r){return $e(r)}var se={exports:{}},V={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react");var Ne=(r=>(r.Roadmap="roadmap",r.Satellite="satellite",r.Hybrid="hybrid",r))(Ne||{}),Be=(r=>(r.DarkMatter="dark-matter",r.Positron="positron",r.Voyager="voyager",r))(Be||{});const G={positron:"https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",voyager:"https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json","dark-matter":"https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"};var Ve=(r=>(r.Maplibre="maplibre",r.GoogleMaps="google-maps",r))(Ve||{});const ie={positron:{url:G.positron,type:"maplibre"},voyager:{url:G.voyager,type:"maplibre"},"dark-matter":{url:G["dark-matter"],type:"maplibre"},roadmap:{type:"google-maps"},satellite:{type:"google-maps"},hybrid:{type:"google-maps"}},B=()=>{throw new Error("You forgot to wrap your component in <MapProvider>.")},$={state:{maps:{}},references:{current:{}},actions:{setViewState:B,setBasemap:B,setResize:B,setZoom:B,setLoaded:B}},ue=C.createContext($.state),ce=C.createContext($.references),le=C.createContext($.actions);var k=(r=>(r.SetViewState="SetViewState",r.SetBasemap="SetBasemap",r.SetResize="SetResize",r.SetZoom="SetZoom",r.SetLoaded="SetLoaded",r))(k||{});function Ye(r,{type:s,payload:d}){return{SetViewState:()=>{const{id:o,viewState:y}=d,l={...r.maps};return l[o]={...r.maps[o],viewState:y},{...r,maps:l}},SetResize:()=>{const{id:o,width:y,height:l}=d,E={...r.maps};return E[o]={...r.maps[o],viewState:{...r.maps[o].viewState,width:y,height:l}},{...r,maps:E}},SetBasemap:()=>{const{id:o,basemap:y}=d,l={...r.maps},{basemap:E}=l[o],u=ie[E]?.type,R=ie[y]?.type,g=u===R;return l[o]={...r.maps[o],basemap:y,isLoaded:g},{...r,maps:l}},SetZoom:()=>{const{id:o,zoom:y}=d,l={...r.maps};return l[o]={...r.maps[o],viewState:{...r.maps[o].viewState,zoom:y}},{...r,maps:l}},SetLoaded:()=>{const{id:o,value:y}=d,l={...r.maps};return l[o]={...r.maps[o],isLoaded:y},{...r,maps:l}}}[s]?.()??r}function $e(r){return C.useContext(ue).maps[r]}function fe(r){const s=C.useContext(ce),{instanceRef:d,overlayRef:_}=s.current[r],o=()=>{const R=d?.current;return R?.deck||R?._deck},y=()=>_?.current,l=()=>o()._getViewState(),E=R=>o()?.getViewports(R);return{instanceRef:d,overlayRef:_,getDeckInstance:o,getOverlayInstance:y,getViewState:l,getViewport:(R=0,g)=>E(g)?.[R],getViewports:E}}function We(r){const{setBasemap:s,setResize:d,setViewState:_,setZoom:o,setLoaded:y}=C.useContext(le),{getViewport:l}=fe(r);return{setBasemap:u=>s(u,r),setResize:u=>d(u,r),setViewState:u=>_(u,r),setZoom:u=>o(u,r),setLoaded:u=>y(u,r),fitBounds:(u,{boundsOptions:R,viewStateOptions:g}={})=>{const T=l(),{latitude:x,longitude:p,zoom:v}=T.fitBounds(u,R);_({...g,latitude:x,longitude:p,zoom:v},r)}}}function wr(r){return $e(r)}function xr(r){return fe(r)}function Pr(r){return We(r)}var se={exports:{}},V={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.development.js
4
4
  *
@@ -6,17 +6,17 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Ie;function Or(){return Ie||(Ie=1,process.env.NODE_ENV!=="production"&&function(){var r=C,s=Symbol.for("react.element"),d=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),E=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),v=Symbol.iterator,M="@@iterator";function W(e){if(e===null||typeof e!="object")return null;var t=v&&e[v]||e[M];return typeof t=="function"?t:null}var A=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(e){{for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];qe("error",e,n)}}function qe(e,t,n){{var a=A.ReactDebugCurrentFrame,f=a.getStackAddendum();f!==""&&(t+="%s",n=n.concat([f]));var m=n.map(function(c){return String(c)});m.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,m)}}var He=!1,Ze=!1,Ge=!1,Je=!1,Ke=!1,de;de=Symbol.for("react.module.reference");function Xe(e){return!!(typeof e=="string"||typeof e=="function"||e===_||e===y||Ke||e===o||e===R||e===g||Je||e===p||He||Ze||Ge||typeof e=="object"&&e!==null&&(e.$$typeof===x||e.$$typeof===T||e.$$typeof===l||e.$$typeof===E||e.$$typeof===u||e.$$typeof===de||e.getModuleId!==void 0))}function Qe(e,t,n){var a=e.displayName;if(a)return a;var f=t.displayName||t.name||"";return f!==""?n+"("+f+")":n}function pe(e){return e.displayName||"Context"}function O(e){if(e==null)return null;if(typeof e.tag=="number"&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _:return"Fragment";case d:return"Portal";case y:return"Profiler";case o:return"StrictMode";case R:return"Suspense";case g:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case E:var t=e;return pe(t)+".Consumer";case l:var n=e;return pe(n._context)+".Provider";case u:return Qe(e,e.render,"ForwardRef");case T:var a=e.displayName||null;return a!==null?a:O(e.type)||"Memo";case x:{var f=e,m=f._payload,c=f._init;try{return O(c(m))}catch{return null}}}return null}var F=Object.assign,N=0,ve,me,ye,ge,Re,be,Ee;function he(){}he.__reactDisabledLog=!0;function er(){{if(N===0){ve=console.log,me=console.info,ye=console.warn,ge=console.error,Re=console.group,be=console.groupCollapsed,Ee=console.groupEnd;var e={configurable:!0,enumerable:!0,value:he,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}N++}}function rr(){{if(N--,N===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:F({},e,{value:ve}),info:F({},e,{value:me}),warn:F({},e,{value:ye}),error:F({},e,{value:ge}),group:F({},e,{value:Re}),groupCollapsed:F({},e,{value:be}),groupEnd:F({},e,{value:Ee})})}N<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var X=A.ReactCurrentDispatcher,Q;function z(e,t,n){{if(Q===void 0)try{throw Error()}catch(f){var a=f.stack.trim().match(/\n( *(at )?)/);Q=a&&a[1]||""}return`
10
- `+Q+e}}var ee=!1,q;{var tr=typeof WeakMap=="function"?WeakMap:Map;q=new tr}function _e(e,t){if(!e||ee)return"";{var n=q.get(e);if(n!==void 0)return n}var a;ee=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var m;m=X.current,X.current=null,er();try{if(t){var c=function(){throw Error()};if(Object.defineProperty(c.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(c,[])}catch(j){a=j}Reflect.construct(e,[],c)}else{try{c.call()}catch(j){a=j}e.call(c.prototype)}}else{try{throw Error()}catch(j){a=j}e()}}catch(j){if(j&&a&&typeof j.stack=="string"){for(var i=j.stack.split(`
9
+ */var Ie;function Or(){return Ie||(Ie=1,process.env.NODE_ENV!=="production"&&function(){var r=C,s=Symbol.for("react.element"),d=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),E=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),v=Symbol.iterator,M="@@iterator";function W(e){if(e===null||typeof e!="object")return null;var t=v&&e[v]||e[M];return typeof t=="function"?t:null}var A=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(e){{for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];He("error",e,n)}}function He(e,t,n){{var a=A.ReactDebugCurrentFrame,f=a.getStackAddendum();f!==""&&(t+="%s",n=n.concat([f]));var m=n.map(function(c){return String(c)});m.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,m)}}var Ze=!1,Je=!1,Ge=!1,Ke=!1,Xe=!1,de;de=Symbol.for("react.module.reference");function Qe(e){return!!(typeof e=="string"||typeof e=="function"||e===_||e===y||Xe||e===o||e===R||e===g||Ke||e===p||Ze||Je||Ge||typeof e=="object"&&e!==null&&(e.$$typeof===x||e.$$typeof===T||e.$$typeof===l||e.$$typeof===E||e.$$typeof===u||e.$$typeof===de||e.getModuleId!==void 0))}function er(e,t,n){var a=e.displayName;if(a)return a;var f=t.displayName||t.name||"";return f!==""?n+"("+f+")":n}function pe(e){return e.displayName||"Context"}function O(e){if(e==null)return null;if(typeof e.tag=="number"&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _:return"Fragment";case d:return"Portal";case y:return"Profiler";case o:return"StrictMode";case R:return"Suspense";case g:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case E:var t=e;return pe(t)+".Consumer";case l:var n=e;return pe(n._context)+".Provider";case u:return er(e,e.render,"ForwardRef");case T:var a=e.displayName||null;return a!==null?a:O(e.type)||"Memo";case x:{var f=e,m=f._payload,c=f._init;try{return O(c(m))}catch{return null}}}return null}var F=Object.assign,U=0,ve,me,ye,ge,Re,be,Ee;function he(){}he.__reactDisabledLog=!0;function rr(){{if(U===0){ve=console.log,me=console.info,ye=console.warn,ge=console.error,Re=console.group,be=console.groupCollapsed,Ee=console.groupEnd;var e={configurable:!0,enumerable:!0,value:he,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}U++}}function tr(){{if(U--,U===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:F({},e,{value:ve}),info:F({},e,{value:me}),warn:F({},e,{value:ye}),error:F({},e,{value:ge}),group:F({},e,{value:Re}),groupCollapsed:F({},e,{value:be}),groupEnd:F({},e,{value:Ee})})}U<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var K=A.ReactCurrentDispatcher,X;function z(e,t,n){{if(X===void 0)try{throw Error()}catch(f){var a=f.stack.trim().match(/\n( *(at )?)/);X=a&&a[1]||""}return`
10
+ `+X+e}}var Q=!1,q;{var nr=typeof WeakMap=="function"?WeakMap:Map;q=new nr}function _e(e,t){if(!e||Q)return"";{var n=q.get(e);if(n!==void 0)return n}var a;Q=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var m;m=K.current,K.current=null,rr();try{if(t){var c=function(){throw Error()};if(Object.defineProperty(c.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(c,[])}catch(j){a=j}Reflect.construct(e,[],c)}else{try{c.call()}catch(j){a=j}e.call(c.prototype)}}else{try{throw Error()}catch(j){a=j}e()}}catch(j){if(j&&a&&typeof j.stack=="string"){for(var i=j.stack.split(`
11
11
  `),w=a.stack.split(`
12
12
  `),b=i.length-1,h=w.length-1;b>=1&&h>=0&&i[b]!==w[h];)h--;for(;b>=1&&h>=0;b--,h--)if(i[b]!==w[h]){if(b!==1||h!==1)do if(b--,h--,h<0||i[b]!==w[h]){var P=`
13
- `+i[b].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&q.set(e,P),P}while(b>=1&&h>=0);break}}}finally{ee=!1,X.current=m,rr(),Error.prepareStackTrace=f}var L=e?e.displayName||e.name:"",Fe=L?z(L):"";return typeof e=="function"&&q.set(e,Fe),Fe}function nr(e,t,n){return _e(e,!1)}function ar(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function H(e,t,n){if(e==null)return"";if(typeof e=="function")return _e(e,ar(e));if(typeof e=="string")return z(e);switch(e){case R:return z("Suspense");case g:return z("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case u:return nr(e.render);case T:return H(e.type,t,n);case x:{var a=e,f=a._payload,m=a._init;try{return H(m(f),t,n)}catch{}}}return""}var Z=Object.prototype.hasOwnProperty,Se={},Ce=A.ReactDebugCurrentFrame;function G(e){if(e){var t=e._owner,n=H(e.type,e._source,t?t.type:null);Ce.setExtraStackFrame(n)}else Ce.setExtraStackFrame(null)}function or(e,t,n,a,f){{var m=Function.call.bind(Z);for(var c in e)if(m(e,c)){var i=void 0;try{if(typeof e[c]!="function"){var w=Error((a||"React class")+": "+n+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw w.name="Invariant Violation",w}i=e[c](t,c,a,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(b){i=b}i&&!(i instanceof Error)&&(G(f),S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",n,c,typeof i),G(null)),i instanceof Error&&!(i.message in Se)&&(Se[i.message]=!0,G(f),S("Failed %s type: %s",n,i.message),G(null))}}}var ir=Array.isArray;function re(e){return ir(e)}function sr(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,n=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function ur(e){try{return Te(e),!1}catch{return!0}}function Te(e){return""+e}function we(e){if(ur(e))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",sr(e)),Te(e)}var U=A.ReactCurrentOwner,cr={key:!0,ref:!0,__self:!0,__source:!0},xe,Pe,te;te={};function lr(e){if(Z.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function fr(e){if(Z.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function dr(e,t){if(typeof e.ref=="string"&&U.current&&t&&U.current.stateNode!==t){var n=O(U.current.type);te[n]||(S('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',O(U.current.type),e.ref),te[n]=!0)}}function pr(e,t){{var n=function(){xe||(xe=!0,S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}}function vr(e,t){{var n=function(){Pe||(Pe=!0,S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}}var mr=function(e,t,n,a,f,m,c){var i={$$typeof:s,type:e,key:t,ref:n,props:c,_owner:m};return i._store={},Object.defineProperty(i._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(i,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(i,"_source",{configurable:!1,enumerable:!1,writable:!1,value:f}),Object.freeze&&(Object.freeze(i.props),Object.freeze(i)),i};function yr(e,t,n,a,f){{var m,c={},i=null,w=null;n!==void 0&&(we(n),i=""+n),fr(t)&&(we(t.key),i=""+t.key),lr(t)&&(w=t.ref,dr(t,f));for(m in t)Z.call(t,m)&&!cr.hasOwnProperty(m)&&(c[m]=t[m]);if(e&&e.defaultProps){var b=e.defaultProps;for(m in b)c[m]===void 0&&(c[m]=b[m])}if(i||w){var h=typeof e=="function"?e.displayName||e.name||"Unknown":e;i&&pr(c,h),w&&vr(c,h)}return mr(e,i,w,f,a,U.current,c)}}var ne=A.ReactCurrentOwner,Oe=A.ReactDebugCurrentFrame;function I(e){if(e){var t=e._owner,n=H(e.type,e._source,t?t.type:null);Oe.setExtraStackFrame(n)}else Oe.setExtraStackFrame(null)}var ae;ae=!1;function oe(e){return typeof e=="object"&&e!==null&&e.$$typeof===s}function je(){{if(ne.current){var e=O(ne.current.type);if(e)return`
13
+ `+i[b].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&q.set(e,P),P}while(b>=1&&h>=0);break}}}finally{Q=!1,K.current=m,tr(),Error.prepareStackTrace=f}var L=e?e.displayName||e.name:"",Fe=L?z(L):"";return typeof e=="function"&&q.set(e,Fe),Fe}function ar(e,t,n){return _e(e,!1)}function or(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function H(e,t,n){if(e==null)return"";if(typeof e=="function")return _e(e,or(e));if(typeof e=="string")return z(e);switch(e){case R:return z("Suspense");case g:return z("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case u:return ar(e.render);case T:return H(e.type,t,n);case x:{var a=e,f=a._payload,m=a._init;try{return H(m(f),t,n)}catch{}}}return""}var Z=Object.prototype.hasOwnProperty,Se={},Ce=A.ReactDebugCurrentFrame;function J(e){if(e){var t=e._owner,n=H(e.type,e._source,t?t.type:null);Ce.setExtraStackFrame(n)}else Ce.setExtraStackFrame(null)}function ir(e,t,n,a,f){{var m=Function.call.bind(Z);for(var c in e)if(m(e,c)){var i=void 0;try{if(typeof e[c]!="function"){var w=Error((a||"React class")+": "+n+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw w.name="Invariant Violation",w}i=e[c](t,c,a,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(b){i=b}i&&!(i instanceof Error)&&(J(f),S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",n,c,typeof i),J(null)),i instanceof Error&&!(i.message in Se)&&(Se[i.message]=!0,J(f),S("Failed %s type: %s",n,i.message),J(null))}}}var sr=Array.isArray;function ee(e){return sr(e)}function ur(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,n=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function cr(e){try{return Te(e),!1}catch{return!0}}function Te(e){return""+e}function we(e){if(cr(e))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ur(e)),Te(e)}var N=A.ReactCurrentOwner,lr={key:!0,ref:!0,__self:!0,__source:!0},xe,Pe,re;re={};function fr(e){if(Z.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function dr(e){if(Z.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function pr(e,t){if(typeof e.ref=="string"&&N.current&&t&&N.current.stateNode!==t){var n=O(N.current.type);re[n]||(S('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',O(N.current.type),e.ref),re[n]=!0)}}function vr(e,t){{var n=function(){xe||(xe=!0,S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}}function mr(e,t){{var n=function(){Pe||(Pe=!0,S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}}var yr=function(e,t,n,a,f,m,c){var i={$$typeof:s,type:e,key:t,ref:n,props:c,_owner:m};return i._store={},Object.defineProperty(i._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(i,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(i,"_source",{configurable:!1,enumerable:!1,writable:!1,value:f}),Object.freeze&&(Object.freeze(i.props),Object.freeze(i)),i};function gr(e,t,n,a,f){{var m,c={},i=null,w=null;n!==void 0&&(we(n),i=""+n),dr(t)&&(we(t.key),i=""+t.key),fr(t)&&(w=t.ref,pr(t,f));for(m in t)Z.call(t,m)&&!lr.hasOwnProperty(m)&&(c[m]=t[m]);if(e&&e.defaultProps){var b=e.defaultProps;for(m in b)c[m]===void 0&&(c[m]=b[m])}if(i||w){var h=typeof e=="function"?e.displayName||e.name||"Unknown":e;i&&vr(c,h),w&&mr(c,h)}return yr(e,i,w,f,a,N.current,c)}}var te=A.ReactCurrentOwner,Oe=A.ReactDebugCurrentFrame;function I(e){if(e){var t=e._owner,n=H(e.type,e._source,t?t.type:null);Oe.setExtraStackFrame(n)}else Oe.setExtraStackFrame(null)}var ne;ne=!1;function ae(e){return typeof e=="object"&&e!==null&&e.$$typeof===s}function je(){{if(te.current){var e=O(te.current.type);if(e)return`
14
14
 
15
- Check the render method of \``+e+"`."}return""}}function gr(e){{if(e!==void 0){var t=e.fileName.replace(/^.*[\\\/]/,""),n=e.lineNumber;return`
15
+ Check the render method of \``+e+"`."}return""}}function Rr(e){{if(e!==void 0){var t=e.fileName.replace(/^.*[\\\/]/,""),n=e.lineNumber;return`
16
16
 
17
- Check your code at `+t+":"+n+"."}return""}}var ke={};function Rr(e){{var t=je();if(!t){var n=typeof e=="string"?e:e.displayName||e.name;n&&(t=`
17
+ Check your code at `+t+":"+n+"."}return""}}var ke={};function br(e){{var t=je();if(!t){var n=typeof e=="string"?e:e.displayName||e.name;n&&(t=`
18
18
 
19
- Check the top-level render call using <`+n+">.")}return t}}function De(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var n=Rr(t);if(ke[n])return;ke[n]=!0;var a="";e&&e._owner&&e._owner!==ne.current&&(a=" It was passed a child from "+O(e._owner.type)+"."),I(e),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,a),I(null)}}function Me(e,t){{if(typeof e!="object")return;if(re(e))for(var n=0;n<e.length;n++){var a=e[n];oe(a)&&De(a,t)}else if(oe(e))e._store&&(e._store.validated=!0);else if(e){var f=W(e);if(typeof f=="function"&&f!==e.entries)for(var m=f.call(e),c;!(c=m.next()).done;)oe(c.value)&&De(c.value,t)}}}function br(e){{var t=e.type;if(t==null||typeof t=="string")return;var n;if(typeof t=="function")n=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===u||t.$$typeof===T))n=t.propTypes;else return;if(n){var a=O(t);or(n,e.props,"prop",a,e)}else if(t.PropTypes!==void 0&&!ae){ae=!0;var f=O(t);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",f||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Er(e){{for(var t=Object.keys(e.props),n=0;n<t.length;n++){var a=t[n];if(a!=="children"&&a!=="key"){I(e),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),I(null);break}}e.ref!==null&&(I(e),S("Invalid attribute `ref` supplied to `React.Fragment`."),I(null))}}function Ae(e,t,n,a,f,m){{var c=Xe(e);if(!c){var i="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(i+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var w=gr(f);w?i+=w:i+=je();var b;e===null?b="null":re(e)?b="array":e!==void 0&&e.$$typeof===s?(b="<"+(O(e.type)||"Unknown")+" />",i=" Did you accidentally export a JSX literal instead of a component?"):b=typeof e,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",b,i)}var h=yr(e,t,n,f,m);if(h==null)return h;if(c){var P=t.children;if(P!==void 0)if(a)if(re(P)){for(var L=0;L<P.length;L++)Me(P[L],e);Object.freeze&&Object.freeze(P)}else S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Me(P,e)}return e===_?Er(h):br(h),h}}function hr(e,t,n){return Ae(e,t,n,!0)}function _r(e,t,n){return Ae(e,t,n,!1)}var Sr=_r,Cr=hr;V.Fragment=_,V.jsx=Sr,V.jsxs=Cr}()),V}var Y={};/**
19
+ Check the top-level render call using <`+n+">.")}return t}}function De(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var n=br(t);if(ke[n])return;ke[n]=!0;var a="";e&&e._owner&&e._owner!==te.current&&(a=" It was passed a child from "+O(e._owner.type)+"."),I(e),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,a),I(null)}}function Me(e,t){{if(typeof e!="object")return;if(ee(e))for(var n=0;n<e.length;n++){var a=e[n];ae(a)&&De(a,t)}else if(ae(e))e._store&&(e._store.validated=!0);else if(e){var f=W(e);if(typeof f=="function"&&f!==e.entries)for(var m=f.call(e),c;!(c=m.next()).done;)ae(c.value)&&De(c.value,t)}}}function Er(e){{var t=e.type;if(t==null||typeof t=="string")return;var n;if(typeof t=="function")n=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===u||t.$$typeof===T))n=t.propTypes;else return;if(n){var a=O(t);ir(n,e.props,"prop",a,e)}else if(t.PropTypes!==void 0&&!ne){ne=!0;var f=O(t);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",f||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function hr(e){{for(var t=Object.keys(e.props),n=0;n<t.length;n++){var a=t[n];if(a!=="children"&&a!=="key"){I(e),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),I(null);break}}e.ref!==null&&(I(e),S("Invalid attribute `ref` supplied to `React.Fragment`."),I(null))}}function Ae(e,t,n,a,f,m){{var c=Qe(e);if(!c){var i="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(i+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var w=Rr(f);w?i+=w:i+=je();var b;e===null?b="null":ee(e)?b="array":e!==void 0&&e.$$typeof===s?(b="<"+(O(e.type)||"Unknown")+" />",i=" Did you accidentally export a JSX literal instead of a component?"):b=typeof e,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",b,i)}var h=gr(e,t,n,f,m);if(h==null)return h;if(c){var P=t.children;if(P!==void 0)if(a)if(ee(P)){for(var L=0;L<P.length;L++)Me(P[L],e);Object.freeze&&Object.freeze(P)}else S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Me(P,e)}return e===_?hr(h):Er(h),h}}function _r(e,t,n){return Ae(e,t,n,!0)}function Sr(e,t,n){return Ae(e,t,n,!1)}var Cr=Sr,Tr=_r;V.Fragment=_,V.jsx=Cr,V.jsxs=Tr}()),V}var Y={};/**
20
20
  * @license React
21
21
  * react-jsx-runtime.production.min.js
22
22
  *
@@ -24,4 +24,4 @@ Check the top-level render call using <`+n+">.")}return t}}function De(e,t){{if(
24
24
  *
25
25
  * This source code is licensed under the MIT license found in the
26
26
  * LICENSE file in the root directory of this source tree.
27
- */var Le;function jr(){if(Le)return Y;Le=1;var r=C,s=Symbol.for("react.element"),d=Symbol.for("react.fragment"),_=Object.prototype.hasOwnProperty,o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,y={key:!0,ref:!0,__self:!0,__source:!0};function l(E,u,R){var g,T={},x=null,p=null;R!==void 0&&(x=""+R),u.key!==void 0&&(x=""+u.key),u.ref!==void 0&&(p=u.ref);for(g in u)_.call(u,g)&&!y.hasOwnProperty(g)&&(T[g]=u[g]);if(E&&E.defaultProps)for(g in u=E.defaultProps,u)T[g]===void 0&&(T[g]=u[g]);return{$$typeof:s,type:E,key:x,ref:p,props:T,_owner:o.current}}return Y.Fragment=d,Y.jsx=l,Y.jsxs=l,Y}process.env.NODE_ENV==="production"?se.exports=jr():se.exports=Or();var ie=se.exports;function kr({children:r,maps:s,externalSync:d}){const[_,o]=C.useReducer(Ve,{...$.state,maps:s.reduce((p,v)=>(p[v.id]={...v,isLoaded:!1},p),$.state.maps)}),y=C.useRef(s.reduce((p,v)=>(p[v.id]={instanceRef:{current:null},overlayRef:{current:null}},p),{})),l=C.useCallback((p,v,M)=>{s[0].id===p&&d?.({type:v,payload:M})},[d,s]),E=C.useCallback((p,v)=>{o({type:k.SetViewState,payload:{id:v,viewState:p}}),l(v,k.SetViewState,p)},[o,l]),u=C.useCallback(({height:p,width:v},M)=>{o({type:k.SetResize,payload:{id:M,height:p,width:v}}),l(M,k.SetResize,{height:p,width:v})},[o,l]),R=C.useCallback((p,v)=>{o({type:k.SetBasemap,payload:{id:v,basemap:p}})},[o]),g=C.useCallback((p,v)=>{o({type:k.SetZoom,payload:{id:v,zoom:p}})},[o]),T=C.useCallback((p,v)=>{o({type:k.SetLoaded,payload:{id:v,value:p}})},[o]),x=C.useRef({setViewState:E,setBasemap:R,setResize:u,setZoom:g,setLoaded:T});return ie.jsx(le.Provider,{value:x.current,children:ie.jsx(ce.Provider,{value:y,children:ie.jsx(ue.Provider,{value:_,children:r})})})}const We={NUMBER:{style:"decimal",maximumFractionDigits:1,minimumFractionDigits:0,notation:"compact",compactDisplay:"short"},CURRENCY:{style:"currency",currency:"USD",maximumFractionDigits:2,minimumFractionDigits:2,notation:"compact",compactDisplay:"short"},DATE:{year:"numeric",month:"2-digit",day:"2-digit"}};function ze(r,s,d){return Intl.NumberFormat(s,d).format(r)}function Dr(r,s,d={}){return ze(r,s,{...We.NUMBER,...d})}function Mr(r,s,d={}){return ze(r,s,{...We.CURRENCY,...d})}var D=(r=>(r.CURRENCY="CURRENCY",r.DEFAULT="DEFAULT",r.NUMBER="NUMBER",r))(D||{});const Ne={[D.CURRENCY]:{type:D.CURRENCY,format:(r,s)=>Mr(r,s)},[D.NUMBER]:{type:D.NUMBER,format:(r,s)=>Dr(r,s)},[D.DEFAULT]:{type:D.DEFAULT,format:r=>r.toLocaleString()}};function Ar({properties:r,formatters:s={},includeColumns:d=Object.keys(r),locale:_="en-US",showColumnName:o=!0,title:y,getColumnName:l=Ur,getFieldHtml:E=Ir,getTitle:u=Fr,getValue:R=Lr}){const g=y?u(y):"",x=d.reduce((p,v)=>{const M=s[v],W=r[v],A=R(W,_,M),S=o?l(v):"";return p+E(S,A)},"");return g+x}function Fr(r){return`<h3 style="margin: 0"><strong>${r}</strong></h3></br>`}function Ir(r,s){return`${r}${s}</br>`}function Lr(r,s,d){try{return Nr(d)(r,s)}catch{return r}}function Nr(r){return typeof r=="function"?r:(r&&Ne[r]||Ne[D.DEFAULT]).format}function Ur(r){return`<strong>${r}</strong>: `}exports.CartoBasemapURL=J;exports.CartoBasemapsNames=Ue;exports.FormatterTypes=D;exports.GMapsBasemap=K;exports.MAPS_BASEMAP=Tr;exports.MapActions=k;exports.MapActionsContext=le;exports.MapContext=ue;exports.MapProvider=kr;exports.MapReferencesContext=ce;exports.MapsTypes=Be;exports.objectToHtml=Ar;exports.reducer=Ve;exports.useMap=Ye;exports.useMapActions=$e;exports.useMapActionsByID=Pr;exports.useMapByID=wr;exports.useMapRefences=fe;exports.useMapReferencesByID=xr;
27
+ */var Le;function jr(){if(Le)return Y;Le=1;var r=C,s=Symbol.for("react.element"),d=Symbol.for("react.fragment"),_=Object.prototype.hasOwnProperty,o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,y={key:!0,ref:!0,__self:!0,__source:!0};function l(E,u,R){var g,T={},x=null,p=null;R!==void 0&&(x=""+R),u.key!==void 0&&(x=""+u.key),u.ref!==void 0&&(p=u.ref);for(g in u)_.call(u,g)&&!y.hasOwnProperty(g)&&(T[g]=u[g]);if(E&&E.defaultProps)for(g in u=E.defaultProps,u)T[g]===void 0&&(T[g]=u[g]);return{$$typeof:s,type:E,key:x,ref:p,props:T,_owner:o.current}}return Y.Fragment=d,Y.jsx=l,Y.jsxs=l,Y}process.env.NODE_ENV==="production"?se.exports=jr():se.exports=Or();var oe=se.exports;function kr({children:r,maps:s,externalSync:d}){const[_,o]=C.useReducer(Ye,{...$.state,maps:s.reduce((p,v)=>(p[v.id]={...v,isLoaded:!1},p),$.state.maps)}),y=C.useRef(s.reduce((p,v)=>(p[v.id]={instanceRef:{current:null},overlayRef:{current:null}},p),{})),l=C.useCallback((p,v,M)=>{s[0].id===p&&d?.({type:v,payload:M})},[d,s]),E=C.useCallback((p,v)=>{o({type:k.SetViewState,payload:{id:v,viewState:p}}),l(v,k.SetViewState,p)},[o,l]),u=C.useCallback(({height:p,width:v},M)=>{o({type:k.SetResize,payload:{id:M,height:p,width:v}}),l(M,k.SetResize,{height:p,width:v})},[o,l]),R=C.useCallback((p,v)=>{o({type:k.SetBasemap,payload:{id:v,basemap:p}})},[o]),g=C.useCallback((p,v)=>{o({type:k.SetZoom,payload:{id:v,zoom:p}})},[o]),T=C.useCallback((p,v)=>{o({type:k.SetLoaded,payload:{id:v,value:p}})},[o]),x=C.useRef({setViewState:E,setBasemap:R,setResize:u,setZoom:g,setLoaded:T});return oe.jsx(le.Provider,{value:x.current,children:oe.jsx(ce.Provider,{value:y,children:oe.jsx(ue.Provider,{value:_,children:r})})})}const ze={NUMBER:{style:"decimal",maximumFractionDigits:1,minimumFractionDigits:0,notation:"compact",compactDisplay:"short"},CURRENCY:{style:"currency",currency:"USD",maximumFractionDigits:2,minimumFractionDigits:2,notation:"compact",compactDisplay:"short"},DATE:{year:"numeric",month:"2-digit",day:"2-digit"}};function qe(r,s,d){return Intl.NumberFormat(s,d).format(r)}function Dr(r,s,d={}){return qe(r,s,{...ze.NUMBER,...d})}function Mr(r,s,d={}){return qe(r,s,{...ze.CURRENCY,...d})}var D=(r=>(r.CURRENCY="CURRENCY",r.DEFAULT="DEFAULT",r.NUMBER="NUMBER",r))(D||{});const Ue={[D.CURRENCY]:{type:D.CURRENCY,format:(r,s)=>Mr(r,s)},[D.NUMBER]:{type:D.NUMBER,format:(r,s)=>Dr(r,s)},[D.DEFAULT]:{type:D.DEFAULT,format:r=>r.toLocaleString()}};function Ar({properties:r,formatters:s={},includeColumns:d=Object.keys(r),locale:_="en-US",showColumnName:o=!0,title:y,getColumnName:l=Nr,getFieldHtml:E=Ir,getTitle:u=Fr,getValue:R=Lr}){const g=y?u(y):"",x=d.reduce((p,v)=>{const M=s[v],W=r[v],A=R(W,_,M),S=o?l(v):"";return p+E(S,A)},"");return g+x}function Fr(r){return`<h3 style="margin: 0"><strong>${r}</strong></h3></br>`}function Ir(r,s){return`${r}${s}</br>`}function Lr(r,s,d){try{return Ur(d)(r,s)}catch{return r}}function Ur(r){return typeof r=="function"?r:(r&&Ue[r]||Ue[D.DEFAULT]).format}function Nr(r){return`<strong>${r}</strong>: `}exports.CartoBasemapURL=G;exports.CartoBasemapsNames=Be;exports.FormatterTypes=D;exports.GMapsBasemap=Ne;exports.MAPS_BASEMAP=ie;exports.MapActions=k;exports.MapActionsContext=le;exports.MapContext=ue;exports.MapProvider=kr;exports.MapReferencesContext=ce;exports.MapsTypes=Ve;exports.objectToHtml=Ar;exports.reducer=Ye;exports.useMap=$e;exports.useMapActions=We;exports.useMapActionsByID=Pr;exports.useMapByID=wr;exports.useMapRefences=fe;exports.useMapReferencesByID=xr;
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
- import Ne, { createContext as ue, useContext as ce, useReducer as wr, useRef as Ae, useCallback as I } from "react";
2
- var ie = /* @__PURE__ */ ((r) => (r.Roadmap = "roadmap", r.Satellite = "satellite", r.Hybrid = "hybrid", r))(ie || {}), Tr = /* @__PURE__ */ ((r) => (r.DarkMatter = "dark-matter", r.Positron = "positron", r.Voyager = "voyager", r))(Tr || {});
1
+ import Ue, { createContext as se, useContext as ue, useReducer as wr, useRef as Fe, useCallback as I } from "react";
2
+ var Tr = /* @__PURE__ */ ((r) => (r.Roadmap = "roadmap", r.Satellite = "satellite", r.Hybrid = "hybrid", r))(Tr || {}), Cr = /* @__PURE__ */ ((r) => (r.DarkMatter = "dark-matter", r.Positron = "positron", r.Voyager = "voyager", r))(Cr || {});
3
3
  const ae = {
4
4
  positron: "https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",
5
5
  voyager: "https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",
6
6
  "dark-matter": "https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"
7
7
  };
8
- var Cr = /* @__PURE__ */ ((r) => (r.Maplibre = "maplibre", r.GoogleMaps = "google-maps", r))(Cr || {});
9
- const Vr = {
8
+ var Or = /* @__PURE__ */ ((r) => (r.Maplibre = "maplibre", r.GoogleMaps = "google-maps", r))(Or || {});
9
+ const Ae = {
10
10
  positron: {
11
11
  url: ae.positron,
12
12
  type: "maplibre"
@@ -55,60 +55,56 @@ const Vr = {
55
55
  setZoom: V,
56
56
  setLoaded: V
57
57
  }
58
- }, Ue = ue(
58
+ }, Ne = se(
59
59
  B.state
60
- ), Ve = ue(B.references), Ye = ue(
60
+ ), Ve = se(B.references), Ye = se(
61
61
  B.actions
62
62
  );
63
63
  var D = /* @__PURE__ */ ((r) => (r.SetViewState = "SetViewState", r.SetBasemap = "SetBasemap", r.SetResize = "SetResize", r.SetZoom = "SetZoom", r.SetLoaded = "SetLoaded", r))(D || {});
64
- function Or(r, { type: s, payload: d }) {
64
+ function Pr(r, { type: s, payload: d }) {
65
65
  return {
66
66
  SetViewState: () => {
67
- const { id: o, viewState: g } = d, l = { ...r.maps };
67
+ const { id: o, viewState: y } = d, l = { ...r.maps };
68
68
  return l[o] = {
69
69
  ...r.maps[o],
70
- viewState: g
70
+ viewState: y
71
71
  }, {
72
72
  ...r,
73
73
  maps: l
74
74
  };
75
75
  },
76
76
  SetResize: () => {
77
- const { id: o, width: g, height: l } = d, E = { ...r.maps };
78
- return E[o] = {
77
+ const { id: o, width: y, height: l } = d, b = { ...r.maps };
78
+ return b[o] = {
79
79
  ...r.maps[o],
80
80
  viewState: {
81
81
  ...r.maps[o].viewState,
82
- width: g,
82
+ width: y,
83
83
  height: l
84
84
  }
85
85
  }, {
86
86
  ...r,
87
- maps: E
87
+ maps: b
88
88
  };
89
89
  },
90
90
  SetBasemap: () => {
91
- const { id: o, basemap: g } = d, l = { ...r.maps }, { basemap: E } = l[o], u = Object.values(ie).includes(
92
- E
93
- ), R = Object.values(ie).includes(
94
- g
95
- ), y = u === R;
91
+ const { id: o, basemap: y } = d, l = { ...r.maps }, { basemap: b } = l[o], u = Ae[b]?.type, R = Ae[y]?.type, g = u === R;
96
92
  return l[o] = {
97
93
  ...r.maps[o],
98
- basemap: g,
99
- isLoaded: y
94
+ basemap: y,
95
+ isLoaded: g
100
96
  }, {
101
97
  ...r,
102
98
  maps: l
103
99
  };
104
100
  },
105
101
  SetZoom: () => {
106
- const { id: o, zoom: g } = d, l = { ...r.maps };
102
+ const { id: o, zoom: y } = d, l = { ...r.maps };
107
103
  return l[o] = {
108
104
  ...r.maps[o],
109
105
  viewState: {
110
106
  ...r.maps[o].viewState,
111
- zoom: g
107
+ zoom: y
112
108
  }
113
109
  }, {
114
110
  ...r,
@@ -116,10 +112,10 @@ function Or(r, { type: s, payload: d }) {
116
112
  };
117
113
  },
118
114
  SetLoaded: () => {
119
- const { id: o, value: g } = d, l = { ...r.maps };
115
+ const { id: o, value: y } = d, l = { ...r.maps };
120
116
  return l[o] = {
121
117
  ...r.maps[o],
122
- isLoaded: g
118
+ isLoaded: y
123
119
  }, {
124
120
  ...r,
125
121
  maps: l
@@ -127,54 +123,54 @@ function Or(r, { type: s, payload: d }) {
127
123
  }
128
124
  }[s]?.() ?? r;
129
125
  }
130
- function Pr(r) {
131
- return ce(Ue).maps[r];
126
+ function xr(r) {
127
+ return ue(Ne).maps[r];
132
128
  }
133
129
  function $e(r) {
134
- const s = ce(Ve), { instanceRef: d, overlayRef: _ } = s.current[r], o = () => {
130
+ const s = ue(Ve), { instanceRef: d, overlayRef: _ } = s.current[r], o = () => {
135
131
  const R = d?.current;
136
132
  return R?.deck || R?._deck;
137
- }, g = () => _?.current, l = () => o()._getViewState(), E = (R) => o()?.getViewports(R);
133
+ }, y = () => _?.current, l = () => o()._getViewState(), b = (R) => o()?.getViewports(R);
138
134
  return {
139
135
  instanceRef: d,
140
136
  overlayRef: _,
141
137
  getDeckInstance: o,
142
- getOverlayInstance: g,
138
+ getOverlayInstance: y,
143
139
  getViewState: l,
144
- getViewport: (R = 0, y) => E(y)?.[R],
145
- getViewports: E
140
+ getViewport: (R = 0, g) => b(g)?.[R],
141
+ getViewports: b
146
142
  };
147
143
  }
148
- function xr(r) {
149
- const { setBasemap: s, setResize: d, setViewState: _, setZoom: o, setLoaded: g } = ce(Ye), { getViewport: l } = $e(r);
144
+ function jr(r) {
145
+ const { setBasemap: s, setResize: d, setViewState: _, setZoom: o, setLoaded: y } = ue(Ye), { getViewport: l } = $e(r);
150
146
  return {
151
147
  setBasemap: (u) => s(u, r),
152
148
  setResize: (u) => d(u, r),
153
149
  setViewState: (u) => _(u, r),
154
150
  setZoom: (u) => o(u, r),
155
- setLoaded: (u) => g(u, r),
151
+ setLoaded: (u) => y(u, r),
156
152
  fitBounds: (u, {
157
153
  boundsOptions: R,
158
- viewStateOptions: y
154
+ viewStateOptions: g
159
155
  } = {}) => {
160
156
  const w = l(), { latitude: C, longitude: p, zoom: v } = w.fitBounds(
161
157
  u,
162
158
  R
163
159
  );
164
- _({ ...y, latitude: C, longitude: p, zoom: v }, r);
160
+ _({ ...g, latitude: C, longitude: p, zoom: v }, r);
165
161
  }
166
162
  };
167
163
  }
168
164
  function Yr(r) {
169
- return Pr(r);
165
+ return xr(r);
170
166
  }
171
167
  function $r(r) {
172
168
  return $e(r);
173
169
  }
174
170
  function Br(r) {
175
- return xr(r);
171
+ return jr(r);
176
172
  }
177
- var se = { exports: {} }, Y = {};
173
+ var ie = { exports: {} }, Y = {};
178
174
  /**
179
175
  * @license React
180
176
  * react-jsx-runtime.development.js
@@ -185,9 +181,9 @@ var se = { exports: {} }, Y = {};
185
181
  * LICENSE file in the root directory of this source tree.
186
182
  */
187
183
  var Me;
188
- function jr() {
184
+ function kr() {
189
185
  return Me || (Me = 1, process.env.NODE_ENV !== "production" && function() {
190
- var r = Ne, s = Symbol.for("react.element"), d = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), E = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), R = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), v = Symbol.iterator, j = "@@iterator";
186
+ var r = Ue, s = Symbol.for("react.element"), d = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), b = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), R = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), v = Symbol.iterator, j = "@@iterator";
191
187
  function W(e) {
192
188
  if (e === null || typeof e != "object")
193
189
  return null;
@@ -212,14 +208,14 @@ function jr() {
212
208
  m.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, m);
213
209
  }
214
210
  }
215
- var Ze = !1, qe = !1, He = !1, Ge = !1, Je = !1, le;
216
- le = Symbol.for("react.module.reference");
211
+ var Ze = !1, qe = !1, He = !1, Je = !1, Ge = !1, ce;
212
+ ce = Symbol.for("react.module.reference");
217
213
  function Ke(e) {
218
- return !!(typeof e == "string" || typeof e == "function" || e === _ || e === g || Je || e === o || e === R || e === y || Ge || e === p || Ze || qe || He || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === w || e.$$typeof === l || e.$$typeof === E || e.$$typeof === u || // This needs to include all possible module reference object
214
+ return !!(typeof e == "string" || typeof e == "function" || e === _ || e === y || Ge || e === o || e === R || e === g || Je || e === p || Ze || qe || He || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === w || e.$$typeof === l || e.$$typeof === b || e.$$typeof === u || // This needs to include all possible module reference object
219
215
  // types supported by any Flight configuration anywhere since
220
216
  // we don't know which Flight build this will end up being used
221
217
  // with.
222
- e.$$typeof === le || e.getModuleId !== void 0));
218
+ e.$$typeof === ce || e.getModuleId !== void 0));
223
219
  }
224
220
  function Xe(e, t, n) {
225
221
  var a = e.displayName;
@@ -228,7 +224,7 @@ function jr() {
228
224
  var f = t.displayName || t.name || "";
229
225
  return f !== "" ? n + "(" + f + ")" : n;
230
226
  }
231
- function fe(e) {
227
+ function le(e) {
232
228
  return e.displayName || "Context";
233
229
  }
234
230
  function P(e) {
@@ -243,23 +239,23 @@ function jr() {
243
239
  return "Fragment";
244
240
  case d:
245
241
  return "Portal";
246
- case g:
242
+ case y:
247
243
  return "Profiler";
248
244
  case o:
249
245
  return "StrictMode";
250
246
  case R:
251
247
  return "Suspense";
252
- case y:
248
+ case g:
253
249
  return "SuspenseList";
254
250
  }
255
251
  if (typeof e == "object")
256
252
  switch (e.$$typeof) {
257
- case E:
253
+ case b:
258
254
  var t = e;
259
- return fe(t) + ".Consumer";
255
+ return le(t) + ".Consumer";
260
256
  case l:
261
257
  var n = e;
262
- return fe(n._context) + ".Provider";
258
+ return le(n._context) + ".Provider";
263
259
  case u:
264
260
  return Xe(e, e.render, "ForwardRef");
265
261
  case w:
@@ -276,18 +272,18 @@ function jr() {
276
272
  }
277
273
  return null;
278
274
  }
279
- var A = Object.assign, N = 0, de, pe, ve, me, ge, ye, Re;
280
- function be() {
275
+ var A = Object.assign, U = 0, fe, de, pe, ve, me, ye, ge;
276
+ function Re() {
281
277
  }
282
- be.__reactDisabledLog = !0;
278
+ Re.__reactDisabledLog = !0;
283
279
  function Qe() {
284
280
  {
285
- if (N === 0) {
286
- de = console.log, pe = console.info, ve = console.warn, me = console.error, ge = console.group, ye = console.groupCollapsed, Re = console.groupEnd;
281
+ if (U === 0) {
282
+ fe = console.log, de = console.info, pe = console.warn, ve = console.error, me = console.group, ye = console.groupCollapsed, ge = console.groupEnd;
287
283
  var e = {
288
284
  configurable: !0,
289
285
  enumerable: !0,
290
- value: be,
286
+ value: Re,
291
287
  writable: !0
292
288
  };
293
289
  Object.defineProperties(console, {
@@ -300,12 +296,12 @@ function jr() {
300
296
  groupEnd: e
301
297
  });
302
298
  }
303
- N++;
299
+ U++;
304
300
  }
305
301
  }
306
302
  function er() {
307
303
  {
308
- if (N--, N === 0) {
304
+ if (U--, U === 0) {
309
305
  var e = {
310
306
  configurable: !0,
311
307
  enumerable: !0,
@@ -313,32 +309,32 @@ function jr() {
313
309
  };
314
310
  Object.defineProperties(console, {
315
311
  log: A({}, e, {
316
- value: de
312
+ value: fe
317
313
  }),
318
314
  info: A({}, e, {
319
- value: pe
315
+ value: de
320
316
  }),
321
317
  warn: A({}, e, {
322
- value: ve
318
+ value: pe
323
319
  }),
324
320
  error: A({}, e, {
325
- value: me
321
+ value: ve
326
322
  }),
327
323
  group: A({}, e, {
328
- value: ge
324
+ value: me
329
325
  }),
330
326
  groupCollapsed: A({}, e, {
331
327
  value: ye
332
328
  }),
333
329
  groupEnd: A({}, e, {
334
- value: Re
330
+ value: ge
335
331
  })
336
332
  });
337
333
  }
338
- N < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
334
+ U < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
339
335
  }
340
336
  }
341
- var J = k.ReactCurrentDispatcher, K;
337
+ var G = k.ReactCurrentDispatcher, K;
342
338
  function z(e, t, n) {
343
339
  {
344
340
  if (K === void 0)
@@ -370,7 +366,7 @@ function jr() {
370
366
  var f = Error.prepareStackTrace;
371
367
  Error.prepareStackTrace = void 0;
372
368
  var m;
373
- m = J.current, J.current = null, Qe();
369
+ m = G.current, G.current = null, Qe();
374
370
  try {
375
371
  if (t) {
376
372
  var c = function() {
@@ -407,26 +403,26 @@ function jr() {
407
403
  if (x && a && typeof x.stack == "string") {
408
404
  for (var i = x.stack.split(`
409
405
  `), T = a.stack.split(`
410
- `), b = i.length - 1, h = T.length - 1; b >= 1 && h >= 0 && i[b] !== T[h]; )
406
+ `), E = i.length - 1, h = T.length - 1; E >= 1 && h >= 0 && i[E] !== T[h]; )
411
407
  h--;
412
- for (; b >= 1 && h >= 0; b--, h--)
413
- if (i[b] !== T[h]) {
414
- if (b !== 1 || h !== 1)
408
+ for (; E >= 1 && h >= 0; E--, h--)
409
+ if (i[E] !== T[h]) {
410
+ if (E !== 1 || h !== 1)
415
411
  do
416
- if (b--, h--, h < 0 || i[b] !== T[h]) {
412
+ if (E--, h--, h < 0 || i[E] !== T[h]) {
417
413
  var O = `
418
- ` + i[b].replace(" at new ", " at ");
414
+ ` + i[E].replace(" at new ", " at ");
419
415
  return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && Z.set(e, O), O;
420
416
  }
421
- while (b >= 1 && h >= 0);
417
+ while (E >= 1 && h >= 0);
422
418
  break;
423
419
  }
424
420
  }
425
421
  } finally {
426
- X = !1, J.current = m, er(), Error.prepareStackTrace = f;
422
+ X = !1, G.current = m, er(), Error.prepareStackTrace = f;
427
423
  }
428
- var L = e ? e.displayName || e.name : "", Fe = L ? z(L) : "";
429
- return typeof e == "function" && Z.set(e, Fe), Fe;
424
+ var L = e ? e.displayName || e.name : "", De = L ? z(L) : "";
425
+ return typeof e == "function" && Z.set(e, De), De;
430
426
  }
431
427
  function tr(e, t, n) {
432
428
  return Ee(e, !1);
@@ -445,7 +441,7 @@ function jr() {
445
441
  switch (e) {
446
442
  case R:
447
443
  return z("Suspense");
448
- case y:
444
+ case g:
449
445
  return z("SuspenseList");
450
446
  }
451
447
  if (typeof e == "object")
@@ -464,13 +460,13 @@ function jr() {
464
460
  }
465
461
  return "";
466
462
  }
467
- var H = Object.prototype.hasOwnProperty, he = {}, _e = k.ReactDebugCurrentFrame;
468
- function G(e) {
463
+ var H = Object.prototype.hasOwnProperty, be = {}, he = k.ReactDebugCurrentFrame;
464
+ function J(e) {
469
465
  if (e) {
470
466
  var t = e._owner, n = q(e.type, e._source, t ? t.type : null);
471
- _e.setExtraStackFrame(n);
467
+ he.setExtraStackFrame(n);
472
468
  } else
473
- _e.setExtraStackFrame(null);
469
+ he.setExtraStackFrame(null);
474
470
  }
475
471
  function ar(e, t, n, a, f) {
476
472
  {
@@ -484,10 +480,10 @@ function jr() {
484
480
  throw T.name = "Invariant Violation", T;
485
481
  }
486
482
  i = e[c](t, c, a, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
487
- } catch (b) {
488
- i = b;
483
+ } catch (E) {
484
+ i = E;
489
485
  }
490
- i && !(i instanceof Error) && (G(f), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", a || "React class", n, c, typeof i), G(null)), i instanceof Error && !(i.message in he) && (he[i.message] = !0, G(f), S("Failed %s type: %s", n, i.message), G(null));
486
+ i && !(i instanceof Error) && (J(f), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", a || "React class", n, c, typeof i), J(null)), i instanceof Error && !(i.message in be) && (be[i.message] = !0, J(f), S("Failed %s type: %s", n, i.message), J(null));
491
487
  }
492
488
  }
493
489
  }
@@ -503,24 +499,24 @@ function jr() {
503
499
  }
504
500
  function sr(e) {
505
501
  try {
506
- return Se(e), !1;
502
+ return _e(e), !1;
507
503
  } catch {
508
504
  return !0;
509
505
  }
510
506
  }
511
- function Se(e) {
507
+ function _e(e) {
512
508
  return "" + e;
513
509
  }
514
- function we(e) {
510
+ function Se(e) {
515
511
  if (sr(e))
516
- return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ir(e)), Se(e);
512
+ return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ir(e)), _e(e);
517
513
  }
518
- var U = k.ReactCurrentOwner, ur = {
514
+ var N = k.ReactCurrentOwner, ur = {
519
515
  key: !0,
520
516
  ref: !0,
521
517
  __self: !0,
522
518
  __source: !0
523
- }, Te, Ce, ee;
519
+ }, we, Te, ee;
524
520
  ee = {};
525
521
  function cr(e) {
526
522
  if (H.call(e, "ref")) {
@@ -539,15 +535,15 @@ function jr() {
539
535
  return e.key !== void 0;
540
536
  }
541
537
  function fr(e, t) {
542
- if (typeof e.ref == "string" && U.current && t && U.current.stateNode !== t) {
543
- var n = P(U.current.type);
544
- ee[n] || (S('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', P(U.current.type), e.ref), ee[n] = !0);
538
+ if (typeof e.ref == "string" && N.current && t && N.current.stateNode !== t) {
539
+ var n = P(N.current.type);
540
+ ee[n] || (S('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', P(N.current.type), e.ref), ee[n] = !0);
545
541
  }
546
542
  }
547
543
  function dr(e, t) {
548
544
  {
549
545
  var n = function() {
550
- Te || (Te = !0, S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
546
+ we || (we = !0, S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
551
547
  };
552
548
  n.isReactWarning = !0, Object.defineProperty(e, "key", {
553
549
  get: n,
@@ -558,7 +554,7 @@ function jr() {
558
554
  function pr(e, t) {
559
555
  {
560
556
  var n = function() {
561
- Ce || (Ce = !0, S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
557
+ Te || (Te = !0, S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
562
558
  };
563
559
  n.isReactWarning = !0, Object.defineProperty(e, "ref", {
564
560
  get: n,
@@ -598,35 +594,35 @@ function jr() {
598
594
  function mr(e, t, n, a, f) {
599
595
  {
600
596
  var m, c = {}, i = null, T = null;
601
- n !== void 0 && (we(n), i = "" + n), lr(t) && (we(t.key), i = "" + t.key), cr(t) && (T = t.ref, fr(t, f));
597
+ n !== void 0 && (Se(n), i = "" + n), lr(t) && (Se(t.key), i = "" + t.key), cr(t) && (T = t.ref, fr(t, f));
602
598
  for (m in t)
603
599
  H.call(t, m) && !ur.hasOwnProperty(m) && (c[m] = t[m]);
604
600
  if (e && e.defaultProps) {
605
- var b = e.defaultProps;
606
- for (m in b)
607
- c[m] === void 0 && (c[m] = b[m]);
601
+ var E = e.defaultProps;
602
+ for (m in E)
603
+ c[m] === void 0 && (c[m] = E[m]);
608
604
  }
609
605
  if (i || T) {
610
606
  var h = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
611
607
  i && dr(c, h), T && pr(c, h);
612
608
  }
613
- return vr(e, i, T, f, a, U.current, c);
609
+ return vr(e, i, T, f, a, N.current, c);
614
610
  }
615
611
  }
616
- var re = k.ReactCurrentOwner, Oe = k.ReactDebugCurrentFrame;
612
+ var re = k.ReactCurrentOwner, Ce = k.ReactDebugCurrentFrame;
617
613
  function M(e) {
618
614
  if (e) {
619
615
  var t = e._owner, n = q(e.type, e._source, t ? t.type : null);
620
- Oe.setExtraStackFrame(n);
616
+ Ce.setExtraStackFrame(n);
621
617
  } else
622
- Oe.setExtraStackFrame(null);
618
+ Ce.setExtraStackFrame(null);
623
619
  }
624
620
  var te;
625
621
  te = !1;
626
622
  function ne(e) {
627
623
  return typeof e == "object" && e !== null && e.$$typeof === s;
628
624
  }
629
- function Pe() {
625
+ function Oe() {
630
626
  {
631
627
  if (re.current) {
632
628
  var e = P(re.current.type);
@@ -638,7 +634,7 @@ Check the render method of \`` + e + "`.";
638
634
  return "";
639
635
  }
640
636
  }
641
- function gr(e) {
637
+ function yr(e) {
642
638
  {
643
639
  if (e !== void 0) {
644
640
  var t = e.fileName.replace(/^.*[\\\/]/, ""), n = e.lineNumber;
@@ -649,10 +645,10 @@ Check your code at ` + t + ":" + n + ".";
649
645
  return "";
650
646
  }
651
647
  }
652
- var xe = {};
653
- function yr(e) {
648
+ var Pe = {};
649
+ function gr(e) {
654
650
  {
655
- var t = Pe();
651
+ var t = Oe();
656
652
  if (!t) {
657
653
  var n = typeof e == "string" ? e : e.displayName || e.name;
658
654
  n && (t = `
@@ -662,27 +658,27 @@ Check the top-level render call using <` + n + ">.");
662
658
  return t;
663
659
  }
664
660
  }
665
- function je(e, t) {
661
+ function xe(e, t) {
666
662
  {
667
663
  if (!e._store || e._store.validated || e.key != null)
668
664
  return;
669
665
  e._store.validated = !0;
670
- var n = yr(t);
671
- if (xe[n])
666
+ var n = gr(t);
667
+ if (Pe[n])
672
668
  return;
673
- xe[n] = !0;
669
+ Pe[n] = !0;
674
670
  var a = "";
675
671
  e && e._owner && e._owner !== re.current && (a = " It was passed a child from " + P(e._owner.type) + "."), M(e), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, a), M(null);
676
672
  }
677
673
  }
678
- function ke(e, t) {
674
+ function je(e, t) {
679
675
  {
680
676
  if (typeof e != "object")
681
677
  return;
682
678
  if (Q(e))
683
679
  for (var n = 0; n < e.length; n++) {
684
680
  var a = e[n];
685
- ne(a) && je(a, t);
681
+ ne(a) && xe(a, t);
686
682
  }
687
683
  else if (ne(e))
688
684
  e._store && (e._store.validated = !0);
@@ -690,7 +686,7 @@ Check the top-level render call using <` + n + ">.");
690
686
  var f = W(e);
691
687
  if (typeof f == "function" && f !== e.entries)
692
688
  for (var m = f.call(e), c; !(c = m.next()).done; )
693
- ne(c.value) && je(c.value, t);
689
+ ne(c.value) && xe(c.value, t);
694
690
  }
695
691
  }
696
692
  }
@@ -719,7 +715,7 @@ Check the top-level render call using <` + n + ">.");
719
715
  typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
720
716
  }
721
717
  }
722
- function br(e) {
718
+ function Er(e) {
723
719
  {
724
720
  for (var t = Object.keys(e.props), n = 0; n < t.length; n++) {
725
721
  var a = t[n];
@@ -731,16 +727,16 @@ Check the top-level render call using <` + n + ">.");
731
727
  e.ref !== null && (M(e), S("Invalid attribute `ref` supplied to `React.Fragment`."), M(null));
732
728
  }
733
729
  }
734
- function De(e, t, n, a, f, m) {
730
+ function ke(e, t, n, a, f, m) {
735
731
  {
736
732
  var c = Ke(e);
737
733
  if (!c) {
738
734
  var i = "";
739
735
  (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (i += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
740
- var T = gr(f);
741
- T ? i += T : i += Pe();
742
- var b;
743
- e === null ? b = "null" : Q(e) ? b = "array" : e !== void 0 && e.$$typeof === s ? (b = "<" + (P(e.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : b = typeof e, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", b, i);
736
+ var T = yr(f);
737
+ T ? i += T : i += Oe();
738
+ var E;
739
+ e === null ? E = "null" : Q(e) ? E = "array" : e !== void 0 && e.$$typeof === s ? (E = "<" + (P(e.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : E = typeof e, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", E, i);
744
740
  }
745
741
  var h = mr(e, t, n, f, m);
746
742
  if (h == null)
@@ -751,23 +747,23 @@ Check the top-level render call using <` + n + ">.");
751
747
  if (a)
752
748
  if (Q(O)) {
753
749
  for (var L = 0; L < O.length; L++)
754
- ke(O[L], e);
750
+ je(O[L], e);
755
751
  Object.freeze && Object.freeze(O);
756
752
  } else
757
753
  S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
758
754
  else
759
- ke(O, e);
755
+ je(O, e);
760
756
  }
761
- return e === _ ? br(h) : Rr(h), h;
757
+ return e === _ ? Er(h) : Rr(h), h;
762
758
  }
763
759
  }
764
- function Er(e, t, n) {
765
- return De(e, t, n, !0);
760
+ function br(e, t, n) {
761
+ return ke(e, t, n, !0);
766
762
  }
767
763
  function hr(e, t, n) {
768
- return De(e, t, n, !1);
764
+ return ke(e, t, n, !1);
769
765
  }
770
- var _r = hr, Sr = Er;
766
+ var _r = hr, Sr = br;
771
767
  Y.Fragment = _, Y.jsx = _r, Y.jsxs = Sr;
772
768
  }()), Y;
773
769
  }
@@ -782,37 +778,37 @@ var $ = {};
782
778
  * LICENSE file in the root directory of this source tree.
783
779
  */
784
780
  var Le;
785
- function kr() {
781
+ function Dr() {
786
782
  if (Le)
787
783
  return $;
788
784
  Le = 1;
789
- var r = Ne, s = Symbol.for("react.element"), d = Symbol.for("react.fragment"), _ = Object.prototype.hasOwnProperty, o = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, g = { key: !0, ref: !0, __self: !0, __source: !0 };
790
- function l(E, u, R) {
791
- var y, w = {}, C = null, p = null;
785
+ var r = Ue, s = Symbol.for("react.element"), d = Symbol.for("react.fragment"), _ = Object.prototype.hasOwnProperty, o = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, y = { key: !0, ref: !0, __self: !0, __source: !0 };
786
+ function l(b, u, R) {
787
+ var g, w = {}, C = null, p = null;
792
788
  R !== void 0 && (C = "" + R), u.key !== void 0 && (C = "" + u.key), u.ref !== void 0 && (p = u.ref);
793
- for (y in u)
794
- _.call(u, y) && !g.hasOwnProperty(y) && (w[y] = u[y]);
795
- if (E && E.defaultProps)
796
- for (y in u = E.defaultProps, u)
797
- w[y] === void 0 && (w[y] = u[y]);
798
- return { $$typeof: s, type: E, key: C, ref: p, props: w, _owner: o.current };
789
+ for (g in u)
790
+ _.call(u, g) && !y.hasOwnProperty(g) && (w[g] = u[g]);
791
+ if (b && b.defaultProps)
792
+ for (g in u = b.defaultProps, u)
793
+ w[g] === void 0 && (w[g] = u[g]);
794
+ return { $$typeof: s, type: b, key: C, ref: p, props: w, _owner: o.current };
799
795
  }
800
796
  return $.Fragment = d, $.jsx = l, $.jsxs = l, $;
801
797
  }
802
- process.env.NODE_ENV === "production" ? se.exports = kr() : se.exports = jr();
803
- var oe = se.exports;
798
+ process.env.NODE_ENV === "production" ? ie.exports = Dr() : ie.exports = kr();
799
+ var oe = ie.exports;
804
800
  function Wr({
805
801
  children: r,
806
802
  maps: s,
807
803
  externalSync: d
808
804
  }) {
809
- const [_, o] = wr(Or, {
805
+ const [_, o] = wr(Pr, {
810
806
  ...B.state,
811
807
  maps: s.reduce((p, v) => (p[v.id] = {
812
808
  ...v,
813
809
  isLoaded: !1
814
810
  }, p), B.state.maps)
815
- }), g = Ae(
811
+ }), y = Fe(
816
812
  s.reduce((p, v) => (p[v.id] = {
817
813
  instanceRef: {
818
814
  current: null
@@ -829,7 +825,7 @@ function Wr({
829
825
  });
830
826
  },
831
827
  [d, s]
832
- ), E = I(
828
+ ), b = I(
833
829
  (p, v) => {
834
830
  o({
835
831
  type: D.SetViewState,
@@ -863,7 +859,7 @@ function Wr({
863
859
  });
864
860
  },
865
861
  [o]
866
- ), y = I(
862
+ ), g = I(
867
863
  (p, v) => {
868
864
  o({
869
865
  type: D.SetZoom,
@@ -885,14 +881,14 @@ function Wr({
885
881
  });
886
882
  },
887
883
  [o]
888
- ), C = Ae({
889
- setViewState: E,
884
+ ), C = Fe({
885
+ setViewState: b,
890
886
  setBasemap: R,
891
887
  setResize: u,
892
- setZoom: y,
888
+ setZoom: g,
893
889
  setLoaded: w
894
890
  });
895
- return /* @__PURE__ */ oe.jsx(Ye.Provider, { value: C.current, children: /* @__PURE__ */ oe.jsx(Ve.Provider, { value: g, children: /* @__PURE__ */ oe.jsx(Ue.Provider, { value: _, children: r }) }) });
891
+ return /* @__PURE__ */ oe.jsx(Ye.Provider, { value: C.current, children: /* @__PURE__ */ oe.jsx(Ve.Provider, { value: y, children: /* @__PURE__ */ oe.jsx(Ne.Provider, { value: _, children: r }) }) });
896
892
  }
897
893
  const Be = {
898
894
  NUMBER: {
@@ -919,21 +915,21 @@ const Be = {
919
915
  function We(r, s, d) {
920
916
  return Intl.NumberFormat(s, d).format(r);
921
917
  }
922
- function Dr(r, s, d = {}) {
918
+ function Fr(r, s, d = {}) {
923
919
  return We(r, s, { ...Be.NUMBER, ...d });
924
920
  }
925
- function Fr(r, s, d = {}) {
921
+ function Ar(r, s, d = {}) {
926
922
  return We(r, s, { ...Be.CURRENCY, ...d });
927
923
  }
928
924
  var F = /* @__PURE__ */ ((r) => (r.CURRENCY = "CURRENCY", r.DEFAULT = "DEFAULT", r.NUMBER = "NUMBER", r))(F || {});
929
925
  const Ie = {
930
926
  [F.CURRENCY]: {
931
927
  type: F.CURRENCY,
932
- format: (r, s) => Fr(r, s)
928
+ format: (r, s) => Ar(r, s)
933
929
  },
934
930
  [F.NUMBER]: {
935
931
  type: F.NUMBER,
936
- format: (r, s) => Dr(r, s)
932
+ format: (r, s) => Fr(r, s)
937
933
  },
938
934
  [F.DEFAULT]: {
939
935
  type: F.DEFAULT,
@@ -946,32 +942,32 @@ function zr({
946
942
  includeColumns: d = Object.keys(r),
947
943
  locale: _ = "en-US",
948
944
  showColumnName: o = !0,
949
- title: g,
945
+ title: y,
950
946
  getColumnName: l = Nr,
951
- getFieldHtml: E = Mr,
952
- getTitle: u = Ar,
953
- getValue: R = Lr
947
+ getFieldHtml: b = Lr,
948
+ getTitle: u = Mr,
949
+ getValue: R = Ir
954
950
  }) {
955
- const y = g ? u(g) : "", C = d.reduce((p, v) => {
951
+ const g = y ? u(y) : "", C = d.reduce((p, v) => {
956
952
  const j = s[v], W = r[v], k = R(W, _, j), S = o ? l(v) : "";
957
- return p + E(S, k);
953
+ return p + b(S, k);
958
954
  }, "");
959
- return y + C;
955
+ return g + C;
960
956
  }
961
- function Ar(r) {
957
+ function Mr(r) {
962
958
  return `<h3 style="margin: 0"><strong>${r}</strong></h3></br>`;
963
959
  }
964
- function Mr(r, s) {
960
+ function Lr(r, s) {
965
961
  return `${r}${s}</br>`;
966
962
  }
967
- function Lr(r, s, d) {
963
+ function Ir(r, s, d) {
968
964
  try {
969
- return Ir(d)(r, s);
965
+ return Ur(d)(r, s);
970
966
  } catch {
971
967
  return r;
972
968
  }
973
969
  }
974
- function Ir(r) {
970
+ function Ur(r) {
975
971
  return typeof r == "function" ? r : (r && Ie[r] || Ie[F.DEFAULT]).format;
976
972
  }
977
973
  function Nr(r) {
@@ -979,20 +975,20 @@ function Nr(r) {
979
975
  }
980
976
  export {
981
977
  ae as CartoBasemapURL,
982
- Tr as CartoBasemapsNames,
978
+ Cr as CartoBasemapsNames,
983
979
  F as FormatterTypes,
984
- ie as GMapsBasemap,
985
- Vr as MAPS_BASEMAP,
980
+ Tr as GMapsBasemap,
981
+ Ae as MAPS_BASEMAP,
986
982
  D as MapActions,
987
983
  Ye as MapActionsContext,
988
- Ue as MapContext,
984
+ Ne as MapContext,
989
985
  Wr as MapProvider,
990
986
  Ve as MapReferencesContext,
991
- Cr as MapsTypes,
987
+ Or as MapsTypes,
992
988
  zr as objectToHtml,
993
- Or as reducer,
994
- Pr as useMap,
995
- xr as useMapActions,
989
+ Pr as reducer,
990
+ xr as useMap,
991
+ jr as useMapActions,
996
992
  Br as useMapActionsByID,
997
993
  Yr as useMapByID,
998
994
  $e as useMapRefences,
@@ -22,30 +22,11 @@ export declare const CartoBasemapURL: {
22
22
  voyager: string;
23
23
  "dark-matter": string;
24
24
  };
25
- export declare const enum MapsTypes {
25
+ export declare enum MapsTypes {
26
26
  Maplibre = "maplibre",
27
27
  GoogleMaps = "google-maps"
28
28
  }
29
- export declare const MAPS_BASEMAP: {
30
- positron: {
31
- url: string;
32
- type: MapsTypes;
33
- };
34
- voyager: {
35
- url: string;
36
- type: MapsTypes;
37
- };
38
- "dark-matter": {
39
- url: string;
40
- type: MapsTypes;
41
- };
42
- roadmap: {
43
- type: MapsTypes;
44
- };
45
- satellite: {
46
- type: MapsTypes;
47
- };
48
- hybrid: {
49
- type: MapsTypes;
50
- };
51
- };
29
+ export declare const MAPS_BASEMAP: Record<string, {
30
+ url?: string;
31
+ type: MapsTypes;
32
+ }>;
@@ -2,7 +2,6 @@
2
2
  import type { PickingInfo } from '@deck.gl/core/typed';
3
3
  import type { GoogleMapsOverlay, GoogleMapsOverlayProps } from '@deck.gl/google-maps/typed';
4
4
  import type { DeckGLProps, DeckGLRef } from '@deck.gl/react/typed';
5
- import type { StyleSpecification } from 'maplibre-gl';
6
5
  import type { Properties } from 'csstype';
7
6
  import type { MutableRefObject, ReactNode } from 'react';
8
7
  import type { MapRef } from 'react-map-gl';
@@ -69,7 +68,7 @@ export type MapContextInterface = {
69
68
  /**
70
69
  * Basemap types.
71
70
  */
72
- export type Basemap = (typeof GMapsBasemap)[keyof typeof GMapsBasemap] | (typeof CartoBasemapsNames)[keyof typeof CartoBasemapsNames] | string | StyleSpecification;
71
+ export type Basemap = (typeof GMapsBasemap)[keyof typeof GMapsBasemap] | (typeof CartoBasemapsNames)[keyof typeof CartoBasemapsNames] | string;
73
72
  /**
74
73
  * Common properties for the map.
75
74
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carto/ps-react-maps",
3
- "version": "1.3.1-alpha.2",
3
+ "version": "1.3.1-alpha.4",
4
4
  "description": "CARTO's Professional Service React Maps library",
5
5
  "files": [
6
6
  "dist"