1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9b3e8650-7454-42fa-9916-4d2f13541f23",e._sentryDebugIdIdentifier="sentry-dbid-9b3e8650-7454-42fa-9916-4d2f13541f23")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([["5927"],{98823:function(e,t,s){s.d(t,{W:()=>c});var a=s(97496),n=s(95931),l=s(27491),i=s(51976);let r=l.hT(),o=(e,t,s)=>{let a=r.safeParse(e);return a.success?t&&a.data<t?{success:!1,reason:"min",bound:t}:s&&a.data>s?{success:!1,reason:"max",bound:s}:a:{success:!1,reason:"format"}},c=e=>{let{value:t,onChange:s,onInvalid:l,min:r,max:c,...d}=e,[u,m]=(0,n.useState)(null);return(0,a.tZ)(i.o,{type:"date",value:null===u?t.toISOString().split("T")[0]:u,min:r,max:c,onChange:e=>{let t=e.target.value,a=o(t,r,c);a.success?(m(null),s(new Date(a.data))):m(t)},onBlur:()=>{if(null===u)return;let e=o(u,r,c);e.success?s(new Date(e.data)):"format"===e.reason?null==l||l("format"):(s(new Date(e.bound)),null==l||l(e.reason)),m(null)},css:{"&:disabled":{opacity:.8,cursor:"not-allowed"}},...d})}},91183:function(e,t,s){s.d(t,{Y:()=>l});var a=s(97496),n=s(51976);let l=e=>(0,a.tZ)(n.o,{type:"number",onWheel:i,autoCorrect:"off",autoComplete:"off",autoCapitalize:"off",spellCheck:!1,...e}),i=e=>{e.currentTarget.blur()}},23551:function(e,t,s){s.d(t,{R:()=>R});var a=s(97496),n=s(37380),l=s(79396),i=s(56871),r=s(8887),o=s(63782),c=s(22910),d=s(40299),u=s(66660),m=s(69648),p=s(29548),h=s(8363),g=s(75619),f=s(75622);let D=()=>({active:!1,page:"cart",classroomId:null,classroomDetails:null,hasExistingLicense:!1,seats:1,minimumSeats:1,maximumSeats:g.pQ,endDate:(0,o.z)(new Date,12),durationInDays:365,minimumEndDate:(0,c.E)(new Date,p.X$),maximumEndDate:(0,c.E)(new Date,p.bz),products:{tutor:{existingLicense:null,trial:!1,isPaid:!1,selected:!1},ufliPortal:{existingLicense:null,trial:!1,isPaid:!1,selected:!1}},pricing:{tutor:{totalInCents:0,totalDisplay:"$0.00",trialDaysCredited:0,licenseDaysCredited:0,licenseSeatsCredited:0},ufliPortal:{totalInCents:0,totalDisplay:"$0.00",trialDaysCredited:0,licenseDaysCredited:0,licenseSeatsCredited:0},subtotalInCents:0,processingFeeInCents:0,totalInCents:0,totalDisplay:"$0.00"}}),y=["setClassroomDetails","toggleProductSelection","setSeats","setEndDate"],C=(e,t)=>{switch(t.type){case"close":if("complete"===e.page)return D();e.active=!1;break;case"launch":e.active=!0,e.classroomId=t.classroomId,e.launchMessage=t.message,t.productKey&&(e.products[t.productKey].selected=!0);break;case"setClassroomDetails":{let{classroomDetails:s}=t,a=b(s.entitlements);a&&(e.endDate=a,e.minimumEndDate=a,e.maximumEndDate=a);let n=b(s.entitlements)||e.endDate;e.endDate=n,e.durationInDays=(0,d.w)(n,new Date),e.hasExistingLicense=(0,m.AX)(s.entitlements);let l=I(s);e.seats=Math.max(l,e.seats),e.minimumSeats=l,e.products=x(e.products,s.entitlements),e.classroomDetails=s;break}case"toggleProductSelection":{let s=e.products[t.productKey];if(s.isPaid)break;s.selected=!s.selected;break}case"setSeats":{var s,a;let n=null!=(a=null==(s=e.classroomDetails)?void 0:s.studentCount)?a:1;e.seats=(0,f.u)(t.seats,n,g.pQ);break}case"setEndDate":{if(!e.classroomDetails)break;
1let s=t.endDate<e.minimumEndDate?e.minimumEndDate:t.endDate>e.maximumEndDate?e.maximumEndDate:t.endDate;e.endDate=s,e.durationInDays=(0,d.w)(s,new Date);break}case"cartSubmit":e.page="checkout",e.launchMessage=void 0;break;case"returnToCart":e.page="cart";break;case"complete":e.page="complete",e.transactionStatus=t.status}y.includes(t.type)&&(e.pricing={...(0,h.$$)(Z(e)),ufliPortal:(0,h.Mt)({productKey:"ufliPortal",endDate:e.endDate,seats:e.seats,existingLicense:e.products.ufliPortal.existingLicense}),tutor:(0,h.Mt)({productKey:"tutor",endDate:e.endDate,seats:e.seats,existingLicense:e.products.tutor.existingLicense})})},b=e=>{let{tutor:t,ufliPortal:s}=e,a=[t,s].filter(e=>e&&"trial"!==e.source);return 0===a.length?null:1===a.length?a[0].expiresAt:a.toSorted((e,t)=>e&&t?e.expiresAt>t.expiresAt?-1:1:0)[0].expiresAt},x=(e,t)=>{let s=v(t.tutor),a=v(t.ufliPortal);return{tutor:{...s,selected:s.selected||e.tutor.selected},ufliPortal:{...a,selected:a.selected||e.ufliPortal.selected}}},v=e=>({existingLicense:e&&{...e,remainingDays:(0,d.w)(e.expiresAt,new Date)},trial:(null==e?void 0:e.source)==="trial",isPaid:(null==e?void 0:e.source)==="license"||(null==e?void 0:e.source)==="subscription",selected:!!(e&&"trial"!==e.source)}),I=e=>{let{tutor:t,ufliPortal:s}=e.entitlements,a=t&&"trial"!==t.source?t.seats:0,n=s&&"trial"!==s.source?s.seats:0;return Math.max(e.studentCount,a,n)},Z=e=>{let{products:{ufliPortal:t,tutor:s},seats:a,endDate:n}=e;return[t.selected&&{seats:a,endDate:n,productKey:"ufliPortal",existingLicense:t.existingLicense},s.selected&&{seats:a,endDate:n,productKey:"tutor",existingLicense:s.existingLicense}].filter(Boolean)};var w=s(4622),S=s(61940),P=s(53058),E=s(98823),k=s(16258),L=s(91183),B=s(88042),T=s(52993),M=s(54963),X=s(45149),_=s(57866),A=s(10664),H=s(11823);let K=e=>{let{state:t,dispatch:s}=e;return t.classroomDetails?(0,a.BX)(a.HY,{children:[(0,a.tZ)("h4",{css:H.r.titleM,children:t.classroomDetails.name}),t.launchMessage,(0,a.BX)("form",{onSubmit:e=>{e.preventDefault(),s({type:"cartSubmit"})},children:[(0,a.BX)("div",{css:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:16},children:[(0,a.tZ)(k.yt,{identifier:"seats",label:(0,m.AX)(t.classroomDetails.entitlements)?(0,a.tZ)(a.HY,{children:(0,a.tZ)(M.o,{label:"Total seats",children:"Each student in a classroom requires one seat. You cannot reduce the number of seats until your license expires."})}):"Total students",hint:(0,m.AX)(t.classroomDetails.entitlements)?"You currently have ".concat(t.minimumSeats," seats."):"You currently have ".concat(t.classroomDetails.studentCount," students."),children:(0,a.tZ)(L.Y,{id:"seats",value:t.seats,min:t.minimumSeats,max:t.maximumSeats,required:!0,onChange:e=>{let a=Number(e.target.value);return!a||Number.isNaN(a)?void e.preventDefault():a<t.minimumSeats?void w.Am.info("The number of students cannot be less than the current number of students."):void s({type:"setSeats",seats:Math.min(a,t.maximumSeats)})}})}),(0,a.tZ)(k.yt,{identifier:"endDate",label:"End date",hint:t.hasExistingLicense?"This is your existing license expiration date.":"Must be 3â18 months from now.",children:(0,a.tZ)(E.W,{id:"endDate",value:t.endDate,min:t.minimumEndDate.toISOString().split("T")[0],max:t.maximumEndDate.toISOString().split("T")[0],disabled:t.hasExistingLicense,required:!0,onChange:e=>{s({type:"setEndDate",endDate:e})},onInvalid:e=>{"min"===e?w.Am.info("The end date cannot be less than 3 months from now."):"max"===e&&w.Am.info("The end date cannot be more than 18 months from now.")}})})]}),(0,a.BX)("div",{css:{display:"flex",flexDirection:"column",gap:16},children:[(0,a.tZ)(Y,{productKey:"ufliPortal",state:t,dispatch:s,name:"UFLI Portal",formattedPrice:"$3.50"}),(0,a.tZ)(Y,{productKey:"tutor",state:t,dispatch:s,name:"Tutor",formattedPrice:"$15"}),(0,a.tZ)(B.Hr,{css:{marginBlock:8}}),(0,a.tZ)(X.V,{state:t})]})]})]}):(0,a.tZ)(T.T,{})},Y=e=>{var t,s;let{productKey:n,name:l,formattedPrice:i,state:r,dispatch:o}=e,c=r.products[n],d=r.pricing[n];return(0,a.tZ)(S.I,{heading:(0,a.BX)(a.HY,{children:[(0,a.tZ)(P.I,{label:c.isPaid?(0,a.tZ)(a.HY,{children:(0,a.BX)(M.o,{label:l,children:["Your current license for"," ",(0,A._6)(null!=(s=null==(t=c.existingLicense)?void 0:t.seats)?s:0,"seat")," ","will be credited if you add seats."]})}):l,checked:c.selected,disabled:c.isPaid,onChange:()=>{o({type:"toggleProductSelection",productKey:n})},css:{...H.r.titleM,input:{width:"1em",height:"1em"}}}),(0,a.BX)("div",{css:H.r.bodyS,children:[i,"/student/year"]})]}),children:(0,a.BX)("div",{css:{opacity:c.selected?1:.6},children:[(0,a.tZ)(S.I.LineItem,{label:"".concat((0,A._6)(r.seats,"seat")," \xd7 ").concat((0,A._6)(r.durationInDays,"day")),children:(0,_.x)(r.seats*h.xK[n]*r.durationInDays)}),d.trialDaysCredited>0&&(0,a.tZ)(S.I.LineItem,{label:"Trial credit (".concat((0,A._6)(d.trialDaysCredited,"day"),")"),children:(0,a.BX)("span",{css:{color:H.r.colors.green120},children:["â",(0,_.x)(r.seats*h.xK[n]*d.trialDaysCredited)]})}),d.licenseDaysCredited>0&&(0,a.tZ)(S.I.LineItem,{label:"License credit (".concat((0,A._6)(d.licenseDaysCredited,"day")," \xd7 ").concat((0,A._6)(d.licenseSeatsCredited,"seat"),")"),children:(0,a.BX)("span",{css:{color:H.r.colors.green120},children:["â",(0,_.x)(d.licenseSeatsCredited*h.xK[n]*d.licenseDaysCredited)]})}),(0,a.tZ)(S.I.LineItem,{label:"Total due",children:d.totalDisplay})]})})};var $=s(95931),N=s(99168),V=s(74777),O=s(35191),U=s(46128),W=s(43545);let q=e=>{let{state:t,dispatch:s}=e,n=(0,$.useCallback)(async()=>{let e=[t.products.tutor.selected&&t.pricing.tutor.totalInCents>0&&"tutor",t.products.ufliPortal.selected&&t.pricing.ufliPortal.totalInCents>
10&&"ufliPortal"].filter(Boolean),s=await U.L.post("/api/billing/cart",{body:{type:"classroom",classroomId:t.classroomId,endDate:t.endDate,seats:t.seats,products:e}});if(s.success)return s.clientSecret;throw Error(s.error)},[t.classroomId,t.endDate,t.seats,t.products.tutor.selected,t.pricing.tutor.totalInCents,t.products.ufliPortal.selected,t.pricing.ufliPortal.totalInCents]),l=(0,$.useCallback)(e=>{switch(e.status){case"success":s({type:"complete",status:"success"});break;case"processing":s({type:"complete",status:"processing"});break;case"canceled":case"error":s({type:"returnToCart"})}},[s]);return t.classroomDetails?(0,a.BX)("div",{children:[(0,a.BX)(N.Qj,{onClick:()=>{s({type:"returnToCart"})},css:{...H.r.bodyM,display:"flex",alignItems:"center",gap:4,color:H.r.colors.n50,textDecoration:"none"},children:[(0,a.tZ)(O.e0,{direction:"left"})," Back to Cart"]}),(0,a.tZ)("h3",{css:{...H.r.titleM,marginTop:8,marginBottom:16,color:H.r.colors.n80},children:"Enter billing info"}),(0,a.tZ)(V.f,{getClientSecret:n,returnUrl:new URL(W._.teacherClassroom(t.classroomId),g._n).toString(),onResult:l,renderFooter:e=>{let{status:s}=e;return(0,a.tZ)(X.V,{state:t,buttonProps:{children:"Upgrade now",iconEnd:void 0,loading:"ready"!==s,loadingLabel:"submitting"===s?"Processing":"Preparing"}})}})]}):(s({type:"returnToCart"}),null)};var z=s(80563);let F=()=>{let[e,t]=(0,u.C)(C,null,D);return((0,z.L)(()=>{t({type:"close"})}),(0,r.Z)(t),e.active)?(0,a.tZ)(l.Y,{title:"Upgrade Classroom",onClose:()=>{t({type:"close"})},disableCloseOnOutsideClick:!0,children:(0,a.tZ)(Q,{state:e,dispatch:t})}):null},Q=e=>{let{state:t,dispatch:s}=e;switch(t.page){case"cart":return(0,a.tZ)(K,{state:t,dispatch:s});case"checkout":return(0,a.tZ)(q,{state:t,dispatch:s});case"complete":return(0,a.tZ)(i.A,{variant:"classroom",state:t,dispatch:s});default:return t.page,null}},R=e=>{let{children:t}=e,s=(0,n.j)();return(0,a.BX)(a.HY,{children:[(0,a.tZ)("section",{css:{maxWidth:1280,paddingInline:32,margin:"0 auto",[H.r.tablet]:{paddingInline:24},[H.r.mobile]:{paddingInline:20}},children:t}),s.upgradeEligible&&(0,a.tZ)(F,{})]})}},97958:function(e,t,s){s.d(t,{Z:()=>n});var a=s(97496);let n=e=>(0,a.BX)("svg",{width:"1em",viewBox:"0 0 16 16",fill:"none",...e,children:[(0,a.tZ)("path",{d:"M6 2.5C6 1.39543 6.89543 0.5 8 0.5C9.10457 0.5 10 1.39543 10 2.5V7.5C10 8.60457 9.10457 9.5 8 9.5C6.89543 9.5 6 8.60457 6 7.5V2.5Z",fill:"currentColor"}),(0,a.tZ)("path",{d:"M12 6.75C12.4142 6.75 12.75 7.08579 12.75 7.5C12.75 9.86811 11.0169 11.8308 8.75 12.1904V13.75H10C10.4142 13.75 10.75 14.0858 10.75 14.5C10.75 14.9142 10.4142 15.25 10 15.25H6C5.58579 15.25 5.25 14.9142 5.25 14.5C5.25 14.0858 5.58579 13.75 6 13.75H7.25V12.1904C4.98306 11.8308 3.25 9.86811 3.25 7.5C3.25 7.08579 3.58579 6.75 4 6.75C4.41421 6.75 4.75 7.08579 4.75 7.5C4.75 9.29493 6.20507 10.75 8 10.75C9.79493 10.75 11.25 9.29493 11.25 7.5C11.25 7.08579 11.5858 6.75 12 6.75Z",fill:"currentColor"})]})},9730:function(e,t,s){s.d(t,{d:()=>n});var a=s(97496);let n=e=>(0,a.BX)("svg",{width:"1em",viewBox:"0 0 100 100",fill:"none",...e,children:[(0,a.tZ)("path",{fill:"currentColor",d:"M86.7 59a9.9 9.9 0 0 0-6.5.7c-.2.2-.6.1-1 .1-3.2-.4-6.5-.7-9.7-.7-3.8.1-7.6.5-11.1 2l-2 1s-.2 0-.3.2h.3c3-1.3 6.2-1.9 9.5-2.2A86 86 0 0 1 88 61.5c.2 0 .4.2.5.4a26 26 0 0 0 6.3 7l-3.3-.1-5.1-.4-8.1-.5-6.3-.4-8.2-.5-6.4-.4a1 1 0 0 0-.7.3c-1.6 1.6-2.6 2.7-4.7 3.4-2.8 1-7.2-.5-9.6-1.7-.3-.3-.6-.4-1-.4l-9.7.2h-7.5l-7.7.1-7.5.1-4.9.1h-.5c.4-.5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3c0 .3-.2.5-.6.4l-3.4-.3-5.9-.5a1730.2 1730.2 0 0 0-11.3-.9l-7.2-.5-6-.3-6.4-.2-.9.1-.3.2c-1 1.5-2.5 2.1-4.1 2.5-3.7.9-7.2.3-10.7-1-.7-.3-1.4-.5-2.2-.4h-13l-8 .2h-8.2l-8 .1-3 .1H0Z"})]})},75622:function(e,t,s){s.d(t,{u:()=>a});let a=(e,t,s)=>Math.min(s,Math.max(t,e))}}]);
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.