!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="625c3703-f95f-477b-8445-03dac5685e0b",e._sentryDebugIdIdentifier="sentry-dbid-625c3703-f95f-477b-8445-03dac5685e0b")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5615],{2338:function(e,t,n){n.d(t,{B_:function(){return f},Br:function(){return Q},DN:function(){return V},Di:function(){return P},Ek:function(){return m},Gm:function(){return C},Gr:function(){return R},QR:function(){return w},av:function(){return N},c4:function(){return L},cf:function(){return O},dO:function(){return y},l_:function(){return g},oA:function(){return X},pn:function(){return A},pr:function(){return E},rj:function(){return W},tl:function(){return j},uH:function(){return T},wV:function(){return U},wh:function(){return x}});var r=n(42638),a=n(6607),o=n(16880),i=n(33776),s=n(80672),u=n(46221),l=n(85287),d=n(42935);let c="auth",p=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{rootState:r,...o}=n,s=(0,d.vH)(e,t),u=(0,a.Fp)({...o,...r?(0,l.Sb)(r):{}});(0,i.Kz)(s,u)},m=(0,r.hg)("".concat(c,"/signUpWithEmailAsync"),async(e,t)=>{let{rejectWithValue:n,getState:r}=t,a=r(),i={};(0,l.$Y)(a)&&(i=await (0,o.XD)(e.email.toLowerCase()));let s=await (0,o.TR)({...e,presetProperties:{...i,...e.presetProperties}});return s.user?{...s,user:{...s.user,...e.presetProperties,...i}}:n(s)}),g=(0,r.hg)("".concat(c,"/authenticateWithGoogleAsync"),async(e,t)=>{let{rejectWithValue:n}=t,r=await (0,o.az)(e);return r.user?{...r,user:{...r.user,...e.presetProperties}}:n(r)}),f=(0,r.hg)("".concat(c,"/logInWithEmailAsync"),async(e,t)=>{let{rejectWithValue:n}=t,r=await (0,o.K4)(e);return r.user?r:n(r)}),h="".concat(c,"/logOutAsync"),y=(0,r.hg)(h,async(e,t)=>{let{rejectWithValue:n}=t,r=await (0,o.ni)();return r.error?n(r):r}),v=(0,r.hg)("".concat(c,"/resetPasswordAsync"),async(e,t)=>{let{rejectWithValue:n}=t,r=await (0,o.c0)(e);return r.error?n({email:"",error:r.error}):r}),S=(0,r.hg)("lessonEditor/updateUserAsync",async(e,t)=>{let{getState:n,dispatch:r}=t,a=n(),o=(0,l.c7)(a);return(0,l.Qb)(a)?(r(G(e)),await (0,s.Nq)(o,e)):r(O(e)),!0}),w=(0,r.hg)("lessonEditor/addUserToTeamAsync",async(e,t)=>{let{dispatch:n,getState:r,rejectWithValue:a}=t,o=r(),i=(0,l.c7)(o),u=(0,l.oB)(o),d=(0,l.dt)(o),c=(0,l.k7)(o),p=(0,l.Tz)(o);if(u)return console.error("User already in team"),a({success:!1,error:"User already in team"});if(!i)return console.error("User not found"),a({success:!1,error:"User not found"});if(!d)return console.error("Team not found"),a({success:!1,error:"Team not found"});if((await (0,s.QZ)(d)).length>=c&&!p)return console.error("Team is full"),a({error:"Team is full",success:!1});let m=await n(S({teamId:d,userType:p?"basic":"organization"}));return"fulfilled"===m.meta.requestStatus&&m.payload?{success:!0,error:""}:(console.error("Failed to join team for some reason"),a({error:"Failed to join team",success:!1}))}),b="lessonEditor/attachPromotionAsync",I=(0,r.hg)(b,async(e,t)=>{let{getState:n}=t,r=n(),a=(0,l.c7)(r);return!!a&&(await (0,s.VX)({docId:a,property:"attachedPromotionIds",values:e,collection:"users"}),!0)}),U=(0,r.hg)("lessonEditor/getOrganizationAsync",async e=>await (0,o.em)(e)),E=(0,r.hg)("lessonEditor/getOrganizationMembersAsync",async e=>await (0,s.QZ)(e)),x=(0,r.hg)("lessonEditor/syncUserDataAsync",async(e,t)=>{let{getState:n,dispatch:r}=t,a=n(),i=(0,l.c7)(a);if(!i)return;let{user:s,error:d}=await (0,o.PP)(i);s&&r(N((0,u.eo)(s)))}),C=(0,r.hg)("lessonEditor/removeFromTeamAsync",async(e,t)=>{let{dispatch:n,getState:r}=t,a=await (0,s.Nq)(e,{userType:"basic",teamId:""}),o=(0,l.oB)(r());return await (0,s.JB)({docId:o,property:"adminIds",values:[e],collection:"organizations"}),!!a&&(n(z(e)),!0)}),q=(0,r.oM)({name:"auth",initialState:{errorMessage:"",queryStatus:"not-started",user:null,isInitialized:!1,passwordResetLinkSent:!1,organizationUsers:[],authReferrerPath:"",product:"year",team:null,newUserProperties:{},presetEnabled:!1,promotions:[]},reducers:{setPresetEnabled:(e,t)=>{e.presetEnabled=t.payload},setAuthReferrerPath:(e,t)=>{e.authReferrerPath=t.payload},clearAuthReferrerPath:e=>{e.authReferrerPath=""},setErrorMessage:(e,t)=>{e.errorMessage=t.payload},clearAuthErrors:e=>{e.errorMessage=""},setUser:(e,t)=>{t.payload&&(e.user=t.payload)},updateUserInState:(e,t)=>{e.user&&(e.user=(0,a.Zr)(e.user,t.payload))},clearUser:e=>{e.user=null,e.organizationUsers=[]},incrementUserPropertyInState:(e,t)=>{(0,u.yj)(e,t.payload)},setIsAuthInitialized:(e,t)=>{e.isInitialized=t.payload},setTeamUsers:(e,t)=>{e.organizationUsers=t.payload},removeTeamUser:(e,t)=>{e.organizationUsers=e.organizationUsers.filter(e=>e.id!==t.payload)},upgradeUser:e=>{e.user&&(e.user.userType="pro")},setAuthQueryStatus:(e,t)=>{e.queryStatus=t.payload},setProduct:(e,t)=>{e.product=t.payload},setTeam:(e,t)=>{e.team=t.payload},setNewUserProperties:(e,t)=>{e.newUserProperties=t.payload},addNewUserProperties:(e,t)=>{e.newUserProperties={...e.newUserProperties,...t.payload}},removeNewUserProperties:(e,t)=>{let n=e.newUserProperties;t.payload.forEach(e=>{delete n[e]}),e.newUserProperties=n},setPromotions:(e,t)=>{e.promotions=t.payload.map(a.mN)},addPromotion:(e,t)=>{e.promotions.find(e=>e.id===t.payload.id)||(e.promotions=[...e.promotions,(0,a.mN)(t.payload)])},addPromotions:(e,t)=>{let n=t.payload.filter(t=>!e.promotions.find(e=>e.id===t.id)).map(a.mN);e.promotions=[...e.promotions,...n]},removePromotion:(e,t)=>{e.promotions=e.promotions.filter(e=>e.id!==t.payload.id)},clearPromotions:e=>{e.promotions=[]}},extraReducers:e=>{e.addCase(m.pending,e=>{e.queryStatus="pending"}).addCase(m.rejected,(e,t)=>{var n;e.queryStatus="failed";let r=(null==t?void 0:null===(n=t.payload)||void 0===n?void 0:n.error)||"Something went wrong";e.errorMessage=r}).addCase(m.fulfilled,(e,t)=>{e.queryStatus="successful";let{user:n}=t.payload;n&&(e.user=n,e.errorMessage="",(0,s.Nq)(n.id,n))}).addCase(g.pending,e=>{e.queryStatus="pending"}).addCase(g.rejected,(e,t)=>{var n;e.queryStatus="failed";let r=(null==t?void 0:null===(n=t.payload)||void 0===n?void 0:n.error)||"Something went wrong";e.errorMessage=r}).addCase(g.fulfilled,(e,t)=>{e.queryStatus="successful";let{user:n}=t.payload;n&&(e.user=n,e.errorMessage="",(0,s.Nq)(n.id,n))}).addCase(f.pending,e=>{e.queryStatus="pending"}).addCase(f.rejected,(e,t)=>{var n;e.queryStatus="failed";let r=(null==t?void 0:null===(n=t.payload)||void 0===n?void 0:n.error)||"Something went wrong";e.errorMessage=r}).addCase(f.fulfilled,(e,t)=>{e.queryStatus="successful";let{user:n}=t.payload;e.user=n,e.errorMessage=""}).addCase(y.pending,e=>{p(h,"started"),e.queryStatus="pending"}).addCase(y.rejected,(e,t)=>{var n;e.queryStatus="failed";let r=(null==t?void 0:null===(n=t.payload)||void 0===n?void 0:n.error)||"Something went wrong";e.errorMessage=r}).addCase(y.fulfilled,(e,t)=>{e.queryStatus="successful",e.user,e.user=null,e.errorMessage=""}).addCase(v.pending,e=>{e.queryStatus="pending"}).addCase(v.rejected,(e,t)=>{var n;e.queryStatus="failed";let r=(null==t?void 0:null===(n=t.payload)||void 0===n?void 0:n.error)||"Something went wrong";e.errorMessage=r}).addCase(v.fulfilled,(e,t)=>{e.queryStatus="successful",t.payload.email,e.passwordResetLinkSent=!0,e.user=null,e.errorMessage=""}).addCase(U.pending,e=>{e.queryStatus="pending"}).addCase(U.rejected,(e,t)=>{e.queryStatus="failed"}).addCase(U.fulfilled,(e,t)=>{e.queryStatus="successful",e.team=t.payload}).addCase(E.pending,e=>{e.queryStatus="pending"}).addCase(E.rejected,(e,t)=>{e.queryStatus="failed"}).addCase(E.fulfilled,(e,t)=>{e.queryStatus="successful",e.organizationUsers=t.payload}).addCase(I.pending,(e,t)=>{(0,i.AF)(b,"started",t),e.queryStatus="pending";let{user:n,newUserProperties:r}=e;if(!n){r.attachedPromotionIds=(0,a.Ho)(r.attachedPromotionIds||[],t.meta.arg);return}n.attachedPromotionIds=(0,a.Ho)(n.attachedPromotionIds||[],t.meta.arg)}).addCase(I.rejected,(e,t)=>{(0,i.AF)(b,"failed",t),e.queryStatus="failed"}).addCase(I.fulfilled,(e,t)=>{(0,i.AF)(b,"successful",t),e.queryStatus="successful"})}}),{setErrorMessage:T,clearAuthErrors:P,clearUser:A,setIsAuthInitialized:k,setAuthQueryStatus:L,setUser:N,updateUserInState:G,setTeamUsers:M,removeTeamUser:z,setAuthReferrerPath:W,clearAuthReferrerPath:j,incrementUserPropertyInState:B,upgradeUser:F,setProduct:R,setTeam:D,setNewUserProperties:O,addNewUserProperties:Q,removeNewUserProperties:_,setPresetEnabled:V,setPromotions:J,addPromotion:K,removePromotion:H,addPromotions:X,clearPromotions:Y}=q.actions;t.ZP=q.reducer},16880:function(e,t,n){n.d(t,{K4:function(){return g},PP:function(){return h},TR:function(){return m},XD:function(){return b},az:function(){return y},c0:function(){return S},cc:function(){return I},em:function(){return w},gy:function(){return U},ni:function(){return v},vW:function(){return p},y0:function(){return E}});var r=n(53085),a=n(24086),o=n(51294),i=n(80672),s=n(46221),u=n(33776),l=n(95303);let d=new r.hJ,c=async(e,t,n)=>{if(!o.lX)return{user:null,error:"Failed to sign up"};let{user:a}=await (0,r.Xb)(o.lX,e,t),u=(0,s.eQ)(a)||n.firstName||"",l={...n,firstName:u};return await (0,i.M)(a.uid,l),{user:{...(0,s.Zj)(a),...l},error:""}},p=async()=>{if(!o.lX||!o.mz)return"Failed to sign out and delete user";try{var e;if(!(null===(e=o.lX.currentUser)||void 0===e?void 0:e.uid)||!o.lX.currentUser)throw Error("No user is logged in");return await (0,r.h8)(o.lX.currentUser),""}catch(e){return console.error("Failed to sign out and delete user",e),(null==e?void 0:e.code)||"Something went wrong"}},m=async e=>{let{email:t,password:n,presetProperties:r={}}=e;try{return await c(t,n,r)}catch(e){return console.error("Failed to sign up",e),{user:null,error:null==e?void 0:e.code}}},g=async e=>{let{email:t,password:n}=e;if(!o.lX)return{user:null,error:"Failed to log in"};try{let{user:e}=await (0,r.e5)(o.lX,t,n);return{user:(0,s.Zj)(e),error:""}}catch(e){return console.error("Error logging in",e),{user:null,error:null==e?void 0:e.code}}},f=async(e,t)=>{if(!o.lX)return{user:null,error:"Failed to log in"};let{user:n}=await (0,r.rh)(o.lX,d),a=await (0,i.Me)("users",n.uid);return a?{user:{...(0,s.Zj)(n),userType:(null==a?void 0:a.userType)||"basic"},error:""}:(await (0,i.M)(n.uid,t),{user:{...(0,s.Zj)(n),userType:e},error:""})},h=async e=>{if(!o.lX)return{user:null,error:"Failed to log in"};try{return{user:await (0,i.Me)("users",e),error:""}}catch(e){return console.error("Error refreshing user data",e),{user:null,error:null==e?void 0:e.code}}},y=async e=>{let{presetProperties:t={}}=e;try{return await f("basic",t)}catch(e){return console.error("Failed to authenticate with Google",e),{user:null,error:null==e?void 0:e.code}}},v=async()=>{if(!o.lX)return{error:"Failed to log out"};try{return await (0,r.w7)(o.lX),(0,u.zb)(),{error:""}}catch(e){return console.error("Failed to sign out",e),{error:null==e?void 0:e.code}}},S=async e=>{if(!o.lX)return{email:e,error:"Failed to log in"};try{return await (0,r.LS)(o.lX,e),{error:"",email:e}}catch(t){return console.error("Failed to send password reset email",t),{error:null==t?void 0:t.code,email:e}}},w=async e=>{if(!o.mz)return null;try{let t=(0,a.JU)(o.mz,"organizations",e),n=await (0,a.QT)(t);if(n.exists()){let e=n.data();return{...e,createdAt:(0,l.UG)((null==e?void 0:e.createdAt)||""),updatedAt:(0,l.UG)((null==e?void 0:e.updatedAt)||"")}}return null}catch(t){return console.error("Failed to get team: ",e),console.error(t),null}},b=async e=>{if(!o.mz)return{};let t=(0,a.JU)(o.mz,"accountPresets",e),n=await (0,a.QT)(t);return n.exists()?n.data():{}},I=async e=>o.mz?await (0,i.Me)("promotions",e):null,U=async e=>{if(!o.mz)return[];try{let t=(0,a.IO)((0,a.hJ)(o.mz,"promotions"),(0,a.ar)("id","in",e),(0,a.ar)("active","==",!0));return(await (0,a.PL)(t)).docs.map(e=>e.data())}catch(t){return console.error("Failed to get promotions by ids: ",e),console.error(t),[]}},E=async e=>{if(!o.mz)return null;let t=(0,a.IO)((0,a.hJ)(o.mz,"promotions"),(0,a.ar)("code","==",e)),n=await (0,a.PL)(t),r=[];return(n.forEach(e=>{r.push(e.data())}),0===r.length)?null:r[0]}},85287:function(e,t,n){n.d(t,{OK:function(){return ed},m_:function(){return eb},T$:function(){return g},JR:function(){return f},rP:function(){return L},MO:function(){return ey},u8:function(){return ev},gl:function(){return Q},Sb:function(){return Z},Bp:function(){return H},Jb:function(){return N},El:function(){return ep},e6:function(){return eS},_h:function(){return G},XG:function(){return en},Yo:function(){return eC},yX:function(){return A},bB:function(){return D},Ci:function(){return y},To:function(){return h},vN:function(){return I},bA:function(){return U},jA:function(){return P},Qb:function(){return T},UK:function(){return F},Tz:function(){return R},LN:function(){return C},n2:function(){return K},VT:function(){return E},Yq:function(){return x},OT:function(){return q},II:function(){return _},m7:function(){return ew},sL:function(){return eU},k7:function(){return et},lm:function(){return eh},jN:function(){return X},eU:function(){return j},W8:function(){return B},dt:function(){return m},JT:function(){return M},$Y:function(){return c},Fn:function(){return V},$7:function(){return em},b5:function(){return eg},Dn:function(){return J},PS:function(){return ei},Q8:function(){return es},MA:function(){return p},oB:function(){return k},Dw:function(){return ex},Xr:function(){return eq},vm:function(){return ee},WE:function(){return eT},oD:function(){return eE},YR:function(){return W},dy:function(){return S},I_:function(){return v},W2:function(){return O},c7:function(){return b},$m:function(){return $},W$:function(){return w}});var r=n(28742),a=n(51293),o=n(97439),i=n(97088),s=n(46221),u=n(97135);let l=e=>e.includes("promo_");var d=n(29953);let c=e=>e.auth.presetEnabled,p=e=>e.auth.team,m=e=>{var t;return(null===(t=e.auth.team)||void 0===t?void 0:t.id)||""},g=e=>e.auth.errorMessage,f=e=>e.auth.queryStatus,h=(0,r.P1)(f,e=>"pending"===e),y=(0,r.P1)(h,e=>!e),v=e=>{var t;return(null===(t=e.auth.user)||void 0===t?void 0:t.email)||""},S=e=>e.auth.user,w=e=>{let{user:t}=e.auth;return(null==t?void 0:t.userType)||"anonymous"},b=(0,r.P1)(S,e=>(null==e?void 0:e.id)||i.xh),I=(0,r.P1)(S,e=>!!e),U=(0,r.P1)(w,e=>"basic"===e),E=(0,r.P1)(w,e=>o.So.includes(e)),x=(0,r.P1)(w,e=>"pro"===e),C=(0,r.P1)(w,e=>o.sx.includes(e)),q=(0,r.P1)(w,e=>o.pU.includes(e));(0,r.P1)(w,e=>"organization"===e);let T=(0,r.P1)(S,e=>!!e),P=(0,r.P1)(T,C,(e,t)=>e&&!t);(0,r.P1)(w,e=>"trial"===e);let A=e=>{var t;return(null===(t=e.auth.user)||void 0===t?void 0:t.userType)==="admin"},k=e=>{var t;return(null===(t=e.auth.user)||void 0===t?void 0:t.teamId)||""},L=e=>e.auth.authReferrerPath,N=(0,r.P1)(L,e=>!!e),G=e=>{var t;return!!(null===(t=e.auth.user)||void 0===t?void 0:t.teamId)},M=e=>e.auth.organizationUsers,z=(0,r.P1)(M,e=>e.filter(e=>"basic"!==e.userType)),W=(0,r.P1)(z,e=>e.length),j=e=>{var t;return(null===(t=e.auth.team)||void 0===t?void 0:t.adminIds)||null},B=e=>{var t;return(null===(t=e.auth.team)||void 0===t?void 0:t.basicAdminEmails)||null},F=(0,r.P1)(j,e=>{var t;return(null===(t=e.auth.team)||void 0===t?void 0:t.adminEmails)||null},B,b,v,(e,t,n,r,a)=>(null==e?void 0:e.includes(r))||(null==t?void 0:t.includes(a))||(null==n?void 0:n.includes(a))||!1),R=(0,r.P1)(B,b,v,(e,t,n)=>(null==e?void 0:e.includes(n))||!1),D=(0,r.P1)(h,T,(e,t)=>!e&&!t),O=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return(0,r.P1)(S,r=>(0,s.$y)(r,e)||t||(0,s.by)(r,n))},Q=(0,r.P1)(S,e=>(null==e?void 0:e.customerId)||""),_=(0,r.P1)(w,e=>"trial"===e),V=e=>e.auth.product,J=(0,r.P1)(V,e=>u.Rw[e]),K=(0,r.P1)(C,v,(e,t)=>e&&t.endsWith("@ubc.ca")),H=e=>O("documentOverridesEnabled",a.t8)(e),X=e=>e.auth.newUserProperties,Y=(0,r.P1)(S,e=>{let t=(0,s.Ce)([]);return(0,s.by)(e,[t])?"pro":(null==e?void 0:e.userType)||"anonymous"}),$=(0,r.zB)({userId:b,userType:Y});(0,r.P1)(S,e=>(0,s.by)(e,[]));let Z=(0,r.P1)(S,e=>e||{}),ee=(0,r.P1)(S,e=>e?(0,s.uZ)(e):0),et=(0,r.P1)(p,e=>(null==e?void 0:e.maxSeats)||0),en=(0,r.P1)(S,e=>!!(null==e?void 0:e.hasPaymentInfo)),er=(0,r.P1)(S,e=>!!(null==e?void 0:e.trialStartedAt)),ea=(0,r.P1)(S,e=>!!(null==e?void 0:e.trialStart)),eo=(0,r.P1)(er,ea,(e,t)=>e||t),ei=(0,r.P1)(S,e=>(null==e?void 0:e.subscriptionId)||""),es=(0,r.P1)(S,e=>(null==e?void 0:e.subscriptionPriceId)||""),eu=(0,r.P1)(e=>e.auth.promotions||d.LZ,e=>[...e].sort((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime())),el=(0,r.P1)(eu,T,U,es,(e,t,n,r)=>e.length?e.filter(e=>{let{active:a,priceId:o}=e;return!!a&&o!==r&&!!t&&(!!n||!!es)}):null),ed=(0,r.P1)(el,e=>(null==e?void 0:e[0])||null),ec=(0,r.P1)(ed,e=>!!e&&!!e.trialDays&&"unrestricted"===e.eligibility),ep=(0,r.P1)(ed,eo,ec,(e,t,n)=>{if(!e)return!1;let{trialDays:r,ccSkipEnabled:a}=e;return!!r&&!!a&&(n||!t)}),em=e=>(0,r.P1)(ed,t=>t&&e(t)?t:null),eg=e=>(0,r.P1)(eu,t=>t.find(e)||null),ef=(0,r.P1)(J,ed,(e,t)=>{if(!t)return"";let{priceId:n,id:r,stripeId:a}=t;return e!==n?"":l(r)?r:a||""});(0,r.P1)(ed,e=>{if(!e)return!0;let{paymentMethodRequired:t=!0}=e;return t});let eh=(0,r.P1)(ed,e=>(null==e?void 0:e.trialDays)||o.mM),ey=(0,r.P1)(ec,T,P,eo,(e,t,n,r)=>!!t&&!!n&&(!!e||!r)),ev=(0,r.P1)(Q,b,V,ey,ep,eh,ef,v,e=>{var t;return(null===(t=e.auth.user)||void 0===t?void 0:t.firstName)||""},(e,t,n,r,a,o,i,s,u)=>({customerId:e,userId:t,product:n,trialEnabled:r,paymentMethodRequired:!a,trialDays:o,promoCode:i,email:s,name:u})),eS=(0,r.P1)(Q,e=>!!e),ew=(0,r.P1)(_,en,(e,t)=>e&&!t),eb=e=>{var t;return(null===(t=e.auth.user)||void 0===t?void 0:t.attachedPromotionIds)||null},eI=(0,r.P1)(eb,e=>!!(null==e?void 0:e.length)),eU=(0,r.P1)(ew,eI,(e,t)=>e?t?"Add payment method to claim discount":"Add Payment Method":"Manage Subscription"),eE=(0,r.P1)(ey,e=>e?"Try Pro for Free":"Upgrade"),ex=(0,r.P1)(p,e=>(null==e?void 0:e.name)||""),eC=(0,r.P1)(ei,e=>!!e),eq=e=>O("textTranslation",a.iB)(e),eT=e=>O("unitAssistant",a.NA)(e)},97135:function(e,t,n){n.d(t,{$c:function(){return s},Rw:function(){return u},dk:function(){return a},fI:function(){return i},q_:function(){return o}});var r=n(62601);let a=["5 lessons per month","300 word limit for texts/videos","5 sections per lesson"],o=["Create as many lessons as you want","Use longer texts to create lessons (up to 3,000 words)","Add as many activities you want to each lesson","Automatically digitize PDF/Image worksheets","Pick from dozens activity templates or write your own"],i=["Shared lessons across teams","Custom features (billed per-feature)","Early access to new features"],s="For educators who regularly create customized material for their classes",u={month:"price_1OX7ALBeCjjtfimPgqx0aDWl",year:"price_1MaWdzBeCjjtfimPbqQkvW4l",LEGACY_month:r.env.NEXT_PUBLIC_LEGACY_MONTHLY_PRICE_ID||""}},54998:function(e,t,n){n.d(t,{Hq:function(){return l},Mn:function(){return o},NJ:function(){return u},QH:function(){return s},Tw:function(){return r},fC:function(){return a},rS:function(){return i}});let r=5,a={anonymousGroup:100,basicGroup:500,proGroup:3e3,premiumGroup:1e4},o=["summary","easy-summary","vocabulary","sentence-split","active-voice"],i=6e4,s="B2",u=["private","team"],l={private:"Private",team:"Team",public:"Public"}},94622:function(e,t,n){n.d(t,{AE:function(){return i},P2:function(){return a},zS:function(){return o}});var r=n(97088);let a={"Avg. Sentence Length":26.3,"CEFR Level":"C1","CLB Level":"10-11","Difficult Word Count":8,"Difficult Words":["periodically","ridley","loggerhead"],Difficulty:"Fairly Difficult","Flesh Reading Ease":53.24,"Grade Level":"Grade 10-12","Gunning Fog Index":14.57},o={"Avg. Sentence Length":17.7,"CEFR Level":"A2","CLB Level":"3-4","Difficult Words":["ridley","loggerhead"],"Difficult Word Count":2,Difficulty:"Easy","Flesh Reading Ease":87.35,"Grade Level":"Grade 6","Gunning Fog Index":8.59},i={error:"",text_stats:a,userId:r.xh};r.xh,r.xh},91695:function(e,t,n){n.d(t,{rC:function(){return a}});let r={id:"1",type:"article",url:"https://toronto.ctvnews.ca/young-scouts-stuck-in-zurich-after-missing-air-canada-flight-to-toronto-1.5990547",text:"",title:"Explore Item",snippet:"",dateCreated:"",sourceName:"Toronto CTV News",textStats:{},thumbnailUrl:""},a=[r,r,r,r,r,r,r,r,r,r,r]},816:function(e,t,n){n.d(t,{yW:function(){return v},ZP:function(){return E},SH:function(){return g},hv:function(){return I}});var r=n(42638),a=n(33776),o=n(29953),i=n(6607),s=n(51293),u=n(91695),l=n(94960);let d=async e=>{let{}=e;return await (0,l.l_)({input:{},endpoint:"explore",failureResponse:{items:[],error:"Failed to retrieve articles"},method:"GET"})},c=async()=>(await (0,i.Dc)(o.uR),{error:"",items:u.rC}),p=async e=>{if(s.xR)return c();try{return await d(e)}catch(e){return console.error("Failed to get Explore Items"),{error:"Failed to get News Articles",items:[]}}},m={errorMessage:"",requestStatus:"not-started",searchText:"",items:[],lessonView:"start"},g=(0,r.hg)("search/getExploreItems",async(e,t)=>{let{rejectWithValue:n}=t,r=await p(e);return r.items.length?r:n(r)}),f=(e,t)=>e,h=(0,r.oM)({name:"explore",initialState:m,reducers:{setExploreErrorMessage:(e,t)=>{e.errorMessage=t.payload},clearExploreErrorMessage:(e,t)=>{e.errorMessage=""},setExploreSearchText:(e,t)=>{e.errorMessage=t.payload},clearExploreSearchText:(e,t)=>{e.errorMessage=""},setLessonView:(e,t)=>{e.lessonView=t.payload},returnToLessonHome:e=>{e.lessonView="start"},resetExploreState:()=>m},extraReducers:e=>{e.addCase(g.pending,e=>{(0,a.Kz)("getExploreItemsAsyncStarted",{...f(e,{})}),e.requestStatus="pending"}).addCase(g.rejected,(e,t)=>{var n,r;e.requestStatus="failed",e.errorMessage=(null===(n=t.payload)||void 0===n?void 0:n.error)||"Failed to get items",(0,a.Kz)("getExploreItemsFailed",{...f(e,{}),error:null===(r=t.payload)||void 0===r?void 0:r.error})}).addCase(g.fulfilled,(e,t)=>{e.requestStatus="successful",e.items=t.payload.items,(0,a.Kz)("getExploreItemsSucceeded")})}}),{setExploreErrorMessage:y,clearExploreErrorMessage:v,resetExploreState:S,setExploreSearchText:w,clearExploreSearchText:b,setLessonView:I,returnToLessonHome:U}=h.actions;var E=h.reducer},94960:function(e,t,n){n.d(t,{$w:function(){return m},MU:function(){return g},UL:function(){return b},a_:function(){return h},l_:function(){return c},sg:function(){return w}});var r=n(33776),a=n(29953),o=n(6607),i=n(15087),s=n(51293);let u=async e=>await e.json();async function l(e,t,n){try{return await e}catch(a){let e;if(a instanceof Response){let{status:t,statusText:r,headers:o}=a,i=await a.text();e=Error("HTTP error! status: ".concat(t," ").concat(r)),n={...n,status:t,statusText:r,headers:[...o],errorText:i}}else e=a;return(0,r.Pk)(e,n),t}}async function d(e){let t={method:"POST",body:JSON.stringify(e)};try{var n;let o=await fetch("".concat(a.l3,"/pseudo_stream_proxy"),t),i=null===(n=o.body)||void 0===n?void 0:n.getReader(),s=[];if(!i)return(0,r.Pk)(Error("Stream body is not readable")),e.failureResponse;{for(;;){let{done:e,value:t}=await i.read();if(e)break;s.push(t)}let t=new TextDecoder().decode(new Uint8Array(s.reduce((e,t)=>e.concat(Array.from(t)),[])));try{return JSON.parse(t)}catch(n){return(0,r.Ff)("Failed to parse streaming response",{responseString:t,input:JSON.stringify((null==e?void 0:e.input)||{}),endpoint:null==e?void 0:e.endpoint}),(0,r.Pk)(n,{options:e,requestType:"stream",responseString:t}),e.failureResponse}}}catch(t){return(0,r.Pk)(t,{options:e,requestType:"stream"}),e.failureResponse}}async function c(e){let{endpoint:t,method:n="POST",input:r,failureResponse:o}=e,i={credentials:"same-origin",headers:{"Content-Type":"application/json"},method:n};return"GET"!==n&&(i={...i,body:JSON.stringify(r)}),l(fetch("".concat(a.l3,"/").concat(t),i).then(u),o,{...i,url:"".concat(a.l3,"/").concat(t)})}async function p(e){let{endpoint:t,method:n="POST",input:r,failureResponse:o}=e,i={credentials:"include",headers:{"Content-Type":"application/json"},method:n};return"GET"!==n&&(i={...i,body:JSON.stringify(r)}),l(fetch("".concat(a.LB,"/").concat(t),i).then(u),o,{...i,url:"".concat(a.LB,"/").concat(t)})}async function m(e){let{endpoint:t,method:n="POST",input:r,failureResponse:o}=e,i=new FormData;for(let e in r)i.append(e,r[e]);let s={credentials:"include",method:n,body:i};return l(fetch("".concat(a.LB,"/").concat(t),s).then(u),o,{...s,url:"".concat(a.LB,"/").concat(t)})}async function g(e){let t=await p(e);return(0,o.LN)(t,e.failureResponse)?t:t=await c(e)}async function f(e){let{endpoint:t,method:n="POST",input:r}=e,o=0,s=i.qW;return(null==r?void 0:r.sourceType)==="youtube"&&(s=i.oY),new ReadableStream({start(e){let t=setInterval(()=>{let n=(o+=a.Qm)>=s.length,r=JSON.stringify({modifiedText:s.substring(0,o),status:n?"successful":"pending",message:"",warning:"",error:""})+a.bV,i=new TextEncoder().encode(r);e.enqueue(i),n&&(e.close(),clearInterval(t))},a.pi)}}).pipeThrough(new TextDecoderStream).getReader()}async function h(e){let t=await g(e);return(0,o.LN)(t,e.failureResponse)?t:t=await d(e)}async function y(e){let{endpoint:t,method:n="POST",input:r}=e,o=await fetch("".concat(a.LB,"/").concat(t),{method:n,body:JSON.stringify(r),headers:{"Content-Type":"application/json"}});if(!o.ok||!o.body)throw Error("HTTP error! status: ".concat(o.status));return o.body.pipeThrough(new TextDecoderStream).getReader()}async function v(e){let{endpoint:t,method:n="POST",input:r}=e,o=await fetch("".concat(a.l3,"/stream_proxy"),{method:"POST",body:JSON.stringify({endpoint:t,method:n,input:r}),headers:{"Content-Type":"application/json"}});if(!o.ok||!o.body)throw Error("HTTP error! status: ".concat(o.status));let i=o.body.pipeThrough(new TextDecoderStream).getReader();if(!i)throw Error("Unable to create reader for stream");return i}async function S(e,t){let{onDataReceived:n,onError:o}=t,i="";if(e)for(;;){let{value:t,done:s}=await e.read().catch(e=>{null==o||o(e),(0,r.Pk)(e,{function:"handleStream"})});if(s)break;let u=(i+=t).split(a.bV);for(;u.length>1;){let e=u.shift();try{let t=JSON.parse(e||"{");n(t)}catch(e){o(e),(0,r.Pk)(e,{requestType:"stream-with-update"})}}i=u[0]}}async function w(e){let t=new AbortController,n=t.signal,{endpoint:o,method:i="POST",input:s,onDataReceived:u,onError:l}=e;try{let t=await fetch("".concat(a.LB,"/").concat(o),{method:i,body:JSON.stringify(s),headers:{"Content-Type":"application/json"},signal:n});if(!t.ok||!t.body)throw null==l||l(t),Error("HTTP error! status: ".concat(t.status));let d=t.body.pipeThrough(new TextDecoderStream).getReader(),c="";if(!d)return()=>{};for(;;){let{value:t,done:n}=await d.read();if(n)break;let o=(c+=t).split(a.bV);for(;o.length>1;){let t=o.shift();try{let e=JSON.parse(t||"{}");u(e)}catch(t){null==l||l(t),(0,r.Pk)(t,{options:e,requestType:"stream-with-update"})}}c=o[0]}}catch(t){(0,r.Pk)(t,{options:e,requestType:"stream-with-update"}),null==l||l(t)}return()=>{t.abort()}}async function b(e){let t=new AbortController;t.signal;let{endpoint:n,method:a="POST",input:o,onDataReceived:i,onError:u}=e;try{let t=null;if(s.xR)t=await f({endpoint:n,method:a,input:o});else{try{t=await v({endpoint:n,method:a,input:o})}catch(t){(0,r.Pk)(t,{options:e,requestType:"edge-stream-with-update"})}t||(t=await y({endpoint:n,method:a,input:o}))}await S(t,{onDataReceived:i,onError:u})}catch(t){(0,r.Pk)(t,{options:e,requestType:"cors-stream-with-update"}),null==u||u(t)}return()=>{t.abort()}}},77869:function(e,t,n){n.d(t,{H9:function(){return i},qR:function(){return l},rO:function(){return u}});var r=n(42638);n(33776),n(6607);let a={audioSpeed:1,audioPlayingId:""};(0,r.hg)("lesson/doSomething",async(e,t)=>{let{rejectWithValue:n}=t,r=await null;return r||n(r)});let o=(0,r.oM)({name:"lesson",initialState:a,reducers:{setAudioSpeed:(e,t)=>{e.audioSpeed=t.payload},setAudioPlayingId:(e,t)=>{e.audioPlayingId=t.payload},clearAudioPlayingId:e=>{e.audioPlayingId=""},resetLessonState:()=>a},extraReducers:e=>{}}),{setAudioSpeed:i,resetLessonState:s,setAudioPlayingId:u,clearAudioPlayingId:l}=o.actions;t.ZP=o.reducer},21479:function(e,t,n){n.d(t,{$p:function(){return S},BN:function(){return c},D$:function(){return p},E$:function(){return v},NO:function(){return d},Pq:function(){return r},lK:function(){return s},rP:function(){return C},xU:function(){return h}});let r=e=>{if(!e||"string"!=typeof e)return[];let t=(null==e?void 0:e.split("*"))||[],n=[],r=e.startsWith("*");for(let e=0;e<t.length;e++){let a=t[e];(0!==e||!r||""!==a)&&(a&&n.push({text:a,isBlank:r}),e<t.length-1&&(r=!r))}return n},a=e=>r(e).filter(e=>e.isBlank).map(e=>e.text),o=e=>{var t;return a((null===(t=e.clozeText)||void 0===t?void 0:t.text)||"")},i=e=>"cloze"===e.variation?o(e):[],s=e=>e.map(i).flat(),u=e=>e.replace(/[^a-zA-Z0-9]/g,""),l=e=>u(e).toLowerCase().trim(),d=(e,t)=>l(e)===l(t),c=(e,t)=>{let n=[...e].sort(),r=[...t].sort();return n.length===r.length&&n.every((e,t)=>e===r[t])},p=e=>String.fromCharCode(97+e).toLowerCase(),m=e=>{var t;return(null===(t=e.choices.find(t=>t.id===e.correctChoiceId))||void 0===t?void 0:t.text)||""},g=e=>e.choices.filter(t=>e.correctChoiceIds.includes(t.id)).map(e=>e.text).join(", ")||"",f=e=>e.clozeText.text||"",h=e=>{switch(e.variation){case"multiple-choice":return m(e);case"multi-select":return g(e);case"cloze":return f(e);default:return""}},y=(e,t)=>e>=t?e%t:e,v=e=>"/stockAvatars/avatar-".concat(y(e,5),".png"),S=(e,t)=>{let n=t.indexOf(e);if(-1===n)throw Error("Term ID ".concat(e," not found in shuffledDefinitionIds"));return p(n)},w=e=>!!e&&"object"==typeof e&&"text"in e,b=e=>!!("multiple-choice"===e.variation&&e.choices&&Array.isArray(e.choices)&&e.choices.every(w)),I=e=>!!("open-ended"===e.variation&&"prompt"in e&&"object"==typeof e.prompt&&w(e.prompt)),U=e=>!!("cloze"===e.variation&&"clozeText"in e&&w(e.clozeText)),E=e=>{switch(e.variation){case"multiple-choice":return b(e);case"open-ended":return I(e);case"cloze":return U(e);default:return!1}},x=e=>"quiz"===e.type?{...e,questions:e.questions.filter(E)}:e,C=e=>e.map(x)},90837:function(e,t,n){n.d(t,{QU:function(){return a},XV:function(){return o}});let r=[{id:"basic-comprehension",label:"Basic comprehension",description:"Basic comprehension",standard:"generic",variations:["multiple-choice","open-ended"],details:{targetLevel:"",maxQuestions:10},tags:[]},{id:"higher-order-inference",label:"Higher-order inference",description:"Higher-order inference",standard:"generic",variations:["multiple-choice","open-ended"],details:{targetLevel:"",maxQuestions:10},tags:[]},{id:"theme-discussion",label:"Theme discussion",description:"Theme discussion",standard:"generic",variations:["open-ended"],details:{targetLevel:"",maxQuestions:5},tags:[]},{id:"content-discussion",label:"Content discussion",description:"Content discussion",standard:"generic",variations:["open-ended"],details:{targetLevel:"",maxQuestions:5},tags:[]}],a=[...r,{id:"vocabulary-practice",label:"Vocabulary practice",description:"Vocabulary practice",standard:"generic",variations:["cloze"],details:{targetLevel:"",maxQuestions:5},tags:[]}],o=e=>e?a:r},49003:function(e,t,n){n.d(t,{Kt:function(){return o},X5:function(){return i}});var r=n(90837),a=n(90053);a.Ve,a.gA;let o={include:!1,includeAudio:!1,termCount:a.qm,directive:a.EG,includeDefinitions:!0,audioVoice:a.jB};r.QU[0];let i=[]},67012:function(e,t,n){n.d(t,{O:function(){return U},X6:function(){return y},Xx:function(){return S},rE:function(){return E},tC:function(){return f},B3:function(){return b},Tl:function(){return w}});let r={AU:"Australian",GB:"British",IN:"Indian",US:"American"},a=["US","GB","IN","AU"],o={alloy:"https://storage.googleapis.com/roshi-assets/dialogue-voices/alloy.mp3",echo:"https://storage.googleapis.com/roshi-assets/dialogue-voices/echo.mp3",fable:"https://storage.googleapis.com/roshi-assets/dialogue-voices/fable.mp3",onyx:"https://storage.googleapis.com/roshi-assets/dialogue-voices/onyx.mp3",nova:"https://storage.googleapis.com/roshi-assets/dialogue-voices/nova.mp3",shimmer:"https://storage.googleapis.com/roshi-assets/dialogue-voices/shimmer.mp3"},i=e=>o[e]||"";var s=[{id:"alloy",name:"alloy",gender:"f",languageCode:"en-US",provider:"openai",ssmlEnabled:!0,quality:"premium"},{id:"echo",name:"echo",gender:"m",languageCode:"en-US",provider:"openai",ssmlEnabled:!0,quality:"premium"},{id:"fable",name:"fable",gender:"m",languageCode:"en-GB",provider:"openai",ssmlEnabled:!0,quality:"premium"},{id:"onyx",name:"onyx",gender:"m",languageCode:"en-US",provider:"openai",ssmlEnabled:!0,quality:"premium"},{id:"nova",name:"nova",gender:"f",languageCode:"en-US",provider:"openai",ssmlEnabled:!0,quality:"premium"},{id:"shimmer",name:"shimmer",gender:"f",languageCode:"en-US",provider:"openai",ssmlEnabled:!0,quality:"premium"}],u=n(93622);let l=[...s],d=[...s,...u.wh],c=e=>{let{languageCode:t}=e;return t.split("-")[1]},p=(e,t)=>a.indexOf(c(e))-a.indexOf(c(t)),m=(e,t)=>e.provider<t.provider?-1:e.provider>t.provider?1:0,g=(e,t)=>e.quality<t.quality?-1:e.quality>t.quality?1:0,f=()=>[...l].sort((e,t)=>{let n=g(e,t);if(0!==n)return n;let r=m(e,t);return 0!==r?r:p(e,t)}),h=e=>d.find(t=>t.id===e)||null,y=e=>{var t;return(null===(t=h(e))||void 0===t?void 0:t.provider)==="google"},v=e=>{var t;return(null===(t=h(e))||void 0===t?void 0:t.provider)==="openai"},S=e=>{var t;return(null===(t=h(e))||void 0===t?void 0:t.ssmlEnabled)||!1},w=e=>{if(!h(e))return"";let t=v(e),n=y(e);return t?i(e):n?(0,u.pO)(e):""},b=e=>r[c(e)]||"",I=e=>{let{name:t,languageCode:n}=e;c(e),b(e);let[r,a]=t.replace("".concat(n,"-"),"").split("-");return"Long-Audio-Voice-".concat(a)},U=e=>{let t=h(e);return t?v(e)?t.name:y(e)?I(t):"":"Unknown Voice"},E=e=>y(e)||v(e)},93622:function(e,t,n){n.d(t,{pO:function(){return r},wh:function(){return i}});let r=e=>"https://cloud.google.com/static/text-to-speech/docs/audio/".concat(e,".wav"),a=[{id:"en-US-Casual-K",languageCode:"en-US",name:"en-US-Casual-K",gender:"m",provider:"google",ssmlEnabled:!1,quality:"premium"},{id:"en-US-Journey-D",languageCode:"en-US",name:"en-US-Journey-D",gender:"m",provider:"google",ssmlEnabled:!1,quality:"premium"},{id:"en-US-Journey-F",languageCode:"en-US",name:"en-US-Journey-F",gender:"f",provider:"google",ssmlEnabled:!1,quality:"premium"},{id:"en-US-Journey-O",languageCode:"en-US",name:"en-US-Journey-O",gender:"f",provider:"google",ssmlEnabled:!1,quality:"premium"},{id:"en-AU-Neural2-A",languageCode:"en-AU",name:"en-AU-Neural2-A",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-AU-Neural2-B",languageCode:"en-AU",name:"en-AU-Neural2-B",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-AU-Neural2-C",languageCode:"en-AU",name:"en-AU-Neural2-C",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-AU-Neural2-D",languageCode:"en-AU",name:"en-AU-Neural2-D",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-AU-News-E",languageCode:"en-AU",name:"en-AU-News-E",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-AU-News-F",languageCode:"en-AU",name:"en-AU-News-F",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-AU-News-G",languageCode:"en-AU",name:"en-AU-News-G",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-AU-Polyglot-1",languageCode:"en-AU",name:"en-AU-Polyglot-1",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-AU-Standard-A",languageCode:"en-AU",name:"en-AU-Standard-A",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-AU-Standard-B",languageCode:"en-AU",name:"en-AU-Standard-B",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-AU-Standard-C",languageCode:"en-AU",name:"en-AU-Standard-C",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-AU-Standard-D",languageCode:"en-AU",name:"en-AU-Standard-D",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-AU-Wavenet-A",languageCode:"en-AU",name:"en-AU-Wavenet-A",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-AU-Wavenet-B",languageCode:"en-AU",name:"en-AU-Wavenet-B",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-AU-Wavenet-C",languageCode:"en-AU",name:"en-AU-Wavenet-C",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-AU-Wavenet-D",languageCode:"en-AU",name:"en-AU-Wavenet-D",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-GB-Neural2-A",languageCode:"en-GB",name:"en-GB-Neural2-A",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-GB-Neural2-B",languageCode:"en-GB",name:"en-GB-Neural2-B",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-GB-Neural2-C",languageCode:"en-GB",name:"en-GB-Neural2-C",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-GB-Neural2-D",languageCode:"en-GB",name:"en-GB-Neural2-D",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-GB-Neural2-F",languageCode:"en-GB",name:"en-GB-Neural2-F",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-GB-News-G",languageCode:"en-GB",name:"en-GB-News-G",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-GB-News-H",languageCode:"en-GB",name:"en-GB-News-H",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-GB-News-I",languageCode:"en-GB",name:"en-GB-News-I",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-GB-News-J",languageCode:"en-GB",name:"en-GB-News-J",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-GB-News-K",languageCode:"en-GB",name:"en-GB-News-K",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-GB-News-L",languageCode:"en-GB",name:"en-GB-News-L",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-GB-News-M",languageCode:"en-GB",name:"en-GB-News-M",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-GB-Standard-A",languageCode:"en-GB",name:"en-GB-Standard-A",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-GB-Standard-B",languageCode:"en-GB",name:"en-GB-Standard-B",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-GB-Standard-C",languageCode:"en-GB",name:"en-GB-Standard-C",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-GB-Standard-D",languageCode:"en-GB",name:"en-GB-Standard-D",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-GB-Standard-F",languageCode:"en-GB",name:"en-GB-Standard-F",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-GB-Studio-B",languageCode:"en-GB",name:"en-GB-Studio-B",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-GB-Studio-C",languageCode:"en-GB",name:"en-GB-Studio-C",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-GB-Wavenet-A",languageCode:"en-GB",name:"en-GB-Wavenet-A",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-GB-Wavenet-B",languageCode:"en-GB",name:"en-GB-Wavenet-B",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-GB-Wavenet-C",languageCode:"en-GB",name:"en-GB-Wavenet-C",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-GB-Wavenet-D",languageCode:"en-GB",name:"en-GB-Wavenet-D",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-GB-Wavenet-F",languageCode:"en-GB",name:"en-GB-Wavenet-F",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-IN-Neural2-A",languageCode:"en-IN",name:"en-IN-Neural2-A",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-IN-Neural2-B",languageCode:"en-IN",name:"en-IN-Neural2-B",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-IN-Neural2-C",languageCode:"en-IN",name:"en-IN-Neural2-C",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-IN-Neural2-D",languageCode:"en-IN",name:"en-IN-Neural2-D",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-IN-Standard-A",languageCode:"en-IN",name:"en-IN-Standard-A",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-IN-Standard-B",languageCode:"en-IN",name:"en-IN-Standard-B",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-IN-Standard-C",languageCode:"en-IN",name:"en-IN-Standard-C",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-IN-Standard-D",languageCode:"en-IN",name:"en-IN-Standard-D",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-IN-Wavenet-A",languageCode:"en-IN",name:"en-IN-Wavenet-A",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-IN-Wavenet-B",languageCode:"en-IN",name:"en-IN-Wavenet-B",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-IN-Wavenet-C",languageCode:"en-IN",name:"en-IN-Wavenet-C",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-IN-Wavenet-D",languageCode:"en-IN",name:"en-IN-Wavenet-D",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Neural2-A",languageCode:"en-US",name:"en-US-Neural2-A",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Neural2-C",languageCode:"en-US",name:"en-US-Neural2-C",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Neural2-D",languageCode:"en-US",name:"en-US-Neural2-D",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Neural2-E",languageCode:"en-US",name:"en-US-Neural2-E",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Neural2-F",languageCode:"en-US",name:"en-US-Neural2-F",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Neural2-G",languageCode:"en-US",name:"en-US-Neural2-G",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Neural2-H",languageCode:"en-US",name:"en-US-Neural2-H",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Neural2-I",languageCode:"en-US",name:"en-US-Neural2-I",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Neural2-J",languageCode:"en-US",name:"en-US-Neural2-J",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-News-K",languageCode:"en-US",name:"en-US-News-K",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-News-L",languageCode:"en-US",name:"en-US-News-L",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-News-N",languageCode:"en-US",name:"en-US-News-N",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Polyglot-1",languageCode:"en-US",name:"en-US-Polyglot-1",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Standard-A",languageCode:"en-US",name:"en-US-Standard-A",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Standard-B",languageCode:"en-US",name:"en-US-Standard-B",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Standard-C",languageCode:"en-US",name:"en-US-Standard-C",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Standard-D",languageCode:"en-US",name:"en-US-Standard-D",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Standard-E",languageCode:"en-US",name:"en-US-Standard-E",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Standard-F",languageCode:"en-US",name:"en-US-Standard-F",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Standard-G",languageCode:"en-US",name:"en-US-Standard-G",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Standard-H",languageCode:"en-US",name:"en-US-Standard-H",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Standard-I",languageCode:"en-US",name:"en-US-Standard-I",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Standard-J",languageCode:"en-US",name:"en-US-Standard-J",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Studio-O",languageCode:"en-US",name:"en-US-Studio-O",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Studio-Q",languageCode:"en-US",name:"en-US-Studio-Q",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Wavenet-A",languageCode:"en-US",name:"en-US-Wavenet-A",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Wavenet-B",languageCode:"en-US",name:"en-US-Wavenet-B",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Wavenet-C",languageCode:"en-US",name:"en-US-Wavenet-C",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Wavenet-D",languageCode:"en-US",name:"en-US-Wavenet-D",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Wavenet-E",languageCode:"en-US",name:"en-US-Wavenet-E",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Wavenet-F",languageCode:"en-US",name:"en-US-Wavenet-F",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Wavenet-G",languageCode:"en-US",name:"en-US-Wavenet-G",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Wavenet-H",languageCode:"en-US",name:"en-US-Wavenet-H",gender:"f",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Wavenet-I",languageCode:"en-US",name:"en-US-Wavenet-I",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"},{id:"en-US-Wavenet-J",languageCode:"en-US",name:"en-US-Wavenet-J",gender:"m",provider:"google",ssmlEnabled:!1,quality:"standard"}];a.filter(e=>e.name.includes("Wavenet")),a.filter(e=>e.name.includes("Studio")),a.filter(e=>e.name.includes("Neural")),a.filter(e=>e.name.includes("News")),a.filter(e=>e.name.includes("Polyglot"));let o=a.filter(e=>e.name.includes("Journey"));a.filter(e=>e.name.includes("Standard"));let i=[...o,...a.filter(e=>e.name.includes("Casual"))]},88513:function(e,t,n){n.d(t,{AX:function(){return E},Bl:function(){return c},CP:function(){return u},KR:function(){return U},ND:function(){return q},QS:function(){return R},X1:function(){return W},_D:function(){return C},bN:function(){return T},bc:function(){return y},cT:function(){return w},cu:function(){return M},eT:function(){return L},fS:function(){return x},hO:function(){return g},jG:function(){return B},ty:function(){return P}});var r=n(29953),a=n(6607),o=n(51293);n(15087);var i=n(94960);let s=async e=>{let t={error:r.dd,text:"",warning:""};return await (0,i.a_)({input:e,endpoint:"get_text_from_url",failureResponse:t})};r.dd;let u=async e=>await s(e),l=async e=>{let t={error:r.dd,slideTranslations:[]};return await (0,i.MU)({input:e,endpoint:"translate_slides",failureResponse:t})},d=async e=>(await (0,a.Dc)(r.uR),{error:"",slideTranslations:e.slidesToTranslate.map(e=>({id:e.id,text:e.text.toUpperCase()}))}),c=async e=>o.xR?d(e):l(e),p=async e=>{let t={error:r.dd,h5pUrl:""};return await (0,i.l_)({input:e,endpoint:"generate_h5p_url",failureResponse:t})},m=async e=>(await (0,a.Dc)(r.uR),{error:"",h5pUrl:""}),g=async e=>o.xR?await m(e):await p(e),f=async e=>{let t={text:"",error:r.dd};return await (0,i.$w)({input:e,endpoint:"extract_pdf_text",failureResponse:t})},h=async e=>(await (0,a.Dc)(r.uR),{text:"This is a mock summary",error:""}),y=async e=>o.xR?h(e):f(e),v=async e=>{let t={url:"",error:r.dd};return await (0,i.$w)({input:e,endpoint:"upload_file",failureResponse:t})},S=async e=>(await (0,a.Dc)(r.uR),{url:"",error:""}),w=async e=>o.xR?S(e):v(e),b=async e=>{let t={text:"",error:r.dd,warning:""};return await (0,i.MU)({input:e,endpoint:"transcribe_audio_from_url",failureResponse:t})},I=async e=>(await (0,a.Dc)(r.uR),{text:"This is a mock transcription",warning:"",error:""}),U=async e=>o.xR?I(e):b(e),E=async e=>{let t={error:r.dd,warning:"",taskId:""};return await (0,i.MU)({input:e,endpoint:"create_unit",failureResponse:t})},x=async e=>{let t={error:r.dd,warning:"",taskId:""};return await (0,i.MU)({input:e,endpoint:"generate_template",failureResponse:t})},C=async e=>{let t={error:r.dd,quizUrl:""};return await (0,i.MU)({input:e,endpoint:"generate_google_quiz",failureResponse:t})},q=async e=>{let t={error:r.dd,url:""};return await (0,i.MU)({input:e,endpoint:"generate_google_doc",failureResponse:t})},T=async e=>{let t={error:r.dd,url:""};return await (0,i.MU)({input:e,endpoint:"generate_google_slides",failureResponse:t})},P=async e=>{let t={error:r.dd,warning:"",taskId:""};return await (0,i.MU)({input:e,endpoint:"create_lesson_update",failureResponse:t})},A=async e=>{let t={error:r.dd,vocabularyItems:[]};return await (0,i.MU)({endpoint:"generate_vocabulary_audio",method:"POST",input:e,failureResponse:t})},k=async()=>(await (0,a.Dc)(r.uR),{error:"",vocabularyItems:[]}),L=async e=>o.xR?k():A(e),N=async e=>{let t={error:r.dd,dialogueLines:[]};return await (0,i.MU)({endpoint:"generate_dialogue_audio",method:"POST",input:e,failureResponse:t})},G=async()=>(await (0,a.Dc)(r.uR),{error:"",dialogueLines:[]}),M=async e=>o.xR?G():N(e),z=async e=>(0,i.MU)({input:e,endpoint:"update_unit_in_background",failureResponse:{error:r.dd,successful:!1}}),W=async e=>z(e),j=async e=>(0,i.MU)({input:e,endpoint:"update_lesson",failureResponse:{error:r.dd,successful:!1}}),B=async e=>j(e),F=async e=>{let{options:t,...n}=e;return(0,i.$w)({input:{...n,options:JSON.stringify(t),instructions:"import-worksheet"},endpoint:"update_lesson_with_file",failureResponse:{error:r.dd,successful:!1}})},R=async e=>F(e)},15087:function(e,t,n){n.d(t,{$e:function(){return v},I8:function(){return m},Lk:function(){return U},Tm:function(){return y},gg:function(){return S},m7:function(){return h},oY:function(){return w},qW:function(){return b}});var r=n(94622),a=n(71691),o=n(90053),i=n(95303),s=n(81723),u=n(38132),l=n(29953);let d={medium:"text",url:"",title:"",textVersions:[{id:"original",title:"original",text:"This is the original version",description:"",textStats:r.P2,audioUrl:"",markdown:""},{id:"simplified",title:"simplified",text:"This is the simplified version",description:"",textStats:r.zS,audioUrl:"",markdown:""}]},c={createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()},p={id:"mock-text-unit",title:"Text Unit",type:"text",versions:d.textVersions,selectedVersionId:d.textVersions[0].id,sourceUrl:d.url,...c,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),hideText:!1},m={id:"",title:"",text:"",description:"",textStats:{},markdown:"",audioUrl:""},g={id:"mock-vocabulary-unit",title:"Vocabulary Unit",type:"vocabulary",vocabularyItems:[{definition:"The parent company of Facebook",id:"00e3e1c6-6461-11ed-9d51-acde48001122",term:"Meta",audioUrl:""},{definition:"To stop employing someone",id:"00e3e39c-6461-11ed-9d51-acde48001122",term:"lay off",audioUrl:""},{definition:"All the people employed by a particular company or organization",id:"00e3e400-6461-11ed-9d51-acde48001122",term:"workforce",audioUrl:""},{definition:"An enhanced version of reality created by the use of technology to overlay digital information on an image of something being viewed through a device",id:"00e3e43c-6461-11ed-9d51-acde48001122",term:"augmented reality",audioUrl:""}],shuffledDefinitionsOrder:[],shuffledTermsOrder:[],...c},f={id:"mock-activity-unit-1",title:"Activity Unit 1",type:"activity",content:"\n<ol>\n    <li>What is the main idea of the text?</li>\n    <li>What is the author's opinion on the topic?</li>\n    <li>What is the author's purpose in writing this text?</li>\n</ol>\n",...c};({questions:[a.P5],...c});let h={id:"",title:"Mock Lesson",description:"This is a mock lesson",authorId:"anon",visibility:"team",teamId:"",targetLevel:"B1",units:[p,g,f],createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()},y={id:"",title:"",description:"",targetLevel:"",authorId:"",visibility:"private",teamId:"",units:l.LZ,createdAt:"",updatedAt:"",saveKey:"",h5pSaveKey:"",showH5pUrl:!1,h5pUrl:""},v="ADJUST_LEVEL".concat(o.kT,"A1"),S={text:"",html:"",markdown:""},w="\nClimate change is a real and serious issue that has been caused by human activities. Since the Industrial Revolution, humans have increased their consumption of natural resources and released more greenhouse gases into the atmosphere. This has caused the Earth's temperature to increase abruptly, with 10 out of the last 13 years being the warmest on record. The increased temperature has had a number of consequences, including ocean acidification, rising sea levels, and more extreme weather events. \n\nOcean acidification is a direct result of increased dissolved CO2, and has increased by 30% since the late 18th century. This higher acid content puts calcifying species like oysters and clams at risk, and puts the entire ocean food web in danger. Sea levels have also risen, with six point seven inches in the last century and a rate that has nearly doubled in the last decade. This is due to the ocean swelling as it gets warmer, as well as the melting of glaciers and ice sheets. \n\nAlthough the consequences of climate change can be planet-threatening, there are still things we can do on a personal level to help. We can recycle and reuse things, use public transportation, turn off electronics when not in use, eat less meat and more locally grown vegetables, and spread knowledge and concerns about climate change. By doing these things, we can be part of the solution to climate change.\n".trim();(0,s.aG)("multiple-choice",{prompt:(0,u.Xt)("What has caused the Earth's temperature to increase abruptly?"),choices:[(0,u.Xt)("A decrease in greenhouse gas emissions"),(0,u.Xt)("Decreased consumption of natural resources"),(0,u.Xt)("Human activities and increased greenhouse gas emissions")],correctChoiceId:"Human activities and increased greenhouse gas emissions"}),(0,s.aG)("multiple-choice",{prompt:(0,u.Xt)("What is a consequence of ocean acidification?"),choices:[(0,u.Xt)("It lowers sea levels"),(0,u.Xt)("It puts calcifying species like oysters and clams at risk"),(0,u.Xt)("It causes a decrease in dissolved CO2")],correctChoiceId:"It puts calcifying species like oysters and clams at risk"}),(0,s.aG)("multiple-choice",{prompt:(0,u.Xt)("What is one way we can help combat climate change on a personal level?"),choices:[(0,u.Xt)("Use more electronics"),(0,u.Xt)("Increase meat consumption"),(0,u.Xt)("Use public transportation")],correctChoiceId:"Use public transportation"}),(0,s.aG)("open-ended",{prompt:(0,u.Xt)("What are some ways you can help combat climate change?")}),(0,s.aG)("open-ended",{prompt:(0,u.Xt)("What role should governments and corporations play in addressing climate change?")}),(0,s.aG)("open-ended",{prompt:(0,u.Xt)("How do you think climate change will impact future generations?")});let b="\nClimate change is a big problem. It is caused by people. People use more things from nature and make more gases. This makes the Earth hotter. The last 13 years have been very warm. The hot Earth makes the ocean more acid, the sea level go up, and the weather change a lot.\n\nThe ocean is more acid because of more CO2. This started in the 18th century. The acid is bad for animals like oysters and clams. It is also bad for all ocean animals. The sea level has gone up a lot. This is because the ocean gets bigger when it is warm. It is also because ice is melting.\n\nWe can do things to help stop climate change. We can use things again, take buses and trains, turn off things we don't use, eat less meat and more vegetables from close by, and tell people about climate change. If we do these things, we can help fix climate change.\n".trim(),I=[{id:"amy",name:"Amy",imageUrl:"https://storage.googleapis.com/roshi-assets/dialogue-avatars/amy.png",voice:"alloy",gender:"f"},{id:"oscar",name:"Oscar",imageUrl:"https://storage.googleapis.com/roshi-assets/dialogue-avatars/oscar.png",voice:"onyx",gender:"m"},{id:"nina",name:"Nina",imageUrl:"https://storage.googleapis.com/roshi-assets/dialogue-avatars/nina.png",voice:"nova",gender:"f"},{id:"edward",name:"Edward",imageUrl:"https://storage.googleapis.com/roshi-assets/dialogue-avatars/edward.png",voice:"echo",gender:"m"},{id:"fiona",name:"Fiona",imageUrl:"https://storage.googleapis.com/roshi-assets/dialogue-avatars/fiona.png",voice:"fable",gender:"f"},{id:"sam",name:"Sam",imageUrl:"https://storage.googleapis.com/roshi-assets/dialogue-avatars/sam.png",voice:"shimmer",gender:"f"}],U={id:"mock-dialogue-unit",type:"dialogue",title:"",description:"",createdAt:"2023-04-20T14:39:25.713Z",updatedAt:"2023-04-20T14:39:25.713Z",speakers:I.slice(0,2),lines:[{id:"mock-line-1",speakerId:I[0].id,message:{id:"mock-message-1",text:"Hi, how are you?",audioUrl:""},alignment:"left"},{id:"mock-line-2",speakerId:I[1].id,message:{id:"mock-message-2",text:"I'm great, thanks for asking.",audioUrl:""},alignment:"right"}],hideText:!1};I[0].id,I[1].id,I[0].id,I[1].id,I[0].id,I[1].id,(0,i.bs)({text:"Once upon a time, there was a curious raccoon named Roxy who lived in the forest.",translation:{language:"es",text:"\xc9rase una vez una curiosa mapache llamada Roxy que viv\xeda en el bosque."},sourceUrl:"https://firebasestorage.googleapis.com/v0/b/roshi-dev.appspot.com/o/files%2F5d836f0f-3549-4391-ab91-74e3b17b8de7?alt=media&token=81b0bcf5-5905-4cb9-8a5b-a6be58c32bc5"}),(0,i.bs)({text:"One day, Roxy found a plastic bottle in the forest and was curious about what it was.",translation:{language:"es",text:"Un d\xeda, Roxy encontr\xf3 una botella de pl\xe1stico en el bosque y sinti\xf3 curiosidad por saber qu\xe9 era."},sourceUrl:"https://firebasestorage.googleapis.com/v0/b/roshi-dev.appspot.com/o/files%2Ff2629ffa-e122-40fe-8dd8-1474e7479199?alt=media&token=8ddd91ba-d0e4-430c-b3f3-8a41c901a887"}),(0,i.bs)({text:"Roxy asked her friends what it was, and they told her it was trash and that it should be recycled.",translation:{language:"es",text:"Roxy pregunt\xf3 a sus amigas qu\xe9 era y le dijeron que era basura y que deb\xeda reciclarse."},sourceUrl:"https://firebasestorage.googleapis.com/v0/b/roshi-dev.appspot.com/o/files%2Fca1e91f2-72d0-4cd6-9b51-456f8547a5e5?alt=media&token=53c61d06-e0b8-4ac2-8b43-a35c676ae469"}),["Simile","Metaphor","Personification","Hyperbole","Onomatopoeia"].map(e=>({id:e,text:e,audioUrl:""})),(0,u.Xt)("Choose the correct answer to indicate the type of figurative language given in each sentence.")},97281:function(e,t,n){n.d(t,{OL:function(){return e7},pV:function(){return tO},zv:function(){return ey},sQ:function(){return Y},X0:function(){return eF},MC:function(){return t3},t5:function(){return tg},CE:function(){return eK},yx:function(){return tP},mc:function(){return tH},LJ:function(){return tu},BB:function(){return e5},JC:function(){return tc},gt:function(){return tT},uL:function(){return tz},TG:function(){return tk},_N:function(){return eG},JA:function(){return tJ},nD:function(){return ew},sA:function(){return eA},Uj:function(){return eW},kq:function(){return eL},ZR:function(){return eV},By:function(){return to},lb:function(){return eE},ZP:function(){return no},OB:function(){return et},GZ:function(){return ee},xm:function(){return ef},tB:function(){return eh},rO:function(){return O},Fe:function(){return W},LL:function(){return ep},Rs:function(){return B},HT:function(){return _},GA:function(){return eu},Uc:function(){return eU},wq:function(){return eI},tv:function(){return J},cs:function(){return eq},SH:function(){return ea},Rq:function(){return M},pq:function(){return tW},Jx:function(){return tU},zT:function(){return tE},bU:function(){return eS},J1:function(){return e8},LP:function(){return eO},K6:function(){return tl},VX:function(){return tG},iX:function(){return eb},nI:function(){return $},oK:function(){return te},t_:function(){return tp},bQ:function(){return eB},b:function(){return ne},ZJ:function(){return nt},w5:function(){return t9},O8:function(){return t4},jp:function(){return e6},sx:function(){return eJ},tc:function(){return eY},i$:function(){return e$},YH:function(){return na},jE:function(){return t7},Xb:function(){return tK},Wj:function(){return ti},dJ:function(){return t6},Kv:function(){return ts},fL:function(){return e2},BH:function(){return t8},fZ:function(){return tq},Zr:function(){return tL},kx:function(){return tN},d9:function(){return tA},VH:function(){return tv},ux:function(){return eN},gQ:function(){return tS},GY:function(){return t0},lx:function(){return eZ},CK:function(){return tD},Qm:function(){return eX},Os:function(){return t5},F4:function(){return e1},fi:function(){return eP},b3:function(){return eR},Fv:function(){return tb},mW:function(){return eM},Od:function(){return tj},dv:function(){return tC},ot:function(){return ek},uW:function(){return e_},T4:function(){return ta},t3:function(){return tw},_1:function(){return tX},rD:function(){return tt},Zb:function(){return R},mt:function(){return eg},rr:function(){return er},vk:function(){return en},SR:function(){return e0},qv:function(){return e9},WX:function(){return eC},eB:function(){return eH},pk:function(){return tR},QE:function(){return ex},bH:function(){return ei},IS:function(){return eo}});var r=n(42638),a=n(42935),o=n(85287),i=n(54998),s=n(94622),u=n(6607),l=n(29953),d=n(51293),c=n(94960);let p=async e=>{let{text:t,userId:n,vocabCefrLevel:r,isMarkdown:a}=e;return await (0,c.l_)({input:{text:t,user_id:n,vocabCefrLevel:r,isMarkdown:a},endpoint:"analyze_text",failureResponse:{text_stats:{},error:"Failed to analyze text",userId:n},method:"POST"})},m=async()=>(await (0,u.Dc)(l.uR),s.AE),g=async e=>{if(d.xR)return await m();let t=await p(e);return{text_stats:t.text_stats,error:t.error,userId:e.userId}};n(69584),n(51294);var f=n(71691);let h=async e=>{let t={error:l.dd,imageUrl:""};return await (0,c.MU)({input:e,endpoint:"generate_image",failureResponse:t})},y=async()=>(await (0,u.Dc)(l.uR),{error:"",imageUrl:"https://images.ctfassets.net/cnu0m8re1exe/5Tvq3ZONr0ulzblJtrdcGd/e0ec47b7e483b298a45f9b4c6b968fb1/shutterstock_353816774.jpg"}),v=async e=>d.xR?y():h(e),S=async e=>{let t={error:l.dd,audioUrl:""};return await (0,c.MU)({endpoint:"generate_speech_from_text",method:"POST",input:e,failureResponse:t})},w=async()=>(await (0,u.Dc)(l.uR),{error:"",audioUrl:f.H6}),b=async e=>d.xR?w():S(e);var I=n(86319),U=n(33776),E=n(90053),x=n(88513),C=n(15087),q=n(11831),T=n(95303),P=n(56063),A=n(49003),k=n(22871);let L={...d.w1?C.m7:C.Tm,unitAssistantOptions:null,lessonUpdateTask:null,autoUpdatesEnabled:!1,elementToScrollIntoViewId:"",suggestions:[],unitContentInitializer:null,lessonContentInitializer:null,lessonStyles:{},selectedVoice:E.jB,lessonCreatorSelectedSection:"info",pdfImported:!1,startingTextGenerated:!1,lessonGenerationContextInput:null,lessonGenerationVocabInput:A.Kt,lessonGenerationActivityInputs:A.X5,isLessonGenerationComplete:!0,unitPendingUpdateId:"",lessonCreatorTextView:"selection",editorTab:"editor",selectedUnitId:"",errorMessage:"",warningMessage:"",infoMessage:"",editorMode:"interactive",lessonGenerationStatus:"not-started",userLessons:[],teamLessons:[],modificationTemplate:"ADJUST_LEVEL",miscQueryStatus:"not-started",inputContent:C.gg,outputContent:C.gg,isFurtherModified:!1,inputTextStats:{},modifiedTextStats:{},textModificationStatus:"not-started",textModificationInstructions:C.$e,vocabCefrLevel:i.QH,textAnalysisStatus:"not-started",vocabularyGeneratorStatus:"not-started",statusMessage:"",timerStatus:"stopped",currentTime:Date.now(),timerDuration:i.rS,timerExpireTime:null,timerStartedTime:null,timerStoppedTime:null,h5pUrl:"",mediaGenerationStatus:"not-started",storyGenerationStatus:"not-started",translationStatus:"not-started",h5pGenerationStatus:"not-started",pdfSummarizationStatus:"not-started",isAnswerKeyEnabled:!0,isReferredFromPlugin:!1,inputSourceType:"text",inputSkipModification:!0,inputSourceUrl:"",isListeningForUpdates:!0,templateTask:null},N=(e,t)=>{let{rootState:n,...r}=t,a=(0,u.Fp)({...r,...n?(0,P.Obx)(n):{}});(0,U.Kz)(e,a)},G="lessonEditor/modifyTextStream",M=(0,r.hg)(G,async e=>(N((0,a.xr)(G),e),e)),z="lessonEditor/formatDocumentTextStream",W=(0,r.hg)(z,async e=>(N((0,a.xr)(z),e),e)),j="lessonEditor/generateCanvasStream",B=(0,r.hg)(j,async e=>(N((0,a.xr)(j),e),e)),F="lessonEditor/transcribeAudioAsync",R=(0,r.hg)(F,async(e,t)=>{let{getState:n,rejectWithValue:r}=t,a=await (0,x.KR)(e),o=n();return a.text?{...a,rootState:o}:r({text:"",warning:"",error:(null==a?void 0:a.error)||"Failed to save audio",rootState:o})}),D="lessonEditor/extractPdfText",O=(0,r.hg)(D,async(e,t)=>{var n;let{rejectWithValue:r,getState:a}=t,o=await (0,x.bc)(e),i=a();return(null==o?void 0:null===(n=o.text)||void 0===n?void 0:n.trim())?{...o,rootState:i}:r({...o,rootState:i})}),Q="lessonEditor/generateH5P",_=(0,r.hg)(Q,async(e,t)=>{let{rejectWithValue:n,getState:r}=t,a=await (0,x.hO)(e),o=r();return(null==a?void 0:a.h5pUrl)?{...a,rootState:o}:n({...a,rootState:o})}),V="lessonEditor/modifyLessonText",J=(0,r.hg)(V,async(e,t)=>{let{rejectWithValue:n,getState:r}=t,a=await (0,x.CP)(e),o=r();return a.text?{...a,rootState:o}:n({...a,rootState:o})}),K="lessonEditor/analyzeLessonText",H=(0,r.hg)(K,async(e,t)=>{let{rejectWithValue:n,getState:r}=t,a=await g(e),o=r();return!a.text_stats||(0,u.Qr)(a.text_stats)?n({...a,rootState:o}):{...a,rootState:o}}),X="lessonEditor/analyzeTextVersionAsync",Y=(0,r.hg)(X,async(e,t)=>{let{rejectWithValue:n,getState:r}=t,a=await g({...e}),o=r();return!a.text_stats||(0,u.Qr)(a.text_stats)?n({...a,rootState:o}):{...a,rootState:o}}),$=(0,r.hg)("lessonEditor/saveNewLesson",async(e,t)=>{let{rejectWithValue:n,getState:r,dispatch:a}=t,o=(0,u.Ox)(),i=await (0,q.P6)(o,{...e,id:o}),s=r();if((0,P.Ck)(s),!i.lesson)return n({...i,rootState:s});let l=i.lesson.id;return(0,u.vr)("".concat(E.vC,"=").concat(l)),{...i,rootState:s}}),Z="lessonEditor/deleteSavedLesson",ee=(0,r.hg)(Z,async(e,t)=>{let{rejectWithValue:n,dispatch:r,getState:a}=t,o=await (0,q.Ry)(e),i=a();return o.id?{...o,rootState:i}:n({...o,rootState:i})}),et=(0,r.hg)("lessonEditor/deleteCurrentLessonAndResetEditor",async(e,t)=>{let{dispatch:n,getState:r}=t,a=r(),o=(0,P.EoL)(a);o&&(n(tl()),await n(ee(o))),(0,u.Ie)()}),en=(0,r.hg)("lessonEditor/updateLessonAsync",async(e,t)=>{let{rejectWithValue:n,getState:r,dispatch:a}=t,{update:i,saveNewKey:s,userId:u,lessonId:l}=e,d=r(),c=(0,o.c7)(d);if(c!==u)return n({success:!1,newSaveKey:"",error:"You are not authorized to update this lesson",rootState:d});let p=await (0,q.sI)({...e,lessonId:l,userId:c});return(d=r(),p.success)?{...p,rootState:d}:n({...p,rootState:d})}),er=(0,r.hg)("lessonEditor/updateCurrentLessonAsync",async(e,t)=>{var n;let{rejectWithValue:r,getState:a,dispatch:i}=t,s=a(),u=(0,o.c7)(s),l=(0,P.EoL)(s);if(u!==(0,P.N43)(s).authorId)return r({success:!1,newSaveKey:"",error:"You are not authorized to update this lesson",rootState:s});let d=await i(en({...e,lessonId:l,userId:u}));if("fulfilled"===d.meta.requestStatus&&(null==d?void 0:null===(n=d.payload)||void 0===n?void 0:n.success)){let{payload:e}=d;return{...e,rootState:s}}return{success:!1,newSaveKey:"",error:"Failed to update lesson",rootState:s}}),ea=(0,r.hg)("lessonEditor/loadSavedLesson",async(e,t)=>{let{rejectWithValue:n,getState:r}=t,a=await (0,q.G7)(e),o=r();return a.lesson?{...a,rootState:o}:n({...a,rootState:o})}),eo=(0,r.hg)("lessonEditor/uploadFileAsync",async(e,t)=>{let{getState:n,rejectWithValue:r}=t,a=(0,o.$m)(n()),i=(0,k.VO)(e),s=await (0,x.cT)({file:e,category:i,aspectRatio:"images"===i?"1:1":"",...a}),u=n();return s.url?{...s,rootState:u}:r({url:"",error:(null==s?void 0:s.error)||"Failed to save file",rootState:u})}),ei=(0,r.hg)("lessonEditor/uploadDocumentAsync",async(e,t)=>{let{getState:n,rejectWithValue:r}=t,a=(0,o.$m)(n()),i=(0,k.VO)(e),s=await (0,x.cT)({file:e,category:i,...a}),u=n();return s.url?{...s,rootState:u}:r({url:"",error:(null==s?void 0:s.error)||"Failed to save file",rootState:u})}),es="lessonEditor/generateImageAsync",eu=(0,r.hg)(es,async e=>await v(e)),el="lessonEditor/generateVocabularyListAudioAsync",ed=(0,r.hg)(el,async(e,t)=>{let{getState:n,rejectWithValue:r,dispatch:a}=t,o=await (0,x.eT)(e),i=n();return o.vocabularyItems.length?{...o,rootState:i}:r({vocabularyItems:[],error:(null==o?void 0:o.error)||"Failed to generate audio",rootState:i})});(0,r.hg)("lessonEditor/generateDialogueAudioAsync",async(e,t)=>{let{getState:n,rejectWithValue:r,dispatch:a}=t,o=await (0,x.cu)(e),i=n();return o.dialogueLines.length?{...o,rootState:i}:r({dialogueLines:[],error:(null==o?void 0:o.error)||"Failed to generate audio",rootState:i})});let ec="lessonEditor/generateAudioAsync",ep=(0,r.hg)(ec,async(e,t)=>{let{getState:n,rejectWithValue:r,dispatch:a}=t;a(ta(e.unitId));let o=await b(e),i=n();return o.audioUrl?{...o,rootState:i}:r({audioUrl:"",error:(null==o?void 0:o.error)||"Failed to generate audio",rootState:i})}),em="lessonEditor/translateSlidesAsync",eg=(0,r.hg)(em,async(e,t)=>{let{rejectWithValue:n,getState:r}=t,a=await (0,x.Bl)(e),o=r();return a.slideTranslations.length?{...a,rootState:o}:n({slideTranslations:[],error:(null==a?void 0:a.error)||"Failed to translate slides",rootState:o})}),ef=(0,r.hg)("lessonEditor/deleteUnitAsync",async(e,t)=>{let{getState:n,dispatch:r}=t;await r(tQ(e));let a=n(),i=(0,o.c7)(a),s=(0,P.N43)(a),u=s.authorId;if((0,P.NEW)(a)&&i===u){let{units:e,authorId:t,id:n}=s;r(en({update:{units:e},lessonId:n,saveNewKey:!1,userId:t}))}}),eh=(0,r.hg)("lessonEditor/duplicateUnitAsync",async(e,t)=>{let{getState:n,dispatch:r}=t;await r(t_(e));let a=n(),i=(0,o.c7)(a),s=(0,P.N43)(a),u=s.authorId;if((0,P.NEW)(a)&&i===u){let{units:e,authorId:t,id:n}=s;r(en({update:{units:e},lessonId:n,saveNewKey:!1,userId:t}))}});(0,r.hg)("lessonEditor/disableAutoUpdatesAsync",async(e,t)=>{let{dispatch:n}=t;n(ej(!0)),await (0,u.Dc)(e),n(ej(!1))});let ey=(0,r.hg)("lessonEditor/addUnitAsync",async(e,t)=>{let{getState:n,dispatch:r}=t;await r(tO(e));let a=n(),i=(0,o.c7)(a),s=(0,P.N43)(a),u=s.authorId;if((0,P.NEW)(a)&&i===u){let{units:e,authorId:t,id:n}=s;r(en({update:{units:e},lessonId:n,saveNewKey:!1,userId:t}))}}),ev="lessonEditor/rearrangeUnitAsync",eS=(0,r.hg)(ev,async(e,t)=>{let{getState:n,dispatch:r}=t;await r(tV(e));let a=n(),i=(0,o.c7)(a),s=(0,P.N43)(a),u=s.authorId;if((0,P.NEW)(a)&&i===u){let{units:e,authorId:t,id:n}=s;r(en({update:{units:e},lessonId:n,saveNewKey:!1,userId:t}))}}),ew=(0,r.hg)(ev,async(e,t)=>{let{getState:n,dispatch:r}=t;await r(tu());let a=n(),i=(0,o.c7)(a),s=(0,P.N43)(a),u=s.authorId;if((0,P.NEW)(a)&&i===u){let{units:e,authorId:t,id:n}=s;r(en({update:{statusUpdate:null},lessonId:n,saveNewKey:!1,userId:t}))}}),eb=(0,r.hg)("lessonEditor/saveLessonAsync",async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{getState:t,dispatch:n}=arguments.length>1?arguments[1]:void 0,r=t(),a=(0,o.Qb)(r),i=(0,P.zfd)(r);if(!a||i)return;let s=(0,P.NEW)(r),u=(0,P.avg)(r);if(s&&u){let e=(0,P.N43)(r),{id:t,authorId:a}=e;await n(en({lessonId:t,update:e,saveNewKey:!1,userId:a}))}else{let t=(0,P.JFE)(r);await n($({...t,...e}))}}),eI=(0,r.hg)("lessonEditor/generateUnitAsync",async(e,t)=>{let{dispatch:n,rejectWithValue:r}=t,a=await (0,x.AX)(e);return a.taskId?(n(ta(e.unitId)),a):r({taskId:"",error:a.error,warning:""})}),eU=(0,r.hg)("lessonEditor/generateTemplateAsync",async(e,t)=>{let{dispatch:n,rejectWithValue:r}=t,a=await (0,x.fS)(e);return a.taskId?a:r({taskId:"",error:a.error,warning:""})}),eE=(0,r.hg)("lessonEditor/createLessonUpdateTaskAsync",async(e,t)=>{let{rejectWithValue:n}=t,r=await (0,x.ty)(e);return r.taskId?r:n({taskId:"",error:r.error,warning:""})}),ex=(0,r.hg)("lessonEditor/updateUnitInBackgroundAsync",async(e,t)=>{let{dispatch:n}=t,r=await (0,x.X1)(e);return n(ta(e.unitId)),r}),eC=(0,r.hg)("lessonEditor/updateLessonInBAckgroundAsync",async(e,t)=>{let{dispatch:n}=t;return await (0,x.jG)(e)}),eq=(0,r.hg)("lessonEditor/importWorksheetAsync",async(e,t)=>{let{dispatch:n}=t;return await (0,x.QS)(e)});(0,r.hg)("lessonEditor/muteRemoteUpdatesAsync",async(e,t)=>{let{dispatch:n}=t;n(nr(!1)),await (0,u.Dc)(e),n(nr(!0))});let eT=(0,r.oM)({name:"lessonEditor",initialState:L,reducers:{setStatusUpdate:(e,t)=>{e.statusUpdate=t.payload},clearStatusUpdate:e=>{e.statusUpdate=null},setUnitAssistantOptions:(e,t)=>{e.unitAssistantOptions=t.payload},clearUnitAssistantOptions:e=>{e.unitAssistantOptions=null},setLessonUpdateTask:(e,t)=>{e.lessonUpdateTask=t.payload},clearLessonUpdateTask:e=>{e.lessonUpdateTask=null},setTemplateTask:(e,t)=>{e.templateTask=t.payload},updateTemplateTask:(e,t)=>{e.templateTask&&(e.templateTask={...e.templateTask,...t.payload})},clearTemplateTask:e=>{e.templateTask=null},setAutoUpdatesEnabled:(e,t)=>{e.autoUpdatesEnabled=t.payload},setElementToScrollIntoViewId:(e,t)=>{e.elementToScrollIntoViewId=t.payload},clearElementToScrollIntoViewId:e=>{e.elementToScrollIntoViewId=""},updateLessonStyles:(e,t)=>{e.lessonStyles={...e.lessonStyles,...t.payload}},setSuggestions:(e,t)=>{e.suggestions=t.payload},clearSuggestions:e=>{e.suggestions=[]},removeSuggestionByUnitType:(e,t)=>{e.suggestions=e.suggestions.filter(e=>e.unitType!==t.payload)},addSuggestion:(e,t)=>{e.suggestions=[...e.suggestions,t.payload]},setUnitContentInitializer:(e,t)=>{e.unitContentInitializer=t.payload},clearUnitContentInitializer:e=>{e.unitContentInitializer=null},setLessonContentInitializer:(e,t)=>{e.lessonContentInitializer=t.payload},clearLessonContentInitializer:e=>{e.lessonContentInitializer=null},setSelectedVoice:(e,t)=>{e.selectedVoice=t.payload},setLessonCreatorSelectedSection:(e,t)=>{e.lessonCreatorSelectedSection=t.payload},setLessonCreatorTextView:(e,t)=>{e.lessonCreatorTextView=t.payload},setPdfImported:(e,t)=>{e.pdfImported=t.payload},setStartingTextGenerated:(e,t)=>{e.startingTextGenerated=t.payload},updateLessonGenerationContextInput:(e,t)=>{e.lessonGenerationContextInput&&(e.lessonGenerationContextInput={...e.lessonGenerationContextInput,...t.payload})},setLessonGenerationContextInput:(e,t)=>{e.lessonGenerationContextInput=t.payload},clearLessonGenerationContextInput:e=>{e.lessonGenerationContextInput=null},clearLessonGenerationContextInputText:e=>{e.lessonGenerationContextInput&&(e.lessonGenerationContextInput.payload.text="")},updateLessonGenerationVocabInput:(e,t)=>{e.lessonGenerationVocabInput={...e.lessonGenerationVocabInput,...t.payload}},setLessonActivityInputs:(e,t)=>{e.lessonGenerationActivityInputs=t.payload},addLessonGenerationActivityInput:(e,t)=>{e.lessonGenerationActivityInputs=[...e.lessonGenerationActivityInputs,t.payload]},removeLessonGenerationActivityInput:(e,t)=>{e.lessonGenerationActivityInputs=e.lessonGenerationActivityInputs.filter(e=>e.id!==t.payload)},clearLessonGenerationActivityInputs:e=>{e.lessonGenerationActivityInputs=[]},updateLessonGenerationActivityInput:(e,t)=>{e.lessonGenerationActivityInputs=e.lessonGenerationActivityInputs.map(e=>e.id===t.payload.id?{...e,...t.payload}:e)},toggleLessonGenerationActivityAudio:(e,t)=>{e.lessonGenerationActivityInputs=e.lessonGenerationActivityInputs.map(e=>({...e,includeAudio:t.payload}))},selectLessonGenerationActivitiesAudioVoice:(e,t)=>{e.lessonGenerationActivityInputs=e.lessonGenerationActivityInputs.map(e=>({...e,voice:t.payload}))},loadLessonTemplate:(e,t)=>{let{text:n,vocabulary:r,activities:a}=t.payload;e.lessonGenerationContextInput=n,e.lessonGenerationVocabInput=r,e.lessonGenerationActivityInputs=a},setLessonGenerationStatus:(e,t)=>{e.lessonGenerationStatus=t.payload},setLessonEditorTab:(e,t)=>{e.editorTab=t.payload},setH5PDownloadUrl:(e,t)=>{e.h5pUrl=t.payload},clearH5PDownloadUrl:e=>{e.h5pUrl=""},setUnitPendingUpdateId:(e,t)=>{e.unitPendingUpdateId=t.payload},clearUnitPendingUpdateId:e=>{e.unitPendingUpdateId=""},setEditorMode:(e,t)=>{e.editorMode=t.payload},setLessonErrorMessage:(e,t)=>{e.errorMessage=t.payload},setLessonWarningMessage:(e,t)=>{e.warningMessage=t.payload},clearLessonErrorMessage:e=>{e.errorMessage="",e.miscQueryStatus="not-started",e.vocabularyGeneratorStatus="not-started",e.textModificationStatus="not-started",e.lessonGenerationStatus="not-started",e.textModificationStatus="not-started",e.h5pGenerationStatus="not-started",e.warningMessage="",e.statusMessage="",e.unitPendingUpdateId="",e.statusUpdate=null},setLessonInfoMessage:(e,t)=>{e.infoMessage=t.payload},clearLessonInfoMessage:e=>{e.infoMessage=""},openNewLesson:e=>({...e,...C.Tm}),setShowH5pUrl:(e,t)=>{e.showH5pUrl=t.payload},setLessonTitle:(e,t)=>{e.title=t.payload},setLessonTeamId:(e,t)=>{e.teamId=t.payload},setLessonAuthorId:(e,t)=>{e.authorId=t.payload},setLessonVisibility:(e,t)=>{e.visibility=t.payload},setUserLessons:(e,t)=>{e.userLessons=t.payload},setTeamLessons:(e,t)=>{e.teamLessons=t.payload},setLessonDetails:(e,t)=>{e.details=t.payload},openSavedLesson:(e,t)=>({...e,...t.payload,miscQueryStatus:"successful"}),openUpdatedLesson:(e,t)=>{let n=t.payload,{units:r,saveKey:a,statusUpdate:o,template:i=null,details:s={}}=e,{units:u,saveKey:l,statusUpdate:d,template:c=null,details:p={}}=n,m={updatedAt:n.updatedAt,saveKey:n.saveKey||a},g=JSON.stringify(r)!==JSON.stringify(u),f=JSON.stringify(o)!==JSON.stringify(d),h=JSON.stringify(i)!==JSON.stringify(c);JSON.stringify(s)!==JSON.stringify(p)&&(m.details=p),h&&(m.template=c),f&&(m.statusUpdate=d,(null==o?void 0:o.unitId)&&!(null==d?void 0:d.unitId)&&(m.unitPendingUpdateId=""));let y=e.title!==n.title;return(null==l?void 0:l.includes("meta"))||(g&&(m.units=u),y&&(m.title=n.title)),{...e,...m,miscQueryStatus:"successful"}},setLessonSaveKey:(e,t)=>{e.saveKey=t.payload},setIsLessonGenerationComplete:(e,t)=>{e.isLessonGenerationComplete=t.payload},setTextModificationStatus:(e,t)=>{e.textModificationStatus=t.payload},moveOutputToInput:e=>{let{outputContent:t,modifiedTextStats:n}=e;e.inputContent=t,e.outputContent=C.gg,e.inputTextStats=n,e.modifiedTextStats={}},setLessonInputContent:(e,t)=>{e.inputContent=t.payload},clearLessonInputContent:e=>{e.inputContent=C.gg},clearLessonCurrentTextStats:e=>{},setLessonOutputContent:(e,t)=>{e.outputContent=t.payload},clearLessonOutputContent:e=>{e.outputContent=C.gg},setLessonInputTextStats:(e,t)=>{(0,u.Qr)(e.inputTextStats)&&(e.inputTextStats=t.payload)},setLessonModifiedTextStats:(e,t)=>{e.modifiedTextStats=t.payload},clearLessonTextStats:e=>{e.inputTextStats={},e.modifiedTextStats={}},resetLessonModification:e=>{e.inputTextStats={},e.modifiedTextStats={},e.outputContent=C.gg,e.isFurtherModified=!1,e.textModificationStatus="not-started",e.errorMessage=""},clearLessonModification:e=>{e.inputTextStats={},e.modifiedTextStats={},e.outputContent=C.gg,e.isFurtherModified=!1,e.textModificationStatus="not-started",e.errorMessage="",e.inputContent=C.gg},setTextModificationInstructions:(e,t)=>{e.textModificationInstructions=t.payload},clearTextModificationInstructions:e=>{e.textModificationInstructions=""},setLessonVocabularyGenerationStatus:(e,t)=>{e.vocabularyGeneratorStatus=t.payload},setSelectedUnitId:(e,t)=>{e.selectedUnitId=t.payload},clearSelectedUnitId:e=>{e.selectedUnitId=""},updateLessonUnit:(e,t)=>{(0,T.iW)(e,t.payload)},addLessonUnit:(e,t)=>{(0,T.R6)(e,t.payload)},deleteLessonUnit:(e,t)=>{(0,T.hj)(e,t.payload)},duplicateLessonUnit:(e,t)=>{(0,T.x6)(e,t.payload)},rearrangeLessonUnit:(e,t)=>{(0,T.MT)(e,t.payload)},setLessonEditorStatusMessage:(e,t)=>{e.statusMessage=t.payload},setLessonEditorErrorMessage:(e,t)=>{e.errorMessage=t.payload},setLessonEditorWarningMessage:(e,t)=>{e.warningMessage=t.payload},clearLessonEditorStatusMessage:e=>{e.statusMessage=""},clearLessonEditorTimer:e=>{e.timerStatus="stopped";let t=Date.now();e.currentTime=t,e.timerExpireTime=null,e.timerStartedTime=null,e.timerStoppedTime=null},stopLessonEditorTimer:e=>{e.timerStatus="stopped"},startLessonEditorTimer:e=>{let t=Date.now();e.timerStatus="running",e.currentTime=t,e.timerExpireTime=t+1e3*(e.timerDuration||I.WS),e.timerStartedTime=null,e.timerStoppedTime=null},tickLessonEditorTimer:e=>{},setMediaGenerationStatus:(e,t)=>{e.mediaGenerationStatus=t.payload},setTranslationStatus:(e,t)=>{e.translationStatus=t.payload},setIsAnswerKeyEnabled:(e,t)=>{e.isAnswerKeyEnabled=t.payload},clearLesson:e=>({...e,...C.Tm,mediaGenerationStatus:"not-started",storyGenerationStatus:"not-started",lessonGenerationStatus:"not-started",textModificationStatus:"not-started",miscQueryStatus:"not-started",activityGeneratorStatus:"not-started",vocabularyGeneratorStatus:"not-started",textAnalysisStatus:"not-started"}),setIsReferredFromPlugin:(e,t)=>{e.isReferredFromPlugin=t.payload},setInputSourceType:(e,t)=>{e.inputSourceType=t.payload},setInputSkipModification:(e,t)=>{e.inputSkipModification=t.payload},setInputSourceUrl:(e,t)=>{e.inputSourceUrl=t.payload},setIsListeningForUpdates:(e,t)=>{e.isListeningForUpdates=t.payload},resetLessonEditorState:e=>((0,u.Ie)(),{...L,userLessons:e.userLessons,teamLessons:e.teamLessons,editorMode:"edit"})},extraReducers:e=>{e.addCase(J.pending,(e,t)=>{e.textModificationStatus="pending",N((0,a.xr)(V),t.meta.arg)}).addCase(J.rejected,(e,t)=>{e.textModificationStatus="failed";let{error:n="",warning:r=""}=(null==t?void 0:t.payload)||{};r&&(e.warningMessage=r),n&&(e.errorMessage=n),N((0,a.Kq)(V),{...t.meta.arg,error:n})}).addCase(J.fulfilled,(e,t)=>{e.textModificationStatus="successful",e.errorMessage="",N((0,a.wV)(V),{...t.meta.arg,...t.payload})}).addCase(H.pending,(e,t)=>{e.textAnalysisStatus="pending",N((0,a.xr)(K),t.meta.arg)}).addCase(H.rejected,(e,t)=>{var n;e.textAnalysisStatus="failed";let r=(null==t?void 0:null===(n=t.payload)||void 0===n?void 0:n.error)||"Something went wrong";e.errorMessage=r,N((0,a.Kq)(K),{...t.meta.arg,error:r})}).addCase(H.fulfilled,(e,t)=>{e.textAnalysisStatus="successful";let{text_stats:n}=t.payload;e.inputTextStats=n,e.errorMessage="",N((0,a.wV)(K),{...t.meta.arg,...t.payload})}).addCase(Y.pending,(e,t)=>{N((0,a.xr)(X),t.meta.arg)}).addCase(Y.rejected,(e,t)=>{var n;let r=(null==t?void 0:null===(n=t.payload)||void 0===n?void 0:n.error)||"Something went wrong";e.textAnalysisStatus="successful",e.errorMessage="",N((0,a.Kq)(X),{...t.meta.arg,error:r})}).addCase(Y.fulfilled,(e,t)=>{e.textAnalysisStatus="successful",e.errorMessage="";let{unitId:n}=t.meta.arg;N((0,a.wV)(X),{...t.meta.arg,...t.payload})}).addCase($.pending,(e,t)=>{e.miscQueryStatus="pending"}).addCase($.rejected,(e,t)=>{var n;e.miscQueryStatus="failed";let r=(null==t?void 0:null===(n=t.payload)||void 0===n?void 0:n.error)||"Something went wrong";e.errorMessage=r}).addCase($.fulfilled,(e,t)=>{let{lesson:n}=t.payload,r=[...e.userLessons];return n&&r.push(n),{...e,...n,miscQueryStatus:"successful",userLessons:r,errorMessage:"",infoMessage:"Activity Saved",editorMode:"edit",editorTab:"editor"}}).addCase(en.pending,(e,t)=>{e.miscQueryStatus="pending"}).addCase(en.rejected,(e,t)=>{var n;e.miscQueryStatus="failed";let r=(null==t?void 0:null===(n=t.payload)||void 0===n?void 0:n.error)||"Something went wrong";e.errorMessage=r}).addCase(en.fulfilled,(e,t)=>{let{update:n,lessonId:r}=t.meta.arg,a=e.userLessons.map(e=>e.id===r?{...e,...n}:e);return{...e,...n,userLessons:a,errorMessage:"",infoMessage:"Changes Saved",miscQueryStatus:"successful"}}).addCase(ee.pending,(e,t)=>{e.miscQueryStatus="pending",N((0,a.xr)(Z),{lessonId:t.meta.arg})}).addCase(ee.rejected,(e,t)=>{var n,r;e.miscQueryStatus="failed";let o=(null==t?void 0:null===(n=t.payload)||void 0===n?void 0:n.error)||"Something went wrong";e.errorMessage=o,N((0,a.Kq)(Z),{lessonId:t.meta.arg,error:(null==t?void 0:null===(r=t.payload)||void 0===r?void 0:r.error)||"Something went wrong"})}).addCase(ee.fulfilled,(e,t)=>{let{id:n}=t.payload;return(N((0,a.wV)(Z),{lessonId:t.meta.arg,...t.payload}),n===e.id)?{...e,...C.Tm,userLessons:e.userLessons.filter(e=>e.id!==n),errorMessage:"",infoMessage:"Document Deleted",miscQueryStatus:"successful"}:{...e,userLessons:e.userLessons.filter(e=>e.id!==n),errorMessage:"",infoMessage:"Document Deleted",miscQueryStatus:"successful"}}).addCase(ea.pending,(e,t)=>{e.miscQueryStatus="pending"}).addCase(ea.rejected,(e,t)=>{var n;e.miscQueryStatus="failed",e.errorMessage=(null==t?void 0:null===(n=t.payload)||void 0===n?void 0:n.error)||"Something went wrong"}).addCase(ea.fulfilled,(e,t)=>{let{lesson:n}=t.payload;return{...e,miscQueryStatus:"successful",...n}}).addCase(eu.pending,(e,t)=>{e.mediaGenerationStatus="pending",e.unitPendingUpdateId=t.meta.arg.unitId,N((0,a.xr)(es),t.meta.arg)}).addCase(eu.rejected,(e,t)=>{var n,r;e.mediaGenerationStatus="failed",e.errorMessage=(null==t?void 0:null===(n=t.payload)||void 0===n?void 0:n.error)||"Something went wrong",e.unitPendingUpdateId="",N((0,a.Kq)(es),{unitId:t.meta.arg.unitId,error:(null==t?void 0:null===(r=t.payload)||void 0===r?void 0:r.error)||"Something went wrong"})}).addCase(eu.fulfilled,(e,t)=>{e.unitPendingUpdateId="",e.mediaGenerationStatus="successful",N((0,a.wV)(es),{...t.payload})}).addCase(ed.pending,(e,t)=>{e.mediaGenerationStatus="pending",N((0,a.xr)(el),t.meta.arg)}).addCase(ed.rejected,(e,t)=>{var n,r;e.mediaGenerationStatus="failed",e.errorMessage=(null==t?void 0:null===(n=t.payload)||void 0===n?void 0:n.error)||"Something went wrong",e.unitPendingUpdateId="",N((0,a.Kq)(el),{error:(null==t?void 0:null===(r=t.payload)||void 0===r?void 0:r.error)||"Something went wrong"})}).addCase(ed.fulfilled,(e,t)=>{e.unitPendingUpdateId="",e.mediaGenerationStatus="successful",N((0,a.wV)(el),{...t.payload})}).addCase(ep.pending,(e,t)=>{e.mediaGenerationStatus="pending",N((0,a.xr)(ec),t.meta.arg)}).addCase(ep.rejected,(e,t)=>{var n,r;e.mediaGenerationStatus="failed",e.errorMessage=(null==t?void 0:null===(n=t.payload)||void 0===n?void 0:n.error)||"Something went wrong",e.unitPendingUpdateId="",N((0,a.Kq)(ec),{error:(null==t?void 0:null===(r=t.payload)||void 0===r?void 0:r.error)||"Something went wrong"})}).addCase(ep.fulfilled,(e,t)=>{e.unitPendingUpdateId="",e.mediaGenerationStatus="successful",N((0,a.wV)(ec),{...t.meta.arg,...t.payload})}).addCase(R.pending,(e,t)=>{e.mediaGenerationStatus="pending",N((0,a.xr)(F),t.meta.arg)}).addCase(R.rejected,(e,t)=>{var n,r;e.mediaGenerationStatus="failed",e.errorMessage=(null==t?void 0:null===(n=t.payload)||void 0===n?void 0:n.error)||"Failed to transcribe audio.",N((0,a.Kq)(F),{...t.meta.arg,error:(null==t?void 0:null===(r=t.payload)||void 0===r?void 0:r.error)||"Something went wrong"})}).addCase(R.fulfilled,(e,t)=>{e.mediaGenerationStatus="successful";let{text:n}=t.payload;e.outputContent={text:n,html:n,markdown:n},N((0,a.wV)(F),{...t.meta.arg})}).addCase(_.pending,(e,t)=>{e.h5pGenerationStatus="pending",N((0,a.xr)(Q),t.meta.arg)}).addCase(_.rejected,(e,t)=>{var n;e.h5pGenerationStatus="failed",e.errorMessage="Failed to generate H5P",N((0,a.Kq)(Q),{...t.meta.arg,error:(null==t?void 0:null===(n=t.payload)||void 0===n?void 0:n.error)||"Something went wrong"})}).addCase(_.fulfilled,(e,t)=>{e.h5pGenerationStatus="successful";let{h5pUrl:n}=t.payload;e.h5pUrl=n,N((0,a.wV)(Q),{...t.meta.arg})}).addCase(O.pending,(e,t)=>{e.pdfSummarizationStatus="pending",N((0,a.xr)(D),{userId:t.meta.arg.userId})}).addCase(O.rejected,(e,t)=>{var n;e.pdfSummarizationStatus="failed",e.errorMessage="Failed to summarize PDF",N((0,a.Kq)(D),{user:t.meta.arg.userId,error:(null==t?void 0:null===(n=t.payload)||void 0===n?void 0:n.error)||"Something went wrong"})}).addCase(O.fulfilled,(e,t)=>{e.pdfSummarizationStatus="successful";let{text:n}=t.payload;e.outputContent={text:n},N((0,a.wV)(D),{...t.meta.arg})}).addCase(eg.pending,(e,t)=>{e.translationStatus="pending",N((0,a.xr)(em),t.meta.arg)}).addCase(eg.rejected,(e,t)=>{var n,r;e.errorMessage=(null==t?void 0:null===(n=t.payload)||void 0===n?void 0:n.error)||"Something went wrong",N((0,a.Kq)(em),{...t.meta.arg,error:(null==t?void 0:null===(r=t.payload)||void 0===r?void 0:r.error)||"Something went wrong"})}).addCase(eg.fulfilled,(e,t)=>{let{slideTranslations:n}=t.payload,{translationLanguage:r}=t.meta.arg;N((0,a.wV)(em),{...t.meta.arg,...t.payload})})}}),{setStatusUpdate:eP,clearStatusUpdate:eA,setUnitAssistantOptions:ek,clearUnitAssistantOptions:eL,setLessonUpdateTask:eN,clearLessonUpdateTask:eG,setTemplateTask:eM,updateTemplateTask:ez,clearTemplateTask:eW,setAutoUpdatesEnabled:ej,setElementToScrollIntoViewId:eB,clearElementToScrollIntoViewId:eF,setSuggestions:eR,clearSuggestions:eD,removeSuggestionByUnitType:eO,addSuggestion:eQ,setUnitContentInitializer:e_,clearUnitContentInitializer:eV,setLessonContentInitializer:eJ,clearLessonContentInitializer:eK,updateLessonStyles:eH,setSelectedVoice:eX,setLessonCreatorSelectedSection:eY,setLessonCreatorTextView:e$,setPdfImported:eZ,updateLessonGenerationContextInput:e0,setStartingTextGenerated:e1,setLessonGenerationContextInput:e2,clearLessonGenerationContextInputText:e3,clearLessonGenerationContextInput:e5,updateLessonGenerationVocabInput:e9,addLessonGenerationActivityInput:e7,setLessonActivityInputs:e6,removeLessonGenerationActivityInput:e8,updateLessonGenerationActivityInput:e4,selectLessonGenerationActivitiesAudioVoice:te,toggleLessonGenerationActivityAudio:tt,clearLessonGenerationActivityInputs:tn,loadLessonTemplate:tr,setUnitPendingUpdateId:ta,clearUnitPendingUpdateId:to,setLessonEditorTab:ti,setLessonErrorMessage:ts,clearLessonErrorMessage:tu,resetLessonEditorState:tl,setLessonInfoMessage:td,clearLessonInfoMessage:tc,setEditorMode:tp,setIsLessonGenerationComplete:tm,clearLesson:tg,setLessonWarningMessage:tf,openNewLesson:th,setLessonTeamId:ty,setLessonTitle:tv,setLessonVisibility:tS,setUserLessons:tw,setTeamLessons:tb,setLessonAuthorId:tI,openSavedLesson:tU,openUpdatedLesson:tE,setLessonSaveKey:tx,setTextModificationStatus:tC,setLessonInputContent:tq,clearLessonInputContent:tT,clearLessonCurrentTextStats:tP,setLessonOutputContent:tA,clearLessonOutputContent:tk,setLessonInputTextStats:tL,setLessonModifiedTextStats:tN,resetLessonModification:tG,clearLessonTextStats:tM,clearLessonModification:tz,moveOutputToInput:tW,setTextModificationInstructions:tj,clearTextModificationInstructions:tB,setLessonVocabularyGenerationStatus:tF,updateLessonUnit:tR,setSelectedUnitId:tD,addLessonUnit:tO,deleteLessonUnit:tQ,duplicateLessonUnit:t_,rearrangeLessonUnit:tV,clearSelectedUnitId:tJ,setLessonEditorStatusMessage:tK,clearLessonEditorStatusMessage:tH,startLessonEditorTimer:tX,tickLessonEditorTimer:tY,stopLessonEditorTimer:t$,clearLessonEditorTimer:tZ,setMediaGenerationStatus:t0,setTranslationStatus:t1,setH5PDownloadUrl:t2,clearH5PDownloadUrl:t3,setShowH5pUrl:t5,setIsAnswerKeyEnabled:t9,setLessonEditorErrorMessage:t7,setLessonEditorWarningMessage:t6,setLessonGenerationStatus:t8,setIsReferredFromPlugin:t4,setInputSkipModification:ne,setInputSourceType:nt,setInputSourceUrl:nn,setIsListeningForUpdates:nr,setLessonDetails:na}=eT.actions;var no=eT.reducer},56063:function(e,t,n){n.d(t,{c1p:function(){return tP},eJB:function(){return t5},erp:function(){return tV},GzQ:function(){return tD},pKT:function(){return t9},RCh:function(){return np},c2r:function(){return e7},yQC:function(){return ny},Obx:function(){return tx},u5i:function(){return te},X_$:function(){return tn},p9w:function(){return tt},AjK:function(){return k},iQ2:function(){return ns},EcG:function(){return ng},UqF:function(){return t$},tzO:function(){return nm},ozi:function(){return tY},YQQ:function(){return tH},mYc:function(){return tX},ZOz:function(){return t0},tii:function(){return t1},f00:function(){return em},n5j:function(){return tU},IgB:function(){return eA},FIh:function(){return tq},pJs:function(){return tl},_L6:function(){return ty},mjc:function(){return tN},Pvv:function(){return tM},JFn:function(){return e2},lhU:function(){return e3},JAR:function(){return e5},qTT:function(){return q},wef:function(){return no},cht:function(){return t3},irA:function(){return ee},qhb:function(){return G},V4v:function(){return ni},vnA:function(){return M},OFq:function(){return e$},zfd:function(){return ef},NEW:function(){return ea},$Qu:function(){return na},pn9:function(){return I},_oS:function(){return ec},CXi:function(){return e0},mnA:function(){return tW},UwK:function(){return eg},sG:function(){return t6},NJ1:function(){return N},Y7j:function(){return eG},V67:function(){return ep},lL5:function(){return tO},k9V:function(){return el},s81:function(){return ed},WL$:function(){return tR},avg:function(){return eN},qox:function(){return nl},Z9d:function(){return w},vU6:function(){return nr},DCS:function(){return eK},I8C:function(){return K},S68:function(){return H},YUD:function(){return eC},Pyy:function(){return W},$vH:function(){return eq},Pey:function(){return ei},z3K:function(){return Y},EoL:function(){return er},f3k:function(){return eo},WTt:function(){return A},kPd:function(){return ex},KcQ:function(){return ev},Msz:function(){return eU},q9C:function(){return es},ZDT:function(){return eE},RL:function(){return eh},KkF:function(){return z},lZc:function(){return eS},Yr:function(){return P},O__:function(){return L},sk2:function(){return ew},cW7:function(){return et},Q1P:function(){return ek},heN:function(){return ez},rjA:function(){return X},o_4:function(){return C},e79:function(){return t2},OG:function(){return E},Bd2:function(){return tB},mje:function(){return tF},T9e:function(){return x},Rqp:function(){return eX},YEq:function(){return S},zHV:function(){return T},Ame:function(){return eV},C$C:function(){return y},u2s:function(){return e1},JgL:function(){return tJ},Yio:function(){return tb},zIG:function(){return v},WTS:function(){return ej},blE:function(){return nf},yNy:function(){return U},CCt:function(){return tZ},i2R:function(){return tK},X9o:function(){return ts},JFE:function(){return eZ},yOU:function(){return tu},i8F:function(){return t4},keb:function(){return t_},E4h:function(){return nn},Dme:function(){return nv},zuL:function(){return nt},N43:function(){return eY},RH5:function(){return tz},j4j:function(){return b},nW5:function(){return t7},OOb:function(){return eJ},gBG:function(){return e8},AI6:function(){return to},jW0:function(){return ta},Sps:function(){return ne},CdK:function(){return tr},x2G:function(){return eP},kJy:function(){return ti},Frs:function(){return tQ},V$U:function(){return e9},bE_:function(){return ey},ymI:function(){return eR},Bky:function(){return nh},R9z:function(){return nu},zvz:function(){return t8},D$J:function(){return Z},PIs:function(){return V},Ck:function(){return eT},dlR:function(){return eB},w4n:function(){return eu},C90:function(){return e4},QCv:function(){return eM},Dgh:function(){return e6}});var r=n(28742),a=n(85287),o=n(6607),i=n(54998),s=n(95303),u=n(90053),l=n(15087),d=n(51293),c=n(46221);let p=["multiple-choice","multi-select","cloze"];var m=n(97439),g=n(29953),f=n(67012),h=n(21479);let y=(0,r.P1)(e=>e.lessonEditor.lessonStyles||null,e=>e||u.Qw),v=(0,r.P1)(y,e=>(null==e?void 0:e.titleFontSize)||u.Qw.titleFontSize),S=(0,r.P1)(y,e=>(null==e?void 0:e.headerFontSize)||u.Qw.headerFontSize),w=e=>e.lessonEditor.lessonCreatorSelectedSection,b=e=>e.lessonEditor.selectedVoice,I=e=>e.lessonEditor.isListeningForUpdates,U=(0,r.P1)(a.W$,e=>i.fC[m.bV[e]||"anonymousGroup"]),E=e=>e.lessonEditor.lessonGenerationContextInput,x=e=>e.lessonEditor.lessonGenerationVocabInput,C=e=>e.lessonEditor.lessonGenerationActivityInputs,q=e=>e.lessonEditor.inputSkipModification,T=e=>e.lessonEditor.language||"en",P=e=>e.lessonEditor.statusMessage,A=e=>{var t;return(null===(t=e.lessonEditor)||void 0===t?void 0:t.inputContent)||l.gg},k=e=>e.lessonEditor.editorMode,L=e=>e.lessonEditor.editorTab,N=e=>"print"===e.lessonEditor.editorMode,G=e=>"edit"===e.lessonEditor.editorMode,M=e=>"interactive"===e.lessonEditor.editorMode;(0,r.P1)(N,M,(e,t)=>e||t);let z=e=>{var t;return(null===(t=e.lessonEditor)||void 0===t?void 0:t.outputContent)||l.gg},W=e=>{var t;return(0,s.wq)(null===(t=e.lessonEditor)||void 0===t?void 0:t.outputContent)},j=(0,r.P1)(e=>e.lessonEditor.statusUpdate||null,e=>e&&(0,o.uO)(e.createdAt,60)?e:null),B=(0,r.P1)(j,e=>e&&!e.unitId?e:null),F=(0,r.P1)(B,e=>e&&"error"===e.type?e.message:""),R=(0,r.P1)(B,e=>e&&"warning"===e.type?e.message:""),D=(0,r.P1)(B,e=>e&&"info"===e.type?e.message:""),O=(0,r.P1)(j,e=>e&&"pending"===e.type?e:null),Q=(0,r.P1)(O,e=>e&&!e.unitId?e:null),_=(0,r.P1)(Q,e=>!!e),V=(0,r.P1)(j,e=>e&&e.unitId?e:null),J=(0,r.P1)(O,e=>e&&e.unitId?e:null);(0,r.P1)(Q,e=>e?e.message:"");let K=(0,r.P1)(F,e=>e.lessonEditor.errorMessage,(e,t)=>e||t),H=(0,r.P1)(K,e=>!!e),X=(0,r.P1)(R,e=>e.lessonEditor.warningMessage,(e,t)=>e||t),Y=e=>!!e.lessonEditor.warningMessage,$=(0,r.P1)(J,e=>e&&(null==e?void 0:e.unitId)||""),Z=(0,r.P1)($,e=>e.lessonEditor.unitPendingUpdateId||"",(e,t)=>e||t),ee=(0,r.P1)(Z,e=>!!e),et=e=>e.lessonEditor.title,en=(0,r.P1)(et,e=>!!e),er=e=>e.lessonEditor.id,ea=(0,r.P1)(e=>!e.lessonEditor.id,e=>!e),eo=(0,r.P1)(D,e=>e.lessonEditor.infoMessage,(e,t)=>e||t),ei=e=>!!e.lessonEditor.title,es=e=>e.lessonEditor.miscQueryStatus,eu=e=>e.lessonEditor.vocabularyGeneratorStatus,el=e=>"pending"===e.lessonEditor.textAnalysisStatus,ed=e=>"pending"===e.lessonEditor.textModificationStatus,ec=e=>"pending"===e.lessonEditor.mediaGenerationStatus,ep=e=>"pending"===e.lessonEditor.storyGenerationStatus,em=e=>e.lessonEditor.h5pGenerationStatus,eg=e=>"pending"===e.lessonEditor.pdfSummarizationStatus,ef=(0,r.P1)(el,ed,e=>"pending"===e.lessonEditor.miscQueryStatus,e=>"pending"===e.lessonEditor.vocabularyGeneratorStatus,e=>"pending"===e.lessonEditor.lessonGenerationStatus,ec,ep,e=>"pending"===e.lessonEditor.storyGenerationStatus,e=>"pending"===e.lessonEditor.h5pGenerationStatus,eg,_,(e,t,n,r,a,o,i,s,u,l,d)=>e||t||n||r||a||o||i||s||u||l||d),eh=(0,r.P1)(e=>{var t;return(0,s.wq)(null===(t=e.lessonEditor)||void 0===t?void 0:t.inputContent)},ef,(e,t)=>!e||t),ey=e=>e.lessonEditor.textModificationInstructions,ev=(0,r.P1)(A,e=>(0,s.o4)(e)),eS=(0,r.P1)(z,e=>(0,s.o4)(e)),ew=(0,r.P1)(ev,ey,a.c7,a.W$,e=>e.lessonEditor.modificationTemplate,(e,t,n,r,a)=>({text:e,textModificationInstructions:t,userId:n,userType:r,targetLevel:"",standard:"CUSTOM"===a?"custom":"generic"})),eb=(0,r.P1)(E,e=>{var t;return e&&(null===(t=e.payload)||void 0===t?void 0:t.text)||""});(0,r.P1)(eb,a.c7,a.W$,(e,t,n)=>({text:e,userId:t,userType:n,textModificationInstructions:"",targetLevel:"",standard:"generic"}));let eI=(0,r.P1)(A,e=>(0,s.Po)(e)),eU=(0,r.P1)(eI,ey,a.c7,a.W$,(e,t,n,r)=>({text:e,textModificationInstructions:t,userId:n,userType:r,targetLevel:""}));(0,r.P1)(ev,a.c7,e=>e.lessonEditor.vocabCefrLevel,(e,t,n)=>({text:e,userId:t,vocabCefrLevel:n}));let eE=e=>e.lessonEditor.modifiedTextStats,ex=e=>e.lessonEditor.inputTextStats,eC=(0,r.P1)(ex,e=>(0,o.ez)(e)),eq=(0,r.P1)(eE,e=>(0,o.ez)(e)),eT=e=>e.lessonEditor.userLessons,eP=e=>e.lessonEditor.teamLessons,eA=(0,r.P1)(eP,e=>e.length>0);(0,r.P1)(eT,e=>e.filter(e=>e.title.toLowerCase().includes("untitled")).length),(0,r.P1)(a.LN,e=>e?["article",...i.Mn]:i.Mn);let ek=e=>e.lessonEditor.visibility||"team",eL=e=>e.lessonEditor.authorId,eN=(0,r.P1)(ea,eL,a.c7,(e,t,n)=>e&&!!t&&t===n),eG=(0,r.P1)(ea,eL,(e,t)=>e&&!t),eM=e=>e.lessonEditor.units.find(e=>"vocabulary"===e.type)||null,ez=(0,r.P1)(eM,e=>(null==e?void 0:e.vocabularyItems)||null),eW=e=>e.lessonEditor.teamId;(0,r.P1)(a.c7,eL,(e,t)=>!!t&&e!==t);let ej=(0,r.P1)(e=>e.lessonEditor.units,h.rP),eB=(0,r.P1)(ej,e=>e.filter(e=>!e.isHidden)),eF=(0,r.P1)(ej,e=>e.length>0),eR=(0,r.P1)(ej,e=>(0,s.kt)(e)),eD=(0,r.P1)(ej,e=>e.filter(e=>"slide"===e.type)),eO=(0,r.P1)(eD,e=>e.map(e=>e.text).filter(e=>!!e).join("/n")||""),eQ=(0,r.P1)(eR,e=>(null==e?void 0:e.selectedVersionId)||""),e_=(0,r.P1)(eR,eQ,(e,t)=>e&&e.versions&&e.versions.find(e=>e.id===t)||null),eV=e=>{var t;return(null===(t=e.lessonEditor)||void 0===t?void 0:t.saveKey)||""},eJ=e=>e.lessonEditor.showH5pUrl||!1,eK=e=>e.lessonEditor.details||null,eH=(0,r.P1)(eK,e=>!!e&&(0,o.ez)(e)),eX=(0,r.P1)(en,eH,eF,(e,t,n)=>e||t||n),eY=(0,r.zB)({id:er,title:et,description:e=>e.lessonEditor.description,authorId:eL,visibility:ek,teamId:eW,units:ej,createdAt:e=>e.lessonEditor.createdAt||"",updatedAt:e=>e.lessonEditor.updatedAt||"",targetLevel:e=>e.lessonEditor.targetLevel||"",language:T,saveKey:eV,showH5pUrl:eJ,details:eK,lessonStyles:y,statusUpdate:j}),e$=(0,r.P1)(eY,e=>(0,s.jY)(e)),eZ=(0,r.P1)(eY,a.c7,a.oB,(e,t,n)=>({...e,id:"",authorId:t,teamId:n}));(0,r.P1)(eY,a.c7,a.oB,(e,t,n)=>({...e,authorId:t,teamId:n})),(0,r.P1)(e_,e=>(null==e?void 0:e.textStats)||{});let e0=e=>(0,a.W2)("lessonMarkdownEditor",d.PP)(e),e1=e=>(0,a.W2)("lessonStyles",d.I2)(e),e2=e=>(0,a.W2)("imageSizes",d.eM)(e),e3=e=>(0,a.W2)("inLessonScan",d.HD)(e),e5=e=>(0,a.W2)("inLessonStoryGeneration",d.Lp)(e),e9=e=>(0,a.W2)("textDownload",d.Zx)(e),e7=e=>(0,a.W2)("canvasGeneration",d.S,[(0,c.u_)("issbc.org")])(e),e6=e=>(0,a.W2)("worksheetImport",d.CH,[(0,c.u_)("issbc.org")])(e),e8=e=>(0,a.W2)("simpleVocabList",d.Gd,[])(e),e4=e=>(0,a.W2)("vocabularyImages",d.VB)(e),te=e=>(0,a.W2)("dialogueAudioGeneration",d.OG)(e),tt=e=>(0,a.W2)("dialogueUnitAddition",d.d4)(e),tn=e=>(0,a.W2)("dialogueSpeakerEditing",d.WT)(e),tr=e=>(0,a.W2)("tables",d.Rh)(e),ta=e=>(0,a.W2)("ssml",d.mQ)(e),to=e=>!1,ti=e=>(0,a.W2)("templates",d.le,[(0,c.u_)("norquest.ca")])(e),ts=e=>(0,a.W2)("multiPageWorksheetImport",d.zK)(e);(0,r.P1)(eS,ev,(e,t)=>e||t);let tu=(0,r.P1)(eE,ex,(e,t)=>(0,o.ez)(e)?e:t),tl=(0,r.P1)(ev,eS,(e,t)=>!!t&&e!==t),td=(0,r.P1)(ez,e=>(0,s.ld)(e)),tc=(0,r.P1)(ej,e=>(0,s.Z$)(e)),tp=(0,r.P1)(ej,e=>e.filter(e=>"dialogue"===e.type)),tm=(0,r.P1)(ej,e=>e.filter(e=>"canvas"===e.type)),tg=(0,r.P1)(tp,e=>{let t=[];for(let r of e){let e=[],{speakers:a}=r;for(let t of r.lines){var n;let r=(null===(n=a.find(e=>e.id===t.speakerId))||void 0===n?void 0:n.name)||"Speaker",o=t.message.text||"";e.push("".concat(r,": ").concat(o))}t.push(e.join("\n"))}return t.join("\n\n")}),tf=(0,r.P1)(tc,e=>e.map(s.pe).join("/n/n")),th=(0,r.P1)(tm,e=>e.map(s.Cs).join("/n/n")),ty=(0,r.P1)(tf,e=>!!e.trim()),tv=(0,r.P1)(tg,e=>!!e.trim()),tS=(0,r.P1)(eO,e=>!!e.trim()),tw=(0,r.P1)(td,e=>e.join("\n")),tb=(0,r.P1)(tf,tw,eO,tg,th,(e,t,n,r,a)=>[e,t,n,r,a].filter(e=>!!e.trim()).join("\n\n")),tI=(0,r.P1)(tb,e=>(0,o.Ht)(e)),tU=(0,r.P1)(tI,e=>e>=15),tE=(0,r.P1)(ty,tS,tv,(e,t,n)=>e||t||n);(0,r.P1)(tb,a.c7,a.W$,(e,t,n)=>({text:e,userId:t,userType:n,activityInstructionsList:[]}));let tx=e=>(0,o.Fp)({userId:(0,a.c7)(e),userType:(0,a.W$)(e),lessonId:er(e),lessonTitle:et(e),lessonText:tb(e)});(0,r.P1)(tb,U,(e,t)=>(0,o.Ht)(e)>t),(0,r.P1)(eS,U,(e,t)=>(0,o.Ht)(e)>t);let tC=(0,r.P1)(eT,e=>e.length),tq=(0,r.P1)(tC,e=>e>0),tT=(0,r.P1)(eP,e=>e.length>0),tP=(0,r.P1)(tq,tT,(e,t)=>e||t);(0,r.P1)(tc,e=>e.length>0);let tA=(0,r.P1)(ty,tS,(e,t)=>e||t),tk=(0,r.P1)(ej,e=>e.filter(e=>"vocabulary"===e.type));(0,r.P1)(tk,e=>e.length>0),(0,r.P1)(tk,e=>e.length>0?e[0].id:"");let tL=(0,r.P1)(ej,e=>e.length),tN=(0,r.P1)(tL,e=>e>0),tG=(0,r.P1)(a.W$,e=>null===u.To||void 0===u.To?void 0:u.To[m.bV[e]||"anonymousGroup"]),tM=(0,r.P1)(eM,e=>{var t;return(null==e?void 0:null===(t=e.vocabularyItems)||void 0===t?void 0:t.length)>0});(0,r.P1)(tA,tM,(e,t)=>e||t),(0,r.P1)(ej,e=>e.some(e=>"youtubeVideo"===e.type));let tz=e=>e.lessonEditor.selectedUnitId;(0,r.P1)(ej,tz,(e,t)=>e.find(e=>e.id===t)||null);let tW=(0,r.P1)(ea,eL,a.c7,(e,t,n)=>e&&t!==n);(0,r.P1)(eL,a.c7,eW,a.oB,(e,t,n,r)=>!!e&&e!==t&&n===r);let tj=(0,r.P1)(eR,e=>e.selectedVersionId||"");(0,r.P1)(eR,tj,(e,t)=>{var n;return(null==e?void 0:null===(n=e.versions)||void 0===n?void 0:n.find(e=>e.id===t))||l.I8});let tB=(0,r.P1)(a.dy,e=>(null==e?void 0:e.monthlyLessonGenerationCount)||0),tF=(0,r.P1)(a.W$,e=>null===u.E9||void 0===u.E9?void 0:u.E9[m.bV[e]||"anonymousGroup"]),tR=e=>(0,a.W2)("unlimitedLessonGeneration",d.Iq,[c.uQ,(0,c.Ce)([])])(e),tD=(0,r.P1)(a.LN,tB,tF,(e,t,n)=>e||t<n),tO=e=>(0,a.W2)("storyTranslationEnabled",d.hO)(e),tQ=e=>!1,t_=e=>(0,a.W2)("pdfSummaryEnabled",d.Li,[c.uQ])(e),tV=e=>(0,a.W2)("audioInput",d._v,[])(e),tJ=e=>(0,a.W2)("templateGeneration",d.iD,[(0,c.u_)("issbc.org")])(e),tK=e=>(0,a.W2)("moodleXmlExport",d.vX,[])(e),tH=e=>(0,a.W2)("googleFormExport",d.$S,[])(e),tX=e=>(0,a.W2)("googleSlidesExport",d.An,[])(e),tY=e=>(0,a.W2)("googleDocExport",d.xZ,[])(e),t$=e=>(0,a.W2)("embedCodeExport",d.aw,[])(e),tZ=e=>(0,a.W2)("mergedDialogueAudio",d.Yo,[])(e),t0=e=>e.lessonEditor.h5pUrl,t1=(0,r.P1)(er,e=>({lessonId:e})),t2=(0,r.P1)(a.W$,e=>u.gJ[m.bV[e]||"anonymous"]),t3=e=>e.lessonEditor.isAnswerKeyEnabled,t5=(0,r.P1)(ej,e=>e.filter(e=>"quiz"===e.type&&e.questions.some(e=>p.includes(e.variation)))),t9=(0,r.P1)(t5,e=>e.length>0),t7=(0,r.P1)(t3,t5,(e,t)=>e&&t.length>0);(0,r.P1)(e=>(0,a.W2)("unlimitedSections",!1,[(0,c.Ce)([])])(e),a.LN,tL,tG,(e,t,n,r)=>e||t||n<r);let t6=e=>!(0,a.Qb)(e)&&e.lessonEditor.isReferredFromPlugin,t8=(0,r.zB)({userId:a.c7,userType:a.W$,lessonId:er});(0,r.P1)(a.oB,eW,(e,t)=>!!e&&e===t);let t4=e=>e.lessonEditor.pdfImported,ne=e=>e.lessonEditor.startingTextGenerated,nt=(0,r.P1)(ej,e=>e.filter(e=>"quiz"===e.type)),nn=(0,r.P1)(nt,e=>e.reduce((e,t)=>[...e,...t.questions],g.LZ)),nr=e=>e.lessonEditor.lessonCreatorTextView,na=(0,r.P1)(nr,e=>"confirmed"===e),no=(0,r.P1)(a.LN,b,(e,t)=>e?{voice:t}:{}),ni=(0,r.P1)(b,f.Xx),ns=e=>(0,a.W2)("editorV3",d.g_)(e),nu=e=>e.lessonEditor.unitContentInitializer;(0,r.P1)(nu,e=>e?e.view:null),(0,r.P1)(nu,e=>(null==e?void 0:e.unitId)||"");let nl=e=>e.lessonEditor.lessonContentInitializer;(0,r.P1)(nl,e=>e?e.view:null),(0,r.P1)(nl,e=>(null==e?void 0:e.insertionIndex)||0),(0,r.P1)(nl,e=>(null==e?void 0:e.shouldResetLessonOnCancel)||!1);let nd=e=>e.lessonEditor.suggestions,nc=(0,r.P1)(nd,e=>e.length>0),np=(0,r.P1)(nc,ef,tE,(e,t,n)=>e&&!t&&n),nm=(0,r.P1)(nd,e=>e[0]||null),ng=e=>e.lessonEditor.elementToScrollIntoViewId,nf=e=>e.lessonEditor.lessonUpdateTask,nh=e=>e.lessonEditor.unitAssistantOptions,ny=e=>{var t;return(null===(t=e.lessonEditor)||void 0===t?void 0:t.template)||null},nv=e=>(0,a.W2)("quickStart",d.OH)(e)},11831:function(e,t,n){n.d(t,{$8:function(){return f},G7:function(){return g},P6:function(){return l},Ql:function(){return p},Ry:function(){return c},qH:function(){return m},sI:function(){return d}});var r=n(33776),a=n(51294),o=n(80672),i=n(6607),s=n(24086),u=n(95303);let l=async(e,t)=>{try{return await (0,o.bo)("lessons",e,{...t,createdAt:(0,s.Bt)(),updatedAt:(0,s.Bt)(),id:e}),{lesson:t,error:""}}catch(e){return console.error("Failed to create lesson",e),(0,r.XY)("firestoreRequestFailed",{error:e}),{lesson:null,error:JSON.stringify(e)}}},d=async e=>{if(!a.mz)return{success:!1,error:"Firestore is not initialized",newSaveKey:""};let{update:t,lessonId:n,saveNewKey:o}=e,u={};Object.keys(t).forEach(e=>{"createdAt"!==e&&"updatedAt"!==e&&(u[e]=t[e])});let l=(0,i.Ox)();o&&(u.saveKey=l);try{return(0,s.r7)((0,s.JU)(a.mz,"lessons",n),{...u,updatedAt:(0,s.Bt)()}),{success:!0,newSaveKey:l,error:""}}catch(e){return console.error("Failed to update lesson",e),(0,r.XY)("firestoreRequestFailed",{error:e}),{success:!1,newSaveKey:"",error:JSON.stringify(e)}}},c=async e=>{if(!a.mz)return{id:"",error:"Firestore is not initialized"};try{return await (0,s.oe)((0,s.JU)(a.mz,"lessons",e)),{id:e,error:""}}catch(e){return console.error("Failed to delete lesson",e),(0,r.XY)("firestoreRequestFailed",{error:e}),{id:"",error:JSON.stringify(e)}}},p=async e=>{if(!a.mz)return[];try{let t=(0,s.IO)((0,s.hJ)(a.mz,"lessons"),(0,s.ar)("authorId","==",e)),n=await (0,s.PL)(t),r=[];return n.forEach(e=>{r.push({...(0,u.f4)(e.data()),id:e.id})}),r}catch(t){return console.error("Failed to fetch lessons for ".concat(e),t),[]}},m=async(e,t)=>{if(!a.mz)return[];try{let n=(0,s.IO)((0,s.hJ)(a.mz,"lessons"),(0,s.ar)("teamId","==",t),(0,s.ar)("authorId","!=",e),(0,s.ar)("visibility","in",["team"])),r=await (0,s.PL)(n),o=[];return r.forEach(e=>{o.push({...(0,u.f4)(e.data()),id:e.id})}),o}catch(e){return console.error("Failed to fetch lessons for team ".concat(t),e),[]}},g=async e=>{if(!a.mz)return{error:"Firestore is not initialized",lesson:null};try{let t=(0,s.JU)(a.mz,"lessons",e),n=await (0,s.QT)(t);if(n.exists())return{error:"",lesson:(0,u.f4)(n.data())};return{error:"We couldn't find this lesson.",lesson:null}}catch(t){return console.error("Failed to fetch activity ".concat(e),t),{error:(0,i.Qj)(t,"We couldn't find this lesson."),lesson:null}}},f=async e=>{if(!a.mz)return[];try{let t=(0,s.IO)((0,s.hJ)(a.mz,"lessons"),(0,s.ar)("authorId","==",e)),n=await (0,s.PL)(t),r=[];return n.forEach(e=>{r.push({...(0,u.f4)(e.data()),id:e.id+"-admin"})}),r}catch(e){return console.error("Failed to fetch documents",e),[]}}},24981:function(e,t,n){n.d(t,{q:function(){return r}});let r=e=>{let[t,,n]=e.replace(/(>|<)/gi,"").split(/(vi\/|v=|\/v\/|youtu\.be\/|\/embed\/)/);return void 0!==n?n.split(/[^0-9a-z_-]/i)[0]:t}},22871:function(e,t,n){n.d(t,{ec:function(){return c},LU:function(){return d},VO:function(){return p},UY:function(){return l},KQ:function(){return u},Vy:function(){return s},ON:function(){return a}});let r=[1,.75,.5],a=e=>{e.pause(),e.currentTime=0,e.removeEventListener("ended",e=>a(e.target))},o=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;e.playbackRate=n,e.play(),e.addEventListener("ended",()=>{t()})},i=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=new Audio(e);return o(r,t,n),r},s=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=e.currentTarget.href;return e.stopPropagation(),e.preventDefault(),i(r,t,n)},u=async(e,t)=>{let n=document.createElement("audio"),r=document.createElement("source");return n.appendChild(r),r.src=e,r.type="audio/wav",n.addEventListener("ended",()=>{t();try{var e;null==n||null===(e=n.parentNode)||void 0===e||e.removeChild(n)}catch(e){console.error("Error",e)}}),n.load(),n.play(),n},l=e=>{let t=(r.indexOf(e)+1)%r.length;return r[t]},d=e=>{let t=Math.round(e%60);return"".concat(Math.floor(e/60),":").concat(t<10?"0".concat(t):t)},c=e=>new Promise(t=>{e.toBlob(e=>t(e),"image/png")}),p=e=>{var t;let n=null===(t=e.name.split(".").pop())||void 0===t?void 0:t.toLowerCase();return"mp4"===n||"mov"===n||"webm"===n?"videos":"mp3"===n||"wav"===n||"m4a"===n?"audio":"png"===n||"jpg"===n||"jpeg"===n||"heic"===n||"gif"===n?"images":"documents"}},86319:function(e,t,n){n.d(t,{Ui:function(){return r},WS:function(){return i},aO:function(){return c},ed:function(){return l},hj:function(){return u},mI:function(){return o},rU:function(){return a},zg:function(){return s},zh:function(){return d}});let r="",a="new",o=["en","fr","es","ja"],i=10,s="vocabulary",u="web-page",l=["kanji_to_reading","reading_to_kanji"],d=3,c=5},71691:function(e,t,n){n.d(t,{H6:function(){return s},Ix:function(){return v},P5:function(){return u},Qq:function(){return d},Rv:function(){return g},Tq:function(){return c},VP:function(){return S},d9:function(){return l},wK:function(){return p}});var r=n(97088),a=n(86319),o=n(38132),i=n(24981);let s="https://storage.googleapis.com/roshi-prod.appspot.com/audio/en/the_pierre_elliott_trudeau_foundation_gave_back_a__gift_from_a_chinese_government_adviser_named_zhang_bin_canadian_security_officials_said_that_the_donation_was_linked_to_the_chinese_government.mp3",u={id:"mock-mcq-1",variation:"multiple-choice",prompt:{id:"Which of these is correct?",text:"Which of these is correct?",audioUrl:"",imageUrl:""},choices:[{id:"incorrect choice 1",text:"incorrect choice 1",audioUrl:"",imageUrl:""},{id:"correct choice",text:"correct choice",audioUrl:"",imageUrl:""},{id:"incorrect choice 2",text:"incorrect choice 2",audioUrl:"",imageUrl:""}],correctChoiceId:"correct choice"},l={id:"mock-mcq-1",variation:"multi-select",prompt:{id:"Which of these fits the category? Select all that apply.",text:"Which of these fits the category? Select all that apply.",audioUrl:"",imageUrl:""},choices:[{id:"This one fits",text:"This one fits",audioUrl:"",imageUrl:""},{id:"And this one",text:"And this one",audioUrl:"",imageUrl:""},{id:"But not this one",text:"But not this one",audioUrl:"",imageUrl:""},{id:"Nor this one",text:"Nor this one",audioUrl:"",imageUrl:""}],correctChoiceIds:["This one fits","And this one"]},d={id:"mock-cloze-1",variation:"cloze",prompt:{id:"Fill in the blank.",text:"Fill in the blank.",audioUrl:"",imageUrl:""},clozeText:{id:"mock-cloze-text-1",text:"It took several *firefighters* to put out the fire.",audioUrl:"",imageUrl:""}},c={id:"mock-open-1",variation:"open-ended",prompt:{id:"What do you think about the text?",text:"What do you think about the text?",audioUrl:"",imageUrl:""}},p={id:"mock-task",variation:"task",prompt:{id:"Use a telephone directory (print or online) to locate the closest medical clinic.",text:"Use a telephone directory (print or online) to locate the closest medical clinic.",audioUrl:"",imageUrl:""}};["I","apple","app","cook","you","ate","an"].map(o.Xt),["I","ate","an","apple"].map(o.Xt);let m={id:a.Ui,authorId:r.xh,targetLanguage:"en",userLanguage:"en",sourceType:"text",title:"",description:"",sourceUrl:"",youtubeVideoId:"",difficulty:"",questions:[],format:"standard",sourceText:"",contentTheme:"",grammarPoint:"",teamId:"",visibility:"private",sessions:[]},g=(a.rU,r.xh,"https://www.youtube.com/watch?v=5Rmv3nliwCs");(0,o.QV)("en",5).join("\n");let f=(0,o.QV)("fr",5).join("\n"),h=(0,o.QV)("es",5).join("\n"),y=(0,o.QV)("ja",5).join("\n"),v="";(0,o.QV)("fr",5).join("\n"),(0,o.QV)("es",5).join("\n"),(0,o.QV)("ja",5).join("\n"),r.xh,a.rU,r.xh,a.rU,r.xh,a.rU;let S={en:{youtubeVideoUrl:g,webPageUrl:"https://breakingnewsenglish.com/2208/220818-thinking.html",exampleRandomSentences:v,exampleComprehensionText:v},fr:{youtubeVideoUrl:"https://www.youtube.com/watch?v=XNyXNuxsGcI",webPageUrl:"https://www.hww.ca/fr/faune/poissons-amphibiens-reptiles/les-tortues-deau-douce.html",exampleRandomSentences:f,exampleComprehensionText:f},es:{youtubeVideoUrl:"https://www.youtube.com/watch?v=xg484Dg69xM",webPageUrl:"https://www.worldwildlife.org/descubre-wwf/historias/7-datos-interesantes-sobre-las-tortugas-marinas",exampleRandomSentences:h,exampleComprehensionText:h},ja:{youtubeVideoUrl:"https://www.youtube.com/watch?v=iZQWF3Ljkew",webPageUrl:"https://www3.nhk.or.jp/news/easy/k10013341461000/k10013341461000.html",exampleRandomSentences:y,exampleComprehensionText:y}},w=[(0,o.Xt)("Thank you for the supplies."),(0,o.Xt)("Where can I find school supplies?"),(0,o.Xt)("Where is the school?")],b=[(0,o.Xt)("What about electronics?"),(0,o.Xt)("What are electronics?"),(0,o.Xt)("Are those electronics?")],I=[(0,o.Xt)("You're welcome"),(0,o.Xt)("Excuse me"),(0,o.Xt)("Thank you!")];a.rU,r.xh,(0,o.Xt)("Hey, how can I help you"),w[1].id,(0,o.Xt)("Those are just over in aisle 3."),b[0].id,(0,o.Xt)("The electronics are just upstairs"),I[2].id,(0,i.q)(g)},38132:function(e,t,n){n.d(t,{Wv:function(){return o},P4:function(){return c},Xt:function(){return l},QV:function(){return d},CI:function(){return s},P9:function(){return u},gh:function(){return i}});var r=JSON.parse('{"en":["Let\'s try something.","I\'m at a loss for words.","This is never going to end.","I just don\'t know what to say.","I was in the mountains.","You\'re in better shape than I am.","You are in my way.","That won\'t happen.","I suppose it\'s different when you think about it over the long term.","I always liked mysterious characters more.","You should sleep.","I told them to send me another ticket.","I can\'t live that kind of life.","The last person I told my idea to thought I was nuts.","It is unfortunately true.","They are too busy fighting against each other to care for common ideals.","Most people think I\'m crazy.","No I\'m not; you are!","That\'s MY line!","He\'s kicking me!","Then there is a problem...","It doesn\'t surprise me.","For some reason I feel more alive at night.","It depends on the context.","Are you freaking kidding me?!","That\'s the stupidest thing I\'ve ever said.","I don\'t want to be lame; I want to be cool!!","When I grow up, I want to be a king.","America is a lovely place to be, if you are here to earn money.","I\'m so fat.","I\'m gonna shoot him.","I\'m just saying!","That was probably what influenced their decision.","I\'ve always wondered what it\'d be like to have siblings.","This is what I would have said.","It would take forever for me to explain everything.","That\'s because you\'re a girl.","Sometimes I can\'t help showing emotions.","It\'s a word I\'d like to find a substitute for.","It would be something I\'d have to program.","I don\'t intend to be selfish.","Let\'s consider the worst that could happen.","I think it is best not to be impolite.","I\'d be unhappy, but I wouldn\'t kill myself.","Back in high school, I got up at 6 a.m. every morning.","When I woke up, I was sad.","That is somewhat explained at the end.","I thought you liked to learn new things.","Most people write about their daily life.","If I could send you a marshmallow, Trang, I would.","In order to do that, you have to take risks.","Every person who is alone is alone because they are afraid of others.","Why do you ask?","I am not an artist. I never had the knack for it.","I can\'t tell her now. It\'s not that simple anymore.","I am a flawed person, but these are flaws that can easily be fixed.","How long did you stay?","Maybe it will be exactly the same for him.","Humans were never meant to live forever.","I think I have a theory about that.","That is intriguing.","This is not important.","I didn\'t like it.","She\'s asking how that\'s possible.","You\'re just running away from life\'s problems.","If you look at the lyrics, they don\'t really mean much.","There\'s a problem there that you don\'t see.","I wish I could go to Japan.","After that, I left, but then I realized that I forgot my backpack at their house.","I won\'t ask you anything else today.","It may freeze next week.","Even though he apologized, I\'m still furious.","Thanks for having explained to me at last why people take me for an idiot.","That wasn\'t my intention.","Thanks for your explanation.","Theoretically, I\'m doing math.","It almost scared me not to see you online for a whole day.","I don\'t know what you mean.","You wanted to tell me about freedom?","If I wanted to scare you, I would tell you what I dreamt about a few weeks ago.","One can\'t expect everything from schools.","There are many words that I don\'t understand.","I don\'t like it when mathematicians who know much more than I do can\'t express themselves explicitly.","You\'re really not stupid.","I need to ask you a silly question.","I don\'t know how to demonstrate it, since it\'s too obvious!","I wouldn\'t have thought I would someday look up \\"Viagra\\" in Wikipedia.","Can it be phrased in another way?","No one will know.","I found a solution, but I found it so fast that it can\'t be the right solution.","It seems interesting to me.","I like candlelight.","What did you answer?","It\'s too bad that I don\'t need to lose weight.","You never have class or what?!","I will play Sudoku then instead of continuing to bother you.","Where is the problem?","I don\'t like you anymore.","Congratulations!","I don\'t want to wait that long.","I shouldn\'t have logged off.","I don\'t know what to do anymore.","I hate chemistry.","I didn\'t want this to happen.","You can probably guess what happens though.","Next thing you know, you\'ll be in the papers.","What other options do I have?","I can\'t explain it either.","How could I be a robot? Robots don\'t dream.","It\'s not something anyone can do.","I don\'t know if I still have it.","What do you think I\'ve been doing?","Don\'t underestimate my power.","My mom doesn\'t speak English very well.","I don\'t speak French well enough!","I was wondering if you were going to show up today.","Therein lies the problem.","How do you find food in outer space?","All you can do is trust one another.","Everyone wants to meet you. You\'re famous!","Why are you sorry for something you haven\'t done?","I utterly despise formal writing!","Whatever I do, she says I can do better.","You\'re not fast enough.","Life is hard, but I am harder.","Stop it! You\'re making her feel uncomfortable!","Nothing is beautiful but the truth.","I don\'t speak Japanese.","Nobody understands me.","I learned to live without her.","It\'s useless to keep on thinking any more.","I just wanted to check my email.","You can\'t expect me to always think of everything!","I suppose that behind each thing we have to do, there\'s something we want to do...","You really don\'t have the right priorities!","Don\'t expect others to think for you!","You never have time for important things!","It\'s no use pretending to make me believe that I believe things you don\'t believe!","It would take me too much time to explain to you why it\'s not going to work.","I\'m so dumb... I\'m trying to explain things to you that I don\'t understand myself.","Stop seeing me as a \\"normal\\" person!","Are you referring to me?","It can\'t be!","I wish I could care more about my grades but it seems that, at a certain point of my life, I decided they wouldn\'t be so important anymore.","A rolling stone gathers no moss is a proverb.","Would you like something to drink?","Who is it? \\"It\'s your mother.\\"","When will you be back? \\"It all depends on the weather.\\"","What\'s the matter? asked the little white rabbit.","What\'s going on in the cave? I\'m curious. \\"I have no idea.\\"","Uh... How\'s that working?","To tell you the truth, I am scared of heights. \\"You are a coward!\\"","This is what I was looking for! he exclaimed.","This looks pretty interesting, Hiroshi says.","Their communication may be much more complex than we thought.","Someday I\'ll run like the wind.","She likes music. \\"So do I.\\"","Please don\'t cry.","Let me know if there is anything I can do.","It is up to you to decide whether we will go there or not.","Class doesn\'t begin until eight-thirty.","I want a boat that will take me far away from here.","I feel like playing cards. \\"So do I.\\"","Haven\'t we met somewhere before? asked the student.","The archer killed the deer.","Communism will never be reached in my lifetime.","Rye was called the grain of poverty.","In the 1950\'s, the Finns were cited as having one of the least healthy diets in the world.","If you see a mistake, then please correct it.","Place the deck of cards on the oaken table."],"fr":["Lorsqu\'il a demand\xe9 qui avait cass\xe9 la fen\xeatre, tous les gar\xe7ons ont pris un air innocent.","Pour une fois dans ma vie je fais un bon geste... Et \xe7a ne sert \xe0 rien.","Qu\'est-ce que c\'est ?","Joyeux anniversaire Muiriel !","C’\xe9tait un m\xe9chant lapin.","Je ne peux pas vivre comme \xe7a.","Je ne fais que parler !","Quand je me suis r\xe9veill\xe9 j\'\xe9tais triste.","C’est ce qui est expliqu\xe9 \xe0 la fin.","Pourquoi demandes-tu ?","Je ne peux pas lui dire maintenant. Ce n’est pas si simple.","Combien de temps es-tu rest\xe9e ?","Je n’ai pas de compte sur ces forums.","Je n\'ai pas aim\xe9.","Elle demande comment c’est possible.","Je d\xe9teste \xe7a quand il y a trop de gens.","Il faut bien que mon ordinateur me serve \xe0 quelque chose.","Je dois te poser une question idiote.","J\'aurais pas imagin\xe9 qu\'un jour j\'irais chercher \xab viagra \xbb dans Wikip\xe9dia.","Je ne t\'aime plus.","Je n\'aurais pas d\xfb me d\xe9connecter.","Tu devines probablement ce qui va arriver.","Quelles autres options ai-je ?","Tu serais surprise de ce que tu peux apprendre en une semaine.","La vie est dure, mais je suis encore plus dur.","Supporter peut \xeatre insupportable.","Arr\xeate ! Tu la mets mal \xe0 l\'aise !","Rien n\'est beau que le vrai.","Demain, il va alunir.","C’est un jeu de mots.","Personne ne me comprend.","J\'ai appris \xe0 vivre sans elle.","\xc7a ne sert plus \xe0 rien de continuer \xe0 r\xe9fl\xe9chir.","J\'ai trop de choses dans la t\xeate ces jours-ci.","Je voulais juste v\xe9rifier mes emails.","Tu peux pas attendre de moi que je pense toujours \xe0 tout !","Je suppose que derri\xe8re chaque chose que l\'on doit faire, il y a quelque chose que l\'on veut faire...","T\'as vraiment pas les bonnes priorit\xe9s !","N\'attends pas que les autres pensent pour toi !","Tu n\'as jamais le temps pour les choses importantes !","Ce n\'est pas la peine de faire semblant de me faire croire que je crois des choses que tu ne crois pas !","\xc7a me prendrait trop de temps pour t\'expliquer pourquoi \xe7a ne va pas marcher.","Je suis trop b\xeate... J\'essaie de t\'expliquer des choses que je ne comprends pas moi-m\xeame.","Arr\xeate de me consid\xe9rer comme quelqu\'un de \xab\xa0normal\xa0\xbb\xa0!","Tu pourrais au moins essayer d\'\xeatre un peu plus poli, m\xeame si ce n\'est pas dans ta nature.","Il y aura toujours des choses que je n\'apprendrai jamais, je n\'ai pas l\'\xe9ternit\xe9 devant moi !","C\'est pas possible !","\xab\xa0Pierre qui roule n\'amasse pas mousse\xa0\xbb est un proverbe.","Veux-tu quelque chose \xe0 boire ?","\xab Qui est-ce ? \xbb \xab C\'est ta m\xe8re. \xbb","\xab Quand vas-tu revenir ? \xbb \xab Tout d\xe9pend du temps qu\'il fera. \xbb","\xab Qu\'est-ce qu\'il se passe dans la grotte ? Je suis curieux. \xbb \xab Je n\'en ai aucune id\xe9e. \xbb","Nous devons apprendre \xe0 vivre ensemble comme des fr\xe8res, ou nous p\xe9rirons ensemble comme des idiots.","Euh... Comment \xe7a marche ?","\xab Pour \xeatre franc, j\'ai le vertige. \xbb \xab Tu es un trouillard ! \xbb","\xab Fais-moi confiance \xbb, dit-il.","\xab C\'est ce que j\'\xe9tais en train de chercher \xbb, s\'exclama-t-il.","\xab \xc7a semble tr\xe8s int\xe9ressant \xbb, dit Hiroshi.","Il se peut que leur communication soit beaucoup plus complexe que nous le pensions.","\xab Le t\xe9l\xe9phone sonne. \xbb \xab Je vais r\xe9pondre. \xbb","\xab\xa0C\'est tr\xe8s gentil de votre part\xa0\xbb, r\xe9pondit Willie.","\xab Merci de m\'aider. \xbb \xab Il n\'y a pas de quoi.\xa0\xbb","Un jour je courrai comme le vent.","\xab Elle aime la musique. \xbb \xab Moi aussi. \xbb","S\'il te pla\xeet, ne pleure pas.","Fais-moi savoir s\'il y a quoi que ce soit que je puisse faire.","C\'est \xe0 toi de d\xe9cider si nous allons l\xe0-bas ou non.","\xc7a ne commence pas avant huit heures trente."],"es":["\xa1Intentemos algo!","Tengo que irme a dormir.","\xbfQu\xe9 est\xe1s haciendo?","\xa1Hoy es 18 de junio y es el cumplea\xf1os de Muiriel!","\xa1Feliz cumplea\xf1os, Muiriel!","Ahora, Muiriel tiene 20 a\xf1os.","La contrase\xf1a es \\"Muiriel\\".","Volver\xe9 pronto.","No tengo palabras.","Esto no acabar\xe1 nunca.","Simplemente no s\xe9 qu\xe9 decir...","Era un conejo malo.","\xbfEs una foto reciente?","No s\xe9 si tengo tiempo.","Por alguna raz\xf3n, el micr\xf3fono no hab\xeda funcionado hasta entonces.","Todo el mundo debe aprender por s\xed mismo al final.","La educaci\xf3n en este mundo me decepciona.","El aprendizaje no debe ser forzado, sino estimulado.","Es una tarea dif\xedcil elegir qu\xe9 est\xe1 \\"bien\\" o \\"mal\\", pero has de hacerlo.","Eso no va a cambiar nada.","Eso va a costar 30 €.","Gano 100 € al d\xeda.","Quiz\xe1s me d\xe9 pronto por vencido y en lugar de eso me eche una siesta.","Eso es porque no quieres estar solo.","Eso no va a pasar.","A veces \xe9l puede ser un chico raro.","Me voy a esforzar por no molestarte en tus estudios.","No te preocupes.","Los llamar\xe9 cuando regrese ma\xf1ana.","Siempre me gustaron m\xe1s los personajes misteriosos.","Deber\xedas dormir.","Les dije que me mandaran otro boleto.","Eres tan impaciente conmigo.","No puedo vivir as\xed.","Una vez quise ser astrof\xedsico.","Nunca me gust\xf3 la biolog\xeda.","La \xfaltima persona a la que le cont\xe9 mi idea pens\xf3 que yo estaba loco.","Desafortunadamente es verdad.","Est\xe1n muy ocupados pele\xe1ndose entre ellos, como para preocuparse por los ideales comunes.","La mayor\xeda de la gente cree que estoy loco.","\xa1No, no lo soy! \xa1Lo eres t\xfa!","\xa1Esa es mi frase!","\xbfEst\xe1s seguro?","Entonces tenemos un problema...","\xa1Ah, all\xed hay una mariposa!","\xa1Date prisa!","No me sorprende.","Si yo pudiera ser as\xed...","Por alguna raz\xf3n, me siento m\xe1s vivo por la noche.","Eso depende del contexto.","\xa1\xbfAcaso te quieres burlar de m\xed?!","Es la cosa m\xe1s est\xfapida que he dicho nunca.","\xa1\xa1No quiero ser pat\xe9tico, quiero ser guay!!","Cuando crezca, quiero ser un rey.","Estoy tan gordo.","\xbfEntonces qu\xe9?","Voy a pegarle un tiro.","No soy un pez de verdad, s\xf3lo soy un peluche.","\xa1Yo s\xf3lo lo digo!","Eso fue probablemente lo que influenci\xf3 su decisi\xf3n.","Siempre me he preguntado c\xf3mo ser\xe1 tener hermanos.","Esto es lo que yo habr\xeda dicho.","Eso es porque eres una chica.","Algunas veces no puedo evitar mostrar mis sentimientos.","Pensemos en lo peor que podr\xeda pasar.","\xbfCu\xe1ntos amigos \xedntimos tienes?","Yo puedo ser antisocial, pero eso no significa que no hable con la gente.","As\xed ha sido siempre.","Creo que lo mejor es no ser maleducado.","Uno siempre puede encontrar tiempo.","Cuando yo estaba en el instituto me levantaba a las 6 todas las ma\xf1anas.","Cuando me despert\xe9 estaba triste.","Por fin est\xe1 m\xe1s o menos explicado.","Si pudiera enviarte un malvavisco, Trang, lo har\xeda.","Para hacer eso, tienes que arriesgarte.","Todas las personas que est\xe1n solas, est\xe1n solas porque tienen miedo de los dem\xe1s.","\xbfPor qu\xe9 lo preguntas?","No puedo dec\xedrselo ahora. Ya no es tan simple.","Soy una persona que tiene muchos defectos, pero esos defectos pueden ser corregidos f\xe1cilmente.","\xbfCu\xe1nto tiempo estuviste?","Quiz\xe1s sea lo mismo para \xe9l.","La inocencia es una cosa hermosa.","No quiero perder mis ideas, aunque algunas de ellas sean un poco extremas.","Eso es intrigante.","\xbfQuieres decir que ocultas intencionalmente tu belleza?","Yo no tengo una cuenta en estos foros.","No sab\xeda de d\xf3nde ven\xeda eso.","No es importante.","T\xfa simplemente huyes de los problemas de la vida.","Hay un problema que no ves.","\xa1Puedes hacerlo!","A mi profesor de f\xedsica no le importa si me salto las clases.","Deseo poder ir a Jap\xf3n.","Odio cuando hay mucha gente.","Me tengo que ir a la cama.","No te preguntar\xe9 m\xe1s por hoy.","La polic\xeda te har\xe1 encontrar las balas.","Gracias por explicarme por fin por qu\xe9 la gente me toma por un idiota.","No era mi intenci\xf3n.","Gracias por tu explicaci\xf3n.","\xbfQu\xe9 ocurri\xf3?","No s\xe9 qu\xe9 quieres decir.","Mi ordenador tiene que ser \xfatil para algo.","\xbfQuer\xedas hablarme de libertad?","Si yo quisiera asustarte, te contar\xeda qu\xe9 fue lo que so\xf1\xe9 hace un par de semanas.","Uno no puede esperarse todo de los colegios.","Hay muchas palabras que no entiendo.","No me gusta cuando matem\xe1ticos que saben mucho m\xe1s que yo no pueden expresarse con claridad.","Necesito hacerte una pregunta tonta.","\xa1No s\xe9 c\xf3mo demostrarlo, ya que es tan evidente!","\xbfSe puede expresar de otra manera?","Nadie sabr\xe1.","Encontr\xe9 una soluci\xf3n, pero la encontr\xe9 tan r\xe1pido que no puede ser la correcta.","Salvo que aqu\xed no es tan simple.","Me gusta la luz de las velas.","\xbfQu\xe9 has respondido?","No, no es mi nuevo novio.","Es una l\xe1stima que yo no tenga que adelgazar.","\xa1\xbfNunca tienes clases o qu\xe9?!","Entonces voy a hacer un sudoku en vez de seguir molest\xe1ndote.","\xbfD\xf3nde est\xe1 el problema?","S\xf3lo puedo esperar.","Te quiero.","Ya no te quiero.","Tengo curiosidad.","\xa1Felicidades!","No quiero esperar tanto tiempo.","\xbfPor qu\xe9 no vienes a visitarnos?","Ya no s\xe9 qu\xe9 hacer.","Detesto la qu\xedmica.","Yo no quer\xeda que pasase esto.","Antes de que te des cuenta, saldr\xe1s en los peri\xf3dicos.","\xbfQu\xe9 otras opciones tengo?","No tengo nada mejor que hacer.","Tampoco lo puedo explicar.","Eso s\xf3lo muestra que no eres un robot.","\xbfC\xf3mo podr\xeda ser yo un robot? Si los robots no sue\xf1an.","No es algo que pueda hacer cualquiera.","No s\xe9 si todav\xeda lo tengo.","\xbfQu\xe9 piensas que estaba haciendo?","No subestimes mi poder.","Mi mam\xe1 no habla muy bien ingl\xe9s.","\xa1No hablo franc\xe9s lo suficientemente bien!","Me estaba preguntando si vendr\xedas hoy.","Ah\xed radica el problema.","\xbfC\xf3mo encuentras comida en el espacio?","Todos quieren conocerte. \xa1Eres famoso!","\xbfPor qu\xe9 lamentas algo que no has hecho?","\xa1Aborrezco profundamente la escritura formal!","La gente extranjera me intriga.","Cualquier cosa que hago, ella dice que puedo hacerlo mejor.","\xbfQu\xe9 te mantiene despierto hasta tan tarde?","Te sorprender\xeda lo que puedes aprender en una semana.","No tengo a nadie que viaje conmigo.","La vida es dura, pero yo soy m\xe1s duro.","\xa1Para ya! \xa1La est\xe1s haciendo sentir inc\xf3moda!","S\xf3lo la verdad es bella.","Ma\xf1ana, alunizar\xe1.","No hablo japon\xe9s.","Es un juego de palabras.","Nadie me entiende.","Aprend\xed a vivir sin ella.","No servir\xe1 de nada seguir pensando.","Tengo demasiadas cosas en la cabeza estos d\xedas.","\xbfRealmente necesitas preguntar para saber la respuesta?","\xa1No puedes esperar de m\xed que yo siempre piense en todo!","Supongo que detr\xe1s de cada cosa que tenemos que hacer, hay algo que queremos hacer...","\xa1No esperes que los dem\xe1s piensen por ti!","\xa1Nunca tienes tiempo para las cosas importantes!","\xa1No vale la pena que hagas como que me haces creer que creo cosas que t\xfa no crees!","Me llevar\xeda demasiado tiempo explicarte por qu\xe9 no va a funcionar.","Soy tan tonto... estoy intentando explicarte cosas que no entiendo ni yo.","\xa1Deja de mirarme como una persona \\"normal\\"!","Siempre habr\xe1 cosas que nunca aprender\xe9, \xa1no tengo toda la eternidad ante m\xed!","\xa1No puede ser!","\xbfTe gustar\xeda beber algo?","\xbfQui\xe9n es? \\"Es tu madre.\\"","—\xbfQu\xe9 pasa? —pregunt\xf3 el peque\xf1o conejo blanco.","\xbfQu\xe9 habr\xe1 en la cueva? Tengo curiosidad. \\"No tengo ni idea.\\"","—\xbfCu\xe1l es tu deseo? —pregunt\xf3 el peque\xf1o conejo blanco.","A decir verdad, tengo v\xe9rtigo. \\"\xa1Eres un cobarde!\\"","—\xa1Esto es lo que estaba buscando! —exclam\xf3 \xe9l.","—Esto parece muy interesante —dice Hiroshi.","El tel\xe9fono est\xe1 sonando. \\"Yo lo coger\xe9.\\"","Gracias por ayudarme. \\"No hay de qu\xe9.\\"","Alg\xfan d\xeda correr\xe9 como el viento.","A ella le gusta la m\xfasica. \\"A m\xed tambi\xe9n.\\"","Por favor, no llores.","Hazme saber si hay algo que yo pueda hacer.","Depende de ti decidir si vamos all\xed o no.","Quiero un barco que me lleve lejos de aqu\xed.","Tengo ganas de jugar a las cartas. \\"Yo tambi\xe9n.\\"","Un japon\xe9s nunca har\xeda tal cosa.","Allen es un poeta.","El arquero mat\xf3 al ciervo.","Si ves un error, entonces corr\xedgelo, por favor.","Los alemanes son muy listos.","Si no comes, te mueres.","\xbfC\xf3mo se escribe \\"pretty\\"?","\xbfPor qu\xe9 no nos vamos a casa?","Lo siento, no puedo quedarme mucho tiempo."],"ja":["お誕生日おめでとうムーリエル！","パスワードは「Muiriel」です。","すぐに戻ります。","知らない。","何と言ったら良いか分かりません。","きりがない。","何と言ったらいいか・・・。","私は山にいました。","時間があるか分かりません。","先程、どういうわけかマイクが入りませんでした。","私は一日に100ユーロ稼ぎます。","すぐに諦めて昼寝をするかも知れない。","それはあなたが一人になりたくないからです。","そんなことは起きないでしょう。","彼は時々変です。","あなたの勉強を邪魔しないようにします。","長い目で見れば違ってくると思います。","会えなくて淋しい。","明日帰ったら電話します。","私はいつも不思議な性格の方が好きだった。","眠った方がいいよ。","行くよ。","私は彼らにチケットをもう一枚送ってくれるように頼んだ。","君は僕にとてもいらいらしている。","私はそんな風には生きられない。","私は一時期、天体物理学者になりたかった。","生物学は好きになれません。","僕が最後に自分の考えを伝えた人は、僕を気違いだと思ったようだ。","残念ながらそれは本当なのです。","大抵の人は僕を気違いだと思っている。","それは私の台詞だよ！","本当？","そうしたらひとつ問題があって・・・。","あ！蝶々がいる！","驚くことではないね。","私はなぜか夜の方が元気だ。","それは文脈による。","冗談でしょ！？","大きくなったら王様になりたい。","お金を稼ぎたいならアメリカが一番だ。","僕はすごく太ってる。","だから何？","こらしめてやる。","言ってみただけだよ！","それで彼らの気が変わったのかも知れない。","兄弟がいるとどんなだろうといつも思う。","私ならそう言っただろうと思う。","いつまでかかっても全部を説明するのは無理だ。","あなたが女の子だからよ。","時々感情が抑えられないことがある。","最悪の場合を考えておこう。","親友は何人いる？","そういうものなんです。","失礼に振舞ったりしないのが一番だと思う。","時間はいくらでも作れる。","高校生の時は毎朝6時に起きていた。","あなたは新しいことを勉強したいのだと思った。","それをするためには危険を冒さなければならない。","孤独な人は、他人を恐れるから一人なのだ。","なんで聞くの？","もう彼女には言えないよ。そんなに単純なことではなくなってきたからね。","傷を付けたのは私だけど、こんなの簡単に直せる傷よ。","欲しいものがみつかると、決まって高いものだ。","どのくらいいたの？","たぶん彼にしてみれば同じことよ。","潔白であることは美しいことだ。","人間は決して永遠には生きられないものだ。","それは面白い。","自分のかっこ良さをわざと隠すということ？","もし誰かにこの話の要点は何かって尋ねられても、私はさっぱりわからないわ。","それがどこから来たのか分からなかった。","僕が君と一緒に住んだことは君の人生観に影響を与えたと思う。","これは重要ではない。","好きにはなれなかった。","君はただ人生の問題から逃げているだけだよ。","歌詞を見てみれば、あまり意味が無いことに気付くでしょう。","君の気付いていない問題がある。","できるよ！","私の物理の先生は授業をサボっても気にしない。","日本へ行けたらいいのに。","人ごみは大嫌い。","今日はもう聞かないよ。","来週には凍るかも知れない。","謝罪はあったにせよ、私はまだ彼に腹を立てている。","警察はあなたに弾丸をみつけさせるでしょう。","そんなつもりではなかったんだ。","説明してくれてありがとう。","何が起きたの？","丸一日オンラインで君を見ないなんてびっくりだよ。","何が言いたいのか分からないなあ。","私のパソコンは何かの役に立つはずだ。","自由について私に話したかったの？","恐い話が聞きたいなら、数週間前に私が見た夢のことを話してあげるよ。","学校に全てを求めることはできない。","分からない言葉がたくさんある。","何か他の言い方はある？","誰にも分からないよ。","面白そう！","だけど、ここではそんなに簡単ではないんです。","私はロウソクの灯りって好きだな。","何て答えたの？","違うよ、新しい彼じゃない。","授業が全然無いとでも言うの？！","何が問題なの？","待つしかない。","そんなに驚くことじゃないよね？","愛してる。","もう好きじゃない。","おめでとうございます。","そんなに待ちたくない。","家に来ませんか。","でも可能性は低そうだね。","ログアウトするんじゃなかったよ。","もう何をしたらいいか分からない。","いつかフランスに行くことは避けられない、それがいつかは分からないけれど。","化学が嫌いだ。","こんなことにはなって欲しくなかった。","君には何が起こるか分かるんじゃないかと思うけどね。","君が次に分かることは君が新聞に載るってことだ。","他にどんな選択肢があるの？","僕はそんなに旅行好きではない。","誰にでも長所と短所がある。","でもほんとに、エピソード21には涙が出るほど笑ったよ。","君がロボットではないってことは分かる。","それは誰にでもできるというものではない。","まだ持ってるか分からないなあ。","何をしてたと思う？","私の力を甘く見ないで。","私の母はあまり英語が上手に話せない。","そこに問題がある。","宇宙でどうやって食べ物をみつけるの？","お互いを信頼し合うしかない。","みんなあなたに会いたがってる。あなたは有名なのよ！","してもいないことをどうして謝るの？","外国人って面白いなあ。","何でこんなに遅くまで起きてるの？","一緒に旅行してくれる人がいないんだ。","真実のみが美しい。","明日、彼は月に着陸する。","私は日本語が話せない。","これは駄洒落です。","誰も私のことを分かってくれない。","僕は彼女無しに生きる術を学んだ。","これ以上考えても無駄だ。","最近考えることが多過ぎる。","メールをチェックしたかっただけ。","何でうまくいかないか君に説明するにはずいぶん時間がかかりそうだ。","うまく言えないんだけど・・・自分も理解していないことを君に説明しようとしてるんだ。","私のことを凡人だと思うのはやめて！","もっと成績を気にかけられればいいのだけれど、でも自分の人生のある点において成績はそんなに重要ではないと分かったんだ。","何かお飲みになりますか？","「どなたですか」「お母さんよ」","「どうかしたの？」と小さな白いウサギが聞きました。","はぁ・・・（汗）、それでコンタクトは取れるようになったのかしら・・・？","「実を言うと、俺、高所恐怖症なんだ。」　「臆病者っ！」","「信用して」と彼は言った。","「これが探していたものだ」と彼は叫んだ。","「これはとてもおもしろそうだね」とひろしが言います。","彼らのコミュニケーションは我々が考えてきたものよりはるかに複雑かもしれません。","「電話が鳴っているよ。」　「私が出ます。」","「おっさん、やさしいなー。」ウィリーは言った。","「手伝ってくれてありがとう」「どういたしまして」","またいつか風のように走るんだ。","お願いだから泣かないで。","何か私にできることがありましたらお知らせ下さい。","そこで私たちを待っている幸福が、私たちが望むような幸福ではないかもしれない。","ここから遠くまで行けるボートが欲しいです。","「トランプしたいなあ。」「私も。」","「以前にどこかで会ったことがありませんか」とその学生はたずねた。","日本人ならそんなことはけっしてしないでしょう。","私の生きているうちに共産主義が効力を持つことは無いだろう。","もし間違いを見つけたら訂正してください。","ドイツ人はとてもずる賢い。","人は食事を取らなければ死んでしまう。","「ｐｒｅｔｔｙ」の綴りは？","家に帰りましょうか。","申し訳ないけど長居できないんですよ。","「どうして行かないの？」「行きたくないからだよ。」","１００万人の人々がその戦争で命を落とした。","３年前に東京へ来て以来ここに住んでいる。","１か月あまり名古屋に居たことがある。","あぁ私の白いズボンが！新しいのに。","私が駅を出た時、男の人を見た。","それで誰もあなたを助けなかったの？","君は天使のような人だ！"]}'),a=n(6607);n(86319),n(51293),n(71691);let o=e=>{let{choiceId:t,isCorrect:n,questionId:r,isRevealed:a}=e;return{variation:"multiple-choice",choiceId:t,isCorrect:n,questionId:r,isRevealed:a}},i=(e,t)=>[...e.filter(e=>e.questionId!==t.questionId),t],s=e=>/^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/.test(e),u=e=>{let[t,,n]=e.replace(/(>|<)/gi,"").split(/(vi\/|v=|\/v\/|youtu\.be\/|\/embed\/)/);return void 0!==n?n.split(/[^0-9a-z_-]/i)[0]:t},l=e=>({id:e,text:e}),d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;try{let n=r[e].filter(e=>e.length>=50);return(0,a.KS)(n,t)}catch(e){return console.error("Failed to get example sentences",e),[]}},c=()=>({id:(0,a.Ox)(),text:"Edit Choice"})},81723:function(e,t,n){n.d(t,{aG:function(){return d}}),n(86319),n(29953);var r=n(6607),a=n(71691);let o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{...a.P5,...e,id:(0,r.Ox)()}},i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{...a.d9,...e,id:(0,r.Ox)()}},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{...a.Qq,...e,id:(0,r.Ox)()}},u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{...a.Tq,...e,id:(0,r.Ox)()}},l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{...a.wK,...e,id:(0,r.Ox)()}},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(e){case"multiple-choice":default:return o(t);case"cloze":return s(t);case"multi-select":return i(t);case"open-ended":return u(t);case"task":return l(t)}}},25615:function(e,t,n){n.d(t,{h:function(){return tF},TL:function(){return tR},CG:function(){return tD}});var r=n(42638),a=n(93046),o=n(93744),i=n(41302),s=n(89180),u=n(42935),l=n(33776),d=n(6607);let c={errorMessage:"",requestStatus:"not-started",text:"",items:[]},p="playground/testStream",m=(e,t)=>{let{rootState:n,...r}=t,a=(0,d.Fp)({...r});(0,l.Kz)(e,a)},g=(0,r.hg)(p,async(e,t)=>{let{rejectWithValue:n}=t;return e}),f=(0,r.oM)({name:"playground",initialState:c,reducers:{setPlaygroundErrorMessage:(e,t)=>{e.errorMessage=t.payload},clearPlaygroundErrorMessage:e=>{e.errorMessage=""},updateDataFromStream:(e,t)=>{e.items.push(t.payload)},resetPlaygroundState:()=>c},extraReducers:e=>{e.addCase(g.pending,(e,t)=>{e.requestStatus="pending",m((0,u.xr)(p),{actionArgs:t.meta.arg})}).addCase(g.rejected,(e,t)=>{e.requestStatus="failed";let{error:n}=t.payload;e.errorMessage=n,m((0,u.Kq)(p),{actionArgs:t.meta.arg,error:n})}).addCase(g.fulfilled,(e,t)=>{e.requestStatus="successful",m((0,u.wV)(p),{actionArgs:t.meta.arg,actionPayload:t.payload})}).addCase(S,(e,t)=>{e.text+=t.payload})}}),{setPlaygroundErrorMessage:h,clearPlaygroundErrorMessage:y,resetPlaygroundState:v,updateDataFromStream:S}=f.actions;var w=f.reducer,b=n(94960);function*I(e){try{let t=(e,t,n)=>(0,b.sg)({input:e,onDataReceived:t,onError:n,endpoint:"test_stream"}),n=(0,i.GG)(n=>(t(e.payload,e=>{n(e)},e=>{console.error("Error while fetching streaming data:",e)}),()=>{}));for(;;){let e=yield(0,s.qn)(n);yield(0,s.gz)(S(e))}}catch(e){console.error("Error while fetching streaming data:",e.message)}}var U=n(97281),E=n(29953);function*x(e){yield(0,s.gz)((0,U.dv)("pending"));try{let t=(t,n,r)=>(0,b.UL)({input:t,onDataReceived:n,onError:r,endpoint:e.meta.arg.endpoint||"stream_text_modification",useEdgeProxy:!0}),n=(0,i.GG)(n=>(t(e.payload,e=>{n(e)},e=>{(0,l.Pk)(e);let t={status:"failed",message:E.dd,error:E.dd,modifiedText:"",warning:""};n(t),n(i.uR)}),()=>{}));for(;;){let e=yield(0,s.qn)(n);yield*function*(e){let{status:t,message:n,modifiedText:r,textStats:a,error:o,warning:i}=e;if(n&&(yield(0,s.gz)((0,U.Xb)(n))),i&&(yield(0,s.gz)((0,U.dJ)(i||""))),"pending"===t)yield(0,s.gz)((0,U.d9)({markdown:r,text:r,html:""}));else if("successful"===t){if(yield(0,s.gz)((0,U.dv)("successful")),yield(0,s.gz)((0,U.lx)(!1)),yield(0,s.gz)((0,U.d9)({markdown:r||"",text:r||"",html:""})),a){let{originalTextStats:e,modifiedTextStats:t}=a;yield(0,s.gz)((0,U.Zr)(e)),yield(0,s.gz)((0,U.kx)(t))}}else"failed"===t&&(yield(0,s.gz)((0,U.dv)("failed")),yield(0,s.gz)((0,U.lx)(!1)),yield(0,s.gz)((0,U.jE)(o||E.dd)))}(e)}}catch(e){(0,l.Pk)(e,{function:"textModificationStreamGenerator"})}}var C=n(2338),q=n(97088),T=n(86319),P=n(71691),A=n(38132);let k=Date.now(),L=(e,t)=>{switch(t){case"standard":e.quizFocus="vocabulary";break;case"dialogue":e.targetLanguage="en",e.sourceType="text"}},N=(e,t,n)=>{var r,a,o;switch(t){case"text":case"pre-written-sentences":e.sourceUrl="",e.sourceText=(null===(r=P.VP[n])||void 0===r?void 0:r.exampleRandomSentences)||"";break;case"web-page":e.sourceText="",e.sourceUrl=(null===(a=P.VP[n])||void 0===a?void 0:a.webPageUrl)||"";break;case"youtube":e.sourceText="",e.sourceUrl=(null===(o=P.VP[n])||void 0===o?void 0:o.youtubeVideoUrl)||"";break;case"words":e.sourceText="",e.sourceUrl="",e.wordsInput=["recall","reimburse","recruit","unanimous","anonymous"]}},G=(e,t)=>{let n=e.sourceType;"ja"!==t&&T.ed.includes(e.quizFocus)&&(e.quizFocus=T.zg),"custom-grammar-sentences"===e.sourceType&&"en"!==t&&(e.quizFocus=T.zg,e.sourceType=T.hj),"ja"===t&&"youtube"===n&&(e.sourceType=T.hj,n=T.hj),"en"===t&&"comprehension"===e.quizFocus&&"words"===e.sourceType&&(e.sourceType=T.hj,n=T.hj),N(e,n,t)},M=(e,t)=>{if("grammar_point"===t){e.sourceType="custom-grammar-sentences",e.grammarPoint="prepositions",e.contentTheme="the office";return}["web-page","text"].includes(e.sourceType)||(e.sourceType="text")},z=(e,t)=>{let n=e.primaryOption;if(T.mI.includes(t)){e.targetLanguage=t,e.quizFocus="vocabulary",G(e,n);return}"topic-comprehension"===n&&(e.targetLanguage="en",e.quizFocus="comprehension",e.sourceType="text",e.questionCount=3,e.sourceText=P.Ix)},W=(e,t)=>{Object.keys(t).forEach(n=>{t[n]&&(e[n]=t[n])}),"comprehension"===t.quizFocus?e.primaryOption="topic-comprehension":e.primaryOption=t.targetLanguage},j={id:"",grammarPoint:"",contentTheme:"",targetLanguage:"en",userLanguage:"en",sourceType:"youtube",title:"",description:"",sourceUrl:P.Rv,questions:[],answers:[],tentativeAnswers:[],errorMessage:"",difficulty:"",requestStatus:"not-started",userId:q.xh,sourceText:"",wordsInput:[],currentQuestionIndex:0,isStarted:!1,isFinished:!1,timerEnabled:!0,timerStatus:"stopped",currentTime:k,timerDuration:T.WS,timerExpireTime:null,timerStartedTime:null,timerStoppedTime:null,quizFocus:"vocabulary",questionCount:T.zh,format:"standard",youtubeVideoId:"",authorId:"",isSavedQuiz:!1,view:"quiz-generator",primaryOption:"en",quickAnswerMode:!1,score:0,initialized:!1,sessionName:"",shouldTrackSessions:!1},B=(0,r.oM)({name:"quiz",initialState:j,reducers:{setSessionName:(e,t)=>{e.sessionName=t.payload},setShouldTrackSessions:(e,t)=>{e.shouldTrackSessions=t.payload},setSourceText:(e,t)=>{e.sourceText=t.payload},clearSourceText:(e,t)=>{e.sourceText=""},setSourceUrl:(e,t)=>{e.sourceUrl=t.payload},clearSourceUrl:e=>{e.sourceUrl=""},setSourceType:(e,t)=>{let n=t.payload,{targetLanguage:r}=e;e.sourceType=n,N(e,n,r)},setVocabularyWords:(e,t)=>{e.wordsInput=t.payload},clearVocabularyWords:e=>{e.wordsInput=[]},setTargetLanguage:(e,t)=>{let n=t.payload;e.targetLanguage=n,G(e,n)},setErrorMessage:(e,t)=>{e.errorMessage=t.payload},clearErrorMessage:e=>{e.errorMessage=""},startQuiz:e=>{e.isStarted=!0},addAnswer:(e,t)=>{e.answers=(0,A.gh)(e.answers,t.payload)},setAnswers:(e,t)=>{e.answers=t.payload},setIsTimerEnabledInQuizCreation:(e,t)=>{e.timerEnabled=t.payload},clearAnswers:e=>{e.answers=[]},addTentativeAnswer:(e,t)=>{e.tentativeAnswers=(0,A.gh)(e.tentativeAnswers,t.payload)},setTentativeAnswers:(e,t)=>{e.tentativeAnswers=t.payload},clearTentativeAnswers:e=>{e.tentativeAnswers=[]},setCurrentQuestionIndex:(e,t)=>{e.currentQuestionIndex=t.payload},goToNextQuestion:e=>{let t=e.questions.length-1;e.currentQuestionIndex!==t&&(e.currentQuestionIndex=e.currentQuestionIndex+1)},goToPreviousQuestion:e=>{let t=e.questions.length-1,n=0===e.currentQuestionIndex?t:e.currentQuestionIndex-1;e.currentQuestionIndex=n},resetQuiz:e=>{e.currentQuestionIndex=0,e.answers=[],e.tentativeAnswers=[],e.isStarted=!1,e.isFinished=!1},finishQuiz:e=>{e.isFinished=!0},setUserId:(e,t)=>{e.userId=t.payload},tickTimer:e=>{let t=Date.now();e.currentTime=t},setTimerStatus:(e,t)=>{e.timerStatus=t.payload},setTimerDuration:(e,t)=>{e.timerDuration=t.payload},setQuizView:(e,t)=>{e.view=t.payload},setIsQuizPageInitialized:(e,t)=>{e.initialized=t.payload},clearTimer:e=>{e.timerStatus="stopped";let t=Date.now();e.timerStatus="running",e.currentTime=t,e.timerExpireTime=null,e.timerStartedTime=null,e.timerStoppedTime=null},stopTimer:e=>{e.timerStatus="stopped"},startTimer:e=>{let t=Date.now();e.timerStatus="running";let n=1e3*(e.timerDuration||T.WS);e.currentTime=t,e.timerExpireTime=t+n,e.timerStartedTime=null,e.timerStoppedTime=null},setQuizFocus:(e,t)=>{e.quizFocus=t.payload,M(e,t.payload)},setGrammarPoint:(e,t)=>{e.grammarPoint=t.payload},setContentTheme:(e,t)=>{e.contentTheme=t.payload},setQuizFormat:(e,t)=>{let n=t.payload;e.format=n,L(e,n)},setQuestionCount:(e,t)=>{e.questionCount=t.payload},updateQuizOptions:(e,t)=>{W(e,t.payload)},addToScore:(e,t)=>{e.score+=t.payload},setQuizPrimaryOption:(e,t)=>{e.primaryOption=t.payload,z(e,t.payload)},toggleQuizAnswerMode:(e,t)=>{e.quickAnswerMode=t.payload},resetQuizBuilder:(e,t)=>{let n=t.payload;return{...j,...n,primaryOption:"comprehension"===n.quizFocus?"topic-comprehension":n.targetLanguage||j.primaryOption}}}}),{setSourceText:F,setSourceUrl:R,clearSourceUrl:D,setSourceType:O,clearSourceText:Q,setErrorMessage:_,clearErrorMessage:V,setVocabularyWords:J,clearVocabularyWords:K,setTargetLanguage:H,startQuiz:X,setAnswers:Y,addAnswer:$,clearAnswers:Z,setTentativeAnswers:ee,addTentativeAnswer:et,clearTentativeAnswers:en,setCurrentQuestionIndex:er,goToNextQuestion:ea,goToPreviousQuestion:eo,resetQuiz:ei,finishQuiz:es,setUserId:eu,setTimerStatus:el,startTimer:ed,stopTimer:ec,tickTimer:ep,clearTimer:em,resetQuizBuilder:eg,setQuizFocus:ef,setQuestionCount:eh,setQuizFormat:ey,setQuizView:ev,setQuizPrimaryOption:eS,setGrammarPoint:ew,setContentTheme:eb,updateQuizOptions:eI,addToScore:eU,toggleQuizAnswerMode:eE,setIsQuizPageInitialized:ex,setIsTimerEnabledInQuizCreation:eC,setTimerDuration:eq,setSessionName:eT,setShouldTrackSessions:eP}=B.actions;var eA=B.reducer,ek=n(816),eL=n(51293);let eN=[{id:"Plants and animals have observable features",similarity:0,description:"Plants and animals have observable features",sampleQuestions:["How do the different features of plants and animals help them meet their basic needs? What basic needs do plants and animals have in common? What are your basic needs?"],courseId:"Science K",courseName:"Science K",courseUrl:"https://curriculum.gov.bc.ca/curriculum/science/k/core",courseGradeLevel:"K",courseSubject:"Science"},{id:"Humans interact with matter every day through familiar materials",similarity:0,description:"Humans interact with matter every day through familiar materials",sampleQuestions:["What is matter? How do you interact with matter? What qualities do different forms of matter have?"],courseId:"Science K",courseName:"Science K",courseUrl:"https://curriculum.gov.bc.ca/curriculum/science/k/core",courseGradeLevel:"K",courseSubject:"Science"},{id:"The motion of objects depends on their properties",similarity:0,description:"The motion of objects depends on their properties",sampleQuestions:["How can you make objects move? How does the shape or size of an object affect the object's movement? How does the material the object is made of affect the object's movement?"],courseId:"Science K",courseName:"Science K",courseUrl:"https://curriculum.gov.bc.ca/curriculum/science/k/core",courseGradeLevel:"K",courseSubject:"Science"},{id:"Daily and seasonal changes affect all living things",similarity:0,description:"Daily and seasonal changes affect all living things",sampleQuestions:["What daily and seasonal changes can you see or feel? How are plants and animals affected by daily and seasonal changes?"],courseId:"Science K",courseName:"Science K",courseUrl:"https://curriculum.gov.bc.ca/curriculum/science/k/core",courseGradeLevel:"K",courseSubject:"Science"},{id:"Living things have features and behaviours that help them survive in their environment",similarity:0,description:"Living things have features and behaviours that help them survive in their environment",sampleQuestions:["How do local plants and animals depend on their environment? How do plants and animals use their features to respond to stimuli in their environments? How do plants and animals adapt when their basic needs are not being met?"],courseId:"Science 1",courseName:"Science 1",courseUrl:"https://curriculum.gov.bc.ca/curriculum/science/1/core",courseGradeLevel:"1",courseSubject:"Science"},{id:"Matter is useful because of its properties",similarity:0,description:"Matter is useful because of its properties",sampleQuestions:["What makes the properties of matter useful? How do the properties of materials help connect to the function of materials?"],courseId:"Science 1",courseName:"Science 1",courseUrl:"https://curriculum.gov.bc.ca/curriculum/science/1/core",courseGradeLevel:"1",courseSubject:"Science"},{id:"Light and sound can be produced and their properties can be changed",similarity:0,description:"Light and sound can be produced and their properties can be changed",sampleQuestions:["How can you explore the properties of light and sound? What discoveries did you make?"],courseId:"Science 1",courseName:"Science 1",courseUrl:"https://curriculum.gov.bc.ca/curriculum/science/1/core",courseGradeLevel:"1",courseSubject:"Science"},{id:"Observable patterns and cycles occur in the local sky and landscape",similarity:0,description:"Observable patterns and cycles occur in the local sky and landscape",sampleQuestions:["What kinds of patterns in the sky and landscape are you aware of? How do patterns and cycles in the sky and landscape affect living things?"],courseId:"Science 1",courseName:"Science 1",courseUrl:"https://curriculum.gov.bc.ca/curriculum/science/1/core",courseGradeLevel:"1",courseSubject:"Science"},{id:"Living things have life cycles adapted to their environment",similarity:0,description:"Living things have life cycles adapted to their environment",sampleQuestions:["Why are life cycles important? How are the life cycles of local plants and animals similar and different? How do offspring compare to their parents?"],courseId:"Science 2",courseName:"Science 2",courseUrl:"https://curriculum.gov.bc.ca/curriculum/science/2/core",courseGradeLevel:"2",courseSubject:"Science"},{id:"Materials can be changed through physical and chemical processes",similarity:0,description:"Materials can be changed through physical and chemical processes",sampleQuestions:["Why would we want to change the physical properties of an object? What are some natural processes that involve chemical and physical changes?"],courseId:"Science 2",courseName:"Science 2",courseUrl:"https://curriculum.gov.bc.ca/curriculum/science/2/core",courseGradeLevel:"2",courseSubject:"Science"},{id:"Local actions have global consequences, and global actions have local consequences.",similarity:0,description:"Local actions have global consequences, and global actions have local consequences.",sampleQuestions:[""],courseId:"Social Studies 2 - Regional and Global Communities",courseName:"Social Studies 2 - Regional and Global Communities",courseUrl:"https://curriculum.gov.bc.ca/curriculum/social-studies/2/core",courseGradeLevel:"2",courseSubject:"Social Studies"},{id:"Individuals have rights and responsibilities as global citizens.",similarity:0,description:"Individuals have rights and responsibilities as global citizens.",sampleQuestions:[""],courseId:"Social Studies 2 - Regional and Global Communities",courseName:"Social Studies 2 - Regional and Global Communities",courseUrl:"https://curriculum.gov.bc.ca/curriculum/social-studies/2/core",courseGradeLevel:"2",courseSubject:"Social Studies"},{id:"The physical environment influences the nature of political, social, and economic change.",similarity:0,description:"The physical environment influences the nature of political, social, and economic change.",sampleQuestions:[""],courseId:"Social Studies 9",courseName:"Social Studies 9",courseUrl:"https://curriculum.gov.bc.ca/curriculum/social-studies/9/core",courseGradeLevel:"9",courseSubject:"Social Studies"},{id:"Rapid industrialization, urbanization, and economic growth in Asia in the late 20th century have created complex social, political, and environmental challenges (adapted from Asian Studies 12 2013 1850-present).",similarity:0,description:"Rapid industrialization, urbanization, and economic growth in Asia in the late 20th century have created complex social, political, and environmental challenges (adapted from Asian Studies 12 2013 1850-present).",sampleQuestions:[""],courseId:"Explorations in Social Studies 11",courseName:"Explorations in Social Studies 11",courseUrl:"https://curriculum.gov.bc.ca/curriculum/social-studies/11/explorations-in-social-studies",courseGradeLevel:"11",courseSubject:"Social Studies"},{id:"Decision making in urban and regional planning requires balancing political, economic, social, and environmental factors (from Urban Studies 12).",similarity:0,description:"Decision making in urban and regional planning requires balancing political, economic, social, and environmental factors (from Urban Studies 12).",sampleQuestions:[""],courseId:"Explorations in Social Studies 11",courseName:"Explorations in Social Studies 11",courseUrl:"https://curriculum.gov.bc.ca/curriculum/social-studies/11/explorations-in-social-studies",courseGradeLevel:"11",courseSubject:"Social Studies"}],eG=["Local actions have global consequences, and global actions have local consequences.","Rapid industrialization, urbanization, and economic growth in Asia in the late 20th century have created complex social, political, and environmental challenges (adapted from Asian Studies 12 2013 1850-present).","Individuals have rights and responsibilities as global citizens.","Decision making in urban and regional planning requires balancing political, economic, social, and environmental factors (from Urban Studies 12).","The physical environment influences the nature of political, social, and economic change."].map((e,t)=>({id:e,similarity:.6+.05*t})),eM=async e=>{try{let t=await fetch("".concat(E.LB,"/get_idea_suggestions"),{body:JSON.stringify(e),credentials:"include",headers:{"Content-Type":"application/json"},method:"POST"});return await t.json()}catch(e){return console.error("Failed to generate activity",e),{error:"Something went wrong",suggestions:[]}}},ez=async()=>(await (0,d.Dc)(E.uR),{error:"",suggestions:eG}),eW=async e=>eL.xR?ez():await eM(e),ej=async()=>{try{let e=await fetch("".concat(E.LB,"/get_all_ideas"),{credentials:"include",headers:{"Content-Type":"application/json"},method:"GET"});return await e.json()}catch(e){return console.error("Failed to generate activity",e),{error:"Something went wrong",ideas:[]}}},eB=async()=>(await (0,d.Dc)(E.uR),{error:"",ideas:eN}),eF=async()=>eL.xR?eB():await ej(),eR=(e,t)=>{let n={...e.appliedIdeaIdsMap};t.forEach(e=>{n[e]=!0}),e.appliedIdeaIdsMap=n},eD=(e,t)=>{let n={};Object.keys(e.appliedIdeaIdsMap).forEach(e=>{t.includes(e)||(n[e]=!0)}),e.appliedIdeaIdsMap=n},eO=e=>{let t={};return e.forEach(e=>{t[e.id]=e.similarity}),t},eQ=e=>e.sort((e,t)=>t.similarity-e.similarity);var e_=n(28742),eV=n(85287);let eJ=e=>(0,d.Fp)({userId:(0,eV.c7)(e),userType:(0,eV.W$)(e)});(0,e_.P1)(e=>e.courseLinks.errorMessage,e=>!!e),(0,e_.P1)(e=>e.courseLinks.requestStatus,e=>"pending"===e);let eK=e=>e.courseLinks.ideas;(0,e_.P1)(eK,e=>e.courseLinks.suggestedIdeasMap,(e,t)=>eQ(e.filter(e=>t[e.id]))),(0,e_.P1)(eK,e=>e.courseLinks.appliedIdeaIdsMap,(e,t)=>e.filter(e=>t[e.id])),(0,e_.P1)(eV.c7,eV.W$,e=>e.courseLinks.text,(e,t,n)=>({userId:e,userType:t,text:n}));let eH={ideasTab:"all",errorMessage:"",requestStatus:"not-started",text:"",ideas:[],suggestedIdeasMap:{},appliedIdeaIdsMap:{}},eX=(e,t)=>{let{rootState:n,...r}=t,a=(0,d.Fp)({...r,...n?eJ(n):{}});(0,l.Kz)(e,a)},eY="courseLinks/getIdeaSuggestions",e$=(0,r.hg)(eY,async(e,t)=>{var n;let{rejectWithValue:r,getState:a}=t,o=await eW(e),i=a();return(null==o?void 0:null===(n=o.suggestions)||void 0===n?void 0:n.length)?{...o,rootState:i}:r({...o,rootState:i})}),eZ="courseLinks/getAllIdeas",e0=(0,r.hg)(eZ,async(e,t)=>{var n;let{rejectWithValue:r,getState:a}=t,o=await eF(),i=a();return(null==o?void 0:null===(n=o.ideas)||void 0===n?void 0:n.length)?{...o,rootState:i}:r({...o,rootState:i})}),e1=(0,r.oM)({name:"courseLinks",initialState:eH,reducers:{setCourseLinksErrorMessage:(e,t)=>{e.errorMessage=t.payload},clearCourseLinksErrorMessage:e=>{e.errorMessage=""},setCourseLinksText:(e,t)=>{e.text=t.payload},setCourseLinksIdeasTab:(e,t)=>{e.ideasTab=t.payload},clearCourseLinksText:e=>{e.text=""},applyIdeas:(e,t)=>{eR(e,t.payload)},unapplyIdeas:(e,t)=>{eD(e,t.payload)},clearSuggestedIdeas:e=>{e.suggestedIdeasMap={}},resetCourseLinksState:()=>eH},extraReducers:e=>{e.addCase(e0.pending,(e,t)=>{e.requestStatus="pending",eX((0,u.xr)(eZ),{actionArgs:t.meta.arg})}).addCase(e0.rejected,(e,t)=>{e.requestStatus="failed",eX((0,u.Kq)(eZ),{actionArgs:t.meta.arg})}).addCase(e0.fulfilled,(e,t)=>{e.requestStatus="successful";let{ideas:n}=t.payload;e.ideas=n,eX((0,u.wV)(eZ),{actionArgs:t.meta.arg,actionPayload:t.payload})}).addCase(e$.pending,(e,t)=>{e.requestStatus="pending",eX((0,u.xr)(eY),{actionArgs:t.meta.arg})}).addCase(e$.rejected,(e,t)=>{e.requestStatus="failed",eX((0,u.Kq)(eY),{actionArgs:t.meta.arg})}).addCase(e$.fulfilled,(e,t)=>{e.requestStatus="successful";let{suggestions:n}=t.payload;e.suggestedIdeasMap=eO(n),e.ideasTab="suggested",eX((0,u.wV)(eY),{actionArgs:t.meta.arg,actionPayload:t.payload})})}}),{setCourseLinksErrorMessage:e2,clearCourseLinksErrorMessage:e3,resetCourseLinksState:e5,setCourseLinksText:e9,clearCourseLinksText:e7,setCourseLinksIdeasTab:e6,applyIdeas:e8,unapplyIdeas:e4,clearSuggestedIdeas:te}=e1.actions;var tt=e1.reducer,tn=n(51294),tr=n(24086);let ta=e=>{let{id:t,userId:n,createdAt:r,name:a,...o}=e;return{id:t,userId:n,createdAt:new Date(r.toDate()).toDateString(),name:a,params:JSON.stringify(o,null,2)}},to=async e=>{try{if(!tn.mz)return[];let t=(0,tr.IO)((0,tr.hJ)(tn.mz,"events"),(0,tr.ar)("userId","==",e)),n=await (0,tr.PL)(t),r=[];return n.forEach(e=>{r.push({...ta(e.data()),id:e.id})}),r}catch(e){return console.error("Failed to fetch events",e),[]}},ti={errorMessage:"",requestStatus:"not-started",events:[],text:""},ts=(0,r.hg)("Admin/getUserEvents",async(e,t)=>{let{rejectWithValue:n}=t;return await to(e)||n([])}),tu=(0,r.oM)({name:"Admin",initialState:ti,reducers:{setAdminErrorMessage:(e,t)=>{e.errorMessage=t.payload},clearAdminErrorMessage:e=>{e.errorMessage=""},resetAdminState:()=>ti},extraReducers:e=>{e.addCase(ts.pending,(e,t)=>{e.requestStatus="pending"}).addCase(ts.rejected,(e,t)=>{e.requestStatus="failed"}).addCase(ts.fulfilled,(e,t)=>{e.events=t.payload,e.requestStatus="successful"})}}),{setAdminErrorMessage:tl,clearAdminErrorMessage:td,resetAdminState:tc}=tu.actions;var tp=tu.reducer,tm=n(77869);let tg={errorMessage:"",requestStatus:"not-started",name:"",email:"",topic:"",step:"start",isPromoAllowed:!1},tf=(0,r.oM)({name:"contest",initialState:tg,reducers:{setContestErrorMessage:(e,t)=>{e.errorMessage=t.payload},clearContestErrorMessage:e=>{e.errorMessage=""},setContestName:(e,t)=>{e.name=t.payload},setContestEmail:(e,t)=>{e.email=t.payload},setContestTopic:(e,t)=>{e.topic=t.payload},setIsContestPromoAllowed:(e,t)=>{e.isPromoAllowed=t.payload},setContestInputStep:(e,t)=>{e.step=t.payload},resetContestState:()=>tg},extraReducers:e=>{}}),{setContestErrorMessage:th,clearContestErrorMessage:ty,resetContestState:tv,setContestEmail:tS,setContestName:tw,setContestTopic:tb,setContestInputStep:tI,setIsContestPromoAllowed:tU}=tf.actions;var tE=tf.reducer;let tx={errorMessage:"",requestStatus:"not-started",text:""},tC=(0,r.hg)("empty/doSomething",async(e,t)=>{let{rejectWithValue:n}=t,r=await null;return r||n(r)}),tq=(0,r.oM)({name:"assessmentTemplates",initialState:tx,reducers:{setEmptyErrorMessage:(e,t)=>{e.errorMessage=t.payload},clearEmptyErrorMessage:e=>{e.errorMessage=""},resetEmptyState:()=>tx},extraReducers:e=>{e.addCase(tC.pending,(e,t)=>{e.requestStatus="pending"}).addCase(tC.rejected,(e,t)=>{e.requestStatus="failed";let{error:n}=t.payload;e.errorMessage=n}).addCase(tC.fulfilled,(e,t)=>{e.requestStatus="successful"})}}),{setEmptyErrorMessage:tT,clearEmptyErrorMessage:tP,resetEmptyState:tA}=tq.actions;var tk=tq.reducer,tL=n(56063);let tN=(0,r.e)(),tG=(e,t)=>{let n=(0,tL.WTS)(e)||[],r=(0,tL.WTS)(t)||[];if(r.length<=n.length||0===n.length)return"";let a=r.map(e=>e.id),o=n.map(e=>e.id);return a.filter(e=>!o.includes(e))[0]},tM=e=>{let{prev:t,next:n,type:r}=e;switch(r){case"dialogue":return n.lines.length>t.lines.length;case"quiz":return n.questions.length>t.questions.length;case"vocabulary":return n.vocabularyItems.length>t.vocabularyItems.length;case"slide":return!!n.sourceUrl&&!t.sourceUrl;default:return!1}},tz=(e,t)=>{let n=(0,tL.WTS)(e),r=(0,tL.WTS)(t),a=[];if(r.forEach(e=>{let t=n.find(t=>t.id===e.id);t&&a.push({id:e.id,prev:t,next:e,type:e.type})}),0===a.length)return"";let o=a.filter(tM);return 0===o.length?"":o[o.length-1].id},tW=(e,t)=>{if(e.lessonEditor.elementToScrollIntoViewId)return"";let n=tG(e,t);return n?n:tz(e,t)||""};tN.startListening({predicate:(e,t,n)=>{try{return!!tW(n,t)}catch(e){return!1}},effect:async(e,t)=>{try{let{dispatch:e,getState:n,getOriginalState:r}=t,a=tW(r(),n());a&&e((0,U.bQ)(a))}catch(e){console.error("Error in lessonEditorListenerMiddleware",e)}}});let tj=(0,i.ZP)(),tB=o.w({});(0,e_.dX)({identityFunctionCheck:"never"});let tF=(0,r.xC)({reducer:{auth:C.ZP,lessonEditor:U.ZP,explore:ek.ZP,courseLinks:tt,admin:tp,lesson:tm.ZP,playground:w,quiz:eA,contest:tE,assessmentTemplates:tk},devTools:E.TQ,middleware:e=>e().prepend(tN.middleware,tj),enhancers:e=>e().concat(tB)}),tR=()=>(0,a.I0)(),tD=a.v9;tj.run(function*(){yield(0,s.ib)(g.fulfilled,I)}),tj.run(function*(){yield(0,s.ib)(U.Rq.fulfilled,x),yield(0,s.ib)(U.Fe.fulfilled,x),yield(0,s.ib)(U.Rs.fulfilled,x)})}}]);