lms/public/build/assets/index-asnXGOd8.js
2025-12-15 12:26:23 +01:00

5 lines
30 KiB
JavaScript

import{y as m,bo as Fe,r as oe,cz as et,bV as tt,j as l,H as rt,bW as nt,bb as it,cA as at,be as ot,cB as st,L as ct,bY as lt,bZ as ut,b_ as ft,b$ as pt}from"./vendor-BKmmeuxg.js";import{T as dt}from"./table-header-DVkEnG6Y.js";import{B as mt}from"./button-BpNwv2aE.js";import{C as de}from"./card-D9_SJYq6.js";import{T as vt,a as ht,b as Pe,c as je}from"./table-DWOXv4Pu.js";import{D as yt}from"./layout-DkwBWm5d.js";import{b as N,c as gt}from"./utils-DxSsnXxD.js";import bt from"./payouts-table-columns-D8iLZUfs.js";import xt from"./request-table-columns-BwXCUZf8.js";import{f as O,r as Ke,a as At,b as Ve,c as Ot,i as D,T as ge,p as T,L as _,g as qe,d as be,e as ze,D as Pt,C as jt,h as z,j as F,S as kt,k as _t,l as ke,m as wt,n as K,o as St,u as Tt,G as Rt,q as te,s as Et,t as We,v as Nt,w as ee,x as _e,y as It,z as Lt,R as we,A as $t,B as Dt,E as Ct}from"./revenue-chart-CoUDa3Pt.js";import"./index-WW_1X1qx.js";import"./sidebar-BYcYxQeZ.js";import"./separator-_3LZ_wAA.js";import"./sheet-DSvHVmaW.js";import"./tooltip-BsX7Z6vz.js";import"./main-_V386djS.js";import"./index-D9-QKOod.js";import"./appearance-D2z3xcjR.js";import"./dropdown-menu-DO-po5c1.js";import"./app-BytVvUs_.js";/* empty css */import"./language-BFZ7KItL.js";import"./notification-CYMPYbAP.js";import"./popover-B4kBsMuI.js";import"./scroll-area-C8HGru-R.js";import"./app-logo-CmnEIwal.js";import"./accordion-CNBvFN43.js";import"./route-B4ZMN77y.js";import"./avatar-j28afJTV.js";import"./use-lang-YfV87_zl.js";var Bt=["points","className","baseLinePoints","connectNulls"];function V(){return V=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},V.apply(this,arguments)}function Mt(r,e){if(r==null)return{};var n=Ft(r,e),t,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(i=0;i<o.length;i++)t=o[i],!(e.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(r,t)&&(n[t]=r[t])}return n}function Ft(r,e){if(r==null)return{};var n={};for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t)){if(e.indexOf(t)>=0)continue;n[t]=r[t]}return n}function Se(r){return zt(r)||qt(r)||Vt(r)||Kt()}function Kt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vt(r,e){if(r){if(typeof r=="string")return me(r,e);var n=Object.prototype.toString.call(r).slice(8,-1);if(n==="Object"&&r.constructor&&(n=r.constructor.name),n==="Map"||n==="Set")return Array.from(r);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return me(r,e)}}function qt(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function zt(r){if(Array.isArray(r))return me(r)}function me(r,e){(e==null||e>r.length)&&(e=r.length);for(var n=0,t=new Array(e);n<e;n++)t[n]=r[n];return t}var Te=function(e){return e&&e.x===+e.x&&e.y===+e.y},Wt=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return e.forEach(function(t){Te(t)?n[n.length-1].push(t):n[n.length-1].length>0&&n.push([])}),Te(e[0])&&n[n.length-1].push(e[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},Y=function(e,n){var t=Wt(e);n&&(t=[t.reduce(function(o,a){return[].concat(Se(o),Se(a))},[])]);var i=t.map(function(o){return o.reduce(function(a,u,c){return"".concat(a).concat(c===0?"M":"L").concat(u.x,",").concat(u.y)},"")}).join("");return t.length===1?"".concat(i,"Z"):i},Ht=function(e,n,t){var i=Y(e,t);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(Y(n.reverse(),t).slice(1))},Ut=function(e){var n=e.points,t=e.className,i=e.baseLinePoints,o=e.connectNulls,a=Mt(e,Bt);if(!n||!n.length)return null;var u=N("recharts-polygon",t);if(i&&i.length){var c=a.stroke&&a.stroke!=="none",s=Ht(n,i,o);return m.createElement("g",{className:u},m.createElement("path",V({},O(a,!0),{fill:s.slice(-1)==="Z"?a.fill:"none",stroke:"none",d:s})),c?m.createElement("path",V({},O(a,!0),{fill:"none",d:Y(n,o)})):null,c?m.createElement("path",V({},O(a,!0),{fill:"none",d:Y(i,o)})):null)}var p=Y(n,o);return m.createElement("path",V({},O(a,!0),{fill:p.slice(-1)==="Z"?a.fill:"none",className:u,d:p}))},fe,Re;function Zt(){if(Re)return fe;Re=1;var r=Ke(),e=At(),n=Ve();function t(i,o){return i&&i.length?r(i,n(o,2),e):void 0}return fe=t,fe}var Gt=Zt();const Yt=Fe(Gt);var pe,Ee;function Jt(){if(Ee)return pe;Ee=1;var r=Ke(),e=Ve(),n=Ot();function t(i,o){return i&&i.length?r(i,e(o,2),n):void 0}return pe=t,pe}var Qt=Jt();const Xt=Fe(Qt);var er=["cx","cy","angle","ticks","axisLine"],tr=["ticks","tick","angle","tickFormatter","stroke"];function W(r){"@babel/helpers - typeof";return W=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},W(r)}function J(){return J=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},J.apply(this,arguments)}function Ne(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),n.push.apply(n,t)}return n}function L(r){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ne(Object(n),!0).forEach(function(t){se(r,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Ne(Object(n)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(n,t))})}return r}function Ie(r,e){if(r==null)return{};var n=rr(r,e),t,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(i=0;i<o.length;i++)t=o[i],!(e.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(r,t)&&(n[t]=r[t])}return n}function rr(r,e){if(r==null)return{};var n={};for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t)){if(e.indexOf(t)>=0)continue;n[t]=r[t]}return n}function nr(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Le(r,e){for(var n=0;n<e.length;n++){var t=e[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,Ue(t.key),t)}}function ir(r,e,n){return e&&Le(r.prototype,e),n&&Le(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}function ar(r,e,n){return e=ne(e),or(r,He()?Reflect.construct(e,n||[],ne(r).constructor):e.apply(r,n))}function or(r,e){if(e&&(W(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sr(r)}function sr(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function He(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(He=function(){return!!r})()}function ne(r){return ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ne(r)}function cr(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&ve(r,e)}function ve(r,e){return ve=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},ve(r,e)}function se(r,e,n){return e=Ue(e),e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function Ue(r){var e=lr(r,"string");return W(e)=="symbol"?e:e+""}function lr(r,e){if(W(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var t=n.call(r,e);if(W(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var ce=(function(r){function e(){return nr(this,e),ar(this,e,arguments)}return cr(e,r),ir(e,[{key:"getTickValueCoord",value:function(t){var i=t.coordinate,o=this.props,a=o.angle,u=o.cx,c=o.cy;return T(u,c,i,a)}},{key:"getTickTextAnchor",value:function(){var t=this.props.orientation,i;switch(t){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var t=this.props,i=t.cx,o=t.cy,a=t.angle,u=t.ticks,c=Yt(u,function(p){return p.coordinate||0}),s=Xt(u,function(p){return p.coordinate||0});return{cx:i,cy:o,startAngle:a,endAngle:a,innerRadius:s.coordinate||0,outerRadius:c.coordinate||0}}},{key:"renderAxisLine",value:function(){var t=this.props,i=t.cx,o=t.cy,a=t.angle,u=t.ticks,c=t.axisLine,s=Ie(t,er),p=u.reduce(function(d,f){return[Math.min(d[0],f.coordinate),Math.max(d[1],f.coordinate)]},[1/0,-1/0]),v=T(i,o,p[0],a),y=T(i,o,p[1],a),g=L(L(L({},O(s,!1)),{},{fill:"none"},O(c,!1)),{},{x1:v.x,y1:v.y,x2:y.x,y2:y.y});return m.createElement("line",J({className:"recharts-polar-radius-axis-line"},g))}},{key:"renderTicks",value:function(){var t=this,i=this.props,o=i.ticks,a=i.tick,u=i.angle,c=i.tickFormatter,s=i.stroke,p=Ie(i,tr),v=this.getTickTextAnchor(),y=O(p,!1),g=O(a,!1),d=o.map(function(f,b){var x=t.getTickValueCoord(f),A=L(L(L(L({textAnchor:v,transform:"rotate(".concat(90-u,", ").concat(x.x,", ").concat(x.y,")")},y),{},{stroke:"none",fill:s},g),{},{index:b},x),{},{payload:f});return m.createElement(_,J({className:N("recharts-polar-radius-axis-tick",qe(a)),key:"tick-".concat(f.coordinate)},be(t.props,f,b)),e.renderTickItem(a,A,c?c(f.value,b):f.value))});return m.createElement(_,{className:"recharts-polar-radius-axis-ticks"},d)}},{key:"render",value:function(){var t=this.props,i=t.ticks,o=t.axisLine,a=t.tick;return!i||!i.length?null:m.createElement(_,{className:N("recharts-polar-radius-axis",this.props.className)},o&&this.renderAxisLine(),a&&this.renderTicks(),ze.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(t,i,o){var a;return m.isValidElement(t)?a=m.cloneElement(t,i):D(t)?a=t(i):a=m.createElement(ge,J({},i,{className:"recharts-polar-radius-axis-tick-value"}),o),a}}])})(oe.PureComponent);se(ce,"displayName","PolarRadiusAxis");se(ce,"axisType","radiusAxis");se(ce,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function H(r){"@babel/helpers - typeof";return H=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},H(r)}function C(){return C=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},C.apply(this,arguments)}function $e(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),n.push.apply(n,t)}return n}function $(r){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?$e(Object(n),!0).forEach(function(t){le(r,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):$e(Object(n)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(n,t))})}return r}function ur(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function De(r,e){for(var n=0;n<e.length;n++){var t=e[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,Ge(t.key),t)}}function fr(r,e,n){return e&&De(r.prototype,e),n&&De(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}function pr(r,e,n){return e=ie(e),dr(r,Ze()?Reflect.construct(e,n||[],ie(r).constructor):e.apply(r,n))}function dr(r,e){if(e&&(H(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mr(r)}function mr(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Ze(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ze=function(){return!!r})()}function ie(r){return ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ie(r)}function vr(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&he(r,e)}function he(r,e){return he=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},he(r,e)}function le(r,e,n){return e=Ge(e),e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function Ge(r){var e=hr(r,"string");return H(e)=="symbol"?e:e+""}function hr(r,e){if(H(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var t=n.call(r,e);if(H(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var yr=Math.PI/180,Ce=1e-5,ue=(function(r){function e(){return ur(this,e),pr(this,e,arguments)}return vr(e,r),fr(e,[{key:"getTickLineCoord",value:function(t){var i=this.props,o=i.cx,a=i.cy,u=i.radius,c=i.orientation,s=i.tickSize,p=s||8,v=T(o,a,u,t.coordinate),y=T(o,a,u+(c==="inner"?-1:1)*p,t.coordinate);return{x1:v.x,y1:v.y,x2:y.x,y2:y.y}}},{key:"getTickTextAnchor",value:function(t){var i=this.props.orientation,o=Math.cos(-t.coordinate*yr),a;return o>Ce?a=i==="outer"?"start":"end":o<-Ce?a=i==="outer"?"end":"start":a="middle",a}},{key:"renderAxisLine",value:function(){var t=this.props,i=t.cx,o=t.cy,a=t.radius,u=t.axisLine,c=t.axisLineType,s=$($({},O(this.props,!1)),{},{fill:"none"},O(u,!1));if(c==="circle")return m.createElement(Pt,C({className:"recharts-polar-angle-axis-line"},s,{cx:i,cy:o,r:a}));var p=this.props.ticks,v=p.map(function(y){return T(i,o,a,y.coordinate)});return m.createElement(Ut,C({className:"recharts-polar-angle-axis-line"},s,{points:v}))}},{key:"renderTicks",value:function(){var t=this,i=this.props,o=i.ticks,a=i.tick,u=i.tickLine,c=i.tickFormatter,s=i.stroke,p=O(this.props,!1),v=O(a,!1),y=$($({},p),{},{fill:"none"},O(u,!1)),g=o.map(function(d,f){var b=t.getTickLineCoord(d),x=t.getTickTextAnchor(d),A=$($($({textAnchor:x},p),{},{stroke:"none",fill:s},v),{},{index:f,payload:d,x:b.x2,y:b.y2});return m.createElement(_,C({className:N("recharts-polar-angle-axis-tick",qe(a)),key:"tick-".concat(d.coordinate)},be(t.props,d,f)),u&&m.createElement("line",C({className:"recharts-polar-angle-axis-tick-line"},y,b)),a&&e.renderTickItem(a,A,c?c(d.value,f):d.value))});return m.createElement(_,{className:"recharts-polar-angle-axis-ticks"},g)}},{key:"render",value:function(){var t=this.props,i=t.ticks,o=t.radius,a=t.axisLine;return o<=0||!i||!i.length?null:m.createElement(_,{className:N("recharts-polar-angle-axis",this.props.className)},a&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(t,i,o){var a;return m.isValidElement(t)?a=m.cloneElement(t,i):D(t)?a=t(i):a=m.createElement(ge,C({},i,{className:"recharts-polar-angle-axis-tick-value"}),o),a}}])})(oe.PureComponent);le(ue,"displayName","PolarAngleAxis");le(ue,"axisType","angleAxis");le(ue,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var re;function U(r){"@babel/helpers - typeof";return U=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U(r)}function q(){return q=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},q.apply(this,arguments)}function Be(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),n.push.apply(n,t)}return n}function h(r){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Be(Object(n),!0).forEach(function(t){j(r,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Be(Object(n)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(n,t))})}return r}function gr(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Me(r,e){for(var n=0;n<e.length;n++){var t=e[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,Je(t.key),t)}}function br(r,e,n){return e&&Me(r.prototype,e),n&&Me(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}function xr(r,e,n){return e=ae(e),Ar(r,Ye()?Reflect.construct(e,n||[],ae(r).constructor):e.apply(r,n))}function Ar(r,e){if(e&&(U(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Or(r)}function Or(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Ye(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ye=function(){return!!r})()}function ae(r){return ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ae(r)}function Pr(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&ye(r,e)}function ye(r,e){return ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},ye(r,e)}function j(r,e,n){return e=Je(e),e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function Je(r){var e=jr(r,"string");return U(e)=="symbol"?e:e+""}function jr(r,e){if(U(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var t=n.call(r,e);if(U(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var R=(function(r){function e(n){var t;return gr(this,e),t=xr(this,e,[n]),j(t,"pieRef",null),j(t,"sectorRefs",[]),j(t,"id",Tt("recharts-pie-")),j(t,"handleAnimationEnd",function(){var i=t.props.onAnimationEnd;t.setState({isAnimationFinished:!0}),D(i)&&i()}),j(t,"handleAnimationStart",function(){var i=t.props.onAnimationStart;t.setState({isAnimationFinished:!1}),D(i)&&i()}),t.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},t}return Pr(e,r),br(e,[{key:"isActiveIndex",value:function(t){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(t)!==-1:t===i}},{key:"hasActiveIndex",value:function(){var t=this.props.activeIndex;return Array.isArray(t)?t.length!==0:t||t===0}},{key:"renderLabels",value:function(t){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var o=this.props,a=o.label,u=o.labelLine,c=o.dataKey,s=o.valueKey,p=O(this.props,!1),v=O(a,!1),y=O(u,!1),g=a&&a.offsetRadius||20,d=t.map(function(f,b){var x=(f.startAngle+f.endAngle)/2,A=T(f.cx,f.cy,f.outerRadius+g,x),k=h(h(h(h({},p),f),{},{stroke:"none"},v),{},{index:b,textAnchor:e.getTextAnchor(A.x,f.cx)},A),B=h(h(h(h({},p),f),{},{fill:"none",stroke:f.fill},y),{},{index:b,points:[T(f.cx,f.cy,f.outerRadius,x),A]}),w=c;return z(c)&&z(s)?w="value":z(c)&&(w=s),m.createElement(_,{key:"label-".concat(f.startAngle,"-").concat(f.endAngle,"-").concat(f.midAngle,"-").concat(b)},u&&e.renderLabelLineItem(u,B,"line"),e.renderLabelItem(a,k,F(f,w)))});return m.createElement(_,{className:"recharts-pie-labels"},d)}},{key:"renderSectorsStatically",value:function(t){var i=this,o=this.props,a=o.activeShape,u=o.blendStroke,c=o.inactiveShape;return t.map(function(s,p){if((s==null?void 0:s.startAngle)===0&&(s==null?void 0:s.endAngle)===0&&t.length!==1)return null;var v=i.isActiveIndex(p),y=c&&i.hasActiveIndex()?c:null,g=v?a:y,d=h(h({},s),{},{stroke:u?s.fill:s.stroke,tabIndex:-1});return m.createElement(_,q({ref:function(b){b&&!i.sectorRefs.includes(b)&&i.sectorRefs.push(b)},tabIndex:-1,className:"recharts-pie-sector"},be(i.props,s,p),{key:"sector-".concat(s==null?void 0:s.startAngle,"-").concat(s==null?void 0:s.endAngle,"-").concat(s.midAngle,"-").concat(p)}),m.createElement(kt,q({option:g,isActive:v,shapeType:"sector"},d)))})}},{key:"renderSectorsWithAnimation",value:function(){var t=this,i=this.props,o=i.sectors,a=i.isAnimationActive,u=i.animationBegin,c=i.animationDuration,s=i.animationEasing,p=i.animationId,v=this.state,y=v.prevSectors,g=v.prevIsAnimationActive;return m.createElement(et,{begin:u,duration:c,isActive:a,easing:s,from:{t:0},to:{t:1},key:"pie-".concat(p,"-").concat(g),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(d){var f=d.t,b=[],x=o&&o[0],A=x.startAngle;return o.forEach(function(k,B){var w=y&&y[B],I=B>0?_t(k,"paddingAngle",0):0;if(w){var Z=ke(w.endAngle-w.startAngle,k.endAngle-k.startAngle),P=h(h({},k),{},{startAngle:A+I,endAngle:A+Z(f)+I});b.push(P),A=P.endAngle}else{var M=k.endAngle,S=k.startAngle,Q=ke(0,M-S),X=Q(f),E=h(h({},k),{},{startAngle:A+I,endAngle:A+X+I});b.push(E),A=E.endAngle}}),m.createElement(_,null,t.renderSectorsStatically(b))})}},{key:"attachKeyboardHandlers",value:function(t){var i=this;t.onkeydown=function(o){if(!o.altKey)switch(o.key){case"ArrowLeft":{var a=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[a].focus(),i.setState({sectorToFocus:a});break}case"ArrowRight":{var u=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[u].focus(),i.setState({sectorToFocus:u});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var t=this.props,i=t.sectors,o=t.isAnimationActive,a=this.state.prevSectors;return o&&i&&i.length&&(!a||!wt(a,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var t=this,i=this.props,o=i.hide,a=i.sectors,u=i.className,c=i.label,s=i.cx,p=i.cy,v=i.innerRadius,y=i.outerRadius,g=i.isAnimationActive,d=this.state.isAnimationFinished;if(o||!a||!a.length||!K(s)||!K(p)||!K(v)||!K(y))return null;var f=N("recharts-pie",u);return m.createElement(_,{tabIndex:this.props.rootTabIndex,className:f,ref:function(x){t.pieRef=x}},this.renderSectors(),c&&this.renderLabels(a),ze.renderCallByParent(this.props,null,!1),(!g||d)&&St.renderCallByParent(this.props,a,!1))}}],[{key:"getDerivedStateFromProps",value:function(t,i){return i.prevIsAnimationActive!==t.isAnimationActive?{prevIsAnimationActive:t.isAnimationActive,prevAnimationId:t.animationId,curSectors:t.sectors,prevSectors:[],isAnimationFinished:!0}:t.isAnimationActive&&t.animationId!==i.prevAnimationId?{prevAnimationId:t.animationId,curSectors:t.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:t.sectors!==i.curSectors?{curSectors:t.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(t,i){return t>i?"start":t<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(t,i,o){if(m.isValidElement(t))return m.cloneElement(t,i);if(D(t))return t(i);var a=N("recharts-pie-label-line",typeof t!="boolean"?t.className:"");return m.createElement(jt,q({},i,{key:o,type:"linear",className:a}))}},{key:"renderLabelItem",value:function(t,i,o){if(m.isValidElement(t))return m.cloneElement(t,i);var a=o;if(D(t)&&(a=t(i),m.isValidElement(a)))return a;var u=N("recharts-pie-label-text",typeof t!="boolean"&&!D(t)?t.className:"");return m.createElement(ge,q({},i,{alignmentBaseline:"middle",className:u}),a)}}])})(oe.PureComponent);re=R;j(R,"displayName","Pie");j(R,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!Rt.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});j(R,"parseDeltaAngle",function(r,e){var n=te(e-r),t=Math.min(Math.abs(e-r),360);return n*t});j(R,"getRealPieData",function(r){var e=r.data,n=r.children,t=O(r,!1),i=Et(n,We);return e&&e.length?e.map(function(o,a){return h(h(h({payload:o},t),o),i&&i[a]&&i[a].props)}):i&&i.length?i.map(function(o){return h(h({},t),o.props)}):[]});j(R,"parseCoordinateOfPie",function(r,e){var n=e.top,t=e.left,i=e.width,o=e.height,a=Nt(i,o),u=t+ee(r.cx,i,i/2),c=n+ee(r.cy,o,o/2),s=ee(r.innerRadius,a,0),p=ee(r.outerRadius,a,a*.8),v=r.maxRadius||Math.sqrt(i*i+o*o)/2;return{cx:u,cy:c,innerRadius:s,outerRadius:p,maxRadius:v}});j(R,"getComposedData",function(r){var e=r.item,n=r.offset,t=e.type.defaultProps!==void 0?h(h({},e.type.defaultProps),e.props):e.props,i=re.getRealPieData(t);if(!i||!i.length)return null;var o=t.cornerRadius,a=t.startAngle,u=t.endAngle,c=t.paddingAngle,s=t.dataKey,p=t.nameKey,v=t.valueKey,y=t.tooltipType,g=Math.abs(t.minAngle),d=re.parseCoordinateOfPie(t,n),f=re.parseDeltaAngle(a,u),b=Math.abs(f),x=s;z(s)&&z(v)?(_e(!1,`Use "dataKey" to specify the value of pie,
the props "valueKey" will be deprecated in 1.1.0`),x="value"):z(s)&&(_e(!1,`Use "dataKey" to specify the value of pie,
the props "valueKey" will be deprecated in 1.1.0`),x=v);var A=i.filter(function(P){return F(P,x,0)!==0}).length,k=(b>=360?A:A-1)*c,B=b-A*g-k,w=i.reduce(function(P,M){var S=F(M,x,0);return P+(K(S)?S:0)},0),I;if(w>0){var Z;I=i.map(function(P,M){var S=F(P,x,0),Q=F(P,p,M),X=(K(S)?S:0)/w,E;M?E=Z.endAngle+te(f)*c*(S!==0?1:0):E=a;var xe=E+te(f)*((S!==0?g:0)+X*B),Ae=(E+xe)/2,Oe=(d.innerRadius+d.outerRadius)/2,Qe=[{name:Q,value:S,payload:P,dataKey:x,type:y}],Xe=T(d.cx,d.cy,Oe,Ae);return Z=h(h(h({percent:X,cornerRadius:o,name:Q,tooltipPayload:Qe,midAngle:Ae,middleRadius:Oe,tooltipPosition:Xe},P),d),{},{value:F(P,x),startAngle:E,endAngle:xe,payload:P,paddingAngle:te(f)*c}),Z})}return h(h({},d),{},{sectors:I,data:i})});var kr=It({chartName:"PieChart",GraphicalChild:R,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:ue},{axisType:"radiusAxis",AxisComp:ce}],formatAxisMap:Lt,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const _r=r=>{var y;const{auth:e,system:n,statistics:t,revenueData:i,courseStatusDistribution:o,pendingWithdrawals:a,translate:u}=r,{frontend:c}=u,s=e.user.role==="admin",p=oe.useMemo(()=>Object.entries(o).map(([g,d])=>({name:g,value:d})),[o]),v=tt({data:a,columns:s?xt(r.translate):bt(r.translate),getCoreRowModel:pt(),getSortedRowModel:ft(),getFilteredRowModel:ut()});return l.jsxs("div",{className:"space-y-7",children:[l.jsx(rt,{title:c.dashboard}),l.jsxs("div",{className:gt("grid grid-cols-1 gap-6 sm:grid-cols-2 md:grid-cols-3",s?"lg:grid-cols-5":"lg:grid-cols-4"),children:[l.jsx(G,{title:c.courses,value:t.courses,icon:l.jsx(nt,{className:"h-6 w-6 text-blue-500"})}),l.jsx(G,{title:c.lessons,value:t.lessons,icon:l.jsx(it,{className:"h-6 w-6 text-green-500"})}),l.jsx(G,{title:c.enrollment,value:t.enrollments,icon:l.jsx(at,{className:"h-6 w-6 text-amber-500"})}),l.jsx(G,{title:c.students,value:t.students,icon:l.jsx(ot,{className:"h-6 w-6 text-purple-500"})}),s&&l.jsx(G,{title:"Instructors",value:t.instructors,icon:l.jsx(st,{className:"h-6 w-6 text-rose-500"})})]}),n.sub_type==="collaborative"&&l.jsx(we,{}),l.jsxs("div",{className:"grid grid-cols-2 gap-6 lg:grid-cols-12",children:[l.jsxs(de,{className:"col-span-full p-6 lg:col-span-4",children:[l.jsx("h3",{className:"mb-4 text-lg font-medium",children:c.course_status}),l.jsx("div",{className:"flex items-center justify-center",children:l.jsx($t,{width:"100%",height:300,children:l.jsxs(kr,{children:[l.jsx(R,{data:p,cx:"50%",cy:"50%",innerRadius:0,outerRadius:80,fill:"#8884d8",dataKey:"value",paddingAngle:0,label:!1,children:p.map((g,d)=>l.jsx(We,{fill:["oklch(0.8 0.14 160.7)","oklch(0.75 0.145 160.7)","oklch(0.65 0.145 160.7)","oklch(0.55 0.14 160.7)","oklch(0.45 0.135 160.7)"][d%5]},`cell-${d}`))}),l.jsx(Dt,{layout:"horizontal",align:"center",verticalAlign:"bottom",iconType:"circle"}),l.jsx(Ct,{formatter:g=>[g,c.courses]})]})})})]}),n.sub_type==="collaborative"?l.jsxs(de,{className:"col-span-full lg:col-span-8",children:[l.jsxs("div",{className:"flex items-center justify-between gap-6 p-6",children:[l.jsx("h3",{className:"text-lg font-medium",children:c.latest_pending_withdrawal_request}),l.jsx(mt,{asChild:!0,variant:"outline",children:l.jsx(ct,{href:s?route("payouts.request.index"):route("payouts.index"),children:c.view_all})})]}),l.jsxs(vt,{className:"border-border border-y",children:[l.jsx(dt,{table:v}),l.jsx(ht,{children:(y=v.getRowModel().rows)!=null&&y.length?v.getRowModel().rows.map(g=>l.jsx(Pe,{"data-state":g.getIsSelected()&&"selected",children:g.getVisibleCells().map(d=>l.jsx(je,{children:lt(d.column.columnDef.cell,d.getContext())},d.id))},g.id)):l.jsx(Pe,{children:l.jsx(je,{className:"h-24 text-center",children:c.no_results})})})]})]}):l.jsx("div",{className:"col-span-full lg:col-span-8",children:l.jsx(we,{})})]})]})},G=({title:r,value:e,icon:n})=>l.jsx(de,{className:"p-4 sm:p-6",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-muted-foreground text-sm font-medium",children:r}),l.jsx("h4",{className:"mt-1 text-2xl font-semibold",children:e})]}),l.jsx("div",{className:"rounded-full bg-gray-100 p-3",children:n})]})});_r.layout=r=>l.jsx(yt,{children:r});export{_r as default};