@arkyn/components 1.3.105 → 1.3.107
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/bundle.js +226 -228
- package/dist/bundle.umd.cjs +1 -1
- package/dist/components/Switch/index.js +1 -1
- package/package.json +1 -1
- package/src/components/Switch/index.tsx +10 -10
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=Ki(),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 Uo={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Fo={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),T=x[0],w=x[1],I=i.useState(null),v=I[0],b=I[1],k=i.useState(null),P=k[0],U=k[1],O=i.useState(null),z=O[0],X=O[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&&(T!==null&&google.maps.event.removeListener(T),w(google.maps.event.addListener(m,"closeclick",a)))},[a]),i.useEffect(function(){m&&l&&(v!==null&&google.maps.event.removeListener(v),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(){T&&google.maps.event.removeListener(T),P&&google.maps.event.removeListener(P),v&&google.maps.event.removeListener(v),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:Fo,eventMap:Uo,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:Fo,eventMap:Uo,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 Ho={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Wo={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,T=t.onUnmount,w=i.useContext(ue),I=i.useState(null),v=I[0],b=I[1],k=i.useState(null),P=k[0],U=k[1],O=i.useState(null),z=O[0],X=O[1],A=i.useState(null),F=A[0],V=A[1],H=i.useState(null),$=H[0],W=H[1],Q=i.useState(null),M=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(){v!==null&&v.setMap(w)},[w]),i.useEffect(function(){typeof e<"u"&&v!==null&&v.setOptions(e)},[v,e]),i.useEffect(function(){typeof n<"u"&&v!==null&&v.setDraggable(n)},[v,n]),i.useEffect(function(){typeof o<"u"&&v!==null&&v.setEditable(o)},[v,o]),i.useEffect(function(){typeof r<"u"&&v!==null&&v.setVisible(r)},[v,r]),i.useEffect(function(){typeof s<"u"&&v!==null&&v.setPath(s)},[v,s]),i.useEffect(function(){v&&a&&(P!==null&&google.maps.event.removeListener(P),U(google.maps.event.addListener(v,"dblclick",a)))},[a]),i.useEffect(function(){v&&l&&(z!==null&&google.maps.event.removeListener(z),X(google.maps.event.addListener(v,"dragend",l)))},[l]),i.useEffect(function(){v&&u&&(F!==null&&google.maps.event.removeListener(F),V(google.maps.event.addListener(v,"dragstart",u)))},[u]),i.useEffect(function(){v&&c&&($!==null&&google.maps.event.removeListener($),W(google.maps.event.addListener(v,"mousedown",c)))},[c]),i.useEffect(function(){v&&f&&(M!==null&&google.maps.event.removeListener(M),S(google.maps.event.addListener(v,"mousemove",f)))},[f]),i.useEffect(function(){v&&p&&(_!==null&&google.maps.event.removeListener(_),B(google.maps.event.addListener(v,"mouseout",p)))},[p]),i.useEffect(function(){v&&d&&(L!==null&&google.maps.event.removeListener(L),q(google.maps.event.addListener(v,"mouseover",d)))},[d]),i.useEffect(function(){v&&h&&(R!==null&&google.maps.event.removeListener(R),Y(google.maps.event.addListener(v,"mouseup",h)))},[h]),i.useEffect(function(){v&&E&&(j!==null&&google.maps.event.removeListener(j),ce(google.maps.event.addListener(v,"rightclick",E)))},[E]),i.useEffect(function(){v&&m&&(me!==null&&google.maps.event.removeListener(me),he(google.maps.event.addListener(v,"click",m)))},[m]),i.useEffect(function(){v&&C&&(Me!==null&&google.maps.event.removeListener(Me),le(google.maps.event.addListener(v,"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($),M!==null&&google.maps.event.removeListener(M),_!==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),T&&T(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:Wo,eventMap:Ho,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:Wo,eventMap:Ho,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 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)},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,T=t.onLoad,w=t.onUnmount,I=t.onEdit,v=i.useContext(ue),b=i.useState(null),k=b[0],P=b[1],U=i.useState(null),O=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],M=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(){k!==null&&k.setMap(v)},[v]),i.useEffect(function(){typeof e<"u"&&k!==null&&k.setOptions(e)},[k,e]),i.useEffect(function(){typeof n<"u"&&k!==null&&k.setDraggable(n)},[k,n]),i.useEffect(function(){typeof o<"u"&&k!==null&&k.setEditable(o)},[k,o]),i.useEffect(function(){typeof r<"u"&&k!==null&&k.setVisible(r)},[k,r]),i.useEffect(function(){typeof s<"u"&&k!==null&&k.setPath(s)},[k,s]),i.useEffect(function(){typeof a<"u"&&k!==null&&k.setPaths(a)},[k,a]),i.useEffect(function(){k&&l&&(O!==null&&google.maps.event.removeListener(O),z(google.maps.event.addListener(k,"dblclick",l)))},[l]),i.useEffect(function(){k&&(google.maps.event.addListener(k.getPath(),"insert_at",function(){I==null||I(k)}),google.maps.event.addListener(k.getPath(),"set_at",function(){I==null||I(k)}))},[k,I]),i.useEffect(function(){k&&u&&(A!==null&&google.maps.event.removeListener(A),F(google.maps.event.addListener(k,"dragend",u)))},[u]),i.useEffect(function(){k&&c&&(H!==null&&google.maps.event.removeListener(H),$(google.maps.event.addListener(k,"dragstart",c)))},[c]),i.useEffect(function(){k&&f&&(Q!==null&&google.maps.event.removeListener(Q),M(google.maps.event.addListener(k,"mousedown",f)))},[f]),i.useEffect(function(){k&&p&&(D!==null&&google.maps.event.removeListener(D),_(google.maps.event.addListener(k,"mousemove",p)))},[p]),i.useEffect(function(){k&&d&&(G!==null&&google.maps.event.removeListener(G),L(google.maps.event.addListener(k,"mouseout",d)))},[d]),i.useEffect(function(){k&&h&&(K!==null&&google.maps.event.removeListener(K),R(google.maps.event.addListener(k,"mouseover",h)))},[h]),i.useEffect(function(){k&&E&&(oe!==null&&google.maps.event.removeListener(oe),j(google.maps.event.addListener(k,"mouseup",E)))},[E]),i.useEffect(function(){k&&m&&(Ce!==null&&google.maps.event.removeListener(Ce),me(google.maps.event.addListener(k,"rightclick",m)))},[m]),i.useEffect(function(){k&&C&&(Te!==null&&google.maps.event.removeListener(Te),Me(google.maps.event.addListener(k,"click",C)))},[C]),i.useEffect(function(){k&&x&&(re!==null&&google.maps.event.removeListener(re),Ne(google.maps.event.addListener(k,"drag",x)))},[x]),i.useEffect(function(){var ae=new google.maps.Polygon(ee(ee({},e||{}),{map:v}));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&&M(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),T&&T(ae),function(){O!==null&&google.maps.event.removeListener(O),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:Zo,eventMap:Vo,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:Zo,eventMap:Vo,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 Go={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"},Yo={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,T=t.onLoad,w=t.onUnmount,I=i.useContext(ue),v=i.useState(null),b=v[0],k=v[1],P=i.useState(null),U=P[0],O=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],M=i.useState(null),S=M[0],D=M[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),O(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&&O(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)),k(te),T&&T(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:Yo,eventMap:Go,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:Yo,eventMap:Go,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 qo={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"},Ko={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,T=t.onCenterChanged,w=t.onRadiusChanged,I=t.onLoad,v=t.onUnmount,b=i.useContext(ue),k=i.useState(null),P=k[0],U=k[1],O=i.useState(null),z=O[0],X=O[1],A=i.useState(null),F=A[0],V=A[1],H=i.useState(null),$=H[0],W=H[1],Q=i.useState(null),M=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&&(M!==null&&google.maps.event.removeListener(M),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&&T&&(te!==null&&google.maps.event.removeListener(te),We(google.maps.event.addListener(P,"center_changed",T)))},[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)),T&&We(google.maps.event.addListener(ve,"center_changed",T)),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($),M!==null&&google.maps.event.removeListener(M),_!==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),v&&v(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:Ko,eventMap:qo,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:Ko,eventMap:qo,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 Xo={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},Jo={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),T=i.useState(null),w=T[0],I=T[1],v=i.useState(null),b=v[0],k=v[1],P=i.useState(null),U=P[0],O=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],M=i.useState(null),S=M[0],D=M[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),k(google.maps.event.addListener(w,"dblclick",o)))},[o]),i.useEffect(function(){w&&r&&(U!==null&&google.maps.event.removeListener(U),O(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&&k(google.maps.event.addListener(te,"dblclick",o)),r&&O(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:Jo,eventMap:Xo,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:Jo,eventMap:Xo,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 Qo={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},er={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:er,eventMap:Qo,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:er,eventMap:Qo,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 tr(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 nr(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?tr(this.container,r):{x:0,y:0}),f=nr(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 or(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function rr(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]),io.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?tr(o.containerRef.current,o.props.getPixelPositionOffset):{}),l=nr(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=or(n.position),r=or(this.props.position),s=rr(n.bounds),a=rr(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?io.createPortal(y.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 ir={onDblClick:"dblclick",onClick:"click"},sr={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:sr,eventMap:ir,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:sr,eventMap:ir,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 ar={},lr={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:lr,eventMap:ar,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:lr,eventMap:ar,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 ur={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},cr={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:cr,eventMap:ur,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:cr,eventMap:ur,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 dr={onDirectionsChanged:"directions_changed"},fr={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:fr,eventMap:dr,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:fr,eventMap:dr,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 y.jsx(y.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 pr={onPlacesChanged:"places_changed"},hr={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:hr,eventMap:pr,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:hr,eventMap:pr,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 y.jsx("div",{ref:this.containerElement,children:i.Children.only(this.props.children)})},e.contextType=ue,e}(i.PureComponent),gr={onPlaceChanged:"place_changed"},mr={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:mr,eventMap:gr,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:mr,eventMap:gr,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 y.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,className:o,...r}){return t?y.jsx("div",{className:"arkynGoogleMapPinned "+o,...r,children:y.jsx(os,{zoom:e,center:t,mapContainerStyle:{borderRadius:"var(--rounded-cards)",width:"100%",height:"100%"},children:y.jsx(ps,{draggable:n,position:t})})}):y.jsx("div",{className:"arkynGoogleMapPinnedEmpty "+o,...r,children:y.jsx(ke.MapPinned,{})})}function da(t){const{className:e,...n}=t,o=`arkynSkeleton ${e}`;return y.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 y.jsx("tbody",{className:s.trim(),...r,children:a?y.jsx("tr",{className:"arkynTableBodyEmptyLine",children:y.jsx("td",{colSpan:100,children:y.jsx("div",{children:e})})}):o})}function pa(t){const{className:e,children:n,...o}=t,r=`arkynTableCaption ${e}`;return y.jsx("caption",{className:r.trim(),...o,children:y.jsx("div",{className:"arkynTableCaptionContent",children:n})})}function ha(t){const{children:e,className:n,...o}=t,r=`arkynTableContainer ${n}`;return y.jsx("div",{className:r.trim(),...o,children:y.jsx("table",{children:e})})}function ga(t){const{className:e,children:n,...o}=t,r=`arkynTableFooter ${e}`;return y.jsxs("tfoot",{className:r.trim(),...o,children:[y.jsx("tr",{className:"spacingRow"}),y.jsx("tr",{children:y.jsx("th",{colSpan:100,children:y.jsx("div",{className:"arkynTableFooterContent",children:n})})})]})}function ma(t){const{className:e,children:n,...o}=t,r=`arkynTableHeader ${e}`;return y.jsxs("thead",{className:r.trim(),...o,children:[y.jsx("tr",{children:n}),y.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 y.jsxs("button",{className:C,disabled:u||e,...p,children:[y.jsxs("div",{className:"arkynButtonSpinner",children:[y.jsx(ke.Loader2,{size:h,strokeWidth:2.5}),r&&r]}),y.jsxs("div",{className:"arkynButtonContent",children:[Gt(h,a),f,Gt(h,l)]})]})}const vr=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 y.jsx(vr.Provider,{value:{error:u,id:c,inputRef:a},children:y.jsx("section",{id:r||l||void 0,className:f.trim(),...s,children:n})})}function Ke(){return i.useContext(vr)}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 v=E;m(!v),l&&l(v?"":u||"checked")}return y.jsxs("button",{id:f,type:"button",className:w,onClick:I,...c,children:[y.jsx("input",{type:"hidden",name:e,ref:p,value:C?u||"checked":""}),y.jsx(ke.Check,{})]})}function La(t){const{children:e,className:n,...o}=t,r=`arkynFormError ${n}`,{error:s}=Ke();return e?y.jsx("strong",{className:r.trim(),...o,children:e}):s?y.jsx("strong",{className:r.trim(),...o,children:s}):y.jsx(y.Fragment,{})}function Ca(t){const{showAsterisk:e=!1,className:n="",...o}=t,{id:r}=Ke(),a=`arkynFormLabel ${e?"asteriskTrue":"asteriskFalse"} ${n}`;return y.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 y.jsxs("button",{disabled:a||e,className:p.trim(),...u,children:[y.jsx("div",{className:"arkynIconButtonSpinner",children:y.jsx(ke.Loader2,{size:c[r],strokeWidth:2.5})}),y.jsx("div",{className:"arkynIconButtonContent",children:y.jsx(s,{size:c[r],strokeWidth:2.5})})]})}function lt(t,e,n){if(!t)return y.jsx(y.Fragment,{});if(typeof t=="string")return y.jsx("p",{className:n,children:t});const o=t;return y.jsx("p",{className:n,children:y.jsx(o,{color:"var(--secondary-600)",size:e,strokeWidth:2.5})})}function On(t){return t&&t.replace(/[^0-9]/g,"")}function yr(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 br(t){return t.length>11?"CNPJ":"CPF"}const In={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},Lr=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:T,...w}=t;function I(F){let V=On(F);const H=br(V);if(!(V.length>Lr))return V=yr(V,In[H]),V}const v=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:T,loadingPosition:v,iconSize:A,Spinner:y.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:T,readOnly:w,onFocus:I,onBlur:v,RightIcon:b,Spinner:k,onChange:P,value:U,defaultValue:O,...z}=Ea({...t,id:s,isError:u},e),[X,A]=i.useState(O),F=T&&!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=br(_);_.length>Lr||(_=yr(_,In[B]),D.target.value=_,A(_),P&&P(D))}function M(D){n(!0),I&&I(D)}function S(D){n(!1),v&&v(D)}return y.jsxs("section",{title:f,style:p,onClick:W,className:d,children:[h,H&&k,F&&y.jsx(T,{size:m,strokeWidth:2.5}),y.jsx("input",{disabled:c||x,readOnly:w,ref:l,value:U||X,onFocus:M,onChange:Q,onBlur:S,...z}),V&&y.jsx(b,{size:m,strokeWidth:2.5}),$&&k,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,Cr=t=>typeof t=="number"?t:Number(t.toString().replace(/[^0-9-]/g,"")),_n=t=>{let e=t;return typeof t=="string"?(e=Cr(t),e%1!==0&&(e=e.toFixed(Xt))):e=Number.isInteger(t)?Number(t)*10**Xt:t.toFixed(Xt),Cr(e)/10**Xt},xr=(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:T="pt-BR",currency:w="BRL",...I}=t,v=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:T,currency:w,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,max:x,loadingPosition:v,iconSize:A,Spinner:y.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:T,isLoading:w,LeftIcon:I,readOnly:v,onFocus:b,onBlur:k,RightIcon:P,Spinner:U,value:O,max:z,onChangeValue:X,onKeyPress:A,currency:F,locale:V,name:H,defaultValue:$,...W}=Ma({...t,id:l,isError:f},e),Q=I&&!w,M=P&&!w,S=T==="left"&&w,D=T==="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),k&&k(R)}const L=R=>{const[Y,oe]=xr(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=O||+$||void 0,[,Y]=xr(V,R,F);r(Y)},[F,$,O]),y.jsxs("section",{title:d,style:h,onClick:_,className:E,children:[m,S&&U,Q&&y.jsx(I,{size:x,strokeWidth:2.5}),y.jsx("input",{value:o,onChange:q,onBlur:G,onFocus:B,onKeyUp:K,disabled:p||w,readOnly:v,...W}),y.jsx("input",{type:"hidden",ref:c,name:H,value:_n(o)}),D&&U,M&&y.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:T=!1,type:w,...I}=t,v=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:v,iconSize:A,showMask:T,Spinner:y.jsx(ke.Loader2,{className:"spinner",size:A,strokeWidth:2.5}),...I}}const Oa=i.forwardRef((t,e)=>y.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:T,readOnly:w,onFocus:I,onBlur:v,RightIcon:b,Spinner:k,...P}=Ta({...t,id:s,isError:u},e),U=T&&!x,O=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),v&&v(H)}return y.jsxs("section",{title:f,style:p,onClick:A,className:d,children:[h,z&&k,U&&y.jsx(T,{size:m,strokeWidth:2.5}),y.jsx(Oi.InputMask,{component:Oa,ref:l,onFocus:F,onBlur:V,disabled:c,...P}),O&&y.jsx(b,{size:m,strokeWidth:2.5}),X&&k,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,...T}=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:y.jsx(ke.Loader2,{className:"spinner",size:z,strokeWidth:2.5}),...T}}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:T,readOnly:w,onFocus:I,onBlur:v,RightIcon:b,type:k,Spinner:P,...U}=_a({...t,id:s,isError:u},e),O=T&&!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),v&&v($)}return k==="hidden"?y.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:l,...U}):y.jsxs("section",{title:f,style:p,onClick:F,className:d,children:[h,X&&P,O&&y.jsx(T,{size:m,strokeWidth:2.5}),y.jsx("input",{disabled:c||x,readOnly:w,ref:l,onFocus:V,onBlur:H,type:k,...U}),z&&y.jsx(b,{size:m,strokeWidth:2.5}),A&&P,E]})}function Er(t){return t.type==="currency"?y.jsx(Pa,{...t}):t.type==="masked"?y.jsx(Ia,{...t}):t.type==="cpf-cnpj"?y.jsx(wa,{...t}):y.jsx(Ra,{...t})}const wr=i.createContext({});function Da(){return i.useContext(wr)}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 y.jsxs(wr.Provider,{value:{onChange:d,value:o||u,size:s},children:[y.jsx("input",{style:{display:"none"},type:"text",id:p,readOnly:!0,name:n,ref:f,value:o||u}),y.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 y.jsxs("label",{className:m.trim(),children:[y.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,v=`arkyn_select ${l?"hasPrefix":""} ${a} ${r} ${c||f||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,k={md:20,lg:20}[r];return{isLoading:n,className:v,prefix:Ui(l,k,"prefix"),LeftIcon:u,disabled:c||n||f,onFocus:p,onBlur:d,title:h,closeOnSelect:m,style:E,iconSize:k,Spinner:y.jsx(ke.Loader2,{className:"spinner",size:k,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:T="",onFocus:w,onBlur:I,Spinner:v,name:b,placeholder:k,onSelect:P,options:U,optionMaxHeight:O,closeOnSelect:z,...X}=Ba({...t,id:r,isError:u},e),[A,F]=i.useState(T);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,M=((D=U.find(_=>_.value===Q))==null?void 0:D.label)||"",S=()=>{if(!e&&M)return!0;if(!e&&!M)return!1;if(e&&M)return!0;if(e&&!M)return!1};return y.jsxs(y.Fragment,{children:[y.jsxs("section",{title:f,style:p,onClick:V,className:`${d} placeholder_dark_${S()}`,children:[h,C&&y.jsx(C,{size:E,strokeWidth:2.5}),y.jsx("input",{disabled:c,readOnly:!0,placeholder:M||k,onFocus:H,...X}),y.jsx("input",{type:"hidden",ref:l,name:b,value:Q||"",readOnly:!0}),e&&y.jsxs("div",{className:"arkyn_select_content",style:{overflow:"auto",maxHeight:O},children:[U.map(({label:_,value:B})=>y.jsxs("div",{onClick:()=>W({label:_,value:B}),className:Q===B?"arkyn_select_option active":"arkyn_select_option",children:[_," ",y.jsx(ke.Check,{})]},B)),U.length<=0&&y.jsx("p",{children:"Sem opções disponíveis"})]}),!m&&y.jsx(ke.ChevronDown,{className:"arkyn_select_arrow",size:E,strokeWidth:2.5}),m&&v]}),e&&y.jsx("aside",{className:"arkyn_select_overlay",onClick:$})]})}function Aa(t){const{size:e="lg",defaultChecked:n=!1,checked:o=null,value:r,unCheckedValue:s="",name:a,className:l="",onCheck:u,...c}=t,[f,p]=i.useState(n),{id:d,inputRef:h}=Ke(),E=typeof o=="boolean"?o:f;function m(){p(!f),u&&u(E?s:r||"checked")}const x=`arkynSwitch ${E?"checkedTrue":"checkedFalse"} ${e} ${l}`;return y.jsx("button",{id:d,type:"button",onClick:m,className:x,...c,name:a,ref:h,value:E?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 k(){r||!(x!=null&&x.current)||(d(!0),x.current.focus())}function P(O){d(!0),a&&a(O)}function U(O){d(!1),l&&l(O)}return y.jsx("section",{title:u,style:c,onClick:k,className:b,children:y.jsx("textarea",{id:E,disabled:r,readOnly:s,ref:x,onFocus:P,onBlur:U,...f})})}function Ua({onChange:t,onPlaceChanged:e,options:n,...o}){const[r,s]=i.useState(null),a=u=>s(u),l=()=>{var d,h,E,m;const c=r.getPlaces()[0],f=c==null?void 0:c.address_components;function p(C){const x=f.find(T=>T.types[0]===C);return x?x.long_name:""}if(c){const C=p("route"),x=p("sublocality_level_1"),T=p("administrative_area_level_2"),w=p("administrative_area_level_1"),I=p("postal_code"),v=(h=(d=c.geometry)==null?void 0:d.location)==null?void 0:h.lat(),b=(m=(E=c.geometry)==null?void 0:E.location)==null?void 0:m.lng();e&&e({street:C,city:T,state:w,district:x,cep:I,coordinates:{lat:v,lng:b}})}};return y.jsx(ua,{onLoad:a,onPlacesChanged:l,options:n,children:y.jsx(Er,{type:"text",onChange:u=>t(u.target.value),...o})})}function Fa(t){const{className:e="",...n}=t,o=`arkynBreadcrumbContainer ${e}`;return y.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?y.jsxs("p",{className:u,children:[y.jsx(ke.ChevronRight,{size:14,strokeWidth:2.5}),r]}):y.jsxs(Ct.Link,{to:s,className:u,...a,children:[y.jsx(ke.ChevronRight,{size:14,strokeWidth:2.5}),r]})}function Sr(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}=Sr(e),f=Number(u(r))||1,p=Number(u(o))||20,d=Math.ceil(n/p),h=zi(f,s),E=Ai(f,s,d);function m(C){l(c({page:C}))}return y.jsxs("div",{className:"arkynPagination",...a,children:[y.jsx("button",{className:"arkynPaginationIconButton",disabled:f<=1,onClick:()=>m(f-1),children:y.jsx(ke.ChevronLeft,{})}),f>1+s&&y.jsxs(y.Fragment,{children:[y.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>m(1),children:"1"}),f>2+s&&y.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:y.jsx(ke.Ellipsis,{})})]}),h.map((C,x)=>y.jsx("button",{onClick:()=>m(C),className:"arkynPaginationPageButton",children:C},x)),y.jsx("button",{className:"arkynPaginationCurrent",disabled:!0,children:f}),E.map((C,x)=>y.jsx("button",{onClick:()=>m(C),className:"arkynPaginationPageButton",children:C},x)),f+s<d&&y.jsxs(y.Fragment,{children:[f+1+s<d&&y.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:y.jsx(ke.Ellipsis,{})}),y.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>m(d),children:d})]}),y.jsx("button",{className:"arkynPaginationIconButton",disabled:f>=d,onClick:()=>m(f+1),children:y.jsx(ke.ChevronRight,{})})]})}const Rn=i.createContext({});function Va(){if(!Rn)throw new Error("useTabContext must be used within a TabProvider");return i.useContext(Rn)}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 T=C.getBoundingClientRect(),w=f.current.getBoundingClientRect(),I=x?void 0:"none";c(!1),h({transition:I,width:`${T.width}px`,left:`${T.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 y.jsxs("nav",{ref:f,className:p.trim(),...s,children:[y.jsx(Rn.Provider,{value:{handleTabClick:m,showInitialTab:u,value:a},children:e}),y.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 y.jsx("button",{onClick:p,className:f.trim(),...r,children:e})}const kr=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 y.jsx(kr.Provider,{value:{makeInvisible:n},children:y.jsx(ht.AnimatePresence,{children:e&&y.jsxs("aside",{className:c.trim(),...a,children:[y.jsx(ht.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),y.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(kr),a=`arkynDrawerHeader ${n}`;return y.jsxs("header",{className:a.trim(),...r,children:[o,e&&y.jsx("button",{className:"arkynDrawerHeaderCloseButton",type:"button",onClick:s,"aria-label":"Close drawer",children:y.jsx(ke.X,{size:24})})]})}const Mr=i.createContext({});function Ka(t){const{isVisibled:e,makeInvisible:n,children:o,className:r="",...s}=t,l=`arkynModalContainer ${e?"visibleTrue":"visibleFalse"} ${r}`;return y.jsx(Mr.Provider,{value:{makeInvisible:n},children:y.jsx(ht.AnimatePresence,{children:e&&y.jsxs("aside",{className:l.trim(),...s,children:[y.jsx(ht.motion.div,{className:"arkynModalContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),y.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 y.jsx("footer",{className:r.trim(),...o})}function Ja(t){const{showCloseButton:e=!0,className:n,children:o,...r}=t,{makeInvisible:s}=i.useContext(Mr),a=`arkynModalHeader ${n}`;return y.jsxs("header",{className:a.trim(),...r,children:[o,e&&y.jsx("button",{type:"button",onClick:s,"aria-label":"Close modal button",className:"arkynModalHeaderCloseButton",children:y.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 y.jsxs("div",{className:u,onClick:c,children:[n,y.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&&y.jsx("div",{onClick:()=>a(!1),className:"arkynPopoverOverlay"})]})}function Pr(t){const{message:e,title:n,type:o,size:r="lg"}=t,s=`arkynToast ${o} ${r}`;function a(){switch(o){case"info":return y.jsx(ke.Info,{});case"success":return y.jsx(ke.CheckCircle2,{});case"danger":return y.jsx(ke.XCircle,{});case"warning":return y.jsx(ke.AlertCircle,{});default:return y.jsx(ke.Info,{})}}return y.jsxs("aside",{className:s,children:[y.jsxs("div",{children:[y.jsx("div",{className:"bg"}),y.jsx(a,{})]}),y.jsxs("p",{children:[y.jsx("strong",{title:n,children:n}),y.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 y.jsxs("div",{className:l.trim(),...a,children:[o,y.jsx("div",{className:"arkynTooltipText",children:e})]})}var je={},Dn={},jt={},Nt={},Tr="Expected a function",Or=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,jn=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(Tr);e=Ir(e)||0,Jt(n)&&(f=!!n.leading,p="maxWait"in n,s=p?fl(Ir(n.maxWait)||0,e):s,d="trailing"in n?!!n.trailing:d);function h(b){var k=o,P=r;return o=r=void 0,c=b,a=t.apply(P,k),a}function E(b){return c=b,l=setTimeout(x,e),f?h(b):a}function m(b){var k=b-u,P=b-c,U=e-k;return p?pl(U,s-P):U}function C(b){var k=b-u,P=b-c;return u===void 0||k>=e||k<0||p&&P>=s}function x(){var b=jn();if(C(b))return T(b);l=setTimeout(x,m(b))}function T(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:T(jn())}function v(){var b=jn(),k=C(b);if(o=arguments,r=this,u=b,k){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 v.cancel=w,v.flush=I,v}function gl(t,e,n){var o=!0,r=!0;if(typeof t!="function")throw new TypeError(Tr);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 Ir(t){if(typeof t=="number")return t;if(vl(t))return Or;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)?Or:+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"},Nn=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=Nn(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 Nn(n,u).offsetTop-Nn(e,u).offsetTop};$t.default={updateHash:wl,getHash:Sl,filterElementInContainer:kl,scrollOffset:Pl};var en={},Bn={};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.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 $n={};Object.defineProperty($n,"__esModule",{value:!0});var Tl=Bt,Ol=["mousedown","mousewheel","touchmove","keydown"];$n.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 An={registered:{},scrollEvent:{register:function(e,n){An.registered[e]=n},remove:function(e){An.registered[e]=null}}};At.default=An,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=Bn,_r=tn(Rl),Dl=$n,jl=tn(Dl),Nl=At,Qe=tn(Nl);function tn(t){return t&&t.__esModule?t:{default:t}}var Rr=function(e){return _r.default[e.smooth]||_r.default.defaultEasing},Bl=function(e){return typeof e=="function"?e:function(){return e}},$l=function(){if(typeof window<"u")return window.requestAnimationFrame||window.webkitRequestAnimationFrame},zn=function(){return $l()||function(t,e,n){window.setTimeout(t,n||1e3/60,new Date().getTime())}}(),Dr=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}},jr=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},Nr=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);zn.call(window,s);return}Qe.default.registered.end&&Qe.default.registered.end(r.to,r.target,r.currentPosition)},Un=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||Dr(),window.clearTimeout(n.data.delayTimeout);var s=function(){n.data.cancel=!0};if(jl.default.subscribe(s),Un(n),n.data.start=null,n.data.cancel=!1,n.data.startPosition=n.horizontal?jr(n):Nr(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=Rr(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),zn.call(window,l)},n.delay);return}Qe.default.registered.begin&&Qe.default.registered.begin(n.data.to,n.data.target),zn.call(window,l)},nn=function(e){return e=Il({},e),e.data=e.data||Dr(),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),Un(e),zt(e.horizontal?Al(e):zl(e),e)},Vl=function(e,n){n=nn(n),Un(n);var o=n.horizontal?jr(n):Nr(n);zt(e+o,n)};en.default={animateTopScroll:zt,getAnimationType:Rr,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=Fn(Gl),ql=en,Kl=Fn(ql),Xl=At,on=Fn(Xl);function Fn(t){return t&&t.__esModule?t:{default:t}}var rn={},Br=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 Br=e},getActiveLink:function(){return Br},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 Hn={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=Ki(),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 Uo={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Fo={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),T=x[0],w=x[1],I=i.useState(null),v=I[0],b=I[1],k=i.useState(null),P=k[0],U=k[1],O=i.useState(null),z=O[0],X=O[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&&(T!==null&&google.maps.event.removeListener(T),w(google.maps.event.addListener(m,"closeclick",a)))},[a]),i.useEffect(function(){m&&l&&(v!==null&&google.maps.event.removeListener(v),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(){T&&google.maps.event.removeListener(T),P&&google.maps.event.removeListener(P),v&&google.maps.event.removeListener(v),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:Fo,eventMap:Uo,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:Fo,eventMap:Uo,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 Ho={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Wo={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,T=t.onUnmount,w=i.useContext(ue),I=i.useState(null),v=I[0],b=I[1],k=i.useState(null),P=k[0],U=k[1],O=i.useState(null),z=O[0],X=O[1],A=i.useState(null),F=A[0],V=A[1],H=i.useState(null),$=H[0],W=H[1],Q=i.useState(null),M=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(){v!==null&&v.setMap(w)},[w]),i.useEffect(function(){typeof e<"u"&&v!==null&&v.setOptions(e)},[v,e]),i.useEffect(function(){typeof n<"u"&&v!==null&&v.setDraggable(n)},[v,n]),i.useEffect(function(){typeof o<"u"&&v!==null&&v.setEditable(o)},[v,o]),i.useEffect(function(){typeof r<"u"&&v!==null&&v.setVisible(r)},[v,r]),i.useEffect(function(){typeof s<"u"&&v!==null&&v.setPath(s)},[v,s]),i.useEffect(function(){v&&a&&(P!==null&&google.maps.event.removeListener(P),U(google.maps.event.addListener(v,"dblclick",a)))},[a]),i.useEffect(function(){v&&l&&(z!==null&&google.maps.event.removeListener(z),X(google.maps.event.addListener(v,"dragend",l)))},[l]),i.useEffect(function(){v&&u&&(F!==null&&google.maps.event.removeListener(F),V(google.maps.event.addListener(v,"dragstart",u)))},[u]),i.useEffect(function(){v&&c&&($!==null&&google.maps.event.removeListener($),W(google.maps.event.addListener(v,"mousedown",c)))},[c]),i.useEffect(function(){v&&f&&(M!==null&&google.maps.event.removeListener(M),S(google.maps.event.addListener(v,"mousemove",f)))},[f]),i.useEffect(function(){v&&p&&(_!==null&&google.maps.event.removeListener(_),B(google.maps.event.addListener(v,"mouseout",p)))},[p]),i.useEffect(function(){v&&d&&(L!==null&&google.maps.event.removeListener(L),q(google.maps.event.addListener(v,"mouseover",d)))},[d]),i.useEffect(function(){v&&h&&(R!==null&&google.maps.event.removeListener(R),Y(google.maps.event.addListener(v,"mouseup",h)))},[h]),i.useEffect(function(){v&&E&&(j!==null&&google.maps.event.removeListener(j),ce(google.maps.event.addListener(v,"rightclick",E)))},[E]),i.useEffect(function(){v&&m&&(me!==null&&google.maps.event.removeListener(me),he(google.maps.event.addListener(v,"click",m)))},[m]),i.useEffect(function(){v&&C&&(Me!==null&&google.maps.event.removeListener(Me),le(google.maps.event.addListener(v,"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($),M!==null&&google.maps.event.removeListener(M),_!==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),T&&T(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:Wo,eventMap:Ho,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:Wo,eventMap:Ho,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 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)},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,T=t.onLoad,w=t.onUnmount,I=t.onEdit,v=i.useContext(ue),b=i.useState(null),k=b[0],P=b[1],U=i.useState(null),O=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],M=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(){k!==null&&k.setMap(v)},[v]),i.useEffect(function(){typeof e<"u"&&k!==null&&k.setOptions(e)},[k,e]),i.useEffect(function(){typeof n<"u"&&k!==null&&k.setDraggable(n)},[k,n]),i.useEffect(function(){typeof o<"u"&&k!==null&&k.setEditable(o)},[k,o]),i.useEffect(function(){typeof r<"u"&&k!==null&&k.setVisible(r)},[k,r]),i.useEffect(function(){typeof s<"u"&&k!==null&&k.setPath(s)},[k,s]),i.useEffect(function(){typeof a<"u"&&k!==null&&k.setPaths(a)},[k,a]),i.useEffect(function(){k&&l&&(O!==null&&google.maps.event.removeListener(O),z(google.maps.event.addListener(k,"dblclick",l)))},[l]),i.useEffect(function(){k&&(google.maps.event.addListener(k.getPath(),"insert_at",function(){I==null||I(k)}),google.maps.event.addListener(k.getPath(),"set_at",function(){I==null||I(k)}))},[k,I]),i.useEffect(function(){k&&u&&(A!==null&&google.maps.event.removeListener(A),F(google.maps.event.addListener(k,"dragend",u)))},[u]),i.useEffect(function(){k&&c&&(H!==null&&google.maps.event.removeListener(H),$(google.maps.event.addListener(k,"dragstart",c)))},[c]),i.useEffect(function(){k&&f&&(Q!==null&&google.maps.event.removeListener(Q),M(google.maps.event.addListener(k,"mousedown",f)))},[f]),i.useEffect(function(){k&&p&&(D!==null&&google.maps.event.removeListener(D),_(google.maps.event.addListener(k,"mousemove",p)))},[p]),i.useEffect(function(){k&&d&&(G!==null&&google.maps.event.removeListener(G),L(google.maps.event.addListener(k,"mouseout",d)))},[d]),i.useEffect(function(){k&&h&&(K!==null&&google.maps.event.removeListener(K),R(google.maps.event.addListener(k,"mouseover",h)))},[h]),i.useEffect(function(){k&&E&&(oe!==null&&google.maps.event.removeListener(oe),j(google.maps.event.addListener(k,"mouseup",E)))},[E]),i.useEffect(function(){k&&m&&(Ce!==null&&google.maps.event.removeListener(Ce),me(google.maps.event.addListener(k,"rightclick",m)))},[m]),i.useEffect(function(){k&&C&&(Te!==null&&google.maps.event.removeListener(Te),Me(google.maps.event.addListener(k,"click",C)))},[C]),i.useEffect(function(){k&&x&&(re!==null&&google.maps.event.removeListener(re),Ne(google.maps.event.addListener(k,"drag",x)))},[x]),i.useEffect(function(){var ae=new google.maps.Polygon(ee(ee({},e||{}),{map:v}));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&&M(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),T&&T(ae),function(){O!==null&&google.maps.event.removeListener(O),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:Zo,eventMap:Vo,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:Zo,eventMap:Vo,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 Go={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"},Yo={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,T=t.onLoad,w=t.onUnmount,I=i.useContext(ue),v=i.useState(null),b=v[0],k=v[1],P=i.useState(null),U=P[0],O=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],M=i.useState(null),S=M[0],D=M[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),O(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&&O(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)),k(te),T&&T(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:Yo,eventMap:Go,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:Yo,eventMap:Go,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 qo={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"},Ko={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,T=t.onCenterChanged,w=t.onRadiusChanged,I=t.onLoad,v=t.onUnmount,b=i.useContext(ue),k=i.useState(null),P=k[0],U=k[1],O=i.useState(null),z=O[0],X=O[1],A=i.useState(null),F=A[0],V=A[1],H=i.useState(null),$=H[0],W=H[1],Q=i.useState(null),M=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&&(M!==null&&google.maps.event.removeListener(M),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&&T&&(te!==null&&google.maps.event.removeListener(te),We(google.maps.event.addListener(P,"center_changed",T)))},[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)),T&&We(google.maps.event.addListener(ve,"center_changed",T)),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($),M!==null&&google.maps.event.removeListener(M),_!==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),v&&v(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:Ko,eventMap:qo,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:Ko,eventMap:qo,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 Xo={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},Jo={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),T=i.useState(null),w=T[0],I=T[1],v=i.useState(null),b=v[0],k=v[1],P=i.useState(null),U=P[0],O=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],M=i.useState(null),S=M[0],D=M[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),k(google.maps.event.addListener(w,"dblclick",o)))},[o]),i.useEffect(function(){w&&r&&(U!==null&&google.maps.event.removeListener(U),O(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&&k(google.maps.event.addListener(te,"dblclick",o)),r&&O(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:Jo,eventMap:Xo,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:Jo,eventMap:Xo,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 Qo={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},er={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:er,eventMap:Qo,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:er,eventMap:Qo,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 tr(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 nr(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?tr(this.container,r):{x:0,y:0}),f=nr(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 or(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function rr(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]),io.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?tr(o.containerRef.current,o.props.getPixelPositionOffset):{}),l=nr(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=or(n.position),r=or(this.props.position),s=rr(n.bounds),a=rr(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?io.createPortal(y.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 ir={onDblClick:"dblclick",onClick:"click"},sr={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:sr,eventMap:ir,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:sr,eventMap:ir,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 ar={},lr={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:lr,eventMap:ar,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:lr,eventMap:ar,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 ur={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},cr={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:cr,eventMap:ur,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:cr,eventMap:ur,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 dr={onDirectionsChanged:"directions_changed"},fr={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:fr,eventMap:dr,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:fr,eventMap:dr,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 y.jsx(y.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 pr={onPlacesChanged:"places_changed"},hr={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:hr,eventMap:pr,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:hr,eventMap:pr,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 y.jsx("div",{ref:this.containerElement,children:i.Children.only(this.props.children)})},e.contextType=ue,e}(i.PureComponent),gr={onPlaceChanged:"place_changed"},mr={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:mr,eventMap:gr,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:mr,eventMap:gr,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 y.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,className:o,...r}){return t?y.jsx("div",{className:"arkynGoogleMapPinned "+o,...r,children:y.jsx(os,{zoom:e,center:t,mapContainerStyle:{borderRadius:"var(--rounded-cards)",width:"100%",height:"100%"},children:y.jsx(ps,{draggable:n,position:t})})}):y.jsx("div",{className:"arkynGoogleMapPinnedEmpty "+o,...r,children:y.jsx(ke.MapPinned,{})})}function da(t){const{className:e,...n}=t,o=`arkynSkeleton ${e}`;return y.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 y.jsx("tbody",{className:s.trim(),...r,children:a?y.jsx("tr",{className:"arkynTableBodyEmptyLine",children:y.jsx("td",{colSpan:100,children:y.jsx("div",{children:e})})}):o})}function pa(t){const{className:e,children:n,...o}=t,r=`arkynTableCaption ${e}`;return y.jsx("caption",{className:r.trim(),...o,children:y.jsx("div",{className:"arkynTableCaptionContent",children:n})})}function ha(t){const{children:e,className:n,...o}=t,r=`arkynTableContainer ${n}`;return y.jsx("div",{className:r.trim(),...o,children:y.jsx("table",{children:e})})}function ga(t){const{className:e,children:n,...o}=t,r=`arkynTableFooter ${e}`;return y.jsxs("tfoot",{className:r.trim(),...o,children:[y.jsx("tr",{className:"spacingRow"}),y.jsx("tr",{children:y.jsx("th",{colSpan:100,children:y.jsx("div",{className:"arkynTableFooterContent",children:n})})})]})}function ma(t){const{className:e,children:n,...o}=t,r=`arkynTableHeader ${e}`;return y.jsxs("thead",{className:r.trim(),...o,children:[y.jsx("tr",{children:n}),y.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 y.jsxs("button",{className:C,disabled:u||e,...p,children:[y.jsxs("div",{className:"arkynButtonSpinner",children:[y.jsx(ke.Loader2,{size:h,strokeWidth:2.5}),r&&r]}),y.jsxs("div",{className:"arkynButtonContent",children:[Gt(h,a),f,Gt(h,l)]})]})}const vr=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 y.jsx(vr.Provider,{value:{error:u,id:c,inputRef:a},children:y.jsx("section",{id:r||l||void 0,className:f.trim(),...s,children:n})})}function Ke(){return i.useContext(vr)}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 v=E;m(!v),l&&l(v?"":u||"checked")}return y.jsxs("button",{id:f,type:"button",className:w,onClick:I,...c,children:[y.jsx("input",{type:"hidden",name:e,ref:p,value:C?u||"checked":""}),y.jsx(ke.Check,{})]})}function La(t){const{children:e,className:n,...o}=t,r=`arkynFormError ${n}`,{error:s}=Ke();return e?y.jsx("strong",{className:r.trim(),...o,children:e}):s?y.jsx("strong",{className:r.trim(),...o,children:s}):y.jsx(y.Fragment,{})}function Ca(t){const{showAsterisk:e=!1,className:n="",...o}=t,{id:r}=Ke(),a=`arkynFormLabel ${e?"asteriskTrue":"asteriskFalse"} ${n}`;return y.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 y.jsxs("button",{disabled:a||e,className:p.trim(),...u,children:[y.jsx("div",{className:"arkynIconButtonSpinner",children:y.jsx(ke.Loader2,{size:c[r],strokeWidth:2.5})}),y.jsx("div",{className:"arkynIconButtonContent",children:y.jsx(s,{size:c[r],strokeWidth:2.5})})]})}function lt(t,e,n){if(!t)return y.jsx(y.Fragment,{});if(typeof t=="string")return y.jsx("p",{className:n,children:t});const o=t;return y.jsx("p",{className:n,children:y.jsx(o,{color:"var(--secondary-600)",size:e,strokeWidth:2.5})})}function On(t){return t&&t.replace(/[^0-9]/g,"")}function yr(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 br(t){return t.length>11?"CNPJ":"CPF"}const In={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},Lr=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:T,...w}=t;function I(F){let V=On(F);const H=br(V);if(!(V.length>Lr))return V=yr(V,In[H]),V}const v=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:T,loadingPosition:v,iconSize:A,Spinner:y.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:T,readOnly:w,onFocus:I,onBlur:v,RightIcon:b,Spinner:k,onChange:P,value:U,defaultValue:O,...z}=Ea({...t,id:s,isError:u},e),[X,A]=i.useState(O),F=T&&!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=br(_);_.length>Lr||(_=yr(_,In[B]),D.target.value=_,A(_),P&&P(D))}function M(D){n(!0),I&&I(D)}function S(D){n(!1),v&&v(D)}return y.jsxs("section",{title:f,style:p,onClick:W,className:d,children:[h,H&&k,F&&y.jsx(T,{size:m,strokeWidth:2.5}),y.jsx("input",{disabled:c||x,readOnly:w,ref:l,value:U||X,onFocus:M,onChange:Q,onBlur:S,...z}),V&&y.jsx(b,{size:m,strokeWidth:2.5}),$&&k,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,Cr=t=>typeof t=="number"?t:Number(t.toString().replace(/[^0-9-]/g,"")),_n=t=>{let e=t;return typeof t=="string"?(e=Cr(t),e%1!==0&&(e=e.toFixed(Xt))):e=Number.isInteger(t)?Number(t)*10**Xt:t.toFixed(Xt),Cr(e)/10**Xt},xr=(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:T="pt-BR",currency:w="BRL",...I}=t,v=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:T,currency:w,readOnly:d,onFocus:h,onBlur:E,title:m,style:C,max:x,loadingPosition:v,iconSize:A,Spinner:y.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:T,isLoading:w,LeftIcon:I,readOnly:v,onFocus:b,onBlur:k,RightIcon:P,Spinner:U,value:O,max:z,onChangeValue:X,onKeyPress:A,currency:F,locale:V,name:H,defaultValue:$,...W}=Ma({...t,id:l,isError:f},e),Q=I&&!w,M=P&&!w,S=T==="left"&&w,D=T==="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),k&&k(R)}const L=R=>{const[Y,oe]=xr(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=O||+$||void 0,[,Y]=xr(V,R,F);r(Y)},[F,$,O]),y.jsxs("section",{title:d,style:h,onClick:_,className:E,children:[m,S&&U,Q&&y.jsx(I,{size:x,strokeWidth:2.5}),y.jsx("input",{value:o,onChange:q,onBlur:G,onFocus:B,onKeyUp:K,disabled:p||w,readOnly:v,...W}),y.jsx("input",{type:"hidden",ref:c,name:H,value:_n(o)}),D&&U,M&&y.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:T=!1,type:w,...I}=t,v=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:v,iconSize:A,showMask:T,Spinner:y.jsx(ke.Loader2,{className:"spinner",size:A,strokeWidth:2.5}),...I}}const Oa=i.forwardRef((t,e)=>y.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:T,readOnly:w,onFocus:I,onBlur:v,RightIcon:b,Spinner:k,...P}=Ta({...t,id:s,isError:u},e),U=T&&!x,O=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),v&&v(H)}return y.jsxs("section",{title:f,style:p,onClick:A,className:d,children:[h,z&&k,U&&y.jsx(T,{size:m,strokeWidth:2.5}),y.jsx(Oi.InputMask,{component:Oa,ref:l,onFocus:F,onBlur:V,disabled:c,...P}),O&&y.jsx(b,{size:m,strokeWidth:2.5}),X&&k,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,...T}=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:y.jsx(ke.Loader2,{className:"spinner",size:z,strokeWidth:2.5}),...T}}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:T,readOnly:w,onFocus:I,onBlur:v,RightIcon:b,type:k,Spinner:P,...U}=_a({...t,id:s,isError:u},e),O=T&&!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),v&&v($)}return k==="hidden"?y.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:l,...U}):y.jsxs("section",{title:f,style:p,onClick:F,className:d,children:[h,X&&P,O&&y.jsx(T,{size:m,strokeWidth:2.5}),y.jsx("input",{disabled:c||x,readOnly:w,ref:l,onFocus:V,onBlur:H,type:k,...U}),z&&y.jsx(b,{size:m,strokeWidth:2.5}),A&&P,E]})}function Er(t){return t.type==="currency"?y.jsx(Pa,{...t}):t.type==="masked"?y.jsx(Ia,{...t}):t.type==="cpf-cnpj"?y.jsx(wa,{...t}):y.jsx(Ra,{...t})}const wr=i.createContext({});function Da(){return i.useContext(wr)}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 y.jsxs(wr.Provider,{value:{onChange:d,value:o||u,size:s},children:[y.jsx("input",{style:{display:"none"},type:"text",id:p,readOnly:!0,name:n,ref:f,value:o||u}),y.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 y.jsxs("label",{className:m.trim(),children:[y.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,v=`arkyn_select ${l?"hasPrefix":""} ${a} ${r} ${c||f||n?"opacity":""} ${o?"errored":""} ${e?"focused":""} ${s}`,k={md:20,lg:20}[r];return{isLoading:n,className:v,prefix:Ui(l,k,"prefix"),LeftIcon:u,disabled:c||n||f,onFocus:p,onBlur:d,title:h,closeOnSelect:m,style:E,iconSize:k,Spinner:y.jsx(ke.Loader2,{className:"spinner",size:k,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:T="",onFocus:w,onBlur:I,Spinner:v,name:b,placeholder:k,onSelect:P,options:U,optionMaxHeight:O,closeOnSelect:z,...X}=Ba({...t,id:r,isError:u},e),[A,F]=i.useState(T);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,M=((D=U.find(_=>_.value===Q))==null?void 0:D.label)||"",S=()=>{if(!e&&M)return!0;if(!e&&!M)return!1;if(e&&M)return!0;if(e&&!M)return!1};return y.jsxs(y.Fragment,{children:[y.jsxs("section",{title:f,style:p,onClick:V,className:`${d} placeholder_dark_${S()}`,children:[h,C&&y.jsx(C,{size:E,strokeWidth:2.5}),y.jsx("input",{disabled:c,readOnly:!0,placeholder:M||k,onFocus:H,...X}),y.jsx("input",{type:"hidden",ref:l,name:b,value:Q||"",readOnly:!0}),e&&y.jsxs("div",{className:"arkyn_select_content",style:{overflow:"auto",maxHeight:O},children:[U.map(({label:_,value:B})=>y.jsxs("div",{onClick:()=>W({label:_,value:B}),className:Q===B?"arkyn_select_option active":"arkyn_select_option",children:[_," ",y.jsx(ke.Check,{})]},B)),U.length<=0&&y.jsx("p",{children:"Sem opções disponíveis"})]}),!m&&y.jsx(ke.ChevronDown,{className:"arkyn_select_arrow",size:E,strokeWidth:2.5}),m&&v]}),e&&y.jsx("aside",{className:"arkyn_select_overlay",onClick:$})]})}function Aa(t){const{size:e="lg",defaultChecked:n=!1,checked:o=null,value:r,unCheckedValue:s="",name:a,className:l="",onCheck:u,...c}=t,[f,p]=i.useState(n),{id:d,inputRef:h}=Ke(),E=typeof o=="boolean"?o:f;function m(){p(!f),u&&u(E?s:r||"checked")}const x=`arkynSwitch ${E?"checkedTrue":"checkedFalse"} ${e} ${l}`;return y.jsx("button",{type:"button",onClick:m,className:x,...c,children:y.jsx("input",{id:d,type:"hidden",name:a,ref:h,onClick:m,value:E?r||"checked":s})})}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 k(){r||!(x!=null&&x.current)||(d(!0),x.current.focus())}function P(O){d(!0),a&&a(O)}function U(O){d(!1),l&&l(O)}return y.jsx("section",{title:u,style:c,onClick:k,className:b,children:y.jsx("textarea",{id:E,disabled:r,readOnly:s,ref:x,onFocus:P,onBlur:U,...f})})}function Ua({onChange:t,onPlaceChanged:e,options:n,...o}){const[r,s]=i.useState(null),a=u=>s(u),l=()=>{var d,h,E,m;const c=r.getPlaces()[0],f=c==null?void 0:c.address_components;function p(C){const x=f.find(T=>T.types[0]===C);return x?x.long_name:""}if(c){const C=p("route"),x=p("sublocality_level_1"),T=p("administrative_area_level_2"),w=p("administrative_area_level_1"),I=p("postal_code"),v=(h=(d=c.geometry)==null?void 0:d.location)==null?void 0:h.lat(),b=(m=(E=c.geometry)==null?void 0:E.location)==null?void 0:m.lng();e&&e({street:C,city:T,state:w,district:x,cep:I,coordinates:{lat:v,lng:b}})}};return y.jsx(ua,{onLoad:a,onPlacesChanged:l,options:n,children:y.jsx(Er,{type:"text",onChange:u=>t(u.target.value),...o})})}function Fa(t){const{className:e="",...n}=t,o=`arkynBreadcrumbContainer ${e}`;return y.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?y.jsxs("p",{className:u,children:[y.jsx(ke.ChevronRight,{size:14,strokeWidth:2.5}),r]}):y.jsxs(Ct.Link,{to:s,className:u,...a,children:[y.jsx(ke.ChevronRight,{size:14,strokeWidth:2.5}),r]})}function Sr(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}=Sr(e),f=Number(u(r))||1,p=Number(u(o))||20,d=Math.ceil(n/p),h=zi(f,s),E=Ai(f,s,d);function m(C){l(c({page:C}))}return y.jsxs("div",{className:"arkynPagination",...a,children:[y.jsx("button",{className:"arkynPaginationIconButton",disabled:f<=1,onClick:()=>m(f-1),children:y.jsx(ke.ChevronLeft,{})}),f>1+s&&y.jsxs(y.Fragment,{children:[y.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>m(1),children:"1"}),f>2+s&&y.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:y.jsx(ke.Ellipsis,{})})]}),h.map((C,x)=>y.jsx("button",{onClick:()=>m(C),className:"arkynPaginationPageButton",children:C},x)),y.jsx("button",{className:"arkynPaginationCurrent",disabled:!0,children:f}),E.map((C,x)=>y.jsx("button",{onClick:()=>m(C),className:"arkynPaginationPageButton",children:C},x)),f+s<d&&y.jsxs(y.Fragment,{children:[f+1+s<d&&y.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:y.jsx(ke.Ellipsis,{})}),y.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>m(d),children:d})]}),y.jsx("button",{className:"arkynPaginationIconButton",disabled:f>=d,onClick:()=>m(f+1),children:y.jsx(ke.ChevronRight,{})})]})}const Rn=i.createContext({});function Va(){if(!Rn)throw new Error("useTabContext must be used within a TabProvider");return i.useContext(Rn)}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 T=C.getBoundingClientRect(),w=f.current.getBoundingClientRect(),I=x?void 0:"none";c(!1),h({transition:I,width:`${T.width}px`,left:`${T.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 y.jsxs("nav",{ref:f,className:p.trim(),...s,children:[y.jsx(Rn.Provider,{value:{handleTabClick:m,showInitialTab:u,value:a},children:e}),y.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 y.jsx("button",{onClick:p,className:f.trim(),...r,children:e})}const kr=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 y.jsx(kr.Provider,{value:{makeInvisible:n},children:y.jsx(ht.AnimatePresence,{children:e&&y.jsxs("aside",{className:c.trim(),...a,children:[y.jsx(ht.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),y.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(kr),a=`arkynDrawerHeader ${n}`;return y.jsxs("header",{className:a.trim(),...r,children:[o,e&&y.jsx("button",{className:"arkynDrawerHeaderCloseButton",type:"button",onClick:s,"aria-label":"Close drawer",children:y.jsx(ke.X,{size:24})})]})}const Mr=i.createContext({});function Ka(t){const{isVisibled:e,makeInvisible:n,children:o,className:r="",...s}=t,l=`arkynModalContainer ${e?"visibleTrue":"visibleFalse"} ${r}`;return y.jsx(Mr.Provider,{value:{makeInvisible:n},children:y.jsx(ht.AnimatePresence,{children:e&&y.jsxs("aside",{className:l.trim(),...s,children:[y.jsx(ht.motion.div,{className:"arkynModalContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),y.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 y.jsx("footer",{className:r.trim(),...o})}function Ja(t){const{showCloseButton:e=!0,className:n,children:o,...r}=t,{makeInvisible:s}=i.useContext(Mr),a=`arkynModalHeader ${n}`;return y.jsxs("header",{className:a.trim(),...r,children:[o,e&&y.jsx("button",{type:"button",onClick:s,"aria-label":"Close modal button",className:"arkynModalHeaderCloseButton",children:y.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 y.jsxs("div",{className:u,onClick:c,children:[n,y.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&&y.jsx("div",{onClick:()=>a(!1),className:"arkynPopoverOverlay"})]})}function Pr(t){const{message:e,title:n,type:o,size:r="lg"}=t,s=`arkynToast ${o} ${r}`;function a(){switch(o){case"info":return y.jsx(ke.Info,{});case"success":return y.jsx(ke.CheckCircle2,{});case"danger":return y.jsx(ke.XCircle,{});case"warning":return y.jsx(ke.AlertCircle,{});default:return y.jsx(ke.Info,{})}}return y.jsxs("aside",{className:s,children:[y.jsxs("div",{children:[y.jsx("div",{className:"bg"}),y.jsx(a,{})]}),y.jsxs("p",{children:[y.jsx("strong",{title:n,children:n}),y.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 y.jsxs("div",{className:l.trim(),...a,children:[o,y.jsx("div",{className:"arkynTooltipText",children:e})]})}var je={},Dn={},jt={},Nt={},Tr="Expected a function",Or=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,jn=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(Tr);e=Ir(e)||0,Jt(n)&&(f=!!n.leading,p="maxWait"in n,s=p?fl(Ir(n.maxWait)||0,e):s,d="trailing"in n?!!n.trailing:d);function h(b){var k=o,P=r;return o=r=void 0,c=b,a=t.apply(P,k),a}function E(b){return c=b,l=setTimeout(x,e),f?h(b):a}function m(b){var k=b-u,P=b-c,U=e-k;return p?pl(U,s-P):U}function C(b){var k=b-u,P=b-c;return u===void 0||k>=e||k<0||p&&P>=s}function x(){var b=jn();if(C(b))return T(b);l=setTimeout(x,m(b))}function T(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:T(jn())}function v(){var b=jn(),k=C(b);if(o=arguments,r=this,u=b,k){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 v.cancel=w,v.flush=I,v}function gl(t,e,n){var o=!0,r=!0;if(typeof t!="function")throw new TypeError(Tr);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 Ir(t){if(typeof t=="number")return t;if(vl(t))return Or;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)?Or:+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"},Nn=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=Nn(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 Nn(n,u).offsetTop-Nn(e,u).offsetTop};$t.default={updateHash:wl,getHash:Sl,filterElementInContainer:kl,scrollOffset:Pl};var en={},Bn={};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.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 $n={};Object.defineProperty($n,"__esModule",{value:!0});var Tl=Bt,Ol=["mousedown","mousewheel","touchmove","keydown"];$n.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 An={registered:{},scrollEvent:{register:function(e,n){An.registered[e]=n},remove:function(e){An.registered[e]=null}}};At.default=An,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=Bn,_r=tn(Rl),Dl=$n,jl=tn(Dl),Nl=At,Qe=tn(Nl);function tn(t){return t&&t.__esModule?t:{default:t}}var Rr=function(e){return _r.default[e.smooth]||_r.default.defaultEasing},Bl=function(e){return typeof e=="function"?e:function(){return e}},$l=function(){if(typeof window<"u")return window.requestAnimationFrame||window.webkitRequestAnimationFrame},zn=function(){return $l()||function(t,e,n){window.setTimeout(t,n||1e3/60,new Date().getTime())}}(),Dr=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}},jr=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},Nr=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);zn.call(window,s);return}Qe.default.registered.end&&Qe.default.registered.end(r.to,r.target,r.currentPosition)},Un=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||Dr(),window.clearTimeout(n.data.delayTimeout);var s=function(){n.data.cancel=!0};if(jl.default.subscribe(s),Un(n),n.data.start=null,n.data.cancel=!1,n.data.startPosition=n.horizontal?jr(n):Nr(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=Rr(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),zn.call(window,l)},n.delay);return}Qe.default.registered.begin&&Qe.default.registered.begin(n.data.to,n.data.target),zn.call(window,l)},nn=function(e){return e=Il({},e),e.data=e.data||Dr(),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),Un(e),zt(e.horizontal?Al(e):zl(e),e)},Vl=function(e,n){n=nn(n),Un(n);var o=n.horizontal?jr(n):Nr(n);zt(e+o,n)};en.default={animateTopScroll:zt,getAnimationType:Rr,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=Fn(Gl),ql=en,Kl=Fn(ql),Xl=At,on=Fn(Xl);function Fn(t){return t&&t.__esModule?t:{default:t}}var rn={},Br=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 Br=e},getActiveLink:function(){return Br},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 Hn={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.
|
@@ -13,6 +13,6 @@ function Switch(props) {
|
|
13
13
|
}
|
14
14
|
const checkedClass = currentChecked ? "checkedTrue" : "checkedFalse";
|
15
15
|
const className = `arkynSwitch ${checkedClass} ${size} ${baseClassName}`;
|
16
|
-
return (_jsx("button", {
|
16
|
+
return (_jsx("button", { type: "button", onClick: handleCheck, className: className, ...rest, children: _jsx("input", { id: id, type: "hidden", name: name, ref: inputRef, onClick: handleCheck, value: currentChecked ? value || "checked" : unCheckedValue }) }));
|
17
17
|
}
|
18
18
|
export { Switch };
|
package/package.json
CHANGED
@@ -32,16 +32,16 @@ function Switch(props: SwitchProps) {
|
|
32
32
|
const className = `arkynSwitch ${checkedClass} ${size} ${baseClassName}`;
|
33
33
|
|
34
34
|
return (
|
35
|
-
<button
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
35
|
+
<button type="button" onClick={handleCheck} className={className} {...rest}>
|
36
|
+
<input
|
37
|
+
id={id}
|
38
|
+
type="hidden"
|
39
|
+
name={name}
|
40
|
+
ref={inputRef}
|
41
|
+
onClick={handleCheck}
|
42
|
+
value={currentChecked ? value || "checked" : unCheckedValue}
|
43
|
+
/>
|
44
|
+
</button>
|
45
45
|
);
|
46
46
|
}
|
47
47
|
|