=d&&y<=p}else{for(;y>d;)y-=360;for(;y=p&&y<=d}return r?i(i({},t),{},{radius:a,angle:h(y,t)}):null}},9720:function(e,t,r){"use strict";r.d(t,{W:function(){return i}});var n=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function i(e){return"string"==typeof e&&n.includes(e)}},1543:function(e,t,r){"use strict";function n(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}r.d(t,{p:function(){return n}})},9599:function(e,t,r){"use strict";r.d(t,{Wd:function(){return l},b4:function(){return a},v7:function(){return c}});var n=r(9037),i=r(6630),o=r(6395);function a(e){if(Array.isArray(e)&&2===e.length){var[t,r]=e;if((0,o.n)(t)&&(0,o.n)(r))return!0}return!1}function u(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function l(e,t){if(t&&"function"!=typeof e&&Array.isArray(e)&&2===e.length){var r,n,[i,u]=e;if((0,o.n)(i))r=i;else if("function"==typeof i)return;if((0,o.n)(u))n=u;else if("function"==typeof u)return;var l=[r,n];if(a(l))return l}}function c(e,t,r){if(r||null!=t){if("function"==typeof e&&null!=t)try{var o=e(t,r);if(a(o))return u(o,t,r)}catch(e){}if(Array.isArray(e)&&2===e.length){var l,c,[s,f]=e;if("auto"===s)null!=t&&(l=Math.min(...t));else if((0,i.hj)(s))l=s;else if("function"==typeof s)try{null!=t&&(l=s(null==t?void 0:t[0]))}catch(e){}else if("string"==typeof s&&n.rI.test(s)){var h=n.rI.exec(s);if(null==h||null==h[1]||null==t)l=void 0;else{var d=+h[1];l=t[0]-d}}else l=null==t?void 0:t[0];if("auto"===f)null!=t&&(c=Math.max(...t));else if((0,i.hj)(f))c=f;else if("function"==typeof f)try{null!=t&&(c=f(null==t?void 0:t[1]))}catch(e){}else if("string"==typeof f&&n.Ji.test(f)){var p=n.Ji.exec(f);if(null==p||null==p[1]||null==t)c=void 0;else{var y=+p[1];c=t[1]+y}}else c=null==t?void 0:t[1];var v=[l,c];if(a(v))return null==t?v:u(v,t,r)}}}},6395:function(e,t,r){"use strict";function n(e){return Number.isFinite(e)}function i(e){return"number"==typeof e&&e>0&&Number.isFinite(e)}r.d(t,{n:function(){return n},r:function(){return i}})},130:function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e,t){var r=function(e){for(var t=1;t(void 0===e[r]&&void 0!==t[r]&&(e[r]=t[r]),e),r)}r.d(t,{j:function(){return i}})},4385:function(e,t,r){"use strict";function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function i(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i{var o=r[i-1];return"string"==typeof o?e+o+t:void 0!==o?e+n(o)+t:e+t},"")}r.d(t,{E:function(){return n},N:function(){return i}})},6125:function(e,t,r){"use strict";function n(e){return null==e?void 0:e.id}r.d(t,{H:function(){return n}})},3414:function(e,t,r){"use strict";r.d(t,{S:function(){return o}}),r(2265);var n=r(9720),i=r(1221);function o(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&((0,i.CK)(r)||(0,i.a1)(r)||(0,n.W)(r))&&(t[r]=e[r]);return t}},1221:function(e,t,r){"use strict";r.d(t,{CK:function(){return o},a1:function(){return a},qM:function(){return l},qq:function(){return u}});var n=r(2265),i=new Set(["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"]);function o(e){return"string"==typeof e&&i.has(e)}function a(e){return"string"==typeof e&&e.startsWith("data-")}function u(e){if("object"!=typeof e||null===e)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(o(r)||a(r))&&(t[r]=e[r]);return t}function l(e){return null==e?null:(0,n.isValidElement)(e)&&"object"==typeof e.props&&null!==e.props?u(e.props):"object"!=typeof e||Array.isArray(e)?null:u(e)}},1637:function(e,t,r){"use strict";r.d(t,{Ym:function(){return a},bw:function(){return l},t9:function(){return o}});var n=r(2265),i=r(9720),o=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,a=(e,t)=>{if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if((0,n.isValidElement)(e)&&(r=e.props),"object"!=typeof r&&"function"!=typeof r)return null;var o={};return Object.keys(r).forEach(e=>{(0,i.W)(e)&&(o[e]=t||(t=>r[e](r,t)))}),o},u=(e,t,r)=>n=>(e(t,r,n),null),l=(e,t,r)=>{if(null===e||"object"!=typeof e&&"function"!=typeof e)return null;var n=null;return Object.keys(e).forEach(o=>{var a=e[o];(0,i.W)(o)&&"function"==typeof a&&(n||(n={}),n[o]=u(a,t,r))}),n}},9087:function(e,t,r){"use strict";r.d(t,{i:function(){return o}});var n=r(2265),i=r(6630);function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"animation-",r=(0,n.useRef)((0,i.EL)(t)),o=(0,n.useRef)(e);return o.current!==e&&(r.current=(0,i.EL)(t),o.current=e),r.current}},3928:function(e,t,r){"use strict";r.d(t,{N:function(){return n}});var n={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3}},8002:function(e,t,r){"use strict";r.d(t,{$:function(){return f}});var n=r(2265),i=r(4887),o=r(6630),a=r(9040),u=r(3543),l=r(7274),c=r(5953),s=r(8735);function f(e){var{zIndex:t,children:r}=e,f=(0,c.kz)()&&void 0!==t&&0!==t,h=(0,s.W)(),d=(0,a.T)();(0,n.useLayoutEffect)(()=>f?(d((0,l.hS)({zIndex:t})),()=>{d((0,l.G$)({zIndex:t}))}):o.ZT,[d,t,f]);var p=(0,a.C)(e=>(0,u.e)(e,t,h));return f?p?(0,i.createPortal)(r,p):null:r}},3543:function(e,t,r){"use strict";r.d(t,{e:function(){return a},k:function(){return u}});var n=r(2713),i=r(3699),o=r(3928),a=(0,n.P1)(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(null!=t){var n=e[t];return null==n?void 0:r?n.panoramaElement:n.element}}),u=(0,n.P1)(e=>e.zIndex.zIndexMap,e=>Array.from(new Set(Object.keys(e).map(e=>parseInt(e,10)).concat(Object.values(o.N)))).sort((e,t)=>e-t),{memoizeOptions:{resultEqualityCheck:i.E}})},4369:function(e,t,r){"use strict";var n=r(2265),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,a=n.useEffect,u=n.useLayoutEffect,l=n.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var s="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=o({inst:{value:r,getSnapshot:t}}),i=n[0].inst,s=n[1];return u(function(){i.value=r,i.getSnapshot=t,c(i)&&s({inst:i})},[e,r,t]),a(function(){return c(i)&&s({inst:i}),e(function(){c(i)&&s({inst:i})})},[e]),l(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:s},2860:function(e,t,r){"use strict";var n=r(2265),i=r(2558),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=i.useSyncExternalStore,u=n.useRef,l=n.useEffect,c=n.useMemo,s=n.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var f=u(null);if(null===f.current){var h={hasValue:!1,value:null};f.current=h}else h=f.current;var d=a(e,(f=c(function(){function e(e){if(!l){if(l=!0,a=e,e=n(e),void 0!==i&&h.hasValue){var t=h.value;if(i(t,e))return u=t}return u=e}if(t=u,o(a,e))return t;var r=n(e);return void 0!==i&&i(t,r)?(a=e,t):(a=e,u=r)}var a,u,l=!1,c=void 0===r?null:r;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,r,n,i]))[0],f[1]);return l(function(){h.hasValue=!0,h.value=d},[d]),s(d),d}},5274:function(e,t,r){"use strict";var n=r(2265);n.useSyncExternalStore,n.useRef,n.useEffect,n.useMemo,n.useDebugValue},2558:function(e,t,r){"use strict";e.exports=r(4369)},5195:function(e,t,r){"use strict";e.exports=r(2860)},6548:function(e,t,r){"use strict";r(5274)},9129:function(e,t,r){"use strict";r.d(t,{bu:function(){return g},xC:function(){return b},PH:function(){return c},e:function(){return ei},oM:function(){return j},cw:function(){return y}});var n,i=r(9234),o=r(9688);function a(e){return({dispatch:t,getState:r})=>n=>i=>"function"==typeof i?i(t,r,e):n(i)}var u=a();r(257);var l="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!=arguments.length)return"object"==typeof arguments[0]?o.qC:o.qC.apply(null,arguments)};"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function c(e,t){function r(...n){if(t){let r=t(...n);if(!r)throw Error(eo(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=t=>(0,o.LG)(t)&&t.type===e,r}var s=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function f(e){return(0,i.o$)(e)?(0,i.Uy)(e,()=>{}):e}function h(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}var d=()=>function(e){let{thunk:t=!0,immutableCheck:r=!0,serializableCheck:n=!0,actionCreatorCheck:i=!0}=e??{},o=new s;return t&&("boolean"==typeof t?o.push(u):o.push(a(t.extraArgument))),o},p="RTK_autoBatch",y=()=>e=>({payload:e,meta:{[p]:!0}}),v=e=>t=>{setTimeout(t,e)},g=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),i=!0,o=!1,a=!1,u=new Set,l="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:v(10):"callback"===e.type?e.queueNotification:v(e.timeout),c=()=>{a=!1,o&&(o=!1,u.forEach(e=>e()))};return Object.assign({},n,{subscribe(e){let t=n.subscribe(()=>i&&e());return u.add(e),()=>{t(),u.delete(e)}},dispatch(e){try{return(o=!(i=!e?.meta?.[p]))&&!a&&(a=!0,l(c)),n.dispatch(e)}finally{i=!0}}})},m=e=>function(t){let{autoBatch:r=!0}=t??{},n=new s(e);return r&&n.push(g("object"==typeof r?r:void 0)),n};function b(e){let t,r;let n=d(),{reducer:i,middleware:a,devTools:u=!0,duplicateMiddlewareCheck:c=!0,preloadedState:s,enhancers:f}=e||{};if("function"==typeof i)t=i;else if((0,o.PO)(i))t=(0,o.UY)(i);else throw Error(eo(1));r="function"==typeof a?a(n):n();let h=o.qC;u&&(h=l({trace:!1,..."object"==typeof u&&u}));let p=m((0,o.md)(...r)),y=h(..."function"==typeof f?f(p):p());return(0,o.MT)(t,s,y)}function w(e){let t;let r={},n=[],i={addCase(e,t){let n="string"==typeof e?e:e.type;if(!n)throw Error(eo(28));if(n in r)throw Error(eo(29));return r[n]=t,i},addAsyncThunk:(e,t)=>(t.pending&&(r[e.pending.type]=t.pending),t.rejected&&(r[e.rejected.type]=t.rejected),t.fulfilled&&(r[e.fulfilled.type]=t.fulfilled),t.settled&&n.push({matcher:e.settled,reducer:t.settled}),i),addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),i),addDefaultCase:e=>(t=e,i)};return e(i),[r,n,t]}var x=(e=21)=>{let t="",r=e;for(;r--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},O=Symbol.for("rtk-slice-createasyncthunk"),P=((n=P||{}).reducer="reducer",n.reducerWithPrepare="reducerWithPrepare",n.asyncThunk="asyncThunk",n),j=function({creators:e}={}){let t=e?.asyncThunk?.[O];return function(e){let r;let{name:n,reducerPath:o=n}=e;if(!n)throw Error(eo(11));let a=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},u=Object.keys(a),l={},s={},d={},p=[],y={addCase(e,t){let r="string"==typeof e?e:e.type;if(!r)throw Error(eo(12));if(r in s)throw Error(eo(13));return s[r]=t,y},addMatcher:(e,t)=>(p.push({matcher:e,reducer:t}),y),exposeAction:(e,t)=>(d[e]=t,y),exposeCaseReducer:(e,t)=>(l[e]=t,y)};function v(){let[t={},r=[],n]="function"==typeof e.extraReducers?w(e.extraReducers):[e.extraReducers],o={...t,...s};return function(e,t){let r;let[n,o,a]=w(t);if("function"==typeof e)r=()=>f(e());else{let t=f(e);r=()=>t}function u(e=r(),t){let u=[n[t.type],...o.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return 0===u.filter(e=>!!e).length&&(u=[a]),u.reduce((e,r)=>{if(r){if((0,i.mv)(e)){let n=r(e,t);return void 0===n?e:n}if((0,i.o$)(e))return(0,i.Uy)(e,e=>r(e,t));{let n=r(e,t);if(void 0===n){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return n}}return e},e)}return u.getInitialState=r,u}(e.initialState,e=>{for(let t in o)e.addCase(t,o[t]);for(let t of p)e.addMatcher(t.matcher,t.reducer);for(let t of r)e.addMatcher(t.matcher,t.reducer);n&&e.addDefaultCase(n)})}u.forEach(r=>{let i=a[r],o={reducerName:r,type:`${n}/${r}`,createNotation:"function"==typeof e.reducers};"asyncThunk"===i._reducerDefinitionType?function({type:e,reducerName:t},r,n,i){if(!i)throw Error(eo(18));let{payloadCreator:o,fulfilled:a,pending:u,rejected:l,settled:c,options:s}=r,f=i(e,o,s);n.exposeAction(t,f),a&&n.addCase(f.fulfilled,a),u&&n.addCase(f.pending,u),l&&n.addCase(f.rejected,l),c&&n.addMatcher(f.settled,c),n.exposeCaseReducer(t,{fulfilled:a||S,pending:u||S,rejected:l||S,settled:c||S})}(o,i,y,t):function({type:e,reducerName:t,createNotation:r},n,i){let o,a;if("reducer"in n){if(r&&"reducerWithPrepare"!==n._reducerDefinitionType)throw Error(eo(17));o=n.reducer,a=n.prepare}else o=n;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?c(e,a):c(e))}(o,i,y)});let g=e=>e,m=new Map,b=new WeakMap;function x(e,t){return r||(r=v()),r(e,t)}function O(){return r||(r=v()),r.getInitialState()}function P(t,r=!1){function n(e){let i=e[t];return void 0===i&&r&&(i=h(b,n,O)),i}function i(t=g){let n=h(m,r,()=>new WeakMap);return h(n,t,()=>{let n={};for(let[i,o]of Object.entries(e.selectors??{}))n[i]=function(e,t,r,n){function i(o,...a){let u=t(o);return void 0===u&&n&&(u=r()),e(u,...a)}return i.unwrapped=e,i}(o,t,()=>h(b,t,O),r);return n})}return{reducerPath:t,getSelectors:i,get selectors(){return i(n)},selectSlice:n}}let j={name:n,reducer:x,actions:d,caseReducers:l,getInitialState:O,...P(o),injectInto(e,{reducerPath:t,...r}={}){let n=t??o;return e.inject({reducerPath:n,reducer:x},r),{...j,...P(n,!0)}}};return j}}();function S(){}var _="listener",E="completed",A="cancelled",M=`task-${A}`,k=`task-${E}`,T=`${_}-${A}`,C=`${_}-${E}`,D=class{constructor(e){this.code=e,this.message=`task ${A} (reason: ${e})`}name="TaskAbortError";message},N=(e,t)=>{if("function"!=typeof e)throw TypeError(eo(32))},I=()=>{},z=(e,t=I)=>(e.catch(t),e),R=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),L=e=>{if(e.aborted)throw new D(e.reason)};function U(e,t){let r=I;return new Promise((n,i)=>{let o=()=>i(new D(e.reason));if(e.aborted){o();return}r=R(e,o),t.finally(()=>r()).then(n,i)}).finally(()=>{r=I})}var B=async(e,t)=>{try{await Promise.resolve();let t=await e();return{status:"ok",value:t}}catch(e){return{status:e instanceof D?"cancelled":"rejected",error:e}}finally{t?.()}},$=e=>t=>z(U(e,t).then(t=>(L(e),t))),F=e=>{let t=$(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:W}=Object,K={},Z="listenerMiddleware",q=(e,t)=>{let r=t=>R(e,()=>t.abort(e.reason));return(n,i)=>{N(n,"taskExecutor");let o=new AbortController;r(o);let a=B(async()=>{L(e),L(o.signal);let t=await n({pause:$(o.signal),delay:F(o.signal),signal:o.signal});return L(o.signal),t},()=>o.abort(k));return i?.autoJoin&&t.push(a.catch(I)),{result:$(e)(a),cancel(){o.abort(M)}}}},H=(e,t)=>{let r=async(r,n)=>{L(t);let i=()=>{},o=[new Promise((t,n)=>{let o=e({predicate:r,effect:(e,r)=>{r.unsubscribe(),t([e,r.getState(),r.getOriginalState()])}});i=()=>{o(),n()}})];null!=n&&o.push(new Promise(e=>setTimeout(e,n,null)));try{let e=await U(t,Promise.race(o));return L(t),e}finally{i()}};return(e,t)=>z(r(e,t))},V=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:o}=e;if(t)i=c(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(i);else throw Error(eo(21));return N(o,"options.listener"),{predicate:i,type:t,effect:o}},X=W(e=>{let{type:t,predicate:r,effect:n}=V(e);return{id:x(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw Error(eo(22))}}},{withTypes:()=>X}),Y=(e,t)=>{let{type:r,effect:n,predicate:i}=V(t);return Array.from(e.values()).find(e=>("string"==typeof r?e.type===r:e.predicate===i)&&e.effect===n)},G=e=>{e.pending.forEach(e=>{e.abort(T)})},Q=(e,t)=>()=>{for(let e of t.keys())G(e);e.clear()},J=(e,t,r)=>{try{e(t,r)}catch(e){setTimeout(()=>{throw e},0)}},ee=W(c(`${Z}/add`),{withTypes:()=>ee}),et=c(`${Z}/removeAll`),er=W(c(`${Z}/remove`),{withTypes:()=>er}),en=(...e)=>{console.error(`${Z}/error`,...e)},ei=(e={})=>{let t=new Map,r=new Map,n=e=>{let t=r.get(e)??0;r.set(e,t+1)},i=e=>{let t=r.get(e)??1;1===t?r.delete(e):r.set(e,t-1)},{extra:a,onError:u=en}=e;N(u,"onError");let l=e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&G(e)}),c=e=>l(Y(t,e)??X(e));W(c,{withTypes:()=>c});let s=e=>{let r=Y(t,e);return r&&(r.unsubscribe(),e.cancelActive&&G(r)),!!r};W(s,{withTypes:()=>s});let f=async(e,r,o,l)=>{let s=new AbortController,f=H(c,s.signal),h=[];try{e.pending.add(s),n(e),await Promise.resolve(e.effect(r,W({},o,{getOriginalState:l,condition:(e,t)=>f(e,t).then(Boolean),take:f,delay:F(s.signal),pause:$(s.signal),extra:a,signal:s.signal,fork:q(s.signal,h),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,r)=>{e!==s&&(e.abort(T),r.delete(e))})},cancel:()=>{s.abort(T),e.pending.delete(s)},throwIfCancelled:()=>{L(s.signal)}})))}catch(e){e instanceof D||J(u,e,{raisedBy:"effect"})}finally{await Promise.all(h),s.abort(C),i(e),e.pending.delete(s)}},h=Q(t,r);return{middleware:e=>r=>n=>{let i;if(!(0,o.LG)(n))return r(n);if(ee.match(n))return c(n.payload);if(et.match(n)){h();return}if(er.match(n))return s(n.payload);let a=e.getState(),l=()=>{if(a===K)throw Error(eo(23));return a};try{if(i=r(n),t.size>0){let r=e.getState();for(let i of Array.from(t.values())){let t=!1;try{t=i.predicate(n,r,a)}catch(e){t=!1,J(u,e,{raisedBy:"predicate"})}t&&f(i,n,e,l)}}}finally{a=K}return i},startListening:c,stopListening:s,clearListeners:h}};function eo(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}Symbol.for("rtk-state-proxy-original")},9234:function(e,t,r){"use strict";r.d(t,{Uy:function(){return ed},Vk:function(){return eh},mv:function(){return v},o$:function(){return g}});var n,i=Symbol.for("immer-nothing"),o=Symbol.for("immer-draftable"),a=Symbol.for("immer-state");function u(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var l=Object,c=l.getPrototypeOf,s="constructor",f="prototype",h="configurable",d="enumerable",p="writable",y="value",v=e=>!!e&&!!e[a];function g(e){return!!e&&(w(e)||_(e)||!!e[o]||!!e[s]?.[o]||E(e)||A(e))}var m=l[f][s].toString(),b=new WeakMap;function w(e){if(!e||!M(e))return!1;let t=c(e);if(null===t||t===l[f])return!0;let r=l.hasOwnProperty.call(t,s)&&t[s];if(r===Object)return!0;if(!k(r))return!1;let n=b.get(r);return void 0===n&&(n=Function.toString.call(r),b.set(r,n)),n===m}function x(e,t,r=!0){0===O(e)?(r?Reflect.ownKeys(e):l.keys(e)).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function O(e){let t=e[a];return t?t.type_:_(e)?1:E(e)?2:A(e)?3:0}var P=(e,t,r=O(e))=>2===r?e.has(t):l[f].hasOwnProperty.call(e,t),j=(e,t,r=O(e))=>2===r?e.get(t):e[t],S=(e,t,r,n=O(e))=>{2===n?e.set(t,r):3===n?e.add(r):e[t]=r},_=Array.isArray,E=e=>e instanceof Map,A=e=>e instanceof Set,M=e=>"object"==typeof e,k=e=>"function"==typeof e,T=e=>"boolean"==typeof e,C=e=>e.copy_||e.base_,D=e=>e.modified_?e.copy_:e.base_;function N(e,t){if(E(e))return new Map(e);if(A(e))return new Set(e);if(_(e))return Array[f].slice.call(e);let r=w(e);if(!0!==t&&("class_only"!==t||r)){let t=c(e);if(null!==t&&r)return{...e};let n=l.create(t);return l.assign(n,e)}{let t=l.getOwnPropertyDescriptors(e);delete t[a];let r=Reflect.ownKeys(t);for(let n=0;n1&&l.defineProperties(e,{set:z,add:z,clear:z,delete:z}),l.freeze(e),t&&x(e,(e,t)=>{I(t,!0)},!1)),e}var z={[y]:function(){u(2)}};function R(e){return!(null!==e&&M(e))||l.isFrozen(e)}var L="MapSet",U="Patches",B="ArrayMethods",$={};function F(e){let t=$[e];return t||u(0,e),t}var W=e=>!!$[e],K=()=>n,Z=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:W(L)?F(L):void 0,arrayMethodsPlugin_:W(B)?F(B):void 0});function q(e,t){t&&(e.patchPlugin_=F(U),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function H(e){V(e),e.drafts_.forEach(Y),e.drafts_=null}function V(e){e===n&&(n=e.parent_)}var X=e=>n=Z(n,e);function Y(e){let t=e[a];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function G(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(void 0!==e&&e!==r){r[a].modified_&&(H(t),u(4)),g(e)&&(e=Q(t,e));let{patchPlugin_:n}=t;n&&n.generateReplacementPatches_(r[a].base_,e,t)}else e=Q(t,r);return function(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&I(t,r)}(t,e,!0),H(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==i?e:void 0}function Q(e,t){if(R(t))return t;let r=t[a];if(!r)return ei(t,e.handledSet_,e);if(!ee(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:t}=r;if(t)for(;t.length>0;)t.pop()(e);en(r,e)}return r.copy_}function J(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var ee=(e,t)=>e.scope_===t,et=[];function er(e,t,r,n){let i=C(e),o=e.type_;if(void 0!==n&&j(i,n,o)===t){S(i,n,r,o);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;x(i,(e,r)=>{if(v(r)){let n=t.get(r)||[];n.push(e),t.set(r,n)}})}for(let n of e.draftLocations_.get(t)??et)S(i,n,r,o)}function en(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:r}=t;if(r){let n=r.getPath(e);n&&r.generatePatches_(e,n,t)}J(e)}}function ei(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||v(e)||t.has(e)||!g(e)||R(e)||(t.add(e),x(e,(n,i)=>{if(v(i)){let t=i[a];ee(t,r)&&(S(e,n,D(t),e.type_),J(t))}else g(i)&&ei(i,t,r)})),e}var eo={get(e,t){if(t===a)return e;let r=e.scope_.arrayMethodsPlugin_,n=1===e.type_&&"string"==typeof t;if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let i=C(e);if(!P(i,t,e.type_))return function(e,t,r){let n=el(t,r);return n?y in n?n[y]:n.get?.call(e.draft_):void 0}(e,i,t);let o=i[t];if(e.finalized_||!g(o)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&function(e){let t=+e;return Number.isInteger(t)&&String(t)===e}(t))return o;if(o===eu(e.base_,t)){es(e);let r=1===e.type_?+t:t,n=ef(e.scope_,o,e,r);return e.copy_[r]=n}return o},has:(e,t)=>t in C(e),ownKeys:e=>Reflect.ownKeys(C(e)),set(e,t,r){let n=el(C(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let n=eu(C(e),t),i=n?.[a];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if((r===n?0!==r||1/r==1/n:r!=r&&n!=n)&&(void 0!==r||P(e.base_,t,e.type_)))return!0;es(e),ec(e)}return!!(e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t]))||(e.copy_[t]=r,e.assigned_.set(t,!0),!function(e,t,r){let{scope_:n}=e;if(v(r)){let i=r[a];ee(i,n)&&i.callbacks_.push(function(){es(e),er(e,r,D(i),t)})}else g(r)&&e.callbacks_.push(function(){let i=C(e);3===e.type_?i.has(r)&&ei(r,n.handledSet_,n):j(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&ei(j(e.copy_,t,e.type_),n.handledSet_,n)})}(e,t,r),!0)},deleteProperty:(e,t)=>(es(e),void 0!==eu(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),ec(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){let r=C(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{[p]:!0,[h]:1!==e.type_||"length"!==t,[d]:n[d],[y]:r[t]}:n},defineProperty(){u(11)},getPrototypeOf:e=>c(e.base_),setPrototypeOf(){u(12)}},ea={};for(let e in eo){let t=eo[e];ea[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}function eu(e,t){let r=e[a];return(r?C(r):e)[t]}function el(e,t){if(!(t in e))return;let r=c(e);for(;r;){let e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=c(r)}}function ec(e){!e.modified_&&(e.modified_=!0,e.parent_&&ec(e.parent_))}function es(e){e.copy_||(e.assigned_=new Map,e.copy_=N(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function ef(e,t,r,n){let[i,o]=E(t)?F(L).proxyMap_(t,r):A(t)?F(L).proxySet_(t,r):function(e,t){let r=_(e),n={type_:r?1:0,scope_:t?t.scope_:K(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=n,o=eo;r&&(i=[n],o=ea);let{revoke:a,proxy:u}=Proxy.revocable(i,o);return n.draft_=u,n.revoke_=a,[u,n]}(t,r);return(r?.scope_??K()).drafts_.push(i),o.callbacks_=r?.callbacks_??[],o.key_=n,r&&void 0!==n?function(e,t,r){e.callbacks_.push(function(n){if(!t||!ee(t,n))return;n.mapSetPlugin_?.fixSetContents(t);let i=D(t);er(e,t.draft_??t,i,r),en(t,n)})}(r,o,n):o.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(o);let{patchPlugin_:t}=e;o.modified_&&t&&t.generatePatches_(o,[],e)}),i}function eh(e){return v(e)||u(10,e),function e(t){let r;if(!g(t)||R(t))return t;let n=t[a],i=!0;if(n){if(!n.modified_)return n.base_;n.finalized_=!0,r=N(t,n.scope_.immer_.useStrictShallowCopy_),i=n.scope_.immer_.shouldUseStrictIteration()}else r=N(t,!0);return x(r,(t,n)=>{S(r,t,e(n))},i),n&&(n.finalized_=!1),r}(e)}ea.deleteProperty=function(e,t){return ea.set.call(this,e,t,void 0)},ea.set=function(e,t,r){return eo.set.call(this,e[0],t,r,e[0])};var ed=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,r)=>{let n;if(k(e)&&!k(t)){let r=t;t=e;let n=this;return function(e=r,...i){return n.produce(e,e=>t.call(this,e,...i))}}if(k(t)||u(6),void 0===r||k(r)||u(7),g(e)){let i=X(this),o=ef(i,e,void 0),a=!0;try{n=t(o),a=!1}finally{a?H(i):V(i)}return q(i,r),G(n,i)}if(e&&M(e))u(1,e);else{if(void 0===(n=t(e))&&(n=e),n===i&&(n=void 0),this.autoFreeze_&&I(n,!0),r){let t=[],i=[];F(U).generateReplacementPatches_(e,n,{patches_:t,inversePatches_:i}),r(t,i)}return n}},this.produceWithPatches=(e,t)=>{let r,n;return k(e)?(t,...r)=>this.produceWithPatches(t,t=>e(t,...r)):[this.produce(e,t,(e,t)=>{r=e,n=t}),r,n]},T(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),T(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),T(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){g(e)||u(8),v(e)&&(e=eh(e));let t=X(this),r=ef(t,e,void 0);return r[a].isManual_=!0,V(t),r}finishDraft(e,t){let r=e&&e[a];r&&r.isManual_||u(9);let{scope_:n}=r;return q(n,t),G(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));let n=F(U).applyPatches_;return v(e)?n(e,t):this.produce(e,e=>n(e,t))}}().produce},2516:function(e,t,r){"use strict";function n(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}r.d(t,{Z:function(){return n}}),Array.prototype.slice},6115:function(e,t,r){"use strict";function n(e){return function(){return e}}r.d(t,{Z:function(){return n}})},7790:function(e,t,r){"use strict";r.d(t,{d:function(){return l}});let n=Math.PI,i=2*n,o=i-1e-6;function a(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw Error(`invalid digits: ${e}`);if(t>15)return a;let r=10**t;return function(e){this._+=e[0];for(let t=1,n=e.length;t1e-6){if(Math.abs(f*l-c*s)>1e-6&&o){let d=r-a,p=i-u,y=l*l+c*c,v=Math.sqrt(y),g=Math.sqrt(h),m=o*Math.tan((n-Math.acos((y+h-(d*d+p*p))/(2*v*g)))/2),b=m/g,w=m/v;Math.abs(b-1)>1e-6&&this._append`L${e+b*s},${t+b*f}`,this._append`A${o},${o},0,0,${+(f*d>s*p)},${this._x1=e+w*l},${this._y1=t+w*c}`}else this._append`L${this._x1=e},${this._y1=t}`}}arc(e,t,r,a,u,l){if(e=+e,t=+t,l=!!l,(r=+r)<0)throw Error(`negative radius: ${r}`);let c=r*Math.cos(a),s=r*Math.sin(a),f=e+c,h=t+s,d=1^l,p=l?a-u:u-a;null===this._x1?this._append`M${f},${h}`:(Math.abs(this._x1-f)>1e-6||Math.abs(this._y1-h)>1e-6)&&this._append`L${f},${h}`,r&&(p<0&&(p=p%i+i),p>o?this._append`A${r},${r},0,1,${d},${e-c},${t-s}A${r},${r},0,1,${d},${this._x1=f},${this._y1=h}`:p>1e-6&&this._append`A${r},${r},0,${+(p>=n)},${d},${this._x1=e+r*Math.cos(u)},${this._y1=t+r*Math.sin(u)}`)}rect(e,t,r,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${r=+r}v${+n}h${-r}Z`}toString(){return this._}}function l(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(null==r)t=null;else{let e=Math.floor(r);if(!(e>=0))throw RangeError(`invalid digits: ${r}`);t=e}return e},()=>new u(t)}u.prototype},418:function(e,t,r){"use strict";r.d(t,{cA:function(){return W}});var n,i=Symbol.for("immer-nothing"),o=Symbol.for("immer-draftable"),a=Symbol.for("immer-state");function u(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var l=Object.getPrototypeOf;function c(e){return!!e&&!!e[a]}function s(e){return!!e&&(d(e)||Array.isArray(e)||!!e[o]||!!e.constructor?.[o]||m(e)||b(e))}var f=Object.prototype.constructor.toString(),h=new WeakMap;function d(e){if(!e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);if(null===t||t===Object.prototype)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if("function"!=typeof r)return!1;let n=h.get(r);return void 0===n&&(n=Function.toString.call(r),h.set(r,n)),n===f}function p(e,t,r=!0){0===y(e)?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function y(e){let t=e[a];return t?t.type_:Array.isArray(e)?1:m(e)?2:b(e)?3:0}function v(e,t){return 2===y(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function g(e,t,r){let n=y(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function m(e){return e instanceof Map}function b(e){return e instanceof Set}function w(e){return e.copy_||e.base_}function x(e,t){if(m(e))return new Map(e);if(b(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=d(e);if(!0!==t&&("class_only"!==t||r)){let t=l(e);return null!==t&&r?{...e}:Object.assign(Object.create(t),e)}{let t=Object.getOwnPropertyDescriptors(e);delete t[a];let r=Reflect.ownKeys(t);for(let n=0;n1&&Object.defineProperties(e,{set:P,add:P,clear:P,delete:P}),Object.freeze(e),t&&Object.values(e).forEach(e=>O(e,!0))),e}var P={value:function(){u(2)}};function j(e){return null===e||"object"!=typeof e||Object.isFrozen(e)}var S={};function _(e){let t=S[e];return t||u(0,e),t}function E(e,t){t&&(_("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function A(e){M(e),e.drafts_.forEach(T),e.drafts_=null}function M(e){e===n&&(n=e.parent_)}function k(e){return n={drafts_:[],parent_:n,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function T(e){let t=e[a];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function C(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return void 0!==e&&e!==r?(r[a].modified_&&(A(t),u(4)),s(e)&&(e=D(t,e),t.parent_||I(t,e)),t.patches_&&_("Patches").generateReplacementPatches_(r[a].base_,e,t.patches_,t.inversePatches_)):e=D(t,r,[]),A(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==i?e:void 0}function D(e,t,r){if(j(t))return t;let n=e.immer_.shouldUseStrictIteration(),i=t[a];if(!i)return p(t,(n,o)=>N(e,i,t,n,o,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return I(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;let t=i.copy_,o=t,a=!1;3===i.type_&&(o=new Set(t),t.clear(),a=!0),p(o,(n,o)=>N(e,i,t,n,o,r,a),n),I(e,t,!1),r&&e.patches_&&_("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function N(e,t,r,n,i,o,a){if(null==i||"object"!=typeof i&&!a)return;let u=j(i);if(!u||a){if(c(i)){let a=D(e,i,o&&t&&3!==t.type_&&!v(t.assigned_,n)?o.concat(n):void 0);if(g(r,n,a),!c(a))return;e.canAutoFreeze_=!1}else a&&r.add(i);if(s(i)&&!u){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&u)return;D(e,i),(!t||!t.scope_.parent_)&&"symbol"!=typeof n&&(m(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&I(e,i)}}}function I(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&O(t,r)}var z={get(e,t){if(t===a)return e;let r=w(e);if(!v(r,t))return function(e,t,r){let n=U(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}(e,r,t);let n=r[t];return e.finalized_||!s(n)?n:n===L(e.base_,t)?($(e),e.copy_[t]=F(n,e)):n},has:(e,t)=>t in w(e),ownKeys:e=>Reflect.ownKeys(w(e)),set(e,t,r){let n=U(w(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let n=L(w(e),t),i=n?.[a];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if((r===n?0!==r||1/r==1/n:r!=r&&n!=n)&&(void 0!==r||v(e.base_,t)))return!0;$(e),B(e)}return!!(e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t]))||(e.copy_[t]=r,e.assigned_[t]=!0,!0)},deleteProperty:(e,t)=>(void 0!==L(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,$(e),B(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){let r=w(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty(){u(11)},getPrototypeOf:e=>l(e.base_),setPrototypeOf(){u(12)}},R={};function L(e,t){let r=e[a];return(r?w(r):e)[t]}function U(e,t){if(!(t in e))return;let r=l(e);for(;r;){let e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=l(r)}}function B(e){!e.modified_&&(e.modified_=!0,e.parent_&&B(e.parent_))}function $(e){e.copy_||(e.copy_=x(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function F(e,t){let r=m(e)?_("MapSet").proxyMap_(e,t):b(e)?_("MapSet").proxySet_(e,t):function(e,t){let r=Array.isArray(e),i={type_:r?1:0,scope_:t?t.scope_:n,modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=i,a=z;r&&(o=[i],a=R);let{revoke:u,proxy:l}=Proxy.revocable(o,a);return i.draft_=l,i.revoke_=u,l}(e,t);return(t?t.scope_:n).drafts_.push(r),r}function W(e){return e}p(z,(e,t)=>{R[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),R.deleteProperty=function(e,t){return R.set.call(this,e,t,void 0)},R.set=function(e,t,r){return z.set.call(this,e[0],t,r,e[0])},new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(e,t,r)=>{let n;if("function"==typeof e&&"function"!=typeof t){let r=t;t=e;let n=this;return function(e=r,...i){return n.produce(e,e=>t.call(this,e,...i))}}if("function"!=typeof t&&u(6),void 0!==r&&"function"!=typeof r&&u(7),s(e)){let i=k(this),o=F(e,void 0),a=!0;try{n=t(o),a=!1}finally{a?A(i):M(i)}return E(i,r),C(n,i)}if(e&&"object"==typeof e)u(1,e);else{if(void 0===(n=t(e))&&(n=e),n===i&&(n=void 0),this.autoFreeze_&&O(n,!0),r){let t=[],i=[];_("Patches").generateReplacementPatches_(e,n,t,i),r(t,i)}return n}},this.produceWithPatches=(e,t)=>{let r,n;return"function"==typeof e?(t,...r)=>this.produceWithPatches(t,t=>e(t,...r)):[this.produce(e,t,(e,t)=>{r=e,n=t}),r,n]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),"boolean"==typeof e?.useStrictIteration&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){var t;s(e)||u(8),c(e)&&(c(t=e)||u(10,t),e=function e(t){let r;if(!s(t)||j(t))return t;let n=t[a],i=!0;if(n){if(!n.modified_)return n.base_;n.finalized_=!0,r=x(t,n.scope_.immer_.useStrictShallowCopy_),i=n.scope_.immer_.shouldUseStrictIteration()}else r=x(t,!0);return p(r,(t,n)=>{g(r,t,e(n))},i),n&&(n.finalized_=!1),r}(t));let r=k(this),n=F(e,void 0);return n[a].isManual_=!0,M(r),n}finishDraft(e,t){let r=e&&e[a];r&&r.isManual_||u(9);let{scope_:n}=r;return E(n,t),C(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));let n=_("Patches").applyPatches_;return c(e)?n(e,t):this.produce(e,e=>n(e,t))}}().produce},9688:function(e,t,r){"use strict";function n(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}r.d(t,{LG:function(){return h},MT:function(){return l},PO:function(){return u},UY:function(){return c},md:function(){return f},qC:function(){return s}});var i="function"==typeof Symbol&&Symbol.observable||"@@observable",o=()=>Math.random().toString(36).substring(7).split("").join("."),a={INIT:`@@redux/INIT${o()}`,REPLACE:`@@redux/REPLACE${o()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${o()}`};function u(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function l(e,t,r){if("function"!=typeof e)throw Error(n(2));if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw Error(n(0));if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw Error(n(1));return r(l)(e,t)}let o=e,c=t,s=new Map,f=s,h=0,d=!1;function p(){f===s&&(f=new Map,s.forEach((e,t)=>{f.set(t,e)}))}function y(){if(d)throw Error(n(3));return c}function v(e){if("function"!=typeof e)throw Error(n(4));if(d)throw Error(n(5));let t=!0;p();let r=h++;return f.set(r,e),function(){if(t){if(d)throw Error(n(6));t=!1,p(),f.delete(r),s=null}}}function g(e){if(!u(e))throw Error(n(7));if(void 0===e.type)throw Error(n(8));if("string"!=typeof e.type)throw Error(n(17));if(d)throw Error(n(9));try{d=!0,c=o(c,e)}finally{d=!1}return(s=f).forEach(e=>{e()}),e}return g({type:a.INIT}),{dispatch:g,subscribe:v,getState:y,replaceReducer:function(e){if("function"!=typeof e)throw Error(n(10));o=e,g({type:a.REPLACE})},[i]:function(){return{subscribe(e){if("object"!=typeof e||null===e)throw Error(n(11));function t(){e.next&&e.next(y())}return t(),{unsubscribe:v(t)}},[i](){return this}}}}}function c(e){let t;let r=Object.keys(e),i={};for(let t=0;t{let r=e[t];if(void 0===r(void 0,{type:a.INIT}))throw Error(n(12));if(void 0===r(void 0,{type:a.PROBE_UNKNOWN_ACTION()}))throw Error(n(13))})}(i)}catch(e){t=e}return function(e={},r){if(t)throw t;let a=!1,u={};for(let t=0;te:1===e.length?e[0]:e.reduce((e,t)=>(...r)=>e(t(...r)))}function f(...e){return t=>(r,i)=>{let o=t(r,i),a=()=>{throw Error(n(15))},u={getState:o.getState,dispatch:(e,...t)=>a(e,...t)};return a=s(...e.map(e=>e(u)))(o.dispatch),{...o,dispatch:a}}}function h(e){return u(e)&&"type"in e&&"string"==typeof e.type}},2713:function(e,t,r){"use strict";r.d(t,{P1:function(){return w}});var n=e=>Array.isArray(e)?e:[e],i=0,o=class{revision=i;_value;_lastValue;_isEqual=a;constructor(e,t=a){this._value=this._lastValue=e,this._isEqual=t}get value(){return this._value}set value(e){this.value!==e&&(this._value=e,this.revision=++i)}};function a(e,t){return e===t}function u(e){return e instanceof o||console.warn("Not a valid cell! ",e),e.value}var l=(e,t)=>!1;function c(){return function(e,t=a){return new o(null,t)}(0,l)}var s=e=>{let t=e.collectionTag;null===t&&(t=e.collectionTag=c()),u(t)};Symbol();var f=0,h=Object.getPrototypeOf({}),d=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy(this,p);tag=c();tags={};children={};collectionTag=null;id=f++},p={get:(e,t)=>(function(){let{value:r}=e,n=Reflect.get(r,t);if("symbol"==typeof t||t in h)return n;if("object"==typeof n&&null!==n){let r=e.children[t];return void 0===r&&(r=e.children[t]=Array.isArray(n)?new y(n):new d(n)),r.tag&&u(r.tag),r.proxy}{let r=e.tags[t];return void 0===r&&((r=e.tags[t]=c()).value=n),u(r),n}})(),ownKeys:e=>(s(e),Reflect.ownKeys(e.value)),getOwnPropertyDescriptor:(e,t)=>Reflect.getOwnPropertyDescriptor(e.value,t),has:(e,t)=>Reflect.has(e.value,t)},y=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy([this],v);tag=c();tags={};children={};collectionTag=null;id=f++},v={get:([e],t)=>("length"===t&&s(e),p.get(e,t)),ownKeys:([e])=>p.ownKeys(e),getOwnPropertyDescriptor:([e],t)=>p.getOwnPropertyDescriptor(e,t),has:([e],t)=>p.has(e,t)},g="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function m(){return{s:0,v:void 0,o:null,p:null}}function b(e,t={}){let r,n=m(),{resultEqualityCheck:i}=t,o=0;function a(){let t,a=n,{length:u}=arguments;for(let e=0;e{n=m(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}var w=function(e,...t){let r="function"==typeof e?{memoize:e,memoizeOptions:t}:e,i=(...e)=>{let t,i=0,o=0,a={},u=e.pop();"object"==typeof u&&(a=u,u=e.pop()),function(e,t=`expected a function, instead received ${typeof e}`){if("function"!=typeof e)throw TypeError(t)}(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);let{memoize:l,memoizeOptions:c=[],argsMemoize:s=b,argsMemoizeOptions:f=[],devModeChecks:h={}}={...r,...a},d=n(c),p=n(f),y=function(e){let t=Array.isArray(e[0])?e[0]:e;return!function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){let r=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw TypeError(`${t}[${r}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}(e),v=l(function(){return i++,u.apply(null,arguments)},...d);return Object.assign(s(function(){o++;let e=function(e,t){let r=[],{length:n}=e;for(let i=0;io,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:l,argsMemoize:s})};return Object.assign(i,{withTypes:()=>i}),i}(b),x=Object.assign((e,t=w)=>{!function(e,t=`expected an object, instead received ${typeof e}`){if("object"!=typeof e)throw TypeError(t)}(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e);return t(r.map(t=>e[t]),(...e)=>e.reduce((e,t,n)=>(e[r[n]]=t,e),{}))},{withTypes:()=>x})}}]);
\ No newline at end of file
diff --git a/dist/_next/static/chunks/app/_not-found/page-e30cecccd190b7d4.js b/dist/_next/static/chunks/app/_not-found/page-e30cecccd190b7d4.js
new file mode 100644
index 0000000..4c5b984
--- /dev/null
+++ b/dist/_next/static/chunks/app/_not-found/page-e30cecccd190b7d4.js
@@ -0,0 +1 @@
+(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[409],{7589:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_not-found/page",function(){return n(3634)}])},3634:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}}),n(7043);let i=n(7437);n(2265);let o={fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},l={display:"inline-block"},r={display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},d={fontSize:14,fontWeight:400,lineHeight:"49px",margin:0};function s(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("title",{children:"404: This page could not be found."}),(0,i.jsx)("div",{style:o,children:(0,i.jsxs)("div",{children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}),(0,i.jsx)("h1",{className:"next-error-h1",style:r,children:"404"}),(0,i.jsx)("div",{style:l,children:(0,i.jsx)("h2",{style:d,children:"This page could not be found."})})]})})]})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},function(e){e.O(0,[971,117,744],function(){return e(e.s=7589)}),_N_E=e.O()}]);
\ No newline at end of file
diff --git a/dist/_next/static/chunks/app/alerts/page-6f170ee2c75a0961.js b/dist/_next/static/chunks/app/alerts/page-6f170ee2c75a0961.js
new file mode 100644
index 0000000..e6f5922
--- /dev/null
+++ b/dist/_next/static/chunks/app/alerts/page-6f170ee2c75a0961.js
@@ -0,0 +1 @@
+(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[78],{4033:function(e,s,n){Promise.resolve().then(n.bind(n,5949))},5949:function(e,s,n){"use strict";n.r(s),n.d(s,{default:function(){return c}});var l=n(7437),t=n(553),i=n(3263),a=n(9294);let r=(0,n(8755).Z)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);function c(){let{isOpen:e,toggle:s,close:n}=(0,a.A)(),{regenerateAlerts:c,dismissAll:o,unreadCount:u}=(0,i.Z7)();return(0,l.jsxs)("div",{className:"min-h-screen bg-slate-950",children:[(0,l.jsx)(t.YE,{isOpen:e,onClose:n,unreadAlertsCount:u}),(0,l.jsxs)("div",{className:"lg:ml-64 min-h-screen flex flex-col",children:[(0,l.jsx)(t.h4,{onMenuClick:s,title:"Alertas"}),(0,l.jsx)("main",{className:"flex-1 p-4 md:p-6 lg:p-8 pb-20 lg:pb-8",children:(0,l.jsxs)("div",{className:"max-w-4xl mx-auto",children:[(0,l.jsxs)("div",{className:"flex flex-wrap gap-3 mb-6",children:[(0,l.jsxs)("button",{onClick:()=>{c()},className:"inline-flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white text-sm font-medium rounded-lg transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500/20",children:[(0,l.jsx)(r,{className:"h-4 w-4"}),"Regenerar Alertas"]}),(0,l.jsx)("button",{onClick:()=>{o()},className:"inline-flex items-center gap-2 px-4 py-2 bg-slate-800 hover:bg-slate-700 text-slate-300 hover:text-white text-sm font-medium rounded-lg transition-colors focus:outline-none focus:ring-2 focus:ring-slate-500/20",children:"Limpiar Todas"})]}),(0,l.jsx)("div",{className:"w-full",children:(0,l.jsx)(i.KG,{})})]})}),(0,l.jsx)(t.zM,{unreadAlertsCount:u})]})]})}}},function(e){e.O(0,[697,71,796,489,971,117,744],function(){return e(e.s=4033)}),_N_E=e.O()}]);
\ No newline at end of file
diff --git a/dist/_next/static/chunks/app/budget/page-1c1157916eee3b45.js b/dist/_next/static/chunks/app/budget/page-1c1157916eee3b45.js
new file mode 100644
index 0000000..a3116f6
--- /dev/null
+++ b/dist/_next/static/chunks/app/budget/page-1c1157916eee3b45.js
@@ -0,0 +1 @@
+(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[379],{2257:function(e,s,t){Promise.resolve().then(t.bind(t,7268))},7268:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return k}});var a=t(7437),l=t(553),n=t(2265),r=t(4508);let o=Array.from({length:12},(e,s)=>({value:s+1,label:(0,r.ZY)(s+1)}));function i(e){let{onSubmit:s,onCancel:t,initialData:l}=e,i=new Date,[d,c]=(0,n.useState)({totalIncome:(null==l?void 0:l.totalIncome)||0,savingsGoal:(null==l?void 0:l.savingsGoal)||0,month:(null==l?void 0:l.month)||i.getMonth()+1,year:(null==l?void 0:l.year)||i.getFullYear()}),[x,m]=(0,n.useState)({}),u=()=>{let e={};return d.totalIncome<=0&&(e.totalIncome="Los ingresos deben ser mayores a 0"),d.savingsGoal>=d.totalIncome&&(e.savingsGoal="La meta de ahorro debe ser menor que los ingresos"),(d.month<1||d.month>12)&&(e.month="El mes debe estar entre 1 y 12"),(d.year<2e3||d.year>2100)&&(e.year="El a\xf1o no es v\xe1lido"),m(e),0===Object.keys(e).length},h=(e,s)=>{c(t=>({...t,[e]:s})),x[e]&&m(s=>{let t={...s};return delete t[e],t})};return(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),u()&&s({month:d.month,year:d.year,totalIncome:d.totalIncome,savingsGoal:d.savingsGoal,fixedExpenses:(null==l?void 0:l.fixedExpenses)||0,variableExpenses:(null==l?void 0:l.variableExpenses)||0})},className:"space-y-4",children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"month",className:"block text-sm font-medium text-slate-300 mb-1",children:["Mes ",(0,a.jsx)("span",{className:"text-red-400",children:"*"})]}),(0,a.jsx)("select",{id:"month",value:d.month,onChange:e=>h("month",parseInt(e.target.value)),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border rounded-lg text-white","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500",x.month?"border-red-500":"border-slate-600"),children:o.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),x.month&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-400",children:x.month})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"year",className:"block text-sm font-medium text-slate-300 mb-1",children:["A\xf1o ",(0,a.jsx)("span",{className:"text-red-400",children:"*"})]}),(0,a.jsx)("input",{type:"number",id:"year",min:"2000",max:"2100",value:d.year,onChange:e=>h("year",parseInt(e.target.value)||i.getFullYear()),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border rounded-lg text-white","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500",x.year?"border-red-500":"border-slate-600")}),x.year&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-400",children:x.year})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"totalIncome",className:"block text-sm font-medium text-slate-300 mb-1",children:["Ingresos totales ",(0,a.jsx)("span",{className:"text-red-400",children:"*"})]}),(0,a.jsx)("input",{type:"number",id:"totalIncome",min:"0",step:"0.01",value:d.totalIncome||"",onChange:e=>h("totalIncome",parseFloat(e.target.value)||0),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border rounded-lg text-white placeholder-slate-500","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500",x.totalIncome?"border-red-500":"border-slate-600"),placeholder:"0.00"}),x.totalIncome&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-400",children:x.totalIncome})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"savingsGoal",className:"block text-sm font-medium text-slate-300 mb-1",children:["Meta de ahorro ",(0,a.jsx)("span",{className:"text-red-400",children:"*"})]}),(0,a.jsx)("input",{type:"number",id:"savingsGoal",min:"0",step:"0.01",value:d.savingsGoal||"",onChange:e=>h("savingsGoal",parseFloat(e.target.value)||0),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border rounded-lg text-white placeholder-slate-500","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500",x.savingsGoal?"border-red-500":"border-slate-600"),placeholder:"0.00"}),x.savingsGoal&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-400",children:x.savingsGoal}),d.totalIncome>0&&(0,a.jsxs)("p",{className:"mt-1 text-sm text-slate-500",children:["Disponible para gastos: ",((d.totalIncome-d.savingsGoal)/d.totalIncome*100).toFixed(0),"%"]})]}),(0,a.jsxs)("div",{className:"flex gap-3 pt-2",children:[(0,a.jsx)("button",{type:"button",onClick:t,className:(0,r.cn)("flex-1 px-4 py-2 bg-slate-700 text-slate-200 rounded-lg font-medium","hover:bg-slate-600 transition-colors"),children:"Cancelar"}),(0,a.jsx)("button",{type:"submit",className:(0,r.cn)("flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg font-medium","hover:bg-blue-500 transition-colors"),children:l?"Guardar cambios":"Crear presupuesto"})]})]})}function d(e){let{spent:s,total:t,label:l}=e,n=t>0?Math.min(s/t*100,100):0,o=n<70?{stroke:"#10b981",bg:"text-emerald-400"}:n<90?{stroke:"#f59e0b",bg:"text-amber-400"}:{stroke:"#ef4444",bg:"text-red-400"},i=148*Math.PI;return(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("svg",{width:160,height:160,className:"transform -rotate-90",children:[(0,a.jsx)("circle",{stroke:"#334155",strokeWidth:12,fill:"transparent",r:74,cx:80,cy:80}),(0,a.jsx)("circle",{stroke:o.stroke,strokeWidth:12,strokeLinecap:"round",fill:"transparent",r:74,cx:80,cy:80,style:{strokeDasharray:"".concat(i," ").concat(i),strokeDashoffset:i-n/100*i,transition:"stroke-dashoffset 0.5s ease-in-out"}})]}),(0,a.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[(0,a.jsxs)("span",{className:(0,r.cn)("text-3xl font-bold",o.bg),children:[n.toFixed(0),"%"]}),(0,a.jsx)("span",{className:"text-slate-400 text-sm mt-1",children:"usado"})]})]}),(0,a.jsxs)("div",{className:"mt-4 text-center",children:[(0,a.jsx)("p",{className:"text-slate-400 text-sm",children:l}),(0,a.jsxs)("p",{className:"text-lg font-semibold text-white mt-1",children:[(0,r.xG)(s)," ",(0,a.jsxs)("span",{className:"text-slate-500",children:["/ ",(0,r.xG)(t)]})]}),(0,a.jsxs)("p",{className:"text-sm text-slate-500 mt-1",children:[(0,r.xG)(Math.max(t-s,0))," disponible"]})]})]})}function c(e){let{current:s,max:t,label:l,color:n}=e,o=t>0?Math.min(s/t*100,100):0;return(0,a.jsxs)("div",{className:"w-full",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-slate-300",children:l}),(0,a.jsxs)("span",{className:"text-sm text-slate-400",children:[(0,r.xG)(s)," ",(0,a.jsxs)("span",{className:"text-slate-600",children:["/ ",(0,r.xG)(t)]})]})]}),(0,a.jsx)("div",{className:"h-3 bg-slate-700 rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:(0,r.cn)("h-full rounded-full transition-all duration-500 ease-out",n||(o<70?"bg-emerald-500":o<90?"bg-amber-500":"bg-red-500")),style:{width:"".concat(o,"%")}})}),(0,a.jsxs)("div",{className:"flex justify-between mt-1",children:[(0,a.jsxs)("span",{className:"text-xs text-slate-500",children:[o.toFixed(0),"% usado"]}),o>=100&&(0,a.jsx)("span",{className:"text-xs text-red-400 font-medium",children:"L\xedmite alcanzado"})]})]})}var x=t(525),m=t(3085),u=t(8755);let h=(0,u.Z)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);function b(e){let{label:s,amount:t,trend:l="neutral",color:n}=e;return(0,a.jsxs)("div",{className:"bg-slate-800 border border-slate-700/50 rounded-lg p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("p",{className:"text-slate-400 text-sm",children:s}),(()=>{switch(l){case"up":return(0,a.jsx)(x.Z,{className:"w-4 h-4 text-emerald-400"});case"down":return(0,a.jsx)(m.Z,{className:"w-4 h-4 text-red-400"});default:return(0,a.jsx)(h,{className:"w-4 h-4 text-slate-500"})}})()]}),(0,a.jsx)("p",{className:(0,r.cn)("text-2xl font-mono font-semibold mt-2",n||"text-white"),children:(0,r.xG)(t)}),(0,a.jsx)("div",{className:"mt-2",children:(()=>{switch(l){case"up":return(0,a.jsx)("span",{className:"text-emerald-400 text-xs",children:"Positivo"});case"down":return(0,a.jsx)("span",{className:"text-red-400 text-xs",children:"Negativo"});default:return(0,a.jsx)("span",{className:"text-slate-500 text-xs",children:"Neutral"})}})()})]})}var p=t(4835),j=t(1804),f=t(9397);let g=(0,u.Z)("pen-line",[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);var v=t(9322);function N(){let[e,s]=(0,n.useState)(!1),[t,l]=(0,n.useState)(!1),{monthlyBudgets:o,fixedDebts:m,variableDebts:u,cardPayments:h,currentMonth:N,currentYear:y,setMonthlyBudget:w}=(0,p.J)(),k=(0,n.useMemo)(()=>o.find(e=>e.month===N&&e.year===y),[o,N,y]),G=(0,n.useMemo)(()=>(0,r.zF)(m),[m]),I=(0,n.useMemo)(()=>(0,r.Q0)(u),[u]),M=(0,n.useMemo)(()=>(0,r.Ic)(h),[h]),C=G+I+M,Z=(null==k?void 0:k.totalIncome)||0,D=(null==k?void 0:k.savingsGoal)||0,E=Z-D,F=E-C,P=new Date(y,N,0).getDate(),z=new Date().getDate(),L=P-z,S=z>0?C/z:0,A=C+S*L,Y=()=>{s(!1),l(!1)},_=e=>{w(e),Y()};return k?(0,a.jsxs)("div",{className:"bg-slate-900 min-h-screen p-6",children:[(0,a.jsxs)("div",{className:"max-w-4xl mx-auto",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-white",children:"Presupuesto Mensual"}),(0,a.jsxs)("p",{className:"text-slate-400 text-sm mt-1",children:[(0,r.ZY)(N)," ",y]})]}),(0,a.jsxs)("button",{onClick:()=>{l(!0),s(!0)},className:(0,r.cn)("flex items-center gap-2 px-4 py-2 bg-slate-700 text-white rounded-lg font-medium","hover:bg-slate-600 transition-colors"),children:[(0,a.jsx)(g,{className:"w-4 h-4"}),"Editar"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-6",children:[(0,a.jsx)(b,{label:"Ingresos totales",amount:Z,trend:"up",color:"text-emerald-400"}),(0,a.jsx)(b,{label:"Meta de ahorro",amount:D,trend:"neutral",color:"text-blue-400"}),(0,a.jsx)(b,{label:"Gastado",amount:C,trend:C>E?"down":"neutral",color:C>E?"text-red-400":"text-amber-400"}),(0,a.jsx)(b,{label:"Disponible",amount:F,trend:F>0?"up":"down",color:F>0?"text-emerald-400":"text-red-400"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-6",children:[(0,a.jsx)("div",{className:"bg-slate-800 border border-slate-700/50 rounded-lg p-6 flex items-center justify-center",children:(0,a.jsx)(d,{spent:C,total:E,label:"Presupuesto mensual"})}),(0,a.jsxs)("div",{className:"bg-slate-800 border border-slate-700/50 rounded-lg p-6",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-white mb-4",children:"Desglose de gastos"}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(c,{current:G,max:E,label:"Deudas fijas pendientes"}),(0,a.jsx)(c,{current:I,max:E,label:"Deudas variables pendientes"}),(0,a.jsx)(c,{current:M,max:E,label:"Pagos de tarjetas"})]})]})]}),(0,a.jsx)("div",{className:"bg-slate-800 border border-slate-700/50 rounded-lg p-6",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:(0,r.cn)("p-2 rounded-lg",A>E?"bg-red-500/10":"bg-emerald-500/10"),children:A>E?(0,a.jsx)(v.Z,{className:"w-5 h-5 text-red-400"}):(0,a.jsx)(x.Z,{className:"w-5 h-5 text-emerald-400"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-white",children:"Proyecci\xf3n"}),(0,a.jsxs)("p",{className:"text-slate-400 mt-1",children:["A tu ritmo actual de gasto (",(0,r.xG)(S),"/d\xeda),",A>E?(0,a.jsxs)("span",{className:"text-red-400",children:[" ","terminar\xe1s el mes con un d\xe9ficit de ",(0,r.xG)(A-E),"."]}):(0,a.jsxs)("span",{className:"text-emerald-400",children:[" ","terminar\xe1s el mes con un super\xe1vit de ",(0,r.xG)(E-A),"."]})]}),(0,a.jsxs)("p",{className:"text-slate-500 text-sm mt-2",children:["Quedan ",L," d\xedas en el mes"]})]})]})})]}),e&&(0,a.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:Y}),(0,a.jsx)("div",{className:"relative bg-slate-900 border border-slate-700 rounded-xl shadow-2xl w-full max-w-md max-h-[90vh] overflow-y-auto",children:(0,a.jsxs)("div",{className:"p-6",children:[(0,a.jsx)("h2",{className:"text-xl font-bold text-white mb-4",children:t?"Editar presupuesto":"Nuevo presupuesto"}),(0,a.jsx)(i,{onSubmit:_,onCancel:Y,initialData:t?k:void 0})]})})]})]}):(0,a.jsx)("div",{className:"bg-slate-900 min-h-screen p-6",children:(0,a.jsxs)("div",{className:"max-w-4xl mx-auto",children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-6",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-white",children:"Presupuesto Mensual"}),(0,a.jsxs)("p",{className:"text-slate-400 text-sm mt-1",children:[(0,r.ZY)(N)," ",y]})]})}),(0,a.jsxs)("div",{className:"text-center py-16 bg-slate-800/50 border border-slate-700/50 rounded-lg",children:[(0,a.jsx)(j.Z,{className:"w-12 h-12 text-slate-600 mx-auto mb-4"}),(0,a.jsx)("h3",{className:"text-lg font-medium text-slate-300",children:"No hay presupuesto para este mes"}),(0,a.jsx)("p",{className:"text-slate-500 mt-2 mb-6",children:"Crea un presupuesto para comenzar a gestionar tus finanzas"}),(0,a.jsxs)("button",{onClick:()=>{l(!1),s(!0)},className:(0,r.cn)("inline-flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg font-medium","hover:bg-blue-500 transition-colors"),children:[(0,a.jsx)(f.Z,{className:"w-4 h-4"}),"Crear presupuesto"]})]}),e&&(0,a.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:Y}),(0,a.jsx)("div",{className:"relative bg-slate-900 border border-slate-700 rounded-xl shadow-2xl w-full max-w-md max-h-[90vh] overflow-y-auto",children:(0,a.jsxs)("div",{className:"p-6",children:[(0,a.jsx)("h2",{className:"text-xl font-bold text-white mb-4",children:"Nuevo presupuesto"}),(0,a.jsx)(i,{onSubmit:_,onCancel:Y})]})})]})]})})}var y=t(9294),w=t(3263);function k(){let{isOpen:e,close:s,toggle:t}=(0,y.A)(),{unreadCount:n}=(0,w.Z7)();return(0,a.jsxs)("div",{className:"flex min-h-screen bg-slate-950",children:[(0,a.jsx)(l.YE,{isOpen:e,onClose:s,unreadAlertsCount:n}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col min-h-screen",children:[(0,a.jsx)(l.h4,{onMenuClick:t,title:"Presupuesto"}),(0,a.jsx)("main",{className:"flex-1 p-4 md:p-6 lg:p-8 pb-20",children:(0,a.jsx)(N,{})}),(0,a.jsx)(l.zM,{unreadAlertsCount:n})]})]})}},9397:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});let a=(0,t(8755).Z)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},3085:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});let a=(0,t(8755).Z)("trending-down",[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]])},525:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});let a=(0,t(8755).Z)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]])}},function(e){e.O(0,[697,71,796,489,971,117,744],function(){return e(e.s=2257)}),_N_E=e.O()}]);
\ No newline at end of file
diff --git a/dist/_next/static/chunks/app/cards/page-a9843d3be56b680d.js b/dist/_next/static/chunks/app/cards/page-a9843d3be56b680d.js
new file mode 100644
index 0000000..e0a832e
--- /dev/null
+++ b/dist/_next/static/chunks/app/cards/page-a9843d3be56b680d.js
@@ -0,0 +1 @@
+(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[137],{9174:function(e,t,s){Promise.resolve().then(s.bind(s,3234))},3234:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return y}});var a=s(7437),l=s(553),n=s(4508),i=s(5675),r=s(8930);function o(e){let{card:t,onEdit:s,onDelete:l}=e,o=(0,n.w7)(t.currentBalance,t.creditLimit),d=(0,n.tk)(t.closingDay),c=(0,n.PW)(t.dueDay),m=(0,n.P8)(d),u=(0,n.P8)(c);return(0,a.jsxs)("div",{className:"relative overflow-hidden rounded-2xl p-6 text-white shadow-lg transition-transform hover:scale-[1.02]",style:{aspectRatio:"1.586",background:"linear-gradient(135deg, ".concat(t.color," 0%, ").concat(function(e,t){let s=e.replace("#",""),a=Math.max(0,Math.min(255,parseInt(s.substring(0,2),16)+-30)),l=Math.max(0,Math.min(255,parseInt(s.substring(2,4),16)+-30)),n=Math.max(0,Math.min(255,parseInt(s.substring(4,6),16)+t));return"#".concat(a.toString(16).padStart(2,"0")).concat(l.toString(16).padStart(2,"0")).concat(n.toString(16).padStart(2,"0"))}(t.color,-30)," 100%)")},children:[(0,a.jsx)("div",{className:"absolute -right-8 -top-8 h-32 w-32 rounded-full bg-white/10"}),(0,a.jsx)("div",{className:"absolute -bottom-12 -left-12 h-40 w-40 rounded-full bg-white/5"}),(0,a.jsxs)("div",{className:"relative flex items-start justify-between",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold tracking-wide",children:t.name}),(0,a.jsxs)("div",{className:"flex gap-1",children:[(0,a.jsx)("button",{onClick:s,className:"rounded-full p-1.5 transition-colors hover:bg-white/20","aria-label":"Editar tarjeta",children:(0,a.jsx)(i.Z,{className:"h-4 w-4"})}),(0,a.jsx)("button",{onClick:l,className:"rounded-full p-1.5 transition-colors hover:bg-white/20","aria-label":"Eliminar tarjeta",children:(0,a.jsx)(r.Z,{className:"h-4 w-4"})})]})]}),(0,a.jsx)("div",{className:"relative mt-8",children:(0,a.jsxs)("p",{className:"font-mono text-2xl tracking-widest",children:["**** **** **** ",t.lastFourDigits]})}),(0,a.jsxs)("div",{className:"relative mt-6",children:[(0,a.jsx)("p",{className:"text-sm text-white/70",children:"Balance actual"}),(0,a.jsx)("p",{className:"text-2xl font-bold",children:(0,n.xG)(t.currentBalance)})]}),(0,a.jsxs)("div",{className:"relative mt-4 flex items-center gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-full bg-black/30 px-3 py-1",children:[(0,a.jsx)("div",{className:"h-2 w-2 rounded-full ".concat(o<30?"bg-emerald-500":o<70?"bg-amber-500":"bg-rose-500")}),(0,a.jsxs)("span",{className:"text-sm font-medium ".concat(o<30?"text-emerald-400":o<70?"text-amber-400":"text-rose-400"),children:[o.toFixed(0),"% usado"]})]}),(0,a.jsxs)("span",{className:"text-sm text-white/60",children:["de ",(0,n.xG)(t.creditLimit)]})]}),(0,a.jsxs)("div",{className:"relative mt-4 flex justify-between text-xs text-white/70",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"block",children:"Cierre"}),(0,a.jsxs)("span",{className:"font-medium text-white",children:[t.closingDay," (",0===m?"hoy":m>0?"en ".concat(m," d\xedas"):"hace ".concat(Math.abs(m)," d\xedas"),")"]})]}),(0,a.jsxs)("div",{className:"text-right",children:[(0,a.jsx)("span",{className:"block",children:"Vencimiento"}),(0,a.jsxs)("span",{className:"font-medium text-white",children:[t.dueDay," (",0===u?"hoy":u>0?"en ".concat(u," d\xedas"):"hace ".concat(Math.abs(u)," d\xedas"),")"]})]})]})]})}var d=s(2265),c=s(2489),m=s(401);function u(e){var t,s,l,n,i,r,o;let{initialData:u,onSubmit:x,onCancel:h}=e,[g,b]=(0,d.useState)({name:null!==(t=null==u?void 0:u.name)&&void 0!==t?t:"",lastFourDigits:null!==(s=null==u?void 0:u.lastFourDigits)&&void 0!==s?s:"",closingDay:null!==(l=null==u?void 0:u.closingDay)&&void 0!==l?l:1,dueDay:null!==(n=null==u?void 0:u.dueDay)&&void 0!==n?n:10,currentBalance:null!==(i=null==u?void 0:u.currentBalance)&&void 0!==i?i:0,creditLimit:null!==(r=null==u?void 0:u.creditLimit)&&void 0!==r?r:0,color:null!==(o=null==u?void 0:u.color)&&void 0!==o?o:"#6366f1"}),[p,j]=(0,d.useState)({}),f=()=>{let e={};return g.name.trim()||(e.name="El nombre es requerido"),g.lastFourDigits.trim()?/^\d{4}$/.test(g.lastFourDigits)||(e.lastFourDigits="Debe ser exactamente 4 d\xedgitos num\xe9ricos"):e.lastFourDigits="Los \xfaltimos 4 d\xedgitos son requeridos",(g.closingDay<1||g.closingDay>31)&&(e.closingDay="El d\xeda debe estar entre 1 y 31"),(g.dueDay<1||g.dueDay>31)&&(e.dueDay="El d\xeda debe estar entre 1 y 31"),g.creditLimit<=0&&(e.creditLimit="El l\xedmite de cr\xe9dito debe ser mayor a 0"),g.currentBalance<0&&(e.currentBalance="El balance no puede ser negativo"),j(e),0===Object.keys(e).length},v=(e,t)=>{b(s=>({...s,[e]:t})),p[e]&&j(t=>{let s={...t};return delete s[e],s})},N=e=>{v("lastFourDigits",e.replace(/\D/g,"").slice(0,4))};return(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),f()&&x(g)},className:"space-y-4 rounded-xl bg-slate-800 p-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-white",children:u?"Editar Tarjeta":"Nueva Tarjeta"}),(0,a.jsx)("button",{type:"button",onClick:h,className:"rounded-full p-1 text-slate-400 transition-colors hover:bg-slate-700 hover:text-white",children:(0,a.jsx)(c.Z,{className:"h-5 w-5"})})]}),(0,a.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,a.jsxs)("div",{className:"sm:col-span-2",children:[(0,a.jsx)("label",{className:"mb-1 block text-sm font-medium text-slate-300",children:"Nombre de la tarjeta"}),(0,a.jsx)("input",{type:"text",value:g.name,onChange:e=>v("name",e.target.value),placeholder:"Ej: Visa Banco Galicia",className:"w-full rounded-lg border border-slate-600 bg-slate-700 px-4 py-2 text-white placeholder-slate-400 focus:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/20"}),p.name&&(0,a.jsx)("p",{className:"mt-1 text-sm text-rose-400",children:p.name})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-sm font-medium text-slate-300",children:"\xdaltimos 4 d\xedgitos"}),(0,a.jsx)("input",{type:"text",inputMode:"numeric",value:g.lastFourDigits,onChange:e=>N(e.target.value),placeholder:"1234",maxLength:4,className:"w-full rounded-lg border border-slate-600 bg-slate-700 px-4 py-2 text-white placeholder-slate-400 focus:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/20"}),p.lastFourDigits&&(0,a.jsx)("p",{className:"mt-1 text-sm text-rose-400",children:p.lastFourDigits})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-sm font-medium text-slate-300",children:"Color"}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("input",{type:"color",value:g.color,onChange:e=>v("color",e.target.value),className:"h-10 w-20 cursor-pointer rounded-lg border border-slate-600 bg-slate-700"}),(0,a.jsx)("span",{className:"text-sm text-slate-400",children:g.color})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-sm font-medium text-slate-300",children:"D\xeda de cierre"}),(0,a.jsx)("input",{type:"number",min:1,max:31,value:g.closingDay,onChange:e=>v("closingDay",parseInt(e.target.value)||1),className:"w-full rounded-lg border border-slate-600 bg-slate-700 px-4 py-2 text-white focus:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/20"}),p.closingDay&&(0,a.jsx)("p",{className:"mt-1 text-sm text-rose-400",children:p.closingDay})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-sm font-medium text-slate-300",children:"D\xeda de vencimiento"}),(0,a.jsx)("input",{type:"number",min:1,max:31,value:g.dueDay,onChange:e=>v("dueDay",parseInt(e.target.value)||1),className:"w-full rounded-lg border border-slate-600 bg-slate-700 px-4 py-2 text-white focus:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/20"}),p.dueDay&&(0,a.jsx)("p",{className:"mt-1 text-sm text-rose-400",children:p.dueDay})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-sm font-medium text-slate-300",children:"L\xedmite de cr\xe9dito"}),(0,a.jsx)("input",{type:"number",min:0,step:"0.01",value:g.creditLimit||"",onChange:e=>v("creditLimit",parseFloat(e.target.value)||0),placeholder:"0.00",className:"w-full rounded-lg border border-slate-600 bg-slate-700 px-4 py-2 text-white placeholder-slate-400 focus:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/20"}),p.creditLimit&&(0,a.jsx)("p",{className:"mt-1 text-sm text-rose-400",children:p.creditLimit})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-sm font-medium text-slate-300",children:"Balance actual"}),(0,a.jsx)("input",{type:"number",min:0,step:"0.01",value:g.currentBalance||"",onChange:e=>v("currentBalance",parseFloat(e.target.value)||0),placeholder:"0.00",className:"w-full rounded-lg border border-slate-600 bg-slate-700 px-4 py-2 text-white placeholder-slate-400 focus:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/20"}),p.currentBalance&&(0,a.jsx)("p",{className:"mt-1 text-sm text-rose-400",children:p.currentBalance})]})]}),(0,a.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,a.jsx)("button",{type:"button",onClick:h,className:"rounded-lg border border-slate-600 px-4 py-2 text-sm font-medium text-slate-300 transition-colors hover:bg-slate-700",children:"Cancelar"}),(0,a.jsxs)("button",{type:"submit",className:"flex items-center gap-2 rounded-lg bg-indigo-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-indigo-700",children:[(0,a.jsx)(m.Z,{className:"h-4 w-4"}),u?"Guardar cambios":"Crear tarjeta"]})]})]})}function x(e){var t,s;let{cardId:l,onSubmit:n,onCancel:i}=e,r=new Date().toISOString().split("T")[0],[o,u]=(0,d.useState)({description:"",amount:0,date:r,installments:void 0}),[x,h]=(0,d.useState)(!1),[g,b]=(0,d.useState)({}),p=()=>{let e={};return o.description.trim()||(e.description="La descripci\xf3n es requerida"),o.amount<=0&&(e.amount="El monto debe ser mayor a 0"),o.date||(e.date="La fecha es requerida"),x&&o.installments&&(o.installments.current<1&&(e.installmentCurrent="La cuota actual debe ser al menos 1"),o.installments.total<2&&(e.installmentTotal="El total de cuotas debe ser al menos 2"),o.installments.current>o.installments.total&&(e.installments="La cuota actual no puede ser mayor al total")),b(e),0===Object.keys(e).length},j=(e,t)=>{u(s=>({...s,[e]:t})),g[e]&&b(t=>{let s={...t};return delete s[e],s})},f=(e,t)=>{u(s=>{var a,l,n,i;return{...s,installments:{current:"current"===e?t:null!==(n=null===(a=s.installments)||void 0===a?void 0:a.current)&&void 0!==n?n:1,total:"total"===e?t:null!==(i=null===(l=s.installments)||void 0===l?void 0:l.total)&&void 0!==i?i:1}}}),b(t=>{let s={...t};return delete s["installment".concat(e.charAt(0).toUpperCase()+e.slice(1))],delete s.installments,s})};return(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),p()&&n({...o,installments:x?o.installments:void 0})},className:"space-y-4 rounded-xl bg-slate-800 p-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-white",children:"Registrar Pago"}),(0,a.jsx)("button",{type:"button",onClick:i,className:"rounded-full p-1 text-slate-400 transition-colors hover:bg-slate-700 hover:text-white",children:(0,a.jsx)(c.Z,{className:"h-5 w-5"})})]}),(0,a.jsxs)("div",{className:"grid gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-sm font-medium text-slate-300",children:"Descripci\xf3n"}),(0,a.jsx)("input",{type:"text",value:o.description,onChange:e=>j("description",e.target.value),placeholder:"Ej: Supermercado Coto",className:"w-full rounded-lg border border-slate-600 bg-slate-700 px-4 py-2 text-white placeholder-slate-400 focus:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/20"}),g.description&&(0,a.jsx)("p",{className:"mt-1 text-sm text-rose-400",children:g.description})]}),(0,a.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-sm font-medium text-slate-300",children:"Monto"}),(0,a.jsx)("input",{type:"number",min:0,step:"0.01",value:o.amount||"",onChange:e=>j("amount",parseFloat(e.target.value)||0),placeholder:"0.00",className:"w-full rounded-lg border border-slate-600 bg-slate-700 px-4 py-2 text-white placeholder-slate-400 focus:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/20"}),g.amount&&(0,a.jsx)("p",{className:"mt-1 text-sm text-rose-400",children:g.amount})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-sm font-medium text-slate-300",children:"Fecha"}),(0,a.jsx)("input",{type:"date",value:o.date,onChange:e=>j("date",e.target.value),className:"w-full rounded-lg border border-slate-600 bg-slate-700 px-4 py-2 text-white focus:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/20"}),g.date&&(0,a.jsx)("p",{className:"mt-1 text-sm text-rose-400",children:g.date})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-slate-700 bg-slate-700/50 p-3",children:[(0,a.jsx)("input",{type:"checkbox",id:"hasInstallments",checked:x,onChange:e=>{h(e.target.checked),e.target.checked?u(e=>({...e,installments:{current:1,total:1}})):u(e=>({...e,installments:void 0}))},className:"h-4 w-4 rounded border-slate-500 bg-slate-600 text-indigo-600 focus:ring-indigo-500"}),(0,a.jsx)("label",{htmlFor:"hasInstallments",className:"text-sm font-medium text-slate-300",children:"Este pago es en cuotas"})]}),x&&(0,a.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-sm font-medium text-slate-300",children:"Cuota actual"}),(0,a.jsx)("input",{type:"number",min:1,value:(null===(t=o.installments)||void 0===t?void 0:t.current)||"",onChange:e=>f("current",parseInt(e.target.value)||1),className:"w-full rounded-lg border border-slate-600 bg-slate-700 px-4 py-2 text-white focus:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/20"}),g.installmentCurrent&&(0,a.jsx)("p",{className:"mt-1 text-sm text-rose-400",children:g.installmentCurrent})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-sm font-medium text-slate-300",children:"Total de cuotas"}),(0,a.jsx)("input",{type:"number",min:2,value:(null===(s=o.installments)||void 0===s?void 0:s.total)||"",onChange:e=>f("total",parseInt(e.target.value)||2),className:"w-full rounded-lg border border-slate-600 bg-slate-700 px-4 py-2 text-white focus:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/20"}),g.installmentTotal&&(0,a.jsx)("p",{className:"mt-1 text-sm text-rose-400",children:g.installmentTotal})]})]}),g.installments&&(0,a.jsx)("p",{className:"text-sm text-rose-400",children:g.installments})]}),(0,a.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,a.jsx)("button",{type:"button",onClick:i,className:"rounded-lg border border-slate-600 px-4 py-2 text-sm font-medium text-slate-300 transition-colors hover:bg-slate-700",children:"Cancelar"}),(0,a.jsxs)("button",{type:"submit",className:"flex items-center gap-2 rounded-lg bg-indigo-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-indigo-700",children:[(0,a.jsx)(m.Z,{className:"h-4 w-4"}),"Registrar pago"]})]})]})}function h(e){let{card:t,selected:s=!1,onClick:l}=e;return(0,a.jsxs)("button",{type:"button",onClick:l,className:"flex w-full items-center gap-3 rounded-lg border p-3 text-left transition-all ".concat(s?"border-indigo-500 bg-indigo-500/20 ring-2 ring-indigo-500/30":"border-slate-600 bg-slate-800 hover:border-slate-500 hover:bg-slate-700"),children:[(0,a.jsx)("div",{className:"h-10 w-10 shrink-0 rounded-lg shadow-inner",style:{backgroundColor:t.color}}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"truncate font-medium text-white",children:t.name}),(0,a.jsxs)("p",{className:"text-sm text-slate-400",children:["**** ",t.lastFourDigits]})]}),s&&(0,a.jsx)("div",{className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-indigo-500",children:(0,a.jsx)(m.Z,{className:"h-4 w-4 text-white"})})]})}var g=s(4835),b=s(8226),p=s(9397);let j=(0,s(8755).Z)("receipt",[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 17.5v-11",key:"1jc1ny"}]]);function f(){let{creditCards:e,cardPayments:t,currentMonth:s,currentYear:l,addCreditCard:i,updateCreditCard:c,deleteCreditCard:m,addCardPayment:f,deleteCardPayment:v}=(0,g.J)(),[N,y]=(0,d.useState)(!1),[w,k]=(0,d.useState)(null),[C,D]=(0,d.useState)(""),[S,E]=(0,d.useState)(!1),M=(0,d.useMemo)(()=>t.filter(e=>{let t=new Date(e.date);return t.getMonth()+1===s&&t.getFullYear()===l}),[t,s,l]),F=e=>{k(e),y(!0)},Z=e=>{window.confirm("\xbfEst\xe1s seguro de que deseas eliminar esta tarjeta?")&&(m(e),C===e&&(D(""),E(!1)))},L=e=>{window.confirm("\xbfEst\xe1s seguro de que deseas eliminar este pago?")&&v(e)},I=t=>e.find(e=>e.id===t),B=e=>M.filter(t=>t.cardId===e).reduce((e,t)=>e+t.amount,0);return(0,a.jsxs)("div",{className:"space-y-8",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-xl bg-indigo-500/20",children:(0,a.jsx)(b.Z,{className:"h-5 w-5 text-indigo-400"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-xl font-semibold text-white",children:"Tarjetas de Cr\xe9dito"}),(0,a.jsxs)("p",{className:"text-sm text-slate-400",children:[(0,n.ZY)(s)," ",l]})]})]}),(0,a.jsxs)("button",{onClick:()=>{k(null),y(!0)},className:"flex items-center gap-2 rounded-lg bg-indigo-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-indigo-700",children:[(0,a.jsx)(p.Z,{className:"h-4 w-4"}),"Agregar tarjeta"]})]}),0===e.length?(0,a.jsxs)("div",{className:"rounded-xl border border-dashed border-slate-600 bg-slate-800/50 p-12 text-center",children:[(0,a.jsx)(b.Z,{className:"mx-auto h-12 w-12 text-slate-500"}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-medium text-slate-300",children:"No tienes tarjetas registradas"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-slate-400",children:"Agrega tu primera tarjeta para comenzar a gestionar tus pagos"}),(0,a.jsx)("button",{onClick:()=>{k(null),y(!0)},className:"mt-4 rounded-lg bg-indigo-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-indigo-700",children:"Agregar tarjeta"})]}):(0,a.jsx)("div",{className:"grid gap-6 sm:grid-cols-2 lg:grid-cols-3",children:e.map(e=>(0,a.jsx)(o,{card:e,onEdit:()=>F(e),onDelete:()=>Z(e.id)},e.id))}),N&&(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4 backdrop-blur-sm",children:(0,a.jsx)("div",{className:"w-full max-w-lg",children:(0,a.jsx)(u,{initialData:null!=w?w:void 0,onSubmit:e=>{w?(c(w.id,e),k(null)):i(e),y(!1)},onCancel:()=>{y(!1),k(null)}})})}),e.length>0&&(0,a.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[(0,a.jsxs)("div",{className:"rounded-xl bg-slate-800 p-6",children:[(0,a.jsxs)("div",{className:"mb-4 flex items-center gap-3",children:[(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-emerald-500/20",children:(0,a.jsx)(j,{className:"h-4 w-4 text-emerald-400"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold text-white",children:"Registrar Pago"})]}),(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("label",{className:"mb-2 block text-sm font-medium text-slate-300",children:"Seleccionar tarjeta"}),(0,a.jsx)("div",{className:"space-y-2 max-h-48 overflow-y-auto",children:e.map(e=>(0,a.jsx)(h,{card:e,selected:C===e.id,onClick:()=>{D(e.id),E(!0)}},e.id))})]}),S&&C&&(0,a.jsx)(x,{cardId:C,onSubmit:e=>{f({cardId:C,...e}),E(!1)},onCancel:()=>{E(!1),D("")}})]}),(0,a.jsxs)("div",{className:"rounded-xl bg-slate-800 p-6",children:[(0,a.jsxs)("div",{className:"mb-4 flex items-center gap-3",children:[(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-amber-500/20",children:(0,a.jsx)(j,{className:"h-4 w-4 text-amber-400"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-white",children:"Pagos del Mes"}),(0,a.jsxs)("p",{className:"text-sm text-slate-400",children:["Total: ",(0,n.xG)(M.reduce((e,t)=>e+t.amount,0))]})]})]}),0===M.length?(0,a.jsx)("div",{className:"rounded-lg border border-dashed border-slate-600 p-8 text-center",children:(0,a.jsx)("p",{className:"text-sm text-slate-400",children:"No hay pagos registrados este mes"})}):(0,a.jsx)("div",{className:"space-y-3 max-h-96 overflow-y-auto",children:M.sort((e,t)=>new Date(t.date).getTime()-new Date(e.date).getTime()).map(e=>{let t=I(e.cardId);return(0,a.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-slate-700 bg-slate-700/50 p-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[t&&(0,a.jsx)("div",{className:"h-8 w-8 shrink-0 rounded-md",style:{backgroundColor:t.color}}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"truncate font-medium text-white",children:e.description}),(0,a.jsxs)("p",{className:"text-xs text-slate-400",children:[null==t?void 0:t.name," • ",(0,n.iS)(e.date),e.installments&&(0,a.jsxs)("span",{className:"ml-2 text-amber-400",children:["Cuota ",e.installments.current,"/",e.installments.total]})]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:"font-semibold text-white",children:(0,n.xG)(e.amount)}),(0,a.jsx)("button",{onClick:()=>L(e.id),className:"rounded p-1 text-slate-400 transition-colors hover:bg-rose-500/20 hover:text-rose-400","aria-label":"Eliminar pago",children:(0,a.jsx)(r.Z,{className:"h-4 w-4"})})]})]},e.id)})}),M.length>0&&(0,a.jsxs)("div",{className:"mt-6 border-t border-slate-700 pt-4",children:[(0,a.jsx)("h4",{className:"mb-3 text-sm font-medium text-slate-300",children:"Resumen por tarjeta"}),(0,a.jsx)("div",{className:"space-y-2",children:e.map(e=>{let t=B(e.id);return 0===t?null:(0,a.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"h-3 w-3 rounded-full",style:{backgroundColor:e.color}}),(0,a.jsx)("span",{className:"text-slate-300",children:e.name})]}),(0,a.jsx)("span",{className:"font-medium text-white",children:(0,n.xG)(t)})]},e.id)})})]})]})]})]})}var v=s(9294),N=s(3263);function y(){let{isOpen:e,toggle:t,close:s}=(0,v.A)(),{unreadCount:n}=(0,N.Z7)();return(0,a.jsxs)("div",{className:"min-h-screen bg-slate-950",children:[(0,a.jsx)(l.YE,{isOpen:e,onClose:s,unreadAlertsCount:n}),(0,a.jsxs)("div",{className:"lg:ml-64 min-h-screen flex flex-col",children:[(0,a.jsx)(l.h4,{onMenuClick:t,title:"Tarjetas de Cr\xe9dito"}),(0,a.jsx)("main",{className:"flex-1 p-4 md:p-6 lg:p-8 pb-20",children:(0,a.jsx)(f,{})})]}),(0,a.jsx)(l.zM,{unreadAlertsCount:n})]})}},5675:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(8755).Z)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},9397:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(8755).Z)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])}},function(e){e.O(0,[697,71,796,489,971,117,744],function(){return e(e.s=9174)}),_N_E=e.O()}]);
\ No newline at end of file
diff --git a/dist/_next/static/chunks/app/debts/page-28aedff94a342b70.js b/dist/_next/static/chunks/app/debts/page-28aedff94a342b70.js
new file mode 100644
index 0000000..b97d2b3
--- /dev/null
+++ b/dist/_next/static/chunks/app/debts/page-28aedff94a342b70.js
@@ -0,0 +1 @@
+(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[273],{2799:function(e,t,a){Promise.resolve().then(a.bind(a,9220))},9220:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return k}});var s=a(7437),l=a(553),r=a(4508),n=a(401),o=a(5675),i=a(8930);let d={housing:"bg-blue-500/20 text-blue-400 border-blue-500/30",services:"bg-yellow-500/20 text-yellow-400 border-yellow-500/30",subscription:"bg-purple-500/20 text-purple-400 border-purple-500/30",other:"bg-gray-500/20 text-gray-400 border-gray-500/30"},c={shopping:"bg-pink-500/20 text-pink-400 border-pink-500/30",food:"bg-orange-500/20 text-orange-400 border-orange-500/30",entertainment:"bg-indigo-500/20 text-indigo-400 border-indigo-500/30",health:"bg-red-500/20 text-red-400 border-red-500/30",transport:"bg-cyan-500/20 text-cyan-400 border-cyan-500/30",other:"bg-gray-500/20 text-gray-400 border-gray-500/30"},u={housing:"Vivienda",services:"Servicios",subscription:"Suscripci\xf3n",shopping:"Compras",food:"Comida",entertainment:"Entretenimiento",health:"Salud",transport:"Transporte",other:"Otro"};function m(e){let{debt:t,type:a,onTogglePaid:l,onEdit:m,onDelete:x}=e,b="fixed"===a,h=b?d:c,g=h[t.category]||h.other;return(0,s.jsx)("div",{className:(0,r.cn)("group relative bg-slate-800 border border-slate-700/50 rounded-lg p-4","transition-all duration-200 hover:border-slate-600",t.isPaid&&"opacity-60"),children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("button",{onClick:l,className:(0,r.cn)("mt-1 w-5 h-5 rounded border-2 flex items-center justify-center","transition-colors duration-200",t.isPaid?"bg-emerald-500 border-emerald-500":"border-slate-500 hover:border-emerald-400"),"aria-label":t.isPaid?"Marcar como no pagada":"Marcar como pagada",children:t.isPaid&&(0,s.jsx)(n.Z,{className:"w-3 h-3 text-white"})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:(0,r.cn)("text-white font-medium truncate",t.isPaid&&"line-through text-slate-400"),children:t.name}),(0,s.jsx)("p",{className:"text-slate-400 text-sm mt-0.5",children:b?"Vence d\xeda ".concat(t.dueDay):(0,r.iS)(t.date)})]}),(0,s.jsx)("span",{className:"font-mono text-emerald-400 font-semibold whitespace-nowrap",children:(0,r.xG)(t.amount)})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between mt-3",children:[(0,s.jsx)("span",{className:(0,r.cn)("inline-flex items-center px-2 py-0.5 rounded text-xs font-medium border",g),children:u[t.category]||t.category}),b&&t.isAutoDebit&&(0,s.jsx)("span",{className:"text-xs text-slate-500",children:"D\xe9bito autom\xe1tico"})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,s.jsx)("button",{onClick:m,className:"p-1.5 text-slate-400 hover:text-blue-400 hover:bg-blue-500/10 rounded transition-colors","aria-label":"Editar",children:(0,s.jsx)(o.Z,{className:"w-4 h-4"})}),(0,s.jsx)("button",{onClick:x,className:"p-1.5 text-slate-400 hover:text-red-400 hover:bg-red-500/10 rounded transition-colors","aria-label":"Eliminar",children:(0,s.jsx)(i.Z,{className:"w-4 h-4"})})]})]})})}var x=a(2265),b=a(4835);let h=[{value:"housing",label:"Vivienda"},{value:"services",label:"Servicios"},{value:"subscription",label:"Suscripci\xf3n"},{value:"other",label:"Otro"}];function g(e){let{initialData:t,onSubmit:a,onCancel:l}=e,[n,o]=(0,x.useState)({name:(null==t?void 0:t.name)||"",amount:(null==t?void 0:t.amount)||0,dueDay:(null==t?void 0:t.dueDay)||1,category:(null==t?void 0:t.category)||"other",isAutoDebit:(null==t?void 0:t.isAutoDebit)||!1,notes:(null==t?void 0:t.notes)||""}),[i,d]=(0,x.useState)({}),c=()=>{let e={};return n.name.trim()||(e.name="El nombre es requerido"),n.amount<=0&&(e.amount="El monto debe ser mayor a 0"),(n.dueDay<1||n.dueDay>31)&&(e.dueDay="El d\xeda debe estar entre 1 y 31"),d(e),0===Object.keys(e).length},u=(e,t)=>{o(a=>({...a,[e]:t})),i[e]&&d(t=>{let a={...t};return delete a[e],a})};return(0,s.jsxs)("form",{onSubmit:e=>{e.preventDefault(),c()&&a(n)},className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"name",className:"block text-sm font-medium text-slate-300 mb-1",children:["Nombre ",(0,s.jsx)("span",{className:"text-red-400",children:"*"})]}),(0,s.jsx)("input",{type:"text",id:"name",value:n.name,onChange:e=>u("name",e.target.value),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border rounded-lg text-white placeholder-slate-500","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500",i.name?"border-red-500":"border-slate-600"),placeholder:"Ej: Alquiler, Internet, etc."}),i.name&&(0,s.jsx)("p",{className:"mt-1 text-sm text-red-400",children:i.name})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"amount",className:"block text-sm font-medium text-slate-300 mb-1",children:["Monto ",(0,s.jsx)("span",{className:"text-red-400",children:"*"})]}),(0,s.jsx)("input",{type:"number",id:"amount",min:"0",step:"0.01",value:n.amount||"",onChange:e=>u("amount",parseFloat(e.target.value)||0),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border rounded-lg text-white placeholder-slate-500","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500",i.amount?"border-red-500":"border-slate-600"),placeholder:"0.00"}),i.amount&&(0,s.jsx)("p",{className:"mt-1 text-sm text-red-400",children:i.amount})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"dueDay",className:"block text-sm font-medium text-slate-300 mb-1",children:["D\xeda de vencimiento ",(0,s.jsx)("span",{className:"text-red-400",children:"*"})]}),(0,s.jsx)("input",{type:"number",id:"dueDay",min:"1",max:"31",value:n.dueDay,onChange:e=>u("dueDay",parseInt(e.target.value)||1),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border rounded-lg text-white placeholder-slate-500","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500",i.dueDay?"border-red-500":"border-slate-600"),placeholder:"1"}),i.dueDay&&(0,s.jsx)("p",{className:"mt-1 text-sm text-red-400",children:i.dueDay})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"category",className:"block text-sm font-medium text-slate-300 mb-1",children:"Categor\xeda"}),(0,s.jsx)("select",{id:"category",value:n.category,onChange:e=>u("category",e.target.value),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border border-slate-600 rounded-lg text-white","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500"),children:h.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("input",{type:"checkbox",id:"isAutoDebit",checked:n.isAutoDebit,onChange:e=>u("isAutoDebit",e.target.checked),className:"w-4 h-4 rounded border-slate-600 bg-slate-800 text-blue-500 focus:ring-blue-500/50"}),(0,s.jsx)("label",{htmlFor:"isAutoDebit",className:"text-sm text-slate-300",children:"Tiene d\xe9bito autom\xe1tico"})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"notes",className:"block text-sm font-medium text-slate-300 mb-1",children:["Notas ",(0,s.jsx)("span",{className:"text-slate-500",children:"(opcional)"})]}),(0,s.jsx)("textarea",{id:"notes",rows:3,value:n.notes,onChange:e=>u("notes",e.target.value),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border border-slate-600 rounded-lg text-white placeholder-slate-500","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500","resize-none"),placeholder:"Notas adicionales..."})]}),(0,s.jsxs)("div",{className:"flex gap-3 pt-2",children:[(0,s.jsx)("button",{type:"button",onClick:l,className:(0,r.cn)("flex-1 px-4 py-2 bg-slate-700 text-slate-200 rounded-lg font-medium","hover:bg-slate-600 transition-colors"),children:"Cancelar"}),(0,s.jsx)("button",{type:"submit",className:(0,r.cn)("flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg font-medium","hover:bg-blue-500 transition-colors"),children:(null==t?void 0:t.id)?"Guardar cambios":"Agregar deuda"})]})]})}let p=[{value:"shopping",label:"Compras"},{value:"food",label:"Comida"},{value:"entertainment",label:"Entretenimiento"},{value:"health",label:"Salud"},{value:"transport",label:"Transporte"},{value:"other",label:"Otro"}];function f(e){let{initialData:t,onSubmit:a,onCancel:l}=e,[n,o]=(0,x.useState)({name:(null==t?void 0:t.name)||"",amount:(null==t?void 0:t.amount)||0,date:(null==t?void 0:t.date)||new Date().toISOString().split("T")[0],category:(null==t?void 0:t.category)||"other",notes:(null==t?void 0:t.notes)||""}),[i,d]=(0,x.useState)({}),c=()=>{let e={};return n.name.trim()||(e.name="El nombre es requerido"),n.amount<=0&&(e.amount="El monto debe ser mayor a 0"),n.date||(e.date="La fecha es requerida"),d(e),0===Object.keys(e).length},u=(e,t)=>{o(a=>({...a,[e]:t})),i[e]&&d(t=>{let a={...t};return delete a[e],a})};return(0,s.jsxs)("form",{onSubmit:e=>{e.preventDefault(),c()&&a(n)},className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"name",className:"block text-sm font-medium text-slate-300 mb-1",children:["Nombre ",(0,s.jsx)("span",{className:"text-red-400",children:"*"})]}),(0,s.jsx)("input",{type:"text",id:"name",value:n.name,onChange:e=>u("name",e.target.value),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border rounded-lg text-white placeholder-slate-500","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500",i.name?"border-red-500":"border-slate-600"),placeholder:"Ej: Supermercado, Cena, etc."}),i.name&&(0,s.jsx)("p",{className:"mt-1 text-sm text-red-400",children:i.name})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"amount",className:"block text-sm font-medium text-slate-300 mb-1",children:["Monto ",(0,s.jsx)("span",{className:"text-red-400",children:"*"})]}),(0,s.jsx)("input",{type:"number",id:"amount",min:"0",step:"0.01",value:n.amount||"",onChange:e=>u("amount",parseFloat(e.target.value)||0),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border rounded-lg text-white placeholder-slate-500","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500",i.amount?"border-red-500":"border-slate-600"),placeholder:"0.00"}),i.amount&&(0,s.jsx)("p",{className:"mt-1 text-sm text-red-400",children:i.amount})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"date",className:"block text-sm font-medium text-slate-300 mb-1",children:["Fecha ",(0,s.jsx)("span",{className:"text-red-400",children:"*"})]}),(0,s.jsx)("input",{type:"date",id:"date",value:n.date,onChange:e=>u("date",e.target.value),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border rounded-lg text-white","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500",i.date?"border-red-500":"border-slate-600")}),i.date&&(0,s.jsx)("p",{className:"mt-1 text-sm text-red-400",children:i.date})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"category",className:"block text-sm font-medium text-slate-300 mb-1",children:"Categor\xeda"}),(0,s.jsx)("select",{id:"category",value:n.category,onChange:e=>u("category",e.target.value),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border border-slate-600 rounded-lg text-white","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500"),children:p.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"notes",className:"block text-sm font-medium text-slate-300 mb-1",children:["Notas ",(0,s.jsx)("span",{className:"text-slate-500",children:"(opcional)"})]}),(0,s.jsx)("textarea",{id:"notes",rows:3,value:n.notes,onChange:e=>u("notes",e.target.value),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border border-slate-600 rounded-lg text-white placeholder-slate-500","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500","resize-none"),placeholder:"Notas adicionales..."})]}),(0,s.jsxs)("div",{className:"flex gap-3 pt-2",children:[(0,s.jsx)("button",{type:"button",onClick:l,className:(0,r.cn)("flex-1 px-4 py-2 bg-slate-700 text-slate-200 rounded-lg font-medium","hover:bg-slate-600 transition-colors"),children:"Cancelar"}),(0,s.jsx)("button",{type:"submit",className:(0,r.cn)("flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg font-medium","hover:bg-blue-500 transition-colors"),children:(null==t?void 0:t.id)?"Guardar cambios":"Agregar deuda"})]})]})}var v=a(9397),j=a(1804);function N(){let[e,t]=(0,x.useState)("fixed"),[a,l]=(0,x.useState)(!1),[n,o]=(0,x.useState)(null),{fixedDebts:i,variableDebts:d,addFixedDebt:c,updateFixedDebt:u,deleteFixedDebt:h,toggleFixedDebtPaid:p,addVariableDebt:N,updateVariableDebt:y,deleteVariableDebt:w,toggleVariableDebtPaid:k}=(0,b.J)(),C="fixed"===e?i:d,D="fixed"===e?(0,r.zF)(i):(0,r.Q0)(d),S=e=>{o(e),l(!0)},E=()=>{l(!1),o(null)},F=t=>{confirm("\xbfEst\xe1s seguro de que deseas eliminar esta deuda?")&&("fixed"===e?h(t.id):w(t.id))},A=t=>{"fixed"===e?p(t.id):k(t.id)},P=C.filter(e=>e.isPaid).length,Z=C.filter(e=>!e.isPaid).length;return(0,s.jsxs)("div",{className:"bg-slate-900 min-h-screen p-6",children:[(0,s.jsxs)("div",{className:"max-w-4xl mx-auto",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-2xl font-bold text-white",children:"Deudas"}),(0,s.jsx)("p",{className:"text-slate-400 text-sm mt-1",children:"Gestiona tus gastos fijos y variables"})]}),(0,s.jsxs)("button",{onClick:()=>{o(null),l(!0)},className:(0,r.cn)("flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg font-medium","hover:bg-blue-500 transition-colors"),children:[(0,s.jsx)(v.Z,{className:"w-4 h-4"}),"Agregar"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-4 mb-6",children:[(0,s.jsxs)("div",{className:"bg-slate-800 border border-slate-700/50 rounded-lg p-4",children:[(0,s.jsx)("p",{className:"text-slate-400 text-sm",children:"Total pendiente"}),(0,s.jsx)("p",{className:"text-xl font-mono font-semibold text-emerald-400 mt-1",children:(0,r.xG)(D)})]}),(0,s.jsxs)("div",{className:"bg-slate-800 border border-slate-700/50 rounded-lg p-4",children:[(0,s.jsx)("p",{className:"text-slate-400 text-sm",children:"Pagadas"}),(0,s.jsx)("p",{className:"text-xl font-semibold text-blue-400 mt-1",children:P})]}),(0,s.jsxs)("div",{className:"bg-slate-800 border border-slate-700/50 rounded-lg p-4",children:[(0,s.jsx)("p",{className:"text-slate-400 text-sm",children:"Pendientes"}),(0,s.jsx)("p",{className:"text-xl font-semibold text-orange-400 mt-1",children:Z})]})]}),(0,s.jsxs)("div",{className:"flex gap-2 mb-6",children:[(0,s.jsxs)("button",{onClick:()=>t("fixed"),className:(0,r.cn)("px-4 py-2 rounded-lg font-medium transition-colors","fixed"===e?"bg-blue-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700 hover:text-white"),children:["Fijas (",i.length,")"]}),(0,s.jsxs)("button",{onClick:()=>t("variable"),className:(0,r.cn)("px-4 py-2 rounded-lg font-medium transition-colors","variable"===e?"bg-blue-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700 hover:text-white"),children:["Variables (",d.length,")"]})]}),(0,s.jsx)("div",{className:"space-y-3",children:0===C.length?(0,s.jsxs)("div",{className:"text-center py-16 bg-slate-800/50 border border-slate-700/50 rounded-lg",children:[(0,s.jsx)(j.Z,{className:"w-12 h-12 text-slate-600 mx-auto mb-4"}),(0,s.jsxs)("h3",{className:"text-lg font-medium text-slate-300",children:["No hay deudas ","fixed"===e?"fijas":"variables"]}),(0,s.jsx)("p",{className:"text-slate-500 mt-2",children:'Haz clic en "Agregar" para crear una nueva deuda'})]}):C.map(t=>(0,s.jsx)(m,{debt:t,type:e,onTogglePaid:()=>A(t),onEdit:()=>S(t),onDelete:()=>F(t)},t.id))})]}),a&&(0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:E}),(0,s.jsx)("div",{className:"relative bg-slate-900 border border-slate-700 rounded-xl shadow-2xl w-full max-w-md max-h-[90vh] overflow-y-auto",children:(0,s.jsxs)("div",{className:"p-6",children:[(0,s.jsx)("h2",{className:"text-xl font-bold text-white mb-4",children:n?"Editar deuda":"fixed"===e?"Nueva deuda fija":"Nueva deuda variable"}),"fixed"===e?(0,s.jsx)(g,{initialData:n,onSubmit:e=>{(null==n?void 0:n.id)?u(n.id,e):c({...e,isPaid:!1}),E()},onCancel:E}):(0,s.jsx)(f,{initialData:n,onSubmit:e=>{(null==n?void 0:n.id)?y(n.id,e):N({...e,isPaid:!1}),E()},onCancel:E})]})})]})]})}var y=a(9294),w=a(3263);function k(){let{isOpen:e,close:t,open:a}=(0,y.A)(),{unreadCount:r}=(0,w.Z7)();return(0,s.jsxs)("div",{className:"min-h-screen bg-slate-950",children:[(0,s.jsx)(l.YE,{isOpen:e,onClose:t,unreadAlertsCount:r}),(0,s.jsxs)("div",{className:"lg:ml-64 min-h-screen flex flex-col",children:[(0,s.jsx)(l.h4,{onMenuClick:a,title:"Deudas"}),(0,s.jsx)("main",{className:"flex-1 p-4 md:p-6 lg:p-8 pb-20 lg:pb-8",children:(0,s.jsx)(N,{})})]}),(0,s.jsx)(l.zM,{unreadAlertsCount:r})]})}},5675:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(8755).Z)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},9397:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(8755).Z)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])}},function(e){e.O(0,[697,71,796,489,971,117,744],function(){return e(e.s=2799)}),_N_E=e.O()}]);
\ No newline at end of file
diff --git a/dist/_next/static/chunks/app/layout-639440f4d8b9b6b3.js b/dist/_next/static/chunks/app/layout-639440f4d8b9b6b3.js
new file mode 100644
index 0000000..66f7bd2
--- /dev/null
+++ b/dist/_next/static/chunks/app/layout-639440f4d8b9b6b3.js
@@ -0,0 +1 @@
+(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{1556:function(e,n,t){Promise.resolve().then(t.bind(t,9294)),Promise.resolve().then(t.t.bind(t,8925,23)),Promise.resolve().then(t.t.bind(t,7960,23))},9294:function(e,n,t){"use strict";t.d(n,{A:function(){return u},Providers:function(){return s}});var r=t(7437),o=t(2265);let i=(0,o.createContext)(void 0);function s(e){let{children:n}=e,[t,s]=(0,o.useState)(!0);return(0,r.jsx)(i.Provider,{value:{isOpen:t,toggle:()=>s(e=>!e),close:()=>s(!1),open:()=>s(!0)},children:n})}function u(){let e=(0,o.useContext)(i);if(void 0===e)throw Error("useSidebar must be used within a Providers");return e}},7960:function(){},8925:function(e){e.exports={style:{fontFamily:"'__Inter_f367f3', '__Inter_Fallback_f367f3'",fontStyle:"normal"},className:"__className_f367f3",variable:"__variable_f367f3"}}},function(e){e.O(0,[832,971,117,744],function(){return e(e.s=1556)}),_N_E=e.O()}]);
\ No newline at end of file
diff --git a/dist/_next/static/chunks/app/login/page-6be400e8521677b4.js b/dist/_next/static/chunks/app/login/page-6be400e8521677b4.js
new file mode 100644
index 0000000..1c3393f
--- /dev/null
+++ b/dist/_next/static/chunks/app/login/page-6be400e8521677b4.js
@@ -0,0 +1 @@
+(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[626],{225:function(e,t,r){Promise.resolve().then(r.bind(r,6374))},6374:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return c}});var n=r(7437),a=r(2265),s=r(9376),i=r(6337),l=r(1817),o=r(4743);function c(){let[e,t]=(0,a.useState)("initial"),[r,c]=(0,a.useState)(""),[d,u]=(0,a.useState)(!1),[h,f]=(0,a.useState)(""),m=(0,s.useRouter)(),x=async()=>{u(!0),f("");try{let e=await fetch("/api/auth/send",{method:"POST"}),r=await e.json();if(!e.ok)throw Error(r.error||"Failed to send code");t("verify")}catch(e){f(e.message)}finally{u(!1)}},g=async()=>{u(!0),f("");try{let e=await fetch("/api/auth/verify",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:r})}),t=await e.json();if(!e.ok)throw Error(t.error||"Invalid code");m.push("/"),m.refresh()}catch(e){f(e.message)}finally{u(!1)}};return(0,n.jsx)("div",{className:"flex min-h-screen items-center justify-center bg-gray-900 text-white p-4",children:(0,n.jsxs)("div",{className:"w-full max-w-md bg-gray-800 rounded-lg shadow-xl p-8 border border-gray-700",children:[(0,n.jsxs)("div",{className:"flex flex-col items-center mb-8",children:[(0,n.jsx)("div",{className:"bg-blue-600 p-3 rounded-full mb-4",children:(0,n.jsx)(i.Z,{className:"w-8 h-8 text-white"})}),(0,n.jsx)("h1",{className:"text-2xl font-bold",children:"Secure Access"}),(0,n.jsx)("p",{className:"text-gray-400 mt-2 text-center",children:"Finanzas Personales"})]}),h&&(0,n.jsx)("div",{className:"bg-red-900/50 border border-red-500 text-red-200 p-3 rounded mb-4 text-sm",children:h}),"initial"===e?(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)("p",{className:"text-gray-300 text-center text-sm",children:"Click below to receive a login code via Telegram."}),(0,n.jsxs)("button",{onClick:x,disabled:d,className:"w-full bg-blue-600 hover:bg-blue-500 text-white font-semibold py-3 px-4 rounded-lg transition flex items-center justify-center gap-2 disabled:opacity-50",children:[d?(0,n.jsx)(l.Z,{className:"animate-spin"}):(0,n.jsx)(o.Z,{size:20}),"Send Code to Telegram"]})]}):(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)("p",{className:"text-gray-300 text-center text-sm",children:"Enter the 6-digit code sent to your Telegram."}),(0,n.jsx)("input",{type:"text",value:r,onChange:e=>c(e.target.value),placeholder:"123456",className:"w-full bg-gray-700 border border-gray-600 rounded-lg px-4 py-3 text-center text-2xl tracking-widest focus:outline-none focus:ring-2 focus:ring-blue-500",maxLength:6}),(0,n.jsx)("button",{onClick:g,disabled:d||r.length<4,className:"w-full bg-green-600 hover:bg-green-500 text-white font-semibold py-3 px-4 rounded-lg transition flex items-center justify-center gap-2 disabled:opacity-50",children:d?(0,n.jsx)(l.Z,{className:"animate-spin"}):"Verify & Login"}),(0,n.jsx)("button",{onClick:()=>t("initial"),className:"w-full text-gray-400 hover:text-white text-sm",children:"Cancel"})]})]})})}},8755:function(e,t,r){"use strict";r.d(t,{Z:function(){return u}});var n=r(2265);let a=function(){for(var e=arguments.length,t=Array(e),r=0;r!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()},s=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),i=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase()),l=e=>{let t=i(e);return t.charAt(0).toUpperCase()+t.slice(1)};var o={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"};let c=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1},d=(0,n.forwardRef)((e,t)=>{let{color:r="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:l,className:d="",children:u,iconNode:h,...f}=e;return(0,n.createElement)("svg",{ref:t,...o,width:s,height:s,stroke:r,strokeWidth:l?24*Number(i)/Number(s):i,className:a("lucide",d),...!u&&!c(f)&&{"aria-hidden":"true"},...f},[...h.map(e=>{let[t,r]=e;return(0,n.createElement)(t,r)}),...Array.isArray(u)?u:[u]])}),u=(e,t)=>{let r=(0,n.forwardRef)((r,i)=>{let{className:o,...c}=r;return(0,n.createElement)(d,{ref:i,iconNode:t,className:a("lucide-".concat(s(l(e))),"lucide-".concat(e),o),...c})});return r.displayName=l(e),r}},1817:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(8755).Z)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},6337:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(8755).Z)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},4743:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(8755).Z)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},9376:function(e,t,r){"use strict";var n=r(5475);r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}})}},function(e){e.O(0,[971,117,744],function(){return e(e.s=225)}),_N_E=e.O()}]);
\ No newline at end of file
diff --git a/dist/_next/static/chunks/app/page-c63080d1806e3966.js b/dist/_next/static/chunks/app/page-c63080d1806e3966.js
new file mode 100644
index 0000000..215253b
--- /dev/null
+++ b/dist/_next/static/chunks/app/page-c63080d1806e3966.js
@@ -0,0 +1 @@
+(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{2422:function(e,t,s){Promise.resolve().then(s.bind(s,291))},291:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return M}});var a=s(7437),l=s(2265),r=s(553),n=s(525),i=s(3085),o=s(4508);function c(e){let{title:t,amount:s,subtitle:l,trend:r,icon:c,color:d="text-emerald-400"}=e;return(0,a.jsxs)("div",{className:"relative overflow-hidden rounded-xl border border-slate-700 bg-slate-800 p-6 shadow-lg",children:[(0,a.jsx)("div",{className:(0,o.cn)("absolute right-4 top-4",d),children:(0,a.jsx)(c,{className:"h-10 w-10 opacity-80"})}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("h3",{className:"text-sm font-medium text-slate-400",children:t}),(0,a.jsx)("p",{className:"mt-2 font-mono text-3xl font-bold text-emerald-400",children:(0,o.xG)(s)}),l&&(0,a.jsx)("p",{className:"mt-1 text-sm text-slate-500",children:l}),r&&(0,a.jsxs)("div",{className:"mt-3 flex items-center gap-1.5",children:[r.isPositive?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Z,{className:"h-4 w-4 text-emerald-500"}),(0,a.jsxs)("span",{className:"text-sm font-medium text-emerald-500",children:["+",r.value,"%"]})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.Z,{className:"h-4 w-4 text-rose-500"}),(0,a.jsxs)("span",{className:"text-sm font-medium text-rose-500",children:["-",r.value,"%"]})]}),(0,a.jsx)("span",{className:"text-sm text-slate-500",children:"vs mes anterior"})]})]})]})}var d=s(3056),x=s(5224),u=s(2572),m=s(407),p=s(7719);let h={housing:"#10b981",services:"#3b82f6",subscription:"#8b5cf6",other:"#64748b",shopping:"#f59e0b",food:"#ef4444",entertainment:"#ec4899",health:"#06b6d4",transport:"#84cc16"},g={housing:"Vivienda",services:"Servicios",subscription:"Suscripciones",other:"Otros",shopping:"Compras",food:"Comida",entertainment:"Entretenimiento",health:"Salud",transport:"Transporte"};function b(e){let{fixedDebts:t,variableDebts:s}=e,l=new Map;t.filter(e=>!e.isPaid).forEach(e=>{let t=l.get(e.category)||0;l.set(e.category,t+e.amount)}),s.filter(e=>!e.isPaid).forEach(e=>{let t=l.get(e.category)||0;l.set(e.category,t+e.amount)});let r=Array.from(l.entries()).map(e=>{let[t,s]=e;return{name:g[t]||t,value:s,color:h[t]||"#64748b",category:t}}).filter(e=>e.value>0).sort((e,t)=>t.value-e.value),n=r.reduce((e,t)=>e+t.value,0);return 0===r.length?(0,a.jsx)("div",{className:"flex h-64 items-center justify-center rounded-xl border border-slate-700 bg-slate-800",children:(0,a.jsx)("p",{className:"text-slate-500",children:"No hay gastos pendientes"})}):(0,a.jsxs)("div",{className:"rounded-xl border border-slate-700 bg-slate-800 p-6",children:[(0,a.jsx)("h3",{className:"mb-4 text-lg font-semibold text-white",children:"Distribuci\xf3n de Gastos"}),(0,a.jsxs)("div",{className:"flex flex-col gap-6 lg:flex-row",children:[(0,a.jsx)("div",{className:"h-64 w-full lg:w-1/2",children:(0,a.jsx)(d.h,{width:"100%",height:"100%",children:(0,a.jsxs)(x.u,{children:[(0,a.jsx)(u.by,{data:r,cx:"50%",cy:"50%",innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",children:r.map((e,t)=>(0,a.jsx)(m.b,{fill:e.color},"cell-".concat(t)))}),(0,a.jsx)(p.u,{formatter:e=>"number"==typeof e?(0,o.xG)(e):e,contentStyle:{backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"8px",color:"#fff"}})]})})}),(0,a.jsxs)("div",{className:"flex w-full flex-col justify-center gap-3 lg:w-1/2",children:[r.map(e=>{let t=n>0?e.value/n*100:0;return(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"h-4 w-4 rounded-full",style:{backgroundColor:e.color}}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-slate-300",children:e.name}),(0,a.jsxs)("span",{className:"text-sm text-slate-400",children:[t.toFixed(1),"%"]})]}),(0,a.jsx)("p",{className:"text-xs text-slate-500",children:(0,o.xG)(e.value)})]})]},e.category)}),(0,a.jsx)("div",{className:"mt-4 border-t border-slate-700 pt-4",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-slate-400",children:"Total"}),(0,a.jsx)("span",{className:"font-mono text-lg font-bold text-emerald-400",children:(0,o.xG)(n)})]})})]})]})]})}var f=s(9397),j=s(8226),v=s(1804);function N(e){let{onAddDebt:t,onAddCard:s,onAddPayment:l}=e,r=[{label:"Agregar Deuda",icon:f.Z,onClick:t,color:"bg-emerald-500 hover:bg-emerald-600"},{label:"Nueva Tarjeta",icon:j.Z,onClick:s,color:"bg-blue-500 hover:bg-blue-600"},{label:"Registrar Pago",icon:v.Z,onClick:l,color:"bg-violet-500 hover:bg-violet-600"}];return(0,a.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:r.map(e=>{let t=e.icon;return(0,a.jsxs)("button",{onClick:e.onClick,className:"\n group flex flex-col items-center gap-3 rounded-xl p-6\n transition-all duration-200 ease-out\n ".concat(e.color,"\n focus:outline-none focus:ring-2 focus:ring-white/50 focus:ring-offset-2 focus:ring-offset-slate-800\n "),children:[(0,a.jsx)("div",{className:"rounded-full bg-white/20 p-4 transition-transform group-hover:scale-110",children:(0,a.jsx)(t,{className:"h-8 w-8 text-white"})}),(0,a.jsx)("span",{className:"font-medium text-white",children:e.label})]},e.label)})})}var y=s(2568),w=s(9322),C=s(4835),k=s(3261);function S(){let{fixedDebts:e,variableDebts:t,creditCards:s,monthlyBudgets:l,alerts:r,currentMonth:n,currentYear:i}=(0,C.J)(),d=(0,o.zF)(e),x=(0,o.Q0)(t),u=s.reduce((e,t)=>e+t.currentBalance,0),m=(0,k.B0)(l,n,i),p=(0,k.FB)(e,t),h=m?m.totalIncome-p:0,g=m?m.totalIncome-p:0,f=(null==m?void 0:m.savingsGoal)||0,N=r.filter(e=>!e.isRead).slice(0,3),S={danger:"border-rose-500 bg-rose-500/10 text-rose-400",warning:"border-amber-500 bg-amber-500/10 text-amber-400",info:"border-blue-500 bg-blue-500/10 text-blue-400"};return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[(0,a.jsx)(c,{title:"Deudas Pendientes",amount:d+x,subtitle:"".concat(e.filter(e=>!e.isPaid).length+t.filter(e=>!e.isPaid).length," pagos pendientes"),icon:v.Z,color:"text-rose-400"}),(0,a.jsx)(c,{title:"Balance en Tarjetas",amount:u,subtitle:"".concat(s.length," tarjetas activas"),icon:j.Z,color:"text-blue-400"}),(0,a.jsx)(c,{title:"Presupuesto Disponible",amount:h,subtitle:m?"de ".concat(m.totalIncome.toLocaleString("es-AR",{style:"currency",currency:"ARS"})," ingresos"):"Sin presupuesto definido",icon:y.Z,color:"text-emerald-400"}),(0,a.jsx)(c,{title:"Meta de Ahorro",amount:g,subtitle:f>0?"".concat((g/f*100).toFixed(0),"% de la meta"):"Sin meta definida",icon:y.Z,color:"text-violet-400"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[(0,a.jsx)(b,{fixedDebts:e,variableDebts:t}),(0,a.jsxs)("div",{className:"rounded-xl border border-slate-700 bg-slate-800 p-6",children:[(0,a.jsx)("h3",{className:"mb-4 text-lg font-semibold text-white",children:"Alertas Destacadas"}),0===N.length?(0,a.jsx)("div",{className:"flex h-48 items-center justify-center",children:(0,a.jsx)("p",{className:"text-slate-500",children:"No hay alertas pendientes"})}):(0,a.jsx)("div",{className:"space-y-3",children:N.map(e=>(0,a.jsxs)("div",{className:(0,o.cn)("flex items-start gap-3 rounded-lg border p-4",S[e.severity]),children:[(0,a.jsx)(w.Z,{className:"mt-0.5 h-5 w-5 shrink-0"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"font-medium",children:e.title}),(0,a.jsx)("p",{className:"mt-1 text-sm opacity-90",children:e.message})]})]},e.id))})]})]})]})}var D=s(7580);function Z(e){let{limit:t=5}=e,{fixedDebts:s,variableDebts:l,cardPayments:r,creditCards:n}=(0,C.J)(),i=[...s.slice(0,t).map(e=>({id:e.id,type:"fixed_debt",title:e.name,amount:e.amount,date:new Date().toISOString(),description:"Vence el d\xeda ".concat(e.dueDay)})),...l.slice(0,t).map(e=>({id:e.id,type:"variable_debt",title:e.name,amount:e.amount,date:e.date,description:e.notes})),...r.slice(0,t).map(e=>{let t=n.find(t=>t.id===e.cardId);return{id:e.id,type:"card_payment",title:"Pago - ".concat((null==t?void 0:t.name)||"Tarjeta"),amount:e.amount,date:e.date,description:e.description}})].sort((e,t)=>new Date(t.date).getTime()-new Date(e.date).getTime()).slice(0,t),c={fixed_debt:{icon:v.Z,label:"Deuda Fija",color:"text-amber-400",bgColor:"bg-amber-400/10"},variable_debt:{icon:D.Z,label:"Gasto",color:"text-rose-400",bgColor:"bg-rose-400/10"},card_payment:{icon:j.Z,label:"Pago Tarjeta",color:"text-blue-400",bgColor:"bg-blue-400/10"}};return 0===i.length?(0,a.jsxs)("div",{className:"rounded-xl border border-slate-700 bg-slate-800 p-6",children:[(0,a.jsx)("h3",{className:"mb-4 text-lg font-semibold text-white",children:"Actividad Reciente"}),(0,a.jsx)("div",{className:"flex h-32 items-center justify-center",children:(0,a.jsx)("p",{className:"text-slate-500",children:"No hay actividad reciente"})})]}):(0,a.jsxs)("div",{className:"rounded-xl border border-slate-700 bg-slate-800 p-6",children:[(0,a.jsx)("h3",{className:"mb-4 text-lg font-semibold text-white",children:"Actividad Reciente"}),(0,a.jsx)("div",{className:"space-y-3",children:i.map(e=>{let t=c[e.type],s=t.icon;return(0,a.jsxs)("div",{className:"flex items-center gap-4 rounded-lg border border-slate-700/50 bg-slate-700/30 p-4 transition-colors hover:bg-slate-700/50",children:[(0,a.jsx)("div",{className:(0,o.cn)("flex h-10 w-10 items-center justify-center rounded-full",t.bgColor),children:(0,a.jsx)(s,{className:(0,o.cn)("h-5 w-5",t.color)})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("h4",{className:"truncate font-medium text-white",children:e.title}),(0,a.jsxs)("span",{className:(0,o.cn)("shrink-0 font-mono font-medium","card_payment"===e.type?"text-emerald-400":"text-rose-400"),children:["card_payment"===e.type?"+":"-",(0,o.xG)(e.amount)]})]}),(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2 text-sm text-slate-400",children:[(0,a.jsx)("span",{className:(0,o.cn)("text-xs",t.color),children:t.label}),(0,a.jsx)("span",{children:"•"}),(0,a.jsx)("span",{children:(0,o.iS)(e.date)}),e.description&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{children:"•"}),(0,a.jsx)("span",{className:"truncate",children:e.description})]})]})]})]},e.id)})})]})}var A=s(9294),F=s(3263),z=s(2489),E=s(2720),P=s(1047),T=s(2934),O=s(8736);function I(e){let{isOpen:t,onClose:s}=e,[r,n]=(0,l.useState)("variable"),[i,c]=(0,l.useState)(""),[d,x]=(0,l.useState)(""),[u,m]=(0,l.useState)(new Date().toISOString().split("T")[0]),[p,h]=(0,l.useState)("1"),[g,b]=(0,l.useState)("housing"),[f,j]=(0,l.useState)("shopping"),[v,N]=(0,l.useState)(!1),[y,w]=(0,l.useState)(""),k=(0,C.J)(e=>e.addFixedDebt),S=(0,C.J)(e=>e.addVariableDebt);return t?(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4 animate-in fade-in duration-200",children:(0,a.jsxs)("div",{className:"w-full max-w-lg rounded-xl bg-slate-900 border border-slate-800 shadow-2xl overflow-hidden scale-100 animate-in zoom-in-95 duration-200",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-slate-800",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold text-white",children:"Agregar Gasto / Deuda"}),(0,a.jsx)("button",{onClick:s,className:"text-slate-400 hover:text-white transition-colors",children:(0,a.jsx)(z.Z,{size:20})})]}),(0,a.jsxs)("div",{className:"flex p-1 mx-6 mt-6 bg-slate-800/50 rounded-lg",children:[(0,a.jsx)("button",{onClick:()=>n("variable"),className:(0,o.cn)("flex-1 py-2 text-sm font-medium rounded-md transition-all duration-200","variable"===r?"bg-cyan-500 text-white shadow-lg":"text-slate-400 hover:text-white"),children:"Variable (\xdanico)"}),(0,a.jsx)("button",{onClick:()=>n("fixed"),className:(0,o.cn)("flex-1 py-2 text-sm font-medium rounded-md transition-all duration-200","fixed"===r?"bg-cyan-500 text-white shadow-lg":"text-slate-400 hover:text-white"),children:"Fijo (Recurrente)"})]}),(0,a.jsxs)("form",{onSubmit:e=>{if(e.preventDefault(),!i||!d)return;let t=parseFloat(d);isNaN(t)||("fixed"===r?k({name:i,amount:t,dueDay:parseInt(p),category:g,isAutoDebit:v,isPaid:!1,notes:y||void 0}):S({name:i,amount:t,date:new Date(u).toISOString(),category:f,isPaid:!1,notes:y||void 0}),c(""),x(""),w(""),s())},className:"p-6 space-y-5",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Monto"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("span",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400 font-semibold",children:"$"}),(0,a.jsx)("input",{type:"number",step:"0.01",placeholder:"0.00",value:d,onChange:e=>x(e.target.value),className:"w-full pl-8 pr-4 py-3 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white text-lg font-mono outline-none transition-all placeholder:text-slate-600",required:!0,autoFocus:!0})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Descripci\xf3n"}),(0,a.jsx)("input",{type:"text",placeholder:"Ej: Supermercado Coto, Netflix, Alquiler",value:i,onChange:e=>c(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white outline-none transition-all placeholder:text-slate-600",required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider flex items-center gap-1",children:[(0,a.jsx)(E.Z,{size:12})," Categor\xeda"]}),(0,a.jsx)("select",{value:"fixed"===r?g:f,onChange:e=>"fixed"===r?b(e.target.value):j(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white outline-none appearance-none cursor-pointer",children:"fixed"===r?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("option",{value:"housing",children:"Vivienda"}),(0,a.jsx)("option",{value:"services",children:"Servicios"}),(0,a.jsx)("option",{value:"subscription",children:"Suscripciones"}),(0,a.jsx)("option",{value:"other",children:"Otro"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("option",{value:"food",children:"Comida / Super"}),(0,a.jsx)("option",{value:"shopping",children:"Compras"}),(0,a.jsx)("option",{value:"transport",children:"Transporte"}),(0,a.jsx)("option",{value:"health",children:"Salud"}),(0,a.jsx)("option",{value:"entertainment",children:"Entretenimiento"}),(0,a.jsx)("option",{value:"other",children:"Otro"})]})})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider flex items-center gap-1",children:[(0,a.jsx)(P.Z,{size:12})," ","fixed"===r?"D\xeda Vencimiento":"Fecha"]}),"fixed"===r?(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{type:"number",min:"1",max:"31",value:p,onChange:e=>h(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white outline-none",required:!0}),(0,a.jsx)("span",{className:"absolute right-4 top-1/2 -translate-y-1/2 text-slate-500 text-sm",children:"del mes"})]}):(0,a.jsx)("input",{type:"date",value:u,onChange:e=>m(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white outline-none [color-scheme:dark]",required:!0})]})]}),"fixed"===r&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3 bg-slate-800/30 rounded-lg cursor-pointer",onClick:()=>N(!v),children:[(0,a.jsx)("div",{className:(0,o.cn)("w-5 h-5 rounded border flex items-center justify-center transition-colors",v?"bg-cyan-500 border-cyan-500":"border-slate-600 bg-transparent"),children:v&&(0,a.jsx)(T.Z,{size:14,className:"text-white"})}),(0,a.jsx)("span",{className:"text-sm text-slate-300 select-none",children:"D\xe9bito Autom\xe1tico"})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider flex items-center gap-1",children:[(0,a.jsx)(O.Z,{size:12})," Notas (Opcional)"]}),(0,a.jsx)("textarea",{value:y,onChange:e=>w(e.target.value),placeholder:"Detalles adicionales...",className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white outline-none min-h-[80px] text-sm resize-none placeholder:text-slate-600"})]}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsxs)("button",{type:"submit",className:"w-full py-3 bg-cyan-500 hover:bg-cyan-400 text-white font-semibold rounded-lg shadow-lg shadow-cyan-500/20 transition-all active:scale-[0.98]",children:["Agregar ","fixed"===r?"Gasto Fijo":"Gasto"]})})]})]})}):null}var R=s(2805);let _=[{name:"Slate",value:"#64748b"},{name:"Blue",value:"#3b82f6"},{name:"Cyan",value:"#06b6d4"},{name:"Emerald",value:"#10b981"},{name:"Violet",value:"#8b5cf6"},{name:"Rose",value:"#f43f5e"},{name:"Amber",value:"#f59e0b"}];function q(e){let{isOpen:t,onClose:s}=e,r=(0,C.J)(e=>e.addCreditCard),[n,i]=(0,l.useState)(""),[c,d]=(0,l.useState)(""),[x,u]=(0,l.useState)(""),[m,p]=(0,l.useState)(""),[h,g]=(0,l.useState)(""),[b,f]=(0,l.useState)(_[1].value);return t?(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4 animate-in fade-in duration-200",children:(0,a.jsxs)("div",{className:"w-full max-w-lg rounded-xl bg-slate-900 border border-slate-800 shadow-2xl overflow-hidden scale-100 animate-in zoom-in-95 duration-200",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-slate-800",children:[(0,a.jsxs)("h2",{className:"text-xl font-semibold text-white flex items-center gap-2",children:[(0,a.jsx)(j.Z,{className:"text-cyan-500"})," Nueva Tarjeta"]}),(0,a.jsx)("button",{onClick:s,className:"text-slate-400 hover:text-white transition-colors",children:(0,a.jsx)(z.Z,{size:20})})]}),(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),n&&x&&m&&h&&(r({name:n,lastFourDigits:c||"****",closingDay:parseInt(m),dueDay:parseInt(h),currentBalance:0,creditLimit:parseFloat(x),color:b}),i(""),d(""),u(""),p(""),g(""),f(_[1].value),s())},className:"p-6 space-y-5",children:[(0,a.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,a.jsxs)("div",{className:"col-span-2 space-y-2",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Nombre Banco / Tarjeta"}),(0,a.jsx)("input",{type:"text",placeholder:"Ej: Visa Santander",value:n,onChange:e=>i(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white outline-none",required:!0,autoFocus:!0})]}),(0,a.jsxs)("div",{className:"col-span-1 space-y-2",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Ult. 4 Dig."}),(0,a.jsx)("input",{type:"text",maxLength:4,placeholder:"1234",value:c,onChange:e=>d(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white outline-none text-center tracking-widest"})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"L\xedmite de Cr\xe9dito"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("span",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400 font-semibold",children:"$"}),(0,a.jsx)("input",{type:"number",step:"0.01",placeholder:"0.00",value:x,onChange:e=>u(e.target.value),className:"w-full pl-8 pr-4 py-3 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white text-lg font-mono outline-none",required:!0})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"D\xeda Cierre"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{type:"number",min:"1",max:"31",placeholder:"20",value:m,onChange:e=>p(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white outline-none",required:!0}),(0,a.jsx)("span",{className:"absolute right-4 top-1/2 -translate-y-1/2 text-slate-500 text-sm",children:"del mes"})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"D\xeda Vencimiento"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{type:"number",min:"1",max:"31",placeholder:"5",value:h,onChange:e=>g(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white outline-none",required:!0}),(0,a.jsx)("span",{className:"absolute right-4 top-1/2 -translate-y-1/2 text-slate-500 text-sm",children:"del mes"})]})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider flex items-center gap-2",children:[(0,a.jsx)(R.Z,{size:12})," Color de Tarjeta"]}),(0,a.jsx)("div",{className:"flex gap-3 overflow-x-auto pb-2",children:_.map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>f(e.value),className:(0,o.cn)("w-8 h-8 rounded-full border-2 transition-all",b===e.value?"border-white scale-110 shadow-lg":"border-transparent opacity-70 hover:opacity-100 hover:scale-105"),style:{backgroundColor:e.value},title:e.name},e.value))})]}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)("button",{type:"submit",className:"w-full py-3 bg-cyan-500 hover:bg-cyan-400 text-white font-semibold rounded-lg shadow-lg shadow-cyan-500/20 transition-all active:scale-[0.98]",children:"Crear Tarjeta"})})]})]})}):null}var G=s(8124);function J(e){var t;let{isOpen:s,onClose:r}=e,n=(0,C.J)(e=>e.creditCards),i=(0,C.J)(e=>e.addCardPayment),[c,d]=(0,l.useState)((null===(t=n[0])||void 0===t?void 0:t.id)||""),[x,u]=(0,l.useState)(""),[m,p]=(0,l.useState)(""),[h,g]=(0,l.useState)(new Date().toISOString().split("T")[0]),[b,f]=(0,l.useState)(!1),[v,N]=(0,l.useState)("1"),[y,w]=(0,l.useState)("12");return s?(!c&&n.length>0&&d(n[0].id),(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4 animate-in fade-in duration-200",children:(0,a.jsxs)("div",{className:"w-full max-w-lg rounded-xl bg-slate-900 border border-slate-800 shadow-2xl overflow-hidden scale-100 animate-in zoom-in-95 duration-200",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-slate-800",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold text-white",children:"Registrar Consumo / Pago"}),(0,a.jsx)("button",{onClick:r,className:"text-slate-400 hover:text-white transition-colors",children:(0,a.jsx)(z.Z,{size:20})})]}),0===n.length?(0,a.jsxs)("div",{className:"p-8 text-center space-y-4",children:[(0,a.jsx)(j.Z,{className:"mx-auto text-slate-600 mb-2",size:48}),(0,a.jsx)("h3",{className:"text-lg font-medium text-white",children:"No tienes tarjetas registradas"}),(0,a.jsx)("p",{className:"text-slate-400",children:"Debes agregar una tarjeta antes de registrar pagos."}),(0,a.jsx)("button",{onClick:r,className:"px-4 py-2 bg-slate-800 hover:bg-slate-700 text-white rounded-lg transition",children:"Entendido"})]}):(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),x&&m&&c&&(i({cardId:c,amount:parseFloat(m),date:new Date(h).toISOString(),description:x,installments:b?{current:parseInt(v),total:parseInt(y)}:void 0}),u(""),p(""),f(!1),N("1"),w("12"),r())},className:"p-6 space-y-5",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Tarjeta"}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 max-h-[120px] overflow-y-auto pr-1",children:n.map(e=>(0,a.jsxs)("div",{onClick:()=>d(e.id),className:(0,o.cn)("cursor-pointer p-3 rounded-lg border flex items-center gap-3 transition-all",c===e.id?"border-cyan-500 bg-cyan-500/10 ring-1 ring-cyan-500":"border-slate-800 bg-slate-950 hover:border-slate-700"),children:[(0,a.jsx)("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:e.color}}),(0,a.jsxs)("div",{className:"flex flex-col truncate",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-white truncate",children:e.name}),(0,a.jsxs)("span",{className:"text-xs text-slate-500",children:["**** ",e.lastFourDigits]})]})]},e.id))})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Monto"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("span",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400 font-semibold",children:"$"}),(0,a.jsx)("input",{type:"number",step:"0.01",placeholder:"0.00",value:m,onChange:e=>p(e.target.value),className:"w-full pl-8 pr-4 py-3 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white text-lg font-mono outline-none",required:!0,autoFocus:!0})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Descripci\xf3n"}),(0,a.jsx)("input",{type:"text",placeholder:"Ej: Cena McDonalds, Compra ML",value:x,onChange:e=>u(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white outline-none",required:!0})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider flex items-center gap-1",children:[(0,a.jsx)(P.Z,{size:12})," Fecha"]}),(0,a.jsx)("input",{type:"date",value:h,onChange:e=>g(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white outline-none [color-scheme:dark]",required:!0})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3 bg-slate-800/30 rounded-lg cursor-pointer",onClick:()=>f(!b),children:[(0,a.jsx)("div",{className:(0,o.cn)("w-5 h-5 rounded border flex items-center justify-center transition-colors",b?"bg-cyan-500 border-cyan-500":"border-slate-600 bg-transparent"),children:b&&(0,a.jsx)(G.Z,{size:14,className:"text-white"})}),(0,a.jsx)("span",{className:"text-sm text-slate-300 select-none",children:"Es una compra en cuotas"})]}),b&&(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4 animate-in slide-in-from-top-2",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Cuota N\xb0"}),(0,a.jsx)("input",{type:"number",min:"1",value:v,onChange:e=>N(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg text-white"})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Total Cuotas"}),(0,a.jsx)("input",{type:"number",min:"1",value:y,onChange:e=>w(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg text-white"})]})]}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)("button",{type:"submit",className:"w-full py-3 bg-cyan-500 hover:bg-cyan-400 text-white font-semibold rounded-lg shadow-lg shadow-cyan-500/20 transition-all active:scale-[0.98]",children:"Registrar Pago"})})]})]})})):null}function M(){let e=(0,A.A)(),t=(0,C.J)(e=>e.markAlertAsRead),s=(0,C.J)(e=>e.deleteAlert),{unreadAlerts:n,unreadCount:i,regenerateAlerts:o}=(0,F.Z7)(),[c,d]=(0,l.useState)(!1),[x,u]=(0,l.useState)(!1),[m,p]=(0,l.useState)(!1);(0,l.useEffect)(()=>{o()},[o]),(0,l.useEffect)(()=>{let t=()=>{window.innerWidth>=1024?e.open():e.close()};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[e]);let h=n.slice(0,3);return(0,a.jsxs)("div",{className:"flex min-h-screen bg-slate-950",children:[(0,a.jsx)(r.YE,{isOpen:e.isOpen,onClose:e.close,unreadAlertsCount:i}),(0,a.jsxs)("div",{className:"flex flex-1 flex-col lg:ml-0",children:[(0,a.jsx)(r.h4,{onMenuClick:e.toggle,title:"Dashboard"}),(0,a.jsx)("main",{className:"flex-1 p-4 md:p-6 lg:p-8 pb-20 lg:pb-8",children:(0,a.jsxs)("div",{className:"mx-auto max-w-7xl space-y-6",children:[h.length>0&&(0,a.jsx)("div",{className:"space-y-3",children:h.map(e=>(0,a.jsx)(F.Y0,{alert:e,onDismiss:()=>s(e.id),onMarkRead:()=>t(e.id)},e.id))}),(0,a.jsx)(S,{}),(0,a.jsx)(N,{onAddDebt:()=>{d(!0)},onAddCard:()=>{u(!0)},onAddPayment:()=>{p(!0)}}),(0,a.jsx)(Z,{limit:5})]})})]}),(0,a.jsx)(r.zM,{unreadAlertsCount:i}),(0,a.jsx)(I,{isOpen:c,onClose:()=>d(!1)}),(0,a.jsx)(q,{isOpen:x,onClose:()=>u(!1)}),(0,a.jsx)(J,{isOpen:m,onClose:()=>p(!1)})]})}}},function(e){e.O(0,[697,71,796,838,489,971,117,744],function(){return e(e.s=2422)}),_N_E=e.O()}]);
\ No newline at end of file
diff --git a/dist/_next/static/chunks/app/services/page-624950d2fabe2b7b.js b/dist/_next/static/chunks/app/services/page-624950d2fabe2b7b.js
new file mode 100644
index 0000000..18a02e7
--- /dev/null
+++ b/dist/_next/static/chunks/app/services/page-624950d2fabe2b7b.js
@@ -0,0 +1 @@
+(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[469],{4427:function(e,t,a){Promise.resolve().then(a.bind(a,2406))},2406:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return v}});var s=a(7437),r=a(2265),i=a(4835),n=a(4508),l=a(8755);let d=(0,l.Z)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),c=(0,l.Z)("droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]]),o=(0,l.Z)("flame",[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]]),u=(0,l.Z)("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);var m=a(9397),x=a(525),h=a(3085);let g=(0,l.Z)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);var f=a(2489);let b=[{id:"electricity",label:"Luz",icon:d,color:"text-yellow-400"},{id:"water",label:"Agua",icon:c,color:"text-blue-400"},{id:"gas",label:"Gas",icon:o,color:"text-orange-400"},{id:"internet",label:"Internet",icon:u,color:"text-cyan-400"}];function p(e){let{isOpen:t,onClose:a}=e,l=(0,i.J)(e=>e.addServiceBill),[d,c]=(0,r.useState)("electricity"),[o,u]=(0,r.useState)(""),[m,x]=(0,r.useState)(""),[h,g]=(0,r.useState)(new Date().toISOString().slice(0,7)),[p,y]=(0,r.useState)(new Date().toISOString().split("T")[0]);if(!t)return null;let v=(e=>{switch(e){case"electricity":return"kW";case"gas":case"water":return"m\xb3";default:return""}})(d),j="internet"!==d;return(0,s.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4 animate-in fade-in duration-200",children:(0,s.jsxs)("div",{className:"w-full max-w-lg rounded-xl bg-slate-900 border border-slate-800 shadow-2xl overflow-hidden scale-100 animate-in zoom-in-95 duration-200",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-slate-800",children:[(0,s.jsx)("h2",{className:"text-xl font-semibold text-white",children:"Registrar Factura de Servicio"}),(0,s.jsx)("button",{onClick:a,className:"text-slate-400 hover:text-white transition-colors",children:(0,s.jsx)(f.Z,{size:20})})]}),(0,s.jsxs)("form",{onSubmit:e=>{e.preventDefault(),o&&(l({type:d,amount:parseFloat(o),usage:m?parseFloat(m):void 0,unit:v||void 0,date:new Date(p).toISOString(),period:h,notes:""}),u(""),x(""),a())},className:"p-6 space-y-5",children:[(0,s.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:b.map(e=>{let t=e.icon,a=d===e.id;return(0,s.jsxs)("div",{onClick:()=>c(e.id),className:(0,n.cn)("cursor-pointer p-3 rounded-xl border flex flex-col items-center gap-2 transition-all",a?"border-cyan-500 bg-cyan-500/10 ring-1 ring-cyan-500":"border-slate-800 bg-slate-950 hover:border-slate-700 hover:bg-slate-900"),children:[(0,s.jsx)(t,{className:(0,n.cn)("w-6 h-6",e.color)}),(0,s.jsx)("span",{className:(0,n.cn)("text-xs font-medium",a?"text-white":"text-slate-400"),children:e.label})]},e.id)})}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{className:(0,n.cn)("space-y-2",!j&&"col-span-2"),children:[(0,s.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Monto"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("span",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400 font-semibold",children:"$"}),(0,s.jsx)("input",{type:"number",step:"0.01",placeholder:"0.00",value:o,onChange:e=>u(e.target.value),className:"w-full pl-8 pr-4 py-3 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white text-lg font-mono outline-none",required:!0,autoFocus:!0})]})]}),j&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:["Consumo (",v,")"]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("input",{type:"number",step:"0.01",placeholder:"0",value:m,onChange:e=>x(e.target.value),className:"w-full px-4 py-3 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white text-lg font-mono outline-none"}),(0,s.jsx)("span",{className:"absolute right-4 top-1/2 -translate-y-1/2 text-slate-500 text-sm font-medium",children:v})]})]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Periodo"}),(0,s.jsx)("input",{type:"month",value:h,onChange:e=>g(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white outline-none [color-scheme:dark]",required:!0})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Fecha Pago"}),(0,s.jsx)("input",{type:"date",value:p,onChange:e=>y(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white outline-none [color-scheme:dark]",required:!0})]})]}),(0,s.jsx)("div",{className:"pt-2",children:(0,s.jsx)("button",{type:"submit",className:"w-full py-3 bg-cyan-500 hover:bg-cyan-400 text-white font-semibold rounded-lg shadow-lg shadow-cyan-500/20 transition-all active:scale-[0.98]",children:"Guardar Factura"})})]})]})})}let y=[{id:"electricity",label:"Luz (Electricidad)",icon:d,color:"text-yellow-400",bg:"bg-yellow-400/10"},{id:"water",label:"Agua",icon:c,color:"text-blue-400",bg:"bg-blue-400/10"},{id:"gas",label:"Gas",icon:o,color:"text-orange-400",bg:"bg-orange-400/10"},{id:"internet",label:"Internet",icon:u,color:"text-cyan-400",bg:"bg-cyan-400/10"}];function v(){let e=(0,i.J)(e=>e.serviceBills),[t,a]=(0,r.useState)(!1);return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-2xl font-bold text-white",children:"Servicios y Predicciones"}),(0,s.jsx)("p",{className:"text-slate-400 text-sm",children:"Gestiona tus consumos de Luz, Agua y Gas."})]}),(0,s.jsxs)("button",{onClick:()=>a(!0),className:"flex items-center gap-2 px-4 py-2 bg-cyan-500 hover:bg-cyan-400 text-white rounded-lg transition shadow-lg shadow-cyan-500/20 font-medium self-start sm:self-auto",children:[(0,s.jsx)(m.Z,{size:18})," Nuevo Pago"]})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:y.map(t=>{var a;let r=t.icon,i=function(e,t){let a=e.filter(e=>e.type===t).sort((e,t)=>new Date(t.date).getTime()-new Date(e.date).getTime());if(0===a.length)return 0;let s=a.slice(0,3),r=0,i=0,n=[.5,.3,.2];return s.forEach((e,t)=>{let a=n[t];i+=e.amount*a,r+=a}),i/r}(e,t.id),l=function(e,t){let a=e.filter(e=>e.type===t).sort((e,t)=>new Date(t.date).getTime()-new Date(e.date).getTime());if(a.length<2)return 0;let s=a[0].amount,r=a.slice(1,4);if(0===r.length)return 0;let i=r.reduce((e,t)=>e+t.amount,0)/r.length;return(s-i)/i*100}(e,t.id),d=e.filter(e=>e.type===t.id).sort((e,t)=>new Date(t.date).getTime()-new Date(e.date).getTime())[0];return(0,s.jsxs)("div",{className:"bg-slate-900 border border-slate-800 rounded-xl p-5 space-y-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("div",{className:(0,n.cn)("p-2 rounded-lg",t.bg),children:(0,s.jsx)(r,{className:(0,n.cn)("w-6 h-6",t.color)})}),0!==l&&(0,s.jsxs)("div",{className:(0,n.cn)("flex items-center gap-1 text-xs font-medium px-2 py-1 rounded-full",l>0?"bg-red-500/10 text-red-400":"bg-emerald-500/10 text-emerald-400"),children:[l>0?(0,s.jsx)(x.Z,{size:12}):(0,s.jsx)(h.Z,{size:12}),Math.abs(l).toFixed(0),"%"]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-slate-400 text-sm font-medium",children:t.label}),(0,s.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,s.jsx)("h3",{className:"text-2xl font-bold text-white mt-1",children:(0,n.xG)(i||(null!==(a=null==d?void 0:d.amount)&&void 0!==a?a:0))}),i>0&&(0,s.jsx)("span",{className:"text-xs text-slate-500 font-mono",children:"(est.)"})]}),(0,s.jsx)("p",{className:"text-xs text-slate-500 mt-1",children:d?"\xdaltimo: ".concat((0,n.xG)(d.amount)):"Sin historial"})]})]},t.id)})}),(0,s.jsxs)("div",{className:"bg-slate-900 border border-slate-800 rounded-xl overflow-hidden",children:[(0,s.jsxs)("div",{className:"p-5 border-b border-slate-800 flex items-center gap-2",children:[(0,s.jsx)(g,{size:18,className:"text-slate-400"}),(0,s.jsx)("h3",{className:"text-lg font-semibold text-white",children:"Historial de Pagos"})]}),(0,s.jsx)("div",{className:"divide-y divide-slate-800",children:0===e.length?(0,s.jsx)("div",{className:"p-8 text-center text-slate-500 text-sm",children:"No hay facturas registradas. Comienza agregando una para ver predicciones."}):e.sort((e,t)=>new Date(t.date).getTime()-new Date(e.date).getTime()).map(e=>{let t=y.find(t=>t.id===e.type),a=(null==t?void 0:t.icon)||d;return(0,s.jsxs)("div",{className:"p-4 flex items-center justify-between hover:bg-slate-800/50 transition-colors",children:[(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)("div",{className:(0,n.cn)("p-2 rounded-lg",(null==t?void 0:t.bg)||"bg-slate-800"),children:(0,s.jsx)(a,{className:(0,n.cn)("w-5 h-5",(null==t?void 0:t.color)||"text-slate-400")})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-white font-medium capitalize",children:(null==t?void 0:t.label)||e.type}),(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center gap-1 sm:gap-2",children:[(0,s.jsx)("p",{className:"text-xs text-slate-500 capitalize",children:new Date(e.date).toLocaleDateString("es-AR",{dateStyle:"long"})}),e.usage&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"hidden sm:inline text-slate-700",children:"•"}),(0,s.jsxs)("p",{className:"text-xs text-slate-400",children:["Consumo: ",(0,s.jsxs)("span",{className:"text-slate-300 font-medium",children:[e.usage," ",e.unit]})]})]})]})]})]}),(0,s.jsxs)("div",{className:"text-right",children:[(0,s.jsx)("p",{className:"text-white font-mono font-medium",children:(0,n.xG)(e.amount)}),(0,s.jsxs)("div",{className:"flex flex-col items-end",children:[(0,s.jsx)("p",{className:"text-xs text-slate-500 uppercase",children:e.period}),e.usage&&e.amount&&(0,s.jsxs)("p",{className:"text-[10px] text-cyan-500/80 font-mono",children:[(0,n.xG)(e.amount/e.usage)," / ",e.unit]})]})]})]},e.id)})})]}),(0,s.jsx)(p,{isOpen:t,onClose:()=>a(!1)})]})}},4835:function(e,t,a){"use strict";a.d(t,{J:function(){return m}});var s=a(3011),r=a(6885),i=a(4147);let n=e=>({fixedDebts:[],variableDebts:[],addFixedDebt:t=>e(e=>({fixedDebts:[...e.fixedDebts,{...t,id:(0,i.Z)()}]})),updateFixedDebt:(t,a)=>e(e=>({fixedDebts:e.fixedDebts.map(e=>e.id===t?{...e,...a}:e)})),deleteFixedDebt:t=>e(e=>({fixedDebts:e.fixedDebts.filter(e=>e.id!==t)})),toggleFixedDebtPaid:t=>e(e=>({fixedDebts:e.fixedDebts.map(e=>e.id===t?{...e,isPaid:!e.isPaid}:e)})),addVariableDebt:t=>e(e=>({variableDebts:[...e.variableDebts,{...t,id:(0,i.Z)()}]})),updateVariableDebt:(t,a)=>e(e=>({variableDebts:e.variableDebts.map(e=>e.id===t?{...e,...a}:e)})),deleteVariableDebt:t=>e(e=>({variableDebts:e.variableDebts.filter(e=>e.id!==t)})),toggleVariableDebtPaid:t=>e(e=>({variableDebts:e.variableDebts.map(e=>e.id===t?{...e,isPaid:!e.isPaid}:e)}))}),l=e=>({creditCards:[],cardPayments:[],addCreditCard:t=>e(e=>({creditCards:[...e.creditCards,{...t,id:(0,i.Z)()}]})),updateCreditCard:(t,a)=>e(e=>({creditCards:e.creditCards.map(e=>e.id===t?{...e,...a}:e)})),deleteCreditCard:t=>e(e=>({creditCards:e.creditCards.filter(e=>e.id!==t)})),addCardPayment:t=>e(e=>({cardPayments:[...e.cardPayments,{...t,id:(0,i.Z)()}]})),deleteCardPayment:t=>e(e=>({cardPayments:e.cardPayments.filter(e=>e.id!==t)}))}),d=new Date,c=e=>({monthlyBudgets:[],currentMonth:d.getMonth()+1,currentYear:d.getFullYear(),setMonthlyBudget:t=>e(e=>{let a=e.monthlyBudgets.findIndex(e=>e.month===t.month&&e.year===t.year);if(a>=0){let s=[...e.monthlyBudgets];return s[a]=t,{monthlyBudgets:s}}return{monthlyBudgets:[...e.monthlyBudgets,t]}}),updateMonthlyBudget:(t,a,s)=>e(e=>({monthlyBudgets:e.monthlyBudgets.map(e=>e.month===t&&e.year===a?{...e,...s}:e)}))}),o=e=>({alerts:[],addAlert:t=>e(e=>({alerts:[...e.alerts,{...t,id:(0,i.Z)(),date:new Date().toISOString()}]})),markAlertAsRead:t=>e(e=>({alerts:e.alerts.map(e=>e.id===t?{...e,isRead:!0}:e)})),deleteAlert:t=>e(e=>({alerts:e.alerts.filter(e=>e.id!==t)})),clearAllAlerts:()=>e(()=>({alerts:[]}))}),u=e=>({serviceBills:[],addServiceBill:t=>e(e=>({serviceBills:[...e.serviceBills,{...t,id:(0,i.Z)(),isPaid:!1}]})),deleteServiceBill:t=>e(e=>({serviceBills:e.serviceBills.filter(e=>e.id!==t)})),toggleServiceBillPaid:t=>e(e=>({serviceBills:e.serviceBills.map(e=>e.id===t?{...e,isPaid:!e.isPaid}:e)}))}),m=(0,s.U)()((0,r.tJ)(function(){for(var e=arguments.length,t=Array(e),a=0;ae&&(n+=1)>11&&(n=0,i+=1);let l=new Date(i,n+1,0).getDate();return new Date(i,n,Math.min(e,l))}function o(e){if(e<1||e>12)throw Error("El mes debe estar entre 1 y 12");return["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"][e-1]}function u(e){return e.filter(e=>!e.isPaid).reduce((e,t)=>e+t.amount,0)}function m(e){return e.filter(e=>!e.isPaid).reduce((e,t)=>e+t.amount,0)}function x(e,t){return(t?e.filter(e=>e.cardId===t):e).reduce((e,t)=>e+t.amount,0)}function h(e){return c(e)}function g(e){return c(e)}function f(e,t){return t<=0?0:Math.min(Math.max(e/t*100,0),100)}},9397:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(8755).Z)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},3085:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(8755).Z)("trending-down",[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]])},525:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(8755).Z)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]])}},function(e){e.O(0,[697,71,971,117,744],function(){return e(e.s=4427)}),_N_E=e.O()}]);
\ No newline at end of file
diff --git a/dist/_next/static/chunks/app/settings/page-88d3fd0faab66996.js b/dist/_next/static/chunks/app/settings/page-88d3fd0faab66996.js
new file mode 100644
index 0000000..e8edcae
--- /dev/null
+++ b/dist/_next/static/chunks/app/settings/page-88d3fd0faab66996.js
@@ -0,0 +1 @@
+(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[938],{5417:function(e,t,a){Promise.resolve().then(a.bind(a,9879))},9879:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return j}});var r=a(7437),s=a(2265),n=a(8755);let l=(0,n.Z)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);var i=a(2934);let o=(0,n.Z)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),c=(0,n.Z)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);var d=a(1817),u=a(4743);let p=(0,n.Z)("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]),m=(0,n.Z)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);var x=a(9397);let h=(0,n.Z)("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"}]]);var g=a(8930),y=a(6337);let f=(0,n.Z)("box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]),b=(0,n.Z)("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"}]]);var v=a(4508);function j(){let[e,t]=(0,s.useState)(!0),[a,n]=(0,s.useState)(!1),[j,k]=(0,s.useState)({telegram:{botToken:"",chatId:""},aiProviders:[]}),[w,N]=(0,s.useState)(null),[M,Z]=(0,s.useState)(!1),[z,C]=(0,s.useState)(null),[P,T]=(0,s.useState)(null),[E,D]=(0,s.useState)({});(0,s.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{k(e),t(!1)}).catch(e=>{console.error(e),t(!1),N({text:"Error cargando configuraci\xf3n",type:"error"})})},[]);let S=async()=>{n(!0),N(null);try{if(!(await fetch("/api/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)})).ok)throw Error("Error saving");N({text:"Configuraci\xf3n guardada correctamente",type:"success"})}catch(e){N({text:"Error al guardar la configuraci\xf3n",type:"error"})}finally{n(!1)}},I=async()=>{Z(!0),N(null);try{let e=await fetch("/api/test/telegram",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j.telegram)}),t=await e.json();t.success?N({text:"Mensaje de prueba enviado con \xe9xito ✅",type:"success"}):N({text:"Error: ".concat(t.error),type:"error"})}catch(e){N({text:"Error de conexi\xf3n al probar Telegram",type:"error"})}finally{Z(!1)}},A=async e=>{C(e.id),N(null);try{let t=await fetch("/api/test/ai",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await t.json();a.success?N({text:"Conexi\xf3n exitosa con ".concat(e.model||e.name," (").concat(a.latency,"ms) ✅"),type:"success"}):N({text:"Error con ".concat(e.name,": ").concat(a.error),type:"error"})}catch(e){N({text:"Error al conectar con el proveedor",type:"error"})}finally{C(null)}},F=async e=>{T(e.id),N(null);try{let t=await fetch("/api/proxy/models",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({endpoint:e.endpoint,token:e.token})}),a=await t.json();a.success&&a.models.length>0?(D(t=>({...t,[e.id]:a.models})),e.model||q(e.id,"model",a.models[0]),N({text:"Se detectaron ".concat(a.models.length," modelos ✅"),type:"success"})):N({text:"No se pudieron detectar modelos. Ingr\xe9salo manualmente.",type:"error"})}catch(e){console.error(e),N({text:"Error al consultar modelos",type:"error"})}finally{T(null)}},O=e=>{k(t=>({...t,aiProviders:t.aiProviders.filter(t=>t.id!==e)}))},q=(e,t,a)=>{k(r=>({...r,aiProviders:r.aiProviders.map(r=>r.id===e?{...r,[t]:a}:r)}))};return e?(0,r.jsx)("div",{className:"p-8 text-center text-slate-400",children:"Cargando configuraci\xf3n..."}):(0,r.jsxs)("div",{className:"max-w-4xl mx-auto space-y-8 pb-10",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-2xl font-bold text-white",children:"Configuraci\xf3n"}),(0,r.jsx)("p",{className:"text-slate-400 text-sm",children:"Gestiona la integraci\xf3n con Telegram e Inteligencia Artificial."})]}),(0,r.jsxs)("button",{onClick:S,disabled:a,className:"flex items-center gap-2 px-6 py-2 bg-emerald-500 hover:bg-emerald-400 text-white rounded-lg transition shadow-lg shadow-emerald-500/20 font-medium disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,r.jsx)(l,{size:18}),a?"Guardando...":"Guardar Cambios"]})]}),w&&(0,r.jsxs)("div",{className:(0,v.cn)("p-4 rounded-lg text-sm font-medium border flex items-center gap-2 animate-in fade-in slide-in-from-top-2","success"===w.type?"bg-emerald-500/10 border-emerald-500/20 text-emerald-400":"bg-red-500/10 border-red-500/20 text-red-400"),children:["success"===w.type?(0,r.jsx)(i.Z,{size:18}):(0,r.jsx)(o,{size:18}),w.text]}),(0,r.jsxs)("section",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between text-white border-b border-slate-800 pb-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(c,{className:"text-cyan-400"}),(0,r.jsx)("h2",{className:"text-lg font-semibold",children:"Telegram Bot"})]}),(0,r.jsxs)("button",{onClick:I,disabled:M||!j.telegram.botToken||!j.telegram.chatId,className:"text-xs flex items-center gap-1.5 bg-cyan-500/10 hover:bg-cyan-500/20 text-cyan-400 border border-cyan-500/20 px-3 py-1.5 rounded-lg transition disabled:opacity-50 disabled:cursor-not-allowed",children:[M?(0,r.jsx)(d.Z,{size:14,className:"animate-spin"}):(0,r.jsx)(u.Z,{size:14}),"Probar Env\xedo"]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 p-6 bg-slate-900 border border-slate-800 rounded-xl",children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider flex items-center gap-2",children:[(0,r.jsx)(p,{size:12})," Bot Token"]}),(0,r.jsx)("input",{type:"text",placeholder:"123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11",value:j.telegram.botToken,onChange:e=>k({...j,telegram:{...j.telegram,botToken:e.target.value}}),className:"w-full px-4 py-3 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white font-mono text-sm outline-none transition-all placeholder:text-slate-700"}),(0,r.jsx)("p",{className:"text-[10px] text-slate-500",children:"El token que te da @BotFather."})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider flex items-center gap-2",children:[(0,r.jsx)(m,{size:12})," Chat ID"]}),(0,r.jsx)("input",{type:"text",placeholder:"123456789",value:j.telegram.chatId,onChange:e=>k({...j,telegram:{...j.telegram,chatId:e.target.value}}),className:"w-full px-4 py-3 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white font-mono text-sm outline-none transition-all placeholder:text-slate-700"}),(0,r.jsx)("p",{className:"text-[10px] text-slate-500",children:"Tu ID num\xe9rico de Telegram (o el ID del grupo)."})]})]})]}),(0,r.jsxs)("section",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between text-white border-b border-slate-800 pb-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(c,{className:"text-purple-400"}),(0,r.jsx)("h2",{className:"text-lg font-semibold",children:"Proveedores de IA"})]}),(0,r.jsxs)("button",{onClick:()=>{j.aiProviders.length>=3||k(e=>({...e,aiProviders:[...e.aiProviders,{id:crypto.randomUUID(),name:"",endpoint:"",token:"",model:""}]}))},disabled:j.aiProviders.length>=3,className:"text-xs flex items-center gap-1 bg-slate-800 hover:bg-slate-700 text-slate-200 px-3 py-1.5 rounded-lg transition disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,r.jsx)(x.Z,{size:14})," Agregar Provider (",j.aiProviders.length,"/3)"]})]}),(0,r.jsxs)("div",{className:"space-y-4",children:[0===j.aiProviders.length&&(0,r.jsx)("div",{className:"p-8 text-center text-slate-500 border border-dashed border-slate-800 rounded-xl",children:"No hay proveedores de IA configurados. Agrega uno para empezar."}),j.aiProviders.map((e,t)=>(0,r.jsxs)("div",{className:"p-6 bg-slate-900 border border-slate-800 rounded-xl relative group",children:[(0,r.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,r.jsxs)("h3",{className:"text-sm font-semibold text-slate-300 bg-slate-950 inline-block px-3 py-1 rounded-md border border-slate-800",children:["Provider #",t+1]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsxs)("button",{onClick:()=>A(e),disabled:z===e.id||!e.endpoint||!e.token||!e.model,className:(0,v.cn)("text-xs flex items-center gap-1 bg-slate-800 hover:bg-slate-700 text-purple-300 border border-purple-500/20 px-2 py-1.5 rounded-lg transition disabled:opacity-50",!e.model&&"opacity-50"),title:"Verificar conexi\xf3n",children:[z===e.id?(0,r.jsx)(d.Z,{size:12,className:"animate-spin"}):(0,r.jsx)(h,{size:12}),"Test"]}),(0,r.jsx)("button",{onClick:()=>O(e.id),className:"text-slate-500 hover:text-red-400 transition-colors p-1.5 hover:bg-red-500/10 rounded-lg",title:"Eliminar",children:(0,r.jsx)(g.Z,{size:16})})]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Nombre"}),(0,r.jsx)("input",{type:"text",placeholder:"Ej: MiniMax, Z.ai",value:e.name,onChange:t=>q(e.id,"name",t.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-purple-500/50 focus:border-purple-500 text-white text-sm outline-none"})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider flex items-center gap-2",children:[(0,r.jsx)(h,{size:12})," Endpoint URL"]}),(0,r.jsx)("input",{type:"text",placeholder:"https://api.example.com/v1",value:e.endpoint,onChange:t=>q(e.id,"endpoint",t.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-purple-500/50 focus:border-purple-500 text-white font-mono text-sm outline-none"})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider flex items-center gap-2",children:[(0,r.jsx)(y.Z,{size:12})," API Key / Token"]}),(0,r.jsx)("input",{type:"password",placeholder:"sk-...",value:e.token,onChange:t=>q(e.id,"token",t.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-purple-500/50 focus:border-purple-500 text-white font-mono text-sm outline-none"})]})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex justify-between items-center",children:[(0,r.jsxs)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider flex items-center gap-2",children:[(0,r.jsx)(f,{size:12})," Model"]}),(0,r.jsxs)("button",{onClick:()=>F(e),disabled:P===e.id||!e.endpoint||!e.token,className:"text-[10px] flex items-center gap-1 text-cyan-400 hover:text-cyan-300 disabled:opacity-50",children:[P===e.id?(0,r.jsx)(d.Z,{size:10,className:"animate-spin"}):(0,r.jsx)(b,{size:10}),"Auto Detectar"]})]}),E[e.id]?(0,r.jsxs)("select",{value:e.model||"",onChange:t=>q(e.id,"model",t.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-purple-500/50 focus:border-purple-500 text-white text-sm outline-none",children:[(0,r.jsx)("option",{value:"",disabled:!0,children:"Selecciona un modelo"}),E[e.id].map(e=>(0,r.jsx)("option",{value:e,children:e},e))]}):(0,r.jsx)("input",{type:"text",placeholder:"Ej: gpt-3.5-turbo, glm-4",value:e.model||"",onChange:t=>q(e.id,"model",t.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-purple-500/50 focus:border-purple-500 text-white font-mono text-sm outline-none"})]})]})]},e.id))]})]})]})}},4508:function(e,t,a){"use strict";a.d(t,{Ic:function(){return m},JG:function(){return c},P8:function(){return o},PW:function(){return h},Q0:function(){return p},ZY:function(){return d},cn:function(){return n},iS:function(){return i},tk:function(){return x},w7:function(){return g},xG:function(){return l},zF:function(){return u}});var r=a(1994),s=a(3335);function n(){for(var e=arguments.length,t=Array(e),a=0;ae&&(l+=1)>11&&(l=0,n+=1);let i=new Date(n,l+1,0).getDate();return new Date(n,l,Math.min(e,i))}function d(e){if(e<1||e>12)throw Error("El mes debe estar entre 1 y 12");return["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"][e-1]}function u(e){return e.filter(e=>!e.isPaid).reduce((e,t)=>e+t.amount,0)}function p(e){return e.filter(e=>!e.isPaid).reduce((e,t)=>e+t.amount,0)}function m(e,t){return(t?e.filter(e=>e.cardId===t):e).reduce((e,t)=>e+t.amount,0)}function x(e){return c(e)}function h(e){return c(e)}function g(e,t){return t<=0?0:Math.min(Math.max(e/t*100,0),100)}},2934:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});let r=(0,a(8755).Z)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},1817:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});let r=(0,a(8755).Z)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},6337:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});let r=(0,a(8755).Z)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},9397:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});let r=(0,a(8755).Z)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},4743:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});let r=(0,a(8755).Z)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},8930:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});let r=(0,a(8755).Z)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["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"}]])}},function(e){e.O(0,[697,971,117,744],function(){return e(e.s=5417)}),_N_E=e.O()}]);
\ No newline at end of file
diff --git a/dist/_next/static/chunks/fd9d1056-307a36020502e7d7.js b/dist/_next/static/chunks/fd9d1056-307a36020502e7d7.js
new file mode 100644
index 0000000..8d43e3f
--- /dev/null
+++ b/dist/_next/static/chunks/fd9d1056-307a36020502e7d7.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[971],{4417:function(e,t,n){var r,l=n(2265),a=n(1767),o={usingClientEntryPoint:!1,Events:null,Dispatcher:{current:null}};function i(e){var t="https://react.dev/errors/"+e;if(1p||(e.current=d[p],d[p]=null,p--)}function g(e,t){d[++p]=e.current,e.current=t}var y=Symbol.for("react.element"),v=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),C=Symbol.for("react.consumer"),E=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),L=Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var T=Symbol.for("react.offscreen"),F=Symbol.for("react.legacy_hidden"),M=Symbol.for("react.cache");Symbol.for("react.tracing_marker");var O=Symbol.iterator;function R(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=O&&e[O]||e["@@iterator"])?e:null}var D=m(null),A=m(null),I=m(null),U=m(null),B={$$typeof:E,_currentValue:null,_currentValue2:null,_threadCount:0,Provider:null,Consumer:null};function V(e,t){switch(g(I,t),g(A,e),g(D,null),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?s2(t):0;break;default:if(t=(e=8===e?t.parentNode:t).tagName,e=e.namespaceURI)t=s3(e=s2(e),t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}h(D),g(D,t)}function Q(){h(D),h(A),h(I)}function $(e){null!==e.memoizedState&&g(U,e);var t=D.current,n=s3(t,e.type);t!==n&&(g(A,e),g(D,n))}function j(e){A.current===e&&(h(D),h(A)),U.current===e&&(h(U),B._currentValue=null)}var W=a.unstable_scheduleCallback,H=a.unstable_cancelCallback,q=a.unstable_shouldYield,K=a.unstable_requestPaint,Y=a.unstable_now,X=a.unstable_getCurrentPriorityLevel,G=a.unstable_ImmediatePriority,Z=a.unstable_UserBlockingPriority,J=a.unstable_NormalPriority,ee=a.unstable_LowPriority,et=a.unstable_IdlePriority,en=a.log,er=a.unstable_setDisableYieldValue,el=null,ea=null;function eo(e){if("function"==typeof en&&er(e),ea&&"function"==typeof ea.setStrictMode)try{ea.setStrictMode(el,e)}catch(e){}}var ei=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(eu(e)/es|0)|0},eu=Math.log,es=Math.LN2,ec=128,ef=4194304;function ed(e){var t=42&e;if(0!==t)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: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 4194176&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ep(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,l=e.suspendedLanes;e=e.pingedLanes;var a=134217727&n;return 0!==a?0!=(n=a&~l)?r=ed(n):0!=(e&=a)&&(r=ed(e)):0!=(n&=~l)?r=ed(n):0!==e&&(r=ed(e)),0===r?0:0!==t&&t!==r&&0==(t&l)&&((l=r&-r)>=(e=t&-t)||32===l&&0!=(4194176&e))?t:r}function em(e,t){return e.errorRecoveryDisabledLanes&t?0:0!=(e=-536870913&e.pendingLanes)?e:536870912&e?536870912:0}function eh(){var e=ec;return 0==(4194176&(ec<<=1))&&(ec=128),e}function eg(){var e=ef;return 0==(62914560&(ef<<=1))&&(ef=4194304),e}function ey(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ev(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-ei(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|4194218&n}function eb(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ei(n),l=1<l||u[r]!==s[l]){var c="\n"+u[r].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=r&&0<=l);break}}}finally{eG=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?eX(n):""}function eJ(e){try{var t="";do t+=function(e){switch(e.tag){case 26:case 27:case 5:return eX(e.type);case 16:return eX("Lazy");case 13:return eX("Suspense");case 19:return eX("SuspenseList");case 0:case 2:case 15:return e=eZ(e.type,!1);case 11:return e=eZ(e.type.render,!1);case 1:return e=eZ(e.type,!0);default:return""}}(e),e=e.return;while(e);return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}var e0=Symbol.for("react.client.reference");function e1(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function e2(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function e3(e){e._valueTracker||(e._valueTracker=function(e){var t=e2(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var l=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function e4(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=e2(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function e6(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var e8=/[\n"\\]/g;function e5(e){return e.replace(e8,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function e7(e,t,n,r,l,a,o,i){e.name="",null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o?e.type=o:e.removeAttribute("type"),null!=t?"number"===o?(0===t&&""===e.value||e.value!=t)&&(e.value=""+e1(t)):e.value!==""+e1(t)&&(e.value=""+e1(t)):"submit"!==o&&"reset"!==o||e.removeAttribute("value"),null!=t?te(e,o,e1(t)):null!=n?te(e,o,e1(n)):null!=r&&e.removeAttribute("value"),null==l&&null!=a&&(e.defaultChecked=!!a),null!=l&&(e.checked=l&&"function"!=typeof l&&"symbol"!=typeof l),null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i?e.name=""+e1(i):e.removeAttribute("name")}function e9(e,t,n,r,l,a,o,i){if(null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(e.type=a),null!=t||null!=n){if(!("submit"!==a&&"reset"!==a||null!=t))return;n=null!=n?""+e1(n):"",t=null!=t?""+e1(t):n,i||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:l)&&"symbol"!=typeof r&&!!r,e.checked=i?e.checked:!!r,e.defaultChecked=!!r,null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o&&(e.name=o)}function te(e,t,n){"number"===t&&e6(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}var tt=Array.isArray;function tn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=iX.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}var to=ta;"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(to=function(e,t){return MSApp.execUnsafeLocalFunction(function(){return ta(e,t)})});var ti=to;function tu(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType){n.nodeValue=t;return}}e.textContent=t}var ts=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function tc(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"==typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!=typeof n||0===n||ts.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function tf(e,t,n){if(null!=t&&"object"!=typeof t)throw Error(i(62));if(e=e.style,null!=n){for(var r in n)!n.hasOwnProperty(r)||null!=t&&t.hasOwnProperty(r)||(0===r.indexOf("--")?e.setProperty(r,""):"float"===r?e.cssFloat="":e[r]="");for(var l in t)r=t[l],t.hasOwnProperty(l)&&n[l]!==r&&tc(e,l,r)}else for(var a in t)t.hasOwnProperty(a)&&tc(e,a,t[a])}function td(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var tp=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),tm=null;function th(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var tg=null,ty=null;function tv(e){var t=eO(e);if(t&&(e=t.stateNode)){var n=eD(e);switch(e=t.stateNode,t.type){case"input":if(e7(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+e5(""+t)+'"][type="radio"]'),t=0;t>=o,l-=o,tj=1<<32-ei(t)+l|n<h?(g=f,f=null):g=f.sibling;var y=p(l,f,i[h],u);if(null===y){null===f&&(f=g);break}e&&f&&null===y.alternate&&t(l,f),o=a(y,o,h),null===c?s=y:c.sibling=y,c=y,f=g}if(h===i.length)return n(l,f),tZ&&tH(l,h),s;if(null===f){for(;hg?(y=h,h=null):y=h.sibling;var b=p(l,h,v.value,s);if(null===b){null===h&&(h=y);break}e&&h&&null===b.alternate&&t(l,h),o=a(b,o,g),null===f?c=b:f.sibling=b,f=b,h=y}if(v.done)return n(l,h),tZ&&tH(l,g),c;if(null===h){for(;!v.done;g++,v=u.next())null!==(v=d(l,v.value,s))&&(o=a(v,o,g),null===f?c=v:f.sibling=v,f=v);return tZ&&tH(l,g),c}for(h=r(l,h);!v.done;g++,v=u.next())null!==(v=m(h,l,g,v.value,s))&&(e&&null!==v.alternate&&h.delete(null===v.key?g:v.key),o=a(v,o,g),null===f?c=v:f.sibling=v,f=v);return e&&h.forEach(function(e){return t(l,e)}),tZ&&tH(l,g),c}(s,c,f,h);if("function"==typeof f.then)return u(s,c,nJ(f),h);if(f.$$typeof===E)return u(s,c,ai(s,f,h),h);n1(s,f)}return"string"==typeof f&&""!==f||"number"==typeof f?(f=""+f,null!==c&&6===c.tag?(n(s,c.sibling),(c=l(c,f)).return=s):(n(s,c),(c=i_(f,s.mode,h)).return=s),o(s=c)):n(s,c)}(u,s,c,f),nG=null,u}}var n4=n3(!0),n6=n3(!1),n8=m(null),n5=m(0);function n7(e,t){g(n5,e=oz),g(n8,t),oz=e|t.baseLanes}function n9(){g(n5,oz),g(n8,n8.current)}function re(){oz=n5.current,h(n8),h(n5)}var rt=m(null),rn=null;function rr(e){var t=e.alternate;g(ri,1&ri.current),g(rt,e),null===rn&&(null===t||null!==n8.current?rn=e:null!==t.memoizedState&&(rn=e))}function rl(e){if(22===e.tag){if(g(ri,ri.current),g(rt,e),null===rn){var t=e.alternate;null!==t&&null!==t.memoizedState&&(rn=e)}}else ra(e)}function ra(){g(ri,ri.current),g(rt,rt.current)}function ro(e){h(rt),rn===e&&(rn=null),h(ri)}var ri=m(0);function ru(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var rs=s.ReactCurrentDispatcher,rc=s.ReactCurrentBatchConfig,rf=0,rd=null,rp=null,rm=null,rh=!1,rg=!1,ry=!1,rv=0,rb=0,rk=null,rw=0;function rS(){throw Error(i(321))}function rC(e,t){if(null===t)return!1;for(var n=0;na?a:8;var o=rc.transition,i={_callbacks:new Set};rc.transition=i,lf(e,!1,t,n);try{var u=l();if(null!==u&&"object"==typeof u&&"function"==typeof u.then){av(i,u);var s,c,f=(s=[],c={status:"pending",value:null,reason:null,then:function(e){s.push(e)}},u.then(function(){c.status="fulfilled",c.value=r;for(var e=0;e title"))),sG(l,n,r),l[eE]=e,eI(l),n=l;break e;case"link":var a=cE("link","href",t).get(n+(r.href||""));if(a){for(var o=0;o",e=e.removeChild(e.firstChild);break;case"select":e="string"==typeof r.is?l.createElement("select",{is:r.is}):l.createElement("select"),r.multiple?e.multiple=!0:r.size&&(e.size=r.size);break;default:e="string"==typeof r.is?l.createElement(n,{is:r.is}):l.createElement(n)}}e[eE]=t,e[ex]=r;e:for(l=t.child;null!==l;){if(5===l.tag||6===l.tag)e.appendChild(l.stateNode);else if(4!==l.tag&&27!==l.tag&&null!==l.child){l.child.return=l,l=l.child;continue}if(l===t)break;for(;null===l.sibling;){if(null===l.return||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}switch(t.stateNode=e,sG(e,n,r),n){case"button":case"input":case"select":case"textarea":e=!!r.autoFocus;break;case"img":e=!0;break;default:e=!1}e&&aC(t)}}return aP(t),t.flags&=-16777217,null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&aC(t);else{if("string"!=typeof r&&null===t.stateNode)throw Error(i(166));if(e=I.current,t9(t)){e:{if(e=t.stateNode,n=t.memoizedProps,e[eE]=t,(r=e.nodeValue!==n)&&null!==(l=tX))switch(l.tag){case 3:if(l=0!=(1&l.mode),sq(e.nodeValue,n,l),l){e=!1;break e}break;case 27:case 5:var a=0!=(1&l.mode);if(!0!==l.memoizedProps.suppressHydrationWarning&&sq(e.nodeValue,n,a),a){e=!1;break e}}e=r}e&&aC(t)}else(e=s1(e).createTextNode(r))[eE]=t,t.stateNode=e}return aP(t),null;case 13:if(ro(t),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(tZ&&null!==tG&&0!=(1&t.mode)&&0==(128&t.flags))ne(),nt(),t.flags|=384,l=!1;else if(l=t9(t),null!==r&&null!==r.dehydrated){if(null===e){if(!l)throw Error(i(318));if(!(l=null!==(l=t.memoizedState)?l.dehydrated:null))throw Error(i(317));l[eE]=t}else nt(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;aP(t),l=!1}else null!==tJ&&(o0(tJ),tJ=null),l=!0;if(!l)return 256&t.flags?t:null}if(0!=(128&t.flags))return t.lanes=n,t;return n=null!==r,e=null!==e&&null!==e.memoizedState,n&&(r=t.child,l=null,null!==r.alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(l=r.alternate.memoizedState.cachePool.pool),a=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(a=r.memoizedState.cachePool.pool),a!==l&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ax(t,t.updateQueue),aP(t),null;case 4:return Q(),null===e&&sA(t.stateNode.containerInfo),aP(t),null;case 10:return an(t.type._context),aP(t),null;case 19:if(h(ri),null===(l=t.memoizedState))return aP(t),null;if(r=0!=(128&t.flags),null===(a=l.rendering)){if(r)az(l,!1);else{if(0!==oP||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(a=ru(e))){for(t.flags|=128,az(l,!1),e=a.updateQueue,t.updateQueue=e,ax(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)ix(n,e),n=n.sibling;return g(ri,1&ri.current|2),t.child}e=e.sibling}null!==l.tail&&Y()>oI&&(t.flags|=128,r=!0,az(l,!1),t.lanes=4194304)}}else{if(!r){if(null!==(e=ru(a))){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,ax(t,e),az(l,!0),null===l.tail&&"hidden"===l.tailMode&&!a.alternate&&!tZ)return aP(t),null}else 2*Y()-l.renderingStartTime>oI&&536870912!==n&&(t.flags|=128,r=!0,az(l,!1),t.lanes=4194304)}l.isBackwards?(a.sibling=t.child,t.child=a):(null!==(e=l.last)?e.sibling=a:t.child=a,l.last=a)}if(null!==l.tail)return t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=Y(),t.sibling=null,e=ri.current,g(ri,r?1&e|2:1&e),t;return aP(t),null;case 22:case 23:return ro(t),re(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(536870912&n)&&0==(128&t.flags)&&(aP(t),6&t.subtreeFlags&&(t.flags|=8192)):aP(t),null!==(n=t.updateQueue)&&ax(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&h(ab),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),an(ad),aP(t),null;case 25:return null}throw Error(i(156,t.tag))}(t.alternate,t,oz);if(null!==n){ow=n;return}if(null!==(t=t.sibling)){ow=t;return}ow=t=e}while(null!==t);0===oP&&(oP=5)}function is(e,t,n,r,l){var a=ek,o=ov.transition;try{ov.transition=null,ek=2,function(e,t,n,r,l,a){do id();while(null!==oj);if(0!=(6&ob))throw Error(i(327));var o,u=e.finishedWork,s=e.finishedLanes;if(null!==u){if(e.finishedWork=null,e.finishedLanes=0,u===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0,e.cancelPendingCommit=null;var c=u.lanes|u.childLanes;if(function(e,t,n){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.entangledLanes&=t,e.errorRecoveryDisabledLanes&=t,e.shellSuspendCounter=0,t=e.entanglements;for(var l=e.expirationTimes,a=e.hiddenUpdates;0r&&(l=r,r=a,a=l),l=si(n,a);var o=si(n,r);l&&o&&(1!==e.rangeCount||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(l.node,l.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;nn?32:n;n=ov.transition;var l=ek;try{if(ov.transition=null,ek=r,null===oj)var a=!1;else{r=oq,oq=null;var o=oj,u=oW;if(oj=null,oW=0,0!=(6&ob))throw Error(i(331));var s=ob;if(ob|=4,of(o.current),ol(o,o.current,u,r),ob=s,nb(!1),ea&&"function"==typeof ea.onPostCommitFiberRoot)try{ea.onPostCommitFiberRoot(el,o)}catch(e){}a=!0}return a}finally{ek=l,ov.transition=n,ic(e,t)}}return!1}function ip(e,t,n){t=lL(e,t=lP(n,t),2),null!==(e=nO(e,t,2))&&(o2(e,2),nv(e))}function im(e,t,n){if(3===e.tag)ip(e,e,n);else for(;null!==t;){if(3===t.tag){ip(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===oQ||!oQ.has(r))){e=lT(t,e=lP(n,e),2),null!==(t=nO(t,e,2))&&(o2(t,2),nv(t));break}}t=t.return}}function ih(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new om;var l=new Set;r.set(t,l)}else void 0===(l=r.get(t))&&(l=new Set,r.set(t,l));l.has(n)||(ox=!0,l.add(n),e=ig.bind(null,e,t,n),t.then(e,e))}function ig(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,2&ob?oR=!0:4&ob&&(oD=!0),ik(),ok===e&&(oS&n)===n&&(4===oP||3===oP&&(62914560&oS)===oS&&300>Y()-oA?0==(2&ob)&&o5(e,0):oT|=n),nv(e)}function iy(e,t){0===t&&(t=0==(1&e.mode)?2:eg()),null!==(e=ns(e,t))&&(o2(e,t),nv(e))}function iv(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),iy(e,n)}function ib(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;null!==l&&(n=l.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}null!==r&&r.delete(t),iy(e,n)}function ik(){if(50=uH),uY=!1;function uX(e,t){switch(e){case"keyup":return -1!==uj.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uG(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var uZ=!1,uJ={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function u0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!uJ[e.type]:"textarea"===t}function u1(e,t,n,r){tb(r),0<(t=sV(t,"onChange")).length&&(n=new i3("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var u2=null,u3=null;function u4(e){sM(e,0)}function u6(e){if(e4(eR(e)))return e}function u8(e,t){if("change"===e)return t}var u5=!1;if(e$){if(e$){var u7="oninput"in document;if(!u7){var u9=document.createElement("div");u9.setAttribute("oninput","return;"),u7="function"==typeof u9.oninput}r=u7}else r=!1;u5=r&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=so(r)}}function su(){for(var e=window,t=e6();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(n)e=t.contentWindow;else break;t=e6(e.document)}return t}function ss(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var sc=e$&&"documentMode"in document&&11>=document.documentMode,sf=null,sd=null,sp=null,sm=!1;function sh(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;sm||null==sf||sf!==e6(r)||(r="selectionStart"in(r=sf)&&ss(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},sp&&nQ(sp,r)||(sp=r,0<(r=sV(sd,"onSelect")).length&&(t=new i3("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=sf)))}function sg(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var sy={animationend:sg("Animation","AnimationEnd"),animationiteration:sg("Animation","AnimationIteration"),animationstart:sg("Animation","AnimationStart"),transitionend:sg("Transition","TransitionEnd")},sv={},sb={};function sk(e){if(sv[e])return sv[e];if(!sy[e])return e;var t,n=sy[e];for(t in n)if(n.hasOwnProperty(t)&&t in sb)return sv[e]=n[t];return e}e$&&(sb=document.createElement("div").style,"AnimationEvent"in window||(delete sy.animationend.animation,delete sy.animationiteration.animation,delete sy.animationstart.animation),"TransitionEvent"in window||delete sy.transitionend.transition);var sw=sk("animationend"),sS=sk("animationiteration"),sC=sk("animationstart"),sE=sk("transitionend"),sx=new Map,sz="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll scrollEnd toggle touchMove waiting wheel".split(" ");function sP(e,t){sx.set(e,t),eV(t,[e])}for(var sN=0;sN title"):null)}var cz=null;function cP(){}function cN(){if(this.count--,0===this.count){if(this.stylesheets)cL(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var c_=null;function cL(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,c_=new Map,t.forEach(cT,e),c_=null,cN.call(e))}function cT(e,t){if(!(4&t.state.loading)){var n=c_.get(e);if(n)var r=n.get(null);else{n=new Map,c_.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;an}return!1}(n,t,a,r)&&(t=null),r||null===a?(l=n,(!!v.call(k,l)||!v.call(b,l)&&(y.test(l)?k[l]=!0:(b[l]=!0,!1)))&&(null===t?e.removeAttribute(n):e.setAttribute(n,""+t))):a.mustUseProperty?e[a.propertyName]=null===t?3!==a.type&&"":t:(n=a.attributeName,r=a.attributeNamespace,null===t?e.removeAttribute(n):(t=3===(a=a.type)||4===a&&!0===t?"":""+t,r?e.setAttributeNS(r,n,t):e.setAttribute(n,t))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(x,E);S[n]=new w(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(x,E);S[n]=new w(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(x,E);S[n]=new w(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){S[e]=new w(e,1,!1,e.toLowerCase(),null,!1,!1)}),S.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){S[e]=new w(e,1,!1,e.toLowerCase(),null,!0,!0)});var C=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,P=Symbol.for("react.element"),N=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),M=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),U=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var V=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var $=Symbol.iterator;function A(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=$&&e[$]||e["@@iterator"])?e:null}var j,B=Object.assign;function H(e){if(void 0===j)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);j=n&&n[1]||""}return"\n"+j+e}var W=!1;function Q(e,n){if(!e||W)return"";W=!0;var t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n){if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}e()}}catch(n){if(n&&r&&"string"==typeof n.stack){for(var l=n.stack.split("\n"),a=r.stack.split("\n"),u=l.length-1,o=a.length-1;1<=u&&0<=o&&l[u]!==a[o];)o--;for(;1<=u&&0<=o;u--,o--)if(l[u]!==a[o]){if(1!==u||1!==o)do if(u--,0>--o||l[u]!==a[o]){var i="\n"+l[u].replace(" at new "," at ");return e.displayName&&i.includes("")&&(i=i.replace("