var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports);(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var t=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var ee=Array.isArray;function S(){}var C={H:null,A:null,T:null,S:null},te=Object.prototype.hasOwnProperty;function ne(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function re(e,t){return ne(e.type,t,e.props)}function ie(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ae(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var oe=/\/+/g;function se(e,t){return typeof e==`object`&&e&&e.key!=null?ae(``+e.key):t.toString(36)}function ce(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(S,S):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function le(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,le(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+se(e,0):a,ee(o)?(i=``,c!=null&&(i=c.replace(oe,`$&/`)+`/`),le(o,r,i,``,function(e){return e})):o!=null&&(ie(o)&&(o=re(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(oe,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(ee(e))for(var u=0;u{n.exports=t()})),r=e((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,ee||(ee=!0,ie());else{var t=n(l);t!==null&&se(x,t.startTime-e)}}}var ee=!1,S=-1,C=5,te=-1;function ne(){return g?!0:!(e.unstable_now()-tet&&ne());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&se(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}}}finally{i?ie():ee=!1}}}var ie;if(typeof y==`function`)ie=function(){y(re)};else if(typeof MessageChannel<`u`){var ae=new MessageChannel,oe=ae.port2;ae.port1.onmessage=re,ie=function(){oe.postMessage(null)}}else ie=function(){_(re,0)};function se(t,n){S=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(S),S=-1):h=!0,se(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ee||(ee=!0,ie()))),r},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),i=e(((e,t)=>{t.exports=r()})),a=e((e=>{var t=n();function r(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=a()})),s=e((e=>{var t=i(),r=n(),a=o();function s(e){var t=`https://react.dev/errors/`+e;if(1me||(e.current=pe[me],pe[me]=null,me--)}function E(e,t){me++,pe[me]=e.current,e.current=t}var _e=he(null),ve=he(null),ye=he(null),be=he(null);function xe(e,t){switch(E(ye,t),E(ve,e),E(_e,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ge(_e),E(_e,e)}function Se(){ge(_e),ge(ve),ge(ye)}function Ce(e){e.memoizedState!==null&&E(be,e);var t=_e.current,n=Hd(t,e.type);t!==n&&(E(ve,e),E(_e,n))}function D(e){ve.current===e&&(ge(_e),ge(ve)),be.current===e&&(ge(be),Qf._currentValue=fe)}var we,Te;function Ee(e){if(we===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);we=t&&t[1]||``,Te=-1)`:-1i||c[r]!==l[i]){var u=` `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{O=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ee(n):``}function Oe(e,t){switch(e.tag){case 26:case 27:case 5:return Ee(e.type);case 16:return Ee(`Lazy`);case 13:return e.child!==t&&t!==null?Ee(`Suspense Fallback`):Ee(`Suspense`);case 19:return Ee(`SuspenseList`);case 0:case 15:return De(e.type,!1);case 11:return De(e.type.render,!1);case 1:return De(e.type,!0);case 31:return Ee(`Activity`);default:return``}}function ke(e){try{var t=``,n=null;do t+=Oe(e,n),n=e,e=e.return;while(e);return t}catch(e){return` Error generating stack: `+e.message+` `+e.stack}}var Ae=Object.prototype.hasOwnProperty,je=t.unstable_scheduleCallback,Me=t.unstable_cancelCallback,Ne=t.unstable_shouldYield,Pe=t.unstable_requestPaint,Fe=t.unstable_now,Ie=t.unstable_getCurrentPriorityLevel,Le=t.unstable_ImmediatePriority,Re=t.unstable_UserBlockingPriority,ze=t.unstable_NormalPriority,Be=t.unstable_LowPriority,Ve=t.unstable_IdlePriority,He=t.log,Ue=t.unstable_setDisableYieldValue,We=null,Ge=null;function Ke(e){if(typeof He==`function`&&Ue(e),Ge&&typeof Ge.setStrictMode==`function`)try{Ge.setStrictMode(We,e)}catch{}}var k=Math.clz32?Math.clz32:Je,A=Math.log,qe=Math.LN2;function Je(e){return e>>>=0,e===0?32:31-(A(e)/qe|0)|0}var Ye=256,Xe=262144,Ze=4194304;function Qe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function $e(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Qe(n))):i=Qe(o):i=Qe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Qe(n))):i=Qe(o)):i=Qe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function et(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function tt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function nt(){var e=Ze;return Ze<<=1,!(Ze&62914560)&&(Ze=4194304),e}function rt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function it(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function at(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),gn=!1;if(hn)try{var _n={};Object.defineProperty(_n,"passive",{get:function(){gn=!0}}),window.addEventListener(`test`,_n,_n),window.removeEventListener(`test`,_n,_n)}catch{gn=!1}var vn=null,yn=null,bn=null;function xn(){if(bn)return bn;var e,t=yn,n=t.length,r,i=`value`in vn?vn.value:vn.textContent,a=i.length;for(e=0;e=Zn),er=` `,tr=!1;function nr(e,t){switch(e){case`keyup`:return Yn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function rr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var ir=!1;function ar(e,t){switch(e){case`compositionend`:return rr(t);case`keypress`:return t.which===32?(tr=!0,er):null;case`textInput`:return e=t.data,e===er&&tr?null:e;default:return null}}function or(e,t){if(ir)return e===`compositionend`||!Xn&&nr(e,t)?(e=xn(),bn=yn=vn=null,ir=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Or(n)}}function Ar(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ar(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Wt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Wt(e.document)}return t}function Mr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Nr=hn&&`documentMode`in document&&11>=document.documentMode,Pr=null,Fr=null,Ir=null,Lr=!1;function Rr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Lr||Pr==null||Pr!==Wt(r)||(r=Pr,`selectionStart`in r&&Mr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ir&&Dr(Ir,r)||(Ir=r,r=Ed(Fr,`onSelect`),0>=o,i-=o,Ai=1<<32-k(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),o=a(_,o,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),I&&Mi(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),o=a(y,o,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),I&&Mi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return I&&Mi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),I&&Mi(i,g),u}function b(e,r,a,c){if(typeof a==`object`&&a&&a.type===y&&a.key===null&&(a=a.props.children),typeof a==`object`&&a){switch(a.$$typeof){case _:a:{for(var l=a.key;r!==null;){if(r.key===l){if(l=a.type,l===y){if(r.tag===7){n(e,r.sibling),c=i(r,a.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ie&&ja(l)===r.type){n(e,r.sibling),c=i(r,a.props),Ra(c,a),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}a.type===y?(c=_i(a.props.children,e.mode,c,a.key),c.return=e,e=c):(c=gi(a.type,a.key,a.props,null,e.mode,c),Ra(c,a),c.return=e,e=c)}return o(e);case v:a:{for(l=a.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),c=i(r,a.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=bi(a,e.mode,c),c.return=e,e=c}return o(e);case ie:return a=ja(a),b(e,r,a,c)}if(de(a))return h(e,r,a,c);if(ce(a)){if(l=ce(a),typeof l!=`function`)throw Error(s(150));return a=l.call(a),g(e,r,a,c)}if(typeof a.then==`function`)return b(e,r,La(a),c);if(a.$$typeof===S)return b(e,r,aa(e,a),c);za(e,a)}return typeof a==`string`&&a!==``||typeof a==`number`||typeof a==`bigint`?(a=``+a,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,a),c.return=e,e=c):(n(e,r),c=vi(a,e.mode,c),c.return=e,e=c),o(e)):n(e,r)}return function(e,t,n,r){try{Ia=0;var i=b(e,t,n,r);return Fa=null,i}catch(t){if(t===Ta||t===Da)throw t;var a=fi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Va=Ba(!0),Ha=Ba(!1),Ua=!1;function Wa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ga(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ka(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function qa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,G&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=li(e),ci(e,null,n),t}return ai(e,r,t,n),li(e)}function Ja(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,st(e,n)}}function Ya(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Xa=!1;function Za(){if(Xa){var e=ga;if(e!==null)throw e}}function Qa(e,t,n,r){Xa=!1;var i=e.updateQueue;Ua=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(J&f)===f:(r&f)===f){f!==0&&f===ha&&(Xa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Ua=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function $a(e,t){if(typeof e!=`function`)throw Error(s(191,e));e.call(t)}function eo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=w.T,s={};w.T=s,Fs(e,!1,t,n);try{var c=i(),l=w.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ps(e,t,ya(c,r),pu(e)):Ps(e,t,r,pu(e))}catch(n){Ps(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{T.p=a,o!==null&&s.types!==null&&(o.types=s.types),w.T=o}}function ws(){}function Ts(e,t,n,r){if(e.tag!==5)throw Error(s(476));var i=Es(e).queue;Cs(e,i,t,fe,n===null?ws:function(){return Ds(e),n(r)})}function Es(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:fe,baseState:fe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:fe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ds(e){var t=Es(e);t.next===null&&(t=e.alternate.memoizedState),Ps(e,t.next.queue,{},pu())}function Os(){return ia(Qf)}function ks(){return H().memoizedState}function As(){return H().memoizedState}function js(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Ka(n);var r=qa(t,e,n);r!==null&&(hu(r,t,n),Ja(r,t,n)),t={cache:da()},e.payload=t;return}t=t.return}}function Ms(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Is(e)?Ls(t,n):(n=oi(e,t,n,r),n!==null&&(hu(n,e,r),Rs(n,t,r)))}function Ns(e,t,n){Ps(e,t,n,pu())}function Ps(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Is(e))Ls(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Er(s,o))return ai(e,t,i,0),K===null&&ii(),!1}catch{}if(n=oi(e,t,i,r),n!==null)return hu(n,e,r),Rs(n,t,r),!0}return!1}function Fs(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Is(e)){if(t)throw Error(s(479))}else t=oi(e,n,r,2),t!==null&&hu(t,e,2)}function Is(e){var t=e.alternate;return e===R||t!==null&&t===R}function Ls(e,t){_o=go=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Rs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,st(e,n)}}var zs={readContext:ia,use:Po,useCallback:V,useContext:V,useEffect:V,useImperativeHandle:V,useLayoutEffect:V,useInsertionEffect:V,useMemo:V,useReducer:V,useRef:V,useState:V,useDebugValue:V,useDeferredValue:V,useTransition:V,useSyncExternalStore:V,useId:V,useHostTransitionStatus:V,useFormState:V,useActionState:V,useOptimistic:V,useMemoCache:V,useCacheRefresh:V};zs.useEffectEvent=V;var Bs={readContext:ia,use:Po,useCallback:function(e,t){return jo().memoizedState=[e,t===void 0?null:t],e},useContext:ia,useEffect:us,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),cs(4194308,4,gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){cs(4,2,e,t)},useMemo:function(e,t){var n=jo();t=t===void 0?null:t;var r=e();if(vo){Ke(!0);try{e()}finally{Ke(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=jo();if(n!==void 0){var i=n(t);if(vo){Ke(!0);try{n(t)}finally{Ke(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ms.bind(null,R,e),[r.memoizedState,e]},useRef:function(e){var t=jo();return e={current:e},t.memoizedState=e},useState:function(e){e=Ko(e);var t=e.queue,n=Ns.bind(null,R,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:vs,useDeferredValue:function(e,t){return xs(jo(),e,t)},useTransition:function(){var e=Ko(!1);return e=Cs.bind(null,R,e.queue,!0,!1),jo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=R,i=jo();if(I){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),K===null)throw Error(s(349));J&127||Vo(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,us(Uo.bind(null,r,a,e),[e]),r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,a,n,t),null),n},useId:function(){var e=jo(),t=K.identifierPrefix;if(I){var n=ji,r=Ai;n=(r&~(1<<32-k(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=yo++,0<\/script>`,a=a.removeChild(a.firstChild);break;case`select`:a=typeof r.is==`string`?o.createElement(`select`,{is:r.is}):o.createElement(`select`),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is==`string`?o.createElement(i,{is:r.is}):o.createElement(i)}}a[mt]=t,a[ht]=r;a:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)a.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break a;for(;o.sibling===null;){if(o.return===null||o.return===t)break a;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=a;a:switch(Pd(a,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Pc(t)}}return U(t),Fc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(s(166));if(e=ye.current,Wi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Li,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[mt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Vi(t,!0)}else e=Bd(e).createTextNode(r),e[mt]=t,t.stateNode=e}return U(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Wi(t),n!==null){if(e===null){if(!r)throw Error(s(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(s(557));e[mt]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;U(t),e=!1}else n=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(po(t),t):(po(t),null);if(t.flags&128)throw Error(s(558))}return U(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Wi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(s(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(s(317));i[mt]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;U(t),i=!1}else i=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(po(t),t):(po(t),null)}return po(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Lc(t,t.updateQueue),U(t),null);case 4:return Se(),e===null&&Sd(t.stateNode.containerInfo),U(t),null;case 10:return Qi(t.type),U(t),null;case 19:if(ge(L),r=t.memoizedState,r===null)return U(t),null;if(i=!!(t.flags&128),a=r.rendering,a===null){if(i)Rc(r,!1);else{if(X!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=mo(e),a!==null){for(t.flags|=128,Rc(r,!1),e=a.updateQueue,t.updateQueue=e,Lc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)hi(n,e),n=n.sibling;return E(L,L.current&1|2),I&&Mi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Fe()>tu&&(t.flags|=128,i=!0,Rc(r,!1),t.lanes=4194304)}}else{if(!i){if(e=mo(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Lc(t,e),Rc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!a.alternate&&!I)return U(t),null}else 2*Fe()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,i=!0,Rc(r,!1),t.lanes=4194304)}r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e===null?t.child=a:e.sibling=a,r.last=a)}return r.tail===null?(U(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Fe(),e.sibling=null,n=L.current,E(L,i?n&1|2:n&1),I&&Mi(t,r.treeForkCount),e);case 22:case 23:return po(t),ao(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(U(t),t.subtreeFlags&6&&(t.flags|=8192)):U(t),n=t.updateQueue,n!==null&&Lc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ge(xa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Qi(ua),U(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function Bc(e,t){switch(Fi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qi(ua),Se(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return D(t),null;case 31:if(t.memoizedState!==null){if(po(t),t.alternate===null)throw Error(s(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(po(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(L),null;case 4:return Se(),null;case 10:return Qi(t.type),null;case 22:case 23:return po(t),ao(),e!==null&&ge(xa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Qi(ua),null;case 25:return null;default:return null}}function Vc(e,t){switch(Fi(t),t.tag){case 3:Qi(ua),Se();break;case 26:case 27:case 5:D(t);break;case 4:Se();break;case 31:t.memoizedState!==null&&po(t);break;case 13:po(t);break;case 19:ge(L);break;case 10:Qi(t.type);break;case 22:case 23:po(t),ao(),e!==null&&ge(xa);break;case 24:Qi(ua)}}function Hc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Uc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Wc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{eo(t,n)}catch(t){Z(e,e.return,t)}}}function Gc(e,t,n){n.props=qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Kc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}}function Jc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Yc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[ht]=t}catch(t){Z(e,e.return,t)}}function Xc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Zc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Xc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=sn));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[mt]=e,t[ht]=n}catch(t){Z(e,e.return,t)}}var tl=!1,nl=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,Rd=sp,e=jr(e),Mr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break a}var o=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=o+i),f!==a||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=o),p===a&&++d===r&&(l=o),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,a=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Pd(a,r,n),a[mt]=e,Dt(a),r=a;break a;case`link`:var o=Vf(`link`,`href`,i).get(r+(n.href||``));if(o){for(var c=0;cg&&(o=g,g=h,h=o);var _=kr(s,h),v=kr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,w.T=null,n=lu,lu=null;var a=au,o=su;if(iu=0,ou=au=null,su=0,G&6)throw Error(s(331));var c=G;if(G|=4,Fl(a.current),Dl(a,a.current,o,n),G=c,id(0,!1),Ge&&typeof Ge.onPostCommitFiberRoot==`function`)try{Ge.onPostCommitFiberRoot(We,a)}catch{}return!0}finally{T.p=i,w.T=r,Vu(e,t)}}function Wu(e,t,n){t=Si(n,t),t=$s(e.stateNode,t,2),e=qa(e,t,2),e!==null&&(it(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=Si(n,e),n=ec(2),r=qa(t,n,2),r!==null&&(tc(n,r,t,e),it(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ul=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,K===e&&(J&n)===n&&(X===4||X===3&&(J&62914560)===J&&300>Fe()-$l?!(G&2)&&Su(e,0):ql|=n,Yl===J&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=nt()),e=si(e,t),e!==null&&(it(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return je(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-k(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=J,a=$e(r,r===K?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||et(r,a)||(n=!0,ld(r,a))}r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Fe(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Kt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),Dt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Kt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Kt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Kt(n.imageSizes)+`"]`)):i+=`[href="`+Kt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),Dt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Kt(r)+`"][href="`+Kt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),Dt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=Et(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);Dt(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=Et(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Dt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=Et(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Dt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=ye.current)?gf(i):null;if(!i)throw Error(s(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=Et(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var a=Et(i).hoistableStyles,o=a.get(e);if(o||(i=i.ownerDocument||i,o={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},a.set(e,o),(a=i.querySelector(jf(e)))&&!a._p&&(o.instance=a,o.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),a||Nf(i,e,n,o.state))),t&&r===null)throw Error(s(528,``));return o}if(t&&r!==null)throw Error(s(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=Et(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Af(e){return`href="`+Kt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),Dt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Kt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Kt(n.href)+`"]`);if(r)return t.instance=r,Dt(r),r;var i=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Dt(r),Pd(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var a=e.querySelector(jf(i));if(a)return t.state.loading|=4,t.instance=a,Dt(a),a;r=Mf(n),(i=mf.get(i))&&Rf(r,i),a=(e.ownerDocument||e).createElement(`link`),Dt(a);var o=a;return o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),t.state.loading|=4,Lf(a,n.precedence,e),t.instance=a;case`script`:return a=Pf(n.src),(i=e.querySelector(Ff(a)))?(t.instance=i,Dt(i),i):(r=n,(i=mf.get(a))&&(r=h({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),Dt(i),Pd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(s(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Dt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),Dt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=s()})),l=n(),u=c(),d=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),f=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),p=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),m=e=>{let t=p(e);return t.charAt(0).toUpperCase()+t.slice(1)},h={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},g=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},_=(0,l.createContext)({}),v=()=>(0,l.useContext)(_),y=(0,l.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:u=24,strokeWidth:f=2,absoluteStrokeWidth:p=!1,color:m=`currentColor`,className:_=``}=v()??{},y=r??p?Number(n??f)*24/Number(t??u):n??f;return(0,l.createElement)(`svg`,{ref:c,...h,width:t??u??h.width,height:t??u??h.height,stroke:e??m,strokeWidth:y,className:d(`lucide`,_,i),...!a&&!g(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,l.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),b=(e,t)=>{let n=(0,l.forwardRef)(({className:n,...r},i)=>(0,l.createElement)(y,{ref:i,iconNode:t,className:d(`lucide-${f(m(e))}`,`lucide-${e}`,n),...r}));return n.displayName=m(e),n},x=b(`award`,[[`path`,{d:`m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526`,key:`1yiouv`}],[`circle`,{cx:`12`,cy:`8`,r:`6`,key:`1vp47v`}]]),ee=b(`calendar`,[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]),S=b(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),C=b(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),te=b(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),ne=b(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),re=b(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),ie=b(`coffee`,[[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M14 2v2`,key:`6buw04`}],[`path`,{d:`M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1`,key:`pwadti`}],[`path`,{d:`M6 2v2`,key:`colzsn`}]]),ae=b(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),oe=b(`dollar-sign`,[[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`22`,key:`7eqyqh`}],[`path`,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`,key:`1b0p4s`}]]),se=b(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),ce=b(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),le=b(`link`,[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]),ue=b(`log-in`,[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]),de=b(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),w=b(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),T=b(`phone`,[[`path`,{d:`M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384`,key:`9njp5v`}]]),fe=b(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),pe=b(`scissors`,[[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M8.12 8.12 12 12`,key:`1alkpv`}],[`path`,{d:`M20 4 8.12 15.88`,key:`xgtan2`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`path`,{d:`M14.8 14.8 20 20`,key:`ptml3r`}]]),me=b(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),he=b(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),ge=b(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),E=b(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),_e=b(`square-check-big`,[[`path`,{d:`M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344`,key:`2acyp4`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),ve=b(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),ye=b(`trash`,[[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),be=b(`trending-up`,[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]),xe=b(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),Se=b(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Ce=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),D=e(((e,t)=>{t.exports=Ce()}))(),we=[{id:`Seg`,name:`Segunda`,dateStr:`07/Set`},{id:`Ter`,name:`Terça`,dateStr:`08/Set`},{id:`Qua`,name:`Quarta`,dateStr:`09/Set`},{id:`Qui`,name:`Quinta`,dateStr:`10/Set`},{id:`Sex`,name:`Sexta`,dateStr:`11/Set`},{id:`Sab`,name:`Sábado`,dateStr:`12/Set`}],Te=[`09:00`,`10:00`,`11:00`,`12:00`,`13:00`,`14:00`,`15:00`,`16:00`,`17:00`,`18:00`,`19:00`,`20:00`];function Ee(){let[e,t]=(0,l.useState)(`landing`),[n,r]=(0,l.useState)(`dashboard`),[i,a]=(0,l.useState)(``),[o,s]=(0,l.useState)(window.innerWidth);(0,l.useEffect)(()=>{let e=()=>s(window.innerWidth);return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let c=o<=768,u=o<=480,[d,f]=(0,l.useState)(`Seg`),[p,m]=(0,l.useState)({name:`Navalha de Ouro`,phone:`(11) 98877-6655`,address:`Av. Paulista, 1200 - Bela Vista, São Paulo - SP`,startTime:`09:00`,endTime:`20:00`}),[h,g]=(0,l.useState)([{id:1,name:`Corte Degradê`,price:50,duration:30,color:`#3b82f6`,description:`Corte moderno degradê na máquina e tesoura.`},{id:2,name:`Barba Premium`,price:40,duration:30,color:`#10b981`,description:`Modelagem de barba com toalha quente e terapia de óleos.`},{id:3,name:`Combo Cabelo + Barba`,price:80,duration:60,color:`#c5a059`,description:`Pacote completo: corte clássico/degradê e barba completa.`},{id:4,name:`Sobrancelha Navalha`,price:20,duration:15,color:`#ef4444`,description:`Alinhamento fino de sobrancelhas com navalha.`}]),[_,v]=(0,l.useState)([{id:1,name:`Carlos Silva`,specialty:`Especialista em Degradê & Fade`,commission:50,shifts:`Segunda a Sábado`,rating:4.9,initial:`CS`},{id:2,name:`Lucas Souza`,specialty:`Visagista e Mestre Barbeiro`,commission:45,shifts:`Terça a Sábado`,rating:4.8,initial:`LS`},{id:3,name:`André Melo`,specialty:`Cortes Clássicos & Tesoura`,commission:50,shifts:`Segunda a Sexta`,rating:4.7,initial:`AM`}]),[y,b]=(0,l.useState)([{id:1,name:`Guilherme Oliveira`,phone:`(11) 99999-1111`,email:`guilherme.o@gmail.com`,spend:280,visits:6,prefs:`Prefere corte degradê alto, gosta de café expresso.`,lastVisitDaysAgo:12},{id:2,name:`Rodrigo Santos`,phone:`(11) 98888-2222`,email:`rodrigo.santos@outlook.com`,spend:120,visits:3,prefs:`Corte clássico tesoura, sem navalha.`,lastVisitDaysAgo:48},{id:3,name:`Matheus Lima`,phone:`(11) 97777-3333`,email:`matheus.lima@gmail.com`,spend:80,visits:1,prefs:`Fazer apenas a barba, toalha quente.`,lastVisitDaysAgo:5},{id:4,name:`Felipe Costa`,phone:`(11) 96666-4444`,email:`felipe.costa@yahoo.com.br`,spend:200,visits:4,prefs:`Degradê médio, finalizado com pomada fosca.`,lastVisitDaysAgo:52},{id:5,name:`João Silva`,phone:`(11) 97711-2233`,email:`joao.silva@gmail.com`,spend:150,visits:4,prefs:`Degradê alto, com risco na sobrancelha.`,lastVisitDaysAgo:50},{id:6,name:`Pedro Alves`,phone:`(11) 97722-3344`,email:`pedro.alves@gmail.com`,spend:90,visits:2,prefs:`Corte social tesoura, clássico.`,lastVisitDaysAgo:60},{id:7,name:`Bruno Santos`,phone:`(11) 97733-4455`,email:`bruno.santos@gmail.com`,spend:220,visits:5,prefs:`Barba desenhada, pigmentada.`,lastVisitDaysAgo:46},{id:8,name:`Thiago Souza`,phone:`(11) 97744-5566`,email:`thiago.souza@gmail.com`,spend:80,visits:2,prefs:`Corte militar simples.`,lastVisitDaysAgo:55},{id:9,name:`Marcos Oliveira`,phone:`(11) 97755-6677`,email:`marcos.oliveira@gmail.com`,spend:300,visits:7,prefs:`Combo premium de barba e cabelo, massagem facial.`,lastVisitDaysAgo:58},{id:10,name:`Rafael Costa`,phone:`(11) 97766-7788`,email:`rafael.costa@gmail.com`,spend:110,visits:3,prefs:`Corte surfista médio.`,lastVisitDaysAgo:47},{id:11,name:`Gabriel Melo`,phone:`(11) 97777-8899`,email:`gabriel.melo@gmail.com`,spend:50,visits:1,prefs:`Sobrancelha na navalha.`,lastVisitDaysAgo:65},{id:12,name:`André Ramos`,phone:`(11) 97788-9900`,email:`andre.ramos@gmail.com`,spend:190,visits:4,prefs:`Corte degradê navalhado.`,lastVisitDaysAgo:49},{id:13,name:`Roberto Pereira`,phone:`(11) 97799-0011`,email:`roberto.pereira@gmail.com`,spend:240,visits:5,prefs:`Barboterapia com toalha quente.`,lastVisitDaysAgo:51},{id:14,name:`Fernando Gomes`,phone:`(11) 97700-1122`,email:`fernando.gomes@gmail.com`,spend:130,visits:3,prefs:`Corte clássico e cavanhaque.`,lastVisitDaysAgo:53},{id:15,name:`Lucas Martins`,phone:`(11) 98811-2233`,email:`lucas.martins@gmail.com`,spend:90,visits:2,prefs:`Gosta de topete texturizado.`,lastVisitDaysAgo:20},{id:16,name:`Marcelo Lima`,phone:`(11) 98822-3344`,email:`marcelo.lima@gmail.com`,spend:160,visits:4,prefs:`Máquina 2 geral, simples.`,lastVisitDaysAgo:15}]),[Ce,Ee]=(0,l.useState)([{id:1,clientId:1,serviceId:1,professionalId:1,day:`Seg`,time:`10:00`,duration:30,price:50,status:`concluido`},{id:2,clientId:2,serviceId:2,professionalId:2,day:`Seg`,time:`11:00`,duration:30,price:40,status:`concluido`},{id:3,clientId:3,serviceId:3,professionalId:1,day:`Ter`,time:`14:00`,duration:60,price:80,status:`confirmado`},{id:4,clientId:4,serviceId:1,professionalId:3,day:`Qua`,time:`15:30`,duration:30,price:50,status:`confirmado`},{id:5,clientId:1,serviceId:3,professionalId:2,day:`Qui`,time:`10:00`,duration:60,price:80,status:`confirmado`},{id:6,clientId:2,serviceId:4,professionalId:1,day:`Sex`,time:`09:30`,duration:15,price:20,status:`pendente`},{id:7,clientId:3,serviceId:1,professionalId:3,day:`Sex`,time:`16:00`,duration:30,price:50,status:`confirmado`},{id:8,clientId:4,serviceId:3,professionalId:1,day:`Sab`,time:`11:00`,duration:60,price:80,status:`confirmado`},{id:9,clientId:1,serviceId:2,professionalId:2,day:`Sab`,time:`14:00`,duration:30,price:40,status:`pendente`}]),[O,De]=(0,l.useState)(1),[Oe,ke]=(0,l.useState)(``),[Ae,je]=(0,l.useState)(``),[Me,Ne]=(0,l.useState)(``),[Pe,Fe]=(0,l.useState)([{name:`Corte Tradicional`,price:45},{name:`Barba Alinhada`,price:35}]),[Ie,Le]=(0,l.useState)(``),[Re,ze]=(0,l.useState)(``),[Be,Ve]=(0,l.useState)([{name:`Julio Cesar`,specialty:`Cortes Artísticos`}]),[He,Ue]=(0,l.useState)(``),[We,Ge]=(0,l.useState)(``),[Ke,k]=(0,l.useState)(!1),[A,qe]=(0,l.useState)(null),[Je,Ye]=(0,l.useState)(``),[Xe,Ze]=(0,l.useState)(``),[Qe,$e]=(0,l.useState)(``),[et,tt]=(0,l.useState)(`Seg`),[nt,rt]=(0,l.useState)(`09:00`),[it,at]=(0,l.useState)(!1),[ot,st]=(0,l.useState)(!1),[ct,lt]=(0,l.useState)(!1),[ut,dt]=(0,l.useState)(null),[ft,pt]=(0,l.useState)(``),[mt,ht]=(0,l.useState)(``),[gt,_t]=(0,l.useState)(``),[vt,yt]=(0,l.useState)(``),[bt,xt]=(0,l.useState)(``),[St,Ct]=(0,l.useState)(``),[wt,Tt]=(0,l.useState)(`30`),[Et,Dt]=(0,l.useState)(``),[Ot,kt]=(0,l.useState)(`#3b82f6`),[At,jt]=(0,l.useState)(``),[Mt,Nt]=(0,l.useState)(``),[Pt,Ft]=(0,l.useState)(`50`),[It,Lt]=(0,l.useState)(`Segunda a Sábado`),[Rt,zt]=(0,l.useState)(``),[Bt,Vt]=(0,l.useState)(`todos`),[Ht,Ut]=(0,l.useState)(``),[Wt,Gt]=(0,l.useState)(`todos`),[Kt,qt]=(0,l.useState)(`services`),[Jt,Yt]=(0,l.useState)(`personal`),[Xt,Zt]=(0,l.useState)(`Carlos Silva`),[Qt,$t]=(0,l.useState)(`admin@barbeariagold.com`),[en,tn]=(0,l.useState)(`(11) 98888-1122`),[j,nn]=(0,l.useState)({whatsappEnabled:!0,emailEnabled:!1,smsEnabled:!1,antecedenceHours:2,messageTemplate:`Olá, {cliente}! 💈 Passando para lembrar do seu agendamento de {servico} com o profissional {profissional} na {barbearia} no dia {data} às {horario}. Confirmado?`,retentionTemplate:`Fala, {nome}! 👊 Já faz um tempinho desde seu último corte. Que tal marcar seu próximo horário?`}),[rn,an]=(0,l.useState)([{id:101,clientName:`Guilherme Oliveira`,phone:`(11) 99999-1111`,serviceName:`Corte Degradê`,time:`10:00`,dateStr:`Seg`,status:`enviado`,channel:`whatsapp`,sentAt:`08/Ago 08:00`},{id:102,clientName:`Rodrigo Santos`,phone:`(11) 98888-2222`,serviceName:`Barba Premium`,time:`11:00`,dateStr:`Seg`,status:`enviado`,channel:`whatsapp`,sentAt:`08/Ago 09:00`},{id:103,clientName:`Matheus Lima`,phone:`(11) 97777-3333`,serviceName:`Combo Cabelo + Barba`,time:`14:00`,dateStr:`Ter`,status:`pendente`,channel:`whatsapp`,sentAt:`-`},{id:104,clientName:`Felipe Costa`,phone:`(11) 96666-4444`,serviceName:`Corte Degradê`,time:`15:30`,dateStr:`Qua`,status:`pendente`,channel:`whatsapp`,sentAt:`-`}]),[on,sn]=(0,l.useState)(``),[cn,ln]=(0,l.useState)(!1),[M,un]=(0,l.useState)(null),dn=async()=>{try{let[e,t,n,r,i]=await Promise.all([fetch(`/api/barbearia.php`).then(e=>e.json()),fetch(`/api/servicos.php`).then(e=>e.json()),fetch(`/api/profissionais.php`).then(e=>e.json()),fetch(`/api/clientes.php`).then(e=>e.json()),fetch(`/api/agendamentos.php`).then(e=>e.json())]);e&&!e.erro&&(m({name:e.nome,phone:e.telefone,address:e.endereco||``,startTime:e.hora_abertura?e.hora_abertura.substring(0,5):`09:00`,endTime:e.hora_fechamento?e.hora_fechamento.substring(0,5):`20:00`}),nn({whatsappEnabled:e.whatsapp_ativo==1,emailEnabled:e.email_ativo==1,smsEnabled:e.sms_ativo==1,antecedenceHours:Number(e.antecedencia_horas),messageTemplate:e.modelo_lembrete,retentionTemplate:e.modelo_retencao})),t&&!t.erro&&g(t.map(e=>({id:e.id,name:e.nome,price:e.preco,duration:e.duracao,color:e.cor||`#3b82f6`,description:e.descricao||``}))),n&&!n.erro&&v(n.map(e=>({id:e.id,name:e.nome,specialty:e.especialidade||``,commission:e.comissao,shifts:e.jornada||`Segunda a Sábado`,initial:e.iniciais,rating:5}))),r&&!r.erro&&b(r.map(e=>({id:e.id,name:e.nome,phone:e.telefone,email:e.email||``,prefs:e.preferencias||``,spend:e.spend||0,visits:e.visits||0,lastVisitDaysAgo:e.lastVisitDaysAgo===void 0?999:e.lastVisitDaysAgo}))),i&&!i.erro&&Ee(i)}catch(e){console.error(`Erro ao conectar com a API do banco de dados:`,e)}};(0,l.useEffect)(()=>{dn()},[]);let fn=async()=>{try{(await fetch(`/api/barbearia.php`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({nome:p.name,telefone:p.phone,endereco:p.address,hora_abertura:p.startTime+`:00`,hora_fechamento:p.endTime+`:00`,whatsapp_ativo:+!!j.whatsappEnabled,email_ativo:+!!j.emailEnabled,sms_ativo:+!!j.smsEnabled,antecedencia_horas:Number(j.antecedenceHours),modelo_lembrete:j.messageTemplate,modelo_retencao:j.retentionTemplate})}).then(e=>e.json())).sucesso&&(Dn(`Configurações salvas com sucesso!`),dn())}catch(e){console.error(`Erro ao salvar configurações:`,e)}},pn=(0,l.useMemo)(()=>y.filter(e=>e.lastVisitDaysAgo>45),[y]),mn=pn.length,hn=e=>{if(!e)return``;let t=e.replace(/\D/g,``);return t.length===11||t.length===10?`55`+t:t},gn=(e,t,n,r,i,a)=>e?e.replace(/{cliente}/g,t||``).replace(/{nome}/g,t||``).replace(/{servico}/g,n||``).replace(/{profissional}/g,r||``).replace(/{data}/g,i||``).replace(/{horario}/g,a||``).replace(/{barbearia}/g,p.name||``):``,_n=(e,t=!1,n=null)=>{let r=n||yn.get(e.clientId),i=e?bn.get(e.serviceId):null,a=e?xn.get(e.professionalId):null;if(!r)return;let o=t?j.retentionTemplate:j.messageTemplate,s=gn(o,r.name,i?.name||``,a?.name||``,e?.day||``,e?.time||``),c=`https://api.whatsapp.com/send?phone=${hn(r.phone)}&text=${encodeURIComponent(s)}`;window.open(c,`_blank`);let l=new Date,u=`${String(l.getHours()).padStart(2,`0`)}:${String(l.getMinutes()).padStart(2,`0`)}`,d=`${String(l.getDate()).padStart(2,`0`)}/Ago`;an(n=>[{id:Date.now(),clientName:r.name,phone:r.phone,serviceName:i?.name||(t?`Campanha Recorrência`:`Lembrete`),time:e?.time||`-`,dateStr:e?.day?`${e.day}`:`Campanha`,status:`enviado`,channel:`whatsapp`,sentAt:`${d} ${u}`},...n]),Dn(`WhatsApp aberto para enviar mensagem para ${r.name}!`)},vn=e=>{if(e.length===0)return;un({current:0,total:e.length,clientName:e[0].name,status:`sending`});let t=0,n=()=>{if(t>=e.length){un(e=>({...e,status:`finished`})),Dn(`Campanha enviada com sucesso para ${e.length} clientes!`),b(t=>t.map(t=>e.some(e=>e.id===t.id)?{...t,lastVisitDaysAgo:0}:t));let t=new Date,n=`${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}`,r=`${String(t.getDate()).padStart(2,`0`)}/Ago`,i=e.map((e,t)=>({id:Date.now()+t,clientName:e.name,phone:e.phone,serviceName:`Campanha de Recorrência`,time:`-`,dateStr:`Retenção`,status:`enviado`,channel:`whatsapp`,sentAt:`${r} ${n}`}));an(e=>[...i,...e]);return}let r=e[t];un(e=>({...e,current:t+1,clientName:r.name})),t++,setTimeout(n,400)};setTimeout(n,400)},yn=(0,l.useMemo)(()=>new Map(y.map(e=>[e.id,e])),[y]),bn=(0,l.useMemo)(()=>new Map(h.map(e=>[e.id,e])),[h]),xn=(0,l.useMemo)(()=>new Map(_.map(e=>[e.id,e])),[_]),Sn=(0,l.useMemo)(()=>{let e=0,t=0,n=0,r=0,i=0;Ce.forEach(a=>{a.status===`concluido`?(t+=a.price,r++,e+=a.price):a.status===`confirmado`&&(n+=a.price,i++,e+=a.price)});let a=r>0?t/r:0,o=_.length*we.length*Te.length,s=Ce.filter(e=>e.status!==`cancelado`).length,c=o>0?Math.round(s/o*100):0;return{totalRevenue:e,completedRevenue:t,confirmedRevenue:n,averageTicket:a,completedCount:r,scheduledCount:i,occupancyRate:c}},[Ce,_]),Cn=(0,l.useMemo)(()=>Ce.filter(e=>{let t=yn.get(e.clientId),n=xn.get(e.professionalId),r=bn.get(e.serviceId),i=t&&t.name?t.name.toLowerCase():``,a=n&&n.name?n.name.toLowerCase():``,o=r&&r.name?r.name.toLowerCase():``,s=i.includes(Rt.toLowerCase())||a.includes(Rt.toLowerCase())||o.includes(Rt.toLowerCase()),c=Bt===`todos`||e.status===Bt;return s&&c}),[Ce,Rt,Bt,yn,xn,bn]),wn=(0,l.useMemo)(()=>y.filter(e=>{let t=e.name?e.name.toLowerCase().includes(Ht.toLowerCase()):!1,n=e.phone?e.phone.includes(Ht):!1,r=e.email?e.email.toLowerCase().includes(Ht.toLowerCase()):!1;return t||n||r}),[y,Ht]),N=(0,l.useMemo)(()=>{let e={Seg:0,Ter:0,Qua:0,Qui:0,Sex:0,Sab:0};return Ce.forEach(t=>{(t.status===`concluido`||t.status===`confirmado`)&&(e[t.day]+=t.price)}),we.map(t=>({day:t.id,name:t.name,value:e[t.id]}))},[Ce]),P=(0,l.useMemo)(()=>{let e=Math.max(...N.map(e=>e.value),100);return Math.ceil(e/100)*100},[N]),Tn=(0,l.useMemo)(()=>Ce.filter(e=>e.status===`confirmado`||e.status===`pendente`).slice(0,4),[Ce]),En=(e,t)=>{let[n,r]=e.split(`:`).map(Number),i=n*60+r-540,a=u?48:c?52:68,o=i/60*a+a,s=t/60*a;return{top:`${o}px`,height:`${s}px`}},Dn=e=>{a(e),setTimeout(()=>{a(``)},4e3)},On=()=>{if(O===1){if(!Oe||!Ae||!Me){alert(`Por favor, preencha todos os campos do passo 1.`);return}De(2)}else if(O===2){if(Pe.length===0){alert(`Adicione pelo menos um serviço para continuar.`);return}De(3)}else if(O===3){if(Be.length===0){alert(`Adicione pelo menos um profissional da equipe.`);return}m({name:Oe,phone:Ae,address:Me,startTime:`09:00`,endTime:`20:00`});let e=Pe.map((e,t)=>({id:h.length+t+10,name:e.name,price:Number(e.price),duration:30,color:t%2==0?`#3b82f6`:`#c5a059`,description:`Serviço configurado na ativação rápida.`}));g(e);let n=Be.map((e,t)=>({id:_.length+t+10,name:e.name,specialty:e.specialty,commission:40,shifts:`Terça a Sábado`,rating:5,initial:e.name.split(` `).map(e=>e[0]).join(``).toUpperCase().substring(0,2)}));v(n),Ee([{id:101,clientId:1,serviceId:e[0].id,professionalId:n[0].id,day:`Seg`,time:`10:00`,duration:30,price:e[0].price,status:`confirmado`}]),Dn(`Sua barbearia foi ativada com sucesso! Bem-vindo ao NavalhaPro.`),t(`app`),r(`dashboard`)}},kn=()=>{!He||!We||(Fe([...Pe,{name:He,price:We}]),Ue(``),Ge(``))},An=e=>{Fe(Pe.filter((t,n)=>n!==e))},jn=()=>{!Ie||!Re||(Ve([...Be,{name:Ie,specialty:Re}]),Le(``),ze(``))},Mn=e=>{Ve(Be.filter((t,n)=>n!==e))},Nn=async e=>{if(e.preventDefault(),!Je||!Xe||!Qe){alert(`Por favor, selecione um Cliente, um Serviço e um Profissional.`);return}try{if((await fetch(`/api/agendamentos.php`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({clientId:Number(Je),serviceId:Number(Xe),professionalId:Number(Qe),day:et,time:nt,status:`confirmado`})}).then(e=>e.json())).sucesso){await dn();let e=yn.get(Number(Je)),t=bn.get(Number(Xe));e&&an(n=>[{id:Date.now(),clientName:e.name,phone:e.phone,serviceName:t?.name||`Serviço`,time:nt,dateStr:`${et}`,status:`pendente`,channel:`whatsapp`,sentAt:`-`},...n]),k(!1),Dn(`Agendamento realizado com sucesso!`)}}catch(e){console.error(`Erro ao criar agendamento:`,e)}},Pn=async(e,t)=>{try{(await fetch(`/api/agendamentos.php`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({id:e,status:t})}).then(e=>e.json())).sucesso&&(await dn(),Dn(`Status do agendamento alterado para ${t===`concluido`?`Concluído`:`Cancelado`}.`))}catch(e){console.error(`Erro ao atualizar status:`,e)}},Fn=(e,t)=>{let n=Ce.find(t=>t.id===e),r=n?yn.get(n.clientId):null;dt({id:e,status:t,clientName:r?r.name:`Cliente Rápido`})},In=async e=>{try{(await fetch(`/api/agendamentos.php?id=${e}`,{method:`DELETE`}).then(e=>e.json())).sucesso&&(await dn(),Dn(`Agendamento removido.`))}catch(e){console.error(`Erro ao deletar agendamento:`,e)}},Ln=async e=>{if(e.preventDefault(),ft)try{let e=await fetch(`/api/clientes.php`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({nome:ft,telefone:mt||`(11) 90000-0000`,email:gt||`${ft.toLowerCase().replace(/\s/g,``)}@exemplo.com`,preferencias:vt||`Sem preferências cadastradas.`})}).then(e=>e.json());e.sucesso&&(await dn(),Ye(e.id),at(!1),pt(``),ht(``),_t(``),yt(``),Dn(`Cliente cadastrado com sucesso!`))}catch(e){console.error(`Erro ao cadastrar cliente:`,e)}},Rn=async e=>{if(e.preventDefault(),!(!bt||!St))try{(await fetch(`/api/servicos.php`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({nome:bt,preco:Number(St),duracao:Number(wt),cor:Ot,descricao:Et||`Nenhuma descrição detalhada.`})}).then(e=>e.json())).sucesso&&(await dn(),st(!1),xt(``),Ct(``),Tt(`30`),Dt(``),Dn(`Serviço cadastrado com sucesso!`))}catch(e){console.error(`Erro ao criar serviço:`,e)}},zn=async e=>{if(e.preventDefault(),!(!At||!Mt))try{(await fetch(`/api/profissionais.php`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({nome:At,especialidade:Mt,comissao:Number(Pt),jornada:It,iniciais:At.split(` `).map(e=>e[0]).join(``).toUpperCase().substring(0,2)})}).then(e=>e.json())).sucesso&&(await dn(),lt(!1),jt(``),Nt(``),Ft(`50`),Lt(`Segunda a Sábado`),Dn(`Profissional adicionado à equipe!`))}catch(e){console.error(`Erro ao criar profissional:`,e)}},[Bn,Vn]=(0,l.useState)(1),[Hn,Un]=(0,l.useState)(null),[Wn,Gn]=(0,l.useState)(null),[Kn,qn]=(0,l.useState)(null),[Jn,Yn]=(0,l.useState)(null),[Xn,Zn]=(0,l.useState)(``),[Qn,$n]=(0,l.useState)(``),er=async e=>{if(e.preventDefault(),!Xn||!Qn){alert(`Preencha seu nome e telefone.`);return}try{let e=y.find(e=>e.name.toLowerCase()===Xn.toLowerCase()||e.phone===Qn),t=e?e.id:null;if(!e){let e=await fetch(`/api/clientes.php`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({nome:Xn,telefone:Qn,email:`${Xn.toLowerCase().replace(/\s/g,``)}@exemplo.com`,preferencias:`Agendou pelo portal online público.`})}).then(e=>e.json());if(e.sucesso)t=e.id;else throw Error(`Erro ao criar cliente`)}if((await fetch(`/api/agendamentos.php`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({clientId:Number(t),serviceId:Number(Hn.id),professionalId:Number(Wn.id),day:Kn.id,time:Jn,status:`pendente`})}).then(e=>e.json())).sucesso){await dn();let e=y.find(e=>e.id===t)||{name:Xn,phone:Qn};an(t=>[{id:Date.now(),clientName:e.name,phone:e.phone,serviceName:Hn.name,time:Jn,dateStr:`${Kn.id}`,status:`pendente`,channel:`whatsapp`,sentAt:`-`},...t]),Vn(4)}}catch(e){console.error(`Erro no portal de reservas:`,e)}},tr=()=>{Vn(1),Un(null),Gn(null),qn(null),Yn(null),Zn(``),$n(``)};return e===`landing`?(0,D.jsxs)(`div`,{className:`sales-page animate-fade`,children:[(0,D.jsxs)(`nav`,{className:`sales-nav`,children:[(0,D.jsxs)(`div`,{className:`logo-container`,style:{padding:0,margin:0},children:[(0,D.jsx)(`img`,{src:`/man_goatee_profile.jpg`,alt:`Logo`,style:{width:`36px`,height:`36px`,borderRadius:`50%`,objectFit:`cover`,border:`1px solid var(--accent-gold)`}}),(0,D.jsx)(`span`,{className:`logo-text`,children:`NavalhaPro`})]}),(0,D.jsxs)(`div`,{style:{display:`flex`,gap:`8px`},children:[(0,D.jsxs)(`button`,{className:`btn-secondary`,style:{padding:`8px 12px`,fontSize:`13px`},onClick:()=>t(`login`),children:[(0,D.jsx)(ue,{size:14}),` `,(0,D.jsx)(`span`,{className:`desktop-only`,children:`Entrar`})]}),(0,D.jsx)(`button`,{className:`btn-gold pulse-gold`,style:{padding:`8px 12px`,fontSize:`13px`},onClick:()=>{De(1),t(`activation`)},children:`Testar Grátis`})]})]}),(0,D.jsxs)(`div`,{className:`hero-grid`,style:{display:`grid`,gridTemplateColumns:c?`1fr`:`1.2fr 0.8fr`,gap:`40px`,alignItems:`center`,maxWidth:`1200px`,margin:`0 auto`,textAlign:c?`center`:`left`,padding:c?`40px 20px`:`80px 24px`},children:[(0,D.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:c?`center`:`flex-start`,gap:`24px`},children:[(0,D.jsxs)(`div`,{className:`badge badge-warning`,style:{fontSize:`13px`,padding:`6px 14px`},children:[(0,D.jsx)(E,{size:14}),` O CRM Número 1 para Barbearias Modernas`]}),(0,D.jsxs)(`h1`,{className:`title-classic`,style:{fontSize:c?`36px`:`56px`,lineHeight:`1.1`},children:[(0,D.jsx)(`span`,{className:`gold-gradient-text`,children:`Eleve o nível`}),` da sua barbearia`]}),(0,D.jsx)(`p`,{style:{fontSize:`18px`,color:`var(--text-muted)`,maxWidth:`600px`,lineHeight:`1.6`},children:`Automatize agendamentos online, controle o fluxo de caixa, acompanhe comissões da sua equipe e construa a fidelidade dos seus clientes em uma única plataforma premium.`}),(0,D.jsxs)(`div`,{className:`hero-cta`,style:{display:`flex`,gap:`16px`,flexWrap:`wrap`,justifyContent:c?`center`:`flex-start`},children:[(0,D.jsxs)(`button`,{className:`btn-gold`,style:{padding:`14px 28px`},onClick:()=>{De(1),t(`activation`)},children:[`Ativar Barbearia Grátis `,(0,D.jsx)(te,{size:18})]}),(0,D.jsx)(`button`,{className:`btn-outline`,style:{padding:`14px 28px`},onClick:()=>t(`login`),children:`Demonstração`})]})]}),(0,D.jsx)(`div`,{className:`hero-graphic-wrapper`,style:{display:`flex`,justifyContent:`center`},children:(0,D.jsxs)(`div`,{style:{position:`relative`,width:c?`220px`:`320px`,height:c?`220px`:`320px`,borderRadius:`50%`,background:`radial-gradient(circle, rgba(197, 160, 89, 0.15) 0%, rgba(0,0,0,0) 70%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,D.jsx)(`img`,{src:`/man_goatee_profile.jpg`,alt:`Desenho Homem com Cavanhaque`,style:{width:c?`180px`:`260px`,height:c?`180px`:`260px`,borderRadius:`50%`,objectFit:`cover`,border:`2px solid var(--accent-gold)`,boxShadow:`0 8px 32px rgba(197, 160, 89, 0.3)`,animation:`fadeIn 1.2s ease-out`}}),(0,D.jsx)(`div`,{style:{position:`absolute`,width:`100%`,height:`100%`,border:`1px dashed var(--accent-gold)`,borderRadius:`50%`,opacity:.2}})]})})]}),(0,D.jsxs)(`section`,{className:`features-section`,children:[(0,D.jsx)(`h2`,{className:`section-title`,children:`Projetado para barbearias de alto padrão`}),(0,D.jsx)(`p`,{className:`section-subtitle`,children:`Tudo o que você precisa para gerenciar o dia a dia e escalar seu faturamento sem complicação.`}),(0,D.jsxs)(`div`,{className:`features-grid`,children:[(0,D.jsxs)(`div`,{className:`feature-card`,children:[(0,D.jsx)(`div`,{className:`feature-icon-wrapper`,children:(0,D.jsx)(ee,{size:24})}),(0,D.jsx)(`h3`,{children:`Agenda Inteligente`}),(0,D.jsx)(`p`,{children:`Calendário visual por barbeiro com gestão de slots, status de agendamento coloridos e filtro rápido de profissionais.`})]}),(0,D.jsxs)(`div`,{className:`feature-card`,children:[(0,D.jsx)(`div`,{className:`feature-icon-wrapper`,children:(0,D.jsx)(le,{size:24})}),(0,D.jsx)(`h3`,{children:`Agendamento Online`}),(0,D.jsx)(`p`,{children:`Ofereça um portal exclusivo e responsivo para que seus clientes agendem de forma autônoma 24h por dia pelo WhatsApp.`})]}),(0,D.jsxs)(`div`,{className:`feature-card`,children:[(0,D.jsx)(`div`,{className:`feature-icon-wrapper`,children:(0,D.jsx)(be,{size:24})}),(0,D.jsx)(`h3`,{children:`Métricas e Faturamento`}),(0,D.jsx)(`p`,{children:`Acompanhe faturamento diário, tíquete médio por visita, comissões de equipe e comportamento de clientes.`})]}),(0,D.jsxs)(`div`,{className:`feature-card`,children:[(0,D.jsx)(`div`,{className:`feature-icon-wrapper`,children:(0,D.jsx)(xe,{size:24})}),(0,D.jsx)(`h3`,{children:`CRM e Preferências`}),(0,D.jsx)(`p`,{children:`Histórico completo de consumo, preferências anotadas de corte e alertas de clientes que não voltam há mais de 30 dias.`})]}),(0,D.jsxs)(`div`,{className:`feature-card`,children:[(0,D.jsx)(`div`,{className:`feature-icon-wrapper`,children:(0,D.jsx)(x,{size:24})}),(0,D.jsx)(`h3`,{children:`Serviços & Catálogo`}),(0,D.jsx)(`p`,{children:`Monte combos, crie categorias de serviços com cores exclusivas e gerencie as comissões individuais de cada barbeiro.`})]}),(0,D.jsxs)(`div`,{className:`feature-card`,children:[(0,D.jsx)(`div`,{className:`feature-icon-wrapper`,children:(0,D.jsx)(ge,{size:24})}),(0,D.jsx)(`h3`,{children:`Seguro e Escalável`}),(0,D.jsx)(`p`,{children:`Acesso rápido via nuvem em tablets, celulares e computadores com políticas seguras de controle de funcionário.`})]})]})]}),(0,D.jsxs)(`section`,{className:`pricing-section`,children:[(0,D.jsx)(`h2`,{className:`section-title`,children:`Planos adequados ao seu tamanho`}),(0,D.jsx)(`p`,{className:`section-subtitle`,children:`Sem taxas ocultas, comece com 14 dias grátis.`}),(0,D.jsxs)(`div`,{className:`pricing-grid`,children:[(0,D.jsxs)(`div`,{className:`pricing-card glass`,children:[(0,D.jsx)(`h3`,{children:`Bronze (Individual)`}),(0,D.jsx)(`p`,{className:`pricing-desc`,children:`Perfeito para barbeiros independentes ou estúdios privados.`}),(0,D.jsxs)(`div`,{className:`price-container`,children:[(0,D.jsx)(`span`,{className:`price-currency`,children:`R$`}),(0,D.jsx)(`span`,{className:`price-amount`,children:`69`}),(0,D.jsx)(`span`,{className:`price-period`,children:`/mês`})]}),(0,D.jsxs)(`ul`,{className:`pricing-features-list`,children:[(0,D.jsxs)(`li`,{children:[(0,D.jsx)(S,{className:`check-icon`}),` 1 Barbeiro ativo`]}),(0,D.jsxs)(`li`,{children:[(0,D.jsx)(S,{className:`check-icon`}),` Agenda de agendamentos`]}),(0,D.jsxs)(`li`,{children:[(0,D.jsx)(S,{className:`check-icon`}),` Cadastro de até 500 clientes`]}),(0,D.jsxs)(`li`,{children:[(0,D.jsx)(S,{className:`check-icon`}),` Link de Agendamento Online`]})]}),(0,D.jsx)(`button`,{className:`btn-outline`,onClick:()=>{De(1),t(`activation`)},children:`Começar Teste Grátis`})]}),(0,D.jsxs)(`div`,{className:`pricing-card premium-card glass`,children:[(0,D.jsx)(`span`,{className:`pricing-badge`,children:`Mais Popular`}),(0,D.jsx)(`h3`,{children:`Gold (Média Equipe)`}),(0,D.jsx)(`p`,{className:`pricing-desc`,children:`O ideal para barbearias tradicionais com equipe completa.`}),(0,D.jsxs)(`div`,{className:`price-container`,children:[(0,D.jsx)(`span`,{className:`price-currency`,children:`R$`}),(0,D.jsx)(`span`,{className:`price-amount`,children:`129`}),(0,D.jsx)(`span`,{className:`price-period`,children:`/mês`})]}),(0,D.jsxs)(`ul`,{className:`pricing-features-list`,children:[(0,D.jsxs)(`li`,{children:[(0,D.jsx)(S,{className:`check-icon`}),` Até 6 Barbeiros ativos`]}),(0,D.jsxs)(`li`,{children:[(0,D.jsx)(S,{className:`check-icon`}),` Agenda de agendamentos completa`]}),(0,D.jsxs)(`li`,{children:[(0,D.jsx)(S,{className:`check-icon`}),` Cadastro ilimitado de clientes`]}),(0,D.jsxs)(`li`,{children:[(0,D.jsx)(S,{className:`check-icon`}),` Link de Agendamento Online`]}),(0,D.jsxs)(`li`,{children:[(0,D.jsx)(S,{className:`check-icon`}),` Dashboard Financeiro e Relatórios`]}),(0,D.jsxs)(`li`,{children:[(0,D.jsx)(S,{className:`check-icon`}),` Cálculo Automático de Comissão`]})]}),(0,D.jsx)(`button`,{className:`btn-gold`,onClick:()=>{De(1),t(`activation`)},children:`Começar Teste Grátis`})]}),(0,D.jsxs)(`div`,{className:`pricing-card glass`,children:[(0,D.jsx)(`h3`,{children:`Platinum (Multifiliais)`}),(0,D.jsx)(`p`,{className:`pricing-desc`,children:`Para grandes redes de barbearia com expansão contínua.`}),(0,D.jsxs)(`div`,{className:`price-container`,children:[(0,D.jsx)(`span`,{className:`price-currency`,children:`R$`}),(0,D.jsx)(`span`,{className:`price-amount`,children:`249`}),(0,D.jsx)(`span`,{className:`price-period`,children:`/mês`})]}),(0,D.jsxs)(`ul`,{className:`pricing-features-list`,children:[(0,D.jsxs)(`li`,{children:[(0,D.jsx)(S,{className:`check-icon`}),` Barbeiros e filiais ilimitados`]}),(0,D.jsxs)(`li`,{children:[(0,D.jsx)(S,{className:`check-icon`}),` Todas as ferramentas inclusas`]}),(0,D.jsxs)(`li`,{children:[(0,D.jsx)(S,{className:`check-icon`}),` Integração de API com ERP`]}),(0,D.jsxs)(`li`,{children:[(0,D.jsx)(S,{className:`check-icon`}),` Suporte VIP 24h via WhatsApp`]})]}),(0,D.jsx)(`button`,{className:`btn-outline`,onClick:()=>{De(1),t(`activation`)},children:`Falar com Consultor`})]})]})]}),(0,D.jsx)(`footer`,{style:{background:`#070708`,padding:`40px 24px`,textAlign:`center`,fontSize:`13px`,color:`var(--text-muted)`,borderTop:`1px solid var(--border-gray)`},children:(0,D.jsx)(`p`,{children:`© 2026 NavalhaPro CRM. Desenvolvido com sofisticação para Barbeiros Premium.`})})]}):e===`activation`?(0,D.jsx)(`div`,{className:`activation-page animate-fade`,children:(0,D.jsxs)(`div`,{className:`activation-card glass`,children:[(0,D.jsxs)(`div`,{className:`activation-header`,children:[(0,D.jsx)(`div`,{style:{width:`60px`,height:`60px`,borderRadius:`50%`,overflow:`hidden`,border:`1px solid var(--accent-gold)`,margin:`0 auto 16px`,boxShadow:`0 4px 8px rgba(0,0,0,0.3)`},children:(0,D.jsx)(`img`,{src:`/man_goatee_profile.jpg`,alt:`Logo`,style:{width:`100%`,height:`100%`,objectFit:`cover`}})}),(0,D.jsx)(`h2`,{className:`title-classic`,children:`Ativar Barbearia`}),(0,D.jsx)(`p`,{style:{color:`var(--text-muted)`,fontSize:`14px`},children:`Complete o assistente em 3 passos para configurar o seu painel de CRM.`})]}),(0,D.jsxs)(`div`,{className:`steps-indicator`,children:[(0,D.jsx)(`div`,{className:`steps-progress-bar`,style:{width:`${(O-1)*50}%`}}),(0,D.jsxs)(`div`,{className:`step-bubble ${O>=1?O>1?`completed`:`active`:``}`,children:[O>1?(0,D.jsx)(S,{size:16}):`1`,(0,D.jsx)(`span`,{className:`step-label`,children:`Cadastro`})]}),(0,D.jsxs)(`div`,{className:`step-bubble ${O>=2?O>2?`completed`:`active`:``}`,children:[O>2?(0,D.jsx)(S,{size:16}):`2`,(0,D.jsx)(`span`,{className:`step-label`,children:`Serviços`})]}),(0,D.jsxs)(`div`,{className:`step-bubble ${O>=3?O>3?`completed`:`active`:``}`,children:[O>3?(0,D.jsx)(S,{size:16}):`3`,(0,D.jsx)(`span`,{className:`step-label`,children:`Equipe`})]})]}),O===1&&(0,D.jsxs)(`div`,{className:`step-content animate-slide-up`,children:[(0,D.jsx)(`h3`,{children:`Identificação da Barbearia`}),(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Nome Comercial`}),(0,D.jsx)(`input`,{type:`text`,className:`input-premium`,placeholder:`Ex: Barbearia Bigode & Cerveja`,value:Oe,onChange:e=>ke(e.target.value)})]}),(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Telefone Comercial / WhatsApp`}),(0,D.jsx)(`input`,{type:`text`,className:`input-premium`,placeholder:`Ex: (11) 98888-7777`,value:Ae,onChange:e=>je(e.target.value)})]}),(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Endereço Completo`}),(0,D.jsx)(`input`,{type:`text`,className:`input-premium`,placeholder:`Ex: Rua Augusta, 450 - Consolação, São Paulo`,value:Me,onChange:e=>Ne(e.target.value)})]})]}),O===2&&(0,D.jsxs)(`div`,{className:`step-content animate-slide-up`,children:[(0,D.jsx)(`h3`,{children:`Defina seus Serviços & Preços`}),(0,D.jsx)(`p`,{style:{color:`var(--text-muted)`,fontSize:`13px`},children:`Configure o catálogo inicial de serviços oferecidos na sua barbearia.`}),(0,D.jsxs)(`div`,{className:`form-row`,children:[(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Nome do Serviço`}),(0,D.jsx)(`input`,{type:`text`,className:`input-premium`,placeholder:`Ex: Corte Navalhado`,value:He,onChange:e=>Ue(e.target.value)})]}),(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Preço (R$)`}),(0,D.jsx)(`input`,{type:`number`,className:`input-premium`,placeholder:`Ex: 50.00`,value:We,onChange:e=>Ge(e.target.value)})]})]}),(0,D.jsxs)(`button`,{className:`btn-secondary`,onClick:kn,style:{alignSelf:`flex-end`},children:[(0,D.jsx)(fe,{size:16}),` Adicionar Serviço`]}),(0,D.jsxs)(`div`,{className:`wizard-added-list`,children:[(0,D.jsx)(`h4`,{children:`Serviços a Cadastrar:`}),Pe.map((e,t)=>(0,D.jsxs)(`div`,{className:`wizard-item-tag`,children:[(0,D.jsxs)(`span`,{children:[e.name,` - `,(0,D.jsxs)(`strong`,{children:[`R$ `,Number(e.price).toFixed(2)]})]}),(0,D.jsx)(`button`,{className:`btn-remove-tag`,onClick:()=>An(t),children:(0,D.jsx)(ye,{size:14})})]},t))]})]}),O===3&&(0,D.jsxs)(`div`,{className:`step-content animate-slide-up`,children:[(0,D.jsx)(`h3`,{children:`Cadastre seus Profissionais`}),(0,D.jsx)(`p`,{style:{color:`var(--text-muted)`,fontSize:`13px`},children:`Adicione os barbeiros que farão parte da sua agenda de atendimentos.`}),(0,D.jsxs)(`div`,{className:`form-row`,children:[(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Nome do Barbeiro`}),(0,D.jsx)(`input`,{type:`text`,className:`input-premium`,placeholder:`Ex: Marcos Aurélio`,value:Ie,onChange:e=>Le(e.target.value)})]}),(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Especialidade`}),(0,D.jsx)(`input`,{type:`text`,className:`input-premium`,placeholder:`Ex: Mestre das Tesouras`,value:Re,onChange:e=>ze(e.target.value)})]})]}),(0,D.jsxs)(`button`,{className:`btn-secondary`,onClick:jn,style:{alignSelf:`flex-end`},children:[(0,D.jsx)(fe,{size:16}),` Adicionar Profissional`]}),(0,D.jsxs)(`div`,{className:`wizard-added-list`,children:[(0,D.jsx)(`h4`,{children:`Profissionais da Equipe:`}),Be.map((e,t)=>(0,D.jsxs)(`div`,{className:`wizard-item-tag`,children:[(0,D.jsxs)(`span`,{children:[e.name,` - `,(0,D.jsx)(`em`,{style:{color:`var(--accent-gold)`},children:e.specialty})]}),(0,D.jsx)(`button`,{className:`btn-remove-tag`,onClick:()=>Mn(t),children:(0,D.jsx)(ye,{size:14})})]},t))]})]}),(0,D.jsxs)(`div`,{className:`step-actions`,children:[O>1?(0,D.jsx)(`button`,{className:`btn-secondary`,onClick:()=>De(e=>e-1),children:`Voltar`}):(0,D.jsx)(`button`,{className:`btn-secondary`,onClick:()=>t(`landing`),children:`Cancelar`}),(0,D.jsxs)(`button`,{className:`btn-gold`,onClick:On,children:[O===3?`Finalizar e Acessar Painel`:`Avançar`,` `,(0,D.jsx)(te,{size:16})]})]})]})}):e===`login`?(0,D.jsx)(`div`,{className:`login-page animate-fade`,children:(0,D.jsxs)(`div`,{className:`login-card glass`,children:[(0,D.jsxs)(`div`,{className:`login-logo`,children:[(0,D.jsx)(`div`,{style:{width:`80px`,height:`80px`,borderRadius:`50%`,overflow:`hidden`,border:`2px solid var(--accent-gold)`,marginBottom:`16px`,boxShadow:`0 4px 12px rgba(197, 160, 89, 0.3)`},children:(0,D.jsx)(`img`,{src:`/man_goatee_profile.jpg`,alt:`Logo`,style:{width:`100%`,height:`100%`,objectFit:`cover`}})}),(0,D.jsx)(`h1`,{children:`NavalhaPro`}),(0,D.jsx)(`p`,{children:`Faça login na sua conta administrativa`})]}),(0,D.jsxs)(`form`,{className:`login-form`,onSubmit:e=>{e.preventDefault(),Dn(`Login realizado com sucesso! Painel carregado.`),t(`app`),r(`dashboard`)},children:[(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Endereço de E-mail`}),(0,D.jsx)(`input`,{type:`email`,required:!0,className:`input-premium`,placeholder:`admin@barbeariagold.com`,defaultValue:`admin@barbeariagold.com`})]}),(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Senha de Acesso`}),(0,D.jsx)(`input`,{type:`password`,required:!0,className:`input-premium`,placeholder:`••••••••`,defaultValue:`admin123`})]}),(0,D.jsxs)(`div`,{className:`login-options`,children:[(0,D.jsxs)(`label`,{className:`checkbox-label`,children:[(0,D.jsx)(`input`,{type:`checkbox`,defaultChecked:!0}),` Lembrar minha senha`]}),(0,D.jsx)(`a`,{href:`#`,className:`forgot-password`,onClick:e=>{e.preventDefault(),alert(`Link de recuperação enviado ao seu e-mail!`)},children:`Esqueceu a senha?`})]}),(0,D.jsxs)(`button`,{type:`submit`,className:`btn-gold`,style:{justifyContent:`center`},children:[(0,D.jsx)(ue,{size:18}),` Entrar no Painel`]})]}),(0,D.jsx)(`div`,{className:`login-divider`,children:`ou acesse com`}),(0,D.jsxs)(`button`,{className:`btn-social`,onClick:()=>{t(`app`),r(`dashboard`)},children:[(0,D.jsx)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,D.jsx)(`path`,{d:`M12.24 10.285V14.4h6.887c-.648 2.41-2.519 4.114-5.137 4.114-3.51 0-6.386-2.87-6.386-6.39s2.876-6.39 6.386-6.39c1.63 0 3.107.61 4.257 1.72l3.174-3.17C19.34 2.38 15.97 1 12.24 1 6.033 1 1 6.033 1 12.24s5.033 11.24 11.24 11.24c5.78 0 10.74-4.14 10.74-11.24 0-.76-.08-1.5-.24-1.955H12.24z`})}),`Entrar com Google`]}),(0,D.jsxs)(`div`,{className:`register-prompt`,children:[`Não tem uma conta ainda? `,(0,D.jsx)(`span`,{onClick:()=>{De(1),t(`activation`)},children:`Ative sua barbearia`})]})]})}):e===`portal`?(0,D.jsxs)(`div`,{className:`portal-container glass animate-fade`,children:[(0,D.jsxs)(`div`,{className:`portal-shop-header`,children:[(0,D.jsx)(`div`,{className:`portal-shop-logo`,style:{overflow:`hidden`,padding:0},children:(0,D.jsx)(`img`,{src:`/man_goatee_profile.jpg`,alt:`Logo`,style:{width:`100%`,height:`100%`,objectFit:`cover`}})}),(0,D.jsx)(`h2`,{children:p.name}),(0,D.jsx)(`p`,{style:{color:`var(--text-muted)`,fontSize:`13px`},children:p.address})]}),Bn===1&&(0,D.jsxs)(`div`,{className:`animate-slide-up`,children:[(0,D.jsx)(`h3`,{style:{marginBottom:`16px`,fontSize:`18px`},children:`Selecione o Serviço`}),(0,D.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`12px`},children:h.map(e=>(0,D.jsxs)(`div`,{className:`portal-selection-item ${Hn?.id===e.id?`selected`:``}`,onClick:()=>Un(e),children:[(0,D.jsxs)(`div`,{style:{display:`flex`,justify:`space-between`,fontWeight:`600`},children:[(0,D.jsx)(`span`,{children:e.name}),(0,D.jsxs)(`span`,{style:{color:`var(--accent-gold)`},children:[`R$ `,e.price.toFixed(2)]})]}),(0,D.jsxs)(`div`,{style:{display:`flex`,gap:`12px`,fontSize:`12px`,color:`var(--text-muted)`,marginTop:`8px`},children:[(0,D.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:`4px`},children:[(0,D.jsx)(re,{size:12}),` `,e.duration,` min`]}),(0,D.jsx)(`span`,{children:e.description})]})]},e.id))}),(0,D.jsxs)(`div`,{style:{marginTop:`24px`,display:`flex`,justify:`space-between`},children:[(0,D.jsx)(`button`,{className:`btn-secondary`,onClick:()=>t(`app`),children:`Voltar para o Painel`}),(0,D.jsx)(`button`,{className:`btn-gold`,disabled:!Hn,onClick:()=>Vn(2),style:{opacity:Hn?1:.5},children:`Avançar`})]})]}),Bn===2&&(0,D.jsxs)(`div`,{className:`animate-slide-up`,children:[(0,D.jsx)(`h3`,{style:{marginBottom:`16px`,fontSize:`18px`},children:`Selecione o Profissional`}),(0,D.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`12px`},children:_.map(e=>(0,D.jsx)(`div`,{className:`portal-selection-item ${Wn?.id===e.id?`selected`:``}`,onClick:()=>Gn(e),children:(0,D.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`16px`},children:[(0,D.jsx)(`div`,{className:`avatar`,style:{width:`48px`,height:`48px`,margin:0},children:e.initial}),(0,D.jsxs)(`div`,{style:{textAlign:`left`},children:[(0,D.jsx)(`h4`,{style:{fontSize:`15px`},children:e.name}),(0,D.jsx)(`p`,{style:{fontSize:`12px`,color:`var(--text-muted)`},children:e.specialty})]})]})},e.id))}),(0,D.jsxs)(`div`,{style:{marginTop:`24px`,display:`flex`,justify:`space-between`},children:[(0,D.jsx)(`button`,{className:`btn-secondary`,onClick:()=>Vn(1),children:`Voltar`}),(0,D.jsx)(`button`,{className:`btn-gold`,disabled:!Wn,onClick:()=>Vn(3),style:{opacity:Wn?1:.5},children:`Avançar`})]})]}),Bn===3&&(0,D.jsxs)(`div`,{className:`animate-slide-up`,children:[(0,D.jsx)(`h3`,{style:{marginBottom:`16px`,fontSize:`18px`},children:`Escolha Data & Horário`}),(0,D.jsx)(`h4`,{style:{fontSize:`14px`,marginBottom:`8px`,color:`var(--text-muted)`},children:`Dias Disponíveis esta semana:`}),(0,D.jsx)(`div`,{className:`portal-grid-selection`,children:we.map(e=>(0,D.jsxs)(`div`,{className:`portal-selection-item ${Kn?.id===e.id?`selected`:``}`,onClick:()=>qn(e),children:[(0,D.jsx)(`div`,{style:{fontWeight:`600`},children:e.name}),(0,D.jsx)(`div`,{style:{fontSize:`12px`,opacity:.7},children:e.dateStr})]},e.id))}),Kn&&(0,D.jsxs)(`div`,{className:`animate-fade`,children:[(0,D.jsx)(`h4`,{style:{fontSize:`14px`,marginBottom:`8px`,color:`var(--text-muted)`},children:`Horários Disponíveis:`}),(0,D.jsx)(`div`,{className:`portal-time-grid`,children:[`09:00`,`10:00`,`11:00`,`13:00`,`14:00`,`15:00`,`16:30`,`17:00`,`18:00`,`19:00`].map(e=>(0,D.jsx)(`div`,{className:`portal-time-chip ${Jn===e?`selected`:``}`,onClick:()=>Yn(e),children:e},e))})]}),Jn&&(0,D.jsxs)(`form`,{onSubmit:er,className:`modal-form animate-fade`,style:{marginTop:`24px`,borderTop:`1px solid var(--border-gray)`,paddingTop:`24px`},children:[(0,D.jsx)(`h4`,{style:{fontSize:`15px`},children:`Seus dados de Contato`}),(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Seu Nome Completo`}),(0,D.jsx)(`input`,{type:`text`,required:!0,value:Xn,onChange:e=>Zn(e.target.value),className:`input-premium`,placeholder:`Digite seu nome`})]}),(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Telefone / WhatsApp`}),(0,D.jsx)(`input`,{type:`text`,required:!0,value:Qn,onChange:e=>$n(e.target.value),className:`input-premium`,placeholder:`(11) 99999-9999`})]}),(0,D.jsxs)(`button`,{type:`submit`,className:`btn-gold`,style:{justifyContent:`center`,marginTop:`12px`},children:[(0,D.jsx)(_e,{size:16}),` Confirmar Pré-Agendamento`]})]}),(0,D.jsx)(`div`,{style:{marginTop:`24px`,display:`flex`,justify:`space-between`},children:!Jn&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`button`,{className:`btn-secondary`,onClick:()=>Vn(2),children:`Voltar`}),(0,D.jsx)(`span`,{})]})})]}),Bn===4&&(0,D.jsxs)(`div`,{className:`animate-slide-up`,style:{textAlign:`center`,padding:`24px 0`},children:[(0,D.jsx)(ne,{size:64,style:{color:`var(--success)`,marginBottom:`24px`}}),(0,D.jsx)(`h3`,{style:{fontSize:`24px`,marginBottom:`8px`},children:`Solicitação Enviada!`}),(0,D.jsxs)(`p`,{style:{color:`var(--text-muted)`,fontSize:`14px`,lineHeight:`1.6`,maxWidth:`400px`,margin:`0 auto 32px`},children:[`Olá `,(0,D.jsx)(`strong`,{children:Xn}),`, sua solicitação de agendamento para `,(0,D.jsx)(`strong`,{children:Hn.name}),` com `,(0,D.jsx)(`strong`,{children:Wn.name}),` no dia `,(0,D.jsxs)(`strong`,{children:[Kn.name,` (`,Jn,`)`]}),` foi enviada. Você receberá a confirmação por WhatsApp em breve!`]}),(0,D.jsx)(`button`,{className:`btn-gold`,onClick:tr,children:`Realizar Novo Agendamento`})]}),ut&&(0,D.jsx)(`div`,{className:`modal-overlay`,children:(0,D.jsxs)(`div`,{className:`modal-content glass animate-slide-up`,style:{maxWidth:`400px`},children:[(0,D.jsx)(`div`,{className:`modal-swipe-bar`}),(0,D.jsxs)(`div`,{className:`modal-header`,children:[(0,D.jsx)(`h3`,{children:`Confirmar Alteração`}),(0,D.jsx)(`button`,{className:`btn-close-modal`,onClick:()=>dt(null),children:(0,D.jsx)(Se,{size:20})})]}),(0,D.jsxs)(`div`,{style:{padding:`16px 0`,fontSize:`14px`,lineHeight:`1.6`,textAlign:`center`},children:[(0,D.jsxs)(`p`,{children:[`Deseja realmente marcar o agendamento de `,(0,D.jsx)(`br`,{}),(0,D.jsx)(`strong`,{children:ut.clientName}),` como:`]}),(0,D.jsx)(`div`,{style:{marginTop:`16px`,display:`flex`,justifyContent:`center`},children:(0,D.jsx)(`span`,{className:`badge ${ut.status===`concluido`?`badge-success`:`badge-error`}`,style:{fontSize:`14px`,padding:`6px 16px`,textTransform:`uppercase`,fontWeight:`bold`},children:ut.status===`concluido`?`Concluído`:`Cancelado`})})]}),(0,D.jsxs)(`div`,{className:`modal-actions`,style:{borderTop:`1px solid var(--border-gray)`,paddingTop:`16px`,marginTop:`16px`},children:[(0,D.jsx)(`button`,{type:`button`,className:`btn-secondary`,style:{width:`100%`,justifyContent:`center`},onClick:()=>dt(null),children:`Voltar`}),(0,D.jsx)(`button`,{type:`button`,className:ut.status===`concluido`?`btn-gold`:`btn-outline`,style:ut.status===`cancelado`?{width:`100%`,justifyContent:`center`,borderColor:`var(--error)`,color:`var(--error)`,backgroundColor:`rgba(239, 68, 68, 0.05)`}:{width:`100%`,justifyContent:`center`},onClick:()=>{Pn(ut.id,ut.status),dt(null)},children:`Confirmar`})]})]})})]}):(0,D.jsxs)(`div`,{className:`app-container animate-fade`,children:[(0,D.jsxs)(`header`,{className:`mobile-header`,children:[(0,D.jsxs)(`div`,{className:`logo-container`,style:{padding:0,margin:0},children:[(0,D.jsx)(`img`,{src:`/man_goatee_profile.jpg`,alt:`Logo`,style:{width:`28px`,height:`28px`,borderRadius:`50%`,objectFit:`cover`,border:`1px solid var(--accent-gold)`,marginRight:`6px`}}),(0,D.jsx)(`span`,{className:`logo-text`,style:{fontSize:`16px`},children:`NavalhaPro`})]}),(0,D.jsxs)(`div`,{style:{display:`flex`,gap:`12px`,alignItems:`center`},children:[(0,D.jsx)(`button`,{style:{background:`none`,border:`none`,color:`var(--text-muted)`,cursor:`pointer`},onClick:()=>{tr(),t(`portal`)},children:(0,D.jsx)(se,{size:20})}),(0,D.jsx)(`div`,{className:`avatar`,style:{width:`32px`,height:`32px`,fontSize:`12px`},children:`AD`})]})]}),(0,D.jsxs)(`nav`,{className:`bottom-nav`,children:[(0,D.jsxs)(`div`,{className:`bottom-nav-item ${n===`dashboard`?`active`:``}`,onClick:()=>r(`dashboard`),children:[(0,D.jsx)(ce,{className:`bottom-nav-icon`}),(0,D.jsx)(`span`,{children:`Painel`})]}),(0,D.jsxs)(`div`,{className:`bottom-nav-item ${n===`calendar`?`active`:``}`,onClick:()=>r(`calendar`),children:[(0,D.jsx)(ee,{className:`bottom-nav-icon`}),(0,D.jsx)(`span`,{children:`Agenda`})]}),(0,D.jsxs)(`div`,{className:`bottom-nav-item ${n===`appointments`?`active`:``}`,onClick:()=>r(`appointments`),children:[(0,D.jsx)(_e,{className:`bottom-nav-icon`}),(0,D.jsx)(`span`,{children:`Filas`})]}),(0,D.jsxs)(`div`,{className:`bottom-nav-item ${n===`clients`?`active`:``}`,onClick:()=>r(`clients`),children:[(0,D.jsx)(xe,{className:`bottom-nav-icon`}),(0,D.jsx)(`span`,{children:`Clientes`})]}),(0,D.jsxs)(`div`,{className:`bottom-nav-item ${n===`services`?`active`:``}`,onClick:()=>r(`services`),children:[(0,D.jsx)(pe,{className:`bottom-nav-icon`}),(0,D.jsx)(`span`,{children:`Catálogo`})]}),(0,D.jsxs)(`div`,{className:`bottom-nav-item ${n===`settings`?`active`:``}`,onClick:()=>r(`settings`),children:[(0,D.jsx)(he,{className:`bottom-nav-icon`}),(0,D.jsx)(`span`,{children:`Ajustes`})]})]}),(0,D.jsxs)(`aside`,{className:`sidebar`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsxs)(`div`,{className:`logo-container`,children:[(0,D.jsx)(`img`,{src:`/man_goatee_profile.jpg`,alt:`Logo`,style:{width:`36px`,height:`36px`,borderRadius:`50%`,objectFit:`cover`,border:`1px solid var(--accent-gold)`}}),(0,D.jsx)(`span`,{className:`logo-text`,children:`NavalhaPro`})]}),(0,D.jsxs)(`nav`,{className:`nav-links`,children:[(0,D.jsxs)(`div`,{className:`nav-item ${n===`dashboard`?`active`:``}`,onClick:()=>r(`dashboard`),children:[(0,D.jsx)(ce,{className:`nav-item-icon`}),(0,D.jsx)(`span`,{children:`Painel Geral`})]}),(0,D.jsxs)(`div`,{className:`nav-item ${n===`calendar`?`active`:``}`,onClick:()=>r(`calendar`),children:[(0,D.jsx)(ee,{className:`nav-item-icon`}),(0,D.jsx)(`span`,{children:`Calendário`})]}),(0,D.jsxs)(`div`,{className:`nav-item ${n===`appointments`?`active`:``}`,onClick:()=>r(`appointments`),children:[(0,D.jsx)(_e,{className:`nav-item-icon`}),(0,D.jsx)(`span`,{children:`Agendamentos`})]}),(0,D.jsxs)(`div`,{className:`nav-item ${n===`clients`?`active`:``}`,onClick:()=>r(`clients`),children:[(0,D.jsx)(xe,{className:`nav-item-icon`}),(0,D.jsx)(`span`,{children:`Clientes`})]}),(0,D.jsxs)(`div`,{className:`nav-item ${n===`services`?`active`:``}`,onClick:()=>r(`services`),children:[(0,D.jsx)(pe,{className:`nav-item-icon`}),(0,D.jsx)(`span`,{children:`Serviços & Equipe`})]}),(0,D.jsxs)(`div`,{className:`nav-item ${n===`settings`?`active`:``}`,onClick:()=>r(`settings`),children:[(0,D.jsx)(he,{className:`nav-item-icon`}),(0,D.jsx)(`span`,{children:`Configurações`})]})]})]}),(0,D.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`16px`},children:[(0,D.jsxs)(`button`,{className:`btn-outline`,style:{justifyContent:`center`},onClick:()=>{tr(),t(`portal`)},children:[(0,D.jsx)(se,{size:14}),` Link do Cliente`]}),(0,D.jsxs)(`div`,{className:`user-profile`,children:[(0,D.jsx)(`div`,{className:`avatar`,children:`AD`}),(0,D.jsxs)(`div`,{className:`user-info`,children:[(0,D.jsx)(`span`,{className:`username`,children:`Administrador`}),(0,D.jsx)(`span`,{className:`user-role`,children:p.name})]}),(0,D.jsx)(`button`,{className:`btn-close-modal`,onClick:()=>t(`landing`),style:{marginLeft:`auto`,padding:`6px`},children:(0,D.jsx)(de,{size:16})})]})]})]}),(0,D.jsxs)(`main`,{className:`main-content`,children:[i&&(0,D.jsxs)(`div`,{className:`success-banner animate-fade`,style:{margin:c?`12px 10px 0 10px`:`24px 32px 0 32px`},children:[(0,D.jsx)(`span`,{children:i}),(0,D.jsx)(`button`,{onClick:()=>a(``),children:`Dispensar`})]}),(0,D.jsxs)(`div`,{className:`content-body`,children:[n===`dashboard`&&(0,D.jsxs)(`div`,{className:`animate-slide-up`,children:[(0,D.jsxs)(`div`,{className:`top-page-header`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`h1`,{className:`title-classic`,children:`Painel Geral`}),(0,D.jsx)(`p`,{style:{color:`var(--text-muted)`},children:`Visão de hoje para a barbearia.`})]}),(0,D.jsxs)(`button`,{className:`btn-gold`,onClick:()=>k(!0),children:[(0,D.jsx)(fe,{size:16}),` Novo Agendamento`]})]}),mn>0&&(0,D.jsxs)(`div`,{className:`retention-campaign-banner glass animate-fade`,style:{marginBottom:`24px`},children:[(0,D.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`16px`,flex:1},children:[(0,D.jsx)(`div`,{className:`alert-pulse-red`}),(0,D.jsxs)(`div`,{children:[(0,D.jsxs)(`h4`,{style:{color:`var(--error)`,margin:0,display:`flex`,alignItems:`center`,gap:`8px`,fontSize:`15px`},children:[`🔴 `,mn,` clientes não voltam há mais de 45 dias.`]}),(0,D.jsx)(`p`,{style:{margin:`4px 0 0 0`,fontSize:`13px`,color:`var(--text-muted)`},children:`O NavalhaPro identificou clientes inativos que representam faturamento pendente. Envie uma campanha de recorrência agora!`})]})]}),(0,D.jsxs)(`button`,{className:`btn-gold`,onClick:()=>ln(!0),style:{display:`flex`,alignItems:`center`,gap:`8px`,whiteSpace:`nowrap`},children:[(0,D.jsx)(E,{size:14}),` Enviar Campanha`]})]}),(0,D.jsxs)(`div`,{className:`dashboard-grid`,children:[(0,D.jsxs)(`div`,{className:`kpi-card glass`,children:[(0,D.jsxs)(`div`,{className:`kpi-header`,children:[(0,D.jsx)(`span`,{children:`Receita`}),(0,D.jsx)(oe,{className:`kpi-icon`})]}),(0,D.jsxs)(`div`,{className:`kpi-value`,children:[`R$ `,Sn.totalRevenue.toFixed(0)]}),(0,D.jsxs)(`div`,{className:`kpi-metric`,style:{color:`var(--success)`},children:[(0,D.jsx)(be,{size:10}),` `,(0,D.jsx)(`span`,{children:`Ativo`})]})]}),(0,D.jsxs)(`div`,{className:`kpi-card glass`,children:[(0,D.jsxs)(`div`,{className:`kpi-header`,children:[(0,D.jsx)(`span`,{children:`Concluídos`}),(0,D.jsx)(ne,{className:`kpi-icon`})]}),(0,D.jsx)(`div`,{className:`kpi-value`,children:Sn.completedCount}),(0,D.jsx)(`div`,{className:`kpi-metric`,style:{color:`var(--success)`},children:(0,D.jsxs)(`span`,{children:[`R$ `,Sn.completedRevenue.toFixed(0)]})})]}),(0,D.jsxs)(`div`,{className:`kpi-card glass`,children:[(0,D.jsxs)(`div`,{className:`kpi-header`,children:[(0,D.jsx)(`span`,{children:`Confirmados`}),(0,D.jsx)(ee,{className:`kpi-icon`})]}),(0,D.jsx)(`div`,{className:`kpi-value`,children:Sn.scheduledCount}),(0,D.jsx)(`div`,{className:`kpi-metric`,style:{color:`var(--warning)`},children:(0,D.jsxs)(`span`,{children:[`R$ `,Sn.confirmedRevenue.toFixed(0)]})})]}),(0,D.jsxs)(`div`,{className:`kpi-card glass`,children:[(0,D.jsxs)(`div`,{className:`kpi-header`,children:[(0,D.jsx)(`span`,{children:`Ocupação`}),(0,D.jsx)(re,{className:`kpi-icon`})]}),(0,D.jsxs)(`div`,{className:`kpi-value`,children:[Sn.occupancyRate,`%`]}),(0,D.jsx)(`div`,{className:`kpi-metric`,style:{color:`var(--info)`},children:(0,D.jsxs)(`span`,{children:[Ce.length,` slots`]})})]})]}),(0,D.jsxs)(`div`,{className:`dashboard-row-two`,children:[(0,D.jsxs)(`div`,{className:`chart-card glass`,children:[(0,D.jsxs)(`div`,{className:`card-header-actions`,children:[(0,D.jsxs)(`h3`,{className:`card-title`,children:[(0,D.jsx)(be,{size:18,style:{color:`var(--accent-gold)`}}),` Faturamento Semanal`]}),(0,D.jsx)(`div`,{style:{color:`var(--text-muted)`,fontSize:`12px`},children:`Real-time`})]}),(0,D.jsxs)(`div`,{className:`chart-container`,children:[(0,D.jsxs)(`div`,{className:`chart-axis-y`,children:[(0,D.jsxs)(`span`,{children:[`R$ `,P]}),(0,D.jsxs)(`span`,{children:[`R$ `,Math.round(P*.66)]}),(0,D.jsxs)(`span`,{children:[`R$ `,Math.round(P*.33)]}),(0,D.jsx)(`span`,{children:`R$ 0`})]}),(0,D.jsx)(`div`,{className:`svg-chart-wrapper`,children:(0,D.jsxs)(`svg`,{width:`100%`,height:`100%`,viewBox:`0 0 600 200`,preserveAspectRatio:`none`,children:[(0,D.jsx)(`line`,{x1:`0`,y1:`0`,x2:`600`,y2:`0`,className:`chart-grid-line`}),(0,D.jsx)(`line`,{x1:`0`,y1:`66`,x2:`600`,y2:`66`,className:`chart-grid-line`}),(0,D.jsx)(`line`,{x1:`0`,y1:`133`,x2:`600`,y2:`133`,className:`chart-grid-line`}),(0,D.jsx)(`line`,{x1:`0`,y1:`200`,x2:`600`,y2:`200`,className:`chart-grid-line`}),(0,D.jsx)(`defs`,{children:(0,D.jsxs)(`linearGradient`,{id:`chartGradient`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,D.jsx)(`stop`,{offset:`0%`,stopColor:`var(--accent-gold)`,stopOpacity:`0.4`}),(0,D.jsx)(`stop`,{offset:`100%`,stopColor:`var(--accent-gold)`,stopOpacity:`0.0`})]})}),(0,D.jsx)(`path`,{d:` M 10,${200-N[0].value/P*160} L 120,${200-N[1].value/P*160} L 230,${200-N[2].value/P*160} L 340,${200-N[3].value/P*160} L 450,${200-N[4].value/P*160} L 560,${200-N[5].value/P*160} `,fill:`none`,stroke:`var(--accent-gold)`,strokeWidth:`3`,className:`chart-glow-line`}),(0,D.jsx)(`path`,{d:` M 10,${200-N[0].value/P*160} L 120,${200-N[1].value/P*160} L 230,${200-N[2].value/P*160} L 340,${200-N[3].value/P*160} L 450,${200-N[4].value/P*160} L 560,${200-N[5].value/P*160} L 560,200 L 10,200 Z `,fill:`url(#chartGradient)`}),N.map((e,t)=>{let n=10+t*110,r=200-e.value/P*160;return(0,D.jsx)(`circle`,{cx:n,cy:r,r:`5`,className:`chart-point`},t)})]})}),(0,D.jsx)(`div`,{className:`chart-axis-x`,children:N.map(e=>(0,D.jsx)(`span`,{children:e.day},e.day))})]})]}),(0,D.jsxs)(`div`,{className:`upcoming-card glass`,children:[(0,D.jsxs)(`h3`,{className:`card-title`,children:[(0,D.jsx)(re,{size:18,style:{color:`var(--accent-gold)`}}),` Fila de Hoje`]}),(0,D.jsx)(`div`,{className:`upcoming-list`,children:Tn.length===0?(0,D.jsx)(`p`,{style:{color:`var(--text-muted)`,fontSize:`13px`,textAlign:`center`,marginTop:`30px`},children:`Sem agendamentos ativos na fila.`}):Tn.map(e=>{let t=yn.get(e.clientId),n=bn.get(e.serviceId),r=xn.get(e.professionalId);return(0,D.jsxs)(`div`,{className:`upcoming-item`,children:[(0,D.jsxs)(`div`,{className:`upcoming-left`,children:[(0,D.jsx)(`span`,{className:`time-slot-badge`,children:e.time}),(0,D.jsxs)(`div`,{className:`upcoming-details`,children:[(0,D.jsx)(`span`,{className:`upcoming-client`,children:t?t.name:`Cliente Rápido`}),(0,D.jsxs)(`span`,{className:`upcoming-service-prof`,children:[n?n.name:`Serviço`,` • `,r?r.name.split(` `)[0]:`Barbeiro`]})]})]}),(0,D.jsx)(`span`,{className:`badge ${e.status===`confirmado`?`badge-info`:`badge-warning`}`,children:e.status})]},e.id)})})]})]})]}),n===`calendar`&&(0,D.jsxs)(`div`,{className:`calendar-view-container animate-slide-up`,children:[(0,D.jsxs)(`div`,{className:`top-page-header`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`h1`,{className:`title-classic`,children:`Calendário`}),(0,D.jsx)(`p`,{style:{color:`var(--text-muted)`},children:`Horários e agendamentos configurados.`})]}),(0,D.jsxs)(`button`,{className:`btn-gold`,onClick:()=>k(!0),children:[(0,D.jsx)(fe,{size:16}),` Agendar Horário`]})]}),(0,D.jsx)(`div`,{className:`mobile-day-selector`,children:we.map(e=>(0,D.jsxs)(`div`,{className:`mobile-day-chip ${d===e.id?`active`:``}`,onClick:()=>f(e.id),children:[(0,D.jsx)(`span`,{className:`mobile-day-chip-name`,children:e.name.substring(0,3)}),(0,D.jsx)(`span`,{className:`mobile-day-chip-date`,children:e.dateStr.split(`/`)[0]})]},e.id))}),(0,D.jsxs)(`div`,{className:`calendar-header`,children:[(0,D.jsxs)(`div`,{className:`calendar-navigation`,children:[(0,D.jsx)(`button`,{className:`calendar-nav-btn`,children:(0,D.jsx)(C,{size:16})}),(0,D.jsx)(`span`,{className:`calendar-title-date`,children:c?`Dia Ativo: ${we.find(e=>e.id===d)?.name}`:`Semana: 07 a 12 de Setembro`}),(0,D.jsx)(`button`,{className:`calendar-nav-btn`,children:(0,D.jsx)(te,{size:16})})]}),(0,D.jsxs)(`div`,{className:`prof-filters`,children:[(0,D.jsx)(`span`,{style:{fontSize:`13px`,color:`var(--text-muted)`},children:`Filtrar Barbeiro:`}),(0,D.jsx)(`div`,{className:`prof-filter-bubble ${Wt===`todos`?`active`:``}`,onClick:()=>Gt(`todos`),children:`Todos`}),_.map(e=>(0,D.jsx)(`div`,{className:`prof-filter-bubble ${Wt===e.id?`active`:``}`,onClick:()=>Gt(e.id),children:e.name.split(` `)[0]},e.id))]})]}),(0,D.jsxs)(`div`,{className:`calendar-grid`,children:[(0,D.jsxs)(`div`,{className:`time-column`,children:[(0,D.jsx)(`div`,{className:`calendar-cell-header time-column-header`,children:(0,D.jsx)(`span`,{style:{fontSize:`11px`,color:`var(--text-muted)`},children:`Hora`})}),Te.map(e=>(0,D.jsx)(`div`,{className:`calendar-time-label`,children:e},e))]}),we.filter(e=>!c||e.id===d).map(e=>{let t=Ce.filter(t=>{let n=t.day===e.id,r=Wt===`todos`||t.professionalId===Wt;return n&&r&&t.status!==`cancelado`});return(0,D.jsxs)(`div`,{className:`calendar-day-column`,children:[(0,D.jsxs)(`div`,{className:`calendar-cell-header`,children:[(0,D.jsx)(`span`,{className:`calendar-cell-header-dayname`,children:e.name}),(0,D.jsx)(`span`,{children:e.dateStr})]}),Te.map(t=>(0,D.jsx)(`div`,{className:`calendar-hour-slot`,onClick:()=>{tt(e.id),rt(t),k(!0)}},t)),t.map(e=>{let t=yn.get(e.clientId),n=bn.get(e.serviceId),r=xn.get(e.professionalId),i=En(e.time,e.duration);return(0,D.jsxs)(`div`,{className:`calendar-appointment-card status-${e.status} ${e.duration<=15?`card-very-short`:e.duration<=30?`card-short`:``}`,style:{top:i.top,height:i.height},onClick:t=>{t.stopPropagation(),qe(e)},children:[(0,D.jsx)(`span`,{className:`calendar-appointment-card-title`,children:t?t.name:`Rápido`}),(0,D.jsxs)(`span`,{className:`calendar-appointment-card-info`,children:[n?n.name:`Serviço`,` • `,r?r.name.split(` `)[0]:`Barbeiro`]})]},e.id)})]},e.id)})]})]}),n===`appointments`&&(0,D.jsxs)(`div`,{className:`animate-slide-up`,children:[(0,D.jsxs)(`div`,{className:`top-page-header`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`h1`,{className:`title-classic`,children:`Fila de Agendamentos`}),(0,D.jsx)(`p`,{style:{color:`var(--text-muted)`},children:`Lista de atendimentos, andamentos e históricos.`})]}),(0,D.jsxs)(`button`,{className:`btn-gold`,onClick:()=>k(!0),children:[(0,D.jsx)(fe,{size:16}),` Novo Agendamento`]})]}),(0,D.jsxs)(`div`,{className:`filter-bar`,children:[(0,D.jsxs)(`div`,{className:`search-input-wrapper`,children:[(0,D.jsx)(me,{className:`search-input-icon`}),(0,D.jsx)(`input`,{type:`text`,className:`input-premium`,placeholder:`Buscar cliente, serviço...`,value:Rt,onChange:e=>zt(e.target.value)})]}),(0,D.jsxs)(`div`,{className:`filter-actions`,children:[(0,D.jsx)(`span`,{style:{fontSize:`13px`,color:`var(--text-muted)`},children:`Status:`}),(0,D.jsxs)(`select`,{className:`filter-select`,value:Bt,onChange:e=>Vt(e.target.value),children:[(0,D.jsx)(`option`,{value:`todos`,children:`Todos`}),(0,D.jsx)(`option`,{value:`confirmado`,children:`Confirmados`}),(0,D.jsx)(`option`,{value:`pendente`,children:`Pendentes (Online)`}),(0,D.jsx)(`option`,{value:`concluido`,children:`Concluídos`}),(0,D.jsx)(`option`,{value:`cancelado`,children:`Cancelados`})]})]})]}),c?(0,D.jsx)(`div`,{className:`mobile-card-list`,children:Cn.length===0?(0,D.jsx)(`p`,{style:{color:`var(--text-muted)`,fontSize:`13px`,textAlign:`center`,padding:`24px`},children:`Nenhum agendamento correspondente aos filtros.`}):Cn.map(e=>{let t=yn.get(e.clientId),n=bn.get(e.serviceId),r=xn.get(e.professionalId);return(0,D.jsxs)(`div`,{className:`mobile-card`,onClick:()=>qe(e),children:[(0,D.jsxs)(`div`,{className:`mobile-card-header`,children:[(0,D.jsx)(`span`,{className:`mobile-card-title`,children:t?t.name:`Cliente Rápido`}),(0,D.jsx)(`span`,{className:`badge ${e.status===`concluido`?`badge-success`:e.status===`confirmado`?`badge-info`:e.status===`cancelado`?`badge-error`:`badge-warning`}`,children:e.status})]}),(0,D.jsxs)(`div`,{className:`mobile-card-row`,children:[(0,D.jsx)(`span`,{className:`mobile-card-label`,children:`Horário:`}),(0,D.jsxs)(`span`,{className:`mobile-card-value`,children:[e.day,` às `,e.time]})]}),(0,D.jsxs)(`div`,{className:`mobile-card-row`,children:[(0,D.jsx)(`span`,{className:`mobile-card-label`,children:`Serviço:`}),(0,D.jsx)(`span`,{className:`mobile-card-value`,children:n?n.name:`Serviço`})]}),(0,D.jsxs)(`div`,{className:`mobile-card-row`,children:[(0,D.jsx)(`span`,{className:`mobile-card-label`,children:`Barbeiro:`}),(0,D.jsx)(`span`,{className:`mobile-card-value`,children:r?r.name:`Barbeiro`})]}),(0,D.jsxs)(`div`,{className:`mobile-card-row`,children:[(0,D.jsx)(`span`,{className:`mobile-card-label`,children:`Valor:`}),(0,D.jsxs)(`span`,{className:`mobile-card-value`,style:{color:`var(--accent-gold)`,fontWeight:`600`},children:[`R$ `,e.price.toFixed(2)]})]}),(0,D.jsxs)(`div`,{className:`mobile-card-actions`,onClick:e=>e.stopPropagation(),children:[e.status!==`concluido`&&e.status!==`cancelado`&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(`button`,{className:`btn-icon-action action-success`,onClick:()=>Fn(e.id,`concluido`),children:[(0,D.jsx)(S,{size:14}),` Concluir`]}),(0,D.jsxs)(`button`,{className:`btn-icon-action action-cancel`,onClick:()=>Fn(e.id,`cancelado`),children:[(0,D.jsx)(Se,{size:14}),` Cancelar`]})]}),t&&t.phone&&(0,D.jsxs)(`button`,{className:`btn-icon-action`,style:{color:`#25D366`},onClick:()=>_n(e),children:[(0,D.jsx)(T,{size:14}),` Whats`]}),(0,D.jsxs)(`button`,{className:`btn-icon-action`,onClick:()=>In(e.id),children:[(0,D.jsx)(ye,{size:14}),` Excluir`]})]})]},e.id)})}):(0,D.jsx)(`div`,{className:`table-wrapper`,children:(0,D.jsxs)(`table`,{className:`premium-table`,children:[(0,D.jsx)(`thead`,{children:(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`th`,{children:`Cliente`}),(0,D.jsx)(`th`,{children:`Horário`}),(0,D.jsx)(`th`,{children:`Dia`}),(0,D.jsx)(`th`,{children:`Serviço`}),(0,D.jsx)(`th`,{children:`Profissional`}),(0,D.jsx)(`th`,{children:`Preço`}),(0,D.jsx)(`th`,{children:`Status`}),(0,D.jsx)(`th`,{style:{textAlign:`right`},children:`Ações`})]})}),(0,D.jsx)(`tbody`,{children:Cn.length===0?(0,D.jsx)(`tr`,{children:(0,D.jsx)(`td`,{colSpan:`8`,style:{textAlign:`center`,color:`var(--text-muted)`,padding:`32px`},children:`Nenhum agendamento encontrado correspondente aos filtros.`})}):Cn.map(e=>{let t=yn.get(e.clientId),n=bn.get(e.serviceId),r=xn.get(e.professionalId);return(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`td`,{style:{fontWeight:`600`},children:t?t.name:`Cliente Rápido`}),(0,D.jsx)(`td`,{children:(0,D.jsxs)(`span`,{className:`badge badge-info`,children:[(0,D.jsx)(re,{size:12}),` `,e.time]})}),(0,D.jsx)(`td`,{children:e.day}),(0,D.jsx)(`td`,{children:n?n.name:`Serviço não catalogado`}),(0,D.jsx)(`td`,{children:r?r.name:`Sem barbeiro`}),(0,D.jsxs)(`td`,{style:{fontWeight:`600`,color:`var(--accent-gold)`},children:[`R$ `,e.price.toFixed(2)]}),(0,D.jsx)(`td`,{children:(0,D.jsx)(`span`,{className:`badge ${e.status===`concluido`?`badge-success`:e.status===`confirmado`?`badge-info`:e.status===`cancelado`?`badge-error`:`badge-warning`}`,children:e.status})}),(0,D.jsx)(`td`,{children:(0,D.jsxs)(`div`,{className:`table-actions`,style:{justifyContent:`flex-end`},children:[e.status!==`concluido`&&e.status!==`cancelado`&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`button`,{className:`btn-icon-action action-success`,title:`Concluir Atendimento`,onClick:()=>Fn(e.id,`concluido`),children:(0,D.jsx)(S,{size:14})}),(0,D.jsx)(`button`,{className:`btn-icon-action action-cancel`,title:`Cancelar Agendamento`,onClick:()=>Fn(e.id,`cancelado`),children:(0,D.jsx)(Se,{size:14})})]}),t&&t.phone&&(0,D.jsx)(`button`,{className:`btn-icon-action`,style:{color:`#25D366`},title:`Enviar Lembrete WhatsApp`,onClick:()=>_n(e),children:(0,D.jsx)(T,{size:14})}),(0,D.jsx)(`button`,{className:`btn-icon-action`,title:`Excluir`,onClick:()=>In(e.id),children:(0,D.jsx)(ye,{size:14})})]})})]},e.id)})})]})})]}),n===`clients`&&(0,D.jsxs)(`div`,{className:`animate-slide-up`,children:[(0,D.jsxs)(`div`,{className:`top-page-header`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`h1`,{className:`title-classic`,children:`Base de Clientes (CRM)`}),(0,D.jsx)(`p`,{style:{color:`var(--text-muted)`},children:`Histórico e preferências.`})]}),(0,D.jsxs)(`button`,{className:`btn-gold`,onClick:()=>at(!0),children:[(0,D.jsx)(fe,{size:16}),` Novo Cliente`]})]}),(0,D.jsx)(`div`,{className:`filter-bar`,children:(0,D.jsxs)(`div`,{className:`search-input-wrapper`,children:[(0,D.jsx)(me,{className:`search-input-icon`}),(0,D.jsx)(`input`,{type:`text`,className:`input-premium`,placeholder:`Buscar clientes por nome...`,value:Ht,onChange:e=>Ut(e.target.value)})]})}),c?(0,D.jsx)(`div`,{className:`mobile-card-list`,children:wn.length===0?(0,D.jsx)(`p`,{style:{color:`var(--text-muted)`,fontSize:`13px`,textAlign:`center`,padding:`24px`},children:`Nenhum cliente correspondente à busca.`}):wn.map(e=>(0,D.jsxs)(`div`,{className:`mobile-card`,onClick:()=>{alert(`Histórico detalhado de ${e.name}:\n\nVisitas Totais: ${e.visits}\nTotal Consumido: R$ ${e.spend.toFixed(2)}\nPreferências: ${e.prefs}`)},children:[(0,D.jsxs)(`div`,{className:`mobile-card-header`,children:[(0,D.jsx)(`span`,{className:`mobile-card-title`,children:e.name}),(0,D.jsxs)(`span`,{className:`badge badge-info`,children:[e.visits,` visitas`]})]}),(0,D.jsxs)(`div`,{className:`mobile-card-row`,children:[(0,D.jsx)(`span`,{className:`mobile-card-label`,children:`WhatsApp:`}),(0,D.jsx)(`span`,{className:`mobile-card-value`,children:e.phone})]}),(0,D.jsxs)(`div`,{className:`mobile-card-row`,children:[(0,D.jsx)(`span`,{className:`mobile-card-label`,children:`E-mail:`}),(0,D.jsx)(`span`,{className:`mobile-card-value`,children:e.email})]}),(0,D.jsxs)(`div`,{className:`mobile-card-row`,children:[(0,D.jsx)(`span`,{className:`mobile-card-label`,children:`Consumo Total:`}),(0,D.jsxs)(`span`,{className:`mobile-card-value`,style:{color:`var(--accent-gold)`,fontWeight:`600`},children:[`R$ `,e.spend.toFixed(2)]})]}),(0,D.jsx)(`div`,{className:`mobile-card-row`,style:{marginTop:`4px`},children:(0,D.jsxs)(`span`,{className:`client-preferences`,children:[(0,D.jsx)(ie,{size:12,style:{marginRight:`4px`,verticalAlign:`middle`}}),` `,e.prefs]})})]},e.id))}):(0,D.jsx)(`div`,{className:`table-wrapper`,children:(0,D.jsxs)(`table`,{className:`premium-table`,children:[(0,D.jsx)(`thead`,{children:(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`th`,{children:`Cliente`}),(0,D.jsx)(`th`,{children:`Contato`}),(0,D.jsx)(`th`,{children:`Frequência`}),(0,D.jsx)(`th`,{children:`Total Gasto`}),(0,D.jsx)(`th`,{children:`Preferências de Atendimento`}),(0,D.jsx)(`th`,{style:{textAlign:`right`},children:`Ações`})]})}),(0,D.jsx)(`tbody`,{children:wn.length===0?(0,D.jsx)(`tr`,{children:(0,D.jsx)(`td`,{colSpan:`6`,style:{textAlign:`center`,color:`var(--text-muted)`,padding:`32px`},children:`Nenhum cliente cadastrado correspondente à busca.`})}):wn.map(e=>(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`td`,{style:{fontWeight:`600`},children:e.name}),(0,D.jsx)(`td`,{children:(0,D.jsxs)(`div`,{className:`client-info-cell`,children:[(0,D.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:`4px`,fontSize:`13px`},children:[(0,D.jsx)(T,{size:12}),` `,e.phone]}),(0,D.jsxs)(`span`,{className:`client-email`,children:[(0,D.jsx)(w,{size:12}),` `,e.email]})]})}),(0,D.jsx)(`td`,{children:(0,D.jsxs)(`span`,{className:`badge badge-info`,children:[e.visits,` visitas`]})}),(0,D.jsxs)(`td`,{style:{fontWeight:`600`,color:`var(--accent-gold)`},children:[`R$ `,e.spend.toFixed(2)]}),(0,D.jsx)(`td`,{children:(0,D.jsxs)(`span`,{className:`client-preferences`,children:[(0,D.jsx)(ie,{size:12,style:{marginRight:`4px`,verticalAlign:`middle`}}),` `,e.prefs]})}),(0,D.jsx)(`td`,{children:(0,D.jsx)(`div`,{className:`table-actions`,style:{justifyContent:`flex-end`},children:(0,D.jsx)(`button`,{className:`btn-icon-action`,onClick:()=>{alert(`Histórico detalhado de ${e.name}:\n\nVisitas Totais: ${e.visits}\nTotal Consumido: R$ ${e.spend.toFixed(2)}\nPreferências: ${e.prefs}`)},children:(0,D.jsx)(se,{size:14})})})})]},e.id))})]})})]}),n===`services`&&(0,D.jsxs)(`div`,{className:`animate-slide-up`,children:[(0,D.jsxs)(`div`,{className:`top-page-header`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`h1`,{className:`title-classic`,children:`Serviços & Barbeiros`}),(0,D.jsx)(`p`,{style:{color:`var(--text-muted)`},children:`Configurações de catálogo e comissões da equipe.`})]}),Kt===`services`?(0,D.jsxs)(`button`,{className:`btn-gold`,onClick:()=>st(!0),children:[(0,D.jsx)(fe,{size:16}),` Novo Serviço`]}):(0,D.jsxs)(`button`,{className:`btn-gold`,onClick:()=>lt(!0),children:[(0,D.jsx)(fe,{size:16}),` Novo Profissional`]})]}),(0,D.jsxs)(`div`,{className:`tabs-container`,children:[(0,D.jsx)(`button`,{className:`tab-button ${Kt===`services`?`active`:``}`,onClick:()=>qt(`services`),children:`Serviços`}),(0,D.jsx)(`button`,{className:`tab-button ${Kt===`pros`?`active`:``}`,onClick:()=>qt(`pros`),children:`Equipe`})]}),Kt===`services`&&(0,D.jsx)(`div`,{className:`catalog-grid animate-fade`,children:h.map(e=>(0,D.jsxs)(`div`,{className:`catalog-card glass`,children:[(0,D.jsx)(`div`,{className:`service-card-color-tag`,style:{backgroundColor:e.color}}),(0,D.jsxs)(`div`,{className:`catalog-card-header`,children:[(0,D.jsx)(`h3`,{children:e.name}),(0,D.jsxs)(`span`,{className:`catalog-card-price`,children:[`R$ `,e.price.toFixed(2)]})]}),(0,D.jsxs)(`div`,{className:`catalog-card-detail`,children:[(0,D.jsx)(re,{size:14}),` `,(0,D.jsxs)(`span`,{children:[e.duration,` minutos`]})]}),(0,D.jsx)(`p`,{style:{color:`var(--text-muted)`,fontSize:`13px`,lineHeight:`1.5`,minHeight:`40px`},children:e.description}),(0,D.jsxs)(`div`,{className:`catalog-card-actions`,children:[(0,D.jsx)(`button`,{className:`btn-icon-action`,onClick:()=>{let t=prompt(`Alterar preço de ${e.name} para:`,e.price);t&&(g(h.map(n=>n.id===e.id?{...n,price:Number(t)}:n)),Dn(`Preço do serviço atualizado.`))},children:(0,D.jsx)(ve,{size:14})}),(0,D.jsx)(`button`,{className:`btn-icon-action`,onClick:()=>{confirm(`Deseja remover o serviço ${e.name}?`)&&(g(h.filter(t=>t.id!==e.id)),Dn(`Serviço removido.`))},children:(0,D.jsx)(ye,{size:14})})]})]},e.id))}),Kt===`pros`&&(0,D.jsx)(`div`,{className:`catalog-grid animate-fade`,children:_.map(e=>(0,D.jsxs)(`div`,{className:`catalog-card glass prof-team-card`,children:[(0,D.jsx)(`div`,{className:`prof-team-avatar`,children:e.initial}),(0,D.jsx)(`h3`,{children:e.name}),(0,D.jsx)(`span`,{className:`prof-team-specialty`,children:e.specialty}),(0,D.jsxs)(`div`,{className:`prof-team-shifts`,children:[(0,D.jsx)(`strong`,{children:`Turnos:`}),` `,e.shifts]}),(0,D.jsxs)(`div`,{style:{fontSize:`13px`,color:`var(--text-muted)`,marginBottom:`8px`},children:[`★ `,(0,D.jsx)(`strong`,{children:e.rating.toFixed(1)}),` (Avaliações)`]}),(0,D.jsxs)(`div`,{style:{fontSize:`13px`,color:`var(--accent-gold)`,fontWeight:`600`},children:[`Comissão: `,e.commission,`%`]}),(0,D.jsxs)(`div`,{className:`catalog-card-actions`,style:{width:`100%`},children:[(0,D.jsx)(`button`,{className:`btn-icon-action`,onClick:()=>{let t=prompt(`Alterar comissão de ${e.name} (%):`,e.commission);t&&(v(_.map(n=>n.id===e.id?{...n,commission:Number(t)}:n)),Dn(`Comissão atualizada.`))},children:(0,D.jsx)(ve,{size:14})}),(0,D.jsx)(`button`,{className:`btn-icon-action`,onClick:()=>{confirm(`Deseja remover ${e.name} da equipe?`)&&(v(_.filter(t=>t.id!==e.id)),Dn(`Profissional removido.`))},children:(0,D.jsx)(ye,{size:14})})]})]},e.id))})]}),n===`settings`&&(0,D.jsxs)(`div`,{className:`animate-slide-up`,children:[(0,D.jsx)(`div`,{className:`top-page-header`,children:(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`h1`,{className:`title-classic`,children:`Ajustes Gerais`}),(0,D.jsx)(`p`,{style:{color:`var(--text-muted)`},children:`Configurações do sistema e portal.`})]})}),(0,D.jsxs)(`div`,{className:`settings-layout`,children:[(0,D.jsxs)(`div`,{className:`settings-nav`,children:[(0,D.jsx)(`div`,{className:`settings-nav-item ${Jt===`personal`?`active`:``}`,onClick:()=>Yt(`personal`),children:`Perfil Pessoal`}),(0,D.jsx)(`div`,{className:`settings-nav-item ${Jt===`barber`?`active`:``}`,onClick:()=>Yt(`barber`),children:`Perfil da Barbearia`}),(0,D.jsx)(`div`,{className:`settings-nav-item ${Jt===`whatsapp`?`active`:``}`,onClick:()=>Yt(`whatsapp`),children:`Lembretes & WhatsApp`}),(0,D.jsx)(`div`,{className:`settings-nav-item`,onClick:()=>alert(`Métodos de Pagamento: PIX ativo.`),children:`Pagamento`}),(0,D.jsx)(`div`,{className:`settings-nav-item`,onClick:()=>alert(`Planos & Cobrança: Plano Gold ativo.`),children:`Faturas`})]}),(0,D.jsxs)(`div`,{className:`settings-panel glass`,children:[Jt===`personal`&&(0,D.jsxs)(`div`,{className:`animate-fade`,children:[(0,D.jsxs)(`h3`,{className:`settings-section-title`,style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,D.jsx)(xe,{size:18}),` Perfil Pessoal`]}),(0,D.jsxs)(`div`,{className:`step-content`,children:[(0,D.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`16px`,marginBottom:`8px`},children:[(0,D.jsx)(`div`,{style:{position:`relative`,width:`80px`,height:`80px`,borderRadius:`50%`,overflow:`hidden`,border:`2px solid var(--accent-gold)`,boxShadow:`0 4px 12px rgba(197, 160, 89, 0.2)`},children:(0,D.jsx)(`img`,{src:`/man_goatee_profile.jpg`,alt:`Foto de Perfil`,style:{width:`100%`,height:`100%`,objectFit:`cover`}})}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`span`,{className:`badge badge-warning`,style:{fontSize:`11px`,textTransform:`uppercase`,padding:`4px 10px`,display:`inline-block`,marginBottom:`6px`},children:`Dono / Administrador`}),(0,D.jsx)(`div`,{style:{fontSize:`13px`,color:`var(--text-muted)`},children:`Foto de perfil vinculada ao NavalhaPro ID`})]})]}),(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Nome Completo`}),(0,D.jsx)(`input`,{type:`text`,className:`input-premium`,value:Xt,onChange:e=>Zt(e.target.value)})]}),(0,D.jsxs)(`div`,{className:`form-row`,children:[(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`E-mail de Acesso`}),(0,D.jsx)(`input`,{type:`email`,className:`input-premium`,value:Qt,onChange:e=>$t(e.target.value)})]}),(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Celular / WhatsApp Pessoal`}),(0,D.jsx)(`input`,{type:`text`,className:`input-premium`,value:en,onChange:e=>tn(e.target.value)})]})]}),(0,D.jsxs)(`div`,{style:{borderTop:`1px solid var(--border-gray)`,paddingTop:`20px`,marginTop:`10px`},children:[(0,D.jsx)(`h4`,{style:{fontSize:`14px`,marginBottom:`12px`,color:`var(--accent-gold)`},children:`Alterar Senha de Acesso`}),(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Senha Atual`}),(0,D.jsx)(`input`,{type:`password`,placeholder:`••••••••`,className:`input-premium`})]}),(0,D.jsxs)(`div`,{className:`form-row`,style:{marginTop:`8px`},children:[(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Nova Senha`}),(0,D.jsx)(`input`,{type:`password`,placeholder:`Mínimo 8 caracteres`,className:`input-premium`})]}),(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Confirmar Nova Senha`}),(0,D.jsx)(`input`,{type:`password`,placeholder:`Confirme a nova senha`,className:`input-premium`})]})]})]})]})]}),Jt===`barber`&&(0,D.jsxs)(`div`,{className:`animate-fade`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsxs)(`h3`,{className:`settings-section-title`,style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,D.jsx)(pe,{size:18}),` Dados da Barbearia`]}),(0,D.jsxs)(`div`,{className:`step-content`,children:[(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Nome Comercial`}),(0,D.jsx)(`input`,{type:`text`,className:`input-premium`,value:p.name,onChange:e=>m({...p,name:e.target.value})})]}),(0,D.jsxs)(`div`,{className:`form-row`,children:[(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Contato`}),(0,D.jsx)(`input`,{type:`text`,className:`input-premium`,value:p.phone,onChange:e=>m({...p,phone:e.target.value})})]}),(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Expediente`}),(0,D.jsx)(`input`,{type:`text`,className:`input-premium`,value:`${p.startTime} às ${p.endTime}`,disabled:!0})]})]}),(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Endereço`}),(0,D.jsx)(`input`,{type:`text`,className:`input-premium`,value:p.address,onChange:e=>m({...p,address:e.target.value})})]})]})]}),(0,D.jsxs)(`div`,{style:{marginTop:`24px`,borderTop:`1px solid var(--border-gray)`,paddingTop:`24px`},children:[(0,D.jsxs)(`h3`,{className:`settings-section-title`,style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,D.jsx)(le,{size:18}),` Link de Reserva Online`]}),(0,D.jsx)(`p`,{style:{color:`var(--text-muted)`,fontSize:`13px`,marginBottom:`16px`,lineHeight:`1.5`},children:`Clientes podem agendar de forma autônoma utilizando o link abaixo. Copie e cole na bio das suas redes.`}),(0,D.jsxs)(`div`,{className:`booking-link-box`,children:[(0,D.jsxs)(`div`,{className:`booking-link-row`,children:[(0,D.jsxs)(`div`,{className:`booking-link-text`,children:[`https://navalhapro.com.br/reserva/`,p.name.toLowerCase().replace(/\s+/g,`-`)]}),(0,D.jsxs)(`button`,{className:`btn-gold`,onClick:()=>{navigator.clipboard.writeText(`https://navalhapro.com.br/reserva/${p.name.toLowerCase().replace(/\s+/g,`-`)}`),Dn(`Link de agendamento copiado para a área de transferência!`)},children:[(0,D.jsx)(ae,{size:16}),` Copiar`]})]}),(0,D.jsx)(`div`,{style:{display:`flex`,gap:`12px`,marginTop:`8px`},children:(0,D.jsxs)(`button`,{className:`btn-outline`,onClick:()=>{tr(),t(`portal`)},style:{padding:`8px 16px`,fontSize:`13px`,width:c?`100%`:`auto`},children:[(0,D.jsx)(se,{size:14}),` Abrir Simulador do Portal`]})})]})]})]}),Jt===`whatsapp`&&(0,D.jsxs)(`div`,{className:`animate-fade`,children:[(0,D.jsxs)(`h3`,{className:`settings-section-title`,style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,D.jsx)(E,{size:18}),` Lembretes & WhatsApp API`]}),(0,D.jsxs)(`div`,{className:`whatsapp-settings-container`,children:[(0,D.jsxs)(`div`,{className:`whatsapp-config-form`,children:[(0,D.jsx)(`h4`,{style:{color:`var(--accent-gold)`,marginBottom:`12px`,fontSize:`14px`},children:`Configuração de Envio`}),(0,D.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`12px`,marginBottom:`20px`},children:[(0,D.jsxs)(`label`,{className:`toggle-label`,style:{display:`flex`,alignItems:`center`,gap:`10px`,cursor:`pointer`},children:[(0,D.jsx)(`input`,{type:`checkbox`,checked:j.whatsappEnabled,onChange:e=>nn({...j,whatsappEnabled:e.target.checked})}),(0,D.jsx)(`span`,{children:`Habilitar Lembretes via WhatsApp`})]}),(0,D.jsxs)(`label`,{className:`toggle-label`,style:{display:`flex`,alignItems:`center`,gap:`10px`,cursor:`pointer`,opacity:.5},children:[(0,D.jsx)(`input`,{type:`checkbox`,disabled:!0,checked:!1}),(0,D.jsx)(`span`,{children:`Habilitar E-mail (Plano Premium)`})]}),(0,D.jsxs)(`label`,{className:`toggle-label`,style:{display:`flex`,alignItems:`center`,gap:`10px`,cursor:`pointer`,opacity:.5},children:[(0,D.jsx)(`input`,{type:`checkbox`,disabled:!0,checked:!1}),(0,D.jsx)(`span`,{children:`Habilitar SMS (Plano Premium)`})]})]}),(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Enviar Lembrete com Antecedência de:`}),(0,D.jsxs)(`select`,{className:`input-premium`,value:j.antecedenceHours,onChange:e=>nn({...j,antecedenceHours:Number(e.target.value)}),children:[(0,D.jsx)(`option`,{value:1,children:`1 Hora antes`}),(0,D.jsx)(`option`,{value:2,children:`2 Horas antes`}),(0,D.jsx)(`option`,{value:4,children:`4 Horas antes`}),(0,D.jsx)(`option`,{value:24,children:`24 Horas antes (1 dia)`})]})]}),(0,D.jsxs)(`div`,{className:`form-group`,style:{marginTop:`16px`},children:[(0,D.jsx)(`label`,{children:`Modelo do Lembrete de Agendamento`}),(0,D.jsx)(`textarea`,{className:`input-premium`,rows:3,value:j.messageTemplate,onChange:e=>nn({...j,messageTemplate:e.target.value}),placeholder:`Digite a mensagem de lembrete...`,style:{resize:`none`,fontSize:`13px`}}),(0,D.jsxs)(`div`,{className:`template-tags`,children:[(0,D.jsx)(`span`,{className:`tag-btn`,onClick:()=>nn({...j,messageTemplate:j.messageTemplate+` {cliente}`}),children:`{cliente}`}),(0,D.jsx)(`span`,{className:`tag-btn`,onClick:()=>nn({...j,messageTemplate:j.messageTemplate+` {servico}`}),children:`{servico}`}),(0,D.jsx)(`span`,{className:`tag-btn`,onClick:()=>nn({...j,messageTemplate:j.messageTemplate+` {profissional}`}),children:`{profissional}`}),(0,D.jsx)(`span`,{className:`tag-btn`,onClick:()=>nn({...j,messageTemplate:j.messageTemplate+` {data}`}),children:`{data}`}),(0,D.jsx)(`span`,{className:`tag-btn`,onClick:()=>nn({...j,messageTemplate:j.messageTemplate+` {horario}`}),children:`{horario}`}),(0,D.jsx)(`span`,{className:`tag-btn`,onClick:()=>nn({...j,messageTemplate:j.messageTemplate+` {barbearia}`}),children:`{barbearia}`})]})]}),(0,D.jsxs)(`div`,{className:`form-group`,style:{marginTop:`16px`},children:[(0,D.jsx)(`label`,{children:`Modelo de Mensagem para Clientes Inativos (Campanha)`}),(0,D.jsx)(`textarea`,{className:`input-premium`,rows:3,value:j.retentionTemplate,onChange:e=>nn({...j,retentionTemplate:e.target.value}),placeholder:`Digite a mensagem de recuperação...`,style:{resize:`none`,fontSize:`13px`}}),(0,D.jsxs)(`div`,{className:`template-tags`,children:[(0,D.jsx)(`span`,{className:`tag-btn`,onClick:()=>nn({...j,retentionTemplate:j.retentionTemplate+` {nome}`}),children:`{nome}`}),(0,D.jsx)(`span`,{className:`tag-btn`,onClick:()=>nn({...j,retentionTemplate:j.retentionTemplate+` {barbearia}`}),children:`{barbearia}`})]})]})]}),(0,D.jsxs)(`div`,{className:`whatsapp-simulator-wrapper`,children:[(0,D.jsxs)(`div`,{className:`phone-header-mock`,children:[(0,D.jsx)(`span`,{className:`phone-time-mock`,children:`18:30`}),(0,D.jsx)(`div`,{className:`phone-camera-mock`}),(0,D.jsx)(`span`,{className:`phone-icons-mock`,children:`📶 🔋`})]}),(0,D.jsxs)(`div`,{className:`phone-screen-mock`,children:[(0,D.jsxs)(`div`,{className:`chat-header-mock`,children:[(0,D.jsx)(`div`,{className:`chat-avatar-mock`,children:`💈`}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`div`,{className:`chat-name-mock`,children:p.name}),(0,D.jsx)(`div`,{className:`chat-status-mock`,children:`Online`})]})]}),(0,D.jsx)(`div`,{className:`chat-body-mock`,children:(0,D.jsxs)(`div`,{className:`chat-message-bubble-mock`,children:[gn(j.messageTemplate,`Guilherme Oliveira`,`Corte Degradê`,`Carlos Silva`,`Seg`,`10:00`),(0,D.jsx)(`span`,{className:`chat-time-stamp-mock`,children:`18:30 ✓✓`})]})})]})]})]}),(0,D.jsxs)(`div`,{className:`reminders-history-section`,style:{marginTop:`32px`,borderTop:`1px solid var(--border-gray)`,paddingTop:`24px`},children:[(0,D.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:`16px`,flexWrap:`wrap`,gap:`12px`},children:[(0,D.jsx)(`h4`,{style:{color:`var(--accent-gold)`,fontSize:`15px`},children:`Histórico de Envios e Fila de Disparo`}),(0,D.jsx)(`input`,{type:`text`,placeholder:`Buscar por cliente...`,className:`input-premium`,style:{width:`220px`,padding:`6px 12px`,fontSize:`13px`},value:on,onChange:e=>sn(e.target.value)})]}),(0,D.jsx)(`div`,{className:`table-wrapper`,children:(0,D.jsxs)(`table`,{className:`premium-table`,style:{fontSize:`13px`},children:[(0,D.jsx)(`thead`,{children:(0,D.jsxs)(`tr`,{children:[(0,D.jsx)(`th`,{children:`Cliente`}),(0,D.jsx)(`th`,{children:`Serviço`}),(0,D.jsx)(`th`,{children:`Data/Canal`}),(0,D.jsx)(`th`,{children:`Status`}),(0,D.jsx)(`th`,{children:`Disparado em`}),(0,D.jsx)(`th`,{style:{textAlign:`right`},children:`Ação`})]})}),(0,D.jsx)(`tbody`,{children:rn.filter(e=>e.clientName?e.clientName.toLowerCase().includes(on.toLowerCase()):!1).map(e=>(0,D.jsxs)(`tr`,{children:[(0,D.jsxs)(`td`,{children:[(0,D.jsx)(`div`,{children:e.clientName}),(0,D.jsx)(`div`,{style:{fontSize:`11px`,color:`var(--text-muted)`},children:e.phone})]}),(0,D.jsx)(`td`,{children:e.serviceName}),(0,D.jsxs)(`td`,{children:[(0,D.jsxs)(`div`,{children:[e.dateStr,` às `,e.time]}),(0,D.jsx)(`div`,{style:{fontSize:`11px`,color:`var(--accent-gold)`},children:`WhatsApp`})]}),(0,D.jsx)(`td`,{children:(0,D.jsx)(`span`,{className:`badge ${e.status===`enviado`?`badge-success`:`badge-warning`}`,children:e.status===`enviado`?`Enviado`:`Pendente`})}),(0,D.jsx)(`td`,{children:e.sentAt}),(0,D.jsx)(`td`,{style:{textAlign:`right`},children:e.status===`pendente`?(0,D.jsx)(`button`,{className:`btn-gold btn-small`,onClick:()=>{an(t=>t.map(t=>{if(t.id===e.id){let e=new Date;return{...t,status:`enviado`,sentAt:`${String(e.getDate()).padStart(2,`0`)}/Ago ${String(e.getHours()).padStart(2,`0`)}:${String(e.getMinutes()).padStart(2,`0`)}`}}return t})),Dn(`Lembrete enviado para ${e.clientName}!`)},children:`Simular Disparo`}):(0,D.jsx)(`span`,{style:{color:`var(--success)`,fontSize:`12px`},children:`✓ Pronto`})})]},e.id))})]})})]})]}),(0,D.jsxs)(`div`,{style:{display:`flex`,gap:`12px`,marginTop:`24px`,borderTop:`1px solid var(--border-gray)`,paddingTop:`20px`},children:[(0,D.jsx)(`button`,{className:`btn-gold`,onClick:fn,children:`Salvar Alterações`}),(0,D.jsx)(`button`,{className:`btn-secondary`,style:{color:`var(--error)`},onClick:()=>t(`landing`),children:`Sair do Painel`})]})]})]})]})]})]}),Ke&&(0,D.jsx)(`div`,{className:`modal-overlay`,children:(0,D.jsxs)(`div`,{className:`modal-content glass`,children:[(0,D.jsx)(`div`,{className:`modal-swipe-bar`}),(0,D.jsxs)(`div`,{className:`modal-header`,children:[(0,D.jsx)(`h3`,{children:`Novo Agendamento`}),(0,D.jsx)(`button`,{className:`btn-close-modal`,onClick:()=>k(!1),children:(0,D.jsx)(Se,{size:20})})]}),(0,D.jsxs)(`form`,{onSubmit:Nn,className:`modal-form`,children:[(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,D.jsx)(`label`,{children:`Selecione o Cliente`}),(0,D.jsx)(`button`,{type:`button`,style:{background:`none`,border:`none`,color:`var(--accent-gold)`,fontSize:`12px`,cursor:`pointer`,fontWeight:`600`},onClick:()=>at(!0),children:`+ Novo Cliente`})]}),(0,D.jsxs)(`select`,{className:`input-premium`,value:Je,onChange:e=>Ye(e.target.value),required:!0,children:[(0,D.jsx)(`option`,{value:``,children:`-- Selecione o Cliente --`}),y.map(e=>(0,D.jsxs)(`option`,{value:e.id,children:[e.name,` `,e.phone]},e.id))]})]}),(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Selecione o Serviço`}),(0,D.jsxs)(`select`,{className:`input-premium`,value:Xe,onChange:e=>Ze(e.target.value),required:!0,children:[(0,D.jsx)(`option`,{value:``,children:`-- Selecione o Serviço --`}),h.map(e=>(0,D.jsxs)(`option`,{value:e.id,children:[e.name,` (R$ `,e.price.toFixed(2),`)`]},e.id))]})]}),(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Profissional`}),(0,D.jsxs)(`select`,{className:`input-premium`,value:Qe,onChange:e=>$e(e.target.value),required:!0,children:[(0,D.jsx)(`option`,{value:``,children:`-- Selecione o Barbeiro --`}),_.map(e=>(0,D.jsxs)(`option`,{value:e.id,children:[e.name,` - `,e.specialty]},e.id))]})]}),(0,D.jsxs)(`div`,{className:`form-row`,children:[(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Dia da Semana`}),(0,D.jsx)(`select`,{className:`input-premium`,value:et,onChange:e=>tt(e.target.value),children:we.map(e=>(0,D.jsxs)(`option`,{value:e.id,children:[e.name,` (`,e.dateStr,`)`]},e.id))})]}),(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Horário`}),(0,D.jsx)(`select`,{className:`input-premium`,value:nt,onChange:e=>rt(e.target.value),children:[`09:00`,`09:30`,`10:00`,`10:30`,`11:00`,`11:30`,`12:00`,`13:00`,`13:30`,`14:00`,`14:30`,`15:00`,`15:30`,`16:00`,`16:30`,`17:00`,`17:30`,`18:00`,`18:30`,`19:00`,`19:30`,`20:00`].map(e=>(0,D.jsx)(`option`,{value:e,children:e},e))})]})]}),(0,D.jsxs)(`div`,{className:`modal-actions`,children:[(0,D.jsx)(`button`,{type:`button`,className:`btn-secondary`,onClick:()=>k(!1),children:`Cancelar`}),(0,D.jsx)(`button`,{type:`submit`,className:`btn-gold`,children:`Confirmar Reserva`})]})]})]})}),A&&(0,D.jsx)(`div`,{className:`modal-overlay`,children:(0,D.jsxs)(`div`,{className:`modal-content glass`,children:[(0,D.jsx)(`div`,{className:`modal-swipe-bar`}),(0,D.jsxs)(`div`,{className:`modal-header`,children:[(0,D.jsx)(`h3`,{children:`Detalhes do Agendamento`}),(0,D.jsx)(`button`,{className:`btn-close-modal`,onClick:()=>qe(null),children:(0,D.jsx)(Se,{size:20})})]}),(0,D.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`16px`,fontSize:`14px`},children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`strong`,{children:`Cliente:`}),` `,yn.get(A.clientId)?.name,(0,D.jsxs)(`div`,{style:{fontSize:`12px`,color:`var(--text-muted)`},children:[`WhatsApp: `,yn.get(A.clientId)?.phone]})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`strong`,{children:`Serviço:`}),` `,bn.get(A.serviceId)?.name,(0,D.jsxs)(`div`,{style:{fontSize:`12px`,color:`var(--text-muted)`},children:[`Duração: `,A.duration,` min | Preço: R$ `,A.price.toFixed(2)]})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`strong`,{children:`Profissional:`}),` `,xn.get(A.professionalId)?.name]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`strong`,{children:`Horário Marcado:`}),` `,A.day,` às `,A.time]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`strong`,{children:`Status Atual:`}),` `,(0,D.jsx)(`span`,{className:`badge ${A.status===`concluido`?`badge-success`:A.status===`confirmado`?`badge-info`:A.status===`cancelado`?`badge-error`:`badge-warning`}`,children:A.status})]}),A.status===`pendente`&&(0,D.jsx)(`div`,{style:{background:`var(--warning-bg)`,border:`1px solid var(--warning)`,padding:`10px`,borderRadius:`6px`,fontSize:`12px`,color:`var(--warning)`},children:`Solicitação enviada online pelo cliente.`}),(0,D.jsxs)(`div`,{className:`modal-actions`,style:{borderTop:`1px solid var(--border-gray)`,paddingTop:`16px`,marginTop:`12px`,flexWrap:`wrap`},children:[A.status!==`concluido`&&A.status!==`cancelado`&&(0,D.jsxs)(`button`,{className:`btn-outline`,style:{color:`#25D366`,borderColor:`rgba(37,211,102,0.4)`,width:`100%`,marginBottom:`8px`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:`8px`},onClick:()=>{_n(A),qe(null)},children:[(0,D.jsx)(T,{size:14}),` Enviar Lembrete via WhatsApp`]}),(0,D.jsx)(`button`,{className:`btn-secondary`,onClick:()=>qe(null),children:`Fechar`}),A.status!==`concluido`&&A.status!==`cancelado`&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`button`,{className:`btn-outline`,style:{color:`var(--error)`,borderColor:`rgba(239,68,68,0.4)`},onClick:()=>{Fn(A.id,`cancelado`),qe(null)},children:`Cancelar`}),(0,D.jsx)(`button`,{className:`btn-gold`,onClick:()=>{Fn(A.id,`concluido`),qe(null)},children:`Concluir Visita`})]})]})]})]})}),it&&(0,D.jsx)(`div`,{className:`modal-overlay`,children:(0,D.jsxs)(`div`,{className:`modal-content glass`,children:[(0,D.jsx)(`div`,{className:`modal-swipe-bar`}),(0,D.jsxs)(`div`,{className:`modal-header`,children:[(0,D.jsx)(`h3`,{children:`Cadastrar Novo Cliente`}),(0,D.jsx)(`button`,{className:`btn-close-modal`,onClick:()=>at(!1),children:(0,D.jsx)(Se,{size:20})})]}),(0,D.jsxs)(`form`,{onSubmit:Ln,className:`modal-form`,children:[(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Nome do Cliente *`}),(0,D.jsx)(`input`,{type:`text`,required:!0,value:ft,onChange:e=>pt(e.target.value),className:`input-premium`,placeholder:`Ex: Lucas Gabriel`})]}),(0,D.jsxs)(`div`,{className:`form-row`,children:[(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Telefone / WhatsApp`}),(0,D.jsx)(`input`,{type:`text`,value:mt,onChange:e=>ht(e.target.value),className:`input-premium`,placeholder:`(11) 99999-0000`})]}),(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`E-mail`}),(0,D.jsx)(`input`,{type:`email`,value:gt,onChange:e=>_t(e.target.value),className:`input-premium`,placeholder:`cliente@email.com`})]})]}),(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Preferências e Notas de CRM`}),(0,D.jsx)(`textarea`,{value:vt,onChange:e=>yt(e.target.value),className:`input-premium`,rows:`3`,placeholder:`Ex: Corte degradê. Gosta de café.`,style:{resize:`none`}})]}),(0,D.jsxs)(`div`,{className:`modal-actions`,children:[(0,D.jsx)(`button`,{type:`button`,className:`btn-secondary`,onClick:()=>at(!1),children:`Cancelar`}),(0,D.jsx)(`button`,{type:`submit`,className:`btn-gold`,children:`Cadastrar Cliente`})]})]})]})}),ot&&(0,D.jsx)(`div`,{className:`modal-overlay`,children:(0,D.jsxs)(`div`,{className:`modal-content glass`,children:[(0,D.jsx)(`div`,{className:`modal-swipe-bar`}),(0,D.jsxs)(`div`,{className:`modal-header`,children:[(0,D.jsx)(`h3`,{children:`Novo Serviço`}),(0,D.jsx)(`button`,{className:`btn-close-modal`,onClick:()=>st(!1),children:(0,D.jsx)(Se,{size:20})})]}),(0,D.jsxs)(`form`,{onSubmit:Rn,className:`modal-form`,children:[(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Nome do Serviço *`}),(0,D.jsx)(`input`,{type:`text`,required:!0,value:bt,onChange:e=>xt(e.target.value),className:`input-premium`,placeholder:`Ex: Sobrancelha Premium`})]}),(0,D.jsxs)(`div`,{className:`form-row`,children:[(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Preço Cobrado (R$) *`}),(0,D.jsx)(`input`,{type:`number`,step:`0.01`,required:!0,value:St,onChange:e=>Ct(e.target.value),className:`input-premium`,placeholder:`R$ 35.00`})]}),(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Duração`}),(0,D.jsxs)(`select`,{value:wt,onChange:e=>Tt(e.target.value),className:`input-premium`,children:[(0,D.jsx)(`option`,{value:`15`,children:`15 min`}),(0,D.jsx)(`option`,{value:`30`,children:`30 min`}),(0,D.jsx)(`option`,{value:`45`,children:`45 min`}),(0,D.jsx)(`option`,{value:`60`,children:`60 min`}),(0,D.jsx)(`option`,{value:`90`,children:`90 min`})]})]})]}),(0,D.jsx)(`div`,{className:`form-row`,children:(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Identificador Visual (Cor)`}),(0,D.jsx)(`div`,{style:{display:`flex`,gap:`8px`,marginTop:`4px`},children:[`#3b82f6`,`#10b981`,`#c5a059`,`#ef4444`,`#8b5cf6`,`#ec4899`].map(e=>(0,D.jsx)(`div`,{onClick:()=>kt(e),style:{width:`28px`,height:`28px`,borderRadius:`50%`,backgroundColor:e,cursor:`pointer`,border:Ot===e?`2px solid #ffffff`:`none`,boxShadow:`0 0 4px rgba(0,0,0,0.5)`}},e))})]})}),(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Descrição Curta`}),(0,D.jsx)(`input`,{type:`text`,value:Et,onChange:e=>Dt(e.target.value),className:`input-premium`,placeholder:`Descrição no portal do cliente`})]}),(0,D.jsxs)(`div`,{className:`modal-actions`,children:[(0,D.jsx)(`button`,{type:`button`,className:`btn-secondary`,onClick:()=>st(!1),children:`Cancelar`}),(0,D.jsx)(`button`,{type:`submit`,className:`btn-gold`,children:`Adicionar ao Catálogo`})]})]})]})}),ct&&(0,D.jsx)(`div`,{className:`modal-overlay`,children:(0,D.jsxs)(`div`,{className:`modal-content glass`,children:[(0,D.jsx)(`div`,{className:`modal-swipe-bar`}),(0,D.jsxs)(`div`,{className:`modal-header`,children:[(0,D.jsx)(`h3`,{children:`Novo Barbeiro`}),(0,D.jsx)(`button`,{className:`btn-close-modal`,onClick:()=>lt(!1),children:(0,D.jsx)(Se,{size:20})})]}),(0,D.jsxs)(`form`,{onSubmit:zn,className:`modal-form`,children:[(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Nome do Barbeiro *`}),(0,D.jsx)(`input`,{type:`text`,required:!0,value:At,onChange:e=>jt(e.target.value),className:`input-premium`,placeholder:`Ex: Felipe Amorim`})]}),(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Especialidades *`}),(0,D.jsx)(`input`,{type:`text`,required:!0,value:Mt,onChange:e=>Nt(e.target.value),className:`input-premium`,placeholder:`Ex: Especialista em Barbas`})]}),(0,D.jsxs)(`div`,{className:`form-row`,children:[(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Comissão (%)`}),(0,D.jsx)(`input`,{type:`number`,min:`0`,max:`100`,value:Pt,onChange:e=>Ft(e.target.value),className:`input-premium`})]}),(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Dias de Trabalho`}),(0,D.jsx)(`input`,{type:`text`,value:It,onChange:e=>Lt(e.target.value),className:`input-premium`,placeholder:`Ex: Terça a Sábado`})]})]}),(0,D.jsxs)(`div`,{className:`modal-actions`,children:[(0,D.jsx)(`button`,{type:`button`,className:`btn-secondary`,onClick:()=>lt(!1),children:`Cancelar`}),(0,D.jsx)(`button`,{type:`submit`,className:`btn-gold`,children:`Registrar Profissional`})]})]})]})}),cn&&(0,D.jsx)(`div`,{className:`modal-overlay`,children:(0,D.jsxs)(`div`,{className:`modal-content glass`,style:{maxWidth:`600px`},children:[(0,D.jsx)(`div`,{className:`modal-swipe-bar`}),(0,D.jsxs)(`div`,{className:`modal-header`,children:[(0,D.jsxs)(`h3`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,D.jsx)(E,{size:20,style:{color:`var(--accent-gold)`}}),`Campanha de Recorrência`]}),(0,D.jsx)(`button`,{className:`btn-close-modal`,onClick:()=>{ln(!1),un(null)},children:(0,D.jsx)(Se,{size:20})})]}),(0,D.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`16px`,fontSize:`14px`},children:[(0,D.jsxs)(`p`,{style:{color:`var(--text-muted)`,fontSize:`13px`,lineHeight:`1.5`},children:[`Abaixo estão listados os `,(0,D.jsxs)(`strong`,{children:[mn,` clientes`]}),` que não agendam visitas há mais de 45 dias. Envie uma mensagem personalizada para convidá-los a retornar.`]}),(0,D.jsxs)(`div`,{className:`form-group`,children:[(0,D.jsx)(`label`,{children:`Mensagem da Campanha`}),(0,D.jsx)(`textarea`,{className:`input-premium`,rows:3,value:j.retentionTemplate,onChange:e=>nn({...j,retentionTemplate:e.target.value}),placeholder:`Modelo da mensagem...`,style:{resize:`none`,fontSize:`13px`},disabled:M&&M.status===`sending`}),(0,D.jsxs)(`span`,{style:{fontSize:`11px`,color:`var(--text-muted)`},children:["Use a tag `",`{nome}`,"` para incluir o nome do cliente."]})]}),(0,D.jsx)(`div`,{style:{maxHeight:`180px`,overflowY:`auto`,border:`1px solid var(--border-gray)`,borderRadius:`6px`,padding:`10px`,display:`flex`,flexDirection:`column`,gap:`8px`},children:pn.map(e=>(0,D.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`6px 8px`,borderRadius:`4px`,background:`rgba(255,255,255,0.02)`},children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`div`,{style:{fontWeight:`500`},children:e.name}),(0,D.jsxs)(`div`,{style:{fontSize:`11px`,color:`var(--text-muted)`},children:[`Último corte há `,e.lastVisitDaysAgo,` dias • `,e.phone]})]}),(0,D.jsxs)(`button`,{className:`btn-outline btn-small`,style:{color:`#25D366`,borderColor:`#25D366`,padding:`4px 8px`,fontSize:`11px`,display:`flex`,alignItems:`center`,gap:`4px`},onClick:()=>_n(null,!0,e),disabled:M&&M.status===`sending`,children:[(0,D.jsx)(T,{size:10}),` Enviar via Whats`]})]},e.id))}),M&&(0,D.jsxs)(`div`,{style:{border:`1px solid var(--border-gray)`,padding:`12px`,borderRadius:`8px`,background:`rgba(255,255,255,0.01)`},children:[(0,D.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,fontSize:`12px`,marginBottom:`6px`},children:[(0,D.jsx)(`span`,{children:M.status===`sending`?`Enviando para ${M.clientName}...`:`Disparo da campanha concluído!`}),(0,D.jsxs)(`span`,{children:[M.current,` / `,M.total]})]}),(0,D.jsx)(`div`,{className:`progress-bar-container`,children:(0,D.jsx)(`div`,{className:`progress-bar-fill`,style:{width:`${M.current/M.total*100}%`}})})]}),(0,D.jsxs)(`div`,{className:`modal-actions`,style:{borderTop:`1px solid var(--border-gray)`,paddingTop:`16px`,marginTop:`12px`},children:[(0,D.jsx)(`button`,{className:`btn-secondary`,onClick:()=>{ln(!1),un(null)},disabled:M&&M.status===`sending`,children:`Fechar`}),M?.status!==`finished`&&(0,D.jsxs)(`button`,{className:`btn-gold`,onClick:()=>vn(pn),disabled:M&&M.status===`sending`,style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,D.jsx)(E,{size:14}),` Disparar Campanha (Simulado)`]})]})]})]})})]})}(0,u.createRoot)(document.getElementById(`root`)).render((0,D.jsx)(l.StrictMode,{children:(0,D.jsx)(Ee,{})}));