1"use strict";(self.webpackChunk_minimal_minimal_kit_react=self.webpackChunk_minimal_minimal_kit_react||[]).push([[9062],{9995:(e,o,t)=>{t.d(o,{A:()=>h});var l=t(83964),i=t(63055),n=t(16358),r=t(16333),a=t(49699),s=t(52823),d=t(43016),c=t(82483),p=t(63131),u=t(56723);const m=(0,l.A)("div")((e=>{let{theme:o,showAnswers:t}=e;return{borderRight:0,boxShadow:o.customShadows.z8,border:"solid 1px rgba(80, 80, 80, 0.4)",backgroundColor:o.palette.background.paper,borderRadius:o.shape.borderRadius,padding:20,marginTop:20,fontSize:16,".question-heading":{marginBottom:10,fontWeight:800,...o.typography.h6,display:"flex",justifyContent:"space-between"},ul:{marginTop:20},".question":{...o.typography.h7,fontWeight:400},".question-answer-wrapper":{marginBottom:10,marginTop:20,backgroundColor:o.palette.action.hover,border:"none",".question-answer":{borderRadius:o.shape.borderRadius,padding:10,border:`solid 1px ${o.palette.divider}`},".question-answer-title":{fontWeight:700,".inline-answer":{p:{display:"inline !important"}},p:{margin:"0 !important"}}},".correct-hidden":{color:t?o.palette.primary.main:""},".correct-hidden .multi-choice-letter":{backgroundColor:"none !important"},".multi-choice-item":{padding:"4px 0px 4px 25px",margin:"2px 0"},p:{margin:"0 !important"}}}));function h(e){var o,t;let{question:l,showAnswers:h,showExplaniatation:x,index:v,icon:b,isAnswerVerified:q}=e;const[f,w]=(0,c.useState)(!1),[y,j]=(0,c.useState)(!1),{enqueueSnackbar:k}=(0,d.useSnackbar)(),A=(0,p.g)(),C=null===A||void 0===A?void 0:A.provider,S=null===A||void 0===A?void 0:A.exam;(0,c.useEffect)((()=>{if(null!==l&&void 0!==l&&l.examAnsDesc){var e,o,t;const i=null===l||void 0===l||null===(e=l.examAnsDesc)||void 0===e||null===(o=e.replace(/\s/g,""))||void 0===o||null===(t=o.replace(/(\r\n|\n|\r)/gm,""))||void 0===t?void 0:t.replaceAll(" ","");w(!!i)}}),[null===l||void 0===l?void 0:l.examAnsDesc]);return l?(0,u.jsxs)(m,{showAnswers:h||y,children:[(0,u.jsxs)("div",{className:"question-heading",children:[(0,u.jsxs)(i.A,{display:"flex",gap:1,children:[(0,u.jsx)(n.A,{underline:"none",variant:"subtitle2",href:`/papers/${C}/${S}/question/${null===l||void 0===l?void 0:l._id}`,children:(0,u.jsxs)(i.A,{fontSize:"1rem",children:["Question: ",v]})}),(0,u.jsx)(i.A,{alignItems:"center",display:"flex",children:(0,u.jsx)(r.A,{title:"Click to copy the question text",placement:"top",children:(0,u.jsx)(a.A,{variant:"outlined",size:"small",sx:{textTransform:"none",fontSize:"10px",height:"20px",minWidth:"20px",padding:"2px 5px"},onClick:async()=>{var e,o,t,i;const n=(new DOMParser).parseFromString(null===l||void 0===l||null===(e=l.examQue)||void 0===e||null===(o=e.replace(/<\/p>/gi,"\n"))||void 0===o||null===(t=o.replace(/<br\s*\/?>/gi,"\n"))||void 0===t||null===(i=t.replace(/<\/li>/gi,"\n"))||void 0===i?void 0:i.replace(/<\/div>/gi,"\n"),"text/html");n.querySelectorAll("img").forEach((e=>{const o=e.getAttribute("src");if(o){const t=n.createTextNode(`[Image: ${o}]`);e.parentNode.replaceChild(t,e)}}));const r=n.body.textContent||"";try{await navigator.clipboard.writeText(r)}catch{const e=document.createElement("textarea");e.value=r,document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}finally{k("Question copied to clipboard",{variant:"success"})}},children:"Copy"})})})]}),(0,u.jsx)("div",{style:{display:"flex"},children:(0,u.jsx)("a",{href:"https://certyiq.com/papers",children:(0,u.jsxs)("div",{className:"company-name",children:[(0,u.jsx)("span",{style:{color:"#147DC4"},children:"Certy"}),(0,u.jsx)("span",{style:{color:"#EA7A42"},children:"IQ"})]})})})]}),(0,u.jsx)("div",{className:"question",dangerouslySetInnerHTML:{__html:null===l||void 0===l?void 0:l.examQue}}),!h&&(0,u.jsx)(a.A,{variant:"outlined",style:{marginTop:"20px"},onClick:()=>j(!y),children:y?"Hide Answer":"Show Answer"}),(h||y)&&(0,u.jsx)("div",{className:"question-answer-wrapper",children:(0,u.jsxs)("div",{className:"question-answer",children:[(0,u.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,u.jsxs)("div",{className:"question-answer-title",children:["Answer:"," ",(null===l||void 0===l||null===(o=l.examAns)||void 0===o?void 0:o.length)<15?(0,u.jsx)("div",{className:"inline-answer",style:{display:"inline"},dangerouslySetInnerHTML:{__html:null===l||void 0===l?void 0:l.examAns}}):""]}),(0,u.jsx)("div",{children:b})]}),(null===l||void 0===l||null===(t=l.examAns)||void 0===t?void 0:t.length)>=15&&(0,u.jsx)("div",{style:{marginTop:"10px"},dangerouslySetInnerHTML:{__html:null===l||void 0===l?void 0:l.examAns}}),(x||y)&&(0,u.jsx)(u.Fragment,{children:f&&(0,u.jsxs)("div",{children:[(0,u.jsx)(s.A,{sx:{color:"primary.main",display:"inline"},children:(0,u.jsx)("div",{className:"question-answer-title",style:{marginTop:"15p
1x"},children:"Explanation:"})}),(0,u.jsx)(g,{explanation:null===l||void 0===l?void 0:l.examAnsDesc})]})})]})})]}):null}const g=e=>{let{explanation:o=""}=e;const[t,l]=(0,c.useState)("");return(0,c.useEffect)((()=>{var e,t,i,n;let r=null===(e=o)||void 0===e?void 0:e.replace(/\ /g,"");null!==(t=r)&&void 0!==t&&t.includes("References:")&&(r=null===(i=r)||void 0===i?void 0:i.replace("References:","Reference:"));let a=null===(n=r)||void 0===n?void 0:n.split("Reference:<br>");if(2===(null===a||void 0===a?void 0:a.length)){var s,d;let e=a[0]+"<br>Reference:<br>",o=null===(s=a[1])||void 0===s||null===(d=s.replaceAll("\n","<br>"))||void 0===d?void 0:d.split("<br>");o=o.filter((e=>{if(e)return e}));let t=[];for(let l=0;l<(null===(c=o)||void 0===c?void 0:c.length);l++){var c;let e=o[l].replace("\n","");if(null!==e&&void 0!==e&&e.includes("/assets")||null!==e&&void 0!==e&&e.includes("<img "))t.push("<br/>"+e);else{if(null===e||void 0===e||!e.includes("http"))continue;t.push(`<a href="${e}" target="_blank" style="word-break: break-all;">${e}</a>`)}}t=t.join("<br>"),l(e+t)}else{var p;o=null===(p=o)||void 0===p?void 0:p.replaceAll(/<a /g,'<a target="_blank" '),l(o)}}),[o]),(0,u.jsx)("div",{dangerouslySetInnerHTML:{__html:t}})}},35392:(e,o,t)=>{t.d(o,{A:()=>u});var l=t(4773),i=t(52823),n=t(79494),r=t(63055),a=t(16333),s=t(23964),d=t(49699),c=t(83527),p=t(56723);function u(e){let{open:o,onClose:t,onSuccess:u,color:m="warning",title:h,description:g}=e;return o?(0,p.jsxs)(c.ys,{maxWidth:"sm",animate:!0,open:o,onClose:t,children:[(0,p.jsx)(r.A,{sx:{flexGrow:1,alignItems:"center",p:1},children:(0,p.jsx)(r.A,{sx:{position:"absolute",right:"10px"},children:(0,p.jsx)(a.A,{title:"Close",children:(0,p.jsx)(s.A,{color:"inherit",onClick:t,children:(0,p.jsx)(n.In,{icon:l.A})})})})}),(0,p.jsxs)(r.A,{sx:{flexGrow:1,alignItems:"center",py:2,px:3},children:[(0,p.jsx)(i.A,{variant:"h4",gutterBottom:!0,color:m,children:h||"Pay Attention"}),(0,p.jsx)(i.A,{variant:"body2",gutterBottom:!0,children:g||"Are you sure you want to proceed with this action?"}),(0,p.jsxs)(r.A,{gap:2,display:"flex",justifyContent:"space-between",mt:3,children:[(0,p.jsx)(d.A,{variant:"outlined",color:"primary",onClick:t,children:"Cancel"}),(0,p.jsx)(d.A,{variant:"contained",color:m,onClick:u,children:"Confirm"})]})]})]}):null}},55200:(e,o,t)=>{t.d(o,{A:()=>b});var l=t(63055),i=t(16333),n=t(49699),r=t(82483),a=t(4773),s=t(79494),d=t(23964),c=t(52823),p=t(83527),u=t(56723);function m(e){let{isOpen:o,onCloseModal:t,responseResult:r}=e;const m=()=>{t()};return(0,u.jsx)(p.ys,{maxWidth:"sm",animate:!0,open:o,onClose:m,children:(0,u.jsxs)(l.A,{sx:{px:3,py:2},children:[(0,u.jsx)(l.A,{sx:{position:"absolute",right:"10px"},children:(0,u.jsx)(i.A,{title:"Close",children:(0,u.jsx)(d.A,{color:"inherit",onClick:m,children:(0,u.jsx)(s.In,{icon:a.A})})})}),(0,u.jsx)(c.A,{mt:1,sx:{fontSize:20,fontWeight:"bold"},children:"add"===r?"Request Submitted Successfully":"Request Removed Successfully"}),(0,u.jsx)(c.A,{sx:{mt:2,mb:3,color:"text.secondary"},children:"add"===r?"Your request for answer re-evaluation has been submitted. Our review team will carefully examine the question and answer. You will be notified once the review is complete.":"Your request for answer re-evaluation has been removed. If you have any further questions or need assistance, please feel free to reach out to our support team at [email protected]"}),(0,u.jsx)(l.A,{textAlign:"right",children:(0,u.jsx)(n.A,{variant:"contained",onClick:m,children:"Close"})})]})})}var h=t(51846);function g(e){let{isOpen:o,onCloseModal:t,onConfirm:r}=e;const m=()=>{t()};return(0,u.jsx)(p.ys,{maxWidth:"sm",animate:!0,open:o,onClose:m,children:(0,u.jsxs)(l.A,{sx:{px:3,py:2},children:[(0,u.jsx)(l.A,{sx:{position:"absolute",right:"10px"},children:(0,u.jsx)(i.A,{title:"Close",children:(0,u.jsx)(d.A,{color:"inherit",onClick:m,children:(0,u.jsx)(s.In,{icon:a.A})})})}),(0,u.jsx)(c.A,{mt:1,sx:{fontSize:20,fontWeight:"bold"},children:"Resolve Answer Recheck Request"}),(0,u.jsxs)(c.A,{sx:{mt:2,mb:3,color:"text.secondary"},children:["Review the user\u2019s recheck request and select the appropriate resolution.",(0,u.jsx)("br",{}),(0,u.jsx)("br",{}
1)," ",(0,u.jsx)("strong",{children:"\u201cAnswer is already correct\u201d"})," if no change is required, ",(0,u.jsx)("br",{})," or ",(0,u.jsx)("br",{})," ",(0,u.jsx)("strong",{children:"\u201cAnswer is updated\u201d"})," if the answer has been corrected based on the review. This action will close the recheck request and notify the user."]}),(0,u.jsxs)(l.A,{display:"flex",gap:2,justifyContent:"flex-end",children:[(0,u.jsx)(n.A,{variant:"outlined",onClick:()=>r("old"),children:"Already Corrected"}),(0,u.jsx)(n.A,{variant:"contained",onClick:()=>r("updated"),children:"Answer Updated"})]})]})})}var x=t(67369),v=t(43016);function b(e){var o,t,a,s,d,c,p,b,q,f;let{question:w,recheckDetails:y,isReCheckLoading:j,triggerReCheck:k,isVerified:A}=e;const{isAuthenticated:C,loginModal:S,isAdmin:N,CONTENT_ADMIN:R}=(0,h.A)(),[_,T]=(0,r.useState)(""),[I,Q]=(0,r.useState)(!1),{enqueueSnackbar:M}=(0,v.useSnackbar)(),z=(null===w||void 0===w||null===(o=w.chatgptVerification)||void 0===o?void 0:o.answer)===(null===w||void 0===w?void 0:w.examAns),H=(null===w||void 0===w||null===(t=w.geminiVerification)||void 0===t?void 0:t.answer)===(null===w||void 0===w?void 0:w.examAns),W=(null===w||void 0===w||null===(a=w.nvdia)||void 0===a?void 0:a.answer)===(null===w||void 0===w?void 0:w.examAns);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(l.A,{display:"flex",gap:1,alignItems:"center",children:(0,u.jsxs)(l.A,{display:"flex",gap:.5,children:[A||!N?(0,u.jsx)(i.A,{title:"Verified by CertyIQ",placement:"top",children:(0,u.jsx)(l.A,{style:{marginTop:"1px",borderRadius:"5px",height:"18px",width:"18px",display:"flex",justifyContent:"center",alignItems:"center"},children:(0,u.jsx)("img",{style:{width:"16px",height:"16px"},src:"https://certyiq.com/static/_logo2.png",alt:"CertyIQ Logo"})})}):(0,u.jsx)(i.A,{title:"Not Verified by CertyIQ",placement:"top",children:(0,u.jsx)(l.A,{style:{marginTop:"1px",borderRadius:"5px",height:"18px",width:"18px",display:"flex",justifyContent:"center",alignItems:"center"},children:"x"})}),(z||(null===w||void 0===w?void 0:w.chatgptVerification)&&N)&&(0,u.jsx)(i.A,{title:"Verified by ChatGPT",placement:"top",children:(0,u.jsx)(l.A,{style:{borderRadius:"5px",height:"20px",width:"20px",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",border:z?null:"2px solid red"},children:(0,u.jsx)("img",{style:{width:"20px",height:"20px"},src:"https://cdn.iconscout.com/icon/free/png-256/free-chatgpt-logo-icon-svg-download-png-8630392.png",alt:"ChatGPT Logo"})})}),(H||(null===w||void 0===w?void 0:w.geminiVerification)&&N)&&(0,u.jsx)(i.A,{title:H?"Verified by Gemini":`Gemini said ${null===w||void 0===w||null===(s=w.geminiVerification)||void 0===s?void 0:s.answer}`,placement:"top",children:(0,u.jsx)(l.A,{style:{marginTop:"1px",borderRadius:"5px",height:"18px",width:"18px",display:"flex",justifyContent:"center",alignItems:"center",border:H?"0.5px solid lightgrey":"2px solid red"},children:(0,u.jsx)("img",{style:{width:"15px",height:"15px"},src:"https://i.namu.wiki/i/G741c49m7_spX7OwibKiO999-vQ74huCB4J5URGQxJawRpTSdOwWYALtjUunV_7jttM-ZdHYQlPbcHvXQlo7Mg.webp",alt:"Gemini Logo"})})}),(W||N&&(null===w||void 0===w?void 0:w.nvdia))&&(0,u.jsx)(i.A,{title:W?"Verified by Meta":`Meta said ${null===w||void 0===w||null===(d=w.nvdia)||void 0===d?void 0:d.answer}`,placement:"top",children:(0,u.jsx)(l.A,{style:{marginTop:"1px",borderRadius:"5px",height:"18px",width:"18px",display:"flex",justifyContent:"center",alignItems:"center",border:W?"0.5px solid lightgrey":"2px solid red"},children:(0,u.jsx)("img",{style:{width:"15px",height:"15px"},src:"https://upload.wikimedia.org/wikipedia/commons/3/3b/Meta_AI_Logo_%28Ring_Only%29.png",alt:"Meta Logo"})})}),(0,u.jsx)(l.A,{style:{borderLeft:"1px solid lightgrey",height:"17px",marginTop:"2px",marginLeft:"5px",marginRight:"5px"}}),(0,u.jsx)(i.A,{title:R?"Clear ReCheck":null!==(c=y[null===w||void 0===w?void 0:w._id])&&void 0!==c&&c.isRequested?"Remove re-evaluation request":"Submit a request for answer re-evaluation",placement:"top",children:(0,u.jsxs)(n.A,{disabled:j||(null===(p=y[null===w||void 0===w?void 0:w._id])||void 0===p?void 0:p.isResolved),variant:"outlined",size:"small",sx:{textTransform:"none",fontSize:"10px",height:"20px",minWidth:"20px",padding:"2px 5px"},onClick:async()=>{var e;if(!C)return S(!0);if(R)return Q(!0);
1T("");var o;await k({id:null===w||void 0===w?void 0:w._id,action:null!==(e=y[null===w||void 0===w?void 0:w._id])&&void 0!==e&&e.isRequested?"remove":"add"})&&T(null!==(o=y[null===w||void 0===w?void 0:w._id])&&void 0!==o&&o.isRequested?"remove":"add")},children:[R?(0,u.jsx)(u.Fragment,{children:null!==(b=y[null===w||void 0===w?void 0:w._id])&&void 0!==b&&b.isResolved?"Already Cleared ":"Clear ReCheck "}):(0,u.jsxs)(u.Fragment,{children:[null!==(q=y[null===w||void 0===w?void 0:w._id])&&void 0!==q&&q.isRequested?"Remove":""," ReCheck "]}),N&&y[null===w||void 0===w?void 0:w._id]?`( ${null===(f=y[null===w||void 0===w?void 0:w._id])||void 0===f?void 0:f.totalRequests} )`:""]})})]})}),_&&(0,u.jsx)(m,{isOpen:!!_,onCloseModal:()=>T(""),responseResult:_}),I&&(0,u.jsx)(g,{isOpen:I,onCloseModal:()=>Q(!1),onConfirm:async e=>{try{await x.A.clearReCheck({id:null===w||void 0===w?void 0:w._id,action:e});M("ReCheck request cleared successfully",{variant:"success"}),Q(!1)}catch(o){console.log(o),M(null===o||void 0===o?void 0:o.message,{variant:"error"})}}})]})}},57583:(e,o,t)=>{t.d(o,{A:()=>C});
1var l=t(63055),i=t(94155),n=t(49699),r=t(4773),a=t(79494),s=t(52823),d=t(16333),c=t(23964),p=t(28821),u=t(63752),m=t(25828),h=t(35207),g=t(43016),x=t(82483),v=t(83527),b=t(86070),q=t(67369),f=t(43503),w=t(56723);const y=(0,h.Ay)(s.A)((e=>{let{theme:o}=e;return{...o.typography.subtitle2}})),j=(0,h.Ay)(l.A)((e=>{let{theme:o}=e;return{...o.typography.subtitle2,".ql-editor":{minHeight:"80px !important"}}})),k=e=>{const o=f.Hh(e);return o("*").not("img, br, a").toArray().reverse().forEach((e=>{const t=o(e);t.replaceWith(t.contents())})),o.root().html()},A=e=>{try{var o;let a=e.examQue;const s=f.Hh(a);let d=s(".multi-choice-item");null!==d&&void 0!==d&&d.length&&d.removeClass("correct-hidden");let c=[];for(let e=0;e<(null===d||void 0===d?void 0:d.length);e++){var t,l,i,n,r;let o=null===(t=f.Hh(d[e]))||void 0===t||null===(l=t.text())||void 0===l||null===(i=l.replace(/\s+/g," "))||void 0===i||null===(n=i.trim())||void 0===n||null===(r=n.replaceAll("\n",""))||void 0===r?void 0:r.replaceAll("\t","");c.push(null===o||void 0===o?void 0:o.substring(2,null===o||void 0===o?void 0:o.length))}return s(".multi-choice-item").remove(),e.options=null!==c&&void 0!==c&&c.length?c:[],e.isMultiple=!!((null===e||void 0===e||null===(o=e.examAns)||void 0===o?void 0:o.length)>1&&null!==c&&void 0!==c&&c.length),e.examQue=s.html(),null!==c&&void 0!==c&&c.length||(e.examAnsDesc=e.examAns?e.examAns+"<br>"+e.examAnsDesc:e.examAnsDesc,e.examAns="A",e.isCustomAnswer=!0),e}catch(a){return{}}};function C(e){var o;let{isOpen:t,onClose:h,selectedPaperObject:f,baseQuestion:C}=e;const[S,N]=(0,x.useState)(777===(null===C||void 0===C?void 0:C.topic)?"other":"examtopics"),[R,_]=(0,x.useState)(null!==C&&void 0!==C&&null!==(o=C.examQue)&&void 0!==o&&o.includes("multi-choice-item")?"mcq":"non-mcq"),[T,I]=(0,x.useState)((null===C||void 0===C?void 0:C.topic)||""),[Q,M]=(0,x.useState)((null===C||void 0===C?void 0:C.question)||""),[z,H]=(0,x.useState)((null===C||void 0===C?void 0:C.examAnsDesc)||""),[W,L]=(0,x.useState)((null===C||void 0===C?void 0:C.examAns)||""),[$,E]=(0,x.useState)(""),[D,O]=(0,x.useState)([""]),[P,V]=(0,x.useState)(!1),{enqueueSnackbar:B}=(0,g.useSnackbar)();(0,x.useEffect)((()=>{if(C){var e;const t=A({...C});var o;if(null!==t&&void 0!==t&&t.examQue)E(null===t||void 0===t||null===(o=t.examQue)||void 0===o?void 0:o.replaceAll("<ul></ul>","").trim());null!==t&&void 0!==t&&null!==(e=t.options)&&void 0!==e&&e.length&&O(null===t||void 0===t?void 0:t.options)}}),[C]);return(0,w.jsx)(v.ys,{maxWidth:"lg",animate:!0,open:t,onClose:h,children:(0,w.jsxs)(l.A,{sx:{py:2,px:3},children:[(0,w.jsx)(l.A,{sx:{position:"absolute",right:"10px"},children:(0,w.jsx)(d.A,{title:"Close",children:(0,w.jsx)(c.A,{color:"inherit",onClick:h,children:(0,w.jsx)(a.In,{icon:r.A})})})}),(0,w.jsxs)(s.A,{gutterBottom:!0,sx:{my:2,fontSize:20,fontWeight:"bold"},children:[C?"Edit":"Create"," Question"]}),(0,w.jsxs)(l.A,{display:"flex",gap:1,flexDirection:"column",children:[(0,w.jsxs)(l.A,{children:[(0,w.jsx)(y,{children:"Question Source:"}),(0,w.jsxs)(p.A,{row:!0,defaultValue:S,onChange:e=>N(e.target.value),children:[(0,w.jsx)(i.A,{value:"examtopics",control:(0,w.jsx)(u.A,{}),label:"ExamTopics"}),(0,w.jsx)(i.A,{value:"other",control:(0,w.jsx)(u.A,{}),label:"Other"})]})]}),"examtopics"===S&&(0,w.jsxs)(l.A,{display:"flex",gap:2,children:[(0,w.jsx)(l.A,{children:(0,w.jsx)(m.A,{fullWidth:!0,type:"number",label:"Topic Number",value:T,onChange:e=>I(e.target.value)})}),(0,w.jsx)(l.A,{children:(0,w.jsx)(m.A,{fullWidth:!0,type:"number",label:"Question Number",value:Q,onChange:e=>M(e.target.value)})})]}),(0,w.jsxs)(l.A,{children:[(0,w.jsx)(y,{children:"Select Question Type:"}),(0,w.jsxs)(p.A,{row:!0,defaultValue:R,onChange:e=>_(e.target.value),children:[(0,w.jsx)(i.A,{value:"mcq",control:(0,w.jsx)(u.A,{}),label:"MCQ Question"}),(0,w.jsx)(i.A,{value:"non-mcq",control:(0,w.jsx)(u.A,{}),label:"Non-MCQ Question"})]})]}),(0,w.jsxs)(l.A,{children:[(0,w.jsx)(y,{mb:1,children:"Question Statement"}),(0,w.jsx)(b.t,{simple:!0,id:"create-new-question",value:$,onChange:e=>E(e),loading:!0,placeholder:"You can add question here..."},"create-new-question")]}),"mcq"===R&&(0,w.jsxs)(w.Fragment,{children:[D.map(((e,o)=>(0,w.jsxs)(j,{children:[(0,w.jsxs)(y,{mb:1,children:["Option ",String.fromCharCode(65+o)," ",(0,w.jsx)(n.A,{size:"small",color:"error",onClick:()=>(e=>{const o=D.filter(((o,t)=>t!==e));O(o)})(o),children:"Remove"})]}),(0,w.jsx)(b.t,{simple:!0,id:`create-new-question-options-${o}
1`,value:e,onChange:e=>{const t=[...D];t[o]=e,O(t)},loading:!0,sx:{minHeight:80},minHeight:80,placeholder:`You can add option ${String.fromCharCode(65+o)} here...`},`create-new-question-options-${o}`)]},`option-${o}`))),(0,w.jsxs)(n.A,{variant:"contained",onClick:()=>{O([...D,""])},sx:{width:"fit-content"},children:["Add Option ",String.fromCharCode(65+D.length)]})]}),(0,w.jsxs)(j,{mt:2,children:[(0,w.jsx)(y,{mb:1,children:"Answer"}),(0,w.jsx)(b.t,{simple:!0,id:"create-new-question-answer",value:W,onChange:e=>L(e),loading:!0,placeholder:"You can add answer here..."},"create-new-question-answer")]}),(0,w.jsxs)(j,{mt:2,children:[(0,w.jsx)(y,{mb:1,children:"Explanation"}),(0,w.jsx)(b.t,{simple:!0,id:"create-new-question-explanation",value:z,onChange:e=>H(e),loading:!0,placeholder:"You can add solution or explanation here..."},"create-new-question-explanation")]}),(0,w.jsx)(l.A,{width:"100%",display:"flex",justifyContent:"flex-end",mt:2,children:(0,w.jsxs)(n.A,{variant:"contained",color:"primary",onClick:async()=>{if("mcq"!==R||D.length)if(""!==(null===D||void 0===D?void 0:D[0])||"mcq"!==R)if(W){V(!0);try{const e={source:S,questionMeta:{topic:"examtopics"===S?Number(T):void 0,questionNo:"examtopics"===S?Number(Q):void 0},type:R,question:$,options:"mcq"===R?null===D||void 0===D?void 0:D.map((e=>k(e))):[],answer:"mcq"===R?k(W):W,explanation:k(z)?z:"",paper:{name:f.paperName,id:f.paperid,stream:f.stream}};if(C){await q.A.updateCustomQuestion(e)}else{await q.A.addCustomQuestion(e)}B("Question added successfully",{variant:"success"}),h()}catch(e){console.error("Error creating question:",e),B(e.message||"Error creating question",{variant:"error"})}finally{V(!1)}}else B("Please provide answer for the question",{variant:"error"});else B("Option A cannot be empty for MCQ question",{variant:"error"});else B("Please add at least one option for MCQ question",{variant:"error"})},loading:P,children:[C?"Edit":"Create"," Question Now"]})})]})]})})}},70432:(e,o,t)=>{t.d(o,{h:()=>n});var l=t(82483),i=t(67369);const n=e=>{let{selectedPaperObject:o}=e;const[t,n]=(0,l.useState)(null),[r,a]=(0,l.useState)(!1),s=(0,l.useCallback)((async()=>{a(!0),n({});try{const e={stream:null===o||void 0===o?void 0:o.stream,paperName:null===o||void 0===o?void 0:o.paperName},t=await i.A.getReCheckDetails(e);n(null===t||void 0===t?void 0:t.data)}catch(e){console.log(e)}finally{a(!1)}}),[o]),d=(0,l.useCallback)((async e=>{let{id:o,action:t}=e;a(!0);try{const e={id:o,action:t};await i.A.updateRecheck(e);return s(),!0}catch(l){return console.log(l),!1}}),[o]);return(0,l.useEffect)((()=>{null!==o&&void 0!==o&&o.paperid&&s(o)}),[null===o||void 0===o?void 0:o.paperid]),{recheckDetails:t,isReCheckLoading:r,triggerReCheck:d}}},78236:(e,o,t)=>{t.d(o,{A:()=>v});var l=t(83964),i=t(63055),n=t(49699),r=t(25828),a=t(52823),s=t(82483),d=t(86070),c=(t(71614),t(43016)),p=t(35392),u=t(67369),m=t(57583),h=t(56723);function g(e){let{question:o,handleRefreshPaper:t,selectedPaperObject:l}=e;
1const[r,a]=(0,s.useState)(!1),[d,g]=(0,s.useState)(!1),[x,v]=(0,s.useState)(!1),[b,q]=(0,s.useState)(""),{enqueueSnackbar:f}=(0,c.useSnackbar)(),w=e=>{q(e),g(!0)},y="inactive"!==(null===o||void 0===o?void 0:o.status);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(i.A,{display:"flex",flexDirection:"row",gap:2,children:[(0,h.jsx)(n.A,{variant:"outlined",color:"primary",onClick:()=>a(!0),style:{minWidth:"134px"},children:"Edit Question"}),(0,h.jsx)(n.A,{variant:"outlined",color:y?"warning":"success",onClick:()=>w(y?"inactive":"active"),style:{minWidth:"134px"},children:y?"Mark Inactive":"Mark Active"}),(0,h.jsx)(n.A,{variant:"outlined",color:"error",onClick:()=>w("delete"),style:{minWidth:"134px"},children:"Delete"})]}),(0,h.jsx)(p.A,{open:d,onClose:()=>g(!1),onSuccess:async()=>{v(!0);try{await u.A.handleQuestionStatus({id:null===o||void 0===o?void 0:o._id,action:b});g(!1),t(),f("Question "+b+" successfully",{variant:"success"})}catch(e){f((null===e||void 0===e?void 0:e.message)||"Error occurred",{variant:"error"})}},color:"delete"===b?"error":"warning",isLoading:x}),r&&(0,h.jsx)(m.A,{isOpen:r,onClose:()=>a(!1),selectedPaperObject:l,baseQuestion:o})]})}const x=(0,l.A)("div")((e=>{let{theme:o,showAnswers:t,showComment:l}=e;return{borderRight:0,boxShadow:o.customShadows.z8,border:"solid 1px rgba(80, 80, 80, 0.4)",backgroundColor:o.palette.background.paper,borderRadius:o.shape.borderRadius,padding:20,marginTop:20,fontSize:16,".question-heading":{marginBottom:10,fontWeight:800,...o.typography.h6,display:"flex",justifyContent:"space-between"},ul:{marginTop:20},".question":{...o.typography.h7,fontWeight:400},".question-answer-wrapper":{marginBottom:10,marginTop:20,backgroundColor:o.palette.action.hover,border:"none",".question-answer":{borderRadius:o.shape.borderRadius,padding:10,border:`solid 1px ${o.palette.divider}`},".question-answer-title":{fontWeight:700,p:{display:"inline !important",margin:"0 !important"}}},".correct-hidden":{color:t?o.palette.primary.main:""},".correct-hidden .multi-choice-letter":{backgroundColor:"none !important"},".multi-choice-item":{padding:"4px 0px 4px 25px",margin:"2px 0"},".question-discussion-header":{display:"none"},".question-body":{border:"none !important",margin:"0 !important"},".container":{paddingLeft:"0 !important",paddingRight:"0 !important",margin:"none !important"},".discussion-page-comments-section":{display:l?void 0:"none !important"},p:{margin:"0 !important"},".ql-editor":{minHeight:"50px !important"},".question-discussion-button":{display:"none !important"}}}));function v(e){var o,t,l;let{question:c,showAnswers:p,showExplaniatation:u,index:m,icon:v,updatePaperStatus:q,isAnswerVerified:f,handleRefreshPaper:w,selectedPaperObject:y}=e;const[j,k]=(0,s.useState)(!1),[A,C]=(0,s.useState)(!1),[S,N]=(0,s.useState)(!1),[R,_]=(0,s.useState)(""),[T,I]=(0,s.use
1State)(""),Q=null===c||void 0===c||null===(o=c.discussionHTML)||void 0===o?void 0:o.includes("question-choices-container");(0,s.useEffect)((()=>{if(null!==c&&void 0!==c&&c.examAnsDesc){var e,o,t;const l=null===c||void 0===c||null===(e=c.examAnsDesc)||void 0===e||null===(o=e.replace(/\s/g,""))||void 0===o||null===(t=o.replace(/(\r\n|\n|\r)/gm,""))||void 0===t?void 0:t.replace(" ","");k(!!l)}}),[null===c||void 0===c?void 0:c.examAnsDesc]),(0,s.useEffect)((()=>{I(null===c||void 0===c?void 0:c.examAnsDesc),_(null===c||void 0===c?void 0:c.examAns)}),[c]);return(0,h.jsxs)(x,{showComment:A,showAnswers:p,children:[null!==c&&void 0!==c&&c.questionHTML?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("div",{style:{marginTop:"10px"},dangerouslySetInnerHTML:{__html:null===c||void 0===c?void 0:c.questionHTML}}),A&&(0,h.jsx)("div",{style:{marginTop:"10px"},dangerouslySetInnerHTML:{__html:null===c||void 0===c?void 0:c.commentHTML}})]}):(0,h.jsx)(h.Fragment,{children:(0,h.jsx)("div",{style:{marginTop:"10px"},dangerouslySetInnerHTML:{__html:null===c||void 0===c?void 0:c.discussionHTML}})}),(0,h.jsxs)(i.A,{display:"flex",justifyContent:"space-between",children:[(0,h.jsx)(n.A,{variant:"outlined",onClick:()=>C(!A),children:A?"Hide Comments":"Show Comments"}),(0,h.jsx)(i.A,{display:"flex",flexDirection:"row",gap:2,children:(0,h.jsx)(g,{question:c,handleRefreshPaper:w,selectedPaperObject:y},`${null===c||void 0===c?void 0:c.topic}-${null===c||void 0===c?void 0:c.question}`)})]}),(0,h.jsx)("div",{className:"question-answer-wrapper",children:(0,h.jsxs)("div",{className:"question-answer",children:[(0,h.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,h.jsxs)("div",{className:"question-answer-title",children:["Our Answer:"," ",(null===c||void 0===c||null===(t=c.examAns)||void 0===t?void 0:t.length)<15&&!S?(0,h.jsx)("span",{style:{marginTop:"10px"},dangerouslySetInnerHTML:{__html:null===c||void 0===c?void 0:c.examAns}}):""]}),(0,h.jsx)("div",{children:v})]}),S?Q?(0,h.jsx)(r.A,{fullWidth:!0,placeholder:"Write Option here",label:"Answer",value:R,onChange:e=>{var o;return _(null===e||void 0===e||null===(o=e.target)||void 0===o?void 0:o.value)},sx:{marginTop:"20px"}}):(0,h.jsx)("div",{style:{marginTop:"10px"},children:(0,h.jsx)(d.t,{simple:!0,id:`product-description-answer-${m}`,value:R,onChange:e=>_(e),loading:!0},`product-description-answer-${m}`)}):(null===c||void 0===c||null===(l=c.examAns)||void 0===l?void 0:l.length)>=15&&(0,h.jsx)("div",{style:{marginTop:"10px"},dangerouslySetInnerHTML:{__html:null===c||void 0===c?void 0:c.examAns}}),S?(0,h.jsxs)("div",{children:[(0,h.jsx)(a.A,{sx:{color:"primary.main",display:"inline"},children:(0,h.jsx)("div",{className:"question-answer-title",style:{marginTop:"15px",marginBottom:"15px"},children:"Explanation:"})}),(0,h.jsx)(d.t,{simple:!0,id:`product-description-descrition-${m}`,value:T,onChange:e=>I(e)},`product-description-descrition-${m}`)]}):(null===c||void 0===c?void 0:c.examAnsDesc)&&j&&(0,h.jsxs)("div",{children:[(0,h.jsx)(a.A,{sx:{color:"primary.main",display:"inline"},children:(0,h.jsx)("div",{className:"question-answer-title",style:{marginTop:"15px"},children:"Explanation:"})}),(0,h.jsx)(b,{explanation:null===c||void 0===c?void 0:c.examAnsDesc})]}),(0,h.jsxs)("div",{style:{display:"flex",gridGap:"20px"},children:[S&&(0,h.jsx)("div",{children:(0,h.jsx)(n.A,{variant:"outlined",style:{marginTop:"20px"},onClick:()=>{I(null===c||void 0===c?void 0:c.examAnsDesc),_(null===c||void 0===c?void 0:c.examAns),N(!1)},children:"Cancel Edit"})}),(0,h.jsx)("div",{children:(0,h.jsx)(n.A,{variant:"outlined",style:{marginTop:"20px"},onClick:()=>{if(S){q(c,{examAnsDesc:T,examAns:R}),N(!1)}else N(!0)},children:S?"Update Answer":"Edit Answer"})}),!S&&!f&&(0,h.jsx)("div",{children:(0,h.jsx)(n.A,{variant:"contained",style:{marginTop:"20px"},onClick:()=>{q(c)},children:"Approve"})})]})]})})]})}const b=e=>{let{explanation:o=""}=e;const[t,l]=(0,s.useState)("");return(0,s.useEffect)((()=>{var e,t,i,n;let r=null===(e=o)||void 0===e?void 0:e.replace(/\ /g,"");null!==(t=r)&&void 0!==t&&t.includes("References:")&&(r=null===(i=r)||void 0===i?void 0:i.replace("References:","Reference:"));let a=null===(n=r)||void 0===n?void 0:n.split("Reference:<br>");if(2===(null===a||void 0===a?void 0:a.length)){var s,d;let e=a[0]+"<br>Reference:<br>",o=null===(s=a[1])||void 0===s||null===(d=s.replaceAll("\n","<br>"))||void 0===d?void 0:d.split("<br>");o=o.filter((e=>{if(e)return e}));let t=[];for(let l=0;l<(null===(c=o)||void 0===c?void 0:c.length);l++){var c;let e=o[l].replace("\n","");if(null!==e&&void 0!==e&&e.includes("/assets")||null!==e&&void 0!==e&&e.includes("<img "))t.push(e);else{if(null===e||void 0===e||!e.includes("http"))continue;t.push(`<a href="${e}" target="_blank" style="word-break: break-all;">${e}</a>`)}}t=t.join("<br>"),l(e+t)}else{var p;o=null===(p=o)||void 0===p?void 0:p.replaceAll(/<a /g,'<a target="_blank" '),l(o)}}),[o]),(0,h.jsx)("div",{dangerouslySetInnerHTML:{__html:t}})}},86070:(e,o,t)=>{t.d(o,{t:()=>A});
1var l=t(2039),i=t.n(l),n=t(35207),r=t(79494),a=t(50754),s=t(46408);const d=(0,n.Ay)("div")((e=>{let{theme:o}=e;const t="rtl"===o.direction;return{"& .ql-snow.ql-toolbar button:hover .ql-fill, .ql-snow .ql-toolbar button:hover .ql-fill, .ql-snow.ql-toolbar button:focus .ql-fill, .ql-snow .ql-toolbar button:focus .ql-fill, .ql-snow.ql-toolbar button.ql-active .ql-fill, .ql-snow .ql-toolbar button.ql-active .ql-fill, .ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill, .ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill, .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill, .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill, .ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill, .ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill, .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill, .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill, .ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill, .ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill, .ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill, .ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill, .ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill, .ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill, .ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill, .ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill, .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill, .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill, .ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill, .ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill, .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill, .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill":{fill:o.palette.primary.main},"& .ql-snow.ql-toolbar button:hover, .ql-snow .ql-toolbar button:hover, .ql-snow.ql-toolbar button:focus, .ql-snow .ql-toolbar button:focus, .ql-snow.ql-toolbar button.ql-active, .ql-snow .ql-toolbar button.ql-active, .ql-snow.ql-toolbar .ql-picker-label:hover, .ql-snow .ql-toolbar .ql-picker-label:hover, .ql-snow.ql-toolbar .ql-picker-label.ql-active, .ql-snow .ql-toolbar .ql-picker-label.ql-active, .ql-snow.ql-toolbar .ql-picker-item:hover, .ql-snow .ql-toolbar .ql-picker-item:hover, .ql-snow.ql-toolbar .ql-picker-item.ql-selected, .ql-snow .ql-toolbar .ql-picker-item.ql-selected":{color:o.palette.primary.main},"& .ql-snow.ql-toolbar button:hover .ql-stroke, .ql-snow .ql-toolbar button:hover .ql-stroke, .ql-snow.ql-toolbar button:focus .ql-stroke, .ql-snow .ql-toolbar button:focus .ql-stroke, .ql-snow.ql-toolbar button.ql-active .ql-stroke, .ql-snow .ql-toolbar button.ql-active .ql-stroke, .ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke, .ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke, .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke, .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke, .ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke, .ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke, .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke, .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke, .ql-snow.ql-toolbar button:hover .ql-stroke-miter, .ql-snow .ql-toolbar button:hover .ql-stroke-miter, .ql-snow.ql-toolbar button:focus .ql-stroke-miter, .ql-snow .ql-toolbar button:focus .ql-stroke-miter, .ql-snow.ql-toolbar button.ql-active .ql-stroke-miter, .ql-snow .ql-toolbar button.ql-active .ql-stroke-miter, .ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter, .ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter, .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter, .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter, .ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter, .ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter, .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter, .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter":{stroke:o.palette.primary.main},"& .ql-stroke":{stroke:o.palette.text.primary},"& .ql-fill, .ql-stroke.ql-fill":{fill:o.palette.text.primary},"& .ql-picker, .ql-picker-options, .ql-picker-item, .ql-picker-label, button":{"&:focus":{outline:"none"}},"& .ql-toolbar.ql-snow":{border:"none",borderBottom:`solid 1px ${o.palette.grey[50032]}`,"& .ql-formats":{"&:not(:last-of-type)":{marginRight:o.spacing(2)}},"& button":{padding:0,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:4,color:o.palette.text.primary},"& button svg, span svg":{width:20,height:20},"& .ql-picker-label":{...o.typography.subtitle2,color:o.palette.text.primary,"& .ql-stroke":{stroke:o.palette.text.primary}},"& .ql-picker-label svg":{...t&&{right:"0 !important",left:"auto !important"}},"& .ql-color,& .ql-background,& .ql-align ":{"& .ql-picker-label":{padding:0,display:"flex",alignItems:"center",justifyContent:"center"}},"& .ql-expanded":{"& .ql-picker-label":{borderRadius:4,color:o.palette.text.disabled,borderColor:"transparent !important",backgroundColor:o.palette.action.focus,"& .ql-stroke":{stroke:o.palette.text.disabled}},"& .ql-picker-options":{padding:0,marginTop:4,border:"none",maxHeight:200,overflow:"auto",boxShadow:o.customShadows.z20,borderRadius:o.shape.borderRadius,backgroundColor:o.palette.background.paper},"& .ql-picker-item":{color:o.palette.text.primary},"&.ql-align":{"& .ql-picker-options":{padding:0,display:"flex"},"& .ql-picker-item":{width:32,height:32,display:"flex",alignItems:"center",justifyContent:"center"}},"&.ql-color, &.ql-background":{"& .ql-picker-options":{padding:8},"& .ql-picker-item":{margin:3,borderRadius:4,"&.ql-selected":{border:"solid 1px black"}}},"&.ql-font, &.ql-size, &.ql-header":{"& .ql-picker-options":{padding:o.spacing(1,0)},"& .ql-picker-item":{padding:o.spacing(.5,1.5)}}}}}}));var c=t(94014),p=t(88674),u=t(56723);l.Quill.register("modules/imageUploader",c.A);const m=["Arial","Tahoma","Georgia","Impact","Verdana"],h=["8px","9px","10px","12px","14px","16px","20px","24px","32px","42px","54px","68px","84px","98px"],g=["Heading 1","Heading 2","Heading 3","Heading 4","Heading 5","Heading 6"];function x(){this.quill.history.undo()}function v(){this.quill.history.redo()}async function b(e){return new Promise((async(o,t)=>{const l=await p.R.uploadImage([e]);return null!==l&&void 0!==l&&l.length?o(l[0]):t("Error in image upload")}))}const q=l.Quill.import("attributors/style/size");q.whitelist=h,l.Quill.register(q,!0);const f=l.Quill.import("attributors/style/font");f.whitelist=m,l.Quill.register(f,!0);const w=["align","background","blockquote","bold","bullet","code","code-block","color","direction","font","formula","header","image","indent","italic","link","list","script","size","strike","table","underline","video"];function y(e){let{id:o,isSimple:t,...l}=e;return(0,u.jsx)(d,{...l,children:(0,u.jsxs)("div",{id:o,children:[(0,u.jsxs)("div",{className:"ql-formats",children:[!t&&(0,u.jsxs)("select",{className:"ql-font",defaultValue:"",children:[(0,u.jsx)("option",{value:"",children:"Font"}),m.map((e=>(0,u.jsx)("option",{value:e,children:e},e)))]}),!t&&(0,u.jsx)("select",{className:"ql-size",defaultValue:"16px",children:h.map((e=>(0,u.jsx)("option",{value:e,children:e},e)))}),(0,u.jsxs)("select",{className:"ql-header",defaultValue:"",children:[g.map(((e,o)=>(0,u.jsx)("option",{value:o+1,children:e},e))),(0,u.jsx)("option",{value:"",children:"Normal"})]})]}),(0,u.jsxs)("div",{className:"ql-formats",children:[(0,u.jsx)("button",{type:"button",className:"ql-bold"}),(0,u.jsx)("button",{type:"button",className:"ql-italic"}),(0,u.jsx)("button",{type:"button",className:"ql-underline"}),(0,u.jsx)("button",{type:"button",className:"ql-strike"})]}),!t&&(0,u.jsxs)("div",{className:"ql-formats",children:[(0,u.jsx)("select",{className:"ql-color"}),(0,u.jsx)("select",{className:"ql-background"})]}),(0,u.jsxs)("div",{className:"ql-formats",children:[(0,u.jsx)("button",{type:"button",className:"ql-list",value:"ordered"}),(0,u.jsx)("button",{type:"button",className:"ql-list",value:"bullet"}),!t&&(0,u.jsx)("button",{type:"button",className:"ql-indent",value:"-1"}),!t&&(0,u.jsx)("button",{type:"button",className:"ql-indent",value:"+1"})]}),!t&&(0,u.jsxs)("div",{className:"ql-formats",children:[(0,u.jsx)("button",{type:"button",className:"ql-script",value:"super"}),(0,u.jsx)("button",{type:"button",className:"ql-script",value:"sub"})]}),!t&&(0,u.jsxs)("div",{className:"ql-formats",children:[(0,u.jsx)("button",{type:"button",className:"ql-code-block"}),(0,u.jsx)("button",{type:"button",className:"ql-blockquote"})]}),(0,u.jsxs)("div",{className:"ql-formats",children:[(0,u.jsx)("button",{type:"button",className:"ql-direction",value:"rtl"}),(0,u.jsx)("select",{className:"ql-align"})]}),(0,u.jsxs)("div",{className:"ql-formats",children:[(0,u.jsx)("button",{type:"button",className:"ql-link"}),(0,u.jsx)("button",{type:"button",className:"ql-image"}),(0,u.jsx)("button",{type:"button",className:"ql-video"})]}),(0,u.jsxs)("div",{className:"ql-formats",children:[!t&&(0,u.jsx)("button",{type:"button",className:"ql-formula"}),(0,u.jsx)("button",{type:"button",className:"ql-clean"})]}),!t&&(0,u.jsxs)("div",{className:"ql-formats",children:[(0,u.jsx)("button",{type:"button",className:"ql-undo",children:(0,u.jsx)(r.In,{icon:a.A,width:18,height:18})}),(0,u.jsx)("button",{type:"button",className:"ql-redo",children:(0,u.jsx)(r.In,{icon:s.A,width:18,height:18})})]})]})})}var j=t(82483);const k=(0,n.Ay)("div")((e=>{let{theme:o}=e;return{borderRadius:o.shape.borderRadius,border:`solid 1px ${o.palette.grey[50032]}`,"& .ql-container.ql-snow":{borderColor:"transparent",...o.typography.body1,fontFamily:o.typography.fontFamily},"& .ql-editor":{minHeight:200,"&.ql-blank::before":{fontStyle:"normal",color:o.palette.text.disabled},"& pre.ql-syntax":{...o.typography.body2,padding:o.spacing(2),borderRadius:o.shape.borderRadius,backgroundColor:o.palette.grey[900]}}}}));
1function A(e){let{id:o,error:t,value:l,onChange:n,simple:r=!1,sx:a,...s}=e;const[d,c]=(0,j.useState)({toolbar:{container:`#${o}`,handlers:{undo:x,redo:v}},history:{delay:500,maxStack:100,userOnly:!0},syntax:!0,clipboard:{matchVisual:!1},imageUploader:{upload:b}});return(0,u.jsxs)(k,{sx:{...t&&{border:e=>`solid 1px ${e.palette.error.main}`},...a},children:[(0,u.jsx)(y,{id:o,isSimple:r}),(0,u.jsx)(i(),{value:l,onChange:n,modules:d,formats:w,placeholder:"Write something awesome...",...s})]})}t(62427);const C={inline:{bold:{icon:"/static/icons/editor/inline_bold.svg",className:"toggle"},italic:{icon:"/static/icons/editor/inline_italic.svg",className:"toggle"},underline:{icon:"/static/icons/editor/inline_underline.svg",className:"toggle"},strikethrough:{icon:"/static/icons/editor/inline_strikethrough.svg",className:"toggle"},monospace:{icon:"/static/icons/editor/monospace.svg",className:"toggle"},superscript:{icon:"/static/icons/editor/superscript.svg",className:"toggle"},subscript:{icon:"/static/icons/editor/subscript.svg",className:"toggle"}},blockType:{className:"dropdown",dropdownClassName:"dropdown__option"},fontSize:{className:"dropdown",dropdownClassName:"dropdown__option"},list:{unordered:{icon:"/static/icons/editor/list_unordered.svg",className:"toggle"},ordered:{icon:"/static/icons/editor/list_ordered.svg",className:"toggle"},indent:{icon:"/static/icons/editor/list_indent.svg",className:"toggle"},outdent:{icon:"/static/icons/editor/list_outdent.svg",className:"toggle"}},textAlign:{left:{icon:"/static/icons/editor/align_left.svg",className:"toggle"},center:{icon:"/static/icons/editor/align_center.svg",className:"toggle"},right:{icon:"/static/icons/editor/align_right.svg",className:"toggle"},justify:{icon:"/static/icons/editor/align_justify.svg",className:"toggle"}},fontFamily:{className:"dropdown",dropdownClassName:"dropdown__option"},colorPicker:{icon:"/static/icons/editor/colorpicker.svg",className:"toggle",popupClassName:"popup popup__colorpicker"},link:{popupClassName:"popup popup__link",link:{icon:"/static/icons/editor/link.svg",className:"toggle"},unlink:{icon:"/static/icons/editor/unlink.svg",className:"toggle"}},emoji:{icon:"/static/icons/editor/emoji.svg",className:"toggle",popupClassName:"popup popup__emoji"},embedded:{icon:"/static/icons/editor/embedded.svg",className:"toggle",popupClassName:"popup popup__embedded"},image:{icon:"/static/icons/editor/image.svg",className:"toggle",popupClassName:"popup popup__image",uploadCallback:function(e){return new Promise(((o,t)=>{const l=new XMLHttpRequest;l.open("POST","https://api.imgur.com/3/image"),l.setRequestHeader("Authorization","Client-ID XXXXX");const i=new FormData;i.append("image",e),l.send(i),l.addEventListener("load",(()=>{const e=JSON.parse(l.responseText);o(e)})),l.addEventListener("error",(()=>{const e=JSON.parse(l.responseText);t(e)}))}))},alt:{present:!0,mandatory:!0}},remove:{icon:"/static/icons/editor/remove.svg",className:"toggle"},history:{undo:{icon:"/static/icons/editor/history_undo.svg",className:"toggle"},redo:{icon:"/static/icons/editor/history_redo.svg",className:"toggle"}}};(0,n.Ay)("div")((e=>{let{theme:o}=e;const t="light"===o.palette.mode,l="rtl"===o.direction;return{borderRadius:o.shape.borderRadius,border:`solid 1px ${o.palette.grey[50032]}`,"& .toggle":{border:"none",borderRadius:6,background:"transparent","&.rdw-option-disabled":{opacity:o.palette.action.disabledOpacity},"& img":{width:16,height:16,filter:t?"none":"invert(100%)"},'&[aria-selected="true"]':{boxShadow:"none",background:o.palette.action.selected},"&:hover":{boxShadow:"none",background:o.palette.action.hover}},"& .dropdown":{minWidth:56,borderRadius:6,boxShadow:"none",background:"transparent",border:`solid 1px ${o.palette.grey[50032]}`,"&:hover":{boxShadow:"none",background:o.palette.action.hover},"& .rdw-dropdown-selectedtext":{color:o.palette.text.primary},"& .rdw-dropdown-carettoopen":{right:l&&"10%",left:l&&"auto",borderTopColor:o.palette.text.primary},"& .rdw-dropdown-carettoclose":{right:l&&"10%",left:l&&"auto",borderBottomColor:o.palette.text.primary}},"& .dropdown__option":{width:"100%",border:"none",marginTop:o.spacing(1),padding:o.spacing(1,0),boxSh
1adow:o.customShadows.z20,borderRadius:o.shape.borderRadius,background:o.palette.background.paper,"& .rdw-dropdownoption-default":{fontSize:14,minHeight:"auto",padding:o.spacing(.5,2)},"& .rdw-dropdownoption-active":{background:o.palette.action.selected},"& .rdw-dropdownoption-highlighted":{background:o.palette.action.hover}},"& .popup":{right:0,padding:0,left:"auto",border:"none",overflow:"hidden",boxShadow:o.customShadows.z20,borderRadius:o.shape.borderRadius,background:o.palette.background.paper,"& .rdw-link-modal-buttonsection, .rdw-embedded-modal-btn-section, .rdw-image-modal-btn-section":{margin:0,display:"flex",marginTop:o.spacing(2),justifyContent:"space-between","& button":{margin:0,fontSize:13,border:"none",fontWeight:"bold",width:"calc(50% - 4px)",color:o.palette.common.white,background:o.palette.primary.main,borderRadius:o.shape.borderRadius,"&:disabled":{color:o.palette.action.disabled,background:o.palette.action.disabledBackground},"&:last-of-type":{background:"transparent",color:o.palette.text.primary},"&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"}}},"& input":{height:26,fontSize:14,background:"transparent",padding:o.spacing(0,1.5),color:o.palette.text.primary,borderRadius:o.shape.borderRadius,border:`solid 1px ${o.palette.grey[50032]}`}},"& .popup__colorpicker":{padding:0,"& .rdw-colorpicker-modal-header":{padding:o.spacing(1),background:o.palette.grey[50012],"& .rdw-colorpicker-modal-style-label":{fontSize:13,padding:o.spacing(.75,0),color:o.palette.text.secondary,borderRadius:o.shape.borderRadius,fontWeight:o.typography.fontWeightMedium},"& .rdw-colorpicker-modal-style-label-active":{borderBottom:"none",boxShadow:o.customShadows.z8,color:o.palette.text.primary,background:o.palette.common.white}},"& .rdw-colorpicker-modal-options":{margin:0,padding:o.spacing(1.5)},"& .rdw-colorpicker-option":{margin:4,width:20,height:20,minWidth:20,borderRadius:6,overflow:"hidden",position:"relative","&:hover":{boxShadow:"none"},"&:before":{zIndex:9,fontSize:0,width:"100%",height:"100%",display:"flex",borderRadius:6,content:'"\\2713"',position:"absolute",alignItems:"center",justifyContent:"center",color:o.palette.common.white,fontWeight:o.typography.fontWeightBold,boxShadow:"inset 0 0 3px 0 rgba(0,0,0,0.12)"},'&[aria-selected="true"]':{boxShadow:"none",borderRadius:"50%","&:before":{fontSize:12}}},"& .rdw-colorpicker-cube":{border:"none"}},"& .popup__link":{height:"auto",padding:o.spacing(2),"& .rdw-link-modal-label":{fontSize:13,fontWeight:o.typography.fontWeightMedium},"& .rdw-link-modal-input":{marginTop:4,marginBottom:12},"& .rdw-link-modal-target-option":{display:"flex",marginBottom:0,alignItems:"center","& > span":{fontSize:14,marginLeft:o.spacing(1)}}},"& .popup__emoji":{overflow:"auto",padding:o.spacing(1)},"& .popup__embedded":{height:"auto","& .rdw-embedded-modal-header":{padding:o.spacing(1),background:o.palette.grey[50012],"& .rdw-embedded-modal-header-label":{display:"none"},"& .rdw-embedded-modal-header-option":{fontSize:13,padding:o.spacing(.75,0),color:o.palette.text.secondary,borderRadius:o.shape.borderRadius,fontWeight:o.typography.fontWeightMedium}},"& .rdw-embedded-modal-link-section":{padding:o.spacing(2,2,0)},"& .rdw-embedded-modal-btn-section":{padding:o.spacing(0,2,2)}},"& .popup__image":{padding:0,"& .rdw-image-modal-header":{margin:0,zIndex:9,fontSize:13,padding:o.spacing(1),background:o.palette.grey[50012],fontWeight:o.typography.fontWeightMedium,"& .rdw-image-modal-header-option":{position:"relative",padding:o.spacing(.75,0)},"& .rdw-image-modal-header-label":{margin:0,width:"100%",height:"100%",border:"none",position:"absolute",background:"transparent"},"& .rdw-image-modal-header-label-highlighted":{zIndex:-1,boxShadow:o.customShadows.z8,background:o.palette.common.white,borderRadius:o.shape.borderRadius}},"& .rdw-image-modal-upload-option":{margin:0,outline:"none",background:"none",padding:o.spacing(2)},"& .rdw-image-modal-upload-option-label":{fontSize:13,textAlign:"center",color:o.palette.text.disabled,borderRadius:o.shape.borderRadius,border:`dashed 1px ${o.palette.grey[50032]}`},"& .rdw-image-modal-btn-section":{padding:o.spacing(0,2,2)},"& .rdw-image-modal-size, .rdw-image-modal-url-section":{padding:o.spacing(0,2)}},"& .rdw-editor-toolbar":{border:"none",marginBottom:0,background:"transparent",borderBottom:`solid 1px ${o.palette.grey[50032]}`},"& .rdw-editor-main":{minHeight:200,padding:o.spacing(0,2),"& .public-DraftEditorPlaceholder-root":{color:o.palette.text.disabled}}}}))},88674:(e,o,t)=>{t.d(o,{R:()=>n});
1var l=t(67369);const i=e=>new Promise((async(o,t)=>{const l=new FileReader;l.readAsDataURL(e),l.onload=()=>o(l.result),l.onerror=e=>t(e)})),n={toBase64:i,uploadImage:async e=>{try{let n=[];for(let r=0;r<e.length;r++){var o,t;if("object"===typeof e[r]&&(null!==(o=e[r].type)&&void 0!==o&&o.includes("image")||null!==(t=e[r].type)&&void 0!==t&&t.includes("pdf"))){let o=await i(e[r]);const t=await l.A.uploadImage(o);n.push(t.data)}else"string"===typeof e[r]&&n.push(e[r])}return n}catch(n){return n}}}}}]); 2//# sourceMappingURL=9062.8fda7932.chunk.js.map
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.