1import{o as i,d as a,f as e,n as y,t as r,l as _,p as m,C as w,j as h,b as v,y as f,m as z,H as S,F as k,e as C,D as A,a as H,O as D,g as V,r as U,P as p}from"./vendor-BT_BAke6.js";import{S as T}from"./SuperAdminLayout-DUGaMTRO.js";import{_ as j,b as B}from"./app-BH2jH3fP.js";import"./ui-BJdZ1jTR.js";const L={name:"UsageWidget",data(){return{usage:null,loading:!0,error:null}},mounted(){this.fetchUsage(),this.interval=setInterval(()=>{this.fetchUsage()},3e5)},beforeUnmount(){this.interval&&clearInterval(this.interval)},methods:{async fetchUsage(){try{this.loading=!0,this.error=null;const o=await B.get("/api/reseller/usage/current");o.data.success?this.usage=o.data.data:this.error=o.data.message||"Failed to fetch usage data"}catch(o){this.error="Error loading usage data",console.error("Error fetching usage:",o)}finally{this.loading=!1}},refreshUsage(){this.fetchUsage()},getUsageColor(o){return o>=100?"text-red-600":o>=90?"text-orange-600":o>=75?"text-yellow-600":"text-green-600"},getUsageBarColor(o){return o>=100?"bg-red-500":o>=90?"bg-orange-500":o>=75?"bg-yellow-500":"bg-green-500"},formatDate(o){return o?new Date(o).toLocaleDateString("en-US",{month:"short",day:"numeric"}):""}}},R={class:"bg-white rounded-lg shadow-md p-6"},$={class:"flex items-center justify-between mb-4"},F=["disabled"],I={key:0,class:"animate-pulse"},N={key:1,class:"text-center py-8 text-gray-500"},O={key:2},E={class:"mb-6"},W={class:"flex justify-between mb-2"},P={class:"w-full bg-gray-200 rounded-full h-4 overflow-hidden"},G={key:0,class:"flex justify-between mt-1 text-xs text-gray-500"},Q={class:"grid grid-cols-2 gap-4 mb-4"},q={class:"bg-gray-50 rounded-lg p-3"},J={class:"text-2xl font-bold text-gray-800"},K={class:"bg-gray-50 rounded-lg p-3"},X={class:"text-2xl font-bold text-gray-800"},Y={class:"bg-gray-50 rounded-lg p-3"},Z={class:"text-2xl font-bold text-gray-800"},ee={class:"bg-gray-50 rounded-lg p-3"},te={class:"text-2xl font-bold text-gray-800"},se={key:0,class:"bg-yellow-50 border border-yellow-200 rounded-lg p-3"},oe={class:"flex items-start"},re={class:"text-xs text-yellow-700 mt-1"},le={key:0},ie={class:"mt-4 pt-4 border-t border-gray-200"},ne={class:"flex justify-between text-xs text-gray-500"},ae={key:3,class:"mt-4 bg-red-50 border border-red-200 rounded-lg p-3"},de={class:"text-sm text-red-800"};function ue(o,t,x,d,s,n){const l=f("router-link");return i(),a("div",R,[e("div",$,[t[2]||(t[2]=e("h3",{class:"text-lg font-semibold text-gray-800"},"Current Usage",-1)),e("button",{onClick:t[0]||(t[0]=(...u)=>n.refreshUsage&&n.refreshUsage(...u)),class:"text-blue-600 hover:text-blue-800",disabled:s.loading},[(i(),a("svg",{class:y(["w-5 h-5",{"animate-spin":s.loading}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...t[1]||(t[1]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])],2))],8,F)]),s.loading&&!s.usage?(i(),a("div",I,[...t[3]||(t[3]=[e("div",{class:"h-4 bg-gray-200 rounded w-3/4 mb-4"},null,-1),e("div",{class:"h-20 bg-gray-200 rounded mb-4"},null,-1),e("div",{class:"h-4 bg-gray-200 rounded w-1/2"},null,-1)])])):s.usage.has_active_period?(i(),a("div",O,[e("div",E,[e("div",W,[t[5]||(t[5]=e("span",{class:"text-sm text-gray-600"},"Usage This Period",-1)),e("span",{class:y(["text-sm font-semibold",n.getUsageColor(s.usage.usage_percentage)])},r(s.usage.usage_percentage.toFixed(1))+"% ",3)]),e("div",P,[e("div",{class:y(["h-full rounded-full transition-all duration-500",n.getUsageBarColor(s.usage.usage_percentage)]),style:_({width:Math.min(s.usage.usage_percentage,100)+"%"})},null,6)]),s.usage.is_unlimited?m("",!0):(i(),a("div",G,[e("span",null,r(s.usage.total_calls)+" calls",1),e("span",null,r(s.usage.monthly_minutes_limit)+" min limit",1)]))]),e("div",Q,[e("div",q,[t[6]||(t[6]=e("p",{class:"text-xs text-gray-500 mb-1"},"Total Calls",-1)),e("p",J,r(s.usage.total_calls),1)]),e("div",K,[t[7]||(t[7]=e("p",{class:"text-xs text-gray-500 mb-1"},"Duration",-1)),e("p",X,r(s.usage.total_duration_minutes)+"m",1)]),e("div",Y,[t[8]||(t[8]=e("p",{class:"text-xs text-gray-500 mb-1"},"Total Cost",-1)),e("p",Z,r(s.usage.formatted_total_cost),1)]),e("div",ee,[t[9]||(t[9]=e("p",{class:"text-xs text-gray-500 mb-1"},"Days Left",-1)),e("p",te,r(s.usage.days_remaining),1)])]),s.usage.total_overage>0?(i(),a("div",se,[e("div",oe,[t[11]||(t[11]=e("svg",{class:"w-5 h-5 text-yellow-600 mt-0.5 mr-2",fill:"
1currentColor",viewBox:"0 0 20 20"},[e("path",{"fill-rule":"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1)),e("div",null,[t[10]||(t[10]=e("p",{class:"text-sm font-semibold text-yellow-800"},"Pending Overage",-1)),e("p",re,[w(r(s.usage.formatted_overage_cost)+" overage ",1),s.usage.overage_status==="pending"?(i(),a("span",le," - Will be billed at $10")):m("",!0)])])])])):m("",!0),e("div",ie,[e("div",ne,[e("span",null,"Period: "+r(n.formatDate(s.usage.period_start))+" - "+r(n.formatDate(s.usage.period_end)),1),h(l,{to:"/super-admin/usage-reports",class:"text-blue-600 hover:text-blue-800"},{default:v(()=>[...t[12]||(t[12]=[w(" View History â ",-1)])]),_:1})])])])):(i(),a("div",N,[t[4]||(t[4]=e("svg",{class:"w-16 h-16 mx-auto mb-4 text-gray-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})],-1)),e("p",null,r(s.usage.message||"No active billing period"),1)])),s.error?(i(),a("div",ae,[e("p",de,r(s.error),1)])):m("",!0)])}const ce=j(L,[["render",ue]]),ge={name:"UsageHistoryChart",data(){return{history:null,loading:!0,error:null,limit:12,tooltip:{show:!1,index:null}}},computed:{maxCost(){return!this.history||!this.history.periods.length?0:Math.max(...this.history.periods.map(o=>o.cost+o.overage))}},mounted(){this.fetchHistory()},methods:{async fetchHistory(){try{this.loading=!0,this.error=null;const o=await B.get("/api/reseller/usage/history",{params:{limit:this.limit}});o.data.success?(this.history=o.data.data,this.history.periods=this.history.periods.reverse()):this.error=o.data.message||"Failed to fetch usage history"}catch(o){this.error="Error loading usage history",console.error("Error fetching history:",o)}finally{this.loading=!1}},getBarHeight(o,t){if(!t||!o)return"0px";const x=o/t*100;return`${Math.max(x,2)}%`},showTooltip(o,t){this.tooltip={show:!0,index:o,period:t}},hideTooltip(){this.tooltip.show=!1}}},me={class:"bg-white rounded-lg shadow-md p-6"},he={class:"flex items-center justify-between mb-6"},xe={key:0,class:"animate-pulse"},pe={class:"grid grid-cols-4 gap-4"},ve={key:1},fe={class:"mb-6"},ye={class:"flex items-end justify-between h-64 space-x-2"},be={class:"w-full flex flex-col justify-end",style:{height:"240px"}},we=["onMouseenter"],_e={class:"mt-2 text-xs text-gray-600 text-center transform -rotate-45 origin-left"},ke={key:0,class:"absolute bottom-full mb-2 left-1/2 transform -translate-x-1/2 bg-gray-900 text-white text-xs rounded-lg p-3 shadow-lg z-10 whitespace-nowrap"},Ce={class:"font-semibold mb-1"},je={class:"space-y-1"},Me={key:0,class:"text-red-300"},He={class:"grid grid-cols-2 md:grid-cols-4 gap-4 pt-4 border-t border-gray-200"},Ue={class:"text-center"},Be={class:"text-lg font-bold text-gray-800"},ze={class:"text-center"},Se={class:"text-lg font-bold text-gray-800"},Ae={class:"text-center"},De={class:"text-lg font-bold text-gray-800"},Ve={class:"text-center"},Te={class:"text-lg font-bold text-red-600"},Le={key:2,class:"text-center py-12 text-gray-500"},Re={key:3,class:"bg-red-50 border border-red-200 rounded-lg p-4 text-center"},$e={class:"text-sm text-red-800"};function Fe(o,t,x,d,s,n){return i(),a("div",me,[e("div",he,[t[4]||(t[4]=e("h3",{class:"text-lg font-semibold text-gray-800"},"Usage History",-1)),z(e("select",{"onUpdate:modelValue":t[0]||(t[0]=l=>s.limit=l),onChange:t[1]||(t[1]=(...l)=>n.fetchHistory&&n.fetchHistory(...l)),class:"text-sm border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500"},[...t[3]||(t[3]=[e("option",{value:6},"Last 6 months",-1),e("option",{value:12},"Last 12 months",-1),e("option",{value:24},"Last 24 months",-1)])],544),[[S,s.limit]])]),s.loading?(i(),a("div",xe,[t[5]||(t[5]=e("div",{class:"h-64 bg-gray-200 rounded mb-4"},null,-1)),e("div",pe,[(i(),a(k,null,C(4,l=>e("div",{key:l,class:"h-16 bg-gray-200 rounded"})),64))])])):s.history&&s.history.periods.length>0?(i(),a("div",ve,[e("div",fe,[e("div",ye,[(i(!0),a(k,null,C(s.history.periods,(l,u)=>(i(),a("div",{key:u,class:"flex-1 flex flex-col items-center group relative"},[e("div",be,[e("div",{class:"w-full bg-blue-500 rounded-t hover:bg-blue-600 transition-colors cursor-pointer",style:_({height:n.getBarHeight(l.cost,n.maxCost)}),onMouseenter:c=>n.showTooltip(u,l),onMouseleave:t[2]||(t[2]=(...c)=>n.hideTooltip&&n.hideTooltip(...c))},null,44,we),l.overage>0?(i(),a("div",{key:0,class:"w-full bg-red-500 hover:bg-red-600 transition-colors cursor-pointer",style:_({height:n.getBarHeight(l.overage,n.maxCost)})},null,4)):m("",!0)]),e("div",_e,r(l.period),1),s.tooltip.show&&s.tooltip.index===u?(i(),a("div",ke,[e("div",Ce,r(l.period),1),e("div",je,[e("div",null,"Calls: "+r(l.calls),1),e("div",null,"Duration: "+r(l.duration_minutes)+"m",1),e("div",null,"Cost: $"+r(l.cost.toFixed(2)),1),l.overage>0?(i(),a("div",Me," Overage: $"+r(l.overage.toFixed(2)),1)):m("",!0)]),t[6]||(t[6]=e("div",{class:"absolute top-full left-1/2 transform -translate-x-1/2 -mt-1"},[e("div",{class:"border-4 border-transparent border-t-gray-900"}
1)],-1))])):m("",!0)]))),128))]),t[7]||(t[7]=A('<div class="flex justify-center space-x-4 mt-6 text-sm"><div class="flex items-center"><div class="w-4 h-4 bg-blue-500 rounded mr-2"></div><span>Usage Cost</span></div><div class="flex items-center"><div class="w-4 h-4 bg-red-500 rounded mr-2"></div><span>Overage</span></div></div>',1))]),e("div",He,[e("div",Ue,[t[8]||(t[8]=e("p",{class:"text-xs text-gray-500 mb-1"},"Total Calls",-1)),e("p",Be,r(s.history.totals.total_calls.toLocaleString()),1)]),e("div",ze,[t[9]||(t[9]=e("p",{class:"text-xs text-gray-500 mb-1"},"Total Minutes",-1)),e("p",Se,r(s.history.totals.total_duration_minutes.toFixed(0)),1)]),e("div",Ae,[t[10]||(t[10]=e("p",{class:"text-xs text-gray-500 mb-1"},"Total Cost",-1)),e("p",De,"$"+r(s.history.totals.total_cost.toFixed(2)),1)]),e("div",Ve,[t[11]||(t[11]=e("p",{class:"text-xs text-gray-500 mb-1"},"Total Overage",-1)),e("p",Te,"$"+r(s.history.totals.total_overage.toFixed(2)),1)])])])):(i(),a("div",Le,[...t[12]||(t[12]=[e("svg",{class:"w-16 h-16 mx-auto mb-4 text-gray-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})],-1),e("p",null,"No usage history available",-1)])])),s.error?(i(),a("div",Re,[e("p",$e,r(s.error),1)])):m("",!0)])}const Ie=j(ge,[["render",Fe]]),Ne={name:"SuperAdminDashboard",components:{SuperAdminLayout:T,UsageWidget:ce,UsageHistoryChart:Ie},setup(){const o=U({totalResellers:0,activeResellers:0,totalUsers:0,systemHealth:98,resellersGrowth:12,usersGrowth:8}
1),t=U([{id:1,type:"reseller",description:'New reseller "Acme Corp" created',user:"Super Admin",timestamp:new Date(Date.now()-300*1e3)},{id:2,type:"user",description:"User permissions updated for [email protected]",user:"Super Admin",timestamp:new Date(Date.now()-900*1e3)},{id:3,type:"system",description:"System backup completed successfully",user:"System",timestamp:new Date(Date.now()-1800*1e3)},{id:4,type:"reseller",description:'Reseller "TechStart Inc" status changed to inactive',user:"Super Admin",timestamp:new Date(Date.now()-2700*1e3)}]),x=async()=>{try{const l=await(await fetch("/api/admin/resellers",{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`,Accept:"application/json"}})).json();if(l.success){o.value.totalResellers=l.data.total||0;const u=l.data.data?.filter(c=>c.status==="active").length||0;o.value.activeResellers=u}o.value.totalUsers=156}catch(n){console.error("Error loading stats:",n)}},d=n=>{const l={reseller:()=>p("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[p("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-2m-2 0H7m2 0H5m2 0h2m2 0h2M9 7h6m-6 4h6m-6 4h6"})]),user:()=>p("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[p("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})]),system:()=>p("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[p("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})])};return l[n]||l.system},s=n=>{const u=new Date-n,c=Math.floor(u/6e4),b=Math.floor(u/36e5),g=Math.floor(u/864e5);return c<60?`${c}m ago`:b<24?`${b}h ago`:`${g}d ago`};return V(()=>{x()}),{stats:o,recentActivity:t,getActivityIcon:d,formatTime:s}}},Oe={class:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-4 mb-8"},Ee={class:"relative overflow-hidden rounded-2xl bg-white p-6 shadow-sm ring-1 ring-gray-900/5"},We={class:"flex items-center"},Pe={class:"ml-4"},Ge={class:"flex items-baseline"},Qe={class:"text-2xl font-semibold text-gray-900"},qe={class:"ml-2 flex items-baseline text-sm font-semibold text-green-600"},Je={class:"relative overflow-hidden rounded-2xl bg-white p-6 shadow-sm ring-1 ring-gray-900/5"},Ke={class:"flex items-center"},Xe={class:"ml-4"},Ye={class:"flex items-baseline"},Ze={class:"text-2xl font-semibold text-gray-900"},et={class:"ml-2 text-sm font-medium text-gray-500"},tt={class:"relative overflow-hidden rounded-2xl bg-white p-6 shadow-sm ring-1 ring-gray-900/5"},st={class:"flex items-center"},ot={class:"ml-4"},rt={class:"flex items-baseline"},lt={class:"text-2xl font-semibold text-gray-900"},it={class:"ml-2 flex items-baseline text-sm font-semibold text-green-600"},nt={class:"relative overflow-hidden rounded-2xl bg-white p-6 shadow-sm ring-1 ring-gray-900/5"},at={class:"flex items-center"},dt={class:"ml-4"},ut={class:"flex items-baseline"},ct={class:"text-2xl font-semibold text-gray-900"},gt={class:"grid grid-cols-1 gap-6 lg:grid-cols-2 mb-8"},mt={class:"grid grid-cols-1 gap-8 lg:grid-cols-3"},ht={class:"lg:col-span-2"},xt={class:"rounded-2xl bg-white p-6 shadow-sm ring-1 ring-gray-900/5"},pt={class:"flow-root"},vt={class:"-mb-8"},ft={key:0,class:"absolute left-4 top-4 -ml-px h-full w-0.5 bg-gray-200"},yt={class:"relative flex space-x-3"},bt={class:"flex min-w-0 flex-1 justify-between space-x-4 pt-1.5"},wt={class:"text-sm text-gray-900"},_t={class:"text-xs text-gray-500"},kt={class:"whitespace-nowrap text-right text-sm text-gray-500"},Ct={class:"space-y-6"},jt={class:"rounded-2xl bg-white p-6 shadow-sm ring-1 ring-gray-900/5"},Mt={class:"space-y-3"};function Ht(o,t,x,d,s,n){const l=f("UsageWidget"),u=f("UsageHistoryChart"),c=f("router-link"),b=f("SuperAdminLayout");return i(),H(b,{title:"Super Admin Dashboard",subtitle:"System overview and management"},{default:v(()=>[e("div",Oe,[e("div",Ee,[e("div",We,[t[3]||(t[3]=e("div",{class:"flex-shrink-0"},[e("div",{class:"flex h-12 w-12 items-center justify-center rounded-xl bg-gradient-to-br from-blue-500 to-blue-600"}
1,[e("svg",{class:"h-6 w-6 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-2m-2 0H7m2 0H5m2 0h2m2 0h2M9 7h6m-6 4h6m-6 4h6"})])])],-1)),e("div",Pe,[e("div",Ge,[e("p",Qe,r(d.stats.totalResellers),1),e("p",qe,[t[0]||(t[0]=e("svg",{class:"h-4 w-4 flex-shrink-0 self-center",fill:"currentColor",viewBox:"0 0 20 20"},[e("path",{"fill-rule":"evenodd",d:"M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z","clip-rule":"evenodd"})],-1)),t[1]||(t[1]=e("span",{class:"sr-only"},"Increased by",-1)),w(" "+r(d.stats.resellersGrowth)+"% ",1)])]),t[2]||(t[2]=e("p",{class:"text-sm font-medium text-gray-500"},"Total Resellers",-1))])]),t[4]||(t[4]=e("div",{class:"absolute -bottom-2 -right-2 h-16 w-16 rounded-full bg-blue-500/10"},null,-1))]),e("div",Je,[e("div",Ke,[t[6]||(t[6]=e("div",{class:"flex-shrink-0"},[e("div",{class:"flex h-12 w-12 items-center justify-center rounded-xl bg-gradient-to-br from-green-500 to-green-600"},[e("svg",{class:"h-6 w-6 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})])])],-1)),e("div",Xe,[e("div",Ye,[e("p",Ze,r(d.stats.activeResellers),1),e("p",et," ("+r(Math.round(d.stats.activeResellers/d.stats.totalResellers*100))+"%) ",1)]),t[5]||(t[5]=e("p",{class:"text-sm font-medium text-gray-500"},"Active Resellers",-1))])]),t[7]||(t[7]=e("div",{class:"absolute -bottom-2 -right-2 h-16 w-16 rounded-full bg-green-500/10"},null,-1))]),e("div",tt,[e("div",st,[t[11]||(t[11]=e("div",{class:"flex-shrink-0"},[e("div",{class:"flex h-12 w-12 items-center justify-center rounded-xl bg-gradient-to-br from-purple-500 to-purple-600"},[e("svg",{class:"h-6 w-6 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z"})])])],-1)),e("div",ot,[e("div",rt,[e("p",lt,r(d.stats.totalUsers),1),e("p",it,[t[8]||(t[8]=e("svg",{class:"h-4 w-4 flex-shrink-0 self-center",fill:"currentColor",viewBox:"0 0 20 20"},[e("path",{"fill-rule":"evenodd",d:"M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z","clip-rule":"evenodd"})],-1)),t[9]||(t[9]=e("span",{class:"sr-only"},"Increased by",-1)),w(" "+r(d.stats.usersGrowth)+"% ",1)])]),t[10]||(t[10]=e("p",{class:"text-sm font-medium text-gray-500"},"Total Users",-1))])]),t[12]||(t[12]=e("div",{class:"absolute -bottom-2 -right-2 h-16 w-16 rounded-full bg-purple-500/10"},null,-1))]),e("div",nt,[e("div",at,[t[15]||(t[15]=e("div",{class:"flex-shrink-0"},[e("div",{class:"flex h-12 w-12 items-center justify-center rounded-xl bg-gradient-to-br from-emerald-500 to-emerald-600"},[e("svg",{class:"h-6 w-6 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12z"})])])],-1)),e("div",dt,[e("div",ut,[e("p",ct,r(d.stats.systemHealth)+"%",1),t[13]||(t[13]=e("div",{class:"ml-2 flex items-center"},[e("div",{class:"h-2 w-2 rounded-full bg-green-500"}),e("span",{class:"ml-1 text-sm font-medium text-green-600"},"Healthy")],-1))]),t[14]||(t[14]=e("p",{class:"text-sm font-medium text-gray-500"}
1,"System Health",-1))])]),t[16]||(t[16]=e("div",{class:"absolute -bottom-2 -right-2 h-16 w-16 rounded-full bg-emerald-500/10"},null,-1))])]),e("div",gt,[e("div",null,[h(l)]),e("div",null,[h(u)])]),e("div",mt,[e("div",ht,[e("div",xt,[t[17]||(t[17]=e("div",{class:"flex items-center justify-between mb-6"},[e("h3",{class:"text-lg font-semibold text-gray-900"},"Recent Activity"),e("button",{class:"text-sm font-medium text-purple-600 hover:text-purple-700"},"View all")],-1)),e("div",pt,[e("ul",vt,[(i(!0),a(k,null,C(d.recentActivity,(g,M)=>(i(),a("li",{key:g.id},[e("div",{class:y(["relative pb-8",{"pb-0":M===d.recentActivity.length-1}])},[M!==d.recentActivity.length-1?(i(),a("span",ft)):m("",!0),e("div",yt,[e("div",null,[e("span",{class:y(["h-8 w-8 rounded-full flex items-center justify-center ring-8 ring-white",g.type==="reseller"?"bg-blue-500":g.type==="user"?"bg-purple-500":g.type==="system"?"bg-green-500":"bg-gray-500"])},[(i(),H(D(d.getActivityIcon(g.type)),{class:"h-4 w-4 text-white"}))],2)]),e("div",bt,[e("div",null,[e("p",wt,r(g.description),1),e("p",_t,r(g.user),1)]),e("div",kt,r(d.formatTime(g.timestamp)),1)])])],2)]))),128))])])])]),e("div",Ct,[t[23]||(t[23]=e("div",{class:"rounded-2xl bg-white p-6 shadow-sm ring-1 ring-gray-900/5"},[e("h3",{class:"text-lg font-semibold text-gray-900 mb-4"},"System Status"),e("div",{class:"space-y-4"},[e("div",{class:"flex items-center justify-between"},[e("span",{class:"text-sm text-gray-600"},"Database"),e("div",{class:"flex items-center space-x-2"},[e("div",{class:"h-2 w-2 rounded-full bg-green-500"}),e("span",{class:"text-sm font-medium text-green-600"},"Online")])]),e("div",{class:"flex items-center justify-between"},[e("span",{class:"text-sm text-gray-600"},"API Services"),e("div",{class:"flex items-center space-x-2"},[e("div",{class:"h-2 w-2 rounded-full bg-green-500"}),e("span",{class:"text-sm font-medium text-green-600"},"Online")])]),e("div",{class:"flex items-center justify-between"},[e("span",{class:"text-sm text-gray-600"},"Storage"),e("div",{class:"flex items-center space-x-2"},[e("div",{class:"h-2 w-2 rounded-full bg-yellow-500"}),e("span",{class:"text-sm font-medium text-yellow-600"},"Warning")])])])],-1)),e("div",jt,[t[22]||(t[22]=e("h3",{class:"text-lg font-semibold text-gray-900 mb-4"},"Quick Actions",-1)),e("div",Mt,[h(c,{to:"/super-admin/resellers",class:"flex items-center justify-between p-3 rounded-lg border border-gray-200 hover:border-purple-300 hover:bg-purple-50 transition-colors group"},{default:v(()=>[...t[18]||(t[18]=[e("div",{class:"flex items-center space-x-3"},[e("div",{class:"h-8 w-8 rounded-lg bg-blue-100 flex items-center justify-center group-hover:bg-blue-200 transition-colors"},[e("svg",{class:"h-4 w-4 text-blue-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-2m-2 0H7m2 0H5m2 0h2m2 0h2M9 7h6m-6 4h6m-6 4h6"})])]),e("span",{class:"text-sm font-medium text-gray-900"},"Manage Resellers")],-1),e("svg",{class:"h-4 w-4 text-gray-400 group-hover:text-purple-600 transition-colors",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M9 5l7 7-7 7"})],-1)])]),_:1}),h(c,{to:"/super-admin/call-logs",class:"flex items-center justify-between p-3 rounded-lg border border-gray-200 hover:border-purple-300 hover:bg-purple-50 transition-colors group"},{default:v(()=>[...t[19]||(t[19]=[e("div",{class:"flex items-center space-x-3"},[e("div",{class:"h-8 w-8 rounded-lg bg-green-100 flex items-center justify-center group-hover:bg-green-200 transition-colors"},[e("svg",{class:"h-4 w-4 text-green-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 013 19.875v-6.75zM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V8.625zM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V4.125z"})])]),e("span",{class:"text-sm font-medium text-gray-900"},"View Call Logs")],-1),e("svg",{class:"h-4 w-4 text-gray-400 group-hover:text-purple-600 transition-colors",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M9 5l7 7-7 7"})],-1)])]),_:1}),h(c,{to:"/super-admin/usage-reports",class:"flex items-center justify-between p-3 rounded-lg border border-gray-200 hover:border-purple-300 hover:bg-purple-50 transition-colors group"},{default:v(()=>[...t[20]||(t[20]=[e("div",{class:"flex items-center space-x-3"},[e("div",{class:"h-8 w-8 rounded-lg bg-blue-100 flex items-center justify-center group-hover:bg-blue-200 transition-colors"},[e("svg",{class:"h-4 w-4 text-blue-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})])]),e("span",{class:"text-sm font-medium text-gray-900"},"Usage Reports")],-1),e("svg",{class:"h-4 w-4 text-gray-400 group-hover:text-purple-600 transition-colors",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M9 5l7 7-7 7"})],-1)])]),_:1}),h(c,{to:"/super-admin/assistants",class:"flex items-center justify-between p-3 rounded-lg border border-gray-200 hover:border-purple-300 hover:bg-purple-50 transition-colors group"},{default:v(()=>[...t[21]||(t[21]=[e("div",{class:"flex items-center space-x-3"},[e("div",{class:"h-8 w-8 rounded-lg bg-purple-100 flex items-center justify-center group-hover:bg-purple-200 transition-colors"},[e("svg",{class:"h-4 w-4 text-purple-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.
1074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z"}),e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})])]),e("span",{class:"text-sm font-medium text-gray-900"},"Manage Assistants")],-1),e("svg",{class:"h-4 w-4 text-gray-400 group-hover:text-purple-600 transition-colors",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M9 5l7 7-7 7"})],-1)])]),_:1})])])])])]),_:1})}const At=j(Ne,[["render",Ht]]);export{At 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.