1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5192],{7364:(e,t,a)=>{a.d(t,{l:()=>j});var r=a(95155),n=a(12115),l=a(72473),s=a(48003),d=a(8574),o=a(16485),i=a(346),c=a(40983),m=a(3648),u=a(90368),x=a(27937),p=a(24033),b=a(74854),h=a(70931);function y(){let e=(0,m._)(["rtl:**:[.rdp-button_next>svg]:rotate-180"],["rtl:**:[.rdp-button\\_next>svg]:rotate-180"]);return y=function(){return e},e}function g(){let e=(0,m._)(["rtl:**:[.rdp-button_previous>svg]:rotate-180"],["rtl:**:[.rdp-button\\_previous>svg]:rotate-180"]);return g=function(){return e},e}function f(e){let{className:t,classNames:a,showOutsideDays:n=!0,captionLayout:l="label",buttonVariant:s="ghost",formatters:d,components:o,...m}=e,f=(0,b.a)();return(0,r.jsx)(h.h,{showOutsideDays:n,className:(0,i.cn)("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw(y()),String.raw(g()),t),captionLayout:l,formatters:{formatMonthDropdown:e=>e.toLocaleString("default",{month:"short"}),...d},classNames:{root:(0,i.cn)("w-fit",f.root),months:(0,i.cn)("relative flex flex-col gap-4 md:flex-row",f.months),month:(0,i.cn)("flex w-full flex-col gap-4",f.month),nav:(0,i.cn)("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",f.nav),button_previous:(0,i.cn)((0,c.r)({variant:s}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",f.button_previous),button_next:(0,i.cn)((0,c.r)({variant:s}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",f.button_next),month_caption:(0,i.cn)("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",f.month_caption),dropdowns:(0,i.cn)("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",f.dropdowns),dropdown_root:(0,i.cn)("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",f.dropdown_root),dropdown:(0,i.cn)("bg-popover absolute inset-0 opacity-0",f.dropdown),caption_label:(0,i.cn)("select-none font-medium","label"===l?"text-sm":"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",f.caption_label),table:"w-full border-collapse",weekdays:(0,i.cn)("flex",f.weekdays),weekday:(0,i.cn)("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",f.weekday),week:(0,i.cn)("mt-2 flex w-full",f.week),week_number_header:(0,i.cn)("w-[--cell-size] select-none",f.week_number_header),week_number:(0,i.cn)("text-muted-foreground select-none text-[0.8rem]",f.week_number),day:(0,i.cn)("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",f.day),range_start:(0,i.cn)("bg-accent rounded-l-md",f.range_start),range_middle:(0,i.cn)("rounded-none",f.range_middle),range_end:(0,i.cn)("bg-accent rounded-r-md",f.range_end),today:(0,i.cn)("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",f.today),outside:(0,i.cn)("text-muted-foreground aria-selected:text-muted-foreground",f.outside),disabled:(0,i.cn)("text-muted-foreground opacity-50",f.disabled),hidden:(0,i.cn)("invisible",f.hidden),...a},components:{Root:e=>{let{className:t,rootRef:a,...n}=e;return(0,r.jsx)("div",{"data-slot":"calendar",ref:a,className:(0,i.cn)(t),...n})},Chevron:e=>{let{className:t,orientation:a,...n}=e;return"left"===a?(0,r.jsx)(u.A,{className:(0,i.cn)("size-4",t),...n}):"right"===a?(0,r.jsx)(x.A,{className:(0,i.cn)("size-4",t),...n}):(0,r.jsx)(p.A,{className:(0,i.cn)("size-4",t),...n})},DayButton:v,WeekNumber:e=>{let{children:t,...a}=e;return(0,r.jsx)("td",{...a,children:(0,r.jsx)("div",{className:"flex size-[--cell-size] items-center justify-center text-center",children:t})})},...o},...m})}function v(e){let{className:t,day:a,modifiers:l,...s}=e,d=(0,b.a)(),o=n.useRef(null);n.useEffect(()=>{var e;l.focused&&(null==(e=o.current)||e.focus())},[l.focused]);let m=l.today,u=l.selected;return(0,r.jsx)(c.$,{ref:o,variant:"ghost",size:"icon","data-day":a.date.toLocaleDateString(),"data-selected-single":l.selected&&!l.range_start&&!l.range_end&&!l.range_middle,"data-range-start":l.range_start,"data-range-end":l.range_end,"data-range-middle":l.range_middle,className:(0,i.cn)("flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none [&>span]:text-xs [&>span]:opacity-70",u&&"bg-dynamic-primary-500 text-white font-semibold hover:bg-dynamic-primary-600 border-2 border-dynamic-primary-500",m&&!u&&"border-2 border-dynamic-primary-500 font-semibold text-dynamic-primary-600 dark:text-dynamic-primary-300",l.range_middle&&"bg-dynamic-primary-500 text-white rounded-none",l.range_start&&"bg-dynamic-primary-500 text-white rounded-md",l.range_end&&"bg-dynamic-primary-500 text-white rounded-md","group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px]",d.day,t),...s})}var w=a(29030);function j(e){let{date:t,onDateChange:a,placeholder:n="اختر Ø§ÙØªØ§Ø±ÙØ®",className:m,direction:u="rtl",popoverClassName:x,captionLayout:p,fromYear:b,toYear:h,startMonth:y,endMonth:g}=e,v=t instanceof Date&&!isNaN(t.getTime());return(0,r.jsxs)(w.AM,{children:[(0,r.jsx)(w.Wv,{asChild:!0,children:(0,r.jsxs)(c.$,{variant:"outline",className:(0,i.cn)("w-full justify-between font-normal px-3 py-2.5 h-auto rounded-lg border border-text-secondary/30 bg-dashboard-card text-dynamic-secondary-500 placeholder:text-dynamic-secondary-500 focus:outline-none focus:ring-2 focus:ring-dynamic-primary-500",!v&&"text-text-secondary",m),children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 truncate",children:[(0,r.jsx)(o.A,{className:"h-4 w-4 shrink-0"}),v?(0,r.jsx)("span",{className:"text-sm truncate",children:(0,l.GP)(t,"yyyy/MM/dd")}):(0,r.jsx)("span",{className:"text-sm truncate",children:n})]}),(0,r.jsx)("svg",{className:"w-4 h-4 text-text-secondary shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})}),(0,r.jsx)(w.hl,{className:(0,i.cn)("w-auto p-0 bg-dashboard-card z-99999",x),align:"start",children:(0,r.jsx)(f,{mode:"single",selected:v?t:void 0,onSelect:e=>{e&&a(e)},autoFocus:!0,locale:"rtl"===u?s.ar:d.c,className:"bg-dashboard-card",captionLayout:p,fromYear:b,toYear:h,startMonth:y,endMonth:g})})]})}},29030:(e,t,a)=>{a.d(t,{AM:()=>d,Wv:()=>o,hl:()=>i});var r=a(95155),n=a(12115),l=a(35635),s=a(346);let d=l.bL,o=l.l9,i=n.forwardRef((e,t)=>
1{let{className:a,align:n="center",sideOffset:d=4,...o}=e;return(0,r.jsx)(l.ZL,{children:(0,r.jsx)(l.UC,{ref:t,align:n,sideOffset:d,className:(0,s.cn)("z-99999 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",a),...o})})});i.displayName=l.UC.displayName},40983:(e,t,a)=>{a.d(t,{$:()=>o,r:()=>d});var r=a(95155);a(12115);var n=a(32467),l=a(83101),s=a(346);let d=(0,l.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-dynamic-secondary-500 hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function o(e){let{className:t,variant:a,size:l,asChild:o=!1,...i}=e,c=o?n.DX:"button";return(0,r.jsx)(c,{"data-slot":"button",className:(0,s.cn)(d({variant:a,size:l,className:t})),...i})}},47065:(e,t,a)=>{a.d(t,{A:()=>o,r:()=>d});var r=a(95155),n=a(12115),l=a(47650),s=a(346);function d(e){let{open:t,onClose:a,title:d,children:o,footer:i,maxWidth:c="md",closeOnOutsideClick:m=!0,showCloseButton:u=!0,duration:x=300,className:p,headerClassName:b,bodyClassName:h,footerClassName:y,closeButtonClassName:g,container:f,dir:v}=e,[w,j]=(0,n.useState)(t),[N,k]=(0,n.useState)(t?"opening":"closing"),_=(0,n.useRef)(null);if((0,n.useEffect)(()=>{if(t)_.current&&window.clearTimeout(_.current),j(!0),k("opening"),_.current=window.setTimeout(()=>k("open"),x);else{if(!w)return;k("closing"),_.current&&window.clearTimeout(_.current),_.current=window.setTimeout(()=>{j(!1)},x)}return()=>{_.current&&window.clearTimeout(_.current)}},[t]),(0,n.useEffect)(()=>(w&&!f&&(document.body.style.overflow="hidden"),()=>{f||(document.body.style.overflow="unset")}),[w,f]),(0,n.useEffect)(()=>{if(!w)return;let e=e=>{"Escape"===e.key&&u&&a()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[w,a,u]),!w||"undefined"==typeof document)return null;let C=(0,r.jsxs)("div",{className:(0,s.cn)("fixed inset-0 z-9999 flex-center p-4",f?"absolute z-1000 opacity-100! visible! pointer-events-auto!":"fixed"),onClick:e=>{m&&e.target===e.currentTarget&&a()},role:"dialog","aria-modal":"true",dir:v,children:[(0,r.jsx)("div",{className:(0,s.cn)("fixed inset-0 bg-black/60 backdrop-blur-[2px] pointer-events-none",f?"absolute":"fixed","closing"===N?"animate-dialog-overlay-exit":"animate-dialog-overlay")}),(0,r.jsxs)("div",{onDoubleClick:e=>e.stopPropagation(),onMouseDown:e=>f&&e.stopPropagation(),onClick:e=>f&&e.stopPropagation(),onKeyDown:e=>f&&e.stopPropagation(),className:(0,s.cn)("relative w-full rounded-2xl border bg-dashboard-card shadow-2xl transform-gpu",{sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","4xl"
1:"max-w-4xl","5xl":"max-w-5xl","6xl":"max-w-6xl","7xl":"max-w-7xl",full:"max-w-full"}[c],f?"max-h-full":"max-h-[90vh]","overflow-hidden flex flex-col pointer-events-auto","closing"===N?"animate-dialog-content-exit":"animate-dialog-content",p),children:[(0,r.jsxs)("div",{className:(0,s.cn)("text-dynamic-secondary-500 bg-dashboard-card px-6 pt-4 pb-2 flex items-center justify-between shrink-0",b),children:[d&&d,u&&(0,r.jsx)("button",{onClick:a,className:(0,s.cn)("text-text-secondary hover:text-dynamic-secondary-500 transition-colors p-1 hover:bg-dashboard-card-collapsed rounded-lg cursor-pointer",g),"aria-label":"Close",children:(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,r.jsx)("div",{className:(0,s.cn)("px-6 py-6 text-muted flex-1 min-h-0 overflow-y-auto w-full",h),children:o}),i&&(0,r.jsx)("div",{className:(0,s.cn)("bg-dashboard-card px-6 py-4 shrink-0",y),children:i})]})]});return(0,l.createPortal)(C,f||document.body)}let o=d},49519:(e,t,a)=>{a.d(t,{d:()=>o});var r=a(95155),n=a(12115),l=a(27937),s=a(90368),d=a(902);function o(e){let{currentPage:t,lastPage:a,onPageChange:o,size:i="sm"}=e,c="ar"===(0,d.Ym)();if(a<=1)return null;let m={sm:"w-8 h-8 text-sm",md:"w-10 h-10 text-base",lg:"w-12 h-12 text-lg"},u=(()=>{let e,r=[],n=[];for(let e=1;e<=a;e++)(1===e||e===a||e>=t-2&&e<=t+2)&&r.push(e);for(let t of r)e&&(t-e==2?n.push(e+1):t-e!=1&&n.push("...")),n.push(t),e=t;return n})(),x="rounded-full font-medium transition-all flex items-center justify-center disabled:opacity-50 disabled:cursor-not-allowed shrink-0";return(0,r.jsxs)("div",{className:"flex items-center justify-center gap-1 sm:gap-2 mt-8 mb-4 flex-wrap",dir:c?"rtl":"ltr",children:[(0,r.jsx)("button",{onClick:()=>o(t-1),disabled:1===t,className:"".concat(m[i]," ").concat(x," text-text-primary hover:bg-gray-100 dark:hover:bg-dashboard-card-collapsed dark:text-gray-300"),"aria-label":"Previous Page",children:c?(0,r.jsx)(l.A,{className:"w-4 h-4"}):(0,r.jsx)(s.A,{className:"w-4 h-4"})}),u.map((e,a)=>(0,r.jsx)(n.Fragment,{children:"..."===e?(0,r.jsx)("span",{className:"text-text-primary/50 dark:text-gray-500 w-8 h-8 flex items-center justify-center select-none",children:"..."}):(0,r.jsx)("button",{onClick:()=>o(e),className:"".concat(m[i]," ").concat(x," ").concat(t===e?"bg-dynamic-primary-500 text-white shadow-md scale-110":"text-text-primary hover:bg-gray-100 dark:hover:bg-dashboard-card-collapsed dark:text-gray-300"),children:e})},"page-".concat(a))),(0,r.jsx)("button",{onClick:()=>o(t+1),disabled:t===a,className:"".concat(m[i]," ").concat(x," text-text-primary hover:bg-gray-100 dark:hover:bg-dashboard-card-collapsed dark:text-gray-300"),"aria-label":"Next Page",children:c?(0,r.jsx)(s.A,{className:"w-4 h-4"}):(0,r.jsx)(l.A,{className:"w-4 h-4"})})]})}},70667:(e,t,a)=>{a.d(t,{$:()=>d});var r=a(95155),n=a(52619),l=a.n(n),s=a(346);function d(e){let{variant:t="primary",fullWidth:a=!1,center:n=!1,className:d,children:o,disabled:i,href:c,...m}=e,u=(0,s.cn)("h-10 px-5 rounded-lg font-semibold text-sm transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed ".concat(n?"mx-auto min-w-56 flex-center":""),{primary:"px-6 py-2 bg-dynamic-primary-500 hover:bg-dynamic-primary-600 text-white shadow-lg hover:shadow-xl transition-all duration-300",secondary:"rounded-md bg-dynamic-secondary-500 hover:bg-dynamic-secondary-500 dark:bg-dynamic-secondary-500/10 dark:hover:bg-dynamic-secondary-500/5 text-white shadow-lg hover:shadow-xl transition-all duration-300",ghost:"px-6 py-2 rounded-md border border-dynamic-secondary-500 text-dynamic-secondary-500 hover:bg-dynamic-secondary-500/5 transition-colors font-medium",outline:"px-6 py-2 rounded-md border border-dynamic-primary-500 text-dynamic-primary-500 hover:bg-dynamic-primary-500/5 transition-colors font-medium",destructive:"px-6 py-2 rounded-md border border-red-500 bg-red-500 text-white hover:bg-red-600 transition-colors font-medium"}[t],a&&"w-full",d);return c?(0,r.jsx)(l(),{href:c,className:u,...m,children:o}):(0,r.jsx)("button",{className:u,disabled:i,...m,children:o})}},75930:(e,t,a)=>{a.d(t,{b:()=>g});var r=a(95155),n=a(12115),l=a(81157),s=a(66955),d=a(18955);function o(e){let{searchQuery:t,onSearchChange:a,searchPlaceholder:n,onFilterClick:o,hasActiveFilters:i=!1,pageSize:c,onPageSizeChange:m,pageSizeOptions:u=[3,5,10,15,20]}=e,x=(0,d.c)("dashboard.overView");return(0,r.jsxs)("div",{className:"flex items-center mb-6 gap-2",children:[(0,r.jsx)(l.D,{wrapperClassName:"flex-1",value:t,onChange:a,placeholder:n||x("search")}),(0,r.jsx)("button",{onClick:o,className:"p-2.5 rounded-xl border transition-all shadow-sm ".concat(i?"border-dynamic-primary-500 text-dynamic-primary-500":"border-dynamic-secondary-500/50 dark:border-dynamic-secondary-500/10 bg-dashboard-card-collapsed text-dynamic-secondary-500 hover:text-dynamic-primary-500 hover:border-dynamic-primary-500"),children:(0,r.jsx)(s.A,{className:"w-5 h-5"})}),(0,r.jsxs)("div",{className:"relative bg-dashboard-card-collapsed rounded-xl border border-dynamic-secondary-500/50 dark:border-dynamic-secondary-500/10 flex items-center h-10.5 px-3 cursor-pointer hover:border-dynamic-primary-500/50 transition-colors input-focus-wrapper",children:[(0,r.jsxs)("span",{className:"text-xs text-dynamic-secondary-500 w-max block font-medium group-hover:text-dynamic-primary-500 transition-colors",children:[x("rows"),":"," ",(0,r.jsx)("span",{className:"text-dynamic-primary-500 font-bold ml-1",children:c})]}),(0,r.jsx)("select",{value:c,onChange:e=>m(Number(e.target.value)),className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer bg-dashboard-card-collapsed text-dynamic-secondary-500",children:u.map(e=>(0,r.jsx)("option",{className:"text-dynamic-secondary-500! bg-dashboard-card-collapsed!",value:e,children:e},e))})]})]})}var i=a(49519),c=a(65229),m=a(72473);function u(e){var t,a;let{filters:n,onRemoveFilter:l,onClearAll:s,filterType:o="assignment"}=e,i=(0,d.c)("dashboard.overView"),u=(0,d.c)("wallet"===o?"dashboard.myWalletPage":"subscriptions"===o?"dashboard.subscriptions":"dashboard.overView"),x=[];return(n.status&&"all"!==n.status&&"wallet"!==o&&x.push({key:"status",label:i("status"),value:(t=n.status,({send_assignment:u("submitAssignment"),graded:u("graded"),not_sent_assignment:u("notSubmitted"),pending_evaluation:u("pendingEvaluation"),under_progress:u("underProgress"),start_quiz:u("startQuiz"),retest_and_show_report:u("retestAndSh
1owReport"),active:u("subscribed"),expired:u("expired"),canceled:u("canceled"),trial:u("trial")})[t]||t)}),n.transactionType&&"all"!==n.transactionType&&"wallet"===o&&x.push({key:"transactionType",label:u("filters.transactionType"),value:(a=n.transactionType,"wallet"===o?u("deposit"===a?"filters.deposit":"filters.expense"):a)}),n.startDate&&n.endDate&&"affiliate"!==o&&x.push({key:"dateRange",label:"wallet"===o?u("filters.transactionDate"):i("date"),value:"".concat((0,m.GP)(n.startDate,"dd/MM/yyyy")," - ").concat((0,m.GP)(n.endDate,"dd/MM/yyyy"))}),n.date&&"affiliate"===o&&x.push({key:"date",label:i("date"),value:(0,m.GP)(n.date,"dd/MM/yyyy")}),n.amount&&"affiliate"===o&&x.push({key:"amount",label:i("amount",{fallback:"Amount"}),value:String(n.amount)}),n.sortDirection&&"all"!==n.sortDirection&&"quiz"===o&&x.push({key:"sortDirection",label:i("sort"),value:i("desc"===n.sortDirection?"newest":"oldest")}),0===x.length)?null:(0,r.jsxs)("div",{className:"flex items-center gap-2 flex-wrap mb-4",children:[(0,r.jsxs)("span",{className:"text-sm font-medium text-text-secondary",children:[i("filter")," (",x.length,"):"]}),x.map(e=>(0,r.jsxs)("button",{onClick:()=>l(e.key),className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-dynamic-primary-500/10 text-dynamic-primary-500 text-xs font-medium hover:bg-dynamic-primary-500/20 transition-colors group",children:[(0,r.jsxs)("span",{className:"font-semibold",children:[e.label,":"]}),(0,r.jsx)("span",{children:e.value}),(0,r.jsx)(c.A,{className:"w-3.5 h-3.5 group-hover:scale-110 transition-transform"})]},e.key)),x.length>1&&(0,r.jsxs)("button",{onClick:s,className:"inline-flex items-center gap-1 px-3 py-1.5 rounded-full bg-red-500/10 text-red-500 text-xs font-medium hover:bg-red-500/20 transition-colors",children:[i("clearFilter"),(0,r.jsx)(c.A,{className:"w-3.5 h-3.5"})]})]})}var x=a(7364),p=a(902),b=a(47065);function h(e){let{isOpen:t,onClose:a,onApply:l,filterType:s="assignment",currentFilters:o,translationNamespace:i}=e,c=(0,d.c)("dashboard.overView"),m=(0,d.c)(i||("wallet"===s?"dashboard.myWalletPage":"subscriptions"===s?"dashboard.subscriptions":"dashboard.overView")),u="ar"===(0,p.Ym)(),h=n.useMemo(()=>{if("wallet"===s)return[{id:"all",label:m("filters.all")},{id:"deposit",label:m("filters.deposit")},{id:"expense",label:m("filters.expense")}];if("quiz"===s)return[{id:"all",label:c("all")},{id:"start_quiz",label:m("startQuiz")},{id:"retest_and_show_report",label:m("retestAndShowReport")}];if("purchase_history"===s)return[{id:"all",label:c("all")},{id:"paid",label:m("paid")},{id:"waiting_payment",label:m("waitingPayment")}];if("subscriptions"===s)return[{id:"all",label:c("all")},{id:"active",label:m("subscribed")},{id:"expired",label:m("expired")},{id:"canceled",label:m("canceled")},{id:"trial",label:m("trial")}];if("affiliate"===s)return[];else return[{id:"all",label:c("all")},{id:"send_assignment",label:m("submitAssignment")},{id:"graded",label:m("graded")},{id:"not_sent_assignment",label:m("notSubmitted")},{id:"pending_evaluation",label:m("pendingEvaluation")},{id:"under_progress",label:m("underProgress")}]},[s,m,c]),[y,g]=(0,n.useState)("all"),[f,v]=(0,n.useState)("all"),[w,j]=(0,n.useState)(void 0),[N,k]=(0,n.useState)(void 0),[_,C]=(0,n.useState)(void 0),[z,D]=(0,n.useState)("");return(0,n.useEffect)(()=>{o?("wallet"===s?g(o.transactionType||"all"):g(o.status||"all"),v(o.sortDirection||"all"),j(o.startDate),k(o.endDate),C(o.date),D(o.amount||"")):(g("all"),v("all"),j(void 0),k(void 0),C(void 0),D(""))},[o,s]),(0,r.jsx)(b.r,{open:t,onClose:a,title:(0,r.jsx)("div",{className:"w-full text-center",children:(0,r.jsx)("h2",{className:"text-2xl font-bold text-dynamic-secondary-500",children:c("filter")})}),maxWidth:"lg",footer:(0,r.jsxs)("div",{className:"flex items-center justify-center gap-4 w-full",children:[(0,r.jsx)("button",{onClick:()=>{"wallet"===s?l({transactionType:y,startDate:w,endDate:N}):"affiliate"===s?l({date:_,amount:z?Number(z):void 0}):l({status:y,startDate:w,endDate:N,..."quiz"===s?{sortDirection:"all"!==f?f:void 0}:{}}),a()},className:"px-5 py-2 rounded-xl bg-dynamic-primary-500 text-white font-semibold hover:bg-dynamic-primary-600 transition-all shadow-lg shadow-dynamic-primary-500/20 hover:shadow-xl hover:shadow-dynamic-primary-500/30",children:c("applyFilter")}),(0,r.jsx)("button",{onClick:a,className:"px-5 py-2 rounded-xl border border-dynamic-primary-500 text-dynamic-primary-500 font-semibold hover:bg-accent-red/10 hover:text-accent-red hover:border-accent-red transition-all",children:c("cancel")})]}),children:(0,r.jsxs)("div",{className:"space-y-8",dir:u?"rtl":"ltr",children:["affiliate"!==s&&(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-base font-bold text-dynamic-primary-500 mb-4 ".concat(u?"text-right":"text-left"),children:"wallet"===s?m("filters.transactionType"):c("status")}),(0,r.jsx)("div",{className:"flex flex-wrap gap-3 justify-start",children:h.map(e=>(0,r.jsx)("button",{onClick:()=>g(e.id),className:"w-fit min-w-24 px-1 py-2 rounded-sm border text-xs font-bold transition-all duration-200 text-nowrap ".concat(y===e.id?"bg-dynamic-primary-500 border-dynamic-primary-500 text-white shadow-lg shadow-dynamic-primary-500/20":"bg-dashboard-card border-text-secondary/30 text-text-secondary hover:border-dynamic-primary-300 hover:bg-dashboard-card-collapsed"),children:e.label},e.id))})]}),"quiz"===s&&(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-base font-bold text-dynamic-primary-500 mb-4 ".concat(u?"text-right":"text-left"),children:c("sort")}),(0,r.jsx)("div",{className:"flex flex-wrap gap-3 justify-start",children:[{id:"all",label:c("default")},{id:"desc",label:c("newest")},{id:"asc",label:c("oldest")}].map(e=>(0,r.jsx)("button",{onClick:()=>v(e.id),className:"w-fit min-w-24 px-1 py-2 rounded-sm border text-xs font-bold transition-all duration-200 text-nowrap ".concat(f===e.id?"bg-dynamic-primary-500 border-dynamic-primary-500 text-white shadow-lg shadow-dynamic-primary-500/20":"bg-dashboard-card border-text-secondary/30 text-text-secondary hover:border-dynamic-primary-300 hover:bg-dashboard-card-collapsed"),children:e.label},e.id))})]}),"affiliate"===s&&(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-base font-bold text-dynamic-primary-500 mb-4 ".concat(u?"text-right":"text-left"),children:c("amount",{fallback:u?"اÙÙ
Ø¨ÙØº":"Amount"})}),(0,r.jsx)("input",{type:"number",value:z,onChange:e=>D(e.target.value),placeholder:u?"أدخ٠اÙÙ
Ø¨ÙØº...":"Enter amount...",className:"w-full h-11 bg-dashboard-card border border-text-secondary/30 rounded-xl px-4 text-sm focus:outline-none focus:ring-2 focus:ring-dynamic-primary-500/50"})]}),"affiliate"===s?(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-base font-bold text-dynamic-primary-500 mb-4 ".concat(u?"text-right":"text-left"),children:c("date")}),(0,r.jsx)("div",{children:(0,r.jsx)(x.l,{date:_,onDateChange:C,placeholder:c("selectDate"),direction:u?"rtl":"ltr"})})]}):(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-base font-bold text-dynamic-primary-500 mb-4 ".concat(u?"text-right":"text-left"),children:"wallet"===s?m("filters.transactionDate"):c("date")}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm text-text-secondary mb-2 ".concat(u?"text-right":"text-left"),children:"wallet"===s?m("filters.from"):c("from")}),(0,r.jsx)(x.l,{date:w,onDateChange:j,placeholder:"wallet"===s?m("filters.from"):c("selectDate"),direction:u?"rtl":"ltr"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm text-text-secondary mb-2 ".concat(u?"text-right":"text-left"),children:"wallet"===s?m("filters.to"):c("to")}),(0,r.jsx)(x.l,{date:N,onDateChange:k,placeholder:"wallet"===s?m("filters.to"):c("selectDate"),direction:u?"rtl":"ltr"})]})]})]})]})})}var y=a(346);function g(e){let{data:t,columns:a,loading:l=!1,emptyMessage:s="No data found",title:d,headerActions:c,searchQuery:m,onSearchChange:x,searchPlaceholder:p,filters:b,pagination:g,pageSize:f,getRowKey:v}
1=e,[w,j]=(0,n.useState)((null==f?void 0:f.value)||3);(0,n.useEffect)(()=>{(null==f?void 0:f.value)!==void 0&&j(f.value)},[null==f?void 0:f.value]),(0,n.useEffect)(()=>{if(null==f?void 0:f.localStorageKey){let e=localStorage.getItem(f.localStorageKey);if(e){let t=Number(e);j(t),f.onChange(t)}}},[null==f?void 0:f.localStorageKey]);let N=b&&(void 0!==b.filters.status&&"all"!==b.filters.status||void 0!==b.filters.transactionType&&"all"!==b.filters.transactionType||!!b.filters.startDate||!!b.filters.endDate);return(0,r.jsxs)("div",{className:"bg-dashboard-card rounded-2xl p-6 card-shadow border border-none",children:[(0,r.jsxs)("div",{className:"flex items-center ".concat(c?"justify-between":""," gap-6 ").concat(d?"mb-6 border-b border-text-secondary/30":""," ").concat(c?"pb-4":""),children:[(0,r.jsx)("h2",{className:"pb-3 font-bold text-lg text-dynamic-secondary-500",children:d}),c&&(0,r.jsx)("div",{className:"flex items-center gap-3",children:c})]}),f&&(0,r.jsx)(o,{searchQuery:m,onSearchChange:x,onFilterClick:(null==b?void 0:b.onOpen)||(()=>{}),hasActiveFilters:N||!1,pageSize:w,onPageSizeChange:e=>{j(e),(null==f?void 0:f.localStorageKey)&&localStorage.setItem(f.localStorageKey,String(e)),null==f||f.onChange(e)},searchPlaceholder:p}),b&&(0,r.jsx)(u,{filters:b.filters,onRemoveFilter:b.onRemoveFilter,onClearAll:b.onClearAll,filterType:b.filterType}),l?(0,r.jsx)("div",{className:"animate-pulse",children:(0,r.jsx)("div",{className:"h-64 bg-gray-200 dark:bg-dashboard-card-collapsed rounded-lg"})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full border border-text-secondary/30 rounded-lg",children:[(0,r.jsx)("thead",{children:(0,r.jsx)("tr",{className:"bg-text-secondary/10 dark:bg-dashboard-card-collapsed text-center",children:a.map(e=>(0,r.jsx)("th",{className:(0,y.cn)("py-3 px-4 text-sm font-medium text-text-secondary whitespace-nowrap","left"===e.align?"text-left":"right"===e.align?"text-right":"text-center",e.headerClassName),children:e.header},e.key))})}),(0,r.jsx)("tbody",{children:0===t.length?(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:a.length,className:"py-8 text-center text-text-secondary",children:s})}):t.map((e,t)=>(0,r.jsx)("tr",{className:"border-b border-text-secondary/30 hover:bg-text-secondary/5 dark:hover:bg-text-secondary/5 transition-colors text-center",children:a.map(a=>(0,r.jsx)("td",{className:(0,y.cn)("py-3 px-4 text-sm text-text-secondary whitespace-nowrap","left"===a.align?"text-left":"right"===a.align?"text-right":"text-center",a.className),children:a.render(e,t)},a.key))},v?v(e,t):t))})]})}),g&&g.lastPage>1&&(0,r.jsx)(i.d,{currentPage:g.currentPage,lastPage:g.lastPage,onPageChange:g.onPageChange})]}),b&&(0,r.jsx)(h,{isOpen:b.isOpen,onClose:b.onClose,onApply:b.onApply,filterType:b.filterType,currentFilters:b.filters,translationNamespace:b.translationNamespace})]})}},81157:(e,t,a)=>{a.d(t,{D:()=>o});var r=a(95155),n=a(12115),l=a(86651),s=a(902),d=a(346);let o=(0,n.forwardRef)((e,t)=>{let{className:a,wrapperClassName:n,iconClassName:o,...i}=e,c="ar"===(0,s.Ym)();return(0,r.jsxs)("div",{className:(0,d.cn)("relative w-full",n),children:[(0,r.jsx)("input",{ref:t,dir:c?"rtl":"ltr",className:(0,d.cn)("w-full rounded-xl bg-dashboard-card-collapsed py-2.5 text-sm text-dynamic-secondary-500 placeholder:text-dynamic-secondary-500/50 border border-dynamic-secondary-500/50 dark:border-dynamic-secondary-500/10 outline-none transition-all peer",c?"pr-4 pl-12":"pl-4 pr-12",a),style:{textAlign:c?"right":"left"},...i}),(0,r.jsx)(l.A,{className:(0,d.cn)("w-5 h-5 absolute top-1/2 -translate-y-1/2 text-dynamic-secondary-500 peer-focus:text-dynamic-primary-500 transition-colors",c?"left-4":"right-4",o)})]})});o.displayName="SearchInput"}}]);
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.