1(this["webpackJsonpclassplus-web-react"]=this["webpackJsonpclassplus-web-react"]||[]).push([[43,107],{1036:function(e,t,a){e.exports={Container:"LiveVideo_Container__vwOqC",HeaderText:"LiveVideo_HeaderText__3H0CE",Header:"LiveVideo_Header__k88T5",SingleContentImgText:"LiveVideo_SingleContentImgText__3PgOw",SingleContentImgText2:"LiveVideo_SingleContentImgText2__3s2ge",promotedCourseContainer:"LiveVideo_promotedCourseContainer__1JvWO",SingleContentImgText1:"LiveVideo_SingleContentImgText1__3djYB",SingleContentContainer:"LiveVideo_SingleContentContainer__3GYhJ",ScheduleContentContainer:"LiveVideo_ScheduleContentContainer__17b9v",SingleContentName:"LiveVideo_SingleContentName__DcZn6",SingleCountAttendanceCount:"LiveVideo_SingleCountAttendanceCount__2frrN",AddButton:"LiveVideo_AddButton__1y09d",liveButton:"LiveVideo_liveButton__3AwG5",GoliveButton:"LiveVideo_GoliveButton__327DR",GoliveButtonHeader:"LiveVideo_GoliveButtonHeader__1Voml",modal:"LiveVideo_modal__1F55d",modalContent:"LiveVideo_modalContent__2mKO5",animatetop:"LiveVideo_animatetop__U8cp3",goLiveModalFooter:"LiveVideo_goLiveModalFooter__3HYCy",goLiveModalTitle:"LiveVideo_goLiveModalTitle__31z7d",goLiveModalAllowTitle:"LiveVideo_goLiveModalAllowTitle__2Mo7l",allowEveryoneContainer:"LiveVideo_allowEveryoneContainer__3Au89",goLiveModalMenuText:"LiveVideo_goLiveModalMenuText__2uehV",paddingCheat:"LiveVideo_paddingCheat__2LmPB",goLiveModalButton:"LiveVideo_goLiveModalButton__J3Uk4",disableGoLiveModalButton:"LiveVideo_disableGoLiveModalButton__oVfVP",shakyText:"LiveVideo_shakyText__2yCxI",shake:"LiveVideo_shake__rYfQZ",goLiveModalTitleInput:"LiveVideo_goLiveModalTitleInput__3S5TU",percentageBarContainer:"LiveVideo_percentageBarContainer__fM2ul",percentageBar:"LiveVideo_percentageBar__2wgMp",timeLeft:"LiveVideo_timeLeft__1Xk5J",studentNumberContainer:"LiveVideo_studentNumberContainer__3SmQU",GoLiveTutorContainer:"LiveVideo_GoLiveTutorContainer__2yQ6C",GoLiveTutorHeader:"LiveVideo_GoLiveTutorHeader__2ZILF",GoLiveTutorHeaderText:"LiveVideo_GoLiveTutorHeaderText__1JI_B",GoLiveTutorHeaderTextFlex:"LiveVideo_GoLiveTutorHeaderTextFlex__3eBF7",GoLiveTutorHeaderTextFlexChild1:"LiveVideo_GoLiveTutorHeaderTextFlexChild1__1k2h3",GoLiveTutorHeaderTextFlexChild2:"LiveVideo_GoLiveTutorHeaderTextFlexChild2__uDolV",GoLiveTutorHeaderLabel:"LiveVideo_GoLiveTutorHeaderLabel__ZKGKa",GoLiveTutorHeaderButton:"LiveVideo_GoLiveTutorHeaderButton__1DbQj",GoLiveStudentTimeText:"LiveVideo_GoLiveStudentTimeText__26XbE",GoLiveStudentLiveNow:"LiveVideo_GoLiveStudentLiveNow__3jHzK",iframe:"LiveVideo_iframe__2SrcZ",scheduleBox:"LiveVideo_scheduleBox__1Pd-A",rdtPicker:"LiveVideo_rdtPicker__1Hi8y",liveSuccessModal:"LiveVideo_liveSuccessModal__Q7WSd",justifyCentre:"LiveVideo_justifyCentre__WAkKF",liveSuccessModalHeader:"LiveVideo_liveSuccessModalHeader__tUvsG",liveSuccessModalText:"LiveVideo_liveSuccessModalText__2Sq1-",dataFetch:"LiveVideo_dataFetch__3gyHl",videoListEmpty:"LiveVideo_videoListEmpty__SjqcV",videoListEmptyHeadText:"LiveVideo_videoListEmptyHeadText__11I8V",videoListEmptySubText:"LiveVideo_videoListEmptySubText__IRD7M",playIcon:"LiveVideo_playIcon__21DJ4",duration:"LiveVideo_duration__2CXha",overviewCard:"LiveVideo_overviewCard__3XHlP",scheduleGoLive:"LiveVideo_scheduleGoLive__3r2Et",scheduleGoLiveText:"LiveVideo_scheduleGoLiveText__3chG-",selectedCoursesArea:"LiveVideo_selectedCoursesArea__ub7Ku",selectedCoursesList:"LiveVideo_selectedCoursesList__2tkyu",selectedCourseName:"LiveVideo_selectedCourseName__PsJmc",addMore:"LiveVideo_addMore__2-L-B",GoLiveCardButtonWrapper:"LiveVideo_GoLiveCardButtonWrapper__3f2y4",ScheduleLiveClassCardButton:"LiveVideo_ScheduleLiveClassCardButton__2XUVo",ScheduleLiveClassCardButton2:"LiveVideo_ScheduleLiveClassCardButton2__3qxyI",goLiveMOdalDeleteButton:"LiveVideo_goLiveMOdalDeleteButton__ELwgs",goLiveModalDeleteButton:"LiveVideo_goLiveModalDeleteButton__WmwAM",goLiveModalRechargeReminder:"LiveVideo_goLiveModalRechargeReminder__3-7HJ",studentCount:"LiveVideo_studentCount__3iNO8",goLiveModalAdvance:"LiveVideo_goLiveModalAdvance__37JnW",goLiveModalAdvanceHeader:"LiveVideo_goLiveModalAdvanceHeader__3BRQj",goLiveModalAdvanceLabel:"LiveVideo_goLiveModalAdvanceLabel__2gw5r",goLiveModalAdvanceArrow:"LiveVideo_goLiveModalAdvanceArrow__cFgWp",smsNotifcation:"LiveVideo_smsNotifcation__2Ttjl",smsNotifcationHeader:"LiveVideo_smsNotifcationHeader__vdtUk",sendSMS:"LiveVideo_sendSMS__1CCH_",sendSmsText:"LiveVideo_sendSmsText__1_2U5",ScheduleTrialLiveClass:"LiveVideo_ScheduleTrialLiveClass__3B_HL",ScheduleTrialLiveClassLeft:"LiveVideo_ScheduleTrialLiveClassLeft__wmVa1",ScheduleTrialLiveClassNew:"LiveVideo_ScheduleTrialLiveClassNew__3gH-D",ScheduleTrialLiveClassArrow:"LiveVideo_ScheduleTrialLiveClassArrow__AIgpH",TrialEmblem:"LiveVideo_TrialEmblem__IqArr",TrialEmblemLeft:"LiveVideo_TrialEmblemLeft__1lobs",TrialEmblemLeftImage:"LiveVideo_TrialEmblemLeftImage__2sZz8",liveModalToggleContainer:"LiveVideo_liveModalToggleContainer__3q4w8",liveModalToggleOn:"LiveVideo_liveModalToggleOn__1m4Vv",liveModalToggleOff:"LiveVideo_liveModalToggleOff__1DlOZ",modalInputContainer:"LiveVideo_modalInputContainer__1OnNl",modalInputClear:"LiveVideo_modalInputClear__3YdMF",forceCloseLiveClassHeader:"LiveVideo_forceCloseLiveClassHeader__2_lF3",forceCloseLiveClassBody:"LiveVideo_forceCloseLiveClassBody__1XHE4",forceCloseLiveClassBodyText1:"LiveVideo_forceCloseLiveClassBodyText1__2rPRK",forceCloseLiveClassBodyText2:"LiveVideo_forceCloseLiveClassBodyText2__3ojN5",forceCloseLiveClassBodyBtn:"LiveVideo_forceCloseLiveClassBodyBtn__34CTZ",downloadBtn:"LiveVideo_downloadBtn__3gnuM",selectFolderContainer:"LiveVideo_selectFolderContainer__1751d",folderSelectContainer:"LiveVideo_folderSelectContainer__3W62L",newTag:"LiveVideo_newTag__3q6Ky",dropDown:"LiveVideo_dropDown__2zf_0"}}
1,1071:function(e,t,a){"use strict";a.d(t,"b",(function(){return l})),a.d(t,"a",(function(){return c}));var s=a(369),i=a(8),n=a.n(i),o=a(1291);const l=s.c.button` 2 display: inline-block; 3 border: none; 4 background-color: transparent; 5 cursor: pointer; 6 font-style: normal; 7 font-weight: 500; 8 outline: none; 9 line-height: 1.9rem; 10 color: ${e=>"success"===e.color?o.a.success:"primary"===e.color?o.a.primary:"secondary"===e.color?e.secondary:"danger"===e.color?o.a.danger:e.color?e.color:"#000"}; 11 font-size: ${e=>e.medium?"1.4rem":e.small?"1.2rem":e.fontSize?e.fontSize:"1.6rem"}; 12 13 &:hover { 14 ${e=>e.disabled?"":"filter: brightness(94%);"} 15 } 16`;l.propTypes={colors:n.a.oneOf([...Object.keys(o.a),n.a.string])},l.defaultProps={color:"primary"};const c=Object(s.c)(l)` 17 border-radius: 0.4rem; 18 padding: 0.8rem; 19 min-width: 10rem; 20 text-align: center; 21 ${e=>{let t=o.a[e.color];return e.inverted?{border:"0.1rem solid "+(t||e.color),color:t||e.color}:{border:"0.1rem solid "+(t||e.color),color:"#fff",background:t||e.color}}}; 22`;c.defaultProps={...l.defaultProps}},1110:function(e,t,a){"use strict";var s=a(1),i=a.n(s),n=a(47),o=a(140),l=a(1028),c=a(459),r=a(1126),d=a.n(r),m=a(1143),u=a.n(m),h=a(67),p=a(38),v=a(2780);class g extends i.a.Component{constructor(e){super(e),this.getCourseLinkModal=()=>{let{t:e}=this.props;return i.a.createElement("div",null,i.a.createElement(n.m,{icon:"warning sign",content:e("components.custom.editDeleteModal.header","Batch cannot be removed."),className:"modalDiv"}),i.a.createElement(n.u.Content,{className:"modalDiv"},e("components.custom.content","This batch cannot be removed as it is linked to one of more online courses. Please unlink this batch from all the courses before removing.")),i.a.createElement(n.u.Actions,{style:{padding:"1rem"}},i.a.createElement(n.b,{primary:!0,onClick:this.handleClose,style:{float:"right",marginBottom:"1rem"}},e("components.custom.okay","Okay"))))},this.showCourseLinkModal=()=>{const{showCourseLinkModal:e}=this.props;return"function"===typeof e&&e()},this.getDeleteConfirmation=()=>{const{headerContent:e,modalContent:t,dropdownText:a="Remove",t:s}=this.props;return i.a.createElement("div",null,i.a.createElement(n.m,{icon:"warning sign",content:e,className:"modalDiv"}),i.a.createElement(n.u.Content,{className:"modalDiv"},t),i.a.createElement(n.u.Actions,{style:{padding:"1rem"}},i.a.createElement(n.b,{primary:!0,onClick:this.handleDelete,style:{float:"right",marginBottom:"1rem"}},a),i.a.createElement(n.b,{onClick:this.handleClose,style:{float:"right",marginBottom:"1rem"}},s("components.custom.editDeleteModal.close","Close"))))},this.state={modalOpen:!1},this.handleDelete=this.handleDelete.bind(this),this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this)}handleClose(){this.setState({modalOpen:!1}),this.props.cancelAction&&this.props.cancelAction()}handleOpen(e){"Remove Batch"===e&&Object(h.a)(p.W);const{permissions:t}=this.props,a=t&&t.ownerPremiumStatus;if(null==this.props.permissions)this.setState({modalOpen:!0});else if(!a)return this.props.showPremiumExpiryModal(!0);this.setState({modalOpen:!0})}async handleDelete(){let{dropdownText:e}=this.props;if(this.props.deleteEvent){"success"===(await this.props.deleteAction()).status&&(this.setState({modalOpen:!1}),this.props.resetOffset(),this.props.fetchEvents())}else"Remove Batch"===e&&Object(h.a)(p.U),this.setState({modalOpen:!1}),this.props.deleteAction()}render(){const{dropdownText:e="Remove",isDeleteTest:t,inactiveIcon:a,t:s}=this.props;return i.a.createElement(n.u,{onOpen:this.props.onOpen,trigger:i.a.createElement(n.h.Item,{onClick:this.handleOpen.bind(this,e),className:""},i.a.createElement("div",{className:"flexrow alignCenter"}," ",i.a.createElement("img",{src:a?u.a:d.a,alt:"SVGDelete",className:"mrighthalfrem"}),i.a.createElement("span",null," ",t?s("components.custom.editDeleteModal.remove","Remove"):e))),open:this.state.modalOpen,onClose:this.handleClose,size:"tiny"},this.showCourseLinkModal()&&this.getCourseLinkModal()||this.getDeleteConfirmation())}}t.a=Object(l.a)(Object(o.connect)(void 0,{showPremiumExpiryModal:c.c})(Object(v.a)()(g)))},1126:function(e,t,a){e.exports=a.p+"static/media/deleteBatch.dea37fba.svg"},1130:function(e,t,a){e.exports=a.p+"static/media/backArrow.dd0baef1.svg"},1143:function(e,t,a){e.exports=a.p+"static/media/inactiveIcon.5d594c8c.svg"},1160:function(e,t,a){e.exports=a.p+"static/media/editpencil.78cb85bc.svg"},1169:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var s=a(1036),i=a.n(s),n=a(1),o=a.n(n),l=a(1024),c=a.n(l);function r(e){let{status:t,headerText:a,bodyText:s,onClose:n,action:l,actionButtonText:r,disableActionBtn:d}=e;return t?o.a.createElement("div",{id:"myModal",className:i.a.modal},o.a.createElement("div",{style:{width:"50rem"},className:i.a.modalContent},o.a.createElement("div",{className:i.a.Header},o.a.createElement("div",{className:i.a.HeaderText},a),o.a.createElement("div",null,o.a.createElement("img",{className:"cursorPointer",onClick:n,src:c.a,width:"16px",height:"16px"}))),o.a.createElement("div",{style:{fontSize:"16px"},className:"p-3"},s),o.a.createElement("div",{className:i.a.goLiveModalFooter,style:{justifyContent:"flex-end"}},o.a.createElement("button",{onClick:l,className:i.a.goLiveModalButton,disabled:d},r)))):""}},1177:function(e,t,a){e.exports=a.p+"static/media/clockArchive.971b35cb.svg"},1178:function(e,t,a){"use strict";a.d(t,"a",(function(){return i})),a.d(t,"d",(function(){return n})),a.d(t,"c",(function(){return o}
22)),a.d(t,"f",(function(){return l})),a.d(t,"e",(function(){return c})),a.d(t,"b",(function(){return r})),a.d(t,"g",(function(){return d}));var s=a(171);function i(e){return{type:s.a,payload:e}}function n(e){return{type:s.c,students:e}}function o(e){return{type:s.d,studentRequests:e}}function l(e){return{type:s.g,addStudentModeModalStatus:e}}function c(e){return{type:s.h,addStudentManuallyModalStatus:e}}function r(e){return{type:s.b,students:e}}function d(e){return{type:s.f,fetchingStudentsStatus:e}}},1186:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAJCAYAAAALpr0TAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACMSURBVHgBdY+9CYRAEIXnuBaugOM8Y3uwAWMDYzPFVBDtwMRcC7AGSzA3FAuwAn+e8BZkWAe+YHY/Zt6IiPxAJvbyQGKaEGwgV9I1YAbt/dGnXLJ3KPXgpddEYAU1pc4mmUrBAUbwfpJcThoYo7JJjlpnYpSirltAo9YFnFwIP/7gA2Kw38SJWb9XnBMoEBvpTwIPkAAAAABJRU5ErkJggg=="},1228:function(e,t,a){"use strict";var s=a(1),i=a.n(s),n=a(8),o=a.n(n),l=a(1344),c=a.n(l);function r(e){let{type:t,parentClassName:n,onSearch:o,inputProps:l,searchDebounceTime:r,value:d,placeholder:m,onClick:u}=e,[h,p]=Object(s.useState)(d);return r=isNaN(r)?300:r,Object(s.useEffect)(()=>{if(-1===r)return;let e=setTimeout(()=>o(h),r);return()=>clearTimeout(e)},[r,h]),i.a.createElement("div",{className:n+" "+c.a.Container+" "+c.a[t],onClick:u},i.a.createElement("input",Object.assign({type:"text",className:c.a.Input,placeholder:"string"===typeof m?m:"Search"},l,{value:h,onChange:e=>{p(e.target.value)},onKeyPress:-1===r?e=>{"Enter"===e.code&&o(h)}:void 0})),i.a.createElement("img",{src:a(1345),alt:"",className:c.a.SearchIcon}))}r.prototypes={type:o.a.oneOf(["Transparent","WithWhiteBG"]).isRequired,onSearch:o.a.func.isRequired,parentClassName:o.a.string,inputProps:o.a.object,searchDebounceTime:o.a.number,placeholder:o.a.string},t.a=r},1229:function(e,t,a){"use strict";var s=a(1036),i=a.n(s),n=a(1),o=a.n(n),l=a(1024),c=a.n(l),r=a(1720),d=a.n(r),m=a(151),u=a(253),h=a(140),p=a(5),v=a(2249),g=a(1169),b=a(464),C=a(91),S=a(462);t.a=Object(h.connect)(null,{makeApiCall:m.b,saveBatchOverview:b.d,setActiveCourseDetails:S.d})((function(e){let{onClose:t,state:a,makeApiCall:s,type:l,batchCode:r,courseId:m,...h}=e;const[b,S]=Object(n.useState)(!1),{t:E}=Object(v.a)(),f=Object(n.useCallback)(()=>{S(!1),p.toastr.success(E("components.liveVideo.ForceCloseLiveClassModal.toastr.successHeading","Success"),E("components.liveVideo.ForceCloseLiveClassModal.toastr.successMess","Live session force closed successfully")),t()},[t]);function y(){if(b)return;S(!0);const{url:e,method:t}=Object(u.l)("forceCloseSession",null,{});s(e,t,void 0,()=>{a.showThreeDotMenuModal?l==C.b.BATCH?Object(u.g)(r,f,()=>S(!1)):Object(u.h)(m,f,()=>S(!1)):f()},()=>S(!1))}return a?a.showThreeDotMenuModal?o.a.createElement(g.a,{status:!0,headerText:E("components.LiveVideo.ForceCloseLiveClassModal.headerText1","End Live Class"),bodyText:E("components.LiveVideo.ForceCloseLiveClassModal.bodyText1","Are you sure you want to end this live session?"),onClose:t,action:y,actionButtonText:E("components.LiveVideo.ForceCloseLiveClassModal.cta1","Yes"),disableActionBtn:b}):o.a.createElement("div",{id:"myModal",className:i.a.modal},o.a.createElement("div",{style:{width:"560px"},className:i.a.modalContent},o.a.createElement("div",{className:i.a.Header+" "+i.a.forceCloseLiveClassHeader},o.a.createElement("div",{className:i.a.HeaderText}),o.a.createElement("div",null,o.a.createElement("img",{className:"cursorPointer",onClick:t,src:c.a,width:"16px",height:"16px"}))),o.a.createElement("div",{className:i.a.forceCloseLiveClassBody},o.a.createElement("img",{src:d.a,alt:""}),o.a.createElement("div",{className:i.a.forceCloseLiveClassBodyText1},a.headingText),o.a.createElement("div",{className:i.a.forceCloseLiveClassBodyText2},a.alertString),o.a.createElement("button",{className:i.a.goLiveModalButton+" "+i.a.forceCloseLiveClassBodyBtn,disabled:b,onClick:y},a.buttonText)))):null}))},1243:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));const s=`https://${a(152).a}-cloudn.classplus.co/web/bannerAssests/`},1244:function(e,t,a){e.exports=a.p+"static/media/roundTick.e3e93fb3.svg"},1250:function(e,t,a){e.exports=a.p+"static/media/remove.13965d7f.svg"},1271:function(e,t,a){"use strict";a.d(t,"a",(function(){return O}));var s=a(1),i=a.n(s),n=a(1243),o=(a(1706),a(1244),a(47)),l=a(1707),c=a.n(l),r=a(1708),d=a.n(r),m=a(1709),u=a.n(m),h=a(1710),p=a.n(h),v=a(1711),g=a.n(v),b=i.a.memo((function(e){return i.a.createElement("div",{className:g.a.SearchForm+" SearchForm"},i.a.createElement("img",{src:a(1712)}),i.a.createElement("form",{autoComplete:"off",onSubmit:e=>e.preventDefault()},i.a.createElement("input",{className:g.a.searchButton,placeholder:e.placeholder?e.placeholder:"Search",onChange:e.onChange,onClick:e.onClick?e.onClick:()=>{},type:"text",value:e.value})))})),C=a(1023),S=a.n(C),E=a(1713),f=a.n(E),y=a(179);
22const w=n.a+"Close.svg",A=async(e,t,a,s)=>{let i;"fromListing"===s?(i=await Object(y.f)({id:e,folderId:t}),a({courseContent:i.data.data})):(i=await Object(y.d)({courseId:e,folderId:t}),a({courseContent:i.data.data.folderDetailsResult}))},M=e=>{let{item:t,type:a,selectedCourse:n,setSelectedCourse:o,setFolderName:l,setFolderData:c,setCourseId:r,courseId:d,isFolder:m,setCourseFolderId:u,isGlobalFolderList:h,setFolders:p,setGlobalFolderName:v,navigation:g,setNavigation:b,isFirst:C,setIsFirst:S,setGlobalFolderId:E}=e;return Object(s.useEffect)(()=>{console.log(g,"navigation")},[g]),i.a.createElement("div",{className:"ModalContainer__Modal__Body__ItemContainer"},i.a.createElement("div",{className:"ModalContainer__Modal__Body__ItemContainer-item"},i.a.createElement("label",{style:{display:"flex",cursor:"pointer"}},i.a.createElement("input",{style:{marginRight:"20px"},type:a,value:t.id||t.folderId,checked:"radio"===a?t.id?t.id===n:t.folderId===n:n.includes(t.folderId),onChange:()=>{if("radio"===a)v&&v(t.folderName),o(t.id||t.folderId),E(t.folderId),r(t.id||t.courseId);else if(o){const e=[...n];e.includes(t.folderId)?o(e.filter(e=>e!==t.folderId)):o([...e,t.folderId])}}})," ",i.a.createElement("div",null,(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t?void 0:t.folderName)))),i.a.createElement("div",{style:{cursor:"pointer"}},0!==t.hasSubFolders&&"radio"===a&&i.a.createElement("img",{src:f.a,onClick:()=>{S(!0),h?(b([...g,{folderId:t.folderId,name:t.folderName,isfromListing:!1}]),m?(l(t.folderName),A(d,t.folderId,c),u(t.folderId)):(r(t.folderId),A(d,t.folderId,c),l(t.folderName))):(b([...g,{folderId:t.folderId,name:t.name,isfromListing:!0,courseId:t.courseId}]),m?(l(t.name),A(d||t.courseId,t.id||t.folderId,c,"fromListing"),u(t.id)):(r(t.id),A(t.id||t.courseId,t.folderId,c,"fromListing"),l(t.name)))}})))};function O(e){var t,a,n,l;let{title:r,body:m,body2:h,acceptText:v,rejectText:g,acceptAction:C,rejectAction:E,crossAction:f,infoLabelText:y,searchBarPlaceholder:O,type:_="radio",count:L=0,name:B,selectedCourse:D,setSelectedCourse:N,fetchData:x,courseList:T,isGlobalFolderList:j=!1,setFolders:I,setGlobalFolderName:k,hasMore:F=!0,setHasMore:V,optionsArray:R,selectedOption:H=0,changeSelectedOption:G,globalFolderName:P,globalFolderNameFunc:U,clearCourseList:Y,linkMultipleFolders:z,selectedGlobalFolders:Z,isGoLive:W=!0,selectedCourses:q=[]}=e;const[$,Q]=Object(s.useState)(0),[X,K]=Object(s.useState)(20),[J,ee]=Object(s.useState)(""),[te,ae]=Object(s.useState)(""),[se,ie]=Object(s.useState)([]),[ne,oe]=Object(s.useState)(""),[le,ce]=Object(s.useState)(0),[re,de]=Object(s.useState)(0),[me,ue]=Object(s.useState)([]),[he,pe]=Object(s.useState)(!1);Object(s.useEffect)(()=>{ie(T)},[T]),((e,t,a)=>{const s=i.a.useCallback(e,a);i.a.useEffect(()=>{const e=setTimeout(()=>s(),t);return()=>clearTimeout(e)},[s,t])})(()=>{Q(0),x({offset:$,limit:X,search:J,isBack:!0}),pe(!0)},500,[J]),Object(s.useEffect)(()=>{console.log(me,"navigation")},[me]);const ve=()=>{null!==Z&&void 0!==Z&&Z.length?z(ne,le,0,Z):C(ne,0,re)};return i.a.createElement("div",{className:"ModalContainer",style:{background:"rgba(0,0,0,0.6)",display:"grid",placeItems:"center",position:"fixed",top:"0",left:"0",width:"100vw",height:"100vh",zIndex:"9000"}},i.a.createElement("div",{className:"ModalContainer__Modal"},i.a.createElement("div",{className:"ModalContainer__Modal__Top",style:{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row"}},i.a.createElement("div",{className:"ModalContainer__Modal__Top--Label"},i.a.createElement("img",{src:c.a,style:{paddingRight:"12px",cursor:"pointer"},onClick:E})," ",r),i.a.createElement("div",{style:{display:"flex",flexDirection:"row"}},i.a.createElement("div",{style:{marginRight:"35px",color:"#009AE0",fontWeight:"500",cursor:"pointer"},onClick:()=>{ae(""),N(""),ee(""),k("")}},"CLEAR"),i.a.createElement("div",{className:"ModalContainer__Modal__Top--Close",onClick:f||E,style:{right:"26px",top:"28px"}},i.a.createElement("img",{src:w,alt:""})))),(null===R||void 0===R?void 0:R.length)>0&&i.a.createElement("div",{className:"ModalContainer__Modal__optionsArray"},R.map(e=>i.a.createElement("div",{key:e.id,className:"ModalContainer__Modal__option"},i.a.createElement("input",{id:e.id,type:"radio",checked:e.id===H,className:"ModalContainer__Modal__option__input",onChange:()=>G(e.id)}),i.a.createElement("label",{className:"ModalContainer__Modal__option__label",htmlFor:e.id},e.name)))),0===H?i.a.createElement("div",null,i.a.createElement(b,{placeholder:O,onChange:e=>{ee(e.target.value)},value:J})):null,(null===se||void 0===se||null===(t=se.courseContent)||void 0===t?void 0:t.length)>0||(null===T||void 0===T?void 0:T.length)>0&&0===H?i.a.createElement(i.a.Fragment,null,y&&i.a.createElement("div",{className:"ModalContainer__Modal__infoLabel"},i.a.createElement("img",{src:u.a,style:{marginRight:"10px",marginLeft:"10px"}}),y),i.a.createElement("div",{className:"ModalContainer__Modal__Body",style:{background:"white"}},i.a.createElement("div",{style:{fontWeight:"500",fontSize:"16px",borderBottom:"1px solid #E5E5E5",paddingBottom:"8px"}},i.a.createElement("div",{style:{display:"flex",alignItems:"center"}},i.a.createElement("img",{src:p.a,style:{cursor:"pointer"},onClick:()=>{(e=>{if(Q(0),de(""),ce(""),N(""),k(""),pe(!1),me.length>0){let e="",t="",a=!1,s="";if(he&&me.length>=2){let i=[...me];i.pop();let n=i.pop();e=null===n||void 0===n?void 0:n.folderId,t=null===n||void 0===n?void 0:n.name,a=null===n||void 0===n?void 0:n.isfromListing,s=null===n||void 0===n?void 0:n.courseId,ue(i),pe(!0)}else{if(me.length>=1){let i=[...me],n=i.pop();return e=null===n||void 0===n?void 0:n.folderId,t="",a=null===n||void 0===n?void 0:n.isfromListing,s=null===n||void 0===n?void 0:n.courseId,ue(i),pe(!0),V&&V(!0),void x({offset:0,limit:X,search:J,isBack:!0})}{let i=[...me],n=i.pop();e=null===n||void 0===n?void 0:n.folderId,t=null===n||void 0===n?void 0:n.name,a=null===n||void 0===n?void 0:n.isfromListing,s=null===n||void 0===n?void 0:n.courseId,ue(i),pe(!0)}}a?A(s,e,ie,"fromListing"):A(ne,e,ie),ae(t)}else V&&V(!0),x({offset:0,limit:X,search:J,isBack:!0}),Y&&Y(),ae("")}
22)()}})," ",(null===(a=me[(null===me||void 0===me?void 0:me.length)-1])||void 0===a?void 0:a.name)||te||B,"\xa0",i.a.createElement("span",{style:{fontWeight:"400",color:"#00000099"}}))),null!==se&&void 0!==se&&se.courseContent?i.a.createElement(S.a,{dataLength:null===se||void 0===se?void 0:se.courseContent.length,hasMore:!1,loader:0!==(null===se||void 0===se||null===(n=se.courseContent)||void 0===n?void 0:n.length)&&i.a.createElement(o.k,{centered:!0},i.a.createElement(o.k.Column,{stretched:!0,width:10},i.a.createElement(o.r,{active:!0,inline:"centered"}))),height:"35vh"},null===se||void 0===se||null===(l=se.courseContent)||void 0===l?void 0:l.map((e,t)=>i.a.createElement(M,{type:_,selectedCourse:D,setSelectedCourse:N,item:e,setGlobalFolderName:k,key:t,setFolderName:ae,setFolderData:ie,setCourseId:oe,isFolder:!0,setCourseFolderId:de,setGlobalFolderId:ce,courseId:ne,isGlobalFolderList:j,setFolders:I,setNavigation:ue,navigation:me,isFirst:he,setIsFirst:pe}))):i.a.createElement(S.a,{dataLength:L,next:()=>{Q($+X),x({offset:$+20,limit:X,search:J,isScroll:!0})},hasMore:F,loader:0!==(null===T||void 0===T?void 0:T.length)&&i.a.createElement(o.k,{centered:!0},i.a.createElement(o.k.Column,{stretched:!0,width:10},i.a.createElement(o.r,{active:!0,inline:"centered"}))),height:"35vh"},null===T||void 0===T?void 0:T.map((e,t)=>i.a.createElement(M,{type:_,selectedCourse:D,setSelectedCourse:N,item:e,setGlobalFolderName:k,key:t,setFolderName:ae,setFolderData:ie,isFolder:!1,courseId:ne,setCourseId:oe,setCourseFolderId:de,setGlobalFolderId:ce,isGlobalFolderList:j,setFolders:I,setNavigation:ue,navigation:me,isFirst:he,setIsFirst:pe})))),i.a.createElement("div",{className:"Confirmation__Modal__Bottom",style:{background:"white"}},i.a.createElement("button",{className:"Confirmation__Modal__Bottom--Accept",style:D?{}:{backgroundColor:"#E5E5E5"},onClick:ve,disabled:1===H&&""===P},v))):1===H?i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:"ModalContainer__Modal__newFolderOption"},i.a.createElement("div",{className:"ModalContainer__Modal__newFolderOption__heading"},"Folder name"),i.a.createElement("input",{className:"ModalContainer__Modal__newFolderOption__input",placeholder:"Enter Folder Name",value:P,onChange:e=>U(e.target.value)})),i.a.createElement("div",{className:"Confirmation__Modal__Bottom",style:{background:"white"}},i.a.createElement("button",{className:`Confirmation__Modal__Bottom--Accept ${""===P&&"ModalContainer__Modal__Bottom--disabled"} `,onClick:ve,disabled:""===P},v))):i.a.createElement("div",{className:"ModalContainer__emptyState"},i.a.createElement("img",{src:d.a,className:"ModalContainer__emptyState__image"}),i.a.createElement("p",{className:"ModalContainer__emptyState__Text"},W?"No global folder is linked with the selected courses you want to go live in.":"No global folders found matching your search keyword."))))}},1290:function(e,t,a){e.exports={modalBody:"ScheduleContentModal_modalBody__1JxRz",modalFooter:"ScheduleContentModal_modalFooter__a5-yj",modalFooterBtn:"ScheduleContentModal_modalFooterBtn__1gNss",modalFooterSecondaryBtn:"ScheduleContentModal_modalFooterSecondaryBtn__2gnZd",inputLabel:"ScheduleContentModal_inputLabel__3t-3_",inputCont:"ScheduleContentModal_inputCont__1aUDL",inputContError:"ScheduleContentModal_inputContError__30858",datePicker:"ScheduleContentModal_datePicker__nSlwy",flexbox1:"ScheduleContentModal_flexbox1__2N2XH",flexbox1Gap:"ScheduleContentModal_flexbox1Gap__Vl68E"}},1291:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));const s={primary:"#009AE0",secondary:"rgba(0,0,0,0.6)",tertiary:"rgba(0,0,0,0.87)",danger:"#FF4058",success:"#52B062"}},1343:function(e,t,a){"use strict";var s=a(1),i=a.n(s),n=a(47),o=a(151),l=a(140),c=a(457),r=a.n(c),d=a(1228),m=a(1024),u=a.n(m),h=a(1130),p=a.n(h),v=a(1023),g=a.n(v),b=a(2249),C=(a(1953),a(165)),S=a(91),E=a(1954),f=a.n(E),y=a(5);const w=a(14).a.t("components.LiveVideo.SelectCourseModal.only","only");const A=e=>{let{course:t,handleSelectedCourseArray:a,key:s,CurrentselectedCourseArray:o,entityId:l,orgDetails:c,showSubscribersCount:r}=e,d=o.map(e=>e.courseId).includes(t.courseId);return i.a.createElement("div",{className:"CourseTab__List__Item courseCardLive",key:s,onClick:()=>{t.courseId!=l&&a(t)},style:{background:t.courseId==l?"#ECECEC":"#FFF",margin:"8px 0",padding:"12px 8px",borderBottom:"none"}},i.a.createElement(n.d,{onChange:()=>{a(t)},checked:d,disabled:t.courseId==l}
22),i.a.createElement("span",{style:{marginLeft:"16px"}},t.name,t.subscribers&&r&&12566!=(null===c||void 0===c?void 0:c.id)&&4966!=(null===c||void 0===c?void 0:c.id)?`(${t.subscribers})`:""))};t.a=r()(Object(l.connect)(e=>{var t;return{persistedData:e.persistedData,orgDetails:null===e||void 0===e||null===(t=e.persistedData)||void 0===t?void 0:t.organization}},{makeApiCall:o.b})((function(e){let{makeApiCall:t,toggleCourseModal:a,entityId:o,previousSelectedCourseArray:l,setDisplaySelectedCourseArray:c,setStudentNumber:r,setCourseMaxStudentNumber:m,orgDetails:h,entityType:v,headerText:E,searchPlaceholderText:M,maxSelection:O,from:_}=e;const{t:L}=Object(b.a)();let[B,D]=Object(s.useState)([]);const[N,x]=Object(s.useState)(0);let[T,j]=Object(s.useState)(0);const[I,k]=Object(s.useState)(!0),[F,V]=Object(s.useState)(!0),[R,H]=Object(s.useState)(""),[G,P]=Object(s.useState)(!1),U=Object(s.useMemo)(()=>v===S.b.BATCH?L("components.LiveVideo.SelectCourseModal.batches","batches"):L("components.LiveVideo.SelectCourseModal.courses","courses"),[]),[Y,z]=Object(s.useState)(l);let Z=l&&l.map(e=>e.courseId),W=B&&B.filter(e=>Z&&-1==Z.indexOf(e.courseId)),q=[...l,...W];Object(s.useEffect)(()=>{if(l.length>=1){let e=q.filter(e=>1==e.isSelected),t=Y&&Y.filter(e=>Z&&-1==Z.indexOf(e.courseId));z([...e,...t])}},[B]);let $=Y.map(e=>e.courseId);const Q=e=>{let t;$.includes(e.courseId)?t=Y.filter(t=>t.courseId!=e.courseId):O&&$.length===O?y.toastr.warning(`${L("components.LiveVideo.SelectCourseModal.maxSelectionToast.titleToomany","Too many")} ${U}`,`${L("components.LiveVideo.SelectCourseModal.maxSelectionToast.messageYoucansel","You can select")} ${O} ${U} ${w}`):t=[...Y,e],t&&z(t)},X=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";k(!0),0==e&&(T=e);let s=l&&l.length>=1?l.map(e=>e.courseId):o;t(v===S.b.BATCH?`v3/batches/getLiveSessionBatches?batchId=${o}&limit=20&offset=${T}${a?"&search="+a:""}`:`/v2/courses/list?offset=${T}&sortOrder=1&selectedCourses=[${s}]&search=${a}`,"GET",void 0,e=>{let{list:t,showStudentCount:a}=e.data;const s=v===S.b.BATCH?Object(C.o)(t):t;D(0==T?s:[...B,...s]),j(T+20),V(t.length>19),x(t.length),P(void 0===a||a),k(!1)},()=>{k(!1)})};let K=Y.map(e=>({courseId:e.courseId,isSelected:1,name:e.name,subscribers:e.subscribers})),J=Y.reduce((e,t)=>e+t.subscribers,0);return i.a.createElement("div",{className:"SelectCourse"},i.a.createElement("div",{className:"SelectCourse__Modal"},i.a.createElement("div",{className:"SelectCourse__Modal__Top"},i.a.createElement("div",{className:"SelectCourse__Modal__Top__Left"},i.a.createElement("div",{className:"SelectCourse__Modal__Top__Left--Back",onClick:a},i.a.createElement("img",{src:p.a,alt:"<-"})),i.a.createElement("div",{className:"SelectCourse__Modal__Top__Left--Label"},E)),i.a.createElement("div",{className:"SelectCourse__Modal__Top__Right",onClick:a},i.a.createElement("img",{src:u.a,alt:"x"}))),O?i.a.createElement("div",{className:f.a.bodyLabel1},`${L("components.LiveVideo.SelectCourseModal.Youcanselmaxof","You can select maximum of")} ${O} ${U} ${w}`):null,i.a.createElement("div",{className:"SelectCourse__Modal__Search"}," ",i.a.createElement(d.a,{value:R,onSearch:e=>{(e=>{H(e),j(0),X(0,e)})(e)},type:"Transparent",placeholder:M,searchDebounceTime:300,parentClassName:"BannerCourseSearchClass"})),i.a.createElement("div",{className:"SelectCourse__Modal__Body"},q&&0==q.length?I?i.a.createElement(n.k,{centered:!0},i.a.createElement(n.k.Column,{stretched:!0,width:10},i.a.createElement(n.r,{active:!0,inline:"centered"}))):i.a.createElement("div",{className:"CourseTab__List__Blank"},L("components.liveVideo.selectCourseModal.noCourse","No Courses Found")):i.a.createElement(g.a,{next:()=>{X(T,R)},hasMore:F,dataLength:B.length,loader:I&&i.a.createElement(n.k,{centered:!0},i.a.createElement(n.k.Column,{stretched:!0,width:10},i.a.createElement(n.r,{active:!0,inline:"centered"}))),height:"40vh",style:{overflowX:"hidden",zIndex:"1000"}},i.a.createElement("div",{className:"seeMoreModalGrid"},q&&q.map((e,t)=>i.a.createElement(A,{CurrentselectedCourseArray:Y,course:e,key:t,handleSelectedCourseArray:Q,entityId:o,orgDetails:h,showSubscribersCount:"zoom"===_||G}))))),i.a.createElement("div",{className:"SelectCourse__Modal__Bottom"},i.a.createElement("button",{onClick:()=>{c(K),r&&r(J),m&&m(J),a()}},L("components.liveVideo.selectCourseModal.done","Done")))))})))},1344:function(e,t,a){e.exports={Container:"Search_Container__2LJSv",Input:"Search_In
22put__2UN2r",SearchIcon:"Search_SearchIcon__F2XTN",Transparent:"Search_Transparent__7ItNg",isSearching:"Search_isSearching__f4vMx"}},1345:function(e,t,a){e.exports=a.p+"static/media/searchIcon.62c28755.svg"},1346:function(e,t,a){},1347:function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var s=a(1),i=a.n(s),n=a(2249),o=a(57),l=a(1036),c=a.n(l),r=a(1380),d=a.n(r),m=a(1956),u=a.n(m);const h=e=>{let{selectedEntities:t,showAddMoreBtn:a,onAddMoreEntities:s,addMoreEntitiesText:l,numberOfEntitiesToDisplay:r}=e,{t:m}=Object(n.a)();const u=t&&t.slice(0,r),h=t.length-r;return i.a.createElement("div",{className:c.a.selectedCoursesArea},i.a.createElement("div",{className:c.a.selectedCoursesList},u&&u.map((e,a)=>i.a.createElement("div",{style:{whiteSpace:"nowrap",marginRight:"3px"},key:a},o.i.getShortenedSubstring(e&&e.name,15),t.length>1&&a!=t.length-1?", ":""))),a&&i.a.createElement("div",{onClick:s},h>0?i.a.createElement("div",{style:{width:"60px"},className:c.a.addMore},"+",h," ",m("components.LiveVideo.goLiveModalCourse.more","More")):i.a.createElement("div",{className:c.a.addMore},i.a.createElement("img",{src:d.a,alt:""})," ",l)))};t.b=function(e){let{studentNumber:t,displaySelectedCourseArray:a,showAddMoreBtn:s,toggleCourseModal:o,orgDetails:l,numberOfCoursesToShow:r}=e,{t:d}=Object(n.a)();return i.a.createElement("div",{className:c.a.multipleCourseLive},i.a.createElement("div",{className:c.a.goLiveModalTitle},d("components.LiveVideo.goLiveModalCourse.goLiveSubheading","Go Live for Courses")),i.a.createElement(h,{selectedEntities:a,showAddMoreBtn:s,addMoreEntitiesText:d("components.LiveVideo.goLiveModalCourse.addMore","Add more Courses"),onAddMoreEntities:o,numberOfEntitiesToDisplay:r}),t&&12566!=(null===l||void 0===l?void 0:l.id)&&4966!=(null===l||void 0===l?void 0:l.id)&&437641!=(null===l||void 0===l?void 0:l.id)?i.a.createElement("div",{className:c.a.studentCount},i.a.createElement("img",{src:u.a,alt:""})," ",d("components.LiveVideo.goLiveModalCourse.goingLive","You will be going live for")," ",t," ",d("components.LiveVideo.goLiveModalCourse.students"," students!")):null)}},1357:function(e,t,a){e.exports=a.p+"static/media/zoom.9fb0a0c3.svg"},1370:function(e,t,a){"use strict";var s=a(1),i=a.n(s),n=a(177),o=a(1062),l=a(1061),c=a(1088),r=a(47),d=a(1021),m=a(132),u=a(163),h=a(14),p=a(2289),v=a(2249);const g=e=>{let{entityToAdd:t,allowAddMultiple:a,fields:s,numberDisabled:o,saveUserInfoType:l}=e;return i.a.createElement("div",null,i.a.createElement(r.k,{style:{maxHeight:"50vh",overflow:"auto"}},s.map((e,a)=>i.a.createElement(i.a.Fragment,null,i.a.createElement(r.k.Row,{style:{paddingTop:"0em"},key:a},i.a.createElement(r.k.Column,{computer:s.length>1?"7":"8"},i.a.createElement(n.a,{component:u.a,fluid:!0,name:e+".name",type:"text",size:"mini"})),i.a.createElement(r.k.Column,{computer:"7",style:{paddingRight:"0"}},i.a.createElement(n.a,{component:u.a,fluid:!0,disabled:o,name:e+".mobile",type:"text",size:"mini"})),s.length>1&&i.a.createElement(r.k.Column,{computer:"1"},i.a.createElement(r.n,{color:"grey",link:!0,name:"close",onClick:()=>s.remove(a)}))),i.a.createElement(r.k.Row,{columns:2,style:{margin:"0",padding:"0"}},i.a.createElement(r.k.Column,null,i.a.createElement("div",{style:{fontSize:"0.9em",opacity:"0.6",display:"block",marginBottom:"8px"}},t," ",h.a.t("components.custom.nameNumberForm.email","Email"),1===l||2===l?" *":""),i.a.createElement(n.a,{component:u.a,fluid:!0,name:e+".email",type:"text",size:"mini"})))))),a&&i.a.createElement(r.k,{onClick:()=>s.push(),style:{cursor:"pointer"}},i.a.createElement(r.k.Row,{centered:!0,verticalAlign:"middle"},i.a.createElement(r.k.Column,{width:"1"},i.a.createElement(r.n,{link:!0,name:"plus circle",size:"large"})),i.a.createElement(r.k.Column,{width:"5"},i.a.createElement(m.a,{fontSize:".9em"}," ",h.a.t("components.custom.nameNumberForm.another","Add Another")," ",t," ")))))};t.a=Object(c.a)({validate:(e,t)=>{const a=new RegExp(/^[a-zA-Z 0-9]+$/),{defaultLanguage:s}=t,i={};if(e.members&&e.members.length){const n=[];if(isNaN(t.saveUserInfoType)&&!t.addEmail)e.members.forEach((e,o)=>{const l={};
22e&&e.name&&!a.test(e.name)&&"en"==(null===s||void 0===s?void 0:s.toLowerCase())&&(l.name=h.a.t("components.custom.nameNumberForm.validation.text2",'Special characters are not allowed eg. "*,&,-^"'),n[o]=l),e&&e.name||(l.name=h.a.t("components.custom.nameNumberForm.validation.text3","Name is required"),n[o]=l),e&&/^[6789]\d{9}$/.test(e.mobile)||(l.mobile=h.a.t("components.custom.nameNumberForm.validation.text4","Must be a 10 digit mobile number"),n[o]=l),e&&(0===t.saveUserInfoType||e.email)||(l.email=h.a.t("components.custom.nameNumberForm.validation.text5","Email is required"),n[o]=l),n.length&&(i.members=n)});else{const o=new RegExp(t.mobileRegex);switch(t.saveUserInfoType){case 0:e.members.forEach((e,t)=>{const l={};e&&e.name&&!a.test(e.name)&&"en"==(null===s||void 0===s?void 0:s.toLowerCase())&&(l.name=h.a.t("components.custom.nameNumberForm.validation.text6",'Special characters are not allowed eg. "*,&,-^"'),n[t]=l),e&&e.name||(l.name=h.a.t("components.custom.nameNumberForm.validation.text7","Name is required"),n[t]=l),e&&o.test(e.mobile)||(l.mobile=h.a.t("components.custom.nameNumberForm.validation.text8","Invalid Mobile Number"),n[t]=l),n.length&&(i.members=n)});break;case 1:e.members.forEach((e,o)=>{const l={};e&&e.name&&!a.test(e.name)&&"en"==(null===s||void 0===s?void 0:s.toLowerCase())&&(l.name=h.a.t("components.custom.nameNumberForm.validation.text9",'Special characters are not allowed eg. "*,&,-^"'),n[o]=l),e&&e.name||(l.name=h.a.t("components.custom.nameNumberForm.validation.text10","Name is required"),n[o]=l),e&&(0===t.saveUserInfoType||e.email)||(l.email=h.a.t("components.custom.nameNumberForm.validation.text11","Email is required"),n[o]=l),n.length&&(i.members=n)});break;case 2:e.members.forEach((e,l)=>{const c={};e&&e.name&&!a.test(e.name)&&"en"==(null===s||void 0===s?void 0:s.toLowerCase())&&(c.name=h.a.t("components.custom.nameNumberForm.validation.text12",'Special characters are not allowed eg. "*,&,-^"'),n[l]=c),e&&e.name||(c.name=h.a.t("components.custom.nameNumberForm.validation.text13","Name is required"),n[l]=c),e&&o.test(e.mobile)||(c.mobile=h.a.t("components.custom.nameNumberForm.validation.text14","Invalid Mobile Number"),n[l]=c),e&&(0===t.saveUserInfoType||e.email)||(c.email=h.a.t("components.custom.nameNumberForm.validation.text15","Email is required"),n[l]=c),n.length&&(i.members=n)})}}}else i.members={_error:h.a.t("components.custom.nameNumberForm.validation.text1","At least one student must be entered")};return i},initialValues:{members:[{name:"",mobile:""}]},enableReinitialize:!0})(Object(p.a)((function(e){const{open:t,onClose:a,handleSubmit:s,invalid:n,submitting:c,modalHeader:u,allowAddMultiple:p,entityToAdd:b,buttonText:C,numberDisabled:S,addEmail:E,saveUserInfoType:f,canAddInternationalStudent:y,form:w,history:A}=e,{t:M}=Object(v.a)();return i.a.createElement(d.a,{size:"tiny",open:t,onClose:a},i.a.createElement(r.u.Header,{style:{borderRadius:"4px 4px 0px 0px"}},u),i.a.createElement(r.u.Content,{style:{marginBottom:"0",padding:"21px",height:"250px"}},"addCareTaker"===w?i.a.createElement("div",{style:{padding:"16px",backgroundColor:"rgba(0, 154, 224, 0.12)",borderRadius:"4px",marginBottom:"10px",textAlign:"center",fontSize:"12px"}},i.a.createElement("div",{style:{color:"black"}},M("Caretaker.incase1","In case you want to assign multiple roles to the same care taker you can do it from the settings section")),i.a.createElement("div",{style:{color:"#009AE0",cursor:"pointer",margin:"5px 0",textDecoration:"underline"},onClick:()=>A.push("/settings")},M("Caretaker.goToSettings","Go to Settings")," \u2192")):null,i.a.createElement(r.k,null,i.a.createElement(r.k.Row,null,i.a.createElement(r.k.Column,{computer:"8"},i.a.createElement(m.a,{fontSize:".9em",style:{color:"rgba(0, 0, 0, 0.87);"}},b," ",h.a.t("components.custom.nameNumberForm.name","Name *"))),i.a.createElement(r.k.Column,{computer:"8"},i.a.createElement(m.a,{fontSize:".9em",style:{color:"rgba(0, 0, 0, 0.87);"}},h.a.t("components.custom.nameNumberForm.mobile","Mobile Number")," ",0===f||2===f?" *":"")))),i.a.createElement(o.a,{onSubmit:s},i.a.createElement(l.a,{name:"members",component:g,numberDisabled:S,allowAddMultiple:p,entityToAdd:b,addEmail:E,saveUserInfoType:f,canAddInternationalStudent:y}))),i.a.createElement(r.u.Actions,{style:{height:"70px"}},i.a.createElement(r.k.Row,null,i.a.createElement(r.b,{disabled:c||n,loading:c,primary:!0,floated:"right",style:{marginLeft:"auto"},onClick:s},C||h.a.t("components.custom.nameNumberForm.add","Add")))))})))},1379:function(e,t,a){e.exports=a.p+"static/media/ScrollButton.28dc56fa.svg"},1380:function(e,t,a){e.exports=a.p+"static/media/AddMore.14774c25.svg"},1383:function(e,t,a){e.exports=a.p+"static/media/rightArrow.b6a0af5b.svg"},1410:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFTSURBVHgBnVI7TsNAEH3rOGlQJDdxWo7gFqRILoihzgViqpRwg5ATwA1wLhDRAo0lS7jlCLQ4Eopk0SSyzDxvLP+gYSTLM2/n7c7nKbQsd2FhAFdc5wi9Y49QhdjV81SDNMWNIHfo2xb6Yw0ePuVLPsQL1AtWHWJ+iUeYto/hOdA7aZaRfQPpG7BPAvWKa0JGQfKwLEjWFHCvgMmkItEnxrOB7csDt4TNoidAv8SkxUITRiP9n82qS0J5+etpKZzARE8G0R+fdsqrE0pjDvtH4hpCdCTQB1EEbDZdAjGe0fTQHAP/NAOZ7OmQ6Ig9/lYisXJgXI/slsRQgl0x8nZ57bKZw52KIEwqIr+QxabxPaLagMqettsqTmN6a3IqAXgIpPE5hmd/CCBmmWtRj0+oKTlP5AbMi/WUk2b/bEVhpZ7xUOYqtKwQBHfbO4qcw8u6Iv8B/+N0spRYLl4AAAAASUVORK5CYII="},1412:function(e,t,a){"use strict";var s=a(1),i=a.n(s),n=a(1036),o=a.n(n),l=a(1024),c=a.n(l),r=a(47),d=a(140),m=a(457),u=a.n(m),h=a(151),p=a(1043),v=a.n(p),g=a(25),b=a.n(g),C=a(5),S=a(1068),E=a.n(S),f=a(1236),y=a(38),w=a(116),A=a(80),M=a(1343),O=a(1718),_=a.n(O),L=a(91),B=a(1955),D=a.n(B),N=a(1452),x=a.n(N),T=a(1453),j=a(1454),I=a(1455),k=a(704),F=a(2249),V=a(15),R=a(253),H=a(83),G=a(68),P=a(1347),U=a(1271),Y=a(179),z=a(1456),Z=a(1959),W=a.n(Z);const q=[{text:"15min",value:900},{text:"30min",value:1800},{text:"45min",value:2700},{text:"1hr",value:3600},{text:"1hr 15min",value:4500},{text:"1hr 30min",value:5400},{text:"1hr 45min",value:6300},{text:"2hr",value:7200},{text:"3hr",value:10800},{text:"4hr",value:14400}],$=[{text:"Default Live Class Tab",value:0,key:0,isNew:!1,info:""},{text:"Global Folder",value:1,key:1,isNew:!0,info:"Folders which can be globally updated in multiple courses all at once"}];t.a=u()(Object(d.connect)((function(e){var t,a,s,i;return{user:e.persistedData&&e.persistedData.user,orgDetails:null===e||void 0===e||null===(t=e.persistedData)||void 0===t?void 0:t.organization,useNewLiveService:Object(V.e)(),batchOverview:null===e||void 0===e||null===(a=e.batchDetail)||void 0===a?void 0:a.data,isGlobalContentLibraryEnabled:null===e||void 0===e||null===(s=e.persistedData)||void 0===s||null===(i=s.organization)||void 0===i?void 0:i.isGlobalContentLibraryEnabled}}),{makeApiCall:h.b,setFetchingBatchSettingsStatus:f.d,saveBatchSettings:f.a,OpenTrialLiveModal:k.b})((function(e){var t,a;const{handleGoLiveModalForCourse:n,status:l,makeApiCall:d,user:m,type:u,courseId:h,batchId:p,fetchCourseDetails:g,liveSessionId:S,editClicked:f,courseDetails:O,showSchedulePreSelected:B,preSelectedScheduleTime:N,hideScheduleSelector:k,goLiveCourseModalType:Z,isEditingScheduledClass:Q,OpenTrialLiveModal:X,setForceCloseliveModalState:K,isDuplicate:J,isGlobalContentLibraryEnabled:ee}=e;let{t:te}=Object(F.a)(),ae=B||!1;const[se,ie]=Object(s.useState)(""),[ne,oe]=Object(s.useState)(!1),[le,ce]=Object(s.useState)(!1),[re,de]=Object(s.useState)(!1),[me,ue]=Object(s.useState)(""),[he,pe]=Object(s.useState)(0),[ve,ge]=Object(s.useState)(""),[be,Ce]=Object(s.useState)(null),[Se,Ee]=Object(s.useState)(null),[fe,ye]=Object(s.useState)(!1),[we,Ae]=Object(s.useState)(""),[Me,Oe]=Object(s.useState)(""),[_e,Le]=Object(s.useState)(""),[Be,De]=Object(s.useState)(!1),[Ne,xe]=Object(s.useState)(!1),[Te,je]=Object(s.useState)(!1),[Ie,ke]=Object(s.useState)(0),[Fe,Ve]=Object(s.useState)(!1),[Re,He]=Object(s.useState)(""),[Ge,Pe]=Object(s.useState)([]),[Ue,Ye]=Object(s.useState)(""),[ze,Ze]=Object(s.useState)(!0),[We,qe]=Object(s.useState)(!1),[$e,Qe]=Object(s.useState)({}),[Xe,Ke]=Object(s.useState)(0),[Je,et]=Object(s.useState)(""),[tt,at]=Object(s.useState)(!1),[st,it]=Object(s.useState)({}),[nt,ot]=Object(s.useState)({}),[lt,ct]=Object(s.useState)("10 minutes"),[rt,dt]=Object(s.useState)(null);let[mt,ut]=Object(s.useState)([]),[ht,pt]=Object(s.useState)(0);const[vt,gt]=Object(s.useState)(!1);let bt=O&&O.details&&O.details.name,Ct=O&&O.auxiliaryData&&O.auxiliaryData.totalSubscriberCount,St=O&&O.goLiveCard,Et={},ft=V.b.AGORA;Z==L.a.GoLive?(Et={...St.cta1},ft=e.useNewLiveService?Object(V.t)(St,"cta1"):St.cta1.isAgora):(Et={...St.cta2},ft=e.useNewLiveService?Object(V.t)(St,"cta2"):St.cta2.isAgora);let yt=e&&e.liveCard;Q||(yt={cta:Et,isAgora:ft,...St});let wt=Q&&e&&void 0==e.canEdit?yt&&yt.canEdit:e&&e.canEdit||(null===e||void 0===e||null===(t=e.orgDetails)||void 0===t?void 0:t.canAssignLiveClass)&&(null===e||void 0===e?void 0:e.canEditAssignee),At=Q&&e&&void 0==e.canDelete?yt&&yt.canDelete:e&&e.canDelete||(null===e||void 0===e||null===(a=e.orgDetails)||void 0===a?void 0:a.canAssignLiveClass)&&(null===e||void 0===e?void 0:e.canDeleteAssignee),Mt={id:h,name:bt,isSelected:1,subscribers:Ct};const[Ot,_t]=Object(s.useState)([Mt]),[Lt,Bt]=Object(s.useState)([h]);console.log(O,"courseDetails"),Object(s.useEffect)(()=>{let e=mt.filter(e=>1==e.isSelected);e.length>=1&&_t(e)},[mt]),Object(s.useEffect)(()=>{0===Ie&&(He(""),Ye(""))},[Ie]),Object(s.useEffect)(()=>{nt&&Qe(nt)},[nt]),Object(s.useEffect)(()=>{},[f]),Object(s.useEffect)(()=>{ae&&(ye(!0),Ae(b()(N||new Date)),Oe(b()(N||new Date))),be||!p&&!h||function(){const t=Object(R.l)("beforeGoLiveOrEditSchedule",yt,{liveSessionId:S,entityType:u,courseId:h,edit:f&&J?0:f?1:0,isDuplicate:J});m&&3==m.type&&d(t.url,t.method,void 0,t=>{var a;t.data=Object(R.e)(t.data);
22const{title:s,expectedStudents:i,expectedDuration:n,entityId:o,type:l,courses:c,maxStudents:r,rechargeMessage:d,isWeb:m,showVideoOnWeb:u,sendSms:p,isSchedule:v,scheduleTime:g,promotedCourseId:C,showStudentCount:S,defaultAssignee:E,currentUser:f,parentFolderDetails:y,maxDemoTime:w}=t.data;if(Ce({...t.data}),ie(s||(null===O||void 0===O||null===(a=O.details)||void 0===a?void 0:a.name)),He((null===y||void 0===y?void 0:y.folderId)||""),Ye((null===y||void 0===y?void 0:y.folderName)||""),ke(null!==y&&void 0!==y&&y.folderId?1:0),je(void 0===S||S),ue(i||r),ge(n),oe(m),ce(u),void 0!==p&&de(!!p),et(d),v&&(xe(!!v),ye(!!v),Ae(b()(g)),Oe(b()(g))),l==L.b.MULTIPLECOURSE||e.useNewLiveService&&l==L.b.COURSE){let e,t=h||"";c?(e=c.filter(e=>e.id!=h),e.unshift(Mt)):(e=o.filter(e=>e!=t),e.unshift(t)),Bt(e),Dt(e.map(e=>e.id),e);let a=e.reduce((function(e,t){return e+t.subscribers}),0);ue(a)}Le(l),l!=L.b.BATCH&&l!=L.b.COURSE&&l!=L.b.MULTIPLECOURSE||De(!1),it(E),ot(f),ct(w),C>0&&qe(!0)})}(),u!=L.b.COURSE&&u!=L.b.MULTIPLECOURSE||(pe(Mt.subscribers),Q||Dt(Lt),ue(Mt.subscribers))},[]);const Dt=(e,t)=>{Q&&(t=t&&t.map(e=>({...e,courseId:e.id,isSelected:1}))),m&&3==m.type&&d(`/v2/courses/list?offset=0&sortOrder=1&selectedCourses=[${e}]&search=`,"GET",void 0,e=>{let{list:a}=e.data;ut(Q?t:0==ht?a:[...mt,...a]),De(a.length>1)},()=>{De(!1)})},Nt=()=>{const t=Object(R.l)("deleteLiveSession",yt,{liveSessionId:S,isAgora:e.useNewLiveService?Object(V.t)(yt):yt.isAgora,isExistingSession:1});d(t.url,t.method,t.payload,()=>{C.toastr.success("Success","Scheduled live class deleted successfully"),n(!0)},()=>{De(!1)})};function xt(){gt(!vt)}function Tt(){ie(""),oe(!1),ce(!1),de(!0),ue(""),ge(""),ye(!1),Ae(""),Oe(""),pe(Mt.subscribers),_t([Mt])}let jt=te("components.LiveVideo.goLiveModalCourse.goNow","Go Live Now");var It;fe&&!J&&(jt=te("components.LiveVideo.goLiveModalCourse.scheduleLive","Schedule Live")),J&&f&&(jt=te("components.LiveVideo.goLiveModalCourse.duplicateLiveClass","Duplicate Live Class")),wt&&1==f&&!J&&fe&&(jt=null!==e&&void 0!==e&&null!==(It=e.orgDetails)&&void 0!==It&&It.canAssignLiveClass?te("components.LiveVideo.goLiveModalCourse.saveChangesLive","Save Changes"):te("components.LiveVideo.goLiveModalCourse.editLive","Edit Live class"));const kt=async e=>{var t;let a=[h];Ot.length>1&&(a=Ot.map(e=>e.courseId));let s=await Object(Y.i)({courseIds:a,limit:e.limit,offset:e.offset,search:e.search});var i,n,o,l,c;(Pe(null===s||void 0===s||null===(t=s.data)||void 0===t?void 0:t.data),null!==Ge&&void 0!==Ge&&Ge.folderDetailsResult&&!e.isBack)?(Pe({...Ge,folderDetailsResult:[...Ge.folderDetailsResult,...null===s||void 0===s||null===(i=s.data)||void 0===i||null===(n=i.data)||void 0===n?void 0:n.folderDetailsResult]}),0===(null===s||void 0===s||null===(o=s.data)||void 0===o||null===(l=o.data)||void 0===l?void 0:l.folderDetailsResult.length)?Ze(!1):Ze(!0)):Pe(null===s||void 0===s||null===(c=s.data)||void 0===c?void 0:c.data)},Ft=Object(R.i)(D.a,x.a);var Vt,Rt,Ht;return l&&be?i.a.createElement("div",null,Fe&&i.a.createElement(U.a,{title:"Select Folder",infoLabelText:"Following is the list of folders mapped with the courses selected",searchBarPlaceholder:"Search Folder",acceptText:"Save",name:"Folders",count:null===Ge||void 0===Ge?void 0:Ge.folderCount,selectedCourses:Ot,type:"radio",hasMore:ze,setHasMore:Ze,selectedCourse:Re,setSelectedCourse:He,rejectAction:()=>Ve(!1),crossAction:()=>Ve(!1),fetchData:kt,courseList:(null===Ge||void 0===Ge?void 0:Ge.folderDetailsResult)||Ge,acceptAction:()=>{Ve(!1)},isGlobalFolderList:!0,setFolders:e=>Pe(e),setGlobalFolderName:e=>Ye(e)}),i.a.createElement("div",{style:{visibility:vt?"hidden":"visible"},id:"myModal",className:o.a.modal},i.a.createElement("div",{className:o.a.modalContent},i.a.createElement("div",{className:o.a.Header},i.a.createElement("div",{className:o.a.HeaderText},function(e,t){return e?te("components.LiveVideo.goLiveModalCourse.duplicateLiveClass","Duplicate Live Class"):1==t?te("components.LiveVideo.goLiveModalCourse.editLiveCourse","Edit Live Class"):te("components.LiveVideo.goLiveModalCourse.goLiveCourse","Go Live via Course")}(J,f)),i.a.createElement("div",null,i.a.createElement("img",{className:"cursorPointer",onClick:()=>{Tt(),n(!0)},src:c.a,width:"16px",height:"16px"}))),i.a.createElement("div",{className:o.a.paddingCheat},i.a.createElement("div",{className:o.a.TrialEmblem,onClick:()=>(X(!1,!0),Tt(),void n(!0)),style:{backgroundColor:Ft.bgColor}},i.a.createElement("span",{className:o.a.TrialEmblemLeft},i.a.createElement("img",{className:o.a.TrialEmblemLeftImage,src:Ft.iconUrl,alt:">"}),Ft.text),i.a.createElement("img",{src:Ft.nextIcon,alt:">"})),i.a.createElement(I.a,{topic:se,handleTopicChange:function(e){ie(e.target.value)},placeholder:"What will you teach in this class?"}),u==L.b.COURSE||u==L.b.MULTIPLECOURSE?i.a.createElement(P.b,{studentNumber:Te&&me,displaySelectedCourseArray:Ot,showAddMoreBtn:Be,toggleCourseModal:xt,orgDetails:null===e||void 0===e?void 0:e.orgDetails,numberOfCoursesToShow:4}):"",vt?i.a.createElement(M.a,{toggleCourseModal:xt,previousSelectedCourseArray:Ot,entityId:h,setDisplaySelectedCourseArray:_t,setStudentNumber:ue,setCourseMaxStudentNumber:pe,headerText:te("components.liveVideo.selectCourseModal.addMore","Add More Courses"),searchPlaceholderText:te("components.liveVideo.selectCourseModal.searchPlaceHolderText","Search for a course"),entityType:L.b.COURSE}):"",1===ee&&i.a.createElement("div",{className:o.a.folderSelectContainer},i.a.createElement("div",{style:{fontWeight:"500",fontSize:"14px"}},"LIVE CLASS RECORDING WILL BE SAVED IN:"),i.a.createElement("div",{className:o.a.selectFolderContainer},$.map((e,t)=>i.a.createElement("label",{key:t,className:"pt-2",style:{marginRight:"32px",display:"flex",justifyContent:"center",alignItems:"center"}},i.a.createElement("input",{checked:Ie==e.value,onClick:()=>ke(e.value),type:"radio",style:{marginRight:"8px"}}),i.a.createElement("span",null,e.text)," ",""!==e.info&&i.a.createElement(r.v,{flowing:!0,hoverable:!0,content:"You can now save your live class recordings in a global folder, which will automatically reflect in every course that is linked to this global folder.",trigger:i.a.createElement("img",{src:E.a,alt:"Breakup",style:{cursor:"pointer",marginLeft:"0.5rem",height:"12px"}}),position:"bottom left"}),e.isNew&&i.a.createElement("div",{className:o.a.newTag},"New")))),1===Ie&&i.a.createElement("div",{style:{marginBottom:"24px"}},i.a.createElement(P.a,{showAddMoreBtn:!0,selectedEntities:[{name:Ue}],addMoreEntitiesText:"Add",onAddMoreEntities:()=>{Ve(!0)}}))),(null===e||void 0===e||null===(Vt=e.orgDetails)||void 0===Vt?void 0:Vt.isLiveClassShareEnabled)&&i.a.createElement("div",{className:o.a.allowEveryoneContainer,style:{borderTop:ee?"none":"1px solid #E5E5E5",marginTop:ee?"0px":""}},i.a.createElement("div",{className:o.a.SingleContentImgText2},i.a.createElement("div",{className:o.a.goLiveModalAllowTitle}," ",te("components.LiveVideo.goLiveModalCourse.allowJoin","Allow everyone to join"),i.a.createElement(r.v,{flowing:!0,hoverable:!0,content:i.a.createElement("div",{style:{width:"300px"}}," ",`Enabling this option would allow \n all the students to preview this
22session \n for ${lt} for trial and encourage \n students to buy the promoted course`),trigger:i.a.createElement("img",{src:E.a,alt:"Breakup",style:{cursor:"pointer",marginLeft:"0.5rem",height:"12px"}}),position:"top left"})),i.a.createElement("div",{className:"pt-3 pb-3"}," ",i.a.createElement(r.d,{checked:We,onClick:()=>qe(!We),toggle:!0}))),We&&i.a.createElement("div",{className:o.a.promotedCourseContainer},i.a.createElement("img",{src:W.a}),null===O||void 0===O||null===(Rt=O.details)||void 0===Rt?void 0:Rt.name," getting promoted!")),2!=f&&!k&&i.a.createElement("div",{className:o.a.SingleContentImgText},i.a.createElement("div",{className:o.a.goLiveModalTitle}," ",te("components.LiveVideo.goLiveModalCourse.later","Schedule for Later")),i.a.createElement("div",{className:"pt-3 pb-3"}," ",i.a.createElement(r.d,{checked:fe,onClick:function(){Ne||(ye(!fe),Ae(fe?we:b()(new Date)),Oe(fe?Me:b()(new Date)))},toggle:!0}))),!!fe&&i.a.createElement("div",{className:o.a.SingleContentImgText,style:{marginTop:"12px"}},i.a.createElement("div",null,i.a.createElement("div",{style:{marginBottom:"1rem",fontWeight:"600"}},te("components.LiveVideo.goLiveModalCourse.setDate","Set Date")),!!we&&i.a.createElement(v.a,{className:o.a.scheduleBox,dateFormat:"DD-MM-YYYY",isValidDate:e=>e.isAfter(b()(new Date).subtract("1","days")),timeFormat:!1,closeOnSelect:!0,value:we,defaultValue:we||b()(new Date),onChange:e=>{Ae(e)},renderInput:e=>i.a.createElement("input",Object.assign({},e,{className:o.a.goLiveModalTitleInput,placeholder:te("components.LiveVideo.goLiveModalCourse.selectDatePlaceholder","Select date")}))})),i.a.createElement("div",null,i.a.createElement("div",{style:{marginBottom:"1rem",fontWeight:"600"}},te("components.LiveVideo.goLiveModalCourse.setTime","Set time")," "),!!Me&&i.a.createElement(v.a,{className:o.a.scheduleBox,dateFormat:!1,isValidDate:e=>e.isAfter(b()(new Date).subtract("1","days")),timeFormat:!0,closeOnSelect:!0,value:Me,defaultValue:Me||b()(new Date),onChange:e=>{Oe(e)},renderInput:e=>i.a.createElement("input",Object.assign({},e,{className:o.a.goLiveModalTitleInput,placeholder:te("components.LiveVideo.goLiveModalCourse.setTime","Select Time")}))}))),!u==L.b.COURSE||!u==L.b.MULTIPLECOURSE?i.a.createElement("div",{className:o.a.SingleContentImgText},i.a.createElement("div",{className:o.a.studentNumberContainer},i.a.createElement("div",{className:o.a.goLiveModalTitle},te("components.LiveVideo.goLiveModalCourse.expected","Expected Number of Students *"),i.a.createElement(r.v,{flowing:!0,hoverable:!0,content:te("components.LiveVideo.goLiveModalCourse.liveTogether","The total batch/course strength can join this live session together. The number is just to calculate your expected live credit consumption."),trigger:i.a.createElement("img",{src:E.a,alt:"Breakup",style:{cursor:"pointer",marginLeft:"1rem",height:"12px"}}),position:"bottom left"})),i.a.createElement("div",null,i.a.createElement("input",{placeholder:te("components.LiveVideo.goLiveModalCourse.enterStudent","Enter student count"),onChange:function(e){let t=e.target.value;if(t[0]&&"0"==t[0])return;if(alert.length&&parseInt(t))return;let a=parseInt(t);ue(isNaN(a)?"":a)},value:me,className:o.a.goLiveModalTitleInput,type:"text"}))),i.a.createElement("div",{className:o.a.studentNumberContainer},i.a.createElement("div",{className:o.a.goLiveModalTitle},"Expected Live Streaming Duration *"),i.a.createElement("div",null," ",i.a.createElement(r.h,{value:ve,onChange:function(e,t){ge(t.value)},style:{width:"100%"},placeholder:te("components.LiveVideo.goLiveModalCourse.selectTimePlaceholder","Select time"),selection:!0,options:q})))):"",Se?i.a.createElement("div",{className:"mt-3"},i.a.createElement("span",{style:{color:"#FF4058"}},Se.text),i.a.createElement("span",{onClick:()=>{e.history.push("/dashboard")},className:"ml-2 cursorPointer",style:{color:"#009AE0"}},Se.buttonText)):i.a.createElement("div",{className:o.a.timeLeft}),null!==e&&void 0!==e&&null!==(Ht=e.orgDetails)&&void 0!==Ht&&Ht.canAssignLiveClass&&fe?i.a.createElement(z.a,{setAssigneeDetails:Qe,defaultAssignee:st,currentUser:nt,displaySelectedCourseArray:Ot,isTrial:!1}):null,i.a.createElement(T.a,{videoRestriction:ne,downloadRestriction:le,handleVideoRestriction:function(){oe(!ne)},handleDownloadRestriction:function(){ce(!le)}}),i.a.createElement(j.a,{smsNotification:re,toggleNotification:function(){de(!re)}})),i.a.createElement("div",{className:o.a.goLiveModalFooter,style:{justifyContent:At||Je?"space-between":"flex-end"}},At?i.a.createElement("button",{className:o.a.goLiveMOdalDeleteButton,onClick:Nt},i.a.createElement("img",{src:_.a,alt:""})," ",te("components.LiveVideo.goLiveModalCourse.deleteNow","Delete this class")):Je?i.a.createElement("div",{className:o.a.goLiveModalRechargeReminder},Je," ",i.a.createElement("span",{onClick:()=>{e.history.push("/dashboard")}}," ",te("components.LiveVideo.goLiveModalCourse.rechargeNow","Recharge Now"))):"",i.a.createElement("button",{onClick:function(){var t,a;if(Object(H.d)(G.Kb,{android_version:"",ios_version:""}),se&&se.length<4)return void C.toastr.error(te("components.LiveVideo.goLiveModalCourse.toast.errorHeading","ERROR"),te("components.LiveVideo.goLiveModalCourse.toast.goLiveErrorsubheading","The title's length should be greater than 3 characters"));if(u==L.b.BATCH&&me>be.maxStudents)return void C.toastr.error(te("components.LiveVideo.goLiveModalCourse.toast.errorHeading","ERROR"),te("components.LiveVideo.goLiveModalCourse.toast.goLiveErrorContent","Please select valid number of students. Number of students cant be greater than the original batch strength"));if(!u==L.b.COURSE||!u==L.b.MULTIPLECOURSE){if(!ve)return void C.toastr.error(te("components.LiveVideo.goLiveModalCourse.toast.errorHeading","ERROR"),te("components.LiveVideo.goLiveModalCourse.toast.errorContent2","Please select valid duration"));if(be.setDuration)return void C.toastr.error(te("components.LiveVideo.goLiveModalCourse.toast.errorHeading","ERROR"),te("components.LiveVideo.goLiveModalCourse.toast.validError","Please select valid duration"))}if(fe){if(!b.a.isMoment(we)||!b.a.isMoment(Me))return void C.toastr.error(te("components.LiveVideo.goLiveModalCourse.toast.errorHeading","ERROR"),te("components.LiveVideo.goLiveModalCourse.toast.validDate","Please select valid date and time"));if(b()(we).format("DD-MM-YYYY")===b()(new Date).format("DD-MM-YYYY")&&Me.diff(b()(new Date),"seconds")<1)return void C.toastr.error(te("components.LiveVideo.goLiveModalCourse.toast.errorHeading","ERROR"),te("components.LiveVideo.goLiveModalCourse.toast.errorTime","Please select valid date and time"));if(b()(we).format("DD-MM-YYYY")!==b()(new Date).format("DD-MM-YYYY")&&b()(we).isBefore(b()()))return void C.toastr.error(te("components.LiveVideo.goLiveModalCourse.toast.errorHeading","ERROR"),te("components.LiveVideo.goLiveModalCourse.toast.validity","Please select valid date and time"))}let s=fe?b()(we.format("DD-MM-YYYY")+" "+Me.format("HH:mm"),"DD-MM-YYYY HH:mm").valueOf():null,i={entityId:u==L.b.BATCH?p:h,type:u,title:se,scheduleTime:fe?s:NaN,promotedCourseId:We?h:0,isSchedule:fe?1:0,isWeb:ne?1:0,showVideoOnWeb:le?1:0,sendSms:re?1:0,isAgora:e.useNewLiveService?Object(V.t)(e.liveCard):null===(t=e.liveCard)||void 0===t?void 0:t.isAgora,parentFolderId:Re||void 0,assigneeUserId:null===$e||void 0===$e?void 0:$e.userId,assigneeTutorId:null===$e||void 0===$e?void 0:$e.tutorId,assigneeName:Object(V.E)(null===$e||void 0===$e?void 0:$e.name)};
22if(_e==L.b.COURSE&&(i.entityId=h,i.type=2),(!_e||_e==L.b.MULTIPLECOURSE||e.useNewLiveService&&_e==L.b.COURSE)&&Ot.length>=1&&(i.entityId=Ot.map(e=>e.courseId?e.courseId:e.id),i.type=4),u==L.b.BATCH&&(i.entityId=p,i.type=3),1==f&&(i.liveSessionId=S),O){let e=O&&O.metaData&&O.metaData.isCoowner;Object(A.c)("COURSE BASE",{ACTION:y.Xb,courseId:h,isFaculty:!!e})}const o=Object(R.l)("goLive",yt,{liveSessionId:i.liveSessionId,edit:f&&J?0:f?1:0,allowOpenViduNewScheduled:!0,data1:i,batchCode:null===e||void 0===e||null===(a=e.batchOverview)||void 0===a?void 0:a.batchCode});at(!0),d(o.url,o.method,o.payload,t=>{if(t.data=Object(R.n)(t.data,fe,m,yt),at(!1),!t.data.showRechargeButton)return fe?(Q&&J?C.toastr.success(te("components.LiveVideo.goLiveModalCourse.toast.successHeading","Success"),te("components.LiveVideo.goLiveModalCourse.toast.successDuplicateLiveClassScheduled","Live class created successfully!")):Q?C.toastr.success(te("components.LiveVideo.goLiveModalCourse.toast.successHeading","Success"),te("components.LiveVideo.goLiveModalCourse.toast.successContentScheduled","Scheduled live class edited")):C.toastr.success(te("components.LiveVideo.goLiveModalCourse.toast.successHeading","Success"),te("components.LiveVideo.goLiveModalCourse.toast.successDone","Live class scheduled successfully")),u==L.b.BATCH?function(){let t=Object(w.a)();e.setFetchingBatchSettingsStatus(!0),e.saveBatchSettings(),e.makeApiCall(`batches/${t}/settings`,"GET",void 0,t=>{e.setFetchingBatchSettingsStatus(!1),e.saveBatchSettings(t.data)},()=>e.setFetchingBatchSettingsStatus(!1))}():g(),void n(!0)):void Object(R.r)(t.data,e.location,e.history,yt);Ee({text:t.message,buttonText:t.data.eligibilityText})},e=>{at(!1),Object(R.o)(e,K,()=>{n(!0)})})},className:o.a.goLiveModalButton,disabled:tt,style:{minWidth:"150px"}},tt?te("components.LiveVideo.goLiveModalCourse.loading","Loading..."):jt))))):""})))},1415:function(e,t,a){"use strict";a.d(t,"b",(function(){return s})),a.d(t,"c",(function(){return i})),a.d(t,"a",(function(){return n}));const s=e=>{e=e.replace(/^\?/,"");let t={};return-1===e.indexOf("=")?{}:(e.split("&").forEach(e=>{t[e.split("=")[0]]=decodeURIComponent(e.split("=")[1])}),t)},i=e=>{let t=[];for(let a in e){let s=e[a];Array.isArray(s)&&(s=JSON.stringify(s)),t.push(a+"="+s)}return t.join("&")},n=(e,t)=>{let a=e.split("{hash}");return a.splice(1,0,t),a.join("")}},1424:function(e,t,a){e.exports=a.p+"static/media/students.594418a3.svg"},1452:function(e,t,a){e.exports=a.p+"static/media/YellowArrow.316f3ee7.svg"},1453:function(e,t,a){"use strict";var s=a(1),i=a.n(s),n=a(47),o=(a(1346),a(2249)),l=a(1379),c=a.n(l);t.a=function(e){const{videoRestriction:t,downloadRestriction:a,handleVideoRestriction:l,handleDownloadRestriction:r}=e,[d,m]=Object(s.useState)(!1),{t:u}=Object(o.a)(),h=()=>i.a.createElement("div",null,i.a.createElement("div",{className:"SingleContentImgText1",style:{borderBottom:"1px solid #e5e5e5"}},i.a.createElement("div",null,i.a.createElement("div",{className:"goLiveModalTitle"},i.a.createElement("span",{className:"infoIcon"},"i"),u("components.liveVideo.ModalModules.advanceSettings.heading2","Allow on desktop view")),i.a.createElement("div",{className:"goLiveModalMenuText"},u("components.liveVideo.ModalModules.advanceSettings.menuText2","Turn ON if you want to allow students to take this class on web. We suggest you to keep this setting off as live class may be compromised on Web."))),i.a.createElement("div",null,i.a.createElement(n.d,{checked:t,onClick:l,toggle:!0}))),i.a.createElement("div",{className:"SingleContentImgText1"},i.a.createElement("div",null,i.a.createElement("div",{className:"goLiveModalTitle"},u("components.liveVideo.ModalModules.advanceSettings.contentText1","Show recorded class on Web")),i.a.createElement("div",{className:"goLiveModalMenuText"},u("components.liveVideo.ModalModules.advanceSettings.contentText2","We suggest you to keep this setting off as recorded class may be compromised on Web."))),i.a.createElement("div",null,i.a.createElement(n.d,{checked:a,onClick:r,toggle:!0}))));return i.a.createElement("div",{className:"goLiveModalAdvance"},i.a.createElement("div",{className:"goLiveModalAdvanceHeader",onClick:()=>{m(!d)}},i.a.createElement("div",{className:"goLiveModalAdvanceLabel"},u("components.liveVideo.ModalModules.advanceSettings.text","Advanced Settings")),i.a.createElement("img",{className:"goLiveModalAdvanceArrow",src:c.a,alt:"^",style:{transform:d?"rotate(270deg)":"rotate(90deg)"}})),d&&i.a.createElement("div",{className:"goLiveModalAdvanceBody"},i.a.createElement(h,null)))}},1454:function(e,t,a){"use strict";var s=a(1),i=a.n(s),n=a(2249);t.a=function(e){const{t:t}=Object(n.a)(),{smsNotification:a,toggleNotification:s}=e;return i.a.createElement("div",{className:"LiveTrial__Modal__Body__Sms"},i.a.createElement("div",{className:"LiveTrial__Modal__Body__Sms--Label"},t("components.liveVideo.liveTrialClass.smsNotification.heading","SMS Notification")),i.a.createElement("div",{className:"LiveTrial__Modal__Body__Sms--Toggle"},i.a.createElement("input",{type:"checkbox",checked:a,onClick:s}),t("components.liveVideo.liveTrialClass.smsNotification.sendSms","Send SMS")))}},1455:function(e,t,a){"use strict";var s=a(1),i=a.n(s),n=a(2249);t.a=function(e){const{t:t}=Object(n.a)(),{topic:a,handleTopicChange:s,placeholder:o}=e;return i.a.createElement("div",{className:"LiveTrial__Modal__Body__Topic"},i.a.createElement("div",{className:"LiveTrial__Modal__Body__Topic--Label"}," ",t("components.liveVideo.liveTrialClass.topic.heading","Topic")),i.a.createElement("input",{className:"LiveTrial__Modal__Body__Topic--Input",placeholder:o,name:"Topic",type:"text",value:a,onChange:s}))}},1456:function(e,t,a){"use strict";var s=a(1),i=a.n(s),n=a(47),o=a(1379),l=a.n(o),c=a(2249),r=a(1957),d=a.n(r),m=a(151),u=a(140),h=a(1023),p=a.n(h);a(1958);t.a=Object(u.connect)((function(e){return{user:e.persistedData&&e.persistedData.user}}))((function(e){const{setAssigneeDetails:t,defaultAssignee:a,currentUser:o,isTrial:r,displaySelectedCourseArray:u}=e,{t:h}=Object(c.a)(),[v,g]=Object(s.useState)(0),[b,C]=Object(s.useState)(0),[S,E]=Object(s.useState)(!0),[f,y]=Object(s.useState)(!0),[w,A]=Object(s.useState)([]),[M,O]=Object(s.useState)({}),[_,L]=Object(s.useState)(!1);let B=""+window.location.href.split("/course")[1].split("/")[1].split("?")[0];B=null!==u&&void 0!==u&&u.length?null===u||void 0===u?void 0:u.map(e=>(null===e||void 0===e?void 0:e.id)||(null===e||void 0===e?void 0:e.courseId)):[B],Object(s.useEffect)(()=>{null!==u&&void 0!==u&&u.length&&(g(0),L(!_))},u);const D=Object(s.useCallback)(()=>{E(!0),e.dispatch(Object(m.b)(`v2/course/live/assignees?courseIds=[${B}]&limit=20&offset=${v}
22&isTrial=${r}`,"GET",null,e=>{var t,a,s,i;(E(!1),A(v?[...w,...null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.list]:null===e||void 0===e||null===(a=e.data)||void 0===a?void 0:a.list),g(v+20),0===v)&&C(null===e||void 0===e||null===(i=e.data)||void 0===i?void 0:i.totalCount);y(v?(null===w||void 0===w?void 0:w.length)<b:(null===w||void 0===w?void 0:w.length)<(null===e||void 0===e||null===(s=e.data)||void 0===s?void 0:s.totalCount))},e=>{E(!1)}))},[v]);return Object(s.useEffect)(()=>{0===v&&D()},[v]),Object(s.useEffect)(()=>{null!==w&&void 0!==w&&w.length&&!_?w.map(e=>{(null===a||void 0===a?void 0:a.userId)===(null===e||void 0===e?void 0:e.userId)&&(O(e),t(e))}):r||(O(o),t(o))},[w,a]),i.a.createElement("div",{className:"assignLiveClassDiv"},i.a.createElement("div",{className:"assignLiveClass--Label"}," ",h("components.liveVideo.goLiveModal.assignLiveClassfor","Assign Live Class for")),i.a.createElement(n.s,{compact:!0,style:{width:"100%"}},i.a.createElement(n.h,{icon:i.a.createElement("img",{src:l.a,className:"arrowIcon"}),item:!0,floating:!0,text:null===M||void 0===M?void 0:M.name,style:{width:"100%",display:"flex",justifyContent:"space-between"}},i.a.createElement(n.h.Menu,{style:{maxHeight:"120px",overflow:"auto"}},i.a.createElement(p.a,{next:D,hasMore:f,dataLength:null===w||void 0===w?void 0:w.length,loader:i.a.createElement("div",null,"loading")},w.map((e,a)=>i.a.createElement(n.h.Item,{key:a,onClick:()=>{O(e),t(e)}},(null===e||void 0===e?void 0:e.userId)===(null===M||void 0===M?void 0:M.userId)&&i.a.createElement("img",{src:d.a,alt:"tick",className:"right floated checkTick"}),null===e||void 0===e?void 0:e.name)))))))}))},1477:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAPCAYAAADphp8SAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGYSURBVHgBnVLbUcJQEM0NYYY/bglQgVceM/wRKiBWIFYAVCBWgHQQKtAOxH8gsQIp4Qp8MDw9JxOdJCbGcWd27mZzdvfsQxgZYtu23G636nw+X/HbNM23+Xw+y8KLNGej0RggQV8IsbpcLkEwbIWHOlosFtPcRLVabYCg7ul0upNS6s1mY+NbW5a12u12ZPYE2HS5XD5G48xkIjBxUbGDQGe9XntwdcGqv9/vX+DrIcE1MbmMKEopicp9BEzAKvBprcnmHr4H3/f1nxJ9CWY14qyYBzpJthNLxOqFQmGc8d/BrKo0gGGbszQQMEMLL7k7qOwkAWjFKZVKEkCqgVm5P5gI4ULLTESA9jzvNQlqNpsdDJlb4hJuMBs/icGWg9eKOuv1uoONPYdJFNrRKDI8Ho9+sVistFqtyuFwUPBJngSx4a3F1w/HONJ3F0FtMGmjxVu8Y94RhMPntZdjYzByhCeAp0cbna3CuVSovyZCz+9Y+zcz3gzbgOlGmLM9OxoXmxHupGqkCC89zU4mYjVNJsY/hIOGfnwC6ZvdoCkCb1YAAAAASUVORK5CYII="},1478:function(e,t,a){e.exports={container:"ZoomClass_container__3yxlf",header:"ZoomClass_header__18aZa",zoomCardV2Header:"ZoomClass_zoomCardV2Header__2RiF6",headerLeft:"ZoomClass_headerLeft__1INMY",headerRight:"ZoomClass_headerRight__gVvIH",content:"ZoomClass_content__2fT_6",text:"ZoomClass_text__1Ny8A",subtext:"ZoomClass_subtext__3tiFF",ctaButton:"ZoomClass_ctaButton__1H2ct",VideoBody:"ZoomClass_VideoBody__2q_cM"}},1479:function(e,t,a){e.exports=a.p+"static/media/liveTag.8091603a.svg"},1515:function(e,t,a){"use strict";a.d(t,"b",(function(){return s})),a.d(t,"a",(function(){return i}));const s=e=>e.zoomV2.meetingData,i=e=>e.zoomV2.loadingState},1706:function(e,t,a){},1707:function(e,t,a){e.exports=a.p+"static/media/back_arrow.125e1e80.svg"},1708:function(e,t,a){e.exports=a.p+"static/media/emptyState.f14ca690.svg"},1709:function(e,t,a){e.exports=a.p+"static/media/infoIcon.2a3d8961.svg"},1710:function(e,t,a){e.exports=a.p+"static/media/backIcon.1e0ddede.svg"},1711:function(e,t,a){e.exports={SearchForm:"Search_SearchForm__J2TKV",Tag:"Search_Tag__owg4-",searchButton:"Search_searchButton__1tl5f"}},1712:function(e,t,a){e.exports=a.p+"static/media/search.763fc6cc.svg"},1713:function(e,t,a){e.exports=a.p+"static/media/arrowRight.b14ae532.svg"},1718:function(e,t,a){e.exports=a.p+"static/media/trash.16cfb554.svg"},1719:function(e,t,a){e.exports=a.p+"static/media/clock.510a5b70.svg"},1720:function(e,t,a){e.exports=a.p+"static/media/yellowWarning.ac98c355.svg"},1726:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhwAAAIcCAMAAACKIIdOAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURRVlwI7J90Gn9uD0/VCd5Bl20jeW6D2d7kup9kKl9Y/J+EGl9I/K+WWq6UKk9GO09ZHJ92Wy8kOl8wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA/wAzAAAzMwAzZgAzmQAzzAAz/wBmAABmMwBmZgBmmQBmzABm/wCZAACZMwCZZgCZmQCZzACZ/wDMAADMMwDMZgDMmQDMzADM/wD/AAD/MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMzADMzMzMzZjMzmTMzzDMz/zNmADNmMzNmZjNmmTNmzDNm/zOZADOZMzOZZjOZmTOZzDOZ/zPMADPMMzPMZjPMmTPMzDPM/zP/ADP/MzP/ZjP/mTP/zDP//2YAAGYAM2YAZmYAmWYAzGYA/2YzAGYzM2YzZmYzmWYzzGYz/2ZmAGZmM2ZmZmZmmWZmzGZm/2aZAGaZM2aZZmaZmWaZzGaZ/2bMAGbMM2bMZmbMmWbMzGbM/2b/AGb/M2b/Zmb/mWb/zGb//5kAAJkAM5kAZpkAmZkAzJkA/5kzAJkzM5kzZpkzmZkzzJkz/5lmAJlmM5lmZplmmZlmzJlm/5mZAJmZM5mZZpmZmZmZzJmZ/5nMAJnMM5nMZpnMmZnMzJnM/5n/AJn/M5n/Zpn/mZn/zJn//8wAAMwAM8wAZswAmcwAzMwA/8wzAMwzM8wzZswzmcwzzMwz/8xmAMxmM8xmZsxmmcxmzMxm/8yZAMyZM8yZZsyZmcyZzMyZ/8zMAMzMM8zMZszMmczMzMzM/8z/AMz/M8z/Zsz/mcz/zMz///8AAP8AM/8AZv8Amf8AzP8A//8zAP8zM/8zZv8zmf8zzP8z//9mAP9mM/9mZv9mmf9mzP9m//+ZAP+ZM/+ZZv+Zmf+ZzP+Z///MAP/MM//MZv/Mmf/MzP/M////AP//M///Zv//mf//zP///5jYO38AAAAodFJOU/9GPf/////////+eIf/gZ9K/0cAAAAAAAAAAAAAAAAAAAAAAAAAAABoSPJNAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAKkElEQVR4Xu3c3XbbyBGF0Zk4v04mieP3f9dYUskmqT4kAZIFUL2/G2kB3b0o1L4U+Nt3KQSHYnAoBodicCgGh2JwKAaHYnAoBodicCgGh2JwKAaHYnAoBodicCgGh2JwKAaHYnAoBodicCgGh2JwKAaHYnAoBodicCgGh2JwKAaHYnAodhcc/3vq/lR/hU67B45//uO5+3f9HToJjh/RMQ6Ol+gYBsdrdIyC4y06BsFR0fExON6j40Nw/IyO0+D4FR0nwXEQHcfBcRgdR8FxFB2HwXEcHQfBcRIdv4LjNDp+BseH6HhvVhx/r5+j6KhmxfH1a/0yio63psXxhY6LzYuDjotNjIOOS82Mg44LTY2DjvPNjYOOs02Og45zzY6DjjNNj4OOHBx0xOCgIwbHj+gYB8dLdAyD4zU6RsHxFh2D4Kjo+Bgc79HxITh+RsdpcPyKjpPgOIiO4+A4jI6j4DiKjsPgOI6Og+A4iY5fwXEaHT+D40N0vAfHx+io4BhEx1twjKLjNTiG0fESHOPo+BEcITrgyNEBR44OOHLT64DjTLPrgONck+uA42xz64DjfFPrgONCM+uA41IT64DjYvPqgONy0+qA44pm1QHHNU2qA46rmlMHHNc1pQ44rmxGHXBc24Q64Li6+XTAcX3T6YBjQbPpgGNJk+mAY1Fz6YBjWVPpgGNhM+mAY2kT6YBjcfPogGN50+iAY0Wz6IBjTZPogGNVc+iAY11T6IBjZTPogGNtE+iAY3WfXwcc6/v0OuC4oc+uA45b+uQ64Lipz60Djtv61DqeHce3ld0Lx5evdeCo//x+qXqCO+3ZcXx98v5bz3CXwbFxe9YBx9btWAccm7dfHXBs3251wLGD9qoDjj20Ux1w7KJ96oBjH+1SBxw7aY864NhLO9QBx27anw449tPudMCxo/amA449tTMdcOyqfemAY1/tSgcc/X2pn8P2pAOO/r48iw44+nv5z9Mz7UcHHP29/l/ymXajA47+XnA8hQ44+nvF8Qw64OjvDccT6ICjv8Kxfx1w9Fc29q8Djv6Kxo/qwrAd6ICjv5LxUl0Ztr0OOPorGK/VpWGb64Cjv3LxVl0btrUOOPorFlVdHLaxDjj6KxXv1dVh2+qAo79C8bO6PGxTHXD0VyZ+VdeHbakDjv6KxEF1Y9iGOuDor0QcVneGbacDjv4KxFF1a9hmOuDorzwcV/eGbaUDjv6Kw0l1c9hGOuDorz
22ScVneHbaMDjv4Kw4fq9rBNdMDRX1n4WN0ftoUOOPorCoNqwbANdMDRX0kYVSuG9euAo7+CMKyWDGvXAUd/5WBcrRnWrQOO/opBqBYNa9YBR3+lIFWrhvXqgKO/QhCrZcNadcDRXxnI1bphnTrg6K8InKkWDmvUAUd/JeBctXJYnw44+isAZ6ulw9p0wNFfzf98tXZYlw44+qvxX6gWD2vSAUd/Nf1L1ephPTq2xPHX327vj3paz1QN/2K1fFiLDjj6q9lfrtYP69ABR381+iuqDcMadMDRX03+mmrHsMfrgKO/GvxV1ZZhD9cBR3819+uqPcMerQOO/mrsV1abhj1YBxz91dSvrXYNe6wOOPqroV9dbRv2UB1w9Fczv77aN+yROuDor0a+oNo47IE64OivJr6k2jnscTrg6K8GvqjaOuxhOuDor+a9rNo77FE64Oivxr2w2jzsQTrg6K+mvbTaPewxOuDor4a9uNo+7CE64OivZr282j/sETrg6K9GvaI6YNgDdMDRX016TXXCsPvrgKO/GvSq6ohhd9cBR38153XVGcPurWNLHH/7y+3VY3mqaswrq0OG3VnHljjuUT2Vp6qmvLY6Zdh9dcDRXw15dXXMsLvqgKO/mvH66pxh99QBR3814huqg4bdUQcc/dWEb6lOGnY/HXD0VwO+qTpq2N10wNFfzfe26qxh99IBR3813hurw4bdSQcc/dV0b61OG3YfHXD0V8O9uTpu2F10wNFfzfb26rxhv9dwbgmO/mq0d6gOHPWvGs4twdFfTfYe1YmD4JgeR9YBBxxRBxxwRB1wwPGjOvUkOOB4qY49Dg44Xqtzj4IDjrfq4MPggKOqkw+CA4736uhfPTuOWd9baQkOOGJwwBGDA44YHHDE4IAjBgccMTjgiMEBRwwOOGJwwBGDA44YHHDE4IAjBgccMTjgiMEBRwwOOGJwwBGDA44YHHDE4IAj9uw4Zv1i/JaeHcc9qkeh0+CAIwYHHDE44IjBAUcMDjhicMARgwOOGBxwxOCAIwYHHDE44IjBAUcMDjhicMARgwOOGBxwxOCAIwYHHDE44IjBAUcMDjhiz45jy/dW/qhXG3bft/rAS4MDjhgccMTggCMGBxwxOOCIwQFHDA44YnDAEYMDjhgccMTggCMGBxwxOOCIwQFHDA44YnDAEYMDjhgccMTggCMGBxwxOOCIPTuOLb8Y/9ufn6T6vIt7dhz3qB6FToMDjhgccMTggCMGBxwxOOCIwQFHDA44YnDAEYMDjhgccMTggCMGBxwxOOCIwQFHDA44YnDAEYMDjhgccMTggCMGBxwxOOCIPTuOWd9bWfsqyqLggCMGBxwxOOCIwQFHDA44YnDAEYMDjhgccMTggCMGBxwxOOCIwQFHDA44YnDAEYMDjhgccMTggCMGBxwxOOCIwQFHDA44Ys+OY9Yvxq+P8NieHcc9qkeh0+CAIwYHHDE44IjBAUcMDjhicMARgwOOGBxwxOCAIwYHHDE44IjBAUcMDjhicMARgwOOGBxwxOCAIwYHHDE44IjBAUcMDjhicKzHseV7K4ta+5ILHHDE4IAjBgccMTjgiMEBRwwOOGJwwBGDA44YHHDE4IAjBgccMTjgiMEBRwwOOGJwwBGDA44YHHDE4IAjBgccMTjgiMEBRwyO9Ti2/GL8RdXnXRwc63F8+uCAIwYHHDE44IjBAUcMDjhicMARgwOOGBxwxOCAIwYHHDE44IjBAUcMDjhicMARgwOOGBxwxOCAIwYHHDE44IjBAUcMDjhie8GxZfUoFrfleytrX0VZFBxwxOCAIwYHHDE44IjBAUcMDjhicMARgwOOGBxwxOCAIwYHHDE44IjBAUcMDjhicMARgwOOGBxwxOCAIwYHHDE44IjBAUcMjvU4tvxi/PoIjw2O9Tg+fXDAEYMDjhgccMTggCMGBxwxOOCIwQFHDA44YnDAEYMDjhgccMTggCMGBxwxOOCIwQFHDA44YnDAEYMDjhgccMTggCMGBxwxOOCIwQFHDA44YnDAEYMDjhgccMTggCMGBxwxOOCIwQFHDA44YnDAEYMDjhgccMTggCMGBxwxOOCIwQFHDA44YnDAEYMDjhgccMTggCMGBxwxOOCIwQFHDA44YnDAEYMDjhgccMTggCMGBxwxOOCIwQFHDA44YnDAEYMDjhgccMTggCMGBxwxOOCIwQFHDA44YnDAEYMDjhgcemhwKAaHYnAoBodicCgGh2JwKAaHYnAoBodicCgGh2JwKAaHYnAoBodicCgGh2JwKAaHYnAoBodicCgGh2JwKAaHYnAoBodicCgGh2JwKAaHYnAoBodicCgGh2JwKAaHYnAoBodicCgGh2JwKAaHQt+//x9BTLpVCGZNTAAAAABJRU5ErkJggg=="},1728:function(e,t,a){e.exports=a.p+"static/media/searchStudent.d877e5a3.svg"},1738:function(e,t,a){e.exports=a.p+"static/media/MegaphoneIcon.bea0b455.svg"},1739:function(e,t,a){e.exports=a.p+"static/media/calender.0c44426f.svg"},1740:function(e,t,a){"use strict";var s=a(1),i=a.n(s),n=(a(1346),a(2249)),o=a(1186),l=a.n(o);t.a=function(e){let{toggleSuccessModal:t,goToNotification:a,createdSessionId:s}=e;const{t:o}=Object(n.a)();return i.a.createElement("div",{className:"TrialLiveSuccessWrapper"},i.a.createElement("div",{className:"TrialLiveSuccess"},i.a.createElement("div",{className:"TrialLiveSuccess__Top"},i.a.createElement("img",{onClick:t,src:l.a,alt:"X"})),i.a.createElement("div",{className:"TrialLiveSuccess__Body"},i.a.createElement("div",{className:"TrialLiveSuccess__Body__Tick"},i.a.createElement("div",{className:"TrialLiveSuccess__Body__Tick--Check"})),i.a.createElement("div",{className:"TrialLiveSuccess__Body__Text"},i.a.createElement("div",{className:"TrialLiveSuccess__Body__Text--Heading"},o("components.liveVideo.liveTrialClass.trialClassSuccess.heading","Trial Class Scheduled")),void 0!==s?i.a.createElement("div",{className:"TrialLiveSuccess__Body__Text--SubHeading"},o("components.liveVideo.liveTrialClass.trialClassSuccess.body","You can notify your students about joining")," ",i.a.createElement("br",null),o("components.liveVideo.liveTrialClass.trialClassSuccess.bodyText","this live trial class")):i.a.createElement("div",{className:"TrialLiveSuccess__Body__Text--SubHeading"},o("components.liveVideo.liveTrialClass.trialClassSuccess.bodySuccess1","Trial Class Session has been")," ",i.a.createElement("br",null),o("components.liveVideo.liveTrialClass.trialClassSuccess.bodySuccess2","successfully created"))),i.a.createElement("div",{className:"TrialLiveSuccess__Body__Button",onClick:a},void 0!==s?o("components.liveVideo.liveTrialClass.trialClassSuccess.notifyCta","Notify Students"):o("components.liveVideo.liveTrialClass.trialClassSuccess.notifyDone","Done")))))}},1770:function(e,t,a){"use strict";var s=a(1),i=a.n(s),n=a(140),o=a(5),l=a(47),c=(a(1346),a(1068)),r=a.n(c),d=a(2131),m=a.n(d),u=a(704),h=a(151),p=a(1738),v=a.n(p),g=a(2249);var b=function(e){let{token:t,dateTimeStamp:a,timeFormat:s}=e;const{t:n}=Object(g.a)();return i.a.createElement("div",{className:"LiveTrial__Modal__Body--Banner"},i.a.createElement("div",{className:"LiveTrial__Modal__Body--Banner--Left"},i.a.createElement("div",{className:"LiveTrial__Modal__Body--Banner--Left--Heading"},n("components.liveVideo.liveTrialClass.Banner.heading","Take Trial Classes")," \u2728"),i.a.createElement("div",{className:"LiveTrial__Modal__Body--Banner--Left--Description"},n("components.liveVideo.liveTrialClass.Banner.content","Promote your courses and get more students to enroll.")," ",i.a.createElement("span",{onClick:()=>window.open(`https://classplusapp.com/liveTrialInfo/?token=${t}&dateTimeStamp=${a}&timeFormat=${s}`,"_blank")}," ",n("components.liveVideo.liveTrialClass.Banner.cta","How it works?")))),i.a.createElement("div",{className:"LiveTrial__Modal__Body--Banner--Right"},i.a.createElement("img",{src:v.a,alt:""})))},C=a(152);var S=function(e){const{data:t}=e,{t:a}=Object(g.a)();return i.a.createElement("div",{className:"LiveTrial__Modal__Body__Courses"},i.a.createElement("div",{className:"LiveTrial__Modal__Body__Courses__Label"},a("components.liveVideo.liveTrialClass.CourseToPromote.heading","Course to promote")),i.a.createElement("div",{className:"LiveTrial__Modal__Body__Courses__List"},i.a.createElement("div",{className:"LiveTrial__Modal__Body__Courses__List--Item"},i.a.createElement("div",{className:"LiveTrial__Modal__Body__Courses__List--Item--Icon"},i.a.createElement("img",{src:t&&t.imageUrl||`https://${C.a}-cp-assets-public.classplus.co/cams/cards-icon/default_course.png`,alt:"icon"})),i.a.createElement("div",{className:"LiveTrial__Modal__Body__Courses__List--Item--Name"},t&&t.name))))},E=a(1455),f=a(2132),y=a.n(f),w=a(2133),A=a.n(w),M=(a(2134),a(1130)),O=a.n(M),_=a(1024),L=a.n(_);var B=function(e){const{data:t,selectorFunction:a,selected:s}=e;return i.a.createElement("div",{className:"SelectorSection__Right__Menu"},i.a.createElement("div",{className:"SelectorSection__Right__Menu__List"},t&&t.map((e,t)=>i.a.createElement("div",{key:t,className:"SelectorSection__Right__Menu__List--Item",onClick:()=>a(1,e)},i.a.createElement("label",null,e&&e.name),i.a.createElement("input",{type:e&&e.type,checked:(s&&s.value)===(e&&e.value)})))))};var D=function(e){const{data:t,selectorFunction:a,selected:s}=e,n=s&&s.map(e=>e.value);return i.a.createElement("div",{className:"SelectorSection__Right__Menu"},i.a.createElement("div",{className:"SelectorSection__Right__Menu__Search"},i.a.createElement("input",{type:"text",placeholder:"Search Batches",className:"SelectorSection__Right__Menu__Search--Input"})),t&&t.map((e,t)=>i.a.createElement("div",{key:t,className:"SelectorSection__Right__Menu--Item",onClick:()=>a(3,e)},i.a.createElement("label",null,e&&e.name),i.a.createElement("input",{type:"checkbox",checked:n&&n.includes(e.value)}))))},N=a(2135),x=a.n(N),T=a(1227),j=a.n(T);var I=function(e){const{data:t,selectorFunction:a,selected:n,activeCourse:o}
22=e,[l,c]=Object(s.useState)(),[r,d]=Object(s.useState)(),[m,u]=Object(s.useState)(),{t:h}=Object(g.a)(),p=n&&n.map(e=>e.value);return Object(s.useEffect)(()=>{t&&t.length>0&&u(t&&t.filter(e=>p&&-1==p.indexOf(e.value)))},[t]),Object(s.useEffect)(()=>{m&&c([...n,...m])},[m]),Object(s.useEffect)(()=>{r&&r.length>0?c(l&&l.filter(e=>e.name.toLowerCase().includes(r.toLowerCase()))):c(t)},[r]),i.a.createElement("div",{className:"SelectorSection__Right__Menu"},i.a.createElement("div",{className:"SelectorSection__Right__Menu__Search"},i.a.createElement("img",{src:j.a,alt:"O",style:{marginRight:"12px"}}),i.a.createElement("input",{type:"text",placeholder:h("components.liveVideo.selectStudent.course.search","Search Course"),className:"SelectorSection__Right__Menu__Search--Input",value:r,defaultValue:r,onChange:e=>d(e.target.value)}),r?i.a.createElement("img",{src:L.a,alt:"X",onClick:()=>d(""),style:{marginLeft:"12px"}}):""),i.a.createElement("div",{className:"SelectorSection__Right__Menu__Label"},i.a.createElement("span",{className:"SelectorSection__Right__Menu__Label--Courses"},h("components.liveVideo.selectStudent.course.heading","Courses")," ",i.a.createElement("span",{className:"SelectorSection__Right__Menu__Label--Courses--Count"},"(",n&&n.length,"/",t&&t.length," ",h("components.liveVideo.selectStudent.course.count","Selected"),")")),i.a.createElement("span",{className:"SelectorSection__Right__Menu__Label--Select",onClick:()=>a(4,t)},h("components.liveVideo.selectStudent.course.selectAll","SELECT ALL"))),i.a.createElement("div",{className:"SelectorSection__Right__Menu__List"},l&&0==l.length?i.a.createElement("img",{src:x.a,alt:"No Such Files",className:"SelectorSection__Right__Menu__List--Empty"}):l&&l.map((e,t)=>i.a.createElement("div",{key:t,className:"SelectorSection__Right__Menu__List--Item",onClick:()=>{e.value!=o.value&&a(2,e)}},i.a.createElement("label",null,e&&e.name),i.a.createElement("input",{type:"checkbox",checked:p&&p.includes(e.value)})))))},k=a(14);var F=function(e){const{handleClick:t,selectedSection:a,selectedCourses:s,totalCourses:n}=e,o=[{name:k.a.t("components.liveVideo.selectStudent.leftPanel.arr1name","App Downloads"),value:1},{name:k.a.t("components.liveVideo.selectStudent.leftPanel.arr2name","Courses"),value:2,count:`${s&&s.length}/${n&&n.length} ${k.a.t("components.liveVideo.selectStudent.leftPanel.arr1name","Selected")}`}];return i.a.createElement("div",{className:"LeftPanel"},o&&o.map((e,s)=>i.a.createElement("div",{key:s,className:"LeftPanel__Item",onClick:()=>t(parseInt(e.value)),style:{backgroundColor:a==e.value?"#EBF7FD":"#ffffff"}},e.name,2===parseInt(e.value)&&n&&n.length&&i.a.createElement("span",{className:"LeftPanel__Item--Count"},"(",e.count,")"))))};var V=Object(n.connect)((function(e){return{token:e&&e.persistedData&&e.persistedData.token}}),{makeApiCall:h.b})((function(e){const{data:t,selectorFunction:a,selectedAppDownload:s,selectedBatches:n,selectedCourses:o,apiData:l,updateSelectedSection:c,selectedSection:r,activeCourse:d}=e;return i.a.createElement("div",{className:"SelectorSection"},i.a.createElement("div",{className:"SelectorSection__Left"},i.a.createElement(F,{data:t,selectedSection:r,handleClick:c,selectedCourses:o,totalCourses:l&&l.responseData&&l.responseData.courseData})),i.a.createElement("div",{className:"SelectorSection__Right"},(e=>{switch(e){case 1:return i.a.createElement(B,{data:l&&l.responseData&&l.responseData.appDownloads,selectorFunction:a,selected:s});case 2:return i.a.createElement(I,{data:l&&l.responseData&&l.responseData.courseData,selectorFunction:a,selected:o,activeCourse:d});case 3:return i.a.createElement(D,{data:l&&l.responseData&&l.responseData.batchData,selectorFunction:a,selected:n})}})(r)))}));var R=Object(n.connect)((function(e){return{token:e&&e.persistedData&&e.persistedData.token}}),{makeApiCall:h.b})((function(e){const{data:t,toggleModal:a,selectorFunction:n,selectedAppDownload:l,selectedBatches:c,selectedCourses:r,apiData:d,updateSelectedSection:m,selectedSection:u,defaultSelection:h,activeCourse:p,makeApiCall:v}=e,[b,C]=Object(s.useState)(l),[S,E]=Object(s.useState)(r),[f,y]=Object(s.useState)(c),{t:w}=Object(g.a)(),[A,M]=Object(s.useState)(),_=(e,t)=>
22{switch(e){case 1:return B(t);case 2:return D(t);case 3:return N(t);case 4:return T(t);default:return x()}},B=e=>{C(e)},D=e=>{let t,a=S&&S.map(e=>e&&e.value);t=a&&a.includes(e&&e.value)?S&&S.filter(t=>t.value!=e.value):[...S,e],E(t)},N=e=>{let t,a=f&&f.map(e=>e&&e.value);t=a&&a.includes(e&&e.value)?f&&f.filter(t=>t.value!=e.value):[...f,e],y(t)},x=()=>{C(h),y([]),E([p])},T=e=>{E(e)};return Object(s.useEffect)(()=>{b&&(()=>{M();const e=b&&b.value,t=S&&S.map(e=>e.value);v(`/v2/course/live/trial/getStudentCountByCohorts?appDownloads=${e}&courseIds=[${t}]`,"GET",void 0,e=>{e&&e.data&&e.data.uniqueStudents&&e.data.uniqueStudents>7e3?M(e&&e.data&&e.data.text1):M(e&&e.data&&e.data.text)},e=>console.log(e),!0)})()},[b,S,f]),i.a.createElement("div",{className:"SelectStudentWrapper"},i.a.createElement("div",{className:"SelectStudentModal"},i.a.createElement("div",{className:"SelectStudentModal__Top"},i.a.createElement("div",{className:"SelectStudentModal__Top__Left"},i.a.createElement("img",{src:O.a,alt:"<=",onClick:()=>{a()},width:"21px",height:"21px"}),i.a.createElement("div",{className:"SelectStudentModal__Top__Left--Heading"},w("components.liveVideo.selectStudent.SelectStudentModal.select","Select Students"))),i.a.createElement("div",{className:"SelectStudentModal__Top__Right"},i.a.createElement("div",{className:"SelectStudentModal__Top__Right--Clear",onClick:()=>_()},w("components.liveVideo.selectStudent.SelectStudentModal.clear","CLEAR")),i.a.createElement("img",{src:L.a,alt:"x",width:"16px",height:"16px",onClick:a}))),i.a.createElement("div",{className:"SelectStudentModal__Body"},i.a.createElement("div",{className:"SelectStudentModal__Body__Count"},i.a.createElement("span",{className:"SelectStudentModal__Body__Count--InfoIcon"},"i"),A||w("components.liveVideo.selectStudent.SelectStudentModal.calculate","Calculating Students...")),i.a.createElement(V,{data:t,apiData:d,selectedSection:u,selectedAppDownload:b,selectedBatches:f,selectedCourses:S,selectorFunction:_,activeCourse:p,updateSelectedSection:m})),i.a.createElement("div",{className:"SelectStudentModal__Bottom"},i.a.createElement("div",{className:"SelectStudentModal__Bottom--Done",onClick:()=>{b||S&&S.length>0?(n(1,b),n(2,S),n(3,f),a()):o.toastr.warning(w("components.liveVideo.selectStudent.SelectStudentModal.toast.error","Error"),w("components.liveVideo.selectStudent.SelectStudentModal.toast.errorContent","Please select students to add"))}},w("components.liveVideo.selectStudent.SelectStudentModal.done","Done")))))}));var H=Object(n.connect)((function(e){var t;return{token:e&&e.persistedData&&e.persistedData.token,isEditModal:e&&e.modal&&e.modal.isTrialScheduled,orgDetails:null===e||void 0===e||null===(t=e.persistedData)||void 0===t?void 0:t.organization}}),{makeApiCall:h.b})((function(e){var t,a;const{arrayData:n,showModal:o,toggleModal:l,selectorFunction:c,selectedAppDownload:r,selectedBatches:d,selectedCourses:m,setDefaultSelection:u,defaultSelection:h,activeCourse:p,makeApiCall:v,isEditModal:b,studentCount:C}=e,[S,E]=Object(s.useState)(1),[f,w]=Object(s.useState)(),[M,O]=Object(s.useState)(0),[_,L]=Object(s.useState)(),[B,D]=Object(s.useState)(10),[N,x]=Object(s.useState)(0),[T,j]=Object(s.useState)(""),{t:I}=Object(g.a)();Object(s.useEffect)(()=>{L((e=>{switch(e){case 1:return"type=appDownloadsTrialLive";case 2:return`type=course&limit=${B}&offset=${N}&search=${T}`;case 3:return`type=batch&limit=${B}&offset=${N}&search=${T}`}})(S))},[S]),Object(s.useEffect)(()=>{v("v2/live/trialStudents?type=appDownloadsTrialLive","GET",void 0,e=>{w(e&&e.data),O(M+1)},e=>console.log(e),!0)},[]),Object(s.useEffect)(()=>{"type=appDownloadsTrialLive"===_&&1===M&&u(f&&f.responseData&&f.responseData.appDownloads&&f.responseData.appDownloads[0])},[M]),Object(s.useEffect)(()=>{h&&!b&&c(1,h)},[h]);const k=[...r?[r]:[],...m?m.slice(0,5):[]];return i.a.createElement("div",{className:"LiveTrial__Modal__Body__Who"},i.a.createElement("div",{className:"LiveTrial__Modal__Body__Who--Label"},I("components.liveVideo.liveTrialClass.Eligible.heading","Who can join this class")),i.a.createElement("div",{className:"LiveTrial__Modal__Body__Who--List"},i.a.createElement("div",{className:"LiveTrial__Modal__Body__Who--List--Left"},k&&k.map((e,t)=>i.a.createElement("div",{className:"LiveTrial__Modal__Body__Who--List--Left--Item",key:t},i.a.createElement("span",{className:"LiveTrial__Modal__Body__Who--List--Left--Item--Text"},e&&e.name),b||0===t||e===p?"":i.a.createElement("span",{className:"LiveTrial__Modal__Body__Who--List--Left--Item--Close",onClick:()=>c(2,e)},i.a.createElement("img",{src:y.a,alt:""})," ")))),b?"":i.a.createElement("div",{className:"LiveTrial__Modal__Body__Who--List--Right",onClick:l},i.a.createElement("img",{src:A.a,alt:"+"})," ",I("components.liveVideo.liveTrialClass.Eligible.addCta","Add"))),i.a.createElement("div",{className:"LiveTrial__Modal__Body__Who--Info"},i.a.createElement("span",null,"i"),C&&12566!=(null===e||void 0===e||null===(t=e.orgDetails)||void 0===t?void 0:t.id)&&4966!=(null===e||void 0===e||null===(a=e.orgDetails)||void 0===a?void 0:a.id)?C:I("components.liveVideo.liveTrialClass.Eligible.loading","Calculating students...")),o&&i.a.createElement(R,{data:n,apiData:f,selectedSection:S,selectedAppDownload:r,selectedBatches:d,selectedCourses:m,toggleModal:l,defaultSelection:h,activeCourse:p,selectorFunction:c,updateSelectedSection:E}))})),G=a(1453),P=a(1456),U=a(1454),Y=a(1043),z=a.n(Y),Z=a(1739),W=a.n(Z),q=a(1177),$=a.n(q),Q=a(25),X=a.n(Q);var K=function(e){const{t:t}=Object(g.a)(),{date:a,time:s,scheduleDate:n,scheduleTime:o}=e;return i.a.createElement("div",{className:"LiveTrial__Modal__Body__DateTime"},i.a.createElement("div",{className:"LiveTrial__Modal__Body__DateTime__Col"},i.a.createElement("div",{className:"LiveTrial__Modal__Body__DateTime__Col--Label"},t("components.liveVideo.liveTrialClass.setDateTime.setDate","Set Date")),i.a.createElement(z.a,{className:"LiveTrial__Modal__Body__DateTime__Col--Scheduler",dateFormat:"DD-MM-YYYY",isValidDate:e=>
22e.isAfter(X()(new Date).subtract("1","days")),timeFormat:!1,closeOnSelect:!0,value:a,defaultValue:a||X()(new Date).add("1","day"),onChange:e=>{n(e)},renderInput:e=>i.a.createElement("div",null,i.a.createElement("input",Object.assign({},e,{className:"LiveTrial__Modal__Body__DateTime__Col--Scheduler--Input",placeholder:t("components.liveVideo.liveTrialClass.setDateTime.selectDate","Select date")})),i.a.createElement("img",{width:"18px",height:"18px",className:"LiveTrial__Modal__Body__DateTime__Col--Scheduler--Icon",src:W.a,alt:""}))})),i.a.createElement("div",{className:"LiveTrial__Modal__Body__DateTime__Col"},i.a.createElement("div",{className:"LiveTrial__Modal__Body__DateTime__Col--Label"},t("components.liveVideo.liveTrialClass.setDateTime.setTime","Set Time")),i.a.createElement(z.a,{className:"LiveTrial__Modal__Body__DateTime__Col--Scheduler",dateFormat:!1,isValidDate:e=>e.isAfter(X()(new Date).subtract("1","days")),timeFormat:!0,closeOnSelect:!0,value:s,defaultValue:s||X()(new Date),onChange:e=>{o(e)},renderInput:e=>i.a.createElement("div",null,i.a.createElement("input",Object.assign({},e,{className:"LiveTrial__Modal__Body__DateTime__Col--Scheduler--Input",placeholder:t("components.liveVideo.liveTrialClass.setDateTime.selectTime","Select Time")})),i.a.createElement("img",{width:"18px",height:"18px",className:"LiveTrial__Modal__Body__DateTime__Col--Scheduler--Icon",src:$.a,alt:""}))})))};const J={1:{section:"App Downloads",type:"radio",items:[{label:"All app downloads",id:0},{label:"New app downloads",id:1},{label:"Not purchased any course",id:2},{label:"Upto 30 days from download",id:3},{label:"Upto 10 days from download",id:4}]},2:{section:"Courses",type:"checkbox",items:[{label:"All app downloads",id:0},{label:"New app downloads",id:1},{label:"Not purchased any course",id:2},{label:"Upto 30 days from download",id:3},{label:"Upto 10 days from download",id:4}]}};var ee=a(15),te=a(253),ae=a(1347),se=a(1271),ie=a(179);t.a=Object(n.connect)((function(e){var t,a,s,i,n,o,l;return{showTrialModal:e&&e.modal&&e.modal.showTrialLiveModal,token:e&&e.persistedData&&e.persistedData.token,isEditModal:e&&e.modal&&e.modal.isTrialScheduled,isAgora:e&&e.modal&&e.modal.isAgora,sessionId:e&&e.modal&&e.modal.trialSessionId,dateTimeStamp:null===e||void 0===e||null===(t=e.persistedData)||void 0===t||null===(a=t.organization)||void 0===a?void 0:a.dateTimeStamp,timeFormat:null===e||void 0===e||null===(s=e.persistedData)||void 0===s||null===(i=s.organization)||void 0===i?void 0:i.timeFormat,orgDetails:null===e||void 0===e||null===(n=e.persistedData)||void 0===n?void 0:n.organization,isGlobalContentLibraryEnabled:null===e||void 0===e||null===(o=e.persistedData)||void 0===o||null===(l=o.organization)||void 0===l?void 0:l.isGlobalContentLibraryEnabled}}),{CloseTrialLiveModal:u.a,makeApiCall:h.b})((function(e){var t;const{CloseTrialLiveModal:a,makeApiCall:n,token:c,data:d,isEditModal:u,isAgora:h,sessionId:p,fetchCourseDetails:v,isLiveVideoScreen:C,dateTimeStamp:f,timeFormat:y,setForceCloseliveModalState:w,isDuplicate:A,isGlobalContentLibraryEnabled:M}=e,[O,_]=Object(s.useState)(!1),[B,D]=Object(s.useState)(),[N,x]=Object(s.useState)(""),[T,j]=Object(s.useState)(!1),[I,k]=Object(s.useState)(!1),[F,V]=Object(s.useState)(!1),[R,Y]=Object(s.useState)(X()(new Date).add("1","day")),[z,Z]=Object(s.useState)(X()(new Date)),[W,q]=Object(s.useState)(!1),[$,Q]=Object(s.useState)(!1),[ne,oe]=Object(s.useState)(),[le,ce]=Object(s.useState)(),[re,de]=Object(s.useState)([]),[me,ue]=Object(s.useState)([]),[he,pe]=Object(s.useState)(),[ve,ge]=Object(s.useState)(0),[be,Ce]=Object(s.useState)(!1),[Se,Ee]=Object(s.useState)(""),[fe,ye]=Object(s.useState)([]),[we,Ae]=Object(s.useState)(""),[Me,Oe]=Object(s.useState)(!0),[_e,Le]=Object(s.useState)({}),[Be,De]=Object(s.useState)(),[Ne,xe]=Object(s.useState)(),[Te,je]=Object(s.useState)(!1),[Ie,ke]=Object(s.useState)({}),[Fe,Ve]=Object(s.useState)({}),{t:Re}=Object(g.a)();Object(s.useEffect)(()=>{Fe&&Le(Fe)},[Fe]);const He=e=>{pe(e)},Ge=e=>{let t;t=(re&&re.map(e=>e&&e.value)).includes(e&&e.value)?re&&re.filter(t=>t.value!=e.value):[...e],de(t)},Pe=e=>{let t;t=(me&&me.map(e=>e&&e.value)).includes(e&&e.value)?me&&me.filter(t=>t.value!=e.value):[...e],ue(t)},Ue=()=>{pe(),de([le]),ue([])};return Object(s.useEffect)(()=>{$&&(N?(()=>{je(!0),Q(!1);let e=X()(R.format("DD-MM-YYYY")+" "+z.format("HH:mm:ss"),"DD-MM-YYYY HH:mm:ss").valueOf();const t=re&&re.map(e=>e.value),s=me&&me.map(e=>e.value);let i={entityId:[d&&d.id],type:4,isAgora:h,title:N,scheduleTime:e,parentFolderId:Se||void 0,isSchedule:1,isWeb:I?1:0,showVideoOnWeb:T?1:0,sendSms:F?1:0,isTrial:1,studentList:{appDownloads:{value:he&&he.value},courses:{value:t},batches:{value:s}},assigneeUserId:null===_e||void 0===_e?void 0:_e.userId,assigneeTutorId:null===_e||void 0===_e?void 0:_e.tutorId,assigneeName:Object(ee.E)(null===_e||void 0===_e?void 0:_e.name)};const l=Object(te.l)("createTrialClass",null===d||void 0===d?void 0:d.liveCard,{data1:i,liveSessionId:p,edit:!u||A&&u?0:1,isAgora:h});n(l.url,l.method,l.payload,e=>{e.data=Object(te.f)(e.data),u?o.toastr.success(Re("components.liveVideo.liveTrialClass.LiveTrial.toast.success","SUCCESS"),e&&e.message):(e&&e.data&&e.data.isTutorPremium,o.toastr.success("SUCCESS",Re("components.LiveVideo.goLiveModalCourse.toast.successDuplicateLiveClassScheduled","Live class created successfully!"))),a(),C||v()},e=>{je(!1),Object(te.o)(e,w,a)})})():(o.toastr.error(Re("components.liveVideo.liveTrialClass.LiveTrial.toast.error","Error"),Re("components.liveVideo.liveTrialClass.LiveTrial.toast.errorContent","Please enter topic of class")),Q(!1)))},[$]),Object(s.useEffect)(()=>{u&&_(!0)},[u]),Object(s.useEffect)(()=>{O&&(()=>{const e=Object(te.l)("getLiveEditData",null===d||void 0===d?void 0:d.liveCard,{isAgora:h,sessionId:p});n(e.url,e.method,void 0,e=>{e&&e.data&&(e.data=Object(te.k)(e.data));const{defaultAssignee:t,currentUser:a}=e.data;ke(t),Ve(a),D(e&&e.data)},e=>console.log(e),!0)})()},[O]),Object(s.useEffect)(()=>{d&&ce({name:d&&d.details&&d.details.name,value:d&&d.id})},[d]),Object(s.useEffect)(()=>{le&&!u&&de([le])}
22,[le]),Object(s.useEffect)(()=>{B&&(Y(X()(B&&B.scheduleTime)),Z(X()(B&&B.scheduleTime)),j(B&&B.showVideoOnWeb),k(B&&(null===B||void 0===B?void 0:B.isWeb)),B&&B.studentMapData&&B.studentMapData.courses&&de(B&&B.studentMapData&&B.studentMapData.courses),pe(B&&B.studentMapData&&B.studentMapData.appDownloads),x(B&&B.title),B&&B.parentFolderDetails&&B.parentFolderDetails.folderName&&(Ee(B.parentFolderDetails.folderId),Ae(B.parentFolderDetails.folderName),ge(1)))},[B]),Object(s.useEffect)(()=>{N&&_(!1)},[N]),Object(s.useEffect)(()=>{!he||B||A||(()=>{De(),xe();const e=he&&he.value,t=re&&re.map(e=>e.value);n(`/v2/course/live/trial/getStudentCountByCohorts?appDownloads=${e}&courseIds=[${t}]`,"GET",void 0,e=>{if(e&&e.data&&e.data.uniqueStudents&&e.data.uniqueStudents>7e3?De(e&&e.data&&e.data.text1):De(e&&e.data&&e.data.text),e&&e.data&&e.data.creditsText&&xe(e.data.creditsText),!u){const{defaultAssignee:t,currentUser:a}=e.data;ke(t),Ve(a)}},e=>console.log(e),!0)})()},[he,re,me]),Object(s.useEffect)(()=>{0===ve&&(Ee(""),Ae(""))},[ve]),O?i.a.createElement(l.r,null):i.a.createElement("div",{className:"LiveTrial"},be&&i.a.createElement(se.a,{title:"Select Folder",infoLabelText:"Following is the list of folders mapped with the courses selected",searchBarPlaceholder:"Search Folder",acceptText:"Save",name:"Folders",count:null===fe||void 0===fe?void 0:fe.folderCount,type:"radio",selectedCourse:Se,hasMore:Me,setHasMore:Oe,setSelectedCourse:Ee,rejectAction:()=>Ce(!1),crossAction:()=>Ce(!1),fetchData:async e=>{var t;let a=re.map(e=>e.value),s=await Object(ie.i)({courseIds:a,limit:e.limit,offset:e.offset,search:e.search});var i,n,o,l,c;(ye(null===s||void 0===s||null===(t=s.data)||void 0===t?void 0:t.data),null!==fe&&void 0!==fe&&fe.folderDetailsResult&&!e.isBack)?(ye({...fe,folderDetailsResult:[...fe.folderDetailsResult,...null===s||void 0===s||null===(i=s.data)||void 0===i||null===(n=i.data)||void 0===n?void 0:n.folderDetailsResult]}),0===(null===s||void 0===s||null===(o=s.data)||void 0===o||null===(l=o.data)||void 0===l?void 0:l.folderDetailsResult.length)?Oe(!1):Oe(!0)):ye(null===s||void 0===s||null===(c=s.data)||void 0===c?void 0:c.data)},courseList:(null===fe||void 0===fe?void 0:fe.folderDetailsResult)||fe,acceptAction:()=>{Ce(!1)},isGlobalFolderList:!0,setFolders:e=>ye(e),setGlobalFolderName:e=>Ae(e)}),i.a.createElement("div",{className:"LiveTrial__Modal"},i.a.createElement("div",{className:"LiveTrial__Modal__Top"},i.a.createElement("div",{className:"LiveTrial__Modal__Top--Heading"},((e,t)=>e&&!t?Re("components.liveVideo.liveTrialClass.LiveTrial.headingEditTrialClass","Edit Trial Class"):e&&t?Re("components.liveVideo.liveTrialClass.LiveTrial.headingDuplicateTrialClass","Duplicate Trial Class"):Re("components.liveVideo.liveTrialClass.LiveTrial.heading","Live Trial Class"))(u,A)),i.a.createElement("div",{className:"LiveTrial__Modal__Top--Close",onClick:()=>a(!1)},i.a.createElement("img",{src:L.a,alt:"x",width:"16px",height:"16px"}))),i.a.createElement("div",{className:"LiveTrial__Modal__Body"},i.a.createElement(b,{token:c,dateTimeStamp:f,timeFormat:y}),i.a.createElement(S,{data:d&&d.details}),i.a.createElement(E.a,{topic:N,handleTopicChange:e=>{x(e.target.value)},placeholder:Re("components.liveVideo.liveTrialClass.LiveTrial.placeholder","What will you teach in this class?")}),i.a.createElement(H,{studentCount:Be,arrayData:J,showModal:W,selectedAppDownload:he,selectedBatches:me,selectedCourses:re,defaultSelection:ne,activeCourse:le,toggleModal:()=>{q(!W)},setDefaultSelection:oe,selectorFunction:(e,t)=>{switch(e){case 1:return He(t);case 2:return Ge(t);case 3:return Pe(t);default:return Ue()}}}),1===M&&i.a.createElement("div",{className:"folderSelectContainer"},i.a.createElement("div",{style:{fontWeight:"500",fontSize:"14px"}},"LIVE CLASS RECORDING WILL BE SAVED IN:"),i.a.createElement("div",{className:"selectFolderContainer"},[{text:"Default Live Class Folder",value:0,key:0,isNew:!1,info:""},{text:"Global Folder",value:1,key:1,isNew:!0,info:"Folders which can be globally updated in multiple courses all at once"}].map((e,t)=>i.a.createElement("label",{key:t,className:"pt-2",style:{marginRight:"32px",display:"flex",justifyContent:"center",alignItems:"center"}},i.a.createElement("input",{checked:ve==e.value,onClick:()=>ge(e.value),type:"radio",style:{marginRight:"8px"}}),i.a.createElement("span",null,e.text)," ",""!==e.info&&i.a.createElement(l.v,{flowing:!0,hoverable:!0,content:"Folders which can be globally updated in multiple courses all at once",trigger:i.a.createElement("img",{src:r.a,alt:"Breakup",style:{cursor:"pointer",marginLeft:"0.5rem",height:"12px"}}),position:"bottom left"}),e.isNew&&i.a.createElement("div",{className:"newTag"},"New")))),1===ve&&i.a.createElement("div",{style:{marginBottom:"24px"}},i.a.createElement(ae.a,{showAddMoreBtn:!0,selectedEntities:[{name:we}],addMoreEntitiesText:"Add",onAddMoreEntities:()=>{Ce(!0)}}))),i.a.createElement(K,{date:R,time:z,scheduleDate:Y,scheduleTime:Z}),null!==e&&void 0!==e&&null!==(t=e.orgDetails)&&void 0!==t&&t.canAssignLiveClass?i.a.createElement(P.a,{setAssigneeDetails:Le,defaultAssignee:Ie,currentUser:Fe,isTrial:!0}):null,i.a.createElement(G.a,{isTrial:!0,videoRestriction:I,downloadRestriction:T,handleVideoRestriction:()=>{k(!I)},handleDownloadRestriction:()=>{j(!T)}}),i.a.createElement(U.a,{smsNotification:F,toggleNotification:()=>{V(!F)}})),i.a.createElement("div",{className:"LiveTrial__Modal__Bottom"},i.a.createElement("button",{disabled:Te,className:"LiveTrial__Modal__Bottom--Button",onClick:()=>Q(!0)},Te?Re("components.liveVideo.liveTrialClass.LiveTrial.loading","LOADING..."):u&&!A?Re("components.liveVideo.liveTrialClass.LiveTrial.update","Update Trial Class"):A?Re("components.liveVideo.liveTrialClass.LiveTrial.duplicate","Duplicate Trial Class"):Re("components.liveVideo.liveTrialClass.LiveTrial.schedule","Schedule Trial Class")),u?i.a.createElement("div",{className:"LiveTrial__Modal__Bottom--Delete",onClick:()=>(()=>{const e=Object(te.l)("deleteLiveSession",null===d||void 0===d?void 0:d.liveCard,{isAgora:h,liveSessionId:p,isExistingSession:u});n(e.url,e.method,e.payload,e=>{o.toastr.success(Re("components.liveVideo.liveTrialClass.LiveTrial.toast.success","SUCCESS"),e&&e.message),a(),v()},()=>{})})()},i.a.createElement("img",{src:m.a,alt:"Trash"})," ",Re("components.liveVideo.liveTrialClass.LiveTrial.delete","Delete this class")):"")))}))},1778:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABJSURBVHgB7dOxDQAQEEbhRwxkIzZhRBvRnERFcicqL/nb76qDhxWZGemyiLIVySj7yB7RDC+Q42J1uZAwVj9mwrZPGzhDs8aLBmCBM8N7PURjAAAAAElFTkSuQmCC"},1789:function(e,t,a){e.exports=a.p+"static/media/announcement.0624bc60.svg"},1890:function(e,t,a){e.exports=a.p+"static/media/tags.912c84d2.svg"},1953:function(e,t,a){},1954:function(e,t,a){e.exports={bodyLabel1:"SelectCourseModal_bodyLabel1__3lDWt"}},1955:function(e,t,a){e.exports=a.p+"static/media/NewTagYellow.4b03550d.svg"},1956:function(e,t,a){e.exports=a.p+"static/media/YellowExcla.7dc2f31a.svg"},1957:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAOCAYAAAAi2ky3AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACbSURBVHgBpc7LDYMwEATQWVJIRAcpIZ0kN5QqcIqIIm5QCXRi0QiGtTHiL68ZybIP46cBruanH3wRrqRoXyBTwpBKEBuP2HQUt2iOGPNFlio5tIPwUwYdIDLoBOEkYym3xUjELfrrJ25UuxK9kd0rKeIWfdLGFiw7fJgvC0TcoumTViDKp2UeDkCW0BrzCUC20GZZGHIcxvgI0gPkvWUpXTQ20AAAAABJRU5ErkJggg=="},1958:function(e,t,a){},1959:function(e,t,a){e.exports=a.p+"static/media/InfoIcon.7dc2f31a.svg"},2130:function(e,t,a){"use strict";var s=a(1),i=a.n(s),n=a(1036),o=a.n(n),l=a(457),c=a.n(l),r=a(140),d=a(5),m=a(25),u=a.n(m),h=a(151),p=a(14),v=a(15),g=a(253);t.a=c()(Object(r.connect)((function(e){var t,a,s,i,n,o,l,c,r;
22return{batchInfo:e.batchSettings&&e.batchSettings.data&&e.batchSettings.data.info,liveCard:e.batchDetail&&e.batchDetail.data.liveCard,persistedData:e.persistedData,timeFormat:null===e||void 0===e||null===(t=e.persistedData)||void 0===t||null===(a=t.organization)||void 0===a?void 0:a.timeFormat,dateTimeStamp:null===e||void 0===e||null===(s=e.persistedData)||void 0===s||null===(i=s.organization)||void 0===i?void 0:i.dateTimeStamp,useNewLiveService:Object(v.e)(),batchCode:null===e||void 0===e||null===(n=e.batchDetail)||void 0===n||null===(o=n.data)||void 0===o?void 0:o.batchCode,courseId:null===e||void 0===e||null===(l=e.storeData)||void 0===l||null===(c=l.activeCourseDetails)||void 0===c||null===(r=c.metaData)||void 0===r?void 0:r.id}}),{makeApiCall:h.b})((function(e){var t,a,n,l,c,r;let m,h,{liveCard:b,courseLiveCard:C}=e;function S(){localStorage.removeItem("liveVideoData"),localStorage.removeItem("studentReload")}b||(b=C),b?(m=e.useNewLiveService?Object(v.t)(b):b.isAgora,void 0===m&&(m=v.b.AGORA),h=e.useNewLiveService?Object(v.u)(b):b.cta?b.cta.isExistingSession:b.isExistingSession):(m=v.b.AGORA,h=0),Object(s.useEffect)(()=>{let t=localStorage.getItem("liveVideoData"),a=localStorage.getItem("studentReload");window.location.search.slice(1).split("&").map(e=>e.split("=")).reduce((e,t)=>(e[t[0]]=t[1],e),{}).exit&&S();let s=t?JSON.parse(t):{},{liveSessionId:i,streamKey:n}=s;if(a&&i){const t=Object(g.l)("endLiveClass",b,{streamKey:n,liveSessionId:i,isAgora:m});e.makeApiCall(t.url,t.method,t.payload,()=>{S(),d.toastr.info(p.a.t("components.LiveVideo.goLiveScreenStudent.toast.info","Please rejoin the class")),window.location.reload(!0)},()=>{S()})}},[]);const E=t=>{var a;const{persistedData:s,makeApiCall:i}=e,n=e.useNewLiveService||null!==s&&void 0!==s&&null!==(a=s.organization)&&void 0!==a&&a.mmServiceEnabledOnCourses?Object(v.w)(b):(1===t?v.h:v.j)(b);Object(g.d)({liveCard:b,isAgora:m,liveSessionId:n,isExistingSession:h,history:e.history,user:s.user,callback1:()=>{d.toastr.info(p.a.t("components.LiveVideo.goLiveScreenStudent.toast.info","Something went wrong!"))},makeApiCall:i,location:e.location,batchCode:null===e||void 0===e?void 0:e.batchCode,courseId:null===e||void 0===e?void 0:e.courseId})};return i.a.createElement("div",{className:o.a.GoLiveTutorContainer},i.a.createElement("div",{className:o.a.GoLiveTutorHeader,style:{justifyContent:"space-between"}},i.a.createElement("div",{className:o.a.GoLiveTutorHeaderText},p.a.t("components.LiveVideo.goLiveScreenStudent.heading","Live Class")),i.a.createElement("div",{className:o.a.GoLiveTutorHeaderLabel},p.a.t("components.LiveVideo.goLiveScreenStudent.content","Live"))),i.a.createElement("div",{className:o.a.GoLiveTutorHeaderText,style:{whiteSpace:"pre-line",margin:"12px 0px"}},b.text?b.text:i.a.createElement(i.a.Fragment,null,b.text1,""+(b.scheduledTime?u()(b.scheduledTime).format(e.dateTimeStamp?null===(t=e.dateTimeStamp)||void 0===t?void 0:t.toUpperCase():"MMM Do, YYYY")+" at "+u()(b.scheduledTime).format(e.timeFormat?e.timeFormat:"h:mm A"):""),b.text2)),i.a.createElement("div",{className:o.a.SingleContentImgText},b.emblem&&i.a.createElement("div",null,i.a.createElement("img",{src:b.emblem.iconUrl,height:"14px",width:"16px"}),i.a.createElement("span",{className:o.a.GoLiveStudentTimeText},Object(v.v)(b)||b.scheduleTime?u()(Object(v.v)(b)||b.scheduleTime).format(`${e.dateTimeStamp?null===(a=e.dateTimeStamp)||void 0===a?void 0:a.toUpperCase():"MMM Do, YYYY"} ${e.timeFormat?e.timeFormat:"h:mm A"}`):null!==(n=b)&&void 0!==n&&null!==(l=n.emblem)&&void 0!==l&&l.startDateEpoch&&null!==(c=b)&&void 0!==c&&null!==(r=c.emblem)&&void 0!==r&&r.endDateEpoch?`${u()(b.emblem.startDateEpoch).format(e.timeFormat?e.timeFormat:"LT")} - ${u()(b.emblem.endDateEpoch).format(e.timeFormat?e.timeFormat:"LT")}`:b.emblem.startDateEpoch?""+u()(b.emblem.startDateEpoch).format(e.timeFormat?e.timeFormat:"LT"):"")),i.a.createElement("div",{onClick:()=>{!function(){const t=Object(v.k)(b);if(b.cta&&Object(v.k)(b)==v.a.UTIL_BROWSER)window.open(Object(v.h)(b));else if(t==v.a.AGORA_LIVE||t==v.a.OPEN_VIDU_LIVE||t==v.a.MM_LIVE)E(1);else if(t==v.a.AGORA_SCHEDULED||t==v.a.OPEN_VIDU_SCHEDULED||t==v.a.MM_SCHEDULED){const t=u()().valueOf();parseInt(e.useNewLiveService?Object(v.v)(b):Object(v.h)(b))>t?d.toastr.info("INFO",e.useNewLiveService?Object(v.p)(b):Object(v.i)(b)):E(2)}}()},className:o.a.GoLiveStudentLiveNow},b.cta.text)))})))},2131:function(e,t,a){e.exports=a.p+"static/media/trashRed.261433a9.svg"},2132:function(e,t,a){e.exports=a.p+"static/media/WhiteX.99d6074f.svg"},2133:function(e,t,a){e.exports=a.p+"static/media/AddMore.da033b4e.svg"},2134:function(e,t,a){},2135:function(e,t,a){e.exports=a.p+"static/media/EmptySearch.9c0662a7.svg"},2136:function(e,t,a){e.exports=a.p+"static/media/New.cd113ca8.svg"},2138:function(e,t,a){e.exports=a.p+"static/media/playBtn.002f70cb.svg"},2139:function(e,t,a){e.exports={header:"GoLiveZoomModal_header__1plP9",headerContent:"GoLiveZoomModal_headerContent__1CzUo",modalBody:"GoLiveZoomModal_modalBody__2ROV7",modalFooter:"GoLiveZoomModal_modalFooter__2tZT0"}},2144:function(e,t,a){e.exports=a.p+"static/media/correctCode.f44e7c7e.svg"},2230:function(e,t,a){e.exports=a.p+"static/media/flagIcon.ea26f563.svg"},2241:function(e,t,a){"use strict";var s=a(1),i=a.n(s),n=a(1036),o=a.n(n),l=a(457),c=a.n(l),r=a(140),d=a(1024),m=a.n(d),u=a(47),h=a(151),p=a(1043),v=a.n(p),g=a(25),b=a.n(g),C=a(5),S=a(1236),E=a(67),f=a(38),y=a(116),w=a(80),A=a(460),M=a(1343),O=a(1380),_=a.n(O),L=a(91),B=a(176),D=a(2249),N=a(83),x=a(68),T=a(15),j=a(253),I=a(1068),k=a.n(I);var F=c()(Object(r.connect)((function(e){var t,a;return{user:e.persistedData&&e.persistedData.user,sendSmsEnabled:null===e||void 0===e||null===(t=e.persistedData)||void 0===t||null===(a=t.organization)||void 0===a?void 0:a.sendSmsEnabled,useNewLiveService:Object(T.e)(),batchOverview:e.batchDetail.data}}),{makeApiCall:h.b,setFetchingBatchSettingsStatus:S.d,saveBatchSettings:S.a,saveStep:B.j})((function(e){const{handleGoLiveModal:t,status:a,makeApiCall:n,liveCard:l,user:c,type:r,courseId:d,batchId:h,fetchCourseDetails:p,canEdit:g,liveSessionId:S,editClicked:O,screen:B,courseDetails:I,showScheduleSelected:F,sendSmsEnabled:V,setForceCloseliveModalState:R,isDuplicate:H}=e;let G=F||!1;const[P,U]=Object(s.useState)(""),[Y,z]=Object(s.useState)(!1),[Z,W]=Object(s.useState)(!1),[q,$]=Object(s.useState)(!1),[Q,X]=Object(s.useState)(!0),[
22K,J]=Object(s.useState)(""),[ee,te]=Object(s.useState)(0),[ae,se]=Object(s.useState)(""),[ie,ne]=Object(s.useState)(null),[oe,le]=Object(s.useState)(null),[ce,re]=Object(s.useState)(!1),[de,me]=Object(s.useState)(""),[ue,he]=Object(s.useState)(""),[pe,ve]=Object(s.useState)(""),[ge,be]=Object(s.useState)(!1),[Ce,Se]=Object(s.useState)(!1),[Ee,fe]=Object(s.useState)(!1),[ye,we]=Object(s.useState)(""),{t:Ae}=Object(D.a)();let[Me,Oe]=Object(s.useState)([]),[_e,Le]=Object(s.useState)(0);const[Be,De]=Object(s.useState)(!1);let Ne=I&&I.details&&I.details.name,xe=I&&I.auxiliaryData&&I.auxiliaryData.totalSubscriberCount,Te={courseId:d,name:Ne,isSelected:1,subscribers:xe};const[je,Ie]=Object(s.useState)([Te]),[ke,Fe]=Object(s.useState)([d]);function Ve(){const t=Object(j.l)("beforeGoLiveOrEditSchedule",l,{entityType:r,liveSessionId:S,batchId:h,courseId:d,edit:1==O,isDuplicate:H});c&&3==c.type&&n(t.url,t.method,void 0,t=>{var a;t.data=Object(j.e)(t.data);const{title:s,expectedStudents:i,expectedDuration:n,entityId:o,type:l,isWeb:c,showVideoOnWeb:r,isSchedule:m,scheduleTime:u,sendSms:h}=t.data;if(ne({...t.data}),U(s||(null===e||void 0===e||null===(a=e.batchOverview)||void 0===a?void 0:a.batchName)),J(i),se(n),W(c),$(r),void 0!==h&&X(!!h),G||(re(!!m),Se(!!m),me(b()(u)),he(b()(u))),l==L.b.MULTIPLECOURSE||e.useNewLiveService&&l==L.b.COURSE){let e=o.filter(e=>e!=d);e.unshift(d),Fe(e),Re(e)}ve(l),l!=L.b.BATCH&&l!=L.b.COURSE||be(!1)})}Object(s.useEffect)(()=>{l&&l.creditsPrompt&&fe(!0)},[l&&l.creditsPrompt]),Object(s.useEffect)(()=>{let e=Me.filter(e=>1==e.isSelected);e.length>=1&&Ie(e)},[Me]),Object(s.useEffect)(()=>{X(!!V)},[V]),Object(s.useEffect)(()=>{O&&Ve()},[O]),Object(s.useEffect)(()=>{ie||!h&&!d||g||Ve()},[]);const Re=e=>{c&&3==c.type&&n(`/v2/courses/list?offset=0&sortOrder=1&selectedCourses=[${e}]&search=`,"GET",void 0,e=>{let{list:t}=e.data;Oe(0==_e?t:[...Me,...t]),be(t.length>1)},()=>{be(!1)})};function He(){De(!Be)}const Ge=()=>{var a,s;let i=ce?b()(de.format("DD-MM-YYYY")+" "+ue.format("HH:mm"),"DD-MM-YYYY HH:mm").valueOf():null,o={entityId:r==L.b.BATCH?h:d,type:r,title:P,scheduleTime:ce?i:NaN,isSchedule:ce?1:0,isWeb:Z?1:0,showVideoOnWeb:q?1:0,sendSms:Q?1:0,isAgora:e.useNewLiveService?Object(T.t)(e.liveCard):null===(a=e.liveCard)||void 0===a?void 0:a.isAgora};if(pe==L.b.COURSE&&(o.entityId=d,o.type=2),(!pe||pe==L.b.MULTIPLECOURSE||e.useNewLiveService&&pe==L.b.COURSE)&&je.length>=1&&(o.entityId=je.map(e=>e.courseId),o.type=4),r==L.b.BATCH&&(o.entityId=h,o.type=3),1==O&&(o.liveSessionId=S),r==L.b.BATCH)"overview"===B?Object(E.a)(f.bb,null,{streamDurationInSeconds:ae,webAllowedLive:Z?1:0,scheduleLive:ce?1:0}):Object(E.a)(f.hb,null,{streamDurationInSeconds:ae,webAllowedLive:Z?1:0,scheduleLive:ce?1:0}),Object(N.b)(x.F);else if(I){let e=I&&I.metaData&&I.metaData.isCoowner;Object(w.c)("COURSE BASE",{ACTION:f.Xb,courseId:d,isFaculty:!!e})}const m=Object(j.l)("goLive",l,{liveSessionId:o.liveSessionId,edit:1==O,data1:o,batchCode:null===e||void 0===e||null===(s=e.batchOverview)||void 0===s?void 0:s.batchCode});n(m.url,m.method,m.payload,a=>{if(a.data=Object(j.n)(a.data,ce,c,l),a.data.showRechargeButton)le({text:a.message,buttonText:a.data.eligibilityText});else{if(e.isOnboarding&&(e.saveStep({stepId:12,isCompleted:!0}),Object(w.c)(f.md,{ACTION:"live started",RecordingWebLive:q,streamDurationInSeconds:ae,webAllowedLive:Z?1:0,scheduleLive:ce?1:0,batchCode:Object(y.a)(),batchId:h,totalStudents:K})),ce)return g?C.toastr.success(Ae("components.liveVideo.goLiveModal.toast.successHeading","Success"),Ae("components.liveVideo.goLiveModal.toast.successContent1","Scheduled live class edited")):ce&&C.toastr.success(Ae("components.liveVideo.goLiveModal.toast.successHeading","Success"),Ae("components.liveVideo.goLiveModal.toast.successContent2","Live class scheduled successfully")),r==L.b.BATCH?function(){let t=Object(y.a)();e.setFetchingBatchSettingsStatus(!0),e.saveBatchSettings(),e.makeApiCall(`batches/${t}/settings`,"GET",void 0,t=>{e.setFetchingBatchSettingsStatus(!1),e.saveBatchSettings(t.data)},()=>e.setFetchingBatchSettingsStatus(!1))}():(p(),Re(ke)),void t();Object(j.r)(a.data,e.location,e.history,l)}},e=>{Object(j.o)(e,R,t)})};let Pe=Ae("components.liveVideo.goLiveModal.goLiveCta","Go Live");
22if(ce&&(Pe=Ae("components.liveVideo.goLiveModal.scheduledCta","Schedule Live")),g&&1==O&&ce&&(Pe=Ae("components.liveVideo.goLiveModal.editCta","Edit Live class")),a&&ie){var Ue,Ye,ze;let a=je.length-4,s=je&&je.slice(0,4);const n=()=>{we(o.a.shakyText),setTimeout(()=>we(""),1e3)};return i.a.createElement(i.a.Fragment,null,i.a.createElement("div",null,i.a.createElement("div",{style:{visibility:Be?"hidden":"visible"},id:"myModal",className:o.a.modal},i.a.createElement("div",{className:o.a.modalContent},i.a.createElement("div",{className:o.a.Header},i.a.createElement("div",{className:o.a.HeaderText},Ae("components.liveVideo.goLiveModal.goLiveHeader","Go Live")),i.a.createElement("div",null,i.a.createElement("img",{className:"cursorPointer",onClick:()=>{U(""),W(!1),$(!1),X(!0),J(""),se(""),re(!1),me(""),he(""),U(),te(Te.subscribers),Ie([Te]),t()},src:m.a,width:"16px",height:"16px"}))),i.a.createElement("div",{className:o.a.paddingCheat},i.a.createElement("div",{className:o.a.goLiveModalTitle},Ae("components.liveVideo.goLiveModal.title","Title*")),i.a.createElement("div",{className:o.a.modalInputContainer},i.a.createElement("input",{placeholder:Ae("components.liveVideo.goLiveModal.enterATitle","Enter a title here"),value:P,onChange:function(e){U(e.target.value),!Y&&z(!0)},className:o.a.goLiveModalTitleInput,type:"text"}),!!P&&i.a.createElement("span",{className:o.a.modalInputClear,onClick:function(){U("")}},Ae("components.liveVideo.goLiveModal.clear","clear"))),2!=O&&i.a.createElement("div",{className:o.a.SingleContentImgText},i.a.createElement("div",{className:o.a.goLiveModalTitle}," ",Ae("components.liveVideo.goLiveModal.scheduleLater","Schedule for Later")),i.a.createElement("div",{className:o.a.liveModalToggleContainer}," ",i.a.createElement("span",{className:o.a.liveModalToggleOff},Ae("components.liveVideo.goLiveModal.off","OFF")," "),i.a.createElement(u.d,{checked:ce,onClick:function(){Ce||(re(!ce),me(ce?de:b()(new Date)),he(ce?ue:b()(new Date)))},toggle:!0}),i.a.createElement("span",{className:o.a.liveModalToggleOn},Ae("components.liveVideo.goLiveModal.on","ON")))),!!ce&&i.a.createElement("div",{className:o.a.SingleContentImgText},i.a.createElement("div",null,i.a.createElement("div",{style:{marginBottom:"1rem"}},Ae("components.liveVideo.goLiveModal.setDate","Set Date")),!!de&&i.a.createElement(v.a,{className:o.a.scheduleBox,dateFormat:"DD-MM-YYYY",isValidDate:e=>e.isAfter(b()(new Date).subtract("1","days")),inputProps:{readOnly:!0},timeFormat:!1,closeOnSelect:!0,value:de,defaultValue:de||b()(new Date),onChange:e=>me(e),renderInput:e=>i.a.createElement("input",Object.assign({},e,{className:o.a.goLiveModalTitleInput,placeholder:Ae("components.liveVideo.goLiveModal.selectDatePlaceholder","Select date")}))})),i.a.createElement("div",null,i.a.createElement("div",{style:{marginBottom:"1rem"}},Ae("components.liveVideo.goLiveModal.setTime","Set time")," "),!!ue&&i.a.createElement(v.a,{className:o.a.scheduleBox,dateFormat:!1,isValidDate:e=>e.isAfter(b()(new Date).subtract("1","days")),inputProps:{readOnly:!0},timeFormat:!0,closeOnSelect:!0,value:ue,defaultValue:ue||b()(new Date),onChange:e=>he(e),renderInput:e=>i.a.createElement("input",Object.assign({},e,{className:o.a.goLiveModalTitleInput,placeholder:Ae("components.liveVideo.goLiveModal.selectTimePlaceholder","Select Time")}))}))),i.a.createElement("div",{className:o.a.timeLeft},"Credits Left: ",ie.durationLeft," ",(null===ie||void 0===ie||null===(Ue=ie.livePopupData)||void 0===Ue?void 0:Ue.heading)&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:ye,style:{marginTop:"0.3rem",fontWeight:"bold",color:"red"}},i.a.createElement(u.v,{content:e.useNewLiveService?"You will not receive the recording of this Live Class due to negative Credit balance.":ie.warningText,disabled:!0,trigger:i.a.createElement("img",{src:k.a,alt:"Breakup",style:{cursor:"pointer",height:"12px"}}),position:"bottom left"})," \xa0",e.useNewLiveService?"You will not receive the recording of this Live Class due to negative Credit balance.":ie.warningText))),r==L.b.COURSE?i.a.createElement("div",{className:o.a.multipleCourseLive},i.a.createElement("div",{className:o.a.goLiveModalTitle},Ae("components.liveVideo.goLiveModal.goLive","Go Live for Courses")),i.a.createElement("div",{className:o.a.selectedCoursesArea},i.a.createElement("div",{className:o.a.selectedCoursesList},s&&s.map((e,t)=>i.a.createElement("div",{style:{whiteSpace:"nowrap",marginRight:"3px"},key:t},A.a.getShortenedSubstring(e&&e.name,15),je.length>1&&t!=je.length-1?", ":""))),ge&&i.a.createElement("div",null,a>0?i.a.createElement("div",{style:{width:"60px"},className:o.a.addMore,onClick:He},"+",a," ",Ae("components.liveVideo.goLiveModal.more","More")):i.a.createElement("div",{className:o.a.addMore,onClick:He},i.a.createElement("img",{src:_.a,alt:""})," ",Ae("components.liveVideo.goLiveModal.addMoreCourse","Add more Courses"))))):"",Be?i.a.createElement(M.a,{toggleCourseModal:He,previousSelectedCourseArray:je,entityId:d,setDisplaySelectedCourseArray:Ie,setStudentNumber:J,setCourseMaxStudentNumber:te}):"",oe?i.a.createElement("div",{className:"mt-3"},i.a.createElement("span",{style:{color:"#FF4058"}},oe.text),i.a.createElement("span",{onClick:()=>{e.history.push("/dashboard")},className:"ml-2 cursorPointer",style:{color:"#009AE0"}},oe.buttonText)):i.a.createElement("div",{className:o.a.timeLeft}),i.a.createElement("div",{className:o.a.SingleContentImgText},i.a.createElement("div",{style:{maxWidth:"80%"}},i.a.createElement("div",{className:o.a.goLiveModalTitle},Ae("components.liveVideo.goLiveModal.allowDesktop","Allow on desktop view")),i.a.createElement("div",null,Ae("components.liveVideo.goLiveModal.allowDesktopContent","Turn ON if you want to allow students to take this class on web. We suggest you to keep this setting off as live class may be compromised on Web."))),i.a.createElement("div",{className:o.a.liveModalToggleContainer},i.a.createElement("span",{className:o.a.liveModalToggleOff},Ae("components.liveVideo.goLiveModal.off","OFF")," ")," ",i.a.createElement(u.d,{checked:Z,onClick:function(){W(!Z)},toggle:!0}),i.a.createElement("span",{className:o.a.liveModalToggleOn},Ae("components.liveVideo.goLiveModal.on","ON")))),i.a.createElement("div",{style:{marginTop:"15p
22x"},className:o.a.SingleContentImgText},i.a.createElement("div",null,i.a.createElement("div",{className:o.a.goLiveModalTitle},Ae("components.liveVideo.goLiveModal.showRecord","Show recorded class on Web")),i.a.createElement("div",null,Ae("components.liveVideo.goLiveModal.showRecordContent","We suggest you to keep this setting off as recorded class may be compromised on Web."))),i.a.createElement("div",{className:o.a.liveModalToggleContainer},i.a.createElement("span",{className:o.a.liveModalToggleOff},Ae("components.liveVideo.goLiveModal.off","OFF")," "),i.a.createElement(u.d,{checked:q,onClick:function(){$(!q)},toggle:!0}),i.a.createElement("span",{className:o.a.liveModalToggleOn},Ae("components.liveVideo.goLiveModal.goLiveCta","ON")))),i.a.createElement("div",{style:{marginTop:"15px"},className:o.a.SingleContentImgText},i.a.createElement("div",null,i.a.createElement("div",{className:o.a.goLiveModalTitle},Ae("components.liveVideo.goLiveModal.send","Send SMS"))),i.a.createElement("div",{className:o.a.liveModalToggleContainer},i.a.createElement("span",{className:o.a.liveModalToggleOff},Ae("components.liveVideo.goLiveModal.off","OFF")," ")," ",i.a.createElement(u.d,{checked:Q,onClick:function(){X(!Q)},toggle:!0}),i.a.createElement("span",{className:o.a.liveModalToggleOn},Ae("components.liveVideo.goLiveModal.on","ON"))))),i.a.createElement("div",{className:o.a.goLiveModalFooter,style:{justifyContent:Ee?"space-between":"flex-end"}},Ee?i.a.createElement("div",{id:"nocredit-text",style:{color:"red",fontSize:"1.2rem"}},Ae("components.liveVideo.goLiveModal.footer","* Class recordings won't be available due to insufficient balance.")):null,i.a.createElement("button",{onClick:null!==ie&&void 0!==ie&&null!==(Ye=ie.livePopupData)&&void 0!==Ye&&Ye.heading?n:function(){if(P&&P.length<4)C.toastr.error(Ae("components.liveVideo.goLiveModal.toast.errorHeading","ERROR"),Ae("components.liveVideo.goLiveModal.toast.errorContent","The title's length should be greater than 3 characters"));else{if(!r==L.b.COURSE||!r==L.b.MULTIPLECOURSE){if(!ae)return void C.toastr.error(Ae("components.liveVideo.goLiveModal.toast.errorHeading","ERROR"),Ae("components.liveVideo.goLiveModal.toast.errorContent2","Please select valid duration"));if(ie.setDuration)return void C.toastr.error(Ae("components.liveVideo.goLiveModal.toast.errorHeading","ERROR"),Ae("components.liveVideo.goLiveModal.toast.errorContent3","Please select valid duration"))}if(ce){if(!b.a.isMoment(de)||!b.a.isMoment(ue))return void C.toastr.error(Ae("components.liveVideo.goLiveModal.toast.errorHeading","ERROR"),Ae("components.liveVideo.goLiveModal.toast.errorContent4","Please select valid date and time"));if(b()(de).format("DD-MM-YYYY")===b()(new Date).format("DD-MM-YYYY")&&ue.diff(b()(new Date),"seconds")<1)return void C.toastr.error(Ae("components.liveVideo.goLiveModal.toast.errorHeading","ERROR"),Ae("components.liveVideo.goLiveModal.toast.errorContent5","Please select valid date and time"));if(b()(de).format("DD-MM-YYYY")!==b()(new Date).format("DD-MM-YYYY")&&b()(de).isBefore(b()()))return void C.toastr.error(Ae("components.liveVideo.goLiveModal.toast.errorHeading","ERROR"),Ae("components.liveVideo.goLiveModal.toast.errorContent6","Please select valid date and time"))}Ge()}},className:`${o.a.goLiveModalButton} ${null!==ie&&void 0!==ie&&null!==(ze=ie.livePopupData)&&void 0!==ze&&ze.heading?o.a.disableGoLiveModalButton:""}`},Pe))))))}return""}))),V=a(1169),R=a(1250),H=a.n(R),G=a(1160),P=a.n(G),U=a(1477),Y=a.n(U),z=a(1414),Z=a(1028),W=a(464);function q(e){let{liveCard:t,forceEndLiveClass:a,cta:n,useNewLiveService:l}=e;const c=Object(s.useMemo)(()=>1===Object(T.u)(t,n)||!!t[n||"cta"].isExistingSession,[t]),{t:r}=Object(D.a)();return i.a.createElement("div",{className:`${o.a.GoLiveTutorHeaderText} ${o.a.GoLiveTutorHeaderTextFlex} mt-3 mb-3`},i.a.createElement("div",{className:o.a.GoLiveTutorHeaderTextFlexChild1},t.text),i.a.createElement("div",{className:o.a.GoLiveTutorHeaderTextFlexChild2},!!l&&c&&i.a.createElement("div",{className:"ml-2"},i.a.createElement(u.h,{item:!0,pointing:"top right",icon:"ellipsis vertical",style:{float:"right"}},i.a.createElement(u.h.Menu,null,i.a.createElement("div",{onClick:a,className:"menutoggle--items--content"},i.a.createElement("img",{src:Y.a,alt:"remove button"})," ",i.a.createElement("span",{className:"menutoggle--items--content--span"},r("components.LiveVideo.goLiveScreenTutor.forceEnd","Force End Live Class"))))))))}var $=Object(r.connect)((function(){return{useNewLiveService:Object(T.e)()}}))((function(e){var t,a;let{BatchCleverTapService:s,setShowNoStudentsPrompt:n,handleGoLiveModal:l,liveCard:c,studentsCount:r}=e;return i.a.createElement(i.a.Fragment,null,i.a.createElement(q,{liveCard:c,forceEndLiveClass:!1,useNewLiveService:!1}),null!==c&&void 0!==c&&null!==(t=c.cta)&&void 0!==t&&null!==(a=t.deeplink)&&void 0!==a&&a.screen?i.a.createElement("div",{onClick:()=>{s(f.ab),Object(N.b)(x.E),r?l(!0):n(!0)},className:o.a.GoliveButton+" "+o.a.GoLiveTutorHeaderButton},i.a.createElement("img",{className:"mr-2",src:c.imageUrl,width:"20px",height:"20px"}),i.a.createElement("span",null,c.cta.text)):null)})),Q=a(1412),X=a(2796),K=a(704),J=a(1770),ee=a(2136),te=a.n(ee),ae=a(1452),se=a.n(ae),ie=a(1740),ne=a(1229);var oe=Object(X.a)(Object(r.connect)((function(e){return{showTrialModal:e&&e.modal&&e.modal.showTrialLiveModal,useNewLiveService:Object(T.e)(),isModalDuplicate:e.modal.isDupl
22icate}}),{OpenTrialLiveModal:K.b,CloseTrialLiveModal:K.a})((function(e){let{setShowNoStudentsPrompt:t,handleGoLiveModalForCourse:a,liveCard:n,studentsCount:l,courseDetails:c,setShowSchedulePreSelected:r,handleGoLiveModal:d,scheduleFreeLive:m,showTrialModal:u,OpenTrialLiveModal:h,CloseTrialLiveModal:p,fetchCourseDetails:v,history:g,useNewLiveService:b,forceEndLiveClass:C,isModalDuplicate:S}=e;const E=c&&c.goLiveCard,[f,y]=Object(s.useState)(!1),[w,A]=Object(s.useState)(),[M,O]=Object(s.useState)(null),_=()=>{y(!f)},B=Object(j.j)(te.a,se.a,c&&c.goLiveCard);return E?i.a.createElement(i.a.Fragment,null,i.a.createElement(q,{liveCard:E,forceEndLiveClass:C,cta:"cta1",useNewLiveService:b}),i.a.createElement("div",{className:o.a.GoLiveCardButtonWrapper},E&&E.cta2?i.a.createElement("div",{className:o.a.ScheduleLiveClassCardButton,style:{border:"1px solid #009ae0"},onClick:()=>{const e=Object(T.o)(E);e!=T.a.UTIL_BROWSER?(r(e==T.a.OPEN_VIDU_NEW_SCHEDULED||e==T.a.AGORA_NEW_SCHEDULED||e==T.a.MM_NEW_SCHEDULED),a(e==T.a.OPEN_VIDU_NEW_SCHEDULED||e==T.a.AGORA_NEW_SCHEDULED||e==T.a.MM_NEW_SCHEDULED?L.a.Schedule:L.a.GoLive,E)):window.open(Object(T.n)(E))}},E&&E.cta2&&E.cta2.text):"",E&&E.cta1?i.a.createElement("div",{onClick:()=>{const e=Object(T.m)(E),t=Object(T.l)(E);if(e==T.a.AGORA_LIVE||e==T.a.OPEN_VIDU_LIVE||e==T.a.MM_LIVE){let a={cta:{...E.cta1},isAgora:b?Object(T.t)(E,"cta1"):E.cta1.isAgora,goLiveCard:E};m(b?Object(T.w)(n):t,!1,e,a)}else{if(e==T.a.UTIL_BROWSER)return void window.open(t);r(e!=T.a.OPEN_VIDU_NEW&&e!=T.a.MM_LIVE_NEW&&e!=T.a.AGORA_NEW),a(e==T.a.OPEN_VIDU_NEW||e==T.a.MM_LIVE_NEW||e==T.a.AGORA_NEW?L.a.GoLive:L.a.Schedule,E)}},className:o.a.ScheduleLiveClassCardButton2},E&&E.cta1&&E.cta1.text):""),null!==B&&void 0!==B&&B.text?i.a.createElement("div",{className:o.a.ScheduleTrialLiveClass,onClick:()=>h(!1,!0),style:{backgroundColor:B&&B.bgColor,borderBottom:"1px solid "+(B&&B.highlightColor)}},i.a.createElement("span",{className:o.a.ScheduleTrialLiveClassLeft},i.a.createElement("img",{className:o.a.ScheduleTrialLiveClassNew,src:te.a,alt:"New"}),B&&B.text),i.a.createElement("img",{className:o.a.ScheduleTrialLiveClassArrow,src:se.a,alt:"New"})):"",u&&i.a.createElement(J.a,{data:c,toggleTrialClassModal:p,fetchCourseDetails:v,setForceCloseliveModalState:O,isDuplicate:S}),M&&i.a.createElement(ne.a,{state:M,onClose:()=>O(null)})):i.a.createElement(i.a.Fragment,null,i.a.createElement(q,{liveCard:n,forceEndLiveClass:C,cta:"cta1",useNewLiveService:b}),i.a.createElement("div",{onClick:()=>{l?d(!0):t(!0)},className:o.a.GoliveButton+" "+o.a.GoLiveTutorHeaderButton},i.a.createElement("img",{className:"mr-2",src:n.imageUrl,width:"20px",height:"20px"}),i.a.createElement("span",null,n.cta.text)),u&&i.a.createElement(J.a,{data:c,toggleTrialClassModal:p,toggleSuccessModal:e=>{A(e),_()},fetchCourseDetails:v,setForceCloseliveModalState:O,isDuplicate:S}),f&&i.a.createElement(ie.a,{toggleSuccessModal:_,goToNotification:()=>{w?g.push("/notification/create?source=trialLive&sessionId="+w):_()},createdSessionId:w}))}))),le=a(14);t.a=c()(Object(r.connect)((function(e){var t,a,s,i,n;return{user:e.persistedData&&e.persistedData.user,batchInfo:e.batchSettings&&e.batchSett
22ings.data&&e.batchSettings.data.info,liveCard:e.batchDetail&&e.batchDetail.data.liveCard,timeFormat:null===e||void 0===e||null===(t=e.persistedData)||void 0===t||null===(a=t.organization)||void 0===a?void 0:a.timeFormat,dateTimeStamp:null===e||void 0===e||null===(s=e.persistedData)||void 0===s||null===(i=s.organization)||void 0===i?void 0:i.dateTimeStamp,useNewLiveService:Object(T.e)(),batchOverview:null===e||void 0===e||null===(n=e.batchDetail)||void 0===n?void 0:n.data}}),{makeApiCall:h.b,setFetchingBatchSettingsStatus:S.d,saveBatchSettings:S.a,saveBatchOverview:W.d})(Object(Z.a)((function(e){let{type:t,liveCard:a,courseLiveCard:n,user:l,makeApiCall:c,courseId:r,fetchCourseDetails:d,batchCode:m,batchId:h,courseDetails:p}=e;const[v,g]=Object(s.useState)(!1),[S,w]=Object(s.useState)(""),[A,M]=Object(s.useState)(!1),[O,_]=Object(s.useState)(!1),[B,D]=Object(s.useState)(!1),[N,x]=Object(s.useState)(void 0),[I,k]=Object(s.useState)(!1),[R,G]=Object(s.useState)(null),[U,Z]=Object(s.useState)(!1),[W,q]=Object(s.useState)(L.a.GoLive),[X,K]=Object(s.useState)(!1),[J,ee]=Object(s.useState)(!1);function te(){let t=Object(y.a)();e.setFetchingBatchSettingsStatus(!0),e.saveBatchSettings(),e.makeApiCall(`batches/${t}/settings`,"GET",void 0,t=>{e.setFetchingBatchSettingsStatus(!1),e.saveBatchSettings(t.data)},()=>e.setFetchingBatchSettingsStatus(!1))}function ae(e){x(e.data.totalCount)}function se(e){x(e.data.currentStudentsCount)}function ie(s,i){Object(j.c)({liveCard:a,isDelete:i,liveSessionId:s,makeApiCall:c,callback1:()=>{me(),t==L.b.BATCH?te():d()},fromStore:!1,user:l,location:e.location,history:e.history,setForceCloseliveModalState:G})}function ce(a,s,i,n){let o=e.liveCard;n&&(o=n),Object(j.b)({liveSessionId:a,isDelete:s,screen:i,liveCard:o,fromStore:!1,user:l,makeApiCall:c,location:e.location,history:e.history,callback1:()=>{me(),3==t?te():d()},setForceCloseliveModalState:G})}function re(t,s,i){const n=a.cta&&Object(T.k)(a),o=a.cta&&Object(T.h)(a),l=a.cta&&Object(T.j)(a),c=a.cta&&Object(T.i)(a);if(a.cta&&n==T.a.UTIL_BROWSER)window.open(o);else if(A&&g(!1),i&&t&&a.cta&&(n==T.a.AGORA_SCHEDULED||n==T.a.OPEN_VIDU_SCHEDULED||n==T.a.MM_SCHEDULED)){(e.useNewLiveService?Object(T.v)(a):o)-b()().valueOf()>1?C.toastr.info("INFO",e.useNewLiveService?Object(T.p)(a):c):n==T.a.AGORA_SCHEDULED||0===Object(T.B)(a,T.a.MM_SCHEDULED,n,!0)?ie(e.useNewLiveService?Object(T.w)(a):l,!1):ce(e.useNewLiveService?Object(T.w)(a):l,!1,n)}else{if(s&&(a.canStartnew||a.canEdit))return g(s),void M(!A);a.isLiveClassEligible||!a.eligibilityText?!t||!a.cta||n!==T.a.AGORA_LIVE&&n!=T.a.OPEN_VIDU_LIVE&&n!=T.a.MM_LIVE?M(!A):n==T.a.AGORA_LIVE||0===Object(T.B)(a,T.a.MM_LIVE,n,!0)?ie(e.useNewLiveService?Object(T.w)(a):o,!1):ce(e.useNewLiveService?Object(T.w)(a):o,!1,n):me()}}function de(){G({showThreeDotMenuModal:!0})}function me(){_(!O)}function ue(){K(!X)}function he(){N?(k(!0),re(!0,2)):D(!0)}function pe(e,t){t&&!t.isLiveClassEligible?ue():(Z(!U),q(e))}if(a||(a=n),Object(s.useEffect)(()=>{t==L.b.BATCH?m&&c(`/v2/batches/${m}/overview`,"GET",void 0,se,()=>{},!1,{appendStudentId:!0}):r&&c(`/v2/course/students/${r}?limit=20&offset=0`,"GET",void 0,ae,()=>{},!1,{appendStudentId:!0})},[]),Object(s.useEffect)(()=>{if(!a.cta)return;const t=Object(T.k)(a,"cta",!1);if(t==T.a.AGORA_SCHEDULED&&t==T.a.OPEN_VIDU_SCHEDULED&&t==T.a.MM_SCHEDULED||w(""),t!=T.a.OPEN_VIDU_SCHEDULED&&1!==Object(T.B)(a,T.a.MM_SCHEDULED,t,!0)){let t=(e.useNewLiveService?Object(T.v)(a):Object(T.h)(a))-b()().valueOf();t>1?setTimeout(()=>{w(""+le.a.t("components.LiveVideo.goLiveScreenTutor.card.clickOnGoLive","Click on Go Live to start your online classes"))},t):w(""+le.a.t("components.LiveVideo.goLiveScreenTutor.card.clickOnGoLive","Click on Go Live to start your online classes"))}}),a&&a.cta&&void 0!==N){const s=Object(T.k)(a,"cta",!1);return i.a.createElement("div",{className:o.a.GoLiveTutorContainer,style:{borderRadius:"2px",boxShadow:"rgba(0, 0, 0, 0.12) 0px 1px 4px",border:"none"}},i.a.createElement("div",{className:o.a.GoLiveTutorHeader},i.a.createElement("div",{className:o.a.GoLiveTutorHeaderText},le.a.t("components.LiveVideo.goLiveScreenTutor.headerText","Live Classes")),i.a.createElement("div",{className:o.a.GoLiveTutorHeaderLabel},le.a.t("components.LiveVideo.goLiveScreenTutor.newLabel","New"))),s!=T.a.AGORA_SCHEDULED&&s!=T.a.OPEN_VIDU_SCHEDULED&&s!=T.a.MM_SCHEDULED?t==L.b.BATCH?i.a.createElement($,{BatchCleverTapService:E.a,setShowNoStudentsPrompt:D,handleGoLiveModal:re,liveCard:a,type:t,studentsCount:N,forceEndLiveClass:de}):i.a.createElement(oe,{BatchCleverTapService:E.a,setShowNoStudentsPrompt:D,handleGoLiveModalForCourse:pe,liveCard:a,type:t,studentsCount:N,courseDetails:p,toggleScheduleClassModal:he,setShowSchedulePreSelected:k,handleGoLiveModal:re,scheduleFreeLive:ce,fetchCourseDetails:d,forceEndLiveClass:de}):t==L.b.BATCH?i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:o.a.overviewCard},function(){const{timeFormat:s,dateTimeStamp:n}=e;return i.a.createElement("div",{className:o.a.SingleContentContainer},i.a.createElement("div",{className:o.a.SingleContentImgText},i.a.createElement("div",{className:"pl-3"},i.a.createElement("div",null,i.a.createElement("div",{className:o.a.SingleContentName},S||a.text),i.a.createElement("div",{className:o.a.SingleContentName},a.text2),a.emblem&&i.a.createElement("div",{style:{color:a.emblem.color,display:"flex",alignItems:"center",fontSize:"14px"},className:"pb-3"},i.a.createElement("img",{height:14,src:a.emblem.iconUrl}),i.a.createElement("span",{style:{color:a.emblem.color},className:o.a.SingleCountAttendanceCount},Object(T.v)(a)||a.scheduleTime?b()(Object(T.v)(a)||a.scheduleTime).format(`${n?n.toUpperCase():"MMM Do, YYYY"}, ${s||"h:mm A"}`):a.emblem.startDateEpoch?`${b()(a.emblem.startDateEpoch).format(""+(n?null===n||void 0===n?void 0:n.toUpperCase():"LT"))} - ${b()(a.emblem.endDateEpoch).format(""+(n?null===n||void 0===n?void 0:n.toUpperCase():"LT"))}`:""))))),i.a.createElement("div",{className:o.a.scheduleGoLive},i.a.createElement("div",{style:{width:"10rem",justifyContent:"flex-end"},className:o.a.SingleContentImgText},a.emblem2&&a.emblem2.text&&i.a.createElement("div",{style:{color:a.emblem2.color,backgroundColor:a.emblem2.bgColor},className:o.a.liveButton},a.emblem2.icon&&i.a.createElement("img",{className:"pr-2",height:"12px",width:"14px",src:a.emblem2.icon}),a.emblem2.text),(!!a.canEdit||!!a.canDelete||!!a.canStartnew)&&i.a.createElement("div",{className:"ml-2"},i.a.createElement(u.h,{item:!0,pointing:"top right",icon:"ellipsis vertical",style:{float:"right"}},i.a.createElement(u.h.Menu,null,!!a.canEdit&&i.a.createElement("div",{onClick:()=>re(!0,1),className:"menutoggle--items--content"},i.a.createElement("img",{src:P.a,alt:"remove button"})," ",i.a.createElement("span",{className:"menutoggle--items--content--span"},le.a.t("components.LiveVideo.goLiveScreenTutor.editMenu","Edit Live Class"))),!!a.canDelete&&i.a.createElement("div",{onClick:()=>me(),className:"menutoggle--items--content"},i.a.createElement("img",{src:H.a,alt:"remove button"})," ",i.a.createElement("span",{className:"menutoggle--items--content--span"},le.a.t("components.LiveVideo.goLiveScreenTutor.deleteMenu","Delete Live Class"))),!!a.canStartnew&&i.a.createElement("div",{onClick:()=>re(!0,2),className:"menutoggle--items--content"},i.a.createElement("img",{src:Y.a,alt:"remove button"})," ",i.a.createElement("span",{className:"menutoggle--items--content--span"},le.a.t("components.LiveVideo.goLiveScreenTutor.start","Start New Live Class"))))))),(e.useNewLiveService?Object(T.w)(a):Object(T.j)(a))&&i.a.createElement("div",{className:o.a.scheduleGoLiveText,onClick:()=>{re(!0,!1,!0),t==L.b.BATCH&&Object(E.a)(f.ab)}},le.a.t("components.LiveVideo.goLiveScreenTutor.toast.go","Go Live Now"))))}())):i.a.createElement(oe,{BatchCleverTapService:E.a,setShowNoStudentsPrompt:D,handleGoLiveModalForCourse:pe,liveCard:a,type:t,studentsCount:N,courseDetails:p,toggleScheduleClassModal:he,setShowSchedulePreSelected:k,handleGoLiveModal:re,fetchCourseDetails:d,forceEndLiveClass:de}),3==l.type&&A&&t==L.b.BATCH&&i.a.createElement(F,{batchId:h,canEdit:a.canEdit,liveSessionId:a.liveSessionId,courseId:r,type:t,liveCard:a,status:A,fetchCourseDetails:d,handleGoLiveModal:re,editClicked:v,screen:"overview",courseDetails:p,showSchedulePreSelected:I,setForceCloseliveModalState:G}),3==l.type&&U&&(t==L.b.COURSE||t==L.b.MULTIPLECOURSE)&&i.a.createElement(Q.a,{batchId:h,canEdit:a.canEdit,liveSessionId:a.liveSessionId,courseId:r,type:t,liveCard:a,status:U,fetchCourseDetails:d,handleGoLiveModalForCourse:pe,editClicked:v,screen:"overview",courseDetails:p,showSchedulePreSelected:I,goLiveCourseModalType:W,setForceCloseliveModalState:G}),i.a.createElement(V.a,{status:O,headerText:s==T.a.AGORA_SCHEDULED||s==T.a.OPEN_VIDU_SCHEDULED||s==T.a.MM_SCHEDULED?le.a.t("components.LiveVideo.goLiveScreenTutor.balanceremoveConfirm","Remove Confirmation"):le.a.t("components.LiveVideo.goLiveScreenTutor.balanceremainingConfirm","Balance Remaining"),bodyText:s==T.a.AGORA_SCHEDULED||s==T.a.OPEN_VIDU_SCHEDULED||s==T.a.MM_SCHEDULED?le.a.t("components.LiveVideo.goLiveScreenTutor.balanceActionBody","Are you sure you want to delete this live session?"):a.eligibilityText,onClose:me,action:function(){try{if(J)return;ee(!0);const t=a.cta&&Object(T.k)(a);if(a.cta&&(t==T.a.AGORA_SCHEDULED||t==T.a.OPEN_VIDU_SCHEDULED||t==T.a.MM_SCHEDULED))return void(t==T.a.AGORA_SCHEDULED||0===Object(T.B)(a,T.a.MM_SCHEDULED,t,!0)?ie(a.liveSessionId,!0):ce(a.liveSessionId,!0));a.showRechargeButton&&e.history.push("/dashboard"),me(),ee(!1)}catch(t){console.log(t)}},actionButtonText:s==T.a.AGORA_SCHEDULED||s==T.a.OPEN_VIDU_SCHEDULED||s==T.a.MM_SCHEDULED?le.a.t("components.LiveVideo.goLiveScreenTutor.balanceActionCta","Yes, Remove"):a.showRechargeButton?le.a.t("components.LiveVideo.goLiveScreenTutor.balanceActionCta2","Recharge Now"):le.a.t("components.LiveVideo.goLiveScreenTutor.balanceActionCta3","Close")}),i.a.createElement(V.a,{status:X,headerText:le.a.t("components.LiveVideo.goLiveScreenTutor.rechargeRemaining","Balance Remaining"),bodyText:le.a.t("components.LiveVideo.goLiveScreenTutor.rechargeRemainingCredit","You dont have enough credits left. Recharge now"),onClose:ue,action:function(){ue(),e.history.push("/dashboard")},actionButtonText:le.a.t("components.LiveVideo.goLiveScreenTutor.recharge","Recharge Now")}),i.a.createElement(z.a,{batchCode:m,batchId:h,showNoStudentsPrompt:B,onClose:()=>{D(!1)},content:le.a.t("components.LiveVideo.goLiveScreenTutor.noStudentModalContent","You currently have no students to take a live class. Please add students to the batch before you go live.")}),i.a.createElement(ne.a,{state:R,onClose:()=>G(null),type:t,batchCode:m,courseId:r}))}return""}))))},2243:function(e,t,a){"use strict";var s=a(1),i=a.n(s),n=a(140),o=a(1478),l=a.n(o),c=a(1357),r=a.n(c),d=a(2138),m=a.n(d),u=a(1479),h=a.n(u),p=a(1021),v=a(47),g=a(1415),b=a(80),C=a(38),S=a(2780),E=a(83),f=
22a(68),y=a(300);class w extends s.Component{constructor(e){super(e),this.handleHelpClicked=()=>{let{isHelpClicked:e}=this.state;this.setState({isHelpClicked:!1})},this.handleHelpCTA=()=>{this.setState({isHelpClicked:!0})},this.handleUrlCTA=(e,t)=>{let{token:a}=this.props;if(this.props&&this.props.courseDetails){let e=this.props&&this.props.courseId,t=this.props.courseDetails&&this.props.courseDetails.metaData&&this.props.courseDetails.metaData.isCoowner;Object(b.c)("COURSE BASE",{ACTION:C.Xb,courseId:e,isFaculty:!!t})}5==t&&window.open(e,"_blank"),1==t&&Object(E.b)(f.H),window.open(Object(g.a)(e,a),"_blank")},this.state={isHelpClicked:!1}}render(){var e;let{zoomLiveCard:t,t:a}=this.props;const s=Object(y.a)(),n={2:{text:s.setup.text,ctaText:s.setup.ctaText},1:{text:s.startClass.text,ctaText:s.startClass.ctaText},3:{text:s.endClass.text,ctaText:s.endClass.ctaText},4:{text:s.joinClass.text,ctaText:s.joinClass.ctaText}};let{isHelpClicked:o}=this.state,c=n[t.type];return i.a.createElement("div",{className:l.a.container},i.a.createElement("div",{className:l.a.header},5==t.type?i.a.createElement("div",{className:l.a.headerLeft},i.a.createElement("img",{src:null===t||void 0===t?void 0:t.imageUrl,alt:"",style:{marginRight:"12px",width:"24px"}}),null===t||void 0===t?void 0:t.text):i.a.createElement("div",{className:l.a.headerLeft},i.a.createElement("img",{src:r.a,alt:"",style:{marginRight:"12px"}}),a("components.ZoomClass.zoomClasses","Zoom Classes")),4==t.type&&i.a.createElement("img",{src:h.a,alt:"",className:l.a.headerRight})),i.a.createElement("div",{className:l.a.content},i.a.createElement("p",{className:l.a.text},c&&c.text),2==t.type&&i.a.createElement("p",{className:l.a.subtext},a("components.ZoomClass.thisIsOneTime","This is a one time set up")),i.a.createElement("button",{className:l.a.ctaButton,style:2==t.type?{color:"#000000"}:{color:"#009AE0"},onClick:2==t.type?this.handleHelpCTA:()=>this.handleUrlCTA(t.cta.deeplink.paramOne,t.type)},2==t.type&&i.a.createElement("img",{src:m.a,style:{marginRight:"12px"}}),5==t.type?null===t||void 0===t||null===(e=t.cta)||void 0===e?void 0:e.text:c&&c.ctaText)),i.a.createElement(p.a,{size:"tiny",open:o,onClose:this.handleHelpClicked},i.a.createElement(v.u.Header,{style:{borderRadius:"4px 4px 0px 0px"}},a("components.ZoomClass.helpVideo","Help Video")),i.a.createElement(v.u.Content,null,i.a.createElement("div",{className:l.a.VideoBody},i.a.createElement("iframe",{id:"vid",src:"https://www.youtube.com/embed/JLIokTvvDq8?autoplay=1",autoPlay:"0"})))))}}var A=Object(S.a)()(w),M=a(165),O=a(182),_=a(2796),L=a(511),B=a(49),D=a(1515),N=a(1036),x=a.n(N),T=a(1290),j=a.n(T),I=a(2139),k=a.n(I),F=a(1024),V=a.n(F),R=a(1071),H=a(1347),G=a(151),P=a(91),U=a(1343),Y=a(2249);const z=a(14).a.t("components.ZoomClass.goLiveZoomModal.StartZoomClass","Start Zoom Class"),Z=e=>{let{heading:t,body:a,footer:s,onClose:n}=e;return i.a.createElement("div",{className:x.a.modal},i.a.createElement("div",{style:{width:"50rem"},className:x.a.modalContent},i.a.createElement("div",{className:`${x.a.Header} ${k.a.header}`},i.a.createElement("div",{className:x.a.HeaderText},t),i.a.createElement("div",null,i.a.createElement("img",{className:"cursorPointer",onClick:n,src:V.a,width:"16px",height:"16px"}))),i.a.createElement("div",{className:`${j.a.modalBody} ${k.a.modalBody}`},a),i.a.createElement("div",{className:`${x.a.goLiveModalFooter} ${j.a.modalFooter} ${k.a.modalFooter}`},s)))};function W(e){let{onClose:t,selectedEntities:a,setSelectedEntities:n,onAddMoreEntities:o,dispatch:l,entityType:c,entityId:d,history:m,batchCode:u}=e;const[h,p]=Object(s.useState)(!1),[g,b]=Object(s.useState)(!1),{t:C}=Object(Y.a)(),S=Object(s.useCallback)(()=>{l(Object(O.a)(a.map(e=>e.courseId),c,m,d,u)),t()},[a,c,m,d,u]);return Object(s.useEffect)(()=>{a.length?b(!0):(p(!0),l(Object(G.b)(c===P.b.COURSE?`v2/courses/list?offset=0&limit=20&sortOrder=1&selectedCourses=[${d}]&search=`:`v3/batches/getLiveSessionBatches?batchId=${d}&offset=0&limit=20`,"GET",void 0,e=>{const{list:t}=e.data;if(t.length){const e=(c===P.b.BATCH?Object(M.o)(t):t).find(e=>e.courseId===d);e&&n([{...e,isSelected:1}])}p(!1)},()=>{p(!1)})))},[l,c,d,a,n,b]),i.a.createElement(Z,{heading:i.a.createElement("div",{className:k.a.headerContent},i.a.createElement("img",{src:r.a,alt:"",style:{width:"32px"}}),i.a.createElement("span",null,z)),body:i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:x.a.goLiveModalTitle,style:{color:"#666666"}}
22,C("components.ZoomClass.goLiveZoomModal.GOINGLIVEFOR","GOING LIVE FOR")," ",c===P.b.COURSE?""+C("components.ZoomClass.goLiveZoomModal.COURSES","COURSES"):""+C("components.ZoomClass.goLiveZoomModal.BATCHES","BATCHES")),h?i.a.createElement(v.r,{active:!0,inline:"centered"}):i.a.createElement(H.a,{selectedEntities:a,showAddMoreBtn:g,onAddMoreEntities:o,addMoreEntitiesText:`${C("components.ZoomClass.goLiveZoomModal.AddMore","Add More")} ${c===P.b.COURSE?""+C("components.ZoomClass.goLiveZoomModal.Courses","Courses"):""+C("components.ZoomClass.goLiveZoomModal.Batches","Batches")}`,numberOfEntitiesToDisplay:4}),i.a.createElement("div",{style:{marginBottom:"120px"}})),footer:i.a.createElement(R.a,{className:j.a.modalFooterBtn,disabled:h||!a.length,onClick:S},z),onClose:t})}var q=Object(_.a)(Object(n.connect)()((function(e){let{dispatch:t,onClose:a,entityType:n,entityId:o,history:l,batchCode:c}=e;const[r,d]=Object(s.useState)([]),[m,u]=Object(s.useState)(!0),h=Object(s.useCallback)(()=>u(!1),[]),p=Object(s.useCallback)(()=>u(!0),[]),{t:v}=Object(Y.a)();return m?i.a.createElement(W,{onClose:a,selectedEntities:r,onAddMoreEntities:h,dispatch:t,entityType:n,entityId:o,setSelectedEntities:d,history:l,batchCode:c}):i.a.createElement(U.a,{toggleCourseModal:p,entityId:o,previousSelectedCourseArray:r,setDisplaySelectedCourseArray:d,entityType:n,headerText:`${v("components.ZoomClass.goLiveZoomModal.addMore","Add more")} ${n===P.b.COURSE?""+v("components.ZoomClass.goLiveZoomModal.Courses","Courses"):""+v("components.ZoomClass.goLiveZoomModal.Batches","Batches")}`,searchPlaceholderText:`${v("components.ZoomClass.goLiveZoomModal.searchFor","Search for")} ${n===P.b.COURSE?""+v("components.ZoomClass.goLiveZoomModal.Courses","Courses"):""+v("components.ZoomClass.goLiveZoomModal.Batches","Batches")}`,maxSelection:10,from:"zoom"})})));var $=Object(_.a)(Object(n.connect)((function(e){return{user:e.persistedData&&e.persistedData.user,zoomV2LoadingState:Object(D.a)(e)}}))((function(e){let{zoomLiveCard:t,dispatch:a,entityId:n,entityType:o,user:c,history:d,zoomV2LoadingState:m,batchCode:u}=e;const{t:p}=Object(Y.a)(),[g,b]=Object(s.useState)(!1),C=Object(s.useMemo)(()=>Object(M.k)(t),[t]),S=Object(s.useMemo)(()=>Object(M.e)(t),[t]),E=Object(s.useMemo)(()=>Object(M.l)(t),[t]),f=Object(s.useCallback)(()=>b(!1),[]),w=Object(s.useCallback)(()=>{const e=Object(M.d)(t);c.type===B.t.tutor?Object(M.g)(t)?e===y.c.ZOOM_V2_LIVE_END?a(Object(O.b)(Object(M.j)(t))):e===y.c.ZOOM_V2_LIVE_START&&b(!0):window.location.assign(`${Object(M.c)(t)}&state=${Object(M.b)()}`):e===y.c.ZOOM_V2_LIVE_JOIN&&(a(Object(L.a)({signature:Object(M.h)(t),meetingNumber:Object(M.m)(t),password:Object(M.i)(t),user:c})),Object(M.p)(d))},[t,c,d,a]);return Object(s.useEffect)(()=>{const e=new URLSearchParams(window.location.search).get("code");e&&a(Object(O.c)(e,o,n,u))},[a,o,n,u]),i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:l.a.container},i.a.createElement("div",{className:`${l.a.header} ${l.a.zoomCardV2Header}`},5===E?i.a.createElement("div",{className:l.a.headerLeft},i.a.createElement("img",{src:Object(M.f)(t),alt:"",style:{marginRight:"12px",width:"24px"}}),C):i.a.createElement("div",{className:l.a.headerLeft},i.a.createElement("img",{src:r.a,alt:"",style:{marginRight:"12px"}}),p("components.ZoomClass.zoomClasses","Zoom Classes")),Object(M.d)(t)===y.c.ZOOM_V2_LIVE_JOIN&&i.a.createElement("img",{src:h.a,alt:"",className:l.a.headerRight})),5!==E&&i.a.createElement("div",{className:l.a.content},m?i.a.createElement(v.r,{active:!0,inline:"centered"}):i.a.createElement(i.a.Fragment,null,i.a.createElement("p",{className:l.a.text},C),i.a.createElement("button",{className:l.a.ctaButton,style:Object(M.d)(t)===y.c.ZOOM_V2_LIVE_SETUP?{color:"#000000"}:{color:"#009AE0"},onClick:w},S)))),g&&i.a.createElement(q,{onClose:f,entityType:o,entityId:n,batchCode:u}))})));t.a=Object(n.connect)((function(e){let{persistedData:t}=e;return{token:t&&t.token}}))((function(e){let{overviewData:t,token:a,course:s}=e;return t?i.a.createElement(i.a.Fragment,null,t.zoomLiveCard&&i.a.createElement(A,Object.assign({zoomLiveCard:t.zoomLiveCard,token:a},s&&{courseId:t.metaData.id,courseDetails:t})),t.zoomLiveCardV2&&i.a.createElement($,{zoomLiveCard:t.zoomLiveCardV2,entityId:s?t.metaData.id:t.batchId,entityType:s?P.b.COURSE:P.b.BATCH,batchCode:t.batchCode})):null}))},2499:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));const s=()=>"_"+Math.random().toString(36).substr(2,9)},2595:function(e,t,a){},2596:function(e,t,a){},2607:function(e,t,a){e.exports=a.p+"static/media/graduates.c9b2c050.svg"},2642:function(e,t,a){"use strict";var s=a(1),i=a.n(s),n=a(2643),o=a.n(n),l=a(1384),c=a(1383),r=a.n(c),d=a(2230),m=a.n(d),u=a(2249);t.a=function(e){var t,a,s,n,c,d,h,p,v,g,b,C,S,E;let{summary:f={},...y}=e;const{t:w}=Object(u.a)();return i.a.createElement("div",{className:o.a.challengeCard,style:y.style},i.a.createElement("div",{className:o.a.cardHeader},i.a.createElement("span",{className:o.a.cardHeaderTitle},w("components.PeerChallenge.ChallengeCard.summaryTitle","Summary")),y.headerLink&&i.a.createElement("div",{className:o.a.cardHeaderLink,onClick:()=>{}},i.a.createElement(l.a,{to:y.headerLink,style:{color:"#009AE0"}}
22,w("components.PeerChallenge.ChallengeCard.viewScoreboard","View Scoreboard")," "))),i.a.createElement("div",{className:o.a.cardContent},i.a.createElement("div",{className:o.a.cardInfo},i.a.createElement("img",{src:null===f||void 0===f||null===(t=f.card)||void 0===t||null===(a=t.info)||void 0===a?void 0:a.icon,className:o.a.cardInfoIcon,alt:"points icon"}),i.a.createElement("div",{className:o.a.infoGroup},i.a.createElement("div",{className:o.a.cardInfoLabel},null===f||void 0===f||null===(s=f.card)||void 0===s?void 0:s.info.heading," "),i.a.createElement("div",{className:o.a.cardInfoValue},(null===f||void 0===f||null===(n=f.card)||void 0===n?void 0:n.info.subHeading)||"-"))),i.a.createElement("div",{className:o.a.cardInfo},i.a.createElement("img",{src:null===f||void 0===f||null===(c=f.card)||void 0===c||null===(d=c.info2)||void 0===d?void 0:d.icon,className:o.a.cardInfoIcon,alt:"ranks icon"}),i.a.createElement("div",{className:o.a.infoGroup},i.a.createElement("div",{className:o.a.cardInfoLabel},null===f||void 0===f||null===(h=f.card)||void 0===h?void 0:h.info2.heading," "),i.a.createElement("div",{className:o.a.cardInfoValue},(null===f||void 0===f||null===(p=f.card)||void 0===p?void 0:p.info2.subHeading)||"-")))),y.footerLink&&i.a.createElement(l.a,{to:y.footerLink},i.a.createElement("div",{className:o.a.cardFooter,onClick:()=>{}},i.a.createElement("div",{className:o.a.footerContent},i.a.createElement("img",{src:m.a,className:o.a.cardInfoIcon,alt:"flag icon"}),i.a.createElement("div",{className:o.a.cardInfoValue,style:{color:null===f||void 0===f||null===(v=f.card)||void 0===v||null===(g=v.footer)||void 0===g?void 0:g.textColor}}," ",null!==f&&void 0!==f&&null!==(b=f.card)&&void 0!==b&&null!==(C=b.footer)&&void 0!==C&&C.text?null===f||void 0===f||null===(S=f.card)||void 0===S||null===(E=S.footer)||void 0===E?void 0:E.text:w("components.PeerChallenge.ChallengeCard.viewAllChallenges","View all challenges"))),i.a.createElement("img",{src:r.a,className:o.a.cardInfoIcon,alt:"rightArrow icon"}))))}},2643:function(e,t,a){e.exports={challengeCard:"ChallengeCard_challengeCard__hmG93",cardHeader:"ChallengeCard_cardHeader__1i4F-",cardHeaderTitle:"ChallengeCard_cardHeaderTitle__3tlvP",cardHeaderLink:"ChallengeCard_cardHeaderLink__1WGux",cardContent:"ChallengeCard_cardContent__2jlmq",cardFooter:"ChallengeCard_cardFooter__oYGBk",cardInfo:"ChallengeCard_cardInfo__2zzpO",cardInfoLabel:"ChallengeCard_cardInfoLabel__3-Vcf",cardInfoValue:"ChallengeCard_cardInfoValue__1pMHb",cardInfoIcon:"ChallengeCard_cardInfoIcon__30-d6",infoGroup:"ChallengeCard_infoGroup__1Kuf0",footerContent:"ChallengeCard_footerContent__311tL"}},2732:function(e,t,a){"use strict";a.r(t);var s=a(1),i=a.n(s),n=a(25),o=a.n(n),l=a(1043),c=a.n(l),r=a(1037),d=a(2796),m=a(140),u=a(5),h=a(47),p=a(57),v=a(151),g=a(1021),b=a(80),C=a(115),S=a(38),E=(a(2595),a(460)),f=a(49),y=a(1410),w=a.n(y),A=a(2144),M=a.n(A),O=a(456),_=(a(2596),a(1728)),L=a.n(_),B=a(67),D=a(176),N=a(1015),x=a(2780),T=a(83),j=a(68);class I extends s.Component{constructor(e){super(e),this.get2digitUniqueId=()=>Math.floor(9e3*Math.random()+1e3)+parseInt(Date.now().toString().slice(-2)),this.batchCodeAuthentication=e=>{const t=new RegExp(/^[a-zA-Z 0-9]+$/);return e.length>=5&&t.test(e)},this.reloadBatchesAfterUpdation=()=>{let{batchCode:e}=this.state,{batchId:t}=this.props;const a=`/batches/${t}/${e.value}/overview`;this.props.handleModalClose(),this.setState({loading:!1}),e.value===this.props.defaultBatch.batchCode&&this.props.setBatchEdited(),this.props.history.push(a)},this.handleGetStudents=e=>{const t=e.data.students.map(e=>(e.selected=!0,e));this.setState({loading:!1,duplicateStudents:t})},this.handleSelectStudents=()=>{this.setState({selectStudentShow:!0,loading:!0});let e=`v2/batches/${this.props.defaultBatch.batchCode}/students?type=current`;this.state.studentListSearchTerm&&(e+="&search="+this.state.studentListSearchTerm),this.props.makeApiCall(e,"get",void 0,this.handleGetStudents)},this.handleStudentDeSelection=e=>{const t=e.target.id,a=[],s=this.state.duplicateStudents;s.map(e=>{e.id==t&&(e.selected=!e.selected),e.selected||a.push(e)}),this.setState({duplicateStudents:s,unSelectedArr:a})},this.handleSearchOnChange=e=>{this.setState({studentListSearchTerm:e.target.value},()=>{this.handleSelectStudents()})},this.validateCreateBatchDate=(e,t)=>
22{let{edit:a}=this.props;if(a){let{defaultBatch:t}=this.props,a=t.createdDate.split("T")[0];if(e.isSame(o()(a))||e.isAfter(o()(a)))return!0}let s=o()().subtract(1,"day");return e.isAfter(s)},this.isOfflineBatch=()=>Object(p.c)(this.state.batchType);const t=parseInt(Object(E.b)().batchType),a=this.props.location;this.state={totalBatchesCount:a.state&&a.state.totalBatchesCount?a.state.totalBatchesCount:"",batchName:{disable:!1,value:"",defaultStatus:"offline"},batchCreateDate:o()(new Date).format("YYYY-MM-DD"),validBatchCreateDate:!0,batchCode:{disabled:!0,value:"",batchCodeLoading:!1,batchCodeAuthentication:!1},categoryOptions:[],category:{loading:!1,disabled:!0,value:""},courseOptions:[],courseSelected:null,courseName:{loading:!1,disabled:!0,value:""},subjectOptions:[],subjectName:{loading:!1,disabled:!0,value:[]},showTimePicker:!1,timings:[],loading:!1,modalOpenByDefault:"/batches/new"===e.match.path,defaultValuesSet:!1,timeError:!1,addingCourse:!1,createBatch:"offline",batchType:t||1,unSelectedArr:[],selectStudentShow:!1,duplicateStudents:[],studentListSearchTerm:"",dateChangeWarning:!1,isOnboardingBatch:this.props.location&&this.props.location.state&&this.props.location.state.isOnboardingBatch},this.renderCalendarDay=this.renderCalendarDay.bind(this),this.handleModalClose=this.handleModalClose.bind(this),this.handleSubmit=this.handleSubmit.bind(this),this.handleEditSubmit=this.handleEditSubmit.bind(this),this.handleCreateBatchSubmit=this.handleCreateBatchSubmit.bind(this),this.handleBatchNameChange=this.handleBatchNameChange.bind(this),this.handleBatchCodeChange=this.handleBatchCodeChange.bind(this),this.handleCategoryChange=this.handleCategoryChange.bind(this),this.handleCourseChange=this.handleCourseChange.bind(this),this.handleSubjectChange=this.handleSubjectChange.bind(this),this.handleDaySelect=this.handleDaySelect.bind(this),this.closeTimePicker=this.closeTimePicker.bind(this),this.timePickerStartOnChange=this.timePickerStartOnChange.bind(this),this.timePickerEndOnChange=this.timePickerEndOnChange.bind(this),this.setDefaultValues=this.setDefaultValues.bind(this),this.handleCourseAddition=this.handleCourseAddition.bind(this),this.handleSubjectAddition=this.handleSubjectAddition.bind(this),this.handleBatchCreateTime=this.handleBatchCreateTime.bind(this),this.handleChangeClassRoomBatch=this.handleChangeClassRoomBatch.bind(this),this.handleCategoryData=this.handleCategoryData.bind(this),this.handleChangeOnlineBatch=this.handleChangeOnlineBatch.bind(this)}componentDidUpdate(e,t){if(this.props.defaultBatch&&!this.state.defaultValuesSet&&this.setDefaultValues(),!e.duplicate&&this.props.duplicate&&this.setDuplicateNames(),t.batchCode.value&&t.batchCode.value!==this.state.batchCode.value&&(this.state.modalOpenByDefault||this.props.modalOpen))if(0!==this.state.batchCode.value.length){const{batchCode:e}=this.state;this.batchCodeAuthentication(e.value)?this.props.makeApiCall(`/batches/${e.value}/check`,"GET",void 0,()=>{this.setState({batchCode:{...this.state.batchCode,batchCodeAuthentication:!1,batchCodeLoading:!1}})},e=>{this.setState({batchCode:{...this.state.batchCode,batchCodeAuthentication:!e.data.isAvailable,batchCodeLoading:!1}})}):this.setState({batchCode:{...this.state.batchCode,batchCodeAuthentication:!0,batchCodeLoading:!1}})}else this.setState({batchCode:{...this.state.batchCode,batchCodeAuthentication:!1,batchCodeLoading:!1}})}getBatchTypeFromUrl(){}componentDidMount(){this.handleCategoryData()}handleCategoryData(){this.props.makeApiCall("/v3/batches/categories","GET",void 0,e=>{this.setState({categoryOptions:Object(p.f)(e.data.list)})})}handleBatchCreateTime(e){let{edit:t,t:a}=this.props;if("function"===typeof e.format){let a=e.format("YYYY-MM-DD");if(t){let{defaultBatch:t}=this.props,a=t.createdDate.split("T")[0];o()(a).isBefore(o()())&&e.isAfter(o()(a))?this.setState({dateChangeWarning:!0}):this.setState({dateChangeWarning:!1})}this.setState({batchCreateDate:a,validBatchCreateDate:!0})}else if("function"==typeof o()(e).format&&"Invalid date"!==o()(e).format("YYYY-MM-DD"))if("string"==typeof e);
22else if(e.split(",")[1]&&5===e.split(",")[1].length){let t=o()(e).format("YYYY-MM-DD");this.setState({batchCreateDate:t,validBatchCreateDate:!0})}else o()().diff(e,"days")||this.setState({batchCreateDate:e,validBatchCreateDate:!1});else u.toastr.warning(a("containers.CreateNewBatch.toastr.dateError","Date Error"),a("containers.CreateNewBatch.toastr.selectDateProperly","Select date properly")),this.setState({...this.state,batchCreateDate:"",validBatchCreateDate:!1})}handleChangeClassRoomBatch(){this.setState({batchType:f.d.OFFLINE})}handleChangeOnlineBatch(){this.setState({batchType:f.d.ONLINE})}setDuplicateNames(){const{defaultBatch:e}=this.props;this.setState({batchName:{disable:!1,value:e.batchName+" Duplicate"},batchCode:{disable:!!this.props.edit,value:`${e.batchCode.length<14?e.batchCode:e.batchCode.substr(0,12)}dp${this.get2digitUniqueId()}`},batchCreateDate:o()().format("YYYY-MM-DD")})}setDefaultValues(){const{defaultBatch:e,defaultTimings:t}=this.props;let a=e.subjects.map(e=>e.id);const s=e.createdDate.split("T")[0];this.setState({batchName:{disable:!1,value:""+e.batchName},batchCode:{disabled:!!this.props.edit,value:""+e.batchCode},category:{loading:!1,disabled:!1,value:e.categoryId},courseName:{loading:!1,disabled:!0},subjectName:{loading:!1,disabled:!0,value:a},timings:t,defaultValuesSet:!0,batchCreateDate:s,batchType:e.batchType}),t&&t.length>0&&this.setState({showTimePicker:!0}),e.categoryId&&(this.setState({courseName:{...this.state.courseName,loading:!0}}),3===this.props.userType?this.props.makeApiCall("/v2/batch/courses?categoryId="+e.categoryId,"GET",void 0,t=>{this.setState({courseOptions:Object(p.f)(t.data.list),courseName:{loading:!1,disabled:!1,value:e.courseId}})},()=>{}):this.setState({courseName:{loading:!1,disabled:!1,value:e.courseId}})),e.courseId&&(this.setState({subjectName:{...this.state.subjectName,loading:!0}}),3===this.props.userType?this.props.makeApiCall("/v2/batch/subjects?courseId="+e.courseId,"GET",void 0,e=>{this.setState({subjectOptions:Object(p.f)(e.data.list),subjectName:{loading:!1,disabled:!1,value:a}})}):this.setState({subjectName:{loading:!1,disabled:!1,value:a}}))}handleBatchNameChange(e){const t=e.target.value,a=this.state.batchCode,s=t.trimLeft();!this.props.edit&&s.trim().length>3&&s.length<55&&(a.value=Object(p.h)(s),a.disabled=!1,a.batchCodeAuthentication=!1),this.setState({batchName:{disabled:!1,value:s},batchCode:a})}handleBatchCodeChange(e){const t=e.target.value;t.length<16&&this.setState({batchCode:{...this.state.batchCode,value:t,batchCodeLoading:!0,batchCodeAuthentication:!1}})}handleCategoryChange(e,t){const{t:a}=this.props;let{category:s}=this.state;if(t.value===s.value)return;this.setState({courseName:{...this.state.courseName,disabled:!1,loading:!0,value:""},subjectName:{...this.state.subjectName,value:[],disabled:!0}});const{value:i}=t;this.props.makeApiCall("/v2/batch/courses?categoryId="+i,"GET",void 0,e=>{this.setState({courseOptions:Object(p.f)(e.data.list),courseName:{...this.state.courseName,disabled:!1,loading:!1},category:{value:i,loading:!1,disabled:!1}})},e=>{u.toastr.error(a("containers.CreateNewBatch.toastr.networkError","Network Error"),a("containers.CreateNewBatch.toastr.failedToFetch","Failed to fetch courses"))})}handleCourseChange(e,t){const{t:a}=this.props;if(t.value===this.state.courseName.value)return;if("number"!==typeof t.value)return;if(this.state.addingCourse)return void this.setState({addingCourse:!1});this.setState({subjectName:{...this.state.subjectName,disabled:!1,loading:!0,value:[]}});const{value:s}=t;this.props.makeApiCall("/v2/batch/subjects?courseId="+s,"GET",void 0,e=>{this.setState({subjectOptions:Object(p.f)(e.data.list),subjectName:{...this.state.subjectName,disabled:!1,loading:!1},courseName:{value:s,loading:!1,disabled:!1}})},()=>{u.toastr.error(a("containers.CreateNewBatch.toastr.networkError","Network Error"),a("containers.CreateNewBatch.toastr.failedToFetchSubjects","Failed to fetch subjects"))})}handleSubjectChange(e,t){const{value:a}=t;this.setState({subjectName:{...this.state.subjectName,disabled:!1,loading:!1,value:a}})}handleCourseAddition(e,t){let{value:a}=t;const{t:s}=this.props;if(a.length<1)return u.toastr.warning(s("containers.CreateNewBatch.toastr.invalid","Invalid"),s("containers.CreateNewBatch.toastr.courseNameAtleast","Course name at least 2 chars long"));this.setState({addingCourse:!0,subjectName:{...this.state.subjectName,disabled:!0,loading:!1}});let i=null;this.props.makeApiCall("/tutors/courses","POST",{categoryId:this.state.category.value,name:a},e=>{const{data:t}=e;this.setState({courseOptions:[{key:t[0].id,value:t[0].id,text:t[0].name},...this.state.courseOptions],courseName:{...this.state.courseName,value:t[0].id},subjectName:{...this.state.subjectName,disabled:!1},addingCourse:!1}),u.toastr.success(s("containers.CreateNewBatch.toastr.success","Success"),s("containers.CreateNewBatch.toastr.addedNewCourse","Added new course")),i=t[0].id,this.handleCourseChange({},{value:i}),Object(b.a)(S.Qb),Object(C.IntercomAPI)("trackEvent",S.Qb)},()=>{})}handleSubjectAddition(e,t){let{value:a}=t;const{t:s}=this.props;if(a.length<1)return u.toastr.warning(s("containers.CreateNewBatch.toastr.invalid","Invalid"),s("containers.CreateNewBatch.toastr.subjectNameAtleast2","Subject name at least 2 chars long"));this.props.makeApiCall("/v2/batch/subject","POST",{courseId:this.state.courseName.value,name:a,batchId:this.props.batchId},e=>{const{data:t}=e;this.setState({subjectOptions:[{key:t.list[0].id,value:t.list[0].id,text:t.list[0].name},...this.state.subjectOptions],subjectName:{...this.state.subjectName,value:this.state.subjectName.value.map(e=>(e===a&&(e=t.list[0].id),e))}}),u.toastr.success(s("containers.CreateNewBatch.toastr.success","Success"),s("containers.CreateNewBatch.toastr.addedNewSubject","Added new subject")),Object(b.a)(S.cf),Object(C.IntercomAPI)("trackEvent",S.cf)}
22,()=>{})}handleModalClose(){this.setState({batchName:{disable:!1,value:""},batchCode:{disabled:!0,value:""},category:{loading:!1,disabled:!0,value:""},courseOptions:[],courseName:{loading:!1,disabled:!0,value:""},subjectOptions:[],subjectName:{loading:!1,disabled:!0,value:""},showTimePicker:!1,timings:[],loading:!1,defaultValuesSet:!1,timeError:!1,addingCourse:!1,selectStudentShow:!1,duplicateStudents:[],studentListSearchTerm:""}),this.props.edit||this.props.duplicate||this.props.subjectModal?this.props.handleModalClose():this.props.history.push("/batches")}handleCreateBatchSubmit(){const{t:e}=this.props;this.setState({loading:!0});const{batchName:t,batchCode:a,batchCreateDate:s}=this.state;let i="";var n={batchStartDate:s,batchName:t.value,batchCode:a.value.toLowerCase()};if("duplicate"===this.props.modalType){const e=[];this.state.duplicateStudents.map(t=>{1==t.selected&&e.push(t.studentId)}),n.studentIds=e,i="/v2/batches/create/"+this.props.batchCode}else i="/v2/batches/create";return/^[a-z0-9]+$/i.test(n.batchCode)?/^\d{4}-\d{2}-\d{2}$/.test(n.batchStartDate)?void this.props.makeApiCall(i,"POST",n,t=>{if("success"===t.status){if(Object(C.IntercomAPI)("trackEvent",S.T),this.props.saveStep({stepId:3,isCompleted:!0}),Object(T.b)(j.S),this.props.duplicate)Object(B.a)(S.Bc,"batch"),u.toastr.success(e("containers.CreateNewBatch.toastr.batchDuplicated","BATCH DUPLICATED"),e("containers.CreateNewBatch.toastr.batchDuplicateSuccess","Duplicate batch created successfully")),Object(B.a)(S.S,"batch"),this.setState({loading:!1}),this.handleModalClose();else{Object(B.a)(S.S,"batch",{totalBatchesCount:this.state.totalBatchesCount});const t="/batches";this.props.history.push(t),u.toastr.success(e("containers.CreateNewBatch.toastr.batchCreated","BATCH CREATED"),e("containers.CreateNewBatch.toastr.batchCreatedSuccessfully","Batch created successfully"))}this.props.history.push(`/batches/${t.data.id}/${t.data.batchCode}/overview`)}},e=>{this.setState({loading:!1})}):(this.setState({loading:!1}),u.toastr.error(e("containers.CreateNewBatch.toastr.error","Error"),e("containers.CreateNewBatch.toastr.invalidDate","Invalid Date"))):(this.setState({loading:!1}),u.toastr.error(e("containers.CreateNewBatch.toastr.error","Error"),e("containers.CreateNewBatch.toastr.invalidBatchCode","Invalid batch code")))}handleEditSubmit(){const{t:e}=this.props;this.setState({loading:!0});const{batchName:t,batchCode:a,subjectName:s,batchCreateDate:i,category:n,courseName:o}=this.state;if(n.value&&!o.value)return u.toastr.error(e("containers.CreateNewBatch.toastr.error","Error"),e("containers.CreateNewBatch.toastr.pleaseSelectCourse","Please select a course first"));if(n.value&&o.value&&!s.value.length)return u.toastr.error(e("containers.CreateNewBatch.toastr.error","Error"),e("containers.CreateNewBatch.toastr.pleaseSelectSubjects","Please select subjects first"));const l={batchName:t.value,batchCode:a.value.toLowerCase(),subjectIds:s.value,batchStartDate:i,categoryId:n.value,courseId:o.value};return/^[a-z0-9]+$/i.test(l.batchCode)?/^\d{4}-\d{2}-\d{2}$/.test(l.batchStartDate)?void this.props.makeApiCall(`/v2/batches/${this.props.defaultBatch.batchCode}/edit`,"PATCH",l,t=>{Object(B.a)(S.Y),Object(T.b)(j.D),"success"===t.status&&(this.reloadBatchesAfterUpdation(),Object(C.IntercomAPI)("trackEvent",S.jb),u.toastr.success(e("containers.CreateNewBatch.toastr.success","Success"),e("containers.CreateNewBatch.toastr.batchEditSuccess","Batch Edited Successfully")))},e=>{this.setState({loading:!1})}):(this.setState({loading:!1}),u.toastr.error(e("containers.CreateNewBatch.toastr.error","Error"),e("containers.CreateNewBatch.toastr.invalidDate","Invalid Date"))):(this.setState({loading:!1}),u.toastr.error(e("containers.CreateNewBatch.toastr.error","Error"),e("containers.CreateNewBatch.toastr.invalidBatchCode","Invalid batch code")))}handleSubmit(){this.props.edit||this.props.subjectModal?this.handleEditSubmit():this.handleCreateBatchSubmit()}handleDaySelect(e){const{timings:t}=this.state,a=t.filter(t=>t.day===e),s=this.state.timings.filter(t=>t.day!==e);let i=[];i=a.length?[...s]:[...s,{day:e,start:t[0]&&t[0].start||o()("00:00:00","HH:mm:ss").format("HH:mm:ss"),end:t[0]&&t[0].end||o()("00:00:00","HH:mm:ss").format("HH:mm:ss")}];const n=i.sort((e,t)=>
22e.day-t.day);this.setState({showTimePicker:!0,timings:n})}timePickerStartOnChange(e,t){const{t:a}=this.props,{timings:s}=this.state,i=s.filter(e=>e.day!==t),n=s.filter(e=>e.day===t);if(o.a.isMoment(e)){n[0].start=e.format("HH:mm:ss");const t=[...i,...n].sort((e,t)=>e.day-t.day);this.setState({timings:t,timeError:!1})}else u.toastr.warning(a("containers.CreateNewBatch.toastr.timeError","Time Error"),a("containers.CreateNewBatch.toastr.invalidTimeFormat","Invalid time format"))}timePickerEndOnChange(e,t){const{t:a}=this.props,{timings:s}=this.state,i=s.filter(e=>e.day===t),n=s.filter(e=>e.day!==t);if(o.a.isMoment(e)){i[0].end=e.format("HH:mm:ss");const t=[...n,...i].sort((e,t)=>e.day-t.day);this.setState({timings:t,timeError:!1})}else u.toastr.warning(a("containers.CreateNewBatch.toastr.timeError","Time Error"),a("containers.CreateNewBatch.toastr.invalidTimeFormat","Invalid time format"))}closeTimePicker(e){const{timings:t}=this.state,a=t.filter(t=>t.day!==e);this.setState({timings:a})}renderCalendarDay(e){const t={color:"#ffffff",backgroundColor:"#428bca",borderRadius:"10%"};return(a,s,n)=>{let l={};return e&&o()(""+e).format("YYYY-MM-DD")===s.format("YYYY-MM-DD")&&(l=t),i.a.createElement("td",Object.assign({},a,{style:l}),s.date())}}render(){var e,t,a;const{batchName:s,batchCode:n,category:l,courseName:d,subjectName:m,categoryOptions:u,courseOptions:p,subjectOptions:v,showTimePicker:b,timings:C,batchCreateDate:S,validBatchCreateDate:E}=this.state,{edit:f,duplicate:y,subjectModal:A,defaultBatch:_,t:B}=this.props;let D=A?Boolean(l.value&&d.value&&m.value.length>0):Boolean(s.value.length>3&&s.value.length<=55&&!n.batchCodeAuthentication&&E);const x=i.a.createElement("div",{className:"created-time-container"},i.a.createElement("label",{className:"created-time-label"},B("containers.CreateNewBatch.batchStartDate","Batch Start Date")),i.a.createElement("div",{className:"ui left icon datepicker",style:{position:"relative"}},i.a.createElement("i",{className:"calendar icon",style:{position:"absolute",top:"7px",left:"250px","z-index":"5000"}}),i.a.createElement(c.a,{timeFormat:!1,closeOnSelect:!0,value:o()(S).format(""+(this.props.dateTimeStamp?null===(e=this.props.dateTimeStamp)||void 0===e?void 0:e.toUpperCase():"LL"))!==B("containers.CreateNewBatch.invalidDate","Invalid date")&&S.split("-")[0]&&4===S.split("-")[0].length?o()(S).format(""+(this.props.dateTimeStamp?null===(t=this.props.dateTimeStamp)||void 0===t?void 0:t.toUpperCase():"LL")):S,inputProps:{readOnly:!0},onChange:this.handleBatchCreateTime,renderDay:this.renderCalendarDay(this.state.batchCreateDate),defaultValue:y?o()().format(""+(this.props.dateTimeStamp?null===(a=this.props.dateTimeStamp)||void 0===a?void 0:a.toUpperCase():"YYYY-MM-DD")):this.state.batchCreateDate,isValidDate:this.validateCreateBatchDate}))),T=A?B("containers.CreateNewBatch.modalHeader.addBatchDetails","Add Batch Details"):f?B("containers.CreateNewBatch.modalHeader.editBatch","Edit Batch"):"duplicate"!=this.props.modalType?B("containers.CreateNewBatch.modalHeader.createNewBatch","Create New Batch"):this.state.selectStudentShow?B("containers.CreateNewBatch.modalHeader.dupestep1","Duplicate Batch : Step 2 of 2"):B("containers.CreateNewBatch.modalHeader.dupestep2","Duplicate Batch : Step 1 of 2"),j=A?B("containers.CreateNewBatch.button.done","Done"):f?B("containers.CreateNewBatch.button.save","Save"):B("containers.CreateNewBatch.button.createBatch","Create Batch"),I=(d.disabled||n.disabled,m.disabled||n.disabled?{display:"block",fontWeight:"700",opacity:"0.45"}:{display:"block",fontWeight:"700"}),k=this.state.duplicateStudents.length-this.state.unSelectedArr.length,F=this.state.duplicateStudents.length;return i.a.createElement("div",null,i.a.createElement(r.Helmet,null,i.a.createElement("meta",{charSet:"utf-8"}),i.a.createElement("title",null,B("containers.CreateNewBatch.createBatchTitle","Create Batch")," ")),i.a.createElement(g.a,{style:{maxHeight:"99%"},size:"small",open:this.state.modalOpenByDefault||this.props.modalOpen,onClose:this.handleModalClose,dimmer:"dimmer",closeOnEscape:!1},i.a.createElement(h.u.Header,{style:{borderRadius:"4px 4px 0px"}},T),i.a.createElement(h.u.Content,{scrolling:!0,style:{maxHeight:"70.5vh","overflow-y":"auto",minHeight:"30rem"}},!A&&!f&&"duplicate"!==this.props.modalType&&this.props.location&&this.props.location.state&&this.props.location.state.isOnboarding?i.a.createElement("div",{className:"noBatch"},"To add students, you need to create a batch first"):"",this.state.selectStudentShow&&i.a.createElement("div",null,i.a.createElement("div",{className:"select-student-static-text"},B("containers.CreateNewBatch.selectStudentToAdd","Select Student to add in batch")),i.a.createElement("div",{style:{position:"relative","font-size":"14px","line-height":"17px",color:"#989898",width:"100%",border:"1px solid #CCCCCC",borderRadius:"4px",padding:"8px"}},i.a.createElement("img",{src:L.a,alt:"",style:{position:"absolute",top:"6px",left:"10px"}}),i.a.createElement("input",{value:this.state.studentListSearchTerm,onChange:this.handleSearchOnChange,placeholder:B("containers.CreateNewBatch.searchForStudents","Search for Students"),style:{paddingLeft:"40px",border:"none",width:"100%",outline:"none"}})),0!=this.state.duplicateStudents.length?i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:{"font-size":"16px",margin:"1.5rem 0"}},B("containers.CreateNewBatch.selectStudents","Select Students")," -"," ",this.state.duplicateStudents&&this.state.duplicateStudents.length?`${k} / ${F}`:""),this.state.duplicateStudents.map((e,t)=>i.a.createElement("div",{key:e.id,style:{display:"flex",justifyContent:"space-between",margin:"0.8rem 0","border-bottom":"1px solid rgba(0,0,0,0.12)"}},i.a.createElement("div",{style:{display:"flex"}},i.a.createElement("div",{style:{fontSize:"16px",paddingRight:"5px",paddingTop:"5px"}}),i.a.createElement("div",{style:{fontSize:"14px",display:"flex"}},i.a.createElement(O.a,{user:{name:e.name,imageUrl:e.imageUrl||!1},size:35,style:{paddingLeft:".5em"}}),i.a.createElement("div",{style:{"margin-left":"1.5rem"}},i.a.createElement("div",{style:{fontSize:"16px",lineHeight:"22px",color:"rgba(0, 0, 0, 0.87)",width:"300px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},e.name),i.a.createElement("div",{style:{fontSize:"12px",lineHeight:"18px",color:"rgba(0,0,0,0.6)",padding:"8px 0"}},e.mobile)))),i.a.createElement("div",{style:{"padding-top":"5px"}},i.a.createElement(h.d,{id:e.id,defaultChecked:!0,onChange:this.handleStudentDeSelection}))))):i.a.createElement("div",{style:{textAlign:"center",fontSize:"20px",paddingTop:"40px"}},B("containers.CreateNewBatch.noStudentsAvailable","No students available in batch"))),f&&this.state.dateChangeWarning?i.a.createElement("p",{style:{padding:"12px 16px",background:"rgba(255, 64, 88, 0.08)",fontSize:"12px",display:"flex",alignItems:"center",justifyContent:"center"}},i.a.createElement(N.a,{i18nKey:"containers.CreateNewBatch.youWillLoseAllAttendance"},"You will lose all attendance data marked between batch old start date and batch new start date. Please proceed only if you're very sure.")):null,!this.state.selectStudentShow&&i.a.createElement(h.j,null,!A&&i.a.createElement(h.j.Group,{widths:"equal"},i.a.createElement(h.j.Input,{name:"batchName",label:B("containers.CreateNewBatch.batchName","Batch Name"),placeholder:B("containers.CreateNewBatch.egPhyBatch","e.g. Physics Batch"),focus:!0,autoFocus:!0,value:s.value,error:s.value.length>55,onChange:this.handleBatchNameChange}),this.isOfflineBatch()&&i.a.createElement(i.a.Fragment,null,i.a.createElement(h.j.Input,{name:"batchCode",label:B("containers.CreateNewBatch.batchCode","Batch Code"),placeholder:B("containers.CreateNewBatch.egPhy123","e.g. Phy123"),value:n.value,loading:n.batchCodeLoading,error:n.batchCodeAuthentication,onChange:this.handleBatchCodeChange}),!n.batchCodeLoading&&n.batchCodeAuthentication&&i.a.createElement("span",{style:{display:"flex",top:"34px",position:"absolute",right:"6px",color:"#DB2828",fontSize:"9px"}}," ",i.a.createElement("img",{style:{marginRight:"2px"},src:w.a,alt:"error"}),i.a.createElement("p",{style:{lineHeight:"14px",fontSize:"12px"}},B("containers.CreateNewBatch.invalidBatchCode","Invalid Batch Code!"))),!n.batchCodeLoading&&!n.batchCodeAuthentication&&n.value.length>=5&&i.a.createElement("span",{style:{display:"flex",top:"30px",position:"absolute",right:"6px",color:"#DB2828",fontSize:"9px"}}," ",i.a.createElement("img",{style:{marginRight:"2px",width:"20px"},src:M.a,alt:"error"})))),A?null:i.a.createElement(h.j.Group,{widths:"equal"},x,i.a.createElement(h.j.Input,{style:{display:"none"}})),f?i.a.createElement("hr",{className:"hr-line",style:{marginTop:"30px"}}):null,f?i.a.createElement("p",{style:{padding:"12px 16px",background:"rgba(0, 154, 224, 0.12)",fontSize:"12px",display:"flex",alignItems:"center",justifyContent:"center"}},i.a.createElement(N.a,{i18nKey:"containers.CreateNewBatch.nowAddMultiple"},"Now add multiple subjects in a single batch but make sure all students are studying the same subjects.")):null,f||A?i.a.createElement(i.a.Fragment,null,i.a.createElement(h.j.Group,{widths:"equal"},i.a.createElement(h.j.Select,{style:{height:"42px"},name:"category",label:B("containers.CreateNewBatch.category","Category"),placeholder:B("containers.CreateNewBatch.selectCategory","Select Category"),disabled:n.value.length<4,options:u,onChange:this.handleCategoryChange,size:"mini",value:this.state.category.value}),i.a.createElement(h.j.Select,{style:{height:"42px"},name:"course",label:B("containers.CreateNewBatch.course","Course"),placeholder:B("containers.CreateNewBatch.selectCourse","Select Course"),defaultValue:this.props.defaultBatch&&this.props.defaultBatch.courseId,search:!0,selection:!0,allowAdditions:!0,additionLabel:B("containers.CreateNewBatch.addNewCourse","Add new course")+" : ",onAddItem:this.handleCourseAddition,options:p,disabled:n.value.length<4||d.disabled,onChange:this.handleCourseChange,loading:this.state.courseName.loading,size:"mini",value:this.state.courseName.value})),i.a.createElement(h.j.Group,{style:{width:"103%"},widths:"equal"},i.a.createElement(h.j.Input,{style:{display:"block",marginTop:"1%"}},i.a.createElement("label",{style:I},B("containers.CreateNewBatch.subjects","Subjects")),i.a.createElement(h.h,{style:{display:"block",marginTop:"2%"},placeholder:B("containers.CreateNewBatch.selectSubjectPlaceholder","Select Subjects"),search:!0,selection:!0,name:"subjects",label:B("containers.CreateNewBatch.subjects","Subjects"),multiple:!0,options:v,onChange:this.handleSubjectChange,defaultValue:this.props.defaultBatch&&this.props.defaultBatch.subjectId,disabled:n.value.length<4||m.disabled,loading:this.state.subjectName.loading,allowAdditions:!0,additionLabel:B("containers.CreateNewBatch.addNewSubject","Add new Subject")+" : ",onAddItem:this.handleSubjectAddition,size:"mini",value:this.state.subjectName.value})))):null)),i.a.createElement(h.u.Actions,{style:{backgroundColor:"#ffffff"}},("duplicate"!==this.props.modalType||this.state.selectStudentShow)&&i.a.createElement(h.j.Button,{style:{marginBottom:"2%",fontSize:"1rem"},primary:!0,floated:"right",disabled:!D,onClick:this.handleSubmit,size:"mini"},j),"duplicate"===this.props.modalType&&!this.state.selectStudentShow&&i.a.createElement(h.j.Button,{style:{marginBottom:"2%",fontSize:"1rem"},primary:!0,floated:"right",disabled:!D,onClick:this.handleSelectStudents,loading:this.state.loading,size:"mini"},B("containers.CreateNewBatch.selectStudents","Select Students")))))}}t.default=Object(d.a)(Object(m.connect)((function(e){var t,a;return{createNewBatch:e.form.createNewBatch,studentList:e.studentList.students,organization:e.persistedData&&e.persistedData.organization||{},userType:e.persistedData&&e.persistedData.user.type,dateTimeStamp:null===e||void 0===e||null===(t=e.persistedData)||void 0===t||null===(a=t.organization)||void 0===a?void 0:a.dateTimeStamp}}),{makeApiCall:v.b,saveStep:D.j})(Object(x.a)()(I)))},2741:function(e,t,a){e.exports=a.p+"static/media/threeDots.ce0b3ee6.svg"},2742:function(e,t,a){},3211:function(e,t,a){e.exports=a.p+"static/media/study-material-folder.51e18e4d.svg"},3212:function(e,t,a){e.exports=a.p+"static/media/addMaterial.2ae59d86.svg"},3213:function(e,t,a){},3214:function(e,t,a){e.exports=a.p+"static/media/dupliImage.2788ccc8.svg"},3215:function(e,t,a){e.exports=a.p+"static/media/batchCalendar.bf3fa2a4.svg"},3216:function(e,t,a){e.exports=a.p+"static/media/batchBook.6fb9b77e.svg"},3217:function(e,t,a){e.exports=a.p+"static/media/batchHash.d123a9bf.svg"},3218:function(e,t,a){e.exports=a.p+"static/media/batchSubject.9eb658b3.svg"},3219:function(e,t,a){},3220:function(e,t,a){},3221:function(e,t,a){},3222:function(e,t,a){},3223:function(e,t,a){},3224:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADASURBVHgBfdI7DsIwDABQ25GAY/QKjGz0BoysPVlXRm5QNkaukGtQKTV2pNLm43iKar/Gcoyf271jh+M38HB5Pjw0Yl9L7NzIgNeDo+ktiRZaiCatPQomDGEAZi+5zsIrAgTJsdcbcUugJFCRn8PSr23naA4cc5j+NcUnOdSQ1mPZ0oaBY0WBCljBUEMaBNVA42zAfBCtaZOFtD1auLcwWih9jvKpsIWMgUUcV66
22FNM7ybd/2f+UY+GWhHGutrtwPJpnSB8A3yVIAAAAASUVORK5CYII="},3226:function(e,t,a){e.exports=a.p+"static/media/classEmptyState.266e2579.svg"},3227:function(e,t,a){},3228:function(e,t,a){e.exports=a.p+"static/media/SVGBatchVideo.74243727.svg"},3229:function(e,t,a){e.exports=a.p+"static/media/SVGPlayGrey.c412b52b.svg"},3230:function(e,t,a){e.exports=a.p+"static/media/SVGBatchFile.f45f0806.svg"},3231:function(e,t,a){e.exports=a.p+"static/media/SVGFileGrey.b5cb6351.svg"},3232:function(e,t,a){e.exports=a.p+"static/media/SVGBatchGrade.a56f23b7.svg"},3233:function(e,t,a){e.exports=a.p+"static/media/SVGGradeGrey.c7b456e7.svg"},3234:function(e,t,a){},3235:function(e,t,a){e.exports=a.p+"static/media/tutorEmpty.3a34f816.svg"},3406:function(e,t,a){"use strict";a.r(t);var s=a(1),i=a.n(s),n=a(140),o=a(1037),l=a(1178),c=a(47),r=a(2796),d=a(704),m=a(132),u=a(3211),h=a.n(u),p=a(369),v=a(2720);const g=Object(p.c)(v.a)` 23 width: 50%; 24 margin: 0 auto; 25`;var b=a(5),C=a(163),S=a(1021),E=a(177),f=a(1088),y=a(2249);var w=Object(f.a)({form:"StudyMaterial"})((function(e){let{handleSubmit:t,open:a,onClose:s,loading:n,initialValues:o}=e;const{t:l}=Object(y.a)();return i.a.createElement(S.a,{open:a,onClose:s,size:"tiny"},i.a.createElement(c.u.Header,{style:{borderRadius:"4px 4px 0px 0px"}},o.batchStudyMaterialUrl.length?l("components.BatchManagement.BatchOverview.StudyMaterial.AddStudyMaterialModal.editStudyMaterial","Edit Study Material"):l("components.BatchManagement.BatchOverview.StudyMaterial.AddStudyMaterialModal.addStudyMaterial","Add Study Material")),i.a.createElement(c.u.Content,null,i.a.createElement(c.j,{onSubmit:t},i.a.createElement(c.k,null,i.a.createElement(c.k.Row,null,i.a.createElement(c.k.Column,{computer:"16",className:"pt-0 pb-0 pr-0"},l("components.BatchManagement.BatchOverview.StudyMaterial.AddStudyMaterialModal.studyMaterialLink","Study material link"))),i.a.createElement(c.k.Row,null,i.a.createElement(c.k.Column,{computer:"16",className:"pr-0"},i.a.createElement(E.a,{component:C.a,name:"batchStudyMaterialUrl",style:{width:"99%"},placeholder:l("components.BatchManagement.BatchOverview.StudyMaterial.AddStudyMaterialModal.pasteURL","Paste URL here"),type:"text",fluid:!0}))),i.a.createElement(c.k.Row,{className:"pt-0"},i.a.createElement(c.b,{loading:n,disabled:n,style:{marginLeft:"auto"},content:l("components.BatchManagement.BatchOverview.StudyMaterial.AddStudyMaterialModal.saveButton","Save"),primary:!0}))))))})),A=a(464),M=a(151),O=a(1032),_=a(1028),L=a(67),B=a(38),D=a(2780);class N extends i.a.Component{constructor(e){super(e),this.onClose=this.onClose.bind(this),this.handleSubmit=this.handleSubmit.bind(this)}onClose(){const{folderStack:e}=this.props;this.props.fetchStudyMaterial(e[e.length-1]),this.props.setModalStatus(!1,"studyMaterial")}handleSubmit(){const{t:e}=this.props;let t=this.props.studyMaterialurl.trim();return t.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/)?new Promise((a,s)=>{this.props.makeApiCall(`v2/batches/${this.props.batchCode}/study-material`,"POST",{batchStudyMaterialUrl:t},()=>{Object(L.a)(B.eb,null,{materialType:"url"}),this.props.setStudymaterialLink(t),this.props.initialData&&this.props.initialData.length?b.toastr.success(e("containers.BatchManagement.BatchOverview.StudyMaterial.AddStudyMaterial.success","SUCCESS"),e("containers.BatchManagement.BatchOverview.StudyMaterial.AddStudyMaterial.linkUploadedSuccessfully","Study material link updated successfully")):b.toastr.success(e("containers.BatchManagement.BatchOverview.StudyMaterial.AddStudyMaterial.success","SUCCESS"),e("containers.BatchManagement.BatchOverview.StudyMaterial.AddStudyMaterial.addedMaterialSuccess","Added study material successfully")),this.onClose(),a()},e=>s())}):b.toastr.error(e("containers.BatchManagement.BatchOverview.StudyMaterial.AddStudyMaterial.entervalidlink","Please enter a valid web link"))}render(){const{open:e,initialData:t}=this.props,a={batchStudyMaterialUrl:t||""};return e?i.a.createElement(w,{initialValues:a,open:e,onClose:this.onClose,handleSubmit:this.handleSubmit}):null}}Object(r.a)(Object(n.connect)((function(e){return{open:e.modal&&e.modal.studyMaterial&&e.modal.studyMaterial.open,initialData:e.modal&&e.modal.studyMaterial&&e.modal.studyMaterial.data,studyMaterialurl:e.form&&e.form.StudyMaterial&&e.form.StudyMaterial.values&&e.form.StudyMaterial.values.batchStudyMaterialUrl}}),{setModalStatus:d.c,makeApiCall:M.b,setStudymaterialLink:A.f})(Object(O.a)(Object(_.a)(Object(D.a)()(N)))));var x=a(3212),T=a.n(x),j=a(1015);var I=Object(r.a)(Object(n.connect)()(Object(_.a)((function(e){let{onAddStudyMaterialClick:t,onViewStudyMaterialClick:a,batchStudyMaterialUrl:s,isOverview:n,batchId:o,batchCode:l,...r}=e;const{t:d}=Object(y.a)();function m(){r.isArchive||r.history.push(`/batches/${o}/${l}/studymaterial`)}return i.a.createElement(c.z,{style:{margin:"24px 1em 24px 0",background:"#fff",boxShadow:"0px 1px 4px rgba(0, 0, 0, 0.12)",borderRadius:"2px"}},i.a.createElement("span",{style:{color:"#000000",opacity:"0.87",fontSize:"16px",lineHeight:"22px"}}," ",i.a.createElement(j.a,{i18nKey:"components.BatchManagement.BatchOverview.StudyMaterial.studyMaterialHeading"},"Study Material")," "),i.a.createElement(c.g,null),s?i.a.createElement(i.a.Fragment,null,i.a.createElement(g,{onClick:m,style:{marginLeft:"0px",border:"none",width:"80%",display:"flex",justifyContent:"flex-start"}},i.a.createElement("span",{style:{marginRight:"20px"}},i.a.createElement("img",{src:h.a})),i.a.createElement("span",{style:{paddingTop:".6rem",color:"#4183c4"}},d("components.BatchManagement.BatchOverview.StudyMaterial.viewStudyMaterial","View Study Material")))):i.a.createElement(i.a.Fragment,null,i.a.createElement(g,{onClick:m,style:{padding:"16px 0",width:"100%",border:"1px solid #E5E5E5",boxSizing:"border-box",borderRadius:"2px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.3rem"}},i.a.createElement("img",{src:T.a,alt:"addMaterial",style:{cursor:"pointer",marginRight:"8px"}}),i.a.createElement("span",{style:{fontSize:"16px",lineHeight:"22px"}},d("components.BatchManagement.BatchOverview.StudyMaterial.addStudyMaterialLink","Add Study Material Link")))))}))));class k extends i.a.Component{constructor(e){super(e),this.onAddStudyMaterialClick=this.onAddStudyMaterialClick.bind(this),this.onViewStudyMaterialClick=this.onViewStudyMaterialClick.bind(this)}onViewStudyMaterialClick(){window.open(this.props.batchStudyMaterialUrl)}componentWillUnmount(){this.props.setModalStatus(!1,"studyMaterial")}
25onAddStudyMaterialClick(){this.props.setModalStatus(!0,"studyMaterial")}render(){return i.a.createElement(I,{batchId:this.props.batchId,batchCode:this.props.batchCode,onAddStudyMaterialClick:this.onAddStudyMaterialClick,batchStudyMaterialUrl:this.props.batchStudyMaterialUrl,onViewStudyMaterialClick:this.onViewStudyMaterialClick,isArchive:this.props.isArchive})}}k=Object(r.a)(Object(n.connect)((function(e){return{}}),{setModalStatus:d.c})(k));var F=a(456),V=a(1046),R=a(1789),H=a.n(R);a(3213);var G=Object(r.a)(Object(n.connect)()(Object(_.a)(e=>{let{announcement:t,handleEmptyAction:a,batchCode:s,isArchive:n,batchId:o,isStudentOrParent:l,actionPermission:r,permissionDeniedHandler:d,...u}=e;const{t:h}=Object(y.a)(),p={color:"#0F0F0F",fontSize:"1.2rem",marginBottom:"0rem"};return i.a.createElement(c.z,{style:n?{marginRight:"1em",marginTop:"2em",maxHeight:"60vh",borderBottom:"1px solid #E5E5E5",background:"#fff",boxShadow:"0px 1px 4px rgba(0, 0, 0, 0.12)",borderRadius:"2px",border:"none"}:{margin:"24px 1em 24px 0",maxHeight:"60vh",borderBottom:"1px solid #E5E5E5",background:"#fff",boxShadow:"0px 1px 4px rgba(0, 0, 0, 0.12)",borderRadius:"2px",border:"none"}},i.a.createElement("div",{className:"announcement-heading"},i.a.createElement("span",{style:{color:"#000000",opacity:"0.87",fontSize:"16px",lineHeight:"22px"}}," ",h("components.BatchManagement.BatchOverview.CreateNewClass.AnnouncementOverview.recentAnnouncement","Recent Announcements")," "),!l&&i.a.createElement("button",{onClick:n?"":r?function(){u.history.push(`/batches/${o}/${s}/announcements/new?overview=1`)}:d,className:n||!r?"create_button_disable":"create_button",style:{whiteSpace:"nowrap"}},h("components.BatchManagement.BatchOverview.CreateNewClass.AnnouncementOverview.create","Create"))),t&&t.length>0?i.a.createElement(i.a.Fragment,null,t.map(e=>i.a.createElement("div",{key:e.id},i.a.createElement(c.k,{verticalAlign:"top"},i.a.createElement(c.k.Row,null,i.a.createElement(c.k.Column,{computer:"3"},i.a.createElement(F.a,{user:{name:e.tutorName,imageUrl:e.imageUrl||!1},size:45,style:{width:"70px"}})),i.a.createElement(c.k.Column,{computer:e.attachments&&e.attachments.length?"10":"13"},i.a.createElement("p",{style:p},e.tutorName),i.a.createElement(m.a,{color:"#555",opacity:"1",fontSize:"1.1em",style:{wordWrap:"break-word",width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},e.description)),e.attachments&&!!e.attachments.length&&i.a.createElement(c.k.Column,{computer:"3",floated:"right"},i.a.createElement(c.n,{color:"blue",name:"attach"})))),i.a.createElement(c.g,null))),i.a.createElement("div",{className:"announcement-button-box"},i.a.createElement("button",{onClick:function(){u.history.push(`/batches/${o}/${s}/announcements`)},style:{border:"none",background:"inherit",outline:"none",cursor:"pointer",color:"#009AE0",fontSize:"16px",lineHeight:"19px"}},h("components.BatchManagement.BatchOverview.CreateNewClass.AnnouncementOverview.viewAll","View All")))):l&&i.a.createElement(V.a,{imageDetails:{src:H.a,alt:"no announcements",style:{width:"120px"}},heading:{text:h("components.BatchManagement.BatchOverview.CreateNewClass.AnnouncementOverview.youDontHave","You dont have any announcement to display here"),style:{fontSize:"16px",lineHeight:"24px",fontWeight:"500"}}})||i.a.createElement(V.a,{imageDetails:{src:H.a,alt:"no announcements",style:{width:"120px"}},heading:{text:h("components.BatchManagement.BatchOverview.CreateNewClass.AnnouncementOverview.noRecent","No Recent Announcements"),style:{fontSize:"16px",lineHeight:"24px",fontWeight:"500",color:"rgba(0, 0, 0, 0.87)"}},subHeading:r?{text:h("components.BatchManagement.BatchOverview.CreateNewClass.AnnouncementOverview.clickCreate","Click \u201cCreate\u201d button to make announcement..."),style:{fontSize:"14px",lineHeight:"17px",fontWeight:"400"}}:null}))}))),P=a(469),U=a(225);class Y extends i.a.Component{constructor(e){super(e),this.handleEmptyAction=this.handleEmptyAction.bind(this)}handleEmptyAction(){const e=Object(P.b)()?"?batchType=2":"";this.props.history.push(`/batches/${this.props.batchId}/${this.props.batchCode}/announcements/new${e}`)}permissionDeniedHandler(){const{t:e}=this.props;b.toastr.error(e("containers.BatchManagement.BatchOverview.AnnouncementOverview.toastr.noPermission","You don't have permission to make announcement"))}
25render(){const{persistedData:e,batchSettings:t,ownerId:a}=this.props,s=Boolean(e&&e.tutorId===a||t&&t.announcementPermission);return i.a.createElement(G,{isStudentOrParent:this.props.isStudentOrParent,announcement:this.props.announcement,handleEmptyAction:this.handleEmptyAction,batchCode:this.props.batchCode,isArchive:this.props.isArchive,batchId:this.props.batchId,actionPermission:s,permissionDeniedHandler:this.permissionDeniedHandler})}}var z=Object(_.a)(Object(r.a)(Object(n.connect)((function(e){return{announcement:e.batchDetail&&e.batchDetail.data&&e.batchDetail.data.announcement,isArchive:e.batchDetail&&e.batchDetail.data&&e.batchDetail.data.isArchive,batchSettings:Object(U.get)(e.batchDetail,"data.batchSettings",{}),ownerId:Object(U.get)(e.batchDetail,"data.ownerId",null),persistedData:e.persistedData}}),void 0)(Object(D.a)()(Y)))),Z=a(115),W=a(25),q=a.n(W),$=a(49),Q=a(1110),X=a(2732),K=a(459),J=(a(1160),a(3214)),ee=a.n(J),te=a(1794),ae=a.n(te),se=a(3215),ie=a.n(se),ne=a(3216),oe=a.n(ne),le=a(3217),ce=a.n(le),re=a(3218),de=a.n(re),me=(a(3219),a(463),a(83)),ue=a(68);window.moment=q.a;class he extends s.Component{constructor(e){super(e),this.handleAddSubject=e=>{"Add Course"===e?(Object(L.a)(B.I,"batch"),Object(me.b)(ue.A)):"Add Subjects"===e&&(Object(L.a)(B.K,"batch"),Object(me.b)(ue.B)),this.setState({batchModal:!0,subjectModal:!0,edit:!1,duplicate:!1})},this.showCourseLinkModal=()=>{const e=Object(U.get)(this.props,"batchDetails.courses",[]),t=Object(U.get)(this.props,"batchDetails.batchType",!1)==$.d.ONLINE;return!(!e.length||!t)},this.state={batchModal:!1,edit:!1,duplicate:!1,subjectModal:!1,list:[]},this.editClick=this.editClick.bind(this),this.duplicateClick=this.duplicateClick.bind(this),this.handleModalClose=this.handleModalClose.bind(this)}editClick(){Object(L.a)(B.X,"batch"),Object(me.b)(ue.C);const{permissions:e}=this.props;return e&&e.ownerPremiumStatus?this.setState({batchModal:!0,edit:!0,duplicate:!1,subjectModal:!1}):this.props.showPremiumExpiryModal(!0)}duplicateClick(){Object(L.a)(B.Cc);const{permissions:e}=this.props;return e&&e.ownerPremiumStatus?this.setState({batchModal:!0,duplicate:!0,edit:!1,subjectModal:!1}):this.props.showPremiumExpiryModal(!0)}handleModalClose(){this.setState({batchModal:!1,edit:!1,duplicate:!1,subjectModal:!1}),this.props.openEditBatchDetailsModal(!1)}componentDidUpdate(e,t){let{isStudentOrParent:a,persistedData:s,showEditBatchDetailModal:i,dateTimeStamp:n,t:o}=this.props;if(e.showEditBatchDetailModal!==i&&!0===i&&this.setState({batchModal:!0,subjectModal:!0,edit:!1,duplicate:!1}),s&&this.props.batchDetail!==e.batchDetail){let e=[];e=a?!this.props.batchDetail||this.props.batchDetail.subjects.length||this.props.batchDetail.courseName?[{image:ie.a,key:o("compo.BatchManagement.BatchOverview.CreateNewClass.BatchDetail.batchStart","Batch Start Date"),value:this.props.batchDetail&&q()(this.props.batchDetail.createdDate).format(""+(n?null===n||void 0===n?void 0:n.toUpperCase():"DD/MM/YYYY"))||""},{image:ce.a,key:o("compo.BatchManagement.BatchOverview.CreateNewClass.BatchDetail.batchCode","Batch Code"),value:this.props.batchDetail&&this.props.batchDetail.batchCode||""},{image:oe.a,key:o("compo.BatchManagement.BatchOverview.CreateNewClass.BatchDetail.course","Course"),value:this.props.batchDetail&&this.props.batchDetail.courseName||o("compo.BatchManagement.BatchOverview.CreateNewClass.BatchDetail.addCourse","Add Course")},{image:de.a,key:o("compo.BatchManagement.BatchOverview.CreateNewClass.BatchDetail.subject","Subject"),value:this.props.batchDetail&&this.props.batchDetail.subjects.map(e=>e.name).join(",")||o("compo.BatchManagement.BatchOverview.CreateNewClass.BatchDetail.addSubjects","Add Subjects")}]:[{image:ie.a,key:o("compo.BatchManagement.BatchOverview.CreateNewClass.BatchDetail.batchStart","Batch Start Date"),value:this.props.batchDetail&&q()(this.props.batchDetail.createdDate).format(""+(n?null===n||void 0===n?void 0:n.toUpperCase():"DD/MM/YYYY"))||""},{image:ce.a,key:o("compo.BatchManagement.BatchOverview.CreateNewClass.BatchDetail.batchCode","Batch Code"),value:this.props.batchDetail&&this.props.batchDetail.batchCode||""}]:[{image:ie.a,key:o("compo.BatchManagement.BatchOverview.CreateNewClass.BatchDetail.batchStart","Batch Start Date"),value:this.props.batchDetail&&q()(this.props.batchDetail.createdDate).format(""+(n?null===n||void 0===n?void 0:n.toUpperCase():"DD/MM/YYYY"))||""},{image:ce.a,key:o("compo.BatchManagement.BatchOverview.CreateNewClass.BatchDetail.batchCode","Batch Code"),value:this.props.batchDetail&&this.props.batchDetail.batchCode||""},{image:oe.a,key:o("compo.BatchManagement.BatchOverview.CreateNewClass.BatchDetail.course","Course"),value:this.props.batchDetail&&this.props.batchDetail.courseName||o("compo.BatchManagement.BatchOverview.CreateNewClass.BatchDetail.addCourse","Add Course")},{image:oe.a,key:o("compo.BatchManagement.BatchOverview.CreateNewClass.BatchDetail.category","Category"),value:this.props.batchDetail&&this.props.batchDetail.categoryName||o("compo.BatchManagement.BatchOverview.CreateNewClass.BatchDetail.noCategory","No Category")},{image:de.a,key:o("compo.BatchManagement.BatchOverview.CreateNewClass.BatchDetail.subject","Subject"),value:this.props.batchDetail&&this.props.batchDetail.subjects&&this.props.batchDetail.subjects.map(e=>e.name).join(",")||o("compo.BatchManagement.BatchOverview.CreateNewClass.BatchDetail.addSubjects","Add Subjects")}],this.setState({list:e})}}render(){const{batchDetail:e,loading:t,timings:a,permissions:s,premiumStatus:n,isStudentOrParent:o,actionPermission:l,t:r}=this.props,{list:d}=this.state;let m=e&&e.batchName;return i.a.createElement(c.z,{size:"large",loading:t,style:{marginBottom:"24px",background:"#fff",boxShadow:"0px 1px 4px rgba(0, 0, 0, 0.12)",borderRadius:"2px",border:"none"}},i.a.createElement(c.k,null,i.a.createElement("div",{className:"BatchOverview_header",style:{padding:"16px 24px"}},i.a.createElement("div",{style:{display:"flex",alignItems:"center"},className:"headingTip"},i.a.createElement("p",{className:"BatchOverview_batchname"},e&&e.batchName),m&&m.length>15?i.a.createElement("span",{className:"headingToolTip"},e&&e.batchName):null,n&&e&&e.isArchive?i.a.createElement("p",{className:"ArchivedTag"},r("components.BatchManagement.BatchOverview.CreateNewClass.BatchDetail.","ARCHIVED")):null),i.a.createElement("div",{className:"BatchOverview_header--right"},i.a.createElement("div",null,!o&&l?i.a.createElement("button",{onClick:e&&e.isArchive?"":this.editClick,className:e&&e.isArchive?"EditBatchDetails_button_disabled":"EditBatchDetails_button"},r("components.BatchManagement.BatchOverview.CreateNewClass.BatchDetail.edit","Edit")):""),l&&i.a.createElement("div",{className:s&&s.batchEditPermission&&e&&!e.isArchive?"BatchDetails_threeDots":"BatchDetails_threeDots_hide"},i.a.createElement(c.h,{item:!0,icon:"ellipsis vertical",style:{float:"right",display:"flex"}},i.a.createElement(c.h.Menu,null,i.a.createElement(c.h.Item,{onClick:this.duplicateClick,className:"an-dr-menu"},i.a.createElement("div",{className:"flexrow alignCenter"}," ",i.a.createElement("img",{src:ee.a,alt:"SVGDuplicate",className:"mrighthalfrem"})," ",i.a.createElement("span",null,r("components.BatchManagement.BatchOverview.CreateNewClass.BatchDetail.duplicateBatch","Duplicate Batch")))),i.a.createElement(X.default,{modalOpen:this.state.batchModal,edit:this.state.edit,subjectModal:this.state.subjectModal,duplicate:this.state.duplicate,defaultBatch:this.props.batchDetail,defaultTimings:this.props.timings,handleModalClose:this.handleModalClose,setBatchEdited:this.props.setBatchEdited,modalType:this.state.duplicate?"duplicate":"",batchCode:this.props.batchCode,batchId:this.props.batchId}),i.a.createElement(Q.a,{dropdownText:r("components.BatchManagement.BatchOverview.CreateNewClass.BatchDetail.removeBatch","Remove Batch"),showCourseLinkModal:this.showCourseLinkModal,headerContent:r("components.BatchManagement.BatchOverview.CreateNewClass.BatchDetail.areYouSure","Are you sure about deleting this batch?"),modalContent:i.a.createElement("p",null,r("components.BatchManagement.BatchOverview.CreateNewClass.BatchDetail.proceedOnly","Proceed only if you are very sure")),deleteAction:this.props.deleteBatch})))))),i.a.createElement(c.k.Row,{style:{paddingLeft:"1em"}},i.a.createElement("div",{className:"BatchDetails_Listing"},d.map(t=>i.a.createElement("div",{className:"BatchDetails_item"},i.a.createElement("div",{style:{display:"flex"}},i.a.createElement("img",{src:t.image}),i.a.createElement("div",{className:"BatchDetails_item--content"},i.a.createElement("p",{className:"BatchDetails_item--heading"},t.key),"Add Course"!==t.value&&"Add Subjects"!==t.value||!e||e.isArchive?"Subject"===t.key&&t.value.length>15?i.a.createElement("div",{className:"labelTip"},i.a.createElement("p",{className:"BatchDetails_item--label"},t.value),i.a.createElement("span",{class:"labelTipText"},t.value)):i.a.createElement("p",{className:"BatchDetails_item--label"},t.value):i.a.createElement("button",{className:"add-course-subject",onClick:this.handleAddSubject.bind(this,t.value)},t.value)))))))))}}var pe=Object(_.a)(Object(n.connect)((function(e){var t,a;return{persistedData:e.persistedData,premiumStatus:e.persistedData&&e.persistedData.premiumStatus,showEditBatchDetailModal:e.batchDetail&&e.batchDetail.data&&e.batchDetail.data.showEditBatchDetailModal,dateTimeStamp:null===e||void 0===e||null===(t=e.persistedData)||void 0===t||null===(a=t.organization)||void 0===a?void 0:a.dateTimeStamp}}),{showPremiumExpiryModal:K.c,openEditBatchDetailsModal:A.a})(Object(D.a)()(he))),ve=a(80),ge=a(1270);a(4);class be extends i.a.Component{constructor(e){super(e),this.state={batchEdited:!1},this.deleteBatch=this.deleteBatch.bind(this),this.deleteSuccessHandle=this.deleteSuccessHandle.bind(this),this.fetchBatchDetail=this.fetchBatchDetail.bind(this),this.setBatchEdited=this.setBatchEdited.bind(this),this.resetBatchEdited=this.resetBatchEdited.bind(this)}componentDidMount(){var e,t;null!==(e=this.props)&&void 0!==e&&null!==(t=e.persistedData)&&void 0!==t&&t.token&&this.fetchBatchDetail()}componentDidUpdate(e){(e.match.path!==this.props.match.path||this.state.batchEdited)&&(this.fetchBatchDetail(),this.resetBatchEdited())}setBatchEdited(){this.setState({batchEdited:!0})}async getRequestUrl(){return`/v2/batches/${this.props.batchCode}/overview`}resetBatchEdited(){return this.setState({batchEdited:!1})}async fetchBatchDetail(){let{showEditBatchDetailModal:e}=this.props;this.props.saveBatchOverview(),this.setState({loading:!0});const t=await this.getRequestUrl();this.props.makeApiCall(t,"GET",void 0,t=>{let a={...t.data,showEditBatchDetailModal:e||!1};this.props.saveBatchOverview(a),localStorage.setItem("batchDetails",JSON.stringify(a)),this.setState({loading:!1})},()=>this.setState({loading:!1}),!1,{appendStudentId:!0})}deleteSuccessHandle(){const{t:e}=this.props;Object(ve.a)(B.V),Object(Z.IntercomAPI)("trackEvent",B.V),b.toastr.success(e("containers.BatchManagement.BatchOverview.BatchDetail.toastr.success","SUCCESS"),e("containers.BatchManagement.BatchOverview.BatchDetail.toastr.successDelete","Successfully Deleted Batch!")),this.props.history.push("/batches"),this.props.setDeletingBatchStatus(!1)}deleteBatch(){const{permissions:e}=this.props;return e&&e.ownerPremiumStatus?(this.setState({loading:!0}),this.props.setDeletingBatchStatus(!0),this.props.makeApiCall("batches/"+this.props.batchCode,"DELETE",void 0,()=>this.deleteSuccessHandle(),()=>{this.setState({loading:!1}),this.props.setDeletingBatchStatus(!1)})):this.props.showPremiumExpiryModal(!0)}
25render(){const{persistedData:e,batchSettings:t,ownerId:a}=this.props,s=Boolean(e&&e.tutorId===a||t&&t.batchEditPermission);return i.a.createElement("div",null,i.a.createElement(pe,{batchDetail:this.props.batchDetail,timings:this.props.timings,loading:this.state.loading,deleteBatch:this.deleteBatch,setBatchEdited:this.setBatchEdited,batchCode:this.props.batchCode,batchId:this.props.batchId,actionPermission:s,showEditBatchDetailModal:this.state.showEditBatchDetailModal}),i.a.createElement(ge.a,null))}}var Ce=Object(r.a)(Object(n.connect)((function(e){return{batchDetail:e.batchDetail&&e.batchDetail.data,timings:e.batchDetail&&e.batchDetail.data&&e.batchDetail.data.timings,deletingBatchStatus:e.batchDetail&&e.batchDetail.deletingBatchStatus,persistedData:e.persistedData,courses:e.courses,batchSettings:Object(U.get)(e.batchDetail,"data.batchSettings",{}),ownerId:Object(U.get)(e.batchDetail,"data.ownerId",null),showEditBatchDetailModal:e.batchDetail&&e.batchDetail.data&&e.batchDetail.data.showEditBatchDetailModal}}),{makeApiCall:M.b,saveBatchOverview:A.d,setDeletingBatchStatus:A.e,showPremiumExpiryModal:K.c})(Object(_.a)(Object(D.a)()(be))));const Se={background:"#009AE0",borderRadius:"4px",border:"none",fontWeight:"600",fontSize:"14px",lineHeight:"21px",color:"#FFFFFF",padding:"8px 16px",cursor:"pointer",lineHeight:"1.28571429em",fontFamily:"Lato,'Helvetica Neue',Arial,Helvetica,sans-serif"},Ee={background:"#009AE0",borderRadius:"4px",border:"none",fontWeight:"600",fontSize:"14px",lineHeight:"21px",color:"#FFFFFF",padding:"8px 16px",cursor:"not-allowed",opacity:"0.6",lineHeight:"1.28571429em",fontFamily:"Lato,'Helvetica Neue',Arial,Helvetica,sans-serif"};var fe=Object(r.a)(e=>{let{image:t,username:a,onClick:s,isArchive:n}=e;return i.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px"}},i.a.createElement("p",{style:{fontSize:"24px",marginBottom:"0px"}},"Announcements"),i.a.createElement("button",{style:n?Ee:Se,onClick:s,disabled:n},i.a.createElement("p",{style:{fontSize:"14px",lineHeight:"21px"}},"Create Announcement")))}),ye=a(254);class we extends s.Component{constructor(e){super(e),this.onCreateNewAnnouncement=this.onCreateNewAnnouncement.bind(this),this.state={isArchive:e.isArchive}}componentDidMount(){this.props.makeApiCall(`/v2/batches/${this.props.batchCode}/overview`,"GET",void 0,e=>{this.setState({isArchive:e.data.isArchive})},e=>console.log(e))}onCreateNewAnnouncement(){Object(L.a)(B.b),Object(ye.a)(B.a);let{isArchive:e}=this.state;if(e)return;const{permissions:t,batchCode:a,batchId:s}=this.props;return t&&t.ownerPremiumStatus?this.props.history.push(`/batches/${s}/${a}/announcements/new`):this.props.showPremiumExpiryModal(!0)}render(){return i.a.createElement(fe,Object.assign({isArchive:this.state.isArchive,onClick:this.onCreateNewAnnouncement},this.props))}}Object(_.a)(Object(r.a)(Object(n.connect)((function(e){let{persistedData:t}=e;return{persistedData:t}}),{showPremiumExpiryModal:K.c,makeApiCall:M.b})(we))),a(3220),a(3221);function Ae(e){let{isArchive:t,isStudentOrParent:a,tabsArray:s,justifyTabs:n,loading:o,batchId:l,batchCode:c,loadClasses:r,classes:d,selectedTabId:m,selectTab:u,component:h}=e;return i.a.createElement("div",{className:"TabContainer_batch"},i.a.createElement("div",{className:"TabsHeader_batch"},s.map(e=>i.a.createElement("div",{className:"Tab_batch "+(e.id==m&&"Selected_batch"),onClick:()=>u(e.id),key:e.id},e.label))),i.a.createElement(h,{isStudentOrParent:a,loadClasses:r,isArchive:t,loading:o,batchId:l,batchCode:c,classes:d,tab:s.find(e=>e.id==m)}))}a(3222);var Me=a(2153),Oe=a.n(Me),_e=a(2741),Le=a.n(_e),Be=a(1719),De=a.n(Be);class Ne extends i.a.Component{constructor(e){super(e),this.container=i.a.createRef(),this.handleThreeDots=()=>{this.setState({threeDotsClicked:!this.state.threeDotsClicked})},this.handleClickOutside=e=>{this.container.current&&!this.container.current.contains(e.target)&&this.setState({threeDotsClicked:!1})},this.getDay=e=>{const{t:t}=this.props;let a="";switch(e){case 0:a=t("components.BatchManagement.BatchOverview.CreateNewClass.BatchTimingCard.sun","SUN");break;case 1:a=t("components.BatchManagement.BatchOverview.CreateNewClass.BatchTimingCard.mon","MON");break;case 2:a=t("components.BatchManagement.BatchOverview.CreateNewClass.BatchTimingCard.tue","TUE");break;case 3:a=t("components.BatchManagement.BatchOverview.CreateNewClass.BatchTimingCard.wed","WED");break;case 4:a=t("components.BatchManagement.BatchOverview.CreateNewClass.BatchTimingCard.thurs","THURS");break;case 5:a=t("components.BatchManagement.BatchOverview.CreateNewClass.BatchTimingCard.fri","FRI");break;case 6:a=t("components.BatchManagement.BatchOverview.CreateNewClass.BatchTimingCard.sat","SAT")}return a},this.timeIn12Hour=e=>{const{timeFormat:t}=this.props;if(!e)return null;if("hh:mm a"==t){var a;let t=" AM";t=(e=null===(a=e)||void 0===a?void 0:a.split(":"))[0]>=12?" PM":" AM",e[0]%12==0&&(e[0]=12);let s=e[0]%12<10?"0"+e[0]%12:e[0]%12;return e[0]%12==0?"12:"+e[1]+t:s+":"+e[1]+t}var s;if(!e)return null;return(e=null===(s=e)||void 0===s?void 0:s.split(":"))[0]+":"+e[1]},this.getNameInitials=e=>{let t=e.split(" "),a="";
25return t.forEach(e=>a+=e.slice(0,1).toUpperCase()),a.length>2?a.slice(0,2):a},this.state={threeDotsClicked:!1,editClass:!1}}componentDidMount(){document.addEventListener("mousedown",this.handleClickOutside)}componentWillUnmount(){document.removeEventListener("mousedown",this.handleClickOutside)}render(){let{threeDotsClicked:e}=this.state,{subjectName:t,day:a,start:s,end:n,facultyName:o,classDetails:l,id:c,isArchive:r,isStudentOrParent:d,actionPermission:m,t:u}=this.props;return i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:"BatchTimingCard"},i.a.createElement("div",{className:"UpperDivision"},i.a.createElement("p",{className:"BatchName"},t),!d&&m?i.a.createElement("button",{disabled:r,className:"ThreeDotsButton",onClick:this.handleThreeDots,"data-cy":"TimingThreeDots",ref:this.container},i.a.createElement("img",{src:Le.a}),e?i.a.createElement("div",{className:"ThreeDotsMenu"},i.a.createElement("div",{onClick:()=>{this.props.handleEditClass(l)},className:"TimingFilter"},i.a.createElement("img",{src:ae.a,style:{marginRight:"16px",height:"16px",width:"16px"}}),i.a.createElement("span",{style:{whiteSpace:"nowrap"}},u("components.BatchManagement.BatchOverview.CreateNewClass.BatchTimingCard.editClass","Edit Class"))),i.a.createElement("div",{onClick:()=>{this.props.handleDeleteClass(c)},className:"TimingDelete"},i.a.createElement("img",{src:Oe.a,style:{marginRight:"16px",height:"16px",width:"16px"}}),i.a.createElement("span",{style:{whiteSpace:"nowrap"}},u("components.BatchManagement.BatchOverview.CreateNewClass.BatchTimingCard.removeClass","Remove Class")))):null):null),i.a.createElement("div",{className:"TimingDivision"},i.a.createElement("img",{src:De.a}),i.a.createElement("p",{className:"Time"},this.getDay(a),", ",this.timeIn12Hour(s)," -"," ",this.timeIn12Hour(n))),i.a.createElement("div",{className:"LowerDivision"},i.a.createElement("div",{className:"Image"},o?this.getNameInitials(o):""),i.a.createElement("p",{className:"Name"},o))))}}var xe=Object(D.a)()(Ne),Te=(a(3223),a(1043)),je=a.n(Te);const Ie=0,ke=1,Fe=2,Ve=3,Re=4,He=5,Ge=6,Pe={width:"50px",height:"50px",padding:"10px 8px",borderRadius:"35px",fontSize:"12px",lineHeight:"1.33",marginLeft:"12px"},Ue={...Pe,backgroundColor:"#2185d0",borderColor:"#2185d0",color:"white",marginLeft:"12px"};var Ye=e=>{let{onSelectDay:t,timings:a}=e;const{t:s}=Object(y.a)(),n=a.filter(e=>e.day===ke),o=a.filter(e=>e.day===Fe),l=a.filter(e=>e.day===Ve),r=a.filter(e=>e.day===Re),d=a.filter(e=>e.day===He),m=a.filter(e=>e.day===Ge),u=a.filter(e=>e.day===Ie);return i.a.createElement(c.j.Field,null,i.a.createElement("br",null),i.a.createElement("label",null,s("components.CreateNewBatch.SelectDays.title","Select Days")),i.a.createElement("br",null),i.a.createElement(c.j.Group,{widths:"equal"},i.a.createElement(c.j.Button,{size:"mini",circular:!0,style:u.length?Ue:Pe,onClick:()=>t(Ie)},s("components.CreateNewBatch.SelectDays.sun","SUN")),i.a.createElement(c.j.Button,{size:"mini",circular:!0,style:n.length?Ue:Pe,onClick:()=>t(ke)},s("components.CreateNewBatch.SelectDays.mon","MON")),i.a.createElement(c.j.Button,{size:"mini",circular:!0,style:o.length?Ue:Pe,onClick:()=>t(Fe)},s("components.CreateNewBatch.SelectDays.tue","TUE")),i.a.createElement(c.j.Button,{size:"mini",circular:!0,style:l.length?Ue:Pe,onClick:()=>t(Ve)},s("components.CreateNewBatch.SelectDays.wed","WED")),i.a.createElement(c.j.Button,{size:"mini",circular:!0,style:r.length?Ue:Pe,onClick:()=>t(Re)},s("components.CreateNewBatch.SelectDays.thu","THU")),i.a.createElement(c.j.Button,{size:"mini",circular:!0,style:d.length?Ue:Pe,onClick:()=>t(He)},s("components.CreateNewBatch.SelectDays.fri","FRI")),i.a.createElement(c.j.Button,{size:"mini",circular:!0,style:m.length?Ue:Pe,onClick:()=>t(Ge)},s("components.CreateNewBatch.SelectDays.sat","SAT"))))},ze=(a(1778),a(3224)),Ze=a.n(ze),We=a(1130),qe=a.n(We),$e=a(57),Qe=(a(3225),a(1370)),Xe=a(2499);const Ke={timeError:"Invalid time format",timings:[],facultyname:"",facultymobile:"",showAddFacultyModal:!1,subjectOptions:[],facultyOptions:[],classes:[],faculty:"",subject:"",tabId:"",classDetails:{},startEndTimeIsValid:!0};class Je extends i.a.Component{constructor(e){super(e),this.handleInputChange=e=>{this.setState({[e.target.name]:e.target.value})},this.handleSelectChange=(e,t)=>
25{let{name:a,value:s}=t;if(this.props.edit){let{classDetails:e}=this.state;"faculty"===t.name?e.facultyId=s:e.subjectId=s,this.setState({classDetails:e})}else this.setState({[a]:s})},this.getDay=e=>{const{t:t}=this.props;let a="";switch(e){case 0:a=t("components.BatchManagement.BatchOverview.CreateNewClass.sunday","Sunday");break;case 1:a=t("components.BatchManagement.BatchOverview.CreateNewClass.monday","Monday");break;case 2:a=t("components.BatchManagement.BatchOverview.CreateNewClass.tuesday","Tuesday");break;case 3:a=t("components.BatchManagement.BatchOverview.CreateNewClass.wednesday","Wednesday");break;case 4:a=t("components.BatchManagement.BatchOverview.CreateNewClass.thursday","Thursday");break;case 5:a=t("components.BatchManagement.BatchOverview.CreateNewClass.friday","Friday");break;case 6:a=t("components.BatchManagement.BatchOverview.CreateNewClass.saturday","Saturday")}return a},this.setTodaysDay=()=>{let{classes:e,timings:t,subjectOptions:a}=this.state,s=q()().day();let i=e.length?e[0].classTimings[0].start:q()("15:00","HH:mm").format("hh:mm A"),n=e.length?e[0].classTimings[0].end:q()("16:00","HH:mm").format("hh:mm A");e.push({day:s,classTimings:[{start:i,end:n,id:Object(Xe.a)()}],selected:!0}),t.push({day:s}),this.setState({classes:e,timings:t,subject:a[0].value})},this.handleDaySelect=e=>{let{classes:t,timings:a}=this.state,s=t.filter(t=>t.day===e);if(s.length&&s[0].selected)t=t.filter(t=>t.day!==e),a=a.filter(t=>t.day!==e),this.setState({classes:t.sort((function(e,t){if(e.day<t.day)return-1})),timings:a});else{if(t.length){let a={...t[0]};a.classTimings=a.classTimings.map(e=>({...e,id:Object(Xe.a)()})),a.day=e,a.selected=!0,t.push(a)}else t.push({day:e,classTimings:[{start:"15:00",end:"16:00",id:Object(Xe.a)()}],selected:!0});a.push({day:e}),this.setState({classes:t.sort((function(e,t){if(e.day<t.day)return-1})),timings:a})}},this.setInitialState=()=>{const{t:e}=this.props;this.setState({...this.state,timeError:e("components.BatchManagement.BatchOverview.CreateNewClass.invalidFormat","Invalid time format"),timings:[],facultyname:"",facultymobile:"",showAddFacultyModal:!1,subjectOptions:[],facultyOptions:[],classes:[],faculty:"",subject:"",tabId:"",classDetails:{},startEndTimeIsValid:!0})},this.handleModalClose=()=>{this.setInitialState(),this.props.onClose()},this.reloadBatchDetails=()=>{let{batchCode:e}=this.props,{batchId:t}=this.state;this.props.makeApiCall(`/v2/batches/${e}/overview`,"GET",void 0,e=>{this.props.saveBatchOverview(e.data)},e=>{console.log(e)},!1,{appendStudentId:!0})},this.handleSubmit=e=>{const{t:t}=this.props;if("create"===e){if(!this.state.startEndTimeIsValid)return b.toastr.warning(t("components.BatchManagement.BatchOverview.CreateNewClass.error","ERROR"),t("components.BatchManagement.BatchOverview.CreateNewClass.startTimeCannot","Start time cannot be greater than or equal to end time."));let{subject:e,faculty:a}=this.state,s=[...this.state.classes],{batchDetail:i}=this.props,n=[];n=s.map(e=>{let t=[...e.classTimings].map(e=>(delete e.id,e));return t[0].start=q()(t[0].start).format("HH:mm"),t[0].end=q()(t[0].end).format("HH:mm"),{day:e.day,classTimings:[...t]}});let o={batchId:i.data.batchId,subjectId:e,facultyId:a,timings:n};if(!a&&!e)return b.toastr.error(t("components.BatchManagement.BatchOverview.CreateNewClass.error","ERROR"),t("components.BatchManagement.BatchOverview.CreateNewClass.pleaseSelect","Please select subject and faculty"));this.props.makeApiCall("/v2/batch/class","POST",o,e=>{b.toastr.success(t("components.BatchManagement.BatchOverview.CreateNewClass.success","SUCCESS"),t("components.BatchManagement.BatchOverview.CreateNewClass.classCreated","Class created successfully")),this.props.loadClasses(),this.reloadBatchDetails(),Object(me.b)(ue.db),this.handleModalClose()},e=>{console.log(e)},!1,{appendStudentId:!0})}else if("edit"===e){let{classDetails:e}=this.state,{id:t,batchId:a,subjectId:s,facultyId:i,start:n,end:o}=e;const l=q()(n).format("HH:mm");this.props.makeApiCall("/v2/batch/class","PATCH",{classId:t,batchId:a,subjectId:s,facultyId:i,startTime:l,endTime:o},e=>{"success"===e.status&&(this.props.loadClasses(),this.reloadBatchDetails(),this.handleModalClose(),Object(me.b)(ue.G))},e=>{b.toastr.error(e.response.data.message)})}},this.timeIn12Hour=e=>{if(!e)return null;if("hh:mm a"==this.props.timeFormat){var t;let a=" AM";a=(e=null===(t=e)||void 0===t?void 0:t.split(":"))[0]>12?" PM":" AM",e[0]%12==0&&(e[0]=12);let s=e[0]%12<10?"0"+e[0]%12:e[0]%12;return e[0]%12==0?12+e[1]+a:s+":"+e[1]+a}var a;return(e=null===(a=e)||void 0===a?void 0:a.split(":"))[0]+":"+e[1]},this.handleAddFacutly=e=>{let t={...e.members[0]};const{countryISO:a,t:s}=this.props;
25let i={name:t.name,mobile:t.mobile,email:t.email,countryCode:a||"91"};this.props.makeApiCall(`/batches/${this.props.batchDetail.data.batchCode}/coowners`,"POST",i,e=>{"success"===e.status&&(this.setState({showAddFacultyModal:!1}),this.props.makeApiCall("/v2/batch/coowner/"+this.props.batchDetail.data.batchCode,"GET",void 0,e=>{if("success"===e.status){let t=[];t=[this.props.batchDetail.data.coowners[0],...e.data.list],this.setState({facultyOptions:Object($e.f)(t)},()=>{let a=e.data.list.filter(e=>i.mobile===e.mobile.slice(2))[0];this.setState({faculty:a.id},()=>{this.props.saveAddedFaculty(t),this.reloadBatchDetails()})})}},e=>{b.toastr.error(s("components.BatchManagement.BatchOverview.CreateNewClass.networkError","Network Error"),s("components.BatchManagement.BatchOverview.CreateNewClass.failedToFetch","Failed to fetch faculties"))}))})},this.handleDeleteDay=(e,t)=>{let a,{classes:s,timings:i}=this.state,n=s.find((t,s)=>(t.day===e.day&&(a=s),t.day===e.day)),o=n.classTimings.filter((e,a)=>t!==a);n.classTimings=[...o],s[a]=n,this.setState({classes:s.sort((function(e,t){if(e.day<t.day)return-1})),timings:i},()=>{let t,{classes:a,timings:s}=this.state,i=a.find((a,s)=>(a.day===e.day&&(t=s),a.day===e.day));i.classTimings.length||(a=a.filter(e=>e.day!==i.day),s=s.filter(e=>e.day!==i.day),this.setState({classes:a.sort((function(e,t){if(e.day<t.day)return-1})),timings:s}))})},this.validateStartAndEndTimings=(e,t)=>{let a=!0;return e=q()(e,"HH:mm"),t=q()(t,"HH:mm"),(e.isSame(t)||e.isAfter(t)||t.isBefore(e))&&(a=!1),a},this.handleStartTimeChange=(e,t,a)=>{if(this.props.edit){let t={...this.state.classDetails};t.start=e,this.setState({classDetails:t},()=>{this.validateStartAndEndTimings(t.start,t.end)?this.setState({startEndTimeIsValid:!0}):this.setState({startEndTimeIsValid:!1})})}else{let s,i,n=[...this.state.classes];s=n.find((e,a)=>(e.day===t.day&&(i=a),e.day===t.day)),s.classTimings[a].start=e,n[i]=s,this.setState({classes:n},()=>{this.validateStartAndEndTimings(s.classTimings[a].start,s.classTimings[a].end)?this.setState({startEndTimeIsValid:!0}):this.setState({startEndTimeIsValid:!1})})}},this.handleEndTimeChange=(e,t,a)=>{if(this.props.edit){let{classDetails:t}=this.state;t.end=q()(e).format("HH:mm"),this.setState({classDetails:t},()=>{this.validateStartAndEndTimings(t.start,t.end)?this.setState({startEndTimeIsValid:!0}):this.setState({startEndTimeIsValid:!1})})}else{let s,i,n=[...this.state.classes];s=n.find((e,a)=>(e.day===t.day&&(i=a),e.day===t.day)),s.classTimings[a].end=e,n[i]=s,this.setState({classes:n},()=>{this.validateStartAndEndTimings(s.classTimings[a].start,s.classTimings[a].end)?this.setState({startEndTimeIsValid:!0}):this.setState({startEndTimeIsValid:!1})})}},this.get24HourTime=(e,t)=>{let a=parseInt(e.split(":")[0]);return a>=24&&(a%=24),a+t+":00"},this.handleAddNew=e=>{let t,{classes:a}=this.state,s=a.find((a,s)=>(a.day===e.day&&(t=s),a.day===e.day)),i=a[t].classTimings.length-1,n=a.length?this.get24HourTime(a[t].classTimings[i].start,1):"15:00",o=a.length?this.get24HourTime(n,1):"16:00";s.classTimings.push({start:n,end:o,id:Object(Xe.a)()}),a[t]=s,this.setState({classes:a.sort((function(e,t){if(e.day<t.day)return-1}))})},this.state=Ke}componentDidMount(){this.setInitialState()}componentDidUpdate(e){this.props.show===e.show||this.props.edit||this.setState({subjectOptions:Object($e.f)(this.props.batchDetail.data.subjects),facultyOptions:Object($e.f)(this.props.batchDetail.data.coowners),batchId:this.props.batchDetail.data.batchId},()=>{this.props.show&&this.setTodaysDay(),1==this.state.subjectOptions.length?this.setState({subject:this.props.batchDetail.data.subjects[0].id}):this.setState({subject:""}),1==this.state.facultyOptions.length?this.setState({faculty:this.props.batchDetail.data.coowners[0].id}):this.setState({faculty:""})}),this.props.show!==e.show&&this.props.edit&&this.setState(e=>({classDetails:{...this.props.classDetails},subjectOptions:Object($e.f)(this.props.batchDetail.data.subjects),facultyOptions:Object($e.f)(this.props.batchDetail.data.coowners),batchId:this.props.batchDetail.data.batchId}))}render(){let{show:e,onClose:t,isInternational:a,saveUserInfoType:s,canAddInternationalStudent:n,t:o,defaultLanguage:l}=this.props;const r=e=>i.a.createElement(c.p,Object.assign({},e,{icon:"time",placeholder:o("components.BatchManagement.BatchOverview.CreateNewClass.selectTime","Select time")}
25));let{subject:d,subjectOptions:m,facultyOptions:u,faculty:h,edit:p,facultyname:v,facultymobile:g,classDetails:b,showAddFacultyModal:C}=this.state;return i.a.createElement(i.a.Fragment,null,C?i.a.createElement(Qe.a,{entityToAdd:o("NameNumberForm.faculty","Faculty"),open:C,addEmail:a,saveUserInfoType:s,modalHeader:i.a.createElement("div",{className:"add-faculty-modal-header"},i.a.createElement("button",{className:"add-faculty-modal-header-back",onClick:()=>{this.setState({showAddFacultyModal:!1}),this.reloadBatchDetails()}},i.a.createElement("img",{src:qe.a,alt:"back"})),i.a.createElement("p",null,o("components.BatchManagement.BatchOverview.CreateNewClass.addFaculty","Add Faculty"))),form:"addFaculty",onClose:()=>{this.setState({showAddFacultyModal:!1}),this.reloadBatchDetails()},onSubmit:this.handleAddFacutly,numberDisabled:!1,defaultLanguage:l}):i.a.createElement(S.a,{size:"small",open:e,onClose:()=>{this.handleModalClose()},dimmer:"dimmer"},i.a.createElement(i.a.Fragment,null,i.a.createElement(c.u.Header,{style:{borderRadius:"4px",padding:"17px 24px"}},!this.state.showAddFacultyModal&&this.props.edit?o("components.BatchManagement.BatchOverview.CreateNewClass.edit_class","Edit Class"):o("components.BatchManagement.BatchOverview.CreateNewClass.createNewClass","Create New class")),!this.state.showAddFacultyModal&&i.a.createElement(c.u.Content,{style:!this.state.showAddFacultyModal&&this.props.edit?{overflowY:"auto",height:"300px",padding:"24px"}:{overflowY:"auto",maxHeight:"400px",padding:"24px"}},i.a.createElement(c.j,null,i.a.createElement(c.j.Group,{widths:"equal"},i.a.createElement("div",{className:"classModal-first-row"},i.a.createElement("div",{className:"dropdown-choose-subject",style:{marginRight:"48px"}},i.a.createElement(c.j.Select,{name:"subject",label:i.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"}},i.a.createElement("label",{style:{fontWeight:"bold",fontSize:"13px"}},o("components.BatchManagement.BatchOverview.CreateNewClass.chooseSubject","Choose Subject"))),options:m,placeholder:o("components.BatchManagement.BatchOverview.CreateNewClass.selectSubject","Select Subject"),focus:!0,autoFocus:!0,value:this.props.edit&&Object.keys(b).length?b.subjectId:d,onChange:this.handleSelectChange})),i.a.createElement("div",{className:"dropdown-choose-faculty"},i.a.createElement(c.j.Select,{name:"faculty",label:i.a.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"}},i.a.createElement("label",{style:{fontWeight:"bold",fontSize:"13px"}},o("components.BatchManagement.BatchOverview.CreateNewClass.chooseFaculty","Choose Faculty")),i.a.createElement("div",{style:{fontSize:"13px",color:"#009AE0",cursor:"pointer"},onClick:()=>{this.setState({showAddFacultyModal:!0})}},o("components.BatchManagement.BatchOverview.CreateNewClass.addNew","Add New"))),options:u,placeholder:o("components.BatchManagement.BatchOverview.CreateNewClass.selectFaculty","Select Faculty"),focus:!0,autoFocus:!0,value:this.props.edit&&Object.keys(this.state.classDetails).length?this.state.classDetails.facultyId:h,onChange:this.handleSelectChange})))),i.a.createElement("div",null,this.props.edit?i.a.createElement(c.j.Group,{widths:"equal",style:{marginTop:"24px"}},i.a.createElement("div",{style:{width:"47%",display:"flex",flexDirection:"column"}},i.a.createElement("label",{style:{marginLeft:"6px",fontWeight:"bold",fontSize:"13px",margin:"0px 0px 16px 7px"}},o("components.BatchManagement.BatchOverview.CreateNewClass.classStart","Class Start Time")),i.a.createElement(je.a,{dateFormat:!1,timeFormat:"hh:mm A",onChange:e=>{this.handleStartTimeChange(e,this.props.classDetails)},value:q()(this.state.classDetails.start,"HH:mm").format("hh:mm A"),renderInput:r,error:this.state.timeError,className:"create-new-class-input"})),i.a.createElement("div",{style:{width:"52%",display:"flex",flexDirection:"column",paddingLeft:"5%"}},i.a.createElement("label",{style:{marginLeft:"6px",fontWeight:"bold",fontSize:"13px",margin:"0px 0px 16px 7px"}},o("components.BatchManagement.BatchOverview.CreateNewClass.classEnd","Class End Time")),i.a.createElement(je.a,{dateFormat:!1,timeFormat:"hh:mm A",onCh
25ange:e=>{this.handleEndTimeChange(e,this.props.classDetails)},value:q()(this.state.classDetails.end,"HH:mm").format("hh:mm A"),renderInput:r,error:this.state.timeError,style:{width:"100%"},className:"create-new-class-input",locale:"sv-sv"}))):i.a.createElement(i.a.Fragment,null,i.a.createElement(c.j.Group,{widths:"equal",style:{marginTop:"-8px",marginBottom:"4px",borderBottom:" 1px solid #E5E5E5"}},i.a.createElement(Ye,{edit:p,onSelectDay:this.handleDaySelect,timings:this.state.timings,style:{}})),i.a.createElement("div",null,this.state.classes.length?this.state.classes.map(e=>i.a.createElement("div",{key:e.id,className:"create-new-class-timing-container"},i.a.createElement("div",{className:"create-new-class-timing-header",style:{paddingTop:"12px"}},i.a.createElement("div",{className:"create-new-class-timing-header-day"},this.getDay(e.day)),i.a.createElement("div",{style:{fontSize:"13px",color:"#009AE0",cursor:"pointer"},onClick:()=>{this.handleAddNew(e)}},"+"," ",o("components.BatchManagement.BatchOverview.CreateNewClass.addNew","Add New"))),e.classTimings.length&&e.classTimings.map((t,a)=>i.a.createElement("div",{key:t.id,className:"create-new-class-timing-content",style:{padding:0}},i.a.createElement(c.j.Group,{widths:"equal",style:{marginTop:"12px",marginBottom:"12px"}},i.a.createElement("div",{style:{width:"43%",display:"flex",flexDirection:"column"}},i.a.createElement("label",{style:{marginLeft:"6px",fontWeight:"bold",fontSize:"13px",margin:"0px 0px 16px 7px"}},o("components.BatchManagement.BatchOverview.CreateNewClass.classStart","Class Start Time")),i.a.createElement(je.a,{dateFormat:!1,timeFormat:"hh:mm A",onChange:t=>{this.handleStartTimeChange(t,e,a)},value:null===t||void 0===t?void 0:t.start,renderInput:r,error:this.state.timeError,className:"create-new-class-input"})),i.a.createElement("div",{style:{width:"43%",marginLeft:"28px",display:"flex",flexDirection:"column"}},i.a.createElement("label",{style:{marginLeft:"6px",fontWeight:"bold",fontSize:"13px",margin:"0px 0px 16px 7px"}},o("components.BatchManagement.BatchOverview.CreateNewClass.classEnd","Class End Time")),i.a.createElement(je.a,{dateFormat:!1,timeFormat:"hh:mm A",onChange:t=>{this.handleEndTimeChange(t,e,a)},value:null===t||void 0===t?void 0:t.end,renderInput:r,error:this.state.timeError,className:"create-new-class-input"})),i.a.createElement("div",{style:{width:"14%",display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"32px"}},i.a.createElement("img",{src:Ze.a,onClick:()=>{this.handleDeleteDay(e,a)}}))))))):null))))),i.a.createElement(c.u.Actions,{style:{background:"#FFFFFF"}},!this.state.showAddFacultyModal&&i.a.createElement(c.j.Button,{className:this.state.startEndTimeIsValid?"":"disabled",style:{marginBottom:"16px",marginRight:"12px",marginTop:"2px"},primary:!0,floated:"right",onClick:this.handleSubmit.bind(this,this.props.edit?"edit":"create")},this.props.edit?o("components.BatchManagement.BatchOverview.CreateNewClass.save","Save"):o("components.BatchManagement.BatchOverview.CreateNewClass.createClass","Create Class"))))))}}var et=Object(r.a)(Object(n.connect)(e=>{var t,a,s,i,n,o;let{persistedData:l,batchDetail:c}=e;return{persistedData:l,premiumStatus:l&&l.premiumStatus,batchDetail:c,countryISO:null===l||void 0===l||null===(t=l.organization)||void 0===t?void 0:t.countryISO,isInternational:null===l||void 0===l||null===(a=l.organization)||void 0===a?void 0:a.isInternational,saveUserInfoType:null===l||void 0===l||null===(s=l.organization)||void 0===s?void 0:s.saveUserInfoType,canAddInternationalStudent:null===l||void 0===l||null===(i=l.organization)||void 0===i?void 0:i.canAddInternationalStudent,timeFormat:null===l||void 0===l||null===(n=l.organization)||void 0===n?void 0:n.timeFormat,defaultLanguage:null===l||void 0===l||null===(o=l.organization)||void 0===o?void 0:o.defaultLanguage}},{makeApiCall:M.b,saveBatchOverview:A.d,saveAddedFaculty:A.b})(Object(_.a)(Object(D.a)()(Je)))),tt=a(3226),at=a.n(tt);class st extends i.a.Component{constructor(e){super(e),this.handleEditClass=e=>{this.setState({showEditModal:!0,classDetails:e})},this.handleDeleteClass=e=>{this.setState({showDeleteModal:!0,classDetails:{},classIdToDelete:e})},this.handleDelete=()=>{this.props.makeApiCall("/v2/batch/class/"+this.state.classIdToDelete,"DELETE",void 0,e=>{this.setState({showDeleteModal:!1},()=>{this.props.loadClasses()})},e=>{console.log(e)},!1,{appendStudentId:!0})},this.state={showEditModal:!1,showDeleteModal:!1,tab:e.tab,classes:[],classDetails:{},classIdToDelete:""}}render(){let{classes:e}=this.props,{batchCode:t,batchId:a,loading:s,isArchive:n,isStudentOrParent:o}=this.props;
25const{persistedData:l,batchSettings:r,ownerId:d,t:m}=this.props,u=Boolean(l&&l.tutorId===d||r&&r.batchEditPermission);return i.a.createElement("div",{className:"BatchTimingContent"},e&&e.length&&!s?i.a.createElement("div",{className:"CardDivision"},e.map(e=>{var t;return i.a.createElement(xe,Object.assign({isStudentOrParent:o,isArchive:n,classDetails:e},e,{handleEditClass:this.handleEditClass,handleDeleteClass:this.handleDeleteClass,actionPermission:u,timeFormat:null===l||void 0===l||null===(t=l.organization)||void 0===t?void 0:t.timeFormat}))})):s?i.a.createElement("div",{className:"batch-timings-empty-state-loader"},i.a.createElement(c.r,{active:!0,inline:"centered"})):i.a.createElement("div",{className:"batch-timings-empty-state"},i.a.createElement("img",{src:at.a}),i.a.createElement("p",{className:"batch-timings-empty-state-text-large"},m("components.BatchManagement.BatchOverview.CreateNewClass.editClass.noClasses","No classes")),!o&&i.a.createElement("p",{className:"batch-timings-empty-state-text-small"},m("components.BatchManagement.BatchOverview.CreateNewClass.editClass.clickAdd","Click 'Add' button to create classes"))),i.a.createElement(et,{tab:this.state.tab,batchCode:t,batchId:a,show:this.state.showEditModal,edit:this.state.showEditModal,onClose:()=>{this.setState({showEditModal:!1,classDetails:{}})},classDetails:this.state.classDetails,loadClasses:this.props.loadClasses}),i.a.createElement(S.a,{size:"tiny",open:this.state.showDeleteModal,onClose:()=>{this.setState({showDeleteModal:!1})}},i.a.createElement(c.u.Header,{style:{borderRadius:"4px"}},m("components.BatchManagement.BatchOverview.CreateNewClass.editClass.modalHeader1","Delete Class")),i.a.createElement(c.u.Content,null,m("components.BatchManagement.BatchOverview.CreateNewClass.editClass.youAreAbout1","You are about to remove this class. Are you sure you want to proceed?")),i.a.createElement("div",{className:"delete-modal-footer"},i.a.createElement(c.b,{primary:!0,onClick:this.handleDelete,style:{marginRight:"16px"}},m("components.BatchManagement.BatchOverview.CreateNewClass.editClass.remove1","Remove")),i.a.createElement(c.b,{onClick:()=>{this.setState({showDeleteModal:!1})},style:{background:"white",border:"1px solid #009AE0",color:"#009AE0"}},m("components.BatchManagement.BatchOverview.CreateNewClass.editClass.close1","Close")))))}}var it=Object(r.a)(Object(n.connect)(e=>{let{persistedData:t,batchDetail:a}=e;return{persistedData:t,premiumStatus:t&&t.premiumStatus,batchDetail:a,batchSettings:Object(U.get)(a,"data.batchSettings",{}),ownerId:Object(U.get)(a,"data.ownerId",null)}},{makeApiCall:M.b})(Object(_.a)(Object(D.a)()(st))));const nt={0:it,1:it,2:it,3:it,4:it,5:it,6:it};class ot extends i.a.Component{constructor(e){super(e),this.getTodaysTabId=()=>{let e=new Date;return(null===e||void 0===e?void 0:e.getDay())||0},this.onEmptySubjectClick=()=>{const{t:e}=this.props;b.toastr.error(e("components.BatchManagement.BatchOverview.BatchTimings.error","ERROR"),e("components.BatchManagement.BatchOverview.BatchTimings.pleaseAddSubjects","Please add subject first before adding timings."))},this.loadClasses=()=>{var e,t;let{batchId:a}=this.props,s=this.state.selectedTab;this.setState({loading:!0}),null!==(e=this.props)&&void 0!==e&&null!==(t=e.persistedData)&&void 0!==t&&t.token&&this.props.makeApiCall(`/v2/batch/class?batchId=${a}&day=${s}`,"GET",void 0,e=>{this.setState({tabClasses:e.data.list,loading:!1})},e=>{},!1,{appendStudentId:!0})};const{t:t}=this.props;this.state={selectedTab:this.getTodaysTabId(),showEditTimingsModal:!1,tabsArray:[{id:0,label:t("components.BatchManagement.BatchOverview.BatchTimings.sunday","Sunday")},{id:1,label:t("components.BatchManagement.BatchOverview.BatchTimings.monday","Monday")},{id:2,label:t("components.BatchManagement.BatchOverview.BatchTimings.tuesday","Tuesday")},{id:3,label:t("components.BatchManagement.BatchOverview.BatchTimings.wednesday","Wednesday")},{id:4,label:t("components.BatchManagement.BatchOverview.BatchTimings.thursday","Thursday")},{id:5,label:t("components.BatchManagement.BatchOverview.BatchTimings.friday","Frid
25ay")},{id:6,label:t("components.BatchManagement.BatchOverview.BatchTimings.saturday","Saturday")}],tabClasses:[],loading:!1}}componentDidMount(){this.loadClasses()}render(){let{tabsArray:e,selectedTab:t,showEditTimingsModal:a}=this.state,{batchDetail:s,batchDetailIsArchive:n,isStudentOrParent:o,t:l}=this.props;const{persistedData:c,batchSettings:r,ownerId:d}=this.props,m=Boolean(c&&c.tutorId===d||r&&r.batchEditPermission);let{batchId:u,batchCode:h}=this.props;return console.log("xxchlgh",e.find(e=>e.id==t),t),i.a.createElement("div",{className:"BatchTimings"},i.a.createElement("div",{className:"Header"},i.a.createElement("p",{className:"HeadingText-batchTimings"},l("components.BatchManagement.BatchOverview.BatchTimings.heading","Batch Timings")),!o&&m?i.a.createElement("button",{onClick:n&&n.isArchive?"":this.props.subject?()=>{Object(me.b)(ue.cb),Object(L.a)(B.Z,"batch"),this.setState({showEditTimingsModal:!0},()=>{})}:this.onEmptySubjectClick,className:n&&n.isArchive?"EditButton_disable":"EditButton","data-cy":"edit-batch-time"},i.a.createElement("span",null," + ",l("components.BatchManagement.BatchOverview.BatchTimings.add","Add")," ")):""),i.a.createElement("div",{className:"TabList_batch"},i.a.createElement(Ae,{key:t+"new",tabsArray:e,selectedTabId:t,selectTab:e=>{this.setState({selectedTab:e},()=>{this.loadClasses()})},component:nt[e.find(e=>e.id==t).id],classes:this.state.tabClasses,loadClasses:this.loadClasses,batchId:u,batchCode:h,loading:this.state.loading,justifyTabs:"space-between",isArchive:n.isArchive,isStudentOrParent:this.props.isStudentOrParent,actionPermission:m})),i.a.createElement(et,{show:a,onClose:()=>{this.setState({showEditTimingsModal:!1})},loadClasses:this.loadClasses,batchId:u,tabId:this.state.selectedTab,batchCode:h}))}}var lt=Object(r.a)(Object(n.connect)(e=>{let{persistedData:t,batchDetail:a}=e;return{persistedData:t,premiumStatus:t&&t.premiumStatus,batchDetail:a,batchSettings:Object(U.get)(a,"data.batchSettings",{}),ownerId:Object(U.get)(a,"data.ownerId",null)}},{makeApiCall:M.b})(Object(_.a)(Object(D.a)()(ot)))),ct=a(1051),rt=a.n(ct),dt=(a(1424),a(1023)),mt=a.n(dt),ut=(a(2742),a(2607)),ht=a.n(ut);a(1385);class pt extends i.a.Component{constructor(e){super(e),this.handleViewMore=()=>{this.props.history.push(`/batches/${this.props.batchId}/${this.props.batchCode}/joinRequest`)},this.getEncryptedMobile=e=>{const{countryISO:t}=this.props;if(e){let t=e.slice(-3);return"+"+e.slice(0,2)+"XXXXXXX"+t}return"+"+(t||"91")+" XXXXXXXXXX"},this.handleModalOpen=()=>{this.setState({open:!this.state.open})},this.handleAcceptAll=()=>{this.handleModalOpen(),this.props.acceptRequest(null,1)},this.state={open:!1}}render(){const{studentsCount:e,noMore:t,loading:a,isOverview:s,students:n}=this.props;return i.a.createElement("div",{style:s?{boxShadow:"0px 1px 4px rgba(0, 0, 0, 0.12)",borderRadius:"2px",background:"#FFFFFF"}:{minHeight:"50vh",background:"#FFFFFF"}},i.a.createElement("div",null,i.a.createElement("div",{style:s?{fontSize:"16px",padding:"16px 24px 16px 24px",borderBottom:"1px solid #E5E5E5"}:{fontSize:"16px",padding:"16px 0",borderBottom:"1px solid #E5E5E5",display:"flex",justifyContent:"space-between"}},s?`Join Requests (${n?e:0})`:`JOIN REQUESTS (${n?e:0})`,s?"":n.length>1?i.a.createElement("button",{className:"join-request-acceptAll",onClick:this.handleModalOpen},"ACCEPT ALL"):"",i.a.createElement(S.a,{size:"tiny",open:this.state.open,onClose:this.handleModalOpen},i.a.createElement(c.u.Header,null,"Accept all requests?"),i.a.createElement(c.u.Content,null,"All students who have requested to join will be added in this batch.",i.a.createElement("div",{className:"join-request-modalFooter"},i.a.createElement("button",{className:"join-request-reject",onClick:this.handleModalOpen},"Cancel"),i.a.createElement("button",{className:"join-request-accept",style:{marginLeft:"16px",width:"auto",padding:"0 16px"},onClick:this.handleAcceptAll},"Accept All"))))),i.a.createElement(mt.a,{next:()=>{this.props.fetchStudents()},hasMore:!t,style:{overflow:"hidden"}},n&&n.length>0?n.map((e,t)=>i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{style:s?{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px 24px",borderBottom:"#e5e5e5"}:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px 0",borderBottom:"#e5e5e5"}},i.a.createElement("div",{style:{display:"flex",alignItems:"center",width:"60%",justifyContent:"space-between"}},i.a.createElement("div",{onClick:()=>{this.props.history.push("/user-profile/"+e.id)},style:{display:"flex",alignItems:"center"}},i.a.createElement(F.a,{user:{name:e.name,imageUrl:e.imageUrl||!1},size:35,style:{width:"35px"}}),i.a.createElement("span",{className:"request-list-label"},e.name)),i.a.createElement("span",{className:"request-list-label"},e.mobile)),i.a.createElement("div",{style:{display:"flex"}},i.a.createElement("button",{className:"join-request-reject",style:this.props.isArchive?{background:"#ccc",color:"#fff",border:"none",cursor:"not-allowed"}:{},onClick:()=>{Object(L.a)(B.Sc),this.props.rejectRequest(e.studentId)}},"Reject"),i.a.createElement("button",{style:this.props.isArchive?{marginLeft:"24px",background:"#ccc",cursor:"not-allowed"}:{marginLeft:"24px"},className:"join-request-accept",onClick:()=>{Object(L.a)(B.Rc),this.props.acceptRequest(e.studentId,0)}},"Accept"))))):a?i.a.createElement(c.k,{centered:!0,style:{display:"flex",alignItems:"center",justifyContent:"center",height:"50vh",flexDirection:"column"}},i.a.createElement(c.k.Column,{stretched:!0,width:16},i.a.createElement(c.r,{active:!0,inline:"centered"}))):!a&&i.a.createElement(V.a,{imageDetails:{src:ht.a,alt:"no students",style:{width:"120px"}},heading:{text:"No new requests",style:{fontSize:"1.5em",margin:"0 auto",fontWeight:"normal"}},subHeading:{text:`Share batch code <${this.props.batchDetail.data.batchCode}> with your students so they can request to join this batch.`,style:{fontSize:"1.3em",margin:"0 auto"}}})),s&&this.props.students&&this.props.students.length>5?i.a.createElement("div",{className:"join-request-viewMore",onClick:this.handleViewMore},"View More"):null))}}var vt=Object(r.a)(Object(n.connect)(e=>{var t,a;
25let{persistedData:s,batchDetail:i,studentList:n,batchSettings:o}=e;return{persistedData:s,premiumStatus:s.premiumStatus,batchDetail:i,fetchingStudentsStatus:n&&n.fetchingStudentsStatus,permissions:o&&o.permissions,currentStudentsCount:null===i||void 0===i||null===(t=i.data)||void 0===t?void 0:t.currentStudentsCount,countryISO:null===s||void 0===s||null===(a=s.organization)||void 0===a?void 0:a.countryISO}},{makeApiCall:M.b,addStudentRequests:l.c,addStudents:l.d,setFetchingStudentsStatus:l.g})(Object(_.a)(pt)));class gt extends i.a.Component{constructor(e){super(e),this.fetchBatchDetails=()=>{this.props.makeApiCall(`/v2/batches/${this.state.batchCode}/overview`,"GET",void 0,e=>{this.props.isOverview&&(this.props.saveBatchOverview(e.data),this.props.setFetchingStudentsStatus(!1)),this.setState({batchName:e.data.batchName,isArchive:e.data.isArchive})},e=>{this.props.setFetchingStudentsStatus(!1),b.toastr.error("Error","Error while Fetching Batch Name")},!1,{appendStudentId:!0})},this.fetchStudents=()=>{let{limit:e,offset:t,searchWord:a,loading:s,batchCode:i}=this.state,n=`v2/batches/${i}/students?type=requested&limit=${e}&offset=${t}`;a&&(n=n+"&search="+encodeURIComponent(a)),this.setState({loading:!0}),this.props.makeApiCall(n,"GET",void 0,e=>{this.handleSuccess(e)},e=>{this.setState({loading:!1},()=>b.toastr.error(e&&e.response.data.message))},!1,{appendStudentId:!0})},this.handleSuccess=e=>{let{offset:t,limit:a}=this.state;this.setState(s=>{let i=[...s.studentList,...e.data.students];return{loading:!1,offset:t+a,noMore:i.length===e.data.studentsCount,studentList:i,studentsCount:e.data.studentsCount}})},this.acceptRequest=(e,t)=>{if(this.state.isArchive||this.props.Archive)return;const{persistedData:a,permissions:s,batchSettings:i}=this.props,n=a.user.id,o=i&&i.data.owners.filter(e=>e.id===n).length,l=a&&a.premiumStatus;return s&&s.studentManagementPermission?!l&&o?this.props.showPremiumExpiryModal(!0):(this.props.setFetchingStudentsStatus(!0),this.props.makeApiCall(`batches/${this.state.batchCode}/requests`,"PATCH",t?{joinAllStudents:1,type:1}:{studentId:e,type:1},()=>{b.toastr.success("Successfully Accepted"),this.setState({offset:0,studentList:[]},()=>{this.props.isOverview?(this.fetchBatchDetails(),this.fetchStudents()):this.fetchStudents()})},e=>{1==e.data.data.isLimitReached?b.toastr.warning(e.data.message):b.toastr.error("ERROR",e.data.message),this.props.setFetchingStudentsStatus(!1)},!0)):b.toastr.error("ERROR","You are not granted student mangement permission")},this.rejectRequest=e=>{if(this.state.isArchive||this.props.Archive)return;const{persistedData:t,permissions:a,batchSettings:s}=this.props,i=t.user.id,n=s&&s.data.owners.filter(e=>e.id===i).length,o=t&&t.premiumStatus;return a.studentManagementPermission?!o&&n?this.props.showPremiumExpiryModal(!0):(this.props.setFetchingStudentsStatus(!0),this.props.makeApiCall(`batches/${this.state.batchCode}/requests`,"PATCH",{studentId:e,type:2},()=>{b.toastr.success("Successfully Rejected"),this.setState({offset:0,studentList:[]},()=>{this.props.isOverview?(this.fetchBatchDetails(),this.fetchStudents()):this.fetchStudents()})},()=>{this.setState({loading:!0})})):b.toastr.error("ERROR","You are not granted student mangement permission")},this.handleSearchOnChange=e=>{this.state.searchingTimeout&&clearTimeout(this.state.searchingTimeout);const t=e.target.value.toLowerCase();this.setState({searchWord:t,studentList:[],offset:0,loading:!0,searchingTimeout:setTimeout(()=>{this.fetchStudents(void 0,void 0,t)},500)})},this.state={studentList:[],studentsCount:0,searchWord:"",offset:0,limit:10,noMore:!1,loading:!1,batchName:"",isArchive:0,batchCode:this.props.isOverview?this.props.batchCode:this.props.match.params.batchCode}}componentDidMount(){this.props.isOverview||this.fetchBatchDetails(),this.fetchStudents()}render(){const{studentsCount:e,studentList:t,noMore:a,searchWord:s,loading:n,batchName:l}=this.state;return this.props.isOverview?i.a.createElement(vt,{fetchStudents:this.fetchStudents,acceptRequest:this.acceptRequest,rejectRequest:this.rejectRequest,students:t.slice(0,5),loading:n,noMore:a,isOverview:this.props.isOverview,studentsCount:e,batchCode:this.state.batchCode,batchId:this.props.batchId,isArchive:this.props.Archive}):i.a.createElement("div",null,i.a.createElement(o.Helmet,null,i.a.createElement("meta",{charSet:"utf-8"}),i.a.createElement("title",null,"Join Request | Batch ")),i.a.createElement(c.k,{style:{marginTop:"3rem",justifyContent:"center",alignItems:"center",display:"flex"}},i.a.createElement(c.k.Column,{computer:"10",style:{marginTop:"3em"}},i.a.createElement("div",{className:"join-request-header"},i.a.createElement("img",{className:"join-request-back-icon",src:rt.a,onClick:()=>{this.props.history.goBack()}}),i.a.createElement("div",{className:"join-request-heading"},l," Join Requests")),i.a.createElement(c.z,{style:{padding:"0 24px 24px",marginTop:"0",borderRadius:"0 0 .28571429rem .28571429rem"}}
25,i.a.createElement("div",null,s||t.length?i.a.createElement("div",{className:"join-request-search"},i.a.createElement(c.p,{transparent:!0,icon:"search",value:s,onChange:this.handleSearchOnChange,iconPosition:"left",placeholder:"Search students here",style:{width:"100%"}})):null),i.a.createElement(vt,{fetchStudents:this.fetchStudents,acceptRequest:this.acceptRequest,rejectRequest:this.rejectRequest,studentsCount:e,students:t,loading:n,noMore:a,isOverview:this.props.isOverview,isArchive:this.state.isArchive,searchWord:this.state.searchWord})))),i.a.createElement(ge.a,null))}}var bt=Object(r.a)(Object(n.connect)(e=>{let{persistedData:t,batchDetail:a,studentList:s,batchSettings:i}=e;return{persistedData:t,premiumStatus:t.premiumStatus,batchDetail:a,fetchingStudentsStatus:s&&s.fetchingStudentsStatus,permissions:i&&i.permissions,batchSettings:i}},{makeApiCall:M.b,addStudentRequests:l.c,addStudents:l.d,setFetchingStudentsStatus:l.g,showPremiumExpiryModal:K.c,saveBatchOverview:A.d})(Object(_.a)(gt))),Ct=a(1378),St=a.n(Ct);a(3227);var Et=Object(r.a)(Object(n.connect)()(Object(_.a)((function(e){let{students:t,loading:a,searchTerm:s,onAddClick:n,handleViewProfile:o,permissions:l,batchCode:r,batchDetail:d,batchId:u,studentCount:h,...p}=e;const{t:v}=Object(y.a)(),g={fontSize:"1.1em",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",width:"180px",display:"block",marginLeft:"14px"},b={fontSize:"1.1em",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",width:"180px",display:"block"};return i.a.createElement(c.z,{loading:a,style:{marginTop:"24px",marginBottom:"0px",background:"#fff",boxShadow:"0px 1px 4px rgba(0, 0, 0, 0.12)",borderRadius:"2px",border:"none"}},i.a.createElement(c.k,null,i.a.createElement("div",{style:{borderBottom:"1px solid #E5E5E5",display:"flex",justifyContent:"space-between",padding:"16px 24px",width:"100%",alignItems:"center"}},i.a.createElement("p",{style:{fontSize:"16px",lineHeight:"19px",color:"#000000",margin:"0em"}},v("components.BatchManagement.BatchOverview.StudentList.students","Students")," \xa0(",h||0,")"),l&&!!l.studentManagementPermission&&i.a.createElement("button",{className:d&&d.isArchive?"addStudentButton_disable":"addStudentButton",onClick:d&&d.isArchive?"":n},i.a.createElement(i.a.Fragment,null,"+ ",v("components.BatchManagement.BatchOverview.StudentList.add","Add")))),t&&t.length>0?i.a.createElement("div",{style:{minHeight:"305px",width:"100%"}},t.map((e,t)=>{return i.a.createElement(c.k.Row,{className:"pl-4 student-list-row",key:t},i.a.createElement(c.k.Column,{computer:"1",style:{cursor:"pointer"},onClick:()=>{o(e.id)}},i.a.createElement(F.a,{user:{name:e.name,imageUrl:e.imageUrl||!1}})),i.a.createElement(c.k.Column,{computer:"5",verticalAlign:"middle",style:{cursor:"pointer"},onClick:()=>o(e.id)},i.a.createElement("span",{style:g},e.name)),i.a.createElement(c.k.Column,{style:{cursor:"pointer"},computer:"5",verticalAlign:"middle"},i.a.createElement("span",{onClick:()=>o(e.id),style:b},(a=e.mobile,l&&l.studentManagementPermission,a))),i.a.createElement(c.k.Column,{computer:"4",verticalAlign:"middle"},i.a.createElement(m.a,null,e&&0===e.signnedUp&&0==e.isActive&&i.a.createElement(c.q,{style:{marginLeft:"2%",fontSize:"0.6em",marginTop:"-1%"}},v("components.BatchManagement.BatchOverview.StudentList.inactiveOnSMS","Inactive - ON SMS"))||e&&0===e.signedUp&&1==e.isActive&&i.a.createElement(c.q,{style:{fontSize:"0.6em",marginTop:"-1%"}},v("components.BatchManagement.BatchOverview.StudentList.onSMS","ON SMS"))||e&&1===e.signedUp&&0==e.isActive&&i.a.createElement(c.q,{style:{marginLeft:"2%",fontSize:"0.6em",marginTop:"-1%"}},v("components.BatchManagement.BatchOverview.StudentList.inActive","Inactive"))||"")));var a}).slice(0,5),h>5?i.a.createElement("div",{style:{padding:"16px",borderTop:"1px solid #E5E5E5",width:"100%",display:"flex",alignItems:"center",justifyContent:"center"}},i.a.createElement("button",{onClick:function(){p.history.push(`/batches/${u}/${r}/students`)},style:{border:"none",background:"inherit",outline:"none",cursor:"pointer",color:"#009AE0",fontSize:"16px",lineHeight:"19px"}},v("components.BatchManagement.BatchOverview.StudentList.viewMore","View More"))):null):i.a.createElement(V.a,{style:{paddingBottom:"16
25px"},imageDetails:{src:St.a,alt:"no students",style:{width:"120px"}},heading:{text:v("components.BatchManagement.BatchOverview.StudentList.noStudentsAdded","No Students Added"),style:{fontSize:"16px",margin:"0 auto",lineHeight:"24px"}},subHeading:{text:v("components.BatchManagement.BatchOverview.StudentList.clickAdd","Click \u201cAdd\u201d button to add students."),style:{fontSize:"14px",lineHeight:"17px",margin:"0 auto 24px auto"}}})))})))),ft=a(2759),yt=a(2668),wt=a(2669),At=a(1157);class Mt extends i.a.Component{constructor(e){super(e),this.handleRequestedStudentFetchSuccess=e=>{this.props.addStudentRequests(e.data&&e.data.students||[])},this.fetcher=e=>{const{limit:t,offset:a,searchTerm:s}=this.state;0==a&&(this.props.setFetchingStudentsStatus(!0),this.props.addStudents(),this.props.addStudentRequests());let i=s.length?"&search="+s:"";this.props.makeApiCall(`v2/batches/${this.props.batchCode}/students?type=current&isActive=1&limit=${t}&offset=${a}${i}`,"GET",void 0,e=>this.handleStudentFetchSuccess(e),()=>this.props.setFetchingStudentsStatus(!1))},this.fetchStudents=(e,t)=>{1==t?this.setState({offset:0},()=>{this.fetcher(e)}):this.fetcher(e)},this.fetchBatchDetail=()=>{this.props.saveBatchOverview();const e=`/v2/batches/${this.props.batchCode}/overview`;this.props.makeApiCall(e,"GET",void 0,e=>{this.props.saveBatchOverview(e.data)},e=>{console.log(e)})},this.setShowAddStudentsModal=e=>{this.setState({showAddStudentsModal:e})},this.setShowAddStudentsManuallyModal=e=>{this.setState({showAddStudentManuallyModal:e})},this.setShowUPloadCsvModal=e=>{this.setState({showUploadCsvModal:e})},this.submitStudentsData=e=>{const t=e.members.map(e=>({name:e.name,mobile:e.mobile,countryCode:e.countryCode,email:e.email,...this.props.isParentLoginAvailable?{parentName:e.parentName,parentCountryCode:e.parentName?e.parentCountryCode:"",parentMobile:e.parentMobile,parentEmail:e.parentEmail}:{}}));this.props.addStudentsManually({batchCode:this.props.batchCode,studentContacts:t,closeModal:()=>this.setShowAddStudentsManuallyModal(!1),showErrorModal:()=>{var t;return 1===(null===e||void 0===e||null===(t=e.members)||void 0===t?void 0:t.length)?this.props.setShowSingleStudenErrorModal(!0):this.props.setShowMultiStudentErrorModal(!0)}})},this.handleStudentFetchSuccess=this.handleStudentFetchSuccess.bind(this),this.handleViewProfile=this.handleViewProfile.bind(this),this.acceptRequest=this.acceptRequest.bind(this),this.rejectRequest=this.rejectRequest.bind(this),this.handleAddStudents=this.handleAddStudents.bind(this),this.state={searchTerm:"",limit:10,offset:0,studentCount:0,isOnboarding:this.props.location&&this.props.location.state&&this.props.location.state.isOnboarding,showAddStudentsModal:!1,showAddStudentManuallyModal:!1,showUploadCsvModal:!1}}componentDidMount(){this.fetchRequestedStudents(),this.fetchStudents(),this.state.isOnboarding&&this.props.manageAddStudentModeModal(!0)}acceptRequest(e){const{persistedData:t,permissions:a,batchSettings:s}=this.props,i=t&&t.premiumStatus;let n=!!s.owners.filter(e=>e.tutorId==t.tutorId).length;return n&&!i||!n&&!a.studentManagementPermission?this.props.showPremiumExpiryModal(!0):(this.props.setFetchingStudentsStatus(!0),this.props.makeApiCall(`batches/${this.props.batchCode}/requests`,"PATCH",{studentId:e,type:1},()=>{this.props.addStudents(),this.props.addStudentRequests(),this.setState({offset:0},()=>{this.fetchRequestedStudents(),this.fetchStudents()})},()=>this.props.setFetchingStudentsStatus(!1)))}rejectRequest(e){const{persistedData:t,permissions:a,batchSettings:s}=this.props,i=t&&t.premiumStatus;let n=!!s.owners.filter(e=>e.tutorId==t.tutorId).length;return n&&!i||!n&&!a.studentManagementPermission?this.props.showPremiumExpiryModal(!0):(this.props.setFetchingStudentsStatus(!0),this.props.makeApiCall(`batches/${this.props.batchCode}/requests`,"PATCH",{studentId:e,type:2},()=>{this.props.addStudents(),this.props.addStudentRequests(),this.setState({offset:0},()=>{this.fetchRequestedStudents(),this.fetchStudents()})},()=>this.props.setFetchingStudentsStatus(!1)))}fetchRequestedStudents(){this.props.makeApiCall(`v2/batches/${this.props.batchCode}/students?type=requested`,"GET",void 0,e=>this.handleRequestedStudentFetchSuccess(e),()=>this.props.setFetchingStudentsStatus(!1))}handleViewProfile(e){const{permissions:t}=this.props;if(!(t&&t.ownerPremiumStatus))return this.props.showPremiumExpiryModal(!0);Object(ve.b)(B.Pd),this.props.history.push("/user-profile/"+e)}handleStudentFetchSuccess(e){this.setState({studentCount:e.data.studentsCount});let t=e.data.studentsCount;this.props.saveAddedStudents([...e.data.students],t),this.setState({maxStudentAlertMsg:e.data.maxStudentAlertMsg}),this.props.setFetchingStudentsStatus(!1)}handleAddStudents(){const{permissions:e}=this.props;if(!(e&&e.ownerPremiumStatus))return this.props.showPremiumExpiryModal(!0);this.setState({showAddStudentsModal:!0}),Object(me.b)(ue.j)}componentWillUnmount(){this.setState({offset:0})}render(){const{students:e,currentStudentsCount:t,mobileRegex:a,saveUserInfoType:s,canAddInternationalStudent:n,isParentLoginAvailable:o,countryISO:l,showSingleStudentErrorModal:c,showMultiStudentErrorModal:r,
25setShowSingleStudenErrorModal:d,setShowMultiStudentErrorModal:m}=this.props,{showAddStudentsModal:u,showAddStudentManuallyModal:h,showUploadCsvModal:p}=this.state,{maxStudentAlertMsg:v}=this.state;return i.a.createElement("div",null,i.a.createElement(Et,{fetchStudents:this.fetchStudents,searchTerm:this.state.searchTerm,handleSearchOnChange:this.handleSearchOnChange,students:e||[],loading:this.props.fetchingStudentsStatus,onAddClick:this.handleAddStudents,handleViewProfile:this.handleViewProfile,batchType:this.props.batchType,batchCode:this.props.batchCode,batchDetail:this.props.batchDetail,batchId:this.props.batchId,screen:"overview",studentCount:t||0}),u?i.a.createElement(ft.a,{batchId:this.props.batchId,batchCode:this.props.batchCode,showModal:u,closeModal:()=>this.setShowAddStudentsModal(!1),setShowAddStudentsManuallyModal:this.setShowAddStudentsManuallyModal,setShowUploadCsvModal:this.setShowUPloadCsvModal}):null,h?i.a.createElement(yt.a,{open:h,onClose:()=>this.setShowAddStudentsManuallyModal(!1),allowAddMultiple:!0,onSubmit:this.submitStudentsData,countryISO:l,mobileRegex:a,saveUserInfoType:s,isParentLoginAvailable:o,canAddInternationalStudent:n,showSingleStudentErrorModal:c,showMultiStudentErrorModal:r,setShowSingleStudentErrorModal:d,setShowMultiStudentErrorModal:m}):null,p?i.a.createElement(wt.a,{open:p,onClose:()=>{this.setShowUPloadCsvModal(!1)},batchCode:this.props.batchCode}):null)}}var Ot=Object(_.a)(Object(r.a)(Object(n.connect)((function(e){var t,a,s,i,n,o,l;let{batchDetail:c,studentList:r,persistedData:d,batchSettings:m,BatchReducer:u}=e;return{studentRequests:r&&r.studentRequests,fetchingStudentsStatus:r&&r.fetchingStudentsStatus,persistedData:d,batchType:Object(U.get)(m,"data.info.batchType",null),currentStudentsCount:c&&c.data&&c.data.currentStudentsCount,countryISO:null===d||void 0===d||null===(t=d.organization)||void 0===t?void 0:t.countryISO,mobileRegex:null===d||void 0===d||null===(a=d.organization)||void 0===a?void 0:a.mobileRegex,saveUserInfoType:null===d||void 0===d||null===(s=d.organization)||void 0===s?void 0:s.saveUserInfoType,isParentLoginAvailable:null===d||void 0===d||null===(i=d.organization)||void 0===i?void 0:i.isParentLoginAvailable,canAddInternationalStudent:null===d||void 0===d||null===(n=d.organization)||void 0===n?void 0:n.canAddInternationalStudent,showSingleStudentErrorModal:null===u||void 0===u||null===(o=u.batchStudents)||void 0===o?void 0:o.showSingleStudentErrorModal,showMultiStudentErrorModal:null===u||void 0===u||null===(l=u.batchStudents)||void 0===l?void 0:l.showMultiStudentErrorModal}}),{makeApiCall:M.b,addStudents:l.d,addStudentRequests:l.c,manageAddStudentModeModal:l.f,setFetchingStudentsStatus:l.g,showPremiumExpiryModal:K.c,saveBatchOverview:A.d,saveAddedStudents:A.c,setShowSingleStudenErrorModal:At.m,setShowMultiStudentErrorModal:At.l,addStudentsManually:At.c})(Mt))),_t=a(1787),Lt=a.n(_t),Bt=a(437);var Dt=a(1349),Nt=a.n(Dt),xt=a(1726),Tt=a.n(xt),jt=a(1788),It=a.n(jt),kt=a(1086);const Ft={width:"10rem","text-align":"center",overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},Vt={"margin-right":"10px"};class Rt extends s.Component{constructor(e){super(e),this.state={modalOpen:!1,openLightBox:!1,currentImage:0},this.handleDelete=this.handleDelete.bind(this),this.handleClose=this.handleClose.bind(this),this.handleOpen=this.handleOpen.bind(this),this.handleConfirm=this.handleConfirm.bind(this),this.allowEdit=this.allowEdit.bind(this),this.handleOpenLightBox=this.handleOpenLightBox.bind(this),this.handleCloseLightBox=this.handleCloseLightBox.bind(this),this.gotoNext=this.gotoNext.bind(this),this.gotoPrevious=this.gotoPrevious.bind(this)}allowEdit(e){let{announcementId:t,description:a,attachments:s}=e;const{permissions:i,batchCode:n,batchId:o}=this.props;return i&&i.ownerPremiumStatus?(this.props.saveAnnouncementEditDetails({announcementId:t,description:a,attachments:s}),this.props.history.push(`/batches/${o}/${n}/announcements/edit`)):this.props.showPremiumExpiryModal(!0)}handleDelete(e){const{permissions:t}=this.props;return t&&t.ownerPremiumStatus?this.props.deleteAction(e):this.props.showPremiumExpiryModal(!0)}handleConfirm(e){this.setState({modalOpen:!1}),this.handleDelete(e),Object(L.a)(B.p),b.toastr.success("Success","Announcement deleted successfully")}handleOpen(){this.setState({modalOpen:!0})}handleClose(){this.setState({modalOpen:!1})}handleOpenLightBox(e,t){t.preventDefault(),this.setState({openLightBox:!0,currentImage:e})}handleCloseLightBox(){this.setState({openLightBox:!1,currentImage:0})}gotoPrevious(){this.setState({currentImage:this.state.currentImage-1}
25)}gotoNext(){this.setState({currentImage:this.state.currentImage+1})}render(){const{description:e,tutorName:t,tutorImageUrl:a,attachments:s,createdAt:n,permissions:o,announcementId:l,isArchive:r}=this.props,{openLightBox:d}=this.state,m=[],u=[],h=[];return s&&s.length&&s.forEach(e=>{let t=e.format.toLowerCase();"jpg"===t||"png"===t||"svg"===t||"jpeg"===t?(e.src=Object(kt.a)(e.url),e.url=Object(kt.a)(e.url),e.caption=e.fileName,m.push(e)):"pdf"===t?u.push(e):h.push(e)}),i.a.createElement(c.z,{style:{marginTop:"4%",border:"none"}},o&&!!o.announcementPermission&&i.a.createElement(c.h,{item:!0,icon:"ellipsis vertical",style:{float:"right",marginBottom:"-5%"},disabled:r},i.a.createElement(c.h.Menu,null,i.a.createElement(c.h.Item,{className:"an-dr-menu flexboxClass",style:{display:"flex"},onClick:()=>this.allowEdit({announcementId:l,description:e,attachments:s})},i.a.createElement("img",{src:ae.a,style:{marginRight:"16px",width:"20px"}}),"Edit"),i.a.createElement(c.u,{trigger:i.a.createElement(c.h.Item,{onClick:this.handleOpen,style:{display:"flex"},className:"an-dr-menu flexboxClass"},i.a.createElement("img",{src:Oe.a,style:{marginRight:"16px",width:"20px"}}),"Delete"),open:this.state.modalOpen,onClose:this.handleClose,size:"small",style:{width:"40%"}},i.a.createElement(c.m,{icon:"warning sign",content:"Are you sure of deleting an announcement?"}),i.a.createElement(c.u.Content,null,i.a.createElement("p",null,"Proceed only if you are very sure")),i.a.createElement(c.u.Actions,null,i.a.createElement(c.b,{onClick:this.handleClose},"Close"),i.a.createElement(c.b,{primary:!0,onClick:()=>this.handleConfirm(l)},"Delete"))))),i.a.createElement("div",null,i.a.createElement(c.i,null,i.a.createElement(c.i.Event,null,i.a.createElement(F.a,{user:{name:t,imageUrl:a||!1},size:40,style:{marginRight:"15px",marginBottom:"-10px",flexShrink:"0"}}),i.a.createElement(c.i.Content,{className:"w-100"},i.a.createElement(c.i.Summary,null,i.a.createElement("h5",{style:{marginTop:"1.2%"}},t)),i.a.createElement(c.i.Date,null,i.a.createElement("span",{style:{fontSize:".8rem",display:"block",paddingTop:".8%"}},q()(n).fromNow()," -",s&&s.length?"Shared attachment":"Made an announcement")),i.a.createElement("div",{style:{marginRight:"50px",marginTop:"1%"}},i.a.createElement("h3",{className:"anc-desc",style:{fontSize:"1.3rem",fontWeight:"500",color:"#555"}},i.a.createElement(Lt.a,{properties:{target:"_blank"}},e))),s&&s.length?i.a.createElement(c.i.Extra,{images:!0,style:{paddingTop:"1.5%",display:"grid",gridTemplateColumns:"repeat(4,1fr)",gridGap:"16px 0"}},m.length?m.map((e,t)=>i.a.createElement("div",{style:Vt,key:e.id},i.a.createElement("div",null," ",i.a.createElement("img",{key:e.id,alt:e.public_id,style:{height:"82px",width:"82px",paddingLeft:"25px",boxSizing:"content-box",cursor:"pointer"},src:e.url,onClick:e=>this.handleOpenLightBox(t,e)})),i.a.createElement("div",{style:Ft},e.fileName))):"",m.length?i.a.createElement(It.a,{currentImage:this.state.currentImage,isOpen:d,images:m,onClickNext:this.gotoNext,onClickPrev:this.gotoPrevious,onClose:this.handleCloseLightBox}):"",u.length?u.map((e,t)=>i.a.createElement("div",{style:Vt,key:t}," ",i.a.createElement("div",null,i.a.createElement("a",{key:e.id,href:""+Object(kt.a)(e.url),target:"_blank",rel:"noreferrer"},i.a.createElement("img",{key:e.id,alt:e.public_id,style:{height:"82px",width:"82px"},src:Nt.a}))),i.a.createElement("div",{style:Ft},e.fileName))):"",h.length?h.map((e,t)=>i.a.createElement("div",{style:Vt,key:t}," ",i.a.createElement("div",null,i.a.createElement("a",{key:e.id,href:""+Object(kt.a)(e.url),target:"_blank",rel:"noreferrer"},i.a.createElement("img",{key:e.id,alt:e.public_id,style:{height:"82px",width:"82px"},src:Tt.a}))),i.a.createElement("div",{style:Ft},e.fileName))):""):"")))))}}Object(_.a)(Object(r.a)(Object(n.connect)((function(e){let{persistedData:t}=e;return{persistedData:t}}),{saveAnnouncementEditDetails:function(e){return{type:Bt.b,payload:e}},showPremiumExpiryModal:K.c})(Rt)));var Ht=a(3228),Gt=a.n(Ht),Pt=a(3229),Ut=a.n(Pt),Yt=a(3230),zt=a.n(Yt),Zt=a(3231),Wt=a.n(Zt),qt=a(3232),$t=a.n(qt),Qt=a(3233),Xt=a.n(Qt);var Kt=e=>{const{videosCount:t,filesCount:a,testsCount:s,addContentClick:n}=e,o=t+a+s,{t:l}=Object(y.a)();return i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:"contentOverview"},i.a.createElement("div",{className:"flexrow contentOverviewDiv"},i.a.createElement("div",null,l("components.BatchManagement.BatchOverview.ContentOverview.content","CONTENT")," (",o,")"),i.a.createElement("div",null,i.a.createElement("button",{onClick:n,className:"contentOverview__button"},l("components.BatchManagement.BatchOverview.ContentOverview.addContent","Add Content")))),i.a.createElement("div",{className:"flexrow",style:{width:"100%","justify-content":"space-between"}},i.a.createElement("div",{className:"contentOverview__card contentOverview__card--1 alignCenter"},i.a.createElement("img",{src:0==t?Ut.a:Gt.a,alt:"",className:"contentOverview__card--img"}),i.a.createElement("div",{className:"contentOverview__card--videos"},0==t?i.a.createElement("span",{style:{color:"#666666",opacity:"0.87"}},t," ",l("components.BatchManagement.BatchOverview.ContentOverview.videos","Videos")):i.a.createElement("span",null,t," ",l("components.BatchManagement.BatchOverview.ContentOverview.videos","Videos")))),i.a.createElement("div",{className:"contentOverview__card contentOverview__card--2 alignCenter"},i.a.createElement("img",{src:0==a?Wt.a:zt.a,alt:"",className:"contentOverview__card--img"}),i.a.createElement("div",{className:"contentOverview__card--videos"},0==a?i.a.createElement("span",{style:{color:"#666666",opacity:"0.87"}},a," ",l("components.BatchManagement.BatchOverview.ContentOverview.files","Files")):i.a.createElement("span",null,a," ",l("components.BatchManagement.BatchOverview.ContentOverview.files","Files")))),i.a.createElement("div",{className:"contentOverview__card contentOverview__card--3 alignCenter"},i.a.createElement("img",{src:0==s?Xt.a:$t.a,alt:"",className:"contentOverview__card--img"}),i.a.createElement("div",{className:"contentOverview__card--videos"},0==s?i.a.createElement("span",{style:{color:"#666666",opacity:"0.87"}},s," ",l("components.BatchManagement.BatchOverview.ContentOverview.tests","Tests")):i.a.createElement("span",null,s," ",l("components.BatchManagement.BatchOverview.ContentOverview.tests","Tests")))))))};class Jt extends i.a.Component{constructor(e){super(e),this.addContentClick=()=>{this.props.batchCode&&this.props.history.push(`/batches/${this.props.batchCode}/content/0`)},this.state={}}componentDidMount(){}render(){const{contentStats:e}=this.props;return i.a.createElement(Kt,{filesCount:e?e.files:0,testsCount:e?e.tests:0,videosCount:e?e.videos:0,addContentClick:this.addContentClick}
25)}}Object(r.a)(Object(n.connect)((function(e){return{contentStats:Object(U.get)(e.batchDetail,"data.contentStats",null),batchCode:e.batchDetail&&e.batchDetail.data&&e.batchDetail.data.batchCode}}),{})(Jt)),a(1890),a(3234);var ea=a(3235),ta=a.n(ea),aa=a(368);class sa extends i.a.Component{constructor(e){super(e),this.handleFacultyPermission=()=>{this.props.history.push(`/batches/${this.props.batchId}/${this.props.batchCode}/settings`)},this.getMobileNumber=e=>{if(e)return"+"+e.slice(0,2)+"-"+e.slice(2,e.length)},this.onSubmit=e=>{let t={...e.members[0]},{batchCode:a,countryISO:s,t:i}=this.props;t.countryCode=s||"91",this.props.makeApiCall(`/batches/${a}/coowners`,"POST",t,e=>{"success"===e.status&&(this.setState({showFacultyModal:!1}),this.props.makeApiCall("/v2/batch/coowner/"+a,"GET",void 0,e=>{if("success"===e.status){let t=[];t=[this.props.batchDetail.data.coowners[0],...e.data.list],this.props.saveAddedFaculty(t)}b.toastr.success(i("components.BatchManagement.BatchOverview.FacultyListCard.success","Successful"),i("components.BatchManagement.BatchOverview.FacultyListCard.facultyAddedSuccessfully","Faculty Added Successfully"))},e=>{b.toastr.error(i("components.BatchManagement.BatchOverview.FacultyListCard.error","ERROR"),e.response.data.message)}))},e=>{this.setState({showFacultyModal:!1},()=>{this.props.resetForm()})})},this.getNameInitials=e=>{let t=e.split(" "),a="";return t.forEach(e=>a+=e.slice(0,1).toUpperCase()),a.length>2?a.slice(0,2):a},this.state={showFacultyModal:!1,faculties:[]}}componentDidMount(){const{t:e}=this.props;this.props.makeApiCall("/v2/batch/coowner/"+this.props.batchCode,"GET",void 0,e=>{"success"===e.status&&this.setState({faculties:[...e.data.list]})},t=>{b.toastr.error(e("components.BatchManagement.BatchOverview.FacultyListCard.newtworkError","Network Error"),e("components.BatchManagement.BatchOverview.FacultyListCard.failedToFetch","Failed to fetch faculties"))})}render(){const{batchDetailIsArchive:e,t:t}=this.props;return i.a.createElement("div",{className:"FacultyListCard"},i.a.createElement("div",{className:"FacultyListCard_Header"},i.a.createElement("p",{className:"Header_Text",style:{margin:"0em"}},t("components.BatchManagement.BatchOverview.FacultyListCard.heading","Faculty")," (",this.props.faculties?this.props.faculties.length-1:0,")"," "),i.a.createElement("button",{onClick:e&&e.isArchive?"":()=>{this.setState({showFacultyModal:!0})},className:e&&e.isArchive?"Header_Button_Disable":"Header_Button","data-cy":"add-faculty-button"}," ","+ ",t("components.BatchManagement.BatchOverview.FacultyListCard.add","Add")," ")),this.props.faculties&&this.props.faculties.slice(1).length?i.a.createElement("div",{className:"FacultyListCard_Listing"},this.props.faculties&&this.props.faculties.slice(1).slice(0,5).map(e=>i.a.createElement("div",{className:"FacultyListCard_Content"},i.a.createElement("div",{className:"FacultyName_Division"},i.a.createElement(F.a,{user:{name:e.name||!1}}),i.a.createElement("p",{className:"FacultyName","data-cy":"faculty-name"}," ",e.name)),i.a.createElement("p",{className:"FacultyNumber","data-cy":"faculty-number"},this.getMobileNumber(e.mobile))))):i.a.createElement(V.a,{style:{paddingBottom:"16px"},imageDetails:{src:ta.a,alt:"no students",style:{width:"120px"}},heading:{text:t("components.BatchManagement.BatchOverview.FacultyListCard.noFacultyAdded","No Faculty Added"),style:{fontSize:"16px",lineHeight:"24px",margin:"0 auto"}},subHeading:{text:t("components.BatchManagement.BatchOverview.FacultyListCard.clickAdd","Click \u201cAdd\u201d button to add faculty."),style:{fontSize:"14px",lineHeight:"17px"}}}),this.props.faculties&&this.props.faculties.length>6&&i.a.createElement("div",{className:"FacultyFooter"},i.a.createElement("button",{onClick:this.handleFacultyPermission,className:"FacultyFooter_Text","data-cy":"manage-faculty-permissions"},t("components.BatchManagement.BatchOverview.FacultyListCard.viewMore","View More"))),this.state.showFacultyModal&&i.a.createElement(Qe.a,{entityToAdd:t("NameNumberForm.faculty","Faculty"),open:this.state.showFacultyModal,modalHeader:t("components.BatchManagement.BatchOverview.FacultyListCard.addFaculty","Add Faculty"),form:"addFaculty",onClose:()=>{this.setState({showFacultyModal:!1},()=>{this.props.resetForm()})},onSubmit:this.onSubmit,numberDisabled:!1,addEmail:this.props.isInternational,saveUserInfoType:this.props.saveUserInfoType,mobileRegex:this.props.mobileRegex,canAddInternationalStudent:this.props.canAddInternationalStudent,defaultLanguage:this.props.defaultLanguage}))}}var ia=Object(r.a)(Object(n.connect)((function(e){var t,a,s,i,n,o,l,c,r,d,m,u;return{persistedData:e.persistedData,premiumStatus:e.persistedData&&e.persistedData.premiumStatus,batchDetail:e.batchDetail,faculties:e.batchDetail&&e.batchDetail.data&&e.batchDetail.data.coowners,countryISO:null===e||void 0===e||null===(t=e.persistedData)||void 0===t||null===(a=t.organization)||void 0===a?void 0:a.countryISO,isInternational:null===e||void 0===e||null===(s=e.persistedData)||void 0===s||null===(i=s.organization)||void 0===i?void 0:i.isInternational,saveUserInfoType:null===e||void 0===e||null===(n=e.persistedData)||void 0===n||null===(o=n.organization)||void 0===o?void 0:o.saveUserInfoType,mobileRegex:null===e||void 0===e||null===(l=e.persistedData)||void 0===l||null===(c=l.organization)||void 0===c?void 0:c.mobileRegex,canAddInternationalStudent:null===e||void 0===e||null===(r=e.persistedData)||void 0===r||null===(d=r.organization)||void 0===d?void 0:d.canAddInternationalStudent,defaultLanguage:null===e||void 0===e||null===(m=e.persistedData)||void 0===m||null===(u=m.organization)||void 0===u?void 0:u.defaultLanguage}}
25),e=>({makeApiCall(t,a,s,i,n){let o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],l=arguments.length>6?arguments[6]:void 0;e(Object(M.b)(t,a,s,i,n,o,l))},resetForm(){e(Object(aa.g)("addFaculty"))},saveAddedFaculty(t){e(Object(A.b)(t))}}))(Object(_.a)(Object(D.a)()(sa)))),na=a(2241),oa=a(2130),la=a(2642),ca=a(2243);var ra=Object(_.a)(Object(n.connect)((function(e){let{persistedData:t,batchDetail:a}=e;return{persistedData:t,premiumStatus:t&&t.premiumStatus,batchDetail:a&&a.data,liveCard:a&&a.data&&a.data.liveCard,batchOverview:a&&a.data,isArchive:a&&a.data&&a.data.isArchive,students:a&&a.data&&a.data.students,requestedStudentsCount:a&&a.data&&a.data.requestedStudentsCount}}))(Object(r.a)((function(e){let{batchCode:t,batchId:a,deletingBatchStatus:s,premiumStatus:n,persistedData:l,permissions:r,isStudentOrParent:d,announcements:m,batchStudyMaterialUrl:u,batchType:h,courses:p,batchDetail:v,liveCard:g,isArchive:b,students:C,requestedStudentsCount:S,batchOverview:E,...f}=e;const{t:w}=Object(y.a)();let A=!1;return A=(l&&l.tutorId)!=(v&&v.ownerId),s?i.a.createElement(c.k,{verticalAlign:"middle",style:{height:"80vh"}},i.a.createElement(c.k.Column,{stretched:!0,width:16},i.a.createElement(c.r,{active:!0,inline:"centered",content:w("components.BatchManagement.BatchOverview.loading.loadingBatches","Loading batches")}))):(l&&l.user,i.a.createElement("div",null,i.a.createElement(o.Helmet,null,i.a.createElement("meta",{charSet:"utf-8"}),i.a.createElement("title",null,w("components.BatchManagement.BatchOverview.title","Batch Overview"))),i.a.createElement(c.k,{columns:"16"},i.a.createElement(c.k.Column,{computer:"10",style:{padding:"12px"}},i.a.createElement("div",{onClick:function(){f.history.push(`/batches/${a}/${t}/settings`)},style:n&&v&&v.isArchive?{display:"flex",justifyContent:"center",alignItems:"center",marginBottom:"8px",background:"#FFEDF0",fontSize:"14px",lineHeight:"17px",color:"#FF4058",padding:"8px 0px",cursor:"pointer"}:{display:"none",marginBottom:"8px"}},w("components.BatchManagement.BatchOverview.batchArchived","This batch has been archived. Click here to unarchive.")),i.a.createElement(Ce,{isStudentOrParent:d,batchCode:t,batchId:a,batchDetail:v}),v?i.a.createElement(lt,{isStudentOrParent:d,batchCode:t,batchId:a,batchDetailIsArchive:v,subject:v.subjectName}):null,!d&&S>0&&i.a.createElement(bt,{batchCode:t,batchId:a,isOverview:1,Archive:b}),!d&&i.a.createElement(Ot,{students:C,batchCode:t,batchId:a,batchType:h,batchDetail:v}),!d&&!A&&i.a.createElement(ia,{batchId:a,batchCode:t,batchDetailIsArchive:v})),i.a.createElement(c.k.Column,{computer:"6",style:{padding:"12px"}},i.a.createElement("div",{style:{width:"95%"}},i.a.createElement("div",{style:n&&v&&v.isArchive?{display:"flex",padding:"8px 0px"}:{display:"none"}}),!d&&g&&i.a.createElement(na.a,{liveCard:g,type:3,batchCode:t,batchId:a}),d&&g&&i.a.createElement(oa.a,{liveCard:g,type:3}),d&&(null===v||void 0===v?void 0:v.scoreboardSummary)&&i.a.createElement(la.a,{headerLink:`/batches/${a}/${t}/scoreboard`,footerLink:`/batches/${a}/${t}/tests`,summary:null===v||void 0===v?void 0:v.scoreboardSummary,batchId:a,screenName:"Batch_overview",style:{fontSize:"10px",margin:"2em 1em 24px 0px",width:"97%"}}),i.a.createElement(ca.a,{overviewData:E}),i.a.createElement(z,{batchCode:t,batchId:a,isArchive:b}))))))}))));t.default=Object(n.connect)((function(e){return{deletingBatchStatus:e.batchDetail&&e.batchDetail.deletingBatchStatus,announcements:e.batchDetail&&e.batchDetail.data&&e.batchDetail.data.announcement,batchStudyMaterialUrl:e.batchDetail&&e.batchDetail.data&&e.batchDetail.data.batchStudyMaterialUrl,batchType:Object(U.get)(e.batchSettings,"data.info.batchType",null),courses:Object(U.get)(e.batchDetail,"data.courses",[])}}),{manageAddStudentModeModal:l.f})((function(e){let{announcements:t,batchCode:a,deletingBatchStatus:s,batchStudyMaterialUrl:n,batchType:l,courses:c,batchId:r}=e;const{t:d}=Object(y.a)();return i.a.createElement("div",null,i.a.createElement(o.Helmet,null,i.a.createElement("meta",{charSet:"utf-8"}),i.a.createElement("title",null,d("containers.BatchManagement.BatchOverview.title","Batch Overview")," ")),i.a.createElement(ra,{announcements:t,batchCode:a,deletingBatchStatus:s,batchStudyMaterialUrl:n,batchType:l,courses:c,batchId:r}))}))}}]);
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.