1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3332],{5700:(e,t,s)=>{"use strict";s.d(t,{A:()=>i});var n=s(6029),a=s(76264);function i(e){let{children:t,className:s,title:i,style:r,...l}=e;return(0,n.jsx)("div",{onClick:e.onClick,className:(0,a.QP)("flex items-center text-medium-dark-font",s),title:i,style:r,...l,children:t})}},16928:(e,t,s)=>{"use strict";s.d(t,{A:()=>d});var n=s(55729),a={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function i(e){var t=function(e){if("number"==typeof e)return{value:e,unit:"px"};var t,s=(e.match(/^[0-9.]*/)||"").toString();t=s.includes(".")?parseFloat(s):parseInt(s,10);var n=(e.match(/[^0-9]*$/)||"").toString();return a[n]?{value:t,unit:n}:(console.warn("React Spinners: ".concat(e," is not a valid css value. Defaulting to ").concat(t,"px.")),{value:t,unit:"px"})}(e);return"".concat(t.value).concat(t.unit)}var r=function(){return(r=Object.assign||function(e){for(var t,s=1,n=arguments.length;s<n;s++)for(var a in t=arguments[s])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},l=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(s[n[a]]=e[n[a]]);return s},o=function(e,t,s){var n="react-spinners-".concat(e,"-").concat(s);if("undefined"==typeof window||!window.document)return n;var a=document.createElement("style");document.head.appendChild(a);var i=a.sheet,r="\n @keyframes ".concat(n," {\n ").concat(t,"\n }\n ");return i&&i.insertRule(r,0),n}("ClipLoader","0% {transform: rotate(0deg) scale(1)} 50% {transform: rotate(180deg) scale(0.8)} 100% {transform: rotate(360deg) scale(1)}","clip");let d=function(e){var t=e.loading,s=e.color,a=void 0===s?"#000000":s,d=e.speedMultiplier,c=e.cssOverride,m=e.size,u=void 0===m?35:m,h=l(e,["loading","color","speedMultiplier","cssOverride","size"]),g=r({background:"transparent !important",width:i(u),height:i(u),borderRadius:"100%",border:"2px solid",borderTopColor:a,borderBottomColor:"transparent",borderLeftColor:a,borderRightColor:a,display:"inline-block",animation:"".concat(o," ").concat(.75/(void 0===d?1:d),"s 0s infinite linear"),animationFillMode:"both"},void 0===c?{}:c);return void 0===t||t?n.createElement("span",r({style:g},h)):null}},17703:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return s(49113)}])},19408:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});let n={src:"/_next/static/media/red-alert.06909bab.svg",height:34,width:38,blurWidth:0,blurHeight:0}},23410:(e,t,s)=>{"use strict";s.d(t,{BU:()=>l,KX:()=>a,VK:()=>i,bT:()=>o,tI:()=>d,tl:()=>r});var n=s(26732);let a=(0,n.UG)("\n query GameGameDetail($id: ID!) {\n game(id: $id) {\n id\n isAvailable\n banner\n comingSoon\n description\n vocabulary\n image\n pdfUrl\n teacherFacingPdfUrl\n questionGame\n gameDeveloperId\n contentType\n discussionQuestionsAfter\n discussionQuestionsBefore\n video\n estimatedDuration\n supportsIpad\n supportsTts\n supportsSpanish\n vocabulary\n instructions\n type\n game\n shortName\n sponsorshipImageUrl\n sponsorshipLinkUrl\n developerInstructions\n videoPreviewUrl\n lexileLevel\n savesProgress\n\n learningObjectives {\n id\n ngssDciName\n learningObjective\n imageKey\n subject {\n id\n subject\n subjectArea\n }\n }\n\n concepts {\n concept\n conceptIdent\n }\n\n version {\n id\n url\n languageKey\n apiVersion\n gameType\n }\n\n audience {\n g1\n g10\n g11\n g12\n g2\n g3\n g4\n g5\n g6\n g7\n g8\n g9\n k\n }\n stat {\n id\n teacherRatingAvg\n teacherRating
1Count\n studentRatingAvg\n studentRatingCount\n easeOfPlayAvg\n contentIntegrationAvg\n compositeRatingScore\n compositeRatingAvg\n }\n\n hasWorksheets\n worksheets {\n id\n difficulty\n languageCode\n worksheetUrl\n answerKeyUrl\n }\n }\n }\n"),i=(0,n.UG)("\n query GameGameReviews($id: ID!, $page: Int, $pageSize: Int) {\n game(id: $id) {\n id\n game\n shortName\n\n stat {\n id\n teacherRatingAvg\n teacherRatingCount\n teacherRatingScoreSummary\n studentRatingAvg\n studentRatingCount\n studentRatingScoreSummary\n }\n\n teacherReviews(page: $page, pageSize: $pageSize) {\n pageNumber\n pageSize\n totalEntries\n totalPages\n\n entries {\n id\n score\n review\n createdAt\n contentIntegration\n easeOfPlay\n suggestedUse\n teacherName\n\n upvotesCount\n userHasUpvoted\n }\n }\n }\n }\n");(0,n.UG)("\n mutation UpsertGameReview(\n $gameId: ID!\n $score: Int!\n $contentIntegration: Int\n $easeOfPlay: Int\n $suggestedUse: String\n $suggestions: String\n $review: String\n ) {\n upsertGameReview(\n gameId: $gameId\n score: $score\n contentIntegration: $contentIntegration\n easeOfPlay: $easeOfPlay\n suggestedUse: $suggestedUse\n suggestions: $suggestions\n review: $review\n ) {\n id\n }\n }\n");let r=(0,n.UG)("\n mutation UpsertGameReviewV2(\n $gameId: ID!\n $score: Int!\n $review: String\n $checkEngagement: Boolean\n $checkAlignment: Boolean\n $checkFriendlyness: Boolean\n $checkIssuesFree: Boolean\n $ratingEffectiveness: Int\n $ratingEngagement: Int\n $ratingInstructionClarity: Int\n $ratingStability: Int\n $source: String\n ) {\n upsertGameReview(\n gameId: $gameId\n score: $score\n review: $review\n checkEngagement: $checkEngagement\n checkAlignment: $checkAlignment\n checkFriendlyness: $checkFriendlyness\n checkIssuesFree: $checkIssuesFree\n ratingEffectiveness: $ratingEffectiveness\n ratingEngagement: $ratingEngagement\n ratingInstructionClarity: $ratingInstructionClarity\n ratingStability: $ratingStability\n source: $source\n ) {\n id\n }\n }\n"),l=(0,n.UG)("\n query Games(\n $search: String\n $page: Int\n $pageSize: Int\n $learningObjectiveIds: [ID]\n $gameType: String\n $contentType: String\n $ids: [ID]\n $supportsTts: Boolean\n $savesProgress: Boolean\n $supportsIpad: Boolean\n $multiLanguage: Boolean\n ) {\n games(\n page: $page\n pageSize: $pageSize\n search: $search\n learningObjectiveIds: $learningObjectiveIds\n gameType: $gameType\n contentType: $contentType\n ids: $ids\n supportsTts: $supportsTts\n savesProgress: $savesProgress\n supportsIpad: $supportsIpad\n multiLanguage: $multiLanguage\n ) {\n entries {\n id\n game\n image\n description\n estimatedDuration\n type\n contentType\n supportsIpad\n supportsTts\n videoPreviewUrl\n\n version {\n id\n url\n languageKey\n apiVersion\n gameType\n }\n\n audience {\n k\n g1\n g2\n g3\n g4\n g5\n g6\n g7\n g8\n g9\n g10\n g11\n g12\n }\n banner\n stat {\n id\n teacherRatingAvg\n teacherRatingCount\n studentRatingAvg\n studentRatingCount\n compositeRatingAvg\n }\n }\n pageNumber\n pageSize\n totalPages\n totalEntries\n }\n }\n"),o=(0,n.UG)("\n query GamesEligibleForReview {\n gamesEligibleForReview {\n id\n game\n image\n }\n }\n"),d=(0,n.UG)("\n query GetLearningObjectivesByID(\n $ids: [ID]!\n $currentTeacherStandard: Boolean\n ) {\n learningObjectives(\n ids: $ids\n currentTeacherStandard: $currentTeacherStandard\n ) {\n entr
1ies {\n id\n description\n gameCount\n imageUrl\n imageKey\n cropDirection\n name\n ngssDciName\n standardCode\n games {\n entries {\n id\n stat {\n teacherRatingAvg\n }\n }\n }\n subject {\n id\n subject\n subjectArea\n gradeLevel\n name\n }\n }\n }\n }\n");(0,n.UG)("\n query ListVideos($ids: [ID]) {\n videos(ids: $ids) {\n totalEntries\n pageNumber\n pageSize\n totalPages\n entries {\n id\n url\n title\n thumbnailUrl\n endsAt\n startsAt\n duration\n type\n }\n }\n }\n")},38806:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});let n={src:"/_next/static/media/rate.3ba6602e.svg",height:33,width:33,blurWidth:0,blurHeight:0}},49113:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>ex});var n=s(6029),a=s(20148),i=s(26751),r=s(81278),l=s(55729),o=s(16928),d=s(37987),c=s(82959),m=s(67262);let u={src:"/_next/static/media/create.1fc30063.svg",height:80,width:80,blurWidth:0,blurHeight:0},h={src:"/_next/static/media/explore.0e54e729.svg",height:132,width:280,blurWidth:0,blurHeight:0},g={src:"/_next/static/media/manage.0b1f8978.svg",height:121,width:257,blurWidth:0,blurHeight:0};var x=s(8588),v=s.n(x),p=s(82203),f=s.n(p);function b(e){let{svg:t,title:s,link:a,onClick:i,loading:r}=e;return(0,n.jsx)(n.Fragment,{children:i?(0,n.jsxs)("button",{onClick:i,className:"flex flex-col border border-light-grey-2 bg-white rounded-2xl shadow-sm text-center items-center justify-center w-[17.1875rem] h-[17.1875rem] relative",disabled:r,children:[r&&(0,n.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-white bg-opacity-90 rounded-2xl z-10",children:(0,n.jsx)(o.A,{size:60,color:"#123abc"})}),(0,n.jsx)("div",{className:"w-full h-[7.5rem] my-2 flex items-center justify-center relative transition-opacity duration-300 ".concat(r?"opacity-30":"opacity-100"),children:(0,n.jsx)(v(),{src:t,alt:s,fill:!0,className:"object-fit"})}),(0,n.jsx)("div",{className:"text-lg text-center px-8 font-semibold mb-2 transition-opacity duration-300 ".concat(r?"opacity-0":"opacity-100"),children:s})]}):(0,n.jsxs)(f(),{href:a||"",className:"flex flex-col border border-light-grey-2 bg-white rounded-2xl shadow-sm text-center items-center justify-center w-[17.1875rem] h-[17.1875rem]",children:[(0,n.jsx)("div",{className:"w-full h-[7.5rem] my-2 flex items-center justify-center relative",children:(0,n.jsx)(v(),{src:t,alt:s,fill:!0,className:"object-fit"})}),(0,n.jsx)("div",{className:"text-lg text-center px-8 font-semibold mb-2",children:s})]})})}var w=s(4575);let y={src:"/_next/static/media/no-image.2975e420.svg",height:176,width:273,blurWidth:0,blurHeight:0},j={LIVE:"dashboard.assignmentCard.status.live",SCHEDULED:"dashboard.assignmentCard.status.scheduled",DRAFT:"dashboard.assignmentCard.status.draft"};function N(e){var t;let{t:s}=(0,i.Bd)("teachers"),{id:a,title:l,status:o,startTime:d,endTime:m,imageUrl:u,isDistrictAssignment:h}=e,g=d?w.c9.fromISO(d).toLocaleString({month:"short",day:"numeric"}):null,x=m?w.c9.fromISO(m).toLocaleString({month:"short",day:"numeric",year:"numeric"}):null,p=g&&x?"".concat(g," - ").concat(x):null,b=(0,r.useRouter)(),N="DRAFT"===o||"SCHEDULED"===o?(0,c.wA)("/my-assignments/edit",{returnTo:(0,c.Cq)(b),assignmentId:a}):(0,c._c)("/my-assignments/".concat(a),{returnTo:(0,c.Cq)(b)}),A=l.length>42?l.slice(0,l.lastIndexOf(" ",42))+"...":l,R={"dashboard.assignmentCard.status.live":s("dashboard.assignmentCard.status.live","LIVE"),"dashboard.assignmentCard.status.scheduled":s("dashboard.assignmentCard.status.scheduled","SCHEDULED"),"dashboard.assignmentCard.status.draft":s("dashboard.assignmentCard.status.draft","DRAFT")},C=o?j[o]:void 0,k=null!=(t=C?R[C]:o)?t:"";return(0,n.jsxs)("div",{className:"bg-white rounded-2xl shadow-sm border border-light-grey-2 overflow-hidden text-left flex flex-col w-[17.1875rem] min-w-[17.1875rem] h-[17.1875rem]",children:[(0,n.jsxs)("div",{className:"min-h-[10.625rem] w-full bg-[#F3F7FE] mb-4 flex relative",children:[(0,n.jsx)(f(),{href:N,children:(0,n.jsx)(v(),{src:u||y,alt:l,fill:!0,sizes:"auto",className:"object-cover"})}),h?(0,n.jsx)("div",{className:"bg-primary absolute top-2 left-2 main-xs !font-medium uppercase text-white p-1 px-3 rounded-full",children:s("dashboard.assignmentCard.district","District")}):null,(0,n.jsxs)("div",{className:"absolute flex top-2 right-3 gap-3",children:[h?null:(0,n.jsx)(f(),{href:(0,c.wA)("/my-assignments/edit",{returnTo:(0,c.Cq)(b),assignmentId:a}),children:(0,n.jsx)("i",{className:"fas fa-pencil text-sm text-white cursor-pointer"})}),"DRAFT"!==o&&(0,n.jsx)(f(),{href:"/my-assignments/".concat(a,"?tab=question-results"),children:(0,n.jsx)("i",{className:"fas fa-chart-simple text-sm text-white cursor-pointer"})})]})]}),(0,n.jsx)("div",{className:"main-lg-bold mb-2 px-4",children:(0,n.jsx)(f(),{href:N,children:s("dashboard.assignmentCard.titleWithStatus","{title} - {status}",{title:A,status:k})})}),p&&(0,n.jsx)("div",{className:"main-sm text-medium-grey px-4",children:p})]})}var A=s(23410);function R(e){let{t}=(0,i.Bd)("teachers"),{gameName:s,image:a,onClick:r}=e;return(0,n.jsx)("div",{className:"bg-white rounded-2xl shadow-sm border border-light-grey-2 overflow-hidden text-left flex flex-col w-[17.1875rem] min-w-[17.1875rem] h-[17.1875rem] cursor-pointer group",onClick:r,children:(0,n.jsxs)("div",{className:"w-full h-full bg-[#F3F7FE] flex relative",children:[(0,n.jsx)(v(),{src:a?"https://releases-cdn.legendsoflearning.com/legends/image/upload/c_fill,h_400,w_400/".concat(a):y,alt:s,fill:!0,sizes:"auto",className:"object-cover"}),(0,n.jsx)("div",{className:"absolute inset-0 bg-secondary/90 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:(0,n.jsx)("span",{className:"text-white main-lg-bold",children:t("dashboard.gamesReview.card.reviewOverlay","Review")})})]})})}var C=s(7234),k=s(62563),S=s(38806),I=s(64144),T=s(32609),E=s(97204),D=s(78048),$=s(62746),F=s(12618);let P={src:"/_next/static/media/popsprout.66f1766c.png",height:148,width:146,blurDataURL:"data:image/png;
1base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAbFBMVEVMaXGYZyQ7TxJF6ycxpivFyZeroGwk1DBE/SQz7yJR7jhYhSHt7cDOg4nTuY/eeGb//8/X1Z7//5XXxT2yn2i9qmybfkURcA+IbD00sgsuhR4A6BaQiTsXZRV5ayHS1KHv66zt4oCZcj3Ij0TZztMLAAAAHnRSTlMA/pibUB78ETcIrS45Wczk2+lolnX6+Wb4wuEXn4B3O50bAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAQUlEQVR4nBXFRRaAIABAwQ+SFnaLdf87+pjNANg8cySFwqerUJdp3dxXq4HuGY0ZwPbfMr3HjlujEHFT4GcpT8sPTeoCxvK4GLkAAAAASUVORK5CYII=",blurWidth:8,blurHeight:8};function U(e){var t,s,r,d;let{t:c}=(0,i.Bd)("teachers"),m=(0,l.useMemo)(()=>"progressGradient-".concat(Math.random().toString(36).substr(2,9)),[]),{data:u,loading:h}=(0,a.I)(I.yR);if(h)return(0,n.jsx)("div",{className:"bg-white overflow-visible text-left flex flex-col w-[17.1875rem] min-w-[17.1875rem]",children:(0,n.jsx)("div",{className:"flex items-center m-auto",children:(0,n.jsx)(o.A,{size:35,color:"#123abc"})})});let g=null==u?void 0:u.teacherReviewPointsProgress,x=null!=(s=null!=(t=null==e?void 0:e.pointsEarned)?t:null==g?void 0:g.pointsEarned)?s:0,p=null!=(d=null!=(r=null==e?void 0:e.pointsRequired)?r:null==g?void 0:g.pointsRequired)?d:20,f=Math.min(x/p*100,100),b=2*Math.PI*60;return(0,n.jsxs)("div",{className:"bg-white overflow-visible text-left flex flex-col w-[17.1875rem] min-w-[17.1875rem]",children:[(0,n.jsx)("div",{className:"main-lg-bold text-center text-white bg-primary-900 py-4",children:c("dashboard.gamesReview.progress.title","Review Activities")}),(0,n.jsx)("div",{className:"flex flex-col items-center flex-1 justify-center mt-12",children:(0,n.jsxs)("div",{className:"relative mb-4",style:{width:"128px",height:"128px"},children:[(0,n.jsx)("div",{className:"absolute z-10",style:{width:"73px",height:"74px",to
1p:"-32px",left:"-24px"},children:(0,n.jsx)(v(),{src:P,alt:c("dashboard.gamesReview.popsproutAlt","Popsprout"),fill:!0,className:"object-contain"})}),(0,n.jsxs)("svg",{className:"w-full h-full",viewBox:"0 0 140 140",xmlns:"http://www.w3.org/2000/svg",style:{transform:"rotate(-90deg)"},children:[(0,n.jsx)("circle",{cx:"70",cy:"70",r:"60",fill:"none",stroke:"#f3f3f3",strokeWidth:"14"}),(0,n.jsx)("defs",{children:(0,n.jsxs)("linearGradient",{id:m,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[(0,n.jsx)("stop",{offset:"0%",stopColor:"#4178E5"}),(0,n.jsx)("stop",{offset:"100%",stopColor:"#865DEE"})]})}),(0,n.jsx)("circle",{cx:"70",cy:"70",r:"60",fill:"none",stroke:"url(#".concat(m,")"),strokeWidth:"14",strokeDasharray:"".concat(b,"px"),strokeDashoffset:"".concat((100-f)/100*b,"px"),strokeLinecap:"round"})]}),(0,n.jsx)("div",{className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-center",children:(0,n.jsxs)("span",{className:"h4 text-universal-800",children:[Math.round(f),"%"]})})]})}),(0,n.jsxs)("div",{className:"flex items-center gap-2 mb-4 px-4",children:[(0,n.jsx)("div",{className:"bg-[#457DD1] text-white rounded-full w-7 h-7 min-w-7 min-h-7 flex items-center justify-center mb-auto main-sm",children:"1"}),(0,n.jsx)("div",{className:"flex flex-col",children:(0,n.jsx)("p",{className:"text-[#707070] main-sm",children:c("dashboard.gamesReview.howto.step1","Students play activities: After they play, you can review them.")})})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2 mb-4 px-4",children:[(0,n.jsx)("div",{className:"bg-[#457DD1] text-white rounded-full w-7 h-7 min-w-7 min-h-7 flex items-center justify-center mb-auto main-sm",children:"2"}),(0,n.jsx)("div",{className:"flex flex-col",children:(0,n.jsx)("p",{className:"text-[#707070] main-sm",children:c("dashboard.gamesReview.howto.step2","Each review gets you 1 point. {pointsRequired} points unlocks the reward!",{pointsRequired:p})})})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2 mb-4 px-4",children:[(0,n.jsx)("div",{className:"bg-[#457DD1] text-white rounded-full w-7 h-7 min-w-7 min-h-7 flex items-center justify-center mb-auto main-sm",children:"3"}),(0,n.jsx)("div",{className:"flex flex-col",children:(0,n.jsx)("p",{className:"text-[#707070] main-sm",children:(0,n.jsx)(i.x6,{t:c,i18nKey:"dashboard.gamesReview.howto.step3",defaults:"<0>Earn a reward:</0> Get {maxSubscriptions} one-month Awakening subscriptions to give to your students!",values:{maxSubscriptions:30},components:[(0,n.jsx)("b",{},"0")]})})})]})]})}function B(e){let{content:t,children:s}=e;return(0,n.jsx)(k.Ay,{trigger:"click",theme:"white-tip",placement:"right",animation:"scale-subtle",content:t,children:(0,n.jsx)("span",{className:"main-bold text-[#8959ED] hover:underline cursor-pointer",children:s})})}function M(e){var t,s,r,o;let{gameId:d,gameName:c,gameImage:m,open:u,onClose:h,onSuccess:g}=e,{t:x}=(0,i.Bd)("teachers"),[p,f]=(0,l.useState)(null),[b,w]=(0,l.useState)(null),[y,j]=(0,l.useState)(null),[N,R]=(0,l.useState)(null),[k,P]=(0,l.useState)(null),[M,L]=(0,l.useState)(""),[O,G]=(0,l.useState)(null),[z,_]=(0,l.useState)(!1),[q]=(0,C.n)(A.tl,{refetchQueries:[I.yR],awaitRefetchQueries:!0}),H=(0,l.useRef)(()=>{}),W=(0,l.useRef)(()=>{}),{data:Q}=(0,a.I)(I.yR),K=(0,l.useCallback)((e,t)=>{q({variables:{gameId:e,score:t,source:"dashboard"}})},[q]);(0,l.useEffect)(()=>{u&&(f(null),w(null),j(null),R(null),P(null),L(""),G(null),_(!1))},[u,d]);let V=(0,l.useCallback)(()=>{f(null),w(null),j(null),R(null),P(null),L(""),G(null),_(!1),h()},[h]),X=(0,l.useCallback)(()=>null!==p&&null!==b&&null!==y&&null!==N&&null!==k&&M.trim().length>0,[p,b,y,N,k,M]),Y=(0,l.useCallback)(()=>p?null!==b&&null!==y&&null!==N&&null!==k&&M.trim().length>0?2:1:0,[p,b,y,N,k,M]),Z=(0,l.useCallback)(async()=>{if(X()&&!z){_(!0);try{await q({variables:{gameId:d,score:p||1,review:M,ratingEffectiveness:b,ratingEngagement:y,ratingInstructionClarity:N,ratingStability:k,source:"dashboard"}});let e=Y();G(e),setTimeout(()=>{g&&g(e),V()},2e3)}catch(e){console.error("Error submitting review:",e),_(!1)}}},[X,z,q,d,p,M,b,y,N,k,Y,g,V]),J=m?"https://releases-cdn.legendsoflearning.com/legends/image/upload/c_fill,h_400,w_400/".concat(m):null,ee=(0,l.useMemo)(()=>[x("dashboard.gamesReview.reviewModal.ratingLabels.notEffective","Not Effective"),"","","",x("dashboard.gamesReview.reviewModal.ratingLabels.veryEffective","Very Effective")],[x]),et=(0,n.jsx)("div",{className:"overflow-hidden flex-col w-[17.1875rem] min-w-[17.1875rem] rounded-lg shadow-lg",children:(0,n.jsx)(U,{pointsEarned:null!=(r=null==Q||null==(t=Q.teacherReviewPointsProgress)?void 0:t.pointsEarned)?r:0,pointsRequired:null!=(o=null==Q||null==(s=Q.teacherReviewPointsProgress)?void 0:s.pointsRequired)?o:20})}),es=p?null!==O?"31.25rem":"75rem":"31.25rem";return(0,n.jsx)(E.A,{open:u,height:es,width:"41.875rem",openFnRef:H,closeFnRef:W,children:(0,n.jsx)(D.A,{contentClassName:"overflow-y-auto",svgIcon:S.A,title:x("dashboard.gamesReview.reviewModal.title","Rate this Game"),onClose:V,onConfirm:Z,confirmText:x("dashboard.gamesReview.reviewModal.submit","Submit Review"),cancelText:x("dashboard.gamesReview.reviewModal.cancel","Cancel"),confirmDisabled:!X()||z,showConfirm:null!==p,content:(0,n.jsx)("div",{className:"flex w-full flex-col px-8",children:null!==O?(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center py-8",children:[(0,n.jsx)("div",{className:"text-4xl mb-4",children:"\uD83C\uDF89"}),(0,n.jsx)("span",{className:"main-lg-bold text-universal mb-2",children:x("dashboard.gamesReview.reviewModal.submitted","Review Submitted!")}),(0,n.jsx)("span",{className:"main-md text-dark-grey text-center",children:(0,n.jsx)(i.x6,{t:x,i18nKey:"dashboard.gamesReview.reviewModal.pointsEarned",defaults:"You earned <0>{pointsEarned, plural, one {# point} other {# points}}</0> for this review!",values:{pointsEarned:O},components:[(0,n.jsx)("strong",{},"0")]})})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex pt-8 border-b border-light-grey-2",children:[J&&(0,n.jsx)("div",{className:"overflow-hidden rounded-md mb-2 bg-universal",children:(0,n.jsx)(v(),{alt:c,src:J,width:64,height:64})}),(0,n.jsx)("span",{className:"main-bold text-universal ml-4 my-auto",children:c})]}),(0,n.jsx)("span",{className:"main-lg-bold text-universal mt-8",children:x("dashboard.gamesReview.reviewModal.rateThis","Rate This")}),(0,n.jsx)($.A,{className:"mt-4 pb-8 border-b border-light-grey-2",rating:p,onChange:e=>{f(e),K(d,e)}}),p?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex flex-col mt-8 mb-4 main-md",children:[(0,n.jsx)("p",{children:(0,n.jsx)(i.x6,{t:x,i18nKey:"dashboard.gamesReview.reviewModal.awardedOnePoint",defaults:"You have been awarded <0>1 point</0> for this review!",components:[(0,n.jsx)("strong",{},"0")]})}),(0,n.jsx)("p",{children:(0,n.jsx)(i.x6,{t:x,i18nKey:"dashboard.gamesReview.reviewModal.doublePoints",defaults:"<0>Double points?</0>\xa0Write a quick review!",components:[(0,n.jsx)(B,{content:et},"0")]})})]}),(0,n.jsx)("span",{className:"main-lg-bold my-8",children:x("dashboard.gamesReview.reviewModal.quickQuestions","Couple of Quick Questions")}),(0,n.jsx)("span",{className:"main-md text-dark-grey",children:x("dashboard.gamesReview.reviewModal.questions.effectiveness","How effective was the game in helping your students review educational concepts?")}),(0,n.jsx)("div",{className:"mr-auto my-4",children:(0,n.jsx)(T.A,{value:b,onChange:w,labels:ee})}),(0,n.jsx)("span",{className:"main-md text-dark-grey",children:x("dashboard.gamesReview.reviewModal.questions.engagement","Were the students engaged while playing (did they have fun)?")}),(0,n.jsx)("div",{className:"mr-auto my-4",children:(0,n.jsx)(T.A,{value:y,onChange:j,labels:ee})}),(0,n.jsx)("span",{className:"main-md text-dark-grey",children:x("dashboard.gamesReview.reviewModal.questions.instructionClarity","Did your students understand the game instructions and play without getting stuck?")}),(0,n.jsx)("div",{className:"mr-auto my-4",children:(0,n.jsx)(T.A,{value:N,onChange:R,labels:ee})}),(0,n.jsx)("span",{className:"main-md text-dark-grey",children:x("dashboard.gamesReview.reviewModal.questions.stability","Did technical issues (load failure or mid-game crash) prevent your students from playing or completing the game?")}),(0,n.jsx)("div",{className:"mr-auto my-4",children:(0,n.jsx)(T.A,{value:k,onChange:P,labels:ee})}),(0,n.jsx)("span",{className:"main-lg-bold mb-8 pt-8 border-t border-light-grey-2",children:x("dashboard.gamesReview.reviewModal.thoughts","Thoughts?")}),(0,n.jsx)(F.A,{placeholder:x("dashboard.gamesReview.reviewModal.thoughtsPlaceholder","Let us know any additional thoughts you have here..."),value:M,onChange:e=>L(e.target.value)})]}):null]})})})})}var L=s(74998);let O={src:"/_next/static/media/gift-icon.5e24e0c2.svg",height:40,width:40,blurWidth:0,blurHeight:0},G={src:"/_next/static/media/rewards-popsprout.e95cb614.svg",height:52,width:52,blurWidth:0,blurHeight:0};var z=s(19408),_=s(70316),q=s(76264),H=s(16901);let W={src:"/_next/static/media/checkbox-grey.e6fc0d0b.svg",height:20,width:20,blurWidth:0,blurHeight:0},Q={src:"/_next/static/media/checkbox-selected.c1f67b64.svg",height:20,width:20,blurWidth:0,blurHeight:0};var K=s(7929),V=s(5700),X=s(79608),Y=s(82517),Z=s(90558);function J(e){let{students:t,selectedStudentIds:s,searchQuery:a,onSelectionChange:r}=e,{t:o}=(0,i.Bd)("teachers"),d=(0,l.useMemo)(()=>
1{if(!a.trim())return t;let e=a.toLowerCase().trim();return t.filter(t=>{var s,n,a,i,r;let l=(null==(s=t.firstName)?void 0:s.toLowerCase())||"",o=(null==(a=t.user)||null==(n=a.lastName)?void 0:n.toLowerCase())||"",d=(null==(r=t.user)||null==(i=r.username)?void 0:i.toLowerCase())||"",c="".concat(l," ").concat(o).trim();return l.includes(e)||o.includes(e)||d.includes(e)||c.includes(e)})},[t,a]),c=(0,l.useMemo)(()=>d.filter(e=>!e.hasActiveSubscription),[d]),m=()=>{if(0===c.length)return!1;let e=c.filter(e=>s.includes(e.id||"")).length;return 0!==e&&(30===e||e===c.length||"indeterminate")},u=e=>{if(s.includes(e))r(s.filter(t=>t!==e));else{if(s.length>=30)return;r([...s,e])}};return 0===d.length?(0,n.jsx)("div",{className:"flex items-center justify-center py-8 text-dark-grey",children:a.trim()?o("dashboard.gamesReview.students.emptySearch","No students found matching your search."):o("dashboard.gamesReview.students.empty","No students available.")}):(0,n.jsx)("div",{className:"flex flex-col h-full",children:(0,n.jsxs)(Y.A,{className:"border-0 border-transparent px-4 py-0 max-h-[30rem]",cols:["1fr","auto"],children:[(0,n.jsx)(X.A,{className:"bg-transparent",children:(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)(K.A,{checked:!1!==m(),halfCheckedState:"indeterminate"===m(),onChange:e=>{if(e){let e=new Set(s),t=30-e.size;if(t<=0)return;let n=c.slice(0,t);r([...Array.from(e),...n.map(e=>e.id||"")])}else r([])}}),(0,n.jsx)("span",{children:o("dashboard.gamesReview.students.nameColumn","Student's Name")})]})}),(0,n.jsx)(X.A,{className:"bg-transparent",children:""}),d.map((e,t)=>{var a,i,r;let d=s.includes(e.id||""),c=e.hasActiveSubscription||!d&&s.length>=30,m="".concat(t%2==0?"bg-white":"bg-[#FAFBFC]"," py-4 px-4 border-t border-light-grey-2");return(0,n.jsxs)(l.Fragment,{children:[(0,n.jsx)(V.A,{className:(0,q.QP)(m,"main-md-bold text-universal",c?"opacity-50":"cursor-pointer"),onClick:()=>{c||u(e.id||"")},children:e.username||(e.firstName&&(null==(a=e.user)?void 0:a.lastName)?"".concat(e.firstName," ").concat(null==(i=e.user)?void 0:i.lastName):e.firstName||(null==(r=e.user)?void 0:r.lastName)||o("dashboard.gamesReview.students.unknown","Unknown"))}),(0,n.jsx)(V.A,{className:m,children:(0,n.jsx)("div",{className:"w-5 h-5 cursor-pointer m-auto",onClick:()=>{c||u(e.id||"")},children:e.hasActiveSubscription?(0,n.jsx)(Z.A,{title:o("dashboard.gamesReview.students.hasSubscriptionTooltip","This student already has an active Awakening subscription."),children:(0,n.jsx)(v(),{src:H.A,alt:o("dashboard.gamesReview.students.premiumBadgeAlt","Premium Badge"),width:20,height:20})}):d?(0,n.jsx)(v(),{src:Q,alt:o("dashboard.gamesReview.students.selectedAlt","Checkbox Selected"),width:20,height:20}):(0,n.jsx)(v(),{src:W,alt:o("dashboard.gamesReview.students.unselectedAlt","Checkbox Grey"),width:20,height:20})})})]},e.id)})]})})}function ee(e){let{open:t,onClose:s,onSuccess:r}=e,{t:o}=(0,i.Bd)("teachers"),[d,c]=(0,l.useState)([]),[m,u]=(0,l.useState)(""),[h,g]=(0,l.useState)(!1),[x,p]=(0,l.useState)(!1),{data:f,loading:b}=(0,a.I)(I.k$,{variables:{search:m},skip:!t,fetchPolicy:"network-only"}),[w,{loading:y}]=(0,C.n)(I.Kq,{refetchQueries:[I.yR],awaitRefetchQueries:!0}),j=(null==f?void 0:f.studentsForRedemption)||[];(0,l.useEffect)(()=>{t&&(c([]),u(""),g(!1),p(!1))},[t]);let N=(0,l.useCallback)(async()=>{if(0!==d.length&&!y)try{await w({variables:{studentIds:d}}),p(!0),setTimeout(()=>{r&&r(),s()},2e3)}catch(e){console.error("Error redeeming reward:",e)}},[d,y,w,r,s]),A=(0,l.useCallback)(()=>{g(!0)},[]),R=(0,l.useCallback)(()=>{g(!1),N()},[N]),k=(0,l.useCallback)(()=>{g(!1)},[]),S=(0,l.useCallback)(()=>{if(h)return void g(!1);s()},[h,s]),T=30-(d.length||0),$=o("dashboard.gamesReview.redemption.confirm.proceed","Proceed");return h?(0,n.jsx)(E.A,{open:t,height:"30rem",width:"45rem",onClose:k,children:(0,n.jsx)(D.A,{svgIcon:z.A,title:o("dashboard.gamesReview.redemption.confirm.title","Finish assigning subscriptions?"),onClose:k,onConfirm:R,confirmText:$,cancelText:o("dashboard.gamesReview.redemption.confirm.cancel","Cancel"),confirmType:"close",content:(0,n.jsxs)("div",{className:"p-12 pt-4 mb-4",children:[(0,n.jsx)("p",{className:"text-center main text-dark-grey mb-8",children:(0,n.jsx)(i.x6,{t:o,i18nKey:"dashboard.gamesReview.redemption.confirm.remaining",defaults:"You have <0>{remainingSlots}</0> {remainingSlots, plural, one {subscription} other {subscriptions}} left. Once you click {proceedLabel}, you won''t be able to assign the remaining ones later.",values:{remainingSlots:T,proceedLabel:$},components:[(0,n.jsx)("b",{},"0")]})}),(0,n.jsx)("p",{className:"text-center main text-dark-grey mb-8",children:o("dashboard.gamesReview.redemption.confirm.recommend","We recommend using all {maxSubscriptions} at once, unused subscriptions can''t be recovered.",{maxSubscriptions:30})}),(0,n.jsx)("p",{className:"text-center main-xl text-universal",children:o("dashboard.gamesReview.redemption.confirm.question","Do you wish to proceed?")})]})})}):x?(0,n.jsx)(E.A,{open:t,height:"25rem",width:"41.875rem",onClose:S,children:(0,n.jsx)(D.A,{onConfirm:()=>{S()},contentClassName:"overflow-y-auto",title:o("dashboard.gamesReview.redemption.success.title","Subscriptions Assigned!"),onClose:S,showCancel:!1,showConfirm:!1,content:(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 px-8",children:[(0,n.jsx)("div",{className:"text-4xl mb-4",children:"\uD83C\uDF89"}),(0,n.jsx)("span",{className:"main-lg-bold text-universal mb-2",children:o("dashboard.gamesReview.redemption.success.heading","Success!")}),(0,n.jsx)("span",{className:"main-md text-dark-grey text-center",children:(0,n.jsx)(i.x6,{t:o,i18nKey:"dashboard.gamesReview.redemption.success.body",defaults:"You have successfully assigned <0>{studentCount}</0> Awakening {studentCount, plural, one {subscription} other {subscriptions}} to your students!",values:{studentCount:d.length},components:[(0,n.jsx)("strong",{},"0")]})})]})})}):(0,n.jsx)(E.A,{open:t,height:"60rem",width:"50rem",onClose:S,children:(0,n.jsx)(D.A,{svgIcon:O,contentClassName:"overflow-hidden flex flex-col",title:o("dashboard.gamesReview.redemption.title","Reward your Students"),onClose:S,onConfirm:A,confirmText:o("dashboard.gamesReview.redemption.sendGifts","Send Gifts"),cancelText:o("dashboard.gamesReview.redemption.cancel","Cancel"),confirmDisabled:0===d.length||y,content:(0,n.jsxs)("div",{className:"flex flex-col flex-1 overflow-hidden px-8 w-[42rem] mx-auto",children:[(0,n.jsx)("div",{className:"relative h-[120px] w-full",children:(0,n.jsxs)("span",{className:"text-2xl text-universal font-semibold block my-6",children:[(0,n.jsx)(i.x6,{t:o,i18nKey:"dashboard.gamesReview.redemption.counter",defaults:"You have <0>{remainingSlots}</0> Awakening subscriptions to award your students",values:{remainingSlots:T},components:[(0,n.jsx)("span",{className:"text-4xl"},"0")]})," ",(0,n.jsx)("div",{className:"mx-2 inline-block",children:(0,n.jsx)(v(),{width:40,height:40,className:"object-center",src:G,alt:o("dashboard.gamesReview.redemption.rewardsImageAlt","Rewards")})})]})}),(0,n.jsxs)("div",{className:"flex mb-4 justify-between px-4",children:[(0,n.jsx)("div",{className:"header-lg uppercase mb-2 my-auto",children:o("dashboard.gamesReview.redemption.studentsList","Students List")}),(0,n.jsx)(_.A,{className:"w-[16rem]",placeholder:o("dashboard.gamesReview.redemption.searchPlaceholder","Search by student name..."),value:m,onChange:e=>u(e.target.value)})]}),(0,n.jsx)("div",{className:"flex-1 overflow-hidden",children:b?(0,n.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,n.jsx)("i",{className:"fas fa-spinner fa-pulse text-universal-900"})}):(0,n.jsx)(J,{students:j.filter(e=>null!==e),selectedStudentIds:d,searchQuery:m,onSelectionChange:c})})]})})})}let et=(0,l.forwardRef)((e,t)=>{var s,r,d,c,m;let{t:u}=(0,i.Bd)("teachers"),[h,g]=(0,l.useState)(!1),x=(0,l.useMemo)(()=>"progressGradient-".concat(Math.random().toString(36).substr(2,9)),[]),p=e&&(void 0!==e.pointsEarned||void 0!==e.loading),{data:f,loading:b,refetch:w}=(0,a.I)(I.yR,{skip:p}),y=null!=(s=null==e?void 0:e.loading)?s:b;if((0,l.useImperativeHandle)(t,()=>({refetch:()=>{w&&w()}})),y)return(0,n.jsx)("div",{className:"bg-white overflow-visible text-left flex flex-col relative w-[17.1875rem] min-w-[17.1875rem] h-[17.1875rem] rounded-2xl",style:{border:"1px solid #EAEAEA",boxShadow:"0px 1px 1px rgba(0, 0, 0, 0.22)"},children:(0,n.jsx)("div",{className:"flex items-center m-auto",children:(0,n.jsx)(o.A,{size:35,color:"#123abc"})})});let j=null==f?void 0:f.teacherReviewPointsProgress,N=null!=(d=null!=(r=null==e?void 0:e.pointsEarned)?r:null==j?void 0:j.pointsEarned)?d:0,A=null!=(m=null!=(c=null==e?void 0:e.pointsRequired)?c:null==j?void 0:j.pointsRequired)?m:20,R=N>=A,C=Math.min(N/A*100,100),S=2*Math.PI*60;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"bg-white overflow-visible text-left flex flex-col relative w-[17.1875rem] min-w-[17.1875rem] h-[17.1875rem] rounded-2xl",style:{border:"1px solid #EAEAEA",boxShadow:"0px 1px 1px rgba(0, 0, 0, 0.22)"},children:[(0,n.jsx)("div",{className:"absolute z-10",style:{width:"73px",height:"74px",to
1p:"20px",left:"20px"},children:(0,n.jsx)(v(),{src:P,alt:u("dashboard.gamesReview.popsproutAlt","Popsprout"),fill:!0,className:"object-contain"})}),(0,n.jsxs)("div",{className:"flex flex-col items-center flex-1 justify-center mt-8",children:[(0,n.jsxs)("div",{className:"relative mb-4",style:{width:"128px",height:"128px"},children:[(0,n.jsxs)("svg",{className:"w-full h-full",viewBox:"0 0 140 140",xmlns:"http://www.w3.org/2000/svg",style:{transform:"rotate(-90deg)"},children:[(0,n.jsx)("circle",{cx:"70",cy:"70",r:"60",fill:"none",stroke:"#f3f3f3",strokeWidth:"14"}),(0,n.jsx)("defs",{children:(0,n.jsxs)("linearGradient",{id:x,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[(0,n.jsx)("stop",{offset:"0%",stopColor:"#4178E5"}),(0,n.jsx)("stop",{offset:"100%",stopColor:"#865DEE"})]})}),(0,n.jsx)("circle",{cx:"70",cy:"70",r:"60",fill:"none",stroke:"url(#".concat(x,")"),strokeWidth:"14",strokeDasharray:"".concat(S,"px"),strokeDashoffset:"".concat((100-C)/100*S,"px"),strokeLinecap:"round"})]}),(0,n.jsx)("div",{className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-center",children:(0,n.jsxs)("span",{className:"h4 text-universal-800",children:[Math.round(C),"%"]})})]}),R?null:(0,n.jsx)("div",{className:"main-lg-bold text-center mb-2 text-universal-900",children:u("dashboard.gamesReview.progress.title","Review Activities")}),R?(0,n.jsx)(L.A,{text:u("dashboard.gamesReview.progress.rewardButton","Time to reward your students"),link:"click",dataAnalyticsId:"review-progress-indicator-reward-button",className:"px-4 py-2 rounded-2xl text-xs min-h-12 h-12",onClick:()=>{g(!0)}}):(0,n.jsx)(k.Ay,{trigger:"click",theme:"white-tip",placement:"right",animation:"scale-subtle",content:(0,n.jsx)("div",{className:"overflow-hidden flex-col w-[17.1875rem] min-w-[17.1875rem] rounded-lg shadow-lg",children:(0,n.jsx)(U,{pointsEarned:N,pointsRequired:A})}),children:(0,n.jsx)("div",{className:"main-bold text-secondary hover:text-secondary-700 hover:underline cursor-pointer",children:u("dashboard.gamesReview.progress.howItWorks","How does it work?")})})]})]}),(0,n.jsx)(ee,{open:h,onClose:()=>g(!1),onSuccess:()=>{w&&w()}})]})});function es(){let{t:e}=(0,i.Bd)("teachers"),{data:t,loading:s,refetch:r}=(0,a.I)(A.bT),d=(0,l.useRef)(null),[c,m]=(0,l.useState)(null),[u,h]=(0,l.useState)(!1),g=(null==t?void 0:t.gamesEligibleForReview)||[],x=async e=>{var t;await r(),null==(t=d.current)||t.refetch()};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"p-4 pt-0",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold mb-2 flex",children:(0,n.jsx)("span",{className:"my-auto",children:e("dashboard.gamesReview.heading","Write Game Reviews (and earn Awakening Subscriptions for your class)!")})}),s?(0,n.jsx)("div",{className:"flex justify-center",children:(0,n.jsx)(o.A,{size:35,color:"#123abc"})}):(0,n.jsxs)("div",{className:"flex space-x-4 w-full overflow-x-scroll pb-4",children:[(0,n.jsx)(et,{ref:d}),0===g.length?(0,n.jsxs)("div",{className:"bg-white rounded-2xl border border-light-grey-2 w-[17.1875rem] min-w-[17.1875rem] h-[17.1875rem] flex flex-col items-center justify-center p-6 text-center",children:[(0,n.jsx)("p",{className:"main-bold text-universal-900 mb-2",children:e("dashboard.gamesReview.empty.title","No new games to review")}),(0,n.jsx)("p",{className:"main text-universal-700",children:e("dashboard.gamesReview.empty.body","Once 10 or more of your students play one of your assigned games, it'll show up here for you to review and earn points.")})]}):g.map(e=>(0,n.jsx)(R,{gameName:e.game,image:e.image,onClick:()=>(e=>{let t=g.find(t=>t.id===e);t&&t.id&&t.game&&(u?(h(!1),setTimeout(()=>{m({id:t.id||"",name:t.game||"",image:t.image||void 0}),setTimeout(()=>{h(!0)},0)},300)):(m({id:t.id||"",name:t.game||"",image:t.image||void 0}),setTimeout(()=>{h(!0)},0)))})(e.id)},e.id))]})]}),c&&(0,n.jsx)(M,{gameId:c.id,gameName:c.name,gameImage:c.image,open:u,onClose:()=>{h(!1),setTimeout(()=>{m(null)},300)},onSuccess:x},c.id)]})}et.displayName="ReviewProgressIndicator";var en=s(93923);let ea={src:"/_next/static/media/ellipse.81a164e0.svg",height:25,width:28,blurWidth:0,blurHeight:0};var ei=s(11062);let er={1:"tertiary",2:"primary",3:"secondary"};function el(e){let{title:t,icon:s,number:a,href:i="",onClick:r,completed:l}=e,o=er[a];return(0,n.jsx)(f(),{href:i,onClick:r,passHref:!0,className:"flex w-1/4 h-[6.25rem]",children:(0,n.jsxs)("div",{className:(0,q.QP)("flex w-full h-full rounded-lg p-4 relative overflow-hidden gap-4 bg-tertiary","bg-".concat(o)),children:[(0,n.jsx)("div",{className:"absolute -right-0 -bottom-2",children:(0,n.jsx)("i",{className:"fas fa-".concat(s," text-white opacity-10 text-[5rem]")})}),(0,n.jsxs)("div",{className:"w-10 min-w-[2.5rem] h-10 min-h-[2.5rem] flex relative",children:[(0,n.jsx)(v(),{src:ea,alt:"",width:40,height:40}),(0,n.jsx)("div",{className:(0,q.QP)("absolute left-[1rem] top-[0.5625rem] text-center text-sm font-bold text-primary","text-".concat(o)),children:l?(0,n.jsx)("i",{className:"fas fa-check -ml-1"}):a})]}),(0,n.jsx)("div",{className:"text-white text-lg font-semibold",children:t})]})})}function eo(e){let{onClose:t}=e;return(0,n.jsx)("div",{onClick:t,className:"fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center",children:(0,n.jsxs)("div",{className:"relative bg-white p-4 rounded-lg max-w-5xl w-full",children:[(0,n.jsx)("button",{onClick:t,className:"absolute -top-10 right-0 text-white hover:text-gray-300",children:(0,n.jsx)("i",{className:"fas fa-times text-xl"})}),(0,n.jsx)("iframe",{width:"100%",height:"642",className:"rounded",src:"https://www.youtube-nocookie.com/embed/zvKPQACw5gA?rel=0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})]})})}function ed(){let{t:e}=(0,i.Bd)("teachers"),[t,s]=(0,l.useState)(!1),[a,r]=(0,l.useState)(!1),{userData:o,refetchUserData:d}=(0,ei.L)(),[c]=(0,C.n)(I.E1),[m]=(0,C.n)(I.ik,{refetchQueries:["currentUserData"]}),[u]=(0,C.n)(I.Ep),{activationSteps:h}=(null==o?void 0:o.currentTeacher)||{};if(!h)return null;let g=[!!h.createdAssignmentWithMinigameAt,!!h.createdStudentAt,!!h.ux2CreateAssignmentVideoDismissedAt],x=g.reduce((e,t)=>
1e+ +!!t,0),v=async()=>{s(!1),await c(),await d()},p=async()=>{r(!0);try{await u()}catch(e){r(!1);return}Promise.resolve(d()).catch(()=>void 0)};return h.productTourDismissedAt||a?null:(0,n.jsxs)("div",{className:"mx-4 p-4 bg-white rounded shadow-md relative",children:[t&&(0,n.jsx)(eo,{onClose:v}),(0,n.jsxs)("div",{className:"flex space-x-4",children:[(0,n.jsxs)("div",{className:"w-1/4 text-center",children:[(0,n.jsx)("h2",{className:"h4 text-[#3C3C3C] mt-2 mb-4",children:e("dashboard.getStarted.heading","Letâs Get Started")}),(0,n.jsx)("div",{className:"mb-4 text-medium-gray header-lg",children:e("dashboard.getStarted.progress","{completed} OF 3 COMPLETE",{completed:x})}),(0,n.jsx)("div",{className:"w-full h-2 mt-auto rounded-sm overflow-hidden justify-start bg-[#F0F4F7]",children:(0,n.jsx)("div",{className:"h-full bg-primary rounded-sm",style:{width:100/3*x+"%"}})})]}),(0,n.jsx)(el,{title:e("dashboard.getStarted.steps.assignments","Create Assignments with Games"),completed:g[0],number:1,icon:"file-lines",onClick:()=>(0,en.Uz)(573874)}),(0,n.jsx)(el,{title:e("dashboard.getStarted.steps.students","Add Students or Groups"),completed:g[1],number:2,icon:"user",onClick:()=>{m().catch(()=>void 0),(0,en.Uz)(573636)}}),(0,n.jsx)(el,{title:e("dashboard.getStarted.steps.video","Watch our Video Tutorial"),completed:g[2],number:3,icon:"tv-retro",onClick:()=>s(!0)}),3===x?(0,n.jsx)("button",{type:"button","data-testid":"dismiss-get-started","aria-label":e("dashboard.getStarted.dismiss","Dismiss get started"),onClick:p,className:"absolute -right-3 -top-3 cursor-pointer bg-white border border-light-grey-2 w-8 h-8 rounded-full flex",children:(0,n.jsx)("i",{className:"fas fa-close m-auto"})}):null]})]})}var ec=s(33960),em=s(64476);let eu=()=>{let e=(0,r.useRouter)(),{t}=(0,i.Bd)("teachers"),[s,a]=(0,l.useState)(!1);return(0,n.jsxs)("div",{className:"flex space-x-4 p-4",children:[(0,n.jsx)(b,{svg:h,title:t("dashboard.activities.explore","Explore & Discover Content"),link:"/explore"}),(0,n.jsx)(b,{svg:u,title:t("dashboard.activities.create","Create Assignment"),onClick:async()=>{a(!0),e.push((0,c.wA)("/my-assignments/edit",{returnTo:(0,c.Cq)(e),assignmentId:"new"})),a(!1)}}),(0,n.jsx)(b,{svg:g,title:t("dashboard.activities.manage","Manage Your Assignments"),link:"/my-assignments"})]})};function eh(e){let{title:t,empty:s,live:a,assignments:i,loading:r}=e;return(null==i?void 0:i.length)?(0,n.jsxs)("div",{className:"p-4 pt-0",children:[(0,n.jsxs)("h2",{className:"text-lg font-semibold mb-2 flex",children:[a&&(0,n.jsx)("div",{className:"w-11 h-11 flex mr-4",children:(0,n.jsx)("div",{className:"live-pulse m-auto"})}),(0,n.jsx)("span",{className:"my-auto",children:t})]}),r?(0,n.jsx)("div",{className:"flex justify-center",children:(0,n.jsx)(o.A,{size:35,color:"#123abc"})}):0===i.length?(0,n.jsx)("div",{className:"text-center text-gray-500",children:s}):(0,n.jsx)("div",{className:"flex space-x-4 w-full overflow-x-scroll pb-4",children:i.map((e,t)=>(0,n.jsx)(N,{id:e.id,title:e.title,startTime:e.startTime,endTime:e.endTime,imageUrl:e.imageUrl,status:e.status,isDistrictAssignment:"DISTRICT"===e.ownedBy},t))})]}):null}let eg=()=>{var e,t,s,r,l,o,c;let{t:m}=(0,i.Bd)("teachers"),{data:u,loading:h}=(0,a.I)(d.SR,{variables:{statuses:["LIVE"],assignedBy:ec.zn5.Teacher,assignmentType:ec.oFk.Normal}}),{data:g,loading:x}=(0,a.I)(d.SR,{variables:{statuses:["LIVE"],assignedBy:ec.zn5.District,assignmentType:ec.oFk.Normal}}),{data:v,loading:p}=(0,a.I)(d.SR,{variables:{statuses:["SCHEDULED"],assignedBy:ec.zn5.Teacher,assignmentType:ec.oFk.Normal}}),{data:f,loading:b}=(0,a.I)(d.SR,{variables:{statuses:["SCHEDULED"],assignedBy:ec.zn5.District,assignmentType:ec.oFk.Normal}}),{data:w,loading:y}=(0,a.I)(d.SR,{variables:{statuses:["DRAFT"],assignedBy:ec.zn5.Teacher,assignmentType:ec.oFk.Normal}}),j=(e=[...(null==u||null==(t=u.myAssignments)?void 0:t.entries)||[],...(null==g||null==(s=g.myAssignments)?void 0:s.entries)||[]],e.map(e=>({id:(null==e?void 0:e.id)||"",title:(null==e?void 0:e.name)||"",startTime:(null==e?void 0:e.startDate)||void 0,endTime:(null==e?void 0:e.endDate)||void 0,imageUrl:(null==e?void 0:e.imageUrl)||void 0,status:(null==e?void 0:e.status)||void 0,ownedBy:(null==e?void 0:e.ownedBy)||void 0}))||[]),N=[...(null==v||null==(r=v.myAssignments)?void 0:r.entries)||[],...(null==f||null==(l=f.myAssignments)?void 0:l.entries)||[]].map(e=>({id:(null==e?void 0:e.id)||"",title:(null==e?void 0:e.name)||"",startTime:(null==e?void 0:e.startDate)||void 0,endTime:(null==e?void 0:e.endDate)||void 0,imageUrl:(null==e?void 0:e.imageUrl)||void 0,status:(null==e?void 0:e.status)||void 0,ownedBy:(null==e?void 0:e.ownedBy)||void 0}))||[],A=(null==w||null==(c=w.myAssignments)||null==(o=c.entries)?void 0:o.map(e=>({id:(null==e?void 0:e.id)||"",title:(null==e?void 0:e.name)||"",startTime:(null==e?void 0:e.startDate)||void 0,endTime:(null==e?void 0:e.endDate)||void 0,imageUrl:(null==e?void 0:e.imageUrl)||void 0,status:(null==e?void 0:e.status)||void 0,ownedBy:(null==e?void 0:e.ownedBy)||void 0})))||[],R=(0,em.u)("incentives_for_content_reviews_enabled");return(0,n.jsxs)("div",{children:[(0,n.jsx)(ed,{}),(0,n.jsx)("h1",{className:"p-4 text-xl font-semibold",children:m("dashboard.activities.heading","My Activities")}),(0,n.jsx)(eu,{}),(0,n.jsx)(eh,{title:m("dashboard.sections.live.title","Live Assignments"),empty:m("dashboard.sections.live.empty","There are no live assignments"),live:!0,assignments:j,loading:h||x}),(0,n.jsx)(eh,{title:m("dashboard.sections.upcoming.title","Upcoming Assignments"),empty:m("dashboard.sections.upcoming.empty","There are no upcoming assignments"),assignments:N,loading:p||b}),R?(0,n.jsx)(es,{}):null,(0,n.jsx)(eh,{title:m("dashboard.sections.drafts.title","Unfinished Drafts"),empty:m("dashboard.sections.drafts.empty","There are no unfinished drafts"),assignments:A,loading:y})]})};eg.getLayout=(e,t)=>(0,n.jsx)(m.O,{pageKey:"index",className:"overflow-x-hidden",HeaderProps:{},children:e});let ex=eg},79608:(e,t,s)=>{"use strict";s.d(t,{A:()=>i});var n=s(6029),a=s(76264);function i(e){let{className:t,canSort:s,sortDirection:i,onClick:r,children:l,colSpan:o=1}=e;return(0,n.jsxs)("div",{className:(0,a.QP)("w-full flex items-center text-[0.8125rem] leading-tight text-left uppercase px-4 py-3 bg-[#F6FAFC] font-semibold text-[hsl(var(--foreground))] tracking-wide",r&&"curs
1or-pointer",t),style:{gridColumn:o>1?"span ".concat(o):void 0},onClick:r,children:[l,s?(0,n.jsx)("i",{className:"fas fa-chevron-".concat("asc"==i?"up":"down"," ml-2")}):null]})}},82517:(e,t,s)=>{"use strict";s.d(t,{A:()=>i});var n=s(6029),a=s(76264);function i(e){let{cols:t,className:s,children:i,scrollable:r=!0}=e;return(0,n.jsx)("div",{className:(0,a.QP)(r?"w-full":"",r&&"overflow-x-auto"),children:(0,n.jsx)("div",{style:{gridTemplateColumns:t.join(" ")},className:(0,a.QP)("w-full border-t border-light-grey-2 grid auto-rows-auto items-stretch justify-items-stretch",s),children:i})})}}},e=>{e.O(0,[883,1864,8588,2563,4170,4575,7314,5879,7983,2573,2734,2981,7262,636,6593,8792],()=>e(e.s=17703)),_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.