PageSourceSearch

https://wavexsports.com/chunk-N3EWGUN7.js

js wavexsports.com collected 2026-10-08 06:07:53 UTC 13,564 bytes, 1 lines download raw bytes

1import{a as X}from"./chunk-ITRDNS7K.js";import{a as W}from"./chunk-X6RNY66Y.js";import{a as G}from"./chunk-H5HJ52HF.js";import"./chunk-7TWGSZO6.js";import{d as j,i as H}from"./chunk-FMMMCR4N.js";import{C as q,s as Y,t as B}from"./chunk-W5DKKG4U.js";import{a as R}from"./chunk-SJIFQKOZ.js";import{z as A}from"./chunk-KOJZXMGE.js";import{Ab as E,Bb as T,Cb as n,Db as a,Eb as m,G as w,Ib as O,Lb as h,Mb as d,N as k,O as I,Oa as V,P as D,S as F,Ta as r,Wb as o,Xb as P,Y as C,Yb as _,_b as L,cb as N,da as f,ea as x,f as y,hb as b,qb as $,rb as p,sa as g,tb as v,ub as M,xb as u,zb as z}from"./chunk-7O2KSPNF.js";import"./chunk-EQDQRRRY.js";var S=class i{http=C(A);authHelper=C(G);apiUrl=`${R.apiUrl}/api/admin/users`;getUsers(t,e,s){let l=this.authHelper.setAuthHeaders("admin",this.authHelper.getAuthToken("admin"));return this.http.get(`${this.apiUrl}?q=${t}&page=${e}&per_page=${s}`,{headers:l})}static \u0275fac=function(e){return new(e||i)};static \u0275prov=F({token:i,factory:i.\u0275fac,providedIn:"root"})};var Q=(i,t)=>t.id;function Z(i,t){i&1&&m(0,"app-loading-spinner",2)}function ee(i,t){if(i&1&&(n(0,"div",3)(1,"div",4),o(2),a()()),i&2){let e=d();r(2),_(" ",e.fetchError()," ")}}function te(i,t){i&1&&(n(0,"tr",23)(1,"td",46),m(2,"app-loading-spinner",47),a()()),i&2&&(r(2),p("title","Loading Users..."))}function ne(i,t){i&1&&(n(0,"span",52),m(1,"i",57),o(2," Verified "),a())}function ie(i,t){if(i&1&&(n(0,"div",54)(1,"small",58),o(2),a(),n(3,"small",53),o(4),a()()),i&2){let e=d().$implicit,s=d(3);r(2),_(" ",s.formatDate(e.date_of_birth)," "),r(2),_(" Age: ",s.getAge(e.date_of_birth)," ")}}function ae(i,t){i&1&&(n(0,"small"),o(1,"No birth date"),a())}function re(i,t){if(i&1&&(n(0,"tr")(1,"td")(2,"div",48),m(3,"img",49),a()(),n(4,"td")(5,"div",50)(6,"div",51),o(7),a(),b(8,ne,3,0,"span",52),a()(),n(9,"td")(10,"div",53),o(11),a()(),n(12,"td")(13,"div",53),o(14),a()(),n(15,"td")(16,"div",53),b(17,ie,5,2,"div",54)(18,ae,2,0,"small"),a()(),n(19,"td")(20,"div",26),m(21,"i",55),n(22,"span",53),o(23),a()()(),n(24,"td")(25,"div",56)(26,"small"),o(27),a()()(),n(28,"td")(29,"span"),o(30),a()()()),i&2){let e=t.$implicit,s=d(3);r(3),p("src",e.image,V),r(4),_(" ",e.first_name+" "+e.last_name," "),r(),u(s.isEmailVerified(e)?8:-1),r(3),_(" ",e.email||"No email provided"," "),r(3),_(" ",e.phone||"No phone number"," "),r(3),u(e.date_of_birth?17:18),r(4),M(s.getGenderIcon(e.gender)),r(2),P(s.formatGender(e.gender)),r(4),P(e.medical_conditions||"None reported"),r(2),M(s.getStatusClass(e.is_active)),r(),_(" ",s.getStatusText(e.is_active)," ")}}function oe(i,t){i&1&&o(0," Try adjusting your search criteria. ")}function se(i,t){i&1&&o(0," Create your first user to get started. ")}function le(i,t){if(i&1&&(n(0,"tr")(1,"td",59)(2,"div",60),m(3,"i",61),n(4,"h5",53),o(5,"No users found"),a(),n(6,"p",53),b(7,oe,1,0)(8,se,1,0),a()()()()),i&2){let e=d(3);r(7),u(e.searchTerm()?7:8)}}function de(i,t){if(i&1&&E(0,re,31,13,"tr",null,Q,!1,le,9,1,"tr"),i&2){let e=d(2);T(e.users())}}function ce(i,t){i&1&&(n(0,"li",62)(1,"span",64),o(2,"..."),a()())}function me(i,t){if(i&1){let e=O();n(0,"li",37)(1,"button",65),h("click",function(){f(e);let l=d().$implicit,c=d(2);return x(c.goToPage(l))}),o(2),a()()}if(i&2){let e=d().$implicit,s=d(2);v("active",e===s.currentPage()),r(),$("aria-current",e===s.currentPage()?"page":null),r(),_(" ",e," ")}}function ge(i,t){if(i&1&&b(0,ce,3,0,"li",62)(1,me,3,4,"li",63),i&2){let e=t.$implicit;u(e===-1?0:1)}}function pe(i,t){if(i&1){let e=O();n(0,"div",5)(1,"div",6)(2,"div",7)(3,"div",8)(4,"label",9),o(5,"Search Users"),a(),n(6,"div",10)(7,"input",11),h("input",function(l){f(e);let c=d();return x(c.updateSearchTerm(l.target.value))}),a(),n(8,"span",12),m(9,"i",13),a()()()()()(),n(10,"div",14)(11,"div",15)(12,"h5",16),m(13,"i",17),o(14," Users List "),n(15,"span",18),o(16),a()()(),n(17,"div",19)(18,"div",20)(19,"table",21)(20,"thead",22)(21,"tr")(22,"th"),o(23,"Avatar"),a(),n(24,"th"),o(25,"Full Name"),a(),n(26,"th"),o(27,"Email"),a(),n(28,"th"),o(29,"Phone"),a(),n(30,"th"),o(31,"Date of Birth"),a(),n(32,"th"),o(33,"Gender"),a(),n(34,"th"),o(35,"Medical Conditions"),a(),n(36,"th"),o(37,"Status"),a()()(),n(38,"tbody"),b(39,te,3,1,"tr",23)(40,de,3,1),a()()(),n(41,"div",24)(42,"div",25)(43,"div",26)(44,"label",27),o(45," users per page: "),a(),n(46,"select",28),h("change",function(l){f(e);let c=d();return x(c.onPerPageChange(+l.target.value))}),n(47,"option",29),o(48,"20"),a(),n(49,"option",30),o(50,"50"),a(),n(51,"option",31),o(52,"100"),a(),n(53,"option",32),o(54,"150"),a(),n(55,"option",33),o(56,"200"),a()()(),n(57,"div",34),o(58),a(),n(59,"nav",35)(60,"ul",36)(61,"li",37)(62,"button",38),h("click",function(){f(e);let l=d();return x(l.goToFirstPage())}),m(63,"i",39),a()(),n(64,"li",37)(65,"button",40),h("click",function(){f(e);let l=d();return x(l.goToPreviousPage())}),m(66,"i",41),a()(),E(67,ge,2,1,null,null,z),n(69,"li",37)(70,"button",42),h("click",function(){f(e);let l=d();return x(l.goToNextPage())}),m(71,"i",43),a()(),n(72,"li",37)(73,"button",44),h("click",function(){f(e);let l=d();return x(l.goToLastPage())}),m(74,"i",45),a()()()()()()()()}if(i&2){let e=d();r(7),p("value",e.searchTerm()),r(9),P(e.totalUsers()),r(23),u(e.isSearching()?39:40),r(7),p("value",e.perPage()),r(12),L(" Showing ",(e.currentPage()-1)*e.perPage()+1," to ",e.Math.min(e.currentPage()*e.perPage(),e.totalUsers())," of ",e.totalUsers()," results "),r(3),v("disabled",e.currentPage()===1),r(),p("disabled",e.currentPage()===1),r(2),v("disabled",e.currentPage()===1),r(),p("disabled",e.currentPage()===1),r(2),T(e.getVisiblePageNumbers()),r(2),v("disabled",e.currentPage()===e.totalPages()),r(),p("disabled",e.currentPage()===e.totalPages()),r(2),v("disabled",e.currentPage()===e.totalPages()),r(),p("disabled",e.currentPage()===e.totalPages())}}var J=class i{router=C(j);usersService=C(S);destroy$=new y;searchTrigger$=new y;users=g([]);userToDelete=g(null);searchTerm=g("");isSearching=g(!1);isLoading=g(!0);fetchError=g(null);currentPage=g(1);perPage=g(50);totalPages=g(1);totalUsers=g(0);Math=Math;ngOnInit(){this.searchTrigger$.pipe(D(()=>{this.isSearching.set(!0)}),k(t=>this.usersService.getUsers(t.term,t.page,t.perPage).pipe(w(()=>{this.isSearching.set(!1),this.isLoading.set(!1)}))),I(this.destroy$)).subscribe({next:t=>{this.users.set(t.data.data),this.totalUsers.set(t.data.total),this.totalPages.set(t.data.last_page)},error:t=>{this.fetchError.set(t.error.message)}}),this.loadUsers()}loadUsers(){this.searchTrigger$.next({term:this.searchTerm(),page:this.currentPage(),perPage:this.perPage()})}updateSearchTerm(t){this.searchTerm.set(t),this.currentPage.set(1),this.searchTrigger$.next({term:t,page:this.currentPage(),perPage:this.perPage()})}getStatusClass(t){return t?"badge bg-success":"badge bg-danger"}getStatusText(t){return t?"Yes":"No"}isEmailVerified(t){return!!t.email_verified_at}formatDate(t){return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}getAge(t){let e=new Date,s=new Date(t),l=e.getFullYear()-s.getFullYear(),c=e.getMonth()-s.getMonth();return(c<0||c===0&&e.getDate()<s.getDate())&&l--,l}formatGender(t){switch(t){case"male":return"Male";case"female":return"Female";case"other":return"Other";default:return"Not specified"}}getGenderIcon(t){switch(t){case"male":return"fas fa-mars text-primary";case"female":return"fas fa-venus text-danger";case"other":return"fas fa-genderless text-info";default:return"fas fa-question text-muted"}}goToPage(t){t>=1&&t<=this.totalPages()&&t!==this.currentPage()&&(this.currentPage.set(t),this.loadUsers())}goToFirstPage(){this.goToPage(1)}goToLastPage(){this.goToPage(this.totalPages())}goToNextPage(){this.currentPage()<this.totalPages()&&this.goToPage(this.currentPage()+1)}goToPreviousPage(){this.currentPage()>1&&this.goToPage(this.currentPage()-1)}onPerPageChange(t){this.perPage.set(t),this.currentPage.set(1),this.loadUsers()}getVisiblePageNumbers(){let t=this.currentPage(),e=this.totalPages(),s=2,l=[],c=[];for(let U=Math.max(2,t-s);U<=Math.min(e-1,t+s);
1U++)l.push(U);return t-s>2?c.push(1,-1):c.push(1),c.push(...l),t+s<e-1?c.push(-1,e):e>1&&c.push(e),c}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=N({type:i,selectors:[["app-users"]],decls:5,vars:4,consts:[[1,"users-management"],["title","Users Management","subtitle","Manage your WaveX users","icon","fas fa-users",3,"showActionButton"],["title","Loading users..."],[1,"text-center"],[1,"alert","alert-danger"],[1,"card","mb-4"],[1,"card-body"],[1,"row"],[1,"col-md-6"],[1,"form-label"],[1,"input-group"],["type","text","placeholder","Search by name, email, or phone...",1,"form-control",3,"input","value"],[1,"input-group-text"],[1,"fas","fa-search"],[1,"card"],[1,"card-header"],[1,"card-title","mb-0"],[1,"fas","fa-list","me-2"],[1,"badge","bg-secondary","ms-2"],[1,"card-body","p-0"],[1,"table-responsive"],[1,"table","table-hover","mb-0"],[1,"table-light"],[1,"min-vh-100"],[1,"card-footer","bg-light"],[1,"d-flex","justify-content-between","align-items-center"],[1,"d-flex","align-items-center"],["for","perPage",1,"form-label","me-2","mb-0"],["id","perPage",1,"form-select","form-select-sm",2,"width","auto",3,"change","value"],["value","20"],["value","50"],["value","100"],["value","150"],["value","200"],[1,"text-muted","small"],["aria-label","Users pagination"],[1,"pagination","pagination-sm","mb-0"],[1,"page-item"],["title","First page",1,"page-link",3,"click","disabled"],[1,"fas","fa-angle-double-left"],["title","Previous page",1,"page-link",3,"click","disabled"],[1,"fas","fa-angle-left"],["title","Next page",1,"page-link",3,"click","disabled"],[1,"fas","fa-angle-right"],["title","Last page",1,"page-link",3,"click","disabled"],[1,"fas","fa-angle-double-right"],["colspan","9",1,"text-center","py-4"],[3,"title"],[1,"user-avatar"],["alt","",1,"avatar-img",3,"src"],[1,"user-info"],[1,"fw-semibold"],[1,"badge","bg-success","badge-sm"],[1,"text-muted"],[1,"date-info"],[1,"me-2"],[1,"text-muted",2,"max-width","200px"],[1,"fas","fa-check-circle","me-1"],[1,"fw-semibold","d-block"],["colspan","10",1,"text-center","py-4"],[1,"empty-state"],[1,"fas","fa-users","fa-3x","text-muted","mb-3"],[1,"page-item","disabled"],[1,"page-item",3,"active"],[1,"page-link"],[1,"page-link",3,"click"]],template:function(e,s){e&1&&(n(0,"div",0),m(1,"app-page-header",1),b(2,Z,1,0,"app-loading-spinner",2)(3,ee,3,1,"div",3)(4,pe,75,19),a()),e&2&&(r(),p("showActionButton",!1),r(),u(s.isLoading()?2:-1),r(),u(s.fetchError()?3:-1),r(),u(!s.isLoading()&&!s.fetchError()?4:-1))},dependencies:[H,q,Y,B,X,W],styles:[".users-management[_ngcontent-%COMP%]{padding:0;background:#f8f9fa;min-height:100vh}.user-avatar[_ngcontent-%COMP%]{width:32px;height:32px}.avatar-img[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:50%;object-fit:cover;border:2px solid #e9ecef;transition:all .3s ease}.card[_ngcontent-%COMP%]{border:none;border-radius:8px;box-shadow:0 2px 8px #00000014;overflow:hidden;transition:all .3s ease}.card[_ngcontent-%COMP%]:hover{box-shadow:0 4px 15px #0000001f}.card-header[_ngcontent-%COMP%]{background:linear-gradient(135deg,#f8f9fa,#e9ecef);border-bottom:1px solid #dee2e6;padding:1rem}.card-title[_ngcontent-%COMP%]{font-size:1.1rem;font-weight:600;color:#347b8a;margin:0}.form-label[_ngcontent-%COMP%]{font-weight:600;color:#4a6c76;margin-bottom:.375rem;font-size:.9rem}.form-select[_ngcontent-%COMP%], .form-control[_ngcontent-%COMP%]{border:2px solid #e9ecef;border-radius:6px;padding:.5rem .75rem;font-size:.9rem;transition:all .3s ease}.form-select[_ngcontent-%COMP%]:focus, .form-control[_ngcontent-%COMP%]:focus{border-color:#458b8b;box-shadow:0 0 0 .2rem #458b8b40}.input-group-text[_ngcontent-%COMP%]{background:#458b8b;color:#fff;border:none;border-radius:0 6px 6px 0;font-size:.9rem}.user-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.125rem}.date-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.1rem}.date-info[_ngcontent-%COMP%]   .fw-semibold[_ngcontent-%COMP%]{color:#495057;font-size:.8rem}.date-info[_ngcontent-%COMP%]   .text-muted[_ngcontent-%COMP%]{font-size:.7rem;color:#6c757d!important}.fa-mars[_ngcontent-%COMP%]{color:#007bff!important}.fa-venus[_ngcontent-%COMP%]{color:#dc3545!important}.fa-genderless[_ngcontent-%COMP%]{color:#17a2b8!important}.badge-sm[_ngcontent-%COMP%]{font-size:.65rem;padding:.2rem .4rem;border-radius:10px}.badge.bg-success.badge-sm[_ngcontent-%COMP%]{background:linear-gradient(135deg,#28a745,#20c997)!important;border:none;box-shadow:0 2px 4px #28a7454d}.badge.bg-primary[_ngcontent-%COMP%]{background:linear-gradient(135deg,var(--primary-color, #4cc2dd) 0%,var(--primary-color-medium, rgba(36, 113, 
1125, .85)) 100%)!important;border:none}.badge.bg-secondary[_ngcontent-%COMP%]{background:linear-gradient(135deg,#6c757d,#495057)!important;border:none}.empty-state[_ngcontent-%COMP%]{text-align:center;padding:2rem 1.5rem}.empty-state[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{opacity:.5;font-size:2rem}@media (max-width: 768px){.user-avatar[_ngcontent-%COMP%]{width:28px;height:28px}.avatar-img[_ngcontent-%COMP%], .avatar-initials[_ngcontent-%COMP%]{width:28px;height:28px;font-size:.7rem}.user-info[_ngcontent-%COMP%]{gap:.1rem}.badge-sm[_ngcontent-%COMP%]{font-size:.6rem;padding:.15rem .3rem}}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.users-management[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_fadeIn .6s ease-out}"]})};export{J as UsersComponent};

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.