(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6634,4444,7896,4360,1277,4484,6024,5430,9287,5180,6392,2807],{97053:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/featured-videos",function(){return n(98042)}])},98759:function(e,t,n){"use strict";n.d(t,{R$:function(){return a},dH:function(){return s},ge:function(){return l},kn:function(){return i}});var r=n(9669),o=n.n(r),s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return o().get("/get/exampurspecialv2",{baseURL:e,params:{start:t}}).then((function(e){return e.data}))},i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;return o().get("/get/studymaterialbytype",{baseURL:e,params:{type:t,start:n}}).then((function(e){return e.data}))},a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";return o().get("/get/current_affairs_byte",{baseURL:e,params:{start:t,language:n}}).then((function(e){return e.data}))},l=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;return o().get("/get/currentaffairs",{baseURL:e,params:{start:n,type:t}}).then((function(e){return e.data.data}))}},14193:function(e,t,n){"use strict";n.d(t,{ZP:function(){return d}});var r=n(47568),o=n(26042),s=n(69396),i=n(97582),a=n(85893),l=n(67294),c=n(89885);function u(e){var t=Number(e);return"string"===typeof e&&isNaN(t)?e:isNaN(t)?String(e):new Intl.NumberFormat("en-US",{maximumFractionDigits:1,notation:"compact",compactDisplay:"short"}).format(t)}var h=n(99209),p=function(e){return(0,a.jsx)("svg",(0,s.Z)((0,o.Z)({stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg"},e),{children:(0,a.jsx)("path",{d:"M4 21h1V8H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2zM20 8h-7l1.122-3.368A2 2 0 0 0 12.225 2H12L7 7.438V21h11l3.912-8.596L22 12v-2a2 2 0 0 0-2-2z"})}))},d=function(e){var t=e.courseId,n=e.itemType,o=e.likesCount,s=(0,l.useContext)(c.Z),d=s.currentUser,f=s.toggleAuthModal,m=s.setIsLogin,g=(s.hasSession,s.appConfig,(0,l.useState)(!1)),v=g[0],b=g[1],y=(0,l.useState)(o),w=y[0],T=y[1];(0,l.useEffect)((function(){d&&x()}),[d]);var x=function(){var e=(0,r.Z)((function(){var e,r;return(0,i.__generator)(this,(function(o){if(d){e=[];try{r=JSON.parse(localStorage.getItem("course_likes")||"[]"),Array.isArray(r)&&(e=r)}catch(s){e=[]}(null===e||void 0===e?void 0:e.some((function(e){return e.item_id==t&&e.item_type==n})))&&b(!0)}return[2]}))}));return function(){return e.apply(this,arguments)}}(),_=function(){var e=(0,r.Z)((function(e,t,n){var r,o;return(0,i.__generator)(this,(function(s){switch(s.label){case 0:if(!d)return m(!0),f(),[2];r=[];try{o=JSON.parse(localStorage.getItem("course_likes")||"[]"),Array.isArray(o)&&(r=o)}catch(i){r=[]}return(null===r||void 0===r?void 0:r.some((function(e){return e.item_id===t&&e.item_type===n})))?[2]:[4,(0,h.$k)(e,t,n)];case 1:return s.sent()&&(r.push({item_id:t,item_type:n}),b(!0),T((function(e){return Number(e)+1})),localStorage.setItem("course_likes",JSON.stringify(r))),[2]}}))}));return function(t,n,r){return e.apply(this,arguments)}}();return(0,a.jsxs)("button",{className:"btn btn-like d-flex align-items-center",style:{color:v?"#fd415a":"#000000",border:"none",outline:"none",background:"none",padding:0},onClick:function(){return _(d?d.userid:null,t,n)},children:[(0,a.jsx)(p,{}),(0,a.jsx)("span",{className:"ml-1",style:{color:v?"#fd415a":"#000000"},children:u(w)})]})}},17666:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(47568),o=n(97582),s=n(85893),i=n(58533),a=n(67294),l=n(23138),c=n(35773),u=n(95305),h=n(98759),p=n(45508),d=n(12956),f=n(11163),m=n(96076),g=n(47041);function v(e){var t=e.basePath,n=e.fetchMore,v=(0,f.useRouter)(),b=(0,a.useState)(e.videos.data),y=b[0],w=b[1],T=(0,a.useMemo)((function(){return Number(v.query.page||0)})),x=(0,a.useState)(T),_=x[0],S=x[1],E=(0,a.useState)(e.videos.total),L=E[0],N=E[1],j=(0,g.getCookie)(m.z1),O=function(){var e=(0,r.Z)((function(){var e,t;return(0,o.__generator)(this,(function(r){switch(r.label){case 0:return S(_+=10),n?[4,n(_)]:[3,2];case 1:return t=r.sent(),[3,4];case 2:return[4,(0,h.dH)(j,_)];case 3:t=r.sent(),r.label=4;case 4:return e=t,w(y.concat(e.data)),N(e.total),[2]}}))}));return function(){return e.apply(this,arguments)}}();return(0,s.jsx)(i.Z,{dataLength:(null===y||void 0===y?void 0:y.length)||0,next:O,hasMore:L>=10,loader:(0,s.jsx)("div",{className:"text-center text-gray font-bold",children:"Loading.."}),endMessage:0!=(null===y||void 0===y?void 0:y.length)?(0,s.jsx)("div",{className:"text-center text-gray font-bold"}):(0,s.jsx)(l.Z,{color:"primary",isOpen:!0,children:"No videos available"}),children:(0,s.jsx)(c.Z,{className:"m-0",children:null===y||void 0===y?void 0:y.map((function(e,n){return(0,s.jsx)(u.Z,{md:"4",className:"mb-4",children:(0,s.jsx)(d.Z,{title:e.title,image:"https://i.ytimg.com/vi/".concat((0,p.NA)(e.link).split("/").pop(),"/hqdefault.jpg"),link:"".concat(t,"/").concat(e.id,"?page=").concat(10*Math.floor((n+T)/10)),btnText:"Watch now",checkAuth:!0,imgHeight:"auto"})},e.id)}))})})}},12956:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(85893),o=n(39886),s=n(54610),i=n(49816),a=n(38653),l=n(84082),c=n(67294),u=n(89885),h=n(11163),p=n(96486),d=n(14193);function f(e){var t=e.courseLikesCount,n=void 0===t?"":t,f=e.courseId,m=void 0===f?"":f,g=e.itemType,v=void 0===g?1:g,b=e.title,y=e.subText,w=e.infoText,T=e.image,x=e.link,_=e.btnText,S=void 0===_?"View Details":_,E=e.showBtn,L=void 0===E||E,N=e.btnAction,j=e.children,O=e.checkAuth,M=void 0!==O&&O,k=e.externalLink,D=void 0!==k&&k,C=e.imgHeight,Z=void 0===C?"200":C,Y=(0,c.useRef)(),R=(0,c.useContext)(u.Z),P=R.currentUser,A=R.toggleAuthModal,H=R.setIsLogin,I=R.hasSession,B=R.appConfig,F=(0,c.useRef)(I),U=(0,h.useRouter)(),z=(0,c.useState)(!1),W=z[0],V=z[1];(0,c.useEffect)((function(){W&&P&&0==F.current&&(V(!1),$())}),[P,F]);var $=function(){if("1"==B.web_enableloginforfreecontent&&M&&!P)return H(!0),A(),void V(!0);null!=N?N():x&&(D?window.open(x,"_blank"):U.push(x))};return(0,r.jsxs)(o.Z,{className:"h-100",children:[(0,r.jsx)("img",{ref:Y,src:(0,p.isEmpty)(T)?"1"==B.web_enablelogoasdefaultimg?B.web_logotransparent:"/empty-image-web.svg":T,className:T?"card-img-top":"card-img-top img-cover",width:"100%",height:Z,onLoad:function(){if(Y.current){var e=Y.current.naturalWidth/Y.current.naturalHeight;e>.8&&e<1.2&&(Y.current.style.objectFit="contain")}}}),(0,r.jsxs)(s.Z,{className:"d-flex flex-column border-top",children:[(0,r.jsxs)("div",{className:"d-flex justify-content-between align-items-center mb-3",children:[(0,r.jsx)(i.Z,{className:"font-lg font-bold",children:b}),m&&"1"==B.web_enablecourselike&&(0,r.jsx)(d.ZP,{courseId:m,likesCount:n,itemType:v})]}),w&&(0,r.jsx)(a.Z,{className:"mb-3 sub-text",tag:"div",children:w}),y&&(0,r.jsx)(a.Z,{className:"mb-2",tag:"h6",children:y}),L&&(N||x)&&(0,r.jsx)(l.Z,{color:"primary",onClick:$,block:!0,className:"mt-auto",children:S}),j&&j]})]})}},98042:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return p}});var r=n(47568),o=n(97582),s=n(85893),i=n(47041),a=n(67294),l=n(76022),c=n(17666),u=n(89885),h=n(96076);function p(e){var t=e.videos,n=(0,a.useContext)(u.Z).appConfig;return(0,s.jsxs)("div",{children:[(0,s.jsx)("h5",{className:"mb-4 text-center",children:n.web_menufeaturedvideosname}),(0,s.jsx)(c.Z,{basePath:"/featured-videos",videos:t,fetchMore:function(e){return(0,l.Qh)("",e)}})]})}p.getInitialProps=function(){var e=(0,r.Z)((function(e){var t;return(0,o.__generator)(this,(function(n){switch(n.label){case 0:return t=(0,i.getCookie)(h.z1,e),[4,(0,l.Qh)(t)];case 1:return[2,{videos:n.sent()}]}}))}));return function(t){return e.apply(this,arguments)}}()},58533:function(e,t,n){"use strict";var r=n(67294),o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},o(e,t)};var s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)};var i="Pixel",a="Percent",l={unit:a,value:.8};function c(e){return"number"===typeof e?{unit:a,value:100*e}:"string"===typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:i,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:a,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),l):(console.warn("scrollThreshold should be string or number"),l)}var u=function(e){function t(t){var n=e.call(this,t)||this;return n.lastScrollTop=0,n.actionTriggered=!1,n.startY=0,n.currentY=0,n.dragging=!1,n.maxPullDownDistance=0,n.getScrollableTarget=function(){return n.props.scrollableTarget instanceof HTMLElement?n.props.scrollableTarget:"string"===typeof n.props.scrollableTarget?document.getElementById(n.props.scrollableTarget):(null===n.props.scrollableTarget&&console.warn("You are trying to pass scrollableTarget but it is null. This might\n        happen because the element may not have been added to DOM yet.\n        See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n      "),null)},n.onStart=function(e){n.lastScrollTop||(n.dragging=!0,e instanceof MouseEvent?n.startY=e.pageY:e instanceof TouchEvent&&(n.startY=e.touches[0].pageY),n.currentY=n.startY,n._infScroll&&(n._infScroll.style.willChange="transform",n._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},n.onMove=function(e){n.dragging&&(e instanceof MouseEvent?n.currentY=e.pageY:e instanceof TouchEvent&&(n.currentY=e.touches[0].pageY),n.currentY<n.startY||(n.currentY-n.startY>=Number(n.props.pullDownToRefreshThreshold)&&n.setState({pullToRefreshThresholdBreached:!0}),n.currentY-n.startY>1.5*n.maxPullDownDistance||n._infScroll&&(n._infScroll.style.overflow="visible",n._infScroll.style.transform="translate3d(0px, "+(n.currentY-n.startY)+"px, 0px)")))},n.onEnd=function(){n.startY=0,n.currentY=0,n.dragging=!1,n.state.pullToRefreshThresholdBreached&&(n.props.refreshFunction&&n.props.refreshFunction(),n.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame((function(){n._infScroll&&(n._infScroll.style.overflow="auto",n._infScroll.style.transform="none",n._infScroll.style.willChange="unset")}))},n.onScrollListener=function(e){"function"===typeof n.props.onScroll&&setTimeout((function(){return n.props.onScroll&&n.props.onScroll(e)}),0);var t=n.props.height||n._scrollableNode?e.target:document.documentElement.scrollTop?document.documentElement:document.body;n.actionTriggered||((n.props.inverse?n.isElementAtTop(t,n.props.scrollThreshold):n.isElementAtBottom(t,n.props.scrollThreshold))&&n.props.hasMore&&(n.actionTriggered=!0,n.setState({showLoader:!0}),n.props.next&&n.props.next()),n.lastScrollTop=t.scrollTop)},n.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:t.dataLength},n.throttledOnScrollListener=function(e,t,n,r){var o,s=!1,i=0;function a(){o&&clearTimeout(o)}function l(){var l=this,c=Date.now()-i,u=arguments;function h(){i=Date.now(),n.apply(l,u)}function p(){o=void 0}s||(r&&!o&&h(),a(),void 0===r&&c>e?h():!0!==t&&(o=setTimeout(r?p:h,void 0===r?e-c:e)))}return"boolean"!==typeof t&&(r=n,n=t,t=void 0),l.cancel=function(){a(),s=!0},l}(150,n.onScrollListener).bind(n),n.onStart=n.onStart.bind(n),n.onMove=n.onMove.bind(n),n.onEnd=n.onEnd.bind(n),n}return function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){if("undefined"===typeof this.props.dataLength)throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"===typeof this.props.initialScrollY&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),"function"!==typeof this.props.refreshFunction))throw new Error('Mandatory prop "refreshFunction" missing.\n          Pull Down To Refresh functionality will not work\n          as expected. Check README.md for usage\'')},t.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},t.prototype.componentDidUpdate=function(e){this.props.dataLength!==e.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},t.getDerivedStateFromProps=function(e,t){return e.dataLength!==t.prevDataLength?s(s({},t),{prevDataLength:e.dataLength}):null},t.prototype.isElementAtTop=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,r=c(t);return r.unit===i?e.scrollTop<=r.value+n-e.scrollHeight+1:e.scrollTop<=r.value/100+n-e.scrollHeight+1},t.prototype.isElementAtBottom=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,r=c(t);return r.unit===i?e.scrollTop+n>=e.scrollHeight-r.value:e.scrollTop+n>=r.value/100*e.scrollHeight},t.prototype.render=function(){var e=this,t=s({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),n=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),o=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return r.createElement("div",{style:o,className:"infinite-scroll-component__outerdiv"},r.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(t){return e._infScroll=t},style:t},this.props.pullDownToRefresh&&r.createElement("div",{style:{position:"relative"},ref:function(t){return e._pullDown=t}},r.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!n&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},t}(r.Component);t.Z=u},38653:function(e,t,n){"use strict";var r=n(67294),o=n(45697),s=n.n(o),i=n(93967),a=n.n(i),l=n(22040),c=["className","cssModule","tag"];function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}function h(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var p={className:s().string,cssModule:s().object,tag:l.iC};function d(e){var t=e.className,n=e.cssModule,o=e.tag,s=void 0===o?"div":o,i=h(e,c),p=(0,l.mx)(a()(t,"card-subtitle"),n);return r.createElement(s,u({},i,{className:p}))}d.propTypes=p,t.Z=d},49816:function(e,t,n){"use strict";var r=n(67294),o=n(45697),s=n.n(o),i=n(93967),a=n.n(i),l=n(22040),c=["className","cssModule","tag"];function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}function h(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var p={className:s().string,cssModule:s().object,tag:l.iC};function d(e){var t=e.className,n=e.cssModule,o=e.tag,s=void 0===o?"div":o,i=h(e,c),p=(0,l.mx)(a()(t,"card-title"),n);return r.createElement(s,u({},i,{className:p}))}d.propTypes=p,t.Z=d}},function(e){e.O(0,[9774,2888,179],(function(){return t=97053,e(e.s=t);var t}));var t=e.O();_N_E=t}]);