@tealca/core-components 1.0.24 → 1.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -27,7 +27,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
27
27
|
<circle cx="120" cy="120" opacity=".3" r="90" />
|
|
28
28
|
<circle cx="120" cy="120" opacity=".2" r="110" />
|
|
29
29
|
<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">`).concat(s,`</text>
|
|
30
|
-
</svg>`),c="Cluster of ".concat(s," markers"),d=Number(google.maps.Marker.MAX_ZINDEX)+s;if(Qe.isAdvancedMarkerAvailable(n)){var f=new DOMParser,h=f.parseFromString(o,"image/svg+xml").documentElement;h.setAttribute("transform","translate(0 25)");var p={map:n,position:i,zIndex:d,title:c,content:h};return new google.maps.marker.AdvancedMarkerElement(p)}var v={position:i,zIndex:d,title:c,icon:{url:"data:image/svg+xml;base64,".concat(btoa(o)),anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(v)}}function t0(e,t){for(var r in t.prototype)e.prototype[r]=t.prototype[r]}class co{constructor(){t0(co,google.maps.OverlayView)}}var kn;(function(e){e.CLUSTERING_BEGIN="clusteringbegin",e.CLUSTERING_END="clusteringend",e.CLUSTER_CLICK="click"})(kn||(kn={}));var r0=(e,t,r)=>{r.fitBounds(t.bounds)};class n0 extends co{constructor(t){var{map:r,markers:n=[],algorithmOptions:s={},algorithm:i=new Xg(s),renderer:a=new e0,onClusterClick:o=r0}=t;super(),this.markers=[...n],this.clusters=[],this.algorithm=i,this.renderer=a,this.onClusterClick=o,r&&this.setMap(r)}addMarker(t,r){this.markers.includes(t)||(this.markers.push(t),r||this.render())}addMarkers(t,r){t.forEach(n=>{this.addMarker(n,!0)}),r||this.render()}removeMarker(t,r){var n=this.markers.indexOf(t);return n===-1?!1:(Qe.setMap(t,null),this.markers.splice(n,1),r||this.render(),!0)}removeMarkers(t,r){var n=!1;return t.forEach(s=>{n=this.removeMarker(s,!0)||n}),n&&!r&&this.render(),n}clearMarkers(t){this.markers.length=0,t||this.render()}render(){var t=this.getMap();if(t instanceof google.maps.Map&&t.getProjection()){google.maps.event.trigger(this,kn.CLUSTERING_BEGIN,this);var{clusters:r,changed:n}=this.algorithm.calculate({markers:this.markers,map:t,mapCanvasProjection:this.getProjection()});if(n||n==null){var s=new Set;for(var i of r)i.markers.length==1&&s.add(i.markers[0]);var a=[];for(var o of this.clusters)o.marker!=null&&(o.markers.length==1?s.has(o.marker)||Qe.setMap(o.marker,null):a.push(o.marker));this.clusters=r,this.renderClusters(),requestAnimationFrame(()=>a.forEach(c=>Qe.setMap(c,null)))}google.maps.event.trigger(this,kn.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(t=>Qe.setMap(t,null)),this.clusters.forEach(t=>t.delete()),this.clusters=[]}renderClusters(){var t=new Qg(this.markers,this.clusters),r=this.getMap();this.clusters.forEach(n=>{n.markers.length===1?n.marker=n.markers[0]:(n.marker=this.renderer.render(n,t,r),n.markers.forEach(s=>Qe.setMap(s,null)),this.onClusterClick&&n.marker.addListener("click",s=>{google.maps.event.trigger(this,kn.CLUSTER_CLICK,n),this.onClusterClick(s,n,r)})),Qe.setMap(n.marker,r)})}}function Xl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Ql(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xl(Object(r),!0).forEach(function(n){j(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xl(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function s0(e){var t=Jm(),[r,n]=u.useState(null);return u.useEffect(()=>{if(t&&r===null){var s=new n0(Ql(Ql({},e),{},{map:t}));n(s)}},[t]),r}function i0(e){var{children:t,options:r}=e,n=s0(r);return n!==null?t(n):null}u.memo(i0);var ec={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},tc={options(e,t){e.setOptions(t)},position(e,t){e.setPosition(t)},zIndex(e,t){e.setZIndex(t)}};function a0(e){var{children:t,anchor:r,options:n,position:s,zIndex:i,onCloseClick:a,onDomReady:o,onContentChanged:c,onPositionChanged:d,onZindexChanged:f,onLoad:h,onUnmount:p}=e,v=u.useContext(oe),[m,x]=u.useState(null),[y,E]=u.useState(null),[k,O]=u.useState(null),[b,g]=u.useState(null),[w,S]=u.useState(null),[C,_]=u.useState(null),M=u.useRef(null);return u.useEffect(()=>{m!==null&&(m.close(),r?m.open(v,r):m.getPosition()&&m.open(v))},[v,m,r]),u.useEffect(()=>{n&&m!==null&&m.setOptions(n)},[m,n]),u.useEffect(()=>{s&&m!==null&&m.setPosition(s)},[s]),u.useEffect(()=>{typeof i=="number"&&m!==null&&m.setZIndex(i)},[i]),u.useEffect(()=>{m&&a&&(y!==null&&google.maps.event.removeListener(y),E(google.maps.event.addListener(m,"closeclick",a)))},[a]),u.useEffect(()=>{m&&o&&(k!==null&&google.maps.event.removeListener(k),O(google.maps.event.addListener(m,"domready",o)))},[o]),u.useEffect(()=>{m&&c&&(b!==null&&google.maps.event.removeListener(b),g(google.maps.event.addListener(m,"content_changed",c)))},[c]),u.useEffect(()=>{m&&d&&(w!==null&&google.maps.event.removeListener(w),S(google.maps.event.addListener(m,"position_changed",d)))},[d]),u.useEffect(()=>{m&&f&&(C!==null&&google.maps.event.removeListener(C),_(google.maps.event.addListener(m,"zindex_changed",f)))},[f]),u.useEffect(()=>{var D=new google.maps.InfoWindow(n);return x(D),M.current=document.createElement("div"),a&&E(google.maps.event.addListener(D,"closeclick",a)),o&&O(google.maps.event.addListener(D,"domready",o)),c&&g(google.maps.event.addListener(D,"content_changed",c)),d&&S(google.maps.event.addListener(D,"position_changed",d)),f&&_(google.maps.event.addListener(D,"zindex_changed",f)),D.setContent(M.current),s&&D.setPosition(s),i&&D.setZIndex(i),r?D.open(v,r):D.getPosition()?D.open(v):Fe(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),h&&h(D),()=>{y&&google.maps.event.removeListener(y),b&&google.maps.event.removeListener(b),k&&google.maps.event.removeListener(k),w&&google.maps.event.removeListener(w),C&&google.maps.event.removeListener(C),p&&p(D),D.close()}},[]),M.current?rn.createPortal(u.Children.only(t),M.current):null}u.memo(a0);class o0 extends u.PureComponent{constructor(){super(...arguments),j(this,"registeredEvents",[]),j(this,"containerElement",null),j(this,"state",{infoWindow:null}),j(this,"open",(t,r)=>{r?t.open(this.context,r):t.getPosition()?t.open(this.context):Fe(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")}),j(this,"setInfoWindowCallback",()=>{this.state.infoWindow!==null&&this.containerElement!==null&&(this.state.infoWindow.setContent(this.containerElement),this.open(this.state.infoWindow,this.props.anchor),this.props.onLoad&&this.props.onLoad(this.state.infoWindow))})}componentDidMount(){var t=new google.maps.InfoWindow(this.props.options);this.containerElement=document.createElement("div"),this.registeredEvents=de({updaterMap:tc,eventMap:ec,prevProps:{},nextProps:this.props,instance:t}),this.setState(()=>({infoWindow:t}),this.setInfoWindowCallback)}componentDidUpdate(t){this.state.infoWindow!==null&&(fe(this.registeredEvents),this.registeredEvents=de({updaterMap:tc,eventMap:ec,prevProps:t,nextProps:this.props,instance:this.state.infoWindow}))}componentWillUnmount(){this.state.infoWindow!==null&&(fe(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())}render(){return this.containerElement?rn.createPortal(u.Children.only(this.props.children),this.containerElement):null}}j(o0,"contextType",oe);function rc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Gs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rc(Object(r),!0).forEach(function(n){j(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var nc={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},sc={draggable(e,t){e.setDraggable(t)},editable(e,t){e.setEditable(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},path(e,t){e.setPath(t)},visible(e,t){e.setVisible(t)}},l0={};function c0(e){var{options:t,draggable:r,editable:n,visible:s,path:i,onDblClick:a,onDragEnd:o,onDragStart:c,onMouseDown:d,onMouseMove:f,onMouseOut:h,onMouseOver:p,onMouseUp:v,onRightClick:m,onClick:x,onDrag:y,onLoad:E,onUnmount:k}=e,O=u.useContext(oe),[b,g]=u.useState(null),[w,S]=u.useState(null),[C,_]=u.useState(null),[M,D]=u.useState(null),[F,z]=u.useState(null),[W,G]=u.useState(null),[$,X]=u.useState(null),[J,le]=u.useState(null),[re,Q]=u.useState(null),[ee,Y]=u.useState(null),[ce,T]=u.useState(null),[Se,be]=u.useState(null);return u.useEffect(()=>{b!==null&&b.setMap(O)},[O]),u.useEffect(()=>{typeof t<"u"&&b!==null&&b.setOptions(t)},[b,t]),u.useEffect(()=>{typeof r<"u"&&b!==null&&b.setDraggable(r)},[b,r]),u.useEffect(()=>{typeof n<"u"&&b!==null&&b.setEditable(n)},[b,n]),u.useEffect(()=>{typeof s<"u"&&b!==null&&b.setVisible(s)},[b,s]),u.useEffect(()=>{typeof i<"u"&&b!==null&&b.setPath(i)},[b,i]),u.useEffect(()=>{b&&a&&(w!==null&&google.maps.event.removeListener(w),S(google.maps.event.addListener(b,"dblclick",a)))},[a]),u.useEffect(()=>{b&&o&&(C!==null&&google.maps.event.removeListener(C),_(google.maps.event.addListener(b,"dragend",o)))},[o]),u.useEffect(()=>{b&&c&&(M!==null&&google.maps.event.removeListener(M),D(google.maps.event.addListener(b,"dragstart",c)))},[c]),u.useEffect(()=>{b&&d&&(F!==null&&google.maps.event.removeListener(F),z(google.maps.event.addListener(b,"mousedown",d)))},[d]),u.useEffect(()=>{b&&f&&(W!==null&&google.maps.event.removeListener(W),G(google.maps.event.addListener(b,"mousemove",f)))},[f]),u.useEffect(()=>{b&&h&&($!==null&&google.maps.event.removeListener($),X(google.maps.event.addListener(b,"mouseout",h)))},[h]),u.useEffect(()=>{b&&p&&(J!==null&&google.maps.event.removeListener(J),le(google.maps.event.addListener(b,"mouseover",p)))},[p]),u.useEffect(()=>{b&&v&&(re!==null&&google.maps.event.removeListener(re),Q(google.maps.event.addListener(b,"mouseup",v)))},[v]),u.useEffect(()=>{b&&m&&(ee!==null&&google.maps.event.removeListener(ee),Y(google.maps.event.addListener(b,"rightclick",m)))},[m]),u.useEffect(()=>{b&&x&&(ce!==null&&google.maps.event.removeListener(ce),T(google.maps.event.addListener(b,"click",x)))},[x]),u.useEffect(()=>{b&&y&&(Se!==null&&google.maps.event.removeListener(Se),be(google.maps.event.addListener(b,"drag",y)))},[y]),u.useEffect(()=>{var te=new google.maps.Polyline(Gs(Gs({},t||l0),{},{map:O}));return i&&te.setPath(i),typeof s<"u"&&te.setVisible(s),typeof n<"u"&&te.setEditable(n),typeof r<"u"&&te.setDraggable(r),a&&S(google.maps.event.addListener(te,"dblclick",a)),o&&_(google.maps.event.addListener(te,"dragend",o)),c&&D(google.maps.event.addListener(te,"dragstart",c)),d&&z(google.maps.event.addListener(te,"mousedown",d)),f&&G(google.maps.event.addListener(te,"mousemove",f)),h&&X(google.maps.event.addListener(te,"mouseout",h)),p&&le(google.maps.event.addListener(te,"mouseover",p)),v&&Q(google.maps.event.addListener(te,"mouseup",v)),m&&Y(google.maps.event.addListener(te,"rightclick",m)),x&&T(google.maps.event.addListener(te,"click",x)),y&&be(google.maps.event.addListener(te,"drag",y)),g(te),E&&E(te),()=>{w!==null&&google.maps.event.removeListener(w),C!==null&&google.maps.event.removeListener(C),M!==null&&google.maps.event.removeListener(M),F!==null&&google.maps.event.removeListener(F),W!==null&&google.maps.event.removeListener(W),$!==null&&google.maps.event.removeListener($),J!==null&&google.maps.event.removeListener(J),re!==null&&google.maps.event.removeListener(re),ee!==null&&google.maps.event.removeListener(ee),ce!==null&&google.maps.event.removeListener(ce),k&&k(te),te.setMap(null)}},[]),null}u.memo(c0);class u0 extends u.PureComponent{constructor(){super(...arguments),j(this,"registeredEvents",[]),j(this,"state",{polyline:null}),j(this,"setPolylineCallback",()=>{this.state.polyline!==null&&this.props.onLoad&&this.props.onLoad(this.state.polyline)})}componentDidMount(){var t=new google.maps.Polyline(Gs(Gs({},this.props.options),{},{map:this.context}));this.registeredEvents=de({updaterMap:sc,eventMap:nc,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{polyline:t}},this.setPolylineCallback)}componentDidUpdate(t){this.state.polyline!==null&&(fe(this.registeredEvents),this.registeredEvents=de({updaterMap:sc,eventMap:nc,prevProps:t,nextProps:this.props,instance:this.state.polyline}))}componentWillUnmount(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),fe(this.registeredEvents),this.state.polyline.setMap(null))}render(){return null}}j(u0,"contextType",oe);function ic(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function ac(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ic(Object(r),!0).forEach(function(n){j(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ic(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var oc={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},lc={draggable(e,t){e.setDraggable(t)},editable(e,t){e.setEditable(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},path(e,t){e.setPath(t)},paths(e,t){e.setPaths(t)},visible(e,t){e.setVisible(t)}};function d0(e){var{options:t,draggable:r,editable:n,visible:s,path:i,paths:a,onDblClick:o,onDragEnd:c,onDragStart:d,onMouseDown:f,onMouseMove:h,onMouseOut:p,onMouseOver:v,onMouseUp:m,onRightClick:x,onClick:y,onDrag:E,onLoad:k,onUnmount:O,onEdit:b}=e,g=u.useContext(oe),[w,S]=u.useState(null),[C,_]=u.useState(null),[M,D]=u.useState(null),[F,z]=u.useState(null),[W,G]=u.useState(null),[$,X]=u.useState(null),[J,le]=u.useState(null),[re,Q]=u.useState(null),[ee,Y]=u.useState(null),[ce,T]=u.useState(null),[Se,be]=u.useState(null),[te,Ce]=u.useState(null);return u.useEffect(()=>{w!==null&&w.setMap(g)},[g]),u.useEffect(()=>{typeof t<"u"&&w!==null&&w.setOptions(t)},[w,t]),u.useEffect(()=>{typeof r<"u"&&w!==null&&w.setDraggable(r)},[w,r]),u.useEffect(()=>{typeof n<"u"&&w!==null&&w.setEditable(n)},[w,n]),u.useEffect(()=>{typeof s<"u"&&w!==null&&w.setVisible(s)},[w,s]),u.useEffect(()=>{typeof i<"u"&&w!==null&&w.setPath(i)},[w,i]),u.useEffect(()=>{typeof a<"u"&&w!==null&&w.setPaths(a)},[w,a]),u.useEffect(()=>{w&&typeof o=="function"&&(C!==null&&google.maps.event.removeListener(C),_(google.maps.event.addListener(w,"dblclick",o)))},[o]),u.useEffect(()=>{w&&(google.maps.event.addListener(w.getPath(),"insert_at",()=>{b?.(w)}),google.maps.event.addListener(w.getPath(),"set_at",()=>{b?.(w)}),google.maps.event.addListener(w.getPath(),"remove_at",()=>{b?.(w)}))},[w,b]),u.useEffect(()=>{w&&typeof c=="function"&&(M!==null&&google.maps.event.removeListener(M),D(google.maps.event.addListener(w,"dragend",c)))},[c]),u.useEffect(()=>{w&&typeof d=="function"&&(F!==null&&google.maps.event.removeListener(F),z(google.maps.event.addListener(w,"dragstart",d)))},[d]),u.useEffect(()=>{w&&typeof f=="function"&&(W!==null&&google.maps.event.removeListener(W),G(google.maps.event.addListener(w,"mousedown",f)))},[f]),u.useEffect(()=>{w&&typeof h=="function"&&($!==null&&google.maps.event.removeListener($),X(google.maps.event.addListener(w,"mousemove",h)))},[h]),u.useEffect(()=>{w&&typeof p=="function"&&(J!==null&&google.maps.event.removeListener(J),le(google.maps.event.addListener(w,"mouseout",p)))},[p]),u.useEffect(()=>{w&&typeof v=="function"&&(re!==null&&google.maps.event.removeListener(re),Q(google.maps.event.addListener(w,"mouseover",v)))},[v]),u.useEffect(()=>{w&&typeof m=="function"&&(ee!==null&&google.maps.event.removeListener(ee),Y(google.maps.event.addListener(w,"mouseup",m)))},[m]),u.useEffect(()=>{w&&typeof x=="function"&&(ce!==null&&google.maps.event.removeListener(ce),T(google.maps.event.addListener(w,"rightclick",x)))},[x]),u.useEffect(()=>{w&&typeof y=="function"&&(Se!==null&&google.maps.event.removeListener(Se),be(google.maps.event.addListener(w,"click",y)))},[y]),u.useEffect(()=>{w&&typeof E=="function"&&(te!==null&&google.maps.event.removeListener(te),Ce(google.maps.event.addListener(w,"drag",E)))},[E]),u.useEffect(()=>{var K=new google.maps.Polygon(ac(ac({},t),{},{map:g}));return i&&K.setPath(i),a&&K.setPaths(a),typeof s<"u"&&K.setVisible(s),typeof n<"u"&&K.setEditable(n),typeof r<"u"&&K.setDraggable(r),o&&_(google.maps.event.addListener(K,"dblclick",o)),c&&D(google.maps.event.addListener(K,"dragend",c)),d&&z(google.maps.event.addListener(K,"dragstart",d)),f&&G(google.maps.event.addListener(K,"mousedown",f)),h&&X(google.maps.event.addListener(K,"mousemove",h)),p&&le(google.maps.event.addListener(K,"mouseout",p)),v&&Q(google.maps.event.addListener(K,"mouseover",v)),m&&Y(google.maps.event.addListener(K,"mouseup",m)),x&&T(google.maps.event.addListener(K,"rightclick",x)),y&&be(google.maps.event.addListener(K,"click",y)),E&&Ce(google.maps.event.addListener(K,"drag",E)),S(K),k&&k(K),()=>{C!==null&&google.maps.event.removeListener(C),M!==null&&google.maps.event.removeListener(M),F!==null&&google.maps.event.removeListener(F),W!==null&&google.maps.event.removeListener(W),$!==null&&google.maps.event.removeListener($),J!==null&&google.maps.event.removeListener(J),re!==null&&google.maps.event.removeListener(re),ee!==null&&google.maps.event.removeListener(ee),ce!==null&&google.maps.event.removeListener(ce),Se!==null&&google.maps.event.removeListener(Se),O&&O(K),K.setMap(null)}},[]),null}u.memo(d0);class f0 extends u.PureComponent{constructor(){super(...arguments),j(this,"registeredEvents",[])}componentDidMount(){var t=this.props.options||{};this.polygon=new google.maps.Polygon(t),this.polygon.setMap(this.context),this.registeredEvents=de({updaterMap:lc,eventMap:oc,prevProps:{},nextProps:this.props,instance:this.polygon}),this.props.onLoad&&this.props.onLoad(this.polygon)}componentDidUpdate(t){this.polygon&&(fe(this.registeredEvents),this.registeredEvents=de({updaterMap:lc,eventMap:oc,prevProps:t,nextProps:this.props,instance:this.polygon}))}componentWillUnmount(){this.polygon&&(this.props.onUnmount&&this.props.onUnmount(this.polygon),fe(this.registeredEvents),this.polygon&&this.polygon.setMap(null))}render(){return null}}j(f0,"contextType",oe);function cc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function qs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cc(Object(r),!0).forEach(function(n){j(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var uc={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"},dc={bounds(e,t){e.setBounds(t)},draggable(e,t){e.setDraggable(t)},editable(e,t){e.setEditable(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},visible(e,t){e.setVisible(t)}};function h0(e){var{options:t,bounds:r,draggable:n,editable:s,visible:i,onDblClick:a,onDragEnd:o,onDragStart:c,onMouseDown:d,onMouseMove:f,onMouseOut:h,onMouseOver:p,onMouseUp:v,onRightClick:m,onClick:x,onDrag:y,onBoundsChanged:E,onLoad:k,onUnmount:O}=e,b=u.useContext(oe),[g,w]=u.useState(null),[S,C]=u.useState(null),[_,M]=u.useState(null),[D,F]=u.useState(null),[z,W]=u.useState(null),[G,$]=u.useState(null),[X,J]=u.useState(null),[le,re]=u.useState(null),[Q,ee]=u.useState(null),[Y,ce]=u.useState(null),[T,Se]=u.useState(null),[be,te]=u.useState(null),[Ce,K]=u.useState(null);return u.useEffect(()=>{g!==null&&g.setMap(b)},[b]),u.useEffect(()=>{typeof t<"u"&&g!==null&&g.setOptions(t)},[g,t]),u.useEffect(()=>{typeof n<"u"&&g!==null&&g.setDraggable(n)},[g,n]),u.useEffect(()=>{typeof s<"u"&&g!==null&&g.setEditable(s)},[g,s]),u.useEffect(()=>{typeof i<"u"&&g!==null&&g.setVisible(i)},[g,i]),u.useEffect(()=>{typeof r<"u"&&g!==null&&g.setBounds(r)},[g,r]),u.useEffect(()=>{g&&a&&(S!==null&&google.maps.event.removeListener(S),C(google.maps.event.addListener(g,"dblclick",a)))},[a]),u.useEffect(()=>{g&&o&&(_!==null&&google.maps.event.removeListener(_),M(google.maps.event.addListener(g,"dragend",o)))},[o]),u.useEffect(()=>{g&&c&&(D!==null&&google.maps.event.removeListener(D),F(google.maps.event.addListener(g,"dragstart",c)))},[c]),u.useEffect(()=>{g&&d&&(z!==null&&google.maps.event.removeListener(z),W(google.maps.event.addListener(g,"mousedown",d)))},[d]),u.useEffect(()=>{g&&f&&(G!==null&&google.maps.event.removeListener(G),$(google.maps.event.addListener(g,"mousemove",f)))},[f]),u.useEffect(()=>{g&&h&&(X!==null&&google.maps.event.removeListener(X),J(google.maps.event.addListener(g,"mouseout",h)))},[h]),u.useEffect(()=>{g&&p&&(le!==null&&google.maps.event.removeListener(le),re(google.maps.event.addListener(g,"mouseover",p)))},[p]),u.useEffect(()=>{g&&v&&(Q!==null&&google.maps.event.removeListener(Q),ee(google.maps.event.addListener(g,"mouseup",v)))},[v]),u.useEffect(()=>{g&&m&&(Y!==null&&google.maps.event.removeListener(Y),ce(google.maps.event.addListener(g,"rightclick",m)))},[m]),u.useEffect(()=>{g&&x&&(T!==null&&google.maps.event.removeListener(T),Se(google.maps.event.addListener(g,"click",x)))},[x]),u.useEffect(()=>{g&&y&&(be!==null&&google.maps.event.removeListener(be),te(google.maps.event.addListener(g,"drag",y)))},[y]),u.useEffect(()=>{g&&E&&(Ce!==null&&google.maps.event.removeListener(Ce),K(google.maps.event.addListener(g,"bounds_changed",E)))},[E]),u.useEffect(()=>{var ue=new google.maps.Rectangle(qs(qs({},t),{},{map:b}));return typeof i<"u"&&ue.setVisible(i),typeof s<"u"&&ue.setEditable(s),typeof n<"u"&&ue.setDraggable(n),typeof r<"u"&&ue.setBounds(r),a&&C(google.maps.event.addListener(ue,"dblclick",a)),o&&M(google.maps.event.addListener(ue,"dragend",o)),c&&F(google.maps.event.addListener(ue,"dragstart",c)),d&&W(google.maps.event.addListener(ue,"mousedown",d)),f&&$(google.maps.event.addListener(ue,"mousemove",f)),h&&J(google.maps.event.addListener(ue,"mouseout",h)),p&&re(google.maps.event.addListener(ue,"mouseover",p)),v&&ee(google.maps.event.addListener(ue,"mouseup",v)),m&&ce(google.maps.event.addListener(ue,"rightclick",m)),x&&Se(google.maps.event.addListener(ue,"click",x)),y&&te(google.maps.event.addListener(ue,"drag",y)),E&&K(google.maps.event.addListener(ue,"bounds_changed",E)),w(ue),k&&k(ue),()=>{S!==null&&google.maps.event.removeListener(S),_!==null&&google.maps.event.removeListener(_),D!==null&&google.maps.event.removeListener(D),z!==null&&google.maps.event.removeListener(z),G!==null&&google.maps.event.removeListener(G),X!==null&&google.maps.event.removeListener(X),le!==null&&google.maps.event.removeListener(le),Q!==null&&google.maps.event.removeListener(Q),Y!==null&&google.maps.event.removeListener(Y),T!==null&&google.maps.event.removeListener(T),be!==null&&google.maps.event.removeListener(be),Ce!==null&&google.maps.event.removeListener(Ce),O&&O(ue),ue.setMap(null)}},[]),null}u.memo(h0);class p0 extends u.PureComponent{constructor(){super(...arguments),j(this,"registeredEvents",[]),j(this,"state",{rectangle:null}),j(this,"setRectangleCallback",()=>{this.state.rectangle!==null&&this.props.onLoad&&this.props.onLoad(this.state.rectangle)})}componentDidMount(){var t=new google.maps.Rectangle(qs(qs({},this.props.options),{},{map:this.context}));this.registeredEvents=de({updaterMap:dc,eventMap:uc,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{rectangle:t}},this.setRectangleCallback)}componentDidUpdate(t){this.state.rectangle!==null&&(fe(this.registeredEvents),this.registeredEvents=de({updaterMap:dc,eventMap:uc,prevProps:t,nextProps:this.props,instance:this.state.rectangle}))}componentWillUnmount(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),fe(this.registeredEvents),this.state.rectangle.setMap(null))}render(){return null}}j(p0,"contextType",oe);function fc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Zs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fc(Object(r),!0).forEach(function(n){j(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var hc={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"},pc={center(e,t){e.setCenter(t)},draggable(e,t){e.setDraggable(t)},editable(e,t){e.setEditable(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},radius(e,t){e.setRadius(t)},visible(e,t){e.setVisible(t)}},m0={};function g0(e){var{options:t,center:r,radius:n,draggable:s,editable:i,visible:a,onDblClick:o,onDragEnd:c,onDragStart:d,onMouseDown:f,onMouseMove:h,onMouseOut:p,onMouseOver:v,onMouseUp:m,onRightClick:x,onClick:y,onDrag:E,onCenterChanged:k,onRadiusChanged:O,onLoad:b,onUnmount:g}=e,w=u.useContext(oe),[S,C]=u.useState(null),[_,M]=u.useState(null),[D,F]=u.useState(null),[z,W]=u.useState(null),[G,$]=u.useState(null),[X,J]=u.useState(null),[le,re]=u.useState(null),[Q,ee]=u.useState(null),[Y,ce]=u.useState(null),[T,Se]=u.useState(null),[be,te]=u.useState(null),[Ce,K]=u.useState(null),[ue,U]=u.useState(null),[Ve,st]=u.useState(null);return u.useEffect(()=>{S!==null&&S.setMap(w)},[w]),u.useEffect(()=>{typeof t<"u"&&S!==null&&S.setOptions(t)},[S,t]),u.useEffect(()=>{typeof s<"u"&&S!==null&&S.setDraggable(s)},[S,s]),u.useEffect(()=>{typeof i<"u"&&S!==null&&S.setEditable(i)},[S,i]),u.useEffect(()=>{typeof a<"u"&&S!==null&&S.setVisible(a)},[S,a]),u.useEffect(()=>{typeof n=="number"&&S!==null&&S.setRadius(n)},[S,n]),u.useEffect(()=>{typeof r<"u"&&S!==null&&S.setCenter(r)},[S,r]),u.useEffect(()=>{S&&o&&(_!==null&&google.maps.event.removeListener(_),M(google.maps.event.addListener(S,"dblclick",o)))},[o]),u.useEffect(()=>{S&&c&&(D!==null&&google.maps.event.removeListener(D),F(google.maps.event.addListener(S,"dragend",c)))},[c]),u.useEffect(()=>{S&&d&&(z!==null&&google.maps.event.removeListener(z),W(google.maps.event.addListener(S,"dragstart",d)))},[d]),u.useEffect(()=>{S&&f&&(G!==null&&google.maps.event.removeListener(G),$(google.maps.event.addListener(S,"mousedown",f)))},[f]),u.useEffect(()=>{S&&h&&(X!==null&&google.maps.event.removeListener(X),J(google.maps.event.addListener(S,"mousemove",h)))},[h]),u.useEffect(()=>{S&&p&&(le!==null&&google.maps.event.removeListener(le),re(google.maps.event.addListener(S,"mouseout",p)))},[p]),u.useEffect(()=>{S&&v&&(Q!==null&&google.maps.event.removeListener(Q),ee(google.maps.event.addListener(S,"mouseover",v)))},[v]),u.useEffect(()=>{S&&m&&(Y!==null&&google.maps.event.removeListener(Y),ce(google.maps.event.addListener(S,"mouseup",m)))},[m]),u.useEffect(()=>{S&&x&&(T!==null&&google.maps.event.removeListener(T),Se(google.maps.event.addListener(S,"rightclick",x)))},[x]),u.useEffect(()=>{S&&y&&(be!==null&&google.maps.event.removeListener(be),te(google.maps.event.addListener(S,"click",y)))},[y]),u.useEffect(()=>{S&&E&&(Ce!==null&&google.maps.event.removeListener(Ce),K(google.maps.event.addListener(S,"drag",E)))},[E]),u.useEffect(()=>{S&&k&&(ue!==null&&google.maps.event.removeListener(ue),U(google.maps.event.addListener(S,"center_changed",k)))},[y]),u.useEffect(()=>{S&&O&&(Ve!==null&&google.maps.event.removeListener(Ve),st(google.maps.event.addListener(S,"radius_changed",O)))},[O]),u.useEffect(()=>{var ge=new google.maps.Circle(Zs(Zs({},t||m0),{},{map:w}));return typeof n=="number"&&ge.setRadius(n),typeof r<"u"&&ge.setCenter(r),typeof n=="number"&&ge.setRadius(n),typeof a<"u"&&ge.setVisible(a),typeof i<"u"&&ge.setEditable(i),typeof s<"u"&&ge.setDraggable(s),o&&M(google.maps.event.addListener(ge,"dblclick",o)),c&&F(google.maps.event.addListener(ge,"dragend",c)),d&&W(google.maps.event.addListener(ge,"dragstart",d)),f&&$(google.maps.event.addListener(ge,"mousedown",f)),h&&J(google.maps.event.addListener(ge,"mousemove",h)),p&&re(google.maps.event.addListener(ge,"mouseout",p)),v&&ee(google.maps.event.addListener(ge,"mouseover",v)),m&&ce(google.maps.event.addListener(ge,"mouseup",m)),x&&Se(google.maps.event.addListener(ge,"rightclick",x)),y&&te(google.maps.event.addListener(ge,"click",y)),E&&K(google.maps.event.addListener(ge,"drag",E)),k&&U(google.maps.event.addListener(ge,"center_changed",k)),O&&st(google.maps.event.addListener(ge,"radius_changed",O)),C(ge),b&&b(ge),()=>{_!==null&&google.maps.event.removeListener(_),D!==null&&google.maps.event.removeListener(D),z!==null&&google.maps.event.removeListener(z),G!==null&&google.maps.event.removeListener(G),X!==null&&google.maps.event.removeListener(X),le!==null&&google.maps.event.removeListener(le),Q!==null&&google.maps.event.removeListener(Q),Y!==null&&google.maps.event.removeListener(Y),T!==null&&google.maps.event.removeListener(T),be!==null&&google.maps.event.removeListener(be),ue!==null&&google.maps.event.removeListener(ue),Ve!==null&&google.maps.event.removeListener(Ve),g&&g(ge),ge.setMap(null)}},[]),null}u.memo(g0);class v0 extends u.PureComponent{constructor(){super(...arguments),j(this,"registeredEvents",[]),j(this,"state",{circle:null}),j(this,"setCircleCallback",()=>{this.state.circle!==null&&this.props.onLoad&&this.props.onLoad(this.state.circle)})}componentDidMount(){var t=new google.maps.Circle(Zs(Zs({},this.props.options),{},{map:this.context}));this.registeredEvents=de({updaterMap:pc,eventMap:hc,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{circle:t}},this.setCircleCallback)}componentDidUpdate(t){this.state.circle!==null&&(fe(this.registeredEvents),this.registeredEvents=de({updaterMap:pc,eventMap:hc,prevProps:t,nextProps:this.props,instance:this.state.circle}))}componentWillUnmount(){if(this.state.circle!==null){var t;this.props.onUnmount&&this.props.onUnmount(this.state.circle),fe(this.registeredEvents),(t=this.state.circle)===null||t===void 0||t.setMap(null)}}render(){return null}}j(v0,"contextType",oe);function mc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Ks(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mc(Object(r),!0).forEach(function(n){j(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var gc={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},vc={add(e,t){e.add(t)},addgeojson(e,t,r){e.addGeoJson(t,r)},contains(e,t){e.contains(t)},foreach(e,t){e.forEach(t)},loadgeojson(e,t,r,n){e.loadGeoJson(t,r,n)},overridestyle(e,t,r){e.overrideStyle(t,r)},remove(e,t){e.remove(t)},revertstyle(e,t){e.revertStyle(t)},controlposition(e,t){e.setControlPosition(t)},controls(e,t){e.setControls(t)},drawingmode(e,t){e.setDrawingMode(t)},map(e,t){e.setMap(t)},style(e,t){e.setStyle(t)},togeojson(e,t){e.toGeoJson(t)}};function y0(e){var{options:t,onClick:r,onDblClick:n,onMouseDown:s,onMouseMove:i,onMouseOut:a,onMouseOver:o,onMouseUp:c,onRightClick:d,onAddFeature:f,onRemoveFeature:h,onRemoveProperty:p,onSetGeometry:v,onSetProperty:m,onLoad:x,onUnmount:y}=e,E=u.useContext(oe),[k,O]=u.useState(null),[b,g]=u.useState(null),[w,S]=u.useState(null),[C,_]=u.useState(null),[M,D]=u.useState(null),[F,z]=u.useState(null),[W,G]=u.useState(null),[$,X]=u.useState(null),[J,le]=u.useState(null),[re,Q]=u.useState(null),[ee,Y]=u.useState(null),[ce,T]=u.useState(null),[Se,be]=u.useState(null),[te,Ce]=u.useState(null);return u.useEffect(()=>{k!==null&&k.setMap(E)},[E]),u.useEffect(()=>{k&&n&&(b!==null&&google.maps.event.removeListener(b),g(google.maps.event.addListener(k,"dblclick",n)))},[n]),u.useEffect(()=>{k&&s&&(w!==null&&google.maps.event.removeListener(w),S(google.maps.event.addListener(k,"mousedown",s)))},[s]),u.useEffect(()=>{k&&i&&(C!==null&&google.maps.event.removeListener(C),_(google.maps.event.addListener(k,"mousemove",i)))},[i]),u.useEffect(()=>{k&&a&&(M!==null&&google.maps.event.removeListener(M),D(google.maps.event.addListener(k,"mouseout",a)))},[a]),u.useEffect(()=>{k&&o&&(F!==null&&google.maps.event.removeListener(F),z(google.maps.event.addListener(k,"mouseover",o)))},[o]),u.useEffect(()=>{k&&c&&(W!==null&&google.maps.event.removeListener(W),G(google.maps.event.addListener(k,"mouseup",c)))},[c]),u.useEffect(()=>{k&&d&&($!==null&&google.maps.event.removeListener($),X(google.maps.event.addListener(k,"rightclick",d)))},[d]),u.useEffect(()=>{k&&r&&(J!==null&&google.maps.event.removeListener(J),le(google.maps.event.addListener(k,"click",r)))},[r]),u.useEffect(()=>{k&&f&&(re!==null&&google.maps.event.removeListener(re),Q(google.maps.event.addListener(k,"addfeature",f)))},[f]),u.useEffect(()=>{k&&h&&(ee!==null&&google.maps.event.removeListener(ee),Y(google.maps.event.addListener(k,"removefeature",h)))},[h]),u.useEffect(()=>{k&&p&&(ce!==null&&google.maps.event.removeListener(ce),T(google.maps.event.addListener(k,"removeproperty",p)))},[p]),u.useEffect(()=>{k&&v&&(Se!==null&&google.maps.event.removeListener(Se),be(google.maps.event.addListener(k,"setgeometry",v)))},[v]),u.useEffect(()=>{k&&m&&(te!==null&&google.maps.event.removeListener(te),Ce(google.maps.event.addListener(k,"setproperty",m)))},[m]),u.useEffect(()=>{if(E!==null){var K=new google.maps.Data(Ks(Ks({},t),{},{map:E}));n&&g(google.maps.event.addListener(K,"dblclick",n)),s&&S(google.maps.event.addListener(K,"mousedown",s)),i&&_(google.maps.event.addListener(K,"mousemove",i)),a&&D(google.maps.event.addListener(K,"mouseout",a)),o&&z(google.maps.event.addListener(K,"mouseover",o)),c&&G(google.maps.event.addListener(K,"mouseup",c)),d&&X(google.maps.event.addListener(K,"rightclick",d)),r&&le(google.maps.event.addListener(K,"click",r)),f&&Q(google.maps.event.addListener(K,"addfeature",f)),h&&Y(google.maps.event.addListener(K,"removefeature",h)),p&&T(google.maps.event.addListener(K,"removeproperty",p)),v&&be(google.maps.event.addListener(K,"setgeometry",v)),m&&Ce(google.maps.event.addListener(K,"setproperty",m)),O(K),x&&x(K)}return()=>{k&&(b!==null&&google.maps.event.removeListener(b),w!==null&&google.maps.event.removeListener(w),C!==null&&google.maps.event.removeListener(C),M!==null&&google.maps.event.removeListener(M),F!==null&&google.maps.event.removeListener(F),W!==null&&google.maps.event.removeListener(W),$!==null&&google.maps.event.removeListener($),J!==null&&google.maps.event.removeListener(J),re!==null&&google.maps.event.removeListener(re),ee!==null&&google.maps.event.removeListener(ee),ce!==null&&google.maps.event.removeListener(ce),Se!==null&&google.maps.event.removeListener(Se),te!==null&&google.maps.event.removeListener(te),y&&y(k),k.setMap(null))}},[]),null}u.memo(y0);class x0 extends u.PureComponent{constructor(){super(...arguments),j(this,"registeredEvents",[]),j(this,"state",{data:null}),j(this,"setDataCallback",()=>{this.state.data!==null&&this.props.onLoad&&this.props.onLoad(this.state.data)})}componentDidMount(){if(this.context!==null){var t=new google.maps.Data(Ks(Ks({},this.props.options),{},{map:this.context}));this.registeredEvents=de({updaterMap:vc,eventMap:gc,prevProps:{},nextProps:this.props,instance:t}),this.setState(()=>({data:t}),this.setDataCallback)}}componentDidUpdate(t){this.state.data!==null&&(fe(this.registeredEvents),this.registeredEvents=de({updaterMap:vc,eventMap:gc,prevProps:t,nextProps:this.props,instance:this.state.data}))}componentWillUnmount(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),fe(this.registeredEvents),this.state.data&&this.state.data.setMap(null))}render(){return null}}j(x0,"contextType",oe);function yc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function xc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yc(Object(r),!0).forEach(function(n){j(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var bc={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},wc={options(e,t){e.setOptions(t)},url(e,t){e.setUrl(t)},zIndex(e,t){e.setZIndex(t)}};class b0 extends u.PureComponent{constructor(){super(...arguments),j(this,"registeredEvents",[]),j(this,"state",{kmlLayer:null}),j(this,"setKmlLayerCallback",()=>{this.state.kmlLayer!==null&&this.props.onLoad&&this.props.onLoad(this.state.kmlLayer)})}componentDidMount(){var t=new google.maps.KmlLayer(xc(xc({},this.props.options),{},{map:this.context}));this.registeredEvents=de({updaterMap:wc,eventMap:bc,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{kmlLayer:t}},this.setKmlLayerCallback)}componentDidUpdate(t){this.state.kmlLayer!==null&&(fe(this.registeredEvents),this.registeredEvents=de({updaterMap:wc,eventMap:bc,prevProps:t,nextProps:this.props,instance:this.state.kmlLayer}))}componentWillUnmount(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),fe(this.registeredEvents),this.state.kmlLayer.setMap(null))}render(){return null}}j(b0,"contextType",oe);function Yd(e,t){return typeof t=="function"?t(e.offsetWidth,e.offsetHeight):{x:0,y:0}}function w0(e,t){return new t(e.lat,e.lng)}function E0(e,t){return new t(new google.maps.LatLng(e.ne.lat,e.ne.lng),new google.maps.LatLng(e.sw.lat,e.sw.lng))}function S0(e,t,r){return e instanceof t?e:r(e,t)}function k0(e,t,r){return e instanceof t?e:r(e,t)}function O0(e,t,r){var n=e&&e.fromLatLngToDivPixel(r.getNorthEast()),s=e&&e.fromLatLngToDivPixel(r.getSouthWest());return n&&s?{left:"".concat(s.x+t.x,"px"),top:"".concat(n.y+t.y,"px"),width:"".concat(n.x-s.x-t.x,"px"),height:"".concat(s.y-n.y-t.y,"px")}:{left:"-9999px",top:"-9999px"}}function _0(e,t,r){var n=e&&e.fromLatLngToDivPixel(r);if(n){var{x:s,y:i}=n;return{left:"".concat(s+t.x,"px"),top:"".concat(i+t.y,"px")}}return{left:"-9999px",top:"-9999px"}}function Hd(e,t,r,n){return r!==void 0?O0(e,t,k0(r,google.maps.LatLngBounds,E0)):_0(e,t,S0(n,google.maps.LatLng,w0))}function C0(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.height&&e.height===t.height}function Ec(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function L0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ec(Object(r),!0).forEach(function(n){j(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ec(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function N0(e,t,r,n,s){class i extends google.maps.OverlayView{constructor(o,c,d,f){super(),this.container=o,this.pane=c,this.position=d,this.bounds=f}onAdd(){var o,c=(o=this.getPanes())===null||o===void 0?void 0:o[this.pane];c?.appendChild(this.container)}draw(){var o=this.getProjection(),c=L0({},this.container?Yd(this.container,s):{x:0,y:0}),d=Hd(o,c,this.bounds,this.position);for(var[f,h]of Object.entries(d))this.container.style[f]=h}onRemove(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)}}return new i(e,t,r,n)}function Sc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function j0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Sc(Object(r),!0).forEach(function(n){j(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kc(e){if(!e)return"";var t=e instanceof google.maps.LatLng?e:new google.maps.LatLng(e.lat,e.lng);return t+""}function Oc(e){if(!e)return"";var t=e instanceof google.maps.LatLngBounds?e:new google.maps.LatLngBounds(new google.maps.LatLng(e.south,e.east),new google.maps.LatLng(e.north,e.west));return t+""}function M0(e){var{position:t,bounds:r,mapPaneName:n,zIndex:s,onLoad:i,onUnmount:a,getPixelPositionOffset:o,children:c}=e,d=u.useContext(oe),f=u.useMemo(()=>{var p=document.createElement("div");return p.style.position="absolute",p},[]),h=u.useMemo(()=>N0(f,n,t,r,o),[f,n,t,r]);return u.useEffect(()=>(i?.(h),h?.setMap(d),()=>{a?.(h),h?.setMap(null)}),[d,h]),u.useEffect(()=>{f.style.zIndex="".concat(s)},[s,f]),pd.createPortal(c,f)}u.memo(M0);class nn extends u.PureComponent{constructor(t){super(t),j(this,"state",{paneEl:null,containerStyle:{position:"absolute"}}),j(this,"updatePane",()=>{var n=this.props.mapPaneName,s=this.overlayView.getPanes();Fe(!!n,"OverlayView requires props.mapPaneName but got %s",n),s?this.setState({paneEl:s[n]}):this.setState({paneEl:null})}),j(this,"onAdd",()=>{var n,s;this.updatePane(),(n=(s=this.props).onLoad)===null||n===void 0||n.call(s,this.overlayView)}),j(this,"onPositionElement",()=>{var n=this.overlayView.getProjection(),s=j0({x:0,y:0},this.containerRef.current?Yd(this.containerRef.current,this.props.getPixelPositionOffset):{}),i=Hd(n,s,this.props.bounds,this.props.position);if(!C0(i,{left:this.state.containerStyle.left,top:this.state.containerStyle.top,width:this.state.containerStyle.width,height:this.state.containerStyle.height})){var a,o,c,d;this.setState({containerStyle:{top:(a=i.top)!==null&&a!==void 0?a:0,left:(o=i.left)!==null&&o!==void 0?o:0,width:(c=i.width)!==null&&c!==void 0?c:0,height:(d=i.height)!==null&&d!==void 0?d:0,position:"absolute"}})}}),j(this,"draw",()=>{this.onPositionElement()}),j(this,"onRemove",()=>{var n,s;this.setState(()=>({paneEl:null})),(n=(s=this.props).onUnmount)===null||n===void 0||n.call(s,this.overlayView)}),this.containerRef=u.createRef();var r=new google.maps.OverlayView;r.onAdd=this.onAdd,r.draw=this.draw,r.onRemove=this.onRemove,this.overlayView=r}componentDidMount(){this.overlayView.setMap(this.context)}componentDidUpdate(t){var r=kc(t.position),n=kc(this.props.position),s=Oc(t.bounds),i=Oc(this.props.bounds);(r!==n||s!==i)&&this.overlayView.draw(),t.mapPaneName!==this.props.mapPaneName&&this.updatePane()}componentWillUnmount(){this.overlayView.setMap(null)}render(){var t=this.state.paneEl;return t?pd.createPortal(l.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:u.Children.only(this.props.children)}),t):null}}j(nn,"FLOAT_PANE","floatPane");j(nn,"MAP_PANE","mapPane");j(nn,"MARKER_LAYER","markerLayer");j(nn,"OVERLAY_LAYER","overlayLayer");j(nn,"OVERLAY_MOUSE_TARGET","overlayMouseTarget");j(nn,"contextType",oe);function T0(){}function _c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Cc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_c(Object(r),!0).forEach(function(n){j(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_c(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Lc={onDblClick:"dblclick",onClick:"click"},Nc={opacity(e,t){e.setOpacity(t)}};function D0(e){var{url:t,bounds:r,options:n,visible:s}=e,i=u.useContext(oe),a=new google.maps.LatLngBounds(new google.maps.LatLng(r.south,r.west),new google.maps.LatLng(r.north,r.east)),o=u.useMemo(()=>new google.maps.GroundOverlay(t,a,n),[]);return u.useEffect(()=>{o!==null&&o.setMap(i)},[i]),u.useEffect(()=>{typeof t<"u"&&o!==null&&(o.set("url",t),o.setMap(i))},[o,t]),u.useEffect(()=>{typeof s<"u"&&o!==null&&o.setOpacity(s?1:0)},[o,s]),u.useEffect(()=>{var c=new google.maps.LatLngBounds(new google.maps.LatLng(r.south,r.west),new google.maps.LatLng(r.north,r.east));typeof r<"u"&&o!==null&&(o.set("bounds",c),o.setMap(i))},[o,r]),null}u.memo(D0);class Gd extends u.PureComponent{constructor(){super(...arguments),j(this,"registeredEvents",[]),j(this,"state",{groundOverlay:null}),j(this,"setGroundOverlayCallback",()=>{this.state.groundOverlay!==null&&this.props.onLoad&&this.props.onLoad(this.state.groundOverlay)})}componentDidMount(){Fe(!!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 t=new google.maps.GroundOverlay(this.props.url,this.props.bounds,Cc(Cc({},this.props.options),{},{map:this.context}));this.registeredEvents=de({updaterMap:Nc,eventMap:Lc,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{groundOverlay:t}},this.setGroundOverlayCallback)}componentDidUpdate(t){this.state.groundOverlay!==null&&(fe(this.registeredEvents),this.registeredEvents=de({updaterMap:Nc,eventMap:Lc,prevProps:t,nextProps:this.props,instance:this.state.groundOverlay}))}componentWillUnmount(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))}render(){return null}}j(Gd,"defaultProps",{onLoad:T0});j(Gd,"contextType",oe);function jc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Js(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jc(Object(r),!0).forEach(function(n){j(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Mc={},Tc={data(e,t){e.setData(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)}};function P0(e){var{data:t,onLoad:r,onUnmount:n,options:s}=e,i=u.useContext(oe),[a,o]=u.useState(null);return u.useEffect(()=>{google.maps.visualization||Fe(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),u.useEffect(()=>{Fe(!!t,"data property is required in HeatmapLayer %s",t)},[t]),u.useEffect(()=>{a!==null&&a.setMap(i)},[i]),u.useEffect(()=>{s&&a!==null&&a.setOptions(s)},[a,s]),u.useEffect(()=>{var c=new google.maps.visualization.HeatmapLayer(Js(Js({},s),{},{data:t,map:i}));return o(c),r&&r(c),()=>{a!==null&&(n&&n(a),a.setMap(null))}},[]),null}u.memo(P0);class A0 extends u.PureComponent{constructor(){super(...arguments),j(this,"registeredEvents",[]),j(this,"state",{heatmapLayer:null}),j(this,"setHeatmapLayerCallback",()=>{this.state.heatmapLayer!==null&&this.props.onLoad&&this.props.onLoad(this.state.heatmapLayer)})}componentDidMount(){Fe(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),Fe(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var t=new google.maps.visualization.HeatmapLayer(Js(Js({},this.props.options),{},{data:this.props.data,map:this.context}));this.registeredEvents=de({updaterMap:Tc,eventMap:Mc,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{heatmapLayer:t}},this.setHeatmapLayerCallback)}componentDidUpdate(t){fe(this.registeredEvents),this.registeredEvents=de({updaterMap:Tc,eventMap:Mc,prevProps:t,nextProps:this.props,instance:this.state.heatmapLayer})}componentWillUnmount(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),fe(this.registeredEvents),this.state.heatmapLayer.setMap(null))}render(){return null}}j(A0,"contextType",oe);var Dc={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},Pc={register(e,t,r){e.registerPanoProvider(t,r)},links(e,t){e.setLinks(t)},motionTracking(e,t){e.setMotionTracking(t)},options(e,t){e.setOptions(t)},pano(e,t){e.setPano(t)},position(e,t){e.setPosition(t)},pov(e,t){e.setPov(t)},visible(e,t){e.setVisible(t)},zoom(e,t){e.setZoom(t)}};class R0 extends u.PureComponent{constructor(){super(...arguments),j(this,"registeredEvents",[]),j(this,"state",{streetViewPanorama:null}),j(this,"setStreetViewPanoramaCallback",()=>{this.state.streetViewPanorama!==null&&this.props.onLoad&&this.props.onLoad(this.state.streetViewPanorama)})}componentDidMount(){var t,r,n=(t=(r=this.context)===null||r===void 0?void 0:r.getStreetView())!==null&&t!==void 0?t:null;this.registeredEvents=de({updaterMap:Pc,eventMap:Dc,prevProps:{},nextProps:this.props,instance:n}),this.setState(()=>({streetViewPanorama:n}),this.setStreetViewPanoramaCallback)}componentDidUpdate(t){this.state.streetViewPanorama!==null&&(fe(this.registeredEvents),this.registeredEvents=de({updaterMap:Pc,eventMap:Dc,prevProps:t,nextProps:this.props,instance:this.state.streetViewPanorama}))}componentWillUnmount(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),fe(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))}render(){return null}}j(R0,"contextType",oe);class I0 extends u.PureComponent{constructor(){super(...arguments),j(this,"state",{streetViewService:null}),j(this,"setStreetViewServiceCallback",()=>{this.state.streetViewService!==null&&this.props.onLoad&&this.props.onLoad(this.state.streetViewService)})}componentDidMount(){var t=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:t}},this.setStreetViewServiceCallback)}componentWillUnmount(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)}render(){return null}}j(I0,"contextType",oe);var Ac={onDirectionsChanged:"directions_changed"},Rc={directions(e,t){e.setDirections(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},panel(e,t){e.setPanel(t)},routeIndex(e,t){e.setRouteIndex(t)}};class F0 extends u.PureComponent{constructor(){super(...arguments),j(this,"registeredEvents",[]),j(this,"state",{directionsRenderer:null}),j(this,"setDirectionsRendererCallback",()=>{this.state.directionsRenderer!==null&&(this.state.directionsRenderer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.directionsRenderer))})}componentDidMount(){var t=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=de({updaterMap:Rc,eventMap:Ac,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{directionsRenderer:t}},this.setDirectionsRendererCallback)}componentDidUpdate(t){this.state.directionsRenderer!==null&&(fe(this.registeredEvents),this.registeredEvents=de({updaterMap:Rc,eventMap:Ac,prevProps:t,nextProps:this.props,instance:this.state.directionsRenderer}))}componentWillUnmount(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),fe(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))}render(){return null}}j(F0,"contextType",oe);var Ic={onPlacesChanged:"places_changed"},Fc={bounds(e,t){e.setBounds(t)}};class $0 extends u.PureComponent{constructor(){super(...arguments),j(this,"registeredEvents",[]),j(this,"containerElement",u.createRef()),j(this,"state",{searchBox:null}),j(this,"setSearchBoxCallback",()=>{this.state.searchBox!==null&&this.props.onLoad&&this.props.onLoad(this.state.searchBox)})}componentDidMount(){if(Fe(!!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 t=this.containerElement.current.querySelector("input");if(t!==null){var r=new google.maps.places.SearchBox(t,this.props.options);this.registeredEvents=de({updaterMap:Fc,eventMap:Ic,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}}componentDidUpdate(t){this.state.searchBox!==null&&(fe(this.registeredEvents),this.registeredEvents=de({updaterMap:Fc,eventMap:Ic,prevProps:t,nextProps:this.props,instance:this.state.searchBox}))}componentWillUnmount(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),fe(this.registeredEvents))}render(){return l.jsx("div",{ref:this.containerElement,children:u.Children.only(this.props.children)})}}j($0,"contextType",oe);var $c={onPlaceChanged:"place_changed"},Uc={bounds(e,t){e.setBounds(t)},restrictions(e,t){e.setComponentRestrictions(t)},fields(e,t){e.setFields(t)},options(e,t){e.setOptions(t)},types(e,t){e.setTypes(t)}};class qd extends u.PureComponent{constructor(){super(...arguments),j(this,"registeredEvents",[]),j(this,"containerElement",u.createRef()),j(this,"state",{autocomplete:null}),j(this,"setAutocompleteCallback",()=>{this.state.autocomplete!==null&&this.props.onLoad&&this.props.onLoad(this.state.autocomplete)})}componentDidMount(){var t;Fe(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var r=(t=this.containerElement.current)===null||t===void 0?void 0:t.querySelector("input");if(r){var n=new google.maps.places.Autocomplete(r,this.props.options);this.registeredEvents=de({updaterMap:Uc,eventMap:$c,prevProps:{},nextProps:this.props,instance:n}),this.setState(()=>({autocomplete:n}),this.setAutocompleteCallback)}}componentDidUpdate(t){fe(this.registeredEvents),this.registeredEvents=de({updaterMap:Uc,eventMap:$c,prevProps:t,nextProps:this.props,instance:this.state.autocomplete})}componentWillUnmount(){this.state.autocomplete!==null&&fe(this.registeredEvents)}render(){return l.jsx("div",{ref:this.containerElement,className:this.props.className,children:u.Children.only(this.props.children)})}}j(qd,"defaultProps",{className:""});j(qd,"contextType",oe);const rt=({children:e,className:t,...r})=>l.jsx(so,{className:A("bg-indigo-600 border-indigo-600 hover:bg-indigo-500 text-white focus-visible:outline-indigo-500 active:bg-indigo-700 transition-all duration-150 dark:bg-indigo-700 dark:border-indigo-700 dark:hover:bg-indigo-600 dark:text-gray-100 dark:active:bg-indigo-800",t),...r,children:e});function Zd(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"10",r:"3"},child:[]}]})(e)}function U0(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"3 6 5 6 21 6"},child:[]},{tag:"path",attr:{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"},child:[]}]})(e)}function V0(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"16 16 12 12 8 16"},child:[]},{tag:"line",attr:{x1:"12",y1:"12",x2:"12",y2:"21"},child:[]},{tag:"path",attr:{d:"M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"},child:[]},{tag:"polyline",attr:{points:"16 16 12 12 8 16"},child:[]}]})(e)}function Kd(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"},child:[]},{tag:"polyline",attr:{points:"17 8 12 3 7 8"},child:[]},{tag:"line",attr:{x1:"12",y1:"3",x2:"12",y2:"15"},child:[]}]})(e)}const Ae=({children:e,className:t,...r})=>l.jsx("a",{className:A("text-indigo-600 hover:underline hover:text-indigo-500 cursor-pointer transition-all duration-150 dark:text-indigo-400 dark:hover:text-indigo-300",t),...r,children:e}),ms=["#00559e","#e11d48","#f59e42","#22c55e","#a21caf","#fbbf24","#0ea5e9","#64748b"],Jd=({coordinates:e,wrapperClassName:t})=>{const{isLoaded:r,loadError:n}=oo({googleMapsApiKey:"AIzaSyD0g8yZAA0ZaqaLsrRkGmDQdFbhCEAPdYs",libraries:["places"]}),[s,i]=u.useState([]),[a,o]=u.useState({lat:0,lng:0}),c=u.useRef(null),d=u.useCallback(()=>{if(!(!c.current||e.length===0))if(e.length===1)o(e[0]),c.current.setZoom(16);else{const h=new window.google.maps.LatLngBounds;e.forEach(p=>h.extend(p)),c.current.fitBounds(h)}},[e]),f=h=>encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' width='32' height='48' viewBox='0 0 32 48' fill='none'><path d='M16 0C7.163 0 0 7.163 0 16c0 11.046 16 32 16 32s16-20.954 16-32C32 7.163 24.837 0 16 0z' fill='${h}'/><circle cx='16' cy='16' r='7' fill='white'/></svg>`);return u.useEffect(()=>{d()},[d]),u.useEffect(()=>{if(!r||e.length===0)return;const h=new window.google.maps.Geocoder;Promise.all(e.map(p=>new Promise(v=>{h.geocode({location:p},(m,x)=>{x===window.google.maps.GeocoderStatus.OK&&m&&m[0]?v(m[0].formatted_address):v("")})}))).then(i)},[r,e]),n?l.jsx("div",{children:"Error loading Google Maps."}):r?l.jsxs("div",{className:A("relative flex flex-1 flex-col w-full h-full gap-2",t),children:[l.jsx(Pd,{mapContainerStyle:{height:"100%",width:"100%"},zoom:16,center:a,onLoad:h=>{c.current=h,setTimeout(()=>d(),300)},options:{disableDefaultUI:!0,draggable:!0,zoomControl:!0,scrollwheel:!0,disableDoubleClickZoom:!0},children:e.map((h,p)=>{const v=ms[p%ms.length];return l.jsx($d,{position:h,icon:{url:`data:image/svg+xml;charset=UTF-8,${f(v)}`,scaledSize:new window.google.maps.Size(32,48),anchor:new window.google.maps.Point(16,48)}},p)})}),l.jsx(rt,{type:"button",className:A("absolute top-2 right-2",!r&&"hidden"),onClick:d,children:"Centrar"}),e.length>0&&l.jsx("div",{className:"mt-2 space-y-1",children:e.map((h,p)=>l.jsxs("div",{className:"text-xs",children:[l.jsxs(Ae,{onClick:()=>{if(!c.current)return null;o(h),c.current.setZoom(16)},children:[l.jsx(Zd,{color:ms[p%ms.length],className:"w-4 h-4 mr-2 inline"}),l.jsxs("span",{className:"font-semibold text-indigo-600 dark:text-indigo-400",children:[h.name||`Punto ${p+1}`,":"]})]}),s[p]&&l.jsx("span",{className:"ml-2 text-gray-500",children:s[p]})]},p))})]}):l.jsx("div",{className:"flex flex-col items-center justify-center w-full h-64",children:"Loading map..."})};function z0(e){return H({attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{opacity:"0.2",fillRule:"evenodd",clipRule:"evenodd",d:"M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",fill:"currentColor"},child:[]},{tag:"path",attr:{d:"M2 12C2 6.47715 6.47715 2 12 2V5C8.13401 5 5 8.13401 5 12H2Z",fill:"currentColor"},child:[]}]})(e)}const gi=({className:e,wrapperClassName:t})=>l.jsx("div",{className:A("px-4 py-2 flex justify-center items-center text-indigo-600 dark:text-indigo-400",t),children:l.jsx(z0,{className:A("animate-spin h-5 w-5",e)})}),Xs=({open:e,onClose:t,className:r,children:n})=>{const s=u.useRef(null),[i,a]=u.useState(e),[o,c]=u.useState(!1);return u.useEffect(()=>{if(e)a(!0),setTimeout(()=>c(!0),10);else if(i){c(!1);const d=setTimeout(()=>a(!1),250);return()=>clearTimeout(d)}},[e,i]),u.useEffect(()=>{if(!i)return;const d=h=>{s.current&&!s.current.contains(h.target)&&t?.()},f=h=>{h.key==="Escape"&&t?.()};return document.addEventListener("mousedown",d),document.addEventListener("keydown",f),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",f)}},[i,t]),i?rn.createPortal(l.jsx("div",{className:A("fixed inset-0 z-[1100] flex items-center justify-center transition-colors duration-250",o?"bg-black/50":"bg-black/0"),style:{},role:"dialog","aria-modal":"true",children:l.jsxs("div",{ref:s,className:A("bg-white dark:bg-gray-800 dark:text-gray-100 shadow-2xl rounded-lg p-6 min-w-[320px] max-w-[90vw] max-h-[90vh] overflow-auto transition-all duration-250 relative scale-100",o?"opacity-100":"opacity-0 pointer-events-none",r),style:{transitionProperty:"opacity, transform"},children:[l.jsx("button",{type:"button","aria-label":"Cerrar",onClick:t,className:"absolute top-2 right-2 text-gray-500 hover:text-indigo-600 dark:text-gray-400 dark:hover:text-indigo-400 text-lg font-bold bg-transparent border-none p-1 cursor-pointer",style:{lineHeight:1},children:"✕"}),n]})}),document.body):null},Xd=({open:e,anchorEl:t,onClose:r,className:n,children:s,placement:i="bottom"})=>{const a=u.useRef(null),[o,c]=u.useState({}),[d,f]=u.useState(!1);return u.useEffect(()=>{if(!e||!t)return;const h=a.current;if(!h)return;const p=t.getBoundingClientRect();let v=0,m=0;switch(i){case"top":v=p.top-h.offsetHeight,m=p.left;break;case"bottom":v=p.bottom,m=p.left;break;case"left":v=p.top,m=p.left-h.offsetWidth;break;case"right":v=p.top,m=p.right;break;default:v=p.bottom,m=p.left;break}c({position:"absolute",top:`${v+window.scrollY}px`,left:`${m+window.scrollX}px`,zIndex:1e3,visibility:"visible",opacity:1}),f(!0)},[e,t,i]),u.useEffect(()=>{if(!e)return;const h=p=>{a.current&&!a.current.contains(p.target)&&t&&!t.contains(p.target)&&r?.()};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[e,r,t]),e?l.jsx("div",{ref:a,className:A("bg-white dark:bg-gray-800 dark:text-gray-100 shadow-[0_0_15px_3px_rgba(0,0,0,0.3)] rounded p-4 min-w-[180px]",n),style:d?o:{position:"absolute",visibility:"hidden",opacity:0,left:0,top:0},role:"dialog","aria-modal":"true",children:s}):null},B0=({options:e,selected:t,onSelect:r,anchorEl:n,open:s,onClose:i,className:a,renderOption:o})=>l.jsx(Xd,{open:s,anchorEl:n,onClose:i,className:A("!p-0 !border-0",a),children:l.jsx("ul",{className:"min-w-[180px] py-1",children:e.map(c=>l.jsxs("li",{onClick:()=>{r(c),i()},className:A("px-4 py-2 cursor-pointer hover:bg-indigo-600 hover:text-white flex items-center gap-2 dark:hover:bg-indigo-700 dark:hover:text-gray-100",t?.id===c.id?"bg-indigo-100 text-indigo-700 dark:bg-indigo-800 dark:text-indigo-200":"bg-white text-gray-800 dark:bg-gray-800 dark:text-gray-100"),children:[c.icon&&l.jsx("span",{children:c.icon}),o?o(c):c.label]},c.id))})}),Tn=({children:e,className:t,...r})=>l.jsx(so,{className:A("bg-transparent hover:bg-gray-400/10 focus-visible:outline-indigo-500 text-indigo-600 active:bg-gray-400/20 transition-all duration-150 dark:text-indigo-300 dark:hover:bg-gray-700/30 dark:active:bg-gray-700/50",t),...r,children:e}),Kr=({className:e,wrapperClassName:t,vertical:r=!1,...n})=>l.jsx("div",{className:A("flex justify-center items-center w-full",t),...n,children:l.jsx("div",{className:A(r?"h-8 w-px bg-gray-300 dark:bg-gray-700":"h-px w-full bg-gray-300 dark:bg-gray-700",e)})}),W0=({className:e,disabled:t,checked:r,...n})=>l.jsxs("label",{className:A("inline-flex items-center cursor-pointer",t?"pointer-events-none opacity-50":"",e),children:[l.jsx("input",{type:"checkbox",className:"sr-only",disabled:t,checked:r,...n}),l.jsx("span",{className:A("w-10 h-6 flex items-center bg-gray-300 rounded-full p-1 transition-colors dark:bg-gray-700",r?"bg-indigo-600 dark:bg-indigo-500":"",t?"bg-gray-200 dark:bg-gray-800":""),children:l.jsx("span",{className:A("bg-white dark:bg-gray-100 w-4 h-4 rounded-full shadow-md transform transition-transform",r?"translate-x-4":"translate-x-0")})})]}),vi=({className:e,wrapperClassName:t,children:r,...n})=>l.jsx("div",{className:A("border border-gray-300 dark:border-gray-700 text-gray-800 dark:text-gray-300 bg-gray-50 dark:bg-gray-800 max-w-full",t),children:l.jsx("div",{className:"max-h-80 max-w-full overflow-auto",children:l.jsx("table",{className:A("divide-y table-auto w-full",e),...n,children:r})})});function Y0(e){return H({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinejoin:"round",strokeWidth:"32",d:"M336 264.13V436c0 24.3-19.05 44-42.95 44H107c-23.95 0-43-19.7-43-44V172a44.26 44.26 0 0 1 44-44h94.12a24.55 24.55 0 0 1 17.49 7.36l109.15 111a25.4 25.4 0 0 1 7.24 17.77z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M200 128v108a28.34 28.34 0 0 0 28 28h108"},child:[]},{tag:"path",attr:{fill:"none",strokeLinejoin:"round",strokeWidth:"32",d:"M176 128V76a44.26 44.26 0 0 1 44-44h94a24.83 24.83 0 0 1 17.61 7.36l109.15 111A25.09 25.09 0 0 1 448 168v172c0 24.3-19.05 44-42.95 44H344"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M312 32v108a28.34 28.34 0 0 0 28 28h108"},child:[]}]})(e)}function H0(e){return H({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M85.57 446.25h340.86a32 32 0 0 0 28.17-47.17L284.18 82.58c-12.09-22.44-44.27-22.44-56.36 0L57.4 399.08a32 32 0 0 0 28.17 47.17z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"m250.26 195.39 5.74 122 5.73-121.95a5.74 5.74 0 0 0-5.79-6h0a5.74 5.74 0 0 0-5.68 5.95z"},child:[]},{tag:"path",attr:{d:"M256 397.25a20 20 0 1 1 20-20 20 20 0 0 1-20 20z"},child:[]}]})(e)}const Qd=({title:e,description:t,wrapperClassName:r})=>l.jsxs("div",{className:A("flex items-center py-2 px-3 bg-yellow-100 text-gray-900 border border-yellow-600 rounded text-sm",r),role:"alert",children:[l.jsx(H0,{className:"min-w-6 min-h-6 mr-2 text-yellow-600"}),l.jsxs("div",{children:[l.jsx("p",{className:"font-medium",children:e}),l.jsx("p",{children:t})]})]});function G0(e){return H({attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M8 8.707l3.646 3.647.708-.707L8.707 8l3.647-3.646-.707-.708L8 7.293 4.354 3.646l-.707.708L7.293 8l-3.646 3.646.707.708L8 8.707z"},child:[]}]})(e)}function q0(e){return H({attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M16 5H0V4h16v1zm0 8H0v-1h16v1zm0-4.008H0V8h16v.992z"},child:[]}]})(e)}function Z0(e){return H({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"},child:[]}]})(e)}function uo(e){return H({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"},child:[]}]})(e)}function K0(e){return H({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"},child:[]}]})(e)}function J0(e){return H({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"},child:[]}]})(e)}function ef(e){return H({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z"},child:[]}]})(e)}function X0(e){return H({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM224 416H64V160h160v256zm224 0H288V160h160v256z"},child:[]}]})(e)}function Q0(e){return H({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M0 168v-16c0-13.255 10.745-24 24-24h360V80c0-21.367 25.899-32.042 40.971-16.971l80 80c9.372 9.373 9.372 24.569 0 33.941l-80 80C409.956 271.982 384 261.456 384 240v-48H24c-13.255 0-24-10.745-24-24zm488 152H128v-48c0-21.314-25.862-32.08-40.971-16.971l-80 80c-9.372 9.373-9.372 24.569 0 33.941l80 80C102.057 463.997 128 453.437 128 432v-48h360c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24z"},child:[]}]})(e)}function ev(e){return H({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"},child:[]}]})(e)}function tv(e){return H({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"},child:[]}]})(e)}function rv(e){return H({attr:{viewBox:"0 0 192 512"},child:[{tag:"path",attr:{d:"M20 424.229h20V279.771H20c-11.046 0-20-8.954-20-20V212c0-11.046 8.954-20 20-20h112c11.046 0 20 8.954 20 20v212.229h20c11.046 0 20 8.954 20 20V492c0 11.046-8.954 20-20 20H20c-11.046 0-20-8.954-20-20v-47.771c0-11.046 8.954-20 20-20zM96 0C56.235 0 24 32.235 24 72s32.235 72 72 72 72-32.235 72-72S135.764 0 96 0z"},child:[]}]})(e)}function nv(e){return H({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M80 368H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm0-320H16A16 16 0 0 0 0 64v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16V64a16 16 0 0 0-16-16zm0 160H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm416 176H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"},child:[]}]})(e)}function sv(e){return H({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function iv(e){return H({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function av(e){return H({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M448 192V77.25c0-8.49-3.37-16.62-9.37-22.63L393.37 9.37c-6-6-14.14-9.37-22.63-9.37H96C78.33 0 64 14.33 64 32v160c-35.35 0-64 28.65-64 64v112c0 8.84 7.16 16 16 16h48v96c0 17.67 14.33 32 32 32h320c17.67 0 32-14.33 32-32v-96h48c8.84 0 16-7.16 16-16V256c0-35.35-28.65-64-64-64zm-64 256H128v-96h256v96zm0-224H128V64h192v48c0 8.84 7.16 16 16 16h48v96zm48 72c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"},child:[]}]})(e)}function ov(e){return H({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M416 448h-84c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h84c17.7 0 32-14.3 32-32V160c0-17.7-14.3-32-32-32h-84c-6.6 0-12-5.4-12-12V76c0-6.6 5.4-12 12-12h84c53 0 96 43 96 96v192c0 53-43 96-96 96zm-47-201L201 79c-15-15-41-4.5-41 17v96H24c-13.3 0-24 10.7-24 24v96c0 13.3 10.7 24 24 24h136v96c0 21.5 26 32 41 17l168-168c9.3-9.4 9.3-24.6 0-34z"},child:[]}]})(e)}function lv(e){return H({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497 273L329 441c-15 15-41 4.5-41-17v-96H152c-13.3 0-24-10.7-24-24v-96c0-13.3 10.7-24 24-24h136V88c0-21.4 25.9-32 41-17l168 168c9.3 9.4 9.3 24.6 0 34zM192 436v-40c0-6.6-5.4-12-12-12H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h84c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12H96c-53 0-96 43-96 96v192c0 53 43 96 96 96h84c6.6 0 12-5.4 12-12z"},child:[]}]})(e)}function cv(e){return H({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M624 208h-64v-64c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v64h-64c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h64v64c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-64h64c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm-400 48c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"},child:[]}]})(e)}function uv(e){return H({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"},child:[]}]})(e)}function tf(e){return H({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M148 288h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm108-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 96v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96-260v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"},child:[]}]})(e)}function dv(e){return H({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 48c110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200-110.532 0-200-89.451-200-200 0-110.532 89.451-200 200-200m140.204 130.267l-22.536-22.718c-4.667-4.705-12.265-4.736-16.97-.068L215.346 303.697l-59.792-60.277c-4.667-4.705-12.265-4.736-16.97-.069l-22.719 22.536c-4.705 4.667-4.736 12.265-.068 16.971l90.781 91.516c4.667 4.705 12.265 4.736 16.97.068l172.589-171.204c4.704-4.668 4.734-12.266.067-16.971z"},child:[]}]})(e)}function fv(e){return H({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M288 248v28c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-28c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12zm-12 72H108c-6.6 0-12 5.4-12 12v28c0 6.6 5.4 12 12 12h168c6.6 0 12-5.4 12-12v-28c0-6.6-5.4-12-12-12zm108-188.1V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V48C0 21.5 21.5 0 48 0h204.1C264.8 0 277 5.1 286 14.1L369.9 98c9 8.9 14.1 21.2 14.1 33.9zm-128-80V128h76.1L256 51.9zM336 464V176H232c-13.3 0-24-10.7-24-24V48H48v416h288z"},child:[]}]})(e)}function rf(e){return H({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M313.6 304c-28.7 0-42.5 16-89.6 16-47.1 0-60.8-16-89.6-16C60.2 304 0 364.2 0 438.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-25.6c0-74.2-60.2-134.4-134.4-134.4zM400 464H48v-25.6c0-47.6 38.8-86.4 86.4-86.4 14.6 0 38.3 16 89.6 16 51.7 0 74.9-16 89.6-16 47.6 0 86.4 38.8 86.4 86.4V464zM224 288c79.5 0 144-64.5 144-144S303.5 0 224 0 80 64.5 80 144s64.5 144 144 144zm0-240c52.9 0 96 43.1 96 96s-43.1 96-96 96-96-43.1-96-96 43.1-96 96-96z"},child:[]}]})(e)}const Oa="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2017.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='200px'%20height='200px'%20viewBox='0%200%20200%20200'%20enable-background='new%200%200%20200%20200'%20xml:space='preserve'%3e%3cg%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M162.966,141.076v-8.912h3.775v-11.155l-3.775,5.578v-11.313h13.111v25.803%20H162.966z%20M89.717,115.715L90,115.273h12.957v25.803h-13.24V133.3h3.776v-11.152l-3.776,5.575V115.715L89.717,115.715z%20M162.966,115.273v11.313l-3.773,5.577h3.773v8.912h-3.112l-3.604-2.817l-2.479,2.817h-23.546v-3.044l-4.619,3.044h-19.942v-25.803%20h10.59v18.479h13.971v-18.479h24.447l-5.069,8h-9.128l-0.111,10.479h9.463l12.396-18.479H162.966z%20M24.247,123.169l4.913-8.007%20h53.517l-4.959,8.007H66.34v2.02h9.351l-3.153,5.633H66.34v3.154h11.716l11.66-18.261v12.008l-3.774,5.577h3.774v7.776h-2.422%20l-3.492-2.366l-3.026,2.366H54.961v-17.907h-7.179l-0.148,17.907H37.158l0.227-17.907H24.247z'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%230063AF'%20d='M101.053,82.351l15.748-11.884l-5.014-17.082%20c3.354-1.359,4.345,0.157,2.977,4.547c3.469-0.267,6.195-6.255,5.171-10.346c-1.325-4.377-4.858-7.866-9.623-8.219l-9.259,0.062%20v6.779c2.376,0,4.314,1.956,4.314,4.35c0,2.395-1.939,4.348-4.314,4.348V82.351L101.053,82.351z%20M101.053,53.517v-5.642%20c1.454,0.071,2.617,1.312,2.617,2.82C103.67,52.206,102.506,53.446,101.053,53.517z%20M83.734,70.31l16.455,12.693l0.864-0.652%20V54.906c-2.373,0-4.31-1.953-4.31-4.348c0-2.393,1.937-4.35,4.31-4.35v-6.779l-1.177,0.007c-4.51-0.016-7.176,1.915-7.992,5.798%20L83.734,70.31L83.734,70.31z%20M101.053,47.875v5.642c-0.043,0.002-0.088,0.003-0.135,0.003c-1.514,0-2.749-1.267-2.749-2.825%20c0-1.555,1.234-2.823,2.749-2.823C100.965,47.872,101.01,47.874,101.053,47.875z'/%3e%3cpolygon%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%230063AF'%20points='100.32,85.407%20100.264,85.361%20100.034,85.18%2082.726,71.518%202.82,47.879%208.305,55.905%2023.35,60.579%2025.57,63.654%2041.296,68.782%2042.864,70.662%2059.111,75.42%2058.971,76.008%2014.297,64.672%2019.863,72.759%2034.43,76.36%2036.511,79.037%2052.234,82.967%2053.26,84.678%2065.91,88.096%2066.756,88.998%2024.822,79.892%2029.117,85.911%2044.202,89.633%2045.398,91.516%2061.122,94.251%2061.977,96.471%2072.919,98.18%2072.919,99.035%2034.566,93.849%2037.872,98.77%2052.405,100.744%2053.945,102.283%2067.277,104.333%2068.815,106.555%2078.31,106.535%2078.31,107.677%2043.983,107.507%2047.736,113.052%20100.319,113.052%20100.32,113.052%20152.902,113.052%20156.659,107.507%20122.327,107.677%20122.327,106.535%20131.826,106.555%20133.365,104.333%20146.695,102.283%20148.235,100.744%20162.767,98.77%20166.074,93.849%20127.721,99.035%20127.721,98.18%20138.663,96.471%20139.516,94.251%20155.241,91.516%20156.438,89.633%20171.522,85.911%20175.818,79.892%20133.885,88.998%20134.73,88.096%20147.381,84.678%20148.405,82.967%20164.131,79.037%20166.21,76.36%20180.779,72.759%20186.34,64.672%20141.67,76.008%20141.53,75.42%20157.777,70.662%20159.342,68.782%20175.068,63.654%20177.289,60.579%20192.334,55.905%20197.82,47.879%20117.914,71.518%20100.377,85.361%20'/%3e%3cpolygon%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%230063AF'%20points='86.882,143.313%20113.444,143.313%2099.961,160.474%20'/%3e%3c/g%3e%3c/svg%3e";function nf(e,t){return function(){return e.apply(t,arguments)}}const{toString:hv}=Object.prototype,{getPrototypeOf:fo}=Object,{iterator:yi,toStringTag:sf}=Symbol,xi=(e=>t=>{const r=hv.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),yt=e=>(e=e.toLowerCase(),t=>xi(t)===e),bi=e=>t=>typeof t===e,{isArray:sn}=Array,Jr=bi("undefined");function Bn(e){return e!==null&&!Jr(e)&&e.constructor!==null&&!Jr(e.constructor)&&Ke(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const af=yt("ArrayBuffer");function pv(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&af(e.buffer),t}const mv=bi("string"),Ke=bi("function"),of=bi("number"),Wn=e=>e!==null&&typeof e=="object",gv=e=>e===!0||e===!1,Ms=e=>{if(xi(e)!=="object")return!1;const t=fo(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(sf in e)&&!(yi in e)},vv=e=>{if(!Wn(e)||Bn(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},yv=yt("Date"),xv=yt("File"),bv=yt("Blob"),wv=yt("FileList"),Ev=e=>Wn(e)&&Ke(e.pipe),Sv=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ke(e.append)&&((t=xi(e))==="formdata"||t==="object"&&Ke(e.toString)&&e.toString()==="[object FormData]"))},kv=yt("URLSearchParams"),[Ov,_v,Cv,Lv]=["ReadableStream","Request","Response","Headers"].map(yt),Nv=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Yn(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),sn(e))for(n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else{if(Bn(e))return;const i=r?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let o;for(n=0;n<a;n++)o=i[n],t.call(null,e[o],o,e)}}function lf(e,t){if(Bn(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,s;for(;n-- >0;)if(s=r[n],t===s.toLowerCase())return s;return null}const vr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,cf=e=>!Jr(e)&&e!==vr;function _a(){const{caseless:e,skipUndefined:t}=cf(this)&&this||{},r={},n=(s,i)=>{const a=e&&lf(r,i)||i;Ms(r[a])&&Ms(s)?r[a]=_a(r[a],s):Ms(s)?r[a]=_a({},s):sn(s)?r[a]=s.slice():(!t||!Jr(s))&&(r[a]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&Yn(arguments[s],n);return r}const jv=(e,t,r,{allOwnKeys:n}={})=>(Yn(t,(s,i)=>{r&&Ke(s)?e[i]=nf(s,r):e[i]=s},{allOwnKeys:n}),e),Mv=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Tv=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Dv=(e,t,r,n)=>{let s,i,a;const o={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)a=s[i],(!n||n(a,e,t))&&!o[a]&&(t[a]=e[a],o[a]=!0);e=r!==!1&&fo(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Pv=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},Av=e=>{if(!e)return null;if(sn(e))return e;let t=e.length;if(!of(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Rv=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&fo(Uint8Array)),Iv=(e,t)=>{const n=(e&&e[yi]).call(e);let s;for(;(s=n.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},Fv=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},$v=yt("HTMLFormElement"),Uv=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),Vc=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Vv=yt("RegExp"),uf=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Yn(r,(s,i)=>{let a;(a=t(s,i,e))!==!1&&(n[i]=a||s)}),Object.defineProperties(e,n)},zv=e=>{uf(e,(t,r)=>{if(Ke(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(Ke(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Bv=(e,t)=>{const r={},n=s=>{s.forEach(i=>{r[i]=!0})};return sn(e)?n(e):n(String(e).split(t)),r},Wv=()=>{},Yv=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Hv(e){return!!(e&&Ke(e.append)&&e[sf]==="FormData"&&e[yi])}const Gv=e=>{const t=new Array(10),r=(n,s)=>{if(Wn(n)){if(t.indexOf(n)>=0)return;if(Bn(n))return n;if(!("toJSON"in n)){t[s]=n;const i=sn(n)?[]:{};return Yn(n,(a,o)=>{const c=r(a,s+1);!Jr(c)&&(i[o]=c)}),t[s]=void 0,i}}return n};return r(e,0)},qv=yt("AsyncFunction"),Zv=e=>e&&(Wn(e)||Ke(e))&&Ke(e.then)&&Ke(e.catch),df=((e,t)=>e?setImmediate:t?((r,n)=>(vr.addEventListener("message",({source:s,data:i})=>{s===vr&&i===r&&n.length&&n.shift()()},!1),s=>{n.push(s),vr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Ke(vr.postMessage)),Kv=typeof queueMicrotask<"u"?queueMicrotask.bind(vr):typeof process<"u"&&process.nextTick||df,Jv=e=>e!=null&&Ke(e[yi]),L={isArray:sn,isArrayBuffer:af,isBuffer:Bn,isFormData:Sv,isArrayBufferView:pv,isString:mv,isNumber:of,isBoolean:gv,isObject:Wn,isPlainObject:Ms,isEmptyObject:vv,isReadableStream:Ov,isRequest:_v,isResponse:Cv,isHeaders:Lv,isUndefined:Jr,isDate:yv,isFile:xv,isBlob:bv,isRegExp:Vv,isFunction:Ke,isStream:Ev,isURLSearchParams:kv,isTypedArray:Rv,isFileList:wv,forEach:Yn,merge:_a,extend:jv,trim:Nv,stripBOM:Mv,inherits:Tv,toFlatObject:Dv,kindOf:xi,kindOfTest:yt,endsWith:Pv,toArray:Av,forEachEntry:Iv,matchAll:Fv,isHTMLForm:$v,hasOwnProperty:Vc,hasOwnProp:Vc,reduceDescriptors:uf,freezeMethods:zv,toObjectSet:Bv,toCamelCase:Uv,noop:Wv,toFiniteNumber:Yv,findKey:lf,global:vr,isContextDefined:cf,isSpecCompliantForm:Hv,toJSONObject:Gv,isAsyncFn:qv,isThenable:Zv,setImmediate:df,asap:Kv,isIterable:Jv};function se(e,t,r,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}L.inherits(se,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:L.toJSONObject(this.config),code:this.code,status:this.status}}});const ff=se.prototype,hf={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{hf[e]={value:e}});Object.defineProperties(se,hf);Object.defineProperty(ff,"isAxiosError",{value:!0});se.from=(e,t,r,n,s,i)=>{const a=Object.create(ff);L.toFlatObject(e,a,function(f){return f!==Error.prototype},d=>d!=="isAxiosError");const o=e&&e.message?e.message:"Error",c=t==null&&e?e.code:t;return se.call(a,o,c,r,n,s),e&&a.cause==null&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",i&&Object.assign(a,i),a};const Xv=null;function Ca(e){return L.isPlainObject(e)||L.isArray(e)}function pf(e){return L.endsWith(e,"[]")?e.slice(0,-2):e}function zc(e,t,r){return e?e.concat(t).map(function(s,i){return s=pf(s),!r&&i?"["+s+"]":s}).join(r?".":""):t}function Qv(e){return L.isArray(e)&&!e.some(Ca)}const ey=L.toFlatObject(L,{},null,function(t){return/^is[A-Z]/.test(t)});function wi(e,t,r){if(!L.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=L.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,y){return!L.isUndefined(y[x])});const n=r.metaTokens,s=r.visitor||f,i=r.dots,a=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&L.isSpecCompliantForm(t);if(!L.isFunction(s))throw new TypeError("visitor must be a function");function d(m){if(m===null)return"";if(L.isDate(m))return m.toISOString();if(L.isBoolean(m))return m.toString();if(!c&&L.isBlob(m))throw new se("Blob is not supported. Use a Buffer instead.");return L.isArrayBuffer(m)||L.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function f(m,x,y){let E=m;if(m&&!y&&typeof m=="object"){if(L.endsWith(x,"{}"))x=n?x:x.slice(0,-2),m=JSON.stringify(m);else if(L.isArray(m)&&Qv(m)||(L.isFileList(m)||L.endsWith(x,"[]"))&&(E=L.toArray(m)))return x=pf(x),E.forEach(function(O,b){!(L.isUndefined(O)||O===null)&&t.append(a===!0?zc([x],b,i):a===null?x:x+"[]",d(O))}),!1}return Ca(m)?!0:(t.append(zc(y,x,i),d(m)),!1)}const h=[],p=Object.assign(ey,{defaultVisitor:f,convertValue:d,isVisitable:Ca});function v(m,x){if(!L.isUndefined(m)){if(h.indexOf(m)!==-1)throw Error("Circular reference detected in "+x.join("."));h.push(m),L.forEach(m,function(E,k){(!(L.isUndefined(E)||E===null)&&s.call(t,E,L.isString(k)?k.trim():k,x,p))===!0&&v(E,x?x.concat(k):[k])}),h.pop()}}if(!L.isObject(e))throw new TypeError("data must be an object");return v(e),t}function Bc(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function ho(e,t){this._pairs=[],e&&wi(e,this,t)}const mf=ho.prototype;mf.append=function(t,r){this._pairs.push([t,r])};mf.toString=function(t){const r=t?function(n){return t.call(this,n,Bc)}:Bc;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function ty(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function gf(e,t,r){if(!t)return e;const n=r&&r.encode||ty;L.isFunction(r)&&(r={serialize:r});const s=r&&r.serialize;let i;if(s?i=s(t,r):i=L.isURLSearchParams(t)?t.toString():new ho(t,r).toString(n),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Wc{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){L.forEach(this.handlers,function(n){n!==null&&t(n)})}}const vf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ry=typeof URLSearchParams<"u"?URLSearchParams:ho,ny=typeof FormData<"u"?FormData:null,sy=typeof Blob<"u"?Blob:null,iy={isBrowser:!0,classes:{URLSearchParams:ry,FormData:ny,Blob:sy},protocols:["http","https","file","blob","url","data"]},po=typeof window<"u"&&typeof document<"u",La=typeof navigator=="object"&&navigator||void 0,ay=po&&(!La||["ReactNative","NativeScript","NS"].indexOf(La.product)<0),oy=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ly=po&&window.location.href||"http://localhost",cy=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:po,hasStandardBrowserEnv:ay,hasStandardBrowserWebWorkerEnv:oy,navigator:La,origin:ly},Symbol.toStringTag,{value:"Module"})),We={...cy,...iy};function uy(e,t){return wi(e,new We.classes.URLSearchParams,{visitor:function(r,n,s,i){return We.isNode&&L.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function dy(e){return L.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function fy(e){const t={},r=Object.keys(e);let n;const s=r.length;let i;for(n=0;n<s;n++)i=r[n],t[i]=e[i];return t}function yf(e){function t(r,n,s,i){let a=r[i++];if(a==="__proto__")return!0;const o=Number.isFinite(+a),c=i>=r.length;return a=!a&&L.isArray(s)?s.length:a,c?(L.hasOwnProp(s,a)?s[a]=[s[a],n]:s[a]=n,!o):((!s[a]||!L.isObject(s[a]))&&(s[a]=[]),t(r,n,s[a],i)&&L.isArray(s[a])&&(s[a]=fy(s[a])),!o)}if(L.isFormData(e)&&L.isFunction(e.entries)){const r={};return L.forEachEntry(e,(n,s)=>{t(dy(n),s,r,0)}),r}return null}function hy(e,t,r){if(L.isString(e))try{return(t||JSON.parse)(e),L.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Hn={transitional:vf,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,i=L.isObject(t);if(i&&L.isHTMLForm(t)&&(t=new FormData(t)),L.isFormData(t))return s?JSON.stringify(yf(t)):t;if(L.isArrayBuffer(t)||L.isBuffer(t)||L.isStream(t)||L.isFile(t)||L.isBlob(t)||L.isReadableStream(t))return t;if(L.isArrayBufferView(t))return t.buffer;if(L.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return uy(t,this.formSerializer).toString();if((o=L.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return wi(o?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||s?(r.setContentType("application/json",!1),hy(t)):t}],transformResponse:[function(t){const r=this.transitional||Hn.transitional,n=r&&r.forcedJSONParsing,s=this.responseType==="json";if(L.isResponse(t)||L.isReadableStream(t))return t;if(t&&L.isString(t)&&(n&&!this.responseType||s)){const a=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(o){if(a)throw o.name==="SyntaxError"?se.from(o,se.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:We.classes.FormData,Blob:We.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};L.forEach(["delete","get","head","post","put","patch"],e=>{Hn.headers[e]={}});const py=L.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),my=e=>{const t={};let r,n,s;return e&&e.split(`
|
|
30
|
+
</svg>`),c="Cluster of ".concat(s," markers"),d=Number(google.maps.Marker.MAX_ZINDEX)+s;if(Qe.isAdvancedMarkerAvailable(n)){var f=new DOMParser,h=f.parseFromString(o,"image/svg+xml").documentElement;h.setAttribute("transform","translate(0 25)");var p={map:n,position:i,zIndex:d,title:c,content:h};return new google.maps.marker.AdvancedMarkerElement(p)}var v={position:i,zIndex:d,title:c,icon:{url:"data:image/svg+xml;base64,".concat(btoa(o)),anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(v)}}function t0(e,t){for(var r in t.prototype)e.prototype[r]=t.prototype[r]}class co{constructor(){t0(co,google.maps.OverlayView)}}var kn;(function(e){e.CLUSTERING_BEGIN="clusteringbegin",e.CLUSTERING_END="clusteringend",e.CLUSTER_CLICK="click"})(kn||(kn={}));var r0=(e,t,r)=>{r.fitBounds(t.bounds)};class n0 extends co{constructor(t){var{map:r,markers:n=[],algorithmOptions:s={},algorithm:i=new Xg(s),renderer:a=new e0,onClusterClick:o=r0}=t;super(),this.markers=[...n],this.clusters=[],this.algorithm=i,this.renderer=a,this.onClusterClick=o,r&&this.setMap(r)}addMarker(t,r){this.markers.includes(t)||(this.markers.push(t),r||this.render())}addMarkers(t,r){t.forEach(n=>{this.addMarker(n,!0)}),r||this.render()}removeMarker(t,r){var n=this.markers.indexOf(t);return n===-1?!1:(Qe.setMap(t,null),this.markers.splice(n,1),r||this.render(),!0)}removeMarkers(t,r){var n=!1;return t.forEach(s=>{n=this.removeMarker(s,!0)||n}),n&&!r&&this.render(),n}clearMarkers(t){this.markers.length=0,t||this.render()}render(){var t=this.getMap();if(t instanceof google.maps.Map&&t.getProjection()){google.maps.event.trigger(this,kn.CLUSTERING_BEGIN,this);var{clusters:r,changed:n}=this.algorithm.calculate({markers:this.markers,map:t,mapCanvasProjection:this.getProjection()});if(n||n==null){var s=new Set;for(var i of r)i.markers.length==1&&s.add(i.markers[0]);var a=[];for(var o of this.clusters)o.marker!=null&&(o.markers.length==1?s.has(o.marker)||Qe.setMap(o.marker,null):a.push(o.marker));this.clusters=r,this.renderClusters(),requestAnimationFrame(()=>a.forEach(c=>Qe.setMap(c,null)))}google.maps.event.trigger(this,kn.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(t=>Qe.setMap(t,null)),this.clusters.forEach(t=>t.delete()),this.clusters=[]}renderClusters(){var t=new Qg(this.markers,this.clusters),r=this.getMap();this.clusters.forEach(n=>{n.markers.length===1?n.marker=n.markers[0]:(n.marker=this.renderer.render(n,t,r),n.markers.forEach(s=>Qe.setMap(s,null)),this.onClusterClick&&n.marker.addListener("click",s=>{google.maps.event.trigger(this,kn.CLUSTER_CLICK,n),this.onClusterClick(s,n,r)})),Qe.setMap(n.marker,r)})}}function Xl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Ql(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xl(Object(r),!0).forEach(function(n){j(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xl(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function s0(e){var t=Jm(),[r,n]=u.useState(null);return u.useEffect(()=>{if(t&&r===null){var s=new n0(Ql(Ql({},e),{},{map:t}));n(s)}},[t]),r}function i0(e){var{children:t,options:r}=e,n=s0(r);return n!==null?t(n):null}u.memo(i0);var ec={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},tc={options(e,t){e.setOptions(t)},position(e,t){e.setPosition(t)},zIndex(e,t){e.setZIndex(t)}};function a0(e){var{children:t,anchor:r,options:n,position:s,zIndex:i,onCloseClick:a,onDomReady:o,onContentChanged:c,onPositionChanged:d,onZindexChanged:f,onLoad:h,onUnmount:p}=e,v=u.useContext(oe),[m,x]=u.useState(null),[y,E]=u.useState(null),[k,O]=u.useState(null),[b,g]=u.useState(null),[w,S]=u.useState(null),[C,_]=u.useState(null),M=u.useRef(null);return u.useEffect(()=>{m!==null&&(m.close(),r?m.open(v,r):m.getPosition()&&m.open(v))},[v,m,r]),u.useEffect(()=>{n&&m!==null&&m.setOptions(n)},[m,n]),u.useEffect(()=>{s&&m!==null&&m.setPosition(s)},[s]),u.useEffect(()=>{typeof i=="number"&&m!==null&&m.setZIndex(i)},[i]),u.useEffect(()=>{m&&a&&(y!==null&&google.maps.event.removeListener(y),E(google.maps.event.addListener(m,"closeclick",a)))},[a]),u.useEffect(()=>{m&&o&&(k!==null&&google.maps.event.removeListener(k),O(google.maps.event.addListener(m,"domready",o)))},[o]),u.useEffect(()=>{m&&c&&(b!==null&&google.maps.event.removeListener(b),g(google.maps.event.addListener(m,"content_changed",c)))},[c]),u.useEffect(()=>{m&&d&&(w!==null&&google.maps.event.removeListener(w),S(google.maps.event.addListener(m,"position_changed",d)))},[d]),u.useEffect(()=>{m&&f&&(C!==null&&google.maps.event.removeListener(C),_(google.maps.event.addListener(m,"zindex_changed",f)))},[f]),u.useEffect(()=>{var D=new google.maps.InfoWindow(n);return x(D),M.current=document.createElement("div"),a&&E(google.maps.event.addListener(D,"closeclick",a)),o&&O(google.maps.event.addListener(D,"domready",o)),c&&g(google.maps.event.addListener(D,"content_changed",c)),d&&S(google.maps.event.addListener(D,"position_changed",d)),f&&_(google.maps.event.addListener(D,"zindex_changed",f)),D.setContent(M.current),s&&D.setPosition(s),i&&D.setZIndex(i),r?D.open(v,r):D.getPosition()?D.open(v):Fe(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),h&&h(D),()=>{y&&google.maps.event.removeListener(y),b&&google.maps.event.removeListener(b),k&&google.maps.event.removeListener(k),w&&google.maps.event.removeListener(w),C&&google.maps.event.removeListener(C),p&&p(D),D.close()}},[]),M.current?rn.createPortal(u.Children.only(t),M.current):null}u.memo(a0);class o0 extends u.PureComponent{constructor(){super(...arguments),j(this,"registeredEvents",[]),j(this,"containerElement",null),j(this,"state",{infoWindow:null}),j(this,"open",(t,r)=>{r?t.open(this.context,r):t.getPosition()?t.open(this.context):Fe(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")}),j(this,"setInfoWindowCallback",()=>{this.state.infoWindow!==null&&this.containerElement!==null&&(this.state.infoWindow.setContent(this.containerElement),this.open(this.state.infoWindow,this.props.anchor),this.props.onLoad&&this.props.onLoad(this.state.infoWindow))})}componentDidMount(){var t=new google.maps.InfoWindow(this.props.options);this.containerElement=document.createElement("div"),this.registeredEvents=de({updaterMap:tc,eventMap:ec,prevProps:{},nextProps:this.props,instance:t}),this.setState(()=>({infoWindow:t}),this.setInfoWindowCallback)}componentDidUpdate(t){this.state.infoWindow!==null&&(fe(this.registeredEvents),this.registeredEvents=de({updaterMap:tc,eventMap:ec,prevProps:t,nextProps:this.props,instance:this.state.infoWindow}))}componentWillUnmount(){this.state.infoWindow!==null&&(fe(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())}render(){return this.containerElement?rn.createPortal(u.Children.only(this.props.children),this.containerElement):null}}j(o0,"contextType",oe);function rc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Gs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rc(Object(r),!0).forEach(function(n){j(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var nc={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},sc={draggable(e,t){e.setDraggable(t)},editable(e,t){e.setEditable(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},path(e,t){e.setPath(t)},visible(e,t){e.setVisible(t)}},l0={};function c0(e){var{options:t,draggable:r,editable:n,visible:s,path:i,onDblClick:a,onDragEnd:o,onDragStart:c,onMouseDown:d,onMouseMove:f,onMouseOut:h,onMouseOver:p,onMouseUp:v,onRightClick:m,onClick:x,onDrag:y,onLoad:E,onUnmount:k}=e,O=u.useContext(oe),[b,g]=u.useState(null),[w,S]=u.useState(null),[C,_]=u.useState(null),[M,D]=u.useState(null),[F,z]=u.useState(null),[W,G]=u.useState(null),[$,X]=u.useState(null),[J,le]=u.useState(null),[re,Q]=u.useState(null),[ee,Y]=u.useState(null),[ce,T]=u.useState(null),[Se,be]=u.useState(null);return u.useEffect(()=>{b!==null&&b.setMap(O)},[O]),u.useEffect(()=>{typeof t<"u"&&b!==null&&b.setOptions(t)},[b,t]),u.useEffect(()=>{typeof r<"u"&&b!==null&&b.setDraggable(r)},[b,r]),u.useEffect(()=>{typeof n<"u"&&b!==null&&b.setEditable(n)},[b,n]),u.useEffect(()=>{typeof s<"u"&&b!==null&&b.setVisible(s)},[b,s]),u.useEffect(()=>{typeof i<"u"&&b!==null&&b.setPath(i)},[b,i]),u.useEffect(()=>{b&&a&&(w!==null&&google.maps.event.removeListener(w),S(google.maps.event.addListener(b,"dblclick",a)))},[a]),u.useEffect(()=>{b&&o&&(C!==null&&google.maps.event.removeListener(C),_(google.maps.event.addListener(b,"dragend",o)))},[o]),u.useEffect(()=>{b&&c&&(M!==null&&google.maps.event.removeListener(M),D(google.maps.event.addListener(b,"dragstart",c)))},[c]),u.useEffect(()=>{b&&d&&(F!==null&&google.maps.event.removeListener(F),z(google.maps.event.addListener(b,"mousedown",d)))},[d]),u.useEffect(()=>{b&&f&&(W!==null&&google.maps.event.removeListener(W),G(google.maps.event.addListener(b,"mousemove",f)))},[f]),u.useEffect(()=>{b&&h&&($!==null&&google.maps.event.removeListener($),X(google.maps.event.addListener(b,"mouseout",h)))},[h]),u.useEffect(()=>{b&&p&&(J!==null&&google.maps.event.removeListener(J),le(google.maps.event.addListener(b,"mouseover",p)))},[p]),u.useEffect(()=>{b&&v&&(re!==null&&google.maps.event.removeListener(re),Q(google.maps.event.addListener(b,"mouseup",v)))},[v]),u.useEffect(()=>{b&&m&&(ee!==null&&google.maps.event.removeListener(ee),Y(google.maps.event.addListener(b,"rightclick",m)))},[m]),u.useEffect(()=>{b&&x&&(ce!==null&&google.maps.event.removeListener(ce),T(google.maps.event.addListener(b,"click",x)))},[x]),u.useEffect(()=>{b&&y&&(Se!==null&&google.maps.event.removeListener(Se),be(google.maps.event.addListener(b,"drag",y)))},[y]),u.useEffect(()=>{var te=new google.maps.Polyline(Gs(Gs({},t||l0),{},{map:O}));return i&&te.setPath(i),typeof s<"u"&&te.setVisible(s),typeof n<"u"&&te.setEditable(n),typeof r<"u"&&te.setDraggable(r),a&&S(google.maps.event.addListener(te,"dblclick",a)),o&&_(google.maps.event.addListener(te,"dragend",o)),c&&D(google.maps.event.addListener(te,"dragstart",c)),d&&z(google.maps.event.addListener(te,"mousedown",d)),f&&G(google.maps.event.addListener(te,"mousemove",f)),h&&X(google.maps.event.addListener(te,"mouseout",h)),p&&le(google.maps.event.addListener(te,"mouseover",p)),v&&Q(google.maps.event.addListener(te,"mouseup",v)),m&&Y(google.maps.event.addListener(te,"rightclick",m)),x&&T(google.maps.event.addListener(te,"click",x)),y&&be(google.maps.event.addListener(te,"drag",y)),g(te),E&&E(te),()=>{w!==null&&google.maps.event.removeListener(w),C!==null&&google.maps.event.removeListener(C),M!==null&&google.maps.event.removeListener(M),F!==null&&google.maps.event.removeListener(F),W!==null&&google.maps.event.removeListener(W),$!==null&&google.maps.event.removeListener($),J!==null&&google.maps.event.removeListener(J),re!==null&&google.maps.event.removeListener(re),ee!==null&&google.maps.event.removeListener(ee),ce!==null&&google.maps.event.removeListener(ce),k&&k(te),te.setMap(null)}},[]),null}u.memo(c0);class u0 extends u.PureComponent{constructor(){super(...arguments),j(this,"registeredEvents",[]),j(this,"state",{polyline:null}),j(this,"setPolylineCallback",()=>{this.state.polyline!==null&&this.props.onLoad&&this.props.onLoad(this.state.polyline)})}componentDidMount(){var t=new google.maps.Polyline(Gs(Gs({},this.props.options),{},{map:this.context}));this.registeredEvents=de({updaterMap:sc,eventMap:nc,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{polyline:t}},this.setPolylineCallback)}componentDidUpdate(t){this.state.polyline!==null&&(fe(this.registeredEvents),this.registeredEvents=de({updaterMap:sc,eventMap:nc,prevProps:t,nextProps:this.props,instance:this.state.polyline}))}componentWillUnmount(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),fe(this.registeredEvents),this.state.polyline.setMap(null))}render(){return null}}j(u0,"contextType",oe);function ic(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function ac(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ic(Object(r),!0).forEach(function(n){j(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ic(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var oc={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},lc={draggable(e,t){e.setDraggable(t)},editable(e,t){e.setEditable(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},path(e,t){e.setPath(t)},paths(e,t){e.setPaths(t)},visible(e,t){e.setVisible(t)}};function d0(e){var{options:t,draggable:r,editable:n,visible:s,path:i,paths:a,onDblClick:o,onDragEnd:c,onDragStart:d,onMouseDown:f,onMouseMove:h,onMouseOut:p,onMouseOver:v,onMouseUp:m,onRightClick:x,onClick:y,onDrag:E,onLoad:k,onUnmount:O,onEdit:b}=e,g=u.useContext(oe),[w,S]=u.useState(null),[C,_]=u.useState(null),[M,D]=u.useState(null),[F,z]=u.useState(null),[W,G]=u.useState(null),[$,X]=u.useState(null),[J,le]=u.useState(null),[re,Q]=u.useState(null),[ee,Y]=u.useState(null),[ce,T]=u.useState(null),[Se,be]=u.useState(null),[te,Ce]=u.useState(null);return u.useEffect(()=>{w!==null&&w.setMap(g)},[g]),u.useEffect(()=>{typeof t<"u"&&w!==null&&w.setOptions(t)},[w,t]),u.useEffect(()=>{typeof r<"u"&&w!==null&&w.setDraggable(r)},[w,r]),u.useEffect(()=>{typeof n<"u"&&w!==null&&w.setEditable(n)},[w,n]),u.useEffect(()=>{typeof s<"u"&&w!==null&&w.setVisible(s)},[w,s]),u.useEffect(()=>{typeof i<"u"&&w!==null&&w.setPath(i)},[w,i]),u.useEffect(()=>{typeof a<"u"&&w!==null&&w.setPaths(a)},[w,a]),u.useEffect(()=>{w&&typeof o=="function"&&(C!==null&&google.maps.event.removeListener(C),_(google.maps.event.addListener(w,"dblclick",o)))},[o]),u.useEffect(()=>{w&&(google.maps.event.addListener(w.getPath(),"insert_at",()=>{b?.(w)}),google.maps.event.addListener(w.getPath(),"set_at",()=>{b?.(w)}),google.maps.event.addListener(w.getPath(),"remove_at",()=>{b?.(w)}))},[w,b]),u.useEffect(()=>{w&&typeof c=="function"&&(M!==null&&google.maps.event.removeListener(M),D(google.maps.event.addListener(w,"dragend",c)))},[c]),u.useEffect(()=>{w&&typeof d=="function"&&(F!==null&&google.maps.event.removeListener(F),z(google.maps.event.addListener(w,"dragstart",d)))},[d]),u.useEffect(()=>{w&&typeof f=="function"&&(W!==null&&google.maps.event.removeListener(W),G(google.maps.event.addListener(w,"mousedown",f)))},[f]),u.useEffect(()=>{w&&typeof h=="function"&&($!==null&&google.maps.event.removeListener($),X(google.maps.event.addListener(w,"mousemove",h)))},[h]),u.useEffect(()=>{w&&typeof p=="function"&&(J!==null&&google.maps.event.removeListener(J),le(google.maps.event.addListener(w,"mouseout",p)))},[p]),u.useEffect(()=>{w&&typeof v=="function"&&(re!==null&&google.maps.event.removeListener(re),Q(google.maps.event.addListener(w,"mouseover",v)))},[v]),u.useEffect(()=>{w&&typeof m=="function"&&(ee!==null&&google.maps.event.removeListener(ee),Y(google.maps.event.addListener(w,"mouseup",m)))},[m]),u.useEffect(()=>{w&&typeof x=="function"&&(ce!==null&&google.maps.event.removeListener(ce),T(google.maps.event.addListener(w,"rightclick",x)))},[x]),u.useEffect(()=>{w&&typeof y=="function"&&(Se!==null&&google.maps.event.removeListener(Se),be(google.maps.event.addListener(w,"click",y)))},[y]),u.useEffect(()=>{w&&typeof E=="function"&&(te!==null&&google.maps.event.removeListener(te),Ce(google.maps.event.addListener(w,"drag",E)))},[E]),u.useEffect(()=>{var K=new google.maps.Polygon(ac(ac({},t),{},{map:g}));return i&&K.setPath(i),a&&K.setPaths(a),typeof s<"u"&&K.setVisible(s),typeof n<"u"&&K.setEditable(n),typeof r<"u"&&K.setDraggable(r),o&&_(google.maps.event.addListener(K,"dblclick",o)),c&&D(google.maps.event.addListener(K,"dragend",c)),d&&z(google.maps.event.addListener(K,"dragstart",d)),f&&G(google.maps.event.addListener(K,"mousedown",f)),h&&X(google.maps.event.addListener(K,"mousemove",h)),p&&le(google.maps.event.addListener(K,"mouseout",p)),v&&Q(google.maps.event.addListener(K,"mouseover",v)),m&&Y(google.maps.event.addListener(K,"mouseup",m)),x&&T(google.maps.event.addListener(K,"rightclick",x)),y&&be(google.maps.event.addListener(K,"click",y)),E&&Ce(google.maps.event.addListener(K,"drag",E)),S(K),k&&k(K),()=>{C!==null&&google.maps.event.removeListener(C),M!==null&&google.maps.event.removeListener(M),F!==null&&google.maps.event.removeListener(F),W!==null&&google.maps.event.removeListener(W),$!==null&&google.maps.event.removeListener($),J!==null&&google.maps.event.removeListener(J),re!==null&&google.maps.event.removeListener(re),ee!==null&&google.maps.event.removeListener(ee),ce!==null&&google.maps.event.removeListener(ce),Se!==null&&google.maps.event.removeListener(Se),O&&O(K),K.setMap(null)}},[]),null}u.memo(d0);class f0 extends u.PureComponent{constructor(){super(...arguments),j(this,"registeredEvents",[])}componentDidMount(){var t=this.props.options||{};this.polygon=new google.maps.Polygon(t),this.polygon.setMap(this.context),this.registeredEvents=de({updaterMap:lc,eventMap:oc,prevProps:{},nextProps:this.props,instance:this.polygon}),this.props.onLoad&&this.props.onLoad(this.polygon)}componentDidUpdate(t){this.polygon&&(fe(this.registeredEvents),this.registeredEvents=de({updaterMap:lc,eventMap:oc,prevProps:t,nextProps:this.props,instance:this.polygon}))}componentWillUnmount(){this.polygon&&(this.props.onUnmount&&this.props.onUnmount(this.polygon),fe(this.registeredEvents),this.polygon&&this.polygon.setMap(null))}render(){return null}}j(f0,"contextType",oe);function cc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function qs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cc(Object(r),!0).forEach(function(n){j(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var uc={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"},dc={bounds(e,t){e.setBounds(t)},draggable(e,t){e.setDraggable(t)},editable(e,t){e.setEditable(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},visible(e,t){e.setVisible(t)}};function h0(e){var{options:t,bounds:r,draggable:n,editable:s,visible:i,onDblClick:a,onDragEnd:o,onDragStart:c,onMouseDown:d,onMouseMove:f,onMouseOut:h,onMouseOver:p,onMouseUp:v,onRightClick:m,onClick:x,onDrag:y,onBoundsChanged:E,onLoad:k,onUnmount:O}=e,b=u.useContext(oe),[g,w]=u.useState(null),[S,C]=u.useState(null),[_,M]=u.useState(null),[D,F]=u.useState(null),[z,W]=u.useState(null),[G,$]=u.useState(null),[X,J]=u.useState(null),[le,re]=u.useState(null),[Q,ee]=u.useState(null),[Y,ce]=u.useState(null),[T,Se]=u.useState(null),[be,te]=u.useState(null),[Ce,K]=u.useState(null);return u.useEffect(()=>{g!==null&&g.setMap(b)},[b]),u.useEffect(()=>{typeof t<"u"&&g!==null&&g.setOptions(t)},[g,t]),u.useEffect(()=>{typeof n<"u"&&g!==null&&g.setDraggable(n)},[g,n]),u.useEffect(()=>{typeof s<"u"&&g!==null&&g.setEditable(s)},[g,s]),u.useEffect(()=>{typeof i<"u"&&g!==null&&g.setVisible(i)},[g,i]),u.useEffect(()=>{typeof r<"u"&&g!==null&&g.setBounds(r)},[g,r]),u.useEffect(()=>{g&&a&&(S!==null&&google.maps.event.removeListener(S),C(google.maps.event.addListener(g,"dblclick",a)))},[a]),u.useEffect(()=>{g&&o&&(_!==null&&google.maps.event.removeListener(_),M(google.maps.event.addListener(g,"dragend",o)))},[o]),u.useEffect(()=>{g&&c&&(D!==null&&google.maps.event.removeListener(D),F(google.maps.event.addListener(g,"dragstart",c)))},[c]),u.useEffect(()=>{g&&d&&(z!==null&&google.maps.event.removeListener(z),W(google.maps.event.addListener(g,"mousedown",d)))},[d]),u.useEffect(()=>{g&&f&&(G!==null&&google.maps.event.removeListener(G),$(google.maps.event.addListener(g,"mousemove",f)))},[f]),u.useEffect(()=>{g&&h&&(X!==null&&google.maps.event.removeListener(X),J(google.maps.event.addListener(g,"mouseout",h)))},[h]),u.useEffect(()=>{g&&p&&(le!==null&&google.maps.event.removeListener(le),re(google.maps.event.addListener(g,"mouseover",p)))},[p]),u.useEffect(()=>{g&&v&&(Q!==null&&google.maps.event.removeListener(Q),ee(google.maps.event.addListener(g,"mouseup",v)))},[v]),u.useEffect(()=>{g&&m&&(Y!==null&&google.maps.event.removeListener(Y),ce(google.maps.event.addListener(g,"rightclick",m)))},[m]),u.useEffect(()=>{g&&x&&(T!==null&&google.maps.event.removeListener(T),Se(google.maps.event.addListener(g,"click",x)))},[x]),u.useEffect(()=>{g&&y&&(be!==null&&google.maps.event.removeListener(be),te(google.maps.event.addListener(g,"drag",y)))},[y]),u.useEffect(()=>{g&&E&&(Ce!==null&&google.maps.event.removeListener(Ce),K(google.maps.event.addListener(g,"bounds_changed",E)))},[E]),u.useEffect(()=>{var ue=new google.maps.Rectangle(qs(qs({},t),{},{map:b}));return typeof i<"u"&&ue.setVisible(i),typeof s<"u"&&ue.setEditable(s),typeof n<"u"&&ue.setDraggable(n),typeof r<"u"&&ue.setBounds(r),a&&C(google.maps.event.addListener(ue,"dblclick",a)),o&&M(google.maps.event.addListener(ue,"dragend",o)),c&&F(google.maps.event.addListener(ue,"dragstart",c)),d&&W(google.maps.event.addListener(ue,"mousedown",d)),f&&$(google.maps.event.addListener(ue,"mousemove",f)),h&&J(google.maps.event.addListener(ue,"mouseout",h)),p&&re(google.maps.event.addListener(ue,"mouseover",p)),v&&ee(google.maps.event.addListener(ue,"mouseup",v)),m&&ce(google.maps.event.addListener(ue,"rightclick",m)),x&&Se(google.maps.event.addListener(ue,"click",x)),y&&te(google.maps.event.addListener(ue,"drag",y)),E&&K(google.maps.event.addListener(ue,"bounds_changed",E)),w(ue),k&&k(ue),()=>{S!==null&&google.maps.event.removeListener(S),_!==null&&google.maps.event.removeListener(_),D!==null&&google.maps.event.removeListener(D),z!==null&&google.maps.event.removeListener(z),G!==null&&google.maps.event.removeListener(G),X!==null&&google.maps.event.removeListener(X),le!==null&&google.maps.event.removeListener(le),Q!==null&&google.maps.event.removeListener(Q),Y!==null&&google.maps.event.removeListener(Y),T!==null&&google.maps.event.removeListener(T),be!==null&&google.maps.event.removeListener(be),Ce!==null&&google.maps.event.removeListener(Ce),O&&O(ue),ue.setMap(null)}},[]),null}u.memo(h0);class p0 extends u.PureComponent{constructor(){super(...arguments),j(this,"registeredEvents",[]),j(this,"state",{rectangle:null}),j(this,"setRectangleCallback",()=>{this.state.rectangle!==null&&this.props.onLoad&&this.props.onLoad(this.state.rectangle)})}componentDidMount(){var t=new google.maps.Rectangle(qs(qs({},this.props.options),{},{map:this.context}));this.registeredEvents=de({updaterMap:dc,eventMap:uc,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{rectangle:t}},this.setRectangleCallback)}componentDidUpdate(t){this.state.rectangle!==null&&(fe(this.registeredEvents),this.registeredEvents=de({updaterMap:dc,eventMap:uc,prevProps:t,nextProps:this.props,instance:this.state.rectangle}))}componentWillUnmount(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),fe(this.registeredEvents),this.state.rectangle.setMap(null))}render(){return null}}j(p0,"contextType",oe);function fc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Zs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fc(Object(r),!0).forEach(function(n){j(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var hc={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"},pc={center(e,t){e.setCenter(t)},draggable(e,t){e.setDraggable(t)},editable(e,t){e.setEditable(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},radius(e,t){e.setRadius(t)},visible(e,t){e.setVisible(t)}},m0={};function g0(e){var{options:t,center:r,radius:n,draggable:s,editable:i,visible:a,onDblClick:o,onDragEnd:c,onDragStart:d,onMouseDown:f,onMouseMove:h,onMouseOut:p,onMouseOver:v,onMouseUp:m,onRightClick:x,onClick:y,onDrag:E,onCenterChanged:k,onRadiusChanged:O,onLoad:b,onUnmount:g}=e,w=u.useContext(oe),[S,C]=u.useState(null),[_,M]=u.useState(null),[D,F]=u.useState(null),[z,W]=u.useState(null),[G,$]=u.useState(null),[X,J]=u.useState(null),[le,re]=u.useState(null),[Q,ee]=u.useState(null),[Y,ce]=u.useState(null),[T,Se]=u.useState(null),[be,te]=u.useState(null),[Ce,K]=u.useState(null),[ue,U]=u.useState(null),[Ve,st]=u.useState(null);return u.useEffect(()=>{S!==null&&S.setMap(w)},[w]),u.useEffect(()=>{typeof t<"u"&&S!==null&&S.setOptions(t)},[S,t]),u.useEffect(()=>{typeof s<"u"&&S!==null&&S.setDraggable(s)},[S,s]),u.useEffect(()=>{typeof i<"u"&&S!==null&&S.setEditable(i)},[S,i]),u.useEffect(()=>{typeof a<"u"&&S!==null&&S.setVisible(a)},[S,a]),u.useEffect(()=>{typeof n=="number"&&S!==null&&S.setRadius(n)},[S,n]),u.useEffect(()=>{typeof r<"u"&&S!==null&&S.setCenter(r)},[S,r]),u.useEffect(()=>{S&&o&&(_!==null&&google.maps.event.removeListener(_),M(google.maps.event.addListener(S,"dblclick",o)))},[o]),u.useEffect(()=>{S&&c&&(D!==null&&google.maps.event.removeListener(D),F(google.maps.event.addListener(S,"dragend",c)))},[c]),u.useEffect(()=>{S&&d&&(z!==null&&google.maps.event.removeListener(z),W(google.maps.event.addListener(S,"dragstart",d)))},[d]),u.useEffect(()=>{S&&f&&(G!==null&&google.maps.event.removeListener(G),$(google.maps.event.addListener(S,"mousedown",f)))},[f]),u.useEffect(()=>{S&&h&&(X!==null&&google.maps.event.removeListener(X),J(google.maps.event.addListener(S,"mousemove",h)))},[h]),u.useEffect(()=>{S&&p&&(le!==null&&google.maps.event.removeListener(le),re(google.maps.event.addListener(S,"mouseout",p)))},[p]),u.useEffect(()=>{S&&v&&(Q!==null&&google.maps.event.removeListener(Q),ee(google.maps.event.addListener(S,"mouseover",v)))},[v]),u.useEffect(()=>{S&&m&&(Y!==null&&google.maps.event.removeListener(Y),ce(google.maps.event.addListener(S,"mouseup",m)))},[m]),u.useEffect(()=>{S&&x&&(T!==null&&google.maps.event.removeListener(T),Se(google.maps.event.addListener(S,"rightclick",x)))},[x]),u.useEffect(()=>{S&&y&&(be!==null&&google.maps.event.removeListener(be),te(google.maps.event.addListener(S,"click",y)))},[y]),u.useEffect(()=>{S&&E&&(Ce!==null&&google.maps.event.removeListener(Ce),K(google.maps.event.addListener(S,"drag",E)))},[E]),u.useEffect(()=>{S&&k&&(ue!==null&&google.maps.event.removeListener(ue),U(google.maps.event.addListener(S,"center_changed",k)))},[y]),u.useEffect(()=>{S&&O&&(Ve!==null&&google.maps.event.removeListener(Ve),st(google.maps.event.addListener(S,"radius_changed",O)))},[O]),u.useEffect(()=>{var ge=new google.maps.Circle(Zs(Zs({},t||m0),{},{map:w}));return typeof n=="number"&&ge.setRadius(n),typeof r<"u"&&ge.setCenter(r),typeof n=="number"&&ge.setRadius(n),typeof a<"u"&&ge.setVisible(a),typeof i<"u"&&ge.setEditable(i),typeof s<"u"&&ge.setDraggable(s),o&&M(google.maps.event.addListener(ge,"dblclick",o)),c&&F(google.maps.event.addListener(ge,"dragend",c)),d&&W(google.maps.event.addListener(ge,"dragstart",d)),f&&$(google.maps.event.addListener(ge,"mousedown",f)),h&&J(google.maps.event.addListener(ge,"mousemove",h)),p&&re(google.maps.event.addListener(ge,"mouseout",p)),v&&ee(google.maps.event.addListener(ge,"mouseover",v)),m&&ce(google.maps.event.addListener(ge,"mouseup",m)),x&&Se(google.maps.event.addListener(ge,"rightclick",x)),y&&te(google.maps.event.addListener(ge,"click",y)),E&&K(google.maps.event.addListener(ge,"drag",E)),k&&U(google.maps.event.addListener(ge,"center_changed",k)),O&&st(google.maps.event.addListener(ge,"radius_changed",O)),C(ge),b&&b(ge),()=>{_!==null&&google.maps.event.removeListener(_),D!==null&&google.maps.event.removeListener(D),z!==null&&google.maps.event.removeListener(z),G!==null&&google.maps.event.removeListener(G),X!==null&&google.maps.event.removeListener(X),le!==null&&google.maps.event.removeListener(le),Q!==null&&google.maps.event.removeListener(Q),Y!==null&&google.maps.event.removeListener(Y),T!==null&&google.maps.event.removeListener(T),be!==null&&google.maps.event.removeListener(be),ue!==null&&google.maps.event.removeListener(ue),Ve!==null&&google.maps.event.removeListener(Ve),g&&g(ge),ge.setMap(null)}},[]),null}u.memo(g0);class v0 extends u.PureComponent{constructor(){super(...arguments),j(this,"registeredEvents",[]),j(this,"state",{circle:null}),j(this,"setCircleCallback",()=>{this.state.circle!==null&&this.props.onLoad&&this.props.onLoad(this.state.circle)})}componentDidMount(){var t=new google.maps.Circle(Zs(Zs({},this.props.options),{},{map:this.context}));this.registeredEvents=de({updaterMap:pc,eventMap:hc,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{circle:t}},this.setCircleCallback)}componentDidUpdate(t){this.state.circle!==null&&(fe(this.registeredEvents),this.registeredEvents=de({updaterMap:pc,eventMap:hc,prevProps:t,nextProps:this.props,instance:this.state.circle}))}componentWillUnmount(){if(this.state.circle!==null){var t;this.props.onUnmount&&this.props.onUnmount(this.state.circle),fe(this.registeredEvents),(t=this.state.circle)===null||t===void 0||t.setMap(null)}}render(){return null}}j(v0,"contextType",oe);function mc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Ks(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mc(Object(r),!0).forEach(function(n){j(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var gc={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},vc={add(e,t){e.add(t)},addgeojson(e,t,r){e.addGeoJson(t,r)},contains(e,t){e.contains(t)},foreach(e,t){e.forEach(t)},loadgeojson(e,t,r,n){e.loadGeoJson(t,r,n)},overridestyle(e,t,r){e.overrideStyle(t,r)},remove(e,t){e.remove(t)},revertstyle(e,t){e.revertStyle(t)},controlposition(e,t){e.setControlPosition(t)},controls(e,t){e.setControls(t)},drawingmode(e,t){e.setDrawingMode(t)},map(e,t){e.setMap(t)},style(e,t){e.setStyle(t)},togeojson(e,t){e.toGeoJson(t)}};function y0(e){var{options:t,onClick:r,onDblClick:n,onMouseDown:s,onMouseMove:i,onMouseOut:a,onMouseOver:o,onMouseUp:c,onRightClick:d,onAddFeature:f,onRemoveFeature:h,onRemoveProperty:p,onSetGeometry:v,onSetProperty:m,onLoad:x,onUnmount:y}=e,E=u.useContext(oe),[k,O]=u.useState(null),[b,g]=u.useState(null),[w,S]=u.useState(null),[C,_]=u.useState(null),[M,D]=u.useState(null),[F,z]=u.useState(null),[W,G]=u.useState(null),[$,X]=u.useState(null),[J,le]=u.useState(null),[re,Q]=u.useState(null),[ee,Y]=u.useState(null),[ce,T]=u.useState(null),[Se,be]=u.useState(null),[te,Ce]=u.useState(null);return u.useEffect(()=>{k!==null&&k.setMap(E)},[E]),u.useEffect(()=>{k&&n&&(b!==null&&google.maps.event.removeListener(b),g(google.maps.event.addListener(k,"dblclick",n)))},[n]),u.useEffect(()=>{k&&s&&(w!==null&&google.maps.event.removeListener(w),S(google.maps.event.addListener(k,"mousedown",s)))},[s]),u.useEffect(()=>{k&&i&&(C!==null&&google.maps.event.removeListener(C),_(google.maps.event.addListener(k,"mousemove",i)))},[i]),u.useEffect(()=>{k&&a&&(M!==null&&google.maps.event.removeListener(M),D(google.maps.event.addListener(k,"mouseout",a)))},[a]),u.useEffect(()=>{k&&o&&(F!==null&&google.maps.event.removeListener(F),z(google.maps.event.addListener(k,"mouseover",o)))},[o]),u.useEffect(()=>{k&&c&&(W!==null&&google.maps.event.removeListener(W),G(google.maps.event.addListener(k,"mouseup",c)))},[c]),u.useEffect(()=>{k&&d&&($!==null&&google.maps.event.removeListener($),X(google.maps.event.addListener(k,"rightclick",d)))},[d]),u.useEffect(()=>{k&&r&&(J!==null&&google.maps.event.removeListener(J),le(google.maps.event.addListener(k,"click",r)))},[r]),u.useEffect(()=>{k&&f&&(re!==null&&google.maps.event.removeListener(re),Q(google.maps.event.addListener(k,"addfeature",f)))},[f]),u.useEffect(()=>{k&&h&&(ee!==null&&google.maps.event.removeListener(ee),Y(google.maps.event.addListener(k,"removefeature",h)))},[h]),u.useEffect(()=>{k&&p&&(ce!==null&&google.maps.event.removeListener(ce),T(google.maps.event.addListener(k,"removeproperty",p)))},[p]),u.useEffect(()=>{k&&v&&(Se!==null&&google.maps.event.removeListener(Se),be(google.maps.event.addListener(k,"setgeometry",v)))},[v]),u.useEffect(()=>{k&&m&&(te!==null&&google.maps.event.removeListener(te),Ce(google.maps.event.addListener(k,"setproperty",m)))},[m]),u.useEffect(()=>{if(E!==null){var K=new google.maps.Data(Ks(Ks({},t),{},{map:E}));n&&g(google.maps.event.addListener(K,"dblclick",n)),s&&S(google.maps.event.addListener(K,"mousedown",s)),i&&_(google.maps.event.addListener(K,"mousemove",i)),a&&D(google.maps.event.addListener(K,"mouseout",a)),o&&z(google.maps.event.addListener(K,"mouseover",o)),c&&G(google.maps.event.addListener(K,"mouseup",c)),d&&X(google.maps.event.addListener(K,"rightclick",d)),r&&le(google.maps.event.addListener(K,"click",r)),f&&Q(google.maps.event.addListener(K,"addfeature",f)),h&&Y(google.maps.event.addListener(K,"removefeature",h)),p&&T(google.maps.event.addListener(K,"removeproperty",p)),v&&be(google.maps.event.addListener(K,"setgeometry",v)),m&&Ce(google.maps.event.addListener(K,"setproperty",m)),O(K),x&&x(K)}return()=>{k&&(b!==null&&google.maps.event.removeListener(b),w!==null&&google.maps.event.removeListener(w),C!==null&&google.maps.event.removeListener(C),M!==null&&google.maps.event.removeListener(M),F!==null&&google.maps.event.removeListener(F),W!==null&&google.maps.event.removeListener(W),$!==null&&google.maps.event.removeListener($),J!==null&&google.maps.event.removeListener(J),re!==null&&google.maps.event.removeListener(re),ee!==null&&google.maps.event.removeListener(ee),ce!==null&&google.maps.event.removeListener(ce),Se!==null&&google.maps.event.removeListener(Se),te!==null&&google.maps.event.removeListener(te),y&&y(k),k.setMap(null))}},[]),null}u.memo(y0);class x0 extends u.PureComponent{constructor(){super(...arguments),j(this,"registeredEvents",[]),j(this,"state",{data:null}),j(this,"setDataCallback",()=>{this.state.data!==null&&this.props.onLoad&&this.props.onLoad(this.state.data)})}componentDidMount(){if(this.context!==null){var t=new google.maps.Data(Ks(Ks({},this.props.options),{},{map:this.context}));this.registeredEvents=de({updaterMap:vc,eventMap:gc,prevProps:{},nextProps:this.props,instance:t}),this.setState(()=>({data:t}),this.setDataCallback)}}componentDidUpdate(t){this.state.data!==null&&(fe(this.registeredEvents),this.registeredEvents=de({updaterMap:vc,eventMap:gc,prevProps:t,nextProps:this.props,instance:this.state.data}))}componentWillUnmount(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),fe(this.registeredEvents),this.state.data&&this.state.data.setMap(null))}render(){return null}}j(x0,"contextType",oe);function yc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function xc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yc(Object(r),!0).forEach(function(n){j(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var bc={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},wc={options(e,t){e.setOptions(t)},url(e,t){e.setUrl(t)},zIndex(e,t){e.setZIndex(t)}};class b0 extends u.PureComponent{constructor(){super(...arguments),j(this,"registeredEvents",[]),j(this,"state",{kmlLayer:null}),j(this,"setKmlLayerCallback",()=>{this.state.kmlLayer!==null&&this.props.onLoad&&this.props.onLoad(this.state.kmlLayer)})}componentDidMount(){var t=new google.maps.KmlLayer(xc(xc({},this.props.options),{},{map:this.context}));this.registeredEvents=de({updaterMap:wc,eventMap:bc,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{kmlLayer:t}},this.setKmlLayerCallback)}componentDidUpdate(t){this.state.kmlLayer!==null&&(fe(this.registeredEvents),this.registeredEvents=de({updaterMap:wc,eventMap:bc,prevProps:t,nextProps:this.props,instance:this.state.kmlLayer}))}componentWillUnmount(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),fe(this.registeredEvents),this.state.kmlLayer.setMap(null))}render(){return null}}j(b0,"contextType",oe);function Yd(e,t){return typeof t=="function"?t(e.offsetWidth,e.offsetHeight):{x:0,y:0}}function w0(e,t){return new t(e.lat,e.lng)}function E0(e,t){return new t(new google.maps.LatLng(e.ne.lat,e.ne.lng),new google.maps.LatLng(e.sw.lat,e.sw.lng))}function S0(e,t,r){return e instanceof t?e:r(e,t)}function k0(e,t,r){return e instanceof t?e:r(e,t)}function O0(e,t,r){var n=e&&e.fromLatLngToDivPixel(r.getNorthEast()),s=e&&e.fromLatLngToDivPixel(r.getSouthWest());return n&&s?{left:"".concat(s.x+t.x,"px"),top:"".concat(n.y+t.y,"px"),width:"".concat(n.x-s.x-t.x,"px"),height:"".concat(s.y-n.y-t.y,"px")}:{left:"-9999px",top:"-9999px"}}function _0(e,t,r){var n=e&&e.fromLatLngToDivPixel(r);if(n){var{x:s,y:i}=n;return{left:"".concat(s+t.x,"px"),top:"".concat(i+t.y,"px")}}return{left:"-9999px",top:"-9999px"}}function Hd(e,t,r,n){return r!==void 0?O0(e,t,k0(r,google.maps.LatLngBounds,E0)):_0(e,t,S0(n,google.maps.LatLng,w0))}function C0(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.height&&e.height===t.height}function Ec(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function L0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ec(Object(r),!0).forEach(function(n){j(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ec(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function N0(e,t,r,n,s){class i extends google.maps.OverlayView{constructor(o,c,d,f){super(),this.container=o,this.pane=c,this.position=d,this.bounds=f}onAdd(){var o,c=(o=this.getPanes())===null||o===void 0?void 0:o[this.pane];c?.appendChild(this.container)}draw(){var o=this.getProjection(),c=L0({},this.container?Yd(this.container,s):{x:0,y:0}),d=Hd(o,c,this.bounds,this.position);for(var[f,h]of Object.entries(d))this.container.style[f]=h}onRemove(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)}}return new i(e,t,r,n)}function Sc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function j0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Sc(Object(r),!0).forEach(function(n){j(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kc(e){if(!e)return"";var t=e instanceof google.maps.LatLng?e:new google.maps.LatLng(e.lat,e.lng);return t+""}function Oc(e){if(!e)return"";var t=e instanceof google.maps.LatLngBounds?e:new google.maps.LatLngBounds(new google.maps.LatLng(e.south,e.east),new google.maps.LatLng(e.north,e.west));return t+""}function M0(e){var{position:t,bounds:r,mapPaneName:n,zIndex:s,onLoad:i,onUnmount:a,getPixelPositionOffset:o,children:c}=e,d=u.useContext(oe),f=u.useMemo(()=>{var p=document.createElement("div");return p.style.position="absolute",p},[]),h=u.useMemo(()=>N0(f,n,t,r,o),[f,n,t,r]);return u.useEffect(()=>(i?.(h),h?.setMap(d),()=>{a?.(h),h?.setMap(null)}),[d,h]),u.useEffect(()=>{f.style.zIndex="".concat(s)},[s,f]),pd.createPortal(c,f)}u.memo(M0);class nn extends u.PureComponent{constructor(t){super(t),j(this,"state",{paneEl:null,containerStyle:{position:"absolute"}}),j(this,"updatePane",()=>{var n=this.props.mapPaneName,s=this.overlayView.getPanes();Fe(!!n,"OverlayView requires props.mapPaneName but got %s",n),s?this.setState({paneEl:s[n]}):this.setState({paneEl:null})}),j(this,"onAdd",()=>{var n,s;this.updatePane(),(n=(s=this.props).onLoad)===null||n===void 0||n.call(s,this.overlayView)}),j(this,"onPositionElement",()=>{var n=this.overlayView.getProjection(),s=j0({x:0,y:0},this.containerRef.current?Yd(this.containerRef.current,this.props.getPixelPositionOffset):{}),i=Hd(n,s,this.props.bounds,this.props.position);if(!C0(i,{left:this.state.containerStyle.left,top:this.state.containerStyle.top,width:this.state.containerStyle.width,height:this.state.containerStyle.height})){var a,o,c,d;this.setState({containerStyle:{top:(a=i.top)!==null&&a!==void 0?a:0,left:(o=i.left)!==null&&o!==void 0?o:0,width:(c=i.width)!==null&&c!==void 0?c:0,height:(d=i.height)!==null&&d!==void 0?d:0,position:"absolute"}})}}),j(this,"draw",()=>{this.onPositionElement()}),j(this,"onRemove",()=>{var n,s;this.setState(()=>({paneEl:null})),(n=(s=this.props).onUnmount)===null||n===void 0||n.call(s,this.overlayView)}),this.containerRef=u.createRef();var r=new google.maps.OverlayView;r.onAdd=this.onAdd,r.draw=this.draw,r.onRemove=this.onRemove,this.overlayView=r}componentDidMount(){this.overlayView.setMap(this.context)}componentDidUpdate(t){var r=kc(t.position),n=kc(this.props.position),s=Oc(t.bounds),i=Oc(this.props.bounds);(r!==n||s!==i)&&this.overlayView.draw(),t.mapPaneName!==this.props.mapPaneName&&this.updatePane()}componentWillUnmount(){this.overlayView.setMap(null)}render(){var t=this.state.paneEl;return t?pd.createPortal(l.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:u.Children.only(this.props.children)}),t):null}}j(nn,"FLOAT_PANE","floatPane");j(nn,"MAP_PANE","mapPane");j(nn,"MARKER_LAYER","markerLayer");j(nn,"OVERLAY_LAYER","overlayLayer");j(nn,"OVERLAY_MOUSE_TARGET","overlayMouseTarget");j(nn,"contextType",oe);function T0(){}function _c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Cc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_c(Object(r),!0).forEach(function(n){j(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_c(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Lc={onDblClick:"dblclick",onClick:"click"},Nc={opacity(e,t){e.setOpacity(t)}};function D0(e){var{url:t,bounds:r,options:n,visible:s}=e,i=u.useContext(oe),a=new google.maps.LatLngBounds(new google.maps.LatLng(r.south,r.west),new google.maps.LatLng(r.north,r.east)),o=u.useMemo(()=>new google.maps.GroundOverlay(t,a,n),[]);return u.useEffect(()=>{o!==null&&o.setMap(i)},[i]),u.useEffect(()=>{typeof t<"u"&&o!==null&&(o.set("url",t),o.setMap(i))},[o,t]),u.useEffect(()=>{typeof s<"u"&&o!==null&&o.setOpacity(s?1:0)},[o,s]),u.useEffect(()=>{var c=new google.maps.LatLngBounds(new google.maps.LatLng(r.south,r.west),new google.maps.LatLng(r.north,r.east));typeof r<"u"&&o!==null&&(o.set("bounds",c),o.setMap(i))},[o,r]),null}u.memo(D0);class Gd extends u.PureComponent{constructor(){super(...arguments),j(this,"registeredEvents",[]),j(this,"state",{groundOverlay:null}),j(this,"setGroundOverlayCallback",()=>{this.state.groundOverlay!==null&&this.props.onLoad&&this.props.onLoad(this.state.groundOverlay)})}componentDidMount(){Fe(!!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 t=new google.maps.GroundOverlay(this.props.url,this.props.bounds,Cc(Cc({},this.props.options),{},{map:this.context}));this.registeredEvents=de({updaterMap:Nc,eventMap:Lc,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{groundOverlay:t}},this.setGroundOverlayCallback)}componentDidUpdate(t){this.state.groundOverlay!==null&&(fe(this.registeredEvents),this.registeredEvents=de({updaterMap:Nc,eventMap:Lc,prevProps:t,nextProps:this.props,instance:this.state.groundOverlay}))}componentWillUnmount(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))}render(){return null}}j(Gd,"defaultProps",{onLoad:T0});j(Gd,"contextType",oe);function jc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Js(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jc(Object(r),!0).forEach(function(n){j(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Mc={},Tc={data(e,t){e.setData(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)}};function P0(e){var{data:t,onLoad:r,onUnmount:n,options:s}=e,i=u.useContext(oe),[a,o]=u.useState(null);return u.useEffect(()=>{google.maps.visualization||Fe(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),u.useEffect(()=>{Fe(!!t,"data property is required in HeatmapLayer %s",t)},[t]),u.useEffect(()=>{a!==null&&a.setMap(i)},[i]),u.useEffect(()=>{s&&a!==null&&a.setOptions(s)},[a,s]),u.useEffect(()=>{var c=new google.maps.visualization.HeatmapLayer(Js(Js({},s),{},{data:t,map:i}));return o(c),r&&r(c),()=>{a!==null&&(n&&n(a),a.setMap(null))}},[]),null}u.memo(P0);class A0 extends u.PureComponent{constructor(){super(...arguments),j(this,"registeredEvents",[]),j(this,"state",{heatmapLayer:null}),j(this,"setHeatmapLayerCallback",()=>{this.state.heatmapLayer!==null&&this.props.onLoad&&this.props.onLoad(this.state.heatmapLayer)})}componentDidMount(){Fe(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),Fe(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var t=new google.maps.visualization.HeatmapLayer(Js(Js({},this.props.options),{},{data:this.props.data,map:this.context}));this.registeredEvents=de({updaterMap:Tc,eventMap:Mc,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{heatmapLayer:t}},this.setHeatmapLayerCallback)}componentDidUpdate(t){fe(this.registeredEvents),this.registeredEvents=de({updaterMap:Tc,eventMap:Mc,prevProps:t,nextProps:this.props,instance:this.state.heatmapLayer})}componentWillUnmount(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),fe(this.registeredEvents),this.state.heatmapLayer.setMap(null))}render(){return null}}j(A0,"contextType",oe);var Dc={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},Pc={register(e,t,r){e.registerPanoProvider(t,r)},links(e,t){e.setLinks(t)},motionTracking(e,t){e.setMotionTracking(t)},options(e,t){e.setOptions(t)},pano(e,t){e.setPano(t)},position(e,t){e.setPosition(t)},pov(e,t){e.setPov(t)},visible(e,t){e.setVisible(t)},zoom(e,t){e.setZoom(t)}};class R0 extends u.PureComponent{constructor(){super(...arguments),j(this,"registeredEvents",[]),j(this,"state",{streetViewPanorama:null}),j(this,"setStreetViewPanoramaCallback",()=>{this.state.streetViewPanorama!==null&&this.props.onLoad&&this.props.onLoad(this.state.streetViewPanorama)})}componentDidMount(){var t,r,n=(t=(r=this.context)===null||r===void 0?void 0:r.getStreetView())!==null&&t!==void 0?t:null;this.registeredEvents=de({updaterMap:Pc,eventMap:Dc,prevProps:{},nextProps:this.props,instance:n}),this.setState(()=>({streetViewPanorama:n}),this.setStreetViewPanoramaCallback)}componentDidUpdate(t){this.state.streetViewPanorama!==null&&(fe(this.registeredEvents),this.registeredEvents=de({updaterMap:Pc,eventMap:Dc,prevProps:t,nextProps:this.props,instance:this.state.streetViewPanorama}))}componentWillUnmount(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),fe(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))}render(){return null}}j(R0,"contextType",oe);class I0 extends u.PureComponent{constructor(){super(...arguments),j(this,"state",{streetViewService:null}),j(this,"setStreetViewServiceCallback",()=>{this.state.streetViewService!==null&&this.props.onLoad&&this.props.onLoad(this.state.streetViewService)})}componentDidMount(){var t=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:t}},this.setStreetViewServiceCallback)}componentWillUnmount(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)}render(){return null}}j(I0,"contextType",oe);var Ac={onDirectionsChanged:"directions_changed"},Rc={directions(e,t){e.setDirections(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},panel(e,t){e.setPanel(t)},routeIndex(e,t){e.setRouteIndex(t)}};class F0 extends u.PureComponent{constructor(){super(...arguments),j(this,"registeredEvents",[]),j(this,"state",{directionsRenderer:null}),j(this,"setDirectionsRendererCallback",()=>{this.state.directionsRenderer!==null&&(this.state.directionsRenderer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.directionsRenderer))})}componentDidMount(){var t=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=de({updaterMap:Rc,eventMap:Ac,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{directionsRenderer:t}},this.setDirectionsRendererCallback)}componentDidUpdate(t){this.state.directionsRenderer!==null&&(fe(this.registeredEvents),this.registeredEvents=de({updaterMap:Rc,eventMap:Ac,prevProps:t,nextProps:this.props,instance:this.state.directionsRenderer}))}componentWillUnmount(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),fe(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))}render(){return null}}j(F0,"contextType",oe);var Ic={onPlacesChanged:"places_changed"},Fc={bounds(e,t){e.setBounds(t)}};class $0 extends u.PureComponent{constructor(){super(...arguments),j(this,"registeredEvents",[]),j(this,"containerElement",u.createRef()),j(this,"state",{searchBox:null}),j(this,"setSearchBoxCallback",()=>{this.state.searchBox!==null&&this.props.onLoad&&this.props.onLoad(this.state.searchBox)})}componentDidMount(){if(Fe(!!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 t=this.containerElement.current.querySelector("input");if(t!==null){var r=new google.maps.places.SearchBox(t,this.props.options);this.registeredEvents=de({updaterMap:Fc,eventMap:Ic,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}}componentDidUpdate(t){this.state.searchBox!==null&&(fe(this.registeredEvents),this.registeredEvents=de({updaterMap:Fc,eventMap:Ic,prevProps:t,nextProps:this.props,instance:this.state.searchBox}))}componentWillUnmount(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),fe(this.registeredEvents))}render(){return l.jsx("div",{ref:this.containerElement,children:u.Children.only(this.props.children)})}}j($0,"contextType",oe);var $c={onPlaceChanged:"place_changed"},Uc={bounds(e,t){e.setBounds(t)},restrictions(e,t){e.setComponentRestrictions(t)},fields(e,t){e.setFields(t)},options(e,t){e.setOptions(t)},types(e,t){e.setTypes(t)}};class qd extends u.PureComponent{constructor(){super(...arguments),j(this,"registeredEvents",[]),j(this,"containerElement",u.createRef()),j(this,"state",{autocomplete:null}),j(this,"setAutocompleteCallback",()=>{this.state.autocomplete!==null&&this.props.onLoad&&this.props.onLoad(this.state.autocomplete)})}componentDidMount(){var t;Fe(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var r=(t=this.containerElement.current)===null||t===void 0?void 0:t.querySelector("input");if(r){var n=new google.maps.places.Autocomplete(r,this.props.options);this.registeredEvents=de({updaterMap:Uc,eventMap:$c,prevProps:{},nextProps:this.props,instance:n}),this.setState(()=>({autocomplete:n}),this.setAutocompleteCallback)}}componentDidUpdate(t){fe(this.registeredEvents),this.registeredEvents=de({updaterMap:Uc,eventMap:$c,prevProps:t,nextProps:this.props,instance:this.state.autocomplete})}componentWillUnmount(){this.state.autocomplete!==null&&fe(this.registeredEvents)}render(){return l.jsx("div",{ref:this.containerElement,className:this.props.className,children:u.Children.only(this.props.children)})}}j(qd,"defaultProps",{className:""});j(qd,"contextType",oe);const rt=({children:e,className:t,...r})=>l.jsx(so,{className:A("bg-indigo-600 border-indigo-600 hover:bg-indigo-500 text-white focus-visible:outline-indigo-500 active:bg-indigo-700 transition-all duration-150 dark:bg-indigo-700 dark:border-indigo-700 dark:hover:bg-indigo-600 dark:text-gray-100 dark:active:bg-indigo-800",t),...r,children:e});function Zd(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"10",r:"3"},child:[]}]})(e)}function U0(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"3 6 5 6 21 6"},child:[]},{tag:"path",attr:{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"},child:[]}]})(e)}function V0(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"16 16 12 12 8 16"},child:[]},{tag:"line",attr:{x1:"12",y1:"12",x2:"12",y2:"21"},child:[]},{tag:"path",attr:{d:"M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"},child:[]},{tag:"polyline",attr:{points:"16 16 12 12 8 16"},child:[]}]})(e)}function Kd(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"},child:[]},{tag:"polyline",attr:{points:"17 8 12 3 7 8"},child:[]},{tag:"line",attr:{x1:"12",y1:"3",x2:"12",y2:"15"},child:[]}]})(e)}const Ae=({children:e,className:t,...r})=>l.jsx("a",{className:A("text-indigo-600 hover:underline hover:text-indigo-500 cursor-pointer transition-all duration-150 dark:text-indigo-400 dark:hover:text-indigo-300",t),...r,children:e}),ms=["#00559e","#e11d48","#f59e42","#22c55e","#a21caf","#fbbf24","#0ea5e9","#64748b"],Jd=({coordinates:e,wrapperClassName:t})=>{const{isLoaded:r,loadError:n}=oo({googleMapsApiKey:"",libraries:["places"]}),[s,i]=u.useState([]),[a,o]=u.useState({lat:0,lng:0}),c=u.useRef(null),d=u.useCallback(()=>{if(!(!c.current||e.length===0))if(e.length===1)o(e[0]),c.current.setZoom(16);else{const h=new window.google.maps.LatLngBounds;e.forEach(p=>h.extend(p)),c.current.fitBounds(h)}},[e]),f=h=>encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' width='32' height='48' viewBox='0 0 32 48' fill='none'><path d='M16 0C7.163 0 0 7.163 0 16c0 11.046 16 32 16 32s16-20.954 16-32C32 7.163 24.837 0 16 0z' fill='${h}'/><circle cx='16' cy='16' r='7' fill='white'/></svg>`);return u.useEffect(()=>{d()},[d]),u.useEffect(()=>{if(!r||e.length===0)return;const h=new window.google.maps.Geocoder;Promise.all(e.map(p=>new Promise(v=>{h.geocode({location:p},(m,x)=>{x===window.google.maps.GeocoderStatus.OK&&m&&m[0]?v(m[0].formatted_address):v("")})}))).then(i)},[r,e]),n?l.jsx("div",{children:"Error loading Google Maps."}):r?l.jsxs("div",{className:A("relative flex flex-1 flex-col w-full h-full gap-2",t),children:[l.jsx(Pd,{mapContainerStyle:{height:"100%",width:"100%"},zoom:16,center:a,onLoad:h=>{c.current=h,setTimeout(()=>d(),300)},options:{disableDefaultUI:!0,draggable:!0,zoomControl:!0,scrollwheel:!0,disableDoubleClickZoom:!0},children:e.map((h,p)=>{const v=ms[p%ms.length];return l.jsx($d,{position:h,icon:{url:`data:image/svg+xml;charset=UTF-8,${f(v)}`,scaledSize:new window.google.maps.Size(32,48),anchor:new window.google.maps.Point(16,48)}},p)})}),l.jsx(rt,{type:"button",className:A("absolute top-2 right-2",!r&&"hidden"),onClick:d,children:"Centrar"}),e.length>0&&l.jsx("div",{className:"mt-2 space-y-1",children:e.map((h,p)=>l.jsxs("div",{className:"text-xs",children:[l.jsxs(Ae,{onClick:()=>{if(!c.current)return null;o(h),c.current.setZoom(16)},children:[l.jsx(Zd,{color:ms[p%ms.length],className:"w-4 h-4 mr-2 inline"}),l.jsxs("span",{className:"font-semibold text-indigo-600 dark:text-indigo-400",children:[h.name||`Punto ${p+1}`,":"]})]}),s[p]&&l.jsx("span",{className:"ml-2 text-gray-500",children:s[p]})]},p))})]}):l.jsx("div",{className:"flex flex-col items-center justify-center w-full h-64",children:"Loading map..."})};function z0(e){return H({attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{opacity:"0.2",fillRule:"evenodd",clipRule:"evenodd",d:"M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",fill:"currentColor"},child:[]},{tag:"path",attr:{d:"M2 12C2 6.47715 6.47715 2 12 2V5C8.13401 5 5 8.13401 5 12H2Z",fill:"currentColor"},child:[]}]})(e)}const gi=({className:e,wrapperClassName:t})=>l.jsx("div",{className:A("px-4 py-2 flex justify-center items-center text-indigo-600 dark:text-indigo-400",t),children:l.jsx(z0,{className:A("animate-spin h-5 w-5",e)})}),Xs=({open:e,onClose:t,className:r,children:n})=>{const s=u.useRef(null),[i,a]=u.useState(e),[o,c]=u.useState(!1);return u.useEffect(()=>{if(e)a(!0),setTimeout(()=>c(!0),10);else if(i){c(!1);const d=setTimeout(()=>a(!1),250);return()=>clearTimeout(d)}},[e,i]),u.useEffect(()=>{if(!i)return;const d=h=>{s.current&&!s.current.contains(h.target)&&t?.()},f=h=>{h.key==="Escape"&&t?.()};return document.addEventListener("mousedown",d),document.addEventListener("keydown",f),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",f)}},[i,t]),i?rn.createPortal(l.jsx("div",{className:A("fixed inset-0 z-[1100] flex items-center justify-center transition-colors duration-250",o?"bg-black/50":"bg-black/0"),style:{},role:"dialog","aria-modal":"true",children:l.jsxs("div",{ref:s,className:A("bg-white dark:bg-gray-800 dark:text-gray-100 shadow-2xl rounded-lg p-6 min-w-[320px] max-w-[90vw] max-h-[90vh] overflow-auto transition-all duration-250 relative scale-100",o?"opacity-100":"opacity-0 pointer-events-none",r),style:{transitionProperty:"opacity, transform"},children:[l.jsx("button",{type:"button","aria-label":"Cerrar",onClick:t,className:"absolute top-2 right-2 text-gray-500 hover:text-indigo-600 dark:text-gray-400 dark:hover:text-indigo-400 text-lg font-bold bg-transparent border-none p-1 cursor-pointer",style:{lineHeight:1},children:"✕"}),n]})}),document.body):null},Xd=({open:e,anchorEl:t,onClose:r,className:n,children:s,placement:i="bottom"})=>{const a=u.useRef(null),[o,c]=u.useState({}),[d,f]=u.useState(!1);return u.useEffect(()=>{if(!e||!t)return;const h=a.current;if(!h)return;const p=t.getBoundingClientRect();let v=0,m=0;switch(i){case"top":v=p.top-h.offsetHeight,m=p.left;break;case"bottom":v=p.bottom,m=p.left;break;case"left":v=p.top,m=p.left-h.offsetWidth;break;case"right":v=p.top,m=p.right;break;default:v=p.bottom,m=p.left;break}c({position:"absolute",top:`${v+window.scrollY}px`,left:`${m+window.scrollX}px`,zIndex:1e3,visibility:"visible",opacity:1}),f(!0)},[e,t,i]),u.useEffect(()=>{if(!e)return;const h=p=>{a.current&&!a.current.contains(p.target)&&t&&!t.contains(p.target)&&r?.()};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[e,r,t]),e?l.jsx("div",{ref:a,className:A("bg-white dark:bg-gray-800 dark:text-gray-100 shadow-[0_0_15px_3px_rgba(0,0,0,0.3)] rounded p-4 min-w-[180px]",n),style:d?o:{position:"absolute",visibility:"hidden",opacity:0,left:0,top:0},role:"dialog","aria-modal":"true",children:s}):null},B0=({options:e,selected:t,onSelect:r,anchorEl:n,open:s,onClose:i,className:a,renderOption:o})=>l.jsx(Xd,{open:s,anchorEl:n,onClose:i,className:A("!p-0 !border-0",a),children:l.jsx("ul",{className:"min-w-[180px] py-1",children:e.map(c=>l.jsxs("li",{onClick:()=>{r(c),i()},className:A("px-4 py-2 cursor-pointer hover:bg-indigo-600 hover:text-white flex items-center gap-2 dark:hover:bg-indigo-700 dark:hover:text-gray-100",t?.id===c.id?"bg-indigo-100 text-indigo-700 dark:bg-indigo-800 dark:text-indigo-200":"bg-white text-gray-800 dark:bg-gray-800 dark:text-gray-100"),children:[c.icon&&l.jsx("span",{children:c.icon}),o?o(c):c.label]},c.id))})}),Tn=({children:e,className:t,...r})=>l.jsx(so,{className:A("bg-transparent hover:bg-gray-400/10 focus-visible:outline-indigo-500 text-indigo-600 active:bg-gray-400/20 transition-all duration-150 dark:text-indigo-300 dark:hover:bg-gray-700/30 dark:active:bg-gray-700/50",t),...r,children:e}),Kr=({className:e,wrapperClassName:t,vertical:r=!1,...n})=>l.jsx("div",{className:A("flex justify-center items-center w-full",t),...n,children:l.jsx("div",{className:A(r?"h-8 w-px bg-gray-300 dark:bg-gray-700":"h-px w-full bg-gray-300 dark:bg-gray-700",e)})}),W0=({className:e,disabled:t,checked:r,...n})=>l.jsxs("label",{className:A("inline-flex items-center cursor-pointer",t?"pointer-events-none opacity-50":"",e),children:[l.jsx("input",{type:"checkbox",className:"sr-only",disabled:t,checked:r,...n}),l.jsx("span",{className:A("w-10 h-6 flex items-center bg-gray-300 rounded-full p-1 transition-colors dark:bg-gray-700",r?"bg-indigo-600 dark:bg-indigo-500":"",t?"bg-gray-200 dark:bg-gray-800":""),children:l.jsx("span",{className:A("bg-white dark:bg-gray-100 w-4 h-4 rounded-full shadow-md transform transition-transform",r?"translate-x-4":"translate-x-0")})})]}),vi=({className:e,wrapperClassName:t,children:r,...n})=>l.jsx("div",{className:A("border border-gray-300 dark:border-gray-700 text-gray-800 dark:text-gray-300 bg-gray-50 dark:bg-gray-800 max-w-full",t),children:l.jsx("div",{className:"max-h-80 max-w-full overflow-auto",children:l.jsx("table",{className:A("divide-y table-auto w-full",e),...n,children:r})})});function Y0(e){return H({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinejoin:"round",strokeWidth:"32",d:"M336 264.13V436c0 24.3-19.05 44-42.95 44H107c-23.95 0-43-19.7-43-44V172a44.26 44.26 0 0 1 44-44h94.12a24.55 24.55 0 0 1 17.49 7.36l109.15 111a25.4 25.4 0 0 1 7.24 17.77z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M200 128v108a28.34 28.34 0 0 0 28 28h108"},child:[]},{tag:"path",attr:{fill:"none",strokeLinejoin:"round",strokeWidth:"32",d:"M176 128V76a44.26 44.26 0 0 1 44-44h94a24.83 24.83 0 0 1 17.61 7.36l109.15 111A25.09 25.09 0 0 1 448 168v172c0 24.3-19.05 44-42.95 44H344"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M312 32v108a28.34 28.34 0 0 0 28 28h108"},child:[]}]})(e)}function H0(e){return H({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M85.57 446.25h340.86a32 32 0 0 0 28.17-47.17L284.18 82.58c-12.09-22.44-44.27-22.44-56.36 0L57.4 399.08a32 32 0 0 0 28.17 47.17z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"m250.26 195.39 5.74 122 5.73-121.95a5.74 5.74 0 0 0-5.79-6h0a5.74 5.74 0 0 0-5.68 5.95z"},child:[]},{tag:"path",attr:{d:"M256 397.25a20 20 0 1 1 20-20 20 20 0 0 1-20 20z"},child:[]}]})(e)}const Qd=({title:e,description:t,wrapperClassName:r})=>l.jsxs("div",{className:A("flex items-center py-2 px-3 bg-yellow-100 text-gray-900 border border-yellow-600 rounded text-sm",r),role:"alert",children:[l.jsx(H0,{className:"min-w-6 min-h-6 mr-2 text-yellow-600"}),l.jsxs("div",{children:[l.jsx("p",{className:"font-medium",children:e}),l.jsx("p",{children:t})]})]});function G0(e){return H({attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M8 8.707l3.646 3.647.708-.707L8.707 8l3.647-3.646-.707-.708L8 7.293 4.354 3.646l-.707.708L7.293 8l-3.646 3.646.707.708L8 8.707z"},child:[]}]})(e)}function q0(e){return H({attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M16 5H0V4h16v1zm0 8H0v-1h16v1zm0-4.008H0V8h16v.992z"},child:[]}]})(e)}function Z0(e){return H({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"},child:[]}]})(e)}function uo(e){return H({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"},child:[]}]})(e)}function K0(e){return H({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"},child:[]}]})(e)}function J0(e){return H({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"},child:[]}]})(e)}function ef(e){return H({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z"},child:[]}]})(e)}function X0(e){return H({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM224 416H64V160h160v256zm224 0H288V160h160v256z"},child:[]}]})(e)}function Q0(e){return H({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M0 168v-16c0-13.255 10.745-24 24-24h360V80c0-21.367 25.899-32.042 40.971-16.971l80 80c9.372 9.373 9.372 24.569 0 33.941l-80 80C409.956 271.982 384 261.456 384 240v-48H24c-13.255 0-24-10.745-24-24zm488 152H128v-48c0-21.314-25.862-32.08-40.971-16.971l-80 80c-9.372 9.373-9.372 24.569 0 33.941l80 80C102.057 463.997 128 453.437 128 432v-48h360c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24z"},child:[]}]})(e)}function ev(e){return H({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"},child:[]}]})(e)}function tv(e){return H({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"},child:[]}]})(e)}function rv(e){return H({attr:{viewBox:"0 0 192 512"},child:[{tag:"path",attr:{d:"M20 424.229h20V279.771H20c-11.046 0-20-8.954-20-20V212c0-11.046 8.954-20 20-20h112c11.046 0 20 8.954 20 20v212.229h20c11.046 0 20 8.954 20 20V492c0 11.046-8.954 20-20 20H20c-11.046 0-20-8.954-20-20v-47.771c0-11.046 8.954-20 20-20zM96 0C56.235 0 24 32.235 24 72s32.235 72 72 72 72-32.235 72-72S135.764 0 96 0z"},child:[]}]})(e)}function nv(e){return H({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M80 368H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm0-320H16A16 16 0 0 0 0 64v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16V64a16 16 0 0 0-16-16zm0 160H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm416 176H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"},child:[]}]})(e)}function sv(e){return H({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function iv(e){return H({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function av(e){return H({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M448 192V77.25c0-8.49-3.37-16.62-9.37-22.63L393.37 9.37c-6-6-14.14-9.37-22.63-9.37H96C78.33 0 64 14.33 64 32v160c-35.35 0-64 28.65-64 64v112c0 8.84 7.16 16 16 16h48v96c0 17.67 14.33 32 32 32h320c17.67 0 32-14.33 32-32v-96h48c8.84 0 16-7.16 16-16V256c0-35.35-28.65-64-64-64zm-64 256H128v-96h256v96zm0-224H128V64h192v48c0 8.84 7.16 16 16 16h48v96zm48 72c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"},child:[]}]})(e)}function ov(e){return H({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M416 448h-84c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h84c17.7 0 32-14.3 32-32V160c0-17.7-14.3-32-32-32h-84c-6.6 0-12-5.4-12-12V76c0-6.6 5.4-12 12-12h84c53 0 96 43 96 96v192c0 53-43 96-96 96zm-47-201L201 79c-15-15-41-4.5-41 17v96H24c-13.3 0-24 10.7-24 24v96c0 13.3 10.7 24 24 24h136v96c0 21.5 26 32 41 17l168-168c9.3-9.4 9.3-24.6 0-34z"},child:[]}]})(e)}function lv(e){return H({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497 273L329 441c-15 15-41 4.5-41-17v-96H152c-13.3 0-24-10.7-24-24v-96c0-13.3 10.7-24 24-24h136V88c0-21.4 25.9-32 41-17l168 168c9.3 9.4 9.3 24.6 0 34zM192 436v-40c0-6.6-5.4-12-12-12H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h84c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12H96c-53 0-96 43-96 96v192c0 53 43 96 96 96h84c6.6 0 12-5.4 12-12z"},child:[]}]})(e)}function cv(e){return H({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M624 208h-64v-64c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v64h-64c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h64v64c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-64h64c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm-400 48c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"},child:[]}]})(e)}function uv(e){return H({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"},child:[]}]})(e)}function tf(e){return H({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M148 288h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm108-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 96v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96-260v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"},child:[]}]})(e)}function dv(e){return H({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 48c110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200-110.532 0-200-89.451-200-200 0-110.532 89.451-200 200-200m140.204 130.267l-22.536-22.718c-4.667-4.705-12.265-4.736-16.97-.068L215.346 303.697l-59.792-60.277c-4.667-4.705-12.265-4.736-16.97-.069l-22.719 22.536c-4.705 4.667-4.736 12.265-.068 16.971l90.781 91.516c4.667 4.705 12.265 4.736 16.97.068l172.589-171.204c4.704-4.668 4.734-12.266.067-16.971z"},child:[]}]})(e)}function fv(e){return H({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M288 248v28c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-28c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12zm-12 72H108c-6.6 0-12 5.4-12 12v28c0 6.6 5.4 12 12 12h168c6.6 0 12-5.4 12-12v-28c0-6.6-5.4-12-12-12zm108-188.1V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V48C0 21.5 21.5 0 48 0h204.1C264.8 0 277 5.1 286 14.1L369.9 98c9 8.9 14.1 21.2 14.1 33.9zm-128-80V128h76.1L256 51.9zM336 464V176H232c-13.3 0-24-10.7-24-24V48H48v416h288z"},child:[]}]})(e)}function rf(e){return H({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M313.6 304c-28.7 0-42.5 16-89.6 16-47.1 0-60.8-16-89.6-16C60.2 304 0 364.2 0 438.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-25.6c0-74.2-60.2-134.4-134.4-134.4zM400 464H48v-25.6c0-47.6 38.8-86.4 86.4-86.4 14.6 0 38.3 16 89.6 16 51.7 0 74.9-16 89.6-16 47.6 0 86.4 38.8 86.4 86.4V464zM224 288c79.5 0 144-64.5 144-144S303.5 0 224 0 80 64.5 80 144s64.5 144 144 144zm0-240c52.9 0 96 43.1 96 96s-43.1 96-96 96-96-43.1-96-96 43.1-96 96-96z"},child:[]}]})(e)}const Oa="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2017.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='200px'%20height='200px'%20viewBox='0%200%20200%20200'%20enable-background='new%200%200%20200%20200'%20xml:space='preserve'%3e%3cg%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M162.966,141.076v-8.912h3.775v-11.155l-3.775,5.578v-11.313h13.111v25.803%20H162.966z%20M89.717,115.715L90,115.273h12.957v25.803h-13.24V133.3h3.776v-11.152l-3.776,5.575V115.715L89.717,115.715z%20M162.966,115.273v11.313l-3.773,5.577h3.773v8.912h-3.112l-3.604-2.817l-2.479,2.817h-23.546v-3.044l-4.619,3.044h-19.942v-25.803%20h10.59v18.479h13.971v-18.479h24.447l-5.069,8h-9.128l-0.111,10.479h9.463l12.396-18.479H162.966z%20M24.247,123.169l4.913-8.007%20h53.517l-4.959,8.007H66.34v2.02h9.351l-3.153,5.633H66.34v3.154h11.716l11.66-18.261v12.008l-3.774,5.577h3.774v7.776h-2.422%20l-3.492-2.366l-3.026,2.366H54.961v-17.907h-7.179l-0.148,17.907H37.158l0.227-17.907H24.247z'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%230063AF'%20d='M101.053,82.351l15.748-11.884l-5.014-17.082%20c3.354-1.359,4.345,0.157,2.977,4.547c3.469-0.267,6.195-6.255,5.171-10.346c-1.325-4.377-4.858-7.866-9.623-8.219l-9.259,0.062%20v6.779c2.376,0,4.314,1.956,4.314,4.35c0,2.395-1.939,4.348-4.314,4.348V82.351L101.053,82.351z%20M101.053,53.517v-5.642%20c1.454,0.071,2.617,1.312,2.617,2.82C103.67,52.206,102.506,53.446,101.053,53.517z%20M83.734,70.31l16.455,12.693l0.864-0.652%20V54.906c-2.373,0-4.31-1.953-4.31-4.348c0-2.393,1.937-4.35,4.31-4.35v-6.779l-1.177,0.007c-4.51-0.016-7.176,1.915-7.992,5.798%20L83.734,70.31L83.734,70.31z%20M101.053,47.875v5.642c-0.043,0.002-0.088,0.003-0.135,0.003c-1.514,0-2.749-1.267-2.749-2.825%20c0-1.555,1.234-2.823,2.749-2.823C100.965,47.872,101.01,47.874,101.053,47.875z'/%3e%3cpolygon%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%230063AF'%20points='100.32,85.407%20100.264,85.361%20100.034,85.18%2082.726,71.518%202.82,47.879%208.305,55.905%2023.35,60.579%2025.57,63.654%2041.296,68.782%2042.864,70.662%2059.111,75.42%2058.971,76.008%2014.297,64.672%2019.863,72.759%2034.43,76.36%2036.511,79.037%2052.234,82.967%2053.26,84.678%2065.91,88.096%2066.756,88.998%2024.822,79.892%2029.117,85.911%2044.202,89.633%2045.398,91.516%2061.122,94.251%2061.977,96.471%2072.919,98.18%2072.919,99.035%2034.566,93.849%2037.872,98.77%2052.405,100.744%2053.945,102.283%2067.277,104.333%2068.815,106.555%2078.31,106.535%2078.31,107.677%2043.983,107.507%2047.736,113.052%20100.319,113.052%20100.32,113.052%20152.902,113.052%20156.659,107.507%20122.327,107.677%20122.327,106.535%20131.826,106.555%20133.365,104.333%20146.695,102.283%20148.235,100.744%20162.767,98.77%20166.074,93.849%20127.721,99.035%20127.721,98.18%20138.663,96.471%20139.516,94.251%20155.241,91.516%20156.438,89.633%20171.522,85.911%20175.818,79.892%20133.885,88.998%20134.73,88.096%20147.381,84.678%20148.405,82.967%20164.131,79.037%20166.21,76.36%20180.779,72.759%20186.34,64.672%20141.67,76.008%20141.53,75.42%20157.777,70.662%20159.342,68.782%20175.068,63.654%20177.289,60.579%20192.334,55.905%20197.82,47.879%20117.914,71.518%20100.377,85.361%20'/%3e%3cpolygon%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%230063AF'%20points='86.882,143.313%20113.444,143.313%2099.961,160.474%20'/%3e%3c/g%3e%3c/svg%3e";function nf(e,t){return function(){return e.apply(t,arguments)}}const{toString:hv}=Object.prototype,{getPrototypeOf:fo}=Object,{iterator:yi,toStringTag:sf}=Symbol,xi=(e=>t=>{const r=hv.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),yt=e=>(e=e.toLowerCase(),t=>xi(t)===e),bi=e=>t=>typeof t===e,{isArray:sn}=Array,Jr=bi("undefined");function Bn(e){return e!==null&&!Jr(e)&&e.constructor!==null&&!Jr(e.constructor)&&Ke(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const af=yt("ArrayBuffer");function pv(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&af(e.buffer),t}const mv=bi("string"),Ke=bi("function"),of=bi("number"),Wn=e=>e!==null&&typeof e=="object",gv=e=>e===!0||e===!1,Ms=e=>{if(xi(e)!=="object")return!1;const t=fo(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(sf in e)&&!(yi in e)},vv=e=>{if(!Wn(e)||Bn(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},yv=yt("Date"),xv=yt("File"),bv=yt("Blob"),wv=yt("FileList"),Ev=e=>Wn(e)&&Ke(e.pipe),Sv=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ke(e.append)&&((t=xi(e))==="formdata"||t==="object"&&Ke(e.toString)&&e.toString()==="[object FormData]"))},kv=yt("URLSearchParams"),[Ov,_v,Cv,Lv]=["ReadableStream","Request","Response","Headers"].map(yt),Nv=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Yn(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),sn(e))for(n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else{if(Bn(e))return;const i=r?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let o;for(n=0;n<a;n++)o=i[n],t.call(null,e[o],o,e)}}function lf(e,t){if(Bn(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,s;for(;n-- >0;)if(s=r[n],t===s.toLowerCase())return s;return null}const vr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,cf=e=>!Jr(e)&&e!==vr;function _a(){const{caseless:e,skipUndefined:t}=cf(this)&&this||{},r={},n=(s,i)=>{const a=e&&lf(r,i)||i;Ms(r[a])&&Ms(s)?r[a]=_a(r[a],s):Ms(s)?r[a]=_a({},s):sn(s)?r[a]=s.slice():(!t||!Jr(s))&&(r[a]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&Yn(arguments[s],n);return r}const jv=(e,t,r,{allOwnKeys:n}={})=>(Yn(t,(s,i)=>{r&&Ke(s)?e[i]=nf(s,r):e[i]=s},{allOwnKeys:n}),e),Mv=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Tv=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Dv=(e,t,r,n)=>{let s,i,a;const o={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)a=s[i],(!n||n(a,e,t))&&!o[a]&&(t[a]=e[a],o[a]=!0);e=r!==!1&&fo(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Pv=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},Av=e=>{if(!e)return null;if(sn(e))return e;let t=e.length;if(!of(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Rv=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&fo(Uint8Array)),Iv=(e,t)=>{const n=(e&&e[yi]).call(e);let s;for(;(s=n.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},Fv=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},$v=yt("HTMLFormElement"),Uv=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),Vc=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Vv=yt("RegExp"),uf=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Yn(r,(s,i)=>{let a;(a=t(s,i,e))!==!1&&(n[i]=a||s)}),Object.defineProperties(e,n)},zv=e=>{uf(e,(t,r)=>{if(Ke(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(Ke(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Bv=(e,t)=>{const r={},n=s=>{s.forEach(i=>{r[i]=!0})};return sn(e)?n(e):n(String(e).split(t)),r},Wv=()=>{},Yv=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Hv(e){return!!(e&&Ke(e.append)&&e[sf]==="FormData"&&e[yi])}const Gv=e=>{const t=new Array(10),r=(n,s)=>{if(Wn(n)){if(t.indexOf(n)>=0)return;if(Bn(n))return n;if(!("toJSON"in n)){t[s]=n;const i=sn(n)?[]:{};return Yn(n,(a,o)=>{const c=r(a,s+1);!Jr(c)&&(i[o]=c)}),t[s]=void 0,i}}return n};return r(e,0)},qv=yt("AsyncFunction"),Zv=e=>e&&(Wn(e)||Ke(e))&&Ke(e.then)&&Ke(e.catch),df=((e,t)=>e?setImmediate:t?((r,n)=>(vr.addEventListener("message",({source:s,data:i})=>{s===vr&&i===r&&n.length&&n.shift()()},!1),s=>{n.push(s),vr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Ke(vr.postMessage)),Kv=typeof queueMicrotask<"u"?queueMicrotask.bind(vr):typeof process<"u"&&process.nextTick||df,Jv=e=>e!=null&&Ke(e[yi]),L={isArray:sn,isArrayBuffer:af,isBuffer:Bn,isFormData:Sv,isArrayBufferView:pv,isString:mv,isNumber:of,isBoolean:gv,isObject:Wn,isPlainObject:Ms,isEmptyObject:vv,isReadableStream:Ov,isRequest:_v,isResponse:Cv,isHeaders:Lv,isUndefined:Jr,isDate:yv,isFile:xv,isBlob:bv,isRegExp:Vv,isFunction:Ke,isStream:Ev,isURLSearchParams:kv,isTypedArray:Rv,isFileList:wv,forEach:Yn,merge:_a,extend:jv,trim:Nv,stripBOM:Mv,inherits:Tv,toFlatObject:Dv,kindOf:xi,kindOfTest:yt,endsWith:Pv,toArray:Av,forEachEntry:Iv,matchAll:Fv,isHTMLForm:$v,hasOwnProperty:Vc,hasOwnProp:Vc,reduceDescriptors:uf,freezeMethods:zv,toObjectSet:Bv,toCamelCase:Uv,noop:Wv,toFiniteNumber:Yv,findKey:lf,global:vr,isContextDefined:cf,isSpecCompliantForm:Hv,toJSONObject:Gv,isAsyncFn:qv,isThenable:Zv,setImmediate:df,asap:Kv,isIterable:Jv};function se(e,t,r,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}L.inherits(se,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:L.toJSONObject(this.config),code:this.code,status:this.status}}});const ff=se.prototype,hf={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{hf[e]={value:e}});Object.defineProperties(se,hf);Object.defineProperty(ff,"isAxiosError",{value:!0});se.from=(e,t,r,n,s,i)=>{const a=Object.create(ff);L.toFlatObject(e,a,function(f){return f!==Error.prototype},d=>d!=="isAxiosError");const o=e&&e.message?e.message:"Error",c=t==null&&e?e.code:t;return se.call(a,o,c,r,n,s),e&&a.cause==null&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",i&&Object.assign(a,i),a};const Xv=null;function Ca(e){return L.isPlainObject(e)||L.isArray(e)}function pf(e){return L.endsWith(e,"[]")?e.slice(0,-2):e}function zc(e,t,r){return e?e.concat(t).map(function(s,i){return s=pf(s),!r&&i?"["+s+"]":s}).join(r?".":""):t}function Qv(e){return L.isArray(e)&&!e.some(Ca)}const ey=L.toFlatObject(L,{},null,function(t){return/^is[A-Z]/.test(t)});function wi(e,t,r){if(!L.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=L.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,y){return!L.isUndefined(y[x])});const n=r.metaTokens,s=r.visitor||f,i=r.dots,a=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&L.isSpecCompliantForm(t);if(!L.isFunction(s))throw new TypeError("visitor must be a function");function d(m){if(m===null)return"";if(L.isDate(m))return m.toISOString();if(L.isBoolean(m))return m.toString();if(!c&&L.isBlob(m))throw new se("Blob is not supported. Use a Buffer instead.");return L.isArrayBuffer(m)||L.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function f(m,x,y){let E=m;if(m&&!y&&typeof m=="object"){if(L.endsWith(x,"{}"))x=n?x:x.slice(0,-2),m=JSON.stringify(m);else if(L.isArray(m)&&Qv(m)||(L.isFileList(m)||L.endsWith(x,"[]"))&&(E=L.toArray(m)))return x=pf(x),E.forEach(function(O,b){!(L.isUndefined(O)||O===null)&&t.append(a===!0?zc([x],b,i):a===null?x:x+"[]",d(O))}),!1}return Ca(m)?!0:(t.append(zc(y,x,i),d(m)),!1)}const h=[],p=Object.assign(ey,{defaultVisitor:f,convertValue:d,isVisitable:Ca});function v(m,x){if(!L.isUndefined(m)){if(h.indexOf(m)!==-1)throw Error("Circular reference detected in "+x.join("."));h.push(m),L.forEach(m,function(E,k){(!(L.isUndefined(E)||E===null)&&s.call(t,E,L.isString(k)?k.trim():k,x,p))===!0&&v(E,x?x.concat(k):[k])}),h.pop()}}if(!L.isObject(e))throw new TypeError("data must be an object");return v(e),t}function Bc(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function ho(e,t){this._pairs=[],e&&wi(e,this,t)}const mf=ho.prototype;mf.append=function(t,r){this._pairs.push([t,r])};mf.toString=function(t){const r=t?function(n){return t.call(this,n,Bc)}:Bc;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function ty(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function gf(e,t,r){if(!t)return e;const n=r&&r.encode||ty;L.isFunction(r)&&(r={serialize:r});const s=r&&r.serialize;let i;if(s?i=s(t,r):i=L.isURLSearchParams(t)?t.toString():new ho(t,r).toString(n),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Wc{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){L.forEach(this.handlers,function(n){n!==null&&t(n)})}}const vf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ry=typeof URLSearchParams<"u"?URLSearchParams:ho,ny=typeof FormData<"u"?FormData:null,sy=typeof Blob<"u"?Blob:null,iy={isBrowser:!0,classes:{URLSearchParams:ry,FormData:ny,Blob:sy},protocols:["http","https","file","blob","url","data"]},po=typeof window<"u"&&typeof document<"u",La=typeof navigator=="object"&&navigator||void 0,ay=po&&(!La||["ReactNative","NativeScript","NS"].indexOf(La.product)<0),oy=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ly=po&&window.location.href||"http://localhost",cy=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:po,hasStandardBrowserEnv:ay,hasStandardBrowserWebWorkerEnv:oy,navigator:La,origin:ly},Symbol.toStringTag,{value:"Module"})),We={...cy,...iy};function uy(e,t){return wi(e,new We.classes.URLSearchParams,{visitor:function(r,n,s,i){return We.isNode&&L.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function dy(e){return L.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function fy(e){const t={},r=Object.keys(e);let n;const s=r.length;let i;for(n=0;n<s;n++)i=r[n],t[i]=e[i];return t}function yf(e){function t(r,n,s,i){let a=r[i++];if(a==="__proto__")return!0;const o=Number.isFinite(+a),c=i>=r.length;return a=!a&&L.isArray(s)?s.length:a,c?(L.hasOwnProp(s,a)?s[a]=[s[a],n]:s[a]=n,!o):((!s[a]||!L.isObject(s[a]))&&(s[a]=[]),t(r,n,s[a],i)&&L.isArray(s[a])&&(s[a]=fy(s[a])),!o)}if(L.isFormData(e)&&L.isFunction(e.entries)){const r={};return L.forEachEntry(e,(n,s)=>{t(dy(n),s,r,0)}),r}return null}function hy(e,t,r){if(L.isString(e))try{return(t||JSON.parse)(e),L.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Hn={transitional:vf,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,i=L.isObject(t);if(i&&L.isHTMLForm(t)&&(t=new FormData(t)),L.isFormData(t))return s?JSON.stringify(yf(t)):t;if(L.isArrayBuffer(t)||L.isBuffer(t)||L.isStream(t)||L.isFile(t)||L.isBlob(t)||L.isReadableStream(t))return t;if(L.isArrayBufferView(t))return t.buffer;if(L.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return uy(t,this.formSerializer).toString();if((o=L.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return wi(o?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||s?(r.setContentType("application/json",!1),hy(t)):t}],transformResponse:[function(t){const r=this.transitional||Hn.transitional,n=r&&r.forcedJSONParsing,s=this.responseType==="json";if(L.isResponse(t)||L.isReadableStream(t))return t;if(t&&L.isString(t)&&(n&&!this.responseType||s)){const a=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(o){if(a)throw o.name==="SyntaxError"?se.from(o,se.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:We.classes.FormData,Blob:We.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};L.forEach(["delete","get","head","post","put","patch"],e=>{Hn.headers[e]={}});const py=L.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),my=e=>{const t={};let r,n,s;return e&&e.split(`
|
|
31
31
|
`).forEach(function(a){s=a.indexOf(":"),r=a.substring(0,s).trim().toLowerCase(),n=a.substring(s+1).trim(),!(!r||t[r]&&py[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Yc=Symbol("internals");function yn(e){return e&&String(e).trim().toLowerCase()}function Ts(e){return e===!1||e==null?e:L.isArray(e)?e.map(Ts):String(e)}function gy(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const vy=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ta(e,t,r,n,s){if(L.isFunction(n))return n.call(this,t,r);if(s&&(t=r),!!L.isString(t)){if(L.isString(n))return t.indexOf(n)!==-1;if(L.isRegExp(n))return n.test(t)}}function yy(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function xy(e,t){const r=L.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(s,i,a){return this[n].call(this,t,s,i,a)},configurable:!0})})}let Je=class{constructor(t){t&&this.set(t)}set(t,r,n){const s=this;function i(o,c,d){const f=yn(c);if(!f)throw new Error("header name must be a non-empty string");const h=L.findKey(s,f);(!h||s[h]===void 0||d===!0||d===void 0&&s[h]!==!1)&&(s[h||c]=Ts(o))}const a=(o,c)=>L.forEach(o,(d,f)=>i(d,f,c));if(L.isPlainObject(t)||t instanceof this.constructor)a(t,r);else if(L.isString(t)&&(t=t.trim())&&!vy(t))a(my(t),r);else if(L.isObject(t)&&L.isIterable(t)){let o={},c,d;for(const f of t){if(!L.isArray(f))throw TypeError("Object iterator must return a key-value pair");o[d=f[0]]=(c=o[d])?L.isArray(c)?[...c,f[1]]:[c,f[1]]:f[1]}a(o,r)}else t!=null&&i(r,t,n);return this}get(t,r){if(t=yn(t),t){const n=L.findKey(this,t);if(n){const s=this[n];if(!r)return s;if(r===!0)return gy(s);if(L.isFunction(r))return r.call(this,s,n);if(L.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=yn(t),t){const n=L.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||ta(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let s=!1;function i(a){if(a=yn(a),a){const o=L.findKey(n,a);o&&(!r||ta(n,n[o],o,r))&&(delete n[o],s=!0)}}return L.isArray(t)?t.forEach(i):i(t),s}clear(t){const r=Object.keys(this);let n=r.length,s=!1;for(;n--;){const i=r[n];(!t||ta(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const r=this,n={};return L.forEach(this,(s,i)=>{const a=L.findKey(n,i);if(a){r[a]=Ts(s),delete r[i];return}const o=t?yy(i):String(i).trim();o!==i&&delete r[i],r[o]=Ts(s),n[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return L.forEach(this,(n,s)=>{n!=null&&n!==!1&&(r[s]=t&&L.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
32
32
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(s=>n.set(s)),n}static accessor(t){const n=(this[Yc]=this[Yc]={accessors:{}}).accessors,s=this.prototype;function i(a){const o=yn(a);n[o]||(xy(s,a),n[o]=!0)}return L.isArray(t)?t.forEach(i):i(t),this}};Je.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);L.reduceDescriptors(Je.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});L.freezeMethods(Je);function ra(e,t){const r=this||Hn,n=t||r,s=Je.from(n.headers);let i=n.data;return L.forEach(e,function(o){i=o.call(r,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function xf(e){return!!(e&&e.__CANCEL__)}function an(e,t,r){se.call(this,e??"canceled",se.ERR_CANCELED,t,r),this.name="CanceledError"}L.inherits(an,se,{__CANCEL__:!0});function bf(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new se("Request failed with status code "+r.status,[se.ERR_BAD_REQUEST,se.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function by(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function wy(e,t){e=e||10;const r=new Array(e),n=new Array(e);let s=0,i=0,a;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),f=n[i];a||(a=d),r[s]=c,n[s]=d;let h=i,p=0;for(;h!==s;)p+=r[h++],h=h%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),d-a<t)return;const v=f&&d-f;return v?Math.round(p*1e3/v):void 0}}function Ey(e,t){let r=0,n=1e3/t,s,i;const a=(d,f=Date.now())=>{r=f,s=null,i&&(clearTimeout(i),i=null),e(...d)};return[(...d)=>{const f=Date.now(),h=f-r;h>=n?a(d,f):(s=d,i||(i=setTimeout(()=>{i=null,a(s)},n-h)))},()=>s&&a(s)]}const Qs=(e,t,r=3)=>{let n=0;const s=wy(50,250);return Ey(i=>{const a=i.loaded,o=i.lengthComputable?i.total:void 0,c=a-n,d=s(c),f=a<=o;n=a;const h={loaded:a,total:o,progress:o?a/o:void 0,bytes:c,rate:d||void 0,estimated:d&&o&&f?(o-a)/d:void 0,event:i,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(h)},r)},Hc=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Gc=e=>(...t)=>L.asap(()=>e(...t)),Sy=We.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,We.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(We.origin),We.navigator&&/(msie|trident)/i.test(We.navigator.userAgent)):()=>!0,ky=We.hasStandardBrowserEnv?{write(e,t,r,n,s,i,a){if(typeof document>"u")return;const o=[`${e}=${encodeURIComponent(t)}`];L.isNumber(r)&&o.push(`expires=${new Date(r).toUTCString()}`),L.isString(n)&&o.push(`path=${n}`),L.isString(s)&&o.push(`domain=${s}`),i===!0&&o.push("secure"),L.isString(a)&&o.push(`SameSite=${a}`),document.cookie=o.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Oy(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function _y(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function wf(e,t,r){let n=!Oy(t);return e&&(n||r==!1)?_y(e,t):t}const qc=e=>e instanceof Je?{...e}:e;function kr(e,t){t=t||{};const r={};function n(d,f,h,p){return L.isPlainObject(d)&&L.isPlainObject(f)?L.merge.call({caseless:p},d,f):L.isPlainObject(f)?L.merge({},f):L.isArray(f)?f.slice():f}function s(d,f,h,p){if(L.isUndefined(f)){if(!L.isUndefined(d))return n(void 0,d,h,p)}else return n(d,f,h,p)}function i(d,f){if(!L.isUndefined(f))return n(void 0,f)}function a(d,f){if(L.isUndefined(f)){if(!L.isUndefined(d))return n(void 0,d)}else return n(void 0,f)}function o(d,f,h){if(h in t)return n(d,f);if(h in e)return n(void 0,d)}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:o,headers:(d,f,h)=>s(qc(d),qc(f),h,!0)};return L.forEach(Object.keys({...e,...t}),function(f){const h=c[f]||s,p=h(e[f],t[f],f);L.isUndefined(p)&&h!==o||(r[f]=p)}),r}const Ef=e=>{const t=kr({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:o}=t;if(t.headers=a=Je.from(a),t.url=gf(wf(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),o&&a.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):""))),L.isFormData(r)){if(We.hasStandardBrowserEnv||We.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(L.isFunction(r.getHeaders)){const c=r.getHeaders(),d=["content-type","content-length"];Object.entries(c).forEach(([f,h])=>{d.includes(f.toLowerCase())&&a.set(f,h)})}}if(We.hasStandardBrowserEnv&&(n&&L.isFunction(n)&&(n=n(t)),n||n!==!1&&Sy(t.url))){const c=s&&i&&ky.read(i);c&&a.set(s,c)}return t},Cy=typeof XMLHttpRequest<"u",Ly=Cy&&function(e){return new Promise(function(r,n){const s=Ef(e);let i=s.data;const a=Je.from(s.headers).normalize();let{responseType:o,onUploadProgress:c,onDownloadProgress:d}=s,f,h,p,v,m;function x(){v&&v(),m&&m(),s.cancelToken&&s.cancelToken.unsubscribe(f),s.signal&&s.signal.removeEventListener("abort",f)}let y=new XMLHttpRequest;y.open(s.method.toUpperCase(),s.url,!0),y.timeout=s.timeout;function E(){if(!y)return;const O=Je.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),g={data:!o||o==="text"||o==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:O,config:e,request:y};bf(function(S){r(S),x()},function(S){n(S),x()},g),y=null}"onloadend"in y?y.onloadend=E:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(E)},y.onabort=function(){y&&(n(new se("Request aborted",se.ECONNABORTED,e,y)),y=null)},y.onerror=function(b){const g=b&&b.message?b.message:"Network Error",w=new se(g,se.ERR_NETWORK,e,y);w.event=b||null,n(w),y=null},y.ontimeout=function(){let b=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const g=s.transitional||vf;s.timeoutErrorMessage&&(b=s.timeoutErrorMessage),n(new se(b,g.clarifyTimeoutError?se.ETIMEDOUT:se.ECONNABORTED,e,y)),y=null},i===void 0&&a.setContentType(null),"setRequestHeader"in y&&L.forEach(a.toJSON(),function(b,g){y.setRequestHeader(g,b)}),L.isUndefined(s.withCredentials)||(y.withCredentials=!!s.withCredentials),o&&o!=="json"&&(y.responseType=s.responseType),d&&([p,m]=Qs(d,!0),y.addEventListener("progress",p)),c&&y.upload&&([h,v]=Qs(c),y.upload.addEventListener("progress",h),y.upload.addEventListener("loadend",v)),(s.cancelToken||s.signal)&&(f=O=>{y&&(n(!O||O.type?new an(null,e,y):O),y.abort(),y=null)},s.cancelToken&&s.cancelToken.subscribe(f),s.signal&&(s.signal.aborted?f():s.signal.addEventListener("abort",f)));const k=by(s.url);if(k&&We.protocols.indexOf(k)===-1){n(new se("Unsupported protocol "+k+":",se.ERR_BAD_REQUEST,e));return}y.send(i||null)})},Ny=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,s;const i=function(d){if(!s){s=!0,o();const f=d instanceof Error?d:this.reason;n.abort(f instanceof se?f:new an(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,i(new se(`timeout ${t} of ms exceeded`,se.ETIMEDOUT))},t);const o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(i):d.removeEventListener("abort",i)}),e=null)};e.forEach(d=>d.addEventListener("abort",i));const{signal:c}=n;return c.unsubscribe=()=>L.asap(o),c}},jy=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,s;for(;n<r;)s=n+t,yield e.slice(n,s),n=s},My=async function*(e,t){for await(const r of Ty(e))yield*jy(r,t)},Ty=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},Zc=(e,t,r,n)=>{const s=My(e,t);let i=0,a,o=c=>{a||(a=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:d,value:f}=await s.next();if(d){o(),c.close();return}let h=f.byteLength;if(r){let p=i+=h;r(p)}c.enqueue(new Uint8Array(f))}catch(d){throw o(d),d}},cancel(c){return o(c),s.return()}},{highWaterMark:2})},Kc=64*1024,{isFunction:gs}=L,Dy=(({Request:e,Response:t})=>({Request:e,Response:t}))(L.global),{ReadableStream:Jc,TextEncoder:Xc}=L.global,Qc=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Py=e=>{e=L.merge.call({skipUndefined:!0},Dy,e);const{fetch:t,Request:r,Response:n}=e,s=t?gs(t):typeof fetch=="function",i=gs(r),a=gs(n);if(!s)return!1;const o=s&&gs(Jc),c=s&&(typeof Xc=="function"?(m=>x=>m.encode(x))(new Xc):async m=>new Uint8Array(await new r(m).arrayBuffer())),d=i&&o&&Qc(()=>{let m=!1;const x=new r(We.origin,{body:new Jc,method:"POST",get duplex(){return m=!0,"half"}}).headers.has("Content-Type");return m&&!x}),f=a&&o&&Qc(()=>L.isReadableStream(new n("").body)),h={stream:f&&(m=>m.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!h[m]&&(h[m]=(x,y)=>{let E=x&&x[m];if(E)return E.call(x);throw new se(`Response type '${m}' is not supported`,se.ERR_NOT_SUPPORT,y)})});const p=async m=>{if(m==null)return 0;if(L.isBlob(m))return m.size;if(L.isSpecCompliantForm(m))return(await new r(We.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(L.isArrayBufferView(m)||L.isArrayBuffer(m))return m.byteLength;if(L.isURLSearchParams(m)&&(m=m+""),L.isString(m))return(await c(m)).byteLength},v=async(m,x)=>{const y=L.toFiniteNumber(m.getContentLength());return y??p(x)};return async m=>{let{url:x,method:y,data:E,signal:k,cancelToken:O,timeout:b,onDownloadProgress:g,onUploadProgress:w,responseType:S,headers:C,withCredentials:_="same-origin",fetchOptions:M}=Ef(m),D=t||fetch;S=S?(S+"").toLowerCase():"text";let F=Ny([k,O&&O.toAbortSignal()],b),z=null;const W=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let G;try{if(w&&d&&y!=="get"&&y!=="head"&&(G=await v(C,E))!==0){let Q=new r(x,{method:"POST",body:E,duplex:"half"}),ee;if(L.isFormData(E)&&(ee=Q.headers.get("content-type"))&&C.setContentType(ee),Q.body){const[Y,ce]=Hc(G,Qs(Gc(w)));E=Zc(Q.body,Kc,Y,ce)}}L.isString(_)||(_=_?"include":"omit");const $=i&&"credentials"in r.prototype,X={...M,signal:F,method:y.toUpperCase(),headers:C.normalize().toJSON(),body:E,duplex:"half",credentials:$?_:void 0};z=i&&new r(x,X);let J=await(i?D(z,M):D(x,X));const le=f&&(S==="stream"||S==="response");if(f&&(g||le&&W)){const Q={};["status","statusText","headers"].forEach(T=>{Q[T]=J[T]});const ee=L.toFiniteNumber(J.headers.get("content-length")),[Y,ce]=g&&Hc(ee,Qs(Gc(g),!0))||[];J=new n(Zc(J.body,Kc,Y,()=>{ce&&ce(),W&&W()}),Q)}S=S||"text";let re=await h[L.findKey(h,S)||"text"](J,m);return!le&&W&&W(),await new Promise((Q,ee)=>{bf(Q,ee,{data:re,headers:Je.from(J.headers),status:J.status,statusText:J.statusText,config:m,request:z})})}catch($){throw W&&W(),$&&$.name==="TypeError"&&/Load failed|fetch/i.test($.message)?Object.assign(new se("Network Error",se.ERR_NETWORK,m,z),{cause:$.cause||$}):se.from($,$&&$.code,m,z)}}},Ay=new Map,Sf=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:s}=t,i=[n,s,r];let a=i.length,o=a,c,d,f=Ay;for(;o--;)c=i[o],d=f.get(c),d===void 0&&f.set(c,d=o?new Map:Py(t)),f=d;return d};Sf();const mo={http:Xv,xhr:Ly,fetch:{get:Sf}};L.forEach(mo,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const eu=e=>`- ${e}`,Ry=e=>L.isFunction(e)||e===null||e===!1;function Iy(e,t){e=L.isArray(e)?e:[e];const{length:r}=e;let n,s;const i={};for(let a=0;a<r;a++){n=e[a];let o;if(s=n,!Ry(n)&&(s=mo[(o=String(n)).toLowerCase()],s===void 0))throw new se(`Unknown adapter '${o}'`);if(s&&(L.isFunction(s)||(s=s.get(t))))break;i[o||"#"+a]=s}if(!s){const a=Object.entries(i).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let o=r?a.length>1?`since :
|
|
33
33
|
`+a.map(eu).join(`
|
|
@@ -58,7 +58,7 @@ Take a look at the reducer(s) handling this action type: ${v.type}.
|
|
|
58
58
|
* LICENSE file in the root directory of this source tree.
|
|
59
59
|
*/var yu;function Wx(){return yu||(yu=1,process.env.NODE_ENV!=="production"&&(function(){function e(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=u,r=typeof Object.is=="function"?Object.is:e,n=t.useSyncExternalStore,s=t.useRef,i=t.useEffect,a=t.useMemo,o=t.useDebugValue;la.useSyncExternalStoreWithSelector=function(c,d,f,h,p){var v=s(null);if(v.current===null){var m={hasValue:!1,value:null};v.current=m}else m=v.current;v=a(function(){function y(g){if(!E){if(E=!0,k=g,g=h(g),p!==void 0&&m.hasValue){var w=m.value;if(p(w,g))return O=w}return O=g}if(w=O,r(k,g))return w;var S=h(g);return p!==void 0&&p(w,S)?(k=g,w):(k=g,O=S)}var E=!1,k,O,b=f===void 0?null:f;return[function(){return y(d())},b===null?void 0:function(){return y(b())}]},[d,f,h,p]);var x=n(c,v[0],v[1]);return i(function(){m.hasValue=!0,m.value=x},[x]),o(x),x},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),la}var xu;function Yx(){return xu||(xu=1,process.env.NODE_ENV==="production"?ws.exports=Bx():ws.exports=Wx()),ws.exports}var Hx=Yx(),Gx=Symbol.for("react-redux-context"),qx=typeof globalThis<"u"?globalThis:{};function Zx(){if(!Jt.createContext)return{};const e=qx[Gx]??=new Map;let t=e.get(Jt.createContext);return t||(t=Jt.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(Jt.createContext,t)),t}var _r=Zx();function wo(e=_r){return function(){const r=Jt.useContext(e);if(process.env.NODE_ENV!=="production"&&!r)throw new Error("could not find react-redux context value; please ensure the component is wrapped in a <Provider>");return r}}var Jf=wo();function Xf(e=_r){const t=e===_r?Jf:wo(e),r=()=>{const{store:n}=t();return n};return Object.assign(r,{withTypes:()=>r}),r}var Qf=Xf();function Kx(e=_r){const t=e===_r?Qf:Xf(e),r=()=>t().dispatch;return Object.assign(r,{withTypes:()=>r}),r}var Jx=Kx(),Xx=(e,t)=>e===t;function Qx(e=_r){const t=e===_r?Jf:wo(e),r=(n,s={})=>{const{equalityFn:i=Xx}=typeof s=="function"?{equalityFn:s}:s;if(process.env.NODE_ENV!=="production"){if(!n)throw new Error("You must pass a selector to useSelector");if(typeof n!="function")throw new Error("You must pass a function as a selector to useSelector");if(typeof i!="function")throw new Error("You must pass a function as an equality function to useSelector")}const a=t(),{store:o,subscription:c,getServerState:d}=a,f=Jt.useRef(!0),h=Jt.useCallback({[n.name](v){const m=n(v);if(process.env.NODE_ENV!=="production"){const{devModeChecks:x={}}=typeof s=="function"?{}:s,{identityFunctionCheck:y,stabilityCheck:E}=a,{identityFunctionCheck:k,stabilityCheck:O}={stabilityCheck:E,identityFunctionCheck:y,...x};if(O==="always"||O==="once"&&f.current){const b=n(v);if(!i(m,b)){let g;try{throw new Error}catch(w){({stack:g}=w)}console.warn("Selector "+(n.name||"unknown")+` returned a different result when called with the same parameters. This can lead to unnecessary rerenders.
|
|
60
60
|
Selectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization`,{state:v,selected:m,selected2:b,stack:g})}}if((k==="always"||k==="once"&&f.current)&&m===v){let b;try{throw new Error}catch(g){({stack:b}=g)}console.warn("Selector "+(n.name||"unknown")+` returned the root state when called. This can lead to unnecessary rerenders.
|
|
61
|
-
Selectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.`,{stack:b})}f.current&&(f.current=!1)}return m}}[n.name],[n]),p=Hx.useSyncExternalStoreWithSelector(c.addNestedSub,o.getState,d||o.getState,h,i);return Jt.useDebugValue(p),p};return Object.assign(r,{withTypes:()=>r}),r}var e1=Qx();const Eo=Jx,t1=e1,eh=Qf;var Es={},Ss={},bu;function r1(){if(bu)return Ss;bu=1,Ss.__esModule=!0,Ss.default=s;function e(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(o){return typeof o}:e=function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},e(i)}function t(){}var r={getItem:t,setItem:t,removeItem:t};function n(i){if((typeof self>"u"?"undefined":e(self))!=="object"||!(i in self))return!1;try{var a=self[i],o="redux-persist ".concat(i," test");a.setItem(o,"test"),a.getItem(o),a.removeItem(o)}catch{return process.env.NODE_ENV!=="production"&&console.warn("redux-persist ".concat(i," test failed, persistence will be disabled.")),!1}return!0}function s(i){var a="".concat(i,"Storage");return n(a)?self[a]:(process.env.NODE_ENV!=="production"&&console.error("redux-persist failed to create sync storage. falling back to noop storage."),r)}return Ss}var wu;function n1(){if(wu)return Es;wu=1,Es.__esModule=!0,Es.default=r;var e=t(r1());function t(n){return n&&n.__esModule?n:{default:n}}function r(n){var s=(0,e.default)(n);return{getItem:function(a){return new Promise(function(o,c){o(s.getItem(a))})},setItem:function(a,o){return new Promise(function(c,d){c(s.setItem(a,o))})},removeItem:function(a){return new Promise(function(o,c){o(s.removeItem(a))})}}}return Es}var s1=n1();const i1=to(s1),a1=()=>({getItem(e){return Promise.resolve(null)},setItem(e,t){return Promise.resolve(t)},removeItem(e){return Promise.resolve()}}),o1=typeof window<"u"?i1("local"):a1();var So="persist:",ko="persist/FLUSH",ji="persist/REHYDRATE",Oo="persist/PAUSE",_o="persist/PERSIST",Co="persist/PURGE",Lo="persist/REGISTER",l1=-1;function On(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?On=function(r){return typeof r}:On=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},On(e)}function Eu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function c1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Eu(r,!0).forEach(function(n){u1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Eu(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function u1(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d1(e,t,r,n){var s=n.debug,i=c1({},r);return e&&On(e)==="object"&&Object.keys(e).forEach(function(a){if(a!=="_persist"){if(t[a]!==r[a]){process.env.NODE_ENV!=="production"&&s&&console.log("redux-persist/stateReconciler: sub state for key `%s` modified, skipping.",a);return}i[a]=e[a]}}),process.env.NODE_ENV!=="production"&&s&&e&&On(e)==="object"&&console.log("redux-persist/stateReconciler: rehydrated keys '".concat(Object.keys(e).join(", "),"'")),i}function f1(e){var t=e.blacklist||null,r=e.whitelist||null,n=e.transforms||[],s=e.throttle||0,i="".concat(e.keyPrefix!==void 0?e.keyPrefix:So).concat(e.key),a=e.storage,o;e.serialize===!1?o=function(g){return g}:typeof e.serialize=="function"?o=e.serialize:o=h1;var c=e.writeFailHandler||null,d={},f={},h=[],p=null,v=null,m=function(g){Object.keys(g).forEach(function(w){E(w)&&d[w]!==g[w]&&h.indexOf(w)===-1&&h.push(w)}),Object.keys(d).forEach(function(w){g[w]===void 0&&E(w)&&h.indexOf(w)===-1&&d[w]!==void 0&&h.push(w)}),p===null&&(p=setInterval(x,s)),d=g};function x(){if(h.length===0){p&&clearInterval(p),p=null;return}var b=h.shift(),g=n.reduce(function(w,S){return S.in(w,b,d)},d[b]);if(g!==void 0)try{f[b]=o(g)}catch(w){console.error("redux-persist/createPersistoid: error serializing state",w)}else delete f[b];h.length===0&&y()}function y(){Object.keys(f).forEach(function(b){d[b]===void 0&&delete f[b]}),v=a.setItem(i,o(f)).catch(k)}function E(b){return!(r&&r.indexOf(b)===-1&&b!=="_persist"||t&&t.indexOf(b)!==-1)}function k(b){c&&c(b),b&&process.env.NODE_ENV!=="production"&&console.error("Error storing data",b)}var O=function(){for(;h.length!==0;)x();return v||Promise.resolve()};return{update:m,flush:O}}function h1(e){return JSON.stringify(e)}function p1(e){var t=e.transforms||[],r="".concat(e.keyPrefix!==void 0?e.keyPrefix:So).concat(e.key),n=e.storage,s=e.debug,i;return e.deserialize===!1?i=function(o){return o}:typeof e.deserialize=="function"?i=e.deserialize:i=m1,n.getItem(r).then(function(a){if(a)try{var o={},c=i(a);return Object.keys(c).forEach(function(d){o[d]=t.reduceRight(function(f,h){return h.out(f,d,c)},i(c[d]))}),o}catch(d){throw process.env.NODE_ENV!=="production"&&s&&console.log("redux-persist/getStoredState: Error restoring data ".concat(a),d),d}else return})}function m1(e){return JSON.parse(e)}function g1(e){var t=e.storage,r="".concat(e.keyPrefix!==void 0?e.keyPrefix:So).concat(e.key);return t.removeItem(r,v1)}function v1(e){e&&process.env.NODE_ENV!=="production"&&console.error("redux-persist/purgeStoredState: Error purging data stored state",e)}function Su(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Nt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Su(r,!0).forEach(function(n){y1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Su(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function y1(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x1(e,t){if(e==null)return{};var r=b1(e,t),n,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)n=i[s],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function b1(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,i;for(i=0;i<n.length;i++)s=n[i],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}var w1=5e3;function E1(e,t){if(process.env.NODE_ENV!=="production"){if(!e)throw new Error("config is required for persistReducer");if(!e.key)throw new Error("key is required in persistor config");if(!e.storage)throw new Error("redux-persist: config.storage is required. Try using one of the provided storage engines `import storage from 'redux-persist/lib/storage'`")}var r=e.version!==void 0?e.version:l1;e.debug;var n=e.stateReconciler===void 0?d1:e.stateReconciler,s=e.getStoredState||p1,i=e.timeout!==void 0?e.timeout:w1,a=null,o=!1,c=!0,d=function(h){return h._persist.rehydrated&&a&&!c&&a.update(h),h};return function(f,h){var p=f||{},v=p._persist,m=x1(p,["_persist"]),x=m;if(h.type===_o){var y=!1,E=function(C,_){process.env.NODE_ENV!=="production"&&y&&console.error('redux-persist: rehydrate for "'.concat(e.key,'" called after timeout.'),C,_),y||(h.rehydrate(e.key,C,_),y=!0)};if(i&&setTimeout(function(){!y&&E(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},i),c=!1,a||(a=f1(e)),v)return Nt({},t(x,h),{_persist:v});if(typeof h.rehydrate!="function"||typeof h.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return h.register(e.key),s(e).then(function(S){var C=e.migrate||function(_,M){return Promise.resolve(_)};C(S,r).then(function(_){E(_)},function(_){process.env.NODE_ENV!=="production"&&_&&console.error("redux-persist: migration error",_),E(void 0,_)})},function(S){E(void 0,S)}),Nt({},t(x,h),{_persist:{version:r,rehydrated:!1}})}else{if(h.type===Co)return o=!0,h.result(g1(e)),Nt({},t(x,h),{_persist:v});if(h.type===ko)return h.result(a&&a.flush()),Nt({},t(x,h),{_persist:v});if(h.type===Oo)c=!0;else if(h.type===ji){if(o)return Nt({},x,{_persist:Nt({},v,{rehydrated:!0})});if(h.key===e.key){var k=t(x,h),O=h.payload,b=n!==!1&&O!==void 0?n(O,f,k,e):k,g=Nt({},b,{_persist:Nt({},v,{rehydrated:!0})});return d(g)}}}if(!v)return t(f,h);var w=t(x,h);return w===x?f:d(Nt({},w,{_persist:v}))}}function ku(e){return O1(e)||k1(e)||S1()}function S1(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function k1(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function O1(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}function Ou(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function $a(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ou(r,!0).forEach(function(n){_1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ou(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _1(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var th={registry:[],bootstrapped:!1},C1=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:th,r=arguments.length>1?arguments[1]:void 0;switch(r.type){case Lo:return $a({},t,{registry:[].concat(ku(t.registry),[r.key])});case ji:var n=t.registry.indexOf(r.key),s=ku(t.registry);return s.splice(n,1),$a({},t,{registry:s,bootstrapped:s.length===0});default:return t}};function L1(e,t,r){if(process.env.NODE_ENV!=="production"){var n={},s=["blacklist","whitelist","transforms","storage","keyPrefix","migrate"];s.forEach(function(d){n[d]&&console.error('redux-persist: invalid option passed to persistStore: "'.concat(d,'". You may be incorrectly passing persistConfig into persistStore, whereas it should be passed into persistReducer.'))})}var i=vo(C1,th,void 0),a=function(f){i.dispatch({type:Lo,key:f})},o=function(f,h,p){var v={type:ji,payload:h,err:p,key:f};e.dispatch(v),i.dispatch(v)},c=$a({},i,{purge:function(){var f=[];return e.dispatch({type:Co,result:function(p){f.push(p)}}),Promise.all(f)},flush:function(){var f=[];return e.dispatch({type:ko,result:function(p){f.push(p)}}),Promise.all(f)},pause:function(){e.dispatch({type:Oo})},persist:function(){e.dispatch({type:_o,register:a,rehydrate:o})}});return c.persist(),c}const N1={key:"persist",storage:o1},rh=Lf({auth:zx}),j1=()=>Gf({reducer:rh}),M1=()=>{if(typeof window>"u")return j1();{const t=E1(N1,rh),r=Gf({reducer:t,middleware:n=>n({serializableCheck:{ignoredActions:[ko,ji,Oo,_o,Co,Lo]}})});return r.__persistor=L1(r),r}},T1=({menuItems:e,activeItemId:t,className:r,onSelectStore:n})=>{const s=Eo(),i=u.useContext(on).application,{isAuthenticated:a,user:o,store:c,availableStores:d}=u.useContext(go),[f,h]=u.useState(!1),[p,v]=u.useState(!1),[m,x]=u.useState("main"),y=()=>{h(!1)},E=b=>{n&&n(b),v(!1)},k=A("fixed inset-y-0 left-0 z-50 flex flex-col w-72 h-screen bg-white dark:bg-gray-900 border-r border-gray-200 dark:border-gray-800 transition-transform duration-300 ease-in-out md:translate-x-0 md:relative md:inset-auto shadow-xl md:shadow-none",{"translate-x-0":f,"-translate-x-full":!f},r),O=()=>{s(Vx()),v(!1)};return u.useEffect(()=>{if(!p){const b=setTimeout(()=>x("main"),200);return()=>clearTimeout(b)}},[p]),l.jsxs(l.Fragment,{children:[l.jsx("button",{className:"fixed top-4 left-4 z-50 p-2 text-gray-600 bg-white rounded-md shadow-md md:hidden dark:bg-gray-800 dark:text-gray-200",onClick:()=>h(!f),"aria-label":"Toggle Menu",children:l.jsx(q0,{size:24})}),f&&l.jsx("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>h(!1)}),p&&l.jsx("div",{className:"fixed inset-0 z-40 cursor-default",onClick:()=>v(!1)}),l.jsxs("aside",{className:k,children:[l.jsx("button",{className:"absolute top-4 right-4 p-2 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 md:hidden",onClick:()=>h(!1),"aria-label":"Close Menu",children:l.jsx(G0,{size:24})}),l.jsxs("div",{className:"flex items-center gap-3 px-6 pt-6 pb-3 flex-shrink-0",children:[l.jsx("div",{className:"inline-flex items-center justify-center p-1 bg-white/80 backdrop-blur-sm rounded-xl shadow-elegant",children:l.jsx("img",{src:Oa,alt:"App logo",loading:"lazy",className:"w-16 h-16 object-cover"})}),l.jsxs("span",{className:"font-semibold text-gray-800 dark:text-gray-400 mt-1",children:[i?.applicationName," ",l.jsx("span",{className:"font-normal",children:i?.applicationVersion})]})]}),l.jsx("nav",{className:"flex-1 overflow-y-auto px-4 py-2 custom-scrollbar",children:l.jsx("ul",{className:"space-y-1",children:e.map(b=>{const g=t===b.id;return l.jsx("li",{children:l.jsxs(Ae,{href:b.href,onClick:y,className:A("group flex items-center w-full px-3 py-2.5 rounded-lg text-sm font-medium transition-colors duration-200",{"bg-blue-50 text-blue-700 dark:bg-blue-900/20 dark:text-blue-400":g,"text-gray-600 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-100":!g}),children:[l.jsx(b.icon,{className:A("mr-3 flex-shrink-0 h-5 w-5",{"text-blue-600 dark:text-blue-400":g,"text-gray-400 group-hover:text-gray-600 dark:text-gray-500 dark:group-hover:text-gray-300":!g}),"aria-hidden":"true"}),l.jsx("span",{className:"truncate",children:b.label})]})},b.id)})})}),l.jsx("div",{className:"relative flex-shrink-0 border-t border-gray-200 dark:border-gray-800",children:a&&o?l.jsxs(l.Fragment,{children:[p&&l.jsx("div",{className:"absolute bottom-full left-4 right-4 mb-2 z-50 bg-white dark:bg-gray-800 rounded-lg shadow-xl border border-gray-100 dark:border-gray-700 overflow-hidden animate-in fade-in slide-in-from-bottom-2 duration-200",children:m==="main"?l.jsxs("div",{className:"py-1",children:[l.jsxs(Ae,{href:"/profile",className:"flex items-center w-full px-4 py-3 text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[l.jsx(uv,{className:"mr-3 text-gray-400"}),"Mi Perfil"]}),l.jsxs("button",{className:"flex cursor-pointer items-center justify-between w-full px-4 py-3 text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors text-left",onClick:b=>{b.stopPropagation(),x("stores")},children:[l.jsxs("div",{className:"flex items-center",children:[l.jsx(Q0,{className:"mr-3 text-gray-400"}),"Cambiar Tienda"]}),l.jsx(J0,{className:"text-xs text-gray-400"})]}),l.jsx("div",{className:"border-t border-gray-100 dark:border-gray-700 my-1"}),l.jsxs("button",{onClick:O,className:"flex cursor-pointer items-center w-full px-4 py-3 text-sm text-red-600 hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors text-left",children:[l.jsx(lv,{className:"mr-3"}),"Cerrar Sesión"]})]}):l.jsxs("div",{className:"flex flex-col max-h-80",children:[l.jsxs("div",{onClick:b=>{b.stopPropagation(),x("main")},className:"cursor-pointer flex items-center px-4 py-3 border-b border-gray-100 dark:border-gray-700 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-700 transition-colors text-left",children:[l.jsx("div",{className:"mr-2 text-gray-500",children:l.jsx(K0,{className:"text-sm"})}),l.jsx("span",{className:"text-sm font-semibold text-gray-800 dark:text-white",children:"Seleccionar Tienda"})]}),l.jsx("div",{className:"overflow-y-auto custom-scrollbar p-1",children:d&&d.length>0?d.map(b=>l.jsxs("button",{onClick:()=>E(b),className:A("w-full text-left px-4 py-2.5 text-sm rounded-md transition-colors flex items-center justify-between",{"bg-blue-50 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400 font-medium":c?.code===b.code,"text-gray-600 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer":c?.code!==b.code}),children:[l.jsxs("span",{children:[b.code," - ",b.commercialName]}),c?.code===b.code&&l.jsx(Z0,{className:"text-xs"})]},b.code)):l.jsx("div",{className:"px-4 py-3 text-xs text-gray-400 text-center",children:"No hay tiendas disponibles."})})]})}),l.jsxs("div",{className:A("group flex items-center py-6 px-4 cursor-pointer transition-colors duration-200",{"bg-gray-100 dark:bg-gray-800":p,"hover:bg-gray-50 dark:hover:bg-gray-800/50":!p}),onClick:()=>v(!p),children:[l.jsx("div",{className:"inline-flex items-center justify-center h-10 w-10 rounded-full bg-blue-600 text-white font-bold text-sm shadow-sm group-hover:scale-110 transition-transform",children:D1(o.userName,o.userLastName)}),l.jsxs("div",{className:"ml-3 flex-1 min-w-0",children:[l.jsxs("p",{className:"text-sm font-bold text-gray-900 dark:text-white truncate",children:[o.userName," ",o.userLastName]}),l.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400 truncate",children:["Store ",c?.code||"N/A"]})]})]})]}):l.jsxs("div",{className:"p-4 flex flex-col gap-3",children:[l.jsxs(rt,{children:[l.jsx(ov,{className:"mr-2"}),"Login"]}),l.jsxs(Tn,{children:[l.jsx(cv,{className:"mr-2"}),"Register"]})]})})]})]})};function D1(e,t){const r=e?e.charAt(0).toUpperCase():"",n=t?t.charAt(0).toUpperCase():"";return`${r}${n}`}const lr=({label:e,id:t,required:r,error:n,className:s,children:i})=>l.jsxs("div",{className:A("flex w-full flex-col",s),children:[l.jsx("div",{className:"flex flex-1 justify-between",children:l.jsxs("label",{htmlFor:t,className:A("block text-sm font-medium leading-6 text-gray-700 mb-1 truncate dark:text-gray-200"),children:[e," ",r&&l.jsx("span",{className:"text-red-500",children:"*"})]})}),i,l.jsx("span",{className:"text-xs text-red-500",children:n})]}),ln=(e,t)=>A("focus block bg-white dark:bg-gray-800 w-full rounded-xl border-0 text-gray-800 dark:text-gray-100 shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-700 placeholder:text-gray-400 dark:placeholder:text-gray-500 focus:ring-2 focus:ring-inset focus:ring-indigo-600 dark:focus:ring-indigo-400 sm:text-sm sm:leading-6 peer h-10",!!t&&"ring-red-500 dark:ring-red-500",e&&"!bg-gray-400/30 !text-gray-500 dark:!bg-gray-400/30 dark:!text-gray-400");function P1(e){const{id:t,label:r,options:n,selected:s,onSelectOption:i,wrapperClassName:a,required:o,disabled:c,...d}=e,f=h=>{const p=s.some(v=>v.id===h.id);i(p?s.filter(v=>v.id!==h.id):[...s,h])};return l.jsx(lr,{label:r,id:t,required:o,children:l.jsx("div",{className:A("flex flex-col gap-3",a,{"pointer-events-none opacity-50":c}),children:n.map(h=>l.jsx(mi,{id:`${t}-${h.id}`,label:h.label,checked:s.some(p=>p.id===h.id),onChangeChecked:()=>f(h),disabled:c,...d},h.id))})})}const A1=({label:e,id:t,required:r,error:n,className:s,wrapperClassName:i,disabled:a,...o})=>l.jsx(lr,{label:e,id:t,required:r,error:n,className:i,children:l.jsx("div",{className:"relative flex flex-1 items-center cursor-pointer",children:l.jsx("input",{...o,id:t,required:r,type:"date",disabled:a,className:A(ln(a),"truncate w-full",s)})})}),R1=({label:e,id:t,required:r,error:n,className:s,wrapperClassName:i,disabled:a,onChange:o,...c})=>{const d=u.useRef(null),[f,h]=u.useState(""),p=v=>{v.target.files&&v.target.files.length>0?h(v.target.files[0].name):h(""),o&&o(v)};return l.jsx(lr,{label:e,id:t,required:r,error:n,className:i,children:l.jsxs("div",{className:"relative flex flex-1 items-center",children:[l.jsx("input",{...c,id:t,required:r,type:"file",disabled:a,ref:d,onChange:p,className:"hidden"}),l.jsxs("button",{type:"button",disabled:a,className:A(ln(a,n),"flex items-center justify-between gap-2 px-3 cursor-pointer",s),onClick:()=>d.current?.click(),children:[!!f&&l.jsx("span",{className:"dark:text-gray-100",children:f}),!f&&l.jsx("span",{className:"text-gray-400 dark:text-gray-400",children:"Select file"}),l.jsx(Kd,{className:"text-indigo-600 dark:text-indigo-400",size:20})]})]})})},I1=({label:e,id:t,required:r,error:n,className:s,wrapperClassName:i,disabled:a,onChange:o,...c})=>{const d=u.useRef(null),[f,h]=u.useState(""),[p,v]=u.useState(!1),m=y=>{y.target.files&&y.target.files.length>0?h(y.target.files[0].name):h(""),o&&o(y)},x=y=>{if(y.preventDefault(),v(!1),a)return;const E=y.dataTransfer.files;if(E&&E.length>0&&(h(E[0].name),d.current)){const k=new DataTransfer;k.items.add(E[0]),d.current.files=k.files;const O=new Event("change",{bubbles:!0});d.current.dispatchEvent(O)}};return l.jsxs(lr,{label:e,id:t,required:r,error:n,className:i,children:[l.jsxs("div",{className:A("relative flex flex-col flex-1 items-center transition border-2 border-dashed rounded-xl p-4",p?"border-indigo-600 bg-indigo-50 dark:bg-indigo-900":"border-gray-300 bg-white dark:border-gray-700 dark:bg-gray-800"),onDragOver:y=>{y.preventDefault(),a||v(!0)},onDragLeave:y=>{y.preventDefault(),v(!1)},onDrop:x,onClick:()=>!a&&d.current?.click(),style:{cursor:a?"not-allowed":"pointer",minHeight:56},children:[l.jsx("input",{...c,id:t,required:r,type:"file",disabled:a,ref:d,onChange:m,className:"hidden"}),l.jsx(V0,{className:"text-indigo-600 dark:text-indigo-400",size:60}),!!f&&l.jsx("span",{className:"text-sm text-gray-800 dark:text-gray-100",children:f}),!f&&l.jsx("span",{className:"text-gray-400 dark:text-gray-400 text-sm",children:"Drag & drop a file here, or click to select"})]}),l.jsxs("button",{type:"button",disabled:a,className:A(ln(a,n),"flex items-center justify-between gap-2 px-3 cursor-pointer mt-2",s),onClick:()=>d.current?.click(),children:[!!f&&l.jsx("span",{className:"dark:text-gray-100",children:f}),!f&&l.jsx("span",{className:"text-gray-400 dark:text-gray-400",children:"Select File"}),l.jsx(Kd,{className:"text-indigo-600 dark:text-indigo-400",size:20})]})]})},Be=u.forwardRef(({label:e,id:t,type:r,required:n,error:s,className:i,wrapperClassName:a,disabled:o,...c},d)=>{const[f,h]=u.useState(r);return l.jsx(lr,{label:e,id:t,required:n,error:s,className:a,children:l.jsxs("div",{className:"relative flex flex-1 items-center",children:[l.jsx("input",{...c,ref:d,id:t,required:n,type:f,disabled:o,className:A(ln(o,s),"truncate",r==="password"&&"pr-8",i)}),r==="password"&&f==="password"&&l.jsx(tv,{type:"button",onClick:()=>h("text"),className:"absolute cursor-pointer text-indigo-600 dark:text-indigo-400 h-5 w-5 right-2"}),r==="password"&&f==="text"&&l.jsx(ev,{type:"button",onClick:()=>h("password"),className:"absolute cursor-pointer text-indigo-600 dark:text-indigo-400 h-5 w-5 right-2"})]})})});function F1(e,t){const{label:r,id:n,required:s,error:i,className:a,wrapperClassName:o,options:c,selected:d,onSelectOption:f,renderOption:h,filterFn:p,emptyMessage:v="No options found",disabled:m,footerOption:x,loading:y,icon:E=null,searchText:k,setSearchText:O,...b}=e,[g,w]=u.useState(!1),[S,C]=u.useState(""),_=u.useRef(null),M=u.useMemo(()=>k!==void 0?k:S,[k,S]),D=u.useCallback($=>(O!==void 0?O:C)($),[O]),F=$=>l.jsx("p",{children:$.label}),z=u.useCallback(($,X)=>X.toLowerCase().split(" ").filter(Boolean).every(le=>$.label.toLowerCase().includes(le)),[]),W=$=>{f($),D($.label),w(!1)},G=u.useMemo(()=>{const $=p||z;return c.filter(X=>$(X,M))},[c,M,p,z]);return u.useEffect(()=>{function $(X){_.current&&!_.current.contains(X.target)&&(w(!1),d&&D(d.label))}return document.addEventListener("mousedown",$),()=>{document.removeEventListener("mousedown",$)}},[_,d,D]),u.useEffect(()=>{g||D(d?.label??"")},[g,d,D]),l.jsxs("div",{className:A("relative",o),ref:_,children:[l.jsx(Be,{...b,id:n,ref:t,label:r,error:!g&&i,required:s,value:M,onChange:$=>{D($.target.value),w(!0)},onFocus:()=>{D(""),w(!0)},disabled:m,className:A("pr-8",m?"pointer-events-none":"cursor-pointer",d&&"text-gray-900",a)}),l.jsxs("div",{onClick:()=>{m||(D(g&&d?.label||""),w(!g))},className:A("absolute right-0 flex items-center pr-2 text-gray-400",m?"pointer-events-none":"cursor-pointer",r?"top-10":"top-4"),children:[!E&&(g?l.jsx(ef,{}):l.jsx(uo,{})),E]}),g&&l.jsxs("ul",{className:A("absolute z-10 min-w-full mt-1 text-xs text-gray-800 rounded-md shadow-lg max-h-56 overflow-auto dark:bg-gray-800 dark:text-gray-100",m&&"pointer-events-none opacity-50"),children:[y&&l.jsx(gi,{className:"h-7 w-7"}),!y&&G.length>0&&G.map(($,X)=>l.jsx("li",{onClick:()=>W($),className:A("px-4 py-2 cursor-pointer hover:bg-indigo-600 hover:text-white dark:hover:bg-indigo-700 dark:hover:text-gray-100",$.id!==d?.id&&X%2===0?"bg-white dark:bg-gray-700":"bg-gray-100 dark:bg-gray-800",$.id===d?.id&&"border-indigo-600 border-2 dark:border-indigo-400",X==0&&"rounded-t-md",X==G.length-1&&"rounded-b-md"),children:(h||F)($)},$.id)),!y&&G.length===0&&l.jsx("li",{className:"px-4 py-2 truncate text-gray-500 italic bg-white dark:bg-gray-800 dark:text-gray-400",children:v}),x&&l.jsx("div",{className:"sticky bottom-0 bg-white dark:bg-gray-800 border-t border-gray-300 dark:border-gray-700",children:l.jsx("li",{onClick:()=>W(x),className:"px-4 py-2 cursor-pointer hover:bg-indigo-600 hover:text-white dark:hover:bg-indigo-700 dark:hover:text-gray-100",children:(h||F)(x)},x.id)})]})]})}const ct=u.forwardRef(F1),_u={lat:10.48801,lng:-66.87919},$1=["places"],nh=({label:e,disabled:t,wrapperClassName:r,onSelectLocation:n,initialCoordinates:s,...i})=>{const{isLoaded:a,loadError:o}=oo({googleMapsApiKey:"AIzaSyD0g8yZAA0ZaqaLsrRkGmDQdFbhCEAPdYs",libraries:$1}),[c,d]=u.useState(s||_u),[f,h]=u.useState(s||_u),[p,v]=u.useState(""),[m,x]=u.useState([]),[y,E]=u.useState(null),k=u.useRef(null),O=u.useRef(null),b=u.useRef(null),g=u.useRef(null),w=u.useCallback(_=>{!O.current||!_.value.place_id||O.current.getDetails({placeId:_.value.place_id,fields:["geometry"],sessionToken:g.current??void 0},(M,D)=>{if(D===window.google.maps.places.PlacesServiceStatus.OK&&M?.geometry?.location){const F={lat:M.geometry.location.lat(),lng:M.geometry.location.lng()};h(F),d(F),v(_.label),E(_),x([])}g.current=null})},[]),S=u.useCallback(()=>{!b.current||!O.current||b.current.geocode({location:f},(_,M)=>{if(M!==window.google.maps.GeocoderStatus.OK||!_){console.error("Geocode was not successful for the following reason: "+M);return}const D=_.find(F=>F.types.includes("route")||F.types.includes("intersection"))??_[0];D?.place_id&&O.current?.getDetails({placeId:D.place_id},(F,z)=>{z===window.google.maps.places.PlacesServiceStatus.OK&&F&&n?.(F)})})},[f,n]),C=u.useCallback(_=>{_.latLng&&(h({lat:_.latLng.lat(),lng:_.latLng.lng()}),v(""),E(null))},[]);return u.useEffect(()=>{a&&(b.current=new window.google.maps.Geocoder,k.current=new window.google.maps.places.AutocompleteService,O.current=new window.google.maps.places.PlacesService(document.createElement("div")))},[a]),u.useEffect(()=>{if(!a||!p||t||p===y?.label){x([]);return}g.current||(g.current=new window.google.maps.places.AutocompleteSessionToken),k.current?.getPlacePredictions({input:p,sessionToken:g.current},_=>{if(_&&Array.isArray(_)){const M=_.map(D=>({id:D.place_id,label:D.description,value:D}));x(M)}else x([])})},[p,a,t,y]),u.useEffect(()=>{s&&(h(s),d(s))},[s]),o?l.jsx("div",{children:"Error al cargar Google Maps. Por favor, revisa la API Key y la conexión."}):a?l.jsxs("div",{className:A("flex flex-1 flex-col w-full h-full gap-2",r),children:[l.jsx(ct,{...i,label:e,options:m,selected:y,onSelectOption:w,searchText:p,setSearchText:_=>{_||(g.current=null),v(_)},disabled:t}),l.jsx(Pd,{mapContainerStyle:{height:"100%",width:"100%"},zoom:16,center:c,onClick:C,children:l.jsx($d,{position:f})}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(rt,{onClick:S,disabled:t,children:"Seleccionar"})})]}):l.jsxs("div",{className:"flex flex-col items-center justify-center w-full h-64",children:["Cargando mapa...",l.jsx(gi,{className:"w-8 h-8 text-indigo-600"})]})},sh=u.forwardRef(({label:e,id:t,required:r,error:n,className:s,wrapperClassName:i,disabled:a,value:o,onChange:c,...d},f)=>{const h=()=>{if(c){const v=parseInt(String(o??"0"),10),m=(isNaN(v)?0:v)+1,x={target:{value:String(m),name:d.name,type:"number",step:"1"}};c(x)}},p=()=>{if(c){const v=parseInt(String(o??"0"),10),m=(isNaN(v)?0:v)-1,x={target:{value:String(m),name:d.name,type:"number",step:"1"}};c(x)}};return l.jsx(lr,{label:e,id:t,required:r,error:n,className:i,children:l.jsxs("div",{className:"flex flex-row items-center",children:[l.jsx("div",{children:l.jsx(rt,{type:"button",disabled:a,onClick:p,className:"h-10 rounded-r-none",children:l.jsx(sv,{className:"h-3 w-3"})})}),l.jsx("div",{className:"relative flex flex-1 items-center",children:l.jsx("input",{...d,ref:f,id:t,required:r,type:"number",step:"1",disabled:a,value:o,onChange:c,className:A(ln(a,n),"!rounded-none truncate",s)})}),l.jsx("div",{children:l.jsx(rt,{type:"button",disabled:a,onClick:h,className:"h-10 rounded-l-none",children:l.jsx(iv,{className:"h-3 w-3"})})})]})})});function U1(e){return H({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M124,175a8,8,0,0,0,7.94,0c2.45-1.41,60-35,60-94.95A64,64,0,0,0,64,80C64,140,121.58,173.54,124,175ZM128,56a24,24,0,1,1-24,24A24,24,0,0,1,128,56ZM240,184c0,31.18-57.71,48-112,48S16,215.18,16,184c0-14.59,13.22-27.51,37.23-36.37a8,8,0,0,1,5.54,15C42.26,168.74,32,176.92,32,184c0,13.36,36.52,32,96,32s96-18.64,96-32c0-7.08-10.26-15.26-26.77-21.36a8,8,0,0,1,5.54-15C226.78,156.49,240,169.41,240,184Z"},child:[]}]})(e)}function V1(e){return H({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M112,80a16,16,0,1,1,16,16A16,16,0,0,1,112,80ZM64,80a64,64,0,0,1,128,0c0,59.95-57.58,93.54-60,94.95a8,8,0,0,1-7.94,0C121.58,173.54,64,140,64,80Zm16,0c0,42.2,35.84,70.21,48,78.5,12.15-8.28,48-36.3,48-78.5a48,48,0,0,0-96,0Zm122.77,67.63a8,8,0,0,0-5.54,15C213.74,168.74,224,176.92,224,184c0,13.36-36.52,32-96,32s-96-18.64-96-32c0-7.08,10.26-15.26,26.77-21.36a8,8,0,0,0-5.54-15C29.22,156.49,16,169.41,16,184c0,31.18,57.71,48,112,48s112-16.82,112-48C240,169.41,226.78,156.49,202.77,147.63Z"},child:[]}]})(e)}const z1=["places"],B1=({label:e,onSelectLocation:t,disabled:r,...n})=>{const{isLoaded:s,loadError:i}=oo({googleMapsApiKey:"AIzaSyD0g8yZAA0ZaqaLsrRkGmDQdFbhCEAPdYs",libraries:z1}),[a,o]=u.useState(""),[c,d]=u.useState(!1),[f,h]=u.useState(null),[p,v]=u.useState(null),[m,x]=u.useState([]),y=u.useRef(null),E=u.useRef(null),k=u.useRef(null),O=g=>{!E.current||!g.value.place_id||E.current.getDetails({placeId:g.id},(w,S)=>{S===window.google.maps.places.PlacesServiceStatus.OK&&w&&(h(g),v(w),t(w)),k.current=null})},b=g=>{const w={place_id:g.place_id??"",description:g.formatted_address||g.name||"",types:g.types??[],matched_substrings:[],structured_formatting:{main_text:g.name||"",secondary_text:g.formatted_address||"",main_text_matched_substrings:[]},terms:[]};h({id:w.place_id,label:w.description,value:w}),o(w.description),t(g),v(g),d(!1)};return u.useEffect(()=>{s&&(y.current=new window.google.maps.places.AutocompleteService,E.current=new window.google.maps.places.PlacesService(document.createElement("div")))},[s]),u.useEffect(()=>{if(!s||!a||r||a===f?.label){x([]);return}k.current||(k.current=new window.google.maps.places.AutocompleteSessionToken),y.current?.getPlacePredictions({input:a,sessionToken:k.current},g=>{if(g&&Array.isArray(g)){const w=g.map(S=>({id:S.place_id,label:S.description,value:S}));x(w)}else x([])})},[a,r,f,s]),i?l.jsx("div",{children:"Error al cargar Google Maps. Por favor, revisa la API Key y la conexión."}):l.jsxs(l.Fragment,{children:[l.jsx(ct,{...n,label:e,options:m,selected:f,onSelectOption:O,searchText:a,setSearchText:g=>{g||(k.current=null),o(g)},disabled:r,icon:l.jsxs("span",{className:"relative group",onClick:()=>d(!0),children:[l.jsx(V1,{className:"w-5 h-5 text-indigo-600 block group-hover:hidden transition-all"}),l.jsx(U1,{className:"w-5 h-5 text-indigo-600 hidden group-hover:block transition-all"})]})}),l.jsx(Xs,{open:c,onClose:()=>d(!1),children:l.jsx("div",{className:"h-96 w-96",children:l.jsx(nh,{label:"Buscar en Google Maps",onSelectLocation:b,initialCoordinates:p?{lat:p.geometry?.location?.lat()||0,lng:p.geometry?.location?.lng()||0}:void 0})})})]})};function oi(e){const{id:t,label:r,options:n,selected:s,onSelectOption:i,wrapperClassName:a,required:o,disabled:c,...d}=e;return l.jsx(lr,{label:r,id:t,required:o,children:l.jsx("div",{className:A("flex flex-col gap-3",a,{"pointer-events-none opacity-50":c}),children:n.map(f=>l.jsxs("div",{className:"flex items-center gap-2",onClick:()=>i(f),children:[l.jsx("input",{...d,type:"radio",id:`${t}-${f.id}`,name:r,value:f.id,checked:s?.id===f.id,onChange:()=>i(f),className:"h-4 w-4 text-indigo-600 border-gray-300 focus:ring-indigo-500 cursor-pointer"}),l.jsx("label",{htmlFor:`${t}-${f.id}`,className:"text-xs font-medium text-gray-800 dark:text-gray-300 cursor-pointer",children:l.jsx("p",{children:f.label})})]},f.id))})})}function W1(e){const{label:t,id:r,required:n,error:s,wrapperClassName:i,groupedOptions:a,selected:o,onSelectOption:c,renderOption:d,filterFn:f,emptyMessage:h="No hay resultados",disabled:p,footerOption:v,...m}=e,[x,y]=u.useState(!1),[E,k]=u.useState(o?.label||""),O=u.useRef(null);u.useEffect(()=>{function C(_){O.current&&!O.current.contains(_.target)&&(y(!1),o&&k(o.label))}return document.addEventListener("mousedown",C),()=>{document.removeEventListener("mousedown",C)}},[O,o]);const b=C=>l.jsx("p",{children:C.label}),g=u.useCallback((C,_)=>_.toLowerCase().split(" ").filter(Boolean).every(D=>C.label.toLowerCase().includes(D)),[]),w=C=>{c(C),k(C.label),y(!1)},S=u.useMemo(()=>{const C=f||g;return a.map(M=>({...M,options:M.options.filter(D=>C(D,E))})).filter(M=>M.options.length>0||M.loading)},[a,E,f,g]);return l.jsxs("div",{className:A("relative",i),ref:O,children:[l.jsx(Be,{...m,id:r,label:t,error:s,required:n,value:E,onChange:C=>{k(C.target.value),y(!0)},onFocus:()=>{k(""),y(!0)},disabled:p,className:A("cursor-pointer",o&&"text-gray-900")}),l.jsx("div",{onClick:()=>y(!x),className:"absolute inset-y-12 right-0 flex items-center pr-2 cursor-pointer text-gray-400",children:x?l.jsx(ef,{}):l.jsx(uo,{})}),x&&l.jsxs("ul",{className:A("absolute z-10 w-full mt-1 text-xs text-gray-800 bg-white border border-gray-300 rounded-md shadow-lg max-h-56 overflow-auto dark:bg-gray-800 dark:text-gray-100 dark:border-gray-700",p&&"pointer-events-none opacity-50"),children:[S.length>0&&S.map(C=>l.jsxs("div",{children:[l.jsx("li",{className:"px-4 py-2 font-bold text-gray-900 sticky top-0 bg-gray-200 dark:bg-gray-900 dark:text-gray-100",children:C.title}),C.loading&&l.jsx("div",{className:"flex justify-center py-2",children:l.jsx(gi,{className:"h-7 w-7"})}),!C.loading&&C.options.map((_,M)=>l.jsx("li",{onClick:()=>w(_),className:A("px-4 py-2 cursor-pointer hover:bg-indigo-600 hover:text-white dark:hover:bg-indigo-700 dark:hover:text-gray-100",M%2===0?"bg-white dark:bg-gray-700":"bg-gray-100 dark:bg-gray-800"),children:(d||b)(_)},_.id))]},C.title)),S.length===0&&l.jsx("li",{className:"px-4 py-2 text-gray-500 italic bg-white dark:bg-gray-800 dark:text-gray-400",children:h}),v&&l.jsx("div",{className:"sticky bottom-0 bg-white dark:bg-gray-800 border-t border-gray-300 dark:border-gray-700",children:l.jsx("li",{onClick:()=>w(v),className:"px-4 py-2 cursor-pointer hover:bg-indigo-600 hover:text-white dark:hover:bg-indigo-700 dark:hover:text-gray-100",children:(d||b)(v)},v.id)})]})]})}const Y1=({label:e,id:t,required:r,error:n,className:s,wrapperClassName:i,disabled:a,...o})=>l.jsx(lr,{label:e,id:t,required:r,error:n,className:i,children:l.jsx("div",{className:"relative flex flex-1 items-center",children:l.jsx("textarea",{...o,id:t,required:r,disabled:a,className:A(ln(a,n),s)})})}),ca=236,Cu=["412","424","414","426","416","422"],ua={HEIGHT:30,WIDTH:23,LENGTH:1},H1=[15,39],G1=[24,49];var q1=function(t){return Z1(t)&&!K1(t)};function Z1(e){return!!e&&typeof e=="object"}function K1(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Q1(e)}var J1=typeof Symbol=="function"&&Symbol.for,X1=J1?Symbol.for("react.element"):60103;function Q1(e){return e.$$typeof===X1}function eb(e){return Array.isArray(e)?[]:{}}function li(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Rn(eb(e),e,t):e}function tb(e,t,r){return e.concat(t).map(function(n){return li(n,r)})}function rb(e,t,r){var n={};return r.isMergeableObject(e)&&Object.keys(e).forEach(function(s){n[s]=li(e[s],r)}),Object.keys(t).forEach(function(s){!r.isMergeableObject(t[s])||!e[s]?n[s]=li(t[s],r):n[s]=Rn(e[s],t[s],r)}),n}function Rn(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||tb,r.isMergeableObject=r.isMergeableObject||q1;var n=Array.isArray(t),s=Array.isArray(e),i=n===s;return i?n?r.arrayMerge(e,t,r):rb(e,t,r):li(t,r)}Rn.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,s){return Rn(n,s,r)},{})};var Ua=Rn,ih=typeof global=="object"&&global&&global.Object===Object&&global,nb=typeof self=="object"&&self&&self.Object===Object&&self,Ot=ih||nb||Function("return this")(),or=Ot.Symbol,ah=Object.prototype,sb=ah.hasOwnProperty,ib=ah.toString,xn=or?or.toStringTag:void 0;function ab(e){var t=sb.call(e,xn),r=e[xn];try{e[xn]=void 0;var n=!0}catch{}var s=ib.call(e);return n&&(t?e[xn]=r:delete e[xn]),s}var ob=Object.prototype,lb=ob.toString;function cb(e){return lb.call(e)}var ub="[object Null]",db="[object Undefined]",Lu=or?or.toStringTag:void 0;function Nr(e){return e==null?e===void 0?db:ub:Lu&&Lu in Object(e)?ab(e):cb(e)}function oh(e,t){return function(r){return e(t(r))}}var No=oh(Object.getPrototypeOf,Object);function jr(e){return e!=null&&typeof e=="object"}var fb="[object Object]",hb=Function.prototype,pb=Object.prototype,lh=hb.toString,mb=pb.hasOwnProperty,gb=lh.call(Object);function Nu(e){if(!jr(e)||Nr(e)!=fb)return!1;var t=No(e);if(t===null)return!0;var r=mb.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&lh.call(r)==gb}function vb(){this.__data__=[],this.size=0}function ch(e,t){return e===t||e!==e&&t!==t}function Mi(e,t){for(var r=e.length;r--;)if(ch(e[r][0],t))return r;return-1}var yb=Array.prototype,xb=yb.splice;function bb(e){var t=this.__data__,r=Mi(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():xb.call(t,r,1),--this.size,!0}function wb(e){var t=this.__data__,r=Mi(t,e);return r<0?void 0:t[r][1]}function Eb(e){return Mi(this.__data__,e)>-1}function Sb(e,t){var r=this.__data__,n=Mi(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function zt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}zt.prototype.clear=vb;zt.prototype.delete=bb;zt.prototype.get=wb;zt.prototype.has=Eb;zt.prototype.set=Sb;function kb(){this.__data__=new zt,this.size=0}function Ob(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function _b(e){return this.__data__.get(e)}function Cb(e){return this.__data__.has(e)}function Zn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Lb="[object AsyncFunction]",Nb="[object Function]",jb="[object GeneratorFunction]",Mb="[object Proxy]";function uh(e){if(!Zn(e))return!1;var t=Nr(e);return t==Nb||t==jb||t==Lb||t==Mb}var da=Ot["__core-js_shared__"],ju=(function(){var e=/[^.]+$/.exec(da&&da.keys&&da.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function Tb(e){return!!ju&&ju in e}var Db=Function.prototype,Pb=Db.toString;function Mr(e){if(e!=null){try{return Pb.call(e)}catch{}try{return e+""}catch{}}return""}var Ab=/[\\^$.*+?()[\]{}|]/g,Rb=/^\[object .+?Constructor\]$/,Ib=Function.prototype,Fb=Object.prototype,$b=Ib.toString,Ub=Fb.hasOwnProperty,Vb=RegExp("^"+$b.call(Ub).replace(Ab,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function zb(e){if(!Zn(e)||Tb(e))return!1;var t=uh(e)?Vb:Rb;return t.test(Mr(e))}function Bb(e,t){return e?.[t]}function Tr(e,t){var r=Bb(e,t);return zb(r)?r:void 0}var In=Tr(Ot,"Map"),Fn=Tr(Object,"create");function Wb(){this.__data__=Fn?Fn(null):{},this.size=0}function Yb(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Hb="__lodash_hash_undefined__",Gb=Object.prototype,qb=Gb.hasOwnProperty;function Zb(e){var t=this.__data__;if(Fn){var r=t[e];return r===Hb?void 0:r}return qb.call(t,e)?t[e]:void 0}var Kb=Object.prototype,Jb=Kb.hasOwnProperty;function Xb(e){var t=this.__data__;return Fn?t[e]!==void 0:Jb.call(t,e)}var Qb="__lodash_hash_undefined__";function e2(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Fn&&t===void 0?Qb:t,this}function Cr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Cr.prototype.clear=Wb;Cr.prototype.delete=Yb;Cr.prototype.get=Zb;Cr.prototype.has=Xb;Cr.prototype.set=e2;function t2(){this.size=0,this.__data__={hash:new Cr,map:new(In||zt),string:new Cr}}function r2(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ti(e,t){var r=e.__data__;return r2(t)?r[typeof t=="string"?"string":"hash"]:r.map}function n2(e){var t=Ti(this,e).delete(e);return this.size-=t?1:0,t}function s2(e){return Ti(this,e).get(e)}function i2(e){return Ti(this,e).has(e)}function a2(e,t){var r=Ti(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function cr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}cr.prototype.clear=t2;cr.prototype.delete=n2;cr.prototype.get=s2;cr.prototype.has=i2;cr.prototype.set=a2;var o2=200;function l2(e,t){var r=this.__data__;if(r instanceof zt){var n=r.__data__;if(!In||n.length<o2-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new cr(n)}return r.set(e,t),this.size=r.size,this}function cn(e){var t=this.__data__=new zt(e);this.size=t.size}cn.prototype.clear=kb;cn.prototype.delete=Ob;cn.prototype.get=_b;cn.prototype.has=Cb;cn.prototype.set=l2;function c2(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var Mu=(function(){try{var e=Tr(Object,"defineProperty");return e({},"",{}),e}catch{}})();function dh(e,t,r){t=="__proto__"&&Mu?Mu(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var u2=Object.prototype,d2=u2.hasOwnProperty;function fh(e,t,r){var n=e[t];(!(d2.call(e,t)&&ch(n,r))||r===void 0&&!(t in e))&&dh(e,t,r)}function Di(e,t,r,n){var s=!r;r||(r={});for(var i=-1,a=t.length;++i<a;){var o=t[i],c=void 0;c===void 0&&(c=e[o]),s?dh(r,o,c):fh(r,o,c)}return r}function f2(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var h2="[object Arguments]";function Tu(e){return jr(e)&&Nr(e)==h2}var hh=Object.prototype,p2=hh.hasOwnProperty,m2=hh.propertyIsEnumerable,g2=Tu((function(){return arguments})())?Tu:function(e){return jr(e)&&p2.call(e,"callee")&&!m2.call(e,"callee")},Kn=Array.isArray;function v2(){return!1}var ph=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Du=ph&&typeof module=="object"&&module&&!module.nodeType&&module,y2=Du&&Du.exports===ph,Pu=y2?Ot.Buffer:void 0,x2=Pu?Pu.isBuffer:void 0,mh=x2||v2,b2=9007199254740991,w2=/^(?:0|[1-9]\d*)$/;function E2(e,t){var r=typeof e;return t=t??b2,!!t&&(r=="number"||r!="symbol"&&w2.test(e))&&e>-1&&e%1==0&&e<t}var S2=9007199254740991;function gh(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=S2}var k2="[object Arguments]",O2="[object Array]",_2="[object Boolean]",C2="[object Date]",L2="[object Error]",N2="[object Function]",j2="[object Map]",M2="[object Number]",T2="[object Object]",D2="[object RegExp]",P2="[object Set]",A2="[object String]",R2="[object WeakMap]",I2="[object ArrayBuffer]",F2="[object DataView]",$2="[object Float32Array]",U2="[object Float64Array]",V2="[object Int8Array]",z2="[object Int16Array]",B2="[object Int32Array]",W2="[object Uint8Array]",Y2="[object Uint8ClampedArray]",H2="[object Uint16Array]",G2="[object Uint32Array]",Le={};Le[$2]=Le[U2]=Le[V2]=Le[z2]=Le[B2]=Le[W2]=Le[Y2]=Le[H2]=Le[G2]=!0;Le[k2]=Le[O2]=Le[I2]=Le[_2]=Le[F2]=Le[C2]=Le[L2]=Le[N2]=Le[j2]=Le[M2]=Le[T2]=Le[D2]=Le[P2]=Le[A2]=Le[R2]=!1;function q2(e){return jr(e)&&gh(e.length)&&!!Le[Nr(e)]}function jo(e){return function(t){return e(t)}}var vh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_n=vh&&typeof module=="object"&&module&&!module.nodeType&&module,Z2=_n&&_n.exports===vh,fa=Z2&&ih.process,Qr=(function(){try{var e=_n&&_n.require&&_n.require("util").types;return e||fa&&fa.binding&&fa.binding("util")}catch{}})(),Au=Qr&&Qr.isTypedArray,K2=Au?jo(Au):q2,J2=Object.prototype,X2=J2.hasOwnProperty;function yh(e,t){var r=Kn(e),n=!r&&g2(e),s=!r&&!n&&mh(e),i=!r&&!n&&!s&&K2(e),a=r||n||s||i,o=a?f2(e.length,String):[],c=o.length;for(var d in e)(t||X2.call(e,d))&&!(a&&(d=="length"||s&&(d=="offset"||d=="parent")||i&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||E2(d,c)))&&o.push(d);return o}var Q2=Object.prototype;function Mo(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Q2;return e===r}var ew=oh(Object.keys,Object),tw=Object.prototype,rw=tw.hasOwnProperty;function nw(e){if(!Mo(e))return ew(e);var t=[];for(var r in Object(e))rw.call(e,r)&&r!="constructor"&&t.push(r);return t}function xh(e){return e!=null&&gh(e.length)&&!uh(e)}function To(e){return xh(e)?yh(e):nw(e)}function sw(e,t){return e&&Di(t,To(t),e)}function iw(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var aw=Object.prototype,ow=aw.hasOwnProperty;function lw(e){if(!Zn(e))return iw(e);var t=Mo(e),r=[];for(var n in e)n=="constructor"&&(t||!ow.call(e,n))||r.push(n);return r}function Do(e){return xh(e)?yh(e,!0):lw(e)}function cw(e,t){return e&&Di(t,Do(t),e)}var bh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ru=bh&&typeof module=="object"&&module&&!module.nodeType&&module,uw=Ru&&Ru.exports===bh,Iu=uw?Ot.Buffer:void 0,Fu=Iu?Iu.allocUnsafe:void 0;function dw(e,t){if(t)return e.slice();var r=e.length,n=Fu?Fu(r):new e.constructor(r);return e.copy(n),n}function wh(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function fw(e,t){for(var r=-1,n=e==null?0:e.length,s=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[s++]=a)}return i}function Eh(){return[]}var hw=Object.prototype,pw=hw.propertyIsEnumerable,$u=Object.getOwnPropertySymbols,Po=$u?function(e){return e==null?[]:(e=Object(e),fw($u(e),function(t){return pw.call(e,t)}))}:Eh;function mw(e,t){return Di(e,Po(e),t)}function Sh(e,t){for(var r=-1,n=t.length,s=e.length;++r<n;)e[s+r]=t[r];return e}var gw=Object.getOwnPropertySymbols,kh=gw?function(e){for(var t=[];e;)Sh(t,Po(e)),e=No(e);return t}:Eh;function vw(e,t){return Di(e,kh(e),t)}function Oh(e,t,r){var n=t(e);return Kn(e)?n:Sh(n,r(e))}function yw(e){return Oh(e,To,Po)}function xw(e){return Oh(e,Do,kh)}var Va=Tr(Ot,"DataView"),za=Tr(Ot,"Promise"),Ba=Tr(Ot,"Set"),Wa=Tr(Ot,"WeakMap"),Uu="[object Map]",bw="[object Object]",Vu="[object Promise]",zu="[object Set]",Bu="[object WeakMap]",Wu="[object DataView]",ww=Mr(Va),Ew=Mr(In),Sw=Mr(za),kw=Mr(Ba),Ow=Mr(Wa),Dt=Nr;(Va&&Dt(new Va(new ArrayBuffer(1)))!=Wu||In&&Dt(new In)!=Uu||za&&Dt(za.resolve())!=Vu||Ba&&Dt(new Ba)!=zu||Wa&&Dt(new Wa)!=Bu)&&(Dt=function(e){var t=Nr(e),r=t==bw?e.constructor:void 0,n=r?Mr(r):"";if(n)switch(n){case ww:return Wu;case Ew:return Uu;case Sw:return Vu;case kw:return zu;case Ow:return Bu}return t});var _w=Object.prototype,Cw=_w.hasOwnProperty;function Lw(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Cw.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Yu=Ot.Uint8Array;function Ao(e){var t=new e.constructor(e.byteLength);return new Yu(t).set(new Yu(e)),t}function Nw(e,t){var r=t?Ao(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var jw=/\w*$/;function Mw(e){var t=new e.constructor(e.source,jw.exec(e));return t.lastIndex=e.lastIndex,t}var Hu=or?or.prototype:void 0,Gu=Hu?Hu.valueOf:void 0;function Tw(e){return Gu?Object(Gu.call(e)):{}}function Dw(e,t){var r=t?Ao(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Pw="[object Boolean]",Aw="[object Date]",Rw="[object Map]",Iw="[object Number]",Fw="[object RegExp]",$w="[object Set]",Uw="[object String]",Vw="[object Symbol]",zw="[object ArrayBuffer]",Bw="[object DataView]",Ww="[object Float32Array]",Yw="[object Float64Array]",Hw="[object Int8Array]",Gw="[object Int16Array]",qw="[object Int32Array]",Zw="[object Uint8Array]",Kw="[object Uint8ClampedArray]",Jw="[object Uint16Array]",Xw="[object Uint32Array]";function Qw(e,t,r){var n=e.constructor;switch(t){case zw:return Ao(e);case Pw:case Aw:return new n(+e);case Bw:return Nw(e,r);case Ww:case Yw:case Hw:case Gw:case qw:case Zw:case Kw:case Jw:case Xw:return Dw(e,r);case Rw:return new n;case Iw:case Uw:return new n(e);case Fw:return Mw(e);case $w:return new n;case Vw:return Tw(e)}}var qu=Object.create,eE=(function(){function e(){}return function(t){if(!Zn(t))return{};if(qu)return qu(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function tE(e){return typeof e.constructor=="function"&&!Mo(e)?eE(No(e)):{}}var rE="[object Map]";function nE(e){return jr(e)&&Dt(e)==rE}var Zu=Qr&&Qr.isMap,sE=Zu?jo(Zu):nE,iE="[object Set]";function aE(e){return jr(e)&&Dt(e)==iE}var Ku=Qr&&Qr.isSet,oE=Ku?jo(Ku):aE,lE=1,cE=2,uE=4,_h="[object Arguments]",dE="[object Array]",fE="[object Boolean]",hE="[object Date]",pE="[object Error]",Ch="[object Function]",mE="[object GeneratorFunction]",gE="[object Map]",vE="[object Number]",Lh="[object Object]",yE="[object RegExp]",xE="[object Set]",bE="[object String]",wE="[object Symbol]",EE="[object WeakMap]",SE="[object ArrayBuffer]",kE="[object DataView]",OE="[object Float32Array]",_E="[object Float64Array]",CE="[object Int8Array]",LE="[object Int16Array]",NE="[object Int32Array]",jE="[object Uint8Array]",ME="[object Uint8ClampedArray]",TE="[object Uint16Array]",DE="[object Uint32Array]",_e={};_e[_h]=_e[dE]=_e[SE]=_e[kE]=_e[fE]=_e[hE]=_e[OE]=_e[_E]=_e[CE]=_e[LE]=_e[NE]=_e[gE]=_e[vE]=_e[Lh]=_e[yE]=_e[xE]=_e[bE]=_e[wE]=_e[jE]=_e[ME]=_e[TE]=_e[DE]=!0;_e[pE]=_e[Ch]=_e[EE]=!1;function Cn(e,t,r,n,s,i){var a,o=t&lE,c=t&cE,d=t&uE;if(a!==void 0)return a;if(!Zn(e))return e;var f=Kn(e);if(f){if(a=Lw(e),!o)return wh(e,a)}else{var h=Dt(e),p=h==Ch||h==mE;if(mh(e))return dw(e,o);if(h==Lh||h==_h||p&&!s){if(a=c||p?{}:tE(e),!o)return c?vw(e,cw(a,e)):mw(e,sw(a,e))}else{if(!_e[h])return s?e:{};a=Qw(e,h,o)}}i||(i=new cn);var v=i.get(e);if(v)return v;i.set(e,a),oE(e)?e.forEach(function(y){a.add(Cn(y,t,r,y,e,i))}):sE(e)&&e.forEach(function(y,E){a.set(E,Cn(y,t,r,E,e,i))});var m=d?c?xw:yw:c?Do:To,x=f?void 0:m(e);return c2(x||e,function(y,E){x&&(E=y,y=e[E]),fh(a,E,Cn(y,t,r,E,e,i))}),a}var PE=1,AE=4;function ks(e){return Cn(e,PE|AE)}var ha,Ju;function RE(){if(Ju)return ha;Ju=1;var e=Array.isArray,t=Object.keys,r=Object.prototype.hasOwnProperty,n=typeof Element<"u";function s(i,a){if(i===a)return!0;if(i&&a&&typeof i=="object"&&typeof a=="object"){var o=e(i),c=e(a),d,f,h;if(o&&c){if(f=i.length,f!=a.length)return!1;for(d=f;d--!==0;)if(!s(i[d],a[d]))return!1;return!0}if(o!=c)return!1;var p=i instanceof Date,v=a instanceof Date;if(p!=v)return!1;if(p&&v)return i.getTime()==a.getTime();var m=i instanceof RegExp,x=a instanceof RegExp;if(m!=x)return!1;if(m&&x)return i.toString()==a.toString();var y=t(i);if(f=y.length,f!==t(a).length)return!1;for(d=f;d--!==0;)if(!r.call(a,y[d]))return!1;if(n&&i instanceof Element&&a instanceof Element)return i===a;for(d=f;d--!==0;)if(h=y[d],!(h==="_owner"&&i.$$typeof)&&!s(i[h],a[h]))return!1;return!0}return i!==i&&a!==a}return ha=function(a,o){try{return s(a,o)}catch(c){if(c.message&&c.message.match(/stack|recursion/i)||c.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",c.name,c.message),!1;throw c}},ha}var IE=RE();const hr=to(IE);var FE=process.env.NODE_ENV==="production";function Qt(e,t){if(!FE){var r="Warning: "+t;typeof console<"u"&&console.warn(r);try{throw Error(r)}catch{}}}var $E=4;function Xu(e){return Cn(e,$E)}function Nh(e,t){for(var r=-1,n=e==null?0:e.length,s=Array(n);++r<n;)s[r]=t(e[r],r,e);return s}var UE="[object Symbol]";function Ro(e){return typeof e=="symbol"||jr(e)&&Nr(e)==UE}var VE="Expected a function";function Io(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(VE);var r=function(){var n=arguments,s=t?t.apply(this,n):n[0],i=r.cache;if(i.has(s))return i.get(s);var a=e.apply(this,n);return r.cache=i.set(s,a)||i,a};return r.cache=new(Io.Cache||cr),r}Io.Cache=cr;var zE=500;function BE(e){var t=Io(e,function(n){return r.size===zE&&r.clear(),n}),r=t.cache;return t}var WE=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,YE=/\\(\\)?/g,HE=BE(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(WE,function(r,n,s,i){t.push(s?i.replace(YE,"$1"):n||r)}),t});function GE(e){if(typeof e=="string"||Ro(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Qu=or?or.prototype:void 0,ed=Qu?Qu.toString:void 0;function jh(e){if(typeof e=="string")return e;if(Kn(e))return Nh(e,jh)+"";if(Ro(e))return ed?ed.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function qE(e){return e==null?"":jh(e)}function Mh(e){return Kn(e)?Nh(e,GE):Ro(e)?[e]:wh(HE(qE(e)))}var Os={exports:{}},we={};/** @license React v16.13.1
|
|
61
|
+
Selectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.`,{stack:b})}f.current&&(f.current=!1)}return m}}[n.name],[n]),p=Hx.useSyncExternalStoreWithSelector(c.addNestedSub,o.getState,d||o.getState,h,i);return Jt.useDebugValue(p),p};return Object.assign(r,{withTypes:()=>r}),r}var e1=Qx();const Eo=Jx,t1=e1,eh=Qf;var Es={},Ss={},bu;function r1(){if(bu)return Ss;bu=1,Ss.__esModule=!0,Ss.default=s;function e(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(o){return typeof o}:e=function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},e(i)}function t(){}var r={getItem:t,setItem:t,removeItem:t};function n(i){if((typeof self>"u"?"undefined":e(self))!=="object"||!(i in self))return!1;try{var a=self[i],o="redux-persist ".concat(i," test");a.setItem(o,"test"),a.getItem(o),a.removeItem(o)}catch{return process.env.NODE_ENV!=="production"&&console.warn("redux-persist ".concat(i," test failed, persistence will be disabled.")),!1}return!0}function s(i){var a="".concat(i,"Storage");return n(a)?self[a]:(process.env.NODE_ENV!=="production"&&console.error("redux-persist failed to create sync storage. falling back to noop storage."),r)}return Ss}var wu;function n1(){if(wu)return Es;wu=1,Es.__esModule=!0,Es.default=r;var e=t(r1());function t(n){return n&&n.__esModule?n:{default:n}}function r(n){var s=(0,e.default)(n);return{getItem:function(a){return new Promise(function(o,c){o(s.getItem(a))})},setItem:function(a,o){return new Promise(function(c,d){c(s.setItem(a,o))})},removeItem:function(a){return new Promise(function(o,c){o(s.removeItem(a))})}}}return Es}var s1=n1();const i1=to(s1),a1=()=>({getItem(e){return Promise.resolve(null)},setItem(e,t){return Promise.resolve(t)},removeItem(e){return Promise.resolve()}}),o1=typeof window<"u"?i1("local"):a1();var So="persist:",ko="persist/FLUSH",ji="persist/REHYDRATE",Oo="persist/PAUSE",_o="persist/PERSIST",Co="persist/PURGE",Lo="persist/REGISTER",l1=-1;function On(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?On=function(r){return typeof r}:On=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},On(e)}function Eu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function c1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Eu(r,!0).forEach(function(n){u1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Eu(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function u1(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d1(e,t,r,n){var s=n.debug,i=c1({},r);return e&&On(e)==="object"&&Object.keys(e).forEach(function(a){if(a!=="_persist"){if(t[a]!==r[a]){process.env.NODE_ENV!=="production"&&s&&console.log("redux-persist/stateReconciler: sub state for key `%s` modified, skipping.",a);return}i[a]=e[a]}}),process.env.NODE_ENV!=="production"&&s&&e&&On(e)==="object"&&console.log("redux-persist/stateReconciler: rehydrated keys '".concat(Object.keys(e).join(", "),"'")),i}function f1(e){var t=e.blacklist||null,r=e.whitelist||null,n=e.transforms||[],s=e.throttle||0,i="".concat(e.keyPrefix!==void 0?e.keyPrefix:So).concat(e.key),a=e.storage,o;e.serialize===!1?o=function(g){return g}:typeof e.serialize=="function"?o=e.serialize:o=h1;var c=e.writeFailHandler||null,d={},f={},h=[],p=null,v=null,m=function(g){Object.keys(g).forEach(function(w){E(w)&&d[w]!==g[w]&&h.indexOf(w)===-1&&h.push(w)}),Object.keys(d).forEach(function(w){g[w]===void 0&&E(w)&&h.indexOf(w)===-1&&d[w]!==void 0&&h.push(w)}),p===null&&(p=setInterval(x,s)),d=g};function x(){if(h.length===0){p&&clearInterval(p),p=null;return}var b=h.shift(),g=n.reduce(function(w,S){return S.in(w,b,d)},d[b]);if(g!==void 0)try{f[b]=o(g)}catch(w){console.error("redux-persist/createPersistoid: error serializing state",w)}else delete f[b];h.length===0&&y()}function y(){Object.keys(f).forEach(function(b){d[b]===void 0&&delete f[b]}),v=a.setItem(i,o(f)).catch(k)}function E(b){return!(r&&r.indexOf(b)===-1&&b!=="_persist"||t&&t.indexOf(b)!==-1)}function k(b){c&&c(b),b&&process.env.NODE_ENV!=="production"&&console.error("Error storing data",b)}var O=function(){for(;h.length!==0;)x();return v||Promise.resolve()};return{update:m,flush:O}}function h1(e){return JSON.stringify(e)}function p1(e){var t=e.transforms||[],r="".concat(e.keyPrefix!==void 0?e.keyPrefix:So).concat(e.key),n=e.storage,s=e.debug,i;return e.deserialize===!1?i=function(o){return o}:typeof e.deserialize=="function"?i=e.deserialize:i=m1,n.getItem(r).then(function(a){if(a)try{var o={},c=i(a);return Object.keys(c).forEach(function(d){o[d]=t.reduceRight(function(f,h){return h.out(f,d,c)},i(c[d]))}),o}catch(d){throw process.env.NODE_ENV!=="production"&&s&&console.log("redux-persist/getStoredState: Error restoring data ".concat(a),d),d}else return})}function m1(e){return JSON.parse(e)}function g1(e){var t=e.storage,r="".concat(e.keyPrefix!==void 0?e.keyPrefix:So).concat(e.key);return t.removeItem(r,v1)}function v1(e){e&&process.env.NODE_ENV!=="production"&&console.error("redux-persist/purgeStoredState: Error purging data stored state",e)}function Su(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Nt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Su(r,!0).forEach(function(n){y1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Su(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function y1(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x1(e,t){if(e==null)return{};var r=b1(e,t),n,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)n=i[s],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function b1(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,i;for(i=0;i<n.length;i++)s=n[i],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}var w1=5e3;function E1(e,t){if(process.env.NODE_ENV!=="production"){if(!e)throw new Error("config is required for persistReducer");if(!e.key)throw new Error("key is required in persistor config");if(!e.storage)throw new Error("redux-persist: config.storage is required. Try using one of the provided storage engines `import storage from 'redux-persist/lib/storage'`")}var r=e.version!==void 0?e.version:l1;e.debug;var n=e.stateReconciler===void 0?d1:e.stateReconciler,s=e.getStoredState||p1,i=e.timeout!==void 0?e.timeout:w1,a=null,o=!1,c=!0,d=function(h){return h._persist.rehydrated&&a&&!c&&a.update(h),h};return function(f,h){var p=f||{},v=p._persist,m=x1(p,["_persist"]),x=m;if(h.type===_o){var y=!1,E=function(C,_){process.env.NODE_ENV!=="production"&&y&&console.error('redux-persist: rehydrate for "'.concat(e.key,'" called after timeout.'),C,_),y||(h.rehydrate(e.key,C,_),y=!0)};if(i&&setTimeout(function(){!y&&E(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},i),c=!1,a||(a=f1(e)),v)return Nt({},t(x,h),{_persist:v});if(typeof h.rehydrate!="function"||typeof h.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return h.register(e.key),s(e).then(function(S){var C=e.migrate||function(_,M){return Promise.resolve(_)};C(S,r).then(function(_){E(_)},function(_){process.env.NODE_ENV!=="production"&&_&&console.error("redux-persist: migration error",_),E(void 0,_)})},function(S){E(void 0,S)}),Nt({},t(x,h),{_persist:{version:r,rehydrated:!1}})}else{if(h.type===Co)return o=!0,h.result(g1(e)),Nt({},t(x,h),{_persist:v});if(h.type===ko)return h.result(a&&a.flush()),Nt({},t(x,h),{_persist:v});if(h.type===Oo)c=!0;else if(h.type===ji){if(o)return Nt({},x,{_persist:Nt({},v,{rehydrated:!0})});if(h.key===e.key){var k=t(x,h),O=h.payload,b=n!==!1&&O!==void 0?n(O,f,k,e):k,g=Nt({},b,{_persist:Nt({},v,{rehydrated:!0})});return d(g)}}}if(!v)return t(f,h);var w=t(x,h);return w===x?f:d(Nt({},w,{_persist:v}))}}function ku(e){return O1(e)||k1(e)||S1()}function S1(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function k1(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function O1(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}function Ou(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function $a(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ou(r,!0).forEach(function(n){_1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ou(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _1(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var th={registry:[],bootstrapped:!1},C1=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:th,r=arguments.length>1?arguments[1]:void 0;switch(r.type){case Lo:return $a({},t,{registry:[].concat(ku(t.registry),[r.key])});case ji:var n=t.registry.indexOf(r.key),s=ku(t.registry);return s.splice(n,1),$a({},t,{registry:s,bootstrapped:s.length===0});default:return t}};function L1(e,t,r){if(process.env.NODE_ENV!=="production"){var n={},s=["blacklist","whitelist","transforms","storage","keyPrefix","migrate"];s.forEach(function(d){n[d]&&console.error('redux-persist: invalid option passed to persistStore: "'.concat(d,'". You may be incorrectly passing persistConfig into persistStore, whereas it should be passed into persistReducer.'))})}var i=vo(C1,th,void 0),a=function(f){i.dispatch({type:Lo,key:f})},o=function(f,h,p){var v={type:ji,payload:h,err:p,key:f};e.dispatch(v),i.dispatch(v)},c=$a({},i,{purge:function(){var f=[];return e.dispatch({type:Co,result:function(p){f.push(p)}}),Promise.all(f)},flush:function(){var f=[];return e.dispatch({type:ko,result:function(p){f.push(p)}}),Promise.all(f)},pause:function(){e.dispatch({type:Oo})},persist:function(){e.dispatch({type:_o,register:a,rehydrate:o})}});return c.persist(),c}const N1={key:"persist",storage:o1},rh=Lf({auth:zx}),j1=()=>Gf({reducer:rh}),M1=()=>{if(typeof window>"u")return j1();{const t=E1(N1,rh),r=Gf({reducer:t,middleware:n=>n({serializableCheck:{ignoredActions:[ko,ji,Oo,_o,Co,Lo]}})});return r.__persistor=L1(r),r}},T1=({menuItems:e,activeItemId:t,className:r,onSelectStore:n})=>{const s=Eo(),i=u.useContext(on).application,{isAuthenticated:a,user:o,store:c,availableStores:d}=u.useContext(go),[f,h]=u.useState(!1),[p,v]=u.useState(!1),[m,x]=u.useState("main"),y=()=>{h(!1)},E=b=>{n&&n(b),v(!1)},k=A("fixed inset-y-0 left-0 z-50 flex flex-col w-72 h-screen bg-white dark:bg-gray-900 border-r border-gray-200 dark:border-gray-800 transition-transform duration-300 ease-in-out md:translate-x-0 md:relative md:inset-auto shadow-xl md:shadow-none",{"translate-x-0":f,"-translate-x-full":!f},r),O=()=>{s(Vx()),v(!1)};return u.useEffect(()=>{if(!p){const b=setTimeout(()=>x("main"),200);return()=>clearTimeout(b)}},[p]),l.jsxs(l.Fragment,{children:[l.jsx("button",{className:"fixed top-4 left-4 z-50 p-2 text-gray-600 bg-white rounded-md shadow-md md:hidden dark:bg-gray-800 dark:text-gray-200",onClick:()=>h(!f),"aria-label":"Toggle Menu",children:l.jsx(q0,{size:24})}),f&&l.jsx("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>h(!1)}),p&&l.jsx("div",{className:"fixed inset-0 z-40 cursor-default",onClick:()=>v(!1)}),l.jsxs("aside",{className:k,children:[l.jsx("button",{className:"absolute top-4 right-4 p-2 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 md:hidden",onClick:()=>h(!1),"aria-label":"Close Menu",children:l.jsx(G0,{size:24})}),l.jsxs("div",{className:"flex items-center gap-3 px-6 pt-6 pb-3 flex-shrink-0",children:[l.jsx("div",{className:"inline-flex items-center justify-center p-1 bg-white/80 backdrop-blur-sm rounded-xl shadow-elegant",children:l.jsx("img",{src:Oa,alt:"App logo",loading:"lazy",className:"w-16 h-16 object-cover"})}),l.jsxs("span",{className:"font-semibold text-gray-800 dark:text-gray-400 mt-1",children:[i?.applicationName," ",l.jsx("span",{className:"font-normal",children:i?.applicationVersion})]})]}),l.jsx("nav",{className:"flex-1 overflow-y-auto px-4 py-2 custom-scrollbar",children:l.jsx("ul",{className:"space-y-1",children:e.map(b=>{const g=t===b.id;return l.jsx("li",{children:l.jsxs(Ae,{href:b.href,onClick:y,className:A("group flex items-center w-full px-3 py-2.5 rounded-lg text-sm font-medium transition-colors duration-200",{"bg-blue-50 text-blue-700 dark:bg-blue-900/20 dark:text-blue-400":g,"text-gray-600 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-100":!g}),children:[l.jsx(b.icon,{className:A("mr-3 flex-shrink-0 h-5 w-5",{"text-blue-600 dark:text-blue-400":g,"text-gray-400 group-hover:text-gray-600 dark:text-gray-500 dark:group-hover:text-gray-300":!g}),"aria-hidden":"true"}),l.jsx("span",{className:"truncate",children:b.label})]})},b.id)})})}),l.jsx("div",{className:"relative flex-shrink-0 border-t border-gray-200 dark:border-gray-800",children:a&&o?l.jsxs(l.Fragment,{children:[p&&l.jsx("div",{className:"absolute bottom-full left-4 right-4 mb-2 z-50 bg-white dark:bg-gray-800 rounded-lg shadow-xl border border-gray-100 dark:border-gray-700 overflow-hidden animate-in fade-in slide-in-from-bottom-2 duration-200",children:m==="main"?l.jsxs("div",{className:"py-1",children:[l.jsxs(Ae,{href:"/profile",className:"flex items-center w-full px-4 py-3 text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[l.jsx(uv,{className:"mr-3 text-gray-400"}),"Mi Perfil"]}),l.jsxs("button",{className:"flex cursor-pointer items-center justify-between w-full px-4 py-3 text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors text-left",onClick:b=>{b.stopPropagation(),x("stores")},children:[l.jsxs("div",{className:"flex items-center",children:[l.jsx(Q0,{className:"mr-3 text-gray-400"}),"Cambiar Tienda"]}),l.jsx(J0,{className:"text-xs text-gray-400"})]}),l.jsx("div",{className:"border-t border-gray-100 dark:border-gray-700 my-1"}),l.jsxs("button",{onClick:O,className:"flex cursor-pointer items-center w-full px-4 py-3 text-sm text-red-600 hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors text-left",children:[l.jsx(lv,{className:"mr-3"}),"Cerrar Sesión"]})]}):l.jsxs("div",{className:"flex flex-col max-h-80",children:[l.jsxs("div",{onClick:b=>{b.stopPropagation(),x("main")},className:"cursor-pointer flex items-center px-4 py-3 border-b border-gray-100 dark:border-gray-700 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-700 transition-colors text-left",children:[l.jsx("div",{className:"mr-2 text-gray-500",children:l.jsx(K0,{className:"text-sm"})}),l.jsx("span",{className:"text-sm font-semibold text-gray-800 dark:text-white",children:"Seleccionar Tienda"})]}),l.jsx("div",{className:"overflow-y-auto custom-scrollbar p-1",children:d&&d.length>0?d.map(b=>l.jsxs("button",{onClick:()=>E(b),className:A("w-full text-left px-4 py-2.5 text-sm rounded-md transition-colors flex items-center justify-between",{"bg-blue-50 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400 font-medium":c?.code===b.code,"text-gray-600 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer":c?.code!==b.code}),children:[l.jsxs("span",{children:[b.code," - ",b.commercialName]}),c?.code===b.code&&l.jsx(Z0,{className:"text-xs"})]},b.code)):l.jsx("div",{className:"px-4 py-3 text-xs text-gray-400 text-center",children:"No hay tiendas disponibles."})})]})}),l.jsxs("div",{className:A("group flex items-center py-6 px-4 cursor-pointer transition-colors duration-200",{"bg-gray-100 dark:bg-gray-800":p,"hover:bg-gray-50 dark:hover:bg-gray-800/50":!p}),onClick:()=>v(!p),children:[l.jsx("div",{className:"inline-flex items-center justify-center h-10 w-10 rounded-full bg-blue-600 text-white font-bold text-sm shadow-sm group-hover:scale-110 transition-transform",children:D1(o.userName,o.userLastName)}),l.jsxs("div",{className:"ml-3 flex-1 min-w-0",children:[l.jsxs("p",{className:"text-sm font-bold text-gray-900 dark:text-white truncate",children:[o.userName," ",o.userLastName]}),l.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400 truncate",children:["Store ",c?.code||"N/A"]})]})]})]}):l.jsxs("div",{className:"p-4 flex flex-col gap-3",children:[l.jsxs(rt,{children:[l.jsx(ov,{className:"mr-2"}),"Login"]}),l.jsxs(Tn,{children:[l.jsx(cv,{className:"mr-2"}),"Register"]})]})})]})]})};function D1(e,t){const r=e?e.charAt(0).toUpperCase():"",n=t?t.charAt(0).toUpperCase():"";return`${r}${n}`}const lr=({label:e,id:t,required:r,error:n,className:s,children:i})=>l.jsxs("div",{className:A("flex w-full flex-col",s),children:[l.jsx("div",{className:"flex flex-1 justify-between",children:l.jsxs("label",{htmlFor:t,className:A("block text-sm font-medium leading-6 text-gray-700 mb-1 truncate dark:text-gray-200"),children:[e," ",r&&l.jsx("span",{className:"text-red-500",children:"*"})]})}),i,l.jsx("span",{className:"text-xs text-red-500",children:n})]}),ln=(e,t)=>A("focus block bg-white dark:bg-gray-800 w-full rounded-xl border-0 text-gray-800 dark:text-gray-100 shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-700 placeholder:text-gray-400 dark:placeholder:text-gray-500 focus:ring-2 focus:ring-inset focus:ring-indigo-600 dark:focus:ring-indigo-400 sm:text-sm sm:leading-6 peer h-10",!!t&&"ring-red-500 dark:ring-red-500",e&&"!bg-gray-400/30 !text-gray-500 dark:!bg-gray-400/30 dark:!text-gray-400");function P1(e){const{id:t,label:r,options:n,selected:s,onSelectOption:i,wrapperClassName:a,required:o,disabled:c,...d}=e,f=h=>{const p=s.some(v=>v.id===h.id);i(p?s.filter(v=>v.id!==h.id):[...s,h])};return l.jsx(lr,{label:r,id:t,required:o,children:l.jsx("div",{className:A("flex flex-col gap-3",a,{"pointer-events-none opacity-50":c}),children:n.map(h=>l.jsx(mi,{id:`${t}-${h.id}`,label:h.label,checked:s.some(p=>p.id===h.id),onChangeChecked:()=>f(h),disabled:c,...d},h.id))})})}const A1=({label:e,id:t,required:r,error:n,className:s,wrapperClassName:i,disabled:a,...o})=>l.jsx(lr,{label:e,id:t,required:r,error:n,className:i,children:l.jsx("div",{className:"relative flex flex-1 items-center cursor-pointer",children:l.jsx("input",{...o,id:t,required:r,type:"date",disabled:a,className:A(ln(a),"truncate w-full",s)})})}),R1=({label:e,id:t,required:r,error:n,className:s,wrapperClassName:i,disabled:a,onChange:o,...c})=>{const d=u.useRef(null),[f,h]=u.useState(""),p=v=>{v.target.files&&v.target.files.length>0?h(v.target.files[0].name):h(""),o&&o(v)};return l.jsx(lr,{label:e,id:t,required:r,error:n,className:i,children:l.jsxs("div",{className:"relative flex flex-1 items-center",children:[l.jsx("input",{...c,id:t,required:r,type:"file",disabled:a,ref:d,onChange:p,className:"hidden"}),l.jsxs("button",{type:"button",disabled:a,className:A(ln(a,n),"flex items-center justify-between gap-2 px-3 cursor-pointer",s),onClick:()=>d.current?.click(),children:[!!f&&l.jsx("span",{className:"dark:text-gray-100",children:f}),!f&&l.jsx("span",{className:"text-gray-400 dark:text-gray-400",children:"Select file"}),l.jsx(Kd,{className:"text-indigo-600 dark:text-indigo-400",size:20})]})]})})},I1=({label:e,id:t,required:r,error:n,className:s,wrapperClassName:i,disabled:a,onChange:o,...c})=>{const d=u.useRef(null),[f,h]=u.useState(""),[p,v]=u.useState(!1),m=y=>{y.target.files&&y.target.files.length>0?h(y.target.files[0].name):h(""),o&&o(y)},x=y=>{if(y.preventDefault(),v(!1),a)return;const E=y.dataTransfer.files;if(E&&E.length>0&&(h(E[0].name),d.current)){const k=new DataTransfer;k.items.add(E[0]),d.current.files=k.files;const O=new Event("change",{bubbles:!0});d.current.dispatchEvent(O)}};return l.jsxs(lr,{label:e,id:t,required:r,error:n,className:i,children:[l.jsxs("div",{className:A("relative flex flex-col flex-1 items-center transition border-2 border-dashed rounded-xl p-4",p?"border-indigo-600 bg-indigo-50 dark:bg-indigo-900":"border-gray-300 bg-white dark:border-gray-700 dark:bg-gray-800"),onDragOver:y=>{y.preventDefault(),a||v(!0)},onDragLeave:y=>{y.preventDefault(),v(!1)},onDrop:x,onClick:()=>!a&&d.current?.click(),style:{cursor:a?"not-allowed":"pointer",minHeight:56},children:[l.jsx("input",{...c,id:t,required:r,type:"file",disabled:a,ref:d,onChange:m,className:"hidden"}),l.jsx(V0,{className:"text-indigo-600 dark:text-indigo-400",size:60}),!!f&&l.jsx("span",{className:"text-sm text-gray-800 dark:text-gray-100",children:f}),!f&&l.jsx("span",{className:"text-gray-400 dark:text-gray-400 text-sm",children:"Drag & drop a file here, or click to select"})]}),l.jsxs("button",{type:"button",disabled:a,className:A(ln(a,n),"flex items-center justify-between gap-2 px-3 cursor-pointer mt-2",s),onClick:()=>d.current?.click(),children:[!!f&&l.jsx("span",{className:"dark:text-gray-100",children:f}),!f&&l.jsx("span",{className:"text-gray-400 dark:text-gray-400",children:"Select File"}),l.jsx(Kd,{className:"text-indigo-600 dark:text-indigo-400",size:20})]})]})},Be=u.forwardRef(({label:e,id:t,type:r,required:n,error:s,className:i,wrapperClassName:a,disabled:o,...c},d)=>{const[f,h]=u.useState(r);return l.jsx(lr,{label:e,id:t,required:n,error:s,className:a,children:l.jsxs("div",{className:"relative flex flex-1 items-center",children:[l.jsx("input",{...c,ref:d,id:t,required:n,type:f,disabled:o,className:A(ln(o,s),"truncate",r==="password"&&"pr-8",i)}),r==="password"&&f==="password"&&l.jsx(tv,{type:"button",onClick:()=>h("text"),className:"absolute cursor-pointer text-indigo-600 dark:text-indigo-400 h-5 w-5 right-2"}),r==="password"&&f==="text"&&l.jsx(ev,{type:"button",onClick:()=>h("password"),className:"absolute cursor-pointer text-indigo-600 dark:text-indigo-400 h-5 w-5 right-2"})]})})});function F1(e,t){const{label:r,id:n,required:s,error:i,className:a,wrapperClassName:o,options:c,selected:d,onSelectOption:f,renderOption:h,filterFn:p,emptyMessage:v="No options found",disabled:m,footerOption:x,loading:y,icon:E=null,searchText:k,setSearchText:O,...b}=e,[g,w]=u.useState(!1),[S,C]=u.useState(""),_=u.useRef(null),M=u.useMemo(()=>k!==void 0?k:S,[k,S]),D=u.useCallback($=>(O!==void 0?O:C)($),[O]),F=$=>l.jsx("p",{children:$.label}),z=u.useCallback(($,X)=>X.toLowerCase().split(" ").filter(Boolean).every(le=>$.label.toLowerCase().includes(le)),[]),W=$=>{f($),D($.label),w(!1)},G=u.useMemo(()=>{const $=p||z;return c.filter(X=>$(X,M))},[c,M,p,z]);return u.useEffect(()=>{function $(X){_.current&&!_.current.contains(X.target)&&(w(!1),d&&D(d.label))}return document.addEventListener("mousedown",$),()=>{document.removeEventListener("mousedown",$)}},[_,d,D]),u.useEffect(()=>{g||D(d?.label??"")},[g,d,D]),l.jsxs("div",{className:A("relative",o),ref:_,children:[l.jsx(Be,{...b,id:n,ref:t,label:r,error:!g&&i,required:s,value:M,onChange:$=>{D($.target.value),w(!0)},onFocus:()=>{D(""),w(!0)},disabled:m,className:A("pr-8",m?"pointer-events-none":"cursor-pointer",d&&"text-gray-900",a)}),l.jsxs("div",{onClick:()=>{m||(D(g&&d?.label||""),w(!g))},className:A("absolute right-0 flex items-center pr-2 text-gray-400",m?"pointer-events-none":"cursor-pointer",r?"top-10":"top-4"),children:[!E&&(g?l.jsx(ef,{}):l.jsx(uo,{})),E]}),g&&l.jsxs("ul",{className:A("absolute z-10 min-w-full mt-1 text-xs text-gray-800 rounded-md shadow-lg max-h-56 overflow-auto dark:bg-gray-800 dark:text-gray-100",m&&"pointer-events-none opacity-50"),children:[y&&l.jsx(gi,{className:"h-7 w-7"}),!y&&G.length>0&&G.map(($,X)=>l.jsx("li",{onClick:()=>W($),className:A("px-4 py-2 cursor-pointer hover:bg-indigo-600 hover:text-white dark:hover:bg-indigo-700 dark:hover:text-gray-100",$.id!==d?.id&&X%2===0?"bg-white dark:bg-gray-700":"bg-gray-100 dark:bg-gray-800",$.id===d?.id&&"border-indigo-600 border-2 dark:border-indigo-400",X==0&&"rounded-t-md",X==G.length-1&&"rounded-b-md"),children:(h||F)($)},$.id)),!y&&G.length===0&&l.jsx("li",{className:"px-4 py-2 truncate text-gray-500 italic bg-white dark:bg-gray-800 dark:text-gray-400",children:v}),x&&l.jsx("div",{className:"sticky bottom-0 bg-white dark:bg-gray-800 border-t border-gray-300 dark:border-gray-700",children:l.jsx("li",{onClick:()=>W(x),className:"px-4 py-2 cursor-pointer hover:bg-indigo-600 hover:text-white dark:hover:bg-indigo-700 dark:hover:text-gray-100",children:(h||F)(x)},x.id)})]})]})}const ct=u.forwardRef(F1),_u={lat:10.48801,lng:-66.87919},$1=["places"],nh=({label:e,disabled:t,wrapperClassName:r,onSelectLocation:n,initialCoordinates:s,...i})=>{const{isLoaded:a,loadError:o}=oo({googleMapsApiKey:"",libraries:$1}),[c,d]=u.useState(s||_u),[f,h]=u.useState(s||_u),[p,v]=u.useState(""),[m,x]=u.useState([]),[y,E]=u.useState(null),k=u.useRef(null),O=u.useRef(null),b=u.useRef(null),g=u.useRef(null),w=u.useCallback(_=>{!O.current||!_.value.place_id||O.current.getDetails({placeId:_.value.place_id,fields:["geometry"],sessionToken:g.current??void 0},(M,D)=>{if(D===window.google.maps.places.PlacesServiceStatus.OK&&M?.geometry?.location){const F={lat:M.geometry.location.lat(),lng:M.geometry.location.lng()};h(F),d(F),v(_.label),E(_),x([])}g.current=null})},[]),S=u.useCallback(()=>{!b.current||!O.current||b.current.geocode({location:f},(_,M)=>{if(M!==window.google.maps.GeocoderStatus.OK||!_){console.error("Geocode was not successful for the following reason: "+M);return}const D=_.find(F=>F.types.includes("route")||F.types.includes("intersection"))??_[0];D?.place_id&&O.current?.getDetails({placeId:D.place_id},(F,z)=>{z===window.google.maps.places.PlacesServiceStatus.OK&&F&&n?.(F)})})},[f,n]),C=u.useCallback(_=>{_.latLng&&(h({lat:_.latLng.lat(),lng:_.latLng.lng()}),v(""),E(null))},[]);return u.useEffect(()=>{a&&(b.current=new window.google.maps.Geocoder,k.current=new window.google.maps.places.AutocompleteService,O.current=new window.google.maps.places.PlacesService(document.createElement("div")))},[a]),u.useEffect(()=>{if(!a||!p||t||p===y?.label){x([]);return}g.current||(g.current=new window.google.maps.places.AutocompleteSessionToken),k.current?.getPlacePredictions({input:p,sessionToken:g.current},_=>{if(_&&Array.isArray(_)){const M=_.map(D=>({id:D.place_id,label:D.description,value:D}));x(M)}else x([])})},[p,a,t,y]),u.useEffect(()=>{s&&(h(s),d(s))},[s]),o?l.jsx("div",{children:"Error al cargar Google Maps. Por favor, revisa la API Key y la conexión."}):a?l.jsxs("div",{className:A("flex flex-1 flex-col w-full h-full gap-2",r),children:[l.jsx(ct,{...i,label:e,options:m,selected:y,onSelectOption:w,searchText:p,setSearchText:_=>{_||(g.current=null),v(_)},disabled:t}),l.jsx(Pd,{mapContainerStyle:{height:"100%",width:"100%"},zoom:16,center:c,onClick:C,children:l.jsx($d,{position:f})}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(rt,{onClick:S,disabled:t,children:"Seleccionar"})})]}):l.jsxs("div",{className:"flex flex-col items-center justify-center w-full h-64",children:["Cargando mapa...",l.jsx(gi,{className:"w-8 h-8 text-indigo-600"})]})},sh=u.forwardRef(({label:e,id:t,required:r,error:n,className:s,wrapperClassName:i,disabled:a,value:o,onChange:c,...d},f)=>{const h=()=>{if(c){const v=parseInt(String(o??"0"),10),m=(isNaN(v)?0:v)+1,x={target:{value:String(m),name:d.name,type:"number",step:"1"}};c(x)}},p=()=>{if(c){const v=parseInt(String(o??"0"),10),m=(isNaN(v)?0:v)-1,x={target:{value:String(m),name:d.name,type:"number",step:"1"}};c(x)}};return l.jsx(lr,{label:e,id:t,required:r,error:n,className:i,children:l.jsxs("div",{className:"flex flex-row items-center",children:[l.jsx("div",{children:l.jsx(rt,{type:"button",disabled:a,onClick:p,className:"h-10 rounded-r-none",children:l.jsx(sv,{className:"h-3 w-3"})})}),l.jsx("div",{className:"relative flex flex-1 items-center",children:l.jsx("input",{...d,ref:f,id:t,required:r,type:"number",step:"1",disabled:a,value:o,onChange:c,className:A(ln(a,n),"!rounded-none truncate",s)})}),l.jsx("div",{children:l.jsx(rt,{type:"button",disabled:a,onClick:h,className:"h-10 rounded-l-none",children:l.jsx(iv,{className:"h-3 w-3"})})})]})})});function U1(e){return H({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M124,175a8,8,0,0,0,7.94,0c2.45-1.41,60-35,60-94.95A64,64,0,0,0,64,80C64,140,121.58,173.54,124,175ZM128,56a24,24,0,1,1-24,24A24,24,0,0,1,128,56ZM240,184c0,31.18-57.71,48-112,48S16,215.18,16,184c0-14.59,13.22-27.51,37.23-36.37a8,8,0,0,1,5.54,15C42.26,168.74,32,176.92,32,184c0,13.36,36.52,32,96,32s96-18.64,96-32c0-7.08-10.26-15.26-26.77-21.36a8,8,0,0,1,5.54-15C226.78,156.49,240,169.41,240,184Z"},child:[]}]})(e)}function V1(e){return H({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M112,80a16,16,0,1,1,16,16A16,16,0,0,1,112,80ZM64,80a64,64,0,0,1,128,0c0,59.95-57.58,93.54-60,94.95a8,8,0,0,1-7.94,0C121.58,173.54,64,140,64,80Zm16,0c0,42.2,35.84,70.21,48,78.5,12.15-8.28,48-36.3,48-78.5a48,48,0,0,0-96,0Zm122.77,67.63a8,8,0,0,0-5.54,15C213.74,168.74,224,176.92,224,184c0,13.36-36.52,32-96,32s-96-18.64-96-32c0-7.08,10.26-15.26,26.77-21.36a8,8,0,0,0-5.54-15C29.22,156.49,16,169.41,16,184c0,31.18,57.71,48,112,48s112-16.82,112-48C240,169.41,226.78,156.49,202.77,147.63Z"},child:[]}]})(e)}const z1=["places"],B1=({label:e,onSelectLocation:t,disabled:r,...n})=>{const{isLoaded:s,loadError:i}=oo({googleMapsApiKey:"",libraries:z1}),[a,o]=u.useState(""),[c,d]=u.useState(!1),[f,h]=u.useState(null),[p,v]=u.useState(null),[m,x]=u.useState([]),y=u.useRef(null),E=u.useRef(null),k=u.useRef(null),O=g=>{!E.current||!g.value.place_id||E.current.getDetails({placeId:g.id},(w,S)=>{S===window.google.maps.places.PlacesServiceStatus.OK&&w&&(h(g),v(w),t(w)),k.current=null})},b=g=>{const w={place_id:g.place_id??"",description:g.formatted_address||g.name||"",types:g.types??[],matched_substrings:[],structured_formatting:{main_text:g.name||"",secondary_text:g.formatted_address||"",main_text_matched_substrings:[]},terms:[]};h({id:w.place_id,label:w.description,value:w}),o(w.description),t(g),v(g),d(!1)};return u.useEffect(()=>{s&&(y.current=new window.google.maps.places.AutocompleteService,E.current=new window.google.maps.places.PlacesService(document.createElement("div")))},[s]),u.useEffect(()=>{if(!s||!a||r||a===f?.label){x([]);return}k.current||(k.current=new window.google.maps.places.AutocompleteSessionToken),y.current?.getPlacePredictions({input:a,sessionToken:k.current},g=>{if(g&&Array.isArray(g)){const w=g.map(S=>({id:S.place_id,label:S.description,value:S}));x(w)}else x([])})},[a,r,f,s]),i?l.jsx("div",{children:"Error al cargar Google Maps. Por favor, revisa la API Key y la conexión."}):l.jsxs(l.Fragment,{children:[l.jsx(ct,{...n,label:e,options:m,selected:f,onSelectOption:O,searchText:a,setSearchText:g=>{g||(k.current=null),o(g)},disabled:r,icon:l.jsxs("span",{className:"relative group",onClick:()=>d(!0),children:[l.jsx(V1,{className:"w-5 h-5 text-indigo-600 block group-hover:hidden transition-all"}),l.jsx(U1,{className:"w-5 h-5 text-indigo-600 hidden group-hover:block transition-all"})]})}),l.jsx(Xs,{open:c,onClose:()=>d(!1),children:l.jsx("div",{className:"h-96 w-96",children:l.jsx(nh,{label:"Buscar en Google Maps",onSelectLocation:b,initialCoordinates:p?{lat:p.geometry?.location?.lat()||0,lng:p.geometry?.location?.lng()||0}:void 0})})})]})};function oi(e){const{id:t,label:r,options:n,selected:s,onSelectOption:i,wrapperClassName:a,required:o,disabled:c,...d}=e;return l.jsx(lr,{label:r,id:t,required:o,children:l.jsx("div",{className:A("flex flex-col gap-3",a,{"pointer-events-none opacity-50":c}),children:n.map(f=>l.jsxs("div",{className:"flex items-center gap-2",onClick:()=>i(f),children:[l.jsx("input",{...d,type:"radio",id:`${t}-${f.id}`,name:r,value:f.id,checked:s?.id===f.id,onChange:()=>i(f),className:"h-4 w-4 text-indigo-600 border-gray-300 focus:ring-indigo-500 cursor-pointer"}),l.jsx("label",{htmlFor:`${t}-${f.id}`,className:"text-xs font-medium text-gray-800 dark:text-gray-300 cursor-pointer",children:l.jsx("p",{children:f.label})})]},f.id))})})}function W1(e){const{label:t,id:r,required:n,error:s,wrapperClassName:i,groupedOptions:a,selected:o,onSelectOption:c,renderOption:d,filterFn:f,emptyMessage:h="No hay resultados",disabled:p,footerOption:v,...m}=e,[x,y]=u.useState(!1),[E,k]=u.useState(o?.label||""),O=u.useRef(null);u.useEffect(()=>{function C(_){O.current&&!O.current.contains(_.target)&&(y(!1),o&&k(o.label))}return document.addEventListener("mousedown",C),()=>{document.removeEventListener("mousedown",C)}},[O,o]);const b=C=>l.jsx("p",{children:C.label}),g=u.useCallback((C,_)=>_.toLowerCase().split(" ").filter(Boolean).every(D=>C.label.toLowerCase().includes(D)),[]),w=C=>{c(C),k(C.label),y(!1)},S=u.useMemo(()=>{const C=f||g;return a.map(M=>({...M,options:M.options.filter(D=>C(D,E))})).filter(M=>M.options.length>0||M.loading)},[a,E,f,g]);return l.jsxs("div",{className:A("relative",i),ref:O,children:[l.jsx(Be,{...m,id:r,label:t,error:s,required:n,value:E,onChange:C=>{k(C.target.value),y(!0)},onFocus:()=>{k(""),y(!0)},disabled:p,className:A("cursor-pointer",o&&"text-gray-900")}),l.jsx("div",{onClick:()=>y(!x),className:"absolute inset-y-12 right-0 flex items-center pr-2 cursor-pointer text-gray-400",children:x?l.jsx(ef,{}):l.jsx(uo,{})}),x&&l.jsxs("ul",{className:A("absolute z-10 w-full mt-1 text-xs text-gray-800 bg-white border border-gray-300 rounded-md shadow-lg max-h-56 overflow-auto dark:bg-gray-800 dark:text-gray-100 dark:border-gray-700",p&&"pointer-events-none opacity-50"),children:[S.length>0&&S.map(C=>l.jsxs("div",{children:[l.jsx("li",{className:"px-4 py-2 font-bold text-gray-900 sticky top-0 bg-gray-200 dark:bg-gray-900 dark:text-gray-100",children:C.title}),C.loading&&l.jsx("div",{className:"flex justify-center py-2",children:l.jsx(gi,{className:"h-7 w-7"})}),!C.loading&&C.options.map((_,M)=>l.jsx("li",{onClick:()=>w(_),className:A("px-4 py-2 cursor-pointer hover:bg-indigo-600 hover:text-white dark:hover:bg-indigo-700 dark:hover:text-gray-100",M%2===0?"bg-white dark:bg-gray-700":"bg-gray-100 dark:bg-gray-800"),children:(d||b)(_)},_.id))]},C.title)),S.length===0&&l.jsx("li",{className:"px-4 py-2 text-gray-500 italic bg-white dark:bg-gray-800 dark:text-gray-400",children:h}),v&&l.jsx("div",{className:"sticky bottom-0 bg-white dark:bg-gray-800 border-t border-gray-300 dark:border-gray-700",children:l.jsx("li",{onClick:()=>w(v),className:"px-4 py-2 cursor-pointer hover:bg-indigo-600 hover:text-white dark:hover:bg-indigo-700 dark:hover:text-gray-100",children:(d||b)(v)},v.id)})]})]})}const Y1=({label:e,id:t,required:r,error:n,className:s,wrapperClassName:i,disabled:a,...o})=>l.jsx(lr,{label:e,id:t,required:r,error:n,className:i,children:l.jsx("div",{className:"relative flex flex-1 items-center",children:l.jsx("textarea",{...o,id:t,required:r,disabled:a,className:A(ln(a,n),s)})})}),ca=236,Cu=["412","424","414","426","416","422"],ua={HEIGHT:30,WIDTH:23,LENGTH:1},H1=[15,39],G1=[24,49];var q1=function(t){return Z1(t)&&!K1(t)};function Z1(e){return!!e&&typeof e=="object"}function K1(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Q1(e)}var J1=typeof Symbol=="function"&&Symbol.for,X1=J1?Symbol.for("react.element"):60103;function Q1(e){return e.$$typeof===X1}function eb(e){return Array.isArray(e)?[]:{}}function li(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Rn(eb(e),e,t):e}function tb(e,t,r){return e.concat(t).map(function(n){return li(n,r)})}function rb(e,t,r){var n={};return r.isMergeableObject(e)&&Object.keys(e).forEach(function(s){n[s]=li(e[s],r)}),Object.keys(t).forEach(function(s){!r.isMergeableObject(t[s])||!e[s]?n[s]=li(t[s],r):n[s]=Rn(e[s],t[s],r)}),n}function Rn(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||tb,r.isMergeableObject=r.isMergeableObject||q1;var n=Array.isArray(t),s=Array.isArray(e),i=n===s;return i?n?r.arrayMerge(e,t,r):rb(e,t,r):li(t,r)}Rn.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,s){return Rn(n,s,r)},{})};var Ua=Rn,ih=typeof global=="object"&&global&&global.Object===Object&&global,nb=typeof self=="object"&&self&&self.Object===Object&&self,Ot=ih||nb||Function("return this")(),or=Ot.Symbol,ah=Object.prototype,sb=ah.hasOwnProperty,ib=ah.toString,xn=or?or.toStringTag:void 0;function ab(e){var t=sb.call(e,xn),r=e[xn];try{e[xn]=void 0;var n=!0}catch{}var s=ib.call(e);return n&&(t?e[xn]=r:delete e[xn]),s}var ob=Object.prototype,lb=ob.toString;function cb(e){return lb.call(e)}var ub="[object Null]",db="[object Undefined]",Lu=or?or.toStringTag:void 0;function Nr(e){return e==null?e===void 0?db:ub:Lu&&Lu in Object(e)?ab(e):cb(e)}function oh(e,t){return function(r){return e(t(r))}}var No=oh(Object.getPrototypeOf,Object);function jr(e){return e!=null&&typeof e=="object"}var fb="[object Object]",hb=Function.prototype,pb=Object.prototype,lh=hb.toString,mb=pb.hasOwnProperty,gb=lh.call(Object);function Nu(e){if(!jr(e)||Nr(e)!=fb)return!1;var t=No(e);if(t===null)return!0;var r=mb.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&lh.call(r)==gb}function vb(){this.__data__=[],this.size=0}function ch(e,t){return e===t||e!==e&&t!==t}function Mi(e,t){for(var r=e.length;r--;)if(ch(e[r][0],t))return r;return-1}var yb=Array.prototype,xb=yb.splice;function bb(e){var t=this.__data__,r=Mi(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():xb.call(t,r,1),--this.size,!0}function wb(e){var t=this.__data__,r=Mi(t,e);return r<0?void 0:t[r][1]}function Eb(e){return Mi(this.__data__,e)>-1}function Sb(e,t){var r=this.__data__,n=Mi(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function zt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}zt.prototype.clear=vb;zt.prototype.delete=bb;zt.prototype.get=wb;zt.prototype.has=Eb;zt.prototype.set=Sb;function kb(){this.__data__=new zt,this.size=0}function Ob(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function _b(e){return this.__data__.get(e)}function Cb(e){return this.__data__.has(e)}function Zn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Lb="[object AsyncFunction]",Nb="[object Function]",jb="[object GeneratorFunction]",Mb="[object Proxy]";function uh(e){if(!Zn(e))return!1;var t=Nr(e);return t==Nb||t==jb||t==Lb||t==Mb}var da=Ot["__core-js_shared__"],ju=(function(){var e=/[^.]+$/.exec(da&&da.keys&&da.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function Tb(e){return!!ju&&ju in e}var Db=Function.prototype,Pb=Db.toString;function Mr(e){if(e!=null){try{return Pb.call(e)}catch{}try{return e+""}catch{}}return""}var Ab=/[\\^$.*+?()[\]{}|]/g,Rb=/^\[object .+?Constructor\]$/,Ib=Function.prototype,Fb=Object.prototype,$b=Ib.toString,Ub=Fb.hasOwnProperty,Vb=RegExp("^"+$b.call(Ub).replace(Ab,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function zb(e){if(!Zn(e)||Tb(e))return!1;var t=uh(e)?Vb:Rb;return t.test(Mr(e))}function Bb(e,t){return e?.[t]}function Tr(e,t){var r=Bb(e,t);return zb(r)?r:void 0}var In=Tr(Ot,"Map"),Fn=Tr(Object,"create");function Wb(){this.__data__=Fn?Fn(null):{},this.size=0}function Yb(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Hb="__lodash_hash_undefined__",Gb=Object.prototype,qb=Gb.hasOwnProperty;function Zb(e){var t=this.__data__;if(Fn){var r=t[e];return r===Hb?void 0:r}return qb.call(t,e)?t[e]:void 0}var Kb=Object.prototype,Jb=Kb.hasOwnProperty;function Xb(e){var t=this.__data__;return Fn?t[e]!==void 0:Jb.call(t,e)}var Qb="__lodash_hash_undefined__";function e2(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Fn&&t===void 0?Qb:t,this}function Cr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Cr.prototype.clear=Wb;Cr.prototype.delete=Yb;Cr.prototype.get=Zb;Cr.prototype.has=Xb;Cr.prototype.set=e2;function t2(){this.size=0,this.__data__={hash:new Cr,map:new(In||zt),string:new Cr}}function r2(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ti(e,t){var r=e.__data__;return r2(t)?r[typeof t=="string"?"string":"hash"]:r.map}function n2(e){var t=Ti(this,e).delete(e);return this.size-=t?1:0,t}function s2(e){return Ti(this,e).get(e)}function i2(e){return Ti(this,e).has(e)}function a2(e,t){var r=Ti(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function cr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}cr.prototype.clear=t2;cr.prototype.delete=n2;cr.prototype.get=s2;cr.prototype.has=i2;cr.prototype.set=a2;var o2=200;function l2(e,t){var r=this.__data__;if(r instanceof zt){var n=r.__data__;if(!In||n.length<o2-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new cr(n)}return r.set(e,t),this.size=r.size,this}function cn(e){var t=this.__data__=new zt(e);this.size=t.size}cn.prototype.clear=kb;cn.prototype.delete=Ob;cn.prototype.get=_b;cn.prototype.has=Cb;cn.prototype.set=l2;function c2(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var Mu=(function(){try{var e=Tr(Object,"defineProperty");return e({},"",{}),e}catch{}})();function dh(e,t,r){t=="__proto__"&&Mu?Mu(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var u2=Object.prototype,d2=u2.hasOwnProperty;function fh(e,t,r){var n=e[t];(!(d2.call(e,t)&&ch(n,r))||r===void 0&&!(t in e))&&dh(e,t,r)}function Di(e,t,r,n){var s=!r;r||(r={});for(var i=-1,a=t.length;++i<a;){var o=t[i],c=void 0;c===void 0&&(c=e[o]),s?dh(r,o,c):fh(r,o,c)}return r}function f2(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var h2="[object Arguments]";function Tu(e){return jr(e)&&Nr(e)==h2}var hh=Object.prototype,p2=hh.hasOwnProperty,m2=hh.propertyIsEnumerable,g2=Tu((function(){return arguments})())?Tu:function(e){return jr(e)&&p2.call(e,"callee")&&!m2.call(e,"callee")},Kn=Array.isArray;function v2(){return!1}var ph=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Du=ph&&typeof module=="object"&&module&&!module.nodeType&&module,y2=Du&&Du.exports===ph,Pu=y2?Ot.Buffer:void 0,x2=Pu?Pu.isBuffer:void 0,mh=x2||v2,b2=9007199254740991,w2=/^(?:0|[1-9]\d*)$/;function E2(e,t){var r=typeof e;return t=t??b2,!!t&&(r=="number"||r!="symbol"&&w2.test(e))&&e>-1&&e%1==0&&e<t}var S2=9007199254740991;function gh(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=S2}var k2="[object Arguments]",O2="[object Array]",_2="[object Boolean]",C2="[object Date]",L2="[object Error]",N2="[object Function]",j2="[object Map]",M2="[object Number]",T2="[object Object]",D2="[object RegExp]",P2="[object Set]",A2="[object String]",R2="[object WeakMap]",I2="[object ArrayBuffer]",F2="[object DataView]",$2="[object Float32Array]",U2="[object Float64Array]",V2="[object Int8Array]",z2="[object Int16Array]",B2="[object Int32Array]",W2="[object Uint8Array]",Y2="[object Uint8ClampedArray]",H2="[object Uint16Array]",G2="[object Uint32Array]",Le={};Le[$2]=Le[U2]=Le[V2]=Le[z2]=Le[B2]=Le[W2]=Le[Y2]=Le[H2]=Le[G2]=!0;Le[k2]=Le[O2]=Le[I2]=Le[_2]=Le[F2]=Le[C2]=Le[L2]=Le[N2]=Le[j2]=Le[M2]=Le[T2]=Le[D2]=Le[P2]=Le[A2]=Le[R2]=!1;function q2(e){return jr(e)&&gh(e.length)&&!!Le[Nr(e)]}function jo(e){return function(t){return e(t)}}var vh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_n=vh&&typeof module=="object"&&module&&!module.nodeType&&module,Z2=_n&&_n.exports===vh,fa=Z2&&ih.process,Qr=(function(){try{var e=_n&&_n.require&&_n.require("util").types;return e||fa&&fa.binding&&fa.binding("util")}catch{}})(),Au=Qr&&Qr.isTypedArray,K2=Au?jo(Au):q2,J2=Object.prototype,X2=J2.hasOwnProperty;function yh(e,t){var r=Kn(e),n=!r&&g2(e),s=!r&&!n&&mh(e),i=!r&&!n&&!s&&K2(e),a=r||n||s||i,o=a?f2(e.length,String):[],c=o.length;for(var d in e)(t||X2.call(e,d))&&!(a&&(d=="length"||s&&(d=="offset"||d=="parent")||i&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||E2(d,c)))&&o.push(d);return o}var Q2=Object.prototype;function Mo(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Q2;return e===r}var ew=oh(Object.keys,Object),tw=Object.prototype,rw=tw.hasOwnProperty;function nw(e){if(!Mo(e))return ew(e);var t=[];for(var r in Object(e))rw.call(e,r)&&r!="constructor"&&t.push(r);return t}function xh(e){return e!=null&&gh(e.length)&&!uh(e)}function To(e){return xh(e)?yh(e):nw(e)}function sw(e,t){return e&&Di(t,To(t),e)}function iw(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var aw=Object.prototype,ow=aw.hasOwnProperty;function lw(e){if(!Zn(e))return iw(e);var t=Mo(e),r=[];for(var n in e)n=="constructor"&&(t||!ow.call(e,n))||r.push(n);return r}function Do(e){return xh(e)?yh(e,!0):lw(e)}function cw(e,t){return e&&Di(t,Do(t),e)}var bh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ru=bh&&typeof module=="object"&&module&&!module.nodeType&&module,uw=Ru&&Ru.exports===bh,Iu=uw?Ot.Buffer:void 0,Fu=Iu?Iu.allocUnsafe:void 0;function dw(e,t){if(t)return e.slice();var r=e.length,n=Fu?Fu(r):new e.constructor(r);return e.copy(n),n}function wh(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function fw(e,t){for(var r=-1,n=e==null?0:e.length,s=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[s++]=a)}return i}function Eh(){return[]}var hw=Object.prototype,pw=hw.propertyIsEnumerable,$u=Object.getOwnPropertySymbols,Po=$u?function(e){return e==null?[]:(e=Object(e),fw($u(e),function(t){return pw.call(e,t)}))}:Eh;function mw(e,t){return Di(e,Po(e),t)}function Sh(e,t){for(var r=-1,n=t.length,s=e.length;++r<n;)e[s+r]=t[r];return e}var gw=Object.getOwnPropertySymbols,kh=gw?function(e){for(var t=[];e;)Sh(t,Po(e)),e=No(e);return t}:Eh;function vw(e,t){return Di(e,kh(e),t)}function Oh(e,t,r){var n=t(e);return Kn(e)?n:Sh(n,r(e))}function yw(e){return Oh(e,To,Po)}function xw(e){return Oh(e,Do,kh)}var Va=Tr(Ot,"DataView"),za=Tr(Ot,"Promise"),Ba=Tr(Ot,"Set"),Wa=Tr(Ot,"WeakMap"),Uu="[object Map]",bw="[object Object]",Vu="[object Promise]",zu="[object Set]",Bu="[object WeakMap]",Wu="[object DataView]",ww=Mr(Va),Ew=Mr(In),Sw=Mr(za),kw=Mr(Ba),Ow=Mr(Wa),Dt=Nr;(Va&&Dt(new Va(new ArrayBuffer(1)))!=Wu||In&&Dt(new In)!=Uu||za&&Dt(za.resolve())!=Vu||Ba&&Dt(new Ba)!=zu||Wa&&Dt(new Wa)!=Bu)&&(Dt=function(e){var t=Nr(e),r=t==bw?e.constructor:void 0,n=r?Mr(r):"";if(n)switch(n){case ww:return Wu;case Ew:return Uu;case Sw:return Vu;case kw:return zu;case Ow:return Bu}return t});var _w=Object.prototype,Cw=_w.hasOwnProperty;function Lw(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Cw.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Yu=Ot.Uint8Array;function Ao(e){var t=new e.constructor(e.byteLength);return new Yu(t).set(new Yu(e)),t}function Nw(e,t){var r=t?Ao(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var jw=/\w*$/;function Mw(e){var t=new e.constructor(e.source,jw.exec(e));return t.lastIndex=e.lastIndex,t}var Hu=or?or.prototype:void 0,Gu=Hu?Hu.valueOf:void 0;function Tw(e){return Gu?Object(Gu.call(e)):{}}function Dw(e,t){var r=t?Ao(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Pw="[object Boolean]",Aw="[object Date]",Rw="[object Map]",Iw="[object Number]",Fw="[object RegExp]",$w="[object Set]",Uw="[object String]",Vw="[object Symbol]",zw="[object ArrayBuffer]",Bw="[object DataView]",Ww="[object Float32Array]",Yw="[object Float64Array]",Hw="[object Int8Array]",Gw="[object Int16Array]",qw="[object Int32Array]",Zw="[object Uint8Array]",Kw="[object Uint8ClampedArray]",Jw="[object Uint16Array]",Xw="[object Uint32Array]";function Qw(e,t,r){var n=e.constructor;switch(t){case zw:return Ao(e);case Pw:case Aw:return new n(+e);case Bw:return Nw(e,r);case Ww:case Yw:case Hw:case Gw:case qw:case Zw:case Kw:case Jw:case Xw:return Dw(e,r);case Rw:return new n;case Iw:case Uw:return new n(e);case Fw:return Mw(e);case $w:return new n;case Vw:return Tw(e)}}var qu=Object.create,eE=(function(){function e(){}return function(t){if(!Zn(t))return{};if(qu)return qu(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function tE(e){return typeof e.constructor=="function"&&!Mo(e)?eE(No(e)):{}}var rE="[object Map]";function nE(e){return jr(e)&&Dt(e)==rE}var Zu=Qr&&Qr.isMap,sE=Zu?jo(Zu):nE,iE="[object Set]";function aE(e){return jr(e)&&Dt(e)==iE}var Ku=Qr&&Qr.isSet,oE=Ku?jo(Ku):aE,lE=1,cE=2,uE=4,_h="[object Arguments]",dE="[object Array]",fE="[object Boolean]",hE="[object Date]",pE="[object Error]",Ch="[object Function]",mE="[object GeneratorFunction]",gE="[object Map]",vE="[object Number]",Lh="[object Object]",yE="[object RegExp]",xE="[object Set]",bE="[object String]",wE="[object Symbol]",EE="[object WeakMap]",SE="[object ArrayBuffer]",kE="[object DataView]",OE="[object Float32Array]",_E="[object Float64Array]",CE="[object Int8Array]",LE="[object Int16Array]",NE="[object Int32Array]",jE="[object Uint8Array]",ME="[object Uint8ClampedArray]",TE="[object Uint16Array]",DE="[object Uint32Array]",_e={};_e[_h]=_e[dE]=_e[SE]=_e[kE]=_e[fE]=_e[hE]=_e[OE]=_e[_E]=_e[CE]=_e[LE]=_e[NE]=_e[gE]=_e[vE]=_e[Lh]=_e[yE]=_e[xE]=_e[bE]=_e[wE]=_e[jE]=_e[ME]=_e[TE]=_e[DE]=!0;_e[pE]=_e[Ch]=_e[EE]=!1;function Cn(e,t,r,n,s,i){var a,o=t&lE,c=t&cE,d=t&uE;if(a!==void 0)return a;if(!Zn(e))return e;var f=Kn(e);if(f){if(a=Lw(e),!o)return wh(e,a)}else{var h=Dt(e),p=h==Ch||h==mE;if(mh(e))return dw(e,o);if(h==Lh||h==_h||p&&!s){if(a=c||p?{}:tE(e),!o)return c?vw(e,cw(a,e)):mw(e,sw(a,e))}else{if(!_e[h])return s?e:{};a=Qw(e,h,o)}}i||(i=new cn);var v=i.get(e);if(v)return v;i.set(e,a),oE(e)?e.forEach(function(y){a.add(Cn(y,t,r,y,e,i))}):sE(e)&&e.forEach(function(y,E){a.set(E,Cn(y,t,r,E,e,i))});var m=d?c?xw:yw:c?Do:To,x=f?void 0:m(e);return c2(x||e,function(y,E){x&&(E=y,y=e[E]),fh(a,E,Cn(y,t,r,E,e,i))}),a}var PE=1,AE=4;function ks(e){return Cn(e,PE|AE)}var ha,Ju;function RE(){if(Ju)return ha;Ju=1;var e=Array.isArray,t=Object.keys,r=Object.prototype.hasOwnProperty,n=typeof Element<"u";function s(i,a){if(i===a)return!0;if(i&&a&&typeof i=="object"&&typeof a=="object"){var o=e(i),c=e(a),d,f,h;if(o&&c){if(f=i.length,f!=a.length)return!1;for(d=f;d--!==0;)if(!s(i[d],a[d]))return!1;return!0}if(o!=c)return!1;var p=i instanceof Date,v=a instanceof Date;if(p!=v)return!1;if(p&&v)return i.getTime()==a.getTime();var m=i instanceof RegExp,x=a instanceof RegExp;if(m!=x)return!1;if(m&&x)return i.toString()==a.toString();var y=t(i);if(f=y.length,f!==t(a).length)return!1;for(d=f;d--!==0;)if(!r.call(a,y[d]))return!1;if(n&&i instanceof Element&&a instanceof Element)return i===a;for(d=f;d--!==0;)if(h=y[d],!(h==="_owner"&&i.$$typeof)&&!s(i[h],a[h]))return!1;return!0}return i!==i&&a!==a}return ha=function(a,o){try{return s(a,o)}catch(c){if(c.message&&c.message.match(/stack|recursion/i)||c.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",c.name,c.message),!1;throw c}},ha}var IE=RE();const hr=to(IE);var FE=process.env.NODE_ENV==="production";function Qt(e,t){if(!FE){var r="Warning: "+t;typeof console<"u"&&console.warn(r);try{throw Error(r)}catch{}}}var $E=4;function Xu(e){return Cn(e,$E)}function Nh(e,t){for(var r=-1,n=e==null?0:e.length,s=Array(n);++r<n;)s[r]=t(e[r],r,e);return s}var UE="[object Symbol]";function Ro(e){return typeof e=="symbol"||jr(e)&&Nr(e)==UE}var VE="Expected a function";function Io(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(VE);var r=function(){var n=arguments,s=t?t.apply(this,n):n[0],i=r.cache;if(i.has(s))return i.get(s);var a=e.apply(this,n);return r.cache=i.set(s,a)||i,a};return r.cache=new(Io.Cache||cr),r}Io.Cache=cr;var zE=500;function BE(e){var t=Io(e,function(n){return r.size===zE&&r.clear(),n}),r=t.cache;return t}var WE=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,YE=/\\(\\)?/g,HE=BE(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(WE,function(r,n,s,i){t.push(s?i.replace(YE,"$1"):n||r)}),t});function GE(e){if(typeof e=="string"||Ro(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Qu=or?or.prototype:void 0,ed=Qu?Qu.toString:void 0;function jh(e){if(typeof e=="string")return e;if(Kn(e))return Nh(e,jh)+"";if(Ro(e))return ed?ed.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function qE(e){return e==null?"":jh(e)}function Mh(e){return Kn(e)?Nh(e,GE):Ro(e)?[e]:wh(HE(qE(e)))}var Os={exports:{}},we={};/** @license React v16.13.1
|
|
62
62
|
* react-is.production.min.js
|
|
63
63
|
*
|
|
64
64
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -74,7 +74,7 @@ Selectors that return the entire state are almost certainly a mistake, as they w
|
|
|
74
74
|
* LICENSE file in the root directory of this source tree.
|
|
75
75
|
*/var rd;function KE(){return rd||(rd=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function O(U){return typeof U=="string"||typeof U=="function"||U===n||U===d||U===i||U===s||U===h||U===p||typeof U=="object"&&U!==null&&(U.$$typeof===m||U.$$typeof===v||U.$$typeof===a||U.$$typeof===o||U.$$typeof===f||U.$$typeof===y||U.$$typeof===E||U.$$typeof===k||U.$$typeof===x)}function b(U){if(typeof U=="object"&&U!==null){var Ve=U.$$typeof;switch(Ve){case t:var st=U.type;switch(st){case c:case d:case n:case i:case s:case h:return st;default:var ge=st&&st.$$typeof;switch(ge){case o:case f:case m:case v:case a:return ge;default:return Ve}}case r:return Ve}}}var g=c,w=d,S=o,C=a,_=t,M=f,D=n,F=m,z=v,W=r,G=i,$=s,X=h,J=!1;function le(U){return J||(J=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),re(U)||b(U)===c}function re(U){return b(U)===d}function Q(U){return b(U)===o}function ee(U){return b(U)===a}function Y(U){return typeof U=="object"&&U!==null&&U.$$typeof===t}function ce(U){return b(U)===f}function T(U){return b(U)===n}function Se(U){return b(U)===m}function be(U){return b(U)===v}function te(U){return b(U)===r}function Ce(U){return b(U)===i}function K(U){return b(U)===s}function ue(U){return b(U)===h}Ee.AsyncMode=g,Ee.ConcurrentMode=w,Ee.ContextConsumer=S,Ee.ContextProvider=C,Ee.Element=_,Ee.ForwardRef=M,Ee.Fragment=D,Ee.Lazy=F,Ee.Memo=z,Ee.Portal=W,Ee.Profiler=G,Ee.StrictMode=$,Ee.Suspense=X,Ee.isAsyncMode=le,Ee.isConcurrentMode=re,Ee.isContextConsumer=Q,Ee.isContextProvider=ee,Ee.isElement=Y,Ee.isForwardRef=ce,Ee.isFragment=T,Ee.isLazy=Se,Ee.isMemo=be,Ee.isPortal=te,Ee.isProfiler=Ce,Ee.isStrictMode=K,Ee.isSuspense=ue,Ee.isValidElementType=O,Ee.typeOf=b})()),Ee}var nd;function JE(){return nd||(nd=1,process.env.NODE_ENV==="production"?Os.exports=ZE():Os.exports=KE()),Os.exports}var pa,sd;function XE(){if(sd)return pa;sd=1;var e=JE(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};i[e.ForwardRef]=n,i[e.Memo]=s;function a(m){return e.isMemo(m)?s:i[m.$$typeof]||t}var o=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;function v(m,x,y){if(typeof x!="string"){if(p){var E=h(x);E&&E!==p&&v(m,E,y)}var k=c(x);d&&(k=k.concat(d(x)));for(var O=a(m),b=a(x),g=0;g<k.length;++g){var w=k[g];if(!r[w]&&!(y&&y[w])&&!(b&&b[w])&&!(O&&O[w])){var S=f(x,w);try{o(m,w,S)}catch{}}}}return m}return pa=v,pa}XE();function $e(){return $e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$e.apply(this,arguments)}function Th(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,i;for(i=0;i<n.length;i++)s=n[i],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}var Pi=u.createContext(void 0);Pi.displayName="FormikContext";var QE=Pi.Provider;Pi.Consumer;function eS(){var e=u.useContext(Pi);return e||(process.env.NODE_ENV!=="production"?Qt(!1,"Formik context is undefined, please verify you are calling useFormikContext() as child of a <Formik> component."):Qt()),e}var ot=function(t){return typeof t=="function"},Ai=function(t){return t!==null&&typeof t=="object"},tS=function(t){return String(Math.floor(Number(t)))===t},ma=function(t){return Object.prototype.toString.call(t)==="[object String]"},rS=function(t){return u.Children.count(t)===0},ga=function(t){return Ai(t)&&ot(t.then)};function nS(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Xe(e,t,r,n){n===void 0&&(n=0);for(var s=Mh(t);e&&n<s.length;)e=e[s[n++]];return n!==s.length&&!e||e===void 0?r:e}function Er(e,t,r){for(var n=Xu(e),s=n,i=0,a=Mh(t);i<a.length-1;i++){var o=a[i],c=Xe(e,a.slice(0,i+1));if(c&&(Ai(c)||Array.isArray(c)))s=s[o]=Xu(c);else{var d=a[i+1];s=s[o]=tS(d)&&Number(d)>=0?[]:{}}}return(i===0?e:s)[a[i]]===r?e:(r===void 0?delete s[a[i]]:s[a[i]]=r,i===0&&r===void 0&&delete n[a[i]],n)}function Dh(e,t,r,n){r===void 0&&(r=new WeakMap),n===void 0&&(n={});for(var s=0,i=Object.keys(e);s<i.length;s++){var a=i[s],o=e[a];Ai(o)?r.get(o)||(r.set(o,!0),n[a]=Array.isArray(o)?[]:{},Dh(o,t,r,n[a])):n[a]=t}return n}function sS(e,t){switch(t.type){case"SET_VALUES":return $e({},e,{values:t.payload});case"SET_TOUCHED":return $e({},e,{touched:t.payload});case"SET_ERRORS":return hr(e.errors,t.payload)?e:$e({},e,{errors:t.payload});case"SET_STATUS":return $e({},e,{status:t.payload});case"SET_ISSUBMITTING":return $e({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return $e({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return $e({},e,{values:Er(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return $e({},e,{touched:Er(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return $e({},e,{errors:Er(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return $e({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return $e({},e,{touched:Dh(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return $e({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return $e({},e,{isSubmitting:!1});default:return e}}var dr={},_s={};function iS(e){var t=e.validateOnChange,r=t===void 0?!0:t,n=e.validateOnBlur,s=n===void 0?!0:n,i=e.validateOnMount,a=i===void 0?!1:i,o=e.isInitialValid,c=e.enableReinitialize,d=c===void 0?!1:c,f=e.onSubmit,h=Th(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),p=$e({validateOnChange:r,validateOnBlur:s,validateOnMount:a,onSubmit:f},h),v=u.useRef(p.initialValues),m=u.useRef(p.initialErrors||dr),x=u.useRef(p.initialTouched||_s),y=u.useRef(p.initialStatus),E=u.useRef(!1),k=u.useRef({});process.env.NODE_ENV!=="production"&&u.useEffect(function(){typeof o>"u"||(process.env.NODE_ENV!=="production"?Qt(!1,"isInitialValid has been deprecated and will be removed in future versions of Formik. Please use initialErrors or validateOnMount instead."):Qt())},[]),u.useEffect(function(){return E.current=!0,function(){E.current=!1}},[]);var O=u.useState(0),b=O[1],g=u.useRef({values:ks(p.initialValues),errors:ks(p.initialErrors)||dr,touched:ks(p.initialTouched)||_s,status:ks(p.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),w=g.current,S=u.useCallback(function(N){var I=g.current;g.current=sS(I,N),I!==g.current&&b(function(B){return B+1})},[]),C=u.useCallback(function(N,I){return new Promise(function(B,Z){var ie=p.validate(N,I);ie==null?B(dr):ga(ie)?ie.then(function(he){B(he||dr)},function(he){process.env.NODE_ENV!=="production"&&console.warn("Warning: An unhandled error was caught during validation in <Formik validate />",he),Z(he)}):B(ie)})},[p.validate]),_=u.useCallback(function(N,I){var B=p.validationSchema,Z=ot(B)?B(I):B,ie=I&&Z.validateAt?Z.validateAt(I,N):oS(N,Z);return new Promise(function(he,De){ie.then(function(){he(dr)},function(He){He.name==="ValidationError"?he(aS(He)):(process.env.NODE_ENV!=="production"&&console.warn("Warning: An unhandled error was caught during validation in <Formik validationSchema />",He),De(He))})})},[p.validationSchema]),M=u.useCallback(function(N,I){return new Promise(function(B){return B(k.current[N].validate(I))})},[]),D=u.useCallback(function(N){var I=Object.keys(k.current).filter(function(Z){return ot(k.current[Z].validate)}),B=I.length>0?I.map(function(Z){return M(Z,Xe(N,Z))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(B).then(function(Z){return Z.reduce(function(ie,he,De){return he==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||he&&(ie=Er(ie,I[De],he)),ie},{})})},[M]),F=u.useCallback(function(N){return Promise.all([D(N),p.validationSchema?_(N):{},p.validate?C(N):{}]).then(function(I){var B=I[0],Z=I[1],ie=I[2],he=Ua.all([B,Z,ie],{arrayMerge:lS});return he})},[p.validate,p.validationSchema,D,C,_]),z=it(function(N){return N===void 0&&(N=w.values),S({type:"SET_ISVALIDATING",payload:!0}),F(N).then(function(I){return E.current&&(S({type:"SET_ISVALIDATING",payload:!1}),S({type:"SET_ERRORS",payload:I})),I})});u.useEffect(function(){a&&E.current===!0&&hr(v.current,p.initialValues)&&z(v.current)},[a,z]);var W=u.useCallback(function(N){var I=N&&N.values?N.values:v.current,B=N&&N.errors?N.errors:m.current?m.current:p.initialErrors||{},Z=N&&N.touched?N.touched:x.current?x.current:p.initialTouched||{},ie=N&&N.status?N.status:y.current?y.current:p.initialStatus;v.current=I,m.current=B,x.current=Z,y.current=ie;var he=function(){S({type:"RESET_FORM",payload:{isSubmitting:!!N&&!!N.isSubmitting,errors:B,touched:Z,status:ie,values:I,isValidating:!!N&&!!N.isValidating,submitCount:N&&N.submitCount&&typeof N.submitCount=="number"?N.submitCount:0}})};if(p.onReset){var De=p.onReset(w.values,Ve);ga(De)?De.then(he):he()}else he()},[p.initialErrors,p.initialStatus,p.initialTouched,p.onReset]);u.useEffect(function(){E.current===!0&&!hr(v.current,p.initialValues)&&d&&(v.current=p.initialValues,W(),a&&z(v.current))},[d,p.initialValues,W,a,z]),u.useEffect(function(){d&&E.current===!0&&!hr(m.current,p.initialErrors)&&(m.current=p.initialErrors||dr,S({type:"SET_ERRORS",payload:p.initialErrors||dr}))},[d,p.initialErrors]),u.useEffect(function(){d&&E.current===!0&&!hr(x.current,p.initialTouched)&&(x.current=p.initialTouched||_s,S({type:"SET_TOUCHED",payload:p.initialTouched||_s}))},[d,p.initialTouched]),u.useEffect(function(){d&&E.current===!0&&!hr(y.current,p.initialStatus)&&(y.current=p.initialStatus,S({type:"SET_STATUS",payload:p.initialStatus}))},[d,p.initialStatus,p.initialTouched]);var G=it(function(N){if(k.current[N]&&ot(k.current[N].validate)){var I=Xe(w.values,N),B=k.current[N].validate(I);return ga(B)?(S({type:"SET_ISVALIDATING",payload:!0}),B.then(function(Z){return Z}).then(function(Z){S({type:"SET_FIELD_ERROR",payload:{field:N,value:Z}}),S({type:"SET_ISVALIDATING",payload:!1})})):(S({type:"SET_FIELD_ERROR",payload:{field:N,value:B}}),Promise.resolve(B))}else if(p.validationSchema)return S({type:"SET_ISVALIDATING",payload:!0}),_(w.values,N).then(function(Z){return Z}).then(function(Z){S({type:"SET_FIELD_ERROR",payload:{field:N,value:Xe(Z,N)}}),S({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),$=u.useCallback(function(N,I){var B=I.validate;k.current[N]={validate:B}},[]),X=u.useCallback(function(N){delete k.current[N]},[]),J=it(function(N,I){S({type:"SET_TOUCHED",payload:N});var B=I===void 0?s:I;return B?z(w.values):Promise.resolve()}),le=u.useCallback(function(N){S({type:"SET_ERRORS",payload:N})},[]),re=it(function(N,I){var B=ot(N)?N(w.values):N;S({type:"SET_VALUES",payload:B});var Z=I===void 0?r:I;return Z?z(B):Promise.resolve()}),Q=u.useCallback(function(N,I){S({type:"SET_FIELD_ERROR",payload:{field:N,value:I}})},[]),ee=it(function(N,I,B){S({type:"SET_FIELD_VALUE",payload:{field:N,value:I}});var Z=B===void 0?r:B;return Z?z(Er(w.values,N,I)):Promise.resolve()}),Y=u.useCallback(function(N,I){var B=I,Z=N,ie;if(!ma(N)){N.persist&&N.persist();var he=N.target?N.target:N.currentTarget,De=he.type,He=he.name,Rr=he.id,Ht=he.value,is=he.checked,Ir=he.outerHTML,hn=he.options,Fr=he.multiple;B=I||He||Rr,!B&&process.env.NODE_ENV!=="production"&&id({htmlContent:Ir,documentationAnchorLink:"handlechange-e-reactchangeeventany--void",handlerName:"handleChange"}),Z=/number|range/.test(De)?(ie=parseFloat(Ht),isNaN(ie)?"":ie):/checkbox/.test(De)?uS(Xe(w.values,B),is,Ht):hn&&Fr?cS(hn):Ht}B&&ee(B,Z)},[ee,w.values]),ce=it(function(N){if(ma(N))return function(I){return Y(I,N)};Y(N)}),T=it(function(N,I,B){I===void 0&&(I=!0),S({type:"SET_FIELD_TOUCHED",payload:{field:N,value:I}});var Z=B===void 0?s:B;return Z?z(w.values):Promise.resolve()}),Se=u.useCallback(function(N,I){N.persist&&N.persist();var B=N.target,Z=B.name,ie=B.id,he=B.outerHTML,De=I||Z||ie;!De&&process.env.NODE_ENV!=="production"&&id({htmlContent:he,documentationAnchorLink:"handleblur-e-any--void",handlerName:"handleBlur"}),T(De,!0)},[T]),be=it(function(N){if(ma(N))return function(I){return Se(I,N)};Se(N)}),te=u.useCallback(function(N){ot(N)?S({type:"SET_FORMIK_STATE",payload:N}):S({type:"SET_FORMIK_STATE",payload:function(){return N}})},[]),Ce=u.useCallback(function(N){S({type:"SET_STATUS",payload:N})},[]),K=u.useCallback(function(N){S({type:"SET_ISSUBMITTING",payload:N})},[]),ue=it(function(){return S({type:"SUBMIT_ATTEMPT"}),z().then(function(N){var I=N instanceof Error,B=!I&&Object.keys(N).length===0;if(B){var Z;try{if(Z=st(),Z===void 0)return}catch(ie){throw ie}return Promise.resolve(Z).then(function(ie){return E.current&&S({type:"SUBMIT_SUCCESS"}),ie}).catch(function(ie){if(E.current)throw S({type:"SUBMIT_FAILURE"}),ie})}else if(E.current&&(S({type:"SUBMIT_FAILURE"}),I))throw N})}),U=it(function(N){if(N&&N.preventDefault&&ot(N.preventDefault)&&N.preventDefault(),N&&N.stopPropagation&&ot(N.stopPropagation)&&N.stopPropagation(),process.env.NODE_ENV!=="production"&&typeof document<"u"){var I=nS();I!==null&&I instanceof HTMLButtonElement&&(I.attributes&&I.attributes.getNamedItem("type")||(process.env.NODE_ENV!=="production"?Qt(!1,'You submitted a Formik form using a button with an unspecified `type` attribute. Most browsers default button elements to `type="submit"`. If this is not a submit button, please add `type="button"`.'):Qt()))}ue().catch(function(B){console.warn("Warning: An unhandled error was caught from submitForm()",B)})}),Ve={resetForm:W,validateForm:z,validateField:G,setErrors:le,setFieldError:Q,setFieldTouched:T,setFieldValue:ee,setStatus:Ce,setSubmitting:K,setTouched:J,setValues:re,setFormikState:te,submitForm:ue},st=it(function(){return f(w.values,Ve)}),ge=it(function(N){N&&N.preventDefault&&ot(N.preventDefault)&&N.preventDefault(),N&&N.stopPropagation&&ot(N.stopPropagation)&&N.stopPropagation(),W()}),rs=u.useCallback(function(N){return{value:Xe(w.values,N),error:Xe(w.errors,N),touched:!!Xe(w.touched,N),initialValue:Xe(v.current,N),initialTouched:!!Xe(x.current,N),initialError:Xe(m.current,N)}},[w.errors,w.touched,w.values]),Pr=u.useCallback(function(N){return{setValue:function(B,Z){return ee(N,B,Z)},setTouched:function(B,Z){return T(N,B,Z)},setError:function(B){return Q(N,B)}}},[ee,T,Q]),ns=u.useCallback(function(N){var I=Ai(N),B=I?N.name:N,Z=Xe(w.values,B),ie={name:B,value:Z,onChange:ce,onBlur:be};if(I){var he=N.type,De=N.value,He=N.as,Rr=N.multiple;he==="checkbox"?De===void 0?ie.checked=!!Z:(ie.checked=!!(Array.isArray(Z)&&~Z.indexOf(De)),ie.value=De):he==="radio"?(ie.checked=Z===De,ie.value=De):He==="select"&&Rr&&(ie.value=ie.value||[],ie.multiple=!0)}return ie},[be,ce,w.values]),Yt=u.useMemo(function(){return!hr(v.current,w.values)},[v.current,w.values]),ss=u.useMemo(function(){return typeof o<"u"?Yt?w.errors&&Object.keys(w.errors).length===0:o!==!1&&ot(o)?o(p):o:w.errors&&Object.keys(w.errors).length===0},[o,Yt,w.errors,p]),Ar=$e({},w,{initialValues:v.current,initialErrors:m.current,initialTouched:x.current,initialStatus:y.current,handleBlur:be,handleChange:ce,handleReset:ge,handleSubmit:U,resetForm:W,setErrors:le,setFormikState:te,setFieldTouched:T,setFieldValue:ee,setFieldError:Q,setStatus:Ce,setSubmitting:K,setTouched:J,setValues:re,submitForm:ue,validateForm:z,validateField:G,isValid:ss,dirty:Yt,unregisterField:X,registerField:$,getFieldProps:ns,getFieldMeta:rs,getFieldHelpers:Pr,validateOnBlur:s,validateOnChange:r,validateOnMount:a});return Ar}function Jn(e){var t=iS(e),r=e.component,n=e.children,s=e.render,i=e.innerRef;return u.useImperativeHandle(i,function(){return t}),process.env.NODE_ENV!=="production"&&u.useEffect(function(){e.render&&(process.env.NODE_ENV!=="production"?Qt(!1,"<Formik render> has been deprecated and will be removed in future versions of Formik. Please use a child callback function instead. To get rid of this warning, replace <Formik render={(props) => ...} /> with <Formik>{(props) => ...}</Formik>"):Qt())},[]),u.createElement(QE,{value:t},r?u.createElement(r,t):s?s(t):n?ot(n)?n(t):rS(n)?null:u.Children.only(n):null)}function id(e){var t=e.htmlContent,r=e.documentationAnchorLink,n=e.handlerName;console.warn("Warning: Formik called `"+n+"`, but you forgot to pass an `id` or `name` attribute to your input:\n "+t+`
|
|
76
76
|
Formik cannot determine which value to update. For more info see https://formik.org/docs/api/formik#`+r+`
|
|
77
|
-
`)}function aS(e){var t={};if(e.inner){if(e.inner.length===0)return Er(t,e.path,e.message);for(var s=e.inner,r=Array.isArray(s),n=0,s=r?s:s[Symbol.iterator]();;){var i;if(r){if(n>=s.length)break;i=s[n++]}else{if(n=s.next(),n.done)break;i=n.value}var a=i;Xe(t,a.path)||(t=Er(t,a.path,a.message))}}return t}function oS(e,t,r,n){r===void 0&&(r=!1);var s=Ya(e);return t[r?"validateSync":"validate"](s,{abortEarly:!1,context:s})}function Ya(e){var t=Array.isArray(e)?[]:{};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=String(r);Array.isArray(e[n])===!0?t[n]=e[n].map(function(s){return Array.isArray(s)===!0||Nu(s)?Ya(s):s!==""?s:void 0}):Nu(e[n])?t[n]=Ya(e[n]):t[n]=e[n]!==""?e[n]:void 0}return t}function lS(e,t,r){var n=e.slice();return t.forEach(function(i,a){if(typeof n[a]>"u"){var o=r.clone!==!1,c=o&&r.isMergeableObject(i);n[a]=c?Ua(Array.isArray(i)?[]:{},i,r):i}else r.isMergeableObject(i)?n[a]=Ua(e[a],i,r):e.indexOf(i)===-1&&n.push(i)}),n}function cS(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function uS(e,t,r){if(typeof e=="boolean")return!!t;var n=[],s=!1,i=-1;if(Array.isArray(e))n=e,i=e.indexOf(r),s=i>=0;else if(!r||r=="true"||r=="false")return!!t;return t&&r&&!s?n.concat(r):s?n.slice(0,i).concat(n.slice(i+1)):n}var dS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?u.useLayoutEffect:u.useEffect;function it(e){var t=u.useRef(e);return dS(function(){t.current=e}),u.useCallback(function(){for(var r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];return t.current.apply(void 0,n)},[])}var fS=u.forwardRef(function(e,t){var r=e.action,n=Th(e,["action"]),s=r??"#",i=eS(),a=i.handleReset,o=i.handleSubmit;return u.createElement("form",$e({onSubmit:o,ref:t,onReset:a,action:s},n))});fS.displayName="Form";async function Ph(e,t){const r=`/application/${t}`;try{return(await e.get(r)).data}catch(n){return{code:"1",error:!0,message:"There was an error trying to retrieve the application",data:null,error_data:{error:`${n}`}}}}async function Ah(e,t,r){let n="/tax-identification-type";t&&(n+=`?countryID=${t}`),r&&(n+=`&statusID=${r}`);try{return(await e.get(n)).data}catch(s){return{code:"1",error:!0,message:"There was an error trying to retrieve the tax identification types",data:null,error_data:{error:`${s}`}}}}async function Rh(e){const t="/country";try{return(await e.get(t)).data}catch(r){return{code:"1",error:!0,message:"There was an error trying to retrieve the tax countries",data:null,error_data:{error:`${r}`}}}}async function Ih(e,t,r,n,s){const i="/auth/get-token",a=new URLSearchParams;a.append("grant_type","password"),a.append("username",n),a.append("password",s);const c={"Content-Type":"application/x-www-form-urlencoded",Authorization:`Basic ${btoa(`${t}:${r}`)}`};try{return(await e.post(i,a,{headers:c})).data}catch(d){return{code:"1",error:!0,message:"There was an error trying to authenticate",data:null,error_data:{error:`${d}`}}}}async function Fh(e,t){const r="/auth/get-token",n=new URLSearchParams;n.append("grant_type","refresh_token"),n.append("refresh_token",t);const o={"Content-Type":"application/x-www-form-urlencoded",Authorization:`Basic ${btoa("docuNxInnND1MUSqVr3ROV8ms986ZRjnbyA77ypt:0SAgl6C4IsMObrysxXHG6npwGyH8jgIkiMtLoGD6Pchu1tBGPZvIZjmjYmAo3pItBoIqOHipjkQNcI03URn1i7LgtaAsDOHFSdv3suDFz9J3kS8WHMnq0tE1Lg1advs7")}`};try{return(await e.post(r,n,{headers:o})).data}catch(c){return{code:"1",error:!0,message:"There was an error trying to refresh the token",data:null,error_data:{error:`${c}`}}}}async function $h(e,t){const r=`/category?type=${t}`;try{return(await e.get(r)).data}catch(n){return{code:"1",error:!0,message:"There was an error trying to retrieve the categories",data:null,error_data:{error:`${n}`}}}}const hS={fullName:"",email:"",address:"",taxIdentificationType:null,identificationNumber:"",phone:{country:null,phonePrefix:null,phoneNumber:""},phone2:{country:null,phonePrefix:null,phoneNumber:""}},pS=ar({country:ir().nullable().required("El país es requerido"),phonePrefix:ir().nullable().required("El prefijo telefónico es requerido"),phoneNumber:St().required("El número de teléfono es requerido")}),mS=ar({country:ir().nullable().defined(),phonePrefix:ir().nullable().defined().when("country",{is:e=>!!e,then:e=>e.required("El prefijo telefónico es requerido")}),phoneNumber:St().ensure().when("country",{is:e=>!!e,then:e=>e.required("El número de teléfono es requerido")})}),gS=ar({fullName:St().required("El nombre completo es requerido"),email:St().email("El correo electrónico no es válido").required("El correo electrónico es requerido"),address:St().required("La dirección es requerida"),taxIdentificationType:ir().nullable().required("El tipo de identificación es requerido"),identificationNumber:St().required("El número de identificación es requerido"),phone:pS,phone2:mS}),vS=({initiallyShowSecondPhone:e=!1,showFixedPrefix1:t=!1,showFixedPrefix2:r=!1,formik:n,onCancel:s})=>{const{values:i,touched:a,errors:o,handleChange:c,handleBlur:d,handleSubmit:f,setFieldValue:h}=n,p=u.useContext(on),[v,m]=u.useState([]),[x,y]=u.useState(e),[E,k]=u.useState([]),O=u.useMemo(()=>{const S=i.taxIdentificationType?.value.abbreviationName,C=Cu.map(_=>({id:_,label:`0${_}`,value:_}));return(["J-","G-"].includes(S??"")||t)&&C.push({id:"",label:"FIJO",value:""}),C},[i.taxIdentificationType?.value.abbreviationName,t]),b=u.useMemo(()=>{const S=i.taxIdentificationType?.value.abbreviationName,C=Cu.map(_=>({id:_,label:`0${_}`,value:_}));return(["J-","G-"].includes(S??"")||r)&&C.push({id:"",label:"FIJO",value:""}),C},[i.taxIdentificationType?.value.abbreviationName,r]),g=u.useCallback(()=>{y(!0);const S=v.find(_=>_.value.countryId===ca)??v[0]??null,C=b[0]??null;h("phone2",{country:S,phonePrefix:C,phoneNumber:""})},[v,b,h]),w=()=>{y(!1),h("phone2",{country:null,phonePrefix:null,phoneNumber:""})};return u.useEffect(()=>{(async()=>{const C=await Ah(p.api,ca,1);if(C.error||!C.data)return;const _=C.data.filter(M=>!!M.abbreviationName);if(k(_.map(M=>({id:M.taxIdentificationTypeId.toString(),label:M.abbreviationName,value:M}))),!i.taxIdentificationType){const M=_.find(D=>D.taxIdentificationTypeId===1)??_[0]??null;h("taxIdentificationType",{id:M.taxIdentificationTypeId.toString(),label:M.abbreviationName,value:M})}})()},[]),u.useEffect(()=>{(async()=>{const C=await Rh(p.api);if(C.error||!C.data)return;const _=C.data.filter(M=>!!M.countryPhoneAccessCode);if(m(_.map(M=>({id:M.countryId.toString(),label:M.countryPhoneAccessCode??"",value:M}))),!i.phone.country){const M=_.find(D=>D.countryId===ca)??_[0]??null;h("phone.country",{id:M.countryId.toString(),label:M.countryPhoneAccessCode,value:M})}})()},[]),u.useEffect(()=>{if(!i.phone.phonePrefix){const S=O[0];h("phone.phonePrefix",S)}},[O]),l.jsxs("div",{className:"flex flex-col gap-4 w-full",children:[l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 w-full gap-4",children:[l.jsx("div",{children:l.jsx(Be,{id:"fullName",name:"fullName",label:"Nombre completo",placeholder:"Nombre completo",autoComplete:"name",value:n.values.fullName,onChange:c,onBlur:d,error:a.fullName&&o.fullName,required:!0})}),l.jsx("div",{children:l.jsx(Be,{id:"email",name:"email",label:"Correo electrónico",placeholder:"example@example.com",autoComplete:"email",value:i.email,onChange:c,onBlur:d,error:a.email&&o.email,required:!0})})]}),l.jsx("div",{children:l.jsx(Be,{id:"address",name:"address",label:"Dirección fiscal",placeholder:"Dirección",autoComplete:"address",value:i.address,onChange:c,onBlur:d,error:a.address&&o.address,required:!0})}),l.jsxs("div",{children:[l.jsxs("div",{className:A("block text-sm font-medium leading-6 text-gray-700 mb-1 truncate dark:text-gray-200"),children:["Cédula / RIF ",l.jsx("span",{className:"text-red-500",children:"*"})]}),l.jsxs("div",{className:"flex",children:[l.jsx(ct,{id:"taxIdentificationType",name:"taxIdentificationType",label:"",options:E,selected:i.taxIdentificationType,onSelectOption:S=>h("taxIdentificationType",S),onBlur:d,className:"!rounded-r-none",wrapperClassName:"w-20 rounded-r-none",renderOption:S=>l.jsxs("p",{className:"truncate",children:[S.value.taxIdentificationTypeName," (",S.label,")"]})}),l.jsx(Be,{id:"identificationNumber",name:"identificationNumber",label:"",placeholder:"Número de Cédula / RIF",value:i.identificationNumber,onChange:c,onBlur:d,error:a.identificationNumber&&o.identificationNumber,className:"!rounded-l-none"})]})]}),l.jsxs("div",{children:[l.jsxs("div",{className:"block text-sm font-medium leading-6 text-gray-700 mb-1 truncate dark:text-gray-200",children:["Teléfono ",l.jsx("span",{className:"text-red-500",children:"*"})]}),l.jsxs("div",{className:"flex",children:[l.jsx(ct,{id:"phone.country",name:"phone.country",label:"",placeholder:"País",options:v,selected:i.phone.country,onSelectOption:S=>h("phone.country",S),onBlur:d,className:"!rounded-r-none !w-24",filterFn:(S,C)=>C.toLowerCase().split(" ").filter(Boolean).every(M=>S.label.toLowerCase().includes(M)||S.value.countryName.toLowerCase().includes(M)),renderOption:S=>l.jsxs("p",{className:"truncate",children:[S.value.countryName," (",S.label,")"]})}),l.jsx(ct,{id:"phone.phonePrefix",name:"phone.phonePrefix",label:"",placeholder:"Prefijo",options:O,selected:i.phone.phonePrefix,onSelectOption:S=>h("phone.phonePrefix",S),onBlur:d,className:"!rounded-none !w-20"}),l.jsx(Be,{id:"phone.phoneNumber",name:"phone.phoneNumber",label:"",placeholder:"Número de Teléfono",value:i.phone.phoneNumber,onChange:c,onBlur:d,error:a.phone?.phoneNumber&&o.phone?.phoneNumber,className:"!rounded-l-none"})]})]}),x&&l.jsxs("div",{children:[l.jsx("div",{className:A("block text-sm font-medium leading-6 text-gray-700 mb-1 truncate dark:text-gray-200"),children:"Segundo Teléfono"}),l.jsxs("div",{className:"flex",children:[l.jsx(ct,{id:"phone2.country",name:"phone2.country",label:"",placeholder:"País",options:v,selected:i.phone2.country,onSelectOption:S=>h("phone2.country",S),onBlur:d,className:"!rounded-r-none !w-24",filterFn:(S,C)=>C.toLowerCase().split(" ").filter(Boolean).every(M=>S.label.toLowerCase().includes(M)||S.value.countryName.toLowerCase().includes(M)),renderOption:S=>l.jsxs("p",{className:"truncate",children:[S.value.countryName," (",S.label,")"]})}),l.jsx(ct,{id:"phone2.phonePrefix",name:"phone2.phonePrefix",label:"",options:b,selected:i.phone2.phonePrefix,onSelectOption:S=>h("phone2.phonePrefix",S),onBlur:d,className:"!rounded-none !w-20"}),l.jsx(Be,{id:"phone2.phoneNumber",name:"phone2.phoneNumber",label:"",placeholder:"Número de Teléfono",value:i.phone2.phoneNumber,onChange:c,onBlur:d,error:a.phone2?.phoneNumber&&o?.phone2?.phoneNumber,className:"!rounded-l-none"})]})]}),l.jsxs("div",{className:"flex w-full justify-end text-end text-sm",children:[!x&&l.jsx(Ae,{onClick:g,children:"+ Agregar teléfono adicional"}),x&&l.jsx(Ae,{onClick:w,children:"Eliminar teléfono adicional"})]}),l.jsxs("div",{className:"w-full flex flex-col-reverse gap-4 md:flex-row items-center justify-between",children:[l.jsx("div",{className:"w-full md:w-32",children:s&&l.jsx(Tn,{className:"w-full md:w-32",onClick:()=>s(n),children:"Cancelar"})}),l.jsx(rt,{className:"w-full md:w-32",type:"submit",onClick:()=>f(),children:"Guardar"})]})]})},Ha=({initialValues:e,onSubmit:t,onCancel:r})=>l.jsx(Jn,{initialValues:e??hS,validationSchema:gS,onSubmit:t,children:n=>l.jsx(vS,{formik:n,onCancel:r,initiallyShowSecondPhone:!!e?.phone2.phoneNumber})}),Uh=({appName:e,appDescription:t,appVersion:r,wrapperClassName:n,children:s})=>l.jsxs("div",{className:A("flex font-inter",n),children:[l.jsx("div",{className:"hidden lg:flex lg:w-1/2 relative overflow-hidden",children:l.jsx("div",{className:"relative z-10 flex flex-col justify-center items-center w-full p-12 text-white bg-gradient-to-b from-indigo-700 via-indigo-600 to-indigo-500 dark:bg-gradient-to-b dark:from-indigo-900 dark:via-indigo-800 dark:to-indigo-700",children:l.jsxs("div",{className:"max-w-md space-y-6 text-center",children:[l.jsx("div",{className:"inline-flex items-center justify-center w-24 h-24 bg-white backdrop-blur-sm rounded-3xl shadow-elegant mb-14",children:l.jsx("img",{src:Oa,alt:"App logo",loading:"lazy","aria-label":"App logo",className:"w-20 h-20 object-cover"})}),l.jsx("h1",{className:"text-5xl font-bold tracking-tight leading-7","aria-label":e,children:e}),l.jsx("p",{className:"text-white/90 font-light dark:text-white/80","aria-label":t,children:t})]})})}),l.jsx("div",{className:"flex-1 flex items-center justify-center p-8 bg-gray-100 dark:bg-gray-900",children:l.jsxs("div",{className:"w-full max-w-md space-y-8",children:[l.jsxs("div",{className:"lg:hidden text-center mb-8",children:[l.jsx("div",{className:"inline-flex items-center justify-center bg-white rounded-2xl shadow-glow p-1",children:l.jsx("img",{src:Oa,alt:"App logo",loading:"lazy","aria-label":"App logo",className:"w-28 h-28 object-cover"})}),l.jsx("h2",{className:"text-xl lg:text-3xl font-bold text-gray-900 dark:text-gray-100 leading-0","aria-label":e,children:e})]}),l.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-3xl shadow-xl p-8 lg:p-12 backdrop-blur-sm border border-border/50 dark:border-gray-800 hover:shadow-2xl transition-shadow duration-300",children:[s,l.jsx("div",{className:"mt-14 text-center text-sm text-gray-700 dark:text-gray-300",children:l.jsxs("p",{"aria-label":`Versión ${r}`,children:["v",r]})})]})]})})]}),yS=ar({email:St().required("El correo electrónico es obligatorio").email("Ingresa un correo electrónico válido")}),xS=({appName:e,appDescription:t,appVersion:r,wrapperClassName:n,onSubmit:s,onBack:i,sent:a=!1})=>l.jsxs(Uh,{appName:e,appDescription:t,appVersion:r,wrapperClassName:n,children:[l.jsx("div",{className:"space-y-2 text-center lg:text-left",children:l.jsx("h1",{className:"text-lg lg:text-2xl font-bold tracking-tight text-foreground text-gray-900 dark:text-gray-100",children:"Reestablecer contraseña"})}),a?l.jsxs("div",{className:"mt-10 space-y-6 text-center",children:[l.jsx("p",{className:"text-base text-gray-700 dark:text-gray-200",children:"Si el correo electrónico existe en la aplicación, se le ha enviado un email con las instrucciones de restablecimiento"}),l.jsx("div",{className:"text-center",children:l.jsx(Ae,{onClick:i,className:"text-sm font-medium dark:text-indigo-300",children:"Regresar"})})]}):l.jsx(Jn,{initialValues:{email:""},validationSchema:yS,onSubmit:({email:o})=>{s(o)},children:({values:o,touched:c,errors:d,handleChange:f,handleSubmit:h})=>l.jsxs("form",{onSubmit:h,className:"space-y-6 mt-10",noValidate:!0,children:[l.jsx("div",{className:"space-y-4",children:l.jsx("div",{className:"space-y-2",children:l.jsx(Be,{required:!0,id:"email",name:"email",type:"text",label:"Correo electrónico",placeholder:"mi_correo@email.com",autoComplete:"email",value:o.email,error:c.email&&d.email,onChange:f})})}),l.jsx(rt,{type:"submit",className:"w-full h-12",children:"Enviar"}),l.jsx("div",{className:"text-center",children:l.jsx(Ae,{onClick:i,className:"text-sm font-medium dark:text-indigo-300",children:"Regresar"})})]})})]}),bS=ar({email:St().required("El correo electrónico es obligatorio").email("Ingresa un correo electrónico válido"),password:St().required("La contraseña es obligatoria").min(6,"La contraseña debe tener al menos 6 caracteres")}),wS=({wrapperClassName:e,onForgotPassword:t,onSuccess:r=()=>{}})=>{const n=Eo(),s=u.useContext(on),i=async(a,o)=>{const c=await Ih(s.basicApi,s.clientId,s.clientSecret,a.email,a.password);if(c.error||!c.data){o.setFieldError("email",c.message);return}n(Kf(c.data)),o.resetForm(),r()};return l.jsxs(Uh,{appName:s.application?.applicationName??"",appDescription:s.application?.applicationDescription??"",appVersion:s.application?.applicationVersion??"",wrapperClassName:e,children:[l.jsx("div",{className:"space-y-2 text-center lg:text-left",children:l.jsx("h1",{className:"text-lg lg:text-2xl font-bold tracking-tight text-foreground text-gray-900 dark:text-gray-100",children:"Inicia sesión con tu cuenta"})}),l.jsx(Jn,{initialValues:{email:"",password:""},validationSchema:bS,onSubmit:i,children:({values:a,touched:o,errors:c,handleChange:d,handleSubmit:f})=>l.jsxs("form",{onSubmit:f,className:"space-y-6 mt-6",noValidate:!0,children:[l.jsxs("div",{className:"space-y-4",children:[l.jsx("div",{className:"space-y-2",children:l.jsx(Be,{required:!0,id:"email",name:"email",type:"text",label:"Correo electrónico o username",placeholder:"mi_correo@email.com",autoComplete:"email",value:a.email,error:o.email&&c.email,onChange:d})}),l.jsx("div",{className:"space-y-2",children:l.jsx("div",{className:"relative",children:l.jsx(Be,{required:!0,id:"password",name:"password",type:"password",label:"Contraseña",placeholder:"•••••••••••••",value:a.password,error:o.password&&c.password,onChange:d})})})]}),l.jsx(rt,{type:"submit",className:"w-full h-12",children:"Iniciar sesión"}),l.jsx("div",{className:"text-center",children:l.jsx(Ae,{onClick:t,className:"text-sm font-medium",children:"Olvidé mi contraseña"})})]})})]})};function ES(e){return H({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M160 0c17.7 0 32 14.3 32 32l0 35.7c1.6 .2 3.1 .4 4.7 .7c.4 .1 .7 .1 1.1 .2l48 8.8c17.4 3.2 28.9 19.9 25.7 37.2s-19.9 28.9-37.2 25.7l-47.5-8.7c-31.3-4.6-58.9-1.5-78.3 6.2s-27.2 18.3-29 28.1c-2 10.7-.5 16.7 1.2 20.4c1.8 3.9 5.5 8.3 12.8 13.2c16.3 10.7 41.3 17.7 73.7 26.3l2.9 .8c28.6 7.6 63.6 16.8 89.6 33.8c14.2 9.3 27.6 21.9 35.9 39.5c8.5 17.9 10.3 37.9 6.4 59.2c-6.9 38-33.1 63.4-65.6 76.7c-13.7 5.6-28.6 9.2-44.4 11l0 33.4c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-34.9c-.4-.1-.9-.1-1.3-.2l-.2 0s0 0 0 0c-24.4-3.8-64.5-14.3-91.5-26.3c-16.1-7.2-23.4-26.1-16.2-42.2s26.1-23.4 42.2-16.2c20.9 9.3 55.3 18.5 75.2 21.6c31.9 4.7 58.2 2 76-5.3c16.9-6.9 24.6-16.9 26.8-28.9c1.9-10.6 .4-16.7-1.3-20.4c-1.9-4-5.6-8.4-13-13.3c-16.4-10.7-41.5-17.7-74-26.3l-2.8-.7s0 0 0 0C119.4 279.3 84.4 270 58.4 253c-14.2-9.3-27.5-22-35.8-39.6c-8.4-17.9-10.1-37.9-6.1-59.2C23.7 116 52.3 91.2 84.8 78.3c13.3-5.3 27.9-8.9 43.2-11L128 32c0-17.7 14.3-32 32-32z"},child:[]}]})(e)}function SS(e){return H({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M512 80c8.8 0 16 7.2 16 16l0 32L48 128l0-32c0-8.8 7.2-16 16-16l448 0zm16 144l0 192c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16l0-192 480 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm56 304c-13.3 0-24 10.7-24 24s10.7 24 24 24l48 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0zm128 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l112 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-112 0z"},child:[]}]})(e)}function kS(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"path",attr:{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8"},child:[]},{tag:"path",attr:{d:"M12 18V6"},child:[]}]})(e)}function OS(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"},child:[]}]})(e)}function _S(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"},child:[]},{tag:"circle",attr:{cx:"12",cy:"10",r:"3"},child:[]}]})(e)}function CS(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z"},child:[]}]})(e)}function en(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z"},child:[]},{tag:"path",attr:{d:"M12 22V12"},child:[]},{tag:"path",attr:{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7"},child:[]},{tag:"path",attr:{d:"m7.5 4.27 9 5.15"},child:[]}]})(e)}function Vh(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"},child:[]},{tag:"path",attr:{d:"m15 5 4 4"},child:[]}]})(e)}function LS(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"},child:[]}]})(e)}function NS(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"},child:[]},{tag:"path",attr:{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6"},child:[]},{tag:"rect",attr:{x:"6",y:"14",width:"12",height:"8",rx:"1"},child:[]}]})(e)}function jS(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z"},child:[]},{tag:"path",attr:{d:"m14.5 12.5 2-2"},child:[]},{tag:"path",attr:{d:"m11.5 9.5 2-2"},child:[]},{tag:"path",attr:{d:"m8.5 6.5 2-2"},child:[]},{tag:"path",attr:{d:"m17.5 15.5 2-2"},child:[]}]})(e)}function MS(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7"},child:[]},{tag:"path",attr:{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"},child:[]},{tag:"path",attr:{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4"},child:[]},{tag:"path",attr:{d:"M2 7h20"},child:[]},{tag:"path",attr:{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7"},child:[]}]})(e)}function TS(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"10",cy:"7",r:"4"},child:[]},{tag:"path",attr:{d:"M10.3 15H7a4 4 0 0 0-4 4v2"},child:[]},{tag:"circle",attr:{cx:"17",cy:"17",r:"3"},child:[]},{tag:"path",attr:{d:"m21 21-1.9-1.9"},child:[]}]})(e)}function DS(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"5",r:"3"},child:[]},{tag:"path",attr:{d:"M6.5 8a2 2 0 0 0-1.905 1.46L2.1 18.5A2 2 0 0 0 4 21h16a2 2 0 0 0 1.925-2.54L19.4 9.5A2 2 0 0 0 17.48 8Z"},child:[]}]})(e)}//! moment.js
|
|
77
|
+
`)}function aS(e){var t={};if(e.inner){if(e.inner.length===0)return Er(t,e.path,e.message);for(var s=e.inner,r=Array.isArray(s),n=0,s=r?s:s[Symbol.iterator]();;){var i;if(r){if(n>=s.length)break;i=s[n++]}else{if(n=s.next(),n.done)break;i=n.value}var a=i;Xe(t,a.path)||(t=Er(t,a.path,a.message))}}return t}function oS(e,t,r,n){r===void 0&&(r=!1);var s=Ya(e);return t[r?"validateSync":"validate"](s,{abortEarly:!1,context:s})}function Ya(e){var t=Array.isArray(e)?[]:{};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=String(r);Array.isArray(e[n])===!0?t[n]=e[n].map(function(s){return Array.isArray(s)===!0||Nu(s)?Ya(s):s!==""?s:void 0}):Nu(e[n])?t[n]=Ya(e[n]):t[n]=e[n]!==""?e[n]:void 0}return t}function lS(e,t,r){var n=e.slice();return t.forEach(function(i,a){if(typeof n[a]>"u"){var o=r.clone!==!1,c=o&&r.isMergeableObject(i);n[a]=c?Ua(Array.isArray(i)?[]:{},i,r):i}else r.isMergeableObject(i)?n[a]=Ua(e[a],i,r):e.indexOf(i)===-1&&n.push(i)}),n}function cS(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function uS(e,t,r){if(typeof e=="boolean")return!!t;var n=[],s=!1,i=-1;if(Array.isArray(e))n=e,i=e.indexOf(r),s=i>=0;else if(!r||r=="true"||r=="false")return!!t;return t&&r&&!s?n.concat(r):s?n.slice(0,i).concat(n.slice(i+1)):n}var dS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?u.useLayoutEffect:u.useEffect;function it(e){var t=u.useRef(e);return dS(function(){t.current=e}),u.useCallback(function(){for(var r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];return t.current.apply(void 0,n)},[])}var fS=u.forwardRef(function(e,t){var r=e.action,n=Th(e,["action"]),s=r??"#",i=eS(),a=i.handleReset,o=i.handleSubmit;return u.createElement("form",$e({onSubmit:o,ref:t,onReset:a,action:s},n))});fS.displayName="Form";async function Ph(e,t){const r=`/application/${t}`;try{return(await e.get(r)).data}catch(n){return{code:"1",error:!0,message:"There was an error trying to retrieve the application",data:null,error_data:{error:`${n}`}}}}async function Ah(e,t,r){let n="/tax-identification-type";t&&(n+=`?countryID=${t}`),r&&(n+=`&statusID=${r}`);try{return(await e.get(n)).data}catch(s){return{code:"1",error:!0,message:"There was an error trying to retrieve the tax identification types",data:null,error_data:{error:`${s}`}}}}async function Rh(e){const t="/country";try{return(await e.get(t)).data}catch(r){return{code:"1",error:!0,message:"There was an error trying to retrieve the tax countries",data:null,error_data:{error:`${r}`}}}}async function Ih(e,t,r,n,s){const i="/auth/get-token",a=new URLSearchParams;a.append("grant_type","password"),a.append("username",n),a.append("password",s);const c={"Content-Type":"application/x-www-form-urlencoded",Authorization:`Basic ${btoa(`${t}:${r}`)}`};try{return(await e.post(i,a,{headers:c})).data}catch(d){return{code:"1",error:!0,message:"There was an error trying to authenticate",data:null,error_data:{error:`${d}`}}}}async function Fh(e,t){const r="/auth/get-token",n=new URLSearchParams;n.append("grant_type","refresh_token"),n.append("refresh_token",t);const o={"Content-Type":"application/x-www-form-urlencoded",Authorization:`Basic ${btoa("undefined:undefined")}`};try{return(await e.post(r,n,{headers:o})).data}catch(c){return{code:"1",error:!0,message:"There was an error trying to refresh the token",data:null,error_data:{error:`${c}`}}}}async function $h(e,t){const r=`/category?type=${t}`;try{return(await e.get(r)).data}catch(n){return{code:"1",error:!0,message:"There was an error trying to retrieve the categories",data:null,error_data:{error:`${n}`}}}}const hS={fullName:"",email:"",address:"",taxIdentificationType:null,identificationNumber:"",phone:{country:null,phonePrefix:null,phoneNumber:""},phone2:{country:null,phonePrefix:null,phoneNumber:""}},pS=ar({country:ir().nullable().required("El país es requerido"),phonePrefix:ir().nullable().required("El prefijo telefónico es requerido"),phoneNumber:St().required("El número de teléfono es requerido")}),mS=ar({country:ir().nullable().defined(),phonePrefix:ir().nullable().defined().when("country",{is:e=>!!e,then:e=>e.required("El prefijo telefónico es requerido")}),phoneNumber:St().ensure().when("country",{is:e=>!!e,then:e=>e.required("El número de teléfono es requerido")})}),gS=ar({fullName:St().required("El nombre completo es requerido"),email:St().email("El correo electrónico no es válido").required("El correo electrónico es requerido"),address:St().required("La dirección es requerida"),taxIdentificationType:ir().nullable().required("El tipo de identificación es requerido"),identificationNumber:St().required("El número de identificación es requerido"),phone:pS,phone2:mS}),vS=({initiallyShowSecondPhone:e=!1,showFixedPrefix1:t=!1,showFixedPrefix2:r=!1,formik:n,onCancel:s})=>{const{values:i,touched:a,errors:o,handleChange:c,handleBlur:d,handleSubmit:f,setFieldValue:h}=n,p=u.useContext(on),[v,m]=u.useState([]),[x,y]=u.useState(e),[E,k]=u.useState([]),O=u.useMemo(()=>{const S=i.taxIdentificationType?.value.abbreviationName,C=Cu.map(_=>({id:_,label:`0${_}`,value:_}));return(["J-","G-"].includes(S??"")||t)&&C.push({id:"",label:"FIJO",value:""}),C},[i.taxIdentificationType?.value.abbreviationName,t]),b=u.useMemo(()=>{const S=i.taxIdentificationType?.value.abbreviationName,C=Cu.map(_=>({id:_,label:`0${_}`,value:_}));return(["J-","G-"].includes(S??"")||r)&&C.push({id:"",label:"FIJO",value:""}),C},[i.taxIdentificationType?.value.abbreviationName,r]),g=u.useCallback(()=>{y(!0);const S=v.find(_=>_.value.countryId===ca)??v[0]??null,C=b[0]??null;h("phone2",{country:S,phonePrefix:C,phoneNumber:""})},[v,b,h]),w=()=>{y(!1),h("phone2",{country:null,phonePrefix:null,phoneNumber:""})};return u.useEffect(()=>{(async()=>{const C=await Ah(p.api,ca,1);if(C.error||!C.data)return;const _=C.data.filter(M=>!!M.abbreviationName);if(k(_.map(M=>({id:M.taxIdentificationTypeId.toString(),label:M.abbreviationName,value:M}))),!i.taxIdentificationType){const M=_.find(D=>D.taxIdentificationTypeId===1)??_[0]??null;h("taxIdentificationType",{id:M.taxIdentificationTypeId.toString(),label:M.abbreviationName,value:M})}})()},[]),u.useEffect(()=>{(async()=>{const C=await Rh(p.api);if(C.error||!C.data)return;const _=C.data.filter(M=>!!M.countryPhoneAccessCode);if(m(_.map(M=>({id:M.countryId.toString(),label:M.countryPhoneAccessCode??"",value:M}))),!i.phone.country){const M=_.find(D=>D.countryId===ca)??_[0]??null;h("phone.country",{id:M.countryId.toString(),label:M.countryPhoneAccessCode,value:M})}})()},[]),u.useEffect(()=>{if(!i.phone.phonePrefix){const S=O[0];h("phone.phonePrefix",S)}},[O]),l.jsxs("div",{className:"flex flex-col gap-4 w-full",children:[l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 w-full gap-4",children:[l.jsx("div",{children:l.jsx(Be,{id:"fullName",name:"fullName",label:"Nombre completo",placeholder:"Nombre completo",autoComplete:"name",value:n.values.fullName,onChange:c,onBlur:d,error:a.fullName&&o.fullName,required:!0})}),l.jsx("div",{children:l.jsx(Be,{id:"email",name:"email",label:"Correo electrónico",placeholder:"example@example.com",autoComplete:"email",value:i.email,onChange:c,onBlur:d,error:a.email&&o.email,required:!0})})]}),l.jsx("div",{children:l.jsx(Be,{id:"address",name:"address",label:"Dirección fiscal",placeholder:"Dirección",autoComplete:"address",value:i.address,onChange:c,onBlur:d,error:a.address&&o.address,required:!0})}),l.jsxs("div",{children:[l.jsxs("div",{className:A("block text-sm font-medium leading-6 text-gray-700 mb-1 truncate dark:text-gray-200"),children:["Cédula / RIF ",l.jsx("span",{className:"text-red-500",children:"*"})]}),l.jsxs("div",{className:"flex",children:[l.jsx(ct,{id:"taxIdentificationType",name:"taxIdentificationType",label:"",options:E,selected:i.taxIdentificationType,onSelectOption:S=>h("taxIdentificationType",S),onBlur:d,className:"!rounded-r-none",wrapperClassName:"w-20 rounded-r-none",renderOption:S=>l.jsxs("p",{className:"truncate",children:[S.value.taxIdentificationTypeName," (",S.label,")"]})}),l.jsx(Be,{id:"identificationNumber",name:"identificationNumber",label:"",placeholder:"Número de Cédula / RIF",value:i.identificationNumber,onChange:c,onBlur:d,error:a.identificationNumber&&o.identificationNumber,className:"!rounded-l-none"})]})]}),l.jsxs("div",{children:[l.jsxs("div",{className:"block text-sm font-medium leading-6 text-gray-700 mb-1 truncate dark:text-gray-200",children:["Teléfono ",l.jsx("span",{className:"text-red-500",children:"*"})]}),l.jsxs("div",{className:"flex",children:[l.jsx(ct,{id:"phone.country",name:"phone.country",label:"",placeholder:"País",options:v,selected:i.phone.country,onSelectOption:S=>h("phone.country",S),onBlur:d,className:"!rounded-r-none !w-24",filterFn:(S,C)=>C.toLowerCase().split(" ").filter(Boolean).every(M=>S.label.toLowerCase().includes(M)||S.value.countryName.toLowerCase().includes(M)),renderOption:S=>l.jsxs("p",{className:"truncate",children:[S.value.countryName," (",S.label,")"]})}),l.jsx(ct,{id:"phone.phonePrefix",name:"phone.phonePrefix",label:"",placeholder:"Prefijo",options:O,selected:i.phone.phonePrefix,onSelectOption:S=>h("phone.phonePrefix",S),onBlur:d,className:"!rounded-none !w-20"}),l.jsx(Be,{id:"phone.phoneNumber",name:"phone.phoneNumber",label:"",placeholder:"Número de Teléfono",value:i.phone.phoneNumber,onChange:c,onBlur:d,error:a.phone?.phoneNumber&&o.phone?.phoneNumber,className:"!rounded-l-none"})]})]}),x&&l.jsxs("div",{children:[l.jsx("div",{className:A("block text-sm font-medium leading-6 text-gray-700 mb-1 truncate dark:text-gray-200"),children:"Segundo Teléfono"}),l.jsxs("div",{className:"flex",children:[l.jsx(ct,{id:"phone2.country",name:"phone2.country",label:"",placeholder:"País",options:v,selected:i.phone2.country,onSelectOption:S=>h("phone2.country",S),onBlur:d,className:"!rounded-r-none !w-24",filterFn:(S,C)=>C.toLowerCase().split(" ").filter(Boolean).every(M=>S.label.toLowerCase().includes(M)||S.value.countryName.toLowerCase().includes(M)),renderOption:S=>l.jsxs("p",{className:"truncate",children:[S.value.countryName," (",S.label,")"]})}),l.jsx(ct,{id:"phone2.phonePrefix",name:"phone2.phonePrefix",label:"",options:b,selected:i.phone2.phonePrefix,onSelectOption:S=>h("phone2.phonePrefix",S),onBlur:d,className:"!rounded-none !w-20"}),l.jsx(Be,{id:"phone2.phoneNumber",name:"phone2.phoneNumber",label:"",placeholder:"Número de Teléfono",value:i.phone2.phoneNumber,onChange:c,onBlur:d,error:a.phone2?.phoneNumber&&o?.phone2?.phoneNumber,className:"!rounded-l-none"})]})]}),l.jsxs("div",{className:"flex w-full justify-end text-end text-sm",children:[!x&&l.jsx(Ae,{onClick:g,children:"+ Agregar teléfono adicional"}),x&&l.jsx(Ae,{onClick:w,children:"Eliminar teléfono adicional"})]}),l.jsxs("div",{className:"w-full flex flex-col-reverse gap-4 md:flex-row items-center justify-between",children:[l.jsx("div",{className:"w-full md:w-32",children:s&&l.jsx(Tn,{className:"w-full md:w-32",onClick:()=>s(n),children:"Cancelar"})}),l.jsx(rt,{className:"w-full md:w-32",type:"submit",onClick:()=>f(),children:"Guardar"})]})]})},Ha=({initialValues:e,onSubmit:t,onCancel:r})=>l.jsx(Jn,{initialValues:e??hS,validationSchema:gS,onSubmit:t,children:n=>l.jsx(vS,{formik:n,onCancel:r,initiallyShowSecondPhone:!!e?.phone2.phoneNumber})}),Uh=({appName:e,appDescription:t,appVersion:r,wrapperClassName:n,children:s})=>l.jsxs("div",{className:A("flex font-inter",n),children:[l.jsx("div",{className:"hidden lg:flex lg:w-1/2 relative overflow-hidden",children:l.jsx("div",{className:"relative z-10 flex flex-col justify-center items-center w-full p-12 text-white bg-gradient-to-b from-indigo-700 via-indigo-600 to-indigo-500 dark:bg-gradient-to-b dark:from-indigo-900 dark:via-indigo-800 dark:to-indigo-700",children:l.jsxs("div",{className:"max-w-md space-y-6 text-center",children:[l.jsx("div",{className:"inline-flex items-center justify-center w-24 h-24 bg-white backdrop-blur-sm rounded-3xl shadow-elegant mb-14",children:l.jsx("img",{src:Oa,alt:"App logo",loading:"lazy","aria-label":"App logo",className:"w-20 h-20 object-cover"})}),l.jsx("h1",{className:"text-5xl font-bold tracking-tight leading-7","aria-label":e,children:e}),l.jsx("p",{className:"text-white/90 font-light dark:text-white/80","aria-label":t,children:t})]})})}),l.jsx("div",{className:"flex-1 flex items-center justify-center p-8 bg-gray-100 dark:bg-gray-900",children:l.jsxs("div",{className:"w-full max-w-md space-y-8",children:[l.jsxs("div",{className:"lg:hidden text-center mb-8",children:[l.jsx("div",{className:"inline-flex items-center justify-center bg-white rounded-2xl shadow-glow p-1",children:l.jsx("img",{src:Oa,alt:"App logo",loading:"lazy","aria-label":"App logo",className:"w-28 h-28 object-cover"})}),l.jsx("h2",{className:"text-xl lg:text-3xl font-bold text-gray-900 dark:text-gray-100 leading-0","aria-label":e,children:e})]}),l.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-3xl shadow-xl p-8 lg:p-12 backdrop-blur-sm border border-border/50 dark:border-gray-800 hover:shadow-2xl transition-shadow duration-300",children:[s,l.jsx("div",{className:"mt-14 text-center text-sm text-gray-700 dark:text-gray-300",children:l.jsxs("p",{"aria-label":`Versión ${r}`,children:["v",r]})})]})]})})]}),yS=ar({email:St().required("El correo electrónico es obligatorio").email("Ingresa un correo electrónico válido")}),xS=({appName:e,appDescription:t,appVersion:r,wrapperClassName:n,onSubmit:s,onBack:i,sent:a=!1})=>l.jsxs(Uh,{appName:e,appDescription:t,appVersion:r,wrapperClassName:n,children:[l.jsx("div",{className:"space-y-2 text-center lg:text-left",children:l.jsx("h1",{className:"text-lg lg:text-2xl font-bold tracking-tight text-foreground text-gray-900 dark:text-gray-100",children:"Reestablecer contraseña"})}),a?l.jsxs("div",{className:"mt-10 space-y-6 text-center",children:[l.jsx("p",{className:"text-base text-gray-700 dark:text-gray-200",children:"Si el correo electrónico existe en la aplicación, se le ha enviado un email con las instrucciones de restablecimiento"}),l.jsx("div",{className:"text-center",children:l.jsx(Ae,{onClick:i,className:"text-sm font-medium dark:text-indigo-300",children:"Regresar"})})]}):l.jsx(Jn,{initialValues:{email:""},validationSchema:yS,onSubmit:({email:o})=>{s(o)},children:({values:o,touched:c,errors:d,handleChange:f,handleSubmit:h})=>l.jsxs("form",{onSubmit:h,className:"space-y-6 mt-10",noValidate:!0,children:[l.jsx("div",{className:"space-y-4",children:l.jsx("div",{className:"space-y-2",children:l.jsx(Be,{required:!0,id:"email",name:"email",type:"text",label:"Correo electrónico",placeholder:"mi_correo@email.com",autoComplete:"email",value:o.email,error:c.email&&d.email,onChange:f})})}),l.jsx(rt,{type:"submit",className:"w-full h-12",children:"Enviar"}),l.jsx("div",{className:"text-center",children:l.jsx(Ae,{onClick:i,className:"text-sm font-medium dark:text-indigo-300",children:"Regresar"})})]})})]}),bS=ar({email:St().required("El correo electrónico es obligatorio").email("Ingresa un correo electrónico válido"),password:St().required("La contraseña es obligatoria").min(6,"La contraseña debe tener al menos 6 caracteres")}),wS=({wrapperClassName:e,onForgotPassword:t,onSuccess:r=()=>{}})=>{const n=Eo(),s=u.useContext(on),i=async(a,o)=>{const c=await Ih(s.basicApi,s.clientId,s.clientSecret,a.email,a.password);if(c.error||!c.data){o.setFieldError("email",c.message);return}n(Kf(c.data)),o.resetForm(),r()};return l.jsxs(Uh,{appName:s.application?.applicationName??"",appDescription:s.application?.applicationDescription??"",appVersion:s.application?.applicationVersion??"",wrapperClassName:e,children:[l.jsx("div",{className:"space-y-2 text-center lg:text-left",children:l.jsx("h1",{className:"text-lg lg:text-2xl font-bold tracking-tight text-foreground text-gray-900 dark:text-gray-100",children:"Inicia sesión con tu cuenta"})}),l.jsx(Jn,{initialValues:{email:"",password:""},validationSchema:bS,onSubmit:i,children:({values:a,touched:o,errors:c,handleChange:d,handleSubmit:f})=>l.jsxs("form",{onSubmit:f,className:"space-y-6 mt-6",noValidate:!0,children:[l.jsxs("div",{className:"space-y-4",children:[l.jsx("div",{className:"space-y-2",children:l.jsx(Be,{required:!0,id:"email",name:"email",type:"text",label:"Correo electrónico o username",placeholder:"mi_correo@email.com",autoComplete:"email",value:a.email,error:o.email&&c.email,onChange:d})}),l.jsx("div",{className:"space-y-2",children:l.jsx("div",{className:"relative",children:l.jsx(Be,{required:!0,id:"password",name:"password",type:"password",label:"Contraseña",placeholder:"•••••••••••••",value:a.password,error:o.password&&c.password,onChange:d})})})]}),l.jsx(rt,{type:"submit",className:"w-full h-12",children:"Iniciar sesión"}),l.jsx("div",{className:"text-center",children:l.jsx(Ae,{onClick:t,className:"text-sm font-medium",children:"Olvidé mi contraseña"})})]})})]})};function ES(e){return H({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M160 0c17.7 0 32 14.3 32 32l0 35.7c1.6 .2 3.1 .4 4.7 .7c.4 .1 .7 .1 1.1 .2l48 8.8c17.4 3.2 28.9 19.9 25.7 37.2s-19.9 28.9-37.2 25.7l-47.5-8.7c-31.3-4.6-58.9-1.5-78.3 6.2s-27.2 18.3-29 28.1c-2 10.7-.5 16.7 1.2 20.4c1.8 3.9 5.5 8.3 12.8 13.2c16.3 10.7 41.3 17.7 73.7 26.3l2.9 .8c28.6 7.6 63.6 16.8 89.6 33.8c14.2 9.3 27.6 21.9 35.9 39.5c8.5 17.9 10.3 37.9 6.4 59.2c-6.9 38-33.1 63.4-65.6 76.7c-13.7 5.6-28.6 9.2-44.4 11l0 33.4c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-34.9c-.4-.1-.9-.1-1.3-.2l-.2 0s0 0 0 0c-24.4-3.8-64.5-14.3-91.5-26.3c-16.1-7.2-23.4-26.1-16.2-42.2s26.1-23.4 42.2-16.2c20.9 9.3 55.3 18.5 75.2 21.6c31.9 4.7 58.2 2 76-5.3c16.9-6.9 24.6-16.9 26.8-28.9c1.9-10.6 .4-16.7-1.3-20.4c-1.9-4-5.6-8.4-13-13.3c-16.4-10.7-41.5-17.7-74-26.3l-2.8-.7s0 0 0 0C119.4 279.3 84.4 270 58.4 253c-14.2-9.3-27.5-22-35.8-39.6c-8.4-17.9-10.1-37.9-6.1-59.2C23.7 116 52.3 91.2 84.8 78.3c13.3-5.3 27.9-8.9 43.2-11L128 32c0-17.7 14.3-32 32-32z"},child:[]}]})(e)}function SS(e){return H({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M512 80c8.8 0 16 7.2 16 16l0 32L48 128l0-32c0-8.8 7.2-16 16-16l448 0zm16 144l0 192c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16l0-192 480 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm56 304c-13.3 0-24 10.7-24 24s10.7 24 24 24l48 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0zm128 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l112 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-112 0z"},child:[]}]})(e)}function kS(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"path",attr:{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8"},child:[]},{tag:"path",attr:{d:"M12 18V6"},child:[]}]})(e)}function OS(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"},child:[]}]})(e)}function _S(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"},child:[]},{tag:"circle",attr:{cx:"12",cy:"10",r:"3"},child:[]}]})(e)}function CS(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z"},child:[]}]})(e)}function en(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z"},child:[]},{tag:"path",attr:{d:"M12 22V12"},child:[]},{tag:"path",attr:{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7"},child:[]},{tag:"path",attr:{d:"m7.5 4.27 9 5.15"},child:[]}]})(e)}function Vh(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"},child:[]},{tag:"path",attr:{d:"m15 5 4 4"},child:[]}]})(e)}function LS(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"},child:[]}]})(e)}function NS(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"},child:[]},{tag:"path",attr:{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6"},child:[]},{tag:"rect",attr:{x:"6",y:"14",width:"12",height:"8",rx:"1"},child:[]}]})(e)}function jS(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z"},child:[]},{tag:"path",attr:{d:"m14.5 12.5 2-2"},child:[]},{tag:"path",attr:{d:"m11.5 9.5 2-2"},child:[]},{tag:"path",attr:{d:"m8.5 6.5 2-2"},child:[]},{tag:"path",attr:{d:"m17.5 15.5 2-2"},child:[]}]})(e)}function MS(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7"},child:[]},{tag:"path",attr:{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"},child:[]},{tag:"path",attr:{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4"},child:[]},{tag:"path",attr:{d:"M2 7h20"},child:[]},{tag:"path",attr:{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7"},child:[]}]})(e)}function TS(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"10",cy:"7",r:"4"},child:[]},{tag:"path",attr:{d:"M10.3 15H7a4 4 0 0 0-4 4v2"},child:[]},{tag:"circle",attr:{cx:"17",cy:"17",r:"3"},child:[]},{tag:"path",attr:{d:"m21 21-1.9-1.9"},child:[]}]})(e)}function DS(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"5",r:"3"},child:[]},{tag:"path",attr:{d:"M6.5 8a2 2 0 0 0-1.905 1.46L2.1 18.5A2 2 0 0 0 4 21h16a2 2 0 0 0 1.925-2.54L19.4 9.5A2 2 0 0 0 17.48 8Z"},child:[]}]})(e)}//! moment.js
|
|
78
78
|
//! version : 2.30.1
|
|
79
79
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
80
80
|
//! license : MIT
|
|
@@ -83,4 +83,4 @@ var zh;function R(){return zh.apply(null,arguments)}function PS(e){zh=e}function
|
|
|
83
83
|
[`+i+"] ";for(a in arguments[0])ye(arguments[0],a)&&(s+=a+": "+arguments[0][a]+", ");s=s.slice(0,-2)}else s=arguments[i];n.push(s)}Wh(e+`
|
|
84
84
|
Arguments: `+Array.prototype.slice.call(n).join("")+`
|
|
85
85
|
`+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var od={};function Yh(e,t){R.deprecationHandler!=null&&R.deprecationHandler(e,t),od[e]||(Wh(t),od[e]=!0)}R.suppressDeprecationWarnings=!1;R.deprecationHandler=null;function Ct(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function RS(e){var t,r;for(r in e)ye(e,r)&&(t=e[r],Ct(t)?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function qa(e,t){var r=er({},e),n;for(n in t)ye(t,n)&&(Sr(e[n])&&Sr(t[n])?(r[n]={},er(r[n],e[n]),er(r[n],t[n])):t[n]!=null?r[n]=t[n]:delete r[n]);for(n in e)ye(e,n)&&!ye(t,n)&&Sr(e[n])&&(r[n]=er({},r[n]));return r}function Vo(e){e!=null&&this.set(e)}var Za;Object.keys?Za=Object.keys:Za=function(e){var t,r=[];for(t in e)ye(e,t)&&r.push(t);return r};var IS={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function FS(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return Ct(n)?n.call(t,r):n}function kt(e,t,r){var n=""+Math.abs(e),s=t-n.length,i=e>=0;return(i?r?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+n}var zo=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Cs=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ya={},Hr={};function q(e,t,r,n){var s=n;typeof n=="string"&&(s=function(){return this[n]()}),e&&(Hr[e]=s),t&&(Hr[t[0]]=function(){return kt(s.apply(this,arguments),t[1],t[2])}),r&&(Hr[r]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function $S(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function US(e){var t=e.match(zo),r,n;for(r=0,n=t.length;r<n;r++)Hr[t[r]]?t[r]=Hr[t[r]]:t[r]=$S(t[r]);return function(s){var i="",a;for(a=0;a<n;a++)i+=Ct(t[a])?t[a].call(s,e):t[a];return i}}function Rs(e,t){return e.isValid()?(t=Hh(t,e.localeData()),ya[t]=ya[t]||US(t),ya[t](e)):e.localeData().invalidDate()}function Hh(e,t){var r=5;function n(s){return t.longDateFormat(s)||s}for(Cs.lastIndex=0;r>=0&&Cs.test(e);)e=e.replace(Cs,n),Cs.lastIndex=0,r-=1;return e}var VS={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function zS(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(zo).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var BS="Invalid date";function WS(){return this._invalidDate}var YS="%d",HS=/\d{1,2}/;function GS(e){return this._ordinal.replace("%d",e)}var qS={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function ZS(e,t,r,n){var s=this._relativeTime[r];return Ct(s)?s(e,t,r,n):s.replace(/%d/i,e)}function KS(e,t){var r=this._relativeTime[e>0?"future":"past"];return Ct(r)?r(t):r.replace(/%s/i,t)}var ld={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function ft(e){return typeof e=="string"?ld[e]||ld[e.toLowerCase()]:void 0}function Bo(e){var t={},r,n;for(n in e)ye(e,n)&&(r=ft(n),r&&(t[r]=e[n]));return t}var JS={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function XS(e){var t=[],r;for(r in e)ye(e,r)&&t.push({unit:r,priority:JS[r]});return t.sort(function(n,s){return n.priority-s.priority}),t}var Gh=/\d/,nt=/\d\d/,qh=/\d{3}/,Wo=/\d{4}/,Ii=/[+-]?\d{6}/,Me=/\d\d?/,Zh=/\d\d\d\d?/,Kh=/\d\d\d\d\d\d?/,Fi=/\d{1,3}/,Yo=/\d{1,4}/,$i=/[+-]?\d{1,6}/,un=/\d+/,Ui=/[+-]?\d+/,QS=/Z|[+-]\d\d:?\d\d/gi,Vi=/Z|[+-]\d\d(?::?\d\d)?/gi,ek=/[+-]?\d+(\.\d{1,3})?/,es=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,dn=/^[1-9]\d?/,Ho=/^([1-9]\d|\d)/,ci;ci={};function V(e,t,r){ci[e]=Ct(t)?t:function(n,s){return n&&r?r:t}}function tk(e,t){return ye(ci,e)?ci[e](t._strict,t._locale):new RegExp(rk(e))}function rk(e){return Ft(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,s,i){return r||n||s||i}))}function Ft(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function lt(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function pe(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=lt(t)),r}var Ka={};function ke(e,t){var r,n=t,s;for(typeof e=="string"&&(e=[e]),Vt(t)&&(n=function(i,a){a[t]=pe(i)}),s=e.length,r=0;r<s;r++)Ka[e[r]]=n}function ts(e,t){ke(e,function(r,n,s,i){s._w=s._w||{},t(r,s._w,s,i)})}function nk(e,t,r){t!=null&&ye(Ka,e)&&Ka[e](t,r._a,r,e)}function zi(e){return e%4===0&&e%100!==0||e%400===0}var Ye=0,Rt=1,Et=2,Re=3,pt=4,It=5,yr=6,sk=7,ik=8;q("Y",0,0,function(){var e=this.year();return e<=9999?kt(e,4):"+"+e});q(0,["YY",2],0,function(){return this.year()%100});q(0,["YYYY",4],0,"year");q(0,["YYYYY",5],0,"year");q(0,["YYYYYY",6,!0],0,"year");V("Y",Ui);V("YY",Me,nt);V("YYYY",Yo,Wo);V("YYYYY",$i,Ii);V("YYYYYY",$i,Ii);ke(["YYYYY","YYYYYY"],Ye);ke("YYYY",function(e,t){t[Ye]=e.length===2?R.parseTwoDigitYear(e):pe(e)});ke("YY",function(e,t){t[Ye]=R.parseTwoDigitYear(e)});ke("Y",function(e,t){t[Ye]=parseInt(e,10)});function Ln(e){return zi(e)?366:365}R.parseTwoDigitYear=function(e){return pe(e)+(pe(e)>68?1900:2e3)};var Jh=fn("FullYear",!0);function ak(){return zi(this.year())}function fn(e,t){return function(r){return r!=null?(Xh(this,e,r),R.updateOffset(this,t),this):$n(this,e)}}function $n(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function Xh(e,t,r){var n,s,i,a,o;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(s?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(s?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(s?n.setUTCHours(r):n.setHours(r));case"Date":return void(s?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}i=r,a=e.month(),o=e.date(),o=o===29&&a===1&&!zi(i)?28:o,s?n.setUTCFullYear(i,a,o):n.setFullYear(i,a,o)}}function ok(e){return e=ft(e),Ct(this[e])?this[e]():this}function lk(e,t){if(typeof e=="object"){e=Bo(e);var r=XS(e),n,s=r.length;for(n=0;n<s;n++)this[r[n].unit](e[r[n].unit])}else if(e=ft(e),Ct(this[e]))return this[e](t);return this}function ck(e,t){return(e%t+t)%t}var Pe;Array.prototype.indexOf?Pe=Array.prototype.indexOf:Pe=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Go(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=ck(t,12);return e+=(t-r)/12,r===1?zi(e)?29:28:31-r%7%2}q("M",["MM",2],"Mo",function(){return this.month()+1});q("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});q("MMMM",0,0,function(e){return this.localeData().months(this,e)});V("M",Me,dn);V("MM",Me,nt);V("MMM",function(e,t){return t.monthsShortRegex(e)});V("MMMM",function(e,t){return t.monthsRegex(e)});ke(["M","MM"],function(e,t){t[Rt]=pe(e)-1});ke(["MMM","MMMM"],function(e,t,r,n){var s=r._locale.monthsParse(e,n,r._strict);s!=null?t[Rt]=s:ae(r).invalidMonth=e});var uk="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Qh="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ep=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,dk=es,fk=es;function hk(e,t){return e?gt(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ep).test(t)?"format":"standalone"][e.month()]:gt(this._months)?this._months:this._months.standalone}function pk(e,t){return e?gt(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ep.test(t)?"format":"standalone"][e.month()]:gt(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function mk(e,t,r){var n,s,i,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)i=_t([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(i,"").toLocaleLowerCase();return r?t==="MMM"?(s=Pe.call(this._shortMonthsParse,a),s!==-1?s:null):(s=Pe.call(this._longMonthsParse,a),s!==-1?s:null):t==="MMM"?(s=Pe.call(this._shortMonthsParse,a),s!==-1?s:(s=Pe.call(this._longMonthsParse,a),s!==-1?s:null)):(s=Pe.call(this._longMonthsParse,a),s!==-1?s:(s=Pe.call(this._shortMonthsParse,a),s!==-1?s:null))}function gk(e,t,r){var n,s,i;if(this._monthsParseExact)return mk.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(s=_t([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),!r&&!this._monthsParse[n]&&(i="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[n]=new RegExp(i.replace(".",""),"i")),r&&t==="MMMM"&&this._longMonthsParse[n].test(e))return n;if(r&&t==="MMM"&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function tp(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=pe(t);else if(t=e.localeData().monthsParse(t),!Vt(t))return e}var r=t,n=e.date();return n=n<29?n:Math.min(n,Go(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function rp(e){return e!=null?(tp(this,e),R.updateOffset(this,!0),this):$n(this,"Month")}function vk(){return Go(this.year(),this.month())}function yk(e){return this._monthsParseExact?(ye(this,"_monthsRegex")||np.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(ye(this,"_monthsShortRegex")||(this._monthsShortRegex=dk),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function xk(e){return this._monthsParseExact?(ye(this,"_monthsRegex")||np.call(this),e?this._monthsStrictRegex:this._monthsRegex):(ye(this,"_monthsRegex")||(this._monthsRegex=fk),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function np(){function e(c,d){return d.length-c.length}var t=[],r=[],n=[],s,i,a,o;for(s=0;s<12;s++)i=_t([2e3,s]),a=Ft(this.monthsShort(i,"")),o=Ft(this.months(i,"")),t.push(a),r.push(o),n.push(o),n.push(a);t.sort(e),r.sort(e),n.sort(e),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function bk(e,t,r,n,s,i,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,r,n,s,i,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,r,n,s,i,a),o}function Un(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function ui(e,t,r){var n=7+t-r,s=(7+Un(e,0,n).getUTCDay()-t)%7;return-s+n-1}function sp(e,t,r,n,s){var i=(7+r-n)%7,a=ui(e,n,s),o=1+7*(t-1)+i+a,c,d;return o<=0?(c=e-1,d=Ln(c)+o):o>Ln(e)?(c=e+1,d=o-Ln(e)):(c=e,d=o),{year:c,dayOfYear:d}}function Vn(e,t,r){var n=ui(e.year(),t,r),s=Math.floor((e.dayOfYear()-n-1)/7)+1,i,a;return s<1?(a=e.year()-1,i=s+$t(a,t,r)):s>$t(e.year(),t,r)?(i=s-$t(e.year(),t,r),a=e.year()+1):(a=e.year(),i=s),{week:i,year:a}}function $t(e,t,r){var n=ui(e,t,r),s=ui(e+1,t,r);return(Ln(e)-n+s)/7}q("w",["ww",2],"wo","week");q("W",["WW",2],"Wo","isoWeek");V("w",Me,dn);V("ww",Me,nt);V("W",Me,dn);V("WW",Me,nt);ts(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=pe(e)});function wk(e){return Vn(e,this._week.dow,this._week.doy).week}var Ek={dow:0,doy:6};function Sk(){return this._week.dow}function kk(){return this._week.doy}function Ok(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function _k(e){var t=Vn(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}q("d",0,"do","day");q("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});q("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});q("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});q("e",0,0,"weekday");q("E",0,0,"isoWeekday");V("d",Me);V("e",Me);V("E",Me);V("dd",function(e,t){return t.weekdaysMinRegex(e)});V("ddd",function(e,t){return t.weekdaysShortRegex(e)});V("dddd",function(e,t){return t.weekdaysRegex(e)});ts(["dd","ddd","dddd"],function(e,t,r,n){var s=r._locale.weekdaysParse(e,n,r._strict);s!=null?t.d=s:ae(r).invalidWeekday=e});ts(["d","e","E"],function(e,t,r,n){t[n]=pe(e)});function Ck(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Lk(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function qo(e,t){return e.slice(t,7).concat(e.slice(0,t))}var Nk="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ip="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),jk="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Mk=es,Tk=es,Dk=es;function Pk(e,t){var r=gt(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?qo(r,this._week.dow):e?r[e.day()]:r}function Ak(e){return e===!0?qo(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Rk(e){return e===!0?qo(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Ik(e,t,r){var n,s,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)i=_t([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(i,"").toLocaleLowerCase();return r?t==="dddd"?(s=Pe.call(this._weekdaysParse,a),s!==-1?s:null):t==="ddd"?(s=Pe.call(this._shortWeekdaysParse,a),s!==-1?s:null):(s=Pe.call(this._minWeekdaysParse,a),s!==-1?s:null):t==="dddd"?(s=Pe.call(this._weekdaysParse,a),s!==-1||(s=Pe.call(this._shortWeekdaysParse,a),s!==-1)?s:(s=Pe.call(this._minWeekdaysParse,a),s!==-1?s:null)):t==="ddd"?(s=Pe.call(this._shortWeekdaysParse,a),s!==-1||(s=Pe.call(this._weekdaysParse,a),s!==-1)?s:(s=Pe.call(this._minWeekdaysParse,a),s!==-1?s:null)):(s=Pe.call(this._minWeekdaysParse,a),s!==-1||(s=Pe.call(this._weekdaysParse,a),s!==-1)?s:(s=Pe.call(this._shortWeekdaysParse,a),s!==-1?s:null))}function Fk(e,t,r){var n,s,i;if(this._weekdaysParseExact)return Ik.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(s=_t([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(i="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[n]=new RegExp(i.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(r&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(r&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function $k(e){if(!this.isValid())return e!=null?this:NaN;var t=$n(this,"Day");return e!=null?(e=Ck(e,this.localeData()),this.add(e-t,"d")):t}function Uk(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function Vk(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Lk(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function zk(e){return this._weekdaysParseExact?(ye(this,"_weekdaysRegex")||Zo.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(ye(this,"_weekdaysRegex")||(this._weekdaysRegex=Mk),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Bk(e){return this._weekdaysParseExact?(ye(this,"_weekdaysRegex")||Zo.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(ye(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Tk),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Wk(e){return this._weekdaysParseExact?(ye(this,"_weekdaysRegex")||Zo.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(ye(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Dk),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Zo(){function e(f,h){return h.length-f.length}var t=[],r=[],n=[],s=[],i,a,o,c,d;for(i=0;i<7;i++)a=_t([2e3,1]).day(i),o=Ft(this.weekdaysMin(a,"")),c=Ft(this.weekdaysShort(a,"")),d=Ft(this.weekdays(a,"")),t.push(o),r.push(c),n.push(d),s.push(o),s.push(c),s.push(d);t.sort(e),r.sort(e),n.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Ko(){return this.hours()%12||12}function Yk(){return this.hours()||24}q("H",["HH",2],0,"hour");q("h",["hh",2],0,Ko);q("k",["kk",2],0,Yk);q("hmm",0,0,function(){return""+Ko.apply(this)+kt(this.minutes(),2)});q("hmmss",0,0,function(){return""+Ko.apply(this)+kt(this.minutes(),2)+kt(this.seconds(),2)});q("Hmm",0,0,function(){return""+this.hours()+kt(this.minutes(),2)});q("Hmmss",0,0,function(){return""+this.hours()+kt(this.minutes(),2)+kt(this.seconds(),2)});function ap(e,t){q(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}ap("a",!0);ap("A",!1);function op(e,t){return t._meridiemParse}V("a",op);V("A",op);V("H",Me,Ho);V("h",Me,dn);V("k",Me,dn);V("HH",Me,nt);V("hh",Me,nt);V("kk",Me,nt);V("hmm",Zh);V("hmmss",Kh);V("Hmm",Zh);V("Hmmss",Kh);ke(["H","HH"],Re);ke(["k","kk"],function(e,t,r){var n=pe(e);t[Re]=n===24?0:n});ke(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e});ke(["h","hh"],function(e,t,r){t[Re]=pe(e),ae(r).bigHour=!0});ke("hmm",function(e,t,r){var n=e.length-2;t[Re]=pe(e.substr(0,n)),t[pt]=pe(e.substr(n)),ae(r).bigHour=!0});ke("hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[Re]=pe(e.substr(0,n)),t[pt]=pe(e.substr(n,2)),t[It]=pe(e.substr(s)),ae(r).bigHour=!0});ke("Hmm",function(e,t,r){var n=e.length-2;t[Re]=pe(e.substr(0,n)),t[pt]=pe(e.substr(n))});ke("Hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[Re]=pe(e.substr(0,n)),t[pt]=pe(e.substr(n,2)),t[It]=pe(e.substr(s))});function Hk(e){return(e+"").toLowerCase().charAt(0)==="p"}var Gk=/[ap]\.?m?\.?/i,qk=fn("Hours",!0);function Zk(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var lp={calendar:IS,longDateFormat:VS,invalidDate:BS,ordinal:YS,dayOfMonthOrdinalParse:HS,relativeTime:qS,months:uk,monthsShort:Qh,week:Ek,weekdays:Nk,weekdaysMin:jk,weekdaysShort:ip,meridiemParse:Gk},Te={},bn={},zn;function Kk(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}function cd(e){return e&&e.toLowerCase().replace("_","-")}function Jk(e){for(var t=0,r,n,s,i;t<e.length;){for(i=cd(e[t]).split("-"),r=i.length,n=cd(e[t+1]),n=n?n.split("-"):null;r>0;){if(s=Bi(i.slice(0,r).join("-")),s)return s;if(n&&n.length>=r&&Kk(i,n)>=r-1)break;r--}t++}return zn}function Xk(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Bi(e){var t=null,r;if(Te[e]===void 0&&typeof module<"u"&&module&&module.exports&&Xk(e))try{t=zn._abbr,r=require,r("./locale/"+e),sr(t)}catch{Te[e]=null}return Te[e]}function sr(e,t){var r;return e&&(Ze(t)?r=Bt(e):r=Jo(e,t),r?zn=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),zn._abbr}function Jo(e,t){if(t!==null){var r,n=lp;if(t.abbr=e,Te[e]!=null)Yh("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Te[e]._config;else if(t.parentLocale!=null)if(Te[t.parentLocale]!=null)n=Te[t.parentLocale]._config;else if(r=Bi(t.parentLocale),r!=null)n=r._config;else return bn[t.parentLocale]||(bn[t.parentLocale]=[]),bn[t.parentLocale].push({name:e,config:t}),null;return Te[e]=new Vo(qa(n,t)),bn[e]&&bn[e].forEach(function(s){Jo(s.name,s.config)}),sr(e),Te[e]}else return delete Te[e],null}function Qk(e,t){if(t!=null){var r,n,s=lp;Te[e]!=null&&Te[e].parentLocale!=null?Te[e].set(qa(Te[e]._config,t)):(n=Bi(e),n!=null&&(s=n._config),t=qa(s,t),n==null&&(t.abbr=e),r=new Vo(t),r.parentLocale=Te[e],Te[e]=r),sr(e)}else Te[e]!=null&&(Te[e].parentLocale!=null?(Te[e]=Te[e].parentLocale,e===sr()&&sr(e)):Te[e]!=null&&delete Te[e]);return Te[e]}function Bt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return zn;if(!gt(e)){if(t=Bi(e),t)return t;e=[e]}return Jk(e)}function e4(){return Za(Te)}function Xo(e){var t,r=e._a;return r&&ae(e).overflow===-2&&(t=r[Rt]<0||r[Rt]>11?Rt:r[Et]<1||r[Et]>Go(r[Ye],r[Rt])?Et:r[Re]<0||r[Re]>24||r[Re]===24&&(r[pt]!==0||r[It]!==0||r[yr]!==0)?Re:r[pt]<0||r[pt]>59?pt:r[It]<0||r[It]>59?It:r[yr]<0||r[yr]>999?yr:-1,ae(e)._overflowDayOfYear&&(t<Ye||t>Et)&&(t=Et),ae(e)._overflowWeeks&&t===-1&&(t=sk),ae(e)._overflowWeekday&&t===-1&&(t=ik),ae(e).overflow=t),e}var t4=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,r4=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,n4=/Z|[+-]\d\d(?::?\d\d)?/,Ls=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],xa=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],s4=/^\/?Date\((-?\d+)/i,i4=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,a4={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function cp(e){var t,r,n=e._i,s=t4.exec(n)||r4.exec(n),i,a,o,c,d=Ls.length,f=xa.length;if(s){for(ae(e).iso=!0,t=0,r=d;t<r;t++)if(Ls[t][1].exec(s[1])){a=Ls[t][0],i=Ls[t][2]!==!1;break}if(a==null){e._isValid=!1;return}if(s[3]){for(t=0,r=f;t<r;t++)if(xa[t][1].exec(s[3])){o=(s[2]||" ")+xa[t][0];break}if(o==null){e._isValid=!1;return}}if(!i&&o!=null){e._isValid=!1;return}if(s[4])if(n4.exec(s[4]))c="Z";else{e._isValid=!1;return}e._f=a+(o||"")+(c||""),el(e)}else e._isValid=!1}function o4(e,t,r,n,s,i){var a=[l4(e),Qh.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(s,10)];return i&&a.push(parseInt(i,10)),a}function l4(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function c4(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function u4(e,t,r){if(e){var n=ip.indexOf(e),s=new Date(t[0],t[1],t[2]).getDay();if(n!==s)return ae(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function d4(e,t,r){if(e)return a4[e];if(t)return 0;var n=parseInt(r,10),s=n%100,i=(n-s)/100;return i*60+s}function up(e){var t=i4.exec(c4(e._i)),r;if(t){if(r=o4(t[4],t[3],t[2],t[5],t[6],t[7]),!u4(t[1],r,e))return;e._a=r,e._tzm=d4(t[8],t[9],t[10]),e._d=Un.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),ae(e).rfc2822=!0}else e._isValid=!1}function f4(e){var t=s4.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(cp(e),e._isValid===!1)delete e._isValid;else return;if(up(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:R.createFromInputFallback(e)}R.createFromInputFallback=dt("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function Vr(e,t,r){return e??t??r}function h4(e){var t=new Date(R.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Qo(e){var t,r,n=[],s,i,a;if(!e._d){for(s=h4(e),e._w&&e._a[Et]==null&&e._a[Rt]==null&&p4(e),e._dayOfYear!=null&&(a=Vr(e._a[Ye],s[Ye]),(e._dayOfYear>Ln(a)||e._dayOfYear===0)&&(ae(e)._overflowDayOfYear=!0),r=Un(a,0,e._dayOfYear),e._a[Rt]=r.getUTCMonth(),e._a[Et]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=s[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Re]===24&&e._a[pt]===0&&e._a[It]===0&&e._a[yr]===0&&(e._nextDay=!0,e._a[Re]=0),e._d=(e._useUTC?Un:bk).apply(null,n),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Re]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==i&&(ae(e).weekdayMismatch=!0)}}function p4(e){var t,r,n,s,i,a,o,c,d;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(i=1,a=4,r=Vr(t.GG,e._a[Ye],Vn(je(),1,4).year),n=Vr(t.W,1),s=Vr(t.E,1),(s<1||s>7)&&(c=!0)):(i=e._locale._week.dow,a=e._locale._week.doy,d=Vn(je(),i,a),r=Vr(t.gg,e._a[Ye],d.year),n=Vr(t.w,d.week),t.d!=null?(s=t.d,(s<0||s>6)&&(c=!0)):t.e!=null?(s=t.e+i,(t.e<0||t.e>6)&&(c=!0)):s=i),n<1||n>$t(r,i,a)?ae(e)._overflowWeeks=!0:c!=null?ae(e)._overflowWeekday=!0:(o=sp(r,n,s,i,a),e._a[Ye]=o.year,e._dayOfYear=o.dayOfYear)}R.ISO_8601=function(){};R.RFC_2822=function(){};function el(e){if(e._f===R.ISO_8601){cp(e);return}if(e._f===R.RFC_2822){up(e);return}e._a=[],ae(e).empty=!0;var t=""+e._i,r,n,s,i,a,o=t.length,c=0,d,f;for(s=Hh(e._f,e._locale).match(zo)||[],f=s.length,r=0;r<f;r++)i=s[r],n=(t.match(tk(i,e))||[])[0],n&&(a=t.substr(0,t.indexOf(n)),a.length>0&&ae(e).unusedInput.push(a),t=t.slice(t.indexOf(n)+n.length),c+=n.length),Hr[i]?(n?ae(e).empty=!1:ae(e).unusedTokens.push(i),nk(i,n,e)):e._strict&&!n&&ae(e).unusedTokens.push(i);ae(e).charsLeftOver=o-c,t.length>0&&ae(e).unusedInput.push(t),e._a[Re]<=12&&ae(e).bigHour===!0&&e._a[Re]>0&&(ae(e).bigHour=void 0),ae(e).parsedDateParts=e._a.slice(0),ae(e).meridiem=e._meridiem,e._a[Re]=m4(e._locale,e._a[Re],e._meridiem),d=ae(e).era,d!==null&&(e._a[Ye]=e._locale.erasConvertYear(d,e._a[Ye])),Qo(e),Xo(e)}function m4(e,t,r){var n;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(n=e.isPM(r),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function g4(e){var t,r,n,s,i,a,o=!1,c=e._f.length;if(c===0){ae(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;s<c;s++)i=0,a=!1,t=Uo({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[s],el(t),$o(t)&&(a=!0),i+=ae(t).charsLeftOver,i+=ae(t).unusedTokens.length*10,ae(t).score=i,o?i<n&&(n=i,r=t):(n==null||i<n||a)&&(n=i,r=t,a&&(o=!0));er(e,r||t)}function v4(e){if(!e._d){var t=Bo(e._i),r=t.day===void 0?t.date:t.day;e._a=Bh([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),Qo(e)}}function y4(e){var t=new Qn(Xo(dp(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function dp(e){var t=e._i,r=e._f;return e._locale=e._locale||Bt(e._l),t===null||r===void 0&&t===""?Ri({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),vt(t)?new Qn(Xo(t)):(Xn(t)?e._d=t:gt(r)?g4(e):r?el(e):x4(e),$o(e)||(e._d=null),e))}function x4(e){var t=e._i;Ze(t)?e._d=new Date(R.now()):Xn(t)?e._d=new Date(t.valueOf()):typeof t=="string"?f4(e):gt(t)?(e._a=Bh(t.slice(0),function(r){return parseInt(r,10)}),Qo(e)):Sr(t)?v4(e):Vt(t)?e._d=new Date(t):R.createFromInputFallback(e)}function fp(e,t,r,n,s){var i={};return(t===!0||t===!1)&&(n=t,t=void 0),(r===!0||r===!1)&&(n=r,r=void 0),(Sr(e)&&Fo(e)||gt(e)&&e.length===0)&&(e=void 0),i._isAMomentObject=!0,i._useUTC=i._isUTC=s,i._l=r,i._i=e,i._f=t,i._strict=n,y4(i)}function je(e,t,r,n){return fp(e,t,r,n,!1)}var b4=dt("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=je.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Ri()}),w4=dt("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=je.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Ri()});function hp(e,t){var r,n;if(t.length===1&>(t[0])&&(t=t[0]),!t.length)return je();for(r=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][e](r))&&(r=t[n]);return r}function E4(){var e=[].slice.call(arguments,0);return hp("isBefore",e)}function S4(){var e=[].slice.call(arguments,0);return hp("isAfter",e)}var k4=function(){return Date.now?Date.now():+new Date},wn=["year","quarter","month","week","day","hour","minute","second","millisecond"];function O4(e){var t,r=!1,n,s=wn.length;for(t in e)if(ye(e,t)&&!(Pe.call(wn,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<s;++n)if(e[wn[n]]){if(r)return!1;parseFloat(e[wn[n]])!==pe(e[wn[n]])&&(r=!0)}return!0}function _4(){return this._isValid}function C4(){return xt(NaN)}function Wi(e){var t=Bo(e),r=t.year||0,n=t.quarter||0,s=t.month||0,i=t.week||t.isoWeek||0,a=t.day||0,o=t.hour||0,c=t.minute||0,d=t.second||0,f=t.millisecond||0;this._isValid=O4(t),this._milliseconds=+f+d*1e3+c*6e4+o*1e3*60*60,this._days=+a+i*7,this._months=+s+n*3+r*12,this._data={},this._locale=Bt(),this._bubble()}function Is(e){return e instanceof Wi}function Ja(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function L4(e,t,r){var n=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),i=0,a;for(a=0;a<n;a++)pe(e[a])!==pe(t[a])&&i++;return i+s}function pp(e,t){q(e,0,0,function(){var r=this.utcOffset(),n="+";return r<0&&(r=-r,n="-"),n+kt(~~(r/60),2)+t+kt(~~r%60,2)})}pp("Z",":");pp("ZZ","");V("Z",Vi);V("ZZ",Vi);ke(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=tl(Vi,e)});var N4=/([\+\-]|\d\d)/gi;function tl(e,t){var r=(t||"").match(e),n,s,i;return r===null?null:(n=r[r.length-1]||[],s=(n+"").match(N4)||["-",0,0],i=+(s[1]*60)+pe(s[2]),i===0?0:s[0]==="+"?i:-i)}function rl(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(vt(e)||Xn(e)?e.valueOf():je(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),R.updateOffset(r,!1),r):je(e).local()}function Xa(e){return-Math.round(e._d.getTimezoneOffset())}R.updateOffset=function(){};function j4(e,t,r){var n=this._offset||0,s;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=tl(Vi,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(s=Xa(this)),this._offset=e,this._isUTC=!0,s!=null&&this.add(s,"m"),n!==e&&(!t||this._changeInProgress?vp(this,xt(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,R.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:Xa(this)}function M4(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function T4(e){return this.utcOffset(0,e)}function D4(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Xa(this),"m")),this}function P4(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=tl(QS,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function A4(e){return this.isValid()?(e=e?je(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function R4(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function I4(){if(!Ze(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Uo(e,this),e=dp(e),e._a?(t=e._isUTC?_t(e._a):je(e._a),this._isDSTShifted=this.isValid()&&L4(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function F4(){return this.isValid()?!this._isUTC:!1}function $4(){return this.isValid()?this._isUTC:!1}function mp(){return this.isValid()?this._isUTC&&this._offset===0:!1}var U4=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,V4=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function xt(e,t){var r=e,n=null,s,i,a;return Is(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:Vt(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=U4.exec(e))?(s=n[1]==="-"?-1:1,r={y:0,d:pe(n[Et])*s,h:pe(n[Re])*s,m:pe(n[pt])*s,s:pe(n[It])*s,ms:pe(Ja(n[yr]*1e3))*s}):(n=V4.exec(e))?(s=n[1]==="-"?-1:1,r={y:fr(n[2],s),M:fr(n[3],s),w:fr(n[4],s),d:fr(n[5],s),h:fr(n[6],s),m:fr(n[7],s),s:fr(n[8],s)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(a=z4(je(r.from),je(r.to)),r={},r.ms=a.milliseconds,r.M=a.months),i=new Wi(r),Is(e)&&ye(e,"_locale")&&(i._locale=e._locale),Is(e)&&ye(e,"_isValid")&&(i._isValid=e._isValid),i}xt.fn=Wi.prototype;xt.invalid=C4;function fr(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function ud(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function z4(e,t){var r;return e.isValid()&&t.isValid()?(t=rl(t,e),e.isBefore(t)?r=ud(e,t):(r=ud(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function gp(e,t){return function(r,n){var s,i;return n!==null&&!isNaN(+n)&&(Yh(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=r,r=n,n=i),s=xt(r,n),vp(this,s,e),this}}function vp(e,t,r,n){var s=t._milliseconds,i=Ja(t._days),a=Ja(t._months);e.isValid()&&(n=n??!0,a&&tp(e,$n(e,"Month")+a*r),i&&Xh(e,"Date",$n(e,"Date")+i*r),s&&e._d.setTime(e._d.valueOf()+s*r),n&&R.updateOffset(e,i||a))}var B4=gp(1,"add"),W4=gp(-1,"subtract");function yp(e){return typeof e=="string"||e instanceof String}function Y4(e){return vt(e)||Xn(e)||yp(e)||Vt(e)||G4(e)||H4(e)||e===null||e===void 0}function H4(e){var t=Sr(e)&&!Fo(e),r=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,i,a=n.length;for(s=0;s<a;s+=1)i=n[s],r=r||ye(e,i);return t&&r}function G4(e){var t=gt(e),r=!1;return t&&(r=e.filter(function(n){return!Vt(n)&&yp(e)}).length===0),t&&r}function q4(e){var t=Sr(e)&&!Fo(e),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],s,i;for(s=0;s<n.length;s+=1)i=n[s],r=r||ye(e,i);return t&&r}function Z4(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function K4(e,t){arguments.length===1&&(arguments[0]?Y4(arguments[0])?(e=arguments[0],t=void 0):q4(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||je(),n=rl(r,this).startOf("day"),s=R.calendarFormat(this,n)||"sameElse",i=t&&(Ct(t[s])?t[s].call(this,r):t[s]);return this.format(i||this.localeData().calendar(s,this,je(r)))}function J4(){return new Qn(this)}function X4(e,t){var r=vt(e)?e:je(e);return this.isValid()&&r.isValid()?(t=ft(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function Q4(e,t){var r=vt(e)?e:je(e);return this.isValid()&&r.isValid()?(t=ft(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function eO(e,t,r,n){var s=vt(e)?e:je(e),i=vt(t)?t:je(t);return this.isValid()&&s.isValid()&&i.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(s,r):!this.isBefore(s,r))&&(n[1]===")"?this.isBefore(i,r):!this.isAfter(i,r))):!1}function tO(e,t){var r=vt(e)?e:je(e),n;return this.isValid()&&r.isValid()?(t=ft(t)||"millisecond",t==="millisecond"?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf())):!1}function rO(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function nO(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function sO(e,t,r){var n,s,i;if(!this.isValid())return NaN;if(n=rl(e,this),!n.isValid())return NaN;switch(s=(n.utcOffset()-this.utcOffset())*6e4,t=ft(t),t){case"year":i=Fs(this,n)/12;break;case"month":i=Fs(this,n);break;case"quarter":i=Fs(this,n)/3;break;case"second":i=(this-n)/1e3;break;case"minute":i=(this-n)/6e4;break;case"hour":i=(this-n)/36e5;break;case"day":i=(this-n-s)/864e5;break;case"week":i=(this-n-s)/6048e5;break;default:i=this-n}return r?i:lt(i)}function Fs(e,t){if(e.date()<t.date())return-Fs(t,e);var r=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(r,"months"),s,i;return t-n<0?(s=e.clone().add(r-1,"months"),i=(t-n)/(n-s)):(s=e.clone().add(r+1,"months"),i=(t-n)/(s-n)),-(r+i)||0}R.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";R.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function iO(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function aO(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?Rs(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Ct(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Rs(r,"Z")):Rs(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function oO(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,s,i;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",i=t+'[")]',this.format(r+n+s+i)}function lO(e){e||(e=this.isUtc()?R.defaultFormatUtc:R.defaultFormat);var t=Rs(this,e);return this.localeData().postformat(t)}function cO(e,t){return this.isValid()&&(vt(e)&&e.isValid()||je(e).isValid())?xt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function uO(e){return this.from(je(),e)}function dO(e,t){return this.isValid()&&(vt(e)&&e.isValid()||je(e).isValid())?xt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function fO(e){return this.to(je(),e)}function xp(e){var t;return e===void 0?this._locale._abbr:(t=Bt(e),t!=null&&(this._locale=t),this)}var bp=dt("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function wp(){return this._locale}var di=1e3,Gr=60*di,fi=60*Gr,Ep=(365*400+97)*24*fi;function qr(e,t){return(e%t+t)%t}function Sp(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-Ep:new Date(e,t,r).valueOf()}function kp(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-Ep:Date.UTC(e,t,r)}function hO(e){var t,r;if(e=ft(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?kp:Sp,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=qr(t+(this._isUTC?0:this.utcOffset()*Gr),fi);break;case"minute":t=this._d.valueOf(),t-=qr(t,Gr);break;case"second":t=this._d.valueOf(),t-=qr(t,di);break}return this._d.setTime(t),R.updateOffset(this,!0),this}function pO(e){var t,r;if(e=ft(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?kp:Sp,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=fi-qr(t+(this._isUTC?0:this.utcOffset()*Gr),fi)-1;break;case"minute":t=this._d.valueOf(),t+=Gr-qr(t,Gr)-1;break;case"second":t=this._d.valueOf(),t+=di-qr(t,di)-1;break}return this._d.setTime(t),R.updateOffset(this,!0),this}function mO(){return this._d.valueOf()-(this._offset||0)*6e4}function gO(){return Math.floor(this.valueOf()/1e3)}function vO(){return new Date(this.valueOf())}function yO(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function xO(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function bO(){return this.isValid()?this.toISOString():null}function wO(){return $o(this)}function EO(){return er({},ae(this))}function SO(){return ae(this).overflow}function kO(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}q("N",0,0,"eraAbbr");q("NN",0,0,"eraAbbr");q("NNN",0,0,"eraAbbr");q("NNNN",0,0,"eraName");q("NNNNN",0,0,"eraNarrow");q("y",["y",1],"yo","eraYear");q("y",["yy",2],0,"eraYear");q("y",["yyy",3],0,"eraYear");q("y",["yyyy",4],0,"eraYear");V("N",nl);V("NN",nl);V("NNN",nl);V("NNNN",AO);V("NNNNN",RO);ke(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var s=r._locale.erasParse(e,n,r._strict);s?ae(r).era=s:ae(r).invalidEra=e});V("y",un);V("yy",un);V("yyy",un);V("yyyy",un);V("yo",IO);ke(["y","yy","yyy","yyyy"],Ye);ke(["yo"],function(e,t,r,n){var s;r._locale._eraYearOrdinalRegex&&(s=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[Ye]=r._locale.eraYearOrdinalParse(e,s):t[Ye]=parseInt(e,10)});function OO(e,t){var r,n,s,i=this._eras||Bt("en")._eras;for(r=0,n=i.length;r<n;++r){switch(typeof i[r].since){case"string":s=R(i[r].since).startOf("day"),i[r].since=s.valueOf();break}switch(typeof i[r].until){case"undefined":i[r].until=1/0;break;case"string":s=R(i[r].until).startOf("day").valueOf(),i[r].until=s.valueOf();break}}return i}function _O(e,t,r){var n,s,i=this.eras(),a,o,c;for(e=e.toUpperCase(),n=0,s=i.length;n<s;++n)if(a=i[n].name.toUpperCase(),o=i[n].abbr.toUpperCase(),c=i[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(o===e)return i[n];break;case"NNNN":if(a===e)return i[n];break;case"NNNNN":if(c===e)return i[n];break}else if([a,o,c].indexOf(e)>=0)return i[n]}function CO(e,t){var r=e.since<=e.until?1:-1;return t===void 0?R(e.since).year():R(e.since).year()+(t-e.offset)*r}function LO(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].name;return""}function NO(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].narrow;return""}function jO(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].abbr;return""}function MO(){var e,t,r,n,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(r=s[e].since<=s[e].until?1:-1,n=this.clone().startOf("day").valueOf(),s[e].since<=n&&n<=s[e].until||s[e].until<=n&&n<=s[e].since)return(this.year()-R(s[e].since).year())*r+s[e].offset;return this.year()}function TO(e){return ye(this,"_erasNameRegex")||sl.call(this),e?this._erasNameRegex:this._erasRegex}function DO(e){return ye(this,"_erasAbbrRegex")||sl.call(this),e?this._erasAbbrRegex:this._erasRegex}function PO(e){return ye(this,"_erasNarrowRegex")||sl.call(this),e?this._erasNarrowRegex:this._erasRegex}function nl(e,t){return t.erasAbbrRegex(e)}function AO(e,t){return t.erasNameRegex(e)}function RO(e,t){return t.erasNarrowRegex(e)}function IO(e,t){return t._eraYearOrdinalRegex||un}function sl(){var e=[],t=[],r=[],n=[],s,i,a,o,c,d=this.eras();for(s=0,i=d.length;s<i;++s)a=Ft(d[s].name),o=Ft(d[s].abbr),c=Ft(d[s].narrow),t.push(a),e.push(o),r.push(c),n.push(a),n.push(o),n.push(c);this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}q(0,["gg",2],0,function(){return this.weekYear()%100});q(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Yi(e,t){q(0,[e,e.length],0,t)}Yi("gggg","weekYear");Yi("ggggg","weekYear");Yi("GGGG","isoWeekYear");Yi("GGGGG","isoWeekYear");V("G",Ui);V("g",Ui);V("GG",Me,nt);V("gg",Me,nt);V("GGGG",Yo,Wo);V("gggg",Yo,Wo);V("GGGGG",$i,Ii);V("ggggg",$i,Ii);ts(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=pe(e)});ts(["gg","GG"],function(e,t,r,n){t[n]=R.parseTwoDigitYear(e)});function FO(e){return Op.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function $O(e){return Op.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function UO(){return $t(this.year(),1,4)}function VO(){return $t(this.isoWeekYear(),1,4)}function zO(){var e=this.localeData()._week;return $t(this.year(),e.dow,e.doy)}function BO(){var e=this.localeData()._week;return $t(this.weekYear(),e.dow,e.doy)}function Op(e,t,r,n,s){var i;return e==null?Vn(this,n,s).year:(i=$t(e,n,s),t>i&&(t=i),WO.call(this,e,t,r,n,s))}function WO(e,t,r,n,s){var i=sp(e,t,r,n,s),a=Un(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}q("Q",0,"Qo","quarter");V("Q",Gh);ke("Q",function(e,t){t[Rt]=(pe(e)-1)*3});function YO(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}q("D",["DD",2],"Do","date");V("D",Me,dn);V("DD",Me,nt);V("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});ke(["D","DD"],Et);ke("Do",function(e,t){t[Et]=pe(e.match(Me)[0])});var _p=fn("Date",!0);q("DDD",["DDDD",3],"DDDo","dayOfYear");V("DDD",Fi);V("DDDD",qh);ke(["DDD","DDDD"],function(e,t,r){r._dayOfYear=pe(e)});function HO(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}q("m",["mm",2],0,"minute");V("m",Me,Ho);V("mm",Me,nt);ke(["m","mm"],pt);var GO=fn("Minutes",!1);q("s",["ss",2],0,"second");V("s",Me,Ho);V("ss",Me,nt);ke(["s","ss"],It);var qO=fn("Seconds",!1);q("S",0,0,function(){return~~(this.millisecond()/100)});q(0,["SS",2],0,function(){return~~(this.millisecond()/10)});q(0,["SSS",3],0,"millisecond");q(0,["SSSS",4],0,function(){return this.millisecond()*10});q(0,["SSSSS",5],0,function(){return this.millisecond()*100});q(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});q(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});q(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});q(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});V("S",Fi,Gh);V("SS",Fi,nt);V("SSS",Fi,qh);var tr,Cp;for(tr="SSSS";tr.length<=9;tr+="S")V(tr,un);function ZO(e,t){t[yr]=pe(("0."+e)*1e3)}for(tr="S";tr.length<=9;tr+="S")ke(tr,ZO);Cp=fn("Milliseconds",!1);q("z",0,0,"zoneAbbr");q("zz",0,0,"zoneName");function KO(){return this._isUTC?"UTC":""}function JO(){return this._isUTC?"Coordinated Universal Time":""}var P=Qn.prototype;P.add=B4;P.calendar=K4;P.clone=J4;P.diff=sO;P.endOf=pO;P.format=lO;P.from=cO;P.fromNow=uO;P.to=dO;P.toNow=fO;P.get=ok;P.invalidAt=SO;P.isAfter=X4;P.isBefore=Q4;P.isBetween=eO;P.isSame=tO;P.isSameOrAfter=rO;P.isSameOrBefore=nO;P.isValid=wO;P.lang=bp;P.locale=xp;P.localeData=wp;P.max=w4;P.min=b4;P.parsingFlags=EO;P.set=lk;P.startOf=hO;P.subtract=W4;P.toArray=yO;P.toObject=xO;P.toDate=vO;P.toISOString=aO;P.inspect=oO;typeof Symbol<"u"&&Symbol.for!=null&&(P[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});P.toJSON=bO;P.toString=iO;P.unix=gO;P.valueOf=mO;P.creationData=kO;P.eraName=LO;P.eraNarrow=NO;P.eraAbbr=jO;P.eraYear=MO;P.year=Jh;P.isLeapYear=ak;P.weekYear=FO;P.isoWeekYear=$O;P.quarter=P.quarters=YO;P.month=rp;P.daysInMonth=vk;P.week=P.weeks=Ok;P.isoWeek=P.isoWeeks=_k;P.weeksInYear=zO;P.weeksInWeekYear=BO;P.isoWeeksInYear=UO;P.isoWeeksInISOWeekYear=VO;P.date=_p;P.day=P.days=$k;P.weekday=Uk;P.isoWeekday=Vk;P.dayOfYear=HO;P.hour=P.hours=qk;P.minute=P.minutes=GO;P.second=P.seconds=qO;P.millisecond=P.milliseconds=Cp;P.utcOffset=j4;P.utc=T4;P.local=D4;P.parseZone=P4;P.hasAlignedHourOffset=A4;P.isDST=R4;P.isLocal=F4;P.isUtcOffset=$4;P.isUtc=mp;P.isUTC=mp;P.zoneAbbr=KO;P.zoneName=JO;P.dates=dt("dates accessor is deprecated. Use date instead.",_p);P.months=dt("months accessor is deprecated. Use month instead",rp);P.years=dt("years accessor is deprecated. Use year instead",Jh);P.zone=dt("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",M4);P.isDSTShifted=dt("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",I4);function XO(e){return je(e*1e3)}function QO(){return je.apply(null,arguments).parseZone()}function Lp(e){return e}var xe=Vo.prototype;xe.calendar=FS;xe.longDateFormat=zS;xe.invalidDate=WS;xe.ordinal=GS;xe.preparse=Lp;xe.postformat=Lp;xe.relativeTime=ZS;xe.pastFuture=KS;xe.set=RS;xe.eras=OO;xe.erasParse=_O;xe.erasConvertYear=CO;xe.erasAbbrRegex=DO;xe.erasNameRegex=TO;xe.erasNarrowRegex=PO;xe.months=hk;xe.monthsShort=pk;xe.monthsParse=gk;xe.monthsRegex=xk;xe.monthsShortRegex=yk;xe.week=wk;xe.firstDayOfYear=kk;xe.firstDayOfWeek=Sk;xe.weekdays=Pk;xe.weekdaysMin=Rk;xe.weekdaysShort=Ak;xe.weekdaysParse=Fk;xe.weekdaysRegex=zk;xe.weekdaysShortRegex=Bk;xe.weekdaysMinRegex=Wk;xe.isPM=Hk;xe.meridiem=Zk;function hi(e,t,r,n){var s=Bt(),i=_t().set(n,t);return s[r](i,e)}function Np(e,t,r){if(Vt(e)&&(t=e,e=void 0),e=e||"",t!=null)return hi(e,t,r,"month");var n,s=[];for(n=0;n<12;n++)s[n]=hi(e,n,r,"month");return s}function il(e,t,r,n){typeof e=="boolean"?(Vt(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,Vt(t)&&(r=t,t=void 0),t=t||"");var s=Bt(),i=e?s._week.dow:0,a,o=[];if(r!=null)return hi(t,(r+i)%7,n,"day");for(a=0;a<7;a++)o[a]=hi(t,(a+i)%7,n,"day");return o}function e_(e,t){return Np(e,t,"months")}function t_(e,t){return Np(e,t,"monthsShort")}function r_(e,t,r){return il(e,t,r,"weekdays")}function n_(e,t,r){return il(e,t,r,"weekdaysShort")}function s_(e,t,r){return il(e,t,r,"weekdaysMin")}sr("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=pe(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}});R.lang=dt("moment.lang is deprecated. Use moment.locale instead.",sr);R.langData=dt("moment.langData is deprecated. Use moment.localeData instead.",Bt);var jt=Math.abs;function i_(){var e=this._data;return this._milliseconds=jt(this._milliseconds),this._days=jt(this._days),this._months=jt(this._months),e.milliseconds=jt(e.milliseconds),e.seconds=jt(e.seconds),e.minutes=jt(e.minutes),e.hours=jt(e.hours),e.months=jt(e.months),e.years=jt(e.years),this}function jp(e,t,r,n){var s=xt(t,r);return e._milliseconds+=n*s._milliseconds,e._days+=n*s._days,e._months+=n*s._months,e._bubble()}function a_(e,t){return jp(this,e,t,1)}function o_(e,t){return jp(this,e,t,-1)}function dd(e){return e<0?Math.floor(e):Math.ceil(e)}function l_(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,s,i,a,o,c;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=dd(Qa(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,s=lt(e/1e3),n.seconds=s%60,i=lt(s/60),n.minutes=i%60,a=lt(i/60),n.hours=a%24,t+=lt(a/24),c=lt(Mp(t)),r+=c,t-=dd(Qa(c)),o=lt(r/12),r%=12,n.days=t,n.months=r,n.years=o,this}function Mp(e){return e*4800/146097}function Qa(e){return e*146097/4800}function c_(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=ft(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+Mp(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Qa(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+e)}}function Wt(e){return function(){return this.as(e)}}var Tp=Wt("ms"),u_=Wt("s"),d_=Wt("m"),f_=Wt("h"),h_=Wt("d"),p_=Wt("w"),m_=Wt("M"),g_=Wt("Q"),v_=Wt("y"),y_=Tp;function x_(){return xt(this)}function b_(e){return e=ft(e),this.isValid()?this[e+"s"]():NaN}function Dr(e){return function(){return this.isValid()?this._data[e]:NaN}}var w_=Dr("milliseconds"),E_=Dr("seconds"),S_=Dr("minutes"),k_=Dr("hours"),O_=Dr("days"),__=Dr("months"),C_=Dr("years");function L_(){return lt(this.days()/7)}var Mt=Math.round,Wr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function N_(e,t,r,n,s){return s.relativeTime(t||1,!!r,e,n)}function j_(e,t,r,n){var s=xt(e).abs(),i=Mt(s.as("s")),a=Mt(s.as("m")),o=Mt(s.as("h")),c=Mt(s.as("d")),d=Mt(s.as("M")),f=Mt(s.as("w")),h=Mt(s.as("y")),p=i<=r.ss&&["s",i]||i<r.s&&["ss",i]||a<=1&&["m"]||a<r.m&&["mm",a]||o<=1&&["h"]||o<r.h&&["hh",o]||c<=1&&["d"]||c<r.d&&["dd",c];return r.w!=null&&(p=p||f<=1&&["w"]||f<r.w&&["ww",f]),p=p||d<=1&&["M"]||d<r.M&&["MM",d]||h<=1&&["y"]||["yy",h],p[2]=t,p[3]=+e>0,p[4]=n,N_.apply(null,p)}function M_(e){return e===void 0?Mt:typeof e=="function"?(Mt=e,!0):!1}function T_(e,t){return Wr[e]===void 0?!1:t===void 0?Wr[e]:(Wr[e]=t,e==="s"&&(Wr.ss=t-1),!0)}function D_(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=Wr,s,i;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},Wr,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),s=this.localeData(),i=j_(this,!r,n,s),r&&(i=s.pastFuture(+this,i)),s.postformat(i)}var ba=Math.abs;function Ur(e){return(e>0)-(e<0)||+e}function Hi(){if(!this.isValid())return this.localeData().invalidDate();var e=ba(this._milliseconds)/1e3,t=ba(this._days),r=ba(this._months),n,s,i,a,o=this.asSeconds(),c,d,f,h;return o?(n=lt(e/60),s=lt(n/60),e%=60,n%=60,i=lt(r/12),r%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",c=o<0?"-":"",d=Ur(this._months)!==Ur(o)?"-":"",f=Ur(this._days)!==Ur(o)?"-":"",h=Ur(this._milliseconds)!==Ur(o)?"-":"",c+"P"+(i?d+i+"Y":"")+(r?d+r+"M":"")+(t?f+t+"D":"")+(s||n||e?"T":"")+(s?h+s+"H":"")+(n?h+n+"M":"")+(e?h+a+"S":"")):"P0D"}var me=Wi.prototype;me.isValid=_4;me.abs=i_;me.add=a_;me.subtract=o_;me.as=c_;me.asMilliseconds=Tp;me.asSeconds=u_;me.asMinutes=d_;me.asHours=f_;me.asDays=h_;me.asWeeks=p_;me.asMonths=m_;me.asQuarters=g_;me.asYears=v_;me.valueOf=y_;me._bubble=l_;me.clone=x_;me.get=b_;me.milliseconds=w_;me.seconds=E_;me.minutes=S_;me.hours=k_;me.days=O_;me.weeks=L_;me.months=__;me.years=C_;me.humanize=D_;me.toISOString=Hi;me.toString=Hi;me.toJSON=Hi;me.locale=xp;me.localeData=wp;me.toIsoString=dt("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Hi);me.lang=bp;q("X",0,0,"unix");q("x",0,0,"valueOf");V("x",Ui);V("X",ek);ke("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)});ke("x",function(e,t,r){r._d=new Date(pe(e))});//! moment.js
|
|
86
|
-
R.version="2.30.1";PS(je);R.fn=P;R.min=E4;R.max=S4;R.now=k4;R.utc=_t;R.unix=XO;R.months=e_;R.isDate=Xn;R.locale=sr;R.invalid=Ri;R.duration=xt;R.isMoment=vt;R.weekdays=r_;R.parseZone=QO;R.localeData=Bt;R.isDuration=Is;R.monthsShort=t_;R.weekdaysMin=s_;R.defineLocale=Jo;R.updateLocale=Qk;R.locales=e4;R.weekdaysShort=n_;R.normalizeUnits=ft;R.relativeTimeRounding=M_;R.relativeTimeThreshold=T_;R.calendarFormat=Z4;R.prototype=P;R.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};var Pt=(e=>(e[e.STANDARD=60]="STANDARD",e[e.DOCUMENT=61]="DOCUMENT",e[e.INTERNATIONAL_DOCUMENT=62]="INTERNATIONAL_DOCUMENT",e[e.INTERNATIONAL_STANDARD=63]="INTERNATIONAL_STANDARD",e[e.ECONOMIC=64]="ECONOMIC",e[e.SAVER=70]="SAVER",e[e.NATIONAL_LOCKER=81]="NATIONAL_LOCKER",e[e.INTERNAL_MAIL=99]="INTERNAL_MAIL",e))(Pt||{}),Dp=(e=>(e[e.ANULLED=6]="ANULLED",e[e.PAID=10]="PAID",e[e.PENDING=11]="PENDING",e[e.PARTIAL_PAID=20]="PARTIAL_PAID",e[e.TO_ISSUE=59]="TO_ISSUE",e[e.ISSUED=60]="ISSUED",e))(Dp||{}),Nn=(e=>(e[e.INVOICE=2]="INVOICE",e[e.CREDIT_NOTE=4]="CREDIT_NOTE",e[e.ORDER=6]="ORDER",e))(Nn||{}),al=(e=>(e[e.CASH=1]="CASH",e[e.COD=2]="COD",e[e.CREDIT=3]="CREDIT",e[e.BOXOFFICE_CREDIT=4]="BOXOFFICE_CREDIT",e[e.DEST_BOXOFFICE_CREDIT=5]="DEST_BOXOFFICE_CREDIT",e[e.EXEMPT=6]="EXEMPT",e))(al||{}),Pp=(e=>(e[e.INTERNATIONAL=1]="INTERNATIONAL",e[e.NATIONAL=2]="NATIONAL",e))(Pp||{}),Ie=(e=>(e[e.OFFICE=10]="OFFICE",e[e.HOME=20]="HOME",e[e.INTERNATIONAL=21]="INTERNATIONAL",e))(Ie||{}),rr=(e=>(e[e.PERSON=0]="PERSON",e[e.BOX_ACCOUNT=1]="BOX_ACCOUNT",e))(rr||{});const Ap={shipper:null,consigneeType:{id:"0",value:0,label:"Persona"},consignee:null,boxAccount:null,pickupType:{id:Ie.OFFICE.toString(),value:{deliveryTypeID:Ie.OFFICE,deliveryTypeName:"Tienda"},label:"Tienda"},originStore:null,originAddress:null,deliveryType:{id:Ie.OFFICE.toString(),value:{deliveryTypeID:Ie.OFFICE,deliveryTypeName:"Tienda"},label:"Tienda"},destinationStore:null,destinationAddress:null};var gr=(e=>(e[e.ACTIVE=1]="ACTIVE",e[e.ANNULLED=3]="ANNULLED",e[e.DRAFT=5]="DRAFT",e[e.REPLACED=55]="REPLACED",e[e.DELIVERED=30]="DELIVERED",e))(gr||{});const Rp=({invoice:e,onClick:t})=>{const r=u.useMemo(()=>{switch(e.type){case Nn.INVOICE:return"Factura:";case Nn.CREDIT_NOTE:return"Nota de Crédito:";case Nn.ORDER:return"Orden:"}},[e.type]);return l.jsxs("div",{className:"border cursor-pointer border-gray-300 dark:border-gray-700 rounded-lg p-4 hover:shadow-md transition-all text-gray-800 dark:text-gray-200 bg-gray-50 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700 duration-100",onClick:t,children:[l.jsxs("div",{className:"flex items-center justify-between mb-3 gap-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(fv,{className:"w-4 h-4 text-indigo-600 dark:text-indigo-400"}),l.jsxs("span",{className:"font-semibold text-sm text-card-foreground dark:text-gray-200",children:[r," ",l.jsx("span",{className:"text-gray-900 dark:text-gray-100 font-bold",children:e.invoiceNumber})]})]}),l.jsx(Zr,{color:"primary",children:e.statusName})]}),l.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[l.jsxs("div",{className:"col-span-3 md:col-span-2",children:[l.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[l.jsx(rf,{className:"w-3 h-3 text-indigo-600 dark:text-indigo-400"}),l.jsx("h3",{className:"font-semibold text-xs text-card-foreground dark:text-gray-200",children:"Cliente"})]}),l.jsx("p",{className:"text-sm font-bold text-card-foreground dark:text-gray-100",children:e.accountFullName}),l.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground mt-0.5 text-gray-600 dark:text-gray-400",children:[l.jsx(tf,{className:"w-3 h-3"}),l.jsx("span",{className:"text-xs",children:R(e.invoiceDate).format("DD/MM/YYYY, hh:mm A")})]})]}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[l.jsx(ES,{className:"w-3 h-3 text-indigo-600 dark:text-indigo-400"}),l.jsx("h3",{className:"font-semibold text-xs text-card-foreground dark:text-gray-200",children:"Total"})]}),l.jsxs("p",{className:"text-sm font-bold text-card-foreground dark:text-indigo-400",children:["$",e.totalAmount.toFixed(2)]}),l.jsx("p",{className:"text-xs text-muted-foreground text-gray-600 dark:text-gray-400",children:"Con IVA"})]}),e.balanceAmount>=0&&l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[l.jsx(en,{className:"w-3 h-3 text-indigo-600 dark:text-indigo-400"}),l.jsx("h3",{className:"font-semibold text-xs text-card-foreground dark:text-gray-200",children:"Por Cobrar"})]}),l.jsxs("p",{className:"text-sm font-bold text-card-foreground dark:text-indigo-400",children:["$",Math.max(e.balanceAmount,0).toFixed(2)]}),l.jsx("p",{className:"text-xs text-muted-foreground text-gray-600 dark:text-gray-400",children:"Saldo pendiente"})]}),e.balanceAmount<0&&l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[l.jsx(en,{className:"w-3 h-3 text-indigo-600 dark:text-indigo-400"}),l.jsx("h3",{className:"font-semibold text-xs text-card-foreground dark:text-gray-200",children:"Reintegrar"})]}),l.jsxs("p",{className:"text-sm font-bold text-card-foreground dark:text-indigo-400",children:["$",Math.max(-e.balanceAmount,0).toFixed(2)]}),l.jsx("p",{className:"text-xs text-muted-foreground text-gray-600 dark:text-gray-400",children:"Monto a devolver"})]})]})]})};function P_(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14 3v4a1 1 0 0 0 1 1h4"},child:[]},{tag:"path",attr:{d:"M19 12v7a1.78 1.78 0 0 1 -3.1 1.4a1.65 1.65 0 0 0 -2.6 0a1.65 1.65 0 0 1 -2.6 0a1.65 1.65 0 0 0 -2.6 0a1.78 1.78 0 0 1 -3.1 -1.4v-14a2 2 0 0 1 2 -2h7l5 5v4.25"},child:[]}]})(e)}function A_(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14.916 11.707a3 3 0 1 0 -2.916 2.293"},child:[]},{tag:"path",attr:{d:"M11.991 21.485a1.994 1.994 0 0 1 -1.404 -.585l-4.244 -4.243a8 8 0 1 1 13.651 -5.351"},child:[]},{tag:"path",attr:{d:"M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"},child:[]},{tag:"path",attr:{d:"M20.2 20.2l1.8 1.8"},child:[]}]})(e)}function R_(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 20m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M10 20h-6"},child:[]},{tag:"path",attr:{d:"M14 20h6"},child:[]},{tag:"path",attr:{d:"M12 15l-2 -2h-3a1 1 0 0 1 -1 -1v-8a1 1 0 0 1 1 -1h10a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-3l-2 2z"},child:[]},{tag:"path",attr:{d:"M12 6v2"},child:[]},{tag:"path",attr:{d:"M12 11v.01"},child:[]}]})(e)}const Ip=({invoices:e,onInvoiceClick:t,wrapperClassName:r})=>l.jsx("div",{className:A("w-full mx-auto",r),children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(P_,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-lg font-bold",children:"Facturas"})]})}),l.jsx("div",{className:"p-2 md:p-4 space-y-4",children:e.map(n=>l.jsx(Rp,{invoice:n,onClick:()=>t?.(n)},n.invoiceID))})]})}),I_={category:null,weight:null,height:null,width:null,length:null,quantity:1},F_=({serviceId:e,categoryTypeId:t,formik:r,warningSchema:n})=>{const{values:s,touched:i,errors:a,handleChange:o,handleBlur:c,handleSubmit:d,setFieldValue:f}=r,h=u.useContext(on),[p,v]=u.useState(null),[m,x]=u.useState(null),[y,E]=u.useState([]),[k,O]=u.useState(""),[b,g]=u.useState({}),w=u.useMemo(()=>a,[a]);return u.useEffect(()=>{(async()=>{const C=await $h(h.api,t);C.error||!C.data||(E(C.data.map(_=>({id:_.categoryId.toString(),label:_.categoryName,value:_}))),x(C.data.find(_=>G1.includes(_.categoryId))??null),v(C.data.find(_=>H1.includes(_.categoryId))??null))})()},[t,h.api]),u.useEffect(()=>{p&&(e===Pt.DOCUMENT||e===Pt.INTERNATIONAL_DOCUMENT)?(O(p.categoryName),f("category",{id:p.categoryId.toString(),label:p.categoryName,value:p}),f("height",ua.HEIGHT),f("width",ua.WIDTH),f("length",ua.LENGTH)):(O(""),f("category",null),f("height",""),f("width",""),f("length",""))},[e,p,f]),u.useEffect(()=>{(async(C,_)=>{try{return await C.validate(_,{abortEarly:!1}),{}}catch(M){if(M instanceof ze){const D={};return M.inner.forEach(F=>{F.path&&(D[F.path]=F.message)}),D}return{}}})(n,s).then(C=>{g(C)})},[s,n]),l.jsx("div",{className:"w-full max-w-2xl",children:l.jsxs("div",{className:"space-y-6",children:[l.jsx("div",{className:"space-y-2",children:l.jsx(ct,{label:"Categoría",id:"category",name:"category",placeholder:"Seleccione una categoría",options:y,selected:s.category,searchText:k,disabled:e===Pt.DOCUMENT,error:i.category&&a.category,onSelectOption:S=>f("category",S),onBlur:c,setSearchText:O,footerOption:m?{label:m.categoryName,id:m.categoryId.toString(),value:m}:void 0})}),l.jsxs("div",{className:A("space-y-2",{hidden:e===Pt.DOCUMENT}),children:[l.jsx("h4",{className:"text-gray-700 dark:text-white",children:"Dimensiones en cm."}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[l.jsx("div",{className:"space-y-2",children:l.jsx(Be,{label:"Altura",id:"height",name:"height",type:"number",step:"0.01",placeholder:"0.00",value:s.height??"",onChange:o,onBlur:c,error:i.height&&a.height})}),l.jsx("div",{className:"space-y-2",children:l.jsx(Be,{label:"Ancho",id:"width",name:"width",type:"number",step:"0.01",placeholder:"0.00",value:s.width??"",onChange:o,onBlur:c,error:i.width&&a.width})}),l.jsx("div",{className:"space-y-2",children:l.jsx(Be,{label:"Largo",id:"length",name:"length",type:"number",step:"0.01",placeholder:"0.00",value:s.length??"",onChange:o,onBlur:c,error:i.length&&a.length})})]})]}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[l.jsx("div",{className:"space-y-2",children:l.jsx(Be,{label:"Peso (kg)",id:"weight",name:"weight",type:"number",step:"0.01",placeholder:"0.00",value:s.weight??"",onChange:o,onBlur:c,error:i.weight&&a.weight})}),l.jsx("div",{className:"space-y-2",children:l.jsx(sh,{label:"Cantidad",id:"quantity",name:"quantity",min:"1",value:s.quantity,disabled:e===Pt.DOCUMENT,onChange:o,onBlur:c,error:i.quantity&&a.quantity})})]}),l.jsxs("div",{className:"flex flex-col gap-2",children:[b.totalWeightWarn&&l.jsx(Qd,{description:b.totalWeightWarn}),w.totalWeightError&&l.jsx(En,{description:w.totalWeightError}),w.minVolumeError&&l.jsx(En,{description:w.minVolumeError}),w.maxVolumeError&&l.jsx(En,{description:w.maxVolumeError}),w.densityError&&l.jsx(En,{description:w.densityError})]}),l.jsx(rt,{type:"submit",className:"w-full",onClick:()=>d(),children:"+ Agregar"})]})})},$_=({serviceId:e,categoryTypeId:t,totalWeight:r,validationConfig:n,onSubmit:s})=>{const i=u.useMemo(()=>{const{minWeight:o=0,minVolume:c,maxVolume:d,minDensity:f,maxDensity:h,maxDocumentWeight:p=1/0,maxTotalWeight:v=1/0}=n??{};let{maxWeight:m=1/0}=n??{};return(e===Pt.DOCUMENT||e===Pt.INTERNATIONAL_DOCUMENT)&&(m=p),ar({category:ir().nullable().required("La categoría es requerida"),weight:ht().typeError("Debe ser un número").required("El peso es requerido").test({name:"min-weight",exclusive:!1,test:x=>x==null||x>=o,message:`El peso mínimo es ${o.toFixed(2)}kg`}).test({name:"max-weight",exclusive:!1,test:x=>x==null||x<=m,message:`El peso máximo es ${m.toFixed(2)}kg`}),height:ht().typeError("Debe ser un número").integer("Debe ser un número entero").positive("Debe ser mayor a 0").required("La altura es requerida"),width:ht().typeError("Debe ser un número").integer("Debe ser un número entero").positive("Debe ser mayor a 0").required("El ancho es requerido"),length:ht().typeError("Debe ser un número").integer("Debe ser un número entero").positive("Debe ser mayor a 0").required("El largo es requerido"),quantity:ht().typeError("Debe ser un número").integer("Debe ser un número entero").min(1,"Debe ser al menos 1").required("La cantidad es requerida")}).test({name:"total-weight-check-global",test:function(x){const{weight:y,quantity:E}=x;if(y===null||r===void 0)return!0;const k=y*E,O=r+k;return v!==void 0&&O>v?this.createError({path:"totalWeightError",message:`El peso total (${O.toFixed(2)}kg) excede el máximo (${v.toFixed(2)}kg)`}):!0}}).test({name:"volume-check",test:function(x){const{height:y,width:E,length:k}=x;if(y===null||E===null||k===null)return!0;const O=y*E*k;return c!==void 0&&O<c?this.createError({path:"minVolumeError",message:`El volumen (${O.toFixed(2)}cm³) es menor al mínimo (${c.toFixed(2)}cm³)`}):d!==void 0&&O>d?this.createError({path:"maxVolumeError",message:`El volumen (${O.toFixed(2)}cm³) es mayor al máximo (${d.toFixed(2)}cm³)`}):!0}}).test({name:"density-check",test:function(x){const{height:y,width:E,length:k,weight:O}=x;if(y===null||E===null||k===null||O===null)return!0;const b=y*E*k;if(b===0)return!0;const g=O/b;return f!==void 0&&g<f||h!==void 0&&g>h?this.createError({path:"densityError",message:"Las medidas son inválidas, por favor revíselas y corríjalas"}):!0}})},[n,r,e]),a=u.useMemo(()=>{const{maxTotalWeightWarn:o=1/0}=n??{};return ar({category:ir().nullable().required(),weight:ht().required(),height:ht().required(),width:ht().required(),length:ht().required(),quantity:ht().required()}).test({name:"total-weight-check-global-warn",test:function(c){const{weight:d,quantity:f}=c;if(!d||!f||r===void 0)return!0;const h=d*f,p=r+h;return o!==void 0&&p>o?this.createError({path:"totalWeightWarn",message:`El peso total (${p.toFixed(2)}kg) excede el recomendado (${o.toFixed(2)}kg)`}):!0}})},[n,r]);return l.jsx(Jn,{initialValues:I_,validationSchema:i,onSubmit:s,children:o=>l.jsx(F_,{serviceId:e,categoryTypeId:t,formik:o,warningSchema:a})})},Fp=({parcel:e,index:t,checked:r,editable:n,editing:s,disabledActions:i,onChangeChecked:a,onPrintParcel:o,onDuplicate:c,onEdit:d})=>l.jsxs("tr",{className:A("hover:bg-gray-300 dark:hover:bg-gray-600 transition-colors duration-100 font-normal text-xs h-12",s&&"border-2 border-indigo-600 dark:border-indigo-400",t%2===0?"bg-gray-100 dark:bg-gray-700":"bg-gray-200 dark:bg-gray-800"),children:[l.jsxs("td",{className:"text-muted-foreground px-3 sm:px-4 font-bold",children:[n&&l.jsx(mi,{label:"",id:`parcel-${e.pieceNumber}-checkbox`,checked:r,disabled:i,onChangeChecked:a}),!n&&e.pieceNumber]}),l.jsxs("td",{className:"sm:hidden px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 truncate font-semibold",children:[l.jsxs("p",{children:[e.weight.toFixed(2)," kg"]}),l.jsxs("p",{children:[e.length,"x",e.width,"x",e.height," cm"]}),l.jsx("p",{className:"font-normal",children:e.contentDescription})]}),l.jsxs("td",{className:"hidden sm:table-cell px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 truncate font-semibold",children:[e.weight.toFixed(2)," kg"]}),l.jsxs("td",{className:"hidden sm:table-cell px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 truncate font-semibold",children:[e.length,"x",e.width,"x",e.height," cm"]}),l.jsx("td",{className:"hidden sm:table-cell text-muted-foreground px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3",children:e.contentDescription}),l.jsxs("td",{className:"text-right px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3",children:[n&&!i&&l.jsxs("div",{className:"flex gap-2 items-cetner justify-end",children:[l.jsx("button",{type:"button",className:"inline-flex items-center justify-center h-6 w-6 sm:h-8 sm:w-8 rounded hover:bg-indigo-100 dark:hover:bg-indigo-800 transition-colors text-indigo-600 dark:text-indigo-300 hover:text-indigo-900 dark:hover:text-white cursor-pointer",title:"Acciones",onClick:c,children:l.jsx(OS,{className:"h-4 w-4"})}),l.jsx("button",{type:"button",className:"inline-flex items-center justify-center h-6 w-6 sm:h-8 sm:w-8 rounded hover:bg-indigo-100 dark:hover:bg-indigo-800 transition-colors text-indigo-600 dark:text-indigo-300 hover:text-indigo-900 dark:hover:text-white cursor-pointer",title:"Acciones",onClick:d,children:l.jsx(Vh,{className:"h-4 w-4"})})]}),!n&&!i&&l.jsx("button",{type:"button",className:"inline-flex items-center justify-center h-8 w-8 rounded hover:bg-indigo-100 dark:hover:bg-indigo-800 transition-colors text-indigo-600 dark:text-indigo-300 hover:text-indigo-900 dark:hover:text-white cursor-pointer",title:"Imprimir",onClick:o,children:l.jsx(NS,{className:"h-4 w-4"})}),s&&l.jsx("span",{className:"italic",children:"Editando"})]})]}),$p=({parcels:e,totalPhysicalWeight:t,totalDimensionalWeight:r,totalChargedWeight:n,totalVolume:s,dimensionalFactor:i,editingParcel:a,editable:o,onPrintParcel:c,onDelete:d,onDuplicate:f,onSelectEdit:h,onCancelEdit:p,onPrintShipment:v,wrapperClassName:m})=>{const[x,y]=u.useState([]),E=u.useMemo(()=>x.every(b=>b),[x]),k=(b,g)=>{y(w=>[...w.slice(0,g),b,...w.slice(g+1)])},O=()=>{y(E?Array.from({length:e.length},()=>!1):Array.from({length:e.length},()=>!0))};return u.useEffect(()=>{y(Array.from({length:e.length},()=>!1))},[e.length,a]),l.jsx("div",{className:A("w-full mx-auto",m),children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(en,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-xl font-bold",children:"Piezas"})]})}),l.jsxs("div",{className:"p-4",children:[l.jsxs(vi,{children:[l.jsx("thead",{className:"sticky top-0 z-10 bg-gray-50 dark:bg-gray-800",children:l.jsxs("tr",{className:"border-b-2",children:[l.jsxs("th",{className:"w-16 font-bold text-xs uppercase tracking-wider text-left px-3 sm:px-4 py-2",children:[o&&l.jsx(mi,{label:"",id:"parcel-table-all-checked-checkbox",checked:E,disabled:!!a,onChangeChecked:O}),!o&&"#"]}),l.jsx("th",{className:"sm:hidden text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(X0,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Pieza"})]})}),l.jsx("th",{className:"hidden sm:table-cell text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(DS,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Peso"})]})}),l.jsx("th",{className:"hidden sm:table-cell text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(jS,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Dimensiones"})]})}),l.jsx("th",{className:"hidden sm:table-cell text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(jd,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Categoría"})]})}),l.jsx("th",{className:"w-24 text-right text-xs uppercase font-semibold tracking-wider px-4 py-2",children:l.jsxs("div",{className:"flex items-center w-full justify-end gap-2",children:[l.jsx(CS,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{className:"hidden sm:inline-block",children:"Acciones"})]})})]})}),l.jsx("tbody",{children:e.map((b,g)=>l.jsx(Fp,{parcel:b,index:g,editing:a?.pieceNumber===b.pieceNumber,checked:x[g],disabledActions:!!a,onChangeChecked:w=>k(w,g),onPrintParcel:()=>c?.(b),onDuplicate:()=>f?.(b),onEdit:()=>h?.(b),editable:o},b.pieceNumber))})]}),l.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-between text-xs mt-4",children:[l.jsxs("div",{className:"flex flex-col sm:block w-full sm:w-fit justify-center items-center",children:[!o&&v&&l.jsxs(rt,{className:"w-full md:w-36",onClick:v,children:[l.jsx(av,{className:"w-4 h-4 inline mr-2"}),"Imprimir Guía"]}),o&&!a&&l.jsxs(Tn,{className:"!w-full my-2 sm:my-0",disabled:x.every(b=>!b),onClick:()=>d?.(e.filter((b,g)=>x[g])),children:[l.jsx(U0,{className:"mr-2 w-4 h-4"}),"Eliminar"]}),!!a&&l.jsxs(Tn,{onClick:p,children:[l.jsx(Td,{className:"mr-2 w-5 h-5"}),"Cancelar Edición"]})]}),l.jsxs("div",{className:"space-y-1 text-gray-800 dark:text-gray-300",children:[l.jsxs("div",{className:"flex items-center justify-between gap-12",children:[l.jsx("span",{className:"text-muted-foreground font-semibold",children:"Peso por facturar"}),l.jsxs("span",{className:"font-bold text-indigo-600 dark:text-indigo-400 truncate",children:[n.toFixed(2)," kg"]})]}),l.jsx(Kr,{}),l.jsxs("div",{className:"flex items-center justify-between gap-12",children:[l.jsx("span",{className:"text-muted-foreground",children:"Peso físico"}),l.jsxs("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:[t.toFixed(2)," kg"]})]}),l.jsxs("div",{className:"flex items-center justify-between gap-12",children:[l.jsx("span",{className:"text-muted-foreground",children:"Peso volumétrico"}),l.jsxs("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:[r.toFixed(2)," kg"]})]}),l.jsxs("div",{className:"flex items-center justify-between gap-12",children:[l.jsx("span",{className:"text-muted-foreground",children:"Volumen"}),l.jsxs("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:[s.toFixed(2)," cm",l.jsx("sup",{children:"3"})]})]}),l.jsxs("div",{className:"flex items-center justify-between gap-12",children:[l.jsx("span",{className:"text-muted-foreground",children:"Factor volumétrico"}),l.jsx("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:i.toFixed(2)})]})]})]})]})]})})},eo=({isShipper:e=!1,account:t,store:r,deliveryType:n,isAccountBillTo:s,address:i})=>{const a=u.useMemo(()=>n===Ie.HOME&&e?"Recolecta":n===Ie.HOME&&!e?"A Domicilio":"En Tienda",[e,n]);return l.jsxs("div",{children:[l.jsxs("div",{className:"mb-2 flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-600/10 dark:bg-indigo-900 p-2",children:l.jsx(rf,{className:"h-5 w-5 text-indigo-600 dark:text-indigo-300"})}),l.jsxs("div",{children:[l.jsx("h2",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:e?"Remitente":"Destinatario"}),s&&l.jsx(Zr,{color:"primary",children:"Cuenta a facturar"})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("div",{children:l.jsx("p",{className:"text-lg font-bold text-div-foreground text-gray-900 dark:text-gray-200",children:t.fullName})}),l.jsx(Kr,{className:"my-2"}),l.jsxs("div",{className:"space-y-1.5 text-xs",children:[l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[l.jsx(SS,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsxs("span",{className:"font-mono",children:[t.taxIdentificationType,"-",t.identificationNumber]})]}),l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[l.jsx(Ym,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:t.email})]}),l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[l.jsx(LS,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:t.phone})]}),l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[l.jsx(Md,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:a})]}),l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[l.jsx(MS,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsxs("span",{children:[r.code," - ",r.commercialName]})]}),i&&n===Ie.HOME&&l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[l.jsx(_S,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:i.addressLine1})]})]})]})]})},Up=({shipment:e,wrapperClassName:t})=>{const r=u.useMemo(()=>{const n={lat:e.originAddress.latitude,lng:e.originAddress.longitude,name:`Origen (${e.pickupType.deliveryTypeID===Ie.OFFICE?"En Tienda":"Recolecta"})`},s={lat:e.destinationAddress.latitude,lng:e.destinationAddress.longitude,name:`Destino (${e.deliveryType.deliveryTypeID===Ie.OFFICE?"En Tienda":"A Domicilio"})`};return[n,s]},[e]);return l.jsx("div",{className:A("w-full mx-auto",t),children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg w-full h-full flex flex-col",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(Zd,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-xl font-bold",children:"Ruta"})]})}),l.jsxs("div",{className:"flex flex-col p-4 w-full h-full flex-1 gap-2",children:[l.jsx("div",{className:"w-full h-full",children:l.jsx(Jd,{coordinates:r})}),l.jsxs("p",{className:"text-xs text-gray-800 dark:text-gray-300",children:["Ubicación actual:"," ",l.jsxs("span",{className:"font-semibold",children:[e.lastKnowStoreLocation.code," -"," ",e.lastKnowStoreLocation.commercialName]})]}),l.jsx("div",{className:"flex items-center justify-center w-full text-center",children:l.jsx(Ae,{children:"Agregar recargo por entrega a domicilio"})})]})]})})},Vp=[{id:Ie.OFFICE.toString(),label:"Tienda",value:{deliveryTypeID:Ie.OFFICE,deliveryTypeName:"Tienda"}},{id:Ie.HOME.toString(),label:"A Domicilio",value:{deliveryTypeID:Ie.HOME,deliveryTypeName:"A Domicilio"}}],U_=[...Vp,{id:Ie.INTERNATIONAL.toString(),label:"Internacional",value:{deliveryTypeID:Ie.INTERNATIONAL,deliveryTypeName:"Internacional"}}],zp=({formik:e})=>{const{values:t,touched:r,errors:n,handleBlur:s,setFieldValue:i}=e,{store:a}=u.useContext(go),o=d=>{i("pickupType",d),d.value.deliveryTypeID===Ie.OFFICE?(i("originStore",a),i("originAddress",a?.address??null)):(i("originStore",null),i("originAddress",null))},c=d=>{i("deliveryType",d),i("destinationStore",null),i("destinationAddress",null)};return l.jsx("div",{className:"w-full mx-auto",children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(A_,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-lg font-bold",children:"Direcciones"})]})}),l.jsxs("div",{className:"flex flex-col w-full gap-4 p-4",children:[l.jsxs("div",{className:"flex-1",children:[l.jsxs("div",{className:"flex items-center gap-8 pr-2 justify-between text-sm font-medium leading-6 text-gray-700 truncate dark:text-gray-200",children:[l.jsxs("p",{children:["Origen ",l.jsx("span",{className:"text-red-500",children:"*"})]}),l.jsx("div",{className:"mb-1",children:l.jsx(oi,{id:"pickupType",name:"pickupType",label:"",options:Vp,selected:t.pickupType,onSelectOption:o,onBlur:s,wrapperClassName:"flex-row"})})]}),l.jsx("div",{className:"w-full",children:t.pickupType?.value.deliveryTypeID===Ie.OFFICE&&l.jsx(ct,{disabled:!0,label:"",id:"originStore",name:"originStore",placeholder:"Seleccione una tienda",options:[],selected:t.originStore,searchText:t.originStore?.value.commercialName,error:r.originStore&&n.originStore,onSelectOption:()=>{},onBlur:s})})]}),l.jsx("div",{className:"flex-1",children:l.jsxs("div",{className:"flex items-center gap-8 pr-2 justify-between text-sm font-medium leading-6 text-gray-700 truncate dark:text-gray-200",children:[l.jsxs("p",{children:["Destino ",l.jsx("span",{className:"text-red-500",children:"*"})]}),l.jsx("div",{className:"mb-1",children:l.jsx(oi,{id:"deliveryType",name:"deliveryType",label:"",options:U_,selected:t.deliveryType,onSelectOption:c,onBlur:s,wrapperClassName:"flex-row"})})]})})]})]})})},Bp=({user:e,date:t,observation:r,wrapperClassName:n})=>l.jsxs("div",{className:A("flex flex-col gap-6 rounded-lg border p-6 border-gray-300 dark:border-gray-700 text-gray-800 dark:text-gray-300 bg-gray-50 dark:bg-gray-800 max-w-full",n),children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-600/60 dark:bg-indigo-300/20 p-2 backdrop-blur-sm text-gray-100",children:l.jsx(Hm,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-lg font-bold",children:"Entrega"})]}),l.jsxs("div",{className:"space-y-0.5",children:[l.jsxs("div",{children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:"Usuario: "}),l.jsx("span",{className:"text-sm text-muted-foreground",children:e})]}),l.jsxs("div",{children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:"Fecha: "}),l.jsx("span",{className:"text-sm text-muted-foreground",children:R(t).format("DD/MM/YYYY, hh:mm A")})]}),l.jsxs("div",{children:[l.jsxs("span",{className:"text-sm font-medium text-foreground",children:["Observaciones:"," "]}),l.jsx("span",{className:"text-sm text-muted-foreground",children:r||"—"})]})]})]}),V_=e=>{switch(e){case gr.ACTIVE:return"primary";case gr.ANNULLED:return"danger";case gr.DELIVERED:return"success";case gr.DRAFT:return"warning";case gr.REPLACED:default:return"default"}},Wp=({shipment:e,onSubstituteForClick:t,onSubstitutedByClick:r})=>l.jsx("div",{className:"bg-gradient-subtle",children:l.jsxs("div",{className:"mx-auto max-w-6xl",children:[l.jsx("div",{className:"mb-6 overflow-hidden border-none shadow-lg",children:l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 p-6 dark:from-indigo-800 dark:to-indigo-600",children:l.jsxs("div",{className:"flex relative items-start justify-between",children:[l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-3 backdrop-blur-sm hidden md:block",children:l.jsx(en,{className:"h-8 w-8"})}),l.jsxs("div",{children:[l.jsx("p",{className:"mb-1 text-sm font-medium opacity-90",children:"Número de Guía"}),l.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:e.shipmentNumber}),l.jsxs("p",{className:"mt-2 text-sm opacity-90",children:["Creación:"," ",R(e.shipmentHeaderDate).format("DD/MM/YYYY, hh:mm A")]}),l.jsxs("p",{className:A("text-sm",!e.substituteFor&&"hidden"),children:["Sustituto de:"," ",l.jsx(Ae,{className:"text-white hover:text-white/80 underline dark:no-underline font-semibold",onClick:t,children:e.substituteFor})]}),l.jsxs("p",{className:A("text-sm",!e.substitutedBy&&"hidden"),children:["Sustituido por:"," ",l.jsx(Ae,{className:"text-white hover:text-white/80 underline dark:no-underline font-semibold",onClick:r,children:e.substitutedBy})]})]})]}),l.jsx(Zr,{color:V_(e.status.id),className:"!text-base absolute top-0 right-0",children:e.status.name})]})})}),l.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[l.jsx("div",{className:"lg:col-span-2",children:l.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[l.jsx("div",{className:"border-none shadow-md transition-all hover:shadow-xl p-6 bg-gray-100 dark:bg-gray-800 rounded-lg",children:l.jsx(eo,{isShipper:!0,account:e.shipper,store:e.originStore,deliveryType:e.pickupType.deliveryTypeID,isAccountBillTo:e.billTo.id===e.shipper.id,address:e.originAddress})}),l.jsx("div",{className:"border-none shadow-md transition-all hover:shadow-xl p-6 bg-gray-100 dark:bg-gray-800 rounded-lg",children:l.jsx(eo,{account:e.consignee,store:e.destinationStore,deliveryType:e.deliveryType.deliveryTypeID,isAccountBillTo:e.billTo.id===e.consignee.id,address:e.destinationAddress})})]})}),l.jsx("div",{className:"lg:col-span-1",children:l.jsxs("div",{className:"sticky top-8 border-none shadow-lg bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-400 rounded-b-lg",children:[l.jsx("div",{className:"bg-indigo-600 text-gray-100 dark:bg-indigo-700 p-4",children:l.jsxs("h2",{className:"flex items-center gap-2 text-lg font-semibold",children:[l.jsx(en,{className:"h-5 w-5"}),"Resumen"]})}),l.jsxs("div",{className:"p-6",children:[l.jsxs("div",{className:"gap-2 mb-2",children:[l.jsx("p",{className:"text-sm text-muted-foreground",children:"Servicio"}),l.jsx("p",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:e.service.serviceShortName})]}),l.jsxs("div",{className:"gap-2 mb-2",children:[l.jsx("p",{className:"text-sm text-muted-foreground",children:"Modalidad de Pago"}),l.jsx("p",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:e.paymentMode.paymentModeName})]}),e.paymentMode.paymentModeID===al.CREDIT&&l.jsxs("div",{className:"gap-2",children:[l.jsx("p",{className:"text-sm text-muted-foreground",children:"Crédito de"}),l.jsx("p",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:e.billTo.fullName})]}),l.jsx(Kr,{className:"my-4"}),l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-sm text-muted-foreground",children:"Con impuestos"}),l.jsxs("span",{className:"text-lg font-bold text-indigo-600 dark:text-indigo-400",children:["$",e.totalAmount.toFixed(2)]})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-sm text-muted-foreground",children:"Nº de piezas"}),l.jsx("span",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:e.totalPieces})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-sm text-muted-foreground",children:"Peso por facturar"}),l.jsxs("span",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:[e.totalChargedWeight.toFixed(2)," Kg"]})]})]})]})]})})]})]})}),Yp=({item:e,index:t})=>l.jsxs("tr",{className:A("hover:bg-gray-300 dark:hover:bg-gray-600 transition-colors duration-100 font-normal text-xs h-12",t%2===0?"bg-gray-100 dark:bg-gray-700":"bg-gray-200 dark:bg-gray-800"),children:[l.jsxs("td",{className:"text-muted-foreground px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 font-semibold",children:[l.jsx("p",{children:e.itemDescription}),l.jsx("p",{className:"sm:hidden font-normal",children:e.itemDetails})]}),l.jsx("td",{className:"hidden sm:table-cell text-muted-foreground px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3",children:e.itemDetails}),l.jsxs("td",{className:"px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 truncate font-semibold text-right text-sm",children:[e.subTotalAmount<0&&"-","$",Math.abs(e.subTotalAmount).toFixed(2)]})]}),Hp=({items:e,subTotalAmount:t,vatAmount:r,postalTaxAmount:n,totalAmount:s,wrapperClassName:i})=>l.jsx("div",{className:A("w-full mx-auto",i),children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(nv,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-xl font-bold",children:"Items"})]})}),l.jsxs("div",{className:"p-4",children:[l.jsxs(vi,{children:[l.jsx("thead",{className:"sticky top-0 z-10 bg-gray-50 dark:bg-gray-800",children:l.jsxs("tr",{className:"border-b-2",children:[l.jsx("th",{className:"text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(jd,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Servicio"})]})}),l.jsx("th",{className:"hidden sm:table-cell text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(rv,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Detalles"})]})}),l.jsx("th",{className:"w-24 text-right text-xs uppercase font-semibold tracking-wider px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(kS,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Costo"})]})})]})}),l.jsx("tbody",{children:e.map((a,o)=>l.jsx(Yp,{item:a,index:o},a.itemID))})]}),l.jsx("div",{className:"flex flex-col sm:flex-row gap-4 justify-end text-sm mt-4",children:l.jsxs("div",{className:"space-y-1 text-gray-800 dark:text-gray-300",children:[l.jsxs("div",{className:"flex items-center justify-between gap-16",children:[l.jsx("span",{className:"text-muted-foreground font-semibold uppercase",children:"Subtotal"}),l.jsxs("span",{className:"font-bold text-indigo-600 dark:text-indigo-400 truncate",children:["$",t.toFixed(2)]})]}),l.jsx(Kr,{}),l.jsxs("div",{className:"flex items-center justify-between gap-16",children:[l.jsx("span",{className:"text-muted-foreground",children:"IVA (16%)"}),l.jsxs("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:["$",r.toFixed(2)]})]}),l.jsxs("div",{className:"flex items-center justify-between gap-16",children:[l.jsx("span",{className:"text-muted-foreground",children:"Franqueo Postal"}),l.jsxs("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:["$",n.toFixed(2)]})]}),l.jsx(Kr,{}),l.jsxs("div",{className:"flex items-center justify-between gap-16",children:[l.jsx("span",{className:"font-bold text-muted-foreground uppercase",children:"Total"}),l.jsxs("span",{className:"font-bold text-indigo-600 dark:text-indigo-400 truncate",children:["$",s.toFixed(2)]})]})]})})]})]})}),Gp=({tracking:e,index:t})=>l.jsxs("tr",{className:A("hover:bg-gray-300 dark:hover:bg-gray-600 transition-colors duration-100 font-normal text-xs h-12",t%2===0?"bg-gray-100 dark:bg-gray-700":"bg-gray-200 dark:bg-gray-800"),children:[l.jsx("td",{className:"text-muted-foreground px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 font-semibold",children:R(e.date).format("DD/MM/YYYY, hh:mm A")}),l.jsxs("td",{className:"text-muted-foreground px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3",children:[l.jsx("p",{className:"font-semibold text-indigo-600 dark:text-indigo-400",children:e.description}),l.jsx("p",{className:"font-normal",children:e.details})]})]}),qp=({trackings:e,onPublicAppClick:t,wrapperClassName:r})=>l.jsx("div",{className:A("w-full mx-auto",r),children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(Md,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-xl font-bold",children:"Tracking"})]})}),l.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[l.jsx("p",{className:A(!t&&"hidden"),children:l.jsx(Ae,{onClick:t,children:"Ver guía en Tealca Consultas"})}),l.jsxs(vi,{children:[l.jsx("thead",{className:"sticky top-0 z-10 bg-gray-50 dark:bg-gray-800",children:l.jsxs("tr",{className:"border-b-2",children:[l.jsx("th",{className:"text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(tf,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Fecha"})]})}),l.jsx("th",{className:"text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(R_,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Evento"})]})})]})}),l.jsx("tbody",{children:e.map((n,s)=>l.jsx(Gp,{tracking:n,index:s},n.trackingID))})]})]})]})}),Zp=({showPOD:e,showInvoice:t,isPhysicalLiability:r,isPhysicalPOD:n,invoiceNumber:s,onShowLiabilityWaiver:i,onDownloadLiabilityWaiver:a,onShowPOD:o,onDownloadPOD:c,onShowInvoiceAttachments:d,wrapperClassName:f})=>l.jsxs("div",{className:A("flex flex-col gap-6 rounded-lg border p-6 border-gray-300 dark:border-gray-700 text-gray-800 dark:text-gray-300 bg-gray-50 dark:bg-gray-800 max-w-full",f),children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-600/60 dark:bg-indigo-300/20 p-2 backdrop-blur-sm text-gray-100",children:l.jsx(Y0,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-lg font-bold",children:"Documentos Digitales"})]}),l.jsxs("div",{className:"space-y-0.5",children:[l.jsxs("div",{children:[l.jsxs("span",{className:"text-sm font-medium text-foreground",children:["Declaración Jurada:"," "]}),l.jsx("span",{className:A("ml-3 text-sm text-muted-foreground",!r&&"hidden"),children:"Llenada en el documento físico"}),l.jsx("p",{className:"ml-4",children:l.jsx(Ae,{onClick:i,className:A("text-sm text-muted-foreground",r&&"hidden"),children:"Ver Declaración Jurada"})}),l.jsx("p",{className:"ml-4",children:l.jsx(Ae,{onClick:a,className:A("text-sm text-muted-foreground",r&&"hidden"),children:"Descargar Declaración Jurada"})})]}),l.jsxs("div",{className:A(!e&&"hidden"),children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:"POD: "}),l.jsx("span",{className:A("ml-3 text-sm text-muted-foreground",!n&&"hidden"),children:"Llenada en el documento físico"}),l.jsx("p",{className:"ml-4",children:l.jsx(Ae,{onClick:o,className:A("text-sm text-muted-foreground",n&&"hidden"),children:"Ver POD"})}),l.jsx("p",{className:"ml-4",children:l.jsx(Ae,{onClick:c,className:A("text-sm text-muted-foreground",n&&"hidden"),children:"Descargar POD"})})]}),l.jsxs("div",{className:A(!t&&"hidden"),children:[l.jsxs("span",{className:"text-sm font-medium text-foreground",children:["Factura de la mercancia:"," "]}),l.jsx("p",{className:"ml-4 text-sm text-muted-foreground",children:l.jsx("span",{children:s})}),l.jsx("p",{className:"ml-4 text-sm text-muted-foreground",children:l.jsx(Ae,{onClick:d,children:"Ver Adjuntos"})})]})]})]}),z_=({shipment:e,trackings:t,showLiabilityWaiver:r,showPOD:n,showInvoice:s,isPhysicalLiability:i,isPhysicalPOD:a,invoiceNumber:o,onSubstituteForClick:c,onSubstitutedByClick:d,onInvoiceClick:f,onPublicAppClick:h,onShowLiabilityWaiver:p,onDownloadLiabilityWaiver:v,onShowPOD:m,onDownloadPOD:x,onShowInvoiceAttachments:y,onPrintParcel:E,onPrintShipment:k,onEdit:O,onCancel:b,onDeliver:g})=>{const[w,S]=u.useState(!1);return l.jsxs("div",{className:"flex flex-col gap-8",children:[l.jsx(Wp,{shipment:e,onSubstituteForClick:c,onSubstitutedByClick:d}),l.jsxs("div",{className:"rounded-lg border border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800 shadow-sm overflow-hidden",children:[l.jsxs("div",{className:"w-full flex items-center justify-between p-5 cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-700 text-xl font-bold text-gray-800 dark:text-gray-200",onClick:()=>S(!w),children:[l.jsx("span",{children:"Detalles"}),l.jsx(uo,{className:A("ml-2 transition-transform duration-1000 text-gray-500 dark:text-gray-300",w?"rotate-180":"rotate-0"),"aria-label":w?"Colapsar":"Expandir"})]}),l.jsx(Cd,{active:w,duration:1e3,children:l.jsxs("div",{className:"flex flex-col p-2 md:p-4 lg:p-6 gap-14 pb-16",children:[e.invoices.length>0&&l.jsx(Ip,{invoices:e.invoices,onInvoiceClick:f}),e.parcels.length>0&&l.jsx($p,{parcels:e.parcels,totalPhysicalWeight:e.totalPhysicalWeight,totalDimensionalWeight:e.totalDimensionalWeight,totalChargedWeight:e.totalChargedWeight,totalVolume:e.totalVolume,dimensionalFactor:e.dimensionalFactor,onPrintParcel:E,onPrintShipment:k}),e.items.length>0&&l.jsx(Hp,{items:e.items,subTotalAmount:e.subTotalAmount,vatAmount:e.vatAmount,postalTaxAmount:e.postalTaxAmount,totalAmount:e.totalAmount}),t.length>0&&l.jsx(qp,{trackings:t,onPublicAppClick:h}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[e.deliveryDate&&e.deliveryUser&&l.jsx(Bp,{user:e.deliveryUser,date:e.deliveryDate,observation:e.deliveryObservation}),r&&l.jsx(Zp,{showPOD:n,showInvoice:s,isPhysicalLiability:i,isPhysicalPOD:a,invoiceNumber:o,onShowLiabilityWaiver:p,onDownloadLiabilityWaiver:v,onShowPOD:m,onDownloadPOD:x,onShowInvoiceAttachments:y})]}),l.jsx(Up,{shipment:e,wrapperClassName:"h-[30rem]"})]})})]}),l.jsx("div",{className:"mt-2 md:mt-6 w-full flex flex-col gap-4 md:gap-0",children:l.jsxs("div",{className:"w-full flex flex-col-reverse md:flex-row justify-between items-center gap-4",children:[l.jsx("div",{className:"flex flex-col-reverse md:flex-row gap-4 items-center w-full",children:b&&l.jsxs(Ae,{onClick:b,children:[l.jsx(Td,{className:"w-5 h-5 inline mr-1 mb-0.5"}),"Anular"]})}),l.jsxs("div",{className:"flex flex-col md:flex-row gap-4 items-center w-full md:w-fit",children:[O&&l.jsxs(rt,{className:"w-full md:w-36",onClick:O,children:[l.jsx(Vh,{className:"w-4 h-4 inline mr-2"}),"Editar"]}),g&&l.jsxs(rt,{className:"w-full md:w-36",onClick:g,children:[l.jsx(dv,{className:"w-4 h-4 inline mr-2"}),"Entregar"]})]})]})})]})},fd={id:"",label:"Crear nuevo",value:null},B_=[{id:rr.PERSON.toString(),label:"Persona",value:rr.PERSON},{id:rr.BOX_ACCOUNT.toString(),label:"Casillero",value:rr.BOX_ACCOUNT}],Kp=({formik:e})=>{const{values:t,touched:r,errors:n,handleBlur:s,setFieldValue:i}=e,[a,o]=u.useState(!1),[c,d]=u.useState(!1),[f,h]=u.useState(""),[p,v]=u.useState(""),m=E=>{if(E.value===null){o(!0);return}i("shipper",E),i("consigneeType",{id:rr.PERSON.toString(),label:"Persona",value:rr.PERSON}),i("consignee",null)},x=E=>{i("consigneeType",E),i("consignee",null)},y=E=>{if(E.value===null){d(!0);return}i("consignee",E)};return l.jsx("div",{className:"w-full mx-auto",children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(TS,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-lg font-bold",children:"Partes Involucradas"})]})}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 w-full gap-4 p-4 md:h-28",children:[l.jsxs("div",{className:"flex-1",children:[l.jsx(ct,{required:!0,label:"Remitente",id:"shipper",name:"shipper",placeholder:"Seleccione un remitente",options:[],selected:t.shipper,searchText:f,error:r.shipper&&n.shipper,onSelectOption:m,onBlur:s,setSearchText:h,footerOption:fd}),l.jsxs(Xs,{open:a,onClose:()=>o(!1),children:[l.jsx("h2",{className:"text-lg font-bold text-gray-900 dark:text-white mb-4",children:"Crear nuevo cliente"}),l.jsx(Ha,{onSubmit:()=>{},onCancel:E=>{o(!1),E.resetForm()}})]})]}),l.jsxs("div",{className:"flex-1",children:[l.jsxs("div",{className:"flex items-center gap-8 pr-2 justify-between text-sm font-medium leading-6 text-gray-700 truncate dark:text-gray-200",children:[l.jsxs("p",{children:["Destinatario ",l.jsx("span",{className:"text-red-500",children:"*"})]}),l.jsx("div",{className:"mb-1",children:l.jsx(oi,{id:"consigneeType",name:"consigneeType",label:"",options:B_,selected:t.consigneeType,disabled:!t.shipper,onSelectOption:x,onBlur:s,wrapperClassName:"flex-row"})})]}),l.jsx("div",{className:"w-full",children:l.jsx(ct,{label:"",id:"consignee",name:"consignee",placeholder:"Seleccione un destinatario",options:[],selected:t.consignee,disabled:!t.shipper,searchText:p,error:r.consignee&&n.consignee,onSelectOption:y,onBlur:s,setSearchText:v,footerOption:fd})}),l.jsxs(Xs,{open:c,onClose:()=>d(!1),children:[l.jsx("h2",{className:"text-lg font-bold text-gray-900 dark:text-white mb-4",children:"Crear nuevo cliente"}),l.jsx(Ha,{onSubmit:()=>{},onCancel:E=>{d(!1),E.resetForm()}})]})]})]})]})})},W_=({formik:e})=>l.jsxs("div",{className:"flex flex-col gap-6",children:[l.jsx(Kp,{formik:e}),l.jsx(zp,{formik:e})]}),Y_=({index:e,shipment:t})=>l.jsxs("div",{className:"flex flex-col gap-8 w-full",children:[l.jsx("div",{className:"overflow-hidden border-none shadow-lg",children:l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 p-6 dark:from-indigo-800 dark:to-indigo-600",children:l.jsx("div",{className:"flex relative items-start justify-between",children:l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-3 backdrop-blur-sm hidden md:block",children:l.jsx(en,{className:"h-8 w-8"})}),t&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{children:[l.jsx("p",{className:"mb-1 text-sm font-medium opacity-90",children:"Número de Guía"}),l.jsxs("h1",{className:"text-3xl font-bold tracking-tight",children:[t.shipmentNumber," ",l.jsx("span",{className:"font-normal italic",children:"(Edición)"})]}),l.jsxs("p",{className:"mt-2 text-sm opacity-90",children:["Creación:"," ",R(t.shipmentHeaderDate).format("DD/MM/YYYY, hh:mm A")]})]}),l.jsx(Zr,{color:"default",className:"!text-base absolute top-0 right-0",children:t.status.name})]}),!t&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{children:[l.jsx("p",{className:"mb-1 text-sm font-medium opacity-90",children:"Guía Número"}),l.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:e.toString().padStart(3,"0")})]}),l.jsx(Zr,{color:"primary",className:"!text-base absolute top-0 right-0",children:"Nueva Guía"})]})]})})})}),l.jsx(Jn,{initialValues:Ap,onSubmit:()=>{},children:r=>l.jsx(W_,{formik:r})})]}),H_=(e,t=!1)=>{const r=t?"-":"_";return e.replace(/[A-Z]/g,n=>`${r}${n.toLowerCase()}`)},tn=(e,t=!1)=>Array.isArray(e)?e.map(r=>tn(r)):e!==null&&e.constructor===Object?Object.keys(e).reduce((r,n)=>(r[H_(n,t)]=tn(e[n]),r),{}):e;function G_(e){return e.replace(/([-_][a-z])/gi,t=>t.toUpperCase().replace("-","").replace("_",""))}function pi(e){if(Array.isArray(e))return e.map(pi);if(e!==null&&typeof e=="object"){const t={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const n=G_(r);t[n]=pi(e[r])}return t}return e}const Jp=(e,t)=>{const r=eh();return u.useMemo(()=>{const s=Ne.create({baseURL:e});return s.interceptors.request.use(i=>{const a=r.getState().auth.accessToken;return a&&i.headers&&(i.headers.Authorization=`Bearer ${a}`),i.data&&(i.data=tn(i.data)),i.params&&(i.params=tn(i.params,!0)),i},i=>Promise.reject(i)),s.interceptors.response.use(i=>(i.data&&(i.data=pi(i.data)),i),async i=>{const a=i.config;if(i.response?.status===401&&!a._retry){a._retry=!0;const o=r.getState().auth.refreshToken;if(o)try{const c=await Fh(t,o);if(c.data){const{accessToken:d}=c.data,f=r.getState().auth;if(f.user)return r.dispatch(Kf({user:f.user,...c.data})),a.headers.Authorization=`Bearer ${d}`,Ne(a)}}catch(c){return Promise.reject(c)}}return Promise.reject(i)}),s},[e,t,r])},Xp=e=>u.useMemo(()=>{const r=Ne.create({baseURL:e,headers:{"Content-Type":"application/json"}});return r.interceptors.request.use(n=>(n.data&&(n.data=tn(n.data)),n.params&&(n.params=tn(n.params,!0)),n),n=>Promise.reject(n)),r.interceptors.response.use(n=>(n.data&&(n.data=pi(n.data)),n),n=>Promise.reject(n)),r},[e]),q_=({children:e,applicationId:t})=>{const r=Xp("http://localhost:8000/api"),n=Jp("http://localhost:8000/api",r),[s,i]=u.useState(null);return u.useEffect(()=>{(async()=>{const o=await Ph(r,t);if(o.error||!o.data){console.error(o.message);return}i(o.data)})()},[t,r]),l.jsx(on.Provider,{value:{application:s,googleMapsApiKey:"AIzaSyD0g8yZAA0ZaqaLsrRkGmDQdFbhCEAPdYs",clientId:"docuNxInnND1MUSqVr3ROV8ms986ZRjnbyA77ypt",clientSecret:"0SAgl6C4IsMObrysxXHG6npwGyH8jgIkiMtLoGD6Pchu1tBGPZvIZjmjYmAo3pItBoIqOHipjkQNcI03URn1i7LgtaAsDOHFSdv3suDFz9J3kS8WHMnq0tE1Lg1advs7",api:n,basicApi:r},children:e})};exports.AccountForm=Ha;exports.AnimatedCollapse=Cd;exports.AppContext=on;exports.AppProvider=q_;exports.AuthContext=go;exports.Badge=Zr;exports.Button=so;exports.CategoryTypeID=Pp;exports.Checkbox=mi;exports.ConsigneeType=rr;exports.DeliveryTypeID=Ie;exports.ErrorCard=En;exports.ForgotPassword=xS;exports.GoogleMap=Jd;exports.InputCheckboxSelect=P1;exports.InputDate=A1;exports.InputFile=R1;exports.InputFileDrop=I1;exports.InputGoogleMap=nh;exports.InputInteger=sh;exports.InputLocationSelect=B1;exports.InputRadioSelect=oi;exports.InputSelect=ct;exports.InputSelectGrouped=W1;exports.InputText=Be;exports.InputTextArea=Y1;exports.InvoiceStatus=Dp;exports.InvoiceSummary=Rp;exports.InvoiceSummaryList=Ip;exports.InvoiceType=Nn;exports.Link=Ae;exports.LoadingSpinner=gi;exports.Login=wS;exports.Modal=Xs;exports.ParcelForm=$_;exports.ParcelRow=Fp;exports.ParcelTable=$p;exports.PaymentModeID=al;exports.Popover=Xd;exports.PopoverMenu=B0;exports.PrimaryButton=rt;exports.SecondaryButton=Tn;exports.Separator=Kr;exports.ServiceID=Pt;exports.ShipmentAccountSummary=eo;exports.ShipmentAddresses=Up;exports.ShipmentAddressesForm=zp;exports.ShipmentDeliveryData=Bp;exports.ShipmentDetails=z_;exports.ShipmentDocument=Zp;exports.ShipmentForm=Y_;exports.ShipmentItemRow=Yp;exports.ShipmentItemTable=Hp;exports.ShipmentPartiesForm=Kp;exports.ShipmentStatusID=gr;exports.ShipmentSummary=Wp;exports.SideMenu=T1;exports.Switch=W0;exports.Table=vi;exports.TrackingRow=Gp;exports.TrackingTable=qp;exports.WarningCard=Qd;exports.getApplication=Ph;exports.getCategories=$h;exports.getCountries=Rh;exports.getTaxIdentificationTypes=Ah;exports.getToken=Ih;exports.makeStore=M1;exports.refreshToken=Fh;exports.shipmentInitialValues=Ap;exports.useApi=Jp;exports.useAppDispatch=Eo;exports.useAppSelector=t1;exports.useAppStore=eh;exports.useBasicApi=Xp;
|
|
86
|
+
R.version="2.30.1";PS(je);R.fn=P;R.min=E4;R.max=S4;R.now=k4;R.utc=_t;R.unix=XO;R.months=e_;R.isDate=Xn;R.locale=sr;R.invalid=Ri;R.duration=xt;R.isMoment=vt;R.weekdays=r_;R.parseZone=QO;R.localeData=Bt;R.isDuration=Is;R.monthsShort=t_;R.weekdaysMin=s_;R.defineLocale=Jo;R.updateLocale=Qk;R.locales=e4;R.weekdaysShort=n_;R.normalizeUnits=ft;R.relativeTimeRounding=M_;R.relativeTimeThreshold=T_;R.calendarFormat=Z4;R.prototype=P;R.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};var Pt=(e=>(e[e.STANDARD=60]="STANDARD",e[e.DOCUMENT=61]="DOCUMENT",e[e.INTERNATIONAL_DOCUMENT=62]="INTERNATIONAL_DOCUMENT",e[e.INTERNATIONAL_STANDARD=63]="INTERNATIONAL_STANDARD",e[e.ECONOMIC=64]="ECONOMIC",e[e.SAVER=70]="SAVER",e[e.NATIONAL_LOCKER=81]="NATIONAL_LOCKER",e[e.INTERNAL_MAIL=99]="INTERNAL_MAIL",e))(Pt||{}),Dp=(e=>(e[e.ANULLED=6]="ANULLED",e[e.PAID=10]="PAID",e[e.PENDING=11]="PENDING",e[e.PARTIAL_PAID=20]="PARTIAL_PAID",e[e.TO_ISSUE=59]="TO_ISSUE",e[e.ISSUED=60]="ISSUED",e))(Dp||{}),Nn=(e=>(e[e.INVOICE=2]="INVOICE",e[e.CREDIT_NOTE=4]="CREDIT_NOTE",e[e.ORDER=6]="ORDER",e))(Nn||{}),al=(e=>(e[e.CASH=1]="CASH",e[e.COD=2]="COD",e[e.CREDIT=3]="CREDIT",e[e.BOXOFFICE_CREDIT=4]="BOXOFFICE_CREDIT",e[e.DEST_BOXOFFICE_CREDIT=5]="DEST_BOXOFFICE_CREDIT",e[e.EXEMPT=6]="EXEMPT",e))(al||{}),Pp=(e=>(e[e.INTERNATIONAL=1]="INTERNATIONAL",e[e.NATIONAL=2]="NATIONAL",e))(Pp||{}),Ie=(e=>(e[e.OFFICE=10]="OFFICE",e[e.HOME=20]="HOME",e[e.INTERNATIONAL=21]="INTERNATIONAL",e))(Ie||{}),rr=(e=>(e[e.PERSON=0]="PERSON",e[e.BOX_ACCOUNT=1]="BOX_ACCOUNT",e))(rr||{});const Ap={shipper:null,consigneeType:{id:"0",value:0,label:"Persona"},consignee:null,boxAccount:null,pickupType:{id:Ie.OFFICE.toString(),value:{deliveryTypeID:Ie.OFFICE,deliveryTypeName:"Tienda"},label:"Tienda"},originStore:null,originAddress:null,deliveryType:{id:Ie.OFFICE.toString(),value:{deliveryTypeID:Ie.OFFICE,deliveryTypeName:"Tienda"},label:"Tienda"},destinationStore:null,destinationAddress:null};var gr=(e=>(e[e.ACTIVE=1]="ACTIVE",e[e.ANNULLED=3]="ANNULLED",e[e.DRAFT=5]="DRAFT",e[e.REPLACED=55]="REPLACED",e[e.DELIVERED=30]="DELIVERED",e))(gr||{});const Rp=({invoice:e,onClick:t})=>{const r=u.useMemo(()=>{switch(e.type){case Nn.INVOICE:return"Factura:";case Nn.CREDIT_NOTE:return"Nota de Crédito:";case Nn.ORDER:return"Orden:"}},[e.type]);return l.jsxs("div",{className:"border cursor-pointer border-gray-300 dark:border-gray-700 rounded-lg p-4 hover:shadow-md transition-all text-gray-800 dark:text-gray-200 bg-gray-50 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700 duration-100",onClick:t,children:[l.jsxs("div",{className:"flex items-center justify-between mb-3 gap-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(fv,{className:"w-4 h-4 text-indigo-600 dark:text-indigo-400"}),l.jsxs("span",{className:"font-semibold text-sm text-card-foreground dark:text-gray-200",children:[r," ",l.jsx("span",{className:"text-gray-900 dark:text-gray-100 font-bold",children:e.invoiceNumber})]})]}),l.jsx(Zr,{color:"primary",children:e.statusName})]}),l.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[l.jsxs("div",{className:"col-span-3 md:col-span-2",children:[l.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[l.jsx(rf,{className:"w-3 h-3 text-indigo-600 dark:text-indigo-400"}),l.jsx("h3",{className:"font-semibold text-xs text-card-foreground dark:text-gray-200",children:"Cliente"})]}),l.jsx("p",{className:"text-sm font-bold text-card-foreground dark:text-gray-100",children:e.accountFullName}),l.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground mt-0.5 text-gray-600 dark:text-gray-400",children:[l.jsx(tf,{className:"w-3 h-3"}),l.jsx("span",{className:"text-xs",children:R(e.invoiceDate).format("DD/MM/YYYY, hh:mm A")})]})]}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[l.jsx(ES,{className:"w-3 h-3 text-indigo-600 dark:text-indigo-400"}),l.jsx("h3",{className:"font-semibold text-xs text-card-foreground dark:text-gray-200",children:"Total"})]}),l.jsxs("p",{className:"text-sm font-bold text-card-foreground dark:text-indigo-400",children:["$",e.totalAmount.toFixed(2)]}),l.jsx("p",{className:"text-xs text-muted-foreground text-gray-600 dark:text-gray-400",children:"Con IVA"})]}),e.balanceAmount>=0&&l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[l.jsx(en,{className:"w-3 h-3 text-indigo-600 dark:text-indigo-400"}),l.jsx("h3",{className:"font-semibold text-xs text-card-foreground dark:text-gray-200",children:"Por Cobrar"})]}),l.jsxs("p",{className:"text-sm font-bold text-card-foreground dark:text-indigo-400",children:["$",Math.max(e.balanceAmount,0).toFixed(2)]}),l.jsx("p",{className:"text-xs text-muted-foreground text-gray-600 dark:text-gray-400",children:"Saldo pendiente"})]}),e.balanceAmount<0&&l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[l.jsx(en,{className:"w-3 h-3 text-indigo-600 dark:text-indigo-400"}),l.jsx("h3",{className:"font-semibold text-xs text-card-foreground dark:text-gray-200",children:"Reintegrar"})]}),l.jsxs("p",{className:"text-sm font-bold text-card-foreground dark:text-indigo-400",children:["$",Math.max(-e.balanceAmount,0).toFixed(2)]}),l.jsx("p",{className:"text-xs text-muted-foreground text-gray-600 dark:text-gray-400",children:"Monto a devolver"})]})]})]})};function P_(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14 3v4a1 1 0 0 0 1 1h4"},child:[]},{tag:"path",attr:{d:"M19 12v7a1.78 1.78 0 0 1 -3.1 1.4a1.65 1.65 0 0 0 -2.6 0a1.65 1.65 0 0 1 -2.6 0a1.65 1.65 0 0 0 -2.6 0a1.78 1.78 0 0 1 -3.1 -1.4v-14a2 2 0 0 1 2 -2h7l5 5v4.25"},child:[]}]})(e)}function A_(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14.916 11.707a3 3 0 1 0 -2.916 2.293"},child:[]},{tag:"path",attr:{d:"M11.991 21.485a1.994 1.994 0 0 1 -1.404 -.585l-4.244 -4.243a8 8 0 1 1 13.651 -5.351"},child:[]},{tag:"path",attr:{d:"M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"},child:[]},{tag:"path",attr:{d:"M20.2 20.2l1.8 1.8"},child:[]}]})(e)}function R_(e){return H({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 20m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M10 20h-6"},child:[]},{tag:"path",attr:{d:"M14 20h6"},child:[]},{tag:"path",attr:{d:"M12 15l-2 -2h-3a1 1 0 0 1 -1 -1v-8a1 1 0 0 1 1 -1h10a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-3l-2 2z"},child:[]},{tag:"path",attr:{d:"M12 6v2"},child:[]},{tag:"path",attr:{d:"M12 11v.01"},child:[]}]})(e)}const Ip=({invoices:e,onInvoiceClick:t,wrapperClassName:r})=>l.jsx("div",{className:A("w-full mx-auto",r),children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(P_,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-lg font-bold",children:"Facturas"})]})}),l.jsx("div",{className:"p-2 md:p-4 space-y-4",children:e.map(n=>l.jsx(Rp,{invoice:n,onClick:()=>t?.(n)},n.invoiceID))})]})}),I_={category:null,weight:null,height:null,width:null,length:null,quantity:1},F_=({serviceId:e,categoryTypeId:t,formik:r,warningSchema:n})=>{const{values:s,touched:i,errors:a,handleChange:o,handleBlur:c,handleSubmit:d,setFieldValue:f}=r,h=u.useContext(on),[p,v]=u.useState(null),[m,x]=u.useState(null),[y,E]=u.useState([]),[k,O]=u.useState(""),[b,g]=u.useState({}),w=u.useMemo(()=>a,[a]);return u.useEffect(()=>{(async()=>{const C=await $h(h.api,t);C.error||!C.data||(E(C.data.map(_=>({id:_.categoryId.toString(),label:_.categoryName,value:_}))),x(C.data.find(_=>G1.includes(_.categoryId))??null),v(C.data.find(_=>H1.includes(_.categoryId))??null))})()},[t,h.api]),u.useEffect(()=>{p&&(e===Pt.DOCUMENT||e===Pt.INTERNATIONAL_DOCUMENT)?(O(p.categoryName),f("category",{id:p.categoryId.toString(),label:p.categoryName,value:p}),f("height",ua.HEIGHT),f("width",ua.WIDTH),f("length",ua.LENGTH)):(O(""),f("category",null),f("height",""),f("width",""),f("length",""))},[e,p,f]),u.useEffect(()=>{(async(C,_)=>{try{return await C.validate(_,{abortEarly:!1}),{}}catch(M){if(M instanceof ze){const D={};return M.inner.forEach(F=>{F.path&&(D[F.path]=F.message)}),D}return{}}})(n,s).then(C=>{g(C)})},[s,n]),l.jsx("div",{className:"w-full max-w-2xl",children:l.jsxs("div",{className:"space-y-6",children:[l.jsx("div",{className:"space-y-2",children:l.jsx(ct,{label:"Categoría",id:"category",name:"category",placeholder:"Seleccione una categoría",options:y,selected:s.category,searchText:k,disabled:e===Pt.DOCUMENT,error:i.category&&a.category,onSelectOption:S=>f("category",S),onBlur:c,setSearchText:O,footerOption:m?{label:m.categoryName,id:m.categoryId.toString(),value:m}:void 0})}),l.jsxs("div",{className:A("space-y-2",{hidden:e===Pt.DOCUMENT}),children:[l.jsx("h4",{className:"text-gray-700 dark:text-white",children:"Dimensiones en cm."}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[l.jsx("div",{className:"space-y-2",children:l.jsx(Be,{label:"Altura",id:"height",name:"height",type:"number",step:"0.01",placeholder:"0.00",value:s.height??"",onChange:o,onBlur:c,error:i.height&&a.height})}),l.jsx("div",{className:"space-y-2",children:l.jsx(Be,{label:"Ancho",id:"width",name:"width",type:"number",step:"0.01",placeholder:"0.00",value:s.width??"",onChange:o,onBlur:c,error:i.width&&a.width})}),l.jsx("div",{className:"space-y-2",children:l.jsx(Be,{label:"Largo",id:"length",name:"length",type:"number",step:"0.01",placeholder:"0.00",value:s.length??"",onChange:o,onBlur:c,error:i.length&&a.length})})]})]}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[l.jsx("div",{className:"space-y-2",children:l.jsx(Be,{label:"Peso (kg)",id:"weight",name:"weight",type:"number",step:"0.01",placeholder:"0.00",value:s.weight??"",onChange:o,onBlur:c,error:i.weight&&a.weight})}),l.jsx("div",{className:"space-y-2",children:l.jsx(sh,{label:"Cantidad",id:"quantity",name:"quantity",min:"1",value:s.quantity,disabled:e===Pt.DOCUMENT,onChange:o,onBlur:c,error:i.quantity&&a.quantity})})]}),l.jsxs("div",{className:"flex flex-col gap-2",children:[b.totalWeightWarn&&l.jsx(Qd,{description:b.totalWeightWarn}),w.totalWeightError&&l.jsx(En,{description:w.totalWeightError}),w.minVolumeError&&l.jsx(En,{description:w.minVolumeError}),w.maxVolumeError&&l.jsx(En,{description:w.maxVolumeError}),w.densityError&&l.jsx(En,{description:w.densityError})]}),l.jsx(rt,{type:"submit",className:"w-full",onClick:()=>d(),children:"+ Agregar"})]})})},$_=({serviceId:e,categoryTypeId:t,totalWeight:r,validationConfig:n,onSubmit:s})=>{const i=u.useMemo(()=>{const{minWeight:o=0,minVolume:c,maxVolume:d,minDensity:f,maxDensity:h,maxDocumentWeight:p=1/0,maxTotalWeight:v=1/0}=n??{};let{maxWeight:m=1/0}=n??{};return(e===Pt.DOCUMENT||e===Pt.INTERNATIONAL_DOCUMENT)&&(m=p),ar({category:ir().nullable().required("La categoría es requerida"),weight:ht().typeError("Debe ser un número").required("El peso es requerido").test({name:"min-weight",exclusive:!1,test:x=>x==null||x>=o,message:`El peso mínimo es ${o.toFixed(2)}kg`}).test({name:"max-weight",exclusive:!1,test:x=>x==null||x<=m,message:`El peso máximo es ${m.toFixed(2)}kg`}),height:ht().typeError("Debe ser un número").integer("Debe ser un número entero").positive("Debe ser mayor a 0").required("La altura es requerida"),width:ht().typeError("Debe ser un número").integer("Debe ser un número entero").positive("Debe ser mayor a 0").required("El ancho es requerido"),length:ht().typeError("Debe ser un número").integer("Debe ser un número entero").positive("Debe ser mayor a 0").required("El largo es requerido"),quantity:ht().typeError("Debe ser un número").integer("Debe ser un número entero").min(1,"Debe ser al menos 1").required("La cantidad es requerida")}).test({name:"total-weight-check-global",test:function(x){const{weight:y,quantity:E}=x;if(y===null||r===void 0)return!0;const k=y*E,O=r+k;return v!==void 0&&O>v?this.createError({path:"totalWeightError",message:`El peso total (${O.toFixed(2)}kg) excede el máximo (${v.toFixed(2)}kg)`}):!0}}).test({name:"volume-check",test:function(x){const{height:y,width:E,length:k}=x;if(y===null||E===null||k===null)return!0;const O=y*E*k;return c!==void 0&&O<c?this.createError({path:"minVolumeError",message:`El volumen (${O.toFixed(2)}cm³) es menor al mínimo (${c.toFixed(2)}cm³)`}):d!==void 0&&O>d?this.createError({path:"maxVolumeError",message:`El volumen (${O.toFixed(2)}cm³) es mayor al máximo (${d.toFixed(2)}cm³)`}):!0}}).test({name:"density-check",test:function(x){const{height:y,width:E,length:k,weight:O}=x;if(y===null||E===null||k===null||O===null)return!0;const b=y*E*k;if(b===0)return!0;const g=O/b;return f!==void 0&&g<f||h!==void 0&&g>h?this.createError({path:"densityError",message:"Las medidas son inválidas, por favor revíselas y corríjalas"}):!0}})},[n,r,e]),a=u.useMemo(()=>{const{maxTotalWeightWarn:o=1/0}=n??{};return ar({category:ir().nullable().required(),weight:ht().required(),height:ht().required(),width:ht().required(),length:ht().required(),quantity:ht().required()}).test({name:"total-weight-check-global-warn",test:function(c){const{weight:d,quantity:f}=c;if(!d||!f||r===void 0)return!0;const h=d*f,p=r+h;return o!==void 0&&p>o?this.createError({path:"totalWeightWarn",message:`El peso total (${p.toFixed(2)}kg) excede el recomendado (${o.toFixed(2)}kg)`}):!0}})},[n,r]);return l.jsx(Jn,{initialValues:I_,validationSchema:i,onSubmit:s,children:o=>l.jsx(F_,{serviceId:e,categoryTypeId:t,formik:o,warningSchema:a})})},Fp=({parcel:e,index:t,checked:r,editable:n,editing:s,disabledActions:i,onChangeChecked:a,onPrintParcel:o,onDuplicate:c,onEdit:d})=>l.jsxs("tr",{className:A("hover:bg-gray-300 dark:hover:bg-gray-600 transition-colors duration-100 font-normal text-xs h-12",s&&"border-2 border-indigo-600 dark:border-indigo-400",t%2===0?"bg-gray-100 dark:bg-gray-700":"bg-gray-200 dark:bg-gray-800"),children:[l.jsxs("td",{className:"text-muted-foreground px-3 sm:px-4 font-bold",children:[n&&l.jsx(mi,{label:"",id:`parcel-${e.pieceNumber}-checkbox`,checked:r,disabled:i,onChangeChecked:a}),!n&&e.pieceNumber]}),l.jsxs("td",{className:"sm:hidden px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 truncate font-semibold",children:[l.jsxs("p",{children:[e.weight.toFixed(2)," kg"]}),l.jsxs("p",{children:[e.length,"x",e.width,"x",e.height," cm"]}),l.jsx("p",{className:"font-normal",children:e.contentDescription})]}),l.jsxs("td",{className:"hidden sm:table-cell px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 truncate font-semibold",children:[e.weight.toFixed(2)," kg"]}),l.jsxs("td",{className:"hidden sm:table-cell px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 truncate font-semibold",children:[e.length,"x",e.width,"x",e.height," cm"]}),l.jsx("td",{className:"hidden sm:table-cell text-muted-foreground px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3",children:e.contentDescription}),l.jsxs("td",{className:"text-right px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3",children:[n&&!i&&l.jsxs("div",{className:"flex gap-2 items-cetner justify-end",children:[l.jsx("button",{type:"button",className:"inline-flex items-center justify-center h-6 w-6 sm:h-8 sm:w-8 rounded hover:bg-indigo-100 dark:hover:bg-indigo-800 transition-colors text-indigo-600 dark:text-indigo-300 hover:text-indigo-900 dark:hover:text-white cursor-pointer",title:"Acciones",onClick:c,children:l.jsx(OS,{className:"h-4 w-4"})}),l.jsx("button",{type:"button",className:"inline-flex items-center justify-center h-6 w-6 sm:h-8 sm:w-8 rounded hover:bg-indigo-100 dark:hover:bg-indigo-800 transition-colors text-indigo-600 dark:text-indigo-300 hover:text-indigo-900 dark:hover:text-white cursor-pointer",title:"Acciones",onClick:d,children:l.jsx(Vh,{className:"h-4 w-4"})})]}),!n&&!i&&l.jsx("button",{type:"button",className:"inline-flex items-center justify-center h-8 w-8 rounded hover:bg-indigo-100 dark:hover:bg-indigo-800 transition-colors text-indigo-600 dark:text-indigo-300 hover:text-indigo-900 dark:hover:text-white cursor-pointer",title:"Imprimir",onClick:o,children:l.jsx(NS,{className:"h-4 w-4"})}),s&&l.jsx("span",{className:"italic",children:"Editando"})]})]}),$p=({parcels:e,totalPhysicalWeight:t,totalDimensionalWeight:r,totalChargedWeight:n,totalVolume:s,dimensionalFactor:i,editingParcel:a,editable:o,onPrintParcel:c,onDelete:d,onDuplicate:f,onSelectEdit:h,onCancelEdit:p,onPrintShipment:v,wrapperClassName:m})=>{const[x,y]=u.useState([]),E=u.useMemo(()=>x.every(b=>b),[x]),k=(b,g)=>{y(w=>[...w.slice(0,g),b,...w.slice(g+1)])},O=()=>{y(E?Array.from({length:e.length},()=>!1):Array.from({length:e.length},()=>!0))};return u.useEffect(()=>{y(Array.from({length:e.length},()=>!1))},[e.length,a]),l.jsx("div",{className:A("w-full mx-auto",m),children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(en,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-xl font-bold",children:"Piezas"})]})}),l.jsxs("div",{className:"p-4",children:[l.jsxs(vi,{children:[l.jsx("thead",{className:"sticky top-0 z-10 bg-gray-50 dark:bg-gray-800",children:l.jsxs("tr",{className:"border-b-2",children:[l.jsxs("th",{className:"w-16 font-bold text-xs uppercase tracking-wider text-left px-3 sm:px-4 py-2",children:[o&&l.jsx(mi,{label:"",id:"parcel-table-all-checked-checkbox",checked:E,disabled:!!a,onChangeChecked:O}),!o&&"#"]}),l.jsx("th",{className:"sm:hidden text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(X0,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Pieza"})]})}),l.jsx("th",{className:"hidden sm:table-cell text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(DS,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Peso"})]})}),l.jsx("th",{className:"hidden sm:table-cell text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(jS,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Dimensiones"})]})}),l.jsx("th",{className:"hidden sm:table-cell text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(jd,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Categoría"})]})}),l.jsx("th",{className:"w-24 text-right text-xs uppercase font-semibold tracking-wider px-4 py-2",children:l.jsxs("div",{className:"flex items-center w-full justify-end gap-2",children:[l.jsx(CS,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{className:"hidden sm:inline-block",children:"Acciones"})]})})]})}),l.jsx("tbody",{children:e.map((b,g)=>l.jsx(Fp,{parcel:b,index:g,editing:a?.pieceNumber===b.pieceNumber,checked:x[g],disabledActions:!!a,onChangeChecked:w=>k(w,g),onPrintParcel:()=>c?.(b),onDuplicate:()=>f?.(b),onEdit:()=>h?.(b),editable:o},b.pieceNumber))})]}),l.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-between text-xs mt-4",children:[l.jsxs("div",{className:"flex flex-col sm:block w-full sm:w-fit justify-center items-center",children:[!o&&v&&l.jsxs(rt,{className:"w-full md:w-36",onClick:v,children:[l.jsx(av,{className:"w-4 h-4 inline mr-2"}),"Imprimir Guía"]}),o&&!a&&l.jsxs(Tn,{className:"!w-full my-2 sm:my-0",disabled:x.every(b=>!b),onClick:()=>d?.(e.filter((b,g)=>x[g])),children:[l.jsx(U0,{className:"mr-2 w-4 h-4"}),"Eliminar"]}),!!a&&l.jsxs(Tn,{onClick:p,children:[l.jsx(Td,{className:"mr-2 w-5 h-5"}),"Cancelar Edición"]})]}),l.jsxs("div",{className:"space-y-1 text-gray-800 dark:text-gray-300",children:[l.jsxs("div",{className:"flex items-center justify-between gap-12",children:[l.jsx("span",{className:"text-muted-foreground font-semibold",children:"Peso por facturar"}),l.jsxs("span",{className:"font-bold text-indigo-600 dark:text-indigo-400 truncate",children:[n.toFixed(2)," kg"]})]}),l.jsx(Kr,{}),l.jsxs("div",{className:"flex items-center justify-between gap-12",children:[l.jsx("span",{className:"text-muted-foreground",children:"Peso físico"}),l.jsxs("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:[t.toFixed(2)," kg"]})]}),l.jsxs("div",{className:"flex items-center justify-between gap-12",children:[l.jsx("span",{className:"text-muted-foreground",children:"Peso volumétrico"}),l.jsxs("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:[r.toFixed(2)," kg"]})]}),l.jsxs("div",{className:"flex items-center justify-between gap-12",children:[l.jsx("span",{className:"text-muted-foreground",children:"Volumen"}),l.jsxs("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:[s.toFixed(2)," cm",l.jsx("sup",{children:"3"})]})]}),l.jsxs("div",{className:"flex items-center justify-between gap-12",children:[l.jsx("span",{className:"text-muted-foreground",children:"Factor volumétrico"}),l.jsx("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:i.toFixed(2)})]})]})]})]})]})})},eo=({isShipper:e=!1,account:t,store:r,deliveryType:n,isAccountBillTo:s,address:i})=>{const a=u.useMemo(()=>n===Ie.HOME&&e?"Recolecta":n===Ie.HOME&&!e?"A Domicilio":"En Tienda",[e,n]);return l.jsxs("div",{children:[l.jsxs("div",{className:"mb-2 flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-600/10 dark:bg-indigo-900 p-2",children:l.jsx(rf,{className:"h-5 w-5 text-indigo-600 dark:text-indigo-300"})}),l.jsxs("div",{children:[l.jsx("h2",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:e?"Remitente":"Destinatario"}),s&&l.jsx(Zr,{color:"primary",children:"Cuenta a facturar"})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("div",{children:l.jsx("p",{className:"text-lg font-bold text-div-foreground text-gray-900 dark:text-gray-200",children:t.fullName})}),l.jsx(Kr,{className:"my-2"}),l.jsxs("div",{className:"space-y-1.5 text-xs",children:[l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[l.jsx(SS,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsxs("span",{className:"font-mono",children:[t.taxIdentificationType,"-",t.identificationNumber]})]}),l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[l.jsx(Ym,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:t.email})]}),l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[l.jsx(LS,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:t.phone})]}),l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[l.jsx(Md,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:a})]}),l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[l.jsx(MS,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsxs("span",{children:[r.code," - ",r.commercialName]})]}),i&&n===Ie.HOME&&l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[l.jsx(_S,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:i.addressLine1})]})]})]})]})},Up=({shipment:e,wrapperClassName:t})=>{const r=u.useMemo(()=>{const n={lat:e.originAddress.latitude,lng:e.originAddress.longitude,name:`Origen (${e.pickupType.deliveryTypeID===Ie.OFFICE?"En Tienda":"Recolecta"})`},s={lat:e.destinationAddress.latitude,lng:e.destinationAddress.longitude,name:`Destino (${e.deliveryType.deliveryTypeID===Ie.OFFICE?"En Tienda":"A Domicilio"})`};return[n,s]},[e]);return l.jsx("div",{className:A("w-full mx-auto",t),children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg w-full h-full flex flex-col",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(Zd,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-xl font-bold",children:"Ruta"})]})}),l.jsxs("div",{className:"flex flex-col p-4 w-full h-full flex-1 gap-2",children:[l.jsx("div",{className:"w-full h-full",children:l.jsx(Jd,{coordinates:r})}),l.jsxs("p",{className:"text-xs text-gray-800 dark:text-gray-300",children:["Ubicación actual:"," ",l.jsxs("span",{className:"font-semibold",children:[e.lastKnowStoreLocation.code," -"," ",e.lastKnowStoreLocation.commercialName]})]}),l.jsx("div",{className:"flex items-center justify-center w-full text-center",children:l.jsx(Ae,{children:"Agregar recargo por entrega a domicilio"})})]})]})})},Vp=[{id:Ie.OFFICE.toString(),label:"Tienda",value:{deliveryTypeID:Ie.OFFICE,deliveryTypeName:"Tienda"}},{id:Ie.HOME.toString(),label:"A Domicilio",value:{deliveryTypeID:Ie.HOME,deliveryTypeName:"A Domicilio"}}],U_=[...Vp,{id:Ie.INTERNATIONAL.toString(),label:"Internacional",value:{deliveryTypeID:Ie.INTERNATIONAL,deliveryTypeName:"Internacional"}}],zp=({formik:e})=>{const{values:t,touched:r,errors:n,handleBlur:s,setFieldValue:i}=e,{store:a}=u.useContext(go),o=d=>{i("pickupType",d),d.value.deliveryTypeID===Ie.OFFICE?(i("originStore",a),i("originAddress",a?.address??null)):(i("originStore",null),i("originAddress",null))},c=d=>{i("deliveryType",d),i("destinationStore",null),i("destinationAddress",null)};return l.jsx("div",{className:"w-full mx-auto",children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(A_,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-lg font-bold",children:"Direcciones"})]})}),l.jsxs("div",{className:"flex flex-col w-full gap-4 p-4",children:[l.jsxs("div",{className:"flex-1",children:[l.jsxs("div",{className:"flex items-center gap-8 pr-2 justify-between text-sm font-medium leading-6 text-gray-700 truncate dark:text-gray-200",children:[l.jsxs("p",{children:["Origen ",l.jsx("span",{className:"text-red-500",children:"*"})]}),l.jsx("div",{className:"mb-1",children:l.jsx(oi,{id:"pickupType",name:"pickupType",label:"",options:Vp,selected:t.pickupType,onSelectOption:o,onBlur:s,wrapperClassName:"flex-row"})})]}),l.jsx("div",{className:"w-full",children:t.pickupType?.value.deliveryTypeID===Ie.OFFICE&&l.jsx(ct,{disabled:!0,label:"",id:"originStore",name:"originStore",placeholder:"Seleccione una tienda",options:[],selected:t.originStore,searchText:t.originStore?.value.commercialName,error:r.originStore&&n.originStore,onSelectOption:()=>{},onBlur:s})})]}),l.jsx("div",{className:"flex-1",children:l.jsxs("div",{className:"flex items-center gap-8 pr-2 justify-between text-sm font-medium leading-6 text-gray-700 truncate dark:text-gray-200",children:[l.jsxs("p",{children:["Destino ",l.jsx("span",{className:"text-red-500",children:"*"})]}),l.jsx("div",{className:"mb-1",children:l.jsx(oi,{id:"deliveryType",name:"deliveryType",label:"",options:U_,selected:t.deliveryType,onSelectOption:c,onBlur:s,wrapperClassName:"flex-row"})})]})})]})]})})},Bp=({user:e,date:t,observation:r,wrapperClassName:n})=>l.jsxs("div",{className:A("flex flex-col gap-6 rounded-lg border p-6 border-gray-300 dark:border-gray-700 text-gray-800 dark:text-gray-300 bg-gray-50 dark:bg-gray-800 max-w-full",n),children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-600/60 dark:bg-indigo-300/20 p-2 backdrop-blur-sm text-gray-100",children:l.jsx(Hm,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-lg font-bold",children:"Entrega"})]}),l.jsxs("div",{className:"space-y-0.5",children:[l.jsxs("div",{children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:"Usuario: "}),l.jsx("span",{className:"text-sm text-muted-foreground",children:e})]}),l.jsxs("div",{children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:"Fecha: "}),l.jsx("span",{className:"text-sm text-muted-foreground",children:R(t).format("DD/MM/YYYY, hh:mm A")})]}),l.jsxs("div",{children:[l.jsxs("span",{className:"text-sm font-medium text-foreground",children:["Observaciones:"," "]}),l.jsx("span",{className:"text-sm text-muted-foreground",children:r||"—"})]})]})]}),V_=e=>{switch(e){case gr.ACTIVE:return"primary";case gr.ANNULLED:return"danger";case gr.DELIVERED:return"success";case gr.DRAFT:return"warning";case gr.REPLACED:default:return"default"}},Wp=({shipment:e,onSubstituteForClick:t,onSubstitutedByClick:r})=>l.jsx("div",{className:"bg-gradient-subtle",children:l.jsxs("div",{className:"mx-auto max-w-6xl",children:[l.jsx("div",{className:"mb-6 overflow-hidden border-none shadow-lg",children:l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 p-6 dark:from-indigo-800 dark:to-indigo-600",children:l.jsxs("div",{className:"flex relative items-start justify-between",children:[l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-3 backdrop-blur-sm hidden md:block",children:l.jsx(en,{className:"h-8 w-8"})}),l.jsxs("div",{children:[l.jsx("p",{className:"mb-1 text-sm font-medium opacity-90",children:"Número de Guía"}),l.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:e.shipmentNumber}),l.jsxs("p",{className:"mt-2 text-sm opacity-90",children:["Creación:"," ",R(e.shipmentHeaderDate).format("DD/MM/YYYY, hh:mm A")]}),l.jsxs("p",{className:A("text-sm",!e.substituteFor&&"hidden"),children:["Sustituto de:"," ",l.jsx(Ae,{className:"text-white hover:text-white/80 underline dark:no-underline font-semibold",onClick:t,children:e.substituteFor})]}),l.jsxs("p",{className:A("text-sm",!e.substitutedBy&&"hidden"),children:["Sustituido por:"," ",l.jsx(Ae,{className:"text-white hover:text-white/80 underline dark:no-underline font-semibold",onClick:r,children:e.substitutedBy})]})]})]}),l.jsx(Zr,{color:V_(e.status.id),className:"!text-base absolute top-0 right-0",children:e.status.name})]})})}),l.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[l.jsx("div",{className:"lg:col-span-2",children:l.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[l.jsx("div",{className:"border-none shadow-md transition-all hover:shadow-xl p-6 bg-gray-100 dark:bg-gray-800 rounded-lg",children:l.jsx(eo,{isShipper:!0,account:e.shipper,store:e.originStore,deliveryType:e.pickupType.deliveryTypeID,isAccountBillTo:e.billTo.id===e.shipper.id,address:e.originAddress})}),l.jsx("div",{className:"border-none shadow-md transition-all hover:shadow-xl p-6 bg-gray-100 dark:bg-gray-800 rounded-lg",children:l.jsx(eo,{account:e.consignee,store:e.destinationStore,deliveryType:e.deliveryType.deliveryTypeID,isAccountBillTo:e.billTo.id===e.consignee.id,address:e.destinationAddress})})]})}),l.jsx("div",{className:"lg:col-span-1",children:l.jsxs("div",{className:"sticky top-8 border-none shadow-lg bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-400 rounded-b-lg",children:[l.jsx("div",{className:"bg-indigo-600 text-gray-100 dark:bg-indigo-700 p-4",children:l.jsxs("h2",{className:"flex items-center gap-2 text-lg font-semibold",children:[l.jsx(en,{className:"h-5 w-5"}),"Resumen"]})}),l.jsxs("div",{className:"p-6",children:[l.jsxs("div",{className:"gap-2 mb-2",children:[l.jsx("p",{className:"text-sm text-muted-foreground",children:"Servicio"}),l.jsx("p",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:e.service.serviceShortName})]}),l.jsxs("div",{className:"gap-2 mb-2",children:[l.jsx("p",{className:"text-sm text-muted-foreground",children:"Modalidad de Pago"}),l.jsx("p",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:e.paymentMode.paymentModeName})]}),e.paymentMode.paymentModeID===al.CREDIT&&l.jsxs("div",{className:"gap-2",children:[l.jsx("p",{className:"text-sm text-muted-foreground",children:"Crédito de"}),l.jsx("p",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:e.billTo.fullName})]}),l.jsx(Kr,{className:"my-4"}),l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-sm text-muted-foreground",children:"Con impuestos"}),l.jsxs("span",{className:"text-lg font-bold text-indigo-600 dark:text-indigo-400",children:["$",e.totalAmount.toFixed(2)]})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-sm text-muted-foreground",children:"Nº de piezas"}),l.jsx("span",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:e.totalPieces})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-sm text-muted-foreground",children:"Peso por facturar"}),l.jsxs("span",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:[e.totalChargedWeight.toFixed(2)," Kg"]})]})]})]})]})})]})]})}),Yp=({item:e,index:t})=>l.jsxs("tr",{className:A("hover:bg-gray-300 dark:hover:bg-gray-600 transition-colors duration-100 font-normal text-xs h-12",t%2===0?"bg-gray-100 dark:bg-gray-700":"bg-gray-200 dark:bg-gray-800"),children:[l.jsxs("td",{className:"text-muted-foreground px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 font-semibold",children:[l.jsx("p",{children:e.itemDescription}),l.jsx("p",{className:"sm:hidden font-normal",children:e.itemDetails})]}),l.jsx("td",{className:"hidden sm:table-cell text-muted-foreground px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3",children:e.itemDetails}),l.jsxs("td",{className:"px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 truncate font-semibold text-right text-sm",children:[e.subTotalAmount<0&&"-","$",Math.abs(e.subTotalAmount).toFixed(2)]})]}),Hp=({items:e,subTotalAmount:t,vatAmount:r,postalTaxAmount:n,totalAmount:s,wrapperClassName:i})=>l.jsx("div",{className:A("w-full mx-auto",i),children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(nv,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-xl font-bold",children:"Items"})]})}),l.jsxs("div",{className:"p-4",children:[l.jsxs(vi,{children:[l.jsx("thead",{className:"sticky top-0 z-10 bg-gray-50 dark:bg-gray-800",children:l.jsxs("tr",{className:"border-b-2",children:[l.jsx("th",{className:"text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(jd,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Servicio"})]})}),l.jsx("th",{className:"hidden sm:table-cell text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(rv,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Detalles"})]})}),l.jsx("th",{className:"w-24 text-right text-xs uppercase font-semibold tracking-wider px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(kS,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Costo"})]})})]})}),l.jsx("tbody",{children:e.map((a,o)=>l.jsx(Yp,{item:a,index:o},a.itemID))})]}),l.jsx("div",{className:"flex flex-col sm:flex-row gap-4 justify-end text-sm mt-4",children:l.jsxs("div",{className:"space-y-1 text-gray-800 dark:text-gray-300",children:[l.jsxs("div",{className:"flex items-center justify-between gap-16",children:[l.jsx("span",{className:"text-muted-foreground font-semibold uppercase",children:"Subtotal"}),l.jsxs("span",{className:"font-bold text-indigo-600 dark:text-indigo-400 truncate",children:["$",t.toFixed(2)]})]}),l.jsx(Kr,{}),l.jsxs("div",{className:"flex items-center justify-between gap-16",children:[l.jsx("span",{className:"text-muted-foreground",children:"IVA (16%)"}),l.jsxs("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:["$",r.toFixed(2)]})]}),l.jsxs("div",{className:"flex items-center justify-between gap-16",children:[l.jsx("span",{className:"text-muted-foreground",children:"Franqueo Postal"}),l.jsxs("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:["$",n.toFixed(2)]})]}),l.jsx(Kr,{}),l.jsxs("div",{className:"flex items-center justify-between gap-16",children:[l.jsx("span",{className:"font-bold text-muted-foreground uppercase",children:"Total"}),l.jsxs("span",{className:"font-bold text-indigo-600 dark:text-indigo-400 truncate",children:["$",s.toFixed(2)]})]})]})})]})]})}),Gp=({tracking:e,index:t})=>l.jsxs("tr",{className:A("hover:bg-gray-300 dark:hover:bg-gray-600 transition-colors duration-100 font-normal text-xs h-12",t%2===0?"bg-gray-100 dark:bg-gray-700":"bg-gray-200 dark:bg-gray-800"),children:[l.jsx("td",{className:"text-muted-foreground px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 font-semibold",children:R(e.date).format("DD/MM/YYYY, hh:mm A")}),l.jsxs("td",{className:"text-muted-foreground px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3",children:[l.jsx("p",{className:"font-semibold text-indigo-600 dark:text-indigo-400",children:e.description}),l.jsx("p",{className:"font-normal",children:e.details})]})]}),qp=({trackings:e,onPublicAppClick:t,wrapperClassName:r})=>l.jsx("div",{className:A("w-full mx-auto",r),children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(Md,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-xl font-bold",children:"Tracking"})]})}),l.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[l.jsx("p",{className:A(!t&&"hidden"),children:l.jsx(Ae,{onClick:t,children:"Ver guía en Tealca Consultas"})}),l.jsxs(vi,{children:[l.jsx("thead",{className:"sticky top-0 z-10 bg-gray-50 dark:bg-gray-800",children:l.jsxs("tr",{className:"border-b-2",children:[l.jsx("th",{className:"text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(tf,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Fecha"})]})}),l.jsx("th",{className:"text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(R_,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Evento"})]})})]})}),l.jsx("tbody",{children:e.map((n,s)=>l.jsx(Gp,{tracking:n,index:s},n.trackingID))})]})]})]})}),Zp=({showPOD:e,showInvoice:t,isPhysicalLiability:r,isPhysicalPOD:n,invoiceNumber:s,onShowLiabilityWaiver:i,onDownloadLiabilityWaiver:a,onShowPOD:o,onDownloadPOD:c,onShowInvoiceAttachments:d,wrapperClassName:f})=>l.jsxs("div",{className:A("flex flex-col gap-6 rounded-lg border p-6 border-gray-300 dark:border-gray-700 text-gray-800 dark:text-gray-300 bg-gray-50 dark:bg-gray-800 max-w-full",f),children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-600/60 dark:bg-indigo-300/20 p-2 backdrop-blur-sm text-gray-100",children:l.jsx(Y0,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-lg font-bold",children:"Documentos Digitales"})]}),l.jsxs("div",{className:"space-y-0.5",children:[l.jsxs("div",{children:[l.jsxs("span",{className:"text-sm font-medium text-foreground",children:["Declaración Jurada:"," "]}),l.jsx("span",{className:A("ml-3 text-sm text-muted-foreground",!r&&"hidden"),children:"Llenada en el documento físico"}),l.jsx("p",{className:"ml-4",children:l.jsx(Ae,{onClick:i,className:A("text-sm text-muted-foreground",r&&"hidden"),children:"Ver Declaración Jurada"})}),l.jsx("p",{className:"ml-4",children:l.jsx(Ae,{onClick:a,className:A("text-sm text-muted-foreground",r&&"hidden"),children:"Descargar Declaración Jurada"})})]}),l.jsxs("div",{className:A(!e&&"hidden"),children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:"POD: "}),l.jsx("span",{className:A("ml-3 text-sm text-muted-foreground",!n&&"hidden"),children:"Llenada en el documento físico"}),l.jsx("p",{className:"ml-4",children:l.jsx(Ae,{onClick:o,className:A("text-sm text-muted-foreground",n&&"hidden"),children:"Ver POD"})}),l.jsx("p",{className:"ml-4",children:l.jsx(Ae,{onClick:c,className:A("text-sm text-muted-foreground",n&&"hidden"),children:"Descargar POD"})})]}),l.jsxs("div",{className:A(!t&&"hidden"),children:[l.jsxs("span",{className:"text-sm font-medium text-foreground",children:["Factura de la mercancia:"," "]}),l.jsx("p",{className:"ml-4 text-sm text-muted-foreground",children:l.jsx("span",{children:s})}),l.jsx("p",{className:"ml-4 text-sm text-muted-foreground",children:l.jsx(Ae,{onClick:d,children:"Ver Adjuntos"})})]})]})]}),z_=({shipment:e,trackings:t,showLiabilityWaiver:r,showPOD:n,showInvoice:s,isPhysicalLiability:i,isPhysicalPOD:a,invoiceNumber:o,onSubstituteForClick:c,onSubstitutedByClick:d,onInvoiceClick:f,onPublicAppClick:h,onShowLiabilityWaiver:p,onDownloadLiabilityWaiver:v,onShowPOD:m,onDownloadPOD:x,onShowInvoiceAttachments:y,onPrintParcel:E,onPrintShipment:k,onEdit:O,onCancel:b,onDeliver:g})=>{const[w,S]=u.useState(!1);return l.jsxs("div",{className:"flex flex-col gap-8",children:[l.jsx(Wp,{shipment:e,onSubstituteForClick:c,onSubstitutedByClick:d}),l.jsxs("div",{className:"rounded-lg border border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800 shadow-sm overflow-hidden",children:[l.jsxs("div",{className:"w-full flex items-center justify-between p-5 cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-700 text-xl font-bold text-gray-800 dark:text-gray-200",onClick:()=>S(!w),children:[l.jsx("span",{children:"Detalles"}),l.jsx(uo,{className:A("ml-2 transition-transform duration-1000 text-gray-500 dark:text-gray-300",w?"rotate-180":"rotate-0"),"aria-label":w?"Colapsar":"Expandir"})]}),l.jsx(Cd,{active:w,duration:1e3,children:l.jsxs("div",{className:"flex flex-col p-2 md:p-4 lg:p-6 gap-14 pb-16",children:[e.invoices.length>0&&l.jsx(Ip,{invoices:e.invoices,onInvoiceClick:f}),e.parcels.length>0&&l.jsx($p,{parcels:e.parcels,totalPhysicalWeight:e.totalPhysicalWeight,totalDimensionalWeight:e.totalDimensionalWeight,totalChargedWeight:e.totalChargedWeight,totalVolume:e.totalVolume,dimensionalFactor:e.dimensionalFactor,onPrintParcel:E,onPrintShipment:k}),e.items.length>0&&l.jsx(Hp,{items:e.items,subTotalAmount:e.subTotalAmount,vatAmount:e.vatAmount,postalTaxAmount:e.postalTaxAmount,totalAmount:e.totalAmount}),t.length>0&&l.jsx(qp,{trackings:t,onPublicAppClick:h}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[e.deliveryDate&&e.deliveryUser&&l.jsx(Bp,{user:e.deliveryUser,date:e.deliveryDate,observation:e.deliveryObservation}),r&&l.jsx(Zp,{showPOD:n,showInvoice:s,isPhysicalLiability:i,isPhysicalPOD:a,invoiceNumber:o,onShowLiabilityWaiver:p,onDownloadLiabilityWaiver:v,onShowPOD:m,onDownloadPOD:x,onShowInvoiceAttachments:y})]}),l.jsx(Up,{shipment:e,wrapperClassName:"h-[30rem]"})]})})]}),l.jsx("div",{className:"mt-2 md:mt-6 w-full flex flex-col gap-4 md:gap-0",children:l.jsxs("div",{className:"w-full flex flex-col-reverse md:flex-row justify-between items-center gap-4",children:[l.jsx("div",{className:"flex flex-col-reverse md:flex-row gap-4 items-center w-full",children:b&&l.jsxs(Ae,{onClick:b,children:[l.jsx(Td,{className:"w-5 h-5 inline mr-1 mb-0.5"}),"Anular"]})}),l.jsxs("div",{className:"flex flex-col md:flex-row gap-4 items-center w-full md:w-fit",children:[O&&l.jsxs(rt,{className:"w-full md:w-36",onClick:O,children:[l.jsx(Vh,{className:"w-4 h-4 inline mr-2"}),"Editar"]}),g&&l.jsxs(rt,{className:"w-full md:w-36",onClick:g,children:[l.jsx(dv,{className:"w-4 h-4 inline mr-2"}),"Entregar"]})]})]})})]})},fd={id:"",label:"Crear nuevo",value:null},B_=[{id:rr.PERSON.toString(),label:"Persona",value:rr.PERSON},{id:rr.BOX_ACCOUNT.toString(),label:"Casillero",value:rr.BOX_ACCOUNT}],Kp=({formik:e})=>{const{values:t,touched:r,errors:n,handleBlur:s,setFieldValue:i}=e,[a,o]=u.useState(!1),[c,d]=u.useState(!1),[f,h]=u.useState(""),[p,v]=u.useState(""),m=E=>{if(E.value===null){o(!0);return}i("shipper",E),i("consigneeType",{id:rr.PERSON.toString(),label:"Persona",value:rr.PERSON}),i("consignee",null)},x=E=>{i("consigneeType",E),i("consignee",null)},y=E=>{if(E.value===null){d(!0);return}i("consignee",E)};return l.jsx("div",{className:"w-full mx-auto",children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(TS,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-lg font-bold",children:"Partes Involucradas"})]})}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 w-full gap-4 p-4 md:h-28",children:[l.jsxs("div",{className:"flex-1",children:[l.jsx(ct,{required:!0,label:"Remitente",id:"shipper",name:"shipper",placeholder:"Seleccione un remitente",options:[],selected:t.shipper,searchText:f,error:r.shipper&&n.shipper,onSelectOption:m,onBlur:s,setSearchText:h,footerOption:fd}),l.jsxs(Xs,{open:a,onClose:()=>o(!1),children:[l.jsx("h2",{className:"text-lg font-bold text-gray-900 dark:text-white mb-4",children:"Crear nuevo cliente"}),l.jsx(Ha,{onSubmit:()=>{},onCancel:E=>{o(!1),E.resetForm()}})]})]}),l.jsxs("div",{className:"flex-1",children:[l.jsxs("div",{className:"flex items-center gap-8 pr-2 justify-between text-sm font-medium leading-6 text-gray-700 truncate dark:text-gray-200",children:[l.jsxs("p",{children:["Destinatario ",l.jsx("span",{className:"text-red-500",children:"*"})]}),l.jsx("div",{className:"mb-1",children:l.jsx(oi,{id:"consigneeType",name:"consigneeType",label:"",options:B_,selected:t.consigneeType,disabled:!t.shipper,onSelectOption:x,onBlur:s,wrapperClassName:"flex-row"})})]}),l.jsx("div",{className:"w-full",children:l.jsx(ct,{label:"",id:"consignee",name:"consignee",placeholder:"Seleccione un destinatario",options:[],selected:t.consignee,disabled:!t.shipper,searchText:p,error:r.consignee&&n.consignee,onSelectOption:y,onBlur:s,setSearchText:v,footerOption:fd})}),l.jsxs(Xs,{open:c,onClose:()=>d(!1),children:[l.jsx("h2",{className:"text-lg font-bold text-gray-900 dark:text-white mb-4",children:"Crear nuevo cliente"}),l.jsx(Ha,{onSubmit:()=>{},onCancel:E=>{d(!1),E.resetForm()}})]})]})]})]})})},W_=({formik:e})=>l.jsxs("div",{className:"flex flex-col gap-6",children:[l.jsx(Kp,{formik:e}),l.jsx(zp,{formik:e})]}),Y_=({index:e,shipment:t})=>l.jsxs("div",{className:"flex flex-col gap-8 w-full",children:[l.jsx("div",{className:"overflow-hidden border-none shadow-lg",children:l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 p-6 dark:from-indigo-800 dark:to-indigo-600",children:l.jsx("div",{className:"flex relative items-start justify-between",children:l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-3 backdrop-blur-sm hidden md:block",children:l.jsx(en,{className:"h-8 w-8"})}),t&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{children:[l.jsx("p",{className:"mb-1 text-sm font-medium opacity-90",children:"Número de Guía"}),l.jsxs("h1",{className:"text-3xl font-bold tracking-tight",children:[t.shipmentNumber," ",l.jsx("span",{className:"font-normal italic",children:"(Edición)"})]}),l.jsxs("p",{className:"mt-2 text-sm opacity-90",children:["Creación:"," ",R(t.shipmentHeaderDate).format("DD/MM/YYYY, hh:mm A")]})]}),l.jsx(Zr,{color:"default",className:"!text-base absolute top-0 right-0",children:t.status.name})]}),!t&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{children:[l.jsx("p",{className:"mb-1 text-sm font-medium opacity-90",children:"Guía Número"}),l.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:e.toString().padStart(3,"0")})]}),l.jsx(Zr,{color:"primary",className:"!text-base absolute top-0 right-0",children:"Nueva Guía"})]})]})})})}),l.jsx(Jn,{initialValues:Ap,onSubmit:()=>{},children:r=>l.jsx(W_,{formik:r})})]}),H_=(e,t=!1)=>{const r=t?"-":"_";return e.replace(/[A-Z]/g,n=>`${r}${n.toLowerCase()}`)},tn=(e,t=!1)=>Array.isArray(e)?e.map(r=>tn(r)):e!==null&&e.constructor===Object?Object.keys(e).reduce((r,n)=>(r[H_(n,t)]=tn(e[n]),r),{}):e;function G_(e){return e.replace(/([-_][a-z])/gi,t=>t.toUpperCase().replace("-","").replace("_",""))}function pi(e){if(Array.isArray(e))return e.map(pi);if(e!==null&&typeof e=="object"){const t={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const n=G_(r);t[n]=pi(e[r])}return t}return e}const Jp=(e,t)=>{const r=eh();return u.useMemo(()=>{const s=Ne.create({baseURL:e});return s.interceptors.request.use(i=>{const a=r.getState().auth.accessToken;return a&&i.headers&&(i.headers.Authorization=`Bearer ${a}`),i.data&&(i.data=tn(i.data)),i.params&&(i.params=tn(i.params,!0)),i},i=>Promise.reject(i)),s.interceptors.response.use(i=>(i.data&&(i.data=pi(i.data)),i),async i=>{const a=i.config;if(i.response?.status===401&&!a._retry){a._retry=!0;const o=r.getState().auth.refreshToken;if(o)try{const c=await Fh(t,o);if(c.data){const{accessToken:d}=c.data,f=r.getState().auth;if(f.user)return r.dispatch(Kf({user:f.user,...c.data})),a.headers.Authorization=`Bearer ${d}`,Ne(a)}}catch(c){return Promise.reject(c)}}return Promise.reject(i)}),s},[e,t,r])},Xp=e=>u.useMemo(()=>{const r=Ne.create({baseURL:e,headers:{"Content-Type":"application/json"}});return r.interceptors.request.use(n=>(n.data&&(n.data=tn(n.data)),n.params&&(n.params=tn(n.params,!0)),n),n=>Promise.reject(n)),r.interceptors.response.use(n=>(n.data&&(n.data=pi(n.data)),n),n=>Promise.reject(n)),r},[e]),q_=({children:e,applicationId:t})=>{const r=Xp("http://localhost:8000/api"),n=Jp("http://localhost:8000/api",r),[s,i]=u.useState(null);return u.useEffect(()=>{(async()=>{const o=await Ph(r,t);if(o.error||!o.data){console.error(o.message);return}i(o.data)})()},[t,r]),l.jsx(on.Provider,{value:{application:s,googleMapsApiKey:void 0,clientId:void 0,clientSecret:void 0,api:n,basicApi:r},children:e})};exports.AccountForm=Ha;exports.AnimatedCollapse=Cd;exports.AppContext=on;exports.AppProvider=q_;exports.AuthContext=go;exports.Badge=Zr;exports.Button=so;exports.CategoryTypeID=Pp;exports.Checkbox=mi;exports.ConsigneeType=rr;exports.DeliveryTypeID=Ie;exports.ErrorCard=En;exports.ForgotPassword=xS;exports.GoogleMap=Jd;exports.InputCheckboxSelect=P1;exports.InputDate=A1;exports.InputFile=R1;exports.InputFileDrop=I1;exports.InputGoogleMap=nh;exports.InputInteger=sh;exports.InputLocationSelect=B1;exports.InputRadioSelect=oi;exports.InputSelect=ct;exports.InputSelectGrouped=W1;exports.InputText=Be;exports.InputTextArea=Y1;exports.InvoiceStatus=Dp;exports.InvoiceSummary=Rp;exports.InvoiceSummaryList=Ip;exports.InvoiceType=Nn;exports.Link=Ae;exports.LoadingSpinner=gi;exports.Login=wS;exports.Modal=Xs;exports.ParcelForm=$_;exports.ParcelRow=Fp;exports.ParcelTable=$p;exports.PaymentModeID=al;exports.Popover=Xd;exports.PopoverMenu=B0;exports.PrimaryButton=rt;exports.SecondaryButton=Tn;exports.Separator=Kr;exports.ServiceID=Pt;exports.ShipmentAccountSummary=eo;exports.ShipmentAddresses=Up;exports.ShipmentAddressesForm=zp;exports.ShipmentDeliveryData=Bp;exports.ShipmentDetails=z_;exports.ShipmentDocument=Zp;exports.ShipmentForm=Y_;exports.ShipmentItemRow=Yp;exports.ShipmentItemTable=Hp;exports.ShipmentPartiesForm=Kp;exports.ShipmentStatusID=gr;exports.ShipmentSummary=Wp;exports.SideMenu=T1;exports.Switch=W0;exports.Table=vi;exports.TrackingRow=Gp;exports.TrackingTable=qp;exports.WarningCard=Qd;exports.getApplication=Ph;exports.getCategories=$h;exports.getCountries=Rh;exports.getTaxIdentificationTypes=Ah;exports.getToken=Ih;exports.makeStore=M1;exports.refreshToken=Fh;exports.shipmentInitialValues=Ap;exports.useApi=Jp;exports.useAppDispatch=Eo;exports.useAppSelector=t1;exports.useAppStore=eh;exports.useBasicApi=Xp;
|