1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vocab-DVkZ8mth.js","assets/tanstack-BuE7OpQV.js","assets/lodash-BxsARtUA.js","assets/roam-DIm4uuSo.js"])))=>i.map(i=>d[i]); 2import{e as j,d as q,s as b,_ as B}from"./index-HmgwubOw.js";import{m as k}from"./firekit-DmdkEPY9.js";import{u as C}from"./game-CJls-HUO.js";import{u as F,p as R}from"./package-lock-DlMmBAzl.js";import{r as d,j as U,o as M,e as N,$ as Y,U as I,Q as w,V as S,P as $,y as x,Y as G,F as H}from"./tanstack-BuE7OpQV.js";import"./lodash-BxsARtUA.js";import"./sentry-CYO7dHw2.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="d1c1a230-50dc-4320-82c3-70e0d4c026e9",s._sentryDebugIdIdentifier="sentry-dbid-d1c1a230-50dc-4320-82c3-70e0d4c026e9")}catch{}})();const O={key:0,class:"col-full text-center"},ae={__name:"TaskVocab",props:{taskId:{type:String,required:!0,default:"vocab"},language:{type:String,required:!0,default:"en"},launchId:{type:String,required:!1,default:null}},setup(s){const a=s;let u;const p=a.taskId,{version:D}=R.packages["node_modules/@bdelab/roar-vocab"],c=j(),f=d(!1),m=d(!1),i=q(),g=C(),{isFirekitInit:A,roarfirekit:L}=b(i),h=d(!1);let l;const y=()=>{l&&l(),h.value=!0},v=()=>{c.go(0)};l=i.$subscribe(async(r,e)=>{var t,o;(o=(t=e.roarfirekit).restConfig)!=null&&o.call(t)&&y()});const{isLoading:P,data:_}=F(a.launchId,{enabled:h});window.addEventListener("popstate",()=>{v()},{once:!0}),U(async()=>{var r,e;try{u=(await B(async()=>{const{default:t}=await import("./vocab-DVkZ8mth.js");return{default:t}},__vite__mapDeps([0,1,2,3]))).default}catch(t){console.error("An error occurred while importing the game module.",t)}(e=(r=L.value).restConfig)!=null&&e.call(r)&&y()});let n;M(()=>{window.removeEventListener("popstate",v),n&&clearInterval(n)}),N([A,P],async([r,e])=>{if(r&&!e&&!f.value){f.value=!0;const{selectedAdmin:t}=b(g);await T(t)}},{immediate:!0});async function T(r){try{n&&clearInterval(n),n=setInterval(function(){document.querySelector(".jspsych-content-wrapper")&&(m.value=!0,clearInterval(n))},100);const e=await i.roarfirekit.startAssessment(r.value.id,p,D,a.launchId),t=k(_.value,"studentData.dob"),o=new Date(t),E={grade:k(_.value,"studentData.grade"),birthMonth:o.getMonth()+1,birthYear:o.getFullYear(),language:a.language}
2,V={...e._taskInfo.variantParams};await new u(e,V,E,"jspsych-target").run().then(async()=>{await i.completeAssessment(r.value.id,p,a.launchId),g.requireHomeRefresh(),a.launchId?c.push({name:"LaunchParticipant",params:{launchId:a.launchId}}):c.push({name:"Home"})})}catch(e){console.error("An error occurred while starting the task:",e),alert("An error occurred while starting the task. Please refresh the page and try again. If the error persists, please submit an issue report.")}}return(r,e)=>{const t=Y("AppSpinner");return w(),I(H,null,[e[0]||(e[0]=S("div",{id:"jspsych-target",class:"game-target",translate:"no"},null,-1)),m.value?$("",!0):(w(),I("div",O,[S("h1",null,G(r.$t("tasks.preparing")),1),x(t)]))],64)}}};export{ae as default}; 3//# sourceMappingURL=TaskVocab-Cnmrp1WC.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.