PageSourceSearch

https://www.curiousjr.com/_next/static/chunks/5054.6237bb68e532f7a7.js

js curiousjr.com collected 2026-09-24 10:27:09 UTC 32,621 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5054],{88250:function(e,t,n){n.d(t,{J:function(){return J}});var r=n(651),a=n(92379),i=n(19841),l=n(42509),o=n(41446),s=n(88695),c={current:"bg-white/50",graded:"bg-[#10b981]","needs-review":"bg-[#f59e0b]","not-attended":"bg-[#b7b7b7]",pending:"bg-[#b7b7b7]"},u=function(e){var t=e.questions,n=e.currentQuestion,l=e.onSelectQuestion,u=(0,a.useRef)(null),d=(0,a.useRef)(new Map),f=(0,a.useState)(!1),h=f[0],m=f[1],x=(0,a.useState)(!1),v=x[0],b=x[1],g=(0,a.useState)(!1),p=g[0],y=g[1],N=(0,a.useCallback)((function(){var e=u.current;if(e){var t=e.scrollWidth>e.clientWidth+1;m(t),b(e.scrollLeft>1),y(e.scrollLeft+e.clientWidth<e.scrollWidth-1)}}),[]);(0,a.useEffect)((function(){var e=u.current;if(e){N();var t=new ResizeObserver(N);return t.observe(e),e.addEventListener("scroll",N,{passive:!0}),function(){t.disconnect(),e.removeEventListener("scroll",N)}}}),[t.length,N]),(0,a.useEffect)((function(){var e=d.current.get(n);null===e||void 0===e||e.scrollIntoView({inline:"nearest",block:"nearest",behavior:"smooth"})}),[n]);var j=function(e){var t=u.current;if(t){var n=.8*t.clientWidth;t.scrollBy({left:"left"===e?-n:n,behavior:"smooth"})}};return(0,r.jsxs)("div",{className:"relative py-2",children:[h&&v?(0,r.jsx)("button",{type:"button","aria-label":"Scroll questions left",onClick:function(){return j("left")},className:"absolute left-0 top-1/2 z-10 flex size-6 -translate-y-1/2 items-center justify-center rounded-full bg-white p-1 shadow-[0_1.25px_5px_rgba(0,0,0,0.08)]",children:(0,r.jsx)(o.Z,{className:"size-4 text-[#334155]"})}):null,(0,r.jsx)("div",{ref:u,className:(0,i.Z)("flex items-center gap-2 overflow-x-auto scroll-smooth scrollbar-hide",h&&v?"pl-8":void 0,h&&p?"pr-8":void 0),children:t.map((function(e){var t=e.id===n,a=t?"current":e.status;return(0,r.jsxs)("button",{ref:function(t){t?d.current.set(e.id,t):d.current.delete(e.id)},type:"button",onClick:function(){return l(e.id)},"aria-current":t?"true":void 0,className:(0,i.Z)("flex size-10 shrink-0 flex-col items-center justify-center rounded-lg",t?"bg-[#ff8a3b] text-white shadow-[0_3px_6px_rgba(0,0,0,0.08)]":"border border-[#efefef] bg-white text-[#334155] shadow-[0_3px_6px_rgba(0,0,0,0.08)]"),children:[(0,r.jsx)("span",{className:"text-xs font-bold leading-4",children:e.label}),(0,r.jsx)("span",{className:(0,i.Z)("mt-0.5 size-1 rounded-full",c[a]),"aria-hidden":!0})]},e.id)}))}),h&&p?(0,r.jsx)("button",{type:"button","aria-label":"Scroll questions right",onClick:function(){return j("right")},className:"absolute right-0 top-1/2 z-10 flex size-6 -translate-y-1/2 items-center justify-center rounded-full bg-white p-1 shadow-[0_1.25px_5px_rgba(0,0,0,0.08)]",children:(0,r.jsx)(s.Z,{className:"size-4 text-[#334155]"})}):null]})},d=/<\s*\/?\s*(script|iframe|object|embed|form|input|button|link|meta|style)\b[^>]*>/gi;function f(e){if(!e)return"";var t=function(e){return e?e.replace(d,"").replace(/\son\w+\s*=\s*(['"]).*?\1/gi,"").replace(/javascript:/gi,""):""}(e);return t=(t=t.replace(/\$\$([\s\S]+?)\$\$/g,(function(e,t){try{return n(53538).renderToString(t.trim(),{displayMode:!0,throwOnError:!1})}catch(r){return e}}))).replace(/\$([^$\n]+?)\$/g,(function(e,t){try{return n(53538).renderToString(t.trim(),{displayMode:!1,throwOnError:!1})}catch(r){return e}}))}var h=function(e){var t=e.html,n=e.className,a=f(t);return(0,r.jsx)("div",{className:(0,i.Z)("prose prose-sm max-w-none text-[#1b2124]",n),dangerouslySetInnerHTML:{__html:a}})};function m(e){var t=e.className;return(0,r.jsxs)("svg",{width:"244",height:"244",viewBox:"0 0 244 244",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,className:t,children:[(0,r.jsx)("circle",{cx:"122",cy:"122",r:"122",fill:"#FFC254",opacity:"0.05"}),(0,r.jsx)("circle",{cx:"122",cy:"122",r:"103",fill:"#FFC254",opacity:"0.1"}),(0,r.jsx)("circle",{cx:"122",cy:"122",r:"83",fill:"#FFC254",opacity:"0.15"}),(0,r.jsx)("circle",{cx:"122",cy:"122",r:"60",fill:"#FFC254",opacity:"0.2"})]})}var x,v=function(e){var t,n=e.questionNumber,o=e.questionText,s=e.marksAwarded,c=e.maxMarks,u=e.suppressScores,d=void 0!==u&&u,f=(0,l.Z)().isMobile,x=(0,a.useState)(!1),v=x[0],b=x[1],g=(0,a.useState)(!1),p=g[0],y=g[1],N=(0,a.useRef)(null),j=d?"\u2014":(t=c,"".concat(String(s).padStart(2,"0"),"/").concat(String(t).padStart(2,"0"))),w=(0,a.useCallback)((function(){var e=N.current;e&&f?requestAnimationFrame((function(){if(e.classList.contains("line-clamp-2")){var t=e.clientHeight;e.classList.remove("line-clamp-2");var n=e.scrollHeight;e.classList.add("line-clamp-2"),y(n>t+1)}})):y(!1)}),[f]);return(0,a.useEffect)((function(){b(!1)}),[o]),(0,a.useEffect)((function(){var e,t=N.current;if(t&&f){w();var n=new ResizeObserver((function(){return w()}));return n.observe(t),(null===(e=document.fonts)||void 0===e?void 0:e.ready)&&document.fonts.ready.then((function(){return w()})),function(){return n.disconnect()}}y(!1)}),[f,w,o]),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsxs)("div",{className:"flex gap-1 text-base font-semibold leading-6 text-[#1b2124]",children:[(0,r.jsxs)("span",{className:"shrink-0",children:["Q",n,"."]}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("div",{ref:N,className:(0,i.Z)(!f||v?"":"line-clamp-2",f&&v&&"max-h-[20vh] overflow-y-auto"),children:(0,r.jsx)(h,{html:o,className:"text-sm md:text-base md:[&_.prose]:text-base [&_.prose]:font-semibold [&_.prose]:leading-6 [&_.prose]:text-[#1b2124]"})}),f&&(p||v)?(0,r.jsx)("button",{type:"button",onClick:function(){return b((function(e){return!e}))},className:"mt-1 text-sm font-semibold text-[#ff6d0a]",children:v?"Read less":"Read more"}):null]})]}),(0,r.jsx)("div",{className:"w-full overflow-clip rounded-xl border border-[#fde272]",children:(0,r.jsxs)("div",{className:"relative flex w-full items-center gap-3 overflow-clip bg-[#fff6e5] px-4 py-2",children:[(0,r.jsx)(m,{className:"pointer-events-none absolute right-[-85px] top-1/2 size-[244px] -translate-y-1/2"}),(0,r.jsx)("p",{className:"relative z-[1] flex-1 text-sm font-medium md:text-lg md:font-semibold leading-7 text-[#1b2124]",children:"Marks Scored"}),(0,r.jsx)("p",{className:"relative z-[1] shrink-0 text-center text-[20px] md:text-2xl font-bold leading-8 text-[#542c0d]",children:j})]})})]})},b=[{id:"feedback",label:"Feedback"},{id:"response",label:"My Response"}
1],g=function(e){var t=e.activeTab,n=e.onChange;return(0,r.jsx)("div",{className:"flex items-center gap-2 bg-white md:hidden",children:b.map((function(e){var a=t===e.id;return(0,r.jsxs)("button",{type:"button",onClick:function(){return n(e.id)},"aria-selected":a,className:"flex shrink-0 flex-col items-center justify-center gap-2 px-2 pt-2.5",children:[(0,r.jsx)("span",{className:(0,i.Z)("text-center text-sm leading-5",a?"font-semibold text-[#ff6d0a]":"font-normal text-[#757575]"),children:e.label}),(0,r.jsx)("span",{"aria-hidden":!0,className:(0,i.Z)("h-[3px] w-full rounded-t-[4px] bg-[#ff6d0a]",!a&&"opacity-0")})]},e.id)}))})},p=function(e){var t=e.feedbackText,n=e.showTitle,a=void 0===n||n;return(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[a?(0,r.jsx)("h2",{className:"text-xl font-semibold leading-[30px] text-[#1b2124]",children:"Feedback"}):null,(0,r.jsx)("div",{className:"rounded-xl border border-[#d9dce1] bg-white p-[17px]",children:(0,r.jsx)(h,{html:t,className:"break-words text-[14px] md:text-lg leading-7 text-[#1e293b]"})})]})},y=n(59397),N=n(90882),j=n(31501),w=n(61079),k=n(31665);!function(e){e.ASK_MENTOR_CLICK="ask_mentor_click"}(x||(x={}));var S=n(22718),C=n(69380),_=function(e){var t=e.mentorshipMapData,n=e.myRoomData,a=e.currentQuestionRow,l=e.batchId,o=e.batchName,s=e.batchType,c=e.testId,u=e.testName,d=e.selectedCohort,f=e.className,h=(0,y.useRouter)(),m=(0,N.l8)().user;return(0,r.jsxs)("div",{className:(0,i.Z)("flex w-full shrink-0 items-center gap-4 roun
1ded-xl border border-[#f4d392] bg-[#fefbe8] px-4 py-3 md:p-4",f),children:[(0,r.jsx)("p",{className:"min-w-0 flex-1 text-sm md:text-base font-medium md:font-semibold leading-6 text-[#1b2124]",children:"Want to discuss your feedback with your mentor?"}),(0,r.jsx)("button",{type:"button",onClick:function(){var e,r,i,f=null===t||void 0===t?void 0:t.userId,v=null===t||void 0===t?void 0:t.studentMentorMappingId;if(f&&v){var b,g,p,y,N,_,R,Z,E,P=null!==(b=null!==c&&void 0!==c?c:h.query.testId)&&void 0!==b?b:"",M=null!==(g=null!==l&&void 0!==l?l:h.query.batchSlug)&&void 0!==g?g:"",q=null!==(p=null===a||void 0===a?void 0:a.qbgQuestionId)&&void 0!==p?p:"";_={assessment_id:P,question_id:q,batch_id:M,batch_name:null!==o&&void 0!==o?o:"",batch_type:null!==s&&void 0!==s?s:"",test_id:P,test_name:null!==u&&void 0!==u?u:"",question_number:null!==(y=null===a||void 0===a?void 0:a.questionNumber)&&void 0!==y?y:0,selected_cohort:null!==(N=null!==d&&void 0!==d?d:null===m||void 0===m||null===(e=m.profileId)||void 0===e?void 0:e.cohortId)&&void 0!==N?N:"",mentor_id:f},(0,k._k)({eventName:x.ASK_MENTOR_CLICK,eventParams:(0,w.Z)((0,j.Z)({screen:"ai_grader_evaluation_cta_bar"},_),{is_user_status_required:!0})});var T={batchName:null!==o&&void 0!==o?o:"",testName:null!==u&&void 0!==u?u:"",questionNumber:null!==(R=null===a||void 0===a?void 0:a.questionNumber)&&void 0!==R?R:0,slug:P?"/batches/".concat(h.query.batchSlug,"/tests/").concat(P,"/test-result"):"",mentorName:null!==(Z=null===n||void 0===n||null===(r=n.mentor)||void 0===r?void 0:r.name)&&void 0!==Z?Z:"",otherInfo:{assessment_id:P,question_id:q,batch_id:h.query.batchSlug,batch_type:null!==s&&void 0!==s?s:"",test_id:P,selected_cohort:null!==(E=null!==d&&void 0!==d?d:null===m||void 0===m||null===(i=m.profileId)||void 0===i?void 0:i.cohortId)&&void 0!==E?E:"",mentor_id:f}};if((0,S.Jn)())(0,S.e9)(C.QW.OPEN_MENTOR_CHAT_AI_GRADER,JSON.stringify({map:t,room:n,question:a,messageInfo:T}));else{var L=btoa(encodeURIComponent(JSON.stringify(T)));h.push("/v2/chat/".concat(v,"/mentor/").concat(f,"?messageInfo=").concat(L))}}},className:"h-8 md:h-10 shrink-0 rounded-[10px] border border-[#404040] bg-[#1b2124] px-2 md:px-[17.5px] text-base font-semibold leading-6 text-white shadow-[0_3px_0_#404040]",children:"Connect Now"})]})},R=n(33861),Z=function(e){var t=e.className,n=e.label,a=void 0===n?"Loading PDF":n,l=e.minHeightClass,o=void 0===l?"min-h-[440px]":l;return(0,r.jsxs)("div",{className:(0,i.Z)("flex flex-col items-center justify-center gap-3 rounded-lg bg-gray-50 p-8",o,t),children:[(0,r.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-gray-200 border-t-primary"}),(0,r.jsx)("p",{className:"text-sm text-gray-500",children:a})]})};function E(e){return{fileKey:e,rotationDelta:0,pageNativeRotations:{}}}function P(e,t){for(var n=e.length-1;n>=0;n--){var r,a=e[n],i=a.node,l=a.rawStart,o=null!==(r=i.textContent)&&void 0!==r?r:"",s=l+o.length;if(t>=l&&t<=s)return{node:i,offset:Math.min(t-l,o.length)}}return null}function M(e,t,n){if(n<=t||0===e.length)return null;var r=P(e,t),a=P(e,n);if(!r||!a)return null;var i=document.createRange();return i.setStart(r.node,r.offset),i.setEnd(a.node,a.offset),i}function q(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function T(e,t,n){var r=n.toLowerCase().replace(/\s+/g,"");if(!r)return[];var a=function(e){for(var t=[],n="",r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:function(e){var t=e.parentElement;return(null===t||void 0===t?void 0:t.classList.contains("endOfContent"))?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),a=r.nextNode();a;){var i,l=a,o=null!==(i=l.textContent)&&void 0!==i?i:"";o&&(t.push({node:l,rawStart:n.length}),n+=o),a=r.nextNode()}for(var s=[],c="",u=0;u<n.length;u++){var d=n[u];/\s/.test(d)||(s.push(u),c+=d.toLowerCase())}return{normalizedText:c,normToRaw:s,nodes:t}}(e),i=a.normalizedText,l=a.normToRaw,o=a.nodes;if(!i||0===o.length)return[];for(var s=t.getBoundingClientRect(),c=[],u=0;u<i.length;){var d=i.indexOf(r,u);if(-1===d)break;var f=d+r.length,h=l[d],m=l[f-1];if(void 0!==h&&void 0!==m){var x=M(o,h,m+1);if(x){var v=[],b=!0,g=!1,p=void 0;try{for(var y,N=Array.from(x.getClientRects())[Symbol.iterator]();!(b=(y=N.next()).done);b=!0){var j=y.value;j.width>0&&j.height>0&&v.push(q(j,s))}}catch(w){g=!0,p=w}finally{try{b||null==N.return||N.return()}finally{if(g)throw p}
1}v.length>0&&c.push(v)}u=f}else u=f}return c}function L(e){var t=e.rects,n=e.isActive,a=void 0!==n&&n,i=e.matchIndex;return 0===t.length?null:(0,r.jsx)(r.Fragment,{children:t.map((function(e,t){return(0,r.jsx)("div",{"data-search-match":i,className:a?"absolute bg-[#ff8a3b]/50 mix-blend-multiply":"absolute bg-yellow-300/55 mix-blend-multiply",style:{left:e.left,top:e.top,width:e.width,height:e.height}},"".concat(null!==i&&void 0!==i?i:"m","-").concat(t))}))})}function I(e){var t=e.pageRefs,n=e.query,i=e.pageNumber,l=e.textLayerVersion,o=e.globalIndexOffset,s=e.activeGlobalIndex,c=e.searchGeneration,u=e.zoomScale,d=e.onMatchCountChange,f=(0,a.useState)([]),h=f[0],m=f[1];return(0,a.useEffect)((function(){var e=t.current[i],r=n.trim();if(!e||!r)return m([]),void d(i,0,c);var a=e.querySelector(".react-pdf__Page__textContent");if(!a||0===a.childElementCount)return m([]),void d(i,0,c);var l=T(a,e,r).map((function(e){return e.map((function(e){return{left:e.left/u,top:e.top/u,width:e.width/u,height:e.height/u}}))}));m(l),d(i,l.length,c)}),[n,l,t,i,d,c,u]),n.trim()&&0!==h.length?(0,r.jsx)("div",{className:"pointer-events-none absolute inset-0",children:h.map((function(e,t){var n=o+t;return(0,r.jsx)(L,{rects:e,matchIndex:n,isActive:s===n},n)}))}):null}var F=n(74205),z=n(8909),D=n(15121),O=n(51524),A=n(22762),Q=n(51339),W=n(54454),G=n(30567),K=n(86889),B=function(e){var t=e.pdfUrl,i=e.isPdfLoading,l=void 0!==i&&i,o=e.targetPage,s=e.isExpanded,c=void 0!==s&&s,u=e.onToggleExpand,d=(0,a.useRef)(null),f=(0,a.useRef)(null),h=(0,a.useRef)(null),m=(0,a.useState)(null),x=m[0],v=m[1],b=(0,a.useState)(1),g=b[0],p=b[1],y=(0,a.useState)(null),N=y[0],k=y[1],S=(0,a.useState)(!1),C=S[0],_=S[1],P=(0,a.useState)(!1),M=P[0],q=P[1],T=(0,a.useState)(0),L=T[0],B=T[1],H=(0,a.useState)(null),V=H[0],$=H[1],J=(0,a.useState)({}),U=J[0],X=J[1],Y=(0,a.useRef)({}),ee=(0,a.useRef)({}),te=(0,a.useRef)({}),ne=(0,a.useState)({totalPages:0,currentPage:1,error:!1}),re=ne[0],ae=ne[1],ie=function(e){var t=null!==e&&void 0!==e?e:"",n=(0,a.useState)((function(){return E(t)})),r=n[0],i=n[1];(0,a.useEffect)((function(){i(E(t))}),[t]);var l=r.fileKey===t?r:E(t),o=l.rotationDelta,s=l.pageNativeRotations,c=(0,a.useCallback)((function(){i((function(e){return(0,w.Z)((0,j.Z)({},e),{rotationDelta:(t=e.rotationDelta,(t+90)%360)});var t}))}),[]),u=(0,a.useCallback)((function(e){i((function(t){var n=e.pageNumber;return t.pageNativeRotations[n]===e.rotate?t:(0,w.Z)((0,j.Z)({},t),{pageNativeRotations:(0,w.Z)((0,j.Z)({},t.pageNativeRotations),(0,R.Z)({},n,e.rotate))})}))}),[]),d=(0,a.useCallback)((function(e){return function(){return((arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)+(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0))%360}(s[e],o)}),[s,o]);return{handleRotate:c,onPageLoadSuccess:u,getRotateForPage:d}}(t),le=ie.handleRotate,oe=ie.onPageLoadSuccess,se=ie.getRotateForPage,ce=null!==N&&void 0!==N?N:420,ue=null!==V&&void 0!==V?V:Math.round(ce),de=g*(V?ce/V:1),fe=Math.round(ue*de),he=function(e){var t=(0,a.useState)(""),n=t[0],r=t[1],i=(0,a.useState)(""),l=i[0],o=i[1],s=(0,a.useState)(0),c=s[0],u=s[1],d=(0,a.useState)({}),f=d[0],h=d[1],m=(0,a.useRef)(0);(0,a.useEffect)((function(){var e=window.setTimeout((function(){o(n.trim())}),300);return function(){return window.clearTimeout(e)}}),[n]),(0,a.useEffect)((function(){m.current+=1,h({}),u(0)}),[l]);var x=(0,a.useCallback)((function(e,t,n){n===m.current&&h((function(n){return n[e]===t?n:(0,w.Z)((0,j.Z)({},n),(0,R.Z)({},e,t))}))}),[]),v=(0,a.useCallback)((function(){return m.current}),[]),b=(0,a.useMemo)((function(){return Object.values(f).reduce((function(e,t){return e+t}),0)}),[f]),g=Object.keys(f).length,p=""!==l&&e>0&&g<e,y=(0,a.useMemo)((function(){if(0===b)return null;for(var t=c,n=1;n<=e;n++){var r,a=null!==(r=f[n])&&void 0!==r?r:0;if(t<a)return{pageNumber:n,localMatchIndex:t,globalIndex:c};t-=a}return null}),[c,f,b,e]),N=(0,a.useCallback)((function(e){for(var t=0,n=1;n<e;n++){var r;t+=null!==(r=f[n])&&void 0!==r?r:0}return t}),[f]),k=(0,a.useCallback)((function(){m.current+=1,r(""),o(""),h({}),u(0)}),[]),S=(0,a.useCallback)((function(){0!==b&&u((function(e){return(e+1)%b}))}),[b]),C=(0,a.useCallback)((function(){0!==b&&u((function(e){return(e-1+b)%b}))}),[b]);return{query:n,setQuery:r,debouncedQuery:l,currentIndex:c,totalMatches:b,currentMatch:y,isSearching:p,registerPageMatchCount:x,getSearchGeneration:v,getGlobalIndexOffset:N,clearSearch:k,goToNext:S,goToPrev:C}}(re.totalPages),me=he.query,xe=he.setQuery,ve=he.debouncedQuery,be=he.currentIndex,ge=he.totalMatches,pe=he.currentMatch,ye=he.isSearching,Ne=he.registerPageMatchCount,je=he.getSearchGeneration,we=he.getGlobalIndexOffset,ke=he.clearSearch,Se=he.goToNext,Ce=he.goToPrev;(0,a.useEffect)((function(){var e=!1;return Promise.all([n.e(539),n.e(1976),n.e(7143)]).then(n.bind(n,77849)).then((function(t){e||(t.pdfjs.GlobalWorkerOptions.workerSrc="/pdf.worker.min.js",v({Document:t.Document,Page:t.Page}))})),function(){e=!0}}),[]),(0,a.useEffect)((function(){_(!1),ke(),q(!1),B(0),$(null),X({}),Y.current={},ee.current={},te.current={},ae({totalPages:0,currentPage:1,error:!1})}),[t,ke]),(0,a.useEffect)((function(){M&&null!=N&&null==V&&$(Math.round(N))}),[M,N,V]),(0,a.useEffect)((function(){var e=d.current;if(e){var t=function(){k(e.clientWidth)};t();var n=new ResizeObserver(t);return n.observe(e),function(){return n.disconnect()}}}),[t,x,l]),(0,a.useEffect)((function(){var e=f.current;if(e){var t=function(){B(e.offsetHeight)};t();var n=new ResizeObserver(t);return n.observe(e),function(){return n.disconnect()}}}),[re.totalPages,M,ue,N]),function(e){var t=e.scrollRef,n=e.scale,r=e.setScale,i=e.minScale,l=e.maxScale,o=e.enabled,s=void 0===o||o,c=(0,a.useRef)(n);(0,a.useEffect)((function(){c.current=n}),[n]),(0,a.useEffect)((function(){var e=t.current;if(e&&s){var n=function(e){if(e.ctrlKey){e.preventDefault();var t=.005*-e.deltaY;r((function(e){return Math.max(i,Math.min(l,e+e*t))}))}};return e.addEventListener("wheel",n,{passive:!1}),function(){return e.removeEventListener("wheel",n)}}}),[t,r,i,l,s])}({scrollRef:d,scale:g,setScale:p,minScale:.5,maxScale:3,enabled:!!t}),(0,a.useEffect)((function(){if(o&&d.current){var e=d.current.querySelector('[data-page-number="'.concat(o,'"]'));null===e||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"})}}),[o]),(0,a.useEffect)((function(){var e=d.current;if(e&&0!==re.totalPages){var t=function(){if(e.scrollTop<=1)ae((function(e){return 1===e.currentPage?e:(0,w.Z)((0,j.Z)({},e),{currentPage:1})}));else{var t=e.getBoundingClientRect(),n=t.top+t.height/2,r=e.querySelectorAll("[data-page-number]"),a=1,i=1/0;r.forEach((function(e){var r=Number(e.dataset.pageNumber);if(!Number.isNaN(r)){var l=e.getBoundingClientRect();
1if(!(l.height<10))if(l.bottom>t.top&&l.top<t.bottom){var o=l.top+l.height/2,s=Math.abs(o-n);s<i&&(i=s,a=r)}}})),i!==1/0&&ae((function(e){return e.currentPage===a?e:(0,w.Z)((0,j.Z)({},e),{currentPage:a})}))}};return t(),e.addEventListener("scroll",t,{passive:!0}),function(){return e.removeEventListener("scroll",t)}}}),[re.totalPages,M,de,N]),(0,a.useEffect)((function(){if(pe&&d.current){var e=d.current.querySelector('[data-search-match="'.concat(be,'"]'));if(e)e.scrollIntoView({behavior:"smooth",block:"center"});else{var t=d.current.querySelector('[data-page-number="'.concat(pe.pageNumber,'"]'));null===t||void 0===t||t.scrollIntoView({behavior:"smooth",block:"center"})}ae((function(e){return(0,w.Z)((0,j.Z)({},e),{currentPage:pe.pageNumber})}))}}),[pe,be]),(0,a.useEffect)((function(){var e;C&&(null===(e=h.current)||void 0===e||e.focus())}),[C]);var _e=(0,a.useCallback)((function(e){return ee.current[e]||(ee.current[e]=function(){var t;X((function(n){return(0,w.Z)((0,j.Z)({},n),(0,R.Z)({},e,(null!==(t=n[e])&&void 0!==t?t:0)+1))}))}),ee.current[e]}),[]),Re=(0,a.useCallback)((function(e){return te.current[e]||(te.current[e]=function(t){Y.current[e]=t}),te.current[e]}),[]),Ze=(0,a.useCallback)((function(e){q(!0),ae({totalPages:e.numPages,currentPage:1,error:!1}),d.current&&(d.current.scrollTop=0)}),[]),Ee=(0,a.useCallback)((function(){q(!0),ae((function(e){return(0,w.Z)((0,j.Z)({},e),{error:!0,totalPages:0})}))}),[]),Pe=function(){_(!1),ke()};(0,a.useEffect)((function(){var e=d.current;if(e&&null!=N){var t=Math.max(N,fe);t>e.clientWidth?e.scrollLeft=(t-e.clientWidth)/2:e.scrollLeft=0}}),[g,fe,N,de]);var Me=l||!x||!!t&&!M&&!re.error;if(!x||l||!t&&!re.error)return(0,r.jsx)(Z,{className:"h-full min-h-[440px]"});if(!t)return(0,r.jsx)("div",{className:"flex h-full min-h-[440px] items-center justify-center bg-gray-50 p-8 text-center text-sm text-gray-500",children:"No answer sheet PDF available."});if(re.error)return(0,r.jsx)("div",{className:"flex h-full min-h-[440px] items-center justify-center bg-gray-50 p-8 text-center text-sm text-gray-500",children:"Unable to load answer sheet."});var qe=x.Document,Te=x.Page,Le=""===me.trim()?"":ge>0?"".concat(be+1," / ").concat(ge):ye?"Searching\u2026":"No results";return(0,r.jsxs)("div",{className:"relative flex h-full min-h-0 flex-col bg-white",children:[Me?(0,r.jsx)("div",{className:"absolute inset-0 z-10 bg-white",children:(0,r.jsx)(Z,{className:"h-full min-h-[440px]"})}):null,(0,r.jsxs)("div",{className:"flex shrink-0 flex-col border-b border-gray-200 bg-white",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 py-2",children:[(0,r.jsxs)("span",{className:"text-sm text-gray-600",children:["Page ",re.currentPage," / ",re.totalPages||"\u2014"]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("span",{className:"min-w-[3rem] text-center text-sm text-gray-600",children:[Math.round(100*g),"%"]}),(0,r.jsx)("button",{type:"button",onClick:function(){return p((function(e){return Math.max(.5,Number((e-.1).toFixed(2)))}))},disabled:g<=.5,"aria-label":"Zoom out",className:"rounded border p-2 disabled:cursor-not-allowed disabled:opacity-40",children:(0,r.jsx)(F.Z,{size:16})}),(0,r.jsx)("button",{type:"button",onClick:function(){return p((function(e){return Math.min(3,Number((e+.1).toFixed(2)))}))},disabled:g>=3,"aria-label":"Zoom in",className:"rounded border p-2 disabled:cursor-not-allowed disabled:opacity-40",children:(0,r.jsx)(z.Z,{size:16})}),(0,r.jsx)("button",{type:"button",onClick:le,"aria-label":"Rotate page",className:"rounded border p-2",children:(0,r.jsx)(D.Z,{size:16})}),(0,r.jsx)("button",{type:"button",onClick:function(){_((function(e){return e&&ke(),!e}))},"aria-label":"Search in PDF","aria-pressed":C,className:"rounded border p-2 ".concat(C?"border-[#ff8a3b] bg-[#fff6e5]":""),children:(0,r.jsx)(O.Z,{size:16})}),u?(0,r.jsx)("button",{type:"button",onClick:u,"aria-label":c?"Minimize PDF view":"Expand PDF view","aria-pressed":c,className:"rounded border p-2 ".concat(c?"border-[#ff8a3b] bg-[#fff6e5]":""),children:c?(0,r.jsx)(A.Z,{size:16}):(0,r.jsx)(Q.Z,{size:16})}):null]})]}),C?(0,r.jsxs)("div",{className:"flex items-center gap-2 border-t border-gray-100 px-4 py-2",children:[(0,r.jsx)("input",{ref:h,type:"search",value:me,onChange:function(e){return xe(e.target.value)},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),e.shiftKey?Ce():Se()),"Escape"===e.key&&Pe()},placeholder:"Search in PDF\u2026",className:"min-w-0 flex-1 rounded-md border border-gray-300 px-3 py-1.5 text-sm text-[#1b2124] outline-none focus:border-[#ff8a3b] focus:ring-1 focus:ring-[#ff8a3b]"}),(0,r.jsx)("span",{className:"shrink-0 text-xs text-gray-500 tabular-nums",children:Le}),(0,r.jsx)("button",{type:"button",onClick:Ce,disabled:0===ge,"aria-label":"Previous match",className:"rounded border p-1.5 disabled:cursor-not-allowed disabled:opacity-40",children:(0,r.jsx)(W.Z,{size:16})}),(0,r.jsx)("button",{type:"button",onClick:Se,disabled:0===ge,"aria-label":"Next match",className:"rounded border p-1.5 disabled:cursor-not-allowed disabled:opacity-40",children:(0,r.jsx)(G.Z,{size:16})}),(0,r.jsx)("button",{type:"button",onClick:Pe,"aria-label":"Close search",className:"rounded border p-1.5",children:(0,r.jsx)(K.Z,{size:16})})]}):null]}),(0,r.jsx)("div",{ref:d,className:"min-h-0 flex-1 overflow-auto bg-white",children:null==N?(0,r.jsx)(Z,{className:"h-full min-h-[200px]"}):(0,r.jsx)("div",{className:"mx-auto flex flex-col items-center",style:{width:Math.max(N,fe)},children:(0,r.jsx)("div",{style:{width:fe,height:L>0?L*de:void 0},children:(0,r.jsx)("div",{ref:f,style:{transform:"scale(".concat(de,")"),transformOrigin:"top left",width:ue,willChange:"transform"},children:(0,r.jsx)(qe,{file:t,onLoadSuccess:Ze,onLoadError:Ee,className:"flex w-full flex-col items-center",children:Array.from({length:re.totalPages},(function(e,t){return t+1})).map((function(e){var t,n=se(e);return(0,r.jsx)("div",{"data-page-number":e,className:"flex justify-center",children:(0,r.jsxs)("div",{ref:Re(e),className:"relative inline-block",children:[(0,r.jsx)(Te,{pageNumber:e,width:ue,rotate:n,onLoadSuccess:oe,onRenderTextLayerSuccess:_e(e),renderTextLayer:C,renderAnnotationLayer:!1},"".concat(e,"-").concat(n)),ve?(0,r.jsx)(I,{pageRefs:Y,query:ve,pageNumber:e,textLayerVersion:null!==(t=U[e])&&void 0!==t?t:0,globalIndexOffset:we(e),activeGlobalIndex:be,searchGeneration:je(),zoomScale:de,onMatchCountChange:Ne}):null]})},e)}))})})})})})]})},H=n(64705);function V(e){var t,n=[];
1return Object.values(e.answerFeedback).forEach((function(e){var t;(null===e||void 0===e?void 0:e.length)&&(t=n).push.apply(t,(0,H.Z)(e))})),n.length>0?n.join(" "):(null===(t=e.gradingRationale)||void 0===t?void 0:t.trim())?e.gradingRationale.trim():"No feedback available yet."}var $={id:1,label:"Q1",status:"pending"};function J(e){var t=e.misaligned,n=e.partialAlignment,o=e.evalDataPresent,s=e.questions,c=e.currentQuestion,d=e.setCurrentQuestion,f=e.defaultEvaluation,h=e.currentFeedback,m=e.pdfUrl,x=e.isPdfLoading,b=e.targetPage,y=e.showMentorCta,N=void 0===y||y,j=e.mentorshipMapData,w=e.myRoomData,k=e.currentQuestionRow,S=e.batchName,C=e.testName,R=e.batchId,Z=e.batchType,E=e.testId,P=e.selectedCohort,M=(0,l.Z)().isMobile,q=(0,a.useState)(!1),T=q[0],L=q[1],I=(0,a.useState)("feedback"),F=I[0],z=I[1],D=(0,a.useState)(!1),O=D[0],A=D[1],Q=null!==h&&void 0!==h?h:f;(0,a.useEffect)((function(){L(!1)}),[m,c]);var W=!M||"feedback"===F,G=!M||"response"===F,K=T||!M||O,H=O||!M;return(0,r.jsxs)("div",{className:"flex h-full min-h-0 flex-col bg-white",children:[!T&&(n||t)&&o?(0,r.jsx)("div",{className:"border-b px-8 py-3 text-sm leading-5 ".concat(t?"border-amber-200 bg-amber-50 text-amber-950":"border-sky-200 bg-sky-50 text-sky-950"),children:t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("strong",{children:"Misaligned pages."})," Re-pair the answer sheet with the question paper before sharing results."]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("strong",{children:"Verify alignment."})," Partial page\u2013question match \u2014 confirm mapping in the PDF pane."]})}):null,T?null:(0,r.jsx)("div",{className:"bg-white py-2",children:(0,r.jsx)(u,{questions:s.length>
10?s:[$],currentQuestion:c,onSelectQuestion:d})}),T?null:(0,r.jsx)("div",{className:"bg-white pb-4",children:(0,r.jsx)(v,{questionNumber:Q.questionNumber,questionText:Q.questionText,marksAwarded:Q.marksAwarded,maxMarks:Q.maxMarks,suppressScores:t})}),T?null:(0,r.jsx)(g,{activeTab:F,onChange:function(e){z(e),"response"===e&&A(!0)}}),(0,r.jsx)("div",{className:"flex min-h-0 flex-1 flex-col ".concat(T?"py-4":"pt-4"),children:(0,r.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden md:flex-row",children:[T?null:(0,r.jsx)("div",{className:(0,i.Z)("min-h-0 min-w-0 flex-1 flex-col overflow-hidden md:basis-1/2",W?"flex":"hidden md:flex"),children:(0,r.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden py-4",children:(0,r.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[(0,r.jsx)(p,{feedbackText:V(Q),showTitle:!M}),N?(0,r.jsx)(_,{className:"sticky bottom-0 mt-4",mentorshipMapData:j,myRoomData:w,currentQuestionRow:k,batchName:S,testName:C,batchId:R,batchType:Z,testId:E,selectedCohort:P}):null]})})}),K?(0,r.jsx)("div",{className:(0,i.Z)("min-h-0 min-w-0 flex-1 flex-col overflow-hidden",T?"":"md:basis-1/2",T||G?"flex":"hidden md:flex"),children:(0,r.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden ".concat(T?"":"px-6 py-4"),children:(0,r.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-4 overflow-hidden",children:[T?null:(0,r.jsx)("h2",{className:"hidden shrink-0 text-xl font-semibold leading-[30px] text-[#1b2124] md:block",children:"My Response"}),(0,r.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden rounded-xl border border-[#d9dce1] bg-white",children:H?(0,r.jsx)(B,{pdfUrl:m,isPdfLoading:x,targetPage:b,isExpanded:T,onToggleExpand:function(){return L((function(e){return!e}))}}):null})]})})}):null]})})]})}},26032:function(e,t,n){var r=n(651),a=n(9267),i=n(84792);t.Z=function(e){var t=e.color,n=void 0===t?"#ff7739":t,l=e.message,o=void 0===l?"":l,s=e.scale,c=void 0===s?3:s;return(0,r.jsxs)("div",{className:"w-full h-full space-y-3 p-2 flex-col flex justify-center items-center animated fadeIn duration-200",children:[(0,r.jsx)(a.Z,{color:n,scale:c}),o&&(0,r.jsx)(i.Z,{variant:"heading2",weight:600,children:o},"loading-message")]})}},50391:function(e,t,n){n.d(t,{S:function(){return c}});var r=n(9135),a=n(651),i=n(84792),l=n(13818);function o(e){var t=e.className;return(0,a.jsx)("svg",{className:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,a.jsx)("path",{d:"M15 18L9 12L15 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function s(){return(0,a.jsxs)("svg",{width:"80",height:"80",viewBox:"0 0 140 140",fill:"none","aria-hidden":"true",children:[(0,a.jsx)("circle",{cx:"70",cy:"70",r:"56",stroke:"#F04438",strokeWidth:"3"}),(0,a.jsx)("path",{d:"M70 38L100 92H40L70 38Z",stroke:"#F04438",strokeWidth:"3",strokeLinejoin:"round",fill:"none"}),(0,a.jsx)("line",{x1:"70",y1:"56",x2:"70",y2:"74",stroke:"#F04438",strokeWidth:"3",strokeLinecap:"round"}),(0,a.jsx)("circle",{cx:"70",cy:"82",r:"2",fill:"#F04438"})]})}function c(e){var t=e.error,n=e.title,c=void 0===n?"Failed to load":n,u=e.onRetry,d=e.onBack,f=function(e){return(0,r.Z)(e,Error)?e.message:"string"===typeof e?e:"Something went wrong. Please try again."}(t);return(0,a.jsxs)("div",{className:"flex h-full min-h-0 flex-col bg-gray-50",children:[d?(0,a.jsx)("header",{className:"flex shrink-0 items-center border-b border-gray-200 bg-white px-6 py-3",children:(0,a.jsx)("button",{type:"button",onClick:d,className:"inline-flex size-10 shrink-0 items-center justify-center rounded-md text-gray-800 transition-colors hover:text-primary","aria-label":"Go back",children:(0,a.jsx)(o,{className:"size-6"})})}):null,(0,a.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col items-center justify-center gap-4 p-8",children:[(0,a.jsx)(s,{}),(0,a.jsx)(i.Z,{variant:"heading3",weight:700,children:c}),(0,a.jsx)(i.Z,{variant:"regular",className:"max-w-md text-center text-gray-600",children:f}),(0,a.jsxs)("div",{className:"flex gap-3",children:[u?(0,a.jsx)(l.Z,{variant:"primary",onClick:u,children:"Try Again"}):null,d?(0,a.jsx)(l.Z,{variant:"secondary",onClick:d,children:"Go Back"}):null]})]})]})}},11707:function(e,t,n){function r(e){var t;return(null!==(t=null===e||void 0===e?void 0:e.qbgQuestionsResult)&&void 0!==t?t:[]).map((function(e){return{id:e.questionNumber,label:"Q".concat(e.questionNumber),status:e.userScore>0?"graded":"pending"}}))}function a(e,t){var n,r;return{questionNumber:e.questionNumber,questionText:null!==(n=e.questionText)&&void 0!==n?n:"",modelAnswer:"",studentAnswer:"",marksAwarded:e.userScore,maxMarks:e.totalScore,answerFeedback:{},gradingRationale:null!==(r=e.parameterSummary)&&void 0!==r?r:"",breakdown:null,confidence:e.confidence,requiresReviewReason:null!=e.confidence&&e.confidence<.4?"Low confidence score":t?"Low confidence":null}}function i(e){var t,n=null===e||void 0===e||null===(t=e.responseFiles)||void 0===t?void 0:t[0];return n?"".concat(n.baseUrl).concat(n.key):void 0}function l(e,t){var n,r,a;return null===(r=null===e||void 0===e||null===(n=e.qbgQuestionsResult)||void 0===n?void 0:n.find((function(e){return e.questionNumber===t})))||void 0===r||null===(a=r.pages)||void 0===a?void 0:a[0]}n.d(t,{P5:function(){return a},TK:function(){return l},fn:function(){return r},wJ:function(){return i}})}}]);

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.