@arkyn/components 1.3.97 → 1.3.98
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/bundle.js +264 -254
- package/dist/bundle.umd.cjs +1 -1
- package/dist/components/GoogleSearchPlaces/index.d.ts +1 -1
- package/dist/components/GoogleSearchPlaces/index.d.ts.map +1 -1
- package/dist/components/GoogleSearchPlaces/index.js +26 -3
- package/package.json +1 -1
- package/src/components/GoogleSearchPlaces/index.tsx +40 -5
package/dist/bundle.umd.cjs
CHANGED
@@ -68,7 +68,7 @@ React keys must be passed directly to JSX without using spread:
|
|
68
68
|
<circle cx="120" cy="120" opacity=".3" r="90" />
|
69
69
|
<circle cx="120" cy="120" opacity=".2" r="110" />
|
70
70
|
<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text>
|
71
|
-
</svg>`,l=`Cluster of ${e} markers`,u=Number(google.maps.Marker.MAX_ZINDEX)+e;if(Ze.isAdvancedMarkerAvailable(r)){const p=new DOMParser().parseFromString(a,"image/svg+xml").documentElement;p.setAttribute("transform","translate(0 25)");const d={map:r,position:n,zIndex:u,title:l,content:p};return new google.maps.marker.AdvancedMarkerElement(d)}const c={position:n,zIndex:u,title:l,icon:{url:`data:image/svg+xml;base64,${btoa(a)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(c)}}function $s(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class Tn{constructor(){$s(Tn,google.maps.OverlayView)}}var Dt;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(Dt||(Dt={}));const As=(t,e,n)=>{n.fitBounds(e.bounds)};class zs extends Tn{constructor({map:e,markers:n=[],algorithmOptions:o={},algorithm:r=new js(o),renderer:s=new Bs,onClusterClick:a=As}){super(),this.markers=[...n],this.clusters=[],this.algorithm=r,this.renderer=s,this.onClusterClick=a,e&&this.setMap(e)}addMarker(e,n){this.markers.includes(e)||(this.markers.push(e),n||this.render())}addMarkers(e,n){e.forEach(o=>{this.addMarker(o,!0)}),n||this.render()}removeMarker(e,n){const o=this.markers.indexOf(e);return o===-1?!1:(Ze.setMap(e,null),this.markers.splice(o,1),n||this.render(),!0)}removeMarkers(e,n){let o=!1;return e.forEach(r=>{o=this.removeMarker(r,!0)||o}),o&&!n&&this.render(),o}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,Dt.CLUSTERING_BEGIN,this);const{clusters:n,changed:o}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(o||o==null){const r=new Set;for(const a of n)a.markers.length==1&&r.add(a.markers[0]);const s=[];for(const a of this.clusters)a.marker!=null&&(a.markers.length==1?r.has(a.marker)||Ze.setMap(a.marker,null):s.push(a.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>s.forEach(a=>Ze.setMap(a,null)))}google.maps.event.trigger(this,Dt.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>Ze.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new Ns(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(o=>{o.markers.length===1?o.marker=o.markers[0]:(o.marker=this.renderer.render(o,e,n),o.markers.forEach(r=>Ze.setMap(r,null)),this.onClusterClick&&o.marker.addListener("click",r=>{google.maps.event.trigger(this,Dt.CLUSTER_CLICK,o),this.onClusterClick(r,o,n)})),Ze.setMap(o.marker,n)})}}function Us(t){var e=Xi(),n=i.useState(null),o=n[0],r=n[1];return i.useEffect(function(){if(e&&o===null){var s=new zs(ee(ee({},t),{map:e}));r(s)}},[e]),o}function Fs(t){var e=t.children,n=t.options,o=Us(n);return o!==null?e(o):null}i.memo(Fs);var Ho={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Wo={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function Hs(t){var e=t.children,n=t.anchor,o=t.options,r=t.position,s=t.zIndex,a=t.onCloseClick,l=t.onDomReady,u=t.onContentChanged,c=t.onPositionChanged,f=t.onZindexChanged,p=t.onLoad,d=t.onUnmount,h=i.useContext(ue),E=i.useState(null),m=E[0],C=E[1],x=i.useState(null),O=x[0],w=x[1],I=i.useState(null),y=I[0],b=I[1],M=i.useState(null),P=M[0],U=M[1],T=i.useState(null),z=T[0],X=T[1],A=i.useState(null),F=A[0],V=A[1],H=i.useRef(null);return i.useEffect(function(){m!==null&&(m.close(),n?m.open(h,n):m.getPosition()&&m.open(h))},[h,m,n]),i.useEffect(function(){o&&m!==null&&m.setOptions(o)},[m,o]),i.useEffect(function(){r&&m!==null&&m.setPosition(r)},[r]),i.useEffect(function(){typeof s=="number"&&m!==null&&m.setZIndex(s)},[s]),i.useEffect(function(){m&&a&&(O!==null&&google.maps.event.removeListener(O),w(google.maps.event.addListener(m,"closeclick",a)))},[a]),i.useEffect(function(){m&&l&&(y!==null&&google.maps.event.removeListener(y),b(google.maps.event.addListener(m,"domready",l)))},[l]),i.useEffect(function(){m&&u&&(P!==null&&google.maps.event.removeListener(P),U(google.maps.event.addListener(m,"content_changed",u)))},[u]),i.useEffect(function(){m&&c&&(z!==null&&google.maps.event.removeListener(z),X(google.maps.event.addListener(m,"position_changed",c)))},[c]),i.useEffect(function(){m&&f&&(F!==null&&google.maps.event.removeListener(F),V(google.maps.event.addListener(m,"zindex_changed",f)))},[f]),i.useEffect(function(){var $=new google.maps.InfoWindow(ee({},o||{}));return C($),H.current=document.createElement("div"),a&&w(google.maps.event.addListener($,"closeclick",a)),l&&b(google.maps.event.addListener($,"domready",l)),u&&U(google.maps.event.addListener($,"content_changed",u)),c&&X(google.maps.event.addListener($,"position_changed",c)),f&&V(google.maps.event.addListener($,"zindex_changed",f)),$.setContent(H.current),r&&$.setPosition(r),s&&$.setZIndex(s),n?$.open(h,n):$.getPosition()?$.open(h):$e(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),p&&p($),function(){O&&google.maps.event.removeListener(O),P&&google.maps.event.removeListener(P),y&&google.maps.event.removeListener(y),z&&google.maps.event.removeListener(z),F&&google.maps.event.removeListener(F),d&&d($),$.close()}},[]),H.current?pt.createPortal(i.Children.only(e),H.current):null}i.memo(Hs),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoWindow:null},n.open=function(o,r){r?o.open(n.context,r):o.getPosition()?o.open(n.context):$e(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")},n.setInfoWindowCallback=function(){n.state.infoWindow!==null&&n.containerElement!==null&&(n.state.infoWindow.setContent(n.containerElement),n.open(n.state.infoWindow,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoWindow))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.InfoWindow(ee({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=fe({updaterMap:Wo,eventMap:Ho,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Wo,eventMap:Ho,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(pe(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?pt.createPortal(i.Children.only(this.props.children),this.containerElement):null},e.contextType=ue,e}(i.PureComponent);var Vo={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Zo={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},visible:function(t,e){t.setVisible(e)}},Ws={};function Vs(t){var e=t.options,n=t.draggable,o=t.editable,r=t.visible,s=t.path,a=t.onDblClick,l=t.onDragEnd,u=t.onDragStart,c=t.onMouseDown,f=t.onMouseMove,p=t.onMouseOut,d=t.onMouseOver,h=t.onMouseUp,E=t.onRightClick,m=t.onClick,C=t.onDrag,x=t.onLoad,O=t.onUnmount,w=i.useContext(ue),I=i.useState(null),y=I[0],b=I[1],M=i.useState(null),P=M[0],U=M[1],T=i.useState(null),z=T[0],X=T[1],A=i.useState(null),F=A[0],V=A[1],H=i.useState(null),$=H[0],W=H[1],Q=i.useState(null),k=Q[0],S=Q[1],D=i.useState(null),_=D[0],B=D[1],G=i.useState(null),L=G[0],q=G[1],K=i.useState(null),R=K[0],Y=K[1],oe=i.useState(null),j=oe[0],ce=oe[1],Ce=i.useState(null),me=Ce[0],he=Ce[1],Te=i.useState(null),Me=Te[0],le=Te[1];return i.useEffect(function(){y!==null&&y.setMap(w)},[w]),i.useEffect(function(){typeof e<"u"&&y!==null&&y.setOptions(e)},[y,e]),i.useEffect(function(){typeof n<"u"&&y!==null&&y.setDraggable(n)},[y,n]),i.useEffect(function(){typeof o<"u"&&y!==null&&y.setEditable(o)},[y,o]),i.useEffect(function(){typeof r<"u"&&y!==null&&y.setVisible(r)},[y,r]),i.useEffect(function(){typeof s<"u"&&y!==null&&y.setPath(s)},[y,s]),i.useEffect(function(){y&&a&&(P!==null&&google.maps.event.removeListener(P),U(google.maps.event.addListener(y,"dblclick",a)))},[a]),i.useEffect(function(){y&&l&&(z!==null&&google.maps.event.removeListener(z),X(google.maps.event.addListener(y,"dragend",l)))},[l]),i.useEffect(function(){y&&u&&(F!==null&&google.maps.event.removeListener(F),V(google.maps.event.addListener(y,"dragstart",u)))},[u]),i.useEffect(function(){y&&c&&($!==null&&google.maps.event.removeListener($),W(google.maps.event.addListener(y,"mousedown",c)))},[c]),i.useEffect(function(){y&&f&&(k!==null&&google.maps.event.removeListener(k),S(google.maps.event.addListener(y,"mousemove",f)))},[f]),i.useEffect(function(){y&&p&&(_!==null&&google.maps.event.removeListener(_),B(google.maps.event.addListener(y,"mouseout",p)))},[p]),i.useEffect(function(){y&&d&&(L!==null&&google.maps.event.removeListener(L),q(google.maps.event.addListener(y,"mouseover",d)))},[d]),i.useEffect(function(){y&&h&&(R!==null&&google.maps.event.removeListener(R),Y(google.maps.event.addListener(y,"mouseup",h)))},[h]),i.useEffect(function(){y&&E&&(j!==null&&google.maps.event.removeListener(j),ce(google.maps.event.addListener(y,"rightclick",E)))},[E]),i.useEffect(function(){y&&m&&(me!==null&&google.maps.event.removeListener(me),he(google.maps.event.addListener(y,"click",m)))},[m]),i.useEffect(function(){y&&C&&(Me!==null&&google.maps.event.removeListener(Me),le(google.maps.event.addListener(y,"drag",C)))},[C]),i.useEffect(function(){var re=new google.maps.Polyline(ee(ee({},e||Ws),{map:w}));return s&&re.setPath(s),typeof r<"u"&&re.setVisible(r),typeof o<"u"&&re.setEditable(o),typeof n<"u"&&re.setDraggable(n),a&&U(google.maps.event.addListener(re,"dblclick",a)),l&&X(google.maps.event.addListener(re,"dragend",l)),u&&V(google.maps.event.addListener(re,"dragstart",u)),c&&W(google.maps.event.addListener(re,"mousedown",c)),f&&S(google.maps.event.addListener(re,"mousemove",f)),p&&B(google.maps.event.addListener(re,"mouseout",p)),d&&q(google.maps.event.addListener(re,"mouseover",d)),h&&Y(google.maps.event.addListener(re,"mouseup",h)),E&&ce(google.maps.event.addListener(re,"rightclick",E)),m&&he(google.maps.event.addListener(re,"click",m)),C&&le(google.maps.event.addListener(re,"drag",C)),b(re),x&&x(re),function(){P!==null&&google.maps.event.removeListener(P),z!==null&&google.maps.event.removeListener(z),F!==null&&google.maps.event.removeListener(F),$!==null&&google.maps.event.removeListener($),k!==null&&google.maps.event.removeListener(k),_!==null&&google.maps.event.removeListener(_),L!==null&&google.maps.event.removeListener(L),R!==null&&google.maps.event.removeListener(R),j!==null&&google.maps.event.removeListener(j),me!==null&&google.maps.event.removeListener(me),O&&O(re),re.setMap(null)}},[]),null}i.memo(Vs),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polyline:null},n.setPolylineCallback=function(){n.state.polyline!==null&&n.props.onLoad&&n.props.onLoad(n.state.polyline)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polyline(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Zo,eventMap:Vo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Zo,eventMap:Vo,prevProps:n,nextProps:this.props,instance:this.state.polyline}))},e.prototype.componentWillUnmount=function(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),pe(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var Go={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Yo={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},paths:function(t,e){t.setPaths(e)},visible:function(t,e){t.setVisible(e)}};function Zs(t){var e=t.options,n=t.draggable,o=t.editable,r=t.visible,s=t.path,a=t.paths,l=t.onDblClick,u=t.onDragEnd,c=t.onDragStart,f=t.onMouseDown,p=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,E=t.onMouseUp,m=t.onRightClick,C=t.onClick,x=t.onDrag,O=t.onLoad,w=t.onUnmount,I=t.onEdit,y=i.useContext(ue),b=i.useState(null),M=b[0],P=b[1],U=i.useState(null),T=U[0],z=U[1],X=i.useState(null),A=X[0],F=X[1],V=i.useState(null),H=V[0],$=V[1],W=i.useState(null),Q=W[0],k=W[1],S=i.useState(null),D=S[0],_=S[1],B=i.useState(null),G=B[0],L=B[1],q=i.useState(null),K=q[0],R=q[1],Y=i.useState(null),oe=Y[0],j=Y[1],ce=i.useState(null),Ce=ce[0],me=ce[1],he=i.useState(null),Te=he[0],Me=he[1],le=i.useState(null),re=le[0],Ne=le[1];return i.useEffect(function(){M!==null&&M.setMap(y)},[y]),i.useEffect(function(){typeof e<"u"&&M!==null&&M.setOptions(e)},[M,e]),i.useEffect(function(){typeof n<"u"&&M!==null&&M.setDraggable(n)},[M,n]),i.useEffect(function(){typeof o<"u"&&M!==null&&M.setEditable(o)},[M,o]),i.useEffect(function(){typeof r<"u"&&M!==null&&M.setVisible(r)},[M,r]),i.useEffect(function(){typeof s<"u"&&M!==null&&M.setPath(s)},[M,s]),i.useEffect(function(){typeof a<"u"&&M!==null&&M.setPaths(a)},[M,a]),i.useEffect(function(){M&&l&&(T!==null&&google.maps.event.removeListener(T),z(google.maps.event.addListener(M,"dblclick",l)))},[l]),i.useEffect(function(){M&&(google.maps.event.addListener(M.getPath(),"insert_at",function(){I==null||I(M)}),google.maps.event.addListener(M.getPath(),"set_at",function(){I==null||I(M)}))},[M,I]),i.useEffect(function(){M&&u&&(A!==null&&google.maps.event.removeListener(A),F(google.maps.event.addListener(M,"dragend",u)))},[u]),i.useEffect(function(){M&&c&&(H!==null&&google.maps.event.removeListener(H),$(google.maps.event.addListener(M,"dragstart",c)))},[c]),i.useEffect(function(){M&&f&&(Q!==null&&google.maps.event.removeListener(Q),k(google.maps.event.addListener(M,"mousedown",f)))},[f]),i.useEffect(function(){M&&p&&(D!==null&&google.maps.event.removeListener(D),_(google.maps.event.addListener(M,"mousemove",p)))},[p]),i.useEffect(function(){M&&d&&(G!==null&&google.maps.event.removeListener(G),L(google.maps.event.addListener(M,"mouseout",d)))},[d]),i.useEffect(function(){M&&h&&(K!==null&&google.maps.event.removeListener(K),R(google.maps.event.addListener(M,"mouseover",h)))},[h]),i.useEffect(function(){M&&E&&(oe!==null&&google.maps.event.removeListener(oe),j(google.maps.event.addListener(M,"mouseup",E)))},[E]),i.useEffect(function(){M&&m&&(Ce!==null&&google.maps.event.removeListener(Ce),me(google.maps.event.addListener(M,"rightclick",m)))},[m]),i.useEffect(function(){M&&C&&(Te!==null&&google.maps.event.removeListener(Te),Me(google.maps.event.addListener(M,"click",C)))},[C]),i.useEffect(function(){M&&x&&(re!==null&&google.maps.event.removeListener(re),Ne(google.maps.event.addListener(M,"drag",x)))},[x]),i.useEffect(function(){var ae=new google.maps.Polygon(ee(ee({},e||{}),{map:y}));return s&&ae.setPath(s),a&&ae.setPaths(a),typeof r<"u"&&ae.setVisible(r),typeof o<"u"&&ae.setEditable(o),typeof n<"u"&&ae.setDraggable(n),l&&z(google.maps.event.addListener(ae,"dblclick",l)),u&&F(google.maps.event.addListener(ae,"dragend",u)),c&&$(google.maps.event.addListener(ae,"dragstart",c)),f&&k(google.maps.event.addListener(ae,"mousedown",f)),p&&_(google.maps.event.addListener(ae,"mousemove",p)),d&&L(google.maps.event.addListener(ae,"mouseout",d)),h&&R(google.maps.event.addListener(ae,"mouseover",h)),E&&j(google.maps.event.addListener(ae,"mouseup",E)),m&&me(google.maps.event.addListener(ae,"rightclick",m)),C&&Me(google.maps.event.addListener(ae,"click",C)),x&&Ne(google.maps.event.addListener(ae,"drag",x)),P(ae),O&&O(ae),function(){T!==null&&google.maps.event.removeListener(T),A!==null&&google.maps.event.removeListener(A),H!==null&&google.maps.event.removeListener(H),Q!==null&&google.maps.event.removeListener(Q),D!==null&&google.maps.event.removeListener(D),G!==null&&google.maps.event.removeListener(G),K!==null&&google.maps.event.removeListener(K),oe!==null&&google.maps.event.removeListener(oe),Ce!==null&&google.maps.event.removeListener(Ce),Te!==null&&google.maps.event.removeListener(Te),w&&w(ae),ae.setMap(null)}},[]),null}i.memo(Zs),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polygon:null},n.setPolygonCallback=function(){n.state.polygon!==null&&n.props.onLoad&&n.props.onLoad(n.state.polygon)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polygon(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Yo,eventMap:Go,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Yo,eventMap:Go,prevProps:n,nextProps:this.props,instance:this.state.polygon}))},e.prototype.componentWillUnmount=function(){this.state.polygon!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),pe(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var qo={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Ko={bounds:function(t,e){t.setBounds(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},visible:function(t,e){t.setVisible(e)}};function Gs(t){var e=t.options,n=t.bounds,o=t.draggable,r=t.editable,s=t.visible,a=t.onDblClick,l=t.onDragEnd,u=t.onDragStart,c=t.onMouseDown,f=t.onMouseMove,p=t.onMouseOut,d=t.onMouseOver,h=t.onMouseUp,E=t.onRightClick,m=t.onClick,C=t.onDrag,x=t.onBoundsChanged,O=t.onLoad,w=t.onUnmount,I=i.useContext(ue),y=i.useState(null),b=y[0],M=y[1],P=i.useState(null),U=P[0],T=P[1],z=i.useState(null),X=z[0],A=z[1],F=i.useState(null),V=F[0],H=F[1],$=i.useState(null),W=$[0],Q=$[1],k=i.useState(null),S=k[0],D=k[1],_=i.useState(null),B=_[0],G=_[1],L=i.useState(null),q=L[0],K=L[1],R=i.useState(null),Y=R[0],oe=R[1],j=i.useState(null),ce=j[0],Ce=j[1],me=i.useState(null),he=me[0],Te=me[1],Me=i.useState(null),le=Me[0],re=Me[1],Ne=i.useState(null),ae=Ne[0],Ae=Ne[1];return i.useEffect(function(){b!==null&&b.setMap(I)},[I]),i.useEffect(function(){typeof e<"u"&&b!==null&&b.setOptions(e)},[b,e]),i.useEffect(function(){typeof o<"u"&&b!==null&&b.setDraggable(o)},[b,o]),i.useEffect(function(){typeof r<"u"&&b!==null&&b.setEditable(r)},[b,r]),i.useEffect(function(){typeof s<"u"&&b!==null&&b.setVisible(s)},[b,s]),i.useEffect(function(){typeof n<"u"&&b!==null&&b.setBounds(n)},[b,n]),i.useEffect(function(){b&&a&&(U!==null&&google.maps.event.removeListener(U),T(google.maps.event.addListener(b,"dblclick",a)))},[a]),i.useEffect(function(){b&&l&&(X!==null&&google.maps.event.removeListener(X),A(google.maps.event.addListener(b,"dragend",l)))},[l]),i.useEffect(function(){b&&u&&(V!==null&&google.maps.event.removeListener(V),H(google.maps.event.addListener(b,"dragstart",u)))},[u]),i.useEffect(function(){b&&c&&(W!==null&&google.maps.event.removeListener(W),Q(google.maps.event.addListener(b,"mousedown",c)))},[c]),i.useEffect(function(){b&&f&&(S!==null&&google.maps.event.removeListener(S),D(google.maps.event.addListener(b,"mousemove",f)))},[f]),i.useEffect(function(){b&&p&&(B!==null&&google.maps.event.removeListener(B),G(google.maps.event.addListener(b,"mouseout",p)))},[p]),i.useEffect(function(){b&&d&&(q!==null&&google.maps.event.removeListener(q),K(google.maps.event.addListener(b,"mouseover",d)))},[d]),i.useEffect(function(){b&&h&&(Y!==null&&google.maps.event.removeListener(Y),oe(google.maps.event.addListener(b,"mouseup",h)))},[h]),i.useEffect(function(){b&&E&&(ce!==null&&google.maps.event.removeListener(ce),Ce(google.maps.event.addListener(b,"rightclick",E)))},[E]),i.useEffect(function(){b&&m&&(he!==null&&google.maps.event.removeListener(he),Te(google.maps.event.addListener(b,"click",m)))},[m]),i.useEffect(function(){b&&C&&(le!==null&&google.maps.event.removeListener(le),re(google.maps.event.addListener(b,"drag",C)))},[C]),i.useEffect(function(){b&&x&&(ae!==null&&google.maps.event.removeListener(ae),Ae(google.maps.event.addListener(b,"bounds_changed",x)))},[x]),i.useEffect(function(){var te=new google.maps.Rectangle(ee(ee({},e||{}),{map:I}));return typeof s<"u"&&te.setVisible(s),typeof r<"u"&&te.setEditable(r),typeof o<"u"&&te.setDraggable(o),typeof n<"u"&&te.setBounds(n),a&&T(google.maps.event.addListener(te,"dblclick",a)),l&&A(google.maps.event.addListener(te,"dragend",l)),u&&H(google.maps.event.addListener(te,"dragstart",u)),c&&Q(google.maps.event.addListener(te,"mousedown",c)),f&&D(google.maps.event.addListener(te,"mousemove",f)),p&&G(google.maps.event.addListener(te,"mouseout",p)),d&&K(google.maps.event.addListener(te,"mouseover",d)),h&&oe(google.maps.event.addListener(te,"mouseup",h)),E&&Ce(google.maps.event.addListener(te,"rightclick",E)),m&&Te(google.maps.event.addListener(te,"click",m)),C&&re(google.maps.event.addListener(te,"drag",C)),x&&Ae(google.maps.event.addListener(te,"bounds_changed",x)),M(te),O&&O(te),function(){U!==null&&google.maps.event.removeListener(U),X!==null&&google.maps.event.removeListener(X),V!==null&&google.maps.event.removeListener(V),W!==null&&google.maps.event.removeListener(W),S!==null&&google.maps.event.removeListener(S),B!==null&&google.maps.event.removeListener(B),q!==null&&google.maps.event.removeListener(q),Y!==null&&google.maps.event.removeListener(Y),ce!==null&&google.maps.event.removeListener(ce),he!==null&&google.maps.event.removeListener(he),le!==null&&google.maps.event.removeListener(le),ae!==null&&google.maps.event.removeListener(ae),w&&w(te),te.setMap(null)}},[]),null}i.memo(Gs),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={rectangle:null},n.setRectangleCallback=function(){n.state.rectangle!==null&&n.props.onLoad&&n.props.onLoad(n.state.rectangle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Rectangle(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Ko,eventMap:qo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Ko,eventMap:qo,prevProps:n,nextProps:this.props,instance:this.state.rectangle}))},e.prototype.componentWillUnmount=function(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),pe(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var Xo={onCenterChanged:"center_changed",onRadiusChanged:"radius_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Jo={center:function(t,e){t.setCenter(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},radius:function(t,e){t.setRadius(e)},visible:function(t,e){t.setVisible(e)}},Ys={};function qs(t){var e=t.options,n=t.center,o=t.radius,r=t.draggable,s=t.editable,a=t.visible,l=t.onDblClick,u=t.onDragEnd,c=t.onDragStart,f=t.onMouseDown,p=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,E=t.onMouseUp,m=t.onRightClick,C=t.onClick,x=t.onDrag,O=t.onCenterChanged,w=t.onRadiusChanged,I=t.onLoad,y=t.onUnmount,b=i.useContext(ue),M=i.useState(null),P=M[0],U=M[1],T=i.useState(null),z=T[0],X=T[1],A=i.useState(null),F=A[0],V=A[1],H=i.useState(null),$=H[0],W=H[1],Q=i.useState(null),k=Q[0],S=Q[1],D=i.useState(null),_=D[0],B=D[1],G=i.useState(null),L=G[0],q=G[1],K=i.useState(null),R=K[0],Y=K[1],oe=i.useState(null),j=oe[0],ce=oe[1],Ce=i.useState(null),me=Ce[0],he=Ce[1],Te=i.useState(null),Me=Te[0],le=Te[1],re=i.useState(null),Ne=re[0],ae=re[1],Ae=i.useState(null),te=Ae[0],We=Ae[1],Xe=i.useState(null),Be=Xe[0],tt=Xe[1];return i.useEffect(function(){P!==null&&P.setMap(b)},[b]),i.useEffect(function(){typeof e<"u"&&P!==null&&P.setOptions(e)},[P,e]),i.useEffect(function(){typeof r<"u"&&P!==null&&P.setDraggable(r)},[P,r]),i.useEffect(function(){typeof s<"u"&&P!==null&&P.setEditable(s)},[P,s]),i.useEffect(function(){typeof a<"u"&&P!==null&&P.setVisible(a)},[P,a]),i.useEffect(function(){typeof o=="number"&&P!==null&&P.setRadius(o)},[P,o]),i.useEffect(function(){typeof n<"u"&&P!==null&&P.setCenter(n)},[P,n]),i.useEffect(function(){P&&l&&(z!==null&&google.maps.event.removeListener(z),X(google.maps.event.addListener(P,"dblclick",l)))},[l]),i.useEffect(function(){P&&u&&(F!==null&&google.maps.event.removeListener(F),V(google.maps.event.addListener(P,"dragend",u)))},[u]),i.useEffect(function(){P&&c&&($!==null&&google.maps.event.removeListener($),W(google.maps.event.addListener(P,"dragstart",c)))},[c]),i.useEffect(function(){P&&f&&(k!==null&&google.maps.event.removeListener(k),S(google.maps.event.addListener(P,"mousedown",f)))},[f]),i.useEffect(function(){P&&p&&(_!==null&&google.maps.event.removeListener(_),B(google.maps.event.addListener(P,"mousemove",p)))},[p]),i.useEffect(function(){P&&d&&(L!==null&&google.maps.event.removeListener(L),q(google.maps.event.addListener(P,"mouseout",d)))},[d]),i.useEffect(function(){P&&h&&(R!==null&&google.maps.event.removeListener(R),Y(google.maps.event.addListener(P,"mouseover",h)))},[h]),i.useEffect(function(){P&&E&&(j!==null&&google.maps.event.removeListener(j),ce(google.maps.event.addListener(P,"mouseup",E)))},[E]),i.useEffect(function(){P&&m&&(me!==null&&google.maps.event.removeListener(me),he(google.maps.event.addListener(P,"rightclick",m)))},[m]),i.useEffect(function(){P&&C&&(Me!==null&&google.maps.event.removeListener(Me),le(google.maps.event.addListener(P,"click",C)))},[C]),i.useEffect(function(){P&&x&&(Ne!==null&&google.maps.event.removeListener(Ne),ae(google.maps.event.addListener(P,"drag",x)))},[x]),i.useEffect(function(){P&&O&&(te!==null&&google.maps.event.removeListener(te),We(google.maps.event.addListener(P,"center_changed",O)))},[C]),i.useEffect(function(){P&&w&&(Be!==null&&google.maps.event.removeListener(Be),tt(google.maps.event.addListener(P,"radius_changed",w)))},[w]),i.useEffect(function(){var ve=new google.maps.Circle(ee(ee({},e||Ys),{map:b}));return typeof o=="number"&&ve.setRadius(o),typeof n<"u"&&ve.setCenter(n),typeof o=="number"&&ve.setRadius(o),typeof a<"u"&&ve.setVisible(a),typeof s<"u"&&ve.setEditable(s),typeof r<"u"&&ve.setDraggable(r),l&&X(google.maps.event.addListener(ve,"dblclick",l)),u&&V(google.maps.event.addListener(ve,"dragend",u)),c&&W(google.maps.event.addListener(ve,"dragstart",c)),f&&S(google.maps.event.addListener(ve,"mousedown",f)),p&&B(google.maps.event.addListener(ve,"mousemove",p)),d&&q(google.maps.event.addListener(ve,"mouseout",d)),h&&Y(google.maps.event.addListener(ve,"mouseover",h)),E&&ce(google.maps.event.addListener(ve,"mouseup",E)),m&&he(google.maps.event.addListener(ve,"rightclick",m)),C&&le(google.maps.event.addListener(ve,"click",C)),x&&ae(google.maps.event.addListener(ve,"drag",x)),O&&We(google.maps.event.addListener(ve,"center_changed",O)),w&&tt(google.maps.event.addListener(ve,"radius_changed",w)),U(ve),I&&I(ve),function(){z!==null&&google.maps.event.removeListener(z),F!==null&&google.maps.event.removeListener(F),$!==null&&google.maps.event.removeListener($),k!==null&&google.maps.event.removeListener(k),_!==null&&google.maps.event.removeListener(_),L!==null&&google.maps.event.removeListener(L),R!==null&&google.maps.event.removeListener(R),j!==null&&google.maps.event.removeListener(j),me!==null&&google.maps.event.removeListener(me),Me!==null&&google.maps.event.removeListener(Me),te!==null&&google.maps.event.removeListener(te),Be!==null&&google.maps.event.removeListener(Be),y&&y(ve),ve.setMap(null)}},[]),null}i.memo(qs),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={circle:null},n.setCircleCallback=function(){n.state.circle!==null&&n.props.onLoad&&n.props.onLoad(n.state.circle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Circle(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Jo,eventMap:Xo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Jo,eventMap:Xo,prevProps:n,nextProps:this.props,instance:this.state.circle}))},e.prototype.componentWillUnmount=function(){var n;this.state.circle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),pe(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var Qo={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},er={add:function(t,e){t.add(e)},addgeojson:function(t,e,n){t.addGeoJson(e,n)},contains:function(t,e){t.contains(e)},foreach:function(t,e){t.forEach(e)},loadgeojson:function(t,e,n,o){t.loadGeoJson(e,n,o)},overridestyle:function(t,e,n){t.overrideStyle(e,n)},remove:function(t,e){t.remove(e)},revertstyle:function(t,e){t.revertStyle(e)},controlposition:function(t,e){t.setControlPosition(e)},controls:function(t,e){t.setControls(e)},drawingmode:function(t,e){t.setDrawingMode(e)},map:function(t,e){t.setMap(e)},style:function(t,e){t.setStyle(e)},togeojson:function(t,e){t.toGeoJson(e)}};function Ks(t){var e=t.options,n=t.onClick,o=t.onDblClick,r=t.onMouseDown,s=t.onMouseMove,a=t.onMouseOut,l=t.onMouseOver,u=t.onMouseUp,c=t.onRightClick,f=t.onAddFeature,p=t.onRemoveFeature,d=t.onRemoveProperty,h=t.onSetGeometry,E=t.onSetProperty,m=t.onLoad,C=t.onUnmount,x=i.useContext(ue),O=i.useState(null),w=O[0],I=O[1],y=i.useState(null),b=y[0],M=y[1],P=i.useState(null),U=P[0],T=P[1],z=i.useState(null),X=z[0],A=z[1],F=i.useState(null),V=F[0],H=F[1],$=i.useState(null),W=$[0],Q=$[1],k=i.useState(null),S=k[0],D=k[1],_=i.useState(null),B=_[0],G=_[1],L=i.useState(null),q=L[0],K=L[1],R=i.useState(null),Y=R[0],oe=R[1],j=i.useState(null),ce=j[0],Ce=j[1],me=i.useState(null),he=me[0],Te=me[1],Me=i.useState(null),le=Me[0],re=Me[1],Ne=i.useState(null),ae=Ne[0],Ae=Ne[1];return i.useEffect(function(){w!==null&&w.setMap(x)},[x]),i.useEffect(function(){w&&o&&(b!==null&&google.maps.event.removeListener(b),M(google.maps.event.addListener(w,"dblclick",o)))},[o]),i.useEffect(function(){w&&r&&(U!==null&&google.maps.event.removeListener(U),T(google.maps.event.addListener(w,"mousedown",r)))},[r]),i.useEffect(function(){w&&s&&(X!==null&&google.maps.event.removeListener(X),A(google.maps.event.addListener(w,"mousemove",s)))},[s]),i.useEffect(function(){w&&a&&(V!==null&&google.maps.event.removeListener(V),H(google.maps.event.addListener(w,"mouseout",a)))},[a]),i.useEffect(function(){w&&l&&(W!==null&&google.maps.event.removeListener(W),Q(google.maps.event.addListener(w,"mouseover",l)))},[l]),i.useEffect(function(){w&&u&&(S!==null&&google.maps.event.removeListener(S),D(google.maps.event.addListener(w,"mouseup",u)))},[u]),i.useEffect(function(){w&&c&&(B!==null&&google.maps.event.removeListener(B),G(google.maps.event.addListener(w,"rightclick",c)))},[c]),i.useEffect(function(){w&&n&&(q!==null&&google.maps.event.removeListener(q),K(google.maps.event.addListener(w,"click",n)))},[n]),i.useEffect(function(){w&&f&&(Y!==null&&google.maps.event.removeListener(Y),oe(google.maps.event.addListener(w,"addfeature",f)))},[f]),i.useEffect(function(){w&&p&&(ce!==null&&google.maps.event.removeListener(ce),Ce(google.maps.event.addListener(w,"removefeature",p)))},[p]),i.useEffect(function(){w&&d&&(he!==null&&google.maps.event.removeListener(he),Te(google.maps.event.addListener(w,"removeproperty",d)))},[d]),i.useEffect(function(){w&&h&&(le!==null&&google.maps.event.removeListener(le),re(google.maps.event.addListener(w,"setgeometry",h)))},[h]),i.useEffect(function(){w&&E&&(ae!==null&&google.maps.event.removeListener(ae),Ae(google.maps.event.addListener(w,"setproperty",E)))},[E]),i.useEffect(function(){if(x!==null){var te=new google.maps.Data(ee(ee({},e||{}),{map:x}));o&&M(google.maps.event.addListener(te,"dblclick",o)),r&&T(google.maps.event.addListener(te,"mousedown",r)),s&&A(google.maps.event.addListener(te,"mousemove",s)),a&&H(google.maps.event.addListener(te,"mouseout",a)),l&&Q(google.maps.event.addListener(te,"mouseover",l)),u&&D(google.maps.event.addListener(te,"mouseup",u)),c&&G(google.maps.event.addListener(te,"rightclick",c)),n&&K(google.maps.event.addListener(te,"click",n)),f&&oe(google.maps.event.addListener(te,"addfeature",f)),p&&Ce(google.maps.event.addListener(te,"removefeature",p)),d&&Te(google.maps.event.addListener(te,"removeproperty",d)),h&&re(google.maps.event.addListener(te,"setgeometry",h)),E&&Ae(google.maps.event.addListener(te,"setproperty",E)),I(te),m&&m(te)}return function(){w&&(b!==null&&google.maps.event.removeListener(b),U!==null&&google.maps.event.removeListener(U),X!==null&&google.maps.event.removeListener(X),V!==null&&google.maps.event.removeListener(V),W!==null&&google.maps.event.removeListener(W),S!==null&&google.maps.event.removeListener(S),B!==null&&google.maps.event.removeListener(B),q!==null&&google.maps.event.removeListener(q),Y!==null&&google.maps.event.removeListener(Y),ce!==null&&google.maps.event.removeListener(ce),he!==null&&google.maps.event.removeListener(he),le!==null&&google.maps.event.removeListener(le),ae!==null&&google.maps.event.removeListener(ae),C&&C(w),w.setMap(null))}},[]),null}i.memo(Ks),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={data:null},n.setDataCallback=function(){n.state.data!==null&&n.props.onLoad&&n.props.onLoad(n.state.data)},n}return e.prototype.componentDidMount=function(){if(this.context!==null){var n=new google.maps.Data(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:er,eventMap:Qo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:er,eventMap:Qo,prevProps:n,nextProps:this.props,instance:this.state.data}))},e.prototype.componentWillUnmount=function(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),pe(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var tr={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},nr={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={kmlLayer:null},n.setKmlLayerCallback=function(){n.state.kmlLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.kmlLayer)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.KmlLayer(ee(ee({},this.props.options),{map:this.context}));this.registeredEvents=fe({updaterMap:nr,eventMap:tr,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:nr,eventMap:tr,prevProps:n,nextProps:this.props,instance:this.state.kmlLayer}))},e.prototype.componentWillUnmount=function(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),pe(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(i.PureComponent);function or(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function Xs(t,e){return new e(t.lat,t.lng)}function Js(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))}function Qs(t,e,n){return t instanceof e?t:n(t,e)}function ea(t,e,n){return t instanceof e?t:n(t,e)}function ta(t,e,n){var o=t&&t.fromLatLngToDivPixel(n.getNorthEast()),r=t&&t.fromLatLngToDivPixel(n.getSouthWest());return o&&r?{left:"".concat(r.x+e.x,"px"),top:"".concat(o.y+e.y,"px"),width:"".concat(o.x-r.x-e.x,"px"),height:"".concat(r.y-o.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}function na(t,e,n){var o=t&&t.fromLatLngToDivPixel(n);if(o){var r=o.x,s=o.y;return{left:"".concat(r+e.x,"px"),top:"".concat(s+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function rr(t,e,n,o){return n!==void 0?ta(t,e,ea(n,google.maps.LatLngBounds,Js)):na(t,e,Qs(o,google.maps.LatLng,Xs))}function oa(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function ra(t,e,n,o,r){var s=function(a){Pe(l,a);function l(u,c,f,p){var d=a.call(this)||this;return d.container=u,d.pane=c,d.position=f,d.bounds=p,d}return l.prototype.onAdd=function(){var u,c=(u=this.getPanes())===null||u===void 0?void 0:u[this.pane];c==null||c.appendChild(this.container)},l.prototype.draw=function(){for(var u=this.getProjection(),c=ee({},this.container?or(this.container,r):{x:0,y:0}),f=rr(u,c,this.bounds,this.position),p=0,d=Object.entries(f);p<d.length;p++){var h=d[p],E=h[0],m=h[1];this.container.style[E]=m}},l.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},l}(google.maps.OverlayView);return new s(t,e,n,o)}function ir(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function sr(t){if(!t)return"";var e=t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west));return e+""}function ia(t){var e=t.position,n=t.bounds,o=t.mapPaneName,r=t.zIndex,s=t.onLoad,a=t.onUnmount,l=t.getPixelPositionOffset,u=t.children,c=i.useContext(ue),f=i.useMemo(function(){var d=document.createElement("div");return d.style.position="absolute",d},[]),p=i.useMemo(function(){return ra(f,o,e,n,l)},[f,o,e,n]);return i.useEffect(function(){return s==null||s(p),p==null||p.setMap(c),function(){a==null||a(p),p==null||p.setMap(null)}},[c,p]),i.useEffect(function(){f.style.zIndex="".concat(r)},[r,f]),so.createPortal(u,f)}i.memo(ia),function(t){Pe(e,t);function e(n){var o=t.call(this,n)||this;o.state={paneEl:null,containerStyle:{position:"absolute"}},o.updatePane=function(){var s=o.props.mapPaneName,a=o.overlayView.getPanes();$e(!!s,"OverlayView requires props.mapPaneName but got %s",s),a?o.setState({paneEl:a[s]}):o.setState({paneEl:null})},o.onAdd=function(){var s,a;o.updatePane(),(a=(s=o.props).onLoad)===null||a===void 0||a.call(s,o.overlayView)},o.onPositionElement=function(){var s=o.overlayView.getProjection(),a=ee({x:0,y:0},o.containerRef.current?or(o.containerRef.current,o.props.getPixelPositionOffset):{}),l=rr(s,a,o.props.bounds,o.props.position),u=o.state.containerStyle,c=u.left,f=u.top,p=u.width,d=u.height;oa(l,{left:c,top:f,width:p,height:d})||o.setState({containerStyle:{top:l.top||0,left:l.left||0,width:l.width||0,height:l.height||0,position:"absolute"}})},o.draw=function(){o.onPositionElement()},o.onRemove=function(){var s,a;o.setState(function(){return{paneEl:null}}),(a=(s=o.props).onUnmount)===null||a===void 0||a.call(s,o.overlayView)},o.containerRef=i.createRef();var r=new google.maps.OverlayView;return r.onAdd=o.onAdd,r.draw=o.draw,r.onRemove=o.onRemove,o.overlayView=r,o}return e.prototype.componentDidMount=function(){this.overlayView.setMap(this.context)},e.prototype.componentDidUpdate=function(n){var o=ir(n.position),r=ir(this.props.position),s=sr(n.bounds),a=sr(this.props.bounds);(o!==r||s!==a)&&this.overlayView.draw(),n.mapPaneName!==this.props.mapPaneName&&this.updatePane()},e.prototype.componentWillUnmount=function(){this.overlayView.setMap(null)},e.prototype.render=function(){var n=this.state.paneEl;return n?so.createPortal(v.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:i.Children.only(this.props.children)}),n):null},e.FLOAT_PANE="floatPane",e.MAP_PANE="mapPane",e.MARKER_LAYER="markerLayer",e.OVERLAY_LAYER="overlayLayer",e.OVERLAY_MOUSE_TARGET="overlayMouseTarget",e.contextType=ue,e}(i.PureComponent);function sa(){}var ar={onDblClick:"dblclick",onClick:"click"},lr={opacity:function(t,e){t.setOpacity(e)}};function aa(t){var e=t.url,n=t.bounds,o=t.options,r=t.visible,s=i.useContext(ue),a=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),l=i.useMemo(function(){var u=new google.maps.GroundOverlay(e,a,ee({},o));return u},[]);return i.useEffect(function(){l!==null&&l.setMap(s)},[s]),i.useEffect(function(){typeof e<"u"&&l!==null&&(l.set("url",e),l.setMap(s))},[l,e]),i.useEffect(function(){typeof r<"u"&&l!==null&&l.setOpacity(r?1:0)},[l,r]),i.useEffect(function(){var u=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east));typeof n<"u"&&l!==null&&(l.set("bounds",u),l.setMap(s))},[l,n]),null}i.memo(aa),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={groundOverlay:null},n.setGroundOverlayCallback=function(){n.state.groundOverlay!==null&&n.props.onLoad&&n.props.onLoad(n.state.groundOverlay)},n}return e.prototype.componentDidMount=function(){$e(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var n=new google.maps.GroundOverlay(this.props.url,this.props.bounds,ee(ee({},this.props.options),{map:this.context}));this.registeredEvents=fe({updaterMap:lr,eventMap:ar,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:lr,eventMap:ar,prevProps:n,nextProps:this.props,instance:this.state.groundOverlay}))},e.prototype.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},e.prototype.render=function(){return null},e.defaultProps={onLoad:sa},e.contextType=ue,e}(i.PureComponent);var ur={},cr={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function la(t){var e=t.data,n=t.onLoad,o=t.onUnmount,r=t.options,s=i.useContext(ue),a=i.useState(null),l=a[0],u=a[1];return i.useEffect(function(){google.maps.visualization||$e(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),i.useEffect(function(){$e(!!e,"data property is required in HeatmapLayer %s",e)},[e]),i.useEffect(function(){l!==null&&l.setMap(s)},[s]),i.useEffect(function(){r&&l!==null&&l.setOptions(r)},[l,r]),i.useEffect(function(){var c=new google.maps.visualization.HeatmapLayer(ee(ee({},r||{}),{data:e,map:s}));return u(c),n&&n(c),function(){l!==null&&(o&&o(l),l.setMap(null))}},[]),null}i.memo(la),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={heatmapLayer:null},n.setHeatmapLayerCallback=function(){n.state.heatmapLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.heatmapLayer)},n}return e.prototype.componentDidMount=function(){$e(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),$e(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(ee(ee({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=fe({updaterMap:cr,eventMap:ur,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:cr,eventMap:ur,prevProps:n,nextProps:this.props,instance:this.state.heatmapLayer})},e.prototype.componentWillUnmount=function(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),pe(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var dr={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},fr={register:function(t,e,n){t.registerPanoProvider(e,n)},links:function(t,e){t.setLinks(e)},motionTracking:function(t,e){t.setMotionTracking(e)},options:function(t,e){t.setOptions(e)},pano:function(t,e){t.setPano(e)},position:function(t,e){t.setPosition(e)},pov:function(t,e){t.setPov(e)},visible:function(t,e){t.setVisible(e)},zoom:function(t,e){t.setZoom(e)}};(function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={streetViewPanorama:null},n.setStreetViewPanoramaCallback=function(){n.state.streetViewPanorama!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewPanorama)},n}return e.prototype.componentDidMount=function(){var n,o,r=(o=(n=this.context)===null||n===void 0?void 0:n.getStreetView())!==null&&o!==void 0?o:null;this.registeredEvents=fe({updaterMap:fr,eventMap:dr,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{streetViewPanorama:r}},this.setStreetViewPanoramaCallback)},e.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:fr,eventMap:dr,prevProps:n,nextProps:this.props,instance:this.state.streetViewPanorama}))},e.prototype.componentWillUnmount=function(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),pe(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=ue,e})(i.PureComponent),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={streetViewService:null},n.setStreetViewServiceCallback=function(){n.state.streetViewService!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewService)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:n}},this.setStreetViewServiceCallback)},e.prototype.componentWillUnmount=function(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={directionsService:null},n.setDirectionsServiceCallback=function(){n.state.directionsService!==null&&n.props.onLoad&&n.props.onLoad(n.state.directionsService)},n}return e.prototype.componentDidMount=function(){$e(!!this.props.options,"DirectionsService expected options object as parameter, but got %s",this.props.options);var n=new google.maps.DirectionsService;this.setState(function(){return{directionsService:n}},this.setDirectionsServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.directionsService!==null&&this.state.directionsService.route(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.directionsService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},e.prototype.render=function(){return null},e}(i.PureComponent);var pr={onDirectionsChanged:"directions_changed"},hr={directions:function(t,e){t.setDirections(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},panel:function(t,e){t.setPanel(e)},routeIndex:function(t,e){t.setRouteIndex(e)}};(function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={directionsRenderer:null},n.setDirectionsRendererCallback=function(){n.state.directionsRenderer!==null&&(n.state.directionsRenderer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.directionsRenderer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=fe({updaterMap:hr,eventMap:pr,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:hr,eventMap:pr,prevProps:n,nextProps:this.props,instance:this.state.directionsRenderer}))},e.prototype.componentWillUnmount=function(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),pe(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return v.jsx(v.Fragment,{})},e.contextType=ue,e})(i.PureComponent),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={distanceMatrixService:null},n.setDistanceMatrixServiceCallback=function(){n.state.distanceMatrixService!==null&&n.props.onLoad&&n.props.onLoad(n.state.distanceMatrixService)},n}return e.prototype.componentDidMount=function(){$e(!!this.props.options,"DistanceMatrixService expected options object as parameter, but go %s",this.props.options);var n=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:n}},this.setDistanceMatrixServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.distanceMatrixService!==null&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.distanceMatrixService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},e.prototype.render=function(){return null},e}(i.PureComponent);var gr={onPlacesChanged:"places_changed"},mr={bounds:function(t,e){t.setBounds(e)}},ua=function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=i.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){n.state.searchBox!==null&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}return e.prototype.componentDidMount=function(){if($e(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places),this.containerElement!==null&&this.containerElement.current!==null){var n=this.containerElement.current.querySelector("input");if(n!==null){var o=new google.maps.places.SearchBox(n,this.props.options);this.registeredEvents=fe({updaterMap:mr,eventMap:gr,prevProps:{},nextProps:this.props,instance:o}),this.setState(function(){return{searchBox:o}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:mr,eventMap:gr,prevProps:n,nextProps:this.props,instance:this.state.searchBox}))},e.prototype.componentWillUnmount=function(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),pe(this.registeredEvents))},e.prototype.render=function(){return v.jsx("div",{ref:this.containerElement,children:i.Children.only(this.props.children)})},e.contextType=ue,e}(i.PureComponent),vr={onPlaceChanged:"place_changed"},yr={bounds:function(t,e){t.setBounds(e)},restrictions:function(t,e){t.setComponentRestrictions(e)},fields:function(t,e){t.setFields(e)},options:function(t,e){t.setOptions(e)},types:function(t,e){t.setTypes(e)}};(function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=i.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){n.state.autocomplete!==null&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}return e.prototype.componentDidMount=function(){var n;$e(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var o=(n=this.containerElement.current)===null||n===void 0?void 0:n.querySelector("input");if(o){var r=new google.maps.places.Autocomplete(o,this.props.options);this.registeredEvents=fe({updaterMap:yr,eventMap:vr,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{autocomplete:r}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:yr,eventMap:vr,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&pe(this.registeredEvents)},e.prototype.render=function(){return v.jsx("div",{ref:this.containerElement,className:this.props.className,children:i.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=ue,e})(i.PureComponent);function ca({coordinates:t,zoom:e=18,draggable:n=!1,googleMapsApiKey:o,className:r,...s}){return t?v.jsx("div",{className:"arkynGoogleMapPinned "+r,...s,children:v.jsx(Co,{libraries:["maps","marker"],googleMapsApiKey:o,loadingElement:v.jsx("div",{className:"arkynGoogleMapPinnedEmpty "+r,...s,children:v.jsx(ke.LoaderIcon,{})}),children:v.jsx(rs,{zoom:e,center:t,mapContainerStyle:{borderRadius:"var(--rounded-cards)",width:"100%",height:"100%"},children:v.jsx(ps,{draggable:n,position:t})})})}):v.jsx("div",{className:"arkynGoogleMapPinnedEmpty "+r,...s,children:v.jsx(ke.MapPinned,{})})}function da(t){const{className:e,...n}=t,o=`arkynSkeleton ${e}`;return v.jsx("aside",{className:o.trim(),...n})}function fa(t){const{emptyMessage:e="Nenhum dado adicionado.",className:n,children:o,...r}=t,s=`arkynTableBody ${n}`,a=i.Children.count(o)===0;return v.jsx("tbody",{className:s.trim(),...r,children:a?v.jsx("tr",{className:"arkynTableBodyEmptyLine",children:v.jsx("td",{colSpan:100,children:v.jsx("div",{children:e})})}):o})}function pa(t){const{className:e,children:n,...o}=t,r=`arkynTableCaption ${e}`;return v.jsx("caption",{className:r.trim(),...o,children:v.jsx("div",{className:"arkynTableCaptionContent",children:n})})}function ha(t){const{children:e,className:n,...o}=t,r=`arkynTableContainer ${n}`;return v.jsx("div",{className:r.trim(),...o,children:v.jsx("table",{children:e})})}function ga(t){const{className:e,children:n,...o}=t,r=`arkynTableFooter ${e}`;return v.jsxs("tfoot",{className:r.trim(),...o,children:[v.jsx("tr",{className:"spacingRow"}),v.jsx("tr",{children:v.jsx("th",{colSpan:100,children:v.jsx("div",{className:"arkynTableFooterContent",children:n})})})]})}function ma(t){const{className:e,children:n,...o}=t,r=`arkynTableHeader ${e}`;return v.jsxs("thead",{className:r.trim(),...o,children:[v.jsx("tr",{children:n}),v.jsx("tr",{className:"spacingRow"})]})}function va(t){const{isLoading:e=!1,scheme:n="primary",variant:o="solid",loadingText:r,size:s="md",leftIcon:a,rightIcon:l,disabled:u,className:c="",children:f,...p}=t,h={xs:12,sm:16,md:20,lg:24}[s],C=`arkynButton ${e?"loadingTrue":"loadingFalse"} ${o} ${n} ${s} ${r?"loadingTextTrue":"loadingTextFalse"} ${c}`;return v.jsxs("button",{className:C,disabled:u||e,...p,children:[v.jsxs("div",{className:"arkynButtonSpinner",children:[v.jsx(ke.Loader2,{size:h,strokeWidth:2.5}),r&&r]}),v.jsxs("div",{className:"arkynButtonContent",children:[Gt(h,a),f,Gt(h,l)]})]})}const br=i.createContext({});function ya(t){var p,d;const e=Ct.useActionData(),{children:n,className:o,id:r,...s}=t,a=i.useRef(null),l=((p=a.current)==null?void 0:p.name)||"",u=((d=e==null?void 0:e.fieldErrors)==null?void 0:d[l])||null,c=i.useId(),f=`arkynFormController ${o}`;return v.jsx(br.Provider,{value:{error:u,id:c,inputRef:a},children:v.jsx("section",{id:r||l||void 0,className:f.trim(),...s,children:n})})}function Ke(){return i.useContext(br)}function ba(t){const{name:e,className:n="",size:o="md",isError:r,defaultChecked:s=!1,checked:a=null,onCheck:l,value:u,...c}=t,{id:f,inputRef:p,error:d}=Ke(),h=r||!!d,[E,m]=i.useState(s||!1),C=typeof a=="boolean"?a:E,w=`arkynCheckbox ${o} ${h?"errorTrue":"errorFalse"} ${C?"checkedTrue":"checkedFalse"} ${n}`;function I(){const y=E;m(!y),l&&l(y?"":u||"checked")}return v.jsxs("button",{id:f,type:"button",className:w,onClick:I,...c,children:[v.jsx("input",{type:"hidden",name:e,ref:p,value:C?u||"checked":""}),v.jsx(ke.Check,{})]})}function La(t){const{children:e,className:n,...o}=t,r=`arkynFormError ${n}`,{error:s}=Ke();return e?v.jsx("strong",{className:r.trim(),...o,children:e}):s?v.jsx("strong",{className:r.trim(),...o,children:s}):v.jsx(v.Fragment,{})}function Ca(t){const{showAsterisk:e=!1,className:n="",...o}=t,{id:r}=Ke(),a=`arkynFormLabel ${e?"asteriskTrue":"asteriskFalse"} ${n}`;return v.jsx("label",{className:a.trim(),htmlFor:r,...o})}function xa(t){const{isLoading:e=!1,scheme:n="primary",variant:o="solid",size:r="md",icon:s,disabled:a,className:l="",...u}=t,c={xs:12,sm:16,md:20,lg:24},p=`arkynIconButton ${o} ${n} ${r} ${e?"loadingTrue":"loadingFalse"} ${l}`;return v.jsxs("button",{disabled:a||e,className:p.trim(),...u,children:[v.jsx("div",{className:"arkynIconButtonSpinner",children:v.jsx(ke.Loader2,{size:c[r],strokeWidth:2.5})}),v.jsx("div",{className:"arkynIconButtonContent",children:v.jsx(s,{size:c[r],strokeWidth:2.5})})]})}function lt(t,e,n){if(!t)return v.jsx(v.Fragment,{});if(typeof t=="string")return v.jsx("p",{className:n,children:t});const o=t;return v.jsx("p",{className:n,children:v.jsx(o,{color:"var(--secondary-600)",size:e,strokeWidth:2.5})})}function On(t){return t&&t.replace(/[^0-9]/g,"")}function Lr(t,e){let n="",o=0;return Array.from(t).forEach((r,s)=>{e[s+o].match(/[0-9]/)||(n+=e[s+o],o++),n+=r}),n}function Cr(t){return t.length>11?"CNPJ":"CPF"}const In={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},xr=On(In.CNPJ).length;function Ea(t,e){const{isLoading:n,isError:o,size:r="md",className:s="",variant:a="solid",prefix:l,sufix:u,leftIcon:c,rightIcon:f,disabled:p,defaultValue:d,readOnly:h,onFocus:E,onBlur:m,title:C,style:x,onChange:O,...w}=t;function I(F){let V=On(F);const H=Cr(V);if(!(V.length>xr))return V=Lr(V,In[H]),V}const y=f?"right":"left",z=`arkyn_input ${l?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${r} ${p||h||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,A={md:20,lg:20}[r];return{isLoading:n,className:z,prefix:lt(l,A,"prefix"),sufix:lt(u,A,"sufix"),LeftIcon:c,RightIcon:f,defaultValue:I(d||""),disabled:p,readOnly:h,onFocus:E,onBlur:m,title:C,style:x,onChange:O,loadingPosition:y,iconSize:A,Spinner:v.jsx(ke.Loader2,{className:"spinner",size:A,strokeWidth:2.5}),...w}}function wa(t){const[e,n]=i.useState(!1),o=i.useRef(null),{inputRef:r,id:s,error:a}=Ke(),l=r||o,u=t.isError||!!a,{disabled:c,title:f,style:p,className:d,prefix:h,sufix:E,iconSize:m,loadingPosition:C,isLoading:x,LeftIcon:O,readOnly:w,onFocus:I,onBlur:y,RightIcon:b,Spinner:M,onChange:P,value:U,defaultValue:T,...z}=Ea({...t,id:s,isError:u},e),[X,A]=i.useState(T),F=O&&!x,V=b&&!x,H=C==="left"&&x,$=C==="right"&&x;function W(){c||!(l!=null&&l.current)||(n(!0),l.current.focus())}function Q(D){let _=On(D.target.value);const B=Cr(_);_.length>xr||(_=Lr(_,In[B]),D.target.value=_,A(_),P&&P(D))}function k(D){n(!0),I&&I(D)}function S(D){n(!1),y&&y(D)}return v.jsxs("section",{title:f,style:p,onClick:W,className:d,children:[h,H&&M,F&&v.jsx(O,{size:m,strokeWidth:2.5}),v.jsx("input",{disabled:c||x,readOnly:w,ref:l,value:U||X,onFocus:k,onChange:Q,onBlur:S,...z}),V&&v.jsx(b,{size:m,strokeWidth:2.5}),$&&M,E]})}const Sa=3,ka=(t="pt-BR",e,n="BRL",o=!0)=>new Intl.NumberFormat(t,{style:"currency",currency:n,currencyDisplay:"symbol",minimumFractionDigits:2,maximumFractionDigits:2}).format(e).slice(o?Sa:0),Xt=2,Er=t=>typeof t=="number"?t:Number(t.toString().replace(/[^0-9-]/g,"")),_n=t=>{let e=t;return typeof t=="string"?(e=Er(t),e%1!==0&&(e=e.toFixed(Xt))):e=Number.isInteger(t)?Number(t)*10**Xt:t.toFixed(Xt),Er(e)/10**Xt},wr=(t,e,n)=>{if(!e)return[0,""];const o=_n(e),r=ka(t,o,n);return[o,r]};function Ma(t,e){const{isLoading:n,isError:o,size:r="md",className:s="",variant:a="solid",prefix:l,sufix:u,leftIcon:c,rightIcon:f,disabled:p,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,max:x=1e9,locale:O="pt-BR",currency:w="BRL",...I}=t,y=f?"right":"left",z=`arkyn_input ${l?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${r} ${p||d||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,A={md:20,lg:20}[r];return{isLoading:n,className:z,prefix:lt(l,A,"prefix"),sufix:lt(u,A,"sufix"),LeftIcon:c,RightIcon:f,disabled:p,locale:O,currency:w,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,max:x,loadingPosition:y,iconSize:A,Spinner:v.jsx(ke.Loader2,{className:"spinner",size:A,strokeWidth:2.5}),...I}}function Pa(t){const[e,n]=i.useState(!1),[o,r]=i.useState("0"),s=i.useRef(null),{inputRef:a,id:l,error:u}=Ke(),c=a||s,f=t.isError||!!u,{disabled:p,title:d,style:h,className:E,prefix:m,sufix:C,iconSize:x,loadingPosition:O,isLoading:w,LeftIcon:I,readOnly:y,onFocus:b,onBlur:M,RightIcon:P,Spinner:U,value:T,max:z,onChangeValue:X,onKeyPress:A,currency:F,locale:V,name:H,defaultValue:$,...W}=Ma({...t,id:l,isError:f},e),Q=I&&!w,k=P&&!w,S=O==="left"&&w,D=O==="right"&&w;function _(){p||!(c!=null&&c.current)||(n(!0),c.current.focus())}function B(R){n(!0),b&&b(R)}function G(R){n(!1),M&&M(R)}const L=R=>{const[Y,oe]=wr(V,R,F);return!z||Y<=z?(r(oe),[Y,oe]):[_n(o),o]},q=R=>{R.preventDefault();const[Y,oe]=L(R.target.value);X(R,String(Y),String(oe))},K=R=>A&&A(R,R.key,R.key);return i.useEffect(()=>{const R=T||+$||void 0,[,Y]=wr(V,R,F);r(Y)},[F,$,T]),v.jsxs("section",{title:d,style:h,onClick:_,className:E,children:[m,S&&U,Q&&v.jsx(I,{size:x,strokeWidth:2.5}),v.jsx("input",{value:o,onChange:q,onBlur:G,onFocus:B,onKeyUp:K,disabled:p||w,readOnly:y,...W}),v.jsx("input",{type:"hidden",ref:c,name:H,value:_n(o)}),D&&U,k&&v.jsx(P,{size:x,strokeWidth:2.5}),C]})}function Ta(t,e){const{isLoading:n,isError:o,size:r="md",className:s="",variant:a="solid",prefix:l,sufix:u,leftIcon:c,rightIcon:f,disabled:p,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,onChange:x,showMask:O=!1,type:w,...I}=t,y=f?"right":"left",z=`arkyn_input ${l?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${r} ${p||d||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,A={md:20,lg:20}[r];return{isLoading:n,className:z,prefix:lt(l,A,"prefix"),sufix:lt(u,A,"sufix"),LeftIcon:c,RightIcon:f,disabled:p,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,onChange:x,loadingPosition:y,iconSize:A,showMask:O,Spinner:v.jsx(ke.Loader2,{className:"spinner",size:A,strokeWidth:2.5}),...I}}const Oa=i.forwardRef((t,e)=>v.jsx("input",{ref:e,...t}));function Ia(t){const[e,n]=i.useState(!1),o=i.useRef(null),{inputRef:r,id:s,error:a}=Ke(),l=r||o,u=t.isError||!!a,{disabled:c,title:f,style:p,className:d,prefix:h,sufix:E,iconSize:m,loadingPosition:C,isLoading:x,LeftIcon:O,readOnly:w,onFocus:I,onBlur:y,RightIcon:b,Spinner:M,...P}=Ta({...t,id:s,isError:u},e),U=O&&!x,T=b&&!x,z=C==="left"&&x,X=C==="right"&&x;function A(){c||!(l!=null&&l.current)||(n(!0),l.current.focus())}function F(H){n(!0),I&&I(H)}function V(H){n(!1),y&&y(H)}return v.jsxs("section",{title:f,style:p,onClick:A,className:d,children:[h,z&&M,U&&v.jsx(O,{size:m,strokeWidth:2.5}),v.jsx(Ii.InputMask,{component:Oa,ref:l,onFocus:F,onBlur:V,disabled:c,...P}),T&&v.jsx(b,{size:m,strokeWidth:2.5}),X&&M,E]})}function _a(t,e){const{isLoading:n,isError:o,size:r="md",className:s="",variant:a="solid",prefix:l,sufix:u,leftIcon:c,rightIcon:f,disabled:p,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,onChange:x,...O}=t,w=f?"right":"left",U=`arkyn_input ${l?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${r} ${p||d||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,z={md:20,lg:20}[r];return{isLoading:n,className:U,prefix:lt(l,z,"prefix"),sufix:lt(u,z,"sufix"),LeftIcon:c,RightIcon:f,disabled:p,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,onChange:x,loadingPosition:w,iconSize:z,Spinner:v.jsx(ke.Loader2,{className:"spinner",size:z,strokeWidth:2.5}),...O}}function Ra(t){const[e,n]=i.useState(!1),o=i.useRef(null),{inputRef:r,id:s,error:a}=Ke(),l=r||o,u=t.isError||!!a,{disabled:c,title:f,style:p,className:d,prefix:h,sufix:E,iconSize:m,loadingPosition:C,isLoading:x,LeftIcon:O,readOnly:w,onFocus:I,onBlur:y,RightIcon:b,type:M,Spinner:P,...U}=_a({...t,id:s,isError:u},e),T=O&&!x,z=b&&!x,X=C==="left"&&x,A=C==="right"&&x;function F(){c||!(l!=null&&l.current)||(n(!0),l.current.focus())}function V($){n(!0),I&&I($)}function H($){n(!1),y&&y($)}return M==="hidden"?v.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:l,...U}):v.jsxs("section",{title:f,style:p,onClick:F,className:d,children:[h,X&&P,T&&v.jsx(O,{size:m,strokeWidth:2.5}),v.jsx("input",{disabled:c||x,readOnly:w,ref:l,onFocus:V,onBlur:H,type:M,...U}),z&&v.jsx(b,{size:m,strokeWidth:2.5}),A&&P,E]})}function Rn(t){return t.type==="currency"?v.jsx(Pa,{...t}):t.type==="masked"?v.jsx(Ia,{...t}):t.type==="cpf-cnpj"?v.jsx(wa,{...t}):v.jsx(Ra,{...t})}const Sr=i.createContext({});function Da(){return i.useContext(Sr)}function ja(t){const{defaultValue:e,name:n,value:o,onChange:r,size:s="md",className:a="",...l}=t,[u,c]=i.useState(e||""),{inputRef:f,id:p}=Ke();function d(E){c(E),r&&r(E)}const h=`arkynRadioGroup ${s} ${a}`;return v.jsxs(Sr.Provider,{value:{onChange:d,value:o||u,size:s},children:[v.jsx("input",{style:{display:"none"},type:"text",id:p,readOnly:!0,name:n,ref:f,value:o||u}),v.jsx("div",{className:h.trim(),...l})]})}function Na(t){const{value:e,size:n,disabled:o,children:r,className:s="",...a}=t,{onChange:l,size:u,value:c}=Da(),{error:f}=Ke(),m=`arkynRadioBox ${n||u} ${c===e?"checkedTrue":"checkedFalse"} ${f?"errorTrue":"errorFalse"} ${o?"disabledTrue":"disabledFalse"} ${s}`;return v.jsxs("label",{className:m.trim(),children:[v.jsx("button",{type:"button",disabled:o,onClick:()=>l(e),onFocus:()=>l(e),...a}),r]})}function Ba(t,e){const{isLoading:n,isError:o,size:r="md",className:s="",variant:a="solid",prefix:l,leftIcon:u,disabled:c,readOnly:f,onFocus:p,onBlur:d,title:h,style:E,closeOnSelect:m=!0,...C}=t,y=`arkyn_select ${l?"hasPrefix":""} ${a} ${r} ${c||f||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,M={md:20,lg:20}[r];return{isLoading:n,className:y,prefix:Fi(l,M,"prefix"),LeftIcon:u,disabled:c||n||f,onFocus:p,onBlur:d,title:h,closeOnSelect:m,style:E,iconSize:M,Spinner:v.jsx(ke.Loader2,{className:"spinner",size:M,strokeWidth:2.5}),...C}}function $a(t){var D;const[e,n]=i.useState(!1),{inputRef:o,id:r,error:s}=Ke(),a=i.useRef(null),l=o||a,u=t.isError||!!s,{disabled:c,title:f,style:p,className:d,prefix:h,iconSize:E,isLoading:m,LeftIcon:C,value:x=null,defaultValue:O="",onFocus:w,onBlur:I,Spinner:y,name:b,placeholder:M,onSelect:P,options:U,optionMaxHeight:T,closeOnSelect:z,...X}=Ba({...t,id:r,isError:u},e),[A,F]=i.useState(O);function V(){c||!(l!=null&&l.current)||e||(n(!0),l.current.focus())}function H(_){e||(n(!0),w&&w(_))}function $(){n(!1),I&&l.current&&l.current.blur()}function W(_){const{label:B,value:G}=_;F(A!==G?G:""),P&&P({label:B,value:G}),z&&$()}const Q=typeof x=="string"?x:A,k=((D=U.find(_=>_.value===Q))==null?void 0:D.label)||"",S=()=>{if(!e&&k)return!0;if(!e&&!k)return!1;if(e&&k)return!0;if(e&&!k)return!1};return v.jsxs(v.Fragment,{children:[v.jsxs("section",{title:f,style:p,onClick:V,className:`${d} placeholder_dark_${S()}`,children:[h,C&&v.jsx(C,{size:E,strokeWidth:2.5}),v.jsx("input",{disabled:c,readOnly:!0,placeholder:k||M,onFocus:H,...X}),v.jsx("input",{type:"hidden",ref:l,name:b,value:Q||"",readOnly:!0}),e&&v.jsxs("div",{className:"arkyn_select_content",style:{overflow:"auto",maxHeight:T},children:[U.map(({label:_,value:B})=>v.jsxs("div",{onClick:()=>W({label:_,value:B}),className:Q===B?"arkyn_select_option active":"arkyn_select_option",children:[_," ",v.jsx(ke.Check,{})]},B)),U.length<=0&&v.jsx("p",{children:"Sem opções disponíveis"})]}),!m&&v.jsx(ke.ChevronDown,{className:"arkyn_select_arrow",size:E,strokeWidth:2.5}),m&&y]}),e&&v.jsx("aside",{className:"arkyn_select_overlay",onClick:$})]})}function Aa(t){const{size:e="lg",defaultChecked:n=!1,checked:o=null,value:r,name:s,className:a="",onCheck:l,...u}=t,[c,f]=i.useState(n),{id:p,inputRef:d}=Ke(),h=typeof o=="boolean"?o:c;function E(){f(!c),l&&l(h?"":r||"checked")}const C=`arkynSwitch ${h?"checkedTrue":"checkedFalse"} ${e} ${a}`;return v.jsx("button",{id:p,type:"button",onClick:E,className:C,...u,children:v.jsx("input",{type:"hidden",name:s,ref:d,value:h?r||"checked":""})})}function za(t){const{variant:e="solid",size:n="md",className:o,disabled:r=!1,readOnly:s=!1,onFocus:a,onBlur:l,title:u,style:c,...f}=t,[p,d]=i.useState(!1),{inputRef:h,id:E,error:m}=Ke(),C=i.useRef(null),x=h||C,w=t.isError||!!m?"errorTrue":"errorFalse",b=`arkynTextarea ${e} ${n} ${r||s?"opacityTrue":"opacityFalse"} ${w} ${p?"focusedTrue":"focusedFalse"} ${o}`;function M(){r||!(x!=null&&x.current)||(d(!0),x.current.focus())}function P(T){d(!0),a&&a(T)}function U(T){d(!1),l&&l(T)}return v.jsx("section",{title:u,style:c,onClick:M,className:b,children:v.jsx("textarea",{id:E,disabled:r,readOnly:s,ref:x,onFocus:P,onBlur:U,...f})})}function Ua({googleMapsApiKey:t,onLoad:e,onPlacesChanged:n,options:o,...r}){return v.jsx(Co,{libraries:["places"],googleMapsApiKey:t,loadingElement:v.jsx(Rn,{type:"text",...r}),children:v.jsx(ua,{onLoad:e,onPlacesChanged:n,options:o,children:v.jsx(Rn,{type:"text",...r})})})}function Fa(t){const{className:e="",...n}=t,o=`arkynBreadcrumbContainer ${e}`;return v.jsx("nav",{className:o,...n})}function Ha(t){const{pathname:e}=Ct.useLocation(),{className:n="",disabled:o=!1,children:r,to:s,...a}=t,u=`arkynBreadcrumbLink ${e===s?"active":"inactive"} ${n}`;return o?v.jsxs("p",{className:u,children:[v.jsx(ke.ChevronRight,{size:14,strokeWidth:2.5}),r]}):v.jsxs(Ct.Link,{to:s,className:u,...a,children:[v.jsx(ke.ChevronRight,{size:14,strokeWidth:2.5}),r]})}function kr(t=""){const e=Ct.useLocation(),n=new URLSearchParams(e.search),o=t?`${t}:`:"",r=s=>{Object.entries(s).forEach(([a,l])=>{l===void 0?n.delete(`${o}${a}`):n.set(`${o}${a}`,String(l))})};return{getParam:s=>n.get(`${o}${s}`),getScopedSearch:s=>{r(s);let a=n.toString();return a&&(a="?"+a),a}}}function Wa(t){const{scope:e,totalCountRegisters:n,perPageKey:o="per_page",pageKey:r="page",siblingsCount:s=2,...a}=t,l=Ct.useNavigate(),{getParam:u,getScopedSearch:c}=kr(e),f=Number(u(r))||1,p=Number(u(o))||20,d=Math.ceil(n/p),h=Ui(f,s),E=zi(f,s,d);function m(C){l(c({page:C}))}return v.jsxs("div",{className:"arkynPagination",...a,children:[v.jsx("button",{className:"arkynPaginationIconButton",disabled:f<=1,onClick:()=>m(f-1),children:v.jsx(ke.ChevronLeft,{})}),f>1+s&&v.jsxs(v.Fragment,{children:[v.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>m(1),children:"1"}),f>2+s&&v.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:v.jsx(ke.Ellipsis,{})})]}),h.map((C,x)=>v.jsx("button",{onClick:()=>m(C),className:"arkynPaginationPageButton",children:C},x)),v.jsx("button",{className:"arkynPaginationCurrent",disabled:!0,children:f}),E.map((C,x)=>v.jsx("button",{onClick:()=>m(C),className:"arkynPaginationPageButton",children:C},x)),f+s<d&&v.jsxs(v.Fragment,{children:[f+1+s<d&&v.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:v.jsx(ke.Ellipsis,{})}),v.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>m(d),children:d})]}),v.jsx("button",{className:"arkynPaginationIconButton",disabled:f>=d,onClick:()=>m(f+1),children:v.jsx(ke.ChevronRight,{})})]})}const Dn=i.createContext({});function Va(){if(!Dn)throw new Error("useTabContext must be used within a TabProvider");return i.useContext(Dn)}function Za(t){const{children:e,onClick:n,defaultActive:o,className:r,...s}=t,[a,l]=i.useState(o||""),[u,c]=i.useState(!0),f=i.useRef(null),p=`arkynTabContainer ${r||""}`,[d,h]=i.useState({width:"0px",left:"0px",transition:"none"}),E=(C,x)=>{const O=C.getBoundingClientRect(),w=f.current.getBoundingClientRect(),I=x?void 0:"none";c(!1),h({transition:I,width:`${O.width}px`,left:`${O.left-w.left}px`})};i.useEffect(()=>{const C=f.current;if(!C)return;let x=null;x=C.querySelector("button.active"),x&&E(x)},[]);const m=C=>{const x=C.target;x&&(l(x.value),x.classList.add("active"),E(x,!0),n&&n(x.value))};return v.jsxs("nav",{ref:f,className:p.trim(),...s,children:[v.jsx(Dn.Provider,{value:{handleTabClick:m,showInitialTab:u,value:a},children:e}),v.jsx("div",{className:"activeLine",style:d})]})}function Ga(t){const{children:e,className:n="",onClick:o,...r}=t,{value:s,showInitialTab:a,handleTabClick:l}=Va(),u=s===r.value&&s?"activeTrue":"activeFalse",f=`arkynTabButton ${s===r.value&&a?"showBorderBottom":""} ${u} ${n}`;function p(d){l(d),o&&o(d)}return v.jsx("button",{onClick:p,className:f.trim(),...r,children:e})}const Mr=i.createContext({});function Ya(t){const{isVisibled:e,makeInvisible:n,orientation:o="left",children:r,className:s,...a}=t,l=o==="left"?"-100%":"100%",c=`arkynDrawerContainer ${o} ${e?"visibleTrue":"visibleFalse"} ${s}`;return v.jsx(Mr.Provider,{value:{makeInvisible:n},children:v.jsx(ht.AnimatePresence,{children:e&&v.jsxs("aside",{className:c.trim(),...a,children:[v.jsx(ht.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),v.jsx(ht.motion.div,{className:"arkynDrawerContainerContent",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${l})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${l})`},children:r})]})})})}function qa(t){const{showCloseButton:e=!0,className:n,children:o,...r}=t,{makeInvisible:s}=i.useContext(Mr),a=`arkynDrawerHeader ${n}`;return v.jsxs("header",{className:a.trim(),...r,children:[o,e&&v.jsx("button",{className:"arkynDrawerHeaderCloseButton",type:"button",onClick:s,"aria-label":"Close drawer",children:v.jsx(ke.X,{size:24})})]})}const Pr=i.createContext({});function Ka(t){const{isVisibled:e,makeInvisible:n,children:o,className:r="",...s}=t,l=`arkynModalContainer ${e?"visibleTrue":"visibleFalse"} ${r}`;return v.jsx(Pr.Provider,{value:{makeInvisible:n},children:v.jsx(ht.AnimatePresence,{children:e&&v.jsxs("aside",{className:l.trim(),...s,children:[v.jsx(ht.motion.div,{className:"arkynModalContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),v.jsx(ht.motion.div,{className:"arkynModalContainerContent",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0,scale:.75},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},children:o})]})})})}function Xa(t){const{alignment:e="right",className:n,...o}=t,r=`arkynModalFooter ${e} ${n}`;return v.jsx("footer",{className:r.trim(),...o})}function Ja(t){const{showCloseButton:e=!0,className:n,children:o,...r}=t,{makeInvisible:s}=i.useContext(Pr),a=`arkynModalHeader ${n}`;return v.jsxs("header",{className:a.trim(),...r,children:[o,e&&v.jsx("button",{type:"button",onClick:s,"aria-label":"Close modal button",className:"arkynModalHeaderCloseButton",children:v.jsx(ke.X,{size:24})})]})}function Qa(t){const{children:e,button:n,closeOnClick:o,orientation:r="bottomLeft"}=t,[s,a]=i.useState(!1),u=`arkynPopover ${r} ${s?"visibleTrue":"visibleFalse"}`;function c(){s||a(!0)}return v.jsxs("div",{className:u,onClick:c,children:[n,v.jsx(ht.motion.div,{style:{visibility:s?"visible":"hidden"},transition:{ease:"easeOut",duration:0},initial:{opacity:0},animate:{opacity:s?1:0},exit:{opacity:0},onClick:()=>o&&a(!1),className:"arkynPopoverContent",children:e}),s&&v.jsx("div",{onClick:()=>a(!1),className:"arkynPopoverOverlay"})]})}function Tr(t){const{message:e,title:n,type:o,size:r="lg"}=t,s=`arkynToast ${o} ${r}`;function a(){switch(o){case"info":return v.jsx(ke.Info,{});case"success":return v.jsx(ke.CheckCircle2,{});case"danger":return v.jsx(ke.XCircle,{});case"warning":return v.jsx(ke.AlertCircle,{});default:return v.jsx(ke.Info,{})}}return v.jsxs("aside",{className:s,children:[v.jsxs("div",{children:[v.jsx("div",{className:"bg"}),v.jsx(a,{})]}),v.jsxs("p",{children:[v.jsx("strong",{title:n,children:n}),v.jsx("span",{children:e})]})]})}function el(t){const{text:e,size:n="lg",children:o,orientation:r="top",className:s="",...a}=t,l=`arkynTooltip ${n} ${r} ${s}`;return v.jsxs("div",{className:l.trim(),...a,children:[o,v.jsx("div",{className:"arkynTooltipText",children:e})]})}var je={},jn={},jt={},Nt={},Or="Expected a function",Ir=NaN,tl="[object Symbol]",nl=/^\s+|\s+$/g,ol=/^[-+]0x[0-9a-f]+$/i,rl=/^0b[01]+$/i,il=/^0o[0-7]+$/i,sl=parseInt,al=typeof Zt=="object"&&Zt&&Zt.Object===Object&&Zt,ll=typeof self=="object"&&self&&self.Object===Object&&self,ul=al||ll||Function("return this")(),cl=Object.prototype,dl=cl.toString,fl=Math.max,pl=Math.min,Nn=function(){return ul.Date.now()};function hl(t,e,n){var o,r,s,a,l,u,c=0,f=!1,p=!1,d=!0;if(typeof t!="function")throw new TypeError(Or);e=_r(e)||0,Jt(n)&&(f=!!n.leading,p="maxWait"in n,s=p?fl(_r(n.maxWait)||0,e):s,d="trailing"in n?!!n.trailing:d);function h(b){var M=o,P=r;return o=r=void 0,c=b,a=t.apply(P,M),a}function E(b){return c=b,l=setTimeout(x,e),f?h(b):a}function m(b){var M=b-u,P=b-c,U=e-M;return p?pl(U,s-P):U}function C(b){var M=b-u,P=b-c;return u===void 0||M>=e||M<0||p&&P>=s}function x(){var b=Nn();if(C(b))return O(b);l=setTimeout(x,m(b))}function O(b){return l=void 0,d&&o?h(b):(o=r=void 0,a)}function w(){l!==void 0&&clearTimeout(l),c=0,o=u=r=l=void 0}function I(){return l===void 0?a:O(Nn())}function y(){var b=Nn(),M=C(b);if(o=arguments,r=this,u=b,M){if(l===void 0)return E(u);if(p)return l=setTimeout(x,e),h(u)}return l===void 0&&(l=setTimeout(x,e)),a}return y.cancel=w,y.flush=I,y}function gl(t,e,n){var o=!0,r=!0;if(typeof t!="function")throw new TypeError(Or);return Jt(n)&&(o="leading"in n?!!n.leading:o,r="trailing"in n?!!n.trailing:r),hl(t,e,{leading:o,maxWait:e,trailing:r})}function Jt(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function ml(t){return!!t&&typeof t=="object"}function vl(t){return typeof t=="symbol"||ml(t)&&dl.call(t)==tl}function _r(t){if(typeof t=="number")return t;if(vl(t))return Ir;if(Jt(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Jt(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(nl,"");var n=rl.test(t);return n||il.test(t)?sl(t.slice(2),n?2:8):ol.test(t)?Ir:+t}var yl=gl,Bt={};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.addPassiveEventListener=function(e,n,o){var r=o.name;r||(r=n,console.warn("Listener must be a named function.")),Qt.has(n)||Qt.set(n,new Set);var s=Qt.get(n);if(!s.has(r)){var a=function(){var l=!1;try{var u=Object.defineProperty({},"passive",{get:function(){l=!0}});window.addEventListener("test",null,u)}catch{}return l}();e.addEventListener(n,o,a?{passive:!0}:!1),s.add(r)}},Bt.removePassiveEventListener=function(e,n,o){e.removeEventListener(n,o),Qt.get(n).delete(o.name||n)};var Qt=new Map;Object.defineProperty(Nt,"__esModule",{value:!0});var bl=yl,Ll=xl(bl),Cl=Bt;function xl(t){return t&&t.__esModule?t:{default:t}}var El=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:66;return(0,Ll.default)(e,n)},_e={spyCallbacks:[],spySetState:[],scrollSpyContainers:[],mount:function(e,n){if(e){var o=El(function(r){_e.scrollHandler(e)},n);_e.scrollSpyContainers.push(e),(0,Cl.addPassiveEventListener)(e,"scroll",o)}},isMounted:function(e){return _e.scrollSpyContainers.indexOf(e)!==-1},currentPositionX:function(e){if(e===document){var n=window.pageYOffset!==void 0,o=(document.compatMode||"")==="CSS1Compat";return n?window.pageXOffset:o?document.documentElement.scrollLeft:document.body.scrollLeft}else return e.scrollLeft},currentPositionY:function(e){if(e===document){var n=window.pageXOffset!==void 0,o=(document.compatMode||"")==="CSS1Compat";return n?window.pageYOffset:o?document.documentElement.scrollTop:document.body.scrollTop}else return e.scrollTop},scrollHandler:function(e){var n=_e.scrollSpyContainers[_e.scrollSpyContainers.indexOf(e)].spyCallbacks||[];n.forEach(function(o){return o(_e.currentPositionX(e),_e.currentPositionY(e))})},addStateHandler:function(e){_e.spySetState.push(e)},addSpyHandler:function(e,n){var o=_e.scrollSpyContainers[_e.scrollSpyContainers.indexOf(n)];o.spyCallbacks||(o.spyCallbacks=[]),o.spyCallbacks.push(e),e(_e.currentPositionX(n),_e.currentPositionY(n))},updateStates:function(){_e.spySetState.forEach(function(e){return e()})},unmount:function(e,n){_e.scrollSpyContainers.forEach(function(o){return o.spyCallbacks&&o.spyCallbacks.length&&o.spyCallbacks.indexOf(n)>-1&&o.spyCallbacks.splice(o.spyCallbacks.indexOf(n),1)}),_e.spySetState&&_e.spySetState.length&&_e.spySetState.indexOf(e)>-1&&_e.spySetState.splice(_e.spySetState.indexOf(e),1),document.removeEventListener("scroll",_e.scrollHandler)},update:function(){return _e.scrollSpyContainers.forEach(function(e){return _e.scrollHandler(e)})}};Nt.default=_e;var xt={},$t={};Object.defineProperty($t,"__esModule",{value:!0});var wl=function(e,n){var o=e.indexOf("#")===0?e.substring(1):e,r=o?"#"+o:"",s=window&&window.location,a=r?s.pathname+s.search+r:s.pathname+s.search;n?history.pushState(history.state,"",a):history.replaceState(history.state,"",a)},Sl=function(){return window.location.hash.replace(/^#/,"")},kl=function(e){return function(n){return e.contains?e!=n&&e.contains(n):!!(e.compareDocumentPosition(n)&16)}},Ml=function(e){return getComputedStyle(e).position!=="static"},Bn=function(e,n){for(var o=e.offsetTop,r=e.offsetParent;r&&!n(r);)o+=r.offsetTop,r=r.offsetParent;return{offsetTop:o,offsetParent:r}},Pl=function(e,n,o){if(o)return e===document?n.getBoundingClientRect().left+(window.scrollX||window.pageXOffset):getComputedStyle(e).position!=="static"?n.offsetLeft:n.offsetLeft-e.offsetLeft;if(e===document)return n.getBoundingClientRect().top+(window.scrollY||window.pageYOffset);if(Ml(e)){if(n.offsetParent!==e){var r=function(f){return f===e||f===document},s=Bn(n,r),a=s.offsetTop,l=s.offsetParent;if(l!==e)throw new Error("Seems containerElement is not an ancestor of the Element");return a}return n.offsetTop}if(n.offsetParent===e.offsetParent)return n.offsetTop-e.offsetTop;var u=function(f){return f===document};return Bn(n,u).offsetTop-Bn(e,u).offsetTop};$t.default={updateHash:wl,getHash:Sl,filterElementInContainer:kl,scrollOffset:Pl};var en={},$n={};Object.defineProperty($n,"__esModule",{value:!0}),$n.default={defaultEasing:function(e){return e<.5?Math.pow(e*2,2)/2:1-Math.pow((1-e)*2,2)/2},linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:-1+(4-2*e)*e},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}};var An={};Object.defineProperty(An,"__esModule",{value:!0});var Tl=Bt,Ol=["mousedown","mousewheel","touchmove","keydown"];An.default={subscribe:function(e){return typeof document<"u"&&Ol.forEach(function(n){return(0,Tl.addPassiveEventListener)(document,n,e)})}};var At={};Object.defineProperty(At,"__esModule",{value:!0});var zn={registered:{},scrollEvent:{register:function(e,n){zn.registered[e]=n},remove:function(e){zn.registered[e]=null}}};At.default=zn,Object.defineProperty(en,"__esModule",{value:!0});var Il=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},_l=$t;tn(_l);var Rl=$n,Rr=tn(Rl),Dl=An,jl=tn(Dl),Nl=At,Qe=tn(Nl);function tn(t){return t&&t.__esModule?t:{default:t}}var Dr=function(e){return Rr.default[e.smooth]||Rr.default.defaultEasing},Bl=function(e){return typeof e=="function"?e:function(){return e}},$l=function(){if(typeof window<"u")return window.requestAnimationFrame||window.webkitRequestAnimationFrame},Un=function(){return $l()||function(t,e,n){window.setTimeout(t,n||1e3/60,new Date().getTime())}}(),jr=function(){return{currentPosition:0,startPosition:0,targetPosition:0,progress:0,duration:0,cancel:!1,target:null,containerElement:null,to:null,start:null,delta:null,percent:null,delayTimeout:null}},Nr=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollLeft;var o=window.pageXOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return o?window.pageXOffset:r?document.documentElement.scrollLeft:document.body.scrollLeft},Br=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollTop;var o=window.pageXOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return o?window.pageYOffset:r?document.documentElement.scrollTop:document.body.scrollTop},Al=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollWidth-n.offsetWidth;var o=document.body,r=document.documentElement;return Math.max(o.scrollWidth,o.offsetWidth,r.clientWidth,r.scrollWidth,r.offsetWidth)},zl=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollHeight-n.offsetHeight;var o=document.body,r=document.documentElement;return Math.max(o.scrollHeight,o.offsetHeight,r.clientHeight,r.scrollHeight,r.offsetHeight)},Ul=function t(e,n,o){var r=n.data;if(!n.ignoreCancelEvents&&r.cancel){Qe.default.registered.end&&Qe.default.registered.end(r.to,r.target,r.currentPositionY);return}if(r.delta=Math.round(r.targetPosition-r.startPosition),r.start===null&&(r.start=o),r.progress=o-r.start,r.percent=r.progress>=r.duration?1:e(r.progress/r.duration),r.currentPosition=r.startPosition+Math.ceil(r.delta*r.percent),r.containerElement&&r.containerElement!==document&&r.containerElement!==document.body?n.horizontal?r.containerElement.scrollLeft=r.currentPosition:r.containerElement.scrollTop=r.currentPosition:n.horizontal?window.scrollTo(r.currentPosition,0):window.scrollTo(0,r.currentPosition),r.percent<1){var s=t.bind(null,e,n);Un.call(window,s);return}Qe.default.registered.end&&Qe.default.registered.end(r.to,r.target,r.currentPosition)},Fn=function(e){e.data.containerElement=e?e.containerId?document.getElementById(e.containerId):e.container&&e.container.nodeType?e.container:document:null},zt=function(e,n,o,r){n.data=n.data||jr(),window.clearTimeout(n.data.delayTimeout);var s=function(){n.data.cancel=!0};if(jl.default.subscribe(s),Fn(n),n.data.start=null,n.data.cancel=!1,n.data.startPosition=n.horizontal?Nr(n):Br(n),n.data.targetPosition=n.absolute?e:e+n.data.startPosition,n.data.startPosition===n.data.targetPosition){Qe.default.registered.end&&Qe.default.registered.end(n.data.to,n.data.target,n.data.currentPosition);return}n.data.delta=Math.round(n.data.targetPosition-n.data.startPosition),n.data.duration=Bl(n.duration)(n.data.delta),n.data.duration=isNaN(parseFloat(n.data.duration))?1e3:parseFloat(n.data.duration),n.data.to=o,n.data.target=r;var a=Dr(n),l=Ul.bind(null,a,n);if(n&&n.delay>0){n.data.delayTimeout=window.setTimeout(function(){Qe.default.registered.begin&&Qe.default.registered.begin(n.data.to,n.data.target),Un.call(window,l)},n.delay);return}Qe.default.registered.begin&&Qe.default.registered.begin(n.data.to,n.data.target),Un.call(window,l)},nn=function(e){return e=Il({},e),e.data=e.data||jr(),e.absolute=!0,e},Fl=function(e){zt(0,nn(e))},Hl=function(e,n){zt(e,nn(n))},Wl=function(e){e=nn(e),Fn(e),zt(e.horizontal?Al(e):zl(e),e)},Vl=function(e,n){n=nn(n),Fn(n);var o=n.horizontal?Nr(n):Br(n);zt(e+o,n)};en.default={animateTopScroll:zt,getAnimationType:Dr,scrollToTop:Fl,scrollToBottom:Wl,scrollTo:Hl,scrollMore:Vl},Object.defineProperty(xt,"__esModule",{value:!0});var Zl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Gl=$t,Yl=Hn(Gl),ql=en,Kl=Hn(ql),Xl=At,on=Hn(Xl);function Hn(t){return t&&t.__esModule?t:{default:t}}var rn={},$r=void 0;xt.default={unmount:function(){rn={}},register:function(e,n){rn[e]=n},unregister:function(e){delete rn[e]},get:function(e){return rn[e]||document.getElementById(e)||document.getElementsByName(e)[0]||document.getElementsByClassName(e)[0]},setActiveLink:function(e){return $r=e},getActiveLink:function(){return $r},scrollTo:function(e,n){var o=this.get(e);if(!o){console.warn("target Element not found");return}n=Zl({},n,{absolute:!1});var r=n.containerId,s=n.container,a=void 0;r?a=document.getElementById(r):s&&s.nodeType?a=s:a=document,n.absolute=!0;var l=n.horizontal,u=Yl.default.scrollOffset(a,o,l)+(n.offset||0);if(!n.smooth){on.default.registered.begin&&on.default.registered.begin(e,o),a===document?n.horizontal?window.scrollTo(u,0):window.scrollTo(0,u):a.scrollTop=u,on.default.registered.end&&on.default.registered.end(e,o);return}Kl.default.animateTopScroll(u,n,e,o)}};var Wn={exports:{}},sn={exports:{}},we={};/** @license React v16.13.1
|
71
|
+
</svg>`,l=`Cluster of ${e} markers`,u=Number(google.maps.Marker.MAX_ZINDEX)+e;if(Ze.isAdvancedMarkerAvailable(r)){const p=new DOMParser().parseFromString(a,"image/svg+xml").documentElement;p.setAttribute("transform","translate(0 25)");const d={map:r,position:n,zIndex:u,title:l,content:p};return new google.maps.marker.AdvancedMarkerElement(d)}const c={position:n,zIndex:u,title:l,icon:{url:`data:image/svg+xml;base64,${btoa(a)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(c)}}function $s(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class Tn{constructor(){$s(Tn,google.maps.OverlayView)}}var Dt;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(Dt||(Dt={}));const As=(t,e,n)=>{n.fitBounds(e.bounds)};class zs extends Tn{constructor({map:e,markers:n=[],algorithmOptions:o={},algorithm:r=new js(o),renderer:s=new Bs,onClusterClick:a=As}){super(),this.markers=[...n],this.clusters=[],this.algorithm=r,this.renderer=s,this.onClusterClick=a,e&&this.setMap(e)}addMarker(e,n){this.markers.includes(e)||(this.markers.push(e),n||this.render())}addMarkers(e,n){e.forEach(o=>{this.addMarker(o,!0)}),n||this.render()}removeMarker(e,n){const o=this.markers.indexOf(e);return o===-1?!1:(Ze.setMap(e,null),this.markers.splice(o,1),n||this.render(),!0)}removeMarkers(e,n){let o=!1;return e.forEach(r=>{o=this.removeMarker(r,!0)||o}),o&&!n&&this.render(),o}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,Dt.CLUSTERING_BEGIN,this);const{clusters:n,changed:o}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(o||o==null){const r=new Set;for(const a of n)a.markers.length==1&&r.add(a.markers[0]);const s=[];for(const a of this.clusters)a.marker!=null&&(a.markers.length==1?r.has(a.marker)||Ze.setMap(a.marker,null):s.push(a.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>s.forEach(a=>Ze.setMap(a,null)))}google.maps.event.trigger(this,Dt.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>Ze.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new Ns(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(o=>{o.markers.length===1?o.marker=o.markers[0]:(o.marker=this.renderer.render(o,e,n),o.markers.forEach(r=>Ze.setMap(r,null)),this.onClusterClick&&o.marker.addListener("click",r=>{google.maps.event.trigger(this,Dt.CLUSTER_CLICK,o),this.onClusterClick(r,o,n)})),Ze.setMap(o.marker,n)})}}function Us(t){var e=Xi(),n=i.useState(null),o=n[0],r=n[1];return i.useEffect(function(){if(e&&o===null){var s=new zs(ee(ee({},t),{map:e}));r(s)}},[e]),o}function Fs(t){var e=t.children,n=t.options,o=Us(n);return o!==null?e(o):null}i.memo(Fs);var Ho={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Wo={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function Hs(t){var e=t.children,n=t.anchor,o=t.options,r=t.position,s=t.zIndex,a=t.onCloseClick,l=t.onDomReady,u=t.onContentChanged,c=t.onPositionChanged,f=t.onZindexChanged,p=t.onLoad,d=t.onUnmount,h=i.useContext(ue),E=i.useState(null),m=E[0],C=E[1],x=i.useState(null),O=x[0],w=x[1],I=i.useState(null),y=I[0],b=I[1],M=i.useState(null),P=M[0],U=M[1],T=i.useState(null),z=T[0],X=T[1],A=i.useState(null),F=A[0],V=A[1],H=i.useRef(null);return i.useEffect(function(){m!==null&&(m.close(),n?m.open(h,n):m.getPosition()&&m.open(h))},[h,m,n]),i.useEffect(function(){o&&m!==null&&m.setOptions(o)},[m,o]),i.useEffect(function(){r&&m!==null&&m.setPosition(r)},[r]),i.useEffect(function(){typeof s=="number"&&m!==null&&m.setZIndex(s)},[s]),i.useEffect(function(){m&&a&&(O!==null&&google.maps.event.removeListener(O),w(google.maps.event.addListener(m,"closeclick",a)))},[a]),i.useEffect(function(){m&&l&&(y!==null&&google.maps.event.removeListener(y),b(google.maps.event.addListener(m,"domready",l)))},[l]),i.useEffect(function(){m&&u&&(P!==null&&google.maps.event.removeListener(P),U(google.maps.event.addListener(m,"content_changed",u)))},[u]),i.useEffect(function(){m&&c&&(z!==null&&google.maps.event.removeListener(z),X(google.maps.event.addListener(m,"position_changed",c)))},[c]),i.useEffect(function(){m&&f&&(F!==null&&google.maps.event.removeListener(F),V(google.maps.event.addListener(m,"zindex_changed",f)))},[f]),i.useEffect(function(){var $=new google.maps.InfoWindow(ee({},o||{}));return C($),H.current=document.createElement("div"),a&&w(google.maps.event.addListener($,"closeclick",a)),l&&b(google.maps.event.addListener($,"domready",l)),u&&U(google.maps.event.addListener($,"content_changed",u)),c&&X(google.maps.event.addListener($,"position_changed",c)),f&&V(google.maps.event.addListener($,"zindex_changed",f)),$.setContent(H.current),r&&$.setPosition(r),s&&$.setZIndex(s),n?$.open(h,n):$.getPosition()?$.open(h):$e(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),p&&p($),function(){O&&google.maps.event.removeListener(O),P&&google.maps.event.removeListener(P),y&&google.maps.event.removeListener(y),z&&google.maps.event.removeListener(z),F&&google.maps.event.removeListener(F),d&&d($),$.close()}},[]),H.current?pt.createPortal(i.Children.only(e),H.current):null}i.memo(Hs),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoWindow:null},n.open=function(o,r){r?o.open(n.context,r):o.getPosition()?o.open(n.context):$e(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")},n.setInfoWindowCallback=function(){n.state.infoWindow!==null&&n.containerElement!==null&&(n.state.infoWindow.setContent(n.containerElement),n.open(n.state.infoWindow,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoWindow))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.InfoWindow(ee({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=fe({updaterMap:Wo,eventMap:Ho,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Wo,eventMap:Ho,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(pe(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?pt.createPortal(i.Children.only(this.props.children),this.containerElement):null},e.contextType=ue,e}(i.PureComponent);var Vo={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Zo={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},visible:function(t,e){t.setVisible(e)}},Ws={};function Vs(t){var e=t.options,n=t.draggable,o=t.editable,r=t.visible,s=t.path,a=t.onDblClick,l=t.onDragEnd,u=t.onDragStart,c=t.onMouseDown,f=t.onMouseMove,p=t.onMouseOut,d=t.onMouseOver,h=t.onMouseUp,E=t.onRightClick,m=t.onClick,C=t.onDrag,x=t.onLoad,O=t.onUnmount,w=i.useContext(ue),I=i.useState(null),y=I[0],b=I[1],M=i.useState(null),P=M[0],U=M[1],T=i.useState(null),z=T[0],X=T[1],A=i.useState(null),F=A[0],V=A[1],H=i.useState(null),$=H[0],W=H[1],Q=i.useState(null),k=Q[0],S=Q[1],D=i.useState(null),_=D[0],B=D[1],G=i.useState(null),L=G[0],q=G[1],K=i.useState(null),R=K[0],Y=K[1],oe=i.useState(null),j=oe[0],ce=oe[1],Ce=i.useState(null),me=Ce[0],he=Ce[1],Te=i.useState(null),Me=Te[0],le=Te[1];return i.useEffect(function(){y!==null&&y.setMap(w)},[w]),i.useEffect(function(){typeof e<"u"&&y!==null&&y.setOptions(e)},[y,e]),i.useEffect(function(){typeof n<"u"&&y!==null&&y.setDraggable(n)},[y,n]),i.useEffect(function(){typeof o<"u"&&y!==null&&y.setEditable(o)},[y,o]),i.useEffect(function(){typeof r<"u"&&y!==null&&y.setVisible(r)},[y,r]),i.useEffect(function(){typeof s<"u"&&y!==null&&y.setPath(s)},[y,s]),i.useEffect(function(){y&&a&&(P!==null&&google.maps.event.removeListener(P),U(google.maps.event.addListener(y,"dblclick",a)))},[a]),i.useEffect(function(){y&&l&&(z!==null&&google.maps.event.removeListener(z),X(google.maps.event.addListener(y,"dragend",l)))},[l]),i.useEffect(function(){y&&u&&(F!==null&&google.maps.event.removeListener(F),V(google.maps.event.addListener(y,"dragstart",u)))},[u]),i.useEffect(function(){y&&c&&($!==null&&google.maps.event.removeListener($),W(google.maps.event.addListener(y,"mousedown",c)))},[c]),i.useEffect(function(){y&&f&&(k!==null&&google.maps.event.removeListener(k),S(google.maps.event.addListener(y,"mousemove",f)))},[f]),i.useEffect(function(){y&&p&&(_!==null&&google.maps.event.removeListener(_),B(google.maps.event.addListener(y,"mouseout",p)))},[p]),i.useEffect(function(){y&&d&&(L!==null&&google.maps.event.removeListener(L),q(google.maps.event.addListener(y,"mouseover",d)))},[d]),i.useEffect(function(){y&&h&&(R!==null&&google.maps.event.removeListener(R),Y(google.maps.event.addListener(y,"mouseup",h)))},[h]),i.useEffect(function(){y&&E&&(j!==null&&google.maps.event.removeListener(j),ce(google.maps.event.addListener(y,"rightclick",E)))},[E]),i.useEffect(function(){y&&m&&(me!==null&&google.maps.event.removeListener(me),he(google.maps.event.addListener(y,"click",m)))},[m]),i.useEffect(function(){y&&C&&(Me!==null&&google.maps.event.removeListener(Me),le(google.maps.event.addListener(y,"drag",C)))},[C]),i.useEffect(function(){var re=new google.maps.Polyline(ee(ee({},e||Ws),{map:w}));return s&&re.setPath(s),typeof r<"u"&&re.setVisible(r),typeof o<"u"&&re.setEditable(o),typeof n<"u"&&re.setDraggable(n),a&&U(google.maps.event.addListener(re,"dblclick",a)),l&&X(google.maps.event.addListener(re,"dragend",l)),u&&V(google.maps.event.addListener(re,"dragstart",u)),c&&W(google.maps.event.addListener(re,"mousedown",c)),f&&S(google.maps.event.addListener(re,"mousemove",f)),p&&B(google.maps.event.addListener(re,"mouseout",p)),d&&q(google.maps.event.addListener(re,"mouseover",d)),h&&Y(google.maps.event.addListener(re,"mouseup",h)),E&&ce(google.maps.event.addListener(re,"rightclick",E)),m&&he(google.maps.event.addListener(re,"click",m)),C&&le(google.maps.event.addListener(re,"drag",C)),b(re),x&&x(re),function(){P!==null&&google.maps.event.removeListener(P),z!==null&&google.maps.event.removeListener(z),F!==null&&google.maps.event.removeListener(F),$!==null&&google.maps.event.removeListener($),k!==null&&google.maps.event.removeListener(k),_!==null&&google.maps.event.removeListener(_),L!==null&&google.maps.event.removeListener(L),R!==null&&google.maps.event.removeListener(R),j!==null&&google.maps.event.removeListener(j),me!==null&&google.maps.event.removeListener(me),O&&O(re),re.setMap(null)}},[]),null}i.memo(Vs),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polyline:null},n.setPolylineCallback=function(){n.state.polyline!==null&&n.props.onLoad&&n.props.onLoad(n.state.polyline)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polyline(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Zo,eventMap:Vo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Zo,eventMap:Vo,prevProps:n,nextProps:this.props,instance:this.state.polyline}))},e.prototype.componentWillUnmount=function(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),pe(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var Go={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Yo={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},paths:function(t,e){t.setPaths(e)},visible:function(t,e){t.setVisible(e)}};function Zs(t){var e=t.options,n=t.draggable,o=t.editable,r=t.visible,s=t.path,a=t.paths,l=t.onDblClick,u=t.onDragEnd,c=t.onDragStart,f=t.onMouseDown,p=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,E=t.onMouseUp,m=t.onRightClick,C=t.onClick,x=t.onDrag,O=t.onLoad,w=t.onUnmount,I=t.onEdit,y=i.useContext(ue),b=i.useState(null),M=b[0],P=b[1],U=i.useState(null),T=U[0],z=U[1],X=i.useState(null),A=X[0],F=X[1],V=i.useState(null),H=V[0],$=V[1],W=i.useState(null),Q=W[0],k=W[1],S=i.useState(null),D=S[0],_=S[1],B=i.useState(null),G=B[0],L=B[1],q=i.useState(null),K=q[0],R=q[1],Y=i.useState(null),oe=Y[0],j=Y[1],ce=i.useState(null),Ce=ce[0],me=ce[1],he=i.useState(null),Te=he[0],Me=he[1],le=i.useState(null),re=le[0],Ne=le[1];return i.useEffect(function(){M!==null&&M.setMap(y)},[y]),i.useEffect(function(){typeof e<"u"&&M!==null&&M.setOptions(e)},[M,e]),i.useEffect(function(){typeof n<"u"&&M!==null&&M.setDraggable(n)},[M,n]),i.useEffect(function(){typeof o<"u"&&M!==null&&M.setEditable(o)},[M,o]),i.useEffect(function(){typeof r<"u"&&M!==null&&M.setVisible(r)},[M,r]),i.useEffect(function(){typeof s<"u"&&M!==null&&M.setPath(s)},[M,s]),i.useEffect(function(){typeof a<"u"&&M!==null&&M.setPaths(a)},[M,a]),i.useEffect(function(){M&&l&&(T!==null&&google.maps.event.removeListener(T),z(google.maps.event.addListener(M,"dblclick",l)))},[l]),i.useEffect(function(){M&&(google.maps.event.addListener(M.getPath(),"insert_at",function(){I==null||I(M)}),google.maps.event.addListener(M.getPath(),"set_at",function(){I==null||I(M)}))},[M,I]),i.useEffect(function(){M&&u&&(A!==null&&google.maps.event.removeListener(A),F(google.maps.event.addListener(M,"dragend",u)))},[u]),i.useEffect(function(){M&&c&&(H!==null&&google.maps.event.removeListener(H),$(google.maps.event.addListener(M,"dragstart",c)))},[c]),i.useEffect(function(){M&&f&&(Q!==null&&google.maps.event.removeListener(Q),k(google.maps.event.addListener(M,"mousedown",f)))},[f]),i.useEffect(function(){M&&p&&(D!==null&&google.maps.event.removeListener(D),_(google.maps.event.addListener(M,"mousemove",p)))},[p]),i.useEffect(function(){M&&d&&(G!==null&&google.maps.event.removeListener(G),L(google.maps.event.addListener(M,"mouseout",d)))},[d]),i.useEffect(function(){M&&h&&(K!==null&&google.maps.event.removeListener(K),R(google.maps.event.addListener(M,"mouseover",h)))},[h]),i.useEffect(function(){M&&E&&(oe!==null&&google.maps.event.removeListener(oe),j(google.maps.event.addListener(M,"mouseup",E)))},[E]),i.useEffect(function(){M&&m&&(Ce!==null&&google.maps.event.removeListener(Ce),me(google.maps.event.addListener(M,"rightclick",m)))},[m]),i.useEffect(function(){M&&C&&(Te!==null&&google.maps.event.removeListener(Te),Me(google.maps.event.addListener(M,"click",C)))},[C]),i.useEffect(function(){M&&x&&(re!==null&&google.maps.event.removeListener(re),Ne(google.maps.event.addListener(M,"drag",x)))},[x]),i.useEffect(function(){var ae=new google.maps.Polygon(ee(ee({},e||{}),{map:y}));return s&&ae.setPath(s),a&&ae.setPaths(a),typeof r<"u"&&ae.setVisible(r),typeof o<"u"&&ae.setEditable(o),typeof n<"u"&&ae.setDraggable(n),l&&z(google.maps.event.addListener(ae,"dblclick",l)),u&&F(google.maps.event.addListener(ae,"dragend",u)),c&&$(google.maps.event.addListener(ae,"dragstart",c)),f&&k(google.maps.event.addListener(ae,"mousedown",f)),p&&_(google.maps.event.addListener(ae,"mousemove",p)),d&&L(google.maps.event.addListener(ae,"mouseout",d)),h&&R(google.maps.event.addListener(ae,"mouseover",h)),E&&j(google.maps.event.addListener(ae,"mouseup",E)),m&&me(google.maps.event.addListener(ae,"rightclick",m)),C&&Me(google.maps.event.addListener(ae,"click",C)),x&&Ne(google.maps.event.addListener(ae,"drag",x)),P(ae),O&&O(ae),function(){T!==null&&google.maps.event.removeListener(T),A!==null&&google.maps.event.removeListener(A),H!==null&&google.maps.event.removeListener(H),Q!==null&&google.maps.event.removeListener(Q),D!==null&&google.maps.event.removeListener(D),G!==null&&google.maps.event.removeListener(G),K!==null&&google.maps.event.removeListener(K),oe!==null&&google.maps.event.removeListener(oe),Ce!==null&&google.maps.event.removeListener(Ce),Te!==null&&google.maps.event.removeListener(Te),w&&w(ae),ae.setMap(null)}},[]),null}i.memo(Zs),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polygon:null},n.setPolygonCallback=function(){n.state.polygon!==null&&n.props.onLoad&&n.props.onLoad(n.state.polygon)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polygon(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Yo,eventMap:Go,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Yo,eventMap:Go,prevProps:n,nextProps:this.props,instance:this.state.polygon}))},e.prototype.componentWillUnmount=function(){this.state.polygon!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),pe(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var qo={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Ko={bounds:function(t,e){t.setBounds(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},visible:function(t,e){t.setVisible(e)}};function Gs(t){var e=t.options,n=t.bounds,o=t.draggable,r=t.editable,s=t.visible,a=t.onDblClick,l=t.onDragEnd,u=t.onDragStart,c=t.onMouseDown,f=t.onMouseMove,p=t.onMouseOut,d=t.onMouseOver,h=t.onMouseUp,E=t.onRightClick,m=t.onClick,C=t.onDrag,x=t.onBoundsChanged,O=t.onLoad,w=t.onUnmount,I=i.useContext(ue),y=i.useState(null),b=y[0],M=y[1],P=i.useState(null),U=P[0],T=P[1],z=i.useState(null),X=z[0],A=z[1],F=i.useState(null),V=F[0],H=F[1],$=i.useState(null),W=$[0],Q=$[1],k=i.useState(null),S=k[0],D=k[1],_=i.useState(null),B=_[0],G=_[1],L=i.useState(null),q=L[0],K=L[1],R=i.useState(null),Y=R[0],oe=R[1],j=i.useState(null),ce=j[0],Ce=j[1],me=i.useState(null),he=me[0],Te=me[1],Me=i.useState(null),le=Me[0],re=Me[1],Ne=i.useState(null),ae=Ne[0],Ae=Ne[1];return i.useEffect(function(){b!==null&&b.setMap(I)},[I]),i.useEffect(function(){typeof e<"u"&&b!==null&&b.setOptions(e)},[b,e]),i.useEffect(function(){typeof o<"u"&&b!==null&&b.setDraggable(o)},[b,o]),i.useEffect(function(){typeof r<"u"&&b!==null&&b.setEditable(r)},[b,r]),i.useEffect(function(){typeof s<"u"&&b!==null&&b.setVisible(s)},[b,s]),i.useEffect(function(){typeof n<"u"&&b!==null&&b.setBounds(n)},[b,n]),i.useEffect(function(){b&&a&&(U!==null&&google.maps.event.removeListener(U),T(google.maps.event.addListener(b,"dblclick",a)))},[a]),i.useEffect(function(){b&&l&&(X!==null&&google.maps.event.removeListener(X),A(google.maps.event.addListener(b,"dragend",l)))},[l]),i.useEffect(function(){b&&u&&(V!==null&&google.maps.event.removeListener(V),H(google.maps.event.addListener(b,"dragstart",u)))},[u]),i.useEffect(function(){b&&c&&(W!==null&&google.maps.event.removeListener(W),Q(google.maps.event.addListener(b,"mousedown",c)))},[c]),i.useEffect(function(){b&&f&&(S!==null&&google.maps.event.removeListener(S),D(google.maps.event.addListener(b,"mousemove",f)))},[f]),i.useEffect(function(){b&&p&&(B!==null&&google.maps.event.removeListener(B),G(google.maps.event.addListener(b,"mouseout",p)))},[p]),i.useEffect(function(){b&&d&&(q!==null&&google.maps.event.removeListener(q),K(google.maps.event.addListener(b,"mouseover",d)))},[d]),i.useEffect(function(){b&&h&&(Y!==null&&google.maps.event.removeListener(Y),oe(google.maps.event.addListener(b,"mouseup",h)))},[h]),i.useEffect(function(){b&&E&&(ce!==null&&google.maps.event.removeListener(ce),Ce(google.maps.event.addListener(b,"rightclick",E)))},[E]),i.useEffect(function(){b&&m&&(he!==null&&google.maps.event.removeListener(he),Te(google.maps.event.addListener(b,"click",m)))},[m]),i.useEffect(function(){b&&C&&(le!==null&&google.maps.event.removeListener(le),re(google.maps.event.addListener(b,"drag",C)))},[C]),i.useEffect(function(){b&&x&&(ae!==null&&google.maps.event.removeListener(ae),Ae(google.maps.event.addListener(b,"bounds_changed",x)))},[x]),i.useEffect(function(){var te=new google.maps.Rectangle(ee(ee({},e||{}),{map:I}));return typeof s<"u"&&te.setVisible(s),typeof r<"u"&&te.setEditable(r),typeof o<"u"&&te.setDraggable(o),typeof n<"u"&&te.setBounds(n),a&&T(google.maps.event.addListener(te,"dblclick",a)),l&&A(google.maps.event.addListener(te,"dragend",l)),u&&H(google.maps.event.addListener(te,"dragstart",u)),c&&Q(google.maps.event.addListener(te,"mousedown",c)),f&&D(google.maps.event.addListener(te,"mousemove",f)),p&&G(google.maps.event.addListener(te,"mouseout",p)),d&&K(google.maps.event.addListener(te,"mouseover",d)),h&&oe(google.maps.event.addListener(te,"mouseup",h)),E&&Ce(google.maps.event.addListener(te,"rightclick",E)),m&&Te(google.maps.event.addListener(te,"click",m)),C&&re(google.maps.event.addListener(te,"drag",C)),x&&Ae(google.maps.event.addListener(te,"bounds_changed",x)),M(te),O&&O(te),function(){U!==null&&google.maps.event.removeListener(U),X!==null&&google.maps.event.removeListener(X),V!==null&&google.maps.event.removeListener(V),W!==null&&google.maps.event.removeListener(W),S!==null&&google.maps.event.removeListener(S),B!==null&&google.maps.event.removeListener(B),q!==null&&google.maps.event.removeListener(q),Y!==null&&google.maps.event.removeListener(Y),ce!==null&&google.maps.event.removeListener(ce),he!==null&&google.maps.event.removeListener(he),le!==null&&google.maps.event.removeListener(le),ae!==null&&google.maps.event.removeListener(ae),w&&w(te),te.setMap(null)}},[]),null}i.memo(Gs),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={rectangle:null},n.setRectangleCallback=function(){n.state.rectangle!==null&&n.props.onLoad&&n.props.onLoad(n.state.rectangle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Rectangle(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Ko,eventMap:qo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Ko,eventMap:qo,prevProps:n,nextProps:this.props,instance:this.state.rectangle}))},e.prototype.componentWillUnmount=function(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),pe(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var Xo={onCenterChanged:"center_changed",onRadiusChanged:"radius_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Jo={center:function(t,e){t.setCenter(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},radius:function(t,e){t.setRadius(e)},visible:function(t,e){t.setVisible(e)}},Ys={};function qs(t){var e=t.options,n=t.center,o=t.radius,r=t.draggable,s=t.editable,a=t.visible,l=t.onDblClick,u=t.onDragEnd,c=t.onDragStart,f=t.onMouseDown,p=t.onMouseMove,d=t.onMouseOut,h=t.onMouseOver,E=t.onMouseUp,m=t.onRightClick,C=t.onClick,x=t.onDrag,O=t.onCenterChanged,w=t.onRadiusChanged,I=t.onLoad,y=t.onUnmount,b=i.useContext(ue),M=i.useState(null),P=M[0],U=M[1],T=i.useState(null),z=T[0],X=T[1],A=i.useState(null),F=A[0],V=A[1],H=i.useState(null),$=H[0],W=H[1],Q=i.useState(null),k=Q[0],S=Q[1],D=i.useState(null),_=D[0],B=D[1],G=i.useState(null),L=G[0],q=G[1],K=i.useState(null),R=K[0],Y=K[1],oe=i.useState(null),j=oe[0],ce=oe[1],Ce=i.useState(null),me=Ce[0],he=Ce[1],Te=i.useState(null),Me=Te[0],le=Te[1],re=i.useState(null),Ne=re[0],ae=re[1],Ae=i.useState(null),te=Ae[0],We=Ae[1],Xe=i.useState(null),Be=Xe[0],tt=Xe[1];return i.useEffect(function(){P!==null&&P.setMap(b)},[b]),i.useEffect(function(){typeof e<"u"&&P!==null&&P.setOptions(e)},[P,e]),i.useEffect(function(){typeof r<"u"&&P!==null&&P.setDraggable(r)},[P,r]),i.useEffect(function(){typeof s<"u"&&P!==null&&P.setEditable(s)},[P,s]),i.useEffect(function(){typeof a<"u"&&P!==null&&P.setVisible(a)},[P,a]),i.useEffect(function(){typeof o=="number"&&P!==null&&P.setRadius(o)},[P,o]),i.useEffect(function(){typeof n<"u"&&P!==null&&P.setCenter(n)},[P,n]),i.useEffect(function(){P&&l&&(z!==null&&google.maps.event.removeListener(z),X(google.maps.event.addListener(P,"dblclick",l)))},[l]),i.useEffect(function(){P&&u&&(F!==null&&google.maps.event.removeListener(F),V(google.maps.event.addListener(P,"dragend",u)))},[u]),i.useEffect(function(){P&&c&&($!==null&&google.maps.event.removeListener($),W(google.maps.event.addListener(P,"dragstart",c)))},[c]),i.useEffect(function(){P&&f&&(k!==null&&google.maps.event.removeListener(k),S(google.maps.event.addListener(P,"mousedown",f)))},[f]),i.useEffect(function(){P&&p&&(_!==null&&google.maps.event.removeListener(_),B(google.maps.event.addListener(P,"mousemove",p)))},[p]),i.useEffect(function(){P&&d&&(L!==null&&google.maps.event.removeListener(L),q(google.maps.event.addListener(P,"mouseout",d)))},[d]),i.useEffect(function(){P&&h&&(R!==null&&google.maps.event.removeListener(R),Y(google.maps.event.addListener(P,"mouseover",h)))},[h]),i.useEffect(function(){P&&E&&(j!==null&&google.maps.event.removeListener(j),ce(google.maps.event.addListener(P,"mouseup",E)))},[E]),i.useEffect(function(){P&&m&&(me!==null&&google.maps.event.removeListener(me),he(google.maps.event.addListener(P,"rightclick",m)))},[m]),i.useEffect(function(){P&&C&&(Me!==null&&google.maps.event.removeListener(Me),le(google.maps.event.addListener(P,"click",C)))},[C]),i.useEffect(function(){P&&x&&(Ne!==null&&google.maps.event.removeListener(Ne),ae(google.maps.event.addListener(P,"drag",x)))},[x]),i.useEffect(function(){P&&O&&(te!==null&&google.maps.event.removeListener(te),We(google.maps.event.addListener(P,"center_changed",O)))},[C]),i.useEffect(function(){P&&w&&(Be!==null&&google.maps.event.removeListener(Be),tt(google.maps.event.addListener(P,"radius_changed",w)))},[w]),i.useEffect(function(){var ve=new google.maps.Circle(ee(ee({},e||Ys),{map:b}));return typeof o=="number"&&ve.setRadius(o),typeof n<"u"&&ve.setCenter(n),typeof o=="number"&&ve.setRadius(o),typeof a<"u"&&ve.setVisible(a),typeof s<"u"&&ve.setEditable(s),typeof r<"u"&&ve.setDraggable(r),l&&X(google.maps.event.addListener(ve,"dblclick",l)),u&&V(google.maps.event.addListener(ve,"dragend",u)),c&&W(google.maps.event.addListener(ve,"dragstart",c)),f&&S(google.maps.event.addListener(ve,"mousedown",f)),p&&B(google.maps.event.addListener(ve,"mousemove",p)),d&&q(google.maps.event.addListener(ve,"mouseout",d)),h&&Y(google.maps.event.addListener(ve,"mouseover",h)),E&&ce(google.maps.event.addListener(ve,"mouseup",E)),m&&he(google.maps.event.addListener(ve,"rightclick",m)),C&&le(google.maps.event.addListener(ve,"click",C)),x&&ae(google.maps.event.addListener(ve,"drag",x)),O&&We(google.maps.event.addListener(ve,"center_changed",O)),w&&tt(google.maps.event.addListener(ve,"radius_changed",w)),U(ve),I&&I(ve),function(){z!==null&&google.maps.event.removeListener(z),F!==null&&google.maps.event.removeListener(F),$!==null&&google.maps.event.removeListener($),k!==null&&google.maps.event.removeListener(k),_!==null&&google.maps.event.removeListener(_),L!==null&&google.maps.event.removeListener(L),R!==null&&google.maps.event.removeListener(R),j!==null&&google.maps.event.removeListener(j),me!==null&&google.maps.event.removeListener(me),Me!==null&&google.maps.event.removeListener(Me),te!==null&&google.maps.event.removeListener(te),Be!==null&&google.maps.event.removeListener(Be),y&&y(ve),ve.setMap(null)}},[]),null}i.memo(qs),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={circle:null},n.setCircleCallback=function(){n.state.circle!==null&&n.props.onLoad&&n.props.onLoad(n.state.circle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Circle(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:Jo,eventMap:Xo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:Jo,eventMap:Xo,prevProps:n,nextProps:this.props,instance:this.state.circle}))},e.prototype.componentWillUnmount=function(){var n;this.state.circle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),pe(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var Qo={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},er={add:function(t,e){t.add(e)},addgeojson:function(t,e,n){t.addGeoJson(e,n)},contains:function(t,e){t.contains(e)},foreach:function(t,e){t.forEach(e)},loadgeojson:function(t,e,n,o){t.loadGeoJson(e,n,o)},overridestyle:function(t,e,n){t.overrideStyle(e,n)},remove:function(t,e){t.remove(e)},revertstyle:function(t,e){t.revertStyle(e)},controlposition:function(t,e){t.setControlPosition(e)},controls:function(t,e){t.setControls(e)},drawingmode:function(t,e){t.setDrawingMode(e)},map:function(t,e){t.setMap(e)},style:function(t,e){t.setStyle(e)},togeojson:function(t,e){t.toGeoJson(e)}};function Ks(t){var e=t.options,n=t.onClick,o=t.onDblClick,r=t.onMouseDown,s=t.onMouseMove,a=t.onMouseOut,l=t.onMouseOver,u=t.onMouseUp,c=t.onRightClick,f=t.onAddFeature,p=t.onRemoveFeature,d=t.onRemoveProperty,h=t.onSetGeometry,E=t.onSetProperty,m=t.onLoad,C=t.onUnmount,x=i.useContext(ue),O=i.useState(null),w=O[0],I=O[1],y=i.useState(null),b=y[0],M=y[1],P=i.useState(null),U=P[0],T=P[1],z=i.useState(null),X=z[0],A=z[1],F=i.useState(null),V=F[0],H=F[1],$=i.useState(null),W=$[0],Q=$[1],k=i.useState(null),S=k[0],D=k[1],_=i.useState(null),B=_[0],G=_[1],L=i.useState(null),q=L[0],K=L[1],R=i.useState(null),Y=R[0],oe=R[1],j=i.useState(null),ce=j[0],Ce=j[1],me=i.useState(null),he=me[0],Te=me[1],Me=i.useState(null),le=Me[0],re=Me[1],Ne=i.useState(null),ae=Ne[0],Ae=Ne[1];return i.useEffect(function(){w!==null&&w.setMap(x)},[x]),i.useEffect(function(){w&&o&&(b!==null&&google.maps.event.removeListener(b),M(google.maps.event.addListener(w,"dblclick",o)))},[o]),i.useEffect(function(){w&&r&&(U!==null&&google.maps.event.removeListener(U),T(google.maps.event.addListener(w,"mousedown",r)))},[r]),i.useEffect(function(){w&&s&&(X!==null&&google.maps.event.removeListener(X),A(google.maps.event.addListener(w,"mousemove",s)))},[s]),i.useEffect(function(){w&&a&&(V!==null&&google.maps.event.removeListener(V),H(google.maps.event.addListener(w,"mouseout",a)))},[a]),i.useEffect(function(){w&&l&&(W!==null&&google.maps.event.removeListener(W),Q(google.maps.event.addListener(w,"mouseover",l)))},[l]),i.useEffect(function(){w&&u&&(S!==null&&google.maps.event.removeListener(S),D(google.maps.event.addListener(w,"mouseup",u)))},[u]),i.useEffect(function(){w&&c&&(B!==null&&google.maps.event.removeListener(B),G(google.maps.event.addListener(w,"rightclick",c)))},[c]),i.useEffect(function(){w&&n&&(q!==null&&google.maps.event.removeListener(q),K(google.maps.event.addListener(w,"click",n)))},[n]),i.useEffect(function(){w&&f&&(Y!==null&&google.maps.event.removeListener(Y),oe(google.maps.event.addListener(w,"addfeature",f)))},[f]),i.useEffect(function(){w&&p&&(ce!==null&&google.maps.event.removeListener(ce),Ce(google.maps.event.addListener(w,"removefeature",p)))},[p]),i.useEffect(function(){w&&d&&(he!==null&&google.maps.event.removeListener(he),Te(google.maps.event.addListener(w,"removeproperty",d)))},[d]),i.useEffect(function(){w&&h&&(le!==null&&google.maps.event.removeListener(le),re(google.maps.event.addListener(w,"setgeometry",h)))},[h]),i.useEffect(function(){w&&E&&(ae!==null&&google.maps.event.removeListener(ae),Ae(google.maps.event.addListener(w,"setproperty",E)))},[E]),i.useEffect(function(){if(x!==null){var te=new google.maps.Data(ee(ee({},e||{}),{map:x}));o&&M(google.maps.event.addListener(te,"dblclick",o)),r&&T(google.maps.event.addListener(te,"mousedown",r)),s&&A(google.maps.event.addListener(te,"mousemove",s)),a&&H(google.maps.event.addListener(te,"mouseout",a)),l&&Q(google.maps.event.addListener(te,"mouseover",l)),u&&D(google.maps.event.addListener(te,"mouseup",u)),c&&G(google.maps.event.addListener(te,"rightclick",c)),n&&K(google.maps.event.addListener(te,"click",n)),f&&oe(google.maps.event.addListener(te,"addfeature",f)),p&&Ce(google.maps.event.addListener(te,"removefeature",p)),d&&Te(google.maps.event.addListener(te,"removeproperty",d)),h&&re(google.maps.event.addListener(te,"setgeometry",h)),E&&Ae(google.maps.event.addListener(te,"setproperty",E)),I(te),m&&m(te)}return function(){w&&(b!==null&&google.maps.event.removeListener(b),U!==null&&google.maps.event.removeListener(U),X!==null&&google.maps.event.removeListener(X),V!==null&&google.maps.event.removeListener(V),W!==null&&google.maps.event.removeListener(W),S!==null&&google.maps.event.removeListener(S),B!==null&&google.maps.event.removeListener(B),q!==null&&google.maps.event.removeListener(q),Y!==null&&google.maps.event.removeListener(Y),ce!==null&&google.maps.event.removeListener(ce),he!==null&&google.maps.event.removeListener(he),le!==null&&google.maps.event.removeListener(le),ae!==null&&google.maps.event.removeListener(ae),C&&C(w),w.setMap(null))}},[]),null}i.memo(Ks),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={data:null},n.setDataCallback=function(){n.state.data!==null&&n.props.onLoad&&n.props.onLoad(n.state.data)},n}return e.prototype.componentDidMount=function(){if(this.context!==null){var n=new google.maps.Data(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=fe({updaterMap:er,eventMap:Qo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:er,eventMap:Qo,prevProps:n,nextProps:this.props,instance:this.state.data}))},e.prototype.componentWillUnmount=function(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),pe(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var tr={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},nr={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={kmlLayer:null},n.setKmlLayerCallback=function(){n.state.kmlLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.kmlLayer)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.KmlLayer(ee(ee({},this.props.options),{map:this.context}));this.registeredEvents=fe({updaterMap:nr,eventMap:tr,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:nr,eventMap:tr,prevProps:n,nextProps:this.props,instance:this.state.kmlLayer}))},e.prototype.componentWillUnmount=function(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),pe(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(i.PureComponent);function or(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function Xs(t,e){return new e(t.lat,t.lng)}function Js(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))}function Qs(t,e,n){return t instanceof e?t:n(t,e)}function ea(t,e,n){return t instanceof e?t:n(t,e)}function ta(t,e,n){var o=t&&t.fromLatLngToDivPixel(n.getNorthEast()),r=t&&t.fromLatLngToDivPixel(n.getSouthWest());return o&&r?{left:"".concat(r.x+e.x,"px"),top:"".concat(o.y+e.y,"px"),width:"".concat(o.x-r.x-e.x,"px"),height:"".concat(r.y-o.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}function na(t,e,n){var o=t&&t.fromLatLngToDivPixel(n);if(o){var r=o.x,s=o.y;return{left:"".concat(r+e.x,"px"),top:"".concat(s+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function rr(t,e,n,o){return n!==void 0?ta(t,e,ea(n,google.maps.LatLngBounds,Js)):na(t,e,Qs(o,google.maps.LatLng,Xs))}function oa(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function ra(t,e,n,o,r){var s=function(a){Pe(l,a);function l(u,c,f,p){var d=a.call(this)||this;return d.container=u,d.pane=c,d.position=f,d.bounds=p,d}return l.prototype.onAdd=function(){var u,c=(u=this.getPanes())===null||u===void 0?void 0:u[this.pane];c==null||c.appendChild(this.container)},l.prototype.draw=function(){for(var u=this.getProjection(),c=ee({},this.container?or(this.container,r):{x:0,y:0}),f=rr(u,c,this.bounds,this.position),p=0,d=Object.entries(f);p<d.length;p++){var h=d[p],E=h[0],m=h[1];this.container.style[E]=m}},l.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},l}(google.maps.OverlayView);return new s(t,e,n,o)}function ir(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function sr(t){if(!t)return"";var e=t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west));return e+""}function ia(t){var e=t.position,n=t.bounds,o=t.mapPaneName,r=t.zIndex,s=t.onLoad,a=t.onUnmount,l=t.getPixelPositionOffset,u=t.children,c=i.useContext(ue),f=i.useMemo(function(){var d=document.createElement("div");return d.style.position="absolute",d},[]),p=i.useMemo(function(){return ra(f,o,e,n,l)},[f,o,e,n]);return i.useEffect(function(){return s==null||s(p),p==null||p.setMap(c),function(){a==null||a(p),p==null||p.setMap(null)}},[c,p]),i.useEffect(function(){f.style.zIndex="".concat(r)},[r,f]),so.createPortal(u,f)}i.memo(ia),function(t){Pe(e,t);function e(n){var o=t.call(this,n)||this;o.state={paneEl:null,containerStyle:{position:"absolute"}},o.updatePane=function(){var s=o.props.mapPaneName,a=o.overlayView.getPanes();$e(!!s,"OverlayView requires props.mapPaneName but got %s",s),a?o.setState({paneEl:a[s]}):o.setState({paneEl:null})},o.onAdd=function(){var s,a;o.updatePane(),(a=(s=o.props).onLoad)===null||a===void 0||a.call(s,o.overlayView)},o.onPositionElement=function(){var s=o.overlayView.getProjection(),a=ee({x:0,y:0},o.containerRef.current?or(o.containerRef.current,o.props.getPixelPositionOffset):{}),l=rr(s,a,o.props.bounds,o.props.position),u=o.state.containerStyle,c=u.left,f=u.top,p=u.width,d=u.height;oa(l,{left:c,top:f,width:p,height:d})||o.setState({containerStyle:{top:l.top||0,left:l.left||0,width:l.width||0,height:l.height||0,position:"absolute"}})},o.draw=function(){o.onPositionElement()},o.onRemove=function(){var s,a;o.setState(function(){return{paneEl:null}}),(a=(s=o.props).onUnmount)===null||a===void 0||a.call(s,o.overlayView)},o.containerRef=i.createRef();var r=new google.maps.OverlayView;return r.onAdd=o.onAdd,r.draw=o.draw,r.onRemove=o.onRemove,o.overlayView=r,o}return e.prototype.componentDidMount=function(){this.overlayView.setMap(this.context)},e.prototype.componentDidUpdate=function(n){var o=ir(n.position),r=ir(this.props.position),s=sr(n.bounds),a=sr(this.props.bounds);(o!==r||s!==a)&&this.overlayView.draw(),n.mapPaneName!==this.props.mapPaneName&&this.updatePane()},e.prototype.componentWillUnmount=function(){this.overlayView.setMap(null)},e.prototype.render=function(){var n=this.state.paneEl;return n?so.createPortal(v.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:i.Children.only(this.props.children)}),n):null},e.FLOAT_PANE="floatPane",e.MAP_PANE="mapPane",e.MARKER_LAYER="markerLayer",e.OVERLAY_LAYER="overlayLayer",e.OVERLAY_MOUSE_TARGET="overlayMouseTarget",e.contextType=ue,e}(i.PureComponent);function sa(){}var ar={onDblClick:"dblclick",onClick:"click"},lr={opacity:function(t,e){t.setOpacity(e)}};function aa(t){var e=t.url,n=t.bounds,o=t.options,r=t.visible,s=i.useContext(ue),a=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),l=i.useMemo(function(){var u=new google.maps.GroundOverlay(e,a,ee({},o));return u},[]);return i.useEffect(function(){l!==null&&l.setMap(s)},[s]),i.useEffect(function(){typeof e<"u"&&l!==null&&(l.set("url",e),l.setMap(s))},[l,e]),i.useEffect(function(){typeof r<"u"&&l!==null&&l.setOpacity(r?1:0)},[l,r]),i.useEffect(function(){var u=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east));typeof n<"u"&&l!==null&&(l.set("bounds",u),l.setMap(s))},[l,n]),null}i.memo(aa),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={groundOverlay:null},n.setGroundOverlayCallback=function(){n.state.groundOverlay!==null&&n.props.onLoad&&n.props.onLoad(n.state.groundOverlay)},n}return e.prototype.componentDidMount=function(){$e(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var n=new google.maps.GroundOverlay(this.props.url,this.props.bounds,ee(ee({},this.props.options),{map:this.context}));this.registeredEvents=fe({updaterMap:lr,eventMap:ar,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:lr,eventMap:ar,prevProps:n,nextProps:this.props,instance:this.state.groundOverlay}))},e.prototype.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},e.prototype.render=function(){return null},e.defaultProps={onLoad:sa},e.contextType=ue,e}(i.PureComponent);var ur={},cr={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function la(t){var e=t.data,n=t.onLoad,o=t.onUnmount,r=t.options,s=i.useContext(ue),a=i.useState(null),l=a[0],u=a[1];return i.useEffect(function(){google.maps.visualization||$e(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),i.useEffect(function(){$e(!!e,"data property is required in HeatmapLayer %s",e)},[e]),i.useEffect(function(){l!==null&&l.setMap(s)},[s]),i.useEffect(function(){r&&l!==null&&l.setOptions(r)},[l,r]),i.useEffect(function(){var c=new google.maps.visualization.HeatmapLayer(ee(ee({},r||{}),{data:e,map:s}));return u(c),n&&n(c),function(){l!==null&&(o&&o(l),l.setMap(null))}},[]),null}i.memo(la),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={heatmapLayer:null},n.setHeatmapLayerCallback=function(){n.state.heatmapLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.heatmapLayer)},n}return e.prototype.componentDidMount=function(){$e(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),$e(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(ee(ee({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=fe({updaterMap:cr,eventMap:ur,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:cr,eventMap:ur,prevProps:n,nextProps:this.props,instance:this.state.heatmapLayer})},e.prototype.componentWillUnmount=function(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),pe(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent);var dr={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},fr={register:function(t,e,n){t.registerPanoProvider(e,n)},links:function(t,e){t.setLinks(e)},motionTracking:function(t,e){t.setMotionTracking(e)},options:function(t,e){t.setOptions(e)},pano:function(t,e){t.setPano(e)},position:function(t,e){t.setPosition(e)},pov:function(t,e){t.setPov(e)},visible:function(t,e){t.setVisible(e)},zoom:function(t,e){t.setZoom(e)}};(function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={streetViewPanorama:null},n.setStreetViewPanoramaCallback=function(){n.state.streetViewPanorama!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewPanorama)},n}return e.prototype.componentDidMount=function(){var n,o,r=(o=(n=this.context)===null||n===void 0?void 0:n.getStreetView())!==null&&o!==void 0?o:null;this.registeredEvents=fe({updaterMap:fr,eventMap:dr,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{streetViewPanorama:r}},this.setStreetViewPanoramaCallback)},e.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:fr,eventMap:dr,prevProps:n,nextProps:this.props,instance:this.state.streetViewPanorama}))},e.prototype.componentWillUnmount=function(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),pe(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=ue,e})(i.PureComponent),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={streetViewService:null},n.setStreetViewServiceCallback=function(){n.state.streetViewService!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewService)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:n}},this.setStreetViewServiceCallback)},e.prototype.componentWillUnmount=function(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},e.prototype.render=function(){return null},e.contextType=ue,e}(i.PureComponent),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={directionsService:null},n.setDirectionsServiceCallback=function(){n.state.directionsService!==null&&n.props.onLoad&&n.props.onLoad(n.state.directionsService)},n}return e.prototype.componentDidMount=function(){$e(!!this.props.options,"DirectionsService expected options object as parameter, but got %s",this.props.options);var n=new google.maps.DirectionsService;this.setState(function(){return{directionsService:n}},this.setDirectionsServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.directionsService!==null&&this.state.directionsService.route(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.directionsService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},e.prototype.render=function(){return null},e}(i.PureComponent);var pr={onDirectionsChanged:"directions_changed"},hr={directions:function(t,e){t.setDirections(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},panel:function(t,e){t.setPanel(e)},routeIndex:function(t,e){t.setRouteIndex(e)}};(function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={directionsRenderer:null},n.setDirectionsRendererCallback=function(){n.state.directionsRenderer!==null&&(n.state.directionsRenderer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.directionsRenderer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=fe({updaterMap:hr,eventMap:pr,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:hr,eventMap:pr,prevProps:n,nextProps:this.props,instance:this.state.directionsRenderer}))},e.prototype.componentWillUnmount=function(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),pe(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return v.jsx(v.Fragment,{})},e.contextType=ue,e})(i.PureComponent),function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={distanceMatrixService:null},n.setDistanceMatrixServiceCallback=function(){n.state.distanceMatrixService!==null&&n.props.onLoad&&n.props.onLoad(n.state.distanceMatrixService)},n}return e.prototype.componentDidMount=function(){$e(!!this.props.options,"DistanceMatrixService expected options object as parameter, but go %s",this.props.options);var n=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:n}},this.setDistanceMatrixServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.distanceMatrixService!==null&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.distanceMatrixService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},e.prototype.render=function(){return null},e}(i.PureComponent);var gr={onPlacesChanged:"places_changed"},mr={bounds:function(t,e){t.setBounds(e)}},ua=function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=i.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){n.state.searchBox!==null&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}return e.prototype.componentDidMount=function(){if($e(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places),this.containerElement!==null&&this.containerElement.current!==null){var n=this.containerElement.current.querySelector("input");if(n!==null){var o=new google.maps.places.SearchBox(n,this.props.options);this.registeredEvents=fe({updaterMap:mr,eventMap:gr,prevProps:{},nextProps:this.props,instance:o}),this.setState(function(){return{searchBox:o}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:mr,eventMap:gr,prevProps:n,nextProps:this.props,instance:this.state.searchBox}))},e.prototype.componentWillUnmount=function(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),pe(this.registeredEvents))},e.prototype.render=function(){return v.jsx("div",{ref:this.containerElement,children:i.Children.only(this.props.children)})},e.contextType=ue,e}(i.PureComponent),vr={onPlaceChanged:"place_changed"},yr={bounds:function(t,e){t.setBounds(e)},restrictions:function(t,e){t.setComponentRestrictions(e)},fields:function(t,e){t.setFields(e)},options:function(t,e){t.setOptions(e)},types:function(t,e){t.setTypes(e)}};(function(t){Pe(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=i.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){n.state.autocomplete!==null&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}return e.prototype.componentDidMount=function(){var n;$e(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var o=(n=this.containerElement.current)===null||n===void 0?void 0:n.querySelector("input");if(o){var r=new google.maps.places.Autocomplete(o,this.props.options);this.registeredEvents=fe({updaterMap:yr,eventMap:vr,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{autocomplete:r}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){pe(this.registeredEvents),this.registeredEvents=fe({updaterMap:yr,eventMap:vr,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&pe(this.registeredEvents)},e.prototype.render=function(){return v.jsx("div",{ref:this.containerElement,className:this.props.className,children:i.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=ue,e})(i.PureComponent);function ca({coordinates:t,zoom:e=18,draggable:n=!1,googleMapsApiKey:o,className:r,...s}){return t?v.jsx("div",{className:"arkynGoogleMapPinned "+r,...s,children:v.jsx(Co,{libraries:["maps","marker"],googleMapsApiKey:o,loadingElement:v.jsx("div",{className:"arkynGoogleMapPinnedEmpty "+r,...s,children:v.jsx(ke.LoaderIcon,{})}),children:v.jsx(rs,{zoom:e,center:t,mapContainerStyle:{borderRadius:"var(--rounded-cards)",width:"100%",height:"100%"},children:v.jsx(ps,{draggable:n,position:t})})})}):v.jsx("div",{className:"arkynGoogleMapPinnedEmpty "+r,...s,children:v.jsx(ke.MapPinned,{})})}function da(t){const{className:e,...n}=t,o=`arkynSkeleton ${e}`;return v.jsx("aside",{className:o.trim(),...n})}function fa(t){const{emptyMessage:e="Nenhum dado adicionado.",className:n,children:o,...r}=t,s=`arkynTableBody ${n}`,a=i.Children.count(o)===0;return v.jsx("tbody",{className:s.trim(),...r,children:a?v.jsx("tr",{className:"arkynTableBodyEmptyLine",children:v.jsx("td",{colSpan:100,children:v.jsx("div",{children:e})})}):o})}function pa(t){const{className:e,children:n,...o}=t,r=`arkynTableCaption ${e}`;return v.jsx("caption",{className:r.trim(),...o,children:v.jsx("div",{className:"arkynTableCaptionContent",children:n})})}function ha(t){const{children:e,className:n,...o}=t,r=`arkynTableContainer ${n}`;return v.jsx("div",{className:r.trim(),...o,children:v.jsx("table",{children:e})})}function ga(t){const{className:e,children:n,...o}=t,r=`arkynTableFooter ${e}`;return v.jsxs("tfoot",{className:r.trim(),...o,children:[v.jsx("tr",{className:"spacingRow"}),v.jsx("tr",{children:v.jsx("th",{colSpan:100,children:v.jsx("div",{className:"arkynTableFooterContent",children:n})})})]})}function ma(t){const{className:e,children:n,...o}=t,r=`arkynTableHeader ${e}`;return v.jsxs("thead",{className:r.trim(),...o,children:[v.jsx("tr",{children:n}),v.jsx("tr",{className:"spacingRow"})]})}function va(t){const{isLoading:e=!1,scheme:n="primary",variant:o="solid",loadingText:r,size:s="md",leftIcon:a,rightIcon:l,disabled:u,className:c="",children:f,...p}=t,h={xs:12,sm:16,md:20,lg:24}[s],C=`arkynButton ${e?"loadingTrue":"loadingFalse"} ${o} ${n} ${s} ${r?"loadingTextTrue":"loadingTextFalse"} ${c}`;return v.jsxs("button",{className:C,disabled:u||e,...p,children:[v.jsxs("div",{className:"arkynButtonSpinner",children:[v.jsx(ke.Loader2,{size:h,strokeWidth:2.5}),r&&r]}),v.jsxs("div",{className:"arkynButtonContent",children:[Gt(h,a),f,Gt(h,l)]})]})}const br=i.createContext({});function ya(t){var p,d;const e=Ct.useActionData(),{children:n,className:o,id:r,...s}=t,a=i.useRef(null),l=((p=a.current)==null?void 0:p.name)||"",u=((d=e==null?void 0:e.fieldErrors)==null?void 0:d[l])||null,c=i.useId(),f=`arkynFormController ${o}`;return v.jsx(br.Provider,{value:{error:u,id:c,inputRef:a},children:v.jsx("section",{id:r||l||void 0,className:f.trim(),...s,children:n})})}function Ke(){return i.useContext(br)}function ba(t){const{name:e,className:n="",size:o="md",isError:r,defaultChecked:s=!1,checked:a=null,onCheck:l,value:u,...c}=t,{id:f,inputRef:p,error:d}=Ke(),h=r||!!d,[E,m]=i.useState(s||!1),C=typeof a=="boolean"?a:E,w=`arkynCheckbox ${o} ${h?"errorTrue":"errorFalse"} ${C?"checkedTrue":"checkedFalse"} ${n}`;function I(){const y=E;m(!y),l&&l(y?"":u||"checked")}return v.jsxs("button",{id:f,type:"button",className:w,onClick:I,...c,children:[v.jsx("input",{type:"hidden",name:e,ref:p,value:C?u||"checked":""}),v.jsx(ke.Check,{})]})}function La(t){const{children:e,className:n,...o}=t,r=`arkynFormError ${n}`,{error:s}=Ke();return e?v.jsx("strong",{className:r.trim(),...o,children:e}):s?v.jsx("strong",{className:r.trim(),...o,children:s}):v.jsx(v.Fragment,{})}function Ca(t){const{showAsterisk:e=!1,className:n="",...o}=t,{id:r}=Ke(),a=`arkynFormLabel ${e?"asteriskTrue":"asteriskFalse"} ${n}`;return v.jsx("label",{className:a.trim(),htmlFor:r,...o})}function xa(t){const{isLoading:e=!1,scheme:n="primary",variant:o="solid",size:r="md",icon:s,disabled:a,className:l="",...u}=t,c={xs:12,sm:16,md:20,lg:24},p=`arkynIconButton ${o} ${n} ${r} ${e?"loadingTrue":"loadingFalse"} ${l}`;return v.jsxs("button",{disabled:a||e,className:p.trim(),...u,children:[v.jsx("div",{className:"arkynIconButtonSpinner",children:v.jsx(ke.Loader2,{size:c[r],strokeWidth:2.5})}),v.jsx("div",{className:"arkynIconButtonContent",children:v.jsx(s,{size:c[r],strokeWidth:2.5})})]})}function lt(t,e,n){if(!t)return v.jsx(v.Fragment,{});if(typeof t=="string")return v.jsx("p",{className:n,children:t});const o=t;return v.jsx("p",{className:n,children:v.jsx(o,{color:"var(--secondary-600)",size:e,strokeWidth:2.5})})}function On(t){return t&&t.replace(/[^0-9]/g,"")}function Lr(t,e){let n="",o=0;return Array.from(t).forEach((r,s)=>{e[s+o].match(/[0-9]/)||(n+=e[s+o],o++),n+=r}),n}function Cr(t){return t.length>11?"CNPJ":"CPF"}const In={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},xr=On(In.CNPJ).length;function Ea(t,e){const{isLoading:n,isError:o,size:r="md",className:s="",variant:a="solid",prefix:l,sufix:u,leftIcon:c,rightIcon:f,disabled:p,defaultValue:d,readOnly:h,onFocus:E,onBlur:m,title:C,style:x,onChange:O,...w}=t;function I(F){let V=On(F);const H=Cr(V);if(!(V.length>xr))return V=Lr(V,In[H]),V}const y=f?"right":"left",z=`arkyn_input ${l?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${r} ${p||h||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,A={md:20,lg:20}[r];return{isLoading:n,className:z,prefix:lt(l,A,"prefix"),sufix:lt(u,A,"sufix"),LeftIcon:c,RightIcon:f,defaultValue:I(d||""),disabled:p,readOnly:h,onFocus:E,onBlur:m,title:C,style:x,onChange:O,loadingPosition:y,iconSize:A,Spinner:v.jsx(ke.Loader2,{className:"spinner",size:A,strokeWidth:2.5}),...w}}function wa(t){const[e,n]=i.useState(!1),o=i.useRef(null),{inputRef:r,id:s,error:a}=Ke(),l=r||o,u=t.isError||!!a,{disabled:c,title:f,style:p,className:d,prefix:h,sufix:E,iconSize:m,loadingPosition:C,isLoading:x,LeftIcon:O,readOnly:w,onFocus:I,onBlur:y,RightIcon:b,Spinner:M,onChange:P,value:U,defaultValue:T,...z}=Ea({...t,id:s,isError:u},e),[X,A]=i.useState(T),F=O&&!x,V=b&&!x,H=C==="left"&&x,$=C==="right"&&x;function W(){c||!(l!=null&&l.current)||(n(!0),l.current.focus())}function Q(D){let _=On(D.target.value);const B=Cr(_);_.length>xr||(_=Lr(_,In[B]),D.target.value=_,A(_),P&&P(D))}function k(D){n(!0),I&&I(D)}function S(D){n(!1),y&&y(D)}return v.jsxs("section",{title:f,style:p,onClick:W,className:d,children:[h,H&&M,F&&v.jsx(O,{size:m,strokeWidth:2.5}),v.jsx("input",{disabled:c||x,readOnly:w,ref:l,value:U||X,onFocus:k,onChange:Q,onBlur:S,...z}),V&&v.jsx(b,{size:m,strokeWidth:2.5}),$&&M,E]})}const Sa=3,ka=(t="pt-BR",e,n="BRL",o=!0)=>new Intl.NumberFormat(t,{style:"currency",currency:n,currencyDisplay:"symbol",minimumFractionDigits:2,maximumFractionDigits:2}).format(e).slice(o?Sa:0),Xt=2,Er=t=>typeof t=="number"?t:Number(t.toString().replace(/[^0-9-]/g,"")),_n=t=>{let e=t;return typeof t=="string"?(e=Er(t),e%1!==0&&(e=e.toFixed(Xt))):e=Number.isInteger(t)?Number(t)*10**Xt:t.toFixed(Xt),Er(e)/10**Xt},wr=(t,e,n)=>{if(!e)return[0,""];const o=_n(e),r=ka(t,o,n);return[o,r]};function Ma(t,e){const{isLoading:n,isError:o,size:r="md",className:s="",variant:a="solid",prefix:l,sufix:u,leftIcon:c,rightIcon:f,disabled:p,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,max:x=1e9,locale:O="pt-BR",currency:w="BRL",...I}=t,y=f?"right":"left",z=`arkyn_input ${l?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${r} ${p||d||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,A={md:20,lg:20}[r];return{isLoading:n,className:z,prefix:lt(l,A,"prefix"),sufix:lt(u,A,"sufix"),LeftIcon:c,RightIcon:f,disabled:p,locale:O,currency:w,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,max:x,loadingPosition:y,iconSize:A,Spinner:v.jsx(ke.Loader2,{className:"spinner",size:A,strokeWidth:2.5}),...I}}function Pa(t){const[e,n]=i.useState(!1),[o,r]=i.useState("0"),s=i.useRef(null),{inputRef:a,id:l,error:u}=Ke(),c=a||s,f=t.isError||!!u,{disabled:p,title:d,style:h,className:E,prefix:m,sufix:C,iconSize:x,loadingPosition:O,isLoading:w,LeftIcon:I,readOnly:y,onFocus:b,onBlur:M,RightIcon:P,Spinner:U,value:T,max:z,onChangeValue:X,onKeyPress:A,currency:F,locale:V,name:H,defaultValue:$,...W}=Ma({...t,id:l,isError:f},e),Q=I&&!w,k=P&&!w,S=O==="left"&&w,D=O==="right"&&w;function _(){p||!(c!=null&&c.current)||(n(!0),c.current.focus())}function B(R){n(!0),b&&b(R)}function G(R){n(!1),M&&M(R)}const L=R=>{const[Y,oe]=wr(V,R,F);return!z||Y<=z?(r(oe),[Y,oe]):[_n(o),o]},q=R=>{R.preventDefault();const[Y,oe]=L(R.target.value);X(R,String(Y),String(oe))},K=R=>A&&A(R,R.key,R.key);return i.useEffect(()=>{const R=T||+$||void 0,[,Y]=wr(V,R,F);r(Y)},[F,$,T]),v.jsxs("section",{title:d,style:h,onClick:_,className:E,children:[m,S&&U,Q&&v.jsx(I,{size:x,strokeWidth:2.5}),v.jsx("input",{value:o,onChange:q,onBlur:G,onFocus:B,onKeyUp:K,disabled:p||w,readOnly:y,...W}),v.jsx("input",{type:"hidden",ref:c,name:H,value:_n(o)}),D&&U,k&&v.jsx(P,{size:x,strokeWidth:2.5}),C]})}function Ta(t,e){const{isLoading:n,isError:o,size:r="md",className:s="",variant:a="solid",prefix:l,sufix:u,leftIcon:c,rightIcon:f,disabled:p,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,onChange:x,showMask:O=!1,type:w,...I}=t,y=f?"right":"left",z=`arkyn_input ${l?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${r} ${p||d||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,A={md:20,lg:20}[r];return{isLoading:n,className:z,prefix:lt(l,A,"prefix"),sufix:lt(u,A,"sufix"),LeftIcon:c,RightIcon:f,disabled:p,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,onChange:x,loadingPosition:y,iconSize:A,showMask:O,Spinner:v.jsx(ke.Loader2,{className:"spinner",size:A,strokeWidth:2.5}),...I}}const Oa=i.forwardRef((t,e)=>v.jsx("input",{ref:e,...t}));function Ia(t){const[e,n]=i.useState(!1),o=i.useRef(null),{inputRef:r,id:s,error:a}=Ke(),l=r||o,u=t.isError||!!a,{disabled:c,title:f,style:p,className:d,prefix:h,sufix:E,iconSize:m,loadingPosition:C,isLoading:x,LeftIcon:O,readOnly:w,onFocus:I,onBlur:y,RightIcon:b,Spinner:M,...P}=Ta({...t,id:s,isError:u},e),U=O&&!x,T=b&&!x,z=C==="left"&&x,X=C==="right"&&x;function A(){c||!(l!=null&&l.current)||(n(!0),l.current.focus())}function F(H){n(!0),I&&I(H)}function V(H){n(!1),y&&y(H)}return v.jsxs("section",{title:f,style:p,onClick:A,className:d,children:[h,z&&M,U&&v.jsx(O,{size:m,strokeWidth:2.5}),v.jsx(Ii.InputMask,{component:Oa,ref:l,onFocus:F,onBlur:V,disabled:c,...P}),T&&v.jsx(b,{size:m,strokeWidth:2.5}),X&&M,E]})}function _a(t,e){const{isLoading:n,isError:o,size:r="md",className:s="",variant:a="solid",prefix:l,sufix:u,leftIcon:c,rightIcon:f,disabled:p,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,onChange:x,...O}=t,w=f?"right":"left",U=`arkyn_input ${l?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${r} ${p||d||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,z={md:20,lg:20}[r];return{isLoading:n,className:U,prefix:lt(l,z,"prefix"),sufix:lt(u,z,"sufix"),LeftIcon:c,RightIcon:f,disabled:p,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,onChange:x,loadingPosition:w,iconSize:z,Spinner:v.jsx(ke.Loader2,{className:"spinner",size:z,strokeWidth:2.5}),...O}}function Ra(t){const[e,n]=i.useState(!1),o=i.useRef(null),{inputRef:r,id:s,error:a}=Ke(),l=r||o,u=t.isError||!!a,{disabled:c,title:f,style:p,className:d,prefix:h,sufix:E,iconSize:m,loadingPosition:C,isLoading:x,LeftIcon:O,readOnly:w,onFocus:I,onBlur:y,RightIcon:b,type:M,Spinner:P,...U}=_a({...t,id:s,isError:u},e),T=O&&!x,z=b&&!x,X=C==="left"&&x,A=C==="right"&&x;function F(){c||!(l!=null&&l.current)||(n(!0),l.current.focus())}function V($){n(!0),I&&I($)}function H($){n(!1),y&&y($)}return M==="hidden"?v.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:l,...U}):v.jsxs("section",{title:f,style:p,onClick:F,className:d,children:[h,X&&P,T&&v.jsx(O,{size:m,strokeWidth:2.5}),v.jsx("input",{disabled:c||x,readOnly:w,ref:l,onFocus:V,onBlur:H,type:M,...U}),z&&v.jsx(b,{size:m,strokeWidth:2.5}),A&&P,E]})}function Rn(t){return t.type==="currency"?v.jsx(Pa,{...t}):t.type==="masked"?v.jsx(Ia,{...t}):t.type==="cpf-cnpj"?v.jsx(wa,{...t}):v.jsx(Ra,{...t})}const Sr=i.createContext({});function Da(){return i.useContext(Sr)}function ja(t){const{defaultValue:e,name:n,value:o,onChange:r,size:s="md",className:a="",...l}=t,[u,c]=i.useState(e||""),{inputRef:f,id:p}=Ke();function d(E){c(E),r&&r(E)}const h=`arkynRadioGroup ${s} ${a}`;return v.jsxs(Sr.Provider,{value:{onChange:d,value:o||u,size:s},children:[v.jsx("input",{style:{display:"none"},type:"text",id:p,readOnly:!0,name:n,ref:f,value:o||u}),v.jsx("div",{className:h.trim(),...l})]})}function Na(t){const{value:e,size:n,disabled:o,children:r,className:s="",...a}=t,{onChange:l,size:u,value:c}=Da(),{error:f}=Ke(),m=`arkynRadioBox ${n||u} ${c===e?"checkedTrue":"checkedFalse"} ${f?"errorTrue":"errorFalse"} ${o?"disabledTrue":"disabledFalse"} ${s}`;return v.jsxs("label",{className:m.trim(),children:[v.jsx("button",{type:"button",disabled:o,onClick:()=>l(e),onFocus:()=>l(e),...a}),r]})}function Ba(t,e){const{isLoading:n,isError:o,size:r="md",className:s="",variant:a="solid",prefix:l,leftIcon:u,disabled:c,readOnly:f,onFocus:p,onBlur:d,title:h,style:E,closeOnSelect:m=!0,...C}=t,y=`arkyn_select ${l?"hasPrefix":""} ${a} ${r} ${c||f||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,M={md:20,lg:20}[r];return{isLoading:n,className:y,prefix:Fi(l,M,"prefix"),LeftIcon:u,disabled:c||n||f,onFocus:p,onBlur:d,title:h,closeOnSelect:m,style:E,iconSize:M,Spinner:v.jsx(ke.Loader2,{className:"spinner",size:M,strokeWidth:2.5}),...C}}function $a(t){var D;const[e,n]=i.useState(!1),{inputRef:o,id:r,error:s}=Ke(),a=i.useRef(null),l=o||a,u=t.isError||!!s,{disabled:c,title:f,style:p,className:d,prefix:h,iconSize:E,isLoading:m,LeftIcon:C,value:x=null,defaultValue:O="",onFocus:w,onBlur:I,Spinner:y,name:b,placeholder:M,onSelect:P,options:U,optionMaxHeight:T,closeOnSelect:z,...X}=Ba({...t,id:r,isError:u},e),[A,F]=i.useState(O);function V(){c||!(l!=null&&l.current)||e||(n(!0),l.current.focus())}function H(_){e||(n(!0),w&&w(_))}function $(){n(!1),I&&l.current&&l.current.blur()}function W(_){const{label:B,value:G}=_;F(A!==G?G:""),P&&P({label:B,value:G}),z&&$()}const Q=typeof x=="string"?x:A,k=((D=U.find(_=>_.value===Q))==null?void 0:D.label)||"",S=()=>{if(!e&&k)return!0;if(!e&&!k)return!1;if(e&&k)return!0;if(e&&!k)return!1};return v.jsxs(v.Fragment,{children:[v.jsxs("section",{title:f,style:p,onClick:V,className:`${d} placeholder_dark_${S()}`,children:[h,C&&v.jsx(C,{size:E,strokeWidth:2.5}),v.jsx("input",{disabled:c,readOnly:!0,placeholder:k||M,onFocus:H,...X}),v.jsx("input",{type:"hidden",ref:l,name:b,value:Q||"",readOnly:!0}),e&&v.jsxs("div",{className:"arkyn_select_content",style:{overflow:"auto",maxHeight:T},children:[U.map(({label:_,value:B})=>v.jsxs("div",{onClick:()=>W({label:_,value:B}),className:Q===B?"arkyn_select_option active":"arkyn_select_option",children:[_," ",v.jsx(ke.Check,{})]},B)),U.length<=0&&v.jsx("p",{children:"Sem opções disponíveis"})]}),!m&&v.jsx(ke.ChevronDown,{className:"arkyn_select_arrow",size:E,strokeWidth:2.5}),m&&y]}),e&&v.jsx("aside",{className:"arkyn_select_overlay",onClick:$})]})}function Aa(t){const{size:e="lg",defaultChecked:n=!1,checked:o=null,value:r,name:s,className:a="",onCheck:l,...u}=t,[c,f]=i.useState(n),{id:p,inputRef:d}=Ke(),h=typeof o=="boolean"?o:c;function E(){f(!c),l&&l(h?"":r||"checked")}const C=`arkynSwitch ${h?"checkedTrue":"checkedFalse"} ${e} ${a}`;return v.jsx("button",{id:p,type:"button",onClick:E,className:C,...u,children:v.jsx("input",{type:"hidden",name:s,ref:d,value:h?r||"checked":""})})}function za(t){const{variant:e="solid",size:n="md",className:o,disabled:r=!1,readOnly:s=!1,onFocus:a,onBlur:l,title:u,style:c,...f}=t,[p,d]=i.useState(!1),{inputRef:h,id:E,error:m}=Ke(),C=i.useRef(null),x=h||C,w=t.isError||!!m?"errorTrue":"errorFalse",b=`arkynTextarea ${e} ${n} ${r||s?"opacityTrue":"opacityFalse"} ${w} ${p?"focusedTrue":"focusedFalse"} ${o}`;function M(){r||!(x!=null&&x.current)||(d(!0),x.current.focus())}function P(T){d(!0),a&&a(T)}function U(T){d(!1),l&&l(T)}return v.jsx("section",{title:u,style:c,onClick:M,className:b,children:v.jsx("textarea",{id:E,disabled:r,readOnly:s,ref:x,onFocus:P,onBlur:U,...f})})}function Ua({googleMapsApiKey:t,onChange:e,options:n,...o}){const[r,s]=i.useState(null),a=u=>s(u),l=()=>{const c=r.getPlaces()[0],f=c==null?void 0:c.address_components;function p(d){const h=f.find(E=>E.types[0]===d);return h?h.long_name:""}if(c){const d=p("route"),h=p("sublocality_level_1"),E=p("administrative_area_level_2"),m=p("administrative_area_level_1"),C=p("postal_code");e&&e({street:d,city:E,state:m,district:h,cep:C})}};return v.jsx(Co,{libraries:["places"],googleMapsApiKey:t,loadingElement:v.jsx(Rn,{type:"text",...o}),children:v.jsx(ua,{onLoad:a,onPlacesChanged:l,options:n,children:v.jsx(Rn,{type:"text",...o})})})}function Fa(t){const{className:e="",...n}=t,o=`arkynBreadcrumbContainer ${e}`;return v.jsx("nav",{className:o,...n})}function Ha(t){const{pathname:e}=Ct.useLocation(),{className:n="",disabled:o=!1,children:r,to:s,...a}=t,u=`arkynBreadcrumbLink ${e===s?"active":"inactive"} ${n}`;return o?v.jsxs("p",{className:u,children:[v.jsx(ke.ChevronRight,{size:14,strokeWidth:2.5}),r]}):v.jsxs(Ct.Link,{to:s,className:u,...a,children:[v.jsx(ke.ChevronRight,{size:14,strokeWidth:2.5}),r]})}function kr(t=""){const e=Ct.useLocation(),n=new URLSearchParams(e.search),o=t?`${t}:`:"",r=s=>{Object.entries(s).forEach(([a,l])=>{l===void 0?n.delete(`${o}${a}`):n.set(`${o}${a}`,String(l))})};return{getParam:s=>n.get(`${o}${s}`),getScopedSearch:s=>{r(s);let a=n.toString();return a&&(a="?"+a),a}}}function Wa(t){const{scope:e,totalCountRegisters:n,perPageKey:o="per_page",pageKey:r="page",siblingsCount:s=2,...a}=t,l=Ct.useNavigate(),{getParam:u,getScopedSearch:c}=kr(e),f=Number(u(r))||1,p=Number(u(o))||20,d=Math.ceil(n/p),h=Ui(f,s),E=zi(f,s,d);function m(C){l(c({page:C}))}return v.jsxs("div",{className:"arkynPagination",...a,children:[v.jsx("button",{className:"arkynPaginationIconButton",disabled:f<=1,onClick:()=>m(f-1),children:v.jsx(ke.ChevronLeft,{})}),f>1+s&&v.jsxs(v.Fragment,{children:[v.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>m(1),children:"1"}),f>2+s&&v.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:v.jsx(ke.Ellipsis,{})})]}),h.map((C,x)=>v.jsx("button",{onClick:()=>m(C),className:"arkynPaginationPageButton",children:C},x)),v.jsx("button",{className:"arkynPaginationCurrent",disabled:!0,children:f}),E.map((C,x)=>v.jsx("button",{onClick:()=>m(C),className:"arkynPaginationPageButton",children:C},x)),f+s<d&&v.jsxs(v.Fragment,{children:[f+1+s<d&&v.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:v.jsx(ke.Ellipsis,{})}),v.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>m(d),children:d})]}),v.jsx("button",{className:"arkynPaginationIconButton",disabled:f>=d,onClick:()=>m(f+1),children:v.jsx(ke.ChevronRight,{})})]})}const Dn=i.createContext({});function Va(){if(!Dn)throw new Error("useTabContext must be used within a TabProvider");return i.useContext(Dn)}function Za(t){const{children:e,onClick:n,defaultActive:o,className:r,...s}=t,[a,l]=i.useState(o||""),[u,c]=i.useState(!0),f=i.useRef(null),p=`arkynTabContainer ${r||""}`,[d,h]=i.useState({width:"0px",left:"0px",transition:"none"}),E=(C,x)=>{const O=C.getBoundingClientRect(),w=f.current.getBoundingClientRect(),I=x?void 0:"none";c(!1),h({transition:I,width:`${O.width}px`,left:`${O.left-w.left}px`})};i.useEffect(()=>{const C=f.current;if(!C)return;let x=null;x=C.querySelector("button.active"),x&&E(x)},[]);const m=C=>{const x=C.target;x&&(l(x.value),x.classList.add("active"),E(x,!0),n&&n(x.value))};return v.jsxs("nav",{ref:f,className:p.trim(),...s,children:[v.jsx(Dn.Provider,{value:{handleTabClick:m,showInitialTab:u,value:a},children:e}),v.jsx("div",{className:"activeLine",style:d})]})}function Ga(t){const{children:e,className:n="",onClick:o,...r}=t,{value:s,showInitialTab:a,handleTabClick:l}=Va(),u=s===r.value&&s?"activeTrue":"activeFalse",f=`arkynTabButton ${s===r.value&&a?"showBorderBottom":""} ${u} ${n}`;function p(d){l(d),o&&o(d)}return v.jsx("button",{onClick:p,className:f.trim(),...r,children:e})}const Mr=i.createContext({});function Ya(t){const{isVisibled:e,makeInvisible:n,orientation:o="left",children:r,className:s,...a}=t,l=o==="left"?"-100%":"100%",c=`arkynDrawerContainer ${o} ${e?"visibleTrue":"visibleFalse"} ${s}`;return v.jsx(Mr.Provider,{value:{makeInvisible:n},children:v.jsx(ht.AnimatePresence,{children:e&&v.jsxs("aside",{className:c.trim(),...a,children:[v.jsx(ht.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),v.jsx(ht.motion.div,{className:"arkynDrawerContainerContent",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${l})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${l})`},children:r})]})})})}function qa(t){const{showCloseButton:e=!0,className:n,children:o,...r}=t,{makeInvisible:s}=i.useContext(Mr),a=`arkynDrawerHeader ${n}`;return v.jsxs("header",{className:a.trim(),...r,children:[o,e&&v.jsx("button",{className:"arkynDrawerHeaderCloseButton",type:"button",onClick:s,"aria-label":"Close drawer",children:v.jsx(ke.X,{size:24})})]})}const Pr=i.createContext({});function Ka(t){const{isVisibled:e,makeInvisible:n,children:o,className:r="",...s}=t,l=`arkynModalContainer ${e?"visibleTrue":"visibleFalse"} ${r}`;return v.jsx(Pr.Provider,{value:{makeInvisible:n},children:v.jsx(ht.AnimatePresence,{children:e&&v.jsxs("aside",{className:l.trim(),...s,children:[v.jsx(ht.motion.div,{className:"arkynModalContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),v.jsx(ht.motion.div,{className:"arkynModalContainerContent",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0,scale:.75},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},children:o})]})})})}function Xa(t){const{alignment:e="right",className:n,...o}=t,r=`arkynModalFooter ${e} ${n}`;return v.jsx("footer",{className:r.trim(),...o})}function Ja(t){const{showCloseButton:e=!0,className:n,children:o,...r}=t,{makeInvisible:s}=i.useContext(Pr),a=`arkynModalHeader ${n}`;return v.jsxs("header",{className:a.trim(),...r,children:[o,e&&v.jsx("button",{type:"button",onClick:s,"aria-label":"Close modal button",className:"arkynModalHeaderCloseButton",children:v.jsx(ke.X,{size:24})})]})}function Qa(t){const{children:e,button:n,closeOnClick:o,orientation:r="bottomLeft"}=t,[s,a]=i.useState(!1),u=`arkynPopover ${r} ${s?"visibleTrue":"visibleFalse"}`;function c(){s||a(!0)}return v.jsxs("div",{className:u,onClick:c,children:[n,v.jsx(ht.motion.div,{style:{visibility:s?"visible":"hidden"},transition:{ease:"easeOut",duration:0},initial:{opacity:0},animate:{opacity:s?1:0},exit:{opacity:0},onClick:()=>o&&a(!1),className:"arkynPopoverContent",children:e}),s&&v.jsx("div",{onClick:()=>a(!1),className:"arkynPopoverOverlay"})]})}function Tr(t){const{message:e,title:n,type:o,size:r="lg"}=t,s=`arkynToast ${o} ${r}`;function a(){switch(o){case"info":return v.jsx(ke.Info,{});case"success":return v.jsx(ke.CheckCircle2,{});case"danger":return v.jsx(ke.XCircle,{});case"warning":return v.jsx(ke.AlertCircle,{});default:return v.jsx(ke.Info,{})}}return v.jsxs("aside",{className:s,children:[v.jsxs("div",{children:[v.jsx("div",{className:"bg"}),v.jsx(a,{})]}),v.jsxs("p",{children:[v.jsx("strong",{title:n,children:n}),v.jsx("span",{children:e})]})]})}function el(t){const{text:e,size:n="lg",children:o,orientation:r="top",className:s="",...a}=t,l=`arkynTooltip ${n} ${r} ${s}`;return v.jsxs("div",{className:l.trim(),...a,children:[o,v.jsx("div",{className:"arkynTooltipText",children:e})]})}var je={},jn={},jt={},Nt={},Or="Expected a function",Ir=NaN,tl="[object Symbol]",nl=/^\s+|\s+$/g,ol=/^[-+]0x[0-9a-f]+$/i,rl=/^0b[01]+$/i,il=/^0o[0-7]+$/i,sl=parseInt,al=typeof Zt=="object"&&Zt&&Zt.Object===Object&&Zt,ll=typeof self=="object"&&self&&self.Object===Object&&self,ul=al||ll||Function("return this")(),cl=Object.prototype,dl=cl.toString,fl=Math.max,pl=Math.min,Nn=function(){return ul.Date.now()};function hl(t,e,n){var o,r,s,a,l,u,c=0,f=!1,p=!1,d=!0;if(typeof t!="function")throw new TypeError(Or);e=_r(e)||0,Jt(n)&&(f=!!n.leading,p="maxWait"in n,s=p?fl(_r(n.maxWait)||0,e):s,d="trailing"in n?!!n.trailing:d);function h(b){var M=o,P=r;return o=r=void 0,c=b,a=t.apply(P,M),a}function E(b){return c=b,l=setTimeout(x,e),f?h(b):a}function m(b){var M=b-u,P=b-c,U=e-M;return p?pl(U,s-P):U}function C(b){var M=b-u,P=b-c;return u===void 0||M>=e||M<0||p&&P>=s}function x(){var b=Nn();if(C(b))return O(b);l=setTimeout(x,m(b))}function O(b){return l=void 0,d&&o?h(b):(o=r=void 0,a)}function w(){l!==void 0&&clearTimeout(l),c=0,o=u=r=l=void 0}function I(){return l===void 0?a:O(Nn())}function y(){var b=Nn(),M=C(b);if(o=arguments,r=this,u=b,M){if(l===void 0)return E(u);if(p)return l=setTimeout(x,e),h(u)}return l===void 0&&(l=setTimeout(x,e)),a}return y.cancel=w,y.flush=I,y}function gl(t,e,n){var o=!0,r=!0;if(typeof t!="function")throw new TypeError(Or);return Jt(n)&&(o="leading"in n?!!n.leading:o,r="trailing"in n?!!n.trailing:r),hl(t,e,{leading:o,maxWait:e,trailing:r})}function Jt(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function ml(t){return!!t&&typeof t=="object"}function vl(t){return typeof t=="symbol"||ml(t)&&dl.call(t)==tl}function _r(t){if(typeof t=="number")return t;if(vl(t))return Ir;if(Jt(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Jt(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(nl,"");var n=rl.test(t);return n||il.test(t)?sl(t.slice(2),n?2:8):ol.test(t)?Ir:+t}var yl=gl,Bt={};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.addPassiveEventListener=function(e,n,o){var r=o.name;r||(r=n,console.warn("Listener must be a named function.")),Qt.has(n)||Qt.set(n,new Set);var s=Qt.get(n);if(!s.has(r)){var a=function(){var l=!1;try{var u=Object.defineProperty({},"passive",{get:function(){l=!0}});window.addEventListener("test",null,u)}catch{}return l}();e.addEventListener(n,o,a?{passive:!0}:!1),s.add(r)}},Bt.removePassiveEventListener=function(e,n,o){e.removeEventListener(n,o),Qt.get(n).delete(o.name||n)};var Qt=new Map;Object.defineProperty(Nt,"__esModule",{value:!0});var bl=yl,Ll=xl(bl),Cl=Bt;function xl(t){return t&&t.__esModule?t:{default:t}}var El=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:66;return(0,Ll.default)(e,n)},_e={spyCallbacks:[],spySetState:[],scrollSpyContainers:[],mount:function(e,n){if(e){var o=El(function(r){_e.scrollHandler(e)},n);_e.scrollSpyContainers.push(e),(0,Cl.addPassiveEventListener)(e,"scroll",o)}},isMounted:function(e){return _e.scrollSpyContainers.indexOf(e)!==-1},currentPositionX:function(e){if(e===document){var n=window.pageYOffset!==void 0,o=(document.compatMode||"")==="CSS1Compat";return n?window.pageXOffset:o?document.documentElement.scrollLeft:document.body.scrollLeft}else return e.scrollLeft},currentPositionY:function(e){if(e===document){var n=window.pageXOffset!==void 0,o=(document.compatMode||"")==="CSS1Compat";return n?window.pageYOffset:o?document.documentElement.scrollTop:document.body.scrollTop}else return e.scrollTop},scrollHandler:function(e){var n=_e.scrollSpyContainers[_e.scrollSpyContainers.indexOf(e)].spyCallbacks||[];n.forEach(function(o){return o(_e.currentPositionX(e),_e.currentPositionY(e))})},addStateHandler:function(e){_e.spySetState.push(e)},addSpyHandler:function(e,n){var o=_e.scrollSpyContainers[_e.scrollSpyContainers.indexOf(n)];o.spyCallbacks||(o.spyCallbacks=[]),o.spyCallbacks.push(e),e(_e.currentPositionX(n),_e.currentPositionY(n))},updateStates:function(){_e.spySetState.forEach(function(e){return e()})},unmount:function(e,n){_e.scrollSpyContainers.forEach(function(o){return o.spyCallbacks&&o.spyCallbacks.length&&o.spyCallbacks.indexOf(n)>-1&&o.spyCallbacks.splice(o.spyCallbacks.indexOf(n),1)}),_e.spySetState&&_e.spySetState.length&&_e.spySetState.indexOf(e)>-1&&_e.spySetState.splice(_e.spySetState.indexOf(e),1),document.removeEventListener("scroll",_e.scrollHandler)},update:function(){return _e.scrollSpyContainers.forEach(function(e){return _e.scrollHandler(e)})}};Nt.default=_e;var xt={},$t={};Object.defineProperty($t,"__esModule",{value:!0});var wl=function(e,n){var o=e.indexOf("#")===0?e.substring(1):e,r=o?"#"+o:"",s=window&&window.location,a=r?s.pathname+s.search+r:s.pathname+s.search;n?history.pushState(history.state,"",a):history.replaceState(history.state,"",a)},Sl=function(){return window.location.hash.replace(/^#/,"")},kl=function(e){return function(n){return e.contains?e!=n&&e.contains(n):!!(e.compareDocumentPosition(n)&16)}},Ml=function(e){return getComputedStyle(e).position!=="static"},Bn=function(e,n){for(var o=e.offsetTop,r=e.offsetParent;r&&!n(r);)o+=r.offsetTop,r=r.offsetParent;return{offsetTop:o,offsetParent:r}},Pl=function(e,n,o){if(o)return e===document?n.getBoundingClientRect().left+(window.scrollX||window.pageXOffset):getComputedStyle(e).position!=="static"?n.offsetLeft:n.offsetLeft-e.offsetLeft;if(e===document)return n.getBoundingClientRect().top+(window.scrollY||window.pageYOffset);if(Ml(e)){if(n.offsetParent!==e){var r=function(f){return f===e||f===document},s=Bn(n,r),a=s.offsetTop,l=s.offsetParent;if(l!==e)throw new Error("Seems containerElement is not an ancestor of the Element");return a}return n.offsetTop}if(n.offsetParent===e.offsetParent)return n.offsetTop-e.offsetTop;var u=function(f){return f===document};return Bn(n,u).offsetTop-Bn(e,u).offsetTop};$t.default={updateHash:wl,getHash:Sl,filterElementInContainer:kl,scrollOffset:Pl};var en={},$n={};Object.defineProperty($n,"__esModule",{value:!0}),$n.default={defaultEasing:function(e){return e<.5?Math.pow(e*2,2)/2:1-Math.pow((1-e)*2,2)/2},linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:-1+(4-2*e)*e},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}};var An={};Object.defineProperty(An,"__esModule",{value:!0});var Tl=Bt,Ol=["mousedown","mousewheel","touchmove","keydown"];An.default={subscribe:function(e){return typeof document<"u"&&Ol.forEach(function(n){return(0,Tl.addPassiveEventListener)(document,n,e)})}};var At={};Object.defineProperty(At,"__esModule",{value:!0});var zn={registered:{},scrollEvent:{register:function(e,n){zn.registered[e]=n},remove:function(e){zn.registered[e]=null}}};At.default=zn,Object.defineProperty(en,"__esModule",{value:!0});var Il=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},_l=$t;tn(_l);var Rl=$n,Rr=tn(Rl),Dl=An,jl=tn(Dl),Nl=At,Qe=tn(Nl);function tn(t){return t&&t.__esModule?t:{default:t}}var Dr=function(e){return Rr.default[e.smooth]||Rr.default.defaultEasing},Bl=function(e){return typeof e=="function"?e:function(){return e}},$l=function(){if(typeof window<"u")return window.requestAnimationFrame||window.webkitRequestAnimationFrame},Un=function(){return $l()||function(t,e,n){window.setTimeout(t,n||1e3/60,new Date().getTime())}}(),jr=function(){return{currentPosition:0,startPosition:0,targetPosition:0,progress:0,duration:0,cancel:!1,target:null,containerElement:null,to:null,start:null,delta:null,percent:null,delayTimeout:null}},Nr=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollLeft;var o=window.pageXOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return o?window.pageXOffset:r?document.documentElement.scrollLeft:document.body.scrollLeft},Br=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollTop;var o=window.pageXOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return o?window.pageYOffset:r?document.documentElement.scrollTop:document.body.scrollTop},Al=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollWidth-n.offsetWidth;var o=document.body,r=document.documentElement;return Math.max(o.scrollWidth,o.offsetWidth,r.clientWidth,r.scrollWidth,r.offsetWidth)},zl=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollHeight-n.offsetHeight;var o=document.body,r=document.documentElement;return Math.max(o.scrollHeight,o.offsetHeight,r.clientHeight,r.scrollHeight,r.offsetHeight)},Ul=function t(e,n,o){var r=n.data;if(!n.ignoreCancelEvents&&r.cancel){Qe.default.registered.end&&Qe.default.registered.end(r.to,r.target,r.currentPositionY);return}if(r.delta=Math.round(r.targetPosition-r.startPosition),r.start===null&&(r.start=o),r.progress=o-r.start,r.percent=r.progress>=r.duration?1:e(r.progress/r.duration),r.currentPosition=r.startPosition+Math.ceil(r.delta*r.percent),r.containerElement&&r.containerElement!==document&&r.containerElement!==document.body?n.horizontal?r.containerElement.scrollLeft=r.currentPosition:r.containerElement.scrollTop=r.currentPosition:n.horizontal?window.scrollTo(r.currentPosition,0):window.scrollTo(0,r.currentPosition),r.percent<1){var s=t.bind(null,e,n);Un.call(window,s);return}Qe.default.registered.end&&Qe.default.registered.end(r.to,r.target,r.currentPosition)},Fn=function(e){e.data.containerElement=e?e.containerId?document.getElementById(e.containerId):e.container&&e.container.nodeType?e.container:document:null},zt=function(e,n,o,r){n.data=n.data||jr(),window.clearTimeout(n.data.delayTimeout);var s=function(){n.data.cancel=!0};if(jl.default.subscribe(s),Fn(n),n.data.start=null,n.data.cancel=!1,n.data.startPosition=n.horizontal?Nr(n):Br(n),n.data.targetPosition=n.absolute?e:e+n.data.startPosition,n.data.startPosition===n.data.targetPosition){Qe.default.registered.end&&Qe.default.registered.end(n.data.to,n.data.target,n.data.currentPosition);return}n.data.delta=Math.round(n.data.targetPosition-n.data.startPosition),n.data.duration=Bl(n.duration)(n.data.delta),n.data.duration=isNaN(parseFloat(n.data.duration))?1e3:parseFloat(n.data.duration),n.data.to=o,n.data.target=r;var a=Dr(n),l=Ul.bind(null,a,n);if(n&&n.delay>0){n.data.delayTimeout=window.setTimeout(function(){Qe.default.registered.begin&&Qe.default.registered.begin(n.data.to,n.data.target),Un.call(window,l)},n.delay);return}Qe.default.registered.begin&&Qe.default.registered.begin(n.data.to,n.data.target),Un.call(window,l)},nn=function(e){return e=Il({},e),e.data=e.data||jr(),e.absolute=!0,e},Fl=function(e){zt(0,nn(e))},Hl=function(e,n){zt(e,nn(n))},Wl=function(e){e=nn(e),Fn(e),zt(e.horizontal?Al(e):zl(e),e)},Vl=function(e,n){n=nn(n),Fn(n);var o=n.horizontal?Nr(n):Br(n);zt(e+o,n)};en.default={animateTopScroll:zt,getAnimationType:Dr,scrollToTop:Fl,scrollToBottom:Wl,scrollTo:Hl,scrollMore:Vl},Object.defineProperty(xt,"__esModule",{value:!0});var Zl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Gl=$t,Yl=Hn(Gl),ql=en,Kl=Hn(ql),Xl=At,on=Hn(Xl);function Hn(t){return t&&t.__esModule?t:{default:t}}var rn={},$r=void 0;xt.default={unmount:function(){rn={}},register:function(e,n){rn[e]=n},unregister:function(e){delete rn[e]},get:function(e){return rn[e]||document.getElementById(e)||document.getElementsByName(e)[0]||document.getElementsByClassName(e)[0]},setActiveLink:function(e){return $r=e},getActiveLink:function(){return $r},scrollTo:function(e,n){var o=this.get(e);if(!o){console.warn("target Element not found");return}n=Zl({},n,{absolute:!1});var r=n.containerId,s=n.container,a=void 0;r?a=document.getElementById(r):s&&s.nodeType?a=s:a=document,n.absolute=!0;var l=n.horizontal,u=Yl.default.scrollOffset(a,o,l)+(n.offset||0);if(!n.smooth){on.default.registered.begin&&on.default.registered.begin(e,o),a===document?n.horizontal?window.scrollTo(u,0):window.scrollTo(0,u):a.scrollTop=u,on.default.registered.end&&on.default.registered.end(e,o);return}Kl.default.animateTopScroll(u,n,e,o)}};var Wn={exports:{}},sn={exports:{}},we={};/** @license React v16.13.1
|
72
72
|
* react-is.production.min.js
|
73
73
|
*
|
74
74
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { GoogleSearchPlacesProps } from "@arkyn/types";
|
2
|
-
declare function GoogleSearchPlaces({ googleMapsApiKey,
|
2
|
+
declare function GoogleSearchPlaces({ googleMapsApiKey, onChange, options, ...rest }: GoogleSearchPlacesProps): import("react/jsx-runtime").JSX.Element;
|
3
3
|
export { GoogleSearchPlaces };
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/GoogleSearchPlaces/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/GoogleSearchPlaces/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAYvD,iBAAS,kBAAkB,CAAC,EAC1B,gBAAgB,EAChB,QAAQ,EACR,OAAO,EACP,GAAG,IAAI,EACR,EAAE,uBAAuB,2CA4CzB;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
@@ -1,7 +1,30 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { Input } from "../Input";
|
3
2
|
import { LoadScript, StandaloneSearchBox } from "@react-google-maps/api";
|
4
|
-
|
5
|
-
|
3
|
+
import { useState } from "react";
|
4
|
+
import { Input } from "../Input";
|
5
|
+
function GoogleSearchPlaces({ googleMapsApiKey, onChange, options, ...rest }) {
|
6
|
+
const [searchBox, setSearchBox] = useState(null);
|
7
|
+
const handleLoad = (ref) => setSearchBox(ref);
|
8
|
+
const handlePlacesChanged = () => {
|
9
|
+
const places = searchBox.getPlaces();
|
10
|
+
const place = places[0];
|
11
|
+
const address_components = place?.address_components;
|
12
|
+
function findData(key) {
|
13
|
+
const data = address_components.find((item) => item.types[0] === key);
|
14
|
+
if (data)
|
15
|
+
return data.long_name;
|
16
|
+
return "";
|
17
|
+
}
|
18
|
+
if (place) {
|
19
|
+
const street = findData("route");
|
20
|
+
const district = findData("sublocality_level_1");
|
21
|
+
const city = findData("administrative_area_level_2");
|
22
|
+
const state = findData("administrative_area_level_1");
|
23
|
+
const cep = findData("postal_code");
|
24
|
+
const sendPlace = { street, city, state, district, cep };
|
25
|
+
onChange && onChange(sendPlace);
|
26
|
+
}
|
27
|
+
};
|
28
|
+
return (_jsx(LoadScript, { libraries: ["places"], googleMapsApiKey: googleMapsApiKey, loadingElement: _jsx(Input, { type: "text", ...rest }), children: _jsx(StandaloneSearchBox, { onLoad: handleLoad, onPlacesChanged: handlePlacesChanged, options: options, children: _jsx(Input, { type: "text", ...rest }) }) }));
|
6
29
|
}
|
7
30
|
export { GoogleSearchPlaces };
|