(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4672,4444,7896,4360,1277,4484,6024,5430,9287,5180,6392,2807],{51809:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/books",function(){return n(67387)}])},83805:function(e,t,n){"use strict";n.d(t,{P:function(){return i},y:function(){return s}});var r=n(9669),o=n.n(r),s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return o().get("/get/productlist",{baseURL:e,params:{start:t}}).then((function(e){return e.data}))},i=function(e,t){return o().get("/get/product_by_id",{baseURL:e,params:{product_id: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),l=n(85893),a=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,l.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,l.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,a.useContext)(c.Z),d=s.currentUser,f=s.toggleAuthModal,m=s.setIsLogin,g=(s.hasSession,s.appConfig,(0,a.useState)(!1)),v=g[0],b=g[1],y=(0,a.useState)(o),w=y[0],x=y[1];(0,a.useEffect)((function(){d&&_()}),[d]);var _=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)}}(),T=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),x((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,l.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 T(d?d.userid:null,t,n)},children:[(0,l.jsx)(p,{}),(0,l.jsx)("span",{className:"ml-1",style:{color:v?"#fd415a":"#000000"},children:u(w)})]})}},9888:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(85893);function o(e){var t=e.price,n=e.mrp;t=parseInt(t);var o=((n=parseInt(n))-t)/n*100;return t<0?null:(0,r.jsxs)("div",{className:"d-flex",children:["\u20b9",t," ",n>t?(0,r.jsxs)("div",{className:"d-flex align-items-center justify-content-between flex-grow-1 ms-1",children:[(0,r.jsx)("div",{className:"font-sm text-gray font-regular text-decoration-line-through",children:n}),(0,r.jsxs)("div",{className:"text-success ms-2",children:[null===o||void 0===o?void 0:o.toFixed(2),"% off"]})]}):""]})}},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),l=n(38653),a=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,x=e.image,_=e.link,T=e.btnText,S=void 0===T?"View Details":T,E=e.showBtn,j=void 0===E||E,N=e.btnAction,L=e.children,O=e.checkAuth,k=void 0!==O&&O,D=e.externalLink,M=void 0!==D&&D,C=e.imgHeight,Z=void 0===C?"200":C,Y=(0,c.useRef)(),P=(0,c.useContext)(u.Z),R=P.currentUser,A=P.toggleAuthModal,H=P.setIsLogin,I=P.hasSession,F=P.appConfig,B=(0,c.useRef)(I),U=(0,h.useRouter)(),z=(0,c.useState)(!1),V=z[0],W=z[1];(0,c.useEffect)((function(){V&&R&&0==B.current&&(W(!1),J())}),[R,B]);var J=function(){if("1"==F.web_enableloginforfreecontent&&k&&!R)return H(!0),A(),void W(!0);null!=N?N():_&&(M?window.open(_,"_blank"):U.push(_))};return(0,r.jsxs)(o.Z,{className:"h-100",children:[(0,r.jsx)("img",{ref:Y,src:(0,p.isEmpty)(x)?"1"==F.web_enablelogoasdefaultimg?F.web_logotransparent:"/empty-image-web.svg":x,className:x?"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"==F.web_enablecourselike&&(0,r.jsx)(d.ZP,{courseId:m,likesCount:n,itemType:v})]}),w&&(0,r.jsx)(l.Z,{className:"mb-3 sub-text",tag:"div",children:w}),y&&(0,r.jsx)(l.Z,{className:"mb-2",tag:"h6",children:y}),j&&(N||_)&&(0,r.jsx)(a.Z,{color:"primary",onClick:J,block:!0,className:"mt-auto",children:S}),L&&L]})]})}},67387:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return v}});var r=n(47568),o=n(97582),s=n(85893),i=n(23138),l=n(35773),a=n(95305),c=n(83805),u=n(12956),h=n(89885),p=n(67294),d=n(96076),f=n(47041),m=n(9888),g=n(58533);function v(e){var t=(0,p.useContext)(h.Z).appConfig,n=(0,p.useState)(e.books.data),d=n[0],f=n[1],v=(0,p.useState)(0),b=v[0],y=v[1],w=(0,p.useState)(e.books.total),x=w[0],_=w[1],T=function(){var e=(0,r.Z)((function(e){var t;return(0,o.__generator)(this,(function(n){switch(n.label){case 0:return y(b=e?0:b+10),[4,(0,c.y)("",b)];case 1:return t=n.sent(),f(e?t.data:d.concat(t.data)),_(t.data.length),[2]}}))}));return function(t){return e.apply(this,arguments)}}();return(0,s.jsxs)("div",{children:[(0,s.jsx)("h5",{className:"text-center mb-4",children:t.web_menubooksname}),(0,s.jsx)(g.Z,{dataLength:(null===d||void 0===d?void 0:d.length)||0,next:T,hasMore:x>=10,loader:(0,s.jsx)("div",{className:"text-center text-gray font-bold",children:"Loading.."}),endMessage:0!=(null===d||void 0===d?void 0:d.length)?(0,s.jsx)("div",{className:"text-center text-gray font-bold"}):(0,s.jsx)(i.Z,{color:"primary",isOpen:!0,children:"No books found"}),children:(0,s.jsx)(l.Z,{className:"m-0",children:d.map((function(e){return(0,s.jsx)(a.Z,{md:"4",className:"mb-4",children:(0,s.jsx)(u.Z,{title:e.title,image:e.image,subText:(0,s.jsx)(m.Z,{price:e.price_without_shipping,mrp:e.mrp}),link:"/books/".concat(e.id,"-").concat(e.slugifytitle)})},e.id)}))})})]})}v.getInitialProps=function(){var e=(0,r.Z)((function(e){var t,n;return(0,o.__generator)(this,(function(r){switch(r.label){case 0:return t=(0,f.getCookie)(d.z1,e),[4,(0,c.y)(t,0)];case 1:return(n=r.sent()).total=n.data.length,[2,{books:n}]}}))}));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",l="Percent",a={unit:l,value:.8};function c(e){return"number"===typeof e?{unit:l,value:100*e}:"string"===typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:i,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:l,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),a):(console.warn("scrollThreshold should be string or number"),a)}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 l(){o&&clearTimeout(o)}function a(){var a=this,c=Date.now()-i,u=arguments;function h(){i=Date.now(),n.apply(a,u)}function p(){o=void 0}s||(r&&!o&&h(),l(),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),a.cancel=function(){l(),s=!0},a}(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),l=n.n(i),a=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:a.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,a.mx)(l()(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),l=n.n(i),a=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:a.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,a.mx)(l()(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=51809,e(e.s=t);var t}));var t=e.O();_N_E=t}]);