PageSourceSearch

https://reading-doctor.base44.app/assets/MakingInferences-B34Ss8_K.js

js reading-doctor.base44.app collected 2026-10-03 03:08:50 UTC 14,271 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/saveGameResult-DEDGhF6x.js","assets/index-CgRBJ9tn.js","assets/index-CJZWJQqj.css"])))=>i.map(i=>d[i]);
2import{r as i,t as z,R as J,u as R,a as L,v as E,a7 as q,w as k,j as e,k as W,l as F,x as O,y as Q,D as B,F as H,C as K,m as u,H as U,X as V,J as X,K as Z,N as Y,_ as $,b as ee}from"./index-CgRBJ9tn.js";import{e as te}from"./distractorExplanations-DNpz82Pm.js";import{u as ae,D as ne}from"./useReadAloudHold-M23k3vMw.js";const se=[{id:"up_in_1",text:"Maya taped a note to the fridge listing everything in the refrigerator, then checked the cabinets twice before writing her shopping list.",inference:"Maya was planning what groceries to buy.",options:["Maya was planning what groceries to buy.","Maya was cleaning out the kitchen.","Maya was moving to a new house.","Maya was labeling food for a science project."]},{id:"up_in_2",text:"The principal stood at the door with a megaphone. Teachers counted students as they walked quietly across the field to the far fence.",inference:"The school was holding an emergency drill or evacuation.",options:["The school was holding an emergency drill or evacuation.","The students were going on a field trip.","The students were rehearsing for a school play.","The teachers were practicing for a sports event."]},{id:"up_in_3",text:"Jordan read the comment on his essay, then scrolled back to the top and deleted three sentences, typing new ones in their place.",inference:"The comment on Jordan's essay pointed out something he needed to fix.",options:["The comment on Jordan's essay pointed out something he needed to fix.","Jordan decided his essay was perfect.","Jordan was copying a friend's essay.","Jordan lost the file and started over."]},{id:"up_in_4",text:"Every seat in the auditorium was full, and latecomers stood along the back wall whispering apologies as the lights dimmed.",inference:"The event was very popular and had run out of seats.",options:["The event was very popular and had run out of seats.","The auditorium was small and mostly empty.","The event had been cancelled.","The audience was leaving in disappointment."]},{id:"up_in_5",text:"Dad checked the weather app three times, then moved the cookout supplies from the patio table back into the garage.",inference:"Bad weather was expected, so Dad was protecting the cookout supplies.",options:["Bad weather was expected, so Dad was protecting the cookout supplies.","Dad was finished cooking and cleaning up.","Dad forgot something at the store.","The cookout was being moved to a neighbor's yard."]},{id:"up_in_6",text:"Priya asked to see the manager, laid her receipt on the counter, and pointed at the dented box at her feet.",inference:"Priya wanted to return or exchange a damaged item.",options:["Priya wanted to return or exchange a damaged item.","Priya was applying for a job at the store.","Priya was donating the box to charity.","Priya was showing the manager a product she wanted to buy."]},{id:"up_in_7",text:"The team's best player watched from the bench with a wrapped ankle while the score gap kept growing.",inference:"The team was struggling because their best player was injured.",options:["The team was struggling because their best player was injured.","The team was winning easily without their best player.","The player was resting for the final game.","The player had quit the team for good."]},{id:"up_in_8",text:"Grandpa ran his finger under the lines of the letter, paused at one paragraph, and read it again before folding the page carefully into his pocket.",inference:"That paragraph meant something important or emotional to Grandpa.",options:["That paragraph meant something important or emotional to Grandpa.","Grandpa couldn't read the letter at all.","Grandpa was looking for a spelling mistake.","Grandpa planned to throw the letter away."]},{id:"up_in_9",text:"The new sign on the shop window said 'Closing Sale — Everything Must Go,' and the shelves were half empty.",inference:"The shop was going out of business.",options:["The shop was going out of business.","The shop was remodeling and restocking.","The shop was opening a second location.","The shop was having its annual holiday sale."]},{id:"up_in_10",text:"Amara kept her backpack with her at lunch, checked it between classes, and asked a friend to wat
2ch it during gym.",inference:"Something valuable or important was in Amara's backpack.",options:["Something valuable or important was in Amara's backpack.","Amara's backpack was too heavy to carry.","Amara was afraid of losing her lunch.","Amara's backpack was broken and being repaired."]},{id:"up_in_11",text:"The scientist repeated the experiment with the same results each time, then compared her numbers with a study from another lab.",inference:"The scientist was checking that her results were reliable.",options:["The scientist was checking that her results were reliable.","The scientist didn't trust her own equipment.","The scientist was copying another lab's answers.","The scientist had never done the experiment before."]},{id:"up_in_12",text:"Elena flipped the puzzle piece over, tried it in three spots, then set it aside in a growing pile of pieces that fit nowhere.",inference:"Those pieces belonged to a different section or puzzle that hadn't been started yet.",options:["Those pieces belonged to a different section or puzzle that hadn't been started yet.","The puzzle was already finished.","The puzzle was missing exactly one piece.","Elena had solved the whole puzzle except the edges."]}],ie=[{id:"in_1",text:"Sara grabbed her umbrella before leaving the house.",inference:"It was probably going to rain",options:["It was probably going to rain","She was going to the beach","She was hot","She was hungry"]},{id:"in_2",text:"The dog wagged its tail and jumped up when Tom came home.",inference:"The dog was happy to see Tom",options:["The dog was scared","The dog was happy to see Tom","The dog was hungry","The dog was tired"]},{id:"in_3",text:"Mom put candles on the cake and we sang to Grandma.",inference:"It was Grandma's birthday",options:["It was dinner time","It was Grandma's birthday","Grandma was sick","They were at church"]},{id:"in_4",text:"Jake yawned and rubbed his eyes. He could barely keep them open.",inference:"Jake was very tired",options:["Jake was excited","Jake was very tired","Jake was hungry","Jake was scared"]},{id:"in_5",text:"Lisa's stomach growled loudly during class.",inference:"Lisa was hungry",options:["Lisa was scared","Lisa was sick","Lisa was hungry","Lisa was happy"]},{id:"in_6",text:"The leaves were falling and the air was getting cooler.",inference:"It was autumn",options:["It was summer","It was spring","It was autumn","It was winter"]},{id:"in_7",text:"Maria clapped her hands and jumped up and down when she opened the present.",inference:"Maria loved her present",options:["Maria was sad","Maria loved her present","Maria was scared","Maria was tired"]},{id:"in_8",text:"The boy put on his helmet and knee pads before getting on his bike.",inference:"The boy wanted to be safe",options:["The boy was cold","The boy wanted to be safe","The boy was going swimming","The boy was hungry"]},{id:"in_9",text:"The parking lot was empty and the store lights were off.",inference:"The store was closed.",options:["The store was closed.","The store was having a sale.","The store was new.","The store was crowded."]},{id:"in_10",text:"Sam's face turned red and his hands shook before giving his speech.",inference:"Sam was nervous about his speech.",options:["Sam was excited.","Sam was nervous about his speech.","Sam was angry.","Sam was happy."]},{id:"in_11",text:"The ground was covered in white and children were building snowmen.",inference:"It had snowed.",options:["It had snowed.","It was a hot day.","Someone spilled flour.","It was a sandy beach."]},{id:"in_12",text:"Mom packed sunscreen, towels, and swimsuits into the beach bag.",inference:"The family was going to the beach.",options:["The family was going to the beach.","The family was going skiing.","The family was moving.","The family was going to bed."]},{id:"in_13",text:"The student's head was down on the desk and he kept yawning.",inference:"The student was very tired.",options:["The student was very tired.","The student was bored with the lesson.","The student was hungry.","The student was excited."]},{id:"in_14",text:"When the teacher announced the field trip, the class erupted in cheers.",inference:"The students were excited about the field trip.",options:["The students were scared.","The students were excited about the field trip.","The students were angry.","The students were sleepy."]},{id:"in_15",text:"The cat arched its back and hissed at the unfamiliar dog.",inference:"The cat felt threatened by the dog.",options:["The cat felt threatened by the dog.","The cat wanted to play.","The cat was cold.","The cat was hungry."]},{id:"in_16",text:"Dad checked the tires and filled the gas tank before the long drive.",inference:"Dad was preparing the car for a trip.",options:["Dad was preparing the car for a trip.","Dad was selling the car.","Dad was washing the car.","Dad was parking the car."]},{id:"in_17",text:"The flowers in the window box were drooping and the soil was dry.",inference:"The flowers needed water.",options:["The flowers needed water.","The flowers were plastic.","The flowers were blooming.","The flowers were dead forever."]},{id:"in_18",text:"She pressed the remote and frowned, then changed the batteries.",inference:"The remote wasn't working.",options:["The remote wasn't working.","The TV was brand new.","She lost the remote.","She wanted a bigger TV."]},{id:"in_19",text:"The cookies were gone and the little boy had crumbs on his face.",inference:"The boy had eaten the cookies.",options:["The boy had eaten the cookies.","The dog ate the cookies.","The cookies were never there.","The boy gave them away."]},{id:"in_20",text:"The runner crossed the finish line first, arms raised in triumph.",inference:"The runner had won the race.",options:["The runner had won the race.","The runner was lost.","The runner was injured.","The runner gave up."]}],oe=10;function ce(){const{scheduleAdvance:v,handleSpeakingChange:_}=ae(),[h,m]=i.useState(0),[o,f]=i.useState(0),[r,d]=i.useState(null),[y,l]=i.useState(null),[j,x]=i.useState(!1),p=z(),w=J.useRef(!1),[S,M]=i.useState(0),b=R(),{data:N=[]}=L({queryKey:["students"],queryFn:()=>ee.entities.Student.list("-created_date"),initialData:[]}),t=N[0],c=E(t==null?void 0:t.grade),D=(t==null?void 0:t.grade)>=4?se:ie,g=i.useMemo(()=>q(D,{studentId:t==null?void 0:t.id,gameType:"making_inferences",count:oe,shuffleOptions:!0,answerField:"inference"}),[t==null?void 0:t.id,t==null?void 0:t.grade,S]),s=g[h],I=k({mutationFn:a=>$(()=>import("./saveGameResult-DEDGhF6x.js"),__vite__mapDeps([0,1,2])).then(n=>n.saveGameResult(a)),onSuccess:()=>
2b.invalidateQueries({queryKey:["scores"]})}),A=k({mutationFn:async()=>{},onSuccess:()=>b.invalidateQueries({queryKey:["students"]})}),G=a=>{const n=a===s.inference;if(p.recordAnswer(n),n){const P=Math.round(10*c.getDifficultyMultiplier());f(o+P),d("correct"),c.recordAttempt(!0,1e3)}else d("incorrect"),l({chosen:a,explanation:te({chosen:a,correct:s.inference,context:"inference",variant:s.text})}),c.recordAttempt(!1,1e3);v(()=>{h===g.length-1?T():(m(h+1),p.markQuestionShown(),d(null),l(null))},n?1500:4500)},T=async()=>{if(w.current)return;w.current=!0;const a=o+(r==="correct"?10:0),n=a>=80?3:a>=60?2:1;t&&(await I.mutateAsync({student_id:t.id,game_type:"making_inferences",score:a,stars:n,grade_level:t.grade,time_taken:0}),await A.mutateAsync({id:t.id,data:{total_stars:(t.total_stars||0)+n,games_completed:(t.games_completed||0)+1}})),x(!0)},C=()=>{w.current=!1,M(a=>a+1),m(0),f(0),d(null),l(null),x(!1)};return e.jsx("div",{className:"min-h-screen p-4 md:p-8",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx(W,{to:F("AllGames"),onClick:a=>{var n;((n=window.history.state)==null?void 0:n.idx)>0&&(a.preventDefault(),window.history.back())},children:e.jsxs(O,{variant:"outline",size:"lg",children:[e.jsx(Q,{className:"w-5 h-5 mr-2"}),"Back"]})}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(B,{difficulty:c.difficulty}),e.jsxs("div",{className:"flex items-center gap-4 bg-white rounded-full px-6 py-3 shadow-lg",children:[e.jsx(H,{className:"w-6 h-6 text-yellow-500"}),e.jsx("span",{className:"text-2xl font-bold text-gray-900",children:o})]})]})]}),e.jsxs(K,{className:"p-8 bg-white/90 backdrop-blur-sm border-4 border-white shadow-xl",children:[e.jsx("h1",{className:"text-4xl font-black text-center text-transparent bg-clip-text bg-gradient-to-r from-violet-600 to-indigo-400 mb-2",children:"Making Inferences"}),e.jsxs("p",{className:"text-center text-xl text-gray-700 mb-8",children:["Read between the lines! ",h+1,"/",g.length]}),e.jsx("div",{className:"bg-violet-50 rounded-2xl p-6 mb-6",children:e.jsx("p",{className:"text-xl text-gray-800",children:s.text})}),e.jsx("p",{className:"text-lg font-bold text-center mb-4",children:"What can you infer from this?"}),r==="correct"&&e.jsxs(u.div,{initial:{scale:0},animate:{scale:1},className:"flex items-center justify-center gap-2 mb-6 text-green-600",children:[e.jsx(U,{className:"w-8 h-8"}),e.jsx("span",{className:"text-2xl font-bold",children:"Great inference!"})]}),r==="incorrect"&&e.jsxs(u.div,{initial:{scale:0},animate:{scale:1},className:"flex items-center justify-center gap-2 mb-6 text-red-600",children:[e.jsx(V,{className:"w-8 h-8"}),e.jsxs("span",{className:"text-xl font-bold",children:["The inference was: ",s.inference]})]}),r==="incorrect"&&y&&e.jsx(ne,{items:[y],question:s.text,className:"mb-6",onSpeakingChange:_}),!r&&e.jsx("div",{className:"grid grid-cols-1 gap-3",children:s.options.map(a=>e.jsx(u.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:()=>G(a),className:"p-4 rounded-2xl text-lg font-bold bg-gradient-to-r from-violet-400 to-indigo-500 text-white shadow-lg text-left",children:a},a))})]}),e.jsxs(X,{children:[e.jsx(Z,{watch:p,onWrapUp:()=>T()}),j&&e.jsx(Y,{stars:o>=80?3:o>=60?2:1,score:o,onPlayAgain:C})]})]})})}export{ce as default};

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.