PageSourceSearch

https://diversitystudio.co.uk/_next/static/chunks/pages/my-account-c6949c6ec80e3a53.js

js diversitystudio.co.uk collected 2026-10-03 00:03:34 UTC 65,171 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[356],{3610:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/my-account",function(){return n(6765)}])},2278:function(e,t){"use strict";t.Z={src:"/_next/static/media/circle.a0b5ba1b.png",height:721,width:1549,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAECAMAAACEE47CAAAADFBMVEWi6NGi59Ci59Ci6NBGeQ5eAAAABHRSTlMBKxwPSf/oMgAAAAlwSFlzAAAD6AAAA+gBtXtSawAAAB1JREFUeJxjYGJkZGJmYmaAASYGCJuZkYGJEQyYAQKPACPyGmfcAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:4}},9260:function(e,t){"use strict";t.Z={src:"/_next/static/media/line.37fd61b6.png",height:95,width:2112,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAABCAMAAADU3h9xAAAABlBMVEWi6NGj6NHLsiNXAAAAAnRSTlNbYoxgSdMAAAAJcEhZcwAAA+gAAAPoAbV7UmsAAAAOSURBVHicY2BkZGQAAQAAHgAEgHr/YQAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:1}},4887:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var i=n(5893);function a(e){var t=e.inactive,n=e.width,a=e.color;e.className;return(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:n||"69.297",height:"50.576",viewBox:"0 0 69.297 50.576",children:(0,i.jsxs)("g",{id:"Group_13948","data-name":"Group 13948",transform:"translate(320.296 3436.696) rotate(180)",opacity:t?"0.2":"1",children:[(0,i.jsx)("path",{id:"Path_19","data-name":"Path 19",d:"M28.279,48.295,0,24.147,28.279,0",transform:"translate(318.796 3435.556) rotate(180)",fill:"none",stroke:a||"#fff",strokeLinejoin:"round",strokeWidth:"3"}),(0,i.jsx)("path",{id:"Path_20","data-name":"Path 20",d:"M0,0H49.119",transform:"translate(300.118 3411.408) rotate(180)",fill:"none",stroke:a||"#fff",strokeWidth:"3"})]})})}},44:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var i=n(5893);function a(e){var t=e.inactive,n=e.width,a=e.color;return(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:n||"69.297",height:"50.576",viewBox:"0 0 69.297 50.576",children:(0,i.jsxs)("g",{id:"Component_4_5","data-name":"Component 4 \u2013 5",transform:"translate(0 1.141)",opacity:t?"0.2":"1",children:[(0,i.jsx)("path",{id:"Path_19","data-name":"Path 19",d:"M28.279,48.295,0,24.147,28.279,0",transform:"translate(67.797 48.295) rotate(180)",fill:"none",stroke:a||"#fff",strokeLinejoin:"round",strokeWidth:"3"}),(0,i.jsx)("path",{id:"Path_20","data-name":"Path 20",d:"M0,0H49.119",transform:"translate(49.119 24.147) rotate(180)",fill:"none",stroke:a||"#fff",strokeWidth:"3"})]})})}},3786:function(e,t,n){"use strict";var i=n(5893),a=n(5675),r=n.n(a),o=n(214),s=n.n(o),l=n(562);t.Z=function(e){var t=e.name,n=e.address,a=e.isModalVariant,o=void 0!==a&&a,d=e.logo,c=e.darkLogo,u=e.imagePath,m=e.onButtonClick,v=e.buttonLabel,h=e.showImage,p=void 0===h||h,x=e.currentVariant,y=void 0!==x&&x,b=e.current,g=void 0!==b&&b;return(0,i.jsxs)("div",{className:"".concat(s().BrokenBorder," ").concat(o?"border-black":""," p-8 overflow-hidden ").concat(o?"bg-diversity-gray":""," ").concat(y&&!g?"border-diversity-gray":""),children:[g&&(0,i.jsx)(l.Z,{text:(0,i.jsx)("div",{className:"flex justify-center uppercase whitespace-nowrap",children:(0,i.jsx)("p",{className:"ml-14",children:"Current Current Current Current Current Current"})})}),(0,i.jsxs)("div",{className:"grid ".concat(p?"grid-cols-1 md:grid-cols-2":"grid-cols-1","  gap-4"),children:[(0,i.jsxs)("div",{className:"flex flex-col flex-wrap items-start",children:[(0,i.jsx)("div",{className:"h-[165px] xl:h-[120px] mb-4",children:(0,i.jsx)(r(),{src:o?c:d,alt:"Banner Image",objectFit:"contain"})}),(0,i.jsx)("div",{className:"mb-8 mt-2 xl:mt-8 text-left",children:n.map((function(e,a){return(0,i.jsx)("p",{className:"text-lg font-aktiv-grotesk ".concat(o?"text-black":a===n.length-1?"text-diversity-primary mt-2":"text-diversity-gray"),children:e},"".concat(t,"-").concat(e))}))}),v&&m&&(0,i.jsx)("button",{onClick:function(){m(t)},className:"".concat(o?"bg-black text-white":"".concat(s().Backgroun
1dColorChangeToBottom)," all-button py-2 px-4 max-w-[200px]"),children:v})]}),p&&(0,i.jsx)("div",{className:"h-[300px] md:h-auto",children:(0,i.jsx)(r(),{className:"pl-0 md:pl-3",src:u,alt:"Location Image",layout:"fill",objectFit:"cover"})})]})]})}},6173:function(e,t,n){"use strict";var i=n(5893),a=n(2530),r=n(9473),o=n(4464),s=n(3786),l=n(3590),d=n(3748),c=n(8678);t.Z=function(e){var t=e.header,n=e.variant,u=e.buttonLabel,m=void 0===u?"View Timetable":u,v=e.currentLocation,h=void 0!==v&&v,p=e.callback,x=void 0===p?null:p,y=(0,r.I0)(),b=function(e){y((0,l.AL)()),y((0,d.jK)([])),y((0,c.ZV)(null)),y((0,c.f2)(null)),y((0,o.l)(e)),x&&x()},g="modal"===n,f="current"===n;return(0,i.jsxs)("div",{className:"".concat(g?"bg-diversity-gray pt-8 md:pt-3":"bg-black pt-16"),children:[(0,i.jsx)("h1",{className:"uppercase ".concat(g?"":"text-white"," text-center text-4xl md:text-7xl font-bold"),children:t}),(0,i.jsx)("div",{className:"grid grid-cols-1 py-8 lg:grid-cols-2 gap-6",children:a.Q1.map((function(e){var t=e.logo,n=e.darkLogo,a=e.name,r=e.address,o=e.imagePath;return(0,i.jsx)(s.Z,{name:a,address:r,isModalVariant:g,logo:t,darkLogo:n,imagePath:o,onButtonClick:b,buttonLabel:m,currentVariant:f,current:h&&h===a},"".concat(a,"-location"))}))})]})}},6765:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return H}});var i=n(5893),a=n(9008),r=n.n(a),o=n(8041),s=n(8813),l=n(214),d=n.n(l);function c(){return(0,i.jsxs)("main",{id:d().MyAccountHeader,className:"bg-black h-screen flex flex-col items-center justify-center mt-n250 relative text-center text-white",children:[(0,i.jsx)(s.Z,{}),(0,i.jsx)("div",{className:"h-screen mt-96 pt-40 md:pt-20 md:mt-96",children:(0,i.jsxs)("div",{className:"flex flex-col items-center",children:[(0,i.jsx)("p",{className:"uppercase hero-title",children:" My Account"}),(0,i.jsx)("p",{className:"md:w-1/2 hero-description mx-4 text-center my-8",children:"Manage your class booking, personal information and membership below."})]})})]})}var u=n(1163),m=n(7294),v=n(7568),h=n(1799),p=n(7582),x=n(5675),y=n.n(x),b=n(1664),g=n.n(b),f=n(9260),j=n(2278),N=(n(44),n(4887),n(9473)),w=n(381),k=n.n(w),C=n(5290);function _(e){var t,n,a,r,o,s,l,c,u,v,h,p,x,y,b,g,f,j,N,w,k,_,A,S,T,I=e.title,D=e.description,P=e.data,E=e.onConfirm,B=e.onClose,M=(0,m.useState)(!1),O=M[0],L=M[1];return(0,i.jsx)(C.u_,{className:"DiversityModal",show:I,onClose:function(){B(null),L(!1)},children:(0,i.jsxs)(C.u_.Body,{style:{fontFamily:"Aktiv Grotesk"},className:"bg-diversity-primary",children:[(0,i.jsx)("h1",{className:"uppercase text-4xl",children:I}),"bookingCancel"==(null===P||void 0===P?void 0:P.type)&&(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:"flex py-2 justify-between items-center",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{children:(null===(a=null===P||void 0===P||null===(t=P.booking)||void 0===t||null===(n=t.Name)||void 0===n?void 0:n.split(":"))||void 0===a?void 0:a[1])||(null===(s=null===P||void 0===P||null===(r=P.booking)||void 0===r||null===(o=r.Name)||void 0===o?void 0:o.split(":"))||void 0===s?void 0:s[0])}),(0,i.jsx)("div",{children:100007===(null===P||void 0===P||null===(l=P.booking)||void 0===l?void 0:l.ProductId)||101074===(null===P||void 0===P||null===(c=P.booking)||void 0===c?void 0:c.ProductId)||100026===(null===P||void 0===P||null===(u=P.booking)||void 0===u?void 0:u.ProductId)||(null===P||void 0===P||null===(v=P.booking)||void 0===v?void 0:v.TypeTaken.includes("Core Classes"))||(null===P||void 0===P||null===(h=P.booking)||void 0===h?void 0:h.TypeTaken.includes("Diversity Training Program"))?"\xa3 ".concat(101074===(null===P||void 0===P||null===(p=P.booking)||void 0===p?void 0:p.ProductId)?"12":"10"):"\xa3 ".concat("7")})]}),(0,i.jsx)("div",{children:100007===(null===P||void 0===P||null===(x=P.booking)||void 0===x?void 0:x.ProductId)||100026===(null===P||void 0===P||null===(y=P.booking)||void 0===y?void 0:y.ProductId)||101074===(null===P||void 0===P||null===(b=P.booking)||void 0===b?void 0:b.ProductId)||(null===P||void 0===P||null===(g=P.booking)||void 0===g?void 0:g.TypeTaken.includes("Core Classes"))||(null===P||void 0===P||null===(f=P.booking)||void 0===f?void 0:f.TypeTaken.includes("Diversity Training Program"))?"\xa3 ".concat(101074===(null===P||void 0===P||null===(j=P.booking)||void 0===j?void 0:j.ProductId)?"12":"10"):"\xa3 ".concat("7")})]}),(0,i.jsx)("hr",{className:"border-b-1 border-diversity-gray py-2"})]}),"contractCancel"==(null===P||void 0===P?void 0:P.type)&&(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:"flex py-2 justify-between items-center",children:[(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{children:[null===P||void 0===P||null===(N=P.contract)||void 0===N?void 0:N.ContractName," "]}),(0,i.jsxs)("div",{children:["\xa3",null===P||void 0===P||null===(w=P.plan)||void 0===w?void 0:w.RecurringPaymentAmountSubtotal,"A Month"]})]}),(0,i.jsxs)("div",{children:["\xa3",null===P||void 0===P||null===(k=P.plan)||void 0===k?void 0:k.RecurringPaymentAmountSubtotal]})]}),(0,i.jsx)("hr",{className:"border-b-1 border-diversity-gray py-2"})]}),"contractSwitch"==(null===P||void 0===P?void 0:P.type)&&(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:"py-4",children:[(0,i.jsx)("div",{className:"py-2 font-bold",children:"Current Plan"}),(null===P||void 0===P?void 0:P.currentContract)&&(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:" ",children:null===P||void 0===P||null===(_=P.currentContract)||void 0===_?void 0:_.ContractName}),(0,i.jsxs)("div",{className:" ",children:["\xa3",null===P||void 0===P||null===(A=P.currentContractPlan)||void 0===A?void 0:A.RecurringPaymentAmountSubtotal," ","A Month"]})]})]}),(0,i.jsx)("hr",{className:"border-b-1 border-diversity-gray"}),(0,i.jsxs)("div",{className:"py-2",children:[(0,i.jsx)("div",{className:"font-bold py-2",children:"Change Plan to"}),(0,i.jsx)("div",{className:"",children:null===P||void 0===P||null===(S=P.newContract)||void 0===S?void 0:S.Name}),(0,i.jsxs)("div",{className:" ",children:["\xa3",null===P||void 0===P||null===(T=P.newContract)||void 0===T?void 0:T.RecurringPaymentAmountSubtotal," ","A Month"]})]}),(0,i.jsx)("hr",{className:"border-b-1 border-diversity-gray py-2"})]}),(0,i.jsx)("span",{className:"text-xs",children:D}),(0,i.jsxs)("div",{className:"flex mt-8",children:[O?(0,i.jsx)(C.$j,{color:"success","aria-label":"Success spinner example",size:"xl"}):(0,i.jsx)("button",{onClick:function(){E(),L(!0)}
1,className:"".concat(d().BackgroundColorPrimaryChangeToTop," px-4 py-2 mr-4"),children:"Confirm"}),(0,i.jsx)("button",{className:"".concat(d().BackgroundColorPrimaryChangeToTop," px-4 py-2"),onClick:function(){return B(null)},children:"Cancel"})]})]})})}function A(e){var t,n,a,r,o,s,l,c,m,v,h,p,x,y,b,g=e.row,f=(e.index,e.upcoming),j=e.bookingCancel,N=k()(null===g||void 0===g||null===(t=g.BookingWindow)||void 0===t?void 0:t.StartDateTime).isSameOrBefore(k()(new Date)),w=k()(null===g||void 0===g?void 0:g.StartDateTime).isAfter(k()(new Date).add(24,"hours")),C=k()(null===g||void 0===g||null===(n=g.BookingWindow)||void 0===n?void 0:n.EndDateTime).isSameOrAfter(k()(new Date)),_=((0,u.useRouter)(),"InPerson"===(null===g||void 0===g||null===(a=g.ClassDescription)||void 0===a||null===(r=a.Program)||void 0===r?void 0:r.ContentFormats[0])&&N&&C&&(null===g||void 0===g||g.IsAvailable),"Livestream:Mindbody"===(null===g||void 0===g||null===(o=g.ClassDescription)||void 0===o||null===(s=o.Program)||void 0===s?void 0:s.ContentFormats[0])&&N&&C&&(null===g||void 0===g||g.IsAvailable),null===g||void 0===g||null===(l=g.ClassDescription)||void 0===l||null===(c=l.Program)||void 0===c||null===(m=c.Name)||void 0===m?void 0:m.includes("Premium"));return(0,i.jsxs)("div",{style:{fontFamily:"Aktiv Grotesk"},className:"".concat(_&&d().isSpecial," text-diversity-gray w-full flex-col md:flex-row py-6 md:py-1 flex border-diversity-border border-b"),children:[(0,i.jsx)("div",{className:"py-1 md:text-diversity-gray my-3 md:my-0 text-3xl md:text-base md:py-4 w-full md:w-56",children:(null===(h=null===g||void 0===g||null===(v=g.Name)||void 0===v?void 0:v.split(":"))||void 0===h?void 0:h[1])||(null===(x=null===g||void 0===g||null===(p=g.Name)||void 0===p?void 0:p.split(":"))||void 0===x?void 0:x[0])}),(0,i.jsx)("div",{className:"py-1 text-lg md:text-base md:py-4 w-full md:w-56",children:k()(null===g||void 0===g?void 0:g.StartDateTime).format("dddd Do MMMM")}),(0,i.jsxs)("div",{className:"py-1 text-lg md:text-base md:py-4 w-full md:w-56",children:[k()(null===g||void 0===g?void 0:g.StartDateTime).format("hh:mm a"),"-",k()(null===g||void 0===g?void 0:g.EndDateTime).format("hh:mm a")]}),(0,i.jsx)("div",{className:"py-1 text-lg md:pl-2 md:text-base cursor-pointer md:pb-4 md:py-4 w-full md:w-48",children:100026===(null===g||void 0===g?void 0:g.ProductId)||101074===(null===g||void 0===g?void 0:g.ProductId)||100007===(null===g||void 0===g?void 0:g.ProductId)||(null===g||void 0===g?void 0:g.TypeTaken.includes("Core Classes"))||(null===g||void 0===g||null===(y=g.Service)||void 0===y||null===(b=y.Program)||void 0===b?void 0:b.Name.includes("Core Classes"))||(null===g||void 0===g?void 0:g.TypeTaken.includes("Diversity Training Program"))?"In-Person":"Live Stream"}
1),f&&w&&(0,i.jsx)("div",{className:"".concat(d().BackgroundColorDiversityGrayChangeToTop," all-button py-3 px-4"),onClick:function(){return j(g)},children:"Cancel"})]})}var S=n(1331);function T(){(0,N.I0)(),(0,u.useRouter)();var e=(0,m.useState)({open:!1,value:null}),t=(e[0],e[1],(0,N.v9)((function(e){return e.contracts.currentContract}))),n=(0,m.useState)([]),a=(n[0],n[1],(0,m.useState)(!1)),r=(a[0],a[1]),o=(0,m.useState)(!1),s=o[0],l=o[1],c=(0,m.useState)(!1),x=c[0],b=c[1],w=(0,m.useState)({}),T=w[0],I=w[1],D=(0,m.useState)(null),P=D[0],E=D[1],B=(0,m.useState)(0),M=(B[0],B[1],new Date>new Date("2023-05-01T00:00:00Z")?new Date:new Date("2023-05-01T00:00:00Z")),O=M.getDate()-M.getDay(),L=new Date(M.setDate(O)),Y=new Date(M.setDate(L.getDate()+6)),R=(0,m.useState)([]),F=R[0],Z=R[1],H=(0,m.useState)([]),V=H[0],q=H[1];(0,m.useEffect)((function(){z(!0),z()}),[]);var G=(0,m.useState)({startDate:L,endDate:Y}),U=G[0],z=(G[1],function(){var e=(0,v.Z)((function(){var e,t,n,i,a,o=arguments;return(0,p.__generator)(this,(function(s){switch(s.label){case 0:return e=o.length>0&&void 0!==o[0]&&o[0],t=JSON.parse(localStorage.getItem("_diversityToken")),n=e?"2021-01-01":k()(U.startDate).format("YYYY-MM-DD"),i=e?k()(U.startDate).format("YYYY-MM-DD"):"2030-12-31",t?(r(!0),[4,fetch("".concat("https://diversitystudio.co.uk","/api/client-visits/?StartDateTime=").concat(n,"&EndDateTime=").concat(i),{headers:{Authorization:"Token ".concat(null===t||void 0===t?void 0:t.token)}})]):[3,3];case 1:return[4,s.sent().json()];case 2:"Invalid token."===(null===(a=s.sent())||void 0===a?void 0:a.detail)&&(0,S.hY)(),e?Z(null===a||void 0===a?void 0:a.Visits):q(null===a||void 0===a?void 0:a.Visits),r(!1),s.label=3;case 3:return[2]}}
1))}));return function(){return e.apply(this,arguments)}}()),J=function(e){E({title:"CANCEL THIS LESSON?",description:"if you have a Pay-As-You-Go membership\u2019 or \u2018Full Membership\u2019 and have booked an \u2018In Person\u2019 dance class with us at Diversity Studio or a 'Live Stream' with us from Diversity Studio and can no longer attend/view that class for whatever reason, we can provide you with a credit note to the same value of the class that you have booked, provided always that you providing that you cancel with more than 24 hours notice. The credit note will be added to Your Account and you will be able to redeem that credit note against a future \u2018in-person\u2019 booking of the same value. For the avoidance of doubt, we will not be able to issue any credit notes if you give us notice of your non-attendance less than 24 hours prior the applicable class booking",data:{type:"bookingCancel",booking:e},onConfirm:function(){if(!k()(null===e||void 0===e?void 0:e.StartDateTime).isAfter(k()(new Date).add(24,"hours")))return I({heading:"24 hours notice required",description:"You can't cancel this booking as you need to cancel within 24 hours of the class start time."}),l(!0),void E(null);W(e)}})},W=function(e){var n;fetch("".concat("https://diversitystudio.co.uk","/api/remove-client-class/"),{method:"POST",headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json",Authorization:"Token ".concat(null===(n=JSON.parse(localStorage.getItem("_diversityToken")))||void 0===n?void 0:n.token)},body:JSON.stringify({bookingId:null===e||void 0===e?void 0:e.ClassId,user_contract:null===t||void 0===t?void 0:t.ContractID})}).then((function(e){return e.json()})).then((function(e){"Invalid token."===(null===e||void 0===e?void 0:e.detail)&&(0,S.hY)()})).catch((function(e){})).finally((function(){return E(null)}))};return(0,i.jsxs)("main",{className:"bg-black text-white px-4 py-4 md:px-16",children:[(0,i.jsxs)(C.u_,{show:s,onClose:function(){return l(!1)},children:[(0,i.jsx)(C.u_.Header,{children:null===T||void 0===T?void 0:T.heading}),(0,i.jsx)(C.u_.Body,{children:(0,i.jsx)("div",{className:"space-y-6",children:(0,i.jsx)("p",{className:"text-base leading-relaxed text-diversity-gray dark:text-diversity-gray",children:null===T||void 0===T?void 0:T.description})})})]}),(0,i.jsx)(C.u_,{show:x,onClose:function(){return b(!1)},children:(0,i.jsx)(C.u_.Body,{children:(0,i.jsx)("div",{className:"space-y-6"})})}),P&&(0,i.jsx)(_,(0,h.Z)({onClose:E},P)),(0,i.jsxs)("div",{className:"my-16",children:[(0,i.jsxs)("div",{className:"flex uppercase w-min md:w-1/4 flex-col",children:[(0,i.jsxs)("div",{className:"section-title whitespace-nowrap",children:[" ","Class Bookings"]}),(0,i.jsx)(y(),{alt:"banner image",src:f.Z})]}),(0,i.jsx)("div",{className:"my-8 text-lg text-diversity-gray md:w-1/3",children:"Here you can see your upcoming classes and classes you have previously enrolled in."}
1),(0,i.jsx)("button",{className:"".concat(d().BackgroundColorWhiteChangeToTop," all-button px-4 py-2"),children:(0,i.jsx)(g(),{href:"/booking",children:"View Timetable"})})]}),(0,i.jsxs)("div",{className:"my-16",children:[(0,i.jsxs)("h2",{className:"section-title text-center flex-wrap items-center flex md:text-left uppercase",children:["Your"," ",(0,i.jsxs)("div",{className:"w-44 md:w-48 flex justify-center items-center relative ml-6 md:mx-2",children:[(0,i.jsx)(y(),{src:j.Z,alt:"Banner Image"}),(0,i.jsx)("div",{className:"absolute",children:"upcoming"})]}),"classes"]}),(0,i.jsx)("div",{className:"text-diversity-gray italic mt-4 ",children:"If you have booked a live stream don\u2019t forget to check your emails 24 hours before the class. The link will have been sent to the registered email address"}),(0,i.jsxs)("div",{className:"flex flex-col md:text-2xl bg-black text-white justify-center items-center",style:{minHeight:"10vh"},children:[(0,i.jsx)("div",{className:"uppercase flex justify-center items-center md:mt-8"}),(0,i.jsxs)("div",{className:"md:mt-8 md:mx-2 md:mx-4",children:[(0,i.jsxs)("div",{className:"hidden md:flex uppercase text-diversity-gray",children:[(0,i.jsxs)("div",{className:"".concat(d().bookingHeaderCol," w-56"),children:["class",(0,i.jsx)("hr",{className:"w-20 mt-2 border-1 border-diversity-gray"})]}),(0,i.jsxs)("div",{className:"".concat(d().bookingHeaderCol," w-56"),children:["date",(0,i.jsx)("hr",{className:"w-16 mt-2 border-1 border-diversity-gray"})]}),(0,i.jsxs)("div",{className:"".concat(d().bookingHeaderCol," w-56"),children:["time",(0,i.jsx)("hr",{className:"w-16 mt-2 border-1 border-diversity-gray"})]}),(0,i.jsxs)("div",{className:"".concat(d().bookingHeaderCol," w-48"),children:["Type",(0,i.jsx)("hr",{className:"w-16 mt-2 border-1 border-diversity-gray"})]}),(0,i.jsxs)("div",{className:"".concat(d().bookingHeaderCol," w-48"),children:["Action",(0,i.jsx)("hr",{className:"w-24 mt-2 border-1 border-diversity-gray"})]})]}),(0,i.jsx)("div",{className:"mb-8",children:V&&(null===V||void 0===V?void 0:V.map((function(e,t){return(0,i.jsx)("div",{className:"border-diversity-primary border-y-1 ",children:(0,i.jsx)(A,{upcoming:!0,row:e,bookingCancel:J})},t)})))})]}),V&&!V.length&&(0,i.jsx)("div",{children:"No Class Booking present"})]})]}),(0,i.jsxs)("div",{className:"my-16",children:[(0,i.jsxs)("h2",{className:"section-title text-center flex-wrap items-center flex md:text-left uppercase",children:["Your"," ",(0,i.jsxs)("div",{className:"w-44 md:w-52 flex justify-center items-center relative ml-4 md:mx-2",children:[(0,i.jsx)(y(),{src:j.Z,alt:"Banner Image"}),(0,i.jsx)("div",{className:"absolute",children:"Previous"})]}),"classes"]}),(0,i.jsxs)("div",{className:"flex md:text-2xl flex-col bg-black text-white justify-center items-center",style:{minHeight:"10vh"},children:[(0,i.jsx)("div",{className:"uppercase flex justify-center items-center md:mt-8"}),(0,i.jsxs)("div",{className:"md:mt-8 mx-2 md:mx-4",children:[(0,i.jsxs)("div",{className:"hidden md:flex uppercase text-diversity-gray",children:[(0,i.jsxs)("div",{className:"".concat(d().bookingHeaderCol," w-56"),children:["class",(0,i.jsx)("hr",{className:"w-20 mt-2 border-1 border-diversity-gray"})]}),(0,i.jsxs)("div",{className:"".concat(d().bookingHeaderCol," w-56"),children:["date",(0,i.jsx)("hr",{className:"w-16 mt-2 border-1 border-diversity-gray"})]}),(0,i.jsxs)("div",{className:"".concat(d().bookingHeaderCol," w-56"),children:["time",(0,i.jsx)("hr",{className:"w-16 mt-2 border-1 border-diversity-gray"})]}),(0,i.jsxs)("div",{className:"".concat(d().bookingHeaderCol," w-48"),children:["Type",(0,i.jsx)("hr",{className:"w-16 mt-2 border-1 border-diversity-gray"})]})]}),(0,i.jsx)("div",{className:"mb-8",children:F&&(null===F||void 0===F?void 0:F.map((function(e,t){return(0,i.jsx)(A,{row:e},t)})))})]}),F&&!F.length&&(0,i.jsx)("div",{children:"No Past Class Booking present"})]})]})]})}var I=n(5055),D=n(3748),P=n(8678),E=n(2530),B=n(6173);function M(){(0,u.useRouter)();var e,t=(0,N.v9)((function(e){return e.classes.core_classes})),n=(0,N.v9)((function(e){return e.contracts.currentContract})),a=((0,N.v9)((function(e){return e.classes.additional_classes}
1)),(0,m.useState)(!1)),r=a[0],o=a[1],s=(0,m.useState)(!1),l=s[0],c=s[1],v=(0,m.useState)(!1),p=v[0],x=v[1],b=function(e,t){return!!(pe&&pe[e]&&pe[e].includes(t))},g=(0,m.useState)(null),w=g[0],_=g[1],A=(0,m.useState)({}),T=A[0],M=A[1],O=(0,m.useState)({}),L=(O[0],O[1],(0,m.useState)(!1)),Y=L[0],R=L[1],F=(0,m.useState)(!1),Z=F[0],H=F[1],V=(0,m.useState)(!1),q=V[0],G=V[1],U=(0,m.useState)(null),z=U[0],J=U[1],W=(0,m.useState)(null),K=W[0],$=W[1],Q=(0,m.useState)([]),X=Q[0],ee=Q[1],te=(0,m.useState)(!1),ne=te[0],ie=te[1],ae=(0,m.useState)(!1),re=ae[0],oe=ae[1],se=(0,m.useState)(!1),le=se[0],de=se[1],ce=(0,m.useState)(!1),ue=ce[0],me=ce[1],ve=(0,N.I0)(),he=(0,N.v9)((function(e){return e.classes.active_days})),pe=(0,N.v9)((function(e){return e.classes.class_active_days_map})),xe=(0,m.useState)({}),ye=xe[0],be=xe[1],ge=(0,m.useState)({}),fe=ge[0],je=ge[1],Ne=(0,N.v9)((function(e){return e.userDetail.tmp_cohort_response}));(0,N.v9)((function(e){return e.cart.subscription}));(0,m.useEffect)((function(){var e=JSON.parse(localStorage.getItem("_diversityToken"));e&&(fetch("".concat("https://diversitystudio.co.uk","/api/user-detail/"),{headers:{Authorization:"Token ".concat(null===e||void 0===e?void 0:e.token)}}).then((function(e){return e.json()})).then((function(e){var t;"Invalid token."===(null===e||void 0===e?void 0:e.detail)&&(0,S.hY)();var n=null===e||void 0===e?void 0:e.full_detail;R(!!(null===n||void 0===n?void 0:n.emergency_contact_name)),be({first_name:null===n||void 0===n?void 0:n.first_name,last_name:null===n||void 0===n?void 0:n.last_name,gender:null===n||void 0===n?void 0:n.full_gender,dob:null===n||void 0===n?void 0:n.dob,mobile_number:null===n||void 0===n?void 0:n.mobile_number,state:null===n||void 0===n?void 0:n.state,address1:null===n||void 0===n?void 0:n.address1,address2:null===n||void 0===n?void 0:n.address2,town:null===n||void 0===n?void 0:n.town,postal_code:null===n||void 0===n?void 0:n.postal_code,emergency_contact_phone:null===n||void 0===n?void 0:n.emergency_contact_phone,emergency_contact_name:null===n||void 0===n?void 0:n.emergency_contact_name,email:null===n||void 0===n?void 0:n.email,add_parent:!!(null===n||void 0===n?void 0:n.emergency_contact_name),card_last_four_digits:null===n||void 0===n?void 0:n.card_last_four_digits,billing_address1:null===n||void 0===n?void 0:n.billing_address1,billing_address2:null===n||void 0===n?void 0:n.billing_address2,billing_postal_code:null===n||void 0===n?void 0:n.billing_postal_code,billing_state:null===n||void 0===n?void 0:n.billing_state,billing_town:null===n||void 0===n?void 0:n.billing_town,subscribe_mailchimp:null===n||void 0===n?void 0:n.subscribe_mailchimp,subscribe_mindbody:!0,location:null===(t=e.detail)||void 0===t?void 0:t.location})})).catch((function(e){return _({error:!0,message:e.content})})),fetch("".concat("https://diversitystudio.co.uk","/api/get-user-cohort-classes/?location=").concat(e.location),{headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json",Authorization:"Token ".concat(null===e||void 0===e?void 0:e.token)}}).then((function(e){return e.json()})).then((function(e){var t,n,i,a,r;"Invalid token."===(null===e||void 0===e?void 0:e.detail)&&(0,S.hY)(),J(null===e||void 0===e?void 0:e.preferred_day),$(null===e||void 0===e||null===(t=e.user_core_class)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.id),ee(null===e||void 0===e||null===(i=e.user_additional_classes)||void 0===i?void 0:i.map((function(e){return null===e||void 0===e?void 0:e.id}))),ve((0,D.Iq)(null===e||void 0===e?void 0:e.core_classes)),ve((0,P.lD)(null===e||void 0===e||null===(a=e.user_core_class)||void 0===a?void 0:a[0])),ve((0,D.Hf)(null===e||void 0===e?void 0:e.active_days)),ve((0,D.KW)(null===e||void 0===e?void 0:e.class_active_days_map)),ve((0,P.qn)(null===e||void 0===e?void 0:e.user_additional_classes)),ve((0,P.uU)(null===e||void 0===e||null===(r=e.user_cohort)||void 0===r?void 0:r[0])),ve((0,D.uK)(null===e||void 0===e?void 0:e.additional_classes))})).catch((function(e){})).finally((function(){})))}),[]);var we=function(e,t){var n;e.preventDefault();var i=ye;i.update_payment=t,_(null),t?de(!0):H(!0),fetch("".concat("https://diversitystudio.co.uk","/api/user-detail/"),{method:"POST",headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json",Authorization:"Token ".concat(null===(n=JSON.parse(localStorage.getItem("_diversityToken")))||void 0===n?void 0:n.token)},body:JSON.stringify(i)}).then((function(e){return e.json()})).then((function(e){var n,i,a,r;("Invalid token."===(null===e||void 0===e?void 0:e.detail)&&(0,S.hY)(),e.status)?_({error:!1,payment:t,message:e.message}):_({error:!0,payment:t,message:"Error occurred at ".concat((null===e||void 0===e||null===(n=e.content)||void 0===n||null===(i=n.Error)||void 0===i?void 0:i.Message)||(null===e||void 0===e||null===(a=e.message)||void 0===a||null===(r=a.Error)||void 0===r?void 0:r.Message))});t?de(!1):H(!1)})).catch((function(e){_({error:!0,payment:t,message:null===e||void 0===e?void 0:e.content}),t?de(!1):H(!1)}))},ke=function(e){var t={},n=e.target.name,i=e.target.value;if("add_parent"===n){var a=(null===ye||void 0===ye?void 0:ye.dob)&&k()(new Date).diff(k()(null===ye||void 0===ye?void 0:ye.dob),"years")<=18||!Y;t[n]=a,R(a)}else if("subscribe_mailchimp"===n)t[n]=e.target.checked;else if("ExpDate"===n){if(/^[0-9//]+$/i.test(i)||!i){3==i.length&&"/"!==i[i.length-1]?t.ExpDate=i.substring(0,2)+"/"+i.substring(2,i.length):t.ExpDate=i;var r=i.split("/");t.ExpYear=r[1],t.ExpMonth=r[0]}}else"dob"===n?(R(i&&k()(new Date).diff(k()(i),"years")<=18||Y),t[n]=i):t[n]=i;be((0,h.Z)({},ye,t))},Ce=function(e){var t={};t[e.target.name]=e.target.value,je((0,h.Z)({},fe,t))};return(0,i.jsxs)("main",{className:"bg-black text-white md:px-20 py-8 ",children:[(0,i.jsxs)(C.u_,{show:r,onClose:function(){return o(!1)},children:[(0,i.jsx)(C.u_.Header,{className:"bg-diversity-primary",children:(0,i.jsx)("p",{className:"text-3xl ",children:"No availability for the selected class."})}),(0,i.jsx)(C.u_.Body,{className:"section-description bg-diversity-primary",children:"There are currently no memberships available for ".concat(null===Ne||void 0===Ne||null===(e=Ne.data)||void 0===e?void 0:e.class,". Sorry we couldn\u2019t make it work for you this time.")}),(0,i.jsx)(C.u_.Footer,{className:"bg-diversity-primary",children:(0,i.jsx)("button",{className:"".concat(d().Backgroun
1dColorPrimaryChangeToTop," all-button px-4 py-1"),onClick:function(){o(!1)},children:"Ok"})})]}),(0,i.jsxs)(C.u_,{show:l,onClose:function(){return c(!1)},children:[(0,i.jsx)(C.u_.Header,{className:"bg-diversity-gray",children:(0,i.jsx)("p",{className:"text-3xl ",children:"Core class changes disabled"})}),(0,i.jsxs)(C.u_.Body,{className:"section-description bg-diversity-gray",children:["Please contact us at ",(0,i.jsx)("a",{href:"mailto:[email protected]?subject=Change core class type or day",children:"[email protected]"})," to change your core class type and/or day."]}),(0,i.jsx)(C.u_.Footer,{className:"bg-diversity-gray",children:(0,i.jsx)("button",{className:"".concat(d().BackgroundColorPrimaryChangeToTop," all-button px-4 py-1"),onClick:function(){c(!1)},children:"Ok"})})]}),(0,i.jsxs)(C.u_,{show:p,onClose:function(){return x(!1)},children:[(0,i.jsx)(C.u_.Header,{className:"bg-diversity-gray border-none",children:(0,i.jsx)("p",{className:"text-3xl ",children:"Changing location is disabled"})}),(0,i.jsxs)(C.u_.Body,{className:"section-description bg-diversity-gray",children:["Please contact us at ",(0,i.jsx)("a",{href:"mailto:[email protected]?subject=Change location",children:"[email protected]"})," to change your location."]}),(0,i.jsx)(C.u_.Footer,{className:"bg-diversity-gray border-none",children:(0,i.jsx)("button",{className:"".concat(d().Backgroun
1dColorBlackChangeToTop," all-button px-4 py-1"),onClick:function(){x(!1)},children:(0,i.jsx)("span",{children:"Ok"})})})]}),(0,i.jsxs)(C.u_,{show:q,onClose:function(){return G(!1)},children:[(0,i.jsx)(C.u_.Header,{className:"bg-diversity-primary",children:(0,i.jsx)("p",{className:"text-3xl ",children:"Swapping preferred day/class type"})}),(0,i.jsx)(C.u_.Body,{className:"text-xl bg-diversity-primary",children:(0,i.jsxs)("p",{children:["You will be able to successfully swap your preferred class day/class type by confirming this below. However, your new class day/class type will not start until the month of pre-booked classes on your current class day/class type has been completed.",(0,i.jsx)("br",{}),"Please check your upcoming classes in user settings to see when your new classes will be starting to make sure you show up to the correct class. You will be able to continue attending your current guaranteed class until the swap is complete and your upcoming classes are amended to your newly swapped day/class type.",(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),"If you have any issues or questions please email us at [email protected] or text us at 07360 271 083",(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),"See you in class!",(0,i.jsx)("br",{}),"Diversity Studio Team"]})}),(0,i.jsxs)(C.u_.Footer,{className:"bg-diversity-primary",children:[(0,i.jsx)("button",{className:"".concat(d().Backgroun
1dColorPrimaryChangeToTop," all-button px-4 py-1"),onClick:function(){var e;ie(!0),fetch("".concat("https://diversitystudio.co.uk","/api/user-detail/"),{method:"POST",headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json",Authorization:"Token ".concat(null===(e=JSON.parse(localStorage.getItem("_diversityToken")))||void 0===e?void 0:e.token)},body:JSON.stringify({update_cohort:!0,core_class:K,active_day:z,additional_class:X||[]})}).then((function(e){return e.json()})).then((function(e){var t,n,i,a;("Invalid token."===(null===e||void 0===e?void 0:e.detail)&&(0,S.hY)(),e.status)?_({error:!1,cohort:!0,message:e.message}):_({error:!0,cohort:!0,message:"Error occurred at ".concat((null===e||void 0===e||null===(t=e.content)||void 0===t||null===(n=t.Error)||void 0===n?void 0:n.Message)||(null===e||void 0===e||null===(i=e.message)||void 0===i||null===(a=i.Error)||void 0===a?void 0:a.Message)||(null===e||void 0===e?void 0:e.message))})})).catch((function(e){_({error:!0,cohort:!0,message:null===e||void 0===e?void 0:e.content})})).finally((function(){return ie(!1)}))},children:"Confirm"}
1),(0,i.jsx)("button",{className:"".concat(d().BackgroundColorPrimaryChangeToTop," all-button px-4 py-1"),onClick:function(){G(!1)},children:"Cancel"})]})]}),E.a6.includes((0,S.Rj)(null===n||void 0===n?void 0:n.ContractID))&&(0,i.jsxs)("div",{className:" p-8 ",children:[(0,i.jsxs)("h2",{className:"section-title text-4xl md:text-5xl flex flex-wrap items-start mb-12 uppercase",children:["Update",(0,i.jsxs)("div",{className:"flex flex-wrap w-full md:w-2/5 md:ml-4",children:[(0,i.jsx)("span",{className:"text-center",children:"class preferences"}),(0,i.jsx)(y(),{src:f.Z,alt:"Banner image"})]})]}),(0,i.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3",children:[(0,i.jsxs)("div",{className:"mt-8 text-diversity-gray text-2xl",style:{fontFamily:"T-Star PRO"},children:[(0,i.jsx)("div",{className:"flex items-end border-diversity-primary pb-2 border-b-2",children:"CORE CLASS"}),(0,i.jsx)("div",{className:"pt-2",children:null===t||void 0===t?void 0:t.map((function(e,t){return(0,i.jsxs)("div",{className:"flex cursor-not-allowed items-center mr-2 ".concat((null===e||void 0===e?void 0:e.id)===K?"text-diversity-primary":"text-diversity-gray"),children:[(0,i.jsx)(I.Z,{color:(null===e||void 0===e?void 0:e.id)===K?"#A5E7D1":"#A4A4A4",isSelected:(null===e||void 0===e?void 0:e.id)===K}),(0,i.jsx)("p",{className:"pt-1",children:null===e||void 0===e?void 0:e.name})]},t)}))})]}),(0,i.jsxs)("div",{className:"mt-8 text-diversity-gray text-2xl",style:{fontFamily:"T-Star PRO"},children:[(0,i.jsx)("div",{className:"flex items-end border-diversity-primary pb-2 border-b-2",children:"Preferred Day"}),(0,i.jsx)("div",{className:"pt-2 capitalize",children:null===he||void 0===he?void 0:he.map((function(e,t){return(0,i.jsxs)("div",{className:"flex cursor-not-allowed items-center mr-2 ".concat(b(K,e)?e===z?"text-diversity-primary":"text-diversity-gray":"text-gray-600"),children:[(0,i.jsx)(I.Z,{color:b(K,e)?e===z?"#A5E7D1":"#A4A4A4":"#4B5563",isSelected:e===z}),(0,i.jsx)("p",{className:"pt-1 capitalize",children:(0,S.fm)(e.toLowerCase())})]},t)}))})]})]}),(0,i.jsxs)("div",{children:[ne?(0,i.jsx)("div",{className:"mt-6 ",children:(0,i.jsx)(C.$j,{color:"success","aria-label":"Success spinner example",size:"xl"})}):(0,i.jsx)("button",{onClick:function(){c(!0)}
1,className:"".concat(d().BackgroundColorChangeToBottom," cursor-not-allowed all-button mt-12 py-1 px-8 mr-6"),children:"Save Changes"}),(null===w||void 0===w?void 0:w.cohort)&&((null===w||void 0===w?void 0:w.error)?(0,i.jsx)("div",{className:"text-red-400 mt-4",children:null===w||void 0===w?void 0:w.message}):(0,i.jsx)("div",{className:"text-green-400 mt-4",children:null===w||void 0===w?void 0:w.message}))]})]}),(0,i.jsxs)("div",{className:" p-8 mt-10",children:[(0,i.jsxs)("h2",{className:"section-title text-4xl md:text-5xl flex flex-wrap items-center items-center text-center mb-12 uppercase",children:["Update",(0,i.jsxs)("div",{className:"flex justify-center items-center w-40 md:w-48 relative ml-2 md:mx-4",children:[(0,i.jsx)(y(),{src:j.Z,alt:"Banner Image"}),(0,i.jsx)("div",{className:"absolute",children:" Personal"})]}),"Details"]}),(0,i.jsxs)("form",{onSubmit:function(e){return we(e,!1)},className:"flex flex-col mt-4",children:[(0,i.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:[(0,i.jsx)("input",{placeholder:"Dancer First Name",className:"mb-2 focus:outline-none border-diversity-primary bg-transparent border-b p-2 ",name:"first_name",onChange:ke,required:!0,defaultValue:ye.first_name}),(0,i.jsx)("input",{placeholder:"Dancer Last Name",className:"mb-2 focus:outline-none border-diversity-primary bg-transparent border-b p-2",name:"last_name",onChange:ke,required:!0,defaultValue:ye.last_name})]}),(0,i.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 mt-4",children:[(0,i.jsxs)("select",{onChange:ke,className:"mb-2 focus:outline-none border-x-0 border-t-0 border-diversity-primary bg-transparent border-b p-2 ",required:!0,placeholder:"GENDER",name:"gender",defaultValue:null===ye||void 0===ye?void 0:ye.gender,children:[(0,i.jsx)("option",{value:"",disabled:!0,children:"Select Gender"}),(0,i.jsx)("option",{selected:"Male"===(null===ye||void 0===ye?void 0:ye.gender),value:"Male",children:"Male"}),(0,i.jsx)("option",{selected:"Female"===(null===ye||void 0===ye?void 0:ye.gender),value:"Female",children:"Female"}),(0,i.jsx)("option",{selected:"Non-Binary"===(null===ye||void 0===ye?void 0:ye.gender),value:"Non-Binary",children:"Non-Binary"}),(0,i.jsx)("option",{selected:"Prefer not to say"===(null===ye||void 0===ye?void 0:ye.gender),value:"Prefer not to say",children:"Prefer not to say"})]}),(0,i.jsx)("input",{placeholder:"DATE OF BIRTH (MM/DD/YYYY)",name:"dob",type:"date",className:"mb-2 focus:outline-none border-x-0 border-t-0 border-diversity-primary bg-transparent border-b p-2",onChange:ke,required:!0,defaultValue:ye.dob})]}),(0,i.jsxs)("div",{className:" mt-4",children:[(0,i.jsx)("input",{type:"checkbox",placeholder:"",className:"mb-2 mr-2 focus:outline-none border-diversity-primary bg-transparent border-b p-2",name:"add_parent",onChange:ke,defaultChecked:Y}),"I need a parent or guardian permission (if under 18 years)"]}),Y&&(0,i.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 mt-4",children:[(0,i.jsx)("input",{placeholder:"Parent OR Guardian NAME",className:"mb-2 focus:outline-none border-diversity-primary bg-transparent border-b p-2 ",name:"emergency_contact_name",onChange:ke,defaultValue:ye.emergency_contact_name}),(0,i.jsx)("input",{placeholder:"Parent OR Guardian Phone Number",className:"mb-2 focus:outline-none border-diversity-primary bg-transparent border-b p-2",name:"emergency_contact_phone",onChange:ke,defaultValue:ye.emergency_contact_phone})]}),(0,i.jsx)("input",{placeholder:"ADDRESS LINE 1",className:"mb-2 focus:outline-none border-diversity-primary bg-transparent border-b p-2 mt-4",onChange:ke,name:"address1",required:!0,defaultValue:ye.address1}),(0,i.jsx)("input",{placeholder:"ADDRESS LINE 2",className:"mb-2 focus:outline-none border-diversity-primary bg-transparent border-b p-2 mt-4",onChange:ke,name:"address2",defaultValue:ye.address2}),(0,i.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 mt-4",children:[(0,i.jsx)("input",{placeholder:"TOWN/CITY",className:"mb-2 focus:outline-none border-diversity-primary bg-transparent border-b p-2 ",onChange:ke,n
1ame:"town",required:!0,defaultValue:ye.town}),(0,i.jsx)("input",{placeholder:"State",className:"mb-2 focus:outline-none border-diversity-primary bg-transparent border-b p-2 ",onChange:ke,name:"state",required:!0,defaultValue:ye.state}),(0,i.jsx)("input",{placeholder:"POSTCODE",className:"mb-2 focus:outline-none border-diversity-primary bg-transparent border-b p-2",onChange:ke,name:"postal_code",required:!0,defaultValue:ye.postal_code})]}),(0,i.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 mt-4",children:[(0,i.jsx)("input",{type:"email",placeholder:"EMAIL ADDRESS",className:"mb-2 focus:outline-none border-x-0 border-t-0 border-diversity-primary bg-transparent border-b p-2 ",onChange:ke,value:null===ye||void 0===ye?void 0:ye.email,readOnly:!0,name:"email",required:!0}),(0,i.jsx)("input",{placeholder:"MOBILE NUMBER",className:"mb-2 focus:outline-none border-diversity-primary bg-transparent border-b p-2 ",onChange:ke,name:"mobile_number",required:!0,defaultValue:ye.mobile_number})]}),(0,i.jsxs)("div",{className:"flex items-start mt-4",children:[(0,i.jsx)("input",{type:"checkbox",className:"mr-2 mt-1 bg-transparent border-solid border-b",onChange:ke,style:{borderColor:"grey"},checked:null===ye||void 0===ye?void 0:ye.subscribe_mailchimp,name:"subscribe_mailchimp"}),(0,i.jsx)("p",{children:"I would like to receive marketing emails from Diversity about events, exclusive offers, merchandise and much more exciting news."})]}),(0,i.jsx)("div",{children:Z?(0,i.jsx)("div",{className:"mt-6 ",children:(0,i.jsx)(C.$j,{color:"success","aria-label":"Success spinner example",size:"xl"})}
1):(0,i.jsx)("button",{className:"".concat(d().BackgroundColorChangeToBottom," all-button mt-6 py-1 px-8 mr-6"),children:"Save Changes"})})]}),!(null===w||void 0===w?void 0:w.payment)&&((null===w||void 0===w?void 0:w.error)?(0,i.jsx)("div",{className:"text-red-400 mt-4",children:null===w||void 0===w?void 0:w.message}):(0,i.jsx)("div",{className:"text-green-400 mt-4",children:null===w||void 0===w?void 0:w.message}))]}),(0,i.jsx)("div",{className:" p-8 mt-10",children:(0,i.jsx)("div",{className:"container mx-auto",children:(0,i.jsx)(B.Z,{currentLocation:null===ye||void 0===ye?void 0:ye.location,header:"Current Location",buttonLabel:"Request to change",variant:"current",callback:function(){x(!0)}})})}),(0,i.jsxs)("div",{className:"p-8 mt-10",children:[(0,i.jsxs)("h2",{className:"section-title text-4xl md:text-5xl flex flex-wrap items-start mb-12 uppercase",children:["Update",(0,i.jsxs)("div",{className:"flex flex-wrap w-10/12 md:w-1/3 md:ml-2",children:[(0,i.jsx)("span",{className:"text-center",children:"Account Details"}),(0,i.jsx)(y(),{src:f.Z,alt:"Banner image"})]})]}),(0,i.jsxs)("form",{onSubmit:function(e){var t;(e.preventDefault(),M(null),oe(!0),fe.new_password===fe.confirm_new_password)?fetch("".concat("https://diversitystudio.co.uk","/api/update-password/"),{method:"POST",headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json",Authorization:"Token ".concat(null===(t=JSON.parse(localStorage.getItem("_diversityToken")))||void 0===t?void 0:t.token)},body:JSON.stringify(fe)}).then((function(e){return e.json()})).then((function(e){"Invalid token."===(null===e||void 0===e?void 0:e.detail)&&(0,S.hY)(),e.status?M({msg:"Password Successfully updated",error:!1}):M({msg:"".concat(null===e||void 0===e?void 0:e.message),error:!0}),oe(!1)})).catch((function(e){_({error:!0,message:e.content}),oe(!1)})):M({confirm_new_password:"Password doesn't match"})},className:"flex flex-col mt-4",children:[(0,i.jsx)("input",{placeholder:"Current Password",className:"mb-2 border-x-0 border-t-0 border-diversity-primary bg-transparent border-b p-2 ",name:"current_password",type:"password",onChange:Ce,required:!0}),(0,i.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 md:gap-8",children:[(0,i.jsx)("input",{placeholder:"New Password",className:"mb-2 border-x-0 border-t-0 border-diversity-primary bg-transparent border-b p-2 ",name:"new_password",type:"password",onChange:Ce,required:!0}),(0,i.jsx)("input",{placeholder:"Confirm New Password",className:"mb-2 border-x-0 border-t-0 border-diversity-primary bg-transparent border-b p-2",name:"confirm_new_password",type:"password",onChange:Ce,required:!0}),(null===T||void 0===T?void 0:T.confirm_new_password)&&(0,i.jsx)("div",{className:"text-red-400 mt-4",children:null===T||void 0===T?void 0:T.confirm_new_password})]}),(0,i.jsx)("div",{children:re?(0,i.jsx)("div",{className:"mt-6 ",children:(0,i.jsx)(C.$j,{color:"success","aria-label":"Success spinner example",size:"xl"})}
1):(0,i.jsx)("button",{className:"".concat(d().BackgroundColorChangeToBottom," all-button mt-6 py-1 px-8 mr-6"),children:"Save Changes"})})]}),(null===T||void 0===T?void 0:T.error)?(0,i.jsx)("div",{className:"text-red-400 mt-4",children:null===T||void 0===T?void 0:T.msg}):(0,i.jsx)("div",{className:"text-green-400 mt-4",children:null===T||void 0===T?void 0:T.msg})]}),(0,i.jsxs)("div",{className:"p-8 mt-10",children:[(0,i.jsxs)("h2",{className:"section-title text-4xl md:text-5xl flex items-center flex-wrap items-center mb-12 uppercase",children:["Update"," ",(0,i.jsxs)("div",{className:"w-36 md:w-44 flex justify-center items-center relative ml-2 md:mx-2",children:[(0,i.jsx)(y(),{src:j.Z,alt:"Banner Image"}),(0,i.jsx)("div",{className:"absolute",children:"Payment"})]})," ","Details"]}),ue?(0,i.jsxs)("form",{onSubmit:function(e){return we(e,!0)},className:"flex flex-col mt-4",children:[(0,i.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 mt-4",children:[(0,i.jsx)("input",{placeholder:"CARD NUMBER",className:"mb-2 border-x-0 border-t-0 border-diversity-primary bg-transparent border-solid border-b p-2 ",name:"CreditCardNumber",type:"number",maxLength:"16",onChange:ke,required:!0}),(0,i.jsx)("input",{placeholder:"EXPIRATION DATE(MM/YY)",className:"mb-2 border-diversity-primary bg-transparent border-solid border-b p-2 ",name:"ExpDate",value:null===ye||void 0===ye?void 0:ye.ExpDate,onChange:ke,maxLength:"5",required:!0}),(0,i.jsx)("input",{placeholder:"CVV",className:"mb-2 border-diversity-primary bg-transparent border-solid border-b p-2 ",name:"CVV",onChange:ke,required:!0,maxLength:"4",minLength:"3"})]}),(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 mt-4",children:[(0,i.jsx)("input",{placeholder:"BILLING ADDRESS LINE 1",className:"mb-2 border-diversity-primary bg-transparent border-solid border-b p-2 mt-4",onChange:ke,name:"billing_address1",required:!0,value:ye.billing_address1}),(0,i.jsx)("input",{placeholder:"BILLING ADDRESS LINE 2",className:"mb-2 border-diversity-primary bg-transparent border-solid border-b p-2 mt-4",onChange:ke,name:"billing_address2",value:ye.billing_address2})]}),(0,i.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 mt-4",children:[(0,i.jsx)("input",{placeholder:"BILLING TOWN/CITY",className:"mb-2 border-diversity-primary bg-transparent border-solid border-b p-2 ",onChange:ke,name:"billing_town",required:!0,value:ye.billing_town}),(0,i.jsx)("input",{placeholder:"BILLING COUNTY",className:"mb-2 border-diversity-primary bg-transparent border-solid border-b p-2",onChange:ke,name:"billing_state",required:!0,value:ye.billing_state}),(0,i.jsx)("input",{placeholder:"BILLING POSTCODE",className:"mb-2 border-diversity-primary bg-transparent border-solid border-b p-2",onChange:ke,name:"billing_postal_code",required:!0,value:ye.billing_postal_code})]})]}),(0,i.jsx)("div",{children:le?(0,i.jsx)("div",{className:"mt-6 ",children:(0,i.jsx)(C.$j,{color:"success","aria-label":"Success spinner example",size:"xl"})}
1):(0,i.jsx)("button",{className:"".concat(d().BackgroundColorChangeToBottom," all-button mt-6 py-1 px-8 mr-6"),children:"Save Changes"})}),(null===w||void 0===w?void 0:w.payment)&&((null===w||void 0===w?void 0:w.error)?(0,i.jsx)("div",{className:"text-red-400 mt-4",children:null===w||void 0===w?void 0:w.message}):(0,i.jsx)("div",{className:"text-green-400 mt-4",children:null===w||void 0===w?void 0:w.message}))]}):(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:"border-diversity-primary border-b-2 pb-2 flex justify-between items-center",children:[(0,i.jsx)("span",{children:"CURRENT DETAIL"})," ",(0,i.jsx)("span",{className:"underline cursor-pointer",onClick:function(){return me(!0)},children:"Change"})]}),(0,i.jsxs)("div",{className:"mt-2",children:["Using card ending with"," ",null===ye||void 0===ye?void 0:ye.card_last_four_digits]}),(0,i.jsxs)("div",{children:[null===ye||void 0===ye?void 0:ye.billing_address1," -"," ",null===ye||void 0===ye?void 0:ye.billing_address2," ",(0,i.jsx)("br",{}),null===ye||void 0===ye?void 0:ye.billing_town," ",null===ye||void 0===ye?void 0:ye.billing_state," ",null===ye||void 0===ye?void 0:ye.billing_postal_code]})]})]})]})}var O=n(6291),L=n(3590),Y=n(3609);function R(){var e=(0,u.useRouter)(),t=(0,m.useState)(null),n=(t[0],t[1]),a=(0,m.useState)(!1),r=a[0],o=a[1],s=(0,m.useState)(!1),l=s[0],c=s[1],v=(0,N.I0)(),p=(0,m.useState)([]),x=p[0],b=p[1],g=(0,m.useState)([]),w=g[0],k=g[1],A=(0,m.useState)(!1),T=A[0],D=A[1],P=(0,m.useState)([]),E=P[0],B=P[1],M=(0,m.useState)(null),R=M[0],F=M[1],Z=(0,N.v9)((function(e){return e.contracts.contracts})),H=JSON.parse(localStorage.getItem("_diversityToken")),V=(0,m.useState)([]),q=V[0],G=V[1],U=(0,m.useState)(null),z=U[0],J=U[1],W=((0,N.v9)((function(e){return e.contracts.currentContract})),function(){localStorage.removeItem("_diversityToken"),window.location.href="/"});(0,m.useEffect)((function(){B(!0),Z?(b(Z),B(!1)):fetch("".concat("https://diversitystudio.co.uk","/api/contracts/?location=").concat(H.location)).then((function(e){return e.json()})).then((function(e){v((0,Y.d)(e.contract.Contracts)),b(e.contract.Contracts.filter((function(e){return e.SoldOnline}))),B(!1)})).catch((function(e){return n("Unexpected Error occcured")&&o(!0)})),fetch("".concat("https://diversitystudio.co.uk","/api/user-detail/"),{headers:{Authorization:"Token ".concat(null===H||void 0===H?void 0:H.token)}}).then((function(e){return e.json()})).then((function(e){"Invalid token."===(null===e||void 0===e?void 0:e.detail)&&W();var t=null===e||void 0===e?void 0:e.full_detail;t.training_level&&J(t.training_level)})).catch((function(e){return n("Unexpected Error occured")})),fetch("".concat("https://diversitystudio.co.uk","/api/training-levels/?location=").concat(H.location)).then((function(e){return e.json()})).then((function(e){G(e.training_levels)})).catch((function(e){return n("Unexpected Error occured")})),fetch("".concat("https://diversitystudio.co.uk","/api/client-contracts/"),{headers:{Authorization:"Token ".concat(null===H||void 0===H?void 0:H.token)}}).then((function(e){return e.json()})).then((function(e){var t,n;"Invalid token."===(null===e||void 0===e?void 0:e.detail)&&W();var i=null===(n=null===e||void 0===e||null===(t=e.Contracts)||void 0===t?void 0:t.filter((function(e){return!e.TerminationDate})))||void 0===n?void 0:n[0];v((0,Y.H)(i)),k(i),B(!1)})).catch((function(e){return n("Unexpected Error occured")&&o(!0)}))}),[]);var K=function(){var e=null===w||void 0===w?void 0:w.Id;fetch("".concat("https://diversitystudio.co.uk","/api/terminate-contract/"),{method:"POST",headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json",Authorization:"Token ".concat(null===H||void 0===H?void 0:H.token)},body:JSON.stringify({clientContractId:e})}).then((function(e){return e.json()})).then((function(e){"Invalid token."===(null===e||void 0===e?void 0:e.detail)&&W(),(null===e||void 0===e?void 0:e.Message)&&(null===e||void 0===e?void 0:e.Message.includes("terminated successfully"))?window.location.reload():(n("Unexpected Error occurred, please try again."),o(!0))})).catch((function(e){return n("Unexpected Error occurred, please try again.")&&o(!0)}))};return(0,i.jsxs)("main",{className:"bg-black text-white md:px-8 px-4 py-8",children:[(0,i.jsxs)(C.u_,{show:r,onClose:function(){return o(!1)},children:[(0,i.jsx)(C.u_.Header,{className:"bg-diversity-primary",children:(0,i.jsx)("p",{className:"text-3xl ",children:"Error"})}),(0,i.jsx)(C.u_.Body,{className:"section-description bg-diversity-primary",children:"There was an unexpected error, please try again."}),(0,i.jsx)(C.u_.Footer,{className:"bg-diversity-primary",children:(0,i.jsx)("button",{className:"".concat(d().Backgroun
1dColorPrimaryChangeToTop," all-button px-4 py-1"),onClick:function(){o(!1)},children:"Ok"})})]}),(0,i.jsxs)(C.u_,{show:l,onClose:function(){return c(!1)},children:[(0,i.jsx)(C.u_.Header,{className:"bg-diversity-gray",children:(0,i.jsx)("p",{className:"text-3xl ",children:"Training programme level changes disabled"})}),(0,i.jsxs)(C.u_.Body,{className:"section-description bg-diversity-gray",children:["Please contact us at ",(0,i.jsx)("a",{href:"mailto:[email protected]?subject=Change core class type or day",children:"[email protected]"})," to change your training programme level."]}),(0,i.jsx)(C.u_.Footer,{className:"bg-diversity-gray",children:(0,i.jsx)("button",{className:"".concat(d().BackgroundColorPrimaryChangeToTop," all-button px-4 py-1"),onClick:function(){c(!1)},children:"Ok"})})]}),(0,i.jsxs)(C.u_,{show:T,onClose:function(){D(!1),W()},children:[(0,i.jsx)(C.u_.Header,{className:"bg-diversity-primary",children:(0,i.jsx)("p",{className:"section-description text-2xl",children:"Account Successfully Deactivated"})}),(0,i.jsx)(C.u_.Body,{className:"section-description bg-diversity-primary",children:"You have successfully de-activated your account. If you wish to re-activate your Diversity Studio membership, please log back in to your account and confirm account re-activation!"})]}),(0,i.jsxs)("div",{className:"my-16",children:[(0,i.jsxs)("div",{className:"flex uppercase w-min md:w-1/3 flex-col",children:[(0,i.jsx)("div",{className:"section-title ",children:"Manage Membership"}),(0,i.jsx)(y(),{alt:"banner image",src:f.Z})]}),(0,i.jsx)("div",{className:"my-8 text-diversity-gray md:w-2/5 text-lg text-diversity-gray",style:{fontFamily:"Aktiv Grotesk"},children:"Please manage your membership and switch to your preferred membership type below"})]}),R&&(0,i.jsx)(_,(0,h.Z)({onClose:F},R)),(0,i.jsxs)("div",{className:"my-16",children:[(0,i.jsxs)("h2",{className:"flex mb-6 flex-wrap items-center section-title uppercase",children:["Your"," ",(0,i.jsxs)("div",{className:"w-64 md:w-64 flex justify-center items-center relative ml-4 md:mx-4",children:[(0,i.jsx)(y(),{src:j.Z,alt:"Banner Image"}),(0,i.jsx)("div",{className:"absolute",children:"subscription"})]})]}),E&&(0,i.jsx)(C.$j,{color:"success","aria-label":"Success spinner example",size:"xl"}),!E&&(0,i.jsx)("div",{className:"grid grid-cols-1 py-8 md:py-16 md:flex md:flex-wrap -m-2 justify-center",children:x&&x.map((function(t,n){return(0,i.jsx)("div",{className:"md:w-1/2 2xl:w-1/3 p-4 flex",children:(0,i.jsx)(O.Z,{isSelected:!1,id:t.Id,slug:(0,S.Rj)(t.Id),data:t,isCurrentPlan:t.Id===(null===w||void 0===w?void 0:w.ContractID),manageMemberShip:!0,handleSwitch:function(){return function(t){var n;F({title:"Change to a new plan?",description:"You can change your membership plan at any time. For example, if you are on \u2018Pay-As-You-Go membership\u2019, you can upgrade to our \u2018Online Membership\u2019 or \u2018Full Membership\u2019 and access the additional features associated with those plans. Likewise, you may downgrade your membership plan in the same way. If you are upgrading your membership plan, you will be charged the full monthly fee in connection with the applicable membership at the point of upgrade and you will be granted immediate access to the features applicable to that upgraded membership plan. Going forward, you will be billed at the upgraded membership plan fee until you cancel or change your membership plan. If, on the other hand, you decide to downgrade your membership plan, you will lose access to the applicable features of your membership at the point of downgrade and your rights to access Content features going forward will be limited to the applicable membership plan you have downgraded to. We do not offer pro-rata refunds in the circumstances of an upgrade or a downgrade of membership plans because you will have had access to the applicable membership plan Content and associated features up until the point you have upgraded or downgraded. For this reason, we strongly recommend that if you are considering downgrading your membership plan, you should do so toward the end of the applicable month\u2019s billing cycle so that you can make the most out of your membership plan during the remainder of the month that you have already paid for. If you have downgraded your membership plan, you will be billed at the applicable downgraded membership plan fee until you cancel you or change your membership plan. If you have any questions regarding upgrading or downgrading your membership plan, please contact us at [email protected]",data:{type:"contractSwitch",newContract:t,currentContract:w,currentContractPlan:null===(n=null===x||void 0===x?void 0:x.filter((function(e){return(null===e||void 0===e?void 0:e.Id)===(null===w||void 0===w?void 0:w.ContractID)})))||void 0===n?void 0:n[0]}
1,onConfirm:function(){v((0,L.VF)(t)),e.push({pathname:"/payment",query:{origin:"my_account"}}),F(null)}})}(t)},selectedPlan:{Id:null===w||void 0===w?void 0:w.ContractID}},t.Id)},t.Id)}))})]}),q.length&&z&&(0,i.jsxs)("div",{className:"my-16",children:[(0,i.jsxs)("div",{className:"flex uppercase w-min md:w-1/4 flex-col",children:[(0,i.jsx)("div",{className:"text-4xl",children:"Diversity Training Programme Level"}),(0,i.jsx)(y(),{alt:"banner image",src:f.Z})]}),E?(0,i.jsx)(C.$j,{color:"success","aria-label":"Success spinner example",size:"xl"}):(0,i.jsx)("div",{className:"py-4",children:q.map((function(e,t){return(0,i.jsxs)("div",{onClick:function(){return c(!0)},style:{fontFamily:"T-Star PRO"},className:"flex cursor-pointer items-start mr-2 mb-2 ".concat((null===e||void 0===e?void 0:e.id)===z?"text-diversity-primary":"text-diversity-gray"),children:[(0,i.jsx)("div",{className:"mt-2",children:(0,i.jsx)(I.Z,{color:(null===e||void 0===e?void 0:e.id)===z?"#A5E7D1":"#A4A4A4",isSelected:(null===e||void 0===e?void 0:e.id)===z})}),(0,i.jsxs)("div",{children:[(0,i.jsxs)("p",{className:"pt-1",children:[null===e||void 0===e?void 0:e.name," \u2013 Every ",(0,i.jsx)("span",{className:"capitalize",children:null===e||void 0===e?void 0:e.day.toLowerCase()})," at ",null===e||void 0===e?void 0:e.time]}),(0,i.jsx)("p",{className:"text-sm text-diversity-gray max-w-xl",children:null===e||void 0===e?void 0:e.description})]})]},t)}))})]}),(null===w||void 0===w?void 0:w.ContractID)&&(0,i.jsxs)("div",{className:"my-16",children:[(0,i.jsxs)("div",{className:"flex uppercase w-min md:w-1/4 flex-col",children:[(0,i.jsx)("div",{className:"text-4xl",children:"DEACTIVATE ACCOUNT"}),(0,i.jsx)(y(),{alt:"banner image",src:f.Z})]}),E?(0,i.jsx)(C.$j,{color:"success","aria-label":"Success spinner example",size:"xl"}):(0,i.jsx)("button",{onClick:function(){var e;F({title:"Cancel this Plan?",description:"You can change your membership plan at any time. For example, if you are on \u2018Pay-As-You-Go membership\u2019, you can upgrade to our \u2018Online Membership\u2019 or \u2018Full Membership\u2019 and access the additional features associated with those plans. Likewise, you may downgrade your membership plan in the same way. If you are upgrading your membership plan, you will be charged the full monthly fee in connection with the applicable membership at the point of upgrade and you will be granted immediate access to the features applicable to that upgraded membership plan. Going forward, you will be billed at the upgraded membership plan fee until you cancel or change your membership plan. If, on the other hand, you decide to downgrade your membership plan, you will lose access to the applicable features of your membership at the point of downgrade and your rights to access Content features going forward will be limited to the applicable membership plan you have downgraded to. We do not offer pro-rata refunds in the circumstances of an upgrade or a downgrade of membership plans because you will have had access to the applicable membership plan Content and associated features up until the point you have upgraded or downgraded. For this reason, we strongly recommend that if you are considering downgrading your membership plan, you should do so toward the end of the applicable month\u2019s billing cycle so that you can make the most out of your membership plan during the remainder of the month that you have already paid for. If you have downgraded your membership plan, you will be billed at the applicable downgraded membership plan fee until you cancel you or change your membership plan. If you have any questions regarding upgrading or downgrading your membership plan, please contact us at [email protected]",data:{type:"contractCancel",contract:w,plan:null===(e=x.filter((function(e){return(null===e||void 0===e?void 0:e.Id)===(null===w||void 0===w?void 0:w.ContractID)})))||void 0===e?void 0:e[0]},onConfirm:function(){K(),F(null)}})}
1,className:"".concat(d().BackgroundColorWhiteChangeToTop," mt-8 px-4 py-2"),children:"Deactivate Account"})]})]})}var F=n(7516);function Z(){var e=(0,m.useState)("class-booking"),t=e[0],n=e[1],a=(0,m.useState)(0),r=a[0],o=a[1],s=(0,m.useState)(0),l=s[0],d=s[1],c=(0,u.useRouter)().query.q;return(0,m.useEffect)((function(){"manage-membership"!==c&&"personal-info"!==c||n(c);var e=JSON.parse(localStorage.getItem("_diversityToken"));e&&fetch("".concat("https://diversitystudio.co.uk","/api/user-detail/"),{headers:{Authorization:"Token ".concat(null===e||void 0===e?void 0:e.token)}}).then((function(e){return e.json()})).then((function(e){"Invalid token."===(null===e||void 0===e?void 0:e.detail)&&(0,S.hY)(),o((null===e||void 0===e?void 0:e.token_count)>200?"Unlimited":null===e||void 0===e?void 0:e.token_count),d((null===e||void 0===e?void 0:e.livestream_token_count)>200?"Unlimited":null===e||void 0===e?void 0:e.livestream_token_count)}))}),[]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"bg-diversity-primary w-screen text-lg py-8 flex flex-wrap justify-between px-4 md:px-16 uppercase",children:[(0,i.jsxs)("div",{className:"flex flex-wrap justify-between font-bold",children:[(0,i.jsx)("div",{className:"".concat("personal-info"===t?"text-black border-black":"text-diversity-gray border-diversity-gray"," border-b-2 mb-4 text-2xl cursor-pointer mx-2"),onClick:function(){return n("personal-info")},children:"Personal information"}),(0,i.jsx)("div",{className:"".concat("class-booking"===t?"text-black border-black":"text-diversity-gray border-diversity-gray"," border-b-2 mb-4 text-2xl cursor-pointer mx-2"),onClick:function(){return n("class-booking")},children:"class bookings"}),(0,i.jsx)("div",{className:"".concat("manage-membership"===t?"text-black border-black":"text-diversity-gray border-diversity-gray"," border-b-2 mb-4 text-2xl cursor-pointer mx-2"),onClick:function(){return n("manage-membership")},children:"Manage Membership"})]}),(0,i.jsxs)("div",{className:"",children:[(0,i.jsxs)("div",{className:"text-black flex justify-start items-center text-xl md:text-2xl mx-2 font-bold",children:["In-Person Class Tokens"," ",(0,i.jsx)("div",{className:"mx-1",children:(0,i.jsx)(C.u,{content:"1 token is equivalent to 1 in-person class",children:(0,i.jsx)(F.Fs0,{})})}),": ",r]}),(0,i.jsxs)("div",{className:"text-black flex justify-start items-center text-xl md:text-2xl mx-2 font-bold",children:["LiveStream Class Tokens"," ",(0,i.jsx)("div",{className:"mx-1",children:(0,i.jsx)(C.u,{content:"1 token is equivalent to 1 live stream class",children:(0,i.jsx)(F.Fs0,{})})}),": ",l]})]})]}),(0,i.jsxs)("div",{children:["personal-info"===t&&(0,i.jsx)(M,{}),"class-booking"===t&&(0,i.jsx)(T,{}),"manage-membership"===t&&(0,i.jsx)(R,{})]})]})}function H(e){e.cartItems;var t=(0,u.useRouter)(),n=(0,N.v9)((function(e){return e.userDetail.core_class})),a=(0,N.v9)((function(e){return e.userDetail.activeDay})),s=(0,m.useState)(!1),l=s[0],v=s[1],h=(0,N.I0)();(0,m.useEffect)((function(){h((0,P.ou)()),JSON.parse(localStorage.getItem("_diversityToken"))||t.push("/login"),v(!localStorage.getItem("_showmyaccountinfo")&&n)}),[]);var p=function(){localStorage.setItem("_showmyaccountinfo","shown"),v(!1)};return(0,i.jsxs)("div",{children:[(0,i.jsxs)(r(),{children:[(0,i.jsx)("title",{children:"My Account | Diversity Studio"}),(0,i.jsx)("meta",{name:"description",content:"My Account diversity studio"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.png"})]}),(0,i.jsxs)(C.u_,{show:l,onClose:p,children:[(0,i.jsx)(C.u_.Header,{className:"section-description bg-diversity-primary",children:(0,i.jsx)("h1",{className:"text-2xl text-black",children:"IMPORTANT INFORMATION"})}),(0,i.jsxs)(C.u_.Body,{className:"section-description bg-diversity-primary",children:["You\u2019re guaranteed ",null===n||void 0===n?void 0:n.name," class will be every ",a,". ",(0,i.jsx)("br",{}),"If you\u2019re wondering what happens next, don\u2019t worry we pre-book your above guaranteed class each week for you. You can also book as many ",(0,i.jsx)("u",{children:"additional classes"})," as you like via the timetable and you will be charged \xa310 per additional class you book. Please see your upcoming classes in \u2018My Account\u2019. ",(0,i.jsx)("br",{})," If you have any questions please text us on 07360 271 083 or email us on [email protected]"]}),(0,i.jsx)(C.u_.Footer,{className:"bg-diversity-primary",children:(0,i.jsx)("button",{className:"".concat(d().Backgroun
1dColorPrimaryChangeToTop," all-button px-4 py-1"),onClick:p,children:"Ok"})})]}),(0,i.jsx)(c,{}),(0,i.jsx)(Z,{}),(0,i.jsx)(o.Z,{})]})}},3748:function(e,t,n){"use strict";n.d(t,{Hf:function(){return o},Iq:function(){return a},KW:function(){return s},jK:function(){return i},uK:function(){return r}});var i=function(e){return{type:"SET_CLASSES",payload:{classes:e}}},a=function(e){return{type:"SET_CORE_CLASSES",payload:{core_classes:e}}},r=function(e){return{type:"SET_ADDITIONAL_CLASSES",payload:{additional_classes:e}}},o=function(e){return{type:"SET_ACTIVE_DAYS",payload:{active_days:e}}},s=function(e){return{type:"SET_CLASS_ACTIVE_DAYS_MAP",payload:{class_active_days_map:e}}}},9008:function(e,t,n){e.exports=n(5443)}},function(e){e.O(0,[874,617,885,890,844,774,888,179],(function(){return t=3610,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.