1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1389],{6439:(e,r,t)=>{"use strict";t.d(r,{G:()=>n,j:()=>a});var l=t(1213);let a=()=>(0,l.wA)(),n=l.d4},18937:(e,r,t)=>{"use strict";t.d(r,{T:()=>l});let l=(e,r)=>{if("function"!=typeof window.fbq){let e=function(){for(var r=arguments.length,t=Array(r),l=0;l<r;l++)t[l]=arguments[l];e.callMethod?e.callMethod.apply(e,t):e.queue.push(t)};window._fbq||(window._fbq=e),e.push=e,e.loaded=!0,e.version="2.0",e.queue=[],window.fbq=e}let t=window.fbq;"function"==typeof t&&(r?t("track",e,r):t("track",e))}},22854:(e,r,t)=>{Promise.resolve().then(t.bind(t,80131)),Promise.resolve().then(t.bind(t,93769)),Promise.resolve().then(t.bind(t,99194)),Promise.resolve().then(t.bind(t,64707))},49717:(e,r,t)=>{"use strict";t.d(r,{v:()=>a});let l=["ar","en"];function a(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ar";if(!e||"string"!=typeof e)return null;let t=e.trim();try{t=decodeURIComponent(t)}catch(e){}if(!t.startsWith("/")||t.startsWith("//")||t.startsWith("/\\")||t.includes("://")||t.startsWith("\\"))return null;let a=t.replace(/^\/front(?=\/|\?|#|$)/,"");a||(a="/");let n=new RegExp("^\\/(".concat(l.join("|"),")(?=\\/|\\?|#|$)")),o=a.match(n),i=r;o&&(i=o[1],a=a.slice(o[0].length)),a&&""!==a?a.startsWith("?")||a.startsWith("#")?a="/".concat(a):a.startsWith("/")||(a="/".concat(a)):a="/";let s=a.split(/[?#]/)[0];if("/auth"===s||s.startsWith("/auth/"))return null;let d="";d="/"===a?"":a.startsWith("/?")||a.startsWith("/#")?a.slice(1):a;let c="/".concat(i).concat(d);return{pathname:a,locale:i,fullPath:c,browserUrl:"/front".concat(c)}}},57828:(e,r,t)=>{"use strict";t.d(r,{A:()=>l});let l=(0,t(71847).A)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},60890:(e,r,t)=>{"use strict";t.d(r,{A:()=>l});let l=(0,t(71847).A)("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]])},70532:(e,r,t)=>{"use strict";t.d(r,{A:()=>l});let l=(0,t(71847).A)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},80131:(e,r,t)=>{"use strict";t.d(r,{InstructionsModal:()=>v});var l=t(95155),a=t(12115),n=t(18955),o=t(70667),i=t(47065),s=t(20063),d=t(902),c=t(53455),u=t(21858);let m={get:async()=>{try{return await u.A.get("/terms-and-policies")}catch(t){var e,r;throw Error((null==t||null==(r=t.response)||null==(e=r.data)?void 0:e.error)||t.message||"Failed to fetch terms and policies")}}},p=async()=>(await m.get()).data;var h=t(36386),g=t(17237);function v(e){let{defaultOpen:r=!0,onClose:t}=e,u=(0,n.c)("common"),[m,v]=(0,a.useState)(r),b=(0,s.useRouter)(),f=(0,d.Ym)(),{webSettings:y}=(0,h.V)(),{termsAndPolicies:_,isTermsAndPoliciesLoading:x}=(e=>{var r;let{data:t,isLoading:l,error:a}=(0,c.I)({queryKey:["termsAndPolicies",null==e?void 0:e.termsUpdatedAt,null==e?void 0:e.policiesUpdatedAt],queryFn:p,staleTime:1/0,gcTime:864e5,retry:1,enabled:null==(r=null==e?void 0:e.enabled)||r});return{termsAndPolicies:t,isTermsAndPoliciesLoading:l,termsAndPoliciesError:a}})({termsUpdatedAt:null==y?void 0:y.terms_updated_at,policiesUpdatedAt:null==y?void 0:y.policies_updated_at});(0,a.useEffect)(()=>{v(r)},[r]);let w=()=>{b.push("/".concat(f,"/auth/login"))};return(0,l.jsx)(i.A,{open:m,onClose:w,title:u("instructionsTitle")||"Terms and Policies",maxWidth:"lg",closeOnOutsideClick:!1,footer:(0,l.jsxs)("div",{className:"flex justify-start gap-3",children:[(0,l.jsx)(o.$,{variant:"primary",onClick:()=>{v(!1),null==t||t()},disabled:x,children:u("agree")||"I Agree"}),(0,l.jsx)(o.$,{variant:"outline",onClick:w,children:u("back")||"Close"})]}),children:(0,l.jsx)("div",{className:"space-y-4",children:x?(0,l.jsx)("div",{className:"flex justify-center items-center py-12",children:(0,l.jsx)(g.y,{})}):(0,l.jsxs)(l.Fragment,{children:[(null==_?void 0:_.policy)&&(0,l.jsx)("div",{className:"prose prose-sm dark:prose-invert max-w-none overflow-y-auto",children:(0,l.jsx)("div",{className:"text-dynamic-secondary-500 leading-relaxed **:text-inherit! **:bg-transparent!",dangerouslySetInnerHTML:{__html:_.policy}})}),(null==_?void 0:_.terms)&&(0,l.jsx)("div",{className:"prose prose-sm dark:prose-invert max-w-none mt-6",children:(0,l.jsx)("div",{className:"text-dynamic-secondary-500 leading-relaxed **:text-inherit! **:bg-transparent!",dangerouslySetInnerHTML:{__html:_.terms}})}),(null==_?void 0:_.updated_at)&&(0,l.jsxs)("div",{className:"p-4 bg-dynamic-primary-50/5 font-bold rounded-lg border border-dynamic-primary-500/30 mt-6",children:[(0,l.jsx)("p",{className:"text-sm text-dynamic-primary-500",children:u("instructionsFooter")||"By clicking 'I Agree', you acknowledge that you have read and understand these terms and policies."}),(0,l.jsxs)("p",{className:"text-xs text-dynamic-primary-500 mt-2",children:[u("lastUpdated")||"L
1ast updated",":"," ",new Date(_.updated_at).toLocaleDateString(f,{year:"numeric",month:"long",day:"numeric"})]})]}),!(null==_?void 0:_.policy)&&!(null==_?void 0:_.terms)&&!x&&(0,l.jsx)("div",{className:"text-center py-8 text-text-secondary",children:u("noTermsAvailable")||"Terms and policies are not available at the moment."})]})})})}},85921:(e,r,t)=>{"use strict";t.d(r,{A:()=>l});let l=(0,t(71847).A)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]])},93769:(e,r,t)=>{"use strict";t.d(r,{SignupForm:()=>B});var l=t(95155),a=t(22544),n=t(66942),o=t(18955),i=t(902),s=t(12115),d=t(20063),c=t(80265),u=t(12168),m=t(8829),p=t(84544),h=t(18143),g=t(70667),v=t(17342),b=t(20676),f=t(23327),y=t(8842),_=t(17237),x=t(49717),w=t(3612),N=t(36386),j=t(43643),C=t(92176),k=t(17255),A=t(38015),S=t(9671),T=t(41580),I=t(39956),U=t(77378),P=t(6439),L=t(51581),R=t(95278),E=t(81835),O=t(1542),D=t(18937),M=t(96780);function B(){var e,r,t,B,W,F,q,z,G,V,J,$,H,Y,K,X,Q,Z,ee,er,et,el,ea,en,eo,ei,es,ed,ec;
1let[eu,em]=(0,s.useState)(null),[ep,eh]=(0,s.useState)(null),eg=(0,s.useRef)(null),ev=(0,o.c)("auth"),eb=(0,o.c)("validation"),ef=(0,y.rd)(),ey=(0,d.useSearchParams)(),e_=(0,P.j)(),{isLoading:ex,error:ew}=(0,P.G)(e=>e.auth),eN=(0,i.Ym)(),{registerSettings:ej,isRegisterSettingsLoading:eC}=(0,w.A)(),{webSettings:ek}=(0,N.A)(),eA=1===Number(null==ej?void 0:ej.show_countries_register),eS=1===Number(null==ej?void 0:ej.show_cities_register),eT=1===Number(null==ej?void 0:ej.show_school_name_in_register_form),{countries:eI,isCountriesLoading:eU}=(0,j.A)(eA),{schools:eP,isSchoolsLoading:eL}=(0,I.A)(eT),[eR,eE]=(0,s.useState)(!1),eO=1===Number(null==ej?void 0:ej.telegram_registration_enabled),eD=1===Number(null==ej?void 0:ej.telegram_registration_mandatory),eM=eO&&!eD,eB=eO&&eD,[eW,eF]=(0,s.useState)(null),eq=eW||(eO?"telegram":"default"),ez=async e=>{eE(!0);try{let o=await (0,E.T)(e);if(o.success&&o.data){var r,t,l,a,n;if(o.data.user&&localStorage.setItem("vclasses_user_cache",JSON.stringify({user:o.data.user,setting_sidebar:o.data.setting_sidebar})),e_((0,L.Ne)(o.data)),ef.refresh(),(null==(r=o.data)?void 0:r.is_verified_email)===!1){let e=ey.get("returnUrl"),r=e?"?returnUrl=".concat(encodeURIComponent(e)):"";window.location.href="/front/".concat(eN,"/auth/verify-email").concat(r);return}let e=null==(l=o.data)||null==(t=l.user)?void 0:t.role;if(["admin","instructor","parent"].includes(e||""))window.location.href="".concat(window.location.origin,"/dashboard");else{let e=ey.get("returnUrl"),r=(0,x.v)(e,eN);if(r){if((null==(n=o.data)||null==(a=n.setting_sidebar)?void 0:a.show_overview)!==1&&("/dashboard"===r.pathname||"/dashboard/"===r.pathname)){window.location.href="".concat(window.location.origin,"/front/").concat(r.locale,"/dashboard/my-courses");return}ef.push(r.pathname,{locale:r.locale})}else window.location.href="".concat(window.location.origin,"/front/").concat(eN,"/dashboard")}}else{let e=o.error||o.message||"Telegram login failed";e_((0,L.zv)(e)),eE(!1)}}catch(r){let e=r.message||"Telegram login failed";e_((0,L.zv)(e)),eE(!1)}},eG=(0,c.aH)(ej,eb),{register:eV,handleSubmit:eJ,formState:{errors:e$,isSubmitted:eH},watch:eY,setValue:eK,trigger:eX}=(0,a.mN)({resolver:(0,n.u)(eG),mode:"onBlur",defaultValues:{gender:"male",phone:"",parentPhone:"",country:"",city:"",sc
1hool:"",category:"",academicDepartment:"",center:"",centerTime:"",userCode:""}}),eQ=(0,s.useCallback)(()=>{setTimeout(()=>{let e=document.querySelector('[class*="text-red"], [class*="text-destructive"]');e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)},[]),eZ=Number(eY("country"))||(null==ek||null==(e=ek.default_country)?void 0:e.id)||64,{cities:e0,isCitiesLoading:e1}=(0,C.A)(eZ,eS),e2=1===Number(null==ej?void 0:ej.show_category_register),e5=1===Number(null==ej?void 0:ej.show_academic_department_register),{categories:e4,isCategoriesLoading:e6}=(0,k.A)(e2),e7=eY("category"),e3=e2&&Number(e7)||void 0,{academicDepartments:e9,isAcademicDepartmentsLoading:e8}=(0,A.A)(e5?e3:void 0),re=1===Number(null==ej?void 0:ej.show_center_in_register_form),{centers:rr,isCentersLoading:rt}=(0,S.A)(re,e3),rl=Number(eY("center"))||void 0,ra=1===Number(null==ej?void 0:ej.show_center_times),{centerTimes:rn,isCenterTimesLoading:ro}=(0,T.A)(ra?e3:void 0,ra?rl:void 0),ri=1===Number(null==ej?void 0:ej.show_online_and_center_input),rs=1===Number(null==ej?void 0:ej.show_student_groups),rd=1===Number(null==ej?void 0:ej.show_user_code),rc=eY("attendanceType"),ru=rs&&!(ri&&"center"!==rc),rm=ri&&"center"!==rc,rp=rd&&!(ri&&"center"!==rc);(0,s.useEffect)(()=>{"online"===rc&&(eK("studentGroupId",""),eK("userCode",""))},[rc,eK]);let{studentGroups:rh,isLoading:rg,hasNextPage:rv,fetchNextPage:rb,isFetchingNextPage:rf}=(0,U.A)(ru,e3),ry=(0,s.useCallback)(e=>{let{scrollTop:r,clientHeight:t,scrollHeight:l}=e.currentTarget;l-r<=t+10&&rv&&!rf&&rb()},[rv,rf,rb]);(0,s.useEffect)(()=>{if(!eU&&eI&&eI.length&&!eY("country")){if(null==ek?void 0:ek.default_country){let e=eI.find(e=>{var r;return e.id===(null==(r=ek.default_country)?void 0:r.id)});if(e)return void eK("country",String(e.id))}let e=eI.find(e=>{let r=(e.nicename||e.name||"").toLowerCase();return"egypt"===r||"eg"===r});e&&eK("country",String(e.id))}},[eU,eI,null==ek||null==(r=ek.default_country)?void 0:r.id]),(0,s.useEffect)(()=>{!e1&&e0&&e0.length&&(eY("city")||eK("city",String(e0[0].id)))},[e1,e0]),(0,s.useEffect)(()=>{!eL&&eP&&eP.length&&(eY("school")||eK("school",String(eP[0].id)))},[eL,eP]),(0,s.useEffect)(()=>{!e6&&e4&&e4.length&&(eY("category")||eK("category",String(e4[0].id)))},[e6,e4]),(0,s.useEffect)(()=>{!e8&&e9&&e9.length&&(eY("academicDepartment")||eK("academicDepartment",String(e9[0].id)))},[e8,e9]),(0,s.useEffect)(()=>{!rt&&rr&&rr.length&&(eY("center")||eK("center",String(rr[0].id)))},[rt,rr]),(0,s.useEffect)(()=>{!ro&&rn&&rn.length&&(eY("centerTime")||eK("centerTime",String(rn[0].id)))},[ro,rn]);let r_=async e=>{console.log("â
Form submitted with data:",e),console.log("Form errors:",e$),e_((0,L.Bj)());let r=navigator.userAgent,t=localStorage.getItem("device_token");t||(t=crypto.randomUUID(),localStorage.setItem("device_token",t)),e.deviceName=r,e.deviceToken=t;let l=(0,M.n9)();(null==l?void 0:l.carts)&&(e.guest_cart=l.carts);try{console.log("Calling signupUser server action...");let r=await (0,R.E)(e);if(console.log("Server action response:",r),r.success&&r.data){var a,n,o,i,s,d,c,u,m,p,h,g;if(r.data.user&&localStorage.setItem("vclasses_user_cache",JSON.stringify({user:r.data.user,setting_sidebar:r.data.setting_sidebar})),e_((0,L.oX)(r.data)),l&&(0,M.Mb)(),(0,D.T)("CompleteRegistration",{status:!0}),(null==(a=r.data)?void 0:a.is_verified_email)===!1){let e=ey.get("returnUrl"),r=e?"?returnUrl=".concat(encodeURIComponent(e)):"";window.location.href="/front/".concat(eN,"/auth/verify-email").concat(r);return}if((null==(n=r.data)?void 0:n.is_verified_mobile)===!1){let e=ey.get("returnUrl"),r=e?"?returnUrl=".concat(encodeURIComponent(e)):"";window.location.href="/front/".concat(eN,"/auth/verify-mobile").concat(r);return}if((null==(o=r.data)?void 0:o.is_approved)===!1||(null==(s=r.data)||null==(i=s.user)?void 0:i.is_approved)===!1){window.location.href="/front/".concat(eN,"/unapproved");return}if((null==(d=r.data)?void 0:d.is_paid)===!1||(null==(u=r.data)||null==(c=u.user)?void 0:c.is_paid)===!1)return void ef.push("/checkout");ef.refresh();let e=ey.get("returnUrl"),t=(0,x.v)(e,eN);if(t){if((null==(g=r.data)||null==(h=g.setting_sidebar)?void 0:h.show_overview)!==1&&("/dashboard"===t.pathname||"/dashboard/"===t.pathname)){window.location.href="".concat(window.location.origin,"/front/").concat(t.locale,"/dashboard/my-courses");return}ef.push(t.pathname,{locale:t.locale});return}
1let v=(null==(p=r.data)||null==(m=p.setting_sidebar)?void 0:m.show_overview)===1,b=null==ek?void 0:ek.default_page;"home"===b?window.location.href="".concat(window.location.origin,"/front/").concat(eN):"category"===b?window.location.href="".concat(window.location.origin,"/front/").concat(eN,"/browse-courses"):"cart"===b?window.location.href="".concat(window.location.origin,"/front/").concat(eN,"/cart"):"instructors"===b?window.location.href="".concat(window.location.origin,"/front/").concat(eN,"/instructors"):"products"===b?window.location.href="".concat(window.location.origin,"/front/").concat(eN,"/marketplace"):v?ef.push("/dashboard"):window.location.href="".concat(window.location.origin,"/front/").concat(eN,"/dashboard/my-courses")}else e_((0,L.zv)(r.error||r.message||"Registration failed"))}catch(e){e_((0,L.zv)(e.message||"Registration failed. Please try again."))}};return(0,l.jsxs)("div",{className:"space-y-5",children:[eM&&(0,l.jsxs)("div",{className:"flex p-1 bg-dashboard-card-collapsed border border-dynamic-secondary-500/20 rounded-xl mb-6",children:[(0,l.jsxs)("button",{type:"button",onClick:()=>eF("telegram"),className:"flex-1 flex items-center justify-center gap-2 py-2.5 text-sm font-medium rounded-lg transition-colors ".concat("telegram"===eq?"bg-dashboard-card text-[#49A4FF] shadow-sm border border-dynamic-secondary-500/10":"text-dynamic-secondary-500/60 hover:text-dynamic-secondary-500"),children:[(0,l.jsx)("svg",{className:"w-4 h-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,l.jsx)("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.892-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})}),ev("telegramLoginTab")||"تسجÙ٠عبر تÙÙÙØ¬Ø±Ø§Ù
"]}),(0,l.jsxs)("button",{type:"button",onClick:()=>eF("default"),className:"flex-1 flex items-center justify-center gap-2 py-2.5 text-sm font-medium rounded-lg transition-colors ".concat("default"===eq?"bg-dashboard-card text-dynamic-primary-500 shadow-sm border border-dynamic-secondary-500/10":"text-dynamic-secondary-500/60 hover:text-dynamic-secondary-500"),children:[(0,l.jsx)("svg",{className:"w-4 h-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z"})}),ev("defaultLoginTab")||"Ø§ÙØ¨Ø±Ùد / اÙÙØ§ØªÙ"]})]}),eB||eM&&"telegram"===eq?(0,l.jsxs)("div",{className:"flex flex-col items-center justify-center space-y-6 py-4",children:[(0,l.jsx)("p",{className:"text-center text-sm text-dynamic-secondary-500/80",children:ev("telegramLoginDescription")||"اضغط عÙÙ Ø§ÙØ²Ø± Ø£Ø¯ÙØ§Ù ÙØªØ³Ø¬ÙÙ Ø§ÙØ¯Ø®Ù٠عبر ØØ³Ø§Ø¨ تÙÙÙØ¬Ø±Ø§Ù
Ø§ÙØ®Ø§Øµ Ø¨Ø§ÙØ·Ø§Ùب"}),(0,l.jsx)(O.B,{onSuccess:ez,onError:e=>e_((0,L.zv)(e)),disabled:ex||eR,text:ev("continueWithTelegram")||"Log in with Telegram"}),ew&&(0,l.jsx)("div",{className:"w-full p-3 border border-red-500 text-red-500 rounded-lg text-sm animate-in fade-in slide-in-from-top-2 duration-300 whitespace-pre-line text-center",children:ew})]}):(0,l.jsxs)("form",{onSubmit:eJ(r_,eQ),noValidate:!0,className:"space-y-3",children:[eC&&(0,l.jsx)(_.y,{}),ew&&(0,l.jsx)("div",{className:"p-3 bg-red-500/10 border border-red-500/30 rounded-lg text-xs animate-in fade-in slide-in-from-top-2 duration-300",children:ew.includes("\n")?(0,l.jsx)("ul",{className:"list-disc list-inside text-red-500 space-y-0.5",children:ew.split("\n").map((e,r)=>(0,l.jsx)("li",{children:e},r))}):(0,l.jsx)("p",{className:"text-red-500",children:ew})}),eH&&Object.keys(e$).length>0&&(0,l.jsxs)("div",{className:"p-3 bg-red-500/10 border border-red-500/30 rounded-lg text-xs animate-in fade-in slide-in-from-top-2 duration-300",children:[(0,l.jsx)("p",{className:"text-red-500 font-semibold mb-1",children:ev("pleaseFixErrors")||"ÙØ±Ø¬Ù تصØÙØ Ø§ÙØ£Ø®Ø·Ø§Ø¡ Ø§ÙØªØ§ÙÙØ©:"}),(0,l.jsx)("ul",{className:"list-disc list-inside text-red-400 space-y-0.5",children:Object.entries(e$).map(e=>{let[r,t]=e;return(0,l.jsx)("li",{children:(null==t?void 0:t.message)||r},r)})})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[(null==ej?void 0:ej.username_type)==="splited"?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(m.p,{label:ev("firstName"),placeholder:ev("enterFirstName"),...eV("fname"),error:null==(t=e$.fname)?void 0:t.message}),(0,l.jsx)(m.p,{label:ev("lastName"),placeholder:ev("enterLastName"),...eV("lname"),error:null==(B=e$.lname)?void 0:B.message})]}):(0,l.jsx)(m.p,{label:ev("name"),placeholder:ev("enterName"),...eV("name"),error:null==(W=e$.name)?void 0:W.message}),1===Number(null==ej?void 0:ej.show_mobile)&&1!==Number(null==ej?void 0:ej.show_email)?(0,l.jsx)(h.LR,{label:ev("phoneNumber"),value:eY("phone"),onChange:e=>eK("phone",e||"",{shouldValidate:!!e$.phone}),onBlur:()=>eX("phone"),error:null==(F=e$.phone)?void 0:F.message}):(0,l.jsx)(m.p,{label:ev("email"),type:"email",placeholder:ev("enterEmail"),...eV("email"),error:null==(q=e$.email)?void 0:q.message}),(0,l.jsx)(p.y,{label:ev("password"),placeholder:ev("enterPassword"),...eV("password"),error:null==(z=e$.password)?void 0:z.message}),(0,l.jsx)(p.y,{label:ev("confirmPassword"),placeholder:ev("enterPassword"),...eV("confirmPassword"),error:null==(G=e$.confirmPassword)?void 0:G.message}),1===Number(null==ej?void 0:ej.show_mobile)&&1===Number(null==ej?void 0:ej.show_email)&&(0,l.jsx)(h.LR,{label:ev("phoneNumber"),value:eY("phone"),onChange:e=>eK("phone",e||"",{shouldValidate:!!e$.phone}),onBlur:()=>eX("phone"),error:null==(V=e$.phone)?void 0:V.message}),1===Number(null==ej?void 0:ej.show_parent_mobile)&&(0,l.jsx)(h.LR,{label:ev("parentPhone"),value:eY("parentPhone"),onChange:e=>eK("parentPhone",e||"",{shouldValidate:!!e$.parentPhone}),onBlur:()=>eX("parentPhone"),error:null==(J=e$.parentPhone)?void 0:J.message}),1===Number(null==ej?void 0:ej.show_school_name_in_register_form)&&(0,l.jsx)(v.A,{label:ev("school"),value:eY("school")||"",onChange:e=>eK("school",e),options:eP&&eP.length>0?eP.map(e=>({value:String(e.id),label:e.name})):[{value:"",label:eL?ev("loading"):ev("selectSchool")}],disabled:eL||!eP||0===eP.length,placeholder:ev("selectSchool"),searchable:!0,error:null==($=e$.school)?void 0:$.message}),1===Number(null==ej?void 0:ej.enable_gender_in_register)&&(0,l.jsx)(v.A,{label:ev("gender"),value:eY("gender")||"",onChange:e=>eK("gender",e),options:(0,u.rd)(ev,"genders"),placeholder:ev("gender"),error:null==(H=e$.gender)?void 0:H.message}),1===Number(null==ej?void 0:ej.show_category_register)&&(0,l.jsx)(v.A,{label:ev("academicYear"),value:eY("category")||"",onChange:e=>
1eK("category",e),options:e4&&e4.length>0?e4.map(e=>({value:String(e.id),label:e6?ev("loading"):e.title||e.nicename})):[{value:"",label:e6?ev("loading"):ev("selectCategory")}],placeholder:ev("selectCategory"),searchable:!0,error:null==(Y=e$.category)?void 0:Y.message,disabled:e6}),1===Number(null==ej?void 0:ej.show_academic_department_register)&&(0,l.jsx)(v.A,{label:ev("academicDepartment"),value:eY("academicDepartment")||"",onChange:e=>eK("academicDepartment",e),options:e9&&e9.length>0?e9.map(e=>({value:String(e.id),label:e6?ev("loading"):e.name||e.title})):[{value:"",label:e8?ev("loading"):ev("selectAcademicDepartment")}],placeholder:ev("selectAcademicDepartment"),searchable:!0,error:null==(K=e$.academicDepartment)?void 0:K.message,disabled:e8||!e9||0===e9.length}),ri&&(0,l.jsx)(v.A,{label:ev("attendanceType"),value:eY("attendanceType")||"",onChange:e=>eK("attendanceType",e),options:[{value:"center",label:ev("centerAttendance")},{value:"online",label:ev("onlineAttendance")}],placeholder:ev("selectAttendanceType"),error:null==(X=e$.attendanceType)?void 0:X.message}),ru&&(0,l.jsx)(v.A,{label:(0,l.jsxs)("div",{className:"flex items-center gap-1",children:[ev("studentGroup"),(0,l.jsx)(b.m,{content:ev("studentGroupTooltip"),side:"top",children:(0,l.jsx)(f.A,{className:"w-4 h-4 text-text-secondary cursor-help hover:text-dynamic-primary-500 transition-colors"})})]}),value:eY("studentGroupId")||"",onChange:e=>eK("studentGroupId",e),options:rh&&rh.length>0?rh.filter(Boolean).map(e=>({value:String(e.id),label:rg?ev("loading"):e.title||e.name})):[{value:"",label:rg?ev("loading"):ev("noGroups")}],placeholder:ev("selectStudentGroup"),searchable:!0,onScroll:ry,error:null==(Q=e$.studentGroupId)?void 0:Q.message,disabled:rm}),1===Number(null==ej?void 0:ej.show_center_in_register_form)&&(0,l.jsx)(v.A,{label:ev("center"),value:eY("center")||"",onChange:e=>eK("center",e),options:rr&&rr.length>0?rr.map(e=>({value:String(e.id),label:rt?ev("loading"):e.name||e.title})):[{value:"",label:rt?ev("loading"):ev("selectCenter")}],placeholder:ev("selectCenter"),searchable:!0,error:null==(Z=e$.center)?void 0:Z.message,disabled:rt||!rr||0===rr.length}),1===Number(null==ej?void 0:ej.show_center_in_register_form)&&1===Number(null==ej?void 0:ej.show_center_times)&&(0,l.jsx)(v.A,{label:ev("centerTime"),value:eY("centerTime")||"",onChange:e=>eK("centerTime",e),options:rn&&rn.length>0?rn.map(e=>({value:String(e.id),label:ro?ev("loading"):e.title})):[{value:"",label:ro?ev("loading"):ev("selectCenterTime")}],placeholder:ev("selectCenterTime"),searchable:!0,error:null==(ee=e$.centerTime)?void 0:ee.message,disabled:ro||!rn||0===rn.length}),1===Number(null==ej?void 0:ej.show_countries_register)&&(0,l.jsx)(v.A,{label:ev("country"),value:eY("country")||"",onChange:e=>eK("country",e),options:eI&&eI.length>0?eI.map(e=>({value:String(e.id),label:eU?ev("loading"):e.nicename})):[{value:"",label:eU?ev("loading"):ev("selectCountry")}],placeholder:ev("selectCountry"),searchable:!0,error:null==(er=e$.country)?void 0:er.message,disabled:eU||!eI||0===eI.length}),1===Number(null==ej?void 0:ej.show_cities_register)&&1===Number(null==ej?void 0:ej.show_countries_register)&&(0,l.jsx)(v.A,{label:ev("city"),value:eY("city")||"",onChange:e=>eK("city",e),options:e0&&e0.length>0?e0.map(e=>({value:String(e.id),label:e.name})):[{value:"",label:e1?ev("loading"):ev("selectCity")}],placeholder:ev("selectCity"),searchable:!0,error:null==(et=e$.city)?void 0:et.message,disabled:e1||!e0||0===e0.length}),1===Number(null==ej?void 0:ej.show_national_id_register)&&(0,l.jsx)(m.p,{label:ev("nationalId"),placeholder:ev("enterNationalId"),...eV("nationalId"),error:null==(el=e$.nationalId)?void 0:el.message}),1===Number(null==ej?void 0:ej.show_place_of_residence_register)&&(0,l.jsx)(m.p,{label:ev("placeOfResidence"),placeholder:ev("enterPlaceOfResidence"),...eV("placeOfResidence"),error:null==(ea=e$.placeOfResidence)?void 0:ea.message}),1===Number(null==ej?void 0:ej.show_date_of_birth_register)&&(0,l.jsx)(m.p,{label:ev("dateOfBirth"),type:"date",...eV("dateOfBirth"),error:null==(en=e$.dateOfBirth)?void 0:en.message}),1===Number(null==ej?void 0:ej.parent_job)&&(0,l.jsx)(m.p,{label:ev("parentJob"),placeholder:ev("enterParentJob"),...eV("parentJob"),error:null==(eo=e$.parentJob)?void 0:eo.message}),1===Number(null==ej?void 0:ej.coupon_on_register)&&(0,l.jsx)(m.p,{label:ev("coupon"),placeholder:ev("enterCoupon"),...eV("coupon"),error:null==(ei=e$.coupon)?void 0:ei.message}),rp&&(0,l.jsx)(m.p,{label:ev("userCode"),placeholder:ev("enterUserCode"),...eV("userCode"),error:null==(es=e$.userCode)?void 0:es.message}),1===Number(null==ej?void 0:ej.user_image_required)&&(0,l.jsxs)("div",{className:"md:col-span-2",children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-dynamic-secondary-500 mb-2",children:ev("userImage")}),(0,l.jsx)("input",{type:"file",accept:"image/jpeg,image/jpg,image/png,image/webp",onChange:e=>{var r;let t=(null==(r=e.target.files)?void 0:r[0])||null;if(t){eK("userImage",t);let e=new FileReader;e.onloadend=()=>{eh(e.result)}
1,e.readAsDataURL(t)}else eh(null)},className:"block w-full bg-dashboard-card-collapsed border border-dynamic-secondary-500/70 dark:border-dynamic-secondary-500/20 rounded-lg p-2 text-sm cursor-pointer file:py-2 file:px-4 file:rounded-md file:border-0 file:text-sm file:font-semibold file:bg-dynamic-primary-50 file:text-dynamic-primary-500 hover:file:bg-dynamic-primary-100 file:cursor-pointer text-dynamic-secondary-500 placeholder:text-dynamic-secondary-500/50"}),ep&&(0,l.jsxs)("div",{className:"relative w-full max-w-xs mt-2",children:[(0,l.jsx)("img",{src:ep,alt:"User Image Preview",className:"w-full h-48 object-cover rounded-lg border border-text-secondary/30 shadow-md"}),(0,l.jsx)("button",{type:"button",onClick:()=>{eh(null),eK("userImage",null)},className:"absolute top-2 right-2 bg-red-500 hover:bg-red-600 text-white rounded-full p-1.5 transition-colors duration-200","aria-label":"Remove image",children:(0,l.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),e$.userImage&&(0,l.jsx)("p",{className:"text-sm text-red-500 mt-1",children:null==(ed=e$.userImage)?void 0:ed.message})]}),1===Number(null==ej?void 0:ej.enable_id_photo)&&(0,l.jsxs)("div",{className:"md:col-span-2",children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-dynamic-secondary-500 mb-2",children:ev("idPhoto")}),(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsx)("input",{ref:eg,type:"file",accept:"image/jpeg,image/jpg,image/png,image/webp",onChange:e=>{var r;let t=(null==(r=e.target.files)?void 0:r[0])||null;if(t){eK("idPhoto",t);let e=new FileReader;e.onloadend=()=>{em(e.result)},e.readAsDataURL(t)}else em(null)},className:"block w-full bg-dashboard-card-collapsed border border-dynamic-secondary-500/70 dark:border-dynamic-secondary-500/20 rounded-lg p-2 text-sm cursor-pointer file:py-2 file:px-4 file:rounded-md file:border-0 file:text-sm file:font-semibold file:bg-dynamic-primary-50 file:text-dynamic-primary-500 hover:file:bg-dynamic-primary-100 file:cursor-pointer text-dynamic-secondary-500 placeholder:text-dynamic-secondary-500/50"}),eu&&(0,l.jsxs)("div",{className:"relative w-full max-w-xs",children:[(0,l.jsx)("img",{src:eu,alt:"ID Photo Preview",className:"w-full h-48 object-cover rounded-lg border border-text-secondary/30 shadow-md"}),(0,l.jsx)("button",{type:"button",onClick:()=>{em(null),eK("idPhoto",null),eg.current&&(eg.current.value="")},className:"absolute top-2 right-2 bg-red-500 hover:bg-red-600 text-white rounded-full p-1.5 transition-colors duration-200","aria-label":"Remove image",children:(0,l.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),e$.idPhoto&&(0,l.jsx)("p",{className:"text-sm text-red-500 mt-1",children:null==(ec=e$.idPhoto)?void 0:ec.message})]})]}),(0,l.jsx)(g.$,{type:"submit",variant:"primary",className:"my-8",disabled:ex||eC,center:!0,children:ex?ev("loading"):ev("signUp")})]}),(0,l.jsx)("div",{className:"text-center space-y-3 pt-4 border-t border-dynamic-secondary-500/20",children:(0,l.jsxs)("p",{className:"text-sm text-dynamic-secondary-500",children:[ev("alreadyHaveAccount")," ",(0,l.jsx)(y.N_,{href:"/auth/login",className:"text-dynamic-primary-500 hover:text-dynamic-primary-600 font-semibold",children:ev("loginLink")})]})})]})}},96780:(e,r,t)=>{"use strict";t.d(r,{$t:()=>s,DE:()=>i,Mb:()=>o,n9:()=>c,xW:()=>a,zL:()=>d});let l="guest_cart",a=()=>{try{let e=localStorage.getItem(l);if(e)return JSON.parse(e)}catch(e){console.error("Error reading guest cart:",e)}return[]},n=e=>{localStorage.setItem(l,JSON.stringify(e))},o=()=>{localStorage.removeItem(l)},i=()=>{let e=a(),r=0;return e.forEach(e=>{r+=Number(e.offer_price||e.price||0)*(e.amount||1)}),{success:!0,data:{cart:e,meta:{count:e.length,total_price:r,offer_total:r,coupon_discount:0}}}};async function s(e,r,t,l){let o=a();if(o.some(t=>t[e]===r))return{success:!0,message:"alreadyInCart"};let i={id:Math.floor(1e6*Math.random()),amount:1,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),product_id:null,class_id:null,chapter_id:null,course_id:null,bundle_id:null,installment_id:l||null};return i[e]=r,t?(i.price=Number(t.price)||0,i.offer_price=Number(t.offer_price)||Number(t.price)||0,"plan_id"===e?(i.type="PLAN",
1i.plan_id=r,i.plan={id:r,name:t.title||"Unknown Plan",price:Number(t.price)||0,invoice_period:t.invoice_period||1,invoice_interval:t.invoice_interval||"month",image:t.image||""}):"bundle_id"===e?(i.type="BUNDLE",i.bundle={id:r,title:t.title||"Unknown Bundle",preview_image:t.image||"",price:Number(t.price)||0,discount_price:Number(t.offer_price)||0,slug:t.slug||"",detail:""}):"product_id"===e?(i.type="PRODUCT",i.product={id:r,title:t.title||"Unknown Product",main_image:t.image||"",price:Number(t.price)||0,discount_price:Number(t.offer_price)||0,slug:t.slug||"",type:"physical",maximum_per_orders:"1",is_wholesales_available:0,status:1,featured:0}):(i.type="COURSE",i.course={id:r,title:(null==t?void 0:t.title)||"Unknown Course",preview_image:t.image||"",price:Number(t.price)||0,discount_price:Number(t.offer_price)||0,slug:t.slug||"",course_mode:t.course_mode||("event_id"===e?"live":"recorded"),short_detail:"",detail:"",classes_count:0,completed_classes_count:0,progress:0,instructor_name:"",category_name:"",course_url:"",wrong_questions_count:0,reviews_score:null})):(i.type="course_id"===e?"COURSE":"bundle_id"===e?"BUNDLE":"plan_id"===e?"PLAN":"product_id"===e?"PRODUCT":"COURSE",i.price=0,i.offer_price=0),o.push(i),n(o),{success:!0,message:"addedToCart"}}let d=e=>(n(a().filter(r=>r.id!==e)),{success:!0,message:"removedFromCart"}),c=()=>{let e=a();return 0===e.length?null:{carts:e.map(e=>{var r,t,l;let a=e.course_id||(null==(r=e.course)?void 0:r.id)||null,n=e.bundle_id||(null==(t=e.bundle)?void 0:t.id)||null,o=e.event_id||null;return{product_id:e.product_id||(null==(l=e.product)?void 0:l.id)||null,class_id:e.class_id||null,chapter_id:e.chapter_id||null,course_id:a,bundle_id:n,bundle_event_id:e.bundle_event_id||null,plan_id:e.plan_id||null,installment_id:e.installment_id||null,user_id:null,coupon_id:e.coupon_id||null,event_id:o,price:Number(e.offer_price||e.price||0)}})}}}},e=>{e.O(0,[1900,5592,3957,902,4517,2619,1279,1029,5125,3455,1213,9474,9267,1904,6342,5268,2989,346,3492,7291,9194,265,598,8441,4696,7358],()=>e(e.s=22854)),_N_E=e.O()}]);
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.