PageSourceSearch

https://abantra.com/assets/EstadisticasPage-pq5vdUku.js

js abantra.com collected 2026-09-24 14:37:38 UTC 66,090 bytes, 1 lines download raw bytes

1import{c as createLucideIcon,bB as toDate,av as React,r as reactExports,a as useTranslation,j as jsxRuntimeExports,aW as BarChart3,al as Globe,ai as useWords,bv as calculateLevelProgress,bC as findNextAchievements,D as Diamond,aa as LEVELS_CONFIG,bD as ACHIEVEMENTS_CONFIG,u as useAuth,t as useNavigate,J as Target,b9 as Settings,i as LoaderCircle,b1 as DEFAULT_SETTINGS,a_ as STATUS_IGNORED,S as STATUS_KNOWN,f as STATUS_UNKNOWN,a0 as getDocs,a1 as query,w as collection,x as db,Y as orderBy,$ as limit,g as STATUS_LEARNING_1,a3 as STATUS_LEARNING_2,a4 as STATUS_LEARNING_3,bE as calculateAchievementsStatus}from"./index-BmIPE7n8.js";import{F as Flame}from"./flame-BAnABVTg.js";import{S as Star}from"./star-bjbUhEzL.js";import{c as constructFrom,f as format,e as es}from"./es-LIsqkEsl.js";import{C as Clock}from"./clock-BXpqbSGg.js";import{B as BarChart2}from"./bar-chart-2-DOTm2K2U.js";import{g as getAngledRectangleWidth,i as isNumber,G as Global,a as getStringSize,m as mathSign,b as isFunction,c as clsx,T as Text,s as shallowEqual,f as filterProps,d as get,L as Layer,e as adaptEventsOfChild,h as Label,u as useChartWidth,j as useChartHeight,k as useOffset,l as useArbitraryXAxis,n as useYAxisWithFiniteDomainOrRandom,w as warn,o as getCoordinatesOfGrid,p as getTicksOfAxis,q as useXAxisOrThrow,r as useYAxisOrThrow,t as generateCategoricalChart,B as Bar,v as formatAxisMap,R as ResponsiveContainer,x as Tooltip,P as PieChart,y as Pie,C as Cell,z as Legend}from"./PieChart-CvIvvkwp.js";import{I as Info}from"./info-CrTnUsp5.js";import{A as Award}from"./award-Do9qRkhL.js";import{C as CircleCheckBig}from"./circle-check-big-BlXdua2n.js";import"./index-DhRKqXpP.js";const BookCheck=createLucideIcon("BookCheck",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["path",{d:"m9 9.5 2 2 4-4",key:"1dth82"}]]);function subDays(date,amount){return function(date,amount){const _date=toDate(date);return isNaN(amount)?constructFrom(date,NaN):amount?(_date.setDate(_date.getDate()+amount),_date):_date}(date,-amount)}function getEveryNthWithCondition(array,n,isValid){if(n<1)return[];if(1===n&&void 0===isValid)return array;for(var result=[],i=0;i<array.length;i+=n)result.push(array[i]);return result}function isVisible(sign,tickPosition,getSize,start,end){if(sign*tickPosition<sign*start||sign*tickPosition>sign*end)return!1;var size=getSize();return sign*(tickPosition-sign*size/2-start)>=0&&sign*(tickPosition+sign*size/2-end)<=0}function _typeof$4(o){return _typeof$4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof$4(o)}function ownKeys$2(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function _objectSpread$2(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys$2(Object(t),!0).forEach(function(r){_defineProperty$4(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys$2(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function _defineProperty$4(obj,key,value){var i;return i=function(t,r){if("object"!=_typeof$4(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r);
1if("object"!=_typeof$4(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(key,"string"),(key="symbol"==_typeof$4(i)?i:i+"")in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function getTicks(props,fontSize,letterSpacing){var tick=props.tick,ticks=props.ticks,viewBox=props.viewBox,minTickGap=props.minTickGap,orientation=props.orientation,interval=props.interval,tickFormatter=props.tickFormatter,unit=props.unit,angle=props.angle;if(!ticks||!ticks.length||!tick)return[];if(isNumber(interval)||Global.isSsr)return function(ticks,interval){return getEveryNthWithCondition(ticks,interval+1)}(ticks,"number"==typeof interval&&isNumber(interval)?interval:0);var candidates=[],sizeKey="top"===orientation||"bottom"===orientation?"width":"height",unitSize=unit&&"width"===sizeKey?getStringSize(unit,{fontSize:fontSize,letterSpacing:letterSpacing}):{width:0,height:0},getTickSize=function(content,index){var value=isFunction(tickFormatter)?tickFormatter(content.value,index):content.value;return"width"===sizeKey?function(contentSize,unitSize,angle){var size={width:contentSize.width+unitSize.width,height:contentSize.height+unitSize.height};return getAngledRectangleWidth(size,angle)}(getStringSize(value,{fontSize:fontSize,letterSpacing:letterSpacing}),unitSize,angle):getStringSize(value,{fontSize:fontSize,letterSpacing:letterSpacing})[sizeKey]},sign=ticks.length>=2?mathSign(ticks[1].coordinate-ticks[0].coordinate):1,boundaries=function(viewBox,sign,sizeKey){var isWidth="width"===sizeKey,x=viewBox.x,y=viewBox.y,width=viewBox.width,height=viewBox.height;return 1===sign?{start:isWidth?x:y,end:isWidth?x+width:y+height}:{start:isWidth?x+width:y+height,end:isWidth?x:y}}(viewBox,sign,sizeKey);return"equidistantPreserveStart"===interval?function(sign,boundaries,getTickSize,ticks,minTickGap){for(var _ret,result=(ticks||[]).slice(),initialStart=boundaries.start,end=boundaries.end,index=0,stepsize=1,start=initialStart,_loop=function(){var entry=null==ticks?void 0:ticks[index];if(void 0===entry)return{v:getEveryNthWithCondition(ticks,stepsize)};var size,i=index,getSize=function(){return void 0===size&&(size=getTickSize(entry,i)),size},tickCoord=entry.coordinate,isShow=0===index||isVisible(sign,tickCoord,getSize,start,end);isShow||(index=0,start=initialStart,stepsize+=1),isShow&&(start=tickCoord+sign*(getSize()/2+minTickGap),index+=stepsize)};stepsize<=result.length;)if(_ret=_loop())return _ret.v;return[]}(sign,boundaries,getTickSize,ticks,minTickGap):(candidates="preserveStart"===interval||"preserveStartEnd"===interval?function(sign,boundaries,getTickSize,ticks,minTickGap,preserveEnd){var result=(ticks||[]).slice(),len=result.length,start=boundaries.start,end=boundaries.end;if(preserveEnd){var tail=ticks[len-1],tailSize=getTickSize(tail,len-1),tailGap=sign*(tail.coordinate+sign*tailSize/2-end);result[len-1]=tail=_objectSpread$2(_objectSpread$2({},tail),{},{tickCoord:tailGap>0?tail.coordinate-tailGap*sign:tail.coordinate}),isVisible(sign,tail.tickCoord,function(){return tailSize},start,end)&&(end=tail.tickCoord-sign*(tailSize/2+minTickGap),result[len-1]=_objectSpread$2(_objectSpread$2({},tail),{},{isShow:!0}))}for(var count=preserveEnd?len-1:len,_loop2=function(i){var size,entry=result[i],getSize=function(){return void 0===size&&(size=getTickSize(entry,i)),size};if(0===i){var gap=sign*(entry.coordinate-sign*getSize()/2-start);result[i]=entry=_objectSpread$2(_objectSpread$2({},entry),{},{tickCoord:gap<0?entry.coordinate-gap*sign:entry.coordinate})}else result[i]=entry=_objectSpread$2(_objectSpread$2({},entry),{},{tickCoord:entry.coordinate});isVisible(sign,entry.tickCoord,getSize,start,end)&&(start=entry.tickCoord+sign*(getSize()/2+minTickGap),result[i]=_objectSpread$2(_objectSpread$2({},entry),{},{isShow:!0}))},i=0;i<count;i++)_loop2(i);return result}(sign,boundaries,getTickSize,ticks,minTickGap,"preserveStartEnd"===interval):function(sign,boundaries,getTickSize,ticks,minTickGap){for(var result=(ticks||[]).slice(),len=result.length,start=boundaries.start,end=boundaries.end,_loop=function(i){var size,entry=result[i],getSize=function(){return void 0===size&&(size=getTickSize(entry,i)
1),size};if(i===len-1){var gap=sign*(entry.coordinate+sign*getSize()/2-end);result[i]=entry=_objectSpread$2(_objectSpread$2({},entry),{},{tickCoord:gap>0?entry.coordinate-gap*sign:entry.coordinate})}else result[i]=entry=_objectSpread$2(_objectSpread$2({},entry),{},{tickCoord:entry.coordinate});isVisible(sign,entry.tickCoord,getSize,start,end)&&(end=entry.tickCoord-sign*(getSize()/2+minTickGap),result[i]=_objectSpread$2(_objectSpread$2({},entry),{},{isShow:!0}))},i=len-1;i>=0;i--)_loop(i);return result}(sign,boundaries,getTickSize,ticks,minTickGap),candidates.filter(function(entry){return entry.isShow}))}var _excluded$1=["viewBox"],_excluded2$1=["viewBox"],_excluded3=["ticks"];function _typeof$3(o){return _typeof$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof$3(o)}function _extends$3(){return _extends$3=Object.assign?Object.assign.bind():function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends$3.apply(this,arguments)}function ownKeys$1(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function _objectSpread$1(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys$1(Object(t),!0).forEach(function(r){_defineProperty$3(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys$1(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function _objectWithoutProperties$1(source,excluded){if(null==source)return{};var key,i,target=function(source,excluded){if(null==source)return{};var target={};for(var key in source)if(Object.prototype.hasOwnProperty.call(source,key)){if(excluded.indexOf(key)>=0)continue;target[key]=source[key]}return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],excluded.indexOf(key)>=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _defineProperties$2(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,_toPropertyKey$3(descriptor.key),descriptor)}}function _callSuper$2(t,o,e){return o=_getPrototypeOf$2(o),function(self,call){if(call&&("object"===_typeof$3(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return function(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(self)}(t,_isNativeReflectConstruct$2()?Reflect.construct(o,e||[],_getPrototypeOf$2(t).constructor):o.apply(t,e))}function _isNativeReflectConstruct$2(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct$2=function(){return!!t})()}function _getPrototypeOf$2(o){return _getPrototypeOf$2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},_getPrototypeOf$2(o)}function _setPrototypeOf$2(o,p){return _setPrototypeOf$2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,p){return o.__proto__=p,o},_setPrototypeOf$2(o,p)}function _defineProperty$3(obj,key,value){return(key=_toPropertyKey$3(key))in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _toPropertyKey$3(t){var i=function(t,r){if("object"!=_typeof$3(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r);
1if("object"!=_typeof$3(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==_typeof$3(i)?i:i+""}var CartesianAxis=function(){function CartesianAxis(props){var _this;return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,CartesianAxis),(_this=_callSuper$2(this,CartesianAxis,[props])).state={fontSize:"",letterSpacing:""},_this}return function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf$2(subClass,superClass)}(CartesianAxis,reactExports.Component),Constructor=CartesianAxis,staticProps=[{key:"renderTickItem",value:function(option,props,value){var combinedClassName=clsx(props.className,"recharts-cartesian-axis-tick-value");return React.isValidElement(option)?React.cloneElement(option,_objectSpread$1(_objectSpread$1({},props),{},{className:combinedClassName})):isFunction(option)?option(_objectSpread$1(_objectSpread$1({},props),{},{className:combinedClassName})):React.createElement(Text,_extends$3({},props,{className:"recharts-cartesian-axis-tick-value"}),value)}}],(protoProps=[{key:"shouldComponentUpdate",value:function(_ref,nextState){var viewBox=_ref.viewBox,restProps=_objectWithoutProperties$1(_ref,_excluded$1),_this$props=this.props,viewBoxOld=_this$props.viewBox,restPropsOld=_objectWithoutProperties$1(_this$props,_excluded2$1);return!shallowEqual(viewBox,viewBoxOld)||!shallowEqual(restProps,restPropsOld)||!shallowEqual(nextState,this.state)}},{key:"componentDidMount",value:function(){var htmlLayer=this.layerReference;if(htmlLayer){var tick=htmlLayer.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];tick&&this.setState({fontSize:window.getComputedStyle(tick).fontSize,letterSpacing:window.getComputedStyle(tick).letterSpacing})}}},{key:"getTickLineCoord",value:function(data){var x1,x2,y1,y2,tx,ty,_this$props2=this.props,x=_this$props2.x,y=_this$props2.y,width=_this$props2.width,height=_this$props2.height,orientation=_this$props2.orientation,tickSize=_this$props2.tickSize,mirror=_this$props2.mirror,tickMargin=_this$props2.tickMargin,sign=mirror?-1:1,finalTickSize=data.tickSize||tickSize,tickCoord=isNumber(data.tickCoord)?data.tickCoord:data.coordinate;switch(orientation){case"top":x1=x2=data.coordinate,ty=(y1=(y2=y+ +!mirror*height)-sign*finalTickSize)-sign*tickMargin,tx=tickCoord;break;case"left":y1=y2=data.coordinate,tx=(x1=(x2=x+ +!mirror*width)-sign*finalTickSize)-sign*tickMargin,ty=tickCoord;break;case"right":y1=y2=data.coordinate,tx=(x1=(x2=x+ +mirror*width)+sign*finalTickSize)+sign*tickMargin,ty=tickCoord;break;default:x1=x2=data.coordinate,ty=(y1=(y2=y+ +mirror*height)+sign*finalTickSize)+sign*tickMargin,tx=tickCoord}return{line:{x1:x1,y1:y1,x2:x2,y2:y2},tick:{x:tx,y:ty}}}},{key:"getTickTextAnchor",value:function(){var textAnchor,_this$props3=this.props,orientation=_this$props3.orientation,mirror=_this$props3.mirror;switch(orientation){case"left":textAnchor=mirror?"start":"end";break;case"right":textAnchor=mirror?"end":"start";break;default:textAnchor="middle"}return textAnchor}},{key:"getTickVerticalAnchor",value:function(){var _this$props4=this.props,orientation=_this$props4.orientation,mirror=_this$props4.mirror,verticalAnchor="end";switch(orientation){case"left":case"right":verticalAnchor="middle";break;case"top":verticalAnchor=mirror?"start":"end";break;default:verticalAnchor=mirror?"end":"start"}return verticalAnchor}},{key:"renderAxisLine",value:function(){var _this$props5=this.props,x=_this$props5.x,y=_this$props5.y,width=_this$props5.width,height=_this$props5.height,orientation=_this$props5.orientation,mirror=_this$props5.mirror,axisLine=_this$props5.axisLine,props=_objectSpread$1(_objectSpread$1(_objectSpread$1({},filterProps(this.props,!1)),filterProps(axisLine,!1)),{},{fill:"none"});if("top"===orientation||"bottom"===orientation){var needHeight=+("top"===orientation&&!mirror||"bottom"===orientation&&mirror);props=_objectSpread$1(_objectSpread$1({},props),{},{x1:x,y1:y+needHeight*height,x2:x+width,y2:y+needHeight*height})}else{var needWidth=+("left"===orientation&&!mirror||"right"===orientation&&mirror);props=_objectSpread$1(_objectSpread$1({},props),{},{x1:x+needWidth*width,y1:y,x2:x+needWidth*width,y2:y+height})}return React.createElement("line",_extends$3({},props,{className:clsx("recharts-cartesian-axis-line",get(axisLine,"className"))}))}},{key:"renderTicks",value:function(ticks,fontSize,letterSpacing){var _this2=this,_this$props6=this.props,tickLine
1=_this$props6.tickLine,stroke=_this$props6.stroke,tick=_this$props6.tick,tickFormatter=_this$props6.tickFormatter,unit=_this$props6.unit,finalTicks=getTicks(_objectSpread$1(_objectSpread$1({},this.props),{},{ticks:ticks}),fontSize,letterSpacing),textAnchor=this.getTickTextAnchor(),verticalAnchor=this.getTickVerticalAnchor(),axisProps=filterProps(this.props,!1),customTickProps=filterProps(tick,!1),tickLineProps=_objectSpread$1(_objectSpread$1({},axisProps),{},{fill:"none"},filterProps(tickLine,!1)),items=finalTicks.map(function(entry,i){var _this2$getTickLineCoo=_this2.getTickLineCoord(entry),lineCoord=_this2$getTickLineCoo.line,tickCoord=_this2$getTickLineCoo.tick,tickProps=_objectSpread$1(_objectSpread$1(_objectSpread$1(_objectSpread$1({textAnchor:textAnchor,verticalAnchor:verticalAnchor},axisProps),{},{stroke:"none",fill:stroke},customTickProps),tickCoord),{},{index:i,payload:entry,visibleTicksCount:finalTicks.length,tickFormatter:tickFormatter});return React.createElement(Layer,_extends$3({className:"recharts-cartesian-axis-tick",key:"tick-".concat(entry.value,"-").concat(entry.coordinate,"-").concat(entry.tickCoord)},adaptEventsOfChild(_this2.props,entry,i)),tickLine&&React.createElement("line",_extends$3({},tickLineProps,lineCoord,{className:clsx("recharts-cartesian-axis-tick-line",get(tickLine,"className"))})),tick&&CartesianAxis.renderTickItem(tick,tickProps,"".concat(isFunction(tickFormatter)?tickFormatter(entry.value,i):entry.value).concat(unit||"")))});return React.createElement("g",{className:"recharts-cartesian-axis-ticks"},items)}},{key:"render",value:function(){var _this3=this,_this$props7=this.props,axisLine=_this$props7.axisLine,width=_this$props7.width,height=_this$props7.height,ticksGenerator=_this$props7.ticksGenerator,className=_this$props7.className;if(_this$props7.hide)return null;var _this$props8=this.props,ticks=_this$props8.ticks,noTicksProps=_objectWithoutProperties$1(_this$props8,_excluded3),finalTicks=ticks;return isFunction(ticksGenerator)&&(finalTicks=ticks&&ticks.length>0?ticksGenerator(this.props):ticksGenerator(noTicksProps)),width<=0||height<=0||!finalTicks||!finalTicks.length?null:React.createElement(Layer,{className:clsx("recharts-cartesian-axis",className),ref:function(_ref2){_this3.layerReference=_ref2}},axisLine&&this.renderAxisLine(),this.renderTicks(finalTicks,this.state.fontSize,this.state.letterSpacing),Label.renderCallByParent(this.props))}}])&&_defineProperties$2(Constructor.prototype,protoProps),staticProps&&_defineProperties$2(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor;var Constructor,protoProps,staticProps}();_defineProperty$3(CartesianAxis,"displayName","CartesianAxis"),_defineProperty$3(CartesianAxis,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var _excluded=["x1","y1","x2","y2","key"],_excluded2=["offset"];function _typeof$2(o){return _typeof$2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof$2(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty$2(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function _defineProperty$2(obj,key,value){var i;return i=function(t,r){if("object"!=_typeof$2(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r);
1if("object"!=_typeof$2(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(key,"string"),(key="symbol"==_typeof$2(i)?i:i+"")in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _extends$2(){return _extends$2=Object.assign?Object.assign.bind():function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends$2.apply(this,arguments)}function _objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function(source,excluded){if(null==source)return{};var target={};for(var key in source)if(Object.prototype.hasOwnProperty.call(source,key)){if(excluded.indexOf(key)>=0)continue;target[key]=source[key]}return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],excluded.indexOf(key)>=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}
1var Background=function(props){var fill=props.fill;if(!fill||"none"===fill)return null;var fillOpacity=props.fillOpacity,x=props.x,y=props.y,width=props.width,height=props.height,ry=props.ry;return React.createElement("rect",{x:x,y:y,ry:ry,width:width,height:height,stroke:"none",fill:fill,fillOpacity:fillOpacity,className:"recharts-cartesian-grid-bg"})};function renderLineItem(option,props){var lineItem;if(React.isValidElement(option))lineItem=React.cloneElement(option,props);else if(isFunction(option))lineItem=option(props);else{var x1=props.x1,y1=props.y1,x2=props.x2,y2=props.y2,key=props.key,others=_objectWithoutProperties(props,_excluded),_filterProps=filterProps(others,!1);_filterProps.offset;var restOfFilteredProps=_objectWithoutProperties(_filterProps,_excluded2);lineItem=React.createElement("line",_extends$2({},restOfFilteredProps,{x1:x1,y1:y1,x2:x2,y2:y2,fill:"none",key:key}))}return lineItem}function HorizontalGridLines(props){var x=props.x,width=props.width,_props$horizontal=props.horizontal,horizontal=void 0===_props$horizontal||_props$horizontal,horizontalPoints=props.horizontalPoints;if(!horizontal||!horizontalPoints||!horizontalPoints.length)return null;var items=horizontalPoints.map(function(entry,i){var lineItemProps=_objectSpread(_objectSpread({},props),{},{x1:x,y1:entry,x2:x+width,y2:entry,key:"line-".concat(i),index:i});return renderLineItem(horizontal,lineItemProps)});return React.createElement("g",{className:"recharts-cartesian-grid-horizontal"},items)}function VerticalGridLines(props){var y=props.y,height=props.height,_props$vertical=props.vertical,vertical=void 0===_props$vertical||_props$vertical,verticalPoints=props.verticalPoints;if(!vertical||!verticalPoints||!verticalPoints.length)return null;var items=verticalPoints.map(function(entry,i){var lineItemProps=_objectSpread(_objectSpread({},props),{},{x1:entry,y1:y,x2:entry,y2:y+height,key:"line-".concat(i),index:i});return renderLineItem(vertical,lineItemProps)});return React.createElement("g",{className:"recharts-cartesian-grid-vertical"},items)}function HorizontalStripes(props){var horizontalFill=props.horizontalFill,fillOpacity=props.fillOpacity,x=props.x,y=props.y,width=props.width,height=props.height,horizontalPoints=props.horizontalPoints,_props$horizontal2=props.horizontal;if(!(void 0===_props$horizontal2||_props$horizontal2)||!horizontalFill||!horizontalFill.length)return null;var roundedSortedHorizontalPoints=horizontalPoints.map(function(e){return Math.round(e+y-y)}).sort(function(a,b){return a-b});y!==roundedSortedHorizontalPoints[0]&&roundedSortedHorizontalPoints.unshift(0);var items=roundedSortedHorizontalPoints.map(function(entry,i){var lineHeight=!roundedSortedHorizontalPoints[i+1]?y+height-entry:roundedSortedHorizontalPoints[i+1]-entry;if(lineHeight<=0)return null;var colorIndex=i%horizontalFill.length;return React.createElement("rect",{key:"react-".concat(i),y:entry,x:x,height:lineHeight,width:width,stroke:"none",fill:horizontalFill[colorIndex],fillOpacity:fillOpacity,className:"recharts-cartesian-grid-bg"})});return React.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},items)}function VerticalStripes(props){var _props$vertical2=props.vertical,vertical=void 0===_props$vertical2||_props$vertical2,verticalFill=props.verticalFill,fillOpacity=props.fillOpacity,x=props.x,y=props.y,width=props.width,height=props.height,verticalPoints=props.verticalPoints;if(!vertical||!verticalFill||!verticalFill.length)return null;var roundedSortedVerticalPoints=verticalPoints.map(function(e){return Math.round(e+x-x)}).sort(function(a,b){return a-b});x!==roundedSortedVerticalPoints[0]&&roundedSortedVerticalPoints.unshift(0);var items=roundedSortedVerticalPoints.map(function(entry,i){var lineWidth=!roundedSortedVerticalPoints[i+1]?x+width-entry:roundedSortedVerticalPoints[i+1]-entry;if(lineWidth<=0)return null;var colorIndex=i%verticalFill.length;return React.createElement("rect",{key:"react-".concat(i),x:entry,y:y,width:lineWidth,height:height,stroke:"none",fill:verticalFill[colorIndex],fillOpacity:fillOpacity,className:"recharts-cartesian-grid-bg"})});return React.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},items)}var defaultVerticalCoordinatesGenerator=function(_ref,syncWithTicks){var xAxis=_ref.xAxis,width=_ref.width,height=_ref.height,offset=_ref.offset;return getCoordinatesOfGrid(getTicks(_objectSpread(_objectSpread(_objectSpread({},CartesianAxis.defaultProps),xAxis),{}
1,{ticks:getTicksOfAxis(xAxis,!0),viewBox:{x:0,y:0,width:width,height:height}})),offset.left,offset.left+offset.width,syncWithTicks)},defaultHorizontalCoordinatesGenerator=function(_ref2,syncWithTicks){var yAxis=_ref2.yAxis,width=_ref2.width,height=_ref2.height,offset=_ref2.offset;return getCoordinatesOfGrid(getTicks(_objectSpread(_objectSpread(_objectSpread({},CartesianAxis.defaultProps),yAxis),{},{ticks:getTicksOfAxis(yAxis,!0),viewBox:{x:0,y:0,width:width,height:height}})),offset.top,offset.top+offset.height,syncWithTicks)},defaultProps={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function CartesianGrid(props){var _props$stroke,_props$fill,_props$horizontal3,_props$horizontalFill,_props$vertical3,_props$verticalFill,chartWidth=useChartWidth(),chartHeight=useChartHeight(),offset=useOffset(),propsIncludingDefaults=_objectSpread(_objectSpread({},props),{},{stroke:null!==(_props$stroke=props.stroke)&&void 0!==_props$stroke?_props$stroke:defaultProps.stroke,fill:null!==(_props$fill=props.fill)&&void 0!==_props$fill?_props$fill:defaultProps.fill,horizontal:null!==(_props$horizontal3=props.horizontal)&&void 0!==_props$horizontal3?_props$horizontal3:defaultProps.horizontal,horizontalFill:null!==(_props$horizontalFill=props.horizontalFill)&&void 0!==_props$horizontalFill?_props$horizontalFill:defaultProps.horizontalFill,vertical:null!==(_props$vertical3=props.vertical)&&void 0!==_props$vertical3?_props$vertical3:defaultProps.vertical,verticalFill:null!==(_props$verticalFill=props.verticalFill)&&void 0!==_props$verticalFill?_props$verticalFill:defaultProps.verticalFill,x:isNumber(props.x)?props.x:offset.left,y:isNumber(props.y)?props.y:offset.top,width:isNumber(props.width)?props.width:offset.width,height:isNumber(props.height)?props.height:offset.height}),x=propsIncludingDefaults.x,y=propsIncludingDefaults.y,width=propsIncludingDefaults.width,height=propsIncludingDefaults.height,syncWithTicks=propsIncludingDefaults.syncWithTicks,horizontalValues=propsIncludingDefaults.horizontalValues,verticalValues=propsIncludingDefaults.verticalValues,xAxis=useArbitraryXAxis(),yAxis=useYAxisWithFiniteDomainOrRandom();if(!isNumber(width)||width<=0||!isNumber(height)||height<=0||!isNumber(x)||x!==+x||!isNumber(y)||y!==+y)return null;var verticalCoordinatesGenerator=propsIncludingDefaults.verticalCoordinatesGenerator||defaultVerticalCoordinatesGenerator,horizontalCoordinatesGenerator=propsIncludingDefaults.horizontalCoordinatesGenerator||defaultHorizontalCoordinatesGenerator,horizontalPoints=propsIncludingDefaults.horizontalPoints,verticalPoints=propsIncludingDefaults.verticalPoints;if((!horizontalPoints||!horizontalPoints.length)&&isFunction(horizontalCoordinatesGenerator)){var isHorizontalValues=horizontalValues&&horizontalValues.length,generatorResult=horizontalCoordinatesGenerator({yAxis:yAxis?_objectSpread(_objectSpread({},yAxis),{},{ticks:isHorizontalValues?horizontalValues:yAxis.ticks}):void 0,width:chartWidth,height:chartHeight,offset:offset},!!isHorizontalValues||syncWithTicks);warn(Array.isArray(generatorResult),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(_typeof$2(generatorResult),"]")),Array.isArray(generatorResult)&&(horizontalPoints=generatorResult)}if((!verticalPoints||!verticalPoints.length)&&isFunction(verticalCoordinatesGenerator)){var isVerticalValues=verticalValues&&verticalValues.length,_generatorResult=verticalCoordinatesGenerator({xAxis:xAxis?_objectSpread(_objectSpread({},xAxis),{},{ticks:isVerticalValues?verticalValues:xAxis.ticks}):void 0,width:chartWidth,height:chartHeight,offset:offset},!!isVerticalValues||syncWithTicks);warn(Array.isArray(_generatorResult),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(_typeof$2(_generatorResult),"]")),Array.isArray(_generatorResult)&&(verticalPoints=_generatorResult)}return React.createElement("g",{className:"recharts-cartesian-grid"},React.createElement(Background,{fill:propsIncludingDefaults.fill,fillOpacity:propsIncludingDefaults.fillOpacity,x:propsIncludingDefaults.x,y:propsIncludingDefaults.y,width:propsIncludingDefaults.width,height:propsIncludingDefaults.height,ry:propsIncludingDefaults.ry}),React.createElement(HorizontalGridLines,_extends$2({},propsIncludingDefaults,{offset:offset,horizontalPoints:horizontalPoints,xAxis:xAxis,yAxis:yAxis})),React.createElement(VerticalGridLines,_extends$2({},propsIncludingDefaults,{offset:offset,verticalPoints:verticalPoints,xAxis:xAxis,yAxis:yAxis})),React.createElement(HorizontalStripes,_extends$2({},propsIncludingDefaults,{horizontalPoints:horizontalPoints})),React.createElement(VerticalStripes,_extends$2({},propsIncludingDefaults,{verticalPoints:verticalPoints})))}function _typeof$1(o){return _typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof$1(o)}function _createClass$1(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,_toPropertyKey$1(descriptor.key),descriptor)}}(Constructor.prototype,protoProps),Object.defineProperty(Constructor,"prototype",{writable:!1}
vendor: 1,402 bytes, line 1
1),Constructor}function _callSuper$1(t,o,e){return o=_getPrototypeOf$1(o),function(self,call){if(call&&("object"===_typeof$1(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return function(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(self)}(t,_isNativeReflectConstruct$1()?Reflect.construct(o,e||[],_getPrototypeOf$1(t).constructor):o.apply(t,e))}function _isNativeReflectConstruct$1(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct$1=function(){return!!t})()}function _getPrototypeOf$1(o){return _getPrototypeOf$1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},_getPrototypeOf$1(o)}function _setPrototypeOf$1(o,p){return _setPrototypeOf$1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,p){return o.__proto__=p,o},_setPrototypeOf$1(o,p)}function _defineProperty$1(obj,key,value){return(key=_toPropertyKey$1(key))in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _toPropertyKey$1(t){var i=function(t,r){if("object"!=_typeof$1(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r);
1if("object"!=_typeof$1(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==_typeof$1(i)?i:i+""}function _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends$1.apply(this,arguments)}function XAxisImpl(_ref){var xAxisId=_ref.xAxisId,width=useChartWidth(),height=useChartHeight(),axisOptions=useXAxisOrThrow(xAxisId);return null==axisOptions?null:reactExports.createElement(CartesianAxis,_extends$1({},axisOptions,{className:clsx("recharts-".concat(axisOptions.axisType," ").concat(axisOptions.axisType),axisOptions.className),viewBox:{x:0,y:0,width:width,height:height},ticksGenerator:function(axis){return getTicksOfAxis(axis,!0)}}))}CartesianGrid.displayName="CartesianGrid";var XAxis=function(){function XAxis(){return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,XAxis),_callSuper$1(this,XAxis,arguments)}return function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf$1(subClass,superClass)}(XAxis,reactExports.Component),_createClass$1(XAxis,[{key:"render",value:function(){return reactExports.createElement(XAxisImpl,this.props)}}])}();function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _createClass(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor)}}(Constructor.prototype,protoProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}function _callSuper(t,o,e){return o=_getPrototypeOf(o),function(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return function(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}(self)}(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e))}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function(){return!!t})()}function _getPrototypeOf(o){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},_getPrototypeOf(o)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _defineProperty(obj,key,value){return(key=_toPropertyKey(key))in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _toPropertyKey(t){var i=function(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r);
1if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==_typeof(i)?i:i+""}function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends.apply(this,arguments)}_defineProperty$1(XAxis,"displayName","XAxis"),_defineProperty$1(XAxis,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});var YAxisImpl=function(_ref){var yAxisId=_ref.yAxisId,width=useChartWidth(),height=useChartHeight(),axisOptions=useYAxisOrThrow(yAxisId);return null==axisOptions?null:reactExports.createElement(CartesianAxis,_extends({},axisOptions,{className:clsx("recharts-".concat(axisOptions.axisType," ").concat(axisOptions.axisType),axisOptions.className),viewBox:{x:0,y:0,width:width,height:height},ticksGenerator:function(axis){return getTicksOfAxis(axis,!0)}}))},YAxis=function(){function YAxis(){return function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,YAxis),_callSuper(this,YAxis,arguments)}return function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass)}(YAxis,reactExports.Component),_createClass(YAxis,[{key:"render",value:function(){return reactExports.createElement(YAxisImpl,this.props)}}])}();_defineProperty(YAxis,"displayName","YAxis"),_defineProperty(YAxis,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});var BarChart=generateCategoricalChart({chartName:"BarChart",GraphicalChild:Bar,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:XAxis},{axisType:"yAxis",AxisComp:YAxis}],formatAxisMap:formatAxisMap});function StatsHeader({displayName:displayName,languageName:languageName}){const{t:t}=useTranslation();return jsxRuntimeExports.jsx("div",{className:"bg-white dark:bg-slate-800 p-6 rounded-2xl shadow-lg border border-slate-200 dark:border-slate-700",children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-4",children:[jsxRuntimeExports.jsx("div",{className:"flex-shrink-0",children:jsxRuntimeExports.jsx("div",{className:"w-16 h-16 bg-teal-100 dark:bg-teal-900/60 text-teal-600 dark:text-teal-400 rounded-full flex items-center justify-center",children:jsxRuntimeExports.jsx(BarChart3,{size:32})})}),jsxRuntimeExports.jsxs("div",{className:"flex-grow",children:[jsxRuntimeExports.jsx("h1",{className:"text-3xl font-bold text-gray-800 dark:text-gray-100",children:t("stats.header.title")}),jsxRuntimeExports.jsx("p",{className:"mt-1 text-gray-600 dark:text-gray-300",children:t("stats.header.subtitle",{name:displayName||"explorador"})})]}),jsxRuntimeExports.jsxs("div",{className:"flex-shrink-0 w-full sm:w-auto mt-4 sm:mt-0 p-3 bg-slate-100 dark:bg-slate-700 rounded-lg text-sm font-semibold text-slate-700 dark:text-slate-200 flex items-center gap-2 border border-slate-200 dark:border-slate-600",children:[jsxRuntimeExports.jsx(Globe,{size:16}),jsxRuntimeExports.jsxs("span",{children:[t("stats.header.statsFor")," ",jsxRuntimeExports.jsx("span",{className:"text-teal-600 dark:text-teal-400",children:languageName})]})]})]})})}function StatCard({icon:icon,value:value,label:label,colorClass:colorClass}){return jsxRuntimeExports.jsxs("div",{className:"p-3 bg-white dark:bg-slate-800 rounded-lg text-center shadow border border-slate-200 dark:border-slate-700",children:[jsxRuntimeExports.jsx("div",{className:`mx-auto w-10 h-10 flex items-center justify-center rounded-full bg-slate-100 dar
1k:bg-slate-700 ${colorClass||"text-slate-600 dark:text-slate-300"}`,children:icon}),jsxRuntimeExports.jsx("p",{className:"mt-2 text-xl font-bold text-slate-800 dark:text-slate-100",children:void 0!==value?value:"-"}),jsxRuntimeExports.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400",children:label})]})}const AchievementItem=({achievement:achievement})=>jsxRuntimeExports.jsxs("div",{className:"flex items-start gap-4",children:[jsxRuntimeExports.jsx("div",{className:"text-3xl mt-1",children:achievement.icon}),jsxRuntimeExports.jsxs("div",{className:"flex-grow",children:[jsxRuntimeExports.jsxs("div",{className:"flex justify-between items-baseline mb-1",children:[jsxRuntimeExports.jsx("p",{className:"font-semibold text-base text-gray-900 dark:text-gray-200",children:achievement.name}),jsxRuntimeExports.jsxs("p",{className:"text-xs font-mono text-gray-600 dark:text-gray-400",children:[achievement.currentValue," / ",achievement.targetValue," ",achievement.unit||""]})]}),jsxRuntimeExports.jsx("div",{className:"w-full bg-slate-200 dark:bg-slate-600 rounded-full h-2.5",children:jsxRuntimeExports.jsx("div",{className:"bg-teal-500 h-2.5 rounded-full transition-all duration-500",style:{width:`${achievement.progress}%`}})})]})]});function GeneralProgressSection({userProfile:userProfile,activeLanguage:activeLanguage}){const{t:t}=useTranslation(),{words:words}=useWords(),{currentLevel:currentLevel,nextLevel:nextLevel,userXP:userXP,progressPercentage:progressPercentage}=calculateLevelProgress(userProfile,LEVELS_CONFIG),nextAchievements=findNextAchievements(userProfile,ACHIEVEMENTS_CONFIG,3);return userProfile&&currentLevel?jsxRuntimeExports.jsx("section",{children:jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8 items-stretch",children:[jsxRuntimeExports.jsxs("div",{className:"lg:col-span-2 bg-white dark:bg-slate-800 p-6 rounded-2xl shadow-lg border border-slate-200 dark:border-slate-700",children:[jsxRuntimeExports.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100 mb-4",children:t("stats.general.title")}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-6 mb-6",children:[jsxRuntimeExports.jsx("div",{className:"text-7xl drop-shadow-lg",children:currentLevel.icon}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{className:"text-sm text-yellow-500 font-semibold",children:t("stats.general.level",{level:currentLevel.level})}),jsxRuntimeExports.jsx("h3",{className:"text-3xl font-bold text-gray-900 dark:text-gray-100",children:currentLevel.name}),jsxRuntimeExports.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 mt-1",children:currentLevel.description})]})]}),nextLevel&&jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{className:"flex justify-between items-center text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:[jsxRuntimeExports.jsx("span",{children:t("stats.general.progressTo",{level:nextLevel.level,name:nextLevel.name})}),jsxRuntimeExports.jsxs("span",{className:"font-semibold text-gray-900 dark:text-gray-100",children:[userXP," / ",nextLevel.minXp," XP"]})]}),jsxRuntimeExports.jsx("div",{className:"w-full bg-gray-200 dark:bg-slate-700 rounded-full h-4 overflow-hidden border border-gray-300 dark:border-slate-600",children:jsxRuntimeExports.jsx("div",{className:"bg-gradient-to-r from-yellow-400 to-amber-500 h-full rounded-full transition-all duration-500 text-right",style:{width:`${progressPercentage}%`},children:jsxRuntimeExports.jsxs("span",{className:"px-2 text-xs font-bold text-white/80",children:[Math.round(progressPercentage),"%"]})})})]}),jsxRuntimeExports.jsxs("div",{className:"mt-8 grid grid-cols-2 gap-4",children:[jsxRuntimeExports.jsx(StatCard,{icon:jsxRuntimeExports.jsx(Diamond,{}),value:userProfile.gems||0,label:t("stats.general.gemsAccumulated"),colorClass:"text-teal-500"}),jsxRuntimeExports.jsx(StatCard,{icon:jsxRuntimeExports.jsx(Flame,{}),value:userProfile.streak?.current||0,label:t("stats.general.practiceStreak"),colorClass:"text-orange-500"})]})]}),jsxRuntimeExports.jsxs("div",{className:"bg-white dark:bg-slate-800 p-6 rounded-2xl shadow-lg border border-slate-200 dark:border-slate-700 flex flex-col",children:[jsxRuntimeExports.jsxs("h2",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100 mb-4 flex items-center gap-2",children:[jsxRuntimeExports.jsx(Star,{className:"text-amber-400"})," ",t("stats.achievements.title")]}),nextAchievements.length>0?jsxRuntimeExports.jsx("div",{className:"space-y-4 divide-y divide-slate-200 dark:divide-slate-700",children:nextAchievements.map(ach=>jsxRuntimeExports.jsx(AchievementItem,{achievement:ach},ach.id))}):jsxRuntimeExports.jsx("div",{className:"flex-grow flex items-center justify-center text-center",children:jsxRuntimeExports.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:t("stats.achievements.allCompleted")})})]})]})}):null}const CalendarDay=({day:day,isGoalMet:isGoalMet,readingTime:readingTime})=>jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-1 text-center group",title:readingTime>0?`${readingTime} min leídos`:"Sin lectura registrada",children:[jsxRuntimeExports.jsx("span",{className:"text-[10px] sm:text-xs font-semibold text-slate-500 dark:text-slate-400",children:format(day,"eee",{locale:es}).toUpperCase()}),jsxRuntimeExports.jsxs("div",{className:"w-8 h-8 sm:w-10 sm:h-10 rounded-full flex items-center justify-center transition-all duration-300 relative "+(isGoalMet?"bg-orange-100 dar
1k:bg-orange-900/50":"bg-slate-100 dark:bg-slate-700"),children:[isGoalMet?jsxRuntimeExports.jsx(Flame,{className:"text-orange-500 w-5 h-5 sm:w-6 sm:h-6"}):jsxRuntimeExports.jsx("span",{className:"text-xs sm:text-sm font-bold text-slate-400 dark:text-slate-500",children:format(day,"d")}),readingTime>0&&!isGoalMet&&jsxRuntimeExports.jsx("div",{className:"absolute bottom-0 h-1 w-full bg-teal-500/50 rounded-b-full"})]})]});function ReadingProgressHub({userProfile:userProfile}){const{isGuest:isGuest}=useAuth(),navigate=useNavigate(),basePath=isGuest?"/demo":"/home";if(!userProfile)return null;const readingStreak=userProfile.readingStreak||{current:0,best:0},booksCompleted=userProfile.booksCompletedCount||0,totalTimeAllTime=userProfile.totalReadingMinutes||0,weeklyReport=userProfile.weeklyReadingReport||{totalTimeReadMinutes:0,averageWPM:0},today=new Date,lastSevenDays=[...Array(7)].map((_,i)=>subDays(today,6-i)),snapshotsMap=new Map((userProfile.dailySnapshots||[]).map(s=>[s.date?.toDate?format(s.date.toDate(),"yyyy-MM-dd"):s.date,s])),last30DaysData=[...Array(30)].map((_,i)=>{const day=subDays(today,i),dayString=format(day,"yyyy-MM-dd"),snapshot=snapshotsMap.get(dayString);return{date:format(day,"d MMM",{locale:es}),time:snapshot?.readingTime||0}}).reverse();return jsxRuntimeExports.jsxs("div",{className:"bg-white dark:bg-slate-800 p-4 sm:p-8 rounded-2xl shadow-lg border border-slate-200 dark:border-slate-700",children:[jsxRuntimeExports.jsxs("header",{className:"mb-6 sm:mb-8",children:[jsxRuntimeExports.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-gray-900 dark:text-gray-100",children:"Mi Progreso de Lectura"}),jsxRuntimeExports.jsx("p",{className:"text-sm sm:text-base text-gray-600 dark:text-gray-300 mt-1",children:"Un análisis detallado de tus hábitos y logros como lector."})]}),jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 sm:gap-4 mb-8",children:[jsxRuntimeExports.jsx(StatCard,{icon:jsxRuntimeExports.jsx(Flame,{size:24}),value:readingStreak.current,label:"Racha Actual",colorClass:"text-orange-500"}),jsxRuntimeExports.jsx(StatCard,{icon:jsxRuntimeExports.jsx(Target,{size:24}),value:readingStreak.best,label:"Mejor Racha",colorClass:"text-red-500"}),jsxRuntimeExports.jsx(StatCard,{icon:jsxRuntimeExports.jsx(BookCheck,{size:24}),value:booksCompleted,label:"Libros Completados",colorClass:"text-green-500"}),jsxRuntimeExports.jsx(StatCard,{icon:jsxRuntimeExports.jsx(Clock,{size:24}),value:`${Math.floor(totalTimeAllTime/60)}h ${totalTimeAllTime%60}m`,label:"Tiempo Total",colorClass:"text-teal-500"})]}),jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 sm:gap-8 items-center",children:[jsxRuntimeExports.jsxs("div",{className:"lg:col-span-2",children:[jsxRuntimeExports.jsx("h4",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 mb-4",children:"Actividad de la Última Semana"}),jsxRuntimeExports.jsx("div",{className:"grid grid-cols-7 gap-1 sm:gap-2 p-2 sm:p-4 bg-slate-50 dark:bg-slate-900/50 rounded-lg",children:lastSevenDays.map(day=>{const dayString=format(day,"yyyy-MM-dd"),snapshot=snapshotsMap.get(dayString);return jsxRuntimeExports.jsx(CalendarDay,{day:day,isGoalMet:snapshot?.goalCompleted||!1,readingTime:snapshot?.readingTime||0},day.toISOString())})})]}),jsxRuntimeExports.jsxs("div",{className:"space-y-4",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-4 p-4 bg-slate-50 dark:bg-slate-700/50 rounded-lg border border-slate-200 dark:border-slate-700",children:[jsxRuntimeExports.jsx(Clock,{size:32,className:"text-teal-500 flex-shrink-0"}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:[weeklyReport.totalTimeReadMinutes," min"]}),jsxRuntimeExports.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300",children:"Tiempo esta semana"})]})]}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-4 p-4 bg-slate-50 dark:bg-slate-700/50 rounded-lg border border-slate-200 dark:border-slate-700",children:[jsxRuntimeExports.jsx(BarChart2,{size:32,className:"text-purple-500 flex-shrink-0"}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:weeklyReport.averageWPM||"N/A"}),jsxRuntimeExports.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300",children:"Velocidad (PPM)"})]})]})]})]}),jsxRuntimeExports.jsxs("div",{className:"mt-10",children:[jsxRuntimeExports.jsx("h4",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 mb-4",children:"Actividad de Lectura (Últimos 30 días)"}),jsxRuntimeExports.jsx("div",{className:"h-64 w-full bg-slate-50 dark:bg-slate-900/50 rounded-lg p-4 border border-slate-200 dark:border-slate-700",children:jsxRuntimeExports.jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntimeExports.jsxs(BarChart,{data:last30DaysData,margin:{top:5,right:20,left
1:-10,bottom:5},children:[jsxRuntimeExports.jsx(CartesianGrid,{strokeDasharray:"3 3",stroke:"rgba(128, 128, 128, 0.2)"}),jsxRuntimeExports.jsx(XAxis,{dataKey:"date",tick:{fontSize:12,fill:"currentColor"}}),jsxRuntimeExports.jsx(YAxis,{unit:"m",tick:{fontSize:12,fill:"currentColor"}}),jsxRuntimeExports.jsx(Tooltip,{contentStyle:{backgroundColor:"rgba(255, 255, 255, 0.95)",backdropFilter:"blur(5px)",border:"1px solid #ccc",borderRadius:"8px"},labelStyle:{fontWeight:"bold"},formatter:value=>[`${value} min`,"Tiempo"]}),jsxRuntimeExports.jsx(Bar,{dataKey:"time",fill:"#14b8a6",radius:[4,4,0,0]})]})})})]}),jsxRuntimeExports.jsx("footer",{className:"mt-8 pt-6 border-t border-slate-200 dark:border-slate-700 text-center",children:jsxRuntimeExports.jsxs("button",{onClick:()=>navigate(`${basePath}/configuracion`),className:"inline-flex items-center justify-center gap-2 text-center bg-teal-500 hover:bg-teal-600 text-white font-semibold py-3 px-6 rounded-lg transition-colors shadow-lg hover:shadow-xl transform hover:-translate-y-0.5",children:[jsxRuntimeExports.jsx(Settings,{size:18})," Configurar mis Metas de Lectura"]})})]})}function VocabPieChart({stats:stats,userColors:userColors}){const{known:known,learning:learning,unknown:unknown}=stats,total=known+learning+unknown,data=[{name:"Conocidas",value:known},{name:"Reconocidas",value:learning},{name:"Desconocidas",value:unknown}].filter(entry=>entry.value>0),colorMap={Conocidas:"#22c55e",Reconocidas:"#f59e0b",Desconocidas:"#ef4444"};return 0===total?jsxRuntimeExports.jsxs("div",{className:"bg-white dark:bg-slate-800 p-4 md:p-6 rounded-xl shadow-lg border border-slate-200 dark:border-slate-700 h-full flex flex-col",children:[jsxRuntimeExports.jsx("h3",{className:"text-xl font-semibold text-gray-800 dark:text-gray-100 mb-4",children:"Distribución del Vocabulario"}),jsxRuntimeExports.jsx("div",{className:"flex-grow flex items-center justify-center",children:jsxRuntimeExports.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Aún no has marcado ninguna palabra."})})]}):jsxRuntimeExports.jsxs("div",{className:"bg-white dark:bg-slate-800 p-4 md:p-6 rounded-xl shadow-lg h-full flex flex-col",children:[jsxRuntimeExports.jsx("h3",{className:"text-xl font-semibold text-gray-800 dark:text-gray-100 mb-4",children:"Distribución del Vocabulario"}),jsxRuntimeExports.jsx("div",{className:"flex-grow w-full h-64",children:jsxRuntimeExports.jsx(ResponsiveContainer,{children:jsxRuntimeExports.jsxs(PieChart,{children:[jsxRuntimeExports.jsx(Pie,{data:data,cx:"50%",cy:"50%",labelLine:!1,outerRadius:"80%",fill:"#8884d8",dataKey:"value",label:({name:name,percent:percent})=>`${(100*percent).toFixed(0)}%`,children:data.map((entry,index)=>jsxRuntimeExports.jsx(Cell,{fill:colorMap[entry.name]},`cell-${index}`))}),jsxRuntimeExports.jsx(Tooltip,{formatter:(value,name)=>[`${value} palabras`,name]}),jsxRuntimeExports.jsx(Legend,{wrapperStyle:{fontSize:"12px",paddingTop:"10px"},formatter:value=>jsxRuntimeExports.jsx("span",{style:{color:"var(--text-color)"},children:value})})]})})})]})}const generateSampleData=()=>{const data=[],today=new Date;for(let i=13;i>=0;i--){const date=new Date(today);date.setDate(today.getDate()-i);const day=date.getDate(),month=date.getMonth()+1;data.push({date:`${day}/${month}`,Desconocidas:Math.floor(20*Math.random())+10,Reconocidas:Math.floor(15*Math.random())+5,Conocidas:Math.floor(30*Math.random())+15})}return data};function HistoryChart({data:data,isLoading:isLoading,userColors:userColors}){if(isLoading)return jsxRuntimeExports.jsx("div",{className:"flex items-center justify-center h-72",children:jsxRuntimeExports.jsx(LoaderCircle,{className:"animate-spin text-gray-400",size:32})});const chartData=data&&data.length>0?data.map(d=>({date:new Date(1e3*d.date.seconds).toLocaleDateString("es-ES",{day:"numeric",month:"numeric"}),Desconocidas:d.unknown,Reconocidas:d.learning,Conocidas:d.known})):[],noData=0===chartData.length;return jsxRuntimeExports.jsxs("div",{className:"h-80 relative bg-white dark:bg-slate-800 p-4 rounded-xl shadow-lg border border-slate-200 dark:border-slate-700",children:[noData&&jsxRuntimeExports.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center z-10",children:[jsxRuntimeExports.jsxs("div",{className:"bg-blue-50 dark:bg-blue-900/30 p-4 rounded-lg flex items-center gap-3 border border-blue-200 dark:border-blue-700",children:[jsxRuntimeExports.jsx(Info,{size:20,className:"text-blue-500 dark:text-blue-400 flex-shrink-0"}),jsxRuntimeExports.jsx("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Previsualización. Tu progreso real aparecerá aquí tras tu primer día."})]}),jsxRuntimeExports.jsx("div",{className:"w-full h-full absolute inset-0 opacity-50",children:jsxRuntimeExports.jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntimeExports.jsxs(BarChart,{data:generateSampleData(),margin:{top:20,right:30,left:0,bottom:5},children:[jsxRuntimeExports.jsx(CartesianGrid,{strokeDasharray:"3 3",vertical:!1,stroke:"rgba(128, 128, 128, 0.1)"}),jsxRuntimeExports.jsx(XAxis,{dataKey:"date",tick:{fontSize:12}}),jsxRuntimeExports.jsx(YAxis,{tick:{fontSize:12}}),jsxRuntimeExports.jsx(Bar,{dataKey:"Desconocidas",stackId:"a",fill:"#ef4444",radiu
1s:[4,4,0,0]}),jsxRuntimeExports.jsx(Bar,{dataKey:"Reconocidas",stackId:"a",fill:"#f59e0b"}),jsxRuntimeExports.jsx(Bar,{dataKey:"Conocidas",stackId:"a",fill:"#22c55e",radius:[4,4,0,0]})]})})})]}),!noData&&jsxRuntimeExports.jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntimeExports.jsxs(BarChart,{data:chartData,margin:{top:20,right:30,left:0,bottom:5},children:[jsxRuntimeExports.jsx(CartesianGrid,{strokeDasharray:"3 3",vertical:!1,stroke:"rgba(128, 128, 128, 0.1)"}),jsxRuntimeExports.jsx(XAxis,{dataKey:"date",tick:{fontSize:12,fill:"currentColor"}}),jsxRuntimeExports.jsx(YAxis,{tick:{fontSize:12,fill:"currentColor"}}),jsxRuntimeExports.jsx(Tooltip,{contentStyle:{backgroundColor:"rgba(255, 255, 255, 0.8)",backdropFilter:"blur(4px)",border:"1px solid #ccc",borderRadius:"8px",fontSize:"12px"},cursor:{fill:"rgba(200, 200, 200, 0.1)"}}),jsxRuntimeExports.jsx(Legend,{wrapperStyle:{fontSize:"12px"}}),jsxRuntimeExports.jsx(Bar,{dataKey:"Desconocidas",stackId:"a",fill:"#ef4444",name:"Desconocidas",radius:[0,0,4,4]}),jsxRuntimeExports.jsx(Bar,{dataKey:"Reconocidas",stackId:"a",fill:"#f59e0b",name:"Reconocidas"}),jsxRuntimeExports.jsx(Bar,{dataKey:"Conocidas",stackId:"a",fill:"#22c55e",name:"Conocidas",radius:[4,4,0,0]})]})})]})}const LEARNING_STATUSES=new Set([String(STATUS_LEARNING_1),String(STATUS_LEARNING_2),String(STATUS_LEARNING_3)]);function VocabularyBreakdownSection({userProfile:userProfile,activeLanguage:activeLanguage}){const{t:t}=useTranslation(),{userId:userId}
1=useAuth(),{words:contextWords,isLoadingWords:isLoadingWords}=useWords(),[historyData,setHistoryData]=reactExports.useState([]),[isLoadingHistory,setIsLoadingHistory]=reactExports.useState(!0),userColors=reactExports.useMemo(()=>({...DEFAULT_SETTINGS,...userProfile?.settings}),[userProfile]),wordStats=reactExports.useMemo(()=>{let known=0,learning=0,unknown=0,total=0;return(contextWords||[]).forEach(word=>{if(!word||word.isVirtual)return;const status=null!=word.status?String(word.status):"";status!==String(STATUS_IGNORED)&&(total+=1,status===String(STATUS_KNOWN)?known+=1:LEARNING_STATUSES.has(status)?learning+=1:status===String(STATUS_UNKNOWN)&&(unknown+=1))}),{known:known,learning:learning,unknown:unknown,total:total}},[contextWords]);return reactExports.useEffect(()=>{if(!userId)return void setIsLoadingHistory(!1);let cancelled=!1;const SESSION_KEY=function(userId){return`abantra_daily_snapshots_${userId}`}(userId);return(async()=>{try{const raw=sessionStorage.getItem(SESSION_KEY);if(raw){const{data:data,savedAt:savedAt}=JSON.parse(raw);if(Date.now()-savedAt<36e5)return void(cancelled||(setHistoryData(data),setIsLoadingHistory(!1)))}}catch(_){}cancelled||setIsLoadingHistory(!0);try{const historyPath=`users/${userId}/dailySnapshots`,snapshot=await getDocs(query(collection(db,historyPath),orderBy("date","desc"),limit(14)));if(cancelled)return;const data=snapshot.docs.map(d=>d.data()).reverse();setHistoryData(data);try{sessionStorage.setItem(SESSION_KEY,JSON.stringify({data:data,savedAt:Date.now()}))}catch(_){}}catch(error){console.error("Error al cargar historial de vocabulario:",error)}finally{cancelled||setIsLoadingHistory(!1)}})(),()=>{cancelled=!0}},[userId]),isLoadingWords?jsxRuntimeExports.jsxs("div",{className:"bg-white dark:bg-slate-800 p-6 rounded-xl shadow-lg flex justify-center items-center border border-slate-200 dark:border-slate-700",children:[jsxRuntimeExports.jsx(LoaderCircle,{className:"animate-spin mr-3 text-teal-500"})," ",t("stats.vocabulary.loadingData")]}):jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-5 gap-6",children:[jsxRuntimeExports.jsx("div",{className:"lg:col-span-2",children:jsxRuntimeExports.jsx(VocabPieChart,{stats:wordStats,userColors:userColors})}),jsxRuntimeExports.jsxs("div",{className:"lg:col-span-3 bg-white dark:bg-slate-800 p-6 rounded-xl shadow-lg border border-slate-200 dark:border-slate-700",children:[jsxRuntimeExports.jsx("h3",{className:"text-xl font-semibold mb-4 text-gray-900 dark:text-gray-100",children:t("stats.vocabulary.history")}),jsxRuntimeExports.jsx(HistoryChart,{data:historyData,isLoading:isLoadingHistory,userColors:userColors})]})]})}const AchievementCard=({achievement:achievement,isUnlocked:isUnlocked})=>{const{t:t}=useTranslation();isUnlocked&&achievement.unlockedAt&&new Date(1e3*achievement.unlockedAt.seconds);const name=achievement.nameKey?t(achievement.nameKey):achievement.name,description=achievement.descKey?t(achievement.descKey):achievement.description;return jsxRuntimeExports.jsxs("div",{className:"flex flex-col text-center p-4 rounded-xl border-2 transition-all duration-300 h-full\n                "+(isUnlocked?"bg-amber-50 dark:bg-amber-900/40 border-amber-300 dark:border-amber-700 shadow-lg":"bg-slate-50 dark:bg-slate-800/50 border-transparent"),children:[jsxRuntimeExports.jsx("div",{className:"text-4xl mx-auto mb-3 transition-transform duration-300 "+(isUnlocked?"transform scale-110":"grayscale opacity-60"),children:achievement.icon}),jsxRuntimeExports.jsx("h4",{className:"font-bold text-sm mb-1 "+(isUnlocked?"text-amber-800 dark:text-amber-200":"text-slate-700 dark:text-slate-300"),children:name}),jsxRuntimeExports.jsx("p",{className:"text-xs mt-1 flex-grow px-2 "+(isUnlocked?"text-amber-700/80 dark:text-amber-300/80":"text-slate-500 dark:text-slate-400"),children:description}),isUnlocked?jsxRuntimeExports.jsxs("div",{className:"mt-3 flex items-center justify-center gap-1 text-xs font-semibold text-green-600 dark:text-green-400",children:[jsxRuntimeExports.jsx(CircleCheckBig,{size:14}),jsxRuntimeExports.jsx("span",{children:"Desbloqueado"})]}):jsxRuntimeExports.jsxs("div",{className:"mt-3 w-full",children:[jsxRuntimeExports.jsx("div",{className:"w-full bg-slate-200 dark:bg-slate-600 rounded-full h-1.5 mb-1",children:jsxRuntimeExports.jsx("div",{className:"bg-amber-400 h-1.5 rounded-full",style:{width:`${achievement.progress}%`}})}),jsxRuntimeExports.jsxs("p",{className:"text-[10px] font-mono text-slate-500 dark:text-slate-400",children:[achievement.currentValue," / ",achievement.targetValue]})]})]})};function AchievementsGallery({userProfile:userProfile}){const{words:words}=useWords(),allAchievements=calculateAchievementsStatus(userProfile,ACHIEVEMENTS_CONFIG),unlockedAchievements=allAchievements.filter(ach=>ach.isUnlocked);return jsxRuntimeExports.jsxs("section",{children:[jsxRuntimeExports.jsx("h2",{className:"text-2xl font-bold mb-4 text-gray-900 dark:text-gray-100",children:"Galería de Logros"}),jsxRuntimeExports.jsxs("div",{className:"bg-white dark:bg-slate-800 p-6 rounded-2xl shadow-lg border border-slate-200 dark:border-slate-700",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3 mb-6 p-4 bg-slate-50 dark:bg-slate-900/50 rounded-lg border border-slate-200 dark:border-slate-700",children:[jsxRuntimeExports.jsx(Award,{size:24,className:"text-amber-500"}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:"Tu Medallero"}),jsxRuntimeExports.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-300",children:["Has desbloqueado ",unlockedAchievements.length," de ",allAchievements.length," logros. ¡Sigue así!"]})]})]}),jsxRuntimeExports.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:allAchievements.map(achievement=>jsxRuntimeExports.jsx(AchievementCard,{achievement:achievement,isUnlocked:achievement.isUnlocked}
1,achievement.id))})]})]})}function EstadisticasPage(){const{t:t}=useTranslation(),{userProfile:userProfile}=useAuth();if(!userProfile)return jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center justify-center py-20 text-center",children:[jsxRuntimeExports.jsx(LoaderCircle,{className:"animate-spin h-10 w-10 text-teal-500 mb-4"}),jsxRuntimeExports.jsx("p",{className:"text-lg font-semibold text-gray-700 dark:text-gray-300",children:t("stats.loading.title")}),jsxRuntimeExports.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:t("stats.loading.subtitle")})]});const activeLanguage=userProfile?.activeLanguage||"en",activeLanguageName=userProfile?.languagesList?.find(l=>l.code===activeLanguage)?.name||activeLanguage;return jsxRuntimeExports.jsxs("div",{className:"space-y-10",children:[jsxRuntimeExports.jsx(StatsHeader,{displayName:userProfile.displayName,languageName:activeLanguageName}),jsxRuntimeExports.jsx(GeneralProgressSection,{userProfile:userProfile,activeLanguage:activeLanguage}),jsxRuntimeExports.jsx(ReadingProgressHub,{userProfile:userProfile}),jsxRuntimeExports.jsx(VocabularyBreakdownSection,{userProfile:userProfile,activeLanguage:activeLanguage}),jsxRuntimeExports.jsx(AchievementsGallery,{userProfile:userProfile})]})}export{EstadisticasPage as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.