1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[65220,1847],{58028:function(e,t,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/student-dashboard",function(){return o(91165)}])},72448:function(e,t,o){"use strict";var i=o(34896);t.Z=void 0;var n=i(o(20489)),s=o(11527);t.Z=(0,n.default)((0,s.jsx)("path",{d:"M22 4c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4zm-2 13.17L18.83 16H4V4h16zM13 5h-2v4H7v2h4v4h2v-4h4V9h-4z"}),"AddCommentOutlined")},99898:function(e,t,o){"use strict";var i=o(34896);t.Z=void 0;var n=i(o(20489)),s=o(11527);t.Z=(0,n.default)((0,s.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack")},31927:function(e,t,o){"use strict";var i=o(34896);t.Z=void 0;var n=i(o(20489)),s=o(11527);t.Z=(0,n.default)((0,s.jsx)("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown")},26159:function(e,t,o){"use strict";var i=o(34896);t.Z=void 0;var n=i(o(20489)),s=o(11527);t.Z=(0,n.default)((0,s.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},98790:function(e,t,o){"use strict";var i=o(34896);t.Z=void 0;var n=i(o(20489)),s=o(11527);t.Z=(0,n.default)((0,s.jsx)("path",{d:"m9 16.2-3.5-3.5a.9839.9839 0 0 0-1.4 0c-.39.39-.39 1.01 0 1.4l4.19 4.19c.39.39 1.02.39 1.41 0L20.3 7.7c.39-.39.39-1.01 0-1.4a.9839.9839 0 0 0-1.4 0z"}),"DoneRounded")},59829:function(e,t,o){"use strict";var i=o(34896);t.Z=void 0;var n=i(o(20489)),s=o(11527);t.Z=(0,n.default)((0,s.jsx)("path",{d:"m12 17.27 5.17 3.12c.38.23.85-.11.75-.54l-1.37-5.88 4.56-3.95c.33-.29.16-.84-.29-.88l-6.01-.51-2.35-5.54c-.17-.41-.75-.41-.92 0L9.19 8.63l-6.01.51c-.44.04-.62.59-.28.88l4.56 3.95-1.37 5.88c-.1.43.37.77.75.54z"}),"GradeRounded")},10614:function(e,t,o){"use strict";var i=o(34896);t.Z=void 0;var n=i(o(20489)),s=o(11527);t.Z=(0,n.default)((0,s.jsx)("path",{d:"m4.01 6.03 7.51 3.22-7.52-1zm7.5 8.72L4 17.97v-2.22zM2.01 3 2 10l15 2-15 2 .01 7L23 12z"}),"SendOutlined")},17845:function(e,t,o){"use strict";var i=o(34896);t.Z=void 0;var n=i(o(20489)),s=o(11527);t.Z=(0,n.default)((0,s.jsx)("path",{d:"M3 5v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2"}),"SquareRounded")},3797:function(e,t,o){"use strict";var i=o(34896);t.Z=void 0;var n=i(o(20489)),s=o(11527);t.Z=(0,n.default)((0,s.jsx)("path",{d:"M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57-.03.32c0 .41.17.79.44 1.06L9.83 23l6.58-6.59c.37-.36.59-.86.59-1.41V5c0-1.1-.9-2-2-2m0 12-4.34 4.34L11.77 14H3v-2l3-7h9zm4-12h4v12h-4z"}),"ThumbDownAltOutlined")},53362:function(e,t,o){"use strict";var i=o(34896);t.Z=void 0;var n=i(o(20489)),s=o(11527);t.Z=(0,n.default)((0,s.jsx)("path",{d:"M21 8h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2c0-1.1-.9-2-2-2m0 4-3 7H9V9l4.34-4.34L12.23 10H21zM1 9h4v12H1z"}),"ThumbUpAltOutlined")},5579:function(e,t,o){"use strict";o.d(t,{ZP:function(){return a}}),o(40507);var i=o(55949),n=o(46614),s=o(7695),r=o(86697),a=(0,i.fH)({createStyledComponent:(0,s.ZP)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,t[`maxWidth${(0,n.Z)(String(o.maxWidth))}`],o.fixed&&t.fixed,o.disableGutters&&t.disableGutters]}}),useThemeProps:e=>(0,r.i)({props:e,name:"MuiContainer"})}),d=o(30031);o(49584),(0,d.Z)("MuiContainer",["root","disableGutters","fixed","maxWidthXs","maxWidthSm","maxWidthMd","maxWidthLg","maxWidthXl"])},82118:function(e,t,o){"use strict";
1let i=o(50959).createContext({});t.Z=i},97689:function(e,t,o){"use strict";o.d(t,{ZP:function(){return b}});var i=o(20555),n=o(4529),s=o(50959);o(40507);var r=o(4814),a=o(4784),d=o(7695),l=o(86697),c=o(82118),u=o(30031),h=o(49584);function p(e){return(0,h.ZP)("MuiList",e)}(0,u.Z)("MuiList",["root","padding","dense","subheader"]);var f=o(11527);let g=["children","className","component","dense","disablePadding","subheader"],x=e=>{let{classes:t,disablePadding:o,dense:i,subheader:n}=e;return(0,a.Z)({root:["root",!o&&"padding",i&&"dense",n&&"subheader"]},p,t)},m=(0,d.ZP)("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,!o.disablePadding&&t.padding,o.dense&&t.dense,o.subheader&&t.subheader]}})(e=>{let{ownerState:t}=e;return(0,n.Z)({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})});var b=s.forwardRef(function(e,t){let o=(0,l.i)({props:e,name:"MuiList"}),{children:a,className:d,component:u="ul",dense:h=!1,disablePadding:p=!1,subheader:b}=o,C=(0,i.Z)(o,g),y=s.useMemo(()=>({dense:h}),[h]),w=(0,n.Z)({},o,{component:u,dense:h,disablePadding:p}),v=x(w);return(0,f.jsx)(c.Z.Provider,{value:y,children:(0,f.jsxs)(m,(0,n.Z)({as:u,className:(0,r.Z)(v.root,d),ref:t,ownerState:w},C,{children:[b,a]}))})})},94155:function(e,t,o){"use strict";o.d(t,{B:function(){return s}});var i="/_next/static/media/avatar-adult-f1-400w.1eb94966.webp",n=o(7039);let s=[{id:-1,name:"avatar0",photo_url:n.Zi+i},{id:0,name:"avatar0",photo_url:n.Zi+i},{id:1,name:"avatar1",photo_url:n.Zi+"/_next/static/media/avatar-adult-m1-400w.8e83f37f.webp"},{id:2,name:"avatar3",photo_url:n.Zi+"/_next/static/media/avatar-kid-f1-400w.683fa74e.webp"},{id:3,name:"avatar4",photo_url:n.Zi+"/_next/static/media/avatar-kid-m1-400w.008d541a.webp"},{id:4,name:"avatar4",photo_url:n.Zi+"/_next/static/media/avatar-kid-p1-400w.5645ba1b.webp"},{id:5,name:"avatar5",photo_url:n.Zi+"/_next/static/media/avatar-teen-f1-400w.2f9bd4b0.webp"},{id:6,name:"avatar6",photo_url:n.Zi+"/_next/static/media/avatar-teen-m1-400w.97a4db58.webp"},{id:7,name:"avatar7",photo_url:n.Zi+"/_next/static/media/avatar-teen-p1-400w.414579aa.webp"}]},91165:function(e,t,o){"use strict";o.r(t),o.d(t,{__N_SSP:function(){return th},default:function(){return tp}});var i,n,s=o(11527),r=o(5579),a=o(80199),d=o(89096),l=o(97618),c=o(31248),u=o(50959),h=o(68237),p=o(76686),f=o(43523),g=o(81776),x=o(13318),m=o(81048),b=o(69002),C=o(12312),y=o(4553),w=o(9732);let v=w.Z.div({position:"relative",height:10,width:"100px",border:"5px solid #f4a261",borderRadius:15}),j=(0,y.F4)({"0%":{width:0},"25%":{width:"50%"},"50%":{width:"75%"},"75%":{width:"85%"},"100%":{width:"100%"}}),_=w.Z.div({position:"absolute",background:"#2a9d8f",width:0,height:10,borderRadius:15,animation:j+" 1.5s",animationIterationCount:"infinite",animationTimingFunction:"ease-out",animationPlayState:"running"});var k=e=>{let{height:t="100vh"}=e;return(0,s.jsx)(C.mD,{position:"absolute",width:"100vw",height:t,id:"ProcessAnimation",zIndex:100,children:(0,s.jsx)(v,{children:(0,s.jsx)(_,{})})})};let Z=w.Z.div({maxWidth:330,width:"100%",minWidth:275,height:175,borderRadius:16,background:"#ffffff",padding:16,boxSizing:"border-box","@media (max-width: 960px)":{maxWidth:500},"@media (max-width: 768px)":{minWidth:"100%"},"@media (max-width: 450px)":{}}),q=[{id:"1",title:"Champion a Positive Math Culture",description:"Share your own experiences with math and demonstrate its real-world applications to spark enthusiasm in your child."},{id:"2",title:"Consistency Is Your Ally",description:"Establish a regular math study routine in a comfortable setting to help your child practice consistently."},{id:"3",title:"Mindset Matters",description:"Encourage a growth mindset by celebrating effort and explaining that mastery comes with time and practice."},{id:"4",title:"Find Math in the Everyday",description:"Involve your child in activities that require math, like cooking or budgeting, to show its value beyond the classroom."},{id:"5",title:"Play with Math",description:"Use games and puzzles to make math fun and engaging, helping your child build skills without pressure."},{id:"6",title:"Target the Trouble Spots",description:"Help your child identify specific challenges in math and focus on those areas for improvement."},{id:"7",title:"Leverage StudyPug",description:"Take advantage of StudyPug, which makes math tangible and understandable through engaging and hands-on activities."},{id:"8",title:"Partner with Educators",description:"Maintain communication with your child's teacher to align at-home support with classroom learning."},{id:"9",title:"Equip Them with Problem-Solving Tools",description:"Teach your child to approach complex math problems as a series of smaller, manageable tasks."},{id:"10",title:"Celebrate the Effort",description:"Recognize and reward the hard
1work your child puts into learning math, fostering a resilient approach to challenges."}],S=[{id:"1",title:"Organize Your Study Space",description:"Create a quiet and clutter-free area dedicated to studying to help you focus."},{id:"2",title:"Set Specific Goals",description:"Before each study session, decide what you want to achieve to keep your learning on track."},{id:"3",title:"Regular Practice",description:"Math skills improve with practice. Try to work on math a little bit every day."},{id:"4",title:"Embrace Mistakes",description:"See mistakes as a valuable part of learning â not as setbacks, but as stepping-stones to understanding."},{id:"5",title:"Use Available Resources",description:"Take full advantage of the videos, practices, and interactive activities available on this platform to enhance your learning."},{id:"6",title:"Ask for Expert",description:"When you're stuck, use the premium feature to ask questions. There's no shame in needing assistance."},{id:"7",title:"Take Breaks",description:"Short, frequent breaks can help you absorb information better and keep you fresh for new material."},{id:"8",title:"Collaborate with Peers",description:"Discussing problems with classmates can provide new insights and make learning more enjoyable."},{id:"9",title:"Review Regularly",description:"Go over previous lessons to reinforce your understanding and retention of mathematical concepts."},{id:"10",title:"Stay Positive",description:"Keep a positive attitude towards your studies. Confidence can significantly impact your ability to solve math problems."}];var T=e=>{let{isParent:t}=e,[o,i]=(0,u.useState)({id:"",title:"",description:""});return((0,u.useEffect)(()=>{let e=()=>{if(t){let e=Math.floor(Math.random()*q.length);return q[e]}{let e=Math.floor(Math.random()*S.length);return S[e]}},o=async()=>{try{let t=e();i(t)}catch(e){}};o();let n=setInterval(()=>{o()},6e4);return()=>clearInterval(n)},[t]),o)?(0,s.jsxs)(Z,{children:[(0,s.jsxs)(d.ZP,{sx:{fontWeight:700,marginBottom:1},children:["Tip: ",o.title]}),(0,s.jsx)(d.ZP,{children:o.description})]}):(0,s.jsx)(Z,{children:(0,s.jsx)(k,{})})},P=o(6612),I=o(73281),D=o(48779);(i=n||(n={})).book="BookIcon",i.ask="AskExperts Icon",i.edit="Edit Icon";var A=e=>{let{type:t}=e;return(0,l.Z)(D._s.breakpoints.down("sm")),"BookIcon"===t?(0,s.jsx)("svg",{width:16,height:16,viewBox:"0 0 16 16",style:{zIndex:1},id:"svg-topic-component-intros",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M3.42419 15.5C2.69919 15.5 2.08044 15.2438 1.56794 14.7313C1.05544 14.2188 0.799194 13.6 0.799194 12.875V3.125C0.799194 2.4 1.05544 1.78125 1.56794 1.26875C2.08044 0.75625 2.69919 0.5 3.42419 0.5H12.7992V11.75C12.4867 11.75 12.2211 11.8594 12.0023 12.0781C11.7836 12.2969 11.6742 12.5625 11.6742 12.875C11.6742 13.1875 11.7836 13.4531 12.0023 13.6719C12.2211 13.8906 12.4867 14 12.7992 14V15.5H3.42419ZM2.29919 10.4937C2.47419 10.4062 2.65544 10.3438 2.84294 10.3062C3.03044 10.2688 3.22419 10.25 3.42419 10.25H3.79919V2H3.42419C3.11169 2 2.84607 2.10938 2.62732 2.32812C2.40857 2.54688 2.29919 2.8125 2.29919 3.125V10.4937ZM5.29919 10.25H11.2992V2H5.29919V10.25ZM3.42419 14H10.4179C10.3429 13.825 10.2836 13.6469 10.2398 13.4656C10.1961 13.2844 10.1742 13.0875 10.1742 12.875C10.1742 12.675 10.1929 12.4813 10.2304 12.2938C10.2679 12.1063 10.3304 11.925 10.4179 11.75H3.42419C3.09919 11.75 2.83044 11.8594 2.61794 12.0781C2.40544 12.2969 2.29919 12.5625 2.29919 12.875C2.29919 13.2 2.40544 13.4688 2.61794 13.6813C2.83044 13.8938 3.09919 14 3.42419 14Z",fill:"#333333"})}):"Edit Icon"===t?(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[(0,s.jsx)("mask",{id:"mask0_1980_1962",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:(0,s.jsx)("rect",{width:"24",height:"24",fill:"#D9D9D9"})}),(0,s.jsx)("g",{mask:"url(#mask0_1980_1962)",children:(0,s.jsx)("path",{d:"M4 21V16.75L17.175 3.6C17.375 3.4 17.6 3.25 17.85 3.15C18.1 3.05 18.35 3 18.6 3C18.8667 3 19.1208 3.05 19.3625 3.15C19.6042 3.25 19.8167 3.4 20 3.6L21.4 5C21.6 5.18333 21.75 5.39583 21.85 5.6375C21.95 5.87917 22 6.13333 22 6.4C22 6.65 21.95 6.9 21.85 7.15C21.75 7.4 21.6 7.625 21.4 7.825L8.25 21H4ZM6 19H7.4L17.225 9.2L16.525 8.475L15.8 7.775L6 17.6V19ZM16.525 8.475L15.8 7.775L17.225 9.2L16.525 8.475ZM14 21C15.2333 21 16.375 20.6917 17.425 20.075C18.475 19.4583 19 18.6 19 17.5C19 16.9 18.8417 16.3833 18.525 15.95C18.2083 15.5167 17.7833 15.1417 17.25 14.825L15.7
175 16.3C16.1583 16.4667 16.4583 16.65 16.675 16.85C16.8917 17.05 17 17.2667 17 17.5C17 17.8833 16.6958 18.2292 16.0875 18.5375C15.4792 18.8458 14.7833 19 14 19C13.7167 19 13.4792 19.0958 13.2875 19.2875C13.0958 19.4792 13 19.7167 13 20C13 20.2833 13.0958 20.5208 13.2875 20.7125C13.4792 20.9042 13.7167 21 14 21ZM4.575 13.35L6.075 11.85C5.74167 11.7167 5.47917 11.5792 5.2875 11.4375C5.09583 11.2958 5 11.15 5 11C5 10.8 5.15 10.6 5.45 10.4C5.75 10.2 6.38333 9.89167 7.35 9.475C8.81667 8.84167 9.79167 8.26667 10.275 7.75C10.7583 7.23333 11 6.65 11 6C11 5.08333 10.6333 4.35417 9.9 3.8125C9.16667 3.27083 8.2 3 7 3C6.25 3 5.57917 3.13333 4.9875 3.4C4.39583 3.66667 3.94167 3.99167 3.625 4.375C3.44167 4.59167 3.36667 4.83333 3.4 5.1C3.43333 5.36667 3.55833 5.58333 3.775 5.75C3.99167 5.93333 4.23333 6.00833 4.5 5.975C4.76667 5.94167 4.99167 5.83333 5.175 5.65C5.40833 5.41667 5.66667 5.25 5.95 5.15C6.23333 5.05 6.58333 5 7 5C7.68333 5 8.1875 5.1 8.5125 5.3C8.8375 5.5 9 5.73333 9 6C9 6.23333 8.85417 6.44583 8.5625 6.6375C8.27083 6.82917 7.6 7.16667 6.55 7.65C5.21667 8.23333 4.29167 8.7625 3.775 9.2375C3.25833 9.7125 3 10.3 3 11C3 11.5333 3.14167 11.9875 3.425 12.3625C3.70833 12.7375 4.09167 13.0667 4.575 13.35Z",fill:"white"})})]}):(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"31",height:"27",viewBox:"0 0 31 27",fill:"none",children:[(0,s.jsx)("path",{d:"M19.75 8.5V2.875C19.75 1.83946 18.9105 1 17.875 1H2.875C1.83946 1 1 1.83946 1 2.875V12.875C1 13.9105 1.83946 14.75 2.875 14.75H4.75V17.5625L7.5625 14.75H11",stroke:"white",style:{strokeWidth:1.25}}),(0,s.jsx)("path",{d:"M4.125 5.375H16.625",stroke:"white",style:{strokeWidth:1.25}}),(0,s.jsx)("path",{d:"M4.125 10.375H11.625",stroke:"white",style:{strokeWidth:1.25}}),(0,s.jsx)("path",{d:"M11 10.375V20.375C11 21.4105 11.8395 22.25 12.875 22.25H23.1875L26 25.0625V22.25H27.875C28.9105 22.25 29.75 21.4105 29.75 20.375V10.375C29.75 9.3395 28.9105 8.5 27.875 8.5H12.875C11.8395 8.5 11 9.3395 11 10.375Z",stroke:"white",style:{strokeWidth:1.25}}),(0,s.jsx)("path",{d:"M14.125 12.875H26.625",stroke:"white",style:{strokeWidth:1.25}}),(0,s.jsx)("path",{d:"M14.125 17.875H26.625",stroke:"white",style:{strokeWidth:1.25}})]})},E=o(3797),L=o(53362),F=o(15588),R=o(59933),W=o(44675),M=o(25161),Q=o(43763),B=o(14865);let z=w.Z.div({maxWidth:800,width:"100%",minWidth:275,height:600,borderRadius:16,background:"#ffffff",padding:16,boxSizing:"border-box",display:"flex",flexDirection:"row",justifyContent:"space-between",position:"absolute",overflow:"hidden",marginTop:100,gap:16,zIndex:1e3,[D._s.breakpoints.down("ml")]:{maxWidth:768},[D._s.breakpoints.down("md")]:{minWidth:125,maxWidth:600},[D._s.breakpoints.down("sl")]:{flexDirection:"column",minWidth:"125",maxWidth:"95%"},[D._s.breakpoints.down("sm")]:{height:550,marginTop:75}},e=>({display:e.display})),N=w.Z.div({gap:16,display:"flex",justifyContent:"center",alignItems:"flex-start"}),V=w.Z.div({clipPath:"path('M11.7471 54.3666C22.4816 31.4925 42.3479 12.946 71.9077 4.8162C100.807 -3.13198 135.146 -0.111042 167.179 11.6182C198.511 23.0909 223.061 43.5901 241.428 66.8883C261.289 92.0808 281.39 120.76 272.549 145.276C263.743 169.695 227.629 175.774 198.486 185.963C166.94 196.992 136.994 215.77 99.4989 205.779C59.8942 195.225 27.8942 166.005 10.416 135.847C-5.81823 107.836 0.00610755 79.3851 11.7471 54.3666Z')",width:285,height:210,position:"absolute",zIndex:0,top:-85,left:50,transform:"scale(2.5,.45) rotate(180deg) "},e=>({background:e.background,top:e.top,left:e.left,transform:e.transform,position:e.position,right:e.right})),O=w.Z.div({display:"flex",justifyContent:"center",alignItems:"center",width:50,height:50,boxSizing:"border-box",borderRadius:"50%",background:"#e03667"}),H=w.Z.div({label:"QuestionContainer",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start",width:300,height:"100%",gap:8,zIndex:1,position:"relative",[D._s.breakpoints.down("sl")]:{width:"100%"}},e=>({display:e.display})),X=w.Z.div({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:452,height:"100%",gap:8,position:"relative",[D._s.breakpoints.down("sl")]:{width:"100%"}},e=>({display:e.display})),U=w.Z.div({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between",width:"100%",height:"100%",gap:16,[D._s.breakpoints.down("sl")]:{width:"100%"}}),$=w.Z.div({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start",width:"100%",height:"auto",gap:8}),G=w.Z.div({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between",width:"100%",height:"auto",gap:8,padding:8,border:"1px solid #ffffff",borderBottom:"1px solid #05A7CF",borderRadius:8,boxSizing:"border-box","&:hover":{background:"#E8F1FC",borderRadius:8,border:"1px solid #05A7CF",cursor:"pointer"}},e=>({background:e.background,borderRadius:e.borderRadius,borderBottom:e.borderBottom})),Y=w.Z.div({display:"flex",flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",width:"100%",height:"auto",gap:8}),K=w.Z.div({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start",width:"100%",height:410,overflowY:"auto",overflowX:"hidden"}),J=w.Z.div({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"flex-start",width:"100%",height:"auto",padding:16,borderRadius:8,boxSizing:"border-box",gap:8},e=>({background:e.background})),ee=w.Z.div({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",width:"100%",height:"auto",padding:8,borderRadius:8,boxSizing:"border-box"},e=>({background:e.background,position:e.position,bottom:e.bottom})),et=w.Z.div({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between",width:"100%",height:"100%",position:"relative",gap:8,[D._s.breakpoints.down("sm")]:{height:"90%"}}),eo=w.Z.div({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",width:"100%",height:"auto",margin:" 0"},e=>
1({height:e.height})),ei=w.Z.div({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start",width:"100%",height:"auto"}),en=w.Z.div({display:"flex",flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",width:"95%",height:"auto",padding:16,borderRadius:8,boxSizing:"border-box",marginLeft:"5%",gap:8},e=>({background:e.background})),es=w.Z.div({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start",width:"100%",height:400,overflowY:"auto",gap:16,[D._s.breakpoints.down("sm")]:{height:375}},e=>({})),er=w.Z.div(e=>({position:"absolute",width:500,height:"selfClose"===e.type?196:160,zIndex:1e3,display:"flex",bottom:0,justifyContent:"center",alignItems:"center",[D._s.breakpoints.down("ml")]:{right:-20},[D._s.breakpoints.down("sl")]:{width:"100%",bottom:16,right:0}}),e=>({height:e.height})),ea=w.Z.div(e=>({clipPath:"selfClose"===e.type?"path('M6.52154e-06 103.608C8.21406e-06 57.2158 37.7817 20.6893 83.8398 15.1341C131.824 9.34662 159.525 -8.54573e-06 245.113 0C369.083 1.2378e-05 371.499 19.6091 497 19.6091C497 40.415 497 196 497 196H0C0 196 4.85338e-06 149.332 6.52154e-06 103.608Z')":"path('M5.66734e-06 100.014C8.68799e-06 53.6225 37.7274 16.8982 83.8957 12.3489C131.845 7.62397 159.558 -6.9734e-06 245.113 0C369.083 1.01045e-05 371.499 16.0074 497 16.0074C497 32.9918 497 160 497 160H0C0 160 3.6031e-06 131.718 5.66734e-06 100.014Z')",background:"#F3E5DA",position:"absolute",width:500,height:"selfClose"===e.type?196:160,bottom:-16,right:0,zIndex:0,display:"flex",justifyContent:"center",alignItems:"center",[D._s.breakpoints.down("sl")]:{bottom:-16,transform:"scale(1.25)"}}),e=>({height:e.height})),ed=w.Z.div({display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",width:"auto",padding:"2px 6px",borderRadius:6,border:"1px solid #05a7cf"},e=>({background:e.background})),el=w.Z.div({position:"relative",width:350,height:250,[D._s.breakpoints.down("ml")]:{width:175,height:125},[D._s.breakpoints.down("sl")]:{width:350,height:250},[D._s.breakpoints.down("sm")]:{width:262.5,height:187.5},[D._s.breakpoints.down("xs")]:{width:227.5,height:162.5}}),ec=w.Z.div({fontSize:16,color:"#000000",[D._s.breakpoints.down("sm")]:{}});var eu=e=>{let t=(0,l.Z)(D._s.breakpoints.down("sl")),o=(0,l.Z)(D._s.breakpoints.down("sm")),i=(t,o)=>{(0,Q.kK)(o)||""===o?e.setError({isError:!0,errorInfo:"Please select a reason.",title:"Reason"}):(e.handleCompletedQuestion(t,o),e.setCloseQuestionCard(!1))};return(0,Q.yD)(e.questionContent.answers)?(0,s.jsxs)(er,{children:[(0,s.jsxs)(C.mD,{flexDirection:"column",justifyContent:"flex-start",height:"100%",width:o?"100%":350,style:{gap:8,zIndex:1,padding:16},children:[(0,s.jsx)(d.ZP,{variant:"h6",sx:{fontWeight:700},children:"Mark as Closed"}),(0,s.jsxs)(d.ZP,{variant:"h6",children:[" ","Our experts will stop responding to this question."]}),(0,s.jsx)(W.Z,{type:M.F.CloseQuestion,width:t?"100%":350,userProfile:e.userProfile,chooseOption:e.selectOption,optionName:e.optionName,setOpenMenu:e.setOpenMenu}),e.error.isError&&(0,s.jsx)(d.ZP,{variant:"body2",sx:{color:"red"},children:e.error.errorInfo}),(0,s.jsxs)(C.mD,{style:{gap:16},children:[(0,s.jsx)(F.ZP,{children:(0,s.jsx)(d.ZP,{variant:"h6",sx:{fontWeight:700,textTransform:"none","&:hover":{cursor:"pointer"}},onClick:()=>{e.setCloseQuestionCard(!1)},children:"Cancel"})}),(0,s.jsx)(R.Z,{variant:"h6",buttonText:"Mark as Closed",btnType:R.L.FUNC,minWidth:40,padding:"8px 16px",color:"#ffffff",background:"#05A7CF",onClick:()=>i(e.questionContent.question_id,e.optionName)})]})]}),(0,s.jsx)(ea,{type:"selfClose"})]}):(0,s.jsxs)(er,{children:[(0,s.jsxs)(C.mD,{flexDirection:"column",justifyContent:"flex-start",height:"100%",width:"100%",style:{marginTop:"15%",gap:16,zIndex:1,padding:16},children:[(0,s.jsx)(d.ZP,{variant:"h6",sx:{fontWeight:700},children:"Was our answer helpful?"}),(0,s.jsx)(d.ZP,{variant:"h6",children:" Let us know!"}),(0,s.jsxs)(C.mD,{style:{gap:16},height:40,children:[(0,s.jsx)(F.ZP,{children:(0,s.jsx)(d.ZP,{variant:"h6",sx:{fontWeight:700,textTransform:"none"},onClick:()=>e.setCloseQuestionCard(!1),children:"Cancel"})}),(0,s.jsx)(R.Z,{buttonText:"",btnType:R.L.FUNC,icon:(0,s.jsx)(L.Z,{sx:{color:"#ffffff"}}),minWidth:40,padding:"4px",background:"#05A7CF",onClick:()=>i(e.questionContent.question_id,B.VS.helpful)}),(0,s.jsx)(R.Z,{buttonText:"",btnType:R.L.FUNC,icon:(0,s.jsx)(E.Z,{sx:{color:"#ffffff"}}),minWidth:40,padding:"4px",background:"#05A7CF",onClick:()=>i(e.questionContent.question_id,B.VS.not_helpful)})]})]}),(0,s.jsx)(ea,{})]})},eh=o(31135),ep=o(61768),ef=o(43349);let eg=async()=>{try{let e=await ef.p.get("https://www.studypug.com/api/qna/question/?me=1");return{success:!0,data:e.data}}catch(t){var e;if(!ep.ZP.isAxiosError(t))return{success:!1,error:t.message};return{success:!1,error:null===(e=t.response)||void 0===e?void 0:e.data}}},ex=async e=>{try{let t=`https://www.studypug.com/api/qna/question/id/${e}`,o=await ef.p.get(t);return{success:!0,data:o.data}}catch(e){var t;if(!ep.ZP.isAxiosError(e))return{success:!1,error:e.message};return{success:!1,error:null===(t=e.response)||void 0===t?void 0:t.data}}},em=async(e,t)=>{try{let o=`https://www.studypug.com/api/qna/question/id/${e}/close`,i=await ef.p.post(o,{state_reason:t});return{success:!0,data:i.data}}catch(e){var o;if(!ep.ZP.isAxiosError(e))return{success:!1,error:e.message};return{success:!1,error:null===(o=e.response)||void 0===o?void 0:o.data}}},eb=async e=>{try{let t=await ef.p.post("https://www.studypug.com/api/qna/question",e);return{success:!0,data:t.data}}catch(e){var t;if(!ep.ZP.isAxiosError(e))return{success:!1,error:e.message};return{success:!1,error:null===(t=e.response)||void 0===t?void 0:t.data}}},eC=async(e,t,o)=>{try{let i=`https://www.studypug.com/api/qna/${"question"===e?"question":"answer"}/id/${t}/comment`,n=await ef.p.post(i,{body:o});return{success:!0,data:n.data}}catch(e){var i;if(!ep.ZP.isAxiosError(e))return{success:!1,error:e.message};return{success:!1,error:null===(i=e.response)||void 0===i?void 0:i.data}}},ey=(e,t)=>{let o=Object.values(e.courses),i=Object.values(e.textbooks),n=Object.values(e.region_course_groups),s=Object.values(e.region_course_groups[e.regi
1on_course_groups.length-1].course_ids),r=[];o.forEach(e=>{i.forEach(o=>{if(o.course_id===e.id){var i,n;r.push({course_id:e.id,region:e.region,image_key:o.image_key,url:"header"===t?null===(i=e.header_image)||void 0===i?void 0:i.filename:null===(n=e.image)||void 0===n?void 0:n.filename,alt:e.name+" textbook",bg_css:o.bg_css,name:e.name,studyplan_id:o.studyplan_id,num_topics:e.num_topics,num_exs:e.num_exs,num_free:e.num_free,num_vids:e.num_vids,num_qs:e.num_qs,num_q_vals:e.num_q_vals,grade:e.grade,course_key:o.textbook_key,canonical_key:o.canonical_key.replace(/\/ca\/|\/au\/|\/uk\//g,"")})}})});let a=[];return s.forEach(e=>{r.forEach(t=>{e===t.course_id&&a.push(t)})}),{orderedCourses:a,regionCourseGroups:n}};var ew=o(99898),ev=o(72448),ej=o(96828),e_=o.n(ej),ek=o(53796),eZ=o(94155),eq=o(26159),eS=o(10614),eT=o(66021),eP=e=>{let t=(0,u.useRef)(null),o=(0,l.Z)(D._s.breakpoints.down("sm")),i=[{id:0,width:"100%",height:150,tabletHeight:150,title:"Message",placeholder:"Write any additional information here",autoFocus:!e.message,error:e.error.errorInfo,type:"text",required:!0,multiline:!0,rows:o?4.5:5,borderRadius:2,errorInfoLocaion:"right",placeholderFontSize:14,placeholderLineHeight:1.25,endAdornment:e.error.title===B.SV.Body&&(0,s.jsx)(d.ZP,{variant:"caption",sx:{color:"red",whiteSpace:"nowrap",fontSize:10,position:"absolute",top:5,right:6},children:e.error.errorInfo})}],n=t=>{e.setMessage&&e.setMessage(t.target.value)};return(0,s.jsxs)(en,{background:"#ffffff",children:[(0,s.jsx)(C.mD,{flexDirection:"column",width:"100%",children:i.map((o,i)=>e.error&&(0,s.jsx)(eT.Z,{locale:e.locale,ref:t,props:o,error:e.error,onChange:e=>{n(e)},value:e.message,inputMode:"text"},o.id))}),(0,s.jsxs)(C.mD,{flexDirection:"column",height:150,justifyContent:"space-around",children:[(0,s.jsx)(R.Z,{buttonText:"",btnType:R.L.FUNC,background:"#05A7CF",minWidth:40,padding:"4px",onClick:e.onCloseInput,icon:(0,s.jsx)(eq.Z,{sx:{color:"#ffffff"}})}),(0,s.jsx)(R.Z,{buttonText:"",btnType:R.L.FUNC,background:"#05A7CF",minWidth:40,padding:"4px",onClick:e.onSubmit,icon:(0,s.jsx)(eS.Z,{sx:{color:"#ffffff"}})})]})]})},eI=o(39436),eD=e=>e.comment&&(0,s.jsxs)(en,{background:e.comment.role===B.PM.User?"#A2C8F3":"#ffffff",children:[(0,s.jsxs)(C.mD,{flexDirection:"column",width:"80%",height:"auto",alignItems:"flex-start",style:{gap:8},children:["expert"===e.comment.role?(0,s.jsx)(ec,{children:(0,eI.ZP)(e.comment.body)}):(0,s.jsx)(d.ZP,{variant:"h6",children:e.comment.body}),(0,s.jsx)(d.ZP,{variant:"h6",sx:{color:"#00000080"},children:(0,Q.LU)(e.comment.created_at).created_at})]}),(0,s.jsx)(ek.ZP,{photoKey:e.comment.role===B.PM.User?e.userProfile.photo_key:"photo",photoUrl:e.comment.role===B.PM.User?e.userProfile.photo_url:eZ.B[0].photo_url,size:25,alt:e.comment.role===B.PM.User?e.userProfile.first_name:"Expert",sx:{borderRadius:"50%",overflow:"hidden"}})]}),eA=e=>{var t;let o=e.questionContent&&(0,Q.LU)(e.questionContent.created_at).created_at,{userProfile:i}=(0,m.Ry)(),[n,r]=(0,u.useState)(""),a=t=>{t===B.aJ.Open?(e.setIsInputCard&&e.setIsInputCard(!0),e.setCloseQuestionCard&&e.setCloseQuestionCard(!1)):t===B.aJ.Close&&e.setIsInputCard&&e.setIsInputCard(!1)},{setError:l}=e;(0,u.useEffect)(()=>{(0,Q.DX)(n)&&l({isError:!1,errorInfo:"",title:""})},[n,l]);let c=async t=>{if((0,Q.kK)(n)||""===n)e.setError({isError:!0,errorInfo:"Please input your comment.",title:"Message"});else if((0,Q.eS)(n))e.setError({isError:!0,errorInfo:"HTML tags are not allowed.",title:"Message"});else try{var o,i,s;let a=await eC(t,"question"===t?(null===(o=e.questionContent)||void 0===o?void 0:o.question_id)??0:(null===(s=e.questionContent)||void 0===s?void 0:null===(i=s.answers[0])||void 0===i?void 0:i.answer_id)??0,n);a.success&&a.data&&(e.getQuestionLContent&&e.getQuestionLContent(),r(""),e.setIsInputCard&&e.setIsInputCard(!1),e.setCurrentQuestionState&&e.setCurrentQuestionState(a.data.state))}catch(e){}},h=()=>{a(B.aJ.Close),r("")},p=e.questionContent&&e.questionContent.answers.length>0;return e.type===B.t.question&&e.questionContent?(0,s.jsxs)(J,{background:"#A2C8F380",children:[(0,s.jsxs)(C.mD,{justifyContent:"space-between",width:"100%",children:[(0,s.jsx)(d.ZP,{sx:{fontWeight:700},children:"Question"}),(0,s.jsx)(ek.ZP,{photoKey:null==i?void 0:i.photo_key,photoUrl:null==i?void 0:i.photo_url,size:25,alt:null==i?void 0:i.first_name,sx:{borderRadius:"50%",overflow:"hidden"}})]}),(0,s.jsx)(d.ZP,{children:e.questionContent.body}),(0,s.jsx)(d.ZP,{sx:{color:"#00000080"},children:o}),i&&e.questionContent.comments.map((e,t)=>(0,s.jsx)(eD,{comment:e,userProfile:i},t)),!p&&e.questionContent.state!==B.nm.Closed&&(0,s.jsx)(C.mD,{justifyContent:"flex-end",width:"100%",height:e.isInputCard?180:40,children:e.isInputCard?i&&(0,s.jsx)(eP,{locale:e.locale,comment:null,userProfile:i,error:e.error,onCloseInput:h,onSubmit:()=>c("question"),message:n,setMessage:r,setError:e.setError}):(0,s.jsx)(R.Z,{buttonText:"",btnType:R.L.FUNC,background:"#05A7CF",minWidth:40,padding:"4px",onClick:()=>a(B.aJ.Open),icon:(0,s.jsx)(ev.Z,{sx:{color:"#ffffff",fontSize:24,transform:"scaleX(-1)"}})})})]}):e.type===B.t.answer&&e.questionContent?(0,s.jsxs)(J,{background:"#ECC88980",children:[(0,s.jsxs)(C.mD,{justifyContent:"space-between",width:"100%",children:[(0,s.jsx)(d.ZP,{sx:{fontWeight:700},children:"Answer"}),(0,s.jsx)(ek.ZP,{photoKey:"photo",photoUrl:eZ.B[0].photo_url,size:25,alt:"Expert",sx:{borderRadius:"50%",overflow:"hidden"}})]}),(0,s.jsx)(d.ZP,{children:null===(t=e.questionContent.answers[0])||void 0===t?void 0:t.body}),e.questionContent.answers[0].image_url&&(0,s.jsx)(el,{children:(0,s.jsx)(e_(),{src:e.questionContent.answers[0].image_url,alt:"expert's img",fill:!0,style:{objectFit:"contain"}})}),(0,s.jsx)(d.ZP,{sx:{color:"#00000080"},children:o}
1),i&&!(0,Q.yD)(e.questionContent.answers)&&e.questionContent.answers[0].comments.map((e,t)=>(0,s.jsx)(eD,{comment:e,userProfile:i},t)),e.questionContent.state!==B.nm.Closed&&(0,s.jsx)(C.mD,{justifyContent:"flex-end",width:"100%",height:e.isInputCard?180:40,children:e.isInputCard?i&&(0,s.jsx)(eP,{locale:e.locale,comment:null,userProfile:i,error:e.error,setError:e.setError,onCloseInput:h,message:n,setMessage:r,onSubmit:()=>c("answer")}):(0,s.jsx)(R.Z,{buttonText:"",btnType:R.L.FUNC,background:"#05A7CF",minWidth:40,padding:"4px",onClick:()=>a(B.aJ.Open),icon:(0,s.jsx)(ev.Z,{sx:{color:"#ffffff",fontSize:24,transform:"scaleX(-1)"}})})})]}):(0,s.jsx)(ee,{background:"#ECC889",position:e.questionContent&&e.questionContent.state!==B.nm.Closed||null===e.currentQuestionState?"relative":"absolute",bottom:0,children:null===e.currentQuestionState?(0,s.jsx)(d.ZP,{variant:"body2",children:"If you ask a question now, weâll do our best to respond within 24 hours."}):e.questionContent&&(0,s.jsx)(d.ZP,{variant:"body2",children:e.questionContent.state===B.nm.Pending?"An expert will get back to you within 1 business day.":e.questionContent.state===B.nm.NeedsReply&&e.questionContent.state_reason===B.VS.waiting_for_expert?"An expert will get back to you within 1 business day.":e.questionContent.state===B.nm.NeedsReply&&e.questionContent.state_reason===B.VS.waiting_for_user?"The expert may need your reply to answer your question.":e.questionContent.state===B.nm.Answered?"If you are happy with your answer, please mark the question as completed.":e.questionContent.state!==B.nm.NeedsReply||e.questionContent.state_reason!==B.VS.waiting_for_user||(0,Q.yD)(e.questionContent.answers)?e.questionContent.state!==B.nm.NeedsReply||e.questionContent.state_reason!==B.VS.waiting_for_expert||(0,Q.yD)(e.questionContent.answers)?e.questionContent.state!==B.nm.Closed||(0,Q.yD)(e.questionContent.answers)?"You have marked this question as closed.":"This question has been answered. Hope you got something out of it!":"If you are happy with your answer, please mark the question as completed.":"An expert will get back to you within 1 business day"})})},eE=e=>{let t=(0,Q.LU)(e.questionContent.created_at).created_at,o=(0,l.Z)(D._s.breakpoints.down("sl")),[i,n]=(0,u.useState)(!1);return(0,s.jsxs)(C.mD,{width:"100%",flexDirection:"column",height:"100%",justifyContent:e.questionContent.state!==B.nm.Closed?"space-between":"flex-start",style:{gap:16},children:[(0,s.jsxs)(C.mD,{flexDirection:"row",justifyContent:"flex-start",width:"100%",style:{gap:8},children:[o&&(0,s.jsx)(R.Z,{buttonText:"",btnType:R.L.FUNC,minWidth:40,background:"#05A7CF",padding:"4px",onClick:()=>e.setTabState(B.Xh.questionList),icon:(0,s.jsx)(ew.Z,{sx:{color:"#ffffff"}})}),(0,s.jsx)(d.ZP,{variant:"h5",sx:{fontWeight:700,textAlign:"left",width:"100%"},children:e.questionContent.title})]}),e.questionContent.state===B.nm.Pending&&(0,s.jsx)(eA,{locale:e.locale,type:B.t.notice,questionContent:e.questionContent,error:e.error,setError:e.setError,setCurrentQuestionState:e.setCurrentQuestionState}),e.questionContent.state===B.nm.Pending&&(0,s.jsxs)(d.ZP,{variant:"h6",sx:{width:"100%",color:"#bcbcbc",textAlign:"center"},children:["Question Opened "," "+t]}),(0,s.jsxs)(es,{children:[(0,s.jsx)(eA,{locale:e.locale,type:B.t.question,questionContent:e.questionContent,error:e.error,setError:e.setError,getQuestionLContent:e.getQuestionLContent,setCurrentQuestionState:e.setCurrentQuestionState,closeQuestionCard:e.closeQuestionCard,setCloseQuestionCard:e.setCloseQuestionCard,isInputCard:i,setIsInputCard:n}),!(0,Q.yD)(e.questionContent.answers)&&(0,s.jsx)(eA,{locale:e.locale,type:B.t.answer,questionContent:e.questionContent,error:e.error,getQuestionLContent:e.getQuestionLContent,setError:e.setError,setCurrentQuestionState:e.setCurrentQuestionState,closeQuestionCard:e.closeQuestionCard,setCloseQuestionCard:e.setCloseQuestionCard,isInputCard:i,setIsInputCard:n})]}),(e.questionContent.state===B.nm.Answered||e.questionContent.state===B.nm.Closed)&&(0,s.jsxs)(d.ZP,{variant:"h6",sx:{width:"100%",color:"#bcbcbc",textAlign:"center"},children:["Question"," ",e.questionContent.state===B.nm.Answered?"answered":"closed"," "+t]}),e.questionContent.state!==B.nm.Pending&&(0,s.jsx)(eA,{locale:e.locale,type:B.t.notice,questionContent:e.questionContent,error:e.error,setError:e.setError}),e.questionContent.state!==B.nm.Closed&&(0,s.jsx)(R.Z,{btnType:R.L.FUNC,buttonText:(0,Q.yD)(e.questionContent.answers
1)?"Mark as Closed":"Mark as Completed",color:"#ffffff",background:"#05A7CF",padding:"8px 16px",variant:"h6",onClick:()=>{e.setCloseQuestionCard(!0),n(!1)}})]})},eL=o(21551),eF=()=>(0,s.jsxs)(C.mD,{flexDirection:"column",style:{gap:8},children:[(0,s.jsx)(d.ZP,{sx:{color:"#bcbcbc"},children:"Start by asking a New Question!"}),(0,s.jsx)(e_(),{alt:"pugImage",src:eL.IMAGE_MISC.pugMathTeacher,width:224,height:141})]}),eR=o(12452),eW=e=>{let t=(0,u.useRef)(null),o=(0,l.Z)(D._s.breakpoints.down("sl")),i=(0,l.Z)(D._s.breakpoints.down("sm")),[n,r]=(0,u.useState)({course:"",title:"",body:""}),a=[{id:0,width:"100%",height:44,tabletHeight:48,title:B.SV.Title,placeholder:"Write a title for your question",autoFocus:!n.title,error:e.error.errorInfo,type:"text",required:!0,multiline:!1,rows:1,borderRadius:2,errorInfoLocaion:"right",placeholderFontSize:12,endAdornment:e.error.title===B.SV.Title&&(0,s.jsx)(d.ZP,{variant:"caption",sx:{color:"red",whiteSpace:"nowrap",fontSize:10,position:"absolute",top:5,right:6},children:e.error.errorInfo})},{id:1,width:"100%",height:275,tabletHeight:i?200:275,title:B.SV.Body,placeholder:"Explain your question in detail",autoFocus:!n.body,error:e.error.errorInfo,type:"text",required:!0,multiline:!0,rows:i?7:10.25,borderRadius:2,errorInfoLocaion:"right",placeholderFontSize:12,endAdornment:e.error.title===B.SV.Body&&(0,s.jsx)(d.ZP,{variant:"caption",sx:{color:"red",whiteSpace:"nowrap",fontSize:10,position:"absolute",top:5,right:6},children:e.error.errorInfo})}],c=(e,t)=>{t===B.SV.Title?r({...n,title:e.currentTarget.value}):t===B.SV.Body&&r({...n,body:e.currentTarget.value})};(0,u.useEffect)(()=>{e.currentCourse&&Number(e.currentCourse.grade)>=9?(e.setOptionName(e.currentCourse.name),r({...n,course:e.currentCourse.name})):(e.setOptionName(""),r({...n,course:""}))},[]);let h=async()=>{""===n.course?(e.setError({...e.error,isError:!0,errorInfo:"Please select a course",title:B.SV.Course}),(0,eR.Dm)("click_question_submit","ask_for_expert_widget",g.e3,"Course is empty")):(0,Q.Wq)(n.title)||(0,Q.eS)(n.title)?(e.setError({...e.error,isError:!0,errorInfo:(0,Q.Wq)(n.title)?"Question cannot be empty":"HTML tags are not allowed",title:B.SV.Title}),(0,eR.Dm)("click_question_submit","ask_for_expert_widget",g.e3,"Question is empty")):(0,Q.Wq)(n.body)||!0===(0,Q.eS)(n.body)?(e.setError({...e.error,isError:!0,errorInfo:(0,Q.Wq)(n.body)?"Message cannot be empty":"HTML tags are not allowed",title:B.SV.Body}),(0,eR.Dm)("click_question_submit","ask_for_expert_widget",g.e3,"Messsage is empty")):(p(),(0,eR.Yo)("click_question_submit","ask_for_expert_widget",g.e3),e.setOpenMenu(!1))},p=async()=>{try{let t=await eb(n);t.success&&(e.setCurrentQuestionState(t.data.state),e.setQuestionBlockState({form:!1,qnaComment:!0,default:!1,qnaQuestionId:t.data.question_id}))}catch(e){}};return(0,u.useEffect)(()=>{(0,Q.Wq)(n.course)&&(0,Q.Wq)(n.title)&&(0,Q.Wq)(n.body)||e.setError({...e.error,isError:!1,errorInfo:"",title:""})},[n.title,n.body,n.course]),(0,s.jsxs)(U,{children:[(0,s.jsxs)(C.mD,{flexDirection:"row",justifyContent:"flex-start",width:"100%",style:{gap:8},children:[o&&(0,s.jsx)(R.Z,{buttonText:"",btnType:R.L.FUNC,minWidth:40,background:"#05A7CF",padding:"4px",onClick:()=>{e.setTabState(B.Xh.questionList),e.setQuestionBlockState({form:!1,qnaComment:!0,default:!1,qnaQuestionId:-1})},icon:(0,s.jsx)(ew.Z,{sx:{color:"#ffffff"}})}),(0,s.jsx)(d.ZP,{variant:"h5",sx:{fontWeight:700,textAlign:"left",width:"100%"},children:"New Question"})]}),(0,s.jsxs)($,{children:[(0,s.jsx)(W.Z,{type:M.F.AskExpert,width:"100%",userProfile:e.userProfile,chooseOption:t=>{e.setOptionName(t.name),r({...n,course:t.name})},optionName:e.optionName,setOpenMenu:e.setOpenMenu,courseList:e.studyPlanList,error:e.error,setError:e.setError}),a.map((o,i)=>(0,s.jsx)(eT.Z,{locale:e.locale,ref:t,props:o,error:e.error,onChange:e=>c(e,0===i?B.SV.Title:B.SV.Body),value:0===i?n.title:n.body,inputMode:"text"},o.id))]}),(0,s.jsx)(eA,{type:B.t.notice,currentQuestionState:e.currentQuestionState,setError:e.setError,error:e.error,locale:e.locale}),(0,s.jsx)(eo,{height:40,children:(0,s.jsx)(R.Z,{btnType:R.L.FUNC,buttonText:"Submit Question",color:"#ffffff",background:"#05A7CF",padding:"8px 16px",variant:"h6",fontWeight:700,onClick:e.error.isError?void 0:h})})]})},eM=o(45785),eQ=e=>{let t=(0,Q.LU)(e.questionList.last_interacted_at).last_interacted_at;return(0,s.jsxs)(G,{onClick:e.onClick,background:e.background,borderRadius:e.borderRadius,borderBottom:e.borderBottom,children:[(0,s.jsxs)(Y,{children:[(0,s.jsx)(d.ZP,{sx:{color:"#05A7CF",width:"95%",whiteSpace:"pre-line",wordBreak:"break-word"},children:e.questionList.title}),(0,s.jsx)(ed,{children:(0,s.jsx)(d.ZP,{variant:"caption",sx:{maxWidth:100,color:"#05A7CF",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"noWrap"},children:(0,Q.Wq)(e.questionList.course)?"Course Name":e.questionList.course})})]}),(0,s.jsxs)(Y,{children:[(0,s.jsx)(d.ZP,{sx:{opacity:.5},children:t}),(0,s.jsx)(d.ZP,{sx:{opacity:.5,color:e.questionList.state===B.nm.NeedsReply?"red":"#00000080"},children:((e,t)=>{switch(e){case B.nm.Pending:return B.vV.Pending;
1case B.nm.NeedsReply:if(t===B.VS.waiting_for_expert)return B.vV.MessageSent;return B.vV.NeedsReply;case B.nm.Answered:return B.vV.Answered;case B.nm.Closed:return B.vV.Closed;case B.nm.Assigned:return B.vV.Assigned}})(e.questionList.state,e.questionList.state_reason)})]})]})},eB=e=>{let{setCardModal:t}=(0,x.wh)(),o=e.questionList.some(e=>e.state!==B.nm.Closed);return(0,u.useEffect)(()=>{(0,Q.yD)(e.questionList)||-1!==e.questionBlockState.qnaQuestionId||!0===e.questionBlockState.form||e.setQuestionBlockState({form:!1,qnaComment:!0,default:!1,qnaQuestionId:e.questionList[0].question_id})},[e]),(0,s.jsxs)(et,{children:[(0,s.jsxs)(ei,{children:[(0,Q.yD)(e.questionList)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.ZP,{variant:"h6",sx:{margin:1,width:"100%",wordBreak:"auto-phrase"},children:"As a valued customer weâd like to show you a new feature weâre testing out. If you need some extra help and support, you can now submit your questions to our team of experts."}),(0,s.jsxs)(d.ZP,{variant:"h6",sx:{margin:1,fontWeight:"700",width:"100%",wordBreak:"auto-phrase"},children:["Our experts will only be answering"," ",(0,s.jsx)("span",{style:{textDecoration:"underLine"},children:"Math questions"})," ","during this limited rollout."]})]}),(0,s.jsx)(eM.ZP,{sx:{margin:0},componentsProps:{tooltip:{sx:{bgcolor:"#ffffff",color:"#000000",boxShadow:"0px 3px 3px #00000033",borderRadius:1}}},title:e.questionBlockState.form||o?"Open question limit reached. Please close any active questions before asking a new question.":"",children:(0,s.jsx)(eo,{children:(0,s.jsx)(R.Z,{btnType:e.questionBlockState.form||o?R.L.BANNER:R.L.FUNC,variant:"h6",buttonText:"New Question",minWidth:"100%",margin:"0",padding:"8px 16px",fontWeight:700,background:e.questionBlockState.form||o?"#B2CDD7":"#05A7CF",color:"#ffffff",BANNERColor:"#ffffff",onClick:()=>{e.handleQuestionListBlock(B.aR.ask,-1),e.setTabState(B.Xh.form),e.setCurrentQuestionState(null),(0,eR.Yo)("click_new_question","ask_for_expert_widget",g.e3)}})})})]}),!(0,Q.yD)(e.questionList)&&(0,s.jsx)(K,{children:e.questionList.map(t=>(0,s.jsx)(eQ,{questionList:t,onClick:()=>e.handleQuestionListBlock(B.aR.check,t.question_id),background:e.questionBlockState.qnaQuestionId===t.question_id?"#E8F1FC":"#ffffff",borderRadius:e.questionBlockState.qnaQuestionId===t.question_id?8:0,borderBottom:e.questionBlockState.qnaQuestionId===t.question_id?"none":"1px solid #05A7CF"},t.question_id))}),(0,s.jsx)(eo,{children:(0,s.jsx)(F.ZP,{onClick:()=>{t(x.sj.Empty),e.handleQuestionListBlock(B.aR.default,-1),e.setOpenMenu(!1)},sx:{padding:"8px 16px",width:"100%","&:hover":{background:"#E8F1FC",cursor:"pointer"}},children:(0,s.jsx)(d.ZP,{variant:"h6",sx:{fontWeight:700,textTransform:"none"},children:"Close"})})})]})},ez=e=>{let{display:t,userProfile:o,questionList:i,currentCourse:r,currentQuestionState:a,setCurrentQuestionState:c,studyPlanList:h,locale:f}=e,{cardModal:g,setCardModal:m}=(0,x.wh)(),b=(0,u.useRef)(null),[y,w]=(0,u.useState)(""),[v,j]=(0,u.useState)(""),[_,k]=(0,u.useState)(null),[Z,q]=(0,u.useState)(null),[S,T]=(0,u.useState)(!1),[P,I]=(0,u.useState)(B.Xh.questionList),E=(0,l.Z)(D._s.breakpoints.down("ml")),L=(0,l.Z)(D._s.breakpoints.down("sl"));(0,l.Z)(D._s.breakpoints.down("sm"));let F=(0,l.Z)(D._s.breakpoints.down("md")),[R,W]=(0,u.useState)(!1),[M,U]=(0,u.useState)({form:!1,qnaComment:!1,default:!0,qnaQuestionId:-1}),[$,G]=(0,u.useState)({courseData:[],courseCategory:[]}),[Y,K]=(0,u.useState)({isError:!1,errorInfo:"",title:""}),J=(e,t)=>{e===B.aR.ask?U({form:!0,qnaComment:!1,default:!1,qnaQuestionId:-1}):e===B.aR.check?(U({form:!1,qnaComment:!0,default:!1,qnaQuestionId:t}),I(B.Xh.qnaComment)):U({form:!1,qnaComment:!1,default:!0,qnaQuestionId:-1})};(0,u.useEffect)(()=>{let e=e=>{(0,Q.pt)(e,b,g,m,x.sj.AskExpert)};return!0!==_&&(document.addEventListener("mousedown",e),J(B.aR.default,-1),k(!1),I(B.Xh.questionList)),()=>{document.removeEventListener("mousedown",e)}},[b,g,m,_]),(0,u.useEffect)(()=>{let e=o&&o.region;(0,Q.DX)(e)&&(async()=>{try{let t=await (0,eh.fd)(e);if(t.success&&(0,Q.DX)(t.data)){let e=ey(t.data);G(t=>({...t,courseCategory:e.regionCourseGroups,courseData:e.orderedCourses}))}}catch(e){}})()},[null==o?void 0:o.region,o]),(0,u.useEffect)(()=>{((0,Q.DX)(v)||""!==v)&&K({isError:!1,errorInfo:"",title:""})},[v]);let ee=async()=>{let e=await ex(M.qnaQuestionId);e.success&&e.data&&q(e.data)};(0,u.useEffect)(()=>{let e=async()=>{let e=await ex(M.qnaQuestionId);e.success&&e.data&&q(e.data)};(0,Q.DX)(Z)&&(0,Q.DX)(a)&&a!==Z.state?e():-1!==M.qnaQuestionId&&M.qnaQuestionId!==(null==Z?void 0:Z.question_id)&&(W(!0),e(),setTimeout(()=>{W(!1)},300))},[M.qnaQuestionId,a,Z]);let et=async(e,t)=>{try{(await em(e,t)).success&&(T(!1),c(B.nm.Closed))}catch(e){}};return(0,s.jsxs)(z,{display:t,ref:b,id:x.sj.AskExpert,children:[(0,s.jsxs)(H,{display:L?P===B.Xh.questionList?"flex":"none":"flex",children:[(0,s.jsx)(V,{background:"#f5c2d1",left:L?75:F?-200:E?-125:-115,top:-100,transform:L?"scale(2.5,.5) rotate(150deg)":"scale(2,.5) rotate(150deg)"}),(0,s.jsxs)(C.mD,{width:"100%",justifyContent:"space-between",height:50,style:{zIndex:2,marginBottom:8},children:[(0,s.jsx)(d.ZP,{sx:{fontWeight:700},variant:"h5",children:"Ask an Expert"}),(0,s.jsxs)(N,{children:[(0,s.jsx)(d.ZP,{color:"textSecondary",variant:"caption",sx:{fontWeight:400,background:"#e03667",padding:"4px 10px",fontSize:10.5,borderRadius:1,textAlign:"center",fontFamily:"Arial"},children:"BETA"}),(0,s.jsx)(O,{children:(0,s.jsx)(A,{type:n.ask})})]})]}),(0,s.jsx)(eB,{questionList:i,setQuestionBlockState:U,questionBlockState:M,setTabState:I,setCurrentQuestionState:c,setOpenMenu:k,handleQuestionListBlock:J})]}),(0,s.jsxs)(X,{display:L?P===B.Xh.qnaComment||P===B.Xh.form?"flex":"none":"flex",children:[M.default&&(0,s.jsx)(eF,{}),R?(0,s.jsx)(p.Z,{}):(0,s.jsxs)(s.Fragment,{children:[M.form&&r&&(0,s.jsx)(eW,{locale:f,userProfile:o,optionName:y,setOptionName:w,setOpenMenu:k,error:Y,setError:K,setQuestionBlockState:U,textBookList:$.courseData,currentCourse:r,setCurrentQuestionState:c,setTabState:I,currentQuestionState:a,studyPlanList:h}),Z&&M.qnaComment&&(0,s.jsx)(eE,{locale:f,questionContent:Z,closeQuestionCard:S,setCloseQuestionCard:T,error:Y,setError:K,getQuestionLContent:ee,setTabState:I,setCurrentQuestionState:c}),Z&&S&&(0,s.jsx)(eu,{questionContent:Z,setCloseQuestionCard:T,userProfile:o,selectOption:e=>{j(e.name)},optionName:v,handleCompletedQuestion:et,error:Y,setError:K,setOpenMenu:k})]})]})]})},eN=o(43715),eV=o(17511),eO=o(88821),eH=o(81793),eX=o(75062);let eU=w.Z.div({width:"100%",minHeight:140,borderRadius:16,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",background:"#ffffff",margin:"16px 0",padding:16,boxSizing:"border-box",overflow:"hidden",gap:16,zIndex:10},e=>({zIndex:e.zIndex,position:e.position,display:e.display,top:e.top,width:e.width,overflow:e.overflow}));w.Z.div({width:80,height:80,borderRadius:8,boxSizing:"border-box",overflow:"hidden",position:"relative",margin:8,cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"flex-start"},e=>({opacity:e.opacity,width:e.width,height:e.height,background:e.background}));let e$=w.Z.div({width:"100%",height:"auto",minHeight:100,display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(80px, 1fr))",gap:5,justifyContent:"center",justifyItems:"center",alignItems:"center",alignContent:"center",position:"relative",overflowY:"auto",overflowX:"hidden",boxSizing:"border-box",[D._s.breakpoints.down("md")]:{gridTemplateColumns:"repeat(auto-fill, minmax(75px, 1fr))",gridTemplateRows:85,gap:10},[D._s.breakpoints.down("sm")]:{gap:5,gridTemplateColumns:"repeat(auto-fill, minmax(70px, 1fr))",gridTemplateRows:80}}),eG=w.Z.div({width:"100%",height:"auto",display:"grid",gridTemplateColumns:"1fr 1fr 1fr 1fr 1fr",flexWrap:"wrap",justifyContent:"flex-start",alignItems:"space-around",position:"relative",columnGap:10,[D._s.breakpoints.down("lg")]:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr 1fr 1fr",gridTemplateRows:"1fr",rowGap:10,height:"auto"}
1,[D._s.breakpoints.down("md")]:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gridTemplateRows:"1fr 1fr ",rowGap:10},[D._s.breakpoints.down("sm")]:{rowGap:10,justifyContent:"center",justifyItems:"center"}});var eY=e=>{var t;let o=(0,l.Z)(D._s.breakpoints.down("xs")),i=(0,l.Z)(D._s.breakpoints.down("sm")),[n,r]=(0,u.useState)(0),{cardModal:a,setCardModal:c}=(0,x.wh)(),[h,p]=(0,u.useState)(),[f,m]=(0,u.useState)({courseData:[],courseCategory:[]}),[b,C]=(0,u.useState)("");(0,u.useEffect)(()=>{C(window.location.hostname)},[]),(0,u.useEffect)(()=>{let t=e.userProfile&&e.userProfile.region;(0,Q.DX)(t)&&(async()=>{try{let e=await (0,eh.fd)(t);if(e.success&&(0,Q.DX)(e.data)){let t=ey(e.data);m(e=>({...e,courseCategory:t.regionCourseGroups,courseData:t.orderedCourses}))}}catch(e){}})()},[null===(t=e.userProfile)||void 0===t?void 0:t.region,e.userProfile]);let y=e=>{(0,eR.Yo)("click_course","browse_course",g.e3,`${(0,eX.hk)(b)}/${e}`);let t=(0,eX.hk)(b);e.startsWith("/")||(t+="/"),t+=e,window.location.assign(t)};return(0,u.useEffect)(()=>{f.courseData&&p(f.courseData.filter(e=>f.courseCategory[n].course_ids.includes(e.course_id)))},[n,f.courseData,f.courseCategory]),(0,s.jsxs)(eU,{display:e.display,top:e.top,position:e.position,width:e.width,overflow:e.overflow,children:[a===x.sj.CourseWall&&(0,s.jsx)(d.ZP,{variant:"h5",sx:{width:"100%",textAlign:"left",fontWeight:700},children:"Select a Course"}),(0,s.jsx)(eG,{children:f.courseCategory.map((e,t)=>t<5&&(0,s.jsx)(R.Z,{height:35,btnType:R.L.FUNC,buttonText:"AP & IB Courses"===e.group_name||"AP Courses"===e.group_name?"AP & IB":"IB Courses"===e.group_name?"IB":e.group_name,variant:i?"body2":"h6",minWidth:o?75:i?85:100,padding:"4px 2px",onClick:()=>{r(t),(0,eR.Yo)("click_switch_group","browse_course",g.e3,e.group_name)},boxShadowHeight:n===t?"1px":"4px",transform:n===t?"translateY(3px)":"translateY(0px)",background:0===t?"#6288C5":1===t?"#9F7BC4":2===t?"#72A8A6":3===t?"#D3878D":"#C8B666",color:"#ffffff"},t))}),(0,s.jsx)(e$,{children:h&&h.map((t,o)=>(0,s.jsx)(eH.Z,{type:eH.G.HOVER,onClick:()=>y(`/${e.userProfile&&e.userProfile.region}/`+t.course_key),url:t.url,alt:t.alt,imgWidth:i?67.2:79.8,imgHeight:i?86.4:102.6,cardHeight:i?70:80,cardWidth:i?70:80,background:t.bg_css},o))}),a===x.sj.CourseWall&&(0,s.jsx)(F.ZP,{onClick:()=>{c(x.sj.Empty)},sx:{padding:"4px 20px",marginTop:1,textTransform:"capitalize"},children:"Close"})]})},eK=e=>{let{userProfile:t}=e,o=(0,l.Z)(D._s.breakpoints.down("sm"));return(0,s.jsxs)(C.mD,{flexDirection:"column",width:"100%",children:[(0,s.jsx)(C.mD,{width:"100%",height:"auto",justifyContent:"space-between",children:(0,s.jsx)(d.ZP,{variant:o?"h6":"h5",sx:{textTransform:"capitalize",fontWeight:700},children:"Browse Courses"})}),(0,s.jsx)(eY,{type:"courseWallBlock",display:"flex",userProfile:t})]})},eJ=o(49723),e0=o(46933),e1=o(16061),e5=o(93029),e2=o(77385),e7=o.n(e2),e3=o(44268),e6=o(42666);let e4=w.Z.div({position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center",[D._s.breakpoints.down("md")]:{height:224}},e=>({borderColor:e.borderColor,background:e.background,minHeight:e.minHeight})),e8=w.Z.div({position:"relative",width:"100%",height:220,borderRadius:16,display:"flex",justifyContent:"flex-start",alignItems:"center",background:"#ffffff",border:"2.5px solid",boxSizing:"border-box",overflow:"hidden",[D._s.breakpoints.down("md")]:{height:"auto",gap:8,flexDirection:"column",alignItems:"flex-start",justifyContent:"flex-start"}},e=>({borderColor:e.borderColor,background:e.background,minHeight:e.minHeight})),e9=w.Z.div({width:"25%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"center",background:"#ffffff",margin:"16px 0",position:"relative",overflow:"hidden",paddingTop:0,boxSizing:"border-box",[D._s.breakpoints.down("md")]:{width:125,margin:"0",paddingTop:15}},e=>({background:e.background}));w.Z.div({width:"96%",height:"60%",borderRadius:"0 0 8px 8px",display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"flex-start",background:"#efefef",marginTop:-24,padding:10,boxSizing:"border-box",position:"relative",overflow:"hidden"},e=>({background:e.background}));let te=w.Z.div({width:"75%",height:"100%",borderRadius:"0 16px 0 0",display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"flex-start",background:"#ffffff",padding:"16px",boxSizing:"border-box",position:"absolute",paddingBottom:80,overflow:"hidden",right:0,[D._s.breakpoints.down("md")]:{paddingBottom:70,borderRadius:"0px 16px 0px 0px",padding:"16px 16px 16px 16px",justifyContent:"flex-start",position:"relative"},[D._s.breakpoints.down("sl")]:{paddingBottom:0}},e=>({background:e.background})),tt=w.Z.div({position:"relative",height:10,width:135,border:"2px s
1olid #f4a261",borderRadius:15,zIndex:1,background:"#ffffff"},e=>({background:e.background,width:e.width,borderColor:e.borderColor})),to=w.Z.div({position:"absolute",background:"#ffffff",width:0,height:10,borderRadius:15,opacity:.7},e=>({background:e.background,width:e.width}));w.Z.div({display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"flex-start",width:"100%",margin:10});let ti=w.Z.div({width:227.5,height:165.75,position:"relative",display:"flex",justifyContent:"center",alignItems:"center",opacity:.85,[D._s.breakpoints.down("md")]:{width:70,height:51,justifyContent:"flex-start",marginTop:-5,marginLeft:0}}),tn=w.Z.div({width:"100%",height:50,borderRadius:16,position:"absolute",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",zIndex:5,background:"#ffffff",boxSizing:"border-box",bottom:0,[D._s.breakpoints.down("lg")]:{borderRadius:10},[D._s.breakpoints.down("ml")]:{},[D._s.breakpoints.down("sm")]:{}},e=>({height:e.height,padding:e.padding})),ts=w.Z.div({width:"100%",height:"100%",position:"absolute",zIndex:0,background:"#ffffff",bottom:0,right:0,opacity:.7},e=>({borderRadius:e.borderRadius}));w.Z.div({display:"none",width:"100%",height:"100%",position:"absolute",zIndex:0,background:"#ffffff",bottom:0,right:0,opacity:.7,borderRadius:"0 12px 16px 0 "});let tr={textDecoration:"none",color:"#424242",cursior:"pointer","&:hover":{color:"#05A7CF",opacity:.8}};var ta=e=>{var t,o;let{summary:i,studyPlan:n,activity:r,currentCourse:a,setBook:c,currentStudyPlan:p,domain:f,region:x}=e,{user:b}=(0,m.Ry)(),[y,w]=(0,u.useState)([]),[v,j]=(0,u.useState)([]),[_,k]=(0,u.useState)(!1),Z=(0,l.Z)(D._s.breakpoints.down("md")),q=(0,l.Z)(D._s.breakpoints.down("lg")),S=(0,l.Z)(D._s.breakpoints.down("sm"));(0,u.useEffect)(()=>{let e=[],t=[];if((0,Q.DX)(i)){i.forEach(o=>{(0,Q.DX)(o.courses)&&o.courses.forEach(t=>{t.studyplan_id===n.id.split("_")[0]&&e.push(...t.topic_ids)}),(0,Q.DX)(o.topics)&&o.topics.forEach(o=>
1{e&&e.includes(o.topic_id)&&t.push(o)})}),(0,Q.DX)(r)&&(0,Q.DX)(r.practiced)&&r.practiced.forEach(o=>{let i=o.event_detail;if(e&&e.includes(i.topic_id)){let e=t.findIndex(e=>e.topic_id===i.topic_id);-1!==e&&(t[e]={...t[e],qe_stars:i.qe_stars})}});let o=0,s=t.sort((e,t)=>new Date(t.last_event_time).getTime()-new Date(e.last_event_time).getTime()),d=new Map;Object.values(a.chapters).forEach(e=>{Object.keys(e.topics).forEach(t=>{let o=e.topics[t];d.set(t,o.topic_key)})}),s.forEach(e=>{let t=d.get(e.topic_id);(0,Q.DX)(t)&&(e.topic_key=t)}),w(s),t.forEach(e=>{o+=e.qe_stars});let l=[],c=[];for(let e of s)l.includes(e.topic_id)||(l.push(e.topic_id),c.push(e));j(c)}},[i,n.id,a,r]);let T=e=>{let t=[];for(let o=0;o<3;o++)o<e?t.push((0,s.jsx)(e5.Z,{sx:{color:"#FFCC00"}},o)):t.push((0,s.jsx)(e1.Z,{sx:{color:"#bcbcbc"}},o));return t},P=e=>{"open"===e?(k(!0),(0,eR.Yo)("click_expand_progress","course_progress",g.e3)):k(!1)},I=(e,t)=>{(0,eR.Yo)(e?"click_start_course":"click_resume_course","course_progress",g.e3,t,null==b?void 0:b.getABTestingGroup())},A=()=>{(0,eR.Yo)("click_view_course","course_progress",g.e3,`${`https://www.studypug.com/${x}/`+a.origin_tb_key}`,null==b?void 0:b.getABTestingGroup())},E=e=>{let t=e&&Object.values(e.chapters)[0],o=t&&Object.values(t.topics)[0],i=t&&Object.values(t.topics)[0].topic_key;return{firstChapter:t,firstTopic:o,firstTopicKey:i,isStudying:p.studyplan_id===e.id,lastViewedTopic:y[0],progressNum:e&&Math.round(y.length/e.num_topics*100)}},L=e=>{let t=E(e);return(0,eX.hk)(f)+`/${x}/`+e.origin_tb_key+"/"+t.firstTopicKey},F=(e,t)=>(0,eX.hk)(f)+`/${x}/`+e.origin_tb_key+"/"+((0,Q.DX)(t.topic_key)?t.topic_key:t.topic_name.toLocaleLowerCase().replace(" ","-")),W=e=>{var t,o,i,n,s,r,d;let l=[];Object.values(a.chapters).forEach(e=>{let t=Object.keys(e.topics),o=Object.values(e.topics);t.forEach((e,t)=>{o.forEach((o,i)=>{t===i&&l.push({...o,topic_id:e})})})});let c=l.filter(t=>t.topic_id===e);return{lesson:null===(t=c[0])||void 0===t?void 0:t.num_lesson_vids,intro:null===(o=c[0])||void 0===o?void 0:o.num_intro_vids,allVids:((null===(i=c[0])||void 0===i?void 0:i.num_lesson_vids)??0)+((null===(n=c[0])||void 0===n?void 0:n.num_intro_vids)??0),topic_key:null===(s=c[0])||void 0===s?void 0:s.topic_key,name:null===(r=c[0])||void 0===r?void 0:r.name,num_stars:null===(d=c[0])||void 0===d?void 0:d.num_stars}};return(0,s.jsx)(s.Fragment,{children:Z?(0,s.jsxs)(e4,{children:[(0,s.jsxs)(e8,{borderColor:a.bg_css,background:a.bg_css,minHeight:v.length>0?170:200,children:[(0,s.jsx)(ts,{}),(0,s.jsxs)(C.mD,{height:75,width:"100%",justifyContent:"space-between",alignItems:"flex-start",children:[(0,s.jsxs)(e9,{background:a.bg_css,children:[(0,s.jsx)(ti,{children:a&&(0,s.jsx)(e_(),{src:a.header_image_url||"https://dmn92m25mtw4z.cloudfront.net/img/general/ela-nobg.webp",alt:`${a.name}`,fill:!0})}),(0,s.jsx)(e3.Z,{background:a.bg_css,onClick:c,bottom:-10,isStudying:E(a).isStudying})]}),(0,s.jsxs)(te,{background:a.bg_css,children:[(0,s.jsx)(ts,{background:"0 16px 0 0"}),(0,s.jsx)(C.mD,{justifyContent:"space-between",width:"100%",zIndex:1,children:v.length>0?(0,s.jsx)(d.ZP,{variant:Z?"body2":"body1",sx:{fontWeight:700,width:"100%"},children:"Good start! Keep working through the concept."}):(0,s.jsx)(d.ZP,{variant:Z?"body2":"body1",style:{fontWeight:700},children:"Letâs dive in and start boosting your skills."})})]})]}),v.length>0?(0,s.jsxs)(C.mD,{justifyContent:"space-around",width:"100%",style:{zIndex:2,marginTop:10},children:[(0,s.jsx)(h.Z,{btnType:R.L.CTA,btnText:"Resume",backgroundFront:"#05A7CF",backgroundRear:(0,Q.Wn)("#05A7CF"),borderColor:(0,Q.Wn)("#05A7CF"),color:"#ffffff",variant:"h6",minWidth:Z?80:100,padding:Z?"4px 10px":"16px 20px",routeTo:F(a,E(a).lastViewedTopic),onClick:()=>{I(!1,F(a,E(a).lastViewedTopic))}}),(0,s.jsxs)(C.mD,{justifyContent:"space-between",width:Z?"72.5%":"70%",children:[(0,s.jsx)(d.ZP,{variant:Z?"body2":"body1",children:E(a).lastViewedTopic.topic_name}),(0,s.jsxs)(C.mD,{children:[a.grade<10&&T(E(a).lastViewedTopic.qe_stars),a.grade>=10&&(0,s.jsxs)(C.mD,{width:88,justifyContent:"space-between",children:[(0,s.jsx)(e6.AX,{type:e6.Tu.INTRO,color:"#FAC731",borderColor:"#FAC731",background:"#FAC731",opacity:a.num_vids?1:.1,iconContainerBackgroun
1d:a.bg_css,progress:"100%"}),(0,s.jsx)(e6.AX,{type:e6.Tu.LESSON,color:"#1fc98a",borderColor:"#1fc98a",background:"#1fc98a",opacity:a.num_vids?1:.1,iconContainerBackground:a.bg_css,progress:"100%"}),(0,s.jsx)(e6.AX,{type:e6.Tu.PRACTICE,color:"#7d76e8",borderColor:"#7d76e8",background:"#7d76e8",cursor:"pointer",opacity:a.num_qb||a.num_qe?1:.1,iconContainerBackground:a.bg_css,progress:"100%"})]})]})]})]}):(0,s.jsxs)(C.mD,{flexDirection:"column",justifyContent:"space-between",width:"100%",height:"auto",style:{zIndex:2,padding:"0 16px",boxSizing:"border-box",gap:8},children:[(0,s.jsxs)(C.mD,{justifyContent:"space-between",width:"100%",height:"auto",children:[(0,s.jsx)(C.mD,{flexDirection:"row",width:"100%",height:30,justifyContent:"space-between",alignItems:"center",children:(0,s.jsx)(d.ZP,{width:"100%",variant:Z?"body2":"body1",sx:{fontWeight:700},children:E(a).firstTopicKey&&E(a).firstTopic.name})}),(0,s.jsxs)(C.mD,{children:[a.grade<10&&T(null===(t=E(a).lastViewedTopic)||void 0===t?void 0:t.qe_stars),a.grade>=10&&(0,s.jsxs)(C.mD,{width:90,justifyContent:"space-between",children:[(0,s.jsx)(e6.AX,{type:e6.Tu.INTRO,color:"#FAC731",borderColor:"#FAC731",background:"#FAC731",iconContainerBackground:a.bg_css,progress:"100%",opacity:a.num_vids?1:.1}),(0,s.jsx)(e6.AX,{type:e6.Tu.LESSON,color:"#1fc98a",borderColor:"#1fc98a",background:"#1fc98a",iconContainerBackground:a.bg_css,progress:"100%",opacity:a.num_vids?1:.1}),(0,s.jsx)(e6.AX,{type:e6.Tu.PRACTICE,color:"#7d76e8",borderColor:"#7d76e8",background:"#7d76e8",iconContainerBackground:a.bg_css,progress:"100%",opacity:a.num_qb||a.num_qe?1:.25})]})]})]}),(0,s.jsxs)(C.mD,{width:"100%",justifyContent:"space-between",height:"auto",style:{margin:"5px 0px"},children:[(0,s.jsx)(h.Z,{btnType:R.L.CTA,btnText:"Get started",backgroundFront:"#05A7CF",backgroundRear:(0,Q.Wn)("#05A7CF"),borderColor:(0,Q.Wn)("#05A7CF"),color:"#ffffff",variant:Z?"body2":"body1",minWidth:100,padding:"6px 16px",routeTo:L(a),onClick:()=>{I(!0,L(a))}}),(0,s.jsx)(h.Z,{btnType:R.L.FUNC,btnText:"View Course",variant:Z?"body2":"body1",minWidth:100,borderColor:"#05A7CF",backgroundFront:"#ffffff",backgroundRear:" #05A7CF",border:"2px solid #05A7CF",padding:"6px 16px",flex:"unset",onClick:()=>{A(),window.location.assign((0,eX.hk)(f)+`/${x}/`+a.origin_tb_key)}})]})]})]}),(0,s.jsxs)(tn,{height:!0===_?"auto":50,children:[(0,s.jsxs)(C.mD,{width:"100%",justifyContent:"space-around",height:50,children:[!S&&(0,s.jsx)(d.ZP,{variant:Z?"body2":"body1",children:"Course Progress"}),(0,s.jsxs)(d.ZP,{variant:Z?"body2":"body1",children:[v.length,"/",a.num_topics," Topics"]}),(0,s.jsx)(tt,{width:Z?"25%":"50%",borderColor:a.bg_css,children:(0,s.jsx)(to,{width:E(a).progressNum+"%",background:a.bg_css})}),v.length>0&&(0,s.jsx)(e0.Z,{sx:{fontSize:Z?18:24,color:"#05a7cf","&:hover":{opacity:.5},cursor:"pointer",transform:"rotate(90deg)",display:!0===_?"none":"block"},onClick:()=>{P("open")}}),(0,s.jsx)(eJ.Z,{sx:{fontSize:Z?18:24,color:"#05a7cf","&:hover":{opacity:.5},cursor:"pointer",transform:"rotate(90deg)",display:!0===_?"block":"none"},onClick:()=>P("close")})]}),!0===_&&(0,s.jsx)(d.ZP,{variant:"body2",width:"90%",textAlign:"left",fontWeight:700,children:"Last Practiced or Viewed"}),(0,s.jsx)(C.mD,{flexDirection:"column",alignItems:"flex-start",height:"auto",width:"90%",style:{display:!0===_?"flex":"none",margin:"4px 0"},children:v.map((e,t)=>(0,s.jsxs)(C.mD,{width:"100%",height:24,justifyContent:"space-between",children:[(0,s.jsx)(e7(),{style:tr,href:`${`https://www.studypug.com/${x}/`+a.origin_tb_key+"/"+W(e.topic_id).topic_key}`,children:(0,s.jsx)(d.ZP,{variant:"body2",sx:tr,children:e.topic_name})}),(0,s.jsx)(C.mD,{width:70,justifyContent:"space-around",children:e.qe_attempted>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e6.AX,{type:e6.Tu.LESSON,color:"#158C60",background:"#158C60",progress:(e.num_vids_viewed/W(e.topic_id).allVids*100).toString()+"%"}),(0,s.jsx)(e6.AX,{type:e6.Tu.PRACTICE,color:"#645eb9",background:"#645eb9",progress:(e.qe_correct/e.qe_attempted*100).toString()+"%"})]})})]},t))})]})]}):(0,s.jsxs)(e4,{children:[(0,s.jsxs)(e8,{borderColor:a.bg_css,children:[(0,s.jsxs)(e9,{background:a.bg_css,children:[(0,s.jsx)(ti,{children:a&&(0,s.jsx)(e_(),{src:a.header_image_url||"https://is1-ssl.mzstatic.
1com/image/thumb/Purple114/v4/1c/94/f4/1c94f416-430d-30c8-e30b-87838b4d6916/source/512x512bb.jpg",alt:`${a.name}`,fill:!0})}),(0,s.jsx)(e3.Z,{background:a.bg_css,onClick:c,bottom:55,isStudying:E(a).isStudying})]}),(0,s.jsxs)(te,{background:a.bg_css,children:[(0,s.jsx)(ts,{}),(0,s.jsx)(C.mD,{justifyContent:"space-between",width:"100%",zIndex:1,children:v.length>0?(0,s.jsx)(d.ZP,{variant:Z?"body2":"body1",sx:{fontWeight:700,width:Z?"60%":"70%"},children:"Good start! Keep working through the concept."}):(0,s.jsx)(d.ZP,{variant:Z?"body2":"body1",style:{fontWeight:700},children:"Letâs dive in and start boosting your skills."})}),v.length>0?(0,s.jsxs)(C.mD,{justifyContent:"space-between",width:"100%",style:{zIndex:2},children:[(0,s.jsx)(h.Z,{btnType:R.L.CTA,btnText:"Resume",backgroundFront:"#05A7CF",borderColor:(0,Q.Wn)("#05A7CF"),backgroundRear:(0,Q.Wn)("#05A7CF"),color:"#ffffff",variant:Z?"body2":"body1",minWidth:100,padding:"16px 16px",routeTo:F(a,E(a).lastViewedTopic),onClick:()=>{I(!1,F(a,E(a).lastViewedTopic))}}),(0,s.jsxs)(C.mD,{justifyContent:"space-between",width:"75%",children:[(0,s.jsx)(d.ZP,{variant:S?"body2":"body1",sx:{width:"65%",marginLeft:1},children:E(a).lastViewedTopic.topic_name}),(0,s.jsxs)(C.mD,{children:[a.grade<10&&T(W(E(a).lastViewedTopic.topic_id).num_stars),a.grade>=10&&(0,s.jsxs)(C.mD,{width:88,justifyContent:"space-between",children:[(0,s.jsx)(e6.AX,{type:e6.Tu.INTRO,color:"#FAC731",borderColor:"#FAC731",background:"#FAC731",iconContainerBackground:a.bg_css,progress:"100%",opacity:a.num_vids?1:.1}),(0,s.jsx)(e6.AX,{type:e6.Tu.LESSON,color:"#1fc98a",borderColor:"#1fc98a",background:"#1fc98a",progress:"100%",iconContainerBackground:a.bg_css,opacity:a.num_vids?1:.1}),(0,s.jsx)(e6.AX,{type:e6.Tu.PRACTICE,color:"#7d76e8",borderColor:"#7d76e8",background:"#7d76e8",progress:"100%",iconContainerBackground:a.bg_css,opacity:a.num_qb||a.num_qe?1:.1})]})]})]})]}):(0,s.jsxs)(C.mD,{justifyContent:"space-between",width:"100%",style:{zIndex:2,gap:8},children:[(0,s.jsx)(h.Z,{btnType:R.L.CTA,btnText:"Get started",backgroundFront:"#05A7CF",backgroundRear:(0,Q.Wn)("#05A7CF"),borderColor:(0,Q.Wn)("#05A7CF"),color:"#ffffff",minWidth:50,variant:Z?"body2":"body1",padding:"16px 8px",routeTo:L(a),onClick:()=>{I(!0,L(a))}}),(0,s.jsxs)(C.mD,{justifyContent:"space-around",width:Z?"65%":q?"70%":"75%",style:{gap:8},children:[(0,s.jsx)(d.ZP,{variant:Z?"body2":"h6",sx:{fontWeight:700},children:E(a).firstTopicKey&&E(a).firstTopic.name}),(0,s.jsxs)(C.mD,{children:[a.grade<10&&T(null===(o=E(a).lastViewedTopic)||void 0===o?void 0:o.qe_stars),a.grade>=10&&(0,s.jsxs)(C.mD,{width:"30%",justifyContent:"space-between",style:{gap:8,minWidth:90},children:[(0,s.jsx)(e6.AX,{type:e6.Tu.INTRO,color:"#FAC731",borderColor:"#FAC731",background:"#FAC731",iconContainerBackground:a.bg_css,progress:"100%",opacity:a.num_vids?1:.1}),(0,s.jsx)(e6.AX,{type:e6.Tu.LESSON,color:"#1fc98a",borderColor:"#1fc98a",background:"#1fc98a",iconContainerBackground:a.bg_css,progress:"100%",opacity:a.num_vids?1:.1}),(0,s.jsx)(e6.AX,{type:e6.Tu.PRACTICE,color:"#7d76e8",borderColor:"#7d76e8",background:"#7d76e8",iconContainerBackground:a.bg_css,progress:"100%",opacity:a.num_qb||a.num_qe?1:.25})]})]})]})]})]})]}),(0,s.jsxs)(tn,{height:!0===_?"auto":50,children:[(0,s.jsxs)(C.mD,{width:"100%",justifyContent:"space-around",height:50,children:[!S&&(0,s.jsx)(d.ZP,{variant:Z?"body2":"body1",children:"Course Progress"}),(0,s.jsxs)(d.ZP,{variant:Z?"body2":"body1",children:[v.length,"/",a.num_topics," Topics"]}),(0,s.jsx)(tt,{width:Z?"25%":"50%",borderColor:a.bg_css,children:(0,s.jsx)(to,{width:E(a).progressNum+"%",background:a.bg_css})}),v.length>0&&(0,s.jsx)(e0.Z,{sx:{fontSize:Z?18:24,color:"#05a7cf","&:hover":{opacity:.5},cursor:"pointer",transform:"rotate(90deg)",display:!0===_?"none":"block"},onClick:()=>P("open")}),(0,s.jsx)(eJ.Z,{sx:{fontSize:Z?18:24,color:"#05a7cf","&:hover":{opacity:.5},cursor:"pointer",transform:"rotate(90deg)",display:!0===_?"block":"none"},onClick:()=>P("close")})]}),!0===_&&(0,s.jsx)(d.ZP,{variant:"body2",width:"90%",textAlign:"left",fontWeight:700,children:"Last Practiced or Viewed"}),(0,s.jsx)(C.mD,{flexDirection:"column",alignItems:"flex-start",height:"auto",width:"90%",style:{display:!0===_?"flex":"none",margin:"4px 0"},children:v.map((e,t)=>(0,s.jsxs)(C.mD,{width:"100%",height:28,justifyContent:"space-between",children:[(0,s.jsx)(e7(),{style:tr,href:`${`https://www.studypug.com/${x}/`+a.origin_tb_key+"/"+W(e.topic_id).topic_key}`,children:(0,s.jsx)(d.ZP,{sx:tr,children:e.topic_name})}),a.grade<10&&(0,s.jsx)(C.mD,{width:70,justifyContent:"space-around",children:T((0,Q.DX)(W(e.topic_id).num_stars)?W(e.topic_id).num_stars:0)}),a.grade>=10&&(0,s.jsx)(C.mD,{width:70,justifyContent:"space-around",children:e.qe_attempted>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e6.AX,{type:e6.Tu.LESSON,color:"#158C60",background:"#158C60",progress:(e.num_vids_viewed/W(e.topic_id).allVids*100).toString()+"%"}),(0,s.jsx)(e6.AX,{type:e6.Tu.PRACTICE,color:"#645eb9",background:"#645eb9",progress:(e.qe_correct/e.qe_attempted*100).toString()+"%"})]})})]},t))})]})]})})},td=o(5768),tl=o(29677),tc=o(94259);let tu=w.Z.div({display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"flex-start",width:"100%",height:"auto",zIndex:1,flexWrap:"nowrap",paddingTop:50,position:"relative",paddingBottom:50,gap:32,[D._s.breakpoints.down("ml")]:{flexDirection:"column",alignItems:"center",paddingTop:35},[D._s.breakpoints.down("sm")]:{paddingTop:25}});var th=!0,tp=e=>{let{isAuthenticated:t,user:o,userProfile:i,isSubscribed:n,isChargeBack:y,isChargeFailed:w,token:v}=(0,m.Ry)(),j=(0,c.useRouter)(),{query:_}=j,k=(0,l.Z)(D._s.breakpoints.down("sm")),Z=(0,l.Z)(D._s.breakpoints.down("md")),q=(0,l.Z)(D._s.breakpoints.down("ml")),S=(0,l.Z)(D._s.breakpoints.down("sl")),{cardModal:A,setCardModal:E}=(0,x.wh)(),[L,F]=(0,u.useState)(),[R,B]=(0,u.useState)(),[z,N]=(0,u.useState)(),[V,O]=(0,u.useState)(tl.c),[H,X]=(0,u.useState)({isError:!1,errorInfo:"",title:""}),[U,$]=(0,u.useState)([]),[G,Y]=(0,u.useState)(td.H),[K,J]=(0,u.useState)(!1),[ee,et]=(0,u.useState)([]),[eo,ei]=(0,u.useState)(null),[en,es]=(0,u.useState)(""),[er,ea]=(0,u.useState)(void 0);(0,u.useEffect)(()=>{es(window.location.hostname)},[]),(0,u.useEffect)(()=>{!((0,Q.kK)(i)||(null==o?void 0:o.isParent()))&&v&&(async()=>{let e=await (0,eh.N$)("/user/activity/summary",i.user_id.toString(),v),t=await (0,eh.N$)("/user/achievement",i.user_id.toString(),v),o=await (0,eh.N$)("/user/activity/recent",i.user_id.toString(),v),n=e.data,s=t.data,r=o.data;F(n),N(s),B(r)})()},[i,U,t,o]),(0,u.useEffect)(()=>
1{if((0,Q.Wq)(v||"")){window.location.replace((0,tc.NF)((0,tc.Mu)()));return}if(t&&n){if(null==o?void 0:o.isParent()){window.location.replace((0,tc.VQ)(tc.qX.PARENT_PORTAL));return}if(!(null==o?void 0:o.hasStudyPlan())){window.location.replace((0,tc.VQ)(tc.qX.WELCOME));return}J(!0)}else(t&&!n||y||w)&&window.location.replace((0,tc.VQ)(tc.qX.START_PAGE))},[t,o,y,w]);let ed=e=>{window.location.assign((0,tc.VQ)(tc.qX.STUDENT_EDIT_CHILD,null==o?void 0:o.user.region,null==o?void 0:o.user.primary_role,e.toString()))};(0,u.useEffect)(()=>{(0,Q.DX)(_)&&"1"===_.show_upgrade&&E(x.sj.Freemium)},[_,E]);let el=async()=>{try{let e=await (0,eh.wA)();if(e.success&&(0,Q.DX)(e.data)){let t=e.data.my_courses_info,o=e.data.my_courses,i=[];for(let e of o){let o=t.filter(t=>t.studyplan_id===e);o.length>0&&i.push(o[0])}if($(i),i.length>0){let e=i[i.length-1];Y(e),O({id:e.studyplan_id,name:e.name,img:e.image.filename,grade:e.grade,course_key:e.course_key,bg_css:e.bg_css})}}}catch(e){}};(0,u.useEffect)(()=>{el()},[]);let ec=async e=>{try{await (0,eh.lO)(e)}catch(e){}};(0,u.useEffect)(()=>{let e=async()=>{if(V.id){let e=await (0,eh.ov)(V.id);e.success&&e.data&&ea(e.data)}};V.course_key&&e()},[V.course_key]);let eu=e=>{let t=U.map(e=>e.studyplan_id).indexOf(e),o=U.splice(t,1);eu.length>0&&(U.push(o[0]),O({id:o[0].studyplan_id,name:o[0].name,img:o[0].image.filename,grade:o[0].grade,course_key:o[0].course_key,bg_css:o[0].bg_css}))},ep=()=>{er&&(0,eR.Yo)("click_view_course","course_progress",g.e3,`${`https://www.studypug.com/${er.region}/`+er.origin_tb_key}`,null==o?void 0:o.getABTestingGroup())};return((0,u.useEffect)(()=>{(async()=>{let e=await eg();e.success&&e.data&&et(e.data.reverse())})()},[eo]),(0,u.useEffect)(()=>{j.push(g.Cu)},[!0]),(0,Q.kK)(i)||!1===K)?(0,s.jsx)(p.Z,{}):(0,s.jsxs)(eV.Z,{src:(0,Q.DX)(i.photo_url)?i.photo_url:void 0,title:"StudyPug: Help for Math, Calculus and Stats",description:"StudyPug is a more interactive way of study math and offers students an easy access to stay on track in their math class.",overflowX:"hidden",overflowY:"hidden",position:A===x.sj.Empty?"inherit":"relative",height:"100%",id:"dashboadContainer",children:[(0,s.jsx)(eO.Sx,{background:"#A2C8F3",top:70,minHeight:"calc(100vh)",children:(0,s.jsx)(r.ZP,{id:"MainBackground",maxWidth:"lg",style:{zIndex:2,display:"flex",flexDirection:"column",alignItems:"center",position:"relative",height:"100%"},children:i&&(0,s.jsxs)(tu,{children:[(0,s.jsxs)(eO.ER,{children:[(0,s.jsx)(C.mD,{alignItems:"flex-start",style:{gap:16},height:"100%",flexDirection:S?"column":"row",children:(0,s.jsxs)(C.mD,{flexDirection:"column",width:"100%",height:"100%",style:{gap:16},children:[(0,s.jsxs)(C.mD,{justifyContent:"space-between",width:"100%",height:40,alignItems:"center",children:[1===U.length?(0,s.jsxs)(d.ZP,{variant:k?"h6":"h5",sx:{fontWeight:700},children:[V.name," Course Progress"]}):(0,s.jsx)(W.Z,{width:"auto",type:M.F.Studyplan,courseList:U,chooseOption:e=>{eu(e.studyplan_id)},studyPlan:V,userProfile:i}),(0,s.jsx)("div",{style:{width:"auto"},children:!S&&er&&(0,s.jsx)(h.Z,{btnType:h.L.FUNC,btnText:"View Course",minWidth:100,padding:"8px 16px",variant:Z?"body2":"body1",backgroundFront:"#ffffff",borderColor:"#05A7CF",backgroundRear:" #05A7CF",onClick:()=>{ep(),window.location.assign(`${(0,eX.hk)(en)+"/"+i.region+"/"+er.origin_tb_key}`)}})})]}),er&&(0,s.jsx)(ta,{summary:L,studyPlan:V,activity:R,currentCourse:er,setBook:()=>{let e=U.map(e=>e.studyplan_id);Y(U[U.length-1]),i&&ec(e),$(U),U.length>0?(0,eR.Yo)("click_set_active","course_progress",g.e3,U[U.length-1].course_key):(0,eR.Yo)("click_set_active","course_progress",g.e3)},currentStudyPlan:G,domain:en,region:i.region})]})}),(0,s.jsx)(I.Z,{userProfile:i,summary:L,routeTo:(0,tc.VQ)(tc.qX.STUDENT_DASHBOARD)}),(0,s.jsx)(eK,{userProfile:i})]}),(0,s.jsxs)(eO.b,{children:[(0,s.jsx)(P.Z,{background:"#6D9CD0",currentStudyPlan:G,editProfile:()=>{ed(i.user_id),(0,eR.Yo)("click_edit_profile","user_profile",g.e3)},summary:L,userProfile:i,tempStudyPlan:V,achievement:z}),(0,s.jsx)(C.mD,{flexDirection:"column",height:"100%",width:S?"100%":Z?"50%":q?"50%":"100%",gap:16,children:(0,s.jsx)(T,{isParent:(null==o?void 0:o.isParent())??!1})})]})]})})}),(0,s.jsxs)(a.default,{open:A===x.sj.ParentAuth||A===x.sj.Freemium||A===x.sj.AskExpert,maxWidth:"sm",onClose:()=>E(x.sj.Empty),children:[(0,s.jsx)(b.default,{locale:(null==o?void 0:o.getRegion())??"us",display:A===x.sj.ParentAuth?"flex":"none",setError:X,error:H}),(0,s.jsx)(eN.Z,{type:(null==o?void 0:o.isChild())?f.i4.child:f.i4.student,display:A===x.sj.Freemium?"flex":"none",region:(null==o?void 0:o.getRegion())??"us",top:k?75:100}),er&&(0,s.jsx)(ez,{locale:(null==o?void 0:o.getRegion())??"us",display:A===x.sj.AskExpert?"flex":"none",userProfile:i,questionList:ee,currentCourse:er,currentQuestionState:eo,setCurrentQuestionState:ei,studyPlanList:U})]})]})}}},function(e){e.O(0,[18881,85139,45374,46514,78042,15908,89521,82014,31851,68950,39436,17165,36157,81307,9985,97177,69002,92888,49774,40179],function(){return e(e.s=58028)}),_N_E=e.O()}]);
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.