@carto/ps-react-maps 1.3.1 → 1.3.2

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 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",dark:!0},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={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=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 se={positron:{url:G.positron,type:"maplibre"},voyager:{url:G.voyager,type:"maplibre"},"dark-matter":{url:G["dark-matter"],type:"maplibre",dark:!0},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}},ce=b.createContext($.state),le=b.createContext($.references),fe=b.createContext($.actions);var j=(r=>(r.SetViewState="SetViewState",r.SetBasemap="SetBasemap",r.SetResize="SetResize",r.SetZoom="SetZoom",r.SetLoaded="SetLoaded",r))(j||{});function Ye(r,{type:u,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],s=se[E]?.type,R=se[y]?.type,g=s===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}}}[u]?.()??r}function $e(r){return b.useContext(ce).maps[r]}function K(r){const u=b.useContext(le),{instanceRef:d,overlayRef:_}=u.current[r],o=b.useCallback(()=>{const R=d?.current;return R?.deck||R?._deck},[d]),y=b.useCallback(()=>_?.current,[_]),l=b.useCallback(()=>o()._getViewState(),[o]),E=b.useCallback(R=>o()?.getViewports(R),[o]),s=b.useCallback((R=0,g)=>E(g)?.[R],[E]);return{instanceRef:d,overlayRef:_,getDeckInstance:o,getOverlayInstance:y,getViewState:l,getViewport:s,getViewports:E}}function We(r){const{setBasemap:u,setResize:d,setViewState:_,setZoom:o,setLoaded:y}=b.useContext(fe),{getViewport:l}=K(r);return{setBasemap:s=>u(s,r),setResize:s=>d(s,r),setViewState:s=>_(s,r),setZoom:s=>o(s,r),setLoaded:s=>y(s,r),fitBounds:(s,{boundsOptions:R,viewStateOptions:g}={})=>{const T=l(),{latitude:x,longitude:p,zoom:v}=T.fitBounds(s,R);_({...g,latitude:x,longitude:p,zoom:v},r)}}}function wr(r){return $e(r)}function xr(r){return K(r)}function Pr(r){return We(r)}var ue={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];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(`
9
+ */var Ie;function Or(){return Ie||(Ie=1,process.env.NODE_ENV!=="production"&&function(){var r=b,u=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"),s=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 C(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===s||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"&&C("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 s: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&&C("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 nr=typeof WeakMap=="function"?WeakMap:Map;q=new nr}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,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(k){a=k}Reflect.construct(e,[],c)}else{try{c.call()}catch(k){a=k}e.call(c.prototype)}}else{try{throw Error()}catch(k){a=k}e()}}catch(k){if(k&&a&&typeof k.stack=="string"){for(var i=k.stack.split(`
11
11
  `),w=a.stack.split(`
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{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`
12
+ `),h=i.length-1,S=w.length-1;h>=1&&S>=0&&i[h]!==w[S];)S--;for(;h>=1&&S>=0;h--,S--)if(i[h]!==w[S]){if(h!==1||S!==1)do if(h--,S--,S<0||i[h]!==w[S]){var P=`
13
+ `+i[h].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(h>=1&&S>=0);break}}}finally{ee=!1,X.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 s: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(h){i=h}i&&!(i instanceof Error)&&(J(f),C("%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),C("Failed %s type: %s",n,i.message),J(null))}}}var sr=Array.isArray;function re(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 C("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,te;te={};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);te[n]||(C('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),te[n]=!0)}}function vr(e,t){{var n=function(){xe||(xe=!0,C("%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,C("%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:u,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 h=e.defaultProps;for(m in h)c[m]===void 0&&(c[m]=h[m])}if(i||w){var S=typeof e=="function"?e.displayName||e.name||"Unknown":e;i&&vr(c,S),w&&mr(c,S)}return yr(e,i,w,f,a,N.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===u}function ke(){{if(ne.current){var e=O(ne.current.type);if(e)return`
14
14
 
15
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 br(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 je={};function br(e){{var t=ke();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=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={};/**
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(je[n])return;je[n]=!0;var a="";e&&e._owner&&e._owner!==ne.current&&(a=" It was passed a child from "+O(e._owner.type)+"."),I(e),C('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 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===s||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&&!ae){ae=!0;var f=O(t);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",f||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&C("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),C("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),C("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+=ke();var h;e===null?h="null":re(e)?h="array":e!==void 0&&e.$$typeof===u?(h="<"+(O(e.type)||"Unknown")+" />",i=" Did you accidentally export a JSX literal instead of a component?"):h=typeof e,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",h,i)}var S=gr(e,t,n,f,m);if(S==null)return S;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 C("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(S):Er(S),S}}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 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;
27
+ */var Le;function kr(){if(Le)return Y;Le=1;var r=b,u=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,s,R){var g,T={},x=null,p=null;R!==void 0&&(x=""+R),s.key!==void 0&&(x=""+s.key),s.ref!==void 0&&(p=s.ref);for(g in s)_.call(s,g)&&!y.hasOwnProperty(g)&&(T[g]=s[g]);if(E&&E.defaultProps)for(g in s=E.defaultProps,s)T[g]===void 0&&(T[g]=s[g]);return{$$typeof:u,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"?ue.exports=kr():ue.exports=Or();var ie=ue.exports;function jr({children:r,maps:u,externalSync:d}){const[_,o]=b.useReducer(Ye,{...$.state,maps:u.reduce((p,v)=>(p[v.id]={...v,isLoaded:!1},p),$.state.maps)}),y=b.useRef(u.reduce((p,v)=>(p[v.id]={instanceRef:{current:null},overlayRef:{current:null}},p),{})),l=b.useCallback((p,v,M)=>{u[0].id===p&&d?.({type:v,payload:M})},[d,u]),E=b.useCallback((p,v)=>{o({type:j.SetViewState,payload:{id:v,viewState:p}}),l(v,j.SetViewState,p)},[o,l]),s=b.useCallback(({height:p,width:v},M)=>{o({type:j.SetResize,payload:{id:M,height:p,width:v}}),l(M,j.SetResize,{height:p,width:v})},[o,l]),R=b.useCallback((p,v)=>{o({type:j.SetBasemap,payload:{id:v,basemap:p}})},[o]),g=b.useCallback((p,v)=>{o({type:j.SetZoom,payload:{id:v,zoom:p}})},[o]),T=b.useCallback((p,v)=>{o({type:j.SetLoaded,payload:{id:v,value:p}})},[o]),x=b.useRef({setViewState:E,setBasemap:R,setResize:s,setZoom:g,setLoaded:T});return ie.jsx(fe.Provider,{value:x.current,children:ie.jsx(le.Provider,{value:y,children:ie.jsx(ce.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,u,d){return Intl.NumberFormat(u,d).format(r)}function Dr(r,u,d={}){return qe(r,u,{...ze.NUMBER,...d})}function Mr(r,u,d={}){return qe(r,u,{...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,u)=>Mr(r,u)},[D.NUMBER]:{type:D.NUMBER,format:(r,u)=>Dr(r,u)},[D.DEFAULT]:{type:D.DEFAULT,format:r=>r.toLocaleString()}};function Ar({properties:r,formatters:u={},includeColumns:d=Object.keys(r),locale:_="en-US",showColumnName:o=!0,title:y,getColumnName:l=Nr,getFieldHtml:E=Ir,getTitle:s=Fr,getValue:R=Lr}){const g=y?s(y):"",x=d.reduce((p,v)=>{const M=u[v],W=r[v],A=R(W,_,M),C=o?l(v):"";return p+E(C,A)},"");return g+x}function Fr(r){return`<h3 style="margin: 0"><strong>${r}</strong></h3></br>`}function Ir(r,u){return`${r}${u}</br>`}function Lr(r,u,d){try{return Ur(d)(r,u)}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=se;exports.MapActions=j;exports.MapActionsContext=fe;exports.MapContext=ce;exports.MapProvider=jr;exports.MapReferencesContext=le;exports.MapsTypes=Ve;exports.objectToHtml=Ar;exports.reducer=Ye;exports.useMap=$e;exports.useMapActions=We;exports.useMapActionsByID=Pr;exports.useMapByID=wr;exports.useMapRefences=K;exports.useMapReferences=K;exports.useMapReferencesByID=xr;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
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 || {});
1
+ import Ue, { createContext as se, useContext as ue, useCallback as P, useReducer as Tr, useRef as Fe } from "react";
2
+ var wr = /* @__PURE__ */ ((r) => (r.Roadmap = "roadmap", r.Satellite = "satellite", r.Hybrid = "hybrid", r))(wr || {}), 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",
@@ -60,8 +60,8 @@ const Ae = {
60
60
  ), Ve = se(B.references), Ye = se(
61
61
  B.actions
62
62
  );
63
- var D = /* @__PURE__ */ ((r) => (r.SetViewState = "SetViewState", r.SetBasemap = "SetBasemap", r.SetResize = "SetResize", r.SetZoom = "SetZoom", r.SetLoaded = "SetLoaded", r))(D || {});
64
- function Pr(r, { type: s, payload: d }) {
63
+ var F = /* @__PURE__ */ ((r) => (r.SetViewState = "SetViewState", r.SetBasemap = "SetBasemap", r.SetResize = "SetResize", r.SetZoom = "SetZoom", r.SetLoaded = "SetLoaded", r))(F || {});
64
+ function Pr(r, { type: u, payload: d }) {
65
65
  return {
66
66
  SetViewState: () => {
67
67
  const { id: o, viewState: y } = d, l = { ...r.maps };
@@ -74,8 +74,8 @@ function Pr(r, { type: s, payload: d }) {
74
74
  };
75
75
  },
76
76
  SetResize: () => {
77
- const { id: o, width: y, height: l } = d, b = { ...r.maps };
78
- return b[o] = {
77
+ const { id: o, width: y, height: l } = d, E = { ...r.maps };
78
+ return E[o] = {
79
79
  ...r.maps[o],
80
80
  viewState: {
81
81
  ...r.maps[o].viewState,
@@ -84,11 +84,11 @@ function Pr(r, { type: s, payload: d }) {
84
84
  }
85
85
  }, {
86
86
  ...r,
87
- maps: b
87
+ maps: E
88
88
  };
89
89
  },
90
90
  SetBasemap: () => {
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;
91
+ const { id: o, basemap: y } = d, l = { ...r.maps }, { basemap: E } = l[o], s = Ae[E]?.type, R = Ae[y]?.type, g = s === R;
92
92
  return l[o] = {
93
93
  ...r.maps[o],
94
94
  basemap: y,
@@ -121,43 +121,49 @@ function Pr(r, { type: s, payload: d }) {
121
121
  maps: l
122
122
  };
123
123
  }
124
- }[s]?.() ?? r;
124
+ }[u]?.() ?? r;
125
125
  }
126
126
  function xr(r) {
127
127
  return ue(Ne).maps[r];
128
128
  }
129
129
  function $e(r) {
130
- const s = ue(Ve), { instanceRef: d, overlayRef: _ } = s.current[r], o = () => {
130
+ const u = ue(Ve), { instanceRef: d, overlayRef: h } = u.current[r], o = P(() => {
131
131
  const R = d?.current;
132
132
  return R?.deck || R?._deck;
133
- }, y = () => _?.current, l = () => o()._getViewState(), b = (R) => o()?.getViewports(R);
133
+ }, [d]), y = P(() => h?.current, [h]), l = P(() => o()._getViewState(), [o]), E = P(
134
+ (R) => o()?.getViewports(R),
135
+ [o]
136
+ ), s = P(
137
+ (R = 0, g) => E(g)?.[R],
138
+ [E]
139
+ );
134
140
  return {
135
141
  instanceRef: d,
136
- overlayRef: _,
142
+ overlayRef: h,
137
143
  getDeckInstance: o,
138
144
  getOverlayInstance: y,
139
145
  getViewState: l,
140
- getViewport: (R = 0, g) => b(g)?.[R],
141
- getViewports: b
146
+ getViewport: s,
147
+ getViewports: E
142
148
  };
143
149
  }
144
150
  function jr(r) {
145
- const { setBasemap: s, setResize: d, setViewState: _, setZoom: o, setLoaded: y } = ue(Ye), { getViewport: l } = $e(r);
151
+ const { setBasemap: u, setResize: d, setViewState: h, setZoom: o, setLoaded: y } = ue(Ye), { getViewport: l } = $e(r);
146
152
  return {
147
- setBasemap: (u) => s(u, r),
148
- setResize: (u) => d(u, r),
149
- setViewState: (u) => _(u, r),
150
- setZoom: (u) => o(u, r),
151
- setLoaded: (u) => y(u, r),
152
- fitBounds: (u, {
153
+ setBasemap: (s) => u(s, r),
154
+ setResize: (s) => d(s, r),
155
+ setViewState: (s) => h(s, r),
156
+ setZoom: (s) => o(s, r),
157
+ setLoaded: (s) => y(s, r),
158
+ fitBounds: (s, {
153
159
  boundsOptions: R,
154
160
  viewStateOptions: g
155
161
  } = {}) => {
156
- const w = l(), { latitude: C, longitude: p, zoom: v } = w.fitBounds(
157
- u,
162
+ const T = l(), { latitude: C, longitude: p, zoom: v } = T.fitBounds(
163
+ s,
158
164
  R
159
165
  );
160
- _({ ...g, latitude: C, longitude: p, zoom: v }, r);
166
+ h({ ...g, latitude: C, longitude: p, zoom: v }, r);
161
167
  }
162
168
  };
163
169
  }
@@ -183,14 +189,14 @@ var ie = { exports: {} }, Y = {};
183
189
  var Me;
184
190
  function kr() {
185
191
  return Me || (Me = 1, process.env.NODE_ENV !== "production" && function() {
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";
192
+ var r = Ue, u = Symbol.for("react.element"), d = Symbol.for("react.portal"), h = 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"), s = Symbol.for("react.forward_ref"), R = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), v = Symbol.iterator, k = "@@iterator";
187
193
  function W(e) {
188
194
  if (e === null || typeof e != "object")
189
195
  return null;
190
- var t = v && e[v] || e[j];
196
+ var t = v && e[v] || e[k];
191
197
  return typeof t == "function" ? t : null;
192
198
  }
193
- var k = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
199
+ var D = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
194
200
  function S(e) {
195
201
  {
196
202
  for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), a = 1; a < t; a++)
@@ -200,7 +206,7 @@ function kr() {
200
206
  }
201
207
  function ze(e, t, n) {
202
208
  {
203
- var a = k.ReactDebugCurrentFrame, f = a.getStackAddendum();
209
+ var a = D.ReactDebugCurrentFrame, f = a.getStackAddendum();
204
210
  f !== "" && (t += "%s", n = n.concat([f]));
205
211
  var m = n.map(function(c) {
206
212
  return String(c);
@@ -211,7 +217,7 @@ function kr() {
211
217
  var Ze = !1, qe = !1, He = !1, Je = !1, Ge = !1, ce;
212
218
  ce = Symbol.for("react.module.reference");
213
219
  function Ke(e) {
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
220
+ return !!(typeof e == "string" || typeof e == "function" || e === h || 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 === T || e.$$typeof === l || e.$$typeof === E || e.$$typeof === s || // This needs to include all possible module reference object
215
221
  // types supported by any Flight configuration anywhere since
216
222
  // we don't know which Flight build this will end up being used
217
223
  // with.
@@ -227,7 +233,7 @@ function kr() {
227
233
  function le(e) {
228
234
  return e.displayName || "Context";
229
235
  }
230
- function P(e) {
236
+ function x(e) {
231
237
  if (e == null)
232
238
  return null;
233
239
  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")
@@ -235,7 +241,7 @@ function kr() {
235
241
  if (typeof e == "string")
236
242
  return e;
237
243
  switch (e) {
238
- case _:
244
+ case h:
239
245
  return "Fragment";
240
246
  case d:
241
247
  return "Portal";
@@ -250,21 +256,21 @@ function kr() {
250
256
  }
251
257
  if (typeof e == "object")
252
258
  switch (e.$$typeof) {
253
- case b:
259
+ case E:
254
260
  var t = e;
255
261
  return le(t) + ".Consumer";
256
262
  case l:
257
263
  var n = e;
258
264
  return le(n._context) + ".Provider";
259
- case u:
265
+ case s:
260
266
  return Xe(e, e.render, "ForwardRef");
261
- case w:
267
+ case T:
262
268
  var a = e.displayName || null;
263
- return a !== null ? a : P(e.type) || "Memo";
269
+ return a !== null ? a : x(e.type) || "Memo";
264
270
  case C: {
265
271
  var f = e, m = f._payload, c = f._init;
266
272
  try {
267
- return P(c(m));
273
+ return x(c(m));
268
274
  } catch {
269
275
  return null;
270
276
  }
@@ -272,7 +278,7 @@ function kr() {
272
278
  }
273
279
  return null;
274
280
  }
275
- var A = Object.assign, U = 0, fe, de, pe, ve, me, ye, ge;
281
+ var M = Object.assign, U = 0, fe, de, pe, ve, me, ye, ge;
276
282
  function Re() {
277
283
  }
278
284
  Re.__reactDisabledLog = !0;
@@ -308,25 +314,25 @@ function kr() {
308
314
  writable: !0
309
315
  };
310
316
  Object.defineProperties(console, {
311
- log: A({}, e, {
317
+ log: M({}, e, {
312
318
  value: fe
313
319
  }),
314
- info: A({}, e, {
320
+ info: M({}, e, {
315
321
  value: de
316
322
  }),
317
- warn: A({}, e, {
323
+ warn: M({}, e, {
318
324
  value: pe
319
325
  }),
320
- error: A({}, e, {
326
+ error: M({}, e, {
321
327
  value: ve
322
328
  }),
323
- group: A({}, e, {
329
+ group: M({}, e, {
324
330
  value: me
325
331
  }),
326
- groupCollapsed: A({}, e, {
332
+ groupCollapsed: M({}, e, {
327
333
  value: ye
328
334
  }),
329
- groupEnd: A({}, e, {
335
+ groupEnd: M({}, e, {
330
336
  value: ge
331
337
  })
332
338
  });
@@ -334,7 +340,7 @@ function kr() {
334
340
  U < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
335
341
  }
336
342
  }
337
- var G = k.ReactCurrentDispatcher, K;
343
+ var G = D.ReactCurrentDispatcher, K;
338
344
  function z(e, t, n) {
339
345
  {
340
346
  if (K === void 0)
@@ -379,49 +385,49 @@ function kr() {
379
385
  }), typeof Reflect == "object" && Reflect.construct) {
380
386
  try {
381
387
  Reflect.construct(c, []);
382
- } catch (x) {
383
- a = x;
388
+ } catch (j) {
389
+ a = j;
384
390
  }
385
391
  Reflect.construct(e, [], c);
386
392
  } else {
387
393
  try {
388
394
  c.call();
389
- } catch (x) {
390
- a = x;
395
+ } catch (j) {
396
+ a = j;
391
397
  }
392
398
  e.call(c.prototype);
393
399
  }
394
400
  } else {
395
401
  try {
396
402
  throw Error();
397
- } catch (x) {
398
- a = x;
403
+ } catch (j) {
404
+ a = j;
399
405
  }
400
406
  e();
401
407
  }
402
- } catch (x) {
403
- if (x && a && typeof x.stack == "string") {
404
- for (var i = x.stack.split(`
405
- `), T = a.stack.split(`
406
- `), E = i.length - 1, h = T.length - 1; E >= 1 && h >= 0 && i[E] !== T[h]; )
407
- h--;
408
- for (; E >= 1 && h >= 0; E--, h--)
409
- if (i[E] !== T[h]) {
410
- if (E !== 1 || h !== 1)
408
+ } catch (j) {
409
+ if (j && a && typeof j.stack == "string") {
410
+ for (var i = j.stack.split(`
411
+ `), w = a.stack.split(`
412
+ `), b = i.length - 1, _ = w.length - 1; b >= 1 && _ >= 0 && i[b] !== w[_]; )
413
+ _--;
414
+ for (; b >= 1 && _ >= 0; b--, _--)
415
+ if (i[b] !== w[_]) {
416
+ if (b !== 1 || _ !== 1)
411
417
  do
412
- if (E--, h--, h < 0 || i[E] !== T[h]) {
418
+ if (b--, _--, _ < 0 || i[b] !== w[_]) {
413
419
  var O = `
414
- ` + i[E].replace(" at new ", " at ");
420
+ ` + i[b].replace(" at new ", " at ");
415
421
  return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && Z.set(e, O), O;
416
422
  }
417
- while (E >= 1 && h >= 0);
423
+ while (b >= 1 && _ >= 0);
418
424
  break;
419
425
  }
420
426
  }
421
427
  } finally {
422
428
  X = !1, G.current = m, er(), Error.prepareStackTrace = f;
423
429
  }
424
- var L = e ? e.displayName || e.name : "", De = L ? z(L) : "";
430
+ var I = e ? e.displayName || e.name : "", De = I ? z(I) : "";
425
431
  return typeof e == "function" && Z.set(e, De), De;
426
432
  }
427
433
  function tr(e, t, n) {
@@ -446,9 +452,9 @@ function kr() {
446
452
  }
447
453
  if (typeof e == "object")
448
454
  switch (e.$$typeof) {
449
- case u:
455
+ case s:
450
456
  return tr(e.render);
451
- case w:
457
+ case T:
452
458
  return q(e.type, t, n);
453
459
  case C: {
454
460
  var a = e, f = a._payload, m = a._init;
@@ -460,7 +466,7 @@ function kr() {
460
466
  }
461
467
  return "";
462
468
  }
463
- var H = Object.prototype.hasOwnProperty, be = {}, he = k.ReactDebugCurrentFrame;
469
+ var H = Object.prototype.hasOwnProperty, be = {}, he = D.ReactDebugCurrentFrame;
464
470
  function J(e) {
465
471
  if (e) {
466
472
  var t = e._owner, n = q(e.type, e._source, t ? t.type : null);
@@ -476,12 +482,12 @@ function kr() {
476
482
  var i = void 0;
477
483
  try {
478
484
  if (typeof e[c] != "function") {
479
- var T = 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`.");
480
- throw T.name = "Invariant Violation", T;
485
+ 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`.");
486
+ throw w.name = "Invariant Violation", w;
481
487
  }
482
488
  i = e[c](t, c, a, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
483
- } catch (E) {
484
- i = E;
489
+ } catch (b) {
490
+ i = b;
485
491
  }
486
492
  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));
487
493
  }
@@ -511,12 +517,12 @@ function kr() {
511
517
  if (sr(e))
512
518
  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);
513
519
  }
514
- var N = k.ReactCurrentOwner, ur = {
520
+ var N = D.ReactCurrentOwner, ur = {
515
521
  key: !0,
516
522
  ref: !0,
517
523
  __self: !0,
518
524
  __source: !0
519
- }, we, Te, ee;
525
+ }, Te, we, ee;
520
526
  ee = {};
521
527
  function cr(e) {
522
528
  if (H.call(e, "ref")) {
@@ -536,14 +542,14 @@ function kr() {
536
542
  }
537
543
  function fr(e, t) {
538
544
  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
+ var n = x(N.current.type);
546
+ 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', x(N.current.type), e.ref), ee[n] = !0);
541
547
  }
542
548
  }
543
549
  function dr(e, t) {
544
550
  {
545
551
  var n = function() {
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));
552
+ 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));
547
553
  };
548
554
  n.isReactWarning = !0, Object.defineProperty(e, "key", {
549
555
  get: n,
@@ -554,7 +560,7 @@ function kr() {
554
560
  function pr(e, t) {
555
561
  {
556
562
  var n = function() {
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));
563
+ we || (we = !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));
558
564
  };
559
565
  n.isReactWarning = !0, Object.defineProperty(e, "ref", {
560
566
  get: n,
@@ -565,7 +571,7 @@ function kr() {
565
571
  var vr = function(e, t, n, a, f, m, c) {
566
572
  var i = {
567
573
  // This tag allows us to uniquely identify this as a React Element
568
- $$typeof: s,
574
+ $$typeof: u,
569
575
  // Built-in properties that belong on the element
570
576
  type: e,
571
577
  key: t,
@@ -593,24 +599,24 @@ function kr() {
593
599
  };
594
600
  function mr(e, t, n, a, f) {
595
601
  {
596
- var m, c = {}, i = null, T = null;
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
+ var m, c = {}, i = null, w = null;
603
+ n !== void 0 && (Se(n), i = "" + n), lr(t) && (Se(t.key), i = "" + t.key), cr(t) && (w = t.ref, fr(t, f));
598
604
  for (m in t)
599
605
  H.call(t, m) && !ur.hasOwnProperty(m) && (c[m] = t[m]);
600
606
  if (e && e.defaultProps) {
601
- var E = e.defaultProps;
602
- for (m in E)
603
- c[m] === void 0 && (c[m] = E[m]);
607
+ var b = e.defaultProps;
608
+ for (m in b)
609
+ c[m] === void 0 && (c[m] = b[m]);
604
610
  }
605
- if (i || T) {
606
- var h = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
607
- i && dr(c, h), T && pr(c, h);
611
+ if (i || w) {
612
+ var _ = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
613
+ i && dr(c, _), w && pr(c, _);
608
614
  }
609
- return vr(e, i, T, f, a, N.current, c);
615
+ return vr(e, i, w, f, a, N.current, c);
610
616
  }
611
617
  }
612
- var re = k.ReactCurrentOwner, Ce = k.ReactDebugCurrentFrame;
613
- function M(e) {
618
+ var re = D.ReactCurrentOwner, Ce = D.ReactDebugCurrentFrame;
619
+ function L(e) {
614
620
  if (e) {
615
621
  var t = e._owner, n = q(e.type, e._source, t ? t.type : null);
616
622
  Ce.setExtraStackFrame(n);
@@ -620,12 +626,12 @@ function kr() {
620
626
  var te;
621
627
  te = !1;
622
628
  function ne(e) {
623
- return typeof e == "object" && e !== null && e.$$typeof === s;
629
+ return typeof e == "object" && e !== null && e.$$typeof === u;
624
630
  }
625
631
  function Oe() {
626
632
  {
627
633
  if (re.current) {
628
- var e = P(re.current.type);
634
+ var e = x(re.current.type);
629
635
  if (e)
630
636
  return `
631
637
 
@@ -668,7 +674,7 @@ Check the top-level render call using <` + n + ">.");
668
674
  return;
669
675
  Pe[n] = !0;
670
676
  var a = "";
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);
677
+ e && e._owner && e._owner !== re.current && (a = " It was passed a child from " + x(e._owner.type) + "."), L(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), L(null);
672
678
  }
673
679
  }
674
680
  function je(e, t) {
@@ -698,18 +704,18 @@ Check the top-level render call using <` + n + ">.");
698
704
  var n;
699
705
  if (typeof t == "function")
700
706
  n = t.propTypes;
701
- else if (typeof t == "object" && (t.$$typeof === u || // Note: Memo only checks outer props here.
707
+ else if (typeof t == "object" && (t.$$typeof === s || // Note: Memo only checks outer props here.
702
708
  // Inner props are checked in the reconciler.
703
- t.$$typeof === w))
709
+ t.$$typeof === T))
704
710
  n = t.propTypes;
705
711
  else
706
712
  return;
707
713
  if (n) {
708
- var a = P(t);
714
+ var a = x(t);
709
715
  ar(n, e.props, "prop", a, e);
710
716
  } else if (t.PropTypes !== void 0 && !te) {
711
717
  te = !0;
712
- var f = P(t);
718
+ var f = x(t);
713
719
  S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", f || "Unknown");
714
720
  }
715
721
  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,11 +726,11 @@ Check the top-level render call using <` + n + ">.");
720
726
  for (var t = Object.keys(e.props), n = 0; n < t.length; n++) {
721
727
  var a = t[n];
722
728
  if (a !== "children" && a !== "key") {
723
- M(e), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), M(null);
729
+ L(e), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), L(null);
724
730
  break;
725
731
  }
726
732
  }
727
- e.ref !== null && (M(e), S("Invalid attribute `ref` supplied to `React.Fragment`."), M(null));
733
+ e.ref !== null && (L(e), S("Invalid attribute `ref` supplied to `React.Fragment`."), L(null));
728
734
  }
729
735
  }
730
736
  function ke(e, t, n, a, f, m) {
@@ -733,28 +739,28 @@ Check the top-level render call using <` + n + ">.");
733
739
  if (!c) {
734
740
  var i = "";
735
741
  (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.");
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);
742
+ var w = yr(f);
743
+ w ? i += w : i += Oe();
744
+ var b;
745
+ e === null ? b = "null" : Q(e) ? b = "array" : e !== void 0 && e.$$typeof === u ? (b = "<" + (x(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);
740
746
  }
741
- var h = mr(e, t, n, f, m);
742
- if (h == null)
743
- return h;
747
+ var _ = mr(e, t, n, f, m);
748
+ if (_ == null)
749
+ return _;
744
750
  if (c) {
745
751
  var O = t.children;
746
752
  if (O !== void 0)
747
753
  if (a)
748
754
  if (Q(O)) {
749
- for (var L = 0; L < O.length; L++)
750
- je(O[L], e);
755
+ for (var I = 0; I < O.length; I++)
756
+ je(O[I], e);
751
757
  Object.freeze && Object.freeze(O);
752
758
  } else
753
759
  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.");
754
760
  else
755
761
  je(O, e);
756
762
  }
757
- return e === _ ? Er(h) : Rr(h), h;
763
+ return e === h ? Er(_) : Rr(_), _;
758
764
  }
759
765
  }
760
766
  function br(e, t, n) {
@@ -764,7 +770,7 @@ Check the top-level render call using <` + n + ">.");
764
770
  return ke(e, t, n, !1);
765
771
  }
766
772
  var _r = hr, Sr = br;
767
- Y.Fragment = _, Y.jsx = _r, Y.jsxs = Sr;
773
+ Y.Fragment = h, Y.jsx = _r, Y.jsxs = Sr;
768
774
  }()), Y;
769
775
  }
770
776
  var $ = {};
@@ -782,16 +788,16 @@ function Dr() {
782
788
  if (Le)
783
789
  return $;
784
790
  Le = 1;
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;
788
- R !== void 0 && (C = "" + R), u.key !== void 0 && (C = "" + u.key), u.ref !== void 0 && (p = u.ref);
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 };
791
+ var r = Ue, u = Symbol.for("react.element"), d = Symbol.for("react.fragment"), h = 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 };
792
+ function l(E, s, R) {
793
+ var g, T = {}, C = null, p = null;
794
+ R !== void 0 && (C = "" + R), s.key !== void 0 && (C = "" + s.key), s.ref !== void 0 && (p = s.ref);
795
+ for (g in s)
796
+ h.call(s, g) && !y.hasOwnProperty(g) && (T[g] = s[g]);
797
+ if (E && E.defaultProps)
798
+ for (g in s = E.defaultProps, s)
799
+ T[g] === void 0 && (T[g] = s[g]);
800
+ return { $$typeof: u, type: E, key: C, ref: p, props: T, _owner: o.current };
795
801
  }
796
802
  return $.Fragment = d, $.jsx = l, $.jsxs = l, $;
797
803
  }
@@ -799,17 +805,17 @@ process.env.NODE_ENV === "production" ? ie.exports = Dr() : ie.exports = kr();
799
805
  var oe = ie.exports;
800
806
  function Wr({
801
807
  children: r,
802
- maps: s,
808
+ maps: u,
803
809
  externalSync: d
804
810
  }) {
805
- const [_, o] = wr(Pr, {
811
+ const [h, o] = Tr(Pr, {
806
812
  ...B.state,
807
- maps: s.reduce((p, v) => (p[v.id] = {
813
+ maps: u.reduce((p, v) => (p[v.id] = {
808
814
  ...v,
809
815
  isLoaded: !1
810
816
  }, p), B.state.maps)
811
817
  }), y = Fe(
812
- s.reduce((p, v) => (p[v.id] = {
818
+ u.reduce((p, v) => (p[v.id] = {
813
819
  instanceRef: {
814
820
  current: null
815
821
  },
@@ -817,41 +823,41 @@ function Wr({
817
823
  current: null
818
824
  }
819
825
  }, p), {})
820
- ), l = I(
821
- (p, v, j) => {
822
- s[0].id === p && d?.({
826
+ ), l = P(
827
+ (p, v, k) => {
828
+ u[0].id === p && d?.({
823
829
  type: v,
824
- payload: j
830
+ payload: k
825
831
  });
826
832
  },
827
- [d, s]
828
- ), b = I(
833
+ [d, u]
834
+ ), E = P(
829
835
  (p, v) => {
830
836
  o({
831
- type: D.SetViewState,
837
+ type: F.SetViewState,
832
838
  payload: {
833
839
  id: v,
834
840
  viewState: p
835
841
  }
836
- }), l(v, D.SetViewState, p);
842
+ }), l(v, F.SetViewState, p);
837
843
  },
838
844
  [o, l]
839
- ), u = I(
840
- ({ height: p, width: v }, j) => {
845
+ ), s = P(
846
+ ({ height: p, width: v }, k) => {
841
847
  o({
842
- type: D.SetResize,
848
+ type: F.SetResize,
843
849
  payload: {
844
- id: j,
850
+ id: k,
845
851
  height: p,
846
852
  width: v
847
853
  }
848
- }), l(j, D.SetResize, { height: p, width: v });
854
+ }), l(k, F.SetResize, { height: p, width: v });
849
855
  },
850
856
  [o, l]
851
- ), R = I(
857
+ ), R = P(
852
858
  (p, v) => {
853
859
  o({
854
- type: D.SetBasemap,
860
+ type: F.SetBasemap,
855
861
  payload: {
856
862
  id: v,
857
863
  basemap: p
@@ -859,10 +865,10 @@ function Wr({
859
865
  });
860
866
  },
861
867
  [o]
862
- ), g = I(
868
+ ), g = P(
863
869
  (p, v) => {
864
870
  o({
865
- type: D.SetZoom,
871
+ type: F.SetZoom,
866
872
  payload: {
867
873
  id: v,
868
874
  zoom: p
@@ -870,10 +876,10 @@ function Wr({
870
876
  });
871
877
  },
872
878
  [o]
873
- ), w = I(
879
+ ), T = P(
874
880
  (p, v) => {
875
881
  o({
876
- type: D.SetLoaded,
882
+ type: F.SetLoaded,
877
883
  payload: {
878
884
  id: v,
879
885
  value: p
@@ -882,13 +888,13 @@ function Wr({
882
888
  },
883
889
  [o]
884
890
  ), C = Fe({
885
- setViewState: b,
891
+ setViewState: E,
886
892
  setBasemap: R,
887
- setResize: u,
893
+ setResize: s,
888
894
  setZoom: g,
889
- setLoaded: w
895
+ setLoaded: T
890
896
  });
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 }) }) });
897
+ return /* @__PURE__ */ oe.jsx(Ye.Provider, { value: C.current, children: /* @__PURE__ */ oe.jsx(Ve.Provider, { value: y, children: /* @__PURE__ */ oe.jsx(Ne.Provider, { value: h, children: r }) }) });
892
898
  }
893
899
  const Be = {
894
900
  NUMBER: {
@@ -912,63 +918,63 @@ const Be = {
912
918
  day: "2-digit"
913
919
  }
914
920
  };
915
- function We(r, s, d) {
916
- return Intl.NumberFormat(s, d).format(r);
921
+ function We(r, u, d) {
922
+ return Intl.NumberFormat(u, d).format(r);
917
923
  }
918
- function Fr(r, s, d = {}) {
919
- return We(r, s, { ...Be.NUMBER, ...d });
924
+ function Fr(r, u, d = {}) {
925
+ return We(r, u, { ...Be.NUMBER, ...d });
920
926
  }
921
- function Ar(r, s, d = {}) {
922
- return We(r, s, { ...Be.CURRENCY, ...d });
927
+ function Ar(r, u, d = {}) {
928
+ return We(r, u, { ...Be.CURRENCY, ...d });
923
929
  }
924
- var F = /* @__PURE__ */ ((r) => (r.CURRENCY = "CURRENCY", r.DEFAULT = "DEFAULT", r.NUMBER = "NUMBER", r))(F || {});
930
+ var A = /* @__PURE__ */ ((r) => (r.CURRENCY = "CURRENCY", r.DEFAULT = "DEFAULT", r.NUMBER = "NUMBER", r))(A || {});
925
931
  const Ie = {
926
- [F.CURRENCY]: {
927
- type: F.CURRENCY,
928
- format: (r, s) => Ar(r, s)
932
+ [A.CURRENCY]: {
933
+ type: A.CURRENCY,
934
+ format: (r, u) => Ar(r, u)
929
935
  },
930
- [F.NUMBER]: {
931
- type: F.NUMBER,
932
- format: (r, s) => Fr(r, s)
936
+ [A.NUMBER]: {
937
+ type: A.NUMBER,
938
+ format: (r, u) => Fr(r, u)
933
939
  },
934
- [F.DEFAULT]: {
935
- type: F.DEFAULT,
940
+ [A.DEFAULT]: {
941
+ type: A.DEFAULT,
936
942
  format: (r) => r.toLocaleString()
937
943
  }
938
944
  };
939
945
  function zr({
940
946
  properties: r,
941
- formatters: s = {},
947
+ formatters: u = {},
942
948
  includeColumns: d = Object.keys(r),
943
- locale: _ = "en-US",
949
+ locale: h = "en-US",
944
950
  showColumnName: o = !0,
945
951
  title: y,
946
952
  getColumnName: l = Nr,
947
- getFieldHtml: b = Lr,
948
- getTitle: u = Mr,
953
+ getFieldHtml: E = Lr,
954
+ getTitle: s = Mr,
949
955
  getValue: R = Ir
950
956
  }) {
951
- const g = y ? u(y) : "", C = d.reduce((p, v) => {
952
- const j = s[v], W = r[v], k = R(W, _, j), S = o ? l(v) : "";
953
- return p + b(S, k);
957
+ const g = y ? s(y) : "", C = d.reduce((p, v) => {
958
+ const k = u[v], W = r[v], D = R(W, h, k), S = o ? l(v) : "";
959
+ return p + E(S, D);
954
960
  }, "");
955
961
  return g + C;
956
962
  }
957
963
  function Mr(r) {
958
964
  return `<h3 style="margin: 0"><strong>${r}</strong></h3></br>`;
959
965
  }
960
- function Lr(r, s) {
961
- return `${r}${s}</br>`;
966
+ function Lr(r, u) {
967
+ return `${r}${u}</br>`;
962
968
  }
963
- function Ir(r, s, d) {
969
+ function Ir(r, u, d) {
964
970
  try {
965
- return Ur(d)(r, s);
971
+ return Ur(d)(r, u);
966
972
  } catch {
967
973
  return r;
968
974
  }
969
975
  }
970
976
  function Ur(r) {
971
- return typeof r == "function" ? r : (r && Ie[r] || Ie[F.DEFAULT]).format;
977
+ return typeof r == "function" ? r : (r && Ie[r] || Ie[A.DEFAULT]).format;
972
978
  }
973
979
  function Nr(r) {
974
980
  return `<strong>${r}</strong>: `;
@@ -976,10 +982,10 @@ function Nr(r) {
976
982
  export {
977
983
  ae as CartoBasemapURL,
978
984
  Cr as CartoBasemapsNames,
979
- F as FormatterTypes,
980
- Tr as GMapsBasemap,
985
+ A as FormatterTypes,
986
+ wr as GMapsBasemap,
981
987
  Ae as MAPS_BASEMAP,
982
- D as MapActions,
988
+ F as MapActions,
983
989
  Ye as MapActionsContext,
984
990
  Ne as MapContext,
985
991
  Wr as MapProvider,
@@ -992,5 +998,6 @@ export {
992
998
  Br as useMapActionsByID,
993
999
  Yr as useMapByID,
994
1000
  $e as useMapRefences,
1001
+ $e as useMapReferences,
995
1002
  $r as useMapReferencesByID
996
1003
  };
@@ -2,5 +2,5 @@ export * from './map-provider.const';
2
2
  export * from './map-provider.types';
3
3
  export { MapContext, MapActionsContext, MapReferencesContext, } from './map-provider.context';
4
4
  export { reducer, Actions as MapActions } from './map-provider.reducer';
5
- export { useMap, useMapActions, useMapRefences, useMapByID, useMapActionsByID, useMapReferencesByID, } from './map-provider.hook';
5
+ export { useMap, useMapActions, useMapReferences, useMapReferences as useMapRefences, useMapByID, useMapActionsByID, useMapReferencesByID, } from './map-provider.hook';
6
6
  export { MapProvider } from './map-provider.provider';
@@ -12,7 +12,7 @@ export declare function useMap(id: string): MapProviderMapProps;
12
12
  * @param id - The ID of the map reference.
13
13
  * @returns An object containing the map references and functions.
14
14
  */
15
- export declare function useMapRefences(id: string): MapReferences & {
15
+ export declare function useMapReferences(id: string): MapReferences & {
16
16
  getDeckInstance: () => Deck | undefined;
17
17
  getOverlayInstance: () => OverlayMapRef | undefined;
18
18
  getViewState: () => DeckGLMapsProps['viewState'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carto/ps-react-maps",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "CARTO's Professional Service React Maps library",
5
5
  "files": [
6
6
  "dist"