1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7496],{84799:function(e,n,t){t.d(n,{O1:function(){return a},Xs:function(){return s},_I:function(){return o},pT:function(){return d},pV:function(){return u}});var i=t(29061),l=t(6230),r=t.n(l),o=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return i.Z.get("/get/counsellinglist",{baseURL:e,params:{start:n}}).then((function(e){return e.data.data}))},a=function(e,n){return i.Z.get("/consultation/get_consultation_by_id",{baseURL:e,params:{counselling_id:n}}).then((function(e){return e.data.data}))},s=function(e,n){return i.Z.get("/consultation/get_available_slots",{baseURL:e,params:{counselling_id:n}}).then((function(e){return e.data.data}))},d=function(e,n,t){var l=new(r());return l.append("counselling_id",n),l.append("start_datetime",t),i.Z.post("/consultation/book_slot",l,{baseURL:e}).then((function(e){return e.data.data}))},u=function(e,n){var t=new(r());return t.append("item_id",n),i.Z.post("/consultation/generate_meet_link",t,{baseURL:e}).then((function(e){return e.data.data}))}},32462:function(e,n,t){t.d(n,{Z:function(){return c}});var i=t(85893),l=t(59417),r=t(67814),o=t(95719),a=t(83024),s=t(60766),d=t(23149),u=t(84082);function c(e){var n=e.title,t=void 0===n?"Confirmation":n,c=e.subtitle,m=e.children,f=e.isOpen,v=e.toggle,p=e.onAccept,b=e.onReject,x=e.acceptLabel,g=void 0===x?"Proceed":x,h=e.rejectLabel,y=void 0===h?"Cancel":h,_=e.isLoading,w=void 0!==_&&_;return(0,i.jsxs)(o.Z,{isOpen:f,toggle:v,children:[(0,i.jsxs)(a.Z,{tag:"h5",toggle:v,children:[t,(0,i.jsx)("span",{className:"text-muted-foreground",children:c})]}),(0,i.jsx)(s.Z,{children:m}),(0,i.jsxs)(d.Z,{className:"justify-content-center border-top",children:[(0,i.jsxs)(u.Z,{disabled:w,color:"primary",onClick:p,children:[g," ",w&&(0,i.jsx)(r.G,{icon:l.LM3,spin:!0})]}),(0,i.jsx)(u.Z,{disabled:w,color:"default",className:"border",onClick:b,children:y})]})]})}},65356:function(e,n,t){t.d(n,{Z:function(){return v}});var i=t(26042),l=t(69396),r=t(85893),o=t(67294),a=t(95719),s=t(83024),d=t(96076),u=t(47041),c=t(89885),m=t(66471),f=d.jA;function v(e){var n=e.title,t=e.isOpen,v=e.toggle,p=e.allowDownload,b=void 0===p?"0":p,x=e.isEncrypted,g=void 0===x?"0":x,h=e.encryptionVersion,y=void 0===h?"1":h,_=e.encryptionKey,w=void 0===_?"":_,k=e.phone,j=void 0===k?"":k,N=e.modalHeaderProps,C=void 0===N?{}:N,S=e.modalHeaderChildren,L=void 0===S?null:S,E=(e.watermarkConfig,e.clientUrl),Z=e.link,M=e.size,A=(0,o.useContext)(c.Z).currentUser,I=(0,o.useRef)(null),O=(0,o.useMemo)((function(){var e,n;try{var t=(0,u.getCookie)(d.z1);t&&(e=new URL(t))}catch(i){console.error("error while getting base url",i)}return null!==(n=null!==E&&void 0!==E?E:null===e||void 0===e?void 0:e.host)&&void 0!==n?n:""}),[E]),D=(0,o.useMemo)((function(){return j||((null===A||void 0===A?void 0:A.phone)?btoa(d.qn.VALUE+d.qn.VALUE1+A.phone):"")}),[j,A]),R=(0,o.useCallback)((function(){var e=new URLSearchParams;return new Map([["file",Z],["save_flag",b],["is_encrypted",g],["encryption_version",y],["encryption_key",w],["title",n],["phone",D],["client_url",O]]).forEach((function(n,t){n&&e.append(t,n)})),e.toString()}),[Z,b,g,y,w,n,D,O]);return(0,o.useEffect)((function(){return t&&(0,m.w)("file_download",{file_name:n||Z,file_extension:"pdf"}),window.print=function(e){},window.onkeydown=function(e){(80===e.keyCode||83===e.keyCode||67===e.keyCode)&&(e.ctrlKey||e.metaKey)&&!e.altKey&&!e.shiftKey&&(e.preventDefault(),e.stopImmediatePropagation?e.stopImmediatePropagation():e.stopPropagation())},function(){window.onkeydown=null}}),[t,n,Z]),(0,r.jsxs)(a.Z,{unmountOnClose:!0,isOpen:t,toggle:v,fullscreen:!M,size:M||void 0,children:[v&&(0,r.jsxs)(s.Z,(0,l.Z)((0,i.Z)({toggle:v},C),{children:[(0,r.jsx)("div",{className:"flex gap-2",children:n&&!L&&(0,r.jsx)("div",{className:"font-lg font-bold",children:n})}),L||(0,r.jsx)(r.Fragment,{})]})),(0,r.jsx)("iframe",{ref:I,src:"".concat(f,"pdfjs/web/viewer-new.html?").concat(R()),sandbox:"allow-forms allow-scripts allow-same-origin allow-popups allow-modals allow-top-navigation allow-top-navigation-by-user-activation allow-orientation-lock allow-downloads",allowFullScreen:!0,height:"100%",width:"100%",className:"".concat(M?"h-[calc(45vh-3.5rem)]":"")})]})}},42868:function(e,n,t){t.d(n,{Z:function(){return d}});var i=t(85893),l=t(67294),r=t(96486),o=t(70499),a=t(89885),s=[{key:"web_androidurl",src:"/google-play.svg",alt:"Google Play Store"},{key:"web_iosurl",src:"https://appx-static.akamai.net.in/app-store.png",alt:"App Store"},{key:"web_windowsurl",src:"https://appx-static.akamai.net.in/static-assets/website/windows.webp",alt:"Windows Store"},{key:"web_macappurl",src:"https://appx-static.akamai.net.in/static-assets/website/intel.
1webp",alt:"Mac With Intel Chip"},{key:"web_macappurlapplechip",src:"https://appx-static.akamai.net.in/static-assets/website/mac.webp",alt:"Mac with Apple"}];function d(e){var n=e.isOpen,t=e.toggle,d=(0,l.useContext)(a.Z).appConfig,u=s.filter((function(e){return!(0,r.isEmpty)(d[e.key])}));return(0,i.jsx)(o.Vq,{open:!!n,onOpenChange:function(e){e||t()},children:(0,i.jsxs)(o.cZ,{closeButton:!0,className:"max-w-md",children:[(0,i.jsxs)(o.fK,{children:[(0,i.jsx)(o.$N,{children:"Download the app to view this content"}),(0,i.jsx)(o.Be,{children:"This content is only available in our app. Grab it from your store to continue."})]}),(0,i.jsx)("div",{className:"flex flex-col items-center gap-3 py-2",children:u.map((function(e){return(0,i.jsx)("a",{href:d[e.key],target:"_blank",rel:"noopener noreferrer",className:"w-fit rounded-lg transition-transform duration-200 hover:scale-[1.03] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:(0,i.jsx)("img",{src:e.src,width:150,alt:e.alt,className:"rounded-lg bg-background"})},e.key)}))})]})})}},77496:function(e,n,t){t.d(n,{Z:function(){return J}});var i=t(47568),l=t(14924),r=t(26042),o=t(69396),a=t(97582),s=t(85893),d=t(67294),u=t(13766),c=t(34622),m=t(18814),f=t(62461),v=t(96754),p=t(95034),b=t(35739),x=t(87958),g=t(93520),h=t(89885),y={invoice:u.Z,certificate:u.Z,kyc:u.Z};function _(e){var n,t=e.title,i=e.image,l=e.tags,r=void 0===l?[]:l,o=e.isNewCourse,a=void 0!==o&&o,u=(e.accessLabel,e.expiryMode),_=e.validity,w=e.validityType,k=e.endDate,j=e.expiryDate,N=e.primaryAction,C=e.secondaryActions,S=void 0===C?[]:C,L=e.statusSlot,E=e.showImage,Z=void 0===E||E,M=e.variantIndex,A=e.cardClassName,I=void 0===A?"":A,O=e.titleClassName,D=void 0===O?"":O,R=(0,d.useContext)(h.Z).appConfig,T=S.filter(Boolean),z=Boolean(N),P=(0,d.useMemo)((function(){return{expiry_mode:u,validity:_,validity_type:w,end_date:k,expiryDate:j,is_paid:"1"}}),[u,_,w,k,j]),U=(0,d.useMemo)((function(){return r.filter(Boolean)}),[r]),K=null!==(n=T.find((function(e){return"invoice"===e.key})))&&void 0!==n?n:T[0],V=K?T.filter((function(e){return e!==K})):T,B=function(e,n){var t,i,l=null!==(t=e.icon)&&void 0!==t?t:y[e.key];return(0,s.jsxs)(b.z,{type:"button",variant:"destructive"===e.variant?"destructive":"secondary",disabled:e.disabled,onClick:e.onClick,className:n,children:[l?(0,s.jsx)(l,{className:"size-4 shrink-0","aria-hidden":"true"}):null,(0,s.jsx)("span",{className:"truncate",children:e.label})]},null!==(i=e.key)&&void 0!==i?i:e.label)};return(0,s.jsxs)("article",{className:(0,f.cn)("flex h-full w-full flex-col overflow-hidden text-foreground gap-4",I),children:[Z&&(0,s.jsx)("div",{className:"relative aspect-[16/10] w-full shrink-0 overflow-hidden rounded-xl bg-muted",children:(0,s.jsx)(v.L,{imageStr:i,title:t,imgHeight:"225",mode:"blur-bg",fallbackSeed:t,variantIndex:M})}),(0,s.jsxs)("div",{className:"flex flex-1 flex-col gap-2 p-1.5 pt-0",children:[(a||U.length>0)&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[a?(0,s.jsxs)(p.C,{variant:"destructive",size:"sm",className:"rounded-full px-2.5 py-0.5 text-[11px] font-semibold",children:[(0,s.jsx)("span",{className:"size-1.5 rounded-full bg-destructive-foreground"}),"New"]}):null,U.map((function(e){return(0,s.jsx)(p.C,{variant:"outline",size:"sm",className:"rounded-full border-border/80 bg-transparent px-2.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:e},e)}))]}),(0,g.hb)(R.web_showValidityDisplay)&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-muted-foreground has-[h6]:flex has-[p]:flex",children:[(0,s.jsx)(c.Z,{className:"size-3.5 shrink-0","aria-hidden":"true"}),(0,s.jsx)(x.Z,{course:P,isPurchased:!0,className:"mb-0 text-sm font-normal leading-none text-muted-foreground [&_h6]:text-sm [&_h6]:font-normal [&_h6]:leading-none [&_h6]:text-muted-foreground"})]}),t?(0,s.jsx)("h3",{className:(0,f.cn)("mb-0 line-clamp-2 text-xl font-semibold tracking-tight text-foreground",D),children:t}):null,(z||K)&&(0,s.jsxs)("div",{className:(0,f.cn)("grid gap-3 pt-4 border-t",z&&K?"grid-cols-2":"grid-cols-1"),children:[z?(0,s.jsxs)(b.z,{type:"button",disabled:N.disabled,onClick:N.onClick,children:[(0,s.jsx)("span",{className:"truncate",children:N.label}),(0,s.jsx)(m.Z,{className:"size-4 shrink-0","aria-hidden":"true"})]}):null,K?B(K,"min-w-0"):null]}),V.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:V.map((function(e){return B(e,"min-w-fit")}))}):null,L]})]})}function w(){return(0,s.jsxs)("div",{className:"flex animate-pulse flex-col overflow-hidden rounded-2xl bg-card shadow-[0_1px_2px_rgba(16,24,40,0.06),0_1px_3px_rgba(16,24,40,0.1)]",children:[(0,s.jsx)("div",{className:"aspect-[16/10] w-full bg-muted"}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 p-4",children:[(0,s.jsxs)("div",{className:"flex gap-1.5",children:[(0,s.jsx)("div",{className:"h-6 w-14 roun
1ded-full bg-muted"}),(0,s.jsx)("div",{className:"h-6 w-20 rounded-full bg-muted"})]}),(0,s.jsx)("div",{className:"h-4 w-2/3 rounded-md bg-muted"}),(0,s.jsx)("div",{className:"h-7 w-full rounded-md bg-muted"}),(0,s.jsxs)("div",{className:"mt-auto grid grid-cols-[minmax(0,1.75fr)_minmax(0,1fr)] gap-3 pt-2",children:[(0,s.jsx)("div",{className:"h-11 rounded-lg bg-muted"}),(0,s.jsx)("div",{className:"h-11 rounded-lg bg-muted"})]})]})]})}function k(e){var n=e.count,t=void 0===n?6:n;return Array.from({length:t}).map((function(e,n){return(0,s.jsx)(w,{},n)}))}var j=t(30381),N=t.n(j),C=t(47041),S=t(59417),L=t(67814),E=t(37772),Z=t(19201),M=t(96076),A=t(84799);function I(e){var n=e.itemId,t=e.bookedSlot,l=e.className,r=void 0===l?"":l,o=(0,d.useState)((null===t||void 0===t?void 0:t.meet_link)||null),u=o[0],c=o[1],v=(0,d.useState)(!1),p=v[0],x=v[1];(0,d.useEffect)((function(){(null===t||void 0===t?void 0:t.meet_link)&&t.meet_link!==u&&c(t.meet_link)}),[null===t||void 0===t?void 0:t.meet_link]);var g=(null===t||void 0===t?void 0:t.start_datetime)?N()(t.start_datetime):null,h=(null===t||void 0===t?void 0:t.end_datetime)?N()(t.end_datetime):null,y=N()(),_=g?g.clone().subtract(M.uQ,"minutes"):null,w=!g||y.isSameOrAfter(_)&&(!h||y.isBefore(h)),k=!!g&&!w,j=p?"Generating\u2026":u?"Join":"Generate Meet Link",I=function(){var e=(0,i.Z)((function(){var e,t,i,l;return(0,a.__generator)(this,(function(r){switch(r.label){case 0:if(p||k)return[2];if(u)return window.open(u,"_blank"),[2];x(!0),r.label=1;case 1:return r.trys.push([1,3,4,5]),t=(0,C.getCookie)(M.z1),[4,(0,A.pV)(t,n)];case 2:return i=r.sent(),(l=null===i||void 0===i||null===(e=i.booked_slot)||void 0===e?void 0:e.meet_link)?c(l):Z.A.error(M.LT),[3,5];case 3:return r.sent(),Z.A.error("Could not generate the meet link. Please try again."),[3,5];case 4:return x(!1),[7];case 5:return[2]}}
1))}));return function(){return e.apply(this,arguments)}}();return k?(0,s.jsx)(E.pn,{delayDuration:100,children:(0,s.jsxs)(E.u,{children:[(0,s.jsx)(E.aJ,{asChild:!0,children:(0,s.jsx)("span",{className:(0,f.cn)("flex-1",r),children:(0,s.jsxs)(b.z,{className:"w-full",disabled:!0,children:[j,(0,s.jsx)(m.Z,{className:"size-4"})]})})}),(0,s.jsx)(E._v,{className:"max-w-[220px] text-center",children:M.LT})]})}):(0,s.jsxs)(b.z,{className:(0,f.cn)("flex-1",r),disabled:p,onClick:I,children:[p&&(0,s.jsx)(L.G,{spin:!0,icon:S.LM3,className:"me-2"}),j,(0,s.jsx)(m.Z,{className:"size-4"})]})}function O(e){var n=e.itemId,t=e.title,i=e.image,l=e.durationMinutes,r=e.bookedSlot,o=e.onInvoice,a=e.hasInvoice,d=(null===r||void 0===r?void 0:r.start_datetime)?N()(r.start_datetime):null,u=d?d.format("D MMM, h:mm A"):null;return(0,s.jsxs)("article",{className:"group flex h-full w-full flex-col gap-4 text-foreground",children:[(0,s.jsx)("div",{className:"relative aspect-video w-full shrink-0 overflow-hidden rounded-xl border border-border bg-muted",children:(0,s.jsx)(v.L,{imageStr:i,title:t,imgHeight:"225",mode:"blur-bg",fallbackSeed:t})}),(0,s.jsxs)("div",{className:"flex h-full flex-col justify-between gap-3 px-1.5",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[l>0&&(0,s.jsx)("div",{children:(0,s.jsxs)(p.C,{variant:"muted",className:"text-xs",children:[l," mins"]})}),u&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[(0,s.jsx)(c.Z,{className:"size-3.5 shrink-0","aria-hidden":"true"}),(0,s.jsx)("span",{children:u})]}),t&&(0,s.jsx)("h3",{className:"mb-0 line-clamp-2 text-xl font-semibold text-foreground",children:t})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(I,{itemId:n,bookedSlot:r}),a&&(0,s.jsx)(b.z,{variant:"outline",className:"flex-1 rounded-md",onClick:o,children:"Invoice"})]})]})]})}var D=t(90387),R=t(45508),T=t(96486),z=t(65356),P=t(42868),U=t(47628),K=t(32462),V=t(72685),B=t(41352),q=t(85030),F=t(15328),G=t(23662),H=t(35895);function W(e){return[null===e||void 0===e?void 0:e.exam_category,null===e||void 0===e?void 0:e.categories].flatMap((function(e){return e?String(e).split(",").map((function(e){return e.trim()})):[]})).filter(Boolean).slice(0,2)}function Y(e,n,t){var i,l,r,o,a=Number(null!==(o=null!==(r=null!==(l=null!==(i=null===e||void 0===e?void 0:e.amount)&&void 0!==i?i:null===e||void 0===e?void 0:e.price)&&void 0!==l?l:null===n||void 0===n?void 0:n[null===t||void 0===t?void 0:t.price])&&void 0!==r?r:null===n||void 0===n?void 0:n.price)&&void 0!==o?o:NaN);return Number.isNaN(a)?null:a<=0?"Free":"Paid"}function J(e){var n,t,u,c,m=e.purchases,v=e.type,p=e.selectedType,b=e.searchTerm,x=e.hideHeader,y=void 0!==x&&x,w=e.loading,j=e.paidStatus,S=void 0===j?"all":j,L=e.onPaidStatusChange,E=void 0===L?function(){}:L,I=(0,d.useContext)(h.Z).appConfig,J=(0,d.useState)(),Q=J[0],X=J[1],$=(0,d.useState)(),ee=$[0],ne=$[1],te=function(){return X(!Q)},ie=(0,D.useRouter)(),le=(0,d.useState)(),re=le[0],oe=le[1],ae=(0,d.useState)(!1),se=ae[0],de=ae[1],ue=(0,d.useState)({}),ce=ue[0],me=ue[1],fe=(0,d.useRef)(null),ve=(0,d.useState)(""),pe=ve[0],be=ve[1],xe=(0,F.U)({appConfig:I}),ge=xe.execute,he=xe.FormBuilderModal,ye=(0,G.Z)(I),_e=ye.keysByType,we=ye.enabledKeys,ke=null!=p,je=(0,d.useState)(v),Ne=je[0],Ce=je[1],Se=ke?p:Ne,Le="7"===String(Se),Ee=["7","8"].includes(String(Se)),Ze=null!=b,Me=Ze?b:pe,Ae=function(){return oe(!re)},Ie=function(e){de((function(n){return void 0!==e?e:!n}))},Oe=function(e,n){return"MONTHS"===e?1==n?"month":"months":"DAYS"===e?1==n?"day":"days":"YEARS"===e?1==n?"year":"years":""},De=(0,d.useMemo)((function(){return(0,T.debounce)((function(e){return be(e.trim().toLowerCase())}),300)}),[]),Re=(0,d.useMemo)((function(){return(0,T.debounce)((function(e){return E(e)}),500)}),[E]),Te=(0,d.useMemo)((function(){return Me?m.filter((function(e){var n,t,i=null!==(t=_e.find((function(e){return e.id==Number(Se)})))&&void 0!==t?t:_e.find((function(n){return n.id==e.itemtypeid}));if(!i)return!1;var l,r=null===(n=e[i.details])||void 0===n?void 0:n[0];return!!r&&String(null!==(l=r[i.title])&&void 0!==l?l:"").toLowerCase().includes(Me)})):m}),[m,Me,Se,_e]),ze=function(e){var n,t,i=null!==(n=e.counsellingdt)&&void 0!==n?n:e.consultationdt;return Array.isArray(i)?null!==(t=i[0])&&void 0!==t?t:null:i&&"object"===typeof i?i:null},Pe=(0,d.useState)({}),Ue=Pe[0],Ke=Pe[1];(0,d.useEffect)((function(){if(null===m||void 0===m?void 0:m.length){var e=(0,C.getCookie)(M.z1);m.forEach((function(n){if("7"===String(n.itemtypeid)){var t,i=null!==(t=n.bookedSlot)&&void 0!==t?t:n.booked_slot;if(i&&!i.meet_link){var a,s,d=ze(n),u=null!==(s=null!==(a=n.itemid)&&void 0!==a?a:null===d||void 0===d?void 0:d.c_id)&&void 0!==s?s:null===d||void 0===d?void 0:d.id;u&&(0,A.pV)(e,u).then((function(e){var t,i,a=null===e||void 0===e||null===(t=e.booked_slot)||void 0===t?void 0:t.meet_link;a&&Ke((function(e){return(0,o.Z)((0,r.Z)({},e),(0,l.Z)({},null!==(i=n.purchaseid)&&void 0!==i?i:u,a))}))})).catch((function(){}))}}}))}}),[m]),(0,d.useEffect)((function(){return function(){return De.cancel()}}),[De]),(0,d.useEffect)((function(){return function(){return Re.cancel()}}),[Re]),(0,d.useEffect)((function(){Ze||(De.cancel(),Re.cancel(),be(""),fe.current&&(fe.current.value=""))}),[Se]),(0,d.useEffect)((function(){ke||Se&&Se!=ie.query.type&&ie.replace({query:(0,o.Z)((0,r.Z)({},ie.query),{type:Se})})}),[Se,ke]),(0,d.useEffect)((function(){ke||0===we.length||Ce((function(e){if(ie.query.type){var n=ie.query.type;if(we.find((function(e){return e.id==n})))return n}return e==we[0].id?e:we[0].id}))}),[ke,we,ie.query.type]);var Ve,Be,qe=function(){var e=(0,i.Z)((function(e){var n,t;return(0,a.__generator)(this,(function(i){switch(i.label){case 0:if("1"!=e.is_invoice_signed)return[3,5];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,(0,U.yZ)(e.purchaseid)];case 2:return n=i.sent().url,window.open(n,"_blank"),[3,4];case 3:return i.sent(),Z.A.error("Failed to fetch invoice"),[3,4];case 4:return[3,6];case 5:e.invoice_url?(t=(0,R.NA)(e.invoice_url),window.open(t,"_blank")):Z.A.error("Invoice not found"),i.label=6;case 6:return[2]}}
1))}));return function(n){return e.apply(this,arguments)}}(),Fe=function(){var e=(0,i.Z)((function(e){var n,t,i,l;return(0,a.__generator)(this,(function(r){switch(r.label){case 0:n=e.item_id,t=e.item_type,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,(0,U.EO)({item_id:n,item_type:t})];case 2:return 200===(i=r.sent()).status?(Z.A.success("Subscription cancelled successfully"),Ie(!1),me({}),window.location.reload()):Z.A.error("".concat(i.message||"Failed to cancel subscription"," ")),[3,4];case 3:return l=r.sent(),console.log("error while calling cancelSubscription api",l),[3,4];case 4:return[2]}}))}));return function(n){return e.apply(this,arguments)}}(),Ge=function(e){return N()(e.enddatetime).format("D MMM yyyy")>N()(e.datetime).format("D MMM yyyy")&&"CANCELLED"===e.subscription_status},He=function(e,n){if("Book"!=e.itemtype&&!(0,g.hb)((null===e||void 0===e?void 0:e.hide_view_content)||"0"))return{label:"Course"==e.itemtype&&"1"!=I.isWindowsApp&&"0"==n.view_in_web?"View in App":"View",onClick:function(){return function(e){if("1"!=I.isWindowsApp&&["1","10","11"].includes(String(Se))&&"0"==e.coursedt[0].view_in_web)Ae();else{var n=_e.find((function(n){return["1","10","11"].includes(String(Se))?n.id==Se:n.id==e.itemtypeid})),t=e[null===n||void 0===n?void 0:n.details]?e[null===n||void 0===n?void 0:n.details][0]:null;if("Study Material"==e.itemtype||"Notes 2"==e.itemtype){var l,r="Study Material"==e.itemtype?e.studymaterialdt[0].pdf_link:e.notes2dt[0].pdf_link,o=function(){ne({link:r,save_flag:e.save_flag}),te()};[2,4].includes(Number(e.itemtypeid))?ge({event:"AFTER_PURCHASE",itemType:e.itemtypeid,itemId:null!==(l=null===t||void 0===t?void 0:t.id)&&void 0!==l?l:e.itemid,entity:t||e,next:(0,i.Z)((function(){return(0,a.__generator)(this,(function(e){return[2,o()]}))}))}):o()}else ie.push(n.viewLink(t))}}(e)}}},We=function(e,n){var t,i,l=function(e){var n,t,i;return null===(t=null===e||void 0===e||null===(n=e.coursedt)||void 0===n?void 0:n.find((function(e){var n;return null===e||void 0===e||null===(n=e.aadhaar_details)||void 0===n?void 0:n.doc_link})))||void 0===t||null===(i=t.aadhaar_details)||void 0===i?void 0:i.doc_link}(e);return[5==e.itemtypeid&&e.returndt&&e.returndt.status===M.Pn.PLACED&&e.returndt.tracking_link&&{key:"track-return",label:"Track Return",variant:"secondary",onClick:function(){return window.open(e.returndt.tracking_link,"_blank")}},5==e.itemtypeid&&!e.returndt&&"3"==(null===(t=e.orderdt)||void 0===t||null===(i=t[0])||void 0===i?void 0:i.order_status)&&{key:"return-exchange",label:"Return / Exchange",variant:"secondary",onClick:function(){return ie.push("/refund-return?purchaseId=".concat(e.purchaseid))}},(e.invoice_url||"1"==e.is_invoice_signed)&&{key:"invoice",label:"Invoice",onClick:function(){return qe(e)}},e.certificate_url&&{key:"certificate",label:"Download Certificate",onClick:function(){return function(e){var n=(0,R.NA)(e.certificate_url);window.open(n,"_blank")}(e)}},l&&{key:"kyc",label:"View KYC Docs",onClick:function(){ne({link:l,save_flag:!0}),te()}},n.extended_validity>0&&"-1"!=n.extended_validity_price&&{key:"extend",label:"Extend for ".concat(n.extended_validity," ").concat(Oe(n.extended_validity_type,n.extended_validity)),onClick:function(){localStorage.setItem("extend_info",JSON.stringify({extended_validity:n.extended_validity,extended_validity_price:n.extended_validity_price}));var t="3"==Se?"/test-series/".concat(e.itemid,"?isExtend=1"):"/".concat("10"==Se?"new-":"","courses/").concat(e.itemid,"?isExtend=1");ie.push(t)}},"ACTIVE"===e.subscription_status&&{key:"cancel-subscription",label:"Cancel Subscription",variant:"destructive",onClick:function(){me({item_id:e.itemid,item_type:Se}),Ie(!0)}},Ge(e)&&{key:"cancelled",label:"Cancelled",variant:"destructive",disabled:!0}]},Ye=function(e){var n,t=5==e.itemtypeid&&e.returndt?null!==(n=M.c[e.returndt.status])&&void 0!==n?n:e.returndt.status:null,i=Ge(e)?"Subscription will automatically end on ".concat(N()(e.enddatetime).format("D MMM yyyy")):null;return t||i?(0,s.jsxs)(s.Fragment,{children:[t&&(0,s.jsx)("p",{className:"mb-0 text-center text-sm text-muted-foreground",children:t}),i&&(0,s.jsx)("p",{className:"mb-0 text-center text-sm text-muted-foreground",children:i})]}):null};return(0,s.jsxs)("section",{className:"flex flex-col gap-6",children:[!y&&(0,s.jsxs)(s.Fragment,{children:[!ke&&we.length>1&&(0,s.jsx)("div",{className:"flex flex-wrap gap-3",children:we.map((function(e){var n=Se==e.id;return(0,s.jsx)("button",{type:"button",onClick:function(){return n=e.id,De.cancel(),Re.cancel(),Ce(n),void E("all");var n},className:(0,f.cn)("flex h-12 shrink-0 items-center rounded-xl border px-4 text-base font-medium transition-all duration-300",n?"border-transparent bg-foreground text-background":"border-border bg-secondary text-secondary-foreground hover:bg-accent"),children:e.label},e.id)}))}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"relative w-full max-w-sm",children:[(0,s.jsx)(V.I,{ref:fe,type:"text",placeholder:"Search ".concat(null!==(Ve=null===(n=_e.find((function(e){return e.id==Se})))||void 0===n?void 0:n.label)&&void 0!==Ve?Ve:"","..."),onChange:function(e){return De(e.target.value)},className:"rounded-full pr-8"}),Me&&(0,s.jsx)("button",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground transition-colors hover:text-foreground",onClick:function(){be(""),fe.current&&(fe.current.value="")},children:(0,s.jsx)(B.Z,{size:14})})]}),10===Number(Se)&&(0,s.jsx)(H.mQ,{value:S,onValueChange:function(e){return Re(e)},children:(0,s.jsx)(H.dr,{className:"rounded-full bg-muted/60 p-0.5",children:["all","free","paid"].map((function(e){return(0,s.jsx)(H.SP,{value:e,className:"rounded-full text-xs capitalize text-muted-foreground transition-colors hover:text-foreground data-[state=active]:border-transparent data-[state=active]:bg-foreground data-[state=active]:text-background data-[state=active]:shadow-none",children:e},e)}))})}),Ee&&(0,s.jsx)(H.mQ,{value:S,onValueChange:function(e){return Re(e)},children:(0,s.jsx)(H.dr,{className:"rounded-full bg-muted/60 p-0.5",children:["all","upcoming","completed"].map((function(e){return(0,s.jsx)(H.SP,{value:e,className:"rounded-full text-xs capitalize text-muted-foreground transition-colors hover:text-foreground data-[state=active]:border-transparent data-[state=active]:bg-foreground data-[state=active]:text-background data-[state=active]:shadow-none",children:e},e)}))})})]})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-x-6 gap-y-10 py-2 md:grid-cols-2 lg:grid-cols-3",children:w?(0,s.jsx)(k,{}):(null===Te||void 0===Te?void 0:Te.length)>0?Te.map((function(e,n){if(Le||"7"===String(e.itemtypeid)){var t,i=ze(e);if(!i)return null;var l,a,d,u,c,m,f,v,p,b,x,h=null!==(t=e.bookedSlot)&&void 0!==t?t:e.booked_slot,y=null!==(a=null!==(l=e.itemid)&&void 0!==l?l:null===i||void 0===i?void 0:i.c_id)&&void 0!==a?a:null===i||void 0===i?void 0:i.id,w=Ue[null!==(d=e.purchaseid)&&void 0!==d?d:y],k=w&&h?(0,o.Z)((0,r.Z)({},h),{meet_link:w}):h;return(0,s.jsx)(O,{itemId:null!==(c=null!==(u=e.itemid)&&void 0!==u?u:null===i||void 0===i?void 0:i.c_id)&&void 0!==c?c:null===i||void 0===i?void 0:i.id,title:null!==(m=i.c_title)&&void 0!==m?m:i.title,image:null!==(f=i.c_image)&&void 0!==f?f:i.image,durationMinutes:Number(null!==(p=null!==(v=i.duration_minutes)&&void 0!==v?v:i.duration)&&void 0!==p?p:0),bookedSlot:k,hasInvoice:!!e.invoice_url,onInvoice:function(){return qe(e)}},e.purchaseid+(null!==(x=null!==(b=null===i||void 0===i?void 0:i.c_id)&&void 0!==b?b:null===i||void 0===i?void 0:i.id)&&void 0!==x?x:e.itemid))}var j,N=_e.find((function(n){return n.id==e.itemtypeid})),C=e[null===N||void 0===N?void 0:N.details]?e[null===N||void 0===N?void 0:N.details][0]:null;return N&&C?(0,s.jsx)(_,{variantIndex:n,title:C[null===N||void 0===N?void 0:N.title],image:C[null===N||void 0===N?void 0:N.image],tags:W(C),isNewCourse:(0,g.hb)(null===C||void 0===C?void 0:C.gif_display),accessLabel:Y(e,C,N),expiryMode:C.expiry_mode,validity:C.validity,validityType:C.validity_type,endDate:C.end_date,expiryDate:C.expiryDate,primaryAction:He(e,C),secondaryActions:We(e,C),statusSlot:Ye(e)},e.purchaseid+(null!==(j=null===C||void 0===C?void 0:C.id)&&void 0!==j?j:e.itemid)):null})):(0,s.jsx)(q.Z,{className:"col-span-full",title:Me?'No results found for "'.concat(Me,'"'):"No ".concat(null!==(Be=null===(t=_e.find((function(e){return e.id==Se})))||void 0===t?void 0:t.alertLabel)&&void 0!==Be?Be:null===(u=_e.find((function(e){return e.id==Se})))||void 0===u||null===(c=u.label)||void 0===c?void 0:c.toLowerCase()," purchased"),description:Me?"Try a different search term.":"Anything you purchase will show up here."})}),ee&&(0,s.jsx)(z.Z,{isOpen:Q,toggle:te,link:(0,R.NA)(ee.link),allowDownload:null===ee||void 0===ee?void 0:ee.save_flag}),(0,s.jsx)(P.Z,{isOpen:re,toggle:Ae}),(0,s.jsx)(K.Z,{isOpen:se,toggle:function(){return Ie()},onAccept:function(){Fe(ce)},onReject:function(){Ie(!1),me({})},title:"Cancel Subscription",acceptLabel:"Confirm",rejectLabel:"Cancel",children:"Are you sure you want to cancel the subscription?"}),he]})}},23662:function(e,n,t){t.d(n,{Z:function(){return a}});var i=t(67294),l=t(96486),r=t(93520),o=t(57914);function a(e){var n,t,a,s=(0,i.useMemo)((function(){var n,t,i=null===(n=e.web_menuitems)||void 0===n?void 0:n.find((function(e){var n=e.type,t=e.exam,i=e.folder;return"COURSES"===n&&!t&&!i}));if(i)return i.title;var l=null===(t=e.web_menuitems)||void 0===t?void 0:t.find((function(e){return"COURSES"===e.type}));return l?l.title:e.web_menucoursename}),[e]),d=(0,i.useMemo)((function(){var n,t,i=null===(n=e.web_menuitems)||void 0===n?void 0:n.find((function(e){var n=e.type,t=e.exam,i=e.folder;return"DIGITAL_PRODUCTS"===n&&!t&&!i}));if(i)return i.title;var l=null===(t=e.web_menuitems)||void 0===t?void 0:t.find((function(e){return"DIGITAL_PRODUCTS"===e.type}));
1return l?l.title:e.web_menunewcoursename}),[e]),u=(0,i.useMemo)((function(){return(0,o.Xt)(e)}),[e]),c=(0,i.useMemo)((function(){return(0,o.hx)(e)}),[e]),m=(0,i.useMemo)((function(){var i,o,m,f,v,p;return[{id:1,label:s,alertLabel:"courses",details:"coursedt",title:"course_name",price:"price",isEnabled:u,viewLink:function(e){return"/courses/".concat(e.id,"/content")},image:"course_thumbnail"},{id:10,label:d,alertLabel:"digital products",details:"coursedt",title:"course_name",price:"price",viewLink:function(e){return"/new-courses/".concat(e.id,"/content")},isEnabled:c,image:"image"},{id:8,label:null===(o=null===(i=e.web_menuitems)||void 0===i?void 0:i.find((function(e){return"WORKSHOPS"===e.type})))||void 0===o?void 0:o.title,details:"workshopDt",alertLabel:"workshops",title:"title",price:"price",viewLink:function(e){return"/workshops/".concat(e.id)},isEnabled:(0,l.isEmpty)(e.web_menuitems)?"1"==e.web_enablemenuworkshop:(0,l.some)(e.web_menuitems,{type:"WORKSHOPS"}),image:"image"},{id:11,label:e.web_menulinkedcoursename,details:"coursedt",title:"course_name",alertLabel:"courses",price:"price",viewLink:function(e){return"/".concat("1"==e.folder_wise_course?"new-":"","courses/").concat(e.id,"/content?lcId=").concat(e.linked_course_id,"&api=").concat(encodeURIComponent(e.api_url))},isEnabled:(0,l.isEmpty)(e.web_menuitems)?"1"==e.web_enablemenulinkedcourse:(0,l.some)(e.web_menuitems,{type:"LINKED_COURSES"}),image:"course_thumbnail"},{id:7,label:e.web_menucounsellingname||"Consultation",alertLabel:"consultations",details:"counsellingdt",title:"c_title",price:"c_price",isEnabled:(0,l.isEmpty)(e.web_menuitems)?"1"==e.web_enablemenucounselling:(0,l.some)(e.web_menuitems,{type:"COUNSELLING"}),viewLink:function(e){return"/counselling/".concat(null!==(n=null===e||void 0===e?void 0:e.c_id)&&void 0!==n?n:null===e||void 0===e?void 0:e.id)},image:"c_image"},{id:3,label:e.web_menutestseriesname,details:"testseriesdt",title:"title",alertLabel:"test series",price:"price",isEnabled:(0,l.isEmpty)(e.web_menuitems)?"0"!=e.web_enablemenutestseries:(0,l.some)(e.web_menuitems,{type:"TEST_SERIES"}),viewLink:function(e){return"/test-series/".concat(e.id,"/tests")},image:"logo"},{id:4,label:null!==(t=null===(f=null===(m=e.web_menuitems)||void 0===m?void 0:m.find((function(e){return"STUDY_MATERIAL"===e.type})))||void 0===f?void 0:f.title)&&void 0!==t?t:"Notes",details:"notes2dt",alertLabel:"notes",title:"title",price:"price",isEnabled:(0,r.hb)(e.web_enableNotesInPurchase),viewLink:"pdf_link",image:""},{id:5,label:e.web_menubooksname,details:"productsdt",title:"title",alertLabel:"books",price:"price",isEnabled:(0,l.isEmpty)(e.web_menuitems)?"0"!=e.web_enablemenubooks:(0,l.some)(e.web_menuitems,{type:"BOOKS"}),viewLink:"link",image:"image"},{id:2,label:null!==(a=null===(p=null===(v=e.web_menuitems)||void 0===v?void 0:v.find((function(e){return"EBOOKS"===e.type})))||void 0===p?void 0:p.title)&&void 0!==a?a:e.web_menustudymaterialname,alertLabel:"study materials",details:"studymaterialdt",title:"title",price:"price",viewLink:"pdf_link",isEnabled:(0,r.hb)(e.web_enableStudyMaterialInPurchase),image:"image"}]}),[e,s,d,u,c]),f=(0,i.useMemo)((function(){return m.filter((function(e){return e.isEnabled}))}),[m]);return{keysByType:m,enabledKeys:f}}}}]);
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.