PageSourceSearch

https://login.kasranker.in/static/js/50.43d3aa1f.chunk.js

js kasranker.in collected 2026-09-28 09:09:25 UTC 116,464 bytes, 1 lines download raw bytes

1(this["webpackJsonpclassplus-web-react"]=this["webpackJsonpclassplus-web-react"]||[]).push([[50],{1039:function(e,t){function a(){return e.exports=a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)({}).hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,a.apply(null,arguments)}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports},1040:function(e,t,a){e.exports=a.p+"static/media/SVGClose.71e6ac1a.svg"},1044:function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},1048:function(e,t,a){var s=a(1055);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,s(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},1055:function(e,t){function a(t,s){return e.exports=a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,a(t,s)}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports},1110:function(e,t,a){"use strict";var s=a(1),l=a.n(s),n=a(47),o=a(140),i=a(1028),r=a(459),c=a(1126),d=a.n(c),u=a(1143),m=a.n(u),h=a(67),v=a(38),p=a(2780);class T extends l.a.Component{constructor(e){super(e),this.getCourseLinkModal=()=>{let{t:e}=this.props;return l.a.createElement("div",null,l.a.createElement(n.m,{icon:"warning sign",content:e("components.custom.editDeleteModal.header","Batch cannot be removed."),className:"modalDiv"}),l.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.")),l.a.createElement(n.u.Actions,{style:{padding:"1rem"}},l.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 l.a.createElement("div",null,l.a.createElement(n.m,{icon:"warning sign",content:e,className:"modalDiv"}),l.a.createElement(n.u.Content,{className:"modalDiv"},t),l.a.createElement(n.u.Actions,{style:{padding:"1rem"}},l.a.createElement(n.b,{primary:!0,onClick:this.handleDelete,style:{float:"right",marginBottom:"1rem"}},a),l.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)(v.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)(v.U),this.setState({modalOpen:!1}),this.props.deleteAction()}render(){const{dropdownText:e="Remove",isDeleteTest:t,inactiveIcon:a,t:s}=this.props;return l.a.createElement(n.u,{onOpen:this.props.onOpen,trigger:l.a.createElement(n.h.Item,{onClick:this.handleOpen.bind(this,e),className:""},l.a.createElement("div",{className:"flexrow alignCenter"}," ",l.a.createElement("img",{src:a?m.a:d.a,alt:"SVGDelete",className:"mrighthalfrem"}),l.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(i.a)(Object(o.connect)(void 0,{showPremiumExpiryModal:r.c})(Object(p.a)()(T)))},1126:function(e,t,a){e.exports=a.p+"static/media/deleteBatch.dea37fba.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"},1212:function(e,t,a){"use strict";a.d(t,"g",(function(){return l})),a.d(t,"k",(function(){return n})),a.d(t,"h",(function(){return o}
1)),a.d(t,"p",(function(){return i})),a.d(t,"q",(function(){return r})),a.d(t,"r",(function(){return c})),a.d(t,"i",(function(){return d})),a.d(t,"b",(function(){return u})),a.d(t,"d",(function(){return m})),a.d(t,"c",(function(){return h})),a.d(t,"n",(function(){return v})),a.d(t,"o",(function(){return p})),a.d(t,"a",(function(){return T})),a.d(t,"m",(function(){return b})),a.d(t,"l",(function(){return E})),a.d(t,"f",(function(){return g})),a.d(t,"j",(function(){return f})),a.d(t,"e",(function(){return S}));var s=a(29);const l=e=>({type:s.a.RESET_STATE,payload:e}),n=e=>({type:s.a.SET_SEND_SMS,payload:e}),o=e=>({type:s.a.RESET_TEST_STATS,payload:e}),i=e=>({type:s.a.UPDATE_STUDENT_MARKS,payload:e}),r=e=>({type:s.a.UPDATE_STUDENT_PRESENT,payload:e}),c=e=>({type:s.a.UPLOAD_MARKS_CSV,payload:e}),d=e=>({type:s.a.RESET_UPLOAD_CSV,payload:e}),u=e=>({type:s.a.FETCH_BATCH_TESTS,payload:e}),m=e=>({type:s.a.FETCH_TEST_STATS_TUTOR,payload:e}),h=e=>({type:s.a.FETCH_TEST_STATS_STUDENT_PARENT,payload:e}),v=e=>({type:s.a.UPDATE_CLASS_TEST_DETAILS,payload:e}),p=e=>({type:s.a.UPDATE_CLASS_TEST_MARKS,payload:e}),T=e=>({type:s.a.DELETE_TEST,payload:e}),b=e=>({type:s.a.SET_SHOW_TEST_IFRAME,payload:e}),E=e=>({type:s.a.SET_SHOW_EXIT_TEST_MODAL,payload:e}),g=e=>({type:s.a.RESET_ATTEMPT_TEST_STATE,payload:e}),f=e=>({type:s.a.SET_ATTEMPT_TEST_DATA,payload:e}),S=e=>({type:s.a.GET_ATTEMPT_TEST_URL,payload:e})},1217:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADkAAAA0CAYAAAAwhpBbAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAUGSURBVHgB7Vpdcts2EF6AktNHPfcl5Alsn6DKCeqcIPJMm4ynD21PYPkEcR86ntiZkXOCyCeIc4IoJyB0gihvSWQS2QUoEhBJ8d+yPf5mNCJAkMIHLBbfLsSga0z8AXyDA3D4b8DkHkhwsXYQ3V0AA4F1AkBeQQDXcOQJaBkMusKZPwSH/Y1XQ0hIlcEUAvkfkr2GltA+SZq5G34MUv4DjcAuIQhP2pjZdkn+7+9Bn73HK3ftzgLN8R2a4wxC/HAqI0Kc4R62ZTTb7PeM59CU5b/wyptCA7RH8u38BYTyFGzTrNZJMvEeQytQJp6AsTH8+fQEaqIdkm/8A+zIe6tOyhMkN4Y6OPNHuJ6PwZxZPVinUAPNSZ75LnboE5geM5DPGzsO/d4PYBIN5LM67+XQFLojCcFlvY6kQA6HSJHJJ781UY6tIsrPpFovHJ2DHEZ7HYEciBu3aWBSudDOLBnIGsugmCSZTQ9HcN0ZpF91CS+fHkIXeOOPcc0fR6UF9KUHh96i7OObzZVGkdZbIUEE7WldYQfIOlakBvADKu3B+SRpBvWel6wBhrIrkIe47vbVh65pBqVyNAK6As2aRBUU94O9qPD0BnO9EDSDe0kFEnrpXcK2oL2tH5f5jgt//Dov8yjPeeHQIkgOZZsECdpSRFyWy9Imm03S4Yk5kIm27THrYxZfkTY+F1/gfD5Rs7wB2SQpJEpe9g7uCqT8vFaD/kKOlBlfzI/zHssmaZrq0hi9bYP2R+XsgLSwsO5JOcaZ/ZAlFrIdz7mQ8XWFBX7ryNK4ZNJ9VErGPpq3hYj4Kvz+DO4qjtAZ9nErs5fUHiztYCFN8mL+GqyRwbRFGyBhoRyF8NV1W6AZe+WNlNxLMESVFHtfmyQRtCN63ITDK2gKW3+66rpNogRar+aMkgyMvG5CkryTTXCGi3y/aVSeEtgag06I7ii5J+LfcLjyuNrxrKuJjMVbC9kETejQ7C+vPQ+undEkfj+KeT2TDnttNBMq6O2eIEAXM3qklJkp5kc8stuDpJVsniHLJihyrjswXXNt8l2Oq3Jk/XhTjZpJEDdwKT8mZXYdbeortEs0MAWMHCJJlmwRTSVcHsGsgSOz6oqoY6m0AbckXIhivC6qEFyhK6IBmP5kwMHsVAj1nc16gF02/swj2gyuWbDFwJMnX6AVVAyw00SbeXZuObwZkRRxMfi+D3VB6UOSVvRdx3lpol78jiZgRk6KwaIHmqQbVdFaqKdw9LYzhiZo4x0K6lxFI5RX3HLtjLUjxrcJUjzmmgxhytc86lDld+4zHJZkCJg+1OVRSv/aaFQrFX8noFMgbly+0eGX9q6BFYu56hD1vkFHUeOkAvPB0ZmMJqkKRvKWQq4NiaE7hxRBCjKSjH6yT/aVVzNTfjoxVJDu2yrIf1xgH1ME1cmaWFX04lsUWp35z9fOBIcqzjwXU/XvjKVxFF6EX7BdlXBN/0uk2Bdw3OY4341O1+hjIkWQ0LOa0M2Jv48x2OnaeQOGYuwAZ7s8lkAjXe6skk6qKfnkQDlImVU7xQCZlFZqYNOJrFViSMssAU3gmHHqRpRtl4Y+hEKV5eYG+r3ch3WEfalGmTrB2a59AFQIPFZXR27FuMF2fSAh4pZoTX9wmqGS+aj2+BKW0itqECWymiWziqBzPB50hOb/GbgHeCT5UPBI8qHgkeRDwZZIhl/hFnF7JG+U+hFQRQm1hJ/yTT2mcjFutQAAAABJRU5ErkJggg=="},1372:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var s=a(1),l=a.n(s),n=a(132);function o(e){const{first:t,second:a,className:s,scaleFirst:o=1}=e;return l.a.createElement("span",{className:s},l.a.createElement("span",{style:{fontWeight:"500",fontSize:2.1*o+"rem"}},t),a?l.a.createElement(n.a,{fontSize:"1em",style:{display:"inline"}},"/",a):null)}},1374:function(e,t,a){e.exports=a.p+"static/media/first.e31a2e90.svg"},1375:function(e,t,a){e.exports=a.p+"static/media/second.fb1b8f8c.svg"},1376:function(e,t,a){e.exports=a.p+"static/media/third.ad8bf0f3.svg"},1383:function(e,t,a){e.exports=a.p+"static/media/rightArrow.b6a0af5b.svg"},1384:function(e,t,a){"use strict";var s=a(1),l=a.n(s),n=a(8),o=a.n(n),i=a(106),r=a.n(i),c=a(230),d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e};function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var h=function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)},v=function(e){function t(){var a,s;u(this,t);for(var l=arguments.length,n=Array(l),o=0;o<l;o++)n[o]=arguments[o];return a=s=m(this,e.call.apply(e,[this].concat(n))),s.handleClick=function(e){if(s.props.onClick&&s.props.onClick(e),!e.defaultPrevented&&0===e.button&&!s.props.target&&!h(e)){e.preventDefault();var t=s.context.router.history,a=s.props,l=a.replace,n=a.to;l?t.replace(n):t.push(n)}},m(s,a)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){var e=this.props,t=(e.replace,e.to),a=e.innerRef,s=function(e,t){var a={};for(var s in e)t.indexOf(s)>=0||Object.prototype.hasOwnProperty.call(e,s)&&(a[s]=e[s]);return a}(e,["replace","to","innerRef"]);r()(this.context.router,"You should not use <Link> outside a <Router>"),r()(void 0!==t,'You must specify the "to" property');var n=this.context.router.history,o="string"===typeof t?Object(c.b)(t,null,null,n.location):t,i=n.
1createHref(o);return l.a.createElement("a",d({},s,{onClick:this.handleClick,href:i,ref:a}))},t}(l.a.Component);v.propTypes={onClick:o.a.func,target:o.a.string,replace:o.a.bool,to:o.a.oneOfType([o.a.string,o.a.object]).isRequired,innerRef:o.a.oneOfType([o.a.string,o.a.func])},v.defaultProps={replace:!1},v.contextTypes={router:o.a.shape({history:o.a.shape({push:o.a.func.isRequired,replace:o.a.func.isRequired,createHref:o.a.func.isRequired}).isRequired}).isRequired},t.a=v},1401:function(e,t,a){e.exports=a.p+"static/media/courseTestScore.663f5437.svg"},1542:function(e,t,a){e.exports=a.p+"static/media/projectedUp.ea6771c5.svg"},1543:function(e,t,a){e.exports=a.p+"static/media/projectedDown.ffce439b.svg"},1835:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAATCAYAAACUef2IAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACuSURBVHgB5ZQ9DoJAFITfJjbaYqlnkNbaVlvuYeyMpa2th/AQnkFLqGlpoWUmDAktsCT8fMnHPrKb3ZfNZJ1VRPAIC/iGqfXEacMLfMEQnuBd8xu4s/ZkK3zW8McfjVFjwUEHt+XLjgP4gH+4hzH8WE+cxkCd5TzNFkl9FYPG7anae9xym0Lcarj5uWN3M6EZN6aB74WXuDEVvFe+alfVN9Vk3HFL4NYGiltonigBE6EqucysCCYAAAAASUVORK5CYII="},1836:function(e,t,a){e.exports=a.p+"static/media/accuracy.c9d77505.svg"},1837:function(e,t,a){e.exports=a.p+"static/media/print.509650b6.svg"},2047:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAYCAYAAAD6S912AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGdSURBVHgB7VVdTsJAEJ5ZMPpmb2BvoEeAE4gnoC8mQkmotrzrs5DUBIhv4gnQG3AEvEG5AY/GQMfZbW0Ku4AWffNL2uzu7Hw7PzuzCBtADb8GAs51Ac4gXozwMYxMemgkcztP/HdgM+ZMXMXh/XRdIDSy5o2zg0zCYlPGJoFGCCjquRlbQKPsI3zJHW3TZedMU1ciz7Pgo9wGiGcpYSXRgTscdm/zCuQGlE1iuAZBp8zyiv2eOgyp2WnzgidPBN3ciNejtcWKvo9jKr05WFwIwCXKo8yguWEtMmy01P8drMTlhj8CgWns6JldnQNihINuqNFdeTaIksfRn3BMc4khGwe9WVk3gInW4pZHev88tdUNNLmAX8ZWQk7YmBqBtzJvBZXChHwHaupaQBo7OY9hD8IC+Cf8c0KuGi58NTxS9TrhrE+3aZS3CbmUnGwchpKwCvtZ+HPoFiLWyfVPdikCCUs2TDNhCbkbw1e3sZnVgV3APBlFstPIkXIZ+90Jb3iAQuCeuVxmsV159ajlJ7WKcAzfQYxvcMhPapIwhU+5gJLIZngiEQAAAABJRU5ErkJggg=="},2230:function(e,t,a){e.exports=a.p+"static/media/flagIcon.ea26f563.svg"},2231:function(e,t,a){"use strict";a.d(t,"a",(function(){return l})),a.d(t,"g",(function(){return n})),a.d(t,"h",(function(){return o})),a.d(t,"i",(function(){return i})),a.d(t,"j",(function(){return r})),a.d(t,"d",(function(){return c})),a.d(t,"e",(function(){return d})),a.d(t,"c",(function(){return u})),a.d(t,"b",(function(){return m})),a.d(t,"f",(function(){return h})),a.d(t,"k",(function(){return v}));var s=a(60);const l=e=>({type:s.a.ADD_SELECTED_ID,payload:e}),n=e=>({type:s.a.REMOVE_SELECTED_ID,payload:e}),o=e=>({type:s.a.RESET_STUDENT_LIST,payload:e}),i=e=>({type:s.a.RESET_TEST_LIBRARY,payload:e}),r=e=>({type:s.a.SELECT_UNSELECT_ALL,payload:e}),c=e=>({type:s.a.FETCH_STUDENTS_LIST,payload:e}),d=e=>({type:s.a.FETCH_SUBJECT_CHAPTERS,payload:e}),u=e=>({type:s.a.FETCH_CHAPTER_TESTS,payload:e}),m=e=>({type:s.a.CREATE_TEST,payload:e}),h=(e,t)=>({type:s.a.FETCH_TEST_STATS,payload:e,testCategory:t}),v=e=>({type:s.a.UPDATE_TEST,payload:e})},2597:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADfSURBVHgBpZLdDYIwFIVPCyY+sgEwghs4gk6gPGjCoxMoUxDhgTiBbgAb6AbABrwTqP3BiJEa1PPQv9uv5/a2gE5JbiHMHV2YDq4KoCZXGCTVwXQQEoCSpYPJW3rCibGTilIbrC1ByAoTNoPnVtAqzOeyP+YHRGXSjRfDjnG55y7r5zILwOBIx6YNeqlzglywsXdEOhjkjIan8pDvFtJRgFvbe7mjOKRmS7ObVnKzTv1YVIiSWhQ/ytRGWmSgrfU96LsZPuiPVKe4oeajuEhHEUy2hXpHVW5nFCiM+A+6A05yTkVZK+BqAAAAAElFTkSuQmCC"},2645:function(e,t,a){e.exports=a.p+"static/media/pointsIcon.7903e5e5.svg"},2647:function(e,t,a){e.exports=a.p+"static/media/winPoints.e49fe4fd.svg"},3251:function(e,t,a){},3252:function(e,t,a){},3253:function(e,t,a){e.exports=a.p+"static/media/testEmpty.cfbf5977.svg"},3254:function(e,t,a){},3255:function(e,t,a){},3256:function(e,t,a){},3257:function(e,t,a){e.exports=a.p+"static/media/rankIcon.9b11c1b8.svg"},3258:function(e,t,a){e.exports=a.p+"static/media/sword.ac5670e9.svg"},3259:function(e,t,a){e.exports={cardInfo:"PeerStatCard_cardInfo__31T0r",cardInfoLabel:"PeerStatCard_cardInfoLabel__Mgo4D",cardInfoValue:"PeerStatCard_cardInfoValue__3Jybu",cardInfoIcon:"PeerStatCard_cardInfoIcon__2vUIe",infoGroup:"PeerStatCard_infoGroup__3FJmI",cardContent:"PeerStatCard_cardContent__1Ruhr",infoContainerYellow:"PeerStatCard_infoContainerYellow__1vwDe",howLink:"PeerStatCard_howLink__3kXCE",pointer:"PeerStatCard_pointer__3stCa",noChallengeCard:"PeerStatCard_noChallengeCard__1aCOo",noChallengeContainer:"PeerStatCard_noChallengeContainer__3MUqd",swordIcon:"PeerStatCard_swordIcon__1UO1O"}},3261:function(e,t,a){},3262:function(e,t,a){e.exports={statsBelowCont:"SingleTest_statsBelowCont__3Tz3f",msgUnderStats:"SingleTest_msgUnderStats__OhTtr"}},3263:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAF8SURBVHgBjVPdTcMwEP5sUsRjR0gnIBsAExAmaHlB6hNiAsIE8IKqFqS2G5QJWjYoEzhs0EdEW5vvHH6SOFX5pET2+Xz33XdnhSaMTRsfSKERf1uWsPz6nbzuqoKLa30PuJS7BZx7K7zUMf+nXMywtXflQH8BBibGgZrz8gtayHDZWVWCy7lGj8G62LqzKhs5HOUGI9PDPgzoI77CltDeeKBvSXeKq86k4vxoEgxNWrH1xYcsfakSQLJLzRaTIFskQqrrwC4lyh2y0AyRwLrXJoV3otBngTXSiIuEUi5LNcaI1NivHdvo0MZTPi/2pTKLDsVREP0IK3ySkUD5JsWeocAya1ClRU4GaY1e5tdDk1EDMGsWJJLZICPNjDM6nfy05V/wwnOwOJ3aZ3Rsy4atrOMQD4jcRWCPdNdP5a/wkl2G4/m9i30QH/EtWDSMslITbOw0aKsk2fiBS8ujrILaNAVU6hy7HlPL3pTfiWqkWQRKAP/Bd0rErj8w4gv/aaSd35zkxQAAAABJRU5ErkJggg=="},3264:function(e,t,a){},3265:function(e,t,a){},3266:function(e,t,a){},3267:function(e,t,a){},3268:function(e,t,a){},3269:function(e,t,a){},3270:function(e,t,a){},3271:function(e,t,a){},3272:function(e,t,a){},3403:function(e,t,a){"use strict";a.r(t),a.d(t,"BatchTests",(function(){return It}));var s=a(1),l=a.n(s),n=a(140),o=a(47),i=a(1037),r=a.n(i),c=a(1212),d=a(1028),u=a(459),m=a(1270),h=(a(3251),a(1015));var v=Object(n.connect)(e=>{var t,a,s,l;return{isArchive:null===e||void 0===e||null===(t=e.BatchReducer)||void 0===t||null===(a=t.batchDetails)||void 0===a?void 0:a.isArchive,studentCount:null===e||void 0===e||null===(s=e.BatchReducer)||void 0===s||null===(l=s.batchTests)||void 0===l?void 0:l.studentCount}})((function(e){var t;const{createTest:a,studentCount:s}=e;return l.a.createElement("div",{className:"BatchTestsHeader"},l.a.createElement("div",{className:"BatchTestsHeader__Heading"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestHeader.tests"},"Tests")),null!==e&&void 0!==e&&null!==(t=e.permissions)&&void 0!==t&&t.testPermission?l.a.createElement(o.b,{primary:!0,size:"tiny",disabled:e.isArchive,onClick:()=>a()},l.a.createElement("h4",null,l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestHeader.createTest"},"Create Test"))):null)})),p=a(5),T=a(1023),b=a.n(T),E=a(67),g=a(38),f=a(1024),S=a.n(f),C=(a(3252),a(2249));var y=Object(n.connect)(e=>{var t,a,s,l;return{limit:null===e||void 0===e||null===(t=e.BatchReducer)||void 0===t||null===(a=t.batchTests)||void 0===a?void 0:a.limit,offset:null===e||void 0===e||null===(s=e.BatchReducer)||void 0===s||null===(l=s.batchTests)||void 0===l?void 0:l.offset}},e=>({fetchBatchTests:t=>e(c.b(t))}))((function(e){const{t:t}=Object(C.a)(),[a,n]=Object(s.useState)(""),[i,r]=Object(s.useState)();return Object(s.useEffect)(()=>{const{isSearching:t,setIsSearching:s}=e;a&&(t||s(!0),clearTimeout(i),r(setTimeout(()=>e.fetchBatchTests({batchCode:e.batchCode,offset:0,limit:e.limit,searchTerm:a}),300)))},[a]),l.a.createElement("div",{className:"TestsListSearch"},l.a.createElement(o.p,{onChange:e=>n(e.target.value),value:a,iconPosition:"left",icon:"search",style:{width:"300px"},transparent:!0,placeholder:t("routes.batches.batchTest.batchTestList.testListSearch.placeholder.searchTests","Search tests..")}),""!==a?l.a.createElement("img",{src:S.a,alt:"ClearIcon",style:{margin:"0em",curs
1or:"pointer",opacity:.7},onClick:()=>{n(""),e.setIsSearching(!1),e.fetchBatchTests({batchCode:e.batchCode,offset:0,limit:e.limit})}}):l.a.createElement(l.a.Fragment,null))})),M=a(1046),k=a(3253),A=a.n(k);a(3254);var w=Object(d.a)((function(e){const{t:t}=Object(C.a)(),{isStudentOrParent:a,isSearching:s}=e;return l.a.createElement("div",{className:"NoTestsEmptyScreen"},l.a.createElement(M.a,{imageDetails:{src:A.a,alt:"no test found",style:{width:"160px"}},heading:{text:s?t("routes.batches.batchTest.batchTestList.classTestEnterMarksModal.noTestEmptyScreen.noTestFound","No test found"):a?t("routes.batches.batchTest.batchTestList.classTestEnterMarksModal.noTestEmptyScreen.tutorNotAssignedAnyTests","Tutor has not assigned any tests for this batch."):t("routes.batches.batchTest.batchTestList.classTestEnterMarksModal.noTestEmptyScreen.youHaveNotAssignedAnyTests","You have not assigned any tests for this batch."),style:{fontWeight:"500",fontSize:"18px",lineHeight:"21px",margin:"0 auto"}},subHeading:!a&&!s&&{text:t("routes.batches.batchTest.batchTestList.classTestEnterMarksModal.noTestEmptyScreen.assignOnlineOrOfflineTestInCenter","Assign an online or offline test in the centre for this batch."),style:{fontWeight:"400",fontSize:"14px",lineHeight:"17px",paddingBottom:"40px"}}}))})),I=a(2289),L=a(2231),x=a(155),N=a(2796);var _=Object(n.connect)(e=>{var t,a,s,l;return{batchId:null===e||void 0===e||null===(t=e.BatchReducer)||void 0===t||null===(a=t.batchDetails)||void 0===a?void 0:a.batchId,batchCode:null===e||void 0===e||null===(s=e.BatchReducer)||void 0===s||null===(l=s.batchDetails)||void 0===l?void 0:l.batchCode}})(Object(N.a)((function(e){const{t:t}=Object(C.a)(),{history:a,batchId:s,batchCode:n}=e,{testData:i,onAttemptTestClick:r}=e;return l.a.createElement("div",{className:"AttemptTestButton"},null!==i&&void 0!==i&&i.peerEnabledForOrg||i.testCategory!==x.a.UPCOMING?l.a.createElement(o.b,{basic:null===i||void 0===i?void 0:i.isAttempted,color:null!==i&&void 0!==i&&i.isAttempted?"blue":"white",primary:!(null!==i&&void 0!==i&&i.isAttempted),disabled:!(null!==i&&void 0!==i&&i.peerEnabledForOrg)&&i.testCategory===x.a.UPCOMING,style:{width:"120px",margin:"0",padding:"12px 2px"},onClick:()=>{(null===i||void 0===i?void 0:i.testCategory)!==x.a.COMPLETED&&(null===i||void 0===i||!i.peerEnabledForOrg||null!==i&&void 0!==i&&i.isAttempted?r():a.push(`/batches/${s}/${n}/tests/challenge/${null===i||void 0===i?void 0:i.batchTestId}`))}},null!==i&&void 0!==i&&i.isAttempted?t("routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.attemptTestContainer.attemptTestButton.reAttemptTest","Reattempt Test"):null!==i&&void 0!==i&&i.peerEnabledForOrg&&(null===i||void 0===i?void 0:i.testCategory)===x.a.UPCOMING?t("routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.attemptTestContainer.attemptTestButton.challenge","Challenge"):t("routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.attemptTestContainer.attemptTestButton.attemptTest","Attempt Test")):l.a.createElement(o.v,{content:"This test will be available in the future",trigger:l.a.createElement(o.b,{primary:!0,style:{width:"120px",margin:"0",padding:"12px 2px",opacity:"0.5",cursor:"default"},content:"Attempt Test"})}))})));var B=Object(n.connect)(e=>{var t,a,s,l,n,o,i,r,c,d,u,m,h,v,p,T;return{url:null===e||void 0===e||null===(t=e.BatchReducer)||void 0===t||null===(a=t.batchTests)||void 0===a||null===(s=a.attemptTest)||void 0===s?void 0:s.url,onlineTestType:null===e||void 0===e||null===(l=e.BatchReducer)||void 0===l||null===(n=l.batchTests)||void 0===n||null===(o=n.attemptTest)||void 0===o||null===(i=o.testData)||void 0===i?void 0:i.onlineTestType,showTestIframe:null===e||void 0===e||null===(r=e.BatchReducer)||void 0===r||null===(c=r.batchTests)||void 0===c||null===(d=c.attemptTest)||void 0===d?void 0:d.showTestIframe,submitAlertMessage:null===e||void 0===e||null===(u=e.BatchReducer)||void 0===u||null===(m=u.batchTests)||void 0===m||null===(h=m.attemptTest)||void 0===h?void 0:h.submitAlertMessage,modalLoader:null===e||void 0===e||null===(v=e.BatchReducer)||void 0===v||null===(p=v.batchTests)||void 0===p||null===(T=p.attemptTest)||void 0===T?void 0:T.modalLoader}},e=>({setShowExitTestModal:t=>e(c.l(t)),resetAttemptTestState:t=>e(c.f(t))}))((function(e){const{url:t,showTestIframe:a}=e,{type:n,onlineTestType:i}=e;Object(s.useEffect)(()=>()=>e.resetAttemptTestState(),[]),Object(s.useEffect)(()=>(window.addEventListener("popstate",c),window.addEventListener("message",r),()=>{window.removeEventListener("popstate",c),window.removeEventListener("message",r)}),[]);const r=t=>{"goToTest"===t.data.source&&e.resetAttemptTestState()},c=()=>{e.resetAttemptTestState()};return l.a.createElement(l.a.Fragment,null,a&&l.a.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"grey",zIndex:1e3}},l.a.createElement("div",{style:{background:"white",height:"100vh",width:"100vw"}},"practice"!==n&&4!=i?l.a.createElement(o.n,{size:"large",className:"float-right",name:"close",style:{cursor:"pointer",position:"absolute","background-color":"white",right:"0.5rem",top:"0.5rem"},onClick:()=>e.setShowExitTestModal(!0)}
1):l.a.createElement(l.a.Fragment,null),l.a.createElement("iframe",{src:t,frameBorder:"0",allowFullScreen:!0,height:"100vh",width:"100%",className:"testIframe--test"}))))}));var O=Object(n.connect)(e=>{var t,a,s,l,n,o,i,r,c,d,u,m,h,v;return{batchCode:null===e||void 0===e||null===(t=e.BatchReducer)||void 0===t||null===(a=t.batchDetails)||void 0===a?void 0:a.batchCode,url:null===e||void 0===e||null===(s=e.BatchReducer)||void 0===s||null===(l=s.batchTests)||void 0===l||null===(n=l.attemptTest)||void 0===n?void 0:n.url,showTestIframe:null===e||void 0===e||null===(o=e.BatchReducer)||void 0===o||null===(i=o.batchTests)||void 0===i||null===(r=i.attemptTest)||void 0===r?void 0:r.showTestIframe,showExitTestModal:null===e||void 0===e||null===(c=e.BatchReducer)||void 0===c||null===(d=c.batchTests)||void 0===d||null===(u=d.attemptTest)||void 0===u?void 0:u.showExitTestModal,modalLoader:null===e||void 0===e||null===(m=e.BatchReducer)||void 0===m||null===(h=m.batchTests)||void 0===h||null===(v=h.attemptTest)||void 0===v?void 0:v.modalLoader}},e=>({fetchBatchTests:t=>e(c.b(t)),setShowTestIFrame:t=>e(c.m(t)),setShowExitTestModal:t=>e(c.l(t))}))((function(e){const{showExitTestModal:t,modalLoader:a}=e;return l.a.createElement(o.u,{size:"tiny",open:t},l.a.createElement(o.u.Content,null,l.a.createElement("div",{style:{"text-align":"center"}},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.attemptTestContainer.alertTestIframe.areYouSureToExit"},"Are you sure you want to exit?"),l.a.createElement("div",{style:{marginTop:"1.5rem"}},l.a.createElement(o.b,{color:"blue",onClick:()=>{e.setShowExitTestModal(!1),e.setShowTestIFrame(!1),e.fetchBatchTests({batchCode:e.batchCode,limit:10,offset:0})},loading:a},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.attemptTestContainer.alertTestIframe.button.ok"},"Ok")),l.a.createElement(o.b,{onClick:()=>e.setShowExitTestModal(!1),style:{marginLeft:"1rem"}},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.attemptTestContainer.alertTestIframe.button.cancel"},"Cancel"))))))}));a(3255);var R=Object(n.connect)(e=>{var t,a,s;return{showExitTestModal:null===e||void 0===e||null===(t=e.BatchReducer)||void 0===t||null===(a=t.batchTests)||void 0===a||null===(s=a.attemptTest)||void 0===s?void 0:s.showExitTestModal}},e=>({getAttemptTestUrl:t=>e(c.e(t)),setAttemptTestData:t=>e(c.j(t))}))((function(e){const{testData:t}=e,{showExitTestModal:a}=e,{t:s}=Object(C.a)();return l.a.createElement("div",{className:"AttemptTestContainer"},l.a.createElement(_,{testData:t,onAttemptTestClick:()=>{e.getAttemptTestUrl({batchTestId:t.batchTestId}),e.setAttemptTestData({data:t})}}),(null===t||void 0===t?void 0:t.testCategory)===x.a.ONGOING&&(null===t||void 0===t?void 0:t.type)===x.b.ONLINE?l.a.createElement("p",{className:"AttemptTestContainer__Attempts",style:{color:t.numberOfAttempts<=2?"rgb(255, 64, 88)":"black"}},-1===(null===t||void 0===t?void 0:t.numberOfAttempts)?s("components.BatchTestList.components.SingleTest.AttemptTestContainer.youHaveUnlimited","You have unlimited attempts in this test"):1===(null===t||void 0===t?void 0:t.numberOfAttempts)?s("components.BatchTestList.components.SingleTest.AttemptTestContainer.attemptOne","You have 1 more attempt in this test"):`${s("components.BatchTestList.components.SingleTest.AttemptTestContainer.youHave","You have ")} ${null===t||void 0===t?void 0:t.numberOfAttempts} ${s("components.BatchTestList.components.SingleTest.AttemptTestContainer.moreAttempts","more attempts in this test ")}`):null,a?l.a.createElement(O,null):null)})),D=a(1110),j=a(456),P=a(1835),K=a.n(P);var H=Object(d.a)((function(e){const{t:t}=Object(C.a)(),{showSectionalMarksModal:a,closeModal:n,sectionalMarksModalData:i,setSectionalMarksModalData:r}=e,{isStudentOrParent:c}=e;return Object(s.useEffect)(()=>()=>r(null),[]),l.a.createElement(o.u,{open:a,dimmer:"blurring",size:"tiny"},l.a.createElement(o.u.Header,{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.testStatsModal.sectionalMarksModal.sectionalDetails"},"Sectional details"),l.a.createElement("img",{src:S.a,alt:"close",height:"15px",width:"15px",onClick:()=>n(),style:{cursor:"pointer"}})),l.a.createElement(o.u.Content,null,l.a.createElement(o.k,null,l.a.createElement(o.k.Row,null,l.a.createElement(o.k.Column,{className:"pr-0",computer:"2"},l.a.createElement(j.a,{user:{name:i.name,imageUrl:i.imageUrl||!1}})),l.a.createElement(o.k.Column,{computer:"4",className:"pl-0",verticalAlign:"middle"},i.name||i.studentName)),l.a.createElement(o.k.Row,null,l.a.createElement(o.k.Column,{computer:"5"},l.a.createElement("span",{style:{color:"#9B9B9B"}},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.testStatsModal.sectionalMarksModal.totalScore"},"Total score:")),l.a.createElement("span",{className:"pl-3"},i.scoredMarks),l.a.createElement("span",{style:{opacity:"0.6"}},"\xa0/\xa0",(()=>{const{sections:e}=i;if(null!==e&&void 0!==e&&e.length){let t=0;
1return e.forEach(e=>{t+=e.maxMarks}),t}return 0})())),l.a.createElement(o.k.Column,{computer:"5"},l.a.createElement("span",{style:{color:"#9B9B9B"}},(i.grade||i.yourGrade)&&t("routes.batches.batchTest.batchTestList.testStatsModal.sectionalMarksModal.grade","Grade:")),l.a.createElement("span",{className:"pl-3"},i.grade||i.yourGrade))),l.a.createElement(o.g,null),l.a.createElement(o.k.Row,{style:{paddingTop:"0"}},l.a.createElement(o.k.Column,{className:"pr-0",computer:"1"},l.a.createElement("img",{src:K.a,style:{marginTop:"5px"}})),l.a.createElement(o.k.Column,{style:{opacity:"0.6"},className:"pl-3",computer:"4"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.testStatsModal.sectionalMarksModal.sectionalDetails"},"Sectional Details"))),i&&i.sections&&i.sections.map(e=>l.a.createElement(o.k.Row,null,l.a.createElement(o.k.Column,{computer:"4"},l.a.createElement("span",null,e.sectionName)),l.a.createElement(o.k.Column,{computer:"8"}),l.a.createElement(o.k.Column,{computer:"4"},l.a.createElement("span",{style:{opacity:"0.6"},className:"float-right"},"\xa0/\xa0",e.maxMarks),l.a.createElement("span",{className:"float-right"},e.scoredMarks)))))),l.a.createElement(o.u.Actions,null,l.a.createElement(o.k,null,l.a.createElement(o.k.Row,null,l.a.createElement(o.k.Column,{computer:i.solutionUrl?"5":"7"}),l.a.createElement(o.k.Column,{computer:"3"},l.a.createElement(o.b,{onClick:()=>n(),primary:!0},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.testStatsModal.sectionalMarksModal.done"},"Done"))),!!i.solutionUrl&&l.a.createElement(o.k.Column,{computer:"5"},l.a.createElement(o.b,{onClick:()=>window.open(null===i||void 0===i?void 0:i.solutionUrl),primary:!0},c?t("routes.batches.batchTest.batchTestList.testStatsModal.sectionalMarksModal.viewSolution","View solution"):t("routes.batches.batchTest.batchTestList.testStatsModal.sectionalMarksModal.viewReport","View report")))))))})),U=a(49),F=a(10),V=a.n(F);var G=a(1401),Y=a.n(G),z=a(1139),W=a.n(z),X=a(1836),Q=a.n(X),J=a(1374),Z=a.n(J),q=a(1375),$=a.n(q),ee=a(1376),te=a.n(ee),ae=a(1837),se=a.n(ae),le=a(151),ne=a(4),oe=a(11),ie=a.n(oe),re=a(116),ce=a(2780);class de extends s.Component{constructor(e){super(e),this.getLimit=()=>{const{testDetails:e}=this.props;return this.props.isTutor?20:e.appearedStudents<19?3:10},this.getUrl=e=>{let t=Object(re.b)();const{tabId:a,offset:s,limit:l,batchIdArray:n}=this.state,{testDetails:o,testStats:i,isGlolbal:r}=this.props;let c=r?"/v2/course/content/leaderboard/"+i.batchTestId:"/v2/leaderboard/batches/tests/stats/"+o.testId,d=r?"&courseId="+window.location.href.split("/course")[1].split("/")[1].split("?")[0]:"";if(e){if(a===U.i.BATCHTESTRANK)return`/v2/reports?type=testReports&batchId=${t}&testBatchId=${o.batchTestId}`;if(a===U.i.INSTITUTERANK)return`/v2/reports?type=testReports&batchId=${t}&testBatchId=${o.batchTestId}&isInstituteRank=1`;c=a===U.i.GLOBALRANK?c+"?withDownloadLink=1"+d:c+"?"+(n.length?`batchIdArray=${n.toString()}&withDownloadLink=1`:"")}else a===U.i.BATCHTESTRANK?c+=`?batchTestId=${o.batchTestId}&offset=${s}&limit=${l}`:a===U.i.INSTITUTERANK?c+=`?offset=${s}&limit=${l}&${n.length?"batchIdArray="+n.toString():""}`:a===U.i.GLOBALRANK?c+=`?offset=${s}&limit=${this.props.limit||20}${d}`:c+="?offset=0&limit=20";return c},this.fetchStudents=e=>{const{testDetails:t}=this.props;this.props.makeApiCall(this.getUrl(),"GET",void 0,t=>{this.handleStudentSuccess(t.data,e)})},this.handleStudentSuccess=(e,t)=>{const{batches:a,students:s,offset:l,limit:n}=this.state;this.setState({students:t?[...s,...e.stats]:e.stats,batches:e.batches?e.batches:a,hasMore:e.stats&&e.stats.length>19,offset:l+n})},this.handleTabChange=e=>{const t=document.getElementById("scrollInitial-0");t&&t.scrollIntoView("start"),this.setState({tabId:e,offset:0,batchIdArray:[]},()=>this.fetchStudents())},this.setSelectedBatch=e=>{const{batchIdArray:t}=this.state;t.includes(e)?(t.splice(t.indexOf(e),1),this.setState({offset:0,batchIdArray:[...t]},()=>this.fetchStudents())):this.setState({offset:0,batchIdArray:[...t,e]},()=>this.fetchStudents())},this.handleClearAll=()=>{this.setState({offset:0,batchIdArray:[]},()=>this.fetchStudents())},this.getChackedStatus=e=>{const{batchIdArray:t}=this.state;return!!t.includes(e)},this.getLeaderBoardPanel=()=>{const{isTutor:e,testDetails:t,isGlolbal:a,t:s}=this.props,{tabId:n,batches:i,batchIdArray:r}=this.state;return l.a.createElement("div",{className:"notificationScreen-Panel"},l.a.createElement("div",null,!a&&l.a.createElement("span",{onClick:()=>this.handleTabChange(U.i.BATCHTESTRANK),className:V()({notificationTypePanel_Element:!0,selectedPanel:n===U.i.BATCHTESTRANK})},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.leaderBoard.batchTestRank"},"Batch Test Rank")),a&&l.a.createElement("span",{onClick:()=>this.handleTabChange(U.i.GLOBALRANK),className:V()({notificationTypePanel_Element:!0,selectedPanel:n===U.i.GLOBALRANK})},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.leaderBoard.globalRank"},"Global Rank")),e&&1===t.testType&&l.a.createElement("span",{onClick:()=>this.handleTabChange(U.i.INSTITUTERANK),className:V()({notificationTypePanel_Element:!0,selectedPanel:n===U.i.INSTITUTERANK})},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.leaderBoard.instituteRank"},"Institute Rank"))),l.a.createElement("div",null,e&&n===U.i.INSTITUTERANK&&l.a.createElement("div",{className:"StoreHome__top--courses"},l.a.createElement(o.h,{open:!1,simple:!0,iconPosition:"right",text:"Filter",icon:"filter",color:"grey",size:"mini"},l.a.createElement(o.h.Menu,{style:{width:"12rem"},className:"noHover"},i&&i.map((e,t)=>0===t?l.a.createElement(o.h.Item,{className:"cursorPointer",key:t},l.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},l.a.createElement("div",null,l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.leaderBoard.filters"},"Filters "),"(",r.length,")"),r.length>0&&l.a.createElement("div",{style:{color:"#009ae0"},onClick:()=>this.handleClearAll()},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.leaderBoard.clearAll"},"Clear All"))),l.a.createElement(o.g,null),l.a.createElement("div",{style:{color:"rgba(0,0,0,0.6)",fontSize:"12px"}},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.leaderBoard.batches"},"BATCHES")),l.a.createElement("div",{onClick:()=>this.setSelectedBatch(e.id),style:{display:"flex",marginTop:"18px"}},l.a.createElement("div",null,l.a.createElement(o.d,{checked:this.getChackedStatus(e.id)}
1)),l.a.createElement("div",{style:{marginLeft:"1rem"}},e.name))):l.a.createElement(o.h.Item,{className:"cursorPointer",key:t},l.a.createElement("div",{onClick:()=>this.setSelectedBatch(e.id),style:{display:"flex",marginTop:"18px"}},l.a.createElement("div",null,l.a.createElement(o.d,{checked:this.getChackedStatus(e.id)})),l.a.createElement("div",{style:{marginLeft:"1rem"}},e.name)))))))))},this.getLeaderBoardList=()=>{const{isTutor:e,t:t}=this.props,{students:a,hasMore:s}=this.state;let n;return n=(null===a||void 0===a?void 0:a.length)>3&&(null===a||void 0===a?void 0:a.length)<20?3:10,l.a.createElement("div",null,l.a.createElement(b.a,{next:()=>this.fetchStudents(!0),hasMore:!!e&&s,loader:l.a.createElement("div",{style:{marginTop:"1rem",textAlign:"center"}},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.leaderBoard.loading"},"Loading...")),height:"40vh",style:{overflowX:"hidden"}},a&&a.slice(0,n).map((e,t)=>l.a.createElement("div",{key:t,className:"listElement",id:"scrollInitial-"+t},l.a.createElement("div",{className:"listElement-image"},l.a.createElement(j.a,{size:40,user:{name:e.name,imageUrl:e.imageUrl||!1}})),l.a.createElement("div",null,l.a.createElement("div",{className:"listElement-name"},e.name),l.a.createElement("div",{className:"listElement-detail"},l.a.createElement("div",{className:"listElement-singleDetail"},l.a.createElement("div",null,l.a.createElement("img",{src:Y.a,width:"15",alt:"StarSVG"})),l.a.createElement("div",{className:"listElement-singleDetail-text"},e.scoredMarks)),e.duration&&l.a.createElement("div",{className:"listElement-singleDetail"},l.a.createElement("div",null,l.a.createElement("img",{src:W.a,width:"15",alt:"ClockSVG"})),l.a.createElement("div",{className:"listElement-singleDetail-text"},e.duration)),(e.accuracy||0==e.accuracy)&&l.a.createElement("div",{className:"listElement-singleDetail"},l.a.createElement("div",null,l.a.createElement("img",{src:Q.a,width:"15",alt:"AccuracySVG"})),l.a.createElement("div",{className:"listElement-singleDetail-text"},e.accuracy)))),l.a.createElement("div",{className:"listElement-rank"},this.getRank(e))))))},this.getRank=e=>{switch(e.rank){case 1:return l.a.createElement("img",{src:Z.a,alt:"FirstSVG"});case 2:return l.a.createElement("img",{src:$.a,alt:"SecondSVG"});case 3:return l.a.createElement("img",{src:te.a,alt:"ThirdSVG"});default:return e.rank?"#"+e.rank:""}},this.closeModal=()=>{this.setState({batchIdArray:[],offset:0,tabId:U.i.BATCHTESTRANK},()=>{this.props.showLeaderBoard()})},this.handlePrintList=()=>{const{persistedData:e}=this.props,t=this.getUrl(!0);ie()({url:`${ne.B.API_BASE_URL}${t}`,method:"GET",headers:{"x-access-token":e&&e.token}}).then(e=>{p.toastr.success("Success",e.data.message)})},this.handlePrintListCourse=()=>{const{persistedData:e}=this.props,t=this.getUrl(!0);ie()({url:`${ne.B.API_BASE_URL}${t}`,method:"GET",headers:{"x-access-token":e&&e.token},responseType:"blob"}).then(e=>{this.getUrl(!0).includes("/v2/reports?type=testReports&batchId")&&p.toastr.success("Success",e.statusText);const t=window.URL.createObjectURL(new Blob([e.data])),a=document.createElement("a");a.href=t,a.setAttribute("download","file.csv"),document.body.appendChild(a),a.click(),document.body.removeChild(a)})},this.state={tabId:this.props.isGlolbal?U.i.GLOBALRANK:U.i.BATCHTESTRANK,batches:[],batchIdArray:[],offset:0}}componentDidMount(){this.setState({limit:this.getLimit()},()=>this.fetchStudents())}componentWillReceiveProps(e){!this.props.leaderBoardModal&&e.leaderBoard&&this.fetchStudents()}render(){const{leaderBoardModal:e,isGlolbal:t,testDetails:a,persistedData:s,t:n}=this.props;return l.a.createElement(o.u,{size:"tiny",open:e},l.a.createElement(o.u.Header,null,l.a.createElement("div",null,l.a.createElement("div",null,l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.leaderBoard.leaderboard"},"Leaderboard")),l.a.createElement("div",null))),l.a.createElement(o.u.Content,{className:"p-0"},this.getLeaderBoardPanel(),this.getLeaderBoardList()),l.a.createElement(o.u.Actions,null,l.a.createElement("div",{className:"modalAction"},s&&s.user&&3===s.user.type&&1===s.premiumStatus&&3!==a.testType?l.a.createElement("div",{onClick:()=>
1this.handlePrintList(),className:"modalAction-print cursorPointer"},l.a.createElement("div",null,l.a.createElement("img",{src:se.a,alt:"PrintSVG"})),l.a.createElement("div",{className:"ml-2"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.leaderBoard.exportList"},"Export list"))):l.a.createElement("div",null),l.a.createElement("div",null,l.a.createElement("button",{onClick:()=>this.closeModal(),className:"notificationScreen-CreateButton"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.leaderBoard.button.done"},"Done"))))))}}var ue=Object(n.connect)((function(e){return{persistedData:e.persistedData}}),{makeApiCall:le.b})(Object(ce.a)()(de)),me=a(1393),he=a(2232),ve=a.n(he),pe=a(1160),Te=a.n(pe),be=(a(3256),a(25)),Ee=a.n(be),ge=a(141),fe=a(3257),Se=a.n(fe),Ce=a(2645),ye=a.n(Ce),Me=a(3258),ke=a.n(Me),Ae=a(3259),we=a.n(Ae),Ie=a(1384),Le=a(2646);function xe(e){var t,a,n,i,r,c;let{canWinCard:d,challengesCard:u,challengeFriendCTA:m,batchCode:h,batchId:v,singleTestData:p}=e;const{t:T}=Object(C.a)();let{card:b}=u||{};const[E,g]=Object(s.useState)(!1);function f(){g(!E)}return l.a.createElement(l.a.Fragment,null,l.a.createElement(o.z,{className:"mt-4",style:{margin:"0 4rem",backgroundColor:0!==p.totalChallenges&&null!==p.totalChallenges||null===(t=Ee()(p.endTime))||void 0===t||!t.isAfter(Ee()())?"white":"#fcfcfc"}},0!==p.totalChallenges&&l.a.createElement(o.q,{color:"grey",ribbon:!0},T("routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.onlineTestStats.challengesLabel","Challenges")),0===p.totalChallenges||null===p.totalChallenges&&(null===(a=Ee()(p.endTime))||void 0===a?void 0:a.isAfter(Ee()()))&&l.a.createElement(o.k,{columns:6,className:we.a.noChallengeContainer},l.a.createElement("div",{className:we.a.noChallengeCard},l.a.createElement("img",{src:ke.a,className:we.a.swordIcon,alt:"sword icon"}),l.a.createElement("div",{style:{color:null===b||void 0===b?void 0:b.headingColor}},null===b||void 0===b?void 0:b.heading))),p.totalChallenges>0&&l.a.createElement(o.k,{columns:6,style:{justifyContent:"center"}},l.a.createElement("div",{className:we.a.cardContent},l.a.createElement("div",{className:we.a.cardInfo,style:{marginRight:"90px"}},l.a.createElement("img",{src:ye.a,className:we.a.cardInfoIcon,alt:"point icon"}),l.a.createElement("div",{className:we.a.infoGroup},l.a.createElement("div",{className:we.a.cardInfoLabel},null===b||void 0===b||null===(n=b.info)||void 0===n?void 0:n.heading," "),l.a.createElement("div",{className:we.a.cardInfoValue},(null===b||void 0===b||null===(i=b.info)||void 0===i?void 0:i.subHeading)||"-"))),l.a.createElement("div",{className:we.a.cardInfo},l.a.createElement("img",{src:Se.a,className:we.a.cardInfoIcon,alt:"rank icon"}),l.a.createElement("div",{className:we.a.infoGroup},l.a.createElement("div",{className:we.a.cardInfoLabel},null===b||void 0===b||null===(r=b.info2)||void 0===r?void 0:r.heading," "),l.a.createElement("div",{className:we.a.cardInfoValue},(null===b||void 0===b||null===(c=b.info2)||void 0===c?void 0:c.subHeading)||"-")))))),d?l.a.createElement("div",{className:we.a.infoContainerYellow},l.a.createElement("p",{style:{color:null===d||void 0===d?void 0:d.textColor,display:"flex",alignItems:"center"}},l.a.createElement("img",{src:ye.a,alt:"point icon",height:"16px",width:"16px",style:{marginRight:"5px"}}),null===d||void 0===d?void 0:d.text," ",(null===d||void 0===d?void 0:d.how)&&l.a.createElement("a",{href:null,onClick:f,className:we.a.pointer,style:{color:"#009AE0"}},"\xa0",T("routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.onlineTestStats.howw","How?"))),m&&l.a.createElement(Ie.a,{to:`/batches/${v}/${h}/tests/challenge/${p.batchTestId}`},l.a.createElement("a",{href:null,className:we.a.howLink}," ",null===m||void 0===m?void 0:m.text," "))):"completed"==p.testCategory?null:l.a.createElement("div",{className:we.a.infoContainerYellow},l.a.createElement("p",{style:{display:"flex",alignItems:"center"}},l.a.createElement("img",{src:ye.a,alt:"point icon",height:"16px",width:"16px",style:{marginRight:"5px"}}),T("routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.onlineTestStats.yayYouChallenged","Yay! You've challenged everyone"))),E&&l.a.createElement(Le.a,{open:E,onClose:f,canWinCard:d}))}var Ne=a(132),_e=a(1372),Be=a(1542),Oe=a.n(Be),Re=a(1543),De=a.n(Re);a(3261);function je(e){let{testStats:t,label:a,handleViewSection:n,handleViewLeaderBoard:i,testDetails:r,selectedTestDetails:c,isLatest:d,projectedRank:u,projectedRankIcon:m,selectedTestIndex:v,handleViewDptSummary:p}=e;const{t:T}=Object(C.a)(),[b,f]=Object(s.useState)(!1),S=t&&(0===(null===t||void 0===t?void 0:t.scoredMarks)||(null===t||void 0===t?void 0:t.scoredMarks));Object(s.useEffect)(()=>(window.addEventListener("popstate",y),window.addEventListener("message",M),()=>{window.removeEventListener("popstate",y),window.removeEventListener("message",M)}),[]);const y=()=>{k()},M=e=>{"goToTest"===e.data.source&&(console.log("fadfaffaf","33"),k())},k=()=>{f(!1),window.location.hash=""};return l.a.createElement(o.z,{className:V()({"mt-4":!0}),style:{margin:"0 4rem"}},1===(null===t||void 0===t?void 0:t.isResultVisible)&&a&&l.a.createElement(o.q,{color:"grey",ribbon:!0},a),l.a.createElement(o.k,null,l.a.createElement(o.k.Row,{columns:Pe(c,r)||3===(null===c||void 0===c?void 0:c.testType)?2:3},l.a.createElement(o.k.Column,{className:"mt-3",textAlign:"center"},l.a.createElement(Ne.a,{fontSize:"0.9em"}," ",T("routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.yourScore","Your Score")," "),S?l.a.createElement(_e.a,{scaleFirst:.8,first:null===t||void 0===t?void 0:t.scoredMarks,second:S&&(null===t||void 0===t?void 0:t.maxMarks)}
1):l.a.createElement("p",{className:"text-red"},T("routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.onlineTestStats.studentStatsOverview.absent","Absent"))),t&&v<0&&null!==(null===t||void 0===t?void 0:t.maxScoredMarks)&&!d&&2!==Pe(c,r)&&4!=(null===c||void 0===c?void 0:c.onlineTestType)&&l.a.createElement(o.k.Column,{className:"mt-3",textAlign:"center"},l.a.createElement(Ne.a,{fontSize:"0.9em"}," ",l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.onlineTestStats.studentStatsOverview.highestScore"},"Highest Score")," "),l.a.createElement(_e.a,{scaleFirst:.8,first:t&&(null===t||void 0===t?void 0:t.maxScoredMarks)||0,second:t&&(null===t||void 0===t?void 0:t.maxMarks)})),t&&(null===t||void 0===t?void 0:t.timeTaken)&&(1===(null===c||void 0===c?void 0:c.testType)||3===(null===c||void 0===c?void 0:c.testType))&&l.a.createElement(o.k.Column,{className:"mt-3",textAlign:"center"},l.a.createElement(Ne.a,{fontSize:"0.9em"}," ",l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.onlineTestStats.studentStatsOverview.timeTaken"},"Time taken")," "),l.a.createElement(_e.a,{scaleFirst:.8,first:t&&(null===t||void 0===t?void 0:t.timeTaken)||0})),t&&(null===t||void 0===t?void 0:t.avgTimeTaken)&&1===(null===c||void 0===c?void 0:c.testType)&&!d&&2!==Pe(c,r)&&4!=(null===c||void 0===c?void 0:c.onlineTestType)&&l.a.createElement(o.k.Column,{className:"mt-3",textAlign:"center"},l.a.createElement(Ne.a,{fontSize:"0.9em"}," ",l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.onlineTestStats.studentStatsOverview.avgTimeTaken"}," Avg. time taken")," "),l.a.createElement(_e.a,{scaleFirst:.8,first:t&&(null===t||void 0===t?void 0:t.avgTimeTaken)||0})),!d&&(null===t||void 0===t?void 0:t.rank)&&2!==Pe(c,r)&&l.a.createElement(o.k.Column,{className:"mt-3",textAlign:"center"},l.a.createElement(Ne.a,{fontSize:"0.9em"}," ",4!=(null===c||void 0===c?void 0:c.onlineTestType)?"Rank":"Your rank"," "),l.a.createElement(_e.a,{scaleFirst:.8,first:t&&(null===t||void 0===t?void 0:t.rank)||0})),(null===t||void 0===t?void 0:t.yourGrade)&&2!==Pe(c,r)&&4!=(null===c||void 0===c?void 0:c.onlineTestType)&&l.a.createElement(o.k.Column,{className:"mt-3",textAlign:"center"},l.a.createElement(Ne.a,{fontSize:"0.9em"}," ","Your Grade"," "),l.a.createElement(_e.a,{scaleFirst:.8,first:S?null===t||void 0===t?void 0:t.yourGrade:"-"})),d&&(null===t||void 0===t?void 0:t.rank)&&Pe(c,r)&&4!=(null===c||void 0===c?void 0:c.onlineTestType)&&l.a.createElement(o.k.Column,{className:"mt-3",textAlign:"center"},l.a.createElement(Ne.a,{fontSize:"0.9em"}," ",l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.onlineTestStats.studentStatsOverview.projectedRank"},"Projected Rank")," "),l.a.createElement("div",{className:"sectionModal-action"},l.a.createElement("div",{className:"mr-2"},l.a.createElement(_e.a,{scaleFirst:.8,first:null===t||void 0===t?void 0:t.rank})),l.a.createElement("div",{className:"mr-2 projectedRank-text"},u),l.a.createElement("div",{className:"mr-2 projectedRank-icon"},l.a.createElement("img",{src:m?Oe.a:De.a,alt:"ProjectedScore"}))))),l.a.createElement(o.k.Row,{centered:!0},l.a.createElement(o.k.Column,{computer:"5"},4!==(null===r||void 0===r?void 0:r.onlineTestType)||null!==t&&void 0!==t&&t.solutionUrl?l.a.createElement("button",{onClick:()=>{4===(null===r||void 0===r?void 0:r.onlineTestType)?(window.location.hash="test",f(!0)):3===c.testType?p(t.solutionUrl):n(t)},className:3===(null===c||void 0===c?void 0:c.testType)?"panelFooter-View-Summary":"panelFooter-cancel"},4===(null===r||void 0===r?void 0:r.onlineTestType)?"View Report":3===(null===c||void 0===c?void 0:c.testType)?T("routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.onlineTestStats.studentStatsOverview.viewSummary","View Summary"):T("routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.onlineTestStats.studentStatsOverview.viewSectionalDetails","View Sectional Details")):null),2===(null===c||void 0===c?void 0:c.testType)&&1===(null===c||void 0===c?void 0:c.isResultVisible)&&(null===r||void 0===r?void 0:r.appearedStudents)>3&&4===!(null!==r&&void 0!==r&&r.onlineTestType)&&l.a.createElement(o.k.Column,{computer:"5"},l.a.createElement("button",{onClick:()=>{Object(E.a)(g.jd),i(t)},className:"panelFooter-send"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.onlineTestStats.studentStatsOverview.viewLeaderboard"},"View Leaderboard"))))),(A=t.solutionUrl,localStorage.setItem("testIframeUrl",A),localStorage.setItem("testIframeStatus",!0),A?l.a.createElement(o.u,{className:"testIframe",open:b,
1style:{margin:"0px !important",width:"100%",height:"100vh",padding:"0"}},l.a.createElement(o.u.Content,{style:{display:"flex","flex-direction":"row-reverse",width:"100%",height:"100vh",padding:"0"}},l.a.createElement("iframe",{src:A,frameBorder:"0",allowFullScreen:!0,height:"100vh",width:"100%",className:"testIframe--test"}))):void 0));var A}function Pe(e,t){return null!==t&&void 0!==t&&t.resultLabel&&1===(null===e||void 0===e?void 0:e.testType)?2:2===(null===e||void 0===e?void 0:e.testType)&&1===(null===t||void 0===t?void 0:t.isResultVisible)?4:3}var Ke=a(83),He=a(68);var Ue=Object(n.connect)(e=>{var t,a,s,l,n,o,i,r,c,d;return{batchId:null===e||void 0===e||null===(t=e.BatchReducer)||void 0===t||null===(a=t.batchDetails)||void 0===a?void 0:a.batchId,batchCode:null===e||void 0===e||null===(s=e.BatchReducer)||void 0===s||null===(l=s.batchDetails)||void 0===l?void 0:l.batchCode,testStats:null===e||void 0===e||null===(n=e.BatchReducer)||void 0===n||null===(o=n.batchTests)||void 0===o?void 0:o.testStats,dateTimeStamp:null===e||void 0===e||null===(i=e.persistedData)||void 0===i||null===(r=i.organization)||void 0===r?void 0:r.dateTimeStamp,timeFormat:null===e||void 0===e||null===(c=e.persistedData)||void 0===c||null===(d=c.organization)||void 0===d?void 0:d.timeFormat}})((function(e){var t;const{testStats:a,singleTestData:n,showSectionalDetails:o,dateTimeStamp:i,timeFormat:r}=e,{batchId:c,batchCode:d}=e,{t:u}=Object(C.a)();let m;const v=l.a.createRef(),[p,T]=Object(s.useState)(!1),[b,E]=Object(s.useState)(0),[g,f]=Object(s.useState)(!1),[S,y]=Object(s.useState)("");Object(s.useEffect)(()=>{var e;if(m=document.createElement("div"),document.body.append(m),window.addEventListener("message",M),null!==a&&void 0!==a&&null!==(e=a.lastAttempt)&&void 0!==e&&e.rank){var t,s;let e=null!==a&&void 0!==a&&a.firstAttempt?null===a||void 0===a?void 0:a.firstAttempt:a;E(Math.abs((null===e||void 0===e?void 0:e.rank)-(null===a||void 0===a||null===(t=a.lastAttempt)||void 0===t?void 0:t.rank))),f((null===e||void 0===e?void 0:e.rank)>=(null===a||void 0===a||null===(s=a.lastAttempt)||void 0===s?void 0:s.rank))}return()=>{window.removeEventListener("message",M),m.remove()}},[]);const M=e=>{"TEST_LISTING_SCREEN"==e.data&&(y(""),document.body.style.overflowY="scroll")},k=e=>{window.open(e)},A=()=>{Object(Ke.b)(He.X),T(!p)};return l.a.createElement("div",{className:"OnlineTestStat"},S&&Object(ge.createPortal)(l.a.createElement("iframe",{src:S,frameBorder:"0",allowFullScreen:!0,width:"100%",height:"100vh",style:{overflow:"auto",position:"fixed",zIndex:"1000",top:"0px",height:"100vh",width:"100vw"},ref:v}),m),((null===a||void 0===a?void 0:a.canWinCard)||(null===a||void 0===a?void 0:a.challengeFriendCTA)||(null===a||void 0===a?void 0:a.challengesCard))&&l.a.createElement(xe,{canWinCard:null===a||void 0===a?void 0:a.canWinCard,batchId:null===e||void 0===e?void 0:e.batchId,batchCode:null===e||void 0===e?void 0:e.batchCode,challengeFriendCTA:null===a||void 0===a?void 0:a.challengeFriendCTA,challengesCard:null===a||void 0===a?void 0:a.challengesCard,singleTestData:n}),e.noStat?null:l.a.createElement(l.a.Fragment,null,l.a.createElement(je,{handleViewDptSummary:k,testStats:null!==a&&void 0!==a&&a.firstAttempt?null===a||void 0===a?void 0:a.firstAttempt:a,handleViewSection:o,label:(null===a||void 0===a?void 0:a.lastAttempt)&&u("routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.onlineTestStats.firstAttempt","First Attempt")||"",handleViewLeaderBoard:A,testDetails:n,selectedTestDetails:n,isLatest:!1}),(null===a||void 0===a?void 0:a.lastAttempt)&&l.a.createElement(je,{handleViewDptSummary:k,testStats:a,handleViewSection:o,label:u("routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.onlineTestStats.latestAttempt","Latest Attempt"),handleViewLeaderBoard:A,testDetails:n,selectedTestDetails:n,isLatest:!0,projectedRank:b,projectedRankIcon:g}),(null===a||void 0===a?void 0:a.resultLabel)&&l.a.createElement("div",{className:"rankAnnouncement-text"},null===a||void 0===a?void 0:a.resultLabel),2===(null===a||void 0===a||null===(t=a.testDetails)||void 0===t?void 0:t.testType)&&(null===a||void 0===a?void 0:a.appearedStudents)>3&&p&&l.a.createElement(ue,{testStats:a,testDetails:null===a||void 0===a?void 0:a.testDetails,leaderBoardModal:p,isTutor:!1,showLeaderBoard:A}),2!=(null===n||void 0===n?void 0:n.testType)&&(null===n||void 0===n?void 0:n.resultVisibilityTime)&&Ee()(null===n||void 0===n?void 0:n.resultVisibilityTime).isAfter(Ee()())&&l.a.createElement("p",{className:"batch_test_sm_text",style:{color:"#52B062",paddingLeft:"46px",paddingTop:"16px"}},"* ",l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.singleTest.onlineTestStats.resultsWillBeDeclaredOn"},"Result will be declared on")," ",Ee()(null===n||void 0===n?void 0:n.resultVisibilityTime).format(`${i?i.toUpperCase():"MMMM Do YYYY"}, ${r||"h:mm a "}`),".")))})),Fe=(a(220),a(3262)),Ve=a.n(Fe);var Ge=Object(n.connect)(e=>{var t,a,s,l,n,o,i,r,c,d,u,m,h,v,p,T,b,E;return{userType:null===e||void 0===e||null===(t=e.persistedData)||void 0===t||null===(a=t.user)||void 0===a?void 0:a.type,batchId:null===e||void 0===e||null===(s=e.BatchReducer)||void 0===s||null===(l=s.batchDetails)||void 0===l?void 0:l.batchId,batchCode:null===e||void 0===e||null===(n=e.BatchReducer)||void 0===n||null===(o=n.batchDetails)||void 0===o?void 0:o.batchCode,isArchive:null===e||void 0===e||null===(i=e.BatchReducer)||void 0===i||null===(r=i.batchDetails)||void 0===r?void 0:r.isArchive,isLoadingStats:null===e||void 0===e||null===(c=e.BatchReducer)||void 0===c||null===(d=c.batchTests)||void 0===d?void 0:d.isLoadingStats,isLoading:null===e||void 0===e||null===(u=e.BatchReducer)||void 0===u||null===(m=u.batchTests)||void 0===m?void 0:m.isLoading,testStats:null===e||void 0===e||null===(h=e.BatchReducer)||void 0===h||null===(v=h.batchTests)||void 0===v?void 0:v.testStats,dateTimeStamp:null===e||void 0===e||null===(p=e.persistedData)||void 0===p||null===(T=p.organization)||void 0===T?void 0:T.dateTimeStamp,timeFormat:null===e||void 0===e||null===(b=e.persistedData)||void 0===b||null===(E=b.organization)||void 0===E?void 0:E.timeFormat}},e=>({fetchTestStats:(t,a)=>e(L.f(t,a)),deleteTest:t=>e(c.a(t))}))(Object(d.a)(Object(I.a)((function(e){var t,a,n,i,r,c;const{t:d}=Object(C.a)(),{testData:u,testStats:m,selectedTestId:v,setSelectedTestId:p,isStudentOrParent:T,userType:b,permissions:f,dateTimeStamp:S,timeFormat:y}=e,M=["",d("routes.batches.batchTest.batchTestList.singleTest.onlineBadge","ONLINE"),d("routes.batches.batchTest.batchTestList.singleTest.offlineBadge","CLASS TEST"),d("routes.batches.batchTest.batchTestList.singleTest.practiceBadge","PRACTICE TEST")],k=(null===u||void 0===u?void 0:u.batchTestId)===v,A=x.f(u,S,y),w=1===b,[I,L]=(x.e(u),Object(s.useState)(null)),[N,_]=Object(s.useState)(!1),[B,O]=Object(s.useState)(),j=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];L(e||m),_(!0)},P=Object(s.useMemo)(()=>
1{if(!m.challengesCard&&!m.canWinCard&&!m.challengeFriendCTA&&!m.firstAttempt&&!m.lastAttempt&&!m.resultTime){let e=2===u.testType&&m.shareabilityData;return b===U.t.parent?e?d("routes.batches.batchTest.batchTestList.singleTest.yourwardabsent","Your ward was absent"):"":e?d("routes.batches.batchTest.batchTestList.singleTest.Youwereabsent","You were absent in this test"):""}},[b,u,m]);return l.a.createElement("div",{className:"SingleTest"},l.a.createElement(o.a,null,l.a.createElement(o.a.Title,{active:k,style:{margin:"0",padding:"0",display:"flex",justifyContent:"space-between"}},l.a.createElement("div",{onClick:()=>e.onSingleTestClick(u),style:{width:"100%",cursor:"pointer"}},l.a.createElement("div",{className:"SingleTest__Heading"},l.a.createElement("h4",{className:"SingleTest__Heading--testname"},null===u||void 0===u?void 0:u.testName),l.a.createElement(me.a,{color:["","green","grey","orange"][null===u||void 0===u?void 0:u.testType],size:"tiny"},M[null===u||void 0===u?void 0:u.testType]),null!==u&&void 0!==u&&u.totalChallenges?l.a.createElement("div",{className:"SingleTest__TotalChallenges"},l.a.createElement(o.o,{src:ve.a,inline:!0}),"\xa0",l.a.createElement("span",null,`${null===u||void 0===u?void 0:u.totalChallenges} ${d("routes.batches.batchTest.batchTestList.singleTest.challenges","challenges")}`)):null),l.a.createElement("p",{className:"SingleTest__CreatedBy"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.singleTest.createdBy"}," Created by")," \xa0",null===u||void 0===u?void 0:u.assignedByName),l.a.createElement("p",{className:"SingleTest__Time"},l.a.createElement(o.n,{name:"clock"}),A)),l.a.createElement("div",{className:"SingleTest__Button"}),null!==f&&void 0!==f&&f.testPermission?l.a.createElement("div",{className:"SingleTest__Dropdown"},l.a.createElement(o.h,{item:!0,inline:!0,icon:"ellipsis vertical",className:"left-dropdown",disabled:e.isArchive},l.a.createElement(o.h.Menu,null,l.a.createElement(o.h.Item,{onClick:()=>("completed"==(null===u||void 0===u?void 0:u.testCategory)&&"practice"==(null===u||void 0===u?void 0:u.type)?Object(Ke.b)(He.J):"practice"==(null===u||void 0===u?void 0:u.type)&&Object(Ke.b)(He.M),e.fetchTestStats({testId:null===u||void 0===u?void 0:u.batchTestId,batchId:e.batchId,batchCode:e.batchCode,isEdit:1,history:e.history},"practice"==(null===u||void 0===u?void 0:u.type)?{testCategory:null===u||void 0===u?void 0:u.testCategory}:null),void e.history.push(`/batches/${e.batchId}/${e.batchCode}/tests/edit`))},l.a.createElement("img",{src:Te.a,alt:"SVGEdit",className:"mt-0",style:{width:"20px"}}),l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.singleTest.edit"},"Edit")),l.a.createElement(D.a,{onOpen:()=>{3==u.testType&&Object(E.a)(g.rc)},headerContent:d("routes.batches.batchTest.batchTestList.singleTest.deleteAreYouSure","Are you sure about deleting this test?"),modalContent:l.a.createElement("p",null,l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.singleTest.proceedOnlyIfSure"},"Proceed only if you are very sure")),cancelAction:()=>{u.testType&&Object(E.a)(g.sc)},deleteAction:()=>{e.deleteTest({batchCode:e.batchCode,testId:u.batchTestId})},isDeleteTest:!0,dropdownText:d("routes.batches.batchTest.batchTestList.singleTest.removeTest","Remove Test")})))):!w||2!==u.onlineTestType&&4!==u.onlineTestType||u.testCategory===x.a.COMPLETED||0===u.numberOfAttempts?l.a.createElement(l.a.Fragment,null):l.a.createElement(R,{testData:u})),l.a.createElement(o.a.Content,{active:k},null!==e&&void 0!==e&&e.isLoadingStats?l.a.createElement(l.a.Fragment,null,l.a.createElement(o.k,{verticalAlign:"middle",style:{height:"7vh",width:"100%"}},l.a.createElement(o.k.Column,{stretched:!0,width:16},l.a.createElement(o.r,{active:!0,inline:"centered"})))):l.a.createElement(l.a.Fragment,null,(null===e||void 0===e||null===(t=e.testStats)||void 0===t?void 0:t.noStatsAvailable)&&l.a.createElement("div",{className:"SingleTest__NoStats"}," ",l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.singleTest.noStatsAvailable"},"No Stats Available")," "),e.isStudentOrParent&&"offline"===(null===u||void 0===u?void 0:u.type)?l.a.createElement(o.k,{style:{border:"2px s
1olid #e5e5e5",borderRadius:"8px",margin:"20px auto 0 auto",width:"60%"}},l.a.createElement(o.k.Row,{columns:2},l.a.createElement(o.k.Column,null,l.a.createElement("div",{className:"OfflineStat__Label"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.singleTest.yourScore"},"Your Score")),l.a.createElement("div",{className:"OfflineStat__Score"},null!==m&&void 0!==m&&m.firstAttempt&&(null===m||void 0===m||null===(a=m.firstAttempt)||void 0===a?void 0:a.scoredMarks)>0?l.a.createElement(l.a.Fragment,null,null===m||void 0===m||null===(n=m.firstAttempt)||void 0===n?void 0:n.scoredMarks,l.a.createElement("span",{className:"OfflineStat__Score--small"},"/",null===m||void 0===m||null===(i=m.firstAttempt)||void 0===i?void 0:i.maxMarks)):l.a.createElement("div",{className:"OfflineStat__Score"},"-")),l.a.createElement("div",{className:"OfflineStat__Label",style:{marginTop:"20px"}},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.singleTest.yourGrade"},"Your Grade")),l.a.createElement("div",{className:"OfflineStat__Score"},null!==m&&void 0!==m&&null!==(r=m.firstAttempt)&&void 0!==r&&r.yourGrade?m.firstAttempt.yourGrade:"-")),l.a.createElement(o.k.Column,null,l.a.createElement("div",{className:"OfflineStat__Label"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.singleTest.yourRank"},"Your Rank")),l.a.createElement("div",{className:"OfflineStat__Score"},null!==m&&void 0!==m&&m.rank?e.testStats.rank:"-"))),l.a.createElement(o.k.Row,null,null!==m&&void 0!==m&&m.isResultVisible?l.a.createElement(l.a.Fragment,null,l.a.createElement(o.b,{disabled:!(null!==m&&void 0!==m&&m.firstAttempt),basic:!0,color:"blue",style:{width:"140px",height:"80px",lineHeight:"150%",margin:"0 auto"},onClick:()=>j(null===m||void 0===m?void 0:m.firstAttempt)},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.singleTest.viewSectionalDetails"},"View Sectional Details")),l.a.createElement(o.b,{disabled:!(null!==m&&void 0!==m&&m.firstAttempt),primary:!0,color:"blue",style:{width:"140px",height:"80px",lineHeight:"150%",margin:"0 auto"},onClick:()=>{"online"==(null===u||void 0===u?void 0:u.type)&&Object(Ke.b)(He.X),O(!0)}},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.singleTest.button.viewLeaderboard"},"View Leaderboard"))):null)):null,e.isStudentOrParent&&2===u.testType&&!m.shareabilityData&&l.a.createElement("div",{style:{display:"flex",justifyContent:"center",marginTop:"16px"}},l.a.createElement("p",{style:{textAlign:"center",padding:"4px 8px",borderRadius:"2px",color:"#F65160",background:"#FFECEE"}},"marks not uploaded yet")),I?l.a.createElement(H,{sectionalMarksModalData:I,setSectionalMarksModalData:L,showSectionalMarksModal:N,closeModal:()=>_(!1)}):null,B?l.a.createElement(ue,{testStats:m,testDetails:m,currenTestDetails:m,leaderBoardModal:B,isTutor:!0,showLeaderBoard:()=>O(!B)}):null,e.isStudentOrParent&&"offline"!==(null===u||void 0===u?void 0:u.type)?l.a.createElement(Ue,{singleTestData:u,showSectionalDetails:j,noStat:null===e||void 0===e||null===(c=e.testStats)||void 0===c?void 0:c.noStatsAvailable}):null))),P&&l.a.createElement("div",{className:Ve.a.statsBelowCont},l.a.createElement("div",{className:Ve.a.msgUnderStats},P)))})))),Ye=a(2047),ze=a.n(Ye),We=a(3263),Xe=a.n(We);a(3264);var Qe=function(e){const{t:t}=Object(C.a)(),{showCreateSectionsModal:a,closeModal:n,sections:i,setSections:r,maxMarks:c,setMaxMarks:d}=e;return Object(s.useEffect)(()=>{!(null!==i&&void 0!==i&&i.length)>0&&r([{id:1,sectionName:"",maxMarks:0},{id:2,sectionName:"",maxMarks:0}])}),l.a.createElement(o.u,{size:"tiny",open:a},l.a.createElement(o.u.Header,{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.classTestInfoModal.createSectionsModal.createSections"},"Create Sections"),l.a.createElement("img",{src:S.a,alt:"close",height:"20px",width:"20px",onClick:()=>n(),style:{cursor:"pointer"}})),l.a.createElement(o.u.Content,null,l.a.createElement("div",{className:"CreateSectionsModal"},l.a.createElement("div",{className:"CreateSectionsModal__MaxMarks"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.classTestInfoModal.createSectionsModal.maximumMarks"},"Maximum Marks"),l.a.createElement(o.p,{disabled:!0,value:c,style:{width:"70px",marginLeft:"20px"}})),i.map((e,a)=>l.a.createElement("div",{className:"CreateSectionsModal__Section",key:a},l.a.createElement(o.p,{className:"CreateSectionsModal__Section--sectionName",placeholder:t("routes.batches.batchTest.batchTestList.classTestEnterMarksModal.classTestInfoModal.createSectionsModal.placeholder.section","Section ")+(a+1)+t("routes.batches.batchTest.batchTestList.classTestEnterMarksModal.classTestInfoModal.createSectionsModal.placeholder.clickHereToEdit",", click here to edit"),value:e.sectionName,onChange:e=>((e,t)=>{const a=i;e<a.length&&(a[e].sectionName=t),r([...a])})(a,e.target.value)}),l.a.createElement(o.p,{type:"number",className:"CreateSectionsModal__Section--sectionMarks",value:e.maxMarks,onChange:e=>((e,t)=>{const a=i;e<a.length&&(a[e].maxMarks=t),r([...a])})(a,e.target.value)}),l.a.createElement("img",{src:ze.a,alt:"delete",height:"22px",width:"19px",onClick:()=>(e=>{const a=i,s=null===i||void 0===i?void 0:i.length;if(2===s)return p.toastr.error("Error",t("routes.batches.batchTest.batchTestList.classTestEnterMarksModal.classTestInfoModal.createSectionsModal.toastr.min2sectionsAreRequired","Minimum 2 sections are required"));e<s&&a.splice(e,1),r([...a])})(a),style:{cursor:"pointer"}}))),l.a.createElement("div",{className:"CreateSectionsModal__AddSectionButton",onClick:()=>(()=>{const e=i;e.push({id:i.length+1,sectionName:"",sectionMarks:0}),r([...e])})()},l.a.createElement("img",{src:Xe.a,alt:"add",height:"15px",width:"15px",style:{marginRight:"10px"}}),l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.classTestInfoModal.createSectionsModal.addNewSection"},"Add new section")))),l.a.createElement(o.u.Actions,{style:{display:"flex",justifyContent:"center"}},l.a.createElement("div",{className:"CreateSectionsModal__DisableSectionsButton",onClick:()=>{r([]),n()}},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.classTestInfoModal.createSectionsModal.disableSections"},"Disable Sections")),l.a.createElement("div",{className:"CreateSectionsModal__Done",onClick:()=>{n()}},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.classTestInfoModal.createSectionsModal.done"},"Done"))))}
1,Je=a(1371),Ze=a.n(Je);a(3265);var qe=Object(n.connect)(e=>{var t,a;return{testStats:null===e||void 0===e||null===(t=e.BatchReducer)||void 0===t||null===(a=t.batchTests)||void 0===a?void 0:a.testStats}},e=>({updateClassTestDetails:t=>e(c.n(t))}))((function(e){const{t:t}=Object(C.a)(),{showTestInfoModal:a,closeModal:n,setShowEnterMarksModal:i,testStats:r}=e,{batchTestId:c}=null===r||void 0===r?void 0:r.testDetails,[d,u]=Object(s.useState)(0),[m,v]=Object(s.useState)([]),[T,b]=Object(s.useState)(!1);return Object(s.useEffect)(()=>{var e;null!==r&&void 0!==r&&r.maxMarks&&u(r.maxMarks),(null===r||void 0===r||null===(e=r.sections)||void 0===e?void 0:e.length)>0&&v([...r.sections])},[]),Object(s.useEffect)(()=>{if(m.length>0){let e=x.g(m);u(e)}},[m]),l.a.createElement(l.a.Fragment,null,l.a.createElement(o.u,{open:a,size:"large"},l.a.createElement(o.u.Header,{style:{display:"flex",justifyContent:"space-between"}},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.classTestInfoModal.testStats"},"Test Stats"),l.a.createElement("img",{src:S.a,alt:"close",onClick:()=>n(),height:"20px",width:"20px",style:{cursor:"pointer"}})),l.a.createElement(o.u.Content,null,l.a.createElement("div",{className:"ClassTestInfoModal__Heading"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.classTestInfoModal.testDetails"},"TEST DETAILS")),l.a.createElement("div",{className:"ClassTestInfoModal__Details"},l.a.createElement("div",{className:"ClassTestInfoModal__Details--Section"},l.a.createElement("div",{className:"ClassTestInfoModal__Details--Section--label"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.classTestInfoModal.maximumMarks"},"Maximum Marks"),": "),l.a.createElement("div",null,l.a.createElement(o.p,{disabled:(null===m||void 0===m?void 0:m.length)>0,placeholder:t("routes.batches.batchTest.batchTestList.classTestEnterMarksModal.classTestInfoModal.placeholder.enterMaximumMarks","Enter maximum marks"),size:"small",type:"number",value:d,onChange:e=>u(e.target.value),style:{width:"160px"}}))),l.a.createElement("div",{className:"ClassTestInfoModal__Details--Section",style:{marginTop:"20px"}},l.a.createElement("div",{className:"ClassTestInfoModal__Details--Section--label"},t("routes.batches.batchTest.batchTestList.classTestEnterMarksModal.sections","Sections"),":"),l.a.createElement("div",{className:"ClassTestInfoModal__Details--Section--SectionContainer"},l.a.createElement("div",{className:"ClassTestInfoModal__Details--Section--SectionContainer--sections"},(null===m||void 0===m?void 0:m.length)>0?`${null===m||void 0===m?void 0:m.length} ${t("routes.batches.batchTest.batchTestList.classTestEnterMarksModal.sections","Sections")} (${null===m||void 0===m?void 0:m.map(e=>null===e||void 0===e?void 0:e.sectionName).toString()})`:null),l.a.createElement("div",{className:"ClassTestInfoModal__Details--Section--SectionContainer--text",onClick:()=>b(!0)},l.a.createElement("img",{src:Ze.a,alt:"addbutton",height:"20px",width:"20px",style:{marginRight:"5px"}}),l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.classTestInfoModal.createSections"},"Create Sections"))))),l.a.createElement("div",{className:"ClassTestInfoModal__Button",onClick:()=>{if(""==d||"0"==d)return p.toastr.error(t("routes.batches.batchTest.batchTestList.classTestEnterMarksModal.classTestInfoModal.toastr.enterMaximumMarks","Please enter maximum marks"));e.updateClassTestDetails({batchTestId:c,maxMarks:parseInt(d),sections:x.h(m),setShowEnterMarksModal:i})}},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.classTestInfoModal.done"},"Done")))),T?l.a.createElement(Qe,{showCreateSectionsModal:T,closeModal:()=>b(!1),sections:m,setSections:v,maxMarks:d,setMaxMarks:u}):null)}));a(3266);var $e=Object(n.connect)(e=>{var t,a,s,l,n;return{testStats:null===e||void 0===e||null===(t=e.BatchReducer)||void 0===t||null===(a=t.batchTests)||void 0===a?void 0:a.testStats,testDetails:null===e||void 0===e||null===(s=e.BatchReducer)||void 0===s||null===(l=s.batchTests)||void 0===l||null===(n=l.testStats)||void 0===n?void 0:n.testDetails}},e=>({fetchTestStatsTutor:t=>e(c.d(t))}))((function(e){var t,a;const{setShowSectionalMarksModal:n,setSectionalMarksModalData:i,setShowEnterMarksModal:r,setShowLeaderboardModal:c}=e,{testStats:d}=e,{testDetails:u}=d,{onlineTestType:m}=u,[v,p]=Object(s.useState)(!1),[T,E]=Object(s.useState)(""),{t:g}=Object(C.a)(),[f,S]=Object(s.useState)(2),[y,M]=Object(s.useState)(1),[k,A]=Object(s.useState)(!1),[w,I]=Object(s.useState)("0"),L=null===d||void 0===d||null===(t=d.students[0])||void 0===t?void 0:t.rank;Object(s.useEffect)(()=>{T.length&&N()},[T]);const N=()=>{window.location.hash="test",p(!0)};Object(s.useEffect)(()=>(window.addEventListener("popstate",B),window.addEventListener("message",_),()=>{window.removeEventListener("popstate",B),window.removeEventListener("message",_)}),[]);const _=e=>{"goToTest"===e.data.source&&O()},B=()=>{O()},O=()=>{p(!1),window.location.hash=""};return l.a.createElement("div",{className:"MarksTable"},l.a.createElement("div",{className:"MarksTable__Heading"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.testStatsModal.marksTable.students"},"STUDENTS"),(null===d||void 0===d?void 0:d.appearedStudents)>3&&(1===(null===d||void 0===d?void 0:d.isResultVisible)||2===(null===u||void 0===u?void 0:u.testType))&&4!==m?l.a.createElement("span",{className:"MarksTable__Heading--leaderboard",onClick:()=>{(null===u||void 0===u?void 0:u.type)===x.b.ONLINE?Object(Ke.b)(He.X):(null===u||void 0===u?void 0:u.type)===x.b.PRACTICE&&Object(Ke.b)(He.P),c(!0)}},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.testStatsModal.marksTable.leaderBoard"},"View Leaderboard")):null),l.a.createElement(b.a,{height:"40vh",next:()=>{e.fetchTestStatsTutor({testId:e.selectedTestId,limit:null===d||void 0===d?void 0:d.limit,offset:null===d||void 0===d?void 0:d.offset,sortByName:w,sortType:k})},dataLength:null===d||void 0===d||null===(a=d.students)||void 0===a?void 0:a.length,hasMore:null===d||void 0===d?void 0:d.hasMore},l.a.createElement(o.A,{celled:!0},l.a.createElement(o.A.Header,null,l.a.createElement(o.A.Row,null,l.a.createElement(o.A.HeaderCell,{width:6},l.a.createElement("div",{className:"MarksTable__HeaderCell"},l.a.createElement("div",{className:"MarksTable__HeaderCell--left"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.testStatsModal.marksTable.name"},"Name"),4==m?null:l.a.createElement("span",{className:"sortingIcon",onClick:()=>(A(!k),I("1"),void e.fetchTestStatsTutor({testId:e.selectedTestId,limit:10,offset:0,sortByName:"1",sortType:!k}))},"\u2191\u2193")))),l.a.createElement(o.A.HeaderCell,{width:4},l.a.createElement("div",{className:"MarksTable__HeaderCell"},l.a.createElement("div",{className:"MarksTable__HeaderCell--left"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.testStatsModal.marksTable.marks"},"Marks"),4==m?null:l.a.createElement("span",{className:"sortingIcon",onClick:()=>(A(!k),I("0"),void e.fetchTestStatsTutor({testId:e.selectedTestId,limit:10,offset:0,sortByName:"0",sortType:!k}))},"\u2191\u2193")),(null===u||void 0===u?void 0:u.type)===x.b.CLASSTEST?l.a.createElement("div",{className:"MarksTable__HeaderCell--left",onClick:()=>r(!0)},l.a.createElement(o.n,{name:"pencil",color:"#888a8d"}),l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.testStatsModal.marksTable.edit"},"Edit")):null)),4==m?null:l.a.createElement(o.A.HeaderCell,{width:4},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.testStatsModal.marksTable.grade"},"Grade")),L?l.a.createElement(o.A.HeaderCell,{width:4},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.testStatsModal.marksTable.rank"},"Rank")):null)),l.a.createElement(o.A.Body,null,d&&d.students&&d.students.map(e=>{var t;return l.a.createElement(o.A.Row,null,l.a.createElement(o.A.Cell,null,e.name),l.a.createElement(o.A.Cell,{style:{color:"white"}},e.isAttempted?l.a.createElement("div",{className:"MarksTable__Hover"},l.a.createElement("span",{style:{color:"rgba(0,0,0,.87)"}},e.scoredMarks),l.a.createElement("div",{className:"MarksTable__ViewDetails",onClick:()=>(e=>{4==u.onlineTestType?E(null===e||void 0===e?void 0:e.solutionUrl):2===u.testType?(i(e),n(!0)):window.open(null===e||void 0===e?void 0:e.solutionUrl)})(e)},2===(null===d||void 0===d||null===(t=d.testDetails)||void 0===t?void 0:t.testType)&&null!==d&&void 0!==d&&d.sections&&null!==d&&void 0!==d&&d.sections.length?g("routes.batches.batchTest.batchTestList.testStatsModal.marksTable.viewSectional","View Sectional Details"):g("routes.batches.batchTest.batchTestList.testStatsModal.marksTable.viewDetails","View Details"))):l.a.
1createElement("div",{className:"MarksTable__Absent"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.testStatsModal.marksTable.absent"},"Absent"))),4==m?null:l.a.createElement(o.A.Cell,null,e.grade),L?l.a.createElement(o.A.Cell,null,(e=>{if(!e)return null;switch(e){case 1:return l.a.createElement("img",{src:Z.a,alt:"",height:"25px",width:"25px"});case 2:return l.a.createElement("img",{src:$.a,alt:"",height:"25px",width:"25px"});case 3:return l.a.createElement("img",{src:te.a,alt:"",height:"25px",width:"25px"});default:return e}})(null===e||void 0===e?void 0:e.rank)):null)})))),(R=T)?l.a.createElement(o.u,{className:"testIframe",open:v,style:{margin:"0px !important",width:"100%",height:"100vh",padding:"0"}},l.a.createElement(o.u.Content,{style:{display:"flex","flex-direction":"row-reverse",width:"100%",height:"100vh",padding:"0"}},l.a.createElement("iframe",{src:R,frameBorder:"0",allowFullScreen:!0,height:"100vh",width:"100%",className:"testIframe--test"}))):void 0);var R})),et=a(1213);var tt=Object(n.connect)(e=>{var t,a,s;return{grades:null===e||void 0===e||null===(t=e.BatchReducer)||void 0===t||null===(a=t.batchTests)||void 0===a||null===(s=a.testStats)||void 0===s?void 0:s.grades}})((function(e){const{grades:t}=e,a=t?[{name:"A",value:Number(t.A)},{name:"B",value:Number(t.B)},{name:"C",value:Number(t.C)},{name:"D",value:Number(t.D)},{name:"E",value:Number(t.E)},{name:"F",value:Number(t.F)}]:[],s={A:"#00cb9f",B:"#007cff",C:"#ffbd00",D:"#00796B",E:"#ff7816",F:"#fc5463"};return l.a.createElement(et.j,{width:200,height:200},l.a.createElement(et.i,{data:a,cx:"50%",cy:"50%",innerRadius:75,outerRadius:100,fill:"#8884d8"},a.map((e,t)=>l.a.createElement(et.d,{key:t,fill:s[e.name]}))),l.a.createElement(et.l,null))})),at=a(57);var st=Object(n.connect)(e=>{var t,a;return{testStats:null===e||void 0===e||null===(t=e.BatchReducer)||void 0===t||null===(a=t.batchTests)||void 0===a?void 0:a.testStats}})((function(e){var t,a;const{testStats:s}=e,{onlineTestType:n}=null===s||void 0===s?void 0:s.testDetails;return l.a.createElement(o.z,null,l.a.createElement(o.q,{color:"teal",ribbon:!0},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.testStatsModal.statsOverview.maximumMarks"},"Maximum marks"),": ",s&&s.maxMarks),l.a.createElement(o.k,null,l.a.createElement(o.k.Row,null,l.a.createElement(o.k.Column,{computer:"10"},l.a.createElement(Ne.a,{fontSize:"0.9em"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.testStatsModal.statsOverview.avgScore"},"Avg. score")," "),l.a.createElement(_e.a,{first:s&&s.avgMarks,second:s&&s.maxMarks})),l.a.createElement(o.k.Column,{computer:"6"},4==n?null:l.a.createElement(l.a.Fragment,null,l.a.createElement(Ne.a,{fontSize:"0.9em"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.testStatsModal.statsOverview.avgGrade"}," Avg. grade ")),l.a.createElement(_e.a,{first:s&&s.avgGrade})))),l.a.createElement(o.k.Row,{style:{marginTop:"1em"}},l.a.createElement(o.k.Column,{computer:"10"},l.a.createElement(Ne.a,{fontSize:"0.9em"}," ",l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.testStatsModal.statsOverview.appearedStudents"},"Appeared students")," "),l.a.createElement(_e.a,{first:s&&s.appearedStudents,second:s&&s.totalStudents})),(1==(null===s||void 0===s||null===(t=s.testDetails)||void 0===t?void 0:t.testType)||3==(null===s||void 0===s||null===(a=s.testDetails)||void 0===a?void 0:a.testType))&&l.a.createElement(o.k.Column,{computer:"6"},l.a.createElement(Ne.a,{fontSize:"0.9em"}," ",l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.testStatsModal.statsOverview.avgTimeTaken"},"Avg. time taken")," "),l.a.createElement(_e.a,{first:s.avgTimeTaken&&at.a.getHourMinutes(s.avgTimeTaken)||0})))))}));function lt(e){const{color:t}=e;return l.a.createElement("span",{style:{backgroundColor:t,width:"12px",height:"12px",borderRadius:"50%",display:"inline-block"}})}var nt=function(){const{t:e}=Object(C.a)(),t=[{color:"#00cb9f",name:e("routes.batches.batchTest.batchTestList.testStatsModal.gradeLabels.gradeA","Grade A")},{color:"#007cff",name:e("routes.batches.batchTest.batchTestList.testStatsModal.gradeLabels.gradeB","Grade B")},{color:"#ffbd00",name:e("routes.batches.batchTest.batchTestList.testStatsModal.gradeLabels.gradeC","Grade C")},{color:"#00796B",name:e("routes.batches.batchTest.batchTestList.testStatsModal.gradeLabels.gradeD","Grade D")},{color:"#ff7816",name:e("routes.batches.batchTest.batchTestList.testStatsModal.gradeLabels.gradeE","Grade E")},{color:"#fc5463",name:e("routes.batches.batchTest.batchTestList.testStatsModal.gradeLabels.gradeF","Grade F")}];return l.a.createElement(o.k,null,t.map((e,t)=>l.a.createElement(o.k.Row,{key:t,verticalAlign:"middle",style:{paddingBottom:"0"}},l.a.createElement(o.k.Column,{computer:"4"},l.a.createElement(lt,{color:e.color})),l.a.createElement(o.k.Column,{computer:"12"},e.name))))},ot=a(1040),it=a.n(ot);var rt=Object(n.connect)(e=>{var t,a;return{testStats:null===e||void 0===e||null===(t=e.BatchReducer)||void 0===t||null===(a=t.batchTests)||void 0===a?void 0:a.testStats}},e=>({resetTestStats:t=>e(c.h())}))((function(e){var t,a,n,i;const{t:r}
1=Object(C.a)(),{showTestStatsModal:c,closeStatsModal:d,setShowEnterMarksModal:u,selectedTestId:m}=e,[h,v]=Object(s.useState)(!1),[p,T]=Object(s.useState)(!1),[b,E]=Object(s.useState)(null),[g,f]=Object(s.useState)(!1);return Object(s.useEffect)(()=>()=>{e.resetTestStats()},[]),l.a.createElement(l.a.Fragment,null,l.a.createElement(o.u,{open:c,onClose:()=>d(),size:"large"},l.a.createElement(o.u.Header,null,l.a.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},r("routes.Batches.components.BatchTests.components.TestStatsModal.heading","Test Stats"),l.a.createElement("img",{src:it.a,alt:"Close",onClick:()=>d(),style:{cursor:"pointer"}}))),l.a.createElement(o.u.Content,null,l.a.createElement(o.k,{centered:!0,style:{margin:"1em 0 0 1em"}},l.a.createElement(o.k.Row,{verticalAlign:"middle"},l.a.createElement(o.k.Column,{computer:"6"},l.a.createElement(st,null)),l.a.createElement(o.k.Column,{computer:"6",style:{paddingLeft:"15%"}},4==(null===e||void 0===e||null===(t=e.testStats)||void 0===t||null===(a=t.testDetails)||void 0===a?void 0:a.onlineTestType)?null:l.a.createElement(tt,null)),l.a.createElement(o.k.Column,{computer:"4",style:{paddingLeft:"10em"}},4==(null===e||void 0===e||null===(n=e.testStats)||void 0===n||null===(i=n.testDetails)||void 0===i?void 0:i.onlineTestType)?null:l.a.createElement(nt,null))),l.a.createElement(o.k.Row,{style:{paddingLeft:"1em"}},l.a.createElement($e,{setShowSectionalMarksModal:v,setSectionalMarksModalData:E,setShowEnterMarksModal:u,setShowLeaderboardModal:f,selectedTestId:m}))))),h?l.a.createElement(H,{showSectionalMarksModal:h,closeModal:()=>v(!1),sectionalMarksModalData:b,setSectionalMarksModalData:E}):null,g?l.a.createElement(ue,{testStats:e.testStats,testDetails:e.testStats.testDetails,leaderBoardModal:g,isTutor:!0,showLeaderBoard:()=>f(!g)}):null)})),ct=a(1217),dt=a.n(ct);var ut=Object(n.connect)(e=>{var t,a,s,l,n,o,i,r,c,d,u,m,h,v,p,T;return{isLoading:null===e||void 0===e||null===(t=e.BatchReducer)||void 0===t||null===(a=t.batchTests)||void 0===a||null===(s=a.uploadCsvModal)||void 0===s?void 0:s.isLoading,message:null===e||void 0===e||null===(l=e.BatchReducer)||void 0===l||null===(n=l.batchTests)||void 0===n||null===(o=n.uploadCsvModal)||void 0===o?void 0:o.message,modalState:null===e||void 0===e||null===(i=e.BatchReducer)||void 0===i||null===(r=i.batchTests)||void 0===r||null===(c=r.uploadCsvModal)||void 0===c?void 0:c.state,sendSMS:null===e||void 0===e||null===(d=e.BatchReducer)||void 0===d||null===(u=d.batchTests)||void 0===u||null===(m=u.testStats)||void 0===m?void 0:m.testDetails.sendSMS,batchTestId:null===e||void 0===e||null===(h=e.BatchReducer)||void 0===h||null===(v=h.batchTests)||void 0===v||null===(p=v.testStats)||void 0===p||null===(T=p.testDetails)||void 0===T?void 0:T.batchTestId,persistedData:null===e||void 0===e?void 0:e.persistedData}},e=>({uploadCsv:t=>e(c.r(t))}))((function(e){const t=Object(s.useRef)();return l.a.createElement(l.a.Fragment,null,l.a.createElement(o.u.Content,null,l.a.createElement("div",{className:"ClassTestEnterMarksModal__UploadCsv"},l.a.createElement("img",{src:dt.a,alt:"upload",height:"52px",width:"52px"}),e.isError?l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{className:"ClassTestEnterMarksModal__UploadCsv--title"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.uploadCsvModal.uploadScreen.error"},"Error")),l.a.createElement("div",{className:"ClassTestEnterMarksModal__UploadCsv--pointer"},e.message)):l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{className:"ClassTestEnterMarksModal__UploadCsv--title"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.uploadCsvModal.uploadScreen.uploadStudentMarksViaCsv"},"Upload Student Marks via CSV")),l.a.createElement("div",{className:"ClassTestEnterMarksModal__UploadCsv--download",onClick:()=>{const{persistedData:t}=e;ie()({url:`${ne.B.API_BASE_URL}/v2/batches/tests/stats/downloadCSV?batchTestId=${e.batchTestId}`,method:"GET",headers:{"x-access-token":t&&t.token},responseType:"blob"}).then(e=>{const t=window.URL.createObjectURL(new Blob([e.data])),a=document.createElement("a");a.href=t,a.setAttribute("download","file.csv"),document.body.appendChild(a),a.click(),document.body.removeChild(a)})}},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.uploadCsvModal.uploadScreen.downloadCsvFile"},"Download csv file")),l.a.createElement("div",{className:"ClassTestEnterMarksModal__UploadCsv--pointer"},"*",l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.uploadCsvModal.uploadScreen.inCaseyouHaveAlreadyEnteredMarks"},"In case you have already entered marks for students they will be over-ridden by your CSV upload.")),l.a.createElement("div",{className:"ClassTestEnterMarksModal__UploadCsv--pointer"},"* ",l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.uploadCsvModal.uploadScreen.inOrderToSuccessfullyUploadCsv"},"In order to successfully upload your CSV, please do not remove column headers in CSV file and do not change student name"))),l.a.createElement("input",{className:"ClassTestEnterMarksModal__HiddenInput",type:"file",accept:".csv",onChange:t=>{(t=>{let a=new FormData;a.append("file",t),a.append("batchTestId",e.batchTestId),a.append("sendSMS",e.sendSMS?1:0),e.uploadCsv(a)})(t.target.files[0])},ref:t}))),l.a.createElement(o.u.Actions,{style:{display:"flex",justifyContent:"center"}},l.a.createElement(o.b,{primary:!0,loading:e.isLoading,onClick:()=>{t.current.click()}},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.uploadCsvModal.uploadScreen.uploadCsv"},"Upload Csv"))))}));var mt=Object(n.connect)(e=>{var t,a,s,l;return{studentCount:null===e||void 0===e||null===(t=e.BatchReducer)||void 0===t||null===(a=t.batchTests)||void 0===a||null===(s=a.uploadCsvModal)||void 0===s||null===(l=s.data)||void 0===l?void 0:l.studentCount}})((function(e){return l.a.createElement(l.a.Fragment,null,l.a.createElement(o.u.Content,null,l.a.createElement("div",{className:"ClassTestEnterMarksModal__Success"},l.a.createElement("img",{src:dt.a,alt:"upload",height:"52px",width:"52px"}),l.a.createElement("div",{className:"ClassTestEnterMarksModal__Success--Top"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.uploadCsvModal.successScreen.success"},"Success!")),l.a.createElement("div",{className:"ClassTestEnterMarksModal__Success--text"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.uploadCsvModal.successScreen.successfullyEnteredMarks"},"Successfully Entered Marks for")," ",e.studentCount," ",l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.uploadCsvModal.successScreen.students"},"student(s)")))),l.a.createElement(o.u.Actions,{style:{display:"flex",justifyContent:"center"}},l.a.createElement(o.b,{primary:!0,onClick:()=>{e.closeEnterMarksModal(),e.closeModal()}},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.uploadCsvModal.successScreen.done"},"Done"))))}));var ht=Object(n.connect)(e=>{var t,a,s;return{modalState:null===e||void 0===e||null===(t=e.BatchReducer)||void 0===t||null===(a=t.batchTests)||void 0===a||null===(s=a.uploadCsvModal)||void 0===s?void 0:s.state}},e=>({resetCsvModal:t=>e(c.i(t))}))((function(e){const{showUploadCsvModal:t,closeModal:a,closeEnterMarksModal:n}=e;return Object(s.useEffect)(()=>()=>{e.resetCsvModal()},[]),l.a.createElement(o.u,{open:t,size:"tiny"},l.a.createElement(o.u.Header,{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.uploadCsvModal.uploadMarks"},"Upload marks"),l.a.createElement("img",{src:S.a,alt:"close",height:"15px",width:"15px",onClick:()=>a(),style:{cursor:"pointer"}})),(()=>{switch(e.modalState){case x.c.UPLOAD:return l.a.createElement(ut,{isLoading:e.isLoading});case x.c.SUCCESS:return l.a.createElement(mt,{closeModal:a,closeEnterMarksModal:n});case x.c.ERROR:return l.a.createElement(ut,{isLoading:e.isLoading,isError:!0});default:return l.a.createElement(ut,{isLoading:e.isLoading})}})())})),vt=a(2597),pt=a.n(vt);a(3267);var Tt=Object(n.connect)(e=>{var t,a,s,l;return{testStats:null===e||void 0===e||null===(t=e.BatchReducer)||void 0===t||null===(a=t.batchTests)||void 0===a?void 0:a.testStats,updatingClassTestMarks:null===e||void 0===e||null===(s=e.BatchReducer)||void 0===s||null===(l=s.batchTests)||void 0===l?void 0:l.updatingClassTestMarks}},e=>({fetchTestStatsTutor:t=>e(c.d(t)),updateStudentMarks:t=>e(c.p(t)),updateStudentPresent:t=>e(c.q(t)),updateClassTestMarks:t=>e(c.o(t)),changeSmsStatus:t=>e(c.k(t))}))((function(e){var t,a,n,i,r,c,d;const{t:u}=Object(C.a)(),{showEnterMarksModal:m,closeModal:v,setShowTestInfoModal:p,testStats:T}=e,[f,y]=Object(s.useState)(0),[M,k]=Object(s.useState)(!1);Object(s.useEffect)(()=>{null!==T&&void 0!==T&&T.maxMarks&&y(T.maxMarks)},[null===T||void 0===T?void 0:T.maxMarks,null===T||void 0===T?void 0:T.appearedStudents]);const A=(e,t)=>
1{if(e&&t){let a=-1;if(T&&T.students&&T.students.forEach((e,s)=>{e.studentId===t&&(a=s)}),-1!==a){let t=-1;if(T&&T.sections&&T.sections.forEach((a,s)=>{a.id===e&&(t=s)}),-1!==t&&null!==T&&void 0!==T&&T.students[a].sections[t].scoredMarks)return null===T||void 0===T?void 0:T.students[a].sections[t].scoredMarks}}},w=e=>{let t=-1;if(T&&T.students&&T.students.forEach((a,s)=>{a.studentId===e&&(t=s)}),-1!==t){var a;if(null!==T&&void 0!==T&&null!==(a=T.sections)&&void 0!==a&&a.length){let e=0;return T.students[t].sections.forEach(t=>{e+=parseFloat(t.scoredMarks)||0}),e}return null===T||void 0===T?void 0:T.students[t].scoredMarks}};return l.a.createElement(o.u,{open:m,size:"large",style:{height:"80vh"},dimmer:!0},l.a.createElement(o.u.Header,{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.testStats"},"Test Stats"),l.a.createElement("img",{src:S.a,alt:"close",height:"15px",width:"15px",onClick:()=>v(),style:{cursor:"pointer"}})),l.a.createElement(o.u.Content,{style:{padding:"40px",paddingBottom:"20px"}},l.a.createElement("div",{className:"ClassTestEnterMarksModal__Heading"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.testDetails"},"TEST DETAILS")),l.a.createElement("div",{className:"ClassTestEnterMarksModal__Details"},l.a.createElement("div",{className:"ClassTestEnterMarksModal__Details--Section"},l.a.createElement("div",{className:"ClassTestEnterMarksModal__Details--Section--label"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.maximumMarks"},"Maximum Marks"),": "),l.a.createElement("div",null,l.a.createElement(o.p,{placeholder:"Enter maximum marks",size:"small",style:{width:"160px"},value:f,disabled:null===T||void 0===T||null===(t=T.sections)||void 0===t?void 0:t.length}))),l.a.createElement("div",{className:"ClassTestEnterMarksModal__Details--Section",style:{marginTop:"20px"}},l.a.createElement("div",{className:"ClassTestEnterMarksModal__Details--Section--label"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.sections"},"Sections"),": "),l.a.createElement("div",{className:"ClassTestEnterMarksModal__Details--Section--SectionContainer"},l.a.createElement("div",{className:"ClassTestEnterMarksModal__Details--Section--SectionContainer--sections"},null!==T&&void 0!==T&&null!==(a=T.sections)&&void 0!==a&&a.length?`${null===T||void 0===T||null===(n=T.sections)||void 0===n?void 0:n.length} Sections (${null===T||void 0===T||null===(i=T.sections)||void 0===i?void 0:i.map(e=>null===e||void 0===e?void 0:e.sectionName).toString()})`:null)))),l.a.createElement("div",{className:"ClassTestEnterMarksModal__Heading",style:{marginTop:"20px"}},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.students"},"STUDENTS"),l.a.createElement("div",{className:"ClassTestEnterMarksModal__Heading--editDetails",onClick:()=>{Object(E.a)(g.hd),v(),p(!0)}},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.editDetails"},"Edit Details"))),l.a.createElement(b.a,{height:"40vh",next:()=>{e.fetchTestStatsTutor({testId:e.selectedTestId,limit:null===T||void 0===T?void 0:T.limit,offset:null===T||void 0===T?void 0:T.offset})},dataLength:null===T||void 0===T||null===(r=T.students)||void 0===r?void 0:r.length,hasMore:null===T||void 0===T?void 0:T.hasMore},l.a.createElement(o.A,{celled:!0,columns:16},l.a.createElement(o.A.Header,null,l.a.createElement(o.A.Row,null,l.a.createElement(o.A.HeaderCell,null,l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.table.name"},"Name")),l.a.createElement(o.A.HeaderCell,null,l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.table.present"},"Present")),null!==T&&void 0!==T&&null!==(c=T.sections)&&void 0!==c&&c.length?l.a.createElement(l.a.Fragment,null,l.a.createElement(o.A.HeaderCell,null,l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.totalMarks"},"Total Marks")),l.a.createElement(o.A.HeaderCell,{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.sections"},"Sections"),l.a.createElement("div",{className:"uploadCsv",onClick:()=>k(!0)},l.a.createElement("img",{src:pt.a,alt:"upload",height:"15px",width:"15px",style:{margin:"0 5px 3px 0"}}),l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.table.uploadCsv"},"upload Csv")))):l.a.createElement(o.A.HeaderCell,{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.table.marks"},"Marks"),l.a.createElement("div",{className:"uploadCsv",onClick:()=>k(!0)},l.a.createElement("img",{src:pt.a,alt:"upload",height:"15px",width:"15px",style:{margin:"0 5px 3px 0"}}),l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.table.uploadCsv"},"upload Csv"))))),l.a.createElement(o.A.Body,null,T&&T.students&&T.students.map((t,a)=>{var s,n,i;return l.a.createElement(o.A.Row,{key:a},l.a.createElement(o.A.Cell,null,t.name),l.a.createElement(o.A.Cell,null,l.a.createElement(o.d,{checked:t.isPresent,onChange:(a,s)=>e.updateStudentPresent({value:s.checked,studentId:t.studentId})})),l.a.createElement(o.A.Cell,null,l.a.createElement(o.p,{value:w(t.studentId),onChange:(a,s)=>
1{return l=t.studentId,n=s.value,void e.updateStudentMarks({studentId:l,value:n});var l,n},disabled:(null===t||void 0===t||null===(s=t.sections)||void 0===s?void 0:s.length)||!t.isPresent,error:w(t.studentId)>T.maxMarks})),null!==t&&void 0!==t&&null!==(n=t.sections)&&void 0!==n&&n.length?l.a.createElement(o.A.Cell,null,null===t||void 0===t||null===(i=t.sections)||void 0===i?void 0:i.map((a,s)=>l.a.createElement(o.p,{key:s,placeholder:a.sectionName,type:"number",style:{width:"100px",margin:"2px 5px"},value:A(a.id,t.studentId),onChange:(s,l)=>{return n=a.id,o=t.studentId,i=l.value,void e.updateStudentMarks({sectionId:n,studentId:o,value:i});var n,o,i},error:A(a.id,t.studentId)>a.maxMarks}))):null)}))))),l.a.createElement("div",{className:"ClassTestEnterMarksModal__Bottom"},l.a.createElement(o.b,{primary:!0,loading:e.updatingClassTestMarks,onClick:()=>(()=>{const{batchTestId:t,sendSMS:a}=null===T||void 0===T?void 0:T.testDetails,{sections:s,students:l}=T;let n=0;null!==s&&void 0!==s&&s.length?s.forEach(e=>{n+=parseFloat(e.maxMarks)}):n=T.maxMarks;let o=x.d(l);e.updateClassTestMarks({batchTestId:t,sendSMS:a,maxMarks:n,studentMarks:o,closeModal:v,setShowTestInfoModal:p})})()},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.classTestEnterMarksModal.button.uplaodMarks"},"Upload Marks")),l.a.createElement("div",null,l.a.createElement(o.d,{label:u("routes.batches.batchTest.batchTestList.classTestEnterMarksModal.label.sendSms","Send SMS"),checked:null===T||void 0===T||null===(d=T.testDetails)||void 0===d?void 0:d.sendSMS,onChange:(t,a)=>{e.changeSmsStatus(a.checked?1:0)},style:{marginLeft:"5px"}}))),M?l.a.createElement(ht,{showUploadCsvModal:M,closeModal:()=>k(!1),closeEnterMarksModal:v}):null)}));a(3268);var bt=Object(n.connect)(e=>{var t,a,s,l,n,o,i,r,c,d,u,m,h,v,p,T,b,E,g,f,S,C,y,M;return{isLoading:null===e||void 0===e||null===(t=e.BatchReducer)||void 0===t||null===(a=t.batchTests)||void 0===a?void 0:a.isLoading,limit:null===e||void 0===e||null===(s=e.BatchReducer)||void 0===s||null===(l=s.batchTests)||void 0===l?void 0:l.limit,offset:null===e||void 0===e||null===(n=e.BatchReducer)||void 0===n||null===(o=n.batchTests)||void 0===o?void 0:o.offset,hasMore:null===e||void 0===e||null===(i=e.BatchReducer)||void 0===i||null===(r=i.batchTests)||void 0===r?void 0:r.hasMore,upcomingTests:null===e||void 0===e||null===(c=e.BatchReducer)||void 0===c||null===(d=c.batchTests)||void 0===d?void 0:d.upcomingTests,completedTests:null===e||void 0===e||null===(u=e.BatchReducer)||void 0===u||null===(m=u.batchTests)||void 0===m?void 0:m.completedTests,ongoingTests:null===e||void 0===e||null===(h=e.BatchReducer)||void 0===h||null===(v=h.batchTests)||void 0===v?void 0:v.ongoingTests,url:null===e||void 0===e||null===(p=e.BatchReducer)||void 0===p||null===(T=p.batchTests)||void 0===T||null===(b=T.attemptTest)||void 0===b?void 0:b.url,showTestIframe:null===e||void 0===e||null===(E=e.BatchReducer)||void 0===E||null===(g=E.batchTests)||void 0===g||null===(f=g.attemptTest)||void 0===f?void 0:f.showTestIframe,attemptTestType:null===e||void 0===e||null===(S=e.BatchReducer)||void 0===S||null===(C=S.batchTests)||void 0===C||null===(y=C.attemptTest)||void 0===y||null===(M=y.testData)||void 0===M?void 0:M.type}},e=>({resetTestStats:t=>e(c.h(t)),fetchBatchTests:t=>e(c.b(t)),fetchTestStatsTutor:t=>e(c.d(t)),fetchTestStatsStudentParent:t=>e(c.c(t))}))(Object(d.a)((function(e){var t,a,n,i,r,c;const{t:d}=Object(C.a)(),{isStudentOrParent:u,permissions:m,url:v,showTestIframe:T,attemptTestType:f}=e,[S,M]=Object(s.useState)(!1),[k,A]=Object(s.useState)(),[I,L]=Object(s.useState)(!1),[x,N]=Object(s.useState)(!1),[_,O]=Object(s.useState)(!1);Object(s.useEffect)(()=>(window.addEventListener("popstate",D),window.addEventListener("message",R),()=>{window.removeEventListener("popstate",D),window.removeEventListener("message",R)}),[]);const R=e=>{"goToTest"===e.data.source&&(console.log("pplplplpl 7ddd"),window.location.reload())},D=()=>{},j=t=>{if(console.log((null===t||void 0===t?void 0:t.batchTestId)===k),3===(null===t||void 0===t?void 0:t.testType)&&Object(E.a)(g.Ac),!u&&!m.testPermission)return p.toastr.warning(d("routes.batches.batchTest.batchTestList.toastr.requestAccessFromBatchOwner","Request access from batch owner"));(null===t||void 0===t?void 0:t.batchTestId)===k?(A(null),e.resetTestStats()):(A(null===t||void 0===t?void 0:t.batchTestId),u?e.fetchTestStatsStudentParent({batchCode:e.batchCode,testId:null===t||void 0===t?void 0:t.batchTestId}):e.fetchTestStatsTutor({testId:null===t||void 0===t?void 0:t.batchTestId,limit:10,offset:0,setShowTestStatsModal:L,setShowTestInfoModal:N,setShowEnterMarksModal:O,sortByName:"0",sortType:!1}))};return l.a.createElement("div",{className:"BatchTestsList"},l.a.createElement(y,{batchCode:e.batchCode,isSearching:S,setIsSearching:M}
1),e.isLoading&&!e.offset?l.a.createElement(o.k,{verticalAlign:"middle",style:{height:"80vh",width:"80%"}},l.a.createElement(o.k.Column,{stretched:!0,width:16},l.a.createElement(o.r,{active:!0,inline:"centered",content:"Loading tests"}))):(()=>{const{upcomingTests:t,completedTests:a,ongoingTests:s}=e;let l=0;return l+=(null===t||void 0===t?void 0:t.length)+(null===a||void 0===a?void 0:a.length)+(null===s||void 0===s?void 0:s.length),l})()>0?l.a.createElement(b.a,{next:()=>e.fetchBatchTests({batchCode:e.batchCode,limit:e.limit,offset:e.offset}),hasMore:e.hasMore,scrollThreshold:.8,style:{overflow:"visible",minHeight:"0",marginTop:"10px"}},(null===e||void 0===e||null===(t=e.ongoingTests)||void 0===t?void 0:t.length)>0&&l.a.createElement("div",{className:"BatchTestsList__TestsContainer"},l.a.createElement("div",{className:"BatchTestsList__TestsContainer--label"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.ongoing"},"Ongoing")),null===e||void 0===e||null===(a=e.ongoingTests)||void 0===a?void 0:a.map((t,a)=>l.a.createElement(Ge,{testData:t,batchId:e.batchId,batchCode:e.batchCode,key:a,selectedTestId:k,setSelectedTestId:A,setShowTestStatsModal:L,onSingleTestClick:j}))),(null===e||void 0===e||null===(n=e.upcomingTests)||void 0===n?void 0:n.length)>0&&l.a.createElement("div",{className:"BatchTestsList__TestsContainer"},l.a.createElement("div",{className:"BatchTestsList__TestsContainer--label"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.upcoming"},"Upcoming")),null===e||void 0===e||null===(i=e.upcomingTests)||void 0===i?void 0:i.map((t,a)=>l.a.createElement(Ge,{testData:t,batchId:e.batchId,batchCode:e.batchCode,key:a,selectedTestId:k,setSelectedTestId:A,setShowTestStatsModal:L,onSingleTestClick:j}))),(null===e||void 0===e||null===(r=e.completedTests)||void 0===r?void 0:r.length)>0&&l.a.createElement("div",{className:"BatchTestsList__TestsContainer"},l.a.createElement("div",{className:"BatchTestsList__TestsContainer--label"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.batchTestList.completed"},"Completed")),null===e||void 0===e||null===(c=e.completedTests)||void 0===c?void 0:c.map((t,a)=>l.a.createElement(Ge,{testData:t,batchId:e.batchId,batchCode:e.batchCode,key:a,selectedTestId:k,setSelectedTestId:A,setShowTestStatsModal:L,onSingleTestClick:j})))):l.a.createElement(w,{isSearching:S}),v&&T?l.a.createElement(B,{type:f}):null,I?l.a.createElement(rt,{showTestStatsModal:I,closeStatsModal:()=>{A(null),L(!1)},setShowEnterMarksModal:O,selectedTestId:k}):null,x?l.a.createElement(qe,{showTestInfoModal:x,closeModal:()=>N(!1),setShowEnterMarksModal:O}):null,_?l.a.createElement(Tt,{showEnterMarksModal:_,closeModal:()=>O(!1),setShowTestInfoModal:N,selectedTestId:k}):null)}))),Et=a(2647),gt=a.n(Et),ft=a(1383),St=a.n(ft);a(3269),a(3270);var Ct=function(e){var t,a,s;const{showModal:n,closeModal:i,canWinCard:r}=e,{t:c}=Object(C.a)();return l.a.createElement(o.u,{open:n,size:"tiny"},l.a.createElement(o.u.Header,{style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:"60px",fontSize:"16px"}},c("routes.batches.batchTest.peerChallenge.peerChallengeHelpModal.howChallengesWork","How challenges work ?"),l.a.createElement("img",{src:S.a,alt:"close",height:"15px",width:"15px",onClick:()=>i(),style:{cursor:"pointer"}})),l.a.createElement(o.u.Content,null,l.a.createElement("div",{className:"PeerChallengeHelpModal"},l.a.createElement("div",{className:"PeerChallengeHelpModal__Text"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.peerChallenge.peerChallengeHelpModal.youCanChallengeAnyoneFromBatch"},"You can challenge anyone from your batch to whom the test is assigned")),l.a.createElement("div",{className:"PeerChallengeHelpModal__Text"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.peerChallenge.peerChallengeHelpModal.youWinChallengeWhenYouScore"},"You win a challenge when you score more than them in the test. Only your first attempt score is considered.")),l.a.createElement("div",{className:"PeerChallengeHelpModal__Points"},l.a.createElement("div",{className:"PeerChallengeHelpModal__Points--point"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.peerChallenge.peerChallengeHelpModal.forEveryChallengeWon"},"For every challenge won"),l.a.createElement("div",null,null===r||void 0===r||null===(t=r.how)||void 0===t?void 0:t.ifWon,l.a.createElement("img",{src:ve.a,alt:"coin",height:"15px",width:"15px",style:{marginLeft:"5px"}}))),l.a.createElement("div",{className:"PeerChallengeHelpModal__Points--point"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.peerChallenge.peerChallengeHelpModal.forEveryChallengeLost"},"For every challenge Lost"),l.a.createElement("div",null,null===r||void 0===r||null===(a=r.how)||void 0===a?void 0:a.ifLost,l.a.createElement("img",{src:ve.a,alt:"coin",height:"15px",width:"15px",style:{marginLeft:"5px"}}))),l.a.createElement("div",{className:"PeerChallengeHelpModal__Points--point"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.peerChallenge.peerChallengeHelpModal.ifNotAttempted"},"If not attempted"),l.a.createElement("div",null,null===r||void 0===r||null===(s=r.how)||void 0===s?void 0:s.whenNotAttempted,l.a.createElement("img",{src:ve.a,alt:"coin",height:"15px",width:"15px",style:{marginLeft:"5px"}})))),l.a.createElement("div",{className:"PeerChallengeHelpModal__Text"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.peerChallenge.peerChallengeHelpModal.challengeAsManyAsYouCan"},"Challenge as many as you can and climb up the leaderboard!")))),l.a.createElement(o.u.Actions,null,l.a.createElement(o.b,{primary:!0,onClick:()=>i()},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.peerChallenge.peerChallengeHelpModal.button.okay"},"Okay"))))};var yt=Object(n.connect)(e=>{var t,a,s,l;return{batchId:null===e||void 0===e||null===(t=e.BatchReducer)||void 0===t||null===(a=t.batchDetails)||void 0===a?void 0:a.batchId,batchCode:null===e||void 0===e||null===(s=e.BatchReducer)||void 0===s||null===(l=s.batchDetails)||void 0===l?void 0:l.batchCode}}
1)(Object(N.a)((function(e){const{canWinCard:t}=e,[a,n]=Object(s.useState)(!1);return l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{className:"CanWinCard"},l.a.createElement("div",{style:{display:"flex"}},l.a.createElement("img",{src:gt.a,alt:"winPoints",style:{marginRight:"10px"}}),l.a.createElement("span",{className:"CanWinCard__WinPointsPara"},t&&t.text," ",l.a.createElement("span",{className:"CanWinCard__WinPointsPara--how",style:{display:"inline-block"},onClick:()=>n(!0)},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.peerChallenge.canWinCard.how"},"How?")))),l.a.createElement("img",{src:St.a,alt:"rightArrow icon",onClick:()=>e.history.push(`/batches/${e.batchId}/${e.batchCode}/challenges`)})),a?l.a.createElement(Ct,{showModal:a,closeModal:()=>n(!1),canWinCard:t}):null)}))),Mt=a(2230),kt=a.n(Mt);a(3271);var At=function(e){var t,a,s,n,o,i,r,c,d,u,m,v;const{scoreboardSummary:p,headerLink:T,footerLink:b}=e,{batchId:E,batchCode:g}=e;return l.a.createElement("div",{className:"ChallengesCard"},l.a.createElement("div",{className:"ChallengesCard__Header"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.peerChallenge.challengesCard.challengesTitle1"},"Challenges"),l.a.createElement(Ie.a,{to:T},l.a.createElement("div",{className:"ChallengesCard__Header--scoreboard"},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.peerChallenge.challengesCard.viewScoreBoard"},"View Scoreboard")))),l.a.createElement("div",{className:"ChallengesCard__C
1ontent"},l.a.createElement("div",{className:"ChallengesCard__Content--section"},l.a.createElement("img",{src:null===p||void 0===p||null===(t=p.card)||void 0===t||null===(a=t.info)||void 0===a?void 0:a.icon,alt:"ranks"}),l.a.createElement("div",{className:"ChallengesCard__Content--section--data"},l.a.createElement("div",{className:"ChallengesCard__Content--section--data--heading"},null===p||void 0===p||null===(s=p.card)||void 0===s||null===(n=s.info)||void 0===n?void 0:n.heading),l.a.createElement("div",null,(null===p||void 0===p||null===(o=p.card)||void 0===o||null===(i=o.info)||void 0===i?void 0:i.subHeading)||"-"))),l.a.createElement("div",{className:"ChallengesCard__Content--section"},l.a.createElement("img",{src:null===p||void 0===p||null===(r=p.card)||void 0===r||null===(c=r.info2)||void 0===c?void 0:c.icon,alt:"ranks"}),l.a.createElement("div",{className:"ChallengesCard__Content--section--data"},l.a.createElement("div",{className:"ChallengesCard__Content--section--data--heading"},null===p||void 0===p||null===(d=p.card)||void 0===d||null===(u=d.info2)||void 0===u?void 0:u.heading),l.a.createElement("div",null,(null===p||void 0===p||null===(m=p.card)||void 0===m||null===(v=m.info2)||void 0===v?void 0:v.subHeading)||"-")))),l.a.createElement("div",{className:"ChallengesCard__Footer"},l.a.createElement("div",{className:"ChallengesCard__Footer--left"},l.a.createElement("img",{src:kt.a,alt:"flag",style:{marginRight:"10px"}}),l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.peerChallenge.challengesCard.viewAllChallanges"},"View all challenges")),l.a.createElement(Ie.a,{to:b},l.a.createElement("div",{className:"ChallengesCard__Footer--right"},l.a.createElement("img",{src:St.a,alt:"right"})))))};var wt=Object(n.connect)(e=>{var t,a,s,l;return{batchId:null===e||void 0===e||null===(t=e.BatchReducer)||void 0===t||null===(a=t.batchDetails)||void 0===a?void 0:a.batchId,batchCode:null===e||void 0===e||null===(s=e.BatchReducer)||void 0===s||null===(l=s.batchDetails)||void 0===l?void 0:l.batchCode}})(Object(N.a)((function(e){const{t:t}=Object(C.a)(),{showModal:a,closeModal:s,permissions:n}=e,{batchId:i,batchCode:r}=e;return l.a.createElement(o.u,{open:a,size:"tiny"},l.a.createElement(o.u.Header,{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},"Alert!",l.a.createElement("img",{src:S.a,alt:"close",height:"15px",width:"15px",onClick:()=>s(),style:{cursor:"pointer"}})),l.a.createElement(o.u.Content,null,l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.noStudentsModal.thereAreNoStdsInTheBatch"},"There are no students in the batch. Please add students to assign tests.")),l.a.createElement(o.u.Actions,null,l.a.createElement(o.b,{style:{color:"#009ae0",background:"#fff",border:"1px solid #009ae0"},onClick:()=>s()},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.noStudentsModal.button.cancel"},"Cancel")),l.a.createElement(o.b,{onClick:()=>{n&&!n.studentManagementPermission?p.toastr.error("ERROR",t("routes.batches.batchTest.noStudentsModal.toastr.youDontHavePermissionToAddStds","You don't have permission to add students. Ask your owner to add students to batch")):e.history.push(`/batches/${i}/${r}/students`)},primary:!0},l.a.createElement(h.a,{i18nKey:"routes.batches.batchTest.noStudentsModal.button.addStudents"},"Add Students"))))})));a(3272);class It extends s.Component{constructor(e){super(e),this.setNoStudentsModal=e=>{this.setState({showNoStudentsModal:!!e})},this.createTest=()=>{const{studentCount:e,permissions:t}=this.props;if(e)return t.ownerPremiumStatus?this.props.history.push(this.props.location.pathname+"/create"):this.props.showPremiumExpiryModal(!0);this.setNoStudentsModal(!0)},this.state={searchTerm:"",showNoStudentsModal:!1}}componentDidMount(){const{batchCode:e}=this.props;if(e)this.props.fetchBatchTests({batchCode:e,limit:10,offset:0});else{const{pathname:e}=this.props.location;let t=e.split("/")[3];this.props.fetchBatchTests({batchCode:t,limit:10,offset:0})}}componentWillUnmount(){this.props.resetState()}render(){const{isStudentOrParent:e,permissions:t}=this.props,{canWinCard:a,scoreboardSummary:s,batchId:n,batchCode:i}=this.props,{showNoStudentsModal:c}=this.state;return l.a.createElement("div",{className:"BatchTests"},l.a.createElement(r.a,null,l.a.createElement("meta",{charSet:"utf-8"}),l.a.createElement("title",null,"Tests | Batch Management")),l.a.createElement(o.k,{columns:16},l.a.createElement(o.k.Column,{computer:e?"10":"15",style:{paddingTop:"0"}},l.a.createElement(v,{permissions:t,createTest:this.createTest}),l.a.createElement(bt,{batchCode:this.props.batchCode,batchId:this.props.batchId})),l.a.createElement(o.k.Column,{computer:"5",style:{padding:"0",margin:"108px 0 0 10px"}},e&&a?l.a.createElement(o.k.Row,{style:{padding:"0",margin:"0 0 20px 0"}}
1,l.a.createElement(yt,{canWinCard:this.props.canWinCard})):null,e&&s?l.a.createElement(o.k.Row,{style:{padding:"0"}},l.a.createElement(At,{scoreboardSummary:s,headerLink:`/batches/${n}/${i}/scoreboard`,footerLink:`/batches/${n}/${i}/challenges`})):null)),c?l.a.createElement(wt,{showModal:c,closeModal:()=>this.setNoStudentsModal(!1),permissions:t}):null,l.a.createElement(m.a,null))}}t.default=Object(n.connect)(e=>{var t,a,s,l,n,o,i,r,c,d,u,m,h,v,p,T,b,E,g,f;return{studentsCount:null===e||void 0===e||null===(t=e.BatchReducer)||void 0===t||null===(a=t.batchDetails)||void 0===a?void 0:a.currentStudentsCount,batchId:null===e||void 0===e||null===(s=e.BatchReducer)||void 0===s||null===(l=s.batchDetails)||void 0===l?void 0:l.batchId,batchCode:null===e||void 0===e||null===(n=e.BatchReducer)||void 0===n||null===(o=n.batchDetails)||void 0===o?void 0:o.batchCode,isLoading:null===e||void 0===e||null===(i=e.BatchReducer)||void 0===i||null===(r=i.batchTests)||void 0===r?void 0:r.isLoading,limit:null===e||void 0===e||null===(c=e.BatchReducer)||void 0===c||null===(d=c.batchTests)||void 0===d?void 0:d.limit,offset:null===e||void 0===e||null===(u=e.BatchReducer)||void 0===u||null===(m=u.batchTests)||void 0===m?void 0:m.offset,hasMore:null===e||void 0===e||null===(h=e.BatchReducer)||void 0===h||null===(v=h.batchTests)||void 0===v?void 0:v.hasMore,studentCount:null===e||void 0===e||null===(p=e.BatchReducer)||void 0===p||null===(T=p.batchTests)||void 0===T?void 0:T.studentCount,canWinCard:null===e||void 0===e||null===(b=e.BatchReducer)||void 0===b||null===(E=b.batchTests)||void 0===E?void 0:E.canWinCard,scoreboardSummary:null===e||void 0===e||null===(g=e.BatchReducer)||void 0===g||null===(f=g.batchTests)||void 0===f?void 0:f.scoreboardSummary}},e=>({showPremiumExpiryModal:u.c,fetchBatchTests:t=>e(c.b(t)),resetState:t=>e(c.g(t))}))(Object(d.a)(Object(N.a)(It)))}}]);

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.