PageSourceSearch

https://groovio.com.au/main-a2d7e939.794e484d.js

js groovio.com.au collected 2026-09-24 10:58:56 UTC 114,301 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkgroovio=globalThis.webpackChunkgroovio||[]).push([[5165],{SCjA(e,l,i){i.d(l,{A:()=>ie});var n=i("nKUr"),a=i("q1tI"),t=i("i8i4"),d=i("SOjZ"),o=i("V4z/"),s=i("g02y"),r=i("vvQw"),c=i("dPCp"),u=i("AxZp"),v=i("jRZa"),m=i("a3U3"),h=i("+OOn"),b=i("j//y"),p=i("D4mq"),f=i("CbZc"),x=i("XLSA"),g=i("KzI2"),j=i("XGlT"),N=i("tYjL"),_=i("wd/R"),y=i.n(_),w=i("sFi+"),k=i("5S9M"),S=i("b1Ll"),C=i("g+/w"),A=i("49WC"),T=i("i3Io"),M=i("QYlo"),E=i("JMoi"),q=i("JTCq"),F=i("vj2F"),B=i("b2JF"),I=i("DcvE"),L=i("PSD3"),P=i.n(L),R=i("GE9s"),D=i("gSgn"),O=i("js9I"),Y=i("QHYu"),z=i("kojY"),U=i("5haO"),G=i("JcK8"),H=i("Xot0"),V=i("x1Am"),W=i("e1Qx"),Z=i("g3ms"),Q=i("ulkv"),K=i("qVPw"),X=i("QZ+M"),J=function(){return J=Object.assign||function(e){for(var l,i=1,n=arguments.length;i<n;i++)for(var a in l=arguments[i])Object.prototype.hasOwnProperty.call(l,a)&&(e[a]=l[a]);return e},J.apply(this,arguments)},$=function(e,l,i,n){return new(i||(i=Promise))(function(a,t){function d(e){try{s(n.next(e))}catch(e){t(e)}}function o(e){try{s(n.throw(e))}catch(e){t(e)}}function s(e){var l;e.done?a(e.value):(l=e.value,l instanceof i?l:new i(function(e){e(l)})).then(d,o)}s((n=n.apply(e,l||[])).next())})},ee=function(e,l){var i,n,a,t={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},d=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return d.next=o(0),d.throw=o(1),d.return=o(2),"function"==typeof Symbol&&(d[Symbol.iterator]=function(){return this}),d;function o(o){return function(s){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;d&&(d=0,o[0]&&(t=0)),t;)try{if(i=1,n&&(a=2&o[0]?n.return:o[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;switch(n=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return t.label++,{value:o[1],done:!1};case 5:t.label++,n=o[1],o=[0];continue;case 7:o=t.ops.pop(),t.trys.pop();continue;default:if(!(a=t.trys,(a=a.length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){t=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){t.label=o[1];break}if(6===o[0]&&t.label<a[1]){t.label=a[1],a=o;break}if(a&&t.label<a[2]){t.label=a[2],t.ops.push(o);break}a[2]&&t.ops.pop(),t.trys.pop();continue}o=l.call(e,t)}catch(e){o=[6,e],n=0}finally{i=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},le=function(e,l,i){if(i||2===arguments.length)for(var n,a=0,t=l.length;a<t;a++)!n&&a in l||(n||(n=Array.prototype.slice.call(l,0,a)),n[a]=l[a]);return e.concat(n||Array.prototype.slice.call(l))};const ie=function(){var e,l,i,_,L,ie,ne,ae,te,de,oe,se,re,ce,ue,ve,me,he,be,pe,fe,xe,ge,je,Ne,_e,ye,we,ke,Se,Ce,Ae,Te,Me,Ee,qe,Fe,Be,Ie,Le,Pe,Re,De,Oe,Ye,ze,Ue,Ge,He,Ve,We,Ze,Qe,Ke,Xe,Je,$e,el,ll,il,nl,al,tl,dl,ol,sl,rl,cl,ul,vl,ml,hl,bl,pl,fl,xl,gl,jl,Nl,_l,yl,wl,kl,Sl,Cl,Al,Tl,Ml,El,ql,Fl,Bl,Il,Ll,Pl,Rl,Dl,Ol,Yl,zl,Ul,Gl,Hl,Vl,Wl,Zl,Ql,Kl,Xl,Jl,$l,ei,li,ii,ni,ai,ti,di,oi,si,ri,ci,ui,vi,mi,hi,bi,pi,fi,xi,gi,ji,Ni,_i,yi,wi,ki,Si,Ci,Ai,Ti,Mi,Ei,qi,Fi,Bi,Ii,Li,Pi,Ri,Di,Oi,Yi,zi,Ui,Gi,Hi,Vi,Wi,Zi,Qi,Ki,Xi,Ji,$i,en,ln,nn,an,tn,dn,on,sn,rn=(0,o.g)().id,cn=(0,d.ok)(),un=cn[0],vn=cn[1],mn=un.get("type")||"schedule",hn=un.get("date"),bn=un.get("action"),pn=(0,a.useState)(bn),fn=pn[0],xn=pn[1],gn=(0,r.wA)(),jn=(0,o.Zp)(),Nn=(0,o.zy)(),_n=(0,a.useState)(function(){var e=Nn.state||{};return{from:e.from,returnTo:e.returnTo}})[0],yn=_n.returnTo?_n.returnTo:"schedule"===_n.from?"".concat(s.OZ,"/schedule-list"):"".concat(s.OZ,"/available-service-list"),wn=(0,B.A)(),kn=(0,B.A)(),Sn=(0,B.A)(),Cn=(0,B.A)(),An=(0,a.useState)(null),Tn=An[0],Mn=An[1],En=(0,B.A)(),qn=(0,B.A)(),Fn=(0,B.A)(),Bn=(0,B.A)(),In=(0,B.A)(),Ln=(0,r.d4)(function(e){return e.GetStudioProfileState}).studio_profile_data,Pn=(0,I.V2)((null===(e=null==Ln?void 0:Ln.data)||void 0===e?void 0:e.terminologies)||[]),Rn=(0,r.d4)(function(e){return e.ServiceScheduleGetState}),Dn=(0,r.d4)(function(e){return e.GetSingleServicesDetailsState}),On=Dn.get_single_services_details_data,Yn=Dn.get_single_services_details_loading,zn=(0,r.d4)(function(e){return e.GetAllLocationListState}).get_location_list_data,Un=(0,r.d4)(function(e){return e.LocationViseRoomState}).location_vise_room_roomData,Gn=(0,r.d4)(function(e){return e.ServiceInstru
1ctorAllState}).serviceinstructorData,Hn=(0,r.d4)(function(e){return e.BookServiceScheduleState}),Vn=(0,r.d4)(function(e){return e.WaiverAttendeeSignState}),Wn=(0,r.d4)(function(e){return e.GetAllStudentState}).get_all_student_data,Zn=(null===(l=null==Ln?void 0:Ln.data)||void 0===l?void 0:l.currency_symbol)?null===(i=null==Ln?void 0:Ln.data)||void 0===i?void 0:i.currency_symbol:"",Qn=(0,r.d4)(function(e){return e.PermissionGetState}),Kn=(0,a.useState)(null),Xn=Kn[0],Jn=Kn[1],$n=(0,a.useState)(null),ea=$n[0],la=$n[1],ia=(0,a.useState)([]),na=ia[0],aa=ia[1],ta=(0,a.useState)(!1),da=ta[0],oa=ta[1],sa=(0,a.useState)({}),ra=sa[0],ca=sa[1],ua=(0,a.useState)(!1),va=ua[0],ma=ua[1],ha=(0,a.useState)(""),ba=ha[0],pa=ha[1],fa=(0,a.useState)(!1),xa=fa[0],ga=fa[1],ja=(0,a.useState)(!1),Na=ja[0],_a=ja[1],ya=(0,a.useState)(null),wa=ya[0],ka=ya[1],Sa=(0,a.useRef)(),Ca=(0,a.useRef)(null),Aa=(0,a.useRef)(null),Ta=(0,a.useRef)(!1),Ma=(0,a.useRef)(null),Ea=(0,a.useRef)(!1),qa=(0,a.useState)([]),Fa=qa[0],Ba=qa[1],Ia=(0,a.useState)(""),La=Ia[0],Pa=Ia[1],Ra=(0,a.useState)({}),Da=Ra[0],Oa=Ra[1],Ya=(0,a.useState)(""),za=Ya[0],Ua=Ya[1],Ga=(0,a.useState)({}),Ha=Ga[0],Va=Ga[1],Wa=(0,a.useState)({}),Za=Wa[0],Qa=Wa[1],Ka=(0,a.useState)(1),Xa=Ka[0],Ja=Ka[1],$a=(0,a.useState)(""),et=$a[0],lt=$a[1],it=(0,a.useState)(!1),nt=it[0],at=it[1],tt=(0,a.useState)(""),dt=tt[0],ot=tt[1],st=(0,a.useState)(),rt=st[0],ct=st[1],ut=(0,a.useState)(""),vt=ut[0],mt=ut[1],ht=(0,a.useState)(!1),bt=ht[0],pt=ht[1],ft=(0,a.useState)(""),xt=ft[0],gt=ft[1],jt=(0,a.useState)(!1),Nt=jt[0],_t=jt[1],yt=(0,a.useState)("students"),wt=yt[0],kt=yt[1],St=(0,a.useState)(!1),Ct=St[0],At=St[1],Tt=(0,a.useState)(!1),Mt=Tt[0],Et=Tt[1],qt=(0,a.useState)(!1),Ft=qt[0],Bt=qt[1],It=(0,a.useState)(null),Lt=It[0],Pt=It[1],Rt=(0,a.useState)([]),Dt=Rt[0],Ot=Rt[1],Yt=(0,a.useState)([]),zt=Yt[0],Ut=Yt[1],Gt=(0,a.useState)([]),Ht=Gt[0],Vt=Gt[1],Wt=(0,a.useState)(null),Zt=Wt[0],Qt=Wt[1],Kt=(0,a.useState)(""),Xt=Kt[0],Jt=Kt[1],$t=(0,a.useState)({}),ed=$t[0],ld=$t[1],id=(0,a.useState)("package"),nd=id[0],ad=id[1],td=(0,a.useState)(!1),dd=td[0],od=td[1],sd=(0,a.useState)(!1),rd=sd[0],cd=sd[1],ud=(0,a.useState)(!1),vd=ud[0],md=ud[1],hd=(0,a.useState)(!1),bd=hd[0],pd=(hd[1],(0,a.useState)(!1)),fd=pd[0],xd=(pd[1],(0,a.useState)(!1)),gd=xd[0],jd=xd[1],Nd=(0,a.useState)(null),_d=Nd[0],yd=Nd[1],wd=(0,a.useState)(!1),kd=wd[0],Sd=wd[1],Cd=(0,a.useState)(!1),Ad=Cd[0],Td=Cd[1],Md=(0,a.useState)(!1),Ed=Md[0],qd=Md[1],Fd=(0,a.useState)(!1),Bd=Fd[0],Id=Fd[1],Ld=O.Ik().shape({name:O.Yj().required("Name is required").min(2,"Name must be at least 2 characters"),email:O.Yj().email("Enter a valid email").required("Email is required")}),Pd=(0,R.mN)({resolver:(0,D.t)(Ld),defaultValues:{name:"",email:""}}),Rd=Pd.register,Dd=Pd.handleSubmit,Od=Pd.reset,Yd=Pd.formState.errors;(0,a.useEffect)(function(){(null==Hn?void 0:Hn.status)&&(Qd(),gn((0,c.yE)({uuid:rn,type:mn,schedule_date:hn})),gn({type:F.jje,data:[]}))},[Hn]),(0,a.useEffect)(function(){return"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual"),window.scrollTo({top:0,left:0,behavior:"auto"}),function(){"scrollRestoration"in window.history&&(window.history.scrollRestoration="auto")}},[]),(0,a.useEffect)(function(){if(rn){gn((0,c.yE)({uuid:rn,type:mn,schedule_date:hn}));var e=(0,f.R7)(50,1,"");gn((0,v.jY)(e)),Bt(!1),null==En||En.reset(),gn({type:F.zbI,data:[]}),null==Bn||Bn.reset(),null==In||In.reset(),Td(!1),Ta.current=!1}},[rn,null==En?void 0:En.status,null==Vn?void 0:Vn.status,null==Bn?void 0:Bn.status,null==In?void 0:In.status]),(0,a.useEffect)(function(){var e,l;(null==Rn?void 0:Rn.status)&&!0===(null===(l=null===(e=null==Rn?void 0:Rn.data)||void 0===e?void 0:e.data)||void 0===l?void 0:l.is_deleted)&&P().fire({title:"Schedule Deleted",text:"This schedule has been deleted and is no longer available.",icon:"warning",confirmButtonText:"Go Back",confirmButtonColor:"rgb(26, 26, 58)",allowOutsideClick:!1,allowEscapeKey:!1}).then(function(e){e.isConfirmed&&jn(-1)})},[Rn,jn]);var zd="schedule"===mn?null===(L=null===(_=null==Rn?void 0:Rn.data)||void 0===_?void 0:_.data)||void 0===L?void 0:L.booking_details:null===(ie=null==Rn?void 0:Rn.data)||void 0===ie?void 0:ie.data;(0,a.useEffect)(function(){(null==Rn?void 0:Rn.status)&&"Canceled"===(null==zd?void 0:zd.booking_status)&&!Ta.current&&(Ta.current=!0,P().fire({title:"Booking Canceled",text:"This booking has been canceled and is no longer available.",icon:"warning",confirmButtonText:"Go Back",confirmButtonColor:"rgb(2
16, 26, 58)",allowOutsideClick:!1,allowEscapeKey:!1,didOpen:function(){var e=document.querySelector(".swal2-backdrop-show");e&&(e.style.backdropFilter="blur(5px)",e.style.setProperty("-webkit-backdrop-filter","blur(5px)"),e.style.backgroundColor="rgba(0, 0, 0, 0.4)")}}).then(function(e){e.isConfirmed&&jn(-1)})),"Canceled"!==(null==zd?void 0:zd.booking_status)&&(Ta.current=!1)},[null==Rn?void 0:Rn.status,null==zd?void 0:zd.booking_status,null==zd?void 0:zd.uuid,jn]),(0,a.useEffect)(function(){Sd(!1)},[null===(ne=null==zd?void 0:zd.user_detail)||void 0===ne?void 0:ne.profile_image]);var Ud="schedule"===mn?y()(hn+" "+y()(null===(te=null===(ae=null==Rn?void 0:Rn.data)||void 0===ae?void 0:ae.data)||void 0===te?void 0:te.local_start_datetime).format(null===z.ow||void 0===z.ow?void 0:z.ow.time)).format(null===z.ow||void 0===z.ow?void 0:z.ow.dateTime):y()(hn+" "+y()(null==zd?void 0:zd.local_start_datetime).format(null===z.ow||void 0===z.ow?void 0:z.ow.time)).format(null===z.ow||void 0===z.ow?void 0:z.ow.dateTime),Gd=(0,a.useMemo)(function(){var e=(null==zd?void 0:zd.attendees_record)?le([],null==zd?void 0:zd.attendees_record,!0):[],l=null==zd?void 0:zd.user_detail;if(!l)return e;var i=null==l?void 0:l.uuid,n=null==l?void 0:l.email,a=[null==l?void 0:l.first_name,null==l?void 0:l.last_name].filter(Boolean).join(" ")||n||"You",t=e.findIndex(function(e){return i&&e.uuid===i||n&&e.email===n});if(t>-1){var d=(null==e?void 0:e.splice(t,1))[0];e.unshift(J(J({},d),{name:(null==d?void 0:d.name)||a,email:(null==d?void 0:d.email)||n,isSelf:!0}))}else null==e||e.unshift({uuid:i,name:a,email:n,waiver_signed:!0,isSelf:!0});return e},[zd]);(0,a.useEffect)(function(){var e,l,i,n;(null===(l=null===(e=null==Rn?void 0:Rn.data)||void 0===e?void 0:e.data)||void 0===l?void 0:l.service_uuid)&&gn((0,u.NQ)({uuid:null===(n=null===(i=null==Rn?void 0:Rn.data)||void 0===i?void 0:i.data)||void 0===n?void 0:n.service_uuid}))},[Rn,gn]),(0,a.useEffect)(function(){var e,l,i;(null===(e=null==On?void 0:On.data)||void 0===e?void 0:e.branch)&&(gn((0,m.GL)({branch_id:null===(l=null==On?void 0:On.data)||void 0===l?void 0:l.branch})),gn((0,h.Cs)({branch_id:null===(i=null==On?void 0:On.data)||void 0===i?void 0:i.branch,is_edit:!0})))},[On]),(0,a.useEffect)(function(){var e,l;if((null==On?void 0:On.status)&&(null===(e=null==zn?void 0:zn.data)||void 0===e?void 0:e.results)){var i=null==On?void 0:On.data,n=(null===(l=null==zn?void 0:zn.data)||void 0===l?void 0:l.results)||[];if((null==i?void 0:i.branch)&&(null==n?void 0:n.length)>0){var a=n.find(function(e){return String(e.value)===String(null==i?void 0:i.branch)||e.value===(null==i?void 0:i.branch)||Number(e.value)===Number(null==i?void 0:i.branch)});a&&Jn(a)}}},[zn,On]),(0,a.useEffect)(function(){if((null==On?void 0:On.status)&&(null==Un?void 0:Un.data)){var e=null==On?void 0:On.data,l=(null==Un?void 0:Un.data)||[];if((null==e?void 0:e.room)&&(null==l?void 0:l.length)>0){var i=null==l?void 0:l.find(function(l){return String(null==l?void 0:l.value)===String(null==e?void 0:e.room)||(null==l?void 0:l.value)===(null==e?void 0:e.room)||Number(null==l?void 0:l.value)===Number(null==e?void 0:e.room)});la(i||{value:null==e?void 0:e.room,label:"Room ".concat(null==e?void 0:e.room)})}else(null==e?void 0:e.room)&&0===(null==l?void 0:l.length)&&la({value:null==e?void 0:e.room,label:"Room ".concat(null==e?void 0:e.room)})}},[Un,On]),(0,a.useEffect)(function(){var e,l;if(null==On?void 0:On.status){var i=null==On?void 0:On.data;if((null==i?void 0:i.tags)&&Array.isArray(null==i?void 0:i.tags)&&(null===(e=null==i?void 0:i.tags)||void 0===e?void 0:e.length)>0){var n=[];null===(l=null==i?void 0:i.tags)||void 0===l||l.forEach(function(e){n.push({label:null==e?void 0:e.name,value:Number(null==e?void 0:e.id)})}),aa(n)}}},[On]),(0,a.useEffect)(function(){var e,l,i=null===(e=null==Rn?void 0:Rn.data)||void 0===e?void 0:e.data;if(i&&(null==Gn?void 0:Gn.data)){var n=(null===(l=i.booking_details)||void 0===l?void 0:l.instructors)||i.instructors;if(n){var a={};n.forEach(function(e){var l,i="string"==typeof e?e:(null==e?void 0:e.uuid)||(null==e?void 0:e.id);if(i){var n=null===(l=null==Gn?void 0:Gn.data)||void 0===l?void 0:l.find(function(e){return String(null==e?void 0:e.value)===String(i)||(null==e?void 0:e.value)===i||String(null==e?void 0:e.uuid)===String(i)});n?a[i]=(null==n?void 0:n.label)||(null==n?void 0:n.name):"object"==typeof e&&((null==e?void 0:e.name)||(null==e?void 0:e.label)||(null==e?void 0:e.first_name))?a[i]=(null==e?void 0:e.name)||(null==e?void 0:e.label)||"".concat((null==e?void 0:e.first_name)||""," ").concat((null==e?void 0:e.last_name)||"").trim():a[i]=i}}),ca(a)}}},[null===(de=null==Rn?void 0:Rn.data)||void 0===de?void 0:de.data,Gn,mn]),(0,a.useEffect)(function(){var e,l,i,n;if(null==Qn?void 0:Qn.status){var a=null!==(null===(e=null==Qn?void 0:Qn.permission_get_data)||void 0===e?void 0:e.permission)&&(null===(i=null===(l=null==Qn?void 0:Qn.permission_get_data)||void 0===l?void 0:l.permission)||void 0===i?void 0:i.length)?null===(n=null==Qn?void 0:Qn.permission_get_data)||void 0===n?void 0:n.permission:[];Ba(a)}},[Qn]),(0,a.useEffect)(function(){var e,l,i,n,a;if(null==Ln?void 0:Ln.status){var t=null==Ln?void 0:Ln.data,d="";if(!(null==t?void 0:t.freetrial_status)||null!=(null==t?void 0:t.plan_id)||null!=(null===(e=null==t?void 0:t.subscription_plan)||void 0===e?void 0:e.name)&&""!=(null===(l=null==t?void 0:t.subscription_plan)||void 0===l?void 0:l.name)){var o=null===(n=null===(i=null==t?void 0:t.subscription_plan)||void 0===i?void 0:i.name)||void 0===n?void 0:n.toLowerCase();d=null==o?void 0:o.replace(/^./,null===(a=o[0])||void 0===a?void 0:a.toUpperCase())}else d="Premium";Pa(d)}},[Ln]),(0,a.useEffect)(function(){var e=function(e){var l;(null==Ca?void 0:Ca.current)&&!(null===(l=null==Ca?void 0:Ca.current)||void 0===l?void 0:l.contains(e.target))&&ma(!1)};return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}},[]);(0,a.useEffect)(function(){va||pa("")},[va]),(0,a.useEffect)(function(){if(Na){var e=setInterval(function(){var e=document.querySelector(".modal-backdrop.fade.show");e&&e.remove()},100);return function(){return clearInterval(e)}}},[Na]),(0,a.useEffect)(function(){var e,l,i,n,a,t,d,o,s,r;if((null===(l=null===(e=null==Rn?void 0:Rn.data)||void 0===e?void 0:e.data)||void 0===l?void 0:l.service_uuid)&&(null===(i=null==wa?void 0:wa.student_info)||void 0===i?void 0:i.uuid)&&(null===(a=null===(n=null==Rn?void 0:Rn.data)||void 0===n?void 0:n.data)||void 0===a?void 0:a.local_start_datetime)){var c={service_uuid:null===(d=null===(t=null==Rn?void 0:Rn.data)||void 0===t?void 0:t.data)||void 0===d?void 0:d.service_uuid,student_uuid:null===(o=null==wa?void 0:wa.student_info)||void 0===o?void 0:o.uuid,local_start_datetime:y()(hn+" "+y()(null===(r=null===(s=null==Rn?void 0:Rn.data)||void 0===s?void 0:s.data)||void 0===r?void 0:r.local_start_datetime).format(null===z.ow||void 0===z.ow?void 0:z.ow.time)).format(null===z.ow||void 0===z.ow?void 0:z.ow.dateTime)};
1qn.makeRequest({payload:c,url:null===S.dM||void 0===S.dM?void 0:S.dM.studio_service_applicable_purchased_packages}),Fn.makeRequest({payload:c,url:null===S.dM||void 0===S.dM?void 0:S.dM.studio_service_applicable_purchased_memberships})}},[Rn,wa]),(0,a.useEffect)(function(){var e,l,i;if((null==qn?void 0:qn.status)&&(null===(l=null===(e=null==qn?void 0:qn.data)||void 0===e?void 0:e.data)||void 0===l?void 0:l.length)){var n=(null===(i=null==qn?void 0:qn.data)||void 0===i?void 0:i.data)||[],a=(0,U.ND)(le([],n,!0));Ot(a)}else Ot([])},[null==qn?void 0:qn.status,null==qn?void 0:qn.data]),(0,a.useEffect)(function(){var e,l,i;if((null==Fn?void 0:Fn.status)&&null!=(null===(e=null==Fn?void 0:Fn.data)||void 0===e?void 0:e.data)){var n=(i=null===(l=null==Fn?void 0:Fn.data)||void 0===l?void 0:l.data,Array.isArray(i)?i:i&&Array.isArray(null==i?void 0:i.memberships)?i.memberships:i&&Array.isArray(null==i?void 0:i.packages)?i.packages:[]);n.length?Ut((0,U.br)(le([],n,!0))):Ut([])}else(null==Fn?void 0:Fn.status)&&Ut([])},[null==Fn?void 0:Fn.status,null==Fn?void 0:Fn.data]),(0,a.useEffect)(function(){if(null==zt?void 0:zt.length){var e=zt.map(function(e,l){var i;return 0===(null===(i=null==e?void 0:e.eligibility_reasons)||void 0===i?void 0:i.length)?l:-1}).filter(function(e){return-1!==e});Vt(e)}else Vt([])},[zt]),(0,a.useEffect)(function(){var e=null==zt?void 0:zt.length,l=null==Dt?void 0:Dt.length;e&&!l?ad("membership"):l&&!e?ad("package"):e&&l&&ad("membership")},[null==zt?void 0:zt.length,null==Dt?void 0:Dt.length]),(0,a.useEffect)(function(){Na||(Ot([]),Ut([]),Qt(null),Jt(""),ad("package"),qn.reset(),Fn.reset())},[Na]),(0,a.useEffect)(function(){var e,l;Na?(null===(e=On.data)||void 0===e?void 0:e.min_capacity)&&Ja(Number(null===(l=null==On?void 0:On.data)||void 0===l?void 0:l.min_capacity)||1):(Oa({}),Ua(""),Va({}),Qa({}),Ja(1),lt(""),at(!1),ot(""),ct(null),mt(""),pt(!1),gt(""),_t(!1),Jt(""),Ut([]),ad("package"),cd(!1),md(!1),od(!1))},[Na,null===(oe=null==On?void 0:On.data)||void 0===oe?void 0:oe.min_capacity]);var Hd=function(){return $(void 0,void 0,void 0,function(){var e,l,i,n,a,t,d,o,s,r,u,v,m,h,b,p,f,x,g,j,N,_,w,k,S,C,A,T;return ee(this,function(M){if(bt){if(xt>parseFloat(to()))return P().fire({text:"Partial payment should be less than ".concat(parseFloat(to())),icon:"error",confirmButtonColor:"#dc3545"}),[2];if(""==xt||null==xt)return P().fire({text:"Partial payment is required",icon:"error",confirmButtonColor:"#dc3545"}),[2];if(""!=xt&&parseFloat(xt)<parseFloat(to())&&parseFloat(to())-parseFloat(xt)<1)return P().fire({text:"Remaining amount cannot be less than $1",icon:"error",confirmButtonColor:"#dc3545"}),[2]}if((null===(s=null==On?void 0:On.data)||void 0===s?void 0:s.questions)&&On.data.questions.length>0){if(e={},l=!1,On.data.questions.forEach(function(i){Da[null==i?void 0:i.uuid]&&""!==Da[null==i?void 0:i.uuid].trim()||(e[null==i?void 0:i.uuid]="This question is required",l=!0)}),l)return Va(e),P().fire({text:"Please answer all required questions before submitting.",icon:"error",confirmButtonColor:"#dc3545"}),[2];Va({})}else if((null===(r=null==On?void 0:On.data)||void 0===r?void 0:r.question)&&(!za||""===za.trim()))return P().fire({text:"Please answer the required question before submitting.",icon:"error",confirmButtonColor:"#dc3545"}),[2];return i="",0==(null==vt?void 0:vt.length)?(P().fire({text:"Please enter the amount received from the student",icon:"error",confirmButtonColor:"#dc3545"}),[2]):(i=vt,n=(null===(u=null==On?void 0:On.data)||void 0===u?void 0:u.questions)&&(null===(m=null===(v=null==On?void 0:On.data)||void 0===v?void 0:v.questions)||void 0===m?void 0:m.length)>0?null===(h=null==On?void 0:On.data)||void 0===h?void 0:h.questions.filter(function(e){return Da[null==e?void 0:e.uuid]&&""!==Da[null==e?void 0:e.uuid].trim()}).map(function(e){return{question:null==e?void 0:e.question,answer:Da[null==e?void 0:e.uuid]}}):(null===(b=null==On?void 0:On.data)||void 0===b?void 0:b.question)&&za?[{question:null===(p=null==On?void 0:On.data)||void 0===p?void 0:p.question,answer:za}]:[],a=(null===(f=Object.keys(Za))||void 0===f?void 0:f.length)>0?Object.values(Za).map(function(e){return{name:null==e?void 0:e.name,quantity:null==e?void 0:e.quantity,price:Number((null==e?void 0:e.price)||0)*Number((null==e?void 0:e.quantity)||0)}}):[],t=(null===(x=Object.keys(Za))||void 0===x?void 0:x.length)>0?Object.values(Za).reduce(function(e,l){return e+Number((null==l?void 0:l.price)||0)*Number((null==l?void 0:l.quantity)||0)},0):0,d={uuid:(null===(j=null===(g=null==Rn?void 0:Rn.data)||void 0===g?void 0:g.data)||void 0===j?void 0:j.uuid)||rn,student_uuid:null===(N=null==wa?void 0:wa.student_info)||void 0===N?void 0:N.uuid,payment_type:et||(to()>.5?"":"other"),local_start_datetime:y()(hn+" "+y()(null===(w=null===(_=null==Rn?void 0:Rn.data)||void 0===_?void 0:_.data)||void 0===w?void 0:w.local_start_datetime).format(null===z.ow||void 0===z.ow?void 0:z.ow.time)).format(null===z.ow||void 0===z.ow?void 0:z.ow.dateTime),utc_start_datetime:y()(hn+" "+y()(null===(S=null===(k=null==Rn?void 0:Rn.data)||void 0===k?void 0:k.data)||void 0===S?void 0:S.local_start_datetime).format(null===z.ow||void 0===z.ow?void 0:z.ow.time)).utc().format(null===z.ow||void 0===z.ow?void 0:z.ow.dateTime),notes:dt,tax:ao()||0,paid_amount:Number(i),answers:n,addons:a,attendees:Xa,total_addons_amount:t,is_notify_student:rd,notify_n
1ote:dd},bt&&xt!=parseFloat(to().toString())&&(d.is_partial=bt,d.partial_amount=Number(xt)),"card"==et&&(d.card_id=rt),!(null==Zt?void 0:Zt.id)||"package"!==Xt&&"membership"!==Xt||("package"===Xt?d.used_package_id=Zt.id:(d.used_membership_id=Zt.id,d.used_tag_name=null==ed?void 0:ed.name),0==Number(to())&&(d.payment_type="membership"===Xt?"membership":"package"),o=(null===(C=null==Zt?void 0:Zt.redeemable_tag_count)||void 0===C?void 0:C.length)?null!=(null==ed?void 0:ed.remaining_count)?Number(ed.remaining_count):0:null!==(A=null==Zt?void 0:Zt.redeemable_count)&&void 0!==A?A:1,d.package_class_count=o>=1?1:0,d.payment_class_count=Zt?1-d.package_class_count:1,(null===(T=null==Zt?void 0:Zt.redeemable_tag_count)||void 0===T?void 0:T.length)&&ed&&Object.keys(ed).length&&(d.package_tag_uuid=null==ed?void 0:ed.uuid)),gn((0,c.Om)(d)),[2])})})},Vd="Please remove add-ons and extra attendees to continue with membership purchase.",Wd=Object.values(Za||{}).reduce(function(e,l){return e+Number((null==l?void 0:l.price)||0)*Number((null==l?void 0:l.quantity)||0)},0)>0||Number(Xa)>Number((null===(se=null==On?void 0:On.data)||void 0===se?void 0:se.min_capacity)||1),Zd=function(e){var l,i;if(Wd)return!0;var n=!1;return(null===(l=null==e?void 0:e.eligibility_reasons)||void 0===l?void 0:l.length)&&(n=!0),(null===(i=null==e?void 0:e.price_offers)||void 0===i?void 0:i.length)&&!(null==Ht?void 0:Ht.length)&&(n=!1),n};(0,a.useEffect)(function(){Wd?"membership"===Xt&&(null==Zt?void 0:Zt.id)&&(Qt(null),ld({}),Jt(""),lt(""),Ea.current||(Ea.current=!0,P().fire({icon:"warning",title:"Membership Unselected",text:Vd,confirmButtonText:"OK"}))):Ea.current=!1},[Wd,Xt,null==Zt?void 0:Zt.id]);(0,a.useEffect)(function(){var e;if((null===(e=null==Zt?void 0:Zt.redeemable_tag_count)||void 0===e?void 0:e.length)&&("package"!==Xt||(null==Zt?void 0:Zt.eligible))&&("membership"!==Xt||!Zd(Zt))){var l=function(){var e,l=Ma.current||document.getElementById("membershipTagModal");return!(!l||!(null===(e=window.bootstrap)||void 0===e?void 0:e.Modal))&&(new window.bootstrap.Modal(l).show(),!0)},i=setTimeout(function(){l()||setTimeout(l,100)},50);return function(){return clearTimeout(i)}}},[null==Zt?void 0:Zt.id,null===(re=null==Zt?void 0:Zt.redeemable_tag_count)||void 0===re?void 0:re.length,null==Zt?void 0:Zt.eligible,Xt,null==Ht?void 0:Ht.length]),(0,a.useEffect)(function(){var e=Ma.current||document.getElementById("membershipTagModal");if(e){var l=function(){document.body.classList.add("membership-tag-modal-open");var e=document.getElementById("buyScheduleModal");e&&e.classList.add("blurred-by-tag-modal"),requestAnimationFrame(function(){var e=document.querySelector(".modal-backdrop:last-of-type");e&&e.classList.add("modal-backdrop-blur")})},i=function(){document.body.classList.remove("membership-tag-modal-open");var e=document.getElementById("buyScheduleModal");e&&e.classList.remove("blurred-by-tag-modal"),document.querySelectorAll(".modal-backdrop-blur").forEach(function(e){return e.classList.remove("modal-backdrop-blur")})};return e.addEventListener("shown.bs.modal",l),e.addEventListener("hidden.bs.modal",i),function(){e.removeEventListener("shown.bs.modal",l),e.removeEventListener("hidden.bs.modal",i)}}},[]);var Qd=function(){_a(!1),ka(null),Oa({}),Ua(""),Va({}),Qa({}),Ja(1),lt(""),at(!1),ot(""),ct(null),mt(""),pt(!1),gt(""),_t(!1),Qt(null),ld({}),Jt(""),Ot([]),Ut([]),ad("package"),qn.reset(),Fn.reset(),cd(!1),md(!1),od(!1)},Kd=function(){var e;return Number((null===(e=null==On?void 0:On.data)||void 0===e?void 0:e.cost)||0)},Xd=function(){var e,l,i;return(null===(e=null==On?void 0:On.data)||void 0===e?void 0:e.addons)&&0!==(null===(l=Object.keys(Za))||void 0===l?void 0:l.length)?null===(i=Object.values(Za))||void 0===i?void 0:i.reduce(function(e,l){return e+Number((null==l?void 0:l.price)||0)*Number((null==l?void 0:l.quantity)||0)},0):0},Jd=function(){var e,l,i,n;return(null===(e=null==On?void 0:On.data)||void 0===e?void 0:e.min_capacity)&&(null===(l=null==On?void 0:On.data)||void 0===l?void 0:l.price_per_extra_attendee)?Math.max(0,Xa-Number((null===(i=null==On?void 0:On.data)||void 0===i?void 0:i.min_capacity)||1))*Number((null===(n=null==On?void 0:On.data)||void 0===n?void 0:n.price_per_extra_attendee)||0):0},$d=function(){var e,l,i;if(null==Zt?void 0:Zt.id)if(null===(e=null==Zt?void 0:Zt.redeemable_tag_count)||void 0===e?void 0:e.length)i=(null!=(null==ed?void 0:ed.remaining_count)?Number(ed.remaining_count):0)>=1?0:Kd();else if("package"===Xt)i=0;else if("membership"===Xt){i=Number(null!==(l=null==Zt?void 0:Zt.redeemable_count)&&void 0!==l?l:0)>=1?0:Kd()}else i=Kd();else i=Kd();return i+Xd()+Jd()},eo=!!(null===(ce=null==Ln?void 0:Ln.data)||void 0===ce?void 0:ce.is_tax_inclusive),lo=!!(null===(ue=null==Ln?void 0:Ln.data)||void 0===ue?void 0:ue.is_platform_fee_absorbed),io=null===(ve=null==On?void 0:On.data)||void 0===ve?void 0:ve.tax_mode,no=!(0,f.a_)(io),ao=function(){var e,l=$d();return Number((0,f.KT)(l,null===(e=null==Ln?void 0:Ln.data)||void 0===e?void 0:e.tax,eo,io).toFixed(2))},to=function(){var e=$d(),l=function(){var e,l=$d();return Number((0,f.A2)(l,null===(e=null==Ln?void 0:Ln.data)||void 0===e?void 0:e.tax,eo,io).toFixed(2))}();return Number((e+l).toFixed(2))},oo=function(e,l){var i;return(0,f.Yp)(e,l,null===(i=null==Ln?void 0:Ln.data)||void 0===i?void 0:i.tax,eo)},so=function(){var e;return!!nt&&((null===(e=null==wa?void 0:wa.student_info)||void 0===e?void 0:e.wallet_balance)||0)<(bt?Number(xt||0):vt)};(0,a.useEffect)(function(){nt&&!so()?lt("wallet"):lt("")},[nt]);var ro=function(e){lt(""),0==e&&""!=e&&"membership"!=et&&lt("other"),0!=e&&""!=e||at(!1),mt(e)};(0,a.useEffect)(function(){var e;(null==On?void 0:On.data)&&(null===(e=null==Rn?void 0:Rn.data)||void 0===e?void 0:e.data)&&(mt(to()),0==parseFloat(to().toString())&&"membership"!=et&&lt("other"))},[null==On?void 0:On.data,null===(me=null==Rn?void 0:Rn.data)||void 0===me?void 0:me.data,null==Za?void 0:Za.length,Xa,null==Zt?void 0:Zt.id,Xt,null==ed?void 0:ed.remaining_count,$d()]),(0,a.useEffect)(function(){(null==wn?void 0:wn.status)&&(jn("/available-service-list"),null==wn||wn.reset())},[null==wn?void 0:wn.status]),(0,a.useEffect)(function(){(null==kn?void 0:kn.status)&&("schedule"===mn?gn((0,c.yE)({uuid:rn,type:mn,schedule_date:hn})):jn("/available-service-list"),null==kn||kn.reset())},[null==kn?void 0:kn.status]),(0,a.useEffect)(function(){var e;(null==Sn?void 0:Sn.status)&&(null===(e=null==Sn?void 0:Sn.data)||void 0===e?void 0:e.status)&&(rn&&gn((0,c.yE)({uuid:rn,type:mn,schedule_date:hn})),At(!1),Od(),null==Sn||Sn.reset())},[null==Sn?void 0:Sn.status,null===(he=null==Sn?void 0:Sn.data)||void 0===he?void 0:he.status,rn,mn,gn]);var co=(null==zd?void 0:zd.attendees)||0,uo=co>
10?Math.max(co-1,0):0,vo=uo>(0,a.useMemo)(function(){return Gd.filter(function(e){return!e.isSelf}).length},[Gd]),mo=(0,a.useMemo)(function(){return Gd.filter(function(e){return!(null==e?void 0:e.isSelf)&&((null==e?void 0:e.signature_status)?"completed"===e.signature_status:!0===(null==e?void 0:e.waiver_signed))}).length},[Gd]),ho=function(e){return e?y()(e).format("MMMM DD, YYYY hh:mm A"):""},bo=function(e,l){return void 0===l&&(l=200),function(e){if(!e)return"";var l=document.createElement("DIV");return l.innerHTML=e,l.textContent||l.innerText||""}(e).length>l},po=function(){return $(void 0,void 0,void 0,function(){var e,l,i,n,a,t,d,o,r,c,u;return ee(this,function(v){return gn({type:F.NEG,data:[]}),e=null===(a=null===(n=null===(i=null==Rn?void 0:Rn.data)||void 0===i?void 0:i.data)||void 0===n?void 0:n.booking_details)||void 0===a?void 0:a.local_start_datetime,l=e?y()(e):hn?y()(hn+" "+y()(null===(d=null===(t=null==Rn?void 0:Rn.data)||void 0===t?void 0:t.data)||void 0===d?void 0:d.local_start_datetime).format(null===z.ow||void 0===z.ow?void 0:z.ow.time)):y()(null===(r=null===(o=null==Rn?void 0:Rn.data)||void 0===o?void 0:o.data)||void 0===r?void 0:r.local_start_datetime),l.isValid()&&l.isBefore(y()())?(qd(!0),Td(!0),[2]):"template"===mn||!!(null===(u=null===(c=null==Rn?void 0:Rn.data)||void 0===c?void 0:c.data)||void 0===u?void 0:u.booking_details)?(qd(!1),Td(!0),[2]):(rn&&jn(s.OZ+"/available-service-list/create/".concat(rn,"?type=schedule&date=").concat(hn)),[2])})})};(0,a.useEffect)(function(){if(fn&&(null==Rn?void 0:Rn.status)){"reschedule"===fn?po():"cancel"===fn&&xo(!1),xn(null);var e=new URLSearchParams(un);e.delete("action"),vn(e,{replace:!0})}},[fn,null==Rn?void 0:Rn.status]);var fo,xo=function(e){P().fire({title:"Are you sure?",text:(null===I.c8||void 0===I.c8?void 0:I.c8.ARE_YOU_CANCEL_ANY)+" booking",icon:"warning",showCancelButton:!0,confirmButtonColor:"rgb(26, 26, 58)",cancelButtonColor:"#d33",confirmButtonText:"Yes, Confirm"}).then(function(l){var i,n;if(l.isConfirmed){var a=(null==zd?void 0:zd.uuid)||(null===(n=null===(i=null==Rn?void 0:Rn.data)||void 0===i?void 0:i.data)||void 0===n?void 0:n.uuid);kn.makeRequest({payload:{purchase_uuid:a,schedule_date:hn,is_refund:e},url:null===S.dM||void 0===S.dM?void 0:S.dM.studio_service_booking_cancel,showNotification:!0})}})};return(null==Rn?void 0:Rn.status)&&!0===(null===(pe=null===(be=null==Rn?void 0:Rn.data)||void 0===be?void 0:be.data)||void 0===pe?void 0:pe.is_deleted)?(0,n.jsx)(a.Fragment,{children:(0,n.jsxs)("div",{className:"main-right schedule-main-right w-100",children:[(0,n.jsx)(w.A,{title:"Service Schedule",backPath:yn}),(0,n.jsx)("div",{className:"container-fluid px-3",children:(0,n.jsx)("div",{className:"d-flex justify-content-center align-items-center",style:{minHeight:"70vh"},children:(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"mb-4",children:(0,n.jsx)("i",{className:"icon-warning",style:{fontSize:"64px",color:"#ffc107"}})}),(0,n.jsx)("h3",{className:"mb-3 fw-bold",children:"Schedule Deleted"}),(0,n.jsx)("p",{className:"text-muted mb-4",children:"This schedule has been deleted and is no longer available."}),(0,n.jsx)("button",{className:"btn btn-primary",onClick:function(){return jn(-1)},children:"Go Back"})]})})})]})}):(0,n.jsxs)(a.Fragment,{children:[(null==Rn?void 0:Rn.loading)||Yn||(null==Hn?void 0:Hn.loading)||(null==wn?void 0:wn.loading)?(0,n.jsx)(N.A,{}):"",(0,n.jsxs)("div",{className:"main-right schedule-main-right w-100",children:[(0,n.jsx)(w.A,{title:"Service Schedule",backPath:yn}),(0,n.jsx)("div",{className:"container-fluid px-3",children:(0,n.jsxs)("div",{className:"row gy-4 align-items-stretch",children:[(0,n.jsx)("div",{className:"col-lg-4 ".concat(da?"d-none":""),children:(null==Rn?void 0:Rn.loading)?(0,n.jsx)(N.A,{}):(0,n.jsx)("div",{className:"box-aerial",style:{background:"linear-gradient(270deg, rgba(219, 109, 97, 0.1) 0%, rgba(176, 62, 199, 0.1) 49%, rgba(91, 28, 220, 0.1) 100%)",borderRadius:"20px",boxShadow:"0 20px 40px rgba(0,0,0,0.1)",border:"none",overflow:"visible",zIndex:1},children:(0,n.jsxs)("div",{className:"p-4 bg-light",style:{backdropFilter:"blur(10px)"},children:[(0,n.jsx)("div",{className:"mb-4",children:(0,n.jsxs)("h4",{className:"mb-2 fw-bold text-dark fs-4",children:[(0,n.jsx)("i",{className:"icon-calendar me-2"}),(null===(fe=null==On?void 0:On.data)||void 0===fe?void 0:fe.name)||(null===(ge=null===(xe=null==Rn?void 0:Rn.data)||void 0===xe?void 0:xe.data)||void 0===ge?void 0:ge.service_name)||"Loading..."]})}),(0,n.jsxs)("div",{className:"d-flex flex-wrap gap-2 mb-4",children:["Canceled"!==(null==zd?void 0:zd.booking_status)?(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("button",{className:"btn btn-light btn-sm d-flex align-items-center gap-2 rounded-pill border-0 shadow-sm",style:{transition:"all 0.3s ease"},onClick:po,onMouseEnter:function(e){e.currentTarget.style.transform="translateY(-2px)",e.currentTarget.style.boxShadow="0 6px 20px rgba(0,0,0,0.2)"},onMouseLeave:function(e){e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 4px 12px rgba(0,0,0,0.15)"},children:[(0,n.jsx)("i",{className:"icon-edit"}),"Edit"]})}):"","schedule"===mn&&y()(hn+" "+y()(null===(Ne=null===(je=null==Rn?void 0:Rn.data)||void 0===je?void 0:je.data)||void 0===Ne?void 0:Ne.local_start_datetime).format(null===z.ow||void 0===z.ow?void 0:z.ow.time)).isAfter(y()())?(0,n.jsxs)("button",{className:"btn btn-danger btn-sm d-flex align-items-center gap-2 rounded-pill border-0",style:{boxShadow:"0 4px 12px rgba(220,53,69,0.3)",transition:"all 0.3s ease"},onClick:function(){!function(){var e,l,i,n,a,t,d;
1if(!0===(null===(l=null===(e=null==Rn?void 0:Rn.data)||void 0===e?void 0:e.data)||void 0===l?void 0:l.is_repeated)||(null===(n=null===(i=null==Rn?void 0:Rn.data)||void 0===i?void 0:i.data)||void 0===n?void 0:n.repeated_count)&&(null===(t=null===(a=null==Rn?void 0:Rn.data)||void 0===a?void 0:a.data)||void 0===t?void 0:t.repeated_count)>1){var o=null===(d=null==Rn?void 0:Rn.data)||void 0===d?void 0:d.data,s=hn?y()(hn).format(null===z.ow||void 0===z.ow?void 0:z.ow.date):null,r=null==o?void 0:o.local_start_datetime,c=null==o?void 0:o.local_end_datetime,u=(null==o?void 0:o.deleted_dates)||[],v=(null==o?void 0:o.repeated_count)||0,m=!1;if(s&&r&&c&&v>0){for(var h=[],b=y()(r),p=y()(c),f=b.day(),x=b.clone().startOf("day"),g=p.clone().startOf("day");x.isSameOrBefore(g);){if(x.day()===f){var j=x.format(null===z.ow||void 0===z.ow?void 0:z.ow.date);h.push(j)}x.add(1,"day")}var N=h.filter(function(e){return!u.includes(e)});if(N.sort(function(e,l){return y()(e).diff(y()(l))}),N.length>0){var _=y()(s);m=0===N.filter(function(e){return y()(e).isAfter(_)}).length}}var w='\n            <div style="text-align: left; margin-top: 20px;">\n               <div style="margin-bottom: 15px;">\n                  <label style="display: flex; align-items: center; cursor: pointer; padding: 10px; border: 2px solid #ddd; border-radius: 8px; margin-bottom: 10px;">\n                     <input type="radio" name="deleteType" value="single" checked style="margin-right: 10px; cursor: pointer;">\n                     <div>\n                        <strong>Delete This Only</strong>\n                        <p style="margin: 5px 0 0 0; color: #666; font-size: 14px;">This will remove the service from the schedule along with any bookings in it. Students will receive a refund automatically.</p>\n                     </div>\n                  </label>\n               </div>\n               '.concat(m?"":'\n               <div>\n                  <label style="display: flex; align-items: center; cursor: pointer; padding: 10px; border: 2px solid #ddd; border-radius: 8px;">\n                     <input type="radio" name="deleteType" value="entire" style="margin-right: 10px; cursor: pointer;">\n                     <div>\n                        <strong>Delete Entire Series</strong>\n                        <p style="margin: 5px 0 0 0; color: #666; font-size: 14px;">This will delete the entire schedule series and any bookings will be removed with a refund, from the selected schedule to the end of the series.</p>\n                     </div>\n                  </label>\n               </div>\n               ',"\n            </div>\n         ");P().fire({title:"Cancel & Delete Service",html:w,icon:"warning",showCancelButton:!0,confirmButtonColor:"#d33",cancelButtonColor:"rgb(26, 26, 58)",confirmButtonText:"Cancel & Delete Service",cancelButtonText:"Back",reverseButtons:!0,didOpen:function(){document.querySelectorAll('input[name="deleteType"]').forEach(function(e){e.addEventListener("change",function(){if(document.querySelectorAll("label").forEach(function(e){e.style.borderColor="#ddd",e.style.backgroundColor=""}),this.checked){var e=this.closest("label");e&&(e.style.borderColor="rgb(26, 26, 58)",e.style.backgroundColor="rgba(26, 26, 58, 0.05)")}})});var e=document.querySelector("label");e&&(e.style.borderColor="rgb(26, 26, 58)",e.style.backgroundColor="rgba(26, 26, 58, 0.05)")},preConfirm:function(){var e;return null===(e=document.querySelector('input[name="deleteType"]:checked'))||void 0===e?void 0:e.value}}).then(function(e){var l,i,n,a;if(e.isConfirmed&&e.value){var t="entire"===e.value,d={uuid:rn,local_date:y()(hn+" "+y()(null===(i=null===(l=null==Rn?void 0:Rn.data)||void 0===l?void 0:l.data)||void 0===i?void 0:i.local_start_datetime).format(null===z.ow||void 0===z.ow?void 0:z.ow.time)).format(null===z.ow||void 0===z.ow?void 0:z.ow.date),utc_date:y()(hn+" "+y()(null===(a=null===(n=null==Rn?void 0:Rn.data)||void 0===n?void 0:n.data)||void 0===a?void 0:a.local_start_datetime).format(null===z.ow||void 0===z.ow?void 0:z.ow.time)).utc().format(null===z.ow||void 0===z.ow?void 0:z.ow.date),is_delete_entire:!!t};
1wn.makeRequest({payload:d,url:null===S.dM||void 0===S.dM?void 0:S.dM.studio_service_schedule_delete,showNotification:!0})}})}else P().fire({title:"Are you sure?",text:(null===I.c8||void 0===I.c8?void 0:I.c8.ARE_YOU_DELETE_ANY)+" schedule",icon:"warning",showCancelButton:!0,confirmButtonColor:"rgb(26, 26, 58)",cancelButtonColor:"#d33",confirmButtonText:"Yes, Delete"}).then(function(e){var l,i,n,a;e.isConfirmed&&wn.makeRequest({payload:{uuid:rn,local_date:y()(hn+" "+y()(null===(i=null===(l=null==Rn?void 0:Rn.data)||void 0===l?void 0:l.data)||void 0===i?void 0:i.local_start_datetime).format(null===z.ow||void 0===z.ow?void 0:z.ow.time)).format(null===z.ow||void 0===z.ow?void 0:z.ow.date),utc_date:y()(hn+" "+y()(null===(a=null===(n=null==Rn?void 0:Rn.data)||void 0===n?void 0:n.data)||void 0===a?void 0:a.local_start_datetime).format(null===z.ow||void 0===z.ow?void 0:z.ow.time)).utc().format(null===z.ow||void 0===z.ow?void 0:z.ow.date)},url:null===S.dM||void 0===S.dM?void 0:S.dM.studio_service_schedule_delete,showNotification:!0})})}()},onMouseEnter:function(e){e.currentTarget.style.transform="translateY(-2px)",e.currentTarget.style.boxShadow="0 6px 20px rgba(220,53,69,0.4)"},onMouseLeave:function(e){e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 4px 12px rgba(220,53,69,0.3)"},children:[(0,n.jsx)("i",{className:"icon-trash"}),"Cancel & Delete Service"]}):""]}),(0,n.jsxs)("div",{className:"details",children:[(0,n.jsxs)("h6",{className:"fw-bold text-dark mb-3 fs-5",children:[(0,n.jsx)("i",{className:"icon-info-circle me-2"}),"Service Information"]}),(0,n.jsxs)("div",{className:"row g-3",children:[Ud?(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex align-items-center justify-content-between p-1 rounded-3 bg-light",children:[(0,n.jsx)("div",{className:"d-flex align-items-center",children:(0,n.jsx)("span",{className:"fw-medium text-dark",children:"Date"})}),(0,n.jsx)("span",{className:"text-muted",children:ho(Ud)})]})}):"",(null===(ye=null===(_e=null==Rn?void 0:Rn.data)||void 0===_e?void 0:_e.data)||void 0===ye?void 0:ye.purchase_date)||(null===(Se=null===(ke=null===(we=null==Rn?void 0:Rn.data)||void 0===we?void 0:we.data)||void 0===ke?void 0:ke.booking_details)||void 0===Se?void 0:Se.purchase_date)?(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex align-items-center justify-content-between p-1 rounded-3 bg-light",children:[(0,n.jsx)("div",{className:"d-flex align-items-center",children:(0,n.jsx)("span",{className:"fw-medium text-dark",children:"Booking Date"})}),(0,n.jsx)("span",{className:"text-muted",children:ho((null===(Ae=null===(Ce=null==Rn?void 0:Rn.data)||void 0===Ce?void 0:Ce.data)||void 0===Ae?void 0:Ae.purchase_date)||(null===(Ee=null===(Me=null===(Te=null==Rn?void 0:Rn.data)||void 0===Te?void 0:Te.data)||void 0===Me?void 0:Me.booking_details)||void 0===Ee?void 0:Ee.purchase_date))})]})}):"",(null===(Fe=null===(qe=null==Rn?void 0:Rn.data)||void 0===qe?void 0:qe.data)||void 0===Fe?void 0:Fe.visibility_days)?(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex align-items-center justify-content-between p-1 rounded-3 bg-light",children:[(0,n.jsx)("div",{className:"d-flex align-items-center",children:(0,n.jsx)("span",{className:"fw-medium text-dark",children:"Visibility Days"})}),(0,n.jsxs)("span",{className:"badge bg-dark text-light",children:[null===(Ie=null===(Be=null==Rn?void 0:Rn.data)||void 0===Be?void 0:Be.data)||void 0===Ie?void 0:Ie.visibility_days," ","days"]})]})}):"",(null===(Le=null==On?void 0:On.data)||void 0===Le?void 0:Le.duration)?(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex align-items-center justify-content-between p-1 rounded-3 bg-light",children:[(0,n.jsx)("div",{className:"d-flex align-items-center",children:(0,n.jsx)("span",{className:"fw-medium text-dark",children:"Duration"})}),(0,n.jsxs)("span",{className:"text-muted",children:[null===(Pe=null==On?void 0:On.data)||void 0===Pe?void 0:Pe.duration," ","minutes"]})]})}):"",ea?(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex align-items-center justify-content-between p-1 rounded-3 bg-light",children:[(0,n.jsx)("div",{className:"d-flex align-items-center",children:(0,n.jsx)("span",{className:"fw-medium text-dark",children:"Room"})}),(0,n.jsx)("span",{className:"text-muted",children:null==ea?void 0:ea.label})]})}):"",function(){var e,l,i,n,a,t=(null===(i=null===(l=null===(e=null==Rn?void 0:Rn.data)||void 0===e?void 0:e.data)||void 0===l?void 0:l.booking_details)||void 0===i?void 0:i.instructors)||
1(null===(a=null===(n=null==Rn?void 0:Rn.data)||void 0===n?void 0:n.data)||void 0===a?void 0:a.instructors);return t&&t.length>0}()?(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex align-items-center justify-content-between p-1 rounded-3 bg-light",children:[(0,n.jsx)("div",{className:"d-flex align-items-center",children:(0,n.jsx)("span",{className:"fw-medium text-dark",children:"Instructors"})}),(0,n.jsx)("span",{className:"d-flex flex-wrap gap-1 justify-content-end text-muted",children:null===(Ue=(null===(Oe=null===(De=null===(Re=null==Rn?void 0:Rn.data)||void 0===Re?void 0:Re.data)||void 0===De?void 0:De.booking_details)||void 0===Oe?void 0:Oe.instructors)||(null===(ze=null===(Ye=null==Rn?void 0:Rn.data)||void 0===Ye?void 0:Ye.data)||void 0===ze?void 0:ze.instructors))||void 0===Ue?void 0:Ue.map(function(e,l){var i="string"==typeof e?e:(null==e?void 0:e.uuid)||(null==e?void 0:e.id),a=ra[i]||("object"==typeof e?(null==e?void 0:e.name)||(null==e?void 0:e.label)||(null==e?void 0:e.first_name):null)||i;return(0,n.jsx)("span",{className:"badge bg-dark cursor-pointer",onClick:function(){return function(e){var l,i,n,a="string"==typeof e?e:(null==e?void 0:e.uuid)||(null==e?void 0:e.id),t=null===(l=null==Gn?void 0:Gn.data)||void 0===l?void 0:l.find(function(e){return String(null==e?void 0:e.value)===String(a)||(null==e?void 0:e.value)===a||String(null==e?void 0:e.uuid)===String(a)}),d=null===(n=null===(i=null==On?void 0:On.data)||void 0===i?void 0:i.instructor_payroll)||void 0===n?void 0:n.find(function(e){return(null==e?void 0:e.instructor_uuid)===a}),o=ra[a]||(null==t?void 0:t.label)||(null==t?void 0:t.name)||("object"==typeof e?(null==e?void 0:e.name)||(null==e?void 0:e.label)||(null==e?void 0:e.first_name):null)||a;yd({uuid:a,name:o,profile_picture:null==e?void 0:e.profile_image,payroll:d}),jd(!0)}(e)},style:{cursor:"pointer"},children:a},l)})})]})}):"",Xn?(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex align-items-center justify-content-between p-1 rounded-3 bg-light",children:[(0,n.jsx)("div",{className:"d-flex align-items-center",children:(0,n.jsx)("span",{className:"fw-medium text-dark",children:"Location"})}),(0,n.jsx)("span",{className:"badge bg-dark",children:null==Xn?void 0:Xn.label})]})}):"",(null===(Ve=null===(He=null===(Ge=null==Rn?void 0:Rn.data)||void 0===Ge?void 0:Ge.data)||void 0===He?void 0:He.booking_details)||void 0===Ve?void 0:Ve.selected_room)||(null===(Ze=null===(We=null==Rn?void 0:Rn.data)||void 0===We?void 0:We.data)||void 0===Ze?void 0:Ze.selected_room)?(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex align-items-center justify-content-between p-1 rounded-3 bg-light",children:[(0,n.jsx)("div",{className:"d-flex align-items-center",children:(0,n.jsx)("span",{className:"fw-medium text-dark",children:"Room"})}),(0,n.jsx)("span",{className:"badge bg-dark",children:(null===(Xe=null===(Ke=null===(Qe=null==Rn?void 0:Rn.data)||void 0===Qe?void 0:Qe.data)||void 0===Ke?void 0:Ke.booking_details)||void 0===Xe?void 0:Xe.selected_room)||(null===($e=null===(Je=null==Rn?void 0:Rn.data)||void 0===Je?void 0:Je.data)||void 0===$e?void 0:$e.selected_room)})]})}):"",na&&(null==na?void 0:na.length)>0?(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex flex-column flex-sm-row align-items-start align-items-sm-center justify-content-between p-2 p-sm-1 rounded-3 bg-light gap-2",children:[(0,n.jsx)("div",{className:"d-flex align-items-center",children:(0,n.jsx)("span",{className:"fw-medium text-dark",children:"Tags"})}),(0,n.jsx)("span",{className:"d-flex flex-wrap gap-1 justify-content-start justify-content-sm-end text-muted w-100 w-sm-auto",children:null==na?void 0:na.map(function(e,l){return(0,n.jsx)("span",{className:"badge bg-secondary",style:{fontSize:"0.875rem",whiteSpace:"nowrap"},children:null==e?void 0:e.label},l)})})]})}):""]}),(null==On?void 0:On.data)?(0,n.jsxs)("div",{className:"mt-4",children:[(null===(el=null==On?void 0:On.data)||void 0===el?void 0:el.buffer_time)&&"template"===mn?(0,n.jsxs)("div",{className:"mb-2",children:[(0,n.jsxs)("span",{className:"fw-medium text-dark",children:["Buffer Time:"," "]}),(0,n.jsxs)("span",{className:"text-muted",children:[null===(ll=null==On?void 0:On.data)||void 0===ll?void 0:ll.buffer_time," ","minutes"]})]}):"",(null===(il=null==On?void 0:On.data)||void 0===il?void 0:il.booking_cutoff_time)&&"template"===mn?(0,n.jsxs)("div",{className:"mb-2",children:[(0,n.jsxs)("span",{className:"fw-medium text-dark",children:["Booking Cutoff Time:"," "]}),(0,n.jsxs)("span",{className:"text-muted",children:[null===(nl=null==On?void 0:On.data)||void 0===nl?void 0:nl.booking_cutoff_time," ",(null===(al=null==On?void 0:On.data)||void 0===al?void 0:al.duration_type)||"Minutes"]})]}):"",(null===(tl=null==On?void 0:On.data)||void 0===tl?void 0:tl.description)?(0,n.jsxs)("div",{className:"mb-3 mt-3",children:[(0,n.jsx)("h6",{className:"fw-bold text-dark mb-2",children:"Description"}),(0,n.jsx)("div",{className:"text-muted",children:bo(null===(dl=null==On?void 0:On.data)||void 0===dl?void 0:dl.description)?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:null===(ol=null==On?void 0:On.data)||void 0===ol?void 0:ol.description},style:{height:bd?"auto":"160px",overflowY:bd?"visible":"scroll",overflowX:"hidden",position:"relative",width:"100%",paddingRight:bd?"0":"10px"}})}):(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:null===(sl=null==On?void 0:On.data)||void 0===sl?void 0:sl.description}})})]}):"",(null===(rl=null==On?void 0:On.data)||void 0===rl?void 0:rl.agreement)?(0,n.jsxs)("div",{className:"mb-3",children:[(0,n.jsx)("h6",{className:"fw-bold text-dark mb-2",children:"Agreement"}),(0,n.jsx)("div",{className:"text-muted",children:bo(null===(cl=null==On?void 0:On.data)||void 0===cl?void 0:cl.agreement)?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:null===(ul=null==On?void 0:On.data)||void 0===ul?void 0:ul.agreement},style:{height:fd?"auto":"160px",overflowY:fd?"visible":"scroll",overflowX:"hidden",position:"relative",width:"100%",paddingRight:fd?"0":"10px"}})}):(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:null===(vl=null==On?void 0:On.data)||void 0===vl?void 0:vl.agreement}})})]}):""]}):""]})]})})}),(0,n.jsx)("div",{className:"".concat(da?"col-lg-12":"col-lg-8"," "),children:(0,n.jsxs)("div",{className:"main-right inner-main-right w-100 h-100",children:[(0,n.jsxs)("div",{className:"d-flex align-items-center border-bottom",children:[(0,n.jsx)("button",{type:"button",className:"back-bg btn btn-outline-secondary p-2 ms-3 d-none d-lg-block",onClick:function(){return oa(!da)},children:da?(0,n.jsx)("span",{className:"icon-arrow-right-bold"}):(0,n.jsx)("span",{className:"icon-arrow-left-bold"})}),(0,n.jsx)("div",{className:"nav nav-tabs border-0 w-100 rounded-4 p-2 shadow-sm",id:"myTab",role:"tablist",style:{background:"linear-gradient(270deg, rgba(219, 109, 97, 0.1) 0%, rgba(176, 62, 199, 0.1) 49%, rgba(91, 28, 220, 0.1) 100%)"},children:(0,n.jsxs)("div",{className:"nav-item d-flex justify-content-center align-items-center",role:"presentation",children:[(0,n.jsxs)("button",{className:"nav-link d-flex justify-content-center align-items-center me-2 gap-2 rounded-pill border-0 fw-medium px-3 py-2 ".concat("students"===wt?"active bg-white bg-opacity-90 shadow-sm":""),id:"students-tab","data-bs-toggle":"tab","data-bs-target":"#students-tab-pane",type:"button",role:"tab","aria-controls":"students-tab-pane","aria-selected":"students"===wt,onClick:function(){return kt("students")},style:{transition:"all 0.3s ease"},children:[Pn("student",!0),"s"]}),zd?(0,n.jsx)("button",{className:"nav-link d-flex justify-content-center align-items-center me-2 gap-2 rounded-pill border-0 fw-medium px-3 py-2 ".concat("booking"===wt?"active bg-white bg-opacity-90 shadow-sm":""),id:"booking-tab","data-bs-toggle":"tab","data-bs-target":"#booking-tab-pane",type:"button",role:"tab","aria-controls":"booking-tab-pane","aria-selected":"booking"===wt,onClick:function(){return kt("booking")},style:{transition:"all 0.3s ease"},children:"Booking Information"}):null,(null===(hl=null===(ml=null==Rn?void 0:Rn.data)||void 0===ml?void 0:ml.data)||void 0===hl?void 0:hl.cancel_records)&&(null===(pl=null===(bl=null==Rn?void 0:Rn.data)||void 0===bl?void 0:bl.data)||void 0===pl?void 0:pl.cancel_records.length)>0?(0,n.jsx)("button",{className:"nav-link d-flex justify-content-center align-items-center me-2 gap-2 rounded-pill border-0 fw-medium px-3 py-2 ".concat("booking-history"===wt?"active bg-white bg-opacity-90 shadow-sm":""),id:"booking-history-tab","data-bs-toggle":"tab","data-bs-target":"#booking-history-tab-pane",type:"button",role:"tab","aria-controls":"booking-history-tab-pane","aria-selected":"booking-history"===wt,onClick:function(){return kt("booking-history")},style:{transition:"all 0.3s ease"},children:"Booking History"}):null]})})]}),(0,n.jsxs)("div",{className:"right-side-main",children:[!(null===(xl=null===(fl=null==Rn?void 0:Rn.data)||void 0===fl?void 0:fl.data)||void 0===xl?void 0:xl.booking_details)&&
1(0,C.Bk)("checkout",La,Fa)&&"schedule"===mn||((null===(jl=null===(gl=null==Rn?void 0:Rn.data)||void 0===gl?void 0:gl.data)||void 0===jl?void 0:jl.purchase_date)&&"schedule"!==mn||(null===(_l=null===(Nl=null==Rn?void 0:Rn.data)||void 0===Nl?void 0:Nl.data)||void 0===_l?void 0:_l.booking_details))&&y()(hn+" "+y()(null===(wl=null===(yl=null==Rn?void 0:Rn.data)||void 0===yl?void 0:yl.data)||void 0===wl?void 0:wl.local_start_datetime).format(null===z.ow||void 0===z.ow?void 0:z.ow.time)).isAfter(y()())?(0,n.jsxs)("div",{className:"d-sm-flex align-items-center justify-content-end pb-0 me-4",children:["schedule"===mn&&y()(hn+" "+y()(null===(Sl=null===(kl=null==Rn?void 0:Rn.data)||void 0===kl?void 0:kl.data)||void 0===Sl?void 0:Sl.local_start_datetime).format(null===z.ow||void 0===z.ow?void 0:z.ow.time)).isAfter(y()())?(0,n.jsxs)("button",{type:"button",className:"hover-box-shadow btn-secondry mt-2 me-2 mt-sm-0 d-flex align-items-center gap-2 rounded-pill border-0",onClick:function(e){return $(void 0,void 0,void 0,function(){var l,i,n,a,t,d,o,r,c,u,v;return ee(this,function(m){switch(m.label){case 0:if(e.stopPropagation(),Bd)return[2];if(l=(null===(c=null===(r=null==Rn?void 0:Rn.data)||void 0===r?void 0:r.data)||void 0===c?void 0:c.uuid)||rn,i=null===(u=null==Ln?void 0:Ln.data)||void 0===u?void 0:u.studio_uuid,!l||!i||!hn)return[2];Id(!0),m.label=1;case 1:return m.trys.push([1,3,4,5]),n="".concat(s.CY,"checkout/service/").concat((0,f.Rt)(String(l)),"/").concat((0,f.Rt)(i),"/service-schedule/").concat(y()(hn).format("YYYY-MM-DD")),[4,gn((0,x.X)(n))];case 2:return(a=m.sent())&&a.short_id&&(t="undefined"!=typeof window?window.location.origin:"",d="".concat(t,"/share/").concat(a.short_id),o=null===(v=null==On?void 0:On.data)||void 0===v?void 0:v.branch,gn({type:F.jES,data:{link:d,details:{type:"service",id:l,branch_id:o}}})),[3,5];case 3:return m.sent(),[3,5];case 4:return Id(!1),[7];case 5:return[2]}})})},disabled:Bd,style:{transition:"all 0.3s ease"},children:[(0,n.jsx)("i",{className:"icon-share-2"}),"Share"]}):null,!(null===(Al=null===(Cl=null==Rn?void 0:Rn.data)||void 0===Cl?void 0:Cl.data)||void 0===Al?void 0:Al.booking_details)&&(0,C.Bk)("checkout",La,Fa)&&"schedule"===mn?(0,n.jsxs)("div",{className:"position-relative",ref:Ca,children:[(0,n.jsxs)("button",{className:"hover-box-shadow btn-secondry mt-2 mx-2 mt-sm-0",onClick:function(){gn((0,p.Ts)({page:1,page_size:200})),ma(!va)},children:[(0,n.jsx)("span",{className:"user"}),"Add"," ",Pn("student",!0)," +"]}),va&&(null==Wn?void 0:Wn.data)?(0,n.jsxs)("div",{className:"position-absolute top-100 end-0 mt-2 bg-white border rounded shadow-lg overflow-auto",style:{zIndex:1e3,maxHeight:"300px",minWidth:"200px"},children:[(0,n.jsx)("div",{className:"p-2 border-bottom sticky-top bg-white",children:(0,n.jsxs)("div",{className:"position-relative",children:[(0,n.jsx)("input",{type:"text",className:"form-control form-control-sm pe-4 fs-6",placeholder:"Search ".concat(Pn("student"),"s..."),value:ba,onChange:function(e){return l=e.target.value,i=null==l?void 0:l.trimStart(),pa(i),ga(!0),(null==Sa?void 0:Sa.current)&&clearTimeout(null==Sa?void 0:Sa.current),void(Sa.current=setTimeout(function(){gn((0,p.Ts)({page:1,page_size:200,search:i})).then(function(){ga(!1)})},300));var l,i}}),xa?(0,n.jsx)("div",{className:"position-absolute top-50 end-0 translate-middle-y pe-2",children:(0,n.jsx)("div",{className:"spinner-border spinner-border-sm text-secondary",role:"status",children:(0,n.jsx)("span",{className:"visually-hidden",children:"Loading..."})})}):null]})}),(0,n.jsxs)(d.N_,{to:"/student-management/create",className:"d-inline-block px-3 py-2 text-decoration-none border-bottom btn-secondry mx-2 my-2",onClick:function(){return ma(!1)},children:[(0,n.jsx)("i",{className:"icon-plus me-2"}),"Create New"," ",Pn("student",!0)]}),(null===(Tl=Wn.data)||void 0===Tl?void 0:Tl.length)?(0,n.jsx)(a.Fragment,{children:Wn.data.filter(function(e){var l;return(null===(l=null==e?void 0:e.label)||void 0===l?void 0:l.toLowerCase().includes(ba.toLowerCase()))||e.child_name&&e.child_name.toLowerCase().includes(ba.toLowerCase())}).map(function(e,l){return(0,n.jsxs)("div",{className:"px-3 py-2 hover-bg-light cursor-pointer",onClick:function(){return $(void 0,void 0,void 0,function(){var l,i,n,a,t,d;return ee(this,function(o){switch(o.label){case 0:if(ma(!1),ka(null),pa(""),!(null===(a=null===(n=null==Rn?void 0:Rn.data)||void 0===n?void 0:n.data)||void 0===a?void 0:a.service_uuid)||!(null===(d=null===(t=null==Rn?void 0:Rn.data)||void 0===t?void 0:t.data)||void 0===d?void 0:d.local_start_datetime))return[2];l={student_id:null==e?void 0:e.value,uuid:null==e?void 0:e.value},o.label=1;case 1:return o.trys.push([1,3,,4]),[4,(0,k.P1)(null===S.dM||void 0===S.dM?void 0:S.dM.studio_student_detail,l,!1)];case 2:return(null==(i=o.sent())?void 0:i.status)&&(ka(i.data),_a(!0),setTimeout(function(){Aa.current&&Aa.current.showModal()},100)),[3,4];case 3:return o.sent(),[3,4];case 4:return[2]}})})},children:[null==e?void 0:e.label,(null==e?void 0:e.child_name)?" (".concat(null==e?void 0:e.child_name,")"):""]},l)})}):(0,n.jsxs)("div",{className:"px-3 py-2 hover-bg-light",children:["No ",Pn("student")," available"]})]}):""]}):null,((null===(El=null===(Ml=null==Rn?void 0:Rn.data)||void 0===Ml?void 0:Ml.data)||void 0===El?void 0:El.purchase_date)&&"schedule"!==mn||(null===(Fl=null===(ql=null==Rn?void 0:Rn.data)||void 0===ql?void 0:ql.data)||void 0===Fl?void 0:Fl.booking_details))&&y()(hn+" "+y()(null===(Il=null===(Bl=null==Rn?void 0:Rn.data)||void 0===Bl?void 0:Bl.data)||void 0===Il?void 0:Il.local_start_datetime).format(null===z.ow||void 0===z.ow?void 0:z.ow.time)).isAfter(y()())?(0,n.jsxs)("div",{className:"dropdown",children:[(0,n.jsxs)("button",{className:"btn btn-danger btn-sm d-flex align-items-center gap-2 rounded-pill border-0 dropdown-toggle",type:"button","data-bs-toggle":"dropdown","aria-expanded":"false",style:{boxShadow:"0 4px 12px rgba(220,53,69,0.3)",transition:"all 0.3s ease"},onMouseEnter:function(e){e.currentTarget.style.transform="translateY(-2px)",e.currentTarget.style.boxShadow="0 6px 20px rgba(220,53,69,0.4)"},onMouseLeave:function(e){e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 4px 12px rgba(220,53,69,0.3)"},children:[(0,n.jsx)("i",{className:"icon-trash"}),"Cancel Booking",(0,n.jsx)("span",{onClick:function(e){return e.stopPropagation()},onMouseDown:function(e){return e.stopPropagation()},style:{display:"inline-flex"},children:(0,n.jsx)(G.A,{content:"This will remove the student with or without a refund as you select".concat("template"!==mn?", but keep the service on the schedule.":".")})})]}),(0,n.jsxs)("ul",{className:"dropdown-menu dropdown-menu-end shadow-sm border-0",children:[(0,n.jsx)("li",{children:(0,n.jsxs)("button",{className:"dropdown-item d-flex align-items-center gap-2",onClick:function(){return xo(!1)},children:[(0,n.jsx)("i",{className:"icon-x-circle text-danger"}),"Cancel (No Refund)"]}
1)}),(null==zd?void 0:zd.refund_status)?"":(0,n.jsx)("li",{children:(0,n.jsxs)("button",{className:"dropdown-item d-flex align-items-center gap-2",onClick:function(){return xo(!0)},children:[(0,n.jsx)("i",{className:"icon-refresh text-success"}),"Cancel with Refund"]})})]})]}):null]}):"",(0,n.jsxs)("div",{className:"tab-content",id:"myTabContent",children:[(0,n.jsx)("div",{className:"tab-pane fade ".concat("students"===wt?"show active":""),id:"students-tab-pane",role:"tabpanel","aria-labelledby":"students-tab",tabIndex:0,children:(0,n.jsxs)("div",{className:"p-4",children:[(null==zd?void 0:zd.user_detail)?(0,n.jsx)("div",{className:"col-12",children:(0,n.jsx)("div",{className:"p-3 rounded-3 bg-light border",children:(0,n.jsxs)("div",{className:"d-flex align-items-start gap-3",children:[(0,n.jsx)("div",{className:"flex-shrink-0",children:(null===(Ll=null==zd?void 0:zd.user_detail)||void 0===Ll?void 0:Ll.profile_image)&&!kd?(0,n.jsx)("img",{src:null===(Pl=null==zd?void 0:zd.user_detail)||void 0===Pl?void 0:Pl.profile_image,alt:"".concat(null===(Rl=null==zd?void 0:zd.user_detail)||void 0===Rl?void 0:Rl.first_name," ").concat(null===(Dl=null==zd?void 0:zd.user_detail)||void 0===Dl?void 0:Dl.last_name),className:"rounded-circle",style:{width:"80px",height:"80px",objectFit:"cover"},onError:function(){Sd(!0)}}):(0,n.jsx)("div",{className:"rounded-circle d-inline-flex align-items-center justify-content-center bg-secondary text-white",style:{width:"80px",height:"80px",fontSize:"32px"},children:(null===(zl=null===(Yl=null===(Ol=null==zd?void 0:zd.user_detail)||void 0===Ol?void 0:Ol.first_name)||void 0===Yl?void 0:Yl.charAt(0))||void 0===zl?void 0:zl.toUpperCase())||(null===(Hl=null===(Gl=null===(Ul=null==zd?void 0:zd.user_detail)||void 0===Ul?void 0:Ul.email)||void 0===Gl?void 0:Gl.charAt(0))||void 0===Hl?void 0:Hl.toUpperCase())||"U"})}),(0,n.jsxs)("div",{className:"flex-grow-1 d-flex flex-column gap-2",children:[(0,n.jsx)("div",{children:(0,n.jsxs)("h6",{className:"mb-0 fw-semibold",children:[null===(Vl=null==zd?void 0:zd.user_detail)||void 0===Vl?void 0:Vl.first_name," ",null===(Wl=null==zd?void 0:zd.user_detail)||void 0===Wl?void 0:Wl.last_name]})}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("span",{className:"fw-medium text-dark",children:["Email:"," "]}),(0,n.jsx)("span",{className:"text-muted",children:null===(Zl=null==zd?void 0:zd.user_detail)||void 0===Zl?void 0:Zl.email})]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("span",{className:"fw-medium text-dark",children:["Mobile No.:"," "]}),(0,n.jsxs)("span",{className:"text-muted",children:[null===(Ql=null==zd?void 0:zd.user_detail)||void 0===Ql?void 0:Ql.phone_code," ",null===(Kl=null==zd?void 0:zd.user_detail)||void 0===Kl?void 0:Kl.phone_number]})]})]})]})})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("h5",{className:"mb-3",children:[Pn("student",!0),"s"]}),(0,n.jsxs)("p",{className:"text-muted",children:[Pn("student",!0)," list for this service schedule will be displayed here."]})]}),(null==zd?void 0:zd.attendees)?(0,n.jsx)("div",{className:"col-12 mt-3",children:(0,n.jsxs)("div",{className:"p-3 rounded-3 bg-light border",children:[(0,n.jsxs)("div",{className:"d-flex justify-content-between align-items-center mb-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h6",{className:"fw-bold text-dark mb-1",children:"Attendee List"}),co>1?(0,n.jsx)("small",{className:"text-muted",children:co>0&&uo>0?"Max ".concat(uo," + you (").concat(co," total)"):"No attendees required"}):""]}),(0,n.jsxs)("div",{className:"d-flex gap-2 align-items-center",children:[(null==zd?void 0:zd.uuid)&&(null===(Xl=null==On?void 0:On.data)||void 0===Xl?void 0:Xl.price_per_extra_attendee)?(0,n.jsx)("button",{type:"button",className:"btn btn-sm btn-outline-dark",onClick:function(){return Et(!0)},children:"Add More Guests"}):null,uo>0&&vo?(0,n.jsx)("button",{type:"button",className:"btn btn-sm btn-outline-dark",onClick:function(){Od(),At(!0)},disabled:!vo,children:"Invite More Guests"}):"",(null==zd?void 0:zd.uuid)?(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("button",{type:"button",className:"btn btn-sm btn-outline-dark d-flex align-items-center gap-1",onClick:function(){var e,l="".concat(s.CY,"studio-details/service-details/attendee-sign/invite-").concat(null==zd?void 0:zd.uuid);
1null===(e=navigator.clipboard)||void 0===e||e.writeText(l).then(function(){V.toast.success("Link is copied")}).catch(function(){V.toast.error("Failed to copy link")})},title:"Copy attendee invite link",children:[(0,n.jsx)("i",{className:"icon-share-2"}),(0,n.jsx)(G.A,{content:"".concat(Pn("student")," can directly invite from this URL")})]})}):null]})]}),(0,n.jsx)("div",{className:"table-responsive table-scroll-1",children:(0,n.jsxs)("table",{className:"table align-middle mb-0",children:[(0,n.jsx)("thead",{className:"table-light",children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{children:"Name"}),(0,n.jsx)("th",{children:"Email"}),(0,n.jsx)("th",{children:"Status"}),(0,n.jsx)("th",{children:"Actions"})]})}),(0,n.jsx)("tbody",{children:(null==Gd?void 0:Gd.length)?Gd.map(function(e,l){var i=function(e){return(null==e?void 0:e.signature_status)?"completed"===e.signature_status?"completed":"pending":(null==e?void 0:e.waiver_signed)?"completed":"pending"}(e);return(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{children:(0,n.jsxs)("span",{className:"fw-semibold",children:[(null==e?void 0:e.name)||"-",(null==e?void 0:e.isSelf)?(0,n.jsx)("span",{className:"badge bg-primary-subtle text-primary ms-2",children:"Booked By"}):null]})}),(0,n.jsx)("td",{children:(null==e?void 0:e.email)||"-"}),(0,n.jsx)("td",{children:(null==e?void 0:e.isSelf)?"-":(0,n.jsx)("span",{className:"badge ".concat("completed"===i?"bg-success-subtle text-success":"bg-warning-subtle text-warning"),children:"completed"===i?"Signed":"Pending"})}),(0,n.jsx)("td",{children:(null==e?void 0:e.isSelf)?"":(0,n.jsxs)("div",{className:"d-flex justify-content-start gap-2",children:[(null==e?void 0:e.waiver_signed)?"":(0,n.jsx)("button",{type:"button",className:"btn btn-sm ".concat(!(null==e?void 0:e.email)||(null==e?void 0:e.isSelf)||(null==Cn?void 0:Cn.loading)&&l==Tn||(null==e?void 0:e.waiver_signed)?"btn-secondary":"btn-outline-success"),onClick:function(){return function(e,l){Mn(l),Cn.makeRequest({payload:{uuid:e},url:null===S.dM||void 0===S.dM?void 0:S.dM.studio_service_attendee_resend_invite,showNotification:!0})}(null==e?void 0:e.uuid,l)},disabled:!(null==e?void 0:e.email)||(null==Cn?void 0:Cn.loading)&&l==Tn||(null==e?void 0:e.waiver_signed),children:"Resend Invite"}),(0,n.jsx)("button",{type:"button",className:"btn btn-sm btn-outline-dark",onClick:function(){Bt(!0),Pt(e)},disabled:null==e?void 0:e.isSelf,children:(null==e?void 0:e.waiver_signed)?"View Signed Waiver":"Sign Waiver"}),(0,n.jsx)("button",{type:"button",className:"btn btn-sm btn-outline-danger",onClick:function(){return l=null==e?void 0:e.uuid,void P().fire({title:"Are you sure?",icon:"warning",showCancelButton:!0,confirmButtonColor:"rgb(26, 26, 58)",cancelButtonColor:"#d33",confirmButtonText:"Yes, Delete"}).then(function(e){e.isConfirmed&&En.makeRequest({payload:{uuid:l},url:null===S.dM||void 0===S.dM?void 0:S.dM.studio_service_attendee_remove,showNotification:!0})});var l},disabled:null==e?void 0:e.isSelf,style:{minWidth:"38px"},children:(0,n.jsx)("i",{className:"icon-trash"})})]})})]},l)}):(0,n.jsx)("tr",{children:(0,n.jsx)("td",{colSpan:4,className:"text-center text-muted",children:"No attendees added yet."})})})]})}),co>0?(0,n.jsxs)("div",{className:"d-flex justify-content-between align-items-center text-muted small mt-2",children:[(0,n.jsxs)("span",{children:["Invite Accepted Attendees: ",mo+1]}),(0,n.jsxs)("span",{children:["Total Invited Attendees:"," ",(null==Gd?void 0:Gd.length)||0]})]}):""]})}):""]})}),zd?(0,n.jsx)("div",{className:"tab-pane fade ".concat("booking"===wt?"show active":""),id:"booking-tab-pane",role:"tabpanel","aria-labelledby":"booking-tab",tabIndex:0,children:(0,n.jsxs)("div",{className:"p-4",children:[(0,n.jsx)("h5",{className:"mb-4",children:"Booking Information"}),(0,n.jsxs)("div",{className:"row g-3",children:[(null==zd?void 0:zd.user_detail)?(0,n.jsx)("div",{className:"col-12",children:(0,n.jsx)("div",{className:"p-3 rounded-3 bg-light border",children:(0,n.jsxs)("div",{className:"d-flex align-items-start gap-3",children:[(0,n.jsx)("div",{className:"flex-shrink-0",children:(null===(Jl=null==zd?void 0:zd.user_detail)||void 0===Jl?void 0:Jl.profile_image)&&!kd?(0,n.jsx)("img",{src:null===($l=null==zd?void 0:zd.user_detail)||void 0===$l?void 0:$l.profile_image,alt:"".concat(null===(ei=null==zd?void 0:zd.user_detail)||void 0===ei?void 0:ei.first_name," ").concat(null===(li=null==zd?void 0:zd.user_detail)||void 0===li?void 0:li.last_name),className:"rounded-circle",style:{width:"80px",height:"80px",objectFit:"cover"},onError:function(){Sd(!0)}}):(0,n.jsx)("div",{className:"rounded-circle d-inline-flex align-items-center justify-content-center bg-secondary text-white",style:{width:"80px",height:"80px",fontSize:"32px"},children:(null===(ai=null===(ni=null===(ii=null==zd?void 0:zd.user_detail)||void 0===ii?void 0:ii.first_name)||void 0===ni?void 0:ni.charAt(0))||void 0===ai?void 0:ai.toUpperCase())||(null===(oi=null===(di=null===(ti=null==zd?void 0:zd.user_detail)||void 0===ti?void 0:ti.email)||void 0===di?void 0:di.charAt(0))||void 0===oi?void 0:oi.toUpperCase())||"U"})}),(0,n.jsxs)("div",{className:"flex-grow-1 d-flex flex-column gap-2",children:[(0,n.jsx)("div",{children:(0,n.jsxs)("h6",{className:"mb-0 fw-semibold",children:[null===(si=null==zd?void 0:zd.user_detail)||void 0===si?void 0:si.first_name," ",null===(ri=null==zd?void 0:zd.user_detail)||void 0===ri?void 0:ri.last_name]})}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("span",{className:"fw-medium text-dark",children:["Email:"," "]}),(0,n.jsx)("span",{className:"text-muted",children:zd.user_detail.email})]}),(null===(ci=null==zd?void 0:zd.user_detail)||void 0===ci?void 0:ci.phone_number)?(0,n.jsxs)("div",{children:[(0,n.jsxs)("span",{className:"fw-medium text-dark",children:["Mobile No.:"," "]}),(0,n.jsxs)("span",{className:"text-muted",children:[null===(ui=null==zd?void 0:zd.user_detail)||void 0===ui?void 0:ui.phone_code," ",null===(vi=null==zd?void 0:zd.user_detail)||void 0===vi?void 0:vi.phone_number]})]}):null]})]})})}):"",(null==zd?void 0:zd.payment_status)?(0,n.jsx)(a.Fragment,{children:(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex align-items-center justify-content-between p-2 rounded-3 bg-light",children:[(0,n.jsx)("span",{className:"fw-medium text-dark",children:"Cost"}),(0,n.jsxs)("span",{className:"text-muted",children:[Zn," ",Number((null==zd?void 0:zd.cost)||0).toFixed(2)]})]})})}):"",(null==zd?void 0:zd.addons)&&(null==zd?void 0:zd.addons.length)>0?(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"p-3 rounded-3 bg-light border",children:[(0,n.jsx)("h6",{className:"fw-bold text-dark mb-2",children:"Add-ons"}),zd.addons.map(function(e,l){return(0,n.jsxs)("div",{className:"d-flex justify-content-between mb-2",children:[(0,n.jsxs)("span",{className:"text-muted",children:[e.name," (Qty: ",e.quantity,")"]}),(0,n.jsxs)("span",{className:"fw-medium",children:[Zn," ",Number(e.total_amount||0).toFixed(2)]})]},l)}),(0,n.jsxs)("div",{className:"d-flex justify-content-between pt-2 mt-2 border-top",children:[(0,n.jsx)("span",{className:"fw-bold text-dark",children:"Total Add-ons"}),(0,n.jsxs)("span",{className:"fw-bold text-dark",children:[Zn," ",zd.addons.reduce(function(e,l){return e+Number(l.total_amount||0)},0).toFixed(2)]})]})]})}):"",(null==zd?void 0:zd.extra_attendees)&&(null===(mi=null==zd?void 0:zd.extra_attendees)||void 0===mi?void 0:mi.attendee_count)>0?(0,n.jsxs)("div",{className:"col-12",children:[(0,n.jsxs)("div",{className:"d-flex align-items-center justify-content-between p-2 rounded-3 bg-light",children:[(0,n.jsx)("span",{className:"fw-medium text-dark",children:"Total Attendees"}),(0,n.jsx)("span",{className:"text-muted",children:null==zd?void 0:zd.attendees})]}),(0,n.jsxs)("div",{className:"p-3 rounded-3 bg-light border",children:[(0,n.jsx)("h6",{className:"fw-bold text-dark mb-2",children:"Extra Attendees"}),(0,n.jsxs)("div",{className:"d-flex justify-content-between mb-2",children:[(0,n.jsxs)("span",{className:"text-muted",children:[null===(hi=null==zd?void 0:zd.extra_attendees)||void 0===hi?void 0:hi.attendee_count," ","extra attendee(s)"]}),(0,n.jsxs)("span",{className:"fw-medium",children:[Zn," ",Number((null===(bi=null==zd?void 0:zd.extra_attendees)||void 0===bi?void 0:bi.total_amount)||0).toFixed(2)]})]})]})]}):"",(null==zd?void 0:zd.package_name)?(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex align-items-center justify-content-between p-2 rounded-3 bg-light",children:[(0,n.jsxs)("span",{className:"fw-bold text-success",children:[(0,n.jsx)("span",{className:"text-capitalize",children:null==zd?void 0:zd.payment_method})," applied on service cost (",null==zd?void 0:zd.package_name,")"]}),(0,n.jsxs)("span",{className:"fw-bold text-success",children:["- ",Zn," ",Number((null==zd?void 0:zd.cost)||0).toFixed(2)]})]})}):"",(null==zd?void 0:zd.discount_amount)?(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex align-items-center justify-content-between p-2 rounded-3 bg-light",children:[(0,n.jsxs)("span",{className:"fw-bold text-success",children:["Discount applied (",null==zd?void 0:zd.discount_code,")"]}),(0,n.jsxs)("span",{className:"fw-bold text-success",children:["- ",Zn," ",Number((null==zd?void 0:zd.discount_amount)||0).toFixed(2)]})]})}):"",(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex align-items-center justify-content-between p-2 rounded-3 bg-light",children:[(0,n.jsx)("span",{className:"fw-medium text-dark",children:"Payable Amou
1nt"}),(0,n.jsxs)("span",{className:"fw-bold text-dark",children:[Zn," ",Number((null==zd?void 0:zd.total_before_tax)||0).toFixed(2)]})]})}),(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex align-items-center justify-content-between p-2 rounded-3 bg-light",children:[(0,n.jsx)("span",{className:"fw-medium text-dark",children:"Total Tax"}),(0,n.jsxs)("span",{className:"fw-bold text-dark",children:[Zn," ",Number((null==zd?void 0:zd.total_tax)||0).toFixed(2)]})]})}),(null==zd?void 0:zd.platform_fee)?(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex align-items-center justify-content-between p-2 rounded-3 bg-light",children:[(0,n.jsx)("span",{className:"fw-medium text-dark",children:null===(pi=null==Ln?void 0:Ln.data)||void 0===pi?void 0:pi.platform_fee_title}),(0,n.jsxs)("span",{className:"fw-bold text-dark",children:[Zn," ",Number((null==zd?void 0:zd.platform_fee)||0).toFixed(2)]})]})}):"",(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex align-items-center justify-content-between p-2 rounded-3 bg-light",children:[(0,n.jsx)("span",{className:"fw-medium text-dark",children:"Grand Total"}),(0,n.jsxs)("span",{className:"fw-bold text-dark",children:[Zn," ",Number((null==zd?void 0:zd.total_amount)||0).toFixed(2)]})]})}),(null==zd?void 0:zd.revised_amount)?(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex align-items-center justify-content-between p-2 rounded-3 bg-light",children:[(0,n.jsx)("span",{className:"fw-medium text-dark",children:"Revised Grand Total"}),(0,n.jsxs)("span",{className:"fw-bold text-dark",children:[Zn," ",Number((null==zd?void 0:zd.revised_amount)||0).toFixed(2)]})]})}):"",(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex align-items-center justify-content-between p-2 rounded-3 bg-light",children:[(0,n.jsx)("span",{className:"fw-medium text-dark",children:"Paid Amount"}),(0,n.jsxs)("span",{className:"text-success fw-bold",children:[Zn," ",Number((null==zd?void 0:zd.paid_amount)||0).toFixed(2)]})]})}),(null==zd?void 0:zd.due_amount)&&Number(null==zd?void 0:zd.due_amount)>0?(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"d-flex align-items-center justify-content-between p-2 rounded-3 bg-light",children:[(0,n.jsx)("span",{className:"fw-medium text-dark fw-bold",children:"Due Amount"}),(0,n.jsxs)("span",{className:"text-danger fw-bold",children:[Zn," ",Number((null==zd?void 0:zd.due_amount)||0).toFixed(2)]})]})}):"",(null==zd?void 0:zd.after_booking_added_attendees)&&(null==zd?void 0:zd.after_booking_added_attendees.length)>0?(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"p-3 rounded-3 bg-light border",children:[(0,n.jsx)("h6",{className:"fw-bold text-dark mb-3",children:"After Booking Added Attendees"}),zd.after_booking_added_attendees.map(function(e,l){return(0,n.jsxs)("div",{className:"d-flex justify-content-between align-items-center mb-2 pb-2 border-bottom",children:[(0,n.jsxs)("span",{className:"text-muted",children:[e.attendee_count," extra attendee(s) added"]}),(0,n.jsx)("span",{className:"text-muted",style:{fontSize:"12px"},children:(0,Q.ns)(e.created_date)})]},l)})]})}):"",(null==zd?void 0:zd.answers)&&(null===(fi=null==zd?void 0:zd.answers)||void 0===fi?void 0:fi.length)>0?(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"p-3 rounded-3 bg-light border",children:[(0,n.jsx)("h6",{className:"fw-bold text-dark mb-2",children:"Questions & Answers"}),null==zd?void 0:zd.answers.map(function(e,l){return(0,n.jsxs)("div",{className:"mb-3",children:[(0,n.jsx)("div",{className:"fw-medium text-dark mb-1",children:e.question}),(0,n.jsx)("div",{className:"text-muted",children:e.answer})]},l)})]})}):""]})]})}):"",(null===(gi=null===(xi=null==Rn?void 0:Rn.data)||void 0===xi?void 0:xi.data)||void 0===gi?void 0:gi.cancel_records)&&(null===(Ni=null===(ji=null==Rn?void 0:Rn.data)||void 0===ji?void 0:ji.data)||void 0===Ni?void 0:Ni.cancel_records.length)>0?(0,n.jsx)("div",{className:"tab-pane fade ".concat("booking-history"===wt?"show active":""),id:"booking-history-tab-pane",role:"tabpanel","aria-labelledby":"booking-history-tab",tabIndex:0,children:(0,n.jsx)(W.A,{cancelRecords:(null===(yi=null===(_i=null==Rn?void 0:Rn.data)||void 0===_i?void 0:_i.data)||void 0===yi?void 0:yi.cancel_records)||[],currencySymbol:Zn})}):""]})]})]})})]})})]}),(null===(ki=null===(wi=null==Rn?void 0:Rn.data)||void 0===wi?void 0:wi.data)||void 0===ki?void 0:ki.booking_details)?"":(0,n.jsx)("div",{className:"modal fade ".concat(Na?"show d-block":"d-none"),id:"buyScheduleModal",tabIndex:-1,"aria-labelledby":"buyScheduleModalLabel","aria-hidden":"true","data-bs-backdrop":"static","data-bs-keyboard":"false",style:{backgroundColor:"rgba(0, 0, 0, 0.5)"},children:(0,n.jsx)("div",{className:"modal-dialog modal-lg",children:(0,n.jsxs)("div",{className:"modal-content",children:[(0,n.jsxs)("div",{className:"modal-header",children:[(0,n.jsx)("h5",{className:"modal-title",id:"buyScheduleModalLabel",children:"Book Service Schedule"}),(0,n.jsx)("button",{type:"button",className:"btn-close","data-bs-dismiss":"modal","aria-label":"Close",onClick:Qd})]}),(0,n.jsx)("div",{className:"modal-body",children:Na&&wa&&(null===(Si=null==Rn?void 0:Rn.data)||void 0===Si?void 0:Si.data)&&On.data?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"table-responsive modal-schedule-table",children:(0,n.jsx)("table",{className:"table memberPackageDetails HWE_packageDetails align-middle table-bordered",children:(0,n.jsxs)("tbody",{children:[Ud?(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{scope:"row",children:"Start Date & Time"}),(0,n.jsxs)("td",{children:[(0,n.jsx)("i",{className:"icon-calendar text-dark me-2"}),ho(Ud)]})]}):null,(null===(Ci=On.data)||void 0===Ci?void 0:Ci.questions)&&On.data.questions.length>0?(0,n.jsx)(n.Fragment,{children:On.data.questions.map(function(e,l){return(0,n.jsx)("tr",{children:(0,n.jsx)("td",{colSpan:2,children:(0,n.jsxs)("div",{className:"rounded-4 p-4 shadow-sm border border-light overflow-hidden mb-3",style:{background:"linear-gradient(270deg, rgba(219, 109, 97, 0.1) 0%, rgba(176, 62, 199, 0.1) 49%, rgba(91, 28, 220, 0.1) 100%)",transition:"all 0.3s ease"},children:[(0,n.jsx)("div",{className:"d-flex justify-content-between align-items-start mb-3",children:(0,n.jsxs)("label",{className:"form-label mb-0 fw-semibold",style:{background:"linear-gradient(270deg, #db6d61 0%, #b03ec7 49%, #5b1cdc 100%)",WebkitBackgroun
1dClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",fontSize:"1rem"},children:[null==e?void 0:e.question," ",(0,n.jsx)("span",{className:"text-danger",children:"*"})]})}),(0,n.jsxs)("div",{className:"bg-white bg-opacity-90 rounded-3 p-3 border border-light",children:[(0,n.jsx)("textarea",{className:"form-control border-0 shadow-none ".concat(Ha[null==e?void 0:e.uuid]?"is-invalid":""),onChange:function(l){var i,n=J({},Da);if(n[null==e?void 0:e.uuid]=null===(i=null==l?void 0:l.target)||void 0===i?void 0:i.value,Oa(n),Ha[null==e?void 0:e.uuid]){var a=J({},Ha);delete a[null==e?void 0:e.uuid],Va(a)}},value:Da[null==e?void 0:e.uuid]||"",rows:3,required:!0,placeholder:"Enter your answer...",style:{backgroundColor:"transparent",resize:"vertical",minHeight:"80px"}}),Ha[null==e?void 0:e.uuid]&&(0,n.jsx)("div",{className:"invalid-feedback d-block mt-2",children:Ha[null==e?void 0:e.uuid]})]})]})})},(null==e?void 0:e.uuid)||l)})}):null,(!(null===(Ai=On.data)||void 0===Ai?void 0:Ai.questions)||0===(null===(Mi=null===(Ti=On.data)||void 0===Ti?void 0:Ti.questions)||void 0===Mi?void 0:Mi.length))&&(null===(Ei=On.data)||void 0===Ei?void 0:Ei.question)&&(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{scope:"row",className:"w-25",children:"Question"}),(0,n.jsxs)("td",{children:[(0,n.jsxs)("label",{className:"form-label mb-2 d-block",children:[On.data.question," ",(0,n.jsx)("span",{className:"text-danger",children:"*"})]}),(0,n.jsx)("textarea",{className:"form-control",onChange:function(e){var l;return Ua(null===(l=null==e?void 0:e.target)||void 0===l?void 0:l.value)},value:za,rows:3,placeholder:"Enter your answer...",required:!0})]})]}),(null===(qi=On.data)||void 0===qi?void 0:qi.max_capacity)&&Number(null===(Fi=On.data)||void 0===Fi?void 0:Fi.max_capacity)>1?(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{scope:"row",children:"Number of Attendees"}),(0,n.jsx)("td",{children:(0,n.jsxs)("div",{className:"d-flex align-items-center",children:[(0,n.jsx)("button",{type:"button",className:"btn btn-sm btn-outline-dark",onClick:function(){var e,l=Number((null===(e=On.data)||void 0===e?void 0:e.min_capacity)||1);Xa>l&&Ja(Math.max(Xa-1,l))},disabled:Xa<=Number((null===(Bi=On.data)||void 0===Bi?void 0:Bi.min_capacity)||1),children:"-"}),(0,n.jsx)("span",{className:"mx-3 fw-medium",children:Math.max(Xa,Number((null===(Ii=On.data)||void 0===Ii?void 0:Ii.min_capacity)||1))}),(0,n.jsx)("button",{type:"button",className:"btn btn-sm btn-outline-dark",onClick:function(){var e,l=Number((null===(e=On.data)||void 0===e?void 0:e.max_capacity)||0);Xa<l&&Ja(Xa+1)},disabled:Xa>=Number((null===(Li=On.data)||void 0===Li?void 0:Li.max_capacity)||0),children:"+"}),(0,n.jsxs)("span",{className:"ms-3 text-muted small",children:["(Min:"," ",(null===(Pi=On.data)||void 0===Pi?void 0:Pi.min_capacity)||1,", Max:"," ",(null===(Ri=On.data)||void 0===Ri?void 0:Ri.max_capacity)||"Unlimited",")",Xa>Number((null===(Di=On.data)||void 0===Di?void 0:Di.min_capacity)||1)&&(null===(Oi=On.data)||void 0===Oi?void 0:Oi.price_per_extra_attendee)?(0,n.jsxs)("span",{className:"text-primary d-block mt-1",children:["Extra attendees:"," ",Xa-Number((null===(Yi=On.data)||void 0===Yi?void 0:Yi.min_capacity)||1)," ","× ",Zn,null===(zi=On.data)||void 0===zi?void 0:zi.price_per_extra_attendee]}):null]})]})})]}):null,(null===(Ui=On.data)||void 0===Ui?void 0:Ui.addons)&&On.data.addons.length>0?(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{scope:"row",children:"Add-ons"}),(0,n.jsx)("td",{children:(0,n.jsx)("div",{className:"addons-list",children:On.data.addons.map(function(e,l){var i;return(0,n.jsx)("div",{className:"card mb-2",children:(0,n.jsx)("div",{className:"card-body p-3",children:(0,n.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h6",{className:"mb-1",children:null==e?void 0:e.name}),(0,n.jsxs)("p",{className:"mb-0 text-muted",children:[Zn,null==e?void 0:e.price]})]}),(0,n.jsxs)("div",{className:"d-flex align-items-center",children:[(0,n.jsx)("button",{type:"button",className:"btn btn-sm btn-outline-dark",onClick:function(){var l,i=J({},Za),n=(null===(l=i[null==e?void 0:e.uuid])||void 0===l?void 0:l.quantity)||0;n>0&&(i[null==e?void 0:e.uuid]=J(J({},e),{quantity:n-1}),0===i[null==e?void 0:e.uuid].quantity&&delete i[null==e?void 0:e.uuid]),Qa(J({},i))},children:"-"}),(0,n.jsx)("span",{className:"mx-2 fw-medium",children:(null===(i=Za[null==e?void 0:e.uuid])||void 0===i?void 0:i.quantity)||0}),(0,n.jsx)("button",{type:"button",className:"btn btn-sm btn-outline-dark",onClick:function(){var l,i=J({},Za);i[null==e?void 0:e.uuid]=J(J({},e),{quantity:((null===(l=i[null==e?void 0:e.uuid])||void 0===l?void 0:l.quantity)||0)+1}),Qa(J({},i))},children:"+"})]})]})})},(null==e?void 0:e.uuid)||l)})})})]}):null]})})}),On.data?(0,n.jsx)("div",{className:"modal-schedule-table",children:(0,n.jsx)("table",{className:"table memberPackageDetails HWE_packageDetails align-middle table-bordered",children:(0,n.jsxs)("tbody",{children:[Xd()>0?(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{scope:"row",children:"Add-ons Total"}),(0,n.jsxs)("td",{children:[Zn," ",Xd().toFixed(2)]})]}):null,Jd()>0?(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{scope:"row",children:"Extra Attendees"}),(0,n.jsxs)("td",{children:[Zn," ",Jd().toFixed(2)]})]}):null,(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{scope:"row",children:"Sub Total"}),(0,n.jsxs)("td",{children:[Zn," ",$d().toFixed(2)]})]}),no&&(null===(Hi=null===(Gi=null==Ln?void 0:Ln.data)||void 0===Gi?void 0:Gi.tax)||void 0===Hi?void 0:Hi.length)?null===(Wi=null===(Vi=null==Ln?void 0:Ln.data)||void 0===Vi?void 0:Vi.tax)||void 0===Wi?void 0:Wi.map(function(e,l){return(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{scope:"row",children:(0,f.Kn)(null==e?void 0:e.name,null==e?void 0:e.value,eo)}),(0,n.jsxs)("td",{children:[Zn," ",oo($d(),null==e?void 0:e.value).toFixed(2)]})]},l)}):"",Zt?"":(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{scope:"row",children:"Grand Total"}),(0,n.jsx)("td",{children:(0,n.jsxs)("div",{className:"d-flex flex-wrap gap-2 align-items-center",children:[Zn," ",to().toFixed(2)," ",(0,n.jsxs)("div",{className:"d-flex flex-wrap gap-2",children:[parseFloat(to().toString())>1?(0,n.jsx)("button",{type:"button",className:"me-2 w-auto btn text-nowrap ".concat(Nt?"btn-secondry":"custom-refund-deslected"),onClick:function(){pt(!0),_t(!0),gt(to()),mt(to()),gt(""),mt(to()),lt("")},children:"Partial Payment"}):"",parseFloat(to().toString())>1?(0,n.jsxs)("button",{type:"button",className:"me-2 w-auto btn text-nowrap ".concat(Nt?"custom-refund-deslected":"btn-secondry"),onClick:function(){pt(!1),_t(!1),gt("")},children:[" ","Full Payment"]}):""]})]})})]}),!bt&&parseFloat(to())>0&&!Zt?(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{scope:"row",children:"Revised Grand Total"}),(0,n.jsx)("td",{children:(0,n.jsx)("input",{type:"text",className:"form-control",id:"amount",placeholder:"Amount",value:vt,maxLength:6,onInput:function(e){var l=e.target.value,i=(l=l.replace(/[^0-9.]/g,"")).split(".");i.length>2&&i.pop(),2===i.length&&(i[1]=i[1].substring(0,2)),l=i.join("."),e.target.value=l},onChange:function(e){ro(e.target.value)},style:{width:"150px"},disabled:!!bt})})]}):"",bt?(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{scope:"row",children:"Partial Payment Amount"}),(0,n.jsxs)("td",{children:[(0,n.jsx)("input",{type:"text",className:"form-control w-auto",id:"partial_amount",placeholder:"Partial Amount",value:xt,maxLength:6,onInput:function(e){var l=e.target.value,i=(l=l.replace(/[^0-9.]/g,"")).split(".");i.length>2&&i.pop(),2===i.length&&(i[1]=i[1].substring(0,2)),l=i.join("."),parseFloat(l)>
1parseFloat(to().toString())&&(l=String(to())),e.target.value=l},onChange:function(e){gt(e.target.value),lt(0==e.target.value&&"membership"!=et?"other":"")},style:{width:"150px"}}),bt&&xt>parseFloat(to())?(0,n.jsxs)("p",{className:"mt-2 mb-0",style:{color:"red"},children:["Partial payment should be less than"," ",parseFloat(to())]}):"",bt&&""==xt?(0,n.jsx)("p",{className:"mt-2 mb-0",style:{color:"red"},children:"Partial payment is required"}):"",bt&&""!=xt&&parseFloat(xt)<parseFloat(to())&&parseFloat(to())-parseFloat(xt)<1?(0,n.jsx)("p",{className:"mt-2 mb-0",style:{color:"red"},children:"Remaining amount cannot be less than $1"}):""]})]}):""]})})}):null,((null==Dt?void 0:Dt.length)>0||(null==zt?void 0:zt.length)>0)&&!bt?(0,n.jsx)("div",{className:"modal-schedule-table",children:(0,n.jsxs)("div",{className:"card mt-4 payment-method-card-parent",children:[(0,n.jsx)("div",{className:"w-100 payment-method-card",children:(0,n.jsx)("b",{className:"text-light",children:"Click the Membership or Package to use it for this booking"})}),(0,n.jsxs)("div",{className:"card-body p-2",children:[(0,n.jsxs)("ul",{className:"nav nav-tabs tab-ul inner-tab-ul modeltab p-0 mb-4",id:"scheduleBookPurchaseTab",role:"tablist",children:[(null==zt?void 0:zt.length)?(0,n.jsx)("li",{className:"nav-item",role:"presentation",children:(0,n.jsx)("button",{className:"nav-link ".concat("membership"===nd?"active":""),id:"schedule-book-membership-tab","data-bs-toggle":"tab","data-bs-target":"#schedule-book-membership-pane",type:"button",role:"tab","aria-controls":"schedule-book-membership-pane","aria-selected":"membership"===nd,onClick:function(){ad("membership"),Qt(null),ld({}),Jt(""),lt("")},children:"Memberships"})}):"",(null==Dt?void 0:Dt.length)?(0,n.jsx)("li",{className:"nav-item",role:"presentation",children:(0,n.jsx)("button",{className:"nav-link ".concat("package"===nd?"active":""),id:"schedule-book-package-tab","data-bs-toggle":"tab","data-bs-target":"#schedule-book-package-pane",type:"button",role:"tab","aria-controls":"schedule-book-package-pane","aria-selected":"package"===nd,onClick:function(){ad("package"),Qt(null),ld({}),Jt(""),lt("")},children:"Packages"})}):""]}),(0,n.jsx)("div",{className:"right-side-main p-0",children:(0,n.jsxs)("div",{className:"tab-content",id:"scheduleBookPurchaseTabContent",children:[(0,n.jsx)("div",{className:"tab-pane fade show ".concat("package"===nd?"active":""),id:"schedule-book-package-pane",role:"tabpanel","aria-labelledby":"schedule-book-package-tab",tabIndex:0,children:(0,n.jsx)("div",{className:"memberSHopList",children:(0,n.jsx)("div",{className:"scrollListITem student-offline-package-scroll",children:(null==Dt?void 0:Dt.length)?null==Dt?void 0:Dt.map(function(e,l){var i,t;return(0,n.jsxs)("div",{className:"list-group-item position-relative cursor-pointer ".concat((null==Zt?void 0:Zt.id)==(null==e?void 0:e.id)&&"package"===Xt?"offline-btn-secondry":""),onClick:function(){!function(e){var l,i;if(null==e?void 0:e.eligible){if((null==Zt?void 0:Zt.id)==(null==e?void 0:e.id)&&"package"===Xt)return Qt(null),ld({}),Jt(""),void lt("");at(!1),Qt(e),Jt("package"),lt("package");var n=null===(i=null==e?void 0:e.redeemable_tag_count)||void 0===i?void 0:i.find(function(e){return 0!=(null==e?void 0:e.remaining_count)});ld(n||{})}else{var a='\n            <div class="eligibility-popup">\n               <div class="eligibility-header">\n                  <div class="icon-wrapper">\n                     '.concat(X.a,'\n                  </div>\n                  <p>This package can not be used for this booking because:</p>\n               </div>\n               <div class="reasons-list">\n                  ').concat(null===(l=null==e?void 0:e.eligibility_reasons)||void 0===l?void 0:l.map(function(e,l){return'\n                     <div class="reason-item">\n                        <div class="reason-number">'.concat(l+1,'</div>\n                        <div class="reason-text">').concat(e,"</div>\n                     </div>")}).join(""),"\n               </div>\n            </div>");P().fire({title:'<span style="display:none">Eligibility Info</span>',html:a,width:520,padding:"0",background:"#ffffff",showCloseButton:!0,showConfirmButton:!1,customClass:{popup:"custom-swal-popup animate__animated animate__fadeInUp",closeButton:"custom-swal-close"}})}}(e)},children:[(0,n.jsx)("p",{className:"mb-2",children:null==e?void 0:e.name}),(0,n.jsx)("p",{children:(null==e?void 0:e.activate_on_first_booking)&&(null==e?void 0:e.is_package_deactivated)?"Pending Activation":(null==e?void 0:e.end_date_time)?"Valid until - "+(0,f.SH)(null==e?void 0:e.end_date_time,null===(i=null==Ln?void 0:Ln.data)||void 0===i?void 0:i.currency):"Valid until - Unlimited"}),(null==e?void 0:e.eligible)?(0,n.jsxs)(a.Fragment,{children:[(0,n.jsx)("p",{children:(null==e?void 0:e.remaining_classes)?"Remaining Class - "+(null==e?void 0:e.remaining_classes)+" / "+(null==e?void 0:e.total_classes):""}),(0,n.jsx)("p",{children:(null==e?void 0:e.redeemable_count)?"Redeemable Classes - "+(null==e?void 0:e.redeemable_count):"Redeemable Classes - 1"}),(null==Zt?void 0:Zt.id)==(null==e?void 0:e.id)&&"package"===Xt&&(null===(t=null==e?void 0:e.redeemable_tag_count)||void 0===t?void 0:t.length)&&Object.keys(ed).length>0?(0,n.jsxs)("span",{className:"selected-tag-chip",children:["Tag:"," ",null==ed?void 0:ed.name]}):""]}):"",(null==e?void 0:e.is_make_up_package)?(0,n.jsx)("span",{className:"badge bg-dark me-2",children:"Makeup Package"}):"",(null==e?void 0:e.is_roll_over_package)?(0,n.jsx)("span",{className:"badge bg-dark me-2",children:"Rolled Over"}):"",(null==e?void 0:e.eligible)?"":(0,n.jsx)("span",{className:"position-absolute top-0 end-0 me-2 mt-1",children:(0,n.jsx)(K.Ay,{})})]},l)}):""})})}),(0,n.jsx)("div",{className:"tab-pane fade show ".concat("membership"===nd?"active":""),id:"schedule-book-membership-pane",role:"tabpanel","aria-labelledby":"schedule-book-membership-tab",tabIndex:0,children:(0,n.jsx)("div",{className:"memberSHopList",children:(0,n.jsx)("div",{className:"scrollListITem student-offline-package-scroll",children:(null==zt?void 0:zt.length)?null==zt?void 0:zt.map(function(e,l){var i,a,t,d,o,s,r,c=Zd(e);return(0,n.jsxs)("div",{className:"list-group-item position-relative cursor-pointer ".concat((null==Zt?void 0:Zt.id)==(null==e?void 0:e.id)&&"membership"===Xt?"offline-btn-secondry":""),onClick:function(){!function(e){var l;if(Zd(e)){var i=Array.isArray(null==e?void 0:e.eligibility_reasons)?le([],e.eligibility_reasons,!0):[];Wd&&!i.includes(Vd)&&i.push(Vd);var n='\n               <div class="eligibility-popup">\n                  <div class="eligibility-header">\n                     <div class="icon-wrapper">\n                        '.concat(X.a,'\n                     </div>\n                     <p>This membership can not be used for this booking because:</p>\n                  </div>\n                  <div class="reasons-list">\n                     ').concat(i.map(function(e,l){return'\n                        <div class="reason-item">\n                           <div class="reason-number">'.concat(l+1,'</div>\n                           <div class="reason-text">').concat(e,"</div>\n                        </div>")}).join(""),"\n                  </div>\n               </div>");P().fire({title:'<span style="display:none">Eligibility Info</span>',html:n,width:520,padding:"0",background:"#ffffff",showCloseButton:!0,showConfirmButton:!1,customClass:{popup:"custom-swal-popup animate__animated animate__fadeInUp",closeButton:"custom-swal-close"}})}else{if((null==Zt?void 0:Zt.id)==(null==e?void 0:e.id)&&"membership"===Xt)return Qt(null),ld({}),Jt(""),void lt("");at(!1),Qt(e),Jt("membership"),lt("membership");var a=null===(l=null==e?void 0:e.redeemable_tag_count)||void 0===l?void 0:l.find(function(e){return 0!=(null==e?void 0:e.remaining_count)}
1);ld(a||{})}}(e)},children:[(0,n.jsx)("p",{className:c?"mb-2 mt-2":"mb-2",children:null==e?void 0:e.name}),(0,n.jsx)("p",{children:(null==e?void 0:e.activate_on_first_booking)&&(null==e?void 0:e.is_package_deactivated)?"Pending Activation":(null==e?void 0:e.end_date_time)?"Valid until - "+(0,f.SH)(null==e?void 0:e.end_date_time,null===(i=null==Ln?void 0:Ln.data)||void 0===i?void 0:i.currency):"Valid until - Unlimited"}),(null===(a=null==e?void 0:e.price_offers)||void 0===a?void 0:a.length)>0?(0,n.jsxs)("p",{children:["Discount Applied -"," ","%"!==(null===(t=null==e?void 0:e.price_offers[0])||void 0===t?void 0:t.discount_type)?(null===(d=null==e?void 0:e.price_offers[0])||void 0===d?void 0:d.discount_type)+" ":"",null===(o=null==e?void 0:e.price_offers[0])||void 0===o?void 0:o.amount,"%"==(null===(s=null==e?void 0:e.price_offers[0])||void 0===s?void 0:s.discount_type)?" %":""]}):c?"":(0,n.jsx)("p",{children:"Redeemable - 1"}),(null==Zt?void 0:Zt.id)==(null==e?void 0:e.id)&&"membership"===Xt&&(null===(r=null==e?void 0:e.redeemable_tag_count)||void 0===r?void 0:r.length)&&Object.keys(ed).length>0?(0,n.jsxs)("span",{className:"selected-tag-chip",children:["Tag:"," ",null==ed?void 0:ed.name]}):"",c?(0,n.jsx)("span",{className:"position-absolute top-0 end-0 me-2 mt-1",title:Wd?Vd:"This membership is not available",children:(0,n.jsx)(K.Ay,{})}):""]},l)}):""})})})]})})]})]})}):null,Number(to())>0&&"membership"!==et?(0,n.jsx)("div",{className:"modal-schedule-table",children:(0,n.jsxs)("div",{className:"card mt-4 payment-method-card-parent",children:[(0,n.jsx)("div",{className:"w-100 payment-method-card",children:(0,n.jsx)("b",{className:"text-light",children:"Select Payment Method"})}),(0,n.jsxs)("div",{className:"card-body",children:[(0,n.jsxs)("div",{className:"card-inner-space",children:[(0,T.wL)(bt,vt,xt,to,"service")?"":(0,n.jsx)("div",{className:"col-md-3",role:"button",children:(0,n.jsx)("div",{className:"right-side-main p-0",children:(0,n.jsx)("div",{className:"tab-content",id:"myTabContent",children:(0,n.jsx)("div",{className:"tab-pane fade show active",id:"wallet",role:"tabpanel","aria-labelledby":"wallet-tab",tabIndex:0,children:(0,n.jsx)("div",{className:"memberSHopList",children:(0,n.jsx)("div",{className:"class_wallet_purchase",children:(0,n.jsxs)("div",{className:"list-group-item d-flex align-items-center m-0 ".concat(nt&&!so()?"offline-btn-secondry":""),onClick:function(){at(!nt)},children:[(0,n.jsx)("img",{src:E,alt:""}),(0,n.jsxs)("p",{className:"mb-0 wallet-price",children:["Wallet Balance ",(0,n.jsx)("br",{}),(0,n.jsxs)("span",{children:[Zn," ",(null===(Zi=null==wa?void 0:wa.student_info)||void 0===Zi?void 0:Zi.wallet_balance)||0]})]})]})})})})})})}),so()&&nt?(0,n.jsx)("p",{className:"text-danger",children:"Insufficient balance in wallet"}):""]}),so()&&nt||!nt?(0,n.jsxs)("div",{className:"card-inner-space",children:[(0,n.jsxs)("div",{className:"form-check-wrapper",children:[parseFloat(to().toString())>.5&&(Number(vt)>.5&&!bt||bt&&Number(xt)>.5)?(0,n.jsxs)("div",{className:"form-check form-check-inline",children:[(0,n.jsx)("input",{className:"form-check-input radio-button-border",type:"radio",name:"card",id:"card",onChange:function(){lt("
1card")},checked:"card"==et,disabled:(0,T.eM)(bt,xt,to,"service")}),(0,n.jsx)("label",{className:"form-check-label",children:"Card on file"})]}):"",(0,n.jsxs)("div",{className:"form-check form-check-inline",children:[(0,n.jsx)("input",{className:"form-check-input radio-button-border",type:"radio",name:"eftpos",id:"eftpos",value:et,onChange:function(){lt("eftpos")},checked:"eftpos"==et,disabled:(0,T.eM)(bt,xt,to,"service")}),(0,n.jsx)("label",{className:"form-check-label",children:"EFTPOS"})]}),(0,n.jsxs)("div",{className:"form-check form-check-inline",children:[(0,n.jsx)("input",{className:"form-check-input radio-button-border",type:"radio",name:"bank_transfer",id:"bank_transfer",onChange:function(){lt("bank_transfer")},checked:"bank_transfer"==et,disabled:(0,T.eM)(bt,xt,to,"service")}),(0,n.jsx)("label",{className:"form-check-label",children:"Bank Transfer"})]}),(0,n.jsxs)("div",{className:"form-check form-check-inline",children:[(0,n.jsx)("input",{className:"form-check-input radio-button-border",type:"radio",name:"cash",id:"cash",onChange:function(){lt("
1cash")},checked:"cash"==et,disabled:(0,T.eM)(bt,xt,to,"service")}),(0,n.jsx)("label",{className:"form-check-label",children:"Cash"})]}),(0,n.jsxs)("div",{className:"form-check form-check-inline",children:[(0,n.jsx)("input",{className:"form-check-input radio-button-border",type:"radio",name:"virtual_terminal",id:"virtual_terminal",onChange:function(){lt("virtual_terminal")},checked:"virtual_terminal"==et,disabled:(0,T.eM)(bt,xt,to,"service")}),(0,n.jsx)("label",{className:"form-check-label",children:"Virtual Terminal"})]}),(0,n.jsxs)("div",{className:"form-check form-check-inline",children:[(0,n.jsx)("input",{className:"form-check-input radio-button-border",type:"radio",name:"gift_card",id:"gift_card",onChange:function(){lt("gift_card")},checked:"gift_card"==et,disabled:(0,T.eM)(bt,xt,to,"service")}),(0,n.jsx)("label",{className:"form-check-label",children:"Gift Card"})]}),(0,n.jsxs)("div",{className:"form-check form-check-inline",children:[(0,n.jsx)("input",{className:"form-check-input radio-button-border",type:"radio",name:"humm_after_pay_zipPay",id:"humm_after_pay_zipPay",onChange:function(){lt("humm_after_pay_zipPay")},checked:"humm_after_pay_zipPay"==et,disabled:(0,T.eM)(bt,xt,to,"service")}),(0,n.jsx)("label",{className:"form-check-label",children:"Humm/After Pay/ZipPay"})]}),(0,n.jsxs)("div",{className:"form-check form-check-inline",children:[(0,n.jsx)("input",{className:"form-check-input radio-button-border",type:"radio",name:"account_credit",id:"account_credit",onChange:function(){lt("account_credit")},checked:"account_credit"==et,disabled:(0,T.eM)(bt,xt,to,"service")}),(0,n.jsx)("label",{className:"form-check-label",children:"Account Credit"})]}),(0,n.jsxs)("div",{className:"form-check form-check-inline",children:[(0,n.jsx)("input",{className:"form-check-input radio-button-border",type:"radio",name:"account_credit_adjustment",id:"account_credit_adjustment",onChange:function(){lt("account_credit_adjustment")},checked:"account_credit_adjustment"==et,disabled:(0,T.eM)(bt,xt,to,"service")}),(0,n.jsxs)("label",{className:"form-check-label",children:["Account Credit Adjustment",(0,n.jsx)(j.A,{})]})]}),(0,n.jsxs)("div",{className:"form-check form-check-inline",children:[(0,n.jsx)("input",{className:"form-check-input radio-button-border",type:"radio",name:"square",id:"square",onCh
1ange:function(){lt("square")},checked:"square"==et,disabled:(0,T.eM)(bt,xt,to,"service")}),(0,n.jsx)("label",{className:"form-check-label",children:"Square"})]}),(0,n.jsxs)("div",{className:"form-check form-check-inline",children:[(0,n.jsx)("input",{className:"form-check-input radio-button-border",type:"radio",name:"venmo",id:"venmo",onChange:function(){lt("venmo")},checked:"venmo"==et,disabled:(0,T.eM)(bt,xt,to,"service")}),(0,n.jsx)("label",{className:"form-check-label",children:"Venmo"})]}),(0,n.jsxs)("div",{className:"form-check form-check-inline",children:[(0,n.jsx)("input",{className:"form-check-input radio-button-border",type:"radio",name:"other",id:"other",onChange:function(){lt("other")},checked:"other"==et,disabled:(0,T.eM)(bt,xt,to,"service")}),(0,n.jsx)("label",{className:"form-check-label",children:"Other"})]})]}),"card"==et?(0,n.jsxs)("div",{className:"tab-pane fade show",id:"card",role:"tabpanel","aria-labelledby":"card",tabIndex:0,children:[(0,n.jsx)(A.A,{setCommonCardId:ct,commonCardId:rt,studentId:null===(Qi=null==wa?void 0:wa.student_info)||void 0===Qi?void 0:Qi.uuid}),(0,n.jsx)(M.A,{amount:bt?xt:Number(vt)==Number(to())?$d():vt,tax_show:1!=bt&&Number(vt)==Number(to()),amount_tax:Number(bt?xt:vt),paymentMethod:et,tax_mode:io})]}):""]}):"",(0,n.jsx)("div",{className:"card-inner-space",children:(0,n.jsxs)("div",{className:"form-input-box",children:[(0,n.jsxs)("label",{htmlFor:"name",className:"form-label f-16 fw-medium",children:["Amount received from ",Pn("student")]}),(0,n.jsx)("input",{type:"text",className:"form-control",id:"amount",placeholder:"Enter amount received from ".concat(Pn("student")),disabled:!0,value:(0,q.Ag)(Number(bt?xt:Number(vt)==Number(to())?$d():vt),Number(bt?xt:vt),Number(null===(Ki=null==Ln?void 0:Ln.data)||void 0===Ki?void 0:Ki.platform_fee),"amounttax",et,0,!0,lo),maxLength:6,onInput:function(e){var l=e.target.value,i=(l=l.replace(/[^0-9.]/g,"")).split(".");i.length>2&&i.pop(),2===i.length&&(i[1]=i[1].substring(0,2)),l=i.join("."),parseFloat(l)>Number(to())&&(l=String(to())),e.target.value=l},onChange:function(e){ro(e.target.value)}})]})}),(0,n.jsx)("div",{className:"card-inner-space",children:(0,n.jsxs)("div",{className:"form-input-box",children:[(0,n.jsx)("label",{htmlFor:"note",className:"form-label f-16 fw-medium",children:"Add Note"}),(0,n.jsx)("input",{type:"text",className:"form-control",id:"note",placeholder:"Enter Note",value:dt,onChange:function(e){ot(e.target.value)},maxLength:100})]})})]}),bt?(0,n.jsx)("div",{className:"modal-schedule-table",children:(0,n.jsx)("div",{className:"card mt-4 payment-method-card-parent",children:(0,n.jsx)("div",{className:"card-body",children:(0,n.jsx)("div",{className:"card-inner-space",children:(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)("div",{className:"col-12 col-sm-5 mb-3",children:(0,n.jsxs)("div",{className:"d-flex align-items-center mb-2",children:[(0,n.jsxs)("span",{className:"form-label mb-0 f-16 fw-medium tooltip-heading",children:["Send this invoice to the"," ",Pn("student")," account",(0,n.jsx)(G.A,{content:(0,H.ic)(Pn)})]}),(0,n.jsx)("div",{className:"form-check form-switch ms-2",children:(0,n.jsx)("input",{className:"form-check-input",type:"checkbox",role:"switch",id:"",onChange:function(e){e.target.checked?(cd(!0),md(!0)):(cd(!1),md(!1),od(!1))},checked:rd})})]})}),vd?(0,n.jsx)("div",{className:"col-12 col-sm-5 mb-3",children:(0,n.jsxs)("div",{className:"d-flex align-items-center mb-2",children:[(0,n.jsxs)("span",{className:"form-label mb-0 f-16 fw-medium tooltip-heading",children:["Include notes in"," ",Pn("student")," email",(0,n.jsx)(G.A,{content:(0,H.eh)(Pn)})]}),(0,n.jsx)("div",{className:"form-check form-switch ms-2",children:(0,n.jsx)("input",{className:"form-check-input",type:"checkbox",role:"switch",id:"",onChange:function(e){return l=e.target.checked,void od(!!l);var l}})})]})}):""]})})})})}):""]})}):""]}):null}),(0,n.jsx)("div",{className:"modal-footer",children:function(){var e,l=(0,T.TN)({paymentMethod:et,commonCardId:rt,isPartial:bt,partialAmount:xt,isCheckWalletApplied:so,walletDetails:nt,paymentMethodLength:null==et?void 0:et.length,selectedPackage:Zt,addonsTotal:Xd(),attendeesTotal:Jd()});return l.showError&&"membership"!==et?(0,n.jsx)("p",{className:"text-danger",children:l.errorMessage}):l.showButton&&(0,T.cH)(Zt,Xt||"package",ed)?(0,n.jsx)("button",{type:"button",className:"btn btn-secondry px-5 shadow-none ms-auto",onClick:Hd,children:"Complete"}):"membership"===et&&(Object.keys(Za).length>0||Number(Xa)>Number((null===(e=null==On?void 0:On.data)||void 0===e?void 0:e.min_capacity)||1))?(0,n.jsx)("div",{className:"alert alert-danger mt-2",children:"Please remove add-ons and extra attendees to continue with membership purchase."}):""}()})]})})}),Ct?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"modal fade show d-block",role:"dialog",children:(0,n.jsx)("div",{className:"modal-dialog modal-dialog-centered",children:(0,n.jsx)("div",{className:"modal-content",children:(0,n.jsxs)("form",{onSubmit:Dd(function(e){var l,i;if(rn){var n=(null==zd?void 0:zd.uuid)||(null===(i=null===(l=null==Rn?void 0:Rn.data)||void 0===l?void 0:l.data)||void 0===i?void 0:i.uuid);
1n&&Sn.makeRequest({payload:{purchase_uuid:n,name:null==e?void 0:e.name,email:null==e?void 0:e.email},url:null===S.dM||void 0===S.dM?void 0:S.dM.studio_service_attendee_add,showNotification:!0})}}),children:[(0,n.jsxs)("div",{className:"modal-header",children:[(0,n.jsx)("h5",{className:"modal-title",children:"Add Attendee"}),(0,n.jsx)("button",{type:"button",className:"btn-close",onClick:function(){At(!1),Od()}})]}),(0,n.jsxs)("div",{className:"modal-body",children:[(0,n.jsxs)("div",{className:"mb-3",children:[(0,n.jsx)("label",{className:"form-label",children:"Full Name"}),(0,n.jsx)("input",J({type:"text",className:"form-control",placeholder:"Enter attendee name"},Rd("name"),{maxLength:30})),(null==Yd?void 0:Yd.name)?(0,n.jsx)("p",{className:"text-danger small mb-0",children:Yd.name.message}):null]}),(0,n.jsxs)("div",{className:"mb-3",children:[(0,n.jsx)("label",{className:"form-label",children:"Email"}),(0,n.jsx)("input",J({type:"email",className:"form-control",placeholder:"Enter attendee email"},Rd("email"))),(null==Yd?void 0:Yd.email)?(0,n.jsx)("p",{className:"text-danger small mb-0",children:Yd.email.message}):null]})]}),(0,n.jsxs)("div",{className:"modal-footer d-flex justify-content-end gap-2",children:[(0,n.jsx)("button",{type:"button",className:"btn btn-danger rounded-pill p-2 flex-fill",onClick:function(){At(!1),Od()},children:"Cancel"}),(0,n.jsx)("button",{type:"submit",className:"btn btn-primary p-2 flex-fill",disabled:!vo||(null==Sn?void 0:Sn.loading),children:(null==Sn?void 0:Sn.loading)?"Inviting...":"Send Invite"})]})]})})})}),(0,n.jsx)("div",{className:"modal-backdrop fade show"})]}):null,Ft&&Lt?(0,n.jsx)(Y.A,{selectedAttendeeData:Lt,setShowSignWaiverModal:Bt,onSuccess:function(){rn&&gn((0,c.yE)({uuid:rn,type:mn,schedule_date:hn}))}}):null,Mt&&(null==zd?void 0:zd.uuid)?(0,n.jsx)(Z.A,{show:Mt,onClose:function(){return Et(!1)},bookingUuid:null==zd?void 0:zd.uuid,serviceData:null==On?void 0:On.data,selectedStudentData:(null==zd?void 0:zd.user_detail)?{student_info:{uuid:null===(Xi=null==zd?void 0:zd.user_detail)||void 0===Xi?void 0:Xi.uuid,wallet_balance:(null===(Ji=null==zd?void 0:zd.user_detail)||void 0===Ji?void 0:Ji.wallet_balance)||0}}:null,onSuccess:function(){var e;rn&&(gn((0,c.yE)({uuid:rn,type:mn,schedule_date:hn})),(null===(e=null==zd?void 0:zd.user_detail)||void 0===e?void 0:e.uuid)&&gn((0,p.Ts)({page:1,page_size:200})))}}):null,(0,n.jsx)(b.A,{show:Ad,onClose:function(){Td(!1),qd(!1)},scheduleId:rn||"",eventType:mn,serviceUuid:(null===($i=null==On?void 0:On.data)||void 0===$i?void 0:$i.uuid)||(null===(ln=null===(en=null==Rn?void 0:Rn.data)||void 0===en?void 0:en.data)||void 0===ln?void 0:ln.service_uuid),scheduleData:null===(nn=null==Rn?void 0:Rn.data)||void 0===nn?void 0:nn.data,serviceData:null==On?void 0:On.data,serviceInstructorData:Gn,updateServiceBooking:Bn,updateScheduleInstructorRequest:In,scheduleDate:hn||void 0,forceInstructorOnlyMode:Ed}),gd&&_d?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"modal fade show d-block",role:"dialog",style:{backgroundColor:"rgba(0, 0, 0, 0.5)"},children:(0,n.jsx)("div",{className:"modal-dialog modal-dialog-centered",children:(0,n.jsxs)("div",{className:"modal-content",children:[(0,n.jsxs)("div",{className:"modal-header",children:[(0,n.jsx)("h5",{className:"modal-title",children:"Instructor Details"}),(0,n.jsx)("button",{type:"button",className:"btn-close",onClick:function(){jd(!1),yd(null)}})]}),(0,n.jsxs)("div",{className:"modal-body",children:[(0,n.jsxs)("div",{className:"text-center mb-4",children:[(null==_d?void 0:_d.profile_picture)?(0,n.jsx)("img",{src:null==_d?void 0:_d.profile_picture,alt:null==_d?void 0:_d.name,className:"rounded-circle mb-3",style:{width:"120px",height:"120px",objectFit:"cover"}}):(0,n.jsx)("div",{className:"rounded-circle mb-3 d-inline-flex align-items-center justify-content-center bg-secondary text-white",style:{width:"120px",height:"120px",fontSize:"48px"},children:(null===(tn=null===(an=null==_d?void 0:_d.name)||void 0===an?void 0:an.charAt(0))||void 0===tn?void 0:tn.toUpperCase())||"I"}),(0,n.jsx)("h4",{className:"mb-2",children:null==_d?void 0:_d.name})]}),(null==_d?void 0:_d.payroll)&&((0,C.Bk)("payroll-class-service",La,Fa)||"Studio"===(null===(dn=null==Ln?void 0:Ln.data)||void 0===dn?void 0:dn.usertype))?(0,n.jsxs)("div",{className:"border-top pt-3",children:[(0,n.jsx)("h6",{className:"fw-bold mb-3",children:"Payroll Information"}),(0,n.jsxs)("div",{className:"row g-3",children:[(0,n.jsx)("div",{className:"col-6",children:(0,n.jsxs)("div",{className:"p-3 rounded bg-light",children:[(0,n.jsx)("div",{className:"text-muted small mb-1",children:"Pay Type"}),(0,n.jsx)("div",{className:"fw-semibold text-capitalize",children:(null===(on=null==_d?void 0:_d.payroll)||void 0===on?void 0:on.pay_type)||"N/A"})]})}),(0,n.jsx)("div",{className:"col-6",children:(0,n.jsxs)("div",{className:"p-3 rounded bg-light",children:[(0,n.jsx)("div",{className:"text-muted small mb-1",children:"Pay Amount"}),(0,n.jsx)("div",{className:"fw-semibold",children:(fo=_d.payroll,fo?"flat"===fo.pay_type?"".concat(Zn).concat(fo.pay_amount):"percentage"===fo.pay_type?"".concat(fo.pay_amount,"%"):"Not specified":"Not specified")})]})})]})]}):"",_d.payroll?"":(0,n.jsx)("div",{className:"text-center text-muted py-3",children:"No payroll information available"})]}),(0,n.jsx)("div",{className:"modal-footer",children:(0,n.jsx)("button",{type:"button",className:"btn btn-secondary",onClick:function(){j
1d(!1),yd(null)},children:"Close"})})]})})}),(0,n.jsx)("div",{className:"modal-backdrop fade show"})]}):null,(0,t.createPortal)((0,n.jsx)("div",{ref:Ma,className:"modal fade membership-tag-modal",id:"membershipTagModal","data-bs-backdrop":"static","data-bs-keyboard":"false",tabIndex:-1,"aria-labelledby":"membershipTagModalLabel","aria-hidden":"true",children:(0,n.jsx)("div",{className:"modal-dialog modal-dialog-centered modal-lg",children:(0,n.jsxs)("div",{className:"modal-content",children:[(0,n.jsxs)("div",{className:"modal-header",children:[(0,n.jsx)("h5",{className:"modal-title",id:"membershipTagModalLabel",children:"Package / membership tag"}),(0,n.jsx)("button",{type:"button",className:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})]}),(0,n.jsx)("div",{className:"modal-body",children:(0,n.jsx)("div",{className:"memberSHopList",children:(0,n.jsx)("div",{className:"scrollListITem student-offline-package-scroll",children:null===(sn=null==Zt?void 0:Zt.redeemable_tag_count)||void 0===sn?void 0:sn.map(function(e,l){return 0!==(Number(null==e?void 0:e.remaining_count)||0)?(0,n.jsxs)("div",{className:"list-group-item position-relative offline-package-membership-card ".concat((null==ed?void 0:ed.name)===(null==e?void 0:e.name)?"offline-btn-secondry offline-package-membership-card--selected":""),onClick:function(){var l,i;ld(e);var n=document.getElementById("membershipTagModal");if(n){var a=null===(i=null===(l=window.bootstrap)||void 0===l?void 0:l.Modal)||void 0===i?void 0:i.getInstance(n);a&&a.hide()}},children:[(0,n.jsx)("p",{className:"offline-package-membership-card-title mb-2",children:null==e?void 0:e.name}),(0,n.jsxs)("p",{className:"offline-package-membership-card-meta",children:["Remaining Count - ",null==e?void 0:e.remaining_count]}),(0,n.jsxs)("p",{className:"offline-package-membership-card-meta",children:["Total Limit - ",null==e?void 0:e.total_limit]}),(0,n.jsx)("p",{className:"offline-package-membership-card-meta mb
1-0",children:"Redeemable - 1"})]},l):(0,n.jsxs)("div",{className:"list-group-item position-relative offline-package-membership-card offline-package-membership-card--disabled",children:[(0,n.jsx)("p",{className:"offline-package-membership-card-title mb-2",children:null==e?void 0:e.name}),(0,n.jsxs)("p",{className:"offline-package-membership-card-meta",children:["Remaining Count - ",null==e?void 0:e.remaining_count]}),(0,n.jsxs)("p",{className:"offline-package-membership-card-meta",children:["Total Limit - ",null==e?void 0:e.total_limit]}),(0,n.jsx)("p",{className:"offline-package-membership-card-meta mb-0 text-danger",children:"Not Available"})]},l)})})})})]})})}),document.body),(0,n.jsx)(g.A,{})]})}}}]);

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.