{"version":3,"file":"OwnableMathCompanion.vMaNQWo6.mjs","names":["_Fragment","useState","useRef"],"sources":["https:/framerusercontent.com/modules/Xvu5CBWiZwQ6iSljHuwk/RhWJk4ZmMIGhvWa2vmrQ/OwnableMathCompanion.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";// To make sure I can add properties to reuse code in different pages for Elem, Middle, HS, College.\nimport*as React from\"react\";import{useState,useEffect,useRef}from\"react\";function MathText({text}){const[ready,setReady]=React.useState(!!(typeof window!==\"undefined\"&&window.katex));React.useEffect(()=>{if(typeof window===\"undefined\")return;if(window.katex){setReady(true);return;}// If you followed Step 1, KaTeX will load and set this flag automatically\nconst tick=setInterval(()=>{if(window.katex){setReady(true);clearInterval(tick);}},100);return()=>clearInterval(tick);},[]);if(!ready)return /*#__PURE__*/_jsx(_Fragment,{children:text});const katex=window.katex;// Split into display blocks first: $$ ... $$ (multiline allowed)\nconst displaySplit=text.split(/(\\$\\$[\\s\\S]*?\\$\\$)/g);const nodes=[];displaySplit.forEach((chunk,i)=>{const mDisplay=/^\\$\\$([\\s\\S]*?)\\$\\$$/.exec(chunk);if(mDisplay){const html=katex.renderToString(mDisplay[1],{displayMode:true,throwOnError:false});// The nodes.push keeps equations inside the bubble\nnodes.push(/*#__PURE__*/_jsx(\"div\",{style:{whiteSpace:\"normal\",overflowWrap:\"anywhere\",wordBreak:\"break-word\",maxWidth:\"100%\",margin:\"6px 0\",lineHeight:1.4},dangerouslySetInnerHTML:{__html:html}},`d${i}`));}else{// Inside non-display text, split inline: $ ... $ (no newlines)\nconst inlineSplit=chunk.split(/(\\$[^$\\n]+\\$)/g);inlineSplit.forEach((piece,j)=>{const mInline=/^\\$([^$\\n]+)\\$/.exec(piece);if(mInline){const html=katex.renderToString(mInline[1],{displayMode:false,throwOnError:false});nodes.push(/*#__PURE__*/_jsx(\"span\",{style:{whiteSpace:\"normal\",overflowWrap:\"anywhere\",wordBreak:\"break-word\",maxWidth:\"100%\",display:\"inline\"},dangerouslySetInnerHTML:{__html:html}},`i${i}-${j}`));}else{nodes.push(/*#__PURE__*/_jsx(\"span\",{children:piece},`t${i}-${j}`));}});}});return /*#__PURE__*/_jsx(_Fragment,{children:nodes});}// === Backend base (Railway in prod, localhost in dev) ===\nconst API_BASE=typeof window!==\"undefined\"&&window.location.hostname===\"localhost\"?\"http://localhost:8080\":\"https://ownable-math-api-staging-production-5222.up.railway.app\";// ↓↓↓ add this helper, a quick API ping so the Framer console tells us if the server is reachable\nasync function pingApi(base){try{const r=await fetch(`${base}/version`,{mode:\"cors\"});const t=await r.text();console.log(\"[pingApi] /version OK\",r.status,t);}catch(e){console.error(\"[pingApi] /version FAIL\",e);}}export default function OwnableMathCompanion({level=\"college\",style}){// ↓↓↓ add this effect ↓↓↓\nReact.useEffect(()=>{pingApi(API_BASE);},[]);const levelLabels={elementary:\"Elementary School\",middle:\"Middle School\",high:\"High School\",college:\"College\"};const levelColors={elementary:\"#4CAF50\",middle:\"#2196F3\",high:\"#FF9800\",college:\"#3F51B5\"};const[session,setSession]=useState(null);const[followup,setFollowup]=useState(\"\");const[loading,setLoading]=useState(false)// ✅ ADD THIS\n;const chatEndRef=useRef(null);const[ended,setEnded]=useState(false);const[messages,setMessages]=useState([]);const user_id=localStorage.getItem(\"ownable-user\")||`guest-${Date.now()}`// 🧠 Persistent user ID for session memory Ensure that the same user_id is used for the entire chat session, stored in localStorage.\n;localStorage.setItem(\"ownable-user\",user_id);const[serverSecondsLeft,setServerSecondsLeft]=useState(null);// pull the login email saved during verify-login\nconst email=localStorage.getItem(\"ownable_email\")||\"\";// ⬇⬇⬇ ADD THIS BLOCK (heartbeat) ⬇⬇⬇ ping heartbeat during a session so time really ticks down\nconst HEARTBEAT_MS=45e3// 45s cadence\n;const heartbeatInFlight=useRef(false);const heartbeatTimer=useRef(null);const pingHeartbeat=React.useCallback(async()=>{if(!email||heartbeatInFlight.current)return;heartbeatInFlight.current=true;try{const r=await fetch(`${API_BASE}/heartbeat`,{method:\"POST\",headers:{\"Content-Type\":\"application/json\",\"X-User-Email\":email},body:JSON.stringify({email})});const data=await r.json().catch(()=>({}));if(typeof data.seconds_left===\"number\"){setServerSecondsLeft(data.seconds_left);}}catch(e){// swallow transient errors\n}finally{heartbeatInFlight.current=false;}},[email]);// Start/stop heartbeat when a session is active\nuseEffect(()=>{// only tick if we have a session, not ended, and have an email\nif(!session||ended||!email){if(heartbeatTimer.current){clearInterval(heartbeatTimer.current);heartbeatTimer.current=null;}return;}// fire one immediately\npingHeartbeat();// then every HEARTBEAT_MS\nheartbeatTimer.current=window.setInterval(pingHeartbeat,HEARTBEAT_MS);return()=>{if(heartbeatTimer.current){clearInterval(heartbeatTimer.current);heartbeatTimer.current=null;}};},[session,ended,email,pingHeartbeat]);// Optional: refresh on tab focus to reduce drift\nuseEffect(()=>{const onFocus=()=>{if(session&&!ended)pingHeartbeat();};window.addEventListener(\"focus\",onFocus);return()=>window.removeEventListener(\"focus\",onFocus);},[session,ended,pingHeartbeat]);// ⬆⬆⬆ END ADD ⬆⬆⬆\nuseEffect(()=>{chatEndRef.current?.scrollIntoView({behavior:\"smooth\"});},[messages]);async function sendToGPT({user_id,message,mode,language,age_group,secret,email,topic,silent=false}){if(ended){alert(\"This chat is ended. Start a new chat to continue.\");return;}setLoading(true)// ✅ show loading indicator\n;// No visual cards anymore — just append the new user message to account for topic selected and options offered for the topic\nconst updatedMessages=!silent?[...messages,{role:\"user\",content:message}]:messages;// ⬇️ Add this line so the user bubble appears when not silent\nif(!silent)setMessages(updatedMessages);try{const response=await fetch(`${API_BASE}/chat`,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({user_id,message,mode,language,age_group,secret,email,topic})});const data=await response.json();if(typeof data.seconds_left===\"number\")setServerSecondsLeft(data.seconds_left);if(response.status===429){setServerSecondsLeft(0);alert(data.error||\"⏳ Daily limit reached.\");return;}if(!response.ok)throw new Error(data?.error||`HTTP ${response.status}`);if(data.reply){setMessages([...updatedMessages,{role:\"assistant\",content:data.reply}]);return data.reply;}else{return\"⚠️ GPT did not reply.\";}}catch(err){console.error(\"❌ Error:\",err);return\"Error calling GPT.\";}finally{setLoading(false);}}async function startCourseHelp({mode,topic,language,customLang}){if(ended){alert(\"This chat is ended. Reset or start a new chat to continue.\");return;}// Minimal first-turn nudge; let the backend/system prompt show the 1/2/3 menu\nconst message=topic||\"Geometry\";// The next two lines help present choices to start with based on topic selected by the user in the session setup (Pre-Algebra, Statistics, etc.), and formats it into a natural opening prompt with choices. And the const secret acts as a lightweight security check to make sure: The request to the backend is coming from your frontend. The await sends the message as the first prompt to the GPT, This triggers a POST request to the backend URL https://your-backend-url/chat. Message is then received in the @app.route(\"/chat\", methods=[\"POST\"]) in GitHub.\nconst secret=\"ownable-7bq4k3\";setSession({mode,topic,language,customLang,level});await sendToGPT({user_id,message,mode,language,age_group:level,secret,email,topic,silent:true});}async function startHomeworkHelp(file,language,customLang){if(ended){alert(\"This chat is ended. Reset or start a new chat to continue.\");return;}if(!file)return;// 1) Turn on the global loader AND show a placeholder assistant bubble\nsetLoading(true);setMessages(m=>[...m,{role:\"assistant\",content:\"📎 Reading your file… analyzing and planning steps…\"}]);const formData=new FormData;formData.append(\"file\",file);try{const response=await fetch(`${API_BASE}/file-help`,{method:\"POST\",headers:{\"X-User-Email\":email||\"\",\"X-User-Level\":level||\"college\"},body:formData});const data=await response.json();if(typeof data.seconds_left===\"number\"){setServerSecondsLeft(data.seconds_left);}// Establish homework session mode (so follow-ups use the right tone)\nsetSession({mode:\"homework\",topic:\"homework\",language,customLang});// 2) Replace the placeholder bubble with the real reply (or a fallback)\nsetMessages(m=>{const mm=m.slice();const last=mm[mm.length-1];const fallback=\"⚠️ I couldn’t extract meaningful text from that file.\";if(last?.role===\"assistant\"&&String(last.content).startsWith(\"📎\")){mm[mm.length-1]={role:\"assistant\",content:data.reply||fallback};}else{// If for some reason the placeholder isn't last, just append\nmm.push({role:\"assistant\",content:data.reply||fallback});}return mm;});// 3) (Optional) continue the tutoring flow using the model’s summary.\n//    This keeps the chat going but avoids a long blank period.\nif(data.reply){await sendToGPT({user_id,message:data.reply,mode:\"homework\",language,age_group:level,secret:\"ownable-7bq4k3\",email});}else{alert(\"⚠️ GPT could not process the file.\");}}catch(err){console.error(\"❌ File upload error:\",err);// Replace the placeholder with an error message so the UI never hangs\nsetMessages(m=>{const mm=m.slice();const last=mm[mm.length-1];const msg=\"⚠️ There was a problem reading that file. Try a smaller PDF or a .txt file.\";if(last?.role===\"assistant\"&&String(last.content).startsWith(\"📎\")){mm[mm.length-1]={role:\"assistant\",content:msg};}else{mm.push({role:\"assistant\",content:msg});}return mm;});}finally{// 4) Always turn off the loader\nsetLoading(false);}}// ⬇️ option to end chat\nfunction endChat(){if(!messages.length){setEnded(true);return;}const ok=confirm(\"End this chat? You won't be able to send more messages.\");if(!ok)return;try{const history=JSON.parse(localStorage.getItem(\"ownable-transcripts\")||\"[]\");history.push({id:Date.now(),level,session,messages,endedAt:new Date().toISOString()});localStorage.setItem(\"ownable-transcripts\",JSON.stringify(history));}catch(e){console.warn(\"Could not save transcript:\",e);}setEnded(true);}// ⬇️ Your existing JSX starts here, the one that existed before adding the option to end chat\nreturn /*#__PURE__*/_jsxs(\"div\",{style:{...style,fontFamily:\"'Segoe UI', sans-serif\",maxWidth:\"840px\",margin:\"0 auto\",padding:\"24px\",height:\"calc(100vh - 80px)\",overflowY:\"auto\",boxSizing:\"border-box\"},children:[/*#__PURE__*/_jsxs(\"div\",{style:{marginBottom:\"24px\",fontSize:\"22px\",fontWeight:\"600\",color:levelColors[level]||\"#3F51B5\"},children:[\"Welcome to Your \",levelLabels[level]||\"\"]}),/*#__PURE__*/_jsx(\"div\",{style:{marginBottom:16,fontSize:\"20px\",fontWeight:\"bold\",color:\"#333\"},children:\"Ownable™ AI-Powered Math Companion!\"}),/*#__PURE__*/_jsxs(\"p\",{style:{fontSize:\"13px\",color:\"#777\",marginBottom:\"4px\"},children:[\"⏰ \",/*#__PURE__*/_jsx(\"strong\",{children:\"Session Limit:\"}),\" Each student may use the tutor for one \",/*#__PURE__*/_jsx(\"strong\",{children:\"30 - minute session per day\"}),\". Your time allowance resets daily.\"]}),/*#__PURE__*/_jsxs(\"p\",{style:{fontSize:\"13px\",color:\"#777\",marginBottom:\"16px\"},children:[\"📘 \",/*#__PURE__*/_jsx(\"strong\",{children:\"Disclaimer:\"}),\" This tool is designed to support students in their academic preparation. It is not affiliated with or endorsed by any exam provider, educational institution, or governing body.\"]}),!session&&/*#__PURE__*/_jsx(SessionSetup,{level:level,onStart:setSession,startCourseHelp:startCourseHelp,startHomeworkHelp:startHomeworkHelp}),messages.length>0&&/*#__PURE__*/_jsxs(\"div\",{style:{marginTop:\"24px\",display:\"flex\",flexDirection:\"column\",gap:\"12px\"},children:[messages.map((msg,i)=>{const text=msg.content||\"\";const urlRegex=/(\\/plots\\/[a-z0-9\\-]+\\.png)/gi;const plotUrls=[...text.matchAll(urlRegex)].map(m=>m[0]);return /*#__PURE__*/_jsxs(\"div\",{style:{padding:\"14px 18px\",borderRadius:\"16px\",maxWidth:\"75%\",alignSelf:msg.role===\"user\"?\"flex-end\":\"flex-start\",backgroundColor:msg.role===\"user\"?\"#dcf8c6\":\"#fafafa\",border:msg.role===\"assistant\"?\"1px solid #eee\":\"none\",fontSize:\"16px\",lineHeight:\"1.6\",whiteSpace:\"normal\",overflowWrap:\"anywhere\",wordBreak:\"break-word\"},children:[/*#__PURE__*/_jsxs(\"strong\",{children:[\" \",msg.role===\"user\"?\"You\":\"Tutor\",\":\"]}),/*#__PURE__*/_jsx(MathText,{text:text}),plotUrls.map((src,idx)=>{const absolute=src.startsWith(\"http\")?src:`${API_BASE}${src}`;return /*#__PURE__*/_jsx(\"div\",{style:{marginTop:8},children:/*#__PURE__*/_jsx(\"img\",{src:absolute,alt:\"diagram\",style:{maxWidth:\"100%\",borderRadius:8,border:\"1px solid #ccc\"}})},idx);})]},i);}),/*#__PURE__*/_jsx(\"div\",{ref:chatEndRef})]}),/*#__PURE__*/_jsxs(\"p\",{style:{marginTop:\"16px\",fontSize:\"13px\",color:\"#999\"},children:[\"⏱ Time left in today's session:\",\" \",serverSecondsLeft!=null?Math.max(0,Math.ceil(serverSecondsLeft/60)):\"—\",\" \",\"minutes\"]}),loading&&/*#__PURE__*/_jsx(\"div\",{style:{marginTop:\"16px\",fontStyle:\"italic\",color:\"#888\"},children:\"⏳ Thinking...\"}),messages.length>0&&/*#__PURE__*/_jsxs(\"div\",{style:{marginTop:\"24px\"},children:[/*#__PURE__*/_jsx(\"input\",{type:\"text\",value:followup,onChange:e=>setFollowup(e.target.value),placeholder:ended?\"Chat ended.\":\"Type your answer or next question here...\",disabled:ended,style:{width:\"100%\",padding:\"14px 16px\",borderRadius:\"8px\",border:\"1px solid #ddd\",marginBottom:\"8px\",backgroundColor:ended?\"#f5f5f5\":\"#fafafa\",color:\"#333\",fontSize:\"15px\"}}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",gap:\"12px\",flexWrap:\"wrap\"},children:[/*#__PURE__*/_jsx(\"button\",{onClick:async()=>{const msg=(followup||\"\").trim();if(!msg||ended)return;await sendToGPT({user_id,message:msg,mode:session?.mode||\"study\",language:session?.language||\"English\",age_group:level,secret:\"ownable-7bq4k3\",email,topic:session?.topic});setFollowup(\"\");},disabled:ended,style:{padding:\"12px 20px\",fontSize:\"15px\",borderRadius:\"8px\",backgroundColor:ended?\"#b0c4de\":\"#4a90e2\",color:\"white\",fontWeight:\"bold\",border:\"none\",cursor:ended?\"not-allowed\":\"pointer\"},children:\"➤ Send\"}),/*#__PURE__*/_jsx(\"button\",{onClick:endChat,style:{padding:\"12px 20px\",fontSize:\"15px\",borderRadius:\"8px\",backgroundColor:\"#e57373\",color:\"white\",fontWeight:\"bold\",border:\"none\",cursor:\"pointer\"},children:\"⛔ End Chat\"}),/*#__PURE__*/_jsx(\"button\",{onClick:()=>{setMessages([]);setSession(null);setFollowup(\"\");setEnded(false)// allow a fresh chat immediately\n;// optional: keep user_id for continuity\n// localStorage.removeItem(\"ownable-user\")\n},style:{padding:\"12px 20px\",fontSize:\"15px\",backgroundColor:\"#ccc\",border:\"none\",borderRadius:\"8px\",color:\"#333\",fontWeight:\"bold\"},children:\"🔄 Reset Chat\"})]}),ended&&/*#__PURE__*/_jsx(\"div\",{style:{marginTop:\"12px\",fontSize:\"13px\",color:\"#aa0000\",background:\"#fff3f3\",border:\"1px solid #f0c4c4\",borderRadius:\"8px\",padding:\"10px 12px\"},children:\"Chat ended. Start a new chat to continue.\"})]})]});}function SessionSetup({onStart,startCourseHelp,startHomeworkHelp,level=\"college\"}){const[mode,setMode]=useState(\"study\");const[topic,setTopic]=useState(\"\");const[language,setLanguage]=useState(()=>localStorage.getItem(\"ownable-lang\")||\"English\");const[customLang,setCustomLang]=useState(\"\");const[uploadedFileName,setUploadedFileName]=useState(\"\");const[openPanel,setOpenPanel]=useState(null);const togglePanel=panel=>{setOpenPanel(openPanel===panel?null:panel);};const collegeTopics={prealgebra:\"Pre-Algebra\",introalgebra:\"Intro to Algebra\",intermedalgebra:\"Intermediate Algebra\",collegealgebra:\"College Algebra\",quantreasoning:\"Quantitative Reasoning\",liberalarts:\"Math for Liberal Arts\",statistics:\"Statistics\",precalculus:\"Precalculus\",calc1:\"Calculus I\",calc2:\"Calculus II\",businessmath:\"Business Math\",finitemath:\"Finite Math\"}// default = college-level topic list\n;//✅ This sets \"Intro to Algebra\" instead of \"introalgebra\" into your message.\nconst elementaryTopics={grade1_addition:\"Grade 1 – Addition / Subtraction\",grade1_placevalue:\"Grade 1 – Place Value / Number Sense\",grade2_wordproblems:\"Grade 2 – Word Problems / Small Numbers\",grade2_money:\"Grade 2 – Money / Time / Measurement\",grade3_multiplication:\"Grade 3 – Multiplication / Division\",grade3_fractions:\"Grade 3 – Fractions / Shapes\",grade4_multioperations:\"Grade 4 – Multi-Step Problems / Estimation\",grade4_geometry:\"Grade 4 – Area / Perimeter / Angles\",grade5_fractions:\"Grade 5 – Fractions (+ / –)\",grade5_data:\"Grade 5 – Data / Graphs / Word Problems\"};const middleTopics={grade6_ratios:\"Grade 6 – Ratios / Proportions\",grade6_expressions:\"Grade 6 – Expressions / Equations\",grade6_geometry:\"Grade 6 – Area / Volume / Surface Area\",grade6_statistics:\"Grade 6 – Mean / Median / Range\",grade7_integers:\"Grade 7 – Positive / Negative Numbers\",grade7_equations:\"Grade 7 – Solving 1-Step / 2-Step Equations\",grade7_inequalities:\"Grade 7 – Inequalities / Number Lines\",grade7_geometry:\"Grade 7 – Angles / Triangles / Circles\",grade7_probability:\"Grade 7 – Probability / Outcomes\",grade8_functions:\"Grade 8 – Intro to Functions / Tables\",grade8_linear:\"Grade 8 – Linear Equations / Graphing\",grade8_systems:\"Grade 8 – Systems of Equations\",grade8_statistics:\"Grade 8 – Scatter Plots / Data Trends\",grade8_wordproblems:\"Grade 8 – Multi-Step Word Problems\"};const highSchoolTopics={prealgebra:\"Pre-Algebra\",algebra1:\"Algebra I\",geometry:\"Geometry\",algebra2:\"Algebra II\",trigonometry:\"Trigonometry\",precalculus:\"Pre-Calculus\",calculus:\"Calculus\",statistics:\"Statistics\"};const topicLabels=level===\"elementary\"?elementaryTopics:level===\"middle\"?middleTopics:level===\"high\"?highSchoolTopics:collegeTopics// ✅ Now clean and easy to maintain\n;const handleStart=()=>{if(!topic)return alert(\"Please choose a course.\");localStorage.setItem(\"ownable-lang\",language);const topicLabel=topicLabels[topic]||topic;startCourseHelp({mode,topic:topicLabel,language,customLang})//✅ Now GPT will say: “Let’s begin working on Intro Algebra” instead of “introalgebra”.\n;};const handleResumeLast=()=>{const last=localStorage.getItem(\"ownable-session-report\");if(!last)return alert(\"No saved session found.\");const parsed=JSON.parse(last);onStart({...parsed});};return /*#__PURE__*/_jsxs(\"div\",{style:{backgroundColor:\"#f9f9fb\",padding:\"24px\",borderRadius:\"12px\",boxShadow:\"0 2px 6px rgba(0,0,0,0.05)\",maxWidth:720,margin:\"0 auto 24px auto\"},children:[/*#__PURE__*/_jsx(\"h3\",{style:{fontSize:\"16px\",fontWeight:\"bold\",marginBottom:\"8px\"},children:\"Choose language\"}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",marginBottom:\"12px\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{fontSize:\"20px\",marginRight:\"6px\"},children:\"🌐\"}),/*#__PURE__*/_jsxs(\"select\",{value:language,onChange:e=>setLanguage(e.target.value),style:{padding:\"8px 12px\",borderRadius:\"8px\",border:\"1px solid #ccc\",fontSize:\"15px\",flexGrow:1,cursor:\"pointer\"},children:[/*#__PURE__*/_jsx(\"option\",{value:\"English\",children:\"English\"}),/*#__PURE__*/_jsx(\"option\",{value:\"Spanish\",children:\"Espa\\xf1ol\"}),/*#__PURE__*/_jsx(\"option\",{value:\"French\",children:\"Fran\\xe7ais\"}),/*#__PURE__*/_jsx(\"option\",{value:\"Portuguese\",children:\"Portugu\\xeas\"}),/*#__PURE__*/_jsx(\"option\",{value:\"HaitianCreole\",children:\"Krey\\xf2l Ayisyen\"}),/*#__PURE__*/_jsx(\"option\",{value:\"Chinese\",children:\"中文\"}),/*#__PURE__*/_jsx(\"option\",{value:\"Other\",children:\"Other Language...\"})]})]}),language===\"Other\"&&/*#__PURE__*/_jsx(\"input\",{type:\"text\",placeholder:\"Enter your preferred language\",value:customLang,onChange:e=>setCustomLang(e.target.value),style:{marginTop:8,padding:\"8px 12px\",borderRadius:\"8px\",border:\"1px solid #ccc\",fontSize:\"15px\",width:\"100%\"}}),/*#__PURE__*/_jsx(\"hr\",{style:{margin:\"24px 0\",borderTop:\"1px solid #ddd\"}}),/*#__PURE__*/_jsx(\"h3\",{style:{fontSize:\"18px\",fontWeight:\"bold\",marginBottom:\"12px\"},children:\"How can I help you today?\"}),/*#__PURE__*/_jsxs(\"div\",{style:{marginBottom:\"16px\"},children:[/*#__PURE__*/_jsxs(\"button\",{onClick:()=>togglePanel(\"course\"),style:panelButtonStyle,children:[\"📘 Help with a Math Course\",\" \",openPanel===\"course\"?\"▲\":\"▼\"]}),openPanel===\"course\"&&/*#__PURE__*/_jsxs(\"div\",{style:panelContentStyle,children:[/*#__PURE__*/_jsx(\"label\",{style:{fontWeight:\"bold\",display:\"block\",marginTop:\"12px\"},children:\"Mode\"}),/*#__PURE__*/_jsxs(\"select\",{value:mode,onChange:e=>setMode(e.target.value),style:{padding:\"8px\",marginTop:\"8px\",width:\"100%\",borderRadius:\"8px\",border:\"1px solid #ccc\",fontSize:\"15px\"},children:[/*#__PURE__*/_jsx(\"option\",{value:\"study\",children:\"📘 Study Mode\"}),/*#__PURE__*/_jsx(\"option\",{value:\"test\",children:\"🧪 Test Mode\"})]}),/*#__PURE__*/_jsx(\"label\",{style:{fontWeight:\"bold\",display:\"block\",marginTop:\"16px\"},children:level===\"college\"?\"College Course\":level===\"high\"?\"High School Math\":level===\"middle\"?\"Middle School Math\":\"Elementary Math\"}),/*#__PURE__*/_jsxs(\"select\",{value:topic,onChange:e=>setTopic(e.target.value),style:{padding:\"8px\",width:\"100%\",marginTop:\"8px\"},children:[/*#__PURE__*/_jsx(\"option\",{value:\"\",children:\"-- Select a math topic --\"}),Object.entries(topicLabels).map(([value,label])=>/*#__PURE__*/_jsx(\"option\",{value:value,children:label},value))]}),/*#__PURE__*/_jsx(\"button\",{onClick:handleStart,style:{marginTop:\"16px\",padding:\"10px 20px\",background:\"#4a90e2\",color:\"#fff\",border:\"none\",borderRadius:\"8px\",fontWeight:\"bold\"},children:\"Start Course Help\"})]})]}),/*#__PURE__*/_jsxs(\"div\",{style:{marginBottom:\"16px\"},children:[/*#__PURE__*/_jsxs(\"button\",{onClick:()=>togglePanel(\"homework\"),style:panelButtonStyle,children:[\"📎 Upload Homework File\",\" \",openPanel===\"homework\"?\"▲\":\"▼\"]}),openPanel===\"homework\"&&/*#__PURE__*/_jsxs(\"div\",{style:panelContentStyle,children:[/*#__PURE__*/_jsx(\"p\",{style:{fontSize:\"14px\",color:\"#444\",marginBottom:\"8px\"},children:\"After reading your file (one page limit per session) the Ownable™ AI-Powered Math Tutor will guide you step-by-step.\"}),/*#__PURE__*/_jsx(\"input\",{type:\"file\",accept:\".txt,.pdf\",onChange:async e=>{const file=e.target.files[0];if(file.size>200*1024){alert(\"📄 File is too large. Please upload only one page (under 200KB).\");return;}setUploadedFileName(file.name);await startHomeworkHelp(file,language,customLang);},style:{marginTop:8,padding:\"8px 12px\",borderRadius:\"8px\",border:\"1px solid #ccc\",fontSize:\"15px\",width:\"100%\"}}),/*#__PURE__*/_jsx(\"div\",{style:{marginTop:\"16px\",fontSize:\"14px\",fontStyle:\"italic\",color:\"#444\",backgroundColor:\"#f5f5f5\",padding:\"12px\",borderRadius:\"8px\",whiteSpace:\"pre-wrap\"},children:uploadedFileName?`📄 File uploaded: ${uploadedFileName}`:\"No file uploaded yet.\"})]})]}),/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsxs(\"button\",{onClick:()=>togglePanel(\"resume\"),style:panelButtonStyle,children:[\"🔄 Resume Last Session \",openPanel===\"resume\"?\"▲\":\"▼\"]}),openPanel===\"resume\"&&/*#__PURE__*/_jsxs(\"div\",{style:panelContentStyle,children:[/*#__PURE__*/_jsx(\"p\",{children:\"I’ll pick up where we left off.\"}),/*#__PURE__*/_jsx(\"button\",{onClick:handleResumeLast,style:{marginTop:\"12px\",padding:\"8px 12px\",backgroundColor:\"#f0f0f0\",color:\"#333\",border:\"1px solid #ccc\",borderRadius:\"8px\"},children:\"Resume\"}),/*#__PURE__*/_jsx(\"span\",{style:{display:\"block\",fontSize:\"12px\",color:\"#666\",marginTop:\"8px\"},children:\"⚠️ Resume only works in the exact browser and device previously used. Your session is stored locally on your device and never uploaded automatically to Ownable™.\"})]})]})]});}const panelButtonStyle={width:\"100%\",textAlign:\"left\",fontWeight:\"bold\",padding:\"12px\",borderRadius:\"8px\",border:\"1px solid #ccc\",backgroundColor:\"#eef2f6\",cursor:\"pointer\",marginBottom:\"4px\"};const panelContentStyle={backgroundColor:\"#fff\",border:\"1px solid #ddd\",padding:\"16px\",borderRadius:\"8px\",marginTop:\"8px\"};// the following section tells Framer that level is a prop that can be changed from the design panel\n// Enables the dropdown in the right sidebar when you drag the component into a Framer page\n// Lets you easily set \"elementary\", \"middle\", etc. per page\naddPropertyControls(OwnableMathCompanion,{level:{type:ControlType.Enum,title:\"Level\",options:[\"elementary\",\"middle\",\"high\",\"college\"],optionTitles:[\"Elementary\",\"Middle\",\"High\",\"College\"],defaultValue:\"college\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"OwnableMathCompanion\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./OwnableMathCompanion.map"],"mappings":"gVACyE,SAAS,EAAS,CAAC,OAAK,CAAC,CAAC,GAAK,CAAC,EAAM,EAAS,CAAA,EAAgB,CAAC,EAAS,IAAS,QAAa,EAAO,QACnD,GAD2D,MAAoB,CAAC,GAAU,IAAS,OAAY,OAAO,GAAG,EAAO,MAAM,CAAC,EAAS,IAAM,MAAQ,CAC1R,IAAM,EAAK,gBAAgB,CAAI,EAAO,QAAO,EAAS,IAAM,cAAc,GAAQ,EAAC,KAAK,UAAU,cAAc,EAAO,EAAC,EAAE,EAAK,CAAC,EAAM,OAAoB,EAAKA,EAAU,CAAC,SAAS,EAAK,EAAE,IAAM,EAAM,EAAO,MACvM,EAAa,EAAK,MAAM,uBAA6B,EAAM,EAAE,CAEgb,OAF/a,EAAa,SAAS,EAAM,IAAI,CAAC,IAAM,EAAS,uBAAuB,KAAK,GAAO,GAAG,EAAS,CAAC,IAAM,EAAK,EAAM,eAAe,EAAS,GAAG,CAAC,YAAY,GAAK,aAAa,GAAM,EACrP,EAAM,KAAkB,EAAK,MAAM,CAAC,MAAM,CAAC,WAAW,SAAS,aAAa,WAAW,UAAU,aAAa,SAAS,OAAO,OAAO,QAAQ,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