@carto/ps-react-maps 1.1.2-alpha.1 → 1.2.0
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 +15 -15
- package/dist/index.js +225 -225
- package/package.json +20 -20
package/dist/index.cjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react");var De=(n=>(n.Roadmap="roadmap",n.Satellite="satellite",n.Terrain="terrain",n))(De||{}),Ie=(n=>(n.DarkMatter="dark-matter",n.Positron="positron",n.Voyager="voyager",n))(Ie||{});const gr={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"},q=()=>{throw new Error("You forgot to wrap your component in <MapProvider>.")},F={state:{maps:{}},references:{current:{}},actions:{setViewState:q,setBasemap:q,setResize:q,setZoom:q}},ne=g.createContext(F.state),Ae=g.createContext(F.references),ae=g.createContext(F.actions);var D=(n=>(n.SetViewState="SetViewState",n.SetBasemap="SetBasemap",n.SetResize="SetResize",n.SetZoom="SetZoom",n))(D||{});function Me(n,{type:m,payload:R}){return{SetViewState:()=>{const{id:u,viewState:b}=R,l={...n.maps};return l[u]={...n.maps[u],viewState:b},{...n,maps:l}},SetResize:()=>{const{id:u,width:b,height:l}=R,w={...n.maps};return w[u]={...n.maps[u],viewState:{...n.maps[u].viewState,width:b,height:l}},{...n,maps:w}},SetBasemap:()=>{const{id:u,basemap:b}=R,l={...n.maps};return l[u]={...n.maps[u],basemap:b},{...n,maps:l}},SetZoom:()=>{const{id:u,zoom:b}=R,l={...n.maps};return l[u]={...n.maps[u],viewState:{...n.maps[u].viewState,zoom:b}},{...n,maps:l}}}[m]?.()??n}function Fe(){return g.useContext(ne)}function br(){return g.useContext(Ae)}function Ve(){return g.useContext(ae)}function hr(n){const{maps:{[n]:m}}=Fe();return m}function Er(n){const{current:{[n]:{instanceRef:m,overlayRef:R}}}=br(),S=()=>{const l=m?.current;return l?.deck||l?._deck};return{instanceRef:m,overlayRef:R,getDeckInstance:S,getOverlayInstance:()=>R?.current,getViewState:()=>S()._getViewState()}}function _r(n){const{setBasemap:m,setResize:R,setViewState:S,setZoom:u}=Ve();return{setBasemap:m.bind(null,n),setResize:R.bind(null,n),setViewState:S.bind(null,n),setZoom:u.bind(null,n)}}var te={exports:{}},W={};/**
|
|
2
2
|
* @license React
|
|
3
|
-
* react-jsx-runtime.
|
|
3
|
+
* react-jsx-runtime.development.js
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
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
|
|
9
|
+
*/var je;function Sr(){return je||(je=1,process.env.NODE_ENV!=="production"&&function(){var n=g,m=Symbol.for("react.element"),R=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),w=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),j=Symbol.iterator,oe="@@iterator";function $e(e){if(e===null||typeof e!="object")return null;var r=j&&e[j]||e[oe];return typeof r=="function"?r:null}var I=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];We("error",e,t)}}function We(e,r,t){{var a=I.ReactDebugCurrentFrame,s=a.getStackAddendum();s!==""&&(r+="%s",t=t.concat([s]));var c=t.map(function(i){return String(i)});c.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,c)}}var Ye=!1,Be=!1,Le=!1,Ne=!1,Ue=!1,ie;ie=Symbol.for("react.module.reference");function ze(e){return!!(typeof e=="string"||typeof e=="function"||e===S||e===b||Ue||e===u||e===x||e===h||Ne||e===d||Ye||Be||Le||typeof e=="object"&&e!==null&&(e.$$typeof===f||e.$$typeof===C||e.$$typeof===l||e.$$typeof===w||e.$$typeof===y||e.$$typeof===ie||e.getModuleId!==void 0))}function qe(e,r,t){var a=e.displayName;if(a)return a;var s=r.displayName||r.name||"";return s!==""?t+"("+s+")":t}function se(e){return e.displayName||"Context"}function P(e){if(e==null)return null;if(typeof e.tag=="number"&&E("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 S:return"Fragment";case R:return"Portal";case b:return"Profiler";case u:return"StrictMode";case x:return"Suspense";case h:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case w:var r=e;return se(r)+".Consumer";case l:var t=e;return se(t._context)+".Provider";case y:return qe(e,e.render,"ForwardRef");case C:var a=e.displayName||null;return a!==null?a:P(e.type)||"Memo";case f:{var s=e,c=s._payload,i=s._init;try{return P(i(c))}catch{return null}}}return null}var k=Object.assign,V=0,ue,ce,le,fe,de,ve,pe;function me(){}me.__reactDisabledLog=!0;function Ze(){{if(V===0){ue=console.log,ce=console.info,le=console.warn,fe=console.error,de=console.group,ve=console.groupCollapsed,pe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:me,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}V++}}function Je(){{if(V--,V===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:k({},e,{value:ue}),info:k({},e,{value:ce}),warn:k({},e,{value:le}),error:k({},e,{value:fe}),group:k({},e,{value:de}),groupCollapsed:k({},e,{value:ve}),groupEnd:k({},e,{value:pe})})}V<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Z=I.ReactCurrentDispatcher,J;function B(e,r,t){{if(J===void 0)try{throw Error()}catch(s){var a=s.stack.trim().match(/\n( *(at )?)/);J=a&&a[1]||""}return`
|
|
10
|
+
`+J+e}}var G=!1,L;{var Ge=typeof WeakMap=="function"?WeakMap:Map;L=new Ge}function ye(e,r){if(!e||G)return"";{var t=L.get(e);if(t!==void 0)return t}var a;G=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var c;c=Z.current,Z.current=null,Ze();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(O){a=O}Reflect.construct(e,[],i)}else{try{i.call()}catch(O){a=O}e.call(i.prototype)}}else{try{throw Error()}catch(O){a=O}e()}}catch(O){if(O&&a&&typeof O.stack=="string"){for(var o=O.stack.split(`
|
|
11
|
+
`),_=a.stack.split(`
|
|
12
|
+
`),v=o.length-1,p=_.length-1;v>=1&&p>=0&&o[v]!==_[p];)p--;for(;v>=1&&p>=0;v--,p--)if(o[v]!==_[p]){if(v!==1||p!==1)do if(v--,p--,p<0||o[v]!==_[p]){var T=`
|
|
13
|
+
`+o[v].replace(" at new "," at ");return e.displayName&&T.includes("<anonymous>")&&(T=T.replace("<anonymous>",e.displayName)),typeof e=="function"&&L.set(e,T),T}while(v>=1&&p>=0);break}}}finally{G=!1,Z.current=c,Je(),Error.prepareStackTrace=s}var M=e?e.displayName||e.name:"",xe=M?B(M):"";return typeof e=="function"&&L.set(e,xe),xe}function Ke(e,r,t){return ye(e,!1)}function He(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function N(e,r,t){if(e==null)return"";if(typeof e=="function")return ye(e,He(e));if(typeof e=="string")return B(e);switch(e){case x:return B("Suspense");case h:return B("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case y:return Ke(e.render);case C:return N(e.type,r,t);case f:{var a=e,s=a._payload,c=a._init;try{return N(c(s),r,t)}catch{}}}return""}var U=Object.prototype.hasOwnProperty,Re={},ge=I.ReactDebugCurrentFrame;function z(e){if(e){var r=e._owner,t=N(e.type,e._source,r?r.type:null);ge.setExtraStackFrame(t)}else ge.setExtraStackFrame(null)}function Xe(e,r,t,a,s){{var c=Function.call.bind(U);for(var i in e)if(c(e,i)){var o=void 0;try{if(typeof e[i]!="function"){var _=Error((a||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw _.name="Invariant Violation",_}o=e[i](r,i,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(v){o=v}o&&!(o instanceof Error)&&(z(s),E("%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",t,i,typeof o),z(null)),o instanceof Error&&!(o.message in Re)&&(Re[o.message]=!0,z(s),E("Failed %s type: %s",t,o.message),z(null))}}}var Qe=Array.isArray;function K(e){return Qe(e)}function er(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function rr(e){try{return be(e),!1}catch{return!0}}function be(e){return""+e}function he(e){if(rr(e))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",er(e)),be(e)}var $=I.ReactCurrentOwner,tr={key:!0,ref:!0,__self:!0,__source:!0},Ee,_e,H;H={};function nr(e){if(U.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function ar(e){if(U.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function or(e,r){if(typeof e.ref=="string"&&$.current&&r&&$.current.stateNode!==r){var t=P($.current.type);H[t]||(E('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($.current.type),e.ref),H[t]=!0)}}function ir(e,r){{var t=function(){Ee||(Ee=!0,E("%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)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function sr(e,r){{var t=function(){_e||(_e=!0,E("%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)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var ur=function(e,r,t,a,s,c,i){var o={$$typeof:m,type:e,key:r,ref:t,props:i,_owner:c};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function cr(e,r,t,a,s){{var c,i={},o=null,_=null;t!==void 0&&(he(t),o=""+t),ar(r)&&(he(r.key),o=""+r.key),nr(r)&&(_=r.ref,or(r,s));for(c in r)U.call(r,c)&&!tr.hasOwnProperty(c)&&(i[c]=r[c]);if(e&&e.defaultProps){var v=e.defaultProps;for(c in v)i[c]===void 0&&(i[c]=v[c])}if(o||_){var p=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&ir(i,p),_&&sr(i,p)}return ur(e,o,_,s,a,$.current,i)}}var X=I.ReactCurrentOwner,Se=I.ReactDebugCurrentFrame;function A(e){if(e){var r=e._owner,t=N(e.type,e._source,r?r.type:null);Se.setExtraStackFrame(t)}else Se.setExtraStackFrame(null)}var Q;Q=!1;function ee(e){return typeof e=="object"&&e!==null&&e.$$typeof===m}function we(){{if(X.current){var e=P(X.current.type);if(e)return`
|
|
14
|
+
|
|
15
|
+
Check the render method of \``+e+"`."}return""}}function lr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
|
|
16
|
+
|
|
17
|
+
Check your code at `+r+":"+t+"."}return""}}var Te={};function fr(e){{var r=we();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
18
|
+
|
|
19
|
+
Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=fr(r);if(Te[t])return;Te[t]=!0;var a="";e&&e._owner&&e._owner!==X.current&&(a=" It was passed a child from "+P(e._owner.type)+"."),A(e),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,a),A(null)}}function Pe(e,r){{if(typeof e!="object")return;if(K(e))for(var t=0;t<e.length;t++){var a=e[t];ee(a)&&Ce(a,r)}else if(ee(e))e._store&&(e._store.validated=!0);else if(e){var s=$e(e);if(typeof s=="function"&&s!==e.entries)for(var c=s.call(e),i;!(i=c.next()).done;)ee(i.value)&&Ce(i.value,r)}}}function dr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===y||r.$$typeof===C))t=r.propTypes;else return;if(t){var a=P(r);Xe(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!Q){Q=!0;var s=P(r);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function vr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var a=r[t];if(a!=="children"&&a!=="key"){A(e),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),A(null);break}}e.ref!==null&&(A(e),E("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}function Oe(e,r,t,a,s,c){{var i=ze(e);if(!i){var o="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(o+=" 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 _=lr(s);_?o+=_:o+=we();var v;e===null?v="null":K(e)?v="array":e!==void 0&&e.$$typeof===m?(v="<"+(P(e.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):v=typeof e,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",v,o)}var p=cr(e,r,t,s,c);if(p==null)return p;if(i){var T=r.children;if(T!==void 0)if(a)if(K(T)){for(var M=0;M<T.length;M++)Pe(T[M],e);Object.freeze&&Object.freeze(T)}else E("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 Pe(T,e)}return e===S?vr(p):dr(p),p}}function pr(e,r,t){return Oe(e,r,t,!0)}function mr(e,r,t){return Oe(e,r,t,!1)}var yr=mr,Rr=pr;W.Fragment=S,W.jsx=yr,W.jsxs=Rr}()),W}var Y={};/**
|
|
10
20
|
* @license React
|
|
11
|
-
* react-jsx-runtime.
|
|
21
|
+
* react-jsx-runtime.production.min.js
|
|
12
22
|
*
|
|
13
23
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
24
|
*
|
|
15
25
|
* This source code is licensed under the MIT license found in the
|
|
16
26
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+J+e}}var G=!1,L;{var Ge=typeof WeakMap=="function"?WeakMap:Map;L=new Ge}function ye(e,r){if(!e||G)return"";{var t=L.get(e);if(t!==void 0)return t}var a;G=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var c;c=Z.current,Z.current=null,Ze();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(O){a=O}Reflect.construct(e,[],i)}else{try{i.call()}catch(O){a=O}e.call(i.prototype)}}else{try{throw Error()}catch(O){a=O}e()}}catch(O){if(O&&a&&typeof O.stack=="string"){for(var o=O.stack.split(`
|
|
19
|
-
`),S=a.stack.split(`
|
|
20
|
-
`),v=o.length-1,m=S.length-1;v>=1&&m>=0&&o[v]!==S[m];)m--;for(;v>=1&&m>=0;v--,m--)if(o[v]!==S[m]){if(v!==1||m!==1)do if(v--,m--,m<0||o[v]!==S[m]){var T=`
|
|
21
|
-
`+o[v].replace(" at new "," at ");return e.displayName&&T.includes("<anonymous>")&&(T=T.replace("<anonymous>",e.displayName)),typeof e=="function"&&L.set(e,T),T}while(v>=1&&m>=0);break}}}finally{G=!1,Z.current=c,Je(),Error.prepareStackTrace=u}var M=e?e.displayName||e.name:"",xe=M?B(M):"";return typeof e=="function"&&L.set(e,xe),xe}function Ke(e,r,t){return ye(e,!1)}function He(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function N(e,r,t){if(e==null)return"";if(typeof e=="function")return ye(e,He(e));if(typeof e=="string")return B(e);switch(e){case x:return B("Suspense");case E:return B("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case b:return Ke(e.render);case w:return N(e.type,r,t);case f:{var a=e,u=a._payload,c=a._init;try{return N(c(u),r,t)}catch{}}}return""}var U=Object.prototype.hasOwnProperty,Re={},be=I.ReactDebugCurrentFrame;function z(e){if(e){var r=e._owner,t=N(e.type,e._source,r?r.type:null);be.setExtraStackFrame(t)}else be.setExtraStackFrame(null)}function Xe(e,r,t,a,u){{var c=Function.call.bind(U);for(var i in e)if(c(e,i)){var o=void 0;try{if(typeof e[i]!="function"){var S=Error((a||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw S.name="Invariant Violation",S}o=e[i](r,i,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(v){o=v}o&&!(o instanceof Error)&&(z(u),_("%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",t,i,typeof o),z(null)),o instanceof Error&&!(o.message in Re)&&(Re[o.message]=!0,z(u),_("Failed %s type: %s",t,o.message),z(null))}}}var Qe=Array.isArray;function K(e){return Qe(e)}function er(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function rr(e){try{return ge(e),!1}catch{return!0}}function ge(e){return""+e}function he(e){if(rr(e))return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",er(e)),ge(e)}var $=I.ReactCurrentOwner,tr={key:!0,ref:!0,__self:!0,__source:!0},Ee,_e,H;H={};function nr(e){if(U.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function ar(e){if(U.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function or(e,r){if(typeof e.ref=="string"&&$.current&&r&&$.current.stateNode!==r){var t=P($.current.type);H[t]||(_('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($.current.type),e.ref),H[t]=!0)}}function ir(e,r){{var t=function(){Ee||(Ee=!0,_("%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)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function sr(e,r){{var t=function(){_e||(_e=!0,_("%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)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var ur=function(e,r,t,a,u,c,i){var o={$$typeof:p,type:e,key:r,ref:t,props:i,_owner:c};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:u}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function cr(e,r,t,a,u){{var c,i={},o=null,S=null;t!==void 0&&(he(t),o=""+t),ar(r)&&(he(r.key),o=""+r.key),nr(r)&&(S=r.ref,or(r,u));for(c in r)U.call(r,c)&&!tr.hasOwnProperty(c)&&(i[c]=r[c]);if(e&&e.defaultProps){var v=e.defaultProps;for(c in v)i[c]===void 0&&(i[c]=v[c])}if(o||S){var m=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&ir(i,m),S&&sr(i,m)}return ur(e,o,S,u,a,$.current,i)}}var X=I.ReactCurrentOwner,Se=I.ReactDebugCurrentFrame;function A(e){if(e){var r=e._owner,t=N(e.type,e._source,r?r.type:null);Se.setExtraStackFrame(t)}else Se.setExtraStackFrame(null)}var Q;Q=!1;function ee(e){return typeof e=="object"&&e!==null&&e.$$typeof===p}function Ce(){{if(X.current){var e=P(X.current.type);if(e)return`
|
|
22
|
-
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function lr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
|
|
24
|
-
|
|
25
|
-
Check your code at `+r+":"+t+"."}return""}}var Te={};function fr(e){{var r=Ce();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
26
|
-
|
|
27
|
-
Check the top-level render call using <`+t+">.")}return r}}function we(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=fr(r);if(Te[t])return;Te[t]=!0;var a="";e&&e._owner&&e._owner!==X.current&&(a=" It was passed a child from "+P(e._owner.type)+"."),A(e),_('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,a),A(null)}}function Pe(e,r){{if(typeof e!="object")return;if(K(e))for(var t=0;t<e.length;t++){var a=e[t];ee(a)&&we(a,r)}else if(ee(e))e._store&&(e._store.validated=!0);else if(e){var u=$e(e);if(typeof u=="function"&&u!==e.entries)for(var c=u.call(e),i;!(i=c.next()).done;)ee(i.value)&&we(i.value,r)}}}function dr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===b||r.$$typeof===w))t=r.propTypes;else return;if(t){var a=P(r);Xe(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!Q){Q=!0;var u=P(r);_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",u||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function vr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var a=r[t];if(a!=="children"&&a!=="key"){A(e),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),A(null);break}}e.ref!==null&&(A(e),_("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}function Oe(e,r,t,a,u,c){{var i=ze(e);if(!i){var o="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(o+=" 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 S=lr(u);S?o+=S:o+=Ce();var v;e===null?v="null":K(e)?v="array":e!==void 0&&e.$$typeof===p?(v="<"+(P(e.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):v=typeof e,_("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",v,o)}var m=cr(e,r,t,u,c);if(m==null)return m;if(i){var T=r.children;if(T!==void 0)if(a)if(K(T)){for(var M=0;M<T.length;M++)Pe(T[M],e);Object.freeze&&Object.freeze(T)}else _("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 Pe(T,e)}return e===h?vr(m):dr(m),m}}function pr(e,r,t){return Oe(e,r,t,!0)}function mr(e,r,t){return Oe(e,r,t,!1)}var yr=mr,Rr=pr;Y.Fragment=h,Y.jsx=yr,Y.jsxs=Rr}()),Y}process.env.NODE_ENV==="production"?te.exports=Sr():te.exports=Cr();var re=te.exports;function Tr({children:n,maps:p,externalSync:R}){const[h,s]=y.useReducer(Me,{...F.state,maps:p.reduce((f,d)=>(f[d.id]=d,f),F.state.maps)}),g=y.useRef(p.reduce((f,d)=>(f[d.id]={instanceRef:{current:null},overlayRef:{current:null}},f),{})),l=y.useCallback((f,d,k)=>{p[0].id===f&&R?.({type:d,payload:k})},[R,p]),C=y.useCallback((f,d)=>{s({type:D.SetViewState,payload:{id:f,viewState:d}}),l(f,D.SetViewState,d)},[s,l]),b=y.useCallback((f,{height:d,width:k})=>{s({type:D.SetResize,payload:{id:f,height:d,width:k}}),l(f,D.SetResize,{height:d,width:k})},[s,l]),x=y.useCallback((f,d)=>{s({type:D.SetBasemap,payload:{id:f,basemap:d}})},[s]),E=y.useCallback((f,d)=>{s({type:D.SetZoom,payload:{id:f,zoom:d}})},[s]),w=y.useRef({setViewState:C,setBasemap:x,setResize:b,setZoom:E});return re.jsx(ae.Provider,{value:w.current,children:re.jsx(Ae.Provider,{value:g,children:re.jsx(ne.Provider,{value:h,children:n})})})}exports.CartoBasemapURL=br;exports.CartoBasemapsNames=Ie;exports.GMapsBasemap=De;exports.INITIAL_STATE=F;exports.MapActionsContext=ae;exports.MapContext=ne;exports.MapProvider=Tr;exports.reducer=Me;exports.useMap=Fe;exports.useMapActions=Ve;exports.useMapActionsByID=_r;exports.useMapByID=hr;exports.useMapReferencesByID=Er;
|
|
27
|
+
*/var ke;function wr(){if(ke)return Y;ke=1;var n=g,m=Symbol.for("react.element"),R=Symbol.for("react.fragment"),S=Object.prototype.hasOwnProperty,u=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,b={key:!0,ref:!0,__self:!0,__source:!0};function l(w,y,x){var h,C={},f=null,d=null;x!==void 0&&(f=""+x),y.key!==void 0&&(f=""+y.key),y.ref!==void 0&&(d=y.ref);for(h in y)S.call(y,h)&&!b.hasOwnProperty(h)&&(C[h]=y[h]);if(w&&w.defaultProps)for(h in y=w.defaultProps,y)C[h]===void 0&&(C[h]=y[h]);return{$$typeof:m,type:w,key:f,ref:d,props:C,_owner:u.current}}return Y.Fragment=R,Y.jsx=l,Y.jsxs=l,Y}process.env.NODE_ENV==="production"?te.exports=wr():te.exports=Sr();var re=te.exports;function Tr({children:n,maps:m,externalSync:R}){const[S,u]=g.useReducer(Me,{...F.state,maps:m.reduce((f,d)=>(f[d.id]=d,f),F.state.maps)}),b=g.useRef(m.reduce((f,d)=>(f[d.id]={instanceRef:{current:null},overlayRef:{current:null}},f),{})),l=g.useCallback((f,d,j)=>{m[0].id===f&&R?.({type:d,payload:j})},[R,m]),w=g.useCallback((f,d)=>{u({type:D.SetViewState,payload:{id:f,viewState:d}}),l(f,D.SetViewState,d)},[u,l]),y=g.useCallback((f,{height:d,width:j})=>{u({type:D.SetResize,payload:{id:f,height:d,width:j}}),l(f,D.SetResize,{height:d,width:j})},[u,l]),x=g.useCallback((f,d)=>{u({type:D.SetBasemap,payload:{id:f,basemap:d}})},[u]),h=g.useCallback((f,d)=>{u({type:D.SetZoom,payload:{id:f,zoom:d}})},[u]),C=g.useRef({setViewState:w,setBasemap:x,setResize:y,setZoom:h});return re.jsx(ae.Provider,{value:C.current,children:re.jsx(Ae.Provider,{value:b,children:re.jsx(ne.Provider,{value:S,children:n})})})}exports.CartoBasemapURL=gr;exports.CartoBasemapsNames=Ie;exports.GMapsBasemap=De;exports.INITIAL_STATE=F;exports.MapActionsContext=ae;exports.MapContext=ne;exports.MapProvider=Tr;exports.reducer=Me;exports.useMap=Fe;exports.useMapActions=Ve;exports.useMapActionsByID=_r;exports.useMapByID=hr;exports.useMapReferencesByID=Er;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Fe, { createContext as ne, useContext as ae,
|
|
2
|
-
var
|
|
3
|
-
const
|
|
1
|
+
import Fe, { createContext as ne, useContext as ae, useReducer as gr, useRef as je, useCallback as M } from "react";
|
|
2
|
+
var Rr = /* @__PURE__ */ ((n) => (n.Roadmap = "roadmap", n.Satellite = "satellite", n.Terrain = "terrain", n))(Rr || {}), br = /* @__PURE__ */ ((n) => (n.DarkMatter = "dark-matter", n.Positron = "positron", n.Voyager = "voyager", n))(br || {});
|
|
3
|
+
const Or = {
|
|
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"
|
|
@@ -21,31 +21,31 @@ const Pr = {
|
|
|
21
21
|
setResize: Z,
|
|
22
22
|
setZoom: Z
|
|
23
23
|
}
|
|
24
|
-
},
|
|
24
|
+
}, Ie = ne(
|
|
25
25
|
Y.state
|
|
26
|
-
),
|
|
26
|
+
), Ae = ne(Y.references), Ve = ne(
|
|
27
27
|
Y.actions
|
|
28
28
|
);
|
|
29
|
-
var
|
|
30
|
-
function hr(n, { type:
|
|
29
|
+
var k = /* @__PURE__ */ ((n) => (n.SetViewState = "SetViewState", n.SetBasemap = "SetBasemap", n.SetResize = "SetResize", n.SetZoom = "SetZoom", n))(k || {});
|
|
30
|
+
function hr(n, { type: m, payload: g }) {
|
|
31
31
|
return {
|
|
32
32
|
SetViewState: () => {
|
|
33
|
-
const { id:
|
|
34
|
-
return l[
|
|
35
|
-
...n.maps[
|
|
36
|
-
viewState:
|
|
33
|
+
const { id: u, viewState: R } = g, l = { ...n.maps };
|
|
34
|
+
return l[u] = {
|
|
35
|
+
...n.maps[u],
|
|
36
|
+
viewState: R
|
|
37
37
|
}, {
|
|
38
38
|
...n,
|
|
39
39
|
maps: l
|
|
40
40
|
};
|
|
41
41
|
},
|
|
42
42
|
SetResize: () => {
|
|
43
|
-
const { id:
|
|
44
|
-
return S[
|
|
45
|
-
...n.maps[
|
|
43
|
+
const { id: u, width: R, height: l } = g, S = { ...n.maps };
|
|
44
|
+
return S[u] = {
|
|
45
|
+
...n.maps[u],
|
|
46
46
|
viewState: {
|
|
47
|
-
...n.maps[
|
|
48
|
-
width:
|
|
47
|
+
...n.maps[u].viewState,
|
|
48
|
+
width: R,
|
|
49
49
|
height: l
|
|
50
50
|
}
|
|
51
51
|
}, {
|
|
@@ -54,75 +54,75 @@ function hr(n, { type: p, payload: y }) {
|
|
|
54
54
|
};
|
|
55
55
|
},
|
|
56
56
|
SetBasemap: () => {
|
|
57
|
-
const { id:
|
|
58
|
-
return l[
|
|
59
|
-
...n.maps[
|
|
60
|
-
basemap:
|
|
57
|
+
const { id: u, basemap: R } = g, l = { ...n.maps };
|
|
58
|
+
return l[u] = {
|
|
59
|
+
...n.maps[u],
|
|
60
|
+
basemap: R
|
|
61
61
|
}, {
|
|
62
62
|
...n,
|
|
63
63
|
maps: l
|
|
64
64
|
};
|
|
65
65
|
},
|
|
66
66
|
SetZoom: () => {
|
|
67
|
-
const { id:
|
|
68
|
-
return l[
|
|
69
|
-
...n.maps[
|
|
67
|
+
const { id: u, zoom: R } = g, l = { ...n.maps };
|
|
68
|
+
return l[u] = {
|
|
69
|
+
...n.maps[u],
|
|
70
70
|
viewState: {
|
|
71
|
-
...n.maps[
|
|
72
|
-
zoom:
|
|
71
|
+
...n.maps[u].viewState,
|
|
72
|
+
zoom: R
|
|
73
73
|
}
|
|
74
74
|
}, {
|
|
75
75
|
...n,
|
|
76
76
|
maps: l
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
-
}[
|
|
79
|
+
}[m]?.() ?? n;
|
|
80
80
|
}
|
|
81
81
|
function Er() {
|
|
82
|
-
return ae(
|
|
82
|
+
return ae(Ie);
|
|
83
83
|
}
|
|
84
84
|
function _r() {
|
|
85
|
-
return ae(
|
|
85
|
+
return ae(Ae);
|
|
86
86
|
}
|
|
87
87
|
function Sr() {
|
|
88
88
|
return ae(Ve);
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function Pr(n) {
|
|
91
91
|
const {
|
|
92
|
-
maps: { [n]:
|
|
92
|
+
maps: { [n]: m }
|
|
93
93
|
} = Er();
|
|
94
|
-
return
|
|
94
|
+
return m;
|
|
95
95
|
}
|
|
96
96
|
function xr(n) {
|
|
97
97
|
const {
|
|
98
98
|
current: {
|
|
99
|
-
[n]: { instanceRef:
|
|
99
|
+
[n]: { instanceRef: m, overlayRef: g }
|
|
100
100
|
}
|
|
101
|
-
} = _r(),
|
|
102
|
-
const l =
|
|
101
|
+
} = _r(), _ = () => {
|
|
102
|
+
const l = m?.current;
|
|
103
103
|
return l?.deck || l?._deck;
|
|
104
|
-
}
|
|
104
|
+
};
|
|
105
105
|
return {
|
|
106
|
-
instanceRef:
|
|
107
|
-
overlayRef:
|
|
108
|
-
getDeckInstance:
|
|
109
|
-
getOverlayInstance:
|
|
110
|
-
getViewState:
|
|
106
|
+
instanceRef: m,
|
|
107
|
+
overlayRef: g,
|
|
108
|
+
getDeckInstance: _,
|
|
109
|
+
getOverlayInstance: () => g?.current,
|
|
110
|
+
getViewState: () => _()._getViewState()
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
113
|
function jr(n) {
|
|
114
|
-
const { setBasemap:
|
|
114
|
+
const { setBasemap: m, setResize: g, setViewState: _, setZoom: u } = Sr();
|
|
115
115
|
return {
|
|
116
|
-
setBasemap:
|
|
117
|
-
setResize:
|
|
118
|
-
setViewState:
|
|
119
|
-
setZoom:
|
|
116
|
+
setBasemap: m.bind(null, n),
|
|
117
|
+
setResize: g.bind(null, n),
|
|
118
|
+
setViewState: _.bind(null, n),
|
|
119
|
+
setZoom: u.bind(null, n)
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
122
|
var te = { exports: {} }, $ = {};
|
|
123
123
|
/**
|
|
124
124
|
* @license React
|
|
125
|
-
* react-jsx-runtime.
|
|
125
|
+
* react-jsx-runtime.development.js
|
|
126
126
|
*
|
|
127
127
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
128
128
|
*
|
|
@@ -131,44 +131,16 @@ var te = { exports: {} }, $ = {};
|
|
|
131
131
|
*/
|
|
132
132
|
var ke;
|
|
133
133
|
function wr() {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
ke = 1;
|
|
137
|
-
var n = Fe, p = Symbol.for("react.element"), y = Symbol.for("react.fragment"), b = Object.prototype.hasOwnProperty, s = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, g = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
138
|
-
function l(S, R, O) {
|
|
139
|
-
var h, T = {}, f = null, d = null;
|
|
140
|
-
O !== void 0 && (f = "" + O), R.key !== void 0 && (f = "" + R.key), R.ref !== void 0 && (d = R.ref);
|
|
141
|
-
for (h in R)
|
|
142
|
-
b.call(R, h) && !g.hasOwnProperty(h) && (T[h] = R[h]);
|
|
143
|
-
if (S && S.defaultProps)
|
|
144
|
-
for (h in R = S.defaultProps, R)
|
|
145
|
-
T[h] === void 0 && (T[h] = R[h]);
|
|
146
|
-
return { $$typeof: p, type: S, key: f, ref: d, props: T, _owner: s.current };
|
|
147
|
-
}
|
|
148
|
-
return $.Fragment = y, $.jsx = l, $.jsxs = l, $;
|
|
149
|
-
}
|
|
150
|
-
var W = {};
|
|
151
|
-
/**
|
|
152
|
-
* @license React
|
|
153
|
-
* react-jsx-runtime.development.js
|
|
154
|
-
*
|
|
155
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
156
|
-
*
|
|
157
|
-
* This source code is licensed under the MIT license found in the
|
|
158
|
-
* LICENSE file in the root directory of this source tree.
|
|
159
|
-
*/
|
|
160
|
-
var De;
|
|
161
|
-
function Tr() {
|
|
162
|
-
return De || (De = 1, process.env.NODE_ENV !== "production" && function() {
|
|
163
|
-
var n = Fe, p = Symbol.for("react.element"), y = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), S = Symbol.for("react.context"), R = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), f = Symbol.for("react.lazy"), d = Symbol.for("react.offscreen"), j = Symbol.iterator, oe = "@@iterator";
|
|
134
|
+
return ke || (ke = 1, process.env.NODE_ENV !== "production" && function() {
|
|
135
|
+
var n = Fe, m = Symbol.for("react.element"), g = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), u = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), S = Symbol.for("react.context"), y = Symbol.for("react.forward_ref"), P = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), f = Symbol.for("react.lazy"), d = Symbol.for("react.offscreen"), x = Symbol.iterator, oe = "@@iterator";
|
|
164
136
|
function Me(e) {
|
|
165
137
|
if (e === null || typeof e != "object")
|
|
166
138
|
return null;
|
|
167
|
-
var r =
|
|
139
|
+
var r = x && e[x] || e[oe];
|
|
168
140
|
return typeof r == "function" ? r : null;
|
|
169
141
|
}
|
|
170
|
-
var
|
|
171
|
-
function
|
|
142
|
+
var D = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
143
|
+
function h(e) {
|
|
172
144
|
{
|
|
173
145
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
|
|
174
146
|
t[a - 1] = arguments[a];
|
|
@@ -177,8 +149,8 @@ function Tr() {
|
|
|
177
149
|
}
|
|
178
150
|
function $e(e, r, t) {
|
|
179
151
|
{
|
|
180
|
-
var a =
|
|
181
|
-
|
|
152
|
+
var a = D.ReactDebugCurrentFrame, s = a.getStackAddendum();
|
|
153
|
+
s !== "" && (r += "%s", t = t.concat([s]));
|
|
182
154
|
var c = t.map(function(i) {
|
|
183
155
|
return String(i);
|
|
184
156
|
});
|
|
@@ -188,7 +160,7 @@ function Tr() {
|
|
|
188
160
|
var We = !1, Ye = !1, Le = !1, Be = !1, Ne = !1, ie;
|
|
189
161
|
ie = Symbol.for("react.module.reference");
|
|
190
162
|
function Ue(e) {
|
|
191
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
163
|
+
return !!(typeof e == "string" || typeof e == "function" || e === _ || e === R || Ne || e === u || e === P || e === b || Be || e === d || We || Ye || Le || typeof e == "object" && e !== null && (e.$$typeof === f || e.$$typeof === T || e.$$typeof === l || e.$$typeof === S || e.$$typeof === y || // This needs to include all possible module reference object
|
|
192
164
|
// types supported by any Flight configuration anywhere since
|
|
193
165
|
// we don't know which Flight build this will end up being used
|
|
194
166
|
// with.
|
|
@@ -198,8 +170,8 @@ function Tr() {
|
|
|
198
170
|
var a = e.displayName;
|
|
199
171
|
if (a)
|
|
200
172
|
return a;
|
|
201
|
-
var
|
|
202
|
-
return
|
|
173
|
+
var s = r.displayName || r.name || "";
|
|
174
|
+
return s !== "" ? t + "(" + s + ")" : t;
|
|
203
175
|
}
|
|
204
176
|
function se(e) {
|
|
205
177
|
return e.displayName || "Context";
|
|
@@ -207,22 +179,22 @@ function Tr() {
|
|
|
207
179
|
function C(e) {
|
|
208
180
|
if (e == null)
|
|
209
181
|
return null;
|
|
210
|
-
if (typeof e.tag == "number" &&
|
|
182
|
+
if (typeof e.tag == "number" && h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
211
183
|
return e.displayName || e.name || null;
|
|
212
184
|
if (typeof e == "string")
|
|
213
185
|
return e;
|
|
214
186
|
switch (e) {
|
|
215
|
-
case
|
|
187
|
+
case _:
|
|
216
188
|
return "Fragment";
|
|
217
|
-
case y:
|
|
218
|
-
return "Portal";
|
|
219
189
|
case g:
|
|
190
|
+
return "Portal";
|
|
191
|
+
case R:
|
|
220
192
|
return "Profiler";
|
|
221
|
-
case
|
|
193
|
+
case u:
|
|
222
194
|
return "StrictMode";
|
|
223
|
-
case
|
|
195
|
+
case P:
|
|
224
196
|
return "Suspense";
|
|
225
|
-
case
|
|
197
|
+
case b:
|
|
226
198
|
return "SuspenseList";
|
|
227
199
|
}
|
|
228
200
|
if (typeof e == "object")
|
|
@@ -233,13 +205,13 @@ function Tr() {
|
|
|
233
205
|
case l:
|
|
234
206
|
var t = e;
|
|
235
207
|
return se(t._context) + ".Provider";
|
|
236
|
-
case
|
|
208
|
+
case y:
|
|
237
209
|
return ze(e, e.render, "ForwardRef");
|
|
238
210
|
case T:
|
|
239
211
|
var a = e.displayName || null;
|
|
240
212
|
return a !== null ? a : C(e.type) || "Memo";
|
|
241
213
|
case f: {
|
|
242
|
-
var
|
|
214
|
+
var s = e, c = s._payload, i = s._init;
|
|
243
215
|
try {
|
|
244
216
|
return C(i(c));
|
|
245
217
|
} catch {
|
|
@@ -249,13 +221,13 @@ function Tr() {
|
|
|
249
221
|
}
|
|
250
222
|
return null;
|
|
251
223
|
}
|
|
252
|
-
var
|
|
224
|
+
var j = Object.assign, A = 0, ue, ce, le, fe, de, ve, pe;
|
|
253
225
|
function me() {
|
|
254
226
|
}
|
|
255
227
|
me.__reactDisabledLog = !0;
|
|
256
228
|
function Ze() {
|
|
257
229
|
{
|
|
258
|
-
if (
|
|
230
|
+
if (A === 0) {
|
|
259
231
|
ue = console.log, ce = console.info, le = console.warn, fe = console.error, de = console.group, ve = console.groupCollapsed, pe = console.groupEnd;
|
|
260
232
|
var e = {
|
|
261
233
|
configurable: !0,
|
|
@@ -273,52 +245,52 @@ function Tr() {
|
|
|
273
245
|
groupEnd: e
|
|
274
246
|
});
|
|
275
247
|
}
|
|
276
|
-
|
|
248
|
+
A++;
|
|
277
249
|
}
|
|
278
250
|
}
|
|
279
251
|
function qe() {
|
|
280
252
|
{
|
|
281
|
-
if (
|
|
253
|
+
if (A--, A === 0) {
|
|
282
254
|
var e = {
|
|
283
255
|
configurable: !0,
|
|
284
256
|
enumerable: !0,
|
|
285
257
|
writable: !0
|
|
286
258
|
};
|
|
287
259
|
Object.defineProperties(console, {
|
|
288
|
-
log:
|
|
260
|
+
log: j({}, e, {
|
|
289
261
|
value: ue
|
|
290
262
|
}),
|
|
291
|
-
info:
|
|
263
|
+
info: j({}, e, {
|
|
292
264
|
value: ce
|
|
293
265
|
}),
|
|
294
|
-
warn:
|
|
266
|
+
warn: j({}, e, {
|
|
295
267
|
value: le
|
|
296
268
|
}),
|
|
297
|
-
error:
|
|
269
|
+
error: j({}, e, {
|
|
298
270
|
value: fe
|
|
299
271
|
}),
|
|
300
|
-
group:
|
|
272
|
+
group: j({}, e, {
|
|
301
273
|
value: de
|
|
302
274
|
}),
|
|
303
|
-
groupCollapsed:
|
|
275
|
+
groupCollapsed: j({}, e, {
|
|
304
276
|
value: ve
|
|
305
277
|
}),
|
|
306
|
-
groupEnd:
|
|
278
|
+
groupEnd: j({}, e, {
|
|
307
279
|
value: pe
|
|
308
280
|
})
|
|
309
281
|
});
|
|
310
282
|
}
|
|
311
|
-
|
|
283
|
+
A < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
312
284
|
}
|
|
313
285
|
}
|
|
314
|
-
var q =
|
|
286
|
+
var q = D.ReactCurrentDispatcher, J;
|
|
315
287
|
function L(e, r, t) {
|
|
316
288
|
{
|
|
317
289
|
if (J === void 0)
|
|
318
290
|
try {
|
|
319
291
|
throw Error();
|
|
320
|
-
} catch (
|
|
321
|
-
var a =
|
|
292
|
+
} catch (s) {
|
|
293
|
+
var a = s.stack.trim().match(/\n( *(at )?)/);
|
|
322
294
|
J = a && a[1] || "";
|
|
323
295
|
}
|
|
324
296
|
return `
|
|
@@ -340,7 +312,7 @@ function Tr() {
|
|
|
340
312
|
}
|
|
341
313
|
var a;
|
|
342
314
|
G = !0;
|
|
343
|
-
var
|
|
315
|
+
var s = Error.prepareStackTrace;
|
|
344
316
|
Error.prepareStackTrace = void 0;
|
|
345
317
|
var c;
|
|
346
318
|
c = q.current, q.current = null, Ze();
|
|
@@ -356,47 +328,47 @@ function Tr() {
|
|
|
356
328
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
357
329
|
try {
|
|
358
330
|
Reflect.construct(i, []);
|
|
359
|
-
} catch (
|
|
360
|
-
a =
|
|
331
|
+
} catch (O) {
|
|
332
|
+
a = O;
|
|
361
333
|
}
|
|
362
334
|
Reflect.construct(e, [], i);
|
|
363
335
|
} else {
|
|
364
336
|
try {
|
|
365
337
|
i.call();
|
|
366
|
-
} catch (
|
|
367
|
-
a =
|
|
338
|
+
} catch (O) {
|
|
339
|
+
a = O;
|
|
368
340
|
}
|
|
369
341
|
e.call(i.prototype);
|
|
370
342
|
}
|
|
371
343
|
} else {
|
|
372
344
|
try {
|
|
373
345
|
throw Error();
|
|
374
|
-
} catch (
|
|
375
|
-
a =
|
|
346
|
+
} catch (O) {
|
|
347
|
+
a = O;
|
|
376
348
|
}
|
|
377
349
|
e();
|
|
378
350
|
}
|
|
379
|
-
} catch (
|
|
380
|
-
if (
|
|
381
|
-
for (var o =
|
|
382
|
-
`),
|
|
383
|
-
`), v = o.length - 1,
|
|
384
|
-
|
|
385
|
-
for (; v >= 1 &&
|
|
386
|
-
if (o[v] !==
|
|
387
|
-
if (v !== 1 ||
|
|
351
|
+
} catch (O) {
|
|
352
|
+
if (O && a && typeof O.stack == "string") {
|
|
353
|
+
for (var o = O.stack.split(`
|
|
354
|
+
`), E = a.stack.split(`
|
|
355
|
+
`), v = o.length - 1, p = E.length - 1; v >= 1 && p >= 0 && o[v] !== E[p]; )
|
|
356
|
+
p--;
|
|
357
|
+
for (; v >= 1 && p >= 0; v--, p--)
|
|
358
|
+
if (o[v] !== E[p]) {
|
|
359
|
+
if (v !== 1 || p !== 1)
|
|
388
360
|
do
|
|
389
|
-
if (v--,
|
|
361
|
+
if (v--, p--, p < 0 || o[v] !== E[p]) {
|
|
390
362
|
var w = `
|
|
391
363
|
` + o[v].replace(" at new ", " at ");
|
|
392
364
|
return e.displayName && w.includes("<anonymous>") && (w = w.replace("<anonymous>", e.displayName)), typeof e == "function" && B.set(e, w), w;
|
|
393
365
|
}
|
|
394
|
-
while (v >= 1 &&
|
|
366
|
+
while (v >= 1 && p >= 0);
|
|
395
367
|
break;
|
|
396
368
|
}
|
|
397
369
|
}
|
|
398
370
|
} finally {
|
|
399
|
-
G = !1, q.current = c, qe(), Error.prepareStackTrace =
|
|
371
|
+
G = !1, q.current = c, qe(), Error.prepareStackTrace = s;
|
|
400
372
|
}
|
|
401
373
|
var I = e ? e.displayName || e.name : "", xe = I ? L(I) : "";
|
|
402
374
|
return typeof e == "function" && B.set(e, xe), xe;
|
|
@@ -416,36 +388,36 @@ function Tr() {
|
|
|
416
388
|
if (typeof e == "string")
|
|
417
389
|
return L(e);
|
|
418
390
|
switch (e) {
|
|
419
|
-
case
|
|
391
|
+
case P:
|
|
420
392
|
return L("Suspense");
|
|
421
|
-
case
|
|
393
|
+
case b:
|
|
422
394
|
return L("SuspenseList");
|
|
423
395
|
}
|
|
424
396
|
if (typeof e == "object")
|
|
425
397
|
switch (e.$$typeof) {
|
|
426
|
-
case
|
|
398
|
+
case y:
|
|
427
399
|
return Ge(e.render);
|
|
428
400
|
case T:
|
|
429
401
|
return N(e.type, r, t);
|
|
430
402
|
case f: {
|
|
431
|
-
var a = e,
|
|
403
|
+
var a = e, s = a._payload, c = a._init;
|
|
432
404
|
try {
|
|
433
|
-
return N(c(
|
|
405
|
+
return N(c(s), r, t);
|
|
434
406
|
} catch {
|
|
435
407
|
}
|
|
436
408
|
}
|
|
437
409
|
}
|
|
438
410
|
return "";
|
|
439
411
|
}
|
|
440
|
-
var U = Object.prototype.hasOwnProperty,
|
|
412
|
+
var U = Object.prototype.hasOwnProperty, ge = {}, Re = D.ReactDebugCurrentFrame;
|
|
441
413
|
function z(e) {
|
|
442
414
|
if (e) {
|
|
443
415
|
var r = e._owner, t = N(e.type, e._source, r ? r.type : null);
|
|
444
|
-
|
|
416
|
+
Re.setExtraStackFrame(t);
|
|
445
417
|
} else
|
|
446
|
-
|
|
418
|
+
Re.setExtraStackFrame(null);
|
|
447
419
|
}
|
|
448
|
-
function He(e, r, t, a,
|
|
420
|
+
function He(e, r, t, a, s) {
|
|
449
421
|
{
|
|
450
422
|
var c = Function.call.bind(U);
|
|
451
423
|
for (var i in e)
|
|
@@ -453,14 +425,14 @@ function Tr() {
|
|
|
453
425
|
var o = void 0;
|
|
454
426
|
try {
|
|
455
427
|
if (typeof e[i] != "function") {
|
|
456
|
-
var
|
|
457
|
-
throw
|
|
428
|
+
var E = Error((a || "React class") + ": " + t + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
429
|
+
throw E.name = "Invariant Violation", E;
|
|
458
430
|
}
|
|
459
431
|
o = e[i](r, i, a, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
460
432
|
} catch (v) {
|
|
461
433
|
o = v;
|
|
462
434
|
}
|
|
463
|
-
o && !(o instanceof Error) && (z(
|
|
435
|
+
o && !(o instanceof Error) && (z(s), h("%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", t, i, typeof o), z(null)), o instanceof Error && !(o.message in ge) && (ge[o.message] = !0, z(s), h("Failed %s type: %s", t, o.message), z(null));
|
|
464
436
|
}
|
|
465
437
|
}
|
|
466
438
|
}
|
|
@@ -486,9 +458,9 @@ function Tr() {
|
|
|
486
458
|
}
|
|
487
459
|
function he(e) {
|
|
488
460
|
if (er(e))
|
|
489
|
-
return
|
|
461
|
+
return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Qe(e)), be(e);
|
|
490
462
|
}
|
|
491
|
-
var
|
|
463
|
+
var V = D.ReactCurrentOwner, rr = {
|
|
492
464
|
key: !0,
|
|
493
465
|
ref: !0,
|
|
494
466
|
__self: !0,
|
|
@@ -512,15 +484,15 @@ function Tr() {
|
|
|
512
484
|
return e.key !== void 0;
|
|
513
485
|
}
|
|
514
486
|
function ar(e, r) {
|
|
515
|
-
if (typeof e.ref == "string" &&
|
|
516
|
-
var t = C(
|
|
517
|
-
H[t] || (
|
|
487
|
+
if (typeof e.ref == "string" && V.current && r && V.current.stateNode !== r) {
|
|
488
|
+
var t = C(V.current.type);
|
|
489
|
+
H[t] || (h('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', C(V.current.type), e.ref), H[t] = !0);
|
|
518
490
|
}
|
|
519
491
|
}
|
|
520
492
|
function or(e, r) {
|
|
521
493
|
{
|
|
522
494
|
var t = function() {
|
|
523
|
-
Ee || (Ee = !0,
|
|
495
|
+
Ee || (Ee = !0, h("%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)", r));
|
|
524
496
|
};
|
|
525
497
|
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
526
498
|
get: t,
|
|
@@ -531,7 +503,7 @@ function Tr() {
|
|
|
531
503
|
function ir(e, r) {
|
|
532
504
|
{
|
|
533
505
|
var t = function() {
|
|
534
|
-
_e || (_e = !0,
|
|
506
|
+
_e || (_e = !0, h("%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)", r));
|
|
535
507
|
};
|
|
536
508
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
537
509
|
get: t,
|
|
@@ -539,10 +511,10 @@ function Tr() {
|
|
|
539
511
|
});
|
|
540
512
|
}
|
|
541
513
|
}
|
|
542
|
-
var sr = function(e, r, t, a,
|
|
514
|
+
var sr = function(e, r, t, a, s, c, i) {
|
|
543
515
|
var o = {
|
|
544
516
|
// This tag allows us to uniquely identify this as a React Element
|
|
545
|
-
$$typeof:
|
|
517
|
+
$$typeof: m,
|
|
546
518
|
// Built-in properties that belong on the element
|
|
547
519
|
type: e,
|
|
548
520
|
key: r,
|
|
@@ -565,13 +537,13 @@ function Tr() {
|
|
|
565
537
|
configurable: !1,
|
|
566
538
|
enumerable: !1,
|
|
567
539
|
writable: !1,
|
|
568
|
-
value:
|
|
540
|
+
value: s
|
|
569
541
|
}), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
|
|
570
542
|
};
|
|
571
|
-
function ur(e, r, t, a,
|
|
543
|
+
function ur(e, r, t, a, s) {
|
|
572
544
|
{
|
|
573
|
-
var c, i = {}, o = null,
|
|
574
|
-
t !== void 0 && (he(t), o = "" + t), nr(r) && (he(r.key), o = "" + r.key), tr(r) && (
|
|
545
|
+
var c, i = {}, o = null, E = null;
|
|
546
|
+
t !== void 0 && (he(t), o = "" + t), nr(r) && (he(r.key), o = "" + r.key), tr(r) && (E = r.ref, ar(r, s));
|
|
575
547
|
for (c in r)
|
|
576
548
|
U.call(r, c) && !rr.hasOwnProperty(c) && (i[c] = r[c]);
|
|
577
549
|
if (e && e.defaultProps) {
|
|
@@ -579,15 +551,15 @@ function Tr() {
|
|
|
579
551
|
for (c in v)
|
|
580
552
|
i[c] === void 0 && (i[c] = v[c]);
|
|
581
553
|
}
|
|
582
|
-
if (o ||
|
|
583
|
-
var
|
|
584
|
-
o && or(i,
|
|
554
|
+
if (o || E) {
|
|
555
|
+
var p = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
556
|
+
o && or(i, p), E && ir(i, p);
|
|
585
557
|
}
|
|
586
|
-
return sr(e, o,
|
|
558
|
+
return sr(e, o, E, s, a, V.current, i);
|
|
587
559
|
}
|
|
588
560
|
}
|
|
589
|
-
var X =
|
|
590
|
-
function
|
|
561
|
+
var X = D.ReactCurrentOwner, Se = D.ReactDebugCurrentFrame;
|
|
562
|
+
function F(e) {
|
|
591
563
|
if (e) {
|
|
592
564
|
var r = e._owner, t = N(e.type, e._source, r ? r.type : null);
|
|
593
565
|
Se.setExtraStackFrame(t);
|
|
@@ -597,7 +569,7 @@ function Tr() {
|
|
|
597
569
|
var Q;
|
|
598
570
|
Q = !1;
|
|
599
571
|
function ee(e) {
|
|
600
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
572
|
+
return typeof e == "object" && e !== null && e.$$typeof === m;
|
|
601
573
|
}
|
|
602
574
|
function we() {
|
|
603
575
|
{
|
|
@@ -645,10 +617,10 @@ Check the top-level render call using <` + t + ">.");
|
|
|
645
617
|
return;
|
|
646
618
|
Te[t] = !0;
|
|
647
619
|
var a = "";
|
|
648
|
-
e && e._owner && e._owner !== X.current && (a = " It was passed a child from " + C(e._owner.type) + "."),
|
|
620
|
+
e && e._owner && e._owner !== X.current && (a = " It was passed a child from " + C(e._owner.type) + "."), F(e), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, a), F(null);
|
|
649
621
|
}
|
|
650
622
|
}
|
|
651
|
-
function
|
|
623
|
+
function Oe(e, r) {
|
|
652
624
|
{
|
|
653
625
|
if (typeof e != "object")
|
|
654
626
|
return;
|
|
@@ -660,9 +632,9 @@ Check the top-level render call using <` + t + ">.");
|
|
|
660
632
|
else if (ee(e))
|
|
661
633
|
e._store && (e._store.validated = !0);
|
|
662
634
|
else if (e) {
|
|
663
|
-
var
|
|
664
|
-
if (typeof
|
|
665
|
-
for (var c =
|
|
635
|
+
var s = Me(e);
|
|
636
|
+
if (typeof s == "function" && s !== e.entries)
|
|
637
|
+
for (var c = s.call(e), i; !(i = c.next()).done; )
|
|
666
638
|
ee(i.value) && Ce(i.value, r);
|
|
667
639
|
}
|
|
668
640
|
}
|
|
@@ -675,7 +647,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
675
647
|
var t;
|
|
676
648
|
if (typeof r == "function")
|
|
677
649
|
t = r.propTypes;
|
|
678
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
650
|
+
else if (typeof r == "object" && (r.$$typeof === y || // Note: Memo only checks outer props here.
|
|
679
651
|
// Inner props are checked in the reconciler.
|
|
680
652
|
r.$$typeof === T))
|
|
681
653
|
t = r.propTypes;
|
|
@@ -686,10 +658,10 @@ Check the top-level render call using <` + t + ">.");
|
|
|
686
658
|
He(t, e.props, "prop", a, e);
|
|
687
659
|
} else if (r.PropTypes !== void 0 && !Q) {
|
|
688
660
|
Q = !0;
|
|
689
|
-
var
|
|
690
|
-
|
|
661
|
+
var s = C(r);
|
|
662
|
+
h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", s || "Unknown");
|
|
691
663
|
}
|
|
692
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
664
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
693
665
|
}
|
|
694
666
|
}
|
|
695
667
|
function dr(e) {
|
|
@@ -697,65 +669,93 @@ Check the top-level render call using <` + t + ">.");
|
|
|
697
669
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
698
670
|
var a = r[t];
|
|
699
671
|
if (a !== "children" && a !== "key") {
|
|
700
|
-
|
|
672
|
+
F(e), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), F(null);
|
|
701
673
|
break;
|
|
702
674
|
}
|
|
703
675
|
}
|
|
704
|
-
e.ref !== null && (
|
|
676
|
+
e.ref !== null && (F(e), h("Invalid attribute `ref` supplied to `React.Fragment`."), F(null));
|
|
705
677
|
}
|
|
706
678
|
}
|
|
707
|
-
function
|
|
679
|
+
function Pe(e, r, t, a, s, c) {
|
|
708
680
|
{
|
|
709
681
|
var i = Ue(e);
|
|
710
682
|
if (!i) {
|
|
711
683
|
var o = "";
|
|
712
684
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (o += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
713
|
-
var
|
|
714
|
-
|
|
685
|
+
var E = cr(s);
|
|
686
|
+
E ? o += E : o += we();
|
|
715
687
|
var v;
|
|
716
|
-
e === null ? v = "null" : K(e) ? v = "array" : e !== void 0 && e.$$typeof ===
|
|
688
|
+
e === null ? v = "null" : K(e) ? v = "array" : e !== void 0 && e.$$typeof === m ? (v = "<" + (C(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : v = typeof e, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", v, o);
|
|
717
689
|
}
|
|
718
|
-
var
|
|
719
|
-
if (
|
|
720
|
-
return
|
|
690
|
+
var p = ur(e, r, t, s, c);
|
|
691
|
+
if (p == null)
|
|
692
|
+
return p;
|
|
721
693
|
if (i) {
|
|
722
694
|
var w = r.children;
|
|
723
695
|
if (w !== void 0)
|
|
724
696
|
if (a)
|
|
725
697
|
if (K(w)) {
|
|
726
698
|
for (var I = 0; I < w.length; I++)
|
|
727
|
-
|
|
699
|
+
Oe(w[I], e);
|
|
728
700
|
Object.freeze && Object.freeze(w);
|
|
729
701
|
} else
|
|
730
|
-
|
|
702
|
+
h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
731
703
|
else
|
|
732
|
-
|
|
704
|
+
Oe(w, e);
|
|
733
705
|
}
|
|
734
|
-
return e ===
|
|
706
|
+
return e === _ ? dr(p) : fr(p), p;
|
|
735
707
|
}
|
|
736
708
|
}
|
|
737
709
|
function vr(e, r, t) {
|
|
738
|
-
return
|
|
710
|
+
return Pe(e, r, t, !0);
|
|
739
711
|
}
|
|
740
712
|
function pr(e, r, t) {
|
|
741
|
-
return
|
|
713
|
+
return Pe(e, r, t, !1);
|
|
742
714
|
}
|
|
743
715
|
var mr = pr, yr = vr;
|
|
744
|
-
|
|
745
|
-
}()),
|
|
716
|
+
$.Fragment = _, $.jsx = mr, $.jsxs = yr;
|
|
717
|
+
}()), $;
|
|
718
|
+
}
|
|
719
|
+
var W = {};
|
|
720
|
+
/**
|
|
721
|
+
* @license React
|
|
722
|
+
* react-jsx-runtime.production.min.js
|
|
723
|
+
*
|
|
724
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
725
|
+
*
|
|
726
|
+
* This source code is licensed under the MIT license found in the
|
|
727
|
+
* LICENSE file in the root directory of this source tree.
|
|
728
|
+
*/
|
|
729
|
+
var De;
|
|
730
|
+
function Tr() {
|
|
731
|
+
if (De)
|
|
732
|
+
return W;
|
|
733
|
+
De = 1;
|
|
734
|
+
var n = Fe, m = Symbol.for("react.element"), g = Symbol.for("react.fragment"), _ = Object.prototype.hasOwnProperty, u = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, R = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
735
|
+
function l(S, y, P) {
|
|
736
|
+
var b, T = {}, f = null, d = null;
|
|
737
|
+
P !== void 0 && (f = "" + P), y.key !== void 0 && (f = "" + y.key), y.ref !== void 0 && (d = y.ref);
|
|
738
|
+
for (b in y)
|
|
739
|
+
_.call(y, b) && !R.hasOwnProperty(b) && (T[b] = y[b]);
|
|
740
|
+
if (S && S.defaultProps)
|
|
741
|
+
for (b in y = S.defaultProps, y)
|
|
742
|
+
T[b] === void 0 && (T[b] = y[b]);
|
|
743
|
+
return { $$typeof: m, type: S, key: f, ref: d, props: T, _owner: u.current };
|
|
744
|
+
}
|
|
745
|
+
return W.Fragment = g, W.jsx = l, W.jsxs = l, W;
|
|
746
746
|
}
|
|
747
|
-
process.env.NODE_ENV === "production" ? te.exports =
|
|
747
|
+
process.env.NODE_ENV === "production" ? te.exports = Tr() : te.exports = wr();
|
|
748
748
|
var re = te.exports;
|
|
749
749
|
function kr({
|
|
750
750
|
children: n,
|
|
751
|
-
maps:
|
|
752
|
-
externalSync:
|
|
751
|
+
maps: m,
|
|
752
|
+
externalSync: g
|
|
753
753
|
}) {
|
|
754
|
-
const [
|
|
754
|
+
const [_, u] = gr(hr, {
|
|
755
755
|
...Y.state,
|
|
756
|
-
maps:
|
|
757
|
-
}),
|
|
758
|
-
|
|
756
|
+
maps: m.reduce((f, d) => (f[d.id] = d, f), Y.state.maps)
|
|
757
|
+
}), R = je(
|
|
758
|
+
m.reduce((f, d) => (f[d.id] = {
|
|
759
759
|
instanceRef: {
|
|
760
760
|
current: null
|
|
761
761
|
},
|
|
@@ -763,79 +763,79 @@ function kr({
|
|
|
763
763
|
current: null
|
|
764
764
|
}
|
|
765
765
|
}, f), {})
|
|
766
|
-
), l =
|
|
767
|
-
(f, d,
|
|
768
|
-
|
|
766
|
+
), l = M(
|
|
767
|
+
(f, d, x) => {
|
|
768
|
+
m[0].id === f && g?.({
|
|
769
769
|
type: d,
|
|
770
|
-
payload:
|
|
770
|
+
payload: x
|
|
771
771
|
});
|
|
772
772
|
},
|
|
773
|
-
[
|
|
774
|
-
), S =
|
|
773
|
+
[g, m]
|
|
774
|
+
), S = M(
|
|
775
775
|
(f, d) => {
|
|
776
|
-
|
|
777
|
-
type:
|
|
776
|
+
u({
|
|
777
|
+
type: k.SetViewState,
|
|
778
778
|
payload: {
|
|
779
779
|
id: f,
|
|
780
780
|
viewState: d
|
|
781
781
|
}
|
|
782
|
-
}), l(f,
|
|
782
|
+
}), l(f, k.SetViewState, d);
|
|
783
783
|
},
|
|
784
|
-
[
|
|
785
|
-
),
|
|
786
|
-
(f, { height: d, width:
|
|
787
|
-
|
|
788
|
-
type:
|
|
784
|
+
[u, l]
|
|
785
|
+
), y = M(
|
|
786
|
+
(f, { height: d, width: x }) => {
|
|
787
|
+
u({
|
|
788
|
+
type: k.SetResize,
|
|
789
789
|
payload: {
|
|
790
790
|
id: f,
|
|
791
791
|
height: d,
|
|
792
|
-
width:
|
|
792
|
+
width: x
|
|
793
793
|
}
|
|
794
|
-
}), l(f,
|
|
794
|
+
}), l(f, k.SetResize, { height: d, width: x });
|
|
795
795
|
},
|
|
796
|
-
[
|
|
797
|
-
),
|
|
796
|
+
[u, l]
|
|
797
|
+
), P = M(
|
|
798
798
|
(f, d) => {
|
|
799
|
-
|
|
800
|
-
type:
|
|
799
|
+
u({
|
|
800
|
+
type: k.SetBasemap,
|
|
801
801
|
payload: {
|
|
802
802
|
id: f,
|
|
803
803
|
basemap: d
|
|
804
804
|
}
|
|
805
805
|
});
|
|
806
806
|
},
|
|
807
|
-
[
|
|
808
|
-
),
|
|
807
|
+
[u]
|
|
808
|
+
), b = M(
|
|
809
809
|
(f, d) => {
|
|
810
|
-
|
|
811
|
-
type:
|
|
810
|
+
u({
|
|
811
|
+
type: k.SetZoom,
|
|
812
812
|
payload: {
|
|
813
813
|
id: f,
|
|
814
814
|
zoom: d
|
|
815
815
|
}
|
|
816
816
|
});
|
|
817
817
|
},
|
|
818
|
-
[
|
|
818
|
+
[u]
|
|
819
819
|
), T = je({
|
|
820
820
|
setViewState: S,
|
|
821
|
-
setBasemap:
|
|
822
|
-
setResize:
|
|
823
|
-
setZoom:
|
|
821
|
+
setBasemap: P,
|
|
822
|
+
setResize: y,
|
|
823
|
+
setZoom: b
|
|
824
824
|
});
|
|
825
|
-
return /* @__PURE__ */ re.jsx(Ve.Provider, { value: T.current, children: /* @__PURE__ */ re.jsx(
|
|
825
|
+
return /* @__PURE__ */ re.jsx(Ve.Provider, { value: T.current, children: /* @__PURE__ */ re.jsx(Ae.Provider, { value: R, children: /* @__PURE__ */ re.jsx(Ie.Provider, { value: _, children: n }) }) });
|
|
826
826
|
}
|
|
827
827
|
export {
|
|
828
|
-
|
|
828
|
+
Or as CartoBasemapURL,
|
|
829
829
|
br as CartoBasemapsNames,
|
|
830
|
-
|
|
830
|
+
Rr as GMapsBasemap,
|
|
831
831
|
Y as INITIAL_STATE,
|
|
832
832
|
Ve as MapActionsContext,
|
|
833
|
-
|
|
833
|
+
Ie as MapContext,
|
|
834
834
|
kr as MapProvider,
|
|
835
835
|
hr as reducer,
|
|
836
836
|
Er as useMap,
|
|
837
837
|
Sr as useMapActions,
|
|
838
838
|
jr as useMapActionsByID,
|
|
839
|
-
|
|
839
|
+
Pr as useMapByID,
|
|
840
840
|
xr as useMapReferencesByID
|
|
841
841
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carto/ps-react-maps",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "CARTO's Professional Service React Maps library",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -30,27 +30,27 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@carto/react-basemaps": "2.
|
|
34
|
-
"@deck.gl/core": "8.9.
|
|
35
|
-
"@deck.gl/google-maps": "8.9.
|
|
36
|
-
"@deck.gl/react": "8.9.
|
|
33
|
+
"@carto/react-basemaps": "2.3.5",
|
|
34
|
+
"@deck.gl/core": "8.9.33",
|
|
35
|
+
"@deck.gl/google-maps": "8.9.33",
|
|
36
|
+
"@deck.gl/react": "8.9.33",
|
|
37
37
|
"@react-google-maps/api": "2.19.2",
|
|
38
|
-
"@storybook/addon-actions": "7.
|
|
39
|
-
"@storybook/addon-essentials": "7.
|
|
40
|
-
"@storybook/addon-interactions": "7.
|
|
41
|
-
"@storybook/addon-links": "7.
|
|
42
|
-
"@storybook/blocks": "7.
|
|
43
|
-
"@storybook/builder-vite": "7.
|
|
44
|
-
"@storybook/react": "7.
|
|
45
|
-
"@storybook/react-vite": "7.
|
|
38
|
+
"@storybook/addon-actions": "7.6.7",
|
|
39
|
+
"@storybook/addon-essentials": "7.6.7",
|
|
40
|
+
"@storybook/addon-interactions": "7.6.7",
|
|
41
|
+
"@storybook/addon-links": "7.6.7",
|
|
42
|
+
"@storybook/blocks": "7.6.7",
|
|
43
|
+
"@storybook/builder-vite": "7.6.7",
|
|
44
|
+
"@storybook/react": "7.6.7",
|
|
45
|
+
"@storybook/react-vite": "7.6.7",
|
|
46
46
|
"@storybook/testing-library": "0.2.2",
|
|
47
|
-
"@testing-library/jest-dom": "6.1.
|
|
48
|
-
"@testing-library/react": "14.
|
|
49
|
-
"@testing-library/user-event": "14.5.
|
|
50
|
-
"@types/google.maps": "3.54.
|
|
51
|
-
"maplibre-gl": "3.
|
|
52
|
-
"react-map-gl": "7.1.
|
|
53
|
-
"storybook": "7.
|
|
47
|
+
"@testing-library/jest-dom": "6.1.6",
|
|
48
|
+
"@testing-library/react": "14.1.2",
|
|
49
|
+
"@testing-library/user-event": "14.5.2",
|
|
50
|
+
"@types/google.maps": "3.54.10",
|
|
51
|
+
"maplibre-gl": "3.6.2",
|
|
52
|
+
"react-map-gl": "7.1.7",
|
|
53
|
+
"storybook": "7.6.7"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"react": "17.x || 18.x",
|