(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6422],{69135:function(e,t,n){e.exports=n(59357)},61123:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var s=n(59499),r=n(53967),i=n.n(r),o=n(67294),a=[".text-ellipsis-1.jsx-718368558{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}","@supports(-webkit-line-clamp:1){.text-ellipsis-1.jsx-718368558{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;}}",".text-ellipsis-2.jsx-718368558{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}","@supports(-webkit-line-clamp:2){.text-ellipsis-2.jsx-718368558{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;}}",".text-ellipsis-3.jsx-718368558{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}","@supports(-webkit-line-clamp:3){.text-ellipsis-3.jsx-718368558{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;}}",".text-ellipsis-4.jsx-718368558{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}","@supports(-webkit-line-clamp:4){.text-ellipsis-4.jsx-718368558{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;}}",".text-ellipsis-5.jsx-718368558{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}","@supports(-webkit-line-clamp:5){.text-ellipsis-5.jsx-718368558{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;}}",".accordion-wrapper.jsx-718368558+*.jsx-718368558{margin-top:.5em;}",".accordion-header.jsx-718368558{border-bottom:2px solid #f2f2f2;}",".accordion-header.opacity-less.jsx-718368558{opacity:.3;}",".accordion-item.jsx-718368558{overflow:hidden;height:auto;max-height:9999px;}",".accordion-item.collapsed.jsx-718368558{max-height:0;height:0;}",".accordion-title.jsx-718368558{cursor:pointer;color:#1c1c1c;display:inline-block;}",".accordion-title.jsx-718368558:hover,.accordion-title.accordion-open.jsx-718368558{color:#141415;}"];a.__hash="718368558";var l=n(85893);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,s)}return n}function d(e){for(var t=1;t0}).join(" ")}),e.prev=2,e.next=5,(0,f.C3)("?utm_source=inlinebanner",o,k);case 5:(a=e.sent)&&"success"===a.status.toLowerCase()&&(c({success:!0}),u((0,g.f)("Feedback successful!"))),e.next=14;break;case 9:e.prev=9,e.t0=e.catch(2),u((0,g.f)("Oops! Something went wrong.","error")),c(function(e){return y(y({},e),{},{error:!0})}),console.error("error",e.t0);case 14:case"end":return e.stop()}},e,null,[[2,9]])})),function(e,n){return t.apply(this,arguments)}),[u,h,_,k,w.mobile]);return a.notAvailable?null:(0,l.jsxs)("div",{className:"my-4 bg-gray-10 px-lg-10 py-lg-6 p-4",children:[a.success&&(0,l.jsxs)("div",{className:"d-flex flex-column align-items-center",children:[(0,l.jsx)("div",{className:"fs-4 fw-bold",children:"Thank You!"}),(0,l.jsx)("div",{className:"fw-bold",children:"Your feedback has been submitted."})]}),a.error&&(0,l.jsxs)("div",{className:"d-flex flex-column align-items-center",children:[(0,l.jsx)("div",{className:"fs-4 fw-bold",children:"Oops!"}),(0,l.jsx)("div",{className:"fw-bold",children:"There was some problem submitting your feedback, please try again later. :)"})]}),!a.error&&!a.success&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"fw-600 mb-4",children:"How likely are you to recommend Prepp.in to a friend or a colleague?"}),(0,l.jsx)("div",{className:"row g-0 align-items-center justify-content-around mb-2",onMouseLeave:function(){return c(function(e){return y(y({},e),{},{temp:0})})},children:(0,d.Z)(Array(10).keys()).map(function(e){return(0,l.jsx)("div",{className:"col-auto",children:(0,l.jsxs)("button",{className:"btn position-relative m-0 p-0",onClick:function(){return c(function(t){return y(y({},t),{},{score:e+1},9===e&&{dislikes:[],reason:""})})},onFocus:function(){return c(function(t){return y(y({},t),{},{temp:e+1})})},onMouseOver:function(){return c(function(t){return y(y({},t),{},{temp:e+1})})},type:"button",children:[(0,l.jsx)("div",{className:"position-absolute top-50 start-50 translate-middle ".concat(a.score===e+1||a.temp===e+1?"text-white":"text-primary"),style:h?{fontSize:"10px",lineHeight:"10px"}:{},children:e+1}),(0,l.jsx)(N,{fill:a.score-1,className:"form-check-input",id:t,onChange:function(){return c(function(t){var n=(0,d.Z)(t.dislikes),s=n.indexOf(e);return s>-1?n.splice(s,1):n.push(e),y(y({},t),{},{dislikes:n})})},type:"checkbox",value:e}),e]})})},e)})}),(0,l.jsx)("textarea",{className:"form-control",id:"other-reason",maxLength:300,name:"reason",onChange:function(e){return c(function(t){return y(y({},t),e.target.value.length<=300&&{reason:e.target.value})})},placeholder:"Write your views here (min. 10 words)",style:{height:"100px"},value:a.reason}),(0,l.jsx)("div",{className:"row justify-content-end",children:(0,l.jsxs)("div",{className:"col-auto text-gray fs-xmd",children:[a.reason.length,"/300"]})})]}),!a.error&&!a.success&&0!==a.score&&(0,l.jsx)("div",{className:"row justify-content-center",children:(0,l.jsx)("div",{className:"col-9 col-lg-4",children:(0,l.jsx)("button",{className:"btn btn-secondary px-lg-4 py-lg-3 mt-4 w-100",disabled:10!==a.score&&(null===(n=a.dislikes)||void 0===n?void 0:n.length)===0||a.reason.length>0&&a.reason.trim().split(" ").filter(function(e){return e.length>0}).length<10||0===a.score,onClick:function(){return Z(a,r)},type:"button",children:"Submit"})})})]})},_=n(41609),Z=n.n(_),P=n(41664),L=n.n(P),D=n(86815),I=n(9154),E=function(e){var t,n,s,r,i=e.index,a=e.options,c=e.parent,u=void 0===c?{}:c,m=e.text.default,h=void 0===m?"":m,p=e.exams,x=void 0===p?[]:p,f=e.topic,v=e.subject,j=e.id,b=e.slug,g=(0,o.useState)({choice:void 0}),w=g[0],y=g[1];return(0,l.jsxs)("div",{className:"border rounded p-2 mt-4",children:[(0,l.jsxs)("div",{className:"row my-4",children:[(0,l.jsxs)("div",{className:"col-auto fw-600",children:[i+1,")"]}),(0,l.jsxs)("div",{className:"col",children:[!Z()(null==u||null===(t=u.text)||void 0===t?void 0:t.default)&&(0,l.jsx)("div",{className:"content-section mb-4 fw-600",children:(0,l.jsx)(D.Z,{data:null==u||null===(n=u.text)||void 0===n?void 0:n.default})}),!Z()(h)&&(0,l.jsx)("div",{className:"content-section question fw-600 scroller",children:(0,l.jsx)(D.Z,{data:h})})]})]}),x.length>0&&(0,l.jsx)("div",{className:"row align-items-center mb-4",children:[].concat((0,d.Z)(x),[{tagName:null==v||null===(s=v.name)||void 0===s?void 0:s.default},{tagName:null==f||null===(r=f.name)||void 0===r?void 0:r.default}]).map(function(e){var t=e.tagName;return(0,l.jsx)("div",{className:"col-auto",children:(0,l.jsx)("div",{className:"bg-gray-50 rounded text-gray fs-md fw-bold px-2 py-1",children:t})},t)})}),(0,l.jsx)(I.Z,{choice:w.choice,isSolution:void 0!==w.choice,lang:"default",options:void 0===a?[]:a,qIndex:j,setAnswer:y}),(0,l.jsx)("div",{className:"row justify-content-end my-2",children:(0,l.jsx)("div",{className:"col-auto",children:(0,l.jsx)(L(),{className:"text-decoration-none text-primary",href:"/question/".concat(b),children:"View Solution"})})})]})};function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,s)}return n}function T(e){for(var t=1;t=t.scrollHeight-100&&window.scrollY0&&(0,l.jsxs)("div",{children:[(0,l.jsx)("h3",{className:"h5 fw-600",children:"Quiz of the Day"}),(0,l.jsx)("div",{className:"row flex-nowrap scroller",children:null==G||null===(E=G.nodes)||void 0===E?void 0:E.map(function(e){return(0,l.jsx)("div",{className:"col-9 col-lg-5",style:{minHeight:"130px"},children:(0,l.jsx)(H.Z,{data:e})},e.id)})})]}),(null==J||null===(C=J.nodes)||void 0===C?void 0:C.length)>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("hr",{className:"bg-gray-300"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("h3",{className:"h5 fw-600",children:" Live Tests"}),(0,l.jsx)("div",{className:"row flex-nowrap scroller",children:null==J||null===(T=J.nodes)||void 0===T?void 0:T.map(function(e){return(0,l.jsx)("div",{className:"col-9 col-lg-5",children:(0,l.jsx)(H.Z,{customClass:"card p-2",data:e,type:"LIVE_TEST"})},e.id)})})]})]}),(null==K||null===(F=K.nodes)||void 0===F?void 0:F.length)>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("hr",{className:"bg-gray-300"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("h3",{className:"h5 fw-600",children:" Live Quizzes"}),(0,l.jsx)("div",{className:"row flex-nowrap scroller",children:null==K||null===(A=K.nodes)||void 0===A?void 0:A.map(function(e){return(0,l.jsx)("div",{className:"col-9 col-lg-5",children:(0,l.jsx)(H.Z,{customClass:"card p-2",data:e,type:"LIVE_QUIZ"})},e.id)})})]})]}),(null==$||null===(Q=$.nodes)||void 0===Q?void 0:Q.length)>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("hr",{className:"bg-gray-300"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("h3",{className:"h5 fw-600",children:"Full Syllabus Mock Tests"}),(0,l.jsx)("div",{className:"row flex-nowrap scroller",children:null==$||null===(W=$.nodes)||void 0===W?void 0:W.map(function(e){return(0,l.jsx)("div",{className:"col-9 col-lg-5",style:{minHeight:"130px"},children:(0,l.jsx)(H.Z,{data:e})},e.id)})})]})]}),en.length>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("hr",{className:"bg-gray-300"}),(0,l.jsx)(Y,{data:en,title:"Previous Year Papers",year:!0})]}),(null==X||null===(q=X.nodes)||void 0===q?void 0:q.length)>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("hr",{className:"bg-gray-300"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("h3",{className:"h5 fw-600",children:"Daily Free Quiz"}),(0,l.jsx)("div",{className:"row flex-nowrap scroller",children:null==X||null===(z=X.nodes)||void 0===z?void 0:z.map(function(e){return(0,l.jsx)("div",{className:"col-9 col-lg-5",style:{minHeight:"130px"},children:(0,l.jsx)(H.Z,{data:e})},e.id)})})]})]}),et.length>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("hr",{className:"bg-gray-300"}),(0,l.jsx)(Y,{data:et,title:"Subject-wise Mock Tests"})]}),es.length>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("hr",{className:"bg-gray-300"}),(0,l.jsx)(Y,{data:es,title:"Topic-wise Mock Tests"})]}),(null==ee||null===(B=ee.nodes)||void 0===B?void 0:B.length)>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("hr",{className:"bg-gray-300"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("h3",{className:"h5 fw-600",children:"Other Important Mock Tests"}),(0,l.jsx)("div",{className:"row flex-nowrap scroller",children:null==ee||null===(U=ee.nodes)||void 0===U?void 0:U.map(function(e){return(0,l.jsx)("div",{className:"col-9 col-lg-5",style:{minHeight:"130px"},children:(0,l.jsx)(H.Z,{data:e})},e.id)})})]})]}),(0,l.jsx)(R,{examData:t,content:{postAuthor:u,updatedOn:m,description:f,metaData:j,newsArticleLanguages:P},tabName:N,enableCreditLinks:!0}),(0,l.jsx)(c,{slotName:"footerslot_1"}),(0,l.jsx)(a.Z,{whenIdle:!0,children:(0,l.jsx)(k,{})}),(0,l.jsx)(a.Z,{whenIdle:!0,children:(0,l.jsx)(V,{commentsList:{comments:g,commentsInfo:y,pageNo:1,isLoading:!1},commentsTabName:N,examData:t,id:n,pageType:"exam"})})]})}return"news"===O?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(M,{news:h,hasNext:p,exam:_,examName:t.shortForm}),d.length>0&&(0,l.jsx)(S,{examData:t,questionParams:r,examQuestions:d}),(0,l.jsx)(c,{slotName:"footerslot_1"}),(0,l.jsx)(a.Z,{whenIdle:!0,children:(0,l.jsx)(k,{})}),(0,l.jsx)(a.Z,{whenIdle:!0,children:(0,l.jsx)(V,{commentsList:{comments:g,commentsInfo:y,pageNo:1,isLoading:!1},commentsTabName:N,examData:t,id:n,pageType:"exam"})})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(R,{examData:t,content:{postAuthor:u,updatedOn:m,description:f,metaData:j,newsArticleLanguages:P},tabName:N,enableCreditLinks:!0}),d.length>0&&(0,l.jsx)(S,{examData:t,questionParams:r,examQuestions:d}),(0,l.jsx)(c,{slotName:"footerslot_1"}),(0,l.jsx)(a.Z,{whenIdle:!0,children:(0,l.jsx)(k,{})}),!("single_news"===O&&!Number.isInteger(n))&&(0,l.jsx)(a.Z,{whenIdle:!0,children:(0,l.jsx)(V,{commentsList:{comments:g,commentsInfo:y,pageNo:1,isLoading:!1},commentsTabName:N,examData:t,id:n,pageType:"exam"})})]})}},59357:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useAmp",{enumerable:!0,get:function(){return o}});var s=n(38754)._(n(67294)),r=n(31240),i=n(68911);function o(){return(0,i.isInAmpMode)(s.default.useContext(r.AmpStateContext))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},67031:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var s=n(87462),r=n(67294),i=r.useLayoutEffect;function o(){return!0}var a=function(e){var t=(0,r.useRef)(null),n=(0,r.useReducer)(o,!1),a=n[0],l=n[1],c=e.noWrapper,d=e.ssrOnly,u=e.whenIdle,m=e.whenVisible,h=e.promise,p=e.on,x=void 0===p?[]:p,f=e.children,v=e.didHydrate,j=function(e,t){if(null==e)return{};var n,s,r={},i=Object.keys(e);for(s=0;s=0||(r[n]=e[n]);return r}(e,["noWrapper","ssrOnly","whenIdle","whenVisible","promise","on","children","didHydrate"]);i(function(){t.current.hasChildNodes()||l()},[]),(0,r.useEffect)(function(){a&&v&&v()},[a]),(0,r.useEffect)(function(){if(!d&&!a){var e=t.current,n=[];if(h&&h.then(l,l),m){var s=c?e:e.firstElementChild;if(!s||"undefined"==typeof IntersectionObserver)return l();var r=new IntersectionObserver(function(e){e.forEach(function(e){(e.isIntersecting||e.intersectionRatio>0)&&l()})},"object"==typeof m?m:{rootMargin:"250px"});r.observe(s),n.push(function(){r.disconnect()})}if(u){if("undefined"!=typeof requestIdleCallback){var i=requestIdleCallback(l,{timeout:500});n.push(function(){cancelIdleCallback(i)})}else{var o=setTimeout(l,2e3);n.push(function(){clearTimeout(o)})}}return[].concat(x).forEach(function(t){e.addEventListener(t,l,{once:!0,passive:!0}),n.push(function(){e.removeEventListener(t,l,{})})}),function(){n.forEach(function(e){e()})}}},[a,x,d,u,m,v,h,c]);var b="string"==typeof c?c:"div";return a?c?f:(0,r.createElement)(b,(0,s.Z)({ref:t,style:{display:"contents"}},j),f):(0,r.createElement)(b,(0,s.Z)({},j,{ref:t,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:""}}))}},14666:function(e,t,n){"use strict";function s(e){if(Array.isArray(e))return e}n.d(t,{Z:function(){return s}})},14882:function(e,t,n){"use strict";function s(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{Z:function(){return s}})},17674:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var s=n(14666),r=n(2937),i=n(14882);function o(e,t){return(0,s.Z)(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var s,r,i,o,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(s=i.call(n)).done)&&(a.push(s.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw r}}return a}}(e,t)||(0,r.Z)(e,t)||(0,i.Z)()}}}]);